@schmitech/chatbot-widget 0.2.3 → 0.3.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.
@@ -7,7 +7,7 @@
7
7
  document.head.appendChild(style);
8
8
  })();
9
9
 
10
- (function(Ee,N){typeof exports=="object"&&typeof module<"u"?N(exports,require("react")):typeof define=="function"&&define.amd?define(["exports","react"],N):(Ee=typeof globalThis<"u"?globalThis:Ee||self,N(Ee.ChatbotWidget={},Ee.React))})(this,function(Ee,N){"use strict";typeof window<"u"&&(window.global=window);var Hn={},Tt=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof Hn<"u"?Hn:typeof self<"u"?self:{};function Ht(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Vt={exports:{}},dt={};/**
10
+ (function(ge,N){typeof exports=="object"&&typeof module<"u"?N(exports,require("react")):typeof define=="function"&&define.amd?define(["exports","react"],N):(ge=typeof globalThis<"u"?globalThis:ge||self,N(ge.ChatbotWidget={},ge.React))})(this,function(ge,N){"use strict";typeof window<"u"&&(window.global=window);var Yn={},It=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof Yn<"u"?Yn:typeof self<"u"?self:{};function Ut(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Vt={exports:{}},gt={};/**
11
11
  * @license React
12
12
  * react-jsx-runtime.production.min.js
13
13
  *
@@ -15,7 +15,7 @@
15
15
  *
16
16
  * This source code is licensed under the MIT license found in the
17
17
  * LICENSE file in the root directory of this source tree.
18
- */var Vn;function Gi(){if(Vn)return dt;Vn=1;var e=N,t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,i=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,o={key:!0,ref:!0,__self:!0,__source:!0};function l(a,u,c){var s,f={},h=null,p=null;c!==void 0&&(h=""+c),u.key!==void 0&&(h=""+u.key),u.ref!==void 0&&(p=u.ref);for(s in u)r.call(u,s)&&!o.hasOwnProperty(s)&&(f[s]=u[s]);if(a&&a.defaultProps)for(s in u=a.defaultProps,u)f[s]===void 0&&(f[s]=u[s]);return{$$typeof:t,type:a,key:h,ref:p,props:f,_owner:i.current}}return dt.Fragment=n,dt.jsx=l,dt.jsxs=l,dt}var mt={},Wn;function Ki(){if(Wn)return mt;Wn=1;var e={};/**
18
+ */var Kn;function Gi(){if(Kn)return gt;Kn=1;var e=N,t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,i=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,o={key:!0,ref:!0,__self:!0,__source:!0};function l(a,u,c){var s,f={},h=null,p=null;c!==void 0&&(h=""+c),u.key!==void 0&&(h=""+u.key),u.ref!==void 0&&(p=u.ref);for(s in u)r.call(u,s)&&!o.hasOwnProperty(s)&&(f[s]=u[s]);if(a&&a.defaultProps)for(s in u=a.defaultProps,u)f[s]===void 0&&(f[s]=u[s]);return{$$typeof:t,type:a,key:h,ref:p,props:f,_owner:i.current}}return gt.Fragment=n,gt.jsx=l,gt.jsxs=l,gt}var yt={},qn;function Xi(){if(qn)return yt;qn=1;var e={};/**
19
19
  * @license React
20
20
  * react-jsx-runtime.development.js
21
21
  *
@@ -23,100 +23,100 @@
23
23
  *
24
24
  * This source code is licensed under the MIT license found in the
25
25
  * LICENSE file in the root directory of this source tree.
26
- */return e.NODE_ENV!=="production"&&function(){var t=N,n=Symbol.for("react.element"),r=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),l=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),u=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),s=Symbol.for("react.suspense"),f=Symbol.for("react.suspense_list"),h=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),y=Symbol.for("react.offscreen"),x=Symbol.iterator,T="@@iterator";function k(m){if(m===null||typeof m!="object")return null;var S=x&&m[x]||m[T];return typeof S=="function"?S:null}var R=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function _(m){{for(var S=arguments.length,I=new Array(S>1?S-1:0),z=1;z<S;z++)I[z-1]=arguments[z];H("error",m,I)}}function H(m,S,I){{var z=R.ReactDebugCurrentFrame,ee=z.getStackAddendum();ee!==""&&(S+="%s",I=I.concat([ee]));var ne=I.map(function(X){return String(X)});ne.unshift("Warning: "+S),Function.prototype.apply.call(console[m],console,ne)}}var V=!1,w=!1,j=!1,G=!1,W=!1,Z;Z=Symbol.for("react.module.reference");function O(m){return!!(typeof m=="string"||typeof m=="function"||m===i||m===l||W||m===o||m===s||m===f||G||m===y||V||w||j||typeof m=="object"&&m!==null&&(m.$$typeof===p||m.$$typeof===h||m.$$typeof===a||m.$$typeof===u||m.$$typeof===c||m.$$typeof===Z||m.getModuleId!==void 0))}function P(m,S,I){var z=m.displayName;if(z)return z;var ee=S.displayName||S.name||"";return ee!==""?I+"("+ee+")":I}function $(m){return m.displayName||"Context"}function K(m){if(m==null)return null;if(typeof m.tag=="number"&&_("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof m=="function")return m.displayName||m.name||null;if(typeof m=="string")return m;switch(m){case i:return"Fragment";case r:return"Portal";case l:return"Profiler";case o:return"StrictMode";case s:return"Suspense";case f:return"SuspenseList"}if(typeof m=="object")switch(m.$$typeof){case u:var S=m;return $(S)+".Consumer";case a:var I=m;return $(I._context)+".Provider";case c:return P(m,m.render,"ForwardRef");case h:var z=m.displayName||null;return z!==null?z:K(m.type)||"Memo";case p:{var ee=m,ne=ee._payload,X=ee._init;try{return K(X(ne))}catch{return null}}}return null}var M=Object.assign,oe=0,te,de,F,d,le,be,g;function me(){}me.__reactDisabledLog=!0;function De(){{if(oe===0){te=console.log,de=console.info,F=console.warn,d=console.error,le=console.group,be=console.groupCollapsed,g=console.groupEnd;var m={configurable:!0,enumerable:!0,value:me,writable:!0};Object.defineProperties(console,{info:m,log:m,warn:m,error:m,group:m,groupCollapsed:m,groupEnd:m})}oe++}}function ae(){{if(oe--,oe===0){var m={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:M({},m,{value:te}),info:M({},m,{value:de}),warn:M({},m,{value:F}),error:M({},m,{value:d}),group:M({},m,{value:le}),groupCollapsed:M({},m,{value:be}),groupEnd:M({},m,{value:g})})}oe<0&&_("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var Fe=R.ReactCurrentDispatcher,we;function Le(m,S,I){{if(we===void 0)try{throw Error()}catch(ee){var z=ee.stack.trim().match(/\n( *(at )?)/);we=z&&z[1]||""}return`
27
- `+we+m}}var pe=!1,je;{var Ct=typeof WeakMap=="function"?WeakMap:Map;je=new Ct}function ft(m,S){if(!m||pe)return"";{var I=je.get(m);if(I!==void 0)return I}var z;pe=!0;var ee=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var ne;ne=Fe.current,Fe.current=null,De();try{if(S){var X=function(){throw Error()};if(Object.defineProperty(X.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(X,[])}catch(Re){z=Re}Reflect.construct(m,[],X)}else{try{X.call()}catch(Re){z=Re}m.call(X.prototype)}}else{try{throw Error()}catch(Re){z=Re}m()}}catch(Re){if(Re&&z&&typeof Re.stack=="string"){for(var q=Re.stack.split(`
28
- `),Se=z.stack.split(`
29
- `),ue=q.length-1,fe=Se.length-1;ue>=1&&fe>=0&&q[ue]!==Se[fe];)fe--;for(;ue>=1&&fe>=0;ue--,fe--)if(q[ue]!==Se[fe]){if(ue!==1||fe!==1)do if(ue--,fe--,fe<0||q[ue]!==Se[fe]){var ze=`
30
- `+q[ue].replace(" at new "," at ");return m.displayName&&ze.includes("<anonymous>")&&(ze=ze.replace("<anonymous>",m.displayName)),typeof m=="function"&&je.set(m,ze),ze}while(ue>=1&&fe>=0);break}}}finally{pe=!1,Fe.current=ne,ae(),Error.prepareStackTrace=ee}var ht=m?m.displayName||m.name:"",it=ht?Le(ht):"";return typeof m=="function"&&je.set(m,it),it}function _t(m,S,I){return ft(m,!1)}function $e(m){var S=m.prototype;return!!(S&&S.isReactComponent)}function Ye(m,S,I){if(m==null)return"";if(typeof m=="function")return ft(m,$e(m));if(typeof m=="string")return Le(m);switch(m){case s:return Le("Suspense");case f:return Le("SuspenseList")}if(typeof m=="object")switch(m.$$typeof){case c:return _t(m.render);case h:return Ye(m.type,S,I);case p:{var z=m,ee=z._payload,ne=z._init;try{return Ye(ne(ee),S,I)}catch{}}}return""}var A=Object.prototype.hasOwnProperty,Y={},se=R.ReactDebugCurrentFrame;function ye(m){if(m){var S=m._owner,I=Ye(m.type,m._source,S?S.type:null);se.setExtraStackFrame(I)}else se.setExtraStackFrame(null)}function Ae(m,S,I,z,ee){{var ne=Function.call.bind(A);for(var X in m)if(ne(m,X)){var q=void 0;try{if(typeof m[X]!="function"){var Se=Error((z||"React class")+": "+I+" type `"+X+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof m[X]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw Se.name="Invariant Violation",Se}q=m[X](S,X,z,I,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(ue){q=ue}q&&!(q instanceof Error)&&(ye(ee),_("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",z||"React class",I,X,typeof q),ye(null)),q instanceof Error&&!(q.message in Y)&&(Y[q.message]=!0,ye(ee),_("Failed %s type: %s",I,q.message),ye(null))}}}var ke=Array.isArray;function et(m){return ke(m)}function tt(m){{var S=typeof Symbol=="function"&&Symbol.toStringTag,I=S&&m[Symbol.toStringTag]||m.constructor.name||"Object";return I}}function We(m){try{return b(m),!1}catch{return!0}}function b(m){return""+m}function v(m){if(We(m))return _("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",tt(m)),b(m)}var L=R.ReactCurrentOwner,U={key:!0,ref:!0,__self:!0,__source:!0},Q,xe;function qe(m){if(A.call(m,"ref")){var S=Object.getOwnPropertyDescriptor(m,"ref").get;if(S&&S.isReactWarning)return!1}return m.ref!==void 0}function Me(m){if(A.call(m,"key")){var S=Object.getOwnPropertyDescriptor(m,"key").get;if(S&&S.isReactWarning)return!1}return m.key!==void 0}function nt(m,S){typeof m.ref=="string"&&L.current}function rt(m,S){{var I=function(){Q||(Q=!0,_("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",S))};I.isReactWarning=!0,Object.defineProperty(m,"key",{get:I,configurable:!0})}}function ve(m,S){{var I=function(){xe||(xe=!0,_("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",S))};I.isReactWarning=!0,Object.defineProperty(m,"ref",{get:I,configurable:!0})}}var Qe=function(m,S,I,z,ee,ne,X){var q={$$typeof:n,type:m,key:S,ref:I,props:X,_owner:ne};return q._store={},Object.defineProperty(q._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(q,"_self",{configurable:!1,enumerable:!1,writable:!1,value:z}),Object.defineProperty(q,"_source",{configurable:!1,enumerable:!1,writable:!1,value:ee}),Object.freeze&&(Object.freeze(q.props),Object.freeze(q)),q};function Be(m,S,I,z,ee){{var ne,X={},q=null,Se=null;I!==void 0&&(v(I),q=""+I),Me(S)&&(v(S.key),q=""+S.key),qe(S)&&(Se=S.ref,nt(S,ee));for(ne in S)A.call(S,ne)&&!U.hasOwnProperty(ne)&&(X[ne]=S[ne]);if(m&&m.defaultProps){var ue=m.defaultProps;for(ne in ue)X[ne]===void 0&&(X[ne]=ue[ne])}if(q||Se){var fe=typeof m=="function"?m.displayName||m.name||"Unknown":m;q&&rt(X,fe),Se&&ve(X,fe)}return Qe(m,q,Se,ee,z,L.current,X)}}var Fn=R.ReactCurrentOwner,Bi=R.ReactDebugCurrentFrame;function pt(m){if(m){var S=m._owner,I=Ye(m.type,m._source,S?S.type:null);Bi.setExtraStackFrame(I)}else Bi.setExtraStackFrame(null)}var Mn;Mn=!1;function Bn(m){return typeof m=="object"&&m!==null&&m.$$typeof===n}function Ui(){{if(Fn.current){var m=K(Fn.current.type);if(m)return`
26
+ */return e.NODE_ENV!=="production"&&function(){var t=N,n=Symbol.for("react.element"),r=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),l=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),u=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),s=Symbol.for("react.suspense"),f=Symbol.for("react.suspense_list"),h=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),y=Symbol.for("react.offscreen"),x=Symbol.iterator,T="@@iterator";function w(m){if(m===null||typeof m!="object")return null;var S=x&&m[x]||m[T];return typeof S=="function"?S:null}var A=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function _(m){{for(var S=arguments.length,I=new Array(S>1?S-1:0),M=1;M<S;M++)I[M-1]=arguments[M];H("error",m,I)}}function H(m,S,I){{var M=A.ReactDebugCurrentFrame,ee=M.getStackAddendum();ee!==""&&(S+="%s",I=I.concat([ee]));var ne=I.map(function(X){return String(X)});ne.unshift("Warning: "+S),Function.prototype.apply.call(console[m],console,ne)}}var F=!1,k=!1,R=!1,Y=!1,V=!1,Z;Z=Symbol.for("react.module.reference");function P(m){return!!(typeof m=="string"||typeof m=="function"||m===i||m===l||V||m===o||m===s||m===f||Y||m===y||F||k||R||typeof m=="object"&&m!==null&&(m.$$typeof===p||m.$$typeof===h||m.$$typeof===a||m.$$typeof===u||m.$$typeof===c||m.$$typeof===Z||m.getModuleId!==void 0))}function L(m,S,I){var M=m.displayName;if(M)return M;var ee=S.displayName||S.name||"";return ee!==""?I+"("+ee+")":I}function $(m){return m.displayName||"Context"}function G(m){if(m==null)return null;if(typeof m.tag=="number"&&_("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof m=="function")return m.displayName||m.name||null;if(typeof m=="string")return m;switch(m){case i:return"Fragment";case r:return"Portal";case l:return"Profiler";case o:return"StrictMode";case s:return"Suspense";case f:return"SuspenseList"}if(typeof m=="object")switch(m.$$typeof){case u:var S=m;return $(S)+".Consumer";case a:var I=m;return $(I._context)+".Provider";case c:return L(m,m.render,"ForwardRef");case h:var M=m.displayName||null;return M!==null?M:G(m.type)||"Memo";case p:{var ee=m,ne=ee._payload,X=ee._init;try{return G(X(ne))}catch{return null}}}return null}var B=Object.assign,oe=0,te,de,z,d,le,we,g;function me(){}me.__reactDisabledLog=!0;function De(){{if(oe===0){te=console.log,de=console.info,z=console.warn,d=console.error,le=console.group,we=console.groupCollapsed,g=console.groupEnd;var m={configurable:!0,enumerable:!0,value:me,writable:!0};Object.defineProperties(console,{info:m,log:m,warn:m,error:m,group:m,groupCollapsed:m,groupEnd:m})}oe++}}function ae(){{if(oe--,oe===0){var m={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:B({},m,{value:te}),info:B({},m,{value:de}),warn:B({},m,{value:z}),error:B({},m,{value:d}),group:B({},m,{value:le}),groupCollapsed:B({},m,{value:we}),groupEnd:B({},m,{value:g})})}oe<0&&_("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var ze=A.ReactCurrentDispatcher,ke;function Le(m,S,I){{if(ke===void 0)try{throw Error()}catch(ee){var M=ee.stack.trim().match(/\n( *(at )?)/);ke=M&&M[1]||""}return`
27
+ `+ke+m}}var pe=!1,je;{var _t=typeof WeakMap=="function"?WeakMap:Map;je=new _t}function ht(m,S){if(!m||pe)return"";{var I=je.get(m);if(I!==void 0)return I}var M;pe=!0;var ee=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var ne;ne=ze.current,ze.current=null,De();try{if(S){var X=function(){throw Error()};if(Object.defineProperty(X.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(X,[])}catch(Oe){M=Oe}Reflect.construct(m,[],X)}else{try{X.call()}catch(Oe){M=Oe}m.call(X.prototype)}}else{try{throw Error()}catch(Oe){M=Oe}m()}}catch(Oe){if(Oe&&M&&typeof Oe.stack=="string"){for(var q=Oe.stack.split(`
28
+ `),Ee=M.stack.split(`
29
+ `),ue=q.length-1,fe=Ee.length-1;ue>=1&&fe>=0&&q[ue]!==Ee[fe];)fe--;for(;ue>=1&&fe>=0;ue--,fe--)if(q[ue]!==Ee[fe]){if(ue!==1||fe!==1)do if(ue--,fe--,fe<0||q[ue]!==Ee[fe]){var Me=`
30
+ `+q[ue].replace(" at new "," at ");return m.displayName&&Me.includes("<anonymous>")&&(Me=Me.replace("<anonymous>",m.displayName)),typeof m=="function"&&je.set(m,Me),Me}while(ue>=1&&fe>=0);break}}}finally{pe=!1,ze.current=ne,ae(),Error.prepareStackTrace=ee}var mt=m?m.displayName||m.name:"",it=mt?Le(mt):"";return typeof m=="function"&&je.set(m,it),it}function Tt(m,S,I){return ht(m,!1)}function $e(m){var S=m.prototype;return!!(S&&S.isReactComponent)}function Ye(m,S,I){if(m==null)return"";if(typeof m=="function")return ht(m,$e(m));if(typeof m=="string")return Le(m);switch(m){case s:return Le("Suspense");case f:return Le("SuspenseList")}if(typeof m=="object")switch(m.$$typeof){case c:return Tt(m.render);case h:return Ye(m.type,S,I);case p:{var M=m,ee=M._payload,ne=M._init;try{return Ye(ne(ee),S,I)}catch{}}}return""}var O=Object.prototype.hasOwnProperty,K={},se=A.ReactDebugCurrentFrame;function xe(m){if(m){var S=m._owner,I=Ye(m.type,m._source,S?S.type:null);se.setExtraStackFrame(I)}else se.setExtraStackFrame(null)}function Ae(m,S,I,M,ee){{var ne=Function.call.bind(O);for(var X in m)if(ne(m,X)){var q=void 0;try{if(typeof m[X]!="function"){var Ee=Error((M||"React class")+": "+I+" type `"+X+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof m[X]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw Ee.name="Invariant Violation",Ee}q=m[X](S,X,M,I,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(ue){q=ue}q&&!(q instanceof Error)&&(xe(ee),_("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",M||"React class",I,X,typeof q),xe(null)),q instanceof Error&&!(q.message in K)&&(K[q.message]=!0,xe(ee),_("Failed %s type: %s",I,q.message),xe(null))}}}var ve=Array.isArray;function et(m){return ve(m)}function tt(m){{var S=typeof Symbol=="function"&&Symbol.toStringTag,I=S&&m[Symbol.toStringTag]||m.constructor.name||"Object";return I}}function We(m){try{return b(m),!1}catch{return!0}}function b(m){return""+m}function v(m){if(We(m))return _("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",tt(m)),b(m)}var j=A.ReactCurrentOwner,W={key:!0,ref:!0,__self:!0,__source:!0},Q,be;function Ke(m){if(O.call(m,"ref")){var S=Object.getOwnPropertyDescriptor(m,"ref").get;if(S&&S.isReactWarning)return!1}return m.ref!==void 0}function Fe(m){if(O.call(m,"key")){var S=Object.getOwnPropertyDescriptor(m,"key").get;if(S&&S.isReactWarning)return!1}return m.key!==void 0}function nt(m,S){typeof m.ref=="string"&&j.current}function rt(m,S){{var I=function(){Q||(Q=!0,_("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",S))};I.isReactWarning=!0,Object.defineProperty(m,"key",{get:I,configurable:!0})}}function Se(m,S){{var I=function(){be||(be=!0,_("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",S))};I.isReactWarning=!0,Object.defineProperty(m,"ref",{get:I,configurable:!0})}}var Qe=function(m,S,I,M,ee,ne,X){var q={$$typeof:n,type:m,key:S,ref:I,props:X,_owner:ne};return q._store={},Object.defineProperty(q._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(q,"_self",{configurable:!1,enumerable:!1,writable:!1,value:M}),Object.defineProperty(q,"_source",{configurable:!1,enumerable:!1,writable:!1,value:ee}),Object.freeze&&(Object.freeze(q.props),Object.freeze(q)),q};function Be(m,S,I,M,ee){{var ne,X={},q=null,Ee=null;I!==void 0&&(v(I),q=""+I),Fe(S)&&(v(S.key),q=""+S.key),Ke(S)&&(Ee=S.ref,nt(S,ee));for(ne in S)O.call(S,ne)&&!W.hasOwnProperty(ne)&&(X[ne]=S[ne]);if(m&&m.defaultProps){var ue=m.defaultProps;for(ne in ue)X[ne]===void 0&&(X[ne]=ue[ne])}if(q||Ee){var fe=typeof m=="function"?m.displayName||m.name||"Unknown":m;q&&rt(X,fe),Ee&&Se(X,fe)}return Qe(m,q,Ee,ee,M,j.current,X)}}var Hn=A.ReactCurrentOwner,Hi=A.ReactDebugCurrentFrame;function dt(m){if(m){var S=m._owner,I=Ye(m.type,m._source,S?S.type:null);Hi.setExtraStackFrame(I)}else Hi.setExtraStackFrame(null)}var Un;Un=!1;function Vn(m){return typeof m=="object"&&m!==null&&m.$$typeof===n}function Ui(){{if(Hn.current){var m=G(Hn.current.type);if(m)return`
31
31
 
32
- Check the render method of \``+m+"`."}return""}}function ac(m){return""}var Hi={};function sc(m){{var S=Ui();if(!S){var I=typeof m=="string"?m:m.displayName||m.name;I&&(S=`
32
+ Check the render method of \``+m+"`."}return""}}function ac(m){return""}var Vi={};function sc(m){{var S=Ui();if(!S){var I=typeof m=="string"?m:m.displayName||m.name;I&&(S=`
33
33
 
34
- Check the top-level render call using <`+I+">.")}return S}}function Vi(m,S){{if(!m._store||m._store.validated||m.key!=null)return;m._store.validated=!0;var I=sc(S);if(Hi[I])return;Hi[I]=!0;var z="";m&&m._owner&&m._owner!==Fn.current&&(z=" It was passed a child from "+K(m._owner.type)+"."),pt(m),_('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',I,z),pt(null)}}function Wi(m,S){{if(typeof m!="object")return;if(et(m))for(var I=0;I<m.length;I++){var z=m[I];Bn(z)&&Vi(z,S)}else if(Bn(m))m._store&&(m._store.validated=!0);else if(m){var ee=k(m);if(typeof ee=="function"&&ee!==m.entries)for(var ne=ee.call(m),X;!(X=ne.next()).done;)Bn(X.value)&&Vi(X.value,S)}}}function uc(m){{var S=m.type;if(S==null||typeof S=="string")return;var I;if(typeof S=="function")I=S.propTypes;else if(typeof S=="object"&&(S.$$typeof===c||S.$$typeof===h))I=S.propTypes;else return;if(I){var z=K(S);Ae(I,m.props,"prop",z,m)}else if(S.PropTypes!==void 0&&!Mn){Mn=!0;var ee=K(S);_("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",ee||"Unknown")}typeof S.getDefaultProps=="function"&&!S.getDefaultProps.isReactClassApproved&&_("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function cc(m){{for(var S=Object.keys(m.props),I=0;I<S.length;I++){var z=S[I];if(z!=="children"&&z!=="key"){pt(m),_("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",z),pt(null);break}}m.ref!==null&&(pt(m),_("Invalid attribute `ref` supplied to `React.Fragment`."),pt(null))}}var Yi={};function qi(m,S,I,z,ee,ne){{var X=O(m);if(!X){var q="";(m===void 0||typeof m=="object"&&m!==null&&Object.keys(m).length===0)&&(q+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var Se=ac();Se?q+=Se:q+=Ui();var ue;m===null?ue="null":et(m)?ue="array":m!==void 0&&m.$$typeof===n?(ue="<"+(K(m.type)||"Unknown")+" />",q=" Did you accidentally export a JSX literal instead of a component?"):ue=typeof m,_("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",ue,q)}var fe=Be(m,S,I,ee,ne);if(fe==null)return fe;if(X){var ze=S.children;if(ze!==void 0)if(z)if(et(ze)){for(var ht=0;ht<ze.length;ht++)Wi(ze[ht],m);Object.freeze&&Object.freeze(ze)}else _("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else Wi(ze,m)}if(A.call(S,"key")){var it=K(m),Re=Object.keys(S).filter(function(gc){return gc!=="key"}),Un=Re.length>0?"{key: someKey, "+Re.join(": ..., ")+": ...}":"{key: someKey}";if(!Yi[it+Un]){var mc=Re.length>0?"{"+Re.join(": ..., ")+": ...}":"{}";_(`A props object containing a "key" prop is being spread into JSX:
34
+ Check the top-level render call using <`+I+">.")}return S}}function Wi(m,S){{if(!m._store||m._store.validated||m.key!=null)return;m._store.validated=!0;var I=sc(S);if(Vi[I])return;Vi[I]=!0;var M="";m&&m._owner&&m._owner!==Hn.current&&(M=" It was passed a child from "+G(m._owner.type)+"."),dt(m),_('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',I,M),dt(null)}}function Yi(m,S){{if(typeof m!="object")return;if(et(m))for(var I=0;I<m.length;I++){var M=m[I];Vn(M)&&Wi(M,S)}else if(Vn(m))m._store&&(m._store.validated=!0);else if(m){var ee=w(m);if(typeof ee=="function"&&ee!==m.entries)for(var ne=ee.call(m),X;!(X=ne.next()).done;)Vn(X.value)&&Wi(X.value,S)}}}function uc(m){{var S=m.type;if(S==null||typeof S=="string")return;var I;if(typeof S=="function")I=S.propTypes;else if(typeof S=="object"&&(S.$$typeof===c||S.$$typeof===h))I=S.propTypes;else return;if(I){var M=G(S);Ae(I,m.props,"prop",M,m)}else if(S.PropTypes!==void 0&&!Un){Un=!0;var ee=G(S);_("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",ee||"Unknown")}typeof S.getDefaultProps=="function"&&!S.getDefaultProps.isReactClassApproved&&_("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function cc(m){{for(var S=Object.keys(m.props),I=0;I<S.length;I++){var M=S[I];if(M!=="children"&&M!=="key"){dt(m),_("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",M),dt(null);break}}m.ref!==null&&(dt(m),_("Invalid attribute `ref` supplied to `React.Fragment`."),dt(null))}}var Ki={};function qi(m,S,I,M,ee,ne){{var X=P(m);if(!X){var q="";(m===void 0||typeof m=="object"&&m!==null&&Object.keys(m).length===0)&&(q+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var Ee=ac();Ee?q+=Ee:q+=Ui();var ue;m===null?ue="null":et(m)?ue="array":m!==void 0&&m.$$typeof===n?(ue="<"+(G(m.type)||"Unknown")+" />",q=" Did you accidentally export a JSX literal instead of a component?"):ue=typeof m,_("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",ue,q)}var fe=Be(m,S,I,ee,ne);if(fe==null)return fe;if(X){var Me=S.children;if(Me!==void 0)if(M)if(et(Me)){for(var mt=0;mt<Me.length;mt++)Yi(Me[mt],m);Object.freeze&&Object.freeze(Me)}else _("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else Yi(Me,m)}if(O.call(S,"key")){var it=G(m),Oe=Object.keys(S).filter(function(gc){return gc!=="key"}),Wn=Oe.length>0?"{key: someKey, "+Oe.join(": ..., ")+": ...}":"{key: someKey}";if(!Ki[it+Wn]){var mc=Oe.length>0?"{"+Oe.join(": ..., ")+": ...}":"{}";_(`A props object containing a "key" prop is being spread into JSX:
35
35
  let props = %s;
36
36
  <%s {...props} />
37
37
  React keys must be passed directly to JSX without using spread:
38
38
  let props = %s;
39
- <%s key={someKey} {...props} />`,Un,it,mc,it),Yi[it+Un]=!0}}return m===i?cc(fe):uc(fe),fe}}function fc(m,S,I){return qi(m,S,I,!0)}function pc(m,S,I){return qi(m,S,I,!1)}var hc=pc,dc=fc;mt.Fragment=i,mt.jsx=hc,mt.jsxs=dc}(),mt}var Xi={};Xi.NODE_ENV==="production"?Vt.exports=Gi():Vt.exports=Ki();var E=Vt.exports;/**
39
+ <%s key={someKey} {...props} />`,Wn,it,mc,it),Ki[it+Wn]=!0}}return m===i?cc(fe):uc(fe),fe}}function fc(m,S,I){return qi(m,S,I,!0)}function pc(m,S,I){return qi(m,S,I,!1)}var hc=pc,dc=fc;yt.Fragment=i,yt.jsx=hc,yt.jsxs=dc}(),yt}var Qi={};Qi.NODE_ENV==="production"?Vt.exports=Gi():Vt.exports=Xi();var E=Vt.exports;/**
40
40
  * @license lucide-react v0.344.0 - ISC
41
41
  *
42
42
  * This source code is licensed under the ISC license.
43
43
  * See the LICENSE file in the root directory of this source tree.
44
- */var Qi={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"};/**
44
+ */var Ji={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"};/**
45
45
  * @license lucide-react v0.344.0 - ISC
46
46
  *
47
47
  * This source code is licensed under the ISC license.
48
48
  * See the LICENSE file in the root directory of this source tree.
49
- */const Ji=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase().trim(),Ce=(e,t)=>{const n=N.forwardRef(({color:r="currentColor",size:i=24,strokeWidth:o=2,absoluteStrokeWidth:l,className:a="",children:u,...c},s)=>N.createElement("svg",{ref:s,...Qi,width:i,height:i,stroke:r,strokeWidth:l?Number(o)*24/Number(i):o,className:["lucide",`lucide-${Ji(e)}`,a].join(" "),...c},[...t.map(([f,h])=>N.createElement(f,h)),...Array.isArray(u)?u:[u]]));return n.displayName=`${e}`,n};/**
49
+ */const Zi=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase().trim(),Ce=(e,t)=>{const n=N.forwardRef(({color:r="currentColor",size:i=24,strokeWidth:o=2,absoluteStrokeWidth:l,className:a="",children:u,...c},s)=>N.createElement("svg",{ref:s,...Ji,width:i,height:i,stroke:r,strokeWidth:l?Number(o)*24/Number(i):o,className:["lucide",`lucide-${Zi(e)}`,a].join(" "),...c},[...t.map(([f,h])=>N.createElement(f,h)),...Array.isArray(u)?u:[u]]));return n.displayName=`${e}`,n};/**
50
50
  * @license lucide-react v0.344.0 - ISC
51
51
  *
52
52
  * This source code is licensed under the ISC license.
53
53
  * See the LICENSE file in the root directory of this source tree.
54
- */const Zi=Ce("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"}]]);/**
54
+ */const $i=Ce("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"}]]);/**
55
55
  * @license lucide-react v0.344.0 - ISC
56
56
  *
57
57
  * This source code is licensed under the ISC license.
58
58
  * See the LICENSE file in the root directory of this source tree.
59
- */const $i=Ce("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
59
+ */const eo=Ce("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
60
60
  * @license lucide-react v0.344.0 - ISC
61
61
  *
62
62
  * This source code is licensed under the ISC license.
63
63
  * See the LICENSE file in the root directory of this source tree.
64
- */const eo=Ce("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
64
+ */const to=Ce("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
65
65
  * @license lucide-react v0.344.0 - ISC
66
66
  *
67
67
  * This source code is licensed under the ISC license.
68
68
  * See the LICENSE file in the root directory of this source tree.
69
- */const to=Ce("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/**
69
+ */const no=Ce("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/**
70
70
  * @license lucide-react v0.344.0 - ISC
71
71
  *
72
72
  * This source code is licensed under the ISC license.
73
73
  * See the LICENSE file in the root directory of this source tree.
74
- */const no=Ce("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"}]]);/**
74
+ */const ro=Ce("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"}]]);/**
75
75
  * @license lucide-react v0.344.0 - ISC
76
76
  *
77
77
  * This source code is licensed under the ISC license.
78
78
  * See the LICENSE file in the root directory of this source tree.
79
- */const ro=Ce("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"}]]);/**
79
+ */const io=Ce("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"}]]);/**
80
80
  * @license lucide-react v0.344.0 - ISC
81
81
  *
82
82
  * This source code is licensed under the ISC license.
83
83
  * See the LICENSE file in the root directory of this source tree.
84
- */const io=Ce("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"}]]);/**
84
+ */const oo=Ce("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"}]]);/**
85
85
  * @license lucide-react v0.344.0 - ISC
86
86
  *
87
87
  * This source code is licensed under the ISC license.
88
88
  * See the LICENSE file in the root directory of this source tree.
89
- */const oo=Ce("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);/**
89
+ */const lo=Ce("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);/**
90
90
  * @license lucide-react v0.344.0 - ISC
91
91
  *
92
92
  * This source code is licensed under the ISC license.
93
93
  * See the LICENSE file in the root directory of this source tree.
94
- */const Yn=Ce("MessageCircle",[["path",{d:"M7.9 20A9 9 0 1 0 4 16.1L2 22Z",key:"vv11sd"}]]);/**
94
+ */const Gn=Ce("MessageCircle",[["path",{d:"M7.9 20A9 9 0 1 0 4 16.1L2 22Z",key:"vv11sd"}]]);/**
95
95
  * @license lucide-react v0.344.0 - ISC
96
96
  *
97
97
  * This source code is licensed under the ISC license.
98
98
  * See the LICENSE file in the root directory of this source tree.
99
- */const lo=Ce("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"}]]);/**
99
+ */const ao=Ce("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"}]]);/**
100
100
  * @license lucide-react v0.344.0 - ISC
101
101
  *
102
102
  * This source code is licensed under the ISC license.
103
103
  * See the LICENSE file in the root directory of this source tree.
104
- */const qn=Ce("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"}]]);/**
104
+ */const Xn=Ce("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"}]]);/**
105
105
  * @license lucide-react v0.344.0 - ISC
106
106
  *
107
107
  * This source code is licensed under the ISC license.
108
108
  * See the LICENSE file in the root directory of this source tree.
109
- */const ao=Ce("Send",[["path",{d:"m22 2-7 20-4-9-9-4Z",key:"1q3vgg"}],["path",{d:"M22 2 11 13",key:"nzbqef"}]]);/**
109
+ */const so=Ce("Send",[["path",{d:"m22 2-7 20-4-9-9-4Z",key:"1q3vgg"}],["path",{d:"M22 2 11 13",key:"nzbqef"}]]);/**
110
110
  * @license lucide-react v0.344.0 - ISC
111
111
  *
112
112
  * This source code is licensed under the ISC license.
113
113
  * See the LICENSE file in the root directory of this source tree.
114
- */const so=Ce("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"}]]);/**
114
+ */const uo=Ce("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"}]]);/**
115
115
  * @license lucide-react v0.344.0 - ISC
116
116
  *
117
117
  * This source code is licensed under the ISC license.
118
118
  * See the LICENSE file in the root directory of this source tree.
119
- */const uo=Ce("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"}]]),co={},Gn=e=>{let t;const n=new Set,r=(s,f)=>{const h=typeof s=="function"?s(t):s;if(!Object.is(h,t)){const p=t;t=f??(typeof h!="object"||h===null)?h:Object.assign({},t,h),n.forEach(y=>y(t,p))}},i=()=>t,u={setState:r,getState:i,getInitialState:()=>c,subscribe:s=>(n.add(s),()=>n.delete(s)),destroy:()=>{(co?"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."),n.clear()}},c=t=e(r,i,u);return u},fo=e=>e?Gn(e):Gn;var Wt={exports:{}},Yt={},It={exports:{}},qt={};/**
119
+ */const co=Ce("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"}]]),fo={},Qn=e=>{let t;const n=new Set,r=(s,f)=>{const h=typeof s=="function"?s(t):s;if(!Object.is(h,t)){const p=t;t=f??(typeof h!="object"||h===null)?h:Object.assign({},t,h),n.forEach(y=>y(t,p))}},i=()=>t,u={setState:r,getState:i,getInitialState:()=>c,subscribe:s=>(n.add(s),()=>n.delete(s)),destroy:()=>{(fo?"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."),n.clear()}},c=t=e(r,i,u);return u},po=e=>e?Qn(e):Qn;var Wt={exports:{}},Yt={},At={exports:{}},Kt={};/**
120
120
  * @license React
121
121
  * use-sync-external-store-shim.production.js
122
122
  *
@@ -124,7 +124,7 @@ React keys must be passed directly to JSX without using spread:
124
124
  *
125
125
  * This source code is licensed under the MIT license found in the
126
126
  * LICENSE file in the root directory of this source tree.
127
- */var Kn;function po(){if(Kn)return qt;Kn=1;var e=N;function t(f,h){return f===h&&(f!==0||1/f===1/h)||f!==f&&h!==h}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,i=e.useEffect,o=e.useLayoutEffect,l=e.useDebugValue;function a(f,h){var p=h(),y=r({inst:{value:p,getSnapshot:h}}),x=y[0].inst,T=y[1];return o(function(){x.value=p,x.getSnapshot=h,u(x)&&T({inst:x})},[f,p,h]),i(function(){return u(x)&&T({inst:x}),f(function(){u(x)&&T({inst:x})})},[f]),l(p),p}function u(f){var h=f.getSnapshot;f=f.value;try{var p=h();return!n(f,p)}catch{return!0}}function c(f,h){return h()}var s=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?c:a;return qt.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:s,qt}var Gt={},Xn;function ho(){if(Xn)return Gt;Xn=1;var e={};/**
127
+ */var Jn;function ho(){if(Jn)return Kt;Jn=1;var e=N;function t(f,h){return f===h&&(f!==0||1/f===1/h)||f!==f&&h!==h}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,i=e.useEffect,o=e.useLayoutEffect,l=e.useDebugValue;function a(f,h){var p=h(),y=r({inst:{value:p,getSnapshot:h}}),x=y[0].inst,T=y[1];return o(function(){x.value=p,x.getSnapshot=h,u(x)&&T({inst:x})},[f,p,h]),i(function(){return u(x)&&T({inst:x}),f(function(){u(x)&&T({inst:x})})},[f]),l(p),p}function u(f){var h=f.getSnapshot;f=f.value;try{var p=h();return!n(f,p)}catch{return!0}}function c(f,h){return h()}var s=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?c:a;return Kt.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:s,Kt}var qt={},Zn;function mo(){if(Zn)return qt;Zn=1;var e={};/**
128
128
  * @license React
129
129
  * use-sync-external-store-shim.development.js
130
130
  *
@@ -132,7 +132,7 @@ React keys must be passed directly to JSX without using spread:
132
132
  *
133
133
  * This source code is licensed under the MIT license found in the
134
134
  * LICENSE file in the root directory of this source tree.
135
- */return e.NODE_ENV!=="production"&&function(){function t(y,x){return y===x&&(y!==0||1/y===1/x)||y!==y&&x!==x}function n(y,x){f||o.startTransition===void 0||(f=!0,console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var T=x();if(!h){var k=x();l(T,k)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),h=!0)}k=a({inst:{value:T,getSnapshot:x}});var R=k[0].inst,_=k[1];return c(function(){R.value=T,R.getSnapshot=x,r(R)&&_({inst:R})},[y,T,x]),u(function(){return r(R)&&_({inst:R}),y(function(){r(R)&&_({inst:R})})},[y]),s(T),T}function r(y){var x=y.getSnapshot;y=y.value;try{var T=x();return!l(y,T)}catch{return!0}}function i(y,x){return x()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var o=N,l=typeof Object.is=="function"?Object.is:t,a=o.useState,u=o.useEffect,c=o.useLayoutEffect,s=o.useDebugValue,f=!1,h=!1,p=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?i:n;Gt.useSyncExternalStore=o.useSyncExternalStore!==void 0?o.useSyncExternalStore:p,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}(),Gt}var Qn;function Jn(){if(Qn)return It.exports;Qn=1;var e={};return e.NODE_ENV==="production"?It.exports=po():It.exports=ho(),It.exports}/**
135
+ */return e.NODE_ENV!=="production"&&function(){function t(y,x){return y===x&&(y!==0||1/y===1/x)||y!==y&&x!==x}function n(y,x){f||o.startTransition===void 0||(f=!0,console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var T=x();if(!h){var w=x();l(T,w)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),h=!0)}w=a({inst:{value:T,getSnapshot:x}});var A=w[0].inst,_=w[1];return c(function(){A.value=T,A.getSnapshot=x,r(A)&&_({inst:A})},[y,T,x]),u(function(){return r(A)&&_({inst:A}),y(function(){r(A)&&_({inst:A})})},[y]),s(T),T}function r(y){var x=y.getSnapshot;y=y.value;try{var T=x();return!l(y,T)}catch{return!0}}function i(y,x){return x()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var o=N,l=typeof Object.is=="function"?Object.is:t,a=o.useState,u=o.useEffect,c=o.useLayoutEffect,s=o.useDebugValue,f=!1,h=!1,p=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?i:n;qt.useSyncExternalStore=o.useSyncExternalStore!==void 0?o.useSyncExternalStore:p,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}(),qt}var $n;function er(){if($n)return At.exports;$n=1;var e={};return e.NODE_ENV==="production"?At.exports=ho():At.exports=mo(),At.exports}/**
136
136
  * @license React
137
137
  * use-sync-external-store-shim/with-selector.production.js
138
138
  *
@@ -140,7 +140,7 @@ React keys must be passed directly to JSX without using spread:
140
140
  *
141
141
  * This source code is licensed under the MIT license found in the
142
142
  * LICENSE file in the root directory of this source tree.
143
- */var Zn;function mo(){if(Zn)return Yt;Zn=1;var e=N,t=Jn();function n(c,s){return c===s&&(c!==0||1/c===1/s)||c!==c&&s!==s}var r=typeof Object.is=="function"?Object.is:n,i=t.useSyncExternalStore,o=e.useRef,l=e.useEffect,a=e.useMemo,u=e.useDebugValue;return Yt.useSyncExternalStoreWithSelector=function(c,s,f,h,p){var y=o(null);if(y.current===null){var x={hasValue:!1,value:null};y.current=x}else x=y.current;y=a(function(){function k(w){if(!R){if(R=!0,_=w,w=h(w),p!==void 0&&x.hasValue){var j=x.value;if(p(j,w))return H=j}return H=w}if(j=H,r(_,w))return j;var G=h(w);return p!==void 0&&p(j,G)?(_=w,j):(_=w,H=G)}var R=!1,_,H,V=f===void 0?null:f;return[function(){return k(s())},V===null?void 0:function(){return k(V())}]},[s,f,h,p]);var T=i(c,y[0],y[1]);return l(function(){x.hasValue=!0,x.value=T},[T]),u(T),T},Yt}var Kt={},$n;function go(){if($n)return Kt;$n=1;var e={};/**
143
+ */var tr;function go(){if(tr)return Yt;tr=1;var e=N,t=er();function n(c,s){return c===s&&(c!==0||1/c===1/s)||c!==c&&s!==s}var r=typeof Object.is=="function"?Object.is:n,i=t.useSyncExternalStore,o=e.useRef,l=e.useEffect,a=e.useMemo,u=e.useDebugValue;return Yt.useSyncExternalStoreWithSelector=function(c,s,f,h,p){var y=o(null);if(y.current===null){var x={hasValue:!1,value:null};y.current=x}else x=y.current;y=a(function(){function w(k){if(!A){if(A=!0,_=k,k=h(k),p!==void 0&&x.hasValue){var R=x.value;if(p(R,k))return H=R}return H=k}if(R=H,r(_,k))return R;var Y=h(k);return p!==void 0&&p(R,Y)?(_=k,R):(_=k,H=Y)}var A=!1,_,H,F=f===void 0?null:f;return[function(){return w(s())},F===null?void 0:function(){return w(F())}]},[s,f,h,p]);var T=i(c,y[0],y[1]);return l(function(){x.hasValue=!0,x.value=T},[T]),u(T),T},Yt}var Gt={},nr;function yo(){if(nr)return Gt;nr=1;var e={};/**
144
144
  * @license React
145
145
  * use-sync-external-store-shim/with-selector.development.js
146
146
  *
@@ -148,24 +148,24 @@ React keys must be passed directly to JSX without using spread:
148
148
  *
149
149
  * This source code is licensed under the MIT license found in the
150
150
  * LICENSE file in the root directory of this source tree.
151
- */return e.NODE_ENV!=="production"&&function(){function t(s,f){return s===f&&(s!==0||1/s===1/f)||s!==s&&f!==f}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var n=N,r=Jn(),i=typeof Object.is=="function"?Object.is:t,o=r.useSyncExternalStore,l=n.useRef,a=n.useEffect,u=n.useMemo,c=n.useDebugValue;Kt.useSyncExternalStoreWithSelector=function(s,f,h,p,y){var x=l(null);if(x.current===null){var T={hasValue:!1,value:null};x.current=T}else T=x.current;x=u(function(){function R(j){if(!_){if(_=!0,H=j,j=p(j),y!==void 0&&T.hasValue){var G=T.value;if(y(G,j))return V=G}return V=j}if(G=V,i(H,j))return G;var W=p(j);return y!==void 0&&y(G,W)?(H=j,G):(H=j,V=W)}var _=!1,H,V,w=h===void 0?null:h;return[function(){return R(f())},w===null?void 0:function(){return R(w())}]},[f,h,p,y]);var k=o(s,x[0],x[1]);return a(function(){T.hasValue=!0,T.value=k},[k]),c(k),k},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}(),Kt}var yo={};yo.NODE_ENV==="production"?Wt.exports=mo():Wt.exports=go();var xo=Wt.exports;const bo=Ht(xo),er={},{useDebugValue:wo}=N,{useSyncExternalStoreWithSelector:ko}=bo;let tr=!1;const vo=e=>e;function So(e,t=vo,n){(er?"production":void 0)!=="production"&&n&&!tr&&(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"),tr=!0);const r=ko(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,n);return wo(r),r}const nr=e=>{(er?"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 t=typeof e=="function"?fo(e):e,n=(r,i)=>So(t,r,i);return Object.assign(n,t),n},Eo=e=>e?nr(e):nr;let gt=null,Xt=null,Co=0,_o=0;const To=async()=>{if(typeof window>"u")try{let e,t;try{e=await Promise.resolve().then(()=>Mi),t=await Promise.resolve().then(()=>Mi)}catch(r){console.warn("[Connection Pool] Failed to import Node.js modules:",r);return}gt=new e.Agent({keepAlive:!0,keepAliveMsecs:3e4,maxSockets:5});const n=gt.createConnection;gt.createConnection=function(r,i){Co++;const o=n.call(this,r,i);return o.on("reuse",()=>{_o++}),o},Xt=new t.Agent({keepAlive:!0,keepAliveMsecs:3e4,maxSockets:5})}catch(e){console.warn("[Connection Pool] Failed to initialize HTTP agents:",e)}};(async()=>{try{await To()}catch(e){console.warn("Failed to initialize connection pool:",e)}})();let Qt=null;const rr=e=>{if(!e||typeof e!="string")throw new Error("API URL must be a valid string");Qt=e},Io=()=>{if(!Qt)throw new Error("API URL not configured. Please call configureApi() with your server URL before using any API functions.");return Qt},Ao=(e,t={})=>{const n=e.startsWith("https:");if(typeof window>"u"){if(n&&Xt)return{...t,agent:Xt};if(gt)return{...t,agent:gt}}const r=Date.now().toString(36)+Math.random().toString(36).substring(2);return{...t,headers:{...t.headers,Connection:"keep-alive","X-Request-ID":r}}};async function*Ro(e,t,n=!0){var r;try{const i=Io(),o=await fetch(`${i}/chat`,Ao(i,{method:"POST",headers:{"Content-Type":"application/json",Accept:n?"text/event-stream":"application/json"},body:JSON.stringify({message:e,voiceEnabled:t,stream:n})}));if(!o.ok){const s=await o.text();throw console.error(`API request failed: ${o.status} ${s}`),new Error(`Network response was not ok: ${o.status} ${s}`)}if(!n){yield{text:(await o.json()).response,done:!0};return}const l=(r=o.body)==null?void 0:r.getReader();if(!l)throw new Error("No reader available");const a=new TextDecoder;let u="",c="";for(;;){const{done:s,value:f}=await l.read();if(s)break;const h=a.decode(f,{stream:!0});u+=h;const p=u.split(`
152
- `);u=p.pop()||"";for(const y of p)if(y.trim()&&y.startsWith("data: "))try{const x=JSON.parse(y.slice(6));if(x.text){const T=ir(x.text,c);T?(c+=T,yield{text:T,done:x.done||!1}):x.done&&(yield{text:"",done:!0})}else yield{text:x.text||"",done:x.done||!1}}catch{console.warn("Error parsing JSON chunk:",y)}}if(u&&u.startsWith("data: "))try{const s=JSON.parse(u.slice(6));if(s.text){const f=ir(s.text,c);(f||s.done)&&(yield{text:f||"",done:s.done||!1})}else yield{text:s.text||"",done:s.done||!1}}catch{console.warn("Error parsing final JSON buffer:",u)}}catch(i){console.error("Chat API error:",i.message),yield{text:`Error connecting to chat server: ${i.message}`,done:!0}}}function ir(e,t){if(!t)return e;if(t.endsWith(e))return"";if(e.length>t.length){if(e.startsWith(t))return e.slice(t.length);let n=0;const r=Math.min(t.length,e.length);for(;n<r&&t[n]===e[n];)n++;if(n>t.length/2)return e.slice(n)}return e}function or(){try{if(typeof window<"u"&&window.CHATBOT_API_URL)return rr(window.CHATBOT_API_URL),!0}catch(e){console.error("Failed to configure API:",e)}return!1}or();const Jt=Eo((e,t)=>({messages:[],isLoading:!1,error:null,voiceEnabled:!1,toggleVoice:()=>e(n=>({voiceEnabled:!n.voiceEnabled})),sendMessage:async n=>{try{if(!or())throw new Error("API URL not configured");e(i=>({messages:[...i.messages,{role:"user",content:n}],isLoading:!0,error:null})),e(i=>({messages:[...i.messages,{role:"assistant",content:""}]}));let r=!1;try{for await(const i of Ro(n,t().voiceEnabled))i.text&&(t().appendToLastMessage(i.text),r=!0);r||t().appendToLastMessage("No response received from the server. Please try again later.")}catch(i){console.error("Chat API error:",i),t().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:n=>{e(r=>{const i=[...r.messages],o=i[i.length-1];return o&&o.role==="assistant"&&(i[i.length-1]={...o,content:o.content+n}),{messages:i}})},clearMessages:()=>{e({messages:[]})}}));function yc(){}function xc(){}function Oo(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const Po=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Lo=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,jo={};function lr(e,t){return(jo.jsx?Lo:Po).test(e)}const No=/[ \t\n\f\r]/g;function Do(e){return typeof e=="object"?e.type==="text"?ar(e.value):!1:ar(e)}function ar(e){return e.replace(No,"")===""}class yt{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}yt.prototype.normal={},yt.prototype.property={},yt.prototype.space=void 0;function sr(e,t){const n={},r={};for(const i of e)Object.assign(n,i.property),Object.assign(r,i.normal);return new yt(n,r,t)}function Zt(e){return e.toLowerCase()}class _e{constructor(t,n){this.attribute=n,this.property=t}}_e.prototype.attribute="",_e.prototype.booleanish=!1,_e.prototype.boolean=!1,_e.prototype.commaOrSpaceSeparated=!1,_e.prototype.commaSeparated=!1,_e.prototype.defined=!1,_e.prototype.mustUseProperty=!1,_e.prototype.number=!1,_e.prototype.overloadedBoolean=!1,_e.prototype.property="",_e.prototype.spaceSeparated=!1,_e.prototype.space=void 0;let zo=0;const B=Je(),ce=Je(),ur=Je(),C=Je(),re=Je(),ot=Je(),Oe=Je();function Je(){return 2**++zo}const $t=Object.freeze(Object.defineProperty({__proto__:null,boolean:B,booleanish:ce,commaOrSpaceSeparated:Oe,commaSeparated:ot,number:C,overloadedBoolean:ur,spaceSeparated:re},Symbol.toStringTag,{value:"Module"})),en=Object.keys($t);class tn extends _e{constructor(t,n,r,i){let o=-1;if(super(t,n),cr(this,"space",i),typeof r=="number")for(;++o<en.length;){const l=en[o];cr(this,en[o],(r&$t[l])===$t[l])}}}tn.prototype.defined=!0;function cr(e,t,n){n&&(e[t]=n)}function lt(e){const t={},n={};for(const[r,i]of Object.entries(e.properties)){const o=new tn(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(o.mustUseProperty=!0),t[r]=o,n[Zt(r)]=r,n[Zt(o.attribute)]=r}return new yt(t,n,e.space)}const fr=lt({properties:{ariaActiveDescendant:null,ariaAtomic:ce,ariaAutoComplete:null,ariaBusy:ce,ariaChecked:ce,ariaColCount:C,ariaColIndex:C,ariaColSpan:C,ariaControls:re,ariaCurrent:null,ariaDescribedBy:re,ariaDetails:null,ariaDisabled:ce,ariaDropEffect:re,ariaErrorMessage:null,ariaExpanded:ce,ariaFlowTo:re,ariaGrabbed:ce,ariaHasPopup:null,ariaHidden:ce,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:re,ariaLevel:C,ariaLive:null,ariaModal:ce,ariaMultiLine:ce,ariaMultiSelectable:ce,ariaOrientation:null,ariaOwns:re,ariaPlaceholder:null,ariaPosInSet:C,ariaPressed:ce,ariaReadOnly:ce,ariaRelevant:null,ariaRequired:ce,ariaRoleDescription:re,ariaRowCount:C,ariaRowIndex:C,ariaRowSpan:C,ariaSelected:ce,ariaSetSize:C,ariaSort:null,ariaValueMax:C,ariaValueMin:C,ariaValueNow:C,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function pr(e,t){return t in e?e[t]:t}function hr(e,t){return pr(e,t.toLowerCase())}const Fo=lt({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:ot,acceptCharset:re,accessKey:re,action:null,allow:null,allowFullScreen:B,allowPaymentRequest:B,allowUserMedia:B,alt:null,as:null,async:B,autoCapitalize:null,autoComplete:re,autoFocus:B,autoPlay:B,blocking:re,capture:null,charSet:null,checked:B,cite:null,className:re,cols:C,colSpan:null,content:null,contentEditable:ce,controls:B,controlsList:re,coords:C|ot,crossOrigin:null,data:null,dateTime:null,decoding:null,default:B,defer:B,dir:null,dirName:null,disabled:B,download:ur,draggable:ce,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:B,formTarget:null,headers:re,height:C,hidden:B,high:C,href:null,hrefLang:null,htmlFor:re,httpEquiv:re,id:null,imageSizes:null,imageSrcSet:null,inert:B,inputMode:null,integrity:null,is:null,isMap:B,itemId:null,itemProp:re,itemRef:re,itemScope:B,itemType:re,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:B,low:C,manifest:null,max:null,maxLength:C,media:null,method:null,min:null,minLength:C,multiple:B,muted:B,name:null,nonce:null,noModule:B,noValidate:B,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:B,optimum:C,pattern:null,ping:re,placeholder:null,playsInline:B,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:B,referrerPolicy:null,rel:re,required:B,reversed:B,rows:C,rowSpan:C,sandbox:re,scope:null,scoped:B,seamless:B,selected:B,shadowRootClonable:B,shadowRootDelegatesFocus:B,shadowRootMode:null,shape:null,size:C,sizes:null,slot:null,span:C,spellCheck:ce,src:null,srcDoc:null,srcLang:null,srcSet:null,start:C,step:null,style:null,tabIndex:C,target:null,title:null,translate:null,type:null,typeMustMatch:B,useMap:null,value:ce,width:C,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:re,axis:null,background:null,bgColor:null,border:C,borderColor:null,bottomMargin:C,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:B,declare:B,event:null,face:null,frame:null,frameBorder:null,hSpace:C,leftMargin:C,link:null,longDesc:null,lowSrc:null,marginHeight:C,marginWidth:C,noResize:B,noHref:B,noShade:B,noWrap:B,object:null,profile:null,prompt:null,rev:null,rightMargin:C,rules:null,scheme:null,scrolling:ce,standby:null,summary:null,text:null,topMargin:C,valueType:null,version:null,vAlign:null,vLink:null,vSpace:C,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:B,disableRemotePlayback:B,prefix:null,property:null,results:C,security:null,unselectable:null},space:"html",transform:hr}),Mo=lt({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:Oe,accentHeight:C,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:C,amplitude:C,arabicForm:null,ascent:C,attributeName:null,attributeType:null,azimuth:C,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:C,by:null,calcMode:null,capHeight:C,className:re,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:C,diffuseConstant:C,direction:null,display:null,dur:null,divisor:C,dominantBaseline:null,download:B,dx:null,dy:null,edgeMode:null,editable:null,elevation:C,enableBackground:null,end:null,event:null,exponent:C,externalResourcesRequired:null,fill:null,fillOpacity:C,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:ot,g2:ot,glyphName:ot,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:C,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:C,horizOriginX:C,horizOriginY:C,id:null,ideographic:C,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:C,k:C,k1:C,k2:C,k3:C,k4:C,kernelMatrix:Oe,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:C,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:C,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:C,overlineThickness:C,paintOrder:null,panose1:null,path:null,pathLength:C,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:re,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:C,pointsAtY:C,pointsAtZ:C,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Oe,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Oe,rev:Oe,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Oe,requiredFeatures:Oe,requiredFonts:Oe,requiredFormats:Oe,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:C,specularExponent:C,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:C,strikethroughThickness:C,string:null,stroke:null,strokeDashArray:Oe,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:C,strokeOpacity:C,strokeWidth:null,style:null,surfaceScale:C,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Oe,tabIndex:C,tableValues:null,target:null,targetX:C,targetY:C,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Oe,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:C,underlineThickness:C,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:C,values:null,vAlphabetic:C,vMathematical:C,vectorEffect:null,vHanging:C,vIdeographic:C,version:null,vertAdvY:C,vertOriginX:C,vertOriginY:C,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:C,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:pr}),dr=lt({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),mr=lt({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:hr}),gr=lt({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),Bo={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"},Uo=/[A-Z]/g,yr=/-[a-z]/g,Ho=/^data[-\w.:]+$/i;function Vo(e,t){const n=Zt(t);let r=t,i=_e;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&Ho.test(t)){if(t.charAt(4)==="-"){const o=t.slice(5).replace(yr,Yo);r="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=t.slice(4);if(!yr.test(o)){let l=o.replace(Uo,Wo);l.charAt(0)!=="-"&&(l="-"+l),t="data"+l}}i=tn}return new i(r,t)}function Wo(e){return"-"+e.toLowerCase()}function Yo(e){return e.charAt(1).toUpperCase()}const qo=sr([fr,Fo,dr,mr,gr],"html"),nn=sr([fr,Mo,dr,mr,gr],"svg");function Go(e){return e.join(" ").trim()}var rn={},xr=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,Ko=/\n/g,Xo=/^\s*/,Qo=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,Jo=/^:\s*/,Zo=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,$o=/^[;\s]*/,el=/^\s+|\s+$/g,tl=`
153
- `,br="/",wr="*",Ze="",nl="comment",rl="declaration",il=function(e,t){if(typeof e!="string")throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var n=1,r=1;function i(y){var x=y.match(Ko);x&&(n+=x.length);var T=y.lastIndexOf(tl);r=~T?y.length-T:r+y.length}function o(){var y={line:n,column:r};return function(x){return x.position=new l(y),c(),x}}function l(y){this.start=y,this.end={line:n,column:r},this.source=t.source}l.prototype.content=e;function a(y){var x=new Error(t.source+":"+n+":"+r+": "+y);if(x.reason=y,x.filename=t.source,x.line=n,x.column=r,x.source=e,!t.silent)throw x}function u(y){var x=y.exec(e);if(x){var T=x[0];return i(T),e=e.slice(T.length),x}}function c(){u(Xo)}function s(y){var x;for(y=y||[];x=f();)x!==!1&&y.push(x);return y}function f(){var y=o();if(!(br!=e.charAt(0)||wr!=e.charAt(1))){for(var x=2;Ze!=e.charAt(x)&&(wr!=e.charAt(x)||br!=e.charAt(x+1));)++x;if(x+=2,Ze===e.charAt(x-1))return a("End of comment missing");var T=e.slice(2,x-2);return r+=2,i(T),e=e.slice(x),r+=2,y({type:nl,comment:T})}}function h(){var y=o(),x=u(Qo);if(x){if(f(),!u(Jo))return a("property missing ':'");var T=u(Zo),k=y({type:rl,property:kr(x[0].replace(xr,Ze)),value:T?kr(T[0].replace(xr,Ze)):Ze});return u($o),k}}function p(){var y=[];s(y);for(var x;x=h();)x!==!1&&(y.push(x),s(y));return y}return c(),p()};function kr(e){return e?e.replace(el,Ze):Ze}var ol=Tt&&Tt.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(rn,"__esModule",{value:!0}),rn.default=al;var ll=ol(il);function al(e,t){var n=null;if(!e||typeof e!="string")return n;var r=(0,ll.default)(e),i=typeof t=="function";return r.forEach(function(o){if(o.type==="declaration"){var l=o.property,a=o.value;i?t(l,a,o):a&&(n=n||{},n[l]=a)}}),n}var At={};Object.defineProperty(At,"__esModule",{value:!0}),At.camelCase=void 0;var sl=/^--[a-zA-Z0-9_-]+$/,ul=/-([a-z])/g,cl=/^[^-]+$/,fl=/^-(webkit|moz|ms|o|khtml)-/,pl=/^-(ms)-/,hl=function(e){return!e||cl.test(e)||sl.test(e)},dl=function(e,t){return t.toUpperCase()},vr=function(e,t){return"".concat(t,"-")},ml=function(e,t){return t===void 0&&(t={}),hl(e)?e:(e=e.toLowerCase(),t.reactCompat?e=e.replace(pl,vr):e=e.replace(fl,vr),e.replace(ul,dl))};At.camelCase=ml;var gl=Tt&&Tt.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},yl=gl(rn),xl=At;function on(e,t){var n={};return!e||typeof e!="string"||(0,yl.default)(e,function(r,i){r&&i&&(n[(0,xl.camelCase)(r,t)]=i)}),n}on.default=on;var bl=on;const wl=Ht(bl),Sr=Er("end"),ln=Er("start");function Er(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function kl(e){const t=ln(e),n=Sr(e);if(t&&n)return{start:t,end:n}}function xt(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Cr(e.position):"start"in e||"end"in e?Cr(e):"line"in e||"column"in e?an(e):""}function an(e){return _r(e&&e.line)+":"+_r(e&&e.column)}function Cr(e){return an(e&&e.start)+"-"+an(e&&e.end)}function _r(e){return e&&typeof e=="number"?e:1}class ge extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let i="",o={},l=!1;if(n&&("line"in n&&"column"in n?o={place:n}:"start"in n&&"end"in n?o={place:n}:"type"in n?o={ancestors:[n],place:n.position}:o={...n}),typeof t=="string"?i=t:!o.cause&&t&&(l=!0,i=t.message,o.cause=t),!o.ruleId&&!o.source&&typeof r=="string"){const u=r.indexOf(":");u===-1?o.ruleId=r:(o.source=r.slice(0,u),o.ruleId=r.slice(u+1))}if(!o.place&&o.ancestors&&o.ancestors){const u=o.ancestors[o.ancestors.length-1];u&&(o.place=u.position)}const a=o.place&&"start"in o.place?o.place.start:o.place;this.ancestors=o.ancestors||void 0,this.cause=o.cause||void 0,this.column=a?a.column:void 0,this.fatal=void 0,this.file,this.message=i,this.line=a?a.line:void 0,this.name=xt(o.place)||"1:1",this.place=o.place||void 0,this.reason=this.message,this.ruleId=o.ruleId||void 0,this.source=o.source||void 0,this.stack=l&&o.cause&&typeof o.cause.stack=="string"?o.cause.stack:"",this.actual,this.expected,this.note,this.url}}ge.prototype.file="",ge.prototype.name="",ge.prototype.reason="",ge.prototype.message="",ge.prototype.stack="",ge.prototype.column=void 0,ge.prototype.line=void 0,ge.prototype.ancestors=void 0,ge.prototype.cause=void 0,ge.prototype.fatal=void 0,ge.prototype.place=void 0,ge.prototype.ruleId=void 0,ge.prototype.source=void 0;const sn={}.hasOwnProperty,vl=new Map,Sl=/[A-Z]/g,El=new Set(["table","tbody","thead","tfoot","tr"]),Cl=new Set(["td","th"]),Tr="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function _l(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=jl(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=Ll(n,t.jsx,t.jsxs)}const i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?nn:qo,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},o=Ir(i,e,void 0);return o&&typeof o!="string"?o:i.create(e,i.Fragment,{children:o||void 0},void 0)}function Ir(e,t,n){if(t.type==="element")return Tl(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return Il(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return Rl(e,t,n);if(t.type==="mdxjsEsm")return Al(e,t);if(t.type==="root")return Ol(e,t,n);if(t.type==="text")return Pl(e,t)}function Tl(e,t,n){const r=e.schema;let i=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=nn,e.schema=i),e.ancestors.push(t);const o=Rr(e,t.tagName,!1),l=Nl(e,t);let a=cn(e,t);return El.has(t.tagName)&&(a=a.filter(function(u){return typeof u=="string"?!Do(u):!0})),Ar(e,l,o,t),un(l,a),e.ancestors.pop(),e.schema=r,e.create(t,o,l,n)}function Il(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}bt(e,t.position)}function Al(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);bt(e,t.position)}function Rl(e,t,n){const r=e.schema;let i=r;t.name==="svg"&&r.space==="html"&&(i=nn,e.schema=i),e.ancestors.push(t);const o=t.name===null?e.Fragment:Rr(e,t.name,!0),l=Dl(e,t),a=cn(e,t);return Ar(e,l,o,t),un(l,a),e.ancestors.pop(),e.schema=r,e.create(t,o,l,n)}function Ol(e,t,n){const r={};return un(r,cn(e,t)),e.create(t,e.Fragment,r,n)}function Pl(e,t){return t.value}function Ar(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function un(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function Ll(e,t,n){return r;function r(i,o,l,a){const c=Array.isArray(l.children)?n:t;return a?c(o,l,a):c(o,l)}}function jl(e,t){return n;function n(r,i,o,l){const a=Array.isArray(o.children),u=ln(r);return t(i,o,l,a,{columnNumber:u?u.column-1:void 0,fileName:e,lineNumber:u?u.line:void 0},void 0)}}function Nl(e,t){const n={};let r,i;for(i in t.properties)if(i!=="children"&&sn.call(t.properties,i)){const o=zl(e,i,t.properties[i]);if(o){const[l,a]=o;e.tableCellAlignToStyle&&l==="align"&&typeof a=="string"&&Cl.has(t.tagName)?r=a:n[l]=a}}if(r){const o=n.style||(n.style={});o[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function Dl(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const o=r.data.estree.body[0];o.type;const l=o.expression;l.type;const a=l.properties[0];a.type,Object.assign(n,e.evaluater.evaluateExpression(a.argument))}else bt(e,t.position);else{const i=r.name;let o;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,o=e.evaluater.evaluateExpression(a.expression)}else bt(e,t.position);else o=r.value===null?!0:r.value;n[i]=o}return n}function cn(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:vl;for(;++r<t.children.length;){const o=t.children[r];let l;if(e.passKeys){const u=o.type==="element"?o.tagName:o.type==="mdxJsxFlowElement"||o.type==="mdxJsxTextElement"?o.name:void 0;if(u){const c=i.get(u)||0;l=u+"-"+c,i.set(u,c+1)}}const a=Ir(e,o,l);a!==void 0&&n.push(a)}return n}function zl(e,t,n){const r=Vo(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?Oo(n):Go(n)),r.property==="style"){let i=typeof n=="object"?n:Fl(e,String(n));return e.stylePropertyNameCase==="css"&&(i=Ml(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&r.space?Bo[r.property]||r.property:r.attribute,n]}}function Fl(e,t){try{return wl(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,i=new ge("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=Tr+"#cannot-parse-style-attribute",i}}function Rr(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const i=t.split(".");let o=-1,l;for(;++o<i.length;){const a=lr(i[o])?{type:"Identifier",name:i[o]}:{type:"Literal",value:i[o]};l=l?{type:"MemberExpression",object:l,property:a,computed:!!(o&&a.type==="Literal"),optional:!1}:a}r=l}else r=lr(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const i=r.value;return sn.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);bt(e)}function bt(e,t){const n=new ge("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=Tr+"#cannot-handle-mdx-estrees-without-createevaluater",n}function Ml(e){const t={};let n;for(n in e)sn.call(e,n)&&(t[Bl(n)]=e[n]);return t}function Bl(e){let t=e.replace(Sl,Ul);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function Ul(e){return"-"+e.toLowerCase()}const fn={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"]},Hl={};function Vl(e,t){const n=Hl,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return Or(e,r,i)}function Or(e,t,n){if(Wl(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return Pr(e.children,t,n)}return Array.isArray(e)?Pr(e,t,n):""}function Pr(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=Or(e[i],t,n);return r.join("")}function Wl(e){return!!(e&&typeof e=="object")}const Lr=document.createElement("i");function pn(e){const t="&"+e+";";Lr.innerHTML=t;const n=Lr.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function Ue(e,t,n,r){const i=e.length;let o=0,l;if(t<0?t=-t>i?0:i+t:t=t>i?i:t,n=n>0?n:0,r.length<1e4)l=Array.from(r),l.unshift(t,n),e.splice(...l);else for(n&&e.splice(t,n);o<r.length;)l=r.slice(o,o+1e4),l.unshift(t,0),e.splice(...l),o+=1e4,t+=1e4}function Ne(e,t){return e.length>0?(Ue(e,e.length,0,t),e):t}const jr={}.hasOwnProperty;function Yl(e){const t={};let n=-1;for(;++n<e.length;)ql(t,e[n]);return t}function ql(e,t){let n;for(n in t){const i=(jr.call(e,n)?e[n]:void 0)||(e[n]={}),o=t[n];let l;if(o)for(l in o){jr.call(i,l)||(i[l]=[]);const a=o[l];Gl(i[l],Array.isArray(a)?a:a?[a]:[])}}}function Gl(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);Ue(e,0,0,r)}function Nr(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function at(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const He=Ge(/[A-Za-z]/),Pe=Ge(/[\dA-Za-z]/),Kl=Ge(/[#-'*+\--9=?A-Z^-~]/);function hn(e){return e!==null&&(e<32||e===127)}const dn=Ge(/\d/),Xl=Ge(/[\dA-Fa-f]/),Ql=Ge(/[!-/:-@[-`{-~]/);function D(e){return e!==null&&e<-2}function Te(e){return e!==null&&(e<0||e===32)}function J(e){return e===-2||e===-1||e===32}const Jl=Ge(new RegExp("\\p{P}|\\p{S}","u")),Zl=Ge(/\s/);function Ge(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function st(e){const t=[];let n=-1,r=0,i=0;for(;++n<e.length;){const o=e.charCodeAt(n);let l="";if(o===37&&Pe(e.charCodeAt(n+1))&&Pe(e.charCodeAt(n+2)))i=2;else if(o<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(o))||(l=String.fromCharCode(o));else if(o>55295&&o<57344){const a=e.charCodeAt(n+1);o<56320&&a>56319&&a<57344?(l=String.fromCharCode(o,a),i=1):l="�"}else l=String.fromCharCode(o);l&&(t.push(e.slice(r,n),encodeURIComponent(l)),r=n+i+1,l=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}function ie(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let o=0;return l;function l(u){return J(u)?(e.enter(n),a(u)):t(u)}function a(u){return J(u)&&o++<i?(e.consume(u),a):(e.exit(n),t(u))}}const $l={tokenize:ea};function ea(e){const t=e.attempt(this.parser.constructs.contentInitial,r,i);let n;return t;function r(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),ie(e,t,"linePrefix")}function i(a){return e.enter("paragraph"),o(a)}function o(a){const u=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=u),n=u,l(a)}function l(a){if(a===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(a);return}return D(a)?(e.consume(a),e.exit("chunkText"),o):(e.consume(a),l)}}const ta={tokenize:na},Dr={tokenize:ra};function na(e){const t=this,n=[];let r=0,i,o,l;return a;function a(_){if(r<n.length){const H=n[r];return t.containerState=H[1],e.attempt(H[0].continuation,u,c)(_)}return c(_)}function u(_){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&R();const H=t.events.length;let V=H,w;for(;V--;)if(t.events[V][0]==="exit"&&t.events[V][1].type==="chunkFlow"){w=t.events[V][1].end;break}k(r);let j=H;for(;j<t.events.length;)t.events[j][1].end={...w},j++;return Ue(t.events,V+1,0,t.events.slice(H)),t.events.length=j,c(_)}return a(_)}function c(_){if(r===n.length){if(!i)return h(_);if(i.currentConstruct&&i.currentConstruct.concrete)return y(_);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(Dr,s,f)(_)}function s(_){return i&&R(),k(r),h(_)}function f(_){return t.parser.lazy[t.now().line]=r!==n.length,l=t.now().offset,y(_)}function h(_){return t.containerState={},e.attempt(Dr,p,y)(_)}function p(_){return r++,n.push([t.currentConstruct,t.containerState]),h(_)}function y(_){if(_===null){i&&R(),k(0),e.consume(_);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:o}),x(_)}function x(_){if(_===null){T(e.exit("chunkFlow"),!0),k(0),e.consume(_);return}return D(_)?(e.consume(_),T(e.exit("chunkFlow")),r=0,t.interrupt=void 0,a):(e.consume(_),x)}function T(_,H){const V=t.sliceStream(_);if(H&&V.push(null),_.previous=o,o&&(o.next=_),o=_,i.defineSkip(_.start),i.write(V),t.parser.lazy[_.start.line]){let w=i.events.length;for(;w--;)if(i.events[w][1].start.offset<l&&(!i.events[w][1].end||i.events[w][1].end.offset>l))return;const j=t.events.length;let G=j,W,Z;for(;G--;)if(t.events[G][0]==="exit"&&t.events[G][1].type==="chunkFlow"){if(W){Z=t.events[G][1].end;break}W=!0}for(k(r),w=j;w<t.events.length;)t.events[w][1].end={...Z},w++;Ue(t.events,G+1,0,t.events.slice(j)),t.events.length=w}}function k(_){let H=n.length;for(;H-- >_;){const V=n[H];t.containerState=V[1],V[0].exit.call(t,e)}n.length=_}function R(){i.write([null]),o=void 0,i=void 0,t.containerState._closeFlow=void 0}}function ra(e,t,n){return ie(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function zr(e){if(e===null||Te(e)||Zl(e))return 1;if(Jl(e))return 2}function mn(e,t,n){const r=[];let i=-1;for(;++i<e.length;){const o=e[i].resolveAll;o&&!r.includes(o)&&(t=o(t,n),r.push(o))}return t}const gn={name:"attention",resolveAll:ia,tokenize:oa};function ia(e,t){let n=-1,r,i,o,l,a,u,c,s;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;u=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const f={...e[r][1].end},h={...e[n][1].start};Fr(f,-u),Fr(h,u),l={type:u>1?"strongSequence":"emphasisSequence",start:f,end:{...e[r][1].end}},a={type:u>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:h},o={type:u>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},i={type:u>1?"strong":"emphasis",start:{...l.start},end:{...a.end}},e[r][1].end={...l.start},e[n][1].start={...a.end},c=[],e[r][1].end.offset-e[r][1].start.offset&&(c=Ne(c,[["enter",e[r][1],t],["exit",e[r][1],t]])),c=Ne(c,[["enter",i,t],["enter",l,t],["exit",l,t],["enter",o,t]]),c=Ne(c,mn(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),c=Ne(c,[["exit",o,t],["enter",a,t],["exit",a,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(s=2,c=Ne(c,[["enter",e[n][1],t],["exit",e[n][1],t]])):s=0,Ue(e,r-1,n-r+3,c),n=r+c.length-s-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function oa(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=zr(r);let o;return l;function l(u){return o=u,e.enter("attentionSequence"),a(u)}function a(u){if(u===o)return e.consume(u),a;const c=e.exit("attentionSequence"),s=zr(u),f=!s||s===2&&i||n.includes(u),h=!i||i===2&&s||n.includes(r);return c._open=!!(o===42?f:f&&(i||!h)),c._close=!!(o===42?h:h&&(s||!f)),t(u)}}function Fr(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const la={name:"autolink",tokenize:aa};function aa(e,t,n){let r=0;return i;function i(p){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),o}function o(p){return He(p)?(e.consume(p),l):p===64?n(p):c(p)}function l(p){return p===43||p===45||p===46||Pe(p)?(r=1,a(p)):c(p)}function a(p){return p===58?(e.consume(p),r=0,u):(p===43||p===45||p===46||Pe(p))&&r++<32?(e.consume(p),a):(r=0,c(p))}function u(p){return p===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.exit("autolink"),t):p===null||p===32||p===60||hn(p)?n(p):(e.consume(p),u)}function c(p){return p===64?(e.consume(p),s):Kl(p)?(e.consume(p),c):n(p)}function s(p){return Pe(p)?f(p):n(p)}function f(p){return p===46?(e.consume(p),r=0,s):p===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.exit("autolink"),t):h(p)}function h(p){if((p===45||Pe(p))&&r++<63){const y=p===45?h:f;return e.consume(p),y}return n(p)}}const Rt={partial:!0,tokenize:sa};function sa(e,t,n){return r;function r(o){return J(o)?ie(e,i,"linePrefix")(o):i(o)}function i(o){return o===null||D(o)?t(o):n(o)}}const Mr={continuation:{tokenize:ca},exit:fa,name:"blockQuote",tokenize:ua};function ua(e,t,n){const r=this;return i;function i(l){if(l===62){const a=r.containerState;return a.open||(e.enter("blockQuote",{_container:!0}),a.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(l),e.exit("blockQuoteMarker"),o}return n(l)}function o(l){return J(l)?(e.enter("blockQuotePrefixWhitespace"),e.consume(l),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(l))}}function ca(e,t,n){const r=this;return i;function i(l){return J(l)?ie(e,o,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l):o(l)}function o(l){return e.attempt(Mr,t,n)(l)}}function fa(e){e.exit("blockQuote")}const Br={name:"characterEscape",tokenize:pa};function pa(e,t,n){return r;function r(o){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(o),e.exit("escapeMarker"),i}function i(o){return Ql(o)?(e.enter("characterEscapeValue"),e.consume(o),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(o)}}const Ur={name:"characterReference",tokenize:ha};function ha(e,t,n){const r=this;let i=0,o,l;return a;function a(f){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(f),e.exit("characterReferenceMarker"),u}function u(f){return f===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(f),e.exit("characterReferenceMarkerNumeric"),c):(e.enter("characterReferenceValue"),o=31,l=Pe,s(f))}function c(f){return f===88||f===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(f),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),o=6,l=Xl,s):(e.enter("characterReferenceValue"),o=7,l=dn,s(f))}function s(f){if(f===59&&i){const h=e.exit("characterReferenceValue");return l===Pe&&!pn(r.sliceSerialize(h))?n(f):(e.enter("characterReferenceMarker"),e.consume(f),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return l(f)&&i++<o?(e.consume(f),s):n(f)}}const Hr={partial:!0,tokenize:ma},Vr={concrete:!0,name:"codeFenced",tokenize:da};function da(e,t,n){const r=this,i={partial:!0,tokenize:V};let o=0,l=0,a;return u;function u(w){return c(w)}function c(w){const j=r.events[r.events.length-1];return o=j&&j[1].type==="linePrefix"?j[2].sliceSerialize(j[1],!0).length:0,a=w,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),s(w)}function s(w){return w===a?(l++,e.consume(w),s):l<3?n(w):(e.exit("codeFencedFenceSequence"),J(w)?ie(e,f,"whitespace")(w):f(w))}function f(w){return w===null||D(w)?(e.exit("codeFencedFence"),r.interrupt?t(w):e.check(Hr,x,H)(w)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),h(w))}function h(w){return w===null||D(w)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),f(w)):J(w)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),ie(e,p,"whitespace")(w)):w===96&&w===a?n(w):(e.consume(w),h)}function p(w){return w===null||D(w)?f(w):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),y(w))}function y(w){return w===null||D(w)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),f(w)):w===96&&w===a?n(w):(e.consume(w),y)}function x(w){return e.attempt(i,H,T)(w)}function T(w){return e.enter("lineEnding"),e.consume(w),e.exit("lineEnding"),k}function k(w){return o>0&&J(w)?ie(e,R,"linePrefix",o+1)(w):R(w)}function R(w){return w===null||D(w)?e.check(Hr,x,H)(w):(e.enter("codeFlowValue"),_(w))}function _(w){return w===null||D(w)?(e.exit("codeFlowValue"),R(w)):(e.consume(w),_)}function H(w){return e.exit("codeFenced"),t(w)}function V(w,j,G){let W=0;return Z;function Z(M){return w.enter("lineEnding"),w.consume(M),w.exit("lineEnding"),O}function O(M){return w.enter("codeFencedFence"),J(M)?ie(w,P,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(M):P(M)}function P(M){return M===a?(w.enter("codeFencedFenceSequence"),$(M)):G(M)}function $(M){return M===a?(W++,w.consume(M),$):W>=l?(w.exit("codeFencedFenceSequence"),J(M)?ie(w,K,"whitespace")(M):K(M)):G(M)}function K(M){return M===null||D(M)?(w.exit("codeFencedFence"),j(M)):G(M)}}}function ma(e,t,n){const r=this;return i;function i(l){return l===null?n(l):(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),o)}function o(l){return r.parser.lazy[r.now().line]?n(l):t(l)}}const yn={name:"codeIndented",tokenize:ya},ga={partial:!0,tokenize:xa};function ya(e,t,n){const r=this;return i;function i(c){return e.enter("codeIndented"),ie(e,o,"linePrefix",5)(c)}function o(c){const s=r.events[r.events.length-1];return s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?l(c):n(c)}function l(c){return c===null?u(c):D(c)?e.attempt(ga,l,u)(c):(e.enter("codeFlowValue"),a(c))}function a(c){return c===null||D(c)?(e.exit("codeFlowValue"),l(c)):(e.consume(c),a)}function u(c){return e.exit("codeIndented"),t(c)}}function xa(e,t,n){const r=this;return i;function i(l){return r.parser.lazy[r.now().line]?n(l):D(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),i):ie(e,o,"linePrefix",5)(l)}function o(l){const a=r.events[r.events.length-1];return a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?t(l):D(l)?i(l):n(l)}}const ba={name:"codeText",previous:ka,resolve:wa,tokenize:va};function wa(e){let t=e.length-4,n=3,r,i;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(i=r):(r===t||e[r][1].type==="lineEnding")&&(e[i][1].type="codeTextData",r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function ka(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function va(e,t,n){let r=0,i,o;return l;function l(f){return e.enter("codeText"),e.enter("codeTextSequence"),a(f)}function a(f){return f===96?(e.consume(f),r++,a):(e.exit("codeTextSequence"),u(f))}function u(f){return f===null?n(f):f===32?(e.enter("space"),e.consume(f),e.exit("space"),u):f===96?(o=e.enter("codeTextSequence"),i=0,s(f)):D(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),u):(e.enter("codeTextData"),c(f))}function c(f){return f===null||f===32||f===96||D(f)?(e.exit("codeTextData"),u(f)):(e.consume(f),c)}function s(f){return f===96?(e.consume(f),i++,s):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(f)):(o.type="codeTextData",c(f))}}class Sa{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const r=n??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const i=n||0;this.setCursor(Math.trunc(t));const o=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&wt(this.left,r),o.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),wt(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),wt(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const n=this.left.splice(t,Number.POSITIVE_INFINITY);wt(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);wt(this.left,n.reverse())}}}function wt(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function Wr(e){const t={};let n=-1,r,i,o,l,a,u,c;const s=new Sa(e);for(;++n<s.length;){for(;n in t;)n=t[n];if(r=s.get(n),n&&r[1].type==="chunkFlow"&&s.get(n-1)[1].type==="listItemPrefix"&&(u=r[1]._tokenizer.events,o=0,o<u.length&&u[o][1].type==="lineEndingBlank"&&(o+=2),o<u.length&&u[o][1].type==="content"))for(;++o<u.length&&u[o][1].type!=="content";)u[o][1].type==="chunkText"&&(u[o][1]._isInFirstContentOfListItem=!0,o++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,Ea(s,n)),n=t[n],c=!0);else if(r[1]._container){for(o=n,i=void 0;o--;)if(l=s.get(o),l[1].type==="lineEnding"||l[1].type==="lineEndingBlank")l[0]==="enter"&&(i&&(s.get(i)[1].type="lineEndingBlank"),l[1].type="lineEnding",i=o);else if(!(l[1].type==="linePrefix"||l[1].type==="listItemIndent"))break;i&&(r[1].end={...s.get(i)[1].start},a=s.slice(i,n),a.unshift(r),s.splice(i,n-i+1,a))}}return Ue(e,0,Number.POSITIVE_INFINITY,s.slice(0)),!c}function Ea(e,t){const n=e.get(t)[1],r=e.get(t)[2];let i=t-1;const o=[];let l=n._tokenizer;l||(l=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(l._contentTypeTextTrailing=!0));const a=l.events,u=[],c={};let s,f,h=-1,p=n,y=0,x=0;const T=[x];for(;p;){for(;e.get(++i)[1]!==p;);o.push(i),p._tokenizer||(s=r.sliceStream(p),p.next||s.push(null),f&&l.defineSkip(p.start),p._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=!0),l.write(s),p._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=void 0)),f=p,p=p.next}for(p=n;++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&&(x=h+1,T.push(x),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(l.events=[],p?(p._tokenizer=void 0,p.previous=void 0):T.pop(),h=T.length;h--;){const k=a.slice(T[h],T[h+1]),R=o.pop();u.push([R,R+k.length-1]),e.splice(R,2,k)}for(u.reverse(),h=-1;++h<u.length;)c[y+u[h][0]]=y+u[h][1],y+=u[h][1]-u[h][0]-1;return c}const Ca={resolve:Ta,tokenize:Ia},_a={partial:!0,tokenize:Aa};function Ta(e){return Wr(e),e}function Ia(e,t){let n;return r;function r(a){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),i(a)}function i(a){return a===null?o(a):D(a)?e.check(_a,l,o)(a):(e.consume(a),i)}function o(a){return e.exit("chunkContent"),e.exit("content"),t(a)}function l(a){return e.consume(a),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function Aa(e,t,n){const r=this;return i;function i(l){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),ie(e,o,"linePrefix")}function o(l){if(l===null||D(l))return n(l);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?t(l):e.interrupt(r.parser.constructs.flow,n,t)(l)}}function Yr(e,t,n,r,i,o,l,a,u){const c=u||Number.POSITIVE_INFINITY;let s=0;return f;function f(k){return k===60?(e.enter(r),e.enter(i),e.enter(o),e.consume(k),e.exit(o),h):k===null||k===32||k===41||hn(k)?n(k):(e.enter(r),e.enter(l),e.enter(a),e.enter("chunkString",{contentType:"string"}),x(k))}function h(k){return k===62?(e.enter(o),e.consume(k),e.exit(o),e.exit(i),e.exit(r),t):(e.enter(a),e.enter("chunkString",{contentType:"string"}),p(k))}function p(k){return k===62?(e.exit("chunkString"),e.exit(a),h(k)):k===null||k===60||D(k)?n(k):(e.consume(k),k===92?y:p)}function y(k){return k===60||k===62||k===92?(e.consume(k),p):p(k)}function x(k){return!s&&(k===null||k===41||Te(k))?(e.exit("chunkString"),e.exit(a),e.exit(l),e.exit(r),t(k)):s<c&&k===40?(e.consume(k),s++,x):k===41?(e.consume(k),s--,x):k===null||k===32||k===40||hn(k)?n(k):(e.consume(k),k===92?T:x)}function T(k){return k===40||k===41||k===92?(e.consume(k),x):x(k)}}function qr(e,t,n,r,i,o){const l=this;let a=0,u;return c;function c(p){return e.enter(r),e.enter(i),e.consume(p),e.exit(i),e.enter(o),s}function s(p){return a>999||p===null||p===91||p===93&&!u||p===94&&!a&&"_hiddenFootnoteSupport"in l.parser.constructs?n(p):p===93?(e.exit(o),e.enter(i),e.consume(p),e.exit(i),e.exit(r),t):D(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),s):(e.enter("chunkString",{contentType:"string"}),f(p))}function f(p){return p===null||p===91||p===93||D(p)||a++>999?(e.exit("chunkString"),s(p)):(e.consume(p),u||(u=!J(p)),p===92?h:f)}function h(p){return p===91||p===92||p===93?(e.consume(p),a++,f):f(p)}}function Gr(e,t,n,r,i,o){let l;return a;function a(h){return h===34||h===39||h===40?(e.enter(r),e.enter(i),e.consume(h),e.exit(i),l=h===40?41:h,u):n(h)}function u(h){return h===l?(e.enter(i),e.consume(h),e.exit(i),e.exit(r),t):(e.enter(o),c(h))}function c(h){return h===l?(e.exit(o),u(l)):h===null?n(h):D(h)?(e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),ie(e,c,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),s(h))}function s(h){return h===l||h===null||D(h)?(e.exit("chunkString"),c(h)):(e.consume(h),h===92?f:s)}function f(h){return h===l||h===92?(e.consume(h),s):s(h)}}function kt(e,t){let n;return r;function r(i){return D(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):J(i)?ie(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}const Ra={name:"definition",tokenize:Pa},Oa={partial:!0,tokenize:La};function Pa(e,t,n){const r=this;let i;return o;function o(p){return e.enter("definition"),l(p)}function l(p){return qr.call(r,e,a,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(p)}function a(p){return i=at(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),p===58?(e.enter("definitionMarker"),e.consume(p),e.exit("definitionMarker"),u):n(p)}function u(p){return Te(p)?kt(e,c)(p):c(p)}function c(p){return Yr(e,s,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(p)}function s(p){return e.attempt(Oa,f,f)(p)}function f(p){return J(p)?ie(e,h,"whitespace")(p):h(p)}function h(p){return p===null||D(p)?(e.exit("definition"),r.parser.defined.push(i),t(p)):n(p)}}function La(e,t,n){return r;function r(a){return Te(a)?kt(e,i)(a):n(a)}function i(a){return Gr(e,o,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(a)}function o(a){return J(a)?ie(e,l,"whitespace")(a):l(a)}function l(a){return a===null||D(a)?t(a):n(a)}}const ja={name:"hardBreakEscape",tokenize:Na};function Na(e,t,n){return r;function r(o){return e.enter("hardBreakEscape"),e.consume(o),i}function i(o){return D(o)?(e.exit("hardBreakEscape"),t(o)):n(o)}}const Da={name:"headingAtx",resolve:za,tokenize:Fa};function za(e,t){let n=e.length-2,r=3,i,o;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(i={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},o={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},Ue(e,r,n-r+1,[["enter",i,t],["enter",o,t],["exit",o,t],["exit",i,t]])),e}function Fa(e,t,n){let r=0;return i;function i(s){return e.enter("atxHeading"),o(s)}function o(s){return e.enter("atxHeadingSequence"),l(s)}function l(s){return s===35&&r++<6?(e.consume(s),l):s===null||Te(s)?(e.exit("atxHeadingSequence"),a(s)):n(s)}function a(s){return s===35?(e.enter("atxHeadingSequence"),u(s)):s===null||D(s)?(e.exit("atxHeading"),t(s)):J(s)?ie(e,a,"whitespace")(s):(e.enter("atxHeadingText"),c(s))}function u(s){return s===35?(e.consume(s),u):(e.exit("atxHeadingSequence"),a(s))}function c(s){return s===null||s===35||Te(s)?(e.exit("atxHeadingText"),a(s)):(e.consume(s),c)}}const Ma=["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"],Kr=["pre","script","style","textarea"],Ba={concrete:!0,name:"htmlFlow",resolveTo:Va,tokenize:Wa},Ua={partial:!0,tokenize:qa},Ha={partial:!0,tokenize:Ya};function Va(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function Wa(e,t,n){const r=this;let i,o,l,a,u;return c;function c(g){return s(g)}function s(g){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(g),f}function f(g){return g===33?(e.consume(g),h):g===47?(e.consume(g),o=!0,x):g===63?(e.consume(g),i=3,r.interrupt?t:d):He(g)?(e.consume(g),l=String.fromCharCode(g),T):n(g)}function h(g){return g===45?(e.consume(g),i=2,p):g===91?(e.consume(g),i=5,a=0,y):He(g)?(e.consume(g),i=4,r.interrupt?t:d):n(g)}function p(g){return g===45?(e.consume(g),r.interrupt?t:d):n(g)}function y(g){const me="CDATA[";return g===me.charCodeAt(a++)?(e.consume(g),a===me.length?r.interrupt?t:P:y):n(g)}function x(g){return He(g)?(e.consume(g),l=String.fromCharCode(g),T):n(g)}function T(g){if(g===null||g===47||g===62||Te(g)){const me=g===47,De=l.toLowerCase();return!me&&!o&&Kr.includes(De)?(i=1,r.interrupt?t(g):P(g)):Ma.includes(l.toLowerCase())?(i=6,me?(e.consume(g),k):r.interrupt?t(g):P(g)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(g):o?R(g):_(g))}return g===45||Pe(g)?(e.consume(g),l+=String.fromCharCode(g),T):n(g)}function k(g){return g===62?(e.consume(g),r.interrupt?t:P):n(g)}function R(g){return J(g)?(e.consume(g),R):Z(g)}function _(g){return g===47?(e.consume(g),Z):g===58||g===95||He(g)?(e.consume(g),H):J(g)?(e.consume(g),_):Z(g)}function H(g){return g===45||g===46||g===58||g===95||Pe(g)?(e.consume(g),H):V(g)}function V(g){return g===61?(e.consume(g),w):J(g)?(e.consume(g),V):_(g)}function w(g){return g===null||g===60||g===61||g===62||g===96?n(g):g===34||g===39?(e.consume(g),u=g,j):J(g)?(e.consume(g),w):G(g)}function j(g){return g===u?(e.consume(g),u=null,W):g===null||D(g)?n(g):(e.consume(g),j)}function G(g){return g===null||g===34||g===39||g===47||g===60||g===61||g===62||g===96||Te(g)?V(g):(e.consume(g),G)}function W(g){return g===47||g===62||J(g)?_(g):n(g)}function Z(g){return g===62?(e.consume(g),O):n(g)}function O(g){return g===null||D(g)?P(g):J(g)?(e.consume(g),O):n(g)}function P(g){return g===45&&i===2?(e.consume(g),oe):g===60&&i===1?(e.consume(g),te):g===62&&i===4?(e.consume(g),le):g===63&&i===3?(e.consume(g),d):g===93&&i===5?(e.consume(g),F):D(g)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(Ua,be,$)(g)):g===null||D(g)?(e.exit("htmlFlowData"),$(g)):(e.consume(g),P)}function $(g){return e.check(Ha,K,be)(g)}function K(g){return e.enter("lineEnding"),e.consume(g),e.exit("lineEnding"),M}function M(g){return g===null||D(g)?$(g):(e.enter("htmlFlowData"),P(g))}function oe(g){return g===45?(e.consume(g),d):P(g)}function te(g){return g===47?(e.consume(g),l="",de):P(g)}function de(g){if(g===62){const me=l.toLowerCase();return Kr.includes(me)?(e.consume(g),le):P(g)}return He(g)&&l.length<8?(e.consume(g),l+=String.fromCharCode(g),de):P(g)}function F(g){return g===93?(e.consume(g),d):P(g)}function d(g){return g===62?(e.consume(g),le):g===45&&i===2?(e.consume(g),d):P(g)}function le(g){return g===null||D(g)?(e.exit("htmlFlowData"),be(g)):(e.consume(g),le)}function be(g){return e.exit("htmlFlow"),t(g)}}function Ya(e,t,n){const r=this;return i;function i(l){return D(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),o):n(l)}function o(l){return r.parser.lazy[r.now().line]?n(l):t(l)}}function qa(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(Rt,t,n)}}const Ga={name:"htmlText",tokenize:Ka};function Ka(e,t,n){const r=this;let i,o,l;return a;function a(d){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(d),u}function u(d){return d===33?(e.consume(d),c):d===47?(e.consume(d),V):d===63?(e.consume(d),_):He(d)?(e.consume(d),G):n(d)}function c(d){return d===45?(e.consume(d),s):d===91?(e.consume(d),o=0,y):He(d)?(e.consume(d),R):n(d)}function s(d){return d===45?(e.consume(d),p):n(d)}function f(d){return d===null?n(d):d===45?(e.consume(d),h):D(d)?(l=f,te(d)):(e.consume(d),f)}function h(d){return d===45?(e.consume(d),p):f(d)}function p(d){return d===62?oe(d):d===45?h(d):f(d)}function y(d){const le="CDATA[";return d===le.charCodeAt(o++)?(e.consume(d),o===le.length?x:y):n(d)}function x(d){return d===null?n(d):d===93?(e.consume(d),T):D(d)?(l=x,te(d)):(e.consume(d),x)}function T(d){return d===93?(e.consume(d),k):x(d)}function k(d){return d===62?oe(d):d===93?(e.consume(d),k):x(d)}function R(d){return d===null||d===62?oe(d):D(d)?(l=R,te(d)):(e.consume(d),R)}function _(d){return d===null?n(d):d===63?(e.consume(d),H):D(d)?(l=_,te(d)):(e.consume(d),_)}function H(d){return d===62?oe(d):_(d)}function V(d){return He(d)?(e.consume(d),w):n(d)}function w(d){return d===45||Pe(d)?(e.consume(d),w):j(d)}function j(d){return D(d)?(l=j,te(d)):J(d)?(e.consume(d),j):oe(d)}function G(d){return d===45||Pe(d)?(e.consume(d),G):d===47||d===62||Te(d)?W(d):n(d)}function W(d){return d===47?(e.consume(d),oe):d===58||d===95||He(d)?(e.consume(d),Z):D(d)?(l=W,te(d)):J(d)?(e.consume(d),W):oe(d)}function Z(d){return d===45||d===46||d===58||d===95||Pe(d)?(e.consume(d),Z):O(d)}function O(d){return d===61?(e.consume(d),P):D(d)?(l=O,te(d)):J(d)?(e.consume(d),O):W(d)}function P(d){return d===null||d===60||d===61||d===62||d===96?n(d):d===34||d===39?(e.consume(d),i=d,$):D(d)?(l=P,te(d)):J(d)?(e.consume(d),P):(e.consume(d),K)}function $(d){return d===i?(e.consume(d),i=void 0,M):d===null?n(d):D(d)?(l=$,te(d)):(e.consume(d),$)}function K(d){return d===null||d===34||d===39||d===60||d===61||d===96?n(d):d===47||d===62||Te(d)?W(d):(e.consume(d),K)}function M(d){return d===47||d===62||Te(d)?W(d):n(d)}function oe(d){return d===62?(e.consume(d),e.exit("htmlTextData"),e.exit("htmlText"),t):n(d)}function te(d){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),de}function de(d){return J(d)?ie(e,F,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(d):F(d)}function F(d){return e.enter("htmlTextData"),l(d)}}const xn={name:"labelEnd",resolveAll:Za,resolveTo:$a,tokenize:es},Xa={tokenize:ts},Qa={tokenize:ns},Ja={tokenize:rs};function Za(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const i=r.type==="labelImage"?4:2;r.type="data",t+=i}}return e.length!==n.length&&Ue(e,0,e.length,n),e}function $a(e,t){let n=e.length,r=0,i,o,l,a;for(;n--;)if(i=e[n][1],o){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[n][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(l){if(e[n][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(o=n,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(l=n);const u={type:e[o][1].type==="labelLink"?"link":"image",start:{...e[o][1].start},end:{...e[e.length-1][1].end}},c={type:"label",start:{...e[o][1].start},end:{...e[l][1].end}},s={type:"labelText",start:{...e[o+r+2][1].end},end:{...e[l-2][1].start}};return a=[["enter",u,t],["enter",c,t]],a=Ne(a,e.slice(o+1,o+r+3)),a=Ne(a,[["enter",s,t]]),a=Ne(a,mn(t.parser.constructs.insideSpan.null,e.slice(o+r+4,l-3),t)),a=Ne(a,[["exit",s,t],e[l-2],e[l-1],["exit",c,t]]),a=Ne(a,e.slice(l+1)),a=Ne(a,[["exit",u,t]]),Ue(e,o,e.length,a),e}function es(e,t,n){const r=this;let i=r.events.length,o,l;for(;i--;)if((r.events[i][1].type==="labelImage"||r.events[i][1].type==="labelLink")&&!r.events[i][1]._balanced){o=r.events[i][1];break}return a;function a(h){return o?o._inactive?f(h):(l=r.parser.defined.includes(at(r.sliceSerialize({start:o.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(h),e.exit("labelMarker"),e.exit("labelEnd"),u):n(h)}function u(h){return h===40?e.attempt(Xa,s,l?s:f)(h):h===91?e.attempt(Qa,s,l?c:f)(h):l?s(h):f(h)}function c(h){return e.attempt(Ja,s,f)(h)}function s(h){return t(h)}function f(h){return o._balanced=!0,n(h)}}function ts(e,t,n){return r;function r(f){return e.enter("resource"),e.enter("resourceMarker"),e.consume(f),e.exit("resourceMarker"),i}function i(f){return Te(f)?kt(e,o)(f):o(f)}function o(f){return f===41?s(f):Yr(e,l,a,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(f)}function l(f){return Te(f)?kt(e,u)(f):s(f)}function a(f){return n(f)}function u(f){return f===34||f===39||f===40?Gr(e,c,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(f):s(f)}function c(f){return Te(f)?kt(e,s)(f):s(f)}function s(f){return f===41?(e.enter("resourceMarker"),e.consume(f),e.exit("resourceMarker"),e.exit("resource"),t):n(f)}}function ns(e,t,n){const r=this;return i;function i(a){return qr.call(r,e,o,l,"reference","referenceMarker","referenceString")(a)}function o(a){return r.parser.defined.includes(at(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(a):n(a)}function l(a){return n(a)}}function rs(e,t,n){return r;function r(o){return e.enter("reference"),e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),i}function i(o){return o===93?(e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),e.exit("reference"),t):n(o)}}const is={name:"labelStartImage",resolveAll:xn.resolveAll,tokenize:os};function os(e,t,n){const r=this;return i;function i(a){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(a),e.exit("labelImageMarker"),o}function o(a){return a===91?(e.enter("labelMarker"),e.consume(a),e.exit("labelMarker"),e.exit("labelImage"),l):n(a)}function l(a){return a===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(a):t(a)}}const ls={name:"labelStartLink",resolveAll:xn.resolveAll,tokenize:as};function as(e,t,n){const r=this;return i;function i(l){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(l),e.exit("labelMarker"),e.exit("labelLink"),o}function o(l){return l===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(l):t(l)}}const bn={name:"lineEnding",tokenize:ss};function ss(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),ie(e,t,"linePrefix")}}const Ot={name:"thematicBreak",tokenize:us};function us(e,t,n){let r=0,i;return o;function o(c){return e.enter("thematicBreak"),l(c)}function l(c){return i=c,a(c)}function a(c){return c===i?(e.enter("thematicBreakSequence"),u(c)):r>=3&&(c===null||D(c))?(e.exit("thematicBreak"),t(c)):n(c)}function u(c){return c===i?(e.consume(c),r++,u):(e.exit("thematicBreakSequence"),J(c)?ie(e,a,"whitespace")(c):a(c))}}const Ie={continuation:{tokenize:hs},exit:ms,name:"list",tokenize:ps},cs={partial:!0,tokenize:gs},fs={partial:!0,tokenize:ds};function ps(e,t,n){const r=this,i=r.events[r.events.length-1];let o=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,l=0;return a;function a(p){const y=r.containerState.type||(p===42||p===43||p===45?"listUnordered":"listOrdered");if(y==="listUnordered"?!r.containerState.marker||p===r.containerState.marker:dn(p)){if(r.containerState.type||(r.containerState.type=y,e.enter(y,{_container:!0})),y==="listUnordered")return e.enter("listItemPrefix"),p===42||p===45?e.check(Ot,n,c)(p):c(p);if(!r.interrupt||p===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),u(p)}return n(p)}function u(p){return dn(p)&&++l<10?(e.consume(p),u):(!r.interrupt||l<2)&&(r.containerState.marker?p===r.containerState.marker:p===41||p===46)?(e.exit("listItemValue"),c(p)):n(p)}function c(p){return e.enter("listItemMarker"),e.consume(p),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||p,e.check(Rt,r.interrupt?n:s,e.attempt(cs,h,f))}function s(p){return r.containerState.initialBlankLine=!0,o++,h(p)}function f(p){return J(p)?(e.enter("listItemPrefixWhitespace"),e.consume(p),e.exit("listItemPrefixWhitespace"),h):n(p)}function h(p){return r.containerState.size=o+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(p)}}function hs(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(Rt,i,o);function i(a){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,ie(e,t,"listItemIndent",r.containerState.size+1)(a)}function o(a){return r.containerState.furtherBlankLines||!J(a)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,l(a)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(fs,t,l)(a))}function l(a){return r.containerState._closeFlow=!0,r.interrupt=void 0,ie(e,e.attempt(Ie,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a)}}function ds(e,t,n){const r=this;return ie(e,i,"listItemIndent",r.containerState.size+1);function i(o){const l=r.events[r.events.length-1];return l&&l[1].type==="listItemIndent"&&l[2].sliceSerialize(l[1],!0).length===r.containerState.size?t(o):n(o)}}function ms(e){e.exit(this.containerState.type)}function gs(e,t,n){const r=this;return ie(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(o){const l=r.events[r.events.length-1];return!J(o)&&l&&l[1].type==="listItemPrefixWhitespace"?t(o):n(o)}}const Xr={name:"setextUnderline",resolveTo:ys,tokenize:xs};function ys(e,t){let n=e.length,r,i,o;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(i=n)}else e[n][1].type==="content"&&e.splice(n,1),!o&&e[n][1].type==="definition"&&(o=n);const l={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type="setextHeadingText",o?(e.splice(i,0,["enter",l,t]),e.splice(o+1,0,["exit",e[r][1],t]),e[r][1].end={...e[o][1].end}):e[r][1]=l,e.push(["exit",l,t]),e}function xs(e,t,n){const r=this;let i;return o;function o(c){let s=r.events.length,f;for(;s--;)if(r.events[s][1].type!=="lineEnding"&&r.events[s][1].type!=="linePrefix"&&r.events[s][1].type!=="content"){f=r.events[s][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||f)?(e.enter("setextHeadingLine"),i=c,l(c)):n(c)}function l(c){return e.enter("setextHeadingLineSequence"),a(c)}function a(c){return c===i?(e.consume(c),a):(e.exit("setextHeadingLineSequence"),J(c)?ie(e,u,"lineSuffix")(c):u(c))}function u(c){return c===null||D(c)?(e.exit("setextHeadingLine"),t(c)):n(c)}}const bs={tokenize:ws};function ws(e){const t=this,n=e.attempt(Rt,r,e.attempt(this.parser.constructs.flowInitial,i,ie(e,e.attempt(this.parser.constructs.flow,i,e.attempt(Ca,i)),"linePrefix")));return n;function r(o){if(o===null){e.consume(o);return}return e.enter("lineEndingBlank"),e.consume(o),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function i(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const ks={resolveAll:Jr()},vs=Qr("string"),Ss=Qr("text");function Qr(e){return{resolveAll:Jr(e==="text"?Es:void 0),tokenize:t};function t(n){const r=this,i=this.parser.constructs[e],o=n.attempt(i,l,a);return l;function l(s){return c(s)?o(s):a(s)}function a(s){if(s===null){n.consume(s);return}return n.enter("data"),n.consume(s),u}function u(s){return c(s)?(n.exit("data"),o(s)):(n.consume(s),u)}function c(s){if(s===null)return!0;const f=i[s];let h=-1;if(f)for(;++h<f.length;){const p=f[h];if(!p.previous||p.previous.call(r,r.previous))return!0}return!1}}}function Jr(e){return t;function t(n,r){let i=-1,o;for(;++i<=n.length;)o===void 0?n[i]&&n[i][1].type==="data"&&(o=i,i++):(!n[i]||n[i][1].type!=="data")&&(i!==o+2&&(n[o][1].end=n[i-1][1].end,n.splice(o+2,i-o-2),i=o+2),o=void 0);return e?e(n,r):n}}function Es(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],i=t.sliceStream(r);let o=i.length,l=-1,a=0,u;for(;o--;){const c=i[o];if(typeof c=="string"){for(l=c.length;c.charCodeAt(l-1)===32;)a++,l--;if(l)break;l=-1}else if(c===-2)u=!0,a++;else if(c!==-1){o++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(a=0),a){const c={type:n===e.length||u||a<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:o?l:r.start._bufferIndex+l,_index:r.start._index+o,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(n,0,["enter",c,t],["exit",c,t]),n+=2)}n++}return e}const Cs=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:{null:[42,95]},contentInitial:{91:Ra},disable:{null:[]},document:{42:Ie,43:Ie,45:Ie,48:Ie,49:Ie,50:Ie,51:Ie,52:Ie,53:Ie,54:Ie,55:Ie,56:Ie,57:Ie,62:Mr},flow:{35:Da,42:Ot,45:[Xr,Ot],60:Ba,61:Xr,95:Ot,96:Vr,126:Vr},flowInitial:{[-2]:yn,[-1]:yn,32:yn},insideSpan:{null:[gn,ks]},string:{38:Ur,92:Br},text:{[-5]:bn,[-4]:bn,[-3]:bn,33:is,38:Ur,42:gn,60:[la,Ga],91:ls,92:[ja,Br],93:xn,95:gn,96:ba}},Symbol.toStringTag,{value:"Module"}));function _s(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const i={},o=[];let l=[],a=[];const u={attempt:j(V),check:j(w),consume:R,enter:_,exit:H,interrupt:j(w,{interrupt:!0})},c={code:null,containerState:{},defineSkip:x,events:[],now:y,parser:e,previous:null,sliceSerialize:h,sliceStream:p,write:f};let s=t.tokenize.call(c,u);return t.resolveAll&&o.push(t),c;function f(O){return l=Ne(l,O),T(),l[l.length-1]!==null?[]:(G(t,0),c.events=mn(o,c.events,c),c.events)}function h(O,P){return Is(p(O),P)}function p(O){return Ts(l,O)}function y(){const{_bufferIndex:O,_index:P,line:$,column:K,offset:M}=r;return{_bufferIndex:O,_index:P,line:$,column:K,offset:M}}function x(O){i[O.line]=O.column,Z()}function T(){let O;for(;r._index<l.length;){const P=l[r._index];if(typeof P=="string")for(O=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===O&&r._bufferIndex<P.length;)k(P.charCodeAt(r._bufferIndex));else k(P)}}function k(O){s=s(O)}function R(O){D(O)?(r.line++,r.column=1,r.offset+=O===-3?2:1,Z()):O!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===l[r._index].length&&(r._bufferIndex=-1,r._index++)),c.previous=O}function _(O,P){const $=P||{};return $.type=O,$.start=y(),c.events.push(["enter",$,c]),a.push($),$}function H(O){const P=a.pop();return P.end=y(),c.events.push(["exit",P,c]),P}function V(O,P){G(O,P.from)}function w(O,P){P.restore()}function j(O,P){return $;function $(K,M,oe){let te,de,F,d;return Array.isArray(K)?be(K):"tokenize"in K?be([K]):le(K);function le(ae){return Fe;function Fe(we){const Le=we!==null&&ae[we],pe=we!==null&&ae.null,je=[...Array.isArray(Le)?Le:Le?[Le]:[],...Array.isArray(pe)?pe:pe?[pe]:[]];return be(je)(we)}}function be(ae){return te=ae,de=0,ae.length===0?oe:g(ae[de])}function g(ae){return Fe;function Fe(we){return d=W(),F=ae,ae.partial||(c.currentConstruct=ae),ae.name&&c.parser.constructs.disable.null.includes(ae.name)?De():ae.tokenize.call(P?Object.assign(Object.create(c),P):c,u,me,De)(we)}}function me(ae){return O(F,d),M}function De(ae){return d.restore(),++de<te.length?g(te[de]):oe}}}function G(O,P){O.resolveAll&&!o.includes(O)&&o.push(O),O.resolve&&Ue(c.events,P,c.events.length-P,O.resolve(c.events.slice(P),c)),O.resolveTo&&(c.events=O.resolveTo(c.events,c))}function W(){const O=y(),P=c.previous,$=c.currentConstruct,K=c.events.length,M=Array.from(a);return{from:K,restore:oe};function oe(){r=O,c.previous=P,c.currentConstruct=$,c.events.length=K,a=M,Z()}}function Z(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function Ts(e,t){const n=t.start._index,r=t.start._bufferIndex,i=t.end._index,o=t.end._bufferIndex;let l;if(n===i)l=[e[n].slice(r,o)];else{if(l=e.slice(n,i),r>-1){const a=l[0];typeof a=="string"?l[0]=a.slice(r):l.shift()}o>0&&l.push(e[i].slice(0,o))}return l}function Is(e,t){let n=-1;const r=[];let i;for(;++n<e.length;){const o=e[n];let l;if(typeof o=="string")l=o;else switch(o){case-5:{l="\r";break}case-4:{l=`
151
+ */return e.NODE_ENV!=="production"&&function(){function t(s,f){return s===f&&(s!==0||1/s===1/f)||s!==s&&f!==f}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var n=N,r=er(),i=typeof Object.is=="function"?Object.is:t,o=r.useSyncExternalStore,l=n.useRef,a=n.useEffect,u=n.useMemo,c=n.useDebugValue;Gt.useSyncExternalStoreWithSelector=function(s,f,h,p,y){var x=l(null);if(x.current===null){var T={hasValue:!1,value:null};x.current=T}else T=x.current;x=u(function(){function A(R){if(!_){if(_=!0,H=R,R=p(R),y!==void 0&&T.hasValue){var Y=T.value;if(y(Y,R))return F=Y}return F=R}if(Y=F,i(H,R))return Y;var V=p(R);return y!==void 0&&y(Y,V)?(H=R,Y):(H=R,F=V)}var _=!1,H,F,k=h===void 0?null:h;return[function(){return A(f())},k===null?void 0:function(){return A(k())}]},[f,h,p,y]);var w=o(s,x[0],x[1]);return a(function(){T.hasValue=!0,T.value=w},[w]),c(w),w},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}(),Gt}var xo={};xo.NODE_ENV==="production"?Wt.exports=go():Wt.exports=yo();var bo=Wt.exports;const wo=Ut(bo),rr={},{useDebugValue:ko}=N,{useSyncExternalStoreWithSelector:vo}=wo;let ir=!1;const So=e=>e;function Eo(e,t=So,n){(rr?"production":void 0)!=="production"&&n&&!ir&&(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"),ir=!0);const r=vo(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,n);return ko(r),r}const or=e=>{(rr?"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 t=typeof e=="function"?po(e):e,n=(r,i)=>Eo(t,r,i);return Object.assign(n,t),n},Co=e=>e?or(e):or;let Xt=null,Qt=null;const Jt=(e,t)=>{if(!e||typeof e!="string")throw new Error("API URL must be a valid string");if(!t||typeof t!="string")throw new Error("API key must be a valid string");Xt=e,Qt=t},_o=()=>{if(!Xt)throw new Error("API URL not configured. Please call configureApi() with your server URL before using any API functions.");return Xt},To=()=>{if(!Qt)throw new Error("API key not configured. Please call configureApi() with your API key before using any API functions.");return Qt},Io=(e,t={})=>{e.startsWith("https:");const n=Date.now().toString(36)+Math.random().toString(36).substring(2);return{...t,headers:{...t.headers,Connection:"keep-alive","X-Request-ID":n,"X-API-Key":To()}}},Ao=(e,t=!0)=>({jsonrpc:"2.0",method:"tools/call",params:{name:"chat",arguments:{messages:[{role:"user",content:e}],stream:t}},id:Date.now().toString(36)+Math.random().toString(36).substring(2)});async function*Oo(e,t=!0){var n,r,i,o,l,a,u,c,s;try{const f=_o(),h=await fetch(`${f}/v1/chat`,Io(f,{method:"POST",headers:{"Content-Type":"application/json",Accept:t?"text/event-stream":"application/json"},body:JSON.stringify(Ao(e,t))}));if(!h.ok){const w=await h.text();throw console.error(`API request failed: ${h.status} ${w}`),new Error(`Network response was not ok: ${h.status} ${w}`)}if(!t){const w=await h.json();if(w.error)throw new Error(`MCP Error: ${w.error.message}`);(o=(i=(r=(n=w.result)==null?void 0:n.output)==null?void 0:r.messages)==null?void 0:i[0])!=null&&o.content&&(yield{text:w.result.output.messages[0].content,done:!0});return}const p=(l=h.body)==null?void 0:l.getReader();if(!p)throw new Error("No reader available");const y=new TextDecoder;let x="",T="";for(;;){const{done:w,value:A}=await p.read();if(w)break;const _=y.decode(A,{stream:!0});x+=_;const H=x.split(`
152
+ `);x=H.pop()||"";for(const F of H)if(F.trim()&&F.startsWith("data: "))try{const k=F.slice(6).trim();if(k==="[DONE]"){yield{text:"",done:!0};break}const R=JSON.parse(k);if(R.result){let Y="";if(R.result.type==="start")continue;if(R.result.type==="chunk"&&R.result.chunk?Y=R.result.chunk.content:R.result.type==="complete"&&(u=(a=R.result.output)==null?void 0:a.messages)!=null&&u[0]&&(Y=R.result.output.messages[0].content),Y){const V=lr(Y,T);V?(T+=V,yield{text:V,done:R.result.type==="complete"}):R.result.type==="complete"&&(yield{text:"",done:!0})}}}catch(k){console.warn("Error parsing JSON chunk:",F,"Error:",k)}}if(x&&x.startsWith("data: "))try{const w=x.slice(6).trim();if(w!=="[DONE]"){const A=JSON.parse(w);if((s=(c=A.result)==null?void 0:c.chunk)!=null&&s.content){const _=lr(A.result.chunk.content,T);_&&(yield{text:_,done:A.result.type==="complete"})}}}catch(w){console.warn("Error parsing final JSON buffer:",x,"Error:",w)}}catch(f){console.error("Chat API error:",f.message),yield{text:`Error connecting to chat server: ${f.message}`,done:!0}}}function lr(e,t){if(!t)return e;if(t.endsWith(e))return"";if(e.length>t.length){if(e.startsWith(t))return e.slice(t.length);let n=0;const r=Math.min(t.length,e.length);for(;n<r&&t[n]===e[n];)n++;if(n>t.length/2)return e.slice(n)}return e}function ar(){try{if(typeof window<"u"&&window.CHATBOT_API_URL&&window.CHATBOT_API_KEY)return Jt(window.CHATBOT_API_URL,window.CHATBOT_API_KEY),!0}catch(e){console.error("Failed to configure API:",e)}return!1}ar();const Zt=Co((e,t)=>({messages:[],isLoading:!1,error:null,voiceEnabled:!1,toggleVoice:()=>e(n=>({voiceEnabled:!n.voiceEnabled})),sendMessage:async n=>{try{if(!ar())throw new Error("API URL not configured");e(i=>({messages:[...i.messages,{role:"user",content:n}],isLoading:!0,error:null})),e(i=>({messages:[...i.messages,{role:"assistant",content:""}]}));let r=!1;try{for await(const i of Oo(n,t().voiceEnabled))i.text&&(t().appendToLastMessage(i.text),r=!0);r||t().appendToLastMessage("No response received from the server. Please try again later.")}catch(i){console.error("Chat API error:",i),t().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:n=>{e(r=>{const i=[...r.messages],o=i[i.length-1];return o&&o.role==="assistant"&&(i[i.length-1]={...o,content:o.content+n}),{messages:i}})},clearMessages:()=>{e({messages:[]})}}));function yc(){}function xc(){}function Ro(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const Po=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Lo=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,jo={};function sr(e,t){return(jo.jsx?Lo:Po).test(e)}const No=/[ \t\n\f\r]/g;function Do(e){return typeof e=="object"?e.type==="text"?ur(e.value):!1:ur(e)}function ur(e){return e.replace(No,"")===""}class xt{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}xt.prototype.normal={},xt.prototype.property={},xt.prototype.space=void 0;function cr(e,t){const n={},r={};for(const i of e)Object.assign(n,i.property),Object.assign(r,i.normal);return new xt(n,r,t)}function $t(e){return e.toLowerCase()}class _e{constructor(t,n){this.attribute=n,this.property=t}}_e.prototype.attribute="",_e.prototype.booleanish=!1,_e.prototype.boolean=!1,_e.prototype.commaOrSpaceSeparated=!1,_e.prototype.commaSeparated=!1,_e.prototype.defined=!1,_e.prototype.mustUseProperty=!1,_e.prototype.number=!1,_e.prototype.overloadedBoolean=!1,_e.prototype.property="",_e.prototype.spaceSeparated=!1,_e.prototype.space=void 0;let Mo=0;const U=Je(),ce=Je(),en=Je(),C=Je(),re=Je(),ot=Je(),Re=Je();function Je(){return 2**++Mo}const tn=Object.freeze(Object.defineProperty({__proto__:null,boolean:U,booleanish:ce,commaOrSpaceSeparated:Re,commaSeparated:ot,number:C,overloadedBoolean:en,spaceSeparated:re},Symbol.toStringTag,{value:"Module"})),nn=Object.keys(tn);class rn extends _e{constructor(t,n,r,i){let o=-1;if(super(t,n),fr(this,"space",i),typeof r=="number")for(;++o<nn.length;){const l=nn[o];fr(this,nn[o],(r&tn[l])===tn[l])}}}rn.prototype.defined=!0;function fr(e,t,n){n&&(e[t]=n)}function lt(e){const t={},n={};for(const[r,i]of Object.entries(e.properties)){const o=new rn(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(o.mustUseProperty=!0),t[r]=o,n[$t(r)]=r,n[$t(o.attribute)]=r}return new xt(t,n,e.space)}const pr=lt({properties:{ariaActiveDescendant:null,ariaAtomic:ce,ariaAutoComplete:null,ariaBusy:ce,ariaChecked:ce,ariaColCount:C,ariaColIndex:C,ariaColSpan:C,ariaControls:re,ariaCurrent:null,ariaDescribedBy:re,ariaDetails:null,ariaDisabled:ce,ariaDropEffect:re,ariaErrorMessage:null,ariaExpanded:ce,ariaFlowTo:re,ariaGrabbed:ce,ariaHasPopup:null,ariaHidden:ce,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:re,ariaLevel:C,ariaLive:null,ariaModal:ce,ariaMultiLine:ce,ariaMultiSelectable:ce,ariaOrientation:null,ariaOwns:re,ariaPlaceholder:null,ariaPosInSet:C,ariaPressed:ce,ariaReadOnly:ce,ariaRelevant:null,ariaRequired:ce,ariaRoleDescription:re,ariaRowCount:C,ariaRowIndex:C,ariaRowSpan:C,ariaSelected:ce,ariaSetSize:C,ariaSort:null,ariaValueMax:C,ariaValueMin:C,ariaValueNow:C,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function hr(e,t){return t in e?e[t]:t}function dr(e,t){return hr(e,t.toLowerCase())}const zo=lt({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:ot,acceptCharset:re,accessKey:re,action:null,allow:null,allowFullScreen:U,allowPaymentRequest:U,allowUserMedia:U,alt:null,as:null,async:U,autoCapitalize:null,autoComplete:re,autoFocus:U,autoPlay:U,blocking:re,capture:null,charSet:null,checked:U,cite:null,className:re,cols:C,colSpan:null,content:null,contentEditable:ce,controls:U,controlsList:re,coords:C|ot,crossOrigin:null,data:null,dateTime:null,decoding:null,default:U,defer:U,dir:null,dirName:null,disabled:U,download:en,draggable:ce,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:U,formTarget:null,headers:re,height:C,hidden:en,high:C,href:null,hrefLang:null,htmlFor:re,httpEquiv:re,id:null,imageSizes:null,imageSrcSet:null,inert:U,inputMode:null,integrity:null,is:null,isMap:U,itemId:null,itemProp:re,itemRef:re,itemScope:U,itemType:re,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:U,low:C,manifest:null,max:null,maxLength:C,media:null,method:null,min:null,minLength:C,multiple:U,muted:U,name:null,nonce:null,noModule:U,noValidate:U,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:U,optimum:C,pattern:null,ping:re,placeholder:null,playsInline:U,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:U,referrerPolicy:null,rel:re,required:U,reversed:U,rows:C,rowSpan:C,sandbox:re,scope:null,scoped:U,seamless:U,selected:U,shadowRootClonable:U,shadowRootDelegatesFocus:U,shadowRootMode:null,shape:null,size:C,sizes:null,slot:null,span:C,spellCheck:ce,src:null,srcDoc:null,srcLang:null,srcSet:null,start:C,step:null,style:null,tabIndex:C,target:null,title:null,translate:null,type:null,typeMustMatch:U,useMap:null,value:ce,width:C,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:re,axis:null,background:null,bgColor:null,border:C,borderColor:null,bottomMargin:C,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:U,declare:U,event:null,face:null,frame:null,frameBorder:null,hSpace:C,leftMargin:C,link:null,longDesc:null,lowSrc:null,marginHeight:C,marginWidth:C,noResize:U,noHref:U,noShade:U,noWrap:U,object:null,profile:null,prompt:null,rev:null,rightMargin:C,rules:null,scheme:null,scrolling:ce,standby:null,summary:null,text:null,topMargin:C,valueType:null,version:null,vAlign:null,vLink:null,vSpace:C,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:U,disableRemotePlayback:U,prefix:null,property:null,results:C,security:null,unselectable:null},space:"html",transform:dr}),Fo=lt({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:Re,accentHeight:C,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:C,amplitude:C,arabicForm:null,ascent:C,attributeName:null,attributeType:null,azimuth:C,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:C,by:null,calcMode:null,capHeight:C,className:re,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:C,diffuseConstant:C,direction:null,display:null,dur:null,divisor:C,dominantBaseline:null,download:U,dx:null,dy:null,edgeMode:null,editable:null,elevation:C,enableBackground:null,end:null,event:null,exponent:C,externalResourcesRequired:null,fill:null,fillOpacity:C,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:ot,g2:ot,glyphName:ot,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:C,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:C,horizOriginX:C,horizOriginY:C,id:null,ideographic:C,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:C,k:C,k1:C,k2:C,k3:C,k4:C,kernelMatrix:Re,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:C,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:C,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:C,overlineThickness:C,paintOrder:null,panose1:null,path:null,pathLength:C,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:re,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:C,pointsAtY:C,pointsAtZ:C,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Re,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Re,rev:Re,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Re,requiredFeatures:Re,requiredFonts:Re,requiredFormats:Re,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:C,specularExponent:C,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:C,strikethroughThickness:C,string:null,stroke:null,strokeDashArray:Re,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:C,strokeOpacity:C,strokeWidth:null,style:null,surfaceScale:C,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Re,tabIndex:C,tableValues:null,target:null,targetX:C,targetY:C,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Re,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:C,underlineThickness:C,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:C,values:null,vAlphabetic:C,vMathematical:C,vectorEffect:null,vHanging:C,vIdeographic:C,version:null,vertAdvY:C,vertOriginX:C,vertOriginY:C,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:C,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:hr}),mr=lt({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),gr=lt({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:dr}),yr=lt({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),Bo={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"},Ho=/[A-Z]/g,xr=/-[a-z]/g,Uo=/^data[-\w.:]+$/i;function Vo(e,t){const n=$t(t);let r=t,i=_e;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&Uo.test(t)){if(t.charAt(4)==="-"){const o=t.slice(5).replace(xr,Yo);r="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=t.slice(4);if(!xr.test(o)){let l=o.replace(Ho,Wo);l.charAt(0)!=="-"&&(l="-"+l),t="data"+l}}i=rn}return new i(r,t)}function Wo(e){return"-"+e.toLowerCase()}function Yo(e){return e.charAt(1).toUpperCase()}const Ko=cr([pr,zo,mr,gr,yr],"html"),on=cr([pr,Fo,mr,gr,yr],"svg");function qo(e){return e.join(" ").trim()}var ln={},br=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,Go=/\n/g,Xo=/^\s*/,Qo=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,Jo=/^:\s*/,Zo=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,$o=/^[;\s]*/,el=/^\s+|\s+$/g,tl=`
153
+ `,wr="/",kr="*",Ze="",nl="comment",rl="declaration",il=function(e,t){if(typeof e!="string")throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var n=1,r=1;function i(y){var x=y.match(Go);x&&(n+=x.length);var T=y.lastIndexOf(tl);r=~T?y.length-T:r+y.length}function o(){var y={line:n,column:r};return function(x){return x.position=new l(y),c(),x}}function l(y){this.start=y,this.end={line:n,column:r},this.source=t.source}l.prototype.content=e;function a(y){var x=new Error(t.source+":"+n+":"+r+": "+y);if(x.reason=y,x.filename=t.source,x.line=n,x.column=r,x.source=e,!t.silent)throw x}function u(y){var x=y.exec(e);if(x){var T=x[0];return i(T),e=e.slice(T.length),x}}function c(){u(Xo)}function s(y){var x;for(y=y||[];x=f();)x!==!1&&y.push(x);return y}function f(){var y=o();if(!(wr!=e.charAt(0)||kr!=e.charAt(1))){for(var x=2;Ze!=e.charAt(x)&&(kr!=e.charAt(x)||wr!=e.charAt(x+1));)++x;if(x+=2,Ze===e.charAt(x-1))return a("End of comment missing");var T=e.slice(2,x-2);return r+=2,i(T),e=e.slice(x),r+=2,y({type:nl,comment:T})}}function h(){var y=o(),x=u(Qo);if(x){if(f(),!u(Jo))return a("property missing ':'");var T=u(Zo),w=y({type:rl,property:vr(x[0].replace(br,Ze)),value:T?vr(T[0].replace(br,Ze)):Ze});return u($o),w}}function p(){var y=[];s(y);for(var x;x=h();)x!==!1&&(y.push(x),s(y));return y}return c(),p()};function vr(e){return e?e.replace(el,Ze):Ze}var ol=It&&It.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ln,"__esModule",{value:!0}),ln.default=al;var ll=ol(il);function al(e,t){var n=null;if(!e||typeof e!="string")return n;var r=(0,ll.default)(e),i=typeof t=="function";return r.forEach(function(o){if(o.type==="declaration"){var l=o.property,a=o.value;i?t(l,a,o):a&&(n=n||{},n[l]=a)}}),n}var Ot={};Object.defineProperty(Ot,"__esModule",{value:!0}),Ot.camelCase=void 0;var sl=/^--[a-zA-Z0-9_-]+$/,ul=/-([a-z])/g,cl=/^[^-]+$/,fl=/^-(webkit|moz|ms|o|khtml)-/,pl=/^-(ms)-/,hl=function(e){return!e||cl.test(e)||sl.test(e)},dl=function(e,t){return t.toUpperCase()},Sr=function(e,t){return"".concat(t,"-")},ml=function(e,t){return t===void 0&&(t={}),hl(e)?e:(e=e.toLowerCase(),t.reactCompat?e=e.replace(pl,Sr):e=e.replace(fl,Sr),e.replace(ul,dl))};Ot.camelCase=ml;var gl=It&&It.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},yl=gl(ln),xl=Ot;function an(e,t){var n={};return!e||typeof e!="string"||(0,yl.default)(e,function(r,i){r&&i&&(n[(0,xl.camelCase)(r,t)]=i)}),n}an.default=an;var bl=an;const wl=Ut(bl),Er=Cr("end"),sn=Cr("start");function Cr(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function kl(e){const t=sn(e),n=Er(e);if(t&&n)return{start:t,end:n}}function bt(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?_r(e.position):"start"in e||"end"in e?_r(e):"line"in e||"column"in e?un(e):""}function un(e){return Tr(e&&e.line)+":"+Tr(e&&e.column)}function _r(e){return un(e&&e.start)+"-"+un(e&&e.end)}function Tr(e){return e&&typeof e=="number"?e:1}class ye extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let i="",o={},l=!1;if(n&&("line"in n&&"column"in n?o={place:n}:"start"in n&&"end"in n?o={place:n}:"type"in n?o={ancestors:[n],place:n.position}:o={...n}),typeof t=="string"?i=t:!o.cause&&t&&(l=!0,i=t.message,o.cause=t),!o.ruleId&&!o.source&&typeof r=="string"){const u=r.indexOf(":");u===-1?o.ruleId=r:(o.source=r.slice(0,u),o.ruleId=r.slice(u+1))}if(!o.place&&o.ancestors&&o.ancestors){const u=o.ancestors[o.ancestors.length-1];u&&(o.place=u.position)}const a=o.place&&"start"in o.place?o.place.start:o.place;this.ancestors=o.ancestors||void 0,this.cause=o.cause||void 0,this.column=a?a.column:void 0,this.fatal=void 0,this.file,this.message=i,this.line=a?a.line:void 0,this.name=bt(o.place)||"1:1",this.place=o.place||void 0,this.reason=this.message,this.ruleId=o.ruleId||void 0,this.source=o.source||void 0,this.stack=l&&o.cause&&typeof o.cause.stack=="string"?o.cause.stack:"",this.actual,this.expected,this.note,this.url}}ye.prototype.file="",ye.prototype.name="",ye.prototype.reason="",ye.prototype.message="",ye.prototype.stack="",ye.prototype.column=void 0,ye.prototype.line=void 0,ye.prototype.ancestors=void 0,ye.prototype.cause=void 0,ye.prototype.fatal=void 0,ye.prototype.place=void 0,ye.prototype.ruleId=void 0,ye.prototype.source=void 0;const cn={}.hasOwnProperty,vl=new Map,Sl=/[A-Z]/g,El=new Set(["table","tbody","thead","tfoot","tr"]),Cl=new Set(["td","th"]),Ir="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function _l(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=jl(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=Ll(n,t.jsx,t.jsxs)}const i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?on:Ko,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},o=Ar(i,e,void 0);return o&&typeof o!="string"?o:i.create(e,i.Fragment,{children:o||void 0},void 0)}function Ar(e,t,n){if(t.type==="element")return Tl(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return Il(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return Ol(e,t,n);if(t.type==="mdxjsEsm")return Al(e,t);if(t.type==="root")return Rl(e,t,n);if(t.type==="text")return Pl(e,t)}function Tl(e,t,n){const r=e.schema;let i=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=on,e.schema=i),e.ancestors.push(t);const o=Rr(e,t.tagName,!1),l=Nl(e,t);let a=pn(e,t);return El.has(t.tagName)&&(a=a.filter(function(u){return typeof u=="string"?!Do(u):!0})),Or(e,l,o,t),fn(l,a),e.ancestors.pop(),e.schema=r,e.create(t,o,l,n)}function Il(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}wt(e,t.position)}function Al(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);wt(e,t.position)}function Ol(e,t,n){const r=e.schema;let i=r;t.name==="svg"&&r.space==="html"&&(i=on,e.schema=i),e.ancestors.push(t);const o=t.name===null?e.Fragment:Rr(e,t.name,!0),l=Dl(e,t),a=pn(e,t);return Or(e,l,o,t),fn(l,a),e.ancestors.pop(),e.schema=r,e.create(t,o,l,n)}function Rl(e,t,n){const r={};return fn(r,pn(e,t)),e.create(t,e.Fragment,r,n)}function Pl(e,t){return t.value}function Or(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function fn(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function Ll(e,t,n){return r;function r(i,o,l,a){const c=Array.isArray(l.children)?n:t;return a?c(o,l,a):c(o,l)}}function jl(e,t){return n;function n(r,i,o,l){const a=Array.isArray(o.children),u=sn(r);return t(i,o,l,a,{columnNumber:u?u.column-1:void 0,fileName:e,lineNumber:u?u.line:void 0},void 0)}}function Nl(e,t){const n={};let r,i;for(i in t.properties)if(i!=="children"&&cn.call(t.properties,i)){const o=Ml(e,i,t.properties[i]);if(o){const[l,a]=o;e.tableCellAlignToStyle&&l==="align"&&typeof a=="string"&&Cl.has(t.tagName)?r=a:n[l]=a}}if(r){const o=n.style||(n.style={});o[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function Dl(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const o=r.data.estree.body[0];o.type;const l=o.expression;l.type;const a=l.properties[0];a.type,Object.assign(n,e.evaluater.evaluateExpression(a.argument))}else wt(e,t.position);else{const i=r.name;let o;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,o=e.evaluater.evaluateExpression(a.expression)}else wt(e,t.position);else o=r.value===null?!0:r.value;n[i]=o}return n}function pn(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:vl;for(;++r<t.children.length;){const o=t.children[r];let l;if(e.passKeys){const u=o.type==="element"?o.tagName:o.type==="mdxJsxFlowElement"||o.type==="mdxJsxTextElement"?o.name:void 0;if(u){const c=i.get(u)||0;l=u+"-"+c,i.set(u,c+1)}}const a=Ar(e,o,l);a!==void 0&&n.push(a)}return n}function Ml(e,t,n){const r=Vo(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?Ro(n):qo(n)),r.property==="style"){let i=typeof n=="object"?n:zl(e,String(n));return e.stylePropertyNameCase==="css"&&(i=Fl(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&r.space?Bo[r.property]||r.property:r.attribute,n]}}function zl(e,t){try{return wl(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,i=new ye("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw i.file=e.filePath||void 0,i.url=Ir+"#cannot-parse-style-attribute",i}}function Rr(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const i=t.split(".");let o=-1,l;for(;++o<i.length;){const a=sr(i[o])?{type:"Identifier",name:i[o]}:{type:"Literal",value:i[o]};l=l?{type:"MemberExpression",object:l,property:a,computed:!!(o&&a.type==="Literal"),optional:!1}:a}r=l}else r=sr(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const i=r.value;return cn.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);wt(e)}function wt(e,t){const n=new ye("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=Ir+"#cannot-handle-mdx-estrees-without-createevaluater",n}function Fl(e){const t={};let n;for(n in e)cn.call(e,n)&&(t[Bl(n)]=e[n]);return t}function Bl(e){let t=e.replace(Sl,Hl);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function Hl(e){return"-"+e.toLowerCase()}const hn={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"]},Ul={};function Vl(e,t){const n=Ul,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return Pr(e,r,i)}function Pr(e,t,n){if(Wl(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return Lr(e.children,t,n)}return Array.isArray(e)?Lr(e,t,n):""}function Lr(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=Pr(e[i],t,n);return r.join("")}function Wl(e){return!!(e&&typeof e=="object")}const jr=document.createElement("i");function dn(e){const t="&"+e+";";jr.innerHTML=t;const n=jr.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function He(e,t,n,r){const i=e.length;let o=0,l;if(t<0?t=-t>i?0:i+t:t=t>i?i:t,n=n>0?n:0,r.length<1e4)l=Array.from(r),l.unshift(t,n),e.splice(...l);else for(n&&e.splice(t,n);o<r.length;)l=r.slice(o,o+1e4),l.unshift(t,0),e.splice(...l),o+=1e4,t+=1e4}function Ne(e,t){return e.length>0?(He(e,e.length,0,t),e):t}const Nr={}.hasOwnProperty;function Yl(e){const t={};let n=-1;for(;++n<e.length;)Kl(t,e[n]);return t}function Kl(e,t){let n;for(n in t){const i=(Nr.call(e,n)?e[n]:void 0)||(e[n]={}),o=t[n];let l;if(o)for(l in o){Nr.call(i,l)||(i[l]=[]);const a=o[l];ql(i[l],Array.isArray(a)?a:a?[a]:[])}}}function ql(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);He(e,0,0,r)}function Dr(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function at(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Ue=qe(/[A-Za-z]/),Pe=qe(/[\dA-Za-z]/),Gl=qe(/[#-'*+\--9=?A-Z^-~]/);function mn(e){return e!==null&&(e<32||e===127)}const gn=qe(/\d/),Xl=qe(/[\dA-Fa-f]/),Ql=qe(/[!-/:-@[-`{-~]/);function D(e){return e!==null&&e<-2}function Te(e){return e!==null&&(e<0||e===32)}function J(e){return e===-2||e===-1||e===32}const Jl=qe(new RegExp("\\p{P}|\\p{S}","u")),Zl=qe(/\s/);function qe(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function st(e){const t=[];let n=-1,r=0,i=0;for(;++n<e.length;){const o=e.charCodeAt(n);let l="";if(o===37&&Pe(e.charCodeAt(n+1))&&Pe(e.charCodeAt(n+2)))i=2;else if(o<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(o))||(l=String.fromCharCode(o));else if(o>55295&&o<57344){const a=e.charCodeAt(n+1);o<56320&&a>56319&&a<57344?(l=String.fromCharCode(o,a),i=1):l="�"}else l=String.fromCharCode(o);l&&(t.push(e.slice(r,n),encodeURIComponent(l)),r=n+i+1,l=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}function ie(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let o=0;return l;function l(u){return J(u)?(e.enter(n),a(u)):t(u)}function a(u){return J(u)&&o++<i?(e.consume(u),a):(e.exit(n),t(u))}}const $l={tokenize:ea};function ea(e){const t=e.attempt(this.parser.constructs.contentInitial,r,i);let n;return t;function r(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),ie(e,t,"linePrefix")}function i(a){return e.enter("paragraph"),o(a)}function o(a){const u=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=u),n=u,l(a)}function l(a){if(a===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(a);return}return D(a)?(e.consume(a),e.exit("chunkText"),o):(e.consume(a),l)}}const ta={tokenize:na},Mr={tokenize:ra};function na(e){const t=this,n=[];let r=0,i,o,l;return a;function a(_){if(r<n.length){const H=n[r];return t.containerState=H[1],e.attempt(H[0].continuation,u,c)(_)}return c(_)}function u(_){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&A();const H=t.events.length;let F=H,k;for(;F--;)if(t.events[F][0]==="exit"&&t.events[F][1].type==="chunkFlow"){k=t.events[F][1].end;break}w(r);let R=H;for(;R<t.events.length;)t.events[R][1].end={...k},R++;return He(t.events,F+1,0,t.events.slice(H)),t.events.length=R,c(_)}return a(_)}function c(_){if(r===n.length){if(!i)return h(_);if(i.currentConstruct&&i.currentConstruct.concrete)return y(_);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(Mr,s,f)(_)}function s(_){return i&&A(),w(r),h(_)}function f(_){return t.parser.lazy[t.now().line]=r!==n.length,l=t.now().offset,y(_)}function h(_){return t.containerState={},e.attempt(Mr,p,y)(_)}function p(_){return r++,n.push([t.currentConstruct,t.containerState]),h(_)}function y(_){if(_===null){i&&A(),w(0),e.consume(_);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:o}),x(_)}function x(_){if(_===null){T(e.exit("chunkFlow"),!0),w(0),e.consume(_);return}return D(_)?(e.consume(_),T(e.exit("chunkFlow")),r=0,t.interrupt=void 0,a):(e.consume(_),x)}function T(_,H){const F=t.sliceStream(_);if(H&&F.push(null),_.previous=o,o&&(o.next=_),o=_,i.defineSkip(_.start),i.write(F),t.parser.lazy[_.start.line]){let k=i.events.length;for(;k--;)if(i.events[k][1].start.offset<l&&(!i.events[k][1].end||i.events[k][1].end.offset>l))return;const R=t.events.length;let Y=R,V,Z;for(;Y--;)if(t.events[Y][0]==="exit"&&t.events[Y][1].type==="chunkFlow"){if(V){Z=t.events[Y][1].end;break}V=!0}for(w(r),k=R;k<t.events.length;)t.events[k][1].end={...Z},k++;He(t.events,Y+1,0,t.events.slice(R)),t.events.length=k}}function w(_){let H=n.length;for(;H-- >_;){const F=n[H];t.containerState=F[1],F[0].exit.call(t,e)}n.length=_}function A(){i.write([null]),o=void 0,i=void 0,t.containerState._closeFlow=void 0}}function ra(e,t,n){return ie(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function zr(e){if(e===null||Te(e)||Zl(e))return 1;if(Jl(e))return 2}function yn(e,t,n){const r=[];let i=-1;for(;++i<e.length;){const o=e[i].resolveAll;o&&!r.includes(o)&&(t=o(t,n),r.push(o))}return t}const xn={name:"attention",resolveAll:ia,tokenize:oa};function ia(e,t){let n=-1,r,i,o,l,a,u,c,s;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;u=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const f={...e[r][1].end},h={...e[n][1].start};Fr(f,-u),Fr(h,u),l={type:u>1?"strongSequence":"emphasisSequence",start:f,end:{...e[r][1].end}},a={type:u>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:h},o={type:u>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},i={type:u>1?"strong":"emphasis",start:{...l.start},end:{...a.end}},e[r][1].end={...l.start},e[n][1].start={...a.end},c=[],e[r][1].end.offset-e[r][1].start.offset&&(c=Ne(c,[["enter",e[r][1],t],["exit",e[r][1],t]])),c=Ne(c,[["enter",i,t],["enter",l,t],["exit",l,t],["enter",o,t]]),c=Ne(c,yn(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),c=Ne(c,[["exit",o,t],["enter",a,t],["exit",a,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(s=2,c=Ne(c,[["enter",e[n][1],t],["exit",e[n][1],t]])):s=0,He(e,r-1,n-r+3,c),n=r+c.length-s-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function oa(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=zr(r);let o;return l;function l(u){return o=u,e.enter("attentionSequence"),a(u)}function a(u){if(u===o)return e.consume(u),a;const c=e.exit("attentionSequence"),s=zr(u),f=!s||s===2&&i||n.includes(u),h=!i||i===2&&s||n.includes(r);return c._open=!!(o===42?f:f&&(i||!h)),c._close=!!(o===42?h:h&&(s||!f)),t(u)}}function Fr(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const la={name:"autolink",tokenize:aa};function aa(e,t,n){let r=0;return i;function i(p){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),o}function o(p){return Ue(p)?(e.consume(p),l):p===64?n(p):c(p)}function l(p){return p===43||p===45||p===46||Pe(p)?(r=1,a(p)):c(p)}function a(p){return p===58?(e.consume(p),r=0,u):(p===43||p===45||p===46||Pe(p))&&r++<32?(e.consume(p),a):(r=0,c(p))}function u(p){return p===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.exit("autolink"),t):p===null||p===32||p===60||mn(p)?n(p):(e.consume(p),u)}function c(p){return p===64?(e.consume(p),s):Gl(p)?(e.consume(p),c):n(p)}function s(p){return Pe(p)?f(p):n(p)}function f(p){return p===46?(e.consume(p),r=0,s):p===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.exit("autolink"),t):h(p)}function h(p){if((p===45||Pe(p))&&r++<63){const y=p===45?h:f;return e.consume(p),y}return n(p)}}const Rt={partial:!0,tokenize:sa};function sa(e,t,n){return r;function r(o){return J(o)?ie(e,i,"linePrefix")(o):i(o)}function i(o){return o===null||D(o)?t(o):n(o)}}const Br={continuation:{tokenize:ca},exit:fa,name:"blockQuote",tokenize:ua};function ua(e,t,n){const r=this;return i;function i(l){if(l===62){const a=r.containerState;return a.open||(e.enter("blockQuote",{_container:!0}),a.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(l),e.exit("blockQuoteMarker"),o}return n(l)}function o(l){return J(l)?(e.enter("blockQuotePrefixWhitespace"),e.consume(l),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(l))}}function ca(e,t,n){const r=this;return i;function i(l){return J(l)?ie(e,o,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l):o(l)}function o(l){return e.attempt(Br,t,n)(l)}}function fa(e){e.exit("blockQuote")}const Hr={name:"characterEscape",tokenize:pa};function pa(e,t,n){return r;function r(o){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(o),e.exit("escapeMarker"),i}function i(o){return Ql(o)?(e.enter("characterEscapeValue"),e.consume(o),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(o)}}const Ur={name:"characterReference",tokenize:ha};function ha(e,t,n){const r=this;let i=0,o,l;return a;function a(f){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(f),e.exit("characterReferenceMarker"),u}function u(f){return f===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(f),e.exit("characterReferenceMarkerNumeric"),c):(e.enter("characterReferenceValue"),o=31,l=Pe,s(f))}function c(f){return f===88||f===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(f),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),o=6,l=Xl,s):(e.enter("characterReferenceValue"),o=7,l=gn,s(f))}function s(f){if(f===59&&i){const h=e.exit("characterReferenceValue");return l===Pe&&!dn(r.sliceSerialize(h))?n(f):(e.enter("characterReferenceMarker"),e.consume(f),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return l(f)&&i++<o?(e.consume(f),s):n(f)}}const Vr={partial:!0,tokenize:ma},Wr={concrete:!0,name:"codeFenced",tokenize:da};function da(e,t,n){const r=this,i={partial:!0,tokenize:F};let o=0,l=0,a;return u;function u(k){return c(k)}function c(k){const R=r.events[r.events.length-1];return o=R&&R[1].type==="linePrefix"?R[2].sliceSerialize(R[1],!0).length:0,a=k,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),s(k)}function s(k){return k===a?(l++,e.consume(k),s):l<3?n(k):(e.exit("codeFencedFenceSequence"),J(k)?ie(e,f,"whitespace")(k):f(k))}function f(k){return k===null||D(k)?(e.exit("codeFencedFence"),r.interrupt?t(k):e.check(Vr,x,H)(k)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),h(k))}function h(k){return k===null||D(k)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),f(k)):J(k)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),ie(e,p,"whitespace")(k)):k===96&&k===a?n(k):(e.consume(k),h)}function p(k){return k===null||D(k)?f(k):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),y(k))}function y(k){return k===null||D(k)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),f(k)):k===96&&k===a?n(k):(e.consume(k),y)}function x(k){return e.attempt(i,H,T)(k)}function T(k){return e.enter("lineEnding"),e.consume(k),e.exit("lineEnding"),w}function w(k){return o>0&&J(k)?ie(e,A,"linePrefix",o+1)(k):A(k)}function A(k){return k===null||D(k)?e.check(Vr,x,H)(k):(e.enter("codeFlowValue"),_(k))}function _(k){return k===null||D(k)?(e.exit("codeFlowValue"),A(k)):(e.consume(k),_)}function H(k){return e.exit("codeFenced"),t(k)}function F(k,R,Y){let V=0;return Z;function Z(B){return k.enter("lineEnding"),k.consume(B),k.exit("lineEnding"),P}function P(B){return k.enter("codeFencedFence"),J(B)?ie(k,L,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(B):L(B)}function L(B){return B===a?(k.enter("codeFencedFenceSequence"),$(B)):Y(B)}function $(B){return B===a?(V++,k.consume(B),$):V>=l?(k.exit("codeFencedFenceSequence"),J(B)?ie(k,G,"whitespace")(B):G(B)):Y(B)}function G(B){return B===null||D(B)?(k.exit("codeFencedFence"),R(B)):Y(B)}}}function ma(e,t,n){const r=this;return i;function i(l){return l===null?n(l):(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),o)}function o(l){return r.parser.lazy[r.now().line]?n(l):t(l)}}const bn={name:"codeIndented",tokenize:ya},ga={partial:!0,tokenize:xa};function ya(e,t,n){const r=this;return i;function i(c){return e.enter("codeIndented"),ie(e,o,"linePrefix",5)(c)}function o(c){const s=r.events[r.events.length-1];return s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?l(c):n(c)}function l(c){return c===null?u(c):D(c)?e.attempt(ga,l,u)(c):(e.enter("codeFlowValue"),a(c))}function a(c){return c===null||D(c)?(e.exit("codeFlowValue"),l(c)):(e.consume(c),a)}function u(c){return e.exit("codeIndented"),t(c)}}function xa(e,t,n){const r=this;return i;function i(l){return r.parser.lazy[r.now().line]?n(l):D(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),i):ie(e,o,"linePrefix",5)(l)}function o(l){const a=r.events[r.events.length-1];return a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?t(l):D(l)?i(l):n(l)}}const ba={name:"codeText",previous:ka,resolve:wa,tokenize:va};function wa(e){let t=e.length-4,n=3,r,i;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(i=r):(r===t||e[r][1].type==="lineEnding")&&(e[i][1].type="codeTextData",r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function ka(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function va(e,t,n){let r=0,i,o;return l;function l(f){return e.enter("codeText"),e.enter("codeTextSequence"),a(f)}function a(f){return f===96?(e.consume(f),r++,a):(e.exit("codeTextSequence"),u(f))}function u(f){return f===null?n(f):f===32?(e.enter("space"),e.consume(f),e.exit("space"),u):f===96?(o=e.enter("codeTextSequence"),i=0,s(f)):D(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),u):(e.enter("codeTextData"),c(f))}function c(f){return f===null||f===32||f===96||D(f)?(e.exit("codeTextData"),u(f)):(e.consume(f),c)}function s(f){return f===96?(e.consume(f),i++,s):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(f)):(o.type="codeTextData",c(f))}}class Sa{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const r=n??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const i=n||0;this.setCursor(Math.trunc(t));const o=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&kt(this.left,r),o.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),kt(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),kt(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const n=this.left.splice(t,Number.POSITIVE_INFINITY);kt(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);kt(this.left,n.reverse())}}}function kt(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function Yr(e){const t={};let n=-1,r,i,o,l,a,u,c;const s=new Sa(e);for(;++n<s.length;){for(;n in t;)n=t[n];if(r=s.get(n),n&&r[1].type==="chunkFlow"&&s.get(n-1)[1].type==="listItemPrefix"&&(u=r[1]._tokenizer.events,o=0,o<u.length&&u[o][1].type==="lineEndingBlank"&&(o+=2),o<u.length&&u[o][1].type==="content"))for(;++o<u.length&&u[o][1].type!=="content";)u[o][1].type==="chunkText"&&(u[o][1]._isInFirstContentOfListItem=!0,o++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,Ea(s,n)),n=t[n],c=!0);else if(r[1]._container){for(o=n,i=void 0;o--;)if(l=s.get(o),l[1].type==="lineEnding"||l[1].type==="lineEndingBlank")l[0]==="enter"&&(i&&(s.get(i)[1].type="lineEndingBlank"),l[1].type="lineEnding",i=o);else if(!(l[1].type==="linePrefix"||l[1].type==="listItemIndent"))break;i&&(r[1].end={...s.get(i)[1].start},a=s.slice(i,n),a.unshift(r),s.splice(i,n-i+1,a))}}return He(e,0,Number.POSITIVE_INFINITY,s.slice(0)),!c}function Ea(e,t){const n=e.get(t)[1],r=e.get(t)[2];let i=t-1;const o=[];let l=n._tokenizer;l||(l=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(l._contentTypeTextTrailing=!0));const a=l.events,u=[],c={};let s,f,h=-1,p=n,y=0,x=0;const T=[x];for(;p;){for(;e.get(++i)[1]!==p;);o.push(i),p._tokenizer||(s=r.sliceStream(p),p.next||s.push(null),f&&l.defineSkip(p.start),p._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=!0),l.write(s),p._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=void 0)),f=p,p=p.next}for(p=n;++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&&(x=h+1,T.push(x),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(l.events=[],p?(p._tokenizer=void 0,p.previous=void 0):T.pop(),h=T.length;h--;){const w=a.slice(T[h],T[h+1]),A=o.pop();u.push([A,A+w.length-1]),e.splice(A,2,w)}for(u.reverse(),h=-1;++h<u.length;)c[y+u[h][0]]=y+u[h][1],y+=u[h][1]-u[h][0]-1;return c}const Ca={resolve:Ta,tokenize:Ia},_a={partial:!0,tokenize:Aa};function Ta(e){return Yr(e),e}function Ia(e,t){let n;return r;function r(a){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),i(a)}function i(a){return a===null?o(a):D(a)?e.check(_a,l,o)(a):(e.consume(a),i)}function o(a){return e.exit("chunkContent"),e.exit("content"),t(a)}function l(a){return e.consume(a),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function Aa(e,t,n){const r=this;return i;function i(l){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),ie(e,o,"linePrefix")}function o(l){if(l===null||D(l))return n(l);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?t(l):e.interrupt(r.parser.constructs.flow,n,t)(l)}}function Kr(e,t,n,r,i,o,l,a,u){const c=u||Number.POSITIVE_INFINITY;let s=0;return f;function f(w){return w===60?(e.enter(r),e.enter(i),e.enter(o),e.consume(w),e.exit(o),h):w===null||w===32||w===41||mn(w)?n(w):(e.enter(r),e.enter(l),e.enter(a),e.enter("chunkString",{contentType:"string"}),x(w))}function h(w){return w===62?(e.enter(o),e.consume(w),e.exit(o),e.exit(i),e.exit(r),t):(e.enter(a),e.enter("chunkString",{contentType:"string"}),p(w))}function p(w){return w===62?(e.exit("chunkString"),e.exit(a),h(w)):w===null||w===60||D(w)?n(w):(e.consume(w),w===92?y:p)}function y(w){return w===60||w===62||w===92?(e.consume(w),p):p(w)}function x(w){return!s&&(w===null||w===41||Te(w))?(e.exit("chunkString"),e.exit(a),e.exit(l),e.exit(r),t(w)):s<c&&w===40?(e.consume(w),s++,x):w===41?(e.consume(w),s--,x):w===null||w===32||w===40||mn(w)?n(w):(e.consume(w),w===92?T:x)}function T(w){return w===40||w===41||w===92?(e.consume(w),x):x(w)}}function qr(e,t,n,r,i,o){const l=this;let a=0,u;return c;function c(p){return e.enter(r),e.enter(i),e.consume(p),e.exit(i),e.enter(o),s}function s(p){return a>999||p===null||p===91||p===93&&!u||p===94&&!a&&"_hiddenFootnoteSupport"in l.parser.constructs?n(p):p===93?(e.exit(o),e.enter(i),e.consume(p),e.exit(i),e.exit(r),t):D(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),s):(e.enter("chunkString",{contentType:"string"}),f(p))}function f(p){return p===null||p===91||p===93||D(p)||a++>999?(e.exit("chunkString"),s(p)):(e.consume(p),u||(u=!J(p)),p===92?h:f)}function h(p){return p===91||p===92||p===93?(e.consume(p),a++,f):f(p)}}function Gr(e,t,n,r,i,o){let l;return a;function a(h){return h===34||h===39||h===40?(e.enter(r),e.enter(i),e.consume(h),e.exit(i),l=h===40?41:h,u):n(h)}function u(h){return h===l?(e.enter(i),e.consume(h),e.exit(i),e.exit(r),t):(e.enter(o),c(h))}function c(h){return h===l?(e.exit(o),u(l)):h===null?n(h):D(h)?(e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),ie(e,c,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),s(h))}function s(h){return h===l||h===null||D(h)?(e.exit("chunkString"),c(h)):(e.consume(h),h===92?f:s)}function f(h){return h===l||h===92?(e.consume(h),s):s(h)}}function vt(e,t){let n;return r;function r(i){return D(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):J(i)?ie(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}const Oa={name:"definition",tokenize:Pa},Ra={partial:!0,tokenize:La};function Pa(e,t,n){const r=this;let i;return o;function o(p){return e.enter("definition"),l(p)}function l(p){return qr.call(r,e,a,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(p)}function a(p){return i=at(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),p===58?(e.enter("definitionMarker"),e.consume(p),e.exit("definitionMarker"),u):n(p)}function u(p){return Te(p)?vt(e,c)(p):c(p)}function c(p){return Kr(e,s,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(p)}function s(p){return e.attempt(Ra,f,f)(p)}function f(p){return J(p)?ie(e,h,"whitespace")(p):h(p)}function h(p){return p===null||D(p)?(e.exit("definition"),r.parser.defined.push(i),t(p)):n(p)}}function La(e,t,n){return r;function r(a){return Te(a)?vt(e,i)(a):n(a)}function i(a){return Gr(e,o,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(a)}function o(a){return J(a)?ie(e,l,"whitespace")(a):l(a)}function l(a){return a===null||D(a)?t(a):n(a)}}const ja={name:"hardBreakEscape",tokenize:Na};function Na(e,t,n){return r;function r(o){return e.enter("hardBreakEscape"),e.consume(o),i}function i(o){return D(o)?(e.exit("hardBreakEscape"),t(o)):n(o)}}const Da={name:"headingAtx",resolve:Ma,tokenize:za};function Ma(e,t){let n=e.length-2,r=3,i,o;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(i={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},o={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},He(e,r,n-r+1,[["enter",i,t],["enter",o,t],["exit",o,t],["exit",i,t]])),e}function za(e,t,n){let r=0;return i;function i(s){return e.enter("atxHeading"),o(s)}function o(s){return e.enter("atxHeadingSequence"),l(s)}function l(s){return s===35&&r++<6?(e.consume(s),l):s===null||Te(s)?(e.exit("atxHeadingSequence"),a(s)):n(s)}function a(s){return s===35?(e.enter("atxHeadingSequence"),u(s)):s===null||D(s)?(e.exit("atxHeading"),t(s)):J(s)?ie(e,a,"whitespace")(s):(e.enter("atxHeadingText"),c(s))}function u(s){return s===35?(e.consume(s),u):(e.exit("atxHeadingSequence"),a(s))}function c(s){return s===null||s===35||Te(s)?(e.exit("atxHeadingText"),a(s)):(e.consume(s),c)}}const Fa=["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"],Xr=["pre","script","style","textarea"],Ba={concrete:!0,name:"htmlFlow",resolveTo:Va,tokenize:Wa},Ha={partial:!0,tokenize:Ka},Ua={partial:!0,tokenize:Ya};function Va(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function Wa(e,t,n){const r=this;let i,o,l,a,u;return c;function c(g){return s(g)}function s(g){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(g),f}function f(g){return g===33?(e.consume(g),h):g===47?(e.consume(g),o=!0,x):g===63?(e.consume(g),i=3,r.interrupt?t:d):Ue(g)?(e.consume(g),l=String.fromCharCode(g),T):n(g)}function h(g){return g===45?(e.consume(g),i=2,p):g===91?(e.consume(g),i=5,a=0,y):Ue(g)?(e.consume(g),i=4,r.interrupt?t:d):n(g)}function p(g){return g===45?(e.consume(g),r.interrupt?t:d):n(g)}function y(g){const me="CDATA[";return g===me.charCodeAt(a++)?(e.consume(g),a===me.length?r.interrupt?t:L:y):n(g)}function x(g){return Ue(g)?(e.consume(g),l=String.fromCharCode(g),T):n(g)}function T(g){if(g===null||g===47||g===62||Te(g)){const me=g===47,De=l.toLowerCase();return!me&&!o&&Xr.includes(De)?(i=1,r.interrupt?t(g):L(g)):Fa.includes(l.toLowerCase())?(i=6,me?(e.consume(g),w):r.interrupt?t(g):L(g)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(g):o?A(g):_(g))}return g===45||Pe(g)?(e.consume(g),l+=String.fromCharCode(g),T):n(g)}function w(g){return g===62?(e.consume(g),r.interrupt?t:L):n(g)}function A(g){return J(g)?(e.consume(g),A):Z(g)}function _(g){return g===47?(e.consume(g),Z):g===58||g===95||Ue(g)?(e.consume(g),H):J(g)?(e.consume(g),_):Z(g)}function H(g){return g===45||g===46||g===58||g===95||Pe(g)?(e.consume(g),H):F(g)}function F(g){return g===61?(e.consume(g),k):J(g)?(e.consume(g),F):_(g)}function k(g){return g===null||g===60||g===61||g===62||g===96?n(g):g===34||g===39?(e.consume(g),u=g,R):J(g)?(e.consume(g),k):Y(g)}function R(g){return g===u?(e.consume(g),u=null,V):g===null||D(g)?n(g):(e.consume(g),R)}function Y(g){return g===null||g===34||g===39||g===47||g===60||g===61||g===62||g===96||Te(g)?F(g):(e.consume(g),Y)}function V(g){return g===47||g===62||J(g)?_(g):n(g)}function Z(g){return g===62?(e.consume(g),P):n(g)}function P(g){return g===null||D(g)?L(g):J(g)?(e.consume(g),P):n(g)}function L(g){return g===45&&i===2?(e.consume(g),oe):g===60&&i===1?(e.consume(g),te):g===62&&i===4?(e.consume(g),le):g===63&&i===3?(e.consume(g),d):g===93&&i===5?(e.consume(g),z):D(g)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(Ha,we,$)(g)):g===null||D(g)?(e.exit("htmlFlowData"),$(g)):(e.consume(g),L)}function $(g){return e.check(Ua,G,we)(g)}function G(g){return e.enter("lineEnding"),e.consume(g),e.exit("lineEnding"),B}function B(g){return g===null||D(g)?$(g):(e.enter("htmlFlowData"),L(g))}function oe(g){return g===45?(e.consume(g),d):L(g)}function te(g){return g===47?(e.consume(g),l="",de):L(g)}function de(g){if(g===62){const me=l.toLowerCase();return Xr.includes(me)?(e.consume(g),le):L(g)}return Ue(g)&&l.length<8?(e.consume(g),l+=String.fromCharCode(g),de):L(g)}function z(g){return g===93?(e.consume(g),d):L(g)}function d(g){return g===62?(e.consume(g),le):g===45&&i===2?(e.consume(g),d):L(g)}function le(g){return g===null||D(g)?(e.exit("htmlFlowData"),we(g)):(e.consume(g),le)}function we(g){return e.exit("htmlFlow"),t(g)}}function Ya(e,t,n){const r=this;return i;function i(l){return D(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),o):n(l)}function o(l){return r.parser.lazy[r.now().line]?n(l):t(l)}}function Ka(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(Rt,t,n)}}const qa={name:"htmlText",tokenize:Ga};function Ga(e,t,n){const r=this;let i,o,l;return a;function a(d){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(d),u}function u(d){return d===33?(e.consume(d),c):d===47?(e.consume(d),F):d===63?(e.consume(d),_):Ue(d)?(e.consume(d),Y):n(d)}function c(d){return d===45?(e.consume(d),s):d===91?(e.consume(d),o=0,y):Ue(d)?(e.consume(d),A):n(d)}function s(d){return d===45?(e.consume(d),p):n(d)}function f(d){return d===null?n(d):d===45?(e.consume(d),h):D(d)?(l=f,te(d)):(e.consume(d),f)}function h(d){return d===45?(e.consume(d),p):f(d)}function p(d){return d===62?oe(d):d===45?h(d):f(d)}function y(d){const le="CDATA[";return d===le.charCodeAt(o++)?(e.consume(d),o===le.length?x:y):n(d)}function x(d){return d===null?n(d):d===93?(e.consume(d),T):D(d)?(l=x,te(d)):(e.consume(d),x)}function T(d){return d===93?(e.consume(d),w):x(d)}function w(d){return d===62?oe(d):d===93?(e.consume(d),w):x(d)}function A(d){return d===null||d===62?oe(d):D(d)?(l=A,te(d)):(e.consume(d),A)}function _(d){return d===null?n(d):d===63?(e.consume(d),H):D(d)?(l=_,te(d)):(e.consume(d),_)}function H(d){return d===62?oe(d):_(d)}function F(d){return Ue(d)?(e.consume(d),k):n(d)}function k(d){return d===45||Pe(d)?(e.consume(d),k):R(d)}function R(d){return D(d)?(l=R,te(d)):J(d)?(e.consume(d),R):oe(d)}function Y(d){return d===45||Pe(d)?(e.consume(d),Y):d===47||d===62||Te(d)?V(d):n(d)}function V(d){return d===47?(e.consume(d),oe):d===58||d===95||Ue(d)?(e.consume(d),Z):D(d)?(l=V,te(d)):J(d)?(e.consume(d),V):oe(d)}function Z(d){return d===45||d===46||d===58||d===95||Pe(d)?(e.consume(d),Z):P(d)}function P(d){return d===61?(e.consume(d),L):D(d)?(l=P,te(d)):J(d)?(e.consume(d),P):V(d)}function L(d){return d===null||d===60||d===61||d===62||d===96?n(d):d===34||d===39?(e.consume(d),i=d,$):D(d)?(l=L,te(d)):J(d)?(e.consume(d),L):(e.consume(d),G)}function $(d){return d===i?(e.consume(d),i=void 0,B):d===null?n(d):D(d)?(l=$,te(d)):(e.consume(d),$)}function G(d){return d===null||d===34||d===39||d===60||d===61||d===96?n(d):d===47||d===62||Te(d)?V(d):(e.consume(d),G)}function B(d){return d===47||d===62||Te(d)?V(d):n(d)}function oe(d){return d===62?(e.consume(d),e.exit("htmlTextData"),e.exit("htmlText"),t):n(d)}function te(d){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),de}function de(d){return J(d)?ie(e,z,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(d):z(d)}function z(d){return e.enter("htmlTextData"),l(d)}}const wn={name:"labelEnd",resolveAll:Za,resolveTo:$a,tokenize:es},Xa={tokenize:ts},Qa={tokenize:ns},Ja={tokenize:rs};function Za(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const i=r.type==="labelImage"?4:2;r.type="data",t+=i}}return e.length!==n.length&&He(e,0,e.length,n),e}function $a(e,t){let n=e.length,r=0,i,o,l,a;for(;n--;)if(i=e[n][1],o){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[n][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(l){if(e[n][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(o=n,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(l=n);const u={type:e[o][1].type==="labelLink"?"link":"image",start:{...e[o][1].start},end:{...e[e.length-1][1].end}},c={type:"label",start:{...e[o][1].start},end:{...e[l][1].end}},s={type:"labelText",start:{...e[o+r+2][1].end},end:{...e[l-2][1].start}};return a=[["enter",u,t],["enter",c,t]],a=Ne(a,e.slice(o+1,o+r+3)),a=Ne(a,[["enter",s,t]]),a=Ne(a,yn(t.parser.constructs.insideSpan.null,e.slice(o+r+4,l-3),t)),a=Ne(a,[["exit",s,t],e[l-2],e[l-1],["exit",c,t]]),a=Ne(a,e.slice(l+1)),a=Ne(a,[["exit",u,t]]),He(e,o,e.length,a),e}function es(e,t,n){const r=this;let i=r.events.length,o,l;for(;i--;)if((r.events[i][1].type==="labelImage"||r.events[i][1].type==="labelLink")&&!r.events[i][1]._balanced){o=r.events[i][1];break}return a;function a(h){return o?o._inactive?f(h):(l=r.parser.defined.includes(at(r.sliceSerialize({start:o.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(h),e.exit("labelMarker"),e.exit("labelEnd"),u):n(h)}function u(h){return h===40?e.attempt(Xa,s,l?s:f)(h):h===91?e.attempt(Qa,s,l?c:f)(h):l?s(h):f(h)}function c(h){return e.attempt(Ja,s,f)(h)}function s(h){return t(h)}function f(h){return o._balanced=!0,n(h)}}function ts(e,t,n){return r;function r(f){return e.enter("resource"),e.enter("resourceMarker"),e.consume(f),e.exit("resourceMarker"),i}function i(f){return Te(f)?vt(e,o)(f):o(f)}function o(f){return f===41?s(f):Kr(e,l,a,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(f)}function l(f){return Te(f)?vt(e,u)(f):s(f)}function a(f){return n(f)}function u(f){return f===34||f===39||f===40?Gr(e,c,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(f):s(f)}function c(f){return Te(f)?vt(e,s)(f):s(f)}function s(f){return f===41?(e.enter("resourceMarker"),e.consume(f),e.exit("resourceMarker"),e.exit("resource"),t):n(f)}}function ns(e,t,n){const r=this;return i;function i(a){return qr.call(r,e,o,l,"reference","referenceMarker","referenceString")(a)}function o(a){return r.parser.defined.includes(at(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(a):n(a)}function l(a){return n(a)}}function rs(e,t,n){return r;function r(o){return e.enter("reference"),e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),i}function i(o){return o===93?(e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),e.exit("reference"),t):n(o)}}const is={name:"labelStartImage",resolveAll:wn.resolveAll,tokenize:os};function os(e,t,n){const r=this;return i;function i(a){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(a),e.exit("labelImageMarker"),o}function o(a){return a===91?(e.enter("labelMarker"),e.consume(a),e.exit("labelMarker"),e.exit("labelImage"),l):n(a)}function l(a){return a===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(a):t(a)}}const ls={name:"labelStartLink",resolveAll:wn.resolveAll,tokenize:as};function as(e,t,n){const r=this;return i;function i(l){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(l),e.exit("labelMarker"),e.exit("labelLink"),o}function o(l){return l===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(l):t(l)}}const kn={name:"lineEnding",tokenize:ss};function ss(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),ie(e,t,"linePrefix")}}const Pt={name:"thematicBreak",tokenize:us};function us(e,t,n){let r=0,i;return o;function o(c){return e.enter("thematicBreak"),l(c)}function l(c){return i=c,a(c)}function a(c){return c===i?(e.enter("thematicBreakSequence"),u(c)):r>=3&&(c===null||D(c))?(e.exit("thematicBreak"),t(c)):n(c)}function u(c){return c===i?(e.consume(c),r++,u):(e.exit("thematicBreakSequence"),J(c)?ie(e,a,"whitespace")(c):a(c))}}const Ie={continuation:{tokenize:hs},exit:ms,name:"list",tokenize:ps},cs={partial:!0,tokenize:gs},fs={partial:!0,tokenize:ds};function ps(e,t,n){const r=this,i=r.events[r.events.length-1];let o=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,l=0;return a;function a(p){const y=r.containerState.type||(p===42||p===43||p===45?"listUnordered":"listOrdered");if(y==="listUnordered"?!r.containerState.marker||p===r.containerState.marker:gn(p)){if(r.containerState.type||(r.containerState.type=y,e.enter(y,{_container:!0})),y==="listUnordered")return e.enter("listItemPrefix"),p===42||p===45?e.check(Pt,n,c)(p):c(p);if(!r.interrupt||p===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),u(p)}return n(p)}function u(p){return gn(p)&&++l<10?(e.consume(p),u):(!r.interrupt||l<2)&&(r.containerState.marker?p===r.containerState.marker:p===41||p===46)?(e.exit("listItemValue"),c(p)):n(p)}function c(p){return e.enter("listItemMarker"),e.consume(p),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||p,e.check(Rt,r.interrupt?n:s,e.attempt(cs,h,f))}function s(p){return r.containerState.initialBlankLine=!0,o++,h(p)}function f(p){return J(p)?(e.enter("listItemPrefixWhitespace"),e.consume(p),e.exit("listItemPrefixWhitespace"),h):n(p)}function h(p){return r.containerState.size=o+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(p)}}function hs(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(Rt,i,o);function i(a){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,ie(e,t,"listItemIndent",r.containerState.size+1)(a)}function o(a){return r.containerState.furtherBlankLines||!J(a)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,l(a)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(fs,t,l)(a))}function l(a){return r.containerState._closeFlow=!0,r.interrupt=void 0,ie(e,e.attempt(Ie,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a)}}function ds(e,t,n){const r=this;return ie(e,i,"listItemIndent",r.containerState.size+1);function i(o){const l=r.events[r.events.length-1];return l&&l[1].type==="listItemIndent"&&l[2].sliceSerialize(l[1],!0).length===r.containerState.size?t(o):n(o)}}function ms(e){e.exit(this.containerState.type)}function gs(e,t,n){const r=this;return ie(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(o){const l=r.events[r.events.length-1];return!J(o)&&l&&l[1].type==="listItemPrefixWhitespace"?t(o):n(o)}}const Qr={name:"setextUnderline",resolveTo:ys,tokenize:xs};function ys(e,t){let n=e.length,r,i,o;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(i=n)}else e[n][1].type==="content"&&e.splice(n,1),!o&&e[n][1].type==="definition"&&(o=n);const l={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type="setextHeadingText",o?(e.splice(i,0,["enter",l,t]),e.splice(o+1,0,["exit",e[r][1],t]),e[r][1].end={...e[o][1].end}):e[r][1]=l,e.push(["exit",l,t]),e}function xs(e,t,n){const r=this;let i;return o;function o(c){let s=r.events.length,f;for(;s--;)if(r.events[s][1].type!=="lineEnding"&&r.events[s][1].type!=="linePrefix"&&r.events[s][1].type!=="content"){f=r.events[s][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||f)?(e.enter("setextHeadingLine"),i=c,l(c)):n(c)}function l(c){return e.enter("setextHeadingLineSequence"),a(c)}function a(c){return c===i?(e.consume(c),a):(e.exit("setextHeadingLineSequence"),J(c)?ie(e,u,"lineSuffix")(c):u(c))}function u(c){return c===null||D(c)?(e.exit("setextHeadingLine"),t(c)):n(c)}}const bs={tokenize:ws};function ws(e){const t=this,n=e.attempt(Rt,r,e.attempt(this.parser.constructs.flowInitial,i,ie(e,e.attempt(this.parser.constructs.flow,i,e.attempt(Ca,i)),"linePrefix")));return n;function r(o){if(o===null){e.consume(o);return}return e.enter("lineEndingBlank"),e.consume(o),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function i(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const ks={resolveAll:Zr()},vs=Jr("string"),Ss=Jr("text");function Jr(e){return{resolveAll:Zr(e==="text"?Es:void 0),tokenize:t};function t(n){const r=this,i=this.parser.constructs[e],o=n.attempt(i,l,a);return l;function l(s){return c(s)?o(s):a(s)}function a(s){if(s===null){n.consume(s);return}return n.enter("data"),n.consume(s),u}function u(s){return c(s)?(n.exit("data"),o(s)):(n.consume(s),u)}function c(s){if(s===null)return!0;const f=i[s];let h=-1;if(f)for(;++h<f.length;){const p=f[h];if(!p.previous||p.previous.call(r,r.previous))return!0}return!1}}}function Zr(e){return t;function t(n,r){let i=-1,o;for(;++i<=n.length;)o===void 0?n[i]&&n[i][1].type==="data"&&(o=i,i++):(!n[i]||n[i][1].type!=="data")&&(i!==o+2&&(n[o][1].end=n[i-1][1].end,n.splice(o+2,i-o-2),i=o+2),o=void 0);return e?e(n,r):n}}function Es(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],i=t.sliceStream(r);let o=i.length,l=-1,a=0,u;for(;o--;){const c=i[o];if(typeof c=="string"){for(l=c.length;c.charCodeAt(l-1)===32;)a++,l--;if(l)break;l=-1}else if(c===-2)u=!0,a++;else if(c!==-1){o++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(a=0),a){const c={type:n===e.length||u||a<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:o?l:r.start._bufferIndex+l,_index:r.start._index+o,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(n,0,["enter",c,t],["exit",c,t]),n+=2)}n++}return e}const Cs=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:{null:[42,95]},contentInitial:{91:Oa},disable:{null:[]},document:{42:Ie,43:Ie,45:Ie,48:Ie,49:Ie,50:Ie,51:Ie,52:Ie,53:Ie,54:Ie,55:Ie,56:Ie,57:Ie,62:Br},flow:{35:Da,42:Pt,45:[Qr,Pt],60:Ba,61:Qr,95:Pt,96:Wr,126:Wr},flowInitial:{[-2]:bn,[-1]:bn,32:bn},insideSpan:{null:[xn,ks]},string:{38:Ur,92:Hr},text:{[-5]:kn,[-4]:kn,[-3]:kn,33:is,38:Ur,42:xn,60:[la,qa],91:ls,92:[ja,Hr],93:wn,95:xn,96:ba}},Symbol.toStringTag,{value:"Module"}));function _s(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const i={},o=[];let l=[],a=[];const u={attempt:R(F),check:R(k),consume:A,enter:_,exit:H,interrupt:R(k,{interrupt:!0})},c={code:null,containerState:{},defineSkip:x,events:[],now:y,parser:e,previous:null,sliceSerialize:h,sliceStream:p,write:f};let s=t.tokenize.call(c,u);return t.resolveAll&&o.push(t),c;function f(P){return l=Ne(l,P),T(),l[l.length-1]!==null?[]:(Y(t,0),c.events=yn(o,c.events,c),c.events)}function h(P,L){return Is(p(P),L)}function p(P){return Ts(l,P)}function y(){const{_bufferIndex:P,_index:L,line:$,column:G,offset:B}=r;return{_bufferIndex:P,_index:L,line:$,column:G,offset:B}}function x(P){i[P.line]=P.column,Z()}function T(){let P;for(;r._index<l.length;){const L=l[r._index];if(typeof L=="string")for(P=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===P&&r._bufferIndex<L.length;)w(L.charCodeAt(r._bufferIndex));else w(L)}}function w(P){s=s(P)}function A(P){D(P)?(r.line++,r.column=1,r.offset+=P===-3?2:1,Z()):P!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===l[r._index].length&&(r._bufferIndex=-1,r._index++)),c.previous=P}function _(P,L){const $=L||{};return $.type=P,$.start=y(),c.events.push(["enter",$,c]),a.push($),$}function H(P){const L=a.pop();return L.end=y(),c.events.push(["exit",L,c]),L}function F(P,L){Y(P,L.from)}function k(P,L){L.restore()}function R(P,L){return $;function $(G,B,oe){let te,de,z,d;return Array.isArray(G)?we(G):"tokenize"in G?we([G]):le(G);function le(ae){return ze;function ze(ke){const Le=ke!==null&&ae[ke],pe=ke!==null&&ae.null,je=[...Array.isArray(Le)?Le:Le?[Le]:[],...Array.isArray(pe)?pe:pe?[pe]:[]];return we(je)(ke)}}function we(ae){return te=ae,de=0,ae.length===0?oe:g(ae[de])}function g(ae){return ze;function ze(ke){return d=V(),z=ae,ae.partial||(c.currentConstruct=ae),ae.name&&c.parser.constructs.disable.null.includes(ae.name)?De():ae.tokenize.call(L?Object.assign(Object.create(c),L):c,u,me,De)(ke)}}function me(ae){return P(z,d),B}function De(ae){return d.restore(),++de<te.length?g(te[de]):oe}}}function Y(P,L){P.resolveAll&&!o.includes(P)&&o.push(P),P.resolve&&He(c.events,L,c.events.length-L,P.resolve(c.events.slice(L),c)),P.resolveTo&&(c.events=P.resolveTo(c.events,c))}function V(){const P=y(),L=c.previous,$=c.currentConstruct,G=c.events.length,B=Array.from(a);return{from:G,restore:oe};function oe(){r=P,c.previous=L,c.currentConstruct=$,c.events.length=G,a=B,Z()}}function Z(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function Ts(e,t){const n=t.start._index,r=t.start._bufferIndex,i=t.end._index,o=t.end._bufferIndex;let l;if(n===i)l=[e[n].slice(r,o)];else{if(l=e.slice(n,i),r>-1){const a=l[0];typeof a=="string"?l[0]=a.slice(r):l.shift()}o>0&&l.push(e[i].slice(0,o))}return l}function Is(e,t){let n=-1;const r=[];let i;for(;++n<e.length;){const o=e[n];let l;if(typeof o=="string")l=o;else switch(o){case-5:{l="\r";break}case-4:{l=`
154
154
  `;break}case-3:{l=`\r
155
- `;break}case-2:{l=t?" ":" ";break}case-1:{if(!t&&i)continue;l=" ";break}default:l=String.fromCharCode(o)}i=o===-2,r.push(l)}return r.join("")}function As(e){const r={constructs:Yl([Cs,...(e||{}).extensions||[]]),content:i($l),defined:[],document:i(ta),flow:i(bs),lazy:{},string:i(vs),text:i(Ss)};return r;function i(o){return l;function l(a){return _s(r,o,a)}}}function Rs(e){for(;!Wr(e););return e}const Zr=/[\0\t\n\r]/g;function Os(){let e=1,t="",n=!0,r;return i;function i(o,l,a){const u=[];let c,s,f,h,p;for(o=t+(typeof o=="string"?o.toString():new TextDecoder(l||void 0).decode(o)),f=0,t="",n&&(o.charCodeAt(0)===65279&&f++,n=void 0);f<o.length;){if(Zr.lastIndex=f,c=Zr.exec(o),h=c&&c.index!==void 0?c.index:o.length,p=o.charCodeAt(h),!c){t=o.slice(f);break}if(p===10&&f===h&&r)u.push(-3),r=void 0;else switch(r&&(u.push(-5),r=void 0),f<h&&(u.push(o.slice(f,h)),e+=h-f),p){case 0:{u.push(65533),e++;break}case 9:{for(s=Math.ceil(e/4)*4,u.push(-2);e++<s;)u.push(-1);break}case 10:{u.push(-4),e=1;break}default:r=!0,e=1}f=h+1}return a&&(r&&u.push(-5),t&&u.push(t),u.push(null)),u}}const Ps=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Ls(e){return e.replace(Ps,js)}function js(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),o=i===120||i===88;return Nr(n.slice(o?2:1),o?16:10)}return pn(n)||e}const $r={}.hasOwnProperty;function Ns(e,t,n){return typeof t!="string"&&(n=t,t=void 0),Ds(n)(Rs(As(n).document().write(Os()(e,t,!0))))}function Ds(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(se),autolinkProtocol:W,autolinkEmail:W,atxHeading:o($e),blockQuote:o(pe),characterEscape:W,characterReference:W,codeFenced:o(je),codeFencedFenceInfo:l,codeFencedFenceMeta:l,codeIndented:o(je,l),codeText:o(Ct,l),codeTextData:W,data:W,codeFlowValue:W,definition:o(ft),definitionDestinationString:l,definitionLabelString:l,definitionTitleString:l,emphasis:o(_t),hardBreakEscape:o(Ye),hardBreakTrailing:o(Ye),htmlFlow:o(A,l),htmlFlowData:W,htmlText:o(A,l),htmlTextData:W,image:o(Y),label:l,link:o(se),listItem:o(Ae),listItemValue:h,listOrdered:o(ye,f),listUnordered:o(ye),paragraph:o(ke),reference:g,referenceString:l,resourceDestinationString:l,resourceTitleString:l,setextHeading:o($e),strong:o(et),thematicBreak:o(We)},exit:{atxHeading:u(),atxHeadingSequence:V,autolink:u(),autolinkEmail:Le,autolinkProtocol:we,blockQuote:u(),characterEscapeValue:Z,characterReferenceMarkerHexadecimal:De,characterReferenceMarkerNumeric:De,characterReferenceValue:ae,characterReference:Fe,codeFenced:u(T),codeFencedFence:x,codeFencedFenceInfo:p,codeFencedFenceMeta:y,codeFlowValue:Z,codeIndented:u(k),codeText:u(M),codeTextData:Z,data:Z,definition:u(),definitionDestinationString:H,definitionLabelString:R,definitionTitleString:_,emphasis:u(),hardBreakEscape:u(P),hardBreakTrailing:u(P),htmlFlow:u($),htmlFlowData:Z,htmlText:u(K),htmlTextData:Z,image:u(te),label:F,labelText:de,lineEnding:O,link:u(oe),listItem:u(),listOrdered:u(),listUnordered:u(),paragraph:u(),referenceString:me,resourceDestinationString:d,resourceTitleString:le,resource:be,setextHeading:u(G),setextHeadingLineSequence:j,setextHeadingText:w,strong:u(),thematicBreak:u()}};ei(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(b){let v={type:"root",children:[]};const L={stack:[v],tokenStack:[],config:t,enter:a,exit:c,buffer:l,resume:s,data:n},U=[];let Q=-1;for(;++Q<b.length;)if(b[Q][1].type==="listOrdered"||b[Q][1].type==="listUnordered")if(b[Q][0]==="enter")U.push(Q);else{const xe=U.pop();Q=i(b,xe,Q)}for(Q=-1;++Q<b.length;){const xe=t[b[Q][0]];$r.call(xe,b[Q][1].type)&&xe[b[Q][1].type].call(Object.assign({sliceSerialize:b[Q][2].sliceSerialize},L),b[Q][1])}if(L.tokenStack.length>0){const xe=L.tokenStack[L.tokenStack.length-1];(xe[1]||ti).call(L,void 0,xe[0])}for(v.position={start:Ke(b.length>0?b[0][1].start:{line:1,column:1,offset:0}),end:Ke(b.length>0?b[b.length-2][1].end:{line:1,column:1,offset:0})},Q=-1;++Q<t.transforms.length;)v=t.transforms[Q](v)||v;return v}function i(b,v,L){let U=v-1,Q=-1,xe=!1,qe,Me,nt,rt;for(;++U<=L;){const ve=b[U];switch(ve[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{ve[0]==="enter"?Q++:Q--,rt=void 0;break}case"lineEndingBlank":{ve[0]==="enter"&&(qe&&!rt&&!Q&&!nt&&(nt=U),rt=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:rt=void 0}if(!Q&&ve[0]==="enter"&&ve[1].type==="listItemPrefix"||Q===-1&&ve[0]==="exit"&&(ve[1].type==="listUnordered"||ve[1].type==="listOrdered")){if(qe){let Qe=U;for(Me=void 0;Qe--;){const Be=b[Qe];if(Be[1].type==="lineEnding"||Be[1].type==="lineEndingBlank"){if(Be[0]==="exit")continue;Me&&(b[Me][1].type="lineEndingBlank",xe=!0),Be[1].type="lineEnding",Me=Qe}else if(!(Be[1].type==="linePrefix"||Be[1].type==="blockQuotePrefix"||Be[1].type==="blockQuotePrefixWhitespace"||Be[1].type==="blockQuoteMarker"||Be[1].type==="listItemIndent"))break}nt&&(!Me||nt<Me)&&(qe._spread=!0),qe.end=Object.assign({},Me?b[Me][1].start:ve[1].end),b.splice(Me||U,0,["exit",qe,ve[2]]),U++,L++}if(ve[1].type==="listItemPrefix"){const Qe={type:"listItem",_spread:!1,start:Object.assign({},ve[1].start),end:void 0};qe=Qe,b.splice(U,0,["enter",Qe,ve[2]]),U++,L++,nt=void 0,rt=!0}}}return b[v][1]._spread=xe,L}function o(b,v){return L;function L(U){a.call(this,b(U),U),v&&v.call(this,U)}}function l(){this.stack.push({type:"fragment",children:[]})}function a(b,v,L){this.stack[this.stack.length-1].children.push(b),this.stack.push(b),this.tokenStack.push([v,L||void 0]),b.position={start:Ke(v.start),end:void 0}}function u(b){return v;function v(L){b&&b.call(this,L),c.call(this,L)}}function c(b,v){const L=this.stack.pop(),U=this.tokenStack.pop();if(U)U[0].type!==b.type&&(v?v.call(this,b,U[0]):(U[1]||ti).call(this,b,U[0]));else throw new Error("Cannot close `"+b.type+"` ("+xt({start:b.start,end:b.end})+"): it’s not open");L.position.end=Ke(b.end)}function s(){return Vl(this.stack.pop())}function f(){this.data.expectingFirstListItemValue=!0}function h(b){if(this.data.expectingFirstListItemValue){const v=this.stack[this.stack.length-2];v.start=Number.parseInt(this.sliceSerialize(b),10),this.data.expectingFirstListItemValue=void 0}}function p(){const b=this.resume(),v=this.stack[this.stack.length-1];v.lang=b}function y(){const b=this.resume(),v=this.stack[this.stack.length-1];v.meta=b}function x(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function T(){const b=this.resume(),v=this.stack[this.stack.length-1];v.value=b.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function k(){const b=this.resume(),v=this.stack[this.stack.length-1];v.value=b.replace(/(\r?\n|\r)$/g,"")}function R(b){const v=this.resume(),L=this.stack[this.stack.length-1];L.label=v,L.identifier=at(this.sliceSerialize(b)).toLowerCase()}function _(){const b=this.resume(),v=this.stack[this.stack.length-1];v.title=b}function H(){const b=this.resume(),v=this.stack[this.stack.length-1];v.url=b}function V(b){const v=this.stack[this.stack.length-1];if(!v.depth){const L=this.sliceSerialize(b).length;v.depth=L}}function w(){this.data.setextHeadingSlurpLineEnding=!0}function j(b){const v=this.stack[this.stack.length-1];v.depth=this.sliceSerialize(b).codePointAt(0)===61?1:2}function G(){this.data.setextHeadingSlurpLineEnding=void 0}function W(b){const L=this.stack[this.stack.length-1].children;let U=L[L.length-1];(!U||U.type!=="text")&&(U=tt(),U.position={start:Ke(b.start),end:void 0},L.push(U)),this.stack.push(U)}function Z(b){const v=this.stack.pop();v.value+=this.sliceSerialize(b),v.position.end=Ke(b.end)}function O(b){const v=this.stack[this.stack.length-1];if(this.data.atHardBreak){const L=v.children[v.children.length-1];L.position.end=Ke(b.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(v.type)&&(W.call(this,b),Z.call(this,b))}function P(){this.data.atHardBreak=!0}function $(){const b=this.resume(),v=this.stack[this.stack.length-1];v.value=b}function K(){const b=this.resume(),v=this.stack[this.stack.length-1];v.value=b}function M(){const b=this.resume(),v=this.stack[this.stack.length-1];v.value=b}function oe(){const b=this.stack[this.stack.length-1];if(this.data.inReference){const v=this.data.referenceType||"shortcut";b.type+="Reference",b.referenceType=v,delete b.url,delete b.title}else delete b.identifier,delete b.label;this.data.referenceType=void 0}function te(){const b=this.stack[this.stack.length-1];if(this.data.inReference){const v=this.data.referenceType||"shortcut";b.type+="Reference",b.referenceType=v,delete b.url,delete b.title}else delete b.identifier,delete b.label;this.data.referenceType=void 0}function de(b){const v=this.sliceSerialize(b),L=this.stack[this.stack.length-2];L.label=Ls(v),L.identifier=at(v).toLowerCase()}function F(){const b=this.stack[this.stack.length-1],v=this.resume(),L=this.stack[this.stack.length-1];if(this.data.inReference=!0,L.type==="link"){const U=b.children;L.children=U}else L.alt=v}function d(){const b=this.resume(),v=this.stack[this.stack.length-1];v.url=b}function le(){const b=this.resume(),v=this.stack[this.stack.length-1];v.title=b}function be(){this.data.inReference=void 0}function g(){this.data.referenceType="collapsed"}function me(b){const v=this.resume(),L=this.stack[this.stack.length-1];L.label=v,L.identifier=at(this.sliceSerialize(b)).toLowerCase(),this.data.referenceType="full"}function De(b){this.data.characterReferenceType=b.type}function ae(b){const v=this.sliceSerialize(b),L=this.data.characterReferenceType;let U;L?(U=Nr(v,L==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):U=pn(v);const Q=this.stack[this.stack.length-1];Q.value+=U}function Fe(b){const v=this.stack.pop();v.position.end=Ke(b.end)}function we(b){Z.call(this,b);const v=this.stack[this.stack.length-1];v.url=this.sliceSerialize(b)}function Le(b){Z.call(this,b);const v=this.stack[this.stack.length-1];v.url="mailto:"+this.sliceSerialize(b)}function pe(){return{type:"blockquote",children:[]}}function je(){return{type:"code",lang:null,meta:null,value:""}}function Ct(){return{type:"inlineCode",value:""}}function ft(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function _t(){return{type:"emphasis",children:[]}}function $e(){return{type:"heading",depth:0,children:[]}}function Ye(){return{type:"break"}}function A(){return{type:"html",value:""}}function Y(){return{type:"image",title:null,url:"",alt:null}}function se(){return{type:"link",title:null,url:"",children:[]}}function ye(b){return{type:"list",ordered:b.type==="listOrdered",start:null,spread:b._spread,children:[]}}function Ae(b){return{type:"listItem",spread:b._spread,checked:null,children:[]}}function ke(){return{type:"paragraph",children:[]}}function et(){return{type:"strong",children:[]}}function tt(){return{type:"text",value:""}}function We(){return{type:"thematicBreak"}}}function Ke(e){return{line:e.line,column:e.column,offset:e.offset}}function ei(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?ei(e,r):zs(e,r)}}function zs(e,t){let n;for(n in t)if($r.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function ti(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+xt({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+xt({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+xt({start:t.start,end:t.end})+") is still open")}function Fs(e){const t=this;t.parser=n;function n(r){return Ns(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function Ms(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function Bs(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
156
- `}]}function Us(e,t){const n=t.value?t.value+`
157
- `:"",r={};t.lang&&(r.className=["language-"+t.lang]);let i={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(i.data={meta:t.meta}),e.patch(t,i),i=e.applyData(t,i),i={type:"element",tagName:"pre",properties:{},children:[i]},e.patch(t,i),i}function Hs(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Vs(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Ws(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),i=st(r.toLowerCase()),o=e.footnoteOrder.indexOf(r);let l,a=e.footnoteCounts.get(r);a===void 0?(a=0,e.footnoteOrder.push(r),l=e.footnoteOrder.length):l=o+1,a+=1,e.footnoteCounts.set(r,a);const u={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+i,id:n+"fnref-"+i+(a>1?"-"+a:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(l)}]};e.patch(t,u);const c={type:"element",tagName:"sup",properties:{},children:[u]};return e.patch(t,c),e.applyData(t,c)}function Ys(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function qs(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function ni(e,t){const n=t.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+r}];const i=e.all(t),o=i[0];o&&o.type==="text"?o.value="["+o.value:i.unshift({type:"text",value:"["});const l=i[i.length-1];return l&&l.type==="text"?l.value+=r:i.push({type:"text",value:r}),i}function Gs(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return ni(e,t);const i={src:st(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);const o={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,o),e.applyData(t,o)}function Ks(e,t){const n={src:st(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function Xs(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function Qs(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return ni(e,t);const i={href:st(r.url||"")};r.title!==null&&r.title!==void 0&&(i.title=r.title);const o={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,o),e.applyData(t,o)}function Js(e,t){const n={href:st(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function Zs(e,t,n){const r=e.all(t),i=n?$s(n):ri(t),o={},l=[];if(typeof t.checked=="boolean"){const s=r[0];let f;s&&s.type==="element"&&s.tagName==="p"?f=s:(f={type:"element",tagName:"p",properties:{},children:[]},r.unshift(f)),f.children.length>0&&f.children.unshift({type:"text",value:" "}),f.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),o.className=["task-list-item"]}let a=-1;for(;++a<r.length;){const s=r[a];(i||a!==0||s.type!=="element"||s.tagName!=="p")&&l.push({type:"text",value:`
155
+ `;break}case-2:{l=t?" ":" ";break}case-1:{if(!t&&i)continue;l=" ";break}default:l=String.fromCharCode(o)}i=o===-2,r.push(l)}return r.join("")}function As(e){const r={constructs:Yl([Cs,...(e||{}).extensions||[]]),content:i($l),defined:[],document:i(ta),flow:i(bs),lazy:{},string:i(vs),text:i(Ss)};return r;function i(o){return l;function l(a){return _s(r,o,a)}}}function Os(e){for(;!Yr(e););return e}const $r=/[\0\t\n\r]/g;function Rs(){let e=1,t="",n=!0,r;return i;function i(o,l,a){const u=[];let c,s,f,h,p;for(o=t+(typeof o=="string"?o.toString():new TextDecoder(l||void 0).decode(o)),f=0,t="",n&&(o.charCodeAt(0)===65279&&f++,n=void 0);f<o.length;){if($r.lastIndex=f,c=$r.exec(o),h=c&&c.index!==void 0?c.index:o.length,p=o.charCodeAt(h),!c){t=o.slice(f);break}if(p===10&&f===h&&r)u.push(-3),r=void 0;else switch(r&&(u.push(-5),r=void 0),f<h&&(u.push(o.slice(f,h)),e+=h-f),p){case 0:{u.push(65533),e++;break}case 9:{for(s=Math.ceil(e/4)*4,u.push(-2);e++<s;)u.push(-1);break}case 10:{u.push(-4),e=1;break}default:r=!0,e=1}f=h+1}return a&&(r&&u.push(-5),t&&u.push(t),u.push(null)),u}}const Ps=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Ls(e){return e.replace(Ps,js)}function js(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),o=i===120||i===88;return Dr(n.slice(o?2:1),o?16:10)}return dn(n)||e}const ei={}.hasOwnProperty;function Ns(e,t,n){return typeof t!="string"&&(n=t,t=void 0),Ds(n)(Os(As(n).document().write(Rs()(e,t,!0))))}function Ds(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(se),autolinkProtocol:V,autolinkEmail:V,atxHeading:o($e),blockQuote:o(pe),characterEscape:V,characterReference:V,codeFenced:o(je),codeFencedFenceInfo:l,codeFencedFenceMeta:l,codeIndented:o(je,l),codeText:o(_t,l),codeTextData:V,data:V,codeFlowValue:V,definition:o(ht),definitionDestinationString:l,definitionLabelString:l,definitionTitleString:l,emphasis:o(Tt),hardBreakEscape:o(Ye),hardBreakTrailing:o(Ye),htmlFlow:o(O,l),htmlFlowData:V,htmlText:o(O,l),htmlTextData:V,image:o(K),label:l,link:o(se),listItem:o(Ae),listItemValue:h,listOrdered:o(xe,f),listUnordered:o(xe),paragraph:o(ve),reference:g,referenceString:l,resourceDestinationString:l,resourceTitleString:l,setextHeading:o($e),strong:o(et),thematicBreak:o(We)},exit:{atxHeading:u(),atxHeadingSequence:F,autolink:u(),autolinkEmail:Le,autolinkProtocol:ke,blockQuote:u(),characterEscapeValue:Z,characterReferenceMarkerHexadecimal:De,characterReferenceMarkerNumeric:De,characterReferenceValue:ae,characterReference:ze,codeFenced:u(T),codeFencedFence:x,codeFencedFenceInfo:p,codeFencedFenceMeta:y,codeFlowValue:Z,codeIndented:u(w),codeText:u(B),codeTextData:Z,data:Z,definition:u(),definitionDestinationString:H,definitionLabelString:A,definitionTitleString:_,emphasis:u(),hardBreakEscape:u(L),hardBreakTrailing:u(L),htmlFlow:u($),htmlFlowData:Z,htmlText:u(G),htmlTextData:Z,image:u(te),label:z,labelText:de,lineEnding:P,link:u(oe),listItem:u(),listOrdered:u(),listUnordered:u(),paragraph:u(),referenceString:me,resourceDestinationString:d,resourceTitleString:le,resource:we,setextHeading:u(Y),setextHeadingLineSequence:R,setextHeadingText:k,strong:u(),thematicBreak:u()}};ti(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(b){let v={type:"root",children:[]};const j={stack:[v],tokenStack:[],config:t,enter:a,exit:c,buffer:l,resume:s,data:n},W=[];let Q=-1;for(;++Q<b.length;)if(b[Q][1].type==="listOrdered"||b[Q][1].type==="listUnordered")if(b[Q][0]==="enter")W.push(Q);else{const be=W.pop();Q=i(b,be,Q)}for(Q=-1;++Q<b.length;){const be=t[b[Q][0]];ei.call(be,b[Q][1].type)&&be[b[Q][1].type].call(Object.assign({sliceSerialize:b[Q][2].sliceSerialize},j),b[Q][1])}if(j.tokenStack.length>0){const be=j.tokenStack[j.tokenStack.length-1];(be[1]||ni).call(j,void 0,be[0])}for(v.position={start:Ge(b.length>0?b[0][1].start:{line:1,column:1,offset:0}),end:Ge(b.length>0?b[b.length-2][1].end:{line:1,column:1,offset:0})},Q=-1;++Q<t.transforms.length;)v=t.transforms[Q](v)||v;return v}function i(b,v,j){let W=v-1,Q=-1,be=!1,Ke,Fe,nt,rt;for(;++W<=j;){const Se=b[W];switch(Se[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Se[0]==="enter"?Q++:Q--,rt=void 0;break}case"lineEndingBlank":{Se[0]==="enter"&&(Ke&&!rt&&!Q&&!nt&&(nt=W),rt=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:rt=void 0}if(!Q&&Se[0]==="enter"&&Se[1].type==="listItemPrefix"||Q===-1&&Se[0]==="exit"&&(Se[1].type==="listUnordered"||Se[1].type==="listOrdered")){if(Ke){let Qe=W;for(Fe=void 0;Qe--;){const Be=b[Qe];if(Be[1].type==="lineEnding"||Be[1].type==="lineEndingBlank"){if(Be[0]==="exit")continue;Fe&&(b[Fe][1].type="lineEndingBlank",be=!0),Be[1].type="lineEnding",Fe=Qe}else if(!(Be[1].type==="linePrefix"||Be[1].type==="blockQuotePrefix"||Be[1].type==="blockQuotePrefixWhitespace"||Be[1].type==="blockQuoteMarker"||Be[1].type==="listItemIndent"))break}nt&&(!Fe||nt<Fe)&&(Ke._spread=!0),Ke.end=Object.assign({},Fe?b[Fe][1].start:Se[1].end),b.splice(Fe||W,0,["exit",Ke,Se[2]]),W++,j++}if(Se[1].type==="listItemPrefix"){const Qe={type:"listItem",_spread:!1,start:Object.assign({},Se[1].start),end:void 0};Ke=Qe,b.splice(W,0,["enter",Qe,Se[2]]),W++,j++,nt=void 0,rt=!0}}}return b[v][1]._spread=be,j}function o(b,v){return j;function j(W){a.call(this,b(W),W),v&&v.call(this,W)}}function l(){this.stack.push({type:"fragment",children:[]})}function a(b,v,j){this.stack[this.stack.length-1].children.push(b),this.stack.push(b),this.tokenStack.push([v,j||void 0]),b.position={start:Ge(v.start),end:void 0}}function u(b){return v;function v(j){b&&b.call(this,j),c.call(this,j)}}function c(b,v){const j=this.stack.pop(),W=this.tokenStack.pop();if(W)W[0].type!==b.type&&(v?v.call(this,b,W[0]):(W[1]||ni).call(this,b,W[0]));else throw new Error("Cannot close `"+b.type+"` ("+bt({start:b.start,end:b.end})+"): it’s not open");j.position.end=Ge(b.end)}function s(){return Vl(this.stack.pop())}function f(){this.data.expectingFirstListItemValue=!0}function h(b){if(this.data.expectingFirstListItemValue){const v=this.stack[this.stack.length-2];v.start=Number.parseInt(this.sliceSerialize(b),10),this.data.expectingFirstListItemValue=void 0}}function p(){const b=this.resume(),v=this.stack[this.stack.length-1];v.lang=b}function y(){const b=this.resume(),v=this.stack[this.stack.length-1];v.meta=b}function x(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function T(){const b=this.resume(),v=this.stack[this.stack.length-1];v.value=b.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function w(){const b=this.resume(),v=this.stack[this.stack.length-1];v.value=b.replace(/(\r?\n|\r)$/g,"")}function A(b){const v=this.resume(),j=this.stack[this.stack.length-1];j.label=v,j.identifier=at(this.sliceSerialize(b)).toLowerCase()}function _(){const b=this.resume(),v=this.stack[this.stack.length-1];v.title=b}function H(){const b=this.resume(),v=this.stack[this.stack.length-1];v.url=b}function F(b){const v=this.stack[this.stack.length-1];if(!v.depth){const j=this.sliceSerialize(b).length;v.depth=j}}function k(){this.data.setextHeadingSlurpLineEnding=!0}function R(b){const v=this.stack[this.stack.length-1];v.depth=this.sliceSerialize(b).codePointAt(0)===61?1:2}function Y(){this.data.setextHeadingSlurpLineEnding=void 0}function V(b){const j=this.stack[this.stack.length-1].children;let W=j[j.length-1];(!W||W.type!=="text")&&(W=tt(),W.position={start:Ge(b.start),end:void 0},j.push(W)),this.stack.push(W)}function Z(b){const v=this.stack.pop();v.value+=this.sliceSerialize(b),v.position.end=Ge(b.end)}function P(b){const v=this.stack[this.stack.length-1];if(this.data.atHardBreak){const j=v.children[v.children.length-1];j.position.end=Ge(b.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(v.type)&&(V.call(this,b),Z.call(this,b))}function L(){this.data.atHardBreak=!0}function $(){const b=this.resume(),v=this.stack[this.stack.length-1];v.value=b}function G(){const b=this.resume(),v=this.stack[this.stack.length-1];v.value=b}function B(){const b=this.resume(),v=this.stack[this.stack.length-1];v.value=b}function oe(){const b=this.stack[this.stack.length-1];if(this.data.inReference){const v=this.data.referenceType||"shortcut";b.type+="Reference",b.referenceType=v,delete b.url,delete b.title}else delete b.identifier,delete b.label;this.data.referenceType=void 0}function te(){const b=this.stack[this.stack.length-1];if(this.data.inReference){const v=this.data.referenceType||"shortcut";b.type+="Reference",b.referenceType=v,delete b.url,delete b.title}else delete b.identifier,delete b.label;this.data.referenceType=void 0}function de(b){const v=this.sliceSerialize(b),j=this.stack[this.stack.length-2];j.label=Ls(v),j.identifier=at(v).toLowerCase()}function z(){const b=this.stack[this.stack.length-1],v=this.resume(),j=this.stack[this.stack.length-1];if(this.data.inReference=!0,j.type==="link"){const W=b.children;j.children=W}else j.alt=v}function d(){const b=this.resume(),v=this.stack[this.stack.length-1];v.url=b}function le(){const b=this.resume(),v=this.stack[this.stack.length-1];v.title=b}function we(){this.data.inReference=void 0}function g(){this.data.referenceType="collapsed"}function me(b){const v=this.resume(),j=this.stack[this.stack.length-1];j.label=v,j.identifier=at(this.sliceSerialize(b)).toLowerCase(),this.data.referenceType="full"}function De(b){this.data.characterReferenceType=b.type}function ae(b){const v=this.sliceSerialize(b),j=this.data.characterReferenceType;let W;j?(W=Dr(v,j==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):W=dn(v);const Q=this.stack[this.stack.length-1];Q.value+=W}function ze(b){const v=this.stack.pop();v.position.end=Ge(b.end)}function ke(b){Z.call(this,b);const v=this.stack[this.stack.length-1];v.url=this.sliceSerialize(b)}function Le(b){Z.call(this,b);const v=this.stack[this.stack.length-1];v.url="mailto:"+this.sliceSerialize(b)}function pe(){return{type:"blockquote",children:[]}}function je(){return{type:"code",lang:null,meta:null,value:""}}function _t(){return{type:"inlineCode",value:""}}function ht(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Tt(){return{type:"emphasis",children:[]}}function $e(){return{type:"heading",depth:0,children:[]}}function Ye(){return{type:"break"}}function O(){return{type:"html",value:""}}function K(){return{type:"image",title:null,url:"",alt:null}}function se(){return{type:"link",title:null,url:"",children:[]}}function xe(b){return{type:"list",ordered:b.type==="listOrdered",start:null,spread:b._spread,children:[]}}function Ae(b){return{type:"listItem",spread:b._spread,checked:null,children:[]}}function ve(){return{type:"paragraph",children:[]}}function et(){return{type:"strong",children:[]}}function tt(){return{type:"text",value:""}}function We(){return{type:"thematicBreak"}}}function Ge(e){return{line:e.line,column:e.column,offset:e.offset}}function ti(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?ti(e,r):Ms(e,r)}}function Ms(e,t){let n;for(n in t)if(ei.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function ni(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+bt({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+bt({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+bt({start:t.start,end:t.end})+") is still open")}function zs(e){const t=this;t.parser=n;function n(r){return Ns(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function Fs(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function Bs(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
156
+ `}]}function Hs(e,t){const n=t.value?t.value+`
157
+ `:"",r={};t.lang&&(r.className=["language-"+t.lang]);let i={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(i.data={meta:t.meta}),e.patch(t,i),i=e.applyData(t,i),i={type:"element",tagName:"pre",properties:{},children:[i]},e.patch(t,i),i}function Us(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Vs(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Ws(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),i=st(r.toLowerCase()),o=e.footnoteOrder.indexOf(r);let l,a=e.footnoteCounts.get(r);a===void 0?(a=0,e.footnoteOrder.push(r),l=e.footnoteOrder.length):l=o+1,a+=1,e.footnoteCounts.set(r,a);const u={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+i,id:n+"fnref-"+i+(a>1?"-"+a:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(l)}]};e.patch(t,u);const c={type:"element",tagName:"sup",properties:{},children:[u]};return e.patch(t,c),e.applyData(t,c)}function Ys(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Ks(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function ri(e,t){const n=t.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+r}];const i=e.all(t),o=i[0];o&&o.type==="text"?o.value="["+o.value:i.unshift({type:"text",value:"["});const l=i[i.length-1];return l&&l.type==="text"?l.value+=r:i.push({type:"text",value:r}),i}function qs(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return ri(e,t);const i={src:st(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);const o={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,o),e.applyData(t,o)}function Gs(e,t){const n={src:st(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function Xs(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function Qs(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return ri(e,t);const i={href:st(r.url||"")};r.title!==null&&r.title!==void 0&&(i.title=r.title);const o={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,o),e.applyData(t,o)}function Js(e,t){const n={href:st(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function Zs(e,t,n){const r=e.all(t),i=n?$s(n):ii(t),o={},l=[];if(typeof t.checked=="boolean"){const s=r[0];let f;s&&s.type==="element"&&s.tagName==="p"?f=s:(f={type:"element",tagName:"p",properties:{},children:[]},r.unshift(f)),f.children.length>0&&f.children.unshift({type:"text",value:" "}),f.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),o.className=["task-list-item"]}let a=-1;for(;++a<r.length;){const s=r[a];(i||a!==0||s.type!=="element"||s.tagName!=="p")&&l.push({type:"text",value:`
158
158
  `}),s.type==="element"&&s.tagName==="p"&&!i?l.push(...s.children):l.push(s)}const u=r[r.length-1];u&&(i||u.type!=="element"||u.tagName!=="p")&&l.push({type:"text",value:`
159
- `});const c={type:"element",tagName:"li",properties:o,children:l};return e.patch(t,c),e.applyData(t,c)}function $s(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=ri(n[r])}return t}function ri(e){const t=e.spread;return t??e.children.length>1}function eu(e,t){const n={},r=e.all(t);let i=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++i<r.length;){const l=r[i];if(l.type==="element"&&l.tagName==="li"&&l.properties&&Array.isArray(l.properties.className)&&l.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const o={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,o),e.applyData(t,o)}function tu(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function nu(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function ru(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function iu(e,t){const n=e.all(t),r=n.shift(),i=[];if(r){const l={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],l),i.push(l)}if(n.length>0){const l={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},a=ln(t.children[1]),u=Sr(t.children[t.children.length-1]);a&&u&&(l.position={start:a,end:u}),i.push(l)}const o={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,o),e.applyData(t,o)}function ou(e,t,n){const r=n?n.children:void 0,o=(r?r.indexOf(t):1)===0?"th":"td",l=n&&n.type==="table"?n.align:void 0,a=l?l.length:t.children.length;let u=-1;const c=[];for(;++u<a;){const f=t.children[u],h={},p=l?l[u]:void 0;p&&(h.align=p);let y={type:"element",tagName:o,properties:h,children:[]};f&&(y.children=e.all(f),e.patch(f,y),y=e.applyData(f,y)),c.push(y)}const s={type:"element",tagName:"tr",properties:{},children:e.wrap(c,!0)};return e.patch(t,s),e.applyData(t,s)}function lu(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const ii=9,oi=32;function au(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),i=0;const o=[];for(;r;)o.push(li(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return o.push(li(t.slice(i),i>0,!1)),o.join("")}function li(e,t,n){let r=0,i=e.length;if(t){let o=e.codePointAt(r);for(;o===ii||o===oi;)r++,o=e.codePointAt(r)}if(n){let o=e.codePointAt(i-1);for(;o===ii||o===oi;)i--,o=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function su(e,t){const n={type:"text",value:au(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function uu(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const cu={blockquote:Ms,break:Bs,code:Us,delete:Hs,emphasis:Vs,footnoteReference:Ws,heading:Ys,html:qs,imageReference:Gs,image:Ks,inlineCode:Xs,linkReference:Qs,link:Js,listItem:Zs,list:eu,paragraph:tu,root:nu,strong:ru,table:iu,tableCell:lu,tableRow:ou,text:su,thematicBreak:uu,toml:Pt,yaml:Pt,definition:Pt,footnoteDefinition:Pt};function Pt(){}const ai=-1,Lt=0,vt=1,jt=2,wn=3,kn=4,vn=5,Sn=6,si=7,ui=8,ci=typeof self=="object"?self:globalThis,fu=(e,t)=>{const n=(i,o)=>(e.set(o,i),i),r=i=>{if(e.has(i))return e.get(i);const[o,l]=t[i];switch(o){case Lt:case ai:return n(l,i);case vt:{const a=n([],i);for(const u of l)a.push(r(u));return a}case jt:{const a=n({},i);for(const[u,c]of l)a[r(u)]=r(c);return a}case wn:return n(new Date(l),i);case kn:{const{source:a,flags:u}=l;return n(new RegExp(a,u),i)}case vn:{const a=n(new Map,i);for(const[u,c]of l)a.set(r(u),r(c));return a}case Sn:{const a=n(new Set,i);for(const u of l)a.add(r(u));return a}case si:{const{name:a,message:u}=l;return n(new ci[a](u),i)}case ui:return n(BigInt(l),i);case"BigInt":return n(Object(BigInt(l)),i);case"ArrayBuffer":return n(new Uint8Array(l).buffer,l);case"DataView":{const{buffer:a}=new Uint8Array(l);return n(new DataView(a),l)}}return n(new ci[o](l),i)};return r},fi=e=>fu(new Map,e)(0),ut="",{toString:pu}={},{keys:hu}=Object,St=e=>{const t=typeof e;if(t!=="object"||!e)return[Lt,t];const n=pu.call(e).slice(8,-1);switch(n){case"Array":return[vt,ut];case"Object":return[jt,ut];case"Date":return[wn,ut];case"RegExp":return[kn,ut];case"Map":return[vn,ut];case"Set":return[Sn,ut];case"DataView":return[vt,n]}return n.includes("Array")?[vt,n]:n.includes("Error")?[si,n]:[jt,n]},Nt=([e,t])=>e===Lt&&(t==="function"||t==="symbol"),du=(e,t,n,r)=>{const i=(l,a)=>{const u=r.push(l)-1;return n.set(a,u),u},o=l=>{if(n.has(l))return n.get(l);let[a,u]=St(l);switch(a){case Lt:{let s=l;switch(u){case"bigint":a=ui,s=l.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+u);s=null;break;case"undefined":return i([ai],l)}return i([a,s],l)}case vt:{if(u){let h=l;return u==="DataView"?h=new Uint8Array(l.buffer):u==="ArrayBuffer"&&(h=new Uint8Array(l)),i([u,[...h]],l)}const s=[],f=i([a,s],l);for(const h of l)s.push(o(h));return f}case jt:{if(u)switch(u){case"BigInt":return i([u,l.toString()],l);case"Boolean":case"Number":case"String":return i([u,l.valueOf()],l)}if(t&&"toJSON"in l)return o(l.toJSON());const s=[],f=i([a,s],l);for(const h of hu(l))(e||!Nt(St(l[h])))&&s.push([o(h),o(l[h])]);return f}case wn:return i([a,l.toISOString()],l);case kn:{const{source:s,flags:f}=l;return i([a,{source:s,flags:f}],l)}case vn:{const s=[],f=i([a,s],l);for(const[h,p]of l)(e||!(Nt(St(h))||Nt(St(p))))&&s.push([o(h),o(p)]);return f}case Sn:{const s=[],f=i([a,s],l);for(const h of l)(e||!Nt(St(h)))&&s.push(o(h));return f}}const{message:c}=l;return i([a,{name:u,message:c}],l)};return o},pi=(e,{json:t,lossy:n}={})=>{const r=[];return du(!(t||n),!!t,new Map,r)(e),r},Dt=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?fi(pi(e,t)):structuredClone(e):(e,t)=>fi(pi(e,t));function mu(e,t){const n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function gu(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function yu(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||mu,r=e.options.footnoteBackLabel||gu,i=e.options.footnoteLabel||"Footnotes",o=e.options.footnoteLabelTagName||"h2",l=e.options.footnoteLabelProperties||{className:["sr-only"]},a=[];let u=-1;for(;++u<e.footnoteOrder.length;){const c=e.footnoteById.get(e.footnoteOrder[u]);if(!c)continue;const s=e.all(c),f=String(c.identifier).toUpperCase(),h=st(f.toLowerCase());let p=0;const y=[],x=e.footnoteCounts.get(f);for(;x!==void 0&&++p<=x;){y.length>0&&y.push({type:"text",value:" "});let R=typeof n=="string"?n:n(u,p);typeof R=="string"&&(R={type:"text",value:R}),y.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+h+(p>1?"-"+p:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(u,p),className:["data-footnote-backref"]},children:Array.isArray(R)?R:[R]})}const T=s[s.length-1];if(T&&T.type==="element"&&T.tagName==="p"){const R=T.children[T.children.length-1];R&&R.type==="text"?R.value+=" ":T.children.push({type:"text",value:" "}),T.children.push(...y)}else s.push(...y);const k={type:"element",tagName:"li",properties:{id:t+"fn-"+h},children:e.wrap(s,!0)};e.patch(c,k),a.push(k)}if(a.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:o,properties:{...Dt(l),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:`
159
+ `});const c={type:"element",tagName:"li",properties:o,children:l};return e.patch(t,c),e.applyData(t,c)}function $s(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=ii(n[r])}return t}function ii(e){const t=e.spread;return t??e.children.length>1}function eu(e,t){const n={},r=e.all(t);let i=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++i<r.length;){const l=r[i];if(l.type==="element"&&l.tagName==="li"&&l.properties&&Array.isArray(l.properties.className)&&l.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const o={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,o),e.applyData(t,o)}function tu(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function nu(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function ru(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function iu(e,t){const n=e.all(t),r=n.shift(),i=[];if(r){const l={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],l),i.push(l)}if(n.length>0){const l={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},a=sn(t.children[1]),u=Er(t.children[t.children.length-1]);a&&u&&(l.position={start:a,end:u}),i.push(l)}const o={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,o),e.applyData(t,o)}function ou(e,t,n){const r=n?n.children:void 0,o=(r?r.indexOf(t):1)===0?"th":"td",l=n&&n.type==="table"?n.align:void 0,a=l?l.length:t.children.length;let u=-1;const c=[];for(;++u<a;){const f=t.children[u],h={},p=l?l[u]:void 0;p&&(h.align=p);let y={type:"element",tagName:o,properties:h,children:[]};f&&(y.children=e.all(f),e.patch(f,y),y=e.applyData(f,y)),c.push(y)}const s={type:"element",tagName:"tr",properties:{},children:e.wrap(c,!0)};return e.patch(t,s),e.applyData(t,s)}function lu(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const oi=9,li=32;function au(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),i=0;const o=[];for(;r;)o.push(ai(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return o.push(ai(t.slice(i),i>0,!1)),o.join("")}function ai(e,t,n){let r=0,i=e.length;if(t){let o=e.codePointAt(r);for(;o===oi||o===li;)r++,o=e.codePointAt(r)}if(n){let o=e.codePointAt(i-1);for(;o===oi||o===li;)i--,o=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function su(e,t){const n={type:"text",value:au(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function uu(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const cu={blockquote:Fs,break:Bs,code:Hs,delete:Us,emphasis:Vs,footnoteReference:Ws,heading:Ys,html:Ks,imageReference:qs,image:Gs,inlineCode:Xs,linkReference:Qs,link:Js,listItem:Zs,list:eu,paragraph:tu,root:nu,strong:ru,table:iu,tableCell:lu,tableRow:ou,text:su,thematicBreak:uu,toml:Lt,yaml:Lt,definition:Lt,footnoteDefinition:Lt};function Lt(){}const si=-1,jt=0,St=1,Nt=2,vn=3,Sn=4,En=5,Cn=6,ui=7,ci=8,fi=typeof self=="object"?self:globalThis,fu=(e,t)=>{const n=(i,o)=>(e.set(o,i),i),r=i=>{if(e.has(i))return e.get(i);const[o,l]=t[i];switch(o){case jt:case si:return n(l,i);case St:{const a=n([],i);for(const u of l)a.push(r(u));return a}case Nt:{const a=n({},i);for(const[u,c]of l)a[r(u)]=r(c);return a}case vn:return n(new Date(l),i);case Sn:{const{source:a,flags:u}=l;return n(new RegExp(a,u),i)}case En:{const a=n(new Map,i);for(const[u,c]of l)a.set(r(u),r(c));return a}case Cn:{const a=n(new Set,i);for(const u of l)a.add(r(u));return a}case ui:{const{name:a,message:u}=l;return n(new fi[a](u),i)}case ci:return n(BigInt(l),i);case"BigInt":return n(Object(BigInt(l)),i);case"ArrayBuffer":return n(new Uint8Array(l).buffer,l);case"DataView":{const{buffer:a}=new Uint8Array(l);return n(new DataView(a),l)}}return n(new fi[o](l),i)};return r},pi=e=>fu(new Map,e)(0),ut="",{toString:pu}={},{keys:hu}=Object,Et=e=>{const t=typeof e;if(t!=="object"||!e)return[jt,t];const n=pu.call(e).slice(8,-1);switch(n){case"Array":return[St,ut];case"Object":return[Nt,ut];case"Date":return[vn,ut];case"RegExp":return[Sn,ut];case"Map":return[En,ut];case"Set":return[Cn,ut];case"DataView":return[St,n]}return n.includes("Array")?[St,n]:n.includes("Error")?[ui,n]:[Nt,n]},Dt=([e,t])=>e===jt&&(t==="function"||t==="symbol"),du=(e,t,n,r)=>{const i=(l,a)=>{const u=r.push(l)-1;return n.set(a,u),u},o=l=>{if(n.has(l))return n.get(l);let[a,u]=Et(l);switch(a){case jt:{let s=l;switch(u){case"bigint":a=ci,s=l.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+u);s=null;break;case"undefined":return i([si],l)}return i([a,s],l)}case St:{if(u){let h=l;return u==="DataView"?h=new Uint8Array(l.buffer):u==="ArrayBuffer"&&(h=new Uint8Array(l)),i([u,[...h]],l)}const s=[],f=i([a,s],l);for(const h of l)s.push(o(h));return f}case Nt:{if(u)switch(u){case"BigInt":return i([u,l.toString()],l);case"Boolean":case"Number":case"String":return i([u,l.valueOf()],l)}if(t&&"toJSON"in l)return o(l.toJSON());const s=[],f=i([a,s],l);for(const h of hu(l))(e||!Dt(Et(l[h])))&&s.push([o(h),o(l[h])]);return f}case vn:return i([a,l.toISOString()],l);case Sn:{const{source:s,flags:f}=l;return i([a,{source:s,flags:f}],l)}case En:{const s=[],f=i([a,s],l);for(const[h,p]of l)(e||!(Dt(Et(h))||Dt(Et(p))))&&s.push([o(h),o(p)]);return f}case Cn:{const s=[],f=i([a,s],l);for(const h of l)(e||!Dt(Et(h)))&&s.push(o(h));return f}}const{message:c}=l;return i([a,{name:u,message:c}],l)};return o},hi=(e,{json:t,lossy:n}={})=>{const r=[];return du(!(t||n),!!t,new Map,r)(e),r},Mt=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?pi(hi(e,t)):structuredClone(e):(e,t)=>pi(hi(e,t));function mu(e,t){const n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function gu(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function yu(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||mu,r=e.options.footnoteBackLabel||gu,i=e.options.footnoteLabel||"Footnotes",o=e.options.footnoteLabelTagName||"h2",l=e.options.footnoteLabelProperties||{className:["sr-only"]},a=[];let u=-1;for(;++u<e.footnoteOrder.length;){const c=e.footnoteById.get(e.footnoteOrder[u]);if(!c)continue;const s=e.all(c),f=String(c.identifier).toUpperCase(),h=st(f.toLowerCase());let p=0;const y=[],x=e.footnoteCounts.get(f);for(;x!==void 0&&++p<=x;){y.length>0&&y.push({type:"text",value:" "});let A=typeof n=="string"?n:n(u,p);typeof A=="string"&&(A={type:"text",value:A}),y.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+h+(p>1?"-"+p:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(u,p),className:["data-footnote-backref"]},children:Array.isArray(A)?A:[A]})}const T=s[s.length-1];if(T&&T.type==="element"&&T.tagName==="p"){const A=T.children[T.children.length-1];A&&A.type==="text"?A.value+=" ":T.children.push({type:"text",value:" "}),T.children.push(...y)}else s.push(...y);const w={type:"element",tagName:"li",properties:{id:t+"fn-"+h},children:e.wrap(s,!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:o,properties:{...Mt(l),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:`
160
160
  `},{type:"element",tagName:"ol",properties:{},children:e.wrap(a,!0)},{type:"text",value:`
161
- `}]}}const hi=function(e){if(e==null)return ku;if(typeof e=="function")return zt(e);if(typeof e=="object")return Array.isArray(e)?xu(e):bu(e);if(typeof e=="string")return wu(e);throw new Error("Expected function, string, or object as test")};function xu(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=hi(e[n]);return zt(r);function r(...i){let o=-1;for(;++o<t.length;)if(t[o].apply(this,i))return!0;return!1}}function bu(e){const t=e;return zt(n);function n(r){const i=r;let o;for(o in e)if(i[o]!==t[o])return!1;return!0}}function wu(e){return zt(t);function t(n){return n&&n.type===e}}function zt(e){return t;function t(n,r,i){return!!(vu(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function ku(){return!0}function vu(e){return e!==null&&typeof e=="object"&&"type"in e}function Ic(e){return e}const di=[],Su=!0,mi=!1,Eu="skip";function Cu(e,t,n,r){let i;typeof t=="function"&&typeof n!="function"?(r=n,n=t):i=t;const o=hi(i),l=r?-1:1;a(e,void 0,[])();function a(u,c,s){const f=u&&typeof u=="object"?u:{};if(typeof f.type=="string"){const p=typeof f.tagName=="string"?f.tagName:typeof f.name=="string"?f.name:void 0;Object.defineProperty(h,"name",{value:"node ("+(u.type+(p?"<"+p+">":""))+")"})}return h;function h(){let p=di,y,x,T;if((!t||o(u,c,s[s.length-1]||void 0))&&(p=_u(n(u,s)),p[0]===mi))return p;if("children"in u&&u.children){const k=u;if(k.children&&p[0]!==Eu)for(x=(r?k.children.length:-1)+l,T=s.concat(k);x>-1&&x<k.children.length;){const R=k.children[x];if(y=a(R,x,T)(),y[0]===mi)return y;x=typeof y[1]=="number"?y[1]:x+l}}return p}}}function _u(e){return Array.isArray(e)?e:typeof e=="number"?[Su,e]:e==null?di:[e]}function gi(e,t,n,r){let i,o,l;typeof t=="function"?(o=void 0,l=t,i=n):(o=t,l=n,i=r),Cu(e,o,a,i);function a(u,c){const s=c[c.length-1],f=s?s.children.indexOf(u):void 0;return l(u,f,s)}}const En={}.hasOwnProperty,Tu={};function Iu(e,t){const n=t||Tu,r=new Map,i=new Map,o=new Map,l={...cu,...n.handlers},a={all:c,applyData:Ru,definitionById:r,footnoteById:i,footnoteCounts:o,footnoteOrder:[],handlers:l,one:u,options:n,patch:Au,wrap:Pu};return gi(e,function(s){if(s.type==="definition"||s.type==="footnoteDefinition"){const f=s.type==="definition"?r:i,h=String(s.identifier).toUpperCase();f.has(h)||f.set(h,s)}}),a;function u(s,f){const h=s.type,p=a.handlers[h];if(En.call(a.handlers,h)&&p)return p(a,s,f);if(a.options.passThrough&&a.options.passThrough.includes(h)){if("children"in s){const{children:x,...T}=s,k=Dt(T);return k.children=a.all(s),k}return Dt(s)}return(a.options.unknownHandler||Ou)(a,s,f)}function c(s){const f=[];if("children"in s){const h=s.children;let p=-1;for(;++p<h.length;){const y=a.one(h[p],s);if(y){if(p&&h[p-1].type==="break"&&(!Array.isArray(y)&&y.type==="text"&&(y.value=yi(y.value)),!Array.isArray(y)&&y.type==="element")){const x=y.children[0];x&&x.type==="text"&&(x.value=yi(x.value))}Array.isArray(y)?f.push(...y):f.push(y)}}}return f}}function Au(e,t){e.position&&(t.position=kl(e))}function Ru(e,t){let n=t;if(e&&e.data){const r=e.data.hName,i=e.data.hChildren,o=e.data.hProperties;if(typeof r=="string")if(n.type==="element")n.tagName=r;else{const l="children"in n?n.children:[n];n={type:"element",tagName:r,properties:{},children:l}}n.type==="element"&&o&&Object.assign(n.properties,Dt(o)),"children"in n&&n.children&&i!==null&&i!==void 0&&(n.children=i)}return n}function Ou(e,t){const n=t.data||{},r="value"in t&&!(En.call(n,"hProperties")||En.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function Pu(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
161
+ `}]}}const di=function(e){if(e==null)return ku;if(typeof e=="function")return zt(e);if(typeof e=="object")return Array.isArray(e)?xu(e):bu(e);if(typeof e=="string")return wu(e);throw new Error("Expected function, string, or object as test")};function xu(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=di(e[n]);return zt(r);function r(...i){let o=-1;for(;++o<t.length;)if(t[o].apply(this,i))return!0;return!1}}function bu(e){const t=e;return zt(n);function n(r){const i=r;let o;for(o in e)if(i[o]!==t[o])return!1;return!0}}function wu(e){return zt(t);function t(n){return n&&n.type===e}}function zt(e){return t;function t(n,r,i){return!!(vu(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function ku(){return!0}function vu(e){return e!==null&&typeof e=="object"&&"type"in e}function Ic(e){return e}const mi=[],Su=!0,gi=!1,Eu="skip";function Cu(e,t,n,r){let i;typeof t=="function"&&typeof n!="function"?(r=n,n=t):i=t;const o=di(i),l=r?-1:1;a(e,void 0,[])();function a(u,c,s){const f=u&&typeof u=="object"?u:{};if(typeof f.type=="string"){const p=typeof f.tagName=="string"?f.tagName:typeof f.name=="string"?f.name:void 0;Object.defineProperty(h,"name",{value:"node ("+(u.type+(p?"<"+p+">":""))+")"})}return h;function h(){let p=mi,y,x,T;if((!t||o(u,c,s[s.length-1]||void 0))&&(p=_u(n(u,s)),p[0]===gi))return p;if("children"in u&&u.children){const w=u;if(w.children&&p[0]!==Eu)for(x=(r?w.children.length:-1)+l,T=s.concat(w);x>-1&&x<w.children.length;){const A=w.children[x];if(y=a(A,x,T)(),y[0]===gi)return y;x=typeof y[1]=="number"?y[1]:x+l}}return p}}}function _u(e){return Array.isArray(e)?e:typeof e=="number"?[Su,e]:e==null?mi:[e]}function yi(e,t,n,r){let i,o,l;typeof t=="function"?(o=void 0,l=t,i=n):(o=t,l=n,i=r),Cu(e,o,a,i);function a(u,c){const s=c[c.length-1],f=s?s.children.indexOf(u):void 0;return l(u,f,s)}}const _n={}.hasOwnProperty,Tu={};function Iu(e,t){const n=t||Tu,r=new Map,i=new Map,o=new Map,l={...cu,...n.handlers},a={all:c,applyData:Ou,definitionById:r,footnoteById:i,footnoteCounts:o,footnoteOrder:[],handlers:l,one:u,options:n,patch:Au,wrap:Pu};return yi(e,function(s){if(s.type==="definition"||s.type==="footnoteDefinition"){const f=s.type==="definition"?r:i,h=String(s.identifier).toUpperCase();f.has(h)||f.set(h,s)}}),a;function u(s,f){const h=s.type,p=a.handlers[h];if(_n.call(a.handlers,h)&&p)return p(a,s,f);if(a.options.passThrough&&a.options.passThrough.includes(h)){if("children"in s){const{children:x,...T}=s,w=Mt(T);return w.children=a.all(s),w}return Mt(s)}return(a.options.unknownHandler||Ru)(a,s,f)}function c(s){const f=[];if("children"in s){const h=s.children;let p=-1;for(;++p<h.length;){const y=a.one(h[p],s);if(y){if(p&&h[p-1].type==="break"&&(!Array.isArray(y)&&y.type==="text"&&(y.value=xi(y.value)),!Array.isArray(y)&&y.type==="element")){const x=y.children[0];x&&x.type==="text"&&(x.value=xi(x.value))}Array.isArray(y)?f.push(...y):f.push(y)}}}return f}}function Au(e,t){e.position&&(t.position=kl(e))}function Ou(e,t){let n=t;if(e&&e.data){const r=e.data.hName,i=e.data.hChildren,o=e.data.hProperties;if(typeof r=="string")if(n.type==="element")n.tagName=r;else{const l="children"in n?n.children:[n];n={type:"element",tagName:r,properties:{},children:l}}n.type==="element"&&o&&Object.assign(n.properties,Mt(o)),"children"in n&&n.children&&i!==null&&i!==void 0&&(n.children=i)}return n}function Ru(e,t){const n=t.data||{},r="value"in t&&!(_n.call(n,"hProperties")||_n.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function Pu(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
162
162
  `});++r<e.length;)r&&n.push({type:"text",value:`
163
163
  `}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
164
- `}),n}function yi(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function xi(e,t){const n=Iu(e,t),r=n.one(e,void 0),i=yu(n),o=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&o.children.push({type:"text",value:`
165
- `},i),o}function Lu(e,t){return e&&"run"in e?async function(n,r){const i=xi(n,{file:r,...t});await e.run(i,r)}:function(n,r){return xi(n,{file:r,...e||t})}}function bi(e){if(e)throw e}var Ft=Object.prototype.hasOwnProperty,wi=Object.prototype.toString,ki=Object.defineProperty,vi=Object.getOwnPropertyDescriptor,Si=function(t){return typeof Array.isArray=="function"?Array.isArray(t):wi.call(t)==="[object Array]"},Ei=function(t){if(!t||wi.call(t)!=="[object Object]")return!1;var n=Ft.call(t,"constructor"),r=t.constructor&&t.constructor.prototype&&Ft.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!n&&!r)return!1;var i;for(i in t);return typeof i>"u"||Ft.call(t,i)},Ci=function(t,n){ki&&n.name==="__proto__"?ki(t,n.name,{enumerable:!0,configurable:!0,value:n.newValue,writable:!0}):t[n.name]=n.newValue},_i=function(t,n){if(n==="__proto__")if(Ft.call(t,n)){if(vi)return vi(t,n).value}else return;return t[n]},ju=function e(){var t,n,r,i,o,l,a=arguments[0],u=1,c=arguments.length,s=!1;for(typeof a=="boolean"&&(s=a,a=arguments[1]||{},u=2),(a==null||typeof a!="object"&&typeof a!="function")&&(a={});u<c;++u)if(t=arguments[u],t!=null)for(n in t)r=_i(a,n),i=_i(t,n),a!==i&&(s&&i&&(Ei(i)||(o=Si(i)))?(o?(o=!1,l=r&&Si(r)?r:[]):l=r&&Ei(r)?r:{},Ci(a,{name:n,newValue:e(s,l,i)})):typeof i<"u"&&Ci(a,{name:n,newValue:i}));return a};const Cn=Ht(ju);function _n(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function Nu(){const e=[],t={run:n,use:r};return t;function n(...i){let o=-1;const l=i.pop();if(typeof l!="function")throw new TypeError("Expected function as last argument, not "+l);a(null,...i);function a(u,...c){const s=e[++o];let f=-1;if(u){l(u);return}for(;++f<i.length;)(c[f]===null||c[f]===void 0)&&(c[f]=i[f]);i=c,s?Du(s,a)(...c):l(null,...c)}}function r(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),t}}function Du(e,t){let n;return r;function r(...l){const a=e.length>l.length;let u;a&&l.push(i);try{u=e.apply(this,l)}catch(c){const s=c;if(a&&n)throw s;return i(s)}a||(u&&u.then&&typeof u.then=="function"?u.then(o,i):u instanceof Error?i(u):o(u))}function i(l,...a){n||(n=!0,t(l,...a))}function o(l){i(null,l)}}const Ve={basename:zu,dirname:Fu,extname:Mu,join:Bu,sep:"/"};function zu(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Et(e);let n=0,r=-1,i=e.length,o;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(o){n=i+1;break}}else r<0&&(o=!0,r=i+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let l=-1,a=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(o){n=i+1;break}}else l<0&&(o=!0,l=i+1),a>-1&&(e.codePointAt(i)===t.codePointAt(a--)?a<0&&(r=i):(a=-1,r=l));return n===r?r=l:r<0&&(r=e.length),e.slice(n,r)}function Fu(e){if(Et(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function Mu(e){Et(e);let t=e.length,n=-1,r=0,i=-1,o=0,l;for(;t--;){const a=e.codePointAt(t);if(a===47){if(l){r=t+1;break}continue}n<0&&(l=!0,n=t+1),a===46?i<0?i=t:o!==1&&(o=1):i>-1&&(o=-1)}return i<0||n<0||o===0||o===1&&i===n-1&&i===r+1?"":e.slice(i,n)}function Bu(...e){let t=-1,n;for(;++t<e.length;)Et(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":Uu(n)}function Uu(e){Et(e);const t=e.codePointAt(0)===47;let n=Hu(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function Hu(e,t){let n="",r=0,i=-1,o=0,l=-1,a,u;for(;++l<=e.length;){if(l<e.length)a=e.codePointAt(l);else{if(a===47)break;a=47}if(a===47){if(!(i===l-1||o===1))if(i!==l-1&&o===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(u=n.lastIndexOf("/"),u!==n.length-1){u<0?(n="",r=0):(n=n.slice(0,u),r=n.length-1-n.lastIndexOf("/")),i=l,o=0;continue}}else if(n.length>0){n="",r=0,i=l,o=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(i+1,l):n=e.slice(i+1,l),r=l-i-1;i=l,o=0}else a===46&&o>-1?o++:o=-1}return n}function Et(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const Vu={cwd:Wu};function Wu(){return"/"}function Tn(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function Yu(e){if(typeof e=="string")e=new URL(e);else if(!Tn(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return qu(e)}function qu(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const r=t.codePointAt(n+2);if(r===70||r===102){const i=new TypeError("File URL path must not include encoded / characters");throw i.code="ERR_INVALID_FILE_URL_PATH",i}}return decodeURIComponent(t)}const In=["history","path","basename","stem","extname","dirname"];class Ti{constructor(t){let n;t?Tn(t)?n={path:t}:typeof t=="string"||Gu(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":Vu.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<In.length;){const o=In[r];o in n&&n[o]!==void 0&&n[o]!==null&&(this[o]=o==="history"?[...n[o]]:n[o])}let i;for(i in n)In.includes(i)||(this[i]=n[i])}get basename(){return typeof this.path=="string"?Ve.basename(this.path):void 0}set basename(t){Rn(t,"basename"),An(t,"basename"),this.path=Ve.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?Ve.dirname(this.path):void 0}set dirname(t){Ii(this.basename,"dirname"),this.path=Ve.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?Ve.extname(this.path):void 0}set extname(t){if(An(t,"extname"),Ii(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=Ve.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){Tn(t)&&(t=Yu(t)),Rn(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?Ve.basename(this.path,this.extname):void 0}set stem(t){Rn(t,"stem"),An(t,"stem"),this.path=Ve.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const i=this.message(t,n,r);throw i.fatal=!0,i}info(t,n,r){const i=this.message(t,n,r);return i.fatal=void 0,i}message(t,n,r){const i=new ge(t,n,r);return this.path&&(i.name=this.path+":"+i.name,i.file=this.path),i.fatal=!1,this.messages.push(i),i}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function An(e,t){if(e&&e.includes(Ve.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Ve.sep+"`")}function Rn(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function Ii(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function Gu(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const Ku=function(e){const r=this.constructor.prototype,i=r[e],o=function(){return i.apply(o,arguments)};return Object.setPrototypeOf(o,r),o},Xu={}.hasOwnProperty;class On extends Ku{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=Nu()}copy(){const t=new On;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(Cn(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(jn("data",this.frozen),this.namespace[t]=n,this):Xu.call(this.namespace,t)&&this.namespace[t]||void 0:t?(jn("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const i=n.call(t,...r);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=Mt(t),r=this.parser||this.Parser;return Pn("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),Pn("process",this.parser||this.Parser),Ln("process",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(o,l){const a=Mt(t),u=r.parse(a);r.run(u,a,function(s,f,h){if(s||!f||!h)return c(s);const p=f,y=r.stringify(p,h);Zu(y)?h.value=y:h.result=y,c(s,h)});function c(s,f){s||!f?l(s):o?o(f):n(void 0,f)}}}processSync(t){let n=!1,r;return this.freeze(),Pn("processSync",this.parser||this.Parser),Ln("processSync",this.compiler||this.Compiler),this.process(t,i),Ri("processSync","process",n),r;function i(o,l){n=!0,bi(o),r=l}}run(t,n,r){Ai(t),this.freeze();const i=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?o(void 0,r):new Promise(o);function o(l,a){const u=Mt(n);i.run(t,u,c);function c(s,f,h){const p=f||t;s?a(s):l?l(p):r(void 0,p,h)}}}runSync(t,n){let r=!1,i;return this.run(t,n,o),Ri("runSync","run",r),i;function o(l,a){bi(l),i=a,r=!0}}stringify(t,n){this.freeze();const r=Mt(n),i=this.compiler||this.Compiler;return Ln("stringify",i),Ai(t),i(t,r)}use(t,...n){const r=this.attachers,i=this.namespace;if(jn("use",this.frozen),t!=null)if(typeof t=="function")u(t,n);else if(typeof t=="object")Array.isArray(t)?a(t):l(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function o(c){if(typeof c=="function")u(c,[]);else if(typeof c=="object")if(Array.isArray(c)){const[s,...f]=c;u(s,f)}else l(c);else throw new TypeError("Expected usable value, not `"+c+"`")}function l(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=Cn(!0,i.settings,c.settings))}function a(c){let s=-1;if(c!=null)if(Array.isArray(c))for(;++s<c.length;){const f=c[s];o(f)}else throw new TypeError("Expected a list of plugins, not `"+c+"`")}function u(c,s){let f=-1,h=-1;for(;++f<r.length;)if(r[f][0]===c){h=f;break}if(h===-1)r.push([c,...s]);else if(s.length>0){let[p,...y]=s;const x=r[h][1];_n(x)&&_n(p)&&(p=Cn(!0,x,p)),r[h]=[c,p,...y]}}}}const Qu=new On().freeze();function Pn(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Ln(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function jn(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function Ai(e){if(!_n(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function Ri(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Mt(e){return Ju(e)?e:new Ti(e)}function Ju(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function Zu(e){return typeof e=="string"||$u(e)}function $u(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const ec="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",Oi=[],Pi={allowDangerousHtml:!0},tc=/^(https?|ircs?|mailto|xmpp)$/i,nc=[{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 Li(e){const t=rc(e),n=ic(e);return oc(t.runSync(t.parse(n),n),e)}function rc(e){const t=e.rehypePlugins||Oi,n=e.remarkPlugins||Oi,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...Pi}:Pi;return Qu().use(Fs).use(n).use(Lu,r).use(t)}function ic(e){const t=e.children||"",n=new Ti;return typeof t=="string"&&(n.value=t),n}function oc(e,t){const n=t.allowedElements,r=t.allowElement,i=t.components,o=t.disallowedElements,l=t.skipHtml,a=t.unwrapDisallowed,u=t.urlTransform||lc;for(const s of nc)Object.hasOwn(t,s.from)&&(""+s.from+(s.to?"use `"+s.to+"` instead":"remove it")+ec+s.id,void 0);return t.className&&(e={type:"element",tagName:"div",properties:{className:t.className},children:e.type==="root"?e.children:[e]}),gi(e,c),_l(e,{Fragment:E.Fragment,components:i,ignoreInvalidStyle:!0,jsx:E.jsx,jsxs:E.jsxs,passKeys:!0,passNode:!0});function c(s,f,h){if(s.type==="raw"&&h&&typeof f=="number")return l?h.children.splice(f,1):h.children[f]={type:"text",value:s.value},f;if(s.type==="element"){let p;for(p in fn)if(Object.hasOwn(fn,p)&&Object.hasOwn(s.properties,p)){const y=s.properties[p],x=fn[p];(x===null||x.includes(s.tagName))&&(s.properties[p]=u(String(y||""),p,s))}}if(s.type==="element"){let p=n?!n.includes(s.tagName):o?o.includes(s.tagName):!1;if(!p&&r&&typeof f=="number"&&(p=!r(s,f,h)),p&&h&&typeof f=="number")return a&&s.children?h.children.splice(f,1,...s.children):h.children.splice(f,1),f}}}function lc(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),i=e.indexOf("/");return t===-1||i!==-1&&t>i||n!==-1&&t>n||r!==-1&&t>r||tc.test(e.slice(0,t))?e:""}function ji(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=ji(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function ct(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=ji(e))&&(r&&(r+=" "),r+=t);return r}const Ni={primary:"#EC994B",secondary:"#1E3A8A",background:"#FFFFFF",text:{primary:"#1F2937",inverse:"#FFFFFF"},input:{background:"#F9FAFB",border:"#E5E7EB"},message:{user:"#1E3A8A",userText:"#FFFFFF",assistant:"#FFFFFF"},suggestedQuestions:{background:"#F3F4F6",text:"#1F2937",hoverBackground:"#E5E7EB"},iconColor:"#EC994B"},Xe=()=>({header:{title:"AI Assistant"},theme:Ni,welcome:{title:"Hello! How can I help you today?",description:"I'm your AI assistant, ready to help with any questions you might have."},suggestedQuestions:[{text:"What can you help me with?",query:"What can you help me with?"},{text:"Tell me about your features",query:"Tell me about your features"},{text:"How do I get started?",query:"How do I get started?"}],icon:"sparkles"}),Di=e=>E.jsx("a",{...e,target:"_blank",rel:"noopener noreferrer",className:"text-orange-500 hover:text-orange-700 underline",children:e.children}),Nn=({iconName:e,size:t,className:n,style:r})=>{switch(e){case"heart":return E.jsx(ro,{size:t,className:n,style:r});case"message-circle":return E.jsx(Yn,{size:t,className:n,style:r});case"help-circle":return E.jsx(io,{size:t,className:n,style:r});case"info":return E.jsx(oo,{size:t,className:n,style:r});case"bot":return E.jsx(Zi,{size:t,className:n,style:r});case"sparkles":return E.jsx(so,{size:t,className:n,style:r});case"message-square":default:return E.jsx(lo,{size:t,className:n,style:r})}},Bt=e=>{const[t,n]=N.useState(!1),[r,i]=N.useState(""),[o,l]=N.useState(!1),[a,u]=N.useState(!1),c=N.useRef(null),s=N.useRef(null),f=250,h=N.useRef(null),[p,y]=N.useState(!1),[x,T]=N.useState(!1),[k,R]=N.useState(!1),[_,H]=N.useState(!1),V=N.useRef(new Set),w=N.useRef(!0),j=N.useRef(),G=N.useRef(null),W=N.useRef(!1),[Z,O]=N.useState(!1),[P,$]=N.useState(null),[K,M]=N.useState(window.innerWidth);N.useEffect(()=>{const A=()=>M(window.innerWidth);return window.addEventListener("resize",A),()=>window.removeEventListener("resize",A)},[]);const oe=Xe(),[te,de]=N.useState({...oe,...e}),F=te.theme||Ni;N.useEffect(()=>{const A=Y=>{de(Y.detail)};return window.addEventListener("chatbot-config-update",A),()=>{window.removeEventListener("chatbot-config-update",A)}},[]),N.useEffect(()=>{e&&de(A=>({...A,...e}))},[e]);const{messages:d,isLoading:le,sendMessage:be,clearMessages:g}=Jt();N.useEffect(()=>{d.length===0&&V.current.clear()},[d.length]);const me=()=>{n(!t),t||(l(!1),setTimeout(()=>pe(!0),100))},De=()=>{r.trim()&&!le&&(w.current=!0,be(r),i(""),setTimeout(()=>pe(!0),100))},ae=A=>{A.key==="Enter"&&!A.shiftKey&&(A.preventDefault(),De())},Fe=async(A,Y)=>{try{await navigator.clipboard.writeText(A),$(Y),setTimeout(()=>{$(null)},2e3)}catch(se){console.error("Failed to copy text: ",se)}},we=A=>{const Y=/(https?:\/\/[^\s]+?)([.,;:!?)]*)(?=\s|$)/g;return A.replace(Y,(ye,Ae,ke)=>`[${Ae}](${Ae})${ke}`).replace(/\n{2,}/g,`
164
+ `}),n}function xi(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function bi(e,t){const n=Iu(e,t),r=n.one(e,void 0),i=yu(n),o=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&o.children.push({type:"text",value:`
165
+ `},i),o}function Lu(e,t){return e&&"run"in e?async function(n,r){const i=bi(n,{file:r,...t});await e.run(i,r)}:function(n,r){return bi(n,{file:r,...e||t})}}function wi(e){if(e)throw e}var Ft=Object.prototype.hasOwnProperty,ki=Object.prototype.toString,vi=Object.defineProperty,Si=Object.getOwnPropertyDescriptor,Ei=function(t){return typeof Array.isArray=="function"?Array.isArray(t):ki.call(t)==="[object Array]"},Ci=function(t){if(!t||ki.call(t)!=="[object Object]")return!1;var n=Ft.call(t,"constructor"),r=t.constructor&&t.constructor.prototype&&Ft.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!n&&!r)return!1;var i;for(i in t);return typeof i>"u"||Ft.call(t,i)},_i=function(t,n){vi&&n.name==="__proto__"?vi(t,n.name,{enumerable:!0,configurable:!0,value:n.newValue,writable:!0}):t[n.name]=n.newValue},Ti=function(t,n){if(n==="__proto__")if(Ft.call(t,n)){if(Si)return Si(t,n).value}else return;return t[n]},ju=function e(){var t,n,r,i,o,l,a=arguments[0],u=1,c=arguments.length,s=!1;for(typeof a=="boolean"&&(s=a,a=arguments[1]||{},u=2),(a==null||typeof a!="object"&&typeof a!="function")&&(a={});u<c;++u)if(t=arguments[u],t!=null)for(n in t)r=Ti(a,n),i=Ti(t,n),a!==i&&(s&&i&&(Ci(i)||(o=Ei(i)))?(o?(o=!1,l=r&&Ei(r)?r:[]):l=r&&Ci(r)?r:{},_i(a,{name:n,newValue:e(s,l,i)})):typeof i<"u"&&_i(a,{name:n,newValue:i}));return a};const Tn=Ut(ju);function In(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function Nu(){const e=[],t={run:n,use:r};return t;function n(...i){let o=-1;const l=i.pop();if(typeof l!="function")throw new TypeError("Expected function as last argument, not "+l);a(null,...i);function a(u,...c){const s=e[++o];let f=-1;if(u){l(u);return}for(;++f<i.length;)(c[f]===null||c[f]===void 0)&&(c[f]=i[f]);i=c,s?Du(s,a)(...c):l(null,...c)}}function r(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),t}}function Du(e,t){let n;return r;function r(...l){const a=e.length>l.length;let u;a&&l.push(i);try{u=e.apply(this,l)}catch(c){const s=c;if(a&&n)throw s;return i(s)}a||(u&&u.then&&typeof u.then=="function"?u.then(o,i):u instanceof Error?i(u):o(u))}function i(l,...a){n||(n=!0,t(l,...a))}function o(l){i(null,l)}}const Ve={basename:Mu,dirname:zu,extname:Fu,join:Bu,sep:"/"};function Mu(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Ct(e);let n=0,r=-1,i=e.length,o;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(o){n=i+1;break}}else r<0&&(o=!0,r=i+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let l=-1,a=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(o){n=i+1;break}}else l<0&&(o=!0,l=i+1),a>-1&&(e.codePointAt(i)===t.codePointAt(a--)?a<0&&(r=i):(a=-1,r=l));return n===r?r=l:r<0&&(r=e.length),e.slice(n,r)}function zu(e){if(Ct(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function Fu(e){Ct(e);let t=e.length,n=-1,r=0,i=-1,o=0,l;for(;t--;){const a=e.codePointAt(t);if(a===47){if(l){r=t+1;break}continue}n<0&&(l=!0,n=t+1),a===46?i<0?i=t:o!==1&&(o=1):i>-1&&(o=-1)}return i<0||n<0||o===0||o===1&&i===n-1&&i===r+1?"":e.slice(i,n)}function Bu(...e){let t=-1,n;for(;++t<e.length;)Ct(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":Hu(n)}function Hu(e){Ct(e);const t=e.codePointAt(0)===47;let n=Uu(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function Uu(e,t){let n="",r=0,i=-1,o=0,l=-1,a,u;for(;++l<=e.length;){if(l<e.length)a=e.codePointAt(l);else{if(a===47)break;a=47}if(a===47){if(!(i===l-1||o===1))if(i!==l-1&&o===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(u=n.lastIndexOf("/"),u!==n.length-1){u<0?(n="",r=0):(n=n.slice(0,u),r=n.length-1-n.lastIndexOf("/")),i=l,o=0;continue}}else if(n.length>0){n="",r=0,i=l,o=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(i+1,l):n=e.slice(i+1,l),r=l-i-1;i=l,o=0}else a===46&&o>-1?o++:o=-1}return n}function Ct(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const Vu={cwd:Wu};function Wu(){return"/"}function An(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function Yu(e){if(typeof e=="string")e=new URL(e);else if(!An(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return Ku(e)}function Ku(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const r=t.codePointAt(n+2);if(r===70||r===102){const i=new TypeError("File URL path must not include encoded / characters");throw i.code="ERR_INVALID_FILE_URL_PATH",i}}return decodeURIComponent(t)}const On=["history","path","basename","stem","extname","dirname"];class Ii{constructor(t){let n;t?An(t)?n={path:t}:typeof t=="string"||qu(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":Vu.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<On.length;){const o=On[r];o in n&&n[o]!==void 0&&n[o]!==null&&(this[o]=o==="history"?[...n[o]]:n[o])}let i;for(i in n)On.includes(i)||(this[i]=n[i])}get basename(){return typeof this.path=="string"?Ve.basename(this.path):void 0}set basename(t){Pn(t,"basename"),Rn(t,"basename"),this.path=Ve.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?Ve.dirname(this.path):void 0}set dirname(t){Ai(this.basename,"dirname"),this.path=Ve.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?Ve.extname(this.path):void 0}set extname(t){if(Rn(t,"extname"),Ai(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=Ve.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){An(t)&&(t=Yu(t)),Pn(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?Ve.basename(this.path,this.extname):void 0}set stem(t){Pn(t,"stem"),Rn(t,"stem"),this.path=Ve.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const i=this.message(t,n,r);throw i.fatal=!0,i}info(t,n,r){const i=this.message(t,n,r);return i.fatal=void 0,i}message(t,n,r){const i=new ye(t,n,r);return this.path&&(i.name=this.path+":"+i.name,i.file=this.path),i.fatal=!1,this.messages.push(i),i}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function Rn(e,t){if(e&&e.includes(Ve.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Ve.sep+"`")}function Pn(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function Ai(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function qu(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const Gu=function(e){const r=this.constructor.prototype,i=r[e],o=function(){return i.apply(o,arguments)};return Object.setPrototypeOf(o,r),o},Xu={}.hasOwnProperty;class Ln extends Gu{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=Nu()}copy(){const t=new Ln;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(Tn(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(Dn("data",this.frozen),this.namespace[t]=n,this):Xu.call(this.namespace,t)&&this.namespace[t]||void 0:t?(Dn("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const i=n.call(t,...r);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=Bt(t),r=this.parser||this.Parser;return jn("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),jn("process",this.parser||this.Parser),Nn("process",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(o,l){const a=Bt(t),u=r.parse(a);r.run(u,a,function(s,f,h){if(s||!f||!h)return c(s);const p=f,y=r.stringify(p,h);Zu(y)?h.value=y:h.result=y,c(s,h)});function c(s,f){s||!f?l(s):o?o(f):n(void 0,f)}}}processSync(t){let n=!1,r;return this.freeze(),jn("processSync",this.parser||this.Parser),Nn("processSync",this.compiler||this.Compiler),this.process(t,i),Ri("processSync","process",n),r;function i(o,l){n=!0,wi(o),r=l}}run(t,n,r){Oi(t),this.freeze();const i=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?o(void 0,r):new Promise(o);function o(l,a){const u=Bt(n);i.run(t,u,c);function c(s,f,h){const p=f||t;s?a(s):l?l(p):r(void 0,p,h)}}}runSync(t,n){let r=!1,i;return this.run(t,n,o),Ri("runSync","run",r),i;function o(l,a){wi(l),i=a,r=!0}}stringify(t,n){this.freeze();const r=Bt(n),i=this.compiler||this.Compiler;return Nn("stringify",i),Oi(t),i(t,r)}use(t,...n){const r=this.attachers,i=this.namespace;if(Dn("use",this.frozen),t!=null)if(typeof t=="function")u(t,n);else if(typeof t=="object")Array.isArray(t)?a(t):l(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function o(c){if(typeof c=="function")u(c,[]);else if(typeof c=="object")if(Array.isArray(c)){const[s,...f]=c;u(s,f)}else l(c);else throw new TypeError("Expected usable value, not `"+c+"`")}function l(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=Tn(!0,i.settings,c.settings))}function a(c){let s=-1;if(c!=null)if(Array.isArray(c))for(;++s<c.length;){const f=c[s];o(f)}else throw new TypeError("Expected a list of plugins, not `"+c+"`")}function u(c,s){let f=-1,h=-1;for(;++f<r.length;)if(r[f][0]===c){h=f;break}if(h===-1)r.push([c,...s]);else if(s.length>0){let[p,...y]=s;const x=r[h][1];In(x)&&In(p)&&(p=Tn(!0,x,p)),r[h]=[c,p,...y]}}}}const Qu=new Ln().freeze();function jn(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Nn(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Dn(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function Oi(e){if(!In(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function Ri(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Bt(e){return Ju(e)?e:new Ii(e)}function Ju(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function Zu(e){return typeof e=="string"||$u(e)}function $u(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const ec="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",Pi=[],Li={allowDangerousHtml:!0},tc=/^(https?|ircs?|mailto|xmpp)$/i,nc=[{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 ji(e){const t=rc(e),n=ic(e);return oc(t.runSync(t.parse(n),n),e)}function rc(e){const t=e.rehypePlugins||Pi,n=e.remarkPlugins||Pi,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...Li}:Li;return Qu().use(zs).use(n).use(Lu,r).use(t)}function ic(e){const t=e.children||"",n=new Ii;return typeof t=="string"&&(n.value=t),n}function oc(e,t){const n=t.allowedElements,r=t.allowElement,i=t.components,o=t.disallowedElements,l=t.skipHtml,a=t.unwrapDisallowed,u=t.urlTransform||lc;for(const s of nc)Object.hasOwn(t,s.from)&&(""+s.from+(s.to?"use `"+s.to+"` instead":"remove it")+ec+s.id,void 0);return t.className&&(e={type:"element",tagName:"div",properties:{className:t.className},children:e.type==="root"?e.children:[e]}),yi(e,c),_l(e,{Fragment:E.Fragment,components:i,ignoreInvalidStyle:!0,jsx:E.jsx,jsxs:E.jsxs,passKeys:!0,passNode:!0});function c(s,f,h){if(s.type==="raw"&&h&&typeof f=="number")return l?h.children.splice(f,1):h.children[f]={type:"text",value:s.value},f;if(s.type==="element"){let p;for(p in hn)if(Object.hasOwn(hn,p)&&Object.hasOwn(s.properties,p)){const y=s.properties[p],x=hn[p];(x===null||x.includes(s.tagName))&&(s.properties[p]=u(String(y||""),p,s))}}if(s.type==="element"){let p=n?!n.includes(s.tagName):o?o.includes(s.tagName):!1;if(!p&&r&&typeof f=="number"&&(p=!r(s,f,h)),p&&h&&typeof f=="number")return a&&s.children?h.children.splice(f,1,...s.children):h.children.splice(f,1),f}}}function lc(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),i=e.indexOf("/");return t===-1||i!==-1&&t>i||n!==-1&&t>n||r!==-1&&t>r||tc.test(e.slice(0,t))?e:""}function Ni(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=Ni(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function ct(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=Ni(e))&&(r&&(r+=" "),r+=t);return r}const Di={primary:"#EC994B",secondary:"#1E3A8A",background:"#FFFFFF",text:{primary:"#1F2937",inverse:"#FFFFFF"},input:{background:"#F9FAFB",border:"#E5E7EB"},message:{user:"#1E3A8A",userText:"#FFFFFF",assistant:"#FFFFFF"},suggestedQuestions:{background:"#F3F4F6",text:"#1F2937",hoverBackground:"#E5E7EB"},iconColor:"#EC994B"},Xe=()=>({header:{title:"AI Assistant"},theme:Di,welcome:{title:"Hello! How can I help you today?",description:"I'm your AI assistant, ready to help with any questions you might have."},suggestedQuestions:[{text:"What can you help me with?",query:"What can you help me with?"},{text:"Tell me about your features",query:"Tell me about your features"},{text:"How do I get started?",query:"How do I get started?"}],icon:"sparkles"}),Mi=e=>E.jsx("a",{...e,target:"_blank",rel:"noopener noreferrer",className:"text-orange-500 hover:text-orange-700 underline",children:e.children}),Mn=({iconName:e,size:t,className:n,style:r})=>{switch(e){case"heart":return E.jsx(io,{size:t,className:n,style:r});case"message-circle":return E.jsx(Gn,{size:t,className:n,style:r});case"help-circle":return E.jsx(oo,{size:t,className:n,style:r});case"info":return E.jsx(lo,{size:t,className:n,style:r});case"bot":return E.jsx($i,{size:t,className:n,style:r});case"sparkles":return E.jsx(uo,{size:t,className:n,style:r});case"message-square":default:return E.jsx(ao,{size:t,className:n,style:r})}},Ht=e=>{const[t,n]=N.useState(!1),[r,i]=N.useState(""),[o,l]=N.useState(!1),[a,u]=N.useState(!1),c=N.useRef(null),s=N.useRef(null),f=250,h=N.useRef(null),[p,y]=N.useState(!1),[x,T]=N.useState(!1),[w,A]=N.useState(!1),[_,H]=N.useState(!1),F=N.useRef(new Set),k=N.useRef(!0),R=N.useRef(),Y=N.useRef(null),V=N.useRef(!1),[Z,P]=N.useState(!1),[L,$]=N.useState(null),[G,B]=N.useState(window.innerWidth);N.useEffect(()=>{const O=()=>B(window.innerWidth);return window.addEventListener("resize",O),()=>window.removeEventListener("resize",O)},[]);const oe=Xe(),[te,de]=N.useState({...oe,...e}),z=te.theme||Di;N.useEffect(()=>{const O=K=>{de(K.detail)};return window.addEventListener("chatbot-config-update",O),()=>{window.removeEventListener("chatbot-config-update",O)}},[]),N.useEffect(()=>{e&&de(O=>({...O,...e}))},[e]);const{messages:d,isLoading:le,sendMessage:we,clearMessages:g}=Zt();N.useEffect(()=>{d.length===0&&F.current.clear()},[d.length]);const me=()=>{n(!t),t||(l(!1),setTimeout(()=>pe(!0),100))},De=()=>{r.trim()&&!le&&(k.current=!0,we(r),i(""),setTimeout(()=>pe(!0),100))},ae=O=>{O.key==="Enter"&&!O.shiftKey&&(O.preventDefault(),De())},ze=async(O,K)=>{try{await navigator.clipboard.writeText(O),$(K),setTimeout(()=>{$(null)},2e3)}catch(se){console.error("Failed to copy text: ",se)}},ke=O=>{const K=/(https?:\/\/[^\s]+?)([.,;:!?)]*)(?=\s|$)/g;return O.replace(K,(xe,Ae,ve)=>`[${Ae}](${Ae})${ve}`).replace(/\n{2,}/g,`
166
166
 
167
167
  `).replace(/\n/g,`
168
- `)},Le=A=>A.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"}),pe=(A=!1)=>{if(h.current){const{scrollHeight:Y}=h.current;h.current.scrollTo({top:Y,behavior:A?"auto":"smooth"}),setTimeout(()=>{je()},A?0:300)}},je=()=>{if(h.current&&!Z){const{scrollTop:A,scrollHeight:Y,clientHeight:se}=h.current,ye=Math.abs(Y-A-se)<10,Ae=A<10;y(!Ae&&A>200),T(!ye)}},Ct=()=>{h.current&&(H(!0),h.current.scrollTo({top:0,behavior:"smooth"}),setTimeout(()=>{H(!1),je()},300))},ft=A=>{const Y=A.target.value;Y.length<=f&&i(Y)},_t=A=>{V.current.add(A),A===d.length-1&&(O(!1),setTimeout(()=>pe(),50))},$e=A=>V.current.has(A);N.useEffect(()=>{(le||d.length===0)&&pe(!0)},[d,le]),N.useEffect(()=>{t&&s.current&&s.current.focus()},[t]),N.useEffect(()=>()=>{j.current&&clearTimeout(j.current)},[]);const Ye=({content:A,onComplete:Y,messageIndex:se,inputRef:ye})=>{const[Ae,ke]=N.useState(""),[et,tt]=N.useState(!0);N.useRef(0);const We=N.useRef(!1),b=N.useRef();return N.useEffect(()=>{if($e(se)){ke(A),tt(!1),Y();return}if(!We.current){We.current=!0,W.current=!0,O(!0);let v=0,L=0;const U=Q=>{if(v<A.length){const xe=A.slice(0,v+1);ke(xe),v===0&&tt(!1),Q-L>100&&(pe(),L=Q),v++,b.current=requestAnimationFrame(U)}else W.current=!1,Y(),We.current=!1,O(!1),pe()};b.current=requestAnimationFrame(U)}return()=>{b.current&&cancelAnimationFrame(b.current),We.current=!1,W.current=!1,O(!1)}},[A,se,Y]),N.useEffect(()=>{const v=()=>{We.current&&(b.current&&cancelAnimationFrame(b.current),ke(A),tt(!1),Y(),We.current=!1,W.current=!1,O(!1),pe())},L=ye.current||document.querySelector("textarea");return L&&L.addEventListener("input",v),()=>{L&&L.removeEventListener("input",v)}},[A,Y,ye]),E.jsxs(E.Fragment,{children:[Ae&&E.jsx("div",{className:"prose prose-base max-w-full whitespace-pre-wrap",style:{overflowWrap:"anywhere",wordBreak:"break-word",width:"100%",maxWidth:"100%",fontSize:"16px"},children:E.jsx(Li,{components:{a:v=>E.jsx(Di,{...v}),p:v=>E.jsx("p",{className:"mb-4",style:{overflowWrap:"anywhere",wordBreak:"break-word"},...v}),code:v=>E.jsx("code",{style:{display:"block",whiteSpace:"pre-wrap",overflowX:"auto",overflowWrap:"anywhere"},...v})},children:we(Ae)})}),et&&E.jsxs("div",{className:"text-gray-500",children:[E.jsx("span",{className:"font-medium",children:"Thinking"}),E.jsxs("span",{className:"animate-dots ml-1",children:[E.jsx("span",{className:"dot",children:"."}),E.jsx("span",{className:"dot",children:"."}),E.jsx("span",{className:"dot",children:"."})]})]})]})};return E.jsxs("div",{className:"fixed bottom-4 right-4 z-50 flex flex-col items-end font-sans",style:{fontFamily:'Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif'},children:[t&&E.jsxs("div",{className:"mb-4 w-full sm:w-[500px] md:w-[650px] lg:w-[700px] rounded-xl shadow-xl flex flex-col overflow-hidden border border-gray-200 transition-all duration-300 ease-in-out",style:{background:F.background,height:"650px",maxHeight:"calc(100vh - 100px)",width:K<640?"100%":K<768?"500px":K<1024?"650px":"700px",minWidth:K<640?"100%":"500px"},children:[E.jsxs("div",{className:"p-4 flex justify-between items-center shrink-0",style:{background:F.primary,color:F.text.inverse},children:[E.jsxs("div",{className:"flex items-center",children:[E.jsx(Nn,{iconName:te.icon,size:32,className:"mr-3",style:{color:F.secondary}}),E.jsx("h3",{className:"text-xl font-medium",children:te.header.title})]}),E.jsxs("div",{className:"flex items-center space-x-3",children:[E.jsx("button",{onClick:()=>{g(),V.current.clear()},className:"transition-colors p-2 rounded-full hover:bg-opacity-20 hover:bg-black",style:{color:F.text.inverse},"aria-label":"Clear conversation",title:"Clear conversation",children:E.jsx(uo,{size:20})}),E.jsx("button",{onClick:me,className:"transition-colors p-2 rounded-full hover:bg-opacity-20 hover:bg-black",style:{color:F.text.inverse},"aria-label":"Minimize chat",children:E.jsx(qn,{size:20})})]})]}),E.jsxs("div",{ref:h,className:"flex-1 p-4 overflow-y-auto scroll-smooth relative messages-container",style:{background:F.input.background,overflowY:"auto"},onScroll:je,children:[p&&E.jsx("button",{onClick:Ct,className:"sticky top-3 left-[calc(100%-48px)] z-10 flex items-center justify-center p-2 rounded-full shadow-md",style:{backgroundColor:F.primary,color:F.text.inverse},"aria-label":"Scroll to top",title:"Scroll to top",children:E.jsx(to,{size:20})}),x&&!Z&&E.jsx("button",{onClick:()=>pe(),className:"sticky bottom-3 left-[calc(100%-48px)] z-10 flex items-center justify-center p-2 rounded-full shadow-md",style:{backgroundColor:F.primary,color:F.text.inverse},"aria-label":"Scroll to bottom",title:"Scroll to bottom",children:E.jsx(eo,{size:20})}),d.length===0?E.jsxs("div",{className:"text-center py-16",children:[E.jsx(Nn,{iconName:te.icon,size:56,className:"mx-auto mb-4",style:{color:F.iconColor}}),E.jsx("h4",{className:"font-medium text-xl text-[#2C3E50] mb-2",children:te.welcome.title}),E.jsx("p",{className:"text-lg text-gray-600 mb-6",children:te.welcome.description}),E.jsx("div",{className:"w-full px-4",children:te.suggestedQuestions.map((A,Y)=>E.jsxs("button",{onClick:()=>{be(A.query),setTimeout(()=>{s.current&&s.current.focus()},100)},className:"w-full text-left text-base p-3 rounded-lg transition-colors mb-3 flex items-center",style:{backgroundColor:F.suggestedQuestions.background,color:F.suggestedQuestions.text},onMouseEnter:se=>{se.currentTarget.style.backgroundColor=F.suggestedQuestions.hoverBackground},onMouseLeave:se=>{se.currentTarget.style.backgroundColor=F.suggestedQuestions.background},children:[E.jsx(Yn,{size:20,className:"mr-2 flex-shrink-0"}),E.jsx("span",{children:A.text})]},Y))})]}):E.jsxs("div",{className:"space-y-5",children:[d.map((A,Y)=>{const se=new Date;se.setMinutes(se.getMinutes()-(d.length-Y));const ye=A.role==="assistant"&&Y===d.length-1,Ae=ye&&le;return E.jsx("div",{className:ct("flex",A.role==="user"?"justify-end":"justify-start"),ref:Y===d.length-1?G:null,children:E.jsxs("div",{className:ct("max-w-[85%] rounded-xl p-4 shadow-sm",A.role==="user"?"rounded-tr-none":"rounded-tl-none"),style:{background:A.role==="user"?F.message.user:F.message.assistant,color:A.role==="user"?F.message.userText:F.text.primary,border:A.role==="assistant"?`1px solid ${F.input.border}`:"none",width:"100%",maxWidth:"85%",wordWrap:"break-word",overflowWrap:"anywhere"},children:[A.role==="assistant"?Ae?E.jsxs("div",{className:"text-gray-500",children:[E.jsx("span",{className:"font-medium",children:"Thinking"}),E.jsxs("span",{className:"animate-dots ml-1",children:[E.jsx("span",{className:"dot",children:"."}),E.jsx("span",{className:"dot",children:"."}),E.jsx("span",{className:"dot",children:"."})]})]}):!$e(Y)&&ye?E.jsx(Ye,{content:A.content,onComplete:()=>_t(Y),messageIndex:Y,inputRef:s}):E.jsx("div",{className:"prose prose-base max-w-full whitespace-pre-wrap",style:{overflowWrap:"anywhere",wordBreak:"break-word",width:"100%",maxWidth:"100%",fontSize:"16px"},children:E.jsx(Li,{components:{a:ke=>E.jsx(Di,{...ke}),p:ke=>E.jsx("p",{className:"mb-4",style:{overflowWrap:"anywhere",wordBreak:"break-word"},...ke}),code:ke=>E.jsx("code",{style:{display:"block",whiteSpace:"pre-wrap",overflowX:"auto",overflowWrap:"anywhere"},...ke})},children:we(A.content)})}):E.jsx("p",{className:"text-base",style:{overflowWrap:"anywhere",wordBreak:"break-word",whiteSpace:"pre-wrap",width:"100%"},children:A.content}),E.jsxs("div",{className:ct("flex text-xs mt-2",A.role==="user"?"justify-start text-white/70":"justify-between text-gray-400"),children:[E.jsx("span",{children:Le(se)}),A.role==="assistant"&&!Ae&&E.jsxs("div",{className:"relative",children:[E.jsx("button",{onClick:()=>Fe(A.content,Y),className:"text-gray-400 hover:text-gray-600 transition-colors ml-2 p-1 rounded-full hover:bg-gray-100","aria-label":"Copy to clipboard",children:P===Y?E.jsx($i,{size:16}):E.jsx(no,{size:16})}),P===Y&&E.jsx("div",{className:"absolute bottom-full right-0 mb-1 px-2 py-1 text-xs rounded-md shadow-sm animate-fade-in-out whitespace-nowrap",style:{backgroundColor:F.secondary,color:F.text.inverse},children:"Copied!"})]})]})]})},Y)}),le&&d.length===0&&E.jsx("div",{className:"flex justify-start",children:E.jsx("div",{className:"bg-white border border-gray-200 rounded-xl rounded-tl-none max-w-[85%] p-4 shadow-sm",children:E.jsxs("div",{className:"text-gray-500",children:[E.jsx("span",{className:"font-medium",children:"Thinking"}),E.jsxs("span",{className:"animate-dots ml-1",children:[E.jsx("span",{className:"dot",children:"."}),E.jsx("span",{className:"dot",children:"."}),E.jsx("span",{className:"dot",children:"."})]})]})})}),E.jsx("div",{ref:c})]})]}),E.jsx("div",{className:"p-4 border-t shrink-0",style:{borderColor:F.input.border,background:F.background,boxShadow:"0 -2px 10px rgba(0,0,0,0.05)"},children:E.jsxs("div",{className:"flex items-end gap-3",children:[E.jsxs("div",{className:ct("flex-1 relative rounded-xl transition-all duration-200 overflow-hidden",k?"ring-2":"ring-0"),style:{borderColor:F.input.border,border:"1px solid",boxShadow:k?"0 0 0 2px rgba(236, 153, 75, 0.2)":"none","--tw-ring-color":F.secondary,background:F.input.background},children:[E.jsx("textarea",{ref:s,value:r,onChange:ft,onKeyDown:ae,onFocus:()=>R(!0),onBlur:()=>R(!1),placeholder:"Type your message...",maxLength:f,className:"w-full resize-none outline-none p-3 pr-12 text-base custom-scrollbar",style:{background:"transparent",color:F.text.primary,height:"48px",minHeight:"48px",maxHeight:"96px",overflow:"auto",lineHeight:"1.5",boxSizing:"border-box"}}),r.length>0&&E.jsxs("div",{className:"absolute bottom-2 right-3 text-xs px-2 py-1 rounded-full",style:{color:r.length>=f*.9?"#ef4444":"#6b7280",backgroundColor:r.length>=f*.9?"rgba(239, 68, 68, 0.1)":"rgba(107, 114, 128, 0.1)",fontSize:"0.7rem"},children:[r.length,"/",f]})]}),E.jsx("button",{onClick:De,disabled:!r.trim()||le,className:ct("rounded-full transition-all duration-200 flex items-center justify-center shrink-0",r.trim()&&!le?"hover:shadow-md transform hover:-translate-y-0.5":"bg-gray-200 text-gray-400 cursor-not-allowed"),style:{backgroundColor:r.trim()&&!le?F.secondary:void 0,color:r.trim()&&!le?"white":void 0,width:"48px",height:"48px",padding:"12px"},"aria-label":"Send message",children:E.jsx(ao,{size:24})})]})})]}),E.jsxs("div",{className:"relative",children:[o&&!t&&E.jsx("span",{className:"absolute -top-1 -right-1 h-4 w-4 bg-orange-500 rounded-full animate-pulse z-10"}),E.jsx("button",{onClick:me,onMouseEnter:()=>u(!0),onMouseLeave:()=>u(!1),className:ct("rounded-full shadow-lg flex items-center justify-center transition-all duration-300",a&&!t&&"animate-pulse",!t&&"animate-bounce-gentle"),style:{backgroundColor:F.primary,color:F.text.inverse,width:"80px",height:"80px"},"aria-label":t?"Close chat":"Open chat",children:t?E.jsx(qn,{size:40,className:"text-white",style:{opacity:.9}}):E.jsx(Nn,{iconName:"message-square",size:40,className:"text-white"})})]}),E.jsx("style",{children:`
168
+ `)},Le=O=>O.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"}),pe=(O=!1)=>{if(h.current){const{scrollHeight:K}=h.current;h.current.scrollTo({top:K,behavior:O?"auto":"smooth"}),setTimeout(()=>{je()},O?0:300)}},je=()=>{if(h.current&&!Z){const{scrollTop:O,scrollHeight:K,clientHeight:se}=h.current,xe=Math.abs(K-O-se)<10,Ae=O<10;y(!Ae&&O>200),T(!xe)}},_t=()=>{h.current&&(H(!0),h.current.scrollTo({top:0,behavior:"smooth"}),setTimeout(()=>{H(!1),je()},300))},ht=O=>{const K=O.target.value;K.length<=f&&i(K)},Tt=O=>{F.current.add(O),O===d.length-1&&(P(!1),setTimeout(()=>pe(),50))},$e=O=>F.current.has(O);N.useEffect(()=>{(le||d.length===0)&&pe(!0)},[d,le]),N.useEffect(()=>{t&&s.current&&s.current.focus()},[t]),N.useEffect(()=>()=>{R.current&&clearTimeout(R.current)},[]);const Ye=({content:O,onComplete:K,messageIndex:se,inputRef:xe})=>{const[Ae,ve]=N.useState(""),[et,tt]=N.useState(!0);N.useRef(0);const We=N.useRef(!1),b=N.useRef();return N.useEffect(()=>{if($e(se)){ve(O),tt(!1),K();return}if(!We.current){We.current=!0,V.current=!0,P(!0);let v=0,j=0;const W=Q=>{if(v<O.length){const be=O.slice(0,v+1);ve(be),v===0&&tt(!1),Q-j>100&&(pe(),j=Q),v++,b.current=requestAnimationFrame(W)}else V.current=!1,K(),We.current=!1,P(!1),pe()};b.current=requestAnimationFrame(W)}return()=>{b.current&&cancelAnimationFrame(b.current),We.current=!1,V.current=!1,P(!1)}},[O,se,K]),N.useEffect(()=>{const v=()=>{We.current&&(b.current&&cancelAnimationFrame(b.current),ve(O),tt(!1),K(),We.current=!1,V.current=!1,P(!1),pe())},j=xe.current||document.querySelector("textarea");return j&&j.addEventListener("input",v),()=>{j&&j.removeEventListener("input",v)}},[O,K,xe]),E.jsxs(E.Fragment,{children:[Ae&&E.jsx("div",{className:"prose prose-base max-w-full whitespace-pre-wrap",style:{overflowWrap:"anywhere",wordBreak:"break-word",width:"100%",maxWidth:"100%",fontSize:"16px"},children:E.jsx(ji,{components:{a:v=>E.jsx(Mi,{...v}),p:v=>E.jsx("p",{className:"mb-4",style:{overflowWrap:"anywhere",wordBreak:"break-word"},...v}),code:v=>E.jsx("code",{style:{display:"block",whiteSpace:"pre-wrap",overflowX:"auto",overflowWrap:"anywhere"},...v})},children:ke(Ae)})}),et&&E.jsxs("div",{className:"text-gray-500",children:[E.jsx("span",{className:"font-medium",children:"Thinking"}),E.jsxs("span",{className:"animate-dots ml-1",children:[E.jsx("span",{className:"dot",children:"."}),E.jsx("span",{className:"dot",children:"."}),E.jsx("span",{className:"dot",children:"."})]})]})]})};return E.jsxs("div",{className:"fixed bottom-4 right-4 z-50 flex flex-col items-end font-sans",style:{fontFamily:'Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif'},children:[t&&E.jsxs("div",{className:"mb-4 w-full sm:w-[500px] md:w-[650px] lg:w-[700px] rounded-xl shadow-xl flex flex-col overflow-hidden border border-gray-200 transition-all duration-300 ease-in-out",style:{background:z.background,height:"650px",maxHeight:"calc(100vh - 100px)",width:G<640?"100%":G<768?"500px":G<1024?"650px":"700px",minWidth:G<640?"100%":"500px"},children:[E.jsxs("div",{className:"p-4 flex justify-between items-center shrink-0",style:{background:z.primary,color:z.text.inverse},children:[E.jsxs("div",{className:"flex items-center",children:[E.jsx(Mn,{iconName:te.icon,size:32,className:"mr-3",style:{color:z.secondary}}),E.jsx("h3",{className:"text-xl font-medium",children:te.header.title})]}),E.jsxs("div",{className:"flex items-center space-x-3",children:[E.jsx("button",{onClick:()=>{g(),F.current.clear()},className:"transition-colors p-2 rounded-full hover:bg-opacity-20 hover:bg-black",style:{color:z.text.inverse},"aria-label":"Clear conversation",title:"Clear conversation",children:E.jsx(co,{size:20})}),E.jsx("button",{onClick:me,className:"transition-colors p-2 rounded-full hover:bg-opacity-20 hover:bg-black",style:{color:z.text.inverse},"aria-label":"Minimize chat",children:E.jsx(Xn,{size:20})})]})]}),E.jsxs("div",{ref:h,className:"flex-1 p-4 overflow-y-auto scroll-smooth relative messages-container",style:{background:z.input.background,overflowY:"auto"},onScroll:je,children:[p&&E.jsx("button",{onClick:_t,className:"sticky top-3 left-[calc(100%-48px)] z-10 flex items-center justify-center p-2 rounded-full shadow-md",style:{backgroundColor:z.primary,color:z.text.inverse},"aria-label":"Scroll to top",title:"Scroll to top",children:E.jsx(no,{size:20})}),x&&!Z&&E.jsx("button",{onClick:()=>pe(),className:"sticky bottom-3 left-[calc(100%-48px)] z-10 flex items-center justify-center p-2 rounded-full shadow-md",style:{backgroundColor:z.primary,color:z.text.inverse},"aria-label":"Scroll to bottom",title:"Scroll to bottom",children:E.jsx(to,{size:20})}),d.length===0?E.jsxs("div",{className:"text-center py-16",children:[E.jsx(Mn,{iconName:te.icon,size:56,className:"mx-auto mb-4",style:{color:z.iconColor}}),E.jsx("h4",{className:"font-medium text-xl text-[#2C3E50] mb-2",children:te.welcome.title}),E.jsx("p",{className:"text-lg text-gray-600 mb-6",children:te.welcome.description}),E.jsx("div",{className:"w-full px-4",children:te.suggestedQuestions.map((O,K)=>E.jsxs("button",{onClick:()=>{we(O.query),setTimeout(()=>{s.current&&s.current.focus()},100)},className:"w-full text-left text-base p-3 rounded-lg transition-colors mb-3 flex items-center",style:{backgroundColor:z.suggestedQuestions.background,color:z.suggestedQuestions.text},onMouseEnter:se=>{se.currentTarget.style.backgroundColor=z.suggestedQuestions.hoverBackground},onMouseLeave:se=>{se.currentTarget.style.backgroundColor=z.suggestedQuestions.background},children:[E.jsx(Gn,{size:20,className:"mr-2 flex-shrink-0"}),E.jsx("span",{children:O.text})]},K))})]}):E.jsxs("div",{className:"space-y-5",children:[d.map((O,K)=>{const se=new Date;se.setMinutes(se.getMinutes()-(d.length-K));const xe=O.role==="assistant"&&K===d.length-1,Ae=xe&&le;return E.jsx("div",{className:ct("flex",O.role==="user"?"justify-end":"justify-start"),ref:K===d.length-1?Y:null,children:E.jsxs("div",{className:ct("max-w-[85%] rounded-xl p-4 shadow-sm",O.role==="user"?"rounded-tr-none":"rounded-tl-none"),style:{background:O.role==="user"?z.message.user:z.message.assistant,color:O.role==="user"?z.message.userText:z.text.primary,border:O.role==="assistant"?`1px solid ${z.input.border}`:"none",width:"100%",maxWidth:"85%",wordWrap:"break-word",overflowWrap:"anywhere"},children:[O.role==="assistant"?Ae?E.jsxs("div",{className:"text-gray-500",children:[E.jsx("span",{className:"font-medium",children:"Thinking"}),E.jsxs("span",{className:"animate-dots ml-1",children:[E.jsx("span",{className:"dot",children:"."}),E.jsx("span",{className:"dot",children:"."}),E.jsx("span",{className:"dot",children:"."})]})]}):!$e(K)&&xe?E.jsx(Ye,{content:O.content,onComplete:()=>Tt(K),messageIndex:K,inputRef:s}):E.jsx("div",{className:"prose prose-base max-w-full whitespace-pre-wrap",style:{overflowWrap:"anywhere",wordBreak:"break-word",width:"100%",maxWidth:"100%",fontSize:"16px"},children:E.jsx(ji,{components:{a:ve=>E.jsx(Mi,{...ve}),p:ve=>E.jsx("p",{className:"mb-4",style:{overflowWrap:"anywhere",wordBreak:"break-word"},...ve}),code:ve=>E.jsx("code",{style:{display:"block",whiteSpace:"pre-wrap",overflowX:"auto",overflowWrap:"anywhere"},...ve})},children:ke(O.content)})}):E.jsx("p",{className:"text-base",style:{overflowWrap:"anywhere",wordBreak:"break-word",whiteSpace:"pre-wrap",width:"100%"},children:O.content}),E.jsxs("div",{className:ct("flex text-xs mt-2",O.role==="user"?"justify-start text-white/70":"justify-between text-gray-400"),children:[E.jsx("span",{children:Le(se)}),O.role==="assistant"&&!Ae&&E.jsxs("div",{className:"relative",children:[E.jsx("button",{onClick:()=>ze(O.content,K),className:"text-gray-400 hover:text-gray-600 transition-colors ml-2 p-1 rounded-full hover:bg-gray-100","aria-label":"Copy to clipboard",children:L===K?E.jsx(eo,{size:16}):E.jsx(ro,{size:16})}),L===K&&E.jsx("div",{className:"absolute bottom-full right-0 mb-1 px-2 py-1 text-xs rounded-md shadow-sm animate-fade-in-out whitespace-nowrap",style:{backgroundColor:z.secondary,color:z.text.inverse},children:"Copied!"})]})]})]})},K)}),le&&d.length===0&&E.jsx("div",{className:"flex justify-start",children:E.jsx("div",{className:"bg-white border border-gray-200 rounded-xl rounded-tl-none max-w-[85%] p-4 shadow-sm",children:E.jsxs("div",{className:"text-gray-500",children:[E.jsx("span",{className:"font-medium",children:"Thinking"}),E.jsxs("span",{className:"animate-dots ml-1",children:[E.jsx("span",{className:"dot",children:"."}),E.jsx("span",{className:"dot",children:"."}),E.jsx("span",{className:"dot",children:"."})]})]})})}),E.jsx("div",{ref:c})]})]}),E.jsx("div",{className:"p-4 border-t shrink-0",style:{borderColor:z.input.border,background:z.background,boxShadow:"0 -2px 10px rgba(0,0,0,0.05)"},children:E.jsxs("div",{className:"flex items-end gap-3",children:[E.jsxs("div",{className:ct("flex-1 relative rounded-xl transition-all duration-200 overflow-hidden",w?"ring-2":"ring-0"),style:{borderColor:z.input.border,border:"1px solid",boxShadow:w?"0 0 0 2px rgba(236, 153, 75, 0.2)":"none","--tw-ring-color":z.secondary,background:z.input.background},children:[E.jsx("textarea",{ref:s,value:r,onChange:ht,onKeyDown:ae,onFocus:()=>A(!0),onBlur:()=>A(!1),placeholder:"Type your message...",maxLength:f,className:"w-full resize-none outline-none p-3 pr-12 text-base custom-scrollbar",style:{background:"transparent",color:z.text.primary,height:"48px",minHeight:"48px",maxHeight:"96px",overflow:"auto",lineHeight:"1.5",boxSizing:"border-box"}}),r.length>0&&E.jsxs("div",{className:"absolute bottom-2 right-3 text-xs px-2 py-1 rounded-full",style:{color:r.length>=f*.9?"#ef4444":"#6b7280",backgroundColor:r.length>=f*.9?"rgba(239, 68, 68, 0.1)":"rgba(107, 114, 128, 0.1)",fontSize:"0.7rem"},children:[r.length,"/",f]})]}),E.jsx("button",{onClick:De,disabled:!r.trim()||le,className:ct("rounded-full transition-all duration-200 flex items-center justify-center shrink-0",r.trim()&&!le?"hover:shadow-md transform hover:-translate-y-0.5":"bg-gray-200 text-gray-400 cursor-not-allowed"),style:{backgroundColor:r.trim()&&!le?z.secondary:void 0,color:r.trim()&&!le?"white":void 0,width:"48px",height:"48px",padding:"12px"},"aria-label":"Send message",children:E.jsx(so,{size:24})})]})})]}),E.jsxs("div",{className:"relative",children:[o&&!t&&E.jsx("span",{className:"absolute -top-1 -right-1 h-4 w-4 bg-orange-500 rounded-full animate-pulse z-10"}),E.jsx("button",{onClick:me,onMouseEnter:()=>u(!0),onMouseLeave:()=>u(!1),className:ct("rounded-full shadow-lg flex items-center justify-center transition-all duration-300",a&&!t&&"animate-pulse",!t&&"animate-bounce-gentle"),style:{backgroundColor:z.primary,color:z.text.inverse,width:"80px",height:"80px"},"aria-label":t?"Close chat":"Open chat",children:t?E.jsx(Xn,{size:40,className:"text-white",style:{opacity:.9}}):E.jsx(Mn,{iconName:"message-square",size:40,className:"text-white"})})]}),E.jsx("style",{children:`
169
169
  @import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');
170
170
 
171
171
  body, button, input, textarea {
@@ -235,5 +235,5 @@ React keys must be passed directly to JSX without using spread:
235
235
  textarea, button {
236
236
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
237
237
  }
238
- `})]})};let Ut=null,he=null;function zi(){if(!Ut)if(typeof window<"u"&&window.CHATBOT_API_URL)Ut=window.CHATBOT_API_URL;else throw new Error("API URL not set. Call setApiUrl or use injectChatWidget to configure the API URL.");return Ut}function Dn(e){Ut=e,typeof window<"u"&&(window.CHATBOT_API_URL=e,rr(e))}function Fi(e){typeof window>"u"||(he={...Xe(),...he,...e,header:{...Xe().header,...he==null?void 0:he.header,...e.header},welcome:{...Xe().welcome,...he==null?void 0:he.welcome,...e.welcome},suggestedQuestions:e.suggestedQuestions||(he==null?void 0:he.suggestedQuestions)||Xe().suggestedQuestions,theme:{...Xe().theme,...he==null?void 0:he.theme,...e.theme}},window.dispatchEvent(new CustomEvent("chatbot-config-update",{detail:he})))}function zn(e){if(typeof window>"u")return;Dn(e.apiUrl),e.widgetConfig&&(he={...Xe(),...e.widgetConfig});function t(){try{if(!window.React||!window.ReactDOM){console.log("React or ReactDOM not available yet, retrying in 100ms..."),setTimeout(t,100);return}const n=e.containerSelector?document.querySelector(e.containerSelector):document.createElement("div");if(!n){console.error(`Container with selector "${e.containerSelector}" not found`);return}e.containerSelector||(n.id="chatbot-widget-container",document.body.appendChild(n)),window.ReactDOM.createRoot(n).render(window.React.createElement(Bt,he)),console.log("Chatbot widget initialized successfully!")}catch(n){console.error("Error initializing chatbot widget:",n)}}setTimeout(t,100)}typeof window<"u"&&(window.initChatbotWidget=zn,window.ChatbotWidget={ChatWidget:Bt,useChatStore:Jt,injectChatWidget:zn,setApiUrl:Dn,getApiUrl:zi,updateWidgetConfig:Fi},console.log("Chatbot widget loaded."));const Mi=Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"}));Ee.ChatWidget=Bt,Ee.default=Bt,Ee.getApiUrl=zi,Ee.getChatConfig=Xe,Ee.injectChatWidget=zn,Ee.setApiUrl=Dn,Ee.updateWidgetConfig=Fi,Ee.useChatStore=Jt,Object.defineProperties(Ee,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
238
+ `})]})};let ft=null,pt=null,he=null;function zi(){if(!ft)if(typeof window<"u"&&window.CHATBOT_API_URL)ft=window.CHATBOT_API_URL;else throw new Error("API URL not set. Call setApiUrl or use injectChatWidget to configure the API URL.");return ft}function Fi(){if(!pt)if(typeof window<"u"&&window.CHATBOT_API_KEY)pt=window.CHATBOT_API_KEY;else throw new Error("API key not set. Call setApiKey or use injectChatWidget to configure the API key.");return pt}function zn(e){ft=e,typeof window<"u"&&(window.CHATBOT_API_URL=e,pt&&Jt(e,pt))}function Fn(e){pt=e,typeof window<"u"&&(window.CHATBOT_API_KEY=e,ft&&Jt(ft,e))}function Bi(e){typeof window>"u"||(he={...Xe(),...he,...e,header:{...Xe().header,...he==null?void 0:he.header,...e.header},welcome:{...Xe().welcome,...he==null?void 0:he.welcome,...e.welcome},suggestedQuestions:e.suggestedQuestions||(he==null?void 0:he.suggestedQuestions)||Xe().suggestedQuestions,theme:{...Xe().theme,...he==null?void 0:he.theme,...e.theme}},window.dispatchEvent(new CustomEvent("chatbot-config-update",{detail:he})))}function Bn(e){if(typeof window>"u")return;zn(e.apiUrl),Fn(e.apiKey),e.widgetConfig&&(he={...Xe(),...e.widgetConfig});function t(){try{if(!window.React||!window.ReactDOM){console.log("React or ReactDOM not available yet, retrying in 100ms..."),setTimeout(t,100);return}const n=e.containerSelector?document.querySelector(e.containerSelector):document.createElement("div");if(!n){console.error(`Container with selector "${e.containerSelector}" not found`);return}e.containerSelector||(n.id="chatbot-widget-container",document.body.appendChild(n)),window.ReactDOM.createRoot(n).render(window.React.createElement(Ht,he)),console.log("Chatbot widget initialized successfully!")}catch(n){console.error("Error initializing chatbot widget:",n)}}setTimeout(t,100)}typeof window<"u"&&(window.initChatbotWidget=Bn,window.ChatbotWidget={ChatWidget:Ht,useChatStore:Zt,injectChatWidget:Bn,setApiUrl:zn,getApiUrl:zi,setApiKey:Fn,getApiKey:Fi,updateWidgetConfig:Bi},console.log("Chatbot widget loaded.")),ge.ChatWidget=Ht,ge.default=Ht,ge.getApiKey=Fi,ge.getApiUrl=zi,ge.getChatConfig=Xe,ge.injectChatWidget=Bn,ge.setApiKey=Fn,ge.setApiUrl=zn,ge.updateWidgetConfig=Bi,ge.useChatStore=Zt,Object.defineProperties(ge,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
239
239