@eshal-bot/chat-widget 0.2.23 → 0.2.24

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.
@@ -17,7 +17,7 @@ var Oe={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24
17
17
  *
18
18
  * This source code is licensed under the ISC license.
19
19
  * See the LICENSE file in the root directory of this source tree.
20
- */let st=null;function lt(t){e.useEffect(()=>{if(!rt||!t)return;const e=t.split(",")[0]?.trim();if(!e||it.has(e))return;if((e=>{const t=e.trim().toLowerCase();return!t||!!ot.has(t)||at.some(e=>t.includes(e))})(e))return void it.add(e);let n=!0;return(async()=>{try{st||(st=Promise.resolve().then(function(){return Xr}));const t=await st,r=t&&"default"in t?t.default:t,o=(e=>e.trim().replace(/\s+/g,"+"))(e);r.load({google:{families:[`${o}:300,400,500,600,700`]},fontactive:e=>{n&&it.add(e)},fontinactive:e=>{n&&it.add(e),console.warn(`Warning: failed to load Google Font: ${e}`)}})}catch(e){console.error("Warning: WebFont loader error:",e)}})(),()=>{n=!1}},[t])}function ct(e){return"string"==typeof e&&/^https?:\/\//i.test(e)?e:void 0}const ut="__eshalChatWidgetCitationContext",dt="undefined"!=typeof window?window:"undefined"!=typeof globalThis?globalThis:void 0,pt=dt?dt[ut]||(dt[ut]=e.createContext(null)):e.createContext(null);function ft(e){return!!e&&(function(e){return!!e&&String(e.source_id||e.sourceid||"").startsWith("attachment:")}(e)?"string"==typeof e.url&&e.url.length>0:!("string"!=typeof(t=e.url)||!t.includes("/api/v1/sharepoint/file/"))||Boolean(e.source_id));var t}function gt(e,t){return"string"!=typeof e||""===e?"":/^https?:\/\//i.test(e)?e:t?`${String(t).replace(/\/$/,"")}${e.startsWith("/")?"":"/"}${e}`:e}function mt(){return Promise.resolve().then(function(){return t3})}const ht=e.lazy(mt);class bt extends e.Component{state={failed:!1};static getDerivedStateFromError(){return{failed:!0}}componentDidCatch(e){console.error("[widget] markdown chunk failed to load, showing plain text:",e)}render(){return this.state.failed?this.props.fallback:this.props.children}}const yt=/(```|`[^`]+`|(^|\n)\s{0,3}#{1,6}\s|(^|\n)\s*[-*+]\s|(^|\n)\s*\d+\.\s|(^|\n)\s*>\s|\[[^\]]*\]\([^)]*\)|\*\*|__|~~|(^|\n)\s*\||\[\d+\])/;const vt=({content:e,isDark:t,textColor:r,fontFamily:o,fontSize:a})=>n.jsx("p",{className:"leading-relaxed [&:first-child]:!mt-0 whitespace-pre-wrap break-words",style:{color:r||(t?"#f3f4f6":"#1A1A1A"),fontFamily:o||"Inter",fontSize:a||"14px",margin:0,lineHeight:"1.6",padding:0,overflowWrap:"break-word"},children:e}),wt=({content:t,isStreaming:r,isDark:o=!1,isRtl:a=!1,textColor:i,fontFamily:s,fontSize:l,onButtonClick:c,provideCitations:u=!0})=>{const[d,p]=e.useState(""),[f,g]=e.useState(!1),m=e.useRef(t),h=e.useRef(0),b=e.useRef(null),y=e.useRef(0);e.useEffect(()=>{if(t!==m.current){if(m.current=t,h.current>=t.length)return p(t),void g(!1);t.length<d.length&&(h.current=0,p(""))}if(!r)return p(t),g(!1),void(b.current&&cancelAnimationFrame(b.current));g(!0);const e=n=>{if(n-y.current<16)b.current=requestAnimationFrame(e);else if(y.current=n,h.current<t.length){const n=Math.max(2,Math.floor(4*Math.random())),r=Math.min(h.current+n,t.length);p(t.slice(0,r)),h.current=r,b.current=requestAnimationFrame(e)}else g(!1)};return b.current=requestAnimationFrame(e),()=>{b.current&&cancelAnimationFrame(b.current)}},[t,r]);const v=function(e){return"string"==typeof e&&0!==e.length&&yt.test(e)}(d);return n.jsxs("div",{className:"relative",dir:"auto",style:{textAlign:a?"right":"left",color:i||(o?"#f3f4f6":"#1A1A1A"),fontFamily:s||"Inter",fontSize:l||"14px",margin:0,padding:0},children:[v?n.jsx(bt,{fallback:n.jsx(vt,{content:d,isDark:o,textColor:i,fontFamily:s,fontSize:l}),children:n.jsx(e.Suspense,{fallback:n.jsx(vt,{content:d,isDark:o,textColor:i,fontFamily:s,fontSize:l}),children:n.jsx(ht,{content:d,isStreaming:r,isDark:o,isRtl:a,textColor:i,fontFamily:s,fontSize:l,onButtonClick:c,provideCitations:u})})}):n.jsx(vt,{content:d,isDark:o,textColor:i,fontFamily:s,fontSize:l}),f&&n.jsx("span",{className:"inline-block w-1.5 h-4 bg-blue-500 ms-0.5 animate-pulse align-text-bottom",style:{animationDuration:"0.8s"}})]})},St=({isDark:e,t:t})=>n.jsxs("div",{className:"flex gap-1.5",role:"status","aria-label":t("agentIsTyping"),children:[n.jsx("div",{className:`w-2 h-2 rounded-full ${e?"bg-gray-500":"bg-gray-400"} animate-bounce`,style:{animationDelay:"0ms"},"aria-hidden":"true"}),n.jsx("div",{className:`w-2 h-2 rounded-full ${e?"bg-gray-500":"bg-gray-400"} animate-bounce`,style:{animationDelay:"150ms"},"aria-hidden":"true"}),n.jsx("div",{className:`w-2 h-2 rounded-full ${e?"bg-gray-500":"bg-gray-400"} animate-bounce`,style:{animationDelay:"300ms"},"aria-hidden":"true"})]}),xt=({question:e,options:t,onDecision:r,disabled:o,isDark:a=!1})=>n.jsxs("div",{className:"mt-3 p-3 rounded-lg border "+(a?"bg-blue-900/30 border-blue-700/50":"bg-blue-50 border-blue-200"),children:[n.jsx("p",{className:"text-sm font-medium mb-2 "+(a?"text-gray-100":"text-gray-900"),children:e}),n.jsx("div",{className:"space-y-2",children:t.map(e=>n.jsx("button",{onClick:()=>r(e.id,e.label),disabled:o,className:"w-full text-left px-3 py-2 text-sm rounded transition-all "+(a?"bg-gray-800 border border-gray-700 hover:bg-blue-900/50 hover:border-blue-600 disabled:opacity-50 disabled:cursor-not-allowed":"bg-white border border-gray-300 hover:bg-blue-50 hover:border-blue-400 disabled:opacity-50 disabled:cursor-not-allowed"),children:e.label},e.id))})]});function Et({content:t,isDark:r}){const[o,a]=e.useState(!1),i=e.useCallback(()=>{t&&(navigator.clipboard?.writeText(t).catch(()=>{}),a(!0),setTimeout(()=>a(!1),1500))},[t]);return n.jsx("button",{type:"button",onClick:i,className:"p-0.5 rounded transition-colors "+(r?"text-gray-500 hover:text-gray-300":"text-gray-400 hover:text-gray-600"),style:{border:"none",background:"transparent",appearance:"none",WebkitAppearance:"none",cursor:"pointer"},"aria-label":o?"Copied":"Copy message",title:o?"Copied":"Copy message",children:o?n.jsx(Pe,{className:"w-3 h-3 text-green-500"}):n.jsx(Fe,{className:"w-3 h-3"})})}const kt=({message:t,formatTime:r,isDark:o,primaryColor:a,agentMessageBubbleColor:i,resolvedAgentBubbleColor:s,textColor:l,assistantTextColor:c,fontFamily:u,agentMessageBubbleFontFamily:d,agentMessageBubbleFontSize:p,fontSize:f,isRtl:g,onDecision:m,companyLogo:h,conciergeName:b,companyName:y,apiBaseUrl:v,getAuthToken:w,onPromptSuggestionClick:S,allowFeedback:x=!0,provideCitations:E=!0,onFeedback:k,headerTextColor:A,t:T})=>{const O="string"==typeof t.content?t.content:"",C=t.isProcessing&&(!O||0===O.length),I=q(O,g),[N,R]=e.useState(()=>t?.feedback??null),[_,P]=e.useState(!1),[L,D]=e.useState(null),[M,j]=e.useState(""),F=e.useRef(null),B=e.useCallback(e=>{if(k&&O){if(N===e)return R(null),P(!1),D(null),j(""),void k(O,null);if("like"===e)return R("like"),P(!1),D(null),j(""),void k(O,"like");R(null),D("dislike"),P(!0),j(""),setTimeout(()=>F.current?.focus(),100)}},[N,k,O]),U=e.useCallback(()=>{k&&O&&L&&(R(L),k(O,L,M.trim()||void 0),P(!1),j(""),D(null))},[k,O,L,M]),z=e.useCallback(()=>{P(!1),j(""),D(null)},[]),$=!0===t?.isError,G=$?o?"rgba(239,68,68,0.15)":"#fee2e2":null!=s?s:null!=i?i:o?"#1f2937":"#FFFFFF",H=null!=i&&"#ffffff"!==i&&"#FFFFFF"!==i&&"#1f2937"!==i,V=$?o?"#fca5a5":"#991b1b":null!=c?c:null!=l?l:o?"#f3f4f6":"#1A1A1A",W=null!=d?d:null!=u?u:"Inter",Y=null!=p?p:null!=f?f:"14px";lt(W);const{onSourceActivate:K,downloadingKey:X}=function({apiBaseUrl:t,getAuthToken:n}){const[r,o]=e.useState(null),a=e.useCallback(async e=>{if(!e)return;const r=e.url||e.source_id||e.sourceid||e.source_name||"",a=String(e.source_id||e.sourceid||"").startsWith("attachment:"),i="string"==typeof e.url&&e.url.includes("/api/v1/sharepoint/file/"),s="file"===e.source_type||i||a||!(!e.source_id&&!e.sourceid)&&!e.url;if(!s){const t=ct(e.url);if(t)try{window.open(t,"_blank","noopener,noreferrer")}catch{}return}if(t||a){o(r),console.debug("[widget] citation download starting:",{source_id:e.source_id||e.sourceid,source_name:e.source_name,source_type:e.source_type,isAttachment:a,isSharePointProxy:i,isFileLike:s});try{let r;if(a){if(!e.url)throw new Error("attachment has no URL");const o={};if("function"==typeof n){const e=await n();e&&(o.Authorization=`Bearer ${e}`)}r=await fetch(gt(e.url,t),{method:"GET",headers:o,credentials:"include"})}else if(i){const o=gt(e.url,t),a={};if("function"==typeof n){const e=await n();e&&(a.Authorization=`Bearer ${e}`)}r=await fetch(o,{method:"GET",headers:a,credentials:"include"})}else{const o=`${t.replace(/\/$/,"")}/api/v1/support/file-download`,a={"Content-Type":"application/json"};if("function"==typeof n){const e=await n();e&&(a.Authorization=`Bearer ${e}`)}r=await fetch(o,{method:"POST",headers:a,credentials:"include",body:JSON.stringify({source_id:e.source_id||e.sourceid,file_name:e.url||"",source_name:e.source_name||""})})}if(!r.ok){const e=await r.json().catch(()=>({}));throw new Error(e.details||e.error||r.statusText)}const o=await r.blob(),s=r.headers.get("content-disposition");let l=e.source_name||"download";if(!a){const e=s&&/filename\*?=(?:UTF-8'')?["']?([^"'\s;]+)["']?/i.exec(s);if(e)try{l=decodeURIComponent(e[1].replace(/\\"/g,'"'))}catch{}}const c=document.createElement("a"),u=URL.createObjectURL(o);c.href=u,c.download=l,document.body.appendChild(c),c.click(),c.remove(),URL.revokeObjectURL(u)}catch(e){console.error("[widget] source download failed:",e)}finally{o(null)}}else console.warn("[widget] citation download skipped: apiBaseUrl missing and source is not an attachment (no fallback URL to fetch). Source:",e)},[t,n]);return{onSourceActivate:a,downloadingKey:r}}({apiBaseUrl:v,getAuthToken:w}),Z=e.useMemo(()=>({sources:t.sources||[],sourcesPreliminary:!!t.sourcesPreliminary,onSourceActivate:K,downloadingKey:X,textColor:V}),[t.sources,t.sourcesPreliminary,K,X,V]);return n.jsx(pt.Provider,{value:Z,children:n.jsxs("div",{className:"flex gap-3 flex-row animate-in min-w-0",children:[n.jsx("div",{className:"flex-shrink-0 mt-1",children:n.jsx("div",{className:"w-8 h-8 rounded-full overflow-hidden flex items-center justify-center",style:{backgroundColor:a||"#2563eb"},children:h?n.jsx("div",{className:"w-full h-full bg-white/10 flex items-center justify-center",children:n.jsx("img",{src:h,alt:b||y||"Assistant avatar",className:"object-contain rounded-full",style:{width:"100%",height:"100%"}})}):n.jsx("div",{className:"w-full h-full flex items-center justify-center",style:{fontSize:"18px",fontFamily:u||"Inter",color:A||"#FFFFFF"},children:(b||"A").charAt(0).toUpperCase()})})}),n.jsxs("div",{className:"flex flex-col items-start min-w-0 max-w-[75%]",children:[n.jsx("div",{className:"rounded-2xl px-4 py-2.5 shadow-sm border rounded-tl-sm rtl:rounded-tl-2xl rtl:rounded-tr-sm min-w-0 max-w-full overflow-hidden "+(H?"border-transparent":o?"border-gray-700":"border-gray-200"),style:{backgroundColor:G,color:V,fontFamily:W,fontSize:Y,direction:I?"rtl":"ltr",textAlign:I?"right":"left",...H?{borderColor:`${G}33`}:{}},children:C?n.jsx(St,{isDark:o,t:T}):n.jsx(n.Fragment,{children:t.requiresDecision&&t.decisionData&&m?n.jsxs("div",{children:[O&&n.jsx("div",{className:"mb-3",children:n.jsx(wt,{content:O,isStreaming:t.isProcessing,isDark:o,isRtl:I,textColor:V,fontFamily:W,fontSize:Y,onButtonClick:S,provideCitations:E})}),n.jsx(xt,{question:t.decisionData.question,options:t.decisionData.options,onDecision:(e,n)=>m(t.decisionData.decisionId,e,n),disabled:!!t.decisionResponse,isDark:o}),t.decisionResponse&&n.jsxs("div",{className:"mt-2 text-xs "+(o?"text-gray-400":"text-gray-500"),children:["Selected: ",t.decisionResponse.selectedOption]})]}):O?n.jsx(n.Fragment,{children:n.jsx(wt,{content:O,isStreaming:t.isProcessing,isDark:o,isRtl:I,textColor:V,fontFamily:W,fontSize:Y,onButtonClick:S,provideCitations:E})}):null})}),n.jsxs("div",{className:"flex items-center gap-1.5 mt-1.5 px-1",children:[n.jsx("p",{className:"text-xs leading-none "+(o?"text-gray-400":"text-gray-500"),dir:"auto",children:r(t.timestamp)}),!C&&!t.isProcessing&&O&&n.jsx(Et,{content:O,isDark:o}),!1!==x&&k&&!C&&!t.isProcessing&&O&&"welcome"!==t.type&&!t.isWelcome&&n.jsxs("div",{className:"flex items-center gap-0.5 ms-0.5",children:[n.jsx("button",{type:"button",onClick:()=>B("like"),className:"p-0.5 rounded transition-colors "+("like"===N||"like"===L?"text-green-500":o?"text-gray-500 hover:text-gray-300":"text-gray-400 hover:text-gray-600"),style:{border:"none",background:"transparent",appearance:"none",WebkitAppearance:"none",cursor:"pointer"},"aria-label":"Like",children:n.jsx(et,{className:"w-3 h-3"})}),n.jsx("button",{type:"button",onClick:()=>B("dislike"),className:"p-0.5 rounded transition-colors "+("dislike"===N||"dislike"===L?"text-red-500":o?"text-gray-500 hover:text-gray-300":"text-gray-400 hover:text-gray-600"),style:{border:"none",background:"transparent",appearance:"none",WebkitAppearance:"none",cursor:"pointer"},"aria-label":"Dislike",children:n.jsx(Je,{className:"w-3 h-3"})})]})]}),_&&"dislike"===L&&n.jsxs("div",{className:"mt-2 w-full rounded-xl border p-3 shadow "+(o?"bg-gray-800 border-gray-700":"bg-white border-gray-200"),style:{direction:g?"rtl":"ltr"},children:[n.jsx("textarea",{ref:F,value:M,onChange:e=>j(e.target.value),onKeyDown:e=>{(e.metaKey||e.ctrlKey)&&"Enter"===e.key?(e.preventDefault(),U()):"Escape"===e.key&&(e.preventDefault(),z())},placeholder:T("feedbackPlaceholder"),"aria-label":T("feedbackPlaceholder"),rows:2,className:"w-full resize-none rounded-lg border px-2 py-1.5 text-xs focus:outline-none focus:ring-1 "+(o?"bg-gray-900 border-gray-700 text-gray-100 placeholder-gray-500 focus:ring-gray-600":"bg-white border-gray-200 text-gray-900 placeholder-gray-400 focus:ring-gray-300"),style:{fontFamily:W,textAlign:g?"right":"left"}}),n.jsxs("div",{className:"flex items-center justify-end gap-1.5 mt-1.5",children:[n.jsx("button",{type:"button",onClick:z,className:"text-xs px-2 py-1 rounded transition-colors "+(o?"text-gray-400 hover:text-gray-200":"text-gray-500 hover:text-gray-700"),style:{border:"none",background:"transparent",cursor:"pointer"},children:T("cancel")}),n.jsx("button",{type:"button",onClick:U,className:"text-xs px-2.5 py-1 rounded text-white transition-opacity hover:opacity-90",style:{backgroundColor:a||"#2563eb",border:"none",cursor:"pointer"},children:T("submit")})]})]})]})]})})},At=({message:e,formatTime:t,userMessageBoxColor:r,primaryColor:o,resolvedUserMessageColor:a,textColor:i,userTextColor:s,fontFamily:l,userMessageBubbleFontFamily:c,userMessageBubbleFontSize:u,fontSize:d,isDark:p,isRtl:f,t:g,onRetryMessage:m})=>{const h=null!=a?a:null!=r?r:null!=o?o:"#2563eb",b=null!=s?s:null!=i?i:"#FFFFFF",y=null!=c?c:null!=l?l:"Inter",v=null!=u?u:null!=d?d:"14px",w=q("string"==typeof e?.content?e.content:"",f);lt(y);const S=Array.isArray(e.attachments)?e.attachments:[];return n.jsx("div",{className:"flex gap-3 flex-row-reverse animate-in",children:n.jsxs("div",{className:"flex flex-col items-end max-w-[75%]",children:[S.length>0&&n.jsx("div",{className:"mb-1.5 flex flex-wrap justify-end gap-1.5",children:S.map((e,t)=>String(e.mimeType||"").startsWith("image/")&&e.url?n.jsx("a",{href:e.url,target:"_blank",rel:"noopener noreferrer",className:"block rounded-md overflow-hidden",style:{maxWidth:160},title:e.filename,children:n.jsx("img",{src:e.url,alt:e.filename||"attachment",style:{maxWidth:160,maxHeight:160,display:"block"}})},e.storageKey||t):n.jsxs("span",{className:"inline-flex items-center gap-1.5 rounded-full px-2.5 py-1 text-xs",style:{backgroundColor:p?"#1f2937":"#f3f4f6",color:p?"#e5e7eb":"#374151",border:"1px solid "+(p?"#374151":"#e5e7eb"),maxWidth:200},title:e.filename,children:[n.jsx($e,{size:12}),n.jsx("span",{className:"truncate",style:{maxWidth:140,direction:"ltr"},children:e.filename})]},e.storageKey||t))}),e.content&&""!==e.content.trim()&&n.jsx("div",{className:"rounded-2xl px-4 py-2.5 shadow-lg "+(w?"rounded-tl-sm":"rounded-tr-sm"),dir:"auto",style:{background:`linear-gradient(135deg, ${h} 0%, ${h}dd 100%)`,fontFamily:y,direction:w?"rtl":"ltr",textAlign:w?"right":"left"},children:n.jsx("p",{className:"whitespace-pre-wrap break-words",dir:"auto",style:{color:b,fontFamily:y,fontSize:v,lineHeight:"1.5",textAlign:w?"right":"left",overflowWrap:"break-word",margin:0,padding:0},children:e.content})}),n.jsxs("div",{className:"flex items-center gap-1.5 mt-1.5 px-1",children:[n.jsx("p",{className:"text-xs leading-none "+(p?"text-gray-400":"text-gray-500"),dir:"auto",children:t(e.timestamp)}),e.content&&""!==e.content.trim()&&n.jsx(Et,{content:e.content,isDark:p})]}),"failed"===e.status&&n.jsxs("div",{className:"flex items-center gap-1.5 mt-1 px-1","data-testid":"message-failed-state",children:[n.jsx("span",{className:"text-xs leading-none",style:{color:"#dc2626"},dir:"auto",children:g("messageNotDelivered")}),"function"==typeof m&&n.jsx("button",{type:"button",onClick:()=>m(e),className:"text-xs leading-none font-medium underline",style:{color:"#dc2626"},dir:"auto",children:g("retrySend")})]})]})})},Tt=({message:t,isDark:r,primaryColor:o,agentMessageBubbleColor:a,userMessageBoxColor:i,resolvedUserMessageColor:s,resolvedAgentBubbleColor:l,textColor:c,assistantTextColor:u,userTextColor:d,fontFamily:p,agentMessageBubbleFontFamily:f,agentMessageBubbleFontSize:g,userMessageBubbleFontFamily:m,userMessageBubbleFontSize:h,fontSize:b,formatTime:y,isRtl:v,onDecision:w,companyLogo:S,conciergeName:x,companyName:E,apiBaseUrl:k,getAuthToken:A,onPromptSuggestionClick:T,allowFeedback:O,provideCitations:C,onFeedback:I,headerTextColor:N,onRetryMessage:R,defaultLanguage:_="en"})=>{const P=e.useMemo(()=>V(_),[_]);return t?"user"===t.role?n.jsx(At,{message:t,formatTime:y,userMessageBoxColor:i,primaryColor:o,resolvedUserMessageColor:s,textColor:c,userTextColor:d,fontFamily:p,userMessageBubbleFontFamily:m,userMessageBubbleFontSize:h,fontSize:b,isDark:r,isRtl:v,t:P,onRetryMessage:R}):n.jsx(kt,{message:t,formatTime:y,isDark:r,primaryColor:o,agentMessageBubbleColor:a,resolvedAgentBubbleColor:l,textColor:c,assistantTextColor:u,fontFamily:p,agentMessageBubbleFontFamily:f,agentMessageBubbleFontSize:g,fontSize:b,isRtl:v,onDecision:w,companyLogo:S,conciergeName:x,companyName:E,apiBaseUrl:k,getAuthToken:A,onPromptSuggestionClick:T,allowFeedback:O,provideCitations:C,onFeedback:I,headerTextColor:N,t:P}):null};var Ot=e.memo(Tt);const Ct=(e,t,n)=>Number.isNaN(e)?t:Math.min(Math.max(e,t),n),It=e=>{if(!e)return null;const t=(e=>e?.trim().toLowerCase()??"")(e),n=(e=>{const t=e.match(/^#?([0-9a-f]{3}|[0-9a-f]{6})$/i);if(!t)return null;let n=t[1];3===n.length&&(n=n.split("").map(e=>`${e}${e}`).join(""));const r=parseInt(n.slice(0,2),16),o=parseInt(n.slice(2,4),16),a=parseInt(n.slice(4,6),16);return[r,o,a].some(e=>Number.isNaN(e))?null:{r:r,g:o,b:a}})(t);if(n)return n;const r=(e=>{const t=e.match(/^rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})(?:\s*,\s*(\d*\.?\d+))?\s*\)$/i);return t?{r:Ct(Number.parseInt(t[1],10),0,255),g:Ct(Number.parseInt(t[2],10),0,255),b:Ct(Number.parseInt(t[3],10),0,255)}:null})(t);return r||null},Nt=({r:e,g:t,b:n})=>{const r=e=>{const t=Ct(Math.round(e),0,255).toString(16);return 1===t.length?`0${t}`:t};return`#${r(e)}${r(t)}${r(n)}`},Rt=(e,t,n)=>{const r=Ct(n,0,1);return{r:Math.round(e.r+(t.r-e.r)*r),g:Math.round(e.g+(t.g-e.g)*r),b:Math.round(e.b+(t.b-e.b)*r)}},_t=(e,t)=>{const n=Ct(t,0,1);return`rgba(${Ct(Math.round(e.r),0,255)}, ${Ct(Math.round(e.g),0,255)}, ${Ct(Math.round(e.b),0,255)}, ${n})`},Pt={background:"#f8fafc",hoverBackground:"#f1f5f9",border:"#e2e8f0",hoverBorder:"#cbd5f5",shadow:"0 4px 12px rgba(15, 23, 42, 0.08)",hoverShadow:"0 6px 20px rgba(15, 23, 42, 0.14)"},Lt={background:"#1f2937",hoverBackground:"#27364a",border:"#334155",hoverBorder:"#3b4c63",shadow:"0 4px 12px rgba(15, 23, 42, 0.45)",hoverShadow:"0 6px 20px rgba(15, 23, 42, 0.55)"},Dt=(e,t)=>{const n=It(e);if(!n)return(e=>e?Lt:Pt)(t);const r=(({r:e,g:t,b:n})=>{const r=[e,t,n].map(e=>{const t=e/255;return t<=.03928?t/12.92:((t+.055)/1.055)**2.4});return.2126*r[0]+.7152*r[1]+.0722*r[2]})(n),o=It("#0f172a")??{r:15,g:23,b:42},a=It(t?"#f8fafc":"#f9fafb")??{r:249,g:250,b:251},i=It(t?"#334155":"#e2e8f0")??{r:226,g:232,b:240};let s,l;if(r>=.6){const e=t?.5:.7,r=Math.min(1,e+.15);s=Rt(n,o,e),l=Rt(n,o,r)}else if(r<=.35){const e=t?.9:.8,r=Math.min(1,e+(t?.05:.12));s=Rt(n,a,e),l=Rt(n,a,r)}else{const e=t?.45:.6,r=Math.min(1,e+.1);s=Rt(n,i,e),l=Rt(n,i,r)}const c=Rt(n,s,.65),u=Rt(n,l,.7),d=`0 4px 12px ${_t(n,t?.28:.12)}`,p=`0 6px 20px ${_t(n,t?.35:.18)}`;return{background:Nt(s),hoverBackground:Nt(l),border:Nt(c),hoverBorder:Nt(u),shadow:d,hoverShadow:p}},Mt=({questions:t,isDark:r,palette:o,resolvedTextColor:a,fontFamily:i,fontSize:s,isRtl:l,onQuestionClick:c,applyHoverState:u,headingLabel:d})=>{const p=e.useRef(null),[f,g]=e.useState(!1),[m,h]=e.useState(!1),b=e.useCallback(()=>{const e=p.current;if(!e)return;const{scrollLeft:t,scrollWidth:n,clientWidth:r}=e;g(Math.abs(t)>1),h(Math.abs(t)+r<n-1)},[]);e.useEffect(()=>{b();const e=p.current;if(!e)return;const t=new ResizeObserver(b);return t.observe(e),()=>t.disconnect()},[b,t]);const y=e.useCallback(e=>{const t=p.current;if(!t)return;const n="left"===e?-150:150;t.scrollBy({left:l?-n:n,behavior:"smooth"})},[l]),v=r?"rgba(31,41,55,0.85)":"rgba(255,255,255,0.85)",w=r?"#e5e7eb":"#374151",S=r?"#4b5563":"#d1d5db";return n.jsxs("div",{className:"px-4 py-4 border-t "+(r?"border-gray-700/50":"border-gray-200/60"),children:[n.jsxs("div",{className:"text-xs mb-3 font-semibold tracking-wide uppercase "+(r?"text-gray-400":"text-gray-500"),children:[d||"Quick questions",":"]}),n.jsxs("div",{className:"flex items-center gap-1.5",children:[n.jsx("button",{onClick:()=>y("left"),disabled:!f,"aria-label":"Scroll left",className:"flex-shrink-0 flex items-center justify-center w-7 h-7 rounded-full shadow-sm transition-all duration-200 hover:shadow-md active:scale-95",style:{backgroundColor:v,border:`1px solid ${S}`,color:w,backdropFilter:"blur(4px)",opacity:f?1:.35,cursor:f?"pointer":"default"},children:n.jsx(Le,{size:16})}),n.jsx("div",{ref:p,onScroll:b,className:"flex-1 flex gap-3 overflow-x-auto pb-2",style:{scrollBehavior:"smooth",WebkitOverflowScrolling:"touch",scrollbarWidth:"none",msOverflowStyle:"none"},children:t.map((e,t)=>{const r=q(e,l);return n.jsxs("button",{onClick:()=>c?.(e),className:"group relative text-sm px-5 py-2.5 rounded-full font-medium transition-all duration-300 hover:scale-105 active:scale-95 whitespace-nowrap flex-shrink-0 overflow-hidden backdrop-blur-sm "+(r?"text-right":"text-left"),style:{direction:r?"rtl":"ltr",backgroundColor:o.background,border:`1.5px solid ${o.border}`,boxShadow:o.shadow},onMouseEnter:e=>{u(e.currentTarget,!0),e.currentTarget.style.transform="translateY(-2px)"},onMouseLeave:e=>{u(e.currentTarget,!1),e.currentTarget.style.transform="translateY(0)"},children:[n.jsx("div",{className:"absolute inset-0 bg-gradient-to-br from-white/0 via-white/5 to-white/10 opacity-0 group-hover:opacity-100 transition-opacity duration-300 rounded-xl"}),n.jsx("span",{className:"relative z-10",style:{direction:r?"rtl":"ltr",color:a,fontFamily:i,fontSize:s,textAlign:r?"right":"left"},children:e})]},t)})}),n.jsx("button",{onClick:()=>y("right"),disabled:!m,"aria-label":"Scroll right",className:"flex-shrink-0 flex items-center justify-center w-7 h-7 rounded-full shadow-sm transition-all duration-200 hover:shadow-md active:scale-95",style:{backgroundColor:v,border:`1px solid ${S}`,color:w,backdropFilter:"blur(4px)",opacity:m?1:.35,cursor:m?"pointer":"default"},children:n.jsx(De,{size:16})})]})]})},jt=({questions:t=[],isDark:r=!1,primaryColor:o="#2563eb",onQuestionClick:a,isTyping:i=!1,layout:s="vertical",fontFamily:l="Inter",fontSize:c="14px",textColor:u,isRtl:d=!1,questionTextColor:p,questionBoxColor:f,resolvedUserMessageColor:g,userMessageBoxColor:m,userTextColor:h,headingLabel:b})=>{if(!t.length||i)return null;const y=p??u??(r?"#f3f4f6":"#111827"),v=e.useMemo(()=>Dt(y,r),[y,r]),w=(e,t)=>{e.style.backgroundColor=t?v.hoverBackground:v.background,e.style.borderColor=t?v.hoverBorder:v.border,e.style.boxShadow=t?v.hoverShadow:v.shadow};if("horizontal"===s)return n.jsx(Mt,{questions:t,isDark:r,palette:v,resolvedTextColor:y,fontFamily:l,fontSize:c,isRtl:d,onQuestionClick:a,applyHoverState:w,headingLabel:b});const S=g??m??o??"#2563eb",x=h??u??"#FFFFFF";return n.jsxs("div",{style:{paddingInlineStart:"50px"},children:[b?n.jsx("div",{className:"mb-2",style:{color:r?"#9ca3af":"#6b7280",fontFamily:l,fontSize:`calc(${c} - 1px)`},children:b}):null,n.jsx("div",{className:"flex flex-wrap gap-2",children:t.map((e,t)=>{const r=q(e,d);return n.jsx("button",{onClick:()=>a?.(e),className:"transition-all duration-200 active:scale-[0.97]",style:{direction:r?"rtl":"ltr",fontFamily:l,fontSize:c,color:x,backgroundColor:S,border:"none",borderRadius:"9999px",padding:"5px 14px",fontWeight:500,lineHeight:"1.4",whiteSpace:"normal",textAlign:r?"right":"left"},children:e},t)})})]})},Ft=({active:t=!1,processing:r=!1,deviceId:o,barWidth:a=3,barGap:i=1,barRadius:s=1.5,barColor:l,fadeEdges:c=!0,fadeWidth:u=24,barHeight:d=4,height:p=64,sensitivity:f=1,smoothingTimeConstant:g=.8,fftSize:m=256,historySize:h=60,updateRate:b=30,mode:y="static",onError:v,onStreamReady:w,onStreamEnd:S,className:x,...E})=>{const k=e.useRef(null),A=e.useRef(null),T=e.useRef([]),O=e.useRef(null),C=e.useRef(null),I=e.useRef(null),N=e.useRef(0),R=e.useRef(0),_=e.useRef(null),P=e.useRef([]),L=e.useRef(0),D=e.useRef([]),M=e.useRef(!0),j=e.useRef(null),F=e.useRef(0),B="number"==typeof p?`${p}px`:p;return e.useEffect(()=>{const e=k.current,t=A.current;if(!e||!t)return;const n=new ResizeObserver(()=>{const n=t.getBoundingClientRect(),r=window.devicePixelRatio||1;e.width=n.width*r,e.height=n.height*r,e.style.width=`${n.width}px`,e.style.height=`${n.height}px`;const o=e.getContext("2d");o&&o.scale(r,r),j.current=null,F.current=n.width,M.current=!0});return n.observe(t),()=>n.disconnect()},[]),e.useEffect(()=>{if(r&&!t){let e=0;L.current=0;const t=()=>{e+=.03,L.current=Math.min(1,L.current+.02);const n=[],r=Math.floor((A.current?.getBoundingClientRect().width||200)/(a+i));if("static"===y){const t=Math.floor(r/2);for(let o=0;o<r;o++){const r=(o-t)/t,a=1-.4*Math.abs(r),i=(.2+(.25*Math.sin(1.5*e+3*r)+.2*Math.sin(.8*e-2*r)+.15*Math.cos(2*e+r)))*a;let s=i;if(P.current.length>0&&L.current<1){const e=Math.min(o,P.current.length-1);s=(P.current[e]||0)*(1-L.current)+i*L.current}n.push(Math.max(.05,Math.min(1,s)))}}else for(let t=0;t<r;t++){const o=(t-r/2)/(r/2),a=1-.4*Math.abs(o),i=(.2+(.25*Math.sin(1.5*e+.15*t)+.2*Math.sin(.8*e-.1*t)+.15*Math.cos(2*e+.05*t)))*a;let s=i;if(P.current.length>0&&L.current<1){const e=Math.floor(t/r*P.current.length);s=(P.current[e]||0)*(1-L.current)+i*L.current}n.push(Math.max(.05,Math.min(1,s)))}"static"===y?D.current=n:T.current=n,M.current=!0,_.current=requestAnimationFrame(t)};return t(),()=>{_.current&&cancelAnimationFrame(_.current)}}if(!t&&!r){if("static"===y?D.current.length>0:T.current.length>0){let e=0;const t=()=>{e+=.03,e<1?("static"===y?D.current=D.current.map(t=>t*(1-e)):T.current=T.current.map(t=>t*(1-e)),M.current=!0,requestAnimationFrame(t)):"static"===y?D.current=[]:T.current=[]};t()}}},[r,t,a,i,y]),e.useEffect(()=>{if(!t)return I.current&&(I.current.getTracks().forEach(e=>e.stop()),I.current=null,S?.()),C.current&&"closed"!==C.current.state&&(C.current.close(),C.current=null),void(N.current&&(cancelAnimationFrame(N.current),N.current=0));return(async()=>{try{const e=await navigator.mediaDevices.getUserMedia({audio:o?{deviceId:{exact:o},echoCancellation:!0,noiseSuppression:!0,autoGainControl:!0}:{echoCancellation:!0,noiseSuppression:!0,autoGainControl:!0}});I.current=e,w?.(e);const t=new(window.AudioContext||window.webkitAudioContext),n=t.createAnalyser();n.fftSize=m,n.smoothingTimeConstant=g;t.createMediaStreamSource(e).connect(n),C.current=t,O.current=n,T.current=[]}catch(e){v?.(e)}})(),()=>{I.current&&(I.current.getTracks().forEach(e=>e.stop()),I.current=null,S?.()),C.current&&"closed"!==C.current.state&&(C.current.close(),C.current=null),N.current&&(cancelAnimationFrame(N.current),N.current=0)}},[t,o,m,g,v,w,S]),e.useEffect(()=>{const e=k.current;if(!e)return;const n=e.getContext("2d");if(!n)return;let o;const p=g=>{const m=e.getBoundingClientRect();if(t&&g-R.current>b&&(R.current=g,O.current)){const e=new Uint8Array(O.current.frequencyBinCount);if(O.current.getByteFrequencyData(e),"static"===y){const t=Math.floor(.05*e.length),n=Math.floor(.4*e.length),r=e.slice(t,n),o=Math.floor(m.width/(a+i)),s=Math.floor(o/2),l=[];for(let e=s-1;e>=0;e--){const t=Math.floor(e/s*r.length),n=Math.min(1,r[t]/255*f);l.push(Math.max(.05,n))}for(let e=0;e<s;e++){const t=Math.floor(e/s*r.length),n=Math.min(1,r[t]/255*f);l.push(Math.max(.05,n))}D.current=l,P.current=l}else{let t=0;const n=Math.floor(.05*e.length),r=Math.floor(.4*e.length),o=e.slice(n,r);for(let e=0;e<o.length;e++)t+=o[e];const a=t/o.length/255*f;T.current.push(Math.min(1,Math.max(.05,a))),P.current=[...T.current],T.current.length>h&&T.current.shift()}M.current=!0}if(!M.current&&!t)return void(o=requestAnimationFrame(p));M.current=t,n.clearRect(0,0,m.width,m.height);const v=l||getComputedStyle(e).color||"#000",w=a+i,S=Math.floor(m.width/w),x=m.height/2;if("static"===y){const e=r||t||D.current.length>0?D.current:[];for(let t=0;t<S&&t<e.length;t++){const r=e[t]||.1,o=t*w,i=Math.max(d,r*m.height*.8),l=x-i/2;n.fillStyle=v,n.globalAlpha=.4+.6*r,s>0?(n.beginPath(),n.roundRect(o,l,a,i,s),n.fill()):n.fillRect(o,l,a,i)}}else for(let e=0;e<S&&e<T.current.length;e++){const t=T.current.length-1-e,r=T.current[t]||.1,o=m.width-(e+1)*w,i=Math.max(d,r*m.height*.8),l=x-i/2;n.fillStyle=v,n.globalAlpha=.4+.6*r,s>0?(n.beginPath(),n.roundRect(o,l,a,i,s),n.fill()):n.fillRect(o,l,a,i)}if(c&&u>0&&m.width>0){if(!j.current||F.current!==m.width){const e=n.createLinearGradient(0,0,m.width,0),t=Math.min(.3,u/m.width);e.addColorStop(0,"rgba(255,255,255,1)"),e.addColorStop(t,"rgba(255,255,255,0)"),e.addColorStop(1-t,"rgba(255,255,255,0)"),e.addColorStop(1,"rgba(255,255,255,1)"),j.current=e,F.current=m.width}n.globalCompositeOperation="destination-out",n.fillStyle=j.current,n.fillRect(0,0,m.width,m.height),n.globalCompositeOperation="source-over"}n.globalAlpha=1,o=requestAnimationFrame(p)};return o=requestAnimationFrame(p),()=>{o&&cancelAnimationFrame(o)}},[t,r,f,b,h,a,d,i,s,l,c,u,y]),n.jsxs("div",{className:ee("relative h-full w-full",x),ref:A,style:{height:B},"aria-label":t?"Live audio waveform":r?"Processing audio":"Audio waveform idle",role:"img",...E,children:[!t&&!r&&n.jsx("div",{className:"border-muted-foreground/20 absolute top-1/2 right-0 left-0 -translate-y-1/2 border-t-2 border-dotted"}),n.jsx("canvas",{className:"block h-full w-full",ref:k,"aria-hidden":"true"})]})};function Bt(e){if(!e||"user"===e.role)return null;const t=e.metadata?.senderName;return"string"==typeof t&&t.trim()?t.trim():null}const Ut=e.createContext(void 0),zt=e=>String(e??"").trim().toLowerCase();function $t(e,t){for(let n=t+1;n<(e||[]).length;n+=1){const t=e[n];if("user"===t?.role&&!t.sendFailed)return"string"==typeof t.content?t.content:String(t.content??"")}}const Gt=({messages:t=[],isDark:r,primaryColor:o,isLoading:a,agentMessageBubbleColor:i,userMessageBoxColor:s,textColor:l,assistantTextColor:c,userTextColor:u,fontFamily:d,agentMessageBubbleFontFamily:p,agentMessageBubbleFontSize:f,userMessageBubbleFontFamily:g,userMessageBubbleFontSize:m,fontSize:h,formatTime:b,isRtl:y=!1,defaultLanguage:w="en",quickQuestions:S=[],shouldShowQuickQuestions:x=!1,onQuickQuestion:E,quickQuestionsLayout:k="vertical",onDecision:A,disclaimerEnabled:T=!1,disclaimerText:O,disclaimerPosition:C="top",disclaimerLinkUrl:I,disclaimerLinkLabel:N,resolvedAgentBubbleColor:R,resolvedUserMessageColor:_,resolvedTextColor:P,isVoiceSessionActive:L=!1,voiceStatus:D="idle",messagesContainerRef:M,companyLogo:j,chatbotAvatarEnabled:F,chatbotAvatar:B,conciergeName:U,companyName:z,apiBaseUrl:$,getAuthToken:G,onPromptSuggestionClick:V,conversationResetKey:W,allowFeedback:Y,provideCitations:K,onFeedback:X,headerTextColor:Z,onRetryMessage:Q,beforePromptsSlot:ee=null,promptsSlot:te=null,quickQuestionsHeadingLabel:ne})=>{const re=e.useRef(null),oe=e.useRef(!0),ae=e.useRef(!1),ie=e.useMemo(()=>t.map(e=>`${e.id}:${e.content?.length??0}:${e.isProcessing?1:0}`).join("|"),[t]),se=e.useCallback(()=>{const e=M?.current;if(!e)return;const t=e.scrollHeight-e.scrollTop-e.clientHeight;oe.current=t<160},[M]);e.useEffect(()=>{const e=M?.current;if(e)return e.addEventListener("scroll",se,{passive:!0}),se(),()=>{e.removeEventListener("scroll",se)}},[se,M]),e.useEffect(()=>{W&&(oe.current=!0,ae.current=!1)},[W]),e.useEffect(()=>{if(ae.current||0===t.length||"undefined"==typeof window)return;ae.current=!0;let e,n=!1;const r=window.requestAnimationFrame(()=>{n||(e=window.requestAnimationFrame(()=>{n||(re.current?.scrollIntoView({behavior:"instant",block:"end"}),oe.current=!0)}))});return()=>{n=!0,window.cancelAnimationFrame(r),window.cancelAnimationFrame(e)}},[0===t.length]),e.useEffect(()=>{if(!oe.current)return;if("undefined"==typeof window)return;let e=!1;const t=window.requestAnimationFrame(()=>{e||re.current?.scrollIntoView({behavior:"smooth",block:"end"})});return()=>{e=!0,window.cancelAnimationFrame(t)}},[ie,a]),e.useEffect(()=>{if(!L||"connected"!==D)return;if("undefined"==typeof window)return;let e=!1;const t=window.requestAnimationFrame(()=>{e||re.current?.scrollIntoView({behavior:"smooth",block:"end"})});return()=>{e=!0,window.cancelAnimationFrame(t)}},[L,D]);const le=e.useMemo(()=>J(I),[I]),ce=e.useMemo(()=>function(e){const t=new Map;if(!Array.isArray(e))return t;const n=new Set;for(const r of e){const e=Bt(r);if(!e||!r.id)continue;const o=!n.has(e);n.add(e),t.set(r.id,{name:e,joined:o})}return t}(t),[t]),ue=e.useMemo(()=>q(O,y),[O,y]);return n.jsxs(n.Fragment,{children:[T&&O&&"top"===C&&n.jsx("div",{className:"flex justify-center",children:n.jsx("div",{className:"rounded-lg px-2 py-1 ",style:{color:r?"#d1d5db":"#6b7280",fontFamily:null!=d?d:"Inter",fontSize:null!=h?`calc(${h} - 2px)`:"12px",direction:ue?"rtl":"ltr",textAlign:"center",borderColor:r?"#374151":"#e5e7eb"},children:n.jsxs("p",{className:"leading-relaxed whitespace-pre-wrap break-words inline",dir:ue?"rtl":"ltr",style:{color:r?"#d1d5db":"#6b7280",fontFamily:null!=d?d:"Inter",fontSize:null!=h?`calc(${h} - 2px)`:"12px"},children:[O,le&&N&&n.jsx("a",{href:le,target:"_blank",rel:"noopener noreferrer",title:le,style:{color:r?"#93c5fd":"#2563eb",marginInlineStart:"4px",verticalAlign:"middle",display:"inline-flex",alignItems:"center"},children:N})]})})}),t.map((e,a)=>{const v=ce.get(e.id);return n.jsxs(Ut.Provider,{value:"assistant"===e.role?$t(t,a):void 0,children:[v?.joined&&n.jsx("div",{role:"status","data-testid":"agent-joined-line",style:{textAlign:"center",fontSize:"12px",opacity:.7,margin:"8px 0"},children:H(w,"agentJoinedConversation").replace("{name}",v.name)}),v&&n.jsx("div",{"data-testid":"agent-sender-name",style:{fontSize:"12px",fontWeight:600,opacity:.8,margin:"0 0 2px 4px",textAlign:y?"right":"left"},children:v.name}),n.jsx(Ot,{message:e,isDark:r,primaryColor:o,agentMessageBubbleColor:i,userMessageBoxColor:s,resolvedUserMessageColor:_,resolvedAgentBubbleColor:R,textColor:l,assistantTextColor:c,userTextColor:u,fontFamily:d,agentMessageBubbleFontFamily:p,agentMessageBubbleFontSize:f,userMessageBubbleFontFamily:g,userMessageBubbleFontSize:m,fontSize:h,formatTime:b,isRtl:q(e.content,y),onDecision:A,onPromptSuggestionClick:V,companyLogo:F&&B?B:j,conciergeName:U,companyName:z,apiBaseUrl:$,getAuthToken:G,allowFeedback:Y,provideCitations:K,onFeedback:X,headerTextColor:Z,onRetryMessage:Q,defaultLanguage:w})]},e.id)}),(()=>{const e=t[t.length-1],S=a&&"user"===e?.role,x=t.some(e=>"assistant"===e.role&&(e.isProcessing||!e.content));return S&&!x?n.jsx(Ot,{message:v(),isDark:r,primaryColor:o,agentMessageBubbleColor:i,resolvedAgentBubbleColor:R,userMessageBoxColor:s,textColor:l,assistantTextColor:c,userTextColor:u,fontFamily:d,agentMessageBubbleFontFamily:p,agentMessageBubbleFontSize:f,userMessageBubbleFontFamily:g,userMessageBubbleFontSize:m,fontSize:h,formatTime:b,isRtl:y,onDecision:A,companyLogo:F&&B?B:j,conciergeName:U,companyName:z,apiBaseUrl:$,getAuthToken:G,headerTextColor:Z,defaultLanguage:w},"skeleton-waiting"):null})(),ee,te?n.jsx("div",{className:"pt-1",children:te}):x&&S.length>0&&n.jsx("div",{className:"pt-1",children:n.jsx(jt,{questions:S,isDark:r,primaryColor:o,onQuestionClick:E,isTyping:a,layout:k,fontFamily:d,fontSize:h,textColor:l,isRtl:y,questionTextColor:c,questionBoxColor:i,resolvedUserMessageColor:_,userMessageBoxColor:s,userTextColor:u,headingLabel:ne})}),L&&"connected"===D&&!a&&n.jsx("div",{className:"flex gap-3 flex-row-reverse animate-in",children:n.jsx("div",{className:"flex flex-col items-end max-w-[75%] w-full",children:n.jsxs("div",{className:"rounded-2xl px-4 py-2.5 shadow-lg rounded-tr-sm w-full",style:{background:`linear-gradient(135deg, ${_||o||"#2563eb"} 0%, ${_||o||"#2563eb"}dd 100%)`,width:"100px"},children:[n.jsx("span",{className:"sr-only",children:"Listening for voice input"}),n.jsx(Ft,{active:!0,barWidth:2,barHeight:4,barGap:2,barColor:u||P||"#FFFFFF",height:20,fadeEdges:!0,className:"min-w-[60px]","aria-hidden":"true"})]})})}),n.jsx("div",{ref:re,className:"h-px"})]})};function qt(e,t){return String(e||"").replace(/\/+$/,"")+(t.startsWith("/")?t:`/${t}`)}function Ht({apiEndpoint:e,conversationId:t,size:n,authHeader:r}){fetch(qt(e,"/api/v1/chat-attachments/release"),{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({conversationId:t,size:n})}).catch(()=>{})}function Vt({orgId:t,conversationId:n,config:r,apiEndpoint:o,authHeader:a,onError:i}){const[s,l]=e.useState([]),c=e.useRef(new Map),u=e.useRef(0),d=e.useRef(s);d.current=s;const p=e.useRef({conversationId:n,bytes:0});p.current.conversationId!==n&&(p.current={conversationId:n,bytes:0});const f=e.useCallback(()=>(u.current+=1,`att-${Date.now()}-${u.current}`),[]),g=e.useCallback((e,t)=>{l(n=>n.map(n=>n.id===e?{...n,...t}:n))},[]),m=e.useCallback((e,t,n)=>{const r={status:"error",error:{code:t,message:n}};l(t=>{const n=t.map(t=>t.id===e?{...t,...r}:t),o=n.find(t=>t.id===e);return o&&i&&i(o),n})},[i]),h=e.useCallback((e,t)=>{if(!r?.fileUploadEnabled)return{ok:!1,code:"feature_disabled",message:"File uploads are not enabled for this organization."};if(t>=r.fileUploadMaxFiles)return{ok:!1,code:"too_many_files",message:`Max ${r.fileUploadMaxFiles} files per message.`};const n=1024*r.fileUploadMaxSizeMB*1024;if(p.current.bytes+e.size>n){return{ok:!1,code:"size_exceeded",message:`This conversation has already used ${(p.current.bytes/1048576).toFixed(1)} MB of its ${r.fileUploadMaxSizeMB} MB upload limit - this file won't fit.`}}const o=(e.type||"").toLowerCase(),a=new Set((r.fileUploadAllowedMimes||[]).map(e=>String(e).toLowerCase()));return a.size>0&&!a.has(o)?{ok:!1,code:"mime_not_allowed",message:`File type "${e.type||"unknown"}" is not allowed.`}:{ok:!0}},[r]),b=e.useCallback(async(e,t)=>{let r;try{r=await fetch(qt(o,"/api/v1/chat-attachments/presign"),{method:"POST",credentials:"include",headers:{"Content-Type":"application/json",...a?{Authorization:a}:{}},body:JSON.stringify({filename:t.name,mimeType:t.type,size:t.size,conversationId:n})})}catch(n){return p.current.bytes=Math.max(0,p.current.bytes-t.size),void m(e,"network","Network error while requesting upload.")}if(!r.ok){let n="Upload rejected by the server.",o="unknown";try{const e=await r.json();e?.error&&(n=e.error),e?.code&&(o=function(e){switch(e){case"feature_disabled":case"size_exceeded":case"mime_not_allowed":case"storage_unavailable":return e;default:return"unknown"}}(e.code))}catch{}return p.current.bytes=Math.max(0,p.current.bytes-t.size),void m(e,o,n)}let i=0;const s=()=>{i>0&&(Ht({apiEndpoint:o,conversationId:n,size:i,authHeader:a}),i=0,g(e,{reservedBytes:0}))},l=()=>{p.current.bytes=Math.max(0,p.current.bytes-t.size)};let u;try{u=await r.json()}catch{return Ht({apiEndpoint:o,conversationId:n,size:t.size,authHeader:a}),l(),g(e,{reservedBytes:0}),void m(e,"unknown","Malformed presign response.")}let d,f;("boolean"==typeof u.reserved?u.reserved:!u.useMultipart)&&(i=t.size,g(e,{reservedBytes:t.size}));try{if(u.useMultipart){const r=await function({url:e,file:t,conversationId:n,authHeader:r,onProgress:o,registerXhr:a}){return new Promise((r,i)=>{const s=new XMLHttpRequest;a(s),s.open("POST",e,!0),s.withCredentials=!0;const l=new FormData;l.append("conversationId",n),l.append("file",t,t.name),s.upload.onprogress=e=>{e.lengthComputable&&o(Math.round(e.loaded/e.total*100))},s.onload=()=>{if(s.status>=200&&s.status<300)try{const e=JSON.parse(s.responseText);r({url:"string"==typeof e?.url?e.url:void 0,storageKey:"string"==typeof e?.storageKey?e.storageKey:void 0})}catch{r({})}else i(new Error(`upload_status_${s.status}`))},s.onerror=()=>i(new Error("network")),s.onabort=()=>i({aborted:!0}),s.send(l)})}({url:qt(o,"/api/v1/chat-attachments/multipart"),file:t,conversationId:n,authHeader:a,onProgress:t=>g(e,{progress:t}),registerXhr:t=>c.current.set(e,t)});d=r.url,f=r.storageKey,i=t.size,g(e,{reservedBytes:t.size})}else{if(!u.uploadUrl)throw new Error("presign_missing_target");{await function({url:e,file:t,onProgress:n,registerXhr:r}){return new Promise((o,a)=>{const i=new XMLHttpRequest;r(i),i.open("PUT",e,!0),i.setRequestHeader("x-ms-blob-type","BlockBlob"),t.type&&i.setRequestHeader("Content-Type",t.type),i.upload.onprogress=e=>{e.lengthComputable&&n(Math.round(e.loaded/e.total*100))},i.onload=()=>{i.status>=200&&i.status<300?o():a(new Error(`upload_status_${i.status}`))},i.onerror=()=>a(new Error("network")),i.onabort=()=>a({aborted:!0}),i.send(t)})}({url:u.uploadUrl,file:t,onProgress:t=>g(e,{progress:t}),registerXhr:t=>c.current.set(e,t)});const n=await async function({apiEndpoint:e,storageKey:t,filename:n,mimeType:r,authHeader:o}){let a;try{a=await fetch(qt(e,"/api/v1/chat-attachments/confirm"),{method:"POST",credentials:"include",headers:{"Content-Type":"application/json",...o?{Authorization:o}:{}},body:JSON.stringify({storageKey:t,filename:n,mimeType:r})})}catch{return{ok:!1,code:"network",message:"Network error while verifying upload."}}if(a.ok)return{ok:!0};let i="Upload rejected - file content did not match its declared type.",s="content_mismatch";try{const e=await a.json();e?.error&&(i=e.error),"password_protected"===e?.code&&(s="password_protected")}catch{}return{ok:!1,code:s,message:i}}({apiEndpoint:o,storageKey:u.storageKey,filename:t.name,mimeType:t.type,authHeader:a});if(!n.ok)return c.current.delete(e),s(),l(),void m(e,n.code,n.message)}}}catch(t){if(c.current.delete(e),t&&t.aborted)return;return s(),l(),void m(e,"network","Upload failed. Please retry.")}c.current.delete(e),g(e,{status:"ready",progress:100,storageKey:f||u.storageKey,...d?{url:d}:{}})},[o,a,n,m,g]),y=e.useCallback(async e=>{const t=Array.from(e);for(const e of t){const t=d.current.filter(e=>"error"!==e.status).length,n=h(e,t),r=f();if(!n.ok){const t={id:r,filename:e.name,size:e.size,mimeType:e.type,status:"error",error:{code:n.code,message:n.message}};l(e=>(i&&i(t),[...e,t]));continue}const o={id:r,filename:e.name,size:e.size,mimeType:e.type,status:"uploading",progress:0,reservedBytes:0};l(e=>[...e,o]),p.current.bytes+=e.size,b(r,e)}},[h,b,f,i]),v=e.useCallback(e=>{const t=c.current.get(e);t&&(t.abort(),c.current.delete(e));const r=d.current.find(t=>t.id===e);r&&r.reservedBytes>0&&(Ht({apiEndpoint:o,conversationId:n,size:r.reservedBytes,authHeader:a}),p.current.bytes=Math.max(0,p.current.bytes-r.reservedBytes)),l(t=>t.filter(t=>t.id!==e))},[o,a,n]),w=e.useCallback(()=>{for(const e of c.current.values())e.abort();c.current.clear(),l([])},[]),S=e.useMemo(()=>s.some(e=>"validating"===e.status||"uploading"===e.status),[s]),x=e.useCallback(()=>s.filter(e=>"ready"===e.status&&"string"==typeof e.storageKey).map(e=>({filename:e.filename,mimeType:e.mimeType,size:e.size,storageKey:e.storageKey,url:e.url})),[s]);return{attachments:s,addFiles:y,removeAttachment:v,clearAll:w,isBusy:S,toSendPayload:x}}function Wt(e){if(!e||e<1024)return`${e||0} B`;const t=["KB","MB","GB"];let n=e/1024,r=0;for(;n>=1024&&r<t.length-1;)n/=1024,r+=1;return`${n.toFixed(n>=10?0:1)} ${t[r]}`}function Yt({attachment:e,onRemove:t,isDark:r}){const o="error"===e.status,a="uploading"===e.status,i="ready"===e.status,s=o?r?"rgba(239,68,68,0.15)":"#fee2e2":r?"#1f2937":"#f3f4f6",l=o?r?"#b91c1c":"#fca5a5":r?"#374151":"#e5e7eb",c=o?r?"#fca5a5":"#b91c1c":r?"#e5e7eb":"#374151",u=o?`${e.filename} - ${e.error?.message||"error"}`:a?`${e.filename} - uploading`:`${e.filename} - ready`;return n.jsxs("div",{className:"inline-flex items-center gap-2 rounded-full pl-2 pr-1 py-1 text-xs",style:{backgroundColor:s,border:`1px solid ${l}`,color:c,maxWidth:240},title:o?e.error?.message:e.filename,"aria-label":u,children:[o?n.jsx(Me,{size:12,"aria-hidden":"true"}):a?n.jsx(qe,{size:12,className:"animate-spin","aria-hidden":"true"}):n.jsx($e,{size:12,"aria-hidden":"true"}),n.jsx("span",{className:"truncate",style:{maxWidth:140,direction:"ltr"},children:e.filename}),i&&n.jsx("span",{className:"opacity-70 text-chip",children:Wt(e.size)}),a&&"number"==typeof e.progress&&n.jsxs("span",{className:"opacity-70 text-chip",children:[e.progress,"%"]}),n.jsx("button",{type:"button",onClick:()=>t(e.id),className:"w-4 h-4 rounded-full inline-flex items-center justify-center",style:{backgroundColor:"transparent",border:"none",color:c,cursor:"pointer"},"aria-label":"Remove attachment",children:n.jsx(nt,{size:12})})]})}function Kt({prompts:t,getDisplayText:n,detectDirection:r,ambientIsRtl:o,wrapperProps:a,stackProps:i,getKey:s,getChipProps:l,onChipClick:c,onSelect:u,before:d,after:p}){const f=e.createElement("div",i,t.map((t,a)=>{const i=n(t),d=r(i,o);return e.createElement("button",{key:s(t,a),type:"button",...l({prompt:t,index:a,displayText:i,chipIsRtl:d}),onClick:e=>{c&&c(t,a),u(t,a,e)}},i)}));return null==d&&null==p?e.createElement("div",a,f):e.createElement("div",a,d,f,p)}const Xt=({suggestions:e,onSuggestionClick:t,promptPrimary:r,promptTextColor:o,promptFontFamily:a,promptFontSize:i,isRtl:s,t:l,questionDisplay:c=!0})=>n.jsx(Kt,{prompts:e,getDisplayText:e=>((e,t=!0)=>{if(!e||"string"==typeof e)return e||"";const n="string"==typeof e.text?e.text:"";if(!t)return n;const r="string"==typeof e.submitText?e.submitText.trim():"";return r&&r!==n?r:n})(e,c),detectDirection:q,ambientIsRtl:s,wrapperProps:{className:"mb-2 px-5"},stackProps:{className:"flex flex-col gap-2",role:"group","aria-label":l("suggestedQuestions")},getKey:(e,t)=>`${e.text||e}-${t}`,getChipProps:({chipIsRtl:e})=>({dir:e?"rtl":"ltr",className:"block w-full rounded-2xl px-4 py-2 border-0 transition-transform duration-150 active:scale-[0.99] "+(e?"text-right":"text-left"),style:{direction:e?"rtl":"ltr",textAlign:e?"right":"left",background:`linear-gradient(135deg, ${r} 0%, ${r}dd 100%)`,color:o,fontFamily:a,fontSize:i}}),onSelect:(e,n)=>t(e.submitText||e.text||e,e,n)}),Zt=({onStopGeneration:t,inputValue:o,setInputValue:a,onSend:i,isDark:s,primaryColor:l,isOpen:c,isMinimized:u,isLoading:d,isConversationLoading:p=!1,placeholder:f,textColor:g,fontFamily:m,fontSize:h,isRtl:b=!1,csatVisible:y=!1,enableVoiceInteraction:v=!1,isVoiceSessionActive:w=!1,voiceStatus:S="idle",voiceError:x=null,onVoiceToggle:E,onBidiSubmit:k,disclaimerEnabled:A=!1,disclaimerText:T,disclaimerPosition:O="top",disclaimerLinkUrl:C,disclaimerLinkLabel:I,showPoweredBy:N=!0,onboardingQuestions:R=[],onboardingActive:_=!1,onboardingCompleted:P=!1,userMessageBubbleFontFamily:L,onboardingEnabled:D=!1,userMessageBubbleFontSize:F,userMessageBoxColor:B,resolvedUserMessageColor:z,userTextColor:$,promptSuggestions:G,onPromptSuggestionClick:H,autoPromptQuestionDisplay:W=!0,tagSelectorNode:Y=null,showResolveButton:K=!1,onResolve:X,defaultLanguage:Z="en",chatFeatures:Q,apiEndpoint:te,organizationId:ne,conversationId:re})=>{const oe=e.useMemo(()=>V(Z),[Z]),ae=e.useMemo(()=>function(e){const t=U(e),n=j[t]||M;return{beforeBrand:n.poweredByBefore??n.poweredBy??M.poweredByBefore,afterBrand:n.poweredByAfter??""}}(Z),[Z]),ie=e.useMemo(()=>q(o,b),[o,b]),[se,le]=e.useState(!1),[ce,ue]=e.useState(!1),de=e.useMemo(()=>({fileUploadEnabled:Q?.fileUploadEnabled??!1,fileUploadMaxSizeMB:Q?.fileUploadMaxSizeMB??10,fileUploadMaxFiles:Q?.fileUploadMaxFiles??3,fileUploadAllowedMimes:Q?.fileUploadAllowedMimes??[]}),[Q]),{attachments:pe,addFiles:fe,removeAttachment:ge,clearAll:me,isBusy:he,toSendPayload:be}=Vt({orgId:ne,conversationId:re,config:de,apiEndpoint:te,authHeader:void 0}),ye=e.useRef(null),ve=e.useRef(new Set);e.useEffect(()=>{if(!w||!re||!te)return;const e=be().filter(e=>e.storageKey&&!ve.current.has(e.storageKey));e.length&&(e.forEach(e=>ve.current.add(e.storageKey)),fetch(`${String(te).replace(/\/$/,"")}/api/v1/chat-attachments/ingest`,{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({conversationId:re,attachments:e.map(e=>({storageKey:e.storageKey}))})}).catch(()=>{}))},[w,re,te,pe,be]);const we=!!de.fileUploadEnabled&&!!te,Se=pe.length>=de.fileUploadMaxFiles,xe=`Max ${de.fileUploadMaxFiles} files per message.`,Ee=e.useMemo(()=>de.fileUploadAllowedMimes.length>0?de.fileUploadAllowedMimes.join(","):void 0,[de.fileUploadAllowedMimes]),[ke,Ae]=e.useState({top:0,left:0,placement:"top",arrowOffset:0}),[Te,Oe]=e.useState(!1),Ce=e.useRef(null),Ie=e.useRef(null),Ne=e.useRef(null),_e=e.useRef(null);lt(m),lt(L),e.useEffect(()=>{c&&!u&&Ie.current?.focus()},[c,u]),e.useEffect(()=>{const e=Ie.current;if(e){e.style.height="auto";const t=e.scrollHeight,n=o.trim().length>0?20:48,r=Math.max(n,Math.min(t,120));e.style.height=`${r}px`}},[o]);const Pe=e.useCallback(()=>{const e=be();e.length>0?(i(void 0,e),me()):i()},[be,me,i]),Le=pe.some(e=>"ready"===e.status),De=!o.trim()&&!Le||d||p||he,Me=s?"#374151":"#e5e7eb",je=R&&R.length>0,Fe=y||p||D&&(je&&!P)||"connecting"===S,Be=y?oe("pleaseSubmitRatingFirst"):je?_?oe("completeOnboardingToEnableVoice"):P?"":oe("sendMessageToCompleteOnboarding"):"",Ue=()=>{if(!Ne.current)return;const e=Ne.current.getBoundingClientRect(),t=220,n=e.top,r=window.innerHeight-e.bottom;let o="top",a=0,i=0;n>=73?(o="top",a=e.top-60-5-8,i=e.right-t,i<10&&(i=10),i+t>window.innerWidth-10&&(i=window.innerWidth-t-10)):r>=68?(o="bottom",a=e.bottom+8,i=e.right-t,i<10&&(i=10),i+t>window.innerWidth-10&&(i=window.innerWidth-t-10)):(o="top",a=Math.max(10,e.top-60-5-8),i=e.right-t,i<10&&(i=10),i+t>window.innerWidth-10&&(i=window.innerWidth-t-10));return{top:a,left:i,placement:o,arrowOffset:e.left+e.width/2-i}};e.useEffect(()=>{if(ce&&Be){const e=()=>{const e=Ue();Ae(e)};return window.addEventListener("scroll",e,!0),window.addEventListener("resize",e),()=>{window.removeEventListener("scroll",e,!0),window.removeEventListener("resize",e)}}},[ce,Be]),e.useEffect(()=>()=>{Ce.current&&clearTimeout(Ce.current)},[]);const ze=null!=z?z:null!=B?B:null!=l?l:"#2563eb",$e=null!=$?$:null!=g?g:"#FFFFFF",Ge=null!=L?L:null!=m?m:"Inter",He=null!=F?F:null!=h?h:null,Ve=He?`calc(${He} - 2px)`:"12px",Ye=J(C);return n.jsxs("div",{className:"py-4 flex-shrink-0 relative "+(s?"bg-gray-900":"bg-white"),style:{overflow:"visible"},children:[Y||G.length>0&&H&&n.jsx(Xt,{suggestions:G,onSuggestionClick:H,questionDisplay:W,promptPrimary:ze,promptTextColor:$e,promptFontFamily:Ge,promptFontSize:Ve,isRtl:b,t:oe}),n.jsx("div",{className:"my-4",style:{height:"1px",backgroundColor:Me}}),we&&pe.length>0&&n.jsx("div",{className:"px-5 mb-2 flex flex-wrap gap-1.5",children:pe.map(e=>n.jsx(Yt,{attachment:e,onRemove:ge,isDark:s},e.id))}),n.jsxs("div",{className:"flex items-center px-5 gap-1.5",children:[we&&n.jsx("input",{ref:ye,type:"file",multiple:!0,accept:Ee,"aria-label":oe("uploadFile"),className:"hidden",style:{display:"none"},onChange:e=>{const t=e.target.files;t&&t.length&&!Se&&fe(t),e.currentTarget.value=""}}),n.jsxs("div",{className:`flex-1 flex items-center gap-1 px-1 min-h-[48px] ${s?"bg-gray-800":"bg-gray-50"} rounded-2xl transition-all duration-200`,style:{borderStyle:"solid",borderColor:o&&o.trim().length>0?l||"#2563eb":Me,borderWidth:o&&o.trim().length>0?"2px":"1px"},children:[we&&n.jsxs("div",{className:"relative group shrink-0",children:[n.jsx("button",{type:"button",onClick:()=>ye.current&&ye.current.click(),disabled:y||p||d||Se,"aria-label":Se?xe:"Attach file",title:Se?xe:"Attach file",className:`h-8 w-8 rounded-lg flex items-center justify-center transition-colors duration-200 ${s?"text-gray-300 hover:bg-gray-700":"text-gray-500 hover:bg-gray-200"} disabled:opacity-40 disabled:cursor-not-allowed`,style:{border:"none"},children:n.jsx(We,{className:"w-4 h-4"})}),Se&&n.jsx("div",{role:"tooltip",className:"pointer-events-none absolute bottom-full left-1/2 -translate-x-1/2 mb-2 opacity-0 group-hover:opacity-100 transition-opacity px-3 py-1.5 text-xs rounded-lg whitespace-nowrap shadow-lg "+(s?"bg-gray-700 text-gray-100":"bg-gray-800 text-white"),children:xe})]}),n.jsx("div",{className:"relative flex-1 flex items-center min-w-0",children:n.jsx("textarea",{id:"chat-widget-input",ref:Ie,"aria-label":f||oe("typeYourMessage"),value:o,onChange:e=>{a(e.target.value)},onFocus:()=>le(!0),onBlur:()=>le(!1),onKeyDown:e=>{if("Enter"===e.key&&!e.shiftKey){if(e.preventDefault(),w&&k&&!Le)return void k();if(De)return;Pe()}},placeholder:p?oe("agentIsLoading"):f||oe("typeYourMessage"),rows:1,disabled:y||p||d||w&&"connected"!==S,dir:ie?"rtl":"ltr",className:`w-full px-3 bg-transparent rounded-xl leading-normal ${s?"text-gray-100":"text-gray-900"} placeholder-gray-400 resize-none outline-none scrollbar-hide break-words`,style:{height:"auto",maxHeight:"120px",minHeight:"48px",paddingTop:o.trim().length>0?"12px":"0px",paddingBottom:o.trim().length>0?"12px":"0px",lineHeight:o.trim().length>0?"1.4":"48px",fontFamily:L||m||"Inter",fontSize:h||"14px",color:s?"#F3F4F6":"#1F2937",textAlign:ie?"right":"left",direction:ie?"rtl":"ltr",wordSpacing:"0",letterSpacing:"0"}})}),v&&n.jsxs("div",{className:"relative shrink-0",onMouseEnter:()=>{if(Fe&&Be){Ce.current&&(clearTimeout(Ce.current),Ce.current=null);const e=Ue();Ae(e),ue(!0)}},onMouseLeave:()=>{Ce.current&&(clearTimeout(Ce.current),Ce.current=null),ue(!1)},children:[n.jsx("button",{style:{border:"none"},ref:Ne,type:"button",onClick:E,"aria-label":oe(w?"stopVoiceInput":"startVoiceInput"),className:`h-8 w-8 rounded-lg flex items-center justify-center transition-colors duration-200 ${w?"bg-red-500 text-white hover:bg-red-600":s?"text-gray-300 hover:bg-gray-700":"text-gray-500 hover:bg-gray-200"} ${Fe?"opacity-60 cursor-not-allowed":""}`,disabled:Fe,children:"connecting"===S?n.jsx(qe,{className:"w-4 h-4 animate-spin"}):n.jsx(Re,{className:"w-4 h-4"})}),ce&&Be&&"undefined"!=typeof document&&r.createPortal(n.jsxs("div",{ref:_e,className:"px-3 py-1.5 text-xs shadow-md pointer-events-none",style:{position:"fixed",top:`${ke.top}px`,left:`${ke.left}px`,maxWidth:"220px",whiteSpace:"normal",wordWrap:"break-word",minWidth:"180px",zIndex:999999,backgroundColor:s?"#1f2937":"#ffffff",color:s?"#f3f4f6":"#111827",border:s?"1px solid #374151":"1px solid #e5e7eb",borderRadius:"top"===ke.placement?"6px 6px 6px 6px":"6px",boxShadow:"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)",overflow:"visible"},children:[n.jsx("div",{className:"text-left leading-relaxed",children:Be}),"top"===ke.placement&&n.jsxs(n.Fragment,{children:[n.jsx("div",{style:{position:"absolute",top:"100%",left:`${ke.arrowOffset}px`,transform:"translateX(-50%)",width:0,height:0,borderLeft:"6px solid transparent",borderRight:"6px solid transparent",borderTop:s?"6px solid #374151":"6px solid #e5e7eb",pointerEvents:"none"}}),n.jsx("div",{style:{position:"absolute",top:"100%",left:`${ke.arrowOffset}px`,transform:"translateX(-50%)",marginTop:"-1px",width:0,height:0,borderLeft:"5px solid transparent",borderRight:"5px solid transparent",borderTop:s?"5px solid #1f2937":"5px solid #ffffff",pointerEvents:"none"}})]}),"bottom"===ke.placement&&n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"absolute bottom-full",style:{left:`${ke.arrowOffset}px`,transform:"translateX(-50%)",width:0,height:0,borderLeft:"5px solid transparent",borderRight:"5px solid transparent",borderBottom:s?"5px solid #374151":"5px solid #e5e7eb"}}),n.jsx("div",{className:"absolute bottom-full -mb-px",style:{left:`${ke.arrowOffset}px`,transform:"translateX(-50%)",width:0,height:0,borderLeft:"4px solid transparent",borderRight:"4px solid transparent",borderBottom:s?"4px solid #1f2937":"4px solid #ffffff"}})]})]}),document.body)]})]}),d&&!w&&"function"==typeof t?n.jsx("button",{onClick:t,className:"h-10 w-10 flex-shrink-0 rounded-xl transition-all duration-200 flex items-center justify-center shadow-md scale-100",style:{backgroundColor:l,color:"white",border:"none"},"aria-label":oe("stopGenerating"),children:n.jsx(Xe,{className:"w-3.5 h-3.5",fill:"currentColor"})}):n.jsx("button",{onClick:w&&k&&!Le?k:Pe,disabled:y||De||w&&"connected"!==S,className:"h-10 w-10 flex-shrink-0 rounded-xl transition-all duration-200 flex items-center justify-center shadow-md disabled:opacity-40 disabled:cursor-not-allowed disabled:shadow-none "+(o.trim()?"scale-100":"scale-95"),style:{backgroundColor:o.trim()?l:s?"#374151":"#e5e7eb",color:o.trim()?"white":"#9ca3af",border:"none"},"aria-label":oe("sendMessage"),children:n.jsx(Ke,{className:"w-4 h-4 transition-transform",style:b?{transform:"rotate(-90deg)"}:void 0})})]}),w&&n.jsxs("p",{"aria-live":"polite",className:`text-xs mt-2 px-5 ${"connected"===S?"text-status-success":"text-gray-500"} flex items-center gap-1`,children:[n.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-current inline-flex"}),oe("connected"===S?"voiceSessionLive":"connectingVoice")]}),x&&n.jsx("p",{role:"alert",className:"text-xs mt-1 px-5 text-status-error",children:oe(x)===x?oe("voiceUnavailable"):oe(x)}),A&&T&&"footer"===O&&n.jsxs("p",{className:"text-xs mt-2 px-5 text-center",style:{color:s?"#d1d5db":"#6b7280",fontFamily:m||"Inter",fontSize:h?`calc(${h} - 2px)`:"12px",direction:b?"rtl":"ltr"},dir:b?"rtl":"ltr",children:[T,Ye&&I&&n.jsx("a",{href:Ye,target:"_blank",rel:"noopener noreferrer",title:Ye,style:{color:s?"#93c5fd":"#2563eb",marginInlineStart:"4px",verticalAlign:"middle",display:"inline-flex",alignItems:"center"},children:I})]}),N&&n.jsx("div",{className:"mt-1.5 flex justify-center",children:n.jsx("a",{href:"https://eshal.ai",target:"_blank",rel:"noopener noreferrer",className:"no-underline",children:n.jsxs("span",{dir:"ltr",className:"inline-flex items-center gap-1.5 py-1.5 px-3",children:[ae.beforeBrand&&n.jsx("span",{className:ee("font-sans text-[10px] font-medium",s?"text-gray-400":"text-gray-500"),children:ae.beforeBrand}),Te?n.jsx("span",{className:ee("font-sans text-[10px] font-semibold",s?"text-gray-300":"text-gray-600"),children:"ESHAL"}):n.jsx("img",{src:s?"data:image/svg+xml,%3csvg width='219' height='54' xmlns='http://www.w3.org/2000/svg' version='1.0'%3e%3cg class='layer'%3e%3ctitle%3eEshal Logo%3c/title%3e%3cg clip-path='url(%23a)' transform='translate(-.708 -1.076)'%3e%3cg clip-path='url(%23b)'%3e%3cpath d='M21.79 54.75h4.5l3.93-.56 4.49-1.4 3.38-1.97 2.81-2.25 2.24-2.81 2.25-3.93 1.13-3.09v-.85l-3.65-1.12h-.57l-1.96 4.5-1.97 3.09-2.81 2.53-3.93 1.96-3.38.85-2.81.28h-2.81l-4.21-.57-3.94-1.4-2.81-1.97-2.25-2.24-1.96-3.38-1.41-4.21-.56-3.37-.28-3.1v-3.65l.56-5.06 1.12-4.21 1.97-3.94 2.53-2.81 2.25-1.68 2.81-1.41 3.37-.84 2.25-.28H26l4.78.84 4.5 2.25 2.53 2.53 1.4 2.53.56 2.53-.28 3.65-1.12 2.25-1.41 1.69-1.4.55-1.13-4.21-1.68-2.81-1.97-1.97-3.09-1.4-1.12-.28h-5.34l-3.09 1.12-2.25 1.69-1.41 1.97-.84 3.09.28 3.08 1.4 2.82 1.97 1.96 2.81 1.41 2.25.56 4.78.28 3.09-.28.84-.28-1.12 3.09-1.69 1.97-2.25.84h-3.65l-2.81-1.12-1.68-1.41-3.38 2.25.56 1.13 1.13 1.4 2.81 1.69 2.81.84h4.78l2.81-.84 2.53-1.69 1.96-2.25L35 34.8l.84-4.5 3.65-2.24 2.53-2.53 1.69-3.09.56-2.25.28-2.81-.56-3.93-1.12-2.82-2.25-3.09-3.09-2.81-4.22-2.25-4.5-1.12-2.52-.28h-4.5l-3.93.56-4.5 1.41-3.38 1.96-3.37 3.1-2.52 3.65-1.97 4.49-1.13 4.78-.28 2.25v9.27l.84 5.06 1.69 4.78 1.69 3.09 2.25 2.81 2.8 2.53 2.82 1.69 5.06 1.68zm1.12-27.54-2.53-.84-1.4-1.12-.84-1.69.28-2.53 1.12-1.4 2.25-1.13H26l2.81 1.41 1.41 1.97.84 2.8v2.25l-1.12.28zm0 0' fill='white'/%3e%3c/g%3e%3c/g%3e%3cpath d='M82.381 38.435v6.48h-27.06V9.965h26.41v6.5h-18.36v7.57h16.22v6.3h-16.22v8.1zm16.432 7.07c-2.77 0-5.44-.37-8.02-1.11-2.57-.75-4.65-1.72-6.22-2.92l2.75-6.09c1.5 1.09 3.28 1.98 5.34 2.64 2.07.67 4.13 1 6.19 1q3.45 0 5.1-1.02t1.65-2.73c0-.83-.33-1.52-.98-2.06-.65-.55-1.48-1-2.5-1.33-1.01-.33-2.39-.7-4.11-1.1-2.67-.63-4.85-1.26-6.55-1.89s-3.15-1.64-4.37-3.04c-1.21-1.41-1.82-3.27-1.82-5.6 0-2.03.55-3.86 1.64-5.51 1.11-1.66 2.76-2.96 4.97-3.92 2.22-.97 4.93-1.46 8.13-1.46 2.22 0 4.4.27 6.53.8s4 1.3 5.59 2.3l-2.5 6.14c-3.23-1.82-6.45-2.74-9.67-2.74-2.27 0-3.95.37-5.03 1.1-1.07.73-1.61 1.69-1.61 2.89q0 1.8 1.86 2.67c1.25.59 3.16 1.16 5.72 1.72 2.66.63 4.85 1.27 6.55 1.9 1.69.63 3.14 1.63 4.36 2.99 1.21 1.37 1.82 3.21 1.82 5.55 0 2-.56 3.82-1.67 5.46q-1.68 2.475-5.01 3.93c-2.23.95-4.95 1.43-8.14 1.43m50.913-35.54v34.95h-8.08v-14.33h-15.88v14.33h-8.09V9.965h8.09v13.78h15.88V9.965zm29.811 27.47h-16.22l-3.1 7.48h-8.29l15.58-34.95h7.98l15.62 34.95h-8.48zm-2.55-6.15-5.55-13.37-5.53 13.37zm16.274-21.32h8.09v28.36h17.52v6.59h-25.61zm0 0' fill='white'/%3e%3c/g%3e%3c/svg%3e":"data:image/svg+xml,%3csvg width='219' height='54' xmlns='http://www.w3.org/2000/svg' version='1.0'%3e%3cg class='layer'%3e%3ctitle%3eEshal Logo%3c/title%3e%3cg clip-path='url(%23a)' transform='translate(-.708 -1.076)'%3e%3cg clip-path='url(%23b)'%3e%3cpath d='M21.79 54.75h4.5l3.93-.56 4.49-1.4 3.38-1.97 2.81-2.25 2.24-2.81 2.25-3.93 1.13-3.09v-.85l-3.65-1.12h-.57l-1.96 4.5-1.97 3.09-2.81 2.53-3.93 1.96-3.38.85-2.81.28h-2.81l-4.21-.57-3.94-1.4-2.81-1.97-2.25-2.24-1.96-3.38-1.41-4.21-.56-3.37-.28-3.1v-3.65l.56-5.06 1.12-4.21 1.97-3.94 2.53-2.81 2.25-1.68 2.81-1.41 3.37-.84 2.25-.28H26l4.78.84 4.5 2.25 2.53 2.53 1.4 2.53.56 2.53-.28 3.65-1.12 2.25-1.41 1.69-1.4.55-1.13-4.21-1.68-2.81-1.97-1.97-3.09-1.4-1.12-.28h-5.34l-3.09 1.12-2.25 1.69-1.41 1.97-.84 3.09.28 3.08 1.4 2.82 1.97 1.96 2.81 1.41 2.25.56 4.78.28 3.09-.28.84-.28-1.12 3.09-1.69 1.97-2.25.84h-3.65l-2.81-1.12-1.68-1.41-3.38 2.25.56 1.13 1.13 1.4 2.81 1.69 2.81.84h4.78l2.81-.84 2.53-1.69 1.96-2.25L35 34.8l.84-4.5 3.65-2.24 2.53-2.53 1.69-3.09.56-2.25.28-2.81-.56-3.93-1.12-2.82-2.25-3.09-3.09-2.81-4.22-2.25-4.5-1.12-2.52-.28h-4.5l-3.93.56-4.5 1.41-3.38 1.96-3.37 3.1-2.52 3.65-1.97 4.49-1.13 4.78-.28 2.25v9.27l.84 5.06 1.69 4.78 1.69 3.09 2.25 2.81 2.8 2.53 2.82 1.69 5.06 1.68zm1.12-27.54-2.53-.84-1.4-1.12-.84-1.69.28-2.53 1.12-1.4 2.25-1.13H26l2.81 1.41 1.41 1.97.84 2.8v2.25l-1.12.28zm0 0' fill='black'/%3e%3c/g%3e%3c/g%3e%3cpath d='M82.381 38.435v6.48h-27.06V9.965h26.41v6.5h-18.36v7.57h16.22v6.3h-16.22v8.1zm16.432 7.07c-2.77 0-5.44-.37-8.02-1.11-2.57-.75-4.65-1.72-6.22-2.92l2.75-6.09c1.5 1.09 3.28 1.98 5.34 2.64 2.07.67 4.13 1 6.19 1q3.45 0 5.1-1.02t1.65-2.73c0-.83-.33-1.52-.98-2.06-.65-.55-1.48-1-2.5-1.33-1.01-.33-2.39-.7-4.11-1.1-2.67-.63-4.85-1.26-6.55-1.89s-3.15-1.64-4.37-3.04c-1.21-1.41-1.82-3.27-1.82-5.6 0-2.03.55-3.86 1.64-5.51 1.11-1.66 2.76-2.96 4.97-3.92 2.22-.97 4.93-1.46 8.13-1.46 2.22 0 4.4.27 6.53.8s4 1.3 5.59 2.3l-2.5 6.14c-3.23-1.82-6.45-2.74-9.67-2.74-2.27 0-3.95.37-5.03 1.1-1.07.73-1.61 1.69-1.61 2.89q0 1.8 1.86 2.67c1.25.59 3.16 1.16 5.72 1.72 2.66.63 4.85 1.27 6.55 1.9 1.69.63 3.14 1.63 4.36 2.99 1.21 1.37 1.82 3.21 1.82 5.55 0 2-.56 3.82-1.67 5.46q-1.68 2.475-5.01 3.93c-2.23.95-4.95 1.43-8.14 1.43m50.913-35.54v34.95h-8.08v-14.33h-15.88v14.33h-8.09V9.965h8.09v13.78h15.88V9.965zm29.811 27.47h-16.22l-3.1 7.48h-8.29l15.58-34.95h7.98l15.62 34.95h-8.48zm-2.55-6.15-5.55-13.37-5.53 13.37zm16.274-21.32h8.09v28.36h17.52v6.59h-25.61zm0 0' fill='black'/%3e%3c/g%3e%3c/svg%3e",alt:"ESHAL",className:ee("h-3",s?"opacity-60":"opacity-50"),onError:()=>Oe(!0)}),ae.afterBrand&&n.jsx("span",{className:ee("font-sans text-[10px] font-medium",s?"text-gray-400":"text-gray-500"),children:ae.afterBrand})]})})})]})},Qt=["sun","mon","tue","wed","thu","fri","sat"];function Jt(e){if(!e||"string"!=typeof e)return null;const t=e.match(/^(\d{1,2}):(\d{2})/);if(!t)return null;const n=parseInt(t[1],10),r=parseInt(t[2],10);return Number.isNaN(n)||Number.isNaN(r)?null:60*n+r}function en(e,t=new Date,n={}){if(!e||!e.showStatus)return null;const r=n.online||"Online now",o=n.officeOpen||"Online now",a=n.offlineFallback||"Offline";if("officeHours"!==e.statusMode)return{online:!0,label:r};const i=e.officeHours||{},{dayKey:s,minutes:l}=function(e,t){try{const n=new Intl.DateTimeFormat("en-US",{timeZone:e||void 0,weekday:"short",hour:"2-digit",minute:"2-digit",hour12:!1}).formatToParts(t),r=(n.find(e=>"weekday"===e.type)||{}).value||"";let o=parseInt((n.find(e=>"hour"===e.type)||{}).value||"0",10);const a=parseInt((n.find(e=>"minute"===e.type)||{}).value||"0",10);return 24===o&&(o=0),{dayKey:r.slice(0,3).toLowerCase(),minutes:60*o+a}}catch{return{dayKey:Qt[t.getDay()],minutes:60*t.getHours()+t.getMinutes()}}}(i.timezone,t),c=Array.isArray(i.days)?i.days.map(e=>String(e).slice(0,3).toLowerCase()):[],u=Jt(i.open),d=Jt(i.close);if(c.includes(s)&&(null!=u&&null!=d&&(u<=d?l>=u&&l<d:l>=u||l<d))){return{online:!0,label:(i.onlineMessage||"").trim()||o}}return{online:!1,label:(i.offlineMessage||"").trim()||a}}const tn=({conciergeName:t,companyName:r,companyLogo:o,primaryColor:a,isDark:i,isMinimized:s=!1,textColor:l,fontFamily:c,fontSize:u,onToggleTheme:d,onMinimize:p,onClose:f,headerTextBold:g=!1,headerTextItalic:m=!1,headerTextColor:h,headerFontFamily:b,headerFontSize:y,subtitle:v=null,showStatus:w=!1,statusMode:S="always",officeHours:x=null,onRefreshChat:E,onCopyChat:k,defaultLanguage:A="en"})=>{const T=a,O=h||"#FFFFFF",C=b||c||"Inter",I=y||u;lt(C);const N=e.useMemo(()=>V(A),[A]),R=z(A),_=e.useMemo(()=>q(v,R),[v,R]),P=e.useMemo(()=>en({showStatus:w,statusMode:S,officeHours:x}),[w,S,x]),[L,D]=e.useState(!1),M=e.useRef(null),j=e.useRef(null);e.useEffect(()=>{if(!L)return;const e=e=>{M.current&&!e.composedPath().includes(M.current)&&D(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[L]);const F=e.useRef(!1);e.useEffect(()=>{if(L){F.current=!0;const e=M.current?.querySelector('[role="menuitem"]');e?.focus()}else F.current&&(F.current=!1,j.current?.focus())},[L]);const B=O;return n.jsxs("div",{className:`text-white ${s?"px-4 py-2.5":"px-3 py-4"} flex items-center justify-between relative overflow-visible rounded-t-2xl z-[60]`,style:{background:T,fontFamily:C},children:[n.jsxs("div",{className:"flex items-center gap-3 flex-1 min-w-0 pl-1",children:[n.jsxs("div",{className:"relative w-11 h-11 flex-shrink-0",children:[n.jsx("div",{className:"w-full h-full rounded-full overflow-hidden flex items-center justify-center bg-white/20",children:o?n.jsx("img",{src:o,alt:"Logo",style:{display:"block",width:"100%",height:"100%",objectFit:"contain"},loading:"lazy"}):n.jsx("span",{className:"text-lg font-semibold leading-none",style:{color:B},children:(t||r||"")?.charAt(0)?.toUpperCase()})}),P?n.jsx("span",{title:P.label,className:ee("absolute bottom-0 h-3 w-3 rounded-full ring-2 ring-white",R?"left-0":"right-0"),style:{backgroundColor:P.online?"#22c55e":"#9ca3af",boxShadow:P.online?"0 0 0 3px rgba(34,197,94,0.25)":"none"},"aria-hidden":"true"}):null]}),n.jsxs("div",{className:"flex flex-col justify-center min-w-0",style:{fontFamily:C},children:[n.jsx("h3",{title:t,className:ee("font-semibold leading-snug truncate",g&&"font-bold",m&&"italic"),style:{fontSize:I?`calc(${I} + 2px)`:"15px",color:B},children:t}),v?n.jsx("p",{title:v,className:"leading-snug truncate opacity-75",dir:_?"rtl":"ltr",style:{fontSize:"12px",color:B,textAlign:_?"right":"left"},children:v}):null]})]}),n.jsxs("div",{className:"flex items-center gap-0 relative z-10 text-white flex-shrink-0 ml-1",children:[n.jsxs("div",{className:"relative",ref:M,children:[n.jsx("button",{type:"button",ref:j,"aria-label":N("menu"),"aria-expanded":L,"aria-haspopup":"true",onClick:()=>D(e=>!e),onKeyDown:e=>{"Escape"===e.key&&L&&(e.preventDefault(),D(!1))},className:"inline-flex h-7 w-7 items-center justify-center cursor-pointer transition-opacity duration-200 hover:opacity-80 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-white/40 rounded-full border-0 bg-transparent p-0",style:{color:B},children:n.jsx(Ue,{className:"w-4 h-4",strokeWidth:1.6})}),L&&n.jsxs("div",{role:"menu","aria-label":N("menu"),dir:R?"rtl":"ltr",onKeyDown:e=>{if("Escape"===e.key)return e.preventDefault(),void D(!1);if("Tab"===e.key){const t=M.current?Array.from(M.current.querySelectorAll('[role="menuitem"]')):[];if(0===t.length)return;const n=t[0],r=t[t.length-1],o=document.activeElement;e.shiftKey&&o===n?(e.preventDefault(),r.focus()):e.shiftKey||o!==r||(e.preventDefault(),n.focus())}},className:`absolute top-full mt-1 w-44 rounded-xl border shadow-lg py-1 z-[9999] animate-in fade-in slide-in-from-top-1 duration-150 ${R?"left-0":"right-0"} ${i?"bg-gray-800 border-gray-700":"bg-white border-gray-200"}`,style:{fontFamily:C},children:[n.jsxs("button",{role:"menuitem",onClick:()=>{D(!1),E?.()},className:"flex items-center gap-2.5 w-full px-3 py-2 text-sm leading-5 transition-colors cursor-pointer "+(i?"text-gray-200 hover:bg-gray-700":"text-gray-700 hover:bg-gray-50"),style:{fontFamily:C,fontSize:"14px",border:"none",background:"transparent",appearance:"none",WebkitAppearance:"none",textAlign:R?"right":"left"},children:[n.jsx(Ye,{className:"w-3.5 h-3.5 flex-shrink-0"}),N("refreshChat")]}),n.jsxs("button",{role:"menuitem",onClick:()=>{D(!1),k?.()},className:"flex items-center gap-2.5 w-full px-3 py-2 text-sm leading-5 transition-colors cursor-pointer "+(i?"text-gray-200 hover:bg-gray-700":"text-gray-700 hover:bg-gray-50"),style:{fontFamily:C,fontSize:"14px",border:"none",background:"transparent",appearance:"none",WebkitAppearance:"none",textAlign:R?"right":"left"},children:[n.jsx(Fe,{className:"w-3.5 h-3.5 flex-shrink-0"}),N("copyChat")]}),n.jsxs("button",{role:"menuitem",onClick:()=>{D(!1),d?.()},className:"flex items-center gap-2.5 w-full px-3 py-2 text-sm leading-5 transition-colors cursor-pointer "+(i?"text-gray-200 hover:bg-gray-700":"text-gray-700 hover:bg-gray-50"),style:{fontFamily:C,fontSize:"14px",border:"none",background:"transparent",appearance:"none",WebkitAppearance:"none",textAlign:R?"right":"left"},children:[i?n.jsx(Qe,{className:"w-3.5 h-3.5 flex-shrink-0"}):n.jsx(Ve,{className:"w-3.5 h-3.5 flex-shrink-0"}),N(i?"lightMode":"nightMode")]})]})]}),n.jsx("button",{type:"button","aria-label":N("close"),onClick:f,className:"inline-flex h-7 w-7 items-center justify-center cursor-pointer transition-opacity duration-200 hover:opacity-80 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-white/40 rounded-full border-0 bg-transparent p-0",style:{color:B},children:n.jsx(nt,{className:"w-3.5 h-3.5",strokeWidth:1.6})})]})]})},nn=({questions:t=[],collapsiblePrompt:r,onSubmit:o,primaryColor:a="#2563eb",isRtl:i=!1,isDark:s=!1,defaultLanguage:l="en",fontFamily:c})=>{const u=e.useMemo(()=>V(l),[l]),[d,p]=e.useState({}),[f,g]=e.useState({}),[m,h]=e.useState(!1),b=e.useRef({}),y=[...t].sort((e,t)=>ne(e.fieldType)-ne(t.fieldType));return n.jsx("div",{className:"flex flex-col items-center justify-center p-6 h-full min-h-0 z-50 relative ",style:{...c?{fontFamily:c}:{},...s?{backgroundColor:"#10141C"}:{}},children:n.jsxs("div",{className:"w-full max-w-sm rounded-2xl shadow-xl border p-8 transition-colors duration-300 bg-white border-gray-100",style:s?{backgroundColor:"#1E232B",border:"1px solid #2A303C"}:void 0,children:[r&&n.jsx("div",{className:"mb-4 text-start",children:n.jsx("h3",{className:"transition-colors duration-300 text-sm font-semibold mb-1 "+(s?"text-white":"text-[#4A5568]"),children:r})}),n.jsxs("form",{onSubmit:async e=>{e.preventDefault();const t=(()=>{const e={};return y.forEach(t=>{const n=t.fieldType||"question",r=(d[n]??"").trim(),o=t.collectionPrompt||t.askToType||t.question||t.label||n,a=!0===t.required||"true"===t.required;r?("fullName"!==n&&"name"!==n||r.length<2&&(e[n]=u("nameInvalid")),"email"!==n||/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(r)||(e[n]=u("emailInvalid")),"phone"!==n&&"mobileno"!==n||/^[+]?[\d\s-]{8,15}$/.test(r)||(e[n]=u("phoneInvalid"))):a&&(e[n]="email"===n?u("emailRequired"):"fullName"===n||"name"===n?u("nameRequired"):"phone"===n||"mobileno"===n?u("phoneRequired"):`${o} ${u("fieldRequiredSuffix")}`)}),g(e),e})();if(Object.keys(t).length>0){const e=y.map((e,t)=>e.fieldType||`question_${t}`).find(e=>t[e]);return void b.current[e]?.focus()}h(!0);try{await o(d)}finally{h(!1)}},className:"space-y-4",noValidate:!0,children:[y.map((e,t)=>{const r=e.fieldType||`question_${t}`,o=e.collectionPrompt||e.askToType||e.question||e.label;if(!o?.trim())return null;let a="text";"email"===r&&(a="email"),"phone"!==r&&"mobileno"!==r||(a="tel");const l=(r||"").toLowerCase(),c="fullname"===l||"name"===l||"username"===l,m="phone"===l||"mobileno"===l,h="email"===l?u("onboardingEmailPlaceholder"):c?u("onboardingNamePlaceholder"):m?u("onboardingPhonePlaceholder"):o,y=f[r],v="w-full h-12 rounded-xl text-base md:text-sm px-3 py-1 outline-none border transition-colors focus:ring-0 "+(s?"text-white placeholder:text-[#A2A9B2] focus:border-[#5A6069]":"bg-gray-50/30 focus:bg-white text-gray-900 placeholder:text-gray-500 focus:border-[#B0B0B0]"),w=y?"!border-status-error focus:!border-status-error":"",S=`onboarding-field-${r}`,x=`${S}-error`;return n.jsxs("div",{children:[n.jsx("label",{htmlFor:S,className:"sr-only",children:o}),n.jsx("input",{id:S,ref:e=>{b.current[r]=e},placeholder:h,type:a,value:d[r]??"",onChange:e=>((e,t)=>{p(n=>({...n,[e]:t})),f[e]&&g(t=>{const n={...t};return delete n[e],n})})(r,e.target.value),className:`${v} ${w}`,"aria-invalid":y?"true":"false","aria-describedby":y?x:void 0,style:{direction:i?"rtl":"ltr",fontFamily:"inherit",...s?{backgroundColor:"#272C35",borderWidth:"1px",borderStyle:"solid",borderColor:y?void 0:"#3F444C"}:{borderWidth:"1px",borderStyle:"solid",borderColor:y?void 0:"#E0E0E0"}}}),y&&n.jsx("p",{id:x,role:"alert",className:"mt-1 text-xs text-status-error px-1",children:f[r]})]},r)}),n.jsx("button",{type:"submit",disabled:m,"aria-busy":m,"aria-label":m?u("submitting"):void 0,className:"w-full h-12 inline-flex items-center justify-center text-sm border-none font-semibold shadow-xl hover:shadow-xl hover:scale-[1.02] active:scale-[0.98] transition-all rounded-xl mt-4 text-white",style:{backgroundColor:a,fontFamily:"inherit"},children:m?n.jsx(qe,{className:"w-5 h-5 animate-spin","aria-hidden":"true"}):u("startChat")})]})]})})},rn=({categories:t=[],selectedCategoryId:r=null,onSelect:o,isDark:a=!1,primaryColor:i="#2563eb",fontFamily:s="Inter",isRtl:l=!1})=>{const c=e.useRef(null),[u,d]=e.useState(!1),[p,f]=e.useState(!1),g=e.useCallback(()=>{const e=c.current;if(!e)return;const{scrollLeft:t,scrollWidth:n,clientWidth:r}=e;d(Math.abs(t)>1),f(Math.abs(t)+r<n-1)},[]);e.useEffect(()=>{g();const e=c.current;if(!e)return;const t=new ResizeObserver(g);return t.observe(e),()=>t.disconnect()},[g,t]);const m=e.useCallback(e=>{const t=c.current;if(!t)return;const n="left"===e?-150:150;t.scrollBy({left:l?-n:n,behavior:"smooth"})},[l]);if(!Array.isArray(t)||0===t.length)return null;const h=a?"rgba(31,41,55,0.85)":"rgba(255,255,255,0.95)",b=a?"#e5e7eb":"#374151",y=a?"#4b5563":"#d1d5db",v=a?"#111827":"#ffffff",w=a?"#374151":"#e5e7eb";return n.jsxs("div",{className:"flex-shrink-0 px-2 py-2 border-b flex items-center gap-1",style:{backgroundColor:v,borderColor:w,fontFamily:s,direction:l?"rtl":"ltr"},role:"region","aria-label":"Filter by category",children:[n.jsx("button",{type:"button",onClick:()=>m("left"),disabled:!u,"aria-label":"Scroll categories left",className:"flex-shrink-0 flex items-center justify-center w-6 h-6 rounded-full transition-all duration-200",style:{backgroundColor:h,border:`1px solid ${y}`,color:b,opacity:u?1:.3,cursor:u?"pointer":"default"},children:n.jsx(Le,{size:14})}),n.jsx("div",{ref:c,onScroll:g,className:"flex-1 flex gap-2 overflow-x-auto",style:{scrollBehavior:"smooth",WebkitOverflowScrolling:"touch",scrollbarWidth:"none",msOverflowStyle:"none"},children:t.map(e=>{const t=r===e.id;return n.jsx("button",{type:"button",onClick:()=>o?.(t?null:e.id),"aria-pressed":t,className:"flex-shrink-0 inline-flex items-center gap-1.5 px-3 py-1.5 rounded-full text-xs font-medium transition-all duration-150 whitespace-nowrap",style:{backgroundColor:a?"#1f2937":"#ffffff",border:t?`1.5px solid ${i}`:"1px solid "+(a?"#374151":"#e5e7eb"),color:t?i:a?"#e5e7eb":"#374151",fontFamily:s},children:n.jsx("span",{children:e.label})},e.id)})}),n.jsx("button",{type:"button",onClick:()=>m("right"),disabled:!p,"aria-label":"Scroll categories right",className:"flex-shrink-0 flex items-center justify-center w-6 h-6 rounded-full transition-all duration-200",style:{backgroundColor:h,border:`1px solid ${y}`,color:b,opacity:p?1:.3,cursor:p?"pointer":"default"},children:n.jsx(De,{size:14})})]})},on=({categories:e=[],selectedCategoryId:t=null,onSelect:r,isDark:o=!1,primaryColor:a="#2563eb",fontFamily:i="Inter",fontSize:s="14px",isRtl:l=!1,label:c="Choose a topic to get started:"})=>{if(!Array.isArray(e)||0===e.length)return null;const u=o?"#9ca3af":"#6b7280";return n.jsxs("div",{className:"pl-[50px] pt-1",style:{direction:l?"rtl":"ltr",paddingLeft:l?0:50,paddingRight:l?50:void 0},role:"region","aria-label":"Category filter",children:[n.jsx("div",{className:"mb-2",style:{color:u,fontFamily:i,fontSize:`calc(${s} - 1px)`},children:c}),n.jsx("div",{className:"flex flex-wrap gap-2",children:e.map(e=>{const l=t===e.id;return n.jsx("button",{type:"button",onClick:()=>r?.(l?null:e.id),"aria-pressed":l,className:"inline-flex items-center gap-1.5 px-3 py-1.5 rounded-full transition-all duration-150 hover:scale-[1.02] active:scale-[0.98]",style:{backgroundColor:o?"#1f2937":"#ffffff",border:l?`1.5px solid ${a}`:"1px solid "+(o?"#374151":"#e5e7eb"),color:l?a:o?"#e5e7eb":"#374151",fontFamily:i,fontSize:`calc(${s} - 1px)`,fontWeight:500},children:e.label},e.id)})})]})};const an=[{value:"😡",label:"😡",bg:"bg-red-200"},{value:"😕",label:"😕",bg:"bg-orange-200"},{value:"😐",label:"😐",bg:"bg-yellow-200"},{value:"😊",label:"😊",bg:"bg-green-200"},{value:"😍",label:"😍",bg:"bg-pink-200"}],sn=[{value:"positive",label:"👍"},{value:"negative",label:"👎"}],ln=[{value:"1",label:"1"},{value:"2",label:"2"},{value:"3",label:"3"},{value:"4",label:"4"},{value:"5",label:"5"}],cn=[{value:"1",label:"⭐"},{value:"2",label:"⭐"},{value:"3",label:"⭐"},{value:"4",label:"⭐"},{value:"5",label:"⭐"}],un=({format:t="EMOJI",prompt:r="How was your experience?",onRating:o,disabled:a=!1,isDark:i=!1,primaryColor:s="#2563eb",defaultLanguage:l="en"})=>{const c=e.useMemo(()=>V(l),[l]),[u,d]=e.useState(null),[p,f]=e.useState(null),[g,m]=e.useState(!1),h=async e=>{if(!a&&!g){d(e),m(!0);try{o&&o(e,t)}finally{m(!1)}}},b=(()=>{switch(t){case"THUMBS":return sn;case"NUMERIC":return ln;case"STARS":return cn;default:return an}})();return n.jsxs("div",{className:ee("transition-all duration-200 rounded-xl px-4",i?"bg-slate-800/50":"bg-slate-50/50"),children:[n.jsx("p",{className:ee("text-sm font-semibold text-center mb-3",i?"text-gray-300":"text-gray-500/80"),children:r}),n.jsxs("div",{className:"flex justify-center items-center",children:["EMOJI"===t&&n.jsx("div",{className:"flex gap-2 justify-center items-center",children:b.map(e=>n.jsx("button",{onClick:()=>h(e.value),disabled:a||g,className:ee("flex items-center justify-center text-2xl transition-transform","bg-transparent border-0 p-0 cursor-pointer","hover:scale-110 active:scale-95 disabled:opacity-50 disabled:cursor-not-allowed","focus:outline-none focus:ring-0",u===e.value?"":"opacity-80"),children:n.jsx("span",{role:"img","aria-label":`${c("rate")} ${e.value}`,children:e.label})},e.value))}),"THUMBS"===t&&n.jsx("div",{className:"flex gap-6 justify-center items-center",role:"group","aria-label":c("rateExperience"),children:b.map(e=>n.jsx("button",{"aria-label":1===e.value?c("thumbsUp"):c("thumbsDown"),onClick:()=>h(e.value),disabled:a||g,className:ee("w-10 h-10 rounded-xl border flex items-center justify-center shadow-md text-2xl transition-all","hover:scale-105 active:scale-95 disabled:opacity-50 disabled:cursor-not-allowed","drop-shadow-md",i?"bg-gray-700 border-gray-600 hover:bg-gray-600":"bg-white border-gray-100 hover:bg-gray-50",u===e.value&&"ring-2 ring-primary/40 scale-110"),style:{borderColor:u===e.value?s:void 0},children:n.jsx("span",{className:"drop-shadow-md","aria-hidden":"true",children:e.label})},e.value))}),"NUMERIC"===t&&n.jsx("div",{className:"flex gap-2 justify-center items-center",role:"group","aria-label":c("rateExperience"),children:b.map(e=>n.jsx("button",{"aria-label":`${c("rate")} ${e.value}`,onClick:()=>h(e.value),disabled:a||g,className:ee("w-10 h-10 rounded-lg flex items-center justify-center text-sm font-semibold transition-all","hover:scale-105 active:scale-95 disabled:opacity-50 disabled:cursor-not-allowed",u===e.value?"ring-2 ring-primary/40 scale-110 shadow-md text-white":i?"bg-gray-700 border border-gray-600 text-gray-300 hover:bg-gray-600":"bg-white border border-gray-200 text-gray-700 hover:bg-gray-50"),style:{backgroundColor:u===e.value?s:void 0,borderColor:u===e.value?s:void 0},children:e.label},e.value))}),"STARS"===t&&n.jsx("div",{className:"flex gap-2 justify-center items-center",onMouseLeave:()=>f(null),children:b.map(e=>{const t=p===e.value;return n.jsx("button",{onClick:()=>h(e.value),onMouseEnter:()=>f(e.value),disabled:a||g,className:ee("flex items-center justify-center text-2xl","bg-transparent border-0 p-0 cursor-pointer focus:outline-none","disabled:opacity-50 disabled:cursor-not-allowed"),style:{transform:t?"scale(1.25)":"scale(1)",filter:t?"brightness(1.1) drop-shadow(0 2px 4px rgba(0,0,0,0.15))":"none",opacity:t?1:.6,transition:"all 0.2s ease"},"aria-label":`${c("rate")} ${e.value}`,children:n.jsx("span",{"aria-hidden":"true",children:e.label})},e.value)})})]}),g&&n.jsx("p",{"aria-live":"polite",className:ee("text-xs mt-3 text-center",i?"text-slate-400":"text-slate-500"),children:c("submittingFeedback")})]})};async function dn({apiBaseUrl:e,conversationId:t,chip:n,submitText:r,position:o,source:a="widget",getAuthToken:i,enabled:s=!0}={}){try{if(!1===s)return!1;if(!e||"string"!=typeof e)return!1;if(!t||"string"!=typeof t)return!1;const l=function({chip:e,submitText:t,position:n,conversationId:r,source:o="widget"}={}){const a=e&&"object"==typeof e,i=a&&"string"==typeof e.text?e.text:"",s="string"==typeof t&&t?t:a&&"string"==typeof e.submitText?e.submitText:"string"==typeof e?e:"",l=i||s;if(!l)return null;const c={conversationId:r,chipText:l,submitText:s||void 0,position:Number.isInteger(n)?n:void 0,source:o},u=a?e?.promptId:void 0;return"string"==typeof u&&u&&(c.promptId=u),c}({chip:n,submitText:r,position:o,conversationId:t,source:a});if(!l)return!1;const c=`${e.replace(/\/$/,"")}/api/v1/support/chip-click`,u=JSON.stringify(l);let d;if("function"==typeof i)try{d=await i()}catch{d=void 0}if(!d&&"undefined"!=typeof navigator&&"function"==typeof navigator.sendBeacon&&"undefined"!=typeof Blob)try{if(navigator.sendBeacon(c,new Blob([u],{type:"application/json"})))return!0}catch{}if("function"!=typeof fetch)return!1;const p={"Content-Type":"application/json"};return d&&(p.Authorization=`Bearer ${d}`),await fetch(c,{method:"POST",headers:p,credentials:"include",keepalive:!0,body:u}),!0}catch{return!1}}const pn="#ffffff",fn="#f5f5f5",gn="#000000",mn="#1f2937",hn="#f3f4f6",bn="#2563eb",yn="eshal:widget:size",vn=(e,t)=>!e||(e=>e?.trim().toLowerCase())(e)===t,wn=e=>(e instanceof Date?e:new Date(e)).toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit",hour12:!0}).replace(/am|pm/i,e=>e.toUpperCase()),Sn=e=>{const t=(e||"EMOJI").toString().trim().toUpperCase();return"THUMBS"===t||"THUMB"===t?"THUMBS":"STARS"===t||"STAR"===t?"STARS":"NUMERIC"===t||"NUMBER"===t?"NUMERIC":"EMOJI"},xn=({isOpen:t,isMinimized:r,isDark:o,onStopGeneration:a,primaryColor:i,textColor:s,conciergeName:l,companyName:c,companyLogo:u,chatbotAvatarEnabled:d,chatbotAvatar:p,messages:f,isLoading:g,isConversationLoading:m=!1,inputValue:h,setInputValue:b,onSend:y,onDirectSend:v,onToggleTheme:w,onMinimize:S,onClose:x,quickQuestions:E=[],quickQuestionsEnabled:k,onQuickQuestion:A,quickQuestionsLayout:T="vertical",agentMessageBubbleColor:O,userMessageBoxColor:C,assistantTextColor:I,userTextColor:N,fontFamily:R="Inter",agentMessageBubbleFontFamily:_,agentMessageBubbleFontSize:P,userMessageBubbleFontFamily:L,userMessageBubbleFontSize:D,fontSize:M="14px",defaultLanguage:j="en",onDecision:F,headerTextBold:B=!1,headerTextItalic:U=!1,headerTextColor:$,headerFontFamily:G,headerFontSize:q,subtitle:H=null,showStatus:W=!1,statusMode:Y="always",officeHours:K=null,enableVoiceInteraction:X=!1,isVoiceSessionActive:Z=!1,voiceStatus:Q="idle",voiceError:J=null,voiceConclusionForCsat:te=!1,onVoiceToggle:ne,onBidiSubmit:oe,disclaimerEnabled:ae=!1,disclaimerText:ie,disclaimerPosition:se="top",disclaimerLinkUrl:le,disclaimerLinkLabel:ue,showPoweredBy:de=!0,apiBaseUrl:pe,apiKey:fe,getAuthToken:ge,conversationId:me,conciergeId:he,onboardingQuestions:be=[],onboardingActive:ye=!1,onboardingCompleted:ve=!1,onOnboardingFormSubmit:we,collectionPrompt:Se,csatEnabled:xe=!1,csatFormat:Ee="EMOJI",csatPrompt:ke="How was your experience?",csatRequest:Ae=null,onPromptSuggestionClick:Te,onboardingEnabled:Oe=!1,onResetConversation:Ce,sessionExpiringSoon:Ie=!1,autoPromptEnabled:Ne=!0,autoPromptQuestionDisplay:Re=!0,autoPromptClickTelemetry:_e=!0,allowFeedback:Pe=!0,provideCitations:Le=!0,onFeedback:De,onRetryMessage:Me,onRefreshChat:je,onCopyChat:Fe,filterCategories:Be=[],showFilterStep:Ue=!1,widgetFilter:ze=null,onWidgetFilterChange:$e,onSynthesizeAssistantMessage:Ge,launcherPosition:qe="bottom-right",chatFeatures:He,organizationId:Ve})=>{lt(R);const We=e.useRef(null),Ye=e.useRef(null),Ke=e.useMemo(()=>V(j),[j]);e.useEffect(()=>{Ye.current?.focus()},[]);const Xe=e.useCallback((e,t,n)=>{dn({apiBaseUrl:pe,conversationId:me,chip:t,submitText:null==e?void 0:String(e),position:n,source:"widget",getAuthToken:ge,enabled:_e})},[pe,ge,me,_e]),Qe=e.useCallback((e,t,n)=>{t&&"object"==typeof t&&Xe(e,t,n),Te?Te(e):v?.(e)},[Te,v,Xe]),Je=qe.includes("right"),et=qe.includes("bottom"),[tt,nt]=e.useState(()=>{if("undefined"==typeof window)return null;try{const e=window.localStorage.getItem(yn);if(!e)return null;const t=JSON.parse(e);if("number"==typeof t?.width&&"number"==typeof t?.height&&t.width>=320&&t.height>=400)return t}catch{}return null}),rt=e.useRef(null),ot=e.useRef({x:0,y:0}),at=e.useRef({width:380,height:650});e.useEffect(()=>{const e=e=>{const t=rt.current;if(!t)return;const n=e.clientX-ot.current.x,r=e.clientY-ot.current.y,o={...at.current},a=.92*window.innerWidth,i=.85*window.innerHeight;if("corner"===t||"horizontal"===t){const e=Je?at.current.width-n:at.current.width+n;o.width=Math.min(Math.max(320,e),a)}if("corner"===t||"vertical"===t){const e=et?at.current.height-r:at.current.height+r;o.height=Math.min(Math.max(400,e),i)}nt(o)},t=()=>{rt.current&&(rt.current=null,document.body.style.cursor="",document.body.style.userSelect="")};return window.addEventListener("mousemove",e),window.addEventListener("mouseup",t),()=>{window.removeEventListener("mousemove",e),window.removeEventListener("mouseup",t)}},[Je,et]),e.useEffect(()=>{if(tt)try{window.localStorage.setItem(yn,JSON.stringify(tt))}catch{}},[tt]);const it=(e,t)=>{t.preventDefault(),t.stopPropagation(),rt.current=e,ot.current={x:t.clientX,y:t.clientY},at.current=tt??{width:380,height:650};const n={corner:Je===et?"nwse-resize":"nesw-resize",horizontal:"ew-resize",vertical:"ns-resize"};document.body.style.cursor=n[e],document.body.style.userSelect="none"},[st,ct]=e.useState(!1),[ut,dt]=e.useState(()=>{try{return ce(Ve)?.csatSubmitted??!1}catch{return!1}}),[pt,ft]=e.useState(!1),[gt,mt]=e.useState(!1),[ht,bt]=e.useState(0),[yt,vt]=e.useState(""),[wt,St]=e.useState(!1);e.useEffect(()=>{try{const e=ce(Ve)?.csatSubmitted??!1;dt(e),e&&ct(!1)}catch{}},[me]),function(t,n=[],r={}){const{enabled:o=!0,threshold:a=30,behavior:i="smooth",delay:s=0}=r,l=e.useRef(!0);e.useRef(0),e.useEffect(()=>{if(!o||!t.current)return;const e=t.current,n=()=>{const t=e.scrollHeight-e.scrollTop-e.clientHeight;l.current=t<a},r=()=>{n()};e.addEventListener("scroll",r,{passive:!0}),n();const c=setTimeout(()=>{l.current&&e&&e.scrollTo({top:e.scrollHeight,behavior:i})},s);return()=>{e.removeEventListener("scroll",r),clearTimeout(c)}},[t,o,a,i,s,...n])}(We,[f,g],{enabled:!0,threshold:30,behavior:"smooth",delay:0});const xt=z(j),Et=e.useMemo(()=>o?vn(O,pn)?mn:O||mn:O||pn,[O,o]),kt=e.useMemo(()=>o?vn(s,gn)?hn:s||hn:s||gn,[o,s]),At=e.useMemo(()=>o?vn(C,fn)?i||bn:C||i||bn:C||fn,[o,i,C]),Tt=Ke(gt?"conversationResolved":"typeYourMessage"),Ot=f?.some?.(e=>"user"===e.role),Ct=e.useMemo(()=>(f||[]).filter(e=>"user"===e.role).length,[f]),[It,Nt]=e.useState(0),Rt=ze?.category?(Be||[]).find(e=>e.id===ze.category):null,_t=e.useCallback(e=>{if(!$e)return;const t=ze?.category||null;if(e){if($e({category:e,tags:[]}),Nt(Ct),!Ot&&e!==t&&Ge){const t=(Be||[]).find(t=>t.id===e),n=t?.label||e,r=Ke("categoryTopicsHeading").replace("{category}",n);Ge(r,{replaceMarker:"category-intro"})}}else $e(null)},[$e,ze,Ct,Be,Ot,Ge,Ke]);e.useCallback(e=>{const t=ze?.category||Rt?.id;t&&$e&&$e({category:t,tags:[e]}),v&&v(e)},[ze,Rt,$e,v]);const Pt=Array.isArray(Be)&&Be.length>0,Lt=Pt&&!Ot&&!ze?.category,Dt=!Ot&&E.length>0&&k&&!ze?.category,Mt=be&&be.length>0,jt=Boolean(xe),Ft=Oe&&Mt&&!ve,Bt=e.useCallback(async()=>{if(jt&&!wt&&!gt&&0!==ht){St(!0);try{const e={"Content-Type":"application/json"};if("function"==typeof ge){const t=await ge();t&&(e.Authorization=`Bearer ${t}`)}const t=Sn(Ee),n=await fetch(`${pe.replace(/\/$/,"")}/api/v1/support/csat`,{method:"POST",headers:e,credentials:"include",body:JSON.stringify({conversationId:me,rating:String(ht),ratingFormat:t,conciergeId:he,feedback:yt||void 0})});n.ok?(ft(!1),bt(0),vt(""),$e&&$e(null),je?je():Ce&&Ce()):console.error("Failed to submit resolve feedback:",await n.text())}catch(e){console.error("Error submitting resolve feedback:",e)}finally{St(!1)}}},[jt,wt,gt,ht,yt,me,ge,he,pe,Ee,Ce,je,$e]),Ut=e.useCallback(()=>{if(!jt||!me||!Ot)return $e&&$e(null),je?je():Ce&&Ce(),void x?.();pt?(ft(!1),x?.()):gt?x?.():ft(!0)},[jt,me,Ot,pt,gt,x,$e,je,Ce]);e.useEffect(()=>{jt||(pt&&ft(!1),gt&&mt(!1),0!==ht&&bt(0),yt&&vt(""))},[jt,pt,gt,ht,yt]);const zt=e.useMemo(()=>{if(!f||!Array.isArray(f))return[];for(let e=f.length-1;e>=0;e-=1)if("assistant"===f[e]?.role){const t=f[e].prompts;return Array.isArray(t)?t:[]}return[]},[f]),$t=e.useRef([]);e.useEffect(()=>{zt.length>0?$t.current=zt:f&&0!==f.length&&f.some(e=>"user"===e.role)||($t.current=[])},[zt,f]);const qt=e.useRef(Ct);e.useEffect(()=>{Ct!==qt.current&&(qt.current=Ct,$t.current=[])},[Ct]);const Ht=Array.isArray(f)&&f.some(e=>"user"===e?.role),Vt=zt.length>0?zt:Ht?$t.current:[];e.useEffect(()=>{if(!xe)return;if(!st)return;if(ut)return;const e=We.current;if(!e)return;const t=window.requestAnimationFrame(()=>{e.scrollTo({top:e.scrollHeight,behavior:"smooth"})});return()=>{window.cancelAnimationFrame(t)}},[st,xe,ut]);const Wt=()=>{const e=Sn(Ee);if("STARS"===e)return n.jsx("div",{className:"flex justify-center gap-2 mb-5",role:"group","aria-label":Ke("rateExperience"),children:[1,2,3,4,5].map(e=>n.jsx("button",{"aria-label":`${Ke("rate")} ${e}`,onClick:()=>bt(e),className:"transition-all duration-150 hover:scale-110 active:scale-95 bg-transparent border-0 p-0 cursor-pointer",disabled:wt,children:n.jsx(Ze,{className:ee("w-8 h-8 transition-colors",e<=ht?"text-yellow-400 drop-shadow-sm":o?"text-gray-600":"text-gray-300"),fill:e<=ht?"#FBBF24":"none"})},e))});if("THUMBS"===e)return n.jsx("div",{className:"flex gap-4 justify-center mb-5",role:"group","aria-label":Ke("rateExperience"),children:[{value:"positive",emoji:"👍"},{value:"negative",emoji:"👎"}].map(e=>n.jsx("button",{"aria-label":"positive"===e.value?Ke("thumbsUp"):Ke("thumbsDown"),onClick:()=>bt(e.value),disabled:wt,className:ee("w-12 h-12 rounded-xl border flex items-center justify-center text-2xl transition-all hover:scale-105 active:scale-95",ht===e.value?"ring-2 ring-blue-300 scale-110 shadow-lg":"",o?"bg-gray-700 border-gray-600 hover:bg-gray-600":"bg-white border-gray-200 hover:bg-gray-50"),children:n.jsx("span",{className:"drop-shadow-md",children:e.emoji})},e.value))});return n.jsx("div",{className:"flex gap-2 justify-center items-center mb-5",role:"group","aria-label":Ke("rateExperience"),children:[{value:1,emoji:"😡"},{value:2,emoji:"😕"},{value:3,emoji:"😐"},{value:4,emoji:"😊"},{value:5,emoji:"😍"}].map(e=>n.jsx("button",{"aria-label":`${Ke("rate")} ${e.value}`,onClick:()=>bt(e.value),disabled:wt,className:ee("rounded-full w-10 h-10 flex items-center justify-center text-xl transition-all hover:scale-110 active:scale-95 bg-transparent border-0 p-0 cursor-pointer",ht===e.value?"ring-2 ring-blue-100 scale-125 bg-gradient-to-b from-yellow-200 to-yellow-400 shadow-md":"grayscale-[0.3] opacity-80 hover:grayscale-0"),children:n.jsx("span",{role:"img","aria-label":`${Ke("rate")} ${e.value}`,className:"drop-shadow-sm filter",children:e.emoji})},e.value))})};if(!t)return null;const Yt=!r&&tt?{width:tt.width,height:tt.height,maxWidth:"92vw",maxHeight:"85vh"}:void 0;return n.jsxs("div",{dir:xt?"rtl":"ltr",className:"relative flex-shrink-0 z-50 "+(r?"w-80 h-auto":""),style:Yt,children:[!r&&n.jsxs(n.Fragment,{children:[n.jsx("div",{onMouseDown:e=>it("horizontal",e),className:"absolute top-0 h-full w-1.5 cursor-ew-resize hover:bg-blue-500/20 transition-colors z-[70] "+(Je?"left-0":"right-0"),"aria-hidden":!0}),n.jsx("div",{onMouseDown:e=>it("vertical",e),className:"absolute left-0 w-full h-1.5 cursor-ns-resize hover:bg-blue-500/20 transition-colors z-[70] "+(et?"top-0":"bottom-0"),"aria-hidden":!0})]}),n.jsxs("div",{id:"chat-window-panel",ref:Ye,role:"dialog","aria-modal":"true","aria-label":Ke("openChat"),tabIndex:-1,className:`relative focus:outline-none ${tt||r?"":"w-[380px]"} ${tt||r?"":"h-[650px]"} ${r?"w-80 h-auto":""} ${tt&&!r?"w-full h-full":""} max-w-[92vw] border rounded-2xl shadow-2xl bg-white border-gray-200 flex flex-col ${r?"":"max-h-[85vh]"} overflow-hidden ${o?"bg-gray-900 border-gray-700":""}`,children:[!r&&n.jsx("div",{onMouseDown:e=>it("corner",e),"aria-hidden":"true",className:`absolute w-4 h-4 ${Je===et?"cursor-nwse-resize":"cursor-nesw-resize"} text-gray-400 hover:text-blue-500 transition-colors z-[71] flex p-0.5 ${et?"top-0 items-start":"bottom-0 items-end"} ${Je?"left-0 justify-start":"right-0 justify-end"}`,children:n.jsx("svg",{viewBox:"0 0 12 12",className:"w-3 h-3 "+(et&&Je?"rotate-180":et?"-rotate-90":Je?"rotate-90":""),"aria-hidden":!0,children:n.jsx("path",{d:"M11 1 L1 11 M11 5 L5 11 M11 9 L9 11",stroke:"currentColor",strokeWidth:"1.5",fill:"none",strokeLinecap:"round"})})}),n.jsx(tn,{conciergeName:l,companyName:c,companyLogo:u,primaryColor:i,isDark:o,isMinimized:r,textColor:kt,fontFamily:R,fontSize:M,onToggleTheme:w,onMinimize:S,onClose:Ut,headerTextBold:B,headerTextItalic:U,headerTextColor:$,headerFontFamily:G,headerFontSize:q,subtitle:H,showStatus:W,statusMode:Y,officeHours:K,onRefreshChat:je,onCopyChat:Fe,defaultLanguage:j}),!r&&Pt&&!Lt&&!(pt&&!gt)&&!(ye&&!ve)&&n.jsx(rn,{categories:Be,selectedCategoryId:ze?.category||null,onSelect:_t,isDark:o,primaryColor:i,fontFamily:R,isRtl:xt}),!r&&n.jsxs(n.Fragment,{children:[n.jsx("div",{ref:We,role:"log","aria-live":"polite",className:`chat-messages flex-1 overflow-y-auto px-3 py-4 space-y-4 ${o?"bg-gray-900":"bg-gradient-to-b from-gray-50/50 to-white"} break-words`,children:pt&&!gt?n.jsx("div",{className:"animate-in slide-in-from-top-4 fade-in duration-300 mt-4 mx-2",children:n.jsxs("div",{className:ee("w-full rounded-3xl p-6 shadow-lg",o?"bg-gray-800 shadow-black/20":"bg-white shadow-gray-200/80"),children:[n.jsx("p",{className:ee("text-sm font-medium text-center mb-5 [font-family:inherit]",o?"text-gray-300":"text-gray-500"),children:ke||Ke("feedbackPrompt")}),Wt(),n.jsx("textarea",{"aria-label":Ke("feedbackPlaceholder"),value:yt,onChange:e=>{e.target.value.length<=1e3&&vt(e.target.value)},maxLength:1e3,placeholder:Ke("feedbackPlaceholder"),rows:4,disabled:wt,className:ee("w-full rounded-xl border px-4 py-3 text-sm [font-family:inherit] resize-none outline-none transition-colors mb-5",o?"bg-gray-700 border-gray-600 text-gray-100 placeholder-gray-400":"bg-gray-50 border-gray-200 text-gray-900 placeholder-gray-400")}),n.jsxs("div",{className:"relative group",children:[n.jsx("button",{onClick:Bt,disabled:0===ht||wt,"aria-describedby":0===ht?"resolve-rating-hint":void 0,className:ee("w-full py-3.5 rounded-xl text-sm font-semibold [font-family:inherit] transition-all duration-200 border-none outline-none focus:outline-none active:outline-none focus:ring-0 active:ring-0","disabled:opacity-50 disabled:cursor-not-allowed",o?"bg-gray-700 text-gray-100 hover:bg-gray-600":"bg-gray-100 text-gray-700 hover:bg-gray-200"),children:Ke(wt?"submitting":"submitFeedback")}),0===ht&&!wt&&n.jsx("div",{id:"resolve-rating-hint",role:"tooltip",className:"absolute -top-8 left-1/2 -translate-x-1/2 whitespace-nowrap px-2 py-1 rounded-md text-xs bg-gray-800 text-white opacity-0 group-hover:opacity-100 transition-opacity pointer-events-none",children:Ke("selectRatingFirst")})]})]})}):ye&&!ve&&we?n.jsx(nn,{questions:be,onPromptSuggestionClick:Qe,collapsiblePrompt:Se,onSubmit:we,primaryColor:i,isRtl:xt,isDark:o,defaultLanguage:j,fontFamily:R}):n.jsxs(n.Fragment,{children:[Ie&&n.jsx("div",{role:"status",className:"mx-3 mt-1 mb-2 rounded-lg px-3 py-2 text-xs font-medium "+(o?"bg-amber-900/40 text-amber-200 border border-amber-700/50":"bg-amber-50 text-amber-800 border border-amber-200"),children:Ke("sessionExpiringSoon")}),n.jsx(Gt,{messages:f,isDark:o,primaryColor:i,isLoading:g,agentMessageBubbleColor:O,userMessageBoxColor:C,textColor:s,assistantTextColor:I,userTextColor:N,fontFamily:R,agentMessageBubbleFontFamily:_,agentMessageBubbleFontSize:P,userMessageBubbleFontFamily:L,userMessageBubbleFontSize:D,fontSize:M,formatTime:wn,isRtl:xt,defaultLanguage:j,quickQuestions:E,shouldShowQuickQuestions:Dt,onQuickQuestion:A??v,quickQuestionsLayout:T,onDecision:F,disclaimerEnabled:ae,disclaimerText:ie,disclaimerPosition:se,disclaimerLinkUrl:le,disclaimerLinkLabel:ue,resolvedAgentBubbleColor:Et,resolvedUserMessageColor:At,resolvedTextColor:kt,isVoiceSessionActive:Z,voiceStatus:Q,messagesContainerRef:We,companyLogo:u,chatbotAvatarEnabled:d,chatbotAvatar:p,conciergeName:l,companyName:c,apiBaseUrl:pe,getAuthToken:ge,onPromptSuggestionClick:Qe,conversationResetKey:me,allowFeedback:Pe,provideCitations:Le,onFeedback:De,onRetryMessage:Me,headerTextColor:$,beforePromptsSlot:Lt?n.jsx(on,{categories:Be,selectedCategoryId:ze?.category||null,onSelect:_t,isDark:o,primaryColor:i,fontFamily:R,fontSize:M,isRtl:xt,label:Ke("chooseTopicLabel")}):null,quickQuestionsHeadingLabel:Pt?Ke("quickQuestionsHeadingLabel"):void 0}),(st&&xe||Ae)&&!ut&&n.jsx("div",{className:"","data-testid":"widget-csat-card",children:n.jsx(un,{format:Sn(Ae?.format||Ee),prompt:Ae?.prompt||ke||Ke("howWasYourExperience"),onRating:async(e,t)=>{dt(!0),ct(!1),(e=>{try{const t=ce(e);if(!t)return;t.csatSubmitted=!0,localStorage.setItem(`${re}_${e}`,JSON.stringify(t))}catch{}})(Ve);try{const n={"Content-Type":"application/json"};if("function"==typeof ge){const e=await ge();e&&(n.Authorization=`Bearer ${e}`)}const r=await fetch(`${pe.replace(/\/$/,"")}/api/v1/support/csat`,{method:"POST",headers:n,credentials:"include",body:JSON.stringify({conversationId:me,rating:e,ratingFormat:t,conciergeId:he})});r.ok||console.error("CSAT submission failed:",await r.text())}catch(e){console.error("CSAT submission error:",e)}},disabled:!1,isDark:o,primaryColor:i,defaultLanguage:j})})]})}),!(ye&&!ve)&&n.jsx(Zt,{onStopGeneration:a,inputValue:h,setInputValue:b,onSend:y,isDark:o,primaryColor:i,isOpen:t,isMinimized:r,isLoading:g,isConversationLoading:m,placeholder:Tt,textColor:kt,fontFamily:R,userMessageBubbleFontFamily:L,userMessageBubbleFontSize:D,fontSize:M,isRtl:xt,csatVisible:st&&xe&&!ut||jt&&(pt||gt),enableVoiceInteraction:X,isVoiceSessionActive:Z,voiceStatus:Q,voiceError:J,onVoiceToggle:ne,onBidiSubmit:oe,disclaimerEnabled:ae,disclaimerText:ie,disclaimerPosition:se,disclaimerLinkUrl:le,disclaimerLinkLabel:ue,showPoweredBy:de,defaultLanguage:j,onboardingQuestions:be,onboardingActive:ye,onboardingCompleted:ve,onboardingEnabled:Oe,userMessageBoxColor:C,resolvedUserMessageColor:At,userTextColor:N,promptSuggestions:pt||gt||!1===Ne||g?[]:Vt,onPromptSuggestionClick:Qe,autoPromptQuestionDisplay:Re,tagSelectorNode:null,showResolveButton:jt&&Ot&&!gt&&!pt&&!st&&!Ft,onResolve:()=>{jt&&ft(!0)},chatFeatures:He,apiEndpoint:pe,organizationId:Ve,conversationId:me})]})]})]})},En=new Map;const kn={whatsapp:["wa.me","api.whatsapp.com"],telegram:["t.me"],messenger:["m.me"],instagram:["ig.me","instagram.com","www.instagram.com"]},An={whatsapp:"WhatsApp",telegram:"Telegram",messenger:"Messenger",instagram:"Instagram"};const Tn=e.forwardRef(({isDark:t,primaryColor:r,onToggle:o,textColor:a,headerTextColor:i,defaultLanguage:s="en",isOpen:l=!1,className:c,channelLinks:u},d)=>{const p=e.useMemo(()=>V(s),[s]),f=e.useMemo(()=>function(e){if(!Array.isArray(e))return[];const t=[];for(const n of e){if(!n||"object"!=typeof n)continue;const e="string"==typeof n.type?n.type.toLowerCase():"",r=kn[e];if(!r||"string"!=typeof n.url)continue;let o;try{o=new URL(n.url)}catch{continue}"https:"===o.protocol&&r.includes(o.hostname.toLowerCase())&&t.push({type:e,url:o.toString(),label:"string"==typeof n.label&&n.label.trim()?n.label.trim():An[e]})}return t}(u),[u]),[g,m]=e.useState(!1),h=f.length>0,b=r,y=i||"#FFFFFF",v={display:"block",width:"100%",padding:"8px 12px",textAlign:"start",fontSize:"14px",color:t?"#F1F5F9":"#0F172A",background:"transparent",border:"none",borderRadius:"6px",textDecoration:"none",cursor:"pointer"};return n.jsxs("div",{className:`relative ${c||""}`,children:[h&&g&&!l&&n.jsxs("div",{role:"menu","aria-label":p("chooseChannel"),"data-testid":"channel-picker",style:{position:"absolute",bottom:"76px",right:0,minWidth:"180px",padding:"6px",borderRadius:"8px",border:"1px solid "+(t?"#334155":"#E2E8F0"),background:t?"#1E293B":"#FFFFFF",boxShadow:"0 10px 30px rgba(15, 23, 42, 0.15)"},children:[n.jsx("button",{type:"button",role:"menuitem",style:v,onClick:()=>{m(!1),o?.()},children:p("chatHere")}),f.map(e=>n.jsx("a",{role:"menuitem",href:e.url,target:"_blank",rel:"noopener noreferrer",style:v,onClick:()=>m(!1),children:e.label},`${e.type}-${e.url}`))]}),n.jsxs("button",{ref:d,onClick:()=>{!h||l?o?.():m(e=>!e)},className:"group relative w-16 h-16 rounded-full shadow-2xl transition-all duration-300 flex items-center justify-center text-white overflow-hidden hover:scale-110",style:{background:`linear-gradient(135deg, ${b} 0%, ${b}dd 100%)`,boxShadow:`0 10px 30px ${b}40`,border:"none"},"aria-label":p(l?"closeChat":"openChat"),"aria-expanded":h&&g||l,"aria-haspopup":h?"menu":void 0,"aria-controls":"chat-window-panel",children:[n.jsx("div",{className:"absolute inset-0 rounded-full bg-white/20 scale-0 group-hover:scale-100 transition-transform duration-500"}),n.jsx("div",{className:"relative z-10 transition-transform duration-300",children:n.jsx(He,{className:"w-7 h-7",style:{color:y}})})]})]})});Tn.displayName="ToggleButton";const On="0.2.23",Cn=function(e){if(null==e)return Nn;if("function"==typeof e)return In(e);if("object"==typeof e)return Array.isArray(e)?function(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=Cn(e[n]);return In(r);function r(...e){let n=-1;for(;++n<t.length;)if(t[n].apply(this,e))return!0;return!1}}(e):function(e){const t=e;return In(n);function n(n){const r=n;let o;for(o in e)if(r[o]!==t[o])return!1;return!0}}(e);if("string"==typeof e)return function(e){return In(t);function t(t){return t&&t.type===e}}(e);throw new Error("Expected function, string, or object as test")};function In(e){return function(t,n,r){return Boolean(function(e){return null!==e&&"object"==typeof e&&"type"in e}(t)&&e.call(this,t,"number"==typeof n?n:void 0,r||void 0))}}function Nn(){return!0}const Rn=[],_n=!0,Pn=!1,Ln="skip";function Dn(e,t,n,r){let o;"function"==typeof t&&"function"!=typeof n?(r=n,n=t):o=t;const a=Cn(o),i=r?-1:1;!function e(o,s,l){const c=o&&"object"==typeof o?o:{};if("string"==typeof c.type){const e="string"==typeof c.tagName?c.tagName:"string"==typeof c.name?c.name:void 0;Object.defineProperty(u,"name",{value:"node ("+o.type+(e?"<"+e+">":"")+")"})}return u;function u(){let c,u,d,p=Rn;if((!t||a(o,s,l[l.length-1]||void 0))&&(p=function(e){if(Array.isArray(e))return e;if("number"==typeof e)return[_n,e];return null==e?Rn:[e]}(n(o,l)),p[0]===Pn))return p;if("children"in o&&o.children){const t=o;if(t.children&&p[0]!==Ln)for(u=(r?t.children.length:-1)+i,d=l.concat(t);u>-1&&u<t.children.length;){const n=t.children[u];if(c=e(n,u,d)(),c[0]===Pn)return c;u="number"==typeof c[1]?c[1]:u+i}}return p}}(e,void 0,[])()}function Mn(e,t,n,r){let o,a,i;"function"==typeof t&&"function"!=typeof n?(a=void 0,i=t,o=n):(a=t,i=n,o=r),Dn(e,a,function(e,t){const n=t[t.length-1],r=n?n.children.indexOf(e):void 0;return i(e,r,n)},o)}let jn=null;const Fn=new Set;function Bn(e,t){if("string"!=typeof e||""===e.trim())return!0;let n;try{n=new URL(e.trim(),t.apiOrigin||"http://relative.invalid")}catch{return!1}return!(!t.apiOrigin||n.origin!==t.apiOrigin)||"https:"===n.protocol&&!n.username&&!n.password&&t.hosts.has(n.hostname.toLowerCase())}function Un(){return e=>{const t=jn;t&&Mn(e,"element",(e,n,r)=>{if("img"!==e.tagName||!r||void 0===n)return;const o=e.properties&&e.properties.src;if(Bn(o,t))return;if("report"===t.mode){let e=String(o);try{e=new URL(String(o)).host}catch{}return void(Fn.has(e)||(Fn.add(e),console.warn(`[eshal-widget] would block an image from ${e}`)))}const a=e.properties&&"string"==typeof e.properties.alt?e.properties.alt:"";return r.children.splice(n,1,{type:"text",value:a}),n})}}const zn=({getAuthToken:t,apiBaseUrl:r,darkMode:o,primaryColor:a,position:i,companyName:s,conciergeName:l,companyLogo:c,welcomeMessage:u,quickQuestions:d,quickQuestionsEnabled:p,quickQuestionsLayout:f="vertical",textColor:g,agentMessageBubbleColor:m,userMessageBoxColor:h,assistantTextColor:b,userTextColor:y,fontFamily:v,fontSize:w,defaultLanguage:S,apiKey:x,agentMessageBubbleFontFamily:E,agentMessageBubbleFontSize:k,userMessageBubbleFontFamily:A,userMessageBubbleFontSize:T,autoOpen:O=!1,openDelay:C=0,locale:I,className:N="",headerTextBold:R,headerTextItalic:_,enableVoiceInteraction:P,disclaimerEnabled:L,disclaimerText:D,disclaimerPosition:M,disclaimerLinkUrl:j,disclaimerLinkLabel:F,showPoweredBy:B,onboardingQuestions:U,collectionPrompt:z,allowedDomains:$,onboardingEnabled:G,wsBaseUrl:q,channelLinks:H})=>{const[V,W]=e.useState(null),[Y,K]=e.useState(!0),[X,Z]=e.useState(null),[Q,ee]=e.useState(!1),te=e.useRef(!1);e.useEffect(()=>{if(te.current)return;(async()=>{if(!r)return Z("apiBaseUrl is required"),void K(!1);try{K(!0);const e=await(async(e,t)=>{if(!e)throw new Error("apiBaseUrl is required");try{const n=e.replace(/\/$/,""),r=On?`${n}/api/v1/deploy-agent?wv=${encodeURIComponent(On)}`:`${n}/api/v1/deploy-agent`,o={"Content-Type":"application/json"};if("function"==typeof t){const e=await t();e&&(o.Authorization=`Bearer ${e}`)}const a=await fetch(r,{method:"GET",headers:o,credentials:"include"});if(404===a.status)return null;if(!a.ok)throw new Error(`HTTP error! status: ${a.status}`);return await a.json()}catch(e){throw console.error("Failed to fetch agent configuration:",e),e}})(r,t);if(null===e)return te.current=!0,ee(!0),W(null),void Z(null);!function(e,t){if(!e||"report"!==e.mode&&"enforce"!==e.mode)return void(jn=null);let n="";try{n=new URL(t).origin}catch{n=""}jn={mode:e.mode,hosts:new Set((Array.isArray(e.hosts)?e.hosts:[]).map(e=>String(e).toLowerCase())),apiOrigin:n}}(e.chatImagePolicy,r),W(e),Z(null)}catch(e){console.error("Failed to load agent configuration:",e),Z(e.message||"Failed to load configuration")}finally{K(!1)}})()},[r,t]);const ne=e.useMemo(()=>{if(!V)return null;const e=V.config??{},t=e.identity??{},n=e.branding??{},r=e.typography??{},f=e.messages??{},x=e.voice??{},O=e.onboarding??{},C=e.disclaimer??{},I=e.csat??{},N=e.inactivity??{},q=e.behavior??{},W=e.security??{},Y=e.layout??{},K=S??f.defaultLocale??"en",X=f.bundles?.[K]??{},Z=f.bundles?.en??{},Q={welcome:X.welcome||Z.welcome,fallback:X.fallback||Z.fallback,quickQuestions:Array.isArray(X.quickQuestions)&&X.quickQuestions.length>0?X.quickQuestions:Z.quickQuestions},ee=$??W.allowedDomains??(W.domains??[]).map(e=>"string"==typeof e?e:e.domain).filter(Boolean)??[];return{darkMode:o??!1,primaryColor:a??n.brandColor??"#2563eb",companyName:s??t.companyName??"Support Team",conciergeName:l??t.conciergeName,companyLogo:c??n.avatar??null,chatbotAvatarEnabled:n.chatbotAvatarEnabled??!1,chatbotAvatar:n.chatbotAvatar??null,welcomeMessage:u??Q.welcome??"Hi! How can we help?",fallbackMessage:Q.fallback,quickQuestions:d??Q.quickQuestions??[],quickQuestionsEnabled:p??f.quickQuestionsEnabled,textColor:g??"#000000",agentMessageBubbleColor:m??r.agentMessageBubbleColor,userMessageBoxColor:h??r.userMessageBoxColor,assistantTextColor:b??r.assistantTextColor??"#000000",userTextColor:y??r.userTextColor??"#000000",fontFamily:v??r.agentMessageBubbleFontFamily??"Inter",fontSize:w??r.agentMessageBubbleFontSize??"14px",defaultLanguage:K,headerTextBold:R??r.headerTextBold??!1,headerTextItalic:_??r.headerTextItalic??!1,headerTextColor:r.headerTextColor??"#FFFFFF",headerFontFamily:r.headerFontFamily,headerFontSize:r.headerFontSize,subtitle:t.subtitle??null,showStatus:t.showStatus??!1,statusMode:t.statusMode??"always",officeHours:t.officeHours??null,enableVoiceInteraction:P??x.enableVoiceInteraction??!1,disclaimerEnabled:L??C.enabled??!1,disclaimerText:D??C.text,disclaimerPosition:M??(te=C.position,te?te.toLowerCase():"top"),disclaimerLinkUrl:J(j??C.linkUrl),disclaimerLinkLabel:F??C.linkLabel,showPoweredBy:B??n.showPoweredBy??!0,onboardingQuestions:U??O.questions??[],collectionPrompt:z??O.collapsiblePrompt??"Before we begin, I need to verify your details.",allowedDomains:ee,launcherPosition:i??(e=>e?e.toLowerCase().replace(/_/g,"-"):"bottom-right")(Y.launcherPosition),onboardingEnabled:G??O.enabled??!1,inactivityTimeoutValue:N.timeoutValue??null,inactivityTimeoutUnit:N.timeoutUnit??null,agentMessageBubbleFontFamily:E??r.agentMessageBubbleFontFamily??v??"Inter",agentMessageBubbleFontSize:k??r.agentMessageBubbleFontSize??w??"14px",userMessageBubbleFontFamily:A??r.userMessageBubbleFontFamily??v??"Inter",userMessageBubbleFontSize:T??r.userMessageBubbleFontSize??w??"14px",csatEnabled:I.enabled??!1,csatFormat:I.format??"EMOJI",csatPrompt:I.prompt??"How was your experience?",autoPromptEnabled:q.autoPromptEnabled??!0,autoPromptQuestionDisplay:q.autoPromptQuestionDisplay??!0,autoPromptClickTelemetry:q.autoPromptClickTelemetry??!0,allowFeedback:q.allowFeedback??!0,provideCitations:q.provideCitations??!0,organizationId:V.organizationId??null,chatFeatures:e.chatFeatures??null,channelLinks:H??e.channelLinks??null};var te},[H,V,o,a,i,s,l,c,u,d,p,g,m,h,b,y,v,w,S,R,_,P,L,D,M,F,j,B,U,G,z,$,E,k,A,T]),re=e.useMemo(()=>!ne||((e=[])=>{if("undefined"==typeof window)return!1;const t=window.location.hostname.toLowerCase(),n=window.location.host.toLowerCase();return!(!e||0===e.length)&&e.some(e=>{const r=e.toLowerCase().trim();return r.includes(":")?n===r:t===r||t.endsWith("."+r)})})(ne.allowedDomains),[ne]),oe=e.useMemo(()=>({welcomeMessage:"Hi! How can we help?",quickQuestions:[],apiBaseUrl:r||"",apiKey:x||"",getAuthToken:t,autoOpen:!1,openDelay:0,darkMode:!1,enableVoiceInteraction:!1,onboardingQuestions:[],onboardingEnabled:!1,collectionPrompt:void 0}),[r,x,t]),{isOpen:ae,isMinimized:ie,isDark:se,messages:le,inputValue:ce,isLoading:ue,widgetRef:de,setInputValue:pe,handleSend:fe,stopGeneration:ge,handleQuickQuestion:me,sendMessage:he,retryMessage:be,toggleChat:ye,toggleTheme:ve,toggleMinimize:we,closeChat:Se,handleDecision:xe,isVoiceSessionActive:ke,voiceStatus:Ae,voiceError:Te,voiceConclusionForCsat:Oe,handleVoiceToggle:Ce,sendBidiTextMessage:Ie,onboardingActive:Ne,onboardingCompleted:Re,handleOnboardingFormSubmit:_e,conversationId:Pe,resetConversation:Le,sessionExpiringSoon:De,updateMessageFeedback:Me,widgetFilter:je,setWidgetFilter:Fe,addAssistantMessage:Be,csatRequest:Ue}=Ee(ne?{welcomeMessage:ne.welcomeMessage,fallbackMessage:ne.fallbackMessage,quickQuestions:ne.quickQuestions,apiBaseUrl:r,wsBaseUrl:q??V?.wsBaseUrl,apiKey:x,locale:ne.defaultLanguage||I,organizationId:ne.organizationId,getAuthToken:t,autoOpen:O,openDelay:C,darkMode:ne.darkMode,enableVoiceInteraction:ne.enableVoiceInteraction,onboardingQuestions:ne.onboardingQuestions,onboardingEnabled:ne.onboardingEnabled,collectionPrompt:ne.collectionPrompt,provideCitations:ne.provideCitations,inactivityTimeoutValue:ne.inactivityTimeoutValue,inactivityTimeoutUnit:ne.inactivityTimeoutUnit,messageLimits:V?.messageLimits}:oe),ze=e.useRef(null),$e=e.useRef(ae);e.useEffect(()=>{$e.current&&!ae&&ze.current?.focus(),$e.current=ae},[ae]);const Ge=e.useCallback((e,n,o)=>{if(Me(e,n),!Pe||!r)return;const a=r.replace(/\/$/,"");(async()=>{try{const r={"Content-Type":"application/json"};if("function"==typeof t){const e=await t();e&&(r.Authorization=`Bearer ${e}`)}await fetch(`${a}/api/v1/support/feedback`,{method:"POST",headers:r,credentials:"include",body:JSON.stringify({messageContent:e,conversationId:Pe,feedback:n,feedbackText:o})})}catch(e){console.error("Feedback submission error:",e)}})()},[Pe,r,t,Me]),qe=e.useCallback(()=>{Le&&Le()},[Le]),{categories:He,hasFilters:Ve}=function(t,n){const r=!!t,[o,a]=e.useState({categories:[],loading:r,error:null});e.useEffect(()=>{if(!t)return void a({categories:[],loading:!1,error:null});const e=n?`${t}|__session__`:`${t}|__proxy__`,r=En.get(e);if(r)return void a({categories:r,loading:!1,error:null});let o=!1;a(e=>({...e,loading:!0,error:null}));const i=`${t.replace(/\/$/,"")}/api/v1/widget/filters`;return(async()=>{try{const t={Accept:"application/json"};if("function"==typeof n){const e=await n();e&&(t.Authorization=`Bearer ${e}`)}const r=await fetch(i,{method:"GET",headers:t});if(!r.ok)throw new Error(`filter catalog HTTP ${r.status}`);const s=await r.json(),l=Array.isArray(s?.categories)?s.categories:[];if(o)return;En.set(e,l),a({categories:l,loading:!1,error:null})}catch(e){if(o)return;console.warn("[useFilterCatalog] catalog fetch failed:",e),a({categories:[],loading:!1,error:e})}})(),()=>{o=!0}},[t,n]);const i=e.useMemo(()=>Array.isArray(o.categories)&&o.categories.length>0,[o.categories]);return{...o,hasFilters:i}}(r,t),We=e.useCallback(()=>{const e=le.filter(e=>e.content&&""!==e.content.trim()).map(e=>`${"user"===e.role?"You":ne?.conciergeName||"Assistant"}: ${e.content}`).join("\n\n");e&&navigator.clipboard.writeText(e).catch(()=>{})},[le,ne?.conciergeName]);if(e.useEffect(()=>{de.current&&ne&&(de.current.style.setProperty("--cw-primary",ne.primaryColor),ne.fontFamily&&de.current.style.setProperty("--cw-font-family",ne.fontFamily),ne.textColor&&de.current.style.setProperty("--cw-text-color",ne.textColor))},[ne,de]),Y)return null;if(Q)return null;if(X||!ne)return console.error("ChatWidget configuration error:",X),null;if(!re)return null;const Ye={"bottom-right":"bottom-5 right-5","bottom-left":"bottom-5 left-5","top-right":"top-5 right-5","top-left":"top-5 left-5"};return n.jsx("div",{id:"chat-widget-root",children:n.jsxs("div",{ref:de,className:`chat-widget-root fixed flex flex-col ${ne.launcherPosition?.includes("left")?"items-start":"items-end"} z-[999999] ${se?"dark":""} ${N} ${Ye[ne.launcherPosition]||Ye["bottom-right"]}`,children:[n.jsx(xn,{isOpen:ae,isMinimized:ie,isDark:se,launcherPosition:ne.launcherPosition,primaryColor:ne.primaryColor,textColor:ne.textColor,companyName:ne.companyName,conciergeName:ne.conciergeName,companyLogo:ne.companyLogo,chatbotAvatarEnabled:ne.chatbotAvatarEnabled,chatbotAvatar:ne.chatbotAvatar,messages:le,isLoading:ue,inputValue:ce,setInputValue:pe,onSend:fe,onStopGeneration:ge,onDirectSend:he,onToggleTheme:ve,onMinimize:we,onClose:Se,quickQuestions:ne.quickQuestions,quickQuestionsEnabled:ne.quickQuestionsEnabled,onQuickQuestion:me,quickQuestionsLayout:f,agentMessageBubbleColor:ne.agentMessageBubbleColor,userMessageBoxColor:ne.userMessageBoxColor,assistantTextColor:ne.assistantTextColor,userTextColor:ne.userTextColor,fontFamily:ne.fontFamily,agentMessageBubbleFontFamily:ne.agentMessageBubbleFontFamily,agentMessageBubbleFontSize:ne.agentMessageBubbleFontSize,userMessageBubbleFontFamily:ne.userMessageBubbleFontFamily,userMessageBubbleFontSize:ne.userMessageBubbleFontSize,fontSize:ne.fontSize,defaultLanguage:ne.defaultLanguage||I,onDecision:xe,headerTextBold:ne.headerTextBold,headerTextItalic:ne.headerTextItalic,headerTextColor:ne.headerTextColor,headerFontFamily:ne.headerFontFamily,headerFontSize:ne.headerFontSize,subtitle:ne.subtitle,showStatus:ne.showStatus,statusMode:ne.statusMode,officeHours:ne.officeHours,enableVoiceInteraction:ne.enableVoiceInteraction,isVoiceSessionActive:ke,voiceStatus:Ae,voiceError:Te,voiceConclusionForCsat:Oe,onVoiceToggle:Ce,onBidiSubmit:()=>Ie(ce),disclaimerEnabled:ne.disclaimerEnabled,disclaimerText:ne.disclaimerText,disclaimerPosition:ne.disclaimerPosition,disclaimerLinkUrl:ne.disclaimerLinkUrl,disclaimerLinkLabel:ne.disclaimerLinkLabel,showPoweredBy:ne.showPoweredBy,apiBaseUrl:r,apiKey:x,getAuthToken:t,conversationId:Pe,conciergeId:V?.conciergeId??V?.id,onboardingQuestions:ne.onboardingQuestions,onboardingActive:Ne,onboardingCompleted:Re,onOnboardingFormSubmit:_e,collectionPrompt:ne.collectionPrompt,csatEnabled:ne.csatEnabled,csatFormat:ne.csatFormat,csatPrompt:ne.csatPrompt,csatRequest:Ue,onboardingEnabled:ne.onboardingEnabled,onResetConversation:Le,sessionExpiringSoon:De,autoPromptEnabled:ne.autoPromptEnabled,autoPromptQuestionDisplay:ne.autoPromptQuestionDisplay,autoPromptClickTelemetry:ne.autoPromptClickTelemetry,allowFeedback:ne.allowFeedback,provideCitations:ne.provideCitations,onFeedback:Ge,onRetryMessage:be,onRefreshChat:qe,onCopyChat:We,filterCategories:He,showFilterStep:Ve,widgetFilter:je,onWidgetFilterChange:Fe,onSynthesizeAssistantMessage:Be,chatFeatures:ne.chatFeatures,organizationId:ne.organizationId}),n.jsx(Tn,{ref:ze,isDark:se,primaryColor:ne.primaryColor,onToggle:ye,textColor:ne.textColor,headerTextColor:ne.headerTextColor,defaultLanguage:ne.defaultLanguage||I,isOpen:ae,className:ae?"hidden":void 0,channelLinks:ne.channelLinks})]})})};var $n="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},Gn={exports:{}};function qn(e){try{const t=window[e];return t.setItem("__ft__","1"),t.removeItem("__ft__"),"1"}catch{return"0"}}function Hn(){try{return Array.from(navigator.plugins||[]).map(e=>`${e.name}::${e.filename}`).sort().join("|")}catch{return""}}function Vn(){try{return Array.from(navigator.mimeTypes||[]).map(e=>e.type).sort().join("|")}catch{return""}}function Wn(){try{const e=document.createElement("canvas");e.width=240,e.height=60;const t=e.getContext("2d");return t.textBaseline="alphabetic",t.fillStyle="#f60",t.fillRect(125,1,62,20),t.fillStyle="#069",t.font="11pt no-real-font-abc",t.fillText("user-trace:canvas,🔍<canvas>",2,15),t.fillStyle="rgba(102,204,0,0.7)",t.font="18pt Arial",t.fillText("user-trace:canvas,🔍<canvas>",4,45),e.toDataURL().slice(-50)}catch{return"nocanvas"}}function Yn(){try{const e=document.createElement("canvas"),t=e.getContext("webgl")||e.getContext("experimental-webgl");if(!t)return"nowebgl";const n=t.getExtension("WEBGL_debug_renderer_info"),r=n?t.getParameter(n.UNMASKED_VENDOR_WEBGL):t.getParameter(t.VENDOR);return`${r}::${n?t.getParameter(n.UNMASKED_RENDERER_WEBGL):t.getParameter(t.RENDERER)}`}catch{return"nowebgl"}}function Kn(){const e=["Arial","Courier New","Georgia","Times New Roman","Verdana","Helvetica","Comic Sans MS","Impact","Tahoma","Trebuchet MS","Palatino Linotype","Lucida Console","Lucida Sans Unicode","MS Sans Serif","MS Serif","Symbol","Wingdings","Franklin Gothic Medium","Book Antiqua","Garamond","Calibri","Cambria","Consolas","Candara","Optima","Segoe UI","Gill Sans","Century Gothic","Futura"];try{const t=document.createElement("canvas").getContext("2d"),n="monospace",r="mmmmmmmmmmlli",o="72px";t.font=`${o} ${n}`;const a=t.measureText(r).width;return e.filter(e=>(t.font=`${o} '${e}', ${n}`,t.measureText(r).width!==a)).join(",")}catch{return""}}function Xn(){try{return window.OfflineAudioContext||window.webkitOfflineAudioContext?"audio-supported":"noaudio"}catch{return"noaudio"}}var Zn={generateFingerprint:function(){const e=function(){const e=navigator||{},t=screen||{};return{userAgent:e.userAgent||"",language:e.language||"",languages:(e.languages||[]).join(","),platform:e.platform||"",hardwareConcurrency:e.hardwareConcurrency||0,deviceMemory:e.deviceMemory||0,maxTouchPoints:e.maxTouchPoints||0,cookieEnabled:e.cookieEnabled?"1":"0",doNotTrack:e.doNotTrack||"unknown",screenWidth:t.width||0,screenHeight:t.height||0,colorDepth:t.colorDepth||0,pixelDepth:t.pixelDepth||0,devicePixelRatio:"undefined"!=typeof devicePixelRatio?devicePixelRatio:1,timezoneOffset:(new Date).getTimezoneOffset(),timezone:Intl.DateTimeFormat().resolvedOptions().timeZone||"",sessionStorage:qn("sessionStorage"),localStorage:qn("localStorage"),indexedDB:"undefined"!=typeof indexedDB?"1":"0",cpuClass:e.cpuClass||"unknown",oscpu:e.oscpu||"unknown",vendor:e.vendor||"",vendorSub:e.vendorSub||"",productSub:e.productSub||"",plugins:Hn(),mimeTypes:Vn(),canvas:Wn(),webgl:Yn(),fonts:Kn(),audioContext:Xn()}}(),t=function(e){let t=5381;for(let n=0;n<e.length;n++)t=(t<<5)+t^e.charCodeAt(n),t&=t;return(t>>>0).toString(16).padStart(8,"0")}(Object.values(e).join("|||")),n=["nocanvas"!==e.canvas,"nowebgl"!==e.webgl&&""!==e.webgl,""!==e.fonts,""!==e.plugins,e.hardwareConcurrency>0,""!==e.timezone];return{id:t,signals:e,confidence:Math.round(n.filter(Boolean).length/n.length*100)}}};const Qn=[{url:"https://api.ipify.org?format=json",parse:e=>e.ip},{url:"https://api64.ipify.org?format=json",parse:e=>e.ip},{url:"https://api.my-ip.io/v2/ip.json",parse:e=>e.ip},{url:"https://ipapi.co/json/",parse:e=>e.ip}];async function Jn(e,t=4e3){const n=new AbortController,r=setTimeout(()=>n.abort(),t);try{const t=await fetch(e,{signal:n.signal});if(!t.ok)throw new Error(`HTTP ${t.status}`);return await t.json()}finally{clearTimeout(r)}}function er(e){return/^(\d{1,3}\.){3}\d{1,3}$/.test(e)||/^[0-9a-f:]{2,39}$/i.test(e)}var tr={detectIP:async function(){for(const e of Qn)try{const t=await Jn(e.url),n=e.parse(t);if(n&&er(n))return{ip:n,source:new URL(e.url).hostname}}catch{}return null},getIPVersion:function(e){return e?/^(\d{1,3}\.){3}\d{1,3}$/.test(e)?"v4":/^[0-9a-f:]{2,39}$/i.test(e)?"v6":"unknown":"unknown"}};let nr={apiKeys:{},preferredProvider:null,timeoutMs:5e3};function rr(e={}){const t=[e.ipinfo&&{name:"ipinfo.io",tier:"free-with-key",freeLimit:"50,000 req/month",signup:"https://ipinfo.io/signup",buildUrl:t=>`https://ipinfo.io/${t}/json?token=${e.ipinfo}`,parse:e=>{if(e.error)throw new Error(e.error.message||"Failed");const[t,n]=(e.loc||"0,0").split(",").map(Number);return{ip:e.ip||"",country:e.country||"",countryCode:e.country||"",region:e.region||"",regionCode:"",city:e.city||"",zip:e.postal||"",latitude:t,longitude:n,timezone:e.timezone||"",isp:e.org||"",org:e.org||"",proxy:!1,hosting:!1}}},e.ipgeolocation&&{name:"ipgeolocation.io",tier:"free-with-key",freeLimit:"1,000 req/day",signup:"https://ipgeolocation.io/signup.html",buildUrl:t=>`https://api.ipgeolocation.io/ipgeo?apiKey=${e.ipgeolocation}&ip=${t}`,parse:e=>{if(e.message)throw new Error(e.message);return{ip:e.ip||"",country:e.country_name||"",countryCode:e.country_code2||"",region:e.state_prov||"",regionCode:e.state_code||"",city:e.city||"",zip:e.zipcode||"",latitude:parseFloat(e.latitude)||0,longitude:parseFloat(e.longitude)||0,timezone:e.time_zone?.name||"",isp:e.isp||"",org:e.organization||"",proxy:e.security?.is_proxy||!1,hosting:e.security?.is_hosting||!1}}},e.abstractapi&&{name:"abstractapi.com",tier:"free-with-key",freeLimit:"20,000 req/month",signup:"https://app.abstractapi.com/users/signup?target=/api/ip-geolocation",buildUrl:t=>`https://ipgeolocation.abstractapi.com/v1/?api_key=${e.abstractapi}&ip_address=${t}`,parse:e=>{if(e.error)throw new Error(e.error.message||"Failed");return{ip:e.ip_address||"",country:e.country||"",countryCode:e.country_code||"",region:e.region||"",regionCode:e.region_iso_code||"",city:e.city||"",zip:e.postal_code||"",latitude:e.latitude||0,longitude:e.longitude||0,timezone:e.timezone?.name||"",isp:e.connection?.isp_name||"",org:e.connection?.org_name||"",proxy:e.security?.is_vpn||!1,hosting:e.security?.is_hosting||!1}}},e.ip2location&&{name:"ip2location.io",tier:"free-with-key",freeLimit:"30,000 req/month",signup:"https://www.ip2location.io/sign-up",buildUrl:t=>`https://api.ip2location.io/?key=${e.ip2location}&ip=${t}&format=json`,parse:e=>{if(e.error)throw new Error(e.error.error_message||"Failed");return{ip:e.ip||"",country:e.country_name||"",countryCode:e.country_code||"",region:e.region_name||"",regionCode:"",city:e.city_name||"",zip:e.zip_code||"",latitude:e.latitude||0,longitude:e.longitude||0,timezone:e.time_zone||"",isp:e.isp||"",org:e.domain||"",proxy:e.is_proxy||!1,hosting:!1}}},e.ipstack&&{name:"ipstack.com",tier:"free-with-key",freeLimit:"100 req/month",signup:"https://ipstack.com/product",buildUrl:t=>`https://api.ipstack.com/${t}?access_key=${e.ipstack}`,parse:e=>{if(e.error)throw new Error(e.error.info||"Failed");return{ip:e.ip||"",country:e.country_name||"",countryCode:e.country_code||"",region:e.region_name||"",regionCode:e.region_code||"",city:e.city||"",zip:e.zip||"",latitude:e.latitude||0,longitude:e.longitude||0,timezone:e.time_zone?.id||"",isp:e.connection?.isp||"",org:"",proxy:!1,hosting:!1}}}].filter(Boolean),n=[{name:"ip-api.com",tier:"free",freeLimit:"45 req/min (no key needed)",buildUrl:e=>`https://ip-api.com/json/${e}?fields=status,message,country,countryCode,region,regionName,city,zip,lat,lon,timezone,isp,org,proxy,hosting,query`,parse:e=>{if("success"!==e.status)throw new Error(e.message||"Failed");return{ip:e.query||"",country:e.country||"",countryCode:e.countryCode||"",region:e.regionName||"",regionCode:e.region||"",city:e.city||"",zip:e.zip||"",latitude:e.lat||0,longitude:e.lon||0,timezone:e.timezone||"",isp:e.isp||"",org:e.org||"",proxy:e.proxy||!1,hosting:e.hosting||!1}}},{name:"ipwho.is",tier:"free",freeLimit:"unlimited (fair use, no key needed)",buildUrl:e=>`https://ipwho.is/${e}`,parse:e=>{if(!e.success)throw new Error(e.message||"Failed");return{ip:e.ip||"",country:e.country||"",countryCode:e.country_code||"",region:e.region||"",regionCode:e.region_code||"",city:e.city||"",zip:e.postal||"",latitude:e.latitude||0,longitude:e.longitude||0,timezone:e.timezone?.id||"",isp:e.connection?.isp||"",org:e.connection?.org||"",proxy:!1,hosting:!1}}},{name:"ipapi.co",tier:"free",freeLimit:"1,000 req/day (no key needed)",buildUrl:e=>`https://ipapi.co/${e}/json/`,parse:e=>{if(e.error)throw new Error(e.reason||"Failed");return{ip:e.ip||"",country:e.country_name||"",countryCode:e.country_code||"",region:e.region||"",regionCode:e.region_code||"",city:e.city||"",zip:e.postal||"",latitude:e.latitude||0,longitude:e.longitude||0,timezone:e.timezone||"",isp:e.org||"",org:e.org||"",proxy:!1,hosting:!1}}},{name:"freeipapi.com",tier:"free",freeLimit:"unlimited (fair use, no key needed)",buildUrl:e=>`https://freeipapi.com/api/json/${e}`,parse:e=>({ip:e.ipAddress||"",country:e.countryName||"",countryCode:e.countryCode||"",region:e.regionName||"",regionCode:e.regionCode||"",city:e.cityName||"",zip:e.zipCode||"",latitude:e.latitude||0,longitude:e.longitude||0,timezone:e.timeZone||"",isp:"",org:"",proxy:!1,hosting:!1})}],r=["freeipapi.com","ipwho.is","ipapi.co","ip-api.com"];return n.sort((e,t)=>r.indexOf(e.name)-r.indexOf(t.name)),[...t,...n]}async function or(e,t=5e3){const n=new AbortController,r=setTimeout(()=>n.abort(),t);try{const t=await fetch(e,{signal:n.signal});if(!t.ok)throw new Error(`HTTP ${t.status}`);return await t.json()}finally{clearTimeout(r)}}const ar={enableHighAccuracy:!0,timeout:8e3,maximumAge:3e5};function ir(e={}){return new Promise(t=>"undefined"!=typeof navigator&&navigator.geolocation?"undefined"!=typeof window&&!1===window.isSecureContext?t(null):void navigator.geolocation.getCurrentPosition(e=>t({latitude:e.coords.latitude,longitude:e.coords.longitude,accuracy:e.coords.accuracy}),()=>t(null),{...ar,...e}):t(null))}async function sr(e,t,n={}){if("number"!=typeof e||"number"!=typeof t)return null;const r=n.timeoutMs||nr.timeoutMs||5e3,o=`https://api.bigdatacloud.net/data/reverse-geocode-client?latitude=${e}&longitude=${t}&localityLanguage=${n.localityLanguage||"en"}`;try{const n=await or(o,r),a=n.city||n.locality||"";return a||n.countryName?{city:a,region:n.principalSubdivision||"",regionCode:(n.principalSubdivisionCode||"").split("-").pop()||"",country:n.countryName||"",countryCode:n.countryCode||"",latitude:e,longitude:t}:null}catch{return null}}var lr={configureGeo:function(e={}){e.apiKeys&&(nr.apiKeys={...nr.apiKeys,...e.apiKeys}),void 0!==e.preferredProvider&&(nr.preferredProvider=e.preferredProvider),void 0!==e.timeoutMs&&(nr.timeoutMs=e.timeoutMs)},resolveLocation:async function(e,t={}){const n={apiKeys:{...nr.apiKeys,...t.apiKeys||{}},preferredProvider:t.preferredProvider||nr.preferredProvider,timeoutMs:t.timeoutMs||nr.timeoutMs};let r=rr(n.apiKeys);if(n.preferredProvider){const e=r.findIndex(e=>e.name===n.preferredProvider);if(e>0){const[t]=r.splice(e,1);r.unshift(t)}}for(const t of r)try{const r=await or(t.buildUrl(e),n.timeoutMs);return{...t.parse(r),source:t.name,tier:t.tier}}catch{}return null},listProviders:function(e={}){return rr({...nr.apiKeys,...e}).map(({name:e,tier:t,freeLimit:n,signup:r})=>({name:e,tier:t,freeLimit:n,signup:r||"—"}))},getBrowserGeolocation:ir,getGeolocationPermission:async function(){try{if("undefined"==typeof navigator||!navigator.permissions||!navigator.permissions.query)return"unsupported";return(await navigator.permissions.query({name:"geolocation"})).state}catch{return"unsupported"}},reverseGeocode:sr,getBrowserLocation:async function(e={}){const t=await ir(e);if(!t)return null;const n=await sr(t.latitude,t.longitude,e),r=!(!n||!n.city&&!n.country);return{...r?n:{},latitude:t.latitude,longitude:t.longitude,accuracy:t.accuracy,...r?{source:"gps"}:{}}},toMapsUrl:function(e,t){return`https://www.google.com/maps?q=${e},${t}`}};const cr="__ut_sid__",ur="__ut_uid__",dr="__ut_meta__";function pr(){const e=new Uint8Array(16);crypto.getRandomValues(e),e[6]=15&e[6]|64,e[8]=63&e[8]|128;const t=Array.from(e).map(e=>e.toString(16).padStart(2,"0")).join("");return[t.slice(0,8),t.slice(8,12),t.slice(12,16),t.slice(16,20),t.slice(20)].join("-")}function fr(e,t){try{return e.getItem(t)}catch{return null}}function gr(e,t,n){try{return e.setItem(t,n),!0}catch{return!1}}var mr={getOrCreateUserID:function(){let e=fr(localStorage,ur),t=!1;return e||(e=pr(),t=!0,gr(localStorage,ur,e)),{uid:e,isNew:t}},getOrCreateSessionID:function(){let e=fr(sessionStorage,cr),t=!1;return e||(e=pr(),t=!0,gr(sessionStorage,cr,e)),{sid:e,isNew:t}},saveSessionMeta:function(e){try{const t=JSON.stringify({...e,savedAt:(new Date).toISOString()});gr(localStorage,dr,t)}catch{}},loadSessionMeta:function(){try{const e=fr(localStorage,dr);return e?JSON.parse(e):null}catch{return null}},clearSession:function(){try{localStorage.removeItem(ur)}catch{}try{localStorage.removeItem(dr)}catch{}try{sessionStorage.removeItem(cr)}catch{}},getBrowserContext:function(){return{userAgent:navigator.userAgent,platform:navigator.platform||"unknown",language:navigator.language||"unknown",timezone:Intl.DateTimeFormat().resolvedOptions().timeZone,screenRes:`${screen.width}x${screen.height}`,viewportRes:`${window.innerWidth}x${window.innerHeight}`,colorDepth:screen.colorDepth,touchSupport:navigator.maxTouchPoints>0,cookieEnabled:navigator.cookieEnabled,referrer:document.referrer||null,currentUrl:window.location.href,loadedAt:(new Date).toISOString()}}};const{generateFingerprint:hr}=Zn,{detectIP:br,getIPVersion:yr}=tr,{configureGeo:vr,resolveLocation:wr,listProviders:Sr,getBrowserGeolocation:xr,getGeolocationPermission:Er,reverseGeocode:kr,getBrowserLocation:Ar,toMapsUrl:Tr}=lr,{getOrCreateUserID:Or,getOrCreateSessionID:Cr,saveSessionMeta:Ir,loadSessionMeta:Nr,clearSession:Rr,getBrowserContext:_r}=mr;Gn.exports=class{constructor(e={}){this._options={onReady:e.onReady||null,onError:e.onError||null,geoFromBrowser:void 0===e.geoFromBrowser||e.geoFromBrowser,geoApiKeys:e.geoApiKeys||null,geoOptions:e.geoOptions||null,cache:!1!==e.cache,maxAgeMs:e.maxAgeMs||3e5,autoInit:e.autoInit||!1,webhookUrl:e.webhookUrl||null},this.profile=null,this._ready=!1,this._options.autoInit&&this.init().catch(()=>{})}async init(){if(this._options.cache){const e=Nr();if(e&&e.savedAt){if(Date.now()-new Date(e.savedAt).getTime()<this._options.maxAgeMs)return this.profile=e,this._ready=!0,this._options.onReady&&this._options.onReady(this.profile),this.profile}}try{const{uid:e,isNew:t}=Or(),{sid:n,isNew:r}=Cr(),{id:o,signals:a,confidence:i}=hr(),s=this._options.geoApiKeys?{apiKeys:this._options.geoApiKeys}:{},[l,c]=await Promise.all([(async()=>{const e=await br(),t=e?.ip||"unknown",n="unknown"!==t?await wr(t,s):null;return{ip:t,ipVersion:e?yr(t):"unknown",geo:n}})(),this._collectBrowserLocation()]),{ip:u,ipVersion:d}=l;let p=l.geo,f=null;c&&(f={latitude:c.latitude,longitude:c.longitude,accuracy:c.accuracy},"gps"===c.source&&(p={...p||{},...c}));const g=_r();return this.profile={uid:e,sid:n,isNewUser:t,isNewSession:r,fingerprintId:o,fingerprintConfidence:i,ip:u,ipVersion:d,geo:p||null,browserGeo:f||null,browser:g,raw:a,createdAt:(new Date).toISOString(),...p?{mapsUrl:Tr(p.latitude,p.longitude)}:{}},Ir(this.profile),this._options.webhookUrl&&this._sendToWebhook(this.profile),this._ready=!0,this._options.onReady&&this._options.onReady(this.profile),this.profile}catch(e){throw this._options.onError&&this._options.onError(e),e}}async _collectBrowserLocation(){const e=this._options.geoFromBrowser;if(!e)return null;if("auto"===e){if("granted"!==await Er())return null}return Ar(this._options.geoOptions||{})}async captureBrowserLocation(e={}){const t=await Ar({...this._options.geoOptions||{},...e});return t&&this.profile?(this.profile.browserGeo={latitude:t.latitude,longitude:t.longitude,accuracy:t.accuracy},this.profile.mapsUrl=Tr(t.latitude,t.longitude),"gps"===t.source&&(this.profile.geo={...this.profile.geo||{},...t}),Ir(this.profile),this._options.onReady&&this._options.onReady(this.profile),this.profile):this.profile}getProfile(){return this.profile}isKnownUser(e){return this.profile?.uid===e}async refresh(){return Rr(),this.profile=null,this._ready=!1,this.init()}clear(){Rr(),this.profile=null,this._ready=!1}getSummary(){if(!this.profile)return null;const{uid:e,sid:t,fingerprintId:n,ip:r,geo:o,browser:a,createdAt:i}=this.profile;return{uid:e,sid:t,fingerprintId:n,ip:r,country:o?.country||"unknown",city:o?.city||"unknown",isp:o?.isp||"unknown",proxy:o?.proxy||!1,timezone:o?.timezone||a.timezone,userAgent:a.userAgent,language:a.language,createdAt:i}}async _sendToWebhook(e){try{await fetch(this._options.webhookUrl,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})}catch{}}};var Pr=Gn.exports.generateFingerprint=hr,Lr=Gn.exports.detectIP=br,Dr=Gn.exports.configureGeo=vr,Mr=Gn.exports.resolveLocation=wr,jr=Gn.exports.listProviders=Sr,Fr=Gn.exports.getBrowserGeolocation=xr,Br=Gn.exports.getGeolocationPermission=Er,Ur=Gn.exports.reverseGeocode=kr,zr=Gn.exports.getBrowserLocation=Ar,$r=Gn.exports.getOrCreateUserID=Or,Gr=Gn.exports.getOrCreateSessionID=Cr,qr=Gn.exports.clearSession=Rr,Hr=Gn.exports.getBrowserContext=_r,Vr=Gn.exports,Wr=a({__proto__:null,clearSession:qr,configureGeo:Dr,default:Vr,detectIP:Lr,generateFingerprint:Pr,getBrowserContext:Hr,getBrowserGeolocation:Fr,getBrowserLocation:zr,getGeolocationPermission:Br,getOrCreateSessionID:Gr,getOrCreateUserID:$r,listProviders:jr,resolveLocation:Mr,reverseGeocode:Ur},[Vr]),Yr={exports:{}};!function(e){!function(){function t(e,t,n){return e.call.apply(e.bind,arguments)}function n(e,t,n){if(!e)throw Error();if(2<arguments.length){var r=Array.prototype.slice.call(arguments,2);return function(){var n=Array.prototype.slice.call(arguments);return Array.prototype.unshift.apply(n,r),e.apply(t,n)}}return function(){return e.apply(t,arguments)}}function r(e,o,a){return(r=Function.prototype.bind&&-1!=Function.prototype.bind.toString().indexOf("native code")?t:n).apply(null,arguments)}var o=Date.now||function(){return+new Date};function a(e,t){this.a=e,this.o=t||e,this.c=this.o.document}var i=!!window.FontFace;function s(e,t,n,r){if(t=e.c.createElement(t),n)for(var o in n)n.hasOwnProperty(o)&&("style"==o?t.style.cssText=n[o]:t.setAttribute(o,n[o]));return r&&t.appendChild(e.c.createTextNode(r)),t}function l(e,t,n){(e=e.c.getElementsByTagName(t)[0])||(e=document.documentElement),e.insertBefore(n,e.lastChild)}function c(e){e.parentNode&&e.parentNode.removeChild(e)}function u(e,t,n){t=t||[],n=n||[];for(var r=e.className.split(/\s+/),o=0;o<t.length;o+=1){for(var a=!1,i=0;i<r.length;i+=1)if(t[o]===r[i]){a=!0;break}a||r.push(t[o])}for(t=[],o=0;o<r.length;o+=1){for(a=!1,i=0;i<n.length;i+=1)if(r[o]===n[i]){a=!0;break}a||t.push(r[o])}e.className=t.join(" ").replace(/\s+/g," ").replace(/^\s+|\s+$/,"")}function d(e,t){for(var n=e.className.split(/\s+/),r=0,o=n.length;r<o;r++)if(n[r]==t)return!0;return!1}function p(e,t,n){function r(){u&&o&&a&&(u(c),u=null)}t=s(e,"link",{rel:"stylesheet",href:t,media:"all"});var o=!1,a=!0,c=null,u=n||null;i?(t.onload=function(){o=!0,r()},t.onerror=function(){o=!0,c=Error("Stylesheet failed to load"),r()}):setTimeout(function(){o=!0,r()},0),l(e,"head",t)}function f(e,t,n,r){var o=e.c.getElementsByTagName("head")[0];if(o){var a=s(e,"script",{src:t}),i=!1;return a.onload=a.onreadystatechange=function(){i||this.readyState&&"loaded"!=this.readyState&&"complete"!=this.readyState||(i=!0,n&&n(null),a.onload=a.onreadystatechange=null,"HEAD"==a.parentNode.tagName&&o.removeChild(a))},o.appendChild(a),setTimeout(function(){i||(i=!0,n&&n(Error("Script load timeout")))},r||5e3),a}return null}function g(){this.a=0,this.c=null}function m(e){return e.a++,function(){e.a--,b(e)}}function h(e,t){e.c=t,b(e)}function b(e){0==e.a&&e.c&&(e.c(),e.c=null)}function y(e){this.a=e||"-"}function v(e,t){this.c=e,this.f=4,this.a="n";var n=(t||"n4").match(/^([nio])([1-9])$/i);n&&(this.a=n[1],this.f=parseInt(n[2],10))}function w(e){var t=[];e=e.split(/,\s*/);for(var n=0;n<e.length;n++){var r=e[n].replace(/['"]/g,"");-1!=r.indexOf(" ")||/^\d/.test(r)?t.push("'"+r+"'"):t.push(r)}return t.join(",")}function S(e){return e.a+e.f}function x(e){var t="normal";return"o"===e.a?t="oblique":"i"===e.a&&(t="italic"),t}function E(e){var t=4,n="n",r=null;return e&&((r=e.match(/(normal|oblique|italic)/i))&&r[1]&&(n=r[1].substr(0,1).toLowerCase()),(r=e.match(/([1-9]00|normal|bold)/i))&&r[1]&&(/bold/i.test(r[1])?t=7:/[1-9]00/.test(r[1])&&(t=parseInt(r[1].substr(0,1),10)))),n+t}function k(e,t){this.c=e,this.f=e.o.document.documentElement,this.h=t,this.a=new y("-"),this.j=!1!==t.events,this.g=!1!==t.classes}function A(e){if(e.g){var t=d(e.f,e.a.c("wf","active")),n=[],r=[e.a.c("wf","loading")];t||n.push(e.a.c("wf","inactive")),u(e.f,n,r)}T(e,"inactive")}function T(e,t,n){e.j&&e.h[t]&&(n?e.h[t](n.c,S(n)):e.h[t]())}function O(){this.c={}}function C(e,t){this.c=e,this.f=t,this.a=s(this.c,"span",{"aria-hidden":"true"},this.f)}function I(e){l(e.c,"body",e.a)}function N(e){return"display:block;position:absolute;top:-9999px;left:-9999px;font-size:300px;width:auto;height:auto;line-height:normal;margin:0;padding:0;font-variant:normal;white-space:nowrap;font-family:"+w(e.c)+";font-style:"+x(e)+";font-weight:"+e.f+"00;"}function R(e,t,n,r,o,a){this.g=e,this.j=t,this.a=r,this.c=n,this.f=o||3e3,this.h=a||void 0}function _(e,t,n,r,o,a,i){this.v=e,this.B=t,this.c=n,this.a=r,this.s=i||"BESbswy",this.f={},this.w=o||3e3,this.u=a||null,this.m=this.j=this.h=this.g=null,this.g=new C(this.c,this.s),this.h=new C(this.c,this.s),this.j=new C(this.c,this.s),this.m=new C(this.c,this.s),e=N(e=new v(this.a.c+",serif",S(this.a))),this.g.a.style.cssText=e,e=N(e=new v(this.a.c+",sans-serif",S(this.a))),this.h.a.style.cssText=e,e=N(e=new v("serif",S(this.a))),this.j.a.style.cssText=e,e=N(e=new v("sans-serif",S(this.a))),this.m.a.style.cssText=e,I(this.g),I(this.h),I(this.j),I(this.m)}y.prototype.c=function(e){for(var t=[],n=0;n<arguments.length;n++)t.push(arguments[n].replace(/[\W_]+/g,"").toLowerCase());return t.join(this.a)},R.prototype.start=function(){var e=this.c.o.document,t=this,n=o(),r=new Promise(function(r,a){!function i(){o()-n>=t.f?a():e.fonts.load(function(e){return x(e)+" "+e.f+"00 300px "+w(e.c)}(t.a),t.h).then(function(e){1<=e.length?r():setTimeout(i,25)},function(){a()})}()}),a=null,i=new Promise(function(e,n){a=setTimeout(n,t.f)});Promise.race([i,r]).then(function(){a&&(clearTimeout(a),a=null),t.g(t.a)},function(){t.j(t.a)})};var P={D:"serif",C:"sans-serif"},L=null;function D(){if(null===L){var e=/AppleWebKit\/([0-9]+)(?:\.([0-9]+))/.exec(window.navigator.userAgent);L=!!e&&(536>parseInt(e[1],10)||536===parseInt(e[1],10)&&11>=parseInt(e[2],10))}return L}function M(e,t,n){for(var r in P)if(P.hasOwnProperty(r)&&t===e.f[P[r]]&&n===e.f[P[r]])return!0;return!1}function j(e){var t,n=e.g.a.offsetWidth,a=e.h.a.offsetWidth;(t=n===e.f.serif&&a===e.f["sans-serif"])||(t=D()&&M(e,n,a)),t?o()-e.A>=e.w?D()&&M(e,n,a)&&(null===e.u||e.u.hasOwnProperty(e.a.c))?F(e,e.v):F(e,e.B):function(e){setTimeout(r(function(){j(this)},e),50)}(e):F(e,e.v)}function F(e,t){setTimeout(r(function(){c(this.g.a),c(this.h.a),c(this.j.a),c(this.m.a),t(this.a)},e),0)}function B(e,t,n){this.c=e,this.a=t,this.f=0,this.m=this.j=!1,this.s=n}_.prototype.start=function(){this.f.serif=this.j.a.offsetWidth,this.f["sans-serif"]=this.m.a.offsetWidth,this.A=o(),j(this)};var U=null;function z(e){0==--e.f&&e.j&&(e.m?((e=e.a).g&&u(e.f,[e.a.c("wf","active")],[e.a.c("wf","loading"),e.a.c("wf","inactive")]),T(e,"active")):A(e.a))}function $(e){this.j=e,this.a=new O,this.h=0,this.f=this.g=!0}function G(e,t,n,o,a){var i=0==--e.h;(e.f||e.g)&&setTimeout(function(){var e=a||null,s=o||{};if(0===n.length&&i)A(t.a);else{t.f+=n.length,i&&(t.j=i);var l,c=[];for(l=0;l<n.length;l++){var d=n[l],p=s[d.c],f=t.a,g=d;if(f.g&&u(f.f,[f.a.c("wf",g.c,S(g).toString(),"loading")]),T(f,"fontloading",g),f=null,null===U)if(window.FontFace){g=/Gecko.*Firefox\/(\d+)/.exec(window.navigator.userAgent);var m=/OS X.*Version\/10\..*Safari/.exec(window.navigator.userAgent)&&/Apple/.exec(window.navigator.vendor);U=g?42<parseInt(g[1],10):!m}else U=!1;f=U?new R(r(t.g,t),r(t.h,t),t.c,d,t.s,p):new _(r(t.g,t),r(t.h,t),t.c,d,t.s,e,p),c.push(f)}for(l=0;l<c.length;l++)c[l].start()}},0)}function q(e,t){this.c=e,this.a=t}function H(e,t){this.c=e,this.a=t}function V(e,t){this.c=e||W,this.a=[],this.f=[],this.g=t||""}B.prototype.g=function(e){var t=this.a;t.g&&u(t.f,[t.a.c("wf",e.c,S(e).toString(),"active")],[t.a.c("wf",e.c,S(e).toString(),"loading"),t.a.c("wf",e.c,S(e).toString(),"inactive")]),T(t,"fontactive",e),this.m=!0,z(this)},B.prototype.h=function(e){var t=this.a;if(t.g){var n=d(t.f,t.a.c("wf",e.c,S(e).toString(),"active")),r=[],o=[t.a.c("wf",e.c,S(e).toString(),"loading")];n||r.push(t.a.c("wf",e.c,S(e).toString(),"inactive")),u(t.f,r,o)}T(t,"fontinactive",e),z(this)},$.prototype.load=function(e){this.c=new a(this.j,e.context||this.j),this.g=!1!==e.events,this.f=!1!==e.classes,function(e,t,n){var r=[],o=n.timeout;!function(e){e.g&&u(e.f,[e.a.c("wf","loading")]),T(e,"loading")}(t);r=function(e,t,n){var r,o=[];for(r in t)if(t.hasOwnProperty(r)){var a=e.c[r];a&&o.push(a(t[r],n))}return o}(e.a,n,e.c);var a=new B(e.c,t,o);for(e.h=r.length,t=0,n=r.length;t<n;t++)r[t].load(function(t,n,r){G(e,a,t,n,r)})}(this,new k(this.c,e),e)},q.prototype.load=function(e){function t(){if(a["__mti_fntLst"+r]){var n,o=a["__mti_fntLst"+r](),i=[];if(o)for(var s=0;s<o.length;s++){var l=o[s].fontfamily;null!=o[s].fontStyle&&null!=o[s].fontWeight?(n=o[s].fontStyle+o[s].fontWeight,i.push(new v(l,n))):i.push(new v(l))}e(i)}else setTimeout(function(){t()},50)}var n=this,r=n.a.projectId,o=n.a.version;if(r){var a=n.c.o;f(this.c,(n.a.api||"https://fast.fonts.net/jsapi")+"/"+r+".js"+(o?"?v="+o:""),function(o){o?e([]):(a["__MonotypeConfiguration__"+r]=function(){return n.a},t())}).id="__MonotypeAPIScript__"+r}else e([])},H.prototype.load=function(e){var t,n,r=this.a.urls||[],o=this.a.families||[],a=this.a.testStrings||{},i=new g;for(t=0,n=r.length;t<n;t++)p(this.c,r[t],m(i));var s=[];for(t=0,n=o.length;t<n;t++)if((r=o[t].split(":"))[1])for(var l=r[1].split(","),c=0;c<l.length;c+=1)s.push(new v(r[0],l[c]));else s.push(new v(r[0]));h(i,function(){e(s,a)})};var W="https://fonts.googleapis.com/css";function Y(e){this.f=e,this.a=[],this.c={}}var K={latin:"BESbswy","latin-ext":"çöüğş",cyrillic:"йяЖ",greek:"αβΣ",khmer:"កខគ",Hanuman:"កខគ"},X={thin:"1",extralight:"2","extra-light":"2",ultralight:"2","ultra-light":"2",light:"3",regular:"4",book:"4",medium:"5","semi-bold":"6",semibold:"6","demi-bold":"6",demibold:"6",bold:"7","extra-bold":"8",extrabold:"8","ultra-bold":"8",ultrabold:"8",black:"9",heavy:"9",l:"3",r:"4",b:"7"},Z={i:"i",italic:"i",n:"n",normal:"n"},Q=/^(thin|(?:(?:extra|ultra)-?)?light|regular|book|medium|(?:(?:semi|demi|extra|ultra)-?)?bold|black|heavy|l|r|b|[1-9]00)?(n|i|normal|italic)?$/;function J(e,t){this.c=e,this.a=t}var ee={Arimo:!0,Cousine:!0,Tinos:!0};function te(e,t){this.c=e,this.a=t}function ne(e,t){this.c=e,this.f=t,this.a=[]}J.prototype.load=function(e){var t=new g,n=this.c,r=new V(this.a.api,this.a.text),o=this.a.families;!function(e,t){for(var n=t.length,r=0;r<n;r++){var o=t[r].split(":");3==o.length&&e.f.push(o.pop());var a="";2==o.length&&""!=o[1]&&(a=":"),e.a.push(o.join(a))}}(r,o);var a=new Y(o);!function(e){for(var t=e.f.length,n=0;n<t;n++){var r=e.f[n].split(":"),o=r[0].replace(/\+/g," "),a=["n4"];if(2<=r.length){var i;if(i=[],s=r[1])for(var s,l=(s=s.split(",")).length,c=0;c<l;c++){var u;if((u=s[c]).match(/^[\w-]+$/))if(null==(d=Q.exec(u.toLowerCase())))u="";else{if(u=null==(u=d[2])||""==u?"n":Z[u],null==(d=d[1])||""==d)d="4";else var d=X[d]||(isNaN(d)?"4":d.substr(0,1));u=[u,d].join("")}else u="";u&&i.push(u)}0<i.length&&(a=i),3==r.length&&(i=[],0<(r=(r=r[2])?r.split(","):i).length&&(r=K[r[0]])&&(e.c[o]=r))}for(e.c[o]||(r=K[o])&&(e.c[o]=r),r=0;r<a.length;r+=1)e.a.push(new v(o,a[r]))}}(a),p(n,function(e){if(0==e.a.length)throw Error("No fonts to load!");if(-1!=e.c.indexOf("kit="))return e.c;for(var t=e.a.length,n=[],r=0;r<t;r++)n.push(e.a[r].replace(/ /g,"+"));return t=e.c+"?family="+n.join("%7C"),0<e.f.length&&(t+="&subset="+e.f.join(",")),0<e.g.length&&(t+="&text="+encodeURIComponent(e.g)),t}(r),m(t)),h(t,function(){e(a.a,a.c,ee)})},te.prototype.load=function(e){var t=this.a.id,n=this.c.o;t?f(this.c,(this.a.api||"https://use.typekit.net")+"/"+t+".js",function(t){if(t)e([]);else if(n.Typekit&&n.Typekit.config&&n.Typekit.config.fn){t=n.Typekit.config.fn;for(var r=[],o=0;o<t.length;o+=2)for(var a=t[o],i=t[o+1],s=0;s<i.length;s++)r.push(new v(a,i[s]));try{n.Typekit.load({events:!1,classes:!1,async:!0})}catch(e){}e(r)}},2e3):e([])},ne.prototype.load=function(e){var t=this.f.id,n=this.c.o,r=this;t?(n.__webfontfontdeckmodule__||(n.__webfontfontdeckmodule__={}),n.__webfontfontdeckmodule__[t]=function(t,n){for(var o=0,a=n.fonts.length;o<a;++o){var i=n.fonts[o];r.a.push(new v(i.name,E("font-weight:"+i.weight+";font-style:"+i.style)))}e(r.a)},f(this.c,(this.f.api||"https://f.fontdeck.com/s/css/js/")+function(e){return e.o.location.hostname||e.a.location.hostname}(this.c)+"/"+t+".js",function(t){t&&e([])})):e([])};var re=new $(window);re.a.c.custom=function(e,t){return new H(t,e)},re.a.c.fontdeck=function(e,t){return new ne(t,e)},re.a.c.monotype=function(e,t){return new q(t,e)},re.a.c.typekit=function(e,t){return new te(t,e)},re.a.c.google=function(e,t){return new J(t,e)};var oe={load:r(re.load,re)};e.exports?e.exports=oe:(window.WebFont=oe,window.WebFontConfig&&re.load(window.WebFontConfig))}()}(Yr);var Kr=Yr.exports,Xr=a({__proto__:null,default:Kr},[Kr]);function Zr(){}function Qr(){}const Jr=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,eo=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,to={};function no(e,t){return(to.jsx?eo:Jr).test(e)}const ro=/[ \t\n\f\r]/g;function oo(e){return""===e.replace(ro,"")}let ao=class{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}};function io(e,t){const n={},r={};for(const t of e)Object.assign(n,t.property),Object.assign(r,t.normal);return new ao(n,r,t)}function so(e){return e.toLowerCase()}ao.prototype.normal={},ao.prototype.property={},ao.prototype.space=void 0;let lo=class{constructor(e,t){this.attribute=t,this.property=e}};lo.prototype.attribute="",lo.prototype.booleanish=!1,lo.prototype.boolean=!1,lo.prototype.commaOrSpaceSeparated=!1,lo.prototype.commaSeparated=!1,lo.prototype.defined=!1,lo.prototype.mustUseProperty=!1,lo.prototype.number=!1,lo.prototype.overloadedBoolean=!1,lo.prototype.property="",lo.prototype.spaceSeparated=!1,lo.prototype.space=void 0;let co=0;const uo=yo(),po=yo(),fo=yo(),go=yo(),mo=yo(),ho=yo(),bo=yo();function yo(){return 2**++co}var vo=Object.freeze({__proto__:null,boolean:uo,booleanish:po,commaOrSpaceSeparated:bo,commaSeparated:ho,number:go,overloadedBoolean:fo,spaceSeparated:mo});const wo=Object.keys(vo);let So=class extends lo{constructor(e,t,n,r){let o=-1;if(super(e,t),xo(this,"space",r),"number"==typeof n)for(;++o<wo.length;){const e=wo[o];xo(this,wo[o],(n&vo[e])===vo[e])}}};function xo(e,t,n){n&&(e[t]=n)}function Eo(e){const t={},n={};for(const[r,o]of Object.entries(e.properties)){const a=new So(r,e.transform(e.attributes||{},r),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[so(r)]=r,n[so(a.attribute)]=r}return new ao(t,n,e.space)}So.prototype.defined=!0;const ko=Eo({properties:{ariaActiveDescendant:null,ariaAtomic:po,ariaAutoComplete:null,ariaBusy:po,ariaChecked:po,ariaColCount:go,ariaColIndex:go,ariaColSpan:go,ariaControls:mo,ariaCurrent:null,ariaDescribedBy:mo,ariaDetails:null,ariaDisabled:po,ariaDropEffect:mo,ariaErrorMessage:null,ariaExpanded:po,ariaFlowTo:mo,ariaGrabbed:po,ariaHasPopup:null,ariaHidden:po,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:mo,ariaLevel:go,ariaLive:null,ariaModal:po,ariaMultiLine:po,ariaMultiSelectable:po,ariaOrientation:null,ariaOwns:mo,ariaPlaceholder:null,ariaPosInSet:go,ariaPressed:po,ariaReadOnly:po,ariaRelevant:null,ariaRequired:po,ariaRoleDescription:mo,ariaRowCount:go,ariaRowIndex:go,ariaRowSpan:go,ariaSelected:po,ariaSetSize:go,ariaSort:null,ariaValueMax:go,ariaValueMin:go,ariaValueNow:go,ariaValueText:null,role:null},transform:(e,t)=>"role"===t?t:"aria-"+t.slice(4).toLowerCase()});function Ao(e,t){return t in e?e[t]:t}function To(e,t){return Ao(e,t.toLowerCase())}const Oo=Eo({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:ho,acceptCharset:mo,accessKey:mo,action:null,allow:null,allowFullScreen:uo,allowPaymentRequest:uo,allowUserMedia:uo,alt:null,as:null,async:uo,autoCapitalize:null,autoComplete:mo,autoFocus:uo,autoPlay:uo,blocking:mo,capture:null,charSet:null,checked:uo,cite:null,className:mo,cols:go,colSpan:null,content:null,contentEditable:po,controls:uo,controlsList:mo,coords:go|ho,crossOrigin:null,data:null,dateTime:null,decoding:null,default:uo,defer:uo,dir:null,dirName:null,disabled:uo,download:fo,draggable:po,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:uo,formTarget:null,headers:mo,height:go,hidden:fo,high:go,href:null,hrefLang:null,htmlFor:mo,httpEquiv:mo,id:null,imageSizes:null,imageSrcSet:null,inert:uo,inputMode:null,integrity:null,is:null,isMap:uo,itemId:null,itemProp:mo,itemRef:mo,itemScope:uo,itemType:mo,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:uo,low:go,manifest:null,max:null,maxLength:go,media:null,method:null,min:null,minLength:go,multiple:uo,muted:uo,name:null,nonce:null,noModule:uo,noValidate:uo,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:uo,optimum:go,pattern:null,ping:mo,placeholder:null,playsInline:uo,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:uo,referrerPolicy:null,rel:mo,required:uo,reversed:uo,rows:go,rowSpan:go,sandbox:mo,scope:null,scoped:uo,seamless:uo,selected:uo,shadowRootClonable:uo,shadowRootDelegatesFocus:uo,shadowRootMode:null,shape:null,size:go,sizes:null,slot:null,span:go,spellCheck:po,src:null,srcDoc:null,srcLang:null,srcSet:null,start:go,step:null,style:null,tabIndex:go,target:null,title:null,translate:null,type:null,typeMustMatch:uo,useMap:null,value:po,width:go,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:mo,axis:null,background:null,bgColor:null,border:go,borderColor:null,bottomMargin:go,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:uo,declare:uo,event:null,face:null,frame:null,frameBorder:null,hSpace:go,leftMargin:go,link:null,longDesc:null,lowSrc:null,marginHeight:go,marginWidth:go,noResize:uo,noHref:uo,noShade:uo,noWrap:uo,object:null,profile:null,prompt:null,rev:null,rightMargin:go,rules:null,scheme:null,scrolling:po,standby:null,summary:null,text:null,topMargin:go,valueType:null,version:null,vAlign:null,vLink:null,vSpace:go,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:uo,disableRemotePlayback:uo,prefix:null,property:null,results:go,security:null,unselectable:null},space:"html",transform:To}),Co=Eo({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:bo,accentHeight:go,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:go,amplitude:go,arabicForm:null,ascent:go,attributeName:null,attributeType:null,azimuth:go,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:go,by:null,calcMode:null,capHeight:go,className:mo,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:go,diffuseConstant:go,direction:null,display:null,dur:null,divisor:go,dominantBaseline:null,download:uo,dx:null,dy:null,edgeMode:null,editable:null,elevation:go,enableBackground:null,end:null,event:null,exponent:go,externalResourcesRequired:null,fill:null,fillOpacity:go,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:ho,g2:ho,glyphName:ho,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:go,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:go,horizOriginX:go,horizOriginY:go,id:null,ideographic:go,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:go,k:go,k1:go,k2:go,k3:go,k4:go,kernelMatrix:bo,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:go,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:go,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:go,overlineThickness:go,paintOrder:null,panose1:null,path:null,pathLength:go,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:mo,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:go,pointsAtY:go,pointsAtZ:go,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:bo,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:bo,rev:bo,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:bo,requiredFeatures:bo,requiredFonts:bo,requiredFormats:bo,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:go,specularExponent:go,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:go,strikethroughThickness:go,string:null,stroke:null,strokeDashArray:bo,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:go,strokeOpacity:go,strokeWidth:null,style:null,surfaceScale:go,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:bo,tabIndex:go,tableValues:null,target:null,targetX:go,targetY:go,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:bo,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:go,underlineThickness:go,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:go,values:null,vAlphabetic:go,vMathematical:go,vectorEffect:null,vHanging:go,vIdeographic:go,version:null,vertAdvY:go,vertOriginX:go,vertOriginY:go,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:go,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Ao}),Io=Eo({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform:(e,t)=>"xlink:"+t.slice(5).toLowerCase()}),No=Eo({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:To}),Ro=Eo({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform:(e,t)=>"xml:"+t.slice(3).toLowerCase()}),_o={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"},Po=/[A-Z]/g,Lo=/-[a-z]/g,Do=/^data[-\w.:]+$/i;function Mo(e){return"-"+e.toLowerCase()}function jo(e){return e.charAt(1).toUpperCase()}const Fo=io([ko,Oo,Io,No,Ro],"html"),Bo=io([ko,Co,Io,No,Ro],"svg");var Uo={},zo=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,$o=/\n/g,Go=/^\s*/,qo=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,Ho=/^:\s*/,Vo=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,Wo=/^[;\s]*/,Yo=/^\s+|\s+$/g,Ko="";function Xo(e){return e?e.replace(Yo,Ko):Ko}var Zo=function(e,t){if("string"!=typeof e)throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var n=1,r=1;function o(e){var t=e.match($o);t&&(n+=t.length);var o=e.lastIndexOf("\n");r=~o?e.length-o:r+e.length}function a(){var e={line:n,column:r};return function(t){return t.position=new i(e),c(),t}}function i(e){this.start=e,this.end={line:n,column:r},this.source=t.source}function s(o){var a=new Error(t.source+":"+n+":"+r+": "+o);if(a.reason=o,a.filename=t.source,a.line=n,a.column=r,a.source=e,!t.silent)throw a}function l(t){var n=t.exec(e);if(n){var r=n[0];return o(r),e=e.slice(r.length),n}}function c(){l(Go)}function u(e){var t;for(e=e||[];t=d();)!1!==t&&e.push(t);return e}function d(){var t=a();if("/"==e.charAt(0)&&"*"==e.charAt(1)){for(var n=2;Ko!=e.charAt(n)&&("*"!=e.charAt(n)||"/"!=e.charAt(n+1));)++n;if(n+=2,Ko===e.charAt(n-1))return s("End of comment missing");var i=e.slice(2,n-2);return r+=2,o(i),e=e.slice(n),r+=2,t({type:"comment",comment:i})}}function p(){var e=a(),t=l(qo);if(t){if(d(),!l(Ho))return s("property missing ':'");var n=l(Vo),r=e({type:"declaration",property:Xo(t[0].replace(zo,Ko)),value:n?Xo(n[0].replace(zo,Ko)):Ko});return l(Wo),r}}return i.prototype.content=e,c(),function(){var e,t=[];for(u(t);e=p();)!1!==e&&(t.push(e),u(t));return t}()},Qo=$n&&$n.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Uo,"__esModule",{value:!0}),Uo.default=function(e,t){let n=null;if(!e||"string"!=typeof e)return n;const r=(0,Jo.default)(e),o="function"==typeof t;return r.forEach(e=>{if("declaration"!==e.type)return;const{property:r,value:a}=e;o?t(r,a,e):a&&(n=n||{},n[r]=a)}),n};const Jo=Qo(Zo);var ea={};Object.defineProperty(ea,"__esModule",{value:!0}),ea.camelCase=void 0;var ta=/^--[a-zA-Z0-9_-]+$/,na=/-([a-z])/g,ra=/^[^-]+$/,oa=/^-(webkit|moz|ms|o|khtml)-/,aa=/^-(ms)-/,ia=function(e,t){return t.toUpperCase()},sa=function(e,t){return"".concat(t,"-")};ea.camelCase=function(e,t){return void 0===t&&(t={}),function(e){return!e||ra.test(e)||ta.test(e)}(e)?e:(e=e.toLowerCase(),(e=t.reactCompat?e.replace(aa,sa):e.replace(oa,sa)).replace(na,ia))};var la=($n&&$n.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(Uo),ca=ea;function ua(e,t){var n={};return e&&"string"==typeof e?((0,la.default)(e,function(e,r){e&&r&&(n[(0,ca.camelCase)(e,t)]=r)}),n):n}ua.default=ua;var da=ua;const pa=ga("end"),fa=ga("start");function ga(e){return function(t){const n=t&&t.position&&t.position[e]||{};if("number"==typeof n.line&&n.line>0&&"number"==typeof n.column&&n.column>0)return{line:n.line,column:n.column,offset:"number"==typeof n.offset&&n.offset>-1?n.offset:void 0}}}function ma(e){return e&&"object"==typeof e?"position"in e||"type"in e?ba(e.position):"start"in e||"end"in e?ba(e):"line"in e||"column"in e?ha(e):"":""}function ha(e){return ya(e&&e.line)+":"+ya(e&&e.column)}function ba(e){return ha(e&&e.start)+"-"+ha(e&&e.end)}function ya(e){return e&&"number"==typeof e?e:1}class va extends Error{constructor(e,t,n){super(),"string"==typeof t&&(n=t,t=void 0);let r="",o={},a=!1;if(t&&(o="line"in t&&"column"in t||"start"in t&&"end"in t?{place:t}:"type"in t?{ancestors:[t],place:t.position}:{...t}),"string"==typeof e?r=e:!o.cause&&e&&(a=!0,r=e.message,o.cause=e),!o.ruleId&&!o.source&&"string"==typeof n){const e=n.indexOf(":");-1===e?o.ruleId=n:(o.source=n.slice(0,e),o.ruleId=n.slice(e+1))}if(!o.place&&o.ancestors&&o.ancestors){const e=o.ancestors[o.ancestors.length-1];e&&(o.place=e.position)}const i=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=i?i.column:void 0,this.fatal=void 0,this.file="",this.message=r,this.line=i?i.line:void 0,this.name=ma(o.place)||"1:1",this.place=o.place||void 0,this.reason=this.message,this.ruleId=o.ruleId||void 0,this.source=o.source||void 0,this.stack=a&&o.cause&&"string"==typeof o.cause.stack?o.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}va.prototype.file="",va.prototype.name="",va.prototype.reason="",va.prototype.message="",va.prototype.stack="",va.prototype.column=void 0,va.prototype.line=void 0,va.prototype.ancestors=void 0,va.prototype.cause=void 0,va.prototype.fatal=void 0,va.prototype.place=void 0,va.prototype.ruleId=void 0,va.prototype.source=void 0;const wa={}.hasOwnProperty,Sa=new Map,xa=/[A-Z]/g,Ea=new Set(["table","tbody","thead","tfoot","tr"]),ka=new Set(["td","th"]),Aa="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function Ta(e,t){if(!t||void 0===t.Fragment)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if("function"!=typeof t.jsxDEV)throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=function(e,t){return n;function n(n,r,o,a){const i=Array.isArray(o.children),s=fa(n);return t(r,o,a,i,{columnNumber:s?s.column-1:void 0,fileName:e,lineNumber:s?s.line:void 0},void 0)}}(n,t.jsxDEV)}else{if("function"!=typeof t.jsx)throw new TypeError("Expected `jsx` in production options");if("function"!=typeof t.jsxs)throw new TypeError("Expected `jsxs` in production options");r=function(e,t,n){return r;function r(e,r,o,a){const i=Array.isArray(o.children)?n:t;return a?i(r,o,a):i(r,o)}}(0,t.jsx,t.jsxs)}const o={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:!1!==t.passKeys,passNode:t.passNode||!1,schema:"svg"===t.space?Bo:Fo,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:!1!==t.tableCellAlignToStyle},a=Oa(o,e,void 0);return a&&"string"!=typeof a?a:o.create(e,o.Fragment,{children:a||void 0},void 0)}function Oa(e,t,n){return"element"===t.type?function(e,t,n){const r=e.schema;let o=r;"svg"===t.tagName.toLowerCase()&&"html"===r.space&&(o=Bo,e.schema=o);e.ancestors.push(t);const a=_a(e,t.tagName,!1),i=function(e,t){const n={};let r,o;for(o in t.properties)if("children"!==o&&wa.call(t.properties,o)){const a=Ra(e,o,t.properties[o]);if(a){const[o,i]=a;e.tableCellAlignToStyle&&"align"===o&&"string"==typeof i&&ka.has(t.tagName)?r=i:n[o]=i}}if(r){(n.style||(n.style={}))["css"===e.stylePropertyNameCase?"text-align":"textAlign"]=r}return n}(e,t);let s=Na(e,t);Ea.has(t.tagName)&&(s=s.filter(function(e){return"string"!=typeof e||!("object"==typeof(t=e)?"text"===t.type&&oo(t.value):oo(t));var t}));return Ca(e,i,a,t),Ia(i,s),e.ancestors.pop(),e.schema=r,e.create(t,a,i,n)}(e,t,n):"mdxFlowExpression"===t.type||"mdxTextExpression"===t.type?function(e,t){if(t.data&&t.data.estree&&e.evaluater){const n=t.data.estree.body[0];return n.type,e.evaluater.evaluateExpression(n.expression)}Pa(e,t.position)}(e,t):"mdxJsxFlowElement"===t.type||"mdxJsxTextElement"===t.type?function(e,t,n){const r=e.schema;let o=r;"svg"===t.name&&"html"===r.space&&(o=Bo,e.schema=o);e.ancestors.push(t);const a=null===t.name?e.Fragment:_a(e,t.name,!0),i=function(e,t){const n={};for(const r of t.attributes)if("mdxJsxExpressionAttribute"===r.type)if(r.data&&r.data.estree&&e.evaluater){const t=r.data.estree.body[0];Zr(t.type);const o=t.expression;Zr(o.type);const a=o.properties[0];Zr(a.type),Object.assign(n,e.evaluater.evaluateExpression(a.argument))}else Pa(e,t.position);else{const o=r.name;let a;if(r.value&&"object"==typeof r.value)if(r.value.data&&r.value.data.estree&&e.evaluater){const t=r.value.data.estree.body[0];Zr(t.type),a=e.evaluater.evaluateExpression(t.expression)}else Pa(e,t.position);else a=null===r.value||r.value;n[o]=a}return n}(e,t),s=Na(e,t);return Ca(e,i,a,t),Ia(i,s),e.ancestors.pop(),e.schema=r,e.create(t,a,i,n)}(e,t,n):"mdxjsEsm"===t.type?function(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Pa(e,t.position)}(e,t):"root"===t.type?function(e,t,n){const r={};return Ia(r,Na(e,t)),e.create(t,e.Fragment,r,n)}(e,t,n):"text"===t.type?function(e,t){return t.value}(0,t):void 0}function Ca(e,t,n,r){"string"!=typeof n&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Ia(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function Na(e,t){const n=[];let r=-1;const o=e.passKeys?new Map:Sa;for(;++r<t.children.length;){const a=t.children[r];let i;if(e.passKeys){const e="element"===a.type?a.tagName:"mdxJsxFlowElement"===a.type||"mdxJsxTextElement"===a.type?a.name:void 0;if(e){const t=o.get(e)||0;i=e+"-"+t,o.set(e,t+1)}}const s=Oa(e,a,i);void 0!==s&&n.push(s)}return n}function Ra(e,t,n){const r=function(e,t){const n=so(t);let r=t,o=lo;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&"data"===n.slice(0,4)&&Do.test(t)){if("-"===t.charAt(4)){const e=t.slice(5).replace(Lo,jo);r="data"+e.charAt(0).toUpperCase()+e.slice(1)}else{const e=t.slice(4);if(!Lo.test(e)){let n=e.replace(Po,Mo);"-"!==n.charAt(0)&&(n="-"+n),t="data"+n}}o=So}return new o(r,t)}(e.schema,t);if(!(null==n||"number"==typeof n&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?function(e){const t={};return(""===e[e.length-1]?[...e,""]:e).join((t.padRight?" ":"")+","+(!1===t.padLeft?"":" ")).trim()}(n):n.join(" ").trim()),"style"===r.property){let t="object"==typeof n?n:function(e,t){try{return da(t,{reactCompat:!0})}catch(t){if(e.ignoreInvalidStyle)return{};const n=t,r=new va("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:n,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw r.file=e.filePath||void 0,r.url=Aa+"#cannot-parse-style-attribute",r}}(e,String(n));return"css"===e.stylePropertyNameCase&&(t=function(e){const t={};let n;for(n in e)wa.call(e,n)&&(t[La(n)]=e[n]);return t}(t)),["style",t]}return["react"===e.elementAttributeNameCase&&r.space?_o[r.property]||r.property:r.attribute,n]}}function _a(e,t,n){let r;if(n)if(t.includes(".")){const e=t.split(".");let n,o=-1;for(;++o<e.length;){const t=no(e[o])?{type:"Identifier",name:e[o]}:{type:"Literal",value:e[o]};n=n?{type:"MemberExpression",object:n,property:t,computed:Boolean(o&&"Literal"===t.type),optional:!1}:t}r=n}else r=no(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};else r={type:"Literal",value:t};if("Literal"===r.type){const t=r.value;return wa.call(e.components,t)?e.components[t]:t}if(e.evaluater)return e.evaluater.evaluateExpression(r);Pa(e)}function Pa(e,t){const n=new va("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=Aa+"#cannot-handle-mdx-estrees-without-createevaluater",n}function La(e){let t=e.replace(xa,Da);return"ms-"===t.slice(0,3)&&(t="-"+t),t}function Da(e){return"-"+e.toLowerCase()}const Ma={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"]},ja={};function Fa(e,t){return Ba(e,"boolean"!=typeof ja.includeImageAlt||ja.includeImageAlt,"boolean"!=typeof ja.includeHtml||ja.includeHtml)}function Ba(e,t,n){if(function(e){return Boolean(e&&"object"==typeof e)}(e)){if("value"in e)return"html"!==e.type||n?e.value:"";if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return Ua(e.children,t,n)}return Array.isArray(e)?Ua(e,t,n):""}function Ua(e,t,n){const r=[];let o=-1;for(;++o<e.length;)r[o]=Ba(e[o],t,n);return r.join("")}const za={AElig:"Æ",AMP:"&",Aacute:"Á",Abreve:"Ă",Acirc:"Â",Acy:"А",Afr:"𝔄",Agrave:"À",Alpha:"Α",Amacr:"Ā",And:"⩓",Aogon:"Ą",Aopf:"𝔸",ApplyFunction:"⁡",Aring:"Å",Ascr:"𝒜",Assign:"≔",Atilde:"Ã",Auml:"Ä",Backslash:"∖",Barv:"⫧",Barwed:"⌆",Bcy:"Б",Because:"∵",Bernoullis:"ℬ",Beta:"Β",Bfr:"𝔅",Bopf:"𝔹",Breve:"˘",Bscr:"ℬ",Bumpeq:"≎",CHcy:"Ч",COPY:"©",Cacute:"Ć",Cap:"⋒",CapitalDifferentialD:"ⅅ",Cayleys:"ℭ",Ccaron:"Č",Ccedil:"Ç",Ccirc:"Ĉ",Cconint:"∰",Cdot:"Ċ",Cedilla:"¸",CenterDot:"·",Cfr:"ℭ",Chi:"Χ",CircleDot:"⊙",CircleMinus:"⊖",CirclePlus:"⊕",CircleTimes:"⊗",ClockwiseContourIntegral:"∲",CloseCurlyDoubleQuote:"”",CloseCurlyQuote:"’",Colon:"∷",Colone:"⩴",Congruent:"≡",Conint:"∯",ContourIntegral:"∮",Copf:"ℂ",Coproduct:"∐",CounterClockwiseContourIntegral:"∳",Cross:"⨯",Cscr:"𝒞",Cup:"⋓",CupCap:"≍",DD:"ⅅ",DDotrahd:"⤑",DJcy:"Ђ",DScy:"Ѕ",DZcy:"Џ",Dagger:"‡",Darr:"↡",Dashv:"⫤",Dcaron:"Ď",Dcy:"Д",Del:"∇",Delta:"Δ",Dfr:"𝔇",DiacriticalAcute:"´",DiacriticalDot:"˙",DiacriticalDoubleAcute:"˝",DiacriticalGrave:"`",DiacriticalTilde:"˜",Diamond:"⋄",DifferentialD:"ⅆ",Dopf:"𝔻",Dot:"¨",DotDot:"⃜",DotEqual:"≐",DoubleContourIntegral:"∯",DoubleDot:"¨",DoubleDownArrow:"⇓",DoubleLeftArrow:"⇐",DoubleLeftRightArrow:"⇔",DoubleLeftTee:"⫤",DoubleLongLeftArrow:"⟸",DoubleLongLeftRightArrow:"⟺",DoubleLongRightArrow:"⟹",DoubleRightArrow:"⇒",DoubleRightTee:"⊨",DoubleUpArrow:"⇑",DoubleUpDownArrow:"⇕",DoubleVerticalBar:"∥",DownArrow:"↓",DownArrowBar:"⤓",DownArrowUpArrow:"⇵",DownBreve:"̑",DownLeftRightVector:"⥐",DownLeftTeeVector:"⥞",DownLeftVector:"↽",DownLeftVectorBar:"⥖",DownRightTeeVector:"⥟",DownRightVector:"⇁",DownRightVectorBar:"⥗",DownTee:"⊤",DownTeeArrow:"↧",Downarrow:"⇓",Dscr:"𝒟",Dstrok:"Đ",ENG:"Ŋ",ETH:"Ð",Eacute:"É",Ecaron:"Ě",Ecirc:"Ê",Ecy:"Э",Edot:"Ė",Efr:"𝔈",Egrave:"È",Element:"∈",Emacr:"Ē",EmptySmallSquare:"◻",EmptyVerySmallSquare:"▫",Eogon:"Ę",Eopf:"𝔼",Epsilon:"Ε",Equal:"⩵",EqualTilde:"≂",Equilibrium:"⇌",Escr:"ℰ",Esim:"⩳",Eta:"Η",Euml:"Ë",Exists:"∃",ExponentialE:"ⅇ",Fcy:"Ф",Ffr:"𝔉",FilledSmallSquare:"◼",FilledVerySmallSquare:"▪",Fopf:"𝔽",ForAll:"∀",Fouriertrf:"ℱ",Fscr:"ℱ",GJcy:"Ѓ",GT:">",Gamma:"Γ",Gammad:"Ϝ",Gbreve:"Ğ",Gcedil:"Ģ",Gcirc:"Ĝ",Gcy:"Г",Gdot:"Ġ",Gfr:"𝔊",Gg:"⋙",Gopf:"𝔾",GreaterEqual:"≥",GreaterEqualLess:"⋛",GreaterFullEqual:"≧",GreaterGreater:"⪢",GreaterLess:"≷",GreaterSlantEqual:"⩾",GreaterTilde:"≳",Gscr:"𝒢",Gt:"≫",HARDcy:"Ъ",Hacek:"ˇ",Hat:"^",Hcirc:"Ĥ",Hfr:"ℌ",HilbertSpace:"ℋ",Hopf:"ℍ",HorizontalLine:"─",Hscr:"ℋ",Hstrok:"Ħ",HumpDownHump:"≎",HumpEqual:"≏",IEcy:"Е",IJlig:"IJ",IOcy:"Ё",Iacute:"Í",Icirc:"Î",Icy:"И",Idot:"İ",Ifr:"ℑ",Igrave:"Ì",Im:"ℑ",Imacr:"Ī",ImaginaryI:"ⅈ",Implies:"⇒",Int:"∬",Integral:"∫",Intersection:"⋂",InvisibleComma:"⁣",InvisibleTimes:"⁢",Iogon:"Į",Iopf:"𝕀",Iota:"Ι",Iscr:"ℐ",Itilde:"Ĩ",Iukcy:"І",Iuml:"Ï",Jcirc:"Ĵ",Jcy:"Й",Jfr:"𝔍",Jopf:"𝕁",Jscr:"𝒥",Jsercy:"Ј",Jukcy:"Є",KHcy:"Х",KJcy:"Ќ",Kappa:"Κ",Kcedil:"Ķ",Kcy:"К",Kfr:"𝔎",Kopf:"𝕂",Kscr:"𝒦",LJcy:"Љ",LT:"<",Lacute:"Ĺ",Lambda:"Λ",Lang:"⟪",Laplacetrf:"ℒ",Larr:"↞",Lcaron:"Ľ",Lcedil:"Ļ",Lcy:"Л",LeftAngleBracket:"⟨",LeftArrow:"←",LeftArrowBar:"⇤",LeftArrowRightArrow:"⇆",LeftCeiling:"⌈",LeftDoubleBracket:"⟦",LeftDownTeeVector:"⥡",LeftDownVector:"⇃",LeftDownVectorBar:"⥙",LeftFloor:"⌊",LeftRightArrow:"↔",LeftRightVector:"⥎",LeftTee:"⊣",LeftTeeArrow:"↤",LeftTeeVector:"⥚",LeftTriangle:"⊲",LeftTriangleBar:"⧏",LeftTriangleEqual:"⊴",LeftUpDownVector:"⥑",LeftUpTeeVector:"⥠",LeftUpVector:"↿",LeftUpVectorBar:"⥘",LeftVector:"↼",LeftVectorBar:"⥒",Leftarrow:"⇐",Leftrightarrow:"⇔",LessEqualGreater:"⋚",LessFullEqual:"≦",LessGreater:"≶",LessLess:"⪡",LessSlantEqual:"⩽",LessTilde:"≲",Lfr:"𝔏",Ll:"⋘",Lleftarrow:"⇚",Lmidot:"Ŀ",LongLeftArrow:"⟵",LongLeftRightArrow:"⟷",LongRightArrow:"⟶",Longleftarrow:"⟸",Longleftrightarrow:"⟺",Longrightarrow:"⟹",Lopf:"𝕃",LowerLeftArrow:"↙",LowerRightArrow:"↘",Lscr:"ℒ",Lsh:"↰",Lstrok:"Ł",Lt:"≪",Map:"⤅",Mcy:"М",MediumSpace:" ",Mellintrf:"ℳ",Mfr:"𝔐",MinusPlus:"∓",Mopf:"𝕄",Mscr:"ℳ",Mu:"Μ",NJcy:"Њ",Nacute:"Ń",Ncaron:"Ň",Ncedil:"Ņ",Ncy:"Н",NegativeMediumSpace:"​",NegativeThickSpace:"​",NegativeThinSpace:"​",NegativeVeryThinSpace:"​",NestedGreaterGreater:"≫",NestedLessLess:"≪",NewLine:"\n",Nfr:"𝔑",NoBreak:"⁠",NonBreakingSpace:" ",Nopf:"ℕ",Not:"⫬",NotCongruent:"≢",NotCupCap:"≭",NotDoubleVerticalBar:"∦",NotElement:"∉",NotEqual:"≠",NotEqualTilde:"≂̸",NotExists:"∄",NotGreater:"≯",NotGreaterEqual:"≱",NotGreaterFullEqual:"≧̸",NotGreaterGreater:"≫̸",NotGreaterLess:"≹",NotGreaterSlantEqual:"⩾̸",NotGreaterTilde:"≵",NotHumpDownHump:"≎̸",NotHumpEqual:"≏̸",NotLeftTriangle:"⋪",NotLeftTriangleBar:"⧏̸",NotLeftTriangleEqual:"⋬",NotLess:"≮",NotLessEqual:"≰",NotLessGreater:"≸",NotLessLess:"≪̸",NotLessSlantEqual:"⩽̸",NotLessTilde:"≴",NotNestedGreaterGreater:"⪢̸",NotNestedLessLess:"⪡̸",NotPrecedes:"⊀",NotPrecedesEqual:"⪯̸",NotPrecedesSlantEqual:"⋠",NotReverseElement:"∌",NotRightTriangle:"⋫",NotRightTriangleBar:"⧐̸",NotRightTriangleEqual:"⋭",NotSquareSubset:"⊏̸",NotSquareSubsetEqual:"⋢",NotSquareSuperset:"⊐̸",NotSquareSupersetEqual:"⋣",NotSubset:"⊂⃒",NotSubsetEqual:"⊈",NotSucceeds:"⊁",NotSucceedsEqual:"⪰̸",NotSucceedsSlantEqual:"⋡",NotSucceedsTilde:"≿̸",NotSuperset:"⊃⃒",NotSupersetEqual:"⊉",NotTilde:"≁",NotTildeEqual:"≄",NotTildeFullEqual:"≇",NotTildeTilde:"≉",NotVerticalBar:"∤",Nscr:"𝒩",Ntilde:"Ñ",Nu:"Ν",OElig:"Œ",Oacute:"Ó",Ocirc:"Ô",Ocy:"О",Odblac:"Ő",Ofr:"𝔒",Ograve:"Ò",Omacr:"Ō",Omega:"Ω",Omicron:"Ο",Oopf:"𝕆",OpenCurlyDoubleQuote:"“",OpenCurlyQuote:"‘",Or:"⩔",Oscr:"𝒪",Oslash:"Ø",Otilde:"Õ",Otimes:"⨷",Ouml:"Ö",OverBar:"‾",OverBrace:"⏞",OverBracket:"⎴",OverParenthesis:"⏜",PartialD:"∂",Pcy:"П",Pfr:"𝔓",Phi:"Φ",Pi:"Π",PlusMinus:"±",Poincareplane:"ℌ",Popf:"ℙ",Pr:"⪻",Precedes:"≺",PrecedesEqual:"⪯",PrecedesSlantEqual:"≼",PrecedesTilde:"≾",Prime:"″",Product:"∏",Proportion:"∷",Proportional:"∝",Pscr:"𝒫",Psi:"Ψ",QUOT:'"',Qfr:"𝔔",Qopf:"ℚ",Qscr:"𝒬",RBarr:"⤐",REG:"®",Racute:"Ŕ",Rang:"⟫",Rarr:"↠",Rarrtl:"⤖",Rcaron:"Ř",Rcedil:"Ŗ",Rcy:"Р",Re:"ℜ",ReverseElement:"∋",ReverseEquilibrium:"⇋",ReverseUpEquilibrium:"⥯",Rfr:"ℜ",Rho:"Ρ",RightAngleBracket:"⟩",RightArrow:"→",RightArrowBar:"⇥",RightArrowLeftArrow:"⇄",RightCeiling:"⌉",RightDoubleBracket:"⟧",RightDownTeeVector:"⥝",RightDownVector:"⇂",RightDownVectorBar:"⥕",RightFloor:"⌋",RightTee:"⊢",RightTeeArrow:"↦",RightTeeVector:"⥛",RightTriangle:"⊳",RightTriangleBar:"⧐",RightTriangleEqual:"⊵",RightUpDownVector:"⥏",RightUpTeeVector:"⥜",RightUpVector:"↾",RightUpVectorBar:"⥔",RightVector:"⇀",RightVectorBar:"⥓",Rightarrow:"⇒",Ropf:"ℝ",RoundImplies:"⥰",Rrightarrow:"⇛",Rscr:"ℛ",Rsh:"↱",RuleDelayed:"⧴",SHCHcy:"Щ",SHcy:"Ш",SOFTcy:"Ь",Sacute:"Ś",Sc:"⪼",Scaron:"Š",Scedil:"Ş",Scirc:"Ŝ",Scy:"С",Sfr:"𝔖",ShortDownArrow:"↓",ShortLeftArrow:"←",ShortRightArrow:"→",ShortUpArrow:"↑",Sigma:"Σ",SmallCircle:"∘",Sopf:"𝕊",Sqrt:"√",Square:"□",SquareIntersection:"⊓",SquareSubset:"⊏",SquareSubsetEqual:"⊑",SquareSuperset:"⊐",SquareSupersetEqual:"⊒",SquareUnion:"⊔",Sscr:"𝒮",Star:"⋆",Sub:"⋐",Subset:"⋐",SubsetEqual:"⊆",Succeeds:"≻",SucceedsEqual:"⪰",SucceedsSlantEqual:"≽",SucceedsTilde:"≿",SuchThat:"∋",Sum:"∑",Sup:"⋑",Superset:"⊃",SupersetEqual:"⊇",Supset:"⋑",THORN:"Þ",TRADE:"™",TSHcy:"Ћ",TScy:"Ц",Tab:"\t",Tau:"Τ",Tcaron:"Ť",Tcedil:"Ţ",Tcy:"Т",Tfr:"𝔗",Therefore:"∴",Theta:"Θ",ThickSpace:"  ",ThinSpace:" ",Tilde:"∼",TildeEqual:"≃",TildeFullEqual:"≅",TildeTilde:"≈",Topf:"𝕋",TripleDot:"⃛",Tscr:"𝒯",Tstrok:"Ŧ",Uacute:"Ú",Uarr:"↟",Uarrocir:"⥉",Ubrcy:"Ў",Ubreve:"Ŭ",Ucirc:"Û",Ucy:"У",Udblac:"Ű",Ufr:"𝔘",Ugrave:"Ù",Umacr:"Ū",UnderBar:"_",UnderBrace:"⏟",UnderBracket:"⎵",UnderParenthesis:"⏝",Union:"⋃",UnionPlus:"⊎",Uogon:"Ų",Uopf:"𝕌",UpArrow:"↑",UpArrowBar:"⤒",UpArrowDownArrow:"⇅",UpDownArrow:"↕",UpEquilibrium:"⥮",UpTee:"⊥",UpTeeArrow:"↥",Uparrow:"⇑",Updownarrow:"⇕",UpperLeftArrow:"↖",UpperRightArrow:"↗",Upsi:"ϒ",Upsilon:"Υ",Uring:"Ů",Uscr:"𝒰",Utilde:"Ũ",Uuml:"Ü",VDash:"⊫",Vbar:"⫫",Vcy:"В",Vdash:"⊩",Vdashl:"⫦",Vee:"⋁",Verbar:"‖",Vert:"‖",VerticalBar:"∣",VerticalLine:"|",VerticalSeparator:"❘",VerticalTilde:"≀",VeryThinSpace:" ",Vfr:"𝔙",Vopf:"𝕍",Vscr:"𝒱",Vvdash:"⊪",Wcirc:"Ŵ",Wedge:"⋀",Wfr:"𝔚",Wopf:"𝕎",Wscr:"𝒲",Xfr:"𝔛",Xi:"Ξ",Xopf:"𝕏",Xscr:"𝒳",YAcy:"Я",YIcy:"Ї",YUcy:"Ю",Yacute:"Ý",Ycirc:"Ŷ",Ycy:"Ы",Yfr:"𝔜",Yopf:"𝕐",Yscr:"𝒴",Yuml:"Ÿ",ZHcy:"Ж",Zacute:"Ź",Zcaron:"Ž",Zcy:"З",Zdot:"Ż",ZeroWidthSpace:"​",Zeta:"Ζ",Zfr:"ℨ",Zopf:"ℤ",Zscr:"𝒵",aacute:"á",abreve:"ă",ac:"∾",acE:"∾̳",acd:"∿",acirc:"â",acute:"´",acy:"а",aelig:"æ",af:"⁡",afr:"𝔞",agrave:"à",alefsym:"ℵ",aleph:"ℵ",alpha:"α",amacr:"ā",amalg:"⨿",amp:"&",and:"∧",andand:"⩕",andd:"⩜",andslope:"⩘",andv:"⩚",ang:"∠",ange:"⦤",angle:"∠",angmsd:"∡",angmsdaa:"⦨",angmsdab:"⦩",angmsdac:"⦪",angmsdad:"⦫",angmsdae:"⦬",angmsdaf:"⦭",angmsdag:"⦮",angmsdah:"⦯",angrt:"∟",angrtvb:"⊾",angrtvbd:"⦝",angsph:"∢",angst:"Å",angzarr:"⍼",aogon:"ą",aopf:"𝕒",ap:"≈",apE:"⩰",apacir:"⩯",ape:"≊",apid:"≋",apos:"'",approx:"≈",approxeq:"≊",aring:"å",ascr:"𝒶",ast:"*",asymp:"≈",asympeq:"≍",atilde:"ã",auml:"ä",awconint:"∳",awint:"⨑",bNot:"⫭",backcong:"≌",backepsilon:"϶",backprime:"‵",backsim:"∽",backsimeq:"⋍",barvee:"⊽",barwed:"⌅",barwedge:"⌅",bbrk:"⎵",bbrktbrk:"⎶",bcong:"≌",bcy:"б",bdquo:"„",becaus:"∵",because:"∵",bemptyv:"⦰",bepsi:"϶",bernou:"ℬ",beta:"β",beth:"ℶ",between:"≬",bfr:"𝔟",bigcap:"⋂",bigcirc:"◯",bigcup:"⋃",bigodot:"⨀",bigoplus:"⨁",bigotimes:"⨂",bigsqcup:"⨆",bigstar:"★",bigtriangledown:"▽",bigtriangleup:"△",biguplus:"⨄",bigvee:"⋁",bigwedge:"⋀",bkarow:"⤍",blacklozenge:"⧫",blacksquare:"▪",blacktriangle:"▴",blacktriangledown:"▾",blacktriangleleft:"◂",blacktriangleright:"▸",blank:"␣",blk12:"▒",blk14:"░",blk34:"▓",block:"█",bne:"=⃥",bnequiv:"≡⃥",bnot:"⌐",bopf:"𝕓",bot:"⊥",bottom:"⊥",bowtie:"⋈",boxDL:"╗",boxDR:"╔",boxDl:"╖",boxDr:"╓",boxH:"═",boxHD:"╦",boxHU:"╩",boxHd:"╤",boxHu:"╧",boxUL:"╝",boxUR:"╚",boxUl:"╜",boxUr:"╙",boxV:"║",boxVH:"╬",boxVL:"╣",boxVR:"╠",boxVh:"╫",boxVl:"╢",boxVr:"╟",boxbox:"⧉",boxdL:"╕",boxdR:"╒",boxdl:"┐",boxdr:"┌",boxh:"─",boxhD:"╥",boxhU:"╨",boxhd:"┬",boxhu:"┴",boxminus:"⊟",boxplus:"⊞",boxtimes:"⊠",boxuL:"╛",boxuR:"╘",boxul:"┘",boxur:"└",boxv:"│",boxvH:"╪",boxvL:"╡",boxvR:"╞",boxvh:"┼",boxvl:"┤",boxvr:"├",bprime:"‵",breve:"˘",brvbar:"¦",bscr:"𝒷",bsemi:"⁏",bsim:"∽",bsime:"⋍",bsol:"\\",bsolb:"⧅",bsolhsub:"⟈",bull:"•",bullet:"•",bump:"≎",bumpE:"⪮",bumpe:"≏",bumpeq:"≏",cacute:"ć",cap:"∩",capand:"⩄",capbrcup:"⩉",capcap:"⩋",capcup:"⩇",capdot:"⩀",caps:"∩︀",caret:"⁁",caron:"ˇ",ccaps:"⩍",ccaron:"č",ccedil:"ç",ccirc:"ĉ",ccups:"⩌",ccupssm:"⩐",cdot:"ċ",cedil:"¸",cemptyv:"⦲",cent:"¢",centerdot:"·",cfr:"𝔠",chcy:"ч",check:"✓",checkmark:"✓",chi:"χ",cir:"○",cirE:"⧃",circ:"ˆ",circeq:"≗",circlearrowleft:"↺",circlearrowright:"↻",circledR:"®",circledS:"Ⓢ",circledast:"⊛",circledcirc:"⊚",circleddash:"⊝",cire:"≗",cirfnint:"⨐",cirmid:"⫯",cirscir:"⧂",clubs:"♣",clubsuit:"♣",colon:":",colone:"≔",coloneq:"≔",comma:",",commat:"@",comp:"∁",compfn:"∘",complement:"∁",complexes:"ℂ",cong:"≅",congdot:"⩭",conint:"∮",copf:"𝕔",coprod:"∐",copy:"©",copysr:"℗",crarr:"↵",cross:"✗",cscr:"𝒸",csub:"⫏",csube:"⫑",csup:"⫐",csupe:"⫒",ctdot:"⋯",cudarrl:"⤸",cudarrr:"⤵",cuepr:"⋞",cuesc:"⋟",cularr:"↶",cularrp:"⤽",cup:"∪",cupbrcap:"⩈",cupcap:"⩆",cupcup:"⩊",cupdot:"⊍",cupor:"⩅",cups:"∪︀",curarr:"↷",curarrm:"⤼",curlyeqprec:"⋞",curlyeqsucc:"⋟",curlyvee:"⋎",curlywedge:"⋏",curren:"¤",curvearrowleft:"↶",curvearrowright:"↷",cuvee:"⋎",cuwed:"⋏",cwconint:"∲",cwint:"∱",cylcty:"⌭",dArr:"⇓",dHar:"⥥",dagger:"†",daleth:"ℸ",darr:"↓",dash:"‐",dashv:"⊣",dbkarow:"⤏",dblac:"˝",dcaron:"ď",dcy:"д",dd:"ⅆ",ddagger:"‡",ddarr:"⇊",ddotseq:"⩷",deg:"°",delta:"δ",demptyv:"⦱",dfisht:"⥿",dfr:"𝔡",dharl:"⇃",dharr:"⇂",diam:"⋄",diamond:"⋄",diamondsuit:"♦",diams:"♦",die:"¨",digamma:"ϝ",disin:"⋲",div:"÷",divide:"÷",divideontimes:"⋇",divonx:"⋇",djcy:"ђ",dlcorn:"⌞",dlcrop:"⌍",dollar:"$",dopf:"𝕕",dot:"˙",doteq:"≐",doteqdot:"≑",dotminus:"∸",dotplus:"∔",dotsquare:"⊡",doublebarwedge:"⌆",downarrow:"↓",downdownarrows:"⇊",downharpoonleft:"⇃",downharpoonright:"⇂",drbkarow:"⤐",drcorn:"⌟",drcrop:"⌌",dscr:"𝒹",dscy:"ѕ",dsol:"⧶",dstrok:"đ",dtdot:"⋱",dtri:"▿",dtrif:"▾",duarr:"⇵",duhar:"⥯",dwangle:"⦦",dzcy:"џ",dzigrarr:"⟿",eDDot:"⩷",eDot:"≑",eacute:"é",easter:"⩮",ecaron:"ě",ecir:"≖",ecirc:"ê",ecolon:"≕",ecy:"э",edot:"ė",ee:"ⅇ",efDot:"≒",efr:"𝔢",eg:"⪚",egrave:"è",egs:"⪖",egsdot:"⪘",el:"⪙",elinters:"⏧",ell:"ℓ",els:"⪕",elsdot:"⪗",emacr:"ē",empty:"∅",emptyset:"∅",emptyv:"∅",emsp13:" ",emsp14:" ",emsp:" ",eng:"ŋ",ensp:" ",eogon:"ę",eopf:"𝕖",epar:"⋕",eparsl:"⧣",eplus:"⩱",epsi:"ε",epsilon:"ε",epsiv:"ϵ",eqcirc:"≖",eqcolon:"≕",eqsim:"≂",eqslantgtr:"⪖",eqslantless:"⪕",equals:"=",equest:"≟",equiv:"≡",equivDD:"⩸",eqvparsl:"⧥",erDot:"≓",erarr:"⥱",escr:"ℯ",esdot:"≐",esim:"≂",eta:"η",eth:"ð",euml:"ë",euro:"€",excl:"!",exist:"∃",expectation:"ℰ",exponentiale:"ⅇ",fallingdotseq:"≒",fcy:"ф",female:"♀",ffilig:"ffi",fflig:"ff",ffllig:"ffl",ffr:"𝔣",filig:"fi",fjlig:"fj",flat:"♭",fllig:"fl",fltns:"▱",fnof:"ƒ",fopf:"𝕗",forall:"∀",fork:"⋔",forkv:"⫙",fpartint:"⨍",frac12:"½",frac13:"⅓",frac14:"¼",frac15:"⅕",frac16:"⅙",frac18:"⅛",frac23:"⅔",frac25:"⅖",frac34:"¾",frac35:"⅗",frac38:"⅜",frac45:"⅘",frac56:"⅚",frac58:"⅝",frac78:"⅞",frasl:"⁄",frown:"⌢",fscr:"𝒻",gE:"≧",gEl:"⪌",gacute:"ǵ",gamma:"γ",gammad:"ϝ",gap:"⪆",gbreve:"ğ",gcirc:"ĝ",gcy:"г",gdot:"ġ",ge:"≥",gel:"⋛",geq:"≥",geqq:"≧",geqslant:"⩾",ges:"⩾",gescc:"⪩",gesdot:"⪀",gesdoto:"⪂",gesdotol:"⪄",gesl:"⋛︀",gesles:"⪔",gfr:"𝔤",gg:"≫",ggg:"⋙",gimel:"ℷ",gjcy:"ѓ",gl:"≷",glE:"⪒",gla:"⪥",glj:"⪤",gnE:"≩",gnap:"⪊",gnapprox:"⪊",gne:"⪈",gneq:"⪈",gneqq:"≩",gnsim:"⋧",gopf:"𝕘",grave:"`",gscr:"ℊ",gsim:"≳",gsime:"⪎",gsiml:"⪐",gt:">",gtcc:"⪧",gtcir:"⩺",gtdot:"⋗",gtlPar:"⦕",gtquest:"⩼",gtrapprox:"⪆",gtrarr:"⥸",gtrdot:"⋗",gtreqless:"⋛",gtreqqless:"⪌",gtrless:"≷",gtrsim:"≳",gvertneqq:"≩︀",gvnE:"≩︀",hArr:"⇔",hairsp:" ",half:"½",hamilt:"ℋ",hardcy:"ъ",harr:"↔",harrcir:"⥈",harrw:"↭",hbar:"ℏ",hcirc:"ĥ",hearts:"♥",heartsuit:"♥",hellip:"…",hercon:"⊹",hfr:"𝔥",hksearow:"⤥",hkswarow:"⤦",hoarr:"⇿",homtht:"∻",hookleftarrow:"↩",hookrightarrow:"↪",hopf:"𝕙",horbar:"―",hscr:"𝒽",hslash:"ℏ",hstrok:"ħ",hybull:"⁃",hyphen:"‐",iacute:"í",ic:"⁣",icirc:"î",icy:"и",iecy:"е",iexcl:"¡",iff:"⇔",ifr:"𝔦",igrave:"ì",ii:"ⅈ",iiiint:"⨌",iiint:"∭",iinfin:"⧜",iiota:"℩",ijlig:"ij",imacr:"ī",image:"ℑ",imagline:"ℐ",imagpart:"ℑ",imath:"ı",imof:"⊷",imped:"Ƶ",in:"∈",incare:"℅",infin:"∞",infintie:"⧝",inodot:"ı",int:"∫",intcal:"⊺",integers:"ℤ",intercal:"⊺",intlarhk:"⨗",intprod:"⨼",iocy:"ё",iogon:"į",iopf:"𝕚",iota:"ι",iprod:"⨼",iquest:"¿",iscr:"𝒾",isin:"∈",isinE:"⋹",isindot:"⋵",isins:"⋴",isinsv:"⋳",isinv:"∈",it:"⁢",itilde:"ĩ",iukcy:"і",iuml:"ï",jcirc:"ĵ",jcy:"й",jfr:"𝔧",jmath:"ȷ",jopf:"𝕛",jscr:"𝒿",jsercy:"ј",jukcy:"є",kappa:"κ",kappav:"ϰ",kcedil:"ķ",kcy:"к",kfr:"𝔨",kgreen:"ĸ",khcy:"х",kjcy:"ќ",kopf:"𝕜",kscr:"𝓀",lAarr:"⇚",lArr:"⇐",lAtail:"⤛",lBarr:"⤎",lE:"≦",lEg:"⪋",lHar:"⥢",lacute:"ĺ",laemptyv:"⦴",lagran:"ℒ",lambda:"λ",lang:"⟨",langd:"⦑",langle:"⟨",lap:"⪅",laquo:"«",larr:"←",larrb:"⇤",larrbfs:"⤟",larrfs:"⤝",larrhk:"↩",larrlp:"↫",larrpl:"⤹",larrsim:"⥳",larrtl:"↢",lat:"⪫",latail:"⤙",late:"⪭",lates:"⪭︀",lbarr:"⤌",lbbrk:"❲",lbrace:"{",lbrack:"[",lbrke:"⦋",lbrksld:"⦏",lbrkslu:"⦍",lcaron:"ľ",lcedil:"ļ",lceil:"⌈",lcub:"{",lcy:"л",ldca:"⤶",ldquo:"“",ldquor:"„",ldrdhar:"⥧",ldrushar:"⥋",ldsh:"↲",le:"≤",leftarrow:"←",leftarrowtail:"↢",leftharpoondown:"↽",leftharpoonup:"↼",leftleftarrows:"⇇",leftrightarrow:"↔",leftrightarrows:"⇆",leftrightharpoons:"⇋",leftrightsquigarrow:"↭",leftthreetimes:"⋋",leg:"⋚",leq:"≤",leqq:"≦",leqslant:"⩽",les:"⩽",lescc:"⪨",lesdot:"⩿",lesdoto:"⪁",lesdotor:"⪃",lesg:"⋚︀",lesges:"⪓",lessapprox:"⪅",lessdot:"⋖",lesseqgtr:"⋚",lesseqqgtr:"⪋",lessgtr:"≶",lesssim:"≲",lfisht:"⥼",lfloor:"⌊",lfr:"𝔩",lg:"≶",lgE:"⪑",lhard:"↽",lharu:"↼",lharul:"⥪",lhblk:"▄",ljcy:"љ",ll:"≪",llarr:"⇇",llcorner:"⌞",llhard:"⥫",lltri:"◺",lmidot:"ŀ",lmoust:"⎰",lmoustache:"⎰",lnE:"≨",lnap:"⪉",lnapprox:"⪉",lne:"⪇",lneq:"⪇",lneqq:"≨",lnsim:"⋦",loang:"⟬",loarr:"⇽",lobrk:"⟦",longleftarrow:"⟵",longleftrightarrow:"⟷",longmapsto:"⟼",longrightarrow:"⟶",looparrowleft:"↫",looparrowright:"↬",lopar:"⦅",lopf:"𝕝",loplus:"⨭",lotimes:"⨴",lowast:"∗",lowbar:"_",loz:"◊",lozenge:"◊",lozf:"⧫",lpar:"(",lparlt:"⦓",lrarr:"⇆",lrcorner:"⌟",lrhar:"⇋",lrhard:"⥭",lrm:"‎",lrtri:"⊿",lsaquo:"‹",lscr:"𝓁",lsh:"↰",lsim:"≲",lsime:"⪍",lsimg:"⪏",lsqb:"[",lsquo:"‘",lsquor:"‚",lstrok:"ł",lt:"<",ltcc:"⪦",ltcir:"⩹",ltdot:"⋖",lthree:"⋋",ltimes:"⋉",ltlarr:"⥶",ltquest:"⩻",ltrPar:"⦖",ltri:"◃",ltrie:"⊴",ltrif:"◂",lurdshar:"⥊",luruhar:"⥦",lvertneqq:"≨︀",lvnE:"≨︀",mDDot:"∺",macr:"¯",male:"♂",malt:"✠",maltese:"✠",map:"↦",mapsto:"↦",mapstodown:"↧",mapstoleft:"↤",mapstoup:"↥",marker:"▮",mcomma:"⨩",mcy:"м",mdash:"—",measuredangle:"∡",mfr:"𝔪",mho:"℧",micro:"µ",mid:"∣",midast:"*",midcir:"⫰",middot:"·",minus:"−",minusb:"⊟",minusd:"∸",minusdu:"⨪",mlcp:"⫛",mldr:"…",mnplus:"∓",models:"⊧",mopf:"𝕞",mp:"∓",mscr:"𝓂",mstpos:"∾",mu:"μ",multimap:"⊸",mumap:"⊸",nGg:"⋙̸",nGt:"≫⃒",nGtv:"≫̸",nLeftarrow:"⇍",nLeftrightarrow:"⇎",nLl:"⋘̸",nLt:"≪⃒",nLtv:"≪̸",nRightarrow:"⇏",nVDash:"⊯",nVdash:"⊮",nabla:"∇",nacute:"ń",nang:"∠⃒",nap:"≉",napE:"⩰̸",napid:"≋̸",napos:"ʼn",napprox:"≉",natur:"♮",natural:"♮",naturals:"ℕ",nbsp:" ",nbump:"≎̸",nbumpe:"≏̸",ncap:"⩃",ncaron:"ň",ncedil:"ņ",ncong:"≇",ncongdot:"⩭̸",ncup:"⩂",ncy:"н",ndash:"–",ne:"≠",neArr:"⇗",nearhk:"⤤",nearr:"↗",nearrow:"↗",nedot:"≐̸",nequiv:"≢",nesear:"⤨",nesim:"≂̸",nexist:"∄",nexists:"∄",nfr:"𝔫",ngE:"≧̸",nge:"≱",ngeq:"≱",ngeqq:"≧̸",ngeqslant:"⩾̸",nges:"⩾̸",ngsim:"≵",ngt:"≯",ngtr:"≯",nhArr:"⇎",nharr:"↮",nhpar:"⫲",ni:"∋",nis:"⋼",nisd:"⋺",niv:"∋",njcy:"њ",nlArr:"⇍",nlE:"≦̸",nlarr:"↚",nldr:"‥",nle:"≰",nleftarrow:"↚",nleftrightarrow:"↮",nleq:"≰",nleqq:"≦̸",nleqslant:"⩽̸",nles:"⩽̸",nless:"≮",nlsim:"≴",nlt:"≮",nltri:"⋪",nltrie:"⋬",nmid:"∤",nopf:"𝕟",not:"¬",notin:"∉",notinE:"⋹̸",notindot:"⋵̸",notinva:"∉",notinvb:"⋷",notinvc:"⋶",notni:"∌",notniva:"∌",notnivb:"⋾",notnivc:"⋽",npar:"∦",nparallel:"∦",nparsl:"⫽⃥",npart:"∂̸",npolint:"⨔",npr:"⊀",nprcue:"⋠",npre:"⪯̸",nprec:"⊀",npreceq:"⪯̸",nrArr:"⇏",nrarr:"↛",nrarrc:"⤳̸",nrarrw:"↝̸",nrightarrow:"↛",nrtri:"⋫",nrtrie:"⋭",nsc:"⊁",nsccue:"⋡",nsce:"⪰̸",nscr:"𝓃",nshortmid:"∤",nshortparallel:"∦",nsim:"≁",nsime:"≄",nsimeq:"≄",nsmid:"∤",nspar:"∦",nsqsube:"⋢",nsqsupe:"⋣",nsub:"⊄",nsubE:"⫅̸",nsube:"⊈",nsubset:"⊂⃒",nsubseteq:"⊈",nsubseteqq:"⫅̸",nsucc:"⊁",nsucceq:"⪰̸",nsup:"⊅",nsupE:"⫆̸",nsupe:"⊉",nsupset:"⊃⃒",nsupseteq:"⊉",nsupseteqq:"⫆̸",ntgl:"≹",ntilde:"ñ",ntlg:"≸",ntriangleleft:"⋪",ntrianglelefteq:"⋬",ntriangleright:"⋫",ntrianglerighteq:"⋭",nu:"ν",num:"#",numero:"№",numsp:" ",nvDash:"⊭",nvHarr:"⤄",nvap:"≍⃒",nvdash:"⊬",nvge:"≥⃒",nvgt:">⃒",nvinfin:"⧞",nvlArr:"⤂",nvle:"≤⃒",nvlt:"<⃒",nvltrie:"⊴⃒",nvrArr:"⤃",nvrtrie:"⊵⃒",nvsim:"∼⃒",nwArr:"⇖",nwarhk:"⤣",nwarr:"↖",nwarrow:"↖",nwnear:"⤧",oS:"Ⓢ",oacute:"ó",oast:"⊛",ocir:"⊚",ocirc:"ô",ocy:"о",odash:"⊝",odblac:"ő",odiv:"⨸",odot:"⊙",odsold:"⦼",oelig:"œ",ofcir:"⦿",ofr:"𝔬",ogon:"˛",ograve:"ò",ogt:"⧁",ohbar:"⦵",ohm:"Ω",oint:"∮",olarr:"↺",olcir:"⦾",olcross:"⦻",oline:"‾",olt:"⧀",omacr:"ō",omega:"ω",omicron:"ο",omid:"⦶",ominus:"⊖",oopf:"𝕠",opar:"⦷",operp:"⦹",oplus:"⊕",or:"∨",orarr:"↻",ord:"⩝",order:"ℴ",orderof:"ℴ",ordf:"ª",ordm:"º",origof:"⊶",oror:"⩖",orslope:"⩗",orv:"⩛",oscr:"ℴ",oslash:"ø",osol:"⊘",otilde:"õ",otimes:"⊗",otimesas:"⨶",ouml:"ö",ovbar:"⌽",par:"∥",para:"¶",parallel:"∥",parsim:"⫳",parsl:"⫽",part:"∂",pcy:"п",percnt:"%",period:".",permil:"‰",perp:"⊥",pertenk:"‱",pfr:"𝔭",phi:"φ",phiv:"ϕ",phmmat:"ℳ",phone:"☎",pi:"π",pitchfork:"⋔",piv:"ϖ",planck:"ℏ",planckh:"ℎ",plankv:"ℏ",plus:"+",plusacir:"⨣",plusb:"⊞",pluscir:"⨢",plusdo:"∔",plusdu:"⨥",pluse:"⩲",plusmn:"±",plussim:"⨦",plustwo:"⨧",pm:"±",pointint:"⨕",popf:"𝕡",pound:"£",pr:"≺",prE:"⪳",prap:"⪷",prcue:"≼",pre:"⪯",prec:"≺",precapprox:"⪷",preccurlyeq:"≼",preceq:"⪯",precnapprox:"⪹",precneqq:"⪵",precnsim:"⋨",precsim:"≾",prime:"′",primes:"ℙ",prnE:"⪵",prnap:"⪹",prnsim:"⋨",prod:"∏",profalar:"⌮",profline:"⌒",profsurf:"⌓",prop:"∝",propto:"∝",prsim:"≾",prurel:"⊰",pscr:"𝓅",psi:"ψ",puncsp:" ",qfr:"𝔮",qint:"⨌",qopf:"𝕢",qprime:"⁗",qscr:"𝓆",quaternions:"ℍ",quatint:"⨖",quest:"?",questeq:"≟",quot:'"',rAarr:"⇛",rArr:"⇒",rAtail:"⤜",rBarr:"⤏",rHar:"⥤",race:"∽̱",racute:"ŕ",radic:"√",raemptyv:"⦳",rang:"⟩",rangd:"⦒",range:"⦥",rangle:"⟩",raquo:"»",rarr:"→",rarrap:"⥵",rarrb:"⇥",rarrbfs:"⤠",rarrc:"⤳",rarrfs:"⤞",rarrhk:"↪",rarrlp:"↬",rarrpl:"⥅",rarrsim:"⥴",rarrtl:"↣",rarrw:"↝",ratail:"⤚",ratio:"∶",rationals:"ℚ",rbarr:"⤍",rbbrk:"❳",rbrace:"}",rbrack:"]",rbrke:"⦌",rbrksld:"⦎",rbrkslu:"⦐",rcaron:"ř",rcedil:"ŗ",rceil:"⌉",rcub:"}",rcy:"р",rdca:"⤷",rdldhar:"⥩",rdquo:"”",rdquor:"”",rdsh:"↳",real:"ℜ",realine:"ℛ",realpart:"ℜ",reals:"ℝ",rect:"▭",reg:"®",rfisht:"⥽",rfloor:"⌋",rfr:"𝔯",rhard:"⇁",rharu:"⇀",rharul:"⥬",rho:"ρ",rhov:"ϱ",rightarrow:"→",rightarrowtail:"↣",rightharpoondown:"⇁",rightharpoonup:"⇀",rightleftarrows:"⇄",rightleftharpoons:"⇌",rightrightarrows:"⇉",rightsquigarrow:"↝",rightthreetimes:"⋌",ring:"˚",risingdotseq:"≓",rlarr:"⇄",rlhar:"⇌",rlm:"‏",rmoust:"⎱",rmoustache:"⎱",rnmid:"⫮",roang:"⟭",roarr:"⇾",robrk:"⟧",ropar:"⦆",ropf:"𝕣",roplus:"⨮",rotimes:"⨵",rpar:")",rpargt:"⦔",rppolint:"⨒",rrarr:"⇉",rsaquo:"›",rscr:"𝓇",rsh:"↱",rsqb:"]",rsquo:"’",rsquor:"’",rthree:"⋌",rtimes:"⋊",rtri:"▹",rtrie:"⊵",rtrif:"▸",rtriltri:"⧎",ruluhar:"⥨",rx:"℞",sacute:"ś",sbquo:"‚",sc:"≻",scE:"⪴",scap:"⪸",scaron:"š",sccue:"≽",sce:"⪰",scedil:"ş",scirc:"ŝ",scnE:"⪶",scnap:"⪺",scnsim:"⋩",scpolint:"⨓",scsim:"≿",scy:"с",sdot:"⋅",sdotb:"⊡",sdote:"⩦",seArr:"⇘",searhk:"⤥",searr:"↘",searrow:"↘",sect:"§",semi:";",seswar:"⤩",setminus:"∖",setmn:"∖",sext:"✶",sfr:"𝔰",sfrown:"⌢",sharp:"♯",shchcy:"щ",shcy:"ш",shortmid:"∣",shortparallel:"∥",shy:"­",sigma:"σ",sigmaf:"ς",sigmav:"ς",sim:"∼",simdot:"⩪",sime:"≃",simeq:"≃",simg:"⪞",simgE:"⪠",siml:"⪝",simlE:"⪟",simne:"≆",simplus:"⨤",simrarr:"⥲",slarr:"←",smallsetminus:"∖",smashp:"⨳",smeparsl:"⧤",smid:"∣",smile:"⌣",smt:"⪪",smte:"⪬",smtes:"⪬︀",softcy:"ь",sol:"/",solb:"⧄",solbar:"⌿",sopf:"𝕤",spades:"♠",spadesuit:"♠",spar:"∥",sqcap:"⊓",sqcaps:"⊓︀",sqcup:"⊔",sqcups:"⊔︀",sqsub:"⊏",sqsube:"⊑",sqsubset:"⊏",sqsubseteq:"⊑",sqsup:"⊐",sqsupe:"⊒",sqsupset:"⊐",sqsupseteq:"⊒",squ:"□",square:"□",squarf:"▪",squf:"▪",srarr:"→",sscr:"𝓈",ssetmn:"∖",ssmile:"⌣",sstarf:"⋆",star:"☆",starf:"★",straightepsilon:"ϵ",straightphi:"ϕ",strns:"¯",sub:"⊂",subE:"⫅",subdot:"⪽",sube:"⊆",subedot:"⫃",submult:"⫁",subnE:"⫋",subne:"⊊",subplus:"⪿",subrarr:"⥹",subset:"⊂",subseteq:"⊆",subseteqq:"⫅",subsetneq:"⊊",subsetneqq:"⫋",subsim:"⫇",subsub:"⫕",subsup:"⫓",succ:"≻",succapprox:"⪸",succcurlyeq:"≽",succeq:"⪰",succnapprox:"⪺",succneqq:"⪶",succnsim:"⋩",succsim:"≿",sum:"∑",sung:"♪",sup1:"¹",sup2:"²",sup3:"³",sup:"⊃",supE:"⫆",supdot:"⪾",supdsub:"⫘",supe:"⊇",supedot:"⫄",suphsol:"⟉",suphsub:"⫗",suplarr:"⥻",supmult:"⫂",supnE:"⫌",supne:"⊋",supplus:"⫀",supset:"⊃",supseteq:"⊇",supseteqq:"⫆",supsetneq:"⊋",supsetneqq:"⫌",supsim:"⫈",supsub:"⫔",supsup:"⫖",swArr:"⇙",swarhk:"⤦",swarr:"↙",swarrow:"↙",swnwar:"⤪",szlig:"ß",target:"⌖",tau:"τ",tbrk:"⎴",tcaron:"ť",tcedil:"ţ",tcy:"т",tdot:"⃛",telrec:"⌕",tfr:"𝔱",there4:"∴",therefore:"∴",theta:"θ",thetasym:"ϑ",thetav:"ϑ",thickapprox:"≈",thicksim:"∼",thinsp:" ",thkap:"≈",thksim:"∼",thorn:"þ",tilde:"˜",times:"×",timesb:"⊠",timesbar:"⨱",timesd:"⨰",tint:"∭",toea:"⤨",top:"⊤",topbot:"⌶",topcir:"⫱",topf:"𝕥",topfork:"⫚",tosa:"⤩",tprime:"‴",trade:"™",triangle:"▵",triangledown:"▿",triangleleft:"◃",trianglelefteq:"⊴",triangleq:"≜",triangleright:"▹",trianglerighteq:"⊵",tridot:"◬",trie:"≜",triminus:"⨺",triplus:"⨹",trisb:"⧍",tritime:"⨻",trpezium:"⏢",tscr:"𝓉",tscy:"ц",tshcy:"ћ",tstrok:"ŧ",twixt:"≬",twoheadleftarrow:"↞",twoheadrightarrow:"↠",uArr:"⇑",uHar:"⥣",uacute:"ú",uarr:"↑",ubrcy:"ў",ubreve:"ŭ",ucirc:"û",ucy:"у",udarr:"⇅",udblac:"ű",udhar:"⥮",ufisht:"⥾",ufr:"𝔲",ugrave:"ù",uharl:"↿",uharr:"↾",uhblk:"▀",ulcorn:"⌜",ulcorner:"⌜",ulcrop:"⌏",ultri:"◸",umacr:"ū",uml:"¨",uogon:"ų",uopf:"𝕦",uparrow:"↑",updownarrow:"↕",upharpoonleft:"↿",upharpoonright:"↾",uplus:"⊎",upsi:"υ",upsih:"ϒ",upsilon:"υ",upuparrows:"⇈",urcorn:"⌝",urcorner:"⌝",urcrop:"⌎",uring:"ů",urtri:"◹",uscr:"𝓊",utdot:"⋰",utilde:"ũ",utri:"▵",utrif:"▴",uuarr:"⇈",uuml:"ü",uwangle:"⦧",vArr:"⇕",vBar:"⫨",vBarv:"⫩",vDash:"⊨",vangrt:"⦜",varepsilon:"ϵ",varkappa:"ϰ",varnothing:"∅",varphi:"ϕ",varpi:"ϖ",varpropto:"∝",varr:"↕",varrho:"ϱ",varsigma:"ς",varsubsetneq:"⊊︀",varsubsetneqq:"⫋︀",varsupsetneq:"⊋︀",varsupsetneqq:"⫌︀",vartheta:"ϑ",vartriangleleft:"⊲",vartriangleright:"⊳",vcy:"в",vdash:"⊢",vee:"∨",veebar:"⊻",veeeq:"≚",vellip:"⋮",verbar:"|",vert:"|",vfr:"𝔳",vltri:"⊲",vnsub:"⊂⃒",vnsup:"⊃⃒",vopf:"𝕧",vprop:"∝",vrtri:"⊳",vscr:"𝓋",vsubnE:"⫋︀",vsubne:"⊊︀",vsupnE:"⫌︀",vsupne:"⊋︀",vzigzag:"⦚",wcirc:"ŵ",wedbar:"⩟",wedge:"∧",wedgeq:"≙",weierp:"℘",wfr:"𝔴",wopf:"𝕨",wp:"℘",wr:"≀",wreath:"≀",wscr:"𝓌",xcap:"⋂",xcirc:"◯",xcup:"⋃",xdtri:"▽",xfr:"𝔵",xhArr:"⟺",xharr:"⟷",xi:"ξ",xlArr:"⟸",xlarr:"⟵",xmap:"⟼",xnis:"⋻",xodot:"⨀",xopf:"𝕩",xoplus:"⨁",xotime:"⨂",xrArr:"⟹",xrarr:"⟶",xscr:"𝓍",xsqcup:"⨆",xuplus:"⨄",xutri:"△",xvee:"⋁",xwedge:"⋀",yacute:"ý",yacy:"я",ycirc:"ŷ",ycy:"ы",yen:"¥",yfr:"𝔶",yicy:"ї",yopf:"𝕪",yscr:"𝓎",yucy:"ю",yuml:"ÿ",zacute:"ź",zcaron:"ž",zcy:"з",zdot:"ż",zeetrf:"ℨ",zeta:"ζ",zfr:"𝔷",zhcy:"ж",zigrarr:"⇝",zopf:"𝕫",zscr:"𝓏",zwj:"‍",zwnj:"‌"},$a={}.hasOwnProperty;function Ga(e){return!!$a.call(za,e)&&za[e]}function qa(e,t,n,r){const o=e.length;let a,i=0;if(t=t<0?-t>o?0:o+t:t>o?o:t,n=n>0?n:0,r.length<1e4)a=Array.from(r),a.unshift(t,n),e.splice(...a);else for(n&&e.splice(t,n);i<r.length;)a=r.slice(i,i+1e4),a.unshift(t,0),e.splice(...a),i+=1e4,t+=1e4}function Ha(e,t){return e.length>0?(qa(e,e.length,0,t),e):t}const Va={}.hasOwnProperty;function Wa(e){const t={};let n=-1;for(;++n<e.length;)Ya(t,e[n]);return t}function Ya(e,t){let n;for(n in t){const r=(Va.call(e,n)?e[n]:void 0)||(e[n]={}),o=t[n];let a;if(o)for(a in o){Va.call(r,a)||(r[a]=[]);const e=o[a];Ka(r[a],Array.isArray(e)?e:e?[e]:[])}}}function Ka(e,t){let n=-1;const r=[];for(;++n<t.length;)("after"===t[n].add?e:r).push(t[n]);qa(e,0,0,r)}function Xa(e,t){const n=Number.parseInt(e,t);return n<9||11===n||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||!(65535&~n)||65534==(65535&n)||n>1114111?"�":String.fromCodePoint(n)}function Za(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Qa=ui(/[A-Za-z]/),Ja=ui(/[\dA-Za-z]/),ei=ui(/[#-'*+\--9=?A-Z^-~]/);function ti(e){return null!==e&&(e<32||127===e)}const ni=ui(/\d/),ri=ui(/[\dA-Fa-f]/),oi=ui(/[!-/:-@[-`{-~]/);function ai(e){return null!==e&&e<-2}function ii(e){return null!==e&&(e<0||32===e)}function si(e){return-2===e||-1===e||32===e}const li=ui(/\p{P}|\p{S}/u),ci=ui(/\s/);function ui(e){return function(t){return null!==t&&t>-1&&e.test(String.fromCharCode(t))}}function di(e){const t=[];let n=-1,r=0,o=0;for(;++n<e.length;){const a=e.charCodeAt(n);let i="";if(37===a&&Ja(e.charCodeAt(n+1))&&Ja(e.charCodeAt(n+2)))o=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(i=String.fromCharCode(a));else if(a>55295&&a<57344){const t=e.charCodeAt(n+1);a<56320&&t>56319&&t<57344?(i=String.fromCharCode(a,t),o=1):i="�"}else i=String.fromCharCode(a);i&&(t.push(e.slice(r,n),encodeURIComponent(i)),r=n+o+1,i=""),o&&(n+=o,o=0)}return t.join("")+e.slice(r)}function pi(e,t,n,r){const o=r?r-1:Number.POSITIVE_INFINITY;let a=0;return function(r){if(si(r))return e.enter(n),i(r);return t(r)};function i(r){return si(r)&&a++<o?(e.consume(r),i):(e.exit(n),t(r))}}const fi={tokenize:function(e){const t=e.attempt(this.parser.constructs.contentInitial,function(n){if(null===n)return void e.consume(n);return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),pi(e,t,"linePrefix")},function(t){return e.enter("paragraph"),r(t)});let n;return t;function r(t){const r=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=r),n=r,o(t)}function o(t){return null===t?(e.exit("chunkText"),e.exit("paragraph"),void e.consume(t)):ai(t)?(e.consume(t),e.exit("chunkText"),r):(e.consume(t),o)}}};const gi={tokenize:function(e){const t=this,n=[];let r,o,a,i=0;return s;function s(r){if(i<n.length){const o=n[i];return t.containerState=o[1],e.attempt(o[0].continuation,l,c)(r)}return c(r)}function l(e){if(i++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,r&&y();const n=t.events.length;let o,a=n;for(;a--;)if("exit"===t.events[a][0]&&"chunkFlow"===t.events[a][1].type){o=t.events[a][1].end;break}b(i);let s=n;for(;s<t.events.length;)t.events[s][1].end={...o},s++;return qa(t.events,a+1,0,t.events.slice(n)),t.events.length=s,c(e)}return s(e)}function c(o){if(i===n.length){if(!r)return p(o);if(r.currentConstruct&&r.currentConstruct.concrete)return g(o);t.interrupt=Boolean(r.currentConstruct&&!r._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(mi,u,d)(o)}function u(e){return r&&y(),b(i),p(e)}function d(e){return t.parser.lazy[t.now().line]=i!==n.length,a=t.now().offset,g(e)}function p(n){return t.containerState={},e.attempt(mi,f,g)(n)}function f(e){return i++,n.push([t.currentConstruct,t.containerState]),p(e)}function g(n){return null===n?(r&&y(),b(0),void e.consume(n)):(r=r||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:r,contentType:"flow",previous:o}),m(n))}function m(n){return null===n?(h(e.exit("chunkFlow"),!0),b(0),void e.consume(n)):ai(n)?(e.consume(n),h(e.exit("chunkFlow")),i=0,t.interrupt=void 0,s):(e.consume(n),m)}function h(e,n){const s=t.sliceStream(e);if(n&&s.push(null),e.previous=o,o&&(o.next=e),o=e,r.defineSkip(e.start),r.write(s),t.parser.lazy[e.start.line]){let e=r.events.length;for(;e--;)if(r.events[e][1].start.offset<a&&(!r.events[e][1].end||r.events[e][1].end.offset>a))return;const n=t.events.length;let o,s,l=n;for(;l--;)if("exit"===t.events[l][0]&&"chunkFlow"===t.events[l][1].type){if(o){s=t.events[l][1].end;break}o=!0}for(b(i),e=n;e<t.events.length;)t.events[e][1].end={...s},e++;qa(t.events,l+1,0,t.events.slice(n)),t.events.length=e}}function b(r){let o=n.length;for(;o-- >r;){const r=n[o];t.containerState=r[1],r[0].exit.call(t,e)}n.length=r}function y(){r.write([null]),o=void 0,r=void 0,t.containerState._closeFlow=void 0}}},mi={tokenize:function(e,t,n){return pi(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}};function hi(e){return null===e||ii(e)||ci(e)?1:li(e)?2:void 0}function bi(e,t,n){const r=[];let o=-1;for(;++o<e.length;){const a=e[o].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}const yi={name:"attention",resolveAll:function(e,t){let n,r,o,a,i,s,l,c,u=-1;for(;++u<e.length;)if("enter"===e[u][0]&&"attentionSequence"===e[u][1].type&&e[u][1]._close)for(n=u;n--;)if("exit"===e[n][0]&&"attentionSequence"===e[n][1].type&&e[n][1]._open&&t.sliceSerialize(e[n][1]).charCodeAt(0)===t.sliceSerialize(e[u][1]).charCodeAt(0)){if((e[n][1]._close||e[u][1]._open)&&(e[u][1].end.offset-e[u][1].start.offset)%3&&!((e[n][1].end.offset-e[n][1].start.offset+e[u][1].end.offset-e[u][1].start.offset)%3))continue;s=e[n][1].end.offset-e[n][1].start.offset>1&&e[u][1].end.offset-e[u][1].start.offset>1?2:1;const d={...e[n][1].end},p={...e[u][1].start};vi(d,-s),vi(p,s),a={type:s>1?"strongSequence":"emphasisSequence",start:d,end:{...e[n][1].end}},i={type:s>1?"strongSequence":"emphasisSequence",start:{...e[u][1].start},end:p},o={type:s>1?"strongText":"emphasisText",start:{...e[n][1].end},end:{...e[u][1].start}},r={type:s>1?"strong":"emphasis",start:{...a.start},end:{...i.end}},e[n][1].end={...a.start},e[u][1].start={...i.end},l=[],e[n][1].end.offset-e[n][1].start.offset&&(l=Ha(l,[["enter",e[n][1],t],["exit",e[n][1],t]])),l=Ha(l,[["enter",r,t],["enter",a,t],["exit",a,t],["enter",o,t]]),l=Ha(l,bi(t.parser.constructs.insideSpan.null,e.slice(n+1,u),t)),l=Ha(l,[["exit",o,t],["enter",i,t],["exit",i,t],["exit",r,t]]),e[u][1].end.offset-e[u][1].start.offset?(c=2,l=Ha(l,[["enter",e[u][1],t],["exit",e[u][1],t]])):c=0,qa(e,n-1,u-n+3,l),u=n+l.length-c-2;break}u=-1;for(;++u<e.length;)"attentionSequence"===e[u][1].type&&(e[u][1].type="data");return e},tokenize:function(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,o=hi(r);let a;return function(t){return a=t,e.enter("attentionSequence"),i(t)};function i(s){if(s===a)return e.consume(s),i;const l=e.exit("attentionSequence"),c=hi(s),u=!c||2===c&&o||n.includes(s),d=!o||2===o&&c||n.includes(r);return l._open=Boolean(42===a?u:u&&(o||!d)),l._close=Boolean(42===a?d:d&&(c||!u)),t(s)}}};function vi(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const wi={name:"autolink",tokenize:function(e,t,n){let r=0;return function(t){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(t),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),o};function o(t){return Qa(t)?(e.consume(t),a):64===t?n(t):l(t)}function a(e){return 43===e||45===e||46===e||Ja(e)?(r=1,i(e)):l(e)}function i(t){return 58===t?(e.consume(t),r=0,s):(43===t||45===t||46===t||Ja(t))&&r++<32?(e.consume(t),i):(r=0,l(t))}function s(r){return 62===r?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(r),e.exit("autolinkMarker"),e.exit("autolink"),t):null===r||32===r||60===r||ti(r)?n(r):(e.consume(r),s)}function l(t){return 64===t?(e.consume(t),c):ei(t)?(e.consume(t),l):n(t)}function c(e){return Ja(e)?u(e):n(e)}function u(n){return 46===n?(e.consume(n),r=0,c):62===n?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(n),e.exit("autolinkMarker"),e.exit("autolink"),t):d(n)}function d(t){if((45===t||Ja(t))&&r++<63){const n=45===t?d:u;return e.consume(t),n}return n(t)}}};const Si={partial:!0,tokenize:function(e,t,n){return function(t){return si(t)?pi(e,r,"linePrefix")(t):r(t)};function r(e){return null===e||ai(e)?t(e):n(e)}}};const xi={continuation:{tokenize:function(e,t,n){const r=this;return function(t){if(si(t))return pi(e,o,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t);return o(t)};function o(r){return e.attempt(xi,t,n)(r)}}},exit:function(e){e.exit("blockQuote")},name:"blockQuote",tokenize:function(e,t,n){const r=this;return function(t){if(62===t){const n=r.containerState;return n.open||(e.enter("blockQuote",{_container:!0}),n.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(t),e.exit("blockQuoteMarker"),o}return n(t)};function o(n){return si(n)?(e.enter("blockQuotePrefixWhitespace"),e.consume(n),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(n))}}};const Ei={name:"characterEscape",tokenize:function(e,t,n){return function(t){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(t),e.exit("escapeMarker"),r};function r(r){return oi(r)?(e.enter("characterEscapeValue"),e.consume(r),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(r)}}};const ki={name:"characterReference",tokenize:function(e,t,n){const r=this;let o,a,i=0;return function(t){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(t),e.exit("characterReferenceMarker"),s};function s(t){return 35===t?(e.enter("characterReferenceMarkerNumeric"),e.consume(t),e.exit("characterReferenceMarkerNumeric"),l):(e.enter("characterReferenceValue"),o=31,a=Ja,c(t))}function l(t){return 88===t||120===t?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(t),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),o=6,a=ri,c):(e.enter("characterReferenceValue"),o=7,a=ni,c(t))}function c(s){if(59===s&&i){const o=e.exit("characterReferenceValue");return a!==Ja||Ga(r.sliceSerialize(o))?(e.enter("characterReferenceMarker"),e.consume(s),e.exit("characterReferenceMarker"),e.exit("characterReference"),t):n(s)}return a(s)&&i++<o?(e.consume(s),c):n(s)}}};const Ai={partial:!0,tokenize:function(e,t,n){const r=this;return function(t){if(null===t)return n(t);return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),o};function o(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}},Ti={concrete:!0,name:"codeFenced",tokenize:function(e,t,n){const r=this,o={partial:!0,tokenize:function(e,t,n){let o=0;return i;function i(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),l}function l(t){return e.enter("codeFencedFence"),si(t)?pi(e,c,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):c(t)}function c(t){return t===a?(e.enter("codeFencedFenceSequence"),u(t)):n(t)}function u(t){return t===a?(o++,e.consume(t),u):o>=s?(e.exit("codeFencedFenceSequence"),si(t)?pi(e,d,"whitespace")(t):d(t)):n(t)}function d(r){return null===r||ai(r)?(e.exit("codeFencedFence"),t(r)):n(r)}}};let a,i=0,s=0;return function(t){return function(t){const n=r.events[r.events.length-1];return i=n&&"linePrefix"===n[1].type?n[2].sliceSerialize(n[1],!0).length:0,a=t,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),l(t)}(t)};function l(t){return t===a?(s++,e.consume(t),l):s<3?n(t):(e.exit("codeFencedFenceSequence"),si(t)?pi(e,c,"whitespace")(t):c(t))}function c(n){return null===n||ai(n)?(e.exit("codeFencedFence"),r.interrupt?t(n):e.check(Ai,f,y)(n)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),u(n))}function u(t){return null===t||ai(t)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),c(t)):si(t)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),pi(e,d,"whitespace")(t)):96===t&&t===a?n(t):(e.consume(t),u)}function d(t){return null===t||ai(t)?c(t):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),p(t))}function p(t){return null===t||ai(t)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),c(t)):96===t&&t===a?n(t):(e.consume(t),p)}function f(t){return e.attempt(o,y,g)(t)}function g(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),m}function m(t){return i>0&&si(t)?pi(e,h,"linePrefix",i+1)(t):h(t)}function h(t){return null===t||ai(t)?e.check(Ai,f,y)(t):(e.enter("codeFlowValue"),b(t))}function b(t){return null===t||ai(t)?(e.exit("codeFlowValue"),h(t)):(e.consume(t),b)}function y(n){return e.exit("codeFenced"),t(n)}}};const Oi={name:"codeIndented",tokenize:function(e,t,n){const r=this;return function(t){return e.enter("codeIndented"),pi(e,o,"linePrefix",5)(t)};function o(e){const t=r.events[r.events.length-1];return t&&"linePrefix"===t[1].type&&t[2].sliceSerialize(t[1],!0).length>=4?a(e):n(e)}function a(t){return null===t?s(t):ai(t)?e.attempt(Ci,a,s)(t):(e.enter("codeFlowValue"),i(t))}function i(t){return null===t||ai(t)?(e.exit("codeFlowValue"),a(t)):(e.consume(t),i)}function s(n){return e.exit("codeIndented"),t(n)}}},Ci={partial:!0,tokenize:function(e,t,n){const r=this;return o;function o(t){return r.parser.lazy[r.now().line]?n(t):ai(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),o):pi(e,a,"linePrefix",5)(t)}function a(e){const a=r.events[r.events.length-1];return a&&"linePrefix"===a[1].type&&a[2].sliceSerialize(a[1],!0).length>=4?t(e):ai(e)?o(e):n(e)}}};const Ii={name:"codeText",previous:function(e){return 96!==e||"characterEscape"===this.events[this.events.length-1][1].type},resolve:function(e){let t,n,r=e.length-4,o=3;if(!("lineEnding"!==e[o][1].type&&"space"!==e[o][1].type||"lineEnding"!==e[r][1].type&&"space"!==e[r][1].type))for(t=o;++t<r;)if("codeTextData"===e[t][1].type){e[o][1].type="codeTextPadding",e[r][1].type="codeTextPadding",o+=2,r-=2;break}t=o-1,r++;for(;++t<=r;)void 0===n?t!==r&&"lineEnding"!==e[t][1].type&&(n=t):t!==r&&"lineEnding"!==e[t][1].type||(e[n][1].type="codeTextData",t!==n+2&&(e[n][1].end=e[t-1][1].end,e.splice(n+2,t-n-2),r-=t-n-2,t=n+2),n=void 0);return e},tokenize:function(e,t,n){let r,o,a=0;return function(t){return e.enter("codeText"),e.enter("codeTextSequence"),i(t)};function i(t){return 96===t?(e.consume(t),a++,i):(e.exit("codeTextSequence"),s(t))}function s(t){return null===t?n(t):32===t?(e.enter("space"),e.consume(t),e.exit("space"),s):96===t?(o=e.enter("codeTextSequence"),r=0,c(t)):ai(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),s):(e.enter("codeTextData"),l(t))}function l(t){return null===t||32===t||96===t||ai(t)?(e.exit("codeTextData"),s(t)):(e.consume(t),l)}function c(n){return 96===n?(e.consume(n),r++,c):r===a?(e.exit("codeTextSequence"),e.exit("codeText"),t(n)):(o.type="codeTextData",l(n))}}};class Ni{constructor(e){this.left=e?[...e]:[],this.right=[]}get(e){if(e<0||e>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return e<this.left.length?this.left[e]:this.right[this.right.length-e+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(e,t){const n=null==t?Number.POSITIVE_INFINITY:t;return n<this.left.length?this.left.slice(e,n):e>this.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(e,t,n){const r=t||0;this.setCursor(Math.trunc(e));const o=this.right.splice(this.right.length-r,Number.POSITIVE_INFINITY);return n&&Ri(this.left,n),o.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(e){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(e)}pushMany(e){this.setCursor(Number.POSITIVE_INFINITY),Ri(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),Ri(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&0===this.right.length||e<0&&0===this.left.length))if(e<this.left.length){const t=this.left.splice(e,Number.POSITIVE_INFINITY);Ri(this.right,t.reverse())}else{const t=this.right.splice(this.left.length+this.right.length-e,Number.POSITIVE_INFINITY);Ri(this.left,t.reverse())}}}function Ri(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 _i(e){const t={};let n,r,o,a,i,s,l,c=-1;const u=new Ni(e);for(;++c<u.length;){for(;c in t;)c=t[c];if(n=u.get(c),c&&"chunkFlow"===n[1].type&&"listItemPrefix"===u.get(c-1)[1].type&&(s=n[1]._tokenizer.events,o=0,o<s.length&&"lineEndingBlank"===s[o][1].type&&(o+=2),o<s.length&&"content"===s[o][1].type))for(;++o<s.length&&"content"!==s[o][1].type;)"chunkText"===s[o][1].type&&(s[o][1]._isInFirstContentOfListItem=!0,o++);if("enter"===n[0])n[1].contentType&&(Object.assign(t,Pi(u,c)),c=t[c],l=!0);else if(n[1]._container){for(o=c,r=void 0;o--;)if(a=u.get(o),"lineEnding"===a[1].type||"lineEndingBlank"===a[1].type)"enter"===a[0]&&(r&&(u.get(r)[1].type="lineEndingBlank"),a[1].type="lineEnding",r=o);else if("linePrefix"!==a[1].type&&"listItemIndent"!==a[1].type)break;r&&(n[1].end={...u.get(r)[1].start},i=u.slice(r,c),i.unshift(n),u.splice(r,c-r+1,i))}}return qa(e,0,Number.POSITIVE_INFINITY,u.slice(0)),!l}function Pi(e,t){const n=e.get(t)[1],r=e.get(t)[2];let o=t-1;const a=[];let i=n._tokenizer;i||(i=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(i._contentTypeTextTrailing=!0));const s=i.events,l=[],c={};let u,d,p=-1,f=n,g=0,m=0;const h=[m];for(;f;){for(;e.get(++o)[1]!==f;);a.push(o),f._tokenizer||(u=r.sliceStream(f),f.next||u.push(null),d&&i.defineSkip(f.start),f._isInFirstContentOfListItem&&(i._gfmTasklistFirstContentOfListItem=!0),i.write(u),f._isInFirstContentOfListItem&&(i._gfmTasklistFirstContentOfListItem=void 0)),d=f,f=f.next}for(f=n;++p<s.length;)"exit"===s[p][0]&&"enter"===s[p-1][0]&&s[p][1].type===s[p-1][1].type&&s[p][1].start.line!==s[p][1].end.line&&(m=p+1,h.push(m),f._tokenizer=void 0,f.previous=void 0,f=f.next);for(i.events=[],f?(f._tokenizer=void 0,f.previous=void 0):h.pop(),p=h.length;p--;){const t=s.slice(h[p],h[p+1]),n=a.pop();l.push([n,n+t.length-1]),e.splice(n,2,t)}for(l.reverse(),p=-1;++p<l.length;)c[g+l[p][0]]=g+l[p][1],g+=l[p][1]-l[p][0]-1;return c}const Li={resolve:function(e){return _i(e),e},tokenize:function(e,t){let n;return function(t){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),r(t)};function r(t){return null===t?o(t):ai(t)?e.check(Di,a,o)(t):(e.consume(t),r)}function o(n){return e.exit("chunkContent"),e.exit("content"),t(n)}function a(t){return e.consume(t),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,r}}},Di={partial:!0,tokenize:function(e,t,n){const r=this;return function(t){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),pi(e,o,"linePrefix")};function o(o){if(null===o||ai(o))return n(o);const a=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&a&&"linePrefix"===a[1].type&&a[2].sliceSerialize(a[1],!0).length>=4?t(o):e.interrupt(r.parser.constructs.flow,n,t)(o)}}};function Mi(e,t,n,r,o,a,i,s,l){const c=l||Number.POSITIVE_INFINITY;let u=0;return function(t){if(60===t)return e.enter(r),e.enter(o),e.enter(a),e.consume(t),e.exit(a),d;if(null===t||32===t||41===t||ti(t))return n(t);return e.enter(r),e.enter(i),e.enter(s),e.enter("chunkString",{contentType:"string"}),g(t)};function d(n){return 62===n?(e.enter(a),e.consume(n),e.exit(a),e.exit(o),e.exit(r),t):(e.enter(s),e.enter("chunkString",{contentType:"string"}),p(n))}function p(t){return 62===t?(e.exit("chunkString"),e.exit(s),d(t)):null===t||60===t||ai(t)?n(t):(e.consume(t),92===t?f:p)}function f(t){return 60===t||62===t||92===t?(e.consume(t),p):p(t)}function g(o){return u||null!==o&&41!==o&&!ii(o)?u<c&&40===o?(e.consume(o),u++,g):41===o?(e.consume(o),u--,g):null===o||32===o||40===o||ti(o)?n(o):(e.consume(o),92===o?m:g):(e.exit("chunkString"),e.exit(s),e.exit(i),e.exit(r),t(o))}function m(t){return 40===t||41===t||92===t?(e.consume(t),g):g(t)}}function ji(e,t,n,r,o,a){const i=this;let s,l=0;return function(t){return e.enter(r),e.enter(o),e.consume(t),e.exit(o),e.enter(a),c};function c(d){return l>999||null===d||91===d||93===d&&!s||94===d&&!l&&"_hiddenFootnoteSupport"in i.parser.constructs?n(d):93===d?(e.exit(a),e.enter(o),e.consume(d),e.exit(o),e.exit(r),t):ai(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),c):(e.enter("chunkString",{contentType:"string"}),u(d))}function u(t){return null===t||91===t||93===t||ai(t)||l++>999?(e.exit("chunkString"),c(t)):(e.consume(t),s||(s=!si(t)),92===t?d:u)}function d(t){return 91===t||92===t||93===t?(e.consume(t),l++,u):u(t)}}function Fi(e,t,n,r,o,a){let i;return function(t){if(34===t||39===t||40===t)return e.enter(r),e.enter(o),e.consume(t),e.exit(o),i=40===t?41:t,s;return n(t)};function s(n){return n===i?(e.enter(o),e.consume(n),e.exit(o),e.exit(r),t):(e.enter(a),l(n))}function l(t){return t===i?(e.exit(a),s(i)):null===t?n(t):ai(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),pi(e,l,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),c(t))}function c(t){return t===i||null===t||ai(t)?(e.exit("chunkString"),l(t)):(e.consume(t),92===t?u:c)}function u(t){return t===i||92===t?(e.consume(t),c):c(t)}}function Bi(e,t){let n;return function r(o){if(ai(o))return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),n=!0,r;if(si(o))return pi(e,r,n?"linePrefix":"lineSuffix")(o);return t(o)}}const Ui={name:"definition",tokenize:function(e,t,n){const r=this;let o;return function(t){return e.enter("definition"),function(t){return ji.call(r,e,a,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(t)}(t)};function a(t){return o=Za(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),58===t?(e.enter("definitionMarker"),e.consume(t),e.exit("definitionMarker"),i):n(t)}function i(t){return ii(t)?Bi(e,s)(t):s(t)}function s(t){return Mi(e,l,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(t)}function l(t){return e.attempt(zi,c,c)(t)}function c(t){return si(t)?pi(e,u,"whitespace")(t):u(t)}function u(a){return null===a||ai(a)?(e.exit("definition"),r.parser.defined.push(o),t(a)):n(a)}}},zi={partial:!0,tokenize:function(e,t,n){return function(t){return ii(t)?Bi(e,r)(t):n(t)};function r(t){return Fi(e,o,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(t)}function o(t){return si(t)?pi(e,a,"whitespace")(t):a(t)}function a(e){return null===e||ai(e)?t(e):n(e)}}};const $i={name:"hardBreakEscape",tokenize:function(e,t,n){return function(t){return e.enter("hardBreakEscape"),e.consume(t),r};function r(r){return ai(r)?(e.exit("hardBreakEscape"),t(r)):n(r)}}};const Gi={name:"headingAtx",resolve:function(e,t){let n,r,o=e.length-2,a=3;"whitespace"===e[a][1].type&&(a+=2);o-2>a&&"whitespace"===e[o][1].type&&(o-=2);"atxHeadingSequence"===e[o][1].type&&(a===o-1||o-4>a&&"whitespace"===e[o-2][1].type)&&(o-=a+1===o?2:4);o>a&&(n={type:"atxHeadingText",start:e[a][1].start,end:e[o][1].end},r={type:"chunkText",start:e[a][1].start,end:e[o][1].end,contentType:"text"},qa(e,a,o-a+1,[["enter",n,t],["enter",r,t],["exit",r,t],["exit",n,t]]));return e},tokenize:function(e,t,n){let r=0;return function(t){return e.enter("atxHeading"),function(t){return e.enter("atxHeadingSequence"),o(t)}(t)};function o(t){return 35===t&&r++<6?(e.consume(t),o):null===t||ii(t)?(e.exit("atxHeadingSequence"),a(t)):n(t)}function a(n){return 35===n?(e.enter("atxHeadingSequence"),i(n)):null===n||ai(n)?(e.exit("atxHeading"),t(n)):si(n)?pi(e,a,"whitespace")(n):(e.enter("atxHeadingText"),s(n))}function i(t){return 35===t?(e.consume(t),i):(e.exit("atxHeadingSequence"),a(t))}function s(t){return null===t||35===t||ii(t)?(e.exit("atxHeadingText"),a(t)):(e.consume(t),s)}}};const qi=["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"],Hi=["pre","script","style","textarea"],Vi={concrete:!0,name:"htmlFlow",resolveTo:function(e){let t=e.length;for(;t--&&("enter"!==e[t][0]||"htmlFlow"!==e[t][1].type););t>1&&"linePrefix"===e[t-2][1].type&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2));return e},tokenize:function(e,t,n){const r=this;let o,a,i,s,l;return function(t){return function(t){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(t),c}(t)};function c(s){return 33===s?(e.consume(s),u):47===s?(e.consume(s),a=!0,f):63===s?(e.consume(s),o=3,r.interrupt?t:L):Qa(s)?(e.consume(s),i=String.fromCharCode(s),g):n(s)}function u(a){return 45===a?(e.consume(a),o=2,d):91===a?(e.consume(a),o=5,s=0,p):Qa(a)?(e.consume(a),o=4,r.interrupt?t:L):n(a)}function d(o){return 45===o?(e.consume(o),r.interrupt?t:L):n(o)}function p(o){const a="CDATA[";return o===a.charCodeAt(s++)?(e.consume(o),6===s?r.interrupt?t:T:p):n(o)}function f(t){return Qa(t)?(e.consume(t),i=String.fromCharCode(t),g):n(t)}function g(s){if(null===s||47===s||62===s||ii(s)){const l=47===s,c=i.toLowerCase();return l||a||!Hi.includes(c)?qi.includes(i.toLowerCase())?(o=6,l?(e.consume(s),m):r.interrupt?t(s):T(s)):(o=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(s):a?h(s):b(s)):(o=1,r.interrupt?t(s):T(s))}return 45===s||Ja(s)?(e.consume(s),i+=String.fromCharCode(s),g):n(s)}function m(o){return 62===o?(e.consume(o),r.interrupt?t:T):n(o)}function h(t){return si(t)?(e.consume(t),h):k(t)}function b(t){return 47===t?(e.consume(t),k):58===t||95===t||Qa(t)?(e.consume(t),y):si(t)?(e.consume(t),b):k(t)}function y(t){return 45===t||46===t||58===t||95===t||Ja(t)?(e.consume(t),y):v(t)}function v(t){return 61===t?(e.consume(t),w):si(t)?(e.consume(t),v):b(t)}function w(t){return null===t||60===t||61===t||62===t||96===t?n(t):34===t||39===t?(e.consume(t),l=t,S):si(t)?(e.consume(t),w):x(t)}function S(t){return t===l?(e.consume(t),l=null,E):null===t||ai(t)?n(t):(e.consume(t),S)}function x(t){return null===t||34===t||39===t||47===t||60===t||61===t||62===t||96===t||ii(t)?v(t):(e.consume(t),x)}function E(e){return 47===e||62===e||si(e)?b(e):n(e)}function k(t){return 62===t?(e.consume(t),A):n(t)}function A(t){return null===t||ai(t)?T(t):si(t)?(e.consume(t),A):n(t)}function T(t){return 45===t&&2===o?(e.consume(t),N):60===t&&1===o?(e.consume(t),R):62===t&&4===o?(e.consume(t),D):63===t&&3===o?(e.consume(t),L):93===t&&5===o?(e.consume(t),P):!ai(t)||6!==o&&7!==o?null===t||ai(t)?(e.exit("htmlFlowData"),O(t)):(e.consume(t),T):(e.exit("htmlFlowData"),e.check(Wi,M,O)(t))}function O(t){return e.check(Yi,C,M)(t)}function C(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),I}function I(t){return null===t||ai(t)?O(t):(e.enter("htmlFlowData"),T(t))}function N(t){return 45===t?(e.consume(t),L):T(t)}function R(t){return 47===t?(e.consume(t),i="",_):T(t)}function _(t){if(62===t){const n=i.toLowerCase();return Hi.includes(n)?(e.consume(t),D):T(t)}return Qa(t)&&i.length<8?(e.consume(t),i+=String.fromCharCode(t),_):T(t)}function P(t){return 93===t?(e.consume(t),L):T(t)}function L(t){return 62===t?(e.consume(t),D):45===t&&2===o?(e.consume(t),L):T(t)}function D(t){return null===t||ai(t)?(e.exit("htmlFlowData"),M(t)):(e.consume(t),D)}function M(n){return e.exit("htmlFlow"),t(n)}}},Wi={partial:!0,tokenize:function(e,t,n){return function(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),e.attempt(Si,t,n)}}},Yi={partial:!0,tokenize:function(e,t,n){const r=this;return function(t){if(ai(t))return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),o;return n(t)};function o(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}};const Ki={name:"htmlText",tokenize:function(e,t,n){const r=this;let o,a,i;return function(t){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(t),s};function s(t){return 33===t?(e.consume(t),l):47===t?(e.consume(t),w):63===t?(e.consume(t),y):Qa(t)?(e.consume(t),E):n(t)}function l(t){return 45===t?(e.consume(t),c):91===t?(e.consume(t),a=0,f):Qa(t)?(e.consume(t),b):n(t)}function c(t){return 45===t?(e.consume(t),p):n(t)}function u(t){return null===t?n(t):45===t?(e.consume(t),d):ai(t)?(i=u,_(t)):(e.consume(t),u)}function d(t){return 45===t?(e.consume(t),p):u(t)}function p(e){return 62===e?R(e):45===e?d(e):u(e)}function f(t){const r="CDATA[";return t===r.charCodeAt(a++)?(e.consume(t),6===a?g:f):n(t)}function g(t){return null===t?n(t):93===t?(e.consume(t),m):ai(t)?(i=g,_(t)):(e.consume(t),g)}function m(t){return 93===t?(e.consume(t),h):g(t)}function h(t){return 62===t?R(t):93===t?(e.consume(t),h):g(t)}function b(t){return null===t||62===t?R(t):ai(t)?(i=b,_(t)):(e.consume(t),b)}function y(t){return null===t?n(t):63===t?(e.consume(t),v):ai(t)?(i=y,_(t)):(e.consume(t),y)}function v(e){return 62===e?R(e):y(e)}function w(t){return Qa(t)?(e.consume(t),S):n(t)}function S(t){return 45===t||Ja(t)?(e.consume(t),S):x(t)}function x(t){return ai(t)?(i=x,_(t)):si(t)?(e.consume(t),x):R(t)}function E(t){return 45===t||Ja(t)?(e.consume(t),E):47===t||62===t||ii(t)?k(t):n(t)}function k(t){return 47===t?(e.consume(t),R):58===t||95===t||Qa(t)?(e.consume(t),A):ai(t)?(i=k,_(t)):si(t)?(e.consume(t),k):R(t)}function A(t){return 45===t||46===t||58===t||95===t||Ja(t)?(e.consume(t),A):T(t)}function T(t){return 61===t?(e.consume(t),O):ai(t)?(i=T,_(t)):si(t)?(e.consume(t),T):k(t)}function O(t){return null===t||60===t||61===t||62===t||96===t?n(t):34===t||39===t?(e.consume(t),o=t,C):ai(t)?(i=O,_(t)):si(t)?(e.consume(t),O):(e.consume(t),I)}function C(t){return t===o?(e.consume(t),o=void 0,N):null===t?n(t):ai(t)?(i=C,_(t)):(e.consume(t),C)}function I(t){return null===t||34===t||39===t||60===t||61===t||96===t?n(t):47===t||62===t||ii(t)?k(t):(e.consume(t),I)}function N(e){return 47===e||62===e||ii(e)?k(e):n(e)}function R(r){return 62===r?(e.consume(r),e.exit("htmlTextData"),e.exit("htmlText"),t):n(r)}function _(t){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),P}function P(t){return si(t)?pi(e,L,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):L(t)}function L(t){return e.enter("htmlTextData"),i(t)}}};const Xi={name:"labelEnd",resolveAll:function(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),"labelImage"===r.type||"labelLink"===r.type||"labelEnd"===r.type){const e="labelImage"===r.type?4:2;r.type="data",t+=e}}e.length!==n.length&&qa(e,0,e.length,n);return e},resolveTo:function(e,t){let n,r,o,a,i=e.length,s=0;for(;i--;)if(n=e[i][1],r){if("link"===n.type||"labelLink"===n.type&&n._inactive)break;"enter"===e[i][0]&&"labelLink"===n.type&&(n._inactive=!0)}else if(o){if("enter"===e[i][0]&&("labelImage"===n.type||"labelLink"===n.type)&&!n._balanced&&(r=i,"labelLink"!==n.type)){s=2;break}}else"labelEnd"===n.type&&(o=i);const l={type:"labelLink"===e[r][1].type?"link":"image",start:{...e[r][1].start},end:{...e[e.length-1][1].end}},c={type:"label",start:{...e[r][1].start},end:{...e[o][1].end}},u={type:"labelText",start:{...e[r+s+2][1].end},end:{...e[o-2][1].start}};return a=[["enter",l,t],["enter",c,t]],a=Ha(a,e.slice(r+1,r+s+3)),a=Ha(a,[["enter",u,t]]),a=Ha(a,bi(t.parser.constructs.insideSpan.null,e.slice(r+s+4,o-3),t)),a=Ha(a,[["exit",u,t],e[o-2],e[o-1],["exit",c,t]]),a=Ha(a,e.slice(o+1)),a=Ha(a,[["exit",l,t]]),qa(e,r,e.length,a),e},tokenize:function(e,t,n){const r=this;let o,a,i=r.events.length;for(;i--;)if(("labelImage"===r.events[i][1].type||"labelLink"===r.events[i][1].type)&&!r.events[i][1]._balanced){o=r.events[i][1];break}return function(t){if(!o)return n(t);if(o._inactive)return u(t);return a=r.parser.defined.includes(Za(r.sliceSerialize({start:o.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelEnd"),s};function s(t){return 40===t?e.attempt(Zi,c,a?c:u)(t):91===t?e.attempt(Qi,c,a?l:u)(t):a?c(t):u(t)}function l(t){return e.attempt(Ji,c,u)(t)}function c(e){return t(e)}function u(e){return o._balanced=!0,n(e)}}},Zi={tokenize:function(e,t,n){return function(t){return e.enter("resource"),e.enter("resourceMarker"),e.consume(t),e.exit("resourceMarker"),r};function r(t){return ii(t)?Bi(e,o)(t):o(t)}function o(t){return 41===t?c(t):Mi(e,a,i,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(t)}function a(t){return ii(t)?Bi(e,s)(t):c(t)}function i(e){return n(e)}function s(t){return 34===t||39===t||40===t?Fi(e,l,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(t):c(t)}function l(t){return ii(t)?Bi(e,c)(t):c(t)}function c(r){return 41===r?(e.enter("resourceMarker"),e.consume(r),e.exit("resourceMarker"),e.exit("resource"),t):n(r)}}},Qi={tokenize:function(e,t,n){const r=this;return function(t){return ji.call(r,e,o,a,"reference","referenceMarker","referenceString")(t)};function o(e){return r.parser.defined.includes(Za(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(e):n(e)}function a(e){return n(e)}}},Ji={tokenize:function(e,t,n){return function(t){return e.enter("reference"),e.enter("referenceMarker"),e.consume(t),e.exit("referenceMarker"),r};function r(r){return 93===r?(e.enter("referenceMarker"),e.consume(r),e.exit("referenceMarker"),e.exit("reference"),t):n(r)}}};const es={name:"labelStartImage",resolveAll:Xi.resolveAll,tokenize:function(e,t,n){const r=this;return function(t){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(t),e.exit("labelImageMarker"),o};function o(t){return 91===t?(e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelImage"),a):n(t)}function a(e){return 94===e&&"_hiddenFootnoteSupport"in r.parser.constructs?n(e):t(e)}}};const ts={name:"labelStartLink",resolveAll:Xi.resolveAll,tokenize:function(e,t,n){const r=this;return function(t){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelLink"),o};function o(e){return 94===e&&"_hiddenFootnoteSupport"in r.parser.constructs?n(e):t(e)}}};const ns={name:"lineEnding",tokenize:function(e,t){return function(n){return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),pi(e,t,"linePrefix")}}};const rs={name:"thematicBreak",tokenize:function(e,t,n){let r,o=0;return function(t){return e.enter("thematicBreak"),function(e){return r=e,a(e)}(t)};function a(a){return a===r?(e.enter("thematicBreakSequence"),i(a)):o>=3&&(null===a||ai(a))?(e.exit("thematicBreak"),t(a)):n(a)}function i(t){return t===r?(e.consume(t),o++,i):(e.exit("thematicBreakSequence"),si(t)?pi(e,a,"whitespace")(t):a(t))}}};const os={continuation:{tokenize:function(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(Si,o,a);function o(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,pi(e,t,"listItemIndent",r.containerState.size+1)(n)}function a(n){return r.containerState.furtherBlankLines||!si(n)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,i(n)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(is,t,i)(n))}function i(o){return r.containerState._closeFlow=!0,r.interrupt=void 0,pi(e,e.attempt(os,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o)}}},exit:function(e){e.exit(this.containerState.type)},name:"list",tokenize:function(e,t,n){const r=this,o=r.events[r.events.length-1];let a=o&&"linePrefix"===o[1].type?o[2].sliceSerialize(o[1],!0).length:0,i=0;return function(t){const o=r.containerState.type||(42===t||43===t||45===t?"listUnordered":"listOrdered");if("listUnordered"===o?!r.containerState.marker||t===r.containerState.marker:ni(t)){if(r.containerState.type||(r.containerState.type=o,e.enter(o,{_container:!0})),"listUnordered"===o)return e.enter("listItemPrefix"),42===t||45===t?e.check(rs,n,l)(t):l(t);if(!r.interrupt||49===t)return e.enter("listItemPrefix"),e.enter("listItemValue"),s(t)}return n(t)};function s(t){return ni(t)&&++i<10?(e.consume(t),s):(!r.interrupt||i<2)&&(r.containerState.marker?t===r.containerState.marker:41===t||46===t)?(e.exit("listItemValue"),l(t)):n(t)}function l(t){return e.enter("listItemMarker"),e.consume(t),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||t,e.check(Si,r.interrupt?n:c,e.attempt(as,d,u))}function c(e){return r.containerState.initialBlankLine=!0,a++,d(e)}function u(t){return si(t)?(e.enter("listItemPrefixWhitespace"),e.consume(t),e.exit("listItemPrefixWhitespace"),d):n(t)}function d(n){return r.containerState.size=a+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(n)}}},as={partial:!0,tokenize:function(e,t,n){const r=this;return pi(e,function(e){const o=r.events[r.events.length-1];return!si(e)&&o&&"listItemPrefixWhitespace"===o[1].type?t(e):n(e)},"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5)}},is={partial:!0,tokenize:function(e,t,n){const r=this;return pi(e,function(e){const o=r.events[r.events.length-1];return o&&"listItemIndent"===o[1].type&&o[2].sliceSerialize(o[1],!0).length===r.containerState.size?t(e):n(e)},"listItemIndent",r.containerState.size+1)}};const ss={name:"setextUnderline",resolveTo:function(e,t){let n,r,o,a=e.length;for(;a--;)if("enter"===e[a][0]){if("content"===e[a][1].type){n=a;break}"paragraph"===e[a][1].type&&(r=a)}else"content"===e[a][1].type&&e.splice(a,1),o||"definition"!==e[a][1].type||(o=a);const i={type:"setextHeading",start:{...e[n][1].start},end:{...e[e.length-1][1].end}};e[r][1].type="setextHeadingText",o?(e.splice(r,0,["enter",i,t]),e.splice(o+1,0,["exit",e[n][1],t]),e[n][1].end={...e[o][1].end}):e[n][1]=i;return e.push(["exit",i,t]),e},tokenize:function(e,t,n){const r=this;let o;return function(t){let i,s=r.events.length;for(;s--;)if("lineEnding"!==r.events[s][1].type&&"linePrefix"!==r.events[s][1].type&&"content"!==r.events[s][1].type){i="paragraph"===r.events[s][1].type;break}if(!r.parser.lazy[r.now().line]&&(r.interrupt||i))return e.enter("setextHeadingLine"),o=t,function(t){return e.enter("setextHeadingLineSequence"),a(t)}(t);return n(t)};function a(t){return t===o?(e.consume(t),a):(e.exit("setextHeadingLineSequence"),si(t)?pi(e,i,"lineSuffix")(t):i(t))}function i(r){return null===r||ai(r)?(e.exit("setextHeadingLine"),t(r)):n(r)}}};const ls={tokenize:function(e){const t=this,n=e.attempt(Si,function(r){if(null===r)return void e.consume(r);return e.enter("lineEndingBlank"),e.consume(r),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n},e.attempt(this.parser.constructs.flowInitial,r,pi(e,e.attempt(this.parser.constructs.flow,r,e.attempt(Li,r)),"linePrefix")));return n;function r(r){if(null!==r)return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),t.currentConstruct=void 0,n;e.consume(r)}}};const cs={resolveAll:fs()},us=ps("string"),ds=ps("text");function ps(e){return{resolveAll:fs("text"===e?gs:void 0),tokenize:function(t){const n=this,r=this.parser.constructs[e],o=t.attempt(r,a,i);return a;function a(e){return l(e)?o(e):i(e)}function i(e){if(null!==e)return t.enter("data"),t.consume(e),s;t.consume(e)}function s(e){return l(e)?(t.exit("data"),o(e)):(t.consume(e),s)}function l(e){if(null===e)return!0;const t=r[e];let o=-1;if(t)for(;++o<t.length;){const e=t[o];if(!e.previous||e.previous.call(n,n.previous))return!0}return!1}}}}function fs(e){return function(t,n){let r,o=-1;for(;++o<=t.length;)void 0===r?t[o]&&"data"===t[o][1].type&&(r=o,o++):t[o]&&"data"===t[o][1].type||(o!==r+2&&(t[r][1].end=t[o-1][1].end,t.splice(r+2,o-r-2),o=r+2),r=void 0);return e?e(t,n):t}}function gs(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||"lineEnding"===e[n][1].type)&&"data"===e[n-1][1].type){const r=e[n-1][1],o=t.sliceStream(r);let a,i=o.length,s=-1,l=0;for(;i--;){const e=o[i];if("string"==typeof e){for(s=e.length;32===e.charCodeAt(s-1);)l++,s--;if(s)break;s=-1}else if(-2===e)a=!0,l++;else if(-1!==e){i++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(l=0),l){const o={type:n===e.length||a||l<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:i?s:r.start._bufferIndex+s,_index:r.start._index+i,line:r.end.line,column:r.end.column-l,offset:r.end.offset-l},end:{...r.end}};r.end={...o.start},r.start.offset===r.end.offset?Object.assign(r,o):(e.splice(n,0,["enter",o,t],["exit",o,t]),n+=2)}n++}return e}const ms={42:os,43:os,45:os,48:os,49:os,50:os,51:os,52:os,53:os,54:os,55:os,56:os,57:os,62:xi},hs={91:Ui},bs={[-2]:Oi,[-1]:Oi,32:Oi},ys={35:Gi,42:rs,45:[ss,rs],60:Vi,61:ss,95:rs,96:Ti,126:Ti},vs={38:ki,92:Ei},ws={[-5]:ns,[-4]:ns,[-3]:ns,33:es,38:ki,42:yi,60:[wi,Ki],91:ts,92:[$i,Ei],93:Xi,95:yi,96:Ii},Ss={null:[yi,cs]};var xs=Object.freeze({__proto__:null,attentionMarkers:{null:[42,95]},contentInitial:hs,disable:{null:[]},document:ms,flow:ys,flowInitial:bs,insideSpan:Ss,string:vs,text:ws});function Es(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 o={},a=[];let i=[],s=[];const l={attempt:h(function(e,t){b(e,t.from)}),check:h(m),consume:function(e){ai(e)?(r.line++,r.column=1,r.offset+=-3===e?2:1,y()):-1!==e&&(r.column++,r.offset++);r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===i[r._index].length&&(r._bufferIndex=-1,r._index++));c.previous=e},enter:function(e,t){const n=t||{};return n.type=e,n.start=p(),c.events.push(["enter",n,c]),s.push(n),n},exit:function(e){const t=s.pop();return t.end=p(),c.events.push(["exit",t,c]),t},interrupt:h(m,{interrupt:!0})},c={code:null,containerState:{},defineSkip:function(e){o[e.line]=e.column,y()},events:[],now:p,parser:e,previous:null,sliceSerialize:function(e,t){return function(e,t){let n=-1;const r=[];let o;for(;++n<e.length;){const a=e[n];let i;if("string"==typeof a)i=a;else switch(a){case-5:i="\r";break;case-4:i="\n";break;case-3:i="\r\n";break;case-2:i=t?" ":"\t";break;case-1:if(!t&&o)continue;i=" ";break;default:i=String.fromCharCode(a)}o=-2===a,r.push(i)}return r.join("")}(d(e),t)},sliceStream:d,write:function(e){if(i=Ha(i,e),f(),null!==i[i.length-1])return[];return b(t,0),c.events=bi(a,c.events,c),c.events}};let u=t.tokenize.call(c,l);return t.resolveAll&&a.push(t),c;function d(e){return function(e,t){const n=t.start._index,r=t.start._bufferIndex,o=t.end._index,a=t.end._bufferIndex;let i;if(n===o)i=[e[n].slice(r,a)];else{if(i=e.slice(n,o),r>-1){const e=i[0];"string"==typeof e?i[0]=e.slice(r):i.shift()}a>0&&i.push(e[o].slice(0,a))}return i}(i,e)}function p(){const{_bufferIndex:e,_index:t,line:n,column:o,offset:a}=r;return{_bufferIndex:e,_index:t,line:n,column:o,offset:a}}function f(){let e;for(;r._index<i.length;){const t=i[r._index];if("string"==typeof t)for(e=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===e&&r._bufferIndex<t.length;)g(t.charCodeAt(r._bufferIndex));else g(t)}}function g(e){u=u(e)}function m(e,t){t.restore()}function h(e,t){return function(n,o,a){let i,u,d,f;return Array.isArray(n)?g(n):"tokenize"in n?g([n]):function(e){return t;function t(t){const n=null!==t&&e[t],r=null!==t&&e.null;return g([...Array.isArray(n)?n:n?[n]:[],...Array.isArray(r)?r:r?[r]:[]])(t)}}(n);function g(e){return i=e,u=0,0===e.length?a:m(e[u])}function m(e){return function(n){f=function(){const e=p(),t=c.previous,n=c.currentConstruct,o=c.events.length,a=Array.from(s);return{from:o,restore:i};function i(){r=e,c.previous=t,c.currentConstruct=n,c.events.length=o,s=a,y()}}(),d=e,e.partial||(c.currentConstruct=e);if(e.name&&c.parser.constructs.disable.null.includes(e.name))return b();return e.tokenize.call(t?Object.assign(Object.create(c),t):c,l,h,b)(n)}}function h(t){return e(d,f),o}function b(e){return f.restore(),++u<i.length?m(i[u]):a}}}function b(e,t){e.resolveAll&&!a.includes(e)&&a.push(e),e.resolve&&qa(c.events,t,c.events.length-t,e.resolve(c.events.slice(t),c)),e.resolveTo&&(c.events=e.resolveTo(c.events,c))}function y(){r.line in o&&r.column<2&&(r.column=o[r.line],r.offset+=o[r.line]-1)}}const ks=/[\0\t\n\r]/g;const As=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Ts(e,t,n){if(t)return t;if(35===n.charCodeAt(0)){const e=n.charCodeAt(1),t=120===e||88===e;return Xa(n.slice(t?2:1),t?16:10)}return Ga(n)||e}const Os={}.hasOwnProperty;function Cs(e,t,n){return t&&"object"==typeof t&&(n=t,t=void 0),function(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:a(te),autolinkProtocol:A,autolinkEmail:A,atxHeading:a(Z),blockQuote:a(V),characterEscape:A,characterReference:A,codeFenced:a(W),codeFencedFenceInfo:i,codeFencedFenceMeta:i,codeIndented:a(W,i),codeText:a(Y,i),codeTextData:A,data:A,codeFlowValue:A,definition:a(K),definitionDestinationString:i,definitionLabelString:i,definitionTitleString:i,emphasis:a(X),hardBreakEscape:a(Q),hardBreakTrailing:a(Q),htmlFlow:a(J,i),htmlFlowData:A,htmlText:a(J,i),htmlTextData:A,image:a(ee),label:i,link:a(te),listItem:a(re),listItemValue:p,listOrdered:a(ne,d),listUnordered:a(ne),paragraph:a(oe),reference:B,referenceString:i,resourceDestinationString:i,resourceTitleString:i,setextHeading:a(Z),strong:a(ae),thematicBreak:a(se)},exit:{atxHeading:l(),atxHeadingSequence:S,autolink:l(),autolinkEmail:H,autolinkProtocol:q,blockQuote:l(),characterEscapeValue:T,characterReferenceMarkerHexadecimal:z,characterReferenceMarkerNumeric:z,characterReferenceValue:$,characterReference:G,codeFenced:l(h),codeFencedFence:m,codeFencedFenceInfo:f,codeFencedFenceMeta:g,codeFlowValue:T,codeIndented:l(b),codeText:l(R),codeTextData:T,data:T,definition:l(),definitionDestinationString:w,definitionLabelString:y,definitionTitleString:v,emphasis:l(),hardBreakEscape:l(C),hardBreakTrailing:l(C),htmlFlow:l(I),htmlFlowData:T,htmlText:l(N),htmlTextData:T,image:l(P),label:D,labelText:L,lineEnding:O,link:l(_),listItem:l(),listOrdered:l(),listUnordered:l(),paragraph:l(),referenceString:U,resourceDestinationString:M,resourceTitleString:j,resource:F,setextHeading:l(k),setextHeadingLineSequence:E,setextHeadingText:x,strong:l(),thematicBreak:l()}};Ns(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(e){let r={type:"root",children:[]};const a={stack:[r],tokenStack:[],config:t,enter:s,exit:c,buffer:i,resume:u,data:n},l=[];let d=-1;for(;++d<e.length;)if("listOrdered"===e[d][1].type||"listUnordered"===e[d][1].type)if("enter"===e[d][0])l.push(d);else{d=o(e,l.pop(),d)}for(d=-1;++d<e.length;){const n=t[e[d][0]];Os.call(n,e[d][1].type)&&n[e[d][1].type].call(Object.assign({sliceSerialize:e[d][2].sliceSerialize},a),e[d][1])}if(a.tokenStack.length>0){const e=a.tokenStack[a.tokenStack.length-1];(e[1]||_s).call(a,void 0,e[0])}for(r.position={start:Is(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:Is(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},d=-1;++d<t.transforms.length;)r=t.transforms[d](r)||r;return r}function o(e,t,n){let r,o,a,i,s=t-1,l=-1,c=!1;for(;++s<=n;){const t=e[s];switch(t[1].type){case"listUnordered":case"listOrdered":case"blockQuote":"enter"===t[0]?l++:l--,i=void 0;break;case"lineEndingBlank":"enter"===t[0]&&(!r||i||l||a||(a=s),i=void 0);break;case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:i=void 0}if(!l&&"enter"===t[0]&&"listItemPrefix"===t[1].type||-1===l&&"exit"===t[0]&&("listUnordered"===t[1].type||"listOrdered"===t[1].type)){if(r){let i=s;for(o=void 0;i--;){const t=e[i];if("lineEnding"===t[1].type||"lineEndingBlank"===t[1].type){if("exit"===t[0])continue;o&&(e[o][1].type="lineEndingBlank",c=!0),t[1].type="lineEnding",o=i}else if("linePrefix"!==t[1].type&&"blockQuotePrefix"!==t[1].type&&"blockQuotePrefixWhitespace"!==t[1].type&&"blockQuoteMarker"!==t[1].type&&"listItemIndent"!==t[1].type)break}a&&(!o||a<o)&&(r._spread=!0),r.end=Object.assign({},o?e[o][1].start:t[1].end),e.splice(o||s,0,["exit",r,t[2]]),s++,n++}if("listItemPrefix"===t[1].type){const o={type:"listItem",_spread:!1,start:Object.assign({},t[1].start),end:void 0};r=o,e.splice(s,0,["enter",o,t[2]]),s++,n++,a=void 0,i=!0}}}return e[t][1]._spread=c,n}function a(e,t){return n;function n(n){s.call(this,e(n),n),t&&t.call(this,n)}}function i(){this.stack.push({type:"fragment",children:[]})}function s(e,t,n){this.stack[this.stack.length-1].children.push(e),this.stack.push(e),this.tokenStack.push([t,n||void 0]),e.position={start:Is(t.start),end:void 0}}function l(e){return t;function t(t){e&&e.call(this,t),c.call(this,t)}}function c(e,t){const n=this.stack.pop(),r=this.tokenStack.pop();if(!r)throw new Error("Cannot close `"+e.type+"` ("+ma({start:e.start,end:e.end})+"): it’s not open");if(r[0].type!==e.type)if(t)t.call(this,e,r[0]);else{(r[1]||_s).call(this,e,r[0])}n.position.end=Is(e.end)}function u(){return Fa(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function p(e){if(this.data.expectingFirstListItemValue){this.stack[this.stack.length-2].start=Number.parseInt(this.sliceSerialize(e),10),this.data.expectingFirstListItemValue=void 0}}function f(){const e=this.resume();this.stack[this.stack.length-1].lang=e}function g(){const e=this.resume();this.stack[this.stack.length-1].meta=e}function m(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function h(){const e=this.resume();this.stack[this.stack.length-1].value=e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function b(){const e=this.resume();this.stack[this.stack.length-1].value=e.replace(/(\r?\n|\r)$/g,"")}function y(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=Za(this.sliceSerialize(e)).toLowerCase()}function v(){const e=this.resume();this.stack[this.stack.length-1].title=e}function w(){const e=this.resume();this.stack[this.stack.length-1].url=e}function S(e){const t=this.stack[this.stack.length-1];if(!t.depth){const n=this.sliceSerialize(e).length;t.depth=n}}function x(){this.data.setextHeadingSlurpLineEnding=!0}function E(e){this.stack[this.stack.length-1].depth=61===this.sliceSerialize(e).codePointAt(0)?1:2}function k(){this.data.setextHeadingSlurpLineEnding=void 0}function A(e){const t=this.stack[this.stack.length-1].children;let n=t[t.length-1];n&&"text"===n.type||(n=ie(),n.position={start:Is(e.start),end:void 0},t.push(n)),this.stack.push(n)}function T(e){const t=this.stack.pop();t.value+=this.sliceSerialize(e),t.position.end=Is(e.end)}function O(e){const n=this.stack[this.stack.length-1];if(this.data.atHardBreak){return n.children[n.children.length-1].position.end=Is(e.end),void(this.data.atHardBreak=void 0)}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(n.type)&&(A.call(this,e),T.call(this,e))}function C(){this.data.atHardBreak=!0}function I(){const e=this.resume();this.stack[this.stack.length-1].value=e}function N(){const e=this.resume();this.stack[this.stack.length-1].value=e}function R(){const e=this.resume();this.stack[this.stack.length-1].value=e}function _(){const e=this.stack[this.stack.length-1];if(this.data.inReference){const t=this.data.referenceType||"shortcut";e.type+="Reference",e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function P(){const e=this.stack[this.stack.length-1];if(this.data.inReference){const t=this.data.referenceType||"shortcut";e.type+="Reference",e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function L(e){const t=this.sliceSerialize(e),n=this.stack[this.stack.length-2];n.label=function(e){return e.replace(As,Ts)}(t),n.identifier=Za(t).toLowerCase()}function D(){const e=this.stack[this.stack.length-1],t=this.resume(),n=this.stack[this.stack.length-1];if(this.data.inReference=!0,"link"===n.type){const t=e.children;n.children=t}else n.alt=t}function M(){const e=this.resume();this.stack[this.stack.length-1].url=e}function j(){const e=this.resume();this.stack[this.stack.length-1].title=e}function F(){this.data.inReference=void 0}function B(){this.data.referenceType="collapsed"}function U(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=Za(this.sliceSerialize(e)).toLowerCase(),this.data.referenceType="full"}function z(e){this.data.characterReferenceType=e.type}function $(e){const t=this.sliceSerialize(e),n=this.data.characterReferenceType;let r;if(n)r=Xa(t,"characterReferenceMarkerNumeric"===n?10:16),this.data.characterReferenceType=void 0;else{r=Ga(t)}this.stack[this.stack.length-1].value+=r}function G(e){this.stack.pop().position.end=Is(e.end)}function q(e){T.call(this,e);this.stack[this.stack.length-1].url=this.sliceSerialize(e)}function H(e){T.call(this,e);this.stack[this.stack.length-1].url="mailto:"+this.sliceSerialize(e)}function V(){return{type:"blockquote",children:[]}}function W(){return{type:"code",lang:null,meta:null,value:""}}function Y(){return{type:"inlineCode",value:""}}function K(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function X(){return{type:"emphasis",children:[]}}function Z(){return{type:"heading",depth:0,children:[]}}function Q(){return{type:"break"}}function J(){return{type:"html",value:""}}function ee(){return{type:"image",title:null,url:"",alt:null}}function te(){return{type:"link",title:null,url:"",children:[]}}function ne(e){return{type:"list",ordered:"listOrdered"===e.type,start:null,spread:e._spread,children:[]}}function re(e){return{type:"listItem",spread:e._spread,checked:null,children:[]}}function oe(){return{type:"paragraph",children:[]}}function ae(){return{type:"strong",children:[]}}function ie(){return{type:"text",value:""}}function se(){return{type:"thematicBreak"}}}(n)(function(e){for(;!_i(e););return e}(function(e){const t={constructs:Wa([xs,...(e||{}).extensions||[]]),content:n(fi),defined:[],document:n(gi),flow:n(ls),lazy:{},string:n(us),text:n(ds)};return t;function n(e){return function(n){return Es(t,e,n)}}}(n).document().write(function(){let e,t=1,n="",r=!0;return function(o,a,i){const s=[];let l,c,u,d,p;for(o=n+("string"==typeof o?o.toString():new TextDecoder(a||void 0).decode(o)),u=0,n="",r&&(65279===o.charCodeAt(0)&&u++,r=void 0);u<o.length;){if(ks.lastIndex=u,l=ks.exec(o),d=l&&void 0!==l.index?l.index:o.length,p=o.charCodeAt(d),!l){n=o.slice(u);break}if(10===p&&u===d&&e)s.push(-3),e=void 0;else switch(e&&(s.push(-5),e=void 0),u<d&&(s.push(o.slice(u,d)),t+=d-u),p){case 0:s.push(65533),t++;break;case 9:for(c=4*Math.ceil(t/4),s.push(-2);t++<c;)s.push(-1);break;case 10:s.push(-4),t=1;break;default:e=!0,t=1}u=d+1}return i&&(e&&s.push(-5),n&&s.push(n),s.push(null)),s}}()(e,t,!0))))}function Is(e){return{line:e.line,column:e.column,offset:e.offset}}function Ns(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?Ns(e,r):Rs(e,r)}}function Rs(e,t){let n;for(n in t)if(Os.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 _s(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+ma({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+ma({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+ma({start:t.start,end:t.end})+") is still open")}function Ps(e){const t=this;t.parser=function(n){return Cs(n,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function Ls(e,t){const n=t.referenceType;let r="]";if("collapsed"===n?r+="[]":"full"===n&&(r+="["+(t.label||t.identifier)+"]"),"imageReference"===t.type)return[{type:"text",value:"!["+t.alt+r}];const o=e.all(t),a=o[0];a&&"text"===a.type?a.value="["+a.value:o.unshift({type:"text",value:"["});const i=o[o.length-1];return i&&"text"===i.type?i.value+=r:o.push({type:"text",value:r}),o}function Ds(e){const t=e.spread;return null==t?e.children.length>1:t}function Ms(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),o=0;const a=[];for(;r;)a.push(js(t.slice(o,r.index),o>0,!0),r[0]),o=r.index+r[0].length,r=n.exec(t);return a.push(js(t.slice(o),o>0,!1)),a.join("")}function js(e,t,n){let r=0,o=e.length;if(t){let t=e.codePointAt(r);for(;9===t||32===t;)r++,t=e.codePointAt(r)}if(n){let t=e.codePointAt(o-1);for(;9===t||32===t;)o--,t=e.codePointAt(o-1)}return o>r?e.slice(r,o):""}const Fs={blockquote:function(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)},break:function(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:"\n"}]},code:function(e,t){const n=t.value?t.value+"\n":"",r={},o=t.lang?t.lang.split(/\s+/):[];o.length>0&&(r.className=["language-"+o[0]]);let a={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(a.data={meta:t.meta}),e.patch(t,a),a=e.applyData(t,a),a={type:"element",tagName:"pre",properties:{},children:[a]},e.patch(t,a),a},delete:function(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},emphasis:function(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},footnoteReference:function(e,t){const n="string"==typeof e.options.clobberPrefix?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),o=di(r.toLowerCase()),a=e.footnoteOrder.indexOf(r);let i,s=e.footnoteCounts.get(r);void 0===s?(s=0,e.footnoteOrder.push(r),i=e.footnoteOrder.length):i=a+1,s+=1,e.footnoteCounts.set(r,s);const l={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+o,id:n+"fnref-"+o+(s>1?"-"+s:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(i)}]};e.patch(t,l);const c={type:"element",tagName:"sup",properties:{},children:[l]};return e.patch(t,c),e.applyData(t,c)},heading:function(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},html:function(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}},imageReference:function(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Ls(e,t);const o={src:di(r.url||""),alt:t.alt};null!==r.title&&void 0!==r.title&&(o.title=r.title);const a={type:"element",tagName:"img",properties:o,children:[]};return e.patch(t,a),e.applyData(t,a)},image:function(e,t){const n={src:di(t.url)};null!==t.alt&&void 0!==t.alt&&(n.alt=t.alt),null!==t.title&&void 0!==t.title&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)},inlineCode:function(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)},linkReference:function(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Ls(e,t);const o={href:di(r.url||"")};null!==r.title&&void 0!==r.title&&(o.title=r.title);const a={type:"element",tagName:"a",properties:o,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)},link:function(e,t){const n={href:di(t.url)};null!==t.title&&void 0!==t.title&&(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)},listItem:function(e,t,n){const r=e.all(t),o=n?function(e){let t=!1;if("list"===e.type){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=Ds(n[r])}return t}(n):Ds(t),a={},i=[];if("boolean"==typeof t.checked){const e=r[0];let n;e&&"element"===e.type&&"p"===e.tagName?n=e:(n={type:"element",tagName:"p",properties:{},children:[]},r.unshift(n)),n.children.length>0&&n.children.unshift({type:"text",value:" "}),n.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),a.className=["task-list-item"]}let s=-1;for(;++s<r.length;){const e=r[s];(o||0!==s||"element"!==e.type||"p"!==e.tagName)&&i.push({type:"text",value:"\n"}),"element"!==e.type||"p"!==e.tagName||o?i.push(e):i.push(...e.children)}const l=r[r.length-1];l&&(o||"element"!==l.type||"p"!==l.tagName)&&i.push({type:"text",value:"\n"});const c={type:"element",tagName:"li",properties:a,children:i};return e.patch(t,c),e.applyData(t,c)},list:function(e,t){const n={},r=e.all(t);let o=-1;for("number"==typeof t.start&&1!==t.start&&(n.start=t.start);++o<r.length;){const e=r[o];if("element"===e.type&&"li"===e.tagName&&e.properties&&Array.isArray(e.properties.className)&&e.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const a={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,a),e.applyData(t,a)},paragraph:function(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},root:function(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)},strong:function(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},table:function(e,t){const n=e.all(t),r=n.shift(),o=[];if(r){const n={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],n),o.push(n)}if(n.length>0){const r={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},a=fa(t.children[1]),i=pa(t.children[t.children.length-1]);a&&i&&(r.position={start:a,end:i}),o.push(r)}const a={type:"element",tagName:"table",properties:{},children:e.wrap(o,!0)};return e.patch(t,a),e.applyData(t,a)},tableCell:function(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},tableRow:function(e,t,n){const r=n?n.children:void 0,o=0===(r?r.indexOf(t):1)?"th":"td",a=n&&"table"===n.type?n.align:void 0,i=a?a.length:t.children.length;let s=-1;const l=[];for(;++s<i;){const n=t.children[s],r={},i=a?a[s]:void 0;i&&(r.align=i);let c={type:"element",tagName:o,properties:r,children:[]};n&&(c.children=e.all(n),e.patch(n,c),c=e.applyData(n,c)),l.push(c)}const c={type:"element",tagName:"tr",properties:{},children:e.wrap(l,!0)};return e.patch(t,c),e.applyData(t,c)},text:function(e,t){const n={type:"text",value:Ms(String(t.value))};return e.patch(t,n),e.applyData(t,n)},thematicBreak:function(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)},toml:Bs,yaml:Bs,definition:Bs,footnoteDefinition:Bs};function Bs(){}const Us="object"==typeof self?self:globalThis,zs=e=>((e,t)=>{const n=(t,n)=>(e.set(n,t),t),r=o=>{if(e.has(o))return e.get(o);const[a,i]=t[o];switch(a){case 0:case-1:return n(i,o);case 1:{const e=n([],o);for(const t of i)e.push(r(t));return e}case 2:{const e=n({},o);for(const[t,n]of i)e[r(t)]=r(n);return e}case 3:return n(new Date(i),o);case 4:{const{source:e,flags:t}=i;return n(new RegExp(e,t),o)}case 5:{const e=n(new Map,o);for(const[t,n]of i)e.set(r(t),r(n));return e}case 6:{const e=n(new Set,o);for(const t of i)e.add(r(t));return e}case 7:{const{name:e,message:t}=i;return n(new Us[e](t),o)}case 8:return n(BigInt(i),o);case"BigInt":return n(Object(BigInt(i)),o);case"ArrayBuffer":return n(new Uint8Array(i).buffer,i);case"DataView":{const{buffer:e}=new Uint8Array(i);return n(new DataView(e),i)}}return n(new Us[a](i),o)};return r})(new Map,e)(0),$s="",{toString:Gs}={},{keys:qs}=Object,Hs=e=>{const t=typeof e;if("object"!==t||!e)return[0,t];const n=Gs.call(e).slice(8,-1);switch(n){case"Array":return[1,$s];case"Object":return[2,$s];case"Date":return[3,$s];case"RegExp":return[4,$s];case"Map":return[5,$s];case"Set":return[6,$s];case"DataView":return[1,n]}return n.includes("Array")?[1,n]:n.includes("Error")?[7,n]:[2,n]},Vs=([e,t])=>0===e&&("function"===t||"symbol"===t),Ws=(e,{json:t,lossy:n}={})=>{const r=[];return((e,t,n,r)=>{const o=(e,t)=>{const o=r.push(e)-1;return n.set(t,o),o},a=r=>{if(n.has(r))return n.get(r);let[i,s]=Hs(r);switch(i){case 0:{let t=r;switch(s){case"bigint":i=8,t=r.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+s);t=null;break;case"undefined":return o([-1],r)}return o([i,t],r)}case 1:{if(s){let e=r;return"DataView"===s?e=new Uint8Array(r.buffer):"ArrayBuffer"===s&&(e=new Uint8Array(r)),o([s,[...e]],r)}const e=[],t=o([i,e],r);for(const t of r)e.push(a(t));return t}case 2:{if(s)switch(s){case"BigInt":return o([s,r.toString()],r);case"Boolean":case"Number":case"String":return o([s,r.valueOf()],r)}if(t&&"toJSON"in r)return a(r.toJSON());const n=[],l=o([i,n],r);for(const t of qs(r))!e&&Vs(Hs(r[t]))||n.push([a(t),a(r[t])]);return l}case 3:return o([i,r.toISOString()],r);case 4:{const{source:e,flags:t}=r;return o([i,{source:e,flags:t}],r)}case 5:{const t=[],n=o([i,t],r);for(const[n,o]of r)(e||!Vs(Hs(n))&&!Vs(Hs(o)))&&t.push([a(n),a(o)]);return n}case 6:{const t=[],n=o([i,t],r);for(const n of r)!e&&Vs(Hs(n))||t.push(a(n));return n}}const{message:l}=r;return o([i,{name:s,message:l}],r)};return a})(!(t||n),!!t,new Map,r)(e),r};var Ys="function"==typeof structuredClone?(e,t)=>t&&("json"in t||"lossy"in t)?zs(Ws(e,t)):structuredClone(e):(e,t)=>zs(Ws(e,t));function Ks(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 Xs(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}const Zs={}.hasOwnProperty,Qs={};function Js(e,t){e.position&&(t.position=function(e){const t=fa(e),n=pa(e);if(t&&n)return{start:t,end:n}}(e))}function el(e,t){let n=t;if(e&&e.data){const t=e.data.hName,r=e.data.hChildren,o=e.data.hProperties;if("string"==typeof t)if("element"===n.type)n.tagName=t;else{n={type:"element",tagName:t,properties:{},children:"children"in n?n.children:[n]}}"element"===n.type&&o&&Object.assign(n.properties,Ys(o)),"children"in n&&n.children&&null!=r&&(n.children=r)}return n}function tl(e,t){const n=t.data||{},r=!("value"in t)||Zs.call(n,"hProperties")||Zs.call(n,"hChildren")?{type:"element",tagName:"div",properties:{},children:e.all(t)}:{type:"text",value:t.value};return e.patch(t,r),e.applyData(t,r)}function nl(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:"\n"});++r<e.length;)r&&n.push({type:"text",value:"\n"}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:"\n"}),n}function rl(e){let t=0,n=e.charCodeAt(t);for(;9===n||32===n;)t++,n=e.charCodeAt(t);return e.slice(t)}function ol(e,t){const n=function(e,t){const n=t||Qs,r=new Map,o=new Map,a=new Map,i={...Fs,...n.handlers},s={all:function(e){const t=[];if("children"in e){const n=e.children;let r=-1;for(;++r<n.length;){const o=s.one(n[r],e);if(o){if(r&&"break"===n[r-1].type&&(Array.isArray(o)||"text"!==o.type||(o.value=rl(o.value)),!Array.isArray(o)&&"element"===o.type)){const e=o.children[0];e&&"text"===e.type&&(e.value=rl(e.value))}Array.isArray(o)?t.push(...o):t.push(o)}}}return t},applyData:el,definitionById:r,footnoteById:o,footnoteCounts:a,footnoteOrder:[],handlers:i,one:function(e,t){const n=e.type,r=s.handlers[n];if(Zs.call(s.handlers,n)&&r)return r(s,e,t);if(s.options.passThrough&&s.options.passThrough.includes(n)){if("children"in e){const{children:t,...n}=e,r=Ys(n);return r.children=s.all(e),r}return Ys(e)}return(s.options.unknownHandler||tl)(s,e,t)},options:n,patch:Js,wrap:nl};return Mn(e,function(e){if("definition"===e.type||"footnoteDefinition"===e.type){const t="definition"===e.type?r:o,n=String(e.identifier).toUpperCase();t.has(n)||t.set(n,e)}}),s}(e,t),r=n.one(e,void 0),o=function(e){const t="string"==typeof e.options.clobberPrefix?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||Ks,r=e.options.footnoteBackLabel||Xs,o=e.options.footnoteLabel||"Footnotes",a=e.options.footnoteLabelTagName||"h2",i=e.options.footnoteLabelProperties||{className:["sr-only"]},s=[];let l=-1;for(;++l<e.footnoteOrder.length;){const o=e.footnoteById.get(e.footnoteOrder[l]);if(!o)continue;const a=e.all(o),i=String(o.identifier).toUpperCase(),c=di(i.toLowerCase());let u=0;const d=[],p=e.footnoteCounts.get(i);for(;void 0!==p&&++u<=p;){d.length>0&&d.push({type:"text",value:" "});let e="string"==typeof n?n:n(l,u);"string"==typeof e&&(e={type:"text",value:e}),d.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+c+(u>1?"-"+u:""),dataFootnoteBackref:"",ariaLabel:"string"==typeof r?r:r(l,u),className:["data-footnote-backref"]},children:Array.isArray(e)?e:[e]})}const f=a[a.length-1];if(f&&"element"===f.type&&"p"===f.tagName){const e=f.children[f.children.length-1];e&&"text"===e.type?e.value+=" ":f.children.push({type:"text",value:" "}),f.children.push(...d)}else a.push(...d);const g={type:"element",tagName:"li",properties:{id:t+"fn-"+c},children:e.wrap(a,!0)};e.patch(o,g),s.push(g)}if(0!==s.length)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:a,properties:{...Ys(i),id:"footnote-label"},children:[{type:"text",value:o}]},{type:"text",value:"\n"},{type:"element",tagName:"ol",properties:{},children:e.wrap(s,!0)},{type:"text",value:"\n"}]}}(n),a=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return o&&a.children.push({type:"text",value:"\n"},o),a}function al(e,t){return e&&"run"in e?async function(n,r){const o=ol(n,{file:r,...t});await e.run(o,r)}:function(n,r){return ol(n,{file:r,...e||t})}}function il(e){if(e)throw e}var sl=Object.prototype.hasOwnProperty,ll=Object.prototype.toString,cl=Object.defineProperty,ul=Object.getOwnPropertyDescriptor,dl=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===ll.call(e)},pl=function(e){if(!e||"[object Object]"!==ll.call(e))return!1;var t,n=sl.call(e,"constructor"),r=e.constructor&&e.constructor.prototype&&sl.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!n&&!r)return!1;for(t in e);return void 0===t||sl.call(e,t)},fl=function(e,t){cl&&"__proto__"===t.name?cl(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},gl=function(e,t){if("__proto__"===t){if(!sl.call(e,t))return;if(ul)return ul(e,t).value}return e[t]},ml=function e(){var t,n,r,o,a,i,s=arguments[0],l=1,c=arguments.length,u=!1;for("boolean"==typeof s&&(u=s,s=arguments[1]||{},l=2),(null==s||"object"!=typeof s&&"function"!=typeof s)&&(s={});l<c;++l)if(null!=(t=arguments[l]))for(n in t)r=gl(s,n),s!==(o=gl(t,n))&&(u&&o&&(pl(o)||(a=dl(o)))?(a?(a=!1,i=r&&dl(r)?r:[]):i=r&&pl(r)?r:{},fl(s,{name:n,newValue:e(u,i,o)})):void 0!==o&&fl(s,{name:n,newValue:o}));return s};function hl(e){if("object"!=typeof e||null===e)return!1;const t=Object.getPrototypeOf(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)}function bl(){const e=[],t={run:function(...t){let n=-1;const r=t.pop();if("function"!=typeof r)throw new TypeError("Expected function as last argument, not "+r);!function o(a,...i){const s=e[++n];let l=-1;if(a)r(a);else{for(;++l<t.length;)null!==i[l]&&void 0!==i[l]||(i[l]=t[l]);t=i,s?function(e,t){let n;return r;function r(...t){const r=e.length>t.length;let i;r&&t.push(o);try{i=e.apply(this,t)}catch(e){if(r&&n)throw e;return o(e)}r||(i&&i.then&&"function"==typeof i.then?i.then(a,o):i instanceof Error?o(i):a(i))}function o(e,...r){n||(n=!0,t(e,...r))}function a(e){o(null,e)}}(s,o)(...i):r(null,...i)}}(null,...t)},use:function(n){if("function"!=typeof n)throw new TypeError("Expected `middelware` to be a function, not "+n);return e.push(n),t}};return t}const yl={basename:function(e,t){if(void 0!==t&&"string"!=typeof t)throw new TypeError('"ext" argument must be a string');vl(e);let n,r=0,o=-1,a=e.length;if(void 0===t||0===t.length||t.length>e.length){for(;a--;)if(47===e.codePointAt(a)){if(n){r=a+1;break}}else o<0&&(n=!0,o=a+1);return o<0?"":e.slice(r,o)}if(t===e)return"";let i=-1,s=t.length-1;for(;a--;)if(47===e.codePointAt(a)){if(n){r=a+1;break}}else i<0&&(n=!0,i=a+1),s>-1&&(e.codePointAt(a)===t.codePointAt(s--)?s<0&&(o=a):(s=-1,o=i));r===o?o=i:o<0&&(o=e.length);return e.slice(r,o)},dirname:function(e){if(vl(e),0===e.length)return".";let t,n=-1,r=e.length;for(;--r;)if(47===e.codePointAt(r)){if(t){n=r;break}}else t||(t=!0);return n<0?47===e.codePointAt(0)?"/":".":1===n&&47===e.codePointAt(0)?"//":e.slice(0,n)},extname:function(e){vl(e);let t,n=e.length,r=-1,o=0,a=-1,i=0;for(;n--;){const s=e.codePointAt(n);if(47!==s)r<0&&(t=!0,r=n+1),46===s?a<0?a=n:1!==i&&(i=1):a>-1&&(i=-1);else if(t){o=n+1;break}}if(a<0||r<0||0===i||1===i&&a===r-1&&a===o+1)return"";return e.slice(a,r)},join:function(...e){let t,n=-1;for(;++n<e.length;)vl(e[n]),e[n]&&(t=void 0===t?e[n]:t+"/"+e[n]);return void 0===t?".":function(e){vl(e);const t=47===e.codePointAt(0);let n=function(e,t){let n,r,o="",a=0,i=-1,s=0,l=-1;for(;++l<=e.length;){if(l<e.length)n=e.codePointAt(l);else{if(47===n)break;n=47}if(47===n){if(i===l-1||1===s);else if(i!==l-1&&2===s){if(o.length<2||2!==a||46!==o.codePointAt(o.length-1)||46!==o.codePointAt(o.length-2))if(o.length>2){if(r=o.lastIndexOf("/"),r!==o.length-1){r<0?(o="",a=0):(o=o.slice(0,r),a=o.length-1-o.lastIndexOf("/")),i=l,s=0;continue}}else if(o.length>0){o="",a=0,i=l,s=0;continue}t&&(o=o.length>0?o+"/..":"..",a=2)}else o.length>0?o+="/"+e.slice(i+1,l):o=e.slice(i+1,l),a=l-i-1;i=l,s=0}else 46===n&&s>-1?s++:s=-1}return o}(e,!t);0!==n.length||t||(n=".");n.length>0&&47===e.codePointAt(e.length-1)&&(n+="/");return t?"/"+n:n}(t)},sep:"/"};function vl(e){if("string"!=typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const wl={cwd:function(){return"/"}};function Sl(e){return Boolean(null!==e&&"object"==typeof e&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&void 0===e.auth)}function xl(e){if("string"==typeof e)e=new URL(e);else if(!Sl(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("file:"!==e.protocol){const e=new TypeError("The URL must be of scheme file");throw e.code="ERR_INVALID_URL_SCHEME",e}return function(e){if(""!==e.hostname){const e=new TypeError('File URL host must be "localhost" or empty on darwin');throw e.code="ERR_INVALID_FILE_URL_HOST",e}const t=e.pathname;let n=-1;for(;++n<t.length;)if(37===t.codePointAt(n)&&50===t.codePointAt(n+1)){const e=t.codePointAt(n+2);if(70===e||102===e){const e=new TypeError("File URL path must not include encoded / characters");throw e.code="ERR_INVALID_FILE_URL_PATH",e}}return decodeURIComponent(t)}(e)}const El=["history","path","basename","stem","extname","dirname"];class kl{constructor(e){let t;t=e?Sl(e)?{path:e}:"string"==typeof e||function(e){return Boolean(e&&"object"==typeof e&&"byteLength"in e&&"byteOffset"in e)}(e)?{value:e}:e:{},this.cwd="cwd"in t?"":wl.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let n,r=-1;for(;++r<El.length;){const e=El[r];e in t&&void 0!==t[e]&&null!==t[e]&&(this[e]="history"===e?[...t[e]]:t[e])}for(n in t)El.includes(n)||(this[n]=t[n])}get basename(){return"string"==typeof this.path?yl.basename(this.path):void 0}set basename(e){Tl(e,"basename"),Al(e,"basename"),this.path=yl.join(this.dirname||"",e)}get dirname(){return"string"==typeof this.path?yl.dirname(this.path):void 0}set dirname(e){Ol(this.basename,"dirname"),this.path=yl.join(e||"",this.basename)}get extname(){return"string"==typeof this.path?yl.extname(this.path):void 0}set extname(e){if(Al(e,"extname"),Ol(this.dirname,"extname"),e){if(46!==e.codePointAt(0))throw new Error("`extname` must start with `.`");if(e.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=yl.join(this.dirname,this.stem+(e||""))}get path(){return this.history[this.history.length-1]}set path(e){Sl(e)&&(e=xl(e)),Tl(e,"path"),this.path!==e&&this.history.push(e)}get stem(){return"string"==typeof this.path?yl.basename(this.path,this.extname):void 0}set stem(e){Tl(e,"stem"),Al(e,"stem"),this.path=yl.join(this.dirname||"",e+(this.extname||""))}fail(e,t,n){const r=this.message(e,t,n);throw r.fatal=!0,r}info(e,t,n){const r=this.message(e,t,n);return r.fatal=void 0,r}message(e,t,n){const r=new va(e,t,n);return this.path&&(r.name=this.path+":"+r.name,r.file=this.path),r.fatal=!1,this.messages.push(r),r}toString(e){if(void 0===this.value)return"";if("string"==typeof this.value)return this.value;return new TextDecoder(e||void 0).decode(this.value)}}function Al(e,t){if(e&&e.includes(yl.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+yl.sep+"`")}function Tl(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function Ol(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}const Cl=function(e){const t=this.constructor.prototype,n=t[e],r=function(){return n.apply(r,arguments)};return Object.setPrototypeOf(r,t),r},Il={}.hasOwnProperty;class Nl extends Cl{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=bl()}copy(){const e=new Nl;let t=-1;for(;++t<this.attachers.length;){const n=this.attachers[t];e.use(...n)}return e.data(ml(!0,{},this.namespace)),e}data(e,t){return"string"==typeof e?2===arguments.length?(Ll("data",this.frozen),this.namespace[e]=t,this):Il.call(this.namespace,e)&&this.namespace[e]||void 0:e?(Ll("data",this.frozen),this.namespace=e,this):this.namespace}freeze(){if(this.frozen)return this;const e=this;for(;++this.freezeIndex<this.attachers.length;){const[t,...n]=this.attachers[this.freezeIndex];if(!1===n[0])continue;!0===n[0]&&(n[0]=void 0);const r=t.call(e,...n);"function"==typeof r&&this.transformers.use(r)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(e){this.freeze();const t=jl(e),n=this.parser||this.Parser;return _l("parse",n),n(String(t),t)}process(e,t){const n=this;return this.freeze(),_l("process",this.parser||this.Parser),Pl("process",this.compiler||this.Compiler),t?r(void 0,t):new Promise(r);function r(r,o){const a=jl(e),i=n.parse(a);function s(e,n){e||!n?o(e):r?r(n):t(void 0,n)}n.run(i,a,function(e,t,r){if(e||!t||!r)return s(e);const o=t,a=n.stringify(o,r);var i;"string"==typeof(i=a)||function(e){return Boolean(e&&"object"==typeof e&&"byteLength"in e&&"byteOffset"in e)}(i)?r.value=a:r.result=a,s(e,r)})}}processSync(e){let t,n=!1;return this.freeze(),_l("processSync",this.parser||this.Parser),Pl("processSync",this.compiler||this.Compiler),this.process(e,function(e,r){n=!0,il(e),t=r}),Ml("processSync","process",n),t}run(e,t,n){Dl(e),this.freeze();const r=this.transformers;return n||"function"!=typeof t||(n=t,t=void 0),n?o(void 0,n):new Promise(o);function o(o,a){const i=jl(t);r.run(e,i,function(t,r,i){const s=r||e;t?a(t):o?o(s):n(void 0,s,i)})}}runSync(e,t){let n,r=!1;return this.run(e,t,function(e,t){il(e),n=t,r=!0}),Ml("runSync","run",r),n}stringify(e,t){this.freeze();const n=jl(t),r=this.compiler||this.Compiler;return Pl("stringify",r),Dl(e),r(e,n)}use(e,...t){const n=this.attachers,r=this.namespace;if(Ll("use",this.frozen),null==e);else if("function"==typeof e)s(e,t);else{if("object"!=typeof e)throw new TypeError("Expected usable value, not `"+e+"`");Array.isArray(e)?i(e):a(e)}return this;function o(e){if("function"==typeof e)s(e,[]);else{if("object"!=typeof e)throw new TypeError("Expected usable value, not `"+e+"`");if(Array.isArray(e)){const[t,...n]=e;s(t,n)}else a(e)}}function a(e){if(!("plugins"in e)&&!("settings"in e))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");i(e.plugins),e.settings&&(r.settings=ml(!0,r.settings,e.settings))}function i(e){let t=-1;if(null==e);else{if(!Array.isArray(e))throw new TypeError("Expected a list of plugins, not `"+e+"`");for(;++t<e.length;){o(e[t])}}}function s(e,t){let r=-1,o=-1;for(;++r<n.length;)if(n[r][0]===e){o=r;break}if(-1===o)n.push([e,...t]);else if(t.length>0){let[r,...a]=t;const i=n[o][1];hl(i)&&hl(r)&&(r=ml(!0,i,r)),n[o]=[e,r,...a]}}}}const Rl=(new Nl).freeze();function _l(e,t){if("function"!=typeof t)throw new TypeError("Cannot `"+e+"` without `parser`")}function Pl(e,t){if("function"!=typeof t)throw new TypeError("Cannot `"+e+"` without `compiler`")}function Ll(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 Dl(e){if(!hl(e)||"string"!=typeof e.type)throw new TypeError("Expected node, got `"+e+"`")}function Ml(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function jl(e){return function(e){return Boolean(e&&"object"==typeof e&&"message"in e&&"messages"in e)}(e)?e:new kl(e)}const Fl=[],Bl={allowDangerousHtml:!0},Ul=/^(https?|ircs?|mailto|xmpp)$/i,zl=[{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 $l(e){const t=function(e){const t=e.rehypePlugins||Fl,n=e.remarkPlugins||Fl,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...Bl}:Bl,o=Rl().use(Ps).use(n).use(al,r).use(t);return o}(e),r=function(e){const t=e.children||"",n=new kl;"string"==typeof t&&(n.value=t);return n}(e);return function(e,t){const r=t.allowedElements,o=t.allowElement,a=t.components,i=t.disallowedElements,s=t.skipHtml,l=t.unwrapDisallowed,c=t.urlTransform||Gl;for(const e of zl)Object.hasOwn(t,e.from)&&Qr((e.from,e.to&&e.to,e.id));t.className&&(e={type:"element",tagName:"div",properties:{className:t.className},children:"root"===e.type?e.children:[e]});return Mn(e,u),Ta(e,{Fragment:n.Fragment,components:a,ignoreInvalidStyle:!0,jsx:n.jsx,jsxs:n.jsxs,passKeys:!0,passNode:!0});function u(e,t,n){if("raw"===e.type&&n&&"number"==typeof t)return s?n.children.splice(t,1):n.children[t]={type:"text",value:e.value},t;if("element"===e.type){let t;for(t in Ma)if(Object.hasOwn(Ma,t)&&Object.hasOwn(e.properties,t)){const n=e.properties[t],r=Ma[t];(null===r||r.includes(e.tagName))&&(e.properties[t]=c(String(n||""),t,e))}}if("element"===e.type){let a=r?!r.includes(e.tagName):!!i&&i.includes(e.tagName);if(!a&&o&&"number"==typeof t&&(a=!o(e,t,n)),a&&n&&"number"==typeof t)return l&&e.children?n.children.splice(t,1,...e.children):n.children.splice(t,1),t}}}(t.runSync(t.parse(r),r),e)}function Gl(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),o=e.indexOf("/");return-1===t||-1!==o&&t>o||-1!==n&&t>n||-1!==r&&t>r||Ul.test(e.slice(0,t))?e:""}function ql(e,t){const n=String(e);if("string"!=typeof t)throw new TypeError("Expected character");let r=0,o=n.indexOf(t);for(;-1!==o;)r++,o=n.indexOf(t,o+t.length);return r}function Hl(e,t,n){const r=Cn((n||{}).ignore||[]),o=function(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<n.length;){const e=n[r];t.push([Vl(e[0]),Wl(e[1])])}return t}(t);let a=-1;for(;++a<o.length;)Dn(e,"text",i);function i(e,t){let n,i=-1;for(;++i<t.length;){const e=t[i],o=n?n.children:void 0;if(r(e,o?o.indexOf(e):void 0,n))return;n=e}if(n)return function(e,t){const n=t[t.length-1],r=o[a][0],i=o[a][1];let s=0;const l=n.children.indexOf(e);let c=!1,u=[];r.lastIndex=0;let d=r.exec(e.value);for(;d;){const n=d.index,o={index:d.index,input:d.input,stack:[...t,e]};let a=i(...d,o);if("string"==typeof a&&(a=a.length>0?{type:"text",value:a}:void 0),!1===a?r.lastIndex=n+1:(s!==n&&u.push({type:"text",value:e.value.slice(s,n)}),Array.isArray(a)?u.push(...a):a&&u.push(a),s=n+d[0].length,c=!0),!r.global)break;d=r.exec(e.value)}c?(s<e.value.length&&u.push({type:"text",value:e.value.slice(s)}),n.children.splice(l,1,...u)):u=[e];return l+u.length}(e,t)}}function Vl(e){return"string"==typeof e?new RegExp(function(e){if("string"!=typeof e)throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}(e),"g"):e}function Wl(e){return"function"==typeof e?e:function(){return e}}const Yl="phrasing",Kl=["autolink","link","image","label"];function Xl(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Zl(e){this.config.enter.autolinkProtocol.call(this,e)}function Ql(e){this.config.exit.autolinkProtocol.call(this,e)}function Jl(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function ec(e){this.config.exit.autolinkEmail.call(this,e)}function tc(e){this.exit(e)}function nc(e){Hl(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,rc],[/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu,oc]],{ignore:["link","linkReference"]})}function rc(e,t,n,r,o){let a="";if(!ac(o))return!1;if(/^w/i.test(t)&&(n=t+n,t="",a="http://"),!function(e){const t=e.split(".");if(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))return!1;return!0}(n))return!1;const i=function(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const o=ql(e,"(");let a=ql(e,")");for(;-1!==r&&o>a;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),a++;return[e,n]}(n+r);if(!i[0])return!1;const s={type:"link",title:null,url:a+t+i[0],children:[{type:"text",value:t+i[0]}]};return i[1]?[s,{type:"text",value:i[1]}]:s}function oc(e,t,n,r){return!(!ac(r,!0)||/[-\d_]$/.test(n))&&{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function ac(e,t){const n=e.input.charCodeAt(e.index-1);return(0===e.index||ci(n)||li(n))&&(!t||47!==n)}function ic(){this.buffer()}function sc(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function lc(){this.buffer()}function cc(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function uc(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Za(this.sliceSerialize(e)).toLowerCase(),n.label=t}function dc(e){this.exit(e)}function pc(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Za(this.sliceSerialize(e)).toLowerCase(),n.label=t}function fc(e){this.exit(e)}function gc(e,t,n,r){const o=n.createTracker(r);let a=o.move("[^");const i=n.enter("footnoteReference"),s=n.enter("reference");return a+=o.move(n.safe(n.associationId(e),{after:"]",before:a})),s(),i(),a+=o.move("]"),a}function mc(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:function(e,n,r,o){const a=r.createTracker(o);let i=a.move("[^");const s=r.enter("footnoteDefinition"),l=r.enter("label");i+=a.move(r.safe(r.associationId(e),{before:i,after:"]"})),l(),i+=a.move("]:"),e.children&&e.children.length>0&&(a.shift(4),i+=a.move((t?"\n":" ")+r.indentLines(r.containerFlow(e,a.current()),t?bc:hc)));return s(),i},footnoteReference:gc},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]}}function hc(e,t,n){return 0===t?e:bc(e,t,n)}function bc(e,t,n){return(n?"":" ")+e}gc.peek=function(){return"["};const yc=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];function vc(e){this.enter({type:"delete",children:[]},e)}function wc(e){this.exit(e)}function Sc(e,t,n,r){const o=n.createTracker(r),a=n.enter("strikethrough");let i=o.move("~~");return i+=n.containerPhrasing(e,{...o.current(),before:i,after:"~"}),i+=o.move("~~"),a(),i}function xc(e){return e.length}function Ec(e){return null==e?"":String(e)}function kc(e){const t="string"==typeof e?e.codePointAt(0):0;return 67===t||99===t?99:76===t||108===t?108:82===t||114===t?114:0}function Ac(e,t,n){return">"+(n?"":" ")+e}function Tc(e,t){return Oc(e,t.inConstruct,!0)&&!Oc(e,t.notInConstruct,!1)}function Oc(e,t,n){if("string"==typeof t&&(t=[t]),!t||0===t.length)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function Cc(e,t,n,r){let o=-1;for(;++o<n.unsafe.length;)if("\n"===n.unsafe[o].character&&Tc(n.stack,n.unsafe[o]))return/[ \t]/.test(r.before)?"":" ";return"\\\n"}function Ic(e,t,n){return(n?"":" ")+e}function Nc(e){const t=e.options.quote||'"';if('"'!==t&&"'"!==t)throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function Rc(e){return"&#x"+e.toString(16).toUpperCase()+";"}function _c(e,t,n){const r=hi(e),o=hi(t);return void 0===r?void 0===o?"_"===n?{inside:!0,outside:!0}:{inside:!1,outside:!1}:1===o?{inside:!0,outside:!0}:{inside:!1,outside:!0}:1===r?void 0===o?{inside:!1,outside:!1}:1===o?{inside:!0,outside:!0}:{inside:!1,outside:!1}:void 0===o?{inside:!1,outside:!1}:1===o?{inside:!0,outside:!1}:{inside:!1,outside:!1}}function Pc(e,t,n,r){const o=function(e){const t=e.options.emphasis||"*";if("*"!==t&&"_"!==t)throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}(n),a=n.enter("emphasis"),i=n.createTracker(r),s=i.move(o);let l=i.move(n.containerPhrasing(e,{after:o,before:s,...i.current()}));const c=l.charCodeAt(0),u=_c(r.before.charCodeAt(r.before.length-1),c,o);u.inside&&(l=Rc(c)+l.slice(1));const d=l.charCodeAt(l.length-1),p=_c(r.after.charCodeAt(0),d,o);p.inside&&(l=l.slice(0,-1)+Rc(d));const f=i.move(o);return a(),n.attentionEncodeSurroundingInfo={after:p.outside,before:u.outside},s+l+f}function Lc(e){return e.value||""}function Dc(e,t,n,r){const o=Nc(n),a='"'===o?"Quote":"Apostrophe",i=n.enter("image");let s=n.enter("label");const l=n.createTracker(r);let c=l.move("![");return c+=l.move(n.safe(e.alt,{before:c,after:"]",...l.current()})),c+=l.move("]("),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=n.enter("destinationLiteral"),c+=l.move("<"),c+=l.move(n.safe(e.url,{before:c,after:">",...l.current()})),c+=l.move(">")):(s=n.enter("destinationRaw"),c+=l.move(n.safe(e.url,{before:c,after:e.title?" ":")",...l.current()}))),s(),e.title&&(s=n.enter(`title${a}`),c+=l.move(" "+o),c+=l.move(n.safe(e.title,{before:c,after:o,...l.current()})),c+=l.move(o),s()),c+=l.move(")"),i(),c}function Mc(e,t,n,r){const o=e.referenceType,a=n.enter("imageReference");let i=n.enter("label");const s=n.createTracker(r);let l=s.move("![");const c=n.safe(e.alt,{before:l,after:"]",...s.current()});l+=s.move(c+"]["),i();const u=n.stack;n.stack=[],i=n.enter("reference");const d=n.safe(n.associationId(e),{before:l,after:"]",...s.current()});return i(),n.stack=u,a(),"full"!==o&&c&&c===d?"shortcut"===o?l=l.slice(0,-1):l+=s.move("]"):l+=s.move(d+"]"),l}function jc(e,t,n){let r=e.value||"",o="`",a=-1;for(;new RegExp("(^|[^`])"+o+"([^`]|$)").test(r);)o+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++a<n.unsafe.length;){const e=n.unsafe[a],t=n.compilePattern(e);let o;if(e.atBreak)for(;o=t.exec(r);){let e=o.index;10===r.charCodeAt(e)&&13===r.charCodeAt(e-1)&&e--,r=r.slice(0,e)+" "+r.slice(o.index+1)}}return o+r+o}function Fc(e,t){const n=Fa(e);return Boolean(!t.options.resourceLink&&e.url&&!e.title&&e.children&&1===e.children.length&&"text"===e.children[0].type&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}function Bc(e,t,n,r){const o=Nc(n),a='"'===o?"Quote":"Apostrophe",i=n.createTracker(r);let s,l;if(Fc(e,n)){const t=n.stack;n.stack=[],s=n.enter("autolink");let r=i.move("<");return r+=i.move(n.containerPhrasing(e,{before:r,after:">",...i.current()})),r+=i.move(">"),s(),n.stack=t,r}s=n.enter("link"),l=n.enter("label");let c=i.move("[");return c+=i.move(n.containerPhrasing(e,{before:c,after:"](",...i.current()})),c+=i.move("]("),l(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(l=n.enter("destinationLiteral"),c+=i.move("<"),c+=i.move(n.safe(e.url,{before:c,after:">",...i.current()})),c+=i.move(">")):(l=n.enter("destinationRaw"),c+=i.move(n.safe(e.url,{before:c,after:e.title?" ":")",...i.current()}))),l(),e.title&&(l=n.enter(`title${a}`),c+=i.move(" "+o),c+=i.move(n.safe(e.title,{before:c,after:o,...i.current()})),c+=i.move(o),l()),c+=i.move(")"),s(),c}function Uc(e,t,n,r){const o=e.referenceType,a=n.enter("linkReference");let i=n.enter("label");const s=n.createTracker(r);let l=s.move("[");const c=n.containerPhrasing(e,{before:l,after:"]",...s.current()});l+=s.move(c+"]["),i();const u=n.stack;n.stack=[],i=n.enter("reference");const d=n.safe(n.associationId(e),{before:l,after:"]",...s.current()});return i(),n.stack=u,a(),"full"!==o&&c&&c===d?"shortcut"===o?l=l.slice(0,-1):l+=s.move("]"):l+=s.move(d+"]"),l}function zc(e){const t=e.options.bullet||"*";if("*"!==t&&"+"!==t&&"-"!==t)throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function $c(e){const t=e.options.rule||"*";if("*"!==t&&"-"!==t&&"_"!==t)throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}Sc.peek=function(){return"~"},Pc.peek=function(e,t,n){return n.options.emphasis||"*"},Lc.peek=function(){return"<"},Dc.peek=function(){return"!"},Mc.peek=function(){return"!"},jc.peek=function(){return"`"},Bc.peek=function(e,t,n){return Fc(e,n)?"<":"["},Uc.peek=function(){return"["};const Gc=Cn(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function qc(e,t,n,r){const o=function(e){const t=e.options.strong||"*";if("*"!==t&&"_"!==t)throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}(n),a=n.enter("strong"),i=n.createTracker(r),s=i.move(o+o);let l=i.move(n.containerPhrasing(e,{after:o,before:s,...i.current()}));const c=l.charCodeAt(0),u=_c(r.before.charCodeAt(r.before.length-1),c,o);u.inside&&(l=Rc(c)+l.slice(1));const d=l.charCodeAt(l.length-1),p=_c(r.after.charCodeAt(0),d,o);p.inside&&(l=l.slice(0,-1)+Rc(d));const f=i.move(o+o);return a(),n.attentionEncodeSurroundingInfo={after:p.outside,before:u.outside},s+l+f}qc.peek=function(e,t,n){return n.options.strong||"*"};const Hc={blockquote:function(e,t,n,r){const o=n.enter("blockquote"),a=n.createTracker(r);a.move("> "),a.shift(2);const i=n.indentLines(n.containerFlow(e,a.current()),Ac);return o(),i},break:Cc,code:function(e,t,n,r){const o=function(e){const t=e.options.fence||"`";if("`"!==t&&"~"!==t)throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}(n),a=e.value||"",i="`"===o?"GraveAccent":"Tilde";if(function(e,t){return Boolean(!1===t.options.fences&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}(e,n)){const e=n.enter("codeIndented"),t=n.indentLines(a,Ic);return e(),t}const s=n.createTracker(r),l=o.repeat(Math.max(function(e,t){const n=String(e);let r=n.indexOf(t),o=r,a=0,i=0;if("string"!=typeof t)throw new TypeError("Expected substring");for(;-1!==r;)r===o?++a>i&&(i=a):a=1,o=r+t.length,r=n.indexOf(t,o);return i}(a,o)+1,3)),c=n.enter("codeFenced");let u=s.move(l);if(e.lang){const t=n.enter(`codeFencedLang${i}`);u+=s.move(n.safe(e.lang,{before:u,after:" ",encode:["`"],...s.current()})),t()}if(e.lang&&e.meta){const t=n.enter(`codeFencedMeta${i}`);u+=s.move(" "),u+=s.move(n.safe(e.meta,{before:u,after:"\n",encode:["`"],...s.current()})),t()}return u+=s.move("\n"),a&&(u+=s.move(a+"\n")),u+=s.move(l),c(),u},definition:function(e,t,n,r){const o=Nc(n),a='"'===o?"Quote":"Apostrophe",i=n.enter("definition");let s=n.enter("label");const l=n.createTracker(r);let c=l.move("[");return c+=l.move(n.safe(n.associationId(e),{before:c,after:"]",...l.current()})),c+=l.move("]: "),s(),!e.url||/[\0- \u007F]/.test(e.url)?(s=n.enter("destinationLiteral"),c+=l.move("<"),c+=l.move(n.safe(e.url,{before:c,after:">",...l.current()})),c+=l.move(">")):(s=n.enter("destinationRaw"),c+=l.move(n.safe(e.url,{before:c,after:e.title?" ":"\n",...l.current()}))),s(),e.title&&(s=n.enter(`title${a}`),c+=l.move(" "+o),c+=l.move(n.safe(e.title,{before:c,after:o,...l.current()})),c+=l.move(o),s()),i(),c},emphasis:Pc,hardBreak:Cc,heading:function(e,t,n,r){const o=Math.max(Math.min(6,e.depth||1),1),a=n.createTracker(r);if(function(e,t){let n=!1;return Mn(e,function(e){if("value"in e&&/\r?\n|\r/.test(e.value)||"break"===e.type)return n=!0,Pn}),Boolean((!e.depth||e.depth<3)&&Fa(e)&&(t.options.setext||n))}(e,n)){const t=n.enter("headingSetext"),r=n.enter("phrasing"),i=n.containerPhrasing(e,{...a.current(),before:"\n",after:"\n"});return r(),t(),i+"\n"+(1===o?"=":"-").repeat(i.length-(Math.max(i.lastIndexOf("\r"),i.lastIndexOf("\n"))+1))}const i="#".repeat(o),s=n.enter("headingAtx"),l=n.enter("phrasing");a.move(i+" ");let c=n.containerPhrasing(e,{before:"# ",after:"\n",...a.current()});return/^[\t ]/.test(c)&&(c=Rc(c.charCodeAt(0))+c.slice(1)),c=c?i+" "+c:i,n.options.closeAtx&&(c+=" "+i),l(),s(),c},html:Lc,image:Dc,imageReference:Mc,inlineCode:jc,link:Bc,linkReference:Uc,list:function(e,t,n,r){const o=n.enter("list"),a=n.bulletCurrent;let i=e.ordered?function(e){const t=e.options.bulletOrdered||".";if("."!==t&&")"!==t)throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}(n):zc(n);const s=e.ordered?"."===i?")":".":function(e){const t=zc(e),n=e.options.bulletOther;if(!n)return"*"===t?"-":"*";if("*"!==n&&"+"!==n&&"-"!==n)throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}(n);let l=!(!t||!n.bulletLastUsed)&&i===n.bulletLastUsed;if(!e.ordered){const t=e.children?e.children[0]:void 0;if("*"!==i&&"-"!==i||!t||t.children&&t.children[0]||"list"!==n.stack[n.stack.length-1]||"listItem"!==n.stack[n.stack.length-2]||"list"!==n.stack[n.stack.length-3]||"listItem"!==n.stack[n.stack.length-4]||0!==n.indexStack[n.indexStack.length-1]||0!==n.indexStack[n.indexStack.length-2]||0!==n.indexStack[n.indexStack.length-3]||(l=!0),$c(n)===i&&t){let t=-1;for(;++t<e.children.length;){const n=e.children[t];if(n&&"listItem"===n.type&&n.children&&n.children[0]&&"thematicBreak"===n.children[0].type){l=!0;break}}}}l&&(i=s),n.bulletCurrent=i;const c=n.containerFlow(e,r);return n.bulletLastUsed=i,n.bulletCurrent=a,o(),c},listItem:function(e,t,n,r){const o=function(e){const t=e.options.listItemIndent||"one";if("tab"!==t&&"one"!==t&&"mixed"!==t)throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}(n);let a=n.bulletCurrent||zc(n);t&&"list"===t.type&&t.ordered&&(a=("number"==typeof t.start&&t.start>-1?t.start:1)+(!1===n.options.incrementListMarker?0:t.children.indexOf(e))+a);let i=a.length+1;("tab"===o||"mixed"===o&&(t&&"list"===t.type&&t.spread||e.spread))&&(i=4*Math.ceil(i/4));const s=n.createTracker(r);s.move(a+" ".repeat(i-a.length)),s.shift(i);const l=n.enter("listItem"),c=n.indentLines(n.containerFlow(e,s.current()),function(e,t,n){if(t)return(n?"":" ".repeat(i))+e;return(n?a:a+" ".repeat(i-a.length))+e});return l(),c},paragraph:function(e,t,n,r){const o=n.enter("paragraph"),a=n.enter("phrasing"),i=n.containerPhrasing(e,r);return a(),o(),i},root:function(e,t,n,r){return(e.children.some(function(e){return Gc(e)})?n.containerPhrasing:n.containerFlow).call(n,e,r)},strong:qc,text:function(e,t,n,r){return n.safe(e.value,r)},thematicBreak:function(e,t,n){const r=($c(n)+(n.options.ruleSpaces?" ":"")).repeat(function(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}(n));return n.options.ruleSpaces?r.slice(0,-1):r}};function Vc(e){const t=e._align;this.enter({type:"table",align:t.map(function(e){return"none"===e?null:e}),children:[]},e),this.data.inTable=!0}function Wc(e){this.exit(e),this.data.inTable=void 0}function Yc(e){this.enter({type:"tableRow",children:[]},e)}function Kc(e){this.exit(e)}function Xc(e){this.enter({type:"tableCell",children:[]},e)}function Zc(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,Qc));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function Qc(e,t){return"|"===t?t:e}function Jc(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,o=t.stringLength,a=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:"\n",inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[\t :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:function(e,t,n){let r=Hc.inlineCode(e,t,n);n.stack.includes("tableCell")&&(r=r.replace(/\|/g,"\\$&"));return r},table:function(e,t,n,r){return s(function(e,t,n){const r=e.children;let o=-1;const a=[],i=t.enter("table");for(;++o<r.length;)a[o]=l(r[o],t,n);return i(),a}(e,n,r),e.align)},tableCell:i,tableRow:function(e,t,n,r){const o=l(e,n,r),a=s([o]);return a.slice(0,a.indexOf("\n"))}}};function i(e,t,n,r){const o=n.enter("tableCell"),i=n.enter("phrasing"),s=n.containerPhrasing(e,{...r,before:a,after:a});return i(),o(),s}function s(e,t){return function(e,t){const n=t||{},r=(n.align||[]).concat(),o=n.stringLength||xc,a=[],i=[],s=[],l=[];let c=0,u=-1;for(;++u<e.length;){const t=[],r=[];let a=-1;for(e[u].length>c&&(c=e[u].length);++a<e[u].length;){const i=Ec(e[u][a]);if(!1!==n.alignDelimiters){const e=o(i);r[a]=e,(void 0===l[a]||e>l[a])&&(l[a]=e)}t.push(i)}i[u]=t,s[u]=r}let d=-1;if("object"==typeof r&&"length"in r)for(;++d<c;)a[d]=kc(r[d]);else{const e=kc(r);for(;++d<c;)a[d]=e}d=-1;const p=[],f=[];for(;++d<c;){const e=a[d];let t="",r="";99===e?(t=":",r=":"):108===e?t=":":114===e&&(r=":");let o=!1===n.alignDelimiters?1:Math.max(1,l[d]-t.length-r.length);const i=t+"-".repeat(o)+r;!1!==n.alignDelimiters&&(o=t.length+o+r.length,o>l[d]&&(l[d]=o),f[d]=o),p[d]=i}i.splice(1,0,p),s.splice(1,0,f),u=-1;const g=[];for(;++u<i.length;){const e=i[u],t=s[u];d=-1;const r=[];for(;++d<c;){const o=e[d]||"";let i="",s="";if(!1!==n.alignDelimiters){const e=l[d]-(t[d]||0),n=a[d];114===n?i=" ".repeat(e):99===n?e%2?(i=" ".repeat(e/2+.5),s=" ".repeat(e/2-.5)):(i=" ".repeat(e/2),s=i):s=" ".repeat(e)}!1===n.delimiterStart||d||r.push("|"),!1===n.padding||!1===n.alignDelimiters&&""===o||!1===n.delimiterStart&&!d||r.push(" "),!1!==n.alignDelimiters&&r.push(i),r.push(o),!1!==n.alignDelimiters&&r.push(s),!1!==n.padding&&r.push(" "),!1===n.delimiterEnd&&d===c-1||r.push("|")}g.push(!1===n.delimiterEnd?r.join("").replace(/ +$/,""):r.join(""))}return g.join("\n")}(e,{align:t,alignDelimiters:r,padding:n,stringLength:o})}function l(e,t,n){const r=e.children;let o=-1;const a=[],s=t.enter("tableRow");for(;++o<r.length;)a[o]=i(r[o],0,t,n);return s(),a}}function eu(e){const t=this.stack[this.stack.length-2];t.type,t.checked="taskListCheckValueChecked"===e.type}function tu(e){const t=this.stack[this.stack.length-2];if(t&&"listItem"===t.type&&"boolean"==typeof t.checked){const e=this.stack[this.stack.length-1];e.type;const n=e.children[0];if(n&&"text"===n.type){const r=t.children;let o,a=-1;for(;++a<r.length;){const e=r[a];if("paragraph"===e.type){o=e;break}}o===e&&(n.value=n.value.slice(1),0===n.value.length?e.children.shift():e.position&&n.position&&"number"==typeof n.position.start.offset&&(n.position.start.column++,n.position.start.offset++,e.position.start=Object.assign({},n.position.start)))}}this.exit(e)}function nu(e,t,n,r){const o=e.children[0],a="boolean"==typeof e.checked&&o&&"paragraph"===o.type,i="["+(e.checked?"x":" ")+"] ",s=n.createTracker(r);a&&s.move(i);let l=Hc.listItem(e,t,n,{...r,...s.current()});return a&&(l=l.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,function(e){return e+i})),l}const ru={tokenize:function(e,t,n){let r=0;return function t(a){if((87===a||119===a)&&r<3)return r++,e.consume(a),t;if(46===a&&3===r)return e.consume(a),o;return n(a)};function o(e){return null===e?n(e):t(e)}},partial:!0},ou={tokenize:function(e,t,n){let r,o,a;return i;function i(t){return 46===t||95===t?e.check(iu,l,s)(t):null===t||ii(t)||ci(t)||45!==t&&li(t)?l(t):(a=!0,e.consume(t),i)}function s(t){return 95===t?r=!0:(o=r,r=void 0),e.consume(t),i}function l(e){return o||r||!a?n(e):t(e)}},partial:!0},au={tokenize:function(e,t){let n=0,r=0;return o;function o(i){return 40===i?(n++,e.consume(i),o):41===i&&r<n?a(i):33===i||34===i||38===i||39===i||41===i||42===i||44===i||46===i||58===i||59===i||60===i||63===i||93===i||95===i||126===i?e.check(iu,t,a)(i):null===i||ii(i)||ci(i)?t(i):(e.consume(i),o)}function a(t){return 41===t&&r++,e.consume(t),o}},partial:!0},iu={tokenize:function(e,t,n){return r;function r(i){return 33===i||34===i||39===i||41===i||42===i||44===i||46===i||58===i||59===i||63===i||95===i||126===i?(e.consume(i),r):38===i?(e.consume(i),a):93===i?(e.consume(i),o):60===i||null===i||ii(i)||ci(i)?t(i):n(i)}function o(e){return null===e||40===e||91===e||ii(e)||ci(e)?t(e):r(e)}function a(e){return Qa(e)?i(e):n(e)}function i(t){return 59===t?(e.consume(t),r):Qa(t)?(e.consume(t),i):n(t)}},partial:!0},su={tokenize:function(e,t,n){return function(t){return e.consume(t),r};function r(e){return Ja(e)?n(e):t(e)}},partial:!0},lu={name:"wwwAutolink",tokenize:function(e,t,n){const r=this;return function(t){if(87!==t&&119!==t||!fu.call(r,r.previous)||bu(r.events))return n(t);return e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(ru,e.attempt(ou,e.attempt(au,o),n),n)(t)};function o(n){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(n)}},previous:fu},cu={name:"protocolAutolink",tokenize:function(e,t,n){const r=this;let o="",a=!1;return function(t){if((72===t||104===t)&&gu.call(r,r.previous)&&!bu(r.events))return e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),o+=String.fromCodePoint(t),e.consume(t),i;return n(t)};function i(t){if(Qa(t)&&o.length<5)return o+=String.fromCodePoint(t),e.consume(t),i;if(58===t){const n=o.toLowerCase();if("http"===n||"https"===n)return e.consume(t),s}return n(t)}function s(t){return 47===t?(e.consume(t),a?l:(a=!0,s)):n(t)}function l(t){return null===t||ti(t)||ii(t)||ci(t)||li(t)?n(t):e.attempt(ou,e.attempt(au,c),n)(t)}function c(n){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(n)}},previous:gu},uu={name:"emailAutolink",tokenize:function(e,t,n){const r=this;let o,a;return function(t){if(!hu(t)||!mu.call(r,r.previous)||bu(r.events))return n(t);return e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),i(t)};function i(t){return hu(t)?(e.consume(t),i):64===t?(e.consume(t),s):n(t)}function s(t){return 46===t?e.check(su,c,l)(t):45===t||95===t||Ja(t)?(a=!0,e.consume(t),s):c(t)}function l(t){return e.consume(t),o=!0,s}function c(i){return a&&o&&Qa(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(i)):n(i)}},previous:mu},du={};let pu=48;for(;pu<123;)du[pu]=uu,pu++,58===pu?pu=65:91===pu&&(pu=97);function fu(e){return null===e||40===e||42===e||95===e||91===e||93===e||126===e||ii(e)}function gu(e){return!Qa(e)}function mu(e){return!(47===e||hu(e))}function hu(e){return 43===e||45===e||46===e||95===e||Ja(e)}function bu(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if(("labelLink"===r.type||"labelImage"===r.type)&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}du[43]=uu,du[45]=uu,du[46]=uu,du[95]=uu,du[72]=[uu,cu],du[104]=[uu,cu],du[87]=[uu,lu],du[119]=[uu,lu];const yu={tokenize:function(e,t,n){const r=this;return pi(e,function(e){const o=r.events[r.events.length-1];return o&&"gfmFootnoteDefinitionIndent"===o[1].type&&4===o[2].sliceSerialize(o[1],!0).length?t(e):n(e)},"gfmFootnoteDefinitionIndent",5)},partial:!0};function vu(e,t,n){const r=this;let o=r.events.length;const a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let i;for(;o--;){const e=r.events[o][1];if("labelImage"===e.type){i=e;break}if("gfmFootnoteCall"===e.type||"labelLink"===e.type||"label"===e.type||"image"===e.type||"link"===e.type)break}return function(o){if(!i||!i._balanced)return n(o);const s=Za(r.sliceSerialize({start:i.end,end:r.now()}));if(94!==s.codePointAt(0)||!a.includes(s.slice(1)))return n(o);return e.enter("gfmFootnoteCallLabelMarker"),e.consume(o),e.exit("gfmFootnoteCallLabelMarker"),t(o)}}function wu(e,t){let n=e.length;for(;n--;)if("labelImage"===e[n][1].type&&"enter"===e[n][0]){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},o={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};o.end.column++,o.end.offset++,o.end._bufferIndex++;const a={type:"gfmFootnoteCallString",start:Object.assign({},o.end),end:Object.assign({},e[e.length-1][1].start)},i={type:"chunkString",contentType:"string",start:Object.assign({},a.start),end:Object.assign({},a.end)},s=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",o,t],["exit",o,t],["enter",a,t],["enter",i,t],["exit",i,t],["exit",a,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...s),e}function Su(e,t,n){const r=this,o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a,i=0;return function(t){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(t),e.exit("gfmFootnoteCallLabelMarker"),s};function s(t){return 94!==t?n(t):(e.enter("gfmFootnoteCallMarker"),e.consume(t),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",l)}function l(s){if(i>999||93===s&&!a||null===s||91===s||ii(s))return n(s);if(93===s){e.exit("chunkString");const a=e.exit("gfmFootnoteCallString");return o.includes(Za(r.sliceSerialize(a)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(s),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(s)}return ii(s)||(a=!0),i++,e.consume(s),92===s?c:l}function c(t){return 91===t||92===t||93===t?(e.consume(t),i++,l):l(t)}}function xu(e,t,n){const r=this,o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a,i,s=0;return function(t){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionLabelMarker"),l};function l(t){return 94===t?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",c):n(t)}function c(t){if(s>999||93===t&&!i||null===t||91===t||ii(t))return n(t);if(93===t){e.exit("chunkString");const n=e.exit("gfmFootnoteDefinitionLabelString");return a=Za(r.sliceSerialize(n)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),d}return ii(t)||(i=!0),s++,e.consume(t),92===t?u:c}function u(t){return 91===t||92===t||93===t?(e.consume(t),s++,c):c(t)}function d(t){return 58===t?(e.enter("definitionMarker"),e.consume(t),e.exit("definitionMarker"),o.includes(a)||o.push(a),pi(e,p,"gfmFootnoteDefinitionWhitespace")):n(t)}function p(e){return t(e)}}function Eu(e,t,n){return e.check(Si,t,e.attempt(yu,t,n))}function ku(e){e.exit("gfmFootnoteDefinition")}function Au(e){let t=(e||{}).singleTilde;const n={name:"strikethrough",tokenize:function(e,n,r){const o=this.previous,a=this.events;let i=0;return function(t){if(126===o&&"characterEscape"!==a[a.length-1][1].type)return r(t);return e.enter("strikethroughSequenceTemporary"),s(t)};function s(a){const l=hi(o);if(126===a)return i>1?r(a):(e.consume(a),i++,s);if(i<2&&!t)return r(a);const c=e.exit("strikethroughSequenceTemporary"),u=hi(a);return c._open=!u||2===u&&Boolean(l),c._close=!l||2===l&&Boolean(u),n(a)}},resolveAll:function(e,t){let n=-1;for(;++n<e.length;)if("enter"===e[n][0]&&"strikethroughSequenceTemporary"===e[n][1].type&&e[n][1]._close){let r=n;for(;r--;)if("exit"===e[r][0]&&"strikethroughSequenceTemporary"===e[r][1].type&&e[r][1]._open&&e[n][1].end.offset-e[n][1].start.offset===e[r][1].end.offset-e[r][1].start.offset){e[n][1].type="strikethroughSequence",e[r][1].type="strikethroughSequence";const o={type:"strikethrough",start:Object.assign({},e[r][1].start),end:Object.assign({},e[n][1].end)},a={type:"strikethroughText",start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},i=[["enter",o,t],["enter",e[r][1],t],["exit",e[r][1],t],["enter",a,t]],s=t.parser.constructs.insideSpan.null;s&&qa(i,i.length,0,bi(s,e.slice(r+1,n),t)),qa(i,i.length,0,[["exit",a,t],["enter",e[n][1],t],["exit",e[n][1],t],["exit",o,t]]),qa(e,r-1,n-r+3,i),n=r+i.length-2;break}}n=-1;for(;++n<e.length;)"strikethroughSequenceTemporary"===e[n][1].type&&(e[n][1].type="data");return e}};return null==t&&(t=!0),{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}}}class Tu{constructor(){this.map=[]}add(e,t,n){!function(e,t,n,r){let o=0;if(0===n&&0===r.length)return;for(;o<e.map.length;){if(e.map[o][0]===t)return e.map[o][1]+=n,void e.map[o][2].push(...r);o+=1}e.map.push([t,n,r])}(this,e,t,n)}consume(e){if(this.map.sort(function(e,t){return e[0]-t[0]}),0===this.map.length)return;let t=this.map.length;const n=[];for(;t>0;)t-=1,n.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];n.push(e.slice()),e.length=0;let r=n.pop();for(;r;){for(const t of r)e.push(t);r=n.pop()}this.map.length=0}}function Ou(e,t){let n=!1;const r=[];for(;t<e.length;){const o=e[t];if(n){if("enter"===o[0])"tableContent"===o[1].type&&r.push("tableDelimiterMarker"===e[t+1][1].type?"left":"none");else if("tableContent"===o[1].type){if("tableDelimiterMarker"===e[t-1][1].type){const e=r.length-1;r[e]="left"===r[e]?"center":"right"}}else if("tableDelimiterRow"===o[1].type)break}else"enter"===o[0]&&"tableDelimiterRow"===o[1].type&&(n=!0);t+=1}return r}function Cu(e,t,n){const r=this;let o,a=0,i=0;return function(e){let t=r.events.length-1;for(;t>-1;){const e=r.events[t][1].type;if("lineEnding"!==e&&"linePrefix"!==e)break;t--}const o=t>-1?r.events[t][1].type:null,a="tableHead"===o||"tableRow"===o?w:s;if(a===w&&r.parser.lazy[r.now().line])return n(e);return a(e)};function s(t){return e.enter("tableHead"),e.enter("tableRow"),function(e){if(124===e)return l(e);return o=!0,i+=1,l(e)}(t)}function l(t){return null===t?n(t):ai(t)?i>1?(i=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),d):n(t):si(t)?pi(e,l,"whitespace")(t):(i+=1,o&&(o=!1,a+=1),124===t?(e.enter("tableCellDivider"),e.consume(t),e.exit("tableCellDivider"),o=!0,l):(e.enter("data"),c(t)))}function c(t){return null===t||124===t||ii(t)?(e.exit("data"),l(t)):(e.consume(t),92===t?u:c)}function u(t){return 92===t||124===t?(e.consume(t),c):c(t)}function d(t){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(t):(e.enter("tableDelimiterRow"),o=!1,si(t)?pi(e,p,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):p(t))}function p(t){return 45===t||58===t?g(t):124===t?(o=!0,e.enter("tableCellDivider"),e.consume(t),e.exit("tableCellDivider"),f):v(t)}function f(t){return si(t)?pi(e,g,"whitespace")(t):g(t)}function g(t){return 58===t?(i+=1,o=!0,e.enter("tableDelimiterMarker"),e.consume(t),e.exit("tableDelimiterMarker"),m):45===t?(i+=1,m(t)):null===t||ai(t)?y(t):v(t)}function m(t){return 45===t?(e.enter("tableDelimiterFiller"),h(t)):v(t)}function h(t){return 45===t?(e.consume(t),h):58===t?(o=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(t),e.exit("tableDelimiterMarker"),b):(e.exit("tableDelimiterFiller"),b(t))}function b(t){return si(t)?pi(e,y,"whitespace")(t):y(t)}function y(n){return 124===n?p(n):(null===n||ai(n))&&o&&a===i?(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(n)):v(n)}function v(e){return n(e)}function w(t){return e.enter("tableRow"),S(t)}function S(n){return 124===n?(e.enter("tableCellDivider"),e.consume(n),e.exit("tableCellDivider"),S):null===n||ai(n)?(e.exit("tableRow"),t(n)):si(n)?pi(e,S,"whitespace")(n):(e.enter("data"),x(n))}function x(t){return null===t||124===t||ii(t)?(e.exit("data"),S(t)):(e.consume(t),92===t?E:x)}function E(t){return 92===t||124===t?(e.consume(t),x):x(t)}}function Iu(e,t){let n,r,o,a=-1,i=!0,s=0,l=[0,0,0,0],c=[0,0,0,0],u=!1,d=0;const p=new Tu;for(;++a<e.length;){const f=e[a],g=f[1];"enter"===f[0]?"tableHead"===g.type?(u=!1,0!==d&&(Ru(p,t,d,n,r),r=void 0,d=0),n={type:"table",start:Object.assign({},g.start),end:Object.assign({},g.end)},p.add(a,0,[["enter",n,t]])):"tableRow"===g.type||"tableDelimiterRow"===g.type?(i=!0,o=void 0,l=[0,0,0,0],c=[0,a+1,0,0],u&&(u=!1,r={type:"tableBody",start:Object.assign({},g.start),end:Object.assign({},g.end)},p.add(a,0,[["enter",r,t]])),s="tableDelimiterRow"===g.type?2:r?3:1):!s||"data"!==g.type&&"tableDelimiterMarker"!==g.type&&"tableDelimiterFiller"!==g.type?"tableCellDivider"===g.type&&(i?i=!1:(0!==l[1]&&(c[0]=c[1],o=Nu(p,t,l,s,void 0,o)),l=c,c=[l[1],a,0,0])):(i=!1,0===c[2]&&(0!==l[1]&&(c[0]=c[1],o=Nu(p,t,l,s,void 0,o),l=[0,0,0,0]),c[2]=a)):"tableHead"===g.type?(u=!0,d=a):"tableRow"===g.type||"tableDelimiterRow"===g.type?(d=a,0!==l[1]?(c[0]=c[1],o=Nu(p,t,l,s,a,o)):0!==c[1]&&(o=Nu(p,t,c,s,a,o)),s=0):!s||"data"!==g.type&&"tableDelimiterMarker"!==g.type&&"tableDelimiterFiller"!==g.type||(c[3]=a)}for(0!==d&&Ru(p,t,d,n,r),p.consume(t.events),a=-1;++a<t.events.length;){const e=t.events[a];"enter"===e[0]&&"table"===e[1].type&&(e[1]._align=Ou(t.events,a))}return e}function Nu(e,t,n,r,o,a){const i=1===r?"tableHeader":2===r?"tableDelimiter":"tableData";0!==n[0]&&(a.end=Object.assign({},_u(t.events,n[0])),e.add(n[0],0,[["exit",a,t]]));const s=_u(t.events,n[1]);if(a={type:i,start:Object.assign({},s),end:Object.assign({},s)},e.add(n[1],0,[["enter",a,t]]),0!==n[2]){const o=_u(t.events,n[2]),a=_u(t.events,n[3]),i={type:"tableContent",start:Object.assign({},o),end:Object.assign({},a)};if(e.add(n[2],0,[["enter",i,t]]),2!==r){const r=t.events[n[2]],o=t.events[n[3]];if(r[1].end=Object.assign({},o[1].end),r[1].type="chunkText",r[1].contentType="text",n[3]>n[2]+1){const t=n[2]+1,r=n[3]-n[2]-1;e.add(t,r,[])}}e.add(n[3]+1,0,[["exit",i,t]])}return void 0!==o&&(a.end=Object.assign({},_u(t.events,o)),e.add(o,0,[["exit",a,t]]),a=void 0),a}function Ru(e,t,n,r,o){const a=[],i=_u(t.events,n);o&&(o.end=Object.assign({},i),a.push(["exit",o,t])),r.end=Object.assign({},i),a.push(["exit",r,t]),e.add(n+1,0,a)}function _u(e,t){const n=e[t],r="enter"===n[0]?"start":"end";return n[1][r]}const Pu={name:"tasklistCheck",tokenize:function(e,t,n){const r=this;return function(t){if(null!==r.previous||!r._gfmTasklistFirstContentOfListItem)return n(t);return e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(t),e.exit("taskListCheckMarker"),o};function o(t){return ii(t)?(e.enter("taskListCheckValueUnchecked"),e.consume(t),e.exit("taskListCheckValueUnchecked"),a):88===t||120===t?(e.enter("taskListCheckValueChecked"),e.consume(t),e.exit("taskListCheckValueChecked"),a):n(t)}function a(t){return 93===t?(e.enter("taskListCheckMarker"),e.consume(t),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),i):n(t)}function i(r){return ai(r)?t(r):si(r)?e.check({tokenize:Lu},t,n)(r):n(r)}}};function Lu(e,t,n){return pi(e,function(e){return null===e?n(e):t(e)},"whitespace")}const Du={};function Mu(e){const t=e||Du,n=this.data(),r=n.micromarkExtensions||(n.micromarkExtensions=[]),o=n.fromMarkdownExtensions||(n.fromMarkdownExtensions=[]),a=n.toMarkdownExtensions||(n.toMarkdownExtensions=[]);r.push(function(e){return Wa([{text:du},{document:{91:{name:"gfmFootnoteDefinition",tokenize:xu,continuation:{tokenize:Eu},exit:ku}},text:{91:{name:"gfmFootnoteCall",tokenize:Su},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:vu,resolveTo:wu}}},Au(e),{flow:{null:{name:"table",tokenize:Cu,resolveAll:Iu}}},{text:{91:Pu}}])}(t)),o.push([{transforms:[nc],enter:{literalAutolink:Xl,literalAutolinkEmail:Zl,literalAutolinkHttp:Zl,literalAutolinkWww:Zl},exit:{literalAutolink:tc,literalAutolinkEmail:ec,literalAutolinkHttp:Ql,literalAutolinkWww:Jl}},{enter:{gfmFootnoteCallString:ic,gfmFootnoteCall:sc,gfmFootnoteDefinitionLabelString:lc,gfmFootnoteDefinition:cc},exit:{gfmFootnoteCallString:uc,gfmFootnoteCall:dc,gfmFootnoteDefinitionLabelString:pc,gfmFootnoteDefinition:fc}},{canContainEols:["delete"],enter:{strikethrough:vc},exit:{strikethrough:wc}},{enter:{table:Vc,tableData:Xc,tableHeader:Xc,tableRow:Yc},exit:{codeText:Zc,table:Wc,tableData:Kc,tableHeader:Kc,tableRow:Kc}},{exit:{taskListCheckValueChecked:eu,taskListCheckValueUnchecked:eu,paragraph:tu}}]),a.push(function(e){return{extensions:[{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Yl,notInConstruct:Kl},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Yl,notInConstruct:Kl},{character:":",before:"[ps]",after:"\\/",inConstruct:Yl,notInConstruct:Kl}]},mc(e),{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:yc}],handlers:{delete:Sc}},Jc(e),{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:nu}}]}}(t))}function ju(){return{type:"break"}}function Fu(){return function(e){!function(e){Hl(e,[/\r?\n|\r/g,ju])}(e)}}function Bu(){return e=>{Mn(e,"listItem",e=>{Mn(e,"break",(e,t,n)=>{n&&void 0!==t&&(n.children[t]={type:"text",value:"\n"})})})}}function Uu(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function zu(e){return function(e){if(Array.isArray(e))return Uu(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return Uu(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Uu(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function $u(e){return $u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},$u(e)}function Gu(e){var t=function(e,t){if("object"!=$u(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=$u(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==$u(t)?t:t+""}function qu(e,t,n){return(t=Gu(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Hu(){return Hu=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Hu.apply(null,arguments)}function Vu(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Wu(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Vu(Object(n),!0).forEach(function(t){qu(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Vu(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var Yu={};function Ku(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0;return function(e){if(0===e.length||1===e.length)return e;var t,n,r=e.join(".");return Yu[r]||(Yu[r]=0===(n=(t=e).length)||1===n?t:2===n?[t[0],t[1],"".concat(t[0],".").concat(t[1]),"".concat(t[1],".").concat(t[0])]:3===n?[t[0],t[1],t[2],"".concat(t[0],".").concat(t[1]),"".concat(t[0],".").concat(t[2]),"".concat(t[1],".").concat(t[0]),"".concat(t[1],".").concat(t[2]),"".concat(t[2],".").concat(t[0]),"".concat(t[2],".").concat(t[1]),"".concat(t[0],".").concat(t[1],".").concat(t[2]),"".concat(t[0],".").concat(t[2],".").concat(t[1]),"".concat(t[1],".").concat(t[0],".").concat(t[2]),"".concat(t[1],".").concat(t[2],".").concat(t[0]),"".concat(t[2],".").concat(t[0],".").concat(t[1]),"".concat(t[2],".").concat(t[1],".").concat(t[0])]:n>=4?[t[0],t[1],t[2],t[3],"".concat(t[0],".").concat(t[1]),"".concat(t[0],".").concat(t[2]),"".concat(t[0],".").concat(t[3]),"".concat(t[1],".").concat(t[0]),"".concat(t[1],".").concat(t[2]),"".concat(t[1],".").concat(t[3]),"".concat(t[2],".").concat(t[0]),"".concat(t[2],".").concat(t[1]),"".concat(t[2],".").concat(t[3]),"".concat(t[3],".").concat(t[0]),"".concat(t[3],".").concat(t[1]),"".concat(t[3],".").concat(t[2]),"".concat(t[0],".").concat(t[1],".").concat(t[2]),"".concat(t[0],".").concat(t[1],".").concat(t[3]),"".concat(t[0],".").concat(t[2],".").concat(t[1]),"".concat(t[0],".").concat(t[2],".").concat(t[3]),"".concat(t[0],".").concat(t[3],".").concat(t[1]),"".concat(t[0],".").concat(t[3],".").concat(t[2]),"".concat(t[1],".").concat(t[0],".").concat(t[2]),"".concat(t[1],".").concat(t[0],".").concat(t[3]),"".concat(t[1],".").concat(t[2],".").concat(t[0]),"".concat(t[1],".").concat(t[2],".").concat(t[3]),"".concat(t[1],".").concat(t[3],".").concat(t[0]),"".concat(t[1],".").concat(t[3],".").concat(t[2]),"".concat(t[2],".").concat(t[0],".").concat(t[1]),"".concat(t[2],".").concat(t[0],".").concat(t[3]),"".concat(t[2],".").concat(t[1],".").concat(t[0]),"".concat(t[2],".").concat(t[1],".").concat(t[3]),"".concat(t[2],".").concat(t[3],".").concat(t[0]),"".concat(t[2],".").concat(t[3],".").concat(t[1]),"".concat(t[3],".").concat(t[0],".").concat(t[1]),"".concat(t[3],".").concat(t[0],".").concat(t[2]),"".concat(t[3],".").concat(t[1],".").concat(t[0]),"".concat(t[3],".").concat(t[1],".").concat(t[2]),"".concat(t[3],".").concat(t[2],".").concat(t[0]),"".concat(t[3],".").concat(t[2],".").concat(t[1]),"".concat(t[0],".").concat(t[1],".").concat(t[2],".").concat(t[3]),"".concat(t[0],".").concat(t[1],".").concat(t[3],".").concat(t[2]),"".concat(t[0],".").concat(t[2],".").concat(t[1],".").concat(t[3]),"".concat(t[0],".").concat(t[2],".").concat(t[3],".").concat(t[1]),"".concat(t[0],".").concat(t[3],".").concat(t[1],".").concat(t[2]),"".concat(t[0],".").concat(t[3],".").concat(t[2],".").concat(t[1]),"".concat(t[1],".").concat(t[0],".").concat(t[2],".").concat(t[3]),"".concat(t[1],".").concat(t[0],".").concat(t[3],".").concat(t[2]),"".concat(t[1],".").concat(t[2],".").concat(t[0],".").concat(t[3]),"".concat(t[1],".").concat(t[2],".").concat(t[3],".").concat(t[0]),"".concat(t[1],".").concat(t[3],".").concat(t[0],".").concat(t[2]),"".concat(t[1],".").concat(t[3],".").concat(t[2],".").concat(t[0]),"".concat(t[2],".").concat(t[0],".").concat(t[1],".").concat(t[3]),"".concat(t[2],".").concat(t[0],".").concat(t[3],".").concat(t[1]),"".concat(t[2],".").concat(t[1],".").concat(t[0],".").concat(t[3]),"".concat(t[2],".").concat(t[1],".").concat(t[3],".").concat(t[0]),"".concat(t[2],".").concat(t[3],".").concat(t[0],".").concat(t[1]),"".concat(t[2],".").concat(t[3],".").concat(t[1],".").concat(t[0]),"".concat(t[3],".").concat(t[0],".").concat(t[1],".").concat(t[2]),"".concat(t[3],".").concat(t[0],".").concat(t[2],".").concat(t[1]),"".concat(t[3],".").concat(t[1],".").concat(t[0],".").concat(t[2]),"".concat(t[3],".").concat(t[1],".").concat(t[2],".").concat(t[0]),"".concat(t[3],".").concat(t[2],".").concat(t[0],".").concat(t[1]),"".concat(t[3],".").concat(t[2],".").concat(t[1],".").concat(t[0])]:void 0),Yu[r]}(e.filter(function(e){return"token"!==e})).reduce(function(e,t){return Wu(Wu({},e),n[t])},t)}function Xu(e){return e.join(" ")}function Zu(t){var n=t.node,r=t.stylesheet,o=t.style,a=void 0===o?{}:o,i=t.useInlineStyles,s=t.key,l=n.properties,c=n.type,u=n.tagName,d=n.value;if("text"===c)return d;if(u){var p,f=function(e,t){var n=0;return function(r){return n+=1,r.map(function(r,o){return Zu({node:r,stylesheet:e,useInlineStyles:t,key:"code-segment-".concat(n,"-").concat(o)})})}}(r,i);if(i){var g=Object.keys(r).reduce(function(e,t){return t.split(".").forEach(function(t){e.includes(t)||e.push(t)}),e},[]),m=l.className&&l.className.includes("token")?["token"]:[],h=l.className&&m.concat(l.className.filter(function(e){return!g.includes(e)}));p=Wu(Wu({},l),{},{className:Xu(h)||void 0,style:Ku(l.className,Object.assign({},l.style,a),r)})}else p=Wu(Wu({},l),{},{className:Xu(l.className)});var b=f(n.children);return e.createElement(u,Hu({key:s},p),b)}}var Qu=["language","children","style","customStyle","codeTagProps","useInlineStyles","showLineNumbers","showInlineLineNumbers","startingLineNumber","lineNumberContainerStyle","lineNumberStyle","wrapLines","wrapLongLines","lineProps","renderer","PreTag","CodeTag","code","astGenerator"];function Ju(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function ed(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ju(Object(n),!0).forEach(function(t){qu(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ju(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var td=/\n/g;function nd(t){var n=t.codeString,r=t.codeStyle,o=t.containerStyle,a=void 0===o?{float:"left",paddingRight:"10px"}:o,i=t.numberStyle,s=void 0===i?{}:i,l=t.startingLineNumber;return e.createElement("code",{style:Object.assign({},r,a)},function(t){var n=t.lines,r=t.startingLineNumber,o=t.style;return n.map(function(t,n){var a=n+r;return e.createElement("span",{key:"line-".concat(n),className:"react-syntax-highlighter-line-number",style:"function"==typeof o?o(a):o},"".concat(a,"\n"))})}({lines:n.replace(/\n$/,"").split("\n"),style:s,startingLineNumber:l}))}function rd(e){return"".concat(e.toString().length,".25em")}function od(e,t){return{type:"element",tagName:"span",properties:{key:"line-number--".concat(e),className:["comment","linenumber","react-syntax-highlighter-line-number"],style:t},children:[{type:"text",value:e}]}}function ad(e,t,n){var r={display:"inline-block",minWidth:rd(n),paddingRight:"1em",textAlign:"right",userSelect:"none"},o="function"==typeof e?e(t):e;return ed(ed({},r),o)}function id(e){var t=e.children,n=e.lineNumber,r=e.lineNumberStyle,o=e.largestLineNumber,a=e.showInlineLineNumbers,i=e.lineProps,s=void 0===i?{}:i,l=e.className,c=void 0===l?[]:l,u=e.showLineNumbers,d=e.wrapLongLines,p=e.wrapLines,f=void 0!==p&&p?ed({},"function"==typeof s?s(n):s):{};if(f.className=f.className?[].concat(zu(f.className.trim().split(/\s+/)),zu(c)):c,n&&a){var g=ad(r,n,o);t.unshift(od(n,g))}return d&u&&(f.style=ed({display:"flex"},f.style)),{type:"element",tagName:"span",properties:f,children:t}}function sd(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],r=0;r<e.length;r++){var o=e[r];if("text"===o.type)n.push(id({children:[o],className:zu(new Set(t))}));else if(o.children){var a=t.concat(o.properties.className);sd(o.children,a).forEach(function(e){return n.push(e)})}}return n}function ld(e,t,n,r,o,a,i,s,l){var c,u=sd(e.value),d=[],p=-1,f=0;function g(e,a){var c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];return t||c.length>0?function(e,a){return id({children:e,lineNumber:a,lineNumberStyle:s,largestLineNumber:i,showInlineLineNumbers:o,lineProps:n,className:arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],showLineNumbers:r,wrapLongLines:l,wrapLines:t})}(e,a,c):function(e,t){if(r&&t&&o){var n=ad(s,t,i);e.unshift(od(t,n))}return e}(e,a)}for(var m=function(){var e=u[f],t=e.children[0].value;if(t.match(td)){var n=t.split("\n");n.forEach(function(t,o){var i=r&&d.length+a,s={type:"text",value:"".concat(t,"\n")};if(0===o){var l=g(u.slice(p+1,f).concat(id({children:[s],className:e.properties.className})),i);d.push(l)}else if(o===n.length-1){var c=u[f+1]&&u[f+1].children&&u[f+1].children[0],m={type:"text",value:"".concat(t)};if(c){var h=id({children:[m],className:e.properties.className});u.splice(f+1,0,h)}else{var b=g([m],i,e.properties.className);d.push(b)}}else{var y=g([s],i,e.properties.className);d.push(y)}}),p=f}f++};f<u.length;)m();if(p!==u.length-1){var h=u.slice(p+1,u.length);if(h&&h.length){var b=g(h,r&&d.length+a);d.push(b)}}return t?d:(c=[]).concat.apply(c,d)}function cd(e){var t=e.rows,n=e.stylesheet,r=e.useInlineStyles;return t.map(function(e,t){return Zu({node:e,stylesheet:n,useInlineStyles:r,key:"code-segment-".concat(t)})})}function ud(e){return e&&void 0!==e.highlightAuto}var dd=function(){for(var e={},t=0;t<arguments.length;t++){var n=arguments[t];for(var r in n)pd.call(n,r)&&(e[r]=n[r])}return e},pd=Object.prototype.hasOwnProperty;var fd=md,gd=md.prototype;function md(e,t,n){this.property=e,this.normal=t,n&&(this.space=n)}gd.space=null,gd.normal={},gd.property={};var hd=dd,bd=fd,yd=function(e){var t,n,r=e.length,o=[],a=[],i=-1;for(;++i<r;)t=e[i],o.push(t.property),a.push(t.normal),n=t.space;return new bd(hd.apply(null,o),hd.apply(null,a),n)};var vd=function(e){return e.toLowerCase()};var wd=xd,Sd=xd.prototype;function xd(e,t){this.property=e,this.attribute=t}Sd.space=null,Sd.attribute=null,Sd.property=null,Sd.boolean=!1,Sd.booleanish=!1,Sd.overloadedBoolean=!1,Sd.number=!1,Sd.commaSeparated=!1,Sd.spaceSeparated=!1,Sd.commaOrSpaceSeparated=!1,Sd.mustUseProperty=!1,Sd.defined=!1;var Ed={},kd=0;function Ad(){return Math.pow(2,++kd)}Ed.boolean=Ad(),Ed.booleanish=Ad(),Ed.overloadedBoolean=Ad(),Ed.number=Ad(),Ed.spaceSeparated=Ad(),Ed.commaSeparated=Ad(),Ed.commaOrSpaceSeparated=Ad();var Td=wd,Od=Ed,Cd=Rd;Rd.prototype=new Td,Rd.prototype.defined=!0;var Id=["boolean","booleanish","overloadedBoolean","number","commaSeparated","spaceSeparated","commaOrSpaceSeparated"],Nd=Id.length;function Rd(e,t,n,r){var o,a=-1;for(_d(this,"space",r),Td.call(this,e,t);++a<Nd;)_d(this,o=Id[a],(n&Od[o])===Od[o])}function _d(e,t,n){n&&(e[t]=n)}var Pd=vd,Ld=fd,Dd=Cd,Md=function(e){var t,n,r=e.space,o=e.mustUseProperty||[],a=e.attributes||{},i=e.properties,s=e.transform,l={},c={};for(t in i)n=new Dd(t,s(a,t),i[t],r),-1!==o.indexOf(t)&&(n.mustUseProperty=!0),l[t]=n,c[Pd(t)]=t,c[Pd(n.attribute)]=t;return new Ld(l,c,r)};var jd=Md({space:"xlink",transform:function(e,t){return"xlink:"+t.slice(5).toLowerCase()},properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null}});var Fd=Md({space:"xml",transform:function(e,t){return"xml:"+t.slice(3).toLowerCase()},properties:{xmlLang:null,xmlBase:null,xmlSpace:null}});var Bd=function(e,t){return t in e?e[t]:t};var Ud=Bd,zd=function(e,t){return Ud(e,t.toLowerCase())};var $d=Md({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:zd,properties:{xmlns:null,xmlnsXLink:null}}),Gd=Ed,qd=Md,Hd=Gd.booleanish,Vd=Gd.number,Wd=Gd.spaceSeparated,Yd=qd({transform:function(e,t){return"role"===t?t:"aria-"+t.slice(4).toLowerCase()},properties:{ariaActiveDescendant:null,ariaAtomic:Hd,ariaAutoComplete:null,ariaBusy:Hd,ariaChecked:Hd,ariaColCount:Vd,ariaColIndex:Vd,ariaColSpan:Vd,ariaControls:Wd,ariaCurrent:null,ariaDescribedBy:Wd,ariaDetails:null,ariaDisabled:Hd,ariaDropEffect:Wd,ariaErrorMessage:null,ariaExpanded:Hd,ariaFlowTo:Wd,ariaGrabbed:Hd,ariaHasPopup:null,ariaHidden:Hd,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Wd,ariaLevel:Vd,ariaLive:null,ariaModal:Hd,ariaMultiLine:Hd,ariaMultiSelectable:Hd,ariaOrientation:null,ariaOwns:Wd,ariaPlaceholder:null,ariaPosInSet:Vd,ariaPressed:Hd,ariaReadOnly:Hd,ariaRelevant:null,ariaRequired:Hd,ariaRoleDescription:Wd,ariaRowCount:Vd,ariaRowIndex:Vd,ariaRowSpan:Vd,ariaSelected:Hd,ariaSetSize:Vd,ariaSort:null,ariaValueMax:Vd,ariaValueMin:Vd,ariaValueNow:Vd,ariaValueText:null,role:null}});var Kd=Ed,Xd=Md,Zd=zd,Qd=Kd.boolean,Jd=Kd.overloadedBoolean,ep=Kd.booleanish,tp=Kd.number,np=Kd.spaceSeparated,rp=Kd.commaSeparated,op=yd([Fd,jd,$d,Yd,Xd({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:Zd,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:rp,acceptCharset:np,accessKey:np,action:null,allow:null,allowFullScreen:Qd,allowPaymentRequest:Qd,allowUserMedia:Qd,alt:null,as:null,async:Qd,autoCapitalize:null,autoComplete:np,autoFocus:Qd,autoPlay:Qd,capture:Qd,charSet:null,checked:Qd,cite:null,className:np,cols:tp,colSpan:null,content:null,contentEditable:ep,controls:Qd,controlsList:np,coords:tp|rp,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Qd,defer:Qd,dir:null,dirName:null,disabled:Qd,download:Jd,draggable:ep,encType:null,enterKeyHint:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Qd,formTarget:null,headers:np,height:tp,hidden:Qd,high:tp,href:null,hrefLang:null,htmlFor:np,httpEquiv:np,id:null,imageSizes:null,imageSrcSet:rp,inputMode:null,integrity:null,is:null,isMap:Qd,itemId:null,itemProp:np,itemRef:np,itemScope:Qd,itemType:np,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Qd,low:tp,manifest:null,max:null,maxLength:tp,media:null,method:null,min:null,minLength:tp,multiple:Qd,muted:Qd,name:null,nonce:null,noModule:Qd,noValidate:Qd,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforePrint:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextMenu: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,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:Qd,optimum:tp,pattern:null,ping:np,placeholder:null,playsInline:Qd,poster:null,preload:null,readOnly:Qd,referrerPolicy:null,rel:np,required:Qd,reversed:Qd,rows:tp,rowSpan:tp,sandbox:np,scope:null,scoped:Qd,seamless:Qd,selected:Qd,shape:null,size:tp,sizes:null,slot:null,span:tp,spellCheck:ep,src:null,srcDoc:null,srcLang:null,srcSet:rp,start:tp,step:null,style:null,tabIndex:tp,target:null,title:null,translate:null,type:null,typeMustMatch:Qd,useMap:null,value:ep,width:tp,wrap:null,align:null,aLink:null,archive:np,axis:null,background:null,bgColor:null,border:tp,borderColor:null,bottomMargin:tp,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Qd,declare:Qd,event:null,face:null,frame:null,frameBorder:null,hSpace:tp,leftMargin:tp,link:null,longDesc:null,lowSrc:null,marginHeight:tp,marginWidth:tp,noResize:Qd,noHref:Qd,noShade:Qd,noWrap:Qd,object:null,profile:null,prompt:null,rev:null,rightMargin:tp,rules:null,scheme:null,scrolling:ep,standby:null,summary:null,text:null,topMargin:tp,valueType:null,version:null,vAlign:null,vLink:null,vSpace:tp,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Qd,disableRemotePlayback:Qd,prefix:null,property:null,results:tp,security:null,unselectable:null}})]),ap=vd,ip=Cd,sp=wd,lp="data",cp=function(e,t){var n=ap(t),r=t,o=sp;if(n in e.normal)return e.property[e.normal[n]];n.length>4&&n.slice(0,4)===lp&&up.test(t)&&("-"===t.charAt(4)?r=function(e){var t=e.slice(5).replace(dp,gp);return lp+t.charAt(0).toUpperCase()+t.slice(1)}(t):t=function(e){var t=e.slice(4);if(dp.test(t))return e;t=t.replace(pp,fp),"-"!==t.charAt(0)&&(t="-"+t);return lp+t}(t),o=ip);return new o(r,t)},up=/^data[-\w.:]+$/i,dp=/-[a-z]/g,pp=/[A-Z]/g;function fp(e){return"-"+e.toLowerCase()}function gp(e){return e.charAt(1).toUpperCase()}var mp=function(e,t){var n,r,o,a=e||"",i=t||"div",s={},l=0;for(;l<a.length;)hp.lastIndex=l,o=hp.exec(a),(n=a.slice(l,o?o.index:a.length))&&(r?"#"===r?s.id=n:s.className?s.className.push(n):s.className=[n]:i=n,l+=n.length),o&&(r=o[0],l++);return{type:"element",tagName:i,properties:s,children:[]}},hp=/[#.]/g;var bp={parse:function(e){var t=String(e||yp).trim();return t===yp?[]:t.split(wp)},stringify:function(e){return e.join(vp).trim()}},yp="",vp=" ",wp=/[ \t\n\r\f]+/g;var Sp={parse:function(e){var t,n=[],r=String(e||kp),o=r.indexOf(xp),a=0,i=!1;for(;!i;)-1===o&&(o=r.length,i=!0),!(t=r.slice(a,o).trim())&&i||n.push(t),a=o+1,o=r.indexOf(xp,a);return n},stringify:function(e,t){var n=t||{},r=!1===n.padLeft?kp:Ep,o=n.padRight?Ep:kp;e[e.length-1]===kp&&(e=e.concat(kp));return e.join(o+xp+r).trim()}},xp=",",Ep=" ",kp="";var Ap=cp,Tp=vd,Op=mp,Cp=bp.parse,Ip=Sp.parse,Np=function(e,t,n){var r=n?function(e){var t,n=e.length,r=-1,o={};for(;++r<n;)o[(t=e[r]).toLowerCase()]=t;return o}(n):null;return function(e,n){var a,i=Op(e,t),s=Array.prototype.slice.call(arguments,2),l=i.tagName.toLowerCase();i.tagName=r&&Rp.call(r,l)?r[l]:l,n&&function(e,t){return"string"==typeof e||"length"in e||function(e,t){var n=t.type;if("input"===e||!n||"string"!=typeof n)return!1;if("object"==typeof t.children&&"length"in t.children)return!0;if(n=n.toLowerCase(),"button"===e)return"menu"!==n&&"submit"!==n&&"reset"!==n&&"button"!==n;return"value"in t}(t.tagName,e)}(n,i)&&(s.unshift(n),n=null);if(n)for(a in n)o(i.properties,a,n[a]);_p(i.children,s),"template"===i.tagName&&(i.content={type:"root",children:i.children},i.children=[]);return i};function o(t,n,r){var o,a,i;null!=r&&r==r&&(a=(o=Ap(e,n)).property,"string"==typeof(i=r)&&(o.spaceSeparated?i=Cp(i):o.commaSeparated?i=Ip(i):o.commaOrSpaceSeparated&&(i=Cp(Ip(i).join(" ")))),"style"===a&&"string"!=typeof r&&(i=function(e){var t,n=[];for(t in e)n.push([t,e[t]].join(": "));return n.join("; ")}(i)),"className"===a&&t.className&&(i=t.className.concat(i)),t[a]=function(e,t,n){var r,o,a;if("object"!=typeof n||!("length"in n))return Pp(e,t,n);o=n.length,r=-1,a=[];for(;++r<o;)a[r]=Pp(e,t,n[r]);return a}(o,a,i))}},Rp={}.hasOwnProperty;function _p(e,t){var n,r;if("string"!=typeof t&&"number"!=typeof t)if("object"==typeof t&&"length"in t)for(n=-1,r=t.length;++n<r;)_p(e,t[n]);else{if("object"!=typeof t||!("type"in t))throw new Error("Expected node, nodes, or string, got `"+t+"`");e.push(t)}else e.push({type:"text",value:String(t)})}function Pp(e,t,n){var r=n;return e.number||e.positiveNumber?isNaN(r)||""===r||(r=Number(r)):(e.boolean||e.overloadedBoolean)&&("string"!=typeof r||""!==r&&Tp(n)!==Tp(t)||(r=!0)),r}var Lp=Np(op,"div");Lp.displayName="html";var Dp=Lp,Mp=function(e){var t="string"==typeof e?e.charCodeAt(0):e;return t>=48&&t<=57};var jp=function(e){var t="string"==typeof e?e.charCodeAt(0):e;return t>=97&&t<=102||t>=65&&t<=70||t>=48&&t<=57};var Fp=function(e){var t="string"==typeof e?e.charCodeAt(0):e;return t>=97&&t<=122||t>=65&&t<=90};var Bp=Fp,Up=Mp;var zp={AEli:"Æ",AElig:"Æ",AM:"&",AMP:"&",Aacut:"Á",Aacute:"Á",Abreve:"Ă",Acir:"Â",Acirc:"Â",Acy:"А",Afr:"𝔄",Agrav:"À",Agrave:"À",Alpha:"Α",Amacr:"Ā",And:"⩓",Aogon:"Ą",Aopf:"𝔸",ApplyFunction:"⁡",Arin:"Å",Aring:"Å",Ascr:"𝒜",Assign:"≔",Atild:"Ã",Atilde:"Ã",Aum:"Ä",Auml:"Ä",Backslash:"∖",Barv:"⫧",Barwed:"⌆",Bcy:"Б",Because:"∵",Bernoullis:"ℬ",Beta:"Β",Bfr:"𝔅",Bopf:"𝔹",Breve:"˘",Bscr:"ℬ",Bumpeq:"≎",CHcy:"Ч",COP:"©",COPY:"©",Cacute:"Ć",Cap:"⋒",CapitalDifferentialD:"ⅅ",Cayleys:"ℭ",Ccaron:"Č",Ccedi:"Ç",Ccedil:"Ç",Ccirc:"Ĉ",Cconint:"∰",Cdot:"Ċ",Cedilla:"¸",CenterDot:"·",Cfr:"ℭ",Chi:"Χ",CircleDot:"⊙",CircleMinus:"⊖",CirclePlus:"⊕",CircleTimes:"⊗",ClockwiseContourIntegral:"∲",CloseCurlyDoubleQuote:"”",CloseCurlyQuote:"’",Colon:"∷",Colone:"⩴",Congruent:"≡",Conint:"∯",ContourIntegral:"∮",Copf:"ℂ",Coproduct:"∐",CounterClockwiseContourIntegral:"∳",Cross:"⨯",Cscr:"𝒞",Cup:"⋓",CupCap:"≍",DD:"ⅅ",DDotrahd:"⤑",DJcy:"Ђ",DScy:"Ѕ",DZcy:"Џ",Dagger:"‡",Darr:"↡",Dashv:"⫤",Dcaron:"Ď",Dcy:"Д",Del:"∇",Delta:"Δ",Dfr:"𝔇",DiacriticalAcute:"´",DiacriticalDot:"˙",DiacriticalDoubleAcute:"˝",DiacriticalGrave:"`",DiacriticalTilde:"˜",Diamond:"⋄",DifferentialD:"ⅆ",Dopf:"𝔻",Dot:"¨",DotDot:"⃜",DotEqual:"≐",DoubleContourIntegral:"∯",DoubleDot:"¨",DoubleDownArrow:"⇓",DoubleLeftArrow:"⇐",DoubleLeftRightArrow:"⇔",DoubleLeftTee:"⫤",DoubleLongLeftArrow:"⟸",DoubleLongLeftRightArrow:"⟺",DoubleLongRightArrow:"⟹",DoubleRightArrow:"⇒",DoubleRightTee:"⊨",DoubleUpArrow:"⇑",DoubleUpDownArrow:"⇕",DoubleVerticalBar:"∥",DownArrow:"↓",DownArrowBar:"⤓",DownArrowUpArrow:"⇵",DownBreve:"̑",DownLeftRightVector:"⥐",DownLeftTeeVector:"⥞",DownLeftVector:"↽",DownLeftVectorBar:"⥖",DownRightTeeVector:"⥟",DownRightVector:"⇁",DownRightVectorBar:"⥗",DownTee:"⊤",DownTeeArrow:"↧",Downarrow:"⇓",Dscr:"𝒟",Dstrok:"Đ",ENG:"Ŋ",ET:"Ð",ETH:"Ð",Eacut:"É",Eacute:"É",Ecaron:"Ě",Ecir:"Ê",Ecirc:"Ê",Ecy:"Э",Edot:"Ė",Efr:"𝔈",Egrav:"È",Egrave:"È",Element:"∈",Emacr:"Ē",EmptySmallSquare:"◻",EmptyVerySmallSquare:"▫",Eogon:"Ę",Eopf:"𝔼",Epsilon:"Ε",Equal:"⩵",EqualTilde:"≂",Equilibrium:"⇌",Escr:"ℰ",Esim:"⩳",Eta:"Η",Eum:"Ë",Euml:"Ë",Exists:"∃",ExponentialE:"ⅇ",Fcy:"Ф",Ffr:"𝔉",FilledSmallSquare:"◼",FilledVerySmallSquare:"▪",Fopf:"𝔽",ForAll:"∀",Fouriertrf:"ℱ",Fscr:"ℱ",GJcy:"Ѓ",G:">",GT:">",Gamma:"Γ",Gammad:"Ϝ",Gbreve:"Ğ",Gcedil:"Ģ",Gcirc:"Ĝ",Gcy:"Г",Gdot:"Ġ",Gfr:"𝔊",Gg:"⋙",Gopf:"𝔾",GreaterEqual:"≥",GreaterEqualLess:"⋛",GreaterFullEqual:"≧",GreaterGreater:"⪢",GreaterLess:"≷",GreaterSlantEqual:"⩾",GreaterTilde:"≳",Gscr:"𝒢",Gt:"≫",HARDcy:"Ъ",Hacek:"ˇ",Hat:"^",Hcirc:"Ĥ",Hfr:"ℌ",HilbertSpace:"ℋ",Hopf:"ℍ",HorizontalLine:"─",Hscr:"ℋ",Hstrok:"Ħ",HumpDownHump:"≎",HumpEqual:"≏",IEcy:"Е",IJlig:"IJ",IOcy:"Ё",Iacut:"Í",Iacute:"Í",Icir:"Î",Icirc:"Î",Icy:"И",Idot:"İ",Ifr:"ℑ",Igrav:"Ì",Igrave:"Ì",Im:"ℑ",Imacr:"Ī",ImaginaryI:"ⅈ",Implies:"⇒",Int:"∬",Integral:"∫",Intersection:"⋂",InvisibleComma:"⁣",InvisibleTimes:"⁢",Iogon:"Į",Iopf:"𝕀",Iota:"Ι",Iscr:"ℐ",Itilde:"Ĩ",Iukcy:"І",Ium:"Ï",Iuml:"Ï",Jcirc:"Ĵ",Jcy:"Й",Jfr:"𝔍",Jopf:"𝕁",Jscr:"𝒥",Jsercy:"Ј",Jukcy:"Є",KHcy:"Х",KJcy:"Ќ",Kappa:"Κ",Kcedil:"Ķ",Kcy:"К",Kfr:"𝔎",Kopf:"𝕂",Kscr:"𝒦",LJcy:"Љ",L:"<",LT:"<",Lacute:"Ĺ",Lambda:"Λ",Lang:"⟪",Laplacetrf:"ℒ",Larr:"↞",Lcaron:"Ľ",Lcedil:"Ļ",Lcy:"Л",LeftAngleBracket:"⟨",LeftArrow:"←",LeftArrowBar:"⇤",LeftArrowRightArrow:"⇆",LeftCeiling:"⌈",LeftDoubleBracket:"⟦",LeftDownTeeVector:"⥡",LeftDownVector:"⇃",LeftDownVectorBar:"⥙",LeftFloor:"⌊",LeftRightArrow:"↔",LeftRightVector:"⥎",LeftTee:"⊣",LeftTeeArrow:"↤",LeftTeeVector:"⥚",LeftTriangle:"⊲",LeftTriangleBar:"⧏",LeftTriangleEqual:"⊴",LeftUpDownVector:"⥑",LeftUpTeeVector:"⥠",LeftUpVector:"↿",LeftUpVectorBar:"⥘",LeftVector:"↼",LeftVectorBar:"⥒",Leftarrow:"⇐",Leftrightarrow:"⇔",LessEqualGreater:"⋚",LessFullEqual:"≦",LessGreater:"≶",LessLess:"⪡",LessSlantEqual:"⩽",LessTilde:"≲",Lfr:"𝔏",Ll:"⋘",Lleftarrow:"⇚",Lmidot:"Ŀ",LongLeftArrow:"⟵",LongLeftRightArrow:"⟷",LongRightArrow:"⟶",Longleftarrow:"⟸",Longleftrightarrow:"⟺",Longrightarrow:"⟹",Lopf:"𝕃",LowerLeftArrow:"↙",LowerRightArrow:"↘",Lscr:"ℒ",Lsh:"↰",Lstrok:"Ł",Lt:"≪",Map:"⤅",Mcy:"М",MediumSpace:" ",Mellintrf:"ℳ",Mfr:"𝔐",MinusPlus:"∓",Mopf:"𝕄",Mscr:"ℳ",Mu:"Μ",NJcy:"Њ",Nacute:"Ń",Ncaron:"Ň",Ncedil:"Ņ",Ncy:"Н",NegativeMediumSpace:"​",NegativeThickSpace:"​",NegativeThinSpace:"​",NegativeVeryThinSpace:"​",NestedGreaterGreater:"≫",NestedLessLess:"≪",NewLine:"\n",Nfr:"𝔑",NoBreak:"⁠",NonBreakingSpace:" ",Nopf:"ℕ",Not:"⫬",NotCongruent:"≢",NotCupCap:"≭",NotDoubleVerticalBar:"∦",NotElement:"∉",NotEqual:"≠",NotEqualTilde:"≂̸",NotExists:"∄",NotGreater:"≯",NotGreaterEqual:"≱",NotGreaterFullEqual:"≧̸",NotGreaterGreater:"≫̸",NotGreaterLess:"≹",NotGreaterSlantEqual:"⩾̸",NotGreaterTilde:"≵",NotHumpDownHump:"≎̸",NotHumpEqual:"≏̸",NotLeftTriangle:"⋪",NotLeftTriangleBar:"⧏̸",NotLeftTriangleEqual:"⋬",NotLess:"≮",NotLessEqual:"≰",NotLessGreater:"≸",NotLessLess:"≪̸",NotLessSlantEqual:"⩽̸",NotLessTilde:"≴",NotNestedGreaterGreater:"⪢̸",NotNestedLessLess:"⪡̸",NotPrecedes:"⊀",NotPrecedesEqual:"⪯̸",NotPrecedesSlantEqual:"⋠",NotReverseElement:"∌",NotRightTriangle:"⋫",NotRightTriangleBar:"⧐̸",NotRightTriangleEqual:"⋭",NotSquareSubset:"⊏̸",NotSquareSubsetEqual:"⋢",NotSquareSuperset:"⊐̸",NotSquareSupersetEqual:"⋣",NotSubset:"⊂⃒",NotSubsetEqual:"⊈",NotSucceeds:"⊁",NotSucceedsEqual:"⪰̸",NotSucceedsSlantEqual:"⋡",NotSucceedsTilde:"≿̸",NotSuperset:"⊃⃒",NotSupersetEqual:"⊉",NotTilde:"≁",NotTildeEqual:"≄",NotTildeFullEqual:"≇",NotTildeTilde:"≉",NotVerticalBar:"∤",Nscr:"𝒩",Ntild:"Ñ",Ntilde:"Ñ",Nu:"Ν",OElig:"Œ",Oacut:"Ó",Oacute:"Ó",Ocir:"Ô",Ocirc:"Ô",Ocy:"О",Odblac:"Ő",Ofr:"𝔒",Ograv:"Ò",Ograve:"Ò",Omacr:"Ō",Omega:"Ω",Omicron:"Ο",Oopf:"𝕆",OpenCurlyDoubleQuote:"“",OpenCurlyQuote:"‘",Or:"⩔",Oscr:"𝒪",Oslas:"Ø",Oslash:"Ø",Otild:"Õ",Otilde:"Õ",Otimes:"⨷",Oum:"Ö",Ouml:"Ö",OverBar:"‾",OverBrace:"⏞",OverBracket:"⎴",OverParenthesis:"⏜",PartialD:"∂",Pcy:"П",Pfr:"𝔓",Phi:"Φ",Pi:"Π",PlusMinus:"±",Poincareplane:"ℌ",Popf:"ℙ",Pr:"⪻",Precedes:"≺",PrecedesEqual:"⪯",PrecedesSlantEqual:"≼",PrecedesTilde:"≾",Prime:"″",Product:"∏",Proportion:"∷",Proportional:"∝",Pscr:"𝒫",Psi:"Ψ",QUO:'"',QUOT:'"',Qfr:"𝔔",Qopf:"ℚ",Qscr:"𝒬",RBarr:"⤐",RE:"®",REG:"®",Racute:"Ŕ",Rang:"⟫",Rarr:"↠",Rarrtl:"⤖",Rcaron:"Ř",Rcedil:"Ŗ",Rcy:"Р",Re:"ℜ",ReverseElement:"∋",ReverseEquilibrium:"⇋",ReverseUpEquilibrium:"⥯",Rfr:"ℜ",Rho:"Ρ",RightAngleBracket:"⟩",RightArrow:"→",RightArrowBar:"⇥",RightArrowLeftArrow:"⇄",RightCeiling:"⌉",RightDoubleBracket:"⟧",RightDownTeeVector:"⥝",RightDownVector:"⇂",RightDownVectorBar:"⥕",RightFloor:"⌋",RightTee:"⊢",RightTeeArrow:"↦",RightTeeVector:"⥛",RightTriangle:"⊳",RightTriangleBar:"⧐",RightTriangleEqual:"⊵",RightUpDownVector:"⥏",RightUpTeeVector:"⥜",RightUpVector:"↾",RightUpVectorBar:"⥔",RightVector:"⇀",RightVectorBar:"⥓",Rightarrow:"⇒",Ropf:"ℝ",RoundImplies:"⥰",Rrightarrow:"⇛",Rscr:"ℛ",Rsh:"↱",RuleDelayed:"⧴",SHCHcy:"Щ",SHcy:"Ш",SOFTcy:"Ь",Sacute:"Ś",Sc:"⪼",Scaron:"Š",Scedil:"Ş",Scirc:"Ŝ",Scy:"С",Sfr:"𝔖",ShortDownArrow:"↓",ShortLeftArrow:"←",ShortRightArrow:"→",ShortUpArrow:"↑",Sigma:"Σ",SmallCircle:"∘",Sopf:"𝕊",Sqrt:"√",Square:"□",SquareIntersection:"⊓",SquareSubset:"⊏",SquareSubsetEqual:"⊑",SquareSuperset:"⊐",SquareSupersetEqual:"⊒",SquareUnion:"⊔",Sscr:"𝒮",Star:"⋆",Sub:"⋐",Subset:"⋐",SubsetEqual:"⊆",Succeeds:"≻",SucceedsEqual:"⪰",SucceedsSlantEqual:"≽",SucceedsTilde:"≿",SuchThat:"∋",Sum:"∑",Sup:"⋑",Superset:"⊃",SupersetEqual:"⊇",Supset:"⋑",THOR:"Þ",THORN:"Þ",TRADE:"™",TSHcy:"Ћ",TScy:"Ц",Tab:"\t",Tau:"Τ",Tcaron:"Ť",Tcedil:"Ţ",Tcy:"Т",Tfr:"𝔗",Therefore:"∴",Theta:"Θ",ThickSpace:"  ",ThinSpace:" ",Tilde:"∼",TildeEqual:"≃",TildeFullEqual:"≅",TildeTilde:"≈",Topf:"𝕋",TripleDot:"⃛",Tscr:"𝒯",Tstrok:"Ŧ",Uacut:"Ú",Uacute:"Ú",Uarr:"↟",Uarrocir:"⥉",Ubrcy:"Ў",Ubreve:"Ŭ",Ucir:"Û",Ucirc:"Û",Ucy:"У",Udblac:"Ű",Ufr:"𝔘",Ugrav:"Ù",Ugrave:"Ù",Umacr:"Ū",UnderBar:"_",UnderBrace:"⏟",UnderBracket:"⎵",UnderParenthesis:"⏝",Union:"⋃",UnionPlus:"⊎",Uogon:"Ų",Uopf:"𝕌",UpArrow:"↑",UpArrowBar:"⤒",UpArrowDownArrow:"⇅",UpDownArrow:"↕",UpEquilibrium:"⥮",UpTee:"⊥",UpTeeArrow:"↥",Uparrow:"⇑",Updownarrow:"⇕",UpperLeftArrow:"↖",UpperRightArrow:"↗",Upsi:"ϒ",Upsilon:"Υ",Uring:"Ů",Uscr:"𝒰",Utilde:"Ũ",Uum:"Ü",Uuml:"Ü",VDash:"⊫",Vbar:"⫫",Vcy:"В",Vdash:"⊩",Vdashl:"⫦",Vee:"⋁",Verbar:"‖",Vert:"‖",VerticalBar:"∣",VerticalLine:"|",VerticalSeparator:"❘",VerticalTilde:"≀",VeryThinSpace:" ",Vfr:"𝔙",Vopf:"𝕍",Vscr:"𝒱",Vvdash:"⊪",Wcirc:"Ŵ",Wedge:"⋀",Wfr:"𝔚",Wopf:"𝕎",Wscr:"𝒲",Xfr:"𝔛",Xi:"Ξ",Xopf:"𝕏",Xscr:"𝒳",YAcy:"Я",YIcy:"Ї",YUcy:"Ю",Yacut:"Ý",Yacute:"Ý",Ycirc:"Ŷ",Ycy:"Ы",Yfr:"𝔜",Yopf:"𝕐",Yscr:"𝒴",Yuml:"Ÿ",ZHcy:"Ж",Zacute:"Ź",Zcaron:"Ž",Zcy:"З",Zdot:"Ż",ZeroWidthSpace:"​",Zeta:"Ζ",Zfr:"ℨ",Zopf:"ℤ",Zscr:"𝒵",aacut:"á",aacute:"á",abreve:"ă",ac:"∾",acE:"∾̳",acd:"∿",acir:"â",acirc:"â",acut:"´",acute:"´",acy:"а",aeli:"æ",aelig:"æ",af:"⁡",afr:"𝔞",agrav:"à",agrave:"à",alefsym:"ℵ",aleph:"ℵ",alpha:"α",amacr:"ā",amalg:"⨿",am:"&",amp:"&",and:"∧",andand:"⩕",andd:"⩜",andslope:"⩘",andv:"⩚",ang:"∠",ange:"⦤",angle:"∠",angmsd:"∡",angmsdaa:"⦨",angmsdab:"⦩",angmsdac:"⦪",angmsdad:"⦫",angmsdae:"⦬",angmsdaf:"⦭",angmsdag:"⦮",angmsdah:"⦯",angrt:"∟",angrtvb:"⊾",angrtvbd:"⦝",angsph:"∢",angst:"Å",angzarr:"⍼",aogon:"ą",aopf:"𝕒",ap:"≈",apE:"⩰",apacir:"⩯",ape:"≊",apid:"≋",apos:"'",approx:"≈",approxeq:"≊",arin:"å",aring:"å",ascr:"𝒶",ast:"*",asymp:"≈",asympeq:"≍",atild:"ã",atilde:"ã",aum:"ä",auml:"ä",awconint:"∳",awint:"⨑",bNot:"⫭",backcong:"≌",backepsilon:"϶",backprime:"‵",backsim:"∽",backsimeq:"⋍",barvee:"⊽",barwed:"⌅",barwedge:"⌅",bbrk:"⎵",bbrktbrk:"⎶",bcong:"≌",bcy:"б",bdquo:"„",becaus:"∵",because:"∵",bemptyv:"⦰",bepsi:"϶",bernou:"ℬ",beta:"β",beth:"ℶ",between:"≬",bfr:"𝔟",bigcap:"⋂",bigcirc:"◯",bigcup:"⋃",bigodot:"⨀",bigoplus:"⨁",bigotimes:"⨂",bigsqcup:"⨆",bigstar:"★",bigtriangledown:"▽",bigtriangleup:"△",biguplus:"⨄",bigvee:"⋁",bigwedge:"⋀",bkarow:"⤍",blacklozenge:"⧫",blacksquare:"▪",blacktriangle:"▴",blacktriangledown:"▾",blacktriangleleft:"◂",blacktriangleright:"▸",blank:"␣",blk12:"▒",blk14:"░",blk34:"▓",block:"█",bne:"=⃥",bnequiv:"≡⃥",bnot:"⌐",bopf:"𝕓",bot:"⊥",bottom:"⊥",bowtie:"⋈",boxDL:"╗",boxDR:"╔",boxDl:"╖",boxDr:"╓",boxH:"═",boxHD:"╦",boxHU:"╩",boxHd:"╤",boxHu:"╧",boxUL:"╝",boxUR:"╚",boxUl:"╜",boxUr:"╙",boxV:"║",boxVH:"╬",boxVL:"╣",boxVR:"╠",boxVh:"╫",boxVl:"╢",boxVr:"╟",boxbox:"⧉",boxdL:"╕",boxdR:"╒",boxdl:"┐",boxdr:"┌",boxh:"─",boxhD:"╥",boxhU:"╨",boxhd:"┬",boxhu:"┴",boxminus:"⊟",boxplus:"⊞",boxtimes:"⊠",boxuL:"╛",boxuR:"╘",boxul:"┘",boxur:"└",boxv:"│",boxvH:"╪",boxvL:"╡",boxvR:"╞",boxvh:"┼",boxvl:"┤",boxvr:"├",bprime:"‵",breve:"˘",brvba:"¦",brvbar:"¦",bscr:"𝒷",bsemi:"⁏",bsim:"∽",bsime:"⋍",bsol:"\\",bsolb:"⧅",bsolhsub:"⟈",bull:"•",bullet:"•",bump:"≎",bumpE:"⪮",bumpe:"≏",bumpeq:"≏",cacute:"ć",cap:"∩",capand:"⩄",capbrcup:"⩉",capcap:"⩋",capcup:"⩇",capdot:"⩀",caps:"∩︀",caret:"⁁",caron:"ˇ",ccaps:"⩍",ccaron:"č",ccedi:"ç",ccedil:"ç",ccirc:"ĉ",ccups:"⩌",ccupssm:"⩐",cdot:"ċ",cedi:"¸",cedil:"¸",cemptyv:"⦲",cen:"¢",cent:"¢",centerdot:"·",cfr:"𝔠",chcy:"ч",check:"✓",checkmark:"✓",chi:"χ",cir:"○",cirE:"⧃",circ:"ˆ",circeq:"≗",circlearrowleft:"↺",circlearrowright:"↻",circledR:"®",circledS:"Ⓢ",circledast:"⊛",circledcirc:"⊚",circleddash:"⊝",cire:"≗",cirfnint:"⨐",cirmid:"⫯",cirscir:"⧂",clubs:"♣",clubsuit:"♣",colon:":",colone:"≔",coloneq:"≔",comma:",",commat:"@",comp:"∁",compfn:"∘",complement:"∁",complexes:"ℂ",cong:"≅",congdot:"⩭",conint:"∮",copf:"𝕔",coprod:"∐",cop:"©",copy:"©",copysr:"℗",crarr:"↵",cross:"✗",cscr:"𝒸",csub:"⫏",csube:"⫑",csup:"⫐",csupe:"⫒",ctdot:"⋯",cudarrl:"⤸",cudarrr:"⤵",cuepr:"⋞",cuesc:"⋟",cularr:"↶",cularrp:"⤽",cup:"∪",cupbrcap:"⩈",cupcap:"⩆",cupcup:"⩊",cupdot:"⊍",cupor:"⩅",cups:"∪︀",curarr:"↷",curarrm:"⤼",curlyeqprec:"⋞",curlyeqsucc:"⋟",curlyvee:"⋎",curlywedge:"⋏",curre:"¤",curren:"¤",curvearrowleft:"↶",curvearrowright:"↷",cuvee:"⋎",cuwed:"⋏",cwconint:"∲",cwint:"∱",cylcty:"⌭",dArr:"⇓",dHar:"⥥",dagger:"†",daleth:"ℸ",darr:"↓",dash:"‐",dashv:"⊣",dbkarow:"⤏",dblac:"˝",dcaron:"ď",dcy:"д",dd:"ⅆ",ddagger:"‡",ddarr:"⇊",ddotseq:"⩷",de:"°",deg:"°",delta:"δ",demptyv:"⦱",dfisht:"⥿",dfr:"𝔡",dharl:"⇃",dharr:"⇂",diam:"⋄",diamond:"⋄",diamondsuit:"♦",diams:"♦",die:"¨",digamma:"ϝ",disin:"⋲",div:"÷",divid:"÷",divide:"÷",divideontimes:"⋇",divonx:"⋇",djcy:"ђ",dlcorn:"⌞",dlcrop:"⌍",dollar:"$",dopf:"𝕕",dot:"˙",doteq:"≐",doteqdot:"≑",dotminus:"∸",dotplus:"∔",dotsquare:"⊡",doublebarwedge:"⌆",downarrow:"↓",downdownarrows:"⇊",downharpoonleft:"⇃",downharpoonright:"⇂",drbkarow:"⤐",drcorn:"⌟",drcrop:"⌌",dscr:"𝒹",dscy:"ѕ",dsol:"⧶",dstrok:"đ",dtdot:"⋱",dtri:"▿",dtrif:"▾",duarr:"⇵",duhar:"⥯",dwangle:"⦦",dzcy:"џ",dzigrarr:"⟿",eDDot:"⩷",eDot:"≑",eacut:"é",eacute:"é",easter:"⩮",ecaron:"ě",ecir:"ê",ecirc:"ê",ecolon:"≕",ecy:"э",edot:"ė",ee:"ⅇ",efDot:"≒",efr:"𝔢",eg:"⪚",egrav:"è",egrave:"è",egs:"⪖",egsdot:"⪘",el:"⪙",elinters:"⏧",ell:"ℓ",els:"⪕",elsdot:"⪗",emacr:"ē",empty:"∅",emptyset:"∅",emptyv:"∅",emsp13:" ",emsp14:" ",emsp:" ",eng:"ŋ",ensp:" ",eogon:"ę",eopf:"𝕖",epar:"⋕",eparsl:"⧣",eplus:"⩱",epsi:"ε",epsilon:"ε",epsiv:"ϵ",eqcirc:"≖",eqcolon:"≕",eqsim:"≂",eqslantgtr:"⪖",eqslantless:"⪕",equals:"=",equest:"≟",equiv:"≡",equivDD:"⩸",eqvparsl:"⧥",erDot:"≓",erarr:"⥱",escr:"ℯ",esdot:"≐",esim:"≂",eta:"η",et:"ð",eth:"ð",eum:"ë",euml:"ë",euro:"€",excl:"!",exist:"∃",expectation:"ℰ",exponentiale:"ⅇ",fallingdotseq:"≒",fcy:"ф",female:"♀",ffilig:"ffi",fflig:"ff",ffllig:"ffl",ffr:"𝔣",filig:"fi",fjlig:"fj",flat:"♭",fllig:"fl",fltns:"▱",fnof:"ƒ",fopf:"𝕗",forall:"∀",fork:"⋔",forkv:"⫙",fpartint:"⨍",frac1:"¼",frac12:"½",frac13:"⅓",frac14:"¼",frac15:"⅕",frac16:"⅙",frac18:"⅛",frac23:"⅔",frac25:"⅖",frac3:"¾",frac34:"¾",frac35:"⅗",frac38:"⅜",frac45:"⅘",frac56:"⅚",frac58:"⅝",frac78:"⅞",frasl:"⁄",frown:"⌢",fscr:"𝒻",gE:"≧",gEl:"⪌",gacute:"ǵ",gamma:"γ",gammad:"ϝ",gap:"⪆",gbreve:"ğ",gcirc:"ĝ",gcy:"г",gdot:"ġ",ge:"≥",gel:"⋛",geq:"≥",geqq:"≧",geqslant:"⩾",ges:"⩾",gescc:"⪩",gesdot:"⪀",gesdoto:"⪂",gesdotol:"⪄",gesl:"⋛︀",gesles:"⪔",gfr:"𝔤",gg:"≫",ggg:"⋙",gimel:"ℷ",gjcy:"ѓ",gl:"≷",glE:"⪒",gla:"⪥",glj:"⪤",gnE:"≩",gnap:"⪊",gnapprox:"⪊",gne:"⪈",gneq:"⪈",gneqq:"≩",gnsim:"⋧",gopf:"𝕘",grave:"`",gscr:"ℊ",gsim:"≳",gsime:"⪎",gsiml:"⪐",g:">",gt:">",gtcc:"⪧",gtcir:"⩺",gtdot:"⋗",gtlPar:"⦕",gtquest:"⩼",gtrapprox:"⪆",gtrarr:"⥸",gtrdot:"⋗",gtreqless:"⋛",gtreqqless:"⪌",gtrless:"≷",gtrsim:"≳",gvertneqq:"≩︀",gvnE:"≩︀",hArr:"⇔",hairsp:" ",half:"½",hamilt:"ℋ",hardcy:"ъ",harr:"↔",harrcir:"⥈",harrw:"↭",hbar:"ℏ",hcirc:"ĥ",hearts:"♥",heartsuit:"♥",hellip:"…",hercon:"⊹",hfr:"𝔥",hksearow:"⤥",hkswarow:"⤦",hoarr:"⇿",homtht:"∻",hookleftarrow:"↩",hookrightarrow:"↪",hopf:"𝕙",horbar:"―",hscr:"𝒽",hslash:"ℏ",hstrok:"ħ",hybull:"⁃",hyphen:"‐",iacut:"í",iacute:"í",ic:"⁣",icir:"î",icirc:"î",icy:"и",iecy:"е",iexc:"¡",iexcl:"¡",iff:"⇔",ifr:"𝔦",igrav:"ì",igrave:"ì",ii:"ⅈ",iiiint:"⨌",iiint:"∭",iinfin:"⧜",iiota:"℩",ijlig:"ij",imacr:"ī",image:"ℑ",imagline:"ℐ",imagpart:"ℑ",imath:"ı",imof:"⊷",imped:"Ƶ",in:"∈",incare:"℅",infin:"∞",infintie:"⧝",inodot:"ı",int:"∫",intcal:"⊺",integers:"ℤ",intercal:"⊺",intlarhk:"⨗",intprod:"⨼",iocy:"ё",iogon:"į",iopf:"𝕚",iota:"ι",iprod:"⨼",iques:"¿",iquest:"¿",iscr:"𝒾",isin:"∈",isinE:"⋹",isindot:"⋵",isins:"⋴",isinsv:"⋳",isinv:"∈",it:"⁢",itilde:"ĩ",iukcy:"і",ium:"ï",iuml:"ï",jcirc:"ĵ",jcy:"й",jfr:"𝔧",jmath:"ȷ",jopf:"𝕛",jscr:"𝒿",jsercy:"ј",jukcy:"є",kappa:"κ",kappav:"ϰ",kcedil:"ķ",kcy:"к",kfr:"𝔨",kgreen:"ĸ",khcy:"х",kjcy:"ќ",kopf:"𝕜",kscr:"𝓀",lAarr:"⇚",lArr:"⇐",lAtail:"⤛",lBarr:"⤎",lE:"≦",lEg:"⪋",lHar:"⥢",lacute:"ĺ",laemptyv:"⦴",lagran:"ℒ",lambda:"λ",lang:"⟨",langd:"⦑",langle:"⟨",lap:"⪅",laqu:"«",laquo:"«",larr:"←",larrb:"⇤",larrbfs:"⤟",larrfs:"⤝",larrhk:"↩",larrlp:"↫",larrpl:"⤹",larrsim:"⥳",larrtl:"↢",lat:"⪫",latail:"⤙",late:"⪭",lates:"⪭︀",lbarr:"⤌",lbbrk:"❲",lbrace:"{",lbrack:"[",lbrke:"⦋",lbrksld:"⦏",lbrkslu:"⦍",lcaron:"ľ",lcedil:"ļ",lceil:"⌈",lcub:"{",lcy:"л",ldca:"⤶",ldquo:"“",ldquor:"„",ldrdhar:"⥧",ldrushar:"⥋",ldsh:"↲",le:"≤",leftarrow:"←",leftarrowtail:"↢",leftharpoondown:"↽",leftharpoonup:"↼",leftleftarrows:"⇇",leftrightarrow:"↔",leftrightarrows:"⇆",leftrightharpoons:"⇋",leftrightsquigarrow:"↭",leftthreetimes:"⋋",leg:"⋚",leq:"≤",leqq:"≦",leqslant:"⩽",les:"⩽",lescc:"⪨",lesdot:"⩿",lesdoto:"⪁",lesdotor:"⪃",lesg:"⋚︀",lesges:"⪓",lessapprox:"⪅",lessdot:"⋖",lesseqgtr:"⋚",lesseqqgtr:"⪋",lessgtr:"≶",lesssim:"≲",lfisht:"⥼",lfloor:"⌊",lfr:"𝔩",lg:"≶",lgE:"⪑",lhard:"↽",lharu:"↼",lharul:"⥪",lhblk:"▄",ljcy:"љ",ll:"≪",llarr:"⇇",llcorner:"⌞",llhard:"⥫",lltri:"◺",lmidot:"ŀ",lmoust:"⎰",lmoustache:"⎰",lnE:"≨",lnap:"⪉",lnapprox:"⪉",lne:"⪇",lneq:"⪇",lneqq:"≨",lnsim:"⋦",loang:"⟬",loarr:"⇽",lobrk:"⟦",longleftarrow:"⟵",longleftrightarrow:"⟷",longmapsto:"⟼",longrightarrow:"⟶",looparrowleft:"↫",looparrowright:"↬",lopar:"⦅",lopf:"𝕝",loplus:"⨭",lotimes:"⨴",lowast:"∗",lowbar:"_",loz:"◊",lozenge:"◊",lozf:"⧫",lpar:"(",lparlt:"⦓",lrarr:"⇆",lrcorner:"⌟",lrhar:"⇋",lrhard:"⥭",lrm:"‎",lrtri:"⊿",lsaquo:"‹",lscr:"𝓁",lsh:"↰",lsim:"≲",lsime:"⪍",lsimg:"⪏",lsqb:"[",lsquo:"‘",lsquor:"‚",lstrok:"ł",l:"<",lt:"<",ltcc:"⪦",ltcir:"⩹",ltdot:"⋖",lthree:"⋋",ltimes:"⋉",ltlarr:"⥶",ltquest:"⩻",ltrPar:"⦖",ltri:"◃",ltrie:"⊴",ltrif:"◂",lurdshar:"⥊",luruhar:"⥦",lvertneqq:"≨︀",lvnE:"≨︀",mDDot:"∺",mac:"¯",macr:"¯",male:"♂",malt:"✠",maltese:"✠",map:"↦",mapsto:"↦",mapstodown:"↧",mapstoleft:"↤",mapstoup:"↥",marker:"▮",mcomma:"⨩",mcy:"м",mdash:"—",measuredangle:"∡",mfr:"𝔪",mho:"℧",micr:"µ",micro:"µ",mid:"∣",midast:"*",midcir:"⫰",middo:"·",middot:"·",minus:"−",minusb:"⊟",minusd:"∸",minusdu:"⨪",mlcp:"⫛",mldr:"…",mnplus:"∓",models:"⊧",mopf:"𝕞",mp:"∓",mscr:"𝓂",mstpos:"∾",mu:"μ",multimap:"⊸",mumap:"⊸",nGg:"⋙̸",nGt:"≫⃒",nGtv:"≫̸",nLeftarrow:"⇍",nLeftrightarrow:"⇎",nLl:"⋘̸",nLt:"≪⃒",nLtv:"≪̸",nRightarrow:"⇏",nVDash:"⊯",nVdash:"⊮",nabla:"∇",nacute:"ń",nang:"∠⃒",nap:"≉",napE:"⩰̸",napid:"≋̸",napos:"ʼn",napprox:"≉",natur:"♮",natural:"♮",naturals:"ℕ",nbs:" ",nbsp:" ",nbump:"≎̸",nbumpe:"≏̸",ncap:"⩃",ncaron:"ň",ncedil:"ņ",ncong:"≇",ncongdot:"⩭̸",ncup:"⩂",ncy:"н",ndash:"–",ne:"≠",neArr:"⇗",nearhk:"⤤",nearr:"↗",nearrow:"↗",nedot:"≐̸",nequiv:"≢",nesear:"⤨",nesim:"≂̸",nexist:"∄",nexists:"∄",nfr:"𝔫",ngE:"≧̸",nge:"≱",ngeq:"≱",ngeqq:"≧̸",ngeqslant:"⩾̸",nges:"⩾̸",ngsim:"≵",ngt:"≯",ngtr:"≯",nhArr:"⇎",nharr:"↮",nhpar:"⫲",ni:"∋",nis:"⋼",nisd:"⋺",niv:"∋",njcy:"њ",nlArr:"⇍",nlE:"≦̸",nlarr:"↚",nldr:"‥",nle:"≰",nleftarrow:"↚",nleftrightarrow:"↮",nleq:"≰",nleqq:"≦̸",nleqslant:"⩽̸",nles:"⩽̸",nless:"≮",nlsim:"≴",nlt:"≮",nltri:"⋪",nltrie:"⋬",nmid:"∤",nopf:"𝕟",no:"¬",not:"¬",notin:"∉",notinE:"⋹̸",notindot:"⋵̸",notinva:"∉",notinvb:"⋷",notinvc:"⋶",notni:"∌",notniva:"∌",notnivb:"⋾",notnivc:"⋽",npar:"∦",nparallel:"∦",nparsl:"⫽⃥",npart:"∂̸",npolint:"⨔",npr:"⊀",nprcue:"⋠",npre:"⪯̸",nprec:"⊀",npreceq:"⪯̸",nrArr:"⇏",nrarr:"↛",nrarrc:"⤳̸",nrarrw:"↝̸",nrightarrow:"↛",nrtri:"⋫",nrtrie:"⋭",nsc:"⊁",nsccue:"⋡",nsce:"⪰̸",nscr:"𝓃",nshortmid:"∤",nshortparallel:"∦",nsim:"≁",nsime:"≄",nsimeq:"≄",nsmid:"∤",nspar:"∦",nsqsube:"⋢",nsqsupe:"⋣",nsub:"⊄",nsubE:"⫅̸",nsube:"⊈",nsubset:"⊂⃒",nsubseteq:"⊈",nsubseteqq:"⫅̸",nsucc:"⊁",nsucceq:"⪰̸",nsup:"⊅",nsupE:"⫆̸",nsupe:"⊉",nsupset:"⊃⃒",nsupseteq:"⊉",nsupseteqq:"⫆̸",ntgl:"≹",ntild:"ñ",ntilde:"ñ",ntlg:"≸",ntriangleleft:"⋪",ntrianglelefteq:"⋬",ntriangleright:"⋫",ntrianglerighteq:"⋭",nu:"ν",num:"#",numero:"№",numsp:" ",nvDash:"⊭",nvHarr:"⤄",nvap:"≍⃒",nvdash:"⊬",nvge:"≥⃒",nvgt:">⃒",nvinfin:"⧞",nvlArr:"⤂",nvle:"≤⃒",nvlt:"<⃒",nvltrie:"⊴⃒",nvrArr:"⤃",nvrtrie:"⊵⃒",nvsim:"∼⃒",nwArr:"⇖",nwarhk:"⤣",nwarr:"↖",nwarrow:"↖",nwnear:"⤧",oS:"Ⓢ",oacut:"ó",oacute:"ó",oast:"⊛",ocir:"ô",ocirc:"ô",ocy:"о",odash:"⊝",odblac:"ő",odiv:"⨸",odot:"⊙",odsold:"⦼",oelig:"œ",ofcir:"⦿",ofr:"𝔬",ogon:"˛",ograv:"ò",ograve:"ò",ogt:"⧁",ohbar:"⦵",ohm:"Ω",oint:"∮",olarr:"↺",olcir:"⦾",olcross:"⦻",oline:"‾",olt:"⧀",omacr:"ō",omega:"ω",omicron:"ο",omid:"⦶",ominus:"⊖",oopf:"𝕠",opar:"⦷",operp:"⦹",oplus:"⊕",or:"∨",orarr:"↻",ord:"º",order:"ℴ",orderof:"ℴ",ordf:"ª",ordm:"º",origof:"⊶",oror:"⩖",orslope:"⩗",orv:"⩛",oscr:"ℴ",oslas:"ø",oslash:"ø",osol:"⊘",otild:"õ",otilde:"õ",otimes:"⊗",otimesas:"⨶",oum:"ö",ouml:"ö",ovbar:"⌽",par:"¶",para:"¶",parallel:"∥",parsim:"⫳",parsl:"⫽",part:"∂",pcy:"п",percnt:"%",period:".",permil:"‰",perp:"⊥",pertenk:"‱",pfr:"𝔭",phi:"φ",phiv:"ϕ",phmmat:"ℳ",phone:"☎",pi:"π",pitchfork:"⋔",piv:"ϖ",planck:"ℏ",planckh:"ℎ",plankv:"ℏ",plus:"+",plusacir:"⨣",plusb:"⊞",pluscir:"⨢",plusdo:"∔",plusdu:"⨥",pluse:"⩲",plusm:"±",plusmn:"±",plussim:"⨦",plustwo:"⨧",pm:"±",pointint:"⨕",popf:"𝕡",poun:"£",pound:"£",pr:"≺",prE:"⪳",prap:"⪷",prcue:"≼",pre:"⪯",prec:"≺",precapprox:"⪷",preccurlyeq:"≼",preceq:"⪯",precnapprox:"⪹",precneqq:"⪵",precnsim:"⋨",precsim:"≾",prime:"′",primes:"ℙ",prnE:"⪵",prnap:"⪹",prnsim:"⋨",prod:"∏",profalar:"⌮",profline:"⌒",profsurf:"⌓",prop:"∝",propto:"∝",prsim:"≾",prurel:"⊰",pscr:"𝓅",psi:"ψ",puncsp:" ",qfr:"𝔮",qint:"⨌",qopf:"𝕢",qprime:"⁗",qscr:"𝓆",quaternions:"ℍ",quatint:"⨖",quest:"?",questeq:"≟",quo:'"',quot:'"',rAarr:"⇛",rArr:"⇒",rAtail:"⤜",rBarr:"⤏",rHar:"⥤",race:"∽̱",racute:"ŕ",radic:"√",raemptyv:"⦳",rang:"⟩",rangd:"⦒",range:"⦥",rangle:"⟩",raqu:"»",raquo:"»",rarr:"→",rarrap:"⥵",rarrb:"⇥",rarrbfs:"⤠",rarrc:"⤳",rarrfs:"⤞",rarrhk:"↪",rarrlp:"↬",rarrpl:"⥅",rarrsim:"⥴",rarrtl:"↣",rarrw:"↝",ratail:"⤚",ratio:"∶",rationals:"ℚ",rbarr:"⤍",rbbrk:"❳",rbrace:"}",rbrack:"]",rbrke:"⦌",rbrksld:"⦎",rbrkslu:"⦐",rcaron:"ř",rcedil:"ŗ",rceil:"⌉",rcub:"}",rcy:"р",rdca:"⤷",rdldhar:"⥩",rdquo:"”",rdquor:"”",rdsh:"↳",real:"ℜ",realine:"ℛ",realpart:"ℜ",reals:"ℝ",rect:"▭",re:"®",reg:"®",rfisht:"⥽",rfloor:"⌋",rfr:"𝔯",rhard:"⇁",rharu:"⇀",rharul:"⥬",rho:"ρ",rhov:"ϱ",rightarrow:"→",rightarrowtail:"↣",rightharpoondown:"⇁",rightharpoonup:"⇀",rightleftarrows:"⇄",rightleftharpoons:"⇌",rightrightarrows:"⇉",rightsquigarrow:"↝",rightthreetimes:"⋌",ring:"˚",risingdotseq:"≓",rlarr:"⇄",rlhar:"⇌",rlm:"‏",rmoust:"⎱",rmoustache:"⎱",rnmid:"⫮",roang:"⟭",roarr:"⇾",robrk:"⟧",ropar:"⦆",ropf:"𝕣",roplus:"⨮",rotimes:"⨵",rpar:")",rpargt:"⦔",rppolint:"⨒",rrarr:"⇉",rsaquo:"›",rscr:"𝓇",rsh:"↱",rsqb:"]",rsquo:"’",rsquor:"’",rthree:"⋌",rtimes:"⋊",rtri:"▹",rtrie:"⊵",rtrif:"▸",rtriltri:"⧎",ruluhar:"⥨",rx:"℞",sacute:"ś",sbquo:"‚",sc:"≻",scE:"⪴",scap:"⪸",scaron:"š",sccue:"≽",sce:"⪰",scedil:"ş",scirc:"ŝ",scnE:"⪶",scnap:"⪺",scnsim:"⋩",scpolint:"⨓",scsim:"≿",scy:"с",sdot:"⋅",sdotb:"⊡",sdote:"⩦",seArr:"⇘",searhk:"⤥",searr:"↘",searrow:"↘",sec:"§",sect:"§",semi:";",seswar:"⤩",setminus:"∖",setmn:"∖",sext:"✶",sfr:"𝔰",sfrown:"⌢",sharp:"♯",shchcy:"щ",shcy:"ш",shortmid:"∣",shortparallel:"∥",sh:"­",shy:"­",sigma:"σ",sigmaf:"ς",sigmav:"ς",sim:"∼",simdot:"⩪",sime:"≃",simeq:"≃",simg:"⪞",simgE:"⪠",siml:"⪝",simlE:"⪟",simne:"≆",simplus:"⨤",simrarr:"⥲",slarr:"←",smallsetminus:"∖",smashp:"⨳",smeparsl:"⧤",smid:"∣",smile:"⌣",smt:"⪪",smte:"⪬",smtes:"⪬︀",softcy:"ь",sol:"/",solb:"⧄",solbar:"⌿",sopf:"𝕤",spades:"♠",spadesuit:"♠",spar:"∥",sqcap:"⊓",sqcaps:"⊓︀",sqcup:"⊔",sqcups:"⊔︀",sqsub:"⊏",sqsube:"⊑",sqsubset:"⊏",sqsubseteq:"⊑",sqsup:"⊐",sqsupe:"⊒",sqsupset:"⊐",sqsupseteq:"⊒",squ:"□",square:"□",squarf:"▪",squf:"▪",srarr:"→",sscr:"𝓈",ssetmn:"∖",ssmile:"⌣",sstarf:"⋆",star:"☆",starf:"★",straightepsilon:"ϵ",straightphi:"ϕ",strns:"¯",sub:"⊂",subE:"⫅",subdot:"⪽",sube:"⊆",subedot:"⫃",submult:"⫁",subnE:"⫋",subne:"⊊",subplus:"⪿",subrarr:"⥹",subset:"⊂",subseteq:"⊆",subseteqq:"⫅",subsetneq:"⊊",subsetneqq:"⫋",subsim:"⫇",subsub:"⫕",subsup:"⫓",succ:"≻",succapprox:"⪸",succcurlyeq:"≽",succeq:"⪰",succnapprox:"⪺",succneqq:"⪶",succnsim:"⋩",succsim:"≿",sum:"∑",sung:"♪",sup:"⊃",sup1:"¹",sup2:"²",sup3:"³",supE:"⫆",supdot:"⪾",supdsub:"⫘",supe:"⊇",supedot:"⫄",suphsol:"⟉",suphsub:"⫗",suplarr:"⥻",supmult:"⫂",supnE:"⫌",supne:"⊋",supplus:"⫀",supset:"⊃",supseteq:"⊇",supseteqq:"⫆",supsetneq:"⊋",supsetneqq:"⫌",supsim:"⫈",supsub:"⫔",supsup:"⫖",swArr:"⇙",swarhk:"⤦",swarr:"↙",swarrow:"↙",swnwar:"⤪",szli:"ß",szlig:"ß",target:"⌖",tau:"τ",tbrk:"⎴",tcaron:"ť",tcedil:"ţ",tcy:"т",tdot:"⃛",telrec:"⌕",tfr:"𝔱",there4:"∴",therefore:"∴",theta:"θ",thetasym:"ϑ",thetav:"ϑ",thickapprox:"≈",thicksim:"∼",thinsp:" ",thkap:"≈",thksim:"∼",thor:"þ",thorn:"þ",tilde:"˜",time:"×",times:"×",timesb:"⊠",timesbar:"⨱",timesd:"⨰",tint:"∭",toea:"⤨",top:"⊤",topbot:"⌶",topcir:"⫱",topf:"𝕥",topfork:"⫚",tosa:"⤩",tprime:"‴",trade:"™",triangle:"▵",triangledown:"▿",triangleleft:"◃",trianglelefteq:"⊴",triangleq:"≜",triangleright:"▹",trianglerighteq:"⊵",tridot:"◬",trie:"≜",triminus:"⨺",triplus:"⨹",trisb:"⧍",tritime:"⨻",trpezium:"⏢",tscr:"𝓉",tscy:"ц",tshcy:"ћ",tstrok:"ŧ",twixt:"≬",twoheadleftarrow:"↞",twoheadrightarrow:"↠",uArr:"⇑",uHar:"⥣",uacut:"ú",uacute:"ú",uarr:"↑",ubrcy:"ў",ubreve:"ŭ",ucir:"û",ucirc:"û",ucy:"у",udarr:"⇅",udblac:"ű",udhar:"⥮",ufisht:"⥾",ufr:"𝔲",ugrav:"ù",ugrave:"ù",uharl:"↿",uharr:"↾",uhblk:"▀",ulcorn:"⌜",ulcorner:"⌜",ulcrop:"⌏",ultri:"◸",umacr:"ū",um:"¨",uml:"¨",uogon:"ų",uopf:"𝕦",uparrow:"↑",updownarrow:"↕",upharpoonleft:"↿",upharpoonright:"↾",uplus:"⊎",upsi:"υ",upsih:"ϒ",upsilon:"υ",upuparrows:"⇈",urcorn:"⌝",urcorner:"⌝",urcrop:"⌎",uring:"ů",urtri:"◹",uscr:"𝓊",utdot:"⋰",utilde:"ũ",utri:"▵",utrif:"▴",uuarr:"⇈",uum:"ü",uuml:"ü",uwangle:"⦧",vArr:"⇕",vBar:"⫨",vBarv:"⫩",vDash:"⊨",vangrt:"⦜",varepsilon:"ϵ",varkappa:"ϰ",varnothing:"∅",varphi:"ϕ",varpi:"ϖ",varpropto:"∝",varr:"↕",varrho:"ϱ",varsigma:"ς",varsubsetneq:"⊊︀",varsubsetneqq:"⫋︀",varsupsetneq:"⊋︀",varsupsetneqq:"⫌︀",vartheta:"ϑ",vartriangleleft:"⊲",vartriangleright:"⊳",vcy:"в",vdash:"⊢",vee:"∨",veebar:"⊻",veeeq:"≚",vellip:"⋮",verbar:"|",vert:"|",vfr:"𝔳",vltri:"⊲",vnsub:"⊂⃒",vnsup:"⊃⃒",vopf:"𝕧",vprop:"∝",vrtri:"⊳",vscr:"𝓋",vsubnE:"⫋︀",vsubne:"⊊︀",vsupnE:"⫌︀",vsupne:"⊋︀",vzigzag:"⦚",wcirc:"ŵ",wedbar:"⩟",wedge:"∧",wedgeq:"≙",weierp:"℘",wfr:"𝔴",wopf:"𝕨",wp:"℘",wr:"≀",wreath:"≀",wscr:"𝓌",xcap:"⋂",xcirc:"◯",xcup:"⋃",xdtri:"▽",xfr:"𝔵",xhArr:"⟺",xharr:"⟷",xi:"ξ",xlArr:"⟸",xlarr:"⟵",xmap:"⟼",xnis:"⋻",xodot:"⨀",xopf:"𝕩",xoplus:"⨁",xotime:"⨂",xrArr:"⟹",xrarr:"⟶",xscr:"𝓍",xsqcup:"⨆",xuplus:"⨄",xutri:"△",xvee:"⋁",xwedge:"⋀",yacut:"ý",yacute:"ý",yacy:"я",ycirc:"ŷ",ycy:"ы",ye:"¥",yen:"¥",yfr:"𝔶",yicy:"ї",yopf:"𝕪",yscr:"𝓎",yucy:"ю",yum:"ÿ",yuml:"ÿ",zacute:"ź",zcaron:"ž",zcy:"з",zdot:"ż",zeetrf:"ℨ",zeta:"ζ",zfr:"𝔷",zhcy:"ж",zigrarr:"⇝",zopf:"𝕫",zscr:"𝓏",zwj:"‍",zwnj:"‌"},$p=function(e){return!!Gp.call(zp,e)&&zp[e]},Gp={}.hasOwnProperty;var qp={AElig:"Æ",AMP:"&",Aacute:"Á",Acirc:"Â",Agrave:"À",Aring:"Å",Atilde:"Ã",Auml:"Ä",COPY:"©",Ccedil:"Ç",ETH:"Ð",Eacute:"É",Ecirc:"Ê",Egrave:"È",Euml:"Ë",GT:">",Iacute:"Í",Icirc:"Î",Igrave:"Ì",Iuml:"Ï",LT:"<",Ntilde:"Ñ",Oacute:"Ó",Ocirc:"Ô",Ograve:"Ò",Oslash:"Ø",Otilde:"Õ",Ouml:"Ö",QUOT:'"',REG:"®",THORN:"Þ",Uacute:"Ú",Ucirc:"Û",Ugrave:"Ù",Uuml:"Ü",Yacute:"Ý",aacute:"á",acirc:"â",acute:"´",aelig:"æ",agrave:"à",amp:"&",aring:"å",atilde:"ã",auml:"ä",brvbar:"¦",ccedil:"ç",cedil:"¸",cent:"¢",copy:"©",curren:"¤",deg:"°",divide:"÷",eacute:"é",ecirc:"ê",egrave:"è",eth:"ð",euml:"ë",frac12:"½",frac14:"¼",frac34:"¾",gt:">",iacute:"í",icirc:"î",iexcl:"¡",igrave:"ì",iquest:"¿",iuml:"ï",laquo:"«",lt:"<",macr:"¯",micro:"µ",middot:"·",nbsp:" ",not:"¬",ntilde:"ñ",oacute:"ó",ocirc:"ô",ograve:"ò",ordf:"ª",ordm:"º",oslash:"ø",otilde:"õ",ouml:"ö",para:"¶",plusmn:"±",pound:"£",quot:'"',raquo:"»",reg:"®",sect:"§",shy:"­",sup1:"¹",sup2:"²",sup3:"³",szlig:"ß",thorn:"þ",times:"×",uacute:"ú",ucirc:"û",ugrave:"ù",uml:"¨",uuml:"ü",yacute:"ý",yen:"¥",yuml:"ÿ"},Hp={0:"�",128:"€",130:"‚",131:"ƒ",132:"„",133:"…",134:"†",135:"‡",136:"ˆ",137:"‰",138:"Š",139:"‹",140:"Œ",142:"Ž",145:"‘",146:"’",147:"“",148:"”",149:"•",150:"–",151:"—",152:"˜",153:"™",154:"š",155:"›",156:"œ",158:"ž",159:"Ÿ"},Vp=Mp,Wp=jp,Yp=function(e){return Bp(e)||Up(e)},Kp=$p,Xp=function(e,t){var n,r,o={};t||(t={});for(r in ef)n=t[r],o[r]=null==n?ef[r]:n;(o.position.indent||o.position.start)&&(o.indent=o.position.indent||[],o.position=o.position.start);return function(e,t){var n,r,o,a,i,s,l,c,u,d,p,f,g,m,h,b,y,v,w,S=t.additional,x=t.nonTerminated,E=t.text,k=t.reference,A=t.warning,T=t.textContext,O=t.referenceContext,C=t.warningContext,I=t.position,N=t.indent||[],R=e.length,_=0,P=-1,L=I.column||1,D=I.line||1,M="",j=[];"string"==typeof S&&(S=S.charCodeAt(0));b=F(),c=A?B:Jp,_--,R++;for(;++_<R;)if(i===nf&&(L=N[P]||1),(i=e.charCodeAt(_))===af){if((l=e.charCodeAt(_+1))===tf||l===nf||l===rf||l===of||l===af||l===lf||l!=l||S&&l===S){M+=Qp(i),L++;continue}for(f=g=_+1,w=g,l===uf?(w=++f,(l=e.charCodeAt(w))===df||l===pf?(m=mf,w=++f):m=hf):m=gf,n="",p="",a="",h=yf[m],w--;++w<R&&h(l=e.charCodeAt(w));)a+=Qp(l),m===gf&&Zp.call(qp,a)&&(n=a,p=qp[a]);(o=e.charCodeAt(w)===sf)&&(w++,(r=m===gf&&Kp(a))&&(n=a,p=r)),v=1+w-g,(o||x)&&(a?m===gf?(o&&!p?c(Ef,1):(n!==a&&(v=1+(w=f+n.length)-f,o=!1),o||(u=n?vf:Sf,t.attribute?(l=e.charCodeAt(w))===cf?(c(u,v),p=null):Yp(l)?p=null:c(u,v):c(u,v))),s=p):(o||c(wf,v),Of(s=parseInt(a,bf[m]))?(c(Af,v),s=Qp(ff)):s in Hp?(c(kf,v),s=Hp[s]):(d="",Cf(s)&&c(kf,v),s>65535&&(d+=Qp((s-=65536)>>>10|55296),s=56320|1023&s),s=d+Qp(s))):m!==gf&&c(xf,v)),s?(U(),b=F(),_=w-1,L+=w-g+1,j.push(s),(y=F()).offset++,k&&k.call(O,s,{start:b,end:y},e.slice(g-1,w)),b=y):(a=e.slice(g-1,w),M+=a,L+=a.length,_=w-1)}else 10===i&&(D++,P++,L=0),i==i?(M+=Qp(i),L++):U();return j.join("");function F(){return{line:D,column:L,offset:_+(I.offset||0)}}function B(e,t){var n=F();n.column+=t,n.offset+=t,A.call(C,Tf[e],n,e)}function U(){M&&(j.push(M),E&&E.call(T,M,{start:b,end:F()}),M="")}}(e,o)},Zp={}.hasOwnProperty,Qp=String.fromCharCode,Jp=Function.prototype,ef={warning:null,reference:null,text:null,warningContext:null,referenceContext:null,textContext:null,position:{},additional:null,attribute:!1,nonTerminated:!0},tf=9,nf=10,rf=12,of=32,af=38,sf=59,lf=60,cf=61,uf=35,df=88,pf=120,ff=65533,gf="named",mf="hexadecimal",hf="decimal",bf={};bf[mf]=16,bf[hf]=10;var yf={};yf[gf]=Yp,yf[hf]=Vp,yf[mf]=Wp;var vf=1,wf=2,Sf=3,xf=4,Ef=5,kf=6,Af=7,Tf={};function Of(e){return e>=55296&&e<=57343||e>1114111}function Cf(e){return e>=1&&e<=8||11===e||e>=13&&e<=31||e>=127&&e<=159||e>=64976&&e<=65007||!(65535&~e)||65534==(65535&e)}Tf[vf]="Named character references must be terminated by a semicolon",Tf[wf]="Numeric character references must be terminated by a semicolon",Tf[Sf]="Named character references cannot be empty",Tf[xf]="Numeric character references cannot be empty",Tf[Ef]="Named character references must be known",Tf[kf]="Numeric character references cannot be disallowed",Tf[Af]="Numeric character references cannot be outside the permissible Unicode range";var If={exports:{}};!function(e){var t=function(e){var t=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,n=0,r={},o={manual:e.Prism&&e.Prism.manual,disableWorkerMessageHandler:e.Prism&&e.Prism.disableWorkerMessageHandler,util:{encode:function e(t){return t instanceof a?new a(t.type,e(t.content),t.alias):Array.isArray(t)?t.map(e):t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/\u00a0/g," ")},type:function(e){return Object.prototype.toString.call(e).slice(8,-1)},objId:function(e){return e.__id||Object.defineProperty(e,"__id",{value:++n}),e.__id},clone:function e(t,n){var r,a;switch(n=n||{},o.util.type(t)){case"Object":if(a=o.util.objId(t),n[a])return n[a];for(var i in r={},n[a]=r,t)t.hasOwnProperty(i)&&(r[i]=e(t[i],n));return r;case"Array":return a=o.util.objId(t),n[a]?n[a]:(r=[],n[a]=r,t.forEach(function(t,o){r[o]=e(t,n)}),r);default:return t}},getLanguage:function(e){for(;e;){var n=t.exec(e.className);if(n)return n[1].toLowerCase();e=e.parentElement}return"none"},setLanguage:function(e,n){e.className=e.className.replace(RegExp(t,"gi"),""),e.classList.add("language-"+n)},currentScript:function(){if("undefined"==typeof document)return null;if(document.currentScript&&"SCRIPT"===document.currentScript.tagName)return document.currentScript;try{throw new Error}catch(r){var e=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(r.stack)||[])[1];if(e){var t=document.getElementsByTagName("script");for(var n in t)if(t[n].src==e)return t[n]}return null}},isActive:function(e,t,n){for(var r="no-"+t;e;){var o=e.classList;if(o.contains(t))return!0;if(o.contains(r))return!1;e=e.parentElement}return!!n}},languages:{plain:r,plaintext:r,text:r,txt:r,extend:function(e,t){var n=o.util.clone(o.languages[e]);for(var r in t)n[r]=t[r];return n},insertBefore:function(e,t,n,r){var a=(r=r||o.languages)[e],i={};for(var s in a)if(a.hasOwnProperty(s)){if(s==t)for(var l in n)n.hasOwnProperty(l)&&(i[l]=n[l]);n.hasOwnProperty(s)||(i[s]=a[s])}var c=r[e];return r[e]=i,o.languages.DFS(o.languages,function(t,n){n===c&&t!=e&&(this[t]=i)}),i},DFS:function e(t,n,r,a){a=a||{};var i=o.util.objId;for(var s in t)if(t.hasOwnProperty(s)){n.call(t,s,t[s],r||s);var l=t[s],c=o.util.type(l);"Object"!==c||a[i(l)]?"Array"!==c||a[i(l)]||(a[i(l)]=!0,e(l,n,s,a)):(a[i(l)]=!0,e(l,n,null,a))}}},plugins:{},highlightAll:function(e,t){o.highlightAllUnder(document,e,t)},highlightAllUnder:function(e,t,n){var r={callback:n,container:e,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};o.hooks.run("before-highlightall",r),r.elements=Array.prototype.slice.apply(r.container.querySelectorAll(r.selector)),o.hooks.run("before-all-elements-highlight",r);for(var a,i=0;a=r.elements[i++];)o.highlightElement(a,!0===t,r.callback)},highlightElement:function(t,n,r){var a=o.util.getLanguage(t),i=o.languages[a];o.util.setLanguage(t,a);var s=t.parentElement;s&&"pre"===s.nodeName.toLowerCase()&&o.util.setLanguage(s,a);var l={element:t,language:a,grammar:i,code:t.textContent};function c(e){l.highlightedCode=e,o.hooks.run("before-insert",l),l.element.innerHTML=l.highlightedCode,o.hooks.run("after-highlight",l),o.hooks.run("complete",l),r&&r.call(l.element)}if(o.hooks.run("before-sanity-check",l),(s=l.element.parentElement)&&"pre"===s.nodeName.toLowerCase()&&!s.hasAttribute("tabindex")&&s.setAttribute("tabindex","0"),!l.code)return o.hooks.run("complete",l),void(r&&r.call(l.element));if(o.hooks.run("before-highlight",l),l.grammar)if(n&&e.Worker){var u=new Worker(o.filename);u.onmessage=function(e){c(e.data)},u.postMessage(JSON.stringify({language:l.language,code:l.code,immediateClose:!0}))}else c(o.highlight(l.code,l.grammar,l.language));else c(o.util.encode(l.code))},highlight:function(e,t,n){var r={code:e,grammar:t,language:n};if(o.hooks.run("before-tokenize",r),!r.grammar)throw new Error('The language "'+r.language+'" has no grammar.');return r.tokens=o.tokenize(r.code,r.grammar),o.hooks.run("after-tokenize",r),a.stringify(o.util.encode(r.tokens),r.language)},tokenize:function(e,t){var n=t.rest;if(n){for(var r in n)t[r]=n[r];delete t.rest}var o=new l;return c(o,o.head,e),s(e,o,t,o.head,0),function(e){var t=[],n=e.head.next;for(;n!==e.tail;)t.push(n.value),n=n.next;return t}(o)},hooks:{all:{},add:function(e,t){var n=o.hooks.all;n[e]=n[e]||[],n[e].push(t)},run:function(e,t){var n=o.hooks.all[e];if(n&&n.length)for(var r,a=0;r=n[a++];)r(t)}},Token:a};function a(e,t,n,r){this.type=e,this.content=t,this.alias=n,this.length=0|(r||"").length}function i(e,t,n,r){e.lastIndex=t;var o=e.exec(n);if(o&&r&&o[1]){var a=o[1].length;o.index+=a,o[0]=o[0].slice(a)}return o}function s(e,t,n,r,l,d){for(var p in n)if(n.hasOwnProperty(p)&&n[p]){var f=n[p];f=Array.isArray(f)?f:[f];for(var g=0;g<f.length;++g){if(d&&d.cause==p+","+g)return;var m=f[g],h=m.inside,b=!!m.lookbehind,y=!!m.greedy,v=m.alias;if(y&&!m.pattern.global){var w=m.pattern.toString().match(/[imsuy]*$/)[0];m.pattern=RegExp(m.pattern.source,w+"g")}for(var S=m.pattern||m,x=r.next,E=l;x!==t.tail&&!(d&&E>=d.reach);E+=x.value.length,x=x.next){var k=x.value;if(t.length>e.length)return;if(!(k instanceof a)){var A,T=1;if(y){if(!(A=i(S,E,e,b))||A.index>=e.length)break;var O=A.index,C=A.index+A[0].length,I=E;for(I+=x.value.length;O>=I;)I+=(x=x.next).value.length;if(E=I-=x.value.length,x.value instanceof a)continue;for(var N=x;N!==t.tail&&(I<C||"string"==typeof N.value);N=N.next)T++,I+=N.value.length;T--,k=e.slice(E,I),A.index-=E}else if(!(A=i(S,0,k,b)))continue;O=A.index;var R=A[0],_=k.slice(0,O),P=k.slice(O+R.length),L=E+k.length;d&&L>d.reach&&(d.reach=L);var D=x.prev;if(_&&(D=c(t,D,_),E+=_.length),u(t,D,T),x=c(t,D,new a(p,h?o.tokenize(R,h):R,v,R)),P&&c(t,x,P),T>1){var M={cause:p+","+g,reach:L};s(e,t,n,x.prev,E,M),d&&M.reach>d.reach&&(d.reach=M.reach)}}}}}}function l(){var e={value:null,prev:null,next:null},t={value:null,prev:e,next:null};e.next=t,this.head=e,this.tail=t,this.length=0}function c(e,t,n){var r=t.next,o={value:n,prev:t,next:r};return t.next=o,r.prev=o,e.length++,o}function u(e,t,n){for(var r=t.next,o=0;o<n&&r!==e.tail;o++)r=r.next;t.next=r,r.prev=t,e.length-=o}if(e.Prism=o,a.stringify=function e(t,n){if("string"==typeof t)return t;if(Array.isArray(t)){var r="";return t.forEach(function(t){r+=e(t,n)}),r}var a={type:t.type,content:e(t.content,n),tag:"span",classes:["token",t.type],attributes:{},language:n},i=t.alias;i&&(Array.isArray(i)?Array.prototype.push.apply(a.classes,i):a.classes.push(i)),o.hooks.run("wrap",a);var s="";for(var l in a.attributes)s+=" "+l+'="'+(a.attributes[l]||"").replace(/"/g,"&quot;")+'"';return"<"+a.tag+' class="'+a.classes.join(" ")+'"'+s+">"+a.content+"</"+a.tag+">"},!e.document)return e.addEventListener?(o.disableWorkerMessageHandler||e.addEventListener("message",function(t){var n=JSON.parse(t.data),r=n.language,a=n.code,i=n.immediateClose;e.postMessage(o.highlight(a,o.languages[r],r)),i&&e.close()},!1),o):o;var d=o.util.currentScript();function p(){o.manual||o.highlightAll()}if(d&&(o.filename=d.src,d.hasAttribute("data-manual")&&(o.manual=!0)),!o.manual){var f=document.readyState;"loading"===f||"interactive"===f&&d&&d.defer?document.addEventListener("DOMContentLoaded",p):window.requestAnimationFrame?window.requestAnimationFrame(p):window.setTimeout(p,16)}return o}("undefined"!=typeof window?window:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:{});
20
+ */let st=null;function lt(t){e.useEffect(()=>{if(!rt||!t)return;const e=t.split(",")[0]?.trim();if(!e||it.has(e))return;if((e=>{const t=e.trim().toLowerCase();return!t||!!ot.has(t)||at.some(e=>t.includes(e))})(e))return void it.add(e);let n=!0;return(async()=>{try{st||(st=Promise.resolve().then(function(){return Xr}));const t=await st,r=t&&"default"in t?t.default:t,o=(e=>e.trim().replace(/\s+/g,"+"))(e);r.load({google:{families:[`${o}:300,400,500,600,700`]},fontactive:e=>{n&&it.add(e)},fontinactive:e=>{n&&it.add(e),console.warn(`Warning: failed to load Google Font: ${e}`)}})}catch(e){console.error("Warning: WebFont loader error:",e)}})(),()=>{n=!1}},[t])}function ct(e){return"string"==typeof e&&/^https?:\/\//i.test(e)?e:void 0}const ut="__eshalChatWidgetCitationContext",dt="undefined"!=typeof window?window:"undefined"!=typeof globalThis?globalThis:void 0,pt=dt?dt[ut]||(dt[ut]=e.createContext(null)):e.createContext(null);function ft(e){return!!e&&(function(e){return!!e&&String(e.source_id||e.sourceid||"").startsWith("attachment:")}(e)?"string"==typeof e.url&&e.url.length>0:!("string"!=typeof(t=e.url)||!t.includes("/api/v1/sharepoint/file/"))||Boolean(e.source_id));var t}function gt(e,t){return"string"!=typeof e||""===e?"":/^https?:\/\//i.test(e)?e:t?`${String(t).replace(/\/$/,"")}${e.startsWith("/")?"":"/"}${e}`:e}function mt(){return Promise.resolve().then(function(){return e3})}const ht=e.lazy(mt);class bt extends e.Component{state={failed:!1};static getDerivedStateFromError(){return{failed:!0}}componentDidCatch(e){console.error("[widget] markdown chunk failed to load, showing plain text:",e)}render(){return this.state.failed?this.props.fallback:this.props.children}}const yt=/(```|`[^`]+`|(^|\n)\s{0,3}#{1,6}\s|(^|\n)\s*[-*+]\s|(^|\n)\s*\d+\.\s|(^|\n)\s*>\s|\[[^\]]*\]\([^)]*\)|\*\*|__|~~|(^|\n)\s*\||\[\d+\])/;const vt=({content:e,isDark:t,textColor:r,fontFamily:o,fontSize:a})=>n.jsx("p",{className:"leading-relaxed [&:first-child]:!mt-0 whitespace-pre-wrap break-words",style:{color:r||(t?"#f3f4f6":"#1A1A1A"),fontFamily:o||"Inter",fontSize:a||"14px",margin:0,lineHeight:"1.6",padding:0,overflowWrap:"break-word"},children:e}),wt=({content:t,isStreaming:r,isDark:o=!1,isRtl:a=!1,textColor:i,fontFamily:s,fontSize:l,onButtonClick:c,provideCitations:u=!0})=>{const[d,p]=e.useState(""),[f,g]=e.useState(!1),m=e.useRef(t),h=e.useRef(0),b=e.useRef(null),y=e.useRef(0);e.useEffect(()=>{if(t!==m.current){if(m.current=t,h.current>=t.length)return p(t),void g(!1);t.length<d.length&&(h.current=0,p(""))}if(!r)return p(t),g(!1),void(b.current&&cancelAnimationFrame(b.current));g(!0);const e=n=>{if(n-y.current<16)b.current=requestAnimationFrame(e);else if(y.current=n,h.current<t.length){const n=Math.max(2,Math.floor(4*Math.random())),r=Math.min(h.current+n,t.length);p(t.slice(0,r)),h.current=r,b.current=requestAnimationFrame(e)}else g(!1)};return b.current=requestAnimationFrame(e),()=>{b.current&&cancelAnimationFrame(b.current)}},[t,r]);const v=function(e){return"string"==typeof e&&0!==e.length&&yt.test(e)}(d);return n.jsxs("div",{className:"relative",dir:"auto",style:{textAlign:a?"right":"left",color:i||(o?"#f3f4f6":"#1A1A1A"),fontFamily:s||"Inter",fontSize:l||"14px",margin:0,padding:0},children:[v?n.jsx(bt,{fallback:n.jsx(vt,{content:d,isDark:o,textColor:i,fontFamily:s,fontSize:l}),children:n.jsx(e.Suspense,{fallback:n.jsx(vt,{content:d,isDark:o,textColor:i,fontFamily:s,fontSize:l}),children:n.jsx(ht,{content:d,isStreaming:r,isDark:o,isRtl:a,textColor:i,fontFamily:s,fontSize:l,onButtonClick:c,provideCitations:u})})}):n.jsx(vt,{content:d,isDark:o,textColor:i,fontFamily:s,fontSize:l}),f&&n.jsx("span",{className:"inline-block w-1.5 h-4 bg-blue-500 ms-0.5 animate-pulse align-text-bottom",style:{animationDuration:"0.8s"}})]})},St=({isDark:e,t:t})=>n.jsxs("div",{className:"flex gap-1.5",role:"status","aria-label":t("agentIsTyping"),children:[n.jsx("div",{className:`w-2 h-2 rounded-full ${e?"bg-gray-500":"bg-gray-400"} animate-bounce`,style:{animationDelay:"0ms"},"aria-hidden":"true"}),n.jsx("div",{className:`w-2 h-2 rounded-full ${e?"bg-gray-500":"bg-gray-400"} animate-bounce`,style:{animationDelay:"150ms"},"aria-hidden":"true"}),n.jsx("div",{className:`w-2 h-2 rounded-full ${e?"bg-gray-500":"bg-gray-400"} animate-bounce`,style:{animationDelay:"300ms"},"aria-hidden":"true"})]}),xt=({question:e,options:t,onDecision:r,disabled:o,isDark:a=!1})=>n.jsxs("div",{className:"mt-3 p-3 rounded-lg border "+(a?"bg-blue-900/30 border-blue-700/50":"bg-blue-50 border-blue-200"),children:[n.jsx("p",{className:"text-sm font-medium mb-2 "+(a?"text-gray-100":"text-gray-900"),children:e}),n.jsx("div",{className:"space-y-2",children:t.map(e=>n.jsx("button",{onClick:()=>r(e.id,e.label),disabled:o,className:"w-full text-left px-3 py-2 text-sm rounded transition-all "+(a?"bg-gray-800 border border-gray-700 hover:bg-blue-900/50 hover:border-blue-600 disabled:opacity-50 disabled:cursor-not-allowed":"bg-white border border-gray-300 hover:bg-blue-50 hover:border-blue-400 disabled:opacity-50 disabled:cursor-not-allowed"),children:e.label},e.id))})]});function Et({content:t,isDark:r}){const[o,a]=e.useState(!1),i=e.useCallback(()=>{t&&(navigator.clipboard?.writeText(t).catch(()=>{}),a(!0),setTimeout(()=>a(!1),1500))},[t]);return n.jsx("button",{type:"button",onClick:i,className:"p-0.5 rounded transition-colors "+(r?"text-gray-500 hover:text-gray-300":"text-gray-400 hover:text-gray-600"),style:{border:"none",background:"transparent",appearance:"none",WebkitAppearance:"none",cursor:"pointer"},"aria-label":o?"Copied":"Copy message",title:o?"Copied":"Copy message",children:o?n.jsx(Pe,{className:"w-3 h-3 text-green-500"}):n.jsx(Fe,{className:"w-3 h-3"})})}const kt=({message:t,formatTime:r,isDark:o,primaryColor:a,agentMessageBubbleColor:i,resolvedAgentBubbleColor:s,textColor:l,assistantTextColor:c,fontFamily:u,agentMessageBubbleFontFamily:d,agentMessageBubbleFontSize:p,fontSize:f,isRtl:g,onDecision:m,companyLogo:h,conciergeName:b,companyName:y,apiBaseUrl:v,getAuthToken:w,onPromptSuggestionClick:S,allowFeedback:x=!0,provideCitations:E=!0,onFeedback:k,headerTextColor:A,t:T})=>{const O="string"==typeof t.content?t.content:"",C=t.isProcessing&&(!O||0===O.length),I=q(O,g),[N,R]=e.useState(()=>t?.feedback??null),[_,P]=e.useState(!1),[L,D]=e.useState(null),[M,j]=e.useState(""),F=e.useRef(null),B=e.useCallback(e=>{if(k&&O){if(N===e)return R(null),P(!1),D(null),j(""),void k(O,null);if("like"===e)return R("like"),P(!1),D(null),j(""),void k(O,"like");R(null),D("dislike"),P(!0),j(""),setTimeout(()=>F.current?.focus(),100)}},[N,k,O]),U=e.useCallback(()=>{k&&O&&L&&(R(L),k(O,L,M.trim()||void 0),P(!1),j(""),D(null))},[k,O,L,M]),z=e.useCallback(()=>{P(!1),j(""),D(null)},[]),$=!0===t?.isError,G=$?o?"rgba(239,68,68,0.15)":"#fee2e2":null!=s?s:null!=i?i:o?"#1f2937":"#FFFFFF",H=null!=i&&"#ffffff"!==i&&"#FFFFFF"!==i&&"#1f2937"!==i,V=$?o?"#fca5a5":"#991b1b":null!=c?c:null!=l?l:o?"#f3f4f6":"#1A1A1A",W=null!=d?d:null!=u?u:"Inter",Y=null!=p?p:null!=f?f:"14px";lt(W);const{onSourceActivate:K,downloadingKey:X}=function({apiBaseUrl:t,getAuthToken:n}){const[r,o]=e.useState(null),a=e.useCallback(async e=>{if(!e)return;const r=e.url||e.source_id||e.sourceid||e.source_name||"",a=String(e.source_id||e.sourceid||"").startsWith("attachment:"),i="string"==typeof e.url&&e.url.includes("/api/v1/sharepoint/file/"),s="file"===e.source_type||i||a||!(!e.source_id&&!e.sourceid)&&!e.url;if(!s){const t=ct(e.url);if(t)try{window.open(t,"_blank","noopener,noreferrer")}catch{}return}if(t||a){o(r),console.debug("[widget] citation download starting:",{source_id:e.source_id||e.sourceid,source_name:e.source_name,source_type:e.source_type,isAttachment:a,isSharePointProxy:i,isFileLike:s});try{let r;if(a){if(!e.url)throw new Error("attachment has no URL");const o={};if("function"==typeof n){const e=await n();e&&(o.Authorization=`Bearer ${e}`)}r=await fetch(gt(e.url,t),{method:"GET",headers:o,credentials:"include"})}else if(i){const o=gt(e.url,t),a={};if("function"==typeof n){const e=await n();e&&(a.Authorization=`Bearer ${e}`)}r=await fetch(o,{method:"GET",headers:a,credentials:"include"})}else{const o=`${t.replace(/\/$/,"")}/api/v1/support/file-download`,a={"Content-Type":"application/json"};if("function"==typeof n){const e=await n();e&&(a.Authorization=`Bearer ${e}`)}r=await fetch(o,{method:"POST",headers:a,credentials:"include",body:JSON.stringify({source_id:e.source_id||e.sourceid,file_name:e.url||"",source_name:e.source_name||""})})}if(!r.ok){const e=await r.json().catch(()=>({}));throw new Error(e.details||e.error||r.statusText)}const o=await r.blob(),s=r.headers.get("content-disposition");let l=e.source_name||"download";if(!a){const e=s&&/filename\*?=(?:UTF-8'')?["']?([^"'\s;]+)["']?/i.exec(s);if(e)try{l=decodeURIComponent(e[1].replace(/\\"/g,'"'))}catch{}}const c=document.createElement("a"),u=URL.createObjectURL(o);c.href=u,c.download=l,document.body.appendChild(c),c.click(),c.remove(),URL.revokeObjectURL(u)}catch(e){console.error("[widget] source download failed:",e)}finally{o(null)}}else console.warn("[widget] citation download skipped: apiBaseUrl missing and source is not an attachment (no fallback URL to fetch). Source:",e)},[t,n]);return{onSourceActivate:a,downloadingKey:r}}({apiBaseUrl:v,getAuthToken:w}),Z=e.useMemo(()=>({sources:t.sources||[],sourcesPreliminary:!!t.sourcesPreliminary,onSourceActivate:K,downloadingKey:X,textColor:V}),[t.sources,t.sourcesPreliminary,K,X,V]);return n.jsx(pt.Provider,{value:Z,children:n.jsxs("div",{className:"flex gap-3 flex-row animate-in min-w-0",children:[n.jsx("div",{className:"flex-shrink-0 mt-1",children:n.jsx("div",{className:"w-8 h-8 rounded-full overflow-hidden flex items-center justify-center",style:{backgroundColor:a||"#2563eb"},children:h?n.jsx("div",{className:"w-full h-full bg-white/10 flex items-center justify-center",children:n.jsx("img",{src:h,alt:b||y||"Assistant avatar",className:"object-contain rounded-full",style:{width:"100%",height:"100%"}})}):n.jsx("div",{className:"w-full h-full flex items-center justify-center",style:{fontSize:"18px",fontFamily:u||"Inter",color:A||"#FFFFFF"},children:(b||"A").charAt(0).toUpperCase()})})}),n.jsxs("div",{className:"flex flex-col items-start min-w-0 max-w-[75%]",children:[n.jsx("div",{className:"rounded-2xl px-4 py-2.5 shadow-sm border rounded-tl-sm rtl:rounded-tl-2xl rtl:rounded-tr-sm min-w-0 max-w-full overflow-hidden "+(H?"border-transparent":o?"border-gray-700":"border-gray-200"),style:{backgroundColor:G,color:V,fontFamily:W,fontSize:Y,direction:I?"rtl":"ltr",textAlign:I?"right":"left",...H?{borderColor:`${G}33`}:{}},children:C?n.jsx(St,{isDark:o,t:T}):n.jsx(n.Fragment,{children:t.requiresDecision&&t.decisionData&&m?n.jsxs("div",{children:[O&&n.jsx("div",{className:"mb-3",children:n.jsx(wt,{content:O,isStreaming:t.isProcessing,isDark:o,isRtl:I,textColor:V,fontFamily:W,fontSize:Y,onButtonClick:S,provideCitations:E})}),n.jsx(xt,{question:t.decisionData.question,options:t.decisionData.options,onDecision:(e,n)=>m(t.decisionData.decisionId,e,n),disabled:!!t.decisionResponse,isDark:o}),t.decisionResponse&&n.jsxs("div",{className:"mt-2 text-xs "+(o?"text-gray-400":"text-gray-500"),children:["Selected: ",t.decisionResponse.selectedOption]})]}):O?n.jsx(n.Fragment,{children:n.jsx(wt,{content:O,isStreaming:t.isProcessing,isDark:o,isRtl:I,textColor:V,fontFamily:W,fontSize:Y,onButtonClick:S,provideCitations:E})}):null})}),n.jsxs("div",{className:"flex items-center gap-1.5 mt-1.5 px-1",children:[n.jsx("p",{className:"text-xs leading-none "+(o?"text-gray-400":"text-gray-500"),dir:"auto",children:r(t.timestamp)}),!C&&!t.isProcessing&&O&&n.jsx(Et,{content:O,isDark:o}),!1!==x&&k&&!C&&!t.isProcessing&&O&&"welcome"!==t.type&&!t.isWelcome&&n.jsxs("div",{className:"flex items-center gap-0.5 ms-0.5",children:[n.jsx("button",{type:"button",onClick:()=>B("like"),className:"p-0.5 rounded transition-colors "+("like"===N||"like"===L?"text-green-500":o?"text-gray-500 hover:text-gray-300":"text-gray-400 hover:text-gray-600"),style:{border:"none",background:"transparent",appearance:"none",WebkitAppearance:"none",cursor:"pointer"},"aria-label":"Like",children:n.jsx(et,{className:"w-3 h-3"})}),n.jsx("button",{type:"button",onClick:()=>B("dislike"),className:"p-0.5 rounded transition-colors "+("dislike"===N||"dislike"===L?"text-red-500":o?"text-gray-500 hover:text-gray-300":"text-gray-400 hover:text-gray-600"),style:{border:"none",background:"transparent",appearance:"none",WebkitAppearance:"none",cursor:"pointer"},"aria-label":"Dislike",children:n.jsx(Je,{className:"w-3 h-3"})})]})]}),_&&"dislike"===L&&n.jsxs("div",{className:"mt-2 w-full rounded-xl border p-3 shadow "+(o?"bg-gray-800 border-gray-700":"bg-white border-gray-200"),style:{direction:g?"rtl":"ltr"},children:[n.jsx("textarea",{ref:F,value:M,onChange:e=>j(e.target.value),onKeyDown:e=>{(e.metaKey||e.ctrlKey)&&"Enter"===e.key?(e.preventDefault(),U()):"Escape"===e.key&&(e.preventDefault(),z())},placeholder:T("feedbackPlaceholder"),"aria-label":T("feedbackPlaceholder"),rows:2,className:"w-full resize-none rounded-lg border px-2 py-1.5 text-xs focus:outline-none focus:ring-1 "+(o?"bg-gray-900 border-gray-700 text-gray-100 placeholder-gray-500 focus:ring-gray-600":"bg-white border-gray-200 text-gray-900 placeholder-gray-400 focus:ring-gray-300"),style:{fontFamily:W,textAlign:g?"right":"left"}}),n.jsxs("div",{className:"flex items-center justify-end gap-1.5 mt-1.5",children:[n.jsx("button",{type:"button",onClick:z,className:"text-xs px-2 py-1 rounded transition-colors "+(o?"text-gray-400 hover:text-gray-200":"text-gray-500 hover:text-gray-700"),style:{border:"none",background:"transparent",cursor:"pointer"},children:T("cancel")}),n.jsx("button",{type:"button",onClick:U,className:"text-xs px-2.5 py-1 rounded text-white transition-opacity hover:opacity-90",style:{backgroundColor:a||"#2563eb",border:"none",cursor:"pointer"},children:T("submit")})]})]})]})]})})},At=({message:e,formatTime:t,userMessageBoxColor:r,primaryColor:o,resolvedUserMessageColor:a,textColor:i,userTextColor:s,fontFamily:l,userMessageBubbleFontFamily:c,userMessageBubbleFontSize:u,fontSize:d,isDark:p,isRtl:f,t:g,onRetryMessage:m})=>{const h=null!=a?a:null!=r?r:null!=o?o:"#2563eb",b=null!=s?s:null!=i?i:"#FFFFFF",y=null!=c?c:null!=l?l:"Inter",v=null!=u?u:null!=d?d:"14px",w=q("string"==typeof e?.content?e.content:"",f);lt(y);const S=Array.isArray(e.attachments)?e.attachments:[];return n.jsx("div",{className:"flex gap-3 flex-row-reverse animate-in",children:n.jsxs("div",{className:"flex flex-col items-end max-w-[75%]",children:[S.length>0&&n.jsx("div",{className:"mb-1.5 flex flex-wrap justify-end gap-1.5",children:S.map((e,t)=>String(e.mimeType||"").startsWith("image/")&&e.url?n.jsx("a",{href:e.url,target:"_blank",rel:"noopener noreferrer",className:"block rounded-md overflow-hidden",style:{maxWidth:160},title:e.filename,children:n.jsx("img",{src:e.url,alt:e.filename||"attachment",style:{maxWidth:160,maxHeight:160,display:"block"}})},e.storageKey||t):n.jsxs("span",{className:"inline-flex items-center gap-1.5 rounded-full px-2.5 py-1 text-xs",style:{backgroundColor:p?"#1f2937":"#f3f4f6",color:p?"#e5e7eb":"#374151",border:"1px solid "+(p?"#374151":"#e5e7eb"),maxWidth:200},title:e.filename,children:[n.jsx($e,{size:12}),n.jsx("span",{className:"truncate",style:{maxWidth:140,direction:"ltr"},children:e.filename})]},e.storageKey||t))}),e.content&&""!==e.content.trim()&&n.jsx("div",{className:"rounded-2xl px-4 py-2.5 shadow-lg "+(w?"rounded-tl-sm":"rounded-tr-sm"),dir:"auto",style:{background:`linear-gradient(135deg, ${h} 0%, ${h}dd 100%)`,fontFamily:y,direction:w?"rtl":"ltr",textAlign:w?"right":"left"},children:n.jsx("p",{className:"whitespace-pre-wrap break-words",dir:"auto",style:{color:b,fontFamily:y,fontSize:v,lineHeight:"1.5",textAlign:w?"right":"left",overflowWrap:"break-word",margin:0,padding:0},children:e.content})}),n.jsxs("div",{className:"flex items-center gap-1.5 mt-1.5 px-1",children:[n.jsx("p",{className:"text-xs leading-none "+(p?"text-gray-400":"text-gray-500"),dir:"auto",children:t(e.timestamp)}),e.content&&""!==e.content.trim()&&n.jsx(Et,{content:e.content,isDark:p})]}),"failed"===e.status&&n.jsxs("div",{className:"flex items-center gap-1.5 mt-1 px-1","data-testid":"message-failed-state",children:[n.jsx("span",{className:"text-xs leading-none",style:{color:"#dc2626"},dir:"auto",children:g("messageNotDelivered")}),"function"==typeof m&&n.jsx("button",{type:"button",onClick:()=>m(e),className:"text-xs leading-none font-medium underline",style:{color:"#dc2626"},dir:"auto",children:g("retrySend")})]})]})})},Tt=({message:t,isDark:r,primaryColor:o,agentMessageBubbleColor:a,userMessageBoxColor:i,resolvedUserMessageColor:s,resolvedAgentBubbleColor:l,textColor:c,assistantTextColor:u,userTextColor:d,fontFamily:p,agentMessageBubbleFontFamily:f,agentMessageBubbleFontSize:g,userMessageBubbleFontFamily:m,userMessageBubbleFontSize:h,fontSize:b,formatTime:y,isRtl:v,onDecision:w,companyLogo:S,conciergeName:x,companyName:E,apiBaseUrl:k,getAuthToken:A,onPromptSuggestionClick:T,allowFeedback:O,provideCitations:C,onFeedback:I,headerTextColor:N,onRetryMessage:R,defaultLanguage:_="en"})=>{const P=e.useMemo(()=>V(_),[_]);return t?"user"===t.role?n.jsx(At,{message:t,formatTime:y,userMessageBoxColor:i,primaryColor:o,resolvedUserMessageColor:s,textColor:c,userTextColor:d,fontFamily:p,userMessageBubbleFontFamily:m,userMessageBubbleFontSize:h,fontSize:b,isDark:r,isRtl:v,t:P,onRetryMessage:R}):n.jsx(kt,{message:t,formatTime:y,isDark:r,primaryColor:o,agentMessageBubbleColor:a,resolvedAgentBubbleColor:l,textColor:c,assistantTextColor:u,fontFamily:p,agentMessageBubbleFontFamily:f,agentMessageBubbleFontSize:g,fontSize:b,isRtl:v,onDecision:w,companyLogo:S,conciergeName:x,companyName:E,apiBaseUrl:k,getAuthToken:A,onPromptSuggestionClick:T,allowFeedback:O,provideCitations:C,onFeedback:I,headerTextColor:N,t:P}):null};var Ot=e.memo(Tt);const Ct=(e,t,n)=>Number.isNaN(e)?t:Math.min(Math.max(e,t),n),It=e=>{if(!e)return null;const t=(e=>e?.trim().toLowerCase()??"")(e),n=(e=>{const t=e.match(/^#?([0-9a-f]{3}|[0-9a-f]{6})$/i);if(!t)return null;let n=t[1];3===n.length&&(n=n.split("").map(e=>`${e}${e}`).join(""));const r=parseInt(n.slice(0,2),16),o=parseInt(n.slice(2,4),16),a=parseInt(n.slice(4,6),16);return[r,o,a].some(e=>Number.isNaN(e))?null:{r:r,g:o,b:a}})(t);if(n)return n;const r=(e=>{const t=e.match(/^rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})(?:\s*,\s*(\d*\.?\d+))?\s*\)$/i);return t?{r:Ct(Number.parseInt(t[1],10),0,255),g:Ct(Number.parseInt(t[2],10),0,255),b:Ct(Number.parseInt(t[3],10),0,255)}:null})(t);return r||null},Nt=({r:e,g:t,b:n})=>{const r=e=>{const t=Ct(Math.round(e),0,255).toString(16);return 1===t.length?`0${t}`:t};return`#${r(e)}${r(t)}${r(n)}`},Rt=(e,t,n)=>{const r=Ct(n,0,1);return{r:Math.round(e.r+(t.r-e.r)*r),g:Math.round(e.g+(t.g-e.g)*r),b:Math.round(e.b+(t.b-e.b)*r)}},_t=(e,t)=>{const n=Ct(t,0,1);return`rgba(${Ct(Math.round(e.r),0,255)}, ${Ct(Math.round(e.g),0,255)}, ${Ct(Math.round(e.b),0,255)}, ${n})`},Pt={background:"#f8fafc",hoverBackground:"#f1f5f9",border:"#e2e8f0",hoverBorder:"#cbd5f5",shadow:"0 4px 12px rgba(15, 23, 42, 0.08)",hoverShadow:"0 6px 20px rgba(15, 23, 42, 0.14)"},Lt={background:"#1f2937",hoverBackground:"#27364a",border:"#334155",hoverBorder:"#3b4c63",shadow:"0 4px 12px rgba(15, 23, 42, 0.45)",hoverShadow:"0 6px 20px rgba(15, 23, 42, 0.55)"},Dt=(e,t)=>{const n=It(e);if(!n)return(e=>e?Lt:Pt)(t);const r=(({r:e,g:t,b:n})=>{const r=[e,t,n].map(e=>{const t=e/255;return t<=.03928?t/12.92:((t+.055)/1.055)**2.4});return.2126*r[0]+.7152*r[1]+.0722*r[2]})(n),o=It("#0f172a")??{r:15,g:23,b:42},a=It(t?"#f8fafc":"#f9fafb")??{r:249,g:250,b:251},i=It(t?"#334155":"#e2e8f0")??{r:226,g:232,b:240};let s,l;if(r>=.6){const e=t?.5:.7,r=Math.min(1,e+.15);s=Rt(n,o,e),l=Rt(n,o,r)}else if(r<=.35){const e=t?.9:.8,r=Math.min(1,e+(t?.05:.12));s=Rt(n,a,e),l=Rt(n,a,r)}else{const e=t?.45:.6,r=Math.min(1,e+.1);s=Rt(n,i,e),l=Rt(n,i,r)}const c=Rt(n,s,.65),u=Rt(n,l,.7),d=`0 4px 12px ${_t(n,t?.28:.12)}`,p=`0 6px 20px ${_t(n,t?.35:.18)}`;return{background:Nt(s),hoverBackground:Nt(l),border:Nt(c),hoverBorder:Nt(u),shadow:d,hoverShadow:p}},Mt=({questions:t,isDark:r,palette:o,resolvedTextColor:a,fontFamily:i,fontSize:s,isRtl:l,onQuestionClick:c,applyHoverState:u,headingLabel:d})=>{const p=e.useRef(null),[f,g]=e.useState(!1),[m,h]=e.useState(!1),b=e.useCallback(()=>{const e=p.current;if(!e)return;const{scrollLeft:t,scrollWidth:n,clientWidth:r}=e;g(Math.abs(t)>1),h(Math.abs(t)+r<n-1)},[]);e.useEffect(()=>{b();const e=p.current;if(!e)return;const t=new ResizeObserver(b);return t.observe(e),()=>t.disconnect()},[b,t]);const y=e.useCallback(e=>{const t=p.current;if(!t)return;const n="left"===e?-150:150;t.scrollBy({left:l?-n:n,behavior:"smooth"})},[l]),v=r?"rgba(31,41,55,0.85)":"rgba(255,255,255,0.85)",w=r?"#e5e7eb":"#374151",S=r?"#4b5563":"#d1d5db";return n.jsxs("div",{className:"px-4 py-4 border-t "+(r?"border-gray-700/50":"border-gray-200/60"),children:[n.jsxs("div",{className:"text-xs mb-3 font-semibold tracking-wide uppercase "+(r?"text-gray-400":"text-gray-500"),children:[d||"Quick questions",":"]}),n.jsxs("div",{className:"flex items-center gap-1.5",children:[n.jsx("button",{onClick:()=>y("left"),disabled:!f,"aria-label":"Scroll left",className:"flex-shrink-0 flex items-center justify-center w-7 h-7 rounded-full shadow-sm transition-all duration-200 hover:shadow-md active:scale-95",style:{backgroundColor:v,border:`1px solid ${S}`,color:w,backdropFilter:"blur(4px)",opacity:f?1:.35,cursor:f?"pointer":"default"},children:n.jsx(Le,{size:16})}),n.jsx("div",{ref:p,onScroll:b,className:"flex-1 flex gap-3 overflow-x-auto pb-2",style:{scrollBehavior:"smooth",WebkitOverflowScrolling:"touch",scrollbarWidth:"none",msOverflowStyle:"none"},children:t.map((e,t)=>{const r=q(e,l);return n.jsxs("button",{onClick:()=>c?.(e),className:"group relative text-sm px-5 py-2.5 rounded-full font-medium transition-all duration-300 hover:scale-105 active:scale-95 whitespace-nowrap flex-shrink-0 overflow-hidden backdrop-blur-sm "+(r?"text-right":"text-left"),style:{direction:r?"rtl":"ltr",backgroundColor:o.background,border:`1.5px solid ${o.border}`,boxShadow:o.shadow},onMouseEnter:e=>{u(e.currentTarget,!0),e.currentTarget.style.transform="translateY(-2px)"},onMouseLeave:e=>{u(e.currentTarget,!1),e.currentTarget.style.transform="translateY(0)"},children:[n.jsx("div",{className:"absolute inset-0 bg-gradient-to-br from-white/0 via-white/5 to-white/10 opacity-0 group-hover:opacity-100 transition-opacity duration-300 rounded-xl"}),n.jsx("span",{className:"relative z-10",style:{direction:r?"rtl":"ltr",color:a,fontFamily:i,fontSize:s,textAlign:r?"right":"left"},children:e})]},t)})}),n.jsx("button",{onClick:()=>y("right"),disabled:!m,"aria-label":"Scroll right",className:"flex-shrink-0 flex items-center justify-center w-7 h-7 rounded-full shadow-sm transition-all duration-200 hover:shadow-md active:scale-95",style:{backgroundColor:v,border:`1px solid ${S}`,color:w,backdropFilter:"blur(4px)",opacity:m?1:.35,cursor:m?"pointer":"default"},children:n.jsx(De,{size:16})})]})]})},jt=({questions:t=[],isDark:r=!1,primaryColor:o="#2563eb",onQuestionClick:a,isTyping:i=!1,layout:s="vertical",fontFamily:l="Inter",fontSize:c="14px",textColor:u,isRtl:d=!1,questionTextColor:p,questionBoxColor:f,resolvedUserMessageColor:g,userMessageBoxColor:m,userTextColor:h,headingLabel:b})=>{if(!t.length||i)return null;const y=p??u??(r?"#f3f4f6":"#111827"),v=e.useMemo(()=>Dt(y,r),[y,r]),w=(e,t)=>{e.style.backgroundColor=t?v.hoverBackground:v.background,e.style.borderColor=t?v.hoverBorder:v.border,e.style.boxShadow=t?v.hoverShadow:v.shadow};if("horizontal"===s)return n.jsx(Mt,{questions:t,isDark:r,palette:v,resolvedTextColor:y,fontFamily:l,fontSize:c,isRtl:d,onQuestionClick:a,applyHoverState:w,headingLabel:b});const S=g??m??o??"#2563eb",x=h??u??"#FFFFFF";return n.jsxs("div",{style:{paddingInlineStart:"50px"},children:[b?n.jsx("div",{className:"mb-2",style:{color:r?"#9ca3af":"#6b7280",fontFamily:l,fontSize:`calc(${c} - 1px)`},children:b}):null,n.jsx("div",{className:"flex flex-wrap gap-2",children:t.map((e,t)=>{const r=q(e,d);return n.jsx("button",{onClick:()=>a?.(e),className:"transition-all duration-200 active:scale-[0.97]",style:{direction:r?"rtl":"ltr",fontFamily:l,fontSize:c,color:x,backgroundColor:S,border:"none",borderRadius:"9999px",padding:"5px 14px",fontWeight:500,lineHeight:"1.4",whiteSpace:"normal",textAlign:r?"right":"left"},children:e},t)})})]})},Ft=({active:t=!1,processing:r=!1,deviceId:o,barWidth:a=3,barGap:i=1,barRadius:s=1.5,barColor:l,fadeEdges:c=!0,fadeWidth:u=24,barHeight:d=4,height:p=64,sensitivity:f=1,smoothingTimeConstant:g=.8,fftSize:m=256,historySize:h=60,updateRate:b=30,mode:y="static",onError:v,onStreamReady:w,onStreamEnd:S,className:x,...E})=>{const k=e.useRef(null),A=e.useRef(null),T=e.useRef([]),O=e.useRef(null),C=e.useRef(null),I=e.useRef(null),N=e.useRef(0),R=e.useRef(0),_=e.useRef(null),P=e.useRef([]),L=e.useRef(0),D=e.useRef([]),M=e.useRef(!0),j=e.useRef(null),F=e.useRef(0),B="number"==typeof p?`${p}px`:p;return e.useEffect(()=>{const e=k.current,t=A.current;if(!e||!t)return;const n=new ResizeObserver(()=>{const n=t.getBoundingClientRect(),r=window.devicePixelRatio||1;e.width=n.width*r,e.height=n.height*r,e.style.width=`${n.width}px`,e.style.height=`${n.height}px`;const o=e.getContext("2d");o&&o.scale(r,r),j.current=null,F.current=n.width,M.current=!0});return n.observe(t),()=>n.disconnect()},[]),e.useEffect(()=>{if(r&&!t){let e=0;L.current=0;const t=()=>{e+=.03,L.current=Math.min(1,L.current+.02);const n=[],r=Math.floor((A.current?.getBoundingClientRect().width||200)/(a+i));if("static"===y){const t=Math.floor(r/2);for(let o=0;o<r;o++){const r=(o-t)/t,a=1-.4*Math.abs(r),i=(.2+(.25*Math.sin(1.5*e+3*r)+.2*Math.sin(.8*e-2*r)+.15*Math.cos(2*e+r)))*a;let s=i;if(P.current.length>0&&L.current<1){const e=Math.min(o,P.current.length-1);s=(P.current[e]||0)*(1-L.current)+i*L.current}n.push(Math.max(.05,Math.min(1,s)))}}else for(let t=0;t<r;t++){const o=(t-r/2)/(r/2),a=1-.4*Math.abs(o),i=(.2+(.25*Math.sin(1.5*e+.15*t)+.2*Math.sin(.8*e-.1*t)+.15*Math.cos(2*e+.05*t)))*a;let s=i;if(P.current.length>0&&L.current<1){const e=Math.floor(t/r*P.current.length);s=(P.current[e]||0)*(1-L.current)+i*L.current}n.push(Math.max(.05,Math.min(1,s)))}"static"===y?D.current=n:T.current=n,M.current=!0,_.current=requestAnimationFrame(t)};return t(),()=>{_.current&&cancelAnimationFrame(_.current)}}if(!t&&!r){if("static"===y?D.current.length>0:T.current.length>0){let e=0;const t=()=>{e+=.03,e<1?("static"===y?D.current=D.current.map(t=>t*(1-e)):T.current=T.current.map(t=>t*(1-e)),M.current=!0,requestAnimationFrame(t)):"static"===y?D.current=[]:T.current=[]};t()}}},[r,t,a,i,y]),e.useEffect(()=>{if(!t)return I.current&&(I.current.getTracks().forEach(e=>e.stop()),I.current=null,S?.()),C.current&&"closed"!==C.current.state&&(C.current.close(),C.current=null),void(N.current&&(cancelAnimationFrame(N.current),N.current=0));return(async()=>{try{const e=await navigator.mediaDevices.getUserMedia({audio:o?{deviceId:{exact:o},echoCancellation:!0,noiseSuppression:!0,autoGainControl:!0}:{echoCancellation:!0,noiseSuppression:!0,autoGainControl:!0}});I.current=e,w?.(e);const t=new(window.AudioContext||window.webkitAudioContext),n=t.createAnalyser();n.fftSize=m,n.smoothingTimeConstant=g;t.createMediaStreamSource(e).connect(n),C.current=t,O.current=n,T.current=[]}catch(e){v?.(e)}})(),()=>{I.current&&(I.current.getTracks().forEach(e=>e.stop()),I.current=null,S?.()),C.current&&"closed"!==C.current.state&&(C.current.close(),C.current=null),N.current&&(cancelAnimationFrame(N.current),N.current=0)}},[t,o,m,g,v,w,S]),e.useEffect(()=>{const e=k.current;if(!e)return;const n=e.getContext("2d");if(!n)return;let o;const p=g=>{const m=e.getBoundingClientRect();if(t&&g-R.current>b&&(R.current=g,O.current)){const e=new Uint8Array(O.current.frequencyBinCount);if(O.current.getByteFrequencyData(e),"static"===y){const t=Math.floor(.05*e.length),n=Math.floor(.4*e.length),r=e.slice(t,n),o=Math.floor(m.width/(a+i)),s=Math.floor(o/2),l=[];for(let e=s-1;e>=0;e--){const t=Math.floor(e/s*r.length),n=Math.min(1,r[t]/255*f);l.push(Math.max(.05,n))}for(let e=0;e<s;e++){const t=Math.floor(e/s*r.length),n=Math.min(1,r[t]/255*f);l.push(Math.max(.05,n))}D.current=l,P.current=l}else{let t=0;const n=Math.floor(.05*e.length),r=Math.floor(.4*e.length),o=e.slice(n,r);for(let e=0;e<o.length;e++)t+=o[e];const a=t/o.length/255*f;T.current.push(Math.min(1,Math.max(.05,a))),P.current=[...T.current],T.current.length>h&&T.current.shift()}M.current=!0}if(!M.current&&!t)return void(o=requestAnimationFrame(p));M.current=t,n.clearRect(0,0,m.width,m.height);const v=l||getComputedStyle(e).color||"#000",w=a+i,S=Math.floor(m.width/w),x=m.height/2;if("static"===y){const e=r||t||D.current.length>0?D.current:[];for(let t=0;t<S&&t<e.length;t++){const r=e[t]||.1,o=t*w,i=Math.max(d,r*m.height*.8),l=x-i/2;n.fillStyle=v,n.globalAlpha=.4+.6*r,s>0?(n.beginPath(),n.roundRect(o,l,a,i,s),n.fill()):n.fillRect(o,l,a,i)}}else for(let e=0;e<S&&e<T.current.length;e++){const t=T.current.length-1-e,r=T.current[t]||.1,o=m.width-(e+1)*w,i=Math.max(d,r*m.height*.8),l=x-i/2;n.fillStyle=v,n.globalAlpha=.4+.6*r,s>0?(n.beginPath(),n.roundRect(o,l,a,i,s),n.fill()):n.fillRect(o,l,a,i)}if(c&&u>0&&m.width>0){if(!j.current||F.current!==m.width){const e=n.createLinearGradient(0,0,m.width,0),t=Math.min(.3,u/m.width);e.addColorStop(0,"rgba(255,255,255,1)"),e.addColorStop(t,"rgba(255,255,255,0)"),e.addColorStop(1-t,"rgba(255,255,255,0)"),e.addColorStop(1,"rgba(255,255,255,1)"),j.current=e,F.current=m.width}n.globalCompositeOperation="destination-out",n.fillStyle=j.current,n.fillRect(0,0,m.width,m.height),n.globalCompositeOperation="source-over"}n.globalAlpha=1,o=requestAnimationFrame(p)};return o=requestAnimationFrame(p),()=>{o&&cancelAnimationFrame(o)}},[t,r,f,b,h,a,d,i,s,l,c,u,y]),n.jsxs("div",{className:ee("relative h-full w-full",x),ref:A,style:{height:B},"aria-label":t?"Live audio waveform":r?"Processing audio":"Audio waveform idle",role:"img",...E,children:[!t&&!r&&n.jsx("div",{className:"border-muted-foreground/20 absolute top-1/2 right-0 left-0 -translate-y-1/2 border-t-2 border-dotted"}),n.jsx("canvas",{className:"block h-full w-full",ref:k,"aria-hidden":"true"})]})};function Bt(e){if(!e||"user"===e.role)return null;const t=e.metadata?.senderName;return"string"==typeof t&&t.trim()?t.trim():null}const Ut=e.createContext(void 0),zt=e=>String(e??"").trim().toLowerCase();function $t(e,t){for(let n=t+1;n<(e||[]).length;n+=1){const t=e[n];if("user"===t?.role&&!t.sendFailed)return"string"==typeof t.content?t.content:String(t.content??"")}}const Gt=({messages:t=[],isDark:r,primaryColor:o,isLoading:a,agentMessageBubbleColor:i,userMessageBoxColor:s,textColor:l,assistantTextColor:c,userTextColor:u,fontFamily:d,agentMessageBubbleFontFamily:p,agentMessageBubbleFontSize:f,userMessageBubbleFontFamily:g,userMessageBubbleFontSize:m,fontSize:h,formatTime:b,isRtl:y=!1,defaultLanguage:w="en",quickQuestions:S=[],shouldShowQuickQuestions:x=!1,onQuickQuestion:E,quickQuestionsLayout:k="vertical",onDecision:A,disclaimerEnabled:T=!1,disclaimerText:O,disclaimerPosition:C="top",disclaimerLinkUrl:I,disclaimerLinkLabel:N,resolvedAgentBubbleColor:R,resolvedUserMessageColor:_,resolvedTextColor:P,isVoiceSessionActive:L=!1,voiceStatus:D="idle",messagesContainerRef:M,companyLogo:j,chatbotAvatarEnabled:F,chatbotAvatar:B,conciergeName:U,companyName:z,apiBaseUrl:$,getAuthToken:G,onPromptSuggestionClick:V,conversationResetKey:W,allowFeedback:Y,provideCitations:K,onFeedback:X,headerTextColor:Z,onRetryMessage:Q,beforePromptsSlot:ee=null,promptsSlot:te=null,quickQuestionsHeadingLabel:ne})=>{const re=e.useRef(null),oe=e.useRef(!0),ae=e.useRef(!1),ie=e.useMemo(()=>t.map(e=>`${e.id}:${e.content?.length??0}:${e.isProcessing?1:0}`).join("|"),[t]),se=e.useCallback(()=>{const e=M?.current;if(!e)return;const t=e.scrollHeight-e.scrollTop-e.clientHeight;oe.current=t<160},[M]);e.useEffect(()=>{const e=M?.current;if(e)return e.addEventListener("scroll",se,{passive:!0}),se(),()=>{e.removeEventListener("scroll",se)}},[se,M]),e.useEffect(()=>{W&&(oe.current=!0,ae.current=!1)},[W]),e.useEffect(()=>{if(ae.current||0===t.length||"undefined"==typeof window)return;ae.current=!0;let e,n=!1;const r=window.requestAnimationFrame(()=>{n||(e=window.requestAnimationFrame(()=>{n||(re.current?.scrollIntoView({behavior:"instant",block:"end"}),oe.current=!0)}))});return()=>{n=!0,window.cancelAnimationFrame(r),window.cancelAnimationFrame(e)}},[0===t.length]),e.useEffect(()=>{if(!oe.current)return;if("undefined"==typeof window)return;let e=!1;const t=window.requestAnimationFrame(()=>{e||re.current?.scrollIntoView({behavior:"smooth",block:"end"})});return()=>{e=!0,window.cancelAnimationFrame(t)}},[ie,a]),e.useEffect(()=>{if(!L||"connected"!==D)return;if("undefined"==typeof window)return;let e=!1;const t=window.requestAnimationFrame(()=>{e||re.current?.scrollIntoView({behavior:"smooth",block:"end"})});return()=>{e=!0,window.cancelAnimationFrame(t)}},[L,D]);const le=e.useMemo(()=>J(I),[I]),ce=e.useMemo(()=>function(e){const t=new Map;if(!Array.isArray(e))return t;const n=new Set;for(const r of e){const e=Bt(r);if(!e||!r.id)continue;const o=!n.has(e);n.add(e),t.set(r.id,{name:e,joined:o})}return t}(t),[t]),ue=e.useMemo(()=>q(O,y),[O,y]);return n.jsxs(n.Fragment,{children:[T&&O&&"top"===C&&n.jsx("div",{className:"flex justify-center",children:n.jsx("div",{className:"rounded-lg px-2 py-1 ",style:{color:r?"#d1d5db":"#6b7280",fontFamily:null!=d?d:"Inter",fontSize:null!=h?`calc(${h} - 2px)`:"12px",direction:ue?"rtl":"ltr",textAlign:"center",borderColor:r?"#374151":"#e5e7eb"},children:n.jsxs("p",{className:"leading-relaxed whitespace-pre-wrap break-words inline",dir:ue?"rtl":"ltr",style:{color:r?"#d1d5db":"#6b7280",fontFamily:null!=d?d:"Inter",fontSize:null!=h?`calc(${h} - 2px)`:"12px"},children:[O,le&&N&&n.jsx("a",{href:le,target:"_blank",rel:"noopener noreferrer",title:le,style:{color:r?"#93c5fd":"#2563eb",marginInlineStart:"4px",verticalAlign:"middle",display:"inline-flex",alignItems:"center"},children:N})]})})}),t.map((e,a)=>{const v=ce.get(e.id);return n.jsxs(Ut.Provider,{value:"assistant"===e.role?$t(t,a):void 0,children:[v?.joined&&n.jsx("div",{role:"status","data-testid":"agent-joined-line",style:{textAlign:"center",fontSize:"12px",opacity:.7,margin:"8px 0"},children:H(w,"agentJoinedConversation").replace("{name}",v.name)}),v&&n.jsx("div",{"data-testid":"agent-sender-name",style:{fontSize:"12px",fontWeight:600,opacity:.8,margin:"0 0 2px 4px",textAlign:y?"right":"left"},children:v.name}),n.jsx(Ot,{message:e,isDark:r,primaryColor:o,agentMessageBubbleColor:i,userMessageBoxColor:s,resolvedUserMessageColor:_,resolvedAgentBubbleColor:R,textColor:l,assistantTextColor:c,userTextColor:u,fontFamily:d,agentMessageBubbleFontFamily:p,agentMessageBubbleFontSize:f,userMessageBubbleFontFamily:g,userMessageBubbleFontSize:m,fontSize:h,formatTime:b,isRtl:q(e.content,y),onDecision:A,onPromptSuggestionClick:V,companyLogo:F&&B?B:j,conciergeName:U,companyName:z,apiBaseUrl:$,getAuthToken:G,allowFeedback:Y,provideCitations:K,onFeedback:X,headerTextColor:Z,onRetryMessage:Q,defaultLanguage:w})]},e.id)}),(()=>{const e=t[t.length-1],S=a&&"user"===e?.role,x=t.some(e=>"assistant"===e.role&&(e.isProcessing||!e.content));return S&&!x?n.jsx(Ot,{message:v(),isDark:r,primaryColor:o,agentMessageBubbleColor:i,resolvedAgentBubbleColor:R,userMessageBoxColor:s,textColor:l,assistantTextColor:c,userTextColor:u,fontFamily:d,agentMessageBubbleFontFamily:p,agentMessageBubbleFontSize:f,userMessageBubbleFontFamily:g,userMessageBubbleFontSize:m,fontSize:h,formatTime:b,isRtl:y,onDecision:A,companyLogo:F&&B?B:j,conciergeName:U,companyName:z,apiBaseUrl:$,getAuthToken:G,headerTextColor:Z,defaultLanguage:w},"skeleton-waiting"):null})(),ee,te?n.jsx("div",{className:"pt-1",children:te}):x&&S.length>0&&n.jsx("div",{className:"pt-1",children:n.jsx(jt,{questions:S,isDark:r,primaryColor:o,onQuestionClick:E,isTyping:a,layout:k,fontFamily:d,fontSize:h,textColor:l,isRtl:y,questionTextColor:c,questionBoxColor:i,resolvedUserMessageColor:_,userMessageBoxColor:s,userTextColor:u,headingLabel:ne})}),L&&"connected"===D&&!a&&n.jsx("div",{className:"flex gap-3 flex-row-reverse animate-in",children:n.jsx("div",{className:"flex flex-col items-end max-w-[75%] w-full",children:n.jsxs("div",{className:"rounded-2xl px-4 py-2.5 shadow-lg rounded-tr-sm w-full",style:{background:`linear-gradient(135deg, ${_||o||"#2563eb"} 0%, ${_||o||"#2563eb"}dd 100%)`,width:"100px"},children:[n.jsx("span",{className:"sr-only",children:"Listening for voice input"}),n.jsx(Ft,{active:!0,barWidth:2,barHeight:4,barGap:2,barColor:u||P||"#FFFFFF",height:20,fadeEdges:!0,className:"min-w-[60px]","aria-hidden":"true"})]})})}),n.jsx("div",{ref:re,className:"h-px"})]})};function qt(e,t){return String(e||"").replace(/\/+$/,"")+(t.startsWith("/")?t:`/${t}`)}function Ht({apiEndpoint:e,conversationId:t,size:n,authHeader:r}){fetch(qt(e,"/api/v1/chat-attachments/release"),{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({conversationId:t,size:n})}).catch(()=>{})}function Vt({orgId:t,conversationId:n,config:r,apiEndpoint:o,authHeader:a,onError:i}){const[s,l]=e.useState([]),c=e.useRef(new Map),u=e.useRef(0),d=e.useRef(s);d.current=s;const p=e.useRef({conversationId:n,bytes:0});p.current.conversationId!==n&&(p.current={conversationId:n,bytes:0});const f=e.useCallback(()=>(u.current+=1,`att-${Date.now()}-${u.current}`),[]),g=e.useCallback((e,t)=>{l(n=>n.map(n=>n.id===e?{...n,...t}:n))},[]),m=e.useCallback((e,t,n)=>{const r={status:"error",error:{code:t,message:n}};l(t=>{const n=t.map(t=>t.id===e?{...t,...r}:t),o=n.find(t=>t.id===e);return o&&i&&i(o),n})},[i]),h=e.useCallback((e,t)=>{if(!r?.fileUploadEnabled)return{ok:!1,code:"feature_disabled",message:"File uploads are not enabled for this organization."};if(t>=r.fileUploadMaxFiles)return{ok:!1,code:"too_many_files",message:`Max ${r.fileUploadMaxFiles} files per message.`};const n=1024*r.fileUploadMaxSizeMB*1024;if(p.current.bytes+e.size>n){return{ok:!1,code:"size_exceeded",message:`This conversation has already used ${(p.current.bytes/1048576).toFixed(1)} MB of its ${r.fileUploadMaxSizeMB} MB upload limit - this file won't fit.`}}const o=(e.type||"").toLowerCase(),a=new Set((r.fileUploadAllowedMimes||[]).map(e=>String(e).toLowerCase()));return a.size>0&&!a.has(o)?{ok:!1,code:"mime_not_allowed",message:`File type "${e.type||"unknown"}" is not allowed.`}:{ok:!0}},[r]),b=e.useCallback(async(e,t)=>{let r;try{r=await fetch(qt(o,"/api/v1/chat-attachments/presign"),{method:"POST",credentials:"include",headers:{"Content-Type":"application/json",...a?{Authorization:a}:{}},body:JSON.stringify({filename:t.name,mimeType:t.type,size:t.size,conversationId:n})})}catch(n){return p.current.bytes=Math.max(0,p.current.bytes-t.size),void m(e,"network","Network error while requesting upload.")}if(!r.ok){let n="Upload rejected by the server.",o="unknown";try{const e=await r.json();e?.error&&(n=e.error),e?.code&&(o=function(e){switch(e){case"feature_disabled":case"size_exceeded":case"mime_not_allowed":case"storage_unavailable":return e;default:return"unknown"}}(e.code))}catch{}return p.current.bytes=Math.max(0,p.current.bytes-t.size),void m(e,o,n)}let i=0;const s=()=>{i>0&&(Ht({apiEndpoint:o,conversationId:n,size:i,authHeader:a}),i=0,g(e,{reservedBytes:0}))},l=()=>{p.current.bytes=Math.max(0,p.current.bytes-t.size)};let u;try{u=await r.json()}catch{return Ht({apiEndpoint:o,conversationId:n,size:t.size,authHeader:a}),l(),g(e,{reservedBytes:0}),void m(e,"unknown","Malformed presign response.")}let d,f;("boolean"==typeof u.reserved?u.reserved:!u.useMultipart)&&(i=t.size,g(e,{reservedBytes:t.size}));try{if(u.useMultipart){const r=await function({url:e,file:t,conversationId:n,authHeader:r,onProgress:o,registerXhr:a}){return new Promise((r,i)=>{const s=new XMLHttpRequest;a(s),s.open("POST",e,!0),s.withCredentials=!0;const l=new FormData;l.append("conversationId",n),l.append("file",t,t.name),s.upload.onprogress=e=>{e.lengthComputable&&o(Math.round(e.loaded/e.total*100))},s.onload=()=>{if(s.status>=200&&s.status<300)try{const e=JSON.parse(s.responseText);r({url:"string"==typeof e?.url?e.url:void 0,storageKey:"string"==typeof e?.storageKey?e.storageKey:void 0})}catch{r({})}else i(new Error(`upload_status_${s.status}`))},s.onerror=()=>i(new Error("network")),s.onabort=()=>i({aborted:!0}),s.send(l)})}({url:qt(o,"/api/v1/chat-attachments/multipart"),file:t,conversationId:n,authHeader:a,onProgress:t=>g(e,{progress:t}),registerXhr:t=>c.current.set(e,t)});d=r.url,f=r.storageKey,i=t.size,g(e,{reservedBytes:t.size})}else{if(!u.uploadUrl)throw new Error("presign_missing_target");{await function({url:e,file:t,onProgress:n,registerXhr:r}){return new Promise((o,a)=>{const i=new XMLHttpRequest;r(i),i.open("PUT",e,!0),i.setRequestHeader("x-ms-blob-type","BlockBlob"),t.type&&i.setRequestHeader("Content-Type",t.type),i.upload.onprogress=e=>{e.lengthComputable&&n(Math.round(e.loaded/e.total*100))},i.onload=()=>{i.status>=200&&i.status<300?o():a(new Error(`upload_status_${i.status}`))},i.onerror=()=>a(new Error("network")),i.onabort=()=>a({aborted:!0}),i.send(t)})}({url:u.uploadUrl,file:t,onProgress:t=>g(e,{progress:t}),registerXhr:t=>c.current.set(e,t)});const n=await async function({apiEndpoint:e,storageKey:t,filename:n,mimeType:r,authHeader:o}){let a;try{a=await fetch(qt(e,"/api/v1/chat-attachments/confirm"),{method:"POST",credentials:"include",headers:{"Content-Type":"application/json",...o?{Authorization:o}:{}},body:JSON.stringify({storageKey:t,filename:n,mimeType:r})})}catch{return{ok:!1,code:"network",message:"Network error while verifying upload."}}if(a.ok)return{ok:!0};let i="Upload rejected - file content did not match its declared type.",s="content_mismatch";try{const e=await a.json();e?.error&&(i=e.error),"password_protected"===e?.code&&(s="password_protected")}catch{}return{ok:!1,code:s,message:i}}({apiEndpoint:o,storageKey:u.storageKey,filename:t.name,mimeType:t.type,authHeader:a});if(!n.ok)return c.current.delete(e),s(),l(),void m(e,n.code,n.message)}}}catch(t){if(c.current.delete(e),t&&t.aborted)return;return s(),l(),void m(e,"network","Upload failed. Please retry.")}c.current.delete(e),g(e,{status:"ready",progress:100,storageKey:f||u.storageKey,...d?{url:d}:{}})},[o,a,n,m,g]),y=e.useCallback(async e=>{const t=Array.from(e);for(const e of t){const t=d.current.filter(e=>"error"!==e.status).length,n=h(e,t),r=f();if(!n.ok){const t={id:r,filename:e.name,size:e.size,mimeType:e.type,status:"error",error:{code:n.code,message:n.message}};l(e=>(i&&i(t),[...e,t]));continue}const o={id:r,filename:e.name,size:e.size,mimeType:e.type,status:"uploading",progress:0,reservedBytes:0};l(e=>[...e,o]),p.current.bytes+=e.size,b(r,e)}},[h,b,f,i]),v=e.useCallback(e=>{const t=c.current.get(e);t&&(t.abort(),c.current.delete(e));const r=d.current.find(t=>t.id===e);r&&r.reservedBytes>0&&(Ht({apiEndpoint:o,conversationId:n,size:r.reservedBytes,authHeader:a}),p.current.bytes=Math.max(0,p.current.bytes-r.reservedBytes)),l(t=>t.filter(t=>t.id!==e))},[o,a,n]),w=e.useCallback(()=>{for(const e of c.current.values())e.abort();c.current.clear(),l([])},[]),S=e.useMemo(()=>s.some(e=>"validating"===e.status||"uploading"===e.status),[s]),x=e.useCallback(()=>s.filter(e=>"ready"===e.status&&"string"==typeof e.storageKey).map(e=>({filename:e.filename,mimeType:e.mimeType,size:e.size,storageKey:e.storageKey,url:e.url})),[s]);return{attachments:s,addFiles:y,removeAttachment:v,clearAll:w,isBusy:S,toSendPayload:x}}function Wt(e){if(!e||e<1024)return`${e||0} B`;const t=["KB","MB","GB"];let n=e/1024,r=0;for(;n>=1024&&r<t.length-1;)n/=1024,r+=1;return`${n.toFixed(n>=10?0:1)} ${t[r]}`}function Yt({attachment:e,onRemove:t,isDark:r}){const o="error"===e.status,a="uploading"===e.status,i="ready"===e.status,s=o?r?"rgba(239,68,68,0.15)":"#fee2e2":r?"#1f2937":"#f3f4f6",l=o?r?"#b91c1c":"#fca5a5":r?"#374151":"#e5e7eb",c=o?r?"#fca5a5":"#b91c1c":r?"#e5e7eb":"#374151",u=o?`${e.filename} - ${e.error?.message||"error"}`:a?`${e.filename} - uploading`:`${e.filename} - ready`;return n.jsxs("div",{className:"inline-flex items-center gap-2 rounded-full pl-2 pr-1 py-1 text-xs",style:{backgroundColor:s,border:`1px solid ${l}`,color:c,maxWidth:240},title:o?e.error?.message:e.filename,"aria-label":u,children:[o?n.jsx(Me,{size:12,"aria-hidden":"true"}):a?n.jsx(qe,{size:12,className:"animate-spin","aria-hidden":"true"}):n.jsx($e,{size:12,"aria-hidden":"true"}),n.jsx("span",{className:"truncate",style:{maxWidth:140,direction:"ltr"},children:e.filename}),i&&n.jsx("span",{className:"opacity-70 text-chip",children:Wt(e.size)}),a&&"number"==typeof e.progress&&n.jsxs("span",{className:"opacity-70 text-chip",children:[e.progress,"%"]}),n.jsx("button",{type:"button",onClick:()=>t(e.id),className:"w-4 h-4 rounded-full inline-flex items-center justify-center",style:{backgroundColor:"transparent",border:"none",color:c,cursor:"pointer"},"aria-label":"Remove attachment",children:n.jsx(nt,{size:12})})]})}function Kt({prompts:t,getDisplayText:n,detectDirection:r,ambientIsRtl:o,wrapperProps:a,stackProps:i,getKey:s,getChipProps:l,onChipClick:c,onSelect:u,before:d,after:p}){const f=e.createElement("div",i,t.map((t,a)=>{const i=n(t),d=r(i,o);return e.createElement("button",{key:s(t,a),type:"button",...l({prompt:t,index:a,displayText:i,chipIsRtl:d}),onClick:e=>{c&&c(t,a),u(t,a,e)}},i)}));return null==d&&null==p?e.createElement("div",a,f):e.createElement("div",a,d,f,p)}const Xt=({suggestions:e,onSuggestionClick:t,promptPrimary:r,promptTextColor:o,promptFontFamily:a,promptFontSize:i,isRtl:s,t:l,questionDisplay:c=!0})=>n.jsx(Kt,{prompts:e,getDisplayText:e=>((e,t=!0)=>{if(!e||"string"==typeof e)return e||"";const n="string"==typeof e.text?e.text:"";if(!t)return n;const r="string"==typeof e.submitText?e.submitText.trim():"";return r&&r!==n?r:n})(e,c),detectDirection:q,ambientIsRtl:s,wrapperProps:{className:"mb-2 px-5"},stackProps:{className:"flex flex-col gap-2",role:"group","aria-label":l("suggestedQuestions")},getKey:(e,t)=>`${e.text||e}-${t}`,getChipProps:({chipIsRtl:e})=>({dir:e?"rtl":"ltr",className:"block w-full rounded-2xl px-4 py-2 border-0 transition-transform duration-150 active:scale-[0.99] "+(e?"text-right":"text-left"),style:{direction:e?"rtl":"ltr",textAlign:e?"right":"left",background:`linear-gradient(135deg, ${r} 0%, ${r}dd 100%)`,color:o,fontFamily:a,fontSize:i}}),onSelect:(e,n)=>t(e.submitText||e.text||e,e,n)}),Zt=({onStopGeneration:t,inputValue:o,setInputValue:a,onSend:i,isDark:s,primaryColor:l,isOpen:c,isMinimized:u,isLoading:d,isConversationLoading:p=!1,placeholder:f,textColor:g,fontFamily:m,fontSize:h,isRtl:b=!1,csatVisible:y=!1,enableVoiceInteraction:v=!1,isVoiceSessionActive:w=!1,voiceStatus:S="idle",voiceError:x=null,onVoiceToggle:E,onBidiSubmit:k,disclaimerEnabled:A=!1,disclaimerText:T,disclaimerPosition:O="top",disclaimerLinkUrl:C,disclaimerLinkLabel:I,showPoweredBy:N=!0,onboardingQuestions:R=[],onboardingActive:_=!1,onboardingCompleted:P=!1,userMessageBubbleFontFamily:L,onboardingEnabled:D=!1,userMessageBubbleFontSize:F,userMessageBoxColor:B,resolvedUserMessageColor:z,userTextColor:$,promptSuggestions:G,onPromptSuggestionClick:H,autoPromptQuestionDisplay:W=!0,tagSelectorNode:Y=null,showResolveButton:K=!1,onResolve:X,defaultLanguage:Z="en",chatFeatures:Q,apiEndpoint:te,organizationId:ne,conversationId:re})=>{const oe=e.useMemo(()=>V(Z),[Z]),ae=e.useMemo(()=>function(e){const t=U(e),n=j[t]||M;return{beforeBrand:n.poweredByBefore??n.poweredBy??M.poweredByBefore,afterBrand:n.poweredByAfter??""}}(Z),[Z]),ie=e.useMemo(()=>q(o,b),[o,b]),[se,le]=e.useState(!1),[ce,ue]=e.useState(!1),de=e.useMemo(()=>({fileUploadEnabled:Q?.fileUploadEnabled??!1,fileUploadMaxSizeMB:Q?.fileUploadMaxSizeMB??10,fileUploadMaxFiles:Q?.fileUploadMaxFiles??3,fileUploadAllowedMimes:Q?.fileUploadAllowedMimes??[]}),[Q]),{attachments:pe,addFiles:fe,removeAttachment:ge,clearAll:me,isBusy:he,toSendPayload:be}=Vt({orgId:ne,conversationId:re,config:de,apiEndpoint:te,authHeader:void 0}),ye=e.useRef(null),ve=e.useRef(new Set);e.useEffect(()=>{if(!w||!re||!te)return;const e=be().filter(e=>e.storageKey&&!ve.current.has(e.storageKey));e.length&&(e.forEach(e=>ve.current.add(e.storageKey)),fetch(`${String(te).replace(/\/$/,"")}/api/v1/chat-attachments/ingest`,{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({conversationId:re,attachments:e.map(e=>({storageKey:e.storageKey}))})}).catch(()=>{}))},[w,re,te,pe,be]);const we=!!de.fileUploadEnabled&&!!te,Se=pe.length>=de.fileUploadMaxFiles,xe=`Max ${de.fileUploadMaxFiles} files per message.`,Ee=e.useMemo(()=>de.fileUploadAllowedMimes.length>0?de.fileUploadAllowedMimes.join(","):void 0,[de.fileUploadAllowedMimes]),[ke,Ae]=e.useState({top:0,left:0,placement:"top",arrowOffset:0}),[Te,Oe]=e.useState(!1),Ce=e.useRef(null),Ie=e.useRef(null),Ne=e.useRef(null),_e=e.useRef(null);lt(m),lt(L),e.useEffect(()=>{c&&!u&&Ie.current?.focus()},[c,u]),e.useEffect(()=>{const e=Ie.current;if(e){e.style.height="auto";const t=e.scrollHeight,n=o.trim().length>0?20:48,r=Math.max(n,Math.min(t,120));e.style.height=`${r}px`}},[o]);const Pe=e.useCallback(()=>{const e=be();e.length>0?(i(void 0,e),me()):i()},[be,me,i]),Le=pe.some(e=>"ready"===e.status),De=!o.trim()&&!Le||d||p||he,Me=s?"#374151":"#e5e7eb",je=R&&R.length>0,Fe=y||p||D&&(je&&!P)||"connecting"===S,Be=y?oe("pleaseSubmitRatingFirst"):je?_?oe("completeOnboardingToEnableVoice"):P?"":oe("sendMessageToCompleteOnboarding"):"",Ue=()=>{if(!Ne.current)return;const e=Ne.current.getBoundingClientRect(),t=220,n=e.top,r=window.innerHeight-e.bottom;let o="top",a=0,i=0;n>=73?(o="top",a=e.top-60-5-8,i=e.right-t,i<10&&(i=10),i+t>window.innerWidth-10&&(i=window.innerWidth-t-10)):r>=68?(o="bottom",a=e.bottom+8,i=e.right-t,i<10&&(i=10),i+t>window.innerWidth-10&&(i=window.innerWidth-t-10)):(o="top",a=Math.max(10,e.top-60-5-8),i=e.right-t,i<10&&(i=10),i+t>window.innerWidth-10&&(i=window.innerWidth-t-10));return{top:a,left:i,placement:o,arrowOffset:e.left+e.width/2-i}};e.useEffect(()=>{if(ce&&Be){const e=()=>{const e=Ue();Ae(e)};return window.addEventListener("scroll",e,!0),window.addEventListener("resize",e),()=>{window.removeEventListener("scroll",e,!0),window.removeEventListener("resize",e)}}},[ce,Be]),e.useEffect(()=>()=>{Ce.current&&clearTimeout(Ce.current)},[]);const ze=null!=z?z:null!=B?B:null!=l?l:"#2563eb",$e=null!=$?$:null!=g?g:"#FFFFFF",Ge=null!=L?L:null!=m?m:"Inter",He=null!=F?F:null!=h?h:null,Ve=He?`calc(${He} - 2px)`:"12px",Ye=J(C);return n.jsxs("div",{className:"py-4 flex-shrink-0 relative "+(s?"bg-gray-900":"bg-white"),style:{overflow:"visible"},children:[Y||G.length>0&&H&&n.jsx(Xt,{suggestions:G,onSuggestionClick:H,questionDisplay:W,promptPrimary:ze,promptTextColor:$e,promptFontFamily:Ge,promptFontSize:Ve,isRtl:b,t:oe}),n.jsx("div",{className:"my-4",style:{height:"1px",backgroundColor:Me}}),we&&pe.length>0&&n.jsx("div",{className:"px-5 mb-2 flex flex-wrap gap-1.5",children:pe.map(e=>n.jsx(Yt,{attachment:e,onRemove:ge,isDark:s},e.id))}),n.jsxs("div",{className:"flex items-center px-5 gap-1.5",children:[we&&n.jsx("input",{ref:ye,type:"file",multiple:!0,accept:Ee,"aria-label":oe("uploadFile"),className:"hidden",style:{display:"none"},onChange:e=>{const t=e.target.files;t&&t.length&&!Se&&fe(t),e.currentTarget.value=""}}),n.jsxs("div",{className:`flex-1 flex items-center gap-1 px-1 min-h-[48px] ${s?"bg-gray-800":"bg-gray-50"} rounded-2xl transition-all duration-200`,style:{borderStyle:"solid",borderColor:o&&o.trim().length>0?l||"#2563eb":Me,borderWidth:o&&o.trim().length>0?"2px":"1px"},children:[we&&n.jsxs("div",{className:"relative group shrink-0",children:[n.jsx("button",{type:"button",onClick:()=>ye.current&&ye.current.click(),disabled:y||p||d||Se,"aria-label":Se?xe:"Attach file",title:Se?xe:"Attach file",className:`h-8 w-8 rounded-lg flex items-center justify-center transition-colors duration-200 ${s?"text-gray-300 hover:bg-gray-700":"text-gray-500 hover:bg-gray-200"} disabled:opacity-40 disabled:cursor-not-allowed`,style:{border:"none"},children:n.jsx(We,{className:"w-4 h-4"})}),Se&&n.jsx("div",{role:"tooltip",className:"pointer-events-none absolute bottom-full left-1/2 -translate-x-1/2 mb-2 opacity-0 group-hover:opacity-100 transition-opacity px-3 py-1.5 text-xs rounded-lg whitespace-nowrap shadow-lg "+(s?"bg-gray-700 text-gray-100":"bg-gray-800 text-white"),children:xe})]}),n.jsx("div",{className:"relative flex-1 flex items-center min-w-0",children:n.jsx("textarea",{id:"chat-widget-input",ref:Ie,"aria-label":f||oe("typeYourMessage"),value:o,onChange:e=>{a(e.target.value)},onFocus:()=>le(!0),onBlur:()=>le(!1),onKeyDown:e=>{if("Enter"===e.key&&!e.shiftKey){if(e.preventDefault(),w&&k&&!Le)return void k();if(De)return;Pe()}},placeholder:p?oe("agentIsLoading"):f||oe("typeYourMessage"),rows:1,disabled:y||p||d||w&&"connected"!==S,dir:ie?"rtl":"ltr",className:`w-full px-3 bg-transparent rounded-xl leading-normal ${s?"text-gray-100":"text-gray-900"} placeholder-gray-400 resize-none outline-none scrollbar-hide break-words`,style:{height:"auto",maxHeight:"120px",minHeight:"48px",paddingTop:o.trim().length>0?"12px":"0px",paddingBottom:o.trim().length>0?"12px":"0px",lineHeight:o.trim().length>0?"1.4":"48px",fontFamily:L||m||"Inter",fontSize:h||"14px",color:s?"#F3F4F6":"#1F2937",textAlign:ie?"right":"left",direction:ie?"rtl":"ltr",wordSpacing:"0",letterSpacing:"0"}})}),v&&n.jsxs("div",{className:"relative shrink-0",onMouseEnter:()=>{if(Fe&&Be){Ce.current&&(clearTimeout(Ce.current),Ce.current=null);const e=Ue();Ae(e),ue(!0)}},onMouseLeave:()=>{Ce.current&&(clearTimeout(Ce.current),Ce.current=null),ue(!1)},children:[n.jsx("button",{style:{border:"none"},ref:Ne,type:"button",onClick:E,"aria-label":oe(w?"stopVoiceInput":"startVoiceInput"),className:`h-8 w-8 rounded-lg flex items-center justify-center transition-colors duration-200 ${w?"bg-red-500 text-white hover:bg-red-600":s?"text-gray-300 hover:bg-gray-700":"text-gray-500 hover:bg-gray-200"} ${Fe?"opacity-60 cursor-not-allowed":""}`,disabled:Fe,children:"connecting"===S?n.jsx(qe,{className:"w-4 h-4 animate-spin"}):n.jsx(Re,{className:"w-4 h-4"})}),ce&&Be&&"undefined"!=typeof document&&r.createPortal(n.jsxs("div",{ref:_e,className:"px-3 py-1.5 text-xs shadow-md pointer-events-none",style:{position:"fixed",top:`${ke.top}px`,left:`${ke.left}px`,maxWidth:"220px",whiteSpace:"normal",wordWrap:"break-word",minWidth:"180px",zIndex:999999,backgroundColor:s?"#1f2937":"#ffffff",color:s?"#f3f4f6":"#111827",border:s?"1px solid #374151":"1px solid #e5e7eb",borderRadius:"top"===ke.placement?"6px 6px 6px 6px":"6px",boxShadow:"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)",overflow:"visible"},children:[n.jsx("div",{className:"text-left leading-relaxed",children:Be}),"top"===ke.placement&&n.jsxs(n.Fragment,{children:[n.jsx("div",{style:{position:"absolute",top:"100%",left:`${ke.arrowOffset}px`,transform:"translateX(-50%)",width:0,height:0,borderLeft:"6px solid transparent",borderRight:"6px solid transparent",borderTop:s?"6px solid #374151":"6px solid #e5e7eb",pointerEvents:"none"}}),n.jsx("div",{style:{position:"absolute",top:"100%",left:`${ke.arrowOffset}px`,transform:"translateX(-50%)",marginTop:"-1px",width:0,height:0,borderLeft:"5px solid transparent",borderRight:"5px solid transparent",borderTop:s?"5px solid #1f2937":"5px solid #ffffff",pointerEvents:"none"}})]}),"bottom"===ke.placement&&n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"absolute bottom-full",style:{left:`${ke.arrowOffset}px`,transform:"translateX(-50%)",width:0,height:0,borderLeft:"5px solid transparent",borderRight:"5px solid transparent",borderBottom:s?"5px solid #374151":"5px solid #e5e7eb"}}),n.jsx("div",{className:"absolute bottom-full -mb-px",style:{left:`${ke.arrowOffset}px`,transform:"translateX(-50%)",width:0,height:0,borderLeft:"4px solid transparent",borderRight:"4px solid transparent",borderBottom:s?"4px solid #1f2937":"4px solid #ffffff"}})]})]}),document.body)]})]}),d&&!w&&"function"==typeof t?n.jsx("button",{onClick:t,className:"h-10 w-10 flex-shrink-0 rounded-xl transition-all duration-200 flex items-center justify-center shadow-md scale-100",style:{backgroundColor:l,color:"white",border:"none"},"aria-label":oe("stopGenerating"),children:n.jsx(Xe,{className:"w-3.5 h-3.5",fill:"currentColor"})}):n.jsx("button",{onClick:w&&k&&!Le?k:Pe,disabled:y||De||w&&"connected"!==S,className:"h-10 w-10 flex-shrink-0 rounded-xl transition-all duration-200 flex items-center justify-center shadow-md disabled:opacity-40 disabled:cursor-not-allowed disabled:shadow-none "+(o.trim()?"scale-100":"scale-95"),style:{backgroundColor:o.trim()?l:s?"#374151":"#e5e7eb",color:o.trim()?"white":"#9ca3af",border:"none"},"aria-label":oe("sendMessage"),children:n.jsx(Ke,{className:"w-4 h-4 transition-transform",style:b?{transform:"rotate(-90deg)"}:void 0})})]}),w&&n.jsxs("p",{"aria-live":"polite",className:`text-xs mt-2 px-5 ${"connected"===S?"text-status-success":"text-gray-500"} flex items-center gap-1`,children:[n.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-current inline-flex"}),oe("connected"===S?"voiceSessionLive":"connectingVoice")]}),x&&n.jsx("p",{role:"alert",className:"text-xs mt-1 px-5 text-status-error",children:oe(x)===x?oe("voiceUnavailable"):oe(x)}),A&&T&&"footer"===O&&n.jsxs("p",{className:"text-xs mt-2 px-5 text-center",style:{color:s?"#d1d5db":"#6b7280",fontFamily:m||"Inter",fontSize:h?`calc(${h} - 2px)`:"12px",direction:b?"rtl":"ltr"},dir:b?"rtl":"ltr",children:[T,Ye&&I&&n.jsx("a",{href:Ye,target:"_blank",rel:"noopener noreferrer",title:Ye,style:{color:s?"#93c5fd":"#2563eb",marginInlineStart:"4px",verticalAlign:"middle",display:"inline-flex",alignItems:"center"},children:I})]}),N&&n.jsx("div",{className:"mt-1.5 flex justify-center",children:n.jsx("a",{href:"https://eshal.ai",target:"_blank",rel:"noopener noreferrer",className:"no-underline",children:n.jsxs("span",{dir:"ltr",className:"inline-flex items-center gap-1.5 py-1.5 px-3",children:[ae.beforeBrand&&n.jsx("span",{className:ee("font-sans text-[10px] font-medium",s?"text-gray-400":"text-gray-500"),children:ae.beforeBrand}),Te?n.jsx("span",{className:ee("font-sans text-[10px] font-semibold",s?"text-gray-300":"text-gray-600"),children:"ESHAL"}):n.jsx("img",{src:s?"data:image/svg+xml,%3csvg width='219' height='54' xmlns='http://www.w3.org/2000/svg' version='1.0'%3e%3cg class='layer'%3e%3ctitle%3eEshal Logo%3c/title%3e%3cg clip-path='url(%23a)' transform='translate(-.708 -1.076)'%3e%3cg clip-path='url(%23b)'%3e%3cpath d='M21.79 54.75h4.5l3.93-.56 4.49-1.4 3.38-1.97 2.81-2.25 2.24-2.81 2.25-3.93 1.13-3.09v-.85l-3.65-1.12h-.57l-1.96 4.5-1.97 3.09-2.81 2.53-3.93 1.96-3.38.85-2.81.28h-2.81l-4.21-.57-3.94-1.4-2.81-1.97-2.25-2.24-1.96-3.38-1.41-4.21-.56-3.37-.28-3.1v-3.65l.56-5.06 1.12-4.21 1.97-3.94 2.53-2.81 2.25-1.68 2.81-1.41 3.37-.84 2.25-.28H26l4.78.84 4.5 2.25 2.53 2.53 1.4 2.53.56 2.53-.28 3.65-1.12 2.25-1.41 1.69-1.4.55-1.13-4.21-1.68-2.81-1.97-1.97-3.09-1.4-1.12-.28h-5.34l-3.09 1.12-2.25 1.69-1.41 1.97-.84 3.09.28 3.08 1.4 2.82 1.97 1.96 2.81 1.41 2.25.56 4.78.28 3.09-.28.84-.28-1.12 3.09-1.69 1.97-2.25.84h-3.65l-2.81-1.12-1.68-1.41-3.38 2.25.56 1.13 1.13 1.4 2.81 1.69 2.81.84h4.78l2.81-.84 2.53-1.69 1.96-2.25L35 34.8l.84-4.5 3.65-2.24 2.53-2.53 1.69-3.09.56-2.25.28-2.81-.56-3.93-1.12-2.82-2.25-3.09-3.09-2.81-4.22-2.25-4.5-1.12-2.52-.28h-4.5l-3.93.56-4.5 1.41-3.38 1.96-3.37 3.1-2.52 3.65-1.97 4.49-1.13 4.78-.28 2.25v9.27l.84 5.06 1.69 4.78 1.69 3.09 2.25 2.81 2.8 2.53 2.82 1.69 5.06 1.68zm1.12-27.54-2.53-.84-1.4-1.12-.84-1.69.28-2.53 1.12-1.4 2.25-1.13H26l2.81 1.41 1.41 1.97.84 2.8v2.25l-1.12.28zm0 0' fill='white'/%3e%3c/g%3e%3c/g%3e%3cpath d='M82.381 38.435v6.48h-27.06V9.965h26.41v6.5h-18.36v7.57h16.22v6.3h-16.22v8.1zm16.432 7.07c-2.77 0-5.44-.37-8.02-1.11-2.57-.75-4.65-1.72-6.22-2.92l2.75-6.09c1.5 1.09 3.28 1.98 5.34 2.64 2.07.67 4.13 1 6.19 1q3.45 0 5.1-1.02t1.65-2.73c0-.83-.33-1.52-.98-2.06-.65-.55-1.48-1-2.5-1.33-1.01-.33-2.39-.7-4.11-1.1-2.67-.63-4.85-1.26-6.55-1.89s-3.15-1.64-4.37-3.04c-1.21-1.41-1.82-3.27-1.82-5.6 0-2.03.55-3.86 1.64-5.51 1.11-1.66 2.76-2.96 4.97-3.92 2.22-.97 4.93-1.46 8.13-1.46 2.22 0 4.4.27 6.53.8s4 1.3 5.59 2.3l-2.5 6.14c-3.23-1.82-6.45-2.74-9.67-2.74-2.27 0-3.95.37-5.03 1.1-1.07.73-1.61 1.69-1.61 2.89q0 1.8 1.86 2.67c1.25.59 3.16 1.16 5.72 1.72 2.66.63 4.85 1.27 6.55 1.9 1.69.63 3.14 1.63 4.36 2.99 1.21 1.37 1.82 3.21 1.82 5.55 0 2-.56 3.82-1.67 5.46q-1.68 2.475-5.01 3.93c-2.23.95-4.95 1.43-8.14 1.43m50.913-35.54v34.95h-8.08v-14.33h-15.88v14.33h-8.09V9.965h8.09v13.78h15.88V9.965zm29.811 27.47h-16.22l-3.1 7.48h-8.29l15.58-34.95h7.98l15.62 34.95h-8.48zm-2.55-6.15-5.55-13.37-5.53 13.37zm16.274-21.32h8.09v28.36h17.52v6.59h-25.61zm0 0' fill='white'/%3e%3c/g%3e%3c/svg%3e":"data:image/svg+xml,%3csvg width='219' height='54' xmlns='http://www.w3.org/2000/svg' version='1.0'%3e%3cg class='layer'%3e%3ctitle%3eEshal Logo%3c/title%3e%3cg clip-path='url(%23a)' transform='translate(-.708 -1.076)'%3e%3cg clip-path='url(%23b)'%3e%3cpath d='M21.79 54.75h4.5l3.93-.56 4.49-1.4 3.38-1.97 2.81-2.25 2.24-2.81 2.25-3.93 1.13-3.09v-.85l-3.65-1.12h-.57l-1.96 4.5-1.97 3.09-2.81 2.53-3.93 1.96-3.38.85-2.81.28h-2.81l-4.21-.57-3.94-1.4-2.81-1.97-2.25-2.24-1.96-3.38-1.41-4.21-.56-3.37-.28-3.1v-3.65l.56-5.06 1.12-4.21 1.97-3.94 2.53-2.81 2.25-1.68 2.81-1.41 3.37-.84 2.25-.28H26l4.78.84 4.5 2.25 2.53 2.53 1.4 2.53.56 2.53-.28 3.65-1.12 2.25-1.41 1.69-1.4.55-1.13-4.21-1.68-2.81-1.97-1.97-3.09-1.4-1.12-.28h-5.34l-3.09 1.12-2.25 1.69-1.41 1.97-.84 3.09.28 3.08 1.4 2.82 1.97 1.96 2.81 1.41 2.25.56 4.78.28 3.09-.28.84-.28-1.12 3.09-1.69 1.97-2.25.84h-3.65l-2.81-1.12-1.68-1.41-3.38 2.25.56 1.13 1.13 1.4 2.81 1.69 2.81.84h4.78l2.81-.84 2.53-1.69 1.96-2.25L35 34.8l.84-4.5 3.65-2.24 2.53-2.53 1.69-3.09.56-2.25.28-2.81-.56-3.93-1.12-2.82-2.25-3.09-3.09-2.81-4.22-2.25-4.5-1.12-2.52-.28h-4.5l-3.93.56-4.5 1.41-3.38 1.96-3.37 3.1-2.52 3.65-1.97 4.49-1.13 4.78-.28 2.25v9.27l.84 5.06 1.69 4.78 1.69 3.09 2.25 2.81 2.8 2.53 2.82 1.69 5.06 1.68zm1.12-27.54-2.53-.84-1.4-1.12-.84-1.69.28-2.53 1.12-1.4 2.25-1.13H26l2.81 1.41 1.41 1.97.84 2.8v2.25l-1.12.28zm0 0' fill='black'/%3e%3c/g%3e%3c/g%3e%3cpath d='M82.381 38.435v6.48h-27.06V9.965h26.41v6.5h-18.36v7.57h16.22v6.3h-16.22v8.1zm16.432 7.07c-2.77 0-5.44-.37-8.02-1.11-2.57-.75-4.65-1.72-6.22-2.92l2.75-6.09c1.5 1.09 3.28 1.98 5.34 2.64 2.07.67 4.13 1 6.19 1q3.45 0 5.1-1.02t1.65-2.73c0-.83-.33-1.52-.98-2.06-.65-.55-1.48-1-2.5-1.33-1.01-.33-2.39-.7-4.11-1.1-2.67-.63-4.85-1.26-6.55-1.89s-3.15-1.64-4.37-3.04c-1.21-1.41-1.82-3.27-1.82-5.6 0-2.03.55-3.86 1.64-5.51 1.11-1.66 2.76-2.96 4.97-3.92 2.22-.97 4.93-1.46 8.13-1.46 2.22 0 4.4.27 6.53.8s4 1.3 5.59 2.3l-2.5 6.14c-3.23-1.82-6.45-2.74-9.67-2.74-2.27 0-3.95.37-5.03 1.1-1.07.73-1.61 1.69-1.61 2.89q0 1.8 1.86 2.67c1.25.59 3.16 1.16 5.72 1.72 2.66.63 4.85 1.27 6.55 1.9 1.69.63 3.14 1.63 4.36 2.99 1.21 1.37 1.82 3.21 1.82 5.55 0 2-.56 3.82-1.67 5.46q-1.68 2.475-5.01 3.93c-2.23.95-4.95 1.43-8.14 1.43m50.913-35.54v34.95h-8.08v-14.33h-15.88v14.33h-8.09V9.965h8.09v13.78h15.88V9.965zm29.811 27.47h-16.22l-3.1 7.48h-8.29l15.58-34.95h7.98l15.62 34.95h-8.48zm-2.55-6.15-5.55-13.37-5.53 13.37zm16.274-21.32h8.09v28.36h17.52v6.59h-25.61zm0 0' fill='black'/%3e%3c/g%3e%3c/svg%3e",alt:"ESHAL",className:ee("h-3",s?"opacity-60":"opacity-50"),onError:()=>Oe(!0)}),ae.afterBrand&&n.jsx("span",{className:ee("font-sans text-[10px] font-medium",s?"text-gray-400":"text-gray-500"),children:ae.afterBrand})]})})})]})},Qt=["sun","mon","tue","wed","thu","fri","sat"];function Jt(e){if(!e||"string"!=typeof e)return null;const t=e.match(/^(\d{1,2}):(\d{2})/);if(!t)return null;const n=parseInt(t[1],10),r=parseInt(t[2],10);return Number.isNaN(n)||Number.isNaN(r)?null:60*n+r}function en(e,t=new Date,n={}){if(!e||!e.showStatus)return null;const r=n.online||"Online now",o=n.officeOpen||"Online now",a=n.offlineFallback||"Offline";if("officeHours"!==e.statusMode)return{online:!0,label:r};const i=e.officeHours||{},{dayKey:s,minutes:l}=function(e,t){try{const n=new Intl.DateTimeFormat("en-US",{timeZone:e||void 0,weekday:"short",hour:"2-digit",minute:"2-digit",hour12:!1}).formatToParts(t),r=(n.find(e=>"weekday"===e.type)||{}).value||"";let o=parseInt((n.find(e=>"hour"===e.type)||{}).value||"0",10);const a=parseInt((n.find(e=>"minute"===e.type)||{}).value||"0",10);return 24===o&&(o=0),{dayKey:r.slice(0,3).toLowerCase(),minutes:60*o+a}}catch{return{dayKey:Qt[t.getDay()],minutes:60*t.getHours()+t.getMinutes()}}}(i.timezone,t),c=Array.isArray(i.days)?i.days.map(e=>String(e).slice(0,3).toLowerCase()):[],u=Jt(i.open),d=Jt(i.close);if(c.includes(s)&&(null!=u&&null!=d&&(u<=d?l>=u&&l<d:l>=u||l<d))){return{online:!0,label:(i.onlineMessage||"").trim()||o}}return{online:!1,label:(i.offlineMessage||"").trim()||a}}const tn=({conciergeName:t,companyName:r,companyLogo:o,primaryColor:a,isDark:i,isMinimized:s=!1,textColor:l,fontFamily:c,fontSize:u,onToggleTheme:d,onMinimize:p,onClose:f,headerTextBold:g=!1,headerTextItalic:m=!1,headerTextColor:h,headerFontFamily:b,headerFontSize:y,subtitle:v=null,showStatus:w=!1,statusMode:S="always",officeHours:x=null,onRefreshChat:E,onCopyChat:k,defaultLanguage:A="en"})=>{const T=a,O=h||"#FFFFFF",C=b||c||"Inter",I=y||u;lt(C);const N=e.useMemo(()=>V(A),[A]),R=z(A),_=e.useMemo(()=>q(v,R),[v,R]),P=e.useMemo(()=>en({showStatus:w,statusMode:S,officeHours:x}),[w,S,x]),[L,D]=e.useState(!1),M=e.useRef(null),j=e.useRef(null);e.useEffect(()=>{if(!L)return;const e=e=>{M.current&&!e.composedPath().includes(M.current)&&D(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[L]);const F=e.useRef(!1);e.useEffect(()=>{if(L){F.current=!0;const e=M.current?.querySelector('[role="menuitem"]');e?.focus()}else F.current&&(F.current=!1,j.current?.focus())},[L]);const B=O;return n.jsxs("div",{className:`text-white ${s?"px-4 py-2.5":"px-3 py-4"} flex items-center justify-between relative overflow-visible rounded-t-2xl z-[60]`,style:{background:T,fontFamily:C},children:[n.jsxs("div",{className:"flex items-center gap-3 flex-1 min-w-0 pl-1",children:[n.jsxs("div",{className:"relative w-11 h-11 flex-shrink-0",children:[n.jsx("div",{className:"w-full h-full rounded-full overflow-hidden flex items-center justify-center bg-white/20",children:o?n.jsx("img",{src:o,alt:"Logo",style:{display:"block",width:"100%",height:"100%",objectFit:"contain"},loading:"lazy"}):n.jsx("span",{className:"text-lg font-semibold leading-none",style:{color:B},children:(t||r||"")?.charAt(0)?.toUpperCase()})}),P?n.jsx("span",{title:P.label,className:ee("absolute bottom-0 h-3 w-3 rounded-full ring-2 ring-white",R?"left-0":"right-0"),style:{backgroundColor:P.online?"#22c55e":"#9ca3af",boxShadow:P.online?"0 0 0 3px rgba(34,197,94,0.25)":"none"},"aria-hidden":"true"}):null]}),n.jsxs("div",{className:"flex flex-col justify-center min-w-0",style:{fontFamily:C},children:[n.jsx("h3",{title:t,className:ee("font-semibold leading-snug truncate",g&&"font-bold",m&&"italic"),style:{fontSize:I?`calc(${I} + 2px)`:"15px",color:B},children:t}),v?n.jsx("p",{title:v,className:"leading-snug truncate opacity-75",dir:_?"rtl":"ltr",style:{fontSize:"12px",color:B,textAlign:_?"right":"left"},children:v}):null]})]}),n.jsxs("div",{className:"flex items-center gap-0 relative z-10 text-white flex-shrink-0 ml-1",children:[n.jsxs("div",{className:"relative",ref:M,children:[n.jsx("button",{type:"button",ref:j,"aria-label":N("menu"),"aria-expanded":L,"aria-haspopup":"true",onClick:()=>D(e=>!e),onKeyDown:e=>{"Escape"===e.key&&L&&(e.preventDefault(),D(!1))},className:"inline-flex h-7 w-7 items-center justify-center cursor-pointer transition-opacity duration-200 hover:opacity-80 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-white/40 rounded-full border-0 bg-transparent p-0",style:{color:B},children:n.jsx(Ue,{className:"w-4 h-4",strokeWidth:1.6})}),L&&n.jsxs("div",{role:"menu","aria-label":N("menu"),dir:R?"rtl":"ltr",onKeyDown:e=>{if("Escape"===e.key)return e.preventDefault(),void D(!1);if("Tab"===e.key){const t=M.current?Array.from(M.current.querySelectorAll('[role="menuitem"]')):[];if(0===t.length)return;const n=t[0],r=t[t.length-1],o=document.activeElement;e.shiftKey&&o===n?(e.preventDefault(),r.focus()):e.shiftKey||o!==r||(e.preventDefault(),n.focus())}},className:`absolute top-full mt-1 w-44 rounded-xl border shadow-lg py-1 z-[9999] animate-in fade-in slide-in-from-top-1 duration-150 ${R?"left-0":"right-0"} ${i?"bg-gray-800 border-gray-700":"bg-white border-gray-200"}`,style:{fontFamily:C},children:[n.jsxs("button",{role:"menuitem",onClick:()=>{D(!1),E?.()},className:"flex items-center gap-2.5 w-full px-3 py-2 text-sm leading-5 transition-colors cursor-pointer "+(i?"text-gray-200 hover:bg-gray-700":"text-gray-700 hover:bg-gray-50"),style:{fontFamily:C,fontSize:"14px",border:"none",background:"transparent",appearance:"none",WebkitAppearance:"none",textAlign:R?"right":"left"},children:[n.jsx(Ye,{className:"w-3.5 h-3.5 flex-shrink-0"}),N("refreshChat")]}),n.jsxs("button",{role:"menuitem",onClick:()=>{D(!1),k?.()},className:"flex items-center gap-2.5 w-full px-3 py-2 text-sm leading-5 transition-colors cursor-pointer "+(i?"text-gray-200 hover:bg-gray-700":"text-gray-700 hover:bg-gray-50"),style:{fontFamily:C,fontSize:"14px",border:"none",background:"transparent",appearance:"none",WebkitAppearance:"none",textAlign:R?"right":"left"},children:[n.jsx(Fe,{className:"w-3.5 h-3.5 flex-shrink-0"}),N("copyChat")]}),n.jsxs("button",{role:"menuitem",onClick:()=>{D(!1),d?.()},className:"flex items-center gap-2.5 w-full px-3 py-2 text-sm leading-5 transition-colors cursor-pointer "+(i?"text-gray-200 hover:bg-gray-700":"text-gray-700 hover:bg-gray-50"),style:{fontFamily:C,fontSize:"14px",border:"none",background:"transparent",appearance:"none",WebkitAppearance:"none",textAlign:R?"right":"left"},children:[i?n.jsx(Qe,{className:"w-3.5 h-3.5 flex-shrink-0"}):n.jsx(Ve,{className:"w-3.5 h-3.5 flex-shrink-0"}),N(i?"lightMode":"nightMode")]})]})]}),n.jsx("button",{type:"button","aria-label":N("close"),onClick:f,className:"inline-flex h-7 w-7 items-center justify-center cursor-pointer transition-opacity duration-200 hover:opacity-80 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-white/40 rounded-full border-0 bg-transparent p-0",style:{color:B},children:n.jsx(nt,{className:"w-3.5 h-3.5",strokeWidth:1.6})})]})]})},nn=({questions:t=[],collapsiblePrompt:r,onSubmit:o,primaryColor:a="#2563eb",isRtl:i=!1,isDark:s=!1,defaultLanguage:l="en",fontFamily:c})=>{const u=e.useMemo(()=>V(l),[l]),[d,p]=e.useState({}),[f,g]=e.useState({}),[m,h]=e.useState(!1),b=e.useRef({}),y=[...t].sort((e,t)=>ne(e.fieldType)-ne(t.fieldType));return n.jsx("div",{className:"flex flex-col items-center justify-center p-6 h-full min-h-0 z-50 relative ",style:{...c?{fontFamily:c}:{},...s?{backgroundColor:"#10141C"}:{}},children:n.jsxs("div",{className:"w-full max-w-sm rounded-2xl shadow-xl border p-8 transition-colors duration-300 bg-white border-gray-100",style:s?{backgroundColor:"#1E232B",border:"1px solid #2A303C"}:void 0,children:[r&&n.jsx("div",{className:"mb-4 text-start",children:n.jsx("h3",{className:"transition-colors duration-300 text-sm font-semibold mb-1 "+(s?"text-white":"text-[#4A5568]"),children:r})}),n.jsxs("form",{onSubmit:async e=>{e.preventDefault();const t=(()=>{const e={};return y.forEach(t=>{const n=t.fieldType||"question",r=(d[n]??"").trim(),o=t.collectionPrompt||t.askToType||t.question||t.label||n,a=!0===t.required||"true"===t.required;r?("fullName"!==n&&"name"!==n||r.length<2&&(e[n]=u("nameInvalid")),"email"!==n||/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(r)||(e[n]=u("emailInvalid")),"phone"!==n&&"mobileno"!==n||/^[+]?[\d\s-]{8,15}$/.test(r)||(e[n]=u("phoneInvalid"))):a&&(e[n]="email"===n?u("emailRequired"):"fullName"===n||"name"===n?u("nameRequired"):"phone"===n||"mobileno"===n?u("phoneRequired"):`${o} ${u("fieldRequiredSuffix")}`)}),g(e),e})();if(Object.keys(t).length>0){const e=y.map((e,t)=>e.fieldType||`question_${t}`).find(e=>t[e]);return void b.current[e]?.focus()}h(!0);try{await o(d)}finally{h(!1)}},className:"space-y-4",noValidate:!0,children:[y.map((e,t)=>{const r=e.fieldType||`question_${t}`,o=e.collectionPrompt||e.askToType||e.question||e.label;if(!o?.trim())return null;let a="text";"email"===r&&(a="email"),"phone"!==r&&"mobileno"!==r||(a="tel");const l=(r||"").toLowerCase(),c="fullname"===l||"name"===l||"username"===l,m="phone"===l||"mobileno"===l,h="email"===l?u("onboardingEmailPlaceholder"):c?u("onboardingNamePlaceholder"):m?u("onboardingPhonePlaceholder"):o,y=f[r],v="w-full h-12 rounded-xl text-base md:text-sm px-3 py-1 outline-none border transition-colors focus:ring-0 "+(s?"text-white placeholder:text-[#A2A9B2] focus:border-[#5A6069]":"bg-gray-50/30 focus:bg-white text-gray-900 placeholder:text-gray-500 focus:border-[#B0B0B0]"),w=y?"!border-status-error focus:!border-status-error":"",S=`onboarding-field-${r}`,x=`${S}-error`;return n.jsxs("div",{children:[n.jsx("label",{htmlFor:S,className:"sr-only",children:o}),n.jsx("input",{id:S,ref:e=>{b.current[r]=e},placeholder:h,type:a,value:d[r]??"",onChange:e=>((e,t)=>{p(n=>({...n,[e]:t})),f[e]&&g(t=>{const n={...t};return delete n[e],n})})(r,e.target.value),className:`${v} ${w}`,"aria-invalid":y?"true":"false","aria-describedby":y?x:void 0,style:{direction:i?"rtl":"ltr",fontFamily:"inherit",...s?{backgroundColor:"#272C35",borderWidth:"1px",borderStyle:"solid",borderColor:y?void 0:"#3F444C"}:{borderWidth:"1px",borderStyle:"solid",borderColor:y?void 0:"#E0E0E0"}}}),y&&n.jsx("p",{id:x,role:"alert",className:"mt-1 text-xs text-status-error px-1",children:f[r]})]},r)}),n.jsx("button",{type:"submit",disabled:m,"aria-busy":m,"aria-label":m?u("submitting"):void 0,className:"w-full h-12 inline-flex items-center justify-center text-sm border-none font-semibold shadow-xl hover:shadow-xl hover:scale-[1.02] active:scale-[0.98] transition-all rounded-xl mt-4 text-white",style:{backgroundColor:a,fontFamily:"inherit"},children:m?n.jsx(qe,{className:"w-5 h-5 animate-spin","aria-hidden":"true"}):u("startChat")})]})]})})},rn=({categories:t=[],selectedCategoryId:r=null,onSelect:o,isDark:a=!1,primaryColor:i="#2563eb",fontFamily:s="Inter",isRtl:l=!1})=>{const c=e.useRef(null),[u,d]=e.useState(!1),[p,f]=e.useState(!1),g=e.useCallback(()=>{const e=c.current;if(!e)return;const{scrollLeft:t,scrollWidth:n,clientWidth:r}=e;d(Math.abs(t)>1),f(Math.abs(t)+r<n-1)},[]);e.useEffect(()=>{g();const e=c.current;if(!e)return;const t=new ResizeObserver(g);return t.observe(e),()=>t.disconnect()},[g,t]);const m=e.useCallback(e=>{const t=c.current;if(!t)return;const n="left"===e?-150:150;t.scrollBy({left:l?-n:n,behavior:"smooth"})},[l]);if(!Array.isArray(t)||0===t.length)return null;const h=a?"rgba(31,41,55,0.85)":"rgba(255,255,255,0.95)",b=a?"#e5e7eb":"#374151",y=a?"#4b5563":"#d1d5db",v=a?"#111827":"#ffffff",w=a?"#374151":"#e5e7eb";return n.jsxs("div",{className:"flex-shrink-0 px-2 py-2 border-b flex items-center gap-1",style:{backgroundColor:v,borderColor:w,fontFamily:s,direction:l?"rtl":"ltr"},role:"region","aria-label":"Filter by category",children:[n.jsx("button",{type:"button",onClick:()=>m("left"),disabled:!u,"aria-label":"Scroll categories left",className:"flex-shrink-0 flex items-center justify-center w-6 h-6 rounded-full transition-all duration-200",style:{backgroundColor:h,border:`1px solid ${y}`,color:b,opacity:u?1:.3,cursor:u?"pointer":"default"},children:n.jsx(Le,{size:14})}),n.jsx("div",{ref:c,onScroll:g,className:"flex-1 flex gap-2 overflow-x-auto",style:{scrollBehavior:"smooth",WebkitOverflowScrolling:"touch",scrollbarWidth:"none",msOverflowStyle:"none"},children:t.map(e=>{const t=r===e.id;return n.jsx("button",{type:"button",onClick:()=>o?.(t?null:e.id),"aria-pressed":t,className:"flex-shrink-0 inline-flex items-center gap-1.5 px-3 py-1.5 rounded-full text-xs font-medium transition-all duration-150 whitespace-nowrap",style:{backgroundColor:a?"#1f2937":"#ffffff",border:t?`1.5px solid ${i}`:"1px solid "+(a?"#374151":"#e5e7eb"),color:t?i:a?"#e5e7eb":"#374151",fontFamily:s},children:n.jsx("span",{children:e.label})},e.id)})}),n.jsx("button",{type:"button",onClick:()=>m("right"),disabled:!p,"aria-label":"Scroll categories right",className:"flex-shrink-0 flex items-center justify-center w-6 h-6 rounded-full transition-all duration-200",style:{backgroundColor:h,border:`1px solid ${y}`,color:b,opacity:p?1:.3,cursor:p?"pointer":"default"},children:n.jsx(De,{size:14})})]})},on=({categories:e=[],selectedCategoryId:t=null,onSelect:r,isDark:o=!1,primaryColor:a="#2563eb",fontFamily:i="Inter",fontSize:s="14px",isRtl:l=!1,label:c="Choose a topic to get started:"})=>{if(!Array.isArray(e)||0===e.length)return null;const u=o?"#9ca3af":"#6b7280";return n.jsxs("div",{className:"pl-[50px] pt-1",style:{direction:l?"rtl":"ltr",paddingLeft:l?0:50,paddingRight:l?50:void 0},role:"region","aria-label":"Category filter",children:[n.jsx("div",{className:"mb-2",style:{color:u,fontFamily:i,fontSize:`calc(${s} - 1px)`},children:c}),n.jsx("div",{className:"flex flex-wrap gap-2",children:e.map(e=>{const l=t===e.id;return n.jsx("button",{type:"button",onClick:()=>r?.(l?null:e.id),"aria-pressed":l,className:"inline-flex items-center gap-1.5 px-3 py-1.5 rounded-full transition-all duration-150 hover:scale-[1.02] active:scale-[0.98]",style:{backgroundColor:o?"#1f2937":"#ffffff",border:l?`1.5px solid ${a}`:"1px solid "+(o?"#374151":"#e5e7eb"),color:l?a:o?"#e5e7eb":"#374151",fontFamily:i,fontSize:`calc(${s} - 1px)`,fontWeight:500},children:e.label},e.id)})})]})};const an=[{value:"😡",label:"😡",bg:"bg-red-200"},{value:"😕",label:"😕",bg:"bg-orange-200"},{value:"😐",label:"😐",bg:"bg-yellow-200"},{value:"😊",label:"😊",bg:"bg-green-200"},{value:"😍",label:"😍",bg:"bg-pink-200"}],sn=[{value:"positive",label:"👍"},{value:"negative",label:"👎"}],ln=[{value:"1",label:"1"},{value:"2",label:"2"},{value:"3",label:"3"},{value:"4",label:"4"},{value:"5",label:"5"}],cn=[{value:"1",label:"⭐"},{value:"2",label:"⭐"},{value:"3",label:"⭐"},{value:"4",label:"⭐"},{value:"5",label:"⭐"}],un=({format:t="EMOJI",prompt:r="How was your experience?",onRating:o,disabled:a=!1,isDark:i=!1,primaryColor:s="#2563eb",defaultLanguage:l="en"})=>{const c=e.useMemo(()=>V(l),[l]),[u,d]=e.useState(null),[p,f]=e.useState(null),[g,m]=e.useState(!1),h=async e=>{if(!a&&!g){d(e),m(!0);try{o&&o(e,t)}finally{m(!1)}}},b=(()=>{switch(t){case"THUMBS":return sn;case"NUMERIC":return ln;case"STARS":return cn;default:return an}})();return n.jsxs("div",{className:ee("transition-all duration-200 rounded-xl px-4",i?"bg-slate-800/50":"bg-slate-50/50"),children:[n.jsx("p",{className:ee("text-sm font-semibold text-center mb-3",i?"text-gray-300":"text-gray-500/80"),children:r}),n.jsxs("div",{className:"flex justify-center items-center",children:["EMOJI"===t&&n.jsx("div",{className:"flex gap-2 justify-center items-center",children:b.map(e=>n.jsx("button",{onClick:()=>h(e.value),disabled:a||g,className:ee("flex items-center justify-center text-2xl transition-transform","bg-transparent border-0 p-0 cursor-pointer","hover:scale-110 active:scale-95 disabled:opacity-50 disabled:cursor-not-allowed","focus:outline-none focus:ring-0",u===e.value?"":"opacity-80"),children:n.jsx("span",{role:"img","aria-label":`${c("rate")} ${e.value}`,children:e.label})},e.value))}),"THUMBS"===t&&n.jsx("div",{className:"flex gap-6 justify-center items-center",role:"group","aria-label":c("rateExperience"),children:b.map(e=>n.jsx("button",{"aria-label":1===e.value?c("thumbsUp"):c("thumbsDown"),onClick:()=>h(e.value),disabled:a||g,className:ee("w-10 h-10 rounded-xl border flex items-center justify-center shadow-md text-2xl transition-all","hover:scale-105 active:scale-95 disabled:opacity-50 disabled:cursor-not-allowed","drop-shadow-md",i?"bg-gray-700 border-gray-600 hover:bg-gray-600":"bg-white border-gray-100 hover:bg-gray-50",u===e.value&&"ring-2 ring-primary/40 scale-110"),style:{borderColor:u===e.value?s:void 0},children:n.jsx("span",{className:"drop-shadow-md","aria-hidden":"true",children:e.label})},e.value))}),"NUMERIC"===t&&n.jsx("div",{className:"flex gap-2 justify-center items-center",role:"group","aria-label":c("rateExperience"),children:b.map(e=>n.jsx("button",{"aria-label":`${c("rate")} ${e.value}`,onClick:()=>h(e.value),disabled:a||g,className:ee("w-10 h-10 rounded-lg flex items-center justify-center text-sm font-semibold transition-all","hover:scale-105 active:scale-95 disabled:opacity-50 disabled:cursor-not-allowed",u===e.value?"ring-2 ring-primary/40 scale-110 shadow-md text-white":i?"bg-gray-700 border border-gray-600 text-gray-300 hover:bg-gray-600":"bg-white border border-gray-200 text-gray-700 hover:bg-gray-50"),style:{backgroundColor:u===e.value?s:void 0,borderColor:u===e.value?s:void 0},children:e.label},e.value))}),"STARS"===t&&n.jsx("div",{className:"flex gap-2 justify-center items-center",onMouseLeave:()=>f(null),children:b.map(e=>{const t=p===e.value;return n.jsx("button",{onClick:()=>h(e.value),onMouseEnter:()=>f(e.value),disabled:a||g,className:ee("flex items-center justify-center text-2xl","bg-transparent border-0 p-0 cursor-pointer focus:outline-none","disabled:opacity-50 disabled:cursor-not-allowed"),style:{transform:t?"scale(1.25)":"scale(1)",filter:t?"brightness(1.1) drop-shadow(0 2px 4px rgba(0,0,0,0.15))":"none",opacity:t?1:.6,transition:"all 0.2s ease"},"aria-label":`${c("rate")} ${e.value}`,children:n.jsx("span",{"aria-hidden":"true",children:e.label})},e.value)})})]}),g&&n.jsx("p",{"aria-live":"polite",className:ee("text-xs mt-3 text-center",i?"text-slate-400":"text-slate-500"),children:c("submittingFeedback")})]})};async function dn({apiBaseUrl:e,conversationId:t,chip:n,submitText:r,position:o,source:a="widget",getAuthToken:i,enabled:s=!0}={}){try{if(!1===s)return!1;if(!e||"string"!=typeof e)return!1;if(!t||"string"!=typeof t)return!1;const l=function({chip:e,submitText:t,position:n,conversationId:r,source:o="widget"}={}){const a=e&&"object"==typeof e,i=a&&"string"==typeof e.text?e.text:"",s="string"==typeof t&&t?t:a&&"string"==typeof e.submitText?e.submitText:"string"==typeof e?e:"",l=i||s;if(!l)return null;const c={conversationId:r,chipText:l,submitText:s||void 0,position:Number.isInteger(n)?n:void 0,source:o},u=a?e?.promptId:void 0;return"string"==typeof u&&u&&(c.promptId=u),c}({chip:n,submitText:r,position:o,conversationId:t,source:a});if(!l)return!1;const c=`${e.replace(/\/$/,"")}/api/v1/support/chip-click`,u=JSON.stringify(l);let d;if("function"==typeof i)try{d=await i()}catch{d=void 0}if(!d&&"undefined"!=typeof navigator&&"function"==typeof navigator.sendBeacon&&"undefined"!=typeof Blob)try{if(navigator.sendBeacon(c,new Blob([u],{type:"application/json"})))return!0}catch{}if("function"!=typeof fetch)return!1;const p={"Content-Type":"application/json"};return d&&(p.Authorization=`Bearer ${d}`),await fetch(c,{method:"POST",headers:p,credentials:"include",keepalive:!0,body:u}),!0}catch{return!1}}const pn="#ffffff",fn="#f5f5f5",gn="#000000",mn="#1f2937",hn="#f3f4f6",bn="#2563eb",yn="eshal:widget:size",vn=(e,t)=>!e||(e=>e?.trim().toLowerCase())(e)===t,wn=e=>(e instanceof Date?e:new Date(e)).toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit",hour12:!0}).replace(/am|pm/i,e=>e.toUpperCase()),Sn=e=>{const t=(e||"EMOJI").toString().trim().toUpperCase();return"THUMBS"===t||"THUMB"===t?"THUMBS":"STARS"===t||"STAR"===t?"STARS":"NUMERIC"===t||"NUMBER"===t?"NUMERIC":"EMOJI"},xn=({isOpen:t,isMinimized:r,isDark:o,onStopGeneration:a,primaryColor:i,textColor:s,conciergeName:l,companyName:c,companyLogo:u,chatbotAvatarEnabled:d,chatbotAvatar:p,messages:f,isLoading:g,isConversationLoading:m=!1,inputValue:h,setInputValue:b,onSend:y,onDirectSend:v,onToggleTheme:w,onMinimize:S,onClose:x,quickQuestions:E=[],quickQuestionsEnabled:k,onQuickQuestion:A,quickQuestionsLayout:T="vertical",agentMessageBubbleColor:O,userMessageBoxColor:C,assistantTextColor:I,userTextColor:N,fontFamily:R="Inter",agentMessageBubbleFontFamily:_,agentMessageBubbleFontSize:P,userMessageBubbleFontFamily:L,userMessageBubbleFontSize:D,fontSize:M="14px",defaultLanguage:j="en",onDecision:F,headerTextBold:B=!1,headerTextItalic:U=!1,headerTextColor:$,headerFontFamily:G,headerFontSize:q,subtitle:H=null,showStatus:W=!1,statusMode:Y="always",officeHours:K=null,enableVoiceInteraction:X=!1,isVoiceSessionActive:Z=!1,voiceStatus:Q="idle",voiceError:J=null,voiceConclusionForCsat:te=!1,onVoiceToggle:ne,onBidiSubmit:oe,disclaimerEnabled:ae=!1,disclaimerText:ie,disclaimerPosition:se="top",disclaimerLinkUrl:le,disclaimerLinkLabel:ue,showPoweredBy:de=!0,apiBaseUrl:pe,apiKey:fe,getAuthToken:ge,conversationId:me,conciergeId:he,onboardingQuestions:be=[],onboardingActive:ye=!1,onboardingCompleted:ve=!1,onOnboardingFormSubmit:we,collectionPrompt:Se,csatEnabled:xe=!1,csatFormat:Ee="EMOJI",csatPrompt:ke="How was your experience?",csatRequest:Ae=null,onPromptSuggestionClick:Te,onboardingEnabled:Oe=!1,onResetConversation:Ce,sessionExpiringSoon:Ie=!1,autoPromptEnabled:Ne=!0,autoPromptQuestionDisplay:Re=!0,autoPromptClickTelemetry:_e=!0,allowFeedback:Pe=!0,provideCitations:Le=!0,onFeedback:De,onRetryMessage:Me,onRefreshChat:je,onCopyChat:Fe,filterCategories:Be=[],showFilterStep:Ue=!1,widgetFilter:ze=null,onWidgetFilterChange:$e,onSynthesizeAssistantMessage:Ge,launcherPosition:qe="bottom-right",chatFeatures:He,organizationId:Ve})=>{lt(R);const We=e.useRef(null),Ye=e.useRef(null),Ke=e.useMemo(()=>V(j),[j]);e.useEffect(()=>{Ye.current?.focus()},[]);const Xe=e.useCallback((e,t,n)=>{dn({apiBaseUrl:pe,conversationId:me,chip:t,submitText:null==e?void 0:String(e),position:n,source:"widget",getAuthToken:ge,enabled:_e})},[pe,ge,me,_e]),Qe=e.useCallback((e,t,n)=>{t&&"object"==typeof t&&Xe(e,t,n),Te?Te(e):v?.(e)},[Te,v,Xe]),Je=qe.includes("right"),et=qe.includes("bottom"),[tt,nt]=e.useState(()=>{if("undefined"==typeof window)return null;try{const e=window.localStorage.getItem(yn);if(!e)return null;const t=JSON.parse(e);if("number"==typeof t?.width&&"number"==typeof t?.height&&t.width>=320&&t.height>=400)return t}catch{}return null}),rt=e.useRef(null),ot=e.useRef({x:0,y:0}),at=e.useRef({width:380,height:650});e.useEffect(()=>{const e=e=>{const t=rt.current;if(!t)return;const n=e.clientX-ot.current.x,r=e.clientY-ot.current.y,o={...at.current},a=.92*window.innerWidth,i=.85*window.innerHeight;if("corner"===t||"horizontal"===t){const e=Je?at.current.width-n:at.current.width+n;o.width=Math.min(Math.max(320,e),a)}if("corner"===t||"vertical"===t){const e=et?at.current.height-r:at.current.height+r;o.height=Math.min(Math.max(400,e),i)}nt(o)},t=()=>{rt.current&&(rt.current=null,document.body.style.cursor="",document.body.style.userSelect="")};return window.addEventListener("mousemove",e),window.addEventListener("mouseup",t),()=>{window.removeEventListener("mousemove",e),window.removeEventListener("mouseup",t)}},[Je,et]),e.useEffect(()=>{if(tt)try{window.localStorage.setItem(yn,JSON.stringify(tt))}catch{}},[tt]);const it=(e,t)=>{t.preventDefault(),t.stopPropagation(),rt.current=e,ot.current={x:t.clientX,y:t.clientY},at.current=tt??{width:380,height:650};const n={corner:Je===et?"nwse-resize":"nesw-resize",horizontal:"ew-resize",vertical:"ns-resize"};document.body.style.cursor=n[e],document.body.style.userSelect="none"},[st,ct]=e.useState(!1),[ut,dt]=e.useState(()=>{try{return ce(Ve)?.csatSubmitted??!1}catch{return!1}}),[pt,ft]=e.useState(!1),[gt,mt]=e.useState(!1),[ht,bt]=e.useState(0),[yt,vt]=e.useState(""),[wt,St]=e.useState(!1);e.useEffect(()=>{try{const e=ce(Ve)?.csatSubmitted??!1;dt(e),e&&ct(!1)}catch{}},[me]),function(t,n=[],r={}){const{enabled:o=!0,threshold:a=30,behavior:i="smooth",delay:s=0}=r,l=e.useRef(!0);e.useRef(0),e.useEffect(()=>{if(!o||!t.current)return;const e=t.current,n=()=>{const t=e.scrollHeight-e.scrollTop-e.clientHeight;l.current=t<a},r=()=>{n()};e.addEventListener("scroll",r,{passive:!0}),n();const c=setTimeout(()=>{l.current&&e&&e.scrollTo({top:e.scrollHeight,behavior:i})},s);return()=>{e.removeEventListener("scroll",r),clearTimeout(c)}},[t,o,a,i,s,...n])}(We,[f,g],{enabled:!0,threshold:30,behavior:"smooth",delay:0});const xt=z(j),Et=e.useMemo(()=>o?vn(O,pn)?mn:O||mn:O||pn,[O,o]),kt=e.useMemo(()=>o?vn(s,gn)?hn:s||hn:s||gn,[o,s]),At=e.useMemo(()=>o?vn(C,fn)?i||bn:C||i||bn:C||fn,[o,i,C]),Tt=Ke(gt?"conversationResolved":"typeYourMessage"),Ot=f?.some?.(e=>"user"===e.role),Ct=e.useMemo(()=>(f||[]).filter(e=>"user"===e.role).length,[f]),[It,Nt]=e.useState(0),Rt=ze?.category?(Be||[]).find(e=>e.id===ze.category):null,_t=e.useCallback(e=>{if(!$e)return;const t=ze?.category||null;if(e){if($e({category:e,tags:[]}),Nt(Ct),!Ot&&e!==t&&Ge){const t=(Be||[]).find(t=>t.id===e),n=t?.label||e,r=Ke("categoryTopicsHeading").replace("{category}",n);Ge(r,{replaceMarker:"category-intro"})}}else $e(null)},[$e,ze,Ct,Be,Ot,Ge,Ke]);e.useCallback(e=>{const t=ze?.category||Rt?.id;t&&$e&&$e({category:t,tags:[e]}),v&&v(e)},[ze,Rt,$e,v]);const Pt=Array.isArray(Be)&&Be.length>0,Lt=Pt&&!Ot&&!ze?.category,Dt=!Ot&&E.length>0&&k&&!ze?.category,Mt=be&&be.length>0,jt=Boolean(xe),Ft=Oe&&Mt&&!ve,Bt=e.useCallback(async()=>{if(jt&&!wt&&!gt&&0!==ht){St(!0);try{const e={"Content-Type":"application/json"};if("function"==typeof ge){const t=await ge();t&&(e.Authorization=`Bearer ${t}`)}const t=Sn(Ee),n=await fetch(`${pe.replace(/\/$/,"")}/api/v1/support/csat`,{method:"POST",headers:e,credentials:"include",body:JSON.stringify({conversationId:me,rating:String(ht),ratingFormat:t,conciergeId:he,feedback:yt||void 0})});n.ok?(ft(!1),bt(0),vt(""),$e&&$e(null),je?je():Ce&&Ce()):console.error("Failed to submit resolve feedback:",await n.text())}catch(e){console.error("Error submitting resolve feedback:",e)}finally{St(!1)}}},[jt,wt,gt,ht,yt,me,ge,he,pe,Ee,Ce,je,$e]),Ut=e.useCallback(()=>{if(!jt||!me||!Ot)return $e&&$e(null),je?je():Ce&&Ce(),void x?.();pt?(ft(!1),x?.()):gt?x?.():ft(!0)},[jt,me,Ot,pt,gt,x,$e,je,Ce]);e.useEffect(()=>{jt||(pt&&ft(!1),gt&&mt(!1),0!==ht&&bt(0),yt&&vt(""))},[jt,pt,gt,ht,yt]);const zt=e.useMemo(()=>{if(!f||!Array.isArray(f))return[];for(let e=f.length-1;e>=0;e-=1)if("assistant"===f[e]?.role){const t=f[e].prompts;return Array.isArray(t)?t:[]}return[]},[f]),$t=e.useRef([]);e.useEffect(()=>{zt.length>0?$t.current=zt:f&&0!==f.length&&f.some(e=>"user"===e.role)||($t.current=[])},[zt,f]);const qt=e.useRef(Ct);e.useEffect(()=>{Ct!==qt.current&&(qt.current=Ct,$t.current=[])},[Ct]);const Ht=Array.isArray(f)&&f.some(e=>"user"===e?.role),Vt=zt.length>0?zt:Ht?$t.current:[];e.useEffect(()=>{if(!xe)return;if(!st)return;if(ut)return;const e=We.current;if(!e)return;const t=window.requestAnimationFrame(()=>{e.scrollTo({top:e.scrollHeight,behavior:"smooth"})});return()=>{window.cancelAnimationFrame(t)}},[st,xe,ut]);const Wt=()=>{const e=Sn(Ee);if("STARS"===e)return n.jsx("div",{className:"flex justify-center gap-2 mb-5",role:"group","aria-label":Ke("rateExperience"),children:[1,2,3,4,5].map(e=>n.jsx("button",{"aria-label":`${Ke("rate")} ${e}`,onClick:()=>bt(e),className:"transition-all duration-150 hover:scale-110 active:scale-95 bg-transparent border-0 p-0 cursor-pointer",disabled:wt,children:n.jsx(Ze,{className:ee("w-8 h-8 transition-colors",e<=ht?"text-yellow-400 drop-shadow-sm":o?"text-gray-600":"text-gray-300"),fill:e<=ht?"#FBBF24":"none"})},e))});if("THUMBS"===e)return n.jsx("div",{className:"flex gap-4 justify-center mb-5",role:"group","aria-label":Ke("rateExperience"),children:[{value:"positive",emoji:"👍"},{value:"negative",emoji:"👎"}].map(e=>n.jsx("button",{"aria-label":"positive"===e.value?Ke("thumbsUp"):Ke("thumbsDown"),onClick:()=>bt(e.value),disabled:wt,className:ee("w-12 h-12 rounded-xl border flex items-center justify-center text-2xl transition-all hover:scale-105 active:scale-95",ht===e.value?"ring-2 ring-blue-300 scale-110 shadow-lg":"",o?"bg-gray-700 border-gray-600 hover:bg-gray-600":"bg-white border-gray-200 hover:bg-gray-50"),children:n.jsx("span",{className:"drop-shadow-md",children:e.emoji})},e.value))});return n.jsx("div",{className:"flex gap-2 justify-center items-center mb-5",role:"group","aria-label":Ke("rateExperience"),children:[{value:1,emoji:"😡"},{value:2,emoji:"😕"},{value:3,emoji:"😐"},{value:4,emoji:"😊"},{value:5,emoji:"😍"}].map(e=>n.jsx("button",{"aria-label":`${Ke("rate")} ${e.value}`,onClick:()=>bt(e.value),disabled:wt,className:ee("rounded-full w-10 h-10 flex items-center justify-center text-xl transition-all hover:scale-110 active:scale-95 bg-transparent border-0 p-0 cursor-pointer",ht===e.value?"ring-2 ring-blue-100 scale-125 bg-gradient-to-b from-yellow-200 to-yellow-400 shadow-md":"grayscale-[0.3] opacity-80 hover:grayscale-0"),children:n.jsx("span",{role:"img","aria-label":`${Ke("rate")} ${e.value}`,className:"drop-shadow-sm filter",children:e.emoji})},e.value))})};if(!t)return null;const Yt=!r&&tt?{width:tt.width,height:tt.height,maxWidth:"92vw",maxHeight:"85vh"}:void 0;return n.jsxs("div",{dir:xt?"rtl":"ltr",className:"relative flex-shrink-0 z-50 "+(r?"w-80 h-auto":""),style:Yt,children:[!r&&n.jsxs(n.Fragment,{children:[n.jsx("div",{onMouseDown:e=>it("horizontal",e),className:"absolute top-0 h-full w-1.5 cursor-ew-resize hover:bg-blue-500/20 transition-colors z-[70] "+(Je?"left-0":"right-0"),"aria-hidden":!0}),n.jsx("div",{onMouseDown:e=>it("vertical",e),className:"absolute left-0 w-full h-1.5 cursor-ns-resize hover:bg-blue-500/20 transition-colors z-[70] "+(et?"top-0":"bottom-0"),"aria-hidden":!0})]}),n.jsxs("div",{id:"chat-window-panel",ref:Ye,role:"dialog","aria-modal":"true","aria-label":Ke("openChat"),tabIndex:-1,className:`relative focus:outline-none ${tt||r?"":"w-[380px]"} ${tt||r?"":"h-[650px]"} ${r?"w-80 h-auto":""} ${tt&&!r?"w-full h-full":""} max-w-[92vw] border rounded-2xl shadow-2xl bg-white border-gray-200 flex flex-col ${r?"":"max-h-[85vh]"} overflow-hidden ${o?"bg-gray-900 border-gray-700":""}`,children:[!r&&n.jsx("div",{onMouseDown:e=>it("corner",e),"aria-hidden":"true",className:`absolute w-4 h-4 ${Je===et?"cursor-nwse-resize":"cursor-nesw-resize"} text-gray-400 hover:text-blue-500 transition-colors z-[71] flex p-0.5 ${et?"top-0 items-start":"bottom-0 items-end"} ${Je?"left-0 justify-start":"right-0 justify-end"}`,children:n.jsx("svg",{viewBox:"0 0 12 12",className:"w-3 h-3 "+(et&&Je?"rotate-180":et?"-rotate-90":Je?"rotate-90":""),"aria-hidden":!0,children:n.jsx("path",{d:"M11 1 L1 11 M11 5 L5 11 M11 9 L9 11",stroke:"currentColor",strokeWidth:"1.5",fill:"none",strokeLinecap:"round"})})}),n.jsx(tn,{conciergeName:l,companyName:c,companyLogo:u,primaryColor:i,isDark:o,isMinimized:r,textColor:kt,fontFamily:R,fontSize:M,onToggleTheme:w,onMinimize:S,onClose:Ut,headerTextBold:B,headerTextItalic:U,headerTextColor:$,headerFontFamily:G,headerFontSize:q,subtitle:H,showStatus:W,statusMode:Y,officeHours:K,onRefreshChat:je,onCopyChat:Fe,defaultLanguage:j}),!r&&Pt&&!Lt&&!(pt&&!gt)&&!(ye&&!ve)&&n.jsx(rn,{categories:Be,selectedCategoryId:ze?.category||null,onSelect:_t,isDark:o,primaryColor:i,fontFamily:R,isRtl:xt}),!r&&n.jsxs(n.Fragment,{children:[n.jsx("div",{ref:We,role:"log","aria-live":"polite",className:`chat-messages flex-1 overflow-y-auto px-3 py-4 space-y-4 ${o?"bg-gray-900":"bg-gradient-to-b from-gray-50/50 to-white"} break-words`,children:pt&&!gt?n.jsx("div",{className:"animate-in slide-in-from-top-4 fade-in duration-300 mt-4 mx-2",children:n.jsxs("div",{className:ee("w-full rounded-3xl p-6 shadow-lg",o?"bg-gray-800 shadow-black/20":"bg-white shadow-gray-200/80"),children:[n.jsx("p",{className:ee("text-sm font-medium text-center mb-5 [font-family:inherit]",o?"text-gray-300":"text-gray-500"),children:ke||Ke("feedbackPrompt")}),Wt(),n.jsx("textarea",{"aria-label":Ke("feedbackPlaceholder"),value:yt,onChange:e=>{e.target.value.length<=1e3&&vt(e.target.value)},maxLength:1e3,placeholder:Ke("feedbackPlaceholder"),rows:4,disabled:wt,className:ee("w-full rounded-xl border px-4 py-3 text-sm [font-family:inherit] resize-none outline-none transition-colors mb-5",o?"bg-gray-700 border-gray-600 text-gray-100 placeholder-gray-400":"bg-gray-50 border-gray-200 text-gray-900 placeholder-gray-400")}),n.jsxs("div",{className:"relative group",children:[n.jsx("button",{onClick:Bt,disabled:0===ht||wt,"aria-describedby":0===ht?"resolve-rating-hint":void 0,className:ee("w-full py-3.5 rounded-xl text-sm font-semibold [font-family:inherit] transition-all duration-200 border-none outline-none focus:outline-none active:outline-none focus:ring-0 active:ring-0","disabled:opacity-50 disabled:cursor-not-allowed",o?"bg-gray-700 text-gray-100 hover:bg-gray-600":"bg-gray-100 text-gray-700 hover:bg-gray-200"),children:Ke(wt?"submitting":"submitFeedback")}),0===ht&&!wt&&n.jsx("div",{id:"resolve-rating-hint",role:"tooltip",className:"absolute -top-8 left-1/2 -translate-x-1/2 whitespace-nowrap px-2 py-1 rounded-md text-xs bg-gray-800 text-white opacity-0 group-hover:opacity-100 transition-opacity pointer-events-none",children:Ke("selectRatingFirst")})]})]})}):ye&&!ve&&we?n.jsx(nn,{questions:be,onPromptSuggestionClick:Qe,collapsiblePrompt:Se,onSubmit:we,primaryColor:i,isRtl:xt,isDark:o,defaultLanguage:j,fontFamily:R}):n.jsxs(n.Fragment,{children:[Ie&&n.jsx("div",{role:"status",className:"mx-3 mt-1 mb-2 rounded-lg px-3 py-2 text-xs font-medium "+(o?"bg-amber-900/40 text-amber-200 border border-amber-700/50":"bg-amber-50 text-amber-800 border border-amber-200"),children:Ke("sessionExpiringSoon")}),n.jsx(Gt,{messages:f,isDark:o,primaryColor:i,isLoading:g,agentMessageBubbleColor:O,userMessageBoxColor:C,textColor:s,assistantTextColor:I,userTextColor:N,fontFamily:R,agentMessageBubbleFontFamily:_,agentMessageBubbleFontSize:P,userMessageBubbleFontFamily:L,userMessageBubbleFontSize:D,fontSize:M,formatTime:wn,isRtl:xt,defaultLanguage:j,quickQuestions:E,shouldShowQuickQuestions:Dt,onQuickQuestion:A??v,quickQuestionsLayout:T,onDecision:F,disclaimerEnabled:ae,disclaimerText:ie,disclaimerPosition:se,disclaimerLinkUrl:le,disclaimerLinkLabel:ue,resolvedAgentBubbleColor:Et,resolvedUserMessageColor:At,resolvedTextColor:kt,isVoiceSessionActive:Z,voiceStatus:Q,messagesContainerRef:We,companyLogo:u,chatbotAvatarEnabled:d,chatbotAvatar:p,conciergeName:l,companyName:c,apiBaseUrl:pe,getAuthToken:ge,onPromptSuggestionClick:Qe,conversationResetKey:me,allowFeedback:Pe,provideCitations:Le,onFeedback:De,onRetryMessage:Me,headerTextColor:$,beforePromptsSlot:Lt?n.jsx(on,{categories:Be,selectedCategoryId:ze?.category||null,onSelect:_t,isDark:o,primaryColor:i,fontFamily:R,fontSize:M,isRtl:xt,label:Ke("chooseTopicLabel")}):null,quickQuestionsHeadingLabel:Pt?Ke("quickQuestionsHeadingLabel"):void 0}),(st&&xe||Ae)&&!ut&&n.jsx("div",{className:"","data-testid":"widget-csat-card",children:n.jsx(un,{format:Sn(Ae?.format||Ee),prompt:Ae?.prompt||ke||Ke("howWasYourExperience"),onRating:async(e,t)=>{dt(!0),ct(!1),(e=>{try{const t=ce(e);if(!t)return;t.csatSubmitted=!0,localStorage.setItem(`${re}_${e}`,JSON.stringify(t))}catch{}})(Ve);try{const n={"Content-Type":"application/json"};if("function"==typeof ge){const e=await ge();e&&(n.Authorization=`Bearer ${e}`)}const r=await fetch(`${pe.replace(/\/$/,"")}/api/v1/support/csat`,{method:"POST",headers:n,credentials:"include",body:JSON.stringify({conversationId:me,rating:e,ratingFormat:t,conciergeId:he})});r.ok||console.error("CSAT submission failed:",await r.text())}catch(e){console.error("CSAT submission error:",e)}},disabled:!1,isDark:o,primaryColor:i,defaultLanguage:j})})]})}),!(ye&&!ve)&&n.jsx(Zt,{onStopGeneration:a,inputValue:h,setInputValue:b,onSend:y,isDark:o,primaryColor:i,isOpen:t,isMinimized:r,isLoading:g,isConversationLoading:m,placeholder:Tt,textColor:kt,fontFamily:R,userMessageBubbleFontFamily:L,userMessageBubbleFontSize:D,fontSize:M,isRtl:xt,csatVisible:st&&xe&&!ut||jt&&(pt||gt),enableVoiceInteraction:X,isVoiceSessionActive:Z,voiceStatus:Q,voiceError:J,onVoiceToggle:ne,onBidiSubmit:oe,disclaimerEnabled:ae,disclaimerText:ie,disclaimerPosition:se,disclaimerLinkUrl:le,disclaimerLinkLabel:ue,showPoweredBy:de,defaultLanguage:j,onboardingQuestions:be,onboardingActive:ye,onboardingCompleted:ve,onboardingEnabled:Oe,userMessageBoxColor:C,resolvedUserMessageColor:At,userTextColor:N,promptSuggestions:pt||gt||!1===Ne||g?[]:Vt,onPromptSuggestionClick:Qe,autoPromptQuestionDisplay:Re,tagSelectorNode:null,showResolveButton:jt&&Ot&&!gt&&!pt&&!st&&!Ft,onResolve:()=>{jt&&ft(!0)},chatFeatures:He,apiEndpoint:pe,organizationId:Ve,conversationId:me})]})]})]})},En=new Map;const kn={whatsapp:["wa.me","api.whatsapp.com"],telegram:["t.me"],messenger:["m.me"],instagram:["ig.me","instagram.com","www.instagram.com"]},An={whatsapp:"WhatsApp",telegram:"Telegram",messenger:"Messenger",instagram:"Instagram"};const Tn=e.forwardRef(({isDark:t,primaryColor:r,onToggle:o,textColor:a,headerTextColor:i,defaultLanguage:s="en",isOpen:l=!1,className:c,channelLinks:u},d)=>{const p=e.useMemo(()=>V(s),[s]),f=e.useMemo(()=>function(e){if(!Array.isArray(e))return[];const t=[];for(const n of e){if(!n||"object"!=typeof n)continue;const e="string"==typeof n.type?n.type.toLowerCase():"",r=kn[e];if(!r||"string"!=typeof n.url)continue;let o;try{o=new URL(n.url)}catch{continue}"https:"===o.protocol&&r.includes(o.hostname.toLowerCase())&&t.push({type:e,url:o.toString(),label:"string"==typeof n.label&&n.label.trim()?n.label.trim():An[e]})}return t}(u),[u]),[g,m]=e.useState(!1),h=f.length>0,b=r,y=i||"#FFFFFF",v={display:"block",width:"100%",padding:"8px 12px",textAlign:"start",fontSize:"14px",color:t?"#F1F5F9":"#0F172A",background:"transparent",border:"none",borderRadius:"6px",textDecoration:"none",cursor:"pointer"};return n.jsxs("div",{className:`relative ${c||""}`,children:[h&&g&&!l&&n.jsxs("div",{role:"menu","aria-label":p("chooseChannel"),"data-testid":"channel-picker",style:{position:"absolute",bottom:"76px",right:0,minWidth:"180px",padding:"6px",borderRadius:"8px",border:"1px solid "+(t?"#334155":"#E2E8F0"),background:t?"#1E293B":"#FFFFFF",boxShadow:"0 10px 30px rgba(15, 23, 42, 0.15)"},children:[n.jsx("button",{type:"button",role:"menuitem",style:v,onClick:()=>{m(!1),o?.()},children:p("chatHere")}),f.map(e=>n.jsx("a",{role:"menuitem",href:e.url,target:"_blank",rel:"noopener noreferrer",style:v,onClick:()=>m(!1),children:e.label},`${e.type}-${e.url}`))]}),n.jsxs("button",{ref:d,onClick:()=>{!h||l?o?.():m(e=>!e)},className:"group relative w-16 h-16 rounded-full shadow-2xl transition-all duration-300 flex items-center justify-center text-white overflow-hidden hover:scale-110",style:{background:`linear-gradient(135deg, ${b} 0%, ${b}dd 100%)`,boxShadow:`0 10px 30px ${b}40`,border:"none"},"aria-label":p(l?"closeChat":"openChat"),"aria-expanded":h&&g||l,"aria-haspopup":h?"menu":void 0,"aria-controls":"chat-window-panel",children:[n.jsx("div",{className:"absolute inset-0 rounded-full bg-white/20 scale-0 group-hover:scale-100 transition-transform duration-500"}),n.jsx("div",{className:"relative z-10 transition-transform duration-300",children:n.jsx(He,{className:"w-7 h-7",style:{color:y}})})]})]})});Tn.displayName="ToggleButton";const On="0.2.24",Cn=function(e){if(null==e)return Nn;if("function"==typeof e)return In(e);if("object"==typeof e)return Array.isArray(e)?function(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=Cn(e[n]);return In(r);function r(...e){let n=-1;for(;++n<t.length;)if(t[n].apply(this,e))return!0;return!1}}(e):function(e){const t=e;return In(n);function n(n){const r=n;let o;for(o in e)if(r[o]!==t[o])return!1;return!0}}(e);if("string"==typeof e)return function(e){return In(t);function t(t){return t&&t.type===e}}(e);throw new Error("Expected function, string, or object as test")};function In(e){return function(t,n,r){return Boolean(function(e){return null!==e&&"object"==typeof e&&"type"in e}(t)&&e.call(this,t,"number"==typeof n?n:void 0,r||void 0))}}function Nn(){return!0}const Rn=[],_n=!0,Pn=!1,Ln="skip";function Dn(e,t,n,r){let o;"function"==typeof t&&"function"!=typeof n?(r=n,n=t):o=t;const a=Cn(o),i=r?-1:1;!function e(o,s,l){const c=o&&"object"==typeof o?o:{};if("string"==typeof c.type){const e="string"==typeof c.tagName?c.tagName:"string"==typeof c.name?c.name:void 0;Object.defineProperty(u,"name",{value:"node ("+o.type+(e?"<"+e+">":"")+")"})}return u;function u(){let c,u,d,p=Rn;if((!t||a(o,s,l[l.length-1]||void 0))&&(p=function(e){if(Array.isArray(e))return e;if("number"==typeof e)return[_n,e];return null==e?Rn:[e]}(n(o,l)),p[0]===Pn))return p;if("children"in o&&o.children){const t=o;if(t.children&&p[0]!==Ln)for(u=(r?t.children.length:-1)+i,d=l.concat(t);u>-1&&u<t.children.length;){const n=t.children[u];if(c=e(n,u,d)(),c[0]===Pn)return c;u="number"==typeof c[1]?c[1]:u+i}}return p}}(e,void 0,[])()}function Mn(e,t,n,r){let o,a,i;"function"==typeof t&&"function"!=typeof n?(a=void 0,i=t,o=n):(a=t,i=n,o=r),Dn(e,a,function(e,t){const n=t[t.length-1],r=n?n.children.indexOf(e):void 0;return i(e,r,n)},o)}let jn=null;const Fn=new Set;function Bn(e,t){if("string"!=typeof e||""===e.trim())return!0;let n;try{n=new URL(e.trim(),t.apiOrigin||"http://relative.invalid")}catch{return!1}return!(!t.apiOrigin||n.origin!==t.apiOrigin)||"https:"===n.protocol&&!n.username&&!n.password&&t.hosts.has(n.hostname.toLowerCase())}function Un(){return e=>{const t=jn;t&&Mn(e,"element",(e,n,r)=>{if("img"!==e.tagName||!r||void 0===n)return;const o=e.properties&&e.properties.src;if(Bn(o,t))return;if("report"===t.mode){let e=String(o);try{e=new URL(String(o)).host}catch{}return void(Fn.has(e)||(Fn.add(e),console.warn(`[eshal-widget] would block an image from ${e}`)))}const a=e.properties&&"string"==typeof e.properties.alt?e.properties.alt:"";return r.children.splice(n,1,{type:"text",value:a}),n})}}const zn=({getAuthToken:t,apiBaseUrl:r,darkMode:o,primaryColor:a,position:i,companyName:s,conciergeName:l,companyLogo:c,welcomeMessage:u,quickQuestions:d,quickQuestionsEnabled:p,quickQuestionsLayout:f="vertical",textColor:g,agentMessageBubbleColor:m,userMessageBoxColor:h,assistantTextColor:b,userTextColor:y,fontFamily:v,fontSize:w,defaultLanguage:S,apiKey:x,agentMessageBubbleFontFamily:E,agentMessageBubbleFontSize:k,userMessageBubbleFontFamily:A,userMessageBubbleFontSize:T,autoOpen:O=!1,openDelay:C=0,locale:I,className:N="",headerTextBold:R,headerTextItalic:_,enableVoiceInteraction:P,disclaimerEnabled:L,disclaimerText:D,disclaimerPosition:M,disclaimerLinkUrl:j,disclaimerLinkLabel:F,showPoweredBy:B,onboardingQuestions:U,collectionPrompt:z,allowedDomains:$,onboardingEnabled:G,wsBaseUrl:q,channelLinks:H})=>{const[V,W]=e.useState(null),[Y,K]=e.useState(!0),[X,Z]=e.useState(null),[Q,ee]=e.useState(!1),te=e.useRef(!1);e.useEffect(()=>{if(te.current)return;(async()=>{if(!r)return Z("apiBaseUrl is required"),void K(!1);try{K(!0);const e=await(async(e,t)=>{if(!e)throw new Error("apiBaseUrl is required");try{const n=e.replace(/\/$/,""),r=On?`${n}/api/v1/deploy-agent?wv=${encodeURIComponent(On)}`:`${n}/api/v1/deploy-agent`,o={"Content-Type":"application/json"};if("function"==typeof t){const e=await t();e&&(o.Authorization=`Bearer ${e}`)}const a=await fetch(r,{method:"GET",headers:o,credentials:"include"});if(404===a.status)return null;if(!a.ok)throw new Error(`HTTP error! status: ${a.status}`);return await a.json()}catch(e){throw console.error("Failed to fetch agent configuration:",e),e}})(r,t);if(null===e)return te.current=!0,ee(!0),W(null),void Z(null);!function(e,t){if(!e||"report"!==e.mode&&"enforce"!==e.mode)return void(jn=null);let n="";try{n=new URL(t).origin}catch{n=""}jn={mode:e.mode,hosts:new Set((Array.isArray(e.hosts)?e.hosts:[]).map(e=>String(e).toLowerCase())),apiOrigin:n}}(e.chatImagePolicy,r),W(e),Z(null)}catch(e){console.error("Failed to load agent configuration:",e),Z(e.message||"Failed to load configuration")}finally{K(!1)}})()},[r,t]);const ne=e.useMemo(()=>{if(!V)return null;const e=V.config??{},t=e.identity??{},n=e.branding??{},r=e.typography??{},f=e.messages??{},x=e.voice??{},O=e.onboarding??{},C=e.disclaimer??{},I=e.csat??{},N=e.inactivity??{},q=e.behavior??{},W=e.security??{},Y=e.layout??{},K=S??f.defaultLocale??"en",X=f.bundles?.[K]??{},Z=f.bundles?.en??{},Q={welcome:X.welcome||Z.welcome,fallback:X.fallback||Z.fallback,quickQuestions:Array.isArray(X.quickQuestions)&&X.quickQuestions.length>0?X.quickQuestions:Z.quickQuestions},ee=$??W.allowedDomains??(W.domains??[]).map(e=>"string"==typeof e?e:e.domain).filter(Boolean)??[];return{darkMode:o??!1,primaryColor:a??n.brandColor??"#2563eb",companyName:s??t.companyName??"Support Team",conciergeName:l??t.conciergeName,companyLogo:c??n.avatar??null,chatbotAvatarEnabled:n.chatbotAvatarEnabled??!1,chatbotAvatar:n.chatbotAvatar??null,welcomeMessage:u??Q.welcome??"Hi! How can we help?",fallbackMessage:Q.fallback,quickQuestions:d??Q.quickQuestions??[],quickQuestionsEnabled:p??f.quickQuestionsEnabled,textColor:g??"#000000",agentMessageBubbleColor:m??r.agentMessageBubbleColor,userMessageBoxColor:h??r.userMessageBoxColor,assistantTextColor:b??r.assistantTextColor??"#000000",userTextColor:y??r.userTextColor??"#000000",fontFamily:v??r.agentMessageBubbleFontFamily??"Inter",fontSize:w??r.agentMessageBubbleFontSize??"14px",defaultLanguage:K,headerTextBold:R??r.headerTextBold??!1,headerTextItalic:_??r.headerTextItalic??!1,headerTextColor:r.headerTextColor??"#FFFFFF",headerFontFamily:r.headerFontFamily,headerFontSize:r.headerFontSize,subtitle:t.subtitle??null,showStatus:t.showStatus??!1,statusMode:t.statusMode??"always",officeHours:t.officeHours??null,enableVoiceInteraction:P??x.enableVoiceInteraction??!1,disclaimerEnabled:L??C.enabled??!1,disclaimerText:D??C.text,disclaimerPosition:M??(te=C.position,te?te.toLowerCase():"top"),disclaimerLinkUrl:J(j??C.linkUrl),disclaimerLinkLabel:F??C.linkLabel,showPoweredBy:B??n.showPoweredBy??!0,onboardingQuestions:U??O.questions??[],collectionPrompt:z??O.collapsiblePrompt??"Before we begin, I need to verify your details.",allowedDomains:ee,launcherPosition:i??(e=>e?e.toLowerCase().replace(/_/g,"-"):"bottom-right")(Y.launcherPosition),onboardingEnabled:G??O.enabled??!1,inactivityTimeoutValue:N.timeoutValue??null,inactivityTimeoutUnit:N.timeoutUnit??null,agentMessageBubbleFontFamily:E??r.agentMessageBubbleFontFamily??v??"Inter",agentMessageBubbleFontSize:k??r.agentMessageBubbleFontSize??w??"14px",userMessageBubbleFontFamily:A??r.userMessageBubbleFontFamily??v??"Inter",userMessageBubbleFontSize:T??r.userMessageBubbleFontSize??w??"14px",csatEnabled:I.enabled??!1,csatFormat:I.format??"EMOJI",csatPrompt:I.prompt??"How was your experience?",autoPromptEnabled:q.autoPromptEnabled??!0,autoPromptQuestionDisplay:q.autoPromptQuestionDisplay??!0,autoPromptClickTelemetry:q.autoPromptClickTelemetry??!0,allowFeedback:q.allowFeedback??!0,provideCitations:q.provideCitations??!0,organizationId:V.organizationId??null,chatFeatures:e.chatFeatures??null,channelLinks:H??e.channelLinks??null};var te},[H,V,o,a,i,s,l,c,u,d,p,g,m,h,b,y,v,w,S,R,_,P,L,D,M,F,j,B,U,G,z,$,E,k,A,T]),re=e.useMemo(()=>!ne||((e=[])=>{if("undefined"==typeof window)return!1;const t=window.location.hostname.toLowerCase(),n=window.location.host.toLowerCase();return!(!e||0===e.length)&&e.some(e=>{const r=e.toLowerCase().trim();return r.includes(":")?n===r:t===r||t.endsWith("."+r)})})(ne.allowedDomains),[ne]),oe=e.useMemo(()=>({welcomeMessage:"Hi! How can we help?",quickQuestions:[],apiBaseUrl:r||"",apiKey:x||"",getAuthToken:t,autoOpen:!1,openDelay:0,darkMode:!1,enableVoiceInteraction:!1,onboardingQuestions:[],onboardingEnabled:!1,collectionPrompt:void 0}),[r,x,t]),{isOpen:ae,isMinimized:ie,isDark:se,messages:le,inputValue:ce,isLoading:ue,widgetRef:de,setInputValue:pe,handleSend:fe,stopGeneration:ge,handleQuickQuestion:me,sendMessage:he,retryMessage:be,toggleChat:ye,toggleTheme:ve,toggleMinimize:we,closeChat:Se,handleDecision:xe,isVoiceSessionActive:ke,voiceStatus:Ae,voiceError:Te,voiceConclusionForCsat:Oe,handleVoiceToggle:Ce,sendBidiTextMessage:Ie,onboardingActive:Ne,onboardingCompleted:Re,handleOnboardingFormSubmit:_e,conversationId:Pe,resetConversation:Le,sessionExpiringSoon:De,updateMessageFeedback:Me,widgetFilter:je,setWidgetFilter:Fe,addAssistantMessage:Be,csatRequest:Ue}=Ee(ne?{welcomeMessage:ne.welcomeMessage,fallbackMessage:ne.fallbackMessage,quickQuestions:ne.quickQuestions,apiBaseUrl:r,wsBaseUrl:q??V?.wsBaseUrl,apiKey:x,locale:ne.defaultLanguage||I,organizationId:ne.organizationId,getAuthToken:t,autoOpen:O,openDelay:C,darkMode:ne.darkMode,enableVoiceInteraction:ne.enableVoiceInteraction,onboardingQuestions:ne.onboardingQuestions,onboardingEnabled:ne.onboardingEnabled,collectionPrompt:ne.collectionPrompt,provideCitations:ne.provideCitations,inactivityTimeoutValue:ne.inactivityTimeoutValue,inactivityTimeoutUnit:ne.inactivityTimeoutUnit,messageLimits:V?.messageLimits}:oe),ze=e.useRef(null),$e=e.useRef(ae);e.useEffect(()=>{$e.current&&!ae&&ze.current?.focus(),$e.current=ae},[ae]);const Ge=e.useCallback((e,n,o)=>{if(Me(e,n),!Pe||!r)return;const a=r.replace(/\/$/,"");(async()=>{try{const r={"Content-Type":"application/json"};if("function"==typeof t){const e=await t();e&&(r.Authorization=`Bearer ${e}`)}await fetch(`${a}/api/v1/support/feedback`,{method:"POST",headers:r,credentials:"include",body:JSON.stringify({messageContent:e,conversationId:Pe,feedback:n,feedbackText:o})})}catch(e){console.error("Feedback submission error:",e)}})()},[Pe,r,t,Me]),qe=e.useCallback(()=>{Le&&Le()},[Le]),{categories:He,hasFilters:Ve}=function(t,n){const r=!!t,[o,a]=e.useState({categories:[],loading:r,error:null});e.useEffect(()=>{if(!t)return void a({categories:[],loading:!1,error:null});const e=n?`${t}|__session__`:`${t}|__proxy__`,r=En.get(e);if(r)return void a({categories:r,loading:!1,error:null});let o=!1;a(e=>({...e,loading:!0,error:null}));const i=`${t.replace(/\/$/,"")}/api/v1/widget/filters`;return(async()=>{try{const t={Accept:"application/json"};if("function"==typeof n){const e=await n();e&&(t.Authorization=`Bearer ${e}`)}const r=await fetch(i,{method:"GET",headers:t});if(!r.ok)throw new Error(`filter catalog HTTP ${r.status}`);const s=await r.json(),l=Array.isArray(s?.categories)?s.categories:[];if(o)return;En.set(e,l),a({categories:l,loading:!1,error:null})}catch(e){if(o)return;console.warn("[useFilterCatalog] catalog fetch failed:",e),a({categories:[],loading:!1,error:e})}})(),()=>{o=!0}},[t,n]);const i=e.useMemo(()=>Array.isArray(o.categories)&&o.categories.length>0,[o.categories]);return{...o,hasFilters:i}}(r,t),We=e.useCallback(()=>{const e=le.filter(e=>e.content&&""!==e.content.trim()).map(e=>`${"user"===e.role?"You":ne?.conciergeName||"Assistant"}: ${e.content}`).join("\n\n");e&&navigator.clipboard.writeText(e).catch(()=>{})},[le,ne?.conciergeName]);if(e.useEffect(()=>{de.current&&ne&&(de.current.style.setProperty("--cw-primary",ne.primaryColor),ne.fontFamily&&de.current.style.setProperty("--cw-font-family",ne.fontFamily),ne.textColor&&de.current.style.setProperty("--cw-text-color",ne.textColor))},[ne,de]),Y)return null;if(Q)return null;if(X||!ne)return console.error("ChatWidget configuration error:",X),null;if(!re)return null;const Ye={"bottom-right":"bottom-5 right-5","bottom-left":"bottom-5 left-5","top-right":"top-5 right-5","top-left":"top-5 left-5"};return n.jsx("div",{id:"chat-widget-root",children:n.jsxs("div",{ref:de,className:`chat-widget-root fixed flex flex-col ${ne.launcherPosition?.includes("left")?"items-start":"items-end"} z-[999999] ${se?"dark":""} ${N} ${Ye[ne.launcherPosition]||Ye["bottom-right"]}`,children:[n.jsx(xn,{isOpen:ae,isMinimized:ie,isDark:se,launcherPosition:ne.launcherPosition,primaryColor:ne.primaryColor,textColor:ne.textColor,companyName:ne.companyName,conciergeName:ne.conciergeName,companyLogo:ne.companyLogo,chatbotAvatarEnabled:ne.chatbotAvatarEnabled,chatbotAvatar:ne.chatbotAvatar,messages:le,isLoading:ue,inputValue:ce,setInputValue:pe,onSend:fe,onStopGeneration:ge,onDirectSend:he,onToggleTheme:ve,onMinimize:we,onClose:Se,quickQuestions:ne.quickQuestions,quickQuestionsEnabled:ne.quickQuestionsEnabled,onQuickQuestion:me,quickQuestionsLayout:f,agentMessageBubbleColor:ne.agentMessageBubbleColor,userMessageBoxColor:ne.userMessageBoxColor,assistantTextColor:ne.assistantTextColor,userTextColor:ne.userTextColor,fontFamily:ne.fontFamily,agentMessageBubbleFontFamily:ne.agentMessageBubbleFontFamily,agentMessageBubbleFontSize:ne.agentMessageBubbleFontSize,userMessageBubbleFontFamily:ne.userMessageBubbleFontFamily,userMessageBubbleFontSize:ne.userMessageBubbleFontSize,fontSize:ne.fontSize,defaultLanguage:ne.defaultLanguage||I,onDecision:xe,headerTextBold:ne.headerTextBold,headerTextItalic:ne.headerTextItalic,headerTextColor:ne.headerTextColor,headerFontFamily:ne.headerFontFamily,headerFontSize:ne.headerFontSize,subtitle:ne.subtitle,showStatus:ne.showStatus,statusMode:ne.statusMode,officeHours:ne.officeHours,enableVoiceInteraction:ne.enableVoiceInteraction,isVoiceSessionActive:ke,voiceStatus:Ae,voiceError:Te,voiceConclusionForCsat:Oe,onVoiceToggle:Ce,onBidiSubmit:()=>Ie(ce),disclaimerEnabled:ne.disclaimerEnabled,disclaimerText:ne.disclaimerText,disclaimerPosition:ne.disclaimerPosition,disclaimerLinkUrl:ne.disclaimerLinkUrl,disclaimerLinkLabel:ne.disclaimerLinkLabel,showPoweredBy:ne.showPoweredBy,apiBaseUrl:r,apiKey:x,getAuthToken:t,conversationId:Pe,conciergeId:V?.conciergeId??V?.id,onboardingQuestions:ne.onboardingQuestions,onboardingActive:Ne,onboardingCompleted:Re,onOnboardingFormSubmit:_e,collectionPrompt:ne.collectionPrompt,csatEnabled:ne.csatEnabled,csatFormat:ne.csatFormat,csatPrompt:ne.csatPrompt,csatRequest:Ue,onboardingEnabled:ne.onboardingEnabled,onResetConversation:Le,sessionExpiringSoon:De,autoPromptEnabled:ne.autoPromptEnabled,autoPromptQuestionDisplay:ne.autoPromptQuestionDisplay,autoPromptClickTelemetry:ne.autoPromptClickTelemetry,allowFeedback:ne.allowFeedback,provideCitations:ne.provideCitations,onFeedback:Ge,onRetryMessage:be,onRefreshChat:qe,onCopyChat:We,filterCategories:He,showFilterStep:Ve,widgetFilter:je,onWidgetFilterChange:Fe,onSynthesizeAssistantMessage:Be,chatFeatures:ne.chatFeatures,organizationId:ne.organizationId}),n.jsx(Tn,{ref:ze,isDark:se,primaryColor:ne.primaryColor,onToggle:ye,textColor:ne.textColor,headerTextColor:ne.headerTextColor,defaultLanguage:ne.defaultLanguage||I,isOpen:ae,className:ae?"hidden":void 0,channelLinks:ne.channelLinks})]})})};var $n="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},Gn={exports:{}};function qn(e){try{const t=window[e];return t.setItem("__ft__","1"),t.removeItem("__ft__"),"1"}catch{return"0"}}function Hn(){try{return Array.from(navigator.plugins||[]).map(e=>`${e.name}::${e.filename}`).sort().join("|")}catch{return""}}function Vn(){try{return Array.from(navigator.mimeTypes||[]).map(e=>e.type).sort().join("|")}catch{return""}}function Wn(){try{const e=document.createElement("canvas");e.width=240,e.height=60;const t=e.getContext("2d");return t.textBaseline="alphabetic",t.fillStyle="#f60",t.fillRect(125,1,62,20),t.fillStyle="#069",t.font="11pt no-real-font-abc",t.fillText("user-trace:canvas,🔍<canvas>",2,15),t.fillStyle="rgba(102,204,0,0.7)",t.font="18pt Arial",t.fillText("user-trace:canvas,🔍<canvas>",4,45),e.toDataURL().slice(-50)}catch{return"nocanvas"}}function Yn(){try{const e=document.createElement("canvas"),t=e.getContext("webgl")||e.getContext("experimental-webgl");if(!t)return"nowebgl";const n=t.getExtension("WEBGL_debug_renderer_info"),r=n?t.getParameter(n.UNMASKED_VENDOR_WEBGL):t.getParameter(t.VENDOR);return`${r}::${n?t.getParameter(n.UNMASKED_RENDERER_WEBGL):t.getParameter(t.RENDERER)}`}catch{return"nowebgl"}}function Kn(){const e=["Arial","Courier New","Georgia","Times New Roman","Verdana","Helvetica","Comic Sans MS","Impact","Tahoma","Trebuchet MS","Palatino Linotype","Lucida Console","Lucida Sans Unicode","MS Sans Serif","MS Serif","Symbol","Wingdings","Franklin Gothic Medium","Book Antiqua","Garamond","Calibri","Cambria","Consolas","Candara","Optima","Segoe UI","Gill Sans","Century Gothic","Futura"];try{const t=document.createElement("canvas").getContext("2d"),n="monospace",r="mmmmmmmmmmlli",o="72px";t.font=`${o} ${n}`;const a=t.measureText(r).width;return e.filter(e=>(t.font=`${o} '${e}', ${n}`,t.measureText(r).width!==a)).join(",")}catch{return""}}function Xn(){try{return window.OfflineAudioContext||window.webkitOfflineAudioContext?"audio-supported":"noaudio"}catch{return"noaudio"}}var Zn={generateFingerprint:function(){const e=function(){const e=navigator||{},t=screen||{};return{userAgent:e.userAgent||"",language:e.language||"",languages:(e.languages||[]).join(","),platform:e.platform||"",hardwareConcurrency:e.hardwareConcurrency||0,deviceMemory:e.deviceMemory||0,maxTouchPoints:e.maxTouchPoints||0,cookieEnabled:e.cookieEnabled?"1":"0",doNotTrack:e.doNotTrack||"unknown",screenWidth:t.width||0,screenHeight:t.height||0,colorDepth:t.colorDepth||0,pixelDepth:t.pixelDepth||0,devicePixelRatio:"undefined"!=typeof devicePixelRatio?devicePixelRatio:1,timezoneOffset:(new Date).getTimezoneOffset(),timezone:Intl.DateTimeFormat().resolvedOptions().timeZone||"",sessionStorage:qn("sessionStorage"),localStorage:qn("localStorage"),indexedDB:"undefined"!=typeof indexedDB?"1":"0",cpuClass:e.cpuClass||"unknown",oscpu:e.oscpu||"unknown",vendor:e.vendor||"",vendorSub:e.vendorSub||"",productSub:e.productSub||"",plugins:Hn(),mimeTypes:Vn(),canvas:Wn(),webgl:Yn(),fonts:Kn(),audioContext:Xn()}}(),t=function(e){let t=5381;for(let n=0;n<e.length;n++)t=(t<<5)+t^e.charCodeAt(n),t&=t;return(t>>>0).toString(16).padStart(8,"0")}(Object.values(e).join("|||")),n=["nocanvas"!==e.canvas,"nowebgl"!==e.webgl&&""!==e.webgl,""!==e.fonts,""!==e.plugins,e.hardwareConcurrency>0,""!==e.timezone];return{id:t,signals:e,confidence:Math.round(n.filter(Boolean).length/n.length*100)}}};const Qn=[{url:"https://api.ipify.org?format=json",parse:e=>e.ip},{url:"https://api64.ipify.org?format=json",parse:e=>e.ip},{url:"https://api.my-ip.io/v2/ip.json",parse:e=>e.ip},{url:"https://ipapi.co/json/",parse:e=>e.ip}];async function Jn(e,t=4e3){const n=new AbortController,r=setTimeout(()=>n.abort(),t);try{const t=await fetch(e,{signal:n.signal});if(!t.ok)throw new Error(`HTTP ${t.status}`);return await t.json()}finally{clearTimeout(r)}}function er(e){return/^(\d{1,3}\.){3}\d{1,3}$/.test(e)||/^[0-9a-f:]{2,39}$/i.test(e)}var tr={detectIP:async function(){for(const e of Qn)try{const t=await Jn(e.url),n=e.parse(t);if(n&&er(n))return{ip:n,source:new URL(e.url).hostname}}catch{}return null},getIPVersion:function(e){return e?/^(\d{1,3}\.){3}\d{1,3}$/.test(e)?"v4":/^[0-9a-f:]{2,39}$/i.test(e)?"v6":"unknown":"unknown"}};let nr={apiKeys:{},preferredProvider:null,timeoutMs:5e3};function rr(e={}){const t=[e.ipinfo&&{name:"ipinfo.io",tier:"free-with-key",freeLimit:"50,000 req/month",signup:"https://ipinfo.io/signup",buildUrl:t=>`https://ipinfo.io/${t}/json?token=${e.ipinfo}`,parse:e=>{if(e.error)throw new Error(e.error.message||"Failed");const[t,n]=(e.loc||"0,0").split(",").map(Number);return{ip:e.ip||"",country:e.country||"",countryCode:e.country||"",region:e.region||"",regionCode:"",city:e.city||"",zip:e.postal||"",latitude:t,longitude:n,timezone:e.timezone||"",isp:e.org||"",org:e.org||"",proxy:!1,hosting:!1}}},e.ipgeolocation&&{name:"ipgeolocation.io",tier:"free-with-key",freeLimit:"1,000 req/day",signup:"https://ipgeolocation.io/signup.html",buildUrl:t=>`https://api.ipgeolocation.io/ipgeo?apiKey=${e.ipgeolocation}&ip=${t}`,parse:e=>{if(e.message)throw new Error(e.message);return{ip:e.ip||"",country:e.country_name||"",countryCode:e.country_code2||"",region:e.state_prov||"",regionCode:e.state_code||"",city:e.city||"",zip:e.zipcode||"",latitude:parseFloat(e.latitude)||0,longitude:parseFloat(e.longitude)||0,timezone:e.time_zone?.name||"",isp:e.isp||"",org:e.organization||"",proxy:e.security?.is_proxy||!1,hosting:e.security?.is_hosting||!1}}},e.abstractapi&&{name:"abstractapi.com",tier:"free-with-key",freeLimit:"20,000 req/month",signup:"https://app.abstractapi.com/users/signup?target=/api/ip-geolocation",buildUrl:t=>`https://ipgeolocation.abstractapi.com/v1/?api_key=${e.abstractapi}&ip_address=${t}`,parse:e=>{if(e.error)throw new Error(e.error.message||"Failed");return{ip:e.ip_address||"",country:e.country||"",countryCode:e.country_code||"",region:e.region||"",regionCode:e.region_iso_code||"",city:e.city||"",zip:e.postal_code||"",latitude:e.latitude||0,longitude:e.longitude||0,timezone:e.timezone?.name||"",isp:e.connection?.isp_name||"",org:e.connection?.org_name||"",proxy:e.security?.is_vpn||!1,hosting:e.security?.is_hosting||!1}}},e.ip2location&&{name:"ip2location.io",tier:"free-with-key",freeLimit:"30,000 req/month",signup:"https://www.ip2location.io/sign-up",buildUrl:t=>`https://api.ip2location.io/?key=${e.ip2location}&ip=${t}&format=json`,parse:e=>{if(e.error)throw new Error(e.error.error_message||"Failed");return{ip:e.ip||"",country:e.country_name||"",countryCode:e.country_code||"",region:e.region_name||"",regionCode:"",city:e.city_name||"",zip:e.zip_code||"",latitude:e.latitude||0,longitude:e.longitude||0,timezone:e.time_zone||"",isp:e.isp||"",org:e.domain||"",proxy:e.is_proxy||!1,hosting:!1}}},e.ipstack&&{name:"ipstack.com",tier:"free-with-key",freeLimit:"100 req/month",signup:"https://ipstack.com/product",buildUrl:t=>`https://api.ipstack.com/${t}?access_key=${e.ipstack}`,parse:e=>{if(e.error)throw new Error(e.error.info||"Failed");return{ip:e.ip||"",country:e.country_name||"",countryCode:e.country_code||"",region:e.region_name||"",regionCode:e.region_code||"",city:e.city||"",zip:e.zip||"",latitude:e.latitude||0,longitude:e.longitude||0,timezone:e.time_zone?.id||"",isp:e.connection?.isp||"",org:"",proxy:!1,hosting:!1}}}].filter(Boolean),n=[{name:"ip-api.com",tier:"free",freeLimit:"45 req/min (no key needed)",buildUrl:e=>`https://ip-api.com/json/${e}?fields=status,message,country,countryCode,region,regionName,city,zip,lat,lon,timezone,isp,org,proxy,hosting,query`,parse:e=>{if("success"!==e.status)throw new Error(e.message||"Failed");return{ip:e.query||"",country:e.country||"",countryCode:e.countryCode||"",region:e.regionName||"",regionCode:e.region||"",city:e.city||"",zip:e.zip||"",latitude:e.lat||0,longitude:e.lon||0,timezone:e.timezone||"",isp:e.isp||"",org:e.org||"",proxy:e.proxy||!1,hosting:e.hosting||!1}}},{name:"ipwho.is",tier:"free",freeLimit:"unlimited (fair use, no key needed)",buildUrl:e=>`https://ipwho.is/${e}`,parse:e=>{if(!e.success)throw new Error(e.message||"Failed");return{ip:e.ip||"",country:e.country||"",countryCode:e.country_code||"",region:e.region||"",regionCode:e.region_code||"",city:e.city||"",zip:e.postal||"",latitude:e.latitude||0,longitude:e.longitude||0,timezone:e.timezone?.id||"",isp:e.connection?.isp||"",org:e.connection?.org||"",proxy:!1,hosting:!1}}},{name:"ipapi.co",tier:"free",freeLimit:"1,000 req/day (no key needed)",buildUrl:e=>`https://ipapi.co/${e}/json/`,parse:e=>{if(e.error)throw new Error(e.reason||"Failed");return{ip:e.ip||"",country:e.country_name||"",countryCode:e.country_code||"",region:e.region||"",regionCode:e.region_code||"",city:e.city||"",zip:e.postal||"",latitude:e.latitude||0,longitude:e.longitude||0,timezone:e.timezone||"",isp:e.org||"",org:e.org||"",proxy:!1,hosting:!1}}},{name:"freeipapi.com",tier:"free",freeLimit:"unlimited (fair use, no key needed)",buildUrl:e=>`https://freeipapi.com/api/json/${e}`,parse:e=>({ip:e.ipAddress||"",country:e.countryName||"",countryCode:e.countryCode||"",region:e.regionName||"",regionCode:e.regionCode||"",city:e.cityName||"",zip:e.zipCode||"",latitude:e.latitude||0,longitude:e.longitude||0,timezone:e.timeZone||"",isp:"",org:"",proxy:!1,hosting:!1})}],r=["freeipapi.com","ipwho.is","ipapi.co","ip-api.com"];return n.sort((e,t)=>r.indexOf(e.name)-r.indexOf(t.name)),[...t,...n]}async function or(e,t=5e3){const n=new AbortController,r=setTimeout(()=>n.abort(),t);try{const t=await fetch(e,{signal:n.signal});if(!t.ok)throw new Error(`HTTP ${t.status}`);return await t.json()}finally{clearTimeout(r)}}const ar={enableHighAccuracy:!0,timeout:8e3,maximumAge:3e5};function ir(e={}){return new Promise(t=>"undefined"!=typeof navigator&&navigator.geolocation?"undefined"!=typeof window&&!1===window.isSecureContext?t(null):void navigator.geolocation.getCurrentPosition(e=>t({latitude:e.coords.latitude,longitude:e.coords.longitude,accuracy:e.coords.accuracy}),()=>t(null),{...ar,...e}):t(null))}async function sr(e,t,n={}){if("number"!=typeof e||"number"!=typeof t)return null;const r=n.timeoutMs||nr.timeoutMs||5e3,o=`https://api.bigdatacloud.net/data/reverse-geocode-client?latitude=${e}&longitude=${t}&localityLanguage=${n.localityLanguage||"en"}`;try{const n=await or(o,r),a=n.city||n.locality||"";return a||n.countryName?{city:a,region:n.principalSubdivision||"",regionCode:(n.principalSubdivisionCode||"").split("-").pop()||"",country:n.countryName||"",countryCode:n.countryCode||"",latitude:e,longitude:t}:null}catch{return null}}var lr={configureGeo:function(e={}){e.apiKeys&&(nr.apiKeys={...nr.apiKeys,...e.apiKeys}),void 0!==e.preferredProvider&&(nr.preferredProvider=e.preferredProvider),void 0!==e.timeoutMs&&(nr.timeoutMs=e.timeoutMs)},resolveLocation:async function(e,t={}){const n={apiKeys:{...nr.apiKeys,...t.apiKeys||{}},preferredProvider:t.preferredProvider||nr.preferredProvider,timeoutMs:t.timeoutMs||nr.timeoutMs};let r=rr(n.apiKeys);if(n.preferredProvider){const e=r.findIndex(e=>e.name===n.preferredProvider);if(e>0){const[t]=r.splice(e,1);r.unshift(t)}}for(const t of r)try{const r=await or(t.buildUrl(e),n.timeoutMs);return{...t.parse(r),source:t.name,tier:t.tier}}catch{}return null},listProviders:function(e={}){return rr({...nr.apiKeys,...e}).map(({name:e,tier:t,freeLimit:n,signup:r})=>({name:e,tier:t,freeLimit:n,signup:r||"—"}))},getBrowserGeolocation:ir,getGeolocationPermission:async function(){try{if("undefined"==typeof navigator||!navigator.permissions||!navigator.permissions.query)return"unsupported";return(await navigator.permissions.query({name:"geolocation"})).state}catch{return"unsupported"}},reverseGeocode:sr,getBrowserLocation:async function(e={}){const t=await ir(e);if(!t)return null;const n=await sr(t.latitude,t.longitude,e),r=!(!n||!n.city&&!n.country);return{...r?n:{},latitude:t.latitude,longitude:t.longitude,accuracy:t.accuracy,...r?{source:"gps"}:{}}},toMapsUrl:function(e,t){return`https://www.google.com/maps?q=${e},${t}`}};const cr="__ut_sid__",ur="__ut_uid__",dr="__ut_meta__";function pr(){const e=new Uint8Array(16);crypto.getRandomValues(e),e[6]=15&e[6]|64,e[8]=63&e[8]|128;const t=Array.from(e).map(e=>e.toString(16).padStart(2,"0")).join("");return[t.slice(0,8),t.slice(8,12),t.slice(12,16),t.slice(16,20),t.slice(20)].join("-")}function fr(e,t){try{return e.getItem(t)}catch{return null}}function gr(e,t,n){try{return e.setItem(t,n),!0}catch{return!1}}var mr={getOrCreateUserID:function(){let e=fr(localStorage,ur),t=!1;return e||(e=pr(),t=!0,gr(localStorage,ur,e)),{uid:e,isNew:t}},getOrCreateSessionID:function(){let e=fr(sessionStorage,cr),t=!1;return e||(e=pr(),t=!0,gr(sessionStorage,cr,e)),{sid:e,isNew:t}},saveSessionMeta:function(e){try{const t=JSON.stringify({...e,savedAt:(new Date).toISOString()});gr(localStorage,dr,t)}catch{}},loadSessionMeta:function(){try{const e=fr(localStorage,dr);return e?JSON.parse(e):null}catch{return null}},clearSession:function(){try{localStorage.removeItem(ur)}catch{}try{localStorage.removeItem(dr)}catch{}try{sessionStorage.removeItem(cr)}catch{}},getBrowserContext:function(){return{userAgent:navigator.userAgent,platform:navigator.platform||"unknown",language:navigator.language||"unknown",timezone:Intl.DateTimeFormat().resolvedOptions().timeZone,screenRes:`${screen.width}x${screen.height}`,viewportRes:`${window.innerWidth}x${window.innerHeight}`,colorDepth:screen.colorDepth,touchSupport:navigator.maxTouchPoints>0,cookieEnabled:navigator.cookieEnabled,referrer:document.referrer||null,currentUrl:window.location.href,loadedAt:(new Date).toISOString()}}};const{generateFingerprint:hr}=Zn,{detectIP:br,getIPVersion:yr}=tr,{configureGeo:vr,resolveLocation:wr,listProviders:Sr,getBrowserGeolocation:xr,getGeolocationPermission:Er,reverseGeocode:kr,getBrowserLocation:Ar,toMapsUrl:Tr}=lr,{getOrCreateUserID:Or,getOrCreateSessionID:Cr,saveSessionMeta:Ir,loadSessionMeta:Nr,clearSession:Rr,getBrowserContext:_r}=mr;Gn.exports=class{constructor(e={}){this._options={onReady:e.onReady||null,onError:e.onError||null,geoFromBrowser:void 0===e.geoFromBrowser||e.geoFromBrowser,geoApiKeys:e.geoApiKeys||null,geoOptions:e.geoOptions||null,cache:!1!==e.cache,maxAgeMs:e.maxAgeMs||3e5,autoInit:e.autoInit||!1,webhookUrl:e.webhookUrl||null},this.profile=null,this._ready=!1,this._options.autoInit&&this.init().catch(()=>{})}async init(){if(this._options.cache){const e=Nr();if(e&&e.savedAt){if(Date.now()-new Date(e.savedAt).getTime()<this._options.maxAgeMs)return this.profile=e,this._ready=!0,this._options.onReady&&this._options.onReady(this.profile),this.profile}}try{const{uid:e,isNew:t}=Or(),{sid:n,isNew:r}=Cr(),{id:o,signals:a,confidence:i}=hr(),s=this._options.geoApiKeys?{apiKeys:this._options.geoApiKeys}:{},[l,c]=await Promise.all([(async()=>{const e=await br(),t=e?.ip||"unknown",n="unknown"!==t?await wr(t,s):null;return{ip:t,ipVersion:e?yr(t):"unknown",geo:n}})(),this._collectBrowserLocation()]),{ip:u,ipVersion:d}=l;let p=l.geo,f=null;c&&(f={latitude:c.latitude,longitude:c.longitude,accuracy:c.accuracy},"gps"===c.source&&(p={...p||{},...c}));const g=_r();return this.profile={uid:e,sid:n,isNewUser:t,isNewSession:r,fingerprintId:o,fingerprintConfidence:i,ip:u,ipVersion:d,geo:p||null,browserGeo:f||null,browser:g,raw:a,createdAt:(new Date).toISOString(),...p?{mapsUrl:Tr(p.latitude,p.longitude)}:{}},Ir(this.profile),this._options.webhookUrl&&this._sendToWebhook(this.profile),this._ready=!0,this._options.onReady&&this._options.onReady(this.profile),this.profile}catch(e){throw this._options.onError&&this._options.onError(e),e}}async _collectBrowserLocation(){const e=this._options.geoFromBrowser;if(!e)return null;if("auto"===e){if("granted"!==await Er())return null}return Ar(this._options.geoOptions||{})}async captureBrowserLocation(e={}){const t=await Ar({...this._options.geoOptions||{},...e});return t&&this.profile?(this.profile.browserGeo={latitude:t.latitude,longitude:t.longitude,accuracy:t.accuracy},this.profile.mapsUrl=Tr(t.latitude,t.longitude),"gps"===t.source&&(this.profile.geo={...this.profile.geo||{},...t}),Ir(this.profile),this._options.onReady&&this._options.onReady(this.profile),this.profile):this.profile}getProfile(){return this.profile}isKnownUser(e){return this.profile?.uid===e}async refresh(){return Rr(),this.profile=null,this._ready=!1,this.init()}clear(){Rr(),this.profile=null,this._ready=!1}getSummary(){if(!this.profile)return null;const{uid:e,sid:t,fingerprintId:n,ip:r,geo:o,browser:a,createdAt:i}=this.profile;return{uid:e,sid:t,fingerprintId:n,ip:r,country:o?.country||"unknown",city:o?.city||"unknown",isp:o?.isp||"unknown",proxy:o?.proxy||!1,timezone:o?.timezone||a.timezone,userAgent:a.userAgent,language:a.language,createdAt:i}}async _sendToWebhook(e){try{await fetch(this._options.webhookUrl,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})}catch{}}};var Pr=Gn.exports.generateFingerprint=hr,Lr=Gn.exports.detectIP=br,Dr=Gn.exports.configureGeo=vr,Mr=Gn.exports.resolveLocation=wr,jr=Gn.exports.listProviders=Sr,Fr=Gn.exports.getBrowserGeolocation=xr,Br=Gn.exports.getGeolocationPermission=Er,Ur=Gn.exports.reverseGeocode=kr,zr=Gn.exports.getBrowserLocation=Ar,$r=Gn.exports.getOrCreateUserID=Or,Gr=Gn.exports.getOrCreateSessionID=Cr,qr=Gn.exports.clearSession=Rr,Hr=Gn.exports.getBrowserContext=_r,Vr=Gn.exports,Wr=a({__proto__:null,clearSession:qr,configureGeo:Dr,default:Vr,detectIP:Lr,generateFingerprint:Pr,getBrowserContext:Hr,getBrowserGeolocation:Fr,getBrowserLocation:zr,getGeolocationPermission:Br,getOrCreateSessionID:Gr,getOrCreateUserID:$r,listProviders:jr,resolveLocation:Mr,reverseGeocode:Ur},[Vr]),Yr={exports:{}};!function(e){!function(){function t(e,t,n){return e.call.apply(e.bind,arguments)}function n(e,t,n){if(!e)throw Error();if(2<arguments.length){var r=Array.prototype.slice.call(arguments,2);return function(){var n=Array.prototype.slice.call(arguments);return Array.prototype.unshift.apply(n,r),e.apply(t,n)}}return function(){return e.apply(t,arguments)}}function r(e,o,a){return(r=Function.prototype.bind&&-1!=Function.prototype.bind.toString().indexOf("native code")?t:n).apply(null,arguments)}var o=Date.now||function(){return+new Date};function a(e,t){this.a=e,this.o=t||e,this.c=this.o.document}var i=!!window.FontFace;function s(e,t,n,r){if(t=e.c.createElement(t),n)for(var o in n)n.hasOwnProperty(o)&&("style"==o?t.style.cssText=n[o]:t.setAttribute(o,n[o]));return r&&t.appendChild(e.c.createTextNode(r)),t}function l(e,t,n){(e=e.c.getElementsByTagName(t)[0])||(e=document.documentElement),e.insertBefore(n,e.lastChild)}function c(e){e.parentNode&&e.parentNode.removeChild(e)}function u(e,t,n){t=t||[],n=n||[];for(var r=e.className.split(/\s+/),o=0;o<t.length;o+=1){for(var a=!1,i=0;i<r.length;i+=1)if(t[o]===r[i]){a=!0;break}a||r.push(t[o])}for(t=[],o=0;o<r.length;o+=1){for(a=!1,i=0;i<n.length;i+=1)if(r[o]===n[i]){a=!0;break}a||t.push(r[o])}e.className=t.join(" ").replace(/\s+/g," ").replace(/^\s+|\s+$/,"")}function d(e,t){for(var n=e.className.split(/\s+/),r=0,o=n.length;r<o;r++)if(n[r]==t)return!0;return!1}function p(e,t,n){function r(){u&&o&&a&&(u(c),u=null)}t=s(e,"link",{rel:"stylesheet",href:t,media:"all"});var o=!1,a=!0,c=null,u=n||null;i?(t.onload=function(){o=!0,r()},t.onerror=function(){o=!0,c=Error("Stylesheet failed to load"),r()}):setTimeout(function(){o=!0,r()},0),l(e,"head",t)}function f(e,t,n,r){var o=e.c.getElementsByTagName("head")[0];if(o){var a=s(e,"script",{src:t}),i=!1;return a.onload=a.onreadystatechange=function(){i||this.readyState&&"loaded"!=this.readyState&&"complete"!=this.readyState||(i=!0,n&&n(null),a.onload=a.onreadystatechange=null,"HEAD"==a.parentNode.tagName&&o.removeChild(a))},o.appendChild(a),setTimeout(function(){i||(i=!0,n&&n(Error("Script load timeout")))},r||5e3),a}return null}function g(){this.a=0,this.c=null}function m(e){return e.a++,function(){e.a--,b(e)}}function h(e,t){e.c=t,b(e)}function b(e){0==e.a&&e.c&&(e.c(),e.c=null)}function y(e){this.a=e||"-"}function v(e,t){this.c=e,this.f=4,this.a="n";var n=(t||"n4").match(/^([nio])([1-9])$/i);n&&(this.a=n[1],this.f=parseInt(n[2],10))}function w(e){var t=[];e=e.split(/,\s*/);for(var n=0;n<e.length;n++){var r=e[n].replace(/['"]/g,"");-1!=r.indexOf(" ")||/^\d/.test(r)?t.push("'"+r+"'"):t.push(r)}return t.join(",")}function S(e){return e.a+e.f}function x(e){var t="normal";return"o"===e.a?t="oblique":"i"===e.a&&(t="italic"),t}function E(e){var t=4,n="n",r=null;return e&&((r=e.match(/(normal|oblique|italic)/i))&&r[1]&&(n=r[1].substr(0,1).toLowerCase()),(r=e.match(/([1-9]00|normal|bold)/i))&&r[1]&&(/bold/i.test(r[1])?t=7:/[1-9]00/.test(r[1])&&(t=parseInt(r[1].substr(0,1),10)))),n+t}function k(e,t){this.c=e,this.f=e.o.document.documentElement,this.h=t,this.a=new y("-"),this.j=!1!==t.events,this.g=!1!==t.classes}function A(e){if(e.g){var t=d(e.f,e.a.c("wf","active")),n=[],r=[e.a.c("wf","loading")];t||n.push(e.a.c("wf","inactive")),u(e.f,n,r)}T(e,"inactive")}function T(e,t,n){e.j&&e.h[t]&&(n?e.h[t](n.c,S(n)):e.h[t]())}function O(){this.c={}}function C(e,t){this.c=e,this.f=t,this.a=s(this.c,"span",{"aria-hidden":"true"},this.f)}function I(e){l(e.c,"body",e.a)}function N(e){return"display:block;position:absolute;top:-9999px;left:-9999px;font-size:300px;width:auto;height:auto;line-height:normal;margin:0;padding:0;font-variant:normal;white-space:nowrap;font-family:"+w(e.c)+";font-style:"+x(e)+";font-weight:"+e.f+"00;"}function R(e,t,n,r,o,a){this.g=e,this.j=t,this.a=r,this.c=n,this.f=o||3e3,this.h=a||void 0}function _(e,t,n,r,o,a,i){this.v=e,this.B=t,this.c=n,this.a=r,this.s=i||"BESbswy",this.f={},this.w=o||3e3,this.u=a||null,this.m=this.j=this.h=this.g=null,this.g=new C(this.c,this.s),this.h=new C(this.c,this.s),this.j=new C(this.c,this.s),this.m=new C(this.c,this.s),e=N(e=new v(this.a.c+",serif",S(this.a))),this.g.a.style.cssText=e,e=N(e=new v(this.a.c+",sans-serif",S(this.a))),this.h.a.style.cssText=e,e=N(e=new v("serif",S(this.a))),this.j.a.style.cssText=e,e=N(e=new v("sans-serif",S(this.a))),this.m.a.style.cssText=e,I(this.g),I(this.h),I(this.j),I(this.m)}y.prototype.c=function(e){for(var t=[],n=0;n<arguments.length;n++)t.push(arguments[n].replace(/[\W_]+/g,"").toLowerCase());return t.join(this.a)},R.prototype.start=function(){var e=this.c.o.document,t=this,n=o(),r=new Promise(function(r,a){!function i(){o()-n>=t.f?a():e.fonts.load(function(e){return x(e)+" "+e.f+"00 300px "+w(e.c)}(t.a),t.h).then(function(e){1<=e.length?r():setTimeout(i,25)},function(){a()})}()}),a=null,i=new Promise(function(e,n){a=setTimeout(n,t.f)});Promise.race([i,r]).then(function(){a&&(clearTimeout(a),a=null),t.g(t.a)},function(){t.j(t.a)})};var P={D:"serif",C:"sans-serif"},L=null;function D(){if(null===L){var e=/AppleWebKit\/([0-9]+)(?:\.([0-9]+))/.exec(window.navigator.userAgent);L=!!e&&(536>parseInt(e[1],10)||536===parseInt(e[1],10)&&11>=parseInt(e[2],10))}return L}function M(e,t,n){for(var r in P)if(P.hasOwnProperty(r)&&t===e.f[P[r]]&&n===e.f[P[r]])return!0;return!1}function j(e){var t,n=e.g.a.offsetWidth,a=e.h.a.offsetWidth;(t=n===e.f.serif&&a===e.f["sans-serif"])||(t=D()&&M(e,n,a)),t?o()-e.A>=e.w?D()&&M(e,n,a)&&(null===e.u||e.u.hasOwnProperty(e.a.c))?F(e,e.v):F(e,e.B):function(e){setTimeout(r(function(){j(this)},e),50)}(e):F(e,e.v)}function F(e,t){setTimeout(r(function(){c(this.g.a),c(this.h.a),c(this.j.a),c(this.m.a),t(this.a)},e),0)}function B(e,t,n){this.c=e,this.a=t,this.f=0,this.m=this.j=!1,this.s=n}_.prototype.start=function(){this.f.serif=this.j.a.offsetWidth,this.f["sans-serif"]=this.m.a.offsetWidth,this.A=o(),j(this)};var U=null;function z(e){0==--e.f&&e.j&&(e.m?((e=e.a).g&&u(e.f,[e.a.c("wf","active")],[e.a.c("wf","loading"),e.a.c("wf","inactive")]),T(e,"active")):A(e.a))}function $(e){this.j=e,this.a=new O,this.h=0,this.f=this.g=!0}function G(e,t,n,o,a){var i=0==--e.h;(e.f||e.g)&&setTimeout(function(){var e=a||null,s=o||{};if(0===n.length&&i)A(t.a);else{t.f+=n.length,i&&(t.j=i);var l,c=[];for(l=0;l<n.length;l++){var d=n[l],p=s[d.c],f=t.a,g=d;if(f.g&&u(f.f,[f.a.c("wf",g.c,S(g).toString(),"loading")]),T(f,"fontloading",g),f=null,null===U)if(window.FontFace){g=/Gecko.*Firefox\/(\d+)/.exec(window.navigator.userAgent);var m=/OS X.*Version\/10\..*Safari/.exec(window.navigator.userAgent)&&/Apple/.exec(window.navigator.vendor);U=g?42<parseInt(g[1],10):!m}else U=!1;f=U?new R(r(t.g,t),r(t.h,t),t.c,d,t.s,p):new _(r(t.g,t),r(t.h,t),t.c,d,t.s,e,p),c.push(f)}for(l=0;l<c.length;l++)c[l].start()}},0)}function q(e,t){this.c=e,this.a=t}function H(e,t){this.c=e,this.a=t}function V(e,t){this.c=e||W,this.a=[],this.f=[],this.g=t||""}B.prototype.g=function(e){var t=this.a;t.g&&u(t.f,[t.a.c("wf",e.c,S(e).toString(),"active")],[t.a.c("wf",e.c,S(e).toString(),"loading"),t.a.c("wf",e.c,S(e).toString(),"inactive")]),T(t,"fontactive",e),this.m=!0,z(this)},B.prototype.h=function(e){var t=this.a;if(t.g){var n=d(t.f,t.a.c("wf",e.c,S(e).toString(),"active")),r=[],o=[t.a.c("wf",e.c,S(e).toString(),"loading")];n||r.push(t.a.c("wf",e.c,S(e).toString(),"inactive")),u(t.f,r,o)}T(t,"fontinactive",e),z(this)},$.prototype.load=function(e){this.c=new a(this.j,e.context||this.j),this.g=!1!==e.events,this.f=!1!==e.classes,function(e,t,n){var r=[],o=n.timeout;!function(e){e.g&&u(e.f,[e.a.c("wf","loading")]),T(e,"loading")}(t);r=function(e,t,n){var r,o=[];for(r in t)if(t.hasOwnProperty(r)){var a=e.c[r];a&&o.push(a(t[r],n))}return o}(e.a,n,e.c);var a=new B(e.c,t,o);for(e.h=r.length,t=0,n=r.length;t<n;t++)r[t].load(function(t,n,r){G(e,a,t,n,r)})}(this,new k(this.c,e),e)},q.prototype.load=function(e){function t(){if(a["__mti_fntLst"+r]){var n,o=a["__mti_fntLst"+r](),i=[];if(o)for(var s=0;s<o.length;s++){var l=o[s].fontfamily;null!=o[s].fontStyle&&null!=o[s].fontWeight?(n=o[s].fontStyle+o[s].fontWeight,i.push(new v(l,n))):i.push(new v(l))}e(i)}else setTimeout(function(){t()},50)}var n=this,r=n.a.projectId,o=n.a.version;if(r){var a=n.c.o;f(this.c,(n.a.api||"https://fast.fonts.net/jsapi")+"/"+r+".js"+(o?"?v="+o:""),function(o){o?e([]):(a["__MonotypeConfiguration__"+r]=function(){return n.a},t())}).id="__MonotypeAPIScript__"+r}else e([])},H.prototype.load=function(e){var t,n,r=this.a.urls||[],o=this.a.families||[],a=this.a.testStrings||{},i=new g;for(t=0,n=r.length;t<n;t++)p(this.c,r[t],m(i));var s=[];for(t=0,n=o.length;t<n;t++)if((r=o[t].split(":"))[1])for(var l=r[1].split(","),c=0;c<l.length;c+=1)s.push(new v(r[0],l[c]));else s.push(new v(r[0]));h(i,function(){e(s,a)})};var W="https://fonts.googleapis.com/css";function Y(e){this.f=e,this.a=[],this.c={}}var K={latin:"BESbswy","latin-ext":"çöüğş",cyrillic:"йяЖ",greek:"αβΣ",khmer:"កខគ",Hanuman:"កខគ"},X={thin:"1",extralight:"2","extra-light":"2",ultralight:"2","ultra-light":"2",light:"3",regular:"4",book:"4",medium:"5","semi-bold":"6",semibold:"6","demi-bold":"6",demibold:"6",bold:"7","extra-bold":"8",extrabold:"8","ultra-bold":"8",ultrabold:"8",black:"9",heavy:"9",l:"3",r:"4",b:"7"},Z={i:"i",italic:"i",n:"n",normal:"n"},Q=/^(thin|(?:(?:extra|ultra)-?)?light|regular|book|medium|(?:(?:semi|demi|extra|ultra)-?)?bold|black|heavy|l|r|b|[1-9]00)?(n|i|normal|italic)?$/;function J(e,t){this.c=e,this.a=t}var ee={Arimo:!0,Cousine:!0,Tinos:!0};function te(e,t){this.c=e,this.a=t}function ne(e,t){this.c=e,this.f=t,this.a=[]}J.prototype.load=function(e){var t=new g,n=this.c,r=new V(this.a.api,this.a.text),o=this.a.families;!function(e,t){for(var n=t.length,r=0;r<n;r++){var o=t[r].split(":");3==o.length&&e.f.push(o.pop());var a="";2==o.length&&""!=o[1]&&(a=":"),e.a.push(o.join(a))}}(r,o);var a=new Y(o);!function(e){for(var t=e.f.length,n=0;n<t;n++){var r=e.f[n].split(":"),o=r[0].replace(/\+/g," "),a=["n4"];if(2<=r.length){var i;if(i=[],s=r[1])for(var s,l=(s=s.split(",")).length,c=0;c<l;c++){var u;if((u=s[c]).match(/^[\w-]+$/))if(null==(d=Q.exec(u.toLowerCase())))u="";else{if(u=null==(u=d[2])||""==u?"n":Z[u],null==(d=d[1])||""==d)d="4";else var d=X[d]||(isNaN(d)?"4":d.substr(0,1));u=[u,d].join("")}else u="";u&&i.push(u)}0<i.length&&(a=i),3==r.length&&(i=[],0<(r=(r=r[2])?r.split(","):i).length&&(r=K[r[0]])&&(e.c[o]=r))}for(e.c[o]||(r=K[o])&&(e.c[o]=r),r=0;r<a.length;r+=1)e.a.push(new v(o,a[r]))}}(a),p(n,function(e){if(0==e.a.length)throw Error("No fonts to load!");if(-1!=e.c.indexOf("kit="))return e.c;for(var t=e.a.length,n=[],r=0;r<t;r++)n.push(e.a[r].replace(/ /g,"+"));return t=e.c+"?family="+n.join("%7C"),0<e.f.length&&(t+="&subset="+e.f.join(",")),0<e.g.length&&(t+="&text="+encodeURIComponent(e.g)),t}(r),m(t)),h(t,function(){e(a.a,a.c,ee)})},te.prototype.load=function(e){var t=this.a.id,n=this.c.o;t?f(this.c,(this.a.api||"https://use.typekit.net")+"/"+t+".js",function(t){if(t)e([]);else if(n.Typekit&&n.Typekit.config&&n.Typekit.config.fn){t=n.Typekit.config.fn;for(var r=[],o=0;o<t.length;o+=2)for(var a=t[o],i=t[o+1],s=0;s<i.length;s++)r.push(new v(a,i[s]));try{n.Typekit.load({events:!1,classes:!1,async:!0})}catch(e){}e(r)}},2e3):e([])},ne.prototype.load=function(e){var t=this.f.id,n=this.c.o,r=this;t?(n.__webfontfontdeckmodule__||(n.__webfontfontdeckmodule__={}),n.__webfontfontdeckmodule__[t]=function(t,n){for(var o=0,a=n.fonts.length;o<a;++o){var i=n.fonts[o];r.a.push(new v(i.name,E("font-weight:"+i.weight+";font-style:"+i.style)))}e(r.a)},f(this.c,(this.f.api||"https://f.fontdeck.com/s/css/js/")+function(e){return e.o.location.hostname||e.a.location.hostname}(this.c)+"/"+t+".js",function(t){t&&e([])})):e([])};var re=new $(window);re.a.c.custom=function(e,t){return new H(t,e)},re.a.c.fontdeck=function(e,t){return new ne(t,e)},re.a.c.monotype=function(e,t){return new q(t,e)},re.a.c.typekit=function(e,t){return new te(t,e)},re.a.c.google=function(e,t){return new J(t,e)};var oe={load:r(re.load,re)};e.exports?e.exports=oe:(window.WebFont=oe,window.WebFontConfig&&re.load(window.WebFontConfig))}()}(Yr);var Kr=Yr.exports,Xr=a({__proto__:null,default:Kr},[Kr]);function Zr(){}function Qr(){}const Jr=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,eo=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,to={};function no(e,t){return(to.jsx?eo:Jr).test(e)}const ro=/[ \t\n\f\r]/g;function oo(e){return""===e.replace(ro,"")}let ao=class{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}};function io(e,t){const n={},r={};for(const t of e)Object.assign(n,t.property),Object.assign(r,t.normal);return new ao(n,r,t)}function so(e){return e.toLowerCase()}ao.prototype.normal={},ao.prototype.property={},ao.prototype.space=void 0;let lo=class{constructor(e,t){this.attribute=t,this.property=e}};lo.prototype.attribute="",lo.prototype.booleanish=!1,lo.prototype.boolean=!1,lo.prototype.commaOrSpaceSeparated=!1,lo.prototype.commaSeparated=!1,lo.prototype.defined=!1,lo.prototype.mustUseProperty=!1,lo.prototype.number=!1,lo.prototype.overloadedBoolean=!1,lo.prototype.property="",lo.prototype.spaceSeparated=!1,lo.prototype.space=void 0;let co=0;const uo=yo(),po=yo(),fo=yo(),go=yo(),mo=yo(),ho=yo(),bo=yo();function yo(){return 2**++co}var vo=Object.freeze({__proto__:null,boolean:uo,booleanish:po,commaOrSpaceSeparated:bo,commaSeparated:ho,number:go,overloadedBoolean:fo,spaceSeparated:mo});const wo=Object.keys(vo);let So=class extends lo{constructor(e,t,n,r){let o=-1;if(super(e,t),xo(this,"space",r),"number"==typeof n)for(;++o<wo.length;){const e=wo[o];xo(this,wo[o],(n&vo[e])===vo[e])}}};function xo(e,t,n){n&&(e[t]=n)}function Eo(e){const t={},n={};for(const[r,o]of Object.entries(e.properties)){const a=new So(r,e.transform(e.attributes||{},r),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[so(r)]=r,n[so(a.attribute)]=r}return new ao(t,n,e.space)}So.prototype.defined=!0;const ko=Eo({properties:{ariaActiveDescendant:null,ariaAtomic:po,ariaAutoComplete:null,ariaBusy:po,ariaChecked:po,ariaColCount:go,ariaColIndex:go,ariaColSpan:go,ariaControls:mo,ariaCurrent:null,ariaDescribedBy:mo,ariaDetails:null,ariaDisabled:po,ariaDropEffect:mo,ariaErrorMessage:null,ariaExpanded:po,ariaFlowTo:mo,ariaGrabbed:po,ariaHasPopup:null,ariaHidden:po,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:mo,ariaLevel:go,ariaLive:null,ariaModal:po,ariaMultiLine:po,ariaMultiSelectable:po,ariaOrientation:null,ariaOwns:mo,ariaPlaceholder:null,ariaPosInSet:go,ariaPressed:po,ariaReadOnly:po,ariaRelevant:null,ariaRequired:po,ariaRoleDescription:mo,ariaRowCount:go,ariaRowIndex:go,ariaRowSpan:go,ariaSelected:po,ariaSetSize:go,ariaSort:null,ariaValueMax:go,ariaValueMin:go,ariaValueNow:go,ariaValueText:null,role:null},transform:(e,t)=>"role"===t?t:"aria-"+t.slice(4).toLowerCase()});function Ao(e,t){return t in e?e[t]:t}function To(e,t){return Ao(e,t.toLowerCase())}const Oo=Eo({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:ho,acceptCharset:mo,accessKey:mo,action:null,allow:null,allowFullScreen:uo,allowPaymentRequest:uo,allowUserMedia:uo,alt:null,as:null,async:uo,autoCapitalize:null,autoComplete:mo,autoFocus:uo,autoPlay:uo,blocking:mo,capture:null,charSet:null,checked:uo,cite:null,className:mo,cols:go,colSpan:null,content:null,contentEditable:po,controls:uo,controlsList:mo,coords:go|ho,crossOrigin:null,data:null,dateTime:null,decoding:null,default:uo,defer:uo,dir:null,dirName:null,disabled:uo,download:fo,draggable:po,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:uo,formTarget:null,headers:mo,height:go,hidden:fo,high:go,href:null,hrefLang:null,htmlFor:mo,httpEquiv:mo,id:null,imageSizes:null,imageSrcSet:null,inert:uo,inputMode:null,integrity:null,is:null,isMap:uo,itemId:null,itemProp:mo,itemRef:mo,itemScope:uo,itemType:mo,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:uo,low:go,manifest:null,max:null,maxLength:go,media:null,method:null,min:null,minLength:go,multiple:uo,muted:uo,name:null,nonce:null,noModule:uo,noValidate:uo,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:uo,optimum:go,pattern:null,ping:mo,placeholder:null,playsInline:uo,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:uo,referrerPolicy:null,rel:mo,required:uo,reversed:uo,rows:go,rowSpan:go,sandbox:mo,scope:null,scoped:uo,seamless:uo,selected:uo,shadowRootClonable:uo,shadowRootDelegatesFocus:uo,shadowRootMode:null,shape:null,size:go,sizes:null,slot:null,span:go,spellCheck:po,src:null,srcDoc:null,srcLang:null,srcSet:null,start:go,step:null,style:null,tabIndex:go,target:null,title:null,translate:null,type:null,typeMustMatch:uo,useMap:null,value:po,width:go,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:mo,axis:null,background:null,bgColor:null,border:go,borderColor:null,bottomMargin:go,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:uo,declare:uo,event:null,face:null,frame:null,frameBorder:null,hSpace:go,leftMargin:go,link:null,longDesc:null,lowSrc:null,marginHeight:go,marginWidth:go,noResize:uo,noHref:uo,noShade:uo,noWrap:uo,object:null,profile:null,prompt:null,rev:null,rightMargin:go,rules:null,scheme:null,scrolling:po,standby:null,summary:null,text:null,topMargin:go,valueType:null,version:null,vAlign:null,vLink:null,vSpace:go,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:uo,disableRemotePlayback:uo,prefix:null,property:null,results:go,security:null,unselectable:null},space:"html",transform:To}),Co=Eo({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:bo,accentHeight:go,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:go,amplitude:go,arabicForm:null,ascent:go,attributeName:null,attributeType:null,azimuth:go,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:go,by:null,calcMode:null,capHeight:go,className:mo,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:go,diffuseConstant:go,direction:null,display:null,dur:null,divisor:go,dominantBaseline:null,download:uo,dx:null,dy:null,edgeMode:null,editable:null,elevation:go,enableBackground:null,end:null,event:null,exponent:go,externalResourcesRequired:null,fill:null,fillOpacity:go,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:ho,g2:ho,glyphName:ho,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:go,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:go,horizOriginX:go,horizOriginY:go,id:null,ideographic:go,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:go,k:go,k1:go,k2:go,k3:go,k4:go,kernelMatrix:bo,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:go,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:go,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:go,overlineThickness:go,paintOrder:null,panose1:null,path:null,pathLength:go,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:mo,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:go,pointsAtY:go,pointsAtZ:go,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:bo,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:bo,rev:bo,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:bo,requiredFeatures:bo,requiredFonts:bo,requiredFormats:bo,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:go,specularExponent:go,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:go,strikethroughThickness:go,string:null,stroke:null,strokeDashArray:bo,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:go,strokeOpacity:go,strokeWidth:null,style:null,surfaceScale:go,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:bo,tabIndex:go,tableValues:null,target:null,targetX:go,targetY:go,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:bo,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:go,underlineThickness:go,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:go,values:null,vAlphabetic:go,vMathematical:go,vectorEffect:null,vHanging:go,vIdeographic:go,version:null,vertAdvY:go,vertOriginX:go,vertOriginY:go,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:go,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Ao}),Io=Eo({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform:(e,t)=>"xlink:"+t.slice(5).toLowerCase()}),No=Eo({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:To}),Ro=Eo({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform:(e,t)=>"xml:"+t.slice(3).toLowerCase()}),_o={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"},Po=/[A-Z]/g,Lo=/-[a-z]/g,Do=/^data[-\w.:]+$/i;function Mo(e){return"-"+e.toLowerCase()}function jo(e){return e.charAt(1).toUpperCase()}const Fo=io([ko,Oo,Io,No,Ro],"html"),Bo=io([ko,Co,Io,No,Ro],"svg");var Uo={},zo=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,$o=/\n/g,Go=/^\s*/,qo=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,Ho=/^:\s*/,Vo=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,Wo=/^[;\s]*/,Yo=/^\s+|\s+$/g,Ko="";function Xo(e){return e?e.replace(Yo,Ko):Ko}var Zo=function(e,t){if("string"!=typeof e)throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var n=1,r=1;function o(e){var t=e.match($o);t&&(n+=t.length);var o=e.lastIndexOf("\n");r=~o?e.length-o:r+e.length}function a(){var e={line:n,column:r};return function(t){return t.position=new i(e),c(),t}}function i(e){this.start=e,this.end={line:n,column:r},this.source=t.source}function s(o){var a=new Error(t.source+":"+n+":"+r+": "+o);if(a.reason=o,a.filename=t.source,a.line=n,a.column=r,a.source=e,!t.silent)throw a}function l(t){var n=t.exec(e);if(n){var r=n[0];return o(r),e=e.slice(r.length),n}}function c(){l(Go)}function u(e){var t;for(e=e||[];t=d();)!1!==t&&e.push(t);return e}function d(){var t=a();if("/"==e.charAt(0)&&"*"==e.charAt(1)){for(var n=2;Ko!=e.charAt(n)&&("*"!=e.charAt(n)||"/"!=e.charAt(n+1));)++n;if(n+=2,Ko===e.charAt(n-1))return s("End of comment missing");var i=e.slice(2,n-2);return r+=2,o(i),e=e.slice(n),r+=2,t({type:"comment",comment:i})}}function p(){var e=a(),t=l(qo);if(t){if(d(),!l(Ho))return s("property missing ':'");var n=l(Vo),r=e({type:"declaration",property:Xo(t[0].replace(zo,Ko)),value:n?Xo(n[0].replace(zo,Ko)):Ko});return l(Wo),r}}return i.prototype.content=e,c(),function(){var e,t=[];for(u(t);e=p();)!1!==e&&(t.push(e),u(t));return t}()},Qo=$n&&$n.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Uo,"__esModule",{value:!0}),Uo.default=function(e,t){let n=null;if(!e||"string"!=typeof e)return n;const r=(0,Jo.default)(e),o="function"==typeof t;return r.forEach(e=>{if("declaration"!==e.type)return;const{property:r,value:a}=e;o?t(r,a,e):a&&(n=n||{},n[r]=a)}),n};const Jo=Qo(Zo);var ea={};Object.defineProperty(ea,"__esModule",{value:!0}),ea.camelCase=void 0;var ta=/^--[a-zA-Z0-9_-]+$/,na=/-([a-z])/g,ra=/^[^-]+$/,oa=/^-(webkit|moz|ms|o|khtml)-/,aa=/^-(ms)-/,ia=function(e,t){return t.toUpperCase()},sa=function(e,t){return"".concat(t,"-")};ea.camelCase=function(e,t){return void 0===t&&(t={}),function(e){return!e||ra.test(e)||ta.test(e)}(e)?e:(e=e.toLowerCase(),(e=t.reactCompat?e.replace(aa,sa):e.replace(oa,sa)).replace(na,ia))};var la=($n&&$n.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(Uo),ca=ea;function ua(e,t){var n={};return e&&"string"==typeof e?((0,la.default)(e,function(e,r){e&&r&&(n[(0,ca.camelCase)(e,t)]=r)}),n):n}ua.default=ua;var da=ua;const pa=ga("end"),fa=ga("start");function ga(e){return function(t){const n=t&&t.position&&t.position[e]||{};if("number"==typeof n.line&&n.line>0&&"number"==typeof n.column&&n.column>0)return{line:n.line,column:n.column,offset:"number"==typeof n.offset&&n.offset>-1?n.offset:void 0}}}function ma(e){return e&&"object"==typeof e?"position"in e||"type"in e?ba(e.position):"start"in e||"end"in e?ba(e):"line"in e||"column"in e?ha(e):"":""}function ha(e){return ya(e&&e.line)+":"+ya(e&&e.column)}function ba(e){return ha(e&&e.start)+"-"+ha(e&&e.end)}function ya(e){return e&&"number"==typeof e?e:1}class va extends Error{constructor(e,t,n){super(),"string"==typeof t&&(n=t,t=void 0);let r="",o={},a=!1;if(t&&(o="line"in t&&"column"in t||"start"in t&&"end"in t?{place:t}:"type"in t?{ancestors:[t],place:t.position}:{...t}),"string"==typeof e?r=e:!o.cause&&e&&(a=!0,r=e.message,o.cause=e),!o.ruleId&&!o.source&&"string"==typeof n){const e=n.indexOf(":");-1===e?o.ruleId=n:(o.source=n.slice(0,e),o.ruleId=n.slice(e+1))}if(!o.place&&o.ancestors&&o.ancestors){const e=o.ancestors[o.ancestors.length-1];e&&(o.place=e.position)}const i=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=i?i.column:void 0,this.fatal=void 0,this.file="",this.message=r,this.line=i?i.line:void 0,this.name=ma(o.place)||"1:1",this.place=o.place||void 0,this.reason=this.message,this.ruleId=o.ruleId||void 0,this.source=o.source||void 0,this.stack=a&&o.cause&&"string"==typeof o.cause.stack?o.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}va.prototype.file="",va.prototype.name="",va.prototype.reason="",va.prototype.message="",va.prototype.stack="",va.prototype.column=void 0,va.prototype.line=void 0,va.prototype.ancestors=void 0,va.prototype.cause=void 0,va.prototype.fatal=void 0,va.prototype.place=void 0,va.prototype.ruleId=void 0,va.prototype.source=void 0;const wa={}.hasOwnProperty,Sa=new Map,xa=/[A-Z]/g,Ea=new Set(["table","tbody","thead","tfoot","tr"]),ka=new Set(["td","th"]),Aa="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function Ta(e,t){if(!t||void 0===t.Fragment)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if("function"!=typeof t.jsxDEV)throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=function(e,t){return n;function n(n,r,o,a){const i=Array.isArray(o.children),s=fa(n);return t(r,o,a,i,{columnNumber:s?s.column-1:void 0,fileName:e,lineNumber:s?s.line:void 0},void 0)}}(n,t.jsxDEV)}else{if("function"!=typeof t.jsx)throw new TypeError("Expected `jsx` in production options");if("function"!=typeof t.jsxs)throw new TypeError("Expected `jsxs` in production options");r=function(e,t,n){return r;function r(e,r,o,a){const i=Array.isArray(o.children)?n:t;return a?i(r,o,a):i(r,o)}}(0,t.jsx,t.jsxs)}const o={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:!1!==t.passKeys,passNode:t.passNode||!1,schema:"svg"===t.space?Bo:Fo,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:!1!==t.tableCellAlignToStyle},a=Oa(o,e,void 0);return a&&"string"!=typeof a?a:o.create(e,o.Fragment,{children:a||void 0},void 0)}function Oa(e,t,n){return"element"===t.type?function(e,t,n){const r=e.schema;let o=r;"svg"===t.tagName.toLowerCase()&&"html"===r.space&&(o=Bo,e.schema=o);e.ancestors.push(t);const a=_a(e,t.tagName,!1),i=function(e,t){const n={};let r,o;for(o in t.properties)if("children"!==o&&wa.call(t.properties,o)){const a=Ra(e,o,t.properties[o]);if(a){const[o,i]=a;e.tableCellAlignToStyle&&"align"===o&&"string"==typeof i&&ka.has(t.tagName)?r=i:n[o]=i}}if(r){(n.style||(n.style={}))["css"===e.stylePropertyNameCase?"text-align":"textAlign"]=r}return n}(e,t);let s=Na(e,t);Ea.has(t.tagName)&&(s=s.filter(function(e){return"string"!=typeof e||!("object"==typeof(t=e)?"text"===t.type&&oo(t.value):oo(t));var t}));return Ca(e,i,a,t),Ia(i,s),e.ancestors.pop(),e.schema=r,e.create(t,a,i,n)}(e,t,n):"mdxFlowExpression"===t.type||"mdxTextExpression"===t.type?function(e,t){if(t.data&&t.data.estree&&e.evaluater){const n=t.data.estree.body[0];return n.type,e.evaluater.evaluateExpression(n.expression)}Pa(e,t.position)}(e,t):"mdxJsxFlowElement"===t.type||"mdxJsxTextElement"===t.type?function(e,t,n){const r=e.schema;let o=r;"svg"===t.name&&"html"===r.space&&(o=Bo,e.schema=o);e.ancestors.push(t);const a=null===t.name?e.Fragment:_a(e,t.name,!0),i=function(e,t){const n={};for(const r of t.attributes)if("mdxJsxExpressionAttribute"===r.type)if(r.data&&r.data.estree&&e.evaluater){const t=r.data.estree.body[0];Zr(t.type);const o=t.expression;Zr(o.type);const a=o.properties[0];Zr(a.type),Object.assign(n,e.evaluater.evaluateExpression(a.argument))}else Pa(e,t.position);else{const o=r.name;let a;if(r.value&&"object"==typeof r.value)if(r.value.data&&r.value.data.estree&&e.evaluater){const t=r.value.data.estree.body[0];Zr(t.type),a=e.evaluater.evaluateExpression(t.expression)}else Pa(e,t.position);else a=null===r.value||r.value;n[o]=a}return n}(e,t),s=Na(e,t);return Ca(e,i,a,t),Ia(i,s),e.ancestors.pop(),e.schema=r,e.create(t,a,i,n)}(e,t,n):"mdxjsEsm"===t.type?function(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Pa(e,t.position)}(e,t):"root"===t.type?function(e,t,n){const r={};return Ia(r,Na(e,t)),e.create(t,e.Fragment,r,n)}(e,t,n):"text"===t.type?function(e,t){return t.value}(0,t):void 0}function Ca(e,t,n,r){"string"!=typeof n&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Ia(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function Na(e,t){const n=[];let r=-1;const o=e.passKeys?new Map:Sa;for(;++r<t.children.length;){const a=t.children[r];let i;if(e.passKeys){const e="element"===a.type?a.tagName:"mdxJsxFlowElement"===a.type||"mdxJsxTextElement"===a.type?a.name:void 0;if(e){const t=o.get(e)||0;i=e+"-"+t,o.set(e,t+1)}}const s=Oa(e,a,i);void 0!==s&&n.push(s)}return n}function Ra(e,t,n){const r=function(e,t){const n=so(t);let r=t,o=lo;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&"data"===n.slice(0,4)&&Do.test(t)){if("-"===t.charAt(4)){const e=t.slice(5).replace(Lo,jo);r="data"+e.charAt(0).toUpperCase()+e.slice(1)}else{const e=t.slice(4);if(!Lo.test(e)){let n=e.replace(Po,Mo);"-"!==n.charAt(0)&&(n="-"+n),t="data"+n}}o=So}return new o(r,t)}(e.schema,t);if(!(null==n||"number"==typeof n&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?function(e){const t={};return(""===e[e.length-1]?[...e,""]:e).join((t.padRight?" ":"")+","+(!1===t.padLeft?"":" ")).trim()}(n):n.join(" ").trim()),"style"===r.property){let t="object"==typeof n?n:function(e,t){try{return da(t,{reactCompat:!0})}catch(t){if(e.ignoreInvalidStyle)return{};const n=t,r=new va("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:n,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw r.file=e.filePath||void 0,r.url=Aa+"#cannot-parse-style-attribute",r}}(e,String(n));return"css"===e.stylePropertyNameCase&&(t=function(e){const t={};let n;for(n in e)wa.call(e,n)&&(t[La(n)]=e[n]);return t}(t)),["style",t]}return["react"===e.elementAttributeNameCase&&r.space?_o[r.property]||r.property:r.attribute,n]}}function _a(e,t,n){let r;if(n)if(t.includes(".")){const e=t.split(".");let n,o=-1;for(;++o<e.length;){const t=no(e[o])?{type:"Identifier",name:e[o]}:{type:"Literal",value:e[o]};n=n?{type:"MemberExpression",object:n,property:t,computed:Boolean(o&&"Literal"===t.type),optional:!1}:t}r=n}else r=no(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};else r={type:"Literal",value:t};if("Literal"===r.type){const t=r.value;return wa.call(e.components,t)?e.components[t]:t}if(e.evaluater)return e.evaluater.evaluateExpression(r);Pa(e)}function Pa(e,t){const n=new va("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=Aa+"#cannot-handle-mdx-estrees-without-createevaluater",n}function La(e){let t=e.replace(xa,Da);return"ms-"===t.slice(0,3)&&(t="-"+t),t}function Da(e){return"-"+e.toLowerCase()}const Ma={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"]},ja={};function Fa(e,t){return Ba(e,"boolean"!=typeof ja.includeImageAlt||ja.includeImageAlt,"boolean"!=typeof ja.includeHtml||ja.includeHtml)}function Ba(e,t,n){if(function(e){return Boolean(e&&"object"==typeof e)}(e)){if("value"in e)return"html"!==e.type||n?e.value:"";if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return Ua(e.children,t,n)}return Array.isArray(e)?Ua(e,t,n):""}function Ua(e,t,n){const r=[];let o=-1;for(;++o<e.length;)r[o]=Ba(e[o],t,n);return r.join("")}const za={AElig:"Æ",AMP:"&",Aacute:"Á",Abreve:"Ă",Acirc:"Â",Acy:"А",Afr:"𝔄",Agrave:"À",Alpha:"Α",Amacr:"Ā",And:"⩓",Aogon:"Ą",Aopf:"𝔸",ApplyFunction:"⁡",Aring:"Å",Ascr:"𝒜",Assign:"≔",Atilde:"Ã",Auml:"Ä",Backslash:"∖",Barv:"⫧",Barwed:"⌆",Bcy:"Б",Because:"∵",Bernoullis:"ℬ",Beta:"Β",Bfr:"𝔅",Bopf:"𝔹",Breve:"˘",Bscr:"ℬ",Bumpeq:"≎",CHcy:"Ч",COPY:"©",Cacute:"Ć",Cap:"⋒",CapitalDifferentialD:"ⅅ",Cayleys:"ℭ",Ccaron:"Č",Ccedil:"Ç",Ccirc:"Ĉ",Cconint:"∰",Cdot:"Ċ",Cedilla:"¸",CenterDot:"·",Cfr:"ℭ",Chi:"Χ",CircleDot:"⊙",CircleMinus:"⊖",CirclePlus:"⊕",CircleTimes:"⊗",ClockwiseContourIntegral:"∲",CloseCurlyDoubleQuote:"”",CloseCurlyQuote:"’",Colon:"∷",Colone:"⩴",Congruent:"≡",Conint:"∯",ContourIntegral:"∮",Copf:"ℂ",Coproduct:"∐",CounterClockwiseContourIntegral:"∳",Cross:"⨯",Cscr:"𝒞",Cup:"⋓",CupCap:"≍",DD:"ⅅ",DDotrahd:"⤑",DJcy:"Ђ",DScy:"Ѕ",DZcy:"Џ",Dagger:"‡",Darr:"↡",Dashv:"⫤",Dcaron:"Ď",Dcy:"Д",Del:"∇",Delta:"Δ",Dfr:"𝔇",DiacriticalAcute:"´",DiacriticalDot:"˙",DiacriticalDoubleAcute:"˝",DiacriticalGrave:"`",DiacriticalTilde:"˜",Diamond:"⋄",DifferentialD:"ⅆ",Dopf:"𝔻",Dot:"¨",DotDot:"⃜",DotEqual:"≐",DoubleContourIntegral:"∯",DoubleDot:"¨",DoubleDownArrow:"⇓",DoubleLeftArrow:"⇐",DoubleLeftRightArrow:"⇔",DoubleLeftTee:"⫤",DoubleLongLeftArrow:"⟸",DoubleLongLeftRightArrow:"⟺",DoubleLongRightArrow:"⟹",DoubleRightArrow:"⇒",DoubleRightTee:"⊨",DoubleUpArrow:"⇑",DoubleUpDownArrow:"⇕",DoubleVerticalBar:"∥",DownArrow:"↓",DownArrowBar:"⤓",DownArrowUpArrow:"⇵",DownBreve:"̑",DownLeftRightVector:"⥐",DownLeftTeeVector:"⥞",DownLeftVector:"↽",DownLeftVectorBar:"⥖",DownRightTeeVector:"⥟",DownRightVector:"⇁",DownRightVectorBar:"⥗",DownTee:"⊤",DownTeeArrow:"↧",Downarrow:"⇓",Dscr:"𝒟",Dstrok:"Đ",ENG:"Ŋ",ETH:"Ð",Eacute:"É",Ecaron:"Ě",Ecirc:"Ê",Ecy:"Э",Edot:"Ė",Efr:"𝔈",Egrave:"È",Element:"∈",Emacr:"Ē",EmptySmallSquare:"◻",EmptyVerySmallSquare:"▫",Eogon:"Ę",Eopf:"𝔼",Epsilon:"Ε",Equal:"⩵",EqualTilde:"≂",Equilibrium:"⇌",Escr:"ℰ",Esim:"⩳",Eta:"Η",Euml:"Ë",Exists:"∃",ExponentialE:"ⅇ",Fcy:"Ф",Ffr:"𝔉",FilledSmallSquare:"◼",FilledVerySmallSquare:"▪",Fopf:"𝔽",ForAll:"∀",Fouriertrf:"ℱ",Fscr:"ℱ",GJcy:"Ѓ",GT:">",Gamma:"Γ",Gammad:"Ϝ",Gbreve:"Ğ",Gcedil:"Ģ",Gcirc:"Ĝ",Gcy:"Г",Gdot:"Ġ",Gfr:"𝔊",Gg:"⋙",Gopf:"𝔾",GreaterEqual:"≥",GreaterEqualLess:"⋛",GreaterFullEqual:"≧",GreaterGreater:"⪢",GreaterLess:"≷",GreaterSlantEqual:"⩾",GreaterTilde:"≳",Gscr:"𝒢",Gt:"≫",HARDcy:"Ъ",Hacek:"ˇ",Hat:"^",Hcirc:"Ĥ",Hfr:"ℌ",HilbertSpace:"ℋ",Hopf:"ℍ",HorizontalLine:"─",Hscr:"ℋ",Hstrok:"Ħ",HumpDownHump:"≎",HumpEqual:"≏",IEcy:"Е",IJlig:"IJ",IOcy:"Ё",Iacute:"Í",Icirc:"Î",Icy:"И",Idot:"İ",Ifr:"ℑ",Igrave:"Ì",Im:"ℑ",Imacr:"Ī",ImaginaryI:"ⅈ",Implies:"⇒",Int:"∬",Integral:"∫",Intersection:"⋂",InvisibleComma:"⁣",InvisibleTimes:"⁢",Iogon:"Į",Iopf:"𝕀",Iota:"Ι",Iscr:"ℐ",Itilde:"Ĩ",Iukcy:"І",Iuml:"Ï",Jcirc:"Ĵ",Jcy:"Й",Jfr:"𝔍",Jopf:"𝕁",Jscr:"𝒥",Jsercy:"Ј",Jukcy:"Є",KHcy:"Х",KJcy:"Ќ",Kappa:"Κ",Kcedil:"Ķ",Kcy:"К",Kfr:"𝔎",Kopf:"𝕂",Kscr:"𝒦",LJcy:"Љ",LT:"<",Lacute:"Ĺ",Lambda:"Λ",Lang:"⟪",Laplacetrf:"ℒ",Larr:"↞",Lcaron:"Ľ",Lcedil:"Ļ",Lcy:"Л",LeftAngleBracket:"⟨",LeftArrow:"←",LeftArrowBar:"⇤",LeftArrowRightArrow:"⇆",LeftCeiling:"⌈",LeftDoubleBracket:"⟦",LeftDownTeeVector:"⥡",LeftDownVector:"⇃",LeftDownVectorBar:"⥙",LeftFloor:"⌊",LeftRightArrow:"↔",LeftRightVector:"⥎",LeftTee:"⊣",LeftTeeArrow:"↤",LeftTeeVector:"⥚",LeftTriangle:"⊲",LeftTriangleBar:"⧏",LeftTriangleEqual:"⊴",LeftUpDownVector:"⥑",LeftUpTeeVector:"⥠",LeftUpVector:"↿",LeftUpVectorBar:"⥘",LeftVector:"↼",LeftVectorBar:"⥒",Leftarrow:"⇐",Leftrightarrow:"⇔",LessEqualGreater:"⋚",LessFullEqual:"≦",LessGreater:"≶",LessLess:"⪡",LessSlantEqual:"⩽",LessTilde:"≲",Lfr:"𝔏",Ll:"⋘",Lleftarrow:"⇚",Lmidot:"Ŀ",LongLeftArrow:"⟵",LongLeftRightArrow:"⟷",LongRightArrow:"⟶",Longleftarrow:"⟸",Longleftrightarrow:"⟺",Longrightarrow:"⟹",Lopf:"𝕃",LowerLeftArrow:"↙",LowerRightArrow:"↘",Lscr:"ℒ",Lsh:"↰",Lstrok:"Ł",Lt:"≪",Map:"⤅",Mcy:"М",MediumSpace:" ",Mellintrf:"ℳ",Mfr:"𝔐",MinusPlus:"∓",Mopf:"𝕄",Mscr:"ℳ",Mu:"Μ",NJcy:"Њ",Nacute:"Ń",Ncaron:"Ň",Ncedil:"Ņ",Ncy:"Н",NegativeMediumSpace:"​",NegativeThickSpace:"​",NegativeThinSpace:"​",NegativeVeryThinSpace:"​",NestedGreaterGreater:"≫",NestedLessLess:"≪",NewLine:"\n",Nfr:"𝔑",NoBreak:"⁠",NonBreakingSpace:" ",Nopf:"ℕ",Not:"⫬",NotCongruent:"≢",NotCupCap:"≭",NotDoubleVerticalBar:"∦",NotElement:"∉",NotEqual:"≠",NotEqualTilde:"≂̸",NotExists:"∄",NotGreater:"≯",NotGreaterEqual:"≱",NotGreaterFullEqual:"≧̸",NotGreaterGreater:"≫̸",NotGreaterLess:"≹",NotGreaterSlantEqual:"⩾̸",NotGreaterTilde:"≵",NotHumpDownHump:"≎̸",NotHumpEqual:"≏̸",NotLeftTriangle:"⋪",NotLeftTriangleBar:"⧏̸",NotLeftTriangleEqual:"⋬",NotLess:"≮",NotLessEqual:"≰",NotLessGreater:"≸",NotLessLess:"≪̸",NotLessSlantEqual:"⩽̸",NotLessTilde:"≴",NotNestedGreaterGreater:"⪢̸",NotNestedLessLess:"⪡̸",NotPrecedes:"⊀",NotPrecedesEqual:"⪯̸",NotPrecedesSlantEqual:"⋠",NotReverseElement:"∌",NotRightTriangle:"⋫",NotRightTriangleBar:"⧐̸",NotRightTriangleEqual:"⋭",NotSquareSubset:"⊏̸",NotSquareSubsetEqual:"⋢",NotSquareSuperset:"⊐̸",NotSquareSupersetEqual:"⋣",NotSubset:"⊂⃒",NotSubsetEqual:"⊈",NotSucceeds:"⊁",NotSucceedsEqual:"⪰̸",NotSucceedsSlantEqual:"⋡",NotSucceedsTilde:"≿̸",NotSuperset:"⊃⃒",NotSupersetEqual:"⊉",NotTilde:"≁",NotTildeEqual:"≄",NotTildeFullEqual:"≇",NotTildeTilde:"≉",NotVerticalBar:"∤",Nscr:"𝒩",Ntilde:"Ñ",Nu:"Ν",OElig:"Œ",Oacute:"Ó",Ocirc:"Ô",Ocy:"О",Odblac:"Ő",Ofr:"𝔒",Ograve:"Ò",Omacr:"Ō",Omega:"Ω",Omicron:"Ο",Oopf:"𝕆",OpenCurlyDoubleQuote:"“",OpenCurlyQuote:"‘",Or:"⩔",Oscr:"𝒪",Oslash:"Ø",Otilde:"Õ",Otimes:"⨷",Ouml:"Ö",OverBar:"‾",OverBrace:"⏞",OverBracket:"⎴",OverParenthesis:"⏜",PartialD:"∂",Pcy:"П",Pfr:"𝔓",Phi:"Φ",Pi:"Π",PlusMinus:"±",Poincareplane:"ℌ",Popf:"ℙ",Pr:"⪻",Precedes:"≺",PrecedesEqual:"⪯",PrecedesSlantEqual:"≼",PrecedesTilde:"≾",Prime:"″",Product:"∏",Proportion:"∷",Proportional:"∝",Pscr:"𝒫",Psi:"Ψ",QUOT:'"',Qfr:"𝔔",Qopf:"ℚ",Qscr:"𝒬",RBarr:"⤐",REG:"®",Racute:"Ŕ",Rang:"⟫",Rarr:"↠",Rarrtl:"⤖",Rcaron:"Ř",Rcedil:"Ŗ",Rcy:"Р",Re:"ℜ",ReverseElement:"∋",ReverseEquilibrium:"⇋",ReverseUpEquilibrium:"⥯",Rfr:"ℜ",Rho:"Ρ",RightAngleBracket:"⟩",RightArrow:"→",RightArrowBar:"⇥",RightArrowLeftArrow:"⇄",RightCeiling:"⌉",RightDoubleBracket:"⟧",RightDownTeeVector:"⥝",RightDownVector:"⇂",RightDownVectorBar:"⥕",RightFloor:"⌋",RightTee:"⊢",RightTeeArrow:"↦",RightTeeVector:"⥛",RightTriangle:"⊳",RightTriangleBar:"⧐",RightTriangleEqual:"⊵",RightUpDownVector:"⥏",RightUpTeeVector:"⥜",RightUpVector:"↾",RightUpVectorBar:"⥔",RightVector:"⇀",RightVectorBar:"⥓",Rightarrow:"⇒",Ropf:"ℝ",RoundImplies:"⥰",Rrightarrow:"⇛",Rscr:"ℛ",Rsh:"↱",RuleDelayed:"⧴",SHCHcy:"Щ",SHcy:"Ш",SOFTcy:"Ь",Sacute:"Ś",Sc:"⪼",Scaron:"Š",Scedil:"Ş",Scirc:"Ŝ",Scy:"С",Sfr:"𝔖",ShortDownArrow:"↓",ShortLeftArrow:"←",ShortRightArrow:"→",ShortUpArrow:"↑",Sigma:"Σ",SmallCircle:"∘",Sopf:"𝕊",Sqrt:"√",Square:"□",SquareIntersection:"⊓",SquareSubset:"⊏",SquareSubsetEqual:"⊑",SquareSuperset:"⊐",SquareSupersetEqual:"⊒",SquareUnion:"⊔",Sscr:"𝒮",Star:"⋆",Sub:"⋐",Subset:"⋐",SubsetEqual:"⊆",Succeeds:"≻",SucceedsEqual:"⪰",SucceedsSlantEqual:"≽",SucceedsTilde:"≿",SuchThat:"∋",Sum:"∑",Sup:"⋑",Superset:"⊃",SupersetEqual:"⊇",Supset:"⋑",THORN:"Þ",TRADE:"™",TSHcy:"Ћ",TScy:"Ц",Tab:"\t",Tau:"Τ",Tcaron:"Ť",Tcedil:"Ţ",Tcy:"Т",Tfr:"𝔗",Therefore:"∴",Theta:"Θ",ThickSpace:"  ",ThinSpace:" ",Tilde:"∼",TildeEqual:"≃",TildeFullEqual:"≅",TildeTilde:"≈",Topf:"𝕋",TripleDot:"⃛",Tscr:"𝒯",Tstrok:"Ŧ",Uacute:"Ú",Uarr:"↟",Uarrocir:"⥉",Ubrcy:"Ў",Ubreve:"Ŭ",Ucirc:"Û",Ucy:"У",Udblac:"Ű",Ufr:"𝔘",Ugrave:"Ù",Umacr:"Ū",UnderBar:"_",UnderBrace:"⏟",UnderBracket:"⎵",UnderParenthesis:"⏝",Union:"⋃",UnionPlus:"⊎",Uogon:"Ų",Uopf:"𝕌",UpArrow:"↑",UpArrowBar:"⤒",UpArrowDownArrow:"⇅",UpDownArrow:"↕",UpEquilibrium:"⥮",UpTee:"⊥",UpTeeArrow:"↥",Uparrow:"⇑",Updownarrow:"⇕",UpperLeftArrow:"↖",UpperRightArrow:"↗",Upsi:"ϒ",Upsilon:"Υ",Uring:"Ů",Uscr:"𝒰",Utilde:"Ũ",Uuml:"Ü",VDash:"⊫",Vbar:"⫫",Vcy:"В",Vdash:"⊩",Vdashl:"⫦",Vee:"⋁",Verbar:"‖",Vert:"‖",VerticalBar:"∣",VerticalLine:"|",VerticalSeparator:"❘",VerticalTilde:"≀",VeryThinSpace:" ",Vfr:"𝔙",Vopf:"𝕍",Vscr:"𝒱",Vvdash:"⊪",Wcirc:"Ŵ",Wedge:"⋀",Wfr:"𝔚",Wopf:"𝕎",Wscr:"𝒲",Xfr:"𝔛",Xi:"Ξ",Xopf:"𝕏",Xscr:"𝒳",YAcy:"Я",YIcy:"Ї",YUcy:"Ю",Yacute:"Ý",Ycirc:"Ŷ",Ycy:"Ы",Yfr:"𝔜",Yopf:"𝕐",Yscr:"𝒴",Yuml:"Ÿ",ZHcy:"Ж",Zacute:"Ź",Zcaron:"Ž",Zcy:"З",Zdot:"Ż",ZeroWidthSpace:"​",Zeta:"Ζ",Zfr:"ℨ",Zopf:"ℤ",Zscr:"𝒵",aacute:"á",abreve:"ă",ac:"∾",acE:"∾̳",acd:"∿",acirc:"â",acute:"´",acy:"а",aelig:"æ",af:"⁡",afr:"𝔞",agrave:"à",alefsym:"ℵ",aleph:"ℵ",alpha:"α",amacr:"ā",amalg:"⨿",amp:"&",and:"∧",andand:"⩕",andd:"⩜",andslope:"⩘",andv:"⩚",ang:"∠",ange:"⦤",angle:"∠",angmsd:"∡",angmsdaa:"⦨",angmsdab:"⦩",angmsdac:"⦪",angmsdad:"⦫",angmsdae:"⦬",angmsdaf:"⦭",angmsdag:"⦮",angmsdah:"⦯",angrt:"∟",angrtvb:"⊾",angrtvbd:"⦝",angsph:"∢",angst:"Å",angzarr:"⍼",aogon:"ą",aopf:"𝕒",ap:"≈",apE:"⩰",apacir:"⩯",ape:"≊",apid:"≋",apos:"'",approx:"≈",approxeq:"≊",aring:"å",ascr:"𝒶",ast:"*",asymp:"≈",asympeq:"≍",atilde:"ã",auml:"ä",awconint:"∳",awint:"⨑",bNot:"⫭",backcong:"≌",backepsilon:"϶",backprime:"‵",backsim:"∽",backsimeq:"⋍",barvee:"⊽",barwed:"⌅",barwedge:"⌅",bbrk:"⎵",bbrktbrk:"⎶",bcong:"≌",bcy:"б",bdquo:"„",becaus:"∵",because:"∵",bemptyv:"⦰",bepsi:"϶",bernou:"ℬ",beta:"β",beth:"ℶ",between:"≬",bfr:"𝔟",bigcap:"⋂",bigcirc:"◯",bigcup:"⋃",bigodot:"⨀",bigoplus:"⨁",bigotimes:"⨂",bigsqcup:"⨆",bigstar:"★",bigtriangledown:"▽",bigtriangleup:"△",biguplus:"⨄",bigvee:"⋁",bigwedge:"⋀",bkarow:"⤍",blacklozenge:"⧫",blacksquare:"▪",blacktriangle:"▴",blacktriangledown:"▾",blacktriangleleft:"◂",blacktriangleright:"▸",blank:"␣",blk12:"▒",blk14:"░",blk34:"▓",block:"█",bne:"=⃥",bnequiv:"≡⃥",bnot:"⌐",bopf:"𝕓",bot:"⊥",bottom:"⊥",bowtie:"⋈",boxDL:"╗",boxDR:"╔",boxDl:"╖",boxDr:"╓",boxH:"═",boxHD:"╦",boxHU:"╩",boxHd:"╤",boxHu:"╧",boxUL:"╝",boxUR:"╚",boxUl:"╜",boxUr:"╙",boxV:"║",boxVH:"╬",boxVL:"╣",boxVR:"╠",boxVh:"╫",boxVl:"╢",boxVr:"╟",boxbox:"⧉",boxdL:"╕",boxdR:"╒",boxdl:"┐",boxdr:"┌",boxh:"─",boxhD:"╥",boxhU:"╨",boxhd:"┬",boxhu:"┴",boxminus:"⊟",boxplus:"⊞",boxtimes:"⊠",boxuL:"╛",boxuR:"╘",boxul:"┘",boxur:"└",boxv:"│",boxvH:"╪",boxvL:"╡",boxvR:"╞",boxvh:"┼",boxvl:"┤",boxvr:"├",bprime:"‵",breve:"˘",brvbar:"¦",bscr:"𝒷",bsemi:"⁏",bsim:"∽",bsime:"⋍",bsol:"\\",bsolb:"⧅",bsolhsub:"⟈",bull:"•",bullet:"•",bump:"≎",bumpE:"⪮",bumpe:"≏",bumpeq:"≏",cacute:"ć",cap:"∩",capand:"⩄",capbrcup:"⩉",capcap:"⩋",capcup:"⩇",capdot:"⩀",caps:"∩︀",caret:"⁁",caron:"ˇ",ccaps:"⩍",ccaron:"č",ccedil:"ç",ccirc:"ĉ",ccups:"⩌",ccupssm:"⩐",cdot:"ċ",cedil:"¸",cemptyv:"⦲",cent:"¢",centerdot:"·",cfr:"𝔠",chcy:"ч",check:"✓",checkmark:"✓",chi:"χ",cir:"○",cirE:"⧃",circ:"ˆ",circeq:"≗",circlearrowleft:"↺",circlearrowright:"↻",circledR:"®",circledS:"Ⓢ",circledast:"⊛",circledcirc:"⊚",circleddash:"⊝",cire:"≗",cirfnint:"⨐",cirmid:"⫯",cirscir:"⧂",clubs:"♣",clubsuit:"♣",colon:":",colone:"≔",coloneq:"≔",comma:",",commat:"@",comp:"∁",compfn:"∘",complement:"∁",complexes:"ℂ",cong:"≅",congdot:"⩭",conint:"∮",copf:"𝕔",coprod:"∐",copy:"©",copysr:"℗",crarr:"↵",cross:"✗",cscr:"𝒸",csub:"⫏",csube:"⫑",csup:"⫐",csupe:"⫒",ctdot:"⋯",cudarrl:"⤸",cudarrr:"⤵",cuepr:"⋞",cuesc:"⋟",cularr:"↶",cularrp:"⤽",cup:"∪",cupbrcap:"⩈",cupcap:"⩆",cupcup:"⩊",cupdot:"⊍",cupor:"⩅",cups:"∪︀",curarr:"↷",curarrm:"⤼",curlyeqprec:"⋞",curlyeqsucc:"⋟",curlyvee:"⋎",curlywedge:"⋏",curren:"¤",curvearrowleft:"↶",curvearrowright:"↷",cuvee:"⋎",cuwed:"⋏",cwconint:"∲",cwint:"∱",cylcty:"⌭",dArr:"⇓",dHar:"⥥",dagger:"†",daleth:"ℸ",darr:"↓",dash:"‐",dashv:"⊣",dbkarow:"⤏",dblac:"˝",dcaron:"ď",dcy:"д",dd:"ⅆ",ddagger:"‡",ddarr:"⇊",ddotseq:"⩷",deg:"°",delta:"δ",demptyv:"⦱",dfisht:"⥿",dfr:"𝔡",dharl:"⇃",dharr:"⇂",diam:"⋄",diamond:"⋄",diamondsuit:"♦",diams:"♦",die:"¨",digamma:"ϝ",disin:"⋲",div:"÷",divide:"÷",divideontimes:"⋇",divonx:"⋇",djcy:"ђ",dlcorn:"⌞",dlcrop:"⌍",dollar:"$",dopf:"𝕕",dot:"˙",doteq:"≐",doteqdot:"≑",dotminus:"∸",dotplus:"∔",dotsquare:"⊡",doublebarwedge:"⌆",downarrow:"↓",downdownarrows:"⇊",downharpoonleft:"⇃",downharpoonright:"⇂",drbkarow:"⤐",drcorn:"⌟",drcrop:"⌌",dscr:"𝒹",dscy:"ѕ",dsol:"⧶",dstrok:"đ",dtdot:"⋱",dtri:"▿",dtrif:"▾",duarr:"⇵",duhar:"⥯",dwangle:"⦦",dzcy:"џ",dzigrarr:"⟿",eDDot:"⩷",eDot:"≑",eacute:"é",easter:"⩮",ecaron:"ě",ecir:"≖",ecirc:"ê",ecolon:"≕",ecy:"э",edot:"ė",ee:"ⅇ",efDot:"≒",efr:"𝔢",eg:"⪚",egrave:"è",egs:"⪖",egsdot:"⪘",el:"⪙",elinters:"⏧",ell:"ℓ",els:"⪕",elsdot:"⪗",emacr:"ē",empty:"∅",emptyset:"∅",emptyv:"∅",emsp13:" ",emsp14:" ",emsp:" ",eng:"ŋ",ensp:" ",eogon:"ę",eopf:"𝕖",epar:"⋕",eparsl:"⧣",eplus:"⩱",epsi:"ε",epsilon:"ε",epsiv:"ϵ",eqcirc:"≖",eqcolon:"≕",eqsim:"≂",eqslantgtr:"⪖",eqslantless:"⪕",equals:"=",equest:"≟",equiv:"≡",equivDD:"⩸",eqvparsl:"⧥",erDot:"≓",erarr:"⥱",escr:"ℯ",esdot:"≐",esim:"≂",eta:"η",eth:"ð",euml:"ë",euro:"€",excl:"!",exist:"∃",expectation:"ℰ",exponentiale:"ⅇ",fallingdotseq:"≒",fcy:"ф",female:"♀",ffilig:"ffi",fflig:"ff",ffllig:"ffl",ffr:"𝔣",filig:"fi",fjlig:"fj",flat:"♭",fllig:"fl",fltns:"▱",fnof:"ƒ",fopf:"𝕗",forall:"∀",fork:"⋔",forkv:"⫙",fpartint:"⨍",frac12:"½",frac13:"⅓",frac14:"¼",frac15:"⅕",frac16:"⅙",frac18:"⅛",frac23:"⅔",frac25:"⅖",frac34:"¾",frac35:"⅗",frac38:"⅜",frac45:"⅘",frac56:"⅚",frac58:"⅝",frac78:"⅞",frasl:"⁄",frown:"⌢",fscr:"𝒻",gE:"≧",gEl:"⪌",gacute:"ǵ",gamma:"γ",gammad:"ϝ",gap:"⪆",gbreve:"ğ",gcirc:"ĝ",gcy:"г",gdot:"ġ",ge:"≥",gel:"⋛",geq:"≥",geqq:"≧",geqslant:"⩾",ges:"⩾",gescc:"⪩",gesdot:"⪀",gesdoto:"⪂",gesdotol:"⪄",gesl:"⋛︀",gesles:"⪔",gfr:"𝔤",gg:"≫",ggg:"⋙",gimel:"ℷ",gjcy:"ѓ",gl:"≷",glE:"⪒",gla:"⪥",glj:"⪤",gnE:"≩",gnap:"⪊",gnapprox:"⪊",gne:"⪈",gneq:"⪈",gneqq:"≩",gnsim:"⋧",gopf:"𝕘",grave:"`",gscr:"ℊ",gsim:"≳",gsime:"⪎",gsiml:"⪐",gt:">",gtcc:"⪧",gtcir:"⩺",gtdot:"⋗",gtlPar:"⦕",gtquest:"⩼",gtrapprox:"⪆",gtrarr:"⥸",gtrdot:"⋗",gtreqless:"⋛",gtreqqless:"⪌",gtrless:"≷",gtrsim:"≳",gvertneqq:"≩︀",gvnE:"≩︀",hArr:"⇔",hairsp:" ",half:"½",hamilt:"ℋ",hardcy:"ъ",harr:"↔",harrcir:"⥈",harrw:"↭",hbar:"ℏ",hcirc:"ĥ",hearts:"♥",heartsuit:"♥",hellip:"…",hercon:"⊹",hfr:"𝔥",hksearow:"⤥",hkswarow:"⤦",hoarr:"⇿",homtht:"∻",hookleftarrow:"↩",hookrightarrow:"↪",hopf:"𝕙",horbar:"―",hscr:"𝒽",hslash:"ℏ",hstrok:"ħ",hybull:"⁃",hyphen:"‐",iacute:"í",ic:"⁣",icirc:"î",icy:"и",iecy:"е",iexcl:"¡",iff:"⇔",ifr:"𝔦",igrave:"ì",ii:"ⅈ",iiiint:"⨌",iiint:"∭",iinfin:"⧜",iiota:"℩",ijlig:"ij",imacr:"ī",image:"ℑ",imagline:"ℐ",imagpart:"ℑ",imath:"ı",imof:"⊷",imped:"Ƶ",in:"∈",incare:"℅",infin:"∞",infintie:"⧝",inodot:"ı",int:"∫",intcal:"⊺",integers:"ℤ",intercal:"⊺",intlarhk:"⨗",intprod:"⨼",iocy:"ё",iogon:"į",iopf:"𝕚",iota:"ι",iprod:"⨼",iquest:"¿",iscr:"𝒾",isin:"∈",isinE:"⋹",isindot:"⋵",isins:"⋴",isinsv:"⋳",isinv:"∈",it:"⁢",itilde:"ĩ",iukcy:"і",iuml:"ï",jcirc:"ĵ",jcy:"й",jfr:"𝔧",jmath:"ȷ",jopf:"𝕛",jscr:"𝒿",jsercy:"ј",jukcy:"є",kappa:"κ",kappav:"ϰ",kcedil:"ķ",kcy:"к",kfr:"𝔨",kgreen:"ĸ",khcy:"х",kjcy:"ќ",kopf:"𝕜",kscr:"𝓀",lAarr:"⇚",lArr:"⇐",lAtail:"⤛",lBarr:"⤎",lE:"≦",lEg:"⪋",lHar:"⥢",lacute:"ĺ",laemptyv:"⦴",lagran:"ℒ",lambda:"λ",lang:"⟨",langd:"⦑",langle:"⟨",lap:"⪅",laquo:"«",larr:"←",larrb:"⇤",larrbfs:"⤟",larrfs:"⤝",larrhk:"↩",larrlp:"↫",larrpl:"⤹",larrsim:"⥳",larrtl:"↢",lat:"⪫",latail:"⤙",late:"⪭",lates:"⪭︀",lbarr:"⤌",lbbrk:"❲",lbrace:"{",lbrack:"[",lbrke:"⦋",lbrksld:"⦏",lbrkslu:"⦍",lcaron:"ľ",lcedil:"ļ",lceil:"⌈",lcub:"{",lcy:"л",ldca:"⤶",ldquo:"“",ldquor:"„",ldrdhar:"⥧",ldrushar:"⥋",ldsh:"↲",le:"≤",leftarrow:"←",leftarrowtail:"↢",leftharpoondown:"↽",leftharpoonup:"↼",leftleftarrows:"⇇",leftrightarrow:"↔",leftrightarrows:"⇆",leftrightharpoons:"⇋",leftrightsquigarrow:"↭",leftthreetimes:"⋋",leg:"⋚",leq:"≤",leqq:"≦",leqslant:"⩽",les:"⩽",lescc:"⪨",lesdot:"⩿",lesdoto:"⪁",lesdotor:"⪃",lesg:"⋚︀",lesges:"⪓",lessapprox:"⪅",lessdot:"⋖",lesseqgtr:"⋚",lesseqqgtr:"⪋",lessgtr:"≶",lesssim:"≲",lfisht:"⥼",lfloor:"⌊",lfr:"𝔩",lg:"≶",lgE:"⪑",lhard:"↽",lharu:"↼",lharul:"⥪",lhblk:"▄",ljcy:"љ",ll:"≪",llarr:"⇇",llcorner:"⌞",llhard:"⥫",lltri:"◺",lmidot:"ŀ",lmoust:"⎰",lmoustache:"⎰",lnE:"≨",lnap:"⪉",lnapprox:"⪉",lne:"⪇",lneq:"⪇",lneqq:"≨",lnsim:"⋦",loang:"⟬",loarr:"⇽",lobrk:"⟦",longleftarrow:"⟵",longleftrightarrow:"⟷",longmapsto:"⟼",longrightarrow:"⟶",looparrowleft:"↫",looparrowright:"↬",lopar:"⦅",lopf:"𝕝",loplus:"⨭",lotimes:"⨴",lowast:"∗",lowbar:"_",loz:"◊",lozenge:"◊",lozf:"⧫",lpar:"(",lparlt:"⦓",lrarr:"⇆",lrcorner:"⌟",lrhar:"⇋",lrhard:"⥭",lrm:"‎",lrtri:"⊿",lsaquo:"‹",lscr:"𝓁",lsh:"↰",lsim:"≲",lsime:"⪍",lsimg:"⪏",lsqb:"[",lsquo:"‘",lsquor:"‚",lstrok:"ł",lt:"<",ltcc:"⪦",ltcir:"⩹",ltdot:"⋖",lthree:"⋋",ltimes:"⋉",ltlarr:"⥶",ltquest:"⩻",ltrPar:"⦖",ltri:"◃",ltrie:"⊴",ltrif:"◂",lurdshar:"⥊",luruhar:"⥦",lvertneqq:"≨︀",lvnE:"≨︀",mDDot:"∺",macr:"¯",male:"♂",malt:"✠",maltese:"✠",map:"↦",mapsto:"↦",mapstodown:"↧",mapstoleft:"↤",mapstoup:"↥",marker:"▮",mcomma:"⨩",mcy:"м",mdash:"—",measuredangle:"∡",mfr:"𝔪",mho:"℧",micro:"µ",mid:"∣",midast:"*",midcir:"⫰",middot:"·",minus:"−",minusb:"⊟",minusd:"∸",minusdu:"⨪",mlcp:"⫛",mldr:"…",mnplus:"∓",models:"⊧",mopf:"𝕞",mp:"∓",mscr:"𝓂",mstpos:"∾",mu:"μ",multimap:"⊸",mumap:"⊸",nGg:"⋙̸",nGt:"≫⃒",nGtv:"≫̸",nLeftarrow:"⇍",nLeftrightarrow:"⇎",nLl:"⋘̸",nLt:"≪⃒",nLtv:"≪̸",nRightarrow:"⇏",nVDash:"⊯",nVdash:"⊮",nabla:"∇",nacute:"ń",nang:"∠⃒",nap:"≉",napE:"⩰̸",napid:"≋̸",napos:"ʼn",napprox:"≉",natur:"♮",natural:"♮",naturals:"ℕ",nbsp:" ",nbump:"≎̸",nbumpe:"≏̸",ncap:"⩃",ncaron:"ň",ncedil:"ņ",ncong:"≇",ncongdot:"⩭̸",ncup:"⩂",ncy:"н",ndash:"–",ne:"≠",neArr:"⇗",nearhk:"⤤",nearr:"↗",nearrow:"↗",nedot:"≐̸",nequiv:"≢",nesear:"⤨",nesim:"≂̸",nexist:"∄",nexists:"∄",nfr:"𝔫",ngE:"≧̸",nge:"≱",ngeq:"≱",ngeqq:"≧̸",ngeqslant:"⩾̸",nges:"⩾̸",ngsim:"≵",ngt:"≯",ngtr:"≯",nhArr:"⇎",nharr:"↮",nhpar:"⫲",ni:"∋",nis:"⋼",nisd:"⋺",niv:"∋",njcy:"њ",nlArr:"⇍",nlE:"≦̸",nlarr:"↚",nldr:"‥",nle:"≰",nleftarrow:"↚",nleftrightarrow:"↮",nleq:"≰",nleqq:"≦̸",nleqslant:"⩽̸",nles:"⩽̸",nless:"≮",nlsim:"≴",nlt:"≮",nltri:"⋪",nltrie:"⋬",nmid:"∤",nopf:"𝕟",not:"¬",notin:"∉",notinE:"⋹̸",notindot:"⋵̸",notinva:"∉",notinvb:"⋷",notinvc:"⋶",notni:"∌",notniva:"∌",notnivb:"⋾",notnivc:"⋽",npar:"∦",nparallel:"∦",nparsl:"⫽⃥",npart:"∂̸",npolint:"⨔",npr:"⊀",nprcue:"⋠",npre:"⪯̸",nprec:"⊀",npreceq:"⪯̸",nrArr:"⇏",nrarr:"↛",nrarrc:"⤳̸",nrarrw:"↝̸",nrightarrow:"↛",nrtri:"⋫",nrtrie:"⋭",nsc:"⊁",nsccue:"⋡",nsce:"⪰̸",nscr:"𝓃",nshortmid:"∤",nshortparallel:"∦",nsim:"≁",nsime:"≄",nsimeq:"≄",nsmid:"∤",nspar:"∦",nsqsube:"⋢",nsqsupe:"⋣",nsub:"⊄",nsubE:"⫅̸",nsube:"⊈",nsubset:"⊂⃒",nsubseteq:"⊈",nsubseteqq:"⫅̸",nsucc:"⊁",nsucceq:"⪰̸",nsup:"⊅",nsupE:"⫆̸",nsupe:"⊉",nsupset:"⊃⃒",nsupseteq:"⊉",nsupseteqq:"⫆̸",ntgl:"≹",ntilde:"ñ",ntlg:"≸",ntriangleleft:"⋪",ntrianglelefteq:"⋬",ntriangleright:"⋫",ntrianglerighteq:"⋭",nu:"ν",num:"#",numero:"№",numsp:" ",nvDash:"⊭",nvHarr:"⤄",nvap:"≍⃒",nvdash:"⊬",nvge:"≥⃒",nvgt:">⃒",nvinfin:"⧞",nvlArr:"⤂",nvle:"≤⃒",nvlt:"<⃒",nvltrie:"⊴⃒",nvrArr:"⤃",nvrtrie:"⊵⃒",nvsim:"∼⃒",nwArr:"⇖",nwarhk:"⤣",nwarr:"↖",nwarrow:"↖",nwnear:"⤧",oS:"Ⓢ",oacute:"ó",oast:"⊛",ocir:"⊚",ocirc:"ô",ocy:"о",odash:"⊝",odblac:"ő",odiv:"⨸",odot:"⊙",odsold:"⦼",oelig:"œ",ofcir:"⦿",ofr:"𝔬",ogon:"˛",ograve:"ò",ogt:"⧁",ohbar:"⦵",ohm:"Ω",oint:"∮",olarr:"↺",olcir:"⦾",olcross:"⦻",oline:"‾",olt:"⧀",omacr:"ō",omega:"ω",omicron:"ο",omid:"⦶",ominus:"⊖",oopf:"𝕠",opar:"⦷",operp:"⦹",oplus:"⊕",or:"∨",orarr:"↻",ord:"⩝",order:"ℴ",orderof:"ℴ",ordf:"ª",ordm:"º",origof:"⊶",oror:"⩖",orslope:"⩗",orv:"⩛",oscr:"ℴ",oslash:"ø",osol:"⊘",otilde:"õ",otimes:"⊗",otimesas:"⨶",ouml:"ö",ovbar:"⌽",par:"∥",para:"¶",parallel:"∥",parsim:"⫳",parsl:"⫽",part:"∂",pcy:"п",percnt:"%",period:".",permil:"‰",perp:"⊥",pertenk:"‱",pfr:"𝔭",phi:"φ",phiv:"ϕ",phmmat:"ℳ",phone:"☎",pi:"π",pitchfork:"⋔",piv:"ϖ",planck:"ℏ",planckh:"ℎ",plankv:"ℏ",plus:"+",plusacir:"⨣",plusb:"⊞",pluscir:"⨢",plusdo:"∔",plusdu:"⨥",pluse:"⩲",plusmn:"±",plussim:"⨦",plustwo:"⨧",pm:"±",pointint:"⨕",popf:"𝕡",pound:"£",pr:"≺",prE:"⪳",prap:"⪷",prcue:"≼",pre:"⪯",prec:"≺",precapprox:"⪷",preccurlyeq:"≼",preceq:"⪯",precnapprox:"⪹",precneqq:"⪵",precnsim:"⋨",precsim:"≾",prime:"′",primes:"ℙ",prnE:"⪵",prnap:"⪹",prnsim:"⋨",prod:"∏",profalar:"⌮",profline:"⌒",profsurf:"⌓",prop:"∝",propto:"∝",prsim:"≾",prurel:"⊰",pscr:"𝓅",psi:"ψ",puncsp:" ",qfr:"𝔮",qint:"⨌",qopf:"𝕢",qprime:"⁗",qscr:"𝓆",quaternions:"ℍ",quatint:"⨖",quest:"?",questeq:"≟",quot:'"',rAarr:"⇛",rArr:"⇒",rAtail:"⤜",rBarr:"⤏",rHar:"⥤",race:"∽̱",racute:"ŕ",radic:"√",raemptyv:"⦳",rang:"⟩",rangd:"⦒",range:"⦥",rangle:"⟩",raquo:"»",rarr:"→",rarrap:"⥵",rarrb:"⇥",rarrbfs:"⤠",rarrc:"⤳",rarrfs:"⤞",rarrhk:"↪",rarrlp:"↬",rarrpl:"⥅",rarrsim:"⥴",rarrtl:"↣",rarrw:"↝",ratail:"⤚",ratio:"∶",rationals:"ℚ",rbarr:"⤍",rbbrk:"❳",rbrace:"}",rbrack:"]",rbrke:"⦌",rbrksld:"⦎",rbrkslu:"⦐",rcaron:"ř",rcedil:"ŗ",rceil:"⌉",rcub:"}",rcy:"р",rdca:"⤷",rdldhar:"⥩",rdquo:"”",rdquor:"”",rdsh:"↳",real:"ℜ",realine:"ℛ",realpart:"ℜ",reals:"ℝ",rect:"▭",reg:"®",rfisht:"⥽",rfloor:"⌋",rfr:"𝔯",rhard:"⇁",rharu:"⇀",rharul:"⥬",rho:"ρ",rhov:"ϱ",rightarrow:"→",rightarrowtail:"↣",rightharpoondown:"⇁",rightharpoonup:"⇀",rightleftarrows:"⇄",rightleftharpoons:"⇌",rightrightarrows:"⇉",rightsquigarrow:"↝",rightthreetimes:"⋌",ring:"˚",risingdotseq:"≓",rlarr:"⇄",rlhar:"⇌",rlm:"‏",rmoust:"⎱",rmoustache:"⎱",rnmid:"⫮",roang:"⟭",roarr:"⇾",robrk:"⟧",ropar:"⦆",ropf:"𝕣",roplus:"⨮",rotimes:"⨵",rpar:")",rpargt:"⦔",rppolint:"⨒",rrarr:"⇉",rsaquo:"›",rscr:"𝓇",rsh:"↱",rsqb:"]",rsquo:"’",rsquor:"’",rthree:"⋌",rtimes:"⋊",rtri:"▹",rtrie:"⊵",rtrif:"▸",rtriltri:"⧎",ruluhar:"⥨",rx:"℞",sacute:"ś",sbquo:"‚",sc:"≻",scE:"⪴",scap:"⪸",scaron:"š",sccue:"≽",sce:"⪰",scedil:"ş",scirc:"ŝ",scnE:"⪶",scnap:"⪺",scnsim:"⋩",scpolint:"⨓",scsim:"≿",scy:"с",sdot:"⋅",sdotb:"⊡",sdote:"⩦",seArr:"⇘",searhk:"⤥",searr:"↘",searrow:"↘",sect:"§",semi:";",seswar:"⤩",setminus:"∖",setmn:"∖",sext:"✶",sfr:"𝔰",sfrown:"⌢",sharp:"♯",shchcy:"щ",shcy:"ш",shortmid:"∣",shortparallel:"∥",shy:"­",sigma:"σ",sigmaf:"ς",sigmav:"ς",sim:"∼",simdot:"⩪",sime:"≃",simeq:"≃",simg:"⪞",simgE:"⪠",siml:"⪝",simlE:"⪟",simne:"≆",simplus:"⨤",simrarr:"⥲",slarr:"←",smallsetminus:"∖",smashp:"⨳",smeparsl:"⧤",smid:"∣",smile:"⌣",smt:"⪪",smte:"⪬",smtes:"⪬︀",softcy:"ь",sol:"/",solb:"⧄",solbar:"⌿",sopf:"𝕤",spades:"♠",spadesuit:"♠",spar:"∥",sqcap:"⊓",sqcaps:"⊓︀",sqcup:"⊔",sqcups:"⊔︀",sqsub:"⊏",sqsube:"⊑",sqsubset:"⊏",sqsubseteq:"⊑",sqsup:"⊐",sqsupe:"⊒",sqsupset:"⊐",sqsupseteq:"⊒",squ:"□",square:"□",squarf:"▪",squf:"▪",srarr:"→",sscr:"𝓈",ssetmn:"∖",ssmile:"⌣",sstarf:"⋆",star:"☆",starf:"★",straightepsilon:"ϵ",straightphi:"ϕ",strns:"¯",sub:"⊂",subE:"⫅",subdot:"⪽",sube:"⊆",subedot:"⫃",submult:"⫁",subnE:"⫋",subne:"⊊",subplus:"⪿",subrarr:"⥹",subset:"⊂",subseteq:"⊆",subseteqq:"⫅",subsetneq:"⊊",subsetneqq:"⫋",subsim:"⫇",subsub:"⫕",subsup:"⫓",succ:"≻",succapprox:"⪸",succcurlyeq:"≽",succeq:"⪰",succnapprox:"⪺",succneqq:"⪶",succnsim:"⋩",succsim:"≿",sum:"∑",sung:"♪",sup1:"¹",sup2:"²",sup3:"³",sup:"⊃",supE:"⫆",supdot:"⪾",supdsub:"⫘",supe:"⊇",supedot:"⫄",suphsol:"⟉",suphsub:"⫗",suplarr:"⥻",supmult:"⫂",supnE:"⫌",supne:"⊋",supplus:"⫀",supset:"⊃",supseteq:"⊇",supseteqq:"⫆",supsetneq:"⊋",supsetneqq:"⫌",supsim:"⫈",supsub:"⫔",supsup:"⫖",swArr:"⇙",swarhk:"⤦",swarr:"↙",swarrow:"↙",swnwar:"⤪",szlig:"ß",target:"⌖",tau:"τ",tbrk:"⎴",tcaron:"ť",tcedil:"ţ",tcy:"т",tdot:"⃛",telrec:"⌕",tfr:"𝔱",there4:"∴",therefore:"∴",theta:"θ",thetasym:"ϑ",thetav:"ϑ",thickapprox:"≈",thicksim:"∼",thinsp:" ",thkap:"≈",thksim:"∼",thorn:"þ",tilde:"˜",times:"×",timesb:"⊠",timesbar:"⨱",timesd:"⨰",tint:"∭",toea:"⤨",top:"⊤",topbot:"⌶",topcir:"⫱",topf:"𝕥",topfork:"⫚",tosa:"⤩",tprime:"‴",trade:"™",triangle:"▵",triangledown:"▿",triangleleft:"◃",trianglelefteq:"⊴",triangleq:"≜",triangleright:"▹",trianglerighteq:"⊵",tridot:"◬",trie:"≜",triminus:"⨺",triplus:"⨹",trisb:"⧍",tritime:"⨻",trpezium:"⏢",tscr:"𝓉",tscy:"ц",tshcy:"ћ",tstrok:"ŧ",twixt:"≬",twoheadleftarrow:"↞",twoheadrightarrow:"↠",uArr:"⇑",uHar:"⥣",uacute:"ú",uarr:"↑",ubrcy:"ў",ubreve:"ŭ",ucirc:"û",ucy:"у",udarr:"⇅",udblac:"ű",udhar:"⥮",ufisht:"⥾",ufr:"𝔲",ugrave:"ù",uharl:"↿",uharr:"↾",uhblk:"▀",ulcorn:"⌜",ulcorner:"⌜",ulcrop:"⌏",ultri:"◸",umacr:"ū",uml:"¨",uogon:"ų",uopf:"𝕦",uparrow:"↑",updownarrow:"↕",upharpoonleft:"↿",upharpoonright:"↾",uplus:"⊎",upsi:"υ",upsih:"ϒ",upsilon:"υ",upuparrows:"⇈",urcorn:"⌝",urcorner:"⌝",urcrop:"⌎",uring:"ů",urtri:"◹",uscr:"𝓊",utdot:"⋰",utilde:"ũ",utri:"▵",utrif:"▴",uuarr:"⇈",uuml:"ü",uwangle:"⦧",vArr:"⇕",vBar:"⫨",vBarv:"⫩",vDash:"⊨",vangrt:"⦜",varepsilon:"ϵ",varkappa:"ϰ",varnothing:"∅",varphi:"ϕ",varpi:"ϖ",varpropto:"∝",varr:"↕",varrho:"ϱ",varsigma:"ς",varsubsetneq:"⊊︀",varsubsetneqq:"⫋︀",varsupsetneq:"⊋︀",varsupsetneqq:"⫌︀",vartheta:"ϑ",vartriangleleft:"⊲",vartriangleright:"⊳",vcy:"в",vdash:"⊢",vee:"∨",veebar:"⊻",veeeq:"≚",vellip:"⋮",verbar:"|",vert:"|",vfr:"𝔳",vltri:"⊲",vnsub:"⊂⃒",vnsup:"⊃⃒",vopf:"𝕧",vprop:"∝",vrtri:"⊳",vscr:"𝓋",vsubnE:"⫋︀",vsubne:"⊊︀",vsupnE:"⫌︀",vsupne:"⊋︀",vzigzag:"⦚",wcirc:"ŵ",wedbar:"⩟",wedge:"∧",wedgeq:"≙",weierp:"℘",wfr:"𝔴",wopf:"𝕨",wp:"℘",wr:"≀",wreath:"≀",wscr:"𝓌",xcap:"⋂",xcirc:"◯",xcup:"⋃",xdtri:"▽",xfr:"𝔵",xhArr:"⟺",xharr:"⟷",xi:"ξ",xlArr:"⟸",xlarr:"⟵",xmap:"⟼",xnis:"⋻",xodot:"⨀",xopf:"𝕩",xoplus:"⨁",xotime:"⨂",xrArr:"⟹",xrarr:"⟶",xscr:"𝓍",xsqcup:"⨆",xuplus:"⨄",xutri:"△",xvee:"⋁",xwedge:"⋀",yacute:"ý",yacy:"я",ycirc:"ŷ",ycy:"ы",yen:"¥",yfr:"𝔶",yicy:"ї",yopf:"𝕪",yscr:"𝓎",yucy:"ю",yuml:"ÿ",zacute:"ź",zcaron:"ž",zcy:"з",zdot:"ż",zeetrf:"ℨ",zeta:"ζ",zfr:"𝔷",zhcy:"ж",zigrarr:"⇝",zopf:"𝕫",zscr:"𝓏",zwj:"‍",zwnj:"‌"},$a={}.hasOwnProperty;function Ga(e){return!!$a.call(za,e)&&za[e]}function qa(e,t,n,r){const o=e.length;let a,i=0;if(t=t<0?-t>o?0:o+t:t>o?o:t,n=n>0?n:0,r.length<1e4)a=Array.from(r),a.unshift(t,n),e.splice(...a);else for(n&&e.splice(t,n);i<r.length;)a=r.slice(i,i+1e4),a.unshift(t,0),e.splice(...a),i+=1e4,t+=1e4}function Ha(e,t){return e.length>0?(qa(e,e.length,0,t),e):t}const Va={}.hasOwnProperty;function Wa(e){const t={};let n=-1;for(;++n<e.length;)Ya(t,e[n]);return t}function Ya(e,t){let n;for(n in t){const r=(Va.call(e,n)?e[n]:void 0)||(e[n]={}),o=t[n];let a;if(o)for(a in o){Va.call(r,a)||(r[a]=[]);const e=o[a];Ka(r[a],Array.isArray(e)?e:e?[e]:[])}}}function Ka(e,t){let n=-1;const r=[];for(;++n<t.length;)("after"===t[n].add?e:r).push(t[n]);qa(e,0,0,r)}function Xa(e,t){const n=Number.parseInt(e,t);return n<9||11===n||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||!(65535&~n)||65534==(65535&n)||n>1114111?"�":String.fromCodePoint(n)}function Za(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Qa=ui(/[A-Za-z]/),Ja=ui(/[\dA-Za-z]/),ei=ui(/[#-'*+\--9=?A-Z^-~]/);function ti(e){return null!==e&&(e<32||127===e)}const ni=ui(/\d/),ri=ui(/[\dA-Fa-f]/),oi=ui(/[!-/:-@[-`{-~]/);function ai(e){return null!==e&&e<-2}function ii(e){return null!==e&&(e<0||32===e)}function si(e){return-2===e||-1===e||32===e}const li=ui(/\p{P}|\p{S}/u),ci=ui(/\s/);function ui(e){return function(t){return null!==t&&t>-1&&e.test(String.fromCharCode(t))}}function di(e){const t=[];let n=-1,r=0,o=0;for(;++n<e.length;){const a=e.charCodeAt(n);let i="";if(37===a&&Ja(e.charCodeAt(n+1))&&Ja(e.charCodeAt(n+2)))o=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(i=String.fromCharCode(a));else if(a>55295&&a<57344){const t=e.charCodeAt(n+1);a<56320&&t>56319&&t<57344?(i=String.fromCharCode(a,t),o=1):i="�"}else i=String.fromCharCode(a);i&&(t.push(e.slice(r,n),encodeURIComponent(i)),r=n+o+1,i=""),o&&(n+=o,o=0)}return t.join("")+e.slice(r)}function pi(e,t,n,r){const o=r?r-1:Number.POSITIVE_INFINITY;let a=0;return function(r){if(si(r))return e.enter(n),i(r);return t(r)};function i(r){return si(r)&&a++<o?(e.consume(r),i):(e.exit(n),t(r))}}const fi={tokenize:function(e){const t=e.attempt(this.parser.constructs.contentInitial,function(n){if(null===n)return void e.consume(n);return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),pi(e,t,"linePrefix")},function(t){return e.enter("paragraph"),r(t)});let n;return t;function r(t){const r=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=r),n=r,o(t)}function o(t){return null===t?(e.exit("chunkText"),e.exit("paragraph"),void e.consume(t)):ai(t)?(e.consume(t),e.exit("chunkText"),r):(e.consume(t),o)}}};const gi={tokenize:function(e){const t=this,n=[];let r,o,a,i=0;return s;function s(r){if(i<n.length){const o=n[i];return t.containerState=o[1],e.attempt(o[0].continuation,l,c)(r)}return c(r)}function l(e){if(i++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,r&&y();const n=t.events.length;let o,a=n;for(;a--;)if("exit"===t.events[a][0]&&"chunkFlow"===t.events[a][1].type){o=t.events[a][1].end;break}b(i);let s=n;for(;s<t.events.length;)t.events[s][1].end={...o},s++;return qa(t.events,a+1,0,t.events.slice(n)),t.events.length=s,c(e)}return s(e)}function c(o){if(i===n.length){if(!r)return p(o);if(r.currentConstruct&&r.currentConstruct.concrete)return g(o);t.interrupt=Boolean(r.currentConstruct&&!r._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(mi,u,d)(o)}function u(e){return r&&y(),b(i),p(e)}function d(e){return t.parser.lazy[t.now().line]=i!==n.length,a=t.now().offset,g(e)}function p(n){return t.containerState={},e.attempt(mi,f,g)(n)}function f(e){return i++,n.push([t.currentConstruct,t.containerState]),p(e)}function g(n){return null===n?(r&&y(),b(0),void e.consume(n)):(r=r||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:r,contentType:"flow",previous:o}),m(n))}function m(n){return null===n?(h(e.exit("chunkFlow"),!0),b(0),void e.consume(n)):ai(n)?(e.consume(n),h(e.exit("chunkFlow")),i=0,t.interrupt=void 0,s):(e.consume(n),m)}function h(e,n){const s=t.sliceStream(e);if(n&&s.push(null),e.previous=o,o&&(o.next=e),o=e,r.defineSkip(e.start),r.write(s),t.parser.lazy[e.start.line]){let e=r.events.length;for(;e--;)if(r.events[e][1].start.offset<a&&(!r.events[e][1].end||r.events[e][1].end.offset>a))return;const n=t.events.length;let o,s,l=n;for(;l--;)if("exit"===t.events[l][0]&&"chunkFlow"===t.events[l][1].type){if(o){s=t.events[l][1].end;break}o=!0}for(b(i),e=n;e<t.events.length;)t.events[e][1].end={...s},e++;qa(t.events,l+1,0,t.events.slice(n)),t.events.length=e}}function b(r){let o=n.length;for(;o-- >r;){const r=n[o];t.containerState=r[1],r[0].exit.call(t,e)}n.length=r}function y(){r.write([null]),o=void 0,r=void 0,t.containerState._closeFlow=void 0}}},mi={tokenize:function(e,t,n){return pi(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}};function hi(e){return null===e||ii(e)||ci(e)?1:li(e)?2:void 0}function bi(e,t,n){const r=[];let o=-1;for(;++o<e.length;){const a=e[o].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}const yi={name:"attention",resolveAll:function(e,t){let n,r,o,a,i,s,l,c,u=-1;for(;++u<e.length;)if("enter"===e[u][0]&&"attentionSequence"===e[u][1].type&&e[u][1]._close)for(n=u;n--;)if("exit"===e[n][0]&&"attentionSequence"===e[n][1].type&&e[n][1]._open&&t.sliceSerialize(e[n][1]).charCodeAt(0)===t.sliceSerialize(e[u][1]).charCodeAt(0)){if((e[n][1]._close||e[u][1]._open)&&(e[u][1].end.offset-e[u][1].start.offset)%3&&!((e[n][1].end.offset-e[n][1].start.offset+e[u][1].end.offset-e[u][1].start.offset)%3))continue;s=e[n][1].end.offset-e[n][1].start.offset>1&&e[u][1].end.offset-e[u][1].start.offset>1?2:1;const d={...e[n][1].end},p={...e[u][1].start};vi(d,-s),vi(p,s),a={type:s>1?"strongSequence":"emphasisSequence",start:d,end:{...e[n][1].end}},i={type:s>1?"strongSequence":"emphasisSequence",start:{...e[u][1].start},end:p},o={type:s>1?"strongText":"emphasisText",start:{...e[n][1].end},end:{...e[u][1].start}},r={type:s>1?"strong":"emphasis",start:{...a.start},end:{...i.end}},e[n][1].end={...a.start},e[u][1].start={...i.end},l=[],e[n][1].end.offset-e[n][1].start.offset&&(l=Ha(l,[["enter",e[n][1],t],["exit",e[n][1],t]])),l=Ha(l,[["enter",r,t],["enter",a,t],["exit",a,t],["enter",o,t]]),l=Ha(l,bi(t.parser.constructs.insideSpan.null,e.slice(n+1,u),t)),l=Ha(l,[["exit",o,t],["enter",i,t],["exit",i,t],["exit",r,t]]),e[u][1].end.offset-e[u][1].start.offset?(c=2,l=Ha(l,[["enter",e[u][1],t],["exit",e[u][1],t]])):c=0,qa(e,n-1,u-n+3,l),u=n+l.length-c-2;break}u=-1;for(;++u<e.length;)"attentionSequence"===e[u][1].type&&(e[u][1].type="data");return e},tokenize:function(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,o=hi(r);let a;return function(t){return a=t,e.enter("attentionSequence"),i(t)};function i(s){if(s===a)return e.consume(s),i;const l=e.exit("attentionSequence"),c=hi(s),u=!c||2===c&&o||n.includes(s),d=!o||2===o&&c||n.includes(r);return l._open=Boolean(42===a?u:u&&(o||!d)),l._close=Boolean(42===a?d:d&&(c||!u)),t(s)}}};function vi(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const wi={name:"autolink",tokenize:function(e,t,n){let r=0;return function(t){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(t),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),o};function o(t){return Qa(t)?(e.consume(t),a):64===t?n(t):l(t)}function a(e){return 43===e||45===e||46===e||Ja(e)?(r=1,i(e)):l(e)}function i(t){return 58===t?(e.consume(t),r=0,s):(43===t||45===t||46===t||Ja(t))&&r++<32?(e.consume(t),i):(r=0,l(t))}function s(r){return 62===r?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(r),e.exit("autolinkMarker"),e.exit("autolink"),t):null===r||32===r||60===r||ti(r)?n(r):(e.consume(r),s)}function l(t){return 64===t?(e.consume(t),c):ei(t)?(e.consume(t),l):n(t)}function c(e){return Ja(e)?u(e):n(e)}function u(n){return 46===n?(e.consume(n),r=0,c):62===n?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(n),e.exit("autolinkMarker"),e.exit("autolink"),t):d(n)}function d(t){if((45===t||Ja(t))&&r++<63){const n=45===t?d:u;return e.consume(t),n}return n(t)}}};const Si={partial:!0,tokenize:function(e,t,n){return function(t){return si(t)?pi(e,r,"linePrefix")(t):r(t)};function r(e){return null===e||ai(e)?t(e):n(e)}}};const xi={continuation:{tokenize:function(e,t,n){const r=this;return function(t){if(si(t))return pi(e,o,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t);return o(t)};function o(r){return e.attempt(xi,t,n)(r)}}},exit:function(e){e.exit("blockQuote")},name:"blockQuote",tokenize:function(e,t,n){const r=this;return function(t){if(62===t){const n=r.containerState;return n.open||(e.enter("blockQuote",{_container:!0}),n.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(t),e.exit("blockQuoteMarker"),o}return n(t)};function o(n){return si(n)?(e.enter("blockQuotePrefixWhitespace"),e.consume(n),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(n))}}};const Ei={name:"characterEscape",tokenize:function(e,t,n){return function(t){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(t),e.exit("escapeMarker"),r};function r(r){return oi(r)?(e.enter("characterEscapeValue"),e.consume(r),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(r)}}};const ki={name:"characterReference",tokenize:function(e,t,n){const r=this;let o,a,i=0;return function(t){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(t),e.exit("characterReferenceMarker"),s};function s(t){return 35===t?(e.enter("characterReferenceMarkerNumeric"),e.consume(t),e.exit("characterReferenceMarkerNumeric"),l):(e.enter("characterReferenceValue"),o=31,a=Ja,c(t))}function l(t){return 88===t||120===t?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(t),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),o=6,a=ri,c):(e.enter("characterReferenceValue"),o=7,a=ni,c(t))}function c(s){if(59===s&&i){const o=e.exit("characterReferenceValue");return a!==Ja||Ga(r.sliceSerialize(o))?(e.enter("characterReferenceMarker"),e.consume(s),e.exit("characterReferenceMarker"),e.exit("characterReference"),t):n(s)}return a(s)&&i++<o?(e.consume(s),c):n(s)}}};const Ai={partial:!0,tokenize:function(e,t,n){const r=this;return function(t){if(null===t)return n(t);return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),o};function o(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}},Ti={concrete:!0,name:"codeFenced",tokenize:function(e,t,n){const r=this,o={partial:!0,tokenize:function(e,t,n){let o=0;return i;function i(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),l}function l(t){return e.enter("codeFencedFence"),si(t)?pi(e,c,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):c(t)}function c(t){return t===a?(e.enter("codeFencedFenceSequence"),u(t)):n(t)}function u(t){return t===a?(o++,e.consume(t),u):o>=s?(e.exit("codeFencedFenceSequence"),si(t)?pi(e,d,"whitespace")(t):d(t)):n(t)}function d(r){return null===r||ai(r)?(e.exit("codeFencedFence"),t(r)):n(r)}}};let a,i=0,s=0;return function(t){return function(t){const n=r.events[r.events.length-1];return i=n&&"linePrefix"===n[1].type?n[2].sliceSerialize(n[1],!0).length:0,a=t,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),l(t)}(t)};function l(t){return t===a?(s++,e.consume(t),l):s<3?n(t):(e.exit("codeFencedFenceSequence"),si(t)?pi(e,c,"whitespace")(t):c(t))}function c(n){return null===n||ai(n)?(e.exit("codeFencedFence"),r.interrupt?t(n):e.check(Ai,f,y)(n)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),u(n))}function u(t){return null===t||ai(t)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),c(t)):si(t)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),pi(e,d,"whitespace")(t)):96===t&&t===a?n(t):(e.consume(t),u)}function d(t){return null===t||ai(t)?c(t):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),p(t))}function p(t){return null===t||ai(t)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),c(t)):96===t&&t===a?n(t):(e.consume(t),p)}function f(t){return e.attempt(o,y,g)(t)}function g(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),m}function m(t){return i>0&&si(t)?pi(e,h,"linePrefix",i+1)(t):h(t)}function h(t){return null===t||ai(t)?e.check(Ai,f,y)(t):(e.enter("codeFlowValue"),b(t))}function b(t){return null===t||ai(t)?(e.exit("codeFlowValue"),h(t)):(e.consume(t),b)}function y(n){return e.exit("codeFenced"),t(n)}}};const Oi={name:"codeIndented",tokenize:function(e,t,n){const r=this;return function(t){return e.enter("codeIndented"),pi(e,o,"linePrefix",5)(t)};function o(e){const t=r.events[r.events.length-1];return t&&"linePrefix"===t[1].type&&t[2].sliceSerialize(t[1],!0).length>=4?a(e):n(e)}function a(t){return null===t?s(t):ai(t)?e.attempt(Ci,a,s)(t):(e.enter("codeFlowValue"),i(t))}function i(t){return null===t||ai(t)?(e.exit("codeFlowValue"),a(t)):(e.consume(t),i)}function s(n){return e.exit("codeIndented"),t(n)}}},Ci={partial:!0,tokenize:function(e,t,n){const r=this;return o;function o(t){return r.parser.lazy[r.now().line]?n(t):ai(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),o):pi(e,a,"linePrefix",5)(t)}function a(e){const a=r.events[r.events.length-1];return a&&"linePrefix"===a[1].type&&a[2].sliceSerialize(a[1],!0).length>=4?t(e):ai(e)?o(e):n(e)}}};const Ii={name:"codeText",previous:function(e){return 96!==e||"characterEscape"===this.events[this.events.length-1][1].type},resolve:function(e){let t,n,r=e.length-4,o=3;if(!("lineEnding"!==e[o][1].type&&"space"!==e[o][1].type||"lineEnding"!==e[r][1].type&&"space"!==e[r][1].type))for(t=o;++t<r;)if("codeTextData"===e[t][1].type){e[o][1].type="codeTextPadding",e[r][1].type="codeTextPadding",o+=2,r-=2;break}t=o-1,r++;for(;++t<=r;)void 0===n?t!==r&&"lineEnding"!==e[t][1].type&&(n=t):t!==r&&"lineEnding"!==e[t][1].type||(e[n][1].type="codeTextData",t!==n+2&&(e[n][1].end=e[t-1][1].end,e.splice(n+2,t-n-2),r-=t-n-2,t=n+2),n=void 0);return e},tokenize:function(e,t,n){let r,o,a=0;return function(t){return e.enter("codeText"),e.enter("codeTextSequence"),i(t)};function i(t){return 96===t?(e.consume(t),a++,i):(e.exit("codeTextSequence"),s(t))}function s(t){return null===t?n(t):32===t?(e.enter("space"),e.consume(t),e.exit("space"),s):96===t?(o=e.enter("codeTextSequence"),r=0,c(t)):ai(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),s):(e.enter("codeTextData"),l(t))}function l(t){return null===t||32===t||96===t||ai(t)?(e.exit("codeTextData"),s(t)):(e.consume(t),l)}function c(n){return 96===n?(e.consume(n),r++,c):r===a?(e.exit("codeTextSequence"),e.exit("codeText"),t(n)):(o.type="codeTextData",l(n))}}};class Ni{constructor(e){this.left=e?[...e]:[],this.right=[]}get(e){if(e<0||e>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return e<this.left.length?this.left[e]:this.right[this.right.length-e+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(e,t){const n=null==t?Number.POSITIVE_INFINITY:t;return n<this.left.length?this.left.slice(e,n):e>this.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(e,t,n){const r=t||0;this.setCursor(Math.trunc(e));const o=this.right.splice(this.right.length-r,Number.POSITIVE_INFINITY);return n&&Ri(this.left,n),o.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(e){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(e)}pushMany(e){this.setCursor(Number.POSITIVE_INFINITY),Ri(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),Ri(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&0===this.right.length||e<0&&0===this.left.length))if(e<this.left.length){const t=this.left.splice(e,Number.POSITIVE_INFINITY);Ri(this.right,t.reverse())}else{const t=this.right.splice(this.left.length+this.right.length-e,Number.POSITIVE_INFINITY);Ri(this.left,t.reverse())}}}function Ri(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 _i(e){const t={};let n,r,o,a,i,s,l,c=-1;const u=new Ni(e);for(;++c<u.length;){for(;c in t;)c=t[c];if(n=u.get(c),c&&"chunkFlow"===n[1].type&&"listItemPrefix"===u.get(c-1)[1].type&&(s=n[1]._tokenizer.events,o=0,o<s.length&&"lineEndingBlank"===s[o][1].type&&(o+=2),o<s.length&&"content"===s[o][1].type))for(;++o<s.length&&"content"!==s[o][1].type;)"chunkText"===s[o][1].type&&(s[o][1]._isInFirstContentOfListItem=!0,o++);if("enter"===n[0])n[1].contentType&&(Object.assign(t,Pi(u,c)),c=t[c],l=!0);else if(n[1]._container){for(o=c,r=void 0;o--;)if(a=u.get(o),"lineEnding"===a[1].type||"lineEndingBlank"===a[1].type)"enter"===a[0]&&(r&&(u.get(r)[1].type="lineEndingBlank"),a[1].type="lineEnding",r=o);else if("linePrefix"!==a[1].type&&"listItemIndent"!==a[1].type)break;r&&(n[1].end={...u.get(r)[1].start},i=u.slice(r,c),i.unshift(n),u.splice(r,c-r+1,i))}}return qa(e,0,Number.POSITIVE_INFINITY,u.slice(0)),!l}function Pi(e,t){const n=e.get(t)[1],r=e.get(t)[2];let o=t-1;const a=[];let i=n._tokenizer;i||(i=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(i._contentTypeTextTrailing=!0));const s=i.events,l=[],c={};let u,d,p=-1,f=n,g=0,m=0;const h=[m];for(;f;){for(;e.get(++o)[1]!==f;);a.push(o),f._tokenizer||(u=r.sliceStream(f),f.next||u.push(null),d&&i.defineSkip(f.start),f._isInFirstContentOfListItem&&(i._gfmTasklistFirstContentOfListItem=!0),i.write(u),f._isInFirstContentOfListItem&&(i._gfmTasklistFirstContentOfListItem=void 0)),d=f,f=f.next}for(f=n;++p<s.length;)"exit"===s[p][0]&&"enter"===s[p-1][0]&&s[p][1].type===s[p-1][1].type&&s[p][1].start.line!==s[p][1].end.line&&(m=p+1,h.push(m),f._tokenizer=void 0,f.previous=void 0,f=f.next);for(i.events=[],f?(f._tokenizer=void 0,f.previous=void 0):h.pop(),p=h.length;p--;){const t=s.slice(h[p],h[p+1]),n=a.pop();l.push([n,n+t.length-1]),e.splice(n,2,t)}for(l.reverse(),p=-1;++p<l.length;)c[g+l[p][0]]=g+l[p][1],g+=l[p][1]-l[p][0]-1;return c}const Li={resolve:function(e){return _i(e),e},tokenize:function(e,t){let n;return function(t){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),r(t)};function r(t){return null===t?o(t):ai(t)?e.check(Di,a,o)(t):(e.consume(t),r)}function o(n){return e.exit("chunkContent"),e.exit("content"),t(n)}function a(t){return e.consume(t),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,r}}},Di={partial:!0,tokenize:function(e,t,n){const r=this;return function(t){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),pi(e,o,"linePrefix")};function o(o){if(null===o||ai(o))return n(o);const a=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&a&&"linePrefix"===a[1].type&&a[2].sliceSerialize(a[1],!0).length>=4?t(o):e.interrupt(r.parser.constructs.flow,n,t)(o)}}};function Mi(e,t,n,r,o,a,i,s,l){const c=l||Number.POSITIVE_INFINITY;let u=0;return function(t){if(60===t)return e.enter(r),e.enter(o),e.enter(a),e.consume(t),e.exit(a),d;if(null===t||32===t||41===t||ti(t))return n(t);return e.enter(r),e.enter(i),e.enter(s),e.enter("chunkString",{contentType:"string"}),g(t)};function d(n){return 62===n?(e.enter(a),e.consume(n),e.exit(a),e.exit(o),e.exit(r),t):(e.enter(s),e.enter("chunkString",{contentType:"string"}),p(n))}function p(t){return 62===t?(e.exit("chunkString"),e.exit(s),d(t)):null===t||60===t||ai(t)?n(t):(e.consume(t),92===t?f:p)}function f(t){return 60===t||62===t||92===t?(e.consume(t),p):p(t)}function g(o){return u||null!==o&&41!==o&&!ii(o)?u<c&&40===o?(e.consume(o),u++,g):41===o?(e.consume(o),u--,g):null===o||32===o||40===o||ti(o)?n(o):(e.consume(o),92===o?m:g):(e.exit("chunkString"),e.exit(s),e.exit(i),e.exit(r),t(o))}function m(t){return 40===t||41===t||92===t?(e.consume(t),g):g(t)}}function ji(e,t,n,r,o,a){const i=this;let s,l=0;return function(t){return e.enter(r),e.enter(o),e.consume(t),e.exit(o),e.enter(a),c};function c(d){return l>999||null===d||91===d||93===d&&!s||94===d&&!l&&"_hiddenFootnoteSupport"in i.parser.constructs?n(d):93===d?(e.exit(a),e.enter(o),e.consume(d),e.exit(o),e.exit(r),t):ai(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),c):(e.enter("chunkString",{contentType:"string"}),u(d))}function u(t){return null===t||91===t||93===t||ai(t)||l++>999?(e.exit("chunkString"),c(t)):(e.consume(t),s||(s=!si(t)),92===t?d:u)}function d(t){return 91===t||92===t||93===t?(e.consume(t),l++,u):u(t)}}function Fi(e,t,n,r,o,a){let i;return function(t){if(34===t||39===t||40===t)return e.enter(r),e.enter(o),e.consume(t),e.exit(o),i=40===t?41:t,s;return n(t)};function s(n){return n===i?(e.enter(o),e.consume(n),e.exit(o),e.exit(r),t):(e.enter(a),l(n))}function l(t){return t===i?(e.exit(a),s(i)):null===t?n(t):ai(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),pi(e,l,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),c(t))}function c(t){return t===i||null===t||ai(t)?(e.exit("chunkString"),l(t)):(e.consume(t),92===t?u:c)}function u(t){return t===i||92===t?(e.consume(t),c):c(t)}}function Bi(e,t){let n;return function r(o){if(ai(o))return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),n=!0,r;if(si(o))return pi(e,r,n?"linePrefix":"lineSuffix")(o);return t(o)}}const Ui={name:"definition",tokenize:function(e,t,n){const r=this;let o;return function(t){return e.enter("definition"),function(t){return ji.call(r,e,a,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(t)}(t)};function a(t){return o=Za(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),58===t?(e.enter("definitionMarker"),e.consume(t),e.exit("definitionMarker"),i):n(t)}function i(t){return ii(t)?Bi(e,s)(t):s(t)}function s(t){return Mi(e,l,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(t)}function l(t){return e.attempt(zi,c,c)(t)}function c(t){return si(t)?pi(e,u,"whitespace")(t):u(t)}function u(a){return null===a||ai(a)?(e.exit("definition"),r.parser.defined.push(o),t(a)):n(a)}}},zi={partial:!0,tokenize:function(e,t,n){return function(t){return ii(t)?Bi(e,r)(t):n(t)};function r(t){return Fi(e,o,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(t)}function o(t){return si(t)?pi(e,a,"whitespace")(t):a(t)}function a(e){return null===e||ai(e)?t(e):n(e)}}};const $i={name:"hardBreakEscape",tokenize:function(e,t,n){return function(t){return e.enter("hardBreakEscape"),e.consume(t),r};function r(r){return ai(r)?(e.exit("hardBreakEscape"),t(r)):n(r)}}};const Gi={name:"headingAtx",resolve:function(e,t){let n,r,o=e.length-2,a=3;"whitespace"===e[a][1].type&&(a+=2);o-2>a&&"whitespace"===e[o][1].type&&(o-=2);"atxHeadingSequence"===e[o][1].type&&(a===o-1||o-4>a&&"whitespace"===e[o-2][1].type)&&(o-=a+1===o?2:4);o>a&&(n={type:"atxHeadingText",start:e[a][1].start,end:e[o][1].end},r={type:"chunkText",start:e[a][1].start,end:e[o][1].end,contentType:"text"},qa(e,a,o-a+1,[["enter",n,t],["enter",r,t],["exit",r,t],["exit",n,t]]));return e},tokenize:function(e,t,n){let r=0;return function(t){return e.enter("atxHeading"),function(t){return e.enter("atxHeadingSequence"),o(t)}(t)};function o(t){return 35===t&&r++<6?(e.consume(t),o):null===t||ii(t)?(e.exit("atxHeadingSequence"),a(t)):n(t)}function a(n){return 35===n?(e.enter("atxHeadingSequence"),i(n)):null===n||ai(n)?(e.exit("atxHeading"),t(n)):si(n)?pi(e,a,"whitespace")(n):(e.enter("atxHeadingText"),s(n))}function i(t){return 35===t?(e.consume(t),i):(e.exit("atxHeadingSequence"),a(t))}function s(t){return null===t||35===t||ii(t)?(e.exit("atxHeadingText"),a(t)):(e.consume(t),s)}}};const qi=["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"],Hi=["pre","script","style","textarea"],Vi={concrete:!0,name:"htmlFlow",resolveTo:function(e){let t=e.length;for(;t--&&("enter"!==e[t][0]||"htmlFlow"!==e[t][1].type););t>1&&"linePrefix"===e[t-2][1].type&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2));return e},tokenize:function(e,t,n){const r=this;let o,a,i,s,l;return function(t){return function(t){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(t),c}(t)};function c(s){return 33===s?(e.consume(s),u):47===s?(e.consume(s),a=!0,f):63===s?(e.consume(s),o=3,r.interrupt?t:L):Qa(s)?(e.consume(s),i=String.fromCharCode(s),g):n(s)}function u(a){return 45===a?(e.consume(a),o=2,d):91===a?(e.consume(a),o=5,s=0,p):Qa(a)?(e.consume(a),o=4,r.interrupt?t:L):n(a)}function d(o){return 45===o?(e.consume(o),r.interrupt?t:L):n(o)}function p(o){const a="CDATA[";return o===a.charCodeAt(s++)?(e.consume(o),6===s?r.interrupt?t:T:p):n(o)}function f(t){return Qa(t)?(e.consume(t),i=String.fromCharCode(t),g):n(t)}function g(s){if(null===s||47===s||62===s||ii(s)){const l=47===s,c=i.toLowerCase();return l||a||!Hi.includes(c)?qi.includes(i.toLowerCase())?(o=6,l?(e.consume(s),m):r.interrupt?t(s):T(s)):(o=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(s):a?h(s):b(s)):(o=1,r.interrupt?t(s):T(s))}return 45===s||Ja(s)?(e.consume(s),i+=String.fromCharCode(s),g):n(s)}function m(o){return 62===o?(e.consume(o),r.interrupt?t:T):n(o)}function h(t){return si(t)?(e.consume(t),h):k(t)}function b(t){return 47===t?(e.consume(t),k):58===t||95===t||Qa(t)?(e.consume(t),y):si(t)?(e.consume(t),b):k(t)}function y(t){return 45===t||46===t||58===t||95===t||Ja(t)?(e.consume(t),y):v(t)}function v(t){return 61===t?(e.consume(t),w):si(t)?(e.consume(t),v):b(t)}function w(t){return null===t||60===t||61===t||62===t||96===t?n(t):34===t||39===t?(e.consume(t),l=t,S):si(t)?(e.consume(t),w):x(t)}function S(t){return t===l?(e.consume(t),l=null,E):null===t||ai(t)?n(t):(e.consume(t),S)}function x(t){return null===t||34===t||39===t||47===t||60===t||61===t||62===t||96===t||ii(t)?v(t):(e.consume(t),x)}function E(e){return 47===e||62===e||si(e)?b(e):n(e)}function k(t){return 62===t?(e.consume(t),A):n(t)}function A(t){return null===t||ai(t)?T(t):si(t)?(e.consume(t),A):n(t)}function T(t){return 45===t&&2===o?(e.consume(t),N):60===t&&1===o?(e.consume(t),R):62===t&&4===o?(e.consume(t),D):63===t&&3===o?(e.consume(t),L):93===t&&5===o?(e.consume(t),P):!ai(t)||6!==o&&7!==o?null===t||ai(t)?(e.exit("htmlFlowData"),O(t)):(e.consume(t),T):(e.exit("htmlFlowData"),e.check(Wi,M,O)(t))}function O(t){return e.check(Yi,C,M)(t)}function C(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),I}function I(t){return null===t||ai(t)?O(t):(e.enter("htmlFlowData"),T(t))}function N(t){return 45===t?(e.consume(t),L):T(t)}function R(t){return 47===t?(e.consume(t),i="",_):T(t)}function _(t){if(62===t){const n=i.toLowerCase();return Hi.includes(n)?(e.consume(t),D):T(t)}return Qa(t)&&i.length<8?(e.consume(t),i+=String.fromCharCode(t),_):T(t)}function P(t){return 93===t?(e.consume(t),L):T(t)}function L(t){return 62===t?(e.consume(t),D):45===t&&2===o?(e.consume(t),L):T(t)}function D(t){return null===t||ai(t)?(e.exit("htmlFlowData"),M(t)):(e.consume(t),D)}function M(n){return e.exit("htmlFlow"),t(n)}}},Wi={partial:!0,tokenize:function(e,t,n){return function(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),e.attempt(Si,t,n)}}},Yi={partial:!0,tokenize:function(e,t,n){const r=this;return function(t){if(ai(t))return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),o;return n(t)};function o(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}};const Ki={name:"htmlText",tokenize:function(e,t,n){const r=this;let o,a,i;return function(t){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(t),s};function s(t){return 33===t?(e.consume(t),l):47===t?(e.consume(t),w):63===t?(e.consume(t),y):Qa(t)?(e.consume(t),E):n(t)}function l(t){return 45===t?(e.consume(t),c):91===t?(e.consume(t),a=0,f):Qa(t)?(e.consume(t),b):n(t)}function c(t){return 45===t?(e.consume(t),p):n(t)}function u(t){return null===t?n(t):45===t?(e.consume(t),d):ai(t)?(i=u,_(t)):(e.consume(t),u)}function d(t){return 45===t?(e.consume(t),p):u(t)}function p(e){return 62===e?R(e):45===e?d(e):u(e)}function f(t){const r="CDATA[";return t===r.charCodeAt(a++)?(e.consume(t),6===a?g:f):n(t)}function g(t){return null===t?n(t):93===t?(e.consume(t),m):ai(t)?(i=g,_(t)):(e.consume(t),g)}function m(t){return 93===t?(e.consume(t),h):g(t)}function h(t){return 62===t?R(t):93===t?(e.consume(t),h):g(t)}function b(t){return null===t||62===t?R(t):ai(t)?(i=b,_(t)):(e.consume(t),b)}function y(t){return null===t?n(t):63===t?(e.consume(t),v):ai(t)?(i=y,_(t)):(e.consume(t),y)}function v(e){return 62===e?R(e):y(e)}function w(t){return Qa(t)?(e.consume(t),S):n(t)}function S(t){return 45===t||Ja(t)?(e.consume(t),S):x(t)}function x(t){return ai(t)?(i=x,_(t)):si(t)?(e.consume(t),x):R(t)}function E(t){return 45===t||Ja(t)?(e.consume(t),E):47===t||62===t||ii(t)?k(t):n(t)}function k(t){return 47===t?(e.consume(t),R):58===t||95===t||Qa(t)?(e.consume(t),A):ai(t)?(i=k,_(t)):si(t)?(e.consume(t),k):R(t)}function A(t){return 45===t||46===t||58===t||95===t||Ja(t)?(e.consume(t),A):T(t)}function T(t){return 61===t?(e.consume(t),O):ai(t)?(i=T,_(t)):si(t)?(e.consume(t),T):k(t)}function O(t){return null===t||60===t||61===t||62===t||96===t?n(t):34===t||39===t?(e.consume(t),o=t,C):ai(t)?(i=O,_(t)):si(t)?(e.consume(t),O):(e.consume(t),I)}function C(t){return t===o?(e.consume(t),o=void 0,N):null===t?n(t):ai(t)?(i=C,_(t)):(e.consume(t),C)}function I(t){return null===t||34===t||39===t||60===t||61===t||96===t?n(t):47===t||62===t||ii(t)?k(t):(e.consume(t),I)}function N(e){return 47===e||62===e||ii(e)?k(e):n(e)}function R(r){return 62===r?(e.consume(r),e.exit("htmlTextData"),e.exit("htmlText"),t):n(r)}function _(t){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),P}function P(t){return si(t)?pi(e,L,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):L(t)}function L(t){return e.enter("htmlTextData"),i(t)}}};const Xi={name:"labelEnd",resolveAll:function(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),"labelImage"===r.type||"labelLink"===r.type||"labelEnd"===r.type){const e="labelImage"===r.type?4:2;r.type="data",t+=e}}e.length!==n.length&&qa(e,0,e.length,n);return e},resolveTo:function(e,t){let n,r,o,a,i=e.length,s=0;for(;i--;)if(n=e[i][1],r){if("link"===n.type||"labelLink"===n.type&&n._inactive)break;"enter"===e[i][0]&&"labelLink"===n.type&&(n._inactive=!0)}else if(o){if("enter"===e[i][0]&&("labelImage"===n.type||"labelLink"===n.type)&&!n._balanced&&(r=i,"labelLink"!==n.type)){s=2;break}}else"labelEnd"===n.type&&(o=i);const l={type:"labelLink"===e[r][1].type?"link":"image",start:{...e[r][1].start},end:{...e[e.length-1][1].end}},c={type:"label",start:{...e[r][1].start},end:{...e[o][1].end}},u={type:"labelText",start:{...e[r+s+2][1].end},end:{...e[o-2][1].start}};return a=[["enter",l,t],["enter",c,t]],a=Ha(a,e.slice(r+1,r+s+3)),a=Ha(a,[["enter",u,t]]),a=Ha(a,bi(t.parser.constructs.insideSpan.null,e.slice(r+s+4,o-3),t)),a=Ha(a,[["exit",u,t],e[o-2],e[o-1],["exit",c,t]]),a=Ha(a,e.slice(o+1)),a=Ha(a,[["exit",l,t]]),qa(e,r,e.length,a),e},tokenize:function(e,t,n){const r=this;let o,a,i=r.events.length;for(;i--;)if(("labelImage"===r.events[i][1].type||"labelLink"===r.events[i][1].type)&&!r.events[i][1]._balanced){o=r.events[i][1];break}return function(t){if(!o)return n(t);if(o._inactive)return u(t);return a=r.parser.defined.includes(Za(r.sliceSerialize({start:o.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelEnd"),s};function s(t){return 40===t?e.attempt(Zi,c,a?c:u)(t):91===t?e.attempt(Qi,c,a?l:u)(t):a?c(t):u(t)}function l(t){return e.attempt(Ji,c,u)(t)}function c(e){return t(e)}function u(e){return o._balanced=!0,n(e)}}},Zi={tokenize:function(e,t,n){return function(t){return e.enter("resource"),e.enter("resourceMarker"),e.consume(t),e.exit("resourceMarker"),r};function r(t){return ii(t)?Bi(e,o)(t):o(t)}function o(t){return 41===t?c(t):Mi(e,a,i,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(t)}function a(t){return ii(t)?Bi(e,s)(t):c(t)}function i(e){return n(e)}function s(t){return 34===t||39===t||40===t?Fi(e,l,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(t):c(t)}function l(t){return ii(t)?Bi(e,c)(t):c(t)}function c(r){return 41===r?(e.enter("resourceMarker"),e.consume(r),e.exit("resourceMarker"),e.exit("resource"),t):n(r)}}},Qi={tokenize:function(e,t,n){const r=this;return function(t){return ji.call(r,e,o,a,"reference","referenceMarker","referenceString")(t)};function o(e){return r.parser.defined.includes(Za(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(e):n(e)}function a(e){return n(e)}}},Ji={tokenize:function(e,t,n){return function(t){return e.enter("reference"),e.enter("referenceMarker"),e.consume(t),e.exit("referenceMarker"),r};function r(r){return 93===r?(e.enter("referenceMarker"),e.consume(r),e.exit("referenceMarker"),e.exit("reference"),t):n(r)}}};const es={name:"labelStartImage",resolveAll:Xi.resolveAll,tokenize:function(e,t,n){const r=this;return function(t){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(t),e.exit("labelImageMarker"),o};function o(t){return 91===t?(e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelImage"),a):n(t)}function a(e){return 94===e&&"_hiddenFootnoteSupport"in r.parser.constructs?n(e):t(e)}}};const ts={name:"labelStartLink",resolveAll:Xi.resolveAll,tokenize:function(e,t,n){const r=this;return function(t){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelLink"),o};function o(e){return 94===e&&"_hiddenFootnoteSupport"in r.parser.constructs?n(e):t(e)}}};const ns={name:"lineEnding",tokenize:function(e,t){return function(n){return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),pi(e,t,"linePrefix")}}};const rs={name:"thematicBreak",tokenize:function(e,t,n){let r,o=0;return function(t){return e.enter("thematicBreak"),function(e){return r=e,a(e)}(t)};function a(a){return a===r?(e.enter("thematicBreakSequence"),i(a)):o>=3&&(null===a||ai(a))?(e.exit("thematicBreak"),t(a)):n(a)}function i(t){return t===r?(e.consume(t),o++,i):(e.exit("thematicBreakSequence"),si(t)?pi(e,a,"whitespace")(t):a(t))}}};const os={continuation:{tokenize:function(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(Si,o,a);function o(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,pi(e,t,"listItemIndent",r.containerState.size+1)(n)}function a(n){return r.containerState.furtherBlankLines||!si(n)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,i(n)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(is,t,i)(n))}function i(o){return r.containerState._closeFlow=!0,r.interrupt=void 0,pi(e,e.attempt(os,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o)}}},exit:function(e){e.exit(this.containerState.type)},name:"list",tokenize:function(e,t,n){const r=this,o=r.events[r.events.length-1];let a=o&&"linePrefix"===o[1].type?o[2].sliceSerialize(o[1],!0).length:0,i=0;return function(t){const o=r.containerState.type||(42===t||43===t||45===t?"listUnordered":"listOrdered");if("listUnordered"===o?!r.containerState.marker||t===r.containerState.marker:ni(t)){if(r.containerState.type||(r.containerState.type=o,e.enter(o,{_container:!0})),"listUnordered"===o)return e.enter("listItemPrefix"),42===t||45===t?e.check(rs,n,l)(t):l(t);if(!r.interrupt||49===t)return e.enter("listItemPrefix"),e.enter("listItemValue"),s(t)}return n(t)};function s(t){return ni(t)&&++i<10?(e.consume(t),s):(!r.interrupt||i<2)&&(r.containerState.marker?t===r.containerState.marker:41===t||46===t)?(e.exit("listItemValue"),l(t)):n(t)}function l(t){return e.enter("listItemMarker"),e.consume(t),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||t,e.check(Si,r.interrupt?n:c,e.attempt(as,d,u))}function c(e){return r.containerState.initialBlankLine=!0,a++,d(e)}function u(t){return si(t)?(e.enter("listItemPrefixWhitespace"),e.consume(t),e.exit("listItemPrefixWhitespace"),d):n(t)}function d(n){return r.containerState.size=a+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(n)}}},as={partial:!0,tokenize:function(e,t,n){const r=this;return pi(e,function(e){const o=r.events[r.events.length-1];return!si(e)&&o&&"listItemPrefixWhitespace"===o[1].type?t(e):n(e)},"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5)}},is={partial:!0,tokenize:function(e,t,n){const r=this;return pi(e,function(e){const o=r.events[r.events.length-1];return o&&"listItemIndent"===o[1].type&&o[2].sliceSerialize(o[1],!0).length===r.containerState.size?t(e):n(e)},"listItemIndent",r.containerState.size+1)}};const ss={name:"setextUnderline",resolveTo:function(e,t){let n,r,o,a=e.length;for(;a--;)if("enter"===e[a][0]){if("content"===e[a][1].type){n=a;break}"paragraph"===e[a][1].type&&(r=a)}else"content"===e[a][1].type&&e.splice(a,1),o||"definition"!==e[a][1].type||(o=a);const i={type:"setextHeading",start:{...e[n][1].start},end:{...e[e.length-1][1].end}};e[r][1].type="setextHeadingText",o?(e.splice(r,0,["enter",i,t]),e.splice(o+1,0,["exit",e[n][1],t]),e[n][1].end={...e[o][1].end}):e[n][1]=i;return e.push(["exit",i,t]),e},tokenize:function(e,t,n){const r=this;let o;return function(t){let i,s=r.events.length;for(;s--;)if("lineEnding"!==r.events[s][1].type&&"linePrefix"!==r.events[s][1].type&&"content"!==r.events[s][1].type){i="paragraph"===r.events[s][1].type;break}if(!r.parser.lazy[r.now().line]&&(r.interrupt||i))return e.enter("setextHeadingLine"),o=t,function(t){return e.enter("setextHeadingLineSequence"),a(t)}(t);return n(t)};function a(t){return t===o?(e.consume(t),a):(e.exit("setextHeadingLineSequence"),si(t)?pi(e,i,"lineSuffix")(t):i(t))}function i(r){return null===r||ai(r)?(e.exit("setextHeadingLine"),t(r)):n(r)}}};const ls={tokenize:function(e){const t=this,n=e.attempt(Si,function(r){if(null===r)return void e.consume(r);return e.enter("lineEndingBlank"),e.consume(r),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n},e.attempt(this.parser.constructs.flowInitial,r,pi(e,e.attempt(this.parser.constructs.flow,r,e.attempt(Li,r)),"linePrefix")));return n;function r(r){if(null!==r)return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),t.currentConstruct=void 0,n;e.consume(r)}}};const cs={resolveAll:fs()},us=ps("string"),ds=ps("text");function ps(e){return{resolveAll:fs("text"===e?gs:void 0),tokenize:function(t){const n=this,r=this.parser.constructs[e],o=t.attempt(r,a,i);return a;function a(e){return l(e)?o(e):i(e)}function i(e){if(null!==e)return t.enter("data"),t.consume(e),s;t.consume(e)}function s(e){return l(e)?(t.exit("data"),o(e)):(t.consume(e),s)}function l(e){if(null===e)return!0;const t=r[e];let o=-1;if(t)for(;++o<t.length;){const e=t[o];if(!e.previous||e.previous.call(n,n.previous))return!0}return!1}}}}function fs(e){return function(t,n){let r,o=-1;for(;++o<=t.length;)void 0===r?t[o]&&"data"===t[o][1].type&&(r=o,o++):t[o]&&"data"===t[o][1].type||(o!==r+2&&(t[r][1].end=t[o-1][1].end,t.splice(r+2,o-r-2),o=r+2),r=void 0);return e?e(t,n):t}}function gs(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||"lineEnding"===e[n][1].type)&&"data"===e[n-1][1].type){const r=e[n-1][1],o=t.sliceStream(r);let a,i=o.length,s=-1,l=0;for(;i--;){const e=o[i];if("string"==typeof e){for(s=e.length;32===e.charCodeAt(s-1);)l++,s--;if(s)break;s=-1}else if(-2===e)a=!0,l++;else if(-1!==e){i++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(l=0),l){const o={type:n===e.length||a||l<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:i?s:r.start._bufferIndex+s,_index:r.start._index+i,line:r.end.line,column:r.end.column-l,offset:r.end.offset-l},end:{...r.end}};r.end={...o.start},r.start.offset===r.end.offset?Object.assign(r,o):(e.splice(n,0,["enter",o,t],["exit",o,t]),n+=2)}n++}return e}const ms={42:os,43:os,45:os,48:os,49:os,50:os,51:os,52:os,53:os,54:os,55:os,56:os,57:os,62:xi},hs={91:Ui},bs={[-2]:Oi,[-1]:Oi,32:Oi},ys={35:Gi,42:rs,45:[ss,rs],60:Vi,61:ss,95:rs,96:Ti,126:Ti},vs={38:ki,92:Ei},ws={[-5]:ns,[-4]:ns,[-3]:ns,33:es,38:ki,42:yi,60:[wi,Ki],91:ts,92:[$i,Ei],93:Xi,95:yi,96:Ii},Ss={null:[yi,cs]};var xs=Object.freeze({__proto__:null,attentionMarkers:{null:[42,95]},contentInitial:hs,disable:{null:[]},document:ms,flow:ys,flowInitial:bs,insideSpan:Ss,string:vs,text:ws});function Es(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 o={},a=[];let i=[],s=[];const l={attempt:h(function(e,t){b(e,t.from)}),check:h(m),consume:function(e){ai(e)?(r.line++,r.column=1,r.offset+=-3===e?2:1,y()):-1!==e&&(r.column++,r.offset++);r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===i[r._index].length&&(r._bufferIndex=-1,r._index++));c.previous=e},enter:function(e,t){const n=t||{};return n.type=e,n.start=p(),c.events.push(["enter",n,c]),s.push(n),n},exit:function(e){const t=s.pop();return t.end=p(),c.events.push(["exit",t,c]),t},interrupt:h(m,{interrupt:!0})},c={code:null,containerState:{},defineSkip:function(e){o[e.line]=e.column,y()},events:[],now:p,parser:e,previous:null,sliceSerialize:function(e,t){return function(e,t){let n=-1;const r=[];let o;for(;++n<e.length;){const a=e[n];let i;if("string"==typeof a)i=a;else switch(a){case-5:i="\r";break;case-4:i="\n";break;case-3:i="\r\n";break;case-2:i=t?" ":"\t";break;case-1:if(!t&&o)continue;i=" ";break;default:i=String.fromCharCode(a)}o=-2===a,r.push(i)}return r.join("")}(d(e),t)},sliceStream:d,write:function(e){if(i=Ha(i,e),f(),null!==i[i.length-1])return[];return b(t,0),c.events=bi(a,c.events,c),c.events}};let u=t.tokenize.call(c,l);return t.resolveAll&&a.push(t),c;function d(e){return function(e,t){const n=t.start._index,r=t.start._bufferIndex,o=t.end._index,a=t.end._bufferIndex;let i;if(n===o)i=[e[n].slice(r,a)];else{if(i=e.slice(n,o),r>-1){const e=i[0];"string"==typeof e?i[0]=e.slice(r):i.shift()}a>0&&i.push(e[o].slice(0,a))}return i}(i,e)}function p(){const{_bufferIndex:e,_index:t,line:n,column:o,offset:a}=r;return{_bufferIndex:e,_index:t,line:n,column:o,offset:a}}function f(){let e;for(;r._index<i.length;){const t=i[r._index];if("string"==typeof t)for(e=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===e&&r._bufferIndex<t.length;)g(t.charCodeAt(r._bufferIndex));else g(t)}}function g(e){u=u(e)}function m(e,t){t.restore()}function h(e,t){return function(n,o,a){let i,u,d,f;return Array.isArray(n)?g(n):"tokenize"in n?g([n]):function(e){return t;function t(t){const n=null!==t&&e[t],r=null!==t&&e.null;return g([...Array.isArray(n)?n:n?[n]:[],...Array.isArray(r)?r:r?[r]:[]])(t)}}(n);function g(e){return i=e,u=0,0===e.length?a:m(e[u])}function m(e){return function(n){f=function(){const e=p(),t=c.previous,n=c.currentConstruct,o=c.events.length,a=Array.from(s);return{from:o,restore:i};function i(){r=e,c.previous=t,c.currentConstruct=n,c.events.length=o,s=a,y()}}(),d=e,e.partial||(c.currentConstruct=e);if(e.name&&c.parser.constructs.disable.null.includes(e.name))return b();return e.tokenize.call(t?Object.assign(Object.create(c),t):c,l,h,b)(n)}}function h(t){return e(d,f),o}function b(e){return f.restore(),++u<i.length?m(i[u]):a}}}function b(e,t){e.resolveAll&&!a.includes(e)&&a.push(e),e.resolve&&qa(c.events,t,c.events.length-t,e.resolve(c.events.slice(t),c)),e.resolveTo&&(c.events=e.resolveTo(c.events,c))}function y(){r.line in o&&r.column<2&&(r.column=o[r.line],r.offset+=o[r.line]-1)}}const ks=/[\0\t\n\r]/g;const As=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Ts(e,t,n){if(t)return t;if(35===n.charCodeAt(0)){const e=n.charCodeAt(1),t=120===e||88===e;return Xa(n.slice(t?2:1),t?16:10)}return Ga(n)||e}const Os={}.hasOwnProperty;function Cs(e,t,n){return t&&"object"==typeof t&&(n=t,t=void 0),function(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:a(te),autolinkProtocol:A,autolinkEmail:A,atxHeading:a(Z),blockQuote:a(V),characterEscape:A,characterReference:A,codeFenced:a(W),codeFencedFenceInfo:i,codeFencedFenceMeta:i,codeIndented:a(W,i),codeText:a(Y,i),codeTextData:A,data:A,codeFlowValue:A,definition:a(K),definitionDestinationString:i,definitionLabelString:i,definitionTitleString:i,emphasis:a(X),hardBreakEscape:a(Q),hardBreakTrailing:a(Q),htmlFlow:a(J,i),htmlFlowData:A,htmlText:a(J,i),htmlTextData:A,image:a(ee),label:i,link:a(te),listItem:a(re),listItemValue:p,listOrdered:a(ne,d),listUnordered:a(ne),paragraph:a(oe),reference:B,referenceString:i,resourceDestinationString:i,resourceTitleString:i,setextHeading:a(Z),strong:a(ae),thematicBreak:a(se)},exit:{atxHeading:l(),atxHeadingSequence:S,autolink:l(),autolinkEmail:H,autolinkProtocol:q,blockQuote:l(),characterEscapeValue:T,characterReferenceMarkerHexadecimal:z,characterReferenceMarkerNumeric:z,characterReferenceValue:$,characterReference:G,codeFenced:l(h),codeFencedFence:m,codeFencedFenceInfo:f,codeFencedFenceMeta:g,codeFlowValue:T,codeIndented:l(b),codeText:l(R),codeTextData:T,data:T,definition:l(),definitionDestinationString:w,definitionLabelString:y,definitionTitleString:v,emphasis:l(),hardBreakEscape:l(C),hardBreakTrailing:l(C),htmlFlow:l(I),htmlFlowData:T,htmlText:l(N),htmlTextData:T,image:l(P),label:D,labelText:L,lineEnding:O,link:l(_),listItem:l(),listOrdered:l(),listUnordered:l(),paragraph:l(),referenceString:U,resourceDestinationString:M,resourceTitleString:j,resource:F,setextHeading:l(k),setextHeadingLineSequence:E,setextHeadingText:x,strong:l(),thematicBreak:l()}};Ns(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(e){let r={type:"root",children:[]};const a={stack:[r],tokenStack:[],config:t,enter:s,exit:c,buffer:i,resume:u,data:n},l=[];let d=-1;for(;++d<e.length;)if("listOrdered"===e[d][1].type||"listUnordered"===e[d][1].type)if("enter"===e[d][0])l.push(d);else{d=o(e,l.pop(),d)}for(d=-1;++d<e.length;){const n=t[e[d][0]];Os.call(n,e[d][1].type)&&n[e[d][1].type].call(Object.assign({sliceSerialize:e[d][2].sliceSerialize},a),e[d][1])}if(a.tokenStack.length>0){const e=a.tokenStack[a.tokenStack.length-1];(e[1]||_s).call(a,void 0,e[0])}for(r.position={start:Is(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:Is(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},d=-1;++d<t.transforms.length;)r=t.transforms[d](r)||r;return r}function o(e,t,n){let r,o,a,i,s=t-1,l=-1,c=!1;for(;++s<=n;){const t=e[s];switch(t[1].type){case"listUnordered":case"listOrdered":case"blockQuote":"enter"===t[0]?l++:l--,i=void 0;break;case"lineEndingBlank":"enter"===t[0]&&(!r||i||l||a||(a=s),i=void 0);break;case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:i=void 0}if(!l&&"enter"===t[0]&&"listItemPrefix"===t[1].type||-1===l&&"exit"===t[0]&&("listUnordered"===t[1].type||"listOrdered"===t[1].type)){if(r){let i=s;for(o=void 0;i--;){const t=e[i];if("lineEnding"===t[1].type||"lineEndingBlank"===t[1].type){if("exit"===t[0])continue;o&&(e[o][1].type="lineEndingBlank",c=!0),t[1].type="lineEnding",o=i}else if("linePrefix"!==t[1].type&&"blockQuotePrefix"!==t[1].type&&"blockQuotePrefixWhitespace"!==t[1].type&&"blockQuoteMarker"!==t[1].type&&"listItemIndent"!==t[1].type)break}a&&(!o||a<o)&&(r._spread=!0),r.end=Object.assign({},o?e[o][1].start:t[1].end),e.splice(o||s,0,["exit",r,t[2]]),s++,n++}if("listItemPrefix"===t[1].type){const o={type:"listItem",_spread:!1,start:Object.assign({},t[1].start),end:void 0};r=o,e.splice(s,0,["enter",o,t[2]]),s++,n++,a=void 0,i=!0}}}return e[t][1]._spread=c,n}function a(e,t){return n;function n(n){s.call(this,e(n),n),t&&t.call(this,n)}}function i(){this.stack.push({type:"fragment",children:[]})}function s(e,t,n){this.stack[this.stack.length-1].children.push(e),this.stack.push(e),this.tokenStack.push([t,n||void 0]),e.position={start:Is(t.start),end:void 0}}function l(e){return t;function t(t){e&&e.call(this,t),c.call(this,t)}}function c(e,t){const n=this.stack.pop(),r=this.tokenStack.pop();if(!r)throw new Error("Cannot close `"+e.type+"` ("+ma({start:e.start,end:e.end})+"): it’s not open");if(r[0].type!==e.type)if(t)t.call(this,e,r[0]);else{(r[1]||_s).call(this,e,r[0])}n.position.end=Is(e.end)}function u(){return Fa(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function p(e){if(this.data.expectingFirstListItemValue){this.stack[this.stack.length-2].start=Number.parseInt(this.sliceSerialize(e),10),this.data.expectingFirstListItemValue=void 0}}function f(){const e=this.resume();this.stack[this.stack.length-1].lang=e}function g(){const e=this.resume();this.stack[this.stack.length-1].meta=e}function m(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function h(){const e=this.resume();this.stack[this.stack.length-1].value=e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function b(){const e=this.resume();this.stack[this.stack.length-1].value=e.replace(/(\r?\n|\r)$/g,"")}function y(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=Za(this.sliceSerialize(e)).toLowerCase()}function v(){const e=this.resume();this.stack[this.stack.length-1].title=e}function w(){const e=this.resume();this.stack[this.stack.length-1].url=e}function S(e){const t=this.stack[this.stack.length-1];if(!t.depth){const n=this.sliceSerialize(e).length;t.depth=n}}function x(){this.data.setextHeadingSlurpLineEnding=!0}function E(e){this.stack[this.stack.length-1].depth=61===this.sliceSerialize(e).codePointAt(0)?1:2}function k(){this.data.setextHeadingSlurpLineEnding=void 0}function A(e){const t=this.stack[this.stack.length-1].children;let n=t[t.length-1];n&&"text"===n.type||(n=ie(),n.position={start:Is(e.start),end:void 0},t.push(n)),this.stack.push(n)}function T(e){const t=this.stack.pop();t.value+=this.sliceSerialize(e),t.position.end=Is(e.end)}function O(e){const n=this.stack[this.stack.length-1];if(this.data.atHardBreak){return n.children[n.children.length-1].position.end=Is(e.end),void(this.data.atHardBreak=void 0)}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(n.type)&&(A.call(this,e),T.call(this,e))}function C(){this.data.atHardBreak=!0}function I(){const e=this.resume();this.stack[this.stack.length-1].value=e}function N(){const e=this.resume();this.stack[this.stack.length-1].value=e}function R(){const e=this.resume();this.stack[this.stack.length-1].value=e}function _(){const e=this.stack[this.stack.length-1];if(this.data.inReference){const t=this.data.referenceType||"shortcut";e.type+="Reference",e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function P(){const e=this.stack[this.stack.length-1];if(this.data.inReference){const t=this.data.referenceType||"shortcut";e.type+="Reference",e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function L(e){const t=this.sliceSerialize(e),n=this.stack[this.stack.length-2];n.label=function(e){return e.replace(As,Ts)}(t),n.identifier=Za(t).toLowerCase()}function D(){const e=this.stack[this.stack.length-1],t=this.resume(),n=this.stack[this.stack.length-1];if(this.data.inReference=!0,"link"===n.type){const t=e.children;n.children=t}else n.alt=t}function M(){const e=this.resume();this.stack[this.stack.length-1].url=e}function j(){const e=this.resume();this.stack[this.stack.length-1].title=e}function F(){this.data.inReference=void 0}function B(){this.data.referenceType="collapsed"}function U(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=Za(this.sliceSerialize(e)).toLowerCase(),this.data.referenceType="full"}function z(e){this.data.characterReferenceType=e.type}function $(e){const t=this.sliceSerialize(e),n=this.data.characterReferenceType;let r;if(n)r=Xa(t,"characterReferenceMarkerNumeric"===n?10:16),this.data.characterReferenceType=void 0;else{r=Ga(t)}this.stack[this.stack.length-1].value+=r}function G(e){this.stack.pop().position.end=Is(e.end)}function q(e){T.call(this,e);this.stack[this.stack.length-1].url=this.sliceSerialize(e)}function H(e){T.call(this,e);this.stack[this.stack.length-1].url="mailto:"+this.sliceSerialize(e)}function V(){return{type:"blockquote",children:[]}}function W(){return{type:"code",lang:null,meta:null,value:""}}function Y(){return{type:"inlineCode",value:""}}function K(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function X(){return{type:"emphasis",children:[]}}function Z(){return{type:"heading",depth:0,children:[]}}function Q(){return{type:"break"}}function J(){return{type:"html",value:""}}function ee(){return{type:"image",title:null,url:"",alt:null}}function te(){return{type:"link",title:null,url:"",children:[]}}function ne(e){return{type:"list",ordered:"listOrdered"===e.type,start:null,spread:e._spread,children:[]}}function re(e){return{type:"listItem",spread:e._spread,checked:null,children:[]}}function oe(){return{type:"paragraph",children:[]}}function ae(){return{type:"strong",children:[]}}function ie(){return{type:"text",value:""}}function se(){return{type:"thematicBreak"}}}(n)(function(e){for(;!_i(e););return e}(function(e){const t={constructs:Wa([xs,...(e||{}).extensions||[]]),content:n(fi),defined:[],document:n(gi),flow:n(ls),lazy:{},string:n(us),text:n(ds)};return t;function n(e){return function(n){return Es(t,e,n)}}}(n).document().write(function(){let e,t=1,n="",r=!0;return function(o,a,i){const s=[];let l,c,u,d,p;for(o=n+("string"==typeof o?o.toString():new TextDecoder(a||void 0).decode(o)),u=0,n="",r&&(65279===o.charCodeAt(0)&&u++,r=void 0);u<o.length;){if(ks.lastIndex=u,l=ks.exec(o),d=l&&void 0!==l.index?l.index:o.length,p=o.charCodeAt(d),!l){n=o.slice(u);break}if(10===p&&u===d&&e)s.push(-3),e=void 0;else switch(e&&(s.push(-5),e=void 0),u<d&&(s.push(o.slice(u,d)),t+=d-u),p){case 0:s.push(65533),t++;break;case 9:for(c=4*Math.ceil(t/4),s.push(-2);t++<c;)s.push(-1);break;case 10:s.push(-4),t=1;break;default:e=!0,t=1}u=d+1}return i&&(e&&s.push(-5),n&&s.push(n),s.push(null)),s}}()(e,t,!0))))}function Is(e){return{line:e.line,column:e.column,offset:e.offset}}function Ns(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?Ns(e,r):Rs(e,r)}}function Rs(e,t){let n;for(n in t)if(Os.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 _s(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+ma({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+ma({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+ma({start:t.start,end:t.end})+") is still open")}function Ps(e){const t=this;t.parser=function(n){return Cs(n,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function Ls(e,t){const n=t.referenceType;let r="]";if("collapsed"===n?r+="[]":"full"===n&&(r+="["+(t.label||t.identifier)+"]"),"imageReference"===t.type)return[{type:"text",value:"!["+t.alt+r}];const o=e.all(t),a=o[0];a&&"text"===a.type?a.value="["+a.value:o.unshift({type:"text",value:"["});const i=o[o.length-1];return i&&"text"===i.type?i.value+=r:o.push({type:"text",value:r}),o}function Ds(e){const t=e.spread;return null==t?e.children.length>1:t}function Ms(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),o=0;const a=[];for(;r;)a.push(js(t.slice(o,r.index),o>0,!0),r[0]),o=r.index+r[0].length,r=n.exec(t);return a.push(js(t.slice(o),o>0,!1)),a.join("")}function js(e,t,n){let r=0,o=e.length;if(t){let t=e.codePointAt(r);for(;9===t||32===t;)r++,t=e.codePointAt(r)}if(n){let t=e.codePointAt(o-1);for(;9===t||32===t;)o--,t=e.codePointAt(o-1)}return o>r?e.slice(r,o):""}const Fs={blockquote:function(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)},break:function(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:"\n"}]},code:function(e,t){const n=t.value?t.value+"\n":"",r={},o=t.lang?t.lang.split(/\s+/):[];o.length>0&&(r.className=["language-"+o[0]]);let a={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(a.data={meta:t.meta}),e.patch(t,a),a=e.applyData(t,a),a={type:"element",tagName:"pre",properties:{},children:[a]},e.patch(t,a),a},delete:function(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},emphasis:function(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},footnoteReference:function(e,t){const n="string"==typeof e.options.clobberPrefix?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),o=di(r.toLowerCase()),a=e.footnoteOrder.indexOf(r);let i,s=e.footnoteCounts.get(r);void 0===s?(s=0,e.footnoteOrder.push(r),i=e.footnoteOrder.length):i=a+1,s+=1,e.footnoteCounts.set(r,s);const l={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+o,id:n+"fnref-"+o+(s>1?"-"+s:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(i)}]};e.patch(t,l);const c={type:"element",tagName:"sup",properties:{},children:[l]};return e.patch(t,c),e.applyData(t,c)},heading:function(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},html:function(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}},imageReference:function(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Ls(e,t);const o={src:di(r.url||""),alt:t.alt};null!==r.title&&void 0!==r.title&&(o.title=r.title);const a={type:"element",tagName:"img",properties:o,children:[]};return e.patch(t,a),e.applyData(t,a)},image:function(e,t){const n={src:di(t.url)};null!==t.alt&&void 0!==t.alt&&(n.alt=t.alt),null!==t.title&&void 0!==t.title&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)},inlineCode:function(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)},linkReference:function(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Ls(e,t);const o={href:di(r.url||"")};null!==r.title&&void 0!==r.title&&(o.title=r.title);const a={type:"element",tagName:"a",properties:o,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)},link:function(e,t){const n={href:di(t.url)};null!==t.title&&void 0!==t.title&&(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)},listItem:function(e,t,n){const r=e.all(t),o=n?function(e){let t=!1;if("list"===e.type){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=Ds(n[r])}return t}(n):Ds(t),a={},i=[];if("boolean"==typeof t.checked){const e=r[0];let n;e&&"element"===e.type&&"p"===e.tagName?n=e:(n={type:"element",tagName:"p",properties:{},children:[]},r.unshift(n)),n.children.length>0&&n.children.unshift({type:"text",value:" "}),n.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),a.className=["task-list-item"]}let s=-1;for(;++s<r.length;){const e=r[s];(o||0!==s||"element"!==e.type||"p"!==e.tagName)&&i.push({type:"text",value:"\n"}),"element"!==e.type||"p"!==e.tagName||o?i.push(e):i.push(...e.children)}const l=r[r.length-1];l&&(o||"element"!==l.type||"p"!==l.tagName)&&i.push({type:"text",value:"\n"});const c={type:"element",tagName:"li",properties:a,children:i};return e.patch(t,c),e.applyData(t,c)},list:function(e,t){const n={},r=e.all(t);let o=-1;for("number"==typeof t.start&&1!==t.start&&(n.start=t.start);++o<r.length;){const e=r[o];if("element"===e.type&&"li"===e.tagName&&e.properties&&Array.isArray(e.properties.className)&&e.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const a={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,a),e.applyData(t,a)},paragraph:function(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},root:function(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)},strong:function(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},table:function(e,t){const n=e.all(t),r=n.shift(),o=[];if(r){const n={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],n),o.push(n)}if(n.length>0){const r={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},a=fa(t.children[1]),i=pa(t.children[t.children.length-1]);a&&i&&(r.position={start:a,end:i}),o.push(r)}const a={type:"element",tagName:"table",properties:{},children:e.wrap(o,!0)};return e.patch(t,a),e.applyData(t,a)},tableCell:function(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},tableRow:function(e,t,n){const r=n?n.children:void 0,o=0===(r?r.indexOf(t):1)?"th":"td",a=n&&"table"===n.type?n.align:void 0,i=a?a.length:t.children.length;let s=-1;const l=[];for(;++s<i;){const n=t.children[s],r={},i=a?a[s]:void 0;i&&(r.align=i);let c={type:"element",tagName:o,properties:r,children:[]};n&&(c.children=e.all(n),e.patch(n,c),c=e.applyData(n,c)),l.push(c)}const c={type:"element",tagName:"tr",properties:{},children:e.wrap(l,!0)};return e.patch(t,c),e.applyData(t,c)},text:function(e,t){const n={type:"text",value:Ms(String(t.value))};return e.patch(t,n),e.applyData(t,n)},thematicBreak:function(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)},toml:Bs,yaml:Bs,definition:Bs,footnoteDefinition:Bs};function Bs(){}const Us="object"==typeof self?self:globalThis,zs=e=>((e,t)=>{const n=(t,n)=>(e.set(n,t),t),r=o=>{if(e.has(o))return e.get(o);const[a,i]=t[o];switch(a){case 0:case-1:return n(i,o);case 1:{const e=n([],o);for(const t of i)e.push(r(t));return e}case 2:{const e=n({},o);for(const[t,n]of i)e[r(t)]=r(n);return e}case 3:return n(new Date(i),o);case 4:{const{source:e,flags:t}=i;return n(new RegExp(e,t),o)}case 5:{const e=n(new Map,o);for(const[t,n]of i)e.set(r(t),r(n));return e}case 6:{const e=n(new Set,o);for(const t of i)e.add(r(t));return e}case 7:{const{name:e,message:t}=i;return n(new Us[e](t),o)}case 8:return n(BigInt(i),o);case"BigInt":return n(Object(BigInt(i)),o);case"ArrayBuffer":return n(new Uint8Array(i).buffer,i);case"DataView":{const{buffer:e}=new Uint8Array(i);return n(new DataView(e),i)}}return n(new Us[a](i),o)};return r})(new Map,e)(0),$s="",{toString:Gs}={},{keys:qs}=Object,Hs=e=>{const t=typeof e;if("object"!==t||!e)return[0,t];const n=Gs.call(e).slice(8,-1);switch(n){case"Array":return[1,$s];case"Object":return[2,$s];case"Date":return[3,$s];case"RegExp":return[4,$s];case"Map":return[5,$s];case"Set":return[6,$s];case"DataView":return[1,n]}return n.includes("Array")?[1,n]:n.includes("Error")?[7,n]:[2,n]},Vs=([e,t])=>0===e&&("function"===t||"symbol"===t),Ws=(e,{json:t,lossy:n}={})=>{const r=[];return((e,t,n,r)=>{const o=(e,t)=>{const o=r.push(e)-1;return n.set(t,o),o},a=r=>{if(n.has(r))return n.get(r);let[i,s]=Hs(r);switch(i){case 0:{let t=r;switch(s){case"bigint":i=8,t=r.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+s);t=null;break;case"undefined":return o([-1],r)}return o([i,t],r)}case 1:{if(s){let e=r;return"DataView"===s?e=new Uint8Array(r.buffer):"ArrayBuffer"===s&&(e=new Uint8Array(r)),o([s,[...e]],r)}const e=[],t=o([i,e],r);for(const t of r)e.push(a(t));return t}case 2:{if(s)switch(s){case"BigInt":return o([s,r.toString()],r);case"Boolean":case"Number":case"String":return o([s,r.valueOf()],r)}if(t&&"toJSON"in r)return a(r.toJSON());const n=[],l=o([i,n],r);for(const t of qs(r))!e&&Vs(Hs(r[t]))||n.push([a(t),a(r[t])]);return l}case 3:return o([i,r.toISOString()],r);case 4:{const{source:e,flags:t}=r;return o([i,{source:e,flags:t}],r)}case 5:{const t=[],n=o([i,t],r);for(const[n,o]of r)(e||!Vs(Hs(n))&&!Vs(Hs(o)))&&t.push([a(n),a(o)]);return n}case 6:{const t=[],n=o([i,t],r);for(const n of r)!e&&Vs(Hs(n))||t.push(a(n));return n}}const{message:l}=r;return o([i,{name:s,message:l}],r)};return a})(!(t||n),!!t,new Map,r)(e),r};var Ys="function"==typeof structuredClone?(e,t)=>t&&("json"in t||"lossy"in t)?zs(Ws(e,t)):structuredClone(e):(e,t)=>zs(Ws(e,t));function Ks(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 Xs(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}const Zs={}.hasOwnProperty,Qs={};function Js(e,t){e.position&&(t.position=function(e){const t=fa(e),n=pa(e);if(t&&n)return{start:t,end:n}}(e))}function el(e,t){let n=t;if(e&&e.data){const t=e.data.hName,r=e.data.hChildren,o=e.data.hProperties;if("string"==typeof t)if("element"===n.type)n.tagName=t;else{n={type:"element",tagName:t,properties:{},children:"children"in n?n.children:[n]}}"element"===n.type&&o&&Object.assign(n.properties,Ys(o)),"children"in n&&n.children&&null!=r&&(n.children=r)}return n}function tl(e,t){const n=t.data||{},r=!("value"in t)||Zs.call(n,"hProperties")||Zs.call(n,"hChildren")?{type:"element",tagName:"div",properties:{},children:e.all(t)}:{type:"text",value:t.value};return e.patch(t,r),e.applyData(t,r)}function nl(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:"\n"});++r<e.length;)r&&n.push({type:"text",value:"\n"}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:"\n"}),n}function rl(e){let t=0,n=e.charCodeAt(t);for(;9===n||32===n;)t++,n=e.charCodeAt(t);return e.slice(t)}function ol(e,t){const n=function(e,t){const n=t||Qs,r=new Map,o=new Map,a=new Map,i={...Fs,...n.handlers},s={all:function(e){const t=[];if("children"in e){const n=e.children;let r=-1;for(;++r<n.length;){const o=s.one(n[r],e);if(o){if(r&&"break"===n[r-1].type&&(Array.isArray(o)||"text"!==o.type||(o.value=rl(o.value)),!Array.isArray(o)&&"element"===o.type)){const e=o.children[0];e&&"text"===e.type&&(e.value=rl(e.value))}Array.isArray(o)?t.push(...o):t.push(o)}}}return t},applyData:el,definitionById:r,footnoteById:o,footnoteCounts:a,footnoteOrder:[],handlers:i,one:function(e,t){const n=e.type,r=s.handlers[n];if(Zs.call(s.handlers,n)&&r)return r(s,e,t);if(s.options.passThrough&&s.options.passThrough.includes(n)){if("children"in e){const{children:t,...n}=e,r=Ys(n);return r.children=s.all(e),r}return Ys(e)}return(s.options.unknownHandler||tl)(s,e,t)},options:n,patch:Js,wrap:nl};return Mn(e,function(e){if("definition"===e.type||"footnoteDefinition"===e.type){const t="definition"===e.type?r:o,n=String(e.identifier).toUpperCase();t.has(n)||t.set(n,e)}}),s}(e,t),r=n.one(e,void 0),o=function(e){const t="string"==typeof e.options.clobberPrefix?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||Ks,r=e.options.footnoteBackLabel||Xs,o=e.options.footnoteLabel||"Footnotes",a=e.options.footnoteLabelTagName||"h2",i=e.options.footnoteLabelProperties||{className:["sr-only"]},s=[];let l=-1;for(;++l<e.footnoteOrder.length;){const o=e.footnoteById.get(e.footnoteOrder[l]);if(!o)continue;const a=e.all(o),i=String(o.identifier).toUpperCase(),c=di(i.toLowerCase());let u=0;const d=[],p=e.footnoteCounts.get(i);for(;void 0!==p&&++u<=p;){d.length>0&&d.push({type:"text",value:" "});let e="string"==typeof n?n:n(l,u);"string"==typeof e&&(e={type:"text",value:e}),d.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+c+(u>1?"-"+u:""),dataFootnoteBackref:"",ariaLabel:"string"==typeof r?r:r(l,u),className:["data-footnote-backref"]},children:Array.isArray(e)?e:[e]})}const f=a[a.length-1];if(f&&"element"===f.type&&"p"===f.tagName){const e=f.children[f.children.length-1];e&&"text"===e.type?e.value+=" ":f.children.push({type:"text",value:" "}),f.children.push(...d)}else a.push(...d);const g={type:"element",tagName:"li",properties:{id:t+"fn-"+c},children:e.wrap(a,!0)};e.patch(o,g),s.push(g)}if(0!==s.length)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:a,properties:{...Ys(i),id:"footnote-label"},children:[{type:"text",value:o}]},{type:"text",value:"\n"},{type:"element",tagName:"ol",properties:{},children:e.wrap(s,!0)},{type:"text",value:"\n"}]}}(n),a=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return o&&a.children.push({type:"text",value:"\n"},o),a}function al(e,t){return e&&"run"in e?async function(n,r){const o=ol(n,{file:r,...t});await e.run(o,r)}:function(n,r){return ol(n,{file:r,...e||t})}}function il(e){if(e)throw e}var sl=Object.prototype.hasOwnProperty,ll=Object.prototype.toString,cl=Object.defineProperty,ul=Object.getOwnPropertyDescriptor,dl=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===ll.call(e)},pl=function(e){if(!e||"[object Object]"!==ll.call(e))return!1;var t,n=sl.call(e,"constructor"),r=e.constructor&&e.constructor.prototype&&sl.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!n&&!r)return!1;for(t in e);return void 0===t||sl.call(e,t)},fl=function(e,t){cl&&"__proto__"===t.name?cl(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},gl=function(e,t){if("__proto__"===t){if(!sl.call(e,t))return;if(ul)return ul(e,t).value}return e[t]},ml=function e(){var t,n,r,o,a,i,s=arguments[0],l=1,c=arguments.length,u=!1;for("boolean"==typeof s&&(u=s,s=arguments[1]||{},l=2),(null==s||"object"!=typeof s&&"function"!=typeof s)&&(s={});l<c;++l)if(null!=(t=arguments[l]))for(n in t)r=gl(s,n),s!==(o=gl(t,n))&&(u&&o&&(pl(o)||(a=dl(o)))?(a?(a=!1,i=r&&dl(r)?r:[]):i=r&&pl(r)?r:{},fl(s,{name:n,newValue:e(u,i,o)})):void 0!==o&&fl(s,{name:n,newValue:o}));return s};function hl(e){if("object"!=typeof e||null===e)return!1;const t=Object.getPrototypeOf(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)}function bl(){const e=[],t={run:function(...t){let n=-1;const r=t.pop();if("function"!=typeof r)throw new TypeError("Expected function as last argument, not "+r);!function o(a,...i){const s=e[++n];let l=-1;if(a)r(a);else{for(;++l<t.length;)null!==i[l]&&void 0!==i[l]||(i[l]=t[l]);t=i,s?function(e,t){let n;return r;function r(...t){const r=e.length>t.length;let i;r&&t.push(o);try{i=e.apply(this,t)}catch(e){if(r&&n)throw e;return o(e)}r||(i&&i.then&&"function"==typeof i.then?i.then(a,o):i instanceof Error?o(i):a(i))}function o(e,...r){n||(n=!0,t(e,...r))}function a(e){o(null,e)}}(s,o)(...i):r(null,...i)}}(null,...t)},use:function(n){if("function"!=typeof n)throw new TypeError("Expected `middelware` to be a function, not "+n);return e.push(n),t}};return t}const yl={basename:function(e,t){if(void 0!==t&&"string"!=typeof t)throw new TypeError('"ext" argument must be a string');vl(e);let n,r=0,o=-1,a=e.length;if(void 0===t||0===t.length||t.length>e.length){for(;a--;)if(47===e.codePointAt(a)){if(n){r=a+1;break}}else o<0&&(n=!0,o=a+1);return o<0?"":e.slice(r,o)}if(t===e)return"";let i=-1,s=t.length-1;for(;a--;)if(47===e.codePointAt(a)){if(n){r=a+1;break}}else i<0&&(n=!0,i=a+1),s>-1&&(e.codePointAt(a)===t.codePointAt(s--)?s<0&&(o=a):(s=-1,o=i));r===o?o=i:o<0&&(o=e.length);return e.slice(r,o)},dirname:function(e){if(vl(e),0===e.length)return".";let t,n=-1,r=e.length;for(;--r;)if(47===e.codePointAt(r)){if(t){n=r;break}}else t||(t=!0);return n<0?47===e.codePointAt(0)?"/":".":1===n&&47===e.codePointAt(0)?"//":e.slice(0,n)},extname:function(e){vl(e);let t,n=e.length,r=-1,o=0,a=-1,i=0;for(;n--;){const s=e.codePointAt(n);if(47!==s)r<0&&(t=!0,r=n+1),46===s?a<0?a=n:1!==i&&(i=1):a>-1&&(i=-1);else if(t){o=n+1;break}}if(a<0||r<0||0===i||1===i&&a===r-1&&a===o+1)return"";return e.slice(a,r)},join:function(...e){let t,n=-1;for(;++n<e.length;)vl(e[n]),e[n]&&(t=void 0===t?e[n]:t+"/"+e[n]);return void 0===t?".":function(e){vl(e);const t=47===e.codePointAt(0);let n=function(e,t){let n,r,o="",a=0,i=-1,s=0,l=-1;for(;++l<=e.length;){if(l<e.length)n=e.codePointAt(l);else{if(47===n)break;n=47}if(47===n){if(i===l-1||1===s);else if(i!==l-1&&2===s){if(o.length<2||2!==a||46!==o.codePointAt(o.length-1)||46!==o.codePointAt(o.length-2))if(o.length>2){if(r=o.lastIndexOf("/"),r!==o.length-1){r<0?(o="",a=0):(o=o.slice(0,r),a=o.length-1-o.lastIndexOf("/")),i=l,s=0;continue}}else if(o.length>0){o="",a=0,i=l,s=0;continue}t&&(o=o.length>0?o+"/..":"..",a=2)}else o.length>0?o+="/"+e.slice(i+1,l):o=e.slice(i+1,l),a=l-i-1;i=l,s=0}else 46===n&&s>-1?s++:s=-1}return o}(e,!t);0!==n.length||t||(n=".");n.length>0&&47===e.codePointAt(e.length-1)&&(n+="/");return t?"/"+n:n}(t)},sep:"/"};function vl(e){if("string"!=typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const wl={cwd:function(){return"/"}};function Sl(e){return Boolean(null!==e&&"object"==typeof e&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&void 0===e.auth)}function xl(e){if("string"==typeof e)e=new URL(e);else if(!Sl(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("file:"!==e.protocol){const e=new TypeError("The URL must be of scheme file");throw e.code="ERR_INVALID_URL_SCHEME",e}return function(e){if(""!==e.hostname){const e=new TypeError('File URL host must be "localhost" or empty on darwin');throw e.code="ERR_INVALID_FILE_URL_HOST",e}const t=e.pathname;let n=-1;for(;++n<t.length;)if(37===t.codePointAt(n)&&50===t.codePointAt(n+1)){const e=t.codePointAt(n+2);if(70===e||102===e){const e=new TypeError("File URL path must not include encoded / characters");throw e.code="ERR_INVALID_FILE_URL_PATH",e}}return decodeURIComponent(t)}(e)}const El=["history","path","basename","stem","extname","dirname"];class kl{constructor(e){let t;t=e?Sl(e)?{path:e}:"string"==typeof e||function(e){return Boolean(e&&"object"==typeof e&&"byteLength"in e&&"byteOffset"in e)}(e)?{value:e}:e:{},this.cwd="cwd"in t?"":wl.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let n,r=-1;for(;++r<El.length;){const e=El[r];e in t&&void 0!==t[e]&&null!==t[e]&&(this[e]="history"===e?[...t[e]]:t[e])}for(n in t)El.includes(n)||(this[n]=t[n])}get basename(){return"string"==typeof this.path?yl.basename(this.path):void 0}set basename(e){Tl(e,"basename"),Al(e,"basename"),this.path=yl.join(this.dirname||"",e)}get dirname(){return"string"==typeof this.path?yl.dirname(this.path):void 0}set dirname(e){Ol(this.basename,"dirname"),this.path=yl.join(e||"",this.basename)}get extname(){return"string"==typeof this.path?yl.extname(this.path):void 0}set extname(e){if(Al(e,"extname"),Ol(this.dirname,"extname"),e){if(46!==e.codePointAt(0))throw new Error("`extname` must start with `.`");if(e.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=yl.join(this.dirname,this.stem+(e||""))}get path(){return this.history[this.history.length-1]}set path(e){Sl(e)&&(e=xl(e)),Tl(e,"path"),this.path!==e&&this.history.push(e)}get stem(){return"string"==typeof this.path?yl.basename(this.path,this.extname):void 0}set stem(e){Tl(e,"stem"),Al(e,"stem"),this.path=yl.join(this.dirname||"",e+(this.extname||""))}fail(e,t,n){const r=this.message(e,t,n);throw r.fatal=!0,r}info(e,t,n){const r=this.message(e,t,n);return r.fatal=void 0,r}message(e,t,n){const r=new va(e,t,n);return this.path&&(r.name=this.path+":"+r.name,r.file=this.path),r.fatal=!1,this.messages.push(r),r}toString(e){if(void 0===this.value)return"";if("string"==typeof this.value)return this.value;return new TextDecoder(e||void 0).decode(this.value)}}function Al(e,t){if(e&&e.includes(yl.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+yl.sep+"`")}function Tl(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function Ol(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}const Cl=function(e){const t=this.constructor.prototype,n=t[e],r=function(){return n.apply(r,arguments)};return Object.setPrototypeOf(r,t),r},Il={}.hasOwnProperty;class Nl extends Cl{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=bl()}copy(){const e=new Nl;let t=-1;for(;++t<this.attachers.length;){const n=this.attachers[t];e.use(...n)}return e.data(ml(!0,{},this.namespace)),e}data(e,t){return"string"==typeof e?2===arguments.length?(Ll("data",this.frozen),this.namespace[e]=t,this):Il.call(this.namespace,e)&&this.namespace[e]||void 0:e?(Ll("data",this.frozen),this.namespace=e,this):this.namespace}freeze(){if(this.frozen)return this;const e=this;for(;++this.freezeIndex<this.attachers.length;){const[t,...n]=this.attachers[this.freezeIndex];if(!1===n[0])continue;!0===n[0]&&(n[0]=void 0);const r=t.call(e,...n);"function"==typeof r&&this.transformers.use(r)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(e){this.freeze();const t=jl(e),n=this.parser||this.Parser;return _l("parse",n),n(String(t),t)}process(e,t){const n=this;return this.freeze(),_l("process",this.parser||this.Parser),Pl("process",this.compiler||this.Compiler),t?r(void 0,t):new Promise(r);function r(r,o){const a=jl(e),i=n.parse(a);function s(e,n){e||!n?o(e):r?r(n):t(void 0,n)}n.run(i,a,function(e,t,r){if(e||!t||!r)return s(e);const o=t,a=n.stringify(o,r);var i;"string"==typeof(i=a)||function(e){return Boolean(e&&"object"==typeof e&&"byteLength"in e&&"byteOffset"in e)}(i)?r.value=a:r.result=a,s(e,r)})}}processSync(e){let t,n=!1;return this.freeze(),_l("processSync",this.parser||this.Parser),Pl("processSync",this.compiler||this.Compiler),this.process(e,function(e,r){n=!0,il(e),t=r}),Ml("processSync","process",n),t}run(e,t,n){Dl(e),this.freeze();const r=this.transformers;return n||"function"!=typeof t||(n=t,t=void 0),n?o(void 0,n):new Promise(o);function o(o,a){const i=jl(t);r.run(e,i,function(t,r,i){const s=r||e;t?a(t):o?o(s):n(void 0,s,i)})}}runSync(e,t){let n,r=!1;return this.run(e,t,function(e,t){il(e),n=t,r=!0}),Ml("runSync","run",r),n}stringify(e,t){this.freeze();const n=jl(t),r=this.compiler||this.Compiler;return Pl("stringify",r),Dl(e),r(e,n)}use(e,...t){const n=this.attachers,r=this.namespace;if(Ll("use",this.frozen),null==e);else if("function"==typeof e)s(e,t);else{if("object"!=typeof e)throw new TypeError("Expected usable value, not `"+e+"`");Array.isArray(e)?i(e):a(e)}return this;function o(e){if("function"==typeof e)s(e,[]);else{if("object"!=typeof e)throw new TypeError("Expected usable value, not `"+e+"`");if(Array.isArray(e)){const[t,...n]=e;s(t,n)}else a(e)}}function a(e){if(!("plugins"in e)&&!("settings"in e))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");i(e.plugins),e.settings&&(r.settings=ml(!0,r.settings,e.settings))}function i(e){let t=-1;if(null==e);else{if(!Array.isArray(e))throw new TypeError("Expected a list of plugins, not `"+e+"`");for(;++t<e.length;){o(e[t])}}}function s(e,t){let r=-1,o=-1;for(;++r<n.length;)if(n[r][0]===e){o=r;break}if(-1===o)n.push([e,...t]);else if(t.length>0){let[r,...a]=t;const i=n[o][1];hl(i)&&hl(r)&&(r=ml(!0,i,r)),n[o]=[e,r,...a]}}}}const Rl=(new Nl).freeze();function _l(e,t){if("function"!=typeof t)throw new TypeError("Cannot `"+e+"` without `parser`")}function Pl(e,t){if("function"!=typeof t)throw new TypeError("Cannot `"+e+"` without `compiler`")}function Ll(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 Dl(e){if(!hl(e)||"string"!=typeof e.type)throw new TypeError("Expected node, got `"+e+"`")}function Ml(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function jl(e){return function(e){return Boolean(e&&"object"==typeof e&&"message"in e&&"messages"in e)}(e)?e:new kl(e)}const Fl=[],Bl={allowDangerousHtml:!0},Ul=/^(https?|ircs?|mailto|xmpp)$/i,zl=[{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 $l(e){const t=function(e){const t=e.rehypePlugins||Fl,n=e.remarkPlugins||Fl,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...Bl}:Bl,o=Rl().use(Ps).use(n).use(al,r).use(t);return o}(e),r=function(e){const t=e.children||"",n=new kl;"string"==typeof t&&(n.value=t);return n}(e);return function(e,t){const r=t.allowedElements,o=t.allowElement,a=t.components,i=t.disallowedElements,s=t.skipHtml,l=t.unwrapDisallowed,c=t.urlTransform||Gl;for(const e of zl)Object.hasOwn(t,e.from)&&Qr((e.from,e.to&&e.to,e.id));t.className&&(e={type:"element",tagName:"div",properties:{className:t.className},children:"root"===e.type?e.children:[e]});return Mn(e,u),Ta(e,{Fragment:n.Fragment,components:a,ignoreInvalidStyle:!0,jsx:n.jsx,jsxs:n.jsxs,passKeys:!0,passNode:!0});function u(e,t,n){if("raw"===e.type&&n&&"number"==typeof t)return s?n.children.splice(t,1):n.children[t]={type:"text",value:e.value},t;if("element"===e.type){let t;for(t in Ma)if(Object.hasOwn(Ma,t)&&Object.hasOwn(e.properties,t)){const n=e.properties[t],r=Ma[t];(null===r||r.includes(e.tagName))&&(e.properties[t]=c(String(n||""),t,e))}}if("element"===e.type){let a=r?!r.includes(e.tagName):!!i&&i.includes(e.tagName);if(!a&&o&&"number"==typeof t&&(a=!o(e,t,n)),a&&n&&"number"==typeof t)return l&&e.children?n.children.splice(t,1,...e.children):n.children.splice(t,1),t}}}(t.runSync(t.parse(r),r),e)}function Gl(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),o=e.indexOf("/");return-1===t||-1!==o&&t>o||-1!==n&&t>n||-1!==r&&t>r||Ul.test(e.slice(0,t))?e:""}function ql(e,t){const n=String(e);if("string"!=typeof t)throw new TypeError("Expected character");let r=0,o=n.indexOf(t);for(;-1!==o;)r++,o=n.indexOf(t,o+t.length);return r}function Hl(e,t,n){const r=Cn((n||{}).ignore||[]),o=function(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<n.length;){const e=n[r];t.push([Vl(e[0]),Wl(e[1])])}return t}(t);let a=-1;for(;++a<o.length;)Dn(e,"text",i);function i(e,t){let n,i=-1;for(;++i<t.length;){const e=t[i],o=n?n.children:void 0;if(r(e,o?o.indexOf(e):void 0,n))return;n=e}if(n)return function(e,t){const n=t[t.length-1],r=o[a][0],i=o[a][1];let s=0;const l=n.children.indexOf(e);let c=!1,u=[];r.lastIndex=0;let d=r.exec(e.value);for(;d;){const n=d.index,o={index:d.index,input:d.input,stack:[...t,e]};let a=i(...d,o);if("string"==typeof a&&(a=a.length>0?{type:"text",value:a}:void 0),!1===a?r.lastIndex=n+1:(s!==n&&u.push({type:"text",value:e.value.slice(s,n)}),Array.isArray(a)?u.push(...a):a&&u.push(a),s=n+d[0].length,c=!0),!r.global)break;d=r.exec(e.value)}c?(s<e.value.length&&u.push({type:"text",value:e.value.slice(s)}),n.children.splice(l,1,...u)):u=[e];return l+u.length}(e,t)}}function Vl(e){return"string"==typeof e?new RegExp(function(e){if("string"!=typeof e)throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}(e),"g"):e}function Wl(e){return"function"==typeof e?e:function(){return e}}const Yl="phrasing",Kl=["autolink","link","image","label"];function Xl(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Zl(e){this.config.enter.autolinkProtocol.call(this,e)}function Ql(e){this.config.exit.autolinkProtocol.call(this,e)}function Jl(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function ec(e){this.config.exit.autolinkEmail.call(this,e)}function tc(e){this.exit(e)}function nc(e){Hl(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,rc],[/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu,oc]],{ignore:["link","linkReference"]})}function rc(e,t,n,r,o){let a="";if(!ac(o))return!1;if(/^w/i.test(t)&&(n=t+n,t="",a="http://"),!function(e){const t=e.split(".");if(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))return!1;return!0}(n))return!1;const i=function(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const o=ql(e,"(");let a=ql(e,")");for(;-1!==r&&o>a;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),a++;return[e,n]}(n+r);if(!i[0])return!1;const s={type:"link",title:null,url:a+t+i[0],children:[{type:"text",value:t+i[0]}]};return i[1]?[s,{type:"text",value:i[1]}]:s}function oc(e,t,n,r){return!(!ac(r,!0)||/[-\d_]$/.test(n))&&{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function ac(e,t){const n=e.input.charCodeAt(e.index-1);return(0===e.index||ci(n)||li(n))&&(!t||47!==n)}function ic(){this.buffer()}function sc(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function lc(){this.buffer()}function cc(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function uc(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Za(this.sliceSerialize(e)).toLowerCase(),n.label=t}function dc(e){this.exit(e)}function pc(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Za(this.sliceSerialize(e)).toLowerCase(),n.label=t}function fc(e){this.exit(e)}function gc(e,t,n,r){const o=n.createTracker(r);let a=o.move("[^");const i=n.enter("footnoteReference"),s=n.enter("reference");return a+=o.move(n.safe(n.associationId(e),{after:"]",before:a})),s(),i(),a+=o.move("]"),a}function mc(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:function(e,n,r,o){const a=r.createTracker(o);let i=a.move("[^");const s=r.enter("footnoteDefinition"),l=r.enter("label");i+=a.move(r.safe(r.associationId(e),{before:i,after:"]"})),l(),i+=a.move("]:"),e.children&&e.children.length>0&&(a.shift(4),i+=a.move((t?"\n":" ")+r.indentLines(r.containerFlow(e,a.current()),t?bc:hc)));return s(),i},footnoteReference:gc},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]}}function hc(e,t,n){return 0===t?e:bc(e,t,n)}function bc(e,t,n){return(n?"":" ")+e}gc.peek=function(){return"["};const yc=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];function vc(e){this.enter({type:"delete",children:[]},e)}function wc(e){this.exit(e)}function Sc(e,t,n,r){const o=n.createTracker(r),a=n.enter("strikethrough");let i=o.move("~~");return i+=n.containerPhrasing(e,{...o.current(),before:i,after:"~"}),i+=o.move("~~"),a(),i}function xc(e){return e.length}function Ec(e){return null==e?"":String(e)}function kc(e){const t="string"==typeof e?e.codePointAt(0):0;return 67===t||99===t?99:76===t||108===t?108:82===t||114===t?114:0}function Ac(e,t,n){return">"+(n?"":" ")+e}function Tc(e,t){return Oc(e,t.inConstruct,!0)&&!Oc(e,t.notInConstruct,!1)}function Oc(e,t,n){if("string"==typeof t&&(t=[t]),!t||0===t.length)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function Cc(e,t,n,r){let o=-1;for(;++o<n.unsafe.length;)if("\n"===n.unsafe[o].character&&Tc(n.stack,n.unsafe[o]))return/[ \t]/.test(r.before)?"":" ";return"\\\n"}function Ic(e,t,n){return(n?"":" ")+e}function Nc(e){const t=e.options.quote||'"';if('"'!==t&&"'"!==t)throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function Rc(e){return"&#x"+e.toString(16).toUpperCase()+";"}function _c(e,t,n){const r=hi(e),o=hi(t);return void 0===r?void 0===o?"_"===n?{inside:!0,outside:!0}:{inside:!1,outside:!1}:1===o?{inside:!0,outside:!0}:{inside:!1,outside:!0}:1===r?void 0===o?{inside:!1,outside:!1}:1===o?{inside:!0,outside:!0}:{inside:!1,outside:!1}:void 0===o?{inside:!1,outside:!1}:1===o?{inside:!0,outside:!1}:{inside:!1,outside:!1}}function Pc(e,t,n,r){const o=function(e){const t=e.options.emphasis||"*";if("*"!==t&&"_"!==t)throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}(n),a=n.enter("emphasis"),i=n.createTracker(r),s=i.move(o);let l=i.move(n.containerPhrasing(e,{after:o,before:s,...i.current()}));const c=l.charCodeAt(0),u=_c(r.before.charCodeAt(r.before.length-1),c,o);u.inside&&(l=Rc(c)+l.slice(1));const d=l.charCodeAt(l.length-1),p=_c(r.after.charCodeAt(0),d,o);p.inside&&(l=l.slice(0,-1)+Rc(d));const f=i.move(o);return a(),n.attentionEncodeSurroundingInfo={after:p.outside,before:u.outside},s+l+f}function Lc(e){return e.value||""}function Dc(e,t,n,r){const o=Nc(n),a='"'===o?"Quote":"Apostrophe",i=n.enter("image");let s=n.enter("label");const l=n.createTracker(r);let c=l.move("![");return c+=l.move(n.safe(e.alt,{before:c,after:"]",...l.current()})),c+=l.move("]("),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=n.enter("destinationLiteral"),c+=l.move("<"),c+=l.move(n.safe(e.url,{before:c,after:">",...l.current()})),c+=l.move(">")):(s=n.enter("destinationRaw"),c+=l.move(n.safe(e.url,{before:c,after:e.title?" ":")",...l.current()}))),s(),e.title&&(s=n.enter(`title${a}`),c+=l.move(" "+o),c+=l.move(n.safe(e.title,{before:c,after:o,...l.current()})),c+=l.move(o),s()),c+=l.move(")"),i(),c}function Mc(e,t,n,r){const o=e.referenceType,a=n.enter("imageReference");let i=n.enter("label");const s=n.createTracker(r);let l=s.move("![");const c=n.safe(e.alt,{before:l,after:"]",...s.current()});l+=s.move(c+"]["),i();const u=n.stack;n.stack=[],i=n.enter("reference");const d=n.safe(n.associationId(e),{before:l,after:"]",...s.current()});return i(),n.stack=u,a(),"full"!==o&&c&&c===d?"shortcut"===o?l=l.slice(0,-1):l+=s.move("]"):l+=s.move(d+"]"),l}function jc(e,t,n){let r=e.value||"",o="`",a=-1;for(;new RegExp("(^|[^`])"+o+"([^`]|$)").test(r);)o+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++a<n.unsafe.length;){const e=n.unsafe[a],t=n.compilePattern(e);let o;if(e.atBreak)for(;o=t.exec(r);){let e=o.index;10===r.charCodeAt(e)&&13===r.charCodeAt(e-1)&&e--,r=r.slice(0,e)+" "+r.slice(o.index+1)}}return o+r+o}function Fc(e,t){const n=Fa(e);return Boolean(!t.options.resourceLink&&e.url&&!e.title&&e.children&&1===e.children.length&&"text"===e.children[0].type&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}function Bc(e,t,n,r){const o=Nc(n),a='"'===o?"Quote":"Apostrophe",i=n.createTracker(r);let s,l;if(Fc(e,n)){const t=n.stack;n.stack=[],s=n.enter("autolink");let r=i.move("<");return r+=i.move(n.containerPhrasing(e,{before:r,after:">",...i.current()})),r+=i.move(">"),s(),n.stack=t,r}s=n.enter("link"),l=n.enter("label");let c=i.move("[");return c+=i.move(n.containerPhrasing(e,{before:c,after:"](",...i.current()})),c+=i.move("]("),l(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(l=n.enter("destinationLiteral"),c+=i.move("<"),c+=i.move(n.safe(e.url,{before:c,after:">",...i.current()})),c+=i.move(">")):(l=n.enter("destinationRaw"),c+=i.move(n.safe(e.url,{before:c,after:e.title?" ":")",...i.current()}))),l(),e.title&&(l=n.enter(`title${a}`),c+=i.move(" "+o),c+=i.move(n.safe(e.title,{before:c,after:o,...i.current()})),c+=i.move(o),l()),c+=i.move(")"),s(),c}function Uc(e,t,n,r){const o=e.referenceType,a=n.enter("linkReference");let i=n.enter("label");const s=n.createTracker(r);let l=s.move("[");const c=n.containerPhrasing(e,{before:l,after:"]",...s.current()});l+=s.move(c+"]["),i();const u=n.stack;n.stack=[],i=n.enter("reference");const d=n.safe(n.associationId(e),{before:l,after:"]",...s.current()});return i(),n.stack=u,a(),"full"!==o&&c&&c===d?"shortcut"===o?l=l.slice(0,-1):l+=s.move("]"):l+=s.move(d+"]"),l}function zc(e){const t=e.options.bullet||"*";if("*"!==t&&"+"!==t&&"-"!==t)throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function $c(e){const t=e.options.rule||"*";if("*"!==t&&"-"!==t&&"_"!==t)throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}Sc.peek=function(){return"~"},Pc.peek=function(e,t,n){return n.options.emphasis||"*"},Lc.peek=function(){return"<"},Dc.peek=function(){return"!"},Mc.peek=function(){return"!"},jc.peek=function(){return"`"},Bc.peek=function(e,t,n){return Fc(e,n)?"<":"["},Uc.peek=function(){return"["};const Gc=Cn(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function qc(e,t,n,r){const o=function(e){const t=e.options.strong||"*";if("*"!==t&&"_"!==t)throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}(n),a=n.enter("strong"),i=n.createTracker(r),s=i.move(o+o);let l=i.move(n.containerPhrasing(e,{after:o,before:s,...i.current()}));const c=l.charCodeAt(0),u=_c(r.before.charCodeAt(r.before.length-1),c,o);u.inside&&(l=Rc(c)+l.slice(1));const d=l.charCodeAt(l.length-1),p=_c(r.after.charCodeAt(0),d,o);p.inside&&(l=l.slice(0,-1)+Rc(d));const f=i.move(o+o);return a(),n.attentionEncodeSurroundingInfo={after:p.outside,before:u.outside},s+l+f}qc.peek=function(e,t,n){return n.options.strong||"*"};const Hc={blockquote:function(e,t,n,r){const o=n.enter("blockquote"),a=n.createTracker(r);a.move("> "),a.shift(2);const i=n.indentLines(n.containerFlow(e,a.current()),Ac);return o(),i},break:Cc,code:function(e,t,n,r){const o=function(e){const t=e.options.fence||"`";if("`"!==t&&"~"!==t)throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}(n),a=e.value||"",i="`"===o?"GraveAccent":"Tilde";if(function(e,t){return Boolean(!1===t.options.fences&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}(e,n)){const e=n.enter("codeIndented"),t=n.indentLines(a,Ic);return e(),t}const s=n.createTracker(r),l=o.repeat(Math.max(function(e,t){const n=String(e);let r=n.indexOf(t),o=r,a=0,i=0;if("string"!=typeof t)throw new TypeError("Expected substring");for(;-1!==r;)r===o?++a>i&&(i=a):a=1,o=r+t.length,r=n.indexOf(t,o);return i}(a,o)+1,3)),c=n.enter("codeFenced");let u=s.move(l);if(e.lang){const t=n.enter(`codeFencedLang${i}`);u+=s.move(n.safe(e.lang,{before:u,after:" ",encode:["`"],...s.current()})),t()}if(e.lang&&e.meta){const t=n.enter(`codeFencedMeta${i}`);u+=s.move(" "),u+=s.move(n.safe(e.meta,{before:u,after:"\n",encode:["`"],...s.current()})),t()}return u+=s.move("\n"),a&&(u+=s.move(a+"\n")),u+=s.move(l),c(),u},definition:function(e,t,n,r){const o=Nc(n),a='"'===o?"Quote":"Apostrophe",i=n.enter("definition");let s=n.enter("label");const l=n.createTracker(r);let c=l.move("[");return c+=l.move(n.safe(n.associationId(e),{before:c,after:"]",...l.current()})),c+=l.move("]: "),s(),!e.url||/[\0- \u007F]/.test(e.url)?(s=n.enter("destinationLiteral"),c+=l.move("<"),c+=l.move(n.safe(e.url,{before:c,after:">",...l.current()})),c+=l.move(">")):(s=n.enter("destinationRaw"),c+=l.move(n.safe(e.url,{before:c,after:e.title?" ":"\n",...l.current()}))),s(),e.title&&(s=n.enter(`title${a}`),c+=l.move(" "+o),c+=l.move(n.safe(e.title,{before:c,after:o,...l.current()})),c+=l.move(o),s()),i(),c},emphasis:Pc,hardBreak:Cc,heading:function(e,t,n,r){const o=Math.max(Math.min(6,e.depth||1),1),a=n.createTracker(r);if(function(e,t){let n=!1;return Mn(e,function(e){if("value"in e&&/\r?\n|\r/.test(e.value)||"break"===e.type)return n=!0,Pn}),Boolean((!e.depth||e.depth<3)&&Fa(e)&&(t.options.setext||n))}(e,n)){const t=n.enter("headingSetext"),r=n.enter("phrasing"),i=n.containerPhrasing(e,{...a.current(),before:"\n",after:"\n"});return r(),t(),i+"\n"+(1===o?"=":"-").repeat(i.length-(Math.max(i.lastIndexOf("\r"),i.lastIndexOf("\n"))+1))}const i="#".repeat(o),s=n.enter("headingAtx"),l=n.enter("phrasing");a.move(i+" ");let c=n.containerPhrasing(e,{before:"# ",after:"\n",...a.current()});return/^[\t ]/.test(c)&&(c=Rc(c.charCodeAt(0))+c.slice(1)),c=c?i+" "+c:i,n.options.closeAtx&&(c+=" "+i),l(),s(),c},html:Lc,image:Dc,imageReference:Mc,inlineCode:jc,link:Bc,linkReference:Uc,list:function(e,t,n,r){const o=n.enter("list"),a=n.bulletCurrent;let i=e.ordered?function(e){const t=e.options.bulletOrdered||".";if("."!==t&&")"!==t)throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}(n):zc(n);const s=e.ordered?"."===i?")":".":function(e){const t=zc(e),n=e.options.bulletOther;if(!n)return"*"===t?"-":"*";if("*"!==n&&"+"!==n&&"-"!==n)throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}(n);let l=!(!t||!n.bulletLastUsed)&&i===n.bulletLastUsed;if(!e.ordered){const t=e.children?e.children[0]:void 0;if("*"!==i&&"-"!==i||!t||t.children&&t.children[0]||"list"!==n.stack[n.stack.length-1]||"listItem"!==n.stack[n.stack.length-2]||"list"!==n.stack[n.stack.length-3]||"listItem"!==n.stack[n.stack.length-4]||0!==n.indexStack[n.indexStack.length-1]||0!==n.indexStack[n.indexStack.length-2]||0!==n.indexStack[n.indexStack.length-3]||(l=!0),$c(n)===i&&t){let t=-1;for(;++t<e.children.length;){const n=e.children[t];if(n&&"listItem"===n.type&&n.children&&n.children[0]&&"thematicBreak"===n.children[0].type){l=!0;break}}}}l&&(i=s),n.bulletCurrent=i;const c=n.containerFlow(e,r);return n.bulletLastUsed=i,n.bulletCurrent=a,o(),c},listItem:function(e,t,n,r){const o=function(e){const t=e.options.listItemIndent||"one";if("tab"!==t&&"one"!==t&&"mixed"!==t)throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}(n);let a=n.bulletCurrent||zc(n);t&&"list"===t.type&&t.ordered&&(a=("number"==typeof t.start&&t.start>-1?t.start:1)+(!1===n.options.incrementListMarker?0:t.children.indexOf(e))+a);let i=a.length+1;("tab"===o||"mixed"===o&&(t&&"list"===t.type&&t.spread||e.spread))&&(i=4*Math.ceil(i/4));const s=n.createTracker(r);s.move(a+" ".repeat(i-a.length)),s.shift(i);const l=n.enter("listItem"),c=n.indentLines(n.containerFlow(e,s.current()),function(e,t,n){if(t)return(n?"":" ".repeat(i))+e;return(n?a:a+" ".repeat(i-a.length))+e});return l(),c},paragraph:function(e,t,n,r){const o=n.enter("paragraph"),a=n.enter("phrasing"),i=n.containerPhrasing(e,r);return a(),o(),i},root:function(e,t,n,r){return(e.children.some(function(e){return Gc(e)})?n.containerPhrasing:n.containerFlow).call(n,e,r)},strong:qc,text:function(e,t,n,r){return n.safe(e.value,r)},thematicBreak:function(e,t,n){const r=($c(n)+(n.options.ruleSpaces?" ":"")).repeat(function(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}(n));return n.options.ruleSpaces?r.slice(0,-1):r}};function Vc(e){const t=e._align;this.enter({type:"table",align:t.map(function(e){return"none"===e?null:e}),children:[]},e),this.data.inTable=!0}function Wc(e){this.exit(e),this.data.inTable=void 0}function Yc(e){this.enter({type:"tableRow",children:[]},e)}function Kc(e){this.exit(e)}function Xc(e){this.enter({type:"tableCell",children:[]},e)}function Zc(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,Qc));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function Qc(e,t){return"|"===t?t:e}function Jc(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,o=t.stringLength,a=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:"\n",inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[\t :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:function(e,t,n){let r=Hc.inlineCode(e,t,n);n.stack.includes("tableCell")&&(r=r.replace(/\|/g,"\\$&"));return r},table:function(e,t,n,r){return s(function(e,t,n){const r=e.children;let o=-1;const a=[],i=t.enter("table");for(;++o<r.length;)a[o]=l(r[o],t,n);return i(),a}(e,n,r),e.align)},tableCell:i,tableRow:function(e,t,n,r){const o=l(e,n,r),a=s([o]);return a.slice(0,a.indexOf("\n"))}}};function i(e,t,n,r){const o=n.enter("tableCell"),i=n.enter("phrasing"),s=n.containerPhrasing(e,{...r,before:a,after:a});return i(),o(),s}function s(e,t){return function(e,t){const n=t||{},r=(n.align||[]).concat(),o=n.stringLength||xc,a=[],i=[],s=[],l=[];let c=0,u=-1;for(;++u<e.length;){const t=[],r=[];let a=-1;for(e[u].length>c&&(c=e[u].length);++a<e[u].length;){const i=Ec(e[u][a]);if(!1!==n.alignDelimiters){const e=o(i);r[a]=e,(void 0===l[a]||e>l[a])&&(l[a]=e)}t.push(i)}i[u]=t,s[u]=r}let d=-1;if("object"==typeof r&&"length"in r)for(;++d<c;)a[d]=kc(r[d]);else{const e=kc(r);for(;++d<c;)a[d]=e}d=-1;const p=[],f=[];for(;++d<c;){const e=a[d];let t="",r="";99===e?(t=":",r=":"):108===e?t=":":114===e&&(r=":");let o=!1===n.alignDelimiters?1:Math.max(1,l[d]-t.length-r.length);const i=t+"-".repeat(o)+r;!1!==n.alignDelimiters&&(o=t.length+o+r.length,o>l[d]&&(l[d]=o),f[d]=o),p[d]=i}i.splice(1,0,p),s.splice(1,0,f),u=-1;const g=[];for(;++u<i.length;){const e=i[u],t=s[u];d=-1;const r=[];for(;++d<c;){const o=e[d]||"";let i="",s="";if(!1!==n.alignDelimiters){const e=l[d]-(t[d]||0),n=a[d];114===n?i=" ".repeat(e):99===n?e%2?(i=" ".repeat(e/2+.5),s=" ".repeat(e/2-.5)):(i=" ".repeat(e/2),s=i):s=" ".repeat(e)}!1===n.delimiterStart||d||r.push("|"),!1===n.padding||!1===n.alignDelimiters&&""===o||!1===n.delimiterStart&&!d||r.push(" "),!1!==n.alignDelimiters&&r.push(i),r.push(o),!1!==n.alignDelimiters&&r.push(s),!1!==n.padding&&r.push(" "),!1===n.delimiterEnd&&d===c-1||r.push("|")}g.push(!1===n.delimiterEnd?r.join("").replace(/ +$/,""):r.join(""))}return g.join("\n")}(e,{align:t,alignDelimiters:r,padding:n,stringLength:o})}function l(e,t,n){const r=e.children;let o=-1;const a=[],s=t.enter("tableRow");for(;++o<r.length;)a[o]=i(r[o],0,t,n);return s(),a}}function eu(e){const t=this.stack[this.stack.length-2];t.type,t.checked="taskListCheckValueChecked"===e.type}function tu(e){const t=this.stack[this.stack.length-2];if(t&&"listItem"===t.type&&"boolean"==typeof t.checked){const e=this.stack[this.stack.length-1];e.type;const n=e.children[0];if(n&&"text"===n.type){const r=t.children;let o,a=-1;for(;++a<r.length;){const e=r[a];if("paragraph"===e.type){o=e;break}}o===e&&(n.value=n.value.slice(1),0===n.value.length?e.children.shift():e.position&&n.position&&"number"==typeof n.position.start.offset&&(n.position.start.column++,n.position.start.offset++,e.position.start=Object.assign({},n.position.start)))}}this.exit(e)}function nu(e,t,n,r){const o=e.children[0],a="boolean"==typeof e.checked&&o&&"paragraph"===o.type,i="["+(e.checked?"x":" ")+"] ",s=n.createTracker(r);a&&s.move(i);let l=Hc.listItem(e,t,n,{...r,...s.current()});return a&&(l=l.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,function(e){return e+i})),l}const ru={tokenize:function(e,t,n){let r=0;return function t(a){if((87===a||119===a)&&r<3)return r++,e.consume(a),t;if(46===a&&3===r)return e.consume(a),o;return n(a)};function o(e){return null===e?n(e):t(e)}},partial:!0},ou={tokenize:function(e,t,n){let r,o,a;return i;function i(t){return 46===t||95===t?e.check(iu,l,s)(t):null===t||ii(t)||ci(t)||45!==t&&li(t)?l(t):(a=!0,e.consume(t),i)}function s(t){return 95===t?r=!0:(o=r,r=void 0),e.consume(t),i}function l(e){return o||r||!a?n(e):t(e)}},partial:!0},au={tokenize:function(e,t){let n=0,r=0;return o;function o(i){return 40===i?(n++,e.consume(i),o):41===i&&r<n?a(i):33===i||34===i||38===i||39===i||41===i||42===i||44===i||46===i||58===i||59===i||60===i||63===i||93===i||95===i||126===i?e.check(iu,t,a)(i):null===i||ii(i)||ci(i)?t(i):(e.consume(i),o)}function a(t){return 41===t&&r++,e.consume(t),o}},partial:!0},iu={tokenize:function(e,t,n){return r;function r(i){return 33===i||34===i||39===i||41===i||42===i||44===i||46===i||58===i||59===i||63===i||95===i||126===i?(e.consume(i),r):38===i?(e.consume(i),a):93===i?(e.consume(i),o):60===i||null===i||ii(i)||ci(i)?t(i):n(i)}function o(e){return null===e||40===e||91===e||ii(e)||ci(e)?t(e):r(e)}function a(e){return Qa(e)?i(e):n(e)}function i(t){return 59===t?(e.consume(t),r):Qa(t)?(e.consume(t),i):n(t)}},partial:!0},su={tokenize:function(e,t,n){return function(t){return e.consume(t),r};function r(e){return Ja(e)?n(e):t(e)}},partial:!0},lu={name:"wwwAutolink",tokenize:function(e,t,n){const r=this;return function(t){if(87!==t&&119!==t||!fu.call(r,r.previous)||bu(r.events))return n(t);return e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(ru,e.attempt(ou,e.attempt(au,o),n),n)(t)};function o(n){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(n)}},previous:fu},cu={name:"protocolAutolink",tokenize:function(e,t,n){const r=this;let o="",a=!1;return function(t){if((72===t||104===t)&&gu.call(r,r.previous)&&!bu(r.events))return e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),o+=String.fromCodePoint(t),e.consume(t),i;return n(t)};function i(t){if(Qa(t)&&o.length<5)return o+=String.fromCodePoint(t),e.consume(t),i;if(58===t){const n=o.toLowerCase();if("http"===n||"https"===n)return e.consume(t),s}return n(t)}function s(t){return 47===t?(e.consume(t),a?l:(a=!0,s)):n(t)}function l(t){return null===t||ti(t)||ii(t)||ci(t)||li(t)?n(t):e.attempt(ou,e.attempt(au,c),n)(t)}function c(n){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(n)}},previous:gu},uu={name:"emailAutolink",tokenize:function(e,t,n){const r=this;let o,a;return function(t){if(!hu(t)||!mu.call(r,r.previous)||bu(r.events))return n(t);return e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),i(t)};function i(t){return hu(t)?(e.consume(t),i):64===t?(e.consume(t),s):n(t)}function s(t){return 46===t?e.check(su,c,l)(t):45===t||95===t||Ja(t)?(a=!0,e.consume(t),s):c(t)}function l(t){return e.consume(t),o=!0,s}function c(i){return a&&o&&Qa(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(i)):n(i)}},previous:mu},du={};let pu=48;for(;pu<123;)du[pu]=uu,pu++,58===pu?pu=65:91===pu&&(pu=97);function fu(e){return null===e||40===e||42===e||95===e||91===e||93===e||126===e||ii(e)}function gu(e){return!Qa(e)}function mu(e){return!(47===e||hu(e))}function hu(e){return 43===e||45===e||46===e||95===e||Ja(e)}function bu(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if(("labelLink"===r.type||"labelImage"===r.type)&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}du[43]=uu,du[45]=uu,du[46]=uu,du[95]=uu,du[72]=[uu,cu],du[104]=[uu,cu],du[87]=[uu,lu],du[119]=[uu,lu];const yu={tokenize:function(e,t,n){const r=this;return pi(e,function(e){const o=r.events[r.events.length-1];return o&&"gfmFootnoteDefinitionIndent"===o[1].type&&4===o[2].sliceSerialize(o[1],!0).length?t(e):n(e)},"gfmFootnoteDefinitionIndent",5)},partial:!0};function vu(e,t,n){const r=this;let o=r.events.length;const a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let i;for(;o--;){const e=r.events[o][1];if("labelImage"===e.type){i=e;break}if("gfmFootnoteCall"===e.type||"labelLink"===e.type||"label"===e.type||"image"===e.type||"link"===e.type)break}return function(o){if(!i||!i._balanced)return n(o);const s=Za(r.sliceSerialize({start:i.end,end:r.now()}));if(94!==s.codePointAt(0)||!a.includes(s.slice(1)))return n(o);return e.enter("gfmFootnoteCallLabelMarker"),e.consume(o),e.exit("gfmFootnoteCallLabelMarker"),t(o)}}function wu(e,t){let n=e.length;for(;n--;)if("labelImage"===e[n][1].type&&"enter"===e[n][0]){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},o={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};o.end.column++,o.end.offset++,o.end._bufferIndex++;const a={type:"gfmFootnoteCallString",start:Object.assign({},o.end),end:Object.assign({},e[e.length-1][1].start)},i={type:"chunkString",contentType:"string",start:Object.assign({},a.start),end:Object.assign({},a.end)},s=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",o,t],["exit",o,t],["enter",a,t],["enter",i,t],["exit",i,t],["exit",a,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...s),e}function Su(e,t,n){const r=this,o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a,i=0;return function(t){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(t),e.exit("gfmFootnoteCallLabelMarker"),s};function s(t){return 94!==t?n(t):(e.enter("gfmFootnoteCallMarker"),e.consume(t),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",l)}function l(s){if(i>999||93===s&&!a||null===s||91===s||ii(s))return n(s);if(93===s){e.exit("chunkString");const a=e.exit("gfmFootnoteCallString");return o.includes(Za(r.sliceSerialize(a)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(s),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(s)}return ii(s)||(a=!0),i++,e.consume(s),92===s?c:l}function c(t){return 91===t||92===t||93===t?(e.consume(t),i++,l):l(t)}}function xu(e,t,n){const r=this,o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a,i,s=0;return function(t){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionLabelMarker"),l};function l(t){return 94===t?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",c):n(t)}function c(t){if(s>999||93===t&&!i||null===t||91===t||ii(t))return n(t);if(93===t){e.exit("chunkString");const n=e.exit("gfmFootnoteDefinitionLabelString");return a=Za(r.sliceSerialize(n)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),d}return ii(t)||(i=!0),s++,e.consume(t),92===t?u:c}function u(t){return 91===t||92===t||93===t?(e.consume(t),s++,c):c(t)}function d(t){return 58===t?(e.enter("definitionMarker"),e.consume(t),e.exit("definitionMarker"),o.includes(a)||o.push(a),pi(e,p,"gfmFootnoteDefinitionWhitespace")):n(t)}function p(e){return t(e)}}function Eu(e,t,n){return e.check(Si,t,e.attempt(yu,t,n))}function ku(e){e.exit("gfmFootnoteDefinition")}function Au(e){let t=(e||{}).singleTilde;const n={name:"strikethrough",tokenize:function(e,n,r){const o=this.previous,a=this.events;let i=0;return function(t){if(126===o&&"characterEscape"!==a[a.length-1][1].type)return r(t);return e.enter("strikethroughSequenceTemporary"),s(t)};function s(a){const l=hi(o);if(126===a)return i>1?r(a):(e.consume(a),i++,s);if(i<2&&!t)return r(a);const c=e.exit("strikethroughSequenceTemporary"),u=hi(a);return c._open=!u||2===u&&Boolean(l),c._close=!l||2===l&&Boolean(u),n(a)}},resolveAll:function(e,t){let n=-1;for(;++n<e.length;)if("enter"===e[n][0]&&"strikethroughSequenceTemporary"===e[n][1].type&&e[n][1]._close){let r=n;for(;r--;)if("exit"===e[r][0]&&"strikethroughSequenceTemporary"===e[r][1].type&&e[r][1]._open&&e[n][1].end.offset-e[n][1].start.offset===e[r][1].end.offset-e[r][1].start.offset){e[n][1].type="strikethroughSequence",e[r][1].type="strikethroughSequence";const o={type:"strikethrough",start:Object.assign({},e[r][1].start),end:Object.assign({},e[n][1].end)},a={type:"strikethroughText",start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},i=[["enter",o,t],["enter",e[r][1],t],["exit",e[r][1],t],["enter",a,t]],s=t.parser.constructs.insideSpan.null;s&&qa(i,i.length,0,bi(s,e.slice(r+1,n),t)),qa(i,i.length,0,[["exit",a,t],["enter",e[n][1],t],["exit",e[n][1],t],["exit",o,t]]),qa(e,r-1,n-r+3,i),n=r+i.length-2;break}}n=-1;for(;++n<e.length;)"strikethroughSequenceTemporary"===e[n][1].type&&(e[n][1].type="data");return e}};return null==t&&(t=!0),{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}}}class Tu{constructor(){this.map=[]}add(e,t,n){!function(e,t,n,r){let o=0;if(0===n&&0===r.length)return;for(;o<e.map.length;){if(e.map[o][0]===t)return e.map[o][1]+=n,void e.map[o][2].push(...r);o+=1}e.map.push([t,n,r])}(this,e,t,n)}consume(e){if(this.map.sort(function(e,t){return e[0]-t[0]}),0===this.map.length)return;let t=this.map.length;const n=[];for(;t>0;)t-=1,n.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];n.push(e.slice()),e.length=0;let r=n.pop();for(;r;){for(const t of r)e.push(t);r=n.pop()}this.map.length=0}}function Ou(e,t){let n=!1;const r=[];for(;t<e.length;){const o=e[t];if(n){if("enter"===o[0])"tableContent"===o[1].type&&r.push("tableDelimiterMarker"===e[t+1][1].type?"left":"none");else if("tableContent"===o[1].type){if("tableDelimiterMarker"===e[t-1][1].type){const e=r.length-1;r[e]="left"===r[e]?"center":"right"}}else if("tableDelimiterRow"===o[1].type)break}else"enter"===o[0]&&"tableDelimiterRow"===o[1].type&&(n=!0);t+=1}return r}function Cu(e,t,n){const r=this;let o,a=0,i=0;return function(e){let t=r.events.length-1;for(;t>-1;){const e=r.events[t][1].type;if("lineEnding"!==e&&"linePrefix"!==e)break;t--}const o=t>-1?r.events[t][1].type:null,a="tableHead"===o||"tableRow"===o?w:s;if(a===w&&r.parser.lazy[r.now().line])return n(e);return a(e)};function s(t){return e.enter("tableHead"),e.enter("tableRow"),function(e){if(124===e)return l(e);return o=!0,i+=1,l(e)}(t)}function l(t){return null===t?n(t):ai(t)?i>1?(i=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),d):n(t):si(t)?pi(e,l,"whitespace")(t):(i+=1,o&&(o=!1,a+=1),124===t?(e.enter("tableCellDivider"),e.consume(t),e.exit("tableCellDivider"),o=!0,l):(e.enter("data"),c(t)))}function c(t){return null===t||124===t||ii(t)?(e.exit("data"),l(t)):(e.consume(t),92===t?u:c)}function u(t){return 92===t||124===t?(e.consume(t),c):c(t)}function d(t){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(t):(e.enter("tableDelimiterRow"),o=!1,si(t)?pi(e,p,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):p(t))}function p(t){return 45===t||58===t?g(t):124===t?(o=!0,e.enter("tableCellDivider"),e.consume(t),e.exit("tableCellDivider"),f):v(t)}function f(t){return si(t)?pi(e,g,"whitespace")(t):g(t)}function g(t){return 58===t?(i+=1,o=!0,e.enter("tableDelimiterMarker"),e.consume(t),e.exit("tableDelimiterMarker"),m):45===t?(i+=1,m(t)):null===t||ai(t)?y(t):v(t)}function m(t){return 45===t?(e.enter("tableDelimiterFiller"),h(t)):v(t)}function h(t){return 45===t?(e.consume(t),h):58===t?(o=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(t),e.exit("tableDelimiterMarker"),b):(e.exit("tableDelimiterFiller"),b(t))}function b(t){return si(t)?pi(e,y,"whitespace")(t):y(t)}function y(n){return 124===n?p(n):(null===n||ai(n))&&o&&a===i?(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(n)):v(n)}function v(e){return n(e)}function w(t){return e.enter("tableRow"),S(t)}function S(n){return 124===n?(e.enter("tableCellDivider"),e.consume(n),e.exit("tableCellDivider"),S):null===n||ai(n)?(e.exit("tableRow"),t(n)):si(n)?pi(e,S,"whitespace")(n):(e.enter("data"),x(n))}function x(t){return null===t||124===t||ii(t)?(e.exit("data"),S(t)):(e.consume(t),92===t?E:x)}function E(t){return 92===t||124===t?(e.consume(t),x):x(t)}}function Iu(e,t){let n,r,o,a=-1,i=!0,s=0,l=[0,0,0,0],c=[0,0,0,0],u=!1,d=0;const p=new Tu;for(;++a<e.length;){const f=e[a],g=f[1];"enter"===f[0]?"tableHead"===g.type?(u=!1,0!==d&&(Ru(p,t,d,n,r),r=void 0,d=0),n={type:"table",start:Object.assign({},g.start),end:Object.assign({},g.end)},p.add(a,0,[["enter",n,t]])):"tableRow"===g.type||"tableDelimiterRow"===g.type?(i=!0,o=void 0,l=[0,0,0,0],c=[0,a+1,0,0],u&&(u=!1,r={type:"tableBody",start:Object.assign({},g.start),end:Object.assign({},g.end)},p.add(a,0,[["enter",r,t]])),s="tableDelimiterRow"===g.type?2:r?3:1):!s||"data"!==g.type&&"tableDelimiterMarker"!==g.type&&"tableDelimiterFiller"!==g.type?"tableCellDivider"===g.type&&(i?i=!1:(0!==l[1]&&(c[0]=c[1],o=Nu(p,t,l,s,void 0,o)),l=c,c=[l[1],a,0,0])):(i=!1,0===c[2]&&(0!==l[1]&&(c[0]=c[1],o=Nu(p,t,l,s,void 0,o),l=[0,0,0,0]),c[2]=a)):"tableHead"===g.type?(u=!0,d=a):"tableRow"===g.type||"tableDelimiterRow"===g.type?(d=a,0!==l[1]?(c[0]=c[1],o=Nu(p,t,l,s,a,o)):0!==c[1]&&(o=Nu(p,t,c,s,a,o)),s=0):!s||"data"!==g.type&&"tableDelimiterMarker"!==g.type&&"tableDelimiterFiller"!==g.type||(c[3]=a)}for(0!==d&&Ru(p,t,d,n,r),p.consume(t.events),a=-1;++a<t.events.length;){const e=t.events[a];"enter"===e[0]&&"table"===e[1].type&&(e[1]._align=Ou(t.events,a))}return e}function Nu(e,t,n,r,o,a){const i=1===r?"tableHeader":2===r?"tableDelimiter":"tableData";0!==n[0]&&(a.end=Object.assign({},_u(t.events,n[0])),e.add(n[0],0,[["exit",a,t]]));const s=_u(t.events,n[1]);if(a={type:i,start:Object.assign({},s),end:Object.assign({},s)},e.add(n[1],0,[["enter",a,t]]),0!==n[2]){const o=_u(t.events,n[2]),a=_u(t.events,n[3]),i={type:"tableContent",start:Object.assign({},o),end:Object.assign({},a)};if(e.add(n[2],0,[["enter",i,t]]),2!==r){const r=t.events[n[2]],o=t.events[n[3]];if(r[1].end=Object.assign({},o[1].end),r[1].type="chunkText",r[1].contentType="text",n[3]>n[2]+1){const t=n[2]+1,r=n[3]-n[2]-1;e.add(t,r,[])}}e.add(n[3]+1,0,[["exit",i,t]])}return void 0!==o&&(a.end=Object.assign({},_u(t.events,o)),e.add(o,0,[["exit",a,t]]),a=void 0),a}function Ru(e,t,n,r,o){const a=[],i=_u(t.events,n);o&&(o.end=Object.assign({},i),a.push(["exit",o,t])),r.end=Object.assign({},i),a.push(["exit",r,t]),e.add(n+1,0,a)}function _u(e,t){const n=e[t],r="enter"===n[0]?"start":"end";return n[1][r]}const Pu={name:"tasklistCheck",tokenize:function(e,t,n){const r=this;return function(t){if(null!==r.previous||!r._gfmTasklistFirstContentOfListItem)return n(t);return e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(t),e.exit("taskListCheckMarker"),o};function o(t){return ii(t)?(e.enter("taskListCheckValueUnchecked"),e.consume(t),e.exit("taskListCheckValueUnchecked"),a):88===t||120===t?(e.enter("taskListCheckValueChecked"),e.consume(t),e.exit("taskListCheckValueChecked"),a):n(t)}function a(t){return 93===t?(e.enter("taskListCheckMarker"),e.consume(t),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),i):n(t)}function i(r){return ai(r)?t(r):si(r)?e.check({tokenize:Lu},t,n)(r):n(r)}}};function Lu(e,t,n){return pi(e,function(e){return null===e?n(e):t(e)},"whitespace")}const Du={};function Mu(e){const t=e||Du,n=this.data(),r=n.micromarkExtensions||(n.micromarkExtensions=[]),o=n.fromMarkdownExtensions||(n.fromMarkdownExtensions=[]),a=n.toMarkdownExtensions||(n.toMarkdownExtensions=[]);r.push(function(e){return Wa([{text:du},{document:{91:{name:"gfmFootnoteDefinition",tokenize:xu,continuation:{tokenize:Eu},exit:ku}},text:{91:{name:"gfmFootnoteCall",tokenize:Su},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:vu,resolveTo:wu}}},Au(e),{flow:{null:{name:"table",tokenize:Cu,resolveAll:Iu}}},{text:{91:Pu}}])}(t)),o.push([{transforms:[nc],enter:{literalAutolink:Xl,literalAutolinkEmail:Zl,literalAutolinkHttp:Zl,literalAutolinkWww:Zl},exit:{literalAutolink:tc,literalAutolinkEmail:ec,literalAutolinkHttp:Ql,literalAutolinkWww:Jl}},{enter:{gfmFootnoteCallString:ic,gfmFootnoteCall:sc,gfmFootnoteDefinitionLabelString:lc,gfmFootnoteDefinition:cc},exit:{gfmFootnoteCallString:uc,gfmFootnoteCall:dc,gfmFootnoteDefinitionLabelString:pc,gfmFootnoteDefinition:fc}},{canContainEols:["delete"],enter:{strikethrough:vc},exit:{strikethrough:wc}},{enter:{table:Vc,tableData:Xc,tableHeader:Xc,tableRow:Yc},exit:{codeText:Zc,table:Wc,tableData:Kc,tableHeader:Kc,tableRow:Kc}},{exit:{taskListCheckValueChecked:eu,taskListCheckValueUnchecked:eu,paragraph:tu}}]),a.push(function(e){return{extensions:[{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Yl,notInConstruct:Kl},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Yl,notInConstruct:Kl},{character:":",before:"[ps]",after:"\\/",inConstruct:Yl,notInConstruct:Kl}]},mc(e),{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:yc}],handlers:{delete:Sc}},Jc(e),{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:nu}}]}}(t))}function ju(){return{type:"break"}}function Fu(){return function(e){!function(e){Hl(e,[/\r?\n|\r/g,ju])}(e)}}function Bu(){return e=>{Mn(e,"listItem",e=>{Mn(e,"break",(e,t,n)=>{n&&void 0!==t&&(n.children[t]={type:"text",value:"\n"})})})}}function Uu(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function zu(e){return function(e){if(Array.isArray(e))return Uu(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return Uu(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Uu(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function $u(e){return $u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},$u(e)}function Gu(e){var t=function(e,t){if("object"!=$u(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=$u(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==$u(t)?t:t+""}function qu(e,t,n){return(t=Gu(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Hu(){return Hu=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Hu.apply(null,arguments)}function Vu(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Wu(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Vu(Object(n),!0).forEach(function(t){qu(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Vu(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var Yu={};function Ku(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0;return function(e){if(0===e.length||1===e.length)return e;var t,n,r=e.join(".");return Yu[r]||(Yu[r]=0===(n=(t=e).length)||1===n?t:2===n?[t[0],t[1],"".concat(t[0],".").concat(t[1]),"".concat(t[1],".").concat(t[0])]:3===n?[t[0],t[1],t[2],"".concat(t[0],".").concat(t[1]),"".concat(t[0],".").concat(t[2]),"".concat(t[1],".").concat(t[0]),"".concat(t[1],".").concat(t[2]),"".concat(t[2],".").concat(t[0]),"".concat(t[2],".").concat(t[1]),"".concat(t[0],".").concat(t[1],".").concat(t[2]),"".concat(t[0],".").concat(t[2],".").concat(t[1]),"".concat(t[1],".").concat(t[0],".").concat(t[2]),"".concat(t[1],".").concat(t[2],".").concat(t[0]),"".concat(t[2],".").concat(t[0],".").concat(t[1]),"".concat(t[2],".").concat(t[1],".").concat(t[0])]:n>=4?[t[0],t[1],t[2],t[3],"".concat(t[0],".").concat(t[1]),"".concat(t[0],".").concat(t[2]),"".concat(t[0],".").concat(t[3]),"".concat(t[1],".").concat(t[0]),"".concat(t[1],".").concat(t[2]),"".concat(t[1],".").concat(t[3]),"".concat(t[2],".").concat(t[0]),"".concat(t[2],".").concat(t[1]),"".concat(t[2],".").concat(t[3]),"".concat(t[3],".").concat(t[0]),"".concat(t[3],".").concat(t[1]),"".concat(t[3],".").concat(t[2]),"".concat(t[0],".").concat(t[1],".").concat(t[2]),"".concat(t[0],".").concat(t[1],".").concat(t[3]),"".concat(t[0],".").concat(t[2],".").concat(t[1]),"".concat(t[0],".").concat(t[2],".").concat(t[3]),"".concat(t[0],".").concat(t[3],".").concat(t[1]),"".concat(t[0],".").concat(t[3],".").concat(t[2]),"".concat(t[1],".").concat(t[0],".").concat(t[2]),"".concat(t[1],".").concat(t[0],".").concat(t[3]),"".concat(t[1],".").concat(t[2],".").concat(t[0]),"".concat(t[1],".").concat(t[2],".").concat(t[3]),"".concat(t[1],".").concat(t[3],".").concat(t[0]),"".concat(t[1],".").concat(t[3],".").concat(t[2]),"".concat(t[2],".").concat(t[0],".").concat(t[1]),"".concat(t[2],".").concat(t[0],".").concat(t[3]),"".concat(t[2],".").concat(t[1],".").concat(t[0]),"".concat(t[2],".").concat(t[1],".").concat(t[3]),"".concat(t[2],".").concat(t[3],".").concat(t[0]),"".concat(t[2],".").concat(t[3],".").concat(t[1]),"".concat(t[3],".").concat(t[0],".").concat(t[1]),"".concat(t[3],".").concat(t[0],".").concat(t[2]),"".concat(t[3],".").concat(t[1],".").concat(t[0]),"".concat(t[3],".").concat(t[1],".").concat(t[2]),"".concat(t[3],".").concat(t[2],".").concat(t[0]),"".concat(t[3],".").concat(t[2],".").concat(t[1]),"".concat(t[0],".").concat(t[1],".").concat(t[2],".").concat(t[3]),"".concat(t[0],".").concat(t[1],".").concat(t[3],".").concat(t[2]),"".concat(t[0],".").concat(t[2],".").concat(t[1],".").concat(t[3]),"".concat(t[0],".").concat(t[2],".").concat(t[3],".").concat(t[1]),"".concat(t[0],".").concat(t[3],".").concat(t[1],".").concat(t[2]),"".concat(t[0],".").concat(t[3],".").concat(t[2],".").concat(t[1]),"".concat(t[1],".").concat(t[0],".").concat(t[2],".").concat(t[3]),"".concat(t[1],".").concat(t[0],".").concat(t[3],".").concat(t[2]),"".concat(t[1],".").concat(t[2],".").concat(t[0],".").concat(t[3]),"".concat(t[1],".").concat(t[2],".").concat(t[3],".").concat(t[0]),"".concat(t[1],".").concat(t[3],".").concat(t[0],".").concat(t[2]),"".concat(t[1],".").concat(t[3],".").concat(t[2],".").concat(t[0]),"".concat(t[2],".").concat(t[0],".").concat(t[1],".").concat(t[3]),"".concat(t[2],".").concat(t[0],".").concat(t[3],".").concat(t[1]),"".concat(t[2],".").concat(t[1],".").concat(t[0],".").concat(t[3]),"".concat(t[2],".").concat(t[1],".").concat(t[3],".").concat(t[0]),"".concat(t[2],".").concat(t[3],".").concat(t[0],".").concat(t[1]),"".concat(t[2],".").concat(t[3],".").concat(t[1],".").concat(t[0]),"".concat(t[3],".").concat(t[0],".").concat(t[1],".").concat(t[2]),"".concat(t[3],".").concat(t[0],".").concat(t[2],".").concat(t[1]),"".concat(t[3],".").concat(t[1],".").concat(t[0],".").concat(t[2]),"".concat(t[3],".").concat(t[1],".").concat(t[2],".").concat(t[0]),"".concat(t[3],".").concat(t[2],".").concat(t[0],".").concat(t[1]),"".concat(t[3],".").concat(t[2],".").concat(t[1],".").concat(t[0])]:void 0),Yu[r]}(e.filter(function(e){return"token"!==e})).reduce(function(e,t){return Wu(Wu({},e),n[t])},t)}function Xu(e){return e.join(" ")}function Zu(t){var n=t.node,r=t.stylesheet,o=t.style,a=void 0===o?{}:o,i=t.useInlineStyles,s=t.key,l=n.properties,c=n.type,u=n.tagName,d=n.value;if("text"===c)return d;if(u){var p,f=function(e,t){var n=0;return function(r){return n+=1,r.map(function(r,o){return Zu({node:r,stylesheet:e,useInlineStyles:t,key:"code-segment-".concat(n,"-").concat(o)})})}}(r,i);if(i){var g=Object.keys(r).reduce(function(e,t){return t.split(".").forEach(function(t){e.includes(t)||e.push(t)}),e},[]),m=l.className&&l.className.includes("token")?["token"]:[],h=l.className&&m.concat(l.className.filter(function(e){return!g.includes(e)}));p=Wu(Wu({},l),{},{className:Xu(h)||void 0,style:Ku(l.className,Object.assign({},l.style,a),r)})}else p=Wu(Wu({},l),{},{className:Xu(l.className)});var b=f(n.children);return e.createElement(u,Hu({key:s},p),b)}}var Qu=["language","children","style","customStyle","codeTagProps","useInlineStyles","showLineNumbers","showInlineLineNumbers","startingLineNumber","lineNumberContainerStyle","lineNumberStyle","wrapLines","wrapLongLines","lineProps","renderer","PreTag","CodeTag","code","astGenerator"];function Ju(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function ed(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ju(Object(n),!0).forEach(function(t){qu(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ju(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var td=/\n/g;function nd(t){var n=t.codeString,r=t.codeStyle,o=t.containerStyle,a=void 0===o?{float:"left",paddingRight:"10px"}:o,i=t.numberStyle,s=void 0===i?{}:i,l=t.startingLineNumber;return e.createElement("code",{style:Object.assign({},r,a)},function(t){var n=t.lines,r=t.startingLineNumber,o=t.style;return n.map(function(t,n){var a=n+r;return e.createElement("span",{key:"line-".concat(n),className:"react-syntax-highlighter-line-number",style:"function"==typeof o?o(a):o},"".concat(a,"\n"))})}({lines:n.replace(/\n$/,"").split("\n"),style:s,startingLineNumber:l}))}function rd(e){return"".concat(e.toString().length,".25em")}function od(e,t){return{type:"element",tagName:"span",properties:{key:"line-number--".concat(e),className:["comment","linenumber","react-syntax-highlighter-line-number"],style:t},children:[{type:"text",value:e}]}}function ad(e,t,n){var r={display:"inline-block",minWidth:rd(n),paddingRight:"1em",textAlign:"right",userSelect:"none"},o="function"==typeof e?e(t):e;return ed(ed({},r),o)}function id(e){var t=e.children,n=e.lineNumber,r=e.lineNumberStyle,o=e.largestLineNumber,a=e.showInlineLineNumbers,i=e.lineProps,s=void 0===i?{}:i,l=e.className,c=void 0===l?[]:l,u=e.showLineNumbers,d=e.wrapLongLines,p=e.wrapLines,f=void 0!==p&&p?ed({},"function"==typeof s?s(n):s):{};if(f.className=f.className?[].concat(zu(f.className.trim().split(/\s+/)),zu(c)):c,n&&a){var g=ad(r,n,o);t.unshift(od(n,g))}return d&u&&(f.style=ed({display:"flex"},f.style)),{type:"element",tagName:"span",properties:f,children:t}}function sd(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],r=0;r<e.length;r++){var o=e[r];if("text"===o.type)n.push(id({children:[o],className:zu(new Set(t))}));else if(o.children){var a=t.concat(o.properties.className);sd(o.children,a).forEach(function(e){return n.push(e)})}}return n}function ld(e,t,n,r,o,a,i,s,l){var c,u=sd(e.value),d=[],p=-1,f=0;function g(e,a){var c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];return t||c.length>0?function(e,a){return id({children:e,lineNumber:a,lineNumberStyle:s,largestLineNumber:i,showInlineLineNumbers:o,lineProps:n,className:arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],showLineNumbers:r,wrapLongLines:l,wrapLines:t})}(e,a,c):function(e,t){if(r&&t&&o){var n=ad(s,t,i);e.unshift(od(t,n))}return e}(e,a)}for(var m=function(){var e=u[f],t=e.children[0].value;if(t.match(td)){var n=t.split("\n");n.forEach(function(t,o){var i=r&&d.length+a,s={type:"text",value:"".concat(t,"\n")};if(0===o){var l=g(u.slice(p+1,f).concat(id({children:[s],className:e.properties.className})),i);d.push(l)}else if(o===n.length-1){var c=u[f+1]&&u[f+1].children&&u[f+1].children[0],m={type:"text",value:"".concat(t)};if(c){var h=id({children:[m],className:e.properties.className});u.splice(f+1,0,h)}else{var b=g([m],i,e.properties.className);d.push(b)}}else{var y=g([s],i,e.properties.className);d.push(y)}}),p=f}f++};f<u.length;)m();if(p!==u.length-1){var h=u.slice(p+1,u.length);if(h&&h.length){var b=g(h,r&&d.length+a);d.push(b)}}return t?d:(c=[]).concat.apply(c,d)}function cd(e){var t=e.rows,n=e.stylesheet,r=e.useInlineStyles;return t.map(function(e,t){return Zu({node:e,stylesheet:n,useInlineStyles:r,key:"code-segment-".concat(t)})})}function ud(e){return e&&void 0!==e.highlightAuto}var dd=function(){for(var e={},t=0;t<arguments.length;t++){var n=arguments[t];for(var r in n)pd.call(n,r)&&(e[r]=n[r])}return e},pd=Object.prototype.hasOwnProperty;var fd=md,gd=md.prototype;function md(e,t,n){this.property=e,this.normal=t,n&&(this.space=n)}gd.space=null,gd.normal={},gd.property={};var hd=dd,bd=fd,yd=function(e){var t,n,r=e.length,o=[],a=[],i=-1;for(;++i<r;)t=e[i],o.push(t.property),a.push(t.normal),n=t.space;return new bd(hd.apply(null,o),hd.apply(null,a),n)};var vd=function(e){return e.toLowerCase()};var wd=xd,Sd=xd.prototype;function xd(e,t){this.property=e,this.attribute=t}Sd.space=null,Sd.attribute=null,Sd.property=null,Sd.boolean=!1,Sd.booleanish=!1,Sd.overloadedBoolean=!1,Sd.number=!1,Sd.commaSeparated=!1,Sd.spaceSeparated=!1,Sd.commaOrSpaceSeparated=!1,Sd.mustUseProperty=!1,Sd.defined=!1;var Ed={},kd=0;function Ad(){return Math.pow(2,++kd)}Ed.boolean=Ad(),Ed.booleanish=Ad(),Ed.overloadedBoolean=Ad(),Ed.number=Ad(),Ed.spaceSeparated=Ad(),Ed.commaSeparated=Ad(),Ed.commaOrSpaceSeparated=Ad();var Td=wd,Od=Ed,Cd=Rd;Rd.prototype=new Td,Rd.prototype.defined=!0;var Id=["boolean","booleanish","overloadedBoolean","number","commaSeparated","spaceSeparated","commaOrSpaceSeparated"],Nd=Id.length;function Rd(e,t,n,r){var o,a=-1;for(_d(this,"space",r),Td.call(this,e,t);++a<Nd;)_d(this,o=Id[a],(n&Od[o])===Od[o])}function _d(e,t,n){n&&(e[t]=n)}var Pd=vd,Ld=fd,Dd=Cd,Md=function(e){var t,n,r=e.space,o=e.mustUseProperty||[],a=e.attributes||{},i=e.properties,s=e.transform,l={},c={};for(t in i)n=new Dd(t,s(a,t),i[t],r),-1!==o.indexOf(t)&&(n.mustUseProperty=!0),l[t]=n,c[Pd(t)]=t,c[Pd(n.attribute)]=t;return new Ld(l,c,r)};var jd=Md({space:"xlink",transform:function(e,t){return"xlink:"+t.slice(5).toLowerCase()},properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null}});var Fd=Md({space:"xml",transform:function(e,t){return"xml:"+t.slice(3).toLowerCase()},properties:{xmlLang:null,xmlBase:null,xmlSpace:null}});var Bd=function(e,t){return t in e?e[t]:t};var Ud=Bd,zd=function(e,t){return Ud(e,t.toLowerCase())};var $d=Md({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:zd,properties:{xmlns:null,xmlnsXLink:null}}),Gd=Ed,qd=Md,Hd=Gd.booleanish,Vd=Gd.number,Wd=Gd.spaceSeparated,Yd=qd({transform:function(e,t){return"role"===t?t:"aria-"+t.slice(4).toLowerCase()},properties:{ariaActiveDescendant:null,ariaAtomic:Hd,ariaAutoComplete:null,ariaBusy:Hd,ariaChecked:Hd,ariaColCount:Vd,ariaColIndex:Vd,ariaColSpan:Vd,ariaControls:Wd,ariaCurrent:null,ariaDescribedBy:Wd,ariaDetails:null,ariaDisabled:Hd,ariaDropEffect:Wd,ariaErrorMessage:null,ariaExpanded:Hd,ariaFlowTo:Wd,ariaGrabbed:Hd,ariaHasPopup:null,ariaHidden:Hd,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Wd,ariaLevel:Vd,ariaLive:null,ariaModal:Hd,ariaMultiLine:Hd,ariaMultiSelectable:Hd,ariaOrientation:null,ariaOwns:Wd,ariaPlaceholder:null,ariaPosInSet:Vd,ariaPressed:Hd,ariaReadOnly:Hd,ariaRelevant:null,ariaRequired:Hd,ariaRoleDescription:Wd,ariaRowCount:Vd,ariaRowIndex:Vd,ariaRowSpan:Vd,ariaSelected:Hd,ariaSetSize:Vd,ariaSort:null,ariaValueMax:Vd,ariaValueMin:Vd,ariaValueNow:Vd,ariaValueText:null,role:null}});var Kd=Ed,Xd=Md,Zd=zd,Qd=Kd.boolean,Jd=Kd.overloadedBoolean,ep=Kd.booleanish,tp=Kd.number,np=Kd.spaceSeparated,rp=Kd.commaSeparated,op=yd([Fd,jd,$d,Yd,Xd({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:Zd,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:rp,acceptCharset:np,accessKey:np,action:null,allow:null,allowFullScreen:Qd,allowPaymentRequest:Qd,allowUserMedia:Qd,alt:null,as:null,async:Qd,autoCapitalize:null,autoComplete:np,autoFocus:Qd,autoPlay:Qd,capture:Qd,charSet:null,checked:Qd,cite:null,className:np,cols:tp,colSpan:null,content:null,contentEditable:ep,controls:Qd,controlsList:np,coords:tp|rp,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Qd,defer:Qd,dir:null,dirName:null,disabled:Qd,download:Jd,draggable:ep,encType:null,enterKeyHint:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Qd,formTarget:null,headers:np,height:tp,hidden:Qd,high:tp,href:null,hrefLang:null,htmlFor:np,httpEquiv:np,id:null,imageSizes:null,imageSrcSet:rp,inputMode:null,integrity:null,is:null,isMap:Qd,itemId:null,itemProp:np,itemRef:np,itemScope:Qd,itemType:np,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Qd,low:tp,manifest:null,max:null,maxLength:tp,media:null,method:null,min:null,minLength:tp,multiple:Qd,muted:Qd,name:null,nonce:null,noModule:Qd,noValidate:Qd,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforePrint:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextMenu: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,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:Qd,optimum:tp,pattern:null,ping:np,placeholder:null,playsInline:Qd,poster:null,preload:null,readOnly:Qd,referrerPolicy:null,rel:np,required:Qd,reversed:Qd,rows:tp,rowSpan:tp,sandbox:np,scope:null,scoped:Qd,seamless:Qd,selected:Qd,shape:null,size:tp,sizes:null,slot:null,span:tp,spellCheck:ep,src:null,srcDoc:null,srcLang:null,srcSet:rp,start:tp,step:null,style:null,tabIndex:tp,target:null,title:null,translate:null,type:null,typeMustMatch:Qd,useMap:null,value:ep,width:tp,wrap:null,align:null,aLink:null,archive:np,axis:null,background:null,bgColor:null,border:tp,borderColor:null,bottomMargin:tp,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Qd,declare:Qd,event:null,face:null,frame:null,frameBorder:null,hSpace:tp,leftMargin:tp,link:null,longDesc:null,lowSrc:null,marginHeight:tp,marginWidth:tp,noResize:Qd,noHref:Qd,noShade:Qd,noWrap:Qd,object:null,profile:null,prompt:null,rev:null,rightMargin:tp,rules:null,scheme:null,scrolling:ep,standby:null,summary:null,text:null,topMargin:tp,valueType:null,version:null,vAlign:null,vLink:null,vSpace:tp,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Qd,disableRemotePlayback:Qd,prefix:null,property:null,results:tp,security:null,unselectable:null}})]),ap=vd,ip=Cd,sp=wd,lp="data",cp=function(e,t){var n=ap(t),r=t,o=sp;if(n in e.normal)return e.property[e.normal[n]];n.length>4&&n.slice(0,4)===lp&&up.test(t)&&("-"===t.charAt(4)?r=function(e){var t=e.slice(5).replace(dp,gp);return lp+t.charAt(0).toUpperCase()+t.slice(1)}(t):t=function(e){var t=e.slice(4);if(dp.test(t))return e;t=t.replace(pp,fp),"-"!==t.charAt(0)&&(t="-"+t);return lp+t}(t),o=ip);return new o(r,t)},up=/^data[-\w.:]+$/i,dp=/-[a-z]/g,pp=/[A-Z]/g;function fp(e){return"-"+e.toLowerCase()}function gp(e){return e.charAt(1).toUpperCase()}var mp=function(e,t){var n,r,o,a=e||"",i=t||"div",s={},l=0;for(;l<a.length;)hp.lastIndex=l,o=hp.exec(a),(n=a.slice(l,o?o.index:a.length))&&(r?"#"===r?s.id=n:s.className?s.className.push(n):s.className=[n]:i=n,l+=n.length),o&&(r=o[0],l++);return{type:"element",tagName:i,properties:s,children:[]}},hp=/[#.]/g;var bp={parse:function(e){var t=String(e||yp).trim();return t===yp?[]:t.split(wp)},stringify:function(e){return e.join(vp).trim()}},yp="",vp=" ",wp=/[ \t\n\r\f]+/g;var Sp={parse:function(e){var t,n=[],r=String(e||kp),o=r.indexOf(xp),a=0,i=!1;for(;!i;)-1===o&&(o=r.length,i=!0),!(t=r.slice(a,o).trim())&&i||n.push(t),a=o+1,o=r.indexOf(xp,a);return n},stringify:function(e,t){var n=t||{},r=!1===n.padLeft?kp:Ep,o=n.padRight?Ep:kp;e[e.length-1]===kp&&(e=e.concat(kp));return e.join(o+xp+r).trim()}},xp=",",Ep=" ",kp="";var Ap=cp,Tp=vd,Op=mp,Cp=bp.parse,Ip=Sp.parse,Np=function(e,t,n){var r=n?function(e){var t,n=e.length,r=-1,o={};for(;++r<n;)o[(t=e[r]).toLowerCase()]=t;return o}(n):null;return function(e,n){var a,i=Op(e,t),s=Array.prototype.slice.call(arguments,2),l=i.tagName.toLowerCase();i.tagName=r&&Rp.call(r,l)?r[l]:l,n&&function(e,t){return"string"==typeof e||"length"in e||function(e,t){var n=t.type;if("input"===e||!n||"string"!=typeof n)return!1;if("object"==typeof t.children&&"length"in t.children)return!0;if(n=n.toLowerCase(),"button"===e)return"menu"!==n&&"submit"!==n&&"reset"!==n&&"button"!==n;return"value"in t}(t.tagName,e)}(n,i)&&(s.unshift(n),n=null);if(n)for(a in n)o(i.properties,a,n[a]);_p(i.children,s),"template"===i.tagName&&(i.content={type:"root",children:i.children},i.children=[]);return i};function o(t,n,r){var o,a,i;null!=r&&r==r&&(a=(o=Ap(e,n)).property,"string"==typeof(i=r)&&(o.spaceSeparated?i=Cp(i):o.commaSeparated?i=Ip(i):o.commaOrSpaceSeparated&&(i=Cp(Ip(i).join(" ")))),"style"===a&&"string"!=typeof r&&(i=function(e){var t,n=[];for(t in e)n.push([t,e[t]].join(": "));return n.join("; ")}(i)),"className"===a&&t.className&&(i=t.className.concat(i)),t[a]=function(e,t,n){var r,o,a;if("object"!=typeof n||!("length"in n))return Pp(e,t,n);o=n.length,r=-1,a=[];for(;++r<o;)a[r]=Pp(e,t,n[r]);return a}(o,a,i))}},Rp={}.hasOwnProperty;function _p(e,t){var n,r;if("string"!=typeof t&&"number"!=typeof t)if("object"==typeof t&&"length"in t)for(n=-1,r=t.length;++n<r;)_p(e,t[n]);else{if("object"!=typeof t||!("type"in t))throw new Error("Expected node, nodes, or string, got `"+t+"`");e.push(t)}else e.push({type:"text",value:String(t)})}function Pp(e,t,n){var r=n;return e.number||e.positiveNumber?isNaN(r)||""===r||(r=Number(r)):(e.boolean||e.overloadedBoolean)&&("string"!=typeof r||""!==r&&Tp(n)!==Tp(t)||(r=!0)),r}var Lp=Np(op,"div");Lp.displayName="html";var Dp=Lp,Mp=function(e){var t="string"==typeof e?e.charCodeAt(0):e;return t>=48&&t<=57};var jp=function(e){var t="string"==typeof e?e.charCodeAt(0):e;return t>=97&&t<=102||t>=65&&t<=70||t>=48&&t<=57};var Fp=function(e){var t="string"==typeof e?e.charCodeAt(0):e;return t>=97&&t<=122||t>=65&&t<=90};var Bp=Fp,Up=Mp;var zp={AEli:"Æ",AElig:"Æ",AM:"&",AMP:"&",Aacut:"Á",Aacute:"Á",Abreve:"Ă",Acir:"Â",Acirc:"Â",Acy:"А",Afr:"𝔄",Agrav:"À",Agrave:"À",Alpha:"Α",Amacr:"Ā",And:"⩓",Aogon:"Ą",Aopf:"𝔸",ApplyFunction:"⁡",Arin:"Å",Aring:"Å",Ascr:"𝒜",Assign:"≔",Atild:"Ã",Atilde:"Ã",Aum:"Ä",Auml:"Ä",Backslash:"∖",Barv:"⫧",Barwed:"⌆",Bcy:"Б",Because:"∵",Bernoullis:"ℬ",Beta:"Β",Bfr:"𝔅",Bopf:"𝔹",Breve:"˘",Bscr:"ℬ",Bumpeq:"≎",CHcy:"Ч",COP:"©",COPY:"©",Cacute:"Ć",Cap:"⋒",CapitalDifferentialD:"ⅅ",Cayleys:"ℭ",Ccaron:"Č",Ccedi:"Ç",Ccedil:"Ç",Ccirc:"Ĉ",Cconint:"∰",Cdot:"Ċ",Cedilla:"¸",CenterDot:"·",Cfr:"ℭ",Chi:"Χ",CircleDot:"⊙",CircleMinus:"⊖",CirclePlus:"⊕",CircleTimes:"⊗",ClockwiseContourIntegral:"∲",CloseCurlyDoubleQuote:"”",CloseCurlyQuote:"’",Colon:"∷",Colone:"⩴",Congruent:"≡",Conint:"∯",ContourIntegral:"∮",Copf:"ℂ",Coproduct:"∐",CounterClockwiseContourIntegral:"∳",Cross:"⨯",Cscr:"𝒞",Cup:"⋓",CupCap:"≍",DD:"ⅅ",DDotrahd:"⤑",DJcy:"Ђ",DScy:"Ѕ",DZcy:"Џ",Dagger:"‡",Darr:"↡",Dashv:"⫤",Dcaron:"Ď",Dcy:"Д",Del:"∇",Delta:"Δ",Dfr:"𝔇",DiacriticalAcute:"´",DiacriticalDot:"˙",DiacriticalDoubleAcute:"˝",DiacriticalGrave:"`",DiacriticalTilde:"˜",Diamond:"⋄",DifferentialD:"ⅆ",Dopf:"𝔻",Dot:"¨",DotDot:"⃜",DotEqual:"≐",DoubleContourIntegral:"∯",DoubleDot:"¨",DoubleDownArrow:"⇓",DoubleLeftArrow:"⇐",DoubleLeftRightArrow:"⇔",DoubleLeftTee:"⫤",DoubleLongLeftArrow:"⟸",DoubleLongLeftRightArrow:"⟺",DoubleLongRightArrow:"⟹",DoubleRightArrow:"⇒",DoubleRightTee:"⊨",DoubleUpArrow:"⇑",DoubleUpDownArrow:"⇕",DoubleVerticalBar:"∥",DownArrow:"↓",DownArrowBar:"⤓",DownArrowUpArrow:"⇵",DownBreve:"̑",DownLeftRightVector:"⥐",DownLeftTeeVector:"⥞",DownLeftVector:"↽",DownLeftVectorBar:"⥖",DownRightTeeVector:"⥟",DownRightVector:"⇁",DownRightVectorBar:"⥗",DownTee:"⊤",DownTeeArrow:"↧",Downarrow:"⇓",Dscr:"𝒟",Dstrok:"Đ",ENG:"Ŋ",ET:"Ð",ETH:"Ð",Eacut:"É",Eacute:"É",Ecaron:"Ě",Ecir:"Ê",Ecirc:"Ê",Ecy:"Э",Edot:"Ė",Efr:"𝔈",Egrav:"È",Egrave:"È",Element:"∈",Emacr:"Ē",EmptySmallSquare:"◻",EmptyVerySmallSquare:"▫",Eogon:"Ę",Eopf:"𝔼",Epsilon:"Ε",Equal:"⩵",EqualTilde:"≂",Equilibrium:"⇌",Escr:"ℰ",Esim:"⩳",Eta:"Η",Eum:"Ë",Euml:"Ë",Exists:"∃",ExponentialE:"ⅇ",Fcy:"Ф",Ffr:"𝔉",FilledSmallSquare:"◼",FilledVerySmallSquare:"▪",Fopf:"𝔽",ForAll:"∀",Fouriertrf:"ℱ",Fscr:"ℱ",GJcy:"Ѓ",G:">",GT:">",Gamma:"Γ",Gammad:"Ϝ",Gbreve:"Ğ",Gcedil:"Ģ",Gcirc:"Ĝ",Gcy:"Г",Gdot:"Ġ",Gfr:"𝔊",Gg:"⋙",Gopf:"𝔾",GreaterEqual:"≥",GreaterEqualLess:"⋛",GreaterFullEqual:"≧",GreaterGreater:"⪢",GreaterLess:"≷",GreaterSlantEqual:"⩾",GreaterTilde:"≳",Gscr:"𝒢",Gt:"≫",HARDcy:"Ъ",Hacek:"ˇ",Hat:"^",Hcirc:"Ĥ",Hfr:"ℌ",HilbertSpace:"ℋ",Hopf:"ℍ",HorizontalLine:"─",Hscr:"ℋ",Hstrok:"Ħ",HumpDownHump:"≎",HumpEqual:"≏",IEcy:"Е",IJlig:"IJ",IOcy:"Ё",Iacut:"Í",Iacute:"Í",Icir:"Î",Icirc:"Î",Icy:"И",Idot:"İ",Ifr:"ℑ",Igrav:"Ì",Igrave:"Ì",Im:"ℑ",Imacr:"Ī",ImaginaryI:"ⅈ",Implies:"⇒",Int:"∬",Integral:"∫",Intersection:"⋂",InvisibleComma:"⁣",InvisibleTimes:"⁢",Iogon:"Į",Iopf:"𝕀",Iota:"Ι",Iscr:"ℐ",Itilde:"Ĩ",Iukcy:"І",Ium:"Ï",Iuml:"Ï",Jcirc:"Ĵ",Jcy:"Й",Jfr:"𝔍",Jopf:"𝕁",Jscr:"𝒥",Jsercy:"Ј",Jukcy:"Є",KHcy:"Х",KJcy:"Ќ",Kappa:"Κ",Kcedil:"Ķ",Kcy:"К",Kfr:"𝔎",Kopf:"𝕂",Kscr:"𝒦",LJcy:"Љ",L:"<",LT:"<",Lacute:"Ĺ",Lambda:"Λ",Lang:"⟪",Laplacetrf:"ℒ",Larr:"↞",Lcaron:"Ľ",Lcedil:"Ļ",Lcy:"Л",LeftAngleBracket:"⟨",LeftArrow:"←",LeftArrowBar:"⇤",LeftArrowRightArrow:"⇆",LeftCeiling:"⌈",LeftDoubleBracket:"⟦",LeftDownTeeVector:"⥡",LeftDownVector:"⇃",LeftDownVectorBar:"⥙",LeftFloor:"⌊",LeftRightArrow:"↔",LeftRightVector:"⥎",LeftTee:"⊣",LeftTeeArrow:"↤",LeftTeeVector:"⥚",LeftTriangle:"⊲",LeftTriangleBar:"⧏",LeftTriangleEqual:"⊴",LeftUpDownVector:"⥑",LeftUpTeeVector:"⥠",LeftUpVector:"↿",LeftUpVectorBar:"⥘",LeftVector:"↼",LeftVectorBar:"⥒",Leftarrow:"⇐",Leftrightarrow:"⇔",LessEqualGreater:"⋚",LessFullEqual:"≦",LessGreater:"≶",LessLess:"⪡",LessSlantEqual:"⩽",LessTilde:"≲",Lfr:"𝔏",Ll:"⋘",Lleftarrow:"⇚",Lmidot:"Ŀ",LongLeftArrow:"⟵",LongLeftRightArrow:"⟷",LongRightArrow:"⟶",Longleftarrow:"⟸",Longleftrightarrow:"⟺",Longrightarrow:"⟹",Lopf:"𝕃",LowerLeftArrow:"↙",LowerRightArrow:"↘",Lscr:"ℒ",Lsh:"↰",Lstrok:"Ł",Lt:"≪",Map:"⤅",Mcy:"М",MediumSpace:" ",Mellintrf:"ℳ",Mfr:"𝔐",MinusPlus:"∓",Mopf:"𝕄",Mscr:"ℳ",Mu:"Μ",NJcy:"Њ",Nacute:"Ń",Ncaron:"Ň",Ncedil:"Ņ",Ncy:"Н",NegativeMediumSpace:"​",NegativeThickSpace:"​",NegativeThinSpace:"​",NegativeVeryThinSpace:"​",NestedGreaterGreater:"≫",NestedLessLess:"≪",NewLine:"\n",Nfr:"𝔑",NoBreak:"⁠",NonBreakingSpace:" ",Nopf:"ℕ",Not:"⫬",NotCongruent:"≢",NotCupCap:"≭",NotDoubleVerticalBar:"∦",NotElement:"∉",NotEqual:"≠",NotEqualTilde:"≂̸",NotExists:"∄",NotGreater:"≯",NotGreaterEqual:"≱",NotGreaterFullEqual:"≧̸",NotGreaterGreater:"≫̸",NotGreaterLess:"≹",NotGreaterSlantEqual:"⩾̸",NotGreaterTilde:"≵",NotHumpDownHump:"≎̸",NotHumpEqual:"≏̸",NotLeftTriangle:"⋪",NotLeftTriangleBar:"⧏̸",NotLeftTriangleEqual:"⋬",NotLess:"≮",NotLessEqual:"≰",NotLessGreater:"≸",NotLessLess:"≪̸",NotLessSlantEqual:"⩽̸",NotLessTilde:"≴",NotNestedGreaterGreater:"⪢̸",NotNestedLessLess:"⪡̸",NotPrecedes:"⊀",NotPrecedesEqual:"⪯̸",NotPrecedesSlantEqual:"⋠",NotReverseElement:"∌",NotRightTriangle:"⋫",NotRightTriangleBar:"⧐̸",NotRightTriangleEqual:"⋭",NotSquareSubset:"⊏̸",NotSquareSubsetEqual:"⋢",NotSquareSuperset:"⊐̸",NotSquareSupersetEqual:"⋣",NotSubset:"⊂⃒",NotSubsetEqual:"⊈",NotSucceeds:"⊁",NotSucceedsEqual:"⪰̸",NotSucceedsSlantEqual:"⋡",NotSucceedsTilde:"≿̸",NotSuperset:"⊃⃒",NotSupersetEqual:"⊉",NotTilde:"≁",NotTildeEqual:"≄",NotTildeFullEqual:"≇",NotTildeTilde:"≉",NotVerticalBar:"∤",Nscr:"𝒩",Ntild:"Ñ",Ntilde:"Ñ",Nu:"Ν",OElig:"Œ",Oacut:"Ó",Oacute:"Ó",Ocir:"Ô",Ocirc:"Ô",Ocy:"О",Odblac:"Ő",Ofr:"𝔒",Ograv:"Ò",Ograve:"Ò",Omacr:"Ō",Omega:"Ω",Omicron:"Ο",Oopf:"𝕆",OpenCurlyDoubleQuote:"“",OpenCurlyQuote:"‘",Or:"⩔",Oscr:"𝒪",Oslas:"Ø",Oslash:"Ø",Otild:"Õ",Otilde:"Õ",Otimes:"⨷",Oum:"Ö",Ouml:"Ö",OverBar:"‾",OverBrace:"⏞",OverBracket:"⎴",OverParenthesis:"⏜",PartialD:"∂",Pcy:"П",Pfr:"𝔓",Phi:"Φ",Pi:"Π",PlusMinus:"±",Poincareplane:"ℌ",Popf:"ℙ",Pr:"⪻",Precedes:"≺",PrecedesEqual:"⪯",PrecedesSlantEqual:"≼",PrecedesTilde:"≾",Prime:"″",Product:"∏",Proportion:"∷",Proportional:"∝",Pscr:"𝒫",Psi:"Ψ",QUO:'"',QUOT:'"',Qfr:"𝔔",Qopf:"ℚ",Qscr:"𝒬",RBarr:"⤐",RE:"®",REG:"®",Racute:"Ŕ",Rang:"⟫",Rarr:"↠",Rarrtl:"⤖",Rcaron:"Ř",Rcedil:"Ŗ",Rcy:"Р",Re:"ℜ",ReverseElement:"∋",ReverseEquilibrium:"⇋",ReverseUpEquilibrium:"⥯",Rfr:"ℜ",Rho:"Ρ",RightAngleBracket:"⟩",RightArrow:"→",RightArrowBar:"⇥",RightArrowLeftArrow:"⇄",RightCeiling:"⌉",RightDoubleBracket:"⟧",RightDownTeeVector:"⥝",RightDownVector:"⇂",RightDownVectorBar:"⥕",RightFloor:"⌋",RightTee:"⊢",RightTeeArrow:"↦",RightTeeVector:"⥛",RightTriangle:"⊳",RightTriangleBar:"⧐",RightTriangleEqual:"⊵",RightUpDownVector:"⥏",RightUpTeeVector:"⥜",RightUpVector:"↾",RightUpVectorBar:"⥔",RightVector:"⇀",RightVectorBar:"⥓",Rightarrow:"⇒",Ropf:"ℝ",RoundImplies:"⥰",Rrightarrow:"⇛",Rscr:"ℛ",Rsh:"↱",RuleDelayed:"⧴",SHCHcy:"Щ",SHcy:"Ш",SOFTcy:"Ь",Sacute:"Ś",Sc:"⪼",Scaron:"Š",Scedil:"Ş",Scirc:"Ŝ",Scy:"С",Sfr:"𝔖",ShortDownArrow:"↓",ShortLeftArrow:"←",ShortRightArrow:"→",ShortUpArrow:"↑",Sigma:"Σ",SmallCircle:"∘",Sopf:"𝕊",Sqrt:"√",Square:"□",SquareIntersection:"⊓",SquareSubset:"⊏",SquareSubsetEqual:"⊑",SquareSuperset:"⊐",SquareSupersetEqual:"⊒",SquareUnion:"⊔",Sscr:"𝒮",Star:"⋆",Sub:"⋐",Subset:"⋐",SubsetEqual:"⊆",Succeeds:"≻",SucceedsEqual:"⪰",SucceedsSlantEqual:"≽",SucceedsTilde:"≿",SuchThat:"∋",Sum:"∑",Sup:"⋑",Superset:"⊃",SupersetEqual:"⊇",Supset:"⋑",THOR:"Þ",THORN:"Þ",TRADE:"™",TSHcy:"Ћ",TScy:"Ц",Tab:"\t",Tau:"Τ",Tcaron:"Ť",Tcedil:"Ţ",Tcy:"Т",Tfr:"𝔗",Therefore:"∴",Theta:"Θ",ThickSpace:"  ",ThinSpace:" ",Tilde:"∼",TildeEqual:"≃",TildeFullEqual:"≅",TildeTilde:"≈",Topf:"𝕋",TripleDot:"⃛",Tscr:"𝒯",Tstrok:"Ŧ",Uacut:"Ú",Uacute:"Ú",Uarr:"↟",Uarrocir:"⥉",Ubrcy:"Ў",Ubreve:"Ŭ",Ucir:"Û",Ucirc:"Û",Ucy:"У",Udblac:"Ű",Ufr:"𝔘",Ugrav:"Ù",Ugrave:"Ù",Umacr:"Ū",UnderBar:"_",UnderBrace:"⏟",UnderBracket:"⎵",UnderParenthesis:"⏝",Union:"⋃",UnionPlus:"⊎",Uogon:"Ų",Uopf:"𝕌",UpArrow:"↑",UpArrowBar:"⤒",UpArrowDownArrow:"⇅",UpDownArrow:"↕",UpEquilibrium:"⥮",UpTee:"⊥",UpTeeArrow:"↥",Uparrow:"⇑",Updownarrow:"⇕",UpperLeftArrow:"↖",UpperRightArrow:"↗",Upsi:"ϒ",Upsilon:"Υ",Uring:"Ů",Uscr:"𝒰",Utilde:"Ũ",Uum:"Ü",Uuml:"Ü",VDash:"⊫",Vbar:"⫫",Vcy:"В",Vdash:"⊩",Vdashl:"⫦",Vee:"⋁",Verbar:"‖",Vert:"‖",VerticalBar:"∣",VerticalLine:"|",VerticalSeparator:"❘",VerticalTilde:"≀",VeryThinSpace:" ",Vfr:"𝔙",Vopf:"𝕍",Vscr:"𝒱",Vvdash:"⊪",Wcirc:"Ŵ",Wedge:"⋀",Wfr:"𝔚",Wopf:"𝕎",Wscr:"𝒲",Xfr:"𝔛",Xi:"Ξ",Xopf:"𝕏",Xscr:"𝒳",YAcy:"Я",YIcy:"Ї",YUcy:"Ю",Yacut:"Ý",Yacute:"Ý",Ycirc:"Ŷ",Ycy:"Ы",Yfr:"𝔜",Yopf:"𝕐",Yscr:"𝒴",Yuml:"Ÿ",ZHcy:"Ж",Zacute:"Ź",Zcaron:"Ž",Zcy:"З",Zdot:"Ż",ZeroWidthSpace:"​",Zeta:"Ζ",Zfr:"ℨ",Zopf:"ℤ",Zscr:"𝒵",aacut:"á",aacute:"á",abreve:"ă",ac:"∾",acE:"∾̳",acd:"∿",acir:"â",acirc:"â",acut:"´",acute:"´",acy:"а",aeli:"æ",aelig:"æ",af:"⁡",afr:"𝔞",agrav:"à",agrave:"à",alefsym:"ℵ",aleph:"ℵ",alpha:"α",amacr:"ā",amalg:"⨿",am:"&",amp:"&",and:"∧",andand:"⩕",andd:"⩜",andslope:"⩘",andv:"⩚",ang:"∠",ange:"⦤",angle:"∠",angmsd:"∡",angmsdaa:"⦨",angmsdab:"⦩",angmsdac:"⦪",angmsdad:"⦫",angmsdae:"⦬",angmsdaf:"⦭",angmsdag:"⦮",angmsdah:"⦯",angrt:"∟",angrtvb:"⊾",angrtvbd:"⦝",angsph:"∢",angst:"Å",angzarr:"⍼",aogon:"ą",aopf:"𝕒",ap:"≈",apE:"⩰",apacir:"⩯",ape:"≊",apid:"≋",apos:"'",approx:"≈",approxeq:"≊",arin:"å",aring:"å",ascr:"𝒶",ast:"*",asymp:"≈",asympeq:"≍",atild:"ã",atilde:"ã",aum:"ä",auml:"ä",awconint:"∳",awint:"⨑",bNot:"⫭",backcong:"≌",backepsilon:"϶",backprime:"‵",backsim:"∽",backsimeq:"⋍",barvee:"⊽",barwed:"⌅",barwedge:"⌅",bbrk:"⎵",bbrktbrk:"⎶",bcong:"≌",bcy:"б",bdquo:"„",becaus:"∵",because:"∵",bemptyv:"⦰",bepsi:"϶",bernou:"ℬ",beta:"β",beth:"ℶ",between:"≬",bfr:"𝔟",bigcap:"⋂",bigcirc:"◯",bigcup:"⋃",bigodot:"⨀",bigoplus:"⨁",bigotimes:"⨂",bigsqcup:"⨆",bigstar:"★",bigtriangledown:"▽",bigtriangleup:"△",biguplus:"⨄",bigvee:"⋁",bigwedge:"⋀",bkarow:"⤍",blacklozenge:"⧫",blacksquare:"▪",blacktriangle:"▴",blacktriangledown:"▾",blacktriangleleft:"◂",blacktriangleright:"▸",blank:"␣",blk12:"▒",blk14:"░",blk34:"▓",block:"█",bne:"=⃥",bnequiv:"≡⃥",bnot:"⌐",bopf:"𝕓",bot:"⊥",bottom:"⊥",bowtie:"⋈",boxDL:"╗",boxDR:"╔",boxDl:"╖",boxDr:"╓",boxH:"═",boxHD:"╦",boxHU:"╩",boxHd:"╤",boxHu:"╧",boxUL:"╝",boxUR:"╚",boxUl:"╜",boxUr:"╙",boxV:"║",boxVH:"╬",boxVL:"╣",boxVR:"╠",boxVh:"╫",boxVl:"╢",boxVr:"╟",boxbox:"⧉",boxdL:"╕",boxdR:"╒",boxdl:"┐",boxdr:"┌",boxh:"─",boxhD:"╥",boxhU:"╨",boxhd:"┬",boxhu:"┴",boxminus:"⊟",boxplus:"⊞",boxtimes:"⊠",boxuL:"╛",boxuR:"╘",boxul:"┘",boxur:"└",boxv:"│",boxvH:"╪",boxvL:"╡",boxvR:"╞",boxvh:"┼",boxvl:"┤",boxvr:"├",bprime:"‵",breve:"˘",brvba:"¦",brvbar:"¦",bscr:"𝒷",bsemi:"⁏",bsim:"∽",bsime:"⋍",bsol:"\\",bsolb:"⧅",bsolhsub:"⟈",bull:"•",bullet:"•",bump:"≎",bumpE:"⪮",bumpe:"≏",bumpeq:"≏",cacute:"ć",cap:"∩",capand:"⩄",capbrcup:"⩉",capcap:"⩋",capcup:"⩇",capdot:"⩀",caps:"∩︀",caret:"⁁",caron:"ˇ",ccaps:"⩍",ccaron:"č",ccedi:"ç",ccedil:"ç",ccirc:"ĉ",ccups:"⩌",ccupssm:"⩐",cdot:"ċ",cedi:"¸",cedil:"¸",cemptyv:"⦲",cen:"¢",cent:"¢",centerdot:"·",cfr:"𝔠",chcy:"ч",check:"✓",checkmark:"✓",chi:"χ",cir:"○",cirE:"⧃",circ:"ˆ",circeq:"≗",circlearrowleft:"↺",circlearrowright:"↻",circledR:"®",circledS:"Ⓢ",circledast:"⊛",circledcirc:"⊚",circleddash:"⊝",cire:"≗",cirfnint:"⨐",cirmid:"⫯",cirscir:"⧂",clubs:"♣",clubsuit:"♣",colon:":",colone:"≔",coloneq:"≔",comma:",",commat:"@",comp:"∁",compfn:"∘",complement:"∁",complexes:"ℂ",cong:"≅",congdot:"⩭",conint:"∮",copf:"𝕔",coprod:"∐",cop:"©",copy:"©",copysr:"℗",crarr:"↵",cross:"✗",cscr:"𝒸",csub:"⫏",csube:"⫑",csup:"⫐",csupe:"⫒",ctdot:"⋯",cudarrl:"⤸",cudarrr:"⤵",cuepr:"⋞",cuesc:"⋟",cularr:"↶",cularrp:"⤽",cup:"∪",cupbrcap:"⩈",cupcap:"⩆",cupcup:"⩊",cupdot:"⊍",cupor:"⩅",cups:"∪︀",curarr:"↷",curarrm:"⤼",curlyeqprec:"⋞",curlyeqsucc:"⋟",curlyvee:"⋎",curlywedge:"⋏",curre:"¤",curren:"¤",curvearrowleft:"↶",curvearrowright:"↷",cuvee:"⋎",cuwed:"⋏",cwconint:"∲",cwint:"∱",cylcty:"⌭",dArr:"⇓",dHar:"⥥",dagger:"†",daleth:"ℸ",darr:"↓",dash:"‐",dashv:"⊣",dbkarow:"⤏",dblac:"˝",dcaron:"ď",dcy:"д",dd:"ⅆ",ddagger:"‡",ddarr:"⇊",ddotseq:"⩷",de:"°",deg:"°",delta:"δ",demptyv:"⦱",dfisht:"⥿",dfr:"𝔡",dharl:"⇃",dharr:"⇂",diam:"⋄",diamond:"⋄",diamondsuit:"♦",diams:"♦",die:"¨",digamma:"ϝ",disin:"⋲",div:"÷",divid:"÷",divide:"÷",divideontimes:"⋇",divonx:"⋇",djcy:"ђ",dlcorn:"⌞",dlcrop:"⌍",dollar:"$",dopf:"𝕕",dot:"˙",doteq:"≐",doteqdot:"≑",dotminus:"∸",dotplus:"∔",dotsquare:"⊡",doublebarwedge:"⌆",downarrow:"↓",downdownarrows:"⇊",downharpoonleft:"⇃",downharpoonright:"⇂",drbkarow:"⤐",drcorn:"⌟",drcrop:"⌌",dscr:"𝒹",dscy:"ѕ",dsol:"⧶",dstrok:"đ",dtdot:"⋱",dtri:"▿",dtrif:"▾",duarr:"⇵",duhar:"⥯",dwangle:"⦦",dzcy:"џ",dzigrarr:"⟿",eDDot:"⩷",eDot:"≑",eacut:"é",eacute:"é",easter:"⩮",ecaron:"ě",ecir:"ê",ecirc:"ê",ecolon:"≕",ecy:"э",edot:"ė",ee:"ⅇ",efDot:"≒",efr:"𝔢",eg:"⪚",egrav:"è",egrave:"è",egs:"⪖",egsdot:"⪘",el:"⪙",elinters:"⏧",ell:"ℓ",els:"⪕",elsdot:"⪗",emacr:"ē",empty:"∅",emptyset:"∅",emptyv:"∅",emsp13:" ",emsp14:" ",emsp:" ",eng:"ŋ",ensp:" ",eogon:"ę",eopf:"𝕖",epar:"⋕",eparsl:"⧣",eplus:"⩱",epsi:"ε",epsilon:"ε",epsiv:"ϵ",eqcirc:"≖",eqcolon:"≕",eqsim:"≂",eqslantgtr:"⪖",eqslantless:"⪕",equals:"=",equest:"≟",equiv:"≡",equivDD:"⩸",eqvparsl:"⧥",erDot:"≓",erarr:"⥱",escr:"ℯ",esdot:"≐",esim:"≂",eta:"η",et:"ð",eth:"ð",eum:"ë",euml:"ë",euro:"€",excl:"!",exist:"∃",expectation:"ℰ",exponentiale:"ⅇ",fallingdotseq:"≒",fcy:"ф",female:"♀",ffilig:"ffi",fflig:"ff",ffllig:"ffl",ffr:"𝔣",filig:"fi",fjlig:"fj",flat:"♭",fllig:"fl",fltns:"▱",fnof:"ƒ",fopf:"𝕗",forall:"∀",fork:"⋔",forkv:"⫙",fpartint:"⨍",frac1:"¼",frac12:"½",frac13:"⅓",frac14:"¼",frac15:"⅕",frac16:"⅙",frac18:"⅛",frac23:"⅔",frac25:"⅖",frac3:"¾",frac34:"¾",frac35:"⅗",frac38:"⅜",frac45:"⅘",frac56:"⅚",frac58:"⅝",frac78:"⅞",frasl:"⁄",frown:"⌢",fscr:"𝒻",gE:"≧",gEl:"⪌",gacute:"ǵ",gamma:"γ",gammad:"ϝ",gap:"⪆",gbreve:"ğ",gcirc:"ĝ",gcy:"г",gdot:"ġ",ge:"≥",gel:"⋛",geq:"≥",geqq:"≧",geqslant:"⩾",ges:"⩾",gescc:"⪩",gesdot:"⪀",gesdoto:"⪂",gesdotol:"⪄",gesl:"⋛︀",gesles:"⪔",gfr:"𝔤",gg:"≫",ggg:"⋙",gimel:"ℷ",gjcy:"ѓ",gl:"≷",glE:"⪒",gla:"⪥",glj:"⪤",gnE:"≩",gnap:"⪊",gnapprox:"⪊",gne:"⪈",gneq:"⪈",gneqq:"≩",gnsim:"⋧",gopf:"𝕘",grave:"`",gscr:"ℊ",gsim:"≳",gsime:"⪎",gsiml:"⪐",g:">",gt:">",gtcc:"⪧",gtcir:"⩺",gtdot:"⋗",gtlPar:"⦕",gtquest:"⩼",gtrapprox:"⪆",gtrarr:"⥸",gtrdot:"⋗",gtreqless:"⋛",gtreqqless:"⪌",gtrless:"≷",gtrsim:"≳",gvertneqq:"≩︀",gvnE:"≩︀",hArr:"⇔",hairsp:" ",half:"½",hamilt:"ℋ",hardcy:"ъ",harr:"↔",harrcir:"⥈",harrw:"↭",hbar:"ℏ",hcirc:"ĥ",hearts:"♥",heartsuit:"♥",hellip:"…",hercon:"⊹",hfr:"𝔥",hksearow:"⤥",hkswarow:"⤦",hoarr:"⇿",homtht:"∻",hookleftarrow:"↩",hookrightarrow:"↪",hopf:"𝕙",horbar:"―",hscr:"𝒽",hslash:"ℏ",hstrok:"ħ",hybull:"⁃",hyphen:"‐",iacut:"í",iacute:"í",ic:"⁣",icir:"î",icirc:"î",icy:"и",iecy:"е",iexc:"¡",iexcl:"¡",iff:"⇔",ifr:"𝔦",igrav:"ì",igrave:"ì",ii:"ⅈ",iiiint:"⨌",iiint:"∭",iinfin:"⧜",iiota:"℩",ijlig:"ij",imacr:"ī",image:"ℑ",imagline:"ℐ",imagpart:"ℑ",imath:"ı",imof:"⊷",imped:"Ƶ",in:"∈",incare:"℅",infin:"∞",infintie:"⧝",inodot:"ı",int:"∫",intcal:"⊺",integers:"ℤ",intercal:"⊺",intlarhk:"⨗",intprod:"⨼",iocy:"ё",iogon:"į",iopf:"𝕚",iota:"ι",iprod:"⨼",iques:"¿",iquest:"¿",iscr:"𝒾",isin:"∈",isinE:"⋹",isindot:"⋵",isins:"⋴",isinsv:"⋳",isinv:"∈",it:"⁢",itilde:"ĩ",iukcy:"і",ium:"ï",iuml:"ï",jcirc:"ĵ",jcy:"й",jfr:"𝔧",jmath:"ȷ",jopf:"𝕛",jscr:"𝒿",jsercy:"ј",jukcy:"є",kappa:"κ",kappav:"ϰ",kcedil:"ķ",kcy:"к",kfr:"𝔨",kgreen:"ĸ",khcy:"х",kjcy:"ќ",kopf:"𝕜",kscr:"𝓀",lAarr:"⇚",lArr:"⇐",lAtail:"⤛",lBarr:"⤎",lE:"≦",lEg:"⪋",lHar:"⥢",lacute:"ĺ",laemptyv:"⦴",lagran:"ℒ",lambda:"λ",lang:"⟨",langd:"⦑",langle:"⟨",lap:"⪅",laqu:"«",laquo:"«",larr:"←",larrb:"⇤",larrbfs:"⤟",larrfs:"⤝",larrhk:"↩",larrlp:"↫",larrpl:"⤹",larrsim:"⥳",larrtl:"↢",lat:"⪫",latail:"⤙",late:"⪭",lates:"⪭︀",lbarr:"⤌",lbbrk:"❲",lbrace:"{",lbrack:"[",lbrke:"⦋",lbrksld:"⦏",lbrkslu:"⦍",lcaron:"ľ",lcedil:"ļ",lceil:"⌈",lcub:"{",lcy:"л",ldca:"⤶",ldquo:"“",ldquor:"„",ldrdhar:"⥧",ldrushar:"⥋",ldsh:"↲",le:"≤",leftarrow:"←",leftarrowtail:"↢",leftharpoondown:"↽",leftharpoonup:"↼",leftleftarrows:"⇇",leftrightarrow:"↔",leftrightarrows:"⇆",leftrightharpoons:"⇋",leftrightsquigarrow:"↭",leftthreetimes:"⋋",leg:"⋚",leq:"≤",leqq:"≦",leqslant:"⩽",les:"⩽",lescc:"⪨",lesdot:"⩿",lesdoto:"⪁",lesdotor:"⪃",lesg:"⋚︀",lesges:"⪓",lessapprox:"⪅",lessdot:"⋖",lesseqgtr:"⋚",lesseqqgtr:"⪋",lessgtr:"≶",lesssim:"≲",lfisht:"⥼",lfloor:"⌊",lfr:"𝔩",lg:"≶",lgE:"⪑",lhard:"↽",lharu:"↼",lharul:"⥪",lhblk:"▄",ljcy:"љ",ll:"≪",llarr:"⇇",llcorner:"⌞",llhard:"⥫",lltri:"◺",lmidot:"ŀ",lmoust:"⎰",lmoustache:"⎰",lnE:"≨",lnap:"⪉",lnapprox:"⪉",lne:"⪇",lneq:"⪇",lneqq:"≨",lnsim:"⋦",loang:"⟬",loarr:"⇽",lobrk:"⟦",longleftarrow:"⟵",longleftrightarrow:"⟷",longmapsto:"⟼",longrightarrow:"⟶",looparrowleft:"↫",looparrowright:"↬",lopar:"⦅",lopf:"𝕝",loplus:"⨭",lotimes:"⨴",lowast:"∗",lowbar:"_",loz:"◊",lozenge:"◊",lozf:"⧫",lpar:"(",lparlt:"⦓",lrarr:"⇆",lrcorner:"⌟",lrhar:"⇋",lrhard:"⥭",lrm:"‎",lrtri:"⊿",lsaquo:"‹",lscr:"𝓁",lsh:"↰",lsim:"≲",lsime:"⪍",lsimg:"⪏",lsqb:"[",lsquo:"‘",lsquor:"‚",lstrok:"ł",l:"<",lt:"<",ltcc:"⪦",ltcir:"⩹",ltdot:"⋖",lthree:"⋋",ltimes:"⋉",ltlarr:"⥶",ltquest:"⩻",ltrPar:"⦖",ltri:"◃",ltrie:"⊴",ltrif:"◂",lurdshar:"⥊",luruhar:"⥦",lvertneqq:"≨︀",lvnE:"≨︀",mDDot:"∺",mac:"¯",macr:"¯",male:"♂",malt:"✠",maltese:"✠",map:"↦",mapsto:"↦",mapstodown:"↧",mapstoleft:"↤",mapstoup:"↥",marker:"▮",mcomma:"⨩",mcy:"м",mdash:"—",measuredangle:"∡",mfr:"𝔪",mho:"℧",micr:"µ",micro:"µ",mid:"∣",midast:"*",midcir:"⫰",middo:"·",middot:"·",minus:"−",minusb:"⊟",minusd:"∸",minusdu:"⨪",mlcp:"⫛",mldr:"…",mnplus:"∓",models:"⊧",mopf:"𝕞",mp:"∓",mscr:"𝓂",mstpos:"∾",mu:"μ",multimap:"⊸",mumap:"⊸",nGg:"⋙̸",nGt:"≫⃒",nGtv:"≫̸",nLeftarrow:"⇍",nLeftrightarrow:"⇎",nLl:"⋘̸",nLt:"≪⃒",nLtv:"≪̸",nRightarrow:"⇏",nVDash:"⊯",nVdash:"⊮",nabla:"∇",nacute:"ń",nang:"∠⃒",nap:"≉",napE:"⩰̸",napid:"≋̸",napos:"ʼn",napprox:"≉",natur:"♮",natural:"♮",naturals:"ℕ",nbs:" ",nbsp:" ",nbump:"≎̸",nbumpe:"≏̸",ncap:"⩃",ncaron:"ň",ncedil:"ņ",ncong:"≇",ncongdot:"⩭̸",ncup:"⩂",ncy:"н",ndash:"–",ne:"≠",neArr:"⇗",nearhk:"⤤",nearr:"↗",nearrow:"↗",nedot:"≐̸",nequiv:"≢",nesear:"⤨",nesim:"≂̸",nexist:"∄",nexists:"∄",nfr:"𝔫",ngE:"≧̸",nge:"≱",ngeq:"≱",ngeqq:"≧̸",ngeqslant:"⩾̸",nges:"⩾̸",ngsim:"≵",ngt:"≯",ngtr:"≯",nhArr:"⇎",nharr:"↮",nhpar:"⫲",ni:"∋",nis:"⋼",nisd:"⋺",niv:"∋",njcy:"њ",nlArr:"⇍",nlE:"≦̸",nlarr:"↚",nldr:"‥",nle:"≰",nleftarrow:"↚",nleftrightarrow:"↮",nleq:"≰",nleqq:"≦̸",nleqslant:"⩽̸",nles:"⩽̸",nless:"≮",nlsim:"≴",nlt:"≮",nltri:"⋪",nltrie:"⋬",nmid:"∤",nopf:"𝕟",no:"¬",not:"¬",notin:"∉",notinE:"⋹̸",notindot:"⋵̸",notinva:"∉",notinvb:"⋷",notinvc:"⋶",notni:"∌",notniva:"∌",notnivb:"⋾",notnivc:"⋽",npar:"∦",nparallel:"∦",nparsl:"⫽⃥",npart:"∂̸",npolint:"⨔",npr:"⊀",nprcue:"⋠",npre:"⪯̸",nprec:"⊀",npreceq:"⪯̸",nrArr:"⇏",nrarr:"↛",nrarrc:"⤳̸",nrarrw:"↝̸",nrightarrow:"↛",nrtri:"⋫",nrtrie:"⋭",nsc:"⊁",nsccue:"⋡",nsce:"⪰̸",nscr:"𝓃",nshortmid:"∤",nshortparallel:"∦",nsim:"≁",nsime:"≄",nsimeq:"≄",nsmid:"∤",nspar:"∦",nsqsube:"⋢",nsqsupe:"⋣",nsub:"⊄",nsubE:"⫅̸",nsube:"⊈",nsubset:"⊂⃒",nsubseteq:"⊈",nsubseteqq:"⫅̸",nsucc:"⊁",nsucceq:"⪰̸",nsup:"⊅",nsupE:"⫆̸",nsupe:"⊉",nsupset:"⊃⃒",nsupseteq:"⊉",nsupseteqq:"⫆̸",ntgl:"≹",ntild:"ñ",ntilde:"ñ",ntlg:"≸",ntriangleleft:"⋪",ntrianglelefteq:"⋬",ntriangleright:"⋫",ntrianglerighteq:"⋭",nu:"ν",num:"#",numero:"№",numsp:" ",nvDash:"⊭",nvHarr:"⤄",nvap:"≍⃒",nvdash:"⊬",nvge:"≥⃒",nvgt:">⃒",nvinfin:"⧞",nvlArr:"⤂",nvle:"≤⃒",nvlt:"<⃒",nvltrie:"⊴⃒",nvrArr:"⤃",nvrtrie:"⊵⃒",nvsim:"∼⃒",nwArr:"⇖",nwarhk:"⤣",nwarr:"↖",nwarrow:"↖",nwnear:"⤧",oS:"Ⓢ",oacut:"ó",oacute:"ó",oast:"⊛",ocir:"ô",ocirc:"ô",ocy:"о",odash:"⊝",odblac:"ő",odiv:"⨸",odot:"⊙",odsold:"⦼",oelig:"œ",ofcir:"⦿",ofr:"𝔬",ogon:"˛",ograv:"ò",ograve:"ò",ogt:"⧁",ohbar:"⦵",ohm:"Ω",oint:"∮",olarr:"↺",olcir:"⦾",olcross:"⦻",oline:"‾",olt:"⧀",omacr:"ō",omega:"ω",omicron:"ο",omid:"⦶",ominus:"⊖",oopf:"𝕠",opar:"⦷",operp:"⦹",oplus:"⊕",or:"∨",orarr:"↻",ord:"º",order:"ℴ",orderof:"ℴ",ordf:"ª",ordm:"º",origof:"⊶",oror:"⩖",orslope:"⩗",orv:"⩛",oscr:"ℴ",oslas:"ø",oslash:"ø",osol:"⊘",otild:"õ",otilde:"õ",otimes:"⊗",otimesas:"⨶",oum:"ö",ouml:"ö",ovbar:"⌽",par:"¶",para:"¶",parallel:"∥",parsim:"⫳",parsl:"⫽",part:"∂",pcy:"п",percnt:"%",period:".",permil:"‰",perp:"⊥",pertenk:"‱",pfr:"𝔭",phi:"φ",phiv:"ϕ",phmmat:"ℳ",phone:"☎",pi:"π",pitchfork:"⋔",piv:"ϖ",planck:"ℏ",planckh:"ℎ",plankv:"ℏ",plus:"+",plusacir:"⨣",plusb:"⊞",pluscir:"⨢",plusdo:"∔",plusdu:"⨥",pluse:"⩲",plusm:"±",plusmn:"±",plussim:"⨦",plustwo:"⨧",pm:"±",pointint:"⨕",popf:"𝕡",poun:"£",pound:"£",pr:"≺",prE:"⪳",prap:"⪷",prcue:"≼",pre:"⪯",prec:"≺",precapprox:"⪷",preccurlyeq:"≼",preceq:"⪯",precnapprox:"⪹",precneqq:"⪵",precnsim:"⋨",precsim:"≾",prime:"′",primes:"ℙ",prnE:"⪵",prnap:"⪹",prnsim:"⋨",prod:"∏",profalar:"⌮",profline:"⌒",profsurf:"⌓",prop:"∝",propto:"∝",prsim:"≾",prurel:"⊰",pscr:"𝓅",psi:"ψ",puncsp:" ",qfr:"𝔮",qint:"⨌",qopf:"𝕢",qprime:"⁗",qscr:"𝓆",quaternions:"ℍ",quatint:"⨖",quest:"?",questeq:"≟",quo:'"',quot:'"',rAarr:"⇛",rArr:"⇒",rAtail:"⤜",rBarr:"⤏",rHar:"⥤",race:"∽̱",racute:"ŕ",radic:"√",raemptyv:"⦳",rang:"⟩",rangd:"⦒",range:"⦥",rangle:"⟩",raqu:"»",raquo:"»",rarr:"→",rarrap:"⥵",rarrb:"⇥",rarrbfs:"⤠",rarrc:"⤳",rarrfs:"⤞",rarrhk:"↪",rarrlp:"↬",rarrpl:"⥅",rarrsim:"⥴",rarrtl:"↣",rarrw:"↝",ratail:"⤚",ratio:"∶",rationals:"ℚ",rbarr:"⤍",rbbrk:"❳",rbrace:"}",rbrack:"]",rbrke:"⦌",rbrksld:"⦎",rbrkslu:"⦐",rcaron:"ř",rcedil:"ŗ",rceil:"⌉",rcub:"}",rcy:"р",rdca:"⤷",rdldhar:"⥩",rdquo:"”",rdquor:"”",rdsh:"↳",real:"ℜ",realine:"ℛ",realpart:"ℜ",reals:"ℝ",rect:"▭",re:"®",reg:"®",rfisht:"⥽",rfloor:"⌋",rfr:"𝔯",rhard:"⇁",rharu:"⇀",rharul:"⥬",rho:"ρ",rhov:"ϱ",rightarrow:"→",rightarrowtail:"↣",rightharpoondown:"⇁",rightharpoonup:"⇀",rightleftarrows:"⇄",rightleftharpoons:"⇌",rightrightarrows:"⇉",rightsquigarrow:"↝",rightthreetimes:"⋌",ring:"˚",risingdotseq:"≓",rlarr:"⇄",rlhar:"⇌",rlm:"‏",rmoust:"⎱",rmoustache:"⎱",rnmid:"⫮",roang:"⟭",roarr:"⇾",robrk:"⟧",ropar:"⦆",ropf:"𝕣",roplus:"⨮",rotimes:"⨵",rpar:")",rpargt:"⦔",rppolint:"⨒",rrarr:"⇉",rsaquo:"›",rscr:"𝓇",rsh:"↱",rsqb:"]",rsquo:"’",rsquor:"’",rthree:"⋌",rtimes:"⋊",rtri:"▹",rtrie:"⊵",rtrif:"▸",rtriltri:"⧎",ruluhar:"⥨",rx:"℞",sacute:"ś",sbquo:"‚",sc:"≻",scE:"⪴",scap:"⪸",scaron:"š",sccue:"≽",sce:"⪰",scedil:"ş",scirc:"ŝ",scnE:"⪶",scnap:"⪺",scnsim:"⋩",scpolint:"⨓",scsim:"≿",scy:"с",sdot:"⋅",sdotb:"⊡",sdote:"⩦",seArr:"⇘",searhk:"⤥",searr:"↘",searrow:"↘",sec:"§",sect:"§",semi:";",seswar:"⤩",setminus:"∖",setmn:"∖",sext:"✶",sfr:"𝔰",sfrown:"⌢",sharp:"♯",shchcy:"щ",shcy:"ш",shortmid:"∣",shortparallel:"∥",sh:"­",shy:"­",sigma:"σ",sigmaf:"ς",sigmav:"ς",sim:"∼",simdot:"⩪",sime:"≃",simeq:"≃",simg:"⪞",simgE:"⪠",siml:"⪝",simlE:"⪟",simne:"≆",simplus:"⨤",simrarr:"⥲",slarr:"←",smallsetminus:"∖",smashp:"⨳",smeparsl:"⧤",smid:"∣",smile:"⌣",smt:"⪪",smte:"⪬",smtes:"⪬︀",softcy:"ь",sol:"/",solb:"⧄",solbar:"⌿",sopf:"𝕤",spades:"♠",spadesuit:"♠",spar:"∥",sqcap:"⊓",sqcaps:"⊓︀",sqcup:"⊔",sqcups:"⊔︀",sqsub:"⊏",sqsube:"⊑",sqsubset:"⊏",sqsubseteq:"⊑",sqsup:"⊐",sqsupe:"⊒",sqsupset:"⊐",sqsupseteq:"⊒",squ:"□",square:"□",squarf:"▪",squf:"▪",srarr:"→",sscr:"𝓈",ssetmn:"∖",ssmile:"⌣",sstarf:"⋆",star:"☆",starf:"★",straightepsilon:"ϵ",straightphi:"ϕ",strns:"¯",sub:"⊂",subE:"⫅",subdot:"⪽",sube:"⊆",subedot:"⫃",submult:"⫁",subnE:"⫋",subne:"⊊",subplus:"⪿",subrarr:"⥹",subset:"⊂",subseteq:"⊆",subseteqq:"⫅",subsetneq:"⊊",subsetneqq:"⫋",subsim:"⫇",subsub:"⫕",subsup:"⫓",succ:"≻",succapprox:"⪸",succcurlyeq:"≽",succeq:"⪰",succnapprox:"⪺",succneqq:"⪶",succnsim:"⋩",succsim:"≿",sum:"∑",sung:"♪",sup:"⊃",sup1:"¹",sup2:"²",sup3:"³",supE:"⫆",supdot:"⪾",supdsub:"⫘",supe:"⊇",supedot:"⫄",suphsol:"⟉",suphsub:"⫗",suplarr:"⥻",supmult:"⫂",supnE:"⫌",supne:"⊋",supplus:"⫀",supset:"⊃",supseteq:"⊇",supseteqq:"⫆",supsetneq:"⊋",supsetneqq:"⫌",supsim:"⫈",supsub:"⫔",supsup:"⫖",swArr:"⇙",swarhk:"⤦",swarr:"↙",swarrow:"↙",swnwar:"⤪",szli:"ß",szlig:"ß",target:"⌖",tau:"τ",tbrk:"⎴",tcaron:"ť",tcedil:"ţ",tcy:"т",tdot:"⃛",telrec:"⌕",tfr:"𝔱",there4:"∴",therefore:"∴",theta:"θ",thetasym:"ϑ",thetav:"ϑ",thickapprox:"≈",thicksim:"∼",thinsp:" ",thkap:"≈",thksim:"∼",thor:"þ",thorn:"þ",tilde:"˜",time:"×",times:"×",timesb:"⊠",timesbar:"⨱",timesd:"⨰",tint:"∭",toea:"⤨",top:"⊤",topbot:"⌶",topcir:"⫱",topf:"𝕥",topfork:"⫚",tosa:"⤩",tprime:"‴",trade:"™",triangle:"▵",triangledown:"▿",triangleleft:"◃",trianglelefteq:"⊴",triangleq:"≜",triangleright:"▹",trianglerighteq:"⊵",tridot:"◬",trie:"≜",triminus:"⨺",triplus:"⨹",trisb:"⧍",tritime:"⨻",trpezium:"⏢",tscr:"𝓉",tscy:"ц",tshcy:"ћ",tstrok:"ŧ",twixt:"≬",twoheadleftarrow:"↞",twoheadrightarrow:"↠",uArr:"⇑",uHar:"⥣",uacut:"ú",uacute:"ú",uarr:"↑",ubrcy:"ў",ubreve:"ŭ",ucir:"û",ucirc:"û",ucy:"у",udarr:"⇅",udblac:"ű",udhar:"⥮",ufisht:"⥾",ufr:"𝔲",ugrav:"ù",ugrave:"ù",uharl:"↿",uharr:"↾",uhblk:"▀",ulcorn:"⌜",ulcorner:"⌜",ulcrop:"⌏",ultri:"◸",umacr:"ū",um:"¨",uml:"¨",uogon:"ų",uopf:"𝕦",uparrow:"↑",updownarrow:"↕",upharpoonleft:"↿",upharpoonright:"↾",uplus:"⊎",upsi:"υ",upsih:"ϒ",upsilon:"υ",upuparrows:"⇈",urcorn:"⌝",urcorner:"⌝",urcrop:"⌎",uring:"ů",urtri:"◹",uscr:"𝓊",utdot:"⋰",utilde:"ũ",utri:"▵",utrif:"▴",uuarr:"⇈",uum:"ü",uuml:"ü",uwangle:"⦧",vArr:"⇕",vBar:"⫨",vBarv:"⫩",vDash:"⊨",vangrt:"⦜",varepsilon:"ϵ",varkappa:"ϰ",varnothing:"∅",varphi:"ϕ",varpi:"ϖ",varpropto:"∝",varr:"↕",varrho:"ϱ",varsigma:"ς",varsubsetneq:"⊊︀",varsubsetneqq:"⫋︀",varsupsetneq:"⊋︀",varsupsetneqq:"⫌︀",vartheta:"ϑ",vartriangleleft:"⊲",vartriangleright:"⊳",vcy:"в",vdash:"⊢",vee:"∨",veebar:"⊻",veeeq:"≚",vellip:"⋮",verbar:"|",vert:"|",vfr:"𝔳",vltri:"⊲",vnsub:"⊂⃒",vnsup:"⊃⃒",vopf:"𝕧",vprop:"∝",vrtri:"⊳",vscr:"𝓋",vsubnE:"⫋︀",vsubne:"⊊︀",vsupnE:"⫌︀",vsupne:"⊋︀",vzigzag:"⦚",wcirc:"ŵ",wedbar:"⩟",wedge:"∧",wedgeq:"≙",weierp:"℘",wfr:"𝔴",wopf:"𝕨",wp:"℘",wr:"≀",wreath:"≀",wscr:"𝓌",xcap:"⋂",xcirc:"◯",xcup:"⋃",xdtri:"▽",xfr:"𝔵",xhArr:"⟺",xharr:"⟷",xi:"ξ",xlArr:"⟸",xlarr:"⟵",xmap:"⟼",xnis:"⋻",xodot:"⨀",xopf:"𝕩",xoplus:"⨁",xotime:"⨂",xrArr:"⟹",xrarr:"⟶",xscr:"𝓍",xsqcup:"⨆",xuplus:"⨄",xutri:"△",xvee:"⋁",xwedge:"⋀",yacut:"ý",yacute:"ý",yacy:"я",ycirc:"ŷ",ycy:"ы",ye:"¥",yen:"¥",yfr:"𝔶",yicy:"ї",yopf:"𝕪",yscr:"𝓎",yucy:"ю",yum:"ÿ",yuml:"ÿ",zacute:"ź",zcaron:"ž",zcy:"з",zdot:"ż",zeetrf:"ℨ",zeta:"ζ",zfr:"𝔷",zhcy:"ж",zigrarr:"⇝",zopf:"𝕫",zscr:"𝓏",zwj:"‍",zwnj:"‌"},$p=function(e){return!!Gp.call(zp,e)&&zp[e]},Gp={}.hasOwnProperty;var qp={AElig:"Æ",AMP:"&",Aacute:"Á",Acirc:"Â",Agrave:"À",Aring:"Å",Atilde:"Ã",Auml:"Ä",COPY:"©",Ccedil:"Ç",ETH:"Ð",Eacute:"É",Ecirc:"Ê",Egrave:"È",Euml:"Ë",GT:">",Iacute:"Í",Icirc:"Î",Igrave:"Ì",Iuml:"Ï",LT:"<",Ntilde:"Ñ",Oacute:"Ó",Ocirc:"Ô",Ograve:"Ò",Oslash:"Ø",Otilde:"Õ",Ouml:"Ö",QUOT:'"',REG:"®",THORN:"Þ",Uacute:"Ú",Ucirc:"Û",Ugrave:"Ù",Uuml:"Ü",Yacute:"Ý",aacute:"á",acirc:"â",acute:"´",aelig:"æ",agrave:"à",amp:"&",aring:"å",atilde:"ã",auml:"ä",brvbar:"¦",ccedil:"ç",cedil:"¸",cent:"¢",copy:"©",curren:"¤",deg:"°",divide:"÷",eacute:"é",ecirc:"ê",egrave:"è",eth:"ð",euml:"ë",frac12:"½",frac14:"¼",frac34:"¾",gt:">",iacute:"í",icirc:"î",iexcl:"¡",igrave:"ì",iquest:"¿",iuml:"ï",laquo:"«",lt:"<",macr:"¯",micro:"µ",middot:"·",nbsp:" ",not:"¬",ntilde:"ñ",oacute:"ó",ocirc:"ô",ograve:"ò",ordf:"ª",ordm:"º",oslash:"ø",otilde:"õ",ouml:"ö",para:"¶",plusmn:"±",pound:"£",quot:'"',raquo:"»",reg:"®",sect:"§",shy:"­",sup1:"¹",sup2:"²",sup3:"³",szlig:"ß",thorn:"þ",times:"×",uacute:"ú",ucirc:"û",ugrave:"ù",uml:"¨",uuml:"ü",yacute:"ý",yen:"¥",yuml:"ÿ"},Hp={0:"�",128:"€",130:"‚",131:"ƒ",132:"„",133:"…",134:"†",135:"‡",136:"ˆ",137:"‰",138:"Š",139:"‹",140:"Œ",142:"Ž",145:"‘",146:"’",147:"“",148:"”",149:"•",150:"–",151:"—",152:"˜",153:"™",154:"š",155:"›",156:"œ",158:"ž",159:"Ÿ"},Vp=Mp,Wp=jp,Yp=function(e){return Bp(e)||Up(e)},Kp=$p,Xp=function(e,t){var n,r,o={};t||(t={});for(r in ef)n=t[r],o[r]=null==n?ef[r]:n;(o.position.indent||o.position.start)&&(o.indent=o.position.indent||[],o.position=o.position.start);return function(e,t){var n,r,o,a,i,s,l,c,u,d,p,f,g,m,h,b,y,v,w,S=t.additional,x=t.nonTerminated,E=t.text,k=t.reference,A=t.warning,T=t.textContext,O=t.referenceContext,C=t.warningContext,I=t.position,N=t.indent||[],R=e.length,_=0,P=-1,L=I.column||1,D=I.line||1,M="",j=[];"string"==typeof S&&(S=S.charCodeAt(0));b=F(),c=A?B:Jp,_--,R++;for(;++_<R;)if(i===nf&&(L=N[P]||1),(i=e.charCodeAt(_))===af){if((l=e.charCodeAt(_+1))===tf||l===nf||l===rf||l===of||l===af||l===lf||l!=l||S&&l===S){M+=Qp(i),L++;continue}for(f=g=_+1,w=g,l===uf?(w=++f,(l=e.charCodeAt(w))===df||l===pf?(m=mf,w=++f):m=hf):m=gf,n="",p="",a="",h=yf[m],w--;++w<R&&h(l=e.charCodeAt(w));)a+=Qp(l),m===gf&&Zp.call(qp,a)&&(n=a,p=qp[a]);(o=e.charCodeAt(w)===sf)&&(w++,(r=m===gf&&Kp(a))&&(n=a,p=r)),v=1+w-g,(o||x)&&(a?m===gf?(o&&!p?c(Ef,1):(n!==a&&(v=1+(w=f+n.length)-f,o=!1),o||(u=n?vf:Sf,t.attribute?(l=e.charCodeAt(w))===cf?(c(u,v),p=null):Yp(l)?p=null:c(u,v):c(u,v))),s=p):(o||c(wf,v),Of(s=parseInt(a,bf[m]))?(c(Af,v),s=Qp(ff)):s in Hp?(c(kf,v),s=Hp[s]):(d="",Cf(s)&&c(kf,v),s>65535&&(d+=Qp((s-=65536)>>>10|55296),s=56320|1023&s),s=d+Qp(s))):m!==gf&&c(xf,v)),s?(U(),b=F(),_=w-1,L+=w-g+1,j.push(s),(y=F()).offset++,k&&k.call(O,s,{start:b,end:y},e.slice(g-1,w)),b=y):(a=e.slice(g-1,w),M+=a,L+=a.length,_=w-1)}else 10===i&&(D++,P++,L=0),i==i?(M+=Qp(i),L++):U();return j.join("");function F(){return{line:D,column:L,offset:_+(I.offset||0)}}function B(e,t){var n=F();n.column+=t,n.offset+=t,A.call(C,Tf[e],n,e)}function U(){M&&(j.push(M),E&&E.call(T,M,{start:b,end:F()}),M="")}}(e,o)},Zp={}.hasOwnProperty,Qp=String.fromCharCode,Jp=Function.prototype,ef={warning:null,reference:null,text:null,warningContext:null,referenceContext:null,textContext:null,position:{},additional:null,attribute:!1,nonTerminated:!0},tf=9,nf=10,rf=12,of=32,af=38,sf=59,lf=60,cf=61,uf=35,df=88,pf=120,ff=65533,gf="named",mf="hexadecimal",hf="decimal",bf={};bf[mf]=16,bf[hf]=10;var yf={};yf[gf]=Yp,yf[hf]=Vp,yf[mf]=Wp;var vf=1,wf=2,Sf=3,xf=4,Ef=5,kf=6,Af=7,Tf={};function Of(e){return e>=55296&&e<=57343||e>1114111}function Cf(e){return e>=1&&e<=8||11===e||e>=13&&e<=31||e>=127&&e<=159||e>=64976&&e<=65007||!(65535&~e)||65534==(65535&e)}Tf[vf]="Named character references must be terminated by a semicolon",Tf[wf]="Numeric character references must be terminated by a semicolon",Tf[Sf]="Named character references cannot be empty",Tf[xf]="Numeric character references cannot be empty",Tf[Ef]="Named character references must be known",Tf[kf]="Numeric character references cannot be disallowed",Tf[Af]="Numeric character references cannot be outside the permissible Unicode range";var If={exports:{}};!function(e){var t=function(e){var t=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,n=0,r={},o={manual:e.Prism&&e.Prism.manual,disableWorkerMessageHandler:e.Prism&&e.Prism.disableWorkerMessageHandler,util:{encode:function e(t){return t instanceof a?new a(t.type,e(t.content),t.alias):Array.isArray(t)?t.map(e):t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/\u00a0/g," ")},type:function(e){return Object.prototype.toString.call(e).slice(8,-1)},objId:function(e){return e.__id||Object.defineProperty(e,"__id",{value:++n}),e.__id},clone:function e(t,n){var r,a;switch(n=n||{},o.util.type(t)){case"Object":if(a=o.util.objId(t),n[a])return n[a];for(var i in r={},n[a]=r,t)t.hasOwnProperty(i)&&(r[i]=e(t[i],n));return r;case"Array":return a=o.util.objId(t),n[a]?n[a]:(r=[],n[a]=r,t.forEach(function(t,o){r[o]=e(t,n)}),r);default:return t}},getLanguage:function(e){for(;e;){var n=t.exec(e.className);if(n)return n[1].toLowerCase();e=e.parentElement}return"none"},setLanguage:function(e,n){e.className=e.className.replace(RegExp(t,"gi"),""),e.classList.add("language-"+n)},currentScript:function(){if("undefined"==typeof document)return null;if(document.currentScript&&"SCRIPT"===document.currentScript.tagName)return document.currentScript;try{throw new Error}catch(r){var e=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(r.stack)||[])[1];if(e){var t=document.getElementsByTagName("script");for(var n in t)if(t[n].src==e)return t[n]}return null}},isActive:function(e,t,n){for(var r="no-"+t;e;){var o=e.classList;if(o.contains(t))return!0;if(o.contains(r))return!1;e=e.parentElement}return!!n}},languages:{plain:r,plaintext:r,text:r,txt:r,extend:function(e,t){var n=o.util.clone(o.languages[e]);for(var r in t)n[r]=t[r];return n},insertBefore:function(e,t,n,r){var a=(r=r||o.languages)[e],i={};for(var s in a)if(a.hasOwnProperty(s)){if(s==t)for(var l in n)n.hasOwnProperty(l)&&(i[l]=n[l]);n.hasOwnProperty(s)||(i[s]=a[s])}var c=r[e];return r[e]=i,o.languages.DFS(o.languages,function(t,n){n===c&&t!=e&&(this[t]=i)}),i},DFS:function e(t,n,r,a){a=a||{};var i=o.util.objId;for(var s in t)if(t.hasOwnProperty(s)){n.call(t,s,t[s],r||s);var l=t[s],c=o.util.type(l);"Object"!==c||a[i(l)]?"Array"!==c||a[i(l)]||(a[i(l)]=!0,e(l,n,s,a)):(a[i(l)]=!0,e(l,n,null,a))}}},plugins:{},highlightAll:function(e,t){o.highlightAllUnder(document,e,t)},highlightAllUnder:function(e,t,n){var r={callback:n,container:e,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};o.hooks.run("before-highlightall",r),r.elements=Array.prototype.slice.apply(r.container.querySelectorAll(r.selector)),o.hooks.run("before-all-elements-highlight",r);for(var a,i=0;a=r.elements[i++];)o.highlightElement(a,!0===t,r.callback)},highlightElement:function(t,n,r){var a=o.util.getLanguage(t),i=o.languages[a];o.util.setLanguage(t,a);var s=t.parentElement;s&&"pre"===s.nodeName.toLowerCase()&&o.util.setLanguage(s,a);var l={element:t,language:a,grammar:i,code:t.textContent};function c(e){l.highlightedCode=e,o.hooks.run("before-insert",l),l.element.innerHTML=l.highlightedCode,o.hooks.run("after-highlight",l),o.hooks.run("complete",l),r&&r.call(l.element)}if(o.hooks.run("before-sanity-check",l),(s=l.element.parentElement)&&"pre"===s.nodeName.toLowerCase()&&!s.hasAttribute("tabindex")&&s.setAttribute("tabindex","0"),!l.code)return o.hooks.run("complete",l),void(r&&r.call(l.element));if(o.hooks.run("before-highlight",l),l.grammar)if(n&&e.Worker){var u=new Worker(o.filename);u.onmessage=function(e){c(e.data)},u.postMessage(JSON.stringify({language:l.language,code:l.code,immediateClose:!0}))}else c(o.highlight(l.code,l.grammar,l.language));else c(o.util.encode(l.code))},highlight:function(e,t,n){var r={code:e,grammar:t,language:n};if(o.hooks.run("before-tokenize",r),!r.grammar)throw new Error('The language "'+r.language+'" has no grammar.');return r.tokens=o.tokenize(r.code,r.grammar),o.hooks.run("after-tokenize",r),a.stringify(o.util.encode(r.tokens),r.language)},tokenize:function(e,t){var n=t.rest;if(n){for(var r in n)t[r]=n[r];delete t.rest}var o=new l;return c(o,o.head,e),s(e,o,t,o.head,0),function(e){var t=[],n=e.head.next;for(;n!==e.tail;)t.push(n.value),n=n.next;return t}(o)},hooks:{all:{},add:function(e,t){var n=o.hooks.all;n[e]=n[e]||[],n[e].push(t)},run:function(e,t){var n=o.hooks.all[e];if(n&&n.length)for(var r,a=0;r=n[a++];)r(t)}},Token:a};function a(e,t,n,r){this.type=e,this.content=t,this.alias=n,this.length=0|(r||"").length}function i(e,t,n,r){e.lastIndex=t;var o=e.exec(n);if(o&&r&&o[1]){var a=o[1].length;o.index+=a,o[0]=o[0].slice(a)}return o}function s(e,t,n,r,l,d){for(var p in n)if(n.hasOwnProperty(p)&&n[p]){var f=n[p];f=Array.isArray(f)?f:[f];for(var g=0;g<f.length;++g){if(d&&d.cause==p+","+g)return;var m=f[g],h=m.inside,b=!!m.lookbehind,y=!!m.greedy,v=m.alias;if(y&&!m.pattern.global){var w=m.pattern.toString().match(/[imsuy]*$/)[0];m.pattern=RegExp(m.pattern.source,w+"g")}for(var S=m.pattern||m,x=r.next,E=l;x!==t.tail&&!(d&&E>=d.reach);E+=x.value.length,x=x.next){var k=x.value;if(t.length>e.length)return;if(!(k instanceof a)){var A,T=1;if(y){if(!(A=i(S,E,e,b))||A.index>=e.length)break;var O=A.index,C=A.index+A[0].length,I=E;for(I+=x.value.length;O>=I;)I+=(x=x.next).value.length;if(E=I-=x.value.length,x.value instanceof a)continue;for(var N=x;N!==t.tail&&(I<C||"string"==typeof N.value);N=N.next)T++,I+=N.value.length;T--,k=e.slice(E,I),A.index-=E}else if(!(A=i(S,0,k,b)))continue;O=A.index;var R=A[0],_=k.slice(0,O),P=k.slice(O+R.length),L=E+k.length;d&&L>d.reach&&(d.reach=L);var D=x.prev;if(_&&(D=c(t,D,_),E+=_.length),u(t,D,T),x=c(t,D,new a(p,h?o.tokenize(R,h):R,v,R)),P&&c(t,x,P),T>1){var M={cause:p+","+g,reach:L};s(e,t,n,x.prev,E,M),d&&M.reach>d.reach&&(d.reach=M.reach)}}}}}}function l(){var e={value:null,prev:null,next:null},t={value:null,prev:e,next:null};e.next=t,this.head=e,this.tail=t,this.length=0}function c(e,t,n){var r=t.next,o={value:n,prev:t,next:r};return t.next=o,r.prev=o,e.length++,o}function u(e,t,n){for(var r=t.next,o=0;o<n&&r!==e.tail;o++)r=r.next;t.next=r,r.prev=t,e.length-=o}if(e.Prism=o,a.stringify=function e(t,n){if("string"==typeof t)return t;if(Array.isArray(t)){var r="";return t.forEach(function(t){r+=e(t,n)}),r}var a={type:t.type,content:e(t.content,n),tag:"span",classes:["token",t.type],attributes:{},language:n},i=t.alias;i&&(Array.isArray(i)?Array.prototype.push.apply(a.classes,i):a.classes.push(i)),o.hooks.run("wrap",a);var s="";for(var l in a.attributes)s+=" "+l+'="'+(a.attributes[l]||"").replace(/"/g,"&quot;")+'"';return"<"+a.tag+' class="'+a.classes.join(" ")+'"'+s+">"+a.content+"</"+a.tag+">"},!e.document)return e.addEventListener?(o.disableWorkerMessageHandler||e.addEventListener("message",function(t){var n=JSON.parse(t.data),r=n.language,a=n.code,i=n.immediateClose;e.postMessage(o.highlight(a,o.languages[r],r)),i&&e.close()},!1),o):o;var d=o.util.currentScript();function p(){o.manual||o.highlightAll()}if(d&&(o.filename=d.src,d.hasAttribute("data-manual")&&(o.manual=!0)),!o.manual){var f=document.readyState;"loading"===f||"interactive"===f&&d&&d.defer?document.addEventListener("DOMContentLoaded",p):window.requestAnimationFrame?window.requestAnimationFrame(p):window.setTimeout(p,16)}return o}("undefined"!=typeof window?window:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:{});
21
21
  /**
22
22
  * Prism: Lightweight, robust, elegant syntax highlighting
23
23
  *
@@ -47,4 +47,4 @@ var Oe={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24
47
47
  object-assign
48
48
  (c) Sindre Sorhus
49
49
  @license MIT
50
- */function JH(){if(UH)return BH;UH=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;return BH=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map(function(e){return t[e]}).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach(function(e){r[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(r,o){for(var a,i,s=function(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(r),l=1;l<arguments.length;l++){for(var c in a=Object(arguments[l]))t.call(a,c)&&(s[c]=a[c]);if(e){i=e(a);for(var u=0;u<i.length;u++)n.call(a,i[u])&&(s[i[u]]=a[i[u]])}}return s},BH}function eV(){if($H)return zH;$H=1;return zH="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}function tV(){return qH?GH:(qH=1,GH=Function.call.bind(Object.prototype.hasOwnProperty))}if("production"!==process.env.NODE_ENV){var nV=QH();LH.exports=function(){if(YH)return WH;YH=1;var e=QH(),t=JH(),n=eV(),r=tV(),o=function(){if(VH)return HH;VH=1;var e=function(){};if("production"!==process.env.NODE_ENV){var t=eV(),n={},r=tV();e=function(e){var t="Warning: "+e;"undefined"!=typeof console&&console.error(t);try{throw new Error(t)}catch(e){}}}function o(o,a,i,s,l){if("production"!==process.env.NODE_ENV)for(var c in o)if(r(o,c)){var u;try{if("function"!=typeof o[c]){var d=Error((s||"React class")+": "+i+" type `"+c+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof o[c]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw d.name="Invariant Violation",d}u=o[c](a,c,s,i,null,t)}catch(e){u=e}if(!u||u instanceof Error||e((s||"React class")+": type specification of "+i+" `"+c+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof u+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),u instanceof Error&&!(u.message in n)){n[u.message]=!0;var p=l?l():"";e("Failed "+i+" type: "+u.message+(null!=p?p:""))}}}return o.resetWarningCache=function(){"production"!==process.env.NODE_ENV&&(n={})},HH=o}(),a=function(){};function i(){return null}return"production"!==process.env.NODE_ENV&&(a=function(e){var t="Warning: "+e;"undefined"!=typeof console&&console.error(t);try{throw new Error(t)}catch(e){}}),WH=function(s,l){var c="function"==typeof Symbol&&Symbol.iterator,u="<<anonymous>>",d={array:m("array"),bigint:m("bigint"),bool:m("boolean"),func:m("function"),number:m("number"),object:m("object"),string:m("string"),symbol:m("symbol"),any:g(i),arrayOf:function(e){return g(function(t,r,o,a,i){if("function"!=typeof e)return new f("Property `"+i+"` of component `"+o+"` has invalid PropType notation inside arrayOf.");var s=t[r];if(!Array.isArray(s))return new f("Invalid "+a+" `"+i+"` of type `"+y(s)+"` supplied to `"+o+"`, expected an array.");for(var l=0;l<s.length;l++){var c=e(s,l,o,a,i+"["+l+"]",n);if(c instanceof Error)return c}return null})},element:g(function(e,t,n,r,o){var a=e[t];return s(a)?null:new f("Invalid "+r+" `"+o+"` of type `"+y(a)+"` supplied to `"+n+"`, expected a single ReactElement.")}),elementType:g(function(t,n,r,o,a){var i=t[n];return e.isValidElementType(i)?null:new f("Invalid "+o+" `"+a+"` of type `"+y(i)+"` supplied to `"+r+"`, expected a single ReactElement type.")}),instanceOf:function(e){return g(function(t,n,r,o,a){if(!(t[n]instanceof e)){var i=e.name||u;return new f("Invalid "+o+" `"+a+"` of type `"+((s=t[n]).constructor&&s.constructor.name?s.constructor.name:u)+"` supplied to `"+r+"`, expected instance of `"+i+"`.")}var s;return null})},node:g(function(e,t,n,r,o){return b(e[t])?null:new f("Invalid "+r+" `"+o+"` supplied to `"+n+"`, expected a ReactNode.")}),objectOf:function(e){return g(function(t,o,a,i,s){if("function"!=typeof e)return new f("Property `"+s+"` of component `"+a+"` has invalid PropType notation inside objectOf.");var l=t[o],c=y(l);if("object"!==c)return new f("Invalid "+i+" `"+s+"` of type `"+c+"` supplied to `"+a+"`, expected an object.");for(var u in l)if(r(l,u)){var d=e(l,u,a,i,s+"."+u,n);if(d instanceof Error)return d}return null})},oneOf:function(e){return Array.isArray(e)?g(function(t,n,r,o,a){for(var i=t[n],s=0;s<e.length;s++)if(p(i,e[s]))return null;var l=JSON.stringify(e,function(e,t){return"symbol"===v(t)?String(t):t});return new f("Invalid "+o+" `"+a+"` of value `"+String(i)+"` supplied to `"+r+"`, expected one of "+l+".")}):("production"!==process.env.NODE_ENV&&a(arguments.length>1?"Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).":"Invalid argument supplied to oneOf, expected an array."),i)},oneOfType:function(e){if(!Array.isArray(e))return"production"!==process.env.NODE_ENV&&a("Invalid argument supplied to oneOfType, expected an instance of array."),i;for(var t=0;t<e.length;t++){var o=e[t];if("function"!=typeof o)return a("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+w(o)+" at index "+t+"."),i}return g(function(t,o,a,i,s){for(var l=[],c=0;c<e.length;c++){var u=(0,e[c])(t,o,a,i,s,n);if(null==u)return null;u.data&&r(u.data,"expectedType")&&l.push(u.data.expectedType)}return new f("Invalid "+i+" `"+s+"` supplied to `"+a+"`"+(l.length>0?", expected one of type ["+l.join(", ")+"]":"")+".")})},shape:function(e){return g(function(t,r,o,a,i){var s=t[r],l=y(s);if("object"!==l)return new f("Invalid "+a+" `"+i+"` of type `"+l+"` supplied to `"+o+"`, expected `object`.");for(var c in e){var u=e[c];if("function"!=typeof u)return h(o,a,i,c,v(u));var d=u(s,c,o,a,i+"."+c,n);if(d)return d}return null})},exact:function(e){return g(function(o,a,i,s,l){var c=o[a],u=y(c);if("object"!==u)return new f("Invalid "+s+" `"+l+"` of type `"+u+"` supplied to `"+i+"`, expected `object`.");var d=t({},o[a],e);for(var p in d){var g=e[p];if(r(e,p)&&"function"!=typeof g)return h(i,s,l,p,v(g));if(!g)return new f("Invalid "+s+" `"+l+"` key `"+p+"` supplied to `"+i+"`.\nBad object: "+JSON.stringify(o[a],null," ")+"\nValid keys: "+JSON.stringify(Object.keys(e),null," "));var m=g(c,p,i,s,l+"."+p,n);if(m)return m}return null})}};function p(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}function f(e,t){this.message=e,this.data=t&&"object"==typeof t?t:{},this.stack=""}function g(e){if("production"!==process.env.NODE_ENV)var t={},r=0;function o(o,i,s,c,d,p,g){if(c=c||u,p=p||s,g!==n){if(l){var m=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw m.name="Invariant Violation",m}if("production"!==process.env.NODE_ENV&&"undefined"!=typeof console){var h=c+":"+s;!t[h]&&r<3&&(a("You are manually calling a React.PropTypes validation function for the `"+p+"` prop on `"+c+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),t[h]=!0,r++)}}return null==i[s]?o?null===i[s]?new f("The "+d+" `"+p+"` is marked as required in `"+c+"`, but its value is `null`."):new f("The "+d+" `"+p+"` is marked as required in `"+c+"`, but its value is `undefined`."):null:e(i,s,c,d,p)}var i=o.bind(null,!1);return i.isRequired=o.bind(null,!0),i}function m(e){return g(function(t,n,r,o,a,i){var s=t[n];return y(s)!==e?new f("Invalid "+o+" `"+a+"` of type `"+v(s)+"` supplied to `"+r+"`, expected `"+e+"`.",{expectedType:e}):null})}function h(e,t,n,r,o){return new f((e||"React class")+": "+t+" type `"+n+"."+r+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+o+"`.")}function b(e){switch(typeof e){case"number":case"string":case"undefined":return!0;case"boolean":return!e;case"object":if(Array.isArray(e))return e.every(b);if(null===e||s(e))return!0;var t=function(e){var t=e&&(c&&e[c]||e["@@iterator"]);if("function"==typeof t)return t}(e);if(!t)return!1;var n,r=t.call(e);if(t!==e.entries){for(;!(n=r.next()).done;)if(!b(n.value))return!1}else for(;!(n=r.next()).done;){var o=n.value;if(o&&!b(o[1]))return!1}return!0;default:return!1}}function y(e){var t=typeof e;return Array.isArray(e)?"array":e instanceof RegExp?"object":function(e,t){return"symbol"===e||!!t&&("Symbol"===t["@@toStringTag"]||"function"==typeof Symbol&&t instanceof Symbol)}(t,e)?"symbol":t}function v(e){if(null==e)return""+e;var t=y(e);if("object"===t){if(e instanceof Date)return"date";if(e instanceof RegExp)return"regexp"}return t}function w(e){var t=v(e);switch(t){case"array":case"object":return"an "+t;case"boolean":case"date":case"regexp":return"a "+t;default:return t}}return f.prototype=Error.prototype,d.checkPropTypes=o,d.resetWarningCache=o.resetWarningCache,d.PropTypes=d,d},WH}()(nV.isElement,!0)}else LH.exports=function(){if(XH)return KH;XH=1;var e=eV();function t(){}function n(){}return n.resetWarningCache=t,KH=function(){function r(t,n,r,o,a,i){if(i!==e){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function o(){return r}r.isRequired=r;var a={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:o,element:r,elementType:r,instanceOf:o,node:r,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:n,resetWarningCache:t};return a.PropTypes=a,a}}()();var rV=LH.exports;const{getOwnPropertyNames:oV,getOwnPropertySymbols:aV}=Object,{hasOwnProperty:iV}=Object.prototype;function sV(e,t){return function(n,r,o){return e(n,r,o)&&t(n,r,o)}}function lV(e){return function(t,n,r){if(!t||!n||"object"!=typeof t||"object"!=typeof n)return e(t,n,r);const{cache:o}=r,a=o.get(t),i=o.get(n);if(a&&i)return a===n&&i===t;o.set(t,n),o.set(n,t);const s=e(t,n,r);return o.delete(t),o.delete(n),s}}function cV(e){return oV(e).concat(aV(e))}const uV=Object.hasOwn||((e,t)=>iV.call(e,t));function dV(e,t){return e===t||!e&&!t&&e!=e&&t!=t}const{getOwnPropertyDescriptor:pV,keys:fV}=Object;function gV(e,t){return e.byteLength===t.byteLength&&OV(new Uint8Array(e),new Uint8Array(t))}function mV(e,t,n){let r=e.length;if(t.length!==r)return!1;for(;r-- >0;)if(!n.equals(e[r],t[r],r,r,e,t,n))return!1;return!0}function hV(e,t){return e.byteLength===t.byteLength&&OV(new Uint8Array(e.buffer,e.byteOffset,e.byteLength),new Uint8Array(t.buffer,t.byteOffset,t.byteLength))}function bV(e,t){return dV(e.getTime(),t.getTime())}function yV(e,t){return e.name===t.name&&e.message===t.message&&e.cause===t.cause&&e.stack===t.stack}function vV(e,t){return e===t}function wV(e,t,n){const r=e.size;if(r!==t.size)return!1;if(!r)return!0;const o=new Array(r),a=e.entries();let i,s,l=0;for(;(i=a.next())&&!i.done;){const r=t.entries();let a=!1,c=0;for(;(s=r.next())&&!s.done;){if(o[c]){c++;continue}const r=i.value,u=s.value;if(n.equals(r[0],u[0],l,c,e,t,n)&&n.equals(r[1],u[1],r[0],u[0],e,t,n)){a=o[c]=!0;break}c++}if(!a)return!1;l++}return!0}const SV=dV;function xV(e,t,n){const r=fV(e);let o=r.length;if(fV(t).length!==o)return!1;for(;o-- >0;)if(!IV(e,t,n,r[o]))return!1;return!0}function EV(e,t,n){const r=cV(e);let o,a,i,s=r.length;if(cV(t).length!==s)return!1;for(;s-- >0;){if(o=r[s],!IV(e,t,n,o))return!1;if(a=pV(e,o),i=pV(t,o),(a||i)&&(!a||!i||a.configurable!==i.configurable||a.enumerable!==i.enumerable||a.writable!==i.writable))return!1}return!0}function kV(e,t){return dV(e.valueOf(),t.valueOf())}function AV(e,t){return e.source===t.source&&e.flags===t.flags}function TV(e,t,n){const r=e.size;if(r!==t.size)return!1;if(!r)return!0;const o=new Array(r),a=e.values();let i,s;for(;(i=a.next())&&!i.done;){const r=t.values();let a=!1,l=0;for(;(s=r.next())&&!s.done;){if(!o[l]&&n.equals(i.value,s.value,i.value,s.value,e,t,n)){a=o[l]=!0;break}l++}if(!a)return!1}return!0}function OV(e,t){let n=e.byteLength;if(t.byteLength!==n||e.byteOffset!==t.byteOffset)return!1;for(;n-- >0;)if(e[n]!==t[n])return!1;return!0}function CV(e,t){return e.hostname===t.hostname&&e.pathname===t.pathname&&e.protocol===t.protocol&&e.port===t.port&&e.hash===t.hash&&e.username===t.username&&e.password===t.password}function IV(e,t,n,r){return!("_owner"!==r&&"__o"!==r&&"__v"!==r||!e.$$typeof&&!t.$$typeof)||uV(t,r)&&n.equals(e[r],t[r],r,r,e,t,n)}const NV={"[object Int8Array]":!0,"[object Uint8Array]":!0,"[object Uint8ClampedArray]":!0,"[object Int16Array]":!0,"[object Uint16Array]":!0,"[object Int32Array]":!0,"[object Uint32Array]":!0,"[object Float16Array]":!0,"[object Float32Array]":!0,"[object Float64Array]":!0,"[object BigInt64Array]":!0,"[object BigUint64Array]":!0},RV=Object.prototype.toString;function _V({areArrayBuffersEqual:e,areArraysEqual:t,areDataViewsEqual:n,areDatesEqual:r,areErrorsEqual:o,areFunctionsEqual:a,areMapsEqual:i,areNumbersEqual:s,areObjectsEqual:l,arePrimitiveWrappersEqual:c,areRegExpsEqual:u,areSetsEqual:d,areTypedArraysEqual:p,areUrlsEqual:f,unknownTagComparators:g}){return function(m,h,b){if(m===h)return!0;if(null==m||null==h)return!1;const y=typeof m;if(y!==typeof h)return!1;if("object"!==y)return"number"===y?s(m,h,b):"function"===y&&a(m,h,b);const v=m.constructor;if(v!==h.constructor)return!1;if(v===Object)return l(m,h,b);if(Array.isArray(m))return t(m,h,b);if(v===Date)return r(m,h,b);if(v===RegExp)return u(m,h,b);if(v===Map)return i(m,h,b);if(v===Set)return d(m,h,b);const w=RV.call(m);if("[object Date]"===w)return r(m,h,b);if("[object RegExp]"===w)return u(m,h,b);if("[object Map]"===w)return i(m,h,b);if("[object Set]"===w)return d(m,h,b);if("[object Object]"===w)return"function"!=typeof m.then&&"function"!=typeof h.then&&l(m,h,b);if("[object URL]"===w)return f(m,h,b);if("[object Error]"===w)return o(m,h,b);if("[object Arguments]"===w)return l(m,h,b);if(NV[w])return p(m,h,b);if("[object ArrayBuffer]"===w)return e(m,h,b);if("[object DataView]"===w)return n(m,h,b);if("[object Boolean]"===w||"[object Number]"===w||"[object String]"===w)return c(m,h,b);if(g){let e=g[w];if(!e){const t=null!=(S=m)?S[Symbol.toStringTag]:void 0;t&&(e=g[t])}if(e)return e(m,h,b)}var S;return!1}}const PV=LV();function LV(e={}){const{circular:t=!1,createInternalComparator:n,createState:r,strict:o=!1}=e,a=function({circular:e,createCustomConfig:t,strict:n}){let r={areArrayBuffersEqual:gV,areArraysEqual:n?EV:mV,areDataViewsEqual:hV,areDatesEqual:bV,areErrorsEqual:yV,areFunctionsEqual:vV,areMapsEqual:n?sV(wV,EV):wV,areNumbersEqual:SV,areObjectsEqual:n?EV:xV,arePrimitiveWrappersEqual:kV,areRegExpsEqual:AV,areSetsEqual:n?sV(TV,EV):TV,areTypedArraysEqual:n?sV(OV,EV):OV,areUrlsEqual:CV,unknownTagComparators:void 0};if(t&&(r=Object.assign({},r,t(r))),e){const e=lV(r.areArraysEqual),t=lV(r.areMapsEqual),n=lV(r.areObjectsEqual),o=lV(r.areSetsEqual);r=Object.assign({},r,{areArraysEqual:e,areMapsEqual:t,areObjectsEqual:n,areSetsEqual:o})}return r}(e),i=_V(a),s=n?n(i):(l=i,function(e,t,n,r,o,a,i){return l(e,t,i)});var l;return function({circular:e,comparator:t,createState:n,equals:r,strict:o}){if(n)return function(a,i){const{cache:s=(e?new WeakMap:void 0),meta:l}=n();return t(a,i,{cache:s,equals:r,meta:l,strict:o})};if(e)return function(e,n){return t(e,n,{cache:new WeakMap,equals:r,meta:void 0,strict:o})};const a={cache:void 0,equals:r,meta:void 0,strict:o};return function(e,n){return t(e,n,a)}}({circular:t,comparator:i,createState:r,equals:s,strict:o})}function DV(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=-1;requestAnimationFrame(function r(o){n<0&&(n=o),o-n>t?(e(o),n=-1):function(e){"undefined"!=typeof requestAnimationFrame&&requestAnimationFrame(e)}(r)})}function MV(e){return MV="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},MV(e)}function jV(e){return function(e){if(Array.isArray(e))return e}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return FV(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return FV(e,t)}(e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function FV(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function BV(){var e=function(){return null},t=!1,n=function n(r){if(!t){if(Array.isArray(r)){if(!r.length)return;var o=jV(r),a=o[0],i=o.slice(1);return"number"==typeof a?void DV(n.bind(null,i),a):(n(a),void DV(n.bind(null,i)))}"object"===MV(r)&&e(r),"function"==typeof r&&r()}};return{stop:function(){t=!0},start:function(e){t=!1,n(e)},subscribe:function(t){return e=t,function(){e=function(){return null}}}}}function UV(e){return UV="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},UV(e)}function zV(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function $V(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?zV(Object(n),!0).forEach(function(t){GV(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):zV(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function GV(e,t,n){return(t=function(e){var t=function(e,t){if("object"!==UV(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!==UV(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===UV(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}LV({strict:!0}),LV({circular:!0}),LV({circular:!0,strict:!0}),LV({createInternalComparator:()=>dV}),LV({strict:!0,createInternalComparator:()=>dV}),LV({circular:!0,createInternalComparator:()=>dV}),LV({circular:!0,createInternalComparator:()=>dV,strict:!0});var qV=function(e){return e},HV=function(e,t){return Object.keys(t).reduce(function(n,r){return $V($V({},n),{},GV({},r,e(r,t[r])))},{})},VV=function(e,t,n){return e.map(function(e){return"".concat(function(e){return e.replace(/([A-Z])/g,function(e){return"-".concat(e.toLowerCase())})}(e)," ").concat(t,"ms ").concat(n)}).join(",")},WV="production"!==process.env.NODE_ENV,YV=function(e,t,n,r,o,a,i,s){if(WV&&"undefined"!=typeof console&&console.warn&&(void 0===t&&console.warn("LogUtils requires an error message argument"),!e))if(void 0===t)console.warn("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var l=[n,r,o,a,i,s],c=0;console.warn(t.replace(/%s/g,function(){return l[c++]}))}};function KV(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a,i,s=[],l=!0,c=!1;try{if(a=(n=n.call(e)).next,0===t);else for(;!(l=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(c)throw o}}return s}}(e,t)||ZV(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function XV(e){return function(e){if(Array.isArray(e))return QV(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||ZV(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ZV(e,t){if(e){if("string"==typeof e)return QV(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?QV(e,t):void 0}}function QV(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var JV=1e-4,eW=function(e,t){return[0,3*e,3*t-6*e,3*e-3*t+1]},tW=function(e,t){return e.map(function(e,n){return e*Math.pow(t,n)}).reduce(function(e,t){return e+t})},nW=function(e,t){return function(n){var r=eW(e,t);return tW(r,n)}},rW=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=t[0],o=t[1],a=t[2],i=t[3];if(1===t.length)switch(t[0]){case"linear":r=0,o=0,a=1,i=1;break;case"ease":r=.25,o=.1,a=.25,i=1;break;case"ease-in":r=.42,o=0,a=1,i=1;break;case"ease-out":r=.42,o=0,a=.58,i=1;break;case"ease-in-out":r=0,o=0,a=.58,i=1;break;default:var s=t[0].split("(");if("cubic-bezier"===s[0]&&4===s[1].split(")")[0].split(",").length){var l=s[1].split(")")[0].split(",").map(function(e){return parseFloat(e)}),c=KV(l,4);r=c[0],o=c[1],a=c[2],i=c[3]}else YV(!1,"[configBezier]: arguments should be one of oneOf 'linear', 'ease', 'ease-in', 'ease-out', 'ease-in-out','cubic-bezier(x1,y1,x2,y2)', instead received %s",t)}YV([r,a,o,i].every(function(e){return"number"==typeof e&&e>=0&&e<=1}),"[configBezier]: arguments should be x1, y1, x2, y2 of [0, 1] instead received %s",t);var u,d,p=nW(r,a),f=nW(o,i),g=(u=r,d=a,function(e){var t=eW(u,d),n=[].concat(XV(t.map(function(e,t){return e*t}).slice(1)),[0]);return tW(n,e)}),m=function(e){return e>1?1:e<0?0:e},h=function(e){for(var t=e>1?1:e,n=t,r=0;r<8;++r){var o=p(n)-t,a=g(n);if(Math.abs(o-t)<JV||a<JV)return f(n);n=m(n-o/a)}return f(n)};return h.isStepper=!1,h},oW=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=t[0];if("string"==typeof r)switch(r){case"ease":case"ease-in-out":case"ease-out":case"ease-in":case"linear":return rW(r);case"spring":return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.stiff,n=void 0===t?100:t,r=e.damping,o=void 0===r?8:r,a=e.dt,i=void 0===a?17:a,s=function(e,t,r){var a=r+(-(e-t)*n-r*o)*i/1e3,s=r*i/1e3+e;return Math.abs(s-t)<JV&&Math.abs(a)<JV?[t,0]:[s,a]};return s.isStepper=!0,s.dt=i,s}();default:if("cubic-bezier"===r.split("(")[0])return rW(r);YV(!1,"[configEasing]: first argument should be one of 'ease', 'ease-in', 'ease-out', 'ease-in-out','cubic-bezier(x1,y1,x2,y2)', 'linear' and 'spring', instead received %s",t)}return"function"==typeof r?r:(YV(!1,"[configEasing]: first argument type should be function or string, instead received %s",t),null)};function aW(e){return aW="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},aW(e)}function iW(e){return function(e){if(Array.isArray(e))return pW(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||dW(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function sW(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function lW(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?sW(Object(n),!0).forEach(function(t){cW(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):sW(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function cW(e,t,n){return(t=function(e){var t=function(e,t){if("object"!==aW(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!==aW(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===aW(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function uW(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a,i,s=[],l=!0,c=!1;try{if(a=(n=n.call(e)).next,0===t);else for(;!(l=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(c)throw o}}return s}}(e,t)||dW(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function dW(e,t){if(e){if("string"==typeof e)return pW(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?pW(e,t):void 0}}function pW(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var fW=function(e,t,n){return e+(t-e)*n},gW=function(e){return e.from!==e.to},mW=function e(t,n,r){var o=HV(function(e,n){if(gW(n)){var r=uW(t(n.from,n.to,n.velocity),2),o=r[0],a=r[1];return lW(lW({},n),{},{from:o,velocity:a})}return n},n);return r<1?HV(function(e,t){return gW(t)?lW(lW({},t),{},{velocity:fW(t.velocity,o[e].velocity,r),from:fW(t.from,o[e].from,r)}):t},n):e(t,o,r-1)},hW=function(e,t,n,r,o){var a,i,s,l,c=(a=e,i=t,[Object.keys(a),Object.keys(i)].reduce(function(e,t){return e.filter(function(e){return t.includes(e)})})),u=c.reduce(function(n,r){return lW(lW({},n),{},cW({},r,[e[r],t[r]]))},{}),d=c.reduce(function(n,r){return lW(lW({},n),{},cW({},r,{from:e[r],velocity:0,to:t[r]}))},{}),p=-1,f=function(){return null};return f=n.isStepper?function(r){s||(s=r);var a=(r-s)/n.dt;d=mW(n,d,a),o(lW(lW(lW({},e),t),HV(function(e,t){return t.from},d))),s=r,Object.values(d).filter(gW).length&&(p=requestAnimationFrame(f))}:function(a){l||(l=a);var i=(a-l)/r,s=HV(function(e,t){return fW.apply(void 0,iW(t).concat([n(i)]))},u);if(o(lW(lW(lW({},e),t),s)),i<1)p=requestAnimationFrame(f);else{var c=HV(function(e,t){return fW.apply(void 0,iW(t).concat([n(1)]))},u);o(lW(lW(lW({},e),t),c))}},function(){return requestAnimationFrame(f),function(){cancelAnimationFrame(p)}}};function bW(e){return bW="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},bW(e)}var yW=["children","begin","duration","attributeName","easing","isActive","steps","from","to","canBegin","onAnimationEnd","shouldReAnimate","onAnimationReStart"];function vW(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function wW(e){return function(e){if(Array.isArray(e))return SW(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return SW(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return SW(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function SW(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function xW(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function EW(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?xW(Object(n),!0).forEach(function(t){kW(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):xW(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function kW(e,t,n){return(t=TW(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function AW(e,t,n){return t&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,TW(r.key),r)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function TW(e){var t=function(e,t){if("object"!==bW(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!==bW(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===bW(t)?t:String(t)}function OW(e,t){return OW=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},OW(e,t)}function CW(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=RW(e);if(t){var o=RW(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return IW(this,n)}}function IW(e,t){if(t&&("object"===bW(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return NW(e)}function NW(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function RW(e){return RW=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},RW(e)}var _W=function(t){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&OW(e,t)}(r,t);var n=CW(r);function r(e,t){var o;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r);var a=(o=n.call(this,e,t)).props,i=a.isActive,s=a.attributeName,l=a.from,c=a.to,u=a.steps,d=a.children,p=a.duration;if(o.handleStyleChange=o.handleStyleChange.bind(NW(o)),o.changeStyle=o.changeStyle.bind(NW(o)),!i||p<=0)return o.state={style:{}},"function"==typeof d&&(o.state={style:c}),IW(o);if(u&&u.length)o.state={style:u[0].style};else if(l){if("function"==typeof d)return o.state={style:l},IW(o);o.state={style:s?kW({},s,l):l}}else o.state={style:{}};return o}return AW(r,[{key:"componentDidMount",value:function(){var e=this.props,t=e.isActive,n=e.canBegin;this.mounted=!0,t&&n&&this.runAnimation(this.props)}},{key:"componentDidUpdate",value:function(e){var t=this.props,n=t.isActive,r=t.canBegin,o=t.attributeName,a=t.shouldReAnimate,i=t.to,s=t.from,l=this.state.style;if(r)if(n){if(!(PV(e.to,i)&&e.canBegin&&e.isActive)){var c=!e.canBegin||!e.isActive;this.manager&&this.manager.stop(),this.stopJSAnimation&&this.stopJSAnimation();var u=c||a?s:e.to;if(this.state&&l){var d={style:o?kW({},o,u):u};(o&&l[o]!==u||!o&&l!==u)&&this.setState(d)}this.runAnimation(EW(EW({},this.props),{},{from:u,begin:0}))}}else{var p={style:o?kW({},o,i):i};this.state&&l&&(o&&l[o]!==i||!o&&l!==i)&&this.setState(p)}}},{key:"componentWillUnmount",value:function(){this.mounted=!1;var e=this.props.onAnimationEnd;this.unSubscribe&&this.unSubscribe(),this.manager&&(this.manager.stop(),this.manager=null),this.stopJSAnimation&&this.stopJSAnimation(),e&&e()}},{key:"handleStyleChange",value:function(e){this.changeStyle(e)}},{key:"changeStyle",value:function(e){this.mounted&&this.setState({style:e})}},{key:"runJSAnimation",value:function(e){var t=this,n=e.from,r=e.to,o=e.duration,a=e.easing,i=e.begin,s=e.onAnimationEnd,l=e.onAnimationStart,c=hW(n,r,oW(a),o,this.changeStyle);this.manager.start([l,i,function(){t.stopJSAnimation=c()},o,s])}},{key:"runStepAnimation",value:function(e){var t=this,n=e.steps,r=e.begin,o=e.onAnimationStart,a=n[0],i=a.style,s=a.duration,l=void 0===s?0:s;return this.manager.start([o].concat(wW(n.reduce(function(e,r,o){if(0===o)return e;var a=r.duration,i=r.easing,s=void 0===i?"ease":i,l=r.style,c=r.properties,u=r.onAnimationEnd,d=o>0?n[o-1]:r,p=c||Object.keys(l);if("function"==typeof s||"spring"===s)return[].concat(wW(e),[t.runJSAnimation.bind(t,{from:d.style,to:l,duration:a,easing:s}),a]);var f=VV(p,a,s),g=EW(EW(EW({},d.style),l),{},{transition:f});return[].concat(wW(e),[g,a,u]).filter(qV)},[i,Math.max(l,r)])),[e.onAnimationEnd]))}},{key:"runAnimation",value:function(e){this.manager||(this.manager=BV());var t=e.begin,n=e.duration,r=e.attributeName,o=e.to,a=e.easing,i=e.onAnimationStart,s=e.onAnimationEnd,l=e.steps,c=e.children,u=this.manager;if(this.unSubscribe=u.subscribe(this.handleStyleChange),"function"!=typeof a&&"function"!=typeof c&&"spring"!==a)if(l.length>1)this.runStepAnimation(e);else{var d=r?kW({},r,o):o,p=VV(Object.keys(d),n,a);u.start([i,t,EW(EW({},d),{},{transition:p}),n,s])}else this.runJSAnimation(e)}},{key:"render",value:function(){var t=this.props,n=t.children;t.begin;var r=t.duration;t.attributeName,t.easing;var o=t.isActive;t.steps,t.from,t.to,t.canBegin,t.onAnimationEnd,t.shouldReAnimate,t.onAnimationReStart;var a=vW(t,yW),i=e.Children.count(n),s=this.state.style;if("function"==typeof n)return n(s);if(!o||0===i||r<=0)return n;var l=function(t){var n=t.props,r=n.style,o=void 0===r?{}:r,i=n.className;return e.cloneElement(t,EW(EW({},a),{},{style:EW(EW({},o),s),className:i}))};return 1===i?l(e.Children.only(n)):e.createElement("div",null,e.Children.map(n,function(e){return l(e)}))}}]),r}(e.PureComponent);function PW(e){return PW="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},PW(e)}function LW(){return LW=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},LW.apply(this,arguments)}function DW(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a,i,s=[],l=!0,c=!1;try{if(a=(n=n.call(e)).next,0===t);else for(;!(l=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(c)throw o}}return s}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return MW(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return MW(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function MW(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function jW(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function FW(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?jW(Object(n),!0).forEach(function(t){BW(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):jW(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function BW(e,t,n){var r;return r=function(e,t){if("object"!=PW(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=PW(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(t,"string"),(t="symbol"==PW(r)?r:r+"")in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}_W.displayName="Animate",_W.defaultProps={begin:0,duration:1e3,from:"",to:"",attributeName:"",easing:"ease",isActive:!0,canBegin:!0,steps:[],onAnimationEnd:function(){},onAnimationStart:function(){}},_W.propTypes={from:rV.oneOfType([rV.object,rV.string]),to:rV.oneOfType([rV.object,rV.string]),attributeName:rV.string,duration:rV.number,begin:rV.number,easing:rV.oneOfType([rV.string,rV.func]),steps:rV.arrayOf(rV.shape({duration:rV.number.isRequired,style:rV.object.isRequired,easing:rV.oneOfType([rV.oneOf(["ease","ease-in","ease-out","ease-in-out","linear"]),rV.func]),properties:rV.arrayOf("string"),onAnimationEnd:rV.func})),children:rV.oneOfType([rV.node,rV.func]),isActive:rV.bool,canBegin:rV.bool,onAnimationEnd:rV.func,shouldReAnimate:rV.bool,onAnimationStart:rV.func,onAnimationReStart:rV.func};var UW=function(e,t,n,r,o){var a,i=Math.min(Math.abs(n)/2,Math.abs(r)/2),s=r>=0?1:-1,l=n>=0?1:-1,c=r>=0&&n>=0||r<0&&n<0?1:0;if(i>0&&o instanceof Array){for(var u=[0,0,0,0],d=0;d<4;d++)u[d]=o[d]>i?i:o[d];a="M".concat(e,",").concat(t+s*u[0]),u[0]>0&&(a+="A ".concat(u[0],",").concat(u[0],",0,0,").concat(c,",").concat(e+l*u[0],",").concat(t)),a+="L ".concat(e+n-l*u[1],",").concat(t),u[1]>0&&(a+="A ".concat(u[1],",").concat(u[1],",0,0,").concat(c,",\n ").concat(e+n,",").concat(t+s*u[1])),a+="L ".concat(e+n,",").concat(t+r-s*u[2]),u[2]>0&&(a+="A ".concat(u[2],",").concat(u[2],",0,0,").concat(c,",\n ").concat(e+n-l*u[2],",").concat(t+r)),a+="L ".concat(e+l*u[3],",").concat(t+r),u[3]>0&&(a+="A ".concat(u[3],",").concat(u[3],",0,0,").concat(c,",\n ").concat(e,",").concat(t+r-s*u[3])),a+="Z"}else if(i>0&&o===+o&&o>0){var p=Math.min(i,o);a="M ".concat(e,",").concat(t+s*p,"\n A ").concat(p,",").concat(p,",0,0,").concat(c,",").concat(e+l*p,",").concat(t,"\n L ").concat(e+n-l*p,",").concat(t,"\n A ").concat(p,",").concat(p,",0,0,").concat(c,",").concat(e+n,",").concat(t+s*p,"\n L ").concat(e+n,",").concat(t+r-s*p,"\n A ").concat(p,",").concat(p,",0,0,").concat(c,",").concat(e+n-l*p,",").concat(t+r,"\n L ").concat(e+l*p,",").concat(t+r,"\n A ").concat(p,",").concat(p,",0,0,").concat(c,",").concat(e,",").concat(t+r-s*p," Z")}else a="M ".concat(e,",").concat(t," h ").concat(n," v ").concat(r," h ").concat(-n," Z");return a},zW=function(e,t){if(!e||!t)return!1;var n=e.x,r=e.y,o=t.x,a=t.y,i=t.width,s=t.height;if(Math.abs(i)>0&&Math.abs(s)>0){var l=Math.min(o,o+i),c=Math.max(o,o+i),u=Math.min(a,a+s),d=Math.max(a,a+s);return n>=l&&n<=c&&r>=u&&r<=d}return!1},$W={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},GW=function(t){var n=FW(FW({},$W),t),r=e.useRef(),o=DW(e.useState(-1),2),a=o[0],i=o[1];e.useEffect(function(){if(r.current&&r.current.getTotalLength)try{var e=r.current.getTotalLength();e&&i(e)}catch(e){}},[]);var s=n.x,l=n.y,c=n.width,u=n.height,d=n.radius,p=n.className,f=n.animationEasing,g=n.animationDuration,m=n.animationBegin,h=n.isAnimationActive,b=n.isUpdateAnimationActive;if(s!==+s||l!==+l||c!==+c||u!==+u||0===c||0===u)return null;var y=Rk("recharts-rectangle",p);return b?e.createElement(_W,{canBegin:a>0,from:{width:c,height:u,x:s,y:l},to:{width:c,height:u,x:s,y:l},duration:g,animationEasing:f,isActive:b},function(t){var o=t.width,i=t.height,s=t.x,l=t.y;return e.createElement(_W,{canBegin:a>0,from:"0px ".concat(-1===a?1:a,"px"),to:"".concat(a,"px 0px"),attributeName:"strokeDasharray",begin:m,duration:g,isActive:h,easing:f},e.createElement("path",LW({},eC(n,!0),{className:y,d:UW(s,l,o,i,d),ref:r})))}):e.createElement("path",LW({},eC(n,!0),{className:y,d:UW(s,l,c,u,d)}))},qW=["points","className","baseLinePoints","connectNulls"];function HW(){return HW=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},HW.apply(this,arguments)}function VW(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function WW(e){return function(e){if(Array.isArray(e))return YW(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return YW(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return YW(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function YW(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var KW=function(e){return e&&e.x===+e.x&&e.y===+e.y},XW=function(e,t){var n=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=[[]];return e.forEach(function(e){KW(e)?t[t.length-1].push(e):t[t.length-1].length>0&&t.push([])}),KW(e[0])&&t[t.length-1].push(e[0]),t[t.length-1].length<=0&&(t=t.slice(0,-1)),t}(e);t&&(n=[n.reduce(function(e,t){return[].concat(WW(e),WW(t))},[])]);var r=n.map(function(e){return e.reduce(function(e,t,n){return"".concat(e).concat(0===n?"M":"L").concat(t.x,",").concat(t.y)},"")}).join("");return 1===n.length?"".concat(r,"Z"):r},ZW=function(t){var n=t.points,r=t.className,o=t.baseLinePoints,a=t.connectNulls,i=VW(t,qW);if(!n||!n.length)return null;var s=Rk("recharts-polygon",r);if(o&&o.length){var l=i.stroke&&"none"!==i.stroke,c=function(e,t,n){var r=XW(e,n);return"".concat("Z"===r.slice(-1)?r.slice(0,-1):r,"L").concat(XW(t.reverse(),n).slice(1))}(n,o,a);return e.createElement("g",{className:s},e.createElement("path",HW({},eC(i,!0),{fill:"Z"===c.slice(-1)?i.fill:"none",stroke:"none",d:c})),l?e.createElement("path",HW({},eC(i,!0),{fill:"none",d:XW(n,a)})):null,l?e.createElement("path",HW({},eC(i,!0),{fill:"none",d:XW(o,a)})):null)}var u=XW(n,a);return e.createElement("path",HW({},eC(i,!0),{fill:"Z"===u.slice(-1)?i.fill:"none",className:s,d:u}))};function QW(){return QW=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},QW.apply(this,arguments)}var JW=function(e){var t=e.cx,n=e.cy,r=e.r,o=Rk("recharts-dot",e.className);return t===+t&&n===+n&&r===+r?i.createElement("circle",QW({},eC(e,!1),FO(e),{className:o,cx:t,cy:n,r:r})):null};function eY(e){return eY="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},eY(e)}var tY=["x","y","top","left","width","height","className"];function nY(){return nY=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},nY.apply(this,arguments)}function rY(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function oY(e,t,n){var r;return r=function(e,t){if("object"!=eY(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=eY(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(t,"string"),(t="symbol"==eY(r)?r:r+"")in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function aY(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var iY=function(e,t,n,r,o,a){return"M".concat(e,",").concat(o,"v").concat(r,"M").concat(a,",").concat(t,"h").concat(n)},sY=function(t){var n=t.x,r=void 0===n?0:n,o=t.y,a=void 0===o?0:o,i=t.top,s=void 0===i?0:i,l=t.left,c=void 0===l?0:l,u=t.width,d=void 0===u?0:u,p=t.height,f=void 0===p?0:p,g=t.className,m=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?rY(Object(n),!0).forEach(function(t){oY(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):rY(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}({x:r,y:a,top:s,left:c,width:d,height:f},aY(t,tY));return EO(r)&&EO(a)&&EO(d)&&EO(f)&&EO(s)&&EO(c)?e.createElement("path",nY({},eC(m,!0),{className:Rk("recharts-cross",g),d:iY(r,a,d,f,s,c)})):null},lY=s$,cY=l$,uY=UP;var dY=function(e,t){return e&&e.length?lY(e,uY(t),cY):void 0},pY=s$,fY=UP,gY=f$;var mY=function(e,t){return e&&e.length?pY(e,fY(t),gY):void 0},hY=["cx","cy","angle","ticks","axisLine"],bY=["ticks","tick","angle","tickFormatter","stroke"];function yY(e){return yY="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},yY(e)}function vY(){return vY=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},vY.apply(this,arguments)}function wY(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function SY(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?wY(Object(n),!0).forEach(function(t){CY(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):wY(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function xY(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function EY(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,IY(r.key),r)}}function kY(e,t,n){return t=TY(t),function(e,t){if(t&&("object"===yY(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,AY()?Reflect.construct(t,n||[],TY(e).constructor):t.apply(e,n))}function AY(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(AY=function(){return!!e})()}function TY(e){return TY=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},TY(e)}function OY(e,t){return OY=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},OY(e,t)}function CY(e,t,n){return(t=IY(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function IY(e){var t=function(e,t){if("object"!=yY(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=yY(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==yY(t)?t:t+""}var NY=function(t){function n(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),kY(this,n,arguments)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&OY(e,t)}(n,t),r=n,o=[{key:"getTickValueCoord",value:function(e){var t=e.coordinate,n=this.props,r=n.angle,o=n.cx,a=n.cy;return Mq(o,a,t,r)}},{key:"getTickTextAnchor",value:function(){var e;switch(this.props.orientation){case"left":e="end";break;case"right":e="start";break;default:e="middle"}return e}},{key:"getViewBox",value:function(){var e=this.props,t=e.cx,n=e.cy,r=e.angle,o=e.ticks,a=dY(o,function(e){return e.coordinate||0});return{cx:t,cy:n,startAngle:r,endAngle:r,innerRadius:mY(o,function(e){return e.coordinate||0}).coordinate||0,outerRadius:a.coordinate||0}}},{key:"renderAxisLine",value:function(){var t=this.props,n=t.cx,r=t.cy,o=t.angle,a=t.ticks,i=t.axisLine,s=xY(t,hY),l=a.reduce(function(e,t){return[Math.min(e[0],t.coordinate),Math.max(e[1],t.coordinate)]},[1/0,-1/0]),c=Mq(n,r,l[0],o),u=Mq(n,r,l[1],o),d=SY(SY(SY({},eC(s,!1)),{},{fill:"none"},eC(i,!1)),{},{x1:c.x,y1:c.y,x2:u.x,y2:u.y});return e.createElement("line",vY({className:"recharts-polar-radius-axis-line"},d))}},{key:"renderTicks",value:function(){var t=this,r=this.props,o=r.ticks,a=r.tick,i=r.angle,s=r.tickFormatter,l=r.stroke,c=xY(r,bY),u=this.getTickTextAnchor(),d=eC(c,!1),p=eC(a,!1),f=o.map(function(r,o){var c=t.getTickValueCoord(r),f=SY(SY(SY(SY({textAnchor:u,transform:"rotate(".concat(90-i,", ").concat(c.x,", ").concat(c.y,")")},d),{},{stroke:"none",fill:l},p),{},{index:o},c),{},{payload:r});return e.createElement(dC,vY({className:Rk("recharts-polar-radius-axis-tick",zq(a)),key:"tick-".concat(r.coordinate)},BO(t.props,r,o)),n.renderTickItem(a,f,s?s(r.value,o):r.value))});return e.createElement(dC,{className:"recharts-polar-radius-axis-ticks"},f)}},{key:"render",value:function(){var t=this.props,n=t.ticks,r=t.axisLine,o=t.tick;return n&&n.length?e.createElement(dC,{className:Rk("recharts-polar-radius-axis",this.props.className)},r&&this.renderAxisLine(),o&&this.renderTicks(),Qq.renderCallByParent(this.props,this.getViewBox())):null}}],a=[{key:"renderTickItem",value:function(t,n,r){return e.isValidElement(t)?e.cloneElement(t,n):lA(t)?t(n):e.createElement(Ej,vY({},n,{className:"recharts-polar-radius-axis-tick-value"}),r)}}],o&&EY(r.prototype,o),a&&EY(r,a),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,o,a}(e.PureComponent);function RY(e){return RY="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},RY(e)}function _Y(){return _Y=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},_Y.apply(this,arguments)}function PY(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function LY(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?PY(Object(n),!0).forEach(function(t){UY(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):PY(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function DY(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,zY(r.key),r)}}function MY(e,t,n){return t=FY(t),function(e,t){if(t&&("object"===RY(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,jY()?Reflect.construct(t,n||[],FY(e).constructor):t.apply(e,n))}function jY(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(jY=function(){return!!e})()}function FY(e){return FY=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},FY(e)}function BY(e,t){return BY=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},BY(e,t)}function UY(e,t,n){return(t=zY(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function zY(e){var t=function(e,t){if("object"!=RY(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=RY(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==RY(t)?t:t+""}CY(NY,"displayName","PolarRadiusAxis"),CY(NY,"axisType","radiusAxis"),CY(NY,"defaultProps",{type:"number",radiusAxisId:0,cx:0,cy:0,angle:0,orientation:"right",stroke:"#ccc",axisLine:!0,tick:!0,tickCount:5,allowDataOverflow:!1,scale:"auto",allowDuplicatedCategory:!0});var $Y=Math.PI/180,GY=1e-5,qY=function(t){function n(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),MY(this,n,arguments)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&BY(e,t)}(n,t),r=n,o=[{key:"getTickLineCoord",value:function(e){var t=this.props,n=t.cx,r=t.cy,o=t.radius,a=t.orientation,i=t.tickSize||8,s=Mq(n,r,o,e.coordinate),l=Mq(n,r,o+("inner"===a?-1:1)*i,e.coordinate);return{x1:s.x,y1:s.y,x2:l.x,y2:l.y}}},{key:"getTickTextAnchor",value:function(e){var t=this.props.orientation,n=Math.cos(-e.coordinate*$Y);return n>GY?"outer"===t?"start":"end":n<-GY?"outer"===t?"end":"start":"middle"}},{key:"renderAxisLine",value:function(){var t=this.props,n=t.cx,r=t.cy,o=t.radius,a=t.axisLine,i=t.axisLineType,s=LY(LY({},eC(this.props,!1)),{},{fill:"none"},eC(a,!1));if("circle"===i)return e.createElement(JW,_Y({className:"recharts-polar-angle-axis-line"},s,{cx:n,cy:r,r:o}));var l=this.props.ticks.map(function(e){return Mq(n,r,o,e.coordinate)});return e.createElement(ZW,_Y({className:"recharts-polar-angle-axis-line"},s,{points:l}))}},{key:"renderTicks",value:function(){var t=this,r=this.props,o=r.ticks,a=r.tick,i=r.tickLine,s=r.tickFormatter,l=r.stroke,c=eC(this.props,!1),u=eC(a,!1),d=LY(LY({},c),{},{fill:"none"},eC(i,!1)),p=o.map(function(r,o){var p=t.getTickLineCoord(r),f=LY(LY(LY({textAnchor:t.getTickTextAnchor(r)},c),{},{stroke:"none",fill:l},u),{},{index:o,payload:r,x:p.x2,y:p.y2});return e.createElement(dC,_Y({className:Rk("recharts-polar-angle-axis-tick",zq(a)),key:"tick-".concat(r.coordinate)},BO(t.props,r,o)),i&&e.createElement("line",_Y({className:"recharts-polar-angle-axis-tick-line"},d,p)),a&&n.renderTickItem(a,f,s?s(r.value,o):r.value))});return e.createElement(dC,{className:"recharts-polar-angle-axis-ticks"},p)}},{key:"render",value:function(){var t=this.props,n=t.ticks,r=t.radius,o=t.axisLine;return r<=0||!n||!n.length?null:e.createElement(dC,{className:Rk("recharts-polar-angle-axis",this.props.className)},o&&this.renderAxisLine(),this.renderTicks())}}],a=[{key:"renderTickItem",value:function(t,n,r){return e.isValidElement(t)?e.cloneElement(t,n):lA(t)?t(n):e.createElement(Ej,_Y({},n,{className:"recharts-polar-angle-axis-tick-value"}),r)}}],o&&DY(r.prototype,o),a&&DY(r,a),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,o,a}(e.PureComponent);UY(qY,"displayName","PolarAngleAxis"),UY(qY,"axisType","angleAxis"),UY(qY,"defaultProps",{type:"category",angleAxisId:0,scale:"auto",cx:0,cy:0,orientation:"outer",axisLine:!0,tickLine:!0,tickSize:8,tick:!0,hide:!1,allowDuplicatedCategory:!0});var HY=HR(Object.getPrototypeOf,Object),VY=Yk,WY=HY,YY=Kk,KY=Function.prototype,XY=Object.prototype,ZY=KY.toString,QY=XY.hasOwnProperty,JY=ZY.call(Object);var eK=function(e){if(!YY(e)||"[object Object]"!=VY(e))return!1;var t=WY(e);if(null===t)return!0;var n=QY.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&ZY.call(n)==JY},tK=Yk,nK=Kk;var rK=function(e){return!0===e||!1===e||nK(e)&&"[object Boolean]"==tK(e)};function oK(e){return oK="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},oK(e)}function aK(){return aK=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},aK.apply(this,arguments)}function iK(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a,i,s=[],l=!0,c=!1;try{if(a=(n=n.call(e)).next,0===t);else for(;!(l=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(c)throw o}}return s}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return sK(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return sK(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function sK(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function lK(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function cK(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?lK(Object(n),!0).forEach(function(t){uK(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):lK(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function uK(e,t,n){var r;return r=function(e,t){if("object"!=oK(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=oK(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(t,"string"),(t="symbol"==oK(r)?r:r+"")in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var dK,pK=function(e,t,n,r,o){var a,i=n-r;return a="M ".concat(e,",").concat(t),a+="L ".concat(e+n,",").concat(t),a+="L ".concat(e+n-i/2,",").concat(t+o),a+="L ".concat(e+n-i/2-r,",").concat(t+o),a+="L ".concat(e,",").concat(t," Z")},fK={x:0,y:0,upperWidth:0,lowerWidth:0,height:0,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},gK=function(t){var n=cK(cK({},fK),t),r=e.useRef(),o=iK(e.useState(-1),2),a=o[0],i=o[1];e.useEffect(function(){if(r.current&&r.current.getTotalLength)try{var e=r.current.getTotalLength();e&&i(e)}catch(e){}},[]);var s=n.x,l=n.y,c=n.upperWidth,u=n.lowerWidth,d=n.height,p=n.className,f=n.animationEasing,g=n.animationDuration,m=n.animationBegin,h=n.isUpdateAnimationActive;if(s!==+s||l!==+l||c!==+c||u!==+u||d!==+d||0===c&&0===u||0===d)return null;var b=Rk("recharts-trapezoid",p);return h?e.createElement(_W,{canBegin:a>0,from:{upperWidth:0,lowerWidth:0,height:d,x:s,y:l},to:{upperWidth:c,lowerWidth:u,height:d,x:s,y:l},duration:g,animationEasing:f,isActive:h},function(t){var o=t.upperWidth,i=t.lowerWidth,s=t.height,l=t.x,c=t.y;return e.createElement(_W,{canBegin:a>0,from:"0px ".concat(-1===a?1:a,"px"),to:"".concat(a,"px 0px"),attributeName:"strokeDasharray",begin:m,duration:g,easing:f},e.createElement("path",aK({},eC(n,!0),{className:b,d:pK(l,c,o,i,s),ref:r})))}):e.createElement("g",null,e.createElement("path",aK({},eC(n,!0),{className:b,d:pK(s,l,c,u,d)})))},mK=["option","shapeType","propTransformer","activeClassName","isActive"];function hK(e){return hK="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},hK(e)}function bK(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function yK(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function vK(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?yK(Object(n),!0).forEach(function(t){wK(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):yK(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function wK(e,t,n){var r;return r=function(e,t){if("object"!=hK(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=hK(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(t,"string"),(t="symbol"==hK(r)?r:r+"")in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function SK(e,t){return vK(vK({},t),e)}function xK(t){var n=t.shapeType,r=t.elementProps;switch(n){case"rectangle":return e.createElement(GW,r);case"trapezoid":return e.createElement(gK,r);case"sector":return e.createElement(SH,r);case"symbols":if(function(e){return"symbols"===e}(n))return e.createElement(nN,r);break;default:return null}}function EK(t){var n,r=t.option,o=t.shapeType,a=t.propTransformer,i=void 0===a?SK:a,s=t.activeClassName,l=void 0===s?"recharts-active-shape":s,c=t.isActive,u=bK(t,mK);if(e.isValidElement(r))n=e.cloneElement(r,vK(vK({},u),function(t){return e.isValidElement(t)?t.props:t}(r)));else if(lA(r))n=r(u);else if(eK(r)&&!rK(r)){var d=i(r,u);n=e.createElement(xK,{shapeType:o,elementProps:d})}else{var p=u;n=e.createElement(xK,{shapeType:o,elementProps:p})}return c?e.createElement(dC,{className:l},n):n}function kK(e,t){return null!=t&&"trapezoids"in e.props}function AK(e,t){return null!=t&&"sectors"in e.props}function TK(e,t){return null!=t&&"points"in e.props}function OK(e,t){var n,r,o=e.x===(null==t||null===(n=t.labelViewBox)||void 0===n?void 0:n.x)||e.x===t.x,a=e.y===(null==t||null===(r=t.labelViewBox)||void 0===r?void 0:r.y)||e.y===t.y;return o&&a}function CK(e,t){var n=e.endAngle===t.endAngle,r=e.startAngle===t.startAngle;return n&&r}function IK(e,t){var n=e.x===t.x,r=e.y===t.y,o=e.z===t.z;return n&&r&&o}function NK(e){var t=e.activeTooltipItem,n=e.graphicalItem,r=e.itemData,o=function(e,t){var n;return kK(e,t)?n="trapezoids":AK(e,t)?n="sectors":TK(e,t)&&(n="points"),n}(n,t),a=function(e,t){var n,r;return kK(e,t)?null===(n=t.tooltipPayload)||void 0===n||null===(n=n[0])||void 0===n||null===(n=n.payload)||void 0===n?void 0:n.payload:AK(e,t)?null===(r=t.tooltipPayload)||void 0===r||null===(r=r[0])||void 0===r||null===(r=r.payload)||void 0===r?void 0:r.payload:TK(e,t)?t.payload:{}}(n,t),i=r.filter(function(e,r){var i=O$(a,e),s=n.props[o].filter(function(e){var r=function(e,t){var n;return kK(e,t)?n=OK:AK(e,t)?n=CK:TK(e,t)&&(n=IK),n}(n,t);return r(e,t)}),l=n.props[o].indexOf(s[s.length-1]);return i&&r===l});return r.indexOf(i[i.length-1])}function RK(e){return RK="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},RK(e)}function _K(){return _K=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},_K.apply(this,arguments)}function PK(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function LK(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?PK(Object(n),!0).forEach(function(t){UK(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):PK(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function DK(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,zK(r.key),r)}}function MK(e,t,n){return t=FK(t),function(e,t){if(t&&("object"===RK(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,jK()?Reflect.construct(t,n||[],FK(e).constructor):t.apply(e,n))}function jK(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(jK=function(){return!!e})()}function FK(e){return FK=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},FK(e)}function BK(e,t){return BK=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},BK(e,t)}function UK(e,t,n){return(t=zK(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function zK(e){var t=function(e,t){if("object"!=RK(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=RK(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==RK(t)?t:t+""}var $K=function(t){function n(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),UK(t=MK(this,n,[e]),"pieRef",null),UK(t,"sectorRefs",[]),UK(t,"id",TO("recharts-pie-")),UK(t,"handleAnimationEnd",function(){var e=t.props.onAnimationEnd;t.setState({isAnimationFinished:!0}),lA(e)&&e()}),UK(t,"handleAnimationStart",function(){var e=t.props.onAnimationStart;t.setState({isAnimationFinished:!1}),lA(e)&&e()}),t.state={isAnimationFinished:!e.isAnimationActive,prevIsAnimationActive:e.isAnimationActive,prevAnimationId:e.animationId,sectorToFocus:0},t}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&BK(e,t)}(n,t),r=n,o=[{key:"isActiveIndex",value:function(e){var t=this.props.activeIndex;return Array.isArray(t)?-1!==t.indexOf(e):e===t}},{key:"hasActiveIndex",value:function(){var e=this.props.activeIndex;return Array.isArray(e)?0!==e.length:e||0===e}},{key:"renderLabels",value:function(t){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var r=this.props,o=r.label,a=r.labelLine,i=r.dataKey,s=r.valueKey,l=eC(this.props,!1),c=eC(o,!1),u=eC(a,!1),d=o&&o.offsetRadius||20,p=t.map(function(t,r){var p=(t.startAngle+t.endAngle)/2,f=Mq(t.cx,t.cy,t.outerRadius+d,p),g=LK(LK(LK(LK({},l),t),{},{stroke:"none"},c),{},{index:r,textAnchor:n.getTextAnchor(f.x,t.cx)},f),m=LK(LK(LK(LK({},l),t),{},{fill:"none",stroke:t.fill},u),{},{index:r,points:[Mq(t.cx,t.cy,t.outerRadius,p),f]}),h=i;return aO(i)&&aO(s)?h="value":aO(i)&&(h=s),e.createElement(dC,{key:"label-".concat(t.startAngle,"-").concat(t.endAngle,"-").concat(t.midAngle,"-").concat(r)},a&&n.renderLabelLineItem(a,m,"line"),n.renderLabelItem(o,g,rq(t,h)))});return e.createElement(dC,{className:"recharts-pie-labels"},p)}},{key:"renderSectorsStatically",value:function(t){var n=this,r=this.props,o=r.activeShape,a=r.blendStroke,i=r.inactiveShape;return t.map(function(r,s){if(0===(null==r?void 0:r.startAngle)&&0===(null==r?void 0:r.endAngle)&&1!==t.length)return null;var l=n.isActiveIndex(s),c=i&&n.hasActiveIndex()?i:null,u=l?o:c,d=LK(LK({},r),{},{stroke:a?r.fill:r.stroke,tabIndex:-1});return e.createElement(dC,_K({ref:function(e){e&&!n.sectorRefs.includes(e)&&n.sectorRefs.push(e)},tabIndex:-1,className:"recharts-pie-sector"},BO(n.props,r,s),{key:"sector-".concat(null==r?void 0:r.startAngle,"-").concat(null==r?void 0:r.endAngle,"-").concat(r.midAngle,"-").concat(s)}),e.createElement(EK,_K({option:u,isActive:l,shapeType:"sector"},d)))})}},{key:"renderSectorsWithAnimation",value:function(){var t=this,n=this.props,r=n.sectors,o=n.isAnimationActive,a=n.animationBegin,i=n.animationDuration,s=n.animationEasing,l=n.animationId,c=this.state,u=c.prevSectors,d=c.prevIsAnimationActive;return e.createElement(_W,{begin:a,duration:i,isActive:o,easing:s,from:{t:0},to:{t:1},key:"pie-".concat(l,"-").concat(d),onAnimationStart:this.handleAnimationStart,onAnimationEnd:this.handleAnimationEnd},function(n){var o=n.t,a=[],i=(r&&r[0]).startAngle;return r.forEach(function(e,t){var n=u&&u[t],r=t>0?oO(e,"paddingAngle",0):0;if(n){var s=IO(n.endAngle-n.startAngle,e.endAngle-e.startAngle),l=LK(LK({},e),{},{startAngle:i+r,endAngle:i+s(o)+r});a.push(l),i=l.endAngle}else{var c=e.endAngle,d=e.startAngle,p=IO(0,c-d)(o),f=LK(LK({},e),{},{startAngle:i+r,endAngle:i+p+r});a.push(f),i=f.endAngle}}),e.createElement(dC,null,t.renderSectorsStatically(a))})}},{key:"attachKeyboardHandlers",value:function(e){var t=this;e.onkeydown=function(e){if(!e.altKey)switch(e.key){case"ArrowLeft":var n=++t.state.sectorToFocus%t.sectorRefs.length;t.sectorRefs[n].focus(),t.setState({sectorToFocus:n});break;case"ArrowRight":var r=--t.state.sectorToFocus<0?t.sectorRefs.length-1:t.state.sectorToFocus%t.sectorRefs.length;t.sectorRefs[r].focus(),t.setState({sectorToFocus:r});break;case"Escape":t.sectorRefs[t.state.sectorToFocus].blur(),t.setState({sectorToFocus:0})}}}},{key:"renderSectors",value:function(){var e=this.props,t=e.sectors,n=e.isAnimationActive,r=this.state.prevSectors;return!(n&&t&&t.length)||r&&O$(r,t)?this.renderSectorsStatically(t):this.renderSectorsWithAnimation()}},{key:"componentDidMount",value:function(){this.pieRef&&this.attachKeyboardHandlers(this.pieRef)}},{key:"render",value:function(){var t=this,n=this.props,r=n.hide,o=n.sectors,a=n.className,i=n.label,s=n.cx,l=n.cy,c=n.innerRadius,u=n.outerRadius,d=n.isAnimationActive,p=this.state.isAnimationFinished;if(r||!o||!o.length||!EO(s)||!EO(l)||!EO(c)||!EO(u))return null;var f=Rk("recharts-pie",a);return e.createElement(dC,{tabIndex:this.props.rootTabIndex,className:f,ref:function(e){t.pieRef=e}},this.renderSectors(),i&&this.renderLabels(o),Qq.renderCallByParent(this.props,null,!1),(!d||p)&&pH.renderCallByParent(this.props,o,!1))}}],a=[{key:"getDerivedStateFromProps",value:function(e,t){return t.prevIsAnimationActive!==e.isAnimationActive?{prevIsAnimationActive:e.isAnimationActive,prevAnimationId:e.animationId,curSectors:e.sectors,prevSectors:[],isAnimationFinished:!0}:e.isAnimationActive&&e.animationId!==t.prevAnimationId?{prevAnimationId:e.animationId,curSectors:e.sectors,prevSectors:t.curSectors,isAnimationFinished:!0}:e.sectors!==t.curSectors?{curSectors:e.sectors,isAnimationFinished:!0}:null}},{key:"getTextAnchor",value:function(e,t){return e>t?"start":e<t?"end":"middle"}},{key:"renderLabelLineItem",value:function(t,n,r){if(e.isValidElement(t))return e.cloneElement(t,n);if(lA(t))return t(n);var o=Rk("recharts-pie-label-line","boolean"!=typeof t?t.className:"");return e.createElement(PH,_K({},n,{key:r,type:"linear",className:o}))}},{key:"renderLabelItem",value:function(t,n,r){if(e.isValidElement(t))return e.cloneElement(t,n);var o=r;if(lA(t)&&(o=t(n),e.isValidElement(o)))return o;var a=Rk("recharts-pie-label-text","boolean"==typeof t||lA(t)?"":t.className);return e.createElement(Ej,_K({},n,{alignmentBaseline:"middle",className:a}),o)}}],o&&DK(r.prototype,o),a&&DK(r,a),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,o,a}(e.PureComponent);dK=$K,UK($K,"displayName","Pie"),UK($K,"defaultProps",{stroke:"#fff",fill:"#808080",legendType:"rect",cx:"50%",cy:"50%",startAngle:0,endAngle:360,innerRadius:0,outerRadius:"80%",paddingAngle:0,labelLine:!0,hide:!1,minAngle:0,isAnimationActive:!ZD,animationBegin:400,animationDuration:1500,animationEasing:"ease",nameKey:"name",blendStroke:!1,rootTabIndex:0}),UK($K,"parseDeltaAngle",function(e,t){return SO(t-e)*Math.min(Math.abs(t-e),360)}),UK($K,"getRealPieData",function(e){var t=e.data,n=e.children,r=eC(e,!1),o=KO(n,UM);return t&&t.length?t.map(function(e,t){return LK(LK(LK({payload:e},r),e),o&&o[t]&&o[t].props)}):o&&o.length?o.map(function(e){return LK(LK({},r),e.props)}):[]}),UK($K,"parseCoordinateOfPie",function(e,t){var n=t.top,r=t.left,o=t.width,a=t.height,i=jq(o,a);return{cx:r+OO(e.cx,o,o/2),cy:n+OO(e.cy,a,a/2),innerRadius:OO(e.innerRadius,i,0),outerRadius:OO(e.outerRadius,i,.8*i),maxRadius:e.maxRadius||Math.sqrt(o*o+a*a)/2}}),UK($K,"getComposedData",function(e){var t=e.item,n=e.offset,r=void 0!==t.type.defaultProps?LK(LK({},t.type.defaultProps),t.props):t.props,o=dK.getRealPieData(r);if(!o||!o.length)return null;var a=r.cornerRadius,i=r.startAngle,s=r.endAngle,l=r.paddingAngle,c=r.dataKey,u=r.nameKey,d=r.valueKey,p=r.tooltipType,f=Math.abs(r.minAngle),g=dK.parseCoordinateOfPie(r,n),m=dK.parseDeltaAngle(i,s),h=Math.abs(m),b=c;aO(c)&&aO(d)?(fC(!1,'Use "dataKey" to specify the value of pie,\n the props "valueKey" will be deprecated in 1.1.0'),b="value"):aO(c)&&(fC(!1,'Use "dataKey" to specify the value of pie,\n the props "valueKey" will be deprecated in 1.1.0'),b=d);var y,v,w=o.filter(function(e){return 0!==rq(e,b,0)}).length,S=h-w*f-(h>=360?w:w-1)*l,x=o.reduce(function(e,t){var n=rq(t,b,0);return e+(EO(n)?n:0)},0);x>0&&(y=o.map(function(e,t){var n,r=rq(e,b,0),o=rq(e,u,t),s=(EO(r)?r:0)/x,c=(n=t?v.endAngle+SO(m)*l*(0!==r?1:0):i)+SO(m)*((0!==r?f:0)+s*S),d=(n+c)/2,h=(g.innerRadius+g.outerRadius)/2,y=[{name:o,value:r,payload:e,dataKey:b,type:p}],w=Mq(g.cx,g.cy,h,d);return v=LK(LK(LK({percent:s,cornerRadius:a,name:o,tooltipPayload:y,midAngle:d,middleRadius:h,tooltipPosition:w},e),g),{},{value:rq(e,b),startAngle:n,endAngle:c,payload:e,paddingAngle:SO(m)*l})}));return LK(LK({},g),{},{sectors:y,data:o})});var GK=Math.ceil,qK=Math.max;var HK=function(e,t,n,r){for(var o=-1,a=qK(GK((t-e)/(n||1)),0),i=Array(a);a--;)i[r?a:++o]=e,e+=n;return i},VK=EM,WK=1/0;var YK=function(e){return e?(e=VK(e))===WK||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0},KK=HK,XK=wD,ZK=YK;var QK=function(e){return function(t,n,r){return r&&"number"!=typeof r&&XK(t,n,r)&&(n=r=void 0),t=ZK(t),void 0===n?(n=t,t=0):n=ZK(n),r=void 0===r?t<n?1:-1:ZK(r),KK(t,n,r,e)}}();function JK(e){return JK="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},JK(e)}function eX(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function tX(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?eX(Object(n),!0).forEach(function(t){nX(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):eX(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function nX(e,t,n){var r;return r=function(e,t){if("object"!=JK(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=JK(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(t,"string"),(t="symbol"==JK(r)?r:r+"")in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var rX=["Webkit","Moz","O","ms"];function oX(e){return oX="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},oX(e)}function aX(){return aX=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},aX.apply(this,arguments)}function iX(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function sX(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?iX(Object(n),!0).forEach(function(t){fX(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):iX(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function lX(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,gX(r.key),r)}}function cX(e,t,n){return t=dX(t),function(e,t){if(t&&("object"===oX(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,uX()?Reflect.construct(t,n||[],dX(e).constructor):t.apply(e,n))}function uX(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(uX=function(){return!!e})()}function dX(e){return dX=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},dX(e)}function pX(e,t){return pX=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},pX(e,t)}function fX(e,t,n){return(t=gX(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function gX(e){var t=function(e,t){if("object"!=oX(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=oX(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==oX(t)?t:t+""}var mX=function(e){return e.changedTouches&&!!e.changedTouches.length},hX=function(t){function n(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),fX(t=cX(this,n,[e]),"handleDrag",function(e){t.leaveTimer&&(clearTimeout(t.leaveTimer),t.leaveTimer=null),t.state.isTravellerMoving?t.handleTravellerMove(e):t.state.isSlideMoving&&t.handleSlideDrag(e)}),fX(t,"handleTouchMove",function(e){null!=e.changedTouches&&e.changedTouches.length>0&&t.handleDrag(e.changedTouches[0])}),fX(t,"handleDragEnd",function(){t.setState({isTravellerMoving:!1,isSlideMoving:!1},function(){var e=t.props,n=e.endIndex,r=e.onDragEnd,o=e.startIndex;null==r||r({endIndex:n,startIndex:o})}),t.detachDragEndListener()}),fX(t,"handleLeaveWrapper",function(){(t.state.isTravellerMoving||t.state.isSlideMoving)&&(t.leaveTimer=window.setTimeout(t.handleDragEnd,t.props.leaveTimeOut))}),fX(t,"handleEnterSlideOrTraveller",function(){t.setState({isTextActive:!0})}),fX(t,"handleLeaveSlideOrTraveller",function(){t.setState({isTextActive:!1})}),fX(t,"handleSlideDragStart",function(e){var n=mX(e)?e.changedTouches[0]:e;t.setState({isTravellerMoving:!1,isSlideMoving:!0,slideMoveStartX:n.pageX}),t.attachDragEndListener()}),t.travellerDragStartHandlers={startX:t.handleTravellerDragStart.bind(t,"startX"),endX:t.handleTravellerDragStart.bind(t,"endX")},t.state={},t}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&pX(e,t)}(n,t),r=n,o=[{key:"componentWillUnmount",value:function(){this.leaveTimer&&(clearTimeout(this.leaveTimer),this.leaveTimer=null),this.detachDragEndListener()}},{key:"getIndex",value:function(e){var t=e.startX,r=e.endX,o=this.state.scaleValues,a=this.props,i=a.gap,s=a.data.length-1,l=Math.min(t,r),c=Math.max(t,r),u=n.getIndexInRange(o,l),d=n.getIndexInRange(o,c);return{startIndex:u-u%i,endIndex:d===s?s:d-d%i}}},{key:"getTextOfTick",value:function(e){var t=this.props,n=t.data,r=t.tickFormatter,o=t.dataKey,a=rq(n[e],o,e);return lA(r)?r(a,e):a}},{key:"attachDragEndListener",value:function(){window.addEventListener("mouseup",this.handleDragEnd,!0),window.addEventListener("touchend",this.handleDragEnd,!0),window.addEventListener("mousemove",this.handleDrag,!0)}},{key:"detachDragEndListener",value:function(){window.removeEventListener("mouseup",this.handleDragEnd,!0),window.removeEventListener("touchend",this.handleDragEnd,!0),window.removeEventListener("mousemove",this.handleDrag,!0)}},{key:"handleSlideDrag",value:function(e){var t=this.state,n=t.slideMoveStartX,r=t.startX,o=t.endX,a=this.props,i=a.x,s=a.width,l=a.travellerWidth,c=a.startIndex,u=a.endIndex,d=a.onChange,p=e.pageX-n;p>0?p=Math.min(p,i+s-l-o,i+s-l-r):p<0&&(p=Math.max(p,i-r,i-o));var f=this.getIndex({startX:r+p,endX:o+p});f.startIndex===c&&f.endIndex===u||!d||d(f),this.setState({startX:r+p,endX:o+p,slideMoveStartX:e.pageX})}},{key:"handleTravellerDragStart",value:function(e,t){var n=mX(t)?t.changedTouches[0]:t;this.setState({isSlideMoving:!1,isTravellerMoving:!0,movingTravellerId:e,brushMoveStartX:n.pageX}),this.attachDragEndListener()}},{key:"handleTravellerMove",value:function(e){var t=this.state,n=t.brushMoveStartX,r=t.movingTravellerId,o=t.endX,a=t.startX,i=this.state[r],s=this.props,l=s.x,c=s.width,u=s.travellerWidth,d=s.onChange,p=s.gap,f=s.data,g={startX:this.state.startX,endX:this.state.endX},m=e.pageX-n;m>0?m=Math.min(m,l+c-u-i):m<0&&(m=Math.max(m,l-i)),g[r]=i+m;var h=this.getIndex(g),b=h.startIndex,y=h.endIndex;this.setState(fX(fX({},r,i+m),"brushMoveStartX",e.pageX),function(){var e;d&&(e=f.length-1,("startX"===r&&(o>a?b%p===0:y%p===0)||o<a&&y===e||"endX"===r&&(o>a?y%p===0:b%p===0)||o>a&&y===e)&&d(h))})}},{key:"handleTravellerMoveKeyboard",value:function(e,t){var n=this,r=this.state,o=r.scaleValues,a=r.startX,i=r.endX,s=this.state[t],l=o.indexOf(s);if(-1!==l){var c=l+e;if(!(-1===c||c>=o.length)){var u=o[c];"startX"===t&&u>=i||"endX"===t&&u<=a||this.setState(fX({},t,u),function(){n.props.onChange(n.getIndex({startX:n.state.startX,endX:n.state.endX}))})}}}},{key:"renderBackground",value:function(){var t=this.props,n=t.x,r=t.y,o=t.width,a=t.height,i=t.fill,s=t.stroke;return e.createElement("rect",{stroke:s,fill:i,x:n,y:r,width:o,height:a})}},{key:"renderPanorama",value:function(){var t=this.props,n=t.x,r=t.y,o=t.width,a=t.height,i=t.data,s=t.children,l=t.padding,c=e.Children.only(s);return c?e.cloneElement(c,{x:n,y:r,width:o,height:a,margin:l,compact:!0,data:i}):null}},{key:"renderTravellerLayer",value:function(t,r){var o,a,i=this,s=this.props,l=s.y,c=s.travellerWidth,u=s.height,d=s.traveller,p=s.ariaLabel,f=s.data,g=s.startIndex,m=s.endIndex,h=Math.max(t,this.props.x),b=sX(sX({},eC(this.props,!1)),{},{x:h,y:l,width:c,height:u}),y=p||"Min value: ".concat(null===(o=f[g])||void 0===o?void 0:o.name,", Max value: ").concat(null===(a=f[m])||void 0===a?void 0:a.name);return e.createElement(dC,{tabIndex:0,role:"slider","aria-label":y,"aria-valuenow":t,className:"recharts-brush-traveller",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.travellerDragStartHandlers[r],onTouchStart:this.travellerDragStartHandlers[r],onKeyDown:function(e){["ArrowLeft","ArrowRight"].includes(e.key)&&(e.preventDefault(),e.stopPropagation(),i.handleTravellerMoveKeyboard("ArrowRight"===e.key?1:-1,r))},onFocus:function(){i.setState({isTravellerFocused:!0})},onBlur:function(){i.setState({isTravellerFocused:!1})},style:{cursor:"col-resize"}},n.renderTraveller(d,b))}},{key:"renderSlide",value:function(t,n){var r=this.props,o=r.y,a=r.height,i=r.stroke,s=r.travellerWidth,l=Math.min(t,n)+s,c=Math.max(Math.abs(n-t)-s,0);return e.createElement("rect",{className:"recharts-brush-slide",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.handleSlideDragStart,onTouchStart:this.handleSlideDragStart,style:{cursor:"move"},stroke:"none",fill:i,fillOpacity:.2,x:l,y:o,width:c,height:a})}},{key:"renderText",value:function(){var t=this.props,n=t.startIndex,r=t.endIndex,o=t.y,a=t.height,i=t.travellerWidth,s=t.stroke,l=this.state,c=l.startX,u=l.endX,d={pointerEvents:"none",fill:s};return e.createElement(dC,{className:"recharts-brush-texts"},e.createElement(Ej,aX({textAnchor:"end",verticalAnchor:"middle",x:Math.min(c,u)-5,y:o+a/2},d),this.getTextOfTick(n)),e.createElement(Ej,aX({textAnchor:"start",verticalAnchor:"middle",x:Math.max(c,u)+i+5,y:o+a/2},d),this.getTextOfTick(r)))}},{key:"render",value:function(){var t=this.props,n=t.data,r=t.className,o=t.children,a=t.x,i=t.y,s=t.width,l=t.height,c=t.alwaysShowText,u=this.state,d=u.startX,p=u.endX,f=u.isTextActive,g=u.isSlideMoving,m=u.isTravellerMoving,h=u.isTravellerFocused;if(!n||!n.length||!EO(a)||!EO(i)||!EO(s)||!EO(l)||s<=0||l<=0)return null;var b=Rk("recharts-brush",r),y=1===e.Children.count(o),v=function(e,t){var n=e.replace(/(\w)/,function(e){return e.toUpperCase()}),r=rX.reduce(function(e,r){return tX(tX({},e),{},nX({},r+n,t))},{});return r[e]=t,r}("userSelect","none");return e.createElement(dC,{className:b,onMouseLeave:this.handleLeaveWrapper,onTouchMove:this.handleTouchMove,style:v},this.renderBackground(),y&&this.renderPanorama(),this.renderSlide(d,p),this.renderTravellerLayer(d,"startX"),this.renderTravellerLayer(p,"endX"),(f||g||m||h||c)&&this.renderText())}}],a=[{key:"renderDefaultTraveller",value:function(t){var n=t.x,r=t.y,o=t.width,a=t.height,i=t.stroke,s=Math.floor(r+a/2)-1;return e.createElement(e.Fragment,null,e.createElement("rect",{x:n,y:r,width:o,height:a,fill:i,stroke:"none"}),e.createElement("line",{x1:n+1,y1:s,x2:n+o-1,y2:s,fill:"none",stroke:"#fff"}),e.createElement("line",{x1:n+1,y1:s+2,x2:n+o-1,y2:s+2,fill:"none",stroke:"#fff"}))}},{key:"renderTraveller",value:function(t,r){return e.isValidElement(t)?e.cloneElement(t,r):lA(t)?t(r):n.renderDefaultTraveller(r)}},{key:"getDerivedStateFromProps",value:function(e,t){var n=e.data,r=e.width,o=e.x,a=e.travellerWidth,i=e.updateId,s=e.startIndex,l=e.endIndex;if(n!==t.prevData||i!==t.prevUpdateId)return sX({prevData:n,prevTravellerWidth:a,prevUpdateId:i,prevX:o,prevWidth:r},n&&n.length?function(e){var t=e.data,n=e.startIndex,r=e.endIndex,o=e.x,a=e.width,i=e.travellerWidth;if(!t||!t.length)return{};var s=t.length,l=Qj().domain(QK(0,s)).range([o,o+a-i]),c=l.domain().map(function(e){return l(e)});return{isTextActive:!1,isSlideMoving:!1,isTravellerMoving:!1,isTravellerFocused:!1,startX:l(n),endX:l(r),scale:l,scaleValues:c}}({data:n,width:r,x:o,travellerWidth:a,startIndex:s,endIndex:l}):{scale:null,scaleValues:null});if(t.scale&&(r!==t.prevWidth||o!==t.prevX||a!==t.prevTravellerWidth)){t.scale.range([o,o+r-a]);var c=t.scale.domain().map(function(e){return t.scale(e)});return{prevData:n,prevTravellerWidth:a,prevUpdateId:i,prevX:o,prevWidth:r,startX:t.scale(e.startIndex),endX:t.scale(e.endIndex),scaleValues:c}}return null}},{key:"getIndexInRange",value:function(e,t){for(var n=0,r=e.length-1;r-n>1;){var o=Math.floor((n+r)/2);e[o]>t?r=o:n=o}return t>=e[r]?r:n}}],o&&lX(r.prototype,o),a&&lX(r,a),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,o,a}(e.PureComponent);fX(hX,"displayName","Brush"),fX(hX,"defaultProps",{height:40,travellerWidth:5,gap:1,fill:"#fff",stroke:"#666",padding:{top:1,right:1,bottom:1,left:1},leaveTimeOut:1e3,alwaysShowText:!1});var bX=ML;var yX=function(e,t){var n;return bX(e,function(e,r,o){return!(n=t(e,r,o))}),!!n},vX=LN,wX=UP,SX=yX,xX=_k,EX=wD;var kX=function(e,t,n){var r=xX(e)?vX:SX;return n&&EX(e,t,n)&&(t=void 0),r(e,wX(t))},AX=function(e,t){var n=e.alwaysShow,r=e.ifOverflow;return n&&(r="extendDomain"),r===t},TX=aD;var OX=function(e,t,n){"__proto__"==t&&TX?TX(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n},CX=OX,IX=PL,NX=UP;var RX=function(e,t){var n={};return t=NX(t),IX(e,function(e,r,o){CX(n,r,t(e,r,o))}),n};var _X=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(!t(e[n],n,e))return!1;return!0},PX=ML;var LX=function(e,t){var n=!0;return PX(e,function(e,r,o){return n=!!t(e,r,o)}),n},DX=_X,MX=LX,jX=UP,FX=_k,BX=wD;var UX=function(e,t,n){var r=FX(e)?DX:MX;return n&&BX(e,t,n)&&(t=void 0),r(e,jX(t))},zX=["x","y"];function $X(e){return $X="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},$X(e)}function GX(){return GX=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},GX.apply(this,arguments)}function qX(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function HX(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?qX(Object(n),!0).forEach(function(t){VX(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):qX(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function VX(e,t,n){var r;return r=function(e,t){if("object"!=$X(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=$X(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(t,"string"),(t="symbol"==$X(r)?r:r+"")in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function WX(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function YX(e,t){var n=e.x,r=e.y,o=WX(e,zX),a="".concat(n),i=parseInt(a,10),s="".concat(r),l=parseInt(s,10),c="".concat(t.height||o.height),u=parseInt(c,10),d="".concat(t.width||o.width),p=parseInt(d,10);return HX(HX(HX(HX(HX({},t),o),i?{x:i}:{}),l?{y:l}:{}),{},{height:u,width:p,name:t.name,radius:t.radius})}function KX(t){return e.createElement(EK,GX({shapeType:"rectangle",propTransformer:YX,activeClassName:"recharts-active-bar"},t))}var XX,ZX=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return function(n,r){if("number"==typeof e)return e;var o=EO(n)||function(e){return aO(e)}(n);return o?e(n,r):(o||("production"!==process.env.NODE_ENV?RG(0,"minPointSize callback function received a value with type of ".concat($X(n),". Currently only numbers or null/undefined are supported.")):RG()),t)}},QX=["value","background"];function JX(e){return JX="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},JX(e)}function eZ(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function tZ(){return tZ=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},tZ.apply(this,arguments)}function nZ(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function rZ(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?nZ(Object(n),!0).forEach(function(t){cZ(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):nZ(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function oZ(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,uZ(r.key),r)}}function aZ(e,t,n){return t=sZ(t),function(e,t){if(t&&("object"===JX(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,iZ()?Reflect.construct(t,n||[],sZ(e).constructor):t.apply(e,n))}function iZ(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(iZ=function(){return!!e})()}function sZ(e){return sZ=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},sZ(e)}function lZ(e,t){return lZ=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},lZ(e,t)}function cZ(e,t,n){return(t=uZ(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function uZ(e){var t=function(e,t){if("object"!=JX(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=JX(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==JX(t)?t:t+""}var dZ=function(t){function n(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n);for(var t=arguments.length,r=new Array(t),o=0;o<t;o++)r[o]=arguments[o];return cZ(e=aZ(this,n,[].concat(r)),"state",{isAnimationFinished:!1}),cZ(e,"id",TO("recharts-bar-")),cZ(e,"handleAnimationEnd",function(){var t=e.props.onAnimationEnd;e.setState({isAnimationFinished:!0}),t&&t()}),cZ(e,"handleAnimationStart",function(){var t=e.props.onAnimationStart;e.setState({isAnimationFinished:!1}),t&&t()}),e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&lZ(e,t)}(n,t),r=n,o=[{key:"renderRectanglesStatically",value:function(t){var n=this,r=this.props,o=r.shape,a=r.dataKey,i=r.activeIndex,s=r.activeBar,l=eC(this.props,!1);return t&&t.map(function(t,r){var c=r===i,u=c?s:o,d=rZ(rZ(rZ({},l),t),{},{isActive:c,option:u,index:r,dataKey:a,onAnimationStart:n.handleAnimationStart,onAnimationEnd:n.handleAnimationEnd});return e.createElement(dC,tZ({className:"recharts-bar-rectangle"},BO(n.props,t,r),{key:"rectangle-".concat(null==t?void 0:t.x,"-").concat(null==t?void 0:t.y,"-").concat(null==t?void 0:t.value,"-").concat(r)}),e.createElement(KX,d))})}},{key:"renderRectanglesWithAnimation",value:function(){var t=this,n=this.props,r=n.data,o=n.layout,a=n.isAnimationActive,i=n.animationBegin,s=n.animationDuration,l=n.animationEasing,c=n.animationId,u=this.state.prevData;return e.createElement(_W,{begin:i,duration:s,isActive:a,easing:l,from:{t:0},to:{t:1},key:"bar-".concat(c),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(n){var a=n.t,i=r.map(function(e,t){var n=u&&u[t];if(n){var r=IO(n.x,e.x),i=IO(n.y,e.y),s=IO(n.width,e.width),l=IO(n.height,e.height);return rZ(rZ({},e),{},{x:r(a),y:i(a),width:s(a),height:l(a)})}if("horizontal"===o){var c=IO(0,e.height)(a);return rZ(rZ({},e),{},{y:e.y+e.height-c,height:c})}var d=IO(0,e.width)(a);return rZ(rZ({},e),{},{width:d})});return e.createElement(dC,null,t.renderRectanglesStatically(i))})}},{key:"renderRectangles",value:function(){var e=this.props,t=e.data,n=e.isAnimationActive,r=this.state.prevData;return!(n&&t&&t.length)||r&&O$(r,t)?this.renderRectanglesStatically(t):this.renderRectanglesWithAnimation()}},{key:"renderBackground",value:function(){var t=this,n=this.props,r=n.data,o=n.dataKey,a=n.activeIndex,i=eC(this.props.background,!1);return r.map(function(n,r){n.value;var s=n.background,l=eZ(n,QX);if(!s)return null;var c=rZ(rZ(rZ(rZ(rZ({},l),{},{fill:"#eee"},s),i),BO(t.props,n,r)),{},{onAnimationStart:t.handleAnimationStart,onAnimationEnd:t.handleAnimationEnd,dataKey:o,index:r,className:"recharts-bar-background-rectangle"});return e.createElement(KX,tZ({key:"background-bar-".concat(r),option:t.props.background,isActive:r===a},c))})}},{key:"renderErrorBar",value:function(t,n){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var r=this.props,o=r.data,a=r.xAxis,i=r.yAxis,s=r.layout,l=KO(r.children,HG);if(!l)return null;var c="vertical"===s?o[0].height/2:o[0].width/2,u=function(e,t){var n=Array.isArray(e.value)?e.value[1]:e.value;return{x:e.x,y:e.y,value:n,errorVal:rq(e,t)}},d={clipPath:t?"url(#clipPath-".concat(n,")"):null};return e.createElement(dC,d,l.map(function(t){return e.cloneElement(t,{key:"error-bar-".concat(n,"-").concat(t.props.dataKey),data:o,xAxis:a,yAxis:i,layout:s,offset:c,dataPointFormatter:u})}))}},{key:"render",value:function(){var t=this.props,n=t.hide,r=t.data,o=t.className,a=t.xAxis,i=t.yAxis,s=t.left,l=t.top,c=t.width,u=t.height,d=t.isAnimationActive,p=t.background,f=t.id;if(n||!r||!r.length)return null;var g=this.state.isAnimationFinished,m=Rk("recharts-bar",o),h=a&&a.allowDataOverflow,b=i&&i.allowDataOverflow,y=h||b,v=aO(f)?this.id:f;return e.createElement(dC,{className:m},h||b?e.createElement("defs",null,e.createElement("clipPath",{id:"clipPath-".concat(v)},e.createElement("rect",{x:h?s:s-c/2,y:b?l:l-u/2,width:h?c:2*c,height:b?u:2*u}))):null,e.createElement(dC,{className:"recharts-bar-rectangles",clipPath:y?"url(#clipPath-".concat(v,")"):null},p?this.renderBackground():null,this.renderRectangles()),this.renderErrorBar(y,v),(!d||g)&&pH.renderCallByParent(this.props,r))}}],a=[{key:"getDerivedStateFromProps",value:function(e,t){return e.animationId!==t.prevAnimationId?{prevAnimationId:e.animationId,curData:e.data,prevData:t.curData}:e.data!==t.curData?{curData:e.data}:null}}],o&&oZ(r.prototype,o),a&&oZ(r,a),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,o,a}(e.PureComponent);function pZ(e){return pZ="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},pZ(e)}function fZ(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,bZ(r.key),r)}}function gZ(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function mZ(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?gZ(Object(n),!0).forEach(function(t){hZ(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):gZ(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function hZ(e,t,n){return(t=bZ(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function bZ(e){var t=function(e,t){if("object"!=pZ(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=pZ(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==pZ(t)?t:t+""}XX=dZ,cZ(dZ,"displayName","Bar"),cZ(dZ,"defaultProps",{xAxisId:0,yAxisId:0,legendType:"rect",minPointSize:0,hide:!1,data:[],layout:"vertical",activeBar:!1,isAnimationActive:!ZD,animationBegin:0,animationDuration:400,animationEasing:"ease"}),cZ(dZ,"getComposedData",function(e){var t=e.props,n=e.item,r=e.barPosition,o=e.bandSize,a=e.xAxis,i=e.yAxis,s=e.xAxisTicks,l=e.yAxisTicks,c=e.stackedData,u=e.dataStartIndex,d=e.displayedData,p=e.offset,f=function(e,t){if(!e)return null;for(var n=0,r=e.length;n<r;n++)if(e[n].item===t)return e[n].position;return null}(r,n);if(!f)return null;var g=t.layout,m=n.type.defaultProps,h=void 0!==m?rZ(rZ({},m),n.props):n.props,b=h.dataKey,y=h.children,v=h.minPointSize,w="horizontal"===g?i:a,S=c?w.scale.domain():null,x=function(e){var t=e.numericAxis,n=t.scale.domain();if("number"===t.type){var r=Math.min(n[0],n[1]),o=Math.max(n[0],n[1]);return r<=0&&o>=0?0:o<0?o:r}return n[0]}({numericAxis:w}),E=KO(y,UM),k=d.map(function(e,t){var r,d,p,m,h,y;c?r=function(e,t){if(!t||2!==t.length||!EO(t[0])||!EO(t[1]))return e;var n=Math.min(t[0],t[1]),r=Math.max(t[0],t[1]),o=[e[0],e[1]];return(!EO(e[0])||e[0]<n)&&(o[0]=n),(!EO(e[1])||e[1]>r)&&(o[1]=r),o[0]>r&&(o[0]=r),o[1]<n&&(o[1]=n),o}(c[u+t],S):(r=rq(e,b),Array.isArray(r)||(r=[x,r]));var w=ZX(v,XX.defaultProps.minPointSize)(r[1],t);if("horizontal"===g){var k,A=[i.scale(r[0]),i.scale(r[1])],T=A[0],O=A[1];d=wq({axis:a,ticks:s,bandSize:o,offset:f.offset,entry:e,index:t}),p=null!==(k=null!=O?O:T)&&void 0!==k?k:void 0,m=f.size;var C=T-O;if(h=Number.isNaN(C)?0:C,y={x:d,y:i.y,width:m,height:i.height},Math.abs(w)>0&&Math.abs(h)<Math.abs(w)){var I=SO(h||w)*(Math.abs(w)-Math.abs(h));p-=I,h+=I}}else{var N=[a.scale(r[0]),a.scale(r[1])],R=N[0],_=N[1];if(d=R,p=wq({axis:i,ticks:l,bandSize:o,offset:f.offset,entry:e,index:t}),m=_-R,h=f.size,y={x:a.x,y:p,width:a.width,height:h},Math.abs(w)>0&&Math.abs(m)<Math.abs(w))m+=SO(m||w)*(Math.abs(w)-Math.abs(m))}return rZ(rZ(rZ({},e),{},{x:d,y:p,width:m,height:h,value:c?r:r[1],payload:e,background:y},E&&E[t]&&E[t].props),{},{tooltipPayload:[Oq(n,e)],tooltipPosition:{x:d+m/2,y:p+h/2}})});return rZ({data:k,layout:g},p)});var yZ=function(e,t,n,r,o){var a=e.width,i=e.height,s=e.layout,l=e.children,c=Object.keys(t),u={left:n.left,leftMirror:n.left,right:a-n.right,rightMirror:a-n.right,top:n.top,topMirror:n.top,bottom:i-n.bottom,bottomMirror:i-n.bottom},d=!!XO(l,dZ);return c.reduce(function(a,i){var l,c,p,f,g,m=t[i],h=m.orientation,b=m.domain,y=m.padding,v=void 0===y?{}:y,w=m.mirror,S=m.reversed,x="".concat(h).concat(w?"Mirror":"");if("number"===m.type&&("gap"===m.padding||"no-gap"===m.padding)){var E=b[1]-b[0],k=1/0,A=m.categoricalDomain.sort(RO);if(A.forEach(function(e,t){t>0&&(k=Math.min((e||0)-(A[t-1]||0),k))}),Number.isFinite(k)){var T=k/E,O="vertical"===m.layout?n.height:n.width;if("gap"===m.padding&&(l=T*O/2),"no-gap"===m.padding){var C=OO(e.barCategoryGap,T*O),I=T*O/2;l=I-C-(I-C)/O*C}}}c="xAxis"===r?[n.left+(v.left||0)+(l||0),n.left+n.width-(v.right||0)-(l||0)]:"yAxis"===r?"horizontal"===s?[n.top+n.height-(v.bottom||0),n.top+(v.top||0)]:[n.top+(v.top||0)+(l||0),n.top+n.height-(v.bottom||0)-(l||0)]:m.range,S&&(c=[c[1],c[0]]);var N=fq(m,o,d),R=N.scale,_=N.realScaleType;R.domain(b).range(c),mq(R);var P=yq(R,mZ(mZ({},m),{},{realScaleType:_}));"xAxis"===r?(g="top"===h&&!w||"bottom"===h&&w,p=n.left,f=u[x]-g*m.height):"yAxis"===r&&(g="left"===h&&!w||"right"===h&&w,p=u[x]-g*m.width,f=n.top);var L=mZ(mZ(mZ({},m),P),{},{realScaleType:_,x:p,y:f,scale:R,width:"xAxis"===r?n.width:m.width,height:"yAxis"===r?n.height:m.height});return L.bandSize=Aq(L,P),m.hide||"xAxis"!==r?m.hide||(u[x]+=(g?-1:1)*L.width):u[x]+=(g?-1:1)*L.height,mZ(mZ({},a),{},hZ({},i,L))},{})},vZ=function(e,t){var n=e.x,r=e.y,o=t.x,a=t.y;return{x:Math.min(n,o),y:Math.min(r,a),width:Math.abs(o-n),height:Math.abs(a-r)}},wZ=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.scale=t}return t=e,n=[{key:"domain",get:function(){return this.scale.domain}},{key:"range",get:function(){return this.scale.range}},{key:"rangeMin",get:function(){return this.range()[0]}},{key:"rangeMax",get:function(){return this.range()[1]}},{key:"bandwidth",get:function(){return this.scale.bandwidth}},{key:"apply",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.bandAware,r=t.position;if(void 0!==e){if(r)switch(r){case"start":default:return this.scale(e);case"middle":var o=this.bandwidth?this.bandwidth()/2:0;return this.scale(e)+o;case"end":var a=this.bandwidth?this.bandwidth():0;return this.scale(e)+a}if(n){var i=this.bandwidth?this.bandwidth()/2:0;return this.scale(e)+i}return this.scale(e)}}},{key:"isInRange",value:function(e){var t=this.range(),n=t[0],r=t[t.length-1];return n<=r?e>=n&&e<=r:e>=r&&e<=n}}],r=[{key:"create",value:function(t){return new e(t)}}],n&&fZ(t.prototype,n),r&&fZ(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,n,r}();hZ(wZ,"EPS",1e-4);var SZ=function(e){var t=Object.keys(e).reduce(function(t,n){return mZ(mZ({},t),{},hZ({},n,wZ.create(e[n])))},{});return mZ(mZ({},t),{},{apply:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.bandAware,o=n.position;return RX(e,function(e,n){return t[n].apply(e,{bandAware:r,position:o})})},isInRange:function(e){return UX(e,function(e,n){return t[n].isInRange(e)})}})};var xZ=UP,EZ=JR,kZ=r_;var AZ=function(e){return function(t,n,r){var o=Object(t);if(!EZ(t)){var a=xZ(n);t=kZ(t),n=function(e){return a(o[e],e,o)}}var i=e(t,n,r);return i>-1?o[a?t[i]:i]:void 0}},TZ=YK;var OZ=zP,CZ=UP,IZ=function(e){var t=TZ(e),n=t%1;return t==t?n?t-n:t:0},NZ=Math.max;var RZ=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var o=null==n?0:IZ(n);return o<0&&(o=NZ(r+o,0)),OZ(e,CZ(t),o)},_Z=AZ(RZ),PZ=_T(function(e){return{x:e.left,y:e.top,width:e.width,height:e.height}},function(e){return["l",e.left,"t",e.top,"w",e.width,"h",e.height].join("")});function LZ(e){return LZ="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},LZ(e)}var DZ=e.createContext(void 0),MZ=e.createContext(void 0),jZ=e.createContext(void 0),FZ=e.createContext({}),BZ=e.createContext(void 0),UZ=e.createContext(0),zZ=e.createContext(0),$Z=function(t){var n=t.state,r=n.xAxisMap,o=n.yAxisMap,a=n.offset,i=t.clipPathId,s=t.children,l=t.width,c=t.height,u=PZ(a);return e.createElement(DZ.Provider,{value:r},e.createElement(MZ.Provider,{value:o},e.createElement(FZ.Provider,{value:a},e.createElement(jZ.Provider,{value:u},e.createElement(BZ.Provider,{value:i},e.createElement(UZ.Provider,{value:c},e.createElement(zZ.Provider,{value:l},s)))))))};function GZ(e){var t=Object.keys(e);return 0===t.length?"There are no available ids.":"Available ids are: ".concat(t,".")}var qZ=function(t){var n=e.useContext(DZ);null==n&&("production"!==process.env.NODE_ENV?RG(0,"Could not find Recharts context; are you sure this is rendered inside a Recharts wrapper component?"):RG());var r=n[t];return null==r&&("production"!==process.env.NODE_ENV?RG(0,'Could not find xAxis by id "'.concat(t,'" [').concat(LZ(t),"]. ").concat(GZ(n))):RG()),r},HZ=function(t){var n=e.useContext(MZ);null==n&&("production"!==process.env.NODE_ENV?RG(0,"Could not find Recharts context; are you sure this is rendered inside a Recharts wrapper component?"):RG());var r=n[t];return null==r&&("production"!==process.env.NODE_ENV?RG(0,'Could not find yAxis by id "'.concat(t,'" [').concat(LZ(t),"]. ").concat(GZ(n))):RG()),r},VZ=function(){return e.useContext(zZ)},WZ=function(){return e.useContext(UZ)};function YZ(e){return YZ="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},YZ(e)}function KZ(e,t,n){return t&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,rQ(r.key),r)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function XZ(e,t,n){return t=QZ(t),function(e,t){if(t&&("object"===YZ(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,ZZ()?Reflect.construct(t,n||[],QZ(e).constructor):t.apply(e,n))}function ZZ(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(ZZ=function(){return!!e})()}function QZ(e){return QZ=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},QZ(e)}function JZ(e,t){return JZ=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},JZ(e,t)}function eQ(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function tQ(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?eQ(Object(n),!0).forEach(function(t){nQ(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):eQ(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function nQ(e,t,n){return(t=rQ(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function rQ(e){var t=function(e,t){if("object"!=YZ(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=YZ(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==YZ(t)?t:t+""}function oQ(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a,i,s=[],l=!0,c=!1;try{if(a=(n=n.call(e)).next,0===t);else for(;!(l=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(c)throw o}}return s}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return aQ(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return aQ(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function aQ(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function iQ(){return iQ=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},iQ.apply(this,arguments)}function sQ(t){var n=t.x,r=t.y,o=t.segment,a=t.xAxisId,i=t.yAxisId,s=t.shape,l=t.className,c=t.alwaysShow,u=e.useContext(BZ),d=qZ(a),p=HZ(i),f=e.useContext(jZ);if(!u||!f)return null;fC(void 0===c,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var g=function(e,t,n,r,o,a,i,s,l){var c=o.x,u=o.y,d=o.width,p=o.height;if(n){var f=l.y,g=e.y.apply(f,{position:a});if(AX(l,"discard")&&!e.y.isInRange(g))return null;var m=[{x:c+d,y:g},{x:c,y:g}];return"left"===s?m.reverse():m}if(t){var h=l.x,b=e.x.apply(h,{position:a});if(AX(l,"discard")&&!e.x.isInRange(b))return null;var y=[{x:b,y:u+p},{x:b,y:u}];return"top"===i?y.reverse():y}if(r){var v=l.segment.map(function(t){return e.apply(t,{position:a})});return AX(l,"discard")&&kX(v,function(t){return!e.isInRange(t)})?null:v}return null}(SZ({x:d.scale,y:p.scale}),kO(n),kO(r),o&&2===o.length,f,t.position,d.orientation,p.orientation,t);if(!g)return null;var m=oQ(g,2),h=m[0],b=h.x,y=h.y,v=m[1],w=v.x,S=v.y,x=tQ(tQ({clipPath:AX(t,"hidden")?"url(#".concat(u,")"):void 0},eC(t,!0)),{},{x1:b,y1:y,x2:w,y2:S});return e.createElement(dC,{className:Rk("recharts-reference-line",l)},function(t,n){return e.isValidElement(t)?e.cloneElement(t,n):lA(t)?t(n):e.createElement("line",iQ({},n,{className:"recharts-reference-line-line"}))}(s,x),Qq.renderCallByParent(t,function(e){var t=e.x1,n=e.y1,r=e.x2,o=e.y2;return vZ({x:t,y:n},{x:r,y:o})}({x1:b,y1:y,x2:w,y2:S})))}var lQ=function(t){function n(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),XZ(this,n,arguments)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&JZ(e,t)}(n,t),KZ(n,[{key:"render",value:function(){return e.createElement(sQ,this.props)}}])}(e.Component);function cQ(){return cQ=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},cQ.apply(this,arguments)}function uQ(e){return uQ="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},uQ(e)}function dQ(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function pQ(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?dQ(Object(n),!0).forEach(function(t){yQ(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):dQ(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function fQ(e,t,n){return t&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,vQ(r.key),r)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function gQ(e,t,n){return t=hQ(t),function(e,t){if(t&&("object"===uQ(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,mQ()?Reflect.construct(t,n||[],hQ(e).constructor):t.apply(e,n))}function mQ(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(mQ=function(){return!!e})()}function hQ(e){return hQ=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},hQ(e)}function bQ(e,t){return bQ=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},bQ(e,t)}function yQ(e,t,n){return(t=vQ(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function vQ(e){var t=function(e,t){if("object"!=uQ(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=uQ(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==uQ(t)?t:t+""}nQ(lQ,"displayName","ReferenceLine"),nQ(lQ,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,fill:"none",stroke:"#ccc",fillOpacity:1,strokeWidth:1,position:"middle"});var wQ=function(t){function n(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),gQ(this,n,arguments)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&bQ(e,t)}(n,t),fQ(n,[{key:"render",value:function(){var t=this.props,r=t.x,o=t.y,a=t.r,i=t.alwaysShow,s=t.clipPathId,l=kO(r),c=kO(o);if(fC(void 0===i,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.'),!l||!c)return null;var u=function(e){var t=e.x,n=e.y,r=e.xAxis,o=e.yAxis,a=SZ({x:r.scale,y:o.scale}),i=a.apply({x:t,y:n},{bandAware:!0});return AX(e,"discard")&&!a.isInRange(i)?null:i}(this.props);if(!u)return null;var d=u.x,p=u.y,f=this.props,g=f.shape,m=f.className,h=pQ(pQ({clipPath:AX(this.props,"hidden")?"url(#".concat(s,")"):void 0},eC(this.props,!0)),{},{cx:d,cy:p});return e.createElement(dC,{className:Rk("recharts-reference-dot",m)},n.renderDot(g,h),Qq.renderCallByParent(this.props,{x:d-a,y:p-a,width:2*a,height:2*a}))}}])}(e.Component);function SQ(){return SQ=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},SQ.apply(this,arguments)}function xQ(e){return xQ="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},xQ(e)}function EQ(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function kQ(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?EQ(Object(n),!0).forEach(function(t){NQ(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):EQ(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function AQ(e,t,n){return t&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,RQ(r.key),r)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function TQ(e,t,n){return t=CQ(t),function(e,t){if(t&&("object"===xQ(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,OQ()?Reflect.construct(t,n||[],CQ(e).constructor):t.apply(e,n))}function OQ(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(OQ=function(){return!!e})()}function CQ(e){return CQ=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},CQ(e)}function IQ(e,t){return IQ=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},IQ(e,t)}function NQ(e,t,n){return(t=RQ(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function RQ(e){var t=function(e,t){if("object"!=xQ(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=xQ(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==xQ(t)?t:t+""}yQ(wQ,"displayName","ReferenceDot"),yQ(wQ,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#fff",stroke:"#ccc",fillOpacity:1,strokeWidth:1}),yQ(wQ,"renderDot",function(t,n){return e.isValidElement(t)?e.cloneElement(t,n):lA(t)?t(n):e.createElement(JW,cQ({},n,{cx:n.cx,cy:n.cy,className:"recharts-reference-dot-dot"}))});var _Q=function(t){function n(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),TQ(this,n,arguments)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&IQ(e,t)}(n,t),AQ(n,[{key:"render",value:function(){var t=this.props,r=t.x1,o=t.x2,a=t.y1,i=t.y2,s=t.className,l=t.alwaysShow,c=t.clipPathId;fC(void 0===l,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var u=kO(r),d=kO(o),p=kO(a),f=kO(i),g=this.props.shape;if(!(u||d||p||f||g))return null;var m=function(e,t,n,r,o){var a=o.x1,i=o.x2,s=o.y1,l=o.y2,c=o.xAxis,u=o.yAxis;if(!c||!u)return null;var d=SZ({x:c.scale,y:u.scale}),p={x:e?d.x.apply(a,{position:"start"}):d.x.rangeMin,y:n?d.y.apply(s,{position:"start"}):d.y.rangeMin},f={x:t?d.x.apply(i,{position:"end"}):d.x.rangeMax,y:r?d.y.apply(l,{position:"end"}):d.y.rangeMax};return!AX(o,"discard")||d.isInRange(p)&&d.isInRange(f)?vZ(p,f):null}(u,d,p,f,this.props);if(!m&&!g)return null;var h=AX(this.props,"hidden")?"url(#".concat(c,")"):void 0;return e.createElement(dC,{className:Rk("recharts-reference-area",s)},n.renderRect(g,kQ(kQ({clipPath:h},eC(this.props,!0)),m)),Qq.renderCallByParent(this.props,m))}}])}(e.Component);function PQ(e,t,n){if(t<1)return[];if(1===t&&void 0===n)return e;for(var r=[],o=0;o<e.length;o+=t)r.push(e[o]);return r}function LQ(e,t,n){return function(e){var t=e.width,n=e.height,r=function(e){return(e%180+180)%180}(arguments.length>1&&void 0!==arguments[1]?arguments[1]:0),o=r*Math.PI/180,a=Math.atan(n/t),i=o>a&&o<Math.PI-a?n/Math.sin(o):t/Math.cos(o);return Math.abs(i)}({width:e.width+t.width,height:e.height+t.height},n)}function DQ(e,t,n,r,o){if(e*t<e*r||e*t>e*o)return!1;var a=n();return e*(t-e*a/2-r)>=0&&e*(t+e*a/2-o)<=0}function MQ(e){return MQ="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},MQ(e)}function jQ(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function FQ(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?jQ(Object(n),!0).forEach(function(t){BQ(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):jQ(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function BQ(e,t,n){var r;return r=function(e,t){if("object"!=MQ(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=MQ(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(t,"string"),(t="symbol"==MQ(r)?r:r+"")in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function UQ(e,t,n){var r=e.tick,o=e.ticks,a=e.viewBox,i=e.minTickGap,s=e.orientation,l=e.interval,c=e.tickFormatter,u=e.unit,d=e.angle;if(!o||!o.length||!r)return[];if(EO(l)||ZD)return function(e,t){return PQ(e,t+1)}(o,"number"==typeof l&&EO(l)?l:0);var p=[],f="top"===s||"bottom"===s?"width":"height",g=u&&"width"===f?YM(u,{fontSize:t,letterSpacing:n}):{width:0,height:0},m=function(e,r){var o=lA(c)?c(e.value,r):e.value;return"width"===f?LQ(YM(o,{fontSize:t,letterSpacing:n}),g,d):YM(o,{fontSize:t,letterSpacing:n})[f]},h=o.length>=2?SO(o[1].coordinate-o[0].coordinate):1,b=function(e,t,n){var r="width"===n,o=e.x,a=e.y,i=e.width,s=e.height;return 1===t?{start:r?o:a,end:r?o+i:a+s}:{start:r?o+i:a+s,end:r?o:a}}(a,h,f);return"equidistantPreserveStart"===l?function(e,t,n,r,o){for(var a,i=(r||[]).slice(),s=t.start,l=t.end,c=0,u=1,d=s,p=function(){var t=null==r?void 0:r[c];if(void 0===t)return{v:PQ(r,u)};var a,i=c,p=function(){return void 0===a&&(a=n(t,i)),a},f=t.coordinate,g=0===c||DQ(e,f,p,d,l);g||(c=0,d=s,u+=1),g&&(d=f+e*(p()/2+o),c+=u)};u<=i.length;)if(a=p())return a.v;return[]}(h,b,m,o,i):(p="preserveStart"===l||"preserveStartEnd"===l?function(e,t,n,r,o,a){var i=(r||[]).slice(),s=i.length,l=t.start,c=t.end;if(a){var u=r[s-1],d=n(u,s-1),p=e*(u.coordinate+e*d/2-c);i[s-1]=u=FQ(FQ({},u),{},{tickCoord:p>0?u.coordinate-p*e:u.coordinate}),DQ(e,u.tickCoord,function(){return d},l,c)&&(c=u.tickCoord-e*(d/2+o),i[s-1]=FQ(FQ({},u),{},{isShow:!0}))}for(var f=a?s-1:s,g=function(t){var r,a=i[t],s=function(){return void 0===r&&(r=n(a,t)),r};if(0===t){var u=e*(a.coordinate-e*s()/2-l);i[t]=a=FQ(FQ({},a),{},{tickCoord:u<0?a.coordinate-u*e:a.coordinate})}else i[t]=a=FQ(FQ({},a),{},{tickCoord:a.coordinate});DQ(e,a.tickCoord,s,l,c)&&(l=a.tickCoord+e*(s()/2+o),i[t]=FQ(FQ({},a),{},{isShow:!0}))},m=0;m<f;m++)g(m);return i}(h,b,m,o,i,"preserveStartEnd"===l):function(e,t,n,r,o){for(var a=(r||[]).slice(),i=a.length,s=t.start,l=t.end,c=function(t){var r,c=a[t],u=function(){return void 0===r&&(r=n(c,t)),r};if(t===i-1){var d=e*(c.coordinate+e*u()/2-l);a[t]=c=FQ(FQ({},c),{},{tickCoord:d>0?c.coordinate-d*e:c.coordinate})}else a[t]=c=FQ(FQ({},c),{},{tickCoord:c.coordinate});DQ(e,c.tickCoord,u,s,l)&&(l=c.tickCoord-e*(u()/2+o),a[t]=FQ(FQ({},c),{},{isShow:!0}))},u=i-1;u>=0;u--)c(u);return a}(h,b,m,o,i),p.filter(function(e){return e.isShow}))}NQ(_Q,"displayName","ReferenceArea"),NQ(_Q,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#ccc",fillOpacity:.5,stroke:"none",strokeWidth:1}),NQ(_Q,"renderRect",function(t,n){return e.isValidElement(t)?e.cloneElement(t,n):lA(t)?t(n):e.createElement(GW,SQ({},n,{className:"recharts-reference-area-rect"}))});var zQ=["viewBox"],$Q=["viewBox"],GQ=["ticks"];function qQ(e){return qQ="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},qQ(e)}function HQ(){return HQ=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},HQ.apply(this,arguments)}function VQ(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function WQ(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?VQ(Object(n),!0).forEach(function(t){eJ(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):VQ(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function YQ(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function KQ(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,tJ(r.key),r)}}function XQ(e,t,n){return t=QQ(t),function(e,t){if(t&&("object"===qQ(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,ZQ()?Reflect.construct(t,n||[],QQ(e).constructor):t.apply(e,n))}function ZQ(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(ZQ=function(){return!!e})()}function QQ(e){return QQ=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},QQ(e)}function JQ(e,t){return JQ=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},JQ(e,t)}function eJ(e,t,n){return(t=tJ(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function tJ(e){var t=function(e,t){if("object"!=qQ(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=qQ(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==qQ(t)?t:t+""}var nJ=function(t){function n(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),(t=XQ(this,n,[e])).state={fontSize:"",letterSpacing:""},t}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&JQ(e,t)}(n,t),r=n,o=[{key:"shouldComponentUpdate",value:function(e,t){var n=e.viewBox,r=YQ(e,zQ),o=this.props,a=o.viewBox,i=YQ(o,$Q);return!_O(n,a)||!_O(r,i)||!_O(t,this.state)}},{key:"componentDidMount",value:function(){var e=this.layerReference;if(e){var t=e.getElementsByClassName("recharts-cartesian-axis-tick-value")[0];t&&this.setState({fontSize:window.getComputedStyle(t).fontSize,letterSpacing:window.getComputedStyle(t).letterSpacing})}}},{key:"getTickLineCoord",value:function(e){var t,n,r,o,a,i,s=this.props,l=s.x,c=s.y,u=s.width,d=s.height,p=s.orientation,f=s.tickSize,g=s.mirror,m=s.tickMargin,h=g?-1:1,b=e.tickSize||f,y=EO(e.tickCoord)?e.tickCoord:e.coordinate;switch(p){case"top":t=n=e.coordinate,i=(r=(o=c+ +!g*d)-h*b)-h*m,a=y;break;case"left":r=o=e.coordinate,a=(t=(n=l+ +!g*u)-h*b)-h*m,i=y;break;case"right":r=o=e.coordinate,a=(t=(n=l+ +g*u)+h*b)+h*m,i=y;break;default:t=n=e.coordinate,i=(r=(o=c+ +g*d)+h*b)+h*m,a=y}return{line:{x1:t,y1:r,x2:n,y2:o},tick:{x:a,y:i}}}},{key:"getTickTextAnchor",value:function(){var e,t=this.props,n=t.orientation,r=t.mirror;switch(n){case"left":e=r?"start":"end";break;case"right":e=r?"end":"start";break;default:e="middle"}return e}},{key:"getTickVerticalAnchor",value:function(){var e=this.props,t=e.orientation,n=e.mirror,r="end";switch(t){case"left":case"right":r="middle";break;case"top":r=n?"start":"end";break;default:r=n?"end":"start"}return r}},{key:"renderAxisLine",value:function(){var t=this.props,n=t.x,r=t.y,o=t.width,a=t.height,i=t.orientation,s=t.mirror,l=t.axisLine,c=WQ(WQ(WQ({},eC(this.props,!1)),eC(l,!1)),{},{fill:"none"});if("top"===i||"bottom"===i){var u=+("top"===i&&!s||"bottom"===i&&s);c=WQ(WQ({},c),{},{x1:n,y1:r+u*a,x2:n+o,y2:r+u*a})}else{var d=+("left"===i&&!s||"right"===i&&s);c=WQ(WQ({},c),{},{x1:n+d*o,y1:r,x2:n+d*o,y2:r+a})}return e.createElement("line",HQ({},c,{className:Rk("recharts-cartesian-axis-line",oO(l,"className"))}))}},{key:"renderTicks",value:function(t,r,o){var a=this,i=this.props,s=i.tickLine,l=i.stroke,c=i.tick,u=i.tickFormatter,d=i.unit,p=UQ(WQ(WQ({},this.props),{},{ticks:t}),r,o),f=this.getTickTextAnchor(),g=this.getTickVerticalAnchor(),m=eC(this.props,!1),h=eC(c,!1),b=WQ(WQ({},m),{},{fill:"none"},eC(s,!1)),y=p.map(function(t,r){var o=a.getTickLineCoord(t),i=o.line,y=o.tick,v=WQ(WQ(WQ(WQ({textAnchor:f,verticalAnchor:g},m),{},{stroke:"none",fill:l},h),y),{},{index:r,payload:t,visibleTicksCount:p.length,tickFormatter:u});return e.createElement(dC,HQ({className:"recharts-cartesian-axis-tick",key:"tick-".concat(t.value,"-").concat(t.coordinate,"-").concat(t.tickCoord)},BO(a.props,t,r)),s&&e.createElement("line",HQ({},b,i,{className:Rk("recharts-cartesian-axis-tick-line",oO(s,"className"))})),c&&n.renderTickItem(c,v,"".concat(lA(u)?u(t.value,r):t.value).concat(d||"")))});return e.createElement("g",{className:"recharts-cartesian-axis-ticks"},y)}},{key:"render",value:function(){var t=this,n=this.props,r=n.axisLine,o=n.width,a=n.height,i=n.ticksGenerator,s=n.className;if(n.hide)return null;var l=this.props,c=l.ticks,u=YQ(l,GQ),d=c;return lA(i)&&(d=c&&c.length>0?i(this.props):i(u)),o<=0||a<=0||!d||!d.length?null:e.createElement(dC,{className:Rk("recharts-cartesian-axis",s),ref:function(e){t.layerReference=e}},r&&this.renderAxisLine(),this.renderTicks(d,this.state.fontSize,this.state.letterSpacing),Qq.renderCallByParent(this.props))}}],a=[{key:"renderTickItem",value:function(t,n,r){var o=Rk(n.className,"recharts-cartesian-axis-tick-value");return e.isValidElement(t)?e.cloneElement(t,WQ(WQ({},n),{},{className:o})):lA(t)?t(WQ(WQ({},n),{},{className:o})):e.createElement(Ej,HQ({},n,{className:"recharts-cartesian-axis-tick-value"}),r)}}],o&&KQ(r.prototype,o),a&&KQ(r,a),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,o,a}(e.Component);eJ(nJ,"displayName","CartesianAxis"),eJ(nJ,"defaultProps",{x:0,y:0,width:0,height:0,viewBox:{x:0,y:0,width:0,height:0},orientation:"bottom",ticks:[],stroke:"#666",tickLine:!0,axisLine:!0,tick:!0,mirror:!1,minTickGap:5,tickSize:6,tickMargin:2,interval:"preserveEnd"});var rJ=["x1","y1","x2","y2","key"],oJ=["offset"];function aJ(e){return aJ="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},aJ(e)}function iJ(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function sJ(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?iJ(Object(n),!0).forEach(function(t){lJ(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):iJ(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function lJ(e,t,n){var r;return r=function(e,t){if("object"!=aJ(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=aJ(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(t,"string"),(t="symbol"==aJ(r)?r:r+"")in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function cJ(){return cJ=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},cJ.apply(this,arguments)}function uJ(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var dJ=function(t){var n=t.fill;if(!n||"none"===n)return null;var r=t.fillOpacity,o=t.x,a=t.y,i=t.width,s=t.height,l=t.ry;return e.createElement("rect",{x:o,y:a,ry:l,width:i,height:s,stroke:"none",fill:n,fillOpacity:r,className:"recharts-cartesian-grid-bg"})};function pJ(t,n){var r;if(e.isValidElement(t))r=e.cloneElement(t,n);else if(lA(t))r=t(n);else{var o=n.x1,a=n.y1,i=n.x2,s=n.y2,l=n.key,c=uJ(n,rJ),u=eC(c,!1);u.offset;var d=uJ(u,oJ);r=e.createElement("line",cJ({},d,{x1:o,y1:a,x2:i,y2:s,fill:"none",key:l}))}return r}function fJ(t){var n=t.x,r=t.width,o=t.horizontal,a=void 0===o||o,i=t.horizontalPoints;if(!a||!i||!i.length)return null;var s=i.map(function(e,o){var i=sJ(sJ({},t),{},{x1:n,y1:e,x2:n+r,y2:e,key:"line-".concat(o),index:o});return pJ(a,i)});return e.createElement("g",{className:"recharts-cartesian-grid-horizontal"},s)}function gJ(t){var n=t.y,r=t.height,o=t.vertical,a=void 0===o||o,i=t.verticalPoints;if(!a||!i||!i.length)return null;var s=i.map(function(e,o){var i=sJ(sJ({},t),{},{x1:e,y1:n,x2:e,y2:n+r,key:"line-".concat(o),index:o});return pJ(a,i)});return e.createElement("g",{className:"recharts-cartesian-grid-vertical"},s)}function mJ(t){var n=t.horizontalFill,r=t.fillOpacity,o=t.x,a=t.y,i=t.width,s=t.height,l=t.horizontalPoints,c=t.horizontal;if(!(void 0===c||c)||!n||!n.length)return null;var u=l.map(function(e){return Math.round(e+a-a)}).sort(function(e,t){return e-t});a!==u[0]&&u.unshift(0);var d=u.map(function(t,l){var c=!u[l+1]?a+s-t:u[l+1]-t;if(c<=0)return null;var d=l%n.length;return e.createElement("rect",{key:"react-".concat(l),y:t,x:o,height:c,width:i,stroke:"none",fill:n[d],fillOpacity:r,className:"recharts-cartesian-grid-bg"})});return e.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},d)}function hJ(t){var n=t.vertical,r=void 0===n||n,o=t.verticalFill,a=t.fillOpacity,i=t.x,s=t.y,l=t.width,c=t.height,u=t.verticalPoints;if(!r||!o||!o.length)return null;var d=u.map(function(e){return Math.round(e+i-i)}).sort(function(e,t){return e-t});i!==d[0]&&d.unshift(0);var p=d.map(function(t,n){var r=!d[n+1]?i+l-t:d[n+1]-t;if(r<=0)return null;var u=n%o.length;return e.createElement("rect",{key:"react-".concat(n),x:t,y:s,width:r,height:c,stroke:"none",fill:o[u],fillOpacity:a,className:"recharts-cartesian-grid-bg"})});return e.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},p)}var bJ=function(e,t){var n=e.xAxis,r=e.width,o=e.height,a=e.offset;return cq(UQ(sJ(sJ(sJ({},nJ.defaultProps),n),{},{ticks:uq(n,!0),viewBox:{x:0,y:0,width:r,height:o}})),a.left,a.left+a.width,t)},yJ=function(e,t){var n=e.yAxis,r=e.width,o=e.height,a=e.offset;return cq(UQ(sJ(sJ(sJ({},nJ.defaultProps),n),{},{ticks:uq(n,!0),viewBox:{x:0,y:0,width:r,height:o}})),a.top,a.top+a.height,t)},vJ={horizontal:!0,vertical:!0,stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[]};function wJ(t){var n,r,o,a,i,s,l,c,u=VZ(),d=WZ(),p=e.useContext(FZ),f=sJ(sJ({},t),{},{stroke:null!==(n=t.stroke)&&void 0!==n?n:vJ.stroke,fill:null!==(r=t.fill)&&void 0!==r?r:vJ.fill,horizontal:null!==(o=t.horizontal)&&void 0!==o?o:vJ.horizontal,horizontalFill:null!==(a=t.horizontalFill)&&void 0!==a?a:vJ.horizontalFill,vertical:null!==(i=t.vertical)&&void 0!==i?i:vJ.vertical,verticalFill:null!==(s=t.verticalFill)&&void 0!==s?s:vJ.verticalFill,x:EO(t.x)?t.x:p.left,y:EO(t.y)?t.y:p.top,width:EO(t.width)?t.width:p.width,height:EO(t.height)?t.height:p.height}),g=f.x,m=f.y,h=f.width,b=f.height,y=f.syncWithTicks,v=f.horizontalValues,w=f.verticalValues,S=(l=e.useContext(DZ),CO(l)),x=(c=e.useContext(MZ),_Z(c,function(e){return UX(e.domain,Number.isFinite)})||CO(c));if(!EO(h)||h<=0||!EO(b)||b<=0||!EO(g)||g!==+g||!EO(m)||m!==+m)return null;var E=f.verticalCoordinatesGenerator||bJ,k=f.horizontalCoordinatesGenerator||yJ,A=f.horizontalPoints,T=f.verticalPoints;if((!A||!A.length)&&lA(k)){var O=v&&v.length,C=k({yAxis:x?sJ(sJ({},x),{},{ticks:O?v:x.ticks}):void 0,width:u,height:d,offset:p},!!O||y);fC(Array.isArray(C),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(aJ(C),"]")),Array.isArray(C)&&(A=C)}if((!T||!T.length)&&lA(E)){var I=w&&w.length,N=E({xAxis:S?sJ(sJ({},S),{},{ticks:I?w:S.ticks}):void 0,width:u,height:d,offset:p},!!I||y);fC(Array.isArray(N),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(aJ(N),"]")),Array.isArray(N)&&(T=N)}return e.createElement("g",{className:"recharts-cartesian-grid"},e.createElement(dJ,{fill:f.fill,fillOpacity:f.fillOpacity,x:f.x,y:f.y,width:f.width,height:f.height,ry:f.ry}),e.createElement(fJ,cJ({},f,{offset:p,horizontalPoints:A,xAxis:S,yAxis:x})),e.createElement(gJ,cJ({},f,{offset:p,verticalPoints:T,xAxis:S,yAxis:x})),e.createElement(mJ,cJ({},f,{horizontalPoints:A})),e.createElement(hJ,cJ({},f,{verticalPoints:T})))}wJ.displayName="CartesianGrid";var SJ=["type","layout","connectNulls","ref"],xJ=["key"];function EJ(e){return EJ="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},EJ(e)}function kJ(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function AJ(){return AJ=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},AJ.apply(this,arguments)}function TJ(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function OJ(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?TJ(Object(n),!0).forEach(function(t){DJ(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):TJ(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function CJ(e){return function(e){if(Array.isArray(e))return IJ(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return IJ(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return IJ(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function IJ(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function NJ(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,MJ(r.key),r)}}function RJ(e,t,n){return t=PJ(t),function(e,t){if(t&&("object"===EJ(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,_J()?Reflect.construct(t,n||[],PJ(e).constructor):t.apply(e,n))}function _J(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(_J=function(){return!!e})()}function PJ(e){return PJ=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},PJ(e)}function LJ(e,t){return LJ=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},LJ(e,t)}function DJ(e,t,n){return(t=MJ(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function MJ(e){var t=function(e,t){if("object"!=EJ(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=EJ(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==EJ(t)?t:t+""}var jJ=function(t){function n(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n);for(var t=arguments.length,r=new Array(t),o=0;o<t;o++)r[o]=arguments[o];return DJ(e=RJ(this,n,[].concat(r)),"state",{isAnimationFinished:!0,totalLength:0}),DJ(e,"generateSimpleStrokeDasharray",function(e,t){return"".concat(t,"px ").concat(e-t,"px")}),DJ(e,"getStrokeDasharray",function(t,r,o){var a=o.reduce(function(e,t){return e+t});if(!a)return e.generateSimpleStrokeDasharray(r,t);for(var i=Math.floor(t/a),s=t%a,l=r-t,c=[],u=0,d=0;u<o.length;d+=o[u],++u)if(d+o[u]>s){c=[].concat(CJ(o.slice(0,u)),[s-d]);break}var p=c.length%2==0?[0,l]:[l];return[].concat(CJ(n.repeat(o,i)),CJ(c),p).map(function(e){return"".concat(e,"px")}).join(", ")}),DJ(e,"id",TO("recharts-line-")),DJ(e,"pathRef",function(t){e.mainCurve=t}),DJ(e,"handleAnimationEnd",function(){e.setState({isAnimationFinished:!0}),e.props.onAnimationEnd&&e.props.onAnimationEnd()}),DJ(e,"handleAnimationStart",function(){e.setState({isAnimationFinished:!1}),e.props.onAnimationStart&&e.props.onAnimationStart()}),e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&LJ(e,t)}(n,t),r=n,o=[{key:"componentDidMount",value:function(){if(this.props.isAnimationActive){var e=this.getTotalLength();this.setState({totalLength:e})}}},{key:"componentDidUpdate",value:function(){if(this.props.isAnimationActive){var e=this.getTotalLength();e!==this.state.totalLength&&this.setState({totalLength:e})}}},{key:"getTotalLength",value:function(){var e=this.mainCurve;try{return e&&e.getTotalLength&&e.getTotalLength()||0}catch(e){return 0}}},{key:"renderErrorBar",value:function(t,n){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var r=this.props,o=r.points,a=r.xAxis,i=r.yAxis,s=r.layout,l=KO(r.children,HG);if(!l)return null;var c=function(e,t){return{x:e.x,y:e.y,value:e.value,errorVal:rq(e.payload,t)}},u={clipPath:t?"url(#clipPath-".concat(n,")"):null};return e.createElement(dC,u,l.map(function(t){return e.cloneElement(t,{key:"bar-".concat(t.props.dataKey),data:o,xAxis:a,yAxis:i,layout:s,dataPointFormatter:c})}))}},{key:"renderDots",value:function(t,r,o){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var a=this.props,i=a.dot,s=a.points,l=a.dataKey,c=eC(this.props,!1),u=eC(i,!0),d=s.map(function(e,t){var r=OJ(OJ(OJ({key:"dot-".concat(t),r:3},c),u),{},{index:t,cx:e.x,cy:e.y,value:e.value,dataKey:l,payload:e.payload,points:s});return n.renderDotItem(i,r)}),p={clipPath:t?"url(#clipPath-".concat(r?"":"dots-").concat(o,")"):null};return e.createElement(dC,AJ({className:"recharts-line-dots",key:"dots"},p),d)}},{key:"renderCurveStatically",value:function(t,n,r,o){var a=this.props,i=a.type,s=a.layout,l=a.connectNulls;a.ref;var c=kJ(a,SJ),u=OJ(OJ(OJ({},eC(c,!0)),{},{fill:"none",className:"recharts-line-curve",clipPath:n?"url(#clipPath-".concat(r,")"):null,points:t},o),{},{type:i,layout:s,connectNulls:l});return e.createElement(PH,AJ({},u,{pathRef:this.pathRef}))}},{key:"renderCurveWithAnimation",value:function(t,n){var r=this,o=this.props,a=o.points,i=o.strokeDasharray,s=o.isAnimationActive,l=o.animationBegin,c=o.animationDuration,u=o.animationEasing,d=o.animationId,p=o.animateNewValues,f=o.width,g=o.height,m=this.state,h=m.prevPoints,b=m.totalLength;return e.createElement(_W,{begin:l,duration:c,isActive:s,easing:u,from:{t:0},to:{t:1},key:"line-".concat(d),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(e){var o=e.t;if(h){var s=h.length/a.length,l=a.map(function(e,t){var n=Math.floor(t*s);if(h[n]){var r=h[n],a=IO(r.x,e.x),i=IO(r.y,e.y);return OJ(OJ({},e),{},{x:a(o),y:i(o)})}if(p){var l=IO(2*f,e.x),c=IO(g/2,e.y);return OJ(OJ({},e),{},{x:l(o),y:c(o)})}return OJ(OJ({},e),{},{x:e.x,y:e.y})});return r.renderCurveStatically(l,t,n)}var c,u=IO(0,b)(o);if(i){var d="".concat(i).split(/[,\s]+/gim).map(function(e){return parseFloat(e)});c=r.getStrokeDasharray(u,b,d)}else c=r.generateSimpleStrokeDasharray(b,u);return r.renderCurveStatically(a,t,n,{strokeDasharray:c})})}},{key:"renderCurve",value:function(e,t){var n=this.props,r=n.points,o=n.isAnimationActive,a=this.state,i=a.prevPoints,s=a.totalLength;return o&&r&&r.length&&(!i&&s>0||!O$(i,r))?this.renderCurveWithAnimation(e,t):this.renderCurveStatically(r,e,t)}},{key:"render",value:function(){var t,n=this.props,r=n.hide,o=n.dot,a=n.points,i=n.className,s=n.xAxis,l=n.yAxis,c=n.top,u=n.left,d=n.width,p=n.height,f=n.isAnimationActive,g=n.id;if(r||!a||!a.length)return null;var m=this.state.isAnimationFinished,h=1===a.length,b=Rk("recharts-line",i),y=s&&s.allowDataOverflow,v=l&&l.allowDataOverflow,w=y||v,S=aO(g)?this.id:g,x=null!==(t=eC(o,!1))&&void 0!==t?t:{r:3,strokeWidth:2},E=x.r,k=void 0===E?3:E,A=x.strokeWidth,T=void 0===A?2:A,O=(JO(o)?o:{}).clipDot,C=void 0===O||O,I=2*k+T;return e.createElement(dC,{className:b},y||v?e.createElement("defs",null,e.createElement("clipPath",{id:"clipPath-".concat(S)},e.createElement("rect",{x:y?u:u-d/2,y:v?c:c-p/2,width:y?d:2*d,height:v?p:2*p})),!C&&e.createElement("clipPath",{id:"clipPath-dots-".concat(S)},e.createElement("rect",{x:u-I/2,y:c-I/2,width:d+I,height:p+I}))):null,!h&&this.renderCurve(w,S),this.renderErrorBar(w,S),(h||o)&&this.renderDots(w,C,S),(!f||m)&&pH.renderCallByParent(this.props,a))}}],a=[{key:"getDerivedStateFromProps",value:function(e,t){return e.animationId!==t.prevAnimationId?{prevAnimationId:e.animationId,curPoints:e.points,prevPoints:t.curPoints}:e.points!==t.curPoints?{curPoints:e.points}:null}},{key:"repeat",value:function(e,t){for(var n=e.length%2!=0?[].concat(CJ(e),[0]):e,r=[],o=0;o<t;++o)r=[].concat(CJ(r),CJ(n));return r}},{key:"renderDotItem",value:function(t,n){var r;if(e.isValidElement(t))r=e.cloneElement(t,n);else if(lA(t))r=t(n);else{var o=n.key,a=kJ(n,xJ),i=Rk("recharts-line-dot","boolean"!=typeof t?t.className:"");r=e.createElement(JW,AJ({key:o},a,{className:i}))}return r}}],o&&NJ(r.prototype,o),a&&NJ(r,a),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,o,a}(e.PureComponent);DJ(jJ,"displayName","Line"),DJ(jJ,"defaultProps",{xAxisId:0,yAxisId:0,connectNulls:!1,activeDot:!0,dot:!0,legendType:"line",stroke:"#3182bd",strokeWidth:1,fill:"#fff",points:[],isAnimationActive:!ZD,animateNewValues:!0,animationBegin:0,animationDuration:1500,animationEasing:"ease",hide:!1,label:!1}),DJ(jJ,"getComposedData",function(e){var t=e.props,n=e.xAxis,r=e.yAxis,o=e.xAxisTicks,a=e.yAxisTicks,i=e.dataKey,s=e.bandSize,l=e.displayedData,c=e.offset,u=t.layout,d=l.map(function(e,t){var l=rq(e,i);return"horizontal"===u?{x:vq({axis:n,ticks:o,bandSize:s,entry:e,index:t}),y:aO(l)?null:r.scale(l),value:l,payload:e}:{x:aO(l)?null:n.scale(l),y:vq({axis:r,ticks:a,bandSize:s,entry:e,index:t}),value:l,payload:e}});return OJ({points:d,layout:u},c)});var FJ,BJ=["layout","type","stroke","connectNulls","isRange","ref"],UJ=["key"];function zJ(e){return zJ="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},zJ(e)}function $J(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function GJ(){return GJ=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},GJ.apply(this,arguments)}function qJ(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function HJ(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?qJ(Object(n),!0).forEach(function(t){ZJ(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):qJ(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function VJ(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,QJ(r.key),r)}}function WJ(e,t,n){return t=KJ(t),function(e,t){if(t&&("object"===zJ(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,YJ()?Reflect.construct(t,n||[],KJ(e).constructor):t.apply(e,n))}function YJ(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(YJ=function(){return!!e})()}function KJ(e){return KJ=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},KJ(e)}function XJ(e,t){return XJ=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},XJ(e,t)}function ZJ(e,t,n){return(t=QJ(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function QJ(e){var t=function(e,t){if("object"!=zJ(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=zJ(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==zJ(t)?t:t+""}var JJ=function(t){function n(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n);for(var t=arguments.length,r=new Array(t),o=0;o<t;o++)r[o]=arguments[o];return ZJ(e=WJ(this,n,[].concat(r)),"state",{isAnimationFinished:!0}),ZJ(e,"id",TO("recharts-area-")),ZJ(e,"handleAnimationEnd",function(){var t=e.props.onAnimationEnd;e.setState({isAnimationFinished:!0}),lA(t)&&t()}),ZJ(e,"handleAnimationStart",function(){var t=e.props.onAnimationStart;e.setState({isAnimationFinished:!1}),lA(t)&&t()}),e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&XJ(e,t)}(n,t),r=n,o=[{key:"renderDots",value:function(t,r,o){var a=this.props.isAnimationActive,i=this.state.isAnimationFinished;if(a&&!i)return null;var s=this.props,l=s.dot,c=s.points,u=s.dataKey,d=eC(this.props,!1),p=eC(l,!0),f=c.map(function(e,t){var r=HJ(HJ(HJ({key:"dot-".concat(t),r:3},d),p),{},{index:t,cx:e.x,cy:e.y,dataKey:u,value:e.value,payload:e.payload,points:c});return n.renderDotItem(l,r)}),g={clipPath:t?"url(#clipPath-".concat(r?"":"dots-").concat(o,")"):null};return e.createElement(dC,GJ({className:"recharts-area-dots"},g),f)}},{key:"renderHorizontalRect",value:function(t){var n=this.props,r=n.baseLine,o=n.points,a=n.strokeWidth,i=o[0].x,s=o[o.length-1].x,l=t*Math.abs(i-s),c=p$(o.map(function(e){return e.y||0}));return EO(r)&&"number"==typeof r?c=Math.max(r,c):r&&Array.isArray(r)&&r.length&&(c=Math.max(p$(r.map(function(e){return e.y||0})),c)),EO(c)?e.createElement("rect",{x:i<s?i:i-l,y:0,width:l,height:Math.floor(c+(a?parseInt("".concat(a),10):1))}):null}},{key:"renderVerticalRect",value:function(t){var n=this.props,r=n.baseLine,o=n.points,a=n.strokeWidth,i=o[0].y,s=o[o.length-1].y,l=t*Math.abs(i-s),c=p$(o.map(function(e){return e.x||0}));return EO(r)&&"number"==typeof r?c=Math.max(r,c):r&&Array.isArray(r)&&r.length&&(c=Math.max(p$(r.map(function(e){return e.x||0})),c)),EO(c)?e.createElement("rect",{x:0,y:i<s?i:i-l,width:c+(a?parseInt("".concat(a),10):1),height:Math.floor(l)}):null}},{key:"renderClipRect",value:function(e){return"vertical"===this.props.layout?this.renderVerticalRect(e):this.renderHorizontalRect(e)}},{key:"renderAreaStatically",value:function(t,n,r,o){var a=this.props,i=a.layout,s=a.type,l=a.stroke,c=a.connectNulls,u=a.isRange;a.ref;var d=$J(a,BJ);return e.createElement(dC,{clipPath:r?"url(#clipPath-".concat(o,")"):null},e.createElement(PH,GJ({},eC(d,!0),{points:t,connectNulls:c,type:s,baseLine:n,layout:i,stroke:"none",className:"recharts-area-area"})),"none"!==l&&e.createElement(PH,GJ({},eC(this.props,!1),{className:"recharts-area-curve",layout:i,type:s,connectNulls:c,fill:"none",points:t})),"none"!==l&&u&&e.createElement(PH,GJ({},eC(this.props,!1),{className:"recharts-area-curve",layout:i,type:s,connectNulls:c,fill:"none",points:n})))}},{key:"renderAreaWithAnimation",value:function(t,n){var r=this,o=this.props,a=o.points,i=o.baseLine,s=o.isAnimationActive,l=o.animationBegin,c=o.animationDuration,u=o.animationEasing,d=o.animationId,p=this.state,f=p.prevPoints,g=p.prevBaseLine;return e.createElement(_W,{begin:l,duration:c,isActive:s,easing:u,from:{t:0},to:{t:1},key:"area-".concat(d),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(o){var s=o.t;if(f){var l,c=f.length/a.length,u=a.map(function(e,t){var n=Math.floor(t*c);if(f[n]){var r=f[n],o=IO(r.x,e.x),a=IO(r.y,e.y);return HJ(HJ({},e),{},{x:o(s),y:a(s)})}return e});return l=EO(i)&&"number"==typeof i?IO(g,i)(s):aO(i)||wO(i)?IO(g,0)(s):i.map(function(e,t){var n=Math.floor(t*c);if(g[n]){var r=g[n],o=IO(r.x,e.x),a=IO(r.y,e.y);return HJ(HJ({},e),{},{x:o(s),y:a(s)})}return e}),r.renderAreaStatically(u,l,t,n)}return e.createElement(dC,null,e.createElement("defs",null,e.createElement("clipPath",{id:"animationClipPath-".concat(n)},r.renderClipRect(s))),e.createElement(dC,{clipPath:"url(#animationClipPath-".concat(n,")")},r.renderAreaStatically(a,i,t,n)))})}},{key:"renderArea",value:function(e,t){var n=this.props,r=n.points,o=n.baseLine,a=n.isAnimationActive,i=this.state,s=i.prevPoints,l=i.prevBaseLine,c=i.totalLength;return a&&r&&r.length&&(!s&&c>0||!O$(s,r)||!O$(l,o))?this.renderAreaWithAnimation(e,t):this.renderAreaStatically(r,o,e,t)}},{key:"render",value:function(){var t,n=this.props,r=n.hide,o=n.dot,a=n.points,i=n.className,s=n.top,l=n.left,c=n.xAxis,u=n.yAxis,d=n.width,p=n.height,f=n.isAnimationActive,g=n.id;if(r||!a||!a.length)return null;var m=this.state.isAnimationFinished,h=1===a.length,b=Rk("recharts-area",i),y=c&&c.allowDataOverflow,v=u&&u.allowDataOverflow,w=y||v,S=aO(g)?this.id:g,x=null!==(t=eC(o,!1))&&void 0!==t?t:{r:3,strokeWidth:2},E=x.r,k=void 0===E?3:E,A=x.strokeWidth,T=void 0===A?2:A,O=(JO(o)?o:{}).clipDot,C=void 0===O||O,I=2*k+T;return e.createElement(dC,{className:b},y||v?e.createElement("defs",null,e.createElement("clipPath",{id:"clipPath-".concat(S)},e.createElement("rect",{x:y?l:l-d/2,y:v?s:s-p/2,width:y?d:2*d,height:v?p:2*p})),!C&&e.createElement("clipPath",{id:"clipPath-dots-".concat(S)},e.createElement("rect",{x:l-I/2,y:s-I/2,width:d+I,height:p+I}))):null,h?null:this.renderArea(w,S),(o||h)&&this.renderDots(w,C,S),(!f||m)&&pH.renderCallByParent(this.props,a))}}],a=[{key:"getDerivedStateFromProps",value:function(e,t){return e.animationId!==t.prevAnimationId?{prevAnimationId:e.animationId,curPoints:e.points,curBaseLine:e.baseLine,prevPoints:t.curPoints,prevBaseLine:t.curBaseLine}:e.points!==t.curPoints||e.baseLine!==t.curBaseLine?{curPoints:e.points,curBaseLine:e.baseLine}:null}}],o&&VJ(r.prototype,o),a&&VJ(r,a),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,o,a}(e.PureComponent);function e0(e){return e0="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e0(e)}function t0(e,t,n){return t&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,s0(r.key),r)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function n0(e,t,n){return t=o0(t),function(e,t){if(t&&("object"===e0(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,r0()?Reflect.construct(t,n||[],o0(e).constructor):t.apply(e,n))}function r0(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(r0=function(){return!!e})()}function o0(e){return o0=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},o0(e)}function a0(e,t){return a0=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},a0(e,t)}function i0(e,t,n){return(t=s0(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function s0(e){var t=function(e,t){if("object"!=e0(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=e0(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==e0(t)?t:t+""}function l0(){return l0=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},l0.apply(this,arguments)}function c0(e){var t=e.xAxisId,n=VZ(),r=WZ(),o=qZ(t);return null==o?null:i.createElement(nJ,l0({},o,{className:Rk("recharts-".concat(o.axisType," ").concat(o.axisType),o.className),viewBox:{x:0,y:0,width:n,height:r},ticksGenerator:function(e){return uq(e,!0)}}))}FJ=JJ,ZJ(JJ,"displayName","Area"),ZJ(JJ,"defaultProps",{stroke:"#3182bd",fill:"#3182bd",fillOpacity:.6,xAxisId:0,yAxisId:0,legendType:"line",connectNulls:!1,points:[],dot:!1,activeDot:!0,hide:!1,isAnimationActive:!ZD,animationBegin:0,animationDuration:1500,animationEasing:"ease"}),ZJ(JJ,"getBaseValue",function(e,t,n,r){var o=e.layout,a=e.baseValue,i=t.props.baseValue,s=null!=i?i:a;if(EO(s)&&"number"==typeof s)return s;var l="horizontal"===o?r:n,c=l.scale.domain();if("number"===l.type){var u=Math.max(c[0],c[1]),d=Math.min(c[0],c[1]);return"dataMin"===s?d:"dataMax"===s||u<0?u:Math.max(Math.min(c[0],c[1]),0)}return"dataMin"===s?c[0]:"dataMax"===s?c[1]:c[0]}),ZJ(JJ,"getComposedData",function(e){var t,n=e.props,r=e.item,o=e.xAxis,a=e.yAxis,i=e.xAxisTicks,s=e.yAxisTicks,l=e.bandSize,c=e.dataKey,u=e.stackedData,d=e.dataStartIndex,p=e.displayedData,f=e.offset,g=n.layout,m=u&&u.length,h=FJ.getBaseValue(n,r,o,a),b="horizontal"===g,y=!1,v=p.map(function(e,t){var n;m?n=u[d+t]:(n=rq(e,c),Array.isArray(n)?y=!0:n=[h,n]);var r=null==n[1]||m&&null==rq(e,c);return b?{x:vq({axis:o,ticks:i,bandSize:l,entry:e,index:t}),y:r?null:a.scale(n[1]),value:n,payload:e}:{x:r?null:o.scale(n[1]),y:vq({axis:a,ticks:s,bandSize:l,entry:e,index:t}),value:n,payload:e}});return t=m||y?v.map(function(e){var t=Array.isArray(e.value)?e.value[0]:null;return b?{x:e.x,y:null!=t&&null!=e.y?a.scale(t):null}:{x:null!=t?o.scale(t):null,y:e.y}}):b?a.scale(h):o.scale(h),HJ({points:v,baseLine:t,layout:g,isRange:y},f)}),ZJ(JJ,"renderDotItem",function(t,n){var r;if(e.isValidElement(t))r=e.cloneElement(t,n);else if(lA(t))r=t(n);else{var o=Rk("recharts-area-dot","boolean"!=typeof t?t.className:""),a=n.key,i=$J(n,UJ);r=e.createElement(JW,GJ({},i,{key:a,className:o}))}return r});var u0=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),n0(this,t,arguments)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&a0(e,t)}(t,e),t0(t,[{key:"render",value:function(){return i.createElement(c0,this.props)}}])}(i.Component);function d0(e){return d0="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},d0(e)}function p0(e,t,n){return t&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,y0(r.key),r)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function f0(e,t,n){return t=m0(t),function(e,t){if(t&&("object"===d0(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,g0()?Reflect.construct(t,n||[],m0(e).constructor):t.apply(e,n))}function g0(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(g0=function(){return!!e})()}function m0(e){return m0=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},m0(e)}function h0(e,t){return h0=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},h0(e,t)}function b0(e,t,n){return(t=y0(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function y0(e){var t=function(e,t){if("object"!=d0(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=d0(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==d0(t)?t:t+""}function v0(){return v0=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},v0.apply(this,arguments)}i0(u0,"displayName","XAxis"),i0(u0,"defaultProps",{allowDecimals:!0,hide:!1,orientation:"bottom",width:0,height:30,mirror:!1,xAxisId:0,tickCount:5,type:"category",padding:{left:0,right:0},allowDataOverflow:!1,scale:"auto",reversed:!1,allowDuplicatedCategory:!0});var w0=function(e){var t=e.yAxisId,n=VZ(),r=WZ(),o=HZ(t);return null==o?null:i.createElement(nJ,v0({},o,{className:Rk("recharts-".concat(o.axisType," ").concat(o.axisType),o.className),viewBox:{x:0,y:0,width:n,height:r},ticksGenerator:function(e){return uq(e,!0)}}))},S0=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),f0(this,t,arguments)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&h0(e,t)}(t,e),p0(t,[{key:"render",value:function(){return i.createElement(w0,this.props)}}])}(i.Component);function x0(e){return function(e){if(Array.isArray(e))return E0(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return E0(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return E0(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function E0(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}b0(S0,"displayName","YAxis"),b0(S0,"defaultProps",{allowDuplicatedCategory:!0,allowDecimals:!0,hide:!1,orientation:"left",width:60,height:0,mirror:!1,yAxisId:0,tickCount:5,type:"number",padding:{top:0,bottom:0},allowDataOverflow:!1,scale:"auto",reversed:!1});var k0=function(e,t,n,r,o){var a=KO(e,lQ),i=KO(e,wQ),s=[].concat(x0(a),x0(i)),l=KO(e,_Q),c="".concat(r,"Id"),u=r[0],d=t;if(s.length&&(d=s.reduce(function(e,t){if(t.props[c]===n&&AX(t.props,"extendDomain")&&EO(t.props[u])){var r=t.props[u];return[Math.min(e[0],r),Math.max(e[1],r)]}return e},d)),l.length){var p="".concat(u,"1"),f="".concat(u,"2");d=l.reduce(function(e,t){if(t.props[c]===n&&AX(t.props,"extendDomain")&&EO(t.props[p])&&EO(t.props[f])){var r=t.props[p],o=t.props[f];return[Math.min(e[0],r,o),Math.max(e[1],r,o)]}return e},d)}return o&&o.length&&(d=o.reduce(function(e,t){return EO(t)?[Math.min(e[0],t),Math.max(e[1],t)]:e},d)),d},A0={exports:{}};!function(e){var t=Object.prototype.hasOwnProperty,n="~";function r(){}function o(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function a(e,t,r,a,i){if("function"!=typeof r)throw new TypeError("The listener must be a function");var s=new o(r,a||e,i),l=n?n+t:t;return e._events[l]?e._events[l].fn?e._events[l]=[e._events[l],s]:e._events[l].push(s):(e._events[l]=s,e._eventsCount++),e}function i(e,t){0===--e._eventsCount?e._events=new r:delete e._events[t]}function s(){this._events=new r,this._eventsCount=0}Object.create&&(r.prototype=Object.create(null),(new r).__proto__||(n=!1)),s.prototype.eventNames=function(){var e,r,o=[];if(0===this._eventsCount)return o;for(r in e=this._events)t.call(e,r)&&o.push(n?r.slice(1):r);return Object.getOwnPropertySymbols?o.concat(Object.getOwnPropertySymbols(e)):o},s.prototype.listeners=function(e){var t=n?n+e:e,r=this._events[t];if(!r)return[];if(r.fn)return[r.fn];for(var o=0,a=r.length,i=new Array(a);o<a;o++)i[o]=r[o].fn;return i},s.prototype.listenerCount=function(e){var t=n?n+e:e,r=this._events[t];return r?r.fn?1:r.length:0},s.prototype.emit=function(e,t,r,o,a,i){var s=n?n+e:e;if(!this._events[s])return!1;var l,c,u=this._events[s],d=arguments.length;if(u.fn){switch(u.once&&this.removeListener(e,u.fn,void 0,!0),d){case 1:return u.fn.call(u.context),!0;case 2:return u.fn.call(u.context,t),!0;case 3:return u.fn.call(u.context,t,r),!0;case 4:return u.fn.call(u.context,t,r,o),!0;case 5:return u.fn.call(u.context,t,r,o,a),!0;case 6:return u.fn.call(u.context,t,r,o,a,i),!0}for(c=1,l=new Array(d-1);c<d;c++)l[c-1]=arguments[c];u.fn.apply(u.context,l)}else{var p,f=u.length;for(c=0;c<f;c++)switch(u[c].once&&this.removeListener(e,u[c].fn,void 0,!0),d){case 1:u[c].fn.call(u[c].context);break;case 2:u[c].fn.call(u[c].context,t);break;case 3:u[c].fn.call(u[c].context,t,r);break;case 4:u[c].fn.call(u[c].context,t,r,o);break;default:if(!l)for(p=1,l=new Array(d-1);p<d;p++)l[p-1]=arguments[p];u[c].fn.apply(u[c].context,l)}}return!0},s.prototype.on=function(e,t,n){return a(this,e,t,n,!1)},s.prototype.once=function(e,t,n){return a(this,e,t,n,!0)},s.prototype.removeListener=function(e,t,r,o){var a=n?n+e:e;if(!this._events[a])return this;if(!t)return i(this,a),this;var s=this._events[a];if(s.fn)s.fn!==t||o&&!s.once||r&&s.context!==r||i(this,a);else{for(var l=0,c=[],u=s.length;l<u;l++)(s[l].fn!==t||o&&!s[l].once||r&&s[l].context!==r)&&c.push(s[l]);c.length?this._events[a]=1===c.length?c[0]:c:i(this,a)}return this},s.prototype.removeAllListeners=function(e){var t;return e?(t=n?n+e:e,this._events[t]&&i(this,t)):(this._events=new r,this._eventsCount=0),this},s.prototype.off=s.prototype.removeListener,s.prototype.addListener=s.prototype.on,s.prefixed=n,s.EventEmitter=s,e.exports=s}(A0);var T0=new(0,A0.exports),O0="recharts.syncMouseEvents";function C0(e){return C0="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},C0(e)}function I0(e,t,n){return t&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,R0(r.key),r)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function N0(e,t,n){return(t=R0(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function R0(e){var t=function(e,t){if("object"!=C0(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=C0(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==C0(t)?t:t+""}var _0=function(){return I0(function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),N0(this,"activeIndex",0),N0(this,"coordinateList",[]),N0(this,"layout","horizontal")},[{key:"setDetails",value:function(e){var t,n=e.coordinateList,r=void 0===n?null:n,o=e.container,a=void 0===o?null:o,i=e.layout,s=void 0===i?null:i,l=e.offset,c=void 0===l?null:l,u=e.mouseHandlerCallback,d=void 0===u?null:u;this.coordinateList=null!==(t=null!=r?r:this.coordinateList)&&void 0!==t?t:[],this.container=null!=a?a:this.container,this.layout=null!=s?s:this.layout,this.offset=null!=c?c:this.offset,this.mouseHandlerCallback=null!=d?d:this.mouseHandlerCallback,this.activeIndex=Math.min(Math.max(this.activeIndex,0),this.coordinateList.length-1)}},{key:"focus",value:function(){this.spoofMouse()}},{key:"keyboardEvent",value:function(e){if(0!==this.coordinateList.length)switch(e.key){case"ArrowRight":if("horizontal"!==this.layout)return;this.activeIndex=Math.min(this.activeIndex+1,this.coordinateList.length-1),this.spoofMouse();break;case"ArrowLeft":if("horizontal"!==this.layout)return;this.activeIndex=Math.max(this.activeIndex-1,0),this.spoofMouse()}}},{key:"setIndex",value:function(e){this.activeIndex=e}},{key:"spoofMouse",value:function(){var e,t;if("horizontal"===this.layout&&0!==this.coordinateList.length){var n=this.container.getBoundingClientRect(),r=n.x,o=n.y,a=n.height,i=this.coordinateList[this.activeIndex].coordinate,s=(null===(e=window)||void 0===e?void 0:e.scrollX)||0,l=(null===(t=window)||void 0===t?void 0:t.scrollY)||0,c=r+i+s,u=o+this.offset.top+a/2+l;this.mouseHandlerCallback({pageX:c,pageY:u})}}}])}();function P0(e){var t=e.cx,n=e.cy,r=e.radius,o=e.startAngle,a=e.endAngle;return{points:[Mq(t,n,r,o),Mq(t,n,r,a)],cx:t,cy:n,radius:r,startAngle:o,endAngle:a}}function L0(e,t,n){var r,o,a,i;if("horizontal"===e)a=r=t.x,o=n.top,i=n.top+n.height;else if("vertical"===e)i=o=t.y,r=n.left,a=n.left+n.width;else if(null!=t.cx&&null!=t.cy){if("centric"!==e)return P0(t);var s=t.cx,l=t.cy,c=t.innerRadius,u=t.outerRadius,d=t.angle,p=Mq(s,l,c,d),f=Mq(s,l,u,d);r=p.x,o=p.y,a=f.x,i=f.y}return[{x:r,y:o},{x:a,y:i}]}function D0(e){return D0="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},D0(e)}function M0(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function j0(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?M0(Object(n),!0).forEach(function(t){F0(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):M0(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function F0(e,t,n){var r;return r=function(e,t){if("object"!=D0(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=D0(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(t,"string"),(t="symbol"==D0(r)?r:r+"")in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function B0(t){var n,r,o,a=t.element,i=t.tooltipEventType,s=t.isActive,l=t.activeCoordinate,c=t.activePayload,u=t.offset,d=t.activeTooltipIndex,p=t.tooltipAxisBandSize,f=t.layout,g=t.chartName,m=null!==(n=a.props.cursor)&&void 0!==n?n:null===(r=a.type.defaultProps)||void 0===r?void 0:r.cursor;if(!a||!m||!s||!l||"ScatterChart"!==g&&"axis"!==i)return null;var h=PH;if("ScatterChart"===g)o=l,h=sY;else if("BarChart"===g)o=function(e,t,n,r){var o=r/2;return{stroke:"none",fill:"#ccc",x:"horizontal"===e?t.x-o:n.left+.5,y:"horizontal"===e?n.top+.5:t.y-o,width:"horizontal"===e?r:n.width-1,height:"horizontal"===e?n.height-1:r}}(f,l,u,p),h=GW;else if("radial"===f){var b=P0(l),y=b.cx,v=b.cy,w=b.radius;o={cx:y,cy:v,startAngle:b.startAngle,endAngle:b.endAngle,innerRadius:w,outerRadius:w},h=SH}else o={points:L0(f,l,u)},h=PH;var S=j0(j0(j0(j0({stroke:"#ccc",pointerEvents:"none"},u),o),eC(m,!1)),{},{payload:c,payloadIndex:d,className:Rk("recharts-tooltip-cursor",m.className)});return e.isValidElement(m)?e.cloneElement(m,S):e.createElement(h,S)}var U0=["item"],z0=["children","className","width","height","style","compact","title","desc"];function $0(e){return $0="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},$0(e)}function G0(){return G0=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},G0.apply(this,arguments)}function q0(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a,i,s=[],l=!0,c=!1;try{if(a=(n=n.call(e)).next,0===t);else for(;!(l=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(c)throw o}}return s}}(e,t)||Q0(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function H0(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function V0(e,t,n){return t&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r1(r.key),r)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function W0(e,t,n){return t=K0(t),function(e,t){if(t&&("object"===$0(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Y0()?Reflect.construct(t,n||[],K0(e).constructor):t.apply(e,n))}function Y0(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Y0=function(){return!!e})()}function K0(e){return K0=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},K0(e)}function X0(e,t){return X0=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},X0(e,t)}function Z0(e){return function(e){if(Array.isArray(e))return J0(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Q0(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Q0(e,t){if(e){if("string"==typeof e)return J0(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?J0(e,t):void 0}}function J0(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function e1(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function t1(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?e1(Object(n),!0).forEach(function(t){n1(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):e1(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function n1(e,t,n){return(t=r1(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r1(e){var t=function(e,t){if("object"!=$0(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=$0(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==$0(t)?t:t+""}var o1={xAxis:["bottom","top"],yAxis:["left","right"]},a1={width:"100%",height:"100%"},i1={x:0,y:0};function s1(e){return e}var l1=function(e,t){var n=t.graphicalItems,r=t.dataStartIndex,o=t.dataEndIndex,a=(null!=n?n:[]).reduce(function(e,t){var n=t.props.data;return n&&n.length?[].concat(Z0(e),Z0(n)):e},[]);return a.length>0?a:e&&e.length&&EO(r)&&EO(o)?e.slice(r,o+1):[]};function c1(e){return"number"===e?[0,"auto"]:void 0}var u1=function(e,t,n,r){var o=e.graphicalItems,a=e.tooltipAxis,i=l1(t,e);return n<0||!o||!o.length||n>=i.length?null:o.reduce(function(o,s){var l,c,u=null!==(l=s.props.data)&&void 0!==l?l:t;(u&&e.dataStartIndex+e.dataEndIndex!==0&&e.dataEndIndex-e.dataStartIndex>=n&&(u=u.slice(e.dataStartIndex,e.dataEndIndex+1)),a.dataKey&&!a.allowDuplicatedCategory)?c=NO(void 0===u?i:u,a.dataKey,r):c=u&&u[n]||i[n];return c?[].concat(Z0(o),[Oq(s,c)]):o},[])},d1=function(e,t,n,r){var o=r||{x:e.chartX,y:e.chartY},a=function(e,t){return"horizontal"===t?e.x:"vertical"===t?e.y:"centric"===t?e.angle:e.radius}(o,n),i=e.orderedTooltipTicks,s=e.tooltipAxis,l=e.tooltipTicks,c=function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=arguments.length>2?arguments[2]:void 0,o=arguments.length>3?arguments[3]:void 0,a=-1,i=null!==(t=null==n?void 0:n.length)&&void 0!==t?t:0;if(i<=1)return 0;if(o&&"angleAxis"===o.axisType&&Math.abs(Math.abs(o.range[1]-o.range[0])-360)<=1e-6)for(var s=o.range,l=0;l<i;l++){var c=l>0?r[l-1].coordinate:r[i-1].coordinate,u=r[l].coordinate,d=l>=i-1?r[0].coordinate:r[l+1].coordinate,p=void 0;if(SO(u-c)!==SO(d-u)){var f=[];if(SO(d-u)===SO(s[1]-s[0])){p=d;var g=u+s[1]-s[0];f[0]=Math.min(g,(g+c)/2),f[1]=Math.max(g,(g+c)/2)}else{p=c;var m=d+s[1]-s[0];f[0]=Math.min(u,(m+u)/2),f[1]=Math.max(u,(m+u)/2)}var h=[Math.min(u,(p+u)/2),Math.max(u,(p+u)/2)];if(e>h[0]&&e<=h[1]||e>=f[0]&&e<=f[1]){a=r[l].index;break}}else{var b=Math.min(c,d),y=Math.max(c,d);if(e>(b+u)/2&&e<=(y+u)/2){a=r[l].index;break}}}else for(var v=0;v<i;v++)if(0===v&&e<=(n[v].coordinate+n[v+1].coordinate)/2||v>0&&v<i-1&&e>(n[v].coordinate+n[v-1].coordinate)/2&&e<=(n[v].coordinate+n[v+1].coordinate)/2||v===i-1&&e>(n[v].coordinate+n[v-1].coordinate)/2){a=n[v].index;break}return a}(a,i,l,s);if(c>=0&&l){var u=l[c]&&l[c].value,d=u1(e,t,c,u),p=function(e,t,n,r){var o=t.find(function(e){return e&&e.index===n});if(o){if("horizontal"===e)return{x:o.coordinate,y:r.y};if("vertical"===e)return{x:r.x,y:o.coordinate};if("centric"===e){var a=o.coordinate,i=r.radius;return t1(t1(t1({},r),Mq(r.cx,r.cy,i,a)),{},{angle:a,radius:i})}var s=o.coordinate,l=r.angle;return t1(t1(t1({},r),Mq(r.cx,r.cy,s,l)),{},{angle:l,radius:s})}return i1}(n,i,c,o);return{activeTooltipIndex:c,activeLabel:u,activePayload:d,activeCoordinate:p}}return null},p1=function(e,t){var n=t.axes,r=t.graphicalItems,o=t.axisType,a=t.axisIdKey,i=t.stackGroups,s=t.dataStartIndex,l=t.dataEndIndex,c=e.layout,u=e.children,d=e.stackOffset,p=lq(c,o);return n.reduce(function(t,n){var f,g=void 0!==n.type.defaultProps?t1(t1({},n.type.defaultProps),n.props):n.props,m=g.type,h=g.dataKey,b=g.allowDataOverflow,y=g.allowDuplicatedCategory,v=g.scale,w=g.ticks,S=g.includeHidden,x=g[a];if(t[x])return t;var E,k,A,T=l1(e.data,{graphicalItems:r.filter(function(e){var t;return(a in e.props?e.props[a]:null===(t=e.type.defaultProps)||void 0===t?void 0:t[a])===x}),dataStartIndex:s,dataEndIndex:l}),O=T.length;(function(e,t,n){if("number"===n&&!0===t&&Array.isArray(e)){var r=null==e?void 0:e[0],o=null==e?void 0:e[1];if(r&&o&&EO(r)&&EO(o))return!0}return!1})(g.domain,b,m)&&(E=kq(g.domain,null,b),!p||"number"!==m&&"auto"===v||(A=oq(T,h,"category")));var C=c1(m);if(!E||0===E.length){var I,N=null!==(I=g.domain)&&void 0!==I?I:C;if(h){if(E=oq(T,h,m),"category"===m&&p){var R=function(e){if(!Array.isArray(e))return!1;for(var t=e.length,n={},r=0;r<t;r++){if(n[e[r]])return!0;n[e[r]]=!0}return!1}(E);y&&R?(k=E,E=QK(0,O)):y||(E=Tq(N,E,n).reduce(function(e,t){return e.indexOf(t)>=0?e:[].concat(Z0(e),[t])},[]))}else if("category"===m)E=y?E.filter(function(e){return""!==e&&!aO(e)}):Tq(N,E,n).reduce(function(e,t){return e.indexOf(t)>=0||""===t||aO(t)?e:[].concat(Z0(e),[t])},[]);else if("number"===m){var _=function(e,t,n,r,o){var a=t.map(function(t){return iq(e,t,n,o,r)}).filter(function(e){return!aO(e)});return a&&a.length?a.reduce(function(e,t){return[Math.min(e[0],t[0]),Math.max(e[1],t[1])]},[1/0,-1/0]):null}(T,r.filter(function(e){var t,n,r=a in e.props?e.props[a]:null===(t=e.type.defaultProps)||void 0===t?void 0:t[a],o="hide"in e.props?e.props.hide:null===(n=e.type.defaultProps)||void 0===n?void 0:n.hide;return r===x&&(S||!o)}),h,o,c);_&&(E=_)}!p||"number"!==m&&"auto"===v||(A=oq(T,h,"category"))}else E=p?QK(0,O):i&&i[x]&&i[x].hasStack&&"number"===m?"expand"===d?[0,1]:Sq(i[x].stackGroups,s,l):sq(T,r.filter(function(e){var t=a in e.props?e.props[a]:e.type.defaultProps[a],n="hide"in e.props?e.props.hide:e.type.defaultProps.hide;return t===x&&(S||!n)}),m,c,!0);if("number"===m)E=k0(u,E,x,o,w),N&&(E=kq(N,E,b));else if("category"===m&&N){var P=N;E.every(function(e){return P.indexOf(e)>=0})&&(E=P)}}return t1(t1({},t),{},n1({},x,t1(t1({},g),{},{axisType:o,domain:E,categoricalDomain:A,duplicateDomain:k,originalDomain:null!==(f=g.domain)&&void 0!==f?f:C,isCategorical:p,layout:c})))},{})},f1=function(e,t){var n=t.axisType,r=void 0===n?"xAxis":n,o=t.AxisComp,a=t.graphicalItems,i=t.stackGroups,s=t.dataStartIndex,l=t.dataEndIndex,c=e.children,u="".concat(r,"Id"),d=KO(c,o),p={};return d&&d.length?p=p1(e,{axes:d,graphicalItems:a,axisType:r,axisIdKey:u,stackGroups:i,dataStartIndex:s,dataEndIndex:l}):a&&a.length&&(p=function(e,t){var n=t.graphicalItems,r=t.Axis,o=t.axisType,a=t.axisIdKey,i=t.stackGroups,s=t.dataStartIndex,l=t.dataEndIndex,c=e.layout,u=e.children,d=l1(e.data,{graphicalItems:n,dataStartIndex:s,dataEndIndex:l}),p=d.length,f=lq(c,o),g=-1;return n.reduce(function(e,t){var m,h=(void 0!==t.type.defaultProps?t1(t1({},t.type.defaultProps),t.props):t.props)[a],b=c1("number");return e[h]?e:(g++,f?m=QK(0,p):i&&i[h]&&i[h].hasStack?(m=Sq(i[h].stackGroups,s,l),m=k0(u,m,h,o)):(m=kq(b,sq(d,n.filter(function(e){var t,n,r=a in e.props?e.props[a]:null===(t=e.type.defaultProps)||void 0===t?void 0:t[a],o="hide"in e.props?e.props.hide:null===(n=e.type.defaultProps)||void 0===n?void 0:n.hide;return r===h&&!o}),"number",c),r.defaultProps.allowDataOverflow),m=k0(u,m,h,o)),t1(t1({},e),{},n1({},h,t1(t1({axisType:o},r.defaultProps),{},{hide:!0,orientation:oO(o1,"".concat(o,".").concat(g%2),null),domain:m,originalDomain:b,isCategorical:f,layout:c}))))},{})}(e,{Axis:o,graphicalItems:a,axisType:r,axisIdKey:u,stackGroups:i,dataStartIndex:s,dataEndIndex:l})),p},g1=function(e){var t=e.children,n=e.defaultShowTooltip,r=XO(t,hX),o=0,a=0;return e.data&&0!==e.data.length&&(a=e.data.length-1),r&&r.props&&(r.props.startIndex>=0&&(o=r.props.startIndex),r.props.endIndex>=0&&(a=r.props.endIndex)),{chartX:0,chartY:0,dataStartIndex:o,dataEndIndex:a,activeTooltipIndex:-1,isTooltipActive:Boolean(n)}},m1=function(e){return"horizontal"===e?{numericAxisName:"yAxis",cateAxisName:"xAxis"}:"vertical"===e?{numericAxisName:"xAxis",cateAxisName:"yAxis"}:"centric"===e?{numericAxisName:"radiusAxis",cateAxisName:"angleAxis"}:{numericAxisName:"angleAxis",cateAxisName:"radiusAxis"}},h1=function(e,t){var n=e.props,r=(e.graphicalItems,e.xAxisMap),o=void 0===r?{}:r,a=e.yAxisMap,i=void 0===a?{}:a,s=n.width,l=n.height,c=n.children,u=n.margin||{},d=XO(c,hX),p=XO(c,EL),f=Object.keys(i).reduce(function(e,t){var n=i[t],r=n.orientation;return n.mirror||n.hide?e:t1(t1({},e),{},n1({},r,e[r]+n.width))},{left:u.left||0,right:u.right||0}),g=Object.keys(o).reduce(function(e,t){var n=o[t],r=n.orientation;return n.mirror||n.hide?e:t1(t1({},e),{},n1({},r,oO(e,"".concat(r))+n.height))},{top:u.top||0,bottom:u.bottom||0}),m=t1(t1({},g),f),h=m.bottom;d&&(m.bottom+=d.props.height||hX.defaultProps.height),p&&t&&(m=function(e,t,n,r){var o=n.children,a=n.width,i=n.margin,s=a-(i.left||0)-(i.right||0),l=XG({children:o,legendWidth:s});if(l){var c=r||{},u=c.width,d=c.height,p=l.align,f=l.verticalAlign,g=l.layout;if(("vertical"===g||"horizontal"===g&&"middle"===f)&&"center"!==p&&EO(e[p]))return tq(tq({},e),{},nq({},p,e[p]+(u||0)));if(("horizontal"===g||"vertical"===g&&"center"===p)&&"middle"!==f&&EO(e[f]))return tq(tq({},e),{},nq({},f,e[f]+(d||0)))}return e}(m,0,n,t));var b=s-m.left-m.right,y=l-m.top-m.bottom;return t1(t1({brushBottom:h},m),{},{width:Math.max(b,0),height:Math.max(y,0)})},b1=function(e,t){return"xAxis"===t?e[t].width:"yAxis"===t?e[t].height:void 0},y1=function(t){var n=t.chartName,r=t.GraphicalChild,o=t.defaultTooltipEventType,a=void 0===o?"axis":o,i=t.validateTooltipEventTypes,s=void 0===i?["axis"]:i,l=t.axisComponents,c=t.legendContent,u=t.formatAxisMap,d=t.defaultProps,p=function(e,t){var n=t.graphicalItems,r=t.stackGroups,o=t.offset,a=t.updateId,i=t.dataStartIndex,s=t.dataEndIndex,c=e.barSize,u=e.layout,d=e.barGap,p=e.barCategoryGap,f=e.maxBarSize,g=m1(u),m=g.numericAxisName,h=g.cateAxisName,b=function(e){return!(!e||!e.length)&&e.some(function(e){var t=HO(e&&e.type);return t&&t.indexOf("Bar")>=0})}(n),y=[];return n.forEach(function(n,g){var v=l1(e.data,{graphicalItems:[n],dataStartIndex:i,dataEndIndex:s}),w=void 0!==n.type.defaultProps?t1(t1({},n.type.defaultProps),n.props):n.props,S=w.dataKey,x=w.maxBarSize,E=w["".concat(m,"Id")],k=w["".concat(h,"Id")],A=l.reduce(function(e,r){var o,a,i=t["".concat(r.axisType,"Map")],s=w["".concat(r.axisType,"Id")];i&&i[s]||"zAxis"===r.axisType||("production"!==process.env.NODE_ENV?RG(0,"Specifying a(n) ".concat(r.axisType,"Id requires a corresponding ").concat(r.axisType,"Id on the targeted graphical component ").concat(null!==(o=null==n||null===(a=n.type)||void 0===a?void 0:a.displayName)&&void 0!==o?o:"")):RG());var l=i[s];return t1(t1({},e),{},n1(n1({},r.axisType,l),"".concat(r.axisType,"Ticks"),uq(l)))},{}),T=A[h],O=A["".concat(h,"Ticks")],C=r&&r[E]&&r[E].hasStack&&function(e,t){var n,r=(null!==(n=e.type)&&void 0!==n&&n.defaultProps?tq(tq({},e.type.defaultProps),e.props):e.props).stackId;if(kO(r)){var o=t[r];if(o){var a=o.items.indexOf(e);return a>=0?o.stackedData[a]:null}}return null}(n,r[E].stackGroups),I=HO(n.type).indexOf("Bar")>=0,N=Aq(T,O),R=[],_=b&&function(e){var t=e.barSize,n=e.totalSize,r=e.stackGroups,o=void 0===r?{}:r;if(!o)return{};for(var a={},i=Object.keys(o),s=0,l=i.length;s<l;s++)for(var c=o[i[s]].stackGroups,u=Object.keys(c),d=0,p=u.length;d<p;d++){var f=c[u[d]],g=f.items,m=f.cateAxisId,h=g.filter(function(e){return HO(e.type).indexOf("Bar")>=0});if(h&&h.length){var b=h[0].type.defaultProps,y=void 0!==b?tq(tq({},b),h[0].props):h[0].props,v=y.barSize,w=y[m];a[w]||(a[w]=[]);var S=aO(v)?t:v;a[w].push({item:h[0],stackList:h.slice(1),barSize:aO(S)?void 0:OO(S,n,0)})}}return a}({barSize:c,stackGroups:r,totalSize:b1(A,h)});if(I){var P,L,D=aO(x)?f:x,M=null!==(P=null!==(L=Aq(T,O,!0))&&void 0!==L?L:D)&&void 0!==P?P:0;R=function(e){var t=e.barGap,n=e.barCategoryGap,r=e.bandSize,o=e.sizeList,a=void 0===o?[]:o,i=e.maxBarSize,s=a.length;if(s<1)return null;var l,c=OO(t,r,0,!0),u=[];if(a[0].barSize===+a[0].barSize){var d=!1,p=r/s,f=a.reduce(function(e,t){return e+t.barSize||0},0);(f+=(s-1)*c)>=r&&(f-=(s-1)*c,c=0),f>=r&&p>0&&(d=!0,f=s*(p*=.9));var g={offset:((r-f)/2|0)-c,size:0};l=a.reduce(function(e,t){var n={item:t.item,position:{offset:g.offset+g.size+c,size:d?p:t.barSize}},r=[].concat(QG(e),[n]);return g=r[r.length-1].position,t.stackList&&t.stackList.length&&t.stackList.forEach(function(e){r.push({item:e,position:g})}),r},u)}else{var m=OO(n,r,0,!0);r-2*m-(s-1)*c<=0&&(c=0);var h=(r-2*m-(s-1)*c)/s;h>1&&(h>>=0);var b=i===+i?Math.min(h,i):h;l=a.reduce(function(e,t,n){var r=[].concat(QG(e),[{item:t.item,position:{offset:m+(h+c)*n+(h-b)/2,size:b}}]);return t.stackList&&t.stackList.length&&t.stackList.forEach(function(e){r.push({item:e,position:r[r.length-1].position})}),r},u)}return l}({barGap:d,barCategoryGap:p,bandSize:M!==N?M:N,sizeList:_[k],maxBarSize:D}),M!==N&&(R=R.map(function(e){return t1(t1({},e),{},{position:t1(t1({},e.position),{},{offset:e.position.offset-M/2})})}))}var j,F,B=n&&n.type&&n.type.getComposedData;B&&y.push({props:t1(t1({},B(t1(t1({},A),{},{displayedData:v,props:e,dataKey:S,item:n,bandSize:N,barPosition:R,offset:o,stackedData:C,layout:u,dataStartIndex:i,dataEndIndex:s}))),{},n1(n1(n1({key:n.key||"item-".concat(g)},m,A[m]),h,A[h]),"animationId",a)),childIndex:(j=n,F=e.children,YO(F).indexOf(j)),item:n})}),y},f=function(e,t){var o=e.props,a=e.dataStartIndex,i=e.dataEndIndex,s=e.updateId;if(!ZO({props:o}))return null;var c=o.children,d=o.layout,f=o.stackOffset,g=o.data,m=o.reverseStackOrder,h=m1(d),b=h.numericAxisName,y=h.cateAxisName,v=KO(c,r),w=function(e,t,n,r,o,a){if(!e)return null;var i=(a?t.reverse():t).reduce(function(e,t){var o,a=null!==(o=t.type)&&void 0!==o&&o.defaultProps?tq(tq({},t.type.defaultProps),t.props):t.props,i=a.stackId;if(a.hide)return e;var s=a[n],l=e[s]||{hasStack:!1,stackGroups:{}};if(kO(i)){var c=l.stackGroups[i]||{numericAxisId:n,cateAxisId:r,items:[]};c.items.push(t),l.hasStack=!0,l.stackGroups[i]=c}else l.stackGroups[TO("_stackId_")]={numericAxisId:n,cateAxisId:r,items:[t]};return tq(tq({},e),{},nq({},s,l))},{});return Object.keys(i).reduce(function(t,a){var s=i[a];return s.hasStack&&(s.stackGroups=Object.keys(s.stackGroups).reduce(function(t,a){var i=s.stackGroups[a];return tq(tq({},t),{},nq({},a,{numericAxisId:n,cateAxisId:r,items:i.items,stackedData:bq(e,i.items,o)}))},{})),tq(tq({},t),{},nq({},a,s))},{})}(g,v,"".concat(b,"Id"),"".concat(y,"Id"),f,m),S=l.reduce(function(e,t){var n="".concat(t.axisType,"Map");return t1(t1({},e),{},n1({},n,f1(o,t1(t1({},t),{},{graphicalItems:v,stackGroups:t.axisType===b&&w,dataStartIndex:a,dataEndIndex:i}))))},{}),x=h1(t1(t1({},S),{},{props:o,graphicalItems:v}),null==t?void 0:t.legendBBox);Object.keys(S).forEach(function(e){S[e]=u(o,S[e],x,e.replace("Map",""),n)});var E,k,A=S["".concat(y,"Map")],T=(E=CO(A),{tooltipTicks:k=uq(E,!1,!0),orderedTooltipTicks:kD(k,function(e){return e.coordinate}),tooltipAxis:E,tooltipAxisBandSize:Aq(E,k)}),O=p(o,t1(t1({},S),{},{dataStartIndex:a,dataEndIndex:i,updateId:s,graphicalItems:v,stackGroups:w,offset:x}));return t1(t1({formattedGraphicalItems:O,graphicalItems:v,offset:x,stackGroups:w},T),S)},g=function(t){function r(t){var o,a,i;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r),n1(i=W0(this,r,[t]),"eventEmitterSymbol",Symbol("rechartsEventEmitter")),n1(i,"accessibilityManager",new _0),n1(i,"handleLegendBBoxUpdate",function(e){if(e){var t=i.state,n=t.dataStartIndex,r=t.dataEndIndex,o=t.updateId;i.setState(t1({legendBBox:e},f({props:i.props,dataStartIndex:n,dataEndIndex:r,updateId:o},t1(t1({},i.state),{},{legendBBox:e}))))}}),n1(i,"handleReceiveSyncEvent",function(e,t,n){if(i.props.syncId===e){if(n===i.eventEmitterSymbol&&"function"!=typeof i.props.syncMethod)return;i.applySyncEvent(t)}}),n1(i,"handleBrushChange",function(e){var t=e.startIndex,n=e.endIndex;if(t!==i.state.dataStartIndex||n!==i.state.dataEndIndex){var r=i.state.updateId;i.setState(function(){return t1({dataStartIndex:t,dataEndIndex:n},f({props:i.props,dataStartIndex:t,dataEndIndex:n,updateId:r},i.state))}),i.triggerSyncEvent({dataStartIndex:t,dataEndIndex:n})}}),n1(i,"handleMouseEnter",function(e){var t=i.getMouseInfo(e);if(t){var n=t1(t1({},t),{},{isTooltipActive:!0});i.setState(n),i.triggerSyncEvent(n);var r=i.props.onMouseEnter;lA(r)&&r(n,e)}}),n1(i,"triggeredAfterMouseMove",function(e){var t=i.getMouseInfo(e),n=t?t1(t1({},t),{},{isTooltipActive:!0}):{isTooltipActive:!1};i.setState(n),i.triggerSyncEvent(n);var r=i.props.onMouseMove;lA(r)&&r(n,e)}),n1(i,"handleItemMouseEnter",function(e){i.setState(function(){return{isTooltipActive:!0,activeItem:e,activePayload:e.tooltipPayload,activeCoordinate:e.tooltipPosition||{x:e.cx,y:e.cy}}})}),n1(i,"handleItemMouseLeave",function(){i.setState(function(){return{isTooltipActive:!1}})}),n1(i,"handleMouseMove",function(e){e.persist(),i.throttleTriggeredAfterMouseMove(e)}),n1(i,"handleMouseLeave",function(e){i.throttleTriggeredAfterMouseMove.cancel();var t={isTooltipActive:!1};i.setState(t),i.triggerSyncEvent(t);var n=i.props.onMouseLeave;lA(n)&&n(t,e)}),n1(i,"handleOuterEvent",function(e){var t,n=function(e){var t=e&&e.type;return t&&qO[t]?qO[t]:null}(e),r=oO(i.props,"".concat(n));n&&lA(r)&&r(null!==(t=/.*touch.*/i.test(n)?i.getMouseInfo(e.changedTouches[0]):i.getMouseInfo(e))&&void 0!==t?t:{},e)}),n1(i,"handleClick",function(e){var t=i.getMouseInfo(e);if(t){var n=t1(t1({},t),{},{isTooltipActive:!0});i.setState(n),i.triggerSyncEvent(n);var r=i.props.onClick;lA(r)&&r(n,e)}}),n1(i,"handleMouseDown",function(e){var t=i.props.onMouseDown;lA(t)&&t(i.getMouseInfo(e),e)}),n1(i,"handleMouseUp",function(e){var t=i.props.onMouseUp;lA(t)&&t(i.getMouseInfo(e),e)}),n1(i,"handleTouchMove",function(e){null!=e.changedTouches&&e.changedTouches.length>0&&i.throttleTriggeredAfterMouseMove(e.changedTouches[0])}),n1(i,"handleTouchStart",function(e){null!=e.changedTouches&&e.changedTouches.length>0&&i.handleMouseDown(e.changedTouches[0])}),n1(i,"handleTouchEnd",function(e){null!=e.changedTouches&&e.changedTouches.length>0&&i.handleMouseUp(e.changedTouches[0])}),n1(i,"handleDoubleClick",function(e){var t=i.props.onDoubleClick;lA(t)&&t(i.getMouseInfo(e),e)}),n1(i,"handleContextMenu",function(e){var t=i.props.onContextMenu;lA(t)&&t(i.getMouseInfo(e),e)}),n1(i,"triggerSyncEvent",function(e){void 0!==i.props.syncId&&T0.emit(O0,i.props.syncId,e,i.eventEmitterSymbol)}),n1(i,"applySyncEvent",function(e){var t=i.props,n=t.layout,r=t.syncMethod,o=i.state.updateId,a=e.dataStartIndex,s=e.dataEndIndex;if(void 0!==e.dataStartIndex||void 0!==e.dataEndIndex)i.setState(t1({dataStartIndex:a,dataEndIndex:s},f({props:i.props,dataStartIndex:a,dataEndIndex:s,updateId:o},i.state)));else if(void 0!==e.activeTooltipIndex){var l=e.chartX,c=e.chartY,u=e.activeTooltipIndex,d=i.state,p=d.offset,g=d.tooltipTicks;if(!p)return;if("function"==typeof r)u=r(g,e);else if("value"===r){u=-1;for(var m=0;m<g.length;m++)if(g[m].value===e.activeLabel){u=m;break}}var h=t1(t1({},p),{},{x:p.left,y:p.top}),b=Math.min(l,h.x+h.width),y=Math.min(c,h.y+h.height),v=g[u]&&g[u].value,w=u1(i.state,i.props.data,u),S=g[u]?{x:"horizontal"===n?g[u].coordinate:b,y:"horizontal"===n?y:g[u].coordinate}:i1;i.setState(t1(t1({},e),{},{activeLabel:v,activeCoordinate:S,activePayload:w,activeTooltipIndex:u}))}else i.setState(e)}),n1(i,"renderCursor",function(t){var r,o=i.state,a=o.isTooltipActive,s=o.activeCoordinate,l=o.activePayload,c=o.offset,u=o.activeTooltipIndex,d=o.tooltipAxisBandSize,p=i.getTooltipEventType(),f=null!==(r=t.props.active)&&void 0!==r?r:a,g=i.props.layout,m=t.key||"_recharts-cursor";return e.createElement(B0,{key:m,activeCoordinate:s,activePayload:l,activeTooltipIndex:u,chartName:n,element:t,isActive:f,layout:g,offset:c,tooltipAxisBandSize:d,tooltipEventType:p})}),n1(i,"renderPolarAxis",function(t,n,r){var o=oO(t,"type.axisType"),a=oO(i.state,"".concat(o,"Map")),s=t.type.defaultProps,l=void 0!==s?t1(t1({},s),t.props):t.props,c=a&&a[l["".concat(o,"Id")]];return e.cloneElement(t,t1(t1({},c),{},{className:Rk(o,c.className),key:t.key||"".concat(n,"-").concat(r),ticks:uq(c,!0)}))}),n1(i,"renderPolarGrid",function(t){var n=t.props,r=n.radialLines,o=n.polarAngles,a=n.polarRadius,s=i.state,l=s.radiusAxisMap,c=s.angleAxisMap,u=CO(l),d=CO(c),p=d.cx,f=d.cy,g=d.innerRadius,m=d.outerRadius;return e.cloneElement(t,{polarAngles:Array.isArray(o)?o:uq(d,!0).map(function(e){return e.coordinate}),polarRadius:Array.isArray(a)?a:uq(u,!0).map(function(e){return e.coordinate}),cx:p,cy:f,innerRadius:g,outerRadius:m,key:t.key||"polar-grid",radialLines:r})}),n1(i,"renderLegend",function(){var t=i.state.formattedGraphicalItems,n=i.props,r=n.children,o=n.width,a=n.height,s=i.props.margin||{},l=o-(s.left||0)-(s.right||0),u=XG({children:r,formattedGraphicalItems:t,legendWidth:l,legendContent:c});if(!u)return null;var d=u.item,p=H0(u,U0);return e.cloneElement(d,t1(t1({},p),{},{chartWidth:o,chartHeight:a,margin:s,onBBoxUpdate:i.handleLegendBBoxUpdate}))}),n1(i,"renderTooltip",function(){var t,n=i.props,r=n.children,o=n.accessibilityLayer,a=XO(r,cM);if(!a)return null;var s=i.state,l=s.isTooltipActive,c=s.activeCoordinate,u=s.activePayload,d=s.activeLabel,p=s.offset,f=null!==(t=a.props.active)&&void 0!==t?t:l;return e.cloneElement(a,{viewBox:t1(t1({},p),{},{x:p.left,y:p.top}),active:f,label:d,payload:f?u:[],coordinate:c,accessibilityLayer:o})}),n1(i,"renderBrush",function(t){var n=i.props,r=n.margin,o=n.data,a=i.state,s=a.offset,l=a.dataStartIndex,c=a.dataEndIndex,u=a.updateId;return e.cloneElement(t,{key:t.key||"_recharts-brush",onChange:pq(i.handleBrushChange,t.props.onChange),data:o,x:EO(t.props.x)?t.props.x:s.left,y:EO(t.props.y)?t.props.y:s.top+s.height+s.brushBottom-(r.bottom||0),width:EO(t.props.width)?t.props.width:s.width,startIndex:l,endIndex:c,updateId:"brush-".concat(u)})}),n1(i,"renderReferenceElement",function(t,n,r){if(!t)return null;var o=i.clipPathId,a=i.state,s=a.xAxisMap,l=a.yAxisMap,c=a.offset,u=t.type.defaultProps||{},d=t.props,p=d.xAxisId,f=void 0===p?u.xAxisId:p,g=d.yAxisId,m=void 0===g?u.yAxisId:g;return e.cloneElement(t,{key:t.key||"".concat(n,"-").concat(r),xAxis:s[f],yAxis:l[m],viewBox:{x:c.left,y:c.top,width:c.width,height:c.height},clipPathId:o})}),n1(i,"renderActivePoints",function(e){var t=e.item,n=e.activePoint,o=e.basePoint,a=e.childIndex,i=e.isRange,s=[],l=t.props.key,c=void 0!==t.item.type.defaultProps?t1(t1({},t.item.type.defaultProps),t.item.props):t.item.props,u=c.activeDot,d=t1(t1({index:a,dataKey:c.dataKey,cx:n.x,cy:n.y,r:4,fill:aq(t.item),strokeWidth:2,stroke:"#fff",payload:n.payload,value:n.value},eC(u,!1)),FO(u));return s.push(r.renderActiveDot(u,d,"".concat(l,"-activePoint-").concat(a))),o?s.push(r.renderActiveDot(u,t1(t1({},d),{},{cx:o.x,cy:o.y}),"".concat(l,"-basePoint-").concat(a))):i&&s.push(null),s}),n1(i,"renderGraphicChild",function(t,n,r){var o=i.filterFormatItem(t,n,r);if(!o)return null;var a=i.getTooltipEventType(),s=i.state,l=s.isTooltipActive,c=s.tooltipAxis,u=s.activeTooltipIndex,d=s.activeLabel,p=XO(i.props.children,cM),f=o.props,g=f.points,m=f.isRange,h=f.baseLine,b=void 0!==o.item.type.defaultProps?t1(t1({},o.item.type.defaultProps),o.item.props):o.item.props,y=b.activeDot,v=b.hide,w=b.activeBar,S=b.activeShape,x=Boolean(!v&&l&&p&&(y||w||S)),E={};"axis"!==a&&p&&"click"===p.props.trigger?E={onClick:pq(i.handleItemMouseEnter,t.props.onClick)}:"axis"!==a&&(E={onMouseLeave:pq(i.handleItemMouseLeave,t.props.onMouseLeave),onMouseEnter:pq(i.handleItemMouseEnter,t.props.onMouseEnter)});var k=e.cloneElement(t,t1(t1({},o.props),E));if(x){if(!(u>=0)){var A,T=(null!==(A=i.getItemByXY(i.state.activeCoordinate))&&void 0!==A?A:{graphicalItem:k}).graphicalItem,O=T.item,C=void 0===O?t:O,I=T.childIndex,N=t1(t1(t1({},o.props),E),{},{activeIndex:I});return[e.cloneElement(C,N),null,null]}var R,_;if(c.dataKey&&!c.allowDuplicatedCategory){var P="function"==typeof c.dataKey?function(e){return"function"==typeof c.dataKey?c.dataKey(e.payload):null}:"payload.".concat(c.dataKey.toString());R=NO(g,P,d),_=m&&h&&NO(h,P,d)}else R=null==g?void 0:g[u],_=m&&h&&h[u];if(S||w){var L=void 0!==t.props.activeIndex?t.props.activeIndex:u;return[e.cloneElement(t,t1(t1(t1({},o.props),E),{},{activeIndex:L})),null,null]}if(!aO(R))return[k].concat(Z0(i.renderActivePoints({item:o,activePoint:R,basePoint:_,childIndex:u,isRange:m})))}return m?[k,null,null]:[k,null]}),n1(i,"renderCustomized",function(t,n,r){return e.cloneElement(t,t1(t1({key:"recharts-customized-".concat(r)},i.props),i.state))}),n1(i,"renderMap",{CartesianGrid:{handler:s1,once:!0},ReferenceArea:{handler:i.renderReferenceElement},ReferenceLine:{handler:s1},ReferenceDot:{handler:i.renderReferenceElement},XAxis:{handler:s1},YAxis:{handler:s1},Brush:{handler:i.renderBrush,once:!0},Bar:{handler:i.renderGraphicChild},Line:{handler:i.renderGraphicChild},Area:{handler:i.renderGraphicChild},Radar:{handler:i.renderGraphicChild},RadialBar:{handler:i.renderGraphicChild},Scatter:{handler:i.renderGraphicChild},Pie:{handler:i.renderGraphicChild},Funnel:{handler:i.renderGraphicChild},Tooltip:{handler:i.renderCursor,once:!0},PolarGrid:{handler:i.renderPolarGrid,once:!0},PolarAngleAxis:{handler:i.renderPolarAxis},PolarRadiusAxis:{handler:i.renderPolarAxis},Customized:{handler:i.renderCustomized}}),i.clipPathId="".concat(null!==(o=t.id)&&void 0!==o?o:TO("recharts"),"-clip"),i.throttleTriggeredAfterMouseMove=_M(i.triggeredAfterMouseMove,null!==(a=t.throttleDelay)&&void 0!==a?a:1e3/60),i.state={},i}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&X0(e,t)}(r,t),V0(r,[{key:"componentDidMount",value:function(){var e,t;this.addListener(),this.accessibilityManager.setDetails({container:this.container,offset:{left:null!==(e=this.props.margin.left)&&void 0!==e?e:0,top:null!==(t=this.props.margin.top)&&void 0!==t?t:0},coordinateList:this.state.tooltipTicks,mouseHandlerCallback:this.triggeredAfterMouseMove,layout:this.props.layout}),this.displayDefaultTooltip()}},{key:"displayDefaultTooltip",value:function(){var e=this.props,t=e.children,n=e.data,r=e.height,o=e.layout,a=XO(t,cM);if(a){var i=a.props.defaultIndex;if(!("number"!=typeof i||i<0||i>this.state.tooltipTicks.length-1)){var s=this.state.tooltipTicks[i]&&this.state.tooltipTicks[i].value,l=u1(this.state,n,i,s),c=this.state.tooltipTicks[i].coordinate,u=(this.state.offset.top+r)/2,d="horizontal"===o?{x:c,y:u}:{y:c,x:u},p=this.state.formattedGraphicalItems.find(function(e){return"Scatter"===e.item.type.name});p&&(d=t1(t1({},d),p.props.points[i].tooltipPosition),l=p.props.points[i].tooltipPayload);var f={activeTooltipIndex:i,isTooltipActive:!0,activeLabel:s,activePayload:l,activeCoordinate:d};this.setState(f),this.renderCursor(a),this.accessibilityManager.setIndex(i)}}}},{key:"getSnapshotBeforeUpdate",value:function(e,t){if(!this.props.accessibilityLayer)return null;var n,r;(this.state.tooltipTicks!==t.tooltipTicks&&this.accessibilityManager.setDetails({coordinateList:this.state.tooltipTicks}),this.props.layout!==e.layout&&this.accessibilityManager.setDetails({layout:this.props.layout}),this.props.margin!==e.margin)&&this.accessibilityManager.setDetails({offset:{left:null!==(n=this.props.margin.left)&&void 0!==n?n:0,top:null!==(r=this.props.margin.top)&&void 0!==r?r:0}});return null}},{key:"componentDidUpdate",value:function(e){tC([XO(e.children,cM)],[XO(this.props.children,cM)])||this.displayDefaultTooltip()}},{key:"componentWillUnmount",value:function(){this.removeListener(),this.throttleTriggeredAfterMouseMove.cancel()}},{key:"getTooltipEventType",value:function(){var e=XO(this.props.children,cM);if(e&&"boolean"==typeof e.props.shared){var t=e.props.shared?"axis":"item";return s.indexOf(t)>=0?t:a}return a}},{key:"getMouseInfo",value:function(e){if(!this.container)return null;var t=this.container,n=t.getBoundingClientRect(),r=function(e){return{top:e.top+window.scrollY-document.documentElement.clientTop,left:e.left+window.scrollX-document.documentElement.clientLeft}}(n),o={chartX:Math.round(e.pageX-r.left),chartY:Math.round(e.pageY-r.top)},a=n.width/t.offsetWidth||1,i=this.inRange(o.chartX,o.chartY,a);if(!i)return null;var s=this.state,l=s.xAxisMap,c=s.yAxisMap,u=this.getTooltipEventType(),d=d1(this.state,this.props.data,this.props.layout,i);if("axis"!==u&&l&&c){var p=CO(l).scale,f=CO(c).scale,g=p&&p.invert?p.invert(o.chartX):null,m=f&&f.invert?f.invert(o.chartY):null;return t1(t1({},o),{},{xValue:g,yValue:m},d)}return d?t1(t1({},o),d):null}},{key:"inRange",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,r=this.props.layout,o=e/n,a=t/n;if("horizontal"===r||"vertical"===r){var i=this.state.offset;return o>=i.left&&o<=i.left+i.width&&a>=i.top&&a<=i.top+i.height?{x:o,y:a}:null}var s=this.state,l=s.angleAxisMap,c=s.radiusAxisMap;if(l&&c){var u=CO(l);return Uq({x:o,y:a},u)}return null}},{key:"parseEventsOfWrapper",value:function(){var e=this.props.children,t=this.getTooltipEventType(),n=XO(e,cM),r={};return n&&"axis"===t&&(r="click"===n.props.trigger?{onClick:this.handleClick}:{onMouseEnter:this.handleMouseEnter,onDoubleClick:this.handleDoubleClick,onMouseMove:this.handleMouseMove,onMouseLeave:this.handleMouseLeave,onTouchMove:this.handleTouchMove,onTouchStart:this.handleTouchStart,onTouchEnd:this.handleTouchEnd,onContextMenu:this.handleContextMenu}),t1(t1({},FO(this.props,this.handleOuterEvent)),r)}},{key:"addListener",value:function(){T0.on(O0,this.handleReceiveSyncEvent)}},{key:"removeListener",value:function(){T0.removeListener(O0,this.handleReceiveSyncEvent)}},{key:"filterFormatItem",value:function(e,t,n){for(var r=this.state.formattedGraphicalItems,o=0,a=r.length;o<a;o++){var i=r[o];if(i.item===e||i.props.key===e.key||t===HO(i.item.type)&&n===i.childIndex)return i}return null}},{key:"renderClipPath",value:function(){var t=this.clipPathId,n=this.state.offset,r=n.left,o=n.top,a=n.height,i=n.width;return e.createElement("defs",null,e.createElement("clipPath",{id:t},e.createElement("rect",{x:r,y:o,height:a,width:i})))}},{key:"getXScales",value:function(){var e=this.state.xAxisMap;return e?Object.entries(e).reduce(function(e,t){var n=q0(t,2),r=n[0],o=n[1];return t1(t1({},e),{},n1({},r,o.scale))},{}):null}},{key:"getYScales",value:function(){var e=this.state.yAxisMap;return e?Object.entries(e).reduce(function(e,t){var n=q0(t,2),r=n[0],o=n[1];return t1(t1({},e),{},n1({},r,o.scale))},{}):null}},{key:"getXScaleByAxisId",value:function(e){var t;return null===(t=this.state.xAxisMap)||void 0===t||null===(t=t[e])||void 0===t?void 0:t.scale}},{key:"getYScaleByAxisId",value:function(e){var t;return null===(t=this.state.yAxisMap)||void 0===t||null===(t=t[e])||void 0===t?void 0:t.scale}},{key:"getItemByXY",value:function(e){var t=this.state,n=t.formattedGraphicalItems,r=t.activeItem;if(n&&n.length)for(var o=0,a=n.length;o<a;o++){var i=n[o],s=i.props,l=i.item,c=void 0!==l.type.defaultProps?t1(t1({},l.type.defaultProps),l.props):l.props,u=HO(l.type);if("Bar"===u){var d=(s.data||[]).find(function(t){return zW(e,t)});if(d)return{graphicalItem:i,payload:d}}else if("RadialBar"===u){var p=(s.data||[]).find(function(t){return Uq(e,t)});if(p)return{graphicalItem:i,payload:p}}else if(kK(i,r)||AK(i,r)||TK(i,r)){var f=NK({graphicalItem:i,activeTooltipItem:r,itemData:c.data}),g=void 0===c.activeIndex?f:c.activeIndex;return{graphicalItem:t1(t1({},i),{},{childIndex:g}),payload:TK(i,r)?c.data[f]:i.props.data[f]}}}return null}},{key:"render",value:function(){var t=this;if(!ZO(this))return null;var n,r,o=this.props,a=o.children,i=o.className,s=o.width,l=o.height,c=o.style,u=o.compact,d=o.title,p=o.desc,f=H0(o,z0),g=eC(f,!1);if(u)return e.createElement($Z,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},e.createElement(sC,G0({},g,{width:s,height:l,title:d,desc:p}),this.renderClipPath(),rC(a,this.renderMap)));this.props.accessibilityLayer&&(g.tabIndex=null!==(n=this.props.tabIndex)&&void 0!==n?n:0,g.role=null!==(r=this.props.role)&&void 0!==r?r:"application",g.onKeyDown=function(e){t.accessibilityManager.keyboardEvent(e)},g.onFocus=function(){t.accessibilityManager.focus()});var m=this.parseEventsOfWrapper();return e.createElement($Z,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},e.createElement("div",G0({className:Rk("recharts-wrapper",i),style:t1({position:"relative",cursor:"default",width:s,height:l},c)},m,{ref:function(e){t.container=e}}),e.createElement(sC,G0({},g,{width:s,height:l,title:d,desc:p,style:a1}),this.renderClipPath(),rC(a,this.renderMap)),this.renderLegend(),this.renderTooltip()))}}])}(e.Component);n1(g,"displayName",n),n1(g,"defaultProps",t1({layout:"horizontal",stackOffset:"none",barCategoryGap:"10%",barGap:4,margin:{top:5,right:5,bottom:5,left:5},reverseStackOrder:!1,syncMethod:"index"},d)),n1(g,"getDerivedStateFromProps",function(e,t){var n=e.dataKey,r=e.data,o=e.children,a=e.width,i=e.height,s=e.layout,l=e.stackOffset,c=e.margin,u=t.dataStartIndex,d=t.dataEndIndex;if(void 0===t.updateId){var p=g1(e);return t1(t1(t1({},p),{},{updateId:0},f(t1(t1({props:e},p),{},{updateId:0}),t)),{},{prevDataKey:n,prevData:r,prevWidth:a,prevHeight:i,prevLayout:s,prevStackOffset:l,prevMargin:c,prevChildren:o})}if(n!==t.prevDataKey||r!==t.prevData||a!==t.prevWidth||i!==t.prevHeight||s!==t.prevLayout||l!==t.prevStackOffset||!_O(c,t.prevMargin)){var g=g1(e),m={chartX:t.chartX,chartY:t.chartY,isTooltipActive:t.isTooltipActive},h=t1(t1({},d1(t,r,s)),{},{updateId:t.updateId+1}),b=t1(t1(t1({},g),m),h);return t1(t1(t1({},b),f(t1({props:e},b),t)),{},{prevDataKey:n,prevData:r,prevWidth:a,prevHeight:i,prevLayout:s,prevStackOffset:l,prevMargin:c,prevChildren:o})}if(!tC(o,t.prevChildren)){var y,v,w,S,x=XO(o,hX),E=x&&null!==(y=null===(v=x.props)||void 0===v?void 0:v.startIndex)&&void 0!==y?y:u,k=x&&null!==(w=null===(S=x.props)||void 0===S?void 0:S.endIndex)&&void 0!==w?w:d,A=E!==u||k!==d,T=!aO(r)&&!A?t.updateId:t.updateId+1;return t1(t1({updateId:T},f(t1(t1({props:e},t),{},{updateId:T,dataStartIndex:E,dataEndIndex:k}),t)),{},{prevChildren:o,dataStartIndex:E,dataEndIndex:k})}return null}),n1(g,"renderActiveDot",function(t,n,r){var o;return o=e.isValidElement(t)?e.cloneElement(t,n):lA(t)?t(n):e.createElement(JW,n),e.createElement(dC,{className:"recharts-active-dot",key:r},o)});var m=e.forwardRef(function(t,n){return e.createElement(g,G0({},t,{ref:n}))});return m.displayName=g.displayName,m},v1=y1({chartName:"LineChart",GraphicalChild:jJ,axisComponents:[{axisType:"xAxis",AxisComp:u0},{axisType:"yAxis",AxisComp:S0}],formatAxisMap:yZ}),w1=y1({chartName:"BarChart",GraphicalChild:dZ,defaultTooltipEventType:"axis",validateTooltipEventTypes:["axis","item"],axisComponents:[{axisType:"xAxis",AxisComp:u0},{axisType:"yAxis",AxisComp:S0}],formatAxisMap:yZ}),S1=y1({chartName:"PieChart",GraphicalChild:$K,validateTooltipEventTypes:["item"],defaultTooltipEventType:"item",legendContent:"children",axisComponents:[{axisType:"angleAxis",AxisComp:qY},{axisType:"radiusAxis",AxisComp:NY}],formatAxisMap:function(e,t,n,r,o){var a=e.width,i=e.height,s=e.startAngle,l=e.endAngle,c=OO(e.cx,a,a/2),u=OO(e.cy,i,i/2),d=jq(a,i,n),p=OO(e.innerRadius,d,0),f=OO(e.outerRadius,d,.8*d);return Object.keys(t).reduce(function(e,n){var a,i=t[n],d=i.domain,g=i.reversed;if(aO(i.range))"angleAxis"===r?a=[s,l]:"radiusAxis"===r&&(a=[p,f]),g&&(a=[a[1],a[0]]);else{var m=_q(a=i.range,2);s=m[0],l=m[1]}var h=fq(i,o),b=h.realScaleType,y=h.scale;y.domain(d).range(a),mq(y);var v=yq(y,Nq(Nq({},i),{},{realScaleType:b})),w=Nq(Nq(Nq({},i),v),{},{range:a,radius:f,realScaleType:b,scale:y,cx:c,cy:u,innerRadius:p,outerRadius:f,startAngle:s,endAngle:l});return Nq(Nq({},e),{},Rq({},n,w))},{})},defaultProps:{layout:"centric",startAngle:0,endAngle:360,cx:"50%",cy:"50%",innerRadius:0,outerRadius:"80%"}}),x1=y1({chartName:"AreaChart",GraphicalChild:JJ,axisComponents:[{axisType:"xAxis",AxisComp:u0},{axisType:"yAxis",AxisComp:S0}],formatAxisMap:yZ});function E1(e){return e>=1e6?`${(e/1e6).toFixed(1)}M`:e>=1e3?`${(e/1e3).toFixed(1)}k`:String(e)}const k1=/(^|[_\W])(price|salary|cost|amount|revenue|expense|total|value|budget|spend|income|sale|balance)/i;function A1(e){return"string"==typeof e&&k1.test(e)}function T1(e){return`$${E1(e)}`}function O1(e){return`$${Number(e).toLocaleString("en-US",{maximumFractionDigits:2})}`}function C1({props:e,isDark:t=!1}){const r=Array.isArray(e.data)?e.data:[],o=A1(e.yKey),a=e.valueLabel||void 0,i=t?"#374151":"#e2e8f0",s=t?"#1f2937":"#ffffff",l=t?"#9ca3af":"#64748b",c=t?"#f3f4f6":"#0f172a",u=t?"#374151":"#e2e8f0",d=t?"#111827":"#ffffff";if(0===r.length)return n.jsxs("div",{style:{borderRadius:8,border:`1px solid ${i}`,background:s,padding:12,margin:"8px 0"},children:[e.title&&n.jsx("div",{style:{fontSize:13,fontWeight:600,color:c,marginBottom:8},children:e.title}),n.jsx("div",{style:{color:l,fontSize:12},children:"No chartable data"})]});const p=r.some(e=>String(e.label??"").length>10),f=p?-35:0,g=p?"end":"middle",m=p?48:20,h=p?250:220;return n.jsxs("div",{style:{borderRadius:8,border:`1px solid ${i}`,background:s,padding:12,margin:"8px 0"},children:[e.title&&n.jsx("h3",{style:{fontSize:13,fontWeight:600,color:c,marginBottom:8,marginTop:0},children:e.title}),n.jsx("div",{role:"img","aria-label":e.title||a||"Bar chart",style:{height:h,width:"100%"},children:n.jsx(BM,{width:"100%",height:"100%",children:n.jsxs(w1,{data:r,margin:{top:16,right:12,left:12,bottom:m},children:[n.jsx(wJ,{strokeDasharray:"3 3",stroke:u}),n.jsx(u0,{dataKey:"label",tick:{fontSize:11,fill:l},angle:f,textAnchor:g,interval:0,tickFormatter:e=>String(e??"").replace(/[_\-]+/g," ").replace(/\b\w/g,e=>e.toUpperCase()),label:e.xAxisLabel?{value:e.xAxisLabel,position:"insideBottom",offset:-12,fontSize:11,fill:l}:void 0}),n.jsx(S0,{width:72,tick:{fontSize:11,fill:l},label:e.yAxisLabel?{value:e.yAxisLabel,angle:-90,position:"insideLeft",fontSize:11,fill:l}:void 0,tickFormatter:t=>o?T1(t):e.unit?`${E1(t)} ${e.unit}`:E1(t)}),n.jsx(cM,{formatter:t=>o?O1(t):e.unit?`${Number(t).toLocaleString()} ${e.unit}`:Number(t).toLocaleString(),contentStyle:{background:d,border:`1px solid ${i}`,borderRadius:6,fontSize:12,color:c}}),n.jsx(dZ,{dataKey:"value",name:a,fill:"#3b82f6",radius:[2,2,0,0],label:{position:"top",fill:l,fontSize:10,formatter:e=>o?T1(e):E1(e)}})]})})})]})}function I1({props:e,isDark:t=!1}){const r=e.trend,o="up"===r?"#059669":"down"===r?"#e11d48":"#64748b",a="up"===r?"↑":"down"===r?"↓":"flat"===r?"→":null,i=t?"#374151":"#e2e8f0",s=t?"#1f2937":"#ffffff",l=t?"#f3f4f6":"#0f172a";return n.jsxs("div",{style:{borderRadius:8,border:`1px solid ${i}`,background:s,padding:12,margin:"8px 0"},children:[n.jsx("p",{style:{fontSize:11,fontWeight:500,color:"#64748b",textTransform:"uppercase",letterSpacing:"0.05em",margin:0},children:e.label}),n.jsx("p",{style:{marginTop:4,fontSize:28,fontWeight:700,color:l,lineHeight:1.1,marginBottom:0},children:e.value}),e.change&&n.jsxs("p",{style:{marginTop:4,fontSize:12,color:o,marginBottom:0},children:[a&&n.jsx("span",{style:{marginRight:4},children:a}),e.change]})]})}const N1=["#3b82f6","#10b981","#f59e0b","#ef4444","#8b5cf6","#ec4899","#14b8a6","#f97316","#6366f1","#84cc16","#06b6d4","#a855f7"];function R1({props:e,isDark:t=!1,donut:r=!1}){const o=Array.isArray(e.data)?e.data:[],a=A1(e.yKey),i=t?"#374151":"#e2e8f0",s=t?"#1f2937":"#ffffff",l=t?"#f3f4f6":"#0f172a",c=t?"#111827":"#ffffff",u=t?"#9ca3af":"#64748b",d=o.map(e=>({name:e.label,value:e.value})),p=Math.PI/180;return n.jsxs("div",{style:{borderRadius:8,border:`1px solid ${i}`,background:s,padding:12,margin:"8px 0"},children:[e.title&&n.jsx("h3",{style:{fontSize:13,fontWeight:600,color:l,marginBottom:8,marginTop:0},children:e.title}),n.jsx("div",{role:"img","aria-label":e.title||(r?"Donut chart":"Pie chart"),style:{height:260,width:"100%"},children:n.jsx(BM,{width:"100%",height:"100%",children:n.jsxs(S1,{children:[n.jsx($K,{data:d,dataKey:"value",nameKey:"name",cx:"50%",cy:"50%",outerRadius:72,innerRadius:r?40:0,paddingAngle:2,labelLine:!1,label:e=>{const o=Number(e&&e.value),i=(s=o,l=Number(e&&e.percent),Number.isFinite(s)&&0!==s?Number.isFinite(l)&&l<.08?"outside":"inside":"none");var s,l;if("none"===i)return null;const c=Number(e.innerRadius)||0,u=Number(e.outerRadius)||0,d=Number(e.cx),f=Number(e.cy),g=-Number(e.midAngle)*p,m=Math.cos(g),h=Math.sin(g),b=a?O1(o):Number(o).toLocaleString();if("inside"===i){const e=c+(u-c)*(r?.78:.6);return n.jsx("text",{x:d+e*m,y:f+e*h,fill:"#ffffff",textAnchor:"middle",dominantBaseline:"central",style:{fontSize:11,fontWeight:600,pointerEvents:"none"},children:b})}const y="string"==typeof e.fill&&e.fill?e.fill:t?"#9ca3af":"#64748b",v=u+8,w=d+v*m,S=f+v*h,x=m>=0,E=w+(x?6:-6);return n.jsxs("g",{style:{pointerEvents:"none"},children:[n.jsx("polyline",{points:`${d+u*m},${f+u*h} ${w},${S} ${E},${S}`,stroke:y,strokeWidth:1,fill:"none"}),n.jsx("text",{x:E+(x?2:-2),y:S,fill:y,textAnchor:x?"start":"end",dominantBaseline:"central",style:{fontSize:10,fontWeight:600},children:b})]})},isAnimationActive:!1,children:d.map((e,t)=>n.jsx(UM,{fill:N1[t%N1.length]},t))}),n.jsx(cM,{formatter:e=>a?O1(e):Number(e).toLocaleString(),contentStyle:{background:c,border:`1px solid ${i}`,borderRadius:6,fontSize:12,color:l}}),n.jsx(EL,{iconSize:10,iconType:"circle",wrapperStyle:{fontSize:11,color:u}})]})})})]})}function _1({props:e,isDark:t=!1,area:r=!1}){const o=Array.isArray(e.data)?e.data:[],a=A1(e.yKey),i=e.valueLabel||void 0,s=t?"#374151":"#e2e8f0",l=t?"#1f2937":"#ffffff",c=t?"#9ca3af":"#64748b",u=t?"#f3f4f6":"#0f172a",d=t?"#374151":"#e2e8f0",p=t?"#111827":"#ffffff";if(0===o.length)return n.jsxs("div",{style:{borderRadius:8,border:`1px solid ${s}`,background:l,padding:12,margin:"8px 0"},children:[e.title&&n.jsx("div",{style:{fontSize:13,fontWeight:600,color:u,marginBottom:8},children:e.title}),n.jsx("div",{style:{color:c,fontSize:12},children:"No chartable data"})]});const f=r?x1:v1;return n.jsxs("div",{style:{borderRadius:8,border:`1px solid ${s}`,background:l,padding:12,margin:"8px 0"},children:[e.title&&n.jsx("h3",{style:{fontSize:13,fontWeight:600,color:u,marginBottom:8,marginTop:0},children:e.title}),n.jsx("div",{role:"img","aria-label":e.title||i||(r?"Area chart":"Line chart"),style:{height:220,width:"100%"},children:n.jsx(BM,{width:"100%",height:"100%",children:n.jsxs(f,{data:o,margin:{top:8,right:12,left:12,bottom:20},children:[n.jsx(wJ,{strokeDasharray:"3 3",stroke:d}),n.jsx(u0,{dataKey:"label",tick:{fontSize:11,fill:c},angle:0,textAnchor:"middle",interval:0,label:e.xAxisLabel?{value:e.xAxisLabel,position:"insideBottom",offset:-12,fontSize:11,fill:c}:void 0}),n.jsx(S0,{width:72,tick:{fontSize:11,fill:c},tickFormatter:t=>a?T1(t):e.unit?`${E1(t)} ${e.unit}`:E1(t)}),n.jsx(cM,{formatter:t=>a?O1(t):e.unit?`${Number(t).toLocaleString()} ${e.unit}`:Number(t).toLocaleString(),contentStyle:{background:p,border:`1px solid ${s}`,borderRadius:6,fontSize:12,color:u}}),r?n.jsx(JJ,{type:"monotone",dataKey:"value",name:i,stroke:"#3b82f6",fill:"#3b82f6",fillOpacity:.15,strokeWidth:2,dot:{r:3,fill:"#3b82f6"}}):n.jsx(jJ,{type:"monotone",dataKey:"value",name:i,stroke:"#3b82f6",strokeWidth:2,dot:{r:3,fill:"#3b82f6"},activeDot:{r:5}})]})})})]})}const P1=/\b(?:field|fields|column|columns|table|tables|sql|summed?|aggregat\w*|averaged?|counted)\b/i,L1=/[A-Za-z_]\w*\.[A-Za-z_]\w*/;function D1(e){if("string"!=typeof e)return"";let t,n=e.trim();do{t=n,n=n.replace(/\s*\(([^()]*)\)\s*$/,(e,t)=>P1.test(t)||L1.test(t)?"":e).trim()}while(n!==t);return n}const M1=/\[([^\]\n]+)\]\((https?:\/\/[^\s)]+)\)|(https?:\/\/[^\s<>()]+[^\s<>().,;:!?'"])/g,j1={color:"#1d4ed8",textDecoration:"underline",overflowWrap:"anywhere"};function F1(e){if(!e)return e;const t=[];let r=0,o=0;for(const a of String(e).matchAll(M1)){const i=a.index??0,s=a[1]??a[3],l=ct(a[2]??a[3]);l&&(i>r&&t.push(e.slice(r,i)),t.push(n.jsx("a",{href:l,target:"_blank",rel:"noopener noreferrer",style:j1,children:s},o++)),r=i+a[0].length)}return 0===t.length?e:(r<e.length&&t.push(e.slice(r)),t)}const B1=e=>function(e){const t=jn;if(!t||Bn(e,t))return e;if("report"===t.mode){let t=String(e);try{t=new URL(String(e)).host}catch{}return Fn.has(t)||(Fn.add(t),console.warn(`[eshal-widget] would block an image from ${t}`)),e}}(ct(e));function U1({spec:e,isDark:t=!1,onButtonClick:r}){if(!e||"object"!=typeof e)return null;e={...e,title:D1(e.title)};const o=String(e.type||"").trim().toLowerCase().replace(/_/g,"-"),a=new Set(["bar","line","area","pie","donut","scatter","bubble","radar","radial-bar","radial","radialbar","treemap","funnel","sankey","composed","waterfall","gauge","histogram","kpi"]);if("revenue-insights"===o)return n.jsx(_2,{spec:e,isDark:t});if("impact-analysis"===o)return n.jsx(L2,{spec:e,isDark:t});if("deviation-analysis"===o)return n.jsx(D2,{spec:e,isDark:t});if("main-drivers"===o)return n.jsx(M2,{spec:e,isDark:t});if("key-observations"===o)return n.jsx(F2,{spec:e,isDark:t});if("recommendations"===o)return n.jsx(B2,{spec:e,isDark:t});if("kpi"===o){const r=e.value??e.amount??e.metric??e.kpi,o=null!=e.delta?Number(e.delta):null,a=e.change??(null!=o&&Number.isFinite(o)?o>=0?`+${o}`:String(o):void 0),i=e.trend??(null!=o&&Number.isFinite(o)?o>0?"up":o<0?"down":"flat":void 0);return n.jsx(I1,{props:{label:e.label||e.title||"",value:null!=r?String(r):"-",change:a,trend:i},isDark:t})}return"table"===o?n.jsx(G1,{spec:e,isDark:t}):a.has(o)||Array.isArray(e.data)&&e.data.length>0?n.jsx($1,{spec:e,type:o,isDark:t}):"alert"===o?n.jsx(q1,{spec:e,isDark:t}):"card"===o?n.jsx(W1,{spec:e,isDark:t,onButtonClick:r}):"button-group"===o?n.jsx(Y1,{spec:e,isDark:t,onButtonClick:r}):"form"===o?n.jsx(Q1,{spec:e,isDark:t,onButtonClick:r}):"confirmation"===o?n.jsx(J1,{spec:e,isDark:t,onButtonClick:r}):"menu"===o?n.jsx(a2,{spec:e,isDark:t,onButtonClick:r}):"profile"===o?n.jsx(i2,{spec:e,isDark:t,onButtonClick:r}):"timeline"===o?n.jsx(s2,{spec:e,isDark:t}):"rating"===o?n.jsx(l2,{spec:e,isDark:t}):"comparison"===o?n.jsx(c2,{spec:e,isDark:t,onButtonClick:r}):"gallery"===o?n.jsx(u2,{spec:e,isDark:t}):Array.isArray(e.data)&&e.data.length>0?n.jsx($1,{spec:e,type:"bar",isDark:t}):null}const z1=e=>({border:e?"1px solid #374151":"1px solid #e5e7eb",background:e?"#1f2937":"#ffffff",borderRadius:8,padding:12,margin:"8px 0",fontSize:13,color:e?"#f3f4f6":"#111827"});function $1({spec:e,type:t,isDark:r}){const{x:o,y:a}=function(e,t,n){if(!Array.isArray(e)||0===e.length)return{x:"name",y:"value"};const r=e[0]||{};if(t&&Object.prototype.hasOwnProperty.call(r,t)&&n&&Object.prototype.hasOwnProperty.call(r,n))return{x:t,y:n};let o=t||null,a=n||null;for(const e of Object.keys(r)){const t=r[e];null!=o||"string"!=typeof t&&null!=t||(o=e),null==a&&"number"==typeof t&&Number.isFinite(t)&&(a=e)}return{x:o||"name",y:a||"value"}}(e.data,e.x,e.y),i=function(e,t,n){return(e||[]).map(e=>{const r=e?.[t];return{label:h2(r,t),value:Number(e?.[n])}}).filter(e=>Number.isFinite(e.value))}(e.data,o,a),s=String(t||"").trim().toLowerCase(),l={title:e.title,data:i,unit:e.unit,xAxisLabel:e.xAxisLabel,yAxisLabel:e.yAxisLabel,yKey:a,valueLabel:g2(a)};return"pie"===s?n.jsx(R1,{props:l,isDark:r,donut:!1}):"donut"===s?n.jsx(R1,{props:l,isDark:r,donut:!0}):"line"===s?n.jsx(_1,{props:l,isDark:r,area:!1}):"area"===s?n.jsx(_1,{props:l,isDark:r,area:!0}):n.jsx(C1,{props:l,isDark:r})}function G1({spec:e,isDark:t}){const r=Array.isArray(e.columns)&&e.columns.length>0?e.columns:Array.isArray(e.data)&&e.data[0]?Object.keys(e.data[0]):[],o=Array.isArray(e.data)?e.data:Array.isArray(e.rows)?e.rows:[];if(0===r.length||0===o.length)return n.jsx("div",{style:z1(t),children:n.jsx("div",{style:{color:t?"#9ca3af":"#6b7280",fontSize:12},children:"Empty table"})});const a=t?"1px solid #374151":"1px solid #e5e7eb";return n.jsxs("div",{style:z1(t),children:[e.title&&n.jsx("div",{style:{fontWeight:600,marginBottom:8},children:e.title}),n.jsx("div",{style:{overflowX:"auto"},children:n.jsxs("table",{style:{borderCollapse:"collapse",width:"100%",fontSize:12},children:[n.jsx("thead",{children:n.jsx("tr",{children:r.map(e=>n.jsx("th",{style:{border:a,padding:"6px 8px",background:"transparent",textAlign:"left",fontWeight:600},children:g2(e)},e))})}),n.jsx("tbody",{children:o.map((e,t)=>n.jsx("tr",{children:r.map((t,r)=>n.jsx("td",{style:{border:a,padding:"6px 8px"},children:Array.isArray(e)?x2(e[r],t):e&&"object"==typeof e?x2(e[t],t):""},t))},t))})]})})]})}function q1({spec:e,isDark:t}){const r=String(e.level||"info").toLowerCase(),o={info:{bg:t?"hsl(204 33% 14%)":"hsl(204 100% 97%)",border:t?"hsl(199 89% 58%)":"hsl(199 89% 48%)",text:t?"#bae6fd":"#0c4a6e"},warn:{bg:t?"hsl(36 33% 14%)":"hsl(34 100% 95%)",border:t?"hsl(38 92% 60%)":"hsl(35 100% 50%)",text:t?"#fde68a":"#663c00"},error:{bg:t?"hsl(356 33% 16%)":"hsl(356 100% 97%)",border:t?"hsl(350 89% 65%)":"hsl(350 89% 60%)",text:t?"#fecdd3":"#9f1239"},success:{bg:t?"hsl(152 36% 14%)":"hsl(152 81% 96%)",border:t?"hsl(158 64% 52%)":"hsl(160 84% 39%)",text:t?"#a7f3d0":"#065f46"}};o.warning=o.warn;const a=o[r]||o.info;return n.jsxs("div",{style:{...z1(t),background:a.bg,borderLeft:`4px solid ${a.border}`,color:a.text},children:[e.title&&n.jsx("div",{style:{fontWeight:600,marginBottom:4},children:e.title}),e.body&&n.jsx("div",{style:{fontSize:12,lineHeight:1.6,whiteSpace:"pre-wrap",wordBreak:"break-word"},children:F1(String(e.body))})]})}const H1=e=>({success:{bg:e?"hsl(152 36% 14%)":"hsl(152 81% 96%)",fg:e?"hsl(158 64% 52%)":"hsl(160 84% 39%)"},warn:{bg:e?"hsl(36 33% 14%)":"hsl(34 100% 95%)",fg:e?"hsl(38 92% 60%)":"hsl(35 100% 50%)"},error:{bg:e?"hsl(356 33% 16%)":"hsl(356 100% 97%)",fg:e?"hsl(350 89% 65%)":"hsl(350 89% 60%)"},info:{bg:e?"hsl(204 33% 14%)":"hsl(204 100% 97%)",fg:e?"hsl(199 89% 58%)":"hsl(199 89% 48%)"}}),V1={calendar:_e,ticket:tt,check:je};function W1({spec:t,isDark:r,onButtonClick:o}){const a=Array.isArray(t.fields)?t.fields:[],i=Array.isArray(t.actions)?t.actions:[],s=t.status,l=t.icon?V1[t.icon]:null,[c,u]=e.useState(!1),d=String(t.body||"").trim(),p=String(t.details||"").trim(),f=d.length>0&&p.length>d.length+2,g=B1(t.image),m=s&&s.label?H1(r)[s.variant||"success"]:null;return n.jsxs("div",{style:{...z1(r),minWidth:0,overflow:"hidden"},children:[g&&n.jsx("img",{src:g,alt:t.title||"",referrerPolicy:"no-referrer",onError:e=>{e.currentTarget.style.display="none"},style:{display:"block",margin:"-12px -12px 12px",width:"calc(100% + 24px)",height:140,objectFit:"contain",background:r?"rgba(31,41,55,0.4)":"#f9fafb"}}),(t.title||m)&&n.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:8,marginBottom:8},children:[n.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6,minWidth:0},children:[l&&n.jsx(l,{size:14,style:{flexShrink:0,color:r?"#60a5fa":e2}}),t.title&&n.jsx("div",{style:{fontWeight:600,minWidth:0,overflowWrap:"anywhere"},children:t.title})]}),m&&n.jsx("span",{style:{flexShrink:0,borderRadius:999,padding:"1px 8px",fontSize:10,fontWeight:500,background:m.bg,color:m.fg},children:s.label})]}),(d||p)&&n.jsxs("div",{children:[n.jsx("div",{style:{fontSize:12,lineHeight:1.6,whiteSpace:"pre-wrap",wordBreak:"break-word"},children:F1(c?p||d:d||p)}),f&&n.jsx("button",{type:"button",onClick:()=>u(e=>!e),style:{marginTop:4,padding:0,border:"none",background:"none",fontSize:11,fontWeight:500,color:r?"#60a5fa":e2,cursor:"pointer"},children:c?"Show less":"Show more"})]}),a.length>0&&n.jsx("div",{style:{display:"grid",gridTemplateColumns:"auto 1fr",columnGap:12,rowGap:6,marginTop:d||p?12:0},children:a.map((t,o)=>n.jsxs(e.Fragment,{children:[n.jsx("div",{style:{fontSize:11,fontWeight:500,color:r?"#9ca3af":"#6b7280",whiteSpace:"nowrap"},children:t.label}),n.jsx("div",{style:{fontSize:12,minWidth:0,wordBreak:"break-word"},children:"string"==typeof t.value?F1(t.value):t.value})]},o))}),i.length>0&&n.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:8,marginTop:12},children:i.map((e,t)=>{const a="secondary"!==e.variant,i={display:"inline-flex",alignItems:"center",padding:"6px 12px",borderRadius:6,fontSize:11,fontWeight:500,textDecoration:"none",border:"1px solid "+(a?e2:r?"#4b5563":"#d1d5db"),background:a?e2:r?"#1f2937":"#ffffff",color:a?"#ffffff":r?"#e5e7eb":"#374151"},s=ct(e.url);if(s)return n.jsx("a",{href:s,target:"_blank",rel:"noopener noreferrer",style:i,children:e.label},t);const l=e.value||e.label;return n.jsx("button",{type:"button",onClick:o?()=>o(String(l??""),String(e.label??"")):void 0,disabled:!o,title:o?void 0:"Action (no handler wired)",style:{...i,cursor:o?"pointer":"default",opacity:o?1:.5},children:e.label},t)})})]})}function Y1({spec:e,isDark:t,onButtonClick:r,sendValue:o=!1}){const a=Array.isArray(e.buttons)?e.buttons:[];return 0===a.length?null:n.jsxs("div",{style:{margin:"8px 0"},children:[e.title&&n.jsx("div",{style:{fontSize:11,color:t?"#9ca3af":"#6b7280",textTransform:"uppercase",letterSpacing:"0.05em",marginBottom:6},children:e.title}),n.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:6},children:a.map((e,a)=>n.jsx("button",{type:"button",onClick:r?()=>r(String((o?e.value:e.label)||e.label||e.value||""),String(e.label||e.value||"")):void 0,disabled:!r,style:{border:"1px solid "+(t?"#374151":"#d1d5db"),background:t?"#1f2937":"#ffffff",color:t?"#f3f4f6":"#111827",padding:"6px 12px",borderRadius:6,fontSize:12,cursor:r?"pointer":"default",opacity:r?1:.6},children:String(e.label||e.value||"")},a))})]})}function K1(e,t){const n=null==t||"string"==typeof t&&""===t.trim();if(e.required&&n)return`${e.label} is required`;if(n)return null;if("email"===e.type&&"string"==typeof t&&!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(t))return`${e.label} must be a valid email`;if("url"===e.type&&"string"==typeof t)try{new URL(t)}catch{return`${e.label} must be a valid URL`}if("number"===e.type&&"string"==typeof t&&""!==t){const n=Number(t);if(!Number.isFinite(n))return`${e.label} must be a number`;if("number"==typeof e.min&&n<e.min)return`${e.label} must be ≥ ${e.min}`;if("number"==typeof e.max&&n>e.max)return`${e.label} must be ≤ ${e.max}`}if("string"==typeof t){if(null!=e.minLength&&t.length<e.minLength)return`${e.label} must be at least ${e.minLength} characters`;if(null!=e.maxLength&&t.length>e.maxLength)return`${e.label} must be at most ${e.maxLength} characters`;if(e.pattern)try{if(!new RegExp(e.pattern).test(t))return`${e.label} format is invalid`}catch{}}return null}const X1=new Set(["text","email","tel","url","date","time"]);function Z1({field:e,value:t,error:r,onChange:o,isDark:a,autoId:i}){const s={width:"100%",boxSizing:"border-box",border:"1px solid "+(a?r?"#f87171":"#374151":r?"#ef4444":"#d1d5db"),background:a?"#111827":"#ffffff",color:a?"#f3f4f6":"#111827",borderRadius:6,padding:"6px 8px",fontSize:12},l={display:"block",fontSize:12,fontWeight:600,marginBottom:4};if("hidden"===e.type)return null;if("checkbox"===e.type)return n.jsxs("div",{style:{marginBottom:10},children:[n.jsxs("label",{style:{display:"flex",alignItems:"center",gap:6,fontSize:12},children:[n.jsx("input",{id:i,type:"checkbox",checked:Boolean(t),onChange:e=>o(e.target.checked)}),e.label,e.required?" *":""]}),r&&n.jsx("div",{style:{fontSize:11,color:"#ef4444",marginTop:2},children:r})]});if("select"===e.type){const a=Array.isArray(e.options)?e.options:[];return n.jsxs("div",{style:{marginBottom:10},children:[n.jsxs("label",{htmlFor:i,style:l,children:[e.label,e.required?" *":""]}),n.jsxs("select",{id:i,style:s,value:t??"",onChange:e=>o(e.target.value),children:[n.jsx("option",{value:"",disabled:!0,children:e.placeholder||"Select…"}),a.map(e=>n.jsx("option",{value:e.value,children:e.label},e.value))]}),r&&n.jsx("div",{style:{fontSize:11,color:"#ef4444",marginTop:2},children:r})]})}if("radio"===e.type){const a=Array.isArray(e.options)?e.options:[];return n.jsxs("div",{style:{marginBottom:10},children:[n.jsxs("div",{style:l,children:[e.label,e.required?" *":""]}),a.map(e=>n.jsxs("label",{style:{display:"flex",alignItems:"center",gap:6,fontSize:12,marginBottom:2},children:[n.jsx("input",{type:"radio",name:i,checked:t===e.value,onChange:()=>o(e.value)}),e.label]},e.value)),r&&n.jsx("div",{style:{fontSize:11,color:"#ef4444",marginTop:2},children:r})]})}if("textarea"===e.type)return n.jsxs("div",{style:{marginBottom:10},children:[n.jsxs("label",{htmlFor:i,style:l,children:[e.label,e.required?" *":""]}),n.jsx("textarea",{id:i,style:{...s,minHeight:60,resize:"vertical"},value:t??"",placeholder:e.placeholder,onChange:e=>o(e.target.value)}),r&&n.jsx("div",{style:{fontSize:11,color:"#ef4444",marginTop:2},children:r})]});const c=X1.has(e.type)?e.type:"number"===e.type?"number":"text";return n.jsxs("div",{style:{marginBottom:10},children:[n.jsxs("label",{htmlFor:i,style:l,children:[e.label,e.required?" *":""]}),n.jsx("input",{id:i,type:c,style:s,value:t??"",placeholder:e.placeholder,onChange:e=>o(e.target.value)}),e.helpText&&!r&&n.jsx("div",{style:{fontSize:11,color:a?"#9ca3af":"#6b7280",marginTop:2},children:e.helpText}),r&&n.jsx("div",{style:{fontSize:11,color:"#ef4444",marginTop:2},children:r})]})}function Q1({spec:t,isDark:r,onButtonClick:o}){const a=Array.isArray(t.fields)?t.fields:[],i=e.useMemo(()=>{const e={};for(const t of a)void 0!==t.defaultValue?e[t.name]=t.defaultValue:"checkbox"===t.type?e[t.name]=!1:e[t.name]="";return e},[]),[s,l]=e.useState(i),[c,u]=e.useState({}),[d,p]=e.useState(!1),f=void 0!==e.useContext(Ut);if(0===a.length)return null;return d?n.jsxs("div",{style:z1(r),children:[t.title&&n.jsx("div",{style:{fontWeight:600,marginBottom:8},children:t.title}),a.filter(e=>"hidden"!==e.type).map((e,t)=>n.jsxs("div",{style:{marginBottom:4,fontSize:12},children:[n.jsxs("span",{style:{color:r?"#9ca3af":"#6b7280"},children:[e.label,": "]}),n.jsx("span",{children:String(s[e.name]??"")})]},t))]}):n.jsxs("form",{style:z1(r),onSubmit:e=>{if(e.preventDefault(),d||f||!o)return;const n={};let r=!1;for(const e of a){const t=K1(e,s[e.name]);n[e.name]=t,t&&(r=!0)}if(u(n),r)return;p(!0);let i="";try{i=Object.entries(s).filter(([,e])=>null!=e&&""!==String(e)).map(([e,t])=>`${function(e){return String(e).replace(/([a-z])([A-Z])/g,"$1 $2").replace(/[_-]/g," ").replace(/\b\w/g,e=>e.toUpperCase())}(e)}: ${t}`).join("\n")||"Form submitted"}catch{i="Form submitted"}o(i,t.title||"Form")},noValidate:!0,children:[t.title&&n.jsx("div",{style:{fontWeight:600,marginBottom:4},children:t.title}),t.description&&n.jsx("div",{style:{fontSize:12,color:r?"#9ca3af":"#6b7280",marginBottom:8},children:t.description}),a.map((e,t)=>n.jsx(Z1,{field:e,value:s[e.name],error:c[e.name],onChange:t=>((e,t)=>{l(n=>({...n,[e]:t})),u(t=>t[e]?{...t,[e]:null}:t)})(e.name,t),isDark:r,autoId:`a2ui-form-${e.name||t}`},e.name||t)),n.jsx("button",{type:"submit",disabled:!o||f,style:{border:"1px solid "+(r?"#374151":"#d1d5db"),background:o&&!f?"#2563eb":r?"#1f2937":"#f3f4f6",color:o&&!f?"#ffffff":r?"#6b7280":"#9ca3af",padding:"6px 14px",borderRadius:6,fontSize:12,cursor:o&&!f?"pointer":"default"},children:f?"Submitted":t.submitLabel||"Submit"})]})}function J1({spec:t,isDark:r,onButtonClick:o}){const a=Array.isArray(t.choices)&&t.choices.length>0?t.choices:[t.yes||{label:"Yes",value:"yes"},t.no||{label:"No",value:"no"}],i=e.useContext(Ut),[s,l]=e.useState(null),c=e.useRef(!1),u=s??function(e,t){if(null==t)return null;const n=zt(t);if(!n)return null;const r=(e||[]).find(e=>zt(e?.value)===n||zt(e?.label)===n);return r?String(r.value??r.label??""):null}(a,i),d=null!==u||void 0!==i,p=d?a.map(e=>String(e?.value??e?.label??"")===u?{...e,label:`${String(e.label??e.value??"")} ✓`}:e):a,f=o?(e,t)=>{c.current||d||(c.current=!0,l(String(e)),o(e,t))}:void 0;return n.jsxs("div",{style:z1(r),children:[t.title&&n.jsx("div",{style:{fontWeight:600,marginBottom:6},children:t.title}),t.body&&n.jsx("div",{style:{fontSize:12,lineHeight:1.6,marginBottom:8,whiteSpace:"pre-wrap",wordBreak:"break-word"},children:F1(String(t.body))}),n.jsx(Y1,{spec:{buttons:p},isDark:r,onButtonClick:d?void 0:f,sendValue:!0})]})}const e2="#2563eb";function t2(e){return{display:"inline-flex",alignItems:"center",borderRadius:999,padding:"2px 8px",fontSize:10,fontWeight:600,background:e?"rgba(37,99,235,0.20)":"#eff6ff",color:e?"#93c5fd":"#1d4ed8"}}function n2(e,t){return{display:"inline-flex",alignItems:"center",justifyContent:"center",padding:"6px 12px",borderRadius:6,fontSize:12,fontWeight:600,border:"none",background:e2,color:"#ffffff",cursor:t?"default":"pointer",opacity:t?.5:1}}function r2(e,t){return{display:"inline-flex",alignItems:"center",justifyContent:"center",padding:"6px 12px",borderRadius:6,fontSize:12,fontWeight:600,border:"1px solid "+(e?"#374151":"#d1d5db"),background:e?"#1f2937":"#ffffff",color:e?"#f3f4f6":"#111827",textDecoration:"none",cursor:t?"default":"pointer",opacity:t?.5:1}}function o2({score:e,maxScore:t=5,size:r=14,isDark:o}){const a=[];for(let i=0;i<t;i+=1){const t=e>=i+1,s=!t&&e>i&&e<i+1;a.push(n.jsxs("svg",{width:r,height:r,viewBox:"0 0 24 24",fill:t?"#fbbf24":s?`url(#a2ui-half-star-${i})`:"none",stroke:t||s?"#fbbf24":o?"#4b5563":"#d1d5db",strokeWidth:"1.5",children:[s&&n.jsx("defs",{children:n.jsxs("linearGradient",{id:`a2ui-half-star-${i}`,children:[n.jsx("stop",{offset:"50%",stopColor:"#fbbf24"}),n.jsx("stop",{offset:"50%",stopColor:"transparent"})]})}),n.jsx("polygon",{points:"12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2"})]},i))}return n.jsx("div",{style:{display:"flex",alignItems:"center",gap:1},children:a})}function a2({spec:e,isDark:t,onButtonClick:r}){const o=Array.isArray(e.items)?e.items:[];if(0===o.length)return null;const a=t?"1px solid #374151":"1px solid #e5e7eb",i=t?"#9ca3af":"#6b7280";return n.jsxs("div",{style:{margin:"8px 0"},children:[(e.title||e.subtitle)&&n.jsxs("div",{style:{marginBottom:8},children:[e.title&&n.jsx("div",{style:{fontSize:13,fontWeight:700},children:e.title}),e.subtitle&&n.jsx("div",{style:{fontSize:11,color:i},children:e.subtitle})]}),n.jsx("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(160px, 1fr))",gap:10},children:o.map((e,o)=>n.jsxs("div",{style:{border:a,borderRadius:10,overflow:"hidden",background:t?"#1f2937":"#ffffff",display:"flex",flexDirection:"column"},children:[B1(e.image)&&n.jsx("img",{src:B1(e.image),alt:e.name||"",referrerPolicy:"no-referrer",onError:e=>{e.currentTarget.style.display="none"},style:{height:96,width:"100%",objectFit:"cover",background:t?"#111827":"#f9fafb"}}),n.jsxs("div",{style:{padding:10,display:"flex",flexDirection:"column",gap:6,flex:1},children:[n.jsxs("div",{style:{display:"flex",justifyContent:"space-between",gap:6,alignItems:"flex-start"},children:[n.jsx("div",{style:{fontSize:12,fontWeight:700,minWidth:0},children:e.name}),e.price&&n.jsx("div",{style:{fontSize:12,fontWeight:700,color:e2,flexShrink:0},children:e.price})]}),e.description&&n.jsx("div",{style:{fontSize:11,color:i,lineHeight:1.4},children:e.description}),Array.isArray(e.tags)&&e.tags.length>0&&n.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:4},children:e.tags.map((e,r)=>n.jsx("span",{style:t2(t),children:e},r))}),n.jsx("div",{style:{flex:1}}),e.actionLabel&&n.jsx("button",{type:"button",onClick:r?()=>r(String(e.value??e.actionLabel),String(e.actionLabel)):void 0,disabled:!r,style:{...n2(0,!r),alignSelf:"flex-start",marginTop:4},children:e.actionLabel})]})]},o))})]})}function i2({spec:e,isDark:t,onButtonClick:r}){const o=Array.isArray(e.tags)?e.tags:[],a=Array.isArray(e.actions)?e.actions:[],i=t?"#9ca3af":"#6b7280";return n.jsxs("div",{style:z1(t),children:[n.jsxs("div",{style:{display:"flex",gap:10,alignItems:"flex-start"},children:[n.jsx("div",{style:{flexShrink:0,height:44,width:44,borderRadius:"50%",overflow:"hidden",background:t?"rgba(37,99,235,0.20)":"#eff6ff",color:t?"#93c5fd":e2,display:"flex",alignItems:"center",justifyContent:"center",fontWeight:700,fontSize:16},children:B1(e.avatar)?n.jsx("img",{src:B1(e.avatar),alt:e.name||"",referrerPolicy:"no-referrer",onError:e=>{e.currentTarget.style.display="none"},style:{height:"100%",width:"100%",objectFit:"cover"}}):String(e.name||"").charAt(0).toUpperCase()}),n.jsxs("div",{style:{minWidth:0,flex:1},children:[n.jsx("div",{style:{fontSize:13,fontWeight:700},children:e.name}),e.role&&n.jsx("div",{style:{fontSize:11,color:i},children:e.role}),"number"==typeof e.rating&&n.jsxs("div",{style:{marginTop:4,display:"flex",alignItems:"center",gap:6},children:[n.jsx(o2,{score:e.rating,size:11,isDark:t}),n.jsxs("span",{style:{fontSize:10,color:i},children:[e.rating.toFixed(1),"number"==typeof e.reviewCount?` (${e.reviewCount})`:""]})]})]})]}),o.length>0&&n.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:4,marginTop:8},children:o.map((e,r)=>n.jsx("span",{style:t2(t),children:e},r))}),e.bio&&n.jsx("div",{style:{marginTop:8,fontSize:12,lineHeight:1.5},children:e.bio}),a.length>0&&n.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:6,marginTop:10},children:a.map((e,o)=>{const a="secondary"!==e.variant,i=ct(e.url);if(i)return n.jsx("a",{href:i,target:"_blank",rel:"noopener noreferrer",style:r2(t,!1),children:e.label},o);const s=e.value||e.label;return n.jsx("button",{type:"button",onClick:r?()=>r(String(s),String(e.label)):void 0,disabled:!r,style:a?n2(0,!r):r2(t,!r),children:e.label},o)})})]})}function s2({spec:e,isDark:t}){const r=Array.isArray(e.steps)?e.steps:[];if(0===r.length)return null;const o=t?"#374151":"#e5e7eb",a=t?"#6b7280":"#9ca3af",i=e=>"done"===e?{background:"#10b981",border:"2px solid #10b981"}:"active"===e?{background:e2,border:`2px solid ${e2}`,boxShadow:t?"0 0 0 4px rgba(37,99,235,0.25)":"0 0 0 4px #dbeafe"}:{background:t?"#1f2937":"#ffffff",border:"2px solid "+(t?"#4b5563":"#d1d5db")};return n.jsxs("div",{style:z1(t),children:[e.title&&n.jsx("div",{style:{fontWeight:700,fontSize:13,marginBottom:10},children:e.title}),n.jsx("div",{children:r.map((e,s)=>{const l=e.status||(0===s?"done":"pending"),c=s===r.length-1;return n.jsxs("div",{style:{display:"flex",gap:10},children:[n.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"center"},children:[n.jsx("div",{style:{height:12,width:12,borderRadius:"50%",flexShrink:0,...i(l)}}),!c&&n.jsx("div",{style:{width:1,flex:1,background:o,minHeight:16,margin:"2px 0"}})]}),n.jsxs("div",{style:{minWidth:0,flex:1,paddingBottom:c?0:12},children:[n.jsxs("div",{style:{display:"flex",justifyContent:"space-between",gap:6},children:[n.jsx("span",{style:{fontSize:12,fontWeight:600,color:"pending"===l?a:t?"#f3f4f6":"#111827"},children:e.label}),e.timestamp&&n.jsx("span",{style:{fontSize:10,color:a,flexShrink:0},children:e.timestamp})]}),e.description&&n.jsx("div",{style:{fontSize:11,color:t?"#9ca3af":"#6b7280",marginTop:2},children:e.description})]})]},s)})})]})}function l2({spec:e,isDark:t}){const r=e.maxScore||5,o=t?"#9ca3af":"#6b7280";return n.jsxs("div",{style:z1(t),children:[e.title&&n.jsx("div",{style:{fontSize:11,textTransform:"uppercase",letterSpacing:"0.05em",color:o,marginBottom:4},children:e.title}),n.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8},children:[n.jsx("span",{style:{fontSize:22,fontWeight:700},children:Number(e.score).toFixed(1)}),n.jsx(o2,{score:e.score,maxScore:r,size:15,isDark:t}),"number"==typeof e.reviewCount&&n.jsxs("span",{style:{fontSize:11,color:o},children:["(",e.reviewCount," review",1===e.reviewCount?"":"s",")"]})]}),e.review&&n.jsxs("div",{style:{marginTop:8,borderLeft:"2px solid "+(t?"#1e40af":"#bfdbfe"),paddingLeft:10,fontSize:12,fontStyle:"italic",color:t?"#d1d5db":"#374151",lineHeight:1.5},children:['"',e.review,'"',e.author&&n.jsxs("div",{style:{marginTop:4,fontStyle:"normal",fontSize:10,color:o},children:["- ",e.author]})]})]})}function c2({spec:e,isDark:t,onButtonClick:r}){const o=Array.isArray(e.plans)?e.plans:[];if(0===o.length)return null;const a=t?"#9ca3af":"#6b7280";return n.jsxs("div",{style:{margin:"8px 0"},children:[e.title&&n.jsx("div",{style:{fontWeight:700,fontSize:13,marginBottom:8},children:e.title}),n.jsx("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(150px, 1fr))",gap:10},children:o.map((e,o)=>n.jsxs("div",{style:{border:e.highlight?`1px solid ${e2}`:"1px solid "+(t?"#374151":"#e5e7eb"),background:e.highlight?t?"rgba(37,99,235,0.10)":"#eff6ff":t?"#1f2937":"#ffffff",borderRadius:10,padding:12,display:"flex",flexDirection:"column"},children:[e.highlight&&n.jsx("span",{style:{alignSelf:"flex-start",marginBottom:6,background:e2,color:"#ffffff",fontSize:9,fontWeight:700,padding:"2px 7px",borderRadius:999},children:"Recommended"}),n.jsx("div",{style:{fontSize:13,fontWeight:700},children:e.name}),e.price&&n.jsxs("div",{style:{marginTop:2,display:"flex",alignItems:"baseline",gap:3},children:[n.jsx("span",{style:{fontSize:18,fontWeight:700},children:e.price}),e.period&&n.jsxs("span",{style:{fontSize:11,color:a},children:["/",e.period]})]}),Array.isArray(e.features)&&e.features.length>0&&n.jsx("ul",{style:{listStyle:"none",padding:0,margin:"8px 0 0",display:"flex",flexDirection:"column",gap:6,flex:1},children:e.features.map((e,r)=>n.jsxs("li",{style:{display:"flex",gap:6,alignItems:"flex-start",fontSize:11,color:t?"#d1d5db":"#374151"},children:[n.jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"#10b981",strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round",style:{marginTop:2,flexShrink:0},children:n.jsx("polyline",{points:"20 6 9 17 4 12"})}),n.jsx("span",{children:e})]},r))}),e.actionLabel&&n.jsx("button",{type:"button",onClick:r?()=>r(String(e.value??e.actionLabel),String(e.actionLabel)):void 0,disabled:!r,style:{...e.highlight?n2(0,!r):r2(t,!r),marginTop:10},children:e.actionLabel})]},o))})]})}function u2({spec:e,isDark:t}){const r=Array.isArray(e.images)?e.images:[];if(0===r.length)return null;const o=t?"#9ca3af":"#6b7280";return n.jsxs("div",{style:{margin:"8px 0"},children:[e.title&&n.jsx("div",{style:{fontWeight:700,fontSize:13,marginBottom:8},children:e.title}),n.jsx("div",{className:"slim-scrollbar-x",style:{display:"flex",gap:8,overflowX:"auto",paddingBottom:4},children:r.map((e,r)=>{return n.jsxs("figure",{style:{flexShrink:0,width:140,margin:0,borderRadius:8,overflow:"hidden",border:"1px solid "+(t?"#374151":"#e5e7eb"),background:t?"#111827":"#f9fafb"},children:[(a=e.url,!(void 0!==ct(a)&&void 0===B1(a))&&n.jsx("img",{src:B1(e.url),alt:e.caption||`Image ${r+1}`,referrerPolicy:"no-referrer",onError:e=>{e.currentTarget.style.display="none"},style:{height:96,width:"100%",objectFit:"cover"}})),e.caption&&n.jsx("figcaption",{style:{padding:"5px 8px",fontSize:10,color:o,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:e.caption})]},r);var a})})]})}const d2=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],p2=/(^|[_\W])(price|salary|cost|amount|revenue|expense|total|value|budget|spend|income|sale|balance)/i,f2=/(^|[_\W])month/i;function g2(e){if(null==e)return"";const t=String(e);return t?t.replace(/[_\-]+/g," ").replace(/([a-z])([A-Z])/g,"$1 $2").replace(/\s+/g," ").trim().split(" ").map(e=>e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()).join(" "):""}const m2=/^(\d{4})-(\d{2})(?:-\d{2})?(?:[T\s]|$)/;function h2(e,t){if("string"==typeof t&&f2.test(t)){const t="number"==typeof e?e:Number(e);if(Number.isInteger(t)&&t>=1&&t<=12)return d2[t-1]}const n=function(e){if("string"!=typeof e)return null;const t=e.match(m2);if(!t)return null;const n=parseInt(t[1],10),r=parseInt(t[2],10);return!Number.isInteger(r)||r<1||r>12?null:`${d2[r-1]} '${String(n).slice(-2)}`}(e);return n||g2(e)}const b2=/^[a-z]+(_[a-z]+)+$/;const y2=/^-?\d+(\.\d+)?$/,v2=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],w2=/^\d{4}-\d{2}-\d{2}([T ]\d{2}:\d{2}(:\d{2})?(\.\d+)?(Z|[+-]\d{2}:?\d{2})?)?$/;function S2(e){return Number.isInteger(e)?e.toLocaleString("en-US"):Number(e.toFixed(2)).toLocaleString("en-US")}function x2(e,t){if(null==e)return"";if("number"==typeof e)return S2(e);if("object"==typeof e)return JSON.stringify(e);const n=String(e).trim(),r=function(e){if("string"!=typeof e)return null;const t=e.trim();if(!w2.test(t))return null;const n=/[T ]\d{2}:\d{2}/.test(t),r=/(Z|[+-]\d{2}:?\d{2})$/.test(t),o=n&&!r?`${t.replace(" ","T")}Z`:t,a=new Date(o);if(isNaN(a.getTime()))return null;const i=n&&(0!==a.getUTCHours()||0!==a.getUTCMinutes()||0!==a.getUTCSeconds()),s=`${v2[a.getUTCMonth()]} ${a.getUTCDate()}, ${a.getUTCFullYear()}`;if(!i)return s;const l=a.getUTCHours(),c=l>=12?"PM":"AM";return`${s}, ${l%12||12}:${String(a.getUTCMinutes()).padStart(2,"0")} ${c}`}(n);if(r)return r;if("string"==typeof(o=t)&&p2.test(o)&&y2.test(n)){const e=Number(n);if(Number.isFinite(e))return S2(e)}var o,a;return"string"!=typeof(a=e)?String(a??""):a.length>40?a:b2.test(a)?g2(a):a}function E2({size:e=14}){return n.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[n.jsx("polyline",{points:"22 7 13.5 15.5 8.5 10.5 2 17"}),n.jsx("polyline",{points:"16 7 22 7 22 13"})]})}function k2({size:e=14}){return n.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[n.jsx("path",{d:"M16 16c0-1.7-2-3-2-3"}),n.jsx("path",{d:"M8 16c0-1.7 2-3 2-3"}),n.jsx("path",{d:"M7 21h10"}),n.jsx("path",{d:"M12 3v18"}),n.jsx("path",{d:"m17 7 5 9h-10z"}),n.jsx("path",{d:"m7 7-5 9h10z"})]})}function A2({size:e=14}){return n.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[n.jsx("circle",{cx:"5",cy:"6",r:"3"}),n.jsx("circle",{cx:"19",cy:"18",r:"3"}),n.jsx("path",{d:"M12 6h5a2 2 0 0 1 2 2v7"}),n.jsx("path",{d:"M12 18H7a2 2 0 0 1-2-2V9"})]})}function T2({size:e=14}){return n.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:n.jsx("polygon",{points:"13 2 3 14 12 14 11 22 21 10 12 10 13 2"})})}function O2({size:e=14}){return n.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[n.jsx("path",{d:"M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5"}),n.jsx("path",{d:"M9 18h6"}),n.jsx("path",{d:"M10 22h4"})]})}function C2({size:e=14}){return n.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[n.jsx("circle",{cx:"12",cy:"12",r:"10"}),n.jsx("circle",{cx:"12",cy:"12",r:"6"}),n.jsx("circle",{cx:"12",cy:"12",r:"2"})]})}function I2({type:e,icon:t,title:r,count:o,isDark:a,children:i}){const{accent:s,iconBg:l,iconFg:c}=function(e,t){const n={"revenue-insights":t?["#10b981","#064e3b","#a7f3d0"]:["#10b981","#ecfdf5","#065f46"],"impact-analysis":t?["#f59e0b","#78350f","#fde68a"]:["#f59e0b","#fef3c7","#92400e"],"deviation-analysis":t?["#3b82f6","#1e3a8a","#bfdbfe"]:["#3b82f6","#dbeafe","#1e40af"],"main-drivers":t?["#8b5cf6","#4c1d95","#ddd6fe"]:["#8b5cf6","#ede9fe","#5b21b6"],"key-observations":t?["#059669","#064e3b","#a7f3d0"]:["#059669","#f0fdf4","#14532d"],recommendations:t?["#818cf8","#312e81","#c7d2fe"]:["#4f46e5","#eef2ff","#4f46e5"]},[r,o,a]=n[e]||["#64748b","#f1f5f9","#475569"];return{accent:r,iconBg:o,iconFg:a}}(e,a),u=a?"1px solid #374151":"1px solid #e5e7eb";return n.jsxs("div",{style:{background:a?"#1f2937":"#ffffff",border:u,borderRadius:12,overflow:"hidden",margin:"8px 0",color:a?"#f3f4f6":"#0f172a"},children:[n.jsx("div",{style:{height:4,background:s}}),n.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:8,padding:"12px 14px 10px",borderBottom:u},children:[n.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,fontSize:13,fontWeight:700},children:[n.jsx("span",{style:{display:"inline-flex",alignItems:"center",justifyContent:"center",width:22,height:22,borderRadius:6,background:l,color:c},children:t}),r]}),null!=o&&n.jsx("div",{style:{fontSize:11,color:a?"#9ca3af":"#64748b",fontVariantNumeric:"tabular-nums"},children:o})]}),n.jsx("div",{style:{padding:"12px 14px 14px",fontSize:13,lineHeight:1.55},children:i})]})}function N2({delta:e,isDark:t}){if(!e)return null;const r=function(e){const t=String(e||"").trim();return t?t.startsWith("+")?"up":t.startsWith("-")||t.startsWith("−")?"dn":"flat":"flat"}(e),o=(t?{up:{bg:"#064e3b",fg:"#a7f3d0"},dn:{bg:"#7f1d1d",fg:"#fecaca"},flat:{bg:"#1f2937",fg:"#9ca3af"}}:{up:{bg:"#dcfce7",fg:"#166534"},dn:{bg:"#fee2e2",fg:"#991b1b"},flat:{bg:"#f1f5f9",fg:"#64748b"}})[r];return n.jsx("span",{style:{fontSize:9,fontWeight:600,padding:"1px 5px",borderRadius:3,marginLeft:4,background:o.bg,color:o.fg},children:e})}function R2({items:e,isDark:t}){if(!e||!e.length)return null;const r=t?"1px solid #374151":"1px solid #e5e7eb",o=t?"#9ca3af":"#64748b",a=t?"#f3f4f6":"#0f172a",i=t?"#111827":"#f8fafc";return n.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:6,marginTop:4},children:e.map((e,s)=>n.jsxs("span",{style:{display:"inline-flex",alignItems:"baseline",gap:4,fontSize:11,lineHeight:1,padding:"5px 8px",borderRadius:6,background:i,border:r},children:[e.label&&n.jsxs("span",{style:{color:o},children:[e.label,":"]}),n.jsx("span",{style:{fontWeight:700,color:a,fontVariantNumeric:"tabular-nums"},children:e.value}),n.jsx(N2,{delta:e.delta,isDark:t})]},s))})}function _2({spec:e,isDark:t}){const r=Array.isArray(e.totals)?e.totals:[],o=t?"#9ca3af":"#64748b";return n.jsxs(I2,{type:"revenue-insights",icon:n.jsx(E2,{}),title:e.title||"Revenue insights",count:null,isDark:t,children:[e.headline&&n.jsx("div",{style:{fontSize:18,fontWeight:700,marginBottom:4},children:e.headline}),e.narrative&&n.jsx("div",{style:{color:o,marginBottom:r.length?8:0},children:e.narrative}),r.length>0&&n.jsx("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(140px, 1fr))",gap:8,marginTop:8},children:r.map((e,r)=>n.jsxs("div",{style:{background:t?"#111827":"#f8fafc",border:t?"1px solid #374151":"1px solid #e5e7eb",borderRadius:8,padding:"8px 10px"},children:[n.jsx("div",{style:{fontSize:11,color:o},children:e.label}),n.jsxs("div",{style:{fontSize:16,fontWeight:700,fontVariantNumeric:"tabular-nums"},children:[e.value,n.jsx(N2,{delta:e.delta,isDark:t})]})]},r))})]})}function P2({items:e,sentiment:t,isDark:r}){if(!e||0===e.length)return null;const o="positive"===t?"Positive impact":"negative"===t?"Negative impact":"Neutral",a=r?"#9ca3af":"#64748b",i="positive"===t?{bg:r?"rgba(16,185,129,0.10)":"#f0fdf4",bd:r?"rgba(52,211,153,0.30)":"#bbf7d0",tx:r?"#a7f3d0":"#14532d",dot:r?"#34d399":"#10b981"}:"negative"===t?{bg:r?"rgba(239,68,68,0.10)":"#fef2f2",bd:r?"rgba(248,113,113,0.30)":"#fecaca",tx:r?"#fecaca":"#7f1d1d",dot:r?"#f87171":"#ef4444"}:{bg:r?"#111827":"#f8fafc",bd:r?"#374151":"#e2e8f0",tx:r?"#f3f4f6":"#0f172a",dot:r?"#9ca3af":"#94a3b8"};return n.jsxs("div",{children:[n.jsx("div",{style:{fontSize:11,fontWeight:700,textTransform:"uppercase",letterSpacing:"0.4px",color:a,margin:"10px 0 6px"},children:o}),e.map((e,t)=>n.jsxs("div",{style:{background:i.bg,border:`1px solid ${i.bd}`,borderRadius:8,padding:"8px 10px",margin:"4px 0",color:i.tx},children:[n.jsxs("div",{style:{fontWeight:700,display:"block",marginBottom:2},children:[n.jsx("span",{style:{display:"inline-block",width:7,height:7,borderRadius:"50%",background:i.dot,marginRight:6,verticalAlign:"middle"}}),e.title]}),n.jsx("div",{children:e.description}),n.jsx(R2,{items:e.metrics,isDark:r})]},t))]})}function L2({spec:e,isDark:t}){return n.jsxs(I2,{type:"impact-analysis",icon:n.jsx(k2,{}),title:e.title||"Impact analysis",count:null,isDark:t,children:[n.jsx(P2,{items:e.positive,sentiment:"positive",isDark:t}),n.jsx(P2,{items:e.negative,sentiment:"negative",isDark:t}),n.jsx(P2,{items:e.neutral,sentiment:"neutral",isDark:t})]})}function D2({spec:e,isDark:t}){const r=Array.isArray(e.deviations)?e.deviations:[],o=t?"1px solid #374151":"1px solid #e5e7eb",a=t?"#9ca3af":"#64748b",i=t?"#f3f4f6":"#0f172a";return n.jsxs(I2,{type:"deviation-analysis",icon:n.jsx(A2,{}),title:e.title||"Deviation analysis",count:null,isDark:t,children:[0===r.length?n.jsx("div",{style:{color:a,fontSize:12,padding:"14px 0",textAlign:"center"},children:"No deviations"}):n.jsx("div",{style:{overflowX:"auto"},children:n.jsxs("table",{style:{width:"100%",borderCollapse:"collapse",fontSize:12},children:[n.jsx("thead",{children:n.jsx("tr",{children:["Segment","Metric","Expected","Actual","Delta"].map(e=>n.jsx("th",{style:{padding:"7px 10px",borderBottom:o,textAlign:"left",fontSize:11,color:a,fontWeight:600,textTransform:"uppercase",letterSpacing:"0.3px"},children:e},e))})}),n.jsx("tbody",{children:r.map((e,r)=>{return n.jsxs("tr",{children:[n.jsx("td",{style:{padding:"7px 10px",borderBottom:o,color:i},children:e.segment}),n.jsx("td",{style:{padding:"7px 10px",borderBottom:o,color:i},children:e.metric}),n.jsx("td",{style:{padding:"7px 10px",borderBottom:o,color:i,fontVariantNumeric:"tabular-nums"},children:e.expected}),n.jsx("td",{style:{padding:"7px 10px",borderBottom:o,color:i,fontVariantNumeric:"tabular-nums"},children:e.actual}),n.jsx("td",{style:{padding:"7px 10px",borderBottom:o,color:(a=e.tone,"up"===a?t?"#34d399":"#15803d":"dn"===a?t?"#f87171":"#b91c1c":t?"#9ca3af":"#64748b"),fontWeight:700,fontVariantNumeric:"tabular-nums"},children:e.delta})]},r);var a})})]})}),e.summary&&n.jsx("div",{style:{background:t?"#111827":"#f8fafc",border:o,borderRadius:6,padding:"8px 10px",marginTop:10,fontSize:12,color:i},children:e.summary})]})}function M2({spec:e,isDark:t}){const r=Array.isArray(e.secondary)?e.secondary:[],o=t?"#9ca3af":"#64748b",a=t?"#9ca3af":"#64748b",i=e.primary;return n.jsxs(I2,{type:"main-drivers",icon:n.jsx(T2,{}),title:e.title||"Main drivers",count:null,isDark:t,children:[i&&n.jsxs("div",{style:{background:t?"rgba(139,92,246,0.10)":"#faf5ff",border:t?"1px solid rgba(167,139,250,0.30)":"1px solid #d8b4fe",borderRadius:8,padding:"10px 12px",marginBottom:r.length?10:0},children:[n.jsx("div",{style:{fontSize:10,fontWeight:700,textTransform:"uppercase",letterSpacing:"0.4px",color:t?"#c4b5fd":"#7c3aed",marginBottom:4},children:"Primary driver"}),n.jsx("div",{style:{fontWeight:600},children:i.factor}),i.evidence&&n.jsx("div",{style:{color:o,fontSize:12,marginTop:4},children:i.evidence}),i.metric&&n.jsxs("span",{style:{display:"inline-block",marginTop:6,background:t?"rgba(139,92,246,0.20)":"#ede9fe",color:t?"#ddd6fe":"#5b21b6",fontSize:11,fontWeight:600,padding:"2px 7px",borderRadius:6},children:[i.metric.label,": ",i.metric.value]})]}),r.length>0&&n.jsxs(n.Fragment,{children:[n.jsx("div",{style:{fontSize:11,fontWeight:700,textTransform:"uppercase",letterSpacing:"0.4px",color:a,margin:"10px 0 6px"},children:"Secondary drivers"}),n.jsx("ul",{style:{paddingLeft:20,margin:0},children:r.map((e,t)=>n.jsxs("li",{style:{marginBottom:6},children:[n.jsx("div",{style:{fontWeight:600},children:e.factor}),e.evidence&&n.jsx("div",{style:{color:o,fontSize:12,marginTop:2},children:e.evidence})]},t))})]})]})}function j2({rankBgFg:e,rank:t,chips:r,text:o,narrative:a,metrics:i,impactPill:s,isDark:l}){const c=l?"#9ca3af":"#64748b",u=l?"1px dashed #374151":"1px dashed #e5e7eb";return n.jsxs("div",{style:{display:"flex",gap:10,alignItems:"flex-start",padding:"10px 0",borderBottom:u},children:[n.jsx("div",{style:{flex:"0 0 22px",height:22,width:22,borderRadius:"50%",fontSize:11,fontWeight:700,display:"flex",alignItems:"center",justifyContent:"center",fontVariantNumeric:"tabular-nums",background:e.bg,color:e.fg},children:t}),n.jsxs("div",{style:{flex:"1 1 auto",minWidth:0,display:"flex",flexDirection:"column",gap:5},children:[r,o&&n.jsx("div",{style:{fontSize:13,fontWeight:600},children:o}),a&&n.jsx("div",{style:{fontSize:12,color:c},children:a}),n.jsx(R2,{items:i,isDark:l}),s]})]})}function F2({spec:e,isDark:t}){const r=Array.isArray(e.items)?[...e.items].sort((e,t)=>(e.rank||0)-(t.rank||0)):[],o=t?{bg:"#064e3b",fg:"#a7f3d0"}:{bg:"#f0fdf4",fg:"#14532d"};return n.jsx(I2,{type:"key-observations",icon:n.jsx(O2,{}),title:e.title||"Key observations",count:r.length?`${r.length} item${1===r.length?"":"s"}`:null,isDark:t,children:0===r.length?n.jsx("div",{style:{color:t?"#9ca3af":"#64748b",fontSize:12,padding:"14px 0",textAlign:"center"},children:"No observations available."}):r.map((e,r)=>{const a=[];return e.category&&a.push(n.jsx("span",{style:U2("cat",t),children:e.category},"cat")),e.priority&&a.push(n.jsx("span",{style:U2("prio-"+e.priority,t),children:e.priority},"prio")),n.jsx(j2,{rankBgFg:o,rank:e.rank||r+1,chips:a.length?n.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:5},children:a}):null,text:e.text,narrative:e.narrative,metrics:e.metrics,impactPill:null,isDark:t},r)})})}function B2({spec:e,isDark:t}){const r=Array.isArray(e.items)?[...e.items].sort((e,t)=>(e.rank||0)-(t.rank||0)):[],o=t?{bg:"#312e81",fg:"#c7d2fe"}:{bg:"#4f46e5",fg:"#ffffff"};return n.jsx(I2,{type:"recommendations",icon:n.jsx(C2,{}),title:e.title||"Recommendations",count:r.length?`${r.length} item${1===r.length?"":"s"}`:null,isDark:t,children:0===r.length?n.jsx("div",{style:{color:t?"#9ca3af":"#64748b",fontSize:12,padding:"14px 0",textAlign:"center"},children:"No recommendations available."}):r.map((e,r)=>{const a=(e.affected_segments||[]).map((e,r)=>n.jsx("span",{style:U2("seg",t),children:e},r)),i=e.expected_impact?n.jsxs("span",{style:{alignSelf:"flex-start",display:"inline-flex",alignItems:"center",gap:4,marginTop:2,background:t?"rgba(16,185,129,0.18)":"#dcfce7",color:t?"#a7f3d0":"#166534",fontSize:10,fontWeight:700,padding:"4px 9px",borderRadius:999,border:t?"1px solid rgba(52,211,153,0.30)":"1px solid #bbf7d0"},children:["↑ ",e.expected_impact]}):null;return n.jsx(j2,{rankBgFg:o,rank:e.rank||r+1,chips:a.length?n.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:5},children:a}):null,text:e.action,narrative:e.rationale,metrics:e.metrics,impactPill:i,isDark:t},r)})})}function U2(e,t){const n={display:"inline-flex",alignItems:"center",fontSize:10,fontWeight:600,lineHeight:1,padding:"3px 7px",borderRadius:999,border:t?"1px solid #374151":"1px solid #e5e7eb",background:t?"#111827":"#f8fafc",color:t?"#9ca3af":"#64748b"};return"cat"===e?{...n,background:t?"rgba(99,102,241,0.20)":"#eef2ff",color:t?"#c7d2fe":"#4f46e5",border:"1px solid transparent"}:"seg"===e?{...n,background:t?"#1f2937":"#f1f5f9",color:t?"#f3f4f6":"#0f172a"}:"prio-high"===e?{...n,background:t?"rgba(239,68,68,0.18)":"#fef2f2",color:t?"#fecaca":"#7f1d1d",border:t?"1px solid rgba(248,113,113,0.30)":"1px solid #fecaca"}:"prio-medium"===e?{...n,background:t?"rgba(99,102,241,0.20)":"#eef2ff",color:t?"#c7d2fe":"#4f46e5",border:"1px solid transparent"}:n}const z2=/\[([\d०-९][\d०-९\s,]*)\](?!\()/g,$2={"०":"0","१":"1","२":"2","३":"3","४":"4","५":"5","६":"6","७":"7","८":"8","९":"9"};function G2(e){const t=[];for(const n of function(e){return e.replace(/[०-९]/g,e=>$2[e]??e)}(e).split(",")){const e=n.trim();if(/^\d+$/.test(e)){const n=parseInt(e,10);n>=1&&t.push(n)}}return t}function q2(e){const t=new Set,n=[];for(const r of e)t.has(r)||(t.add(r),n.push(r));return n}const H2=/(\s*)((?:\[[\d०-९][\d०-९\s,]*\](?!\()\s*)+)([.!?])/g;function V2(e){if(!e)return[];e=function(e){return e.replace(H2,(e,t,n,r)=>r+" "+n.replace(/\s+$/,""))}(e);const t=[];let n;for(z2.lastIndex=0;null!==(n=z2.exec(e));){const e=G2(n[1]);0!==e.length&&t.push({start:n.index,end:z2.lastIndex,indices:e})}if(0===t.length)return[{type:"text",value:e}];const r=[];for(const n of t){const t=r.length?r[r.length-1]:null;t&&/^\s*$/.test(e.slice(t.end,n.start))?(t.end=n.end,t.indices.push(...n.indices)):r.push({start:n.start,end:n.end,indices:[...n.indices]})}const o=[];let a=0;for(const t of r)t.start>a&&o.push({type:"text",value:e.slice(a,t.start)}),o.push({type:"cite",indices:q2(t.indices)}),a=t.end;return a<e.length&&o.push({type:"text",value:e.slice(a)}),o}function W2(){return e=>{Mn(e,"text",(e,t,n)=>{if(null==t||null==n)return;if("element"===n.type&&("code"===n.tagName||"pre"===n.tagName))return;const r=V2(e.value);if(1===r.length&&"text"===r[0].type)return;const o=r.map((e,t)=>{if("text"===e.type){return{type:"text",value:t+1<r.length&&"cite"===r[t+1].type?e.value.replace(/[ \t]+$/," "):e.value}}return{type:"element",tagName:"span",properties:{dataEshalCitation:(n=e.indices,n.join(","))},children:[]};var n});return n.children.splice(t,1,...o),[Ln,t+o.length]})}}function Y2(e){if(!e)return!1;const t=e.source_type,n=e.url;return"file"===t||"string"==typeof n&&n.includes("/api/v1/sharepoint/file/")||!!e.source_id&&!n}function K2(e,t){return function(e){if(!e)return"";try{return decodeURIComponent(String(e))}catch{return String(e)}}(e.source_name)||e.url||e.source_type||`Source ${t}`}function X2(e){return e.url||e.source_id||e.sourceid||e.source_name||""}function Z2({indices:t}){const o=e.useContext(pt),a=e.useRef(null),i=e.useRef(null),[s,l]=e.useState(!1),[c,u]=e.useState(null),d=e.useMemo(()=>{if(!o||!Array.isArray(o.sources))return[];const e=[],n=new Set;for(const r of t){const t=o.sources.find(e=>Array.isArray(e?.citation_indices)&&e.citation_indices.includes(r)),a=t??o.sources[r-1];if(!a)continue;const i=String(a.url??a.source_id??a.sourceid??a.source_name??"").toLowerCase();i&&n.has(i)||(i&&n.add(i),e.push({src:a,index:r}))}return e},[o,t]);e.useEffect(()=>{if(!s)return;const e=e=>{const t="function"==typeof e.composedPath?e.composedPath():[],n=a.current&&t.includes(a.current),r=i.current&&t.includes(i.current);n||r||l(!1)},t=e=>{if("Escape"!==e.key){if("Tab"===e.key&&i.current){const t=i.current.querySelectorAll("a[href], button:not([disabled])");if(0===t.length)return;const n=t[0],r=t[t.length-1],o="function"==typeof e.composedPath?e.composedPath()[0]:e.target;e.shiftKey&&o===n?(e.preventDefault(),r.focus()):e.shiftKey||o!==r||(e.preventDefault(),n.focus())}}else l(!1)};return document.addEventListener("mousedown",e),document.addEventListener("keydown",t),()=>{document.removeEventListener("mousedown",e),document.removeEventListener("keydown",t)}},[s]);const p=e.useRef(!1);if(e.useEffect(()=>{if(s){p.current=!0;const e=i.current?.querySelector("a[href], button:not([disabled])");e?.focus()}else p.current&&(p.current=!1,a.current?.focus())},[s]),!o)return null;if(Array.isArray(o.sources)&&0===o.sources.length)return null;if(o.sourcesPreliminary)return null;if(0===d.length)return null;const f=d[0],g=d.length-1,m=K2(f.src,f.index),h=Y2(f.src)&&ft(f.src),b=o.downloadingKey&&o.downloadingKey===X2(f.src),y=e=>{"function"==typeof o.onSourceActivate&&o.onSourceActivate(e)},v=e=>{e.preventDefault(),e.stopPropagation(),1!==d.length?s?l(!1):(()=>{const e=a.current;if(!e)return;const t=e.getBoundingClientRect();u({top:t.bottom+window.scrollY+4,left:t.left+window.scrollX}),l(!0)})():y(f.src)};return n.jsxs(n.Fragment,{children:[n.jsxs("span",{ref:a,role:"button",tabIndex:0,dir:"ltr",title:m+(g?` (+${g} more)`:""),"aria-label":m+(g?` (+${g} more)`:""),onClick:v,onKeyDown:e=>{"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),v(e))},style:{display:"inline-flex",alignItems:"center",gap:3,height:20,padding:"0 5px 0 6px",marginInlineStart:2,marginInlineEnd:7,fontSize:11,lineHeight:1,borderRadius:5,background:o?.textColor?"rgba(128,128,128,0.08)":"rgba(59, 130, 246, 0.10)",color:o?.textColor||"rgb(37, 99, 235)",border:o?.textColor?`0.5px solid ${o.textColor}`:"0.5px solid rgba(59, 130, 246, 0.35)",cursor:"pointer",userSelect:"none",maxWidth:180,verticalAlign:"1px",textDecoration:"none",fontWeight:500,whiteSpace:"nowrap",unicodeBidi:"isolate"},children:[n.jsx("span",{style:{display:"inline-flex",flexShrink:0},children:h?n.jsx($e,{size:12,strokeWidth:2,"aria-hidden":!0}):n.jsx(Ge,{size:12,strokeWidth:2,"aria-hidden":!0})}),n.jsx("span",{style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",maxWidth:110},children:m}),g>0&&n.jsxs("span",{style:{background:o?.textColor?"transparent":"rgb(37, 99, 235)",color:o?.textColor||"white",border:o?.textColor?`1px solid ${o.textColor}`:"none",borderRadius:3,padding:"1px 4px",fontSize:9,lineHeight:1,fontWeight:600,marginLeft:1},children:["+",g]}),1===d.length&&n.jsx("span",{style:{display:"inline-flex",alignItems:"center",justifyContent:"center",flexShrink:0,paddingLeft:3,borderLeft:o?.textColor?`0.5px solid ${o.textColor}`:"0.5px solid rgba(59, 130, 246, 0.35)",marginLeft:2},children:b?n.jsx(qe,{size:12,strokeWidth:2,className:"animate-spin"}):h?n.jsx(Be,{size:12,strokeWidth:2}):n.jsx(ze,{size:12,strokeWidth:2})})]}),s&&c&&"undefined"!=typeof document&&r.createPortal(n.jsxs("div",{ref:i,role:"dialog",dir:"ltr","aria-label":`${d.length} sources cited`,style:{position:"absolute",top:c.top,left:c.left,zIndex:2147483647,background:"#fff",color:"#111",border:"0.5px solid rgba(0, 0, 0, 0.12)",borderRadius:8,boxShadow:"0 4px 16px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0,0,0,0.06)",padding:6,minWidth:240,maxWidth:360,fontSize:12},onClick:e=>e.stopPropagation(),onMouseDown:e=>e.stopPropagation(),children:[n.jsxs("div",{style:{fontSize:10,textTransform:"uppercase",opacity:.55,letterSpacing:"0.06em",padding:"4px 6px 6px"},children:[d.length," source",1===d.length?"":"s"]}),d.map(({src:e,index:t})=>{const r=K2(e,t),a=Y2(e)&&ft(e),i=o.downloadingKey&&o.downloadingKey===X2(e);return n.jsxs("button",{type:"button",onClick:()=>y(e),disabled:!!i,title:r,style:{display:"flex",alignItems:"center",gap:8,width:"100%",padding:"6px 8px",border:0,background:"transparent",color:"inherit",cursor:i?"default":"pointer",textAlign:"left",borderRadius:4,font:"inherit"},onMouseEnter:e=>{e.currentTarget.style.background="rgba(0,0,0,0.04)"},onMouseLeave:e=>{e.currentTarget.style.background="transparent"},children:[n.jsx("span",{style:{display:"inline-flex",flexShrink:0,opacity:.8},children:a?n.jsx($e,{size:14,strokeWidth:2,"aria-hidden":!0}):n.jsx(Ge,{size:14,strokeWidth:2,"aria-hidden":!0})}),n.jsx("span",{style:{flex:1,minWidth:0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:r}),n.jsx("span",{style:{display:"inline-flex",flexShrink:0,opacity:.7},children:i?n.jsx(qe,{size:14,strokeWidth:2,className:"animate-spin"}):a?n.jsx(Be,{size:14,strokeWidth:2}):n.jsx(ze,{size:14,strokeWidth:2})})]},`${t}-${X2(e)||t}`)})]}),document.body)]})}const Q2=new Set(["eshal-ui","eshal-chart","chart"]);function J2(e,t){if(!t)return e;const n=/^```(?:eshal-ui|eshal-chart|chart)\b/m.exec(e);if(n){const t=e.slice(n.index+n[0].length).split("\n").some(e=>"```"===e.trim());if(!t)return e.slice(0,n.index).trimEnd()}const r=e.split("\n");let o=r.length-1;for(;o>0&&""===r[o].trim();)o--;if(!r[o].trim().startsWith("|"))return e;let a=o;for(;a>0&&(r[a-1].trim().startsWith("|")||""===r[a-1].trim());)a--;const i=r.slice(a,o+1).some(e=>/^\|[\s\-:|]+\|/.test(e.trim()));return i?e:r.slice(0,a).join("\n")}function e3(e){return e.replace(/(\d+\.\d{2})0+(?!\d)/g,"$1")}var t3=Object.freeze({__proto__:null,default:function({content:t,isStreaming:r,isDark:o=!1,isRtl:a=!1,textColor:i,fontFamily:s,fontSize:l,onButtonClick:c,provideCitations:u=!0}){return n.jsx($l,{className:"max-w-none [&>*:last-child]:!mb-0 [&>*:first-child]:!mt-0",remarkPlugins:[Mu,Fu,Bu],rehypePlugins:u?[W2,Un]:[Un],components:{span({node:e,children:t,...r}){const o=r["data-eshal-citation"]??r.dataEshalCitation;if("string"==typeof o&&o.length>0){const e=function(e){if(!e)return[];const t=[];for(const n of String(e).split(",")){const e=parseInt(n.trim(),10);Number.isFinite(e)&&e>=1&&t.push(e)}return q2(t)}(o);if(e.length>0)return n.jsx(Z2,{indices:e})}return n.jsx("span",{...r,children:t})},pre:({children:t,...r})=>function(t){return e.Children.toArray(t).some(t=>{if(!e.isValidElement(t))return!1;const n=t.props?.className;if("string"!=typeof n)return!1;const r=n.match(/language-([\w-]+)/);return!!r&&Q2.has(r[1])})}(t)?n.jsx(n.Fragment,{children:t}):n.jsx("pre",{...r,children:t}),a:({node:e,children:t,...r})=>n.jsx("a",{className:"underline hover:opacity-80",dir:"ltr",style:{color:i||(o?"#f3f4f6":"#1A1A1A"),unicodeBidi:"isolate"},target:"_blank",rel:"noopener noreferrer",...r,children:t}),p({node:e,children:t,...r}){const a="li"===e?.parent?.tagName;return n.jsx("p",{className:"leading-relaxed [&:first-child]:!mt-0",style:{color:i||(o?"#f3f4f6":"#1A1A1A"),fontFamily:s||"Inter",fontSize:l||"14px",margin:0,marginTop:0,marginBottom:a?"0.125rem":"0.85rem",lineHeight:"1.6",padding:0},...r,children:t})},ul:({node:e,children:t,...r})=>n.jsx("ul",{className:"list-disc [&:first-child]:!mt-0",style:{marginTop:0,marginBottom:"0.6rem",paddingInlineStart:"1.2rem"},...r,children:t}),ol({node:t,children:r,start:o=1,...a}){const i=Number.isFinite(Number(o))?Number(o):1;let s=0;return n.jsx("ol",{className:"[&:first-child]:!mt-0",style:{listStyle:"none",marginTop:0,marginBottom:"0.6rem",paddingInlineStart:0},...a,children:e.Children.map(r,t=>{if(!e.isValidElement(t))return t;const n=i+s;return s+=1,e.cloneElement(t,{"data-ol-index":n})})})},li({node:e,children:t,"data-ol-index":r,...a}){const c={color:i||(o?"#f3f4f6":"#1A1A1A"),fontFamily:s||"Inter",fontSize:l||"14px",marginBottom:"0.3rem",lineHeight:"1.5"};return null!=r?n.jsxs("li",{style:{...c,listStyle:"none",display:"flex",alignItems:"baseline",gap:"0.4em"},...a,children:[n.jsxs("span",{style:{flexShrink:0,fontFamily:'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif',fontVariantNumeric:"tabular-nums",minWidth:"1.5em",color:"inherit"},"aria-hidden":"false",children:[r,"."]}),n.jsx("span",{style:{flex:"1 1 auto",minWidth:0},children:t})]}):n.jsx("li",{className:"",style:c,...a,children:t})},h1:({node:e,children:t,...r})=>n.jsx("h1",{className:"text-xl font-bold [&:first-child]:!mt-0",style:{color:i||(o?"#f3f4f6":"#1A1A1A"),fontFamily:s||"Inter",marginTop:"0.7rem",marginBottom:"0.45rem",lineHeight:"1.35"},...r,children:t}),h2:({node:e,children:t,...r})=>n.jsx("h2",{className:"text-lg font-semibold [&:first-child]:!mt-0",style:{color:i||(o?"#f3f4f6":"#1A1A1A"),fontFamily:s||"Inter",marginTop:"0.65rem",marginBottom:"0.4rem",lineHeight:"1.35"},...r,children:t}),h3:({node:e,children:t,...r})=>n.jsx("h3",{className:"text-base font-semibold [&:first-child]:!mt-0",style:{color:i||(o?"#f3f4f6":"#1A1A1A"),fontFamily:s||"Inter",marginTop:"0.6rem",marginBottom:"0.35rem",lineHeight:"1.35"},...r,children:t}),blockquote:({node:e,children:t,...r})=>n.jsx("blockquote",{className:"border-l-4 pl-4 italic "+(o?"border-gray-600 text-gray-300":"border-gray-300 text-gray-700"),...r,children:t}),table({node:e,children:t,...r}){if(e?.children?.length>0){function a(e){return e?"string"==typeof e.value?e.value:Array.isArray(e.children)?e.children.map(a).join(""):"":""}const i=e.children.find(e=>"thead"===e.tagName),s=e.children.find(e=>"tbody"===e.tagName),l=i?.children?.find(e=>"tr"===e.tagName),c=(l?.children||[]).filter(e=>"th"===e.tagName).map(e=>a(e)),u=(s?.children||[]).filter(e=>"tr"===e.tagName),d=u.map(e=>(e.children||[]).filter(e=>"td"===e.tagName).map(e=>a(e)));if(c.length>0&&d.length>0){const p=d.map(e=>Object.fromEntries(c.map((t,n)=>[t,e[n]??""])));return n.jsx(U1,{spec:{type:"table",columns:c,data:p},isDark:o})}}return n.jsx("div",{className:"overflow-x-auto my-3 rounded-lg border "+(o?"border-gray-700 bg-gray-900":"border-gray-200 bg-white"),children:n.jsx("table",{className:"min-w-full border-collapse "+(o?"text-gray-100":"text-gray-900"),...r,children:t})})},th:({node:e,children:t,...r})=>n.jsx("th",{className:"border px-3 py-2 text-left font-medium "+(o?"border-gray-700 bg-gray-800/50 text-gray-300":"border-gray-200 bg-gray-50 text-gray-700"),...r,children:t}),td:({node:e,children:t,...r})=>n.jsx("td",{className:"border px-3 py-2 "+(o?"border-gray-700":"border-gray-200"),...r,children:t}),code({className:e,children:t,...r}){const a=/language-([\w-]+)/.exec(e||""),i=a?a[1]:null;if(i&&Q2.has(i)){const e=function(e){return"string"==typeof e?e:Array.isArray(e)?e.map(e=>"string"==typeof e?e:"").join(""):""}(t).trim();try{const t=JSON.parse(e);if(t&&"object"==typeof t)return n.jsx(U1,{spec:t,isDark:o,onButtonClick:c})}catch(e){return null}return null}return a?n.jsx(Ck,{style:Ik,language:i,PreTag:"div",wrapLines:!0,...r,children:String(t).replace(/\n$/,"")}):n.jsx("code",{className:e,...r,children:t})}},children:e3(J2(t,r))})},sanitizeExcessDecimalPrecision:e3,sanitizeStreamingContent:J2});return function(r){const o=e.useRef(null),a=e.useRef(null);return e.useEffect(()=>{const e=o.current;if(!e||e.shadowRoot)return;const n=e.attachShadow({mode:"open"}),r=document.createElement("style");r.textContent=":host { all: initial; display: block; }",n.appendChild(r);const i=document.createElement("style");i.textContent='*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }.chat-widget-root{--cw-primary:#1d4ed8;--cw-primary-hover:#1e40af;--cw-status-success:160 84% 39%;--cw-status-success-bg:152 81% 96%;--cw-status-warning:35 100% 50%;--cw-status-warning-bg:34 100% 95%;--cw-status-error:350 89% 60%;--cw-status-error-bg:356 100% 97%;--cw-status-info:199 89% 48%;--cw-status-info-bg:204 100% 97%;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif}.chat-widget-root.dark{--cw-status-success:158 64% 52%;--cw-status-success-bg:152 36% 14%;--cw-status-warning:38 92% 60%;--cw-status-warning-bg:36 33% 14%;--cw-status-error:350 89% 65%;--cw-status-error-bg:356 33% 16%;--cw-status-info:199 89% 58%;--cw-status-info-bg:204 33% 14%}.\\!container{width:100%!important}.container{width:100%}@media (min-width:640px){.\\!container{max-width:640px!important}.container{max-width:640px}}@media (min-width:768px){.\\!container{max-width:768px!important}.container{max-width:768px}}@media (min-width:1024px){.\\!container{max-width:1024px!important}.container{max-width:1024px}}@media (min-width:1280px){.\\!container{max-width:1280px!important}.container{max-width:1280px}}@media (min-width:1536px){.\\!container{max-width:1536px!important}.container{max-width:1536px}}#chat-widget-root .chat-widget-root *{box-sizing:border-box;margin:0;padding:0}#chat-widget-root .chat-messages::-webkit-scrollbar{width:6px}#chat-widget-root .chat-messages::-webkit-scrollbar-track{background:transparent}#chat-widget-root .chat-messages::-webkit-scrollbar-thumb{background:rgba(156,163,175,.5);border-radius:10px}#chat-widget-root .chat-messages::-webkit-scrollbar-thumb:hover{background:rgba(156,163,175,.7)}#chat-widget-root .dark .chat-messages::-webkit-scrollbar-thumb{background:rgba(75,85,99,.5)}#chat-widget-root .dark .chat-messages::-webkit-scrollbar-thumb:hover{background:rgba(75,85,99,.7)}#chat-widget-root .sr-only{clip:rect(0,0,0,0);border-width:0;height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}#chat-widget-root .pointer-events-none{pointer-events:none}#chat-widget-root .visible{visibility:visible}#chat-widget-root .invisible{visibility:hidden}#chat-widget-root .collapse{visibility:collapse}#chat-widget-root .static{position:static}#chat-widget-root .fixed{position:fixed}#chat-widget-root .absolute{position:absolute}#chat-widget-root .relative{position:relative}#chat-widget-root .sticky{position:sticky}#chat-widget-root .inset-0{inset:0}#chat-widget-root .-top-8{top:-2rem}#chat-widget-root .bottom-0{bottom:0}#chat-widget-root .bottom-5{bottom:1.25rem}#chat-widget-root .bottom-full{bottom:100%}#chat-widget-root .left-0{left:0}#chat-widget-root .left-1\\/2{left:50%}#chat-widget-root .left-5{left:1.25rem}#chat-widget-root .right-0{right:0}#chat-widget-root .right-5{right:1.25rem}#chat-widget-root .top-0{top:0}#chat-widget-root .top-1\\/2{top:50%}#chat-widget-root .top-5{top:1.25rem}#chat-widget-root .top-full{top:100%}#chat-widget-root .isolate{isolation:isolate}#chat-widget-root .z-10{z-index:10}#chat-widget-root .z-50{z-index:50}#chat-widget-root .z-\\[60\\]{z-index:60}#chat-widget-root .z-\\[70\\]{z-index:70}#chat-widget-root .z-\\[71\\]{z-index:71}#chat-widget-root .z-\\[999999\\]{z-index:999999}#chat-widget-root .z-\\[9999\\]{z-index:9999}#chat-widget-root .m-0{margin:0}#chat-widget-root .mx-2{margin-left:.5rem;margin-right:.5rem}#chat-widget-root .mx-3{margin-left:.75rem;margin-right:.75rem}#chat-widget-root .my-3{margin-bottom:.75rem;margin-top:.75rem}#chat-widget-root .my-4{margin-bottom:1rem;margin-top:1rem}#chat-widget-root .-mb-px{margin-bottom:-1px}#chat-widget-root .mb-1{margin-bottom:.25rem}#chat-widget-root .mb-1\\.5{margin-bottom:.375rem}#chat-widget-root .mb-2{margin-bottom:.5rem}#chat-widget-root .mb-3{margin-bottom:.75rem}#chat-widget-root .mb-4{margin-bottom:1rem}#chat-widget-root .mb-5{margin-bottom:1.25rem}#chat-widget-root .ml-1{margin-left:.25rem}#chat-widget-root .ms-0\\.5{margin-inline-start:.125rem}#chat-widget-root .mt-0\\.5{margin-top:.125rem}#chat-widget-root .mt-1{margin-top:.25rem}#chat-widget-root .mt-1\\.5{margin-top:.375rem}#chat-widget-root .mt-2{margin-top:.5rem}#chat-widget-root .mt-3{margin-top:.75rem}#chat-widget-root .mt-4{margin-top:1rem}#chat-widget-root .block{display:block}#chat-widget-root .inline-block{display:inline-block}#chat-widget-root .inline{display:inline}#chat-widget-root .flex{display:flex}#chat-widget-root .inline-flex{display:inline-flex}#chat-widget-root .table{display:table}#chat-widget-root .grid{display:grid}#chat-widget-root .hidden{display:none}#chat-widget-root .h-1\\.5{height:.375rem}#chat-widget-root .h-10{height:2.5rem}#chat-widget-root .h-11{height:2.75rem}#chat-widget-root .h-12{height:3rem}#chat-widget-root .h-16{height:4rem}#chat-widget-root .h-2{height:.5rem}#chat-widget-root .h-3{height:.75rem}#chat-widget-root .h-3\\.5{height:.875rem}#chat-widget-root .h-4{height:1rem}#chat-widget-root .h-5{height:1.25rem}#chat-widget-root .h-6{height:1.5rem}#chat-widget-root .h-7{height:1.75rem}#chat-widget-root .h-8{height:2rem}#chat-widget-root .h-\\[650px\\]{height:650px}#chat-widget-root .h-auto{height:auto}#chat-widget-root .h-full{height:100%}#chat-widget-root .h-px{height:1px}#chat-widget-root .max-h-\\[85vh\\]{max-height:85vh}#chat-widget-root .min-h-0{min-height:0}#chat-widget-root .min-h-\\[48px\\]{min-height:48px}#chat-widget-root .w-1\\.5{width:.375rem}#chat-widget-root .w-10{width:2.5rem}#chat-widget-root .w-11{width:2.75rem}#chat-widget-root .w-12{width:3rem}#chat-widget-root .w-16{width:4rem}#chat-widget-root .w-2{width:.5rem}#chat-widget-root .w-3{width:.75rem}#chat-widget-root .w-3\\.5{width:.875rem}#chat-widget-root .w-4{width:1rem}#chat-widget-root .w-44{width:11rem}#chat-widget-root .w-5{width:1.25rem}#chat-widget-root .w-6{width:1.5rem}#chat-widget-root .w-7{width:1.75rem}#chat-widget-root .w-8{width:2rem}#chat-widget-root .w-80{width:20rem}#chat-widget-root .w-96{width:24rem}#chat-widget-root .w-\\[380px\\]{width:380px}#chat-widget-root .w-full{width:100%}#chat-widget-root .min-w-0{min-width:0}#chat-widget-root .min-w-\\[60px\\]{min-width:60px}#chat-widget-root .min-w-full{min-width:100%}#chat-widget-root .max-w-\\[75\\%\\]{max-width:75%}#chat-widget-root .max-w-\\[92vw\\]{max-width:92vw}#chat-widget-root .max-w-full{max-width:100%}#chat-widget-root .max-w-none{max-width:none}#chat-widget-root .max-w-sm{max-width:24rem}#chat-widget-root .max-w-xs{max-width:20rem}#chat-widget-root .flex-1{flex:1 1 0%}#chat-widget-root .flex-shrink-0,#chat-widget-root .shrink-0{flex-shrink:0}#chat-widget-root .grow{flex-grow:1}#chat-widget-root .border-collapse{border-collapse:collapse}#chat-widget-root .-translate-x-1\\/2{--tw-translate-x:-50%}#chat-widget-root .-translate-x-1\\/2,#chat-widget-root .-translate-y-1\\/2{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}#chat-widget-root .-translate-y-1\\/2{--tw-translate-y:-50%}#chat-widget-root .-rotate-90{--tw-rotate:-90deg}#chat-widget-root .-rotate-90,#chat-widget-root .rotate-180{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}#chat-widget-root .rotate-180{--tw-rotate:180deg}#chat-widget-root .rotate-90{--tw-rotate:90deg}#chat-widget-root .rotate-90,#chat-widget-root .scale-0{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}#chat-widget-root .scale-0{--tw-scale-x:0;--tw-scale-y:0}#chat-widget-root .scale-100{--tw-scale-x:1;--tw-scale-y:1}#chat-widget-root .scale-100,#chat-widget-root .scale-110{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}#chat-widget-root .scale-110{--tw-scale-x:1.1;--tw-scale-y:1.1}#chat-widget-root .scale-125{--tw-scale-x:1.25;--tw-scale-y:1.25}#chat-widget-root .scale-125,#chat-widget-root .scale-95{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}#chat-widget-root .scale-95{--tw-scale-x:.95;--tw-scale-y:.95}#chat-widget-root .transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes bounce{0%,to{animation-timing-function:cubic-bezier(.8,0,1,1);transform:translateY(-25%)}50%{animation-timing-function:cubic-bezier(0,0,.2,1);transform:none}}#chat-widget-root .animate-bounce{animation:bounce 1s infinite}@keyframes pulse{50%{opacity:.5}}#chat-widget-root .animate-pulse{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}@keyframes spin{to{transform:rotate(1turn)}}#chat-widget-root .animate-spin{animation:spin 1s linear infinite}#chat-widget-root .cursor-ew-resize{cursor:ew-resize}#chat-widget-root .cursor-nesw-resize{cursor:nesw-resize}#chat-widget-root .cursor-not-allowed{cursor:not-allowed}#chat-widget-root .cursor-ns-resize{cursor:ns-resize}#chat-widget-root .cursor-nwse-resize{cursor:nwse-resize}#chat-widget-root .cursor-pointer{cursor:pointer}#chat-widget-root .resize-none{resize:none}#chat-widget-root .resize{resize:both}#chat-widget-root .list-decimal{list-style-type:decimal}#chat-widget-root .list-disc{list-style-type:disc}#chat-widget-root .list-none{list-style-type:none}#chat-widget-root .flex-row{flex-direction:row}#chat-widget-root .flex-row-reverse{flex-direction:row-reverse}#chat-widget-root .flex-col{flex-direction:column}#chat-widget-root .flex-wrap{flex-wrap:wrap}#chat-widget-root .items-start{align-items:flex-start}#chat-widget-root .items-end{align-items:flex-end}#chat-widget-root .items-center{align-items:center}#chat-widget-root .justify-start{justify-content:flex-start}#chat-widget-root .justify-end{justify-content:flex-end}#chat-widget-root .justify-center{justify-content:center}#chat-widget-root .justify-between{justify-content:space-between}#chat-widget-root .gap-0{gap:0}#chat-widget-root .gap-0\\.5{gap:.125rem}#chat-widget-root .gap-1{gap:.25rem}#chat-widget-root .gap-1\\.5{gap:.375rem}#chat-widget-root .gap-2{gap:.5rem}#chat-widget-root .gap-2\\.5{gap:.625rem}#chat-widget-root .gap-3{gap:.75rem}#chat-widget-root .gap-4{gap:1rem}#chat-widget-root .gap-6{gap:1.5rem}#chat-widget-root :is(.space-y-2>:not([hidden])~:not([hidden])){--tw-space-y-reverse:0;margin-bottom:calc(.5rem*var(--tw-space-y-reverse));margin-top:calc(.5rem*(1 - var(--tw-space-y-reverse)))}#chat-widget-root :is(.space-y-4>:not([hidden])~:not([hidden])){--tw-space-y-reverse:0;margin-bottom:calc(1rem*var(--tw-space-y-reverse));margin-top:calc(1rem*(1 - var(--tw-space-y-reverse)))}#chat-widget-root .overflow-hidden{overflow:hidden}#chat-widget-root .overflow-visible{overflow:visible}#chat-widget-root .overflow-x-auto{overflow-x:auto}#chat-widget-root .overflow-y-auto{overflow-y:auto}#chat-widget-root .truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}#chat-widget-root .whitespace-nowrap{white-space:nowrap}#chat-widget-root .whitespace-pre-wrap{white-space:pre-wrap}#chat-widget-root .break-words{overflow-wrap:break-word}#chat-widget-root .break-all{word-break:break-all}#chat-widget-root .rounded{border-radius:.25rem}#chat-widget-root .rounded-2xl{border-radius:1rem}#chat-widget-root .rounded-3xl{border-radius:1.5rem}#chat-widget-root .rounded-full{border-radius:9999px}#chat-widget-root .rounded-lg{border-radius:.5rem}#chat-widget-root .rounded-md{border-radius:.375rem}#chat-widget-root .rounded-xl{border-radius:.75rem}#chat-widget-root .rounded-t-2xl{border-top-left-radius:1rem;border-top-right-radius:1rem}#chat-widget-root .rounded-tl-sm{border-top-left-radius:.125rem}#chat-widget-root .rounded-tr-sm{border-top-right-radius:.125rem}#chat-widget-root .border{border-width:1px}#chat-widget-root .border-0{border-width:0}#chat-widget-root .border-b{border-bottom-width:1px}#chat-widget-root .border-l-4{border-left-width:4px}#chat-widget-root .border-t{border-top-width:1px}#chat-widget-root .border-t-2{border-top-width:2px}#chat-widget-root .border-dotted{border-style:dotted}#chat-widget-root .border-none{border-style:none}#chat-widget-root .\\!border-status-error{border-color:hsl(var(--cw-status-error))!important}#chat-widget-root .border-amber-200{--tw-border-opacity:1;border-color:rgb(253 230 138/var(--tw-border-opacity,1))}#chat-widget-root .border-amber-700\\/50{border-color:rgba(180,83,9,.5)}#chat-widget-root .border-blue-200{--tw-border-opacity:1;border-color:rgb(191 219 254/var(--tw-border-opacity,1))}#chat-widget-root .border-blue-700\\/50{border-color:rgba(29,78,216,.5)}#chat-widget-root .border-gray-100{--tw-border-opacity:1;border-color:rgb(243 244 246/var(--tw-border-opacity,1))}#chat-widget-root .border-gray-200{--tw-border-opacity:1;border-color:rgb(229 231 235/var(--tw-border-opacity,1))}#chat-widget-root .border-gray-200\\/60{border-color:rgba(229,231,235,.6)}#chat-widget-root .border-gray-300{--tw-border-opacity:1;border-color:rgb(209 213 219/var(--tw-border-opacity,1))}#chat-widget-root .border-gray-600{--tw-border-opacity:1;border-color:rgb(75 85 99/var(--tw-border-opacity,1))}#chat-widget-root .border-gray-700{--tw-border-opacity:1;border-color:rgb(55 65 81/var(--tw-border-opacity,1))}#chat-widget-root .border-gray-700\\/50{border-color:rgba(55,65,81,.5)}#chat-widget-root .border-transparent{border-color:transparent}#chat-widget-root .bg-amber-50{--tw-bg-opacity:1;background-color:rgb(255 251 235/var(--tw-bg-opacity,1))}#chat-widget-root .bg-amber-900\\/40{background-color:rgba(120,53,15,.4)}#chat-widget-root .bg-blue-50{--tw-bg-opacity:1;background-color:rgb(239 246 255/var(--tw-bg-opacity,1))}#chat-widget-root .bg-blue-500{--tw-bg-opacity:1;background-color:rgb(59 130 246/var(--tw-bg-opacity,1))}#chat-widget-root .bg-blue-900\\/30{background-color:rgba(30,58,138,.3)}#chat-widget-root .bg-current{background-color:currentColor}#chat-widget-root .bg-gray-100{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity,1))}#chat-widget-root .bg-gray-400{--tw-bg-opacity:1;background-color:rgb(156 163 175/var(--tw-bg-opacity,1))}#chat-widget-root .bg-gray-50{--tw-bg-opacity:1;background-color:rgb(249 250 251/var(--tw-bg-opacity,1))}#chat-widget-root .bg-gray-50\\/30{background-color:rgba(249,250,251,.3)}#chat-widget-root .bg-gray-500{--tw-bg-opacity:1;background-color:rgb(107 114 128/var(--tw-bg-opacity,1))}#chat-widget-root .bg-gray-700{--tw-bg-opacity:1;background-color:rgb(55 65 81/var(--tw-bg-opacity,1))}#chat-widget-root .bg-gray-700\\/50{background-color:rgba(55,65,81,.5)}#chat-widget-root .bg-gray-800{--tw-bg-opacity:1;background-color:rgb(31 41 55/var(--tw-bg-opacity,1))}#chat-widget-root .bg-gray-800\\/50{background-color:rgba(31,41,55,.5)}#chat-widget-root .bg-gray-900{--tw-bg-opacity:1;background-color:rgb(17 24 39/var(--tw-bg-opacity,1))}#chat-widget-root .bg-green-200{--tw-bg-opacity:1;background-color:rgb(187 247 208/var(--tw-bg-opacity,1))}#chat-widget-root .bg-orange-200{--tw-bg-opacity:1;background-color:rgb(254 215 170/var(--tw-bg-opacity,1))}#chat-widget-root .bg-pink-200{--tw-bg-opacity:1;background-color:rgb(251 207 232/var(--tw-bg-opacity,1))}#chat-widget-root .bg-red-200{--tw-bg-opacity:1;background-color:rgb(254 202 202/var(--tw-bg-opacity,1))}#chat-widget-root .bg-red-500{--tw-bg-opacity:1;background-color:rgb(239 68 68/var(--tw-bg-opacity,1))}#chat-widget-root .bg-slate-50\\/50{background-color:rgba(248,250,252,.5)}#chat-widget-root .bg-slate-800\\/50{background-color:rgba(30,41,59,.5)}#chat-widget-root .bg-transparent{background-color:transparent}#chat-widget-root .bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))}#chat-widget-root .bg-white\\/10{background-color:hsla(0,0%,100%,.1)}#chat-widget-root .bg-white\\/20{background-color:hsla(0,0%,100%,.2)}#chat-widget-root .bg-yellow-200{--tw-bg-opacity:1;background-color:rgb(254 240 138/var(--tw-bg-opacity,1))}#chat-widget-root .bg-gradient-to-b{background-image:linear-gradient(to bottom,var(--tw-gradient-stops))}#chat-widget-root .bg-gradient-to-br{background-image:linear-gradient(to bottom right,var(--tw-gradient-stops))}#chat-widget-root .from-gray-50\\/50{--tw-gradient-from:rgba(249,250,251,.5) var(--tw-gradient-from-position);--tw-gradient-to:rgba(249,250,251,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}#chat-widget-root .from-white\\/0{--tw-gradient-from:hsla(0,0%,100%,0) var(--tw-gradient-from-position);--tw-gradient-to:hsla(0,0%,100%,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}#chat-widget-root .from-white\\/10{--tw-gradient-from:hsla(0,0%,100%,.1) var(--tw-gradient-from-position);--tw-gradient-to:hsla(0,0%,100%,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}#chat-widget-root .from-yellow-200{--tw-gradient-from:#fef08a var(--tw-gradient-from-position);--tw-gradient-to:hsla(53,98%,77%,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}#chat-widget-root .via-white\\/5{--tw-gradient-to:hsla(0,0%,100%,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),hsla(0,0%,100%,.05) var(--tw-gradient-via-position),var(--tw-gradient-to)}#chat-widget-root .to-white{--tw-gradient-to:#fff var(--tw-gradient-to-position)}#chat-widget-root .to-white\\/10{--tw-gradient-to:hsla(0,0%,100%,.1) var(--tw-gradient-to-position)}#chat-widget-root .to-yellow-400{--tw-gradient-to:#facc15 var(--tw-gradient-to-position)}#chat-widget-root .object-contain{-o-object-fit:contain;object-fit:contain}#chat-widget-root .p-0{padding:0}#chat-widget-root .p-0\\.5{padding:.125rem}#chat-widget-root .p-3{padding:.75rem}#chat-widget-root .p-5{padding:1.25rem}#chat-widget-root .p-6{padding:1.5rem}#chat-widget-root .p-8{padding:2rem}#chat-widget-root .px-1{padding-left:.25rem;padding-right:.25rem}#chat-widget-root .px-2{padding-left:.5rem;padding-right:.5rem}#chat-widget-root .px-2\\.5{padding-left:.625rem;padding-right:.625rem}#chat-widget-root .px-3{padding-left:.75rem;padding-right:.75rem}#chat-widget-root .px-4{padding-left:1rem;padding-right:1rem}#chat-widget-root .px-5{padding-left:1.25rem;padding-right:1.25rem}#chat-widget-root .py-1{padding-bottom:.25rem;padding-top:.25rem}#chat-widget-root .py-1\\.5{padding-bottom:.375rem;padding-top:.375rem}#chat-widget-root .py-12{padding-bottom:3rem;padding-top:3rem}#chat-widget-root .py-2{padding-bottom:.5rem;padding-top:.5rem}#chat-widget-root .py-2\\.5{padding-bottom:.625rem;padding-top:.625rem}#chat-widget-root .py-3{padding-bottom:.75rem;padding-top:.75rem}#chat-widget-root .py-3\\.5{padding-bottom:.875rem;padding-top:.875rem}#chat-widget-root .py-4{padding-bottom:1rem;padding-top:1rem}#chat-widget-root .pb-1{padding-bottom:.25rem}#chat-widget-root .pb-2{padding-bottom:.5rem}#chat-widget-root .pl-1{padding-left:.25rem}#chat-widget-root .pl-2{padding-left:.5rem}#chat-widget-root .pl-4{padding-left:1rem}#chat-widget-root .pl-\\[50px\\]{padding-left:50px}#chat-widget-root .pr-1{padding-right:.25rem}#chat-widget-root .pt-1{padding-top:.25rem}#chat-widget-root .text-left{text-align:left}#chat-widget-root .text-center{text-align:center}#chat-widget-root .text-right{text-align:right}#chat-widget-root .text-start{text-align:start}#chat-widget-root .align-text-bottom{vertical-align:text-bottom}#chat-widget-root .font-sans{font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji}#chat-widget-root .text-2xl{font-size:1.5rem;line-height:2rem}#chat-widget-root .text-\\[10px\\]{font-size:10px}#chat-widget-root .text-base{font-size:1rem;line-height:1.5rem}#chat-widget-root .text-chip{font-size:11px;letter-spacing:0;line-height:1.4}#chat-widget-root .text-h4{font-size:18px;letter-spacing:0;line-height:1.3}#chat-widget-root .text-lg{font-size:1.125rem;line-height:1.75rem}#chat-widget-root .text-sm{font-size:.875rem;line-height:1.25rem}#chat-widget-root .text-xl{font-size:1.25rem;line-height:1.75rem}#chat-widget-root .text-xs{font-size:.75rem;line-height:1rem}#chat-widget-root .font-bold{font-weight:700}#chat-widget-root .font-medium{font-weight:500}#chat-widget-root .font-semibold{font-weight:600}#chat-widget-root .uppercase{text-transform:uppercase}#chat-widget-root .lowercase{text-transform:lowercase}#chat-widget-root .italic{font-style:italic}#chat-widget-root .tabular-nums{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}#chat-widget-root .leading-5{line-height:1.25rem}#chat-widget-root .leading-none{line-height:1}#chat-widget-root .leading-normal{line-height:1.5}#chat-widget-root .leading-relaxed{line-height:1.625}#chat-widget-root .leading-snug{line-height:1.375}#chat-widget-root .tracking-wide{letter-spacing:.025em}#chat-widget-root .text-\\[\\#4A5568\\]{--tw-text-opacity:1;color:rgb(74 85 104/var(--tw-text-opacity,1))}#chat-widget-root .text-amber-200{--tw-text-opacity:1;color:rgb(253 230 138/var(--tw-text-opacity,1))}#chat-widget-root .text-amber-800{--tw-text-opacity:1;color:rgb(146 64 14/var(--tw-text-opacity,1))}#chat-widget-root .text-current{color:currentColor}#chat-widget-root .text-gray-100{--tw-text-opacity:1;color:rgb(243 244 246/var(--tw-text-opacity,1))}#chat-widget-root .text-gray-200{--tw-text-opacity:1;color:rgb(229 231 235/var(--tw-text-opacity,1))}#chat-widget-root .text-gray-300{--tw-text-opacity:1;color:rgb(209 213 219/var(--tw-text-opacity,1))}#chat-widget-root .text-gray-400{--tw-text-opacity:1;color:rgb(156 163 175/var(--tw-text-opacity,1))}#chat-widget-root .text-gray-500{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity,1))}#chat-widget-root .text-gray-500\\/80{color:hsla(220,9%,46%,.8)}#chat-widget-root .text-gray-600{--tw-text-opacity:1;color:rgb(75 85 99/var(--tw-text-opacity,1))}#chat-widget-root .text-gray-700{--tw-text-opacity:1;color:rgb(55 65 81/var(--tw-text-opacity,1))}#chat-widget-root .text-gray-800{--tw-text-opacity:1;color:rgb(31 41 55/var(--tw-text-opacity,1))}#chat-widget-root .text-gray-900{--tw-text-opacity:1;color:rgb(17 24 39/var(--tw-text-opacity,1))}#chat-widget-root .text-green-500{--tw-text-opacity:1;color:rgb(34 197 94/var(--tw-text-opacity,1))}#chat-widget-root .text-red-500{--tw-text-opacity:1;color:rgb(239 68 68/var(--tw-text-opacity,1))}#chat-widget-root .text-slate-400{--tw-text-opacity:1;color:rgb(148 163 184/var(--tw-text-opacity,1))}#chat-widget-root .text-slate-500{--tw-text-opacity:1;color:rgb(100 116 139/var(--tw-text-opacity,1))}#chat-widget-root .text-status-error{color:hsl(var(--cw-status-error))}#chat-widget-root .text-status-success{color:hsl(var(--cw-status-success))}#chat-widget-root .text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity,1))}#chat-widget-root .text-yellow-400{--tw-text-opacity:1;color:rgb(250 204 21/var(--tw-text-opacity,1))}#chat-widget-root .underline{text-decoration-line:underline}#chat-widget-root .no-underline{text-decoration-line:none}#chat-widget-root .placeholder-gray-400::-moz-placeholder{--tw-placeholder-opacity:1;color:rgb(156 163 175/var(--tw-placeholder-opacity,1))}#chat-widget-root .placeholder-gray-400::placeholder{--tw-placeholder-opacity:1;color:rgb(156 163 175/var(--tw-placeholder-opacity,1))}#chat-widget-root .placeholder-gray-500::-moz-placeholder{--tw-placeholder-opacity:1;color:rgb(107 114 128/var(--tw-placeholder-opacity,1))}#chat-widget-root .placeholder-gray-500::placeholder{--tw-placeholder-opacity:1;color:rgb(107 114 128/var(--tw-placeholder-opacity,1))}#chat-widget-root .opacity-0{opacity:0}#chat-widget-root .opacity-50{opacity:.5}#chat-widget-root .opacity-60{opacity:.6}#chat-widget-root .opacity-70{opacity:.7}#chat-widget-root .opacity-75{opacity:.75}#chat-widget-root .opacity-80{opacity:.8}#chat-widget-root .shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color)}#chat-widget-root .shadow,#chat-widget-root .shadow-2xl{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}#chat-widget-root .shadow-2xl{--tw-shadow:0 25px 50px -12px rgba(0,0,0,.25);--tw-shadow-colored:0 25px 50px -12px var(--tw-shadow-color)}#chat-widget-root .shadow-lg{--tw-shadow:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -4px rgba(0,0,0,.1);--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color),0 4px 6px -4px var(--tw-shadow-color)}#chat-widget-root .shadow-lg,#chat-widget-root .shadow-md{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}#chat-widget-root .shadow-md{--tw-shadow:0 4px 6px -1px rgba(0,0,0,.1),0 2px 4px -2px rgba(0,0,0,.1);--tw-shadow-colored:0 4px 6px -1px var(--tw-shadow-color),0 2px 4px -2px var(--tw-shadow-color)}#chat-widget-root .shadow-sm{--tw-shadow:0 1px 2px 0 rgba(0,0,0,.05);--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color)}#chat-widget-root .shadow-sm,#chat-widget-root .shadow-xl{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}#chat-widget-root .shadow-xl{--tw-shadow:0 20px 25px -5px rgba(0,0,0,.1),0 8px 10px -6px rgba(0,0,0,.1);--tw-shadow-colored:0 20px 25px -5px var(--tw-shadow-color),0 8px 10px -6px var(--tw-shadow-color)}#chat-widget-root .shadow-black\\/20{--tw-shadow-color:rgba(0,0,0,.2);--tw-shadow:var(--tw-shadow-colored)}#chat-widget-root .shadow-gray-200\\/80{--tw-shadow-color:rgba(229,231,235,.8);--tw-shadow:var(--tw-shadow-colored)}#chat-widget-root .outline-none{outline:2px solid transparent;outline-offset:2px}#chat-widget-root .outline{outline-style:solid}#chat-widget-root .ring{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color)}#chat-widget-root .ring,#chat-widget-root .ring-2{box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}#chat-widget-root .ring-2{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color)}#chat-widget-root .ring-blue-100{--tw-ring-opacity:1;--tw-ring-color:rgb(219 234 254/var(--tw-ring-opacity,1))}#chat-widget-root .ring-blue-300{--tw-ring-opacity:1;--tw-ring-color:rgb(147 197 253/var(--tw-ring-opacity,1))}#chat-widget-root .ring-white{--tw-ring-opacity:1;--tw-ring-color:rgb(255 255 255/var(--tw-ring-opacity,1))}#chat-widget-root .blur{--tw-blur:blur(8px)}#chat-widget-root .blur,#chat-widget-root .drop-shadow{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}#chat-widget-root .drop-shadow{--tw-drop-shadow:drop-shadow(0 1px 2px rgba(0,0,0,.1)) drop-shadow(0 1px 1px rgba(0,0,0,.06))}#chat-widget-root .drop-shadow-md{--tw-drop-shadow:drop-shadow(0 4px 3px rgba(0,0,0,.07)) drop-shadow(0 2px 2px rgba(0,0,0,.06))}#chat-widget-root .drop-shadow-md,#chat-widget-root .drop-shadow-sm{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}#chat-widget-root .drop-shadow-sm{--tw-drop-shadow:drop-shadow(0 1px 1px rgba(0,0,0,.05))}#chat-widget-root .grayscale-\\[0\\.3\\]{--tw-grayscale:grayscale(0.3)}#chat-widget-root .filter,#chat-widget-root .grayscale-\\[0\\.3\\]{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}#chat-widget-root .backdrop-blur-sm{--tw-backdrop-blur:blur(4px);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}#chat-widget-root .transition{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1)}#chat-widget-root .transition-all{transition-duration:.15s;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1)}#chat-widget-root .transition-colors{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1)}#chat-widget-root .transition-opacity{transition-duration:.15s;transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1)}#chat-widget-root .transition-transform{transition-duration:.15s;transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1)}#chat-widget-root .duration-150{transition-duration:.15s}#chat-widget-root .duration-200{transition-duration:.2s}#chat-widget-root .duration-300{transition-duration:.3s}#chat-widget-root .duration-500{transition-duration:.5s}#chat-widget-root :is(#chat-widget-root .animate-in){animation:slideIn .3s ease-out}#chat-widget-root :is(#chat-widget-root .transition-all){transition-duration:.3s;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1)}#chat-widget-root .\\[font-family\\:inherit\\]{font-family:inherit}#chat-widget-root .placeholder\\:text-\\[\\#A2A9B2\\]::-moz-placeholder{--tw-text-opacity:1;color:rgb(162 169 178/var(--tw-text-opacity,1))}#chat-widget-root .placeholder\\:text-\\[\\#A2A9B2\\]::placeholder{--tw-text-opacity:1;color:rgb(162 169 178/var(--tw-text-opacity,1))}#chat-widget-root .placeholder\\:text-gray-500::-moz-placeholder{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity,1))}#chat-widget-root .placeholder\\:text-gray-500::placeholder{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity,1))}#chat-widget-root .hover\\:scale-105:hover{--tw-scale-x:1.05;--tw-scale-y:1.05}#chat-widget-root .hover\\:scale-105:hover,#chat-widget-root .hover\\:scale-110:hover{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}#chat-widget-root .hover\\:scale-110:hover{--tw-scale-x:1.1;--tw-scale-y:1.1}#chat-widget-root .hover\\:scale-\\[1\\.02\\]:hover{--tw-scale-x:1.02;--tw-scale-y:1.02;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}#chat-widget-root .hover\\:border-blue-400:hover{--tw-border-opacity:1;border-color:rgb(96 165 250/var(--tw-border-opacity,1))}#chat-widget-root .hover\\:border-blue-600:hover{--tw-border-opacity:1;border-color:rgb(37 99 235/var(--tw-border-opacity,1))}#chat-widget-root .hover\\:bg-blue-50:hover{--tw-bg-opacity:1;background-color:rgb(239 246 255/var(--tw-bg-opacity,1))}#chat-widget-root .hover\\:bg-blue-500\\/20:hover{background-color:rgba(59,130,246,.2)}#chat-widget-root .hover\\:bg-blue-900\\/50:hover{background-color:rgba(30,58,138,.5)}#chat-widget-root .hover\\:bg-gray-200:hover{--tw-bg-opacity:1;background-color:rgb(229 231 235/var(--tw-bg-opacity,1))}#chat-widget-root .hover\\:bg-gray-50:hover{--tw-bg-opacity:1;background-color:rgb(249 250 251/var(--tw-bg-opacity,1))}#chat-widget-root .hover\\:bg-gray-600:hover{--tw-bg-opacity:1;background-color:rgb(75 85 99/var(--tw-bg-opacity,1))}#chat-widget-root .hover\\:bg-gray-700:hover{--tw-bg-opacity:1;background-color:rgb(55 65 81/var(--tw-bg-opacity,1))}#chat-widget-root .hover\\:bg-red-600:hover{--tw-bg-opacity:1;background-color:rgb(220 38 38/var(--tw-bg-opacity,1))}#chat-widget-root .hover\\:bg-transparent:hover{background-color:transparent}#chat-widget-root .hover\\:text-blue-500:hover{--tw-text-opacity:1;color:rgb(59 130 246/var(--tw-text-opacity,1))}#chat-widget-root .hover\\:text-gray-200:hover{--tw-text-opacity:1;color:rgb(229 231 235/var(--tw-text-opacity,1))}#chat-widget-root .hover\\:text-gray-300:hover{--tw-text-opacity:1;color:rgb(209 213 219/var(--tw-text-opacity,1))}#chat-widget-root .hover\\:text-gray-600:hover{--tw-text-opacity:1;color:rgb(75 85 99/var(--tw-text-opacity,1))}#chat-widget-root .hover\\:text-gray-700:hover{--tw-text-opacity:1;color:rgb(55 65 81/var(--tw-text-opacity,1))}#chat-widget-root .hover\\:underline:hover{text-decoration-line:underline}#chat-widget-root .hover\\:opacity-80:hover{opacity:.8}#chat-widget-root .hover\\:opacity-90:hover{opacity:.9}#chat-widget-root .hover\\:shadow-md:hover{--tw-shadow:0 4px 6px -1px rgba(0,0,0,.1),0 2px 4px -2px rgba(0,0,0,.1);--tw-shadow-colored:0 4px 6px -1px var(--tw-shadow-color),0 2px 4px -2px var(--tw-shadow-color)}#chat-widget-root .hover\\:shadow-md:hover,#chat-widget-root .hover\\:shadow-xl:hover{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}#chat-widget-root .hover\\:shadow-xl:hover{--tw-shadow:0 20px 25px -5px rgba(0,0,0,.1),0 8px 10px -6px rgba(0,0,0,.1);--tw-shadow-colored:0 20px 25px -5px var(--tw-shadow-color),0 8px 10px -6px var(--tw-shadow-color)}#chat-widget-root .hover\\:grayscale-0:hover{--tw-grayscale:grayscale(0);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}#chat-widget-root .focus\\:\\!border-status-error:focus{border-color:hsl(var(--cw-status-error))!important}#chat-widget-root .focus\\:border-\\[\\#5A6069\\]:focus{--tw-border-opacity:1;border-color:rgb(90 96 105/var(--tw-border-opacity,1))}#chat-widget-root .focus\\:border-\\[\\#B0B0B0\\]:focus{--tw-border-opacity:1;border-color:rgb(176 176 176/var(--tw-border-opacity,1))}#chat-widget-root .focus\\:bg-white:focus{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))}#chat-widget-root .focus\\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}#chat-widget-root .focus\\:ring-0:focus{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(var(--tw-ring-offset-width)) var(--tw-ring-color)}#chat-widget-root .focus\\:ring-0:focus,#chat-widget-root .focus\\:ring-1:focus{box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}#chat-widget-root .focus\\:ring-1:focus{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color)}#chat-widget-root .focus\\:ring-gray-300:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(209 213 219/var(--tw-ring-opacity,1))}#chat-widget-root .focus\\:ring-gray-600:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(75 85 99/var(--tw-ring-opacity,1))}#chat-widget-root .focus-visible\\:outline-none:focus-visible{outline:2px solid transparent;outline-offset:2px}#chat-widget-root .focus-visible\\:ring-2:focus-visible{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}#chat-widget-root .focus-visible\\:ring-white\\/40:focus-visible{--tw-ring-color:hsla(0,0%,100%,.4)}#chat-widget-root .active\\:scale-95:active{--tw-scale-x:.95;--tw-scale-y:.95}#chat-widget-root .active\\:scale-95:active,#chat-widget-root .active\\:scale-\\[0\\.97\\]:active{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}#chat-widget-root .active\\:scale-\\[0\\.97\\]:active{--tw-scale-x:0.97;--tw-scale-y:0.97}#chat-widget-root .active\\:scale-\\[0\\.98\\]:active{--tw-scale-x:0.98;--tw-scale-y:0.98}#chat-widget-root .active\\:scale-\\[0\\.98\\]:active,#chat-widget-root .active\\:scale-\\[0\\.99\\]:active{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}#chat-widget-root .active\\:scale-\\[0\\.99\\]:active{--tw-scale-x:0.99;--tw-scale-y:0.99}#chat-widget-root .active\\:outline-none:active{outline:2px solid transparent;outline-offset:2px}#chat-widget-root .active\\:ring-0:active{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}#chat-widget-root .disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}#chat-widget-root .disabled\\:opacity-40:disabled{opacity:.4}#chat-widget-root .disabled\\:opacity-50:disabled{opacity:.5}#chat-widget-root .disabled\\:shadow-none:disabled{--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}#chat-widget-root :is(.group:hover .group-hover\\:scale-100){--tw-scale-x:1;--tw-scale-y:1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}#chat-widget-root :is(.group:hover .group-hover\\:opacity-100){opacity:1}#chat-widget-root .dark\\:text-gray-300:is(.dark *){--tw-text-opacity:1;color:rgb(209 213 219/var(--tw-text-opacity,1))}#chat-widget-root .dark\\:text-gray-400:is(.dark *){--tw-text-opacity:1;color:rgb(156 163 175/var(--tw-text-opacity,1))}@media (min-width:768px){#chat-widget-root .md\\:text-sm{font-size:.875rem;line-height:1.25rem}}#chat-widget-root .rtl\\:rounded-tl-2xl:where([dir=rtl],[dir=rtl] *){border-top-left-radius:1rem}#chat-widget-root .rtl\\:rounded-tr-sm:where([dir=rtl],[dir=rtl] *){border-top-right-radius:.125rem}#chat-widget-root .\\[\\&\\:first-child\\]\\:\\!mt-0:first-child{margin-top:0!important}#chat-widget-root :is(.\\[\\&\\>\\*\\:first-child\\]\\:\\!mt-0>:first-child){margin-top:0!important}#chat-widget-root :is(.\\[\\&\\>\\*\\:last-child\\]\\:\\!mb-0>:last-child){margin-bottom:0!important}\n.chat-widget-root{position:fixed;z-index:999999}.chat-widget-container{color:var(--cw-text-color,inherit);font-family:var(\n --cw-font-family,-apple-system,BlinkMacSystemFont,"Segoe UI","Roboto","Oxygen","Ubuntu","Cantarell","Fira Sans","Droid Sans","Helvetica Neue",sans-serif\n )}#chat-widget-root .chat-messages p{overflow-wrap:anywhere;word-break:break-word}textarea#chat-widget-input::-moz-placeholder{border:none;line-height:48px;outline:none}textarea#chat-widget-input::placeholder{border:none;line-height:48px;outline:none}textarea#chat-widget-input{border:none;line-height:48px;outline:none}@keyframes slideIn{0%{opacity:0;transform:translateY(10px)}to{opacity:1;transform:translateY(0)}}@keyframes bounce{0%,to{transform:translateY(0)}50%{transform:translateY(-5px)}}#chat-widget-root .scrollbar-hide{-ms-overflow-style:none;scrollbar-width:none}#chat-widget-root .scrollbar-hide::-webkit-scrollbar{display:none}#chat-widget-root .slim-scrollbar-x{scrollbar-width:thin}#chat-widget-root .slim-scrollbar-x::-webkit-scrollbar{height:3px!important}#chat-widget-root .slim-scrollbar-x::-webkit-scrollbar-track{background:transparent!important}#chat-widget-root .slim-scrollbar-x::-webkit-scrollbar-thumb{background:#d1d5db!important;border-radius:2px!important}#chat-widget-root .slim-scrollbar-x::-webkit-scrollbar-thumb:hover{background:#9ca3af!important}@media print{.chat-widget-root{display:none!important}}',n.appendChild(i);const s=document.createElement("div");s.id="chat-widget-mount",n.appendChild(s),a.current=t.createRoot(s)},[]),e.useEffect(()=>{a.current?.render(e.createElement(zn,r))}),e.useEffect(()=>()=>{const e=a.current;a.current=null,queueMicrotask(()=>e?.unmount())},[]),n.jsx("div",{ref:o,id:"chat-widget-host"})}});
50
+ */function JH(){if(UH)return BH;UH=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;return BH=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map(function(e){return t[e]}).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach(function(e){r[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(r,o){for(var a,i,s=function(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(r),l=1;l<arguments.length;l++){for(var c in a=Object(arguments[l]))t.call(a,c)&&(s[c]=a[c]);if(e){i=e(a);for(var u=0;u<i.length;u++)n.call(a,i[u])&&(s[i[u]]=a[i[u]])}}return s},BH}function eV(){if($H)return zH;$H=1;return zH="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}function tV(){return qH?GH:(qH=1,GH=Function.call.bind(Object.prototype.hasOwnProperty))}if("production"!==process.env.NODE_ENV){var nV=QH();LH.exports=function(){if(YH)return WH;YH=1;var e=QH(),t=JH(),n=eV(),r=tV(),o=function(){if(VH)return HH;VH=1;var e=function(){};if("production"!==process.env.NODE_ENV){var t=eV(),n={},r=tV();e=function(e){var t="Warning: "+e;"undefined"!=typeof console&&console.error(t);try{throw new Error(t)}catch(e){}}}function o(o,a,i,s,l){if("production"!==process.env.NODE_ENV)for(var c in o)if(r(o,c)){var u;try{if("function"!=typeof o[c]){var d=Error((s||"React class")+": "+i+" type `"+c+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof o[c]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw d.name="Invariant Violation",d}u=o[c](a,c,s,i,null,t)}catch(e){u=e}if(!u||u instanceof Error||e((s||"React class")+": type specification of "+i+" `"+c+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof u+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),u instanceof Error&&!(u.message in n)){n[u.message]=!0;var p=l?l():"";e("Failed "+i+" type: "+u.message+(null!=p?p:""))}}}return o.resetWarningCache=function(){"production"!==process.env.NODE_ENV&&(n={})},HH=o}(),a=function(){};function i(){return null}return"production"!==process.env.NODE_ENV&&(a=function(e){var t="Warning: "+e;"undefined"!=typeof console&&console.error(t);try{throw new Error(t)}catch(e){}}),WH=function(s,l){var c="function"==typeof Symbol&&Symbol.iterator,u="<<anonymous>>",d={array:m("array"),bigint:m("bigint"),bool:m("boolean"),func:m("function"),number:m("number"),object:m("object"),string:m("string"),symbol:m("symbol"),any:g(i),arrayOf:function(e){return g(function(t,r,o,a,i){if("function"!=typeof e)return new f("Property `"+i+"` of component `"+o+"` has invalid PropType notation inside arrayOf.");var s=t[r];if(!Array.isArray(s))return new f("Invalid "+a+" `"+i+"` of type `"+y(s)+"` supplied to `"+o+"`, expected an array.");for(var l=0;l<s.length;l++){var c=e(s,l,o,a,i+"["+l+"]",n);if(c instanceof Error)return c}return null})},element:g(function(e,t,n,r,o){var a=e[t];return s(a)?null:new f("Invalid "+r+" `"+o+"` of type `"+y(a)+"` supplied to `"+n+"`, expected a single ReactElement.")}),elementType:g(function(t,n,r,o,a){var i=t[n];return e.isValidElementType(i)?null:new f("Invalid "+o+" `"+a+"` of type `"+y(i)+"` supplied to `"+r+"`, expected a single ReactElement type.")}),instanceOf:function(e){return g(function(t,n,r,o,a){if(!(t[n]instanceof e)){var i=e.name||u;return new f("Invalid "+o+" `"+a+"` of type `"+((s=t[n]).constructor&&s.constructor.name?s.constructor.name:u)+"` supplied to `"+r+"`, expected instance of `"+i+"`.")}var s;return null})},node:g(function(e,t,n,r,o){return b(e[t])?null:new f("Invalid "+r+" `"+o+"` supplied to `"+n+"`, expected a ReactNode.")}),objectOf:function(e){return g(function(t,o,a,i,s){if("function"!=typeof e)return new f("Property `"+s+"` of component `"+a+"` has invalid PropType notation inside objectOf.");var l=t[o],c=y(l);if("object"!==c)return new f("Invalid "+i+" `"+s+"` of type `"+c+"` supplied to `"+a+"`, expected an object.");for(var u in l)if(r(l,u)){var d=e(l,u,a,i,s+"."+u,n);if(d instanceof Error)return d}return null})},oneOf:function(e){return Array.isArray(e)?g(function(t,n,r,o,a){for(var i=t[n],s=0;s<e.length;s++)if(p(i,e[s]))return null;var l=JSON.stringify(e,function(e,t){return"symbol"===v(t)?String(t):t});return new f("Invalid "+o+" `"+a+"` of value `"+String(i)+"` supplied to `"+r+"`, expected one of "+l+".")}):("production"!==process.env.NODE_ENV&&a(arguments.length>1?"Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).":"Invalid argument supplied to oneOf, expected an array."),i)},oneOfType:function(e){if(!Array.isArray(e))return"production"!==process.env.NODE_ENV&&a("Invalid argument supplied to oneOfType, expected an instance of array."),i;for(var t=0;t<e.length;t++){var o=e[t];if("function"!=typeof o)return a("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+w(o)+" at index "+t+"."),i}return g(function(t,o,a,i,s){for(var l=[],c=0;c<e.length;c++){var u=(0,e[c])(t,o,a,i,s,n);if(null==u)return null;u.data&&r(u.data,"expectedType")&&l.push(u.data.expectedType)}return new f("Invalid "+i+" `"+s+"` supplied to `"+a+"`"+(l.length>0?", expected one of type ["+l.join(", ")+"]":"")+".")})},shape:function(e){return g(function(t,r,o,a,i){var s=t[r],l=y(s);if("object"!==l)return new f("Invalid "+a+" `"+i+"` of type `"+l+"` supplied to `"+o+"`, expected `object`.");for(var c in e){var u=e[c];if("function"!=typeof u)return h(o,a,i,c,v(u));var d=u(s,c,o,a,i+"."+c,n);if(d)return d}return null})},exact:function(e){return g(function(o,a,i,s,l){var c=o[a],u=y(c);if("object"!==u)return new f("Invalid "+s+" `"+l+"` of type `"+u+"` supplied to `"+i+"`, expected `object`.");var d=t({},o[a],e);for(var p in d){var g=e[p];if(r(e,p)&&"function"!=typeof g)return h(i,s,l,p,v(g));if(!g)return new f("Invalid "+s+" `"+l+"` key `"+p+"` supplied to `"+i+"`.\nBad object: "+JSON.stringify(o[a],null," ")+"\nValid keys: "+JSON.stringify(Object.keys(e),null," "));var m=g(c,p,i,s,l+"."+p,n);if(m)return m}return null})}};function p(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}function f(e,t){this.message=e,this.data=t&&"object"==typeof t?t:{},this.stack=""}function g(e){if("production"!==process.env.NODE_ENV)var t={},r=0;function o(o,i,s,c,d,p,g){if(c=c||u,p=p||s,g!==n){if(l){var m=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw m.name="Invariant Violation",m}if("production"!==process.env.NODE_ENV&&"undefined"!=typeof console){var h=c+":"+s;!t[h]&&r<3&&(a("You are manually calling a React.PropTypes validation function for the `"+p+"` prop on `"+c+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),t[h]=!0,r++)}}return null==i[s]?o?null===i[s]?new f("The "+d+" `"+p+"` is marked as required in `"+c+"`, but its value is `null`."):new f("The "+d+" `"+p+"` is marked as required in `"+c+"`, but its value is `undefined`."):null:e(i,s,c,d,p)}var i=o.bind(null,!1);return i.isRequired=o.bind(null,!0),i}function m(e){return g(function(t,n,r,o,a,i){var s=t[n];return y(s)!==e?new f("Invalid "+o+" `"+a+"` of type `"+v(s)+"` supplied to `"+r+"`, expected `"+e+"`.",{expectedType:e}):null})}function h(e,t,n,r,o){return new f((e||"React class")+": "+t+" type `"+n+"."+r+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+o+"`.")}function b(e){switch(typeof e){case"number":case"string":case"undefined":return!0;case"boolean":return!e;case"object":if(Array.isArray(e))return e.every(b);if(null===e||s(e))return!0;var t=function(e){var t=e&&(c&&e[c]||e["@@iterator"]);if("function"==typeof t)return t}(e);if(!t)return!1;var n,r=t.call(e);if(t!==e.entries){for(;!(n=r.next()).done;)if(!b(n.value))return!1}else for(;!(n=r.next()).done;){var o=n.value;if(o&&!b(o[1]))return!1}return!0;default:return!1}}function y(e){var t=typeof e;return Array.isArray(e)?"array":e instanceof RegExp?"object":function(e,t){return"symbol"===e||!!t&&("Symbol"===t["@@toStringTag"]||"function"==typeof Symbol&&t instanceof Symbol)}(t,e)?"symbol":t}function v(e){if(null==e)return""+e;var t=y(e);if("object"===t){if(e instanceof Date)return"date";if(e instanceof RegExp)return"regexp"}return t}function w(e){var t=v(e);switch(t){case"array":case"object":return"an "+t;case"boolean":case"date":case"regexp":return"a "+t;default:return t}}return f.prototype=Error.prototype,d.checkPropTypes=o,d.resetWarningCache=o.resetWarningCache,d.PropTypes=d,d},WH}()(nV.isElement,!0)}else LH.exports=function(){if(XH)return KH;XH=1;var e=eV();function t(){}function n(){}return n.resetWarningCache=t,KH=function(){function r(t,n,r,o,a,i){if(i!==e){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function o(){return r}r.isRequired=r;var a={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:o,element:r,elementType:r,instanceOf:o,node:r,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:n,resetWarningCache:t};return a.PropTypes=a,a}}()();var rV=LH.exports;const{getOwnPropertyNames:oV,getOwnPropertySymbols:aV}=Object,{hasOwnProperty:iV}=Object.prototype;function sV(e,t){return function(n,r,o){return e(n,r,o)&&t(n,r,o)}}function lV(e){return function(t,n,r){if(!t||!n||"object"!=typeof t||"object"!=typeof n)return e(t,n,r);const{cache:o}=r,a=o.get(t),i=o.get(n);if(a&&i)return a===n&&i===t;o.set(t,n),o.set(n,t);const s=e(t,n,r);return o.delete(t),o.delete(n),s}}function cV(e){return oV(e).concat(aV(e))}const uV=Object.hasOwn||((e,t)=>iV.call(e,t));function dV(e,t){return e===t||!e&&!t&&e!=e&&t!=t}const{getOwnPropertyDescriptor:pV,keys:fV}=Object;function gV(e,t){return e.byteLength===t.byteLength&&OV(new Uint8Array(e),new Uint8Array(t))}function mV(e,t,n){let r=e.length;if(t.length!==r)return!1;for(;r-- >0;)if(!n.equals(e[r],t[r],r,r,e,t,n))return!1;return!0}function hV(e,t){return e.byteLength===t.byteLength&&OV(new Uint8Array(e.buffer,e.byteOffset,e.byteLength),new Uint8Array(t.buffer,t.byteOffset,t.byteLength))}function bV(e,t){return dV(e.getTime(),t.getTime())}function yV(e,t){return e.name===t.name&&e.message===t.message&&e.cause===t.cause&&e.stack===t.stack}function vV(e,t){return e===t}function wV(e,t,n){const r=e.size;if(r!==t.size)return!1;if(!r)return!0;const o=new Array(r),a=e.entries();let i,s,l=0;for(;(i=a.next())&&!i.done;){const r=t.entries();let a=!1,c=0;for(;(s=r.next())&&!s.done;){if(o[c]){c++;continue}const r=i.value,u=s.value;if(n.equals(r[0],u[0],l,c,e,t,n)&&n.equals(r[1],u[1],r[0],u[0],e,t,n)){a=o[c]=!0;break}c++}if(!a)return!1;l++}return!0}const SV=dV;function xV(e,t,n){const r=fV(e);let o=r.length;if(fV(t).length!==o)return!1;for(;o-- >0;)if(!IV(e,t,n,r[o]))return!1;return!0}function EV(e,t,n){const r=cV(e);let o,a,i,s=r.length;if(cV(t).length!==s)return!1;for(;s-- >0;){if(o=r[s],!IV(e,t,n,o))return!1;if(a=pV(e,o),i=pV(t,o),(a||i)&&(!a||!i||a.configurable!==i.configurable||a.enumerable!==i.enumerable||a.writable!==i.writable))return!1}return!0}function kV(e,t){return dV(e.valueOf(),t.valueOf())}function AV(e,t){return e.source===t.source&&e.flags===t.flags}function TV(e,t,n){const r=e.size;if(r!==t.size)return!1;if(!r)return!0;const o=new Array(r),a=e.values();let i,s;for(;(i=a.next())&&!i.done;){const r=t.values();let a=!1,l=0;for(;(s=r.next())&&!s.done;){if(!o[l]&&n.equals(i.value,s.value,i.value,s.value,e,t,n)){a=o[l]=!0;break}l++}if(!a)return!1}return!0}function OV(e,t){let n=e.byteLength;if(t.byteLength!==n||e.byteOffset!==t.byteOffset)return!1;for(;n-- >0;)if(e[n]!==t[n])return!1;return!0}function CV(e,t){return e.hostname===t.hostname&&e.pathname===t.pathname&&e.protocol===t.protocol&&e.port===t.port&&e.hash===t.hash&&e.username===t.username&&e.password===t.password}function IV(e,t,n,r){return!("_owner"!==r&&"__o"!==r&&"__v"!==r||!e.$$typeof&&!t.$$typeof)||uV(t,r)&&n.equals(e[r],t[r],r,r,e,t,n)}const NV={"[object Int8Array]":!0,"[object Uint8Array]":!0,"[object Uint8ClampedArray]":!0,"[object Int16Array]":!0,"[object Uint16Array]":!0,"[object Int32Array]":!0,"[object Uint32Array]":!0,"[object Float16Array]":!0,"[object Float32Array]":!0,"[object Float64Array]":!0,"[object BigInt64Array]":!0,"[object BigUint64Array]":!0},RV=Object.prototype.toString;function _V({areArrayBuffersEqual:e,areArraysEqual:t,areDataViewsEqual:n,areDatesEqual:r,areErrorsEqual:o,areFunctionsEqual:a,areMapsEqual:i,areNumbersEqual:s,areObjectsEqual:l,arePrimitiveWrappersEqual:c,areRegExpsEqual:u,areSetsEqual:d,areTypedArraysEqual:p,areUrlsEqual:f,unknownTagComparators:g}){return function(m,h,b){if(m===h)return!0;if(null==m||null==h)return!1;const y=typeof m;if(y!==typeof h)return!1;if("object"!==y)return"number"===y?s(m,h,b):"function"===y&&a(m,h,b);const v=m.constructor;if(v!==h.constructor)return!1;if(v===Object)return l(m,h,b);if(Array.isArray(m))return t(m,h,b);if(v===Date)return r(m,h,b);if(v===RegExp)return u(m,h,b);if(v===Map)return i(m,h,b);if(v===Set)return d(m,h,b);const w=RV.call(m);if("[object Date]"===w)return r(m,h,b);if("[object RegExp]"===w)return u(m,h,b);if("[object Map]"===w)return i(m,h,b);if("[object Set]"===w)return d(m,h,b);if("[object Object]"===w)return"function"!=typeof m.then&&"function"!=typeof h.then&&l(m,h,b);if("[object URL]"===w)return f(m,h,b);if("[object Error]"===w)return o(m,h,b);if("[object Arguments]"===w)return l(m,h,b);if(NV[w])return p(m,h,b);if("[object ArrayBuffer]"===w)return e(m,h,b);if("[object DataView]"===w)return n(m,h,b);if("[object Boolean]"===w||"[object Number]"===w||"[object String]"===w)return c(m,h,b);if(g){let e=g[w];if(!e){const t=null!=(S=m)?S[Symbol.toStringTag]:void 0;t&&(e=g[t])}if(e)return e(m,h,b)}var S;return!1}}const PV=LV();function LV(e={}){const{circular:t=!1,createInternalComparator:n,createState:r,strict:o=!1}=e,a=function({circular:e,createCustomConfig:t,strict:n}){let r={areArrayBuffersEqual:gV,areArraysEqual:n?EV:mV,areDataViewsEqual:hV,areDatesEqual:bV,areErrorsEqual:yV,areFunctionsEqual:vV,areMapsEqual:n?sV(wV,EV):wV,areNumbersEqual:SV,areObjectsEqual:n?EV:xV,arePrimitiveWrappersEqual:kV,areRegExpsEqual:AV,areSetsEqual:n?sV(TV,EV):TV,areTypedArraysEqual:n?sV(OV,EV):OV,areUrlsEqual:CV,unknownTagComparators:void 0};if(t&&(r=Object.assign({},r,t(r))),e){const e=lV(r.areArraysEqual),t=lV(r.areMapsEqual),n=lV(r.areObjectsEqual),o=lV(r.areSetsEqual);r=Object.assign({},r,{areArraysEqual:e,areMapsEqual:t,areObjectsEqual:n,areSetsEqual:o})}return r}(e),i=_V(a),s=n?n(i):(l=i,function(e,t,n,r,o,a,i){return l(e,t,i)});var l;return function({circular:e,comparator:t,createState:n,equals:r,strict:o}){if(n)return function(a,i){const{cache:s=(e?new WeakMap:void 0),meta:l}=n();return t(a,i,{cache:s,equals:r,meta:l,strict:o})};if(e)return function(e,n){return t(e,n,{cache:new WeakMap,equals:r,meta:void 0,strict:o})};const a={cache:void 0,equals:r,meta:void 0,strict:o};return function(e,n){return t(e,n,a)}}({circular:t,comparator:i,createState:r,equals:s,strict:o})}function DV(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=-1;requestAnimationFrame(function r(o){n<0&&(n=o),o-n>t?(e(o),n=-1):function(e){"undefined"!=typeof requestAnimationFrame&&requestAnimationFrame(e)}(r)})}function MV(e){return MV="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},MV(e)}function jV(e){return function(e){if(Array.isArray(e))return e}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return FV(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return FV(e,t)}(e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function FV(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function BV(){var e=function(){return null},t=!1,n=function n(r){if(!t){if(Array.isArray(r)){if(!r.length)return;var o=jV(r),a=o[0],i=o.slice(1);return"number"==typeof a?void DV(n.bind(null,i),a):(n(a),void DV(n.bind(null,i)))}"object"===MV(r)&&e(r),"function"==typeof r&&r()}};return{stop:function(){t=!0},start:function(e){t=!1,n(e)},subscribe:function(t){return e=t,function(){e=function(){return null}}}}}function UV(e){return UV="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},UV(e)}function zV(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function $V(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?zV(Object(n),!0).forEach(function(t){GV(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):zV(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function GV(e,t,n){return(t=function(e){var t=function(e,t){if("object"!==UV(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!==UV(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===UV(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}LV({strict:!0}),LV({circular:!0}),LV({circular:!0,strict:!0}),LV({createInternalComparator:()=>dV}),LV({strict:!0,createInternalComparator:()=>dV}),LV({circular:!0,createInternalComparator:()=>dV}),LV({circular:!0,createInternalComparator:()=>dV,strict:!0});var qV=function(e){return e},HV=function(e,t){return Object.keys(t).reduce(function(n,r){return $V($V({},n),{},GV({},r,e(r,t[r])))},{})},VV=function(e,t,n){return e.map(function(e){return"".concat(function(e){return e.replace(/([A-Z])/g,function(e){return"-".concat(e.toLowerCase())})}(e)," ").concat(t,"ms ").concat(n)}).join(",")},WV="production"!==process.env.NODE_ENV,YV=function(e,t,n,r,o,a,i,s){if(WV&&"undefined"!=typeof console&&console.warn&&(void 0===t&&console.warn("LogUtils requires an error message argument"),!e))if(void 0===t)console.warn("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var l=[n,r,o,a,i,s],c=0;console.warn(t.replace(/%s/g,function(){return l[c++]}))}};function KV(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a,i,s=[],l=!0,c=!1;try{if(a=(n=n.call(e)).next,0===t);else for(;!(l=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(c)throw o}}return s}}(e,t)||ZV(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function XV(e){return function(e){if(Array.isArray(e))return QV(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||ZV(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ZV(e,t){if(e){if("string"==typeof e)return QV(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?QV(e,t):void 0}}function QV(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var JV=1e-4,eW=function(e,t){return[0,3*e,3*t-6*e,3*e-3*t+1]},tW=function(e,t){return e.map(function(e,n){return e*Math.pow(t,n)}).reduce(function(e,t){return e+t})},nW=function(e,t){return function(n){var r=eW(e,t);return tW(r,n)}},rW=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=t[0],o=t[1],a=t[2],i=t[3];if(1===t.length)switch(t[0]){case"linear":r=0,o=0,a=1,i=1;break;case"ease":r=.25,o=.1,a=.25,i=1;break;case"ease-in":r=.42,o=0,a=1,i=1;break;case"ease-out":r=.42,o=0,a=.58,i=1;break;case"ease-in-out":r=0,o=0,a=.58,i=1;break;default:var s=t[0].split("(");if("cubic-bezier"===s[0]&&4===s[1].split(")")[0].split(",").length){var l=s[1].split(")")[0].split(",").map(function(e){return parseFloat(e)}),c=KV(l,4);r=c[0],o=c[1],a=c[2],i=c[3]}else YV(!1,"[configBezier]: arguments should be one of oneOf 'linear', 'ease', 'ease-in', 'ease-out', 'ease-in-out','cubic-bezier(x1,y1,x2,y2)', instead received %s",t)}YV([r,a,o,i].every(function(e){return"number"==typeof e&&e>=0&&e<=1}),"[configBezier]: arguments should be x1, y1, x2, y2 of [0, 1] instead received %s",t);var u,d,p=nW(r,a),f=nW(o,i),g=(u=r,d=a,function(e){var t=eW(u,d),n=[].concat(XV(t.map(function(e,t){return e*t}).slice(1)),[0]);return tW(n,e)}),m=function(e){return e>1?1:e<0?0:e},h=function(e){for(var t=e>1?1:e,n=t,r=0;r<8;++r){var o=p(n)-t,a=g(n);if(Math.abs(o-t)<JV||a<JV)return f(n);n=m(n-o/a)}return f(n)};return h.isStepper=!1,h},oW=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=t[0];if("string"==typeof r)switch(r){case"ease":case"ease-in-out":case"ease-out":case"ease-in":case"linear":return rW(r);case"spring":return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.stiff,n=void 0===t?100:t,r=e.damping,o=void 0===r?8:r,a=e.dt,i=void 0===a?17:a,s=function(e,t,r){var a=r+(-(e-t)*n-r*o)*i/1e3,s=r*i/1e3+e;return Math.abs(s-t)<JV&&Math.abs(a)<JV?[t,0]:[s,a]};return s.isStepper=!0,s.dt=i,s}();default:if("cubic-bezier"===r.split("(")[0])return rW(r);YV(!1,"[configEasing]: first argument should be one of 'ease', 'ease-in', 'ease-out', 'ease-in-out','cubic-bezier(x1,y1,x2,y2)', 'linear' and 'spring', instead received %s",t)}return"function"==typeof r?r:(YV(!1,"[configEasing]: first argument type should be function or string, instead received %s",t),null)};function aW(e){return aW="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},aW(e)}function iW(e){return function(e){if(Array.isArray(e))return pW(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||dW(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function sW(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function lW(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?sW(Object(n),!0).forEach(function(t){cW(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):sW(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function cW(e,t,n){return(t=function(e){var t=function(e,t){if("object"!==aW(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!==aW(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===aW(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function uW(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a,i,s=[],l=!0,c=!1;try{if(a=(n=n.call(e)).next,0===t);else for(;!(l=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(c)throw o}}return s}}(e,t)||dW(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function dW(e,t){if(e){if("string"==typeof e)return pW(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?pW(e,t):void 0}}function pW(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var fW=function(e,t,n){return e+(t-e)*n},gW=function(e){return e.from!==e.to},mW=function e(t,n,r){var o=HV(function(e,n){if(gW(n)){var r=uW(t(n.from,n.to,n.velocity),2),o=r[0],a=r[1];return lW(lW({},n),{},{from:o,velocity:a})}return n},n);return r<1?HV(function(e,t){return gW(t)?lW(lW({},t),{},{velocity:fW(t.velocity,o[e].velocity,r),from:fW(t.from,o[e].from,r)}):t},n):e(t,o,r-1)},hW=function(e,t,n,r,o){var a,i,s,l,c=(a=e,i=t,[Object.keys(a),Object.keys(i)].reduce(function(e,t){return e.filter(function(e){return t.includes(e)})})),u=c.reduce(function(n,r){return lW(lW({},n),{},cW({},r,[e[r],t[r]]))},{}),d=c.reduce(function(n,r){return lW(lW({},n),{},cW({},r,{from:e[r],velocity:0,to:t[r]}))},{}),p=-1,f=function(){return null};return f=n.isStepper?function(r){s||(s=r);var a=(r-s)/n.dt;d=mW(n,d,a),o(lW(lW(lW({},e),t),HV(function(e,t){return t.from},d))),s=r,Object.values(d).filter(gW).length&&(p=requestAnimationFrame(f))}:function(a){l||(l=a);var i=(a-l)/r,s=HV(function(e,t){return fW.apply(void 0,iW(t).concat([n(i)]))},u);if(o(lW(lW(lW({},e),t),s)),i<1)p=requestAnimationFrame(f);else{var c=HV(function(e,t){return fW.apply(void 0,iW(t).concat([n(1)]))},u);o(lW(lW(lW({},e),t),c))}},function(){return requestAnimationFrame(f),function(){cancelAnimationFrame(p)}}};function bW(e){return bW="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},bW(e)}var yW=["children","begin","duration","attributeName","easing","isActive","steps","from","to","canBegin","onAnimationEnd","shouldReAnimate","onAnimationReStart"];function vW(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function wW(e){return function(e){if(Array.isArray(e))return SW(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return SW(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return SW(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function SW(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function xW(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function EW(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?xW(Object(n),!0).forEach(function(t){kW(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):xW(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function kW(e,t,n){return(t=TW(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function AW(e,t,n){return t&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,TW(r.key),r)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function TW(e){var t=function(e,t){if("object"!==bW(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!==bW(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===bW(t)?t:String(t)}function OW(e,t){return OW=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},OW(e,t)}function CW(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=RW(e);if(t){var o=RW(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return IW(this,n)}}function IW(e,t){if(t&&("object"===bW(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return NW(e)}function NW(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function RW(e){return RW=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},RW(e)}var _W=function(t){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&OW(e,t)}(r,t);var n=CW(r);function r(e,t){var o;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r);var a=(o=n.call(this,e,t)).props,i=a.isActive,s=a.attributeName,l=a.from,c=a.to,u=a.steps,d=a.children,p=a.duration;if(o.handleStyleChange=o.handleStyleChange.bind(NW(o)),o.changeStyle=o.changeStyle.bind(NW(o)),!i||p<=0)return o.state={style:{}},"function"==typeof d&&(o.state={style:c}),IW(o);if(u&&u.length)o.state={style:u[0].style};else if(l){if("function"==typeof d)return o.state={style:l},IW(o);o.state={style:s?kW({},s,l):l}}else o.state={style:{}};return o}return AW(r,[{key:"componentDidMount",value:function(){var e=this.props,t=e.isActive,n=e.canBegin;this.mounted=!0,t&&n&&this.runAnimation(this.props)}},{key:"componentDidUpdate",value:function(e){var t=this.props,n=t.isActive,r=t.canBegin,o=t.attributeName,a=t.shouldReAnimate,i=t.to,s=t.from,l=this.state.style;if(r)if(n){if(!(PV(e.to,i)&&e.canBegin&&e.isActive)){var c=!e.canBegin||!e.isActive;this.manager&&this.manager.stop(),this.stopJSAnimation&&this.stopJSAnimation();var u=c||a?s:e.to;if(this.state&&l){var d={style:o?kW({},o,u):u};(o&&l[o]!==u||!o&&l!==u)&&this.setState(d)}this.runAnimation(EW(EW({},this.props),{},{from:u,begin:0}))}}else{var p={style:o?kW({},o,i):i};this.state&&l&&(o&&l[o]!==i||!o&&l!==i)&&this.setState(p)}}},{key:"componentWillUnmount",value:function(){this.mounted=!1;var e=this.props.onAnimationEnd;this.unSubscribe&&this.unSubscribe(),this.manager&&(this.manager.stop(),this.manager=null),this.stopJSAnimation&&this.stopJSAnimation(),e&&e()}},{key:"handleStyleChange",value:function(e){this.changeStyle(e)}},{key:"changeStyle",value:function(e){this.mounted&&this.setState({style:e})}},{key:"runJSAnimation",value:function(e){var t=this,n=e.from,r=e.to,o=e.duration,a=e.easing,i=e.begin,s=e.onAnimationEnd,l=e.onAnimationStart,c=hW(n,r,oW(a),o,this.changeStyle);this.manager.start([l,i,function(){t.stopJSAnimation=c()},o,s])}},{key:"runStepAnimation",value:function(e){var t=this,n=e.steps,r=e.begin,o=e.onAnimationStart,a=n[0],i=a.style,s=a.duration,l=void 0===s?0:s;return this.manager.start([o].concat(wW(n.reduce(function(e,r,o){if(0===o)return e;var a=r.duration,i=r.easing,s=void 0===i?"ease":i,l=r.style,c=r.properties,u=r.onAnimationEnd,d=o>0?n[o-1]:r,p=c||Object.keys(l);if("function"==typeof s||"spring"===s)return[].concat(wW(e),[t.runJSAnimation.bind(t,{from:d.style,to:l,duration:a,easing:s}),a]);var f=VV(p,a,s),g=EW(EW(EW({},d.style),l),{},{transition:f});return[].concat(wW(e),[g,a,u]).filter(qV)},[i,Math.max(l,r)])),[e.onAnimationEnd]))}},{key:"runAnimation",value:function(e){this.manager||(this.manager=BV());var t=e.begin,n=e.duration,r=e.attributeName,o=e.to,a=e.easing,i=e.onAnimationStart,s=e.onAnimationEnd,l=e.steps,c=e.children,u=this.manager;if(this.unSubscribe=u.subscribe(this.handleStyleChange),"function"!=typeof a&&"function"!=typeof c&&"spring"!==a)if(l.length>1)this.runStepAnimation(e);else{var d=r?kW({},r,o):o,p=VV(Object.keys(d),n,a);u.start([i,t,EW(EW({},d),{},{transition:p}),n,s])}else this.runJSAnimation(e)}},{key:"render",value:function(){var t=this.props,n=t.children;t.begin;var r=t.duration;t.attributeName,t.easing;var o=t.isActive;t.steps,t.from,t.to,t.canBegin,t.onAnimationEnd,t.shouldReAnimate,t.onAnimationReStart;var a=vW(t,yW),i=e.Children.count(n),s=this.state.style;if("function"==typeof n)return n(s);if(!o||0===i||r<=0)return n;var l=function(t){var n=t.props,r=n.style,o=void 0===r?{}:r,i=n.className;return e.cloneElement(t,EW(EW({},a),{},{style:EW(EW({},o),s),className:i}))};return 1===i?l(e.Children.only(n)):e.createElement("div",null,e.Children.map(n,function(e){return l(e)}))}}]),r}(e.PureComponent);function PW(e){return PW="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},PW(e)}function LW(){return LW=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},LW.apply(this,arguments)}function DW(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a,i,s=[],l=!0,c=!1;try{if(a=(n=n.call(e)).next,0===t);else for(;!(l=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(c)throw o}}return s}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return MW(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return MW(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function MW(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function jW(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function FW(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?jW(Object(n),!0).forEach(function(t){BW(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):jW(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function BW(e,t,n){var r;return r=function(e,t){if("object"!=PW(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=PW(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(t,"string"),(t="symbol"==PW(r)?r:r+"")in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}_W.displayName="Animate",_W.defaultProps={begin:0,duration:1e3,from:"",to:"",attributeName:"",easing:"ease",isActive:!0,canBegin:!0,steps:[],onAnimationEnd:function(){},onAnimationStart:function(){}},_W.propTypes={from:rV.oneOfType([rV.object,rV.string]),to:rV.oneOfType([rV.object,rV.string]),attributeName:rV.string,duration:rV.number,begin:rV.number,easing:rV.oneOfType([rV.string,rV.func]),steps:rV.arrayOf(rV.shape({duration:rV.number.isRequired,style:rV.object.isRequired,easing:rV.oneOfType([rV.oneOf(["ease","ease-in","ease-out","ease-in-out","linear"]),rV.func]),properties:rV.arrayOf("string"),onAnimationEnd:rV.func})),children:rV.oneOfType([rV.node,rV.func]),isActive:rV.bool,canBegin:rV.bool,onAnimationEnd:rV.func,shouldReAnimate:rV.bool,onAnimationStart:rV.func,onAnimationReStart:rV.func};var UW=function(e,t,n,r,o){var a,i=Math.min(Math.abs(n)/2,Math.abs(r)/2),s=r>=0?1:-1,l=n>=0?1:-1,c=r>=0&&n>=0||r<0&&n<0?1:0;if(i>0&&o instanceof Array){for(var u=[0,0,0,0],d=0;d<4;d++)u[d]=o[d]>i?i:o[d];a="M".concat(e,",").concat(t+s*u[0]),u[0]>0&&(a+="A ".concat(u[0],",").concat(u[0],",0,0,").concat(c,",").concat(e+l*u[0],",").concat(t)),a+="L ".concat(e+n-l*u[1],",").concat(t),u[1]>0&&(a+="A ".concat(u[1],",").concat(u[1],",0,0,").concat(c,",\n ").concat(e+n,",").concat(t+s*u[1])),a+="L ".concat(e+n,",").concat(t+r-s*u[2]),u[2]>0&&(a+="A ".concat(u[2],",").concat(u[2],",0,0,").concat(c,",\n ").concat(e+n-l*u[2],",").concat(t+r)),a+="L ".concat(e+l*u[3],",").concat(t+r),u[3]>0&&(a+="A ".concat(u[3],",").concat(u[3],",0,0,").concat(c,",\n ").concat(e,",").concat(t+r-s*u[3])),a+="Z"}else if(i>0&&o===+o&&o>0){var p=Math.min(i,o);a="M ".concat(e,",").concat(t+s*p,"\n A ").concat(p,",").concat(p,",0,0,").concat(c,",").concat(e+l*p,",").concat(t,"\n L ").concat(e+n-l*p,",").concat(t,"\n A ").concat(p,",").concat(p,",0,0,").concat(c,",").concat(e+n,",").concat(t+s*p,"\n L ").concat(e+n,",").concat(t+r-s*p,"\n A ").concat(p,",").concat(p,",0,0,").concat(c,",").concat(e+n-l*p,",").concat(t+r,"\n L ").concat(e+l*p,",").concat(t+r,"\n A ").concat(p,",").concat(p,",0,0,").concat(c,",").concat(e,",").concat(t+r-s*p," Z")}else a="M ".concat(e,",").concat(t," h ").concat(n," v ").concat(r," h ").concat(-n," Z");return a},zW=function(e,t){if(!e||!t)return!1;var n=e.x,r=e.y,o=t.x,a=t.y,i=t.width,s=t.height;if(Math.abs(i)>0&&Math.abs(s)>0){var l=Math.min(o,o+i),c=Math.max(o,o+i),u=Math.min(a,a+s),d=Math.max(a,a+s);return n>=l&&n<=c&&r>=u&&r<=d}return!1},$W={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},GW=function(t){var n=FW(FW({},$W),t),r=e.useRef(),o=DW(e.useState(-1),2),a=o[0],i=o[1];e.useEffect(function(){if(r.current&&r.current.getTotalLength)try{var e=r.current.getTotalLength();e&&i(e)}catch(e){}},[]);var s=n.x,l=n.y,c=n.width,u=n.height,d=n.radius,p=n.className,f=n.animationEasing,g=n.animationDuration,m=n.animationBegin,h=n.isAnimationActive,b=n.isUpdateAnimationActive;if(s!==+s||l!==+l||c!==+c||u!==+u||0===c||0===u)return null;var y=Rk("recharts-rectangle",p);return b?e.createElement(_W,{canBegin:a>0,from:{width:c,height:u,x:s,y:l},to:{width:c,height:u,x:s,y:l},duration:g,animationEasing:f,isActive:b},function(t){var o=t.width,i=t.height,s=t.x,l=t.y;return e.createElement(_W,{canBegin:a>0,from:"0px ".concat(-1===a?1:a,"px"),to:"".concat(a,"px 0px"),attributeName:"strokeDasharray",begin:m,duration:g,isActive:h,easing:f},e.createElement("path",LW({},eC(n,!0),{className:y,d:UW(s,l,o,i,d),ref:r})))}):e.createElement("path",LW({},eC(n,!0),{className:y,d:UW(s,l,c,u,d)}))},qW=["points","className","baseLinePoints","connectNulls"];function HW(){return HW=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},HW.apply(this,arguments)}function VW(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function WW(e){return function(e){if(Array.isArray(e))return YW(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return YW(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return YW(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function YW(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var KW=function(e){return e&&e.x===+e.x&&e.y===+e.y},XW=function(e,t){var n=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=[[]];return e.forEach(function(e){KW(e)?t[t.length-1].push(e):t[t.length-1].length>0&&t.push([])}),KW(e[0])&&t[t.length-1].push(e[0]),t[t.length-1].length<=0&&(t=t.slice(0,-1)),t}(e);t&&(n=[n.reduce(function(e,t){return[].concat(WW(e),WW(t))},[])]);var r=n.map(function(e){return e.reduce(function(e,t,n){return"".concat(e).concat(0===n?"M":"L").concat(t.x,",").concat(t.y)},"")}).join("");return 1===n.length?"".concat(r,"Z"):r},ZW=function(t){var n=t.points,r=t.className,o=t.baseLinePoints,a=t.connectNulls,i=VW(t,qW);if(!n||!n.length)return null;var s=Rk("recharts-polygon",r);if(o&&o.length){var l=i.stroke&&"none"!==i.stroke,c=function(e,t,n){var r=XW(e,n);return"".concat("Z"===r.slice(-1)?r.slice(0,-1):r,"L").concat(XW(t.reverse(),n).slice(1))}(n,o,a);return e.createElement("g",{className:s},e.createElement("path",HW({},eC(i,!0),{fill:"Z"===c.slice(-1)?i.fill:"none",stroke:"none",d:c})),l?e.createElement("path",HW({},eC(i,!0),{fill:"none",d:XW(n,a)})):null,l?e.createElement("path",HW({},eC(i,!0),{fill:"none",d:XW(o,a)})):null)}var u=XW(n,a);return e.createElement("path",HW({},eC(i,!0),{fill:"Z"===u.slice(-1)?i.fill:"none",className:s,d:u}))};function QW(){return QW=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},QW.apply(this,arguments)}var JW=function(e){var t=e.cx,n=e.cy,r=e.r,o=Rk("recharts-dot",e.className);return t===+t&&n===+n&&r===+r?i.createElement("circle",QW({},eC(e,!1),FO(e),{className:o,cx:t,cy:n,r:r})):null};function eY(e){return eY="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},eY(e)}var tY=["x","y","top","left","width","height","className"];function nY(){return nY=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},nY.apply(this,arguments)}function rY(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function oY(e,t,n){var r;return r=function(e,t){if("object"!=eY(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=eY(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(t,"string"),(t="symbol"==eY(r)?r:r+"")in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function aY(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var iY=function(e,t,n,r,o,a){return"M".concat(e,",").concat(o,"v").concat(r,"M").concat(a,",").concat(t,"h").concat(n)},sY=function(t){var n=t.x,r=void 0===n?0:n,o=t.y,a=void 0===o?0:o,i=t.top,s=void 0===i?0:i,l=t.left,c=void 0===l?0:l,u=t.width,d=void 0===u?0:u,p=t.height,f=void 0===p?0:p,g=t.className,m=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?rY(Object(n),!0).forEach(function(t){oY(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):rY(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}({x:r,y:a,top:s,left:c,width:d,height:f},aY(t,tY));return EO(r)&&EO(a)&&EO(d)&&EO(f)&&EO(s)&&EO(c)?e.createElement("path",nY({},eC(m,!0),{className:Rk("recharts-cross",g),d:iY(r,a,d,f,s,c)})):null},lY=s$,cY=l$,uY=UP;var dY=function(e,t){return e&&e.length?lY(e,uY(t),cY):void 0},pY=s$,fY=UP,gY=f$;var mY=function(e,t){return e&&e.length?pY(e,fY(t),gY):void 0},hY=["cx","cy","angle","ticks","axisLine"],bY=["ticks","tick","angle","tickFormatter","stroke"];function yY(e){return yY="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},yY(e)}function vY(){return vY=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},vY.apply(this,arguments)}function wY(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function SY(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?wY(Object(n),!0).forEach(function(t){CY(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):wY(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function xY(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function EY(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,IY(r.key),r)}}function kY(e,t,n){return t=TY(t),function(e,t){if(t&&("object"===yY(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,AY()?Reflect.construct(t,n||[],TY(e).constructor):t.apply(e,n))}function AY(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(AY=function(){return!!e})()}function TY(e){return TY=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},TY(e)}function OY(e,t){return OY=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},OY(e,t)}function CY(e,t,n){return(t=IY(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function IY(e){var t=function(e,t){if("object"!=yY(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=yY(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==yY(t)?t:t+""}var NY=function(t){function n(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),kY(this,n,arguments)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&OY(e,t)}(n,t),r=n,o=[{key:"getTickValueCoord",value:function(e){var t=e.coordinate,n=this.props,r=n.angle,o=n.cx,a=n.cy;return Mq(o,a,t,r)}},{key:"getTickTextAnchor",value:function(){var e;switch(this.props.orientation){case"left":e="end";break;case"right":e="start";break;default:e="middle"}return e}},{key:"getViewBox",value:function(){var e=this.props,t=e.cx,n=e.cy,r=e.angle,o=e.ticks,a=dY(o,function(e){return e.coordinate||0});return{cx:t,cy:n,startAngle:r,endAngle:r,innerRadius:mY(o,function(e){return e.coordinate||0}).coordinate||0,outerRadius:a.coordinate||0}}},{key:"renderAxisLine",value:function(){var t=this.props,n=t.cx,r=t.cy,o=t.angle,a=t.ticks,i=t.axisLine,s=xY(t,hY),l=a.reduce(function(e,t){return[Math.min(e[0],t.coordinate),Math.max(e[1],t.coordinate)]},[1/0,-1/0]),c=Mq(n,r,l[0],o),u=Mq(n,r,l[1],o),d=SY(SY(SY({},eC(s,!1)),{},{fill:"none"},eC(i,!1)),{},{x1:c.x,y1:c.y,x2:u.x,y2:u.y});return e.createElement("line",vY({className:"recharts-polar-radius-axis-line"},d))}},{key:"renderTicks",value:function(){var t=this,r=this.props,o=r.ticks,a=r.tick,i=r.angle,s=r.tickFormatter,l=r.stroke,c=xY(r,bY),u=this.getTickTextAnchor(),d=eC(c,!1),p=eC(a,!1),f=o.map(function(r,o){var c=t.getTickValueCoord(r),f=SY(SY(SY(SY({textAnchor:u,transform:"rotate(".concat(90-i,", ").concat(c.x,", ").concat(c.y,")")},d),{},{stroke:"none",fill:l},p),{},{index:o},c),{},{payload:r});return e.createElement(dC,vY({className:Rk("recharts-polar-radius-axis-tick",zq(a)),key:"tick-".concat(r.coordinate)},BO(t.props,r,o)),n.renderTickItem(a,f,s?s(r.value,o):r.value))});return e.createElement(dC,{className:"recharts-polar-radius-axis-ticks"},f)}},{key:"render",value:function(){var t=this.props,n=t.ticks,r=t.axisLine,o=t.tick;return n&&n.length?e.createElement(dC,{className:Rk("recharts-polar-radius-axis",this.props.className)},r&&this.renderAxisLine(),o&&this.renderTicks(),Qq.renderCallByParent(this.props,this.getViewBox())):null}}],a=[{key:"renderTickItem",value:function(t,n,r){return e.isValidElement(t)?e.cloneElement(t,n):lA(t)?t(n):e.createElement(Ej,vY({},n,{className:"recharts-polar-radius-axis-tick-value"}),r)}}],o&&EY(r.prototype,o),a&&EY(r,a),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,o,a}(e.PureComponent);function RY(e){return RY="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},RY(e)}function _Y(){return _Y=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},_Y.apply(this,arguments)}function PY(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function LY(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?PY(Object(n),!0).forEach(function(t){UY(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):PY(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function DY(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,zY(r.key),r)}}function MY(e,t,n){return t=FY(t),function(e,t){if(t&&("object"===RY(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,jY()?Reflect.construct(t,n||[],FY(e).constructor):t.apply(e,n))}function jY(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(jY=function(){return!!e})()}function FY(e){return FY=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},FY(e)}function BY(e,t){return BY=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},BY(e,t)}function UY(e,t,n){return(t=zY(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function zY(e){var t=function(e,t){if("object"!=RY(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=RY(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==RY(t)?t:t+""}CY(NY,"displayName","PolarRadiusAxis"),CY(NY,"axisType","radiusAxis"),CY(NY,"defaultProps",{type:"number",radiusAxisId:0,cx:0,cy:0,angle:0,orientation:"right",stroke:"#ccc",axisLine:!0,tick:!0,tickCount:5,allowDataOverflow:!1,scale:"auto",allowDuplicatedCategory:!0});var $Y=Math.PI/180,GY=1e-5,qY=function(t){function n(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),MY(this,n,arguments)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&BY(e,t)}(n,t),r=n,o=[{key:"getTickLineCoord",value:function(e){var t=this.props,n=t.cx,r=t.cy,o=t.radius,a=t.orientation,i=t.tickSize||8,s=Mq(n,r,o,e.coordinate),l=Mq(n,r,o+("inner"===a?-1:1)*i,e.coordinate);return{x1:s.x,y1:s.y,x2:l.x,y2:l.y}}},{key:"getTickTextAnchor",value:function(e){var t=this.props.orientation,n=Math.cos(-e.coordinate*$Y);return n>GY?"outer"===t?"start":"end":n<-GY?"outer"===t?"end":"start":"middle"}},{key:"renderAxisLine",value:function(){var t=this.props,n=t.cx,r=t.cy,o=t.radius,a=t.axisLine,i=t.axisLineType,s=LY(LY({},eC(this.props,!1)),{},{fill:"none"},eC(a,!1));if("circle"===i)return e.createElement(JW,_Y({className:"recharts-polar-angle-axis-line"},s,{cx:n,cy:r,r:o}));var l=this.props.ticks.map(function(e){return Mq(n,r,o,e.coordinate)});return e.createElement(ZW,_Y({className:"recharts-polar-angle-axis-line"},s,{points:l}))}},{key:"renderTicks",value:function(){var t=this,r=this.props,o=r.ticks,a=r.tick,i=r.tickLine,s=r.tickFormatter,l=r.stroke,c=eC(this.props,!1),u=eC(a,!1),d=LY(LY({},c),{},{fill:"none"},eC(i,!1)),p=o.map(function(r,o){var p=t.getTickLineCoord(r),f=LY(LY(LY({textAnchor:t.getTickTextAnchor(r)},c),{},{stroke:"none",fill:l},u),{},{index:o,payload:r,x:p.x2,y:p.y2});return e.createElement(dC,_Y({className:Rk("recharts-polar-angle-axis-tick",zq(a)),key:"tick-".concat(r.coordinate)},BO(t.props,r,o)),i&&e.createElement("line",_Y({className:"recharts-polar-angle-axis-tick-line"},d,p)),a&&n.renderTickItem(a,f,s?s(r.value,o):r.value))});return e.createElement(dC,{className:"recharts-polar-angle-axis-ticks"},p)}},{key:"render",value:function(){var t=this.props,n=t.ticks,r=t.radius,o=t.axisLine;return r<=0||!n||!n.length?null:e.createElement(dC,{className:Rk("recharts-polar-angle-axis",this.props.className)},o&&this.renderAxisLine(),this.renderTicks())}}],a=[{key:"renderTickItem",value:function(t,n,r){return e.isValidElement(t)?e.cloneElement(t,n):lA(t)?t(n):e.createElement(Ej,_Y({},n,{className:"recharts-polar-angle-axis-tick-value"}),r)}}],o&&DY(r.prototype,o),a&&DY(r,a),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,o,a}(e.PureComponent);UY(qY,"displayName","PolarAngleAxis"),UY(qY,"axisType","angleAxis"),UY(qY,"defaultProps",{type:"category",angleAxisId:0,scale:"auto",cx:0,cy:0,orientation:"outer",axisLine:!0,tickLine:!0,tickSize:8,tick:!0,hide:!1,allowDuplicatedCategory:!0});var HY=HR(Object.getPrototypeOf,Object),VY=Yk,WY=HY,YY=Kk,KY=Function.prototype,XY=Object.prototype,ZY=KY.toString,QY=XY.hasOwnProperty,JY=ZY.call(Object);var eK=function(e){if(!YY(e)||"[object Object]"!=VY(e))return!1;var t=WY(e);if(null===t)return!0;var n=QY.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&ZY.call(n)==JY},tK=Yk,nK=Kk;var rK=function(e){return!0===e||!1===e||nK(e)&&"[object Boolean]"==tK(e)};function oK(e){return oK="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},oK(e)}function aK(){return aK=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},aK.apply(this,arguments)}function iK(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a,i,s=[],l=!0,c=!1;try{if(a=(n=n.call(e)).next,0===t);else for(;!(l=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(c)throw o}}return s}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return sK(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return sK(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function sK(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function lK(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function cK(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?lK(Object(n),!0).forEach(function(t){uK(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):lK(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function uK(e,t,n){var r;return r=function(e,t){if("object"!=oK(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=oK(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(t,"string"),(t="symbol"==oK(r)?r:r+"")in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var dK,pK=function(e,t,n,r,o){var a,i=n-r;return a="M ".concat(e,",").concat(t),a+="L ".concat(e+n,",").concat(t),a+="L ".concat(e+n-i/2,",").concat(t+o),a+="L ".concat(e+n-i/2-r,",").concat(t+o),a+="L ".concat(e,",").concat(t," Z")},fK={x:0,y:0,upperWidth:0,lowerWidth:0,height:0,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},gK=function(t){var n=cK(cK({},fK),t),r=e.useRef(),o=iK(e.useState(-1),2),a=o[0],i=o[1];e.useEffect(function(){if(r.current&&r.current.getTotalLength)try{var e=r.current.getTotalLength();e&&i(e)}catch(e){}},[]);var s=n.x,l=n.y,c=n.upperWidth,u=n.lowerWidth,d=n.height,p=n.className,f=n.animationEasing,g=n.animationDuration,m=n.animationBegin,h=n.isUpdateAnimationActive;if(s!==+s||l!==+l||c!==+c||u!==+u||d!==+d||0===c&&0===u||0===d)return null;var b=Rk("recharts-trapezoid",p);return h?e.createElement(_W,{canBegin:a>0,from:{upperWidth:0,lowerWidth:0,height:d,x:s,y:l},to:{upperWidth:c,lowerWidth:u,height:d,x:s,y:l},duration:g,animationEasing:f,isActive:h},function(t){var o=t.upperWidth,i=t.lowerWidth,s=t.height,l=t.x,c=t.y;return e.createElement(_W,{canBegin:a>0,from:"0px ".concat(-1===a?1:a,"px"),to:"".concat(a,"px 0px"),attributeName:"strokeDasharray",begin:m,duration:g,easing:f},e.createElement("path",aK({},eC(n,!0),{className:b,d:pK(l,c,o,i,s),ref:r})))}):e.createElement("g",null,e.createElement("path",aK({},eC(n,!0),{className:b,d:pK(s,l,c,u,d)})))},mK=["option","shapeType","propTransformer","activeClassName","isActive"];function hK(e){return hK="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},hK(e)}function bK(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function yK(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function vK(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?yK(Object(n),!0).forEach(function(t){wK(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):yK(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function wK(e,t,n){var r;return r=function(e,t){if("object"!=hK(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=hK(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(t,"string"),(t="symbol"==hK(r)?r:r+"")in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function SK(e,t){return vK(vK({},t),e)}function xK(t){var n=t.shapeType,r=t.elementProps;switch(n){case"rectangle":return e.createElement(GW,r);case"trapezoid":return e.createElement(gK,r);case"sector":return e.createElement(SH,r);case"symbols":if(function(e){return"symbols"===e}(n))return e.createElement(nN,r);break;default:return null}}function EK(t){var n,r=t.option,o=t.shapeType,a=t.propTransformer,i=void 0===a?SK:a,s=t.activeClassName,l=void 0===s?"recharts-active-shape":s,c=t.isActive,u=bK(t,mK);if(e.isValidElement(r))n=e.cloneElement(r,vK(vK({},u),function(t){return e.isValidElement(t)?t.props:t}(r)));else if(lA(r))n=r(u);else if(eK(r)&&!rK(r)){var d=i(r,u);n=e.createElement(xK,{shapeType:o,elementProps:d})}else{var p=u;n=e.createElement(xK,{shapeType:o,elementProps:p})}return c?e.createElement(dC,{className:l},n):n}function kK(e,t){return null!=t&&"trapezoids"in e.props}function AK(e,t){return null!=t&&"sectors"in e.props}function TK(e,t){return null!=t&&"points"in e.props}function OK(e,t){var n,r,o=e.x===(null==t||null===(n=t.labelViewBox)||void 0===n?void 0:n.x)||e.x===t.x,a=e.y===(null==t||null===(r=t.labelViewBox)||void 0===r?void 0:r.y)||e.y===t.y;return o&&a}function CK(e,t){var n=e.endAngle===t.endAngle,r=e.startAngle===t.startAngle;return n&&r}function IK(e,t){var n=e.x===t.x,r=e.y===t.y,o=e.z===t.z;return n&&r&&o}function NK(e){var t=e.activeTooltipItem,n=e.graphicalItem,r=e.itemData,o=function(e,t){var n;return kK(e,t)?n="trapezoids":AK(e,t)?n="sectors":TK(e,t)&&(n="points"),n}(n,t),a=function(e,t){var n,r;return kK(e,t)?null===(n=t.tooltipPayload)||void 0===n||null===(n=n[0])||void 0===n||null===(n=n.payload)||void 0===n?void 0:n.payload:AK(e,t)?null===(r=t.tooltipPayload)||void 0===r||null===(r=r[0])||void 0===r||null===(r=r.payload)||void 0===r?void 0:r.payload:TK(e,t)?t.payload:{}}(n,t),i=r.filter(function(e,r){var i=O$(a,e),s=n.props[o].filter(function(e){var r=function(e,t){var n;return kK(e,t)?n=OK:AK(e,t)?n=CK:TK(e,t)&&(n=IK),n}(n,t);return r(e,t)}),l=n.props[o].indexOf(s[s.length-1]);return i&&r===l});return r.indexOf(i[i.length-1])}function RK(e){return RK="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},RK(e)}function _K(){return _K=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},_K.apply(this,arguments)}function PK(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function LK(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?PK(Object(n),!0).forEach(function(t){UK(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):PK(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function DK(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,zK(r.key),r)}}function MK(e,t,n){return t=FK(t),function(e,t){if(t&&("object"===RK(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,jK()?Reflect.construct(t,n||[],FK(e).constructor):t.apply(e,n))}function jK(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(jK=function(){return!!e})()}function FK(e){return FK=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},FK(e)}function BK(e,t){return BK=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},BK(e,t)}function UK(e,t,n){return(t=zK(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function zK(e){var t=function(e,t){if("object"!=RK(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=RK(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==RK(t)?t:t+""}var $K=function(t){function n(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),UK(t=MK(this,n,[e]),"pieRef",null),UK(t,"sectorRefs",[]),UK(t,"id",TO("recharts-pie-")),UK(t,"handleAnimationEnd",function(){var e=t.props.onAnimationEnd;t.setState({isAnimationFinished:!0}),lA(e)&&e()}),UK(t,"handleAnimationStart",function(){var e=t.props.onAnimationStart;t.setState({isAnimationFinished:!1}),lA(e)&&e()}),t.state={isAnimationFinished:!e.isAnimationActive,prevIsAnimationActive:e.isAnimationActive,prevAnimationId:e.animationId,sectorToFocus:0},t}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&BK(e,t)}(n,t),r=n,o=[{key:"isActiveIndex",value:function(e){var t=this.props.activeIndex;return Array.isArray(t)?-1!==t.indexOf(e):e===t}},{key:"hasActiveIndex",value:function(){var e=this.props.activeIndex;return Array.isArray(e)?0!==e.length:e||0===e}},{key:"renderLabels",value:function(t){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var r=this.props,o=r.label,a=r.labelLine,i=r.dataKey,s=r.valueKey,l=eC(this.props,!1),c=eC(o,!1),u=eC(a,!1),d=o&&o.offsetRadius||20,p=t.map(function(t,r){var p=(t.startAngle+t.endAngle)/2,f=Mq(t.cx,t.cy,t.outerRadius+d,p),g=LK(LK(LK(LK({},l),t),{},{stroke:"none"},c),{},{index:r,textAnchor:n.getTextAnchor(f.x,t.cx)},f),m=LK(LK(LK(LK({},l),t),{},{fill:"none",stroke:t.fill},u),{},{index:r,points:[Mq(t.cx,t.cy,t.outerRadius,p),f]}),h=i;return aO(i)&&aO(s)?h="value":aO(i)&&(h=s),e.createElement(dC,{key:"label-".concat(t.startAngle,"-").concat(t.endAngle,"-").concat(t.midAngle,"-").concat(r)},a&&n.renderLabelLineItem(a,m,"line"),n.renderLabelItem(o,g,rq(t,h)))});return e.createElement(dC,{className:"recharts-pie-labels"},p)}},{key:"renderSectorsStatically",value:function(t){var n=this,r=this.props,o=r.activeShape,a=r.blendStroke,i=r.inactiveShape;return t.map(function(r,s){if(0===(null==r?void 0:r.startAngle)&&0===(null==r?void 0:r.endAngle)&&1!==t.length)return null;var l=n.isActiveIndex(s),c=i&&n.hasActiveIndex()?i:null,u=l?o:c,d=LK(LK({},r),{},{stroke:a?r.fill:r.stroke,tabIndex:-1});return e.createElement(dC,_K({ref:function(e){e&&!n.sectorRefs.includes(e)&&n.sectorRefs.push(e)},tabIndex:-1,className:"recharts-pie-sector"},BO(n.props,r,s),{key:"sector-".concat(null==r?void 0:r.startAngle,"-").concat(null==r?void 0:r.endAngle,"-").concat(r.midAngle,"-").concat(s)}),e.createElement(EK,_K({option:u,isActive:l,shapeType:"sector"},d)))})}},{key:"renderSectorsWithAnimation",value:function(){var t=this,n=this.props,r=n.sectors,o=n.isAnimationActive,a=n.animationBegin,i=n.animationDuration,s=n.animationEasing,l=n.animationId,c=this.state,u=c.prevSectors,d=c.prevIsAnimationActive;return e.createElement(_W,{begin:a,duration:i,isActive:o,easing:s,from:{t:0},to:{t:1},key:"pie-".concat(l,"-").concat(d),onAnimationStart:this.handleAnimationStart,onAnimationEnd:this.handleAnimationEnd},function(n){var o=n.t,a=[],i=(r&&r[0]).startAngle;return r.forEach(function(e,t){var n=u&&u[t],r=t>0?oO(e,"paddingAngle",0):0;if(n){var s=IO(n.endAngle-n.startAngle,e.endAngle-e.startAngle),l=LK(LK({},e),{},{startAngle:i+r,endAngle:i+s(o)+r});a.push(l),i=l.endAngle}else{var c=e.endAngle,d=e.startAngle,p=IO(0,c-d)(o),f=LK(LK({},e),{},{startAngle:i+r,endAngle:i+p+r});a.push(f),i=f.endAngle}}),e.createElement(dC,null,t.renderSectorsStatically(a))})}},{key:"attachKeyboardHandlers",value:function(e){var t=this;e.onkeydown=function(e){if(!e.altKey)switch(e.key){case"ArrowLeft":var n=++t.state.sectorToFocus%t.sectorRefs.length;t.sectorRefs[n].focus(),t.setState({sectorToFocus:n});break;case"ArrowRight":var r=--t.state.sectorToFocus<0?t.sectorRefs.length-1:t.state.sectorToFocus%t.sectorRefs.length;t.sectorRefs[r].focus(),t.setState({sectorToFocus:r});break;case"Escape":t.sectorRefs[t.state.sectorToFocus].blur(),t.setState({sectorToFocus:0})}}}},{key:"renderSectors",value:function(){var e=this.props,t=e.sectors,n=e.isAnimationActive,r=this.state.prevSectors;return!(n&&t&&t.length)||r&&O$(r,t)?this.renderSectorsStatically(t):this.renderSectorsWithAnimation()}},{key:"componentDidMount",value:function(){this.pieRef&&this.attachKeyboardHandlers(this.pieRef)}},{key:"render",value:function(){var t=this,n=this.props,r=n.hide,o=n.sectors,a=n.className,i=n.label,s=n.cx,l=n.cy,c=n.innerRadius,u=n.outerRadius,d=n.isAnimationActive,p=this.state.isAnimationFinished;if(r||!o||!o.length||!EO(s)||!EO(l)||!EO(c)||!EO(u))return null;var f=Rk("recharts-pie",a);return e.createElement(dC,{tabIndex:this.props.rootTabIndex,className:f,ref:function(e){t.pieRef=e}},this.renderSectors(),i&&this.renderLabels(o),Qq.renderCallByParent(this.props,null,!1),(!d||p)&&pH.renderCallByParent(this.props,o,!1))}}],a=[{key:"getDerivedStateFromProps",value:function(e,t){return t.prevIsAnimationActive!==e.isAnimationActive?{prevIsAnimationActive:e.isAnimationActive,prevAnimationId:e.animationId,curSectors:e.sectors,prevSectors:[],isAnimationFinished:!0}:e.isAnimationActive&&e.animationId!==t.prevAnimationId?{prevAnimationId:e.animationId,curSectors:e.sectors,prevSectors:t.curSectors,isAnimationFinished:!0}:e.sectors!==t.curSectors?{curSectors:e.sectors,isAnimationFinished:!0}:null}},{key:"getTextAnchor",value:function(e,t){return e>t?"start":e<t?"end":"middle"}},{key:"renderLabelLineItem",value:function(t,n,r){if(e.isValidElement(t))return e.cloneElement(t,n);if(lA(t))return t(n);var o=Rk("recharts-pie-label-line","boolean"!=typeof t?t.className:"");return e.createElement(PH,_K({},n,{key:r,type:"linear",className:o}))}},{key:"renderLabelItem",value:function(t,n,r){if(e.isValidElement(t))return e.cloneElement(t,n);var o=r;if(lA(t)&&(o=t(n),e.isValidElement(o)))return o;var a=Rk("recharts-pie-label-text","boolean"==typeof t||lA(t)?"":t.className);return e.createElement(Ej,_K({},n,{alignmentBaseline:"middle",className:a}),o)}}],o&&DK(r.prototype,o),a&&DK(r,a),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,o,a}(e.PureComponent);dK=$K,UK($K,"displayName","Pie"),UK($K,"defaultProps",{stroke:"#fff",fill:"#808080",legendType:"rect",cx:"50%",cy:"50%",startAngle:0,endAngle:360,innerRadius:0,outerRadius:"80%",paddingAngle:0,labelLine:!0,hide:!1,minAngle:0,isAnimationActive:!ZD,animationBegin:400,animationDuration:1500,animationEasing:"ease",nameKey:"name",blendStroke:!1,rootTabIndex:0}),UK($K,"parseDeltaAngle",function(e,t){return SO(t-e)*Math.min(Math.abs(t-e),360)}),UK($K,"getRealPieData",function(e){var t=e.data,n=e.children,r=eC(e,!1),o=KO(n,UM);return t&&t.length?t.map(function(e,t){return LK(LK(LK({payload:e},r),e),o&&o[t]&&o[t].props)}):o&&o.length?o.map(function(e){return LK(LK({},r),e.props)}):[]}),UK($K,"parseCoordinateOfPie",function(e,t){var n=t.top,r=t.left,o=t.width,a=t.height,i=jq(o,a);return{cx:r+OO(e.cx,o,o/2),cy:n+OO(e.cy,a,a/2),innerRadius:OO(e.innerRadius,i,0),outerRadius:OO(e.outerRadius,i,.8*i),maxRadius:e.maxRadius||Math.sqrt(o*o+a*a)/2}}),UK($K,"getComposedData",function(e){var t=e.item,n=e.offset,r=void 0!==t.type.defaultProps?LK(LK({},t.type.defaultProps),t.props):t.props,o=dK.getRealPieData(r);if(!o||!o.length)return null;var a=r.cornerRadius,i=r.startAngle,s=r.endAngle,l=r.paddingAngle,c=r.dataKey,u=r.nameKey,d=r.valueKey,p=r.tooltipType,f=Math.abs(r.minAngle),g=dK.parseCoordinateOfPie(r,n),m=dK.parseDeltaAngle(i,s),h=Math.abs(m),b=c;aO(c)&&aO(d)?(fC(!1,'Use "dataKey" to specify the value of pie,\n the props "valueKey" will be deprecated in 1.1.0'),b="value"):aO(c)&&(fC(!1,'Use "dataKey" to specify the value of pie,\n the props "valueKey" will be deprecated in 1.1.0'),b=d);var y,v,w=o.filter(function(e){return 0!==rq(e,b,0)}).length,S=h-w*f-(h>=360?w:w-1)*l,x=o.reduce(function(e,t){var n=rq(t,b,0);return e+(EO(n)?n:0)},0);x>0&&(y=o.map(function(e,t){var n,r=rq(e,b,0),o=rq(e,u,t),s=(EO(r)?r:0)/x,c=(n=t?v.endAngle+SO(m)*l*(0!==r?1:0):i)+SO(m)*((0!==r?f:0)+s*S),d=(n+c)/2,h=(g.innerRadius+g.outerRadius)/2,y=[{name:o,value:r,payload:e,dataKey:b,type:p}],w=Mq(g.cx,g.cy,h,d);return v=LK(LK(LK({percent:s,cornerRadius:a,name:o,tooltipPayload:y,midAngle:d,middleRadius:h,tooltipPosition:w},e),g),{},{value:rq(e,b),startAngle:n,endAngle:c,payload:e,paddingAngle:SO(m)*l})}));return LK(LK({},g),{},{sectors:y,data:o})});var GK=Math.ceil,qK=Math.max;var HK=function(e,t,n,r){for(var o=-1,a=qK(GK((t-e)/(n||1)),0),i=Array(a);a--;)i[r?a:++o]=e,e+=n;return i},VK=EM,WK=1/0;var YK=function(e){return e?(e=VK(e))===WK||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0},KK=HK,XK=wD,ZK=YK;var QK=function(e){return function(t,n,r){return r&&"number"!=typeof r&&XK(t,n,r)&&(n=r=void 0),t=ZK(t),void 0===n?(n=t,t=0):n=ZK(n),r=void 0===r?t<n?1:-1:ZK(r),KK(t,n,r,e)}}();function JK(e){return JK="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},JK(e)}function eX(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function tX(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?eX(Object(n),!0).forEach(function(t){nX(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):eX(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function nX(e,t,n){var r;return r=function(e,t){if("object"!=JK(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=JK(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(t,"string"),(t="symbol"==JK(r)?r:r+"")in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var rX=["Webkit","Moz","O","ms"];function oX(e){return oX="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},oX(e)}function aX(){return aX=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},aX.apply(this,arguments)}function iX(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function sX(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?iX(Object(n),!0).forEach(function(t){fX(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):iX(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function lX(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,gX(r.key),r)}}function cX(e,t,n){return t=dX(t),function(e,t){if(t&&("object"===oX(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,uX()?Reflect.construct(t,n||[],dX(e).constructor):t.apply(e,n))}function uX(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(uX=function(){return!!e})()}function dX(e){return dX=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},dX(e)}function pX(e,t){return pX=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},pX(e,t)}function fX(e,t,n){return(t=gX(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function gX(e){var t=function(e,t){if("object"!=oX(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=oX(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==oX(t)?t:t+""}var mX=function(e){return e.changedTouches&&!!e.changedTouches.length},hX=function(t){function n(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),fX(t=cX(this,n,[e]),"handleDrag",function(e){t.leaveTimer&&(clearTimeout(t.leaveTimer),t.leaveTimer=null),t.state.isTravellerMoving?t.handleTravellerMove(e):t.state.isSlideMoving&&t.handleSlideDrag(e)}),fX(t,"handleTouchMove",function(e){null!=e.changedTouches&&e.changedTouches.length>0&&t.handleDrag(e.changedTouches[0])}),fX(t,"handleDragEnd",function(){t.setState({isTravellerMoving:!1,isSlideMoving:!1},function(){var e=t.props,n=e.endIndex,r=e.onDragEnd,o=e.startIndex;null==r||r({endIndex:n,startIndex:o})}),t.detachDragEndListener()}),fX(t,"handleLeaveWrapper",function(){(t.state.isTravellerMoving||t.state.isSlideMoving)&&(t.leaveTimer=window.setTimeout(t.handleDragEnd,t.props.leaveTimeOut))}),fX(t,"handleEnterSlideOrTraveller",function(){t.setState({isTextActive:!0})}),fX(t,"handleLeaveSlideOrTraveller",function(){t.setState({isTextActive:!1})}),fX(t,"handleSlideDragStart",function(e){var n=mX(e)?e.changedTouches[0]:e;t.setState({isTravellerMoving:!1,isSlideMoving:!0,slideMoveStartX:n.pageX}),t.attachDragEndListener()}),t.travellerDragStartHandlers={startX:t.handleTravellerDragStart.bind(t,"startX"),endX:t.handleTravellerDragStart.bind(t,"endX")},t.state={},t}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&pX(e,t)}(n,t),r=n,o=[{key:"componentWillUnmount",value:function(){this.leaveTimer&&(clearTimeout(this.leaveTimer),this.leaveTimer=null),this.detachDragEndListener()}},{key:"getIndex",value:function(e){var t=e.startX,r=e.endX,o=this.state.scaleValues,a=this.props,i=a.gap,s=a.data.length-1,l=Math.min(t,r),c=Math.max(t,r),u=n.getIndexInRange(o,l),d=n.getIndexInRange(o,c);return{startIndex:u-u%i,endIndex:d===s?s:d-d%i}}},{key:"getTextOfTick",value:function(e){var t=this.props,n=t.data,r=t.tickFormatter,o=t.dataKey,a=rq(n[e],o,e);return lA(r)?r(a,e):a}},{key:"attachDragEndListener",value:function(){window.addEventListener("mouseup",this.handleDragEnd,!0),window.addEventListener("touchend",this.handleDragEnd,!0),window.addEventListener("mousemove",this.handleDrag,!0)}},{key:"detachDragEndListener",value:function(){window.removeEventListener("mouseup",this.handleDragEnd,!0),window.removeEventListener("touchend",this.handleDragEnd,!0),window.removeEventListener("mousemove",this.handleDrag,!0)}},{key:"handleSlideDrag",value:function(e){var t=this.state,n=t.slideMoveStartX,r=t.startX,o=t.endX,a=this.props,i=a.x,s=a.width,l=a.travellerWidth,c=a.startIndex,u=a.endIndex,d=a.onChange,p=e.pageX-n;p>0?p=Math.min(p,i+s-l-o,i+s-l-r):p<0&&(p=Math.max(p,i-r,i-o));var f=this.getIndex({startX:r+p,endX:o+p});f.startIndex===c&&f.endIndex===u||!d||d(f),this.setState({startX:r+p,endX:o+p,slideMoveStartX:e.pageX})}},{key:"handleTravellerDragStart",value:function(e,t){var n=mX(t)?t.changedTouches[0]:t;this.setState({isSlideMoving:!1,isTravellerMoving:!0,movingTravellerId:e,brushMoveStartX:n.pageX}),this.attachDragEndListener()}},{key:"handleTravellerMove",value:function(e){var t=this.state,n=t.brushMoveStartX,r=t.movingTravellerId,o=t.endX,a=t.startX,i=this.state[r],s=this.props,l=s.x,c=s.width,u=s.travellerWidth,d=s.onChange,p=s.gap,f=s.data,g={startX:this.state.startX,endX:this.state.endX},m=e.pageX-n;m>0?m=Math.min(m,l+c-u-i):m<0&&(m=Math.max(m,l-i)),g[r]=i+m;var h=this.getIndex(g),b=h.startIndex,y=h.endIndex;this.setState(fX(fX({},r,i+m),"brushMoveStartX",e.pageX),function(){var e;d&&(e=f.length-1,("startX"===r&&(o>a?b%p===0:y%p===0)||o<a&&y===e||"endX"===r&&(o>a?y%p===0:b%p===0)||o>a&&y===e)&&d(h))})}},{key:"handleTravellerMoveKeyboard",value:function(e,t){var n=this,r=this.state,o=r.scaleValues,a=r.startX,i=r.endX,s=this.state[t],l=o.indexOf(s);if(-1!==l){var c=l+e;if(!(-1===c||c>=o.length)){var u=o[c];"startX"===t&&u>=i||"endX"===t&&u<=a||this.setState(fX({},t,u),function(){n.props.onChange(n.getIndex({startX:n.state.startX,endX:n.state.endX}))})}}}},{key:"renderBackground",value:function(){var t=this.props,n=t.x,r=t.y,o=t.width,a=t.height,i=t.fill,s=t.stroke;return e.createElement("rect",{stroke:s,fill:i,x:n,y:r,width:o,height:a})}},{key:"renderPanorama",value:function(){var t=this.props,n=t.x,r=t.y,o=t.width,a=t.height,i=t.data,s=t.children,l=t.padding,c=e.Children.only(s);return c?e.cloneElement(c,{x:n,y:r,width:o,height:a,margin:l,compact:!0,data:i}):null}},{key:"renderTravellerLayer",value:function(t,r){var o,a,i=this,s=this.props,l=s.y,c=s.travellerWidth,u=s.height,d=s.traveller,p=s.ariaLabel,f=s.data,g=s.startIndex,m=s.endIndex,h=Math.max(t,this.props.x),b=sX(sX({},eC(this.props,!1)),{},{x:h,y:l,width:c,height:u}),y=p||"Min value: ".concat(null===(o=f[g])||void 0===o?void 0:o.name,", Max value: ").concat(null===(a=f[m])||void 0===a?void 0:a.name);return e.createElement(dC,{tabIndex:0,role:"slider","aria-label":y,"aria-valuenow":t,className:"recharts-brush-traveller",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.travellerDragStartHandlers[r],onTouchStart:this.travellerDragStartHandlers[r],onKeyDown:function(e){["ArrowLeft","ArrowRight"].includes(e.key)&&(e.preventDefault(),e.stopPropagation(),i.handleTravellerMoveKeyboard("ArrowRight"===e.key?1:-1,r))},onFocus:function(){i.setState({isTravellerFocused:!0})},onBlur:function(){i.setState({isTravellerFocused:!1})},style:{cursor:"col-resize"}},n.renderTraveller(d,b))}},{key:"renderSlide",value:function(t,n){var r=this.props,o=r.y,a=r.height,i=r.stroke,s=r.travellerWidth,l=Math.min(t,n)+s,c=Math.max(Math.abs(n-t)-s,0);return e.createElement("rect",{className:"recharts-brush-slide",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.handleSlideDragStart,onTouchStart:this.handleSlideDragStart,style:{cursor:"move"},stroke:"none",fill:i,fillOpacity:.2,x:l,y:o,width:c,height:a})}},{key:"renderText",value:function(){var t=this.props,n=t.startIndex,r=t.endIndex,o=t.y,a=t.height,i=t.travellerWidth,s=t.stroke,l=this.state,c=l.startX,u=l.endX,d={pointerEvents:"none",fill:s};return e.createElement(dC,{className:"recharts-brush-texts"},e.createElement(Ej,aX({textAnchor:"end",verticalAnchor:"middle",x:Math.min(c,u)-5,y:o+a/2},d),this.getTextOfTick(n)),e.createElement(Ej,aX({textAnchor:"start",verticalAnchor:"middle",x:Math.max(c,u)+i+5,y:o+a/2},d),this.getTextOfTick(r)))}},{key:"render",value:function(){var t=this.props,n=t.data,r=t.className,o=t.children,a=t.x,i=t.y,s=t.width,l=t.height,c=t.alwaysShowText,u=this.state,d=u.startX,p=u.endX,f=u.isTextActive,g=u.isSlideMoving,m=u.isTravellerMoving,h=u.isTravellerFocused;if(!n||!n.length||!EO(a)||!EO(i)||!EO(s)||!EO(l)||s<=0||l<=0)return null;var b=Rk("recharts-brush",r),y=1===e.Children.count(o),v=function(e,t){var n=e.replace(/(\w)/,function(e){return e.toUpperCase()}),r=rX.reduce(function(e,r){return tX(tX({},e),{},nX({},r+n,t))},{});return r[e]=t,r}("userSelect","none");return e.createElement(dC,{className:b,onMouseLeave:this.handleLeaveWrapper,onTouchMove:this.handleTouchMove,style:v},this.renderBackground(),y&&this.renderPanorama(),this.renderSlide(d,p),this.renderTravellerLayer(d,"startX"),this.renderTravellerLayer(p,"endX"),(f||g||m||h||c)&&this.renderText())}}],a=[{key:"renderDefaultTraveller",value:function(t){var n=t.x,r=t.y,o=t.width,a=t.height,i=t.stroke,s=Math.floor(r+a/2)-1;return e.createElement(e.Fragment,null,e.createElement("rect",{x:n,y:r,width:o,height:a,fill:i,stroke:"none"}),e.createElement("line",{x1:n+1,y1:s,x2:n+o-1,y2:s,fill:"none",stroke:"#fff"}),e.createElement("line",{x1:n+1,y1:s+2,x2:n+o-1,y2:s+2,fill:"none",stroke:"#fff"}))}},{key:"renderTraveller",value:function(t,r){return e.isValidElement(t)?e.cloneElement(t,r):lA(t)?t(r):n.renderDefaultTraveller(r)}},{key:"getDerivedStateFromProps",value:function(e,t){var n=e.data,r=e.width,o=e.x,a=e.travellerWidth,i=e.updateId,s=e.startIndex,l=e.endIndex;if(n!==t.prevData||i!==t.prevUpdateId)return sX({prevData:n,prevTravellerWidth:a,prevUpdateId:i,prevX:o,prevWidth:r},n&&n.length?function(e){var t=e.data,n=e.startIndex,r=e.endIndex,o=e.x,a=e.width,i=e.travellerWidth;if(!t||!t.length)return{};var s=t.length,l=Qj().domain(QK(0,s)).range([o,o+a-i]),c=l.domain().map(function(e){return l(e)});return{isTextActive:!1,isSlideMoving:!1,isTravellerMoving:!1,isTravellerFocused:!1,startX:l(n),endX:l(r),scale:l,scaleValues:c}}({data:n,width:r,x:o,travellerWidth:a,startIndex:s,endIndex:l}):{scale:null,scaleValues:null});if(t.scale&&(r!==t.prevWidth||o!==t.prevX||a!==t.prevTravellerWidth)){t.scale.range([o,o+r-a]);var c=t.scale.domain().map(function(e){return t.scale(e)});return{prevData:n,prevTravellerWidth:a,prevUpdateId:i,prevX:o,prevWidth:r,startX:t.scale(e.startIndex),endX:t.scale(e.endIndex),scaleValues:c}}return null}},{key:"getIndexInRange",value:function(e,t){for(var n=0,r=e.length-1;r-n>1;){var o=Math.floor((n+r)/2);e[o]>t?r=o:n=o}return t>=e[r]?r:n}}],o&&lX(r.prototype,o),a&&lX(r,a),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,o,a}(e.PureComponent);fX(hX,"displayName","Brush"),fX(hX,"defaultProps",{height:40,travellerWidth:5,gap:1,fill:"#fff",stroke:"#666",padding:{top:1,right:1,bottom:1,left:1},leaveTimeOut:1e3,alwaysShowText:!1});var bX=ML;var yX=function(e,t){var n;return bX(e,function(e,r,o){return!(n=t(e,r,o))}),!!n},vX=LN,wX=UP,SX=yX,xX=_k,EX=wD;var kX=function(e,t,n){var r=xX(e)?vX:SX;return n&&EX(e,t,n)&&(t=void 0),r(e,wX(t))},AX=function(e,t){var n=e.alwaysShow,r=e.ifOverflow;return n&&(r="extendDomain"),r===t},TX=aD;var OX=function(e,t,n){"__proto__"==t&&TX?TX(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n},CX=OX,IX=PL,NX=UP;var RX=function(e,t){var n={};return t=NX(t),IX(e,function(e,r,o){CX(n,r,t(e,r,o))}),n};var _X=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(!t(e[n],n,e))return!1;return!0},PX=ML;var LX=function(e,t){var n=!0;return PX(e,function(e,r,o){return n=!!t(e,r,o)}),n},DX=_X,MX=LX,jX=UP,FX=_k,BX=wD;var UX=function(e,t,n){var r=FX(e)?DX:MX;return n&&BX(e,t,n)&&(t=void 0),r(e,jX(t))},zX=["x","y"];function $X(e){return $X="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},$X(e)}function GX(){return GX=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},GX.apply(this,arguments)}function qX(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function HX(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?qX(Object(n),!0).forEach(function(t){VX(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):qX(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function VX(e,t,n){var r;return r=function(e,t){if("object"!=$X(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=$X(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(t,"string"),(t="symbol"==$X(r)?r:r+"")in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function WX(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function YX(e,t){var n=e.x,r=e.y,o=WX(e,zX),a="".concat(n),i=parseInt(a,10),s="".concat(r),l=parseInt(s,10),c="".concat(t.height||o.height),u=parseInt(c,10),d="".concat(t.width||o.width),p=parseInt(d,10);return HX(HX(HX(HX(HX({},t),o),i?{x:i}:{}),l?{y:l}:{}),{},{height:u,width:p,name:t.name,radius:t.radius})}function KX(t){return e.createElement(EK,GX({shapeType:"rectangle",propTransformer:YX,activeClassName:"recharts-active-bar"},t))}var XX,ZX=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return function(n,r){if("number"==typeof e)return e;var o=EO(n)||function(e){return aO(e)}(n);return o?e(n,r):(o||("production"!==process.env.NODE_ENV?RG(0,"minPointSize callback function received a value with type of ".concat($X(n),". Currently only numbers or null/undefined are supported.")):RG()),t)}},QX=["value","background"];function JX(e){return JX="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},JX(e)}function eZ(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function tZ(){return tZ=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},tZ.apply(this,arguments)}function nZ(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function rZ(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?nZ(Object(n),!0).forEach(function(t){cZ(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):nZ(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function oZ(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,uZ(r.key),r)}}function aZ(e,t,n){return t=sZ(t),function(e,t){if(t&&("object"===JX(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,iZ()?Reflect.construct(t,n||[],sZ(e).constructor):t.apply(e,n))}function iZ(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(iZ=function(){return!!e})()}function sZ(e){return sZ=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},sZ(e)}function lZ(e,t){return lZ=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},lZ(e,t)}function cZ(e,t,n){return(t=uZ(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function uZ(e){var t=function(e,t){if("object"!=JX(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=JX(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==JX(t)?t:t+""}var dZ=function(t){function n(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n);for(var t=arguments.length,r=new Array(t),o=0;o<t;o++)r[o]=arguments[o];return cZ(e=aZ(this,n,[].concat(r)),"state",{isAnimationFinished:!1}),cZ(e,"id",TO("recharts-bar-")),cZ(e,"handleAnimationEnd",function(){var t=e.props.onAnimationEnd;e.setState({isAnimationFinished:!0}),t&&t()}),cZ(e,"handleAnimationStart",function(){var t=e.props.onAnimationStart;e.setState({isAnimationFinished:!1}),t&&t()}),e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&lZ(e,t)}(n,t),r=n,o=[{key:"renderRectanglesStatically",value:function(t){var n=this,r=this.props,o=r.shape,a=r.dataKey,i=r.activeIndex,s=r.activeBar,l=eC(this.props,!1);return t&&t.map(function(t,r){var c=r===i,u=c?s:o,d=rZ(rZ(rZ({},l),t),{},{isActive:c,option:u,index:r,dataKey:a,onAnimationStart:n.handleAnimationStart,onAnimationEnd:n.handleAnimationEnd});return e.createElement(dC,tZ({className:"recharts-bar-rectangle"},BO(n.props,t,r),{key:"rectangle-".concat(null==t?void 0:t.x,"-").concat(null==t?void 0:t.y,"-").concat(null==t?void 0:t.value,"-").concat(r)}),e.createElement(KX,d))})}},{key:"renderRectanglesWithAnimation",value:function(){var t=this,n=this.props,r=n.data,o=n.layout,a=n.isAnimationActive,i=n.animationBegin,s=n.animationDuration,l=n.animationEasing,c=n.animationId,u=this.state.prevData;return e.createElement(_W,{begin:i,duration:s,isActive:a,easing:l,from:{t:0},to:{t:1},key:"bar-".concat(c),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(n){var a=n.t,i=r.map(function(e,t){var n=u&&u[t];if(n){var r=IO(n.x,e.x),i=IO(n.y,e.y),s=IO(n.width,e.width),l=IO(n.height,e.height);return rZ(rZ({},e),{},{x:r(a),y:i(a),width:s(a),height:l(a)})}if("horizontal"===o){var c=IO(0,e.height)(a);return rZ(rZ({},e),{},{y:e.y+e.height-c,height:c})}var d=IO(0,e.width)(a);return rZ(rZ({},e),{},{width:d})});return e.createElement(dC,null,t.renderRectanglesStatically(i))})}},{key:"renderRectangles",value:function(){var e=this.props,t=e.data,n=e.isAnimationActive,r=this.state.prevData;return!(n&&t&&t.length)||r&&O$(r,t)?this.renderRectanglesStatically(t):this.renderRectanglesWithAnimation()}},{key:"renderBackground",value:function(){var t=this,n=this.props,r=n.data,o=n.dataKey,a=n.activeIndex,i=eC(this.props.background,!1);return r.map(function(n,r){n.value;var s=n.background,l=eZ(n,QX);if(!s)return null;var c=rZ(rZ(rZ(rZ(rZ({},l),{},{fill:"#eee"},s),i),BO(t.props,n,r)),{},{onAnimationStart:t.handleAnimationStart,onAnimationEnd:t.handleAnimationEnd,dataKey:o,index:r,className:"recharts-bar-background-rectangle"});return e.createElement(KX,tZ({key:"background-bar-".concat(r),option:t.props.background,isActive:r===a},c))})}},{key:"renderErrorBar",value:function(t,n){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var r=this.props,o=r.data,a=r.xAxis,i=r.yAxis,s=r.layout,l=KO(r.children,HG);if(!l)return null;var c="vertical"===s?o[0].height/2:o[0].width/2,u=function(e,t){var n=Array.isArray(e.value)?e.value[1]:e.value;return{x:e.x,y:e.y,value:n,errorVal:rq(e,t)}},d={clipPath:t?"url(#clipPath-".concat(n,")"):null};return e.createElement(dC,d,l.map(function(t){return e.cloneElement(t,{key:"error-bar-".concat(n,"-").concat(t.props.dataKey),data:o,xAxis:a,yAxis:i,layout:s,offset:c,dataPointFormatter:u})}))}},{key:"render",value:function(){var t=this.props,n=t.hide,r=t.data,o=t.className,a=t.xAxis,i=t.yAxis,s=t.left,l=t.top,c=t.width,u=t.height,d=t.isAnimationActive,p=t.background,f=t.id;if(n||!r||!r.length)return null;var g=this.state.isAnimationFinished,m=Rk("recharts-bar",o),h=a&&a.allowDataOverflow,b=i&&i.allowDataOverflow,y=h||b,v=aO(f)?this.id:f;return e.createElement(dC,{className:m},h||b?e.createElement("defs",null,e.createElement("clipPath",{id:"clipPath-".concat(v)},e.createElement("rect",{x:h?s:s-c/2,y:b?l:l-u/2,width:h?c:2*c,height:b?u:2*u}))):null,e.createElement(dC,{className:"recharts-bar-rectangles",clipPath:y?"url(#clipPath-".concat(v,")"):null},p?this.renderBackground():null,this.renderRectangles()),this.renderErrorBar(y,v),(!d||g)&&pH.renderCallByParent(this.props,r))}}],a=[{key:"getDerivedStateFromProps",value:function(e,t){return e.animationId!==t.prevAnimationId?{prevAnimationId:e.animationId,curData:e.data,prevData:t.curData}:e.data!==t.curData?{curData:e.data}:null}}],o&&oZ(r.prototype,o),a&&oZ(r,a),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,o,a}(e.PureComponent);function pZ(e){return pZ="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},pZ(e)}function fZ(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,bZ(r.key),r)}}function gZ(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function mZ(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?gZ(Object(n),!0).forEach(function(t){hZ(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):gZ(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function hZ(e,t,n){return(t=bZ(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function bZ(e){var t=function(e,t){if("object"!=pZ(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=pZ(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==pZ(t)?t:t+""}XX=dZ,cZ(dZ,"displayName","Bar"),cZ(dZ,"defaultProps",{xAxisId:0,yAxisId:0,legendType:"rect",minPointSize:0,hide:!1,data:[],layout:"vertical",activeBar:!1,isAnimationActive:!ZD,animationBegin:0,animationDuration:400,animationEasing:"ease"}),cZ(dZ,"getComposedData",function(e){var t=e.props,n=e.item,r=e.barPosition,o=e.bandSize,a=e.xAxis,i=e.yAxis,s=e.xAxisTicks,l=e.yAxisTicks,c=e.stackedData,u=e.dataStartIndex,d=e.displayedData,p=e.offset,f=function(e,t){if(!e)return null;for(var n=0,r=e.length;n<r;n++)if(e[n].item===t)return e[n].position;return null}(r,n);if(!f)return null;var g=t.layout,m=n.type.defaultProps,h=void 0!==m?rZ(rZ({},m),n.props):n.props,b=h.dataKey,y=h.children,v=h.minPointSize,w="horizontal"===g?i:a,S=c?w.scale.domain():null,x=function(e){var t=e.numericAxis,n=t.scale.domain();if("number"===t.type){var r=Math.min(n[0],n[1]),o=Math.max(n[0],n[1]);return r<=0&&o>=0?0:o<0?o:r}return n[0]}({numericAxis:w}),E=KO(y,UM),k=d.map(function(e,t){var r,d,p,m,h,y;c?r=function(e,t){if(!t||2!==t.length||!EO(t[0])||!EO(t[1]))return e;var n=Math.min(t[0],t[1]),r=Math.max(t[0],t[1]),o=[e[0],e[1]];return(!EO(e[0])||e[0]<n)&&(o[0]=n),(!EO(e[1])||e[1]>r)&&(o[1]=r),o[0]>r&&(o[0]=r),o[1]<n&&(o[1]=n),o}(c[u+t],S):(r=rq(e,b),Array.isArray(r)||(r=[x,r]));var w=ZX(v,XX.defaultProps.minPointSize)(r[1],t);if("horizontal"===g){var k,A=[i.scale(r[0]),i.scale(r[1])],T=A[0],O=A[1];d=wq({axis:a,ticks:s,bandSize:o,offset:f.offset,entry:e,index:t}),p=null!==(k=null!=O?O:T)&&void 0!==k?k:void 0,m=f.size;var C=T-O;if(h=Number.isNaN(C)?0:C,y={x:d,y:i.y,width:m,height:i.height},Math.abs(w)>0&&Math.abs(h)<Math.abs(w)){var I=SO(h||w)*(Math.abs(w)-Math.abs(h));p-=I,h+=I}}else{var N=[a.scale(r[0]),a.scale(r[1])],R=N[0],_=N[1];if(d=R,p=wq({axis:i,ticks:l,bandSize:o,offset:f.offset,entry:e,index:t}),m=_-R,h=f.size,y={x:a.x,y:p,width:a.width,height:h},Math.abs(w)>0&&Math.abs(m)<Math.abs(w))m+=SO(m||w)*(Math.abs(w)-Math.abs(m))}return rZ(rZ(rZ({},e),{},{x:d,y:p,width:m,height:h,value:c?r:r[1],payload:e,background:y},E&&E[t]&&E[t].props),{},{tooltipPayload:[Oq(n,e)],tooltipPosition:{x:d+m/2,y:p+h/2}})});return rZ({data:k,layout:g},p)});var yZ=function(e,t,n,r,o){var a=e.width,i=e.height,s=e.layout,l=e.children,c=Object.keys(t),u={left:n.left,leftMirror:n.left,right:a-n.right,rightMirror:a-n.right,top:n.top,topMirror:n.top,bottom:i-n.bottom,bottomMirror:i-n.bottom},d=!!XO(l,dZ);return c.reduce(function(a,i){var l,c,p,f,g,m=t[i],h=m.orientation,b=m.domain,y=m.padding,v=void 0===y?{}:y,w=m.mirror,S=m.reversed,x="".concat(h).concat(w?"Mirror":"");if("number"===m.type&&("gap"===m.padding||"no-gap"===m.padding)){var E=b[1]-b[0],k=1/0,A=m.categoricalDomain.sort(RO);if(A.forEach(function(e,t){t>0&&(k=Math.min((e||0)-(A[t-1]||0),k))}),Number.isFinite(k)){var T=k/E,O="vertical"===m.layout?n.height:n.width;if("gap"===m.padding&&(l=T*O/2),"no-gap"===m.padding){var C=OO(e.barCategoryGap,T*O),I=T*O/2;l=I-C-(I-C)/O*C}}}c="xAxis"===r?[n.left+(v.left||0)+(l||0),n.left+n.width-(v.right||0)-(l||0)]:"yAxis"===r?"horizontal"===s?[n.top+n.height-(v.bottom||0),n.top+(v.top||0)]:[n.top+(v.top||0)+(l||0),n.top+n.height-(v.bottom||0)-(l||0)]:m.range,S&&(c=[c[1],c[0]]);var N=fq(m,o,d),R=N.scale,_=N.realScaleType;R.domain(b).range(c),mq(R);var P=yq(R,mZ(mZ({},m),{},{realScaleType:_}));"xAxis"===r?(g="top"===h&&!w||"bottom"===h&&w,p=n.left,f=u[x]-g*m.height):"yAxis"===r&&(g="left"===h&&!w||"right"===h&&w,p=u[x]-g*m.width,f=n.top);var L=mZ(mZ(mZ({},m),P),{},{realScaleType:_,x:p,y:f,scale:R,width:"xAxis"===r?n.width:m.width,height:"yAxis"===r?n.height:m.height});return L.bandSize=Aq(L,P),m.hide||"xAxis"!==r?m.hide||(u[x]+=(g?-1:1)*L.width):u[x]+=(g?-1:1)*L.height,mZ(mZ({},a),{},hZ({},i,L))},{})},vZ=function(e,t){var n=e.x,r=e.y,o=t.x,a=t.y;return{x:Math.min(n,o),y:Math.min(r,a),width:Math.abs(o-n),height:Math.abs(a-r)}},wZ=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.scale=t}return t=e,n=[{key:"domain",get:function(){return this.scale.domain}},{key:"range",get:function(){return this.scale.range}},{key:"rangeMin",get:function(){return this.range()[0]}},{key:"rangeMax",get:function(){return this.range()[1]}},{key:"bandwidth",get:function(){return this.scale.bandwidth}},{key:"apply",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.bandAware,r=t.position;if(void 0!==e){if(r)switch(r){case"start":default:return this.scale(e);case"middle":var o=this.bandwidth?this.bandwidth()/2:0;return this.scale(e)+o;case"end":var a=this.bandwidth?this.bandwidth():0;return this.scale(e)+a}if(n){var i=this.bandwidth?this.bandwidth()/2:0;return this.scale(e)+i}return this.scale(e)}}},{key:"isInRange",value:function(e){var t=this.range(),n=t[0],r=t[t.length-1];return n<=r?e>=n&&e<=r:e>=r&&e<=n}}],r=[{key:"create",value:function(t){return new e(t)}}],n&&fZ(t.prototype,n),r&&fZ(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,n,r}();hZ(wZ,"EPS",1e-4);var SZ=function(e){var t=Object.keys(e).reduce(function(t,n){return mZ(mZ({},t),{},hZ({},n,wZ.create(e[n])))},{});return mZ(mZ({},t),{},{apply:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.bandAware,o=n.position;return RX(e,function(e,n){return t[n].apply(e,{bandAware:r,position:o})})},isInRange:function(e){return UX(e,function(e,n){return t[n].isInRange(e)})}})};var xZ=UP,EZ=JR,kZ=r_;var AZ=function(e){return function(t,n,r){var o=Object(t);if(!EZ(t)){var a=xZ(n);t=kZ(t),n=function(e){return a(o[e],e,o)}}var i=e(t,n,r);return i>-1?o[a?t[i]:i]:void 0}},TZ=YK;var OZ=zP,CZ=UP,IZ=function(e){var t=TZ(e),n=t%1;return t==t?n?t-n:t:0},NZ=Math.max;var RZ=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var o=null==n?0:IZ(n);return o<0&&(o=NZ(r+o,0)),OZ(e,CZ(t),o)},_Z=AZ(RZ),PZ=_T(function(e){return{x:e.left,y:e.top,width:e.width,height:e.height}},function(e){return["l",e.left,"t",e.top,"w",e.width,"h",e.height].join("")});function LZ(e){return LZ="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},LZ(e)}var DZ=e.createContext(void 0),MZ=e.createContext(void 0),jZ=e.createContext(void 0),FZ=e.createContext({}),BZ=e.createContext(void 0),UZ=e.createContext(0),zZ=e.createContext(0),$Z=function(t){var n=t.state,r=n.xAxisMap,o=n.yAxisMap,a=n.offset,i=t.clipPathId,s=t.children,l=t.width,c=t.height,u=PZ(a);return e.createElement(DZ.Provider,{value:r},e.createElement(MZ.Provider,{value:o},e.createElement(FZ.Provider,{value:a},e.createElement(jZ.Provider,{value:u},e.createElement(BZ.Provider,{value:i},e.createElement(UZ.Provider,{value:c},e.createElement(zZ.Provider,{value:l},s)))))))};function GZ(e){var t=Object.keys(e);return 0===t.length?"There are no available ids.":"Available ids are: ".concat(t,".")}var qZ=function(t){var n=e.useContext(DZ);null==n&&("production"!==process.env.NODE_ENV?RG(0,"Could not find Recharts context; are you sure this is rendered inside a Recharts wrapper component?"):RG());var r=n[t];return null==r&&("production"!==process.env.NODE_ENV?RG(0,'Could not find xAxis by id "'.concat(t,'" [').concat(LZ(t),"]. ").concat(GZ(n))):RG()),r},HZ=function(t){var n=e.useContext(MZ);null==n&&("production"!==process.env.NODE_ENV?RG(0,"Could not find Recharts context; are you sure this is rendered inside a Recharts wrapper component?"):RG());var r=n[t];return null==r&&("production"!==process.env.NODE_ENV?RG(0,'Could not find yAxis by id "'.concat(t,'" [').concat(LZ(t),"]. ").concat(GZ(n))):RG()),r},VZ=function(){return e.useContext(zZ)},WZ=function(){return e.useContext(UZ)};function YZ(e){return YZ="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},YZ(e)}function KZ(e,t,n){return t&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,rQ(r.key),r)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function XZ(e,t,n){return t=QZ(t),function(e,t){if(t&&("object"===YZ(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,ZZ()?Reflect.construct(t,n||[],QZ(e).constructor):t.apply(e,n))}function ZZ(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(ZZ=function(){return!!e})()}function QZ(e){return QZ=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},QZ(e)}function JZ(e,t){return JZ=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},JZ(e,t)}function eQ(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function tQ(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?eQ(Object(n),!0).forEach(function(t){nQ(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):eQ(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function nQ(e,t,n){return(t=rQ(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function rQ(e){var t=function(e,t){if("object"!=YZ(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=YZ(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==YZ(t)?t:t+""}function oQ(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a,i,s=[],l=!0,c=!1;try{if(a=(n=n.call(e)).next,0===t);else for(;!(l=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(c)throw o}}return s}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return aQ(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return aQ(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function aQ(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function iQ(){return iQ=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},iQ.apply(this,arguments)}function sQ(t){var n=t.x,r=t.y,o=t.segment,a=t.xAxisId,i=t.yAxisId,s=t.shape,l=t.className,c=t.alwaysShow,u=e.useContext(BZ),d=qZ(a),p=HZ(i),f=e.useContext(jZ);if(!u||!f)return null;fC(void 0===c,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var g=function(e,t,n,r,o,a,i,s,l){var c=o.x,u=o.y,d=o.width,p=o.height;if(n){var f=l.y,g=e.y.apply(f,{position:a});if(AX(l,"discard")&&!e.y.isInRange(g))return null;var m=[{x:c+d,y:g},{x:c,y:g}];return"left"===s?m.reverse():m}if(t){var h=l.x,b=e.x.apply(h,{position:a});if(AX(l,"discard")&&!e.x.isInRange(b))return null;var y=[{x:b,y:u+p},{x:b,y:u}];return"top"===i?y.reverse():y}if(r){var v=l.segment.map(function(t){return e.apply(t,{position:a})});return AX(l,"discard")&&kX(v,function(t){return!e.isInRange(t)})?null:v}return null}(SZ({x:d.scale,y:p.scale}),kO(n),kO(r),o&&2===o.length,f,t.position,d.orientation,p.orientation,t);if(!g)return null;var m=oQ(g,2),h=m[0],b=h.x,y=h.y,v=m[1],w=v.x,S=v.y,x=tQ(tQ({clipPath:AX(t,"hidden")?"url(#".concat(u,")"):void 0},eC(t,!0)),{},{x1:b,y1:y,x2:w,y2:S});return e.createElement(dC,{className:Rk("recharts-reference-line",l)},function(t,n){return e.isValidElement(t)?e.cloneElement(t,n):lA(t)?t(n):e.createElement("line",iQ({},n,{className:"recharts-reference-line-line"}))}(s,x),Qq.renderCallByParent(t,function(e){var t=e.x1,n=e.y1,r=e.x2,o=e.y2;return vZ({x:t,y:n},{x:r,y:o})}({x1:b,y1:y,x2:w,y2:S})))}var lQ=function(t){function n(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),XZ(this,n,arguments)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&JZ(e,t)}(n,t),KZ(n,[{key:"render",value:function(){return e.createElement(sQ,this.props)}}])}(e.Component);function cQ(){return cQ=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},cQ.apply(this,arguments)}function uQ(e){return uQ="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},uQ(e)}function dQ(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function pQ(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?dQ(Object(n),!0).forEach(function(t){yQ(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):dQ(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function fQ(e,t,n){return t&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,vQ(r.key),r)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function gQ(e,t,n){return t=hQ(t),function(e,t){if(t&&("object"===uQ(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,mQ()?Reflect.construct(t,n||[],hQ(e).constructor):t.apply(e,n))}function mQ(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(mQ=function(){return!!e})()}function hQ(e){return hQ=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},hQ(e)}function bQ(e,t){return bQ=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},bQ(e,t)}function yQ(e,t,n){return(t=vQ(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function vQ(e){var t=function(e,t){if("object"!=uQ(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=uQ(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==uQ(t)?t:t+""}nQ(lQ,"displayName","ReferenceLine"),nQ(lQ,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,fill:"none",stroke:"#ccc",fillOpacity:1,strokeWidth:1,position:"middle"});var wQ=function(t){function n(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),gQ(this,n,arguments)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&bQ(e,t)}(n,t),fQ(n,[{key:"render",value:function(){var t=this.props,r=t.x,o=t.y,a=t.r,i=t.alwaysShow,s=t.clipPathId,l=kO(r),c=kO(o);if(fC(void 0===i,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.'),!l||!c)return null;var u=function(e){var t=e.x,n=e.y,r=e.xAxis,o=e.yAxis,a=SZ({x:r.scale,y:o.scale}),i=a.apply({x:t,y:n},{bandAware:!0});return AX(e,"discard")&&!a.isInRange(i)?null:i}(this.props);if(!u)return null;var d=u.x,p=u.y,f=this.props,g=f.shape,m=f.className,h=pQ(pQ({clipPath:AX(this.props,"hidden")?"url(#".concat(s,")"):void 0},eC(this.props,!0)),{},{cx:d,cy:p});return e.createElement(dC,{className:Rk("recharts-reference-dot",m)},n.renderDot(g,h),Qq.renderCallByParent(this.props,{x:d-a,y:p-a,width:2*a,height:2*a}))}}])}(e.Component);function SQ(){return SQ=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},SQ.apply(this,arguments)}function xQ(e){return xQ="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},xQ(e)}function EQ(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function kQ(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?EQ(Object(n),!0).forEach(function(t){NQ(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):EQ(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function AQ(e,t,n){return t&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,RQ(r.key),r)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function TQ(e,t,n){return t=CQ(t),function(e,t){if(t&&("object"===xQ(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,OQ()?Reflect.construct(t,n||[],CQ(e).constructor):t.apply(e,n))}function OQ(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(OQ=function(){return!!e})()}function CQ(e){return CQ=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},CQ(e)}function IQ(e,t){return IQ=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},IQ(e,t)}function NQ(e,t,n){return(t=RQ(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function RQ(e){var t=function(e,t){if("object"!=xQ(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=xQ(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==xQ(t)?t:t+""}yQ(wQ,"displayName","ReferenceDot"),yQ(wQ,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#fff",stroke:"#ccc",fillOpacity:1,strokeWidth:1}),yQ(wQ,"renderDot",function(t,n){return e.isValidElement(t)?e.cloneElement(t,n):lA(t)?t(n):e.createElement(JW,cQ({},n,{cx:n.cx,cy:n.cy,className:"recharts-reference-dot-dot"}))});var _Q=function(t){function n(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),TQ(this,n,arguments)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&IQ(e,t)}(n,t),AQ(n,[{key:"render",value:function(){var t=this.props,r=t.x1,o=t.x2,a=t.y1,i=t.y2,s=t.className,l=t.alwaysShow,c=t.clipPathId;fC(void 0===l,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var u=kO(r),d=kO(o),p=kO(a),f=kO(i),g=this.props.shape;if(!(u||d||p||f||g))return null;var m=function(e,t,n,r,o){var a=o.x1,i=o.x2,s=o.y1,l=o.y2,c=o.xAxis,u=o.yAxis;if(!c||!u)return null;var d=SZ({x:c.scale,y:u.scale}),p={x:e?d.x.apply(a,{position:"start"}):d.x.rangeMin,y:n?d.y.apply(s,{position:"start"}):d.y.rangeMin},f={x:t?d.x.apply(i,{position:"end"}):d.x.rangeMax,y:r?d.y.apply(l,{position:"end"}):d.y.rangeMax};return!AX(o,"discard")||d.isInRange(p)&&d.isInRange(f)?vZ(p,f):null}(u,d,p,f,this.props);if(!m&&!g)return null;var h=AX(this.props,"hidden")?"url(#".concat(c,")"):void 0;return e.createElement(dC,{className:Rk("recharts-reference-area",s)},n.renderRect(g,kQ(kQ({clipPath:h},eC(this.props,!0)),m)),Qq.renderCallByParent(this.props,m))}}])}(e.Component);function PQ(e,t,n){if(t<1)return[];if(1===t&&void 0===n)return e;for(var r=[],o=0;o<e.length;o+=t)r.push(e[o]);return r}function LQ(e,t,n){return function(e){var t=e.width,n=e.height,r=function(e){return(e%180+180)%180}(arguments.length>1&&void 0!==arguments[1]?arguments[1]:0),o=r*Math.PI/180,a=Math.atan(n/t),i=o>a&&o<Math.PI-a?n/Math.sin(o):t/Math.cos(o);return Math.abs(i)}({width:e.width+t.width,height:e.height+t.height},n)}function DQ(e,t,n,r,o){if(e*t<e*r||e*t>e*o)return!1;var a=n();return e*(t-e*a/2-r)>=0&&e*(t+e*a/2-o)<=0}function MQ(e){return MQ="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},MQ(e)}function jQ(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function FQ(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?jQ(Object(n),!0).forEach(function(t){BQ(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):jQ(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function BQ(e,t,n){var r;return r=function(e,t){if("object"!=MQ(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=MQ(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(t,"string"),(t="symbol"==MQ(r)?r:r+"")in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function UQ(e,t,n){var r=e.tick,o=e.ticks,a=e.viewBox,i=e.minTickGap,s=e.orientation,l=e.interval,c=e.tickFormatter,u=e.unit,d=e.angle;if(!o||!o.length||!r)return[];if(EO(l)||ZD)return function(e,t){return PQ(e,t+1)}(o,"number"==typeof l&&EO(l)?l:0);var p=[],f="top"===s||"bottom"===s?"width":"height",g=u&&"width"===f?YM(u,{fontSize:t,letterSpacing:n}):{width:0,height:0},m=function(e,r){var o=lA(c)?c(e.value,r):e.value;return"width"===f?LQ(YM(o,{fontSize:t,letterSpacing:n}),g,d):YM(o,{fontSize:t,letterSpacing:n})[f]},h=o.length>=2?SO(o[1].coordinate-o[0].coordinate):1,b=function(e,t,n){var r="width"===n,o=e.x,a=e.y,i=e.width,s=e.height;return 1===t?{start:r?o:a,end:r?o+i:a+s}:{start:r?o+i:a+s,end:r?o:a}}(a,h,f);return"equidistantPreserveStart"===l?function(e,t,n,r,o){for(var a,i=(r||[]).slice(),s=t.start,l=t.end,c=0,u=1,d=s,p=function(){var t=null==r?void 0:r[c];if(void 0===t)return{v:PQ(r,u)};var a,i=c,p=function(){return void 0===a&&(a=n(t,i)),a},f=t.coordinate,g=0===c||DQ(e,f,p,d,l);g||(c=0,d=s,u+=1),g&&(d=f+e*(p()/2+o),c+=u)};u<=i.length;)if(a=p())return a.v;return[]}(h,b,m,o,i):(p="preserveStart"===l||"preserveStartEnd"===l?function(e,t,n,r,o,a){var i=(r||[]).slice(),s=i.length,l=t.start,c=t.end;if(a){var u=r[s-1],d=n(u,s-1),p=e*(u.coordinate+e*d/2-c);i[s-1]=u=FQ(FQ({},u),{},{tickCoord:p>0?u.coordinate-p*e:u.coordinate}),DQ(e,u.tickCoord,function(){return d},l,c)&&(c=u.tickCoord-e*(d/2+o),i[s-1]=FQ(FQ({},u),{},{isShow:!0}))}for(var f=a?s-1:s,g=function(t){var r,a=i[t],s=function(){return void 0===r&&(r=n(a,t)),r};if(0===t){var u=e*(a.coordinate-e*s()/2-l);i[t]=a=FQ(FQ({},a),{},{tickCoord:u<0?a.coordinate-u*e:a.coordinate})}else i[t]=a=FQ(FQ({},a),{},{tickCoord:a.coordinate});DQ(e,a.tickCoord,s,l,c)&&(l=a.tickCoord+e*(s()/2+o),i[t]=FQ(FQ({},a),{},{isShow:!0}))},m=0;m<f;m++)g(m);return i}(h,b,m,o,i,"preserveStartEnd"===l):function(e,t,n,r,o){for(var a=(r||[]).slice(),i=a.length,s=t.start,l=t.end,c=function(t){var r,c=a[t],u=function(){return void 0===r&&(r=n(c,t)),r};if(t===i-1){var d=e*(c.coordinate+e*u()/2-l);a[t]=c=FQ(FQ({},c),{},{tickCoord:d>0?c.coordinate-d*e:c.coordinate})}else a[t]=c=FQ(FQ({},c),{},{tickCoord:c.coordinate});DQ(e,c.tickCoord,u,s,l)&&(l=c.tickCoord-e*(u()/2+o),a[t]=FQ(FQ({},c),{},{isShow:!0}))},u=i-1;u>=0;u--)c(u);return a}(h,b,m,o,i),p.filter(function(e){return e.isShow}))}NQ(_Q,"displayName","ReferenceArea"),NQ(_Q,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#ccc",fillOpacity:.5,stroke:"none",strokeWidth:1}),NQ(_Q,"renderRect",function(t,n){return e.isValidElement(t)?e.cloneElement(t,n):lA(t)?t(n):e.createElement(GW,SQ({},n,{className:"recharts-reference-area-rect"}))});var zQ=["viewBox"],$Q=["viewBox"],GQ=["ticks"];function qQ(e){return qQ="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},qQ(e)}function HQ(){return HQ=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},HQ.apply(this,arguments)}function VQ(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function WQ(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?VQ(Object(n),!0).forEach(function(t){eJ(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):VQ(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function YQ(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function KQ(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,tJ(r.key),r)}}function XQ(e,t,n){return t=QQ(t),function(e,t){if(t&&("object"===qQ(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,ZQ()?Reflect.construct(t,n||[],QQ(e).constructor):t.apply(e,n))}function ZQ(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(ZQ=function(){return!!e})()}function QQ(e){return QQ=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},QQ(e)}function JQ(e,t){return JQ=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},JQ(e,t)}function eJ(e,t,n){return(t=tJ(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function tJ(e){var t=function(e,t){if("object"!=qQ(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=qQ(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==qQ(t)?t:t+""}var nJ=function(t){function n(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),(t=XQ(this,n,[e])).state={fontSize:"",letterSpacing:""},t}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&JQ(e,t)}(n,t),r=n,o=[{key:"shouldComponentUpdate",value:function(e,t){var n=e.viewBox,r=YQ(e,zQ),o=this.props,a=o.viewBox,i=YQ(o,$Q);return!_O(n,a)||!_O(r,i)||!_O(t,this.state)}},{key:"componentDidMount",value:function(){var e=this.layerReference;if(e){var t=e.getElementsByClassName("recharts-cartesian-axis-tick-value")[0];t&&this.setState({fontSize:window.getComputedStyle(t).fontSize,letterSpacing:window.getComputedStyle(t).letterSpacing})}}},{key:"getTickLineCoord",value:function(e){var t,n,r,o,a,i,s=this.props,l=s.x,c=s.y,u=s.width,d=s.height,p=s.orientation,f=s.tickSize,g=s.mirror,m=s.tickMargin,h=g?-1:1,b=e.tickSize||f,y=EO(e.tickCoord)?e.tickCoord:e.coordinate;switch(p){case"top":t=n=e.coordinate,i=(r=(o=c+ +!g*d)-h*b)-h*m,a=y;break;case"left":r=o=e.coordinate,a=(t=(n=l+ +!g*u)-h*b)-h*m,i=y;break;case"right":r=o=e.coordinate,a=(t=(n=l+ +g*u)+h*b)+h*m,i=y;break;default:t=n=e.coordinate,i=(r=(o=c+ +g*d)+h*b)+h*m,a=y}return{line:{x1:t,y1:r,x2:n,y2:o},tick:{x:a,y:i}}}},{key:"getTickTextAnchor",value:function(){var e,t=this.props,n=t.orientation,r=t.mirror;switch(n){case"left":e=r?"start":"end";break;case"right":e=r?"end":"start";break;default:e="middle"}return e}},{key:"getTickVerticalAnchor",value:function(){var e=this.props,t=e.orientation,n=e.mirror,r="end";switch(t){case"left":case"right":r="middle";break;case"top":r=n?"start":"end";break;default:r=n?"end":"start"}return r}},{key:"renderAxisLine",value:function(){var t=this.props,n=t.x,r=t.y,o=t.width,a=t.height,i=t.orientation,s=t.mirror,l=t.axisLine,c=WQ(WQ(WQ({},eC(this.props,!1)),eC(l,!1)),{},{fill:"none"});if("top"===i||"bottom"===i){var u=+("top"===i&&!s||"bottom"===i&&s);c=WQ(WQ({},c),{},{x1:n,y1:r+u*a,x2:n+o,y2:r+u*a})}else{var d=+("left"===i&&!s||"right"===i&&s);c=WQ(WQ({},c),{},{x1:n+d*o,y1:r,x2:n+d*o,y2:r+a})}return e.createElement("line",HQ({},c,{className:Rk("recharts-cartesian-axis-line",oO(l,"className"))}))}},{key:"renderTicks",value:function(t,r,o){var a=this,i=this.props,s=i.tickLine,l=i.stroke,c=i.tick,u=i.tickFormatter,d=i.unit,p=UQ(WQ(WQ({},this.props),{},{ticks:t}),r,o),f=this.getTickTextAnchor(),g=this.getTickVerticalAnchor(),m=eC(this.props,!1),h=eC(c,!1),b=WQ(WQ({},m),{},{fill:"none"},eC(s,!1)),y=p.map(function(t,r){var o=a.getTickLineCoord(t),i=o.line,y=o.tick,v=WQ(WQ(WQ(WQ({textAnchor:f,verticalAnchor:g},m),{},{stroke:"none",fill:l},h),y),{},{index:r,payload:t,visibleTicksCount:p.length,tickFormatter:u});return e.createElement(dC,HQ({className:"recharts-cartesian-axis-tick",key:"tick-".concat(t.value,"-").concat(t.coordinate,"-").concat(t.tickCoord)},BO(a.props,t,r)),s&&e.createElement("line",HQ({},b,i,{className:Rk("recharts-cartesian-axis-tick-line",oO(s,"className"))})),c&&n.renderTickItem(c,v,"".concat(lA(u)?u(t.value,r):t.value).concat(d||"")))});return e.createElement("g",{className:"recharts-cartesian-axis-ticks"},y)}},{key:"render",value:function(){var t=this,n=this.props,r=n.axisLine,o=n.width,a=n.height,i=n.ticksGenerator,s=n.className;if(n.hide)return null;var l=this.props,c=l.ticks,u=YQ(l,GQ),d=c;return lA(i)&&(d=c&&c.length>0?i(this.props):i(u)),o<=0||a<=0||!d||!d.length?null:e.createElement(dC,{className:Rk("recharts-cartesian-axis",s),ref:function(e){t.layerReference=e}},r&&this.renderAxisLine(),this.renderTicks(d,this.state.fontSize,this.state.letterSpacing),Qq.renderCallByParent(this.props))}}],a=[{key:"renderTickItem",value:function(t,n,r){var o=Rk(n.className,"recharts-cartesian-axis-tick-value");return e.isValidElement(t)?e.cloneElement(t,WQ(WQ({},n),{},{className:o})):lA(t)?t(WQ(WQ({},n),{},{className:o})):e.createElement(Ej,HQ({},n,{className:"recharts-cartesian-axis-tick-value"}),r)}}],o&&KQ(r.prototype,o),a&&KQ(r,a),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,o,a}(e.Component);eJ(nJ,"displayName","CartesianAxis"),eJ(nJ,"defaultProps",{x:0,y:0,width:0,height:0,viewBox:{x:0,y:0,width:0,height:0},orientation:"bottom",ticks:[],stroke:"#666",tickLine:!0,axisLine:!0,tick:!0,mirror:!1,minTickGap:5,tickSize:6,tickMargin:2,interval:"preserveEnd"});var rJ=["x1","y1","x2","y2","key"],oJ=["offset"];function aJ(e){return aJ="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},aJ(e)}function iJ(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function sJ(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?iJ(Object(n),!0).forEach(function(t){lJ(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):iJ(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function lJ(e,t,n){var r;return r=function(e,t){if("object"!=aJ(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=aJ(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(t,"string"),(t="symbol"==aJ(r)?r:r+"")in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function cJ(){return cJ=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},cJ.apply(this,arguments)}function uJ(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var dJ=function(t){var n=t.fill;if(!n||"none"===n)return null;var r=t.fillOpacity,o=t.x,a=t.y,i=t.width,s=t.height,l=t.ry;return e.createElement("rect",{x:o,y:a,ry:l,width:i,height:s,stroke:"none",fill:n,fillOpacity:r,className:"recharts-cartesian-grid-bg"})};function pJ(t,n){var r;if(e.isValidElement(t))r=e.cloneElement(t,n);else if(lA(t))r=t(n);else{var o=n.x1,a=n.y1,i=n.x2,s=n.y2,l=n.key,c=uJ(n,rJ),u=eC(c,!1);u.offset;var d=uJ(u,oJ);r=e.createElement("line",cJ({},d,{x1:o,y1:a,x2:i,y2:s,fill:"none",key:l}))}return r}function fJ(t){var n=t.x,r=t.width,o=t.horizontal,a=void 0===o||o,i=t.horizontalPoints;if(!a||!i||!i.length)return null;var s=i.map(function(e,o){var i=sJ(sJ({},t),{},{x1:n,y1:e,x2:n+r,y2:e,key:"line-".concat(o),index:o});return pJ(a,i)});return e.createElement("g",{className:"recharts-cartesian-grid-horizontal"},s)}function gJ(t){var n=t.y,r=t.height,o=t.vertical,a=void 0===o||o,i=t.verticalPoints;if(!a||!i||!i.length)return null;var s=i.map(function(e,o){var i=sJ(sJ({},t),{},{x1:e,y1:n,x2:e,y2:n+r,key:"line-".concat(o),index:o});return pJ(a,i)});return e.createElement("g",{className:"recharts-cartesian-grid-vertical"},s)}function mJ(t){var n=t.horizontalFill,r=t.fillOpacity,o=t.x,a=t.y,i=t.width,s=t.height,l=t.horizontalPoints,c=t.horizontal;if(!(void 0===c||c)||!n||!n.length)return null;var u=l.map(function(e){return Math.round(e+a-a)}).sort(function(e,t){return e-t});a!==u[0]&&u.unshift(0);var d=u.map(function(t,l){var c=!u[l+1]?a+s-t:u[l+1]-t;if(c<=0)return null;var d=l%n.length;return e.createElement("rect",{key:"react-".concat(l),y:t,x:o,height:c,width:i,stroke:"none",fill:n[d],fillOpacity:r,className:"recharts-cartesian-grid-bg"})});return e.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},d)}function hJ(t){var n=t.vertical,r=void 0===n||n,o=t.verticalFill,a=t.fillOpacity,i=t.x,s=t.y,l=t.width,c=t.height,u=t.verticalPoints;if(!r||!o||!o.length)return null;var d=u.map(function(e){return Math.round(e+i-i)}).sort(function(e,t){return e-t});i!==d[0]&&d.unshift(0);var p=d.map(function(t,n){var r=!d[n+1]?i+l-t:d[n+1]-t;if(r<=0)return null;var u=n%o.length;return e.createElement("rect",{key:"react-".concat(n),x:t,y:s,width:r,height:c,stroke:"none",fill:o[u],fillOpacity:a,className:"recharts-cartesian-grid-bg"})});return e.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},p)}var bJ=function(e,t){var n=e.xAxis,r=e.width,o=e.height,a=e.offset;return cq(UQ(sJ(sJ(sJ({},nJ.defaultProps),n),{},{ticks:uq(n,!0),viewBox:{x:0,y:0,width:r,height:o}})),a.left,a.left+a.width,t)},yJ=function(e,t){var n=e.yAxis,r=e.width,o=e.height,a=e.offset;return cq(UQ(sJ(sJ(sJ({},nJ.defaultProps),n),{},{ticks:uq(n,!0),viewBox:{x:0,y:0,width:r,height:o}})),a.top,a.top+a.height,t)},vJ={horizontal:!0,vertical:!0,stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[]};function wJ(t){var n,r,o,a,i,s,l,c,u=VZ(),d=WZ(),p=e.useContext(FZ),f=sJ(sJ({},t),{},{stroke:null!==(n=t.stroke)&&void 0!==n?n:vJ.stroke,fill:null!==(r=t.fill)&&void 0!==r?r:vJ.fill,horizontal:null!==(o=t.horizontal)&&void 0!==o?o:vJ.horizontal,horizontalFill:null!==(a=t.horizontalFill)&&void 0!==a?a:vJ.horizontalFill,vertical:null!==(i=t.vertical)&&void 0!==i?i:vJ.vertical,verticalFill:null!==(s=t.verticalFill)&&void 0!==s?s:vJ.verticalFill,x:EO(t.x)?t.x:p.left,y:EO(t.y)?t.y:p.top,width:EO(t.width)?t.width:p.width,height:EO(t.height)?t.height:p.height}),g=f.x,m=f.y,h=f.width,b=f.height,y=f.syncWithTicks,v=f.horizontalValues,w=f.verticalValues,S=(l=e.useContext(DZ),CO(l)),x=(c=e.useContext(MZ),_Z(c,function(e){return UX(e.domain,Number.isFinite)})||CO(c));if(!EO(h)||h<=0||!EO(b)||b<=0||!EO(g)||g!==+g||!EO(m)||m!==+m)return null;var E=f.verticalCoordinatesGenerator||bJ,k=f.horizontalCoordinatesGenerator||yJ,A=f.horizontalPoints,T=f.verticalPoints;if((!A||!A.length)&&lA(k)){var O=v&&v.length,C=k({yAxis:x?sJ(sJ({},x),{},{ticks:O?v:x.ticks}):void 0,width:u,height:d,offset:p},!!O||y);fC(Array.isArray(C),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(aJ(C),"]")),Array.isArray(C)&&(A=C)}if((!T||!T.length)&&lA(E)){var I=w&&w.length,N=E({xAxis:S?sJ(sJ({},S),{},{ticks:I?w:S.ticks}):void 0,width:u,height:d,offset:p},!!I||y);fC(Array.isArray(N),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(aJ(N),"]")),Array.isArray(N)&&(T=N)}return e.createElement("g",{className:"recharts-cartesian-grid"},e.createElement(dJ,{fill:f.fill,fillOpacity:f.fillOpacity,x:f.x,y:f.y,width:f.width,height:f.height,ry:f.ry}),e.createElement(fJ,cJ({},f,{offset:p,horizontalPoints:A,xAxis:S,yAxis:x})),e.createElement(gJ,cJ({},f,{offset:p,verticalPoints:T,xAxis:S,yAxis:x})),e.createElement(mJ,cJ({},f,{horizontalPoints:A})),e.createElement(hJ,cJ({},f,{verticalPoints:T})))}wJ.displayName="CartesianGrid";var SJ=["type","layout","connectNulls","ref"],xJ=["key"];function EJ(e){return EJ="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},EJ(e)}function kJ(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function AJ(){return AJ=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},AJ.apply(this,arguments)}function TJ(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function OJ(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?TJ(Object(n),!0).forEach(function(t){DJ(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):TJ(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function CJ(e){return function(e){if(Array.isArray(e))return IJ(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return IJ(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return IJ(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function IJ(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function NJ(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,MJ(r.key),r)}}function RJ(e,t,n){return t=PJ(t),function(e,t){if(t&&("object"===EJ(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,_J()?Reflect.construct(t,n||[],PJ(e).constructor):t.apply(e,n))}function _J(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(_J=function(){return!!e})()}function PJ(e){return PJ=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},PJ(e)}function LJ(e,t){return LJ=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},LJ(e,t)}function DJ(e,t,n){return(t=MJ(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function MJ(e){var t=function(e,t){if("object"!=EJ(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=EJ(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==EJ(t)?t:t+""}var jJ=function(t){function n(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n);for(var t=arguments.length,r=new Array(t),o=0;o<t;o++)r[o]=arguments[o];return DJ(e=RJ(this,n,[].concat(r)),"state",{isAnimationFinished:!0,totalLength:0}),DJ(e,"generateSimpleStrokeDasharray",function(e,t){return"".concat(t,"px ").concat(e-t,"px")}),DJ(e,"getStrokeDasharray",function(t,r,o){var a=o.reduce(function(e,t){return e+t});if(!a)return e.generateSimpleStrokeDasharray(r,t);for(var i=Math.floor(t/a),s=t%a,l=r-t,c=[],u=0,d=0;u<o.length;d+=o[u],++u)if(d+o[u]>s){c=[].concat(CJ(o.slice(0,u)),[s-d]);break}var p=c.length%2==0?[0,l]:[l];return[].concat(CJ(n.repeat(o,i)),CJ(c),p).map(function(e){return"".concat(e,"px")}).join(", ")}),DJ(e,"id",TO("recharts-line-")),DJ(e,"pathRef",function(t){e.mainCurve=t}),DJ(e,"handleAnimationEnd",function(){e.setState({isAnimationFinished:!0}),e.props.onAnimationEnd&&e.props.onAnimationEnd()}),DJ(e,"handleAnimationStart",function(){e.setState({isAnimationFinished:!1}),e.props.onAnimationStart&&e.props.onAnimationStart()}),e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&LJ(e,t)}(n,t),r=n,o=[{key:"componentDidMount",value:function(){if(this.props.isAnimationActive){var e=this.getTotalLength();this.setState({totalLength:e})}}},{key:"componentDidUpdate",value:function(){if(this.props.isAnimationActive){var e=this.getTotalLength();e!==this.state.totalLength&&this.setState({totalLength:e})}}},{key:"getTotalLength",value:function(){var e=this.mainCurve;try{return e&&e.getTotalLength&&e.getTotalLength()||0}catch(e){return 0}}},{key:"renderErrorBar",value:function(t,n){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var r=this.props,o=r.points,a=r.xAxis,i=r.yAxis,s=r.layout,l=KO(r.children,HG);if(!l)return null;var c=function(e,t){return{x:e.x,y:e.y,value:e.value,errorVal:rq(e.payload,t)}},u={clipPath:t?"url(#clipPath-".concat(n,")"):null};return e.createElement(dC,u,l.map(function(t){return e.cloneElement(t,{key:"bar-".concat(t.props.dataKey),data:o,xAxis:a,yAxis:i,layout:s,dataPointFormatter:c})}))}},{key:"renderDots",value:function(t,r,o){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var a=this.props,i=a.dot,s=a.points,l=a.dataKey,c=eC(this.props,!1),u=eC(i,!0),d=s.map(function(e,t){var r=OJ(OJ(OJ({key:"dot-".concat(t),r:3},c),u),{},{index:t,cx:e.x,cy:e.y,value:e.value,dataKey:l,payload:e.payload,points:s});return n.renderDotItem(i,r)}),p={clipPath:t?"url(#clipPath-".concat(r?"":"dots-").concat(o,")"):null};return e.createElement(dC,AJ({className:"recharts-line-dots",key:"dots"},p),d)}},{key:"renderCurveStatically",value:function(t,n,r,o){var a=this.props,i=a.type,s=a.layout,l=a.connectNulls;a.ref;var c=kJ(a,SJ),u=OJ(OJ(OJ({},eC(c,!0)),{},{fill:"none",className:"recharts-line-curve",clipPath:n?"url(#clipPath-".concat(r,")"):null,points:t},o),{},{type:i,layout:s,connectNulls:l});return e.createElement(PH,AJ({},u,{pathRef:this.pathRef}))}},{key:"renderCurveWithAnimation",value:function(t,n){var r=this,o=this.props,a=o.points,i=o.strokeDasharray,s=o.isAnimationActive,l=o.animationBegin,c=o.animationDuration,u=o.animationEasing,d=o.animationId,p=o.animateNewValues,f=o.width,g=o.height,m=this.state,h=m.prevPoints,b=m.totalLength;return e.createElement(_W,{begin:l,duration:c,isActive:s,easing:u,from:{t:0},to:{t:1},key:"line-".concat(d),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(e){var o=e.t;if(h){var s=h.length/a.length,l=a.map(function(e,t){var n=Math.floor(t*s);if(h[n]){var r=h[n],a=IO(r.x,e.x),i=IO(r.y,e.y);return OJ(OJ({},e),{},{x:a(o),y:i(o)})}if(p){var l=IO(2*f,e.x),c=IO(g/2,e.y);return OJ(OJ({},e),{},{x:l(o),y:c(o)})}return OJ(OJ({},e),{},{x:e.x,y:e.y})});return r.renderCurveStatically(l,t,n)}var c,u=IO(0,b)(o);if(i){var d="".concat(i).split(/[,\s]+/gim).map(function(e){return parseFloat(e)});c=r.getStrokeDasharray(u,b,d)}else c=r.generateSimpleStrokeDasharray(b,u);return r.renderCurveStatically(a,t,n,{strokeDasharray:c})})}},{key:"renderCurve",value:function(e,t){var n=this.props,r=n.points,o=n.isAnimationActive,a=this.state,i=a.prevPoints,s=a.totalLength;return o&&r&&r.length&&(!i&&s>0||!O$(i,r))?this.renderCurveWithAnimation(e,t):this.renderCurveStatically(r,e,t)}},{key:"render",value:function(){var t,n=this.props,r=n.hide,o=n.dot,a=n.points,i=n.className,s=n.xAxis,l=n.yAxis,c=n.top,u=n.left,d=n.width,p=n.height,f=n.isAnimationActive,g=n.id;if(r||!a||!a.length)return null;var m=this.state.isAnimationFinished,h=1===a.length,b=Rk("recharts-line",i),y=s&&s.allowDataOverflow,v=l&&l.allowDataOverflow,w=y||v,S=aO(g)?this.id:g,x=null!==(t=eC(o,!1))&&void 0!==t?t:{r:3,strokeWidth:2},E=x.r,k=void 0===E?3:E,A=x.strokeWidth,T=void 0===A?2:A,O=(JO(o)?o:{}).clipDot,C=void 0===O||O,I=2*k+T;return e.createElement(dC,{className:b},y||v?e.createElement("defs",null,e.createElement("clipPath",{id:"clipPath-".concat(S)},e.createElement("rect",{x:y?u:u-d/2,y:v?c:c-p/2,width:y?d:2*d,height:v?p:2*p})),!C&&e.createElement("clipPath",{id:"clipPath-dots-".concat(S)},e.createElement("rect",{x:u-I/2,y:c-I/2,width:d+I,height:p+I}))):null,!h&&this.renderCurve(w,S),this.renderErrorBar(w,S),(h||o)&&this.renderDots(w,C,S),(!f||m)&&pH.renderCallByParent(this.props,a))}}],a=[{key:"getDerivedStateFromProps",value:function(e,t){return e.animationId!==t.prevAnimationId?{prevAnimationId:e.animationId,curPoints:e.points,prevPoints:t.curPoints}:e.points!==t.curPoints?{curPoints:e.points}:null}},{key:"repeat",value:function(e,t){for(var n=e.length%2!=0?[].concat(CJ(e),[0]):e,r=[],o=0;o<t;++o)r=[].concat(CJ(r),CJ(n));return r}},{key:"renderDotItem",value:function(t,n){var r;if(e.isValidElement(t))r=e.cloneElement(t,n);else if(lA(t))r=t(n);else{var o=n.key,a=kJ(n,xJ),i=Rk("recharts-line-dot","boolean"!=typeof t?t.className:"");r=e.createElement(JW,AJ({key:o},a,{className:i}))}return r}}],o&&NJ(r.prototype,o),a&&NJ(r,a),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,o,a}(e.PureComponent);DJ(jJ,"displayName","Line"),DJ(jJ,"defaultProps",{xAxisId:0,yAxisId:0,connectNulls:!1,activeDot:!0,dot:!0,legendType:"line",stroke:"#3182bd",strokeWidth:1,fill:"#fff",points:[],isAnimationActive:!ZD,animateNewValues:!0,animationBegin:0,animationDuration:1500,animationEasing:"ease",hide:!1,label:!1}),DJ(jJ,"getComposedData",function(e){var t=e.props,n=e.xAxis,r=e.yAxis,o=e.xAxisTicks,a=e.yAxisTicks,i=e.dataKey,s=e.bandSize,l=e.displayedData,c=e.offset,u=t.layout,d=l.map(function(e,t){var l=rq(e,i);return"horizontal"===u?{x:vq({axis:n,ticks:o,bandSize:s,entry:e,index:t}),y:aO(l)?null:r.scale(l),value:l,payload:e}:{x:aO(l)?null:n.scale(l),y:vq({axis:r,ticks:a,bandSize:s,entry:e,index:t}),value:l,payload:e}});return OJ({points:d,layout:u},c)});var FJ,BJ=["layout","type","stroke","connectNulls","isRange","ref"],UJ=["key"];function zJ(e){return zJ="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},zJ(e)}function $J(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function GJ(){return GJ=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},GJ.apply(this,arguments)}function qJ(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function HJ(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?qJ(Object(n),!0).forEach(function(t){ZJ(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):qJ(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function VJ(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,QJ(r.key),r)}}function WJ(e,t,n){return t=KJ(t),function(e,t){if(t&&("object"===zJ(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,YJ()?Reflect.construct(t,n||[],KJ(e).constructor):t.apply(e,n))}function YJ(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(YJ=function(){return!!e})()}function KJ(e){return KJ=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},KJ(e)}function XJ(e,t){return XJ=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},XJ(e,t)}function ZJ(e,t,n){return(t=QJ(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function QJ(e){var t=function(e,t){if("object"!=zJ(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=zJ(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==zJ(t)?t:t+""}var JJ=function(t){function n(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n);for(var t=arguments.length,r=new Array(t),o=0;o<t;o++)r[o]=arguments[o];return ZJ(e=WJ(this,n,[].concat(r)),"state",{isAnimationFinished:!0}),ZJ(e,"id",TO("recharts-area-")),ZJ(e,"handleAnimationEnd",function(){var t=e.props.onAnimationEnd;e.setState({isAnimationFinished:!0}),lA(t)&&t()}),ZJ(e,"handleAnimationStart",function(){var t=e.props.onAnimationStart;e.setState({isAnimationFinished:!1}),lA(t)&&t()}),e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&XJ(e,t)}(n,t),r=n,o=[{key:"renderDots",value:function(t,r,o){var a=this.props.isAnimationActive,i=this.state.isAnimationFinished;if(a&&!i)return null;var s=this.props,l=s.dot,c=s.points,u=s.dataKey,d=eC(this.props,!1),p=eC(l,!0),f=c.map(function(e,t){var r=HJ(HJ(HJ({key:"dot-".concat(t),r:3},d),p),{},{index:t,cx:e.x,cy:e.y,dataKey:u,value:e.value,payload:e.payload,points:c});return n.renderDotItem(l,r)}),g={clipPath:t?"url(#clipPath-".concat(r?"":"dots-").concat(o,")"):null};return e.createElement(dC,GJ({className:"recharts-area-dots"},g),f)}},{key:"renderHorizontalRect",value:function(t){var n=this.props,r=n.baseLine,o=n.points,a=n.strokeWidth,i=o[0].x,s=o[o.length-1].x,l=t*Math.abs(i-s),c=p$(o.map(function(e){return e.y||0}));return EO(r)&&"number"==typeof r?c=Math.max(r,c):r&&Array.isArray(r)&&r.length&&(c=Math.max(p$(r.map(function(e){return e.y||0})),c)),EO(c)?e.createElement("rect",{x:i<s?i:i-l,y:0,width:l,height:Math.floor(c+(a?parseInt("".concat(a),10):1))}):null}},{key:"renderVerticalRect",value:function(t){var n=this.props,r=n.baseLine,o=n.points,a=n.strokeWidth,i=o[0].y,s=o[o.length-1].y,l=t*Math.abs(i-s),c=p$(o.map(function(e){return e.x||0}));return EO(r)&&"number"==typeof r?c=Math.max(r,c):r&&Array.isArray(r)&&r.length&&(c=Math.max(p$(r.map(function(e){return e.x||0})),c)),EO(c)?e.createElement("rect",{x:0,y:i<s?i:i-l,width:c+(a?parseInt("".concat(a),10):1),height:Math.floor(l)}):null}},{key:"renderClipRect",value:function(e){return"vertical"===this.props.layout?this.renderVerticalRect(e):this.renderHorizontalRect(e)}},{key:"renderAreaStatically",value:function(t,n,r,o){var a=this.props,i=a.layout,s=a.type,l=a.stroke,c=a.connectNulls,u=a.isRange;a.ref;var d=$J(a,BJ);return e.createElement(dC,{clipPath:r?"url(#clipPath-".concat(o,")"):null},e.createElement(PH,GJ({},eC(d,!0),{points:t,connectNulls:c,type:s,baseLine:n,layout:i,stroke:"none",className:"recharts-area-area"})),"none"!==l&&e.createElement(PH,GJ({},eC(this.props,!1),{className:"recharts-area-curve",layout:i,type:s,connectNulls:c,fill:"none",points:t})),"none"!==l&&u&&e.createElement(PH,GJ({},eC(this.props,!1),{className:"recharts-area-curve",layout:i,type:s,connectNulls:c,fill:"none",points:n})))}},{key:"renderAreaWithAnimation",value:function(t,n){var r=this,o=this.props,a=o.points,i=o.baseLine,s=o.isAnimationActive,l=o.animationBegin,c=o.animationDuration,u=o.animationEasing,d=o.animationId,p=this.state,f=p.prevPoints,g=p.prevBaseLine;return e.createElement(_W,{begin:l,duration:c,isActive:s,easing:u,from:{t:0},to:{t:1},key:"area-".concat(d),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(o){var s=o.t;if(f){var l,c=f.length/a.length,u=a.map(function(e,t){var n=Math.floor(t*c);if(f[n]){var r=f[n],o=IO(r.x,e.x),a=IO(r.y,e.y);return HJ(HJ({},e),{},{x:o(s),y:a(s)})}return e});return l=EO(i)&&"number"==typeof i?IO(g,i)(s):aO(i)||wO(i)?IO(g,0)(s):i.map(function(e,t){var n=Math.floor(t*c);if(g[n]){var r=g[n],o=IO(r.x,e.x),a=IO(r.y,e.y);return HJ(HJ({},e),{},{x:o(s),y:a(s)})}return e}),r.renderAreaStatically(u,l,t,n)}return e.createElement(dC,null,e.createElement("defs",null,e.createElement("clipPath",{id:"animationClipPath-".concat(n)},r.renderClipRect(s))),e.createElement(dC,{clipPath:"url(#animationClipPath-".concat(n,")")},r.renderAreaStatically(a,i,t,n)))})}},{key:"renderArea",value:function(e,t){var n=this.props,r=n.points,o=n.baseLine,a=n.isAnimationActive,i=this.state,s=i.prevPoints,l=i.prevBaseLine,c=i.totalLength;return a&&r&&r.length&&(!s&&c>0||!O$(s,r)||!O$(l,o))?this.renderAreaWithAnimation(e,t):this.renderAreaStatically(r,o,e,t)}},{key:"render",value:function(){var t,n=this.props,r=n.hide,o=n.dot,a=n.points,i=n.className,s=n.top,l=n.left,c=n.xAxis,u=n.yAxis,d=n.width,p=n.height,f=n.isAnimationActive,g=n.id;if(r||!a||!a.length)return null;var m=this.state.isAnimationFinished,h=1===a.length,b=Rk("recharts-area",i),y=c&&c.allowDataOverflow,v=u&&u.allowDataOverflow,w=y||v,S=aO(g)?this.id:g,x=null!==(t=eC(o,!1))&&void 0!==t?t:{r:3,strokeWidth:2},E=x.r,k=void 0===E?3:E,A=x.strokeWidth,T=void 0===A?2:A,O=(JO(o)?o:{}).clipDot,C=void 0===O||O,I=2*k+T;return e.createElement(dC,{className:b},y||v?e.createElement("defs",null,e.createElement("clipPath",{id:"clipPath-".concat(S)},e.createElement("rect",{x:y?l:l-d/2,y:v?s:s-p/2,width:y?d:2*d,height:v?p:2*p})),!C&&e.createElement("clipPath",{id:"clipPath-dots-".concat(S)},e.createElement("rect",{x:l-I/2,y:s-I/2,width:d+I,height:p+I}))):null,h?null:this.renderArea(w,S),(o||h)&&this.renderDots(w,C,S),(!f||m)&&pH.renderCallByParent(this.props,a))}}],a=[{key:"getDerivedStateFromProps",value:function(e,t){return e.animationId!==t.prevAnimationId?{prevAnimationId:e.animationId,curPoints:e.points,curBaseLine:e.baseLine,prevPoints:t.curPoints,prevBaseLine:t.curBaseLine}:e.points!==t.curPoints||e.baseLine!==t.curBaseLine?{curPoints:e.points,curBaseLine:e.baseLine}:null}}],o&&VJ(r.prototype,o),a&&VJ(r,a),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,o,a}(e.PureComponent);function e0(e){return e0="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e0(e)}function t0(e,t,n){return t&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,s0(r.key),r)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function n0(e,t,n){return t=o0(t),function(e,t){if(t&&("object"===e0(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,r0()?Reflect.construct(t,n||[],o0(e).constructor):t.apply(e,n))}function r0(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(r0=function(){return!!e})()}function o0(e){return o0=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},o0(e)}function a0(e,t){return a0=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},a0(e,t)}function i0(e,t,n){return(t=s0(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function s0(e){var t=function(e,t){if("object"!=e0(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=e0(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==e0(t)?t:t+""}function l0(){return l0=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},l0.apply(this,arguments)}function c0(e){var t=e.xAxisId,n=VZ(),r=WZ(),o=qZ(t);return null==o?null:i.createElement(nJ,l0({},o,{className:Rk("recharts-".concat(o.axisType," ").concat(o.axisType),o.className),viewBox:{x:0,y:0,width:n,height:r},ticksGenerator:function(e){return uq(e,!0)}}))}FJ=JJ,ZJ(JJ,"displayName","Area"),ZJ(JJ,"defaultProps",{stroke:"#3182bd",fill:"#3182bd",fillOpacity:.6,xAxisId:0,yAxisId:0,legendType:"line",connectNulls:!1,points:[],dot:!1,activeDot:!0,hide:!1,isAnimationActive:!ZD,animationBegin:0,animationDuration:1500,animationEasing:"ease"}),ZJ(JJ,"getBaseValue",function(e,t,n,r){var o=e.layout,a=e.baseValue,i=t.props.baseValue,s=null!=i?i:a;if(EO(s)&&"number"==typeof s)return s;var l="horizontal"===o?r:n,c=l.scale.domain();if("number"===l.type){var u=Math.max(c[0],c[1]),d=Math.min(c[0],c[1]);return"dataMin"===s?d:"dataMax"===s||u<0?u:Math.max(Math.min(c[0],c[1]),0)}return"dataMin"===s?c[0]:"dataMax"===s?c[1]:c[0]}),ZJ(JJ,"getComposedData",function(e){var t,n=e.props,r=e.item,o=e.xAxis,a=e.yAxis,i=e.xAxisTicks,s=e.yAxisTicks,l=e.bandSize,c=e.dataKey,u=e.stackedData,d=e.dataStartIndex,p=e.displayedData,f=e.offset,g=n.layout,m=u&&u.length,h=FJ.getBaseValue(n,r,o,a),b="horizontal"===g,y=!1,v=p.map(function(e,t){var n;m?n=u[d+t]:(n=rq(e,c),Array.isArray(n)?y=!0:n=[h,n]);var r=null==n[1]||m&&null==rq(e,c);return b?{x:vq({axis:o,ticks:i,bandSize:l,entry:e,index:t}),y:r?null:a.scale(n[1]),value:n,payload:e}:{x:r?null:o.scale(n[1]),y:vq({axis:a,ticks:s,bandSize:l,entry:e,index:t}),value:n,payload:e}});return t=m||y?v.map(function(e){var t=Array.isArray(e.value)?e.value[0]:null;return b?{x:e.x,y:null!=t&&null!=e.y?a.scale(t):null}:{x:null!=t?o.scale(t):null,y:e.y}}):b?a.scale(h):o.scale(h),HJ({points:v,baseLine:t,layout:g,isRange:y},f)}),ZJ(JJ,"renderDotItem",function(t,n){var r;if(e.isValidElement(t))r=e.cloneElement(t,n);else if(lA(t))r=t(n);else{var o=Rk("recharts-area-dot","boolean"!=typeof t?t.className:""),a=n.key,i=$J(n,UJ);r=e.createElement(JW,GJ({},i,{key:a,className:o}))}return r});var u0=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),n0(this,t,arguments)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&a0(e,t)}(t,e),t0(t,[{key:"render",value:function(){return i.createElement(c0,this.props)}}])}(i.Component);function d0(e){return d0="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},d0(e)}function p0(e,t,n){return t&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,y0(r.key),r)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function f0(e,t,n){return t=m0(t),function(e,t){if(t&&("object"===d0(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,g0()?Reflect.construct(t,n||[],m0(e).constructor):t.apply(e,n))}function g0(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(g0=function(){return!!e})()}function m0(e){return m0=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},m0(e)}function h0(e,t){return h0=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},h0(e,t)}function b0(e,t,n){return(t=y0(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function y0(e){var t=function(e,t){if("object"!=d0(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=d0(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==d0(t)?t:t+""}function v0(){return v0=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},v0.apply(this,arguments)}i0(u0,"displayName","XAxis"),i0(u0,"defaultProps",{allowDecimals:!0,hide:!1,orientation:"bottom",width:0,height:30,mirror:!1,xAxisId:0,tickCount:5,type:"category",padding:{left:0,right:0},allowDataOverflow:!1,scale:"auto",reversed:!1,allowDuplicatedCategory:!0});var w0=function(e){var t=e.yAxisId,n=VZ(),r=WZ(),o=HZ(t);return null==o?null:i.createElement(nJ,v0({},o,{className:Rk("recharts-".concat(o.axisType," ").concat(o.axisType),o.className),viewBox:{x:0,y:0,width:n,height:r},ticksGenerator:function(e){return uq(e,!0)}}))},S0=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),f0(this,t,arguments)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&h0(e,t)}(t,e),p0(t,[{key:"render",value:function(){return i.createElement(w0,this.props)}}])}(i.Component);function x0(e){return function(e){if(Array.isArray(e))return E0(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return E0(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return E0(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function E0(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}b0(S0,"displayName","YAxis"),b0(S0,"defaultProps",{allowDuplicatedCategory:!0,allowDecimals:!0,hide:!1,orientation:"left",width:60,height:0,mirror:!1,yAxisId:0,tickCount:5,type:"number",padding:{top:0,bottom:0},allowDataOverflow:!1,scale:"auto",reversed:!1});var k0=function(e,t,n,r,o){var a=KO(e,lQ),i=KO(e,wQ),s=[].concat(x0(a),x0(i)),l=KO(e,_Q),c="".concat(r,"Id"),u=r[0],d=t;if(s.length&&(d=s.reduce(function(e,t){if(t.props[c]===n&&AX(t.props,"extendDomain")&&EO(t.props[u])){var r=t.props[u];return[Math.min(e[0],r),Math.max(e[1],r)]}return e},d)),l.length){var p="".concat(u,"1"),f="".concat(u,"2");d=l.reduce(function(e,t){if(t.props[c]===n&&AX(t.props,"extendDomain")&&EO(t.props[p])&&EO(t.props[f])){var r=t.props[p],o=t.props[f];return[Math.min(e[0],r,o),Math.max(e[1],r,o)]}return e},d)}return o&&o.length&&(d=o.reduce(function(e,t){return EO(t)?[Math.min(e[0],t),Math.max(e[1],t)]:e},d)),d},A0={exports:{}};!function(e){var t=Object.prototype.hasOwnProperty,n="~";function r(){}function o(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function a(e,t,r,a,i){if("function"!=typeof r)throw new TypeError("The listener must be a function");var s=new o(r,a||e,i),l=n?n+t:t;return e._events[l]?e._events[l].fn?e._events[l]=[e._events[l],s]:e._events[l].push(s):(e._events[l]=s,e._eventsCount++),e}function i(e,t){0===--e._eventsCount?e._events=new r:delete e._events[t]}function s(){this._events=new r,this._eventsCount=0}Object.create&&(r.prototype=Object.create(null),(new r).__proto__||(n=!1)),s.prototype.eventNames=function(){var e,r,o=[];if(0===this._eventsCount)return o;for(r in e=this._events)t.call(e,r)&&o.push(n?r.slice(1):r);return Object.getOwnPropertySymbols?o.concat(Object.getOwnPropertySymbols(e)):o},s.prototype.listeners=function(e){var t=n?n+e:e,r=this._events[t];if(!r)return[];if(r.fn)return[r.fn];for(var o=0,a=r.length,i=new Array(a);o<a;o++)i[o]=r[o].fn;return i},s.prototype.listenerCount=function(e){var t=n?n+e:e,r=this._events[t];return r?r.fn?1:r.length:0},s.prototype.emit=function(e,t,r,o,a,i){var s=n?n+e:e;if(!this._events[s])return!1;var l,c,u=this._events[s],d=arguments.length;if(u.fn){switch(u.once&&this.removeListener(e,u.fn,void 0,!0),d){case 1:return u.fn.call(u.context),!0;case 2:return u.fn.call(u.context,t),!0;case 3:return u.fn.call(u.context,t,r),!0;case 4:return u.fn.call(u.context,t,r,o),!0;case 5:return u.fn.call(u.context,t,r,o,a),!0;case 6:return u.fn.call(u.context,t,r,o,a,i),!0}for(c=1,l=new Array(d-1);c<d;c++)l[c-1]=arguments[c];u.fn.apply(u.context,l)}else{var p,f=u.length;for(c=0;c<f;c++)switch(u[c].once&&this.removeListener(e,u[c].fn,void 0,!0),d){case 1:u[c].fn.call(u[c].context);break;case 2:u[c].fn.call(u[c].context,t);break;case 3:u[c].fn.call(u[c].context,t,r);break;case 4:u[c].fn.call(u[c].context,t,r,o);break;default:if(!l)for(p=1,l=new Array(d-1);p<d;p++)l[p-1]=arguments[p];u[c].fn.apply(u[c].context,l)}}return!0},s.prototype.on=function(e,t,n){return a(this,e,t,n,!1)},s.prototype.once=function(e,t,n){return a(this,e,t,n,!0)},s.prototype.removeListener=function(e,t,r,o){var a=n?n+e:e;if(!this._events[a])return this;if(!t)return i(this,a),this;var s=this._events[a];if(s.fn)s.fn!==t||o&&!s.once||r&&s.context!==r||i(this,a);else{for(var l=0,c=[],u=s.length;l<u;l++)(s[l].fn!==t||o&&!s[l].once||r&&s[l].context!==r)&&c.push(s[l]);c.length?this._events[a]=1===c.length?c[0]:c:i(this,a)}return this},s.prototype.removeAllListeners=function(e){var t;return e?(t=n?n+e:e,this._events[t]&&i(this,t)):(this._events=new r,this._eventsCount=0),this},s.prototype.off=s.prototype.removeListener,s.prototype.addListener=s.prototype.on,s.prefixed=n,s.EventEmitter=s,e.exports=s}(A0);var T0=new(0,A0.exports),O0="recharts.syncMouseEvents";function C0(e){return C0="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},C0(e)}function I0(e,t,n){return t&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,R0(r.key),r)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function N0(e,t,n){return(t=R0(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function R0(e){var t=function(e,t){if("object"!=C0(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=C0(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==C0(t)?t:t+""}var _0=function(){return I0(function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),N0(this,"activeIndex",0),N0(this,"coordinateList",[]),N0(this,"layout","horizontal")},[{key:"setDetails",value:function(e){var t,n=e.coordinateList,r=void 0===n?null:n,o=e.container,a=void 0===o?null:o,i=e.layout,s=void 0===i?null:i,l=e.offset,c=void 0===l?null:l,u=e.mouseHandlerCallback,d=void 0===u?null:u;this.coordinateList=null!==(t=null!=r?r:this.coordinateList)&&void 0!==t?t:[],this.container=null!=a?a:this.container,this.layout=null!=s?s:this.layout,this.offset=null!=c?c:this.offset,this.mouseHandlerCallback=null!=d?d:this.mouseHandlerCallback,this.activeIndex=Math.min(Math.max(this.activeIndex,0),this.coordinateList.length-1)}},{key:"focus",value:function(){this.spoofMouse()}},{key:"keyboardEvent",value:function(e){if(0!==this.coordinateList.length)switch(e.key){case"ArrowRight":if("horizontal"!==this.layout)return;this.activeIndex=Math.min(this.activeIndex+1,this.coordinateList.length-1),this.spoofMouse();break;case"ArrowLeft":if("horizontal"!==this.layout)return;this.activeIndex=Math.max(this.activeIndex-1,0),this.spoofMouse()}}},{key:"setIndex",value:function(e){this.activeIndex=e}},{key:"spoofMouse",value:function(){var e,t;if("horizontal"===this.layout&&0!==this.coordinateList.length){var n=this.container.getBoundingClientRect(),r=n.x,o=n.y,a=n.height,i=this.coordinateList[this.activeIndex].coordinate,s=(null===(e=window)||void 0===e?void 0:e.scrollX)||0,l=(null===(t=window)||void 0===t?void 0:t.scrollY)||0,c=r+i+s,u=o+this.offset.top+a/2+l;this.mouseHandlerCallback({pageX:c,pageY:u})}}}])}();function P0(e){var t=e.cx,n=e.cy,r=e.radius,o=e.startAngle,a=e.endAngle;return{points:[Mq(t,n,r,o),Mq(t,n,r,a)],cx:t,cy:n,radius:r,startAngle:o,endAngle:a}}function L0(e,t,n){var r,o,a,i;if("horizontal"===e)a=r=t.x,o=n.top,i=n.top+n.height;else if("vertical"===e)i=o=t.y,r=n.left,a=n.left+n.width;else if(null!=t.cx&&null!=t.cy){if("centric"!==e)return P0(t);var s=t.cx,l=t.cy,c=t.innerRadius,u=t.outerRadius,d=t.angle,p=Mq(s,l,c,d),f=Mq(s,l,u,d);r=p.x,o=p.y,a=f.x,i=f.y}return[{x:r,y:o},{x:a,y:i}]}function D0(e){return D0="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},D0(e)}function M0(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function j0(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?M0(Object(n),!0).forEach(function(t){F0(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):M0(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function F0(e,t,n){var r;return r=function(e,t){if("object"!=D0(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=D0(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(t,"string"),(t="symbol"==D0(r)?r:r+"")in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function B0(t){var n,r,o,a=t.element,i=t.tooltipEventType,s=t.isActive,l=t.activeCoordinate,c=t.activePayload,u=t.offset,d=t.activeTooltipIndex,p=t.tooltipAxisBandSize,f=t.layout,g=t.chartName,m=null!==(n=a.props.cursor)&&void 0!==n?n:null===(r=a.type.defaultProps)||void 0===r?void 0:r.cursor;if(!a||!m||!s||!l||"ScatterChart"!==g&&"axis"!==i)return null;var h=PH;if("ScatterChart"===g)o=l,h=sY;else if("BarChart"===g)o=function(e,t,n,r){var o=r/2;return{stroke:"none",fill:"#ccc",x:"horizontal"===e?t.x-o:n.left+.5,y:"horizontal"===e?n.top+.5:t.y-o,width:"horizontal"===e?r:n.width-1,height:"horizontal"===e?n.height-1:r}}(f,l,u,p),h=GW;else if("radial"===f){var b=P0(l),y=b.cx,v=b.cy,w=b.radius;o={cx:y,cy:v,startAngle:b.startAngle,endAngle:b.endAngle,innerRadius:w,outerRadius:w},h=SH}else o={points:L0(f,l,u)},h=PH;var S=j0(j0(j0(j0({stroke:"#ccc",pointerEvents:"none"},u),o),eC(m,!1)),{},{payload:c,payloadIndex:d,className:Rk("recharts-tooltip-cursor",m.className)});return e.isValidElement(m)?e.cloneElement(m,S):e.createElement(h,S)}var U0=["item"],z0=["children","className","width","height","style","compact","title","desc"];function $0(e){return $0="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},$0(e)}function G0(){return G0=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},G0.apply(this,arguments)}function q0(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a,i,s=[],l=!0,c=!1;try{if(a=(n=n.call(e)).next,0===t);else for(;!(l=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(c)throw o}}return s}}(e,t)||Q0(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function H0(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function V0(e,t,n){return t&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r1(r.key),r)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function W0(e,t,n){return t=K0(t),function(e,t){if(t&&("object"===$0(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Y0()?Reflect.construct(t,n||[],K0(e).constructor):t.apply(e,n))}function Y0(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Y0=function(){return!!e})()}function K0(e){return K0=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},K0(e)}function X0(e,t){return X0=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},X0(e,t)}function Z0(e){return function(e){if(Array.isArray(e))return J0(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Q0(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Q0(e,t){if(e){if("string"==typeof e)return J0(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?J0(e,t):void 0}}function J0(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function e1(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function t1(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?e1(Object(n),!0).forEach(function(t){n1(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):e1(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function n1(e,t,n){return(t=r1(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r1(e){var t=function(e,t){if("object"!=$0(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=$0(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==$0(t)?t:t+""}var o1={xAxis:["bottom","top"],yAxis:["left","right"]},a1={width:"100%",height:"100%"},i1={x:0,y:0};function s1(e){return e}var l1=function(e,t){var n=t.graphicalItems,r=t.dataStartIndex,o=t.dataEndIndex,a=(null!=n?n:[]).reduce(function(e,t){var n=t.props.data;return n&&n.length?[].concat(Z0(e),Z0(n)):e},[]);return a.length>0?a:e&&e.length&&EO(r)&&EO(o)?e.slice(r,o+1):[]};function c1(e){return"number"===e?[0,"auto"]:void 0}var u1=function(e,t,n,r){var o=e.graphicalItems,a=e.tooltipAxis,i=l1(t,e);return n<0||!o||!o.length||n>=i.length?null:o.reduce(function(o,s){var l,c,u=null!==(l=s.props.data)&&void 0!==l?l:t;(u&&e.dataStartIndex+e.dataEndIndex!==0&&e.dataEndIndex-e.dataStartIndex>=n&&(u=u.slice(e.dataStartIndex,e.dataEndIndex+1)),a.dataKey&&!a.allowDuplicatedCategory)?c=NO(void 0===u?i:u,a.dataKey,r):c=u&&u[n]||i[n];return c?[].concat(Z0(o),[Oq(s,c)]):o},[])},d1=function(e,t,n,r){var o=r||{x:e.chartX,y:e.chartY},a=function(e,t){return"horizontal"===t?e.x:"vertical"===t?e.y:"centric"===t?e.angle:e.radius}(o,n),i=e.orderedTooltipTicks,s=e.tooltipAxis,l=e.tooltipTicks,c=function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=arguments.length>2?arguments[2]:void 0,o=arguments.length>3?arguments[3]:void 0,a=-1,i=null!==(t=null==n?void 0:n.length)&&void 0!==t?t:0;if(i<=1)return 0;if(o&&"angleAxis"===o.axisType&&Math.abs(Math.abs(o.range[1]-o.range[0])-360)<=1e-6)for(var s=o.range,l=0;l<i;l++){var c=l>0?r[l-1].coordinate:r[i-1].coordinate,u=r[l].coordinate,d=l>=i-1?r[0].coordinate:r[l+1].coordinate,p=void 0;if(SO(u-c)!==SO(d-u)){var f=[];if(SO(d-u)===SO(s[1]-s[0])){p=d;var g=u+s[1]-s[0];f[0]=Math.min(g,(g+c)/2),f[1]=Math.max(g,(g+c)/2)}else{p=c;var m=d+s[1]-s[0];f[0]=Math.min(u,(m+u)/2),f[1]=Math.max(u,(m+u)/2)}var h=[Math.min(u,(p+u)/2),Math.max(u,(p+u)/2)];if(e>h[0]&&e<=h[1]||e>=f[0]&&e<=f[1]){a=r[l].index;break}}else{var b=Math.min(c,d),y=Math.max(c,d);if(e>(b+u)/2&&e<=(y+u)/2){a=r[l].index;break}}}else for(var v=0;v<i;v++)if(0===v&&e<=(n[v].coordinate+n[v+1].coordinate)/2||v>0&&v<i-1&&e>(n[v].coordinate+n[v-1].coordinate)/2&&e<=(n[v].coordinate+n[v+1].coordinate)/2||v===i-1&&e>(n[v].coordinate+n[v-1].coordinate)/2){a=n[v].index;break}return a}(a,i,l,s);if(c>=0&&l){var u=l[c]&&l[c].value,d=u1(e,t,c,u),p=function(e,t,n,r){var o=t.find(function(e){return e&&e.index===n});if(o){if("horizontal"===e)return{x:o.coordinate,y:r.y};if("vertical"===e)return{x:r.x,y:o.coordinate};if("centric"===e){var a=o.coordinate,i=r.radius;return t1(t1(t1({},r),Mq(r.cx,r.cy,i,a)),{},{angle:a,radius:i})}var s=o.coordinate,l=r.angle;return t1(t1(t1({},r),Mq(r.cx,r.cy,s,l)),{},{angle:l,radius:s})}return i1}(n,i,c,o);return{activeTooltipIndex:c,activeLabel:u,activePayload:d,activeCoordinate:p}}return null},p1=function(e,t){var n=t.axes,r=t.graphicalItems,o=t.axisType,a=t.axisIdKey,i=t.stackGroups,s=t.dataStartIndex,l=t.dataEndIndex,c=e.layout,u=e.children,d=e.stackOffset,p=lq(c,o);return n.reduce(function(t,n){var f,g=void 0!==n.type.defaultProps?t1(t1({},n.type.defaultProps),n.props):n.props,m=g.type,h=g.dataKey,b=g.allowDataOverflow,y=g.allowDuplicatedCategory,v=g.scale,w=g.ticks,S=g.includeHidden,x=g[a];if(t[x])return t;var E,k,A,T=l1(e.data,{graphicalItems:r.filter(function(e){var t;return(a in e.props?e.props[a]:null===(t=e.type.defaultProps)||void 0===t?void 0:t[a])===x}),dataStartIndex:s,dataEndIndex:l}),O=T.length;(function(e,t,n){if("number"===n&&!0===t&&Array.isArray(e)){var r=null==e?void 0:e[0],o=null==e?void 0:e[1];if(r&&o&&EO(r)&&EO(o))return!0}return!1})(g.domain,b,m)&&(E=kq(g.domain,null,b),!p||"number"!==m&&"auto"===v||(A=oq(T,h,"category")));var C=c1(m);if(!E||0===E.length){var I,N=null!==(I=g.domain)&&void 0!==I?I:C;if(h){if(E=oq(T,h,m),"category"===m&&p){var R=function(e){if(!Array.isArray(e))return!1;for(var t=e.length,n={},r=0;r<t;r++){if(n[e[r]])return!0;n[e[r]]=!0}return!1}(E);y&&R?(k=E,E=QK(0,O)):y||(E=Tq(N,E,n).reduce(function(e,t){return e.indexOf(t)>=0?e:[].concat(Z0(e),[t])},[]))}else if("category"===m)E=y?E.filter(function(e){return""!==e&&!aO(e)}):Tq(N,E,n).reduce(function(e,t){return e.indexOf(t)>=0||""===t||aO(t)?e:[].concat(Z0(e),[t])},[]);else if("number"===m){var _=function(e,t,n,r,o){var a=t.map(function(t){return iq(e,t,n,o,r)}).filter(function(e){return!aO(e)});return a&&a.length?a.reduce(function(e,t){return[Math.min(e[0],t[0]),Math.max(e[1],t[1])]},[1/0,-1/0]):null}(T,r.filter(function(e){var t,n,r=a in e.props?e.props[a]:null===(t=e.type.defaultProps)||void 0===t?void 0:t[a],o="hide"in e.props?e.props.hide:null===(n=e.type.defaultProps)||void 0===n?void 0:n.hide;return r===x&&(S||!o)}),h,o,c);_&&(E=_)}!p||"number"!==m&&"auto"===v||(A=oq(T,h,"category"))}else E=p?QK(0,O):i&&i[x]&&i[x].hasStack&&"number"===m?"expand"===d?[0,1]:Sq(i[x].stackGroups,s,l):sq(T,r.filter(function(e){var t=a in e.props?e.props[a]:e.type.defaultProps[a],n="hide"in e.props?e.props.hide:e.type.defaultProps.hide;return t===x&&(S||!n)}),m,c,!0);if("number"===m)E=k0(u,E,x,o,w),N&&(E=kq(N,E,b));else if("category"===m&&N){var P=N;E.every(function(e){return P.indexOf(e)>=0})&&(E=P)}}return t1(t1({},t),{},n1({},x,t1(t1({},g),{},{axisType:o,domain:E,categoricalDomain:A,duplicateDomain:k,originalDomain:null!==(f=g.domain)&&void 0!==f?f:C,isCategorical:p,layout:c})))},{})},f1=function(e,t){var n=t.axisType,r=void 0===n?"xAxis":n,o=t.AxisComp,a=t.graphicalItems,i=t.stackGroups,s=t.dataStartIndex,l=t.dataEndIndex,c=e.children,u="".concat(r,"Id"),d=KO(c,o),p={};return d&&d.length?p=p1(e,{axes:d,graphicalItems:a,axisType:r,axisIdKey:u,stackGroups:i,dataStartIndex:s,dataEndIndex:l}):a&&a.length&&(p=function(e,t){var n=t.graphicalItems,r=t.Axis,o=t.axisType,a=t.axisIdKey,i=t.stackGroups,s=t.dataStartIndex,l=t.dataEndIndex,c=e.layout,u=e.children,d=l1(e.data,{graphicalItems:n,dataStartIndex:s,dataEndIndex:l}),p=d.length,f=lq(c,o),g=-1;return n.reduce(function(e,t){var m,h=(void 0!==t.type.defaultProps?t1(t1({},t.type.defaultProps),t.props):t.props)[a],b=c1("number");return e[h]?e:(g++,f?m=QK(0,p):i&&i[h]&&i[h].hasStack?(m=Sq(i[h].stackGroups,s,l),m=k0(u,m,h,o)):(m=kq(b,sq(d,n.filter(function(e){var t,n,r=a in e.props?e.props[a]:null===(t=e.type.defaultProps)||void 0===t?void 0:t[a],o="hide"in e.props?e.props.hide:null===(n=e.type.defaultProps)||void 0===n?void 0:n.hide;return r===h&&!o}),"number",c),r.defaultProps.allowDataOverflow),m=k0(u,m,h,o)),t1(t1({},e),{},n1({},h,t1(t1({axisType:o},r.defaultProps),{},{hide:!0,orientation:oO(o1,"".concat(o,".").concat(g%2),null),domain:m,originalDomain:b,isCategorical:f,layout:c}))))},{})}(e,{Axis:o,graphicalItems:a,axisType:r,axisIdKey:u,stackGroups:i,dataStartIndex:s,dataEndIndex:l})),p},g1=function(e){var t=e.children,n=e.defaultShowTooltip,r=XO(t,hX),o=0,a=0;return e.data&&0!==e.data.length&&(a=e.data.length-1),r&&r.props&&(r.props.startIndex>=0&&(o=r.props.startIndex),r.props.endIndex>=0&&(a=r.props.endIndex)),{chartX:0,chartY:0,dataStartIndex:o,dataEndIndex:a,activeTooltipIndex:-1,isTooltipActive:Boolean(n)}},m1=function(e){return"horizontal"===e?{numericAxisName:"yAxis",cateAxisName:"xAxis"}:"vertical"===e?{numericAxisName:"xAxis",cateAxisName:"yAxis"}:"centric"===e?{numericAxisName:"radiusAxis",cateAxisName:"angleAxis"}:{numericAxisName:"angleAxis",cateAxisName:"radiusAxis"}},h1=function(e,t){var n=e.props,r=(e.graphicalItems,e.xAxisMap),o=void 0===r?{}:r,a=e.yAxisMap,i=void 0===a?{}:a,s=n.width,l=n.height,c=n.children,u=n.margin||{},d=XO(c,hX),p=XO(c,EL),f=Object.keys(i).reduce(function(e,t){var n=i[t],r=n.orientation;return n.mirror||n.hide?e:t1(t1({},e),{},n1({},r,e[r]+n.width))},{left:u.left||0,right:u.right||0}),g=Object.keys(o).reduce(function(e,t){var n=o[t],r=n.orientation;return n.mirror||n.hide?e:t1(t1({},e),{},n1({},r,oO(e,"".concat(r))+n.height))},{top:u.top||0,bottom:u.bottom||0}),m=t1(t1({},g),f),h=m.bottom;d&&(m.bottom+=d.props.height||hX.defaultProps.height),p&&t&&(m=function(e,t,n,r){var o=n.children,a=n.width,i=n.margin,s=a-(i.left||0)-(i.right||0),l=XG({children:o,legendWidth:s});if(l){var c=r||{},u=c.width,d=c.height,p=l.align,f=l.verticalAlign,g=l.layout;if(("vertical"===g||"horizontal"===g&&"middle"===f)&&"center"!==p&&EO(e[p]))return tq(tq({},e),{},nq({},p,e[p]+(u||0)));if(("horizontal"===g||"vertical"===g&&"center"===p)&&"middle"!==f&&EO(e[f]))return tq(tq({},e),{},nq({},f,e[f]+(d||0)))}return e}(m,0,n,t));var b=s-m.left-m.right,y=l-m.top-m.bottom;return t1(t1({brushBottom:h},m),{},{width:Math.max(b,0),height:Math.max(y,0)})},b1=function(e,t){return"xAxis"===t?e[t].width:"yAxis"===t?e[t].height:void 0},y1=function(t){var n=t.chartName,r=t.GraphicalChild,o=t.defaultTooltipEventType,a=void 0===o?"axis":o,i=t.validateTooltipEventTypes,s=void 0===i?["axis"]:i,l=t.axisComponents,c=t.legendContent,u=t.formatAxisMap,d=t.defaultProps,p=function(e,t){var n=t.graphicalItems,r=t.stackGroups,o=t.offset,a=t.updateId,i=t.dataStartIndex,s=t.dataEndIndex,c=e.barSize,u=e.layout,d=e.barGap,p=e.barCategoryGap,f=e.maxBarSize,g=m1(u),m=g.numericAxisName,h=g.cateAxisName,b=function(e){return!(!e||!e.length)&&e.some(function(e){var t=HO(e&&e.type);return t&&t.indexOf("Bar")>=0})}(n),y=[];return n.forEach(function(n,g){var v=l1(e.data,{graphicalItems:[n],dataStartIndex:i,dataEndIndex:s}),w=void 0!==n.type.defaultProps?t1(t1({},n.type.defaultProps),n.props):n.props,S=w.dataKey,x=w.maxBarSize,E=w["".concat(m,"Id")],k=w["".concat(h,"Id")],A=l.reduce(function(e,r){var o,a,i=t["".concat(r.axisType,"Map")],s=w["".concat(r.axisType,"Id")];i&&i[s]||"zAxis"===r.axisType||("production"!==process.env.NODE_ENV?RG(0,"Specifying a(n) ".concat(r.axisType,"Id requires a corresponding ").concat(r.axisType,"Id on the targeted graphical component ").concat(null!==(o=null==n||null===(a=n.type)||void 0===a?void 0:a.displayName)&&void 0!==o?o:"")):RG());var l=i[s];return t1(t1({},e),{},n1(n1({},r.axisType,l),"".concat(r.axisType,"Ticks"),uq(l)))},{}),T=A[h],O=A["".concat(h,"Ticks")],C=r&&r[E]&&r[E].hasStack&&function(e,t){var n,r=(null!==(n=e.type)&&void 0!==n&&n.defaultProps?tq(tq({},e.type.defaultProps),e.props):e.props).stackId;if(kO(r)){var o=t[r];if(o){var a=o.items.indexOf(e);return a>=0?o.stackedData[a]:null}}return null}(n,r[E].stackGroups),I=HO(n.type).indexOf("Bar")>=0,N=Aq(T,O),R=[],_=b&&function(e){var t=e.barSize,n=e.totalSize,r=e.stackGroups,o=void 0===r?{}:r;if(!o)return{};for(var a={},i=Object.keys(o),s=0,l=i.length;s<l;s++)for(var c=o[i[s]].stackGroups,u=Object.keys(c),d=0,p=u.length;d<p;d++){var f=c[u[d]],g=f.items,m=f.cateAxisId,h=g.filter(function(e){return HO(e.type).indexOf("Bar")>=0});if(h&&h.length){var b=h[0].type.defaultProps,y=void 0!==b?tq(tq({},b),h[0].props):h[0].props,v=y.barSize,w=y[m];a[w]||(a[w]=[]);var S=aO(v)?t:v;a[w].push({item:h[0],stackList:h.slice(1),barSize:aO(S)?void 0:OO(S,n,0)})}}return a}({barSize:c,stackGroups:r,totalSize:b1(A,h)});if(I){var P,L,D=aO(x)?f:x,M=null!==(P=null!==(L=Aq(T,O,!0))&&void 0!==L?L:D)&&void 0!==P?P:0;R=function(e){var t=e.barGap,n=e.barCategoryGap,r=e.bandSize,o=e.sizeList,a=void 0===o?[]:o,i=e.maxBarSize,s=a.length;if(s<1)return null;var l,c=OO(t,r,0,!0),u=[];if(a[0].barSize===+a[0].barSize){var d=!1,p=r/s,f=a.reduce(function(e,t){return e+t.barSize||0},0);(f+=(s-1)*c)>=r&&(f-=(s-1)*c,c=0),f>=r&&p>0&&(d=!0,f=s*(p*=.9));var g={offset:((r-f)/2|0)-c,size:0};l=a.reduce(function(e,t){var n={item:t.item,position:{offset:g.offset+g.size+c,size:d?p:t.barSize}},r=[].concat(QG(e),[n]);return g=r[r.length-1].position,t.stackList&&t.stackList.length&&t.stackList.forEach(function(e){r.push({item:e,position:g})}),r},u)}else{var m=OO(n,r,0,!0);r-2*m-(s-1)*c<=0&&(c=0);var h=(r-2*m-(s-1)*c)/s;h>1&&(h>>=0);var b=i===+i?Math.min(h,i):h;l=a.reduce(function(e,t,n){var r=[].concat(QG(e),[{item:t.item,position:{offset:m+(h+c)*n+(h-b)/2,size:b}}]);return t.stackList&&t.stackList.length&&t.stackList.forEach(function(e){r.push({item:e,position:r[r.length-1].position})}),r},u)}return l}({barGap:d,barCategoryGap:p,bandSize:M!==N?M:N,sizeList:_[k],maxBarSize:D}),M!==N&&(R=R.map(function(e){return t1(t1({},e),{},{position:t1(t1({},e.position),{},{offset:e.position.offset-M/2})})}))}var j,F,B=n&&n.type&&n.type.getComposedData;B&&y.push({props:t1(t1({},B(t1(t1({},A),{},{displayedData:v,props:e,dataKey:S,item:n,bandSize:N,barPosition:R,offset:o,stackedData:C,layout:u,dataStartIndex:i,dataEndIndex:s}))),{},n1(n1(n1({key:n.key||"item-".concat(g)},m,A[m]),h,A[h]),"animationId",a)),childIndex:(j=n,F=e.children,YO(F).indexOf(j)),item:n})}),y},f=function(e,t){var o=e.props,a=e.dataStartIndex,i=e.dataEndIndex,s=e.updateId;if(!ZO({props:o}))return null;var c=o.children,d=o.layout,f=o.stackOffset,g=o.data,m=o.reverseStackOrder,h=m1(d),b=h.numericAxisName,y=h.cateAxisName,v=KO(c,r),w=function(e,t,n,r,o,a){if(!e)return null;var i=(a?t.reverse():t).reduce(function(e,t){var o,a=null!==(o=t.type)&&void 0!==o&&o.defaultProps?tq(tq({},t.type.defaultProps),t.props):t.props,i=a.stackId;if(a.hide)return e;var s=a[n],l=e[s]||{hasStack:!1,stackGroups:{}};if(kO(i)){var c=l.stackGroups[i]||{numericAxisId:n,cateAxisId:r,items:[]};c.items.push(t),l.hasStack=!0,l.stackGroups[i]=c}else l.stackGroups[TO("_stackId_")]={numericAxisId:n,cateAxisId:r,items:[t]};return tq(tq({},e),{},nq({},s,l))},{});return Object.keys(i).reduce(function(t,a){var s=i[a];return s.hasStack&&(s.stackGroups=Object.keys(s.stackGroups).reduce(function(t,a){var i=s.stackGroups[a];return tq(tq({},t),{},nq({},a,{numericAxisId:n,cateAxisId:r,items:i.items,stackedData:bq(e,i.items,o)}))},{})),tq(tq({},t),{},nq({},a,s))},{})}(g,v,"".concat(b,"Id"),"".concat(y,"Id"),f,m),S=l.reduce(function(e,t){var n="".concat(t.axisType,"Map");return t1(t1({},e),{},n1({},n,f1(o,t1(t1({},t),{},{graphicalItems:v,stackGroups:t.axisType===b&&w,dataStartIndex:a,dataEndIndex:i}))))},{}),x=h1(t1(t1({},S),{},{props:o,graphicalItems:v}),null==t?void 0:t.legendBBox);Object.keys(S).forEach(function(e){S[e]=u(o,S[e],x,e.replace("Map",""),n)});var E,k,A=S["".concat(y,"Map")],T=(E=CO(A),{tooltipTicks:k=uq(E,!1,!0),orderedTooltipTicks:kD(k,function(e){return e.coordinate}),tooltipAxis:E,tooltipAxisBandSize:Aq(E,k)}),O=p(o,t1(t1({},S),{},{dataStartIndex:a,dataEndIndex:i,updateId:s,graphicalItems:v,stackGroups:w,offset:x}));return t1(t1({formattedGraphicalItems:O,graphicalItems:v,offset:x,stackGroups:w},T),S)},g=function(t){function r(t){var o,a,i;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r),n1(i=W0(this,r,[t]),"eventEmitterSymbol",Symbol("rechartsEventEmitter")),n1(i,"accessibilityManager",new _0),n1(i,"handleLegendBBoxUpdate",function(e){if(e){var t=i.state,n=t.dataStartIndex,r=t.dataEndIndex,o=t.updateId;i.setState(t1({legendBBox:e},f({props:i.props,dataStartIndex:n,dataEndIndex:r,updateId:o},t1(t1({},i.state),{},{legendBBox:e}))))}}),n1(i,"handleReceiveSyncEvent",function(e,t,n){if(i.props.syncId===e){if(n===i.eventEmitterSymbol&&"function"!=typeof i.props.syncMethod)return;i.applySyncEvent(t)}}),n1(i,"handleBrushChange",function(e){var t=e.startIndex,n=e.endIndex;if(t!==i.state.dataStartIndex||n!==i.state.dataEndIndex){var r=i.state.updateId;i.setState(function(){return t1({dataStartIndex:t,dataEndIndex:n},f({props:i.props,dataStartIndex:t,dataEndIndex:n,updateId:r},i.state))}),i.triggerSyncEvent({dataStartIndex:t,dataEndIndex:n})}}),n1(i,"handleMouseEnter",function(e){var t=i.getMouseInfo(e);if(t){var n=t1(t1({},t),{},{isTooltipActive:!0});i.setState(n),i.triggerSyncEvent(n);var r=i.props.onMouseEnter;lA(r)&&r(n,e)}}),n1(i,"triggeredAfterMouseMove",function(e){var t=i.getMouseInfo(e),n=t?t1(t1({},t),{},{isTooltipActive:!0}):{isTooltipActive:!1};i.setState(n),i.triggerSyncEvent(n);var r=i.props.onMouseMove;lA(r)&&r(n,e)}),n1(i,"handleItemMouseEnter",function(e){i.setState(function(){return{isTooltipActive:!0,activeItem:e,activePayload:e.tooltipPayload,activeCoordinate:e.tooltipPosition||{x:e.cx,y:e.cy}}})}),n1(i,"handleItemMouseLeave",function(){i.setState(function(){return{isTooltipActive:!1}})}),n1(i,"handleMouseMove",function(e){e.persist(),i.throttleTriggeredAfterMouseMove(e)}),n1(i,"handleMouseLeave",function(e){i.throttleTriggeredAfterMouseMove.cancel();var t={isTooltipActive:!1};i.setState(t),i.triggerSyncEvent(t);var n=i.props.onMouseLeave;lA(n)&&n(t,e)}),n1(i,"handleOuterEvent",function(e){var t,n=function(e){var t=e&&e.type;return t&&qO[t]?qO[t]:null}(e),r=oO(i.props,"".concat(n));n&&lA(r)&&r(null!==(t=/.*touch.*/i.test(n)?i.getMouseInfo(e.changedTouches[0]):i.getMouseInfo(e))&&void 0!==t?t:{},e)}),n1(i,"handleClick",function(e){var t=i.getMouseInfo(e);if(t){var n=t1(t1({},t),{},{isTooltipActive:!0});i.setState(n),i.triggerSyncEvent(n);var r=i.props.onClick;lA(r)&&r(n,e)}}),n1(i,"handleMouseDown",function(e){var t=i.props.onMouseDown;lA(t)&&t(i.getMouseInfo(e),e)}),n1(i,"handleMouseUp",function(e){var t=i.props.onMouseUp;lA(t)&&t(i.getMouseInfo(e),e)}),n1(i,"handleTouchMove",function(e){null!=e.changedTouches&&e.changedTouches.length>0&&i.throttleTriggeredAfterMouseMove(e.changedTouches[0])}),n1(i,"handleTouchStart",function(e){null!=e.changedTouches&&e.changedTouches.length>0&&i.handleMouseDown(e.changedTouches[0])}),n1(i,"handleTouchEnd",function(e){null!=e.changedTouches&&e.changedTouches.length>0&&i.handleMouseUp(e.changedTouches[0])}),n1(i,"handleDoubleClick",function(e){var t=i.props.onDoubleClick;lA(t)&&t(i.getMouseInfo(e),e)}),n1(i,"handleContextMenu",function(e){var t=i.props.onContextMenu;lA(t)&&t(i.getMouseInfo(e),e)}),n1(i,"triggerSyncEvent",function(e){void 0!==i.props.syncId&&T0.emit(O0,i.props.syncId,e,i.eventEmitterSymbol)}),n1(i,"applySyncEvent",function(e){var t=i.props,n=t.layout,r=t.syncMethod,o=i.state.updateId,a=e.dataStartIndex,s=e.dataEndIndex;if(void 0!==e.dataStartIndex||void 0!==e.dataEndIndex)i.setState(t1({dataStartIndex:a,dataEndIndex:s},f({props:i.props,dataStartIndex:a,dataEndIndex:s,updateId:o},i.state)));else if(void 0!==e.activeTooltipIndex){var l=e.chartX,c=e.chartY,u=e.activeTooltipIndex,d=i.state,p=d.offset,g=d.tooltipTicks;if(!p)return;if("function"==typeof r)u=r(g,e);else if("value"===r){u=-1;for(var m=0;m<g.length;m++)if(g[m].value===e.activeLabel){u=m;break}}var h=t1(t1({},p),{},{x:p.left,y:p.top}),b=Math.min(l,h.x+h.width),y=Math.min(c,h.y+h.height),v=g[u]&&g[u].value,w=u1(i.state,i.props.data,u),S=g[u]?{x:"horizontal"===n?g[u].coordinate:b,y:"horizontal"===n?y:g[u].coordinate}:i1;i.setState(t1(t1({},e),{},{activeLabel:v,activeCoordinate:S,activePayload:w,activeTooltipIndex:u}))}else i.setState(e)}),n1(i,"renderCursor",function(t){var r,o=i.state,a=o.isTooltipActive,s=o.activeCoordinate,l=o.activePayload,c=o.offset,u=o.activeTooltipIndex,d=o.tooltipAxisBandSize,p=i.getTooltipEventType(),f=null!==(r=t.props.active)&&void 0!==r?r:a,g=i.props.layout,m=t.key||"_recharts-cursor";return e.createElement(B0,{key:m,activeCoordinate:s,activePayload:l,activeTooltipIndex:u,chartName:n,element:t,isActive:f,layout:g,offset:c,tooltipAxisBandSize:d,tooltipEventType:p})}),n1(i,"renderPolarAxis",function(t,n,r){var o=oO(t,"type.axisType"),a=oO(i.state,"".concat(o,"Map")),s=t.type.defaultProps,l=void 0!==s?t1(t1({},s),t.props):t.props,c=a&&a[l["".concat(o,"Id")]];return e.cloneElement(t,t1(t1({},c),{},{className:Rk(o,c.className),key:t.key||"".concat(n,"-").concat(r),ticks:uq(c,!0)}))}),n1(i,"renderPolarGrid",function(t){var n=t.props,r=n.radialLines,o=n.polarAngles,a=n.polarRadius,s=i.state,l=s.radiusAxisMap,c=s.angleAxisMap,u=CO(l),d=CO(c),p=d.cx,f=d.cy,g=d.innerRadius,m=d.outerRadius;return e.cloneElement(t,{polarAngles:Array.isArray(o)?o:uq(d,!0).map(function(e){return e.coordinate}),polarRadius:Array.isArray(a)?a:uq(u,!0).map(function(e){return e.coordinate}),cx:p,cy:f,innerRadius:g,outerRadius:m,key:t.key||"polar-grid",radialLines:r})}),n1(i,"renderLegend",function(){var t=i.state.formattedGraphicalItems,n=i.props,r=n.children,o=n.width,a=n.height,s=i.props.margin||{},l=o-(s.left||0)-(s.right||0),u=XG({children:r,formattedGraphicalItems:t,legendWidth:l,legendContent:c});if(!u)return null;var d=u.item,p=H0(u,U0);return e.cloneElement(d,t1(t1({},p),{},{chartWidth:o,chartHeight:a,margin:s,onBBoxUpdate:i.handleLegendBBoxUpdate}))}),n1(i,"renderTooltip",function(){var t,n=i.props,r=n.children,o=n.accessibilityLayer,a=XO(r,cM);if(!a)return null;var s=i.state,l=s.isTooltipActive,c=s.activeCoordinate,u=s.activePayload,d=s.activeLabel,p=s.offset,f=null!==(t=a.props.active)&&void 0!==t?t:l;return e.cloneElement(a,{viewBox:t1(t1({},p),{},{x:p.left,y:p.top}),active:f,label:d,payload:f?u:[],coordinate:c,accessibilityLayer:o})}),n1(i,"renderBrush",function(t){var n=i.props,r=n.margin,o=n.data,a=i.state,s=a.offset,l=a.dataStartIndex,c=a.dataEndIndex,u=a.updateId;return e.cloneElement(t,{key:t.key||"_recharts-brush",onChange:pq(i.handleBrushChange,t.props.onChange),data:o,x:EO(t.props.x)?t.props.x:s.left,y:EO(t.props.y)?t.props.y:s.top+s.height+s.brushBottom-(r.bottom||0),width:EO(t.props.width)?t.props.width:s.width,startIndex:l,endIndex:c,updateId:"brush-".concat(u)})}),n1(i,"renderReferenceElement",function(t,n,r){if(!t)return null;var o=i.clipPathId,a=i.state,s=a.xAxisMap,l=a.yAxisMap,c=a.offset,u=t.type.defaultProps||{},d=t.props,p=d.xAxisId,f=void 0===p?u.xAxisId:p,g=d.yAxisId,m=void 0===g?u.yAxisId:g;return e.cloneElement(t,{key:t.key||"".concat(n,"-").concat(r),xAxis:s[f],yAxis:l[m],viewBox:{x:c.left,y:c.top,width:c.width,height:c.height},clipPathId:o})}),n1(i,"renderActivePoints",function(e){var t=e.item,n=e.activePoint,o=e.basePoint,a=e.childIndex,i=e.isRange,s=[],l=t.props.key,c=void 0!==t.item.type.defaultProps?t1(t1({},t.item.type.defaultProps),t.item.props):t.item.props,u=c.activeDot,d=t1(t1({index:a,dataKey:c.dataKey,cx:n.x,cy:n.y,r:4,fill:aq(t.item),strokeWidth:2,stroke:"#fff",payload:n.payload,value:n.value},eC(u,!1)),FO(u));return s.push(r.renderActiveDot(u,d,"".concat(l,"-activePoint-").concat(a))),o?s.push(r.renderActiveDot(u,t1(t1({},d),{},{cx:o.x,cy:o.y}),"".concat(l,"-basePoint-").concat(a))):i&&s.push(null),s}),n1(i,"renderGraphicChild",function(t,n,r){var o=i.filterFormatItem(t,n,r);if(!o)return null;var a=i.getTooltipEventType(),s=i.state,l=s.isTooltipActive,c=s.tooltipAxis,u=s.activeTooltipIndex,d=s.activeLabel,p=XO(i.props.children,cM),f=o.props,g=f.points,m=f.isRange,h=f.baseLine,b=void 0!==o.item.type.defaultProps?t1(t1({},o.item.type.defaultProps),o.item.props):o.item.props,y=b.activeDot,v=b.hide,w=b.activeBar,S=b.activeShape,x=Boolean(!v&&l&&p&&(y||w||S)),E={};"axis"!==a&&p&&"click"===p.props.trigger?E={onClick:pq(i.handleItemMouseEnter,t.props.onClick)}:"axis"!==a&&(E={onMouseLeave:pq(i.handleItemMouseLeave,t.props.onMouseLeave),onMouseEnter:pq(i.handleItemMouseEnter,t.props.onMouseEnter)});var k=e.cloneElement(t,t1(t1({},o.props),E));if(x){if(!(u>=0)){var A,T=(null!==(A=i.getItemByXY(i.state.activeCoordinate))&&void 0!==A?A:{graphicalItem:k}).graphicalItem,O=T.item,C=void 0===O?t:O,I=T.childIndex,N=t1(t1(t1({},o.props),E),{},{activeIndex:I});return[e.cloneElement(C,N),null,null]}var R,_;if(c.dataKey&&!c.allowDuplicatedCategory){var P="function"==typeof c.dataKey?function(e){return"function"==typeof c.dataKey?c.dataKey(e.payload):null}:"payload.".concat(c.dataKey.toString());R=NO(g,P,d),_=m&&h&&NO(h,P,d)}else R=null==g?void 0:g[u],_=m&&h&&h[u];if(S||w){var L=void 0!==t.props.activeIndex?t.props.activeIndex:u;return[e.cloneElement(t,t1(t1(t1({},o.props),E),{},{activeIndex:L})),null,null]}if(!aO(R))return[k].concat(Z0(i.renderActivePoints({item:o,activePoint:R,basePoint:_,childIndex:u,isRange:m})))}return m?[k,null,null]:[k,null]}),n1(i,"renderCustomized",function(t,n,r){return e.cloneElement(t,t1(t1({key:"recharts-customized-".concat(r)},i.props),i.state))}),n1(i,"renderMap",{CartesianGrid:{handler:s1,once:!0},ReferenceArea:{handler:i.renderReferenceElement},ReferenceLine:{handler:s1},ReferenceDot:{handler:i.renderReferenceElement},XAxis:{handler:s1},YAxis:{handler:s1},Brush:{handler:i.renderBrush,once:!0},Bar:{handler:i.renderGraphicChild},Line:{handler:i.renderGraphicChild},Area:{handler:i.renderGraphicChild},Radar:{handler:i.renderGraphicChild},RadialBar:{handler:i.renderGraphicChild},Scatter:{handler:i.renderGraphicChild},Pie:{handler:i.renderGraphicChild},Funnel:{handler:i.renderGraphicChild},Tooltip:{handler:i.renderCursor,once:!0},PolarGrid:{handler:i.renderPolarGrid,once:!0},PolarAngleAxis:{handler:i.renderPolarAxis},PolarRadiusAxis:{handler:i.renderPolarAxis},Customized:{handler:i.renderCustomized}}),i.clipPathId="".concat(null!==(o=t.id)&&void 0!==o?o:TO("recharts"),"-clip"),i.throttleTriggeredAfterMouseMove=_M(i.triggeredAfterMouseMove,null!==(a=t.throttleDelay)&&void 0!==a?a:1e3/60),i.state={},i}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&X0(e,t)}(r,t),V0(r,[{key:"componentDidMount",value:function(){var e,t;this.addListener(),this.accessibilityManager.setDetails({container:this.container,offset:{left:null!==(e=this.props.margin.left)&&void 0!==e?e:0,top:null!==(t=this.props.margin.top)&&void 0!==t?t:0},coordinateList:this.state.tooltipTicks,mouseHandlerCallback:this.triggeredAfterMouseMove,layout:this.props.layout}),this.displayDefaultTooltip()}},{key:"displayDefaultTooltip",value:function(){var e=this.props,t=e.children,n=e.data,r=e.height,o=e.layout,a=XO(t,cM);if(a){var i=a.props.defaultIndex;if(!("number"!=typeof i||i<0||i>this.state.tooltipTicks.length-1)){var s=this.state.tooltipTicks[i]&&this.state.tooltipTicks[i].value,l=u1(this.state,n,i,s),c=this.state.tooltipTicks[i].coordinate,u=(this.state.offset.top+r)/2,d="horizontal"===o?{x:c,y:u}:{y:c,x:u},p=this.state.formattedGraphicalItems.find(function(e){return"Scatter"===e.item.type.name});p&&(d=t1(t1({},d),p.props.points[i].tooltipPosition),l=p.props.points[i].tooltipPayload);var f={activeTooltipIndex:i,isTooltipActive:!0,activeLabel:s,activePayload:l,activeCoordinate:d};this.setState(f),this.renderCursor(a),this.accessibilityManager.setIndex(i)}}}},{key:"getSnapshotBeforeUpdate",value:function(e,t){if(!this.props.accessibilityLayer)return null;var n,r;(this.state.tooltipTicks!==t.tooltipTicks&&this.accessibilityManager.setDetails({coordinateList:this.state.tooltipTicks}),this.props.layout!==e.layout&&this.accessibilityManager.setDetails({layout:this.props.layout}),this.props.margin!==e.margin)&&this.accessibilityManager.setDetails({offset:{left:null!==(n=this.props.margin.left)&&void 0!==n?n:0,top:null!==(r=this.props.margin.top)&&void 0!==r?r:0}});return null}},{key:"componentDidUpdate",value:function(e){tC([XO(e.children,cM)],[XO(this.props.children,cM)])||this.displayDefaultTooltip()}},{key:"componentWillUnmount",value:function(){this.removeListener(),this.throttleTriggeredAfterMouseMove.cancel()}},{key:"getTooltipEventType",value:function(){var e=XO(this.props.children,cM);if(e&&"boolean"==typeof e.props.shared){var t=e.props.shared?"axis":"item";return s.indexOf(t)>=0?t:a}return a}},{key:"getMouseInfo",value:function(e){if(!this.container)return null;var t=this.container,n=t.getBoundingClientRect(),r=function(e){return{top:e.top+window.scrollY-document.documentElement.clientTop,left:e.left+window.scrollX-document.documentElement.clientLeft}}(n),o={chartX:Math.round(e.pageX-r.left),chartY:Math.round(e.pageY-r.top)},a=n.width/t.offsetWidth||1,i=this.inRange(o.chartX,o.chartY,a);if(!i)return null;var s=this.state,l=s.xAxisMap,c=s.yAxisMap,u=this.getTooltipEventType(),d=d1(this.state,this.props.data,this.props.layout,i);if("axis"!==u&&l&&c){var p=CO(l).scale,f=CO(c).scale,g=p&&p.invert?p.invert(o.chartX):null,m=f&&f.invert?f.invert(o.chartY):null;return t1(t1({},o),{},{xValue:g,yValue:m},d)}return d?t1(t1({},o),d):null}},{key:"inRange",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,r=this.props.layout,o=e/n,a=t/n;if("horizontal"===r||"vertical"===r){var i=this.state.offset;return o>=i.left&&o<=i.left+i.width&&a>=i.top&&a<=i.top+i.height?{x:o,y:a}:null}var s=this.state,l=s.angleAxisMap,c=s.radiusAxisMap;if(l&&c){var u=CO(l);return Uq({x:o,y:a},u)}return null}},{key:"parseEventsOfWrapper",value:function(){var e=this.props.children,t=this.getTooltipEventType(),n=XO(e,cM),r={};return n&&"axis"===t&&(r="click"===n.props.trigger?{onClick:this.handleClick}:{onMouseEnter:this.handleMouseEnter,onDoubleClick:this.handleDoubleClick,onMouseMove:this.handleMouseMove,onMouseLeave:this.handleMouseLeave,onTouchMove:this.handleTouchMove,onTouchStart:this.handleTouchStart,onTouchEnd:this.handleTouchEnd,onContextMenu:this.handleContextMenu}),t1(t1({},FO(this.props,this.handleOuterEvent)),r)}},{key:"addListener",value:function(){T0.on(O0,this.handleReceiveSyncEvent)}},{key:"removeListener",value:function(){T0.removeListener(O0,this.handleReceiveSyncEvent)}},{key:"filterFormatItem",value:function(e,t,n){for(var r=this.state.formattedGraphicalItems,o=0,a=r.length;o<a;o++){var i=r[o];if(i.item===e||i.props.key===e.key||t===HO(i.item.type)&&n===i.childIndex)return i}return null}},{key:"renderClipPath",value:function(){var t=this.clipPathId,n=this.state.offset,r=n.left,o=n.top,a=n.height,i=n.width;return e.createElement("defs",null,e.createElement("clipPath",{id:t},e.createElement("rect",{x:r,y:o,height:a,width:i})))}},{key:"getXScales",value:function(){var e=this.state.xAxisMap;return e?Object.entries(e).reduce(function(e,t){var n=q0(t,2),r=n[0],o=n[1];return t1(t1({},e),{},n1({},r,o.scale))},{}):null}},{key:"getYScales",value:function(){var e=this.state.yAxisMap;return e?Object.entries(e).reduce(function(e,t){var n=q0(t,2),r=n[0],o=n[1];return t1(t1({},e),{},n1({},r,o.scale))},{}):null}},{key:"getXScaleByAxisId",value:function(e){var t;return null===(t=this.state.xAxisMap)||void 0===t||null===(t=t[e])||void 0===t?void 0:t.scale}},{key:"getYScaleByAxisId",value:function(e){var t;return null===(t=this.state.yAxisMap)||void 0===t||null===(t=t[e])||void 0===t?void 0:t.scale}},{key:"getItemByXY",value:function(e){var t=this.state,n=t.formattedGraphicalItems,r=t.activeItem;if(n&&n.length)for(var o=0,a=n.length;o<a;o++){var i=n[o],s=i.props,l=i.item,c=void 0!==l.type.defaultProps?t1(t1({},l.type.defaultProps),l.props):l.props,u=HO(l.type);if("Bar"===u){var d=(s.data||[]).find(function(t){return zW(e,t)});if(d)return{graphicalItem:i,payload:d}}else if("RadialBar"===u){var p=(s.data||[]).find(function(t){return Uq(e,t)});if(p)return{graphicalItem:i,payload:p}}else if(kK(i,r)||AK(i,r)||TK(i,r)){var f=NK({graphicalItem:i,activeTooltipItem:r,itemData:c.data}),g=void 0===c.activeIndex?f:c.activeIndex;return{graphicalItem:t1(t1({},i),{},{childIndex:g}),payload:TK(i,r)?c.data[f]:i.props.data[f]}}}return null}},{key:"render",value:function(){var t=this;if(!ZO(this))return null;var n,r,o=this.props,a=o.children,i=o.className,s=o.width,l=o.height,c=o.style,u=o.compact,d=o.title,p=o.desc,f=H0(o,z0),g=eC(f,!1);if(u)return e.createElement($Z,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},e.createElement(sC,G0({},g,{width:s,height:l,title:d,desc:p}),this.renderClipPath(),rC(a,this.renderMap)));this.props.accessibilityLayer&&(g.tabIndex=null!==(n=this.props.tabIndex)&&void 0!==n?n:0,g.role=null!==(r=this.props.role)&&void 0!==r?r:"application",g.onKeyDown=function(e){t.accessibilityManager.keyboardEvent(e)},g.onFocus=function(){t.accessibilityManager.focus()});var m=this.parseEventsOfWrapper();return e.createElement($Z,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},e.createElement("div",G0({className:Rk("recharts-wrapper",i),style:t1({position:"relative",cursor:"default",width:s,height:l},c)},m,{ref:function(e){t.container=e}}),e.createElement(sC,G0({},g,{width:s,height:l,title:d,desc:p,style:a1}),this.renderClipPath(),rC(a,this.renderMap)),this.renderLegend(),this.renderTooltip()))}}])}(e.Component);n1(g,"displayName",n),n1(g,"defaultProps",t1({layout:"horizontal",stackOffset:"none",barCategoryGap:"10%",barGap:4,margin:{top:5,right:5,bottom:5,left:5},reverseStackOrder:!1,syncMethod:"index"},d)),n1(g,"getDerivedStateFromProps",function(e,t){var n=e.dataKey,r=e.data,o=e.children,a=e.width,i=e.height,s=e.layout,l=e.stackOffset,c=e.margin,u=t.dataStartIndex,d=t.dataEndIndex;if(void 0===t.updateId){var p=g1(e);return t1(t1(t1({},p),{},{updateId:0},f(t1(t1({props:e},p),{},{updateId:0}),t)),{},{prevDataKey:n,prevData:r,prevWidth:a,prevHeight:i,prevLayout:s,prevStackOffset:l,prevMargin:c,prevChildren:o})}if(n!==t.prevDataKey||r!==t.prevData||a!==t.prevWidth||i!==t.prevHeight||s!==t.prevLayout||l!==t.prevStackOffset||!_O(c,t.prevMargin)){var g=g1(e),m={chartX:t.chartX,chartY:t.chartY,isTooltipActive:t.isTooltipActive},h=t1(t1({},d1(t,r,s)),{},{updateId:t.updateId+1}),b=t1(t1(t1({},g),m),h);return t1(t1(t1({},b),f(t1({props:e},b),t)),{},{prevDataKey:n,prevData:r,prevWidth:a,prevHeight:i,prevLayout:s,prevStackOffset:l,prevMargin:c,prevChildren:o})}if(!tC(o,t.prevChildren)){var y,v,w,S,x=XO(o,hX),E=x&&null!==(y=null===(v=x.props)||void 0===v?void 0:v.startIndex)&&void 0!==y?y:u,k=x&&null!==(w=null===(S=x.props)||void 0===S?void 0:S.endIndex)&&void 0!==w?w:d,A=E!==u||k!==d,T=!aO(r)&&!A?t.updateId:t.updateId+1;return t1(t1({updateId:T},f(t1(t1({props:e},t),{},{updateId:T,dataStartIndex:E,dataEndIndex:k}),t)),{},{prevChildren:o,dataStartIndex:E,dataEndIndex:k})}return null}),n1(g,"renderActiveDot",function(t,n,r){var o;return o=e.isValidElement(t)?e.cloneElement(t,n):lA(t)?t(n):e.createElement(JW,n),e.createElement(dC,{className:"recharts-active-dot",key:r},o)});var m=e.forwardRef(function(t,n){return e.createElement(g,G0({},t,{ref:n}))});return m.displayName=g.displayName,m},v1=y1({chartName:"LineChart",GraphicalChild:jJ,axisComponents:[{axisType:"xAxis",AxisComp:u0},{axisType:"yAxis",AxisComp:S0}],formatAxisMap:yZ}),w1=y1({chartName:"BarChart",GraphicalChild:dZ,defaultTooltipEventType:"axis",validateTooltipEventTypes:["axis","item"],axisComponents:[{axisType:"xAxis",AxisComp:u0},{axisType:"yAxis",AxisComp:S0}],formatAxisMap:yZ}),S1=y1({chartName:"PieChart",GraphicalChild:$K,validateTooltipEventTypes:["item"],defaultTooltipEventType:"item",legendContent:"children",axisComponents:[{axisType:"angleAxis",AxisComp:qY},{axisType:"radiusAxis",AxisComp:NY}],formatAxisMap:function(e,t,n,r,o){var a=e.width,i=e.height,s=e.startAngle,l=e.endAngle,c=OO(e.cx,a,a/2),u=OO(e.cy,i,i/2),d=jq(a,i,n),p=OO(e.innerRadius,d,0),f=OO(e.outerRadius,d,.8*d);return Object.keys(t).reduce(function(e,n){var a,i=t[n],d=i.domain,g=i.reversed;if(aO(i.range))"angleAxis"===r?a=[s,l]:"radiusAxis"===r&&(a=[p,f]),g&&(a=[a[1],a[0]]);else{var m=_q(a=i.range,2);s=m[0],l=m[1]}var h=fq(i,o),b=h.realScaleType,y=h.scale;y.domain(d).range(a),mq(y);var v=yq(y,Nq(Nq({},i),{},{realScaleType:b})),w=Nq(Nq(Nq({},i),v),{},{range:a,radius:f,realScaleType:b,scale:y,cx:c,cy:u,innerRadius:p,outerRadius:f,startAngle:s,endAngle:l});return Nq(Nq({},e),{},Rq({},n,w))},{})},defaultProps:{layout:"centric",startAngle:0,endAngle:360,cx:"50%",cy:"50%",innerRadius:0,outerRadius:"80%"}}),x1=y1({chartName:"AreaChart",GraphicalChild:JJ,axisComponents:[{axisType:"xAxis",AxisComp:u0},{axisType:"yAxis",AxisComp:S0}],formatAxisMap:yZ});function E1(e){return e>=1e6?`${(e/1e6).toFixed(1)}M`:e>=1e3?`${(e/1e3).toFixed(1)}k`:String(e)}const k1=/(^|[_\W])(price|salary|cost|amount|revenue|expense|total|value|budget|spend|income|sale|balance)/i;function A1(e){return Number(e).toLocaleString("en-US",{maximumFractionDigits:2})}function T1(e,t){const n="string"==typeof e?e.trim():"";if(/^[A-Za-z]{3}$/.test(n))try{const e=n.toUpperCase(),t=new Intl.NumberFormat("en-US",{style:"currency",currency:e,maximumFractionDigits:2}),r=new Intl.NumberFormat("en-US",{style:"currency",currency:e,notation:"compact",maximumFractionDigits:1});return{full:e=>t.format(Number(e)),compact:e=>r.format(Number(e))}}catch(e){}return n?{full:e=>`${n}${A1(e)}`,compact:e=>`${n}${E1(e)}`}:"string"==typeof t&&k1.test(t)?{full:A1,compact:E1}:null}function O1({props:e,isDark:t=!1}){const r=Array.isArray(e.data)?e.data:[],o=T1(e.currency,e.yKey),a=e.valueLabel||void 0,i=t?"#374151":"#e2e8f0",s=t?"#1f2937":"#ffffff",l=t?"#9ca3af":"#64748b",c=t?"#f3f4f6":"#0f172a",u=t?"#374151":"#e2e8f0",d=t?"#111827":"#ffffff";if(0===r.length)return n.jsxs("div",{style:{borderRadius:8,border:`1px solid ${i}`,background:s,padding:12,margin:"8px 0"},children:[e.title&&n.jsx("div",{style:{fontSize:13,fontWeight:600,color:c,marginBottom:8},children:e.title}),n.jsx("div",{style:{color:l,fontSize:12},children:"No chartable data"})]});const p=r.some(e=>String(e.label??"").length>10),f=p?-35:0,g=p?"end":"middle",m=p?48:20,h=p?250:220;return n.jsxs("div",{style:{borderRadius:8,border:`1px solid ${i}`,background:s,padding:12,margin:"8px 0"},children:[e.title&&n.jsx("h3",{style:{fontSize:13,fontWeight:600,color:c,marginBottom:8,marginTop:0},children:e.title}),n.jsx("div",{role:"img","aria-label":e.title||a||"Bar chart",style:{height:h,width:"100%"},children:n.jsx(BM,{width:"100%",height:"100%",children:n.jsxs(w1,{data:r,margin:{top:16,right:12,left:12,bottom:m},children:[n.jsx(wJ,{strokeDasharray:"3 3",stroke:u}),n.jsx(u0,{dataKey:"label",tick:{fontSize:11,fill:l},angle:f,textAnchor:g,interval:0,tickFormatter:e=>String(e??"").replace(/[_\-]+/g," ").replace(/\b\w/g,e=>e.toUpperCase()),label:e.xAxisLabel?{value:e.xAxisLabel,position:"insideBottom",offset:-12,fontSize:11,fill:l}:void 0}),n.jsx(S0,{width:72,tick:{fontSize:11,fill:l},label:e.yAxisLabel?{value:e.yAxisLabel,angle:-90,position:"insideLeft",fontSize:11,fill:l}:void 0,tickFormatter:t=>o?o.compact(t):e.unit?`${E1(t)} ${e.unit}`:E1(t)}),n.jsx(cM,{formatter:t=>o?o.full(t):e.unit?`${Number(t).toLocaleString()} ${e.unit}`:Number(t).toLocaleString(),contentStyle:{background:d,border:`1px solid ${i}`,borderRadius:6,fontSize:12,color:c}}),n.jsx(dZ,{dataKey:"value",name:a,fill:"#3b82f6",radius:[2,2,0,0],label:{position:"top",fill:l,fontSize:10,formatter:e=>o?o.compact(e):E1(e)}})]})})})]})}function C1({props:e,isDark:t=!1}){const r=e.trend,o="up"===r?"#059669":"down"===r?"#e11d48":"#64748b",a="up"===r?"↑":"down"===r?"↓":"flat"===r?"→":null,i=t?"#374151":"#e2e8f0",s=t?"#1f2937":"#ffffff",l=t?"#f3f4f6":"#0f172a";return n.jsxs("div",{style:{borderRadius:8,border:`1px solid ${i}`,background:s,padding:12,margin:"8px 0"},children:[n.jsx("p",{style:{fontSize:11,fontWeight:500,color:"#64748b",textTransform:"uppercase",letterSpacing:"0.05em",margin:0},children:e.label}),n.jsx("p",{style:{marginTop:4,fontSize:28,fontWeight:700,color:l,lineHeight:1.1,marginBottom:0},children:e.value}),e.change&&n.jsxs("p",{style:{marginTop:4,fontSize:12,color:o,marginBottom:0},children:[a&&n.jsx("span",{style:{marginRight:4},children:a}),e.change]})]})}const I1=["#3b82f6","#10b981","#f59e0b","#ef4444","#8b5cf6","#ec4899","#14b8a6","#f97316","#6366f1","#84cc16","#06b6d4","#a855f7"];function N1({props:e,isDark:t=!1,donut:r=!1}){const o=Array.isArray(e.data)?e.data:[],a=T1(e.currency,e.yKey),i=t?"#374151":"#e2e8f0",s=t?"#1f2937":"#ffffff",l=t?"#f3f4f6":"#0f172a",c=t?"#111827":"#ffffff",u=t?"#9ca3af":"#64748b",d=o.map(e=>({name:e.label,value:e.value})),p=Math.PI/180;return n.jsxs("div",{style:{borderRadius:8,border:`1px solid ${i}`,background:s,padding:12,margin:"8px 0"},children:[e.title&&n.jsx("h3",{style:{fontSize:13,fontWeight:600,color:l,marginBottom:8,marginTop:0},children:e.title}),n.jsx("div",{role:"img","aria-label":e.title||(r?"Donut chart":"Pie chart"),style:{height:260,width:"100%"},children:n.jsx(BM,{width:"100%",height:"100%",children:n.jsxs(S1,{children:[n.jsx($K,{data:d,dataKey:"value",nameKey:"name",cx:"50%",cy:"50%",outerRadius:72,innerRadius:r?40:0,paddingAngle:2,labelLine:!1,label:e=>{const o=Number(e&&e.value),i=(s=o,l=Number(e&&e.percent),Number.isFinite(s)&&0!==s?Number.isFinite(l)&&l<.08?"outside":"inside":"none");var s,l;if("none"===i)return null;const c=Number(e.innerRadius)||0,u=Number(e.outerRadius)||0,d=Number(e.cx),f=Number(e.cy),g=-Number(e.midAngle)*p,m=Math.cos(g),h=Math.sin(g),b=a?a.full(o):Number(o).toLocaleString();if("inside"===i){const e=c+(u-c)*(r?.78:.6);return n.jsx("text",{x:d+e*m,y:f+e*h,fill:"#ffffff",textAnchor:"middle",dominantBaseline:"central",style:{fontSize:11,fontWeight:600,pointerEvents:"none"},children:b})}const y="string"==typeof e.fill&&e.fill?e.fill:t?"#9ca3af":"#64748b",v=u+8,w=d+v*m,S=f+v*h,x=m>=0,E=w+(x?6:-6);return n.jsxs("g",{style:{pointerEvents:"none"},children:[n.jsx("polyline",{points:`${d+u*m},${f+u*h} ${w},${S} ${E},${S}`,stroke:y,strokeWidth:1,fill:"none"}),n.jsx("text",{x:E+(x?2:-2),y:S,fill:y,textAnchor:x?"start":"end",dominantBaseline:"central",style:{fontSize:10,fontWeight:600},children:b})]})},isAnimationActive:!1,children:d.map((e,t)=>n.jsx(UM,{fill:I1[t%I1.length]},t))}),n.jsx(cM,{formatter:e=>a?a.full(e):Number(e).toLocaleString(),contentStyle:{background:c,border:`1px solid ${i}`,borderRadius:6,fontSize:12,color:l}}),n.jsx(EL,{iconSize:10,iconType:"circle",wrapperStyle:{fontSize:11,color:u}})]})})})]})}function R1({props:e,isDark:t=!1,area:r=!1}){const o=Array.isArray(e.data)?e.data:[],a=T1(e.currency,e.yKey),i=e.valueLabel||void 0,s=t?"#374151":"#e2e8f0",l=t?"#1f2937":"#ffffff",c=t?"#9ca3af":"#64748b",u=t?"#f3f4f6":"#0f172a",d=t?"#374151":"#e2e8f0",p=t?"#111827":"#ffffff";if(0===o.length)return n.jsxs("div",{style:{borderRadius:8,border:`1px solid ${s}`,background:l,padding:12,margin:"8px 0"},children:[e.title&&n.jsx("div",{style:{fontSize:13,fontWeight:600,color:u,marginBottom:8},children:e.title}),n.jsx("div",{style:{color:c,fontSize:12},children:"No chartable data"})]});const f=r?x1:v1;return n.jsxs("div",{style:{borderRadius:8,border:`1px solid ${s}`,background:l,padding:12,margin:"8px 0"},children:[e.title&&n.jsx("h3",{style:{fontSize:13,fontWeight:600,color:u,marginBottom:8,marginTop:0},children:e.title}),n.jsx("div",{role:"img","aria-label":e.title||i||(r?"Area chart":"Line chart"),style:{height:220,width:"100%"},children:n.jsx(BM,{width:"100%",height:"100%",children:n.jsxs(f,{data:o,margin:{top:8,right:12,left:12,bottom:20},children:[n.jsx(wJ,{strokeDasharray:"3 3",stroke:d}),n.jsx(u0,{dataKey:"label",tick:{fontSize:11,fill:c},angle:0,textAnchor:"middle",interval:0,label:e.xAxisLabel?{value:e.xAxisLabel,position:"insideBottom",offset:-12,fontSize:11,fill:c}:void 0}),n.jsx(S0,{width:72,tick:{fontSize:11,fill:c},tickFormatter:t=>a?a.compact(t):e.unit?`${E1(t)} ${e.unit}`:E1(t)}),n.jsx(cM,{formatter:t=>a?a.full(t):e.unit?`${Number(t).toLocaleString()} ${e.unit}`:Number(t).toLocaleString(),contentStyle:{background:p,border:`1px solid ${s}`,borderRadius:6,fontSize:12,color:u}}),r?n.jsx(JJ,{type:"monotone",dataKey:"value",name:i,stroke:"#3b82f6",fill:"#3b82f6",fillOpacity:.15,strokeWidth:2,dot:{r:3,fill:"#3b82f6"}}):n.jsx(jJ,{type:"monotone",dataKey:"value",name:i,stroke:"#3b82f6",strokeWidth:2,dot:{r:3,fill:"#3b82f6"},activeDot:{r:5}})]})})})]})}const _1=/\b(?:field|fields|column|columns|table|tables|sql|summed?|aggregat\w*|averaged?|counted)\b/i,P1=/[A-Za-z_]\w*\.[A-Za-z_]\w*/;function L1(e){if("string"!=typeof e)return"";let t,n=e.trim();do{t=n,n=n.replace(/\s*\(([^()]*)\)\s*$/,(e,t)=>_1.test(t)||P1.test(t)?"":e).trim()}while(n!==t);return n}const D1=/\[([^\]\n]+)\]\((https?:\/\/[^\s)]+)\)|(https?:\/\/[^\s<>()]+[^\s<>().,;:!?'"])/g,M1={color:"#1d4ed8",textDecoration:"underline",overflowWrap:"anywhere"};function j1(e){if(!e)return e;const t=[];let r=0,o=0;for(const a of String(e).matchAll(D1)){const i=a.index??0,s=a[1]??a[3],l=ct(a[2]??a[3]);l&&(i>r&&t.push(e.slice(r,i)),t.push(n.jsx("a",{href:l,target:"_blank",rel:"noopener noreferrer",style:M1,children:s},o++)),r=i+a[0].length)}return 0===t.length?e:(r<e.length&&t.push(e.slice(r)),t)}const F1=e=>function(e){const t=jn;if(!t||Bn(e,t))return e;if("report"===t.mode){let t=String(e);try{t=new URL(String(e)).host}catch{}return Fn.has(t)||(Fn.add(t),console.warn(`[eshal-widget] would block an image from ${t}`)),e}}(ct(e));function B1({spec:e,isDark:t=!1,onButtonClick:r}){if(!e||"object"!=typeof e)return null;e={...e,title:L1(e.title)};const o=String(e.type||"").trim().toLowerCase().replace(/_/g,"-"),a=new Set(["bar","line","area","pie","donut","scatter","bubble","radar","radial-bar","radial","radialbar","treemap","funnel","sankey","composed","waterfall","gauge","histogram","kpi"]);if("revenue-insights"===o)return n.jsx(R2,{spec:e,isDark:t});if("impact-analysis"===o)return n.jsx(P2,{spec:e,isDark:t});if("deviation-analysis"===o)return n.jsx(L2,{spec:e,isDark:t});if("main-drivers"===o)return n.jsx(D2,{spec:e,isDark:t});if("key-observations"===o)return n.jsx(j2,{spec:e,isDark:t});if("recommendations"===o)return n.jsx(F2,{spec:e,isDark:t});if("kpi"===o){const r=e.value??e.amount??e.metric??e.kpi,o=null!=e.delta?Number(e.delta):null,a=e.change??(null!=o&&Number.isFinite(o)?o>=0?`+${o}`:String(o):void 0),i=e.trend??(null!=o&&Number.isFinite(o)?o>0?"up":o<0?"down":"flat":void 0);return n.jsx(C1,{props:{label:e.label||e.title||"",value:null!=r?String(r):"-",change:a,trend:i},isDark:t})}return"table"===o?n.jsx($1,{spec:e,isDark:t}):a.has(o)||Array.isArray(e.data)&&e.data.length>0?n.jsx(z1,{spec:e,type:o,isDark:t}):"alert"===o?n.jsx(G1,{spec:e,isDark:t}):"card"===o?n.jsx(V1,{spec:e,isDark:t,onButtonClick:r}):"button-group"===o?n.jsx(W1,{spec:e,isDark:t,onButtonClick:r}):"form"===o?n.jsx(Z1,{spec:e,isDark:t,onButtonClick:r}):"confirmation"===o?n.jsx(Q1,{spec:e,isDark:t,onButtonClick:r}):"menu"===o?n.jsx(o2,{spec:e,isDark:t,onButtonClick:r}):"profile"===o?n.jsx(a2,{spec:e,isDark:t,onButtonClick:r}):"timeline"===o?n.jsx(i2,{spec:e,isDark:t}):"rating"===o?n.jsx(s2,{spec:e,isDark:t}):"comparison"===o?n.jsx(l2,{spec:e,isDark:t,onButtonClick:r}):"gallery"===o?n.jsx(c2,{spec:e,isDark:t}):Array.isArray(e.data)&&e.data.length>0?n.jsx(z1,{spec:e,type:"bar",isDark:t}):null}const U1=e=>({border:e?"1px solid #374151":"1px solid #e5e7eb",background:e?"#1f2937":"#ffffff",borderRadius:8,padding:12,margin:"8px 0",fontSize:13,color:e?"#f3f4f6":"#111827"});function z1({spec:e,type:t,isDark:r}){const{x:o,y:a}=function(e,t,n){if(!Array.isArray(e)||0===e.length)return{x:"name",y:"value"};const r=e[0]||{};if(t&&Object.prototype.hasOwnProperty.call(r,t)&&n&&Object.prototype.hasOwnProperty.call(r,n))return{x:t,y:n};let o=t||null,a=n||null;for(const e of Object.keys(r)){const t=r[e];null!=o||"string"!=typeof t&&null!=t||(o=e),null==a&&"number"==typeof t&&Number.isFinite(t)&&(a=e)}return{x:o||"name",y:a||"value"}}(e.data,e.x,e.y),i=function(e,t,n){return(e||[]).map(e=>{const r=e?.[t];return{label:m2(r,t),value:Number(e?.[n])}}).filter(e=>Number.isFinite(e.value))}(e.data,o,a),s=String(t||"").trim().toLowerCase(),l={title:e.title,data:i,unit:e.unit,xAxisLabel:e.xAxisLabel,yAxisLabel:e.yAxisLabel,yKey:a,valueLabel:f2(a),currency:e.currency};return"pie"===s?n.jsx(N1,{props:l,isDark:r,donut:!1}):"donut"===s?n.jsx(N1,{props:l,isDark:r,donut:!0}):"line"===s?n.jsx(R1,{props:l,isDark:r,area:!1}):"area"===s?n.jsx(R1,{props:l,isDark:r,area:!0}):n.jsx(O1,{props:l,isDark:r})}function $1({spec:e,isDark:t}){const r=Array.isArray(e.columns)&&e.columns.length>0?e.columns:Array.isArray(e.data)&&e.data[0]?Object.keys(e.data[0]):[],o=Array.isArray(e.data)?e.data:Array.isArray(e.rows)?e.rows:[];if(0===r.length||0===o.length)return n.jsx("div",{style:U1(t),children:n.jsx("div",{style:{color:t?"#9ca3af":"#6b7280",fontSize:12},children:"Empty table"})});const a=t?"1px solid #374151":"1px solid #e5e7eb";return n.jsxs("div",{style:U1(t),children:[e.title&&n.jsx("div",{style:{fontWeight:600,marginBottom:8},children:e.title}),n.jsx("div",{style:{overflowX:"auto"},children:n.jsxs("table",{style:{borderCollapse:"collapse",width:"100%",fontSize:12},children:[n.jsx("thead",{children:n.jsx("tr",{children:r.map(e=>n.jsx("th",{style:{border:a,padding:"6px 8px",background:"transparent",textAlign:"left",fontWeight:600},children:f2(e)},e))})}),n.jsx("tbody",{children:o.map((e,t)=>n.jsx("tr",{children:r.map((t,r)=>n.jsx("td",{style:{border:a,padding:"6px 8px"},children:Array.isArray(e)?S2(e[r],t):e&&"object"==typeof e?S2(e[t],t):""},t))},t))})]})})]})}function G1({spec:e,isDark:t}){const r=String(e.level||"info").toLowerCase(),o={info:{bg:t?"hsl(204 33% 14%)":"hsl(204 100% 97%)",border:t?"hsl(199 89% 58%)":"hsl(199 89% 48%)",text:t?"#bae6fd":"#0c4a6e"},warn:{bg:t?"hsl(36 33% 14%)":"hsl(34 100% 95%)",border:t?"hsl(38 92% 60%)":"hsl(35 100% 50%)",text:t?"#fde68a":"#663c00"},error:{bg:t?"hsl(356 33% 16%)":"hsl(356 100% 97%)",border:t?"hsl(350 89% 65%)":"hsl(350 89% 60%)",text:t?"#fecdd3":"#9f1239"},success:{bg:t?"hsl(152 36% 14%)":"hsl(152 81% 96%)",border:t?"hsl(158 64% 52%)":"hsl(160 84% 39%)",text:t?"#a7f3d0":"#065f46"}};o.warning=o.warn;const a=o[r]||o.info;return n.jsxs("div",{style:{...U1(t),background:a.bg,borderLeft:`4px solid ${a.border}`,color:a.text},children:[e.title&&n.jsx("div",{style:{fontWeight:600,marginBottom:4},children:e.title}),e.body&&n.jsx("div",{style:{fontSize:12,lineHeight:1.6,whiteSpace:"pre-wrap",wordBreak:"break-word"},children:j1(String(e.body))})]})}const q1=e=>({success:{bg:e?"hsl(152 36% 14%)":"hsl(152 81% 96%)",fg:e?"hsl(158 64% 52%)":"hsl(160 84% 39%)"},warn:{bg:e?"hsl(36 33% 14%)":"hsl(34 100% 95%)",fg:e?"hsl(38 92% 60%)":"hsl(35 100% 50%)"},error:{bg:e?"hsl(356 33% 16%)":"hsl(356 100% 97%)",fg:e?"hsl(350 89% 65%)":"hsl(350 89% 60%)"},info:{bg:e?"hsl(204 33% 14%)":"hsl(204 100% 97%)",fg:e?"hsl(199 89% 58%)":"hsl(199 89% 48%)"}}),H1={calendar:_e,ticket:tt,check:je};function V1({spec:t,isDark:r,onButtonClick:o}){const a=Array.isArray(t.fields)?t.fields:[],i=Array.isArray(t.actions)?t.actions:[],s=t.status,l=t.icon?H1[t.icon]:null,[c,u]=e.useState(!1),d=String(t.body||"").trim(),p=String(t.details||"").trim(),f=d.length>0&&p.length>d.length+2,g=F1(t.image),m=s&&s.label?q1(r)[s.variant||"success"]:null;return n.jsxs("div",{style:{...U1(r),minWidth:0,overflow:"hidden"},children:[g&&n.jsx("img",{src:g,alt:t.title||"",referrerPolicy:"no-referrer",onError:e=>{e.currentTarget.style.display="none"},style:{display:"block",margin:"-12px -12px 12px",width:"calc(100% + 24px)",height:140,objectFit:"contain",background:r?"rgba(31,41,55,0.4)":"#f9fafb"}}),(t.title||m)&&n.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:8,marginBottom:8},children:[n.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6,minWidth:0},children:[l&&n.jsx(l,{size:14,style:{flexShrink:0,color:r?"#60a5fa":J1}}),t.title&&n.jsx("div",{style:{fontWeight:600,minWidth:0,overflowWrap:"anywhere"},children:t.title})]}),m&&n.jsx("span",{style:{flexShrink:0,borderRadius:999,padding:"1px 8px",fontSize:10,fontWeight:500,background:m.bg,color:m.fg},children:s.label})]}),(d||p)&&n.jsxs("div",{children:[n.jsx("div",{style:{fontSize:12,lineHeight:1.6,whiteSpace:"pre-wrap",wordBreak:"break-word"},children:j1(c?p||d:d||p)}),f&&n.jsx("button",{type:"button",onClick:()=>u(e=>!e),style:{marginTop:4,padding:0,border:"none",background:"none",fontSize:11,fontWeight:500,color:r?"#60a5fa":J1,cursor:"pointer"},children:c?"Show less":"Show more"})]}),a.length>0&&n.jsx("div",{style:{display:"grid",gridTemplateColumns:"auto 1fr",columnGap:12,rowGap:6,marginTop:d||p?12:0},children:a.map((t,o)=>n.jsxs(e.Fragment,{children:[n.jsx("div",{style:{fontSize:11,fontWeight:500,color:r?"#9ca3af":"#6b7280",whiteSpace:"nowrap"},children:t.label}),n.jsx("div",{style:{fontSize:12,minWidth:0,wordBreak:"break-word"},children:"string"==typeof t.value?j1(t.value):t.value})]},o))}),i.length>0&&n.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:8,marginTop:12},children:i.map((e,t)=>{const a="secondary"!==e.variant,i={display:"inline-flex",alignItems:"center",padding:"6px 12px",borderRadius:6,fontSize:11,fontWeight:500,textDecoration:"none",border:"1px solid "+(a?J1:r?"#4b5563":"#d1d5db"),background:a?J1:r?"#1f2937":"#ffffff",color:a?"#ffffff":r?"#e5e7eb":"#374151"},s=ct(e.url);if(s)return n.jsx("a",{href:s,target:"_blank",rel:"noopener noreferrer",style:i,children:e.label},t);const l=e.value||e.label;return n.jsx("button",{type:"button",onClick:o?()=>o(String(l??""),String(e.label??"")):void 0,disabled:!o,title:o?void 0:"Action (no handler wired)",style:{...i,cursor:o?"pointer":"default",opacity:o?1:.5},children:e.label},t)})})]})}function W1({spec:e,isDark:t,onButtonClick:r,sendValue:o=!1}){const a=Array.isArray(e.buttons)?e.buttons:[];return 0===a.length?null:n.jsxs("div",{style:{margin:"8px 0"},children:[e.title&&n.jsx("div",{style:{fontSize:11,color:t?"#9ca3af":"#6b7280",textTransform:"uppercase",letterSpacing:"0.05em",marginBottom:6},children:e.title}),n.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:6},children:a.map((e,a)=>n.jsx("button",{type:"button",onClick:r?()=>r(String((o?e.value:e.label)||e.label||e.value||""),String(e.label||e.value||"")):void 0,disabled:!r,style:{border:"1px solid "+(t?"#374151":"#d1d5db"),background:t?"#1f2937":"#ffffff",color:t?"#f3f4f6":"#111827",padding:"6px 12px",borderRadius:6,fontSize:12,cursor:r?"pointer":"default",opacity:r?1:.6},children:String(e.label||e.value||"")},a))})]})}function Y1(e,t){const n=null==t||"string"==typeof t&&""===t.trim();if(e.required&&n)return`${e.label} is required`;if(n)return null;if("email"===e.type&&"string"==typeof t&&!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(t))return`${e.label} must be a valid email`;if("url"===e.type&&"string"==typeof t)try{new URL(t)}catch{return`${e.label} must be a valid URL`}if("number"===e.type&&"string"==typeof t&&""!==t){const n=Number(t);if(!Number.isFinite(n))return`${e.label} must be a number`;if("number"==typeof e.min&&n<e.min)return`${e.label} must be ≥ ${e.min}`;if("number"==typeof e.max&&n>e.max)return`${e.label} must be ≤ ${e.max}`}if("string"==typeof t){if(null!=e.minLength&&t.length<e.minLength)return`${e.label} must be at least ${e.minLength} characters`;if(null!=e.maxLength&&t.length>e.maxLength)return`${e.label} must be at most ${e.maxLength} characters`;if(e.pattern)try{if(!new RegExp(e.pattern).test(t))return`${e.label} format is invalid`}catch{}}return null}const K1=new Set(["text","email","tel","url","date","time"]);function X1({field:e,value:t,error:r,onChange:o,isDark:a,autoId:i}){const s={width:"100%",boxSizing:"border-box",border:"1px solid "+(a?r?"#f87171":"#374151":r?"#ef4444":"#d1d5db"),background:a?"#111827":"#ffffff",color:a?"#f3f4f6":"#111827",borderRadius:6,padding:"6px 8px",fontSize:12},l={display:"block",fontSize:12,fontWeight:600,marginBottom:4};if("hidden"===e.type)return null;if("checkbox"===e.type)return n.jsxs("div",{style:{marginBottom:10},children:[n.jsxs("label",{style:{display:"flex",alignItems:"center",gap:6,fontSize:12},children:[n.jsx("input",{id:i,type:"checkbox",checked:Boolean(t),onChange:e=>o(e.target.checked)}),e.label,e.required?" *":""]}),r&&n.jsx("div",{style:{fontSize:11,color:"#ef4444",marginTop:2},children:r})]});if("select"===e.type){const a=Array.isArray(e.options)?e.options:[];return n.jsxs("div",{style:{marginBottom:10},children:[n.jsxs("label",{htmlFor:i,style:l,children:[e.label,e.required?" *":""]}),n.jsxs("select",{id:i,style:s,value:t??"",onChange:e=>o(e.target.value),children:[n.jsx("option",{value:"",disabled:!0,children:e.placeholder||"Select…"}),a.map(e=>n.jsx("option",{value:e.value,children:e.label},e.value))]}),r&&n.jsx("div",{style:{fontSize:11,color:"#ef4444",marginTop:2},children:r})]})}if("radio"===e.type){const a=Array.isArray(e.options)?e.options:[];return n.jsxs("div",{style:{marginBottom:10},children:[n.jsxs("div",{style:l,children:[e.label,e.required?" *":""]}),a.map(e=>n.jsxs("label",{style:{display:"flex",alignItems:"center",gap:6,fontSize:12,marginBottom:2},children:[n.jsx("input",{type:"radio",name:i,checked:t===e.value,onChange:()=>o(e.value)}),e.label]},e.value)),r&&n.jsx("div",{style:{fontSize:11,color:"#ef4444",marginTop:2},children:r})]})}if("textarea"===e.type)return n.jsxs("div",{style:{marginBottom:10},children:[n.jsxs("label",{htmlFor:i,style:l,children:[e.label,e.required?" *":""]}),n.jsx("textarea",{id:i,style:{...s,minHeight:60,resize:"vertical"},value:t??"",placeholder:e.placeholder,onChange:e=>o(e.target.value)}),r&&n.jsx("div",{style:{fontSize:11,color:"#ef4444",marginTop:2},children:r})]});const c=K1.has(e.type)?e.type:"number"===e.type?"number":"text";return n.jsxs("div",{style:{marginBottom:10},children:[n.jsxs("label",{htmlFor:i,style:l,children:[e.label,e.required?" *":""]}),n.jsx("input",{id:i,type:c,style:s,value:t??"",placeholder:e.placeholder,onChange:e=>o(e.target.value)}),e.helpText&&!r&&n.jsx("div",{style:{fontSize:11,color:a?"#9ca3af":"#6b7280",marginTop:2},children:e.helpText}),r&&n.jsx("div",{style:{fontSize:11,color:"#ef4444",marginTop:2},children:r})]})}function Z1({spec:t,isDark:r,onButtonClick:o}){const a=Array.isArray(t.fields)?t.fields:[],i=e.useMemo(()=>{const e={};for(const t of a)void 0!==t.defaultValue?e[t.name]=t.defaultValue:"checkbox"===t.type?e[t.name]=!1:e[t.name]="";return e},[]),[s,l]=e.useState(i),[c,u]=e.useState({}),[d,p]=e.useState(!1),f=void 0!==e.useContext(Ut);if(0===a.length)return null;return d?n.jsxs("div",{style:U1(r),children:[t.title&&n.jsx("div",{style:{fontWeight:600,marginBottom:8},children:t.title}),a.filter(e=>"hidden"!==e.type).map((e,t)=>n.jsxs("div",{style:{marginBottom:4,fontSize:12},children:[n.jsxs("span",{style:{color:r?"#9ca3af":"#6b7280"},children:[e.label,": "]}),n.jsx("span",{children:String(s[e.name]??"")})]},t))]}):n.jsxs("form",{style:U1(r),onSubmit:e=>{if(e.preventDefault(),d||f||!o)return;const n={};let r=!1;for(const e of a){const t=Y1(e,s[e.name]);n[e.name]=t,t&&(r=!0)}if(u(n),r)return;p(!0);let i="";try{i=Object.entries(s).filter(([,e])=>null!=e&&""!==String(e)).map(([e,t])=>`${function(e){return String(e).replace(/([a-z])([A-Z])/g,"$1 $2").replace(/[_-]/g," ").replace(/\b\w/g,e=>e.toUpperCase())}(e)}: ${t}`).join("\n")||"Form submitted"}catch{i="Form submitted"}o(i,t.title||"Form")},noValidate:!0,children:[t.title&&n.jsx("div",{style:{fontWeight:600,marginBottom:4},children:t.title}),t.description&&n.jsx("div",{style:{fontSize:12,color:r?"#9ca3af":"#6b7280",marginBottom:8},children:t.description}),a.map((e,t)=>n.jsx(X1,{field:e,value:s[e.name],error:c[e.name],onChange:t=>((e,t)=>{l(n=>({...n,[e]:t})),u(t=>t[e]?{...t,[e]:null}:t)})(e.name,t),isDark:r,autoId:`a2ui-form-${e.name||t}`},e.name||t)),n.jsx("button",{type:"submit",disabled:!o||f,style:{border:"1px solid "+(r?"#374151":"#d1d5db"),background:o&&!f?"#2563eb":r?"#1f2937":"#f3f4f6",color:o&&!f?"#ffffff":r?"#6b7280":"#9ca3af",padding:"6px 14px",borderRadius:6,fontSize:12,cursor:o&&!f?"pointer":"default"},children:f?"Submitted":t.submitLabel||"Submit"})]})}function Q1({spec:t,isDark:r,onButtonClick:o}){const a=Array.isArray(t.choices)&&t.choices.length>0?t.choices:[t.yes||{label:"Yes",value:"yes"},t.no||{label:"No",value:"no"}],i=e.useContext(Ut),[s,l]=e.useState(null),c=e.useRef(!1),u=s??function(e,t){if(null==t)return null;const n=zt(t);if(!n)return null;const r=(e||[]).find(e=>zt(e?.value)===n||zt(e?.label)===n);return r?String(r.value??r.label??""):null}(a,i),d=null!==u||void 0!==i,p=d?a.map(e=>String(e?.value??e?.label??"")===u?{...e,label:`${String(e.label??e.value??"")} ✓`}:e):a,f=o?(e,t)=>{c.current||d||(c.current=!0,l(String(e)),o(e,t))}:void 0;return n.jsxs("div",{style:U1(r),children:[t.title&&n.jsx("div",{style:{fontWeight:600,marginBottom:6},children:t.title}),t.body&&n.jsx("div",{style:{fontSize:12,lineHeight:1.6,marginBottom:8,whiteSpace:"pre-wrap",wordBreak:"break-word"},children:j1(String(t.body))}),n.jsx(W1,{spec:{buttons:p},isDark:r,onButtonClick:d?void 0:f,sendValue:!0})]})}const J1="#2563eb";function e2(e){return{display:"inline-flex",alignItems:"center",borderRadius:999,padding:"2px 8px",fontSize:10,fontWeight:600,background:e?"rgba(37,99,235,0.20)":"#eff6ff",color:e?"#93c5fd":"#1d4ed8"}}function t2(e,t){return{display:"inline-flex",alignItems:"center",justifyContent:"center",padding:"6px 12px",borderRadius:6,fontSize:12,fontWeight:600,border:"none",background:J1,color:"#ffffff",cursor:t?"default":"pointer",opacity:t?.5:1}}function n2(e,t){return{display:"inline-flex",alignItems:"center",justifyContent:"center",padding:"6px 12px",borderRadius:6,fontSize:12,fontWeight:600,border:"1px solid "+(e?"#374151":"#d1d5db"),background:e?"#1f2937":"#ffffff",color:e?"#f3f4f6":"#111827",textDecoration:"none",cursor:t?"default":"pointer",opacity:t?.5:1}}function r2({score:e,maxScore:t=5,size:r=14,isDark:o}){const a=[];for(let i=0;i<t;i+=1){const t=e>=i+1,s=!t&&e>i&&e<i+1;a.push(n.jsxs("svg",{width:r,height:r,viewBox:"0 0 24 24",fill:t?"#fbbf24":s?`url(#a2ui-half-star-${i})`:"none",stroke:t||s?"#fbbf24":o?"#4b5563":"#d1d5db",strokeWidth:"1.5",children:[s&&n.jsx("defs",{children:n.jsxs("linearGradient",{id:`a2ui-half-star-${i}`,children:[n.jsx("stop",{offset:"50%",stopColor:"#fbbf24"}),n.jsx("stop",{offset:"50%",stopColor:"transparent"})]})}),n.jsx("polygon",{points:"12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2"})]},i))}return n.jsx("div",{style:{display:"flex",alignItems:"center",gap:1},children:a})}function o2({spec:e,isDark:t,onButtonClick:r}){const o=Array.isArray(e.items)?e.items:[];if(0===o.length)return null;const a=t?"1px solid #374151":"1px solid #e5e7eb",i=t?"#9ca3af":"#6b7280";return n.jsxs("div",{style:{margin:"8px 0"},children:[(e.title||e.subtitle)&&n.jsxs("div",{style:{marginBottom:8},children:[e.title&&n.jsx("div",{style:{fontSize:13,fontWeight:700},children:e.title}),e.subtitle&&n.jsx("div",{style:{fontSize:11,color:i},children:e.subtitle})]}),n.jsx("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(160px, 1fr))",gap:10},children:o.map((e,o)=>n.jsxs("div",{style:{border:a,borderRadius:10,overflow:"hidden",background:t?"#1f2937":"#ffffff",display:"flex",flexDirection:"column"},children:[F1(e.image)&&n.jsx("img",{src:F1(e.image),alt:e.name||"",referrerPolicy:"no-referrer",onError:e=>{e.currentTarget.style.display="none"},style:{height:96,width:"100%",objectFit:"cover",background:t?"#111827":"#f9fafb"}}),n.jsxs("div",{style:{padding:10,display:"flex",flexDirection:"column",gap:6,flex:1},children:[n.jsxs("div",{style:{display:"flex",justifyContent:"space-between",gap:6,alignItems:"flex-start"},children:[n.jsx("div",{style:{fontSize:12,fontWeight:700,minWidth:0},children:e.name}),e.price&&n.jsx("div",{style:{fontSize:12,fontWeight:700,color:J1,flexShrink:0},children:e.price})]}),e.description&&n.jsx("div",{style:{fontSize:11,color:i,lineHeight:1.4},children:e.description}),Array.isArray(e.tags)&&e.tags.length>0&&n.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:4},children:e.tags.map((e,r)=>n.jsx("span",{style:e2(t),children:e},r))}),n.jsx("div",{style:{flex:1}}),e.actionLabel&&n.jsx("button",{type:"button",onClick:r?()=>r(String(e.value??e.actionLabel),String(e.actionLabel)):void 0,disabled:!r,style:{...t2(0,!r),alignSelf:"flex-start",marginTop:4},children:e.actionLabel})]})]},o))})]})}function a2({spec:e,isDark:t,onButtonClick:r}){const o=Array.isArray(e.tags)?e.tags:[],a=Array.isArray(e.actions)?e.actions:[],i=t?"#9ca3af":"#6b7280";return n.jsxs("div",{style:U1(t),children:[n.jsxs("div",{style:{display:"flex",gap:10,alignItems:"flex-start"},children:[n.jsx("div",{style:{flexShrink:0,height:44,width:44,borderRadius:"50%",overflow:"hidden",background:t?"rgba(37,99,235,0.20)":"#eff6ff",color:t?"#93c5fd":J1,display:"flex",alignItems:"center",justifyContent:"center",fontWeight:700,fontSize:16},children:F1(e.avatar)?n.jsx("img",{src:F1(e.avatar),alt:e.name||"",referrerPolicy:"no-referrer",onError:e=>{e.currentTarget.style.display="none"},style:{height:"100%",width:"100%",objectFit:"cover"}}):String(e.name||"").charAt(0).toUpperCase()}),n.jsxs("div",{style:{minWidth:0,flex:1},children:[n.jsx("div",{style:{fontSize:13,fontWeight:700},children:e.name}),e.role&&n.jsx("div",{style:{fontSize:11,color:i},children:e.role}),"number"==typeof e.rating&&n.jsxs("div",{style:{marginTop:4,display:"flex",alignItems:"center",gap:6},children:[n.jsx(r2,{score:e.rating,size:11,isDark:t}),n.jsxs("span",{style:{fontSize:10,color:i},children:[e.rating.toFixed(1),"number"==typeof e.reviewCount?` (${e.reviewCount})`:""]})]})]})]}),o.length>0&&n.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:4,marginTop:8},children:o.map((e,r)=>n.jsx("span",{style:e2(t),children:e},r))}),e.bio&&n.jsx("div",{style:{marginTop:8,fontSize:12,lineHeight:1.5},children:e.bio}),a.length>0&&n.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:6,marginTop:10},children:a.map((e,o)=>{const a="secondary"!==e.variant,i=ct(e.url);if(i)return n.jsx("a",{href:i,target:"_blank",rel:"noopener noreferrer",style:n2(t,!1),children:e.label},o);const s=e.value||e.label;return n.jsx("button",{type:"button",onClick:r?()=>r(String(s),String(e.label)):void 0,disabled:!r,style:a?t2(0,!r):n2(t,!r),children:e.label},o)})})]})}function i2({spec:e,isDark:t}){const r=Array.isArray(e.steps)?e.steps:[];if(0===r.length)return null;const o=t?"#374151":"#e5e7eb",a=t?"#6b7280":"#9ca3af",i=e=>"done"===e?{background:"#10b981",border:"2px solid #10b981"}:"active"===e?{background:J1,border:`2px solid ${J1}`,boxShadow:t?"0 0 0 4px rgba(37,99,235,0.25)":"0 0 0 4px #dbeafe"}:{background:t?"#1f2937":"#ffffff",border:"2px solid "+(t?"#4b5563":"#d1d5db")};return n.jsxs("div",{style:U1(t),children:[e.title&&n.jsx("div",{style:{fontWeight:700,fontSize:13,marginBottom:10},children:e.title}),n.jsx("div",{children:r.map((e,s)=>{const l=e.status||(0===s?"done":"pending"),c=s===r.length-1;return n.jsxs("div",{style:{display:"flex",gap:10},children:[n.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"center"},children:[n.jsx("div",{style:{height:12,width:12,borderRadius:"50%",flexShrink:0,...i(l)}}),!c&&n.jsx("div",{style:{width:1,flex:1,background:o,minHeight:16,margin:"2px 0"}})]}),n.jsxs("div",{style:{minWidth:0,flex:1,paddingBottom:c?0:12},children:[n.jsxs("div",{style:{display:"flex",justifyContent:"space-between",gap:6},children:[n.jsx("span",{style:{fontSize:12,fontWeight:600,color:"pending"===l?a:t?"#f3f4f6":"#111827"},children:e.label}),e.timestamp&&n.jsx("span",{style:{fontSize:10,color:a,flexShrink:0},children:e.timestamp})]}),e.description&&n.jsx("div",{style:{fontSize:11,color:t?"#9ca3af":"#6b7280",marginTop:2},children:e.description})]})]},s)})})]})}function s2({spec:e,isDark:t}){const r=e.maxScore||5,o=t?"#9ca3af":"#6b7280";return n.jsxs("div",{style:U1(t),children:[e.title&&n.jsx("div",{style:{fontSize:11,textTransform:"uppercase",letterSpacing:"0.05em",color:o,marginBottom:4},children:e.title}),n.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8},children:[n.jsx("span",{style:{fontSize:22,fontWeight:700},children:Number(e.score).toFixed(1)}),n.jsx(r2,{score:e.score,maxScore:r,size:15,isDark:t}),"number"==typeof e.reviewCount&&n.jsxs("span",{style:{fontSize:11,color:o},children:["(",e.reviewCount," review",1===e.reviewCount?"":"s",")"]})]}),e.review&&n.jsxs("div",{style:{marginTop:8,borderLeft:"2px solid "+(t?"#1e40af":"#bfdbfe"),paddingLeft:10,fontSize:12,fontStyle:"italic",color:t?"#d1d5db":"#374151",lineHeight:1.5},children:['"',e.review,'"',e.author&&n.jsxs("div",{style:{marginTop:4,fontStyle:"normal",fontSize:10,color:o},children:["- ",e.author]})]})]})}function l2({spec:e,isDark:t,onButtonClick:r}){const o=Array.isArray(e.plans)?e.plans:[];if(0===o.length)return null;const a=t?"#9ca3af":"#6b7280";return n.jsxs("div",{style:{margin:"8px 0"},children:[e.title&&n.jsx("div",{style:{fontWeight:700,fontSize:13,marginBottom:8},children:e.title}),n.jsx("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(150px, 1fr))",gap:10},children:o.map((e,o)=>n.jsxs("div",{style:{border:e.highlight?`1px solid ${J1}`:"1px solid "+(t?"#374151":"#e5e7eb"),background:e.highlight?t?"rgba(37,99,235,0.10)":"#eff6ff":t?"#1f2937":"#ffffff",borderRadius:10,padding:12,display:"flex",flexDirection:"column"},children:[e.highlight&&n.jsx("span",{style:{alignSelf:"flex-start",marginBottom:6,background:J1,color:"#ffffff",fontSize:9,fontWeight:700,padding:"2px 7px",borderRadius:999},children:"Recommended"}),n.jsx("div",{style:{fontSize:13,fontWeight:700},children:e.name}),e.price&&n.jsxs("div",{style:{marginTop:2,display:"flex",alignItems:"baseline",gap:3},children:[n.jsx("span",{style:{fontSize:18,fontWeight:700},children:e.price}),e.period&&n.jsxs("span",{style:{fontSize:11,color:a},children:["/",e.period]})]}),Array.isArray(e.features)&&e.features.length>0&&n.jsx("ul",{style:{listStyle:"none",padding:0,margin:"8px 0 0",display:"flex",flexDirection:"column",gap:6,flex:1},children:e.features.map((e,r)=>n.jsxs("li",{style:{display:"flex",gap:6,alignItems:"flex-start",fontSize:11,color:t?"#d1d5db":"#374151"},children:[n.jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"#10b981",strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round",style:{marginTop:2,flexShrink:0},children:n.jsx("polyline",{points:"20 6 9 17 4 12"})}),n.jsx("span",{children:e})]},r))}),e.actionLabel&&n.jsx("button",{type:"button",onClick:r?()=>r(String(e.value??e.actionLabel),String(e.actionLabel)):void 0,disabled:!r,style:{...e.highlight?t2(0,!r):n2(t,!r),marginTop:10},children:e.actionLabel})]},o))})]})}function c2({spec:e,isDark:t}){const r=Array.isArray(e.images)?e.images:[];if(0===r.length)return null;const o=t?"#9ca3af":"#6b7280";return n.jsxs("div",{style:{margin:"8px 0"},children:[e.title&&n.jsx("div",{style:{fontWeight:700,fontSize:13,marginBottom:8},children:e.title}),n.jsx("div",{className:"slim-scrollbar-x",style:{display:"flex",gap:8,overflowX:"auto",paddingBottom:4},children:r.map((e,r)=>{return n.jsxs("figure",{style:{flexShrink:0,width:140,margin:0,borderRadius:8,overflow:"hidden",border:"1px solid "+(t?"#374151":"#e5e7eb"),background:t?"#111827":"#f9fafb"},children:[(a=e.url,!(void 0!==ct(a)&&void 0===F1(a))&&n.jsx("img",{src:F1(e.url),alt:e.caption||`Image ${r+1}`,referrerPolicy:"no-referrer",onError:e=>{e.currentTarget.style.display="none"},style:{height:96,width:"100%",objectFit:"cover"}})),e.caption&&n.jsx("figcaption",{style:{padding:"5px 8px",fontSize:10,color:o,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:e.caption})]},r);var a})})]})}const u2=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],d2=/(^|[_\W])(price|salary|cost|amount|revenue|expense|total|value|budget|spend|income|sale|balance)/i,p2=/(^|[_\W])month/i;function f2(e){if(null==e)return"";const t=String(e);return t?t.replace(/[_\-]+/g," ").replace(/([a-z])([A-Z])/g,"$1 $2").replace(/\s+/g," ").trim().split(" ").map(e=>e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()).join(" "):""}const g2=/^(\d{4})-(\d{2})(?:-\d{2})?(?:[T\s]|$)/;function m2(e,t){if("string"==typeof t&&p2.test(t)){const t="number"==typeof e?e:Number(e);if(Number.isInteger(t)&&t>=1&&t<=12)return u2[t-1]}const n=function(e){if("string"!=typeof e)return null;const t=e.match(g2);if(!t)return null;const n=parseInt(t[1],10),r=parseInt(t[2],10);return!Number.isInteger(r)||r<1||r>12?null:`${u2[r-1]} '${String(n).slice(-2)}`}(e);return n||f2(e)}const h2=/^[a-z]+(_[a-z]+)+$/;const b2=/^-?\d+(\.\d+)?$/,y2=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],v2=/^\d{4}-\d{2}-\d{2}([T ]\d{2}:\d{2}(:\d{2})?(\.\d+)?(Z|[+-]\d{2}:?\d{2})?)?$/;function w2(e){return Number.isInteger(e)?e.toLocaleString("en-US"):Number(e.toFixed(2)).toLocaleString("en-US")}function S2(e,t){if(null==e)return"";if("number"==typeof e)return w2(e);if("object"==typeof e)return JSON.stringify(e);const n=String(e).trim(),r=function(e){if("string"!=typeof e)return null;const t=e.trim();if(!v2.test(t))return null;const n=/[T ]\d{2}:\d{2}/.test(t),r=/(Z|[+-]\d{2}:?\d{2})$/.test(t),o=n&&!r?`${t.replace(" ","T")}Z`:t,a=new Date(o);if(isNaN(a.getTime()))return null;const i=n&&(0!==a.getUTCHours()||0!==a.getUTCMinutes()||0!==a.getUTCSeconds()),s=`${y2[a.getUTCMonth()]} ${a.getUTCDate()}, ${a.getUTCFullYear()}`;if(!i)return s;const l=a.getUTCHours(),c=l>=12?"PM":"AM";return`${s}, ${l%12||12}:${String(a.getUTCMinutes()).padStart(2,"0")} ${c}`}(n);if(r)return r;if("string"==typeof(o=t)&&d2.test(o)&&b2.test(n)){const e=Number(n);if(Number.isFinite(e))return w2(e)}var o,a;return"string"!=typeof(a=e)?String(a??""):a.length>40?a:h2.test(a)?f2(a):a}function x2({size:e=14}){return n.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[n.jsx("polyline",{points:"22 7 13.5 15.5 8.5 10.5 2 17"}),n.jsx("polyline",{points:"16 7 22 7 22 13"})]})}function E2({size:e=14}){return n.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[n.jsx("path",{d:"M16 16c0-1.7-2-3-2-3"}),n.jsx("path",{d:"M8 16c0-1.7 2-3 2-3"}),n.jsx("path",{d:"M7 21h10"}),n.jsx("path",{d:"M12 3v18"}),n.jsx("path",{d:"m17 7 5 9h-10z"}),n.jsx("path",{d:"m7 7-5 9h10z"})]})}function k2({size:e=14}){return n.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[n.jsx("circle",{cx:"5",cy:"6",r:"3"}),n.jsx("circle",{cx:"19",cy:"18",r:"3"}),n.jsx("path",{d:"M12 6h5a2 2 0 0 1 2 2v7"}),n.jsx("path",{d:"M12 18H7a2 2 0 0 1-2-2V9"})]})}function A2({size:e=14}){return n.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:n.jsx("polygon",{points:"13 2 3 14 12 14 11 22 21 10 12 10 13 2"})})}function T2({size:e=14}){return n.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[n.jsx("path",{d:"M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5"}),n.jsx("path",{d:"M9 18h6"}),n.jsx("path",{d:"M10 22h4"})]})}function O2({size:e=14}){return n.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[n.jsx("circle",{cx:"12",cy:"12",r:"10"}),n.jsx("circle",{cx:"12",cy:"12",r:"6"}),n.jsx("circle",{cx:"12",cy:"12",r:"2"})]})}function C2({type:e,icon:t,title:r,count:o,isDark:a,children:i}){const{accent:s,iconBg:l,iconFg:c}=function(e,t){const n={"revenue-insights":t?["#10b981","#064e3b","#a7f3d0"]:["#10b981","#ecfdf5","#065f46"],"impact-analysis":t?["#f59e0b","#78350f","#fde68a"]:["#f59e0b","#fef3c7","#92400e"],"deviation-analysis":t?["#3b82f6","#1e3a8a","#bfdbfe"]:["#3b82f6","#dbeafe","#1e40af"],"main-drivers":t?["#8b5cf6","#4c1d95","#ddd6fe"]:["#8b5cf6","#ede9fe","#5b21b6"],"key-observations":t?["#059669","#064e3b","#a7f3d0"]:["#059669","#f0fdf4","#14532d"],recommendations:t?["#818cf8","#312e81","#c7d2fe"]:["#4f46e5","#eef2ff","#4f46e5"]},[r,o,a]=n[e]||["#64748b","#f1f5f9","#475569"];return{accent:r,iconBg:o,iconFg:a}}(e,a),u=a?"1px solid #374151":"1px solid #e5e7eb";return n.jsxs("div",{style:{background:a?"#1f2937":"#ffffff",border:u,borderRadius:12,overflow:"hidden",margin:"8px 0",color:a?"#f3f4f6":"#0f172a"},children:[n.jsx("div",{style:{height:4,background:s}}),n.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:8,padding:"12px 14px 10px",borderBottom:u},children:[n.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,fontSize:13,fontWeight:700},children:[n.jsx("span",{style:{display:"inline-flex",alignItems:"center",justifyContent:"center",width:22,height:22,borderRadius:6,background:l,color:c},children:t}),r]}),null!=o&&n.jsx("div",{style:{fontSize:11,color:a?"#9ca3af":"#64748b",fontVariantNumeric:"tabular-nums"},children:o})]}),n.jsx("div",{style:{padding:"12px 14px 14px",fontSize:13,lineHeight:1.55},children:i})]})}function I2({delta:e,isDark:t}){if(!e)return null;const r=function(e){const t=String(e||"").trim();return t?t.startsWith("+")?"up":t.startsWith("-")||t.startsWith("−")?"dn":"flat":"flat"}(e),o=(t?{up:{bg:"#064e3b",fg:"#a7f3d0"},dn:{bg:"#7f1d1d",fg:"#fecaca"},flat:{bg:"#1f2937",fg:"#9ca3af"}}:{up:{bg:"#dcfce7",fg:"#166534"},dn:{bg:"#fee2e2",fg:"#991b1b"},flat:{bg:"#f1f5f9",fg:"#64748b"}})[r];return n.jsx("span",{style:{fontSize:9,fontWeight:600,padding:"1px 5px",borderRadius:3,marginLeft:4,background:o.bg,color:o.fg},children:e})}function N2({items:e,isDark:t}){if(!e||!e.length)return null;const r=t?"1px solid #374151":"1px solid #e5e7eb",o=t?"#9ca3af":"#64748b",a=t?"#f3f4f6":"#0f172a",i=t?"#111827":"#f8fafc";return n.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:6,marginTop:4},children:e.map((e,s)=>n.jsxs("span",{style:{display:"inline-flex",alignItems:"baseline",gap:4,fontSize:11,lineHeight:1,padding:"5px 8px",borderRadius:6,background:i,border:r},children:[e.label&&n.jsxs("span",{style:{color:o},children:[e.label,":"]}),n.jsx("span",{style:{fontWeight:700,color:a,fontVariantNumeric:"tabular-nums"},children:e.value}),n.jsx(I2,{delta:e.delta,isDark:t})]},s))})}function R2({spec:e,isDark:t}){const r=Array.isArray(e.totals)?e.totals:[],o=t?"#9ca3af":"#64748b";return n.jsxs(C2,{type:"revenue-insights",icon:n.jsx(x2,{}),title:e.title||"Revenue insights",count:null,isDark:t,children:[e.headline&&n.jsx("div",{style:{fontSize:18,fontWeight:700,marginBottom:4},children:e.headline}),e.narrative&&n.jsx("div",{style:{color:o,marginBottom:r.length?8:0},children:e.narrative}),r.length>0&&n.jsx("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(140px, 1fr))",gap:8,marginTop:8},children:r.map((e,r)=>n.jsxs("div",{style:{background:t?"#111827":"#f8fafc",border:t?"1px solid #374151":"1px solid #e5e7eb",borderRadius:8,padding:"8px 10px"},children:[n.jsx("div",{style:{fontSize:11,color:o},children:e.label}),n.jsxs("div",{style:{fontSize:16,fontWeight:700,fontVariantNumeric:"tabular-nums"},children:[e.value,n.jsx(I2,{delta:e.delta,isDark:t})]})]},r))})]})}function _2({items:e,sentiment:t,isDark:r}){if(!e||0===e.length)return null;const o="positive"===t?"Positive impact":"negative"===t?"Negative impact":"Neutral",a=r?"#9ca3af":"#64748b",i="positive"===t?{bg:r?"rgba(16,185,129,0.10)":"#f0fdf4",bd:r?"rgba(52,211,153,0.30)":"#bbf7d0",tx:r?"#a7f3d0":"#14532d",dot:r?"#34d399":"#10b981"}:"negative"===t?{bg:r?"rgba(239,68,68,0.10)":"#fef2f2",bd:r?"rgba(248,113,113,0.30)":"#fecaca",tx:r?"#fecaca":"#7f1d1d",dot:r?"#f87171":"#ef4444"}:{bg:r?"#111827":"#f8fafc",bd:r?"#374151":"#e2e8f0",tx:r?"#f3f4f6":"#0f172a",dot:r?"#9ca3af":"#94a3b8"};return n.jsxs("div",{children:[n.jsx("div",{style:{fontSize:11,fontWeight:700,textTransform:"uppercase",letterSpacing:"0.4px",color:a,margin:"10px 0 6px"},children:o}),e.map((e,t)=>n.jsxs("div",{style:{background:i.bg,border:`1px solid ${i.bd}`,borderRadius:8,padding:"8px 10px",margin:"4px 0",color:i.tx},children:[n.jsxs("div",{style:{fontWeight:700,display:"block",marginBottom:2},children:[n.jsx("span",{style:{display:"inline-block",width:7,height:7,borderRadius:"50%",background:i.dot,marginRight:6,verticalAlign:"middle"}}),e.title]}),n.jsx("div",{children:e.description}),n.jsx(N2,{items:e.metrics,isDark:r})]},t))]})}function P2({spec:e,isDark:t}){return n.jsxs(C2,{type:"impact-analysis",icon:n.jsx(E2,{}),title:e.title||"Impact analysis",count:null,isDark:t,children:[n.jsx(_2,{items:e.positive,sentiment:"positive",isDark:t}),n.jsx(_2,{items:e.negative,sentiment:"negative",isDark:t}),n.jsx(_2,{items:e.neutral,sentiment:"neutral",isDark:t})]})}function L2({spec:e,isDark:t}){const r=Array.isArray(e.deviations)?e.deviations:[],o=t?"1px solid #374151":"1px solid #e5e7eb",a=t?"#9ca3af":"#64748b",i=t?"#f3f4f6":"#0f172a";return n.jsxs(C2,{type:"deviation-analysis",icon:n.jsx(k2,{}),title:e.title||"Deviation analysis",count:null,isDark:t,children:[0===r.length?n.jsx("div",{style:{color:a,fontSize:12,padding:"14px 0",textAlign:"center"},children:"No deviations"}):n.jsx("div",{style:{overflowX:"auto"},children:n.jsxs("table",{style:{width:"100%",borderCollapse:"collapse",fontSize:12},children:[n.jsx("thead",{children:n.jsx("tr",{children:["Segment","Metric","Expected","Actual","Delta"].map(e=>n.jsx("th",{style:{padding:"7px 10px",borderBottom:o,textAlign:"left",fontSize:11,color:a,fontWeight:600,textTransform:"uppercase",letterSpacing:"0.3px"},children:e},e))})}),n.jsx("tbody",{children:r.map((e,r)=>{return n.jsxs("tr",{children:[n.jsx("td",{style:{padding:"7px 10px",borderBottom:o,color:i},children:e.segment}),n.jsx("td",{style:{padding:"7px 10px",borderBottom:o,color:i},children:e.metric}),n.jsx("td",{style:{padding:"7px 10px",borderBottom:o,color:i,fontVariantNumeric:"tabular-nums"},children:e.expected}),n.jsx("td",{style:{padding:"7px 10px",borderBottom:o,color:i,fontVariantNumeric:"tabular-nums"},children:e.actual}),n.jsx("td",{style:{padding:"7px 10px",borderBottom:o,color:(a=e.tone,"up"===a?t?"#34d399":"#15803d":"dn"===a?t?"#f87171":"#b91c1c":t?"#9ca3af":"#64748b"),fontWeight:700,fontVariantNumeric:"tabular-nums"},children:e.delta})]},r);var a})})]})}),e.summary&&n.jsx("div",{style:{background:t?"#111827":"#f8fafc",border:o,borderRadius:6,padding:"8px 10px",marginTop:10,fontSize:12,color:i},children:e.summary})]})}function D2({spec:e,isDark:t}){const r=Array.isArray(e.secondary)?e.secondary:[],o=t?"#9ca3af":"#64748b",a=t?"#9ca3af":"#64748b",i=e.primary;return n.jsxs(C2,{type:"main-drivers",icon:n.jsx(A2,{}),title:e.title||"Main drivers",count:null,isDark:t,children:[i&&n.jsxs("div",{style:{background:t?"rgba(139,92,246,0.10)":"#faf5ff",border:t?"1px solid rgba(167,139,250,0.30)":"1px solid #d8b4fe",borderRadius:8,padding:"10px 12px",marginBottom:r.length?10:0},children:[n.jsx("div",{style:{fontSize:10,fontWeight:700,textTransform:"uppercase",letterSpacing:"0.4px",color:t?"#c4b5fd":"#7c3aed",marginBottom:4},children:"Primary driver"}),n.jsx("div",{style:{fontWeight:600},children:i.factor}),i.evidence&&n.jsx("div",{style:{color:o,fontSize:12,marginTop:4},children:i.evidence}),i.metric&&n.jsxs("span",{style:{display:"inline-block",marginTop:6,background:t?"rgba(139,92,246,0.20)":"#ede9fe",color:t?"#ddd6fe":"#5b21b6",fontSize:11,fontWeight:600,padding:"2px 7px",borderRadius:6},children:[i.metric.label,": ",i.metric.value]})]}),r.length>0&&n.jsxs(n.Fragment,{children:[n.jsx("div",{style:{fontSize:11,fontWeight:700,textTransform:"uppercase",letterSpacing:"0.4px",color:a,margin:"10px 0 6px"},children:"Secondary drivers"}),n.jsx("ul",{style:{paddingLeft:20,margin:0},children:r.map((e,t)=>n.jsxs("li",{style:{marginBottom:6},children:[n.jsx("div",{style:{fontWeight:600},children:e.factor}),e.evidence&&n.jsx("div",{style:{color:o,fontSize:12,marginTop:2},children:e.evidence})]},t))})]})]})}function M2({rankBgFg:e,rank:t,chips:r,text:o,narrative:a,metrics:i,impactPill:s,isDark:l}){const c=l?"#9ca3af":"#64748b",u=l?"1px dashed #374151":"1px dashed #e5e7eb";return n.jsxs("div",{style:{display:"flex",gap:10,alignItems:"flex-start",padding:"10px 0",borderBottom:u},children:[n.jsx("div",{style:{flex:"0 0 22px",height:22,width:22,borderRadius:"50%",fontSize:11,fontWeight:700,display:"flex",alignItems:"center",justifyContent:"center",fontVariantNumeric:"tabular-nums",background:e.bg,color:e.fg},children:t}),n.jsxs("div",{style:{flex:"1 1 auto",minWidth:0,display:"flex",flexDirection:"column",gap:5},children:[r,o&&n.jsx("div",{style:{fontSize:13,fontWeight:600},children:o}),a&&n.jsx("div",{style:{fontSize:12,color:c},children:a}),n.jsx(N2,{items:i,isDark:l}),s]})]})}function j2({spec:e,isDark:t}){const r=Array.isArray(e.items)?[...e.items].sort((e,t)=>(e.rank||0)-(t.rank||0)):[],o=t?{bg:"#064e3b",fg:"#a7f3d0"}:{bg:"#f0fdf4",fg:"#14532d"};return n.jsx(C2,{type:"key-observations",icon:n.jsx(T2,{}),title:e.title||"Key observations",count:r.length?`${r.length} item${1===r.length?"":"s"}`:null,isDark:t,children:0===r.length?n.jsx("div",{style:{color:t?"#9ca3af":"#64748b",fontSize:12,padding:"14px 0",textAlign:"center"},children:"No observations available."}):r.map((e,r)=>{const a=[];return e.category&&a.push(n.jsx("span",{style:B2("cat",t),children:e.category},"cat")),e.priority&&a.push(n.jsx("span",{style:B2("prio-"+e.priority,t),children:e.priority},"prio")),n.jsx(M2,{rankBgFg:o,rank:e.rank||r+1,chips:a.length?n.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:5},children:a}):null,text:e.text,narrative:e.narrative,metrics:e.metrics,impactPill:null,isDark:t},r)})})}function F2({spec:e,isDark:t}){const r=Array.isArray(e.items)?[...e.items].sort((e,t)=>(e.rank||0)-(t.rank||0)):[],o=t?{bg:"#312e81",fg:"#c7d2fe"}:{bg:"#4f46e5",fg:"#ffffff"};return n.jsx(C2,{type:"recommendations",icon:n.jsx(O2,{}),title:e.title||"Recommendations",count:r.length?`${r.length} item${1===r.length?"":"s"}`:null,isDark:t,children:0===r.length?n.jsx("div",{style:{color:t?"#9ca3af":"#64748b",fontSize:12,padding:"14px 0",textAlign:"center"},children:"No recommendations available."}):r.map((e,r)=>{const a=(e.affected_segments||[]).map((e,r)=>n.jsx("span",{style:B2("seg",t),children:e},r)),i=e.expected_impact?n.jsxs("span",{style:{alignSelf:"flex-start",display:"inline-flex",alignItems:"center",gap:4,marginTop:2,background:t?"rgba(16,185,129,0.18)":"#dcfce7",color:t?"#a7f3d0":"#166534",fontSize:10,fontWeight:700,padding:"4px 9px",borderRadius:999,border:t?"1px solid rgba(52,211,153,0.30)":"1px solid #bbf7d0"},children:["↑ ",e.expected_impact]}):null;return n.jsx(M2,{rankBgFg:o,rank:e.rank||r+1,chips:a.length?n.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:5},children:a}):null,text:e.action,narrative:e.rationale,metrics:e.metrics,impactPill:i,isDark:t},r)})})}function B2(e,t){const n={display:"inline-flex",alignItems:"center",fontSize:10,fontWeight:600,lineHeight:1,padding:"3px 7px",borderRadius:999,border:t?"1px solid #374151":"1px solid #e5e7eb",background:t?"#111827":"#f8fafc",color:t?"#9ca3af":"#64748b"};return"cat"===e?{...n,background:t?"rgba(99,102,241,0.20)":"#eef2ff",color:t?"#c7d2fe":"#4f46e5",border:"1px solid transparent"}:"seg"===e?{...n,background:t?"#1f2937":"#f1f5f9",color:t?"#f3f4f6":"#0f172a"}:"prio-high"===e?{...n,background:t?"rgba(239,68,68,0.18)":"#fef2f2",color:t?"#fecaca":"#7f1d1d",border:t?"1px solid rgba(248,113,113,0.30)":"1px solid #fecaca"}:"prio-medium"===e?{...n,background:t?"rgba(99,102,241,0.20)":"#eef2ff",color:t?"#c7d2fe":"#4f46e5",border:"1px solid transparent"}:n}const U2=/\[([\d०-९][\d०-९\s,]*)\](?!\()/g,z2={"०":"0","१":"1","२":"2","३":"3","४":"4","५":"5","६":"6","७":"7","८":"8","९":"9"};function $2(e){const t=[];for(const n of function(e){return e.replace(/[०-९]/g,e=>z2[e]??e)}(e).split(",")){const e=n.trim();if(/^\d+$/.test(e)){const n=parseInt(e,10);n>=1&&t.push(n)}}return t}function G2(e){const t=new Set,n=[];for(const r of e)t.has(r)||(t.add(r),n.push(r));return n}const q2=/(\s*)((?:\[[\d०-९][\d०-९\s,]*\](?!\()\s*)+)([.!?])/g;function H2(e){if(!e)return[];e=function(e){return e.replace(q2,(e,t,n,r)=>r+" "+n.replace(/\s+$/,""))}(e);const t=[];let n;for(U2.lastIndex=0;null!==(n=U2.exec(e));){const e=$2(n[1]);0!==e.length&&t.push({start:n.index,end:U2.lastIndex,indices:e})}if(0===t.length)return[{type:"text",value:e}];const r=[];for(const n of t){const t=r.length?r[r.length-1]:null;t&&/^\s*$/.test(e.slice(t.end,n.start))?(t.end=n.end,t.indices.push(...n.indices)):r.push({start:n.start,end:n.end,indices:[...n.indices]})}const o=[];let a=0;for(const t of r)t.start>a&&o.push({type:"text",value:e.slice(a,t.start)}),o.push({type:"cite",indices:G2(t.indices)}),a=t.end;return a<e.length&&o.push({type:"text",value:e.slice(a)}),o}function V2(){return e=>{Mn(e,"text",(e,t,n)=>{if(null==t||null==n)return;if("element"===n.type&&("code"===n.tagName||"pre"===n.tagName))return;const r=H2(e.value);if(1===r.length&&"text"===r[0].type)return;const o=r.map((e,t)=>{if("text"===e.type){return{type:"text",value:t+1<r.length&&"cite"===r[t+1].type?e.value.replace(/[ \t]+$/," "):e.value}}return{type:"element",tagName:"span",properties:{dataEshalCitation:(n=e.indices,n.join(","))},children:[]};var n});return n.children.splice(t,1,...o),[Ln,t+o.length]})}}function W2(e){if(!e)return!1;const t=e.source_type,n=e.url;return"file"===t||"string"==typeof n&&n.includes("/api/v1/sharepoint/file/")||!!e.source_id&&!n}function Y2(e,t){return function(e){if(!e)return"";try{return decodeURIComponent(String(e))}catch{return String(e)}}(e.source_name)||e.url||e.source_type||`Source ${t}`}function K2(e){return e.url||e.source_id||e.sourceid||e.source_name||""}function X2({indices:t}){const o=e.useContext(pt),a=e.useRef(null),i=e.useRef(null),[s,l]=e.useState(!1),[c,u]=e.useState(null),d=e.useMemo(()=>{if(!o||!Array.isArray(o.sources))return[];const e=[],n=new Set;for(const r of t){const t=o.sources.find(e=>Array.isArray(e?.citation_indices)&&e.citation_indices.includes(r)),a=t??o.sources[r-1];if(!a)continue;const i=String(a.url??a.source_id??a.sourceid??a.source_name??"").toLowerCase();i&&n.has(i)||(i&&n.add(i),e.push({src:a,index:r}))}return e},[o,t]);e.useEffect(()=>{if(!s)return;const e=e=>{const t="function"==typeof e.composedPath?e.composedPath():[],n=a.current&&t.includes(a.current),r=i.current&&t.includes(i.current);n||r||l(!1)},t=e=>{if("Escape"!==e.key){if("Tab"===e.key&&i.current){const t=i.current.querySelectorAll("a[href], button:not([disabled])");if(0===t.length)return;const n=t[0],r=t[t.length-1],o="function"==typeof e.composedPath?e.composedPath()[0]:e.target;e.shiftKey&&o===n?(e.preventDefault(),r.focus()):e.shiftKey||o!==r||(e.preventDefault(),n.focus())}}else l(!1)};return document.addEventListener("mousedown",e),document.addEventListener("keydown",t),()=>{document.removeEventListener("mousedown",e),document.removeEventListener("keydown",t)}},[s]);const p=e.useRef(!1);if(e.useEffect(()=>{if(s){p.current=!0;const e=i.current?.querySelector("a[href], button:not([disabled])");e?.focus()}else p.current&&(p.current=!1,a.current?.focus())},[s]),!o)return null;if(Array.isArray(o.sources)&&0===o.sources.length)return null;if(o.sourcesPreliminary)return null;if(0===d.length)return null;const f=d[0],g=d.length-1,m=Y2(f.src,f.index),h=W2(f.src)&&ft(f.src),b=o.downloadingKey&&o.downloadingKey===K2(f.src),y=e=>{"function"==typeof o.onSourceActivate&&o.onSourceActivate(e)},v=e=>{e.preventDefault(),e.stopPropagation(),1!==d.length?s?l(!1):(()=>{const e=a.current;if(!e)return;const t=e.getBoundingClientRect();u({top:t.bottom+window.scrollY+4,left:t.left+window.scrollX}),l(!0)})():y(f.src)};return n.jsxs(n.Fragment,{children:[n.jsxs("span",{ref:a,role:"button",tabIndex:0,dir:"ltr",title:m+(g?` (+${g} more)`:""),"aria-label":m+(g?` (+${g} more)`:""),onClick:v,onKeyDown:e=>{"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),v(e))},style:{display:"inline-flex",alignItems:"center",gap:3,height:20,padding:"0 5px 0 6px",marginInlineStart:2,marginInlineEnd:7,fontSize:11,lineHeight:1,borderRadius:5,background:o?.textColor?"rgba(128,128,128,0.08)":"rgba(59, 130, 246, 0.10)",color:o?.textColor||"rgb(37, 99, 235)",border:o?.textColor?`0.5px solid ${o.textColor}`:"0.5px solid rgba(59, 130, 246, 0.35)",cursor:"pointer",userSelect:"none",maxWidth:180,verticalAlign:"1px",textDecoration:"none",fontWeight:500,whiteSpace:"nowrap",unicodeBidi:"isolate"},children:[n.jsx("span",{style:{display:"inline-flex",flexShrink:0},children:h?n.jsx($e,{size:12,strokeWidth:2,"aria-hidden":!0}):n.jsx(Ge,{size:12,strokeWidth:2,"aria-hidden":!0})}),n.jsx("span",{style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",maxWidth:110},children:m}),g>0&&n.jsxs("span",{style:{background:o?.textColor?"transparent":"rgb(37, 99, 235)",color:o?.textColor||"white",border:o?.textColor?`1px solid ${o.textColor}`:"none",borderRadius:3,padding:"1px 4px",fontSize:9,lineHeight:1,fontWeight:600,marginLeft:1},children:["+",g]}),1===d.length&&n.jsx("span",{style:{display:"inline-flex",alignItems:"center",justifyContent:"center",flexShrink:0,paddingLeft:3,borderLeft:o?.textColor?`0.5px solid ${o.textColor}`:"0.5px solid rgba(59, 130, 246, 0.35)",marginLeft:2},children:b?n.jsx(qe,{size:12,strokeWidth:2,className:"animate-spin"}):h?n.jsx(Be,{size:12,strokeWidth:2}):n.jsx(ze,{size:12,strokeWidth:2})})]}),s&&c&&"undefined"!=typeof document&&r.createPortal(n.jsxs("div",{ref:i,role:"dialog",dir:"ltr","aria-label":`${d.length} sources cited`,style:{position:"absolute",top:c.top,left:c.left,zIndex:2147483647,background:"#fff",color:"#111",border:"0.5px solid rgba(0, 0, 0, 0.12)",borderRadius:8,boxShadow:"0 4px 16px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0,0,0,0.06)",padding:6,minWidth:240,maxWidth:360,fontSize:12},onClick:e=>e.stopPropagation(),onMouseDown:e=>e.stopPropagation(),children:[n.jsxs("div",{style:{fontSize:10,textTransform:"uppercase",opacity:.55,letterSpacing:"0.06em",padding:"4px 6px 6px"},children:[d.length," source",1===d.length?"":"s"]}),d.map(({src:e,index:t})=>{const r=Y2(e,t),a=W2(e)&&ft(e),i=o.downloadingKey&&o.downloadingKey===K2(e);return n.jsxs("button",{type:"button",onClick:()=>y(e),disabled:!!i,title:r,style:{display:"flex",alignItems:"center",gap:8,width:"100%",padding:"6px 8px",border:0,background:"transparent",color:"inherit",cursor:i?"default":"pointer",textAlign:"left",borderRadius:4,font:"inherit"},onMouseEnter:e=>{e.currentTarget.style.background="rgba(0,0,0,0.04)"},onMouseLeave:e=>{e.currentTarget.style.background="transparent"},children:[n.jsx("span",{style:{display:"inline-flex",flexShrink:0,opacity:.8},children:a?n.jsx($e,{size:14,strokeWidth:2,"aria-hidden":!0}):n.jsx(Ge,{size:14,strokeWidth:2,"aria-hidden":!0})}),n.jsx("span",{style:{flex:1,minWidth:0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:r}),n.jsx("span",{style:{display:"inline-flex",flexShrink:0,opacity:.7},children:i?n.jsx(qe,{size:14,strokeWidth:2,className:"animate-spin"}):a?n.jsx(Be,{size:14,strokeWidth:2}):n.jsx(ze,{size:14,strokeWidth:2})})]},`${t}-${K2(e)||t}`)})]}),document.body)]})}const Z2=new Set(["eshal-ui","eshal-chart","chart"]);function Q2(e,t){if(!t)return e;const n=/^```(?:eshal-ui|eshal-chart|chart)\b/m.exec(e);if(n){const t=e.slice(n.index+n[0].length).split("\n").some(e=>"```"===e.trim());if(!t)return e.slice(0,n.index).trimEnd()}const r=e.split("\n");let o=r.length-1;for(;o>0&&""===r[o].trim();)o--;if(!r[o].trim().startsWith("|"))return e;let a=o;for(;a>0&&(r[a-1].trim().startsWith("|")||""===r[a-1].trim());)a--;const i=r.slice(a,o+1).some(e=>/^\|[\s\-:|]+\|/.test(e.trim()));return i?e:r.slice(0,a).join("\n")}function J2(e){return e.replace(/(\d+\.\d{2})0+(?!\d)/g,"$1")}var e3=Object.freeze({__proto__:null,default:function({content:t,isStreaming:r,isDark:o=!1,isRtl:a=!1,textColor:i,fontFamily:s,fontSize:l,onButtonClick:c,provideCitations:u=!0}){return n.jsx($l,{className:"max-w-none [&>*:last-child]:!mb-0 [&>*:first-child]:!mt-0",remarkPlugins:[Mu,Fu,Bu],rehypePlugins:u?[V2,Un]:[Un],components:{span({node:e,children:t,...r}){const o=r["data-eshal-citation"]??r.dataEshalCitation;if("string"==typeof o&&o.length>0){const e=function(e){if(!e)return[];const t=[];for(const n of String(e).split(",")){const e=parseInt(n.trim(),10);Number.isFinite(e)&&e>=1&&t.push(e)}return G2(t)}(o);if(e.length>0)return n.jsx(X2,{indices:e})}return n.jsx("span",{...r,children:t})},pre:({children:t,...r})=>function(t){return e.Children.toArray(t).some(t=>{if(!e.isValidElement(t))return!1;const n=t.props?.className;if("string"!=typeof n)return!1;const r=n.match(/language-([\w-]+)/);return!!r&&Z2.has(r[1])})}(t)?n.jsx(n.Fragment,{children:t}):n.jsx("pre",{...r,children:t}),a:({node:e,children:t,...r})=>n.jsx("a",{className:"underline hover:opacity-80",dir:"ltr",style:{color:i||(o?"#f3f4f6":"#1A1A1A"),unicodeBidi:"isolate"},target:"_blank",rel:"noopener noreferrer",...r,children:t}),p({node:e,children:t,...r}){const a="li"===e?.parent?.tagName;return n.jsx("p",{className:"leading-relaxed [&:first-child]:!mt-0",style:{color:i||(o?"#f3f4f6":"#1A1A1A"),fontFamily:s||"Inter",fontSize:l||"14px",margin:0,marginTop:0,marginBottom:a?"0.125rem":"0.85rem",lineHeight:"1.6",padding:0},...r,children:t})},ul:({node:e,children:t,...r})=>n.jsx("ul",{className:"list-disc [&:first-child]:!mt-0",style:{marginTop:0,marginBottom:"0.6rem",paddingInlineStart:"1.2rem"},...r,children:t}),ol({node:t,children:r,start:o=1,...a}){const i=Number.isFinite(Number(o))?Number(o):1;let s=0;return n.jsx("ol",{className:"[&:first-child]:!mt-0",style:{listStyle:"none",marginTop:0,marginBottom:"0.6rem",paddingInlineStart:0},...a,children:e.Children.map(r,t=>{if(!e.isValidElement(t))return t;const n=i+s;return s+=1,e.cloneElement(t,{"data-ol-index":n})})})},li({node:e,children:t,"data-ol-index":r,...a}){const c={color:i||(o?"#f3f4f6":"#1A1A1A"),fontFamily:s||"Inter",fontSize:l||"14px",marginBottom:"0.3rem",lineHeight:"1.5"};return null!=r?n.jsxs("li",{style:{...c,listStyle:"none",display:"flex",alignItems:"baseline",gap:"0.4em"},...a,children:[n.jsxs("span",{style:{flexShrink:0,fontFamily:'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif',fontVariantNumeric:"tabular-nums",minWidth:"1.5em",color:"inherit"},"aria-hidden":"false",children:[r,"."]}),n.jsx("span",{style:{flex:"1 1 auto",minWidth:0},children:t})]}):n.jsx("li",{className:"",style:c,...a,children:t})},h1:({node:e,children:t,...r})=>n.jsx("h1",{className:"text-xl font-bold [&:first-child]:!mt-0",style:{color:i||(o?"#f3f4f6":"#1A1A1A"),fontFamily:s||"Inter",marginTop:"0.7rem",marginBottom:"0.45rem",lineHeight:"1.35"},...r,children:t}),h2:({node:e,children:t,...r})=>n.jsx("h2",{className:"text-lg font-semibold [&:first-child]:!mt-0",style:{color:i||(o?"#f3f4f6":"#1A1A1A"),fontFamily:s||"Inter",marginTop:"0.65rem",marginBottom:"0.4rem",lineHeight:"1.35"},...r,children:t}),h3:({node:e,children:t,...r})=>n.jsx("h3",{className:"text-base font-semibold [&:first-child]:!mt-0",style:{color:i||(o?"#f3f4f6":"#1A1A1A"),fontFamily:s||"Inter",marginTop:"0.6rem",marginBottom:"0.35rem",lineHeight:"1.35"},...r,children:t}),blockquote:({node:e,children:t,...r})=>n.jsx("blockquote",{className:"border-l-4 pl-4 italic "+(o?"border-gray-600 text-gray-300":"border-gray-300 text-gray-700"),...r,children:t}),table({node:e,children:t,...r}){if(e?.children?.length>0){function a(e){return e?"string"==typeof e.value?e.value:Array.isArray(e.children)?e.children.map(a).join(""):"":""}const i=e.children.find(e=>"thead"===e.tagName),s=e.children.find(e=>"tbody"===e.tagName),l=i?.children?.find(e=>"tr"===e.tagName),c=(l?.children||[]).filter(e=>"th"===e.tagName).map(e=>a(e)),u=(s?.children||[]).filter(e=>"tr"===e.tagName),d=u.map(e=>(e.children||[]).filter(e=>"td"===e.tagName).map(e=>a(e)));if(c.length>0&&d.length>0){const p=d.map(e=>Object.fromEntries(c.map((t,n)=>[t,e[n]??""])));return n.jsx(B1,{spec:{type:"table",columns:c,data:p},isDark:o})}}return n.jsx("div",{className:"overflow-x-auto my-3 rounded-lg border "+(o?"border-gray-700 bg-gray-900":"border-gray-200 bg-white"),children:n.jsx("table",{className:"min-w-full border-collapse "+(o?"text-gray-100":"text-gray-900"),...r,children:t})})},th:({node:e,children:t,...r})=>n.jsx("th",{className:"border px-3 py-2 text-left font-medium "+(o?"border-gray-700 bg-gray-800/50 text-gray-300":"border-gray-200 bg-gray-50 text-gray-700"),...r,children:t}),td:({node:e,children:t,...r})=>n.jsx("td",{className:"border px-3 py-2 "+(o?"border-gray-700":"border-gray-200"),...r,children:t}),code({className:e,children:t,...r}){const a=/language-([\w-]+)/.exec(e||""),i=a?a[1]:null;if(i&&Z2.has(i)){const e=function(e){return"string"==typeof e?e:Array.isArray(e)?e.map(e=>"string"==typeof e?e:"").join(""):""}(t).trim();try{const t=JSON.parse(e);if(t&&"object"==typeof t)return n.jsx(B1,{spec:t,isDark:o,onButtonClick:c})}catch(e){return null}return null}return a?n.jsx(Ck,{style:Ik,language:i,PreTag:"div",wrapLines:!0,...r,children:String(t).replace(/\n$/,"")}):n.jsx("code",{className:e,...r,children:t})}},children:J2(Q2(t,r))})},sanitizeExcessDecimalPrecision:J2,sanitizeStreamingContent:Q2});return function(r){const o=e.useRef(null),a=e.useRef(null);return e.useEffect(()=>{const e=o.current;if(!e||e.shadowRoot)return;const n=e.attachShadow({mode:"open"}),r=document.createElement("style");r.textContent=":host { all: initial; display: block; }",n.appendChild(r);const i=document.createElement("style");i.textContent='*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }.chat-widget-root{--cw-primary:#1d4ed8;--cw-primary-hover:#1e40af;--cw-status-success:160 84% 39%;--cw-status-success-bg:152 81% 96%;--cw-status-warning:35 100% 50%;--cw-status-warning-bg:34 100% 95%;--cw-status-error:350 89% 60%;--cw-status-error-bg:356 100% 97%;--cw-status-info:199 89% 48%;--cw-status-info-bg:204 100% 97%;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif}.chat-widget-root.dark{--cw-status-success:158 64% 52%;--cw-status-success-bg:152 36% 14%;--cw-status-warning:38 92% 60%;--cw-status-warning-bg:36 33% 14%;--cw-status-error:350 89% 65%;--cw-status-error-bg:356 33% 16%;--cw-status-info:199 89% 58%;--cw-status-info-bg:204 33% 14%}.\\!container{width:100%!important}.container{width:100%}@media (min-width:640px){.\\!container{max-width:640px!important}.container{max-width:640px}}@media (min-width:768px){.\\!container{max-width:768px!important}.container{max-width:768px}}@media (min-width:1024px){.\\!container{max-width:1024px!important}.container{max-width:1024px}}@media (min-width:1280px){.\\!container{max-width:1280px!important}.container{max-width:1280px}}@media (min-width:1536px){.\\!container{max-width:1536px!important}.container{max-width:1536px}}#chat-widget-root .chat-widget-root *{box-sizing:border-box;margin:0;padding:0}#chat-widget-root .chat-messages::-webkit-scrollbar{width:6px}#chat-widget-root .chat-messages::-webkit-scrollbar-track{background:transparent}#chat-widget-root .chat-messages::-webkit-scrollbar-thumb{background:rgba(156,163,175,.5);border-radius:10px}#chat-widget-root .chat-messages::-webkit-scrollbar-thumb:hover{background:rgba(156,163,175,.7)}#chat-widget-root .dark .chat-messages::-webkit-scrollbar-thumb{background:rgba(75,85,99,.5)}#chat-widget-root .dark .chat-messages::-webkit-scrollbar-thumb:hover{background:rgba(75,85,99,.7)}#chat-widget-root .sr-only{clip:rect(0,0,0,0);border-width:0;height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}#chat-widget-root .pointer-events-none{pointer-events:none}#chat-widget-root .visible{visibility:visible}#chat-widget-root .invisible{visibility:hidden}#chat-widget-root .collapse{visibility:collapse}#chat-widget-root .static{position:static}#chat-widget-root .fixed{position:fixed}#chat-widget-root .absolute{position:absolute}#chat-widget-root .relative{position:relative}#chat-widget-root .sticky{position:sticky}#chat-widget-root .inset-0{inset:0}#chat-widget-root .-top-8{top:-2rem}#chat-widget-root .bottom-0{bottom:0}#chat-widget-root .bottom-5{bottom:1.25rem}#chat-widget-root .bottom-full{bottom:100%}#chat-widget-root .left-0{left:0}#chat-widget-root .left-1\\/2{left:50%}#chat-widget-root .left-5{left:1.25rem}#chat-widget-root .right-0{right:0}#chat-widget-root .right-5{right:1.25rem}#chat-widget-root .top-0{top:0}#chat-widget-root .top-1\\/2{top:50%}#chat-widget-root .top-5{top:1.25rem}#chat-widget-root .top-full{top:100%}#chat-widget-root .isolate{isolation:isolate}#chat-widget-root .z-10{z-index:10}#chat-widget-root .z-50{z-index:50}#chat-widget-root .z-\\[60\\]{z-index:60}#chat-widget-root .z-\\[70\\]{z-index:70}#chat-widget-root .z-\\[71\\]{z-index:71}#chat-widget-root .z-\\[999999\\]{z-index:999999}#chat-widget-root .z-\\[9999\\]{z-index:9999}#chat-widget-root .m-0{margin:0}#chat-widget-root .mx-2{margin-left:.5rem;margin-right:.5rem}#chat-widget-root .mx-3{margin-left:.75rem;margin-right:.75rem}#chat-widget-root .my-3{margin-bottom:.75rem;margin-top:.75rem}#chat-widget-root .my-4{margin-bottom:1rem;margin-top:1rem}#chat-widget-root .-mb-px{margin-bottom:-1px}#chat-widget-root .mb-1{margin-bottom:.25rem}#chat-widget-root .mb-1\\.5{margin-bottom:.375rem}#chat-widget-root .mb-2{margin-bottom:.5rem}#chat-widget-root .mb-3{margin-bottom:.75rem}#chat-widget-root .mb-4{margin-bottom:1rem}#chat-widget-root .mb-5{margin-bottom:1.25rem}#chat-widget-root .ml-1{margin-left:.25rem}#chat-widget-root .ms-0\\.5{margin-inline-start:.125rem}#chat-widget-root .mt-0\\.5{margin-top:.125rem}#chat-widget-root .mt-1{margin-top:.25rem}#chat-widget-root .mt-1\\.5{margin-top:.375rem}#chat-widget-root .mt-2{margin-top:.5rem}#chat-widget-root .mt-3{margin-top:.75rem}#chat-widget-root .mt-4{margin-top:1rem}#chat-widget-root .block{display:block}#chat-widget-root .inline-block{display:inline-block}#chat-widget-root .inline{display:inline}#chat-widget-root .flex{display:flex}#chat-widget-root .inline-flex{display:inline-flex}#chat-widget-root .table{display:table}#chat-widget-root .grid{display:grid}#chat-widget-root .hidden{display:none}#chat-widget-root .h-1\\.5{height:.375rem}#chat-widget-root .h-10{height:2.5rem}#chat-widget-root .h-11{height:2.75rem}#chat-widget-root .h-12{height:3rem}#chat-widget-root .h-16{height:4rem}#chat-widget-root .h-2{height:.5rem}#chat-widget-root .h-3{height:.75rem}#chat-widget-root .h-3\\.5{height:.875rem}#chat-widget-root .h-4{height:1rem}#chat-widget-root .h-5{height:1.25rem}#chat-widget-root .h-6{height:1.5rem}#chat-widget-root .h-7{height:1.75rem}#chat-widget-root .h-8{height:2rem}#chat-widget-root .h-\\[650px\\]{height:650px}#chat-widget-root .h-auto{height:auto}#chat-widget-root .h-full{height:100%}#chat-widget-root .h-px{height:1px}#chat-widget-root .max-h-\\[85vh\\]{max-height:85vh}#chat-widget-root .min-h-0{min-height:0}#chat-widget-root .min-h-\\[48px\\]{min-height:48px}#chat-widget-root .w-1\\.5{width:.375rem}#chat-widget-root .w-10{width:2.5rem}#chat-widget-root .w-11{width:2.75rem}#chat-widget-root .w-12{width:3rem}#chat-widget-root .w-16{width:4rem}#chat-widget-root .w-2{width:.5rem}#chat-widget-root .w-3{width:.75rem}#chat-widget-root .w-3\\.5{width:.875rem}#chat-widget-root .w-4{width:1rem}#chat-widget-root .w-44{width:11rem}#chat-widget-root .w-5{width:1.25rem}#chat-widget-root .w-6{width:1.5rem}#chat-widget-root .w-7{width:1.75rem}#chat-widget-root .w-8{width:2rem}#chat-widget-root .w-80{width:20rem}#chat-widget-root .w-96{width:24rem}#chat-widget-root .w-\\[380px\\]{width:380px}#chat-widget-root .w-full{width:100%}#chat-widget-root .min-w-0{min-width:0}#chat-widget-root .min-w-\\[60px\\]{min-width:60px}#chat-widget-root .min-w-full{min-width:100%}#chat-widget-root .max-w-\\[75\\%\\]{max-width:75%}#chat-widget-root .max-w-\\[92vw\\]{max-width:92vw}#chat-widget-root .max-w-full{max-width:100%}#chat-widget-root .max-w-none{max-width:none}#chat-widget-root .max-w-sm{max-width:24rem}#chat-widget-root .max-w-xs{max-width:20rem}#chat-widget-root .flex-1{flex:1 1 0%}#chat-widget-root .flex-shrink-0,#chat-widget-root .shrink-0{flex-shrink:0}#chat-widget-root .grow{flex-grow:1}#chat-widget-root .border-collapse{border-collapse:collapse}#chat-widget-root .-translate-x-1\\/2{--tw-translate-x:-50%}#chat-widget-root .-translate-x-1\\/2,#chat-widget-root .-translate-y-1\\/2{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}#chat-widget-root .-translate-y-1\\/2{--tw-translate-y:-50%}#chat-widget-root .-rotate-90{--tw-rotate:-90deg}#chat-widget-root .-rotate-90,#chat-widget-root .rotate-180{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}#chat-widget-root .rotate-180{--tw-rotate:180deg}#chat-widget-root .rotate-90{--tw-rotate:90deg}#chat-widget-root .rotate-90,#chat-widget-root .scale-0{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}#chat-widget-root .scale-0{--tw-scale-x:0;--tw-scale-y:0}#chat-widget-root .scale-100{--tw-scale-x:1;--tw-scale-y:1}#chat-widget-root .scale-100,#chat-widget-root .scale-110{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}#chat-widget-root .scale-110{--tw-scale-x:1.1;--tw-scale-y:1.1}#chat-widget-root .scale-125{--tw-scale-x:1.25;--tw-scale-y:1.25}#chat-widget-root .scale-125,#chat-widget-root .scale-95{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}#chat-widget-root .scale-95{--tw-scale-x:.95;--tw-scale-y:.95}#chat-widget-root .transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes bounce{0%,to{animation-timing-function:cubic-bezier(.8,0,1,1);transform:translateY(-25%)}50%{animation-timing-function:cubic-bezier(0,0,.2,1);transform:none}}#chat-widget-root .animate-bounce{animation:bounce 1s infinite}@keyframes pulse{50%{opacity:.5}}#chat-widget-root .animate-pulse{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}@keyframes spin{to{transform:rotate(1turn)}}#chat-widget-root .animate-spin{animation:spin 1s linear infinite}#chat-widget-root .cursor-ew-resize{cursor:ew-resize}#chat-widget-root .cursor-nesw-resize{cursor:nesw-resize}#chat-widget-root .cursor-not-allowed{cursor:not-allowed}#chat-widget-root .cursor-ns-resize{cursor:ns-resize}#chat-widget-root .cursor-nwse-resize{cursor:nwse-resize}#chat-widget-root .cursor-pointer{cursor:pointer}#chat-widget-root .resize-none{resize:none}#chat-widget-root .resize{resize:both}#chat-widget-root .list-decimal{list-style-type:decimal}#chat-widget-root .list-disc{list-style-type:disc}#chat-widget-root .list-none{list-style-type:none}#chat-widget-root .flex-row{flex-direction:row}#chat-widget-root .flex-row-reverse{flex-direction:row-reverse}#chat-widget-root .flex-col{flex-direction:column}#chat-widget-root .flex-wrap{flex-wrap:wrap}#chat-widget-root .items-start{align-items:flex-start}#chat-widget-root .items-end{align-items:flex-end}#chat-widget-root .items-center{align-items:center}#chat-widget-root .justify-start{justify-content:flex-start}#chat-widget-root .justify-end{justify-content:flex-end}#chat-widget-root .justify-center{justify-content:center}#chat-widget-root .justify-between{justify-content:space-between}#chat-widget-root .gap-0{gap:0}#chat-widget-root .gap-0\\.5{gap:.125rem}#chat-widget-root .gap-1{gap:.25rem}#chat-widget-root .gap-1\\.5{gap:.375rem}#chat-widget-root .gap-2{gap:.5rem}#chat-widget-root .gap-2\\.5{gap:.625rem}#chat-widget-root .gap-3{gap:.75rem}#chat-widget-root .gap-4{gap:1rem}#chat-widget-root .gap-6{gap:1.5rem}#chat-widget-root :is(.space-y-2>:not([hidden])~:not([hidden])){--tw-space-y-reverse:0;margin-bottom:calc(.5rem*var(--tw-space-y-reverse));margin-top:calc(.5rem*(1 - var(--tw-space-y-reverse)))}#chat-widget-root :is(.space-y-4>:not([hidden])~:not([hidden])){--tw-space-y-reverse:0;margin-bottom:calc(1rem*var(--tw-space-y-reverse));margin-top:calc(1rem*(1 - var(--tw-space-y-reverse)))}#chat-widget-root .overflow-hidden{overflow:hidden}#chat-widget-root .overflow-visible{overflow:visible}#chat-widget-root .overflow-x-auto{overflow-x:auto}#chat-widget-root .overflow-y-auto{overflow-y:auto}#chat-widget-root .truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}#chat-widget-root .whitespace-nowrap{white-space:nowrap}#chat-widget-root .whitespace-pre-wrap{white-space:pre-wrap}#chat-widget-root .break-words{overflow-wrap:break-word}#chat-widget-root .break-all{word-break:break-all}#chat-widget-root .rounded{border-radius:.25rem}#chat-widget-root .rounded-2xl{border-radius:1rem}#chat-widget-root .rounded-3xl{border-radius:1.5rem}#chat-widget-root .rounded-full{border-radius:9999px}#chat-widget-root .rounded-lg{border-radius:.5rem}#chat-widget-root .rounded-md{border-radius:.375rem}#chat-widget-root .rounded-xl{border-radius:.75rem}#chat-widget-root .rounded-t-2xl{border-top-left-radius:1rem;border-top-right-radius:1rem}#chat-widget-root .rounded-tl-sm{border-top-left-radius:.125rem}#chat-widget-root .rounded-tr-sm{border-top-right-radius:.125rem}#chat-widget-root .border{border-width:1px}#chat-widget-root .border-0{border-width:0}#chat-widget-root .border-b{border-bottom-width:1px}#chat-widget-root .border-l-4{border-left-width:4px}#chat-widget-root .border-t{border-top-width:1px}#chat-widget-root .border-t-2{border-top-width:2px}#chat-widget-root .border-dotted{border-style:dotted}#chat-widget-root .border-none{border-style:none}#chat-widget-root .\\!border-status-error{border-color:hsl(var(--cw-status-error))!important}#chat-widget-root .border-amber-200{--tw-border-opacity:1;border-color:rgb(253 230 138/var(--tw-border-opacity,1))}#chat-widget-root .border-amber-700\\/50{border-color:rgba(180,83,9,.5)}#chat-widget-root .border-blue-200{--tw-border-opacity:1;border-color:rgb(191 219 254/var(--tw-border-opacity,1))}#chat-widget-root .border-blue-700\\/50{border-color:rgba(29,78,216,.5)}#chat-widget-root .border-gray-100{--tw-border-opacity:1;border-color:rgb(243 244 246/var(--tw-border-opacity,1))}#chat-widget-root .border-gray-200{--tw-border-opacity:1;border-color:rgb(229 231 235/var(--tw-border-opacity,1))}#chat-widget-root .border-gray-200\\/60{border-color:rgba(229,231,235,.6)}#chat-widget-root .border-gray-300{--tw-border-opacity:1;border-color:rgb(209 213 219/var(--tw-border-opacity,1))}#chat-widget-root .border-gray-600{--tw-border-opacity:1;border-color:rgb(75 85 99/var(--tw-border-opacity,1))}#chat-widget-root .border-gray-700{--tw-border-opacity:1;border-color:rgb(55 65 81/var(--tw-border-opacity,1))}#chat-widget-root .border-gray-700\\/50{border-color:rgba(55,65,81,.5)}#chat-widget-root .border-transparent{border-color:transparent}#chat-widget-root .bg-amber-50{--tw-bg-opacity:1;background-color:rgb(255 251 235/var(--tw-bg-opacity,1))}#chat-widget-root .bg-amber-900\\/40{background-color:rgba(120,53,15,.4)}#chat-widget-root .bg-blue-50{--tw-bg-opacity:1;background-color:rgb(239 246 255/var(--tw-bg-opacity,1))}#chat-widget-root .bg-blue-500{--tw-bg-opacity:1;background-color:rgb(59 130 246/var(--tw-bg-opacity,1))}#chat-widget-root .bg-blue-900\\/30{background-color:rgba(30,58,138,.3)}#chat-widget-root .bg-current{background-color:currentColor}#chat-widget-root .bg-gray-100{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity,1))}#chat-widget-root .bg-gray-400{--tw-bg-opacity:1;background-color:rgb(156 163 175/var(--tw-bg-opacity,1))}#chat-widget-root .bg-gray-50{--tw-bg-opacity:1;background-color:rgb(249 250 251/var(--tw-bg-opacity,1))}#chat-widget-root .bg-gray-50\\/30{background-color:rgba(249,250,251,.3)}#chat-widget-root .bg-gray-500{--tw-bg-opacity:1;background-color:rgb(107 114 128/var(--tw-bg-opacity,1))}#chat-widget-root .bg-gray-700{--tw-bg-opacity:1;background-color:rgb(55 65 81/var(--tw-bg-opacity,1))}#chat-widget-root .bg-gray-700\\/50{background-color:rgba(55,65,81,.5)}#chat-widget-root .bg-gray-800{--tw-bg-opacity:1;background-color:rgb(31 41 55/var(--tw-bg-opacity,1))}#chat-widget-root .bg-gray-800\\/50{background-color:rgba(31,41,55,.5)}#chat-widget-root .bg-gray-900{--tw-bg-opacity:1;background-color:rgb(17 24 39/var(--tw-bg-opacity,1))}#chat-widget-root .bg-green-200{--tw-bg-opacity:1;background-color:rgb(187 247 208/var(--tw-bg-opacity,1))}#chat-widget-root .bg-orange-200{--tw-bg-opacity:1;background-color:rgb(254 215 170/var(--tw-bg-opacity,1))}#chat-widget-root .bg-pink-200{--tw-bg-opacity:1;background-color:rgb(251 207 232/var(--tw-bg-opacity,1))}#chat-widget-root .bg-red-200{--tw-bg-opacity:1;background-color:rgb(254 202 202/var(--tw-bg-opacity,1))}#chat-widget-root .bg-red-500{--tw-bg-opacity:1;background-color:rgb(239 68 68/var(--tw-bg-opacity,1))}#chat-widget-root .bg-slate-50\\/50{background-color:rgba(248,250,252,.5)}#chat-widget-root .bg-slate-800\\/50{background-color:rgba(30,41,59,.5)}#chat-widget-root .bg-transparent{background-color:transparent}#chat-widget-root .bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))}#chat-widget-root .bg-white\\/10{background-color:hsla(0,0%,100%,.1)}#chat-widget-root .bg-white\\/20{background-color:hsla(0,0%,100%,.2)}#chat-widget-root .bg-yellow-200{--tw-bg-opacity:1;background-color:rgb(254 240 138/var(--tw-bg-opacity,1))}#chat-widget-root .bg-gradient-to-b{background-image:linear-gradient(to bottom,var(--tw-gradient-stops))}#chat-widget-root .bg-gradient-to-br{background-image:linear-gradient(to bottom right,var(--tw-gradient-stops))}#chat-widget-root .from-gray-50\\/50{--tw-gradient-from:rgba(249,250,251,.5) var(--tw-gradient-from-position);--tw-gradient-to:rgba(249,250,251,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}#chat-widget-root .from-white\\/0{--tw-gradient-from:hsla(0,0%,100%,0) var(--tw-gradient-from-position);--tw-gradient-to:hsla(0,0%,100%,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}#chat-widget-root .from-white\\/10{--tw-gradient-from:hsla(0,0%,100%,.1) var(--tw-gradient-from-position);--tw-gradient-to:hsla(0,0%,100%,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}#chat-widget-root .from-yellow-200{--tw-gradient-from:#fef08a var(--tw-gradient-from-position);--tw-gradient-to:hsla(53,98%,77%,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}#chat-widget-root .via-white\\/5{--tw-gradient-to:hsla(0,0%,100%,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),hsla(0,0%,100%,.05) var(--tw-gradient-via-position),var(--tw-gradient-to)}#chat-widget-root .to-white{--tw-gradient-to:#fff var(--tw-gradient-to-position)}#chat-widget-root .to-white\\/10{--tw-gradient-to:hsla(0,0%,100%,.1) var(--tw-gradient-to-position)}#chat-widget-root .to-yellow-400{--tw-gradient-to:#facc15 var(--tw-gradient-to-position)}#chat-widget-root .object-contain{-o-object-fit:contain;object-fit:contain}#chat-widget-root .p-0{padding:0}#chat-widget-root .p-0\\.5{padding:.125rem}#chat-widget-root .p-3{padding:.75rem}#chat-widget-root .p-5{padding:1.25rem}#chat-widget-root .p-6{padding:1.5rem}#chat-widget-root .p-8{padding:2rem}#chat-widget-root .px-1{padding-left:.25rem;padding-right:.25rem}#chat-widget-root .px-2{padding-left:.5rem;padding-right:.5rem}#chat-widget-root .px-2\\.5{padding-left:.625rem;padding-right:.625rem}#chat-widget-root .px-3{padding-left:.75rem;padding-right:.75rem}#chat-widget-root .px-4{padding-left:1rem;padding-right:1rem}#chat-widget-root .px-5{padding-left:1.25rem;padding-right:1.25rem}#chat-widget-root .py-1{padding-bottom:.25rem;padding-top:.25rem}#chat-widget-root .py-1\\.5{padding-bottom:.375rem;padding-top:.375rem}#chat-widget-root .py-12{padding-bottom:3rem;padding-top:3rem}#chat-widget-root .py-2{padding-bottom:.5rem;padding-top:.5rem}#chat-widget-root .py-2\\.5{padding-bottom:.625rem;padding-top:.625rem}#chat-widget-root .py-3{padding-bottom:.75rem;padding-top:.75rem}#chat-widget-root .py-3\\.5{padding-bottom:.875rem;padding-top:.875rem}#chat-widget-root .py-4{padding-bottom:1rem;padding-top:1rem}#chat-widget-root .pb-1{padding-bottom:.25rem}#chat-widget-root .pb-2{padding-bottom:.5rem}#chat-widget-root .pl-1{padding-left:.25rem}#chat-widget-root .pl-2{padding-left:.5rem}#chat-widget-root .pl-4{padding-left:1rem}#chat-widget-root .pl-\\[50px\\]{padding-left:50px}#chat-widget-root .pr-1{padding-right:.25rem}#chat-widget-root .pt-1{padding-top:.25rem}#chat-widget-root .text-left{text-align:left}#chat-widget-root .text-center{text-align:center}#chat-widget-root .text-right{text-align:right}#chat-widget-root .text-start{text-align:start}#chat-widget-root .align-text-bottom{vertical-align:text-bottom}#chat-widget-root .font-sans{font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji}#chat-widget-root .text-2xl{font-size:1.5rem;line-height:2rem}#chat-widget-root .text-\\[10px\\]{font-size:10px}#chat-widget-root .text-base{font-size:1rem;line-height:1.5rem}#chat-widget-root .text-chip{font-size:11px;letter-spacing:0;line-height:1.4}#chat-widget-root .text-h4{font-size:18px;letter-spacing:0;line-height:1.3}#chat-widget-root .text-lg{font-size:1.125rem;line-height:1.75rem}#chat-widget-root .text-sm{font-size:.875rem;line-height:1.25rem}#chat-widget-root .text-xl{font-size:1.25rem;line-height:1.75rem}#chat-widget-root .text-xs{font-size:.75rem;line-height:1rem}#chat-widget-root .font-bold{font-weight:700}#chat-widget-root .font-medium{font-weight:500}#chat-widget-root .font-semibold{font-weight:600}#chat-widget-root .uppercase{text-transform:uppercase}#chat-widget-root .lowercase{text-transform:lowercase}#chat-widget-root .italic{font-style:italic}#chat-widget-root .tabular-nums{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}#chat-widget-root .leading-5{line-height:1.25rem}#chat-widget-root .leading-none{line-height:1}#chat-widget-root .leading-normal{line-height:1.5}#chat-widget-root .leading-relaxed{line-height:1.625}#chat-widget-root .leading-snug{line-height:1.375}#chat-widget-root .tracking-wide{letter-spacing:.025em}#chat-widget-root .text-\\[\\#4A5568\\]{--tw-text-opacity:1;color:rgb(74 85 104/var(--tw-text-opacity,1))}#chat-widget-root .text-amber-200{--tw-text-opacity:1;color:rgb(253 230 138/var(--tw-text-opacity,1))}#chat-widget-root .text-amber-800{--tw-text-opacity:1;color:rgb(146 64 14/var(--tw-text-opacity,1))}#chat-widget-root .text-current{color:currentColor}#chat-widget-root .text-gray-100{--tw-text-opacity:1;color:rgb(243 244 246/var(--tw-text-opacity,1))}#chat-widget-root .text-gray-200{--tw-text-opacity:1;color:rgb(229 231 235/var(--tw-text-opacity,1))}#chat-widget-root .text-gray-300{--tw-text-opacity:1;color:rgb(209 213 219/var(--tw-text-opacity,1))}#chat-widget-root .text-gray-400{--tw-text-opacity:1;color:rgb(156 163 175/var(--tw-text-opacity,1))}#chat-widget-root .text-gray-500{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity,1))}#chat-widget-root .text-gray-500\\/80{color:hsla(220,9%,46%,.8)}#chat-widget-root .text-gray-600{--tw-text-opacity:1;color:rgb(75 85 99/var(--tw-text-opacity,1))}#chat-widget-root .text-gray-700{--tw-text-opacity:1;color:rgb(55 65 81/var(--tw-text-opacity,1))}#chat-widget-root .text-gray-800{--tw-text-opacity:1;color:rgb(31 41 55/var(--tw-text-opacity,1))}#chat-widget-root .text-gray-900{--tw-text-opacity:1;color:rgb(17 24 39/var(--tw-text-opacity,1))}#chat-widget-root .text-green-500{--tw-text-opacity:1;color:rgb(34 197 94/var(--tw-text-opacity,1))}#chat-widget-root .text-red-500{--tw-text-opacity:1;color:rgb(239 68 68/var(--tw-text-opacity,1))}#chat-widget-root .text-slate-400{--tw-text-opacity:1;color:rgb(148 163 184/var(--tw-text-opacity,1))}#chat-widget-root .text-slate-500{--tw-text-opacity:1;color:rgb(100 116 139/var(--tw-text-opacity,1))}#chat-widget-root .text-status-error{color:hsl(var(--cw-status-error))}#chat-widget-root .text-status-success{color:hsl(var(--cw-status-success))}#chat-widget-root .text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity,1))}#chat-widget-root .text-yellow-400{--tw-text-opacity:1;color:rgb(250 204 21/var(--tw-text-opacity,1))}#chat-widget-root .underline{text-decoration-line:underline}#chat-widget-root .no-underline{text-decoration-line:none}#chat-widget-root .placeholder-gray-400::-moz-placeholder{--tw-placeholder-opacity:1;color:rgb(156 163 175/var(--tw-placeholder-opacity,1))}#chat-widget-root .placeholder-gray-400::placeholder{--tw-placeholder-opacity:1;color:rgb(156 163 175/var(--tw-placeholder-opacity,1))}#chat-widget-root .placeholder-gray-500::-moz-placeholder{--tw-placeholder-opacity:1;color:rgb(107 114 128/var(--tw-placeholder-opacity,1))}#chat-widget-root .placeholder-gray-500::placeholder{--tw-placeholder-opacity:1;color:rgb(107 114 128/var(--tw-placeholder-opacity,1))}#chat-widget-root .opacity-0{opacity:0}#chat-widget-root .opacity-50{opacity:.5}#chat-widget-root .opacity-60{opacity:.6}#chat-widget-root .opacity-70{opacity:.7}#chat-widget-root .opacity-75{opacity:.75}#chat-widget-root .opacity-80{opacity:.8}#chat-widget-root .shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color)}#chat-widget-root .shadow,#chat-widget-root .shadow-2xl{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}#chat-widget-root .shadow-2xl{--tw-shadow:0 25px 50px -12px rgba(0,0,0,.25);--tw-shadow-colored:0 25px 50px -12px var(--tw-shadow-color)}#chat-widget-root .shadow-lg{--tw-shadow:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -4px rgba(0,0,0,.1);--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color),0 4px 6px -4px var(--tw-shadow-color)}#chat-widget-root .shadow-lg,#chat-widget-root .shadow-md{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}#chat-widget-root .shadow-md{--tw-shadow:0 4px 6px -1px rgba(0,0,0,.1),0 2px 4px -2px rgba(0,0,0,.1);--tw-shadow-colored:0 4px 6px -1px var(--tw-shadow-color),0 2px 4px -2px var(--tw-shadow-color)}#chat-widget-root .shadow-sm{--tw-shadow:0 1px 2px 0 rgba(0,0,0,.05);--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color)}#chat-widget-root .shadow-sm,#chat-widget-root .shadow-xl{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}#chat-widget-root .shadow-xl{--tw-shadow:0 20px 25px -5px rgba(0,0,0,.1),0 8px 10px -6px rgba(0,0,0,.1);--tw-shadow-colored:0 20px 25px -5px var(--tw-shadow-color),0 8px 10px -6px var(--tw-shadow-color)}#chat-widget-root .shadow-black\\/20{--tw-shadow-color:rgba(0,0,0,.2);--tw-shadow:var(--tw-shadow-colored)}#chat-widget-root .shadow-gray-200\\/80{--tw-shadow-color:rgba(229,231,235,.8);--tw-shadow:var(--tw-shadow-colored)}#chat-widget-root .outline-none{outline:2px solid transparent;outline-offset:2px}#chat-widget-root .outline{outline-style:solid}#chat-widget-root .ring{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color)}#chat-widget-root .ring,#chat-widget-root .ring-2{box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}#chat-widget-root .ring-2{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color)}#chat-widget-root .ring-blue-100{--tw-ring-opacity:1;--tw-ring-color:rgb(219 234 254/var(--tw-ring-opacity,1))}#chat-widget-root .ring-blue-300{--tw-ring-opacity:1;--tw-ring-color:rgb(147 197 253/var(--tw-ring-opacity,1))}#chat-widget-root .ring-white{--tw-ring-opacity:1;--tw-ring-color:rgb(255 255 255/var(--tw-ring-opacity,1))}#chat-widget-root .blur{--tw-blur:blur(8px)}#chat-widget-root .blur,#chat-widget-root .drop-shadow{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}#chat-widget-root .drop-shadow{--tw-drop-shadow:drop-shadow(0 1px 2px rgba(0,0,0,.1)) drop-shadow(0 1px 1px rgba(0,0,0,.06))}#chat-widget-root .drop-shadow-md{--tw-drop-shadow:drop-shadow(0 4px 3px rgba(0,0,0,.07)) drop-shadow(0 2px 2px rgba(0,0,0,.06))}#chat-widget-root .drop-shadow-md,#chat-widget-root .drop-shadow-sm{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}#chat-widget-root .drop-shadow-sm{--tw-drop-shadow:drop-shadow(0 1px 1px rgba(0,0,0,.05))}#chat-widget-root .grayscale-\\[0\\.3\\]{--tw-grayscale:grayscale(0.3)}#chat-widget-root .filter,#chat-widget-root .grayscale-\\[0\\.3\\]{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}#chat-widget-root .backdrop-blur-sm{--tw-backdrop-blur:blur(4px);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}#chat-widget-root .transition{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1)}#chat-widget-root .transition-all{transition-duration:.15s;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1)}#chat-widget-root .transition-colors{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1)}#chat-widget-root .transition-opacity{transition-duration:.15s;transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1)}#chat-widget-root .transition-transform{transition-duration:.15s;transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1)}#chat-widget-root .duration-150{transition-duration:.15s}#chat-widget-root .duration-200{transition-duration:.2s}#chat-widget-root .duration-300{transition-duration:.3s}#chat-widget-root .duration-500{transition-duration:.5s}#chat-widget-root :is(#chat-widget-root .animate-in){animation:slideIn .3s ease-out}#chat-widget-root :is(#chat-widget-root .transition-all){transition-duration:.3s;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1)}#chat-widget-root .\\[font-family\\:inherit\\]{font-family:inherit}#chat-widget-root .placeholder\\:text-\\[\\#A2A9B2\\]::-moz-placeholder{--tw-text-opacity:1;color:rgb(162 169 178/var(--tw-text-opacity,1))}#chat-widget-root .placeholder\\:text-\\[\\#A2A9B2\\]::placeholder{--tw-text-opacity:1;color:rgb(162 169 178/var(--tw-text-opacity,1))}#chat-widget-root .placeholder\\:text-gray-500::-moz-placeholder{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity,1))}#chat-widget-root .placeholder\\:text-gray-500::placeholder{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity,1))}#chat-widget-root .hover\\:scale-105:hover{--tw-scale-x:1.05;--tw-scale-y:1.05}#chat-widget-root .hover\\:scale-105:hover,#chat-widget-root .hover\\:scale-110:hover{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}#chat-widget-root .hover\\:scale-110:hover{--tw-scale-x:1.1;--tw-scale-y:1.1}#chat-widget-root .hover\\:scale-\\[1\\.02\\]:hover{--tw-scale-x:1.02;--tw-scale-y:1.02;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}#chat-widget-root .hover\\:border-blue-400:hover{--tw-border-opacity:1;border-color:rgb(96 165 250/var(--tw-border-opacity,1))}#chat-widget-root .hover\\:border-blue-600:hover{--tw-border-opacity:1;border-color:rgb(37 99 235/var(--tw-border-opacity,1))}#chat-widget-root .hover\\:bg-blue-50:hover{--tw-bg-opacity:1;background-color:rgb(239 246 255/var(--tw-bg-opacity,1))}#chat-widget-root .hover\\:bg-blue-500\\/20:hover{background-color:rgba(59,130,246,.2)}#chat-widget-root .hover\\:bg-blue-900\\/50:hover{background-color:rgba(30,58,138,.5)}#chat-widget-root .hover\\:bg-gray-200:hover{--tw-bg-opacity:1;background-color:rgb(229 231 235/var(--tw-bg-opacity,1))}#chat-widget-root .hover\\:bg-gray-50:hover{--tw-bg-opacity:1;background-color:rgb(249 250 251/var(--tw-bg-opacity,1))}#chat-widget-root .hover\\:bg-gray-600:hover{--tw-bg-opacity:1;background-color:rgb(75 85 99/var(--tw-bg-opacity,1))}#chat-widget-root .hover\\:bg-gray-700:hover{--tw-bg-opacity:1;background-color:rgb(55 65 81/var(--tw-bg-opacity,1))}#chat-widget-root .hover\\:bg-red-600:hover{--tw-bg-opacity:1;background-color:rgb(220 38 38/var(--tw-bg-opacity,1))}#chat-widget-root .hover\\:bg-transparent:hover{background-color:transparent}#chat-widget-root .hover\\:text-blue-500:hover{--tw-text-opacity:1;color:rgb(59 130 246/var(--tw-text-opacity,1))}#chat-widget-root .hover\\:text-gray-200:hover{--tw-text-opacity:1;color:rgb(229 231 235/var(--tw-text-opacity,1))}#chat-widget-root .hover\\:text-gray-300:hover{--tw-text-opacity:1;color:rgb(209 213 219/var(--tw-text-opacity,1))}#chat-widget-root .hover\\:text-gray-600:hover{--tw-text-opacity:1;color:rgb(75 85 99/var(--tw-text-opacity,1))}#chat-widget-root .hover\\:text-gray-700:hover{--tw-text-opacity:1;color:rgb(55 65 81/var(--tw-text-opacity,1))}#chat-widget-root .hover\\:underline:hover{text-decoration-line:underline}#chat-widget-root .hover\\:opacity-80:hover{opacity:.8}#chat-widget-root .hover\\:opacity-90:hover{opacity:.9}#chat-widget-root .hover\\:shadow-md:hover{--tw-shadow:0 4px 6px -1px rgba(0,0,0,.1),0 2px 4px -2px rgba(0,0,0,.1);--tw-shadow-colored:0 4px 6px -1px var(--tw-shadow-color),0 2px 4px -2px var(--tw-shadow-color)}#chat-widget-root .hover\\:shadow-md:hover,#chat-widget-root .hover\\:shadow-xl:hover{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}#chat-widget-root .hover\\:shadow-xl:hover{--tw-shadow:0 20px 25px -5px rgba(0,0,0,.1),0 8px 10px -6px rgba(0,0,0,.1);--tw-shadow-colored:0 20px 25px -5px var(--tw-shadow-color),0 8px 10px -6px var(--tw-shadow-color)}#chat-widget-root .hover\\:grayscale-0:hover{--tw-grayscale:grayscale(0);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}#chat-widget-root .focus\\:\\!border-status-error:focus{border-color:hsl(var(--cw-status-error))!important}#chat-widget-root .focus\\:border-\\[\\#5A6069\\]:focus{--tw-border-opacity:1;border-color:rgb(90 96 105/var(--tw-border-opacity,1))}#chat-widget-root .focus\\:border-\\[\\#B0B0B0\\]:focus{--tw-border-opacity:1;border-color:rgb(176 176 176/var(--tw-border-opacity,1))}#chat-widget-root .focus\\:bg-white:focus{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))}#chat-widget-root .focus\\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}#chat-widget-root .focus\\:ring-0:focus{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(var(--tw-ring-offset-width)) var(--tw-ring-color)}#chat-widget-root .focus\\:ring-0:focus,#chat-widget-root .focus\\:ring-1:focus{box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}#chat-widget-root .focus\\:ring-1:focus{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color)}#chat-widget-root .focus\\:ring-gray-300:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(209 213 219/var(--tw-ring-opacity,1))}#chat-widget-root .focus\\:ring-gray-600:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(75 85 99/var(--tw-ring-opacity,1))}#chat-widget-root .focus-visible\\:outline-none:focus-visible{outline:2px solid transparent;outline-offset:2px}#chat-widget-root .focus-visible\\:ring-2:focus-visible{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}#chat-widget-root .focus-visible\\:ring-white\\/40:focus-visible{--tw-ring-color:hsla(0,0%,100%,.4)}#chat-widget-root .active\\:scale-95:active{--tw-scale-x:.95;--tw-scale-y:.95}#chat-widget-root .active\\:scale-95:active,#chat-widget-root .active\\:scale-\\[0\\.97\\]:active{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}#chat-widget-root .active\\:scale-\\[0\\.97\\]:active{--tw-scale-x:0.97;--tw-scale-y:0.97}#chat-widget-root .active\\:scale-\\[0\\.98\\]:active{--tw-scale-x:0.98;--tw-scale-y:0.98}#chat-widget-root .active\\:scale-\\[0\\.98\\]:active,#chat-widget-root .active\\:scale-\\[0\\.99\\]:active{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}#chat-widget-root .active\\:scale-\\[0\\.99\\]:active{--tw-scale-x:0.99;--tw-scale-y:0.99}#chat-widget-root .active\\:outline-none:active{outline:2px solid transparent;outline-offset:2px}#chat-widget-root .active\\:ring-0:active{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}#chat-widget-root .disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}#chat-widget-root .disabled\\:opacity-40:disabled{opacity:.4}#chat-widget-root .disabled\\:opacity-50:disabled{opacity:.5}#chat-widget-root .disabled\\:shadow-none:disabled{--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}#chat-widget-root :is(.group:hover .group-hover\\:scale-100){--tw-scale-x:1;--tw-scale-y:1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}#chat-widget-root :is(.group:hover .group-hover\\:opacity-100){opacity:1}#chat-widget-root .dark\\:text-gray-300:is(.dark *){--tw-text-opacity:1;color:rgb(209 213 219/var(--tw-text-opacity,1))}#chat-widget-root .dark\\:text-gray-400:is(.dark *){--tw-text-opacity:1;color:rgb(156 163 175/var(--tw-text-opacity,1))}@media (min-width:768px){#chat-widget-root .md\\:text-sm{font-size:.875rem;line-height:1.25rem}}#chat-widget-root .rtl\\:rounded-tl-2xl:where([dir=rtl],[dir=rtl] *){border-top-left-radius:1rem}#chat-widget-root .rtl\\:rounded-tr-sm:where([dir=rtl],[dir=rtl] *){border-top-right-radius:.125rem}#chat-widget-root .\\[\\&\\:first-child\\]\\:\\!mt-0:first-child{margin-top:0!important}#chat-widget-root :is(.\\[\\&\\>\\*\\:first-child\\]\\:\\!mt-0>:first-child){margin-top:0!important}#chat-widget-root :is(.\\[\\&\\>\\*\\:last-child\\]\\:\\!mb-0>:last-child){margin-bottom:0!important}\n.chat-widget-root{position:fixed;z-index:999999}.chat-widget-container{color:var(--cw-text-color,inherit);font-family:var(\n --cw-font-family,-apple-system,BlinkMacSystemFont,"Segoe UI","Roboto","Oxygen","Ubuntu","Cantarell","Fira Sans","Droid Sans","Helvetica Neue",sans-serif\n )}#chat-widget-root .chat-messages p{overflow-wrap:anywhere;word-break:break-word}textarea#chat-widget-input::-moz-placeholder{border:none;line-height:48px;outline:none}textarea#chat-widget-input::placeholder{border:none;line-height:48px;outline:none}textarea#chat-widget-input{border:none;line-height:48px;outline:none}@keyframes slideIn{0%{opacity:0;transform:translateY(10px)}to{opacity:1;transform:translateY(0)}}@keyframes bounce{0%,to{transform:translateY(0)}50%{transform:translateY(-5px)}}#chat-widget-root .scrollbar-hide{-ms-overflow-style:none;scrollbar-width:none}#chat-widget-root .scrollbar-hide::-webkit-scrollbar{display:none}#chat-widget-root .slim-scrollbar-x{scrollbar-width:thin}#chat-widget-root .slim-scrollbar-x::-webkit-scrollbar{height:3px!important}#chat-widget-root .slim-scrollbar-x::-webkit-scrollbar-track{background:transparent!important}#chat-widget-root .slim-scrollbar-x::-webkit-scrollbar-thumb{background:#d1d5db!important;border-radius:2px!important}#chat-widget-root .slim-scrollbar-x::-webkit-scrollbar-thumb:hover{background:#9ca3af!important}@media print{.chat-widget-root{display:none!important}}',n.appendChild(i);const s=document.createElement("div");s.id="chat-widget-mount",n.appendChild(s),a.current=t.createRoot(s)},[]),e.useEffect(()=>{a.current?.render(e.createElement(zn,r))}),e.useEffect(()=>()=>{const e=a.current;a.current=null,queueMicrotask(()=>e?.unmount())},[]),n.jsx("div",{ref:o,id:"chat-widget-host"})}});