contentstack-chat-widget-sdk
Version:
React TypeScript SDK for embedding ContentStack AI-powered chat widgets into websites
25 lines • 179 kB
JavaScript
(function(ue,X){typeof exports=="object"&&typeof module<"u"?X(exports,require("react")):typeof define=="function"&&define.amd?define(["exports","react"],X):(ue=typeof globalThis<"u"?globalThis:ue||self,X(ue.ContentstackChatWidget={},ue.React))})(this,(function(ue,X){"use strict";function fn(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var nt={exports:{}},Be={};/**
* @license React
* react-jsx-runtime.production.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var hn;function xi(){if(hn)return Be;hn=1;var e=Symbol.for("react.transitional.element"),n=Symbol.for("react.fragment");function t(r,l,o){var i=null;if(o!==void 0&&(i=""+o),l.key!==void 0&&(i=""+l.key),"key"in l){o={};for(var a in l)a!=="key"&&(o[a]=l[a])}else o=l;return l=o.ref,{$$typeof:e,type:r,key:i,ref:l!==void 0?l:null,props:o}}return Be.Fragment=n,Be.jsx=t,Be.jsxs=t,Be}var Ue={};/**
* @license React
* react-jsx-runtime.development.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var pn;function yi(){return pn||(pn=1,process.env.NODE_ENV!=="production"&&(function(){function e(p){if(p==null)return null;if(typeof p=="function")return p.$$typeof===b?null:p.displayName||p.name||null;if(typeof p=="string")return p;switch(p){case k:return"Fragment";case x:return"Profiler";case E:return"StrictMode";case D:return"Suspense";case y:return"SuspenseList";case q:return"Activity"}if(typeof p=="object")switch(typeof p.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),p.$$typeof){case g:return"Portal";case C:return(p.displayName||"Context")+".Provider";case S:return(p._context.displayName||"Context")+".Consumer";case A:var N=p.render;return p=p.displayName,p||(p=N.displayName||N.name||"",p=p!==""?"ForwardRef("+p+")":"ForwardRef"),p;case _:return N=p.displayName||null,N!==null?N:e(p.type)||"Memo";case F:N=p._payload,p=p._init;try{return e(p(N))}catch{}}return null}function n(p){return""+p}function t(p){try{n(p);var N=!1}catch{N=!0}if(N){N=console;var W=N.error,d=typeof Symbol=="function"&&Symbol.toStringTag&&p[Symbol.toStringTag]||p.constructor.name||"Object";return W.call(N,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",d),n(p)}}function r(p){if(p===k)return"<>";if(typeof p=="object"&&p!==null&&p.$$typeof===F)return"<...>";try{var N=e(p);return N?"<"+N+">":"<...>"}catch{return"<...>"}}function l(){var p=R.A;return p===null?null:p.getOwner()}function o(){return Error("react-stack-top-frame")}function i(p){if(L.call(p,"key")){var N=Object.getOwnPropertyDescriptor(p,"key").get;if(N&&N.isReactWarning)return!1}return p.key!==void 0}function a(p,N){function W(){M||(M=!0,console.error("%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://react.dev/link/special-props)",N))}W.isReactWarning=!0,Object.defineProperty(p,"key",{get:W,configurable:!0})}function s(){var p=e(this.type);return G[p]||(G[p]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),p=this.props.ref,p!==void 0?p:null}function u(p,N,W,d,te,ne,J,Ce){return W=ne.ref,p={$$typeof:h,type:p,key:N,props:ne,_owner:te},(W!==void 0?W:null)!==null?Object.defineProperty(p,"ref",{enumerable:!1,get:s}):Object.defineProperty(p,"ref",{enumerable:!1,value:null}),p._store={},Object.defineProperty(p._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(p,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(p,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:J}),Object.defineProperty(p,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:Ce}),Object.freeze&&(Object.freeze(p.props),Object.freeze(p)),p}function f(p,N,W,d,te,ne,J,Ce){var K=N.children;if(K!==void 0)if(d)if(z(K)){for(d=0;d<K.length;d++)c(K[d]);Object.freeze&&Object.freeze(K)}else console.error("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 c(K);if(L.call(N,"key")){K=e(p);var he=Object.keys(N).filter(function(Me){return Me!=="key"});d=0<he.length?"{key: someKey, "+he.join(": ..., ")+": ...}":"{key: someKey}",de[K+d]||(he=0<he.length?"{"+he.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
let props = %s;
<%s {...props} />
React keys must be passed directly to JSX without using spread:
let props = %s;
<%s key={someKey} {...props} />`,d,K,he,K),de[K+d]=!0)}if(K=null,W!==void 0&&(t(W),K=""+W),i(N)&&(t(N.key),K=""+N.key),"key"in N){W={};for(var be in N)be!=="key"&&(W[be]=N[be])}else W=N;return K&&a(W,typeof p=="function"?p.displayName||p.name||"Unknown":p),u(p,K,ne,te,l(),W,J,Ce)}function c(p){typeof p=="object"&&p!==null&&p.$$typeof===h&&p._store&&(p._store.validated=1)}var m=X,h=Symbol.for("react.transitional.element"),g=Symbol.for("react.portal"),k=Symbol.for("react.fragment"),E=Symbol.for("react.strict_mode"),x=Symbol.for("react.profiler"),S=Symbol.for("react.consumer"),C=Symbol.for("react.context"),A=Symbol.for("react.forward_ref"),D=Symbol.for("react.suspense"),y=Symbol.for("react.suspense_list"),_=Symbol.for("react.memo"),F=Symbol.for("react.lazy"),q=Symbol.for("react.activity"),b=Symbol.for("react.client.reference"),R=m.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,L=Object.prototype.hasOwnProperty,z=Array.isArray,P=console.createTask?console.createTask:function(){return null};m={react_stack_bottom_frame:function(p){return p()}};var M,G={},ee=m.react_stack_bottom_frame.bind(m,o)(),se=P(r(o)),de={};Ue.Fragment=k,Ue.jsx=function(p,N,W,d,te){var ne=1e4>R.recentlyCreatedOwnerStacks++;return f(p,N,W,!1,d,te,ne?Error("react-stack-top-frame"):ee,ne?P(r(p)):se)},Ue.jsxs=function(p,N,W,d,te){var ne=1e4>R.recentlyCreatedOwnerStacks++;return f(p,N,W,!0,d,te,ne?Error("react-stack-top-frame"):ee,ne?P(r(p)):se)}})()),Ue}var mn;function ki(){return mn||(mn=1,process.env.NODE_ENV==="production"?nt.exports=xi():nt.exports=yi()),nt.exports}var I=ki();const dn={primaryColor:"#6a5ddf",secondaryColor:"#f3f4f6",backgroundColor:"#ffffff",textColor:"#1f2937",userMessageColor:"#6a5ddf",assistantMessageColor:"#f3f4f6",borderRadius:"12px",fontFamily:'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif'};class xt{constructor(n="http://localhost:5002/api/contentstack/query-stream"){this.apiEndpoint=n}async sendMessageStream(n,t,r,l,o,i=30,a){try{const s=await fetch(this.apiEndpoint,{method:"POST",headers:{"Content-Type":"application/json",Accept:"text/event-stream"},body:JSON.stringify(n),signal:a?.signal});if(!s.ok)throw new Error(`HTTP error! status: ${s.status}`);const u=s.body?.getReader();if(!u)throw new Error("Failed to get response reader");const f=new TextDecoder;let c="",m=[],h=!1,g=!1;const k=()=>a?.signal.aborted?(g=!0,m.length=0,!0):!1,E=async()=>{if(!(h||m.length===0||g)){for(h=!0;m.length>0&&!g&&!k();){const x=m.shift();t(x);let S=i;x===" "?S=i*.5:[".","!","?",",",";",":"].includes(x)?S=i*2:x===`
`&&(S=i*3);const C=S*.2*(Math.random()-.5);S=Math.max(10,S+C),await new Promise(A=>setTimeout(A,S))}h=!1}};for(;;){if(k()){u.cancel();return}const{done:x,value:S}=await u.read();if(x){for(;m.length>0&&!g&&!k();){const A=m.shift();t(A),await new Promise(D=>setTimeout(D,i))}break}c+=f.decode(S,{stream:!0});const C=c.split(`
`);c=C.pop()||"";for(const A of C)if(A.startsWith("data: ")){const D=A.slice(6);if(D==="[DONE]"){for(;m.length>0;){const y=m.shift();t(y),await new Promise(_=>setTimeout(_,i))}r?.();return}try{const y=JSON.parse(D);if(y.chunk){const _=y.chunk.split("");m.push(..._),E()}else if(y.type==="status"&&y.message)o?.(y.message);else if(y.type==="complete"){for(;m.length>0;){const _=m.shift();t(_),await new Promise(F=>setTimeout(F,i))}r?.();return}else if(y.error){l?.(y.error);return}}catch{continue}}}g||r?.()}catch(s){if(s instanceof Error&&s.name==="AbortError"){console.log("Request was cancelled by user");return}console.error("ContentStack Chat Streaming API Error:",s),l?.(s instanceof Error?s.message:"Unknown error occurred")}}createRequest(n,t={}){return{query:n,tenantId:t.tenantId,apiKey:t.apiKey,projectId:t.projectId,provider:t.provider,model:t.model,sessionId:t.sessionId}}}const bi=new xt,gn=e=>{const[n,t]=X.useState([]),[r,l]=X.useState(!1),[o]=X.useState(()=>`session_${Date.now()}_${Math.random().toString(36).substr(2,9)}`),i=e.provider||"groq",a=e.model||"llama-3.1-8b-instant",s=X.useRef(new xt(e.apiEndpoint)),u=X.useRef(null),f=X.useRef(null);X.useEffect(()=>{u.current?.scrollIntoView({behavior:"smooth"})},[n]),X.useEffect(()=>{if(e.welcomeMessage&&n.length===0){const g={id:`welcome-${Date.now()}`,type:"assistant",content:e.welcomeMessage,timestamp:new Date};t([g])}},[e.welcomeMessage,n.length]);const c=X.useCallback(()=>{f.current&&(f.current.abort(),f.current=null,l(!1))},[]),m=X.useCallback(async g=>{if(!g.trim())return;r&&c();const k=new AbortController;f.current=k;const E={id:`user-${Date.now()}`,type:"user",content:g.trim(),timestamp:new Date};t(A=>[...A,E]),l(!0);const x=`status-${Date.now()}`,S={id:x,type:"status",content:"⏳ Processing your request...",timestamp:new Date,isStatus:!0};t(A=>[...A,S]);const C={id:`assistant-${Date.now()}`,type:"assistant",content:"",timestamp:new Date,isLoading:!0};try{const A=s.current.createRequest(g,{tenantId:e.tenantId,apiKey:e.apiKey,projectId:e.projectId,provider:i,model:a,sessionId:o});console.log("🔍 SDK Debug - Props provider:",e.provider),console.log("🔍 SDK Debug - Props model:",e.model),console.log("🔍 SDK Debug - Final provider:",i),console.log("🔍 SDK Debug - Final model:",a),console.log("🔍 SDK Debug - Request payload:",A),await s.current.sendMessageStream(A,D=>{t(y=>y.some(F=>F.id===C.id)?y.map(F=>F.id===C.id?{...F,content:F.content+D,isLoading:!0}:F):y.filter(F=>F.id!==x).concat([{...C,content:D,isLoading:!0}]))},()=>{let D;t(y=>{const _=y.filter(F=>F.id!==x).map(F=>F.id===C.id?{...F,isLoading:!1}:F);return D=_.find(F=>F.id===C.id),_}),l(!1),f.current=null,e.onMessage&&D&&e.onMessage(D)},D=>{console.error("Streaming error:",D);const y={id:C.id,type:"assistant",content:"I apologize, but I encountered an error. Please try again.",timestamp:new Date,isLoading:!1};t(_=>_.filter(F=>F.id!==x).map(F=>F.id===C.id?y:F)),l(!1),f.current=null},D=>{t(y=>y.map(_=>_.id===x?{..._,content:D}:_))},e.typingSpeed||30,k)}catch(A){console.error("Error sending message:",A);const D={id:C.id,type:"assistant",content:"I apologize, but I encountered an error. Please try again.",timestamp:new Date,isLoading:!1};t(y=>y.map(_=>_.id===C.id?D:_)),l(!1),f.current=null}},[r,i,a,e.tenantId,e.apiKey,e.projectId,e.onMessage]),h=X.useCallback(()=>{if(t([]),e.welcomeMessage){const g={id:`welcome-${Date.now()}`,type:"assistant",content:e.welcomeMessage,timestamp:new Date};t([g])}},[e.welcomeMessage]);return{messages:n,isLoading:r,sendMessage:m,cancelCurrentRequest:c,clearMessages:h,messagesEndRef:u}},xn=(e=!1)=>{const[n,t]=X.useState(e),r=X.useCallback(()=>{t(i=>!i)},[]),l=X.useCallback(()=>{t(!0)},[]),o=X.useCallback(()=>{t(!1)},[]);return{isOpen:n,toggle:r,open:l,close:o}};function Yc(){}function Xc(){}function wi(e,n){const t={};return(e[e.length-1]===""?[...e,""]:e).join((t.padRight?" ":"")+","+(t.padLeft===!1?"":" ")).trim()}const Ci=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Si=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Ei={};function yn(e,n){return(Ei.jsx?Si:Ci).test(e)}const vi=/[ \t\n\f\r]/g;function Ii(e){return typeof e=="object"?e.type==="text"?kn(e.value):!1:kn(e)}function kn(e){return e.replace(vi,"")===""}class He{constructor(n,t,r){this.normal=t,this.property=n,r&&(this.space=r)}}He.prototype.normal={},He.prototype.property={},He.prototype.space=void 0;function bn(e,n){const t={},r={};for(const l of e)Object.assign(t,l.property),Object.assign(r,l.normal);return new He(t,r,n)}function yt(e){return e.toLowerCase()}class oe{constructor(n,t){this.attribute=t,this.property=n}}oe.prototype.attribute="",oe.prototype.booleanish=!1,oe.prototype.boolean=!1,oe.prototype.commaOrSpaceSeparated=!1,oe.prototype.commaSeparated=!1,oe.prototype.defined=!1,oe.prototype.mustUseProperty=!1,oe.prototype.number=!1,oe.prototype.overloadedBoolean=!1,oe.prototype.property="",oe.prototype.spaceSeparated=!1,oe.prototype.space=void 0;let Ti=0;const B=Te(),Z=Te(),kt=Te(),v=Te(),Q=Te(),Re=Te(),ce=Te();function Te(){return 2**++Ti}const bt=Object.freeze(Object.defineProperty({__proto__:null,boolean:B,booleanish:Z,commaOrSpaceSeparated:ce,commaSeparated:Re,number:v,overloadedBoolean:kt,spaceSeparated:Q},Symbol.toStringTag,{value:"Module"})),wt=Object.keys(bt);class Ct extends oe{constructor(n,t,r,l){let o=-1;if(super(n,t),wn(this,"space",l),typeof r=="number")for(;++o<wt.length;){const i=wt[o];wn(this,wt[o],(r&bt[i])===bt[i])}}}Ct.prototype.defined=!0;function wn(e,n,t){t&&(e[n]=t)}function _e(e){const n={},t={};for(const[r,l]of Object.entries(e.properties)){const o=new Ct(r,e.transform(e.attributes||{},r),l,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(o.mustUseProperty=!0),n[r]=o,t[yt(r)]=r,t[yt(o.attribute)]=r}return new He(n,t,e.space)}const Cn=_e({properties:{ariaActiveDescendant:null,ariaAtomic:Z,ariaAutoComplete:null,ariaBusy:Z,ariaChecked:Z,ariaColCount:v,ariaColIndex:v,ariaColSpan:v,ariaControls:Q,ariaCurrent:null,ariaDescribedBy:Q,ariaDetails:null,ariaDisabled:Z,ariaDropEffect:Q,ariaErrorMessage:null,ariaExpanded:Z,ariaFlowTo:Q,ariaGrabbed:Z,ariaHasPopup:null,ariaHidden:Z,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Q,ariaLevel:v,ariaLive:null,ariaModal:Z,ariaMultiLine:Z,ariaMultiSelectable:Z,ariaOrientation:null,ariaOwns:Q,ariaPlaceholder:null,ariaPosInSet:v,ariaPressed:Z,ariaReadOnly:Z,ariaRelevant:null,ariaRequired:Z,ariaRoleDescription:Q,ariaRowCount:v,ariaRowIndex:v,ariaRowSpan:v,ariaSelected:Z,ariaSetSize:v,ariaSort:null,ariaValueMax:v,ariaValueMin:v,ariaValueNow:v,ariaValueText:null,role:null},transform(e,n){return n==="role"?n:"aria-"+n.slice(4).toLowerCase()}});function Sn(e,n){return n in e?e[n]:n}function En(e,n){return Sn(e,n.toLowerCase())}const Ai=_e({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Re,acceptCharset:Q,accessKey:Q,action:null,allow:null,allowFullScreen:B,allowPaymentRequest:B,allowUserMedia:B,alt:null,as:null,async:B,autoCapitalize:null,autoComplete:Q,autoFocus:B,autoPlay:B,blocking:Q,capture:null,charSet:null,checked:B,cite:null,className:Q,cols:v,colSpan:null,content:null,contentEditable:Z,controls:B,controlsList:Q,coords:v|Re,crossOrigin:null,data:null,dateTime:null,decoding:null,default:B,defer:B,dir:null,dirName:null,disabled:B,download:kt,draggable:Z,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:B,formTarget:null,headers:Q,height:v,hidden:kt,high:v,href:null,hrefLang:null,htmlFor:Q,httpEquiv:Q,id:null,imageSizes:null,imageSrcSet:null,inert:B,inputMode:null,integrity:null,is:null,isMap:B,itemId:null,itemProp:Q,itemRef:Q,itemScope:B,itemType:Q,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:B,low:v,manifest:null,max:null,maxLength:v,media:null,method:null,min:null,minLength:v,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:v,pattern:null,ping:Q,placeholder:null,playsInline:B,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:B,referrerPolicy:null,rel:Q,required:B,reversed:B,rows:v,rowSpan:v,sandbox:Q,scope:null,scoped:B,seamless:B,selected:B,shadowRootClonable:B,shadowRootDelegatesFocus:B,shadowRootMode:null,shape:null,size:v,sizes:null,slot:null,span:v,spellCheck:Z,src:null,srcDoc:null,srcLang:null,srcSet:null,start:v,step:null,style:null,tabIndex:v,target:null,title:null,translate:null,type:null,typeMustMatch:B,useMap:null,value:Z,width:v,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Q,axis:null,background:null,bgColor:null,border:v,borderColor:null,bottomMargin:v,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:v,leftMargin:v,link:null,longDesc:null,lowSrc:null,marginHeight:v,marginWidth:v,noResize:B,noHref:B,noShade:B,noWrap:B,object:null,profile:null,prompt:null,rev:null,rightMargin:v,rules:null,scheme:null,scrolling:Z,standby:null,summary:null,text:null,topMargin:v,valueType:null,version:null,vAlign:null,vLink:null,vSpace:v,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:B,disableRemotePlayback:B,prefix:null,property:null,results:v,security:null,unselectable:null},space:"html",transform:En}),Pi=_e({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:ce,accentHeight:v,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:v,amplitude:v,arabicForm:null,ascent:v,attributeName:null,attributeType:null,azimuth:v,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:v,by:null,calcMode:null,capHeight:v,className:Q,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:v,diffuseConstant:v,direction:null,display:null,dur:null,divisor:v,dominantBaseline:null,download:B,dx:null,dy:null,edgeMode:null,editable:null,elevation:v,enableBackground:null,end:null,event:null,exponent:v,externalResourcesRequired:null,fill:null,fillOpacity:v,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:Re,g2:Re,glyphName:Re,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:v,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:v,horizOriginX:v,horizOriginY:v,id:null,ideographic:v,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:v,k:v,k1:v,k2:v,k3:v,k4:v,kernelMatrix:ce,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:v,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:v,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:v,overlineThickness:v,paintOrder:null,panose1:null,path:null,pathLength:v,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Q,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:v,pointsAtY:v,pointsAtZ:v,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:ce,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:ce,rev:ce,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:ce,requiredFeatures:ce,requiredFonts:ce,requiredFormats:ce,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:v,specularExponent:v,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:v,strikethroughThickness:v,string:null,stroke:null,strokeDashArray:ce,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:v,strokeOpacity:v,strokeWidth:null,style:null,surfaceScale:v,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:ce,tabIndex:v,tableValues:null,target:null,targetX:v,targetY:v,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:ce,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:v,underlineThickness:v,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:v,values:null,vAlphabetic:v,vMathematical:v,vectorEffect:null,vHanging:v,vIdeographic:v,version:null,vertAdvY:v,vertOriginX:v,vertOriginY:v,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:v,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Sn}),vn=_e({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,n){return"xlink:"+n.slice(5).toLowerCase()}}),In=_e({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:En}),Tn=_e({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,n){return"xml:"+n.slice(3).toLowerCase()}}),Di={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"},Ri=/[A-Z]/g,An=/-[a-z]/g,_i=/^data[-\w.:]+$/i;function Li(e,n){const t=yt(n);let r=n,l=oe;if(t in e.normal)return e.property[e.normal[t]];if(t.length>4&&t.slice(0,4)==="data"&&_i.test(n)){if(n.charAt(4)==="-"){const o=n.slice(5).replace(An,Fi);r="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=n.slice(4);if(!An.test(o)){let i=o.replace(Ri,zi);i.charAt(0)!=="-"&&(i="-"+i),n="data"+i}}l=Ct}return new l(r,n)}function zi(e){return"-"+e.toLowerCase()}function Fi(e){return e.charAt(1).toUpperCase()}const Oi=bn([Cn,Ai,vn,In,Tn],"html"),St=bn([Cn,Pi,vn,In,Tn],"svg");function Ni(e){return e.join(" ").trim()}var Le={},Et,Pn;function Mi(){if(Pn)return Et;Pn=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,n=/\n/g,t=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,l=/^:\s*/,o=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,i=/^[;\s]*/,a=/^\s+|\s+$/g,s=`
`,u="/",f="*",c="",m="comment",h="declaration";Et=function(k,E){if(typeof k!="string")throw new TypeError("First argument must be a string");if(!k)return[];E=E||{};var x=1,S=1;function C(z){var P=z.match(n);P&&(x+=P.length);var M=z.lastIndexOf(s);S=~M?z.length-M:S+z.length}function A(){var z={line:x,column:S};return function(P){return P.position=new D(z),F(),P}}function D(z){this.start=z,this.end={line:x,column:S},this.source=E.source}D.prototype.content=k;function y(z){var P=new Error(E.source+":"+x+":"+S+": "+z);if(P.reason=z,P.filename=E.source,P.line=x,P.column=S,P.source=k,!E.silent)throw P}function _(z){var P=z.exec(k);if(P){var M=P[0];return C(M),k=k.slice(M.length),P}}function F(){_(t)}function q(z){var P;for(z=z||[];P=b();)P!==!1&&z.push(P);return z}function b(){var z=A();if(!(u!=k.charAt(0)||f!=k.charAt(1))){for(var P=2;c!=k.charAt(P)&&(f!=k.charAt(P)||u!=k.charAt(P+1));)++P;if(P+=2,c===k.charAt(P-1))return y("End of comment missing");var M=k.slice(2,P-2);return S+=2,C(M),k=k.slice(P),S+=2,z({type:m,comment:M})}}function R(){var z=A(),P=_(r);if(P){if(b(),!_(l))return y("property missing ':'");var M=_(o),G=z({type:h,property:g(P[0].replace(e,c)),value:M?g(M[0].replace(e,c)):c});return _(i),G}}function L(){var z=[];q(z);for(var P;P=R();)P!==!1&&(z.push(P),q(z));return z}return F(),L()};function g(k){return k?k.replace(a,c):c}return Et}var Dn;function ji(){if(Dn)return Le;Dn=1;var e=Le&&Le.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Le,"__esModule",{value:!0}),Le.default=t;var n=e(Mi());function t(r,l){var o=null;if(!r||typeof r!="string")return o;var i=(0,n.default)(r),a=typeof l=="function";return i.forEach(function(s){if(s.type==="declaration"){var u=s.property,f=s.value;a?l(u,f,s):f&&(o=o||{},o[u]=f)}}),o}return Le}var Ve={},Rn;function Bi(){if(Rn)return Ve;Rn=1,Object.defineProperty(Ve,"__esModule",{value:!0}),Ve.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,n=/-([a-z])/g,t=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,l=/^-(ms)-/,o=function(u){return!u||t.test(u)||e.test(u)},i=function(u,f){return f.toUpperCase()},a=function(u,f){return"".concat(f,"-")},s=function(u,f){return f===void 0&&(f={}),o(u)?u:(u=u.toLowerCase(),f.reactCompat?u=u.replace(l,a):u=u.replace(r,a),u.replace(n,i))};return Ve.camelCase=s,Ve}var qe,_n;function Ui(){if(_n)return qe;_n=1;var e=qe&&qe.__importDefault||function(l){return l&&l.__esModule?l:{default:l}},n=e(ji()),t=Bi();function r(l,o){var i={};return!l||typeof l!="string"||(0,n.default)(l,function(a,s){a&&s&&(i[(0,t.camelCase)(a,o)]=s)}),i}return r.default=r,qe=r,qe}var Hi=Ui();const Vi=fn(Hi),Ln=zn("end"),vt=zn("start");function zn(e){return n;function n(t){const r=t&&t.position&&t.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function qi(e){const n=vt(e),t=Ln(e);if(n&&t)return{start:n,end:t}}function We(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Fn(e.position):"start"in e||"end"in e?Fn(e):"line"in e||"column"in e?It(e):""}function It(e){return On(e&&e.line)+":"+On(e&&e.column)}function Fn(e){return It(e&&e.start)+"-"+It(e&&e.end)}function On(e){return e&&typeof e=="number"?e:1}class re extends Error{constructor(n,t,r){super(),typeof t=="string"&&(r=t,t=void 0);let l="",o={},i=!1;if(t&&("line"in t&&"column"in t?o={place:t}:"start"in t&&"end"in t?o={place:t}:"type"in t?o={ancestors:[t],place:t.position}:o={...t}),typeof n=="string"?l=n:!o.cause&&n&&(i=!0,l=n.message,o.cause=n),!o.ruleId&&!o.source&&typeof r=="string"){const s=r.indexOf(":");s===-1?o.ruleId=r:(o.source=r.slice(0,s),o.ruleId=r.slice(s+1))}if(!o.place&&o.ancestors&&o.ancestors){const s=o.ancestors[o.ancestors.length-1];s&&(o.place=s.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=l,this.line=a?a.line:void 0,this.name=We(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=i&&o.cause&&typeof o.cause.stack=="string"?o.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}re.prototype.file="",re.prototype.name="",re.prototype.reason="",re.prototype.message="",re.prototype.stack="",re.prototype.column=void 0,re.prototype.line=void 0,re.prototype.ancestors=void 0,re.prototype.cause=void 0,re.prototype.fatal=void 0,re.prototype.place=void 0,re.prototype.ruleId=void 0,re.prototype.source=void 0;const Tt={}.hasOwnProperty,Wi=new Map,$i=/[A-Z]/g,Yi=new Set(["table","tbody","thead","tfoot","tr"]),Xi=new Set(["td","th"]),Nn="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function Qi(e,n){if(!n||n.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const t=n.filePath||void 0;let r;if(n.development){if(typeof n.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=rl(t,n.jsxDEV)}else{if(typeof n.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof n.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=nl(t,n.jsx,n.jsxs)}const l={Fragment:n.Fragment,ancestors:[],components:n.components||{},create:r,elementAttributeNameCase:n.elementAttributeNameCase||"react",evaluater:n.createEvaluater?n.createEvaluater():void 0,filePath:t,ignoreInvalidStyle:n.ignoreInvalidStyle||!1,passKeys:n.passKeys!==!1,passNode:n.passNode||!1,schema:n.space==="svg"?St:Oi,stylePropertyNameCase:n.stylePropertyNameCase||"dom",tableCellAlignToStyle:n.tableCellAlignToStyle!==!1},o=Mn(l,e,void 0);return o&&typeof o!="string"?o:l.create(e,l.Fragment,{children:o||void 0},void 0)}function Mn(e,n,t){if(n.type==="element")return Ki(e,n,t);if(n.type==="mdxFlowExpression"||n.type==="mdxTextExpression")return Gi(e,n);if(n.type==="mdxJsxFlowElement"||n.type==="mdxJsxTextElement")return Zi(e,n,t);if(n.type==="mdxjsEsm")return Ji(e,n);if(n.type==="root")return el(e,n,t);if(n.type==="text")return tl(e,n)}function Ki(e,n,t){const r=e.schema;let l=r;n.tagName.toLowerCase()==="svg"&&r.space==="html"&&(l=St,e.schema=l),e.ancestors.push(n);const o=Bn(e,n.tagName,!1),i=il(e,n);let a=Pt(e,n);return Yi.has(n.tagName)&&(a=a.filter(function(s){return typeof s=="string"?!Ii(s):!0})),jn(e,i,o,n),At(i,a),e.ancestors.pop(),e.schema=r,e.create(n,o,i,t)}function Gi(e,n){if(n.data&&n.data.estree&&e.evaluater){const r=n.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}$e(e,n.position)}function Ji(e,n){if(n.data&&n.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(n.data.estree);$e(e,n.position)}function Zi(e,n,t){const r=e.schema;let l=r;n.name==="svg"&&r.space==="html"&&(l=St,e.schema=l),e.ancestors.push(n);const o=n.name===null?e.Fragment:Bn(e,n.name,!0),i=ll(e,n),a=Pt(e,n);return jn(e,i,o,n),At(i,a),e.ancestors.pop(),e.schema=r,e.create(n,o,i,t)}function el(e,n,t){const r={};return At(r,Pt(e,n)),e.create(n,e.Fragment,r,t)}function tl(e,n){return n.value}function jn(e,n,t,r){typeof t!="string"&&t!==e.Fragment&&e.passNode&&(n.node=r)}function At(e,n){if(n.length>0){const t=n.length>1?n:n[0];t&&(e.children=t)}}function nl(e,n,t){return r;function r(l,o,i,a){const u=Array.isArray(i.children)?t:n;return a?u(o,i,a):u(o,i)}}function rl(e,n){return t;function t(r,l,o,i){const a=Array.isArray(o.children),s=vt(r);return n(l,o,i,a,{columnNumber:s?s.column-1:void 0,fileName:e,lineNumber:s?s.line:void 0},void 0)}}function il(e,n){const t={};let r,l;for(l in n.properties)if(l!=="children"&&Tt.call(n.properties,l)){const o=ol(e,l,n.properties[l]);if(o){const[i,a]=o;e.tableCellAlignToStyle&&i==="align"&&typeof a=="string"&&Xi.has(n.tagName)?r=a:t[i]=a}}if(r){const o=t.style||(t.style={});o[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return t}function ll(e,n){const t={};for(const r of n.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const o=r.data.estree.body[0];o.type;const i=o.expression;i.type;const a=i.properties[0];a.type,Object.assign(t,e.evaluater.evaluateExpression(a.argument))}else $e(e,n.position);else{const l=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 $e(e,n.position);else o=r.value===null?!0:r.value;t[l]=o}return t}function Pt(e,n){const t=[];let r=-1;const l=e.passKeys?new Map:Wi;for(;++r<n.children.length;){const o=n.children[r];let i;if(e.passKeys){const s=o.type==="element"?o.tagName:o.type==="mdxJsxFlowElement"||o.type==="mdxJsxTextElement"?o.name:void 0;if(s){const u=l.get(s)||0;i=s+"-"+u,l.set(s,u+1)}}const a=Mn(e,o,i);a!==void 0&&t.push(a)}return t}function ol(e,n,t){const r=Li(e.schema,n);if(!(t==null||typeof t=="number"&&Number.isNaN(t))){if(Array.isArray(t)&&(t=r.commaSeparated?wi(t):Ni(t)),r.property==="style"){let l=typeof t=="object"?t:al(e,String(t));return e.stylePropertyNameCase==="css"&&(l=sl(l)),["style",l]}return[e.elementAttributeNameCase==="react"&&r.space?Di[r.property]||r.property:r.attribute,t]}}function al(e,n){try{return Vi(n,{reactCompat:!0})}catch(t){if(e.ignoreInvalidStyle)return{};const r=t,l=new re("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw l.file=e.filePath||void 0,l.url=Nn+"#cannot-parse-style-attribute",l}}function Bn(e,n,t){let r;if(!t)r={type:"Literal",value:n};else if(n.includes(".")){const l=n.split(".");let o=-1,i;for(;++o<l.length;){const a=yn(l[o])?{type:"Identifier",name:l[o]}:{type:"Literal",value:l[o]};i=i?{type:"MemberExpression",object:i,property:a,computed:!!(o&&a.type==="Literal"),optional:!1}:a}r=i}else r=yn(n)&&!/^[a-z]/.test(n)?{type:"Identifier",name:n}:{type:"Literal",value:n};if(r.type==="Literal"){const l=r.value;return Tt.call(e.components,l)?e.components[l]:l}if(e.evaluater)return e.evaluater.evaluateExpression(r);$e(e)}function $e(e,n){const t=new re("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:n,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw t.file=e.filePath||void 0,t.url=Nn+"#cannot-handle-mdx-estrees-without-createevaluater",t}function sl(e){const n={};let t;for(t in e)Tt.call(e,t)&&(n[ul(t)]=e[t]);return n}function ul(e){let n=e.replace($i,cl);return n.slice(0,3)==="ms-"&&(n="-"+n),n}function cl(e){return"-"+e.toLowerCase()}const Dt={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"]},fl={};function Rt(e,n){const t=fl,r=typeof t.includeImageAlt=="boolean"?t.includeImageAlt:!0,l=typeof t.includeHtml=="boolean"?t.includeHtml:!0;return Un(e,r,l)}function Un(e,n,t){if(hl(e)){if("value"in e)return e.type==="html"&&!t?"":e.value;if(n&&"alt"in e&&e.alt)return e.alt;if("children"in e)return Hn(e.children,n,t)}return Array.isArray(e)?Hn(e,n,t):""}function Hn(e,n,t){const r=[];let l=-1;for(;++l<e.length;)r[l]=Un(e[l],n,t);return r.join("")}function hl(e){return!!(e&&typeof e=="object")}const Vn=document.createElement("i");function _t(e){const n="&"+e+";";Vn.innerHTML=n;const t=Vn.textContent;return t.charCodeAt(t.length-1)===59&&e!=="semi"||t===n?!1:t}function fe(e,n,t,r){const l=e.length;let o=0,i;if(n<0?n=-n>l?0:l+n:n=n>l?l:n,t=t>0?t:0,r.length<1e4)i=Array.from(r),i.unshift(n,t),e.splice(...i);else for(t&&e.splice(n,t);o<r.length;)i=r.slice(o,o+1e4),i.unshift(n,0),e.splice(...i),o+=1e4,n+=1e4}function me(e,n){return e.length>0?(fe(e,e.length,0,n),e):n}const qn={}.hasOwnProperty;function Wn(e){const n={};let t=-1;for(;++t<e.length;)pl(n,e[t]);return n}function pl(e,n){let t;for(t in n){const l=(qn.call(e,t)?e[t]:void 0)||(e[t]={}),o=n[t];let i;if(o)for(i in o){qn.call(l,i)||(l[i]=[]);const a=o[i];ml(l[i],Array.isArray(a)?a:a?[a]:[])}}}function ml(e,n){let t=-1;const r=[];for(;++t<n.length;)(n[t].add==="after"?e:r).push(n[t]);fe(e,0,0,r)}function $n(e,n){const t=Number.parseInt(e,n);return t<9||t===11||t>13&&t<32||t>126&&t<160||t>55295&&t<57344||t>64975&&t<65008||(t&65535)===65535||(t&65535)===65534||t>1114111?"�":String.fromCodePoint(t)}function ge(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const le=ve(/[A-Za-z]/),ie=ve(/[\dA-Za-z]/),dl=ve(/[#-'*+\--9=?A-Z^-~]/);function rt(e){return e!==null&&(e<32||e===127)}const Lt=ve(/\d/),gl=ve(/[\dA-Fa-f]/),xl=ve(/[!-/:-@[-`{-~]/);function O(e){return e!==null&&e<-2}function $(e){return e!==null&&(e<0||e===32)}function U(e){return e===-2||e===-1||e===32}const it=ve(new RegExp("\\p{P}|\\p{S}","u")),Ae=ve(/\s/);function ve(e){return n;function n(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function ze(e){const n=[];let t=-1,r=0,l=0;for(;++t<e.length;){const o=e.charCodeAt(t);let i="";if(o===37&&ie(e.charCodeAt(t+1))&&ie(e.charCodeAt(t+2)))l=2;else if(o<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(o))||(i=String.fromCharCode(o));else if(o>55295&&o<57344){const a=e.charCodeAt(t+1);o<56320&&a>56319&&a<57344?(i=String.fromCharCode(o,a),l=1):i="�"}else i=String.fromCharCode(o);i&&(n.push(e.slice(r,t),encodeURIComponent(i)),r=t+l+1,i=""),l&&(t+=l,l=0)}return n.join("")+e.slice(r)}function V(e,n,t,r){const l=r?r-1:Number.POSITIVE_INFINITY;let o=0;return i;function i(s){return U(s)?(e.enter(t),a(s)):n(s)}function a(s){return U(s)&&o++<l?(e.consume(s),a):(e.exit(t),n(s))}}const yl={tokenize:kl};function kl(e){const n=e.attempt(this.parser.constructs.contentInitial,r,l);let t;return n;function r(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),V(e,n,"linePrefix")}function l(a){return e.enter("paragraph"),o(a)}function o(a){const s=e.enter("chunkText",{contentType:"text",previous:t});return t&&(t.next=s),t=s,i(a)}function i(a){if(a===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(a);return}return O(a)?(e.consume(a),e.exit("chunkText"),o):(e.consume(a),i)}}const bl={tokenize:wl},Yn={tokenize:Cl};function wl(e){const n=this,t=[];let r=0,l,o,i;return a;function a(C){if(r<t.length){const A=t[r];return n.containerState=A[1],e.attempt(A[0].continuation,s,u)(C)}return u(C)}function s(C){if(r++,n.containerState._closeFlow){n.containerState._closeFlow=void 0,l&&S();const A=n.events.length;let D=A,y;for(;D--;)if(n.events[D][0]==="exit"&&n.events[D][1].type==="chunkFlow"){y=n.events[D][1].end;break}x(r);let _=A;for(;_<n.events.length;)n.events[_][1].end={...y},_++;return fe(n.events,D+1,0,n.events.slice(A)),n.events.length=_,u(C)}return a(C)}function u(C){if(r===t.length){if(!l)return m(C);if(l.currentConstruct&&l.currentConstruct.concrete)return g(C);n.interrupt=!!(l.currentConstruct&&!l._gfmTableDynamicInterruptHack)}return n.containerState={},e.check(Yn,f,c)(C)}function f(C){return l&&S(),x(r),m(C)}function c(C){return n.parser.lazy[n.now().line]=r!==t.length,i=n.now().offset,g(C)}function m(C){return n.containerState={},e.attempt(Yn,h,g)(C)}function h(C){return r++,t.push([n.currentConstruct,n.containerState]),m(C)}function g(C){if(C===null){l&&S(),x(0),e.consume(C);return}return l=l||n.parser.flow(n.now()),e.enter("chunkFlow",{_tokenizer:l,contentType:"flow",previous:o}),k(C)}function k(C){if(C===null){E(e.exit("chunkFlow"),!0),x(0),e.consume(C);return}return O(C)?(e.consume(C),E(e.exit("chunkFlow")),r=0,n.interrupt=void 0,a):(e.consume(C),k)}function E(C,A){const D=n.sliceStream(C);if(A&&D.push(null),C.previous=o,o&&(o.next=C),o=C,l.defineSkip(C.start),l.write(D),n.parser.lazy[C.start.line]){let y=l.events.length;for(;y--;)if(l.events[y][1].start.offset<i&&(!l.events[y][1].end||l.events[y][1].end.offset>i))return;const _=n.events.length;let F=_,q,b;for(;F--;)if(n.events[F][0]==="exit"&&n.events[F][1].type==="chunkFlow"){if(q){b=n.events[F][1].end;break}q=!0}for(x(r),y=_;y<n.events.length;)n.events[y][1].end={...b},y++;fe(n.events,F+1,0,n.events.slice(_)),n.events.length=y}}function x(C){let A=t.length;for(;A-- >C;){const D=t[A];n.containerState=D[1],D[0].exit.call(n,e)}t.length=C}function S(){l.write([null]),o=void 0,l=void 0,n.containerState._closeFlow=void 0}}function Cl(e,n,t){return V(e,e.attempt(this.parser.constructs.document,n,t),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Fe(e){if(e===null||$(e)||Ae(e))return 1;if(it(e))return 2}function lt(e,n,t){const r=[];let l=-1;for(;++l<e.length;){const o=e[l].resolveAll;o&&!r.includes(o)&&(n=o(n,t),r.push(o))}return n}const zt={name:"attention",resolveAll:Sl,tokenize:El};function Sl(e,n){let t=-1,r,l,o,i,a,s,u,f;for(;++t<e.length;)if(e[t][0]==="enter"&&e[t][1].type==="attentionSequence"&&e[t][1]._close){for(r=t;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&n.sliceSerialize(e[r][1]).charCodeAt(0)===n.sliceSerialize(e[t][1]).charCodeAt(0)){if((e[r][1]._close||e[t][1]._open)&&(e[t][1].end.offset-e[t][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[t][1].end.offset-e[t][1].start.offset)%3))continue;s=e[r][1].end.offset-e[r][1].start.offset>1&&e[t][1].end.offset-e[t][1].start.offset>1?2:1;const c={...e[r][1].end},m={...e[t][1].start};Xn(c,-s),Xn(m,s),i={type:s>1?"strongSequence":"emphasisSequence",start:c,end:{...e[r][1].end}},a={type:s>1?"strongSequence":"emphasisSequence",start:{...e[t][1].start},end:m},o={type:s>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[t][1].start}},l={type:s>1?"strong":"emphasis",start:{...i.start},end:{...a.end}},e[r][1].end={...i.start},e[t][1].start={...a.end},u=[],e[r][1].end.offset-e[r][1].start.offset&&(u=me(u,[["enter",e[r][1],n],["exit",e[r][1],n]])),u=me(u,[["enter",l,n],["enter",i,n],["exit",i,n],["enter",o,n]]),u=me(u,lt(n.parser.constructs.insideSpan.null,e.slice(r+1,t),n)),u=me(u,[["exit",o,n],["enter",a,n],["exit",a,n],["exit",l,n]]),e[t][1].end.offset-e[t][1].start.offset?(f=2,u=me(u,[["enter",e[t][1],n],["exit",e[t][1],n]])):f=0,fe(e,r-1,t-r+3,u),t=r+u.length-f-2;break}}for(t=-1;++t<e.length;)e[t][1].type==="attentionSequence"&&(e[t][1].type="data");return e}function El(e,n){const t=this.parser.constructs.attentionMarkers.null,r=this.previous,l=Fe(r);let o;return i;function i(s){return o=s,e.enter("attentionSequence"),a(s)}function a(s){if(s===o)return e.consume(s),a;const u=e.exit("attentionSequence"),f=Fe(s),c=!f||f===2&&l||t.includes(s),m=!l||l===2&&f||t.includes(r);return u._open=!!(o===42?c:c&&(l||!m)),u._close=!!(o===42?m:m&&(f||!c)),n(s)}}function Xn(e,n){e.column+=n,e.offset+=n,e._bufferIndex+=n}const vl={name:"autolink",tokenize:Il};function Il(e,n,t){let r=0;return l;function l(h){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(h),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),o}function o(h){return le(h)?(e.consume(h),i):h===64?t(h):u(h)}function i(h){return h===43||h===45||h===46||ie(h)?(r=1,a(h)):u(h)}function a(h){return h===58?(e.consume(h),r=0,s):(h===43||h===45||h===46||ie(h))&&r++<32?(e.consume(h),a):(r=0,u(h))}function s(h){return h===62?(e.exit("autolinkProtocol"),e.enter("autolinkMar