@chatsystem/client 1.1.80 → 1.1.82

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const C=require("react/jsx-runtime"),v=require("react"),In=require("react-dom"),Dc=require("lottie-react"),Pc=require("@lottiefiles/dotlottie-react");function Mc(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const Be=Mc(v),Do=e=>Be.createElement("svg",{fill:"#000000",height:"800px",width:"800px",id:"Layer_1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",viewBox:"0 0 330 330",xmlSpace:"preserve",...e},Be.createElement("path",{id:"XMLID_102_",d:"M325.607,79.393c-5.857-5.857-15.355-5.858-21.213,0.001l-139.39,139.393L25.607,79.393 c-5.857-5.857-15.355-5.858-21.213,0.001c-5.858,5.858-5.858,15.355,0,21.213l150.004,150c2.813,2.813,6.628,4.393,10.606,4.393 s7.794-1.581,10.606-4.394l149.996-150C331.465,94.749,331.465,85.251,325.607,79.393z"}));function sa(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var _t={},Fa;function Bc(){if(Fa)return _t;Fa=1,Object.defineProperty(_t,"__esModule",{value:!0}),_t.OutputStreamTypesEnum=_t.AgentDisplayFacetRoleType=_t.AgentDisplayFacetModeType=void 0;var e;(function(r){r.SPRITESHEET="spritesheet",r.LOTTIE="lottie",r.IMAGE="image",r.SVG="svg",r.VIDEO="video"})(e||(_t.AgentDisplayFacetModeType=e={}));var t;(function(r){r.LAUNCHER="launcher",r.ASSISTANT="assistant",r.SEARCH="search"})(t||(_t.AgentDisplayFacetRoleType=t={}));var n;return(function(r){r.OUTPUT_STREAM_MESSAGE_START="message_start",r.OUTPUT_STREAM_MESSAGE_DELTA="message_delta",r.OUTPUT_STREAM_MESSAGE_END="message_end",r.OUTPUT_STREAM_NUMBER_OF_STEPS_TYPE="number_of_steps",r.OUTPUT_STREAM_CURRENT_STEP_NUMBER_TYPE="current_step_number",r.OUTPUT_STREAM_CURRENT_STEP_NAME_TYPE="current_step_name",r.OUTPUT_STREAM_ERROR="error"})(n||(_t.OutputStreamTypesEnum=n={})),_t}var ke=Bc();const Vr=e=>({mode:ke.AgentDisplayFacetModeType.SVG,role:e}),Fc=()=>({agent:{display:{name:"",CSSRules:"",[ke.AgentDisplayFacetRoleType.LAUNCHER]:Vr(ke.AgentDisplayFacetRoleType.LAUNCHER),[ke.AgentDisplayFacetRoleType.ASSISTANT]:Vr(ke.AgentDisplayFacetRoleType.ASSISTANT),[ke.AgentDisplayFacetRoleType.SEARCH]:Vr(ke.AgentDisplayFacetRoleType.SEARCH)},text:{initialText:""},customNameToDisplay:"",isAudioAllowed:!0},api:{settings:{maxUserMessagesPerDiscussion:20},tracking:{queryParamToAppend:""}}}),Pt=v.createContext({companySettings:Fc(),setCompanySettings:()=>{}}),oa=()=>{const e=typeof document<"u"&&new URL(document.URL)?.host.includes("localhost:3080"),t=typeof document<"u"&&new URL(document.URL)?.host.includes("localhost:5173");return e||t};class Po{enabled;constructor({isLocalDev:t,shouldDisplayLogs:n}){this.enabled=t||n}log(...t){this.enabled&&console.log(...t)}warn(...t){this.enabled&&console.warn(...t)}error(...t){this.enabled&&console.error(...t)}}let Mo=new Po({isLocalDev:oa(),shouldDisplayLogs:!1});const Hc=e=>new Po({isLocalDev:oa(),shouldDisplayLogs:!!e}),Uc=e=>{Mo=e},Tt=()=>Mo,hn=globalThis;hn.__WIDGET_ASSET_CACHE__||(hn.__WIDGET_ASSET_CACHE__={svg:new Map,img:new Map,lot:new Map,spr:new Map});hn.__WIDGET_PRELOAD_KEYS__||(hn.__WIDGET_PRELOAD_KEYS__=new Set);const qr=hn.__WIDGET_PRELOAD_KEYS__,Dt=hn.__WIDGET_ASSET_CACHE__,jc="widget-assets-v1";async function Nr(e,t){const n=Tt();try{const r=await caches.open(jc),i=await r.match(e,{ignoreSearch:!1});if(i)return i.clone();const a=await fetch(e,{cache:"force-cache",mode:"cors",keepalive:!0,...t});if(!a.ok)throw new Error(`HTTP ${a.status} for ${e}`);return r.put(e,a.clone()),a}catch(r){return n.warn("error while fetching",r),new Response(null,{status:520,statusText:"Error in client - Fetch failed"})}}async function Bo(e){const t=Dt.svg.get(e);if(t)return t.promise;const n=(async()=>{const i=await(await Nr(e)).text();if(typeof globalThis.DOMPurify<"u"&&typeof globalThis.DOMPurify.sanitize=="function")try{const s=new DOMParser().parseFromString(i,"image/svg+xml"),o=new XMLSerializer().serializeToString(s.documentElement);return{sanitized:globalThis.DOMPurify.sanitize(o,{USE_PROFILES:{svg:!0,svgFilters:!0}})}}catch{return{sanitized:globalThis.DOMPurify.sanitize(i,{USE_PROFILES:{svg:!0,svgFilters:!0}})}}else return{sanitized:i}})();return Dt.svg.set(e,{promise:n,ts:Date.now()}),n}function Fo(e){const t=Dt.img.get(e);if(t)return t.promise;const n=(async()=>{const i=await(await Nr(e)).blob();return{blobUrl:URL.createObjectURL(i)}})();return Dt.img.set(e,{promise:n,ts:Date.now()}),n}function Ho(e){const t=Dt.lot.get(e);if(t)return t.promise;const n=(async()=>{const i=await(await Nr(e)).arrayBuffer(),a=new Uint8Array(i);if(a.length>=4&&a[0]===80&&a[1]===75&&a[2]===3&&a[3]===4||e.endsWith(".lottie"))return{kind:"zip",blobUrl:URL.createObjectURL(new Blob([i],{type:"application/zip"}))};const o=new TextDecoder().decode(a);return{kind:"json",data:JSON.parse(o)}})();return Dt.lot.set(e,{promise:n,ts:Date.now()}),n}function Uo(e){const t=Dt.spr.get(e);if(t)return t.promise;const n=(async()=>{const i=await(await Nr(e)).blob();let a=null;try{a=await createImageBitmap(i)}catch{a=null}const{imgEl:s,width:o,height:u}=await new Promise((c,d)=>{const f=URL.createObjectURL(i),m=new Image;m.crossOrigin="anonymous",m.onload=()=>{const h=m.naturalWidth,b=m.naturalHeight;c({imgEl:m,width:h,height:b})},m.onerror=()=>{URL.revokeObjectURL(f),d(new Error("Spritesheet image decode failed"))},m.src=f,m.decode?.().catch(()=>{})});return{imgEl:s,bitmap:a,width:o,height:u}})();return Dt.spr.set(e,{promise:n,ts:Date.now()}),n}function zc(e){e.images?.forEach(t=>void Fo(t)),e.svgs?.forEach(t=>void Bo(t)),e.lotties?.forEach(t=>void Ho(t)),e.sprites?.forEach(t=>void Uo(t))}function $c(e){const t=Tt();try{const n=document.createElement("link");n.rel="preconnect",n.href=e,n.crossOrigin="anonymous",document.head.appendChild(n);const r=document.createElement("link");r.rel="dns-prefetch",r.href=e,document.head.appendChild(r)}catch(n){t.warn("error in injectPreconnect",n)}}function jo(e){return new URL(e,document.baseURI).toString()}function Yc(e,t){const n=document.head.querySelectorAll('link[rel="preload"]');for(const r of n)if((e?r.as===e||r.getAttribute("as")===e:!0)&&r.href===t)return!0;return!1}function Zn(e,t,n,r){const i=jo(n),a=`${e}|${t??""}|${i}`;if(qr.has(a))return;if(Yc(t,i)){qr.add(a);return}const s=document.createElement("link");s.rel=e,t&&(s.as=t),s.href=i,s.crossOrigin="anonymous",r&&(s.type=r),s.setAttribute("data-chatsystem-preload","1"),document.head.appendChild(s),qr.add(a)}function Gc(e){const t=s=>Array.from(new Set((s??[]).map(jo))),n=t(e.images),r=t(e.svgs),i=t(e.lotties),a=t(e.sprites);n.forEach(s=>Zn("preload","image",s)),r.forEach(s=>Zn("preload","fetch",s,"image/svg+xml")),i.forEach(s=>Zn("preload","fetch",s,"application/zip")),a.forEach(s=>Zn("preload","fetch",s))}const Vc=({src:e})=>{const[t,n]=v.useState(null);return v.useEffect(()=>{let r=!1;return Fo(e).then(({blobUrl:i})=>{n(i)}).catch(()=>n(null)),()=>{t&&!r&&(URL.revokeObjectURL(t),r=!0)}},[e]),C.jsx("img",{src:t??e,decoding:"async",loading:"eager"})};function qc(e){return!!e&&typeof e=="object"&&"blob"in e&&e.blob instanceof Blob}function Wc({src:e,autoplay:t=!0,loop:n=!0,className:r,style:i,placeholder:a,fallback:s,onLoaded:o,onError:u}){const[c,d]=v.useState({kind:"loading"});return v.useEffect(()=>{let f=null,m=!1;return d({kind:"loading"}),Ho(e).then(async h=>{if(!m)if(h.kind==="zip"){const b=qc(h)?h.blob:await(await fetch(h.blobUrl)).blob();f=URL.createObjectURL(b),d({kind:"lottieZip",blobUrl:f}),o?.(f)}else d({kind:"json",data:h.data}),o?.(h.data)}).catch(h=>!m&&(d({kind:"error",err:h}),u?.(h))),()=>{m=!0,f&&URL.revokeObjectURL(f)}},[e]),c.kind==="loading"?C.jsx("div",{className:"flex items-center justify-center rounded-xl border border-dashed p-6 text-sm opacity-70 "+(r??""),style:{minHeight:96,...i},children:a??"Loading animation…"}):c.kind==="error"?C.jsx("div",{className:"flex items-center justify-center rounded-xl border p-6 text-sm text-red-600 "+(r??""),style:{minHeight:96,...i},children:s??"Failed to load animation"}):c.kind==="json"?C.jsx(Dc,{animationData:c.data,loop:n,autoplay:t,className:r,style:i,rendererSettings:{preserveAspectRatio:"xMidYMid meet"}}):C.jsx(Pc.DotLottieReact,{src:c.blobUrl,loop:n,autoplay:t,className:r,style:i})}async function Xc(e,t={}){const{minPeriod:n=8,maxPeriod:r=Math.floor(Math.min(e.width,e.height)/2),gutterSearchRadius:i=3,debug:a=!1}=t,s=Tt();if(e.width<n*2||e.height<n*2)return a&&s.warn("detectGrid: image too small"),null;const o=document.createElement("canvas");o.width=e.naturalWidth,o.height=e.naturalHeight;const u=o.getContext("2d");if(!u)return null;u.drawImage(e,0,0);const{data:c}=u.getImageData(0,0,o.width,o.height),d=o.width,f=o.height,m=new Uint8ClampedArray(d*f);for(let M=0;M<f;M++){let $=M*d;for(let U=0;U<d;U++){const z=($+U)*4;m[$+U]=.299*c[z]+.587*c[z+1]+.114*c[z+2]|0}}const h=new Float32Array(d),b=new Float32Array(f);for(let M=1;M<d-1;M++){let $=0;for(let U=0;U<f;U++){const z=U*d+M,Q=m[z+1]-m[z-1];$+=Math.abs(Q)}h[M]=$}for(let M=1;M<f-1;M++){let $=0;for(let U=0;U<d;U++){const z=M*d+U,Q=m[z+d]-m[z-d];$+=Math.abs(Q)}b[M]=$}const A=Ha(h,n,Math.min(r,d/2)),w=Ha(b,n,Math.min(r,f/2));if(!A||!w)return a&&s.warn("detectGrid: could not find periods"),null;const y=Math.max(1,Math.round(d/A)),_=Math.max(1,Math.round(f/w)),S=Ua(h,A,y,i),D=Ua(b,w,_,i),I=Math.max(1,A-S),N=Math.max(1,w-D);if(I*y>d+2||N*_>f+2)return a&&s.warn("detectGrid: sanity check failed"),null;const G=Ii(h,60),se=Ii(b,60),ee=Math.max(0,ja(h,G)),k=Math.max(0,ja(b,se));return a&&s.log({periodX:A,periodY:w,columns:y,rows:_,gutterX:S,gutterY:D,frameWidth:I,frameHeight:N,originX:ee,originY:k}),{columns:y,rows:_,frameWidth:I,frameHeight:N,gutterX:S,gutterY:D,originX:ee,originY:k}}function Ha(e,t,n){const r=zo(e);let i=0;for(let h=0;h<e.length;h++){const b=e[h]-r;i+=b*b}if(i===0)return null;const a=new Float32Array(n+1);let s=0,o=-1/0;for(let h=t;h<=n;h++){let b=0;for(let w=0;w+h<e.length;w++)b+=(e[w]-r)*(e[w+h]-r);const A=b/i;a[h]=A,A>o&&(o=A,s=h)}if(s<=t||s>=n)return s||null;const u=a[s-1],c=a[s],d=a[s+1],f=u-2*c+d,m=f===0?0:.5*(u-d)/f;return s+m}function Ua(e,t,n,r){const i=[];for(let o=1;o<n;o++){const u=o*t;let c=1/0,d=u;for(let f=-r;f<=r;f++){const m=u+f;if(m<=0||m>=e.length)continue;const h=e[m];h<c&&(c=h,d=m)}i.push(d)}if(i.length<1)return 0;let a=[];for(const o of i){const u=e[o]*1.5+Ii(e,10)*.5;let c=o,d=o;for(;c>1&&e[c-1]<=u;)c--;for(;d<e.length-2&&e[d+1]<=u;)d++;a.push(Math.max(0,d-c+1))}const s=Math.round(zo(a));return Math.max(0,Math.min(s,Math.floor(t/4)))}function zo(e){let t=0;for(let n=0;n<e.length;n++)t+=e[n];return t/e.length}function Ii(e,t){const n=Array.from(e);n.sort((i,a)=>i-a);const r=Math.max(0,Math.min(n.length-1,Math.floor(t/100*n.length)));return n[r]}function ja(e,t){for(let n=0;n<e.length;n++)if(e[n]>t)return n;return 0}function Qc(e,t,n,r,i){const{data:a}=e.getImageData(t,n,r,i);let s=0;for(let o=3;o<a.length;o+=4)s+=a[o];return s/(255*(a.length/4))<.03}const $o=v.createContext(Tt()),Qt=()=>v.useContext($o),Kc=v.forwardRef(function({src:t,frameWidth:n,frameHeight:r,columns:i,rows:a,gutterX:s=0,gutterY:o=0,frameCount:u,atlasFrames:c,fps:d=12,autoplay:f=!0,loop:m=!0,startFrame:h=0,direction:b="forward",scale:A=1,backgroundColor:w,className:y,style:_,pauseWhenHidden:S=!1,originX:D,originY:I,onLoad:N,onEnd:G,onFrame:se},ee){const k=Qt(),M=v.useRef(null),$=v.useRef(null),[U,z]=v.useState(null),[Q,he]=v.useState(null),[Ee,Le]=v.useState(null),[Re,g]=v.useState(!1),[j,J]=v.useState(!!f),[T,K]=v.useState(h),ne=v.useRef(1),[W,ae]=v.useState(null),re=Math.max(1,Math.floor(typeof window<"u"&&window.devicePixelRatio||1));v.useEffect(()=>{let me=!1;return g(!1),Uo(t).then(({imgEl:we,bitmap:ye})=>{me||(z(we),he(ye),Le({w:we.naturalWidth,h:we.naturalHeight}),g(!0),N?.())}).catch(()=>{}),()=>{me=!0}},[t,N]),v.useEffect(()=>{let me=!1;return(async()=>{if(!U)return;if(c&&c.length){ae(null);return}if(!(!n||!r||!i||!a)){ae(null);return}const ye=await Xc(U,{debug:!0});me||(ye?ae({frameWidth:ye.frameWidth,frameHeight:ye.frameHeight,columns:ye.columns,rows:ye.rows,gutterX:ye.gutterX,gutterY:ye.gutterY}):(ae(null),k.warn("RemoteSpritesheet: auto-detect failed; please provide grid props.")))})(),()=>{me=!0}},[U,c,n,r,i,a,k]);const oe=W?.frameWidth??n,ie=W?.frameHeight??r,Se=W?.columns??i,Y=W?.rows??a,Ne=W?.gutterX??s,$e=W?.gutterY??o,lt=W?.originX??D??0,wt=W?.originY??I??0,nn=v.useMemo(()=>{if(c&&c.length>0)return{cols:0,rows:0};if(!Ee||!oe||!ie)return{cols:0,rows:0};const me=Se??Math.floor((Ee.w+Ne)/(oe+Ne)),we=Y??Math.floor((Ee.h+$e)/(ie+$e));return{cols:Math.max(0,me),rows:Math.max(0,we)}},[c,Ee,oe,ie,Se,Y,Ne,$e]),He=v.useMemo(()=>{if(c?.length)return c;if(!oe||!ie)return[];const{cols:me,rows:we}=nn;if(!me||!we)return[];const ye=Math.min(u??me*we,me*we),V=[];for(let L=0;L<ye;L++){const P=L%me,q=Math.floor(L/me),Z=lt+P*(oe+Ne),fe=wt+q*(ie+$e);V.push({x:Z,y:fe,w:oe,h:ie})}if(U&&V.length){const L=document.createElement("canvas");L.width=U.naturalWidth,L.height=U.naturalHeight;const P=L.getContext("2d");if(P){P.drawImage(U,0,0);let q=V.length;for(;q>0&&Qc(P,V[q-1].x,V[q-1].y,V[q-1].w,V[q-1].h);)q--;return V.slice(0,q)}}return V},[c,nn,u,oe,ie,Ne,$e,U,lt,wt]),rn=()=>{const me=M.current;if(!me||He.length===0)return;const we=He[Math.max(0,Math.min(T,He.length-1))],ye=Math.max(1,Math.round(we.w*A)),V=Math.max(1,Math.round(we.h*A));me.style.width=ye+"px",me.style.height=V+"px",me.width=ye*re,me.height=V*re};v.useEffect(()=>{rn()},[Re,A,He.length,re,T]);const vt=me=>{const we=Q??U??null,ye=M.current;if(!ye||!we||He.length===0)return;const V=ye.getContext("2d");if(!V)return;V.save(),V.setTransform(1,0,0,1,0,0),V.clearRect(0,0,ye.width,ye.height),w&&(V.fillStyle=w,V.fillRect(0,0,ye.width,ye.height));const L=He[me];V.scale(re,re),V.drawImage(we,L.x,L.y,L.w,L.h,0,0,Math.round(L.w*A),Math.round(L.h*A)),V.restore()};return v.useEffect(()=>{if(!Re||He.length===0)return;let me=performance.now();const we=1e3/Math.max(1,Math.min(120,d)),ye=V=>{if($.current=requestAnimationFrame(ye),!j){vt(T);return}const L=V-me;if(L<we){vt(T);return}me=V-L%we,K(P=>{const q=He.length-1;let Z=P;return b==="forward"?Z=P+1:b==="backward"?Z=P-1:((P>=q&&ne.current===1||P<=0&&ne.current===-1)&&(ne.current*=-1),Z=P+ne.current),(Z>q||Z<0)&&(m?Z=b==="backward"?q:0:(Z=Math.max(0,Math.min(Z,q)),J(!1),G?.())),Z})};return $.current=requestAnimationFrame(ye),()=>{$.current&&cancelAnimationFrame($.current)}},[Re,d,j,m,b,He.length,T]),v.useEffect(()=>{vt(T),se?.(T)},[T,Re,A,re]),v.useEffect(()=>{if(!S)return;const me=()=>{document.hidden&&J(!1)};return document.addEventListener("visibilitychange",me),()=>document.removeEventListener("visibilitychange",me)},[S]),v.useImperativeHandle(ee,()=>({play:()=>J(!0),pause:()=>J(!1),toggle:()=>J(me=>!me),gotoFrame:me=>K(()=>Math.max(0,Math.min(me,Math.max(0,He.length-1)))),isPlaying:()=>j,currentFrame:()=>T}),[j,T,He.length]),C.jsx("div",{className:y,style:_,children:C.jsx("canvas",{ref:M,"aria-label":"spritesheet animation"})})});function Jc({url:e,className:t}){const[n,r]=v.useState(""),[i,a]=v.useState(null);return v.useEffect(()=>{let s=!1;return Bo(e).then(({sanitized:o})=>{s||(r(o),a(null))}).catch(o=>!s&&a(o.message??"Failed to load")),()=>{s=!0}},[e]),i?C.jsxs("div",{className:t,role:"alert",children:["Couldn’t load SVG: ",i]}):n?C.jsx("div",{className:t,dangerouslySetInnerHTML:{__html:n}}):C.jsx("div",{className:t})}function Zc({mobile:e=.6,tablet:t=.8,desktop:n=1}){const[r,i]=v.useState(n);return v.useEffect(()=>{if(typeof window>"u")return;const a=[{mq:window.matchMedia("(max-width: 639px)"),value:e},{mq:window.matchMedia("(min-width: 640px) and (max-width: 1023px)"),value:t},{mq:window.matchMedia("(min-width: 1024px)"),value:n}],s=()=>{for(const{mq:o,value:u}of a)if(o.matches){i(u);break}};return a.forEach(({mq:o})=>o.addEventListener("change",s)),s(),()=>{a.forEach(({mq:o})=>o.removeEventListener("change",s))}},[e,t,n]),r}const ua=({facet:e})=>{const t=Qt(),{mode:n,assetUrl:r,spr_columns:i,spr_fps:a,spr_frameCount:s,spr_frameHeight:o,spr_frameWidth:u,spr_gutterX:c,spr_gutterY:d,spr_rows:f,spr_originX:m,spr_originY:h,spr_scaleDesktop:b,spr_scaleMobile:A,spr_scaleTablet:w}=e,y=Zc({mobile:A??.6,tablet:w??.8,desktop:b??1});return C.jsxs("div",{className:"assetContainer",children:[n===ke.AgentDisplayFacetModeType.LOTTIE&&C.jsx(Wc,{src:r,autoplay:!0,onError:_=>t.error(_)}),n===ke.AgentDisplayFacetModeType.SVG&&C.jsx("div",{children:C.jsx(Jc,{url:r})}),n===ke.AgentDisplayFacetModeType.IMAGE&&C.jsx(Vc,{src:r}),n===ke.AgentDisplayFacetModeType.SPRITESHEET&&C.jsx(Kc,{src:r,frameCount:s,columns:i,rows:f,fps:a,frameHeight:o,frameWidth:u,gutterX:c,gutterY:d,originX:m,originY:h,scale:y,autoplay:!0})]})},ed=({isWidgetOpen:e,setIsWidgetOpen:t})=>{const{companySettings:n}=v.useContext(Pt);return C.jsxs("div",{className:`launcher
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const S=require("react/jsx-runtime"),C=require("react"),Mn=require("react-dom"),Od=require("lottie-react"),Rd=require("@lottiefiles/dotlottie-react");function Ld(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const ze=Ld(C),su=e=>ze.createElement("svg",{fill:"#000000",height:"800px",width:"800px",id:"Layer_1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",viewBox:"0 0 330 330",xmlSpace:"preserve",...e},ze.createElement("path",{id:"XMLID_102_",d:"M325.607,79.393c-5.857-5.857-15.355-5.858-21.213,0.001l-139.39,139.393L25.607,79.393 c-5.857-5.857-15.355-5.858-21.213,0.001c-5.858,5.858-5.858,15.355,0,21.213l150.004,150c2.813,2.813,6.628,4.393,10.606,4.393 s7.794-1.581,10.606-4.394l149.996-150C331.465,94.749,331.465,85.251,325.607,79.393z"}));function ya(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ai={},us;function Dd(){return us||(us=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.formatCustomerSupportProviderText=e.OutputStreamTypesEnum=e.DIRECT_CHAT_CUSTOMER_SUPPORT_BUSINESS_HOURS_DEFAULT_OPEN_WEEK_DAY_NUMBERS=e.DIRECT_CHAT_CUSTOMER_SUPPORT_BUSINESS_HOURS_WEEK_DAYS=e.DIRECT_CHAT_CUSTOMER_SUPPORT_DEFAULT_BUSINESS_HOURS_TIMEZONE=e.DIRECT_CHAT_CUSTOMER_SUPPORT_FALLBACK_CONTACT_CAPTURE_DEFAULT_TIMEOUT_MINUTES=e.readOptionalNullableString=e.readOptionalString=e.readOptionalNullableNumber=e.readOptionalNumber=e.isUnknownRecord=e.INTERACTIVE_WIDGET_TYPES=e.INTERACTIVE_WIDGET_EVENTS=e.AgentDisplayFacetRoleType=e.AgentDisplayFacetModeType=void 0;var t;(function(h){h.SPRITESHEET="spritesheet",h.LOTTIE="lottie",h.IMAGE="image",h.SVG="svg",h.VIDEO="video"})(t||(e.AgentDisplayFacetModeType=t={}));var n;(function(h){h.LAUNCHER="launcher",h.ASSISTANT="assistant",h.SEARCH="search"})(n||(e.AgentDisplayFacetRoleType=n={})),e.INTERACTIVE_WIDGET_EVENTS={requested:"interactiveWidget.requested"},e.INTERACTIVE_WIDGET_TYPES={directChatCustomerSupport:"direct_chat_customer_support"};const r=h=>typeof h=="object"&&h!==null&&!Array.isArray(h);e.isUnknownRecord=r;const i=h=>typeof h=="number"&&Number.isFinite(h)?h:void 0;e.readOptionalNumber=i;const a=h=>h===null?null:(0,e.readOptionalNumber)(h);e.readOptionalNullableNumber=a;const s=h=>typeof h=="string"?h:void 0;e.readOptionalString=s;const o=h=>h===null?null:(0,e.readOptionalString)(h);e.readOptionalNullableString=o,e.DIRECT_CHAT_CUSTOMER_SUPPORT_FALLBACK_CONTACT_CAPTURE_DEFAULT_TIMEOUT_MINUTES=5,e.DIRECT_CHAT_CUSTOMER_SUPPORT_DEFAULT_BUSINESS_HOURS_TIMEZONE="Europe/Paris",e.DIRECT_CHAT_CUSTOMER_SUPPORT_BUSINESS_HOURS_WEEK_DAYS=[{dayOfWeek:1,key:"monday",defaultLabel:"Monday"},{dayOfWeek:2,key:"tuesday",defaultLabel:"Tuesday"},{dayOfWeek:3,key:"wednesday",defaultLabel:"Wednesday"},{dayOfWeek:4,key:"thursday",defaultLabel:"Thursday"},{dayOfWeek:5,key:"friday",defaultLabel:"Friday"},{dayOfWeek:6,key:"saturday",defaultLabel:"Saturday"},{dayOfWeek:7,key:"sunday",defaultLabel:"Sunday"}],e.DIRECT_CHAT_CUSTOMER_SUPPORT_BUSINESS_HOURS_DEFAULT_OPEN_WEEK_DAY_NUMBERS=[1,2,3,4,5];var u;(function(h){h.OUTPUT_STREAM_MESSAGE_START="message_start",h.OUTPUT_STREAM_MESSAGE_DELTA="message_delta",h.OUTPUT_STREAM_MESSAGE_END="message_end",h.OUTPUT_STREAM_CLIENT_EVENT="client_event",h.OUTPUT_STREAM_NUMBER_OF_STEPS_TYPE="number_of_steps",h.OUTPUT_STREAM_CURRENT_STEP_NUMBER_TYPE="current_step_number",h.OUTPUT_STREAM_CURRENT_STEP_NAME_TYPE="current_step_name",h.OUTPUT_STREAM_ERROR="error"})(u||(e.OutputStreamTypesEnum=u={}));const c={"+1":"👍",thumbsup:"👍","-1":"👎",thumbsdown:"👎",clap:"👏",wave:"👋",raised_hands:"🙌",pray:"🙏",muscle:"💪",ok_hand:"👌",point_up:"☝️",point_down:"👇",point_left:"👈",point_right:"👉",eyes:"👀",brain:"🧠",heart:"❤️",orange_heart:"🧡",yellow_heart:"💛",green_heart:"💚",blue_heart:"💙",purple_heart:"💜",broken_heart:"💔",fire:"🔥",tada:"🎉",sparkles:"✨",star:"⭐",white_check_mark:"✅",heavy_check_mark:"✔️",x:"❌",warning:"⚠️",information_source:"ℹ️",question:"❓",exclamation:"❗",bulb:"💡",memo:"📝",pushpin:"📌",paperclip:"📎",link:"🔗",lock:"🔒",unlock:"🔓",bell:"🔔",phone:"☎️",email:"✉️",incoming_envelope:"📨",package:"📦",truck:"🚚",moneybag:"💰",credit_card:"💳",gift:"🎁",shopping_bags:"🛍️",clock3:"🕒",hourglass_flowing_sand:"⏳",rocket:"🚀",smile:"😄",smiley:"😃",grinning:"😀",slightly_smiling_face:"🙂",wink:"😉",blush:"😊",relaxed:"☺️",heart_eyes:"😍",thinking_face:"🤔",neutral_face:"😐",confused:"😕",worried:"😟",cry:"😢",sob:"😭",sweat_smile:"😅",joy:"😂",rofl:"🤣",upside_down_face:"🙃",sunglasses:"😎",tada_face:"🥳",angry:"😠",rage:"😡",face_with_symbols_on_mouth:"🤬",scream:"😱",zipper_mouth_face:"🤐",skin_tone_2:"🏻",skin_tone_3:"🏼",skin_tone_4:"🏽",skin_tone_5:"🏾",skin_tone_6:"🏿"},d=h=>h.replace(/-/g,"_"),f=h=>h.replace(/:([a-zA-Z0-9_+\-]+):/g,(b,y)=>c[d(y)]??b),p=({text:h,provider:b})=>b==="slack"?f(h):h;e.formatCustomerSupportProviderText=p})(ai)),ai}var oe=Dd();const si=e=>({mode:oe.AgentDisplayFacetModeType.SVG,role:e}),Pd=()=>({interactiveWidgets:{available:[{widgetType:oe.INTERACTIVE_WIDGET_TYPES.directChatCustomerSupport,enabled:!0}]},agent:{display:{name:"",CSSRules:"",[oe.AgentDisplayFacetRoleType.LAUNCHER]:si(oe.AgentDisplayFacetRoleType.LAUNCHER),[oe.AgentDisplayFacetRoleType.ASSISTANT]:si(oe.AgentDisplayFacetRoleType.ASSISTANT),[oe.AgentDisplayFacetRoleType.SEARCH]:si(oe.AgentDisplayFacetRoleType.SEARCH)},text:{initialText:""},customNameToDisplay:"",isAudioAllowed:!0},api:{settings:{maxUserMessagesPerDiscussion:20},tracking:{queryParamToAppend:""}}}),nn=C.createContext({companySettings:Pd(),setCompanySettings:()=>{}}),xa=()=>{const e=typeof document<"u"&&new URL(document.URL)?.host.includes("localhost:3080"),t=typeof document<"u"&&new URL(document.URL)?.host.includes("localhost:5173");return e||t};class ou{enabled;constructor({isLocalDev:t,shouldDisplayLogs:n}){this.enabled=t||n}log(...t){this.enabled&&console.log(...t)}warn(...t){this.enabled&&console.warn(...t)}error(...t){this.enabled&&console.error(...t)}}let uu=new ou({isLocalDev:xa(),shouldDisplayLogs:!1});const Md=e=>new ou({isLocalDev:xa(),shouldDisplayLogs:!!e}),Bd=e=>{uu=e},Ct=()=>uu,En=globalThis;En.__WIDGET_ASSET_CACHE__||(En.__WIDGET_ASSET_CACHE__={svg:new Map,img:new Map,lot:new Map,spr:new Map});En.__WIDGET_PRELOAD_KEYS__||(En.__WIDGET_PRELOAD_KEYS__=new Set);const oi=En.__WIDGET_PRELOAD_KEYS__,Ht=En.__WIDGET_ASSET_CACHE__,Fd="widget-assets-v1";async function Br(e,t){const n=Ct();try{const r=await caches.open(Fd),i=await r.match(e,{ignoreSearch:!1});if(i)return i.clone();const a=await fetch(e,{cache:"force-cache",mode:"cors",keepalive:!0,...t});if(!a.ok)throw new Error(`HTTP ${a.status} for ${e}`);return r.put(e,a.clone()),a}catch(r){return n.warn("error while fetching",r),new Response(null,{status:520,statusText:"Error in client - Fetch failed"})}}async function lu(e){const t=Ht.svg.get(e);if(t)return t.promise;const n=(async()=>{const i=await(await Br(e)).text();if(typeof globalThis.DOMPurify<"u"&&typeof globalThis.DOMPurify.sanitize=="function")try{const s=new DOMParser().parseFromString(i,"image/svg+xml"),o=new XMLSerializer().serializeToString(s.documentElement);return{sanitized:globalThis.DOMPurify.sanitize(o,{USE_PROFILES:{svg:!0,svgFilters:!0}})}}catch{return{sanitized:globalThis.DOMPurify.sanitize(i,{USE_PROFILES:{svg:!0,svgFilters:!0}})}}else return{sanitized:i}})();return Ht.svg.set(e,{promise:n,ts:Date.now()}),n}function cu(e){const t=Ht.img.get(e);if(t)return t.promise;const n=(async()=>{const i=await(await Br(e)).blob();return{blobUrl:URL.createObjectURL(i)}})();return Ht.img.set(e,{promise:n,ts:Date.now()}),n}function du(e){const t=Ht.lot.get(e);if(t)return t.promise;const n=(async()=>{const i=await(await Br(e)).arrayBuffer(),a=new Uint8Array(i);if(a.length>=4&&a[0]===80&&a[1]===75&&a[2]===3&&a[3]===4||e.endsWith(".lottie"))return{kind:"zip",blobUrl:URL.createObjectURL(new Blob([i],{type:"application/zip"}))};const o=new TextDecoder().decode(a);return{kind:"json",data:JSON.parse(o)}})();return Ht.lot.set(e,{promise:n,ts:Date.now()}),n}function fu(e){const t=Ht.spr.get(e);if(t)return t.promise;const n=(async()=>{const i=await(await Br(e)).blob();let a=null;try{a=await createImageBitmap(i)}catch{a=null}const{imgEl:s,width:o,height:u}=await new Promise((c,d)=>{const f=URL.createObjectURL(i),p=new Image;p.crossOrigin="anonymous",p.onload=()=>{const h=p.naturalWidth,b=p.naturalHeight;c({imgEl:p,width:h,height:b})},p.onerror=()=>{URL.revokeObjectURL(f),d(new Error("Spritesheet image decode failed"))},p.src=f,p.decode?.().catch(()=>{})});return{imgEl:s,bitmap:a,width:o,height:u}})();return Ht.spr.set(e,{promise:n,ts:Date.now()}),n}function Hd(e){e.images?.forEach(t=>void cu(t)),e.svgs?.forEach(t=>void lu(t)),e.lotties?.forEach(t=>void du(t)),e.sprites?.forEach(t=>void fu(t))}function Ud(e){const t=Ct();try{const n=document.createElement("link");n.rel="preconnect",n.href=e,n.crossOrigin="anonymous",document.head.appendChild(n);const r=document.createElement("link");r.rel="dns-prefetch",r.href=e,document.head.appendChild(r)}catch(n){t.warn("error in injectPreconnect",n)}}function hu(e){return new URL(e,document.baseURI).toString()}function jd(e,t){const n=document.head.querySelectorAll('link[rel="preload"]');for(const r of n)if((e?r.as===e||r.getAttribute("as")===e:!0)&&r.href===t)return!0;return!1}function sr(e,t,n,r){const i=hu(n),a=`${e}|${t??""}|${i}`;if(oi.has(a))return;if(jd(t,i)){oi.add(a);return}const s=document.createElement("link");s.rel=e,t&&(s.as=t),s.href=i,s.crossOrigin="anonymous",r&&(s.type=r),s.setAttribute("data-chatsystem-preload","1"),document.head.appendChild(s),oi.add(a)}function zd(e){const t=s=>Array.from(new Set((s??[]).map(hu))),n=t(e.images),r=t(e.svgs),i=t(e.lotties),a=t(e.sprites);n.forEach(s=>sr("preload","image",s)),r.forEach(s=>sr("preload","fetch",s,"image/svg+xml")),i.forEach(s=>sr("preload","fetch",s,"application/zip")),a.forEach(s=>sr("preload","fetch",s))}const $d=({src:e})=>{const[t,n]=C.useState(null);return C.useEffect(()=>{let r=!1;return cu(e).then(({blobUrl:i})=>{n(i)}).catch(()=>n(null)),()=>{t&&!r&&(URL.revokeObjectURL(t),r=!0)}},[e]),S.jsx("img",{src:t??e,decoding:"async",loading:"eager"})};function Yd(e){return!!e&&typeof e=="object"&&"blob"in e&&e.blob instanceof Blob}function Gd({src:e,autoplay:t=!0,loop:n=!0,className:r,style:i,placeholder:a,fallback:s,onLoaded:o,onError:u}){const[c,d]=C.useState({kind:"loading"});return C.useEffect(()=>{let f=null,p=!1;return d({kind:"loading"}),du(e).then(async h=>{if(!p)if(h.kind==="zip"){const b=Yd(h)?h.blob:await(await fetch(h.blobUrl)).blob();f=URL.createObjectURL(b),d({kind:"lottieZip",blobUrl:f}),o?.(f)}else d({kind:"json",data:h.data}),o?.(h.data)}).catch(h=>!p&&(d({kind:"error",err:h}),u?.(h))),()=>{p=!0,f&&URL.revokeObjectURL(f)}},[e]),c.kind==="loading"?S.jsx("div",{className:"flex items-center justify-center rounded-xl border border-dashed p-6 text-sm opacity-70 "+(r??""),style:{minHeight:96,...i},children:a??"Loading animation…"}):c.kind==="error"?S.jsx("div",{className:"flex items-center justify-center rounded-xl border p-6 text-sm text-red-600 "+(r??""),style:{minHeight:96,...i},children:s??"Failed to load animation"}):c.kind==="json"?S.jsx(Od,{animationData:c.data,loop:n,autoplay:t,className:r,style:i,rendererSettings:{preserveAspectRatio:"xMidYMid meet"}}):S.jsx(Rd.DotLottieReact,{src:c.blobUrl,loop:n,autoplay:t,className:r,style:i})}async function qd(e,t={}){const{minPeriod:n=8,maxPeriod:r=Math.floor(Math.min(e.width,e.height)/2),gutterSearchRadius:i=3,debug:a=!1}=t,s=Ct();if(e.width<n*2||e.height<n*2)return a&&s.warn("detectGrid: image too small"),null;const o=document.createElement("canvas");o.width=e.naturalWidth,o.height=e.naturalHeight;const u=o.getContext("2d");if(!u)return null;u.drawImage(e,0,0);const{data:c}=u.getImageData(0,0,o.width,o.height),d=o.width,f=o.height,p=new Uint8ClampedArray(d*f);for(let H=0;H<f;H++){let $=H*d;for(let P=0;P<d;P++){const j=($+P)*4;p[$+P]=.299*c[j]+.587*c[j+1]+.114*c[j+2]|0}}const h=new Float32Array(d),b=new Float32Array(f);for(let H=1;H<d-1;H++){let $=0;for(let P=0;P<f;P++){const j=P*d+H,X=p[j+1]-p[j-1];$+=Math.abs(X)}h[H]=$}for(let H=1;H<f-1;H++){let $=0;for(let P=0;P<d;P++){const j=H*d+P,X=p[j+d]-p[j-d];$+=Math.abs(X)}b[H]=$}const y=ls(h,n,Math.min(r,d/2)),w=ls(b,n,Math.min(r,f/2));if(!y||!w)return a&&s.warn("detectGrid: could not find periods"),null;const _=Math.max(1,Math.round(d/y)),k=Math.max(1,Math.round(f/w)),N=cs(h,y,_,i),L=cs(b,w,k,i),A=Math.max(1,y-N),v=Math.max(1,w-L);if(A*_>d+2||v*k>f+2)return a&&s.warn("detectGrid: sanity check failed"),null;const z=zi(h,60),K=zi(b,60),Q=Math.max(0,ds(h,z)),I=Math.max(0,ds(b,K));return a&&s.log({periodX:y,periodY:w,columns:_,rows:k,gutterX:N,gutterY:L,frameWidth:A,frameHeight:v,originX:Q,originY:I}),{columns:_,rows:k,frameWidth:A,frameHeight:v,gutterX:N,gutterY:L,originX:Q,originY:I}}function ls(e,t,n){const r=pu(e);let i=0;for(let h=0;h<e.length;h++){const b=e[h]-r;i+=b*b}if(i===0)return null;const a=new Float32Array(n+1);let s=0,o=-1/0;for(let h=t;h<=n;h++){let b=0;for(let w=0;w+h<e.length;w++)b+=(e[w]-r)*(e[w+h]-r);const y=b/i;a[h]=y,y>o&&(o=y,s=h)}if(s<=t||s>=n)return s||null;const u=a[s-1],c=a[s],d=a[s+1],f=u-2*c+d,p=f===0?0:.5*(u-d)/f;return s+p}function cs(e,t,n,r){const i=[];for(let o=1;o<n;o++){const u=o*t;let c=1/0,d=u;for(let f=-r;f<=r;f++){const p=u+f;if(p<=0||p>=e.length)continue;const h=e[p];h<c&&(c=h,d=p)}i.push(d)}if(i.length<1)return 0;let a=[];for(const o of i){const u=e[o]*1.5+zi(e,10)*.5;let c=o,d=o;for(;c>1&&e[c-1]<=u;)c--;for(;d<e.length-2&&e[d+1]<=u;)d++;a.push(Math.max(0,d-c+1))}const s=Math.round(pu(a));return Math.max(0,Math.min(s,Math.floor(t/4)))}function pu(e){let t=0;for(let n=0;n<e.length;n++)t+=e[n];return t/e.length}function zi(e,t){const n=Array.from(e);n.sort((i,a)=>i-a);const r=Math.max(0,Math.min(n.length-1,Math.floor(t/100*n.length)));return n[r]}function ds(e,t){for(let n=0;n<e.length;n++)if(e[n]>t)return n;return 0}function Vd(e,t,n,r,i){const{data:a}=e.getImageData(t,n,r,i);let s=0;for(let o=3;o<a.length;o+=4)s+=a[o];return s/(255*(a.length/4))<.03}const mu=C.createContext(Ct()),_n=()=>C.useContext(mu),Wd=C.forwardRef(function({src:t,frameWidth:n,frameHeight:r,columns:i,rows:a,gutterX:s=0,gutterY:o=0,frameCount:u,atlasFrames:c,fps:d=12,autoplay:f=!0,loop:p=!0,startFrame:h=0,direction:b="forward",scale:y=1,backgroundColor:w,className:_,style:k,pauseWhenHidden:N=!1,originX:L,originY:A,onLoad:v,onEnd:z,onFrame:K},Q){const I=_n(),H=C.useRef(null),$=C.useRef(null),[P,j]=C.useState(null),[X,Ee]=C.useState(null),[pe,Oe]=C.useState(null),[ke,m]=C.useState(!1),[Y,ee]=C.useState(!!f),[T,W]=C.useState(h),ne=C.useRef(1),[q,se]=C.useState(null),re=Math.max(1,Math.floor(typeof window<"u"&&window.devicePixelRatio||1));C.useEffect(()=>{let te=!1;return m(!1),fu(t).then(({imgEl:ce,bitmap:fe})=>{te||(j(ce),Ee(fe),Oe({w:ce.naturalWidth,h:ce.naturalHeight}),m(!0),v?.())}).catch(()=>{}),()=>{te=!0}},[t,v]),C.useEffect(()=>{let te=!1;return(async()=>{if(!P)return;if(c&&c.length){se(null);return}if(!(!n||!r||!i||!a)){se(null);return}const fe=await qd(P,{debug:!0});te||(fe?se({frameWidth:fe.frameWidth,frameHeight:fe.frameHeight,columns:fe.columns,rows:fe.rows,gutterX:fe.gutterX,gutterY:fe.gutterY}):(se(null),I.warn("RemoteSpritesheet: auto-detect failed; please provide grid props.")))})(),()=>{te=!0}},[P,c,n,r,i,a,I]);const le=q?.frameWidth??n,ie=q?.frameHeight??r,Ae=q?.columns??i,G=q?.rows??a,De=q?.gutterX??s,Fe=q?.gutterY??o,Ve=q?.originX??L??0,et=q?.originY??A??0,Rt=C.useMemo(()=>{if(c&&c.length>0)return{cols:0,rows:0};if(!pe||!le||!ie)return{cols:0,rows:0};const te=Ae??Math.floor((pe.w+De)/(le+De)),ce=G??Math.floor((pe.h+Fe)/(ie+Fe));return{cols:Math.max(0,te),rows:Math.max(0,ce)}},[c,pe,le,ie,Ae,G,De,Fe]),Be=C.useMemo(()=>{if(c?.length)return c;if(!le||!ie)return[];const{cols:te,rows:ce}=Rt;if(!te||!ce)return[];const fe=Math.min(u??te*ce,te*ce),_e=[];for(let R=0;R<fe;R++){const B=R%te,Z=Math.floor(R/te),ue=Ve+B*(le+De),Ce=et+Z*(ie+Fe);_e.push({x:ue,y:Ce,w:le,h:ie})}if(P&&_e.length){const R=document.createElement("canvas");R.width=P.naturalWidth,R.height=P.naturalHeight;const B=R.getContext("2d");if(B){B.drawImage(P,0,0);let Z=_e.length;for(;Z>0&&Vd(B,_e[Z-1].x,_e[Z-1].y,_e[Z-1].w,_e[Z-1].h);)Z--;return _e.slice(0,Z)}}return _e},[c,Rt,u,le,ie,De,Fe,P,Ve,et]),V=()=>{const te=H.current;if(!te||Be.length===0)return;const ce=Be[Math.max(0,Math.min(T,Be.length-1))],fe=Math.max(1,Math.round(ce.w*y)),_e=Math.max(1,Math.round(ce.h*y));te.style.width=fe+"px",te.style.height=_e+"px",te.width=fe*re,te.height=_e*re};C.useEffect(()=>{V()},[ke,y,Be.length,re,T]);const Te=te=>{const ce=X??P??null,fe=H.current;if(!fe||!ce||Be.length===0)return;const _e=fe.getContext("2d");if(!_e)return;_e.save(),_e.setTransform(1,0,0,1,0,0),_e.clearRect(0,0,fe.width,fe.height),w&&(_e.fillStyle=w,_e.fillRect(0,0,fe.width,fe.height));const R=Be[te];_e.scale(re,re),_e.drawImage(ce,R.x,R.y,R.w,R.h,0,0,Math.round(R.w*y),Math.round(R.h*y)),_e.restore()};return C.useEffect(()=>{if(!ke||Be.length===0)return;let te=performance.now();const ce=1e3/Math.max(1,Math.min(120,d)),fe=_e=>{if($.current=requestAnimationFrame(fe),!Y){Te(T);return}const R=_e-te;if(R<ce){Te(T);return}te=_e-R%ce,W(B=>{const Z=Be.length-1;let ue=B;return b==="forward"?ue=B+1:b==="backward"?ue=B-1:((B>=Z&&ne.current===1||B<=0&&ne.current===-1)&&(ne.current*=-1),ue=B+ne.current),(ue>Z||ue<0)&&(p?ue=b==="backward"?Z:0:(ue=Math.max(0,Math.min(ue,Z)),ee(!1),z?.())),ue})};return $.current=requestAnimationFrame(fe),()=>{$.current&&cancelAnimationFrame($.current)}},[ke,d,Y,p,b,Be.length,T]),C.useEffect(()=>{Te(T),K?.(T)},[T,ke,y,re]),C.useEffect(()=>{if(!N)return;const te=()=>{document.hidden&&ee(!1)};return document.addEventListener("visibilitychange",te),()=>document.removeEventListener("visibilitychange",te)},[N]),C.useImperativeHandle(Q,()=>({play:()=>ee(!0),pause:()=>ee(!1),toggle:()=>ee(te=>!te),gotoFrame:te=>W(()=>Math.max(0,Math.min(te,Math.max(0,Be.length-1)))),isPlaying:()=>Y,currentFrame:()=>T}),[Y,T,Be.length]),S.jsx("div",{className:_,style:k,children:S.jsx("canvas",{ref:H,"aria-label":"spritesheet animation"})})});function Xd({url:e,className:t}){const[n,r]=C.useState(""),[i,a]=C.useState(null);return C.useEffect(()=>{let s=!1;return lu(e).then(({sanitized:o})=>{s||(r(o),a(null))}).catch(o=>!s&&a(o.message??"Failed to load")),()=>{s=!0}},[e]),i?S.jsxs("div",{className:t,role:"alert",children:["Couldn’t load SVG: ",i]}):n?S.jsx("div",{className:t,dangerouslySetInnerHTML:{__html:n}}):S.jsx("div",{className:t})}function Qd({mobile:e=.6,tablet:t=.8,desktop:n=1}){const[r,i]=C.useState(n);return C.useEffect(()=>{if(typeof window>"u")return;const a=[{mq:window.matchMedia("(max-width: 639px)"),value:e},{mq:window.matchMedia("(min-width: 640px) and (max-width: 1023px)"),value:t},{mq:window.matchMedia("(min-width: 1024px)"),value:n}],s=()=>{for(const{mq:o,value:u}of a)if(o.matches){i(u);break}};return a.forEach(({mq:o})=>o.addEventListener("change",s)),s(),()=>{a.forEach(({mq:o})=>o.removeEventListener("change",s))}},[e,t,n]),r}const Sa=({facet:e})=>{const t=_n(),{mode:n,assetUrl:r,spr_columns:i,spr_fps:a,spr_frameCount:s,spr_frameHeight:o,spr_frameWidth:u,spr_gutterX:c,spr_gutterY:d,spr_rows:f,spr_originX:p,spr_originY:h,spr_scaleDesktop:b,spr_scaleMobile:y,spr_scaleTablet:w}=e,_=Qd({mobile:y??.6,tablet:w??.8,desktop:b??1});return S.jsxs("div",{className:"assetContainer",children:[n===oe.AgentDisplayFacetModeType.LOTTIE&&S.jsx(Gd,{src:r,autoplay:!0,onError:k=>t.error(k)}),n===oe.AgentDisplayFacetModeType.SVG&&S.jsx("div",{children:S.jsx(Xd,{url:r})}),n===oe.AgentDisplayFacetModeType.IMAGE&&S.jsx($d,{src:r}),n===oe.AgentDisplayFacetModeType.SPRITESHEET&&S.jsx(Wd,{src:r,frameCount:s,columns:i,rows:f,fps:a,frameHeight:o,frameWidth:u,gutterX:c,gutterY:d,originX:p,originY:h,scale:_,autoplay:!0})]})},Kd=({isWidgetOpen:e,setIsWidgetOpen:t})=>{const{companySettings:n}=C.useContext(nn);return S.jsxs("div",{className:`launcher
2
2
  fixed
3
3
  z-[999999999]
4
4
  transition
@@ -9,79 +9,88 @@
9
9
  flex
10
10
  justify-center
11
11
  items-center
12
- `,onClick:()=>t(!e),children:[!e&&C.jsx(ua,{facet:n.agent.display[ke.AgentDisplayFacetRoleType.LAUNCHER]}),e&&C.jsx(Do,{className:"w-6 h-6",fill:"white"})]})};var Ni=function(e,t){return Ni=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[i]=r[i])},Ni(e,t)};function st(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");Ni(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var X=function(){return X=Object.assign||function(t){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(t[a]=n[a])}return t},X.apply(this,arguments)};function kr(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function gt(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||(a=Array.prototype.slice.call(t,0,r)),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}var er={exports:{}},Te={};/** @license React v16.13.1
12
+ `,onClick:()=>t(!e),children:[!e&&S.jsx(Sa,{facet:n.agent.display[oe.AgentDisplayFacetRoleType.LAUNCHER]}),e&&S.jsx(su,{className:"w-6 h-6",fill:"white"})]})};var $i=function(e,t){return $i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[i]=r[i])},$i(e,t)};function dt(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");$i(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var J=function(){return J=Object.assign||function(t){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(t[a]=n[a])}return t},J.apply(this,arguments)};function Fr(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function Tt(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||(a=Array.prototype.slice.call(t,0,r)),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}var or={exports:{}},we={};/** @license React v16.13.1
13
13
  * react-is.production.min.js
14
14
  *
15
15
  * Copyright (c) Facebook, Inc. and its affiliates.
16
16
  *
17
17
  * This source code is licensed under the MIT license found in the
18
18
  * LICENSE file in the root directory of this source tree.
19
- */var za;function td(){if(za)return Te;za=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,i=e?Symbol.for("react.strict_mode"):60108,a=e?Symbol.for("react.profiler"):60114,s=e?Symbol.for("react.provider"):60109,o=e?Symbol.for("react.context"):60110,u=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,d=e?Symbol.for("react.forward_ref"):60112,f=e?Symbol.for("react.suspense"):60113,m=e?Symbol.for("react.suspense_list"):60120,h=e?Symbol.for("react.memo"):60115,b=e?Symbol.for("react.lazy"):60116,A=e?Symbol.for("react.block"):60121,w=e?Symbol.for("react.fundamental"):60117,y=e?Symbol.for("react.responder"):60118,_=e?Symbol.for("react.scope"):60119;function S(I){if(typeof I=="object"&&I!==null){var N=I.$$typeof;switch(N){case t:switch(I=I.type,I){case u:case c:case r:case a:case i:case f:return I;default:switch(I=I&&I.$$typeof,I){case o:case d:case b:case h:case s:return I;default:return N}}case n:return N}}}function D(I){return S(I)===c}return Te.AsyncMode=u,Te.ConcurrentMode=c,Te.ContextConsumer=o,Te.ContextProvider=s,Te.Element=t,Te.ForwardRef=d,Te.Fragment=r,Te.Lazy=b,Te.Memo=h,Te.Portal=n,Te.Profiler=a,Te.StrictMode=i,Te.Suspense=f,Te.isAsyncMode=function(I){return D(I)||S(I)===u},Te.isConcurrentMode=D,Te.isContextConsumer=function(I){return S(I)===o},Te.isContextProvider=function(I){return S(I)===s},Te.isElement=function(I){return typeof I=="object"&&I!==null&&I.$$typeof===t},Te.isForwardRef=function(I){return S(I)===d},Te.isFragment=function(I){return S(I)===r},Te.isLazy=function(I){return S(I)===b},Te.isMemo=function(I){return S(I)===h},Te.isPortal=function(I){return S(I)===n},Te.isProfiler=function(I){return S(I)===a},Te.isStrictMode=function(I){return S(I)===i},Te.isSuspense=function(I){return S(I)===f},Te.isValidElementType=function(I){return typeof I=="string"||typeof I=="function"||I===r||I===c||I===a||I===i||I===f||I===m||typeof I=="object"&&I!==null&&(I.$$typeof===b||I.$$typeof===h||I.$$typeof===s||I.$$typeof===o||I.$$typeof===d||I.$$typeof===w||I.$$typeof===y||I.$$typeof===_||I.$$typeof===A)},Te.typeOf=S,Te}var xe={};/** @license React v16.13.1
19
+ */var fs;function Zd(){if(fs)return we;fs=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,i=e?Symbol.for("react.strict_mode"):60108,a=e?Symbol.for("react.profiler"):60114,s=e?Symbol.for("react.provider"):60109,o=e?Symbol.for("react.context"):60110,u=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,d=e?Symbol.for("react.forward_ref"):60112,f=e?Symbol.for("react.suspense"):60113,p=e?Symbol.for("react.suspense_list"):60120,h=e?Symbol.for("react.memo"):60115,b=e?Symbol.for("react.lazy"):60116,y=e?Symbol.for("react.block"):60121,w=e?Symbol.for("react.fundamental"):60117,_=e?Symbol.for("react.responder"):60118,k=e?Symbol.for("react.scope"):60119;function N(A){if(typeof A=="object"&&A!==null){var v=A.$$typeof;switch(v){case t:switch(A=A.type,A){case u:case c:case r:case a:case i:case f:return A;default:switch(A=A&&A.$$typeof,A){case o:case d:case b:case h:case s:return A;default:return v}}case n:return v}}}function L(A){return N(A)===c}return we.AsyncMode=u,we.ConcurrentMode=c,we.ContextConsumer=o,we.ContextProvider=s,we.Element=t,we.ForwardRef=d,we.Fragment=r,we.Lazy=b,we.Memo=h,we.Portal=n,we.Profiler=a,we.StrictMode=i,we.Suspense=f,we.isAsyncMode=function(A){return L(A)||N(A)===u},we.isConcurrentMode=L,we.isContextConsumer=function(A){return N(A)===o},we.isContextProvider=function(A){return N(A)===s},we.isElement=function(A){return typeof A=="object"&&A!==null&&A.$$typeof===t},we.isForwardRef=function(A){return N(A)===d},we.isFragment=function(A){return N(A)===r},we.isLazy=function(A){return N(A)===b},we.isMemo=function(A){return N(A)===h},we.isPortal=function(A){return N(A)===n},we.isProfiler=function(A){return N(A)===a},we.isStrictMode=function(A){return N(A)===i},we.isSuspense=function(A){return N(A)===f},we.isValidElementType=function(A){return typeof A=="string"||typeof A=="function"||A===r||A===c||A===a||A===i||A===f||A===p||typeof A=="object"&&A!==null&&(A.$$typeof===b||A.$$typeof===h||A.$$typeof===s||A.$$typeof===o||A.$$typeof===d||A.$$typeof===w||A.$$typeof===_||A.$$typeof===k||A.$$typeof===y)},we.typeOf=N,we}var Ie={};/** @license React v16.13.1
20
20
  * react-is.development.js
21
21
  *
22
22
  * Copyright (c) Facebook, Inc. and its affiliates.
23
23
  *
24
24
  * This source code is licensed under the MIT license found in the
25
25
  * LICENSE file in the root directory of this source tree.
26
- */var $a;function nd(){return $a||($a=1,process.env.NODE_ENV!=="production"&&(function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,i=e?Symbol.for("react.strict_mode"):60108,a=e?Symbol.for("react.profiler"):60114,s=e?Symbol.for("react.provider"):60109,o=e?Symbol.for("react.context"):60110,u=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,d=e?Symbol.for("react.forward_ref"):60112,f=e?Symbol.for("react.suspense"):60113,m=e?Symbol.for("react.suspense_list"):60120,h=e?Symbol.for("react.memo"):60115,b=e?Symbol.for("react.lazy"):60116,A=e?Symbol.for("react.block"):60121,w=e?Symbol.for("react.fundamental"):60117,y=e?Symbol.for("react.responder"):60118,_=e?Symbol.for("react.scope"):60119;function S(Y){return typeof Y=="string"||typeof Y=="function"||Y===r||Y===c||Y===a||Y===i||Y===f||Y===m||typeof Y=="object"&&Y!==null&&(Y.$$typeof===b||Y.$$typeof===h||Y.$$typeof===s||Y.$$typeof===o||Y.$$typeof===d||Y.$$typeof===w||Y.$$typeof===y||Y.$$typeof===_||Y.$$typeof===A)}function D(Y){if(typeof Y=="object"&&Y!==null){var Ne=Y.$$typeof;switch(Ne){case t:var $e=Y.type;switch($e){case u:case c:case r:case a:case i:case f:return $e;default:var lt=$e&&$e.$$typeof;switch(lt){case o:case d:case b:case h:case s:return lt;default:return Ne}}case n:return Ne}}}var I=u,N=c,G=o,se=s,ee=t,k=d,M=r,$=b,U=h,z=n,Q=a,he=i,Ee=f,Le=!1;function Re(Y){return Le||(Le=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),g(Y)||D(Y)===u}function g(Y){return D(Y)===c}function j(Y){return D(Y)===o}function J(Y){return D(Y)===s}function T(Y){return typeof Y=="object"&&Y!==null&&Y.$$typeof===t}function K(Y){return D(Y)===d}function ne(Y){return D(Y)===r}function W(Y){return D(Y)===b}function ae(Y){return D(Y)===h}function re(Y){return D(Y)===n}function oe(Y){return D(Y)===a}function ie(Y){return D(Y)===i}function Se(Y){return D(Y)===f}xe.AsyncMode=I,xe.ConcurrentMode=N,xe.ContextConsumer=G,xe.ContextProvider=se,xe.Element=ee,xe.ForwardRef=k,xe.Fragment=M,xe.Lazy=$,xe.Memo=U,xe.Portal=z,xe.Profiler=Q,xe.StrictMode=he,xe.Suspense=Ee,xe.isAsyncMode=Re,xe.isConcurrentMode=g,xe.isContextConsumer=j,xe.isContextProvider=J,xe.isElement=T,xe.isForwardRef=K,xe.isFragment=ne,xe.isLazy=W,xe.isMemo=ae,xe.isPortal=re,xe.isProfiler=oe,xe.isStrictMode=ie,xe.isSuspense=Se,xe.isValidElementType=S,xe.typeOf=D})()),xe}var Ya;function la(){return Ya||(Ya=1,process.env.NODE_ENV==="production"?er.exports=td():er.exports=nd()),er.exports}var Wr,Ga;function rd(){if(Ga)return Wr;Ga=1;var e=la(),t={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},n={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},r={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},i={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},a={};a[e.ForwardRef]=r,a[e.Memo]=i;function s(b){return e.isMemo(b)?i:a[b.$$typeof]||t}var o=Object.defineProperty,u=Object.getOwnPropertyNames,c=Object.getOwnPropertySymbols,d=Object.getOwnPropertyDescriptor,f=Object.getPrototypeOf,m=Object.prototype;function h(b,A,w){if(typeof A!="string"){if(m){var y=f(A);y&&y!==m&&h(b,y,w)}var _=u(A);c&&(_=_.concat(c(A)));for(var S=s(b),D=s(A),I=0;I<_.length;++I){var N=_[I];if(!n[N]&&!(w&&w[N])&&!(D&&D[N])&&!(S&&S[N])){var G=d(A,N);try{o(b,N,G)}catch{}}}}return b}return Wr=h,Wr}rd();function Yo(e,t,n){if(n===void 0&&(n=Error),!e)throw new n(t)}var pe;(function(e){e[e.EXPECT_ARGUMENT_CLOSING_BRACE=1]="EXPECT_ARGUMENT_CLOSING_BRACE",e[e.EMPTY_ARGUMENT=2]="EMPTY_ARGUMENT",e[e.MALFORMED_ARGUMENT=3]="MALFORMED_ARGUMENT",e[e.EXPECT_ARGUMENT_TYPE=4]="EXPECT_ARGUMENT_TYPE",e[e.INVALID_ARGUMENT_TYPE=5]="INVALID_ARGUMENT_TYPE",e[e.EXPECT_ARGUMENT_STYLE=6]="EXPECT_ARGUMENT_STYLE",e[e.INVALID_NUMBER_SKELETON=7]="INVALID_NUMBER_SKELETON",e[e.INVALID_DATE_TIME_SKELETON=8]="INVALID_DATE_TIME_SKELETON",e[e.EXPECT_NUMBER_SKELETON=9]="EXPECT_NUMBER_SKELETON",e[e.EXPECT_DATE_TIME_SKELETON=10]="EXPECT_DATE_TIME_SKELETON",e[e.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE=11]="UNCLOSED_QUOTE_IN_ARGUMENT_STYLE",e[e.EXPECT_SELECT_ARGUMENT_OPTIONS=12]="EXPECT_SELECT_ARGUMENT_OPTIONS",e[e.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE=13]="EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE",e[e.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE=14]="INVALID_PLURAL_ARGUMENT_OFFSET_VALUE",e[e.EXPECT_SELECT_ARGUMENT_SELECTOR=15]="EXPECT_SELECT_ARGUMENT_SELECTOR",e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR=16]="EXPECT_PLURAL_ARGUMENT_SELECTOR",e[e.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT=17]="EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT",e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT=18]="EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT",e[e.INVALID_PLURAL_ARGUMENT_SELECTOR=19]="INVALID_PLURAL_ARGUMENT_SELECTOR",e[e.DUPLICATE_PLURAL_ARGUMENT_SELECTOR=20]="DUPLICATE_PLURAL_ARGUMENT_SELECTOR",e[e.DUPLICATE_SELECT_ARGUMENT_SELECTOR=21]="DUPLICATE_SELECT_ARGUMENT_SELECTOR",e[e.MISSING_OTHER_CLAUSE=22]="MISSING_OTHER_CLAUSE",e[e.INVALID_TAG=23]="INVALID_TAG",e[e.INVALID_TAG_NAME=25]="INVALID_TAG_NAME",e[e.UNMATCHED_CLOSING_TAG=26]="UNMATCHED_CLOSING_TAG",e[e.UNCLOSED_TAG=27]="UNCLOSED_TAG"})(pe||(pe={}));var Ce;(function(e){e[e.literal=0]="literal",e[e.argument=1]="argument",e[e.number=2]="number",e[e.date=3]="date",e[e.time=4]="time",e[e.select=5]="select",e[e.plural=6]="plural",e[e.pound=7]="pound",e[e.tag=8]="tag"})(Ce||(Ce={}));var mn;(function(e){e[e.number=0]="number",e[e.dateTime=1]="dateTime"})(mn||(mn={}));function Va(e){return e.type===Ce.literal}function id(e){return e.type===Ce.argument}function Go(e){return e.type===Ce.number}function Vo(e){return e.type===Ce.date}function qo(e){return e.type===Ce.time}function Wo(e){return e.type===Ce.select}function Xo(e){return e.type===Ce.plural}function ad(e){return e.type===Ce.pound}function Qo(e){return e.type===Ce.tag}function Ko(e){return!!(e&&typeof e=="object"&&e.type===mn.number)}function ki(e){return!!(e&&typeof e=="object"&&e.type===mn.dateTime)}var Jo=/[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/,sd=/(?:[Eec]{1,6}|G{1,5}|[Qq]{1,5}|(?:[yYur]+|U{1,5})|[ML]{1,5}|d{1,2}|D{1,3}|F{1}|[abB]{1,5}|[hkHK]{1,2}|w{1,2}|W{1}|m{1,2}|s{1,2}|[zZOvVxX]{1,4})(?=([^']*'[^']*')*[^']*$)/g;function od(e){var t={};return e.replace(sd,function(n){var r=n.length;switch(n[0]){case"G":t.era=r===4?"long":r===5?"narrow":"short";break;case"y":t.year=r===2?"2-digit":"numeric";break;case"Y":case"u":case"U":case"r":throw new RangeError("`Y/u/U/r` (year) patterns are not supported, use `y` instead");case"q":case"Q":throw new RangeError("`q/Q` (quarter) patterns are not supported");case"M":case"L":t.month=["numeric","2-digit","short","long","narrow"][r-1];break;case"w":case"W":throw new RangeError("`w/W` (week) patterns are not supported");case"d":t.day=["numeric","2-digit"][r-1];break;case"D":case"F":case"g":throw new RangeError("`D/F/g` (day) patterns are not supported, use `d` instead");case"E":t.weekday=r===4?"long":r===5?"narrow":"short";break;case"e":if(r<4)throw new RangeError("`e..eee` (weekday) patterns are not supported");t.weekday=["short","long","narrow","short"][r-4];break;case"c":if(r<4)throw new RangeError("`c..ccc` (weekday) patterns are not supported");t.weekday=["short","long","narrow","short"][r-4];break;case"a":t.hour12=!0;break;case"b":case"B":throw new RangeError("`b/B` (period) patterns are not supported, use `a` instead");case"h":t.hourCycle="h12",t.hour=["numeric","2-digit"][r-1];break;case"H":t.hourCycle="h23",t.hour=["numeric","2-digit"][r-1];break;case"K":t.hourCycle="h11",t.hour=["numeric","2-digit"][r-1];break;case"k":t.hourCycle="h24",t.hour=["numeric","2-digit"][r-1];break;case"j":case"J":case"C":throw new RangeError("`j/J/C` (hour) patterns are not supported, use `h/H/K/k` instead");case"m":t.minute=["numeric","2-digit"][r-1];break;case"s":t.second=["numeric","2-digit"][r-1];break;case"S":case"A":throw new RangeError("`S/A` (second) patterns are not supported, use `s` instead");case"z":t.timeZoneName=r<4?"short":"long";break;case"Z":case"O":case"v":case"V":case"X":case"x":throw new RangeError("`Z/O/v/V/X/x` (timeZone) patterns are not supported, use `z` instead")}return""}),t}var ud=/[\t-\r \x85\u200E\u200F\u2028\u2029]/i;function ld(e){if(e.length===0)throw new Error("Number skeleton cannot be empty");for(var t=e.split(ud).filter(function(m){return m.length>0}),n=[],r=0,i=t;r<i.length;r++){var a=i[r],s=a.split("/");if(s.length===0)throw new Error("Invalid number skeleton");for(var o=s[0],u=s.slice(1),c=0,d=u;c<d.length;c++){var f=d[c];if(f.length===0)throw new Error("Invalid number skeleton")}n.push({stem:o,options:u})}return n}function cd(e){return e.replace(/^(.*?)-/,"")}var qa=/^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g,Zo=/^(@+)?(\+|#+)?[rs]?$/g,dd=/(\*)(0+)|(#+)(0+)|(0+)/g,eu=/^(0+)$/;function Wa(e){var t={};return e[e.length-1]==="r"?t.roundingPriority="morePrecision":e[e.length-1]==="s"&&(t.roundingPriority="lessPrecision"),e.replace(Zo,function(n,r,i){return typeof i!="string"?(t.minimumSignificantDigits=r.length,t.maximumSignificantDigits=r.length):i==="+"?t.minimumSignificantDigits=r.length:r[0]==="#"?t.maximumSignificantDigits=r.length:(t.minimumSignificantDigits=r.length,t.maximumSignificantDigits=r.length+(typeof i=="string"?i.length:0)),""}),t}function tu(e){switch(e){case"sign-auto":return{signDisplay:"auto"};case"sign-accounting":case"()":return{currencySign:"accounting"};case"sign-always":case"+!":return{signDisplay:"always"};case"sign-accounting-always":case"()!":return{signDisplay:"always",currencySign:"accounting"};case"sign-except-zero":case"+?":return{signDisplay:"exceptZero"};case"sign-accounting-except-zero":case"()?":return{signDisplay:"exceptZero",currencySign:"accounting"};case"sign-never":case"+_":return{signDisplay:"never"}}}function fd(e){var t;if(e[0]==="E"&&e[1]==="E"?(t={notation:"engineering"},e=e.slice(2)):e[0]==="E"&&(t={notation:"scientific"},e=e.slice(1)),t){var n=e.slice(0,2);if(n==="+!"?(t.signDisplay="always",e=e.slice(2)):n==="+?"&&(t.signDisplay="exceptZero",e=e.slice(2)),!eu.test(e))throw new Error("Malformed concise eng/scientific notation");t.minimumIntegerDigits=e.length}return t}function Xa(e){var t={},n=tu(e);return n||t}function hd(e){for(var t={},n=0,r=e;n<r.length;n++){var i=r[n];switch(i.stem){case"percent":case"%":t.style="percent";continue;case"%x100":t.style="percent",t.scale=100;continue;case"currency":t.style="currency",t.currency=i.options[0];continue;case"group-off":case",_":t.useGrouping=!1;continue;case"precision-integer":case".":t.maximumFractionDigits=0;continue;case"measure-unit":case"unit":t.style="unit",t.unit=cd(i.options[0]);continue;case"compact-short":case"K":t.notation="compact",t.compactDisplay="short";continue;case"compact-long":case"KK":t.notation="compact",t.compactDisplay="long";continue;case"scientific":t=X(X(X({},t),{notation:"scientific"}),i.options.reduce(function(u,c){return X(X({},u),Xa(c))},{}));continue;case"engineering":t=X(X(X({},t),{notation:"engineering"}),i.options.reduce(function(u,c){return X(X({},u),Xa(c))},{}));continue;case"notation-simple":t.notation="standard";continue;case"unit-width-narrow":t.currencyDisplay="narrowSymbol",t.unitDisplay="narrow";continue;case"unit-width-short":t.currencyDisplay="code",t.unitDisplay="short";continue;case"unit-width-full-name":t.currencyDisplay="name",t.unitDisplay="long";continue;case"unit-width-iso-code":t.currencyDisplay="symbol";continue;case"scale":t.scale=parseFloat(i.options[0]);continue;case"rounding-mode-floor":t.roundingMode="floor";continue;case"rounding-mode-ceiling":t.roundingMode="ceil";continue;case"rounding-mode-down":t.roundingMode="trunc";continue;case"rounding-mode-up":t.roundingMode="expand";continue;case"rounding-mode-half-even":t.roundingMode="halfEven";continue;case"rounding-mode-half-down":t.roundingMode="halfTrunc";continue;case"rounding-mode-half-up":t.roundingMode="halfExpand";continue;case"integer-width":if(i.options.length>1)throw new RangeError("integer-width stems only accept a single optional option");i.options[0].replace(dd,function(u,c,d,f,m,h){if(c)t.minimumIntegerDigits=d.length;else{if(f&&m)throw new Error("We currently do not support maximum integer digits");if(h)throw new Error("We currently do not support exact integer digits")}return""});continue}if(eu.test(i.stem)){t.minimumIntegerDigits=i.stem.length;continue}if(qa.test(i.stem)){if(i.options.length>1)throw new RangeError("Fraction-precision stems only accept a single optional option");i.stem.replace(qa,function(u,c,d,f,m,h){return d==="*"?t.minimumFractionDigits=c.length:f&&f[0]==="#"?t.maximumFractionDigits=f.length:m&&h?(t.minimumFractionDigits=m.length,t.maximumFractionDigits=m.length+h.length):(t.minimumFractionDigits=c.length,t.maximumFractionDigits=c.length),""});var a=i.options[0];a==="w"?t=X(X({},t),{trailingZeroDisplay:"stripIfInteger"}):a&&(t=X(X({},t),Wa(a)));continue}if(Zo.test(i.stem)){t=X(X({},t),Wa(i.stem));continue}var s=tu(i.stem);s&&(t=X(X({},t),s));var o=fd(i.stem);o&&(t=X(X({},t),o))}return t}var tr={"001":["H","h"],AC:["H","h","hb","hB"],AD:["H","hB"],AE:["h","hB","hb","H"],AF:["H","hb","hB","h"],AG:["h","hb","H","hB"],AI:["H","h","hb","hB"],AL:["h","H","hB"],AM:["H","hB"],AO:["H","hB"],AR:["H","h","hB","hb"],AS:["h","H"],AT:["H","hB"],AU:["h","hb","H","hB"],AW:["H","hB"],AX:["H"],AZ:["H","hB","h"],BA:["H","hB","h"],BB:["h","hb","H","hB"],BD:["h","hB","H"],BE:["H","hB"],BF:["H","hB"],BG:["H","hB","h"],BH:["h","hB","hb","H"],BI:["H","h"],BJ:["H","hB"],BL:["H","hB"],BM:["h","hb","H","hB"],BN:["hb","hB","h","H"],BO:["H","hB","h","hb"],BQ:["H"],BR:["H","hB"],BS:["h","hb","H","hB"],BT:["h","H"],BW:["H","h","hb","hB"],BY:["H","h"],BZ:["H","h","hb","hB"],CA:["h","hb","H","hB"],CC:["H","h","hb","hB"],CD:["hB","H"],CF:["H","h","hB"],CG:["H","hB"],CH:["H","hB","h"],CI:["H","hB"],CK:["H","h","hb","hB"],CL:["H","h","hB","hb"],CM:["H","h","hB"],CN:["H","hB","hb","h"],CO:["h","H","hB","hb"],CP:["H"],CR:["H","h","hB","hb"],CU:["H","h","hB","hb"],CV:["H","hB"],CW:["H","hB"],CX:["H","h","hb","hB"],CY:["h","H","hb","hB"],CZ:["H"],DE:["H","hB"],DG:["H","h","hb","hB"],DJ:["h","H"],DK:["H"],DM:["h","hb","H","hB"],DO:["h","H","hB","hb"],DZ:["h","hB","hb","H"],EA:["H","h","hB","hb"],EC:["H","hB","h","hb"],EE:["H","hB"],EG:["h","hB","hb","H"],EH:["h","hB","hb","H"],ER:["h","H"],ES:["H","hB","h","hb"],ET:["hB","hb","h","H"],FI:["H"],FJ:["h","hb","H","hB"],FK:["H","h","hb","hB"],FM:["h","hb","H","hB"],FO:["H","h"],FR:["H","hB"],GA:["H","hB"],GB:["H","h","hb","hB"],GD:["h","hb","H","hB"],GE:["H","hB","h"],GF:["H","hB"],GG:["H","h","hb","hB"],GH:["h","H"],GI:["H","h","hb","hB"],GL:["H","h"],GM:["h","hb","H","hB"],GN:["H","hB"],GP:["H","hB"],GQ:["H","hB","h","hb"],GR:["h","H","hb","hB"],GT:["H","h","hB","hb"],GU:["h","hb","H","hB"],GW:["H","hB"],GY:["h","hb","H","hB"],HK:["h","hB","hb","H"],HN:["H","h","hB","hb"],HR:["H","hB"],HU:["H","h"],IC:["H","h","hB","hb"],ID:["H"],IE:["H","h","hb","hB"],IL:["H","hB"],IM:["H","h","hb","hB"],IN:["h","H"],IO:["H","h","hb","hB"],IQ:["h","hB","hb","H"],IR:["hB","H"],IS:["H"],IT:["H","hB"],JE:["H","h","hb","hB"],JM:["h","hb","H","hB"],JO:["h","hB","hb","H"],JP:["H","K","h"],KE:["hB","hb","H","h"],KG:["H","h","hB","hb"],KH:["hB","h","H","hb"],KI:["h","hb","H","hB"],KM:["H","h","hB","hb"],KN:["h","hb","H","hB"],KP:["h","H","hB","hb"],KR:["h","H","hB","hb"],KW:["h","hB","hb","H"],KY:["h","hb","H","hB"],KZ:["H","hB"],LA:["H","hb","hB","h"],LB:["h","hB","hb","H"],LC:["h","hb","H","hB"],LI:["H","hB","h"],LK:["H","h","hB","hb"],LR:["h","hb","H","hB"],LS:["h","H"],LT:["H","h","hb","hB"],LU:["H","h","hB"],LV:["H","hB","hb","h"],LY:["h","hB","hb","H"],MA:["H","h","hB","hb"],MC:["H","hB"],MD:["H","hB"],ME:["H","hB","h"],MF:["H","hB"],MG:["H","h"],MH:["h","hb","H","hB"],MK:["H","h","hb","hB"],ML:["H"],MM:["hB","hb","H","h"],MN:["H","h","hb","hB"],MO:["h","hB","hb","H"],MP:["h","hb","H","hB"],MQ:["H","hB"],MR:["h","hB","hb","H"],MS:["H","h","hb","hB"],MT:["H","h"],MU:["H","h"],MV:["H","h"],MW:["h","hb","H","hB"],MX:["H","h","hB","hb"],MY:["hb","hB","h","H"],MZ:["H","hB"],NA:["h","H","hB","hb"],NC:["H","hB"],NE:["H"],NF:["H","h","hb","hB"],NG:["H","h","hb","hB"],NI:["H","h","hB","hb"],NL:["H","hB"],NO:["H","h"],NP:["H","h","hB"],NR:["H","h","hb","hB"],NU:["H","h","hb","hB"],NZ:["h","hb","H","hB"],OM:["h","hB","hb","H"],PA:["h","H","hB","hb"],PE:["H","hB","h","hb"],PF:["H","h","hB"],PG:["h","H"],PH:["h","hB","hb","H"],PK:["h","hB","H"],PL:["H","h"],PM:["H","hB"],PN:["H","h","hb","hB"],PR:["h","H","hB","hb"],PS:["h","hB","hb","H"],PT:["H","hB"],PW:["h","H"],PY:["H","h","hB","hb"],QA:["h","hB","hb","H"],RE:["H","hB"],RO:["H","hB"],RS:["H","hB","h"],RU:["H"],RW:["H","h"],SA:["h","hB","hb","H"],SB:["h","hb","H","hB"],SC:["H","h","hB"],SD:["h","hB","hb","H"],SE:["H"],SG:["h","hb","H","hB"],SH:["H","h","hb","hB"],SI:["H","hB"],SJ:["H"],SK:["H"],SL:["h","hb","H","hB"],SM:["H","h","hB"],SN:["H","h","hB"],SO:["h","H"],SR:["H","hB"],SS:["h","hb","H","hB"],ST:["H","hB"],SV:["H","h","hB","hb"],SX:["H","h","hb","hB"],SY:["h","hB","hb","H"],SZ:["h","hb","H","hB"],TA:["H","h","hb","hB"],TC:["h","hb","H","hB"],TD:["h","H","hB"],TF:["H","h","hB"],TG:["H","hB"],TH:["H","h"],TJ:["H","h"],TL:["H","hB","hb","h"],TM:["H","h"],TN:["h","hB","hb","H"],TO:["h","H"],TR:["H","hB"],TT:["h","hb","H","hB"],TW:["hB","hb","h","H"],TZ:["hB","hb","H","h"],UA:["H","hB","h"],UG:["hB","hb","H","h"],UM:["h","hb","H","hB"],US:["h","hb","H","hB"],UY:["H","h","hB","hb"],UZ:["H","hB","h"],VA:["H","h","hB"],VC:["h","hb","H","hB"],VE:["h","H","hB","hb"],VG:["h","hb","H","hB"],VI:["h","hb","H","hB"],VN:["H","h"],VU:["h","H"],WF:["H","hB"],WS:["h","H"],XK:["H","hB","h"],YE:["h","hB","hb","H"],YT:["H","hB"],ZA:["H","h","hb","hB"],ZM:["h","hb","H","hB"],ZW:["H","h"],"af-ZA":["H","h","hB","hb"],"ar-001":["h","hB","hb","H"],"ca-ES":["H","h","hB"],"en-001":["h","hb","H","hB"],"es-BO":["H","h","hB","hb"],"es-BR":["H","h","hB","hb"],"es-EC":["H","h","hB","hb"],"es-ES":["H","h","hB","hb"],"es-GQ":["H","h","hB","hb"],"es-PE":["H","h","hB","hb"],"fr-CA":["H","h","hB"],"gl-ES":["H","h","hB"],"gu-IN":["hB","hb","h","H"],"hi-IN":["hB","h","H"],"it-CH":["H","h","hB"],"it-IT":["H","h","hB"],"kn-IN":["hB","h","H"],"ml-IN":["hB","h","H"],"mr-IN":["hB","hb","h","H"],"pa-IN":["hB","hb","h","H"],"ta-IN":["hB","h","hb","H"],"te-IN":["hB","h","H"],"zu-ZA":["H","hB","hb","h"]};function md(e,t){for(var n="",r=0;r<e.length;r++){var i=e.charAt(r);if(i==="j"){for(var a=0;r+1<e.length&&e.charAt(r+1)===i;)a++,r++;var s=1+(a&1),o=a<2?1:3+(a>>1),u="a",c=pd(t);for((c=="H"||c=="k")&&(o=0);o-- >0;)n+=u;for(;s-- >0;)n=c+n}else i==="J"?n+="H":n+=i}return n}function pd(e){var t=e.hourCycle;if(t===void 0&&e.hourCycles&&e.hourCycles.length&&(t=e.hourCycles[0]),t)switch(t){case"h24":return"k";case"h23":return"H";case"h12":return"h";case"h11":return"K";default:throw new Error("Invalid hourCycle")}var n=e.language,r;n!=="root"&&(r=e.maximize().region);var i=tr[r||""]||tr[n||""]||tr["".concat(n,"-001")]||tr["001"];return i[0]}var Xr,gd=new RegExp("^".concat(Jo.source,"*")),bd=new RegExp("".concat(Jo.source,"*$"));function ge(e,t){return{start:e,end:t}}var Ed=!!String.prototype.startsWith&&"_a".startsWith("a",1),Td=!!String.fromCodePoint,xd=!!Object.fromEntries,yd=!!String.prototype.codePointAt,Ad=!!String.prototype.trimStart,_d=!!String.prototype.trimEnd,Cd=!!Number.isSafeInteger,Sd=Cd?Number.isSafeInteger:function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e&&Math.abs(e)<=9007199254740991},Oi=!0;try{var wd=ru("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");Oi=((Xr=wd.exec("a"))===null||Xr===void 0?void 0:Xr[0])==="a"}catch{Oi=!1}var Qa=Ed?function(t,n,r){return t.startsWith(n,r)}:function(t,n,r){return t.slice(r,r+n.length)===n},Li=Td?String.fromCodePoint:function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];for(var r="",i=t.length,a=0,s;i>a;){if(s=t[a++],s>1114111)throw RangeError(s+" is not a valid code point");r+=s<65536?String.fromCharCode(s):String.fromCharCode(((s-=65536)>>10)+55296,s%1024+56320)}return r},Ka=xd?Object.fromEntries:function(t){for(var n={},r=0,i=t;r<i.length;r++){var a=i[r],s=a[0],o=a[1];n[s]=o}return n},nu=yd?function(t,n){return t.codePointAt(n)}:function(t,n){var r=t.length;if(!(n<0||n>=r)){var i=t.charCodeAt(n),a;return i<55296||i>56319||n+1===r||(a=t.charCodeAt(n+1))<56320||a>57343?i:(i-55296<<10)+(a-56320)+65536}},vd=Ad?function(t){return t.trimStart()}:function(t){return t.replace(gd,"")},Id=_d?function(t){return t.trimEnd()}:function(t){return t.replace(bd,"")};function ru(e,t){return new RegExp(e,t)}var Ri;if(Oi){var Ja=ru("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");Ri=function(t,n){var r;Ja.lastIndex=n;var i=Ja.exec(t);return(r=i[1])!==null&&r!==void 0?r:""}}else Ri=function(t,n){for(var r=[];;){var i=nu(t,n);if(i===void 0||iu(i)||Ld(i))break;r.push(i),n+=i>=65536?2:1}return Li.apply(void 0,r)};var Nd=(function(){function e(t,n){n===void 0&&(n={}),this.message=t,this.position={offset:0,line:1,column:1},this.ignoreTag=!!n.ignoreTag,this.locale=n.locale,this.requiresOtherClause=!!n.requiresOtherClause,this.shouldParseSkeletons=!!n.shouldParseSkeletons}return e.prototype.parse=function(){if(this.offset()!==0)throw Error("parser can only be used once");return this.parseMessage(0,"",!1)},e.prototype.parseMessage=function(t,n,r){for(var i=[];!this.isEOF();){var a=this.char();if(a===123){var s=this.parseArgument(t,r);if(s.err)return s;i.push(s.val)}else{if(a===125&&t>0)break;if(a===35&&(n==="plural"||n==="selectordinal")){var o=this.clonePosition();this.bump(),i.push({type:Ce.pound,location:ge(o,this.clonePosition())})}else if(a===60&&!this.ignoreTag&&this.peek()===47){if(r)break;return this.error(pe.UNMATCHED_CLOSING_TAG,ge(this.clonePosition(),this.clonePosition()))}else if(a===60&&!this.ignoreTag&&Di(this.peek()||0)){var s=this.parseTag(t,n);if(s.err)return s;i.push(s.val)}else{var s=this.parseLiteral(t,n);if(s.err)return s;i.push(s.val)}}}return{val:i,err:null}},e.prototype.parseTag=function(t,n){var r=this.clonePosition();this.bump();var i=this.parseTagName();if(this.bumpSpace(),this.bumpIf("/>"))return{val:{type:Ce.literal,value:"<".concat(i,"/>"),location:ge(r,this.clonePosition())},err:null};if(this.bumpIf(">")){var a=this.parseMessage(t+1,n,!0);if(a.err)return a;var s=a.val,o=this.clonePosition();if(this.bumpIf("</")){if(this.isEOF()||!Di(this.char()))return this.error(pe.INVALID_TAG,ge(o,this.clonePosition()));var u=this.clonePosition(),c=this.parseTagName();return i!==c?this.error(pe.UNMATCHED_CLOSING_TAG,ge(u,this.clonePosition())):(this.bumpSpace(),this.bumpIf(">")?{val:{type:Ce.tag,value:i,children:s,location:ge(r,this.clonePosition())},err:null}:this.error(pe.INVALID_TAG,ge(o,this.clonePosition())))}else return this.error(pe.UNCLOSED_TAG,ge(r,this.clonePosition()))}else return this.error(pe.INVALID_TAG,ge(r,this.clonePosition()))},e.prototype.parseTagName=function(){var t=this.offset();for(this.bump();!this.isEOF()&&Od(this.char());)this.bump();return this.message.slice(t,this.offset())},e.prototype.parseLiteral=function(t,n){for(var r=this.clonePosition(),i="";;){var a=this.tryParseQuote(n);if(a){i+=a;continue}var s=this.tryParseUnquoted(t,n);if(s){i+=s;continue}var o=this.tryParseLeftAngleBracket();if(o){i+=o;continue}break}var u=ge(r,this.clonePosition());return{val:{type:Ce.literal,value:i,location:u},err:null}},e.prototype.tryParseLeftAngleBracket=function(){return!this.isEOF()&&this.char()===60&&(this.ignoreTag||!kd(this.peek()||0))?(this.bump(),"<"):null},e.prototype.tryParseQuote=function(t){if(this.isEOF()||this.char()!==39)return null;switch(this.peek()){case 39:return this.bump(),this.bump(),"'";case 123:case 60:case 62:case 125:break;case 35:if(t==="plural"||t==="selectordinal")break;return null;default:return null}this.bump();var n=[this.char()];for(this.bump();!this.isEOF();){var r=this.char();if(r===39)if(this.peek()===39)n.push(39),this.bump();else{this.bump();break}else n.push(r);this.bump()}return Li.apply(void 0,n)},e.prototype.tryParseUnquoted=function(t,n){if(this.isEOF())return null;var r=this.char();return r===60||r===123||r===35&&(n==="plural"||n==="selectordinal")||r===125&&t>0?null:(this.bump(),Li(r))},e.prototype.parseArgument=function(t,n){var r=this.clonePosition();if(this.bump(),this.bumpSpace(),this.isEOF())return this.error(pe.EXPECT_ARGUMENT_CLOSING_BRACE,ge(r,this.clonePosition()));if(this.char()===125)return this.bump(),this.error(pe.EMPTY_ARGUMENT,ge(r,this.clonePosition()));var i=this.parseIdentifierIfPossible().value;if(!i)return this.error(pe.MALFORMED_ARGUMENT,ge(r,this.clonePosition()));if(this.bumpSpace(),this.isEOF())return this.error(pe.EXPECT_ARGUMENT_CLOSING_BRACE,ge(r,this.clonePosition()));switch(this.char()){case 125:return this.bump(),{val:{type:Ce.argument,value:i,location:ge(r,this.clonePosition())},err:null};case 44:return this.bump(),this.bumpSpace(),this.isEOF()?this.error(pe.EXPECT_ARGUMENT_CLOSING_BRACE,ge(r,this.clonePosition())):this.parseArgumentOptions(t,n,i,r);default:return this.error(pe.MALFORMED_ARGUMENT,ge(r,this.clonePosition()))}},e.prototype.parseIdentifierIfPossible=function(){var t=this.clonePosition(),n=this.offset(),r=Ri(this.message,n),i=n+r.length;this.bumpTo(i);var a=this.clonePosition(),s=ge(t,a);return{value:r,location:s}},e.prototype.parseArgumentOptions=function(t,n,r,i){var a,s=this.clonePosition(),o=this.parseIdentifierIfPossible().value,u=this.clonePosition();switch(o){case"":return this.error(pe.EXPECT_ARGUMENT_TYPE,ge(s,u));case"number":case"date":case"time":{this.bumpSpace();var c=null;if(this.bumpIf(",")){this.bumpSpace();var d=this.clonePosition(),f=this.parseSimpleArgStyleIfPossible();if(f.err)return f;var m=Id(f.val);if(m.length===0)return this.error(pe.EXPECT_ARGUMENT_STYLE,ge(this.clonePosition(),this.clonePosition()));var h=ge(d,this.clonePosition());c={style:m,styleLocation:h}}var b=this.tryParseArgumentClose(i);if(b.err)return b;var A=ge(i,this.clonePosition());if(c&&Qa(c?.style,"::",0)){var w=vd(c.style.slice(2));if(o==="number"){var f=this.parseNumberSkeletonFromString(w,c.styleLocation);return f.err?f:{val:{type:Ce.number,value:r,location:A,style:f.val},err:null}}else{if(w.length===0)return this.error(pe.EXPECT_DATE_TIME_SKELETON,A);var y=w;this.locale&&(y=md(w,this.locale));var m={type:mn.dateTime,pattern:y,location:c.styleLocation,parsedOptions:this.shouldParseSkeletons?od(y):{}},_=o==="date"?Ce.date:Ce.time;return{val:{type:_,value:r,location:A,style:m},err:null}}}return{val:{type:o==="number"?Ce.number:o==="date"?Ce.date:Ce.time,value:r,location:A,style:(a=c?.style)!==null&&a!==void 0?a:null},err:null}}case"plural":case"selectordinal":case"select":{var S=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(","))return this.error(pe.EXPECT_SELECT_ARGUMENT_OPTIONS,ge(S,X({},S)));this.bumpSpace();var D=this.parseIdentifierIfPossible(),I=0;if(o!=="select"&&D.value==="offset"){if(!this.bumpIf(":"))return this.error(pe.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,ge(this.clonePosition(),this.clonePosition()));this.bumpSpace();var f=this.tryParseDecimalInteger(pe.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,pe.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE);if(f.err)return f;this.bumpSpace(),D=this.parseIdentifierIfPossible(),I=f.val}var N=this.tryParsePluralOrSelectOptions(t,o,n,D);if(N.err)return N;var b=this.tryParseArgumentClose(i);if(b.err)return b;var G=ge(i,this.clonePosition());return o==="select"?{val:{type:Ce.select,value:r,options:Ka(N.val),location:G},err:null}:{val:{type:Ce.plural,value:r,options:Ka(N.val),offset:I,pluralType:o==="plural"?"cardinal":"ordinal",location:G},err:null}}default:return this.error(pe.INVALID_ARGUMENT_TYPE,ge(s,u))}},e.prototype.tryParseArgumentClose=function(t){return this.isEOF()||this.char()!==125?this.error(pe.EXPECT_ARGUMENT_CLOSING_BRACE,ge(t,this.clonePosition())):(this.bump(),{val:!0,err:null})},e.prototype.parseSimpleArgStyleIfPossible=function(){for(var t=0,n=this.clonePosition();!this.isEOF();){var r=this.char();switch(r){case 39:{this.bump();var i=this.clonePosition();if(!this.bumpUntil("'"))return this.error(pe.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE,ge(i,this.clonePosition()));this.bump();break}case 123:{t+=1,this.bump();break}case 125:{if(t>0)t-=1;else return{val:this.message.slice(n.offset,this.offset()),err:null};break}default:this.bump();break}}return{val:this.message.slice(n.offset,this.offset()),err:null}},e.prototype.parseNumberSkeletonFromString=function(t,n){var r=[];try{r=ld(t)}catch{return this.error(pe.INVALID_NUMBER_SKELETON,n)}return{val:{type:mn.number,tokens:r,location:n,parsedOptions:this.shouldParseSkeletons?hd(r):{}},err:null}},e.prototype.tryParsePluralOrSelectOptions=function(t,n,r,i){for(var a,s=!1,o=[],u=new Set,c=i.value,d=i.location;;){if(c.length===0){var f=this.clonePosition();if(n!=="select"&&this.bumpIf("=")){var m=this.tryParseDecimalInteger(pe.EXPECT_PLURAL_ARGUMENT_SELECTOR,pe.INVALID_PLURAL_ARGUMENT_SELECTOR);if(m.err)return m;d=ge(f,this.clonePosition()),c=this.message.slice(f.offset,this.offset())}else break}if(u.has(c))return this.error(n==="select"?pe.DUPLICATE_SELECT_ARGUMENT_SELECTOR:pe.DUPLICATE_PLURAL_ARGUMENT_SELECTOR,d);c==="other"&&(s=!0),this.bumpSpace();var h=this.clonePosition();if(!this.bumpIf("{"))return this.error(n==="select"?pe.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT:pe.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT,ge(this.clonePosition(),this.clonePosition()));var b=this.parseMessage(t+1,n,r);if(b.err)return b;var A=this.tryParseArgumentClose(h);if(A.err)return A;o.push([c,{value:b.val,location:ge(h,this.clonePosition())}]),u.add(c),this.bumpSpace(),a=this.parseIdentifierIfPossible(),c=a.value,d=a.location}return o.length===0?this.error(n==="select"?pe.EXPECT_SELECT_ARGUMENT_SELECTOR:pe.EXPECT_PLURAL_ARGUMENT_SELECTOR,ge(this.clonePosition(),this.clonePosition())):this.requiresOtherClause&&!s?this.error(pe.MISSING_OTHER_CLAUSE,ge(this.clonePosition(),this.clonePosition())):{val:o,err:null}},e.prototype.tryParseDecimalInteger=function(t,n){var r=1,i=this.clonePosition();this.bumpIf("+")||this.bumpIf("-")&&(r=-1);for(var a=!1,s=0;!this.isEOF();){var o=this.char();if(o>=48&&o<=57)a=!0,s=s*10+(o-48),this.bump();else break}var u=ge(i,this.clonePosition());return a?(s*=r,Sd(s)?{val:s,err:null}:this.error(n,u)):this.error(t,u)},e.prototype.offset=function(){return this.position.offset},e.prototype.isEOF=function(){return this.offset()===this.message.length},e.prototype.clonePosition=function(){return{offset:this.position.offset,line:this.position.line,column:this.position.column}},e.prototype.char=function(){var t=this.position.offset;if(t>=this.message.length)throw Error("out of bound");var n=nu(this.message,t);if(n===void 0)throw Error("Offset ".concat(t," is at invalid UTF-16 code unit boundary"));return n},e.prototype.error=function(t,n){return{val:null,err:{kind:t,message:this.message,location:n}}},e.prototype.bump=function(){if(!this.isEOF()){var t=this.char();t===10?(this.position.line+=1,this.position.column=1,this.position.offset+=1):(this.position.column+=1,this.position.offset+=t<65536?1:2)}},e.prototype.bumpIf=function(t){if(Qa(this.message,t,this.offset())){for(var n=0;n<t.length;n++)this.bump();return!0}return!1},e.prototype.bumpUntil=function(t){var n=this.offset(),r=this.message.indexOf(t,n);return r>=0?(this.bumpTo(r),!0):(this.bumpTo(this.message.length),!1)},e.prototype.bumpTo=function(t){if(this.offset()>t)throw Error("targetOffset ".concat(t," must be greater than or equal to the current offset ").concat(this.offset()));for(t=Math.min(t,this.message.length);;){var n=this.offset();if(n===t)break;if(n>t)throw Error("targetOffset ".concat(t," is at invalid UTF-16 code unit boundary"));if(this.bump(),this.isEOF())break}},e.prototype.bumpSpace=function(){for(;!this.isEOF()&&iu(this.char());)this.bump()},e.prototype.peek=function(){if(this.isEOF())return null;var t=this.char(),n=this.offset(),r=this.message.charCodeAt(n+(t>=65536?2:1));return r??null},e})();function Di(e){return e>=97&&e<=122||e>=65&&e<=90}function kd(e){return Di(e)||e===47}function Od(e){return e===45||e===46||e>=48&&e<=57||e===95||e>=97&&e<=122||e>=65&&e<=90||e==183||e>=192&&e<=214||e>=216&&e<=246||e>=248&&e<=893||e>=895&&e<=8191||e>=8204&&e<=8205||e>=8255&&e<=8256||e>=8304&&e<=8591||e>=11264&&e<=12271||e>=12289&&e<=55295||e>=63744&&e<=64975||e>=65008&&e<=65533||e>=65536&&e<=983039}function iu(e){return e>=9&&e<=13||e===32||e===133||e>=8206&&e<=8207||e===8232||e===8233}function Ld(e){return e>=33&&e<=35||e===36||e>=37&&e<=39||e===40||e===41||e===42||e===43||e===44||e===45||e>=46&&e<=47||e>=58&&e<=59||e>=60&&e<=62||e>=63&&e<=64||e===91||e===92||e===93||e===94||e===96||e===123||e===124||e===125||e===126||e===161||e>=162&&e<=165||e===166||e===167||e===169||e===171||e===172||e===174||e===176||e===177||e===182||e===187||e===191||e===215||e===247||e>=8208&&e<=8213||e>=8214&&e<=8215||e===8216||e===8217||e===8218||e>=8219&&e<=8220||e===8221||e===8222||e===8223||e>=8224&&e<=8231||e>=8240&&e<=8248||e===8249||e===8250||e>=8251&&e<=8254||e>=8257&&e<=8259||e===8260||e===8261||e===8262||e>=8263&&e<=8273||e===8274||e===8275||e>=8277&&e<=8286||e>=8592&&e<=8596||e>=8597&&e<=8601||e>=8602&&e<=8603||e>=8604&&e<=8607||e===8608||e>=8609&&e<=8610||e===8611||e>=8612&&e<=8613||e===8614||e>=8615&&e<=8621||e===8622||e>=8623&&e<=8653||e>=8654&&e<=8655||e>=8656&&e<=8657||e===8658||e===8659||e===8660||e>=8661&&e<=8691||e>=8692&&e<=8959||e>=8960&&e<=8967||e===8968||e===8969||e===8970||e===8971||e>=8972&&e<=8991||e>=8992&&e<=8993||e>=8994&&e<=9e3||e===9001||e===9002||e>=9003&&e<=9083||e===9084||e>=9085&&e<=9114||e>=9115&&e<=9139||e>=9140&&e<=9179||e>=9180&&e<=9185||e>=9186&&e<=9254||e>=9255&&e<=9279||e>=9280&&e<=9290||e>=9291&&e<=9311||e>=9472&&e<=9654||e===9655||e>=9656&&e<=9664||e===9665||e>=9666&&e<=9719||e>=9720&&e<=9727||e>=9728&&e<=9838||e===9839||e>=9840&&e<=10087||e===10088||e===10089||e===10090||e===10091||e===10092||e===10093||e===10094||e===10095||e===10096||e===10097||e===10098||e===10099||e===10100||e===10101||e>=10132&&e<=10175||e>=10176&&e<=10180||e===10181||e===10182||e>=10183&&e<=10213||e===10214||e===10215||e===10216||e===10217||e===10218||e===10219||e===10220||e===10221||e===10222||e===10223||e>=10224&&e<=10239||e>=10240&&e<=10495||e>=10496&&e<=10626||e===10627||e===10628||e===10629||e===10630||e===10631||e===10632||e===10633||e===10634||e===10635||e===10636||e===10637||e===10638||e===10639||e===10640||e===10641||e===10642||e===10643||e===10644||e===10645||e===10646||e===10647||e===10648||e>=10649&&e<=10711||e===10712||e===10713||e===10714||e===10715||e>=10716&&e<=10747||e===10748||e===10749||e>=10750&&e<=11007||e>=11008&&e<=11055||e>=11056&&e<=11076||e>=11077&&e<=11078||e>=11079&&e<=11084||e>=11085&&e<=11123||e>=11124&&e<=11125||e>=11126&&e<=11157||e===11158||e>=11159&&e<=11263||e>=11776&&e<=11777||e===11778||e===11779||e===11780||e===11781||e>=11782&&e<=11784||e===11785||e===11786||e===11787||e===11788||e===11789||e>=11790&&e<=11798||e===11799||e>=11800&&e<=11801||e===11802||e===11803||e===11804||e===11805||e>=11806&&e<=11807||e===11808||e===11809||e===11810||e===11811||e===11812||e===11813||e===11814||e===11815||e===11816||e===11817||e>=11818&&e<=11822||e===11823||e>=11824&&e<=11833||e>=11834&&e<=11835||e>=11836&&e<=11839||e===11840||e===11841||e===11842||e>=11843&&e<=11855||e>=11856&&e<=11857||e===11858||e>=11859&&e<=11903||e>=12289&&e<=12291||e===12296||e===12297||e===12298||e===12299||e===12300||e===12301||e===12302||e===12303||e===12304||e===12305||e>=12306&&e<=12307||e===12308||e===12309||e===12310||e===12311||e===12312||e===12313||e===12314||e===12315||e===12316||e===12317||e>=12318&&e<=12319||e===12320||e===12336||e===64830||e===64831||e>=65093&&e<=65094}function Pi(e){e.forEach(function(t){if(delete t.location,Wo(t)||Xo(t))for(var n in t.options)delete t.options[n].location,Pi(t.options[n].value);else Go(t)&&Ko(t.style)||(Vo(t)||qo(t))&&ki(t.style)?delete t.style.location:Qo(t)&&Pi(t.children)})}function Rd(e,t){t===void 0&&(t={}),t=X({shouldParseSkeletons:!0,requiresOtherClause:!0},t);var n=new Nd(e,t).parse();if(n.err){var r=SyntaxError(pe[n.err.kind]);throw r.location=n.err.location,r.originalMessage=n.err.message,r}return t?.captureLocation||Pi(n.val),n.val}function mt(e,t){var n=t&&t.cache?t.cache:Hd,r=t&&t.serializer?t.serializer:Fd,i=t&&t.strategy?t.strategy:Md;return i(e,{cache:n,serializer:r})}function Dd(e){return e==null||typeof e=="number"||typeof e=="boolean"}function Pd(e,t,n,r){var i=Dd(r)?r:n(r),a=t.get(i);return typeof a>"u"&&(a=e.call(this,r),t.set(i,a)),a}function au(e,t,n){var r=Array.prototype.slice.call(arguments,3),i=n(r),a=t.get(i);return typeof a>"u"&&(a=e.apply(this,r),t.set(i,a)),a}function su(e,t,n,r,i){return n.bind(t,e,r,i)}function Md(e,t){var n=e.length===1?Pd:au;return su(e,this,n,t.cache.create(),t.serializer)}function Bd(e,t){return su(e,this,au,t.cache.create(),t.serializer)}var Fd=function(){return JSON.stringify(arguments)};function ca(){this.cache=Object.create(null)}ca.prototype.get=function(e){return this.cache[e]};ca.prototype.set=function(e,t){this.cache[e]=t};var Hd={create:function(){return new ca}},pt={variadic:Bd},Et;(function(e){e.MISSING_VALUE="MISSING_VALUE",e.INVALID_VALUE="INVALID_VALUE",e.MISSING_INTL_API="MISSING_INTL_API"})(Et||(Et={}));var Mt=(function(e){st(t,e);function t(n,r,i){var a=e.call(this,n)||this;return a.code=r,a.originalMessage=i,a}return t.prototype.toString=function(){return"[formatjs Error: ".concat(this.code,"] ").concat(this.message)},t})(Error),Za=(function(e){st(t,e);function t(n,r,i,a){return e.call(this,'Invalid values for "'.concat(n,'": "').concat(r,'". Options are "').concat(Object.keys(i).join('", "'),'"'),Et.INVALID_VALUE,a)||this}return t})(Mt),Ud=(function(e){st(t,e);function t(n,r,i){return e.call(this,'Value for "'.concat(n,'" must be of type ').concat(r),Et.INVALID_VALUE,i)||this}return t})(Mt),jd=(function(e){st(t,e);function t(n,r){return e.call(this,'The intl string context variable "'.concat(n,'" was not provided to the string "').concat(r,'"'),Et.MISSING_VALUE,r)||this}return t})(Mt),Ge;(function(e){e[e.literal=0]="literal",e[e.object=1]="object"})(Ge||(Ge={}));function zd(e){return e.length<2?e:e.reduce(function(t,n){var r=t[t.length-1];return!r||r.type!==Ge.literal||n.type!==Ge.literal?t.push(n):r.value+=n.value,t},[])}function ou(e){return typeof e=="function"}function dr(e,t,n,r,i,a,s){if(e.length===1&&Va(e[0]))return[{type:Ge.literal,value:e[0].value}];for(var o=[],u=0,c=e;u<c.length;u++){var d=c[u];if(Va(d)){o.push({type:Ge.literal,value:d.value});continue}if(ad(d)){typeof a=="number"&&o.push({type:Ge.literal,value:n.getNumberFormat(t).format(a)});continue}var f=d.value;if(!(i&&f in i))throw new jd(f,s);var m=i[f];if(id(d)){(!m||typeof m=="string"||typeof m=="number")&&(m=typeof m=="string"||typeof m=="number"?String(m):""),o.push({type:typeof m=="string"?Ge.literal:Ge.object,value:m});continue}if(Vo(d)){var h=typeof d.style=="string"?r.date[d.style]:ki(d.style)?d.style.parsedOptions:void 0;o.push({type:Ge.literal,value:n.getDateTimeFormat(t,h).format(m)});continue}if(qo(d)){var h=typeof d.style=="string"?r.time[d.style]:ki(d.style)?d.style.parsedOptions:r.time.medium;o.push({type:Ge.literal,value:n.getDateTimeFormat(t,h).format(m)});continue}if(Go(d)){var h=typeof d.style=="string"?r.number[d.style]:Ko(d.style)?d.style.parsedOptions:void 0;h&&h.scale&&(m=m*(h.scale||1)),o.push({type:Ge.literal,value:n.getNumberFormat(t,h).format(m)});continue}if(Qo(d)){var b=d.children,A=d.value,w=i[A];if(!ou(w))throw new Ud(A,"function",s);var y=dr(b,t,n,r,i,a),_=w(y.map(function(I){return I.value}));Array.isArray(_)||(_=[_]),o.push.apply(o,_.map(function(I){return{type:typeof I=="string"?Ge.literal:Ge.object,value:I}}))}if(Wo(d)){var S=d.options[m]||d.options.other;if(!S)throw new Za(d.value,m,Object.keys(d.options),s);o.push.apply(o,dr(S.value,t,n,r,i));continue}if(Xo(d)){var S=d.options["=".concat(m)];if(!S){if(!Intl.PluralRules)throw new Mt(`Intl.PluralRules is not available in this environment.
26
+ */var hs;function Jd(){return hs||(hs=1,process.env.NODE_ENV!=="production"&&(function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,i=e?Symbol.for("react.strict_mode"):60108,a=e?Symbol.for("react.profiler"):60114,s=e?Symbol.for("react.provider"):60109,o=e?Symbol.for("react.context"):60110,u=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,d=e?Symbol.for("react.forward_ref"):60112,f=e?Symbol.for("react.suspense"):60113,p=e?Symbol.for("react.suspense_list"):60120,h=e?Symbol.for("react.memo"):60115,b=e?Symbol.for("react.lazy"):60116,y=e?Symbol.for("react.block"):60121,w=e?Symbol.for("react.fundamental"):60117,_=e?Symbol.for("react.responder"):60118,k=e?Symbol.for("react.scope"):60119;function N(G){return typeof G=="string"||typeof G=="function"||G===r||G===c||G===a||G===i||G===f||G===p||typeof G=="object"&&G!==null&&(G.$$typeof===b||G.$$typeof===h||G.$$typeof===s||G.$$typeof===o||G.$$typeof===d||G.$$typeof===w||G.$$typeof===_||G.$$typeof===k||G.$$typeof===y)}function L(G){if(typeof G=="object"&&G!==null){var De=G.$$typeof;switch(De){case t:var Fe=G.type;switch(Fe){case u:case c:case r:case a:case i:case f:return Fe;default:var Ve=Fe&&Fe.$$typeof;switch(Ve){case o:case d:case b:case h:case s:return Ve;default:return De}}case n:return De}}}var A=u,v=c,z=o,K=s,Q=t,I=d,H=r,$=b,P=h,j=n,X=a,Ee=i,pe=f,Oe=!1;function ke(G){return Oe||(Oe=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),m(G)||L(G)===u}function m(G){return L(G)===c}function Y(G){return L(G)===o}function ee(G){return L(G)===s}function T(G){return typeof G=="object"&&G!==null&&G.$$typeof===t}function W(G){return L(G)===d}function ne(G){return L(G)===r}function q(G){return L(G)===b}function se(G){return L(G)===h}function re(G){return L(G)===n}function le(G){return L(G)===a}function ie(G){return L(G)===i}function Ae(G){return L(G)===f}Ie.AsyncMode=A,Ie.ConcurrentMode=v,Ie.ContextConsumer=z,Ie.ContextProvider=K,Ie.Element=Q,Ie.ForwardRef=I,Ie.Fragment=H,Ie.Lazy=$,Ie.Memo=P,Ie.Portal=j,Ie.Profiler=X,Ie.StrictMode=Ee,Ie.Suspense=pe,Ie.isAsyncMode=ke,Ie.isConcurrentMode=m,Ie.isContextConsumer=Y,Ie.isContextProvider=ee,Ie.isElement=T,Ie.isForwardRef=W,Ie.isFragment=ne,Ie.isLazy=q,Ie.isMemo=se,Ie.isPortal=re,Ie.isProfiler=le,Ie.isStrictMode=ie,Ie.isSuspense=Ae,Ie.isValidElementType=N,Ie.typeOf=L})()),Ie}var ps;function _a(){return ps||(ps=1,process.env.NODE_ENV==="production"?or.exports=Zd():or.exports=Jd()),or.exports}var ui,ms;function ef(){if(ms)return ui;ms=1;var e=_a(),t={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},n={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},r={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},i={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},a={};a[e.ForwardRef]=r,a[e.Memo]=i;function s(b){return e.isMemo(b)?i:a[b.$$typeof]||t}var o=Object.defineProperty,u=Object.getOwnPropertyNames,c=Object.getOwnPropertySymbols,d=Object.getOwnPropertyDescriptor,f=Object.getPrototypeOf,p=Object.prototype;function h(b,y,w){if(typeof y!="string"){if(p){var _=f(y);_&&_!==p&&h(b,_,w)}var k=u(y);c&&(k=k.concat(c(y)));for(var N=s(b),L=s(y),A=0;A<k.length;++A){var v=k[A];if(!n[v]&&!(w&&w[v])&&!(L&&L[v])&&!(N&&N[v])){var z=d(y,v);try{o(b,v,z)}catch{}}}}return b}return ui=h,ui}ef();function gu(e,t,n){if(n===void 0&&(n=Error),!e)throw new n(t)}var ye;(function(e){e[e.EXPECT_ARGUMENT_CLOSING_BRACE=1]="EXPECT_ARGUMENT_CLOSING_BRACE",e[e.EMPTY_ARGUMENT=2]="EMPTY_ARGUMENT",e[e.MALFORMED_ARGUMENT=3]="MALFORMED_ARGUMENT",e[e.EXPECT_ARGUMENT_TYPE=4]="EXPECT_ARGUMENT_TYPE",e[e.INVALID_ARGUMENT_TYPE=5]="INVALID_ARGUMENT_TYPE",e[e.EXPECT_ARGUMENT_STYLE=6]="EXPECT_ARGUMENT_STYLE",e[e.INVALID_NUMBER_SKELETON=7]="INVALID_NUMBER_SKELETON",e[e.INVALID_DATE_TIME_SKELETON=8]="INVALID_DATE_TIME_SKELETON",e[e.EXPECT_NUMBER_SKELETON=9]="EXPECT_NUMBER_SKELETON",e[e.EXPECT_DATE_TIME_SKELETON=10]="EXPECT_DATE_TIME_SKELETON",e[e.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE=11]="UNCLOSED_QUOTE_IN_ARGUMENT_STYLE",e[e.EXPECT_SELECT_ARGUMENT_OPTIONS=12]="EXPECT_SELECT_ARGUMENT_OPTIONS",e[e.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE=13]="EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE",e[e.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE=14]="INVALID_PLURAL_ARGUMENT_OFFSET_VALUE",e[e.EXPECT_SELECT_ARGUMENT_SELECTOR=15]="EXPECT_SELECT_ARGUMENT_SELECTOR",e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR=16]="EXPECT_PLURAL_ARGUMENT_SELECTOR",e[e.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT=17]="EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT",e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT=18]="EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT",e[e.INVALID_PLURAL_ARGUMENT_SELECTOR=19]="INVALID_PLURAL_ARGUMENT_SELECTOR",e[e.DUPLICATE_PLURAL_ARGUMENT_SELECTOR=20]="DUPLICATE_PLURAL_ARGUMENT_SELECTOR",e[e.DUPLICATE_SELECT_ARGUMENT_SELECTOR=21]="DUPLICATE_SELECT_ARGUMENT_SELECTOR",e[e.MISSING_OTHER_CLAUSE=22]="MISSING_OTHER_CLAUSE",e[e.INVALID_TAG=23]="INVALID_TAG",e[e.INVALID_TAG_NAME=25]="INVALID_TAG_NAME",e[e.UNMATCHED_CLOSING_TAG=26]="UNMATCHED_CLOSING_TAG",e[e.UNCLOSED_TAG=27]="UNCLOSED_TAG"})(ye||(ye={}));var Re;(function(e){e[e.literal=0]="literal",e[e.argument=1]="argument",e[e.number=2]="number",e[e.date=3]="date",e[e.time=4]="time",e[e.select=5]="select",e[e.plural=6]="plural",e[e.pound=7]="pound",e[e.tag=8]="tag"})(Re||(Re={}));var Tn;(function(e){e[e.number=0]="number",e[e.dateTime=1]="dateTime"})(Tn||(Tn={}));function gs(e){return e.type===Re.literal}function tf(e){return e.type===Re.argument}function bu(e){return e.type===Re.number}function Eu(e){return e.type===Re.date}function Tu(e){return e.type===Re.time}function yu(e){return e.type===Re.select}function xu(e){return e.type===Re.plural}function nf(e){return e.type===Re.pound}function Su(e){return e.type===Re.tag}function _u(e){return!!(e&&typeof e=="object"&&e.type===Tn.number)}function Yi(e){return!!(e&&typeof e=="object"&&e.type===Tn.dateTime)}var Cu=/[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/,rf=/(?:[Eec]{1,6}|G{1,5}|[Qq]{1,5}|(?:[yYur]+|U{1,5})|[ML]{1,5}|d{1,2}|D{1,3}|F{1}|[abB]{1,5}|[hkHK]{1,2}|w{1,2}|W{1}|m{1,2}|s{1,2}|[zZOvVxX]{1,4})(?=([^']*'[^']*')*[^']*$)/g;function af(e){var t={};return e.replace(rf,function(n){var r=n.length;switch(n[0]){case"G":t.era=r===4?"long":r===5?"narrow":"short";break;case"y":t.year=r===2?"2-digit":"numeric";break;case"Y":case"u":case"U":case"r":throw new RangeError("`Y/u/U/r` (year) patterns are not supported, use `y` instead");case"q":case"Q":throw new RangeError("`q/Q` (quarter) patterns are not supported");case"M":case"L":t.month=["numeric","2-digit","short","long","narrow"][r-1];break;case"w":case"W":throw new RangeError("`w/W` (week) patterns are not supported");case"d":t.day=["numeric","2-digit"][r-1];break;case"D":case"F":case"g":throw new RangeError("`D/F/g` (day) patterns are not supported, use `d` instead");case"E":t.weekday=r===4?"long":r===5?"narrow":"short";break;case"e":if(r<4)throw new RangeError("`e..eee` (weekday) patterns are not supported");t.weekday=["short","long","narrow","short"][r-4];break;case"c":if(r<4)throw new RangeError("`c..ccc` (weekday) patterns are not supported");t.weekday=["short","long","narrow","short"][r-4];break;case"a":t.hour12=!0;break;case"b":case"B":throw new RangeError("`b/B` (period) patterns are not supported, use `a` instead");case"h":t.hourCycle="h12",t.hour=["numeric","2-digit"][r-1];break;case"H":t.hourCycle="h23",t.hour=["numeric","2-digit"][r-1];break;case"K":t.hourCycle="h11",t.hour=["numeric","2-digit"][r-1];break;case"k":t.hourCycle="h24",t.hour=["numeric","2-digit"][r-1];break;case"j":case"J":case"C":throw new RangeError("`j/J/C` (hour) patterns are not supported, use `h/H/K/k` instead");case"m":t.minute=["numeric","2-digit"][r-1];break;case"s":t.second=["numeric","2-digit"][r-1];break;case"S":case"A":throw new RangeError("`S/A` (second) patterns are not supported, use `s` instead");case"z":t.timeZoneName=r<4?"short":"long";break;case"Z":case"O":case"v":case"V":case"X":case"x":throw new RangeError("`Z/O/v/V/X/x` (timeZone) patterns are not supported, use `z` instead")}return""}),t}var sf=/[\t-\r \x85\u200E\u200F\u2028\u2029]/i;function of(e){if(e.length===0)throw new Error("Number skeleton cannot be empty");for(var t=e.split(sf).filter(function(p){return p.length>0}),n=[],r=0,i=t;r<i.length;r++){var a=i[r],s=a.split("/");if(s.length===0)throw new Error("Invalid number skeleton");for(var o=s[0],u=s.slice(1),c=0,d=u;c<d.length;c++){var f=d[c];if(f.length===0)throw new Error("Invalid number skeleton")}n.push({stem:o,options:u})}return n}function uf(e){return e.replace(/^(.*?)-/,"")}var bs=/^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g,Au=/^(@+)?(\+|#+)?[rs]?$/g,lf=/(\*)(0+)|(#+)(0+)|(0+)/g,wu=/^(0+)$/;function Es(e){var t={};return e[e.length-1]==="r"?t.roundingPriority="morePrecision":e[e.length-1]==="s"&&(t.roundingPriority="lessPrecision"),e.replace(Au,function(n,r,i){return typeof i!="string"?(t.minimumSignificantDigits=r.length,t.maximumSignificantDigits=r.length):i==="+"?t.minimumSignificantDigits=r.length:r[0]==="#"?t.maximumSignificantDigits=r.length:(t.minimumSignificantDigits=r.length,t.maximumSignificantDigits=r.length+(typeof i=="string"?i.length:0)),""}),t}function Iu(e){switch(e){case"sign-auto":return{signDisplay:"auto"};case"sign-accounting":case"()":return{currencySign:"accounting"};case"sign-always":case"+!":return{signDisplay:"always"};case"sign-accounting-always":case"()!":return{signDisplay:"always",currencySign:"accounting"};case"sign-except-zero":case"+?":return{signDisplay:"exceptZero"};case"sign-accounting-except-zero":case"()?":return{signDisplay:"exceptZero",currencySign:"accounting"};case"sign-never":case"+_":return{signDisplay:"never"}}}function cf(e){var t;if(e[0]==="E"&&e[1]==="E"?(t={notation:"engineering"},e=e.slice(2)):e[0]==="E"&&(t={notation:"scientific"},e=e.slice(1)),t){var n=e.slice(0,2);if(n==="+!"?(t.signDisplay="always",e=e.slice(2)):n==="+?"&&(t.signDisplay="exceptZero",e=e.slice(2)),!wu.test(e))throw new Error("Malformed concise eng/scientific notation");t.minimumIntegerDigits=e.length}return t}function Ts(e){var t={},n=Iu(e);return n||t}function df(e){for(var t={},n=0,r=e;n<r.length;n++){var i=r[n];switch(i.stem){case"percent":case"%":t.style="percent";continue;case"%x100":t.style="percent",t.scale=100;continue;case"currency":t.style="currency",t.currency=i.options[0];continue;case"group-off":case",_":t.useGrouping=!1;continue;case"precision-integer":case".":t.maximumFractionDigits=0;continue;case"measure-unit":case"unit":t.style="unit",t.unit=uf(i.options[0]);continue;case"compact-short":case"K":t.notation="compact",t.compactDisplay="short";continue;case"compact-long":case"KK":t.notation="compact",t.compactDisplay="long";continue;case"scientific":t=J(J(J({},t),{notation:"scientific"}),i.options.reduce(function(u,c){return J(J({},u),Ts(c))},{}));continue;case"engineering":t=J(J(J({},t),{notation:"engineering"}),i.options.reduce(function(u,c){return J(J({},u),Ts(c))},{}));continue;case"notation-simple":t.notation="standard";continue;case"unit-width-narrow":t.currencyDisplay="narrowSymbol",t.unitDisplay="narrow";continue;case"unit-width-short":t.currencyDisplay="code",t.unitDisplay="short";continue;case"unit-width-full-name":t.currencyDisplay="name",t.unitDisplay="long";continue;case"unit-width-iso-code":t.currencyDisplay="symbol";continue;case"scale":t.scale=parseFloat(i.options[0]);continue;case"rounding-mode-floor":t.roundingMode="floor";continue;case"rounding-mode-ceiling":t.roundingMode="ceil";continue;case"rounding-mode-down":t.roundingMode="trunc";continue;case"rounding-mode-up":t.roundingMode="expand";continue;case"rounding-mode-half-even":t.roundingMode="halfEven";continue;case"rounding-mode-half-down":t.roundingMode="halfTrunc";continue;case"rounding-mode-half-up":t.roundingMode="halfExpand";continue;case"integer-width":if(i.options.length>1)throw new RangeError("integer-width stems only accept a single optional option");i.options[0].replace(lf,function(u,c,d,f,p,h){if(c)t.minimumIntegerDigits=d.length;else{if(f&&p)throw new Error("We currently do not support maximum integer digits");if(h)throw new Error("We currently do not support exact integer digits")}return""});continue}if(wu.test(i.stem)){t.minimumIntegerDigits=i.stem.length;continue}if(bs.test(i.stem)){if(i.options.length>1)throw new RangeError("Fraction-precision stems only accept a single optional option");i.stem.replace(bs,function(u,c,d,f,p,h){return d==="*"?t.minimumFractionDigits=c.length:f&&f[0]==="#"?t.maximumFractionDigits=f.length:p&&h?(t.minimumFractionDigits=p.length,t.maximumFractionDigits=p.length+h.length):(t.minimumFractionDigits=c.length,t.maximumFractionDigits=c.length),""});var a=i.options[0];a==="w"?t=J(J({},t),{trailingZeroDisplay:"stripIfInteger"}):a&&(t=J(J({},t),Es(a)));continue}if(Au.test(i.stem)){t=J(J({},t),Es(i.stem));continue}var s=Iu(i.stem);s&&(t=J(J({},t),s));var o=cf(i.stem);o&&(t=J(J({},t),o))}return t}var ur={"001":["H","h"],AC:["H","h","hb","hB"],AD:["H","hB"],AE:["h","hB","hb","H"],AF:["H","hb","hB","h"],AG:["h","hb","H","hB"],AI:["H","h","hb","hB"],AL:["h","H","hB"],AM:["H","hB"],AO:["H","hB"],AR:["H","h","hB","hb"],AS:["h","H"],AT:["H","hB"],AU:["h","hb","H","hB"],AW:["H","hB"],AX:["H"],AZ:["H","hB","h"],BA:["H","hB","h"],BB:["h","hb","H","hB"],BD:["h","hB","H"],BE:["H","hB"],BF:["H","hB"],BG:["H","hB","h"],BH:["h","hB","hb","H"],BI:["H","h"],BJ:["H","hB"],BL:["H","hB"],BM:["h","hb","H","hB"],BN:["hb","hB","h","H"],BO:["H","hB","h","hb"],BQ:["H"],BR:["H","hB"],BS:["h","hb","H","hB"],BT:["h","H"],BW:["H","h","hb","hB"],BY:["H","h"],BZ:["H","h","hb","hB"],CA:["h","hb","H","hB"],CC:["H","h","hb","hB"],CD:["hB","H"],CF:["H","h","hB"],CG:["H","hB"],CH:["H","hB","h"],CI:["H","hB"],CK:["H","h","hb","hB"],CL:["H","h","hB","hb"],CM:["H","h","hB"],CN:["H","hB","hb","h"],CO:["h","H","hB","hb"],CP:["H"],CR:["H","h","hB","hb"],CU:["H","h","hB","hb"],CV:["H","hB"],CW:["H","hB"],CX:["H","h","hb","hB"],CY:["h","H","hb","hB"],CZ:["H"],DE:["H","hB"],DG:["H","h","hb","hB"],DJ:["h","H"],DK:["H"],DM:["h","hb","H","hB"],DO:["h","H","hB","hb"],DZ:["h","hB","hb","H"],EA:["H","h","hB","hb"],EC:["H","hB","h","hb"],EE:["H","hB"],EG:["h","hB","hb","H"],EH:["h","hB","hb","H"],ER:["h","H"],ES:["H","hB","h","hb"],ET:["hB","hb","h","H"],FI:["H"],FJ:["h","hb","H","hB"],FK:["H","h","hb","hB"],FM:["h","hb","H","hB"],FO:["H","h"],FR:["H","hB"],GA:["H","hB"],GB:["H","h","hb","hB"],GD:["h","hb","H","hB"],GE:["H","hB","h"],GF:["H","hB"],GG:["H","h","hb","hB"],GH:["h","H"],GI:["H","h","hb","hB"],GL:["H","h"],GM:["h","hb","H","hB"],GN:["H","hB"],GP:["H","hB"],GQ:["H","hB","h","hb"],GR:["h","H","hb","hB"],GT:["H","h","hB","hb"],GU:["h","hb","H","hB"],GW:["H","hB"],GY:["h","hb","H","hB"],HK:["h","hB","hb","H"],HN:["H","h","hB","hb"],HR:["H","hB"],HU:["H","h"],IC:["H","h","hB","hb"],ID:["H"],IE:["H","h","hb","hB"],IL:["H","hB"],IM:["H","h","hb","hB"],IN:["h","H"],IO:["H","h","hb","hB"],IQ:["h","hB","hb","H"],IR:["hB","H"],IS:["H"],IT:["H","hB"],JE:["H","h","hb","hB"],JM:["h","hb","H","hB"],JO:["h","hB","hb","H"],JP:["H","K","h"],KE:["hB","hb","H","h"],KG:["H","h","hB","hb"],KH:["hB","h","H","hb"],KI:["h","hb","H","hB"],KM:["H","h","hB","hb"],KN:["h","hb","H","hB"],KP:["h","H","hB","hb"],KR:["h","H","hB","hb"],KW:["h","hB","hb","H"],KY:["h","hb","H","hB"],KZ:["H","hB"],LA:["H","hb","hB","h"],LB:["h","hB","hb","H"],LC:["h","hb","H","hB"],LI:["H","hB","h"],LK:["H","h","hB","hb"],LR:["h","hb","H","hB"],LS:["h","H"],LT:["H","h","hb","hB"],LU:["H","h","hB"],LV:["H","hB","hb","h"],LY:["h","hB","hb","H"],MA:["H","h","hB","hb"],MC:["H","hB"],MD:["H","hB"],ME:["H","hB","h"],MF:["H","hB"],MG:["H","h"],MH:["h","hb","H","hB"],MK:["H","h","hb","hB"],ML:["H"],MM:["hB","hb","H","h"],MN:["H","h","hb","hB"],MO:["h","hB","hb","H"],MP:["h","hb","H","hB"],MQ:["H","hB"],MR:["h","hB","hb","H"],MS:["H","h","hb","hB"],MT:["H","h"],MU:["H","h"],MV:["H","h"],MW:["h","hb","H","hB"],MX:["H","h","hB","hb"],MY:["hb","hB","h","H"],MZ:["H","hB"],NA:["h","H","hB","hb"],NC:["H","hB"],NE:["H"],NF:["H","h","hb","hB"],NG:["H","h","hb","hB"],NI:["H","h","hB","hb"],NL:["H","hB"],NO:["H","h"],NP:["H","h","hB"],NR:["H","h","hb","hB"],NU:["H","h","hb","hB"],NZ:["h","hb","H","hB"],OM:["h","hB","hb","H"],PA:["h","H","hB","hb"],PE:["H","hB","h","hb"],PF:["H","h","hB"],PG:["h","H"],PH:["h","hB","hb","H"],PK:["h","hB","H"],PL:["H","h"],PM:["H","hB"],PN:["H","h","hb","hB"],PR:["h","H","hB","hb"],PS:["h","hB","hb","H"],PT:["H","hB"],PW:["h","H"],PY:["H","h","hB","hb"],QA:["h","hB","hb","H"],RE:["H","hB"],RO:["H","hB"],RS:["H","hB","h"],RU:["H"],RW:["H","h"],SA:["h","hB","hb","H"],SB:["h","hb","H","hB"],SC:["H","h","hB"],SD:["h","hB","hb","H"],SE:["H"],SG:["h","hb","H","hB"],SH:["H","h","hb","hB"],SI:["H","hB"],SJ:["H"],SK:["H"],SL:["h","hb","H","hB"],SM:["H","h","hB"],SN:["H","h","hB"],SO:["h","H"],SR:["H","hB"],SS:["h","hb","H","hB"],ST:["H","hB"],SV:["H","h","hB","hb"],SX:["H","h","hb","hB"],SY:["h","hB","hb","H"],SZ:["h","hb","H","hB"],TA:["H","h","hb","hB"],TC:["h","hb","H","hB"],TD:["h","H","hB"],TF:["H","h","hB"],TG:["H","hB"],TH:["H","h"],TJ:["H","h"],TL:["H","hB","hb","h"],TM:["H","h"],TN:["h","hB","hb","H"],TO:["h","H"],TR:["H","hB"],TT:["h","hb","H","hB"],TW:["hB","hb","h","H"],TZ:["hB","hb","H","h"],UA:["H","hB","h"],UG:["hB","hb","H","h"],UM:["h","hb","H","hB"],US:["h","hb","H","hB"],UY:["H","h","hB","hb"],UZ:["H","hB","h"],VA:["H","h","hB"],VC:["h","hb","H","hB"],VE:["h","H","hB","hb"],VG:["h","hb","H","hB"],VI:["h","hb","H","hB"],VN:["H","h"],VU:["h","H"],WF:["H","hB"],WS:["h","H"],XK:["H","hB","h"],YE:["h","hB","hb","H"],YT:["H","hB"],ZA:["H","h","hb","hB"],ZM:["h","hb","H","hB"],ZW:["H","h"],"af-ZA":["H","h","hB","hb"],"ar-001":["h","hB","hb","H"],"ca-ES":["H","h","hB"],"en-001":["h","hb","H","hB"],"es-BO":["H","h","hB","hb"],"es-BR":["H","h","hB","hb"],"es-EC":["H","h","hB","hb"],"es-ES":["H","h","hB","hb"],"es-GQ":["H","h","hB","hb"],"es-PE":["H","h","hB","hb"],"fr-CA":["H","h","hB"],"gl-ES":["H","h","hB"],"gu-IN":["hB","hb","h","H"],"hi-IN":["hB","h","H"],"it-CH":["H","h","hB"],"it-IT":["H","h","hB"],"kn-IN":["hB","h","H"],"ml-IN":["hB","h","H"],"mr-IN":["hB","hb","h","H"],"pa-IN":["hB","hb","h","H"],"ta-IN":["hB","h","hb","H"],"te-IN":["hB","h","H"],"zu-ZA":["H","hB","hb","h"]};function ff(e,t){for(var n="",r=0;r<e.length;r++){var i=e.charAt(r);if(i==="j"){for(var a=0;r+1<e.length&&e.charAt(r+1)===i;)a++,r++;var s=1+(a&1),o=a<2?1:3+(a>>1),u="a",c=hf(t);for((c=="H"||c=="k")&&(o=0);o-- >0;)n+=u;for(;s-- >0;)n=c+n}else i==="J"?n+="H":n+=i}return n}function hf(e){var t=e.hourCycle;if(t===void 0&&e.hourCycles&&e.hourCycles.length&&(t=e.hourCycles[0]),t)switch(t){case"h24":return"k";case"h23":return"H";case"h12":return"h";case"h11":return"K";default:throw new Error("Invalid hourCycle")}var n=e.language,r;n!=="root"&&(r=e.maximize().region);var i=ur[r||""]||ur[n||""]||ur["".concat(n,"-001")]||ur["001"];return i[0]}var li,pf=new RegExp("^".concat(Cu.source,"*")),mf=new RegExp("".concat(Cu.source,"*$"));function xe(e,t){return{start:e,end:t}}var gf=!!String.prototype.startsWith&&"_a".startsWith("a",1),bf=!!String.fromCodePoint,Ef=!!Object.fromEntries,Tf=!!String.prototype.codePointAt,yf=!!String.prototype.trimStart,xf=!!String.prototype.trimEnd,Sf=!!Number.isSafeInteger,_f=Sf?Number.isSafeInteger:function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e&&Math.abs(e)<=9007199254740991},Gi=!0;try{var Cf=ku("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");Gi=((li=Cf.exec("a"))===null||li===void 0?void 0:li[0])==="a"}catch{Gi=!1}var ys=gf?function(t,n,r){return t.startsWith(n,r)}:function(t,n,r){return t.slice(r,r+n.length)===n},qi=bf?String.fromCodePoint:function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];for(var r="",i=t.length,a=0,s;i>a;){if(s=t[a++],s>1114111)throw RangeError(s+" is not a valid code point");r+=s<65536?String.fromCharCode(s):String.fromCharCode(((s-=65536)>>10)+55296,s%1024+56320)}return r},xs=Ef?Object.fromEntries:function(t){for(var n={},r=0,i=t;r<i.length;r++){var a=i[r],s=a[0],o=a[1];n[s]=o}return n},vu=Tf?function(t,n){return t.codePointAt(n)}:function(t,n){var r=t.length;if(!(n<0||n>=r)){var i=t.charCodeAt(n),a;return i<55296||i>56319||n+1===r||(a=t.charCodeAt(n+1))<56320||a>57343?i:(i-55296<<10)+(a-56320)+65536}},Af=yf?function(t){return t.trimStart()}:function(t){return t.replace(pf,"")},wf=xf?function(t){return t.trimEnd()}:function(t){return t.replace(mf,"")};function ku(e,t){return new RegExp(e,t)}var Vi;if(Gi){var Ss=ku("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");Vi=function(t,n){var r;Ss.lastIndex=n;var i=Ss.exec(t);return(r=i[1])!==null&&r!==void 0?r:""}}else Vi=function(t,n){for(var r=[];;){var i=vu(t,n);if(i===void 0||Nu(i)||Nf(i))break;r.push(i),n+=i>=65536?2:1}return qi.apply(void 0,r)};var If=(function(){function e(t,n){n===void 0&&(n={}),this.message=t,this.position={offset:0,line:1,column:1},this.ignoreTag=!!n.ignoreTag,this.locale=n.locale,this.requiresOtherClause=!!n.requiresOtherClause,this.shouldParseSkeletons=!!n.shouldParseSkeletons}return e.prototype.parse=function(){if(this.offset()!==0)throw Error("parser can only be used once");return this.parseMessage(0,"",!1)},e.prototype.parseMessage=function(t,n,r){for(var i=[];!this.isEOF();){var a=this.char();if(a===123){var s=this.parseArgument(t,r);if(s.err)return s;i.push(s.val)}else{if(a===125&&t>0)break;if(a===35&&(n==="plural"||n==="selectordinal")){var o=this.clonePosition();this.bump(),i.push({type:Re.pound,location:xe(o,this.clonePosition())})}else if(a===60&&!this.ignoreTag&&this.peek()===47){if(r)break;return this.error(ye.UNMATCHED_CLOSING_TAG,xe(this.clonePosition(),this.clonePosition()))}else if(a===60&&!this.ignoreTag&&Wi(this.peek()||0)){var s=this.parseTag(t,n);if(s.err)return s;i.push(s.val)}else{var s=this.parseLiteral(t,n);if(s.err)return s;i.push(s.val)}}}return{val:i,err:null}},e.prototype.parseTag=function(t,n){var r=this.clonePosition();this.bump();var i=this.parseTagName();if(this.bumpSpace(),this.bumpIf("/>"))return{val:{type:Re.literal,value:"<".concat(i,"/>"),location:xe(r,this.clonePosition())},err:null};if(this.bumpIf(">")){var a=this.parseMessage(t+1,n,!0);if(a.err)return a;var s=a.val,o=this.clonePosition();if(this.bumpIf("</")){if(this.isEOF()||!Wi(this.char()))return this.error(ye.INVALID_TAG,xe(o,this.clonePosition()));var u=this.clonePosition(),c=this.parseTagName();return i!==c?this.error(ye.UNMATCHED_CLOSING_TAG,xe(u,this.clonePosition())):(this.bumpSpace(),this.bumpIf(">")?{val:{type:Re.tag,value:i,children:s,location:xe(r,this.clonePosition())},err:null}:this.error(ye.INVALID_TAG,xe(o,this.clonePosition())))}else return this.error(ye.UNCLOSED_TAG,xe(r,this.clonePosition()))}else return this.error(ye.INVALID_TAG,xe(r,this.clonePosition()))},e.prototype.parseTagName=function(){var t=this.offset();for(this.bump();!this.isEOF()&&kf(this.char());)this.bump();return this.message.slice(t,this.offset())},e.prototype.parseLiteral=function(t,n){for(var r=this.clonePosition(),i="";;){var a=this.tryParseQuote(n);if(a){i+=a;continue}var s=this.tryParseUnquoted(t,n);if(s){i+=s;continue}var o=this.tryParseLeftAngleBracket();if(o){i+=o;continue}break}var u=xe(r,this.clonePosition());return{val:{type:Re.literal,value:i,location:u},err:null}},e.prototype.tryParseLeftAngleBracket=function(){return!this.isEOF()&&this.char()===60&&(this.ignoreTag||!vf(this.peek()||0))?(this.bump(),"<"):null},e.prototype.tryParseQuote=function(t){if(this.isEOF()||this.char()!==39)return null;switch(this.peek()){case 39:return this.bump(),this.bump(),"'";case 123:case 60:case 62:case 125:break;case 35:if(t==="plural"||t==="selectordinal")break;return null;default:return null}this.bump();var n=[this.char()];for(this.bump();!this.isEOF();){var r=this.char();if(r===39)if(this.peek()===39)n.push(39),this.bump();else{this.bump();break}else n.push(r);this.bump()}return qi.apply(void 0,n)},e.prototype.tryParseUnquoted=function(t,n){if(this.isEOF())return null;var r=this.char();return r===60||r===123||r===35&&(n==="plural"||n==="selectordinal")||r===125&&t>0?null:(this.bump(),qi(r))},e.prototype.parseArgument=function(t,n){var r=this.clonePosition();if(this.bump(),this.bumpSpace(),this.isEOF())return this.error(ye.EXPECT_ARGUMENT_CLOSING_BRACE,xe(r,this.clonePosition()));if(this.char()===125)return this.bump(),this.error(ye.EMPTY_ARGUMENT,xe(r,this.clonePosition()));var i=this.parseIdentifierIfPossible().value;if(!i)return this.error(ye.MALFORMED_ARGUMENT,xe(r,this.clonePosition()));if(this.bumpSpace(),this.isEOF())return this.error(ye.EXPECT_ARGUMENT_CLOSING_BRACE,xe(r,this.clonePosition()));switch(this.char()){case 125:return this.bump(),{val:{type:Re.argument,value:i,location:xe(r,this.clonePosition())},err:null};case 44:return this.bump(),this.bumpSpace(),this.isEOF()?this.error(ye.EXPECT_ARGUMENT_CLOSING_BRACE,xe(r,this.clonePosition())):this.parseArgumentOptions(t,n,i,r);default:return this.error(ye.MALFORMED_ARGUMENT,xe(r,this.clonePosition()))}},e.prototype.parseIdentifierIfPossible=function(){var t=this.clonePosition(),n=this.offset(),r=Vi(this.message,n),i=n+r.length;this.bumpTo(i);var a=this.clonePosition(),s=xe(t,a);return{value:r,location:s}},e.prototype.parseArgumentOptions=function(t,n,r,i){var a,s=this.clonePosition(),o=this.parseIdentifierIfPossible().value,u=this.clonePosition();switch(o){case"":return this.error(ye.EXPECT_ARGUMENT_TYPE,xe(s,u));case"number":case"date":case"time":{this.bumpSpace();var c=null;if(this.bumpIf(",")){this.bumpSpace();var d=this.clonePosition(),f=this.parseSimpleArgStyleIfPossible();if(f.err)return f;var p=wf(f.val);if(p.length===0)return this.error(ye.EXPECT_ARGUMENT_STYLE,xe(this.clonePosition(),this.clonePosition()));var h=xe(d,this.clonePosition());c={style:p,styleLocation:h}}var b=this.tryParseArgumentClose(i);if(b.err)return b;var y=xe(i,this.clonePosition());if(c&&ys(c?.style,"::",0)){var w=Af(c.style.slice(2));if(o==="number"){var f=this.parseNumberSkeletonFromString(w,c.styleLocation);return f.err?f:{val:{type:Re.number,value:r,location:y,style:f.val},err:null}}else{if(w.length===0)return this.error(ye.EXPECT_DATE_TIME_SKELETON,y);var _=w;this.locale&&(_=ff(w,this.locale));var p={type:Tn.dateTime,pattern:_,location:c.styleLocation,parsedOptions:this.shouldParseSkeletons?af(_):{}},k=o==="date"?Re.date:Re.time;return{val:{type:k,value:r,location:y,style:p},err:null}}}return{val:{type:o==="number"?Re.number:o==="date"?Re.date:Re.time,value:r,location:y,style:(a=c?.style)!==null&&a!==void 0?a:null},err:null}}case"plural":case"selectordinal":case"select":{var N=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(","))return this.error(ye.EXPECT_SELECT_ARGUMENT_OPTIONS,xe(N,J({},N)));this.bumpSpace();var L=this.parseIdentifierIfPossible(),A=0;if(o!=="select"&&L.value==="offset"){if(!this.bumpIf(":"))return this.error(ye.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,xe(this.clonePosition(),this.clonePosition()));this.bumpSpace();var f=this.tryParseDecimalInteger(ye.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,ye.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE);if(f.err)return f;this.bumpSpace(),L=this.parseIdentifierIfPossible(),A=f.val}var v=this.tryParsePluralOrSelectOptions(t,o,n,L);if(v.err)return v;var b=this.tryParseArgumentClose(i);if(b.err)return b;var z=xe(i,this.clonePosition());return o==="select"?{val:{type:Re.select,value:r,options:xs(v.val),location:z},err:null}:{val:{type:Re.plural,value:r,options:xs(v.val),offset:A,pluralType:o==="plural"?"cardinal":"ordinal",location:z},err:null}}default:return this.error(ye.INVALID_ARGUMENT_TYPE,xe(s,u))}},e.prototype.tryParseArgumentClose=function(t){return this.isEOF()||this.char()!==125?this.error(ye.EXPECT_ARGUMENT_CLOSING_BRACE,xe(t,this.clonePosition())):(this.bump(),{val:!0,err:null})},e.prototype.parseSimpleArgStyleIfPossible=function(){for(var t=0,n=this.clonePosition();!this.isEOF();){var r=this.char();switch(r){case 39:{this.bump();var i=this.clonePosition();if(!this.bumpUntil("'"))return this.error(ye.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE,xe(i,this.clonePosition()));this.bump();break}case 123:{t+=1,this.bump();break}case 125:{if(t>0)t-=1;else return{val:this.message.slice(n.offset,this.offset()),err:null};break}default:this.bump();break}}return{val:this.message.slice(n.offset,this.offset()),err:null}},e.prototype.parseNumberSkeletonFromString=function(t,n){var r=[];try{r=of(t)}catch{return this.error(ye.INVALID_NUMBER_SKELETON,n)}return{val:{type:Tn.number,tokens:r,location:n,parsedOptions:this.shouldParseSkeletons?df(r):{}},err:null}},e.prototype.tryParsePluralOrSelectOptions=function(t,n,r,i){for(var a,s=!1,o=[],u=new Set,c=i.value,d=i.location;;){if(c.length===0){var f=this.clonePosition();if(n!=="select"&&this.bumpIf("=")){var p=this.tryParseDecimalInteger(ye.EXPECT_PLURAL_ARGUMENT_SELECTOR,ye.INVALID_PLURAL_ARGUMENT_SELECTOR);if(p.err)return p;d=xe(f,this.clonePosition()),c=this.message.slice(f.offset,this.offset())}else break}if(u.has(c))return this.error(n==="select"?ye.DUPLICATE_SELECT_ARGUMENT_SELECTOR:ye.DUPLICATE_PLURAL_ARGUMENT_SELECTOR,d);c==="other"&&(s=!0),this.bumpSpace();var h=this.clonePosition();if(!this.bumpIf("{"))return this.error(n==="select"?ye.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT:ye.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT,xe(this.clonePosition(),this.clonePosition()));var b=this.parseMessage(t+1,n,r);if(b.err)return b;var y=this.tryParseArgumentClose(h);if(y.err)return y;o.push([c,{value:b.val,location:xe(h,this.clonePosition())}]),u.add(c),this.bumpSpace(),a=this.parseIdentifierIfPossible(),c=a.value,d=a.location}return o.length===0?this.error(n==="select"?ye.EXPECT_SELECT_ARGUMENT_SELECTOR:ye.EXPECT_PLURAL_ARGUMENT_SELECTOR,xe(this.clonePosition(),this.clonePosition())):this.requiresOtherClause&&!s?this.error(ye.MISSING_OTHER_CLAUSE,xe(this.clonePosition(),this.clonePosition())):{val:o,err:null}},e.prototype.tryParseDecimalInteger=function(t,n){var r=1,i=this.clonePosition();this.bumpIf("+")||this.bumpIf("-")&&(r=-1);for(var a=!1,s=0;!this.isEOF();){var o=this.char();if(o>=48&&o<=57)a=!0,s=s*10+(o-48),this.bump();else break}var u=xe(i,this.clonePosition());return a?(s*=r,_f(s)?{val:s,err:null}:this.error(n,u)):this.error(t,u)},e.prototype.offset=function(){return this.position.offset},e.prototype.isEOF=function(){return this.offset()===this.message.length},e.prototype.clonePosition=function(){return{offset:this.position.offset,line:this.position.line,column:this.position.column}},e.prototype.char=function(){var t=this.position.offset;if(t>=this.message.length)throw Error("out of bound");var n=vu(this.message,t);if(n===void 0)throw Error("Offset ".concat(t," is at invalid UTF-16 code unit boundary"));return n},e.prototype.error=function(t,n){return{val:null,err:{kind:t,message:this.message,location:n}}},e.prototype.bump=function(){if(!this.isEOF()){var t=this.char();t===10?(this.position.line+=1,this.position.column=1,this.position.offset+=1):(this.position.column+=1,this.position.offset+=t<65536?1:2)}},e.prototype.bumpIf=function(t){if(ys(this.message,t,this.offset())){for(var n=0;n<t.length;n++)this.bump();return!0}return!1},e.prototype.bumpUntil=function(t){var n=this.offset(),r=this.message.indexOf(t,n);return r>=0?(this.bumpTo(r),!0):(this.bumpTo(this.message.length),!1)},e.prototype.bumpTo=function(t){if(this.offset()>t)throw Error("targetOffset ".concat(t," must be greater than or equal to the current offset ").concat(this.offset()));for(t=Math.min(t,this.message.length);;){var n=this.offset();if(n===t)break;if(n>t)throw Error("targetOffset ".concat(t," is at invalid UTF-16 code unit boundary"));if(this.bump(),this.isEOF())break}},e.prototype.bumpSpace=function(){for(;!this.isEOF()&&Nu(this.char());)this.bump()},e.prototype.peek=function(){if(this.isEOF())return null;var t=this.char(),n=this.offset(),r=this.message.charCodeAt(n+(t>=65536?2:1));return r??null},e})();function Wi(e){return e>=97&&e<=122||e>=65&&e<=90}function vf(e){return Wi(e)||e===47}function kf(e){return e===45||e===46||e>=48&&e<=57||e===95||e>=97&&e<=122||e>=65&&e<=90||e==183||e>=192&&e<=214||e>=216&&e<=246||e>=248&&e<=893||e>=895&&e<=8191||e>=8204&&e<=8205||e>=8255&&e<=8256||e>=8304&&e<=8591||e>=11264&&e<=12271||e>=12289&&e<=55295||e>=63744&&e<=64975||e>=65008&&e<=65533||e>=65536&&e<=983039}function Nu(e){return e>=9&&e<=13||e===32||e===133||e>=8206&&e<=8207||e===8232||e===8233}function Nf(e){return e>=33&&e<=35||e===36||e>=37&&e<=39||e===40||e===41||e===42||e===43||e===44||e===45||e>=46&&e<=47||e>=58&&e<=59||e>=60&&e<=62||e>=63&&e<=64||e===91||e===92||e===93||e===94||e===96||e===123||e===124||e===125||e===126||e===161||e>=162&&e<=165||e===166||e===167||e===169||e===171||e===172||e===174||e===176||e===177||e===182||e===187||e===191||e===215||e===247||e>=8208&&e<=8213||e>=8214&&e<=8215||e===8216||e===8217||e===8218||e>=8219&&e<=8220||e===8221||e===8222||e===8223||e>=8224&&e<=8231||e>=8240&&e<=8248||e===8249||e===8250||e>=8251&&e<=8254||e>=8257&&e<=8259||e===8260||e===8261||e===8262||e>=8263&&e<=8273||e===8274||e===8275||e>=8277&&e<=8286||e>=8592&&e<=8596||e>=8597&&e<=8601||e>=8602&&e<=8603||e>=8604&&e<=8607||e===8608||e>=8609&&e<=8610||e===8611||e>=8612&&e<=8613||e===8614||e>=8615&&e<=8621||e===8622||e>=8623&&e<=8653||e>=8654&&e<=8655||e>=8656&&e<=8657||e===8658||e===8659||e===8660||e>=8661&&e<=8691||e>=8692&&e<=8959||e>=8960&&e<=8967||e===8968||e===8969||e===8970||e===8971||e>=8972&&e<=8991||e>=8992&&e<=8993||e>=8994&&e<=9e3||e===9001||e===9002||e>=9003&&e<=9083||e===9084||e>=9085&&e<=9114||e>=9115&&e<=9139||e>=9140&&e<=9179||e>=9180&&e<=9185||e>=9186&&e<=9254||e>=9255&&e<=9279||e>=9280&&e<=9290||e>=9291&&e<=9311||e>=9472&&e<=9654||e===9655||e>=9656&&e<=9664||e===9665||e>=9666&&e<=9719||e>=9720&&e<=9727||e>=9728&&e<=9838||e===9839||e>=9840&&e<=10087||e===10088||e===10089||e===10090||e===10091||e===10092||e===10093||e===10094||e===10095||e===10096||e===10097||e===10098||e===10099||e===10100||e===10101||e>=10132&&e<=10175||e>=10176&&e<=10180||e===10181||e===10182||e>=10183&&e<=10213||e===10214||e===10215||e===10216||e===10217||e===10218||e===10219||e===10220||e===10221||e===10222||e===10223||e>=10224&&e<=10239||e>=10240&&e<=10495||e>=10496&&e<=10626||e===10627||e===10628||e===10629||e===10630||e===10631||e===10632||e===10633||e===10634||e===10635||e===10636||e===10637||e===10638||e===10639||e===10640||e===10641||e===10642||e===10643||e===10644||e===10645||e===10646||e===10647||e===10648||e>=10649&&e<=10711||e===10712||e===10713||e===10714||e===10715||e>=10716&&e<=10747||e===10748||e===10749||e>=10750&&e<=11007||e>=11008&&e<=11055||e>=11056&&e<=11076||e>=11077&&e<=11078||e>=11079&&e<=11084||e>=11085&&e<=11123||e>=11124&&e<=11125||e>=11126&&e<=11157||e===11158||e>=11159&&e<=11263||e>=11776&&e<=11777||e===11778||e===11779||e===11780||e===11781||e>=11782&&e<=11784||e===11785||e===11786||e===11787||e===11788||e===11789||e>=11790&&e<=11798||e===11799||e>=11800&&e<=11801||e===11802||e===11803||e===11804||e===11805||e>=11806&&e<=11807||e===11808||e===11809||e===11810||e===11811||e===11812||e===11813||e===11814||e===11815||e===11816||e===11817||e>=11818&&e<=11822||e===11823||e>=11824&&e<=11833||e>=11834&&e<=11835||e>=11836&&e<=11839||e===11840||e===11841||e===11842||e>=11843&&e<=11855||e>=11856&&e<=11857||e===11858||e>=11859&&e<=11903||e>=12289&&e<=12291||e===12296||e===12297||e===12298||e===12299||e===12300||e===12301||e===12302||e===12303||e===12304||e===12305||e>=12306&&e<=12307||e===12308||e===12309||e===12310||e===12311||e===12312||e===12313||e===12314||e===12315||e===12316||e===12317||e>=12318&&e<=12319||e===12320||e===12336||e===64830||e===64831||e>=65093&&e<=65094}function Xi(e){e.forEach(function(t){if(delete t.location,yu(t)||xu(t))for(var n in t.options)delete t.options[n].location,Xi(t.options[n].value);else bu(t)&&_u(t.style)||(Eu(t)||Tu(t))&&Yi(t.style)?delete t.style.location:Su(t)&&Xi(t.children)})}function Of(e,t){t===void 0&&(t={}),t=J({shouldParseSkeletons:!0,requiresOtherClause:!0},t);var n=new If(e,t).parse();if(n.err){var r=SyntaxError(ye[n.err.kind]);throw r.location=n.err.location,r.originalMessage=n.err.message,r}return t?.captureLocation||Xi(n.val),n.val}function bt(e,t){var n=t&&t.cache?t.cache:Bf,r=t&&t.serializer?t.serializer:Mf,i=t&&t.strategy?t.strategy:Df;return i(e,{cache:n,serializer:r})}function Rf(e){return e==null||typeof e=="number"||typeof e=="boolean"}function Lf(e,t,n,r){var i=Rf(r)?r:n(r),a=t.get(i);return typeof a>"u"&&(a=e.call(this,r),t.set(i,a)),a}function Ou(e,t,n){var r=Array.prototype.slice.call(arguments,3),i=n(r),a=t.get(i);return typeof a>"u"&&(a=e.apply(this,r),t.set(i,a)),a}function Ru(e,t,n,r,i){return n.bind(t,e,r,i)}function Df(e,t){var n=e.length===1?Lf:Ou;return Ru(e,this,n,t.cache.create(),t.serializer)}function Pf(e,t){return Ru(e,this,Ou,t.cache.create(),t.serializer)}var Mf=function(){return JSON.stringify(arguments)};function Ca(){this.cache=Object.create(null)}Ca.prototype.get=function(e){return this.cache[e]};Ca.prototype.set=function(e,t){this.cache[e]=t};var Bf={create:function(){return new Ca}},Et={variadic:Pf},_t;(function(e){e.MISSING_VALUE="MISSING_VALUE",e.INVALID_VALUE="INVALID_VALUE",e.MISSING_INTL_API="MISSING_INTL_API"})(_t||(_t={}));var Ut=(function(e){dt(t,e);function t(n,r,i){var a=e.call(this,n)||this;return a.code=r,a.originalMessage=i,a}return t.prototype.toString=function(){return"[formatjs Error: ".concat(this.code,"] ").concat(this.message)},t})(Error),_s=(function(e){dt(t,e);function t(n,r,i,a){return e.call(this,'Invalid values for "'.concat(n,'": "').concat(r,'". Options are "').concat(Object.keys(i).join('", "'),'"'),_t.INVALID_VALUE,a)||this}return t})(Ut),Ff=(function(e){dt(t,e);function t(n,r,i){return e.call(this,'Value for "'.concat(n,'" must be of type ').concat(r),_t.INVALID_VALUE,i)||this}return t})(Ut),Hf=(function(e){dt(t,e);function t(n,r){return e.call(this,'The intl string context variable "'.concat(n,'" was not provided to the string "').concat(r,'"'),_t.MISSING_VALUE,r)||this}return t})(Ut),Qe;(function(e){e[e.literal=0]="literal",e[e.object=1]="object"})(Qe||(Qe={}));function Uf(e){return e.length<2?e:e.reduce(function(t,n){var r=t[t.length-1];return!r||r.type!==Qe.literal||n.type!==Qe.literal?t.push(n):r.value+=n.value,t},[])}function Lu(e){return typeof e=="function"}function Tr(e,t,n,r,i,a,s){if(e.length===1&&gs(e[0]))return[{type:Qe.literal,value:e[0].value}];for(var o=[],u=0,c=e;u<c.length;u++){var d=c[u];if(gs(d)){o.push({type:Qe.literal,value:d.value});continue}if(nf(d)){typeof a=="number"&&o.push({type:Qe.literal,value:n.getNumberFormat(t).format(a)});continue}var f=d.value;if(!(i&&f in i))throw new Hf(f,s);var p=i[f];if(tf(d)){(!p||typeof p=="string"||typeof p=="number")&&(p=typeof p=="string"||typeof p=="number"?String(p):""),o.push({type:typeof p=="string"?Qe.literal:Qe.object,value:p});continue}if(Eu(d)){var h=typeof d.style=="string"?r.date[d.style]:Yi(d.style)?d.style.parsedOptions:void 0;o.push({type:Qe.literal,value:n.getDateTimeFormat(t,h).format(p)});continue}if(Tu(d)){var h=typeof d.style=="string"?r.time[d.style]:Yi(d.style)?d.style.parsedOptions:r.time.medium;o.push({type:Qe.literal,value:n.getDateTimeFormat(t,h).format(p)});continue}if(bu(d)){var h=typeof d.style=="string"?r.number[d.style]:_u(d.style)?d.style.parsedOptions:void 0;h&&h.scale&&(p=p*(h.scale||1)),o.push({type:Qe.literal,value:n.getNumberFormat(t,h).format(p)});continue}if(Su(d)){var b=d.children,y=d.value,w=i[y];if(!Lu(w))throw new Ff(y,"function",s);var _=Tr(b,t,n,r,i,a),k=w(_.map(function(A){return A.value}));Array.isArray(k)||(k=[k]),o.push.apply(o,k.map(function(A){return{type:typeof A=="string"?Qe.literal:Qe.object,value:A}}))}if(yu(d)){var N=d.options[p]||d.options.other;if(!N)throw new _s(d.value,p,Object.keys(d.options),s);o.push.apply(o,Tr(N.value,t,n,r,i));continue}if(xu(d)){var N=d.options["=".concat(p)];if(!N){if(!Intl.PluralRules)throw new Ut(`Intl.PluralRules is not available in this environment.
27
27
  Try polyfilling it using "@formatjs/intl-pluralrules"
28
- `,Et.MISSING_INTL_API,s);var D=n.getPluralRules(t,{type:d.pluralType}).select(m-(d.offset||0));S=d.options[D]||d.options.other}if(!S)throw new Za(d.value,m,Object.keys(d.options),s);o.push.apply(o,dr(S.value,t,n,r,i,m-(d.offset||0)));continue}}return zd(o)}function $d(e,t){return t?X(X(X({},e||{}),t||{}),Object.keys(e).reduce(function(n,r){return n[r]=X(X({},e[r]),t[r]||{}),n},{})):e}function Yd(e,t){return t?Object.keys(e).reduce(function(n,r){return n[r]=$d(e[r],t[r]),n},X({},e)):e}function Qr(e){return{create:function(){return{get:function(t){return e[t]},set:function(t,n){e[t]=n}}}}}function Gd(e){return e===void 0&&(e={number:{},dateTime:{},pluralRules:{}}),{getNumberFormat:mt(function(){for(var t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return new((t=Intl.NumberFormat).bind.apply(t,gt([void 0],n,!1)))},{cache:Qr(e.number),strategy:pt.variadic}),getDateTimeFormat:mt(function(){for(var t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return new((t=Intl.DateTimeFormat).bind.apply(t,gt([void 0],n,!1)))},{cache:Qr(e.dateTime),strategy:pt.variadic}),getPluralRules:mt(function(){for(var t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return new((t=Intl.PluralRules).bind.apply(t,gt([void 0],n,!1)))},{cache:Qr(e.pluralRules),strategy:pt.variadic})}}var uu=(function(){function e(t,n,r,i){var a=this;if(n===void 0&&(n=e.defaultLocale),this.formatterCache={number:{},dateTime:{},pluralRules:{}},this.format=function(u){var c=a.formatToParts(u);if(c.length===1)return c[0].value;var d=c.reduce(function(f,m){return!f.length||m.type!==Ge.literal||typeof f[f.length-1]!="string"?f.push(m.value):f[f.length-1]+=m.value,f},[]);return d.length<=1?d[0]||"":d},this.formatToParts=function(u){return dr(a.ast,a.locales,a.formatters,a.formats,u,void 0,a.message)},this.resolvedOptions=function(){var u;return{locale:((u=a.resolvedLocale)===null||u===void 0?void 0:u.toString())||Intl.NumberFormat.supportedLocalesOf(a.locales)[0]}},this.getAst=function(){return a.ast},this.locales=n,this.resolvedLocale=e.resolveLocale(n),typeof t=="string"){if(this.message=t,!e.__parse)throw new TypeError("IntlMessageFormat.__parse must be set to process `message` of type `string`");var s=i||{};s.formatters;var o=kr(s,["formatters"]);this.ast=e.__parse(t,X(X({},o),{locale:this.resolvedLocale}))}else this.ast=t;if(!Array.isArray(this.ast))throw new TypeError("A message must be provided as a String or AST.");this.formats=Yd(e.formats,r),this.formatters=i&&i.formatters||Gd(this.formatterCache)}return Object.defineProperty(e,"defaultLocale",{get:function(){return e.memoizedDefaultLocale||(e.memoizedDefaultLocale=new Intl.NumberFormat().resolvedOptions().locale),e.memoizedDefaultLocale},enumerable:!1,configurable:!0}),e.memoizedDefaultLocale=null,e.resolveLocale=function(t){if(!(typeof Intl.Locale>"u")){var n=Intl.NumberFormat.supportedLocalesOf(t);return n.length>0?new Intl.Locale(n[0]):new Intl.Locale(typeof t=="string"?t:t[0])}},e.__parse=Rd,e.formats={number:{integer:{maximumFractionDigits:0},currency:{style:"currency"},percent:{style:"percent"}},date:{short:{month:"numeric",day:"numeric",year:"2-digit"},medium:{month:"short",day:"numeric",year:"numeric"},long:{month:"long",day:"numeric",year:"numeric"},full:{weekday:"long",month:"long",day:"numeric",year:"numeric"}},time:{short:{hour:"numeric",minute:"numeric"},medium:{hour:"numeric",minute:"numeric",second:"numeric"},long:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"},full:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"}}},e})(),qt;(function(e){e.FORMAT_ERROR="FORMAT_ERROR",e.UNSUPPORTED_FORMATTER="UNSUPPORTED_FORMATTER",e.INVALID_CONFIG="INVALID_CONFIG",e.MISSING_DATA="MISSING_DATA",e.MISSING_TRANSLATION="MISSING_TRANSLATION"})(qt||(qt={}));var $n=(function(e){st(t,e);function t(n,r,i){var a=this,s=i?i instanceof Error?i:new Error(String(i)):void 0;return a=e.call(this,"[@formatjs/intl Error ".concat(n,"] ").concat(r,`
28
+ `,_t.MISSING_INTL_API,s);var L=n.getPluralRules(t,{type:d.pluralType}).select(p-(d.offset||0));N=d.options[L]||d.options.other}if(!N)throw new _s(d.value,p,Object.keys(d.options),s);o.push.apply(o,Tr(N.value,t,n,r,i,p-(d.offset||0)));continue}}return Uf(o)}function jf(e,t){return t?J(J(J({},e||{}),t||{}),Object.keys(e).reduce(function(n,r){return n[r]=J(J({},e[r]),t[r]||{}),n},{})):e}function zf(e,t){return t?Object.keys(e).reduce(function(n,r){return n[r]=jf(e[r],t[r]),n},J({},e)):e}function ci(e){return{create:function(){return{get:function(t){return e[t]},set:function(t,n){e[t]=n}}}}}function $f(e){return e===void 0&&(e={number:{},dateTime:{},pluralRules:{}}),{getNumberFormat:bt(function(){for(var t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return new((t=Intl.NumberFormat).bind.apply(t,Tt([void 0],n,!1)))},{cache:ci(e.number),strategy:Et.variadic}),getDateTimeFormat:bt(function(){for(var t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return new((t=Intl.DateTimeFormat).bind.apply(t,Tt([void 0],n,!1)))},{cache:ci(e.dateTime),strategy:Et.variadic}),getPluralRules:bt(function(){for(var t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return new((t=Intl.PluralRules).bind.apply(t,Tt([void 0],n,!1)))},{cache:ci(e.pluralRules),strategy:Et.variadic})}}var Du=(function(){function e(t,n,r,i){var a=this;if(n===void 0&&(n=e.defaultLocale),this.formatterCache={number:{},dateTime:{},pluralRules:{}},this.format=function(u){var c=a.formatToParts(u);if(c.length===1)return c[0].value;var d=c.reduce(function(f,p){return!f.length||p.type!==Qe.literal||typeof f[f.length-1]!="string"?f.push(p.value):f[f.length-1]+=p.value,f},[]);return d.length<=1?d[0]||"":d},this.formatToParts=function(u){return Tr(a.ast,a.locales,a.formatters,a.formats,u,void 0,a.message)},this.resolvedOptions=function(){var u;return{locale:((u=a.resolvedLocale)===null||u===void 0?void 0:u.toString())||Intl.NumberFormat.supportedLocalesOf(a.locales)[0]}},this.getAst=function(){return a.ast},this.locales=n,this.resolvedLocale=e.resolveLocale(n),typeof t=="string"){if(this.message=t,!e.__parse)throw new TypeError("IntlMessageFormat.__parse must be set to process `message` of type `string`");var s=i||{};s.formatters;var o=Fr(s,["formatters"]);this.ast=e.__parse(t,J(J({},o),{locale:this.resolvedLocale}))}else this.ast=t;if(!Array.isArray(this.ast))throw new TypeError("A message must be provided as a String or AST.");this.formats=zf(e.formats,r),this.formatters=i&&i.formatters||$f(this.formatterCache)}return Object.defineProperty(e,"defaultLocale",{get:function(){return e.memoizedDefaultLocale||(e.memoizedDefaultLocale=new Intl.NumberFormat().resolvedOptions().locale),e.memoizedDefaultLocale},enumerable:!1,configurable:!0}),e.memoizedDefaultLocale=null,e.resolveLocale=function(t){if(!(typeof Intl.Locale>"u")){var n=Intl.NumberFormat.supportedLocalesOf(t);return n.length>0?new Intl.Locale(n[0]):new Intl.Locale(typeof t=="string"?t:t[0])}},e.__parse=Of,e.formats={number:{integer:{maximumFractionDigits:0},currency:{style:"currency"},percent:{style:"percent"}},date:{short:{month:"numeric",day:"numeric",year:"2-digit"},medium:{month:"short",day:"numeric",year:"numeric"},long:{month:"long",day:"numeric",year:"numeric"},full:{weekday:"long",month:"long",day:"numeric",year:"numeric"}},time:{short:{hour:"numeric",minute:"numeric"},medium:{hour:"numeric",minute:"numeric",second:"numeric"},long:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"},full:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"}}},e})(),Jt;(function(e){e.FORMAT_ERROR="FORMAT_ERROR",e.UNSUPPORTED_FORMATTER="UNSUPPORTED_FORMATTER",e.INVALID_CONFIG="INVALID_CONFIG",e.MISSING_DATA="MISSING_DATA",e.MISSING_TRANSLATION="MISSING_TRANSLATION"})(Jt||(Jt={}));var Qn=(function(e){dt(t,e);function t(n,r,i){var a=this,s=i?i instanceof Error?i:new Error(String(i)):void 0;return a=e.call(this,"[@formatjs/intl Error ".concat(n,"] ").concat(r,`
29
29
  `).concat(s?`
30
30
  `.concat(s.message,`
31
- `).concat(s.stack):""))||this,a.code=n,typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(a,t),a}return t})(Error),Vd=(function(e){st(t,e);function t(n,r){return e.call(this,qt.UNSUPPORTED_FORMATTER,n,r)||this}return t})($n),qd=(function(e){st(t,e);function t(n,r){return e.call(this,qt.INVALID_CONFIG,n,r)||this}return t})($n),es=(function(e){st(t,e);function t(n,r){return e.call(this,qt.MISSING_DATA,n,r)||this}return t})($n),ot=(function(e){st(t,e);function t(n,r,i){var a=e.call(this,qt.FORMAT_ERROR,"".concat(n,`
31
+ `).concat(s.stack):""))||this,a.code=n,typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(a,t),a}return t})(Error),Yf=(function(e){dt(t,e);function t(n,r){return e.call(this,Jt.UNSUPPORTED_FORMATTER,n,r)||this}return t})(Qn),Gf=(function(e){dt(t,e);function t(n,r){return e.call(this,Jt.INVALID_CONFIG,n,r)||this}return t})(Qn),Cs=(function(e){dt(t,e);function t(n,r){return e.call(this,Jt.MISSING_DATA,n,r)||this}return t})(Qn),ft=(function(e){dt(t,e);function t(n,r,i){var a=e.call(this,Jt.FORMAT_ERROR,"".concat(n,`
32
32
  Locale: `).concat(r,`
33
- `),i)||this;return a.locale=r,a}return t})($n),Kr=(function(e){st(t,e);function t(n,r,i,a){var s=e.call(this,"".concat(n,`
33
+ `),i)||this;return a.locale=r,a}return t})(Qn),di=(function(e){dt(t,e);function t(n,r,i,a){var s=e.call(this,"".concat(n,`
34
34
  MessageID: `).concat(i?.id,`
35
35
  Default Message: `).concat(i?.defaultMessage,`
36
36
  Description: `).concat(i?.description,`
37
- `),r,a)||this;return s.descriptor=i,s.locale=r,s}return t})(ot),Wd=(function(e){st(t,e);function t(n,r){var i=e.call(this,qt.MISSING_TRANSLATION,'Missing message: "'.concat(n.id,'" for locale "').concat(r,'", using ').concat(n.defaultMessage?"default message (".concat(typeof n.defaultMessage=="string"?n.defaultMessage:n.defaultMessage.map(function(a){var s;return(s=a.value)!==null&&s!==void 0?s:JSON.stringify(a)}).join(),")"):"id"," as fallback."))||this;return i.descriptor=n,i}return t})($n);function Kt(e,t,n){return n===void 0&&(n={}),t.reduce(function(r,i){return i in e?r[i]=e[i]:i in n&&(r[i]=n[i]),r},{})}var Xd=function(e){process.env.NODE_ENV!=="production"&&console.error(e)},Qd=function(e){process.env.NODE_ENV!=="production"&&console.warn(e)},lu={formats:{},messages:{},timeZone:void 0,defaultLocale:"en",defaultFormats:{},fallbackOnEmptyString:!0,onError:Xd,onWarn:Qd};function cu(){return{dateTime:{},number:{},message:{},relativeTime:{},pluralRules:{},list:{},displayNames:{}}}function Ut(e){return{create:function(){return{get:function(t){return e[t]},set:function(t,n){e[t]=n}}}}}function Kd(e){e===void 0&&(e=cu());var t=Intl.RelativeTimeFormat,n=Intl.ListFormat,r=Intl.DisplayNames,i=mt(function(){for(var o,u=[],c=0;c<arguments.length;c++)u[c]=arguments[c];return new((o=Intl.DateTimeFormat).bind.apply(o,gt([void 0],u,!1)))},{cache:Ut(e.dateTime),strategy:pt.variadic}),a=mt(function(){for(var o,u=[],c=0;c<arguments.length;c++)u[c]=arguments[c];return new((o=Intl.NumberFormat).bind.apply(o,gt([void 0],u,!1)))},{cache:Ut(e.number),strategy:pt.variadic}),s=mt(function(){for(var o,u=[],c=0;c<arguments.length;c++)u[c]=arguments[c];return new((o=Intl.PluralRules).bind.apply(o,gt([void 0],u,!1)))},{cache:Ut(e.pluralRules),strategy:pt.variadic});return{getDateTimeFormat:i,getNumberFormat:a,getMessageFormat:mt(function(o,u,c,d){return new uu(o,u,c,X({formatters:{getNumberFormat:a,getDateTimeFormat:i,getPluralRules:s}},d||{}))},{cache:Ut(e.message),strategy:pt.variadic}),getRelativeTimeFormat:mt(function(){for(var o=[],u=0;u<arguments.length;u++)o[u]=arguments[u];return new(t.bind.apply(t,gt([void 0],o,!1)))},{cache:Ut(e.relativeTime),strategy:pt.variadic}),getPluralRules:s,getListFormat:mt(function(){for(var o=[],u=0;u<arguments.length;u++)o[u]=arguments[u];return new(n.bind.apply(n,gt([void 0],o,!1)))},{cache:Ut(e.list),strategy:pt.variadic}),getDisplayNames:mt(function(){for(var o=[],u=0;u<arguments.length;u++)o[u]=arguments[u];return new(r.bind.apply(r,gt([void 0],o,!1)))},{cache:Ut(e.displayNames),strategy:pt.variadic})}}function da(e,t,n,r){var i=e&&e[t],a;if(i&&(a=i[n]),a)return a;r(new Vd("No ".concat(t," format named: ").concat(n)))}function nr(e,t){return Object.keys(e).reduce(function(n,r){return n[r]=X({timeZone:t},e[r]),n},{})}function ts(e,t){var n=Object.keys(X(X({},e),t));return n.reduce(function(r,i){return r[i]=X(X({},e[i]||{}),t[i]||{}),r},{})}function ns(e,t){if(!t)return e;var n=uu.formats;return X(X(X({},n),e),{date:ts(nr(n.date,t),nr(e.date||{},t)),time:ts(nr(n.time,t),nr(e.time||{},t))})}var Mi=function(e,t,n,r,i){var a=e.locale,s=e.formats,o=e.messages,u=e.defaultLocale,c=e.defaultFormats,d=e.fallbackOnEmptyString,f=e.onError,m=e.timeZone,h=e.defaultRichTextElements;n===void 0&&(n={id:""});var b=n.id,A=n.defaultMessage;Yo(!!b,"[@formatjs/intl] An `id` must be provided to format a message. You can either:\n1. Configure your build toolchain with [babel-plugin-formatjs](https://formatjs.io/docs/tooling/babel-plugin)\nor [@formatjs/ts-transformer](https://formatjs.io/docs/tooling/ts-transformer) OR\n2. Configure your `eslint` config to include [eslint-plugin-formatjs](https://formatjs.io/docs/tooling/linter#enforce-id)\nto autofix this issue");var w=String(b),y=o&&Object.prototype.hasOwnProperty.call(o,w)&&o[w];if(Array.isArray(y)&&y.length===1&&y[0].type===Ce.literal)return y[0].value;if(!r&&y&&typeof y=="string"&&!h)return y.replace(/'\{(.*?)\}'/gi,"{$1}");if(r=X(X({},h),r||{}),s=ns(s,m),c=ns(c,m),!y){if(d===!1&&y==="")return y;if((!A||a&&a.toLowerCase()!==u.toLowerCase())&&f(new Wd(n,a)),A)try{var _=t.getMessageFormat(A,u,c,i);return _.format(r)}catch(S){return f(new Kr('Error formatting default message for: "'.concat(w,'", rendering default message verbatim'),a,n,S)),typeof A=="string"?A:w}return w}try{var _=t.getMessageFormat(y,a,s,X({formatters:t},i||{}));return _.format(r)}catch(S){f(new Kr('Error formatting message: "'.concat(w,'", using ').concat(A?"default message":"id"," as fallback."),a,n,S))}if(A)try{var _=t.getMessageFormat(A,u,c,i);return _.format(r)}catch(S){f(new Kr('Error formatting the default message for: "'.concat(w,'", rendering message verbatim'),a,n,S))}return typeof y=="string"?y:typeof A=="string"?A:w},du=["formatMatcher","timeZone","hour12","weekday","era","year","month","day","hour","minute","second","timeZoneName","hourCycle","dateStyle","timeStyle","calendar","numberingSystem","fractionalSecondDigits"];function Or(e,t,n,r){var i=e.locale,a=e.formats,s=e.onError,o=e.timeZone;r===void 0&&(r={});var u=r.format,c=X(X({},o&&{timeZone:o}),u&&da(a,t,u,s)),d=Kt(r,du,c);return t==="time"&&!d.hour&&!d.minute&&!d.second&&!d.timeStyle&&!d.dateStyle&&(d=X(X({},d),{hour:"numeric",minute:"numeric"})),n(i,d)}function Jd(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var i=n[0],a=n[1],s=a===void 0?{}:a,o=typeof i=="string"?new Date(i||0):i;try{return Or(e,"date",t,s).format(o)}catch(u){e.onError(new ot("Error formatting date.",e.locale,u))}return String(o)}function Zd(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var i=n[0],a=n[1],s=a===void 0?{}:a,o=typeof i=="string"?new Date(i||0):i;try{return Or(e,"time",t,s).format(o)}catch(u){e.onError(new ot("Error formatting time.",e.locale,u))}return String(o)}function ef(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var i=n[0],a=n[1],s=n[2],o=s===void 0?{}:s,u=e.timeZone,c=e.locale,d=e.onError,f=Kt(o,du,u?{timeZone:u}:{});try{return t(c,f).formatRange(i,a)}catch(m){d(new ot("Error formatting date time range.",e.locale,m))}return String(i)}function tf(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var i=n[0],a=n[1],s=a===void 0?{}:a,o=typeof i=="string"?new Date(i||0):i;try{return Or(e,"date",t,s).formatToParts(o)}catch(u){e.onError(new ot("Error formatting date.",e.locale,u))}return[]}function nf(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var i=n[0],a=n[1],s=a===void 0?{}:a,o=typeof i=="string"?new Date(i||0):i;try{return Or(e,"time",t,s).formatToParts(o)}catch(u){e.onError(new ot("Error formatting time.",e.locale,u))}return[]}var rf=["style","type","fallback","languageDisplay"];function af(e,t,n,r){var i=e.locale,a=e.onError,s=Intl.DisplayNames;s||a(new Mt(`Intl.DisplayNames is not available in this environment.
37
+ `),r,a)||this;return s.descriptor=i,s.locale=r,s}return t})(ft),qf=(function(e){dt(t,e);function t(n,r){var i=e.call(this,Jt.MISSING_TRANSLATION,'Missing message: "'.concat(n.id,'" for locale "').concat(r,'", using ').concat(n.defaultMessage?"default message (".concat(typeof n.defaultMessage=="string"?n.defaultMessage:n.defaultMessage.map(function(a){var s;return(s=a.value)!==null&&s!==void 0?s:JSON.stringify(a)}).join(),")"):"id"," as fallback."))||this;return i.descriptor=n,i}return t})(Qn);function rn(e,t,n){return n===void 0&&(n={}),t.reduce(function(r,i){return i in e?r[i]=e[i]:i in n&&(r[i]=n[i]),r},{})}var Vf=function(e){process.env.NODE_ENV!=="production"&&console.error(e)},Wf=function(e){process.env.NODE_ENV!=="production"&&console.warn(e)},Pu={formats:{},messages:{},timeZone:void 0,defaultLocale:"en",defaultFormats:{},fallbackOnEmptyString:!0,onError:Vf,onWarn:Wf};function Mu(){return{dateTime:{},number:{},message:{},relativeTime:{},pluralRules:{},list:{},displayNames:{}}}function qt(e){return{create:function(){return{get:function(t){return e[t]},set:function(t,n){e[t]=n}}}}}function Xf(e){e===void 0&&(e=Mu());var t=Intl.RelativeTimeFormat,n=Intl.ListFormat,r=Intl.DisplayNames,i=bt(function(){for(var o,u=[],c=0;c<arguments.length;c++)u[c]=arguments[c];return new((o=Intl.DateTimeFormat).bind.apply(o,Tt([void 0],u,!1)))},{cache:qt(e.dateTime),strategy:Et.variadic}),a=bt(function(){for(var o,u=[],c=0;c<arguments.length;c++)u[c]=arguments[c];return new((o=Intl.NumberFormat).bind.apply(o,Tt([void 0],u,!1)))},{cache:qt(e.number),strategy:Et.variadic}),s=bt(function(){for(var o,u=[],c=0;c<arguments.length;c++)u[c]=arguments[c];return new((o=Intl.PluralRules).bind.apply(o,Tt([void 0],u,!1)))},{cache:qt(e.pluralRules),strategy:Et.variadic});return{getDateTimeFormat:i,getNumberFormat:a,getMessageFormat:bt(function(o,u,c,d){return new Du(o,u,c,J({formatters:{getNumberFormat:a,getDateTimeFormat:i,getPluralRules:s}},d||{}))},{cache:qt(e.message),strategy:Et.variadic}),getRelativeTimeFormat:bt(function(){for(var o=[],u=0;u<arguments.length;u++)o[u]=arguments[u];return new(t.bind.apply(t,Tt([void 0],o,!1)))},{cache:qt(e.relativeTime),strategy:Et.variadic}),getPluralRules:s,getListFormat:bt(function(){for(var o=[],u=0;u<arguments.length;u++)o[u]=arguments[u];return new(n.bind.apply(n,Tt([void 0],o,!1)))},{cache:qt(e.list),strategy:Et.variadic}),getDisplayNames:bt(function(){for(var o=[],u=0;u<arguments.length;u++)o[u]=arguments[u];return new(r.bind.apply(r,Tt([void 0],o,!1)))},{cache:qt(e.displayNames),strategy:Et.variadic})}}function Aa(e,t,n,r){var i=e&&e[t],a;if(i&&(a=i[n]),a)return a;r(new Yf("No ".concat(t," format named: ").concat(n)))}function lr(e,t){return Object.keys(e).reduce(function(n,r){return n[r]=J({timeZone:t},e[r]),n},{})}function As(e,t){var n=Object.keys(J(J({},e),t));return n.reduce(function(r,i){return r[i]=J(J({},e[i]||{}),t[i]||{}),r},{})}function ws(e,t){if(!t)return e;var n=Du.formats;return J(J(J({},n),e),{date:As(lr(n.date,t),lr(e.date||{},t)),time:As(lr(n.time,t),lr(e.time||{},t))})}var Qi=function(e,t,n,r,i){var a=e.locale,s=e.formats,o=e.messages,u=e.defaultLocale,c=e.defaultFormats,d=e.fallbackOnEmptyString,f=e.onError,p=e.timeZone,h=e.defaultRichTextElements;n===void 0&&(n={id:""});var b=n.id,y=n.defaultMessage;gu(!!b,"[@formatjs/intl] An `id` must be provided to format a message. You can either:\n1. Configure your build toolchain with [babel-plugin-formatjs](https://formatjs.io/docs/tooling/babel-plugin)\nor [@formatjs/ts-transformer](https://formatjs.io/docs/tooling/ts-transformer) OR\n2. Configure your `eslint` config to include [eslint-plugin-formatjs](https://formatjs.io/docs/tooling/linter#enforce-id)\nto autofix this issue");var w=String(b),_=o&&Object.prototype.hasOwnProperty.call(o,w)&&o[w];if(Array.isArray(_)&&_.length===1&&_[0].type===Re.literal)return _[0].value;if(!r&&_&&typeof _=="string"&&!h)return _.replace(/'\{(.*?)\}'/gi,"{$1}");if(r=J(J({},h),r||{}),s=ws(s,p),c=ws(c,p),!_){if(d===!1&&_==="")return _;if((!y||a&&a.toLowerCase()!==u.toLowerCase())&&f(new qf(n,a)),y)try{var k=t.getMessageFormat(y,u,c,i);return k.format(r)}catch(N){return f(new di('Error formatting default message for: "'.concat(w,'", rendering default message verbatim'),a,n,N)),typeof y=="string"?y:w}return w}try{var k=t.getMessageFormat(_,a,s,J({formatters:t},i||{}));return k.format(r)}catch(N){f(new di('Error formatting message: "'.concat(w,'", using ').concat(y?"default message":"id"," as fallback."),a,n,N))}if(y)try{var k=t.getMessageFormat(y,u,c,i);return k.format(r)}catch(N){f(new di('Error formatting the default message for: "'.concat(w,'", rendering message verbatim'),a,n,N))}return typeof _=="string"?_:typeof y=="string"?y:w},Bu=["formatMatcher","timeZone","hour12","weekday","era","year","month","day","hour","minute","second","timeZoneName","hourCycle","dateStyle","timeStyle","calendar","numberingSystem","fractionalSecondDigits"];function Hr(e,t,n,r){var i=e.locale,a=e.formats,s=e.onError,o=e.timeZone;r===void 0&&(r={});var u=r.format,c=J(J({},o&&{timeZone:o}),u&&Aa(a,t,u,s)),d=rn(r,Bu,c);return t==="time"&&!d.hour&&!d.minute&&!d.second&&!d.timeStyle&&!d.dateStyle&&(d=J(J({},d),{hour:"numeric",minute:"numeric"})),n(i,d)}function Qf(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var i=n[0],a=n[1],s=a===void 0?{}:a,o=typeof i=="string"?new Date(i||0):i;try{return Hr(e,"date",t,s).format(o)}catch(u){e.onError(new ft("Error formatting date.",e.locale,u))}return String(o)}function Kf(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var i=n[0],a=n[1],s=a===void 0?{}:a,o=typeof i=="string"?new Date(i||0):i;try{return Hr(e,"time",t,s).format(o)}catch(u){e.onError(new ft("Error formatting time.",e.locale,u))}return String(o)}function Zf(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var i=n[0],a=n[1],s=n[2],o=s===void 0?{}:s,u=e.timeZone,c=e.locale,d=e.onError,f=rn(o,Bu,u?{timeZone:u}:{});try{return t(c,f).formatRange(i,a)}catch(p){d(new ft("Error formatting date time range.",e.locale,p))}return String(i)}function Jf(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var i=n[0],a=n[1],s=a===void 0?{}:a,o=typeof i=="string"?new Date(i||0):i;try{return Hr(e,"date",t,s).formatToParts(o)}catch(u){e.onError(new ft("Error formatting date.",e.locale,u))}return[]}function eh(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var i=n[0],a=n[1],s=a===void 0?{}:a,o=typeof i=="string"?new Date(i||0):i;try{return Hr(e,"time",t,s).formatToParts(o)}catch(u){e.onError(new ft("Error formatting time.",e.locale,u))}return[]}var th=["style","type","fallback","languageDisplay"];function nh(e,t,n,r){var i=e.locale,a=e.onError,s=Intl.DisplayNames;s||a(new Ut(`Intl.DisplayNames is not available in this environment.
38
38
  Try polyfilling it using "@formatjs/intl-displaynames"
39
- `,Et.MISSING_INTL_API));var o=Kt(r,rf);try{return t(i,o).of(n)}catch(u){a(new ot("Error formatting display name.",i,u))}}var sf=["type","style"],rs=Date.now();function of(e){return"".concat(rs,"_").concat(e,"_").concat(rs)}function uf(e,t,n,r){r===void 0&&(r={});var i=fu(e,t,n,r).reduce(function(a,s){var o=s.value;return typeof o!="string"?a.push(o):typeof a[a.length-1]=="string"?a[a.length-1]+=o:a.push(o),a},[]);return i.length===1?i[0]:i.length===0?"":i}function fu(e,t,n,r){var i=e.locale,a=e.onError;r===void 0&&(r={});var s=Intl.ListFormat;s||a(new Mt(`Intl.ListFormat is not available in this environment.
39
+ `,_t.MISSING_INTL_API));var o=rn(r,th);try{return t(i,o).of(n)}catch(u){a(new ft("Error formatting display name.",i,u))}}var rh=["type","style"],Is=Date.now();function ih(e){return"".concat(Is,"_").concat(e,"_").concat(Is)}function ah(e,t,n,r){r===void 0&&(r={});var i=Fu(e,t,n,r).reduce(function(a,s){var o=s.value;return typeof o!="string"?a.push(o):typeof a[a.length-1]=="string"?a[a.length-1]+=o:a.push(o),a},[]);return i.length===1?i[0]:i.length===0?"":i}function Fu(e,t,n,r){var i=e.locale,a=e.onError;r===void 0&&(r={});var s=Intl.ListFormat;s||a(new Ut(`Intl.ListFormat is not available in this environment.
40
40
  Try polyfilling it using "@formatjs/intl-listformat"
41
- `,Et.MISSING_INTL_API));var o=Kt(r,sf);try{var u={},c=n.map(function(d,f){if(typeof d=="object"){var m=of(f);return u[m]=d,m}return String(d)});return t(i,o).formatToParts(c).map(function(d){return d.type==="literal"?d:X(X({},d),{value:u[d.value]||d.value})})}catch(d){a(new ot("Error formatting list.",i,d))}return n}var lf=["type"];function cf(e,t,n,r){var i=e.locale,a=e.onError;r===void 0&&(r={}),Intl.PluralRules||a(new Mt(`Intl.PluralRules is not available in this environment.
41
+ `,_t.MISSING_INTL_API));var o=rn(r,rh);try{var u={},c=n.map(function(d,f){if(typeof d=="object"){var p=ih(f);return u[p]=d,p}return String(d)});return t(i,o).formatToParts(c).map(function(d){return d.type==="literal"?d:J(J({},d),{value:u[d.value]||d.value})})}catch(d){a(new ft("Error formatting list.",i,d))}return n}var sh=["type"];function oh(e,t,n,r){var i=e.locale,a=e.onError;r===void 0&&(r={}),Intl.PluralRules||a(new Ut(`Intl.PluralRules is not available in this environment.
42
42
  Try polyfilling it using "@formatjs/intl-pluralrules"
43
- `,Et.MISSING_INTL_API));var s=Kt(r,lf);try{return t(i,s).select(n)}catch(o){a(new ot("Error formatting plural.",i,o))}return"other"}var df=["numeric","style"];function ff(e,t,n){var r=e.locale,i=e.formats,a=e.onError;n===void 0&&(n={});var s=n.format,o=!!s&&da(i,"relative",s,a)||{},u=Kt(n,df,o);return t(r,u)}function hf(e,t,n,r,i){i===void 0&&(i={}),r||(r="second");var a=Intl.RelativeTimeFormat;a||e.onError(new Mt(`Intl.RelativeTimeFormat is not available in this environment.
43
+ `,_t.MISSING_INTL_API));var s=rn(r,sh);try{return t(i,s).select(n)}catch(o){a(new ft("Error formatting plural.",i,o))}return"other"}var uh=["numeric","style"];function lh(e,t,n){var r=e.locale,i=e.formats,a=e.onError;n===void 0&&(n={});var s=n.format,o=!!s&&Aa(i,"relative",s,a)||{},u=rn(n,uh,o);return t(r,u)}function ch(e,t,n,r,i){i===void 0&&(i={}),r||(r="second");var a=Intl.RelativeTimeFormat;a||e.onError(new Ut(`Intl.RelativeTimeFormat is not available in this environment.
44
44
  Try polyfilling it using "@formatjs/intl-relativetimeformat"
45
- `,Et.MISSING_INTL_API));try{return ff(e,t,i).format(n,r)}catch(s){e.onError(new ot("Error formatting relative time.",e.locale,s))}return String(n)}var mf=["style","currency","unit","unitDisplay","useGrouping","minimumIntegerDigits","minimumFractionDigits","maximumFractionDigits","minimumSignificantDigits","maximumSignificantDigits","compactDisplay","currencyDisplay","currencySign","notation","signDisplay","unit","unitDisplay","numberingSystem","trailingZeroDisplay","roundingPriority","roundingIncrement","roundingMode"];function hu(e,t,n){var r=e.locale,i=e.formats,a=e.onError;n===void 0&&(n={});var s=n.format,o=s&&da(i,"number",s,a)||{},u=Kt(n,mf,o);return t(r,u)}function pf(e,t,n,r){r===void 0&&(r={});try{return hu(e,t,r).format(n)}catch(i){e.onError(new ot("Error formatting number.",e.locale,i))}return String(n)}function gf(e,t,n,r){r===void 0&&(r={});try{return hu(e,t,r).formatToParts(n)}catch(i){e.onError(new ot("Error formatting number.",e.locale,i))}return[]}function bf(e){var t=e?e[Object.keys(e)[0]]:void 0;return typeof t=="string"}function Ef(e){e.onWarn&&e.defaultRichTextElements&&bf(e.messages||{})&&e.onWarn(`[@formatjs/intl] "defaultRichTextElements" was specified but "message" was not pre-compiled.
45
+ `,_t.MISSING_INTL_API));try{return lh(e,t,i).format(n,r)}catch(s){e.onError(new ft("Error formatting relative time.",e.locale,s))}return String(n)}var dh=["style","currency","unit","unitDisplay","useGrouping","minimumIntegerDigits","minimumFractionDigits","maximumFractionDigits","minimumSignificantDigits","maximumSignificantDigits","compactDisplay","currencyDisplay","currencySign","notation","signDisplay","unit","unitDisplay","numberingSystem","trailingZeroDisplay","roundingPriority","roundingIncrement","roundingMode"];function Hu(e,t,n){var r=e.locale,i=e.formats,a=e.onError;n===void 0&&(n={});var s=n.format,o=s&&Aa(i,"number",s,a)||{},u=rn(n,dh,o);return t(r,u)}function fh(e,t,n,r){r===void 0&&(r={});try{return Hu(e,t,r).format(n)}catch(i){e.onError(new ft("Error formatting number.",e.locale,i))}return String(n)}function hh(e,t,n,r){r===void 0&&(r={});try{return Hu(e,t,r).formatToParts(n)}catch(i){e.onError(new ft("Error formatting number.",e.locale,i))}return[]}function ph(e){var t=e?e[Object.keys(e)[0]]:void 0;return typeof t=="string"}function mh(e){e.onWarn&&e.defaultRichTextElements&&ph(e.messages||{})&&e.onWarn(`[@formatjs/intl] "defaultRichTextElements" was specified but "message" was not pre-compiled.
46
46
  Please consider using "@formatjs/cli" to pre-compile your messages for performance.
47
- For more details see https://formatjs.io/docs/getting-started/message-distribution`)}function Tf(e,t){var n=Kd(t),r=X(X({},lu),e),i=r.locale,a=r.defaultLocale,s=r.onError;return i?!Intl.NumberFormat.supportedLocalesOf(i).length&&s?s(new es('Missing locale data for locale: "'.concat(i,'" in Intl.NumberFormat. Using default locale: "').concat(a,'" as fallback. See https://formatjs.io/docs/react-intl#runtime-requirements for more details'))):!Intl.DateTimeFormat.supportedLocalesOf(i).length&&s&&s(new es('Missing locale data for locale: "'.concat(i,'" in Intl.DateTimeFormat. Using default locale: "').concat(a,'" as fallback. See https://formatjs.io/docs/react-intl#runtime-requirements for more details'))):(s&&s(new qd('"locale" was not configured, using "'.concat(a,'" as fallback. See https://formatjs.io/docs/react-intl/api#intlshape for more details'))),r.locale=r.defaultLocale||"en"),Ef(r),X(X({},r),{formatters:n,formatNumber:pf.bind(null,r,n.getNumberFormat),formatNumberToParts:gf.bind(null,r,n.getNumberFormat),formatRelativeTime:hf.bind(null,r,n.getRelativeTimeFormat),formatDate:Jd.bind(null,r,n.getDateTimeFormat),formatDateToParts:tf.bind(null,r,n.getDateTimeFormat),formatTime:Zd.bind(null,r,n.getDateTimeFormat),formatDateTimeRange:ef.bind(null,r,n.getDateTimeFormat),formatTimeToParts:nf.bind(null,r,n.getDateTimeFormat),formatPlural:cf.bind(null,r,n.getPluralRules),formatMessage:Mi.bind(null,r,n),$t:Mi.bind(null,r,n),formatList:uf.bind(null,r,n.getListFormat),formatListToParts:fu.bind(null,r,n.getListFormat),formatDisplayName:af.bind(null,r,n.getDisplayNames)})}function mu(e){Yo(e,"[React Intl] Could not find required `intl` object. <IntlProvider> needs to exist in the component ancestry.")}var pu=X(X({},lu),{textComponent:Be.Fragment});function xf(e){return function(t){return e(Be.Children.toArray(t))}}function yf(e,t){if(e===t)return!0;if(!e||!t)return!1;var n=Object.keys(e),r=Object.keys(t),i=n.length;if(r.length!==i)return!1;for(var a=0;a<i;a++){var s=n[a];if(e[s]!==t[s]||!Object.prototype.hasOwnProperty.call(t,s))return!1}return!0}var fa=typeof window<"u"&&!window.__REACT_INTL_BYPASS_GLOBAL_CONTEXT__?window.__REACT_INTL_CONTEXT__||(window.__REACT_INTL_CONTEXT__=Be.createContext(null)):Be.createContext(null);fa.Consumer;var Af=fa.Provider,_f=Af,Cf=fa;function Jt(){var e=Be.useContext(Cf);return mu(e),e}var Bi;(function(e){e.formatDate="FormattedDate",e.formatTime="FormattedTime",e.formatNumber="FormattedNumber",e.formatList="FormattedList",e.formatDisplayName="FormattedDisplayName"})(Bi||(Bi={}));var Fi;(function(e){e.formatDate="FormattedDateParts",e.formatTime="FormattedTimeParts",e.formatNumber="FormattedNumberParts",e.formatList="FormattedListParts"})(Fi||(Fi={}));function gu(e){var t=function(n){var r=Jt(),i=n.value,a=n.children,s=kr(n,["value","children"]),o=typeof i=="string"?new Date(i||0):i,u=e==="formatDate"?r.formatDateToParts(o,s):r.formatTimeToParts(o,s);return a(u)};return t.displayName=Fi[e],t}function Yn(e){var t=function(n){var r=Jt(),i=n.value,a=n.children,s=kr(n,["value","children"]),o=r[e](i,s);if(typeof a=="function")return a(o);var u=r.textComponent||Be.Fragment;return Be.createElement(u,null,o)};return t.displayName=Bi[e],t}function bu(e){return e&&Object.keys(e).reduce(function(t,n){var r=e[n];return t[n]=ou(r)?xf(r):r,t},{})}var is=function(e,t,n,r){for(var i=[],a=4;a<arguments.length;a++)i[a-4]=arguments[a];var s=bu(r),o=Mi.apply(void 0,gt([e,t,n,s],i,!1));return Array.isArray(o)?Be.Children.toArray(o):o},as=function(e,t){var n=e.defaultRichTextElements,r=kr(e,["defaultRichTextElements"]),i=bu(n),a=Tf(X(X(X({},pu),r),{defaultRichTextElements:i}),t),s={locale:a.locale,timeZone:a.timeZone,fallbackOnEmptyString:a.fallbackOnEmptyString,formats:a.formats,defaultLocale:a.defaultLocale,defaultFormats:a.defaultFormats,messages:a.messages,onError:a.onError,defaultRichTextElements:i};return X(X({},a),{formatMessage:is.bind(null,s,a.formatters),$t:is.bind(null,s,a.formatters)})};function Jr(e){return{locale:e.locale,timeZone:e.timeZone,fallbackOnEmptyString:e.fallbackOnEmptyString,formats:e.formats,textComponent:e.textComponent,messages:e.messages,defaultLocale:e.defaultLocale,defaultFormats:e.defaultFormats,onError:e.onError,onWarn:e.onWarn,wrapRichTextChunksInFragment:e.wrapRichTextChunksInFragment,defaultRichTextElements:e.defaultRichTextElements}}var Sf=(function(e){st(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.cache=cu(),n.state={cache:n.cache,intl:as(Jr(n.props),n.cache),prevConfig:Jr(n.props)},n}return t.getDerivedStateFromProps=function(n,r){var i=r.prevConfig,a=r.cache,s=Jr(n);return yf(i,s)?null:{intl:as(s,a),prevConfig:s}},t.prototype.render=function(){return mu(this.state.intl),Be.createElement(_f,{value:this.state.intl},this.props.children)},t.displayName="IntlProvider",t.defaultProps=pu,t})(Be.PureComponent);Yn("formatDate");Yn("formatTime");Yn("formatNumber");Yn("formatList");Yn("formatDisplayName");gu("formatDate");gu("formatTime");const wf=()=>{const e=Jt(),t=e.formatMessage({defaultMessage:"Message the assistant...",id:"chatbot.placeholder.content"}),n=e.formatMessage({defaultMessage:"You",id:"chatbot.chatline.label.user"}),r=e.formatMessage({defaultMessage:"Assistant",id:"chatbot.chatline.label.assistant"}),i=e.formatMessage({defaultMessage:"⏳ The chatbot is a little busy at the time. Please try again later.",id:"chatbot.error.api.429"}),a=e.formatMessage({defaultMessage:"Oops ! There has been an error. Please try again later.",id:"chatbot.error.api.500"}),s=e.formatMessage({defaultMessage:"Oups ! The discussion is full. Please start a new one.",id:"chatbot.error.api.409"}),o=e.formatMessage({defaultMessage:"See",id:"chatbot.infobanner.title"}),u=e.formatMessage({defaultMessage:"You have an archived discussion.",id:"chatbot.infobanner.cta"});return{placeholderTranslation:t,chatlineLabelUserTranslation:n,chatlineLabelAssistantTranslation:r,tooManyRequestsTranslation:i,genericErrorTranslation:a,discussionFullErrorTranslation:s,infoBannerTitleTranslation:o,infoBannerExplainationTranslation:u}};function ss(e){const t=[],n=String(e||"");let r=n.indexOf(","),i=0,a=!1;for(;!a;){r===-1&&(r=n.length,a=!0);const s=n.slice(i,r).trim();(s||!a)&&t.push(s),i=r+1,r=n.indexOf(",",i)}return t}function Eu(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const vf=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,If=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Nf={};function os(e,t){return(Nf.jsx?If:vf).test(e)}const kf=/[ \t\n\f\r]/g;function Of(e){return typeof e=="object"?e.type==="text"?us(e.value):!1:us(e)}function us(e){return e.replace(kf,"")===""}class Gn{constructor(t,n,r){this.property=t,this.normal=n,r&&(this.space=r)}}Gn.prototype.property={};Gn.prototype.normal={};Gn.prototype.space=null;function Tu(e,t){const n={},r={};let i=-1;for(;++i<e.length;)Object.assign(n,e[i].property),Object.assign(r,e[i].normal);return new Gn(n,r,t)}function Hn(e){return e.toLowerCase()}class ut{constructor(t,n){this.property=t,this.attribute=n}}ut.prototype.space=null;ut.prototype.boolean=!1;ut.prototype.booleanish=!1;ut.prototype.overloadedBoolean=!1;ut.prototype.number=!1;ut.prototype.commaSeparated=!1;ut.prototype.spaceSeparated=!1;ut.prototype.commaOrSpaceSeparated=!1;ut.prototype.mustUseProperty=!1;ut.prototype.defined=!1;let Lf=0;const le=Zt(),De=Zt(),xu=Zt(),H=Zt(),_e=Zt(),fn=Zt(),Ke=Zt();function Zt(){return 2**++Lf}const Hi=Object.freeze(Object.defineProperty({__proto__:null,boolean:le,booleanish:De,commaOrSpaceSeparated:Ke,commaSeparated:fn,number:H,overloadedBoolean:xu,spaceSeparated:_e},Symbol.toStringTag,{value:"Module"})),Zr=Object.keys(Hi);class ha extends ut{constructor(t,n,r,i){let a=-1;if(super(t,n),ls(this,"space",i),typeof r=="number")for(;++a<Zr.length;){const s=Zr[a];ls(this,Zr[a],(r&Hi[s])===Hi[s])}}}ha.prototype.defined=!0;function ls(e,t,n){n&&(e[t]=n)}const Rf={}.hasOwnProperty;function En(e){const t={},n={};let r;for(r in e.properties)if(Rf.call(e.properties,r)){const i=e.properties[r],a=new ha(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[Hn(r)]=r,n[Hn(a.attribute)]=r}return new Gn(t,n,e.space)}const yu=En({space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()},properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null}}),Au=En({space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()},properties:{xmlLang:null,xmlBase:null,xmlSpace:null}});function _u(e,t){return t in e?e[t]:t}function Cu(e,t){return _u(e,t.toLowerCase())}const Su=En({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:Cu,properties:{xmlns:null,xmlnsXLink:null}}),wu=En({transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()},properties:{ariaActiveDescendant:null,ariaAtomic:De,ariaAutoComplete:null,ariaBusy:De,ariaChecked:De,ariaColCount:H,ariaColIndex:H,ariaColSpan:H,ariaControls:_e,ariaCurrent:null,ariaDescribedBy:_e,ariaDetails:null,ariaDisabled:De,ariaDropEffect:_e,ariaErrorMessage:null,ariaExpanded:De,ariaFlowTo:_e,ariaGrabbed:De,ariaHasPopup:null,ariaHidden:De,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:_e,ariaLevel:H,ariaLive:null,ariaModal:De,ariaMultiLine:De,ariaMultiSelectable:De,ariaOrientation:null,ariaOwns:_e,ariaPlaceholder:null,ariaPosInSet:H,ariaPressed:De,ariaReadOnly:De,ariaRelevant:null,ariaRequired:De,ariaRoleDescription:_e,ariaRowCount:H,ariaRowIndex:H,ariaRowSpan:H,ariaSelected:De,ariaSetSize:H,ariaSort:null,ariaValueMax:H,ariaValueMin:H,ariaValueNow:H,ariaValueText:null,role:null}}),Df=En({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:Cu,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:fn,acceptCharset:_e,accessKey:_e,action:null,allow:null,allowFullScreen:le,allowPaymentRequest:le,allowUserMedia:le,alt:null,as:null,async:le,autoCapitalize:null,autoComplete:_e,autoFocus:le,autoPlay:le,blocking:_e,capture:null,charSet:null,checked:le,cite:null,className:_e,cols:H,colSpan:null,content:null,contentEditable:De,controls:le,controlsList:_e,coords:H|fn,crossOrigin:null,data:null,dateTime:null,decoding:null,default:le,defer:le,dir:null,dirName:null,disabled:le,download:xu,draggable:De,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:le,formTarget:null,headers:_e,height:H,hidden:le,high:H,href:null,hrefLang:null,htmlFor:_e,httpEquiv:_e,id:null,imageSizes:null,imageSrcSet:null,inert:le,inputMode:null,integrity:null,is:null,isMap:le,itemId:null,itemProp:_e,itemRef:_e,itemScope:le,itemType:_e,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:le,low:H,manifest:null,max:null,maxLength:H,media:null,method:null,min:null,minLength:H,multiple:le,muted:le,name:null,nonce:null,noModule:le,noValidate:le,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:le,optimum:H,pattern:null,ping:_e,placeholder:null,playsInline:le,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:le,referrerPolicy:null,rel:_e,required:le,reversed:le,rows:H,rowSpan:H,sandbox:_e,scope:null,scoped:le,seamless:le,selected:le,shadowRootDelegatesFocus:le,shadowRootMode:null,shape:null,size:H,sizes:null,slot:null,span:H,spellCheck:De,src:null,srcDoc:null,srcLang:null,srcSet:null,start:H,step:null,style:null,tabIndex:H,target:null,title:null,translate:null,type:null,typeMustMatch:le,useMap:null,value:De,width:H,wrap:null,align:null,aLink:null,archive:_e,axis:null,background:null,bgColor:null,border:H,borderColor:null,bottomMargin:H,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:le,declare:le,event:null,face:null,frame:null,frameBorder:null,hSpace:H,leftMargin:H,link:null,longDesc:null,lowSrc:null,marginHeight:H,marginWidth:H,noResize:le,noHref:le,noShade:le,noWrap:le,object:null,profile:null,prompt:null,rev:null,rightMargin:H,rules:null,scheme:null,scrolling:De,standby:null,summary:null,text:null,topMargin:H,valueType:null,version:null,vAlign:null,vLink:null,vSpace:H,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:le,disableRemotePlayback:le,prefix:null,property:null,results:H,security:null,unselectable:null}}),Pf=En({space:"svg",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"},transform:_u,properties:{about:Ke,accentHeight:H,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:H,amplitude:H,arabicForm:null,ascent:H,attributeName:null,attributeType:null,azimuth:H,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:H,by:null,calcMode:null,capHeight:H,className:_e,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:H,diffuseConstant:H,direction:null,display:null,dur:null,divisor:H,dominantBaseline:null,download:le,dx:null,dy:null,edgeMode:null,editable:null,elevation:H,enableBackground:null,end:null,event:null,exponent:H,externalResourcesRequired:null,fill:null,fillOpacity:H,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:fn,g2:fn,glyphName:fn,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:H,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:H,horizOriginX:H,horizOriginY:H,id:null,ideographic:H,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:H,k:H,k1:H,k2:H,k3:H,k4:H,kernelMatrix:Ke,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:H,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:H,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:H,overlineThickness:H,paintOrder:null,panose1:null,path:null,pathLength:H,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:_e,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:H,pointsAtY:H,pointsAtZ:H,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Ke,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Ke,rev:Ke,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Ke,requiredFeatures:Ke,requiredFonts:Ke,requiredFormats:Ke,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:H,specularExponent:H,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:H,strikethroughThickness:H,string:null,stroke:null,strokeDashArray:Ke,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:H,strokeOpacity:H,strokeWidth:null,style:null,surfaceScale:H,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Ke,tabIndex:H,tableValues:null,target:null,targetX:H,targetY:H,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Ke,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:H,underlineThickness:H,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:H,values:null,vAlphabetic:H,vMathematical:H,vectorEffect:null,vHanging:H,vIdeographic:H,version:null,vertAdvY:H,vertOriginX:H,vertOriginY:H,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:H,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null}}),Mf=/^data[-\w.:]+$/i,cs=/-[a-z]/g,Bf=/[A-Z]/g;function Lr(e,t){const n=Hn(t);let r=t,i=ut;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&Mf.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(cs,Hf);r="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!cs.test(a)){let s=a.replace(Bf,Ff);s.charAt(0)!=="-"&&(s="-"+s),t="data"+s}}i=ha}return new i(r,t)}function Ff(e){return"-"+e.toLowerCase()}function Hf(e){return e.charAt(1).toUpperCase()}const Uf={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"},Vn=Tu([Au,yu,Su,wu,Df],"html"),Bt=Tu([Au,yu,Su,wu,Pf],"svg");function ds(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function vu(e){return e.join(" ").trim()}var an={},ei,fs;function jf(){if(fs)return ei;fs=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,a=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,s=/^[;\s]*/,o=/^\s+|\s+$/g,u=`
48
- `,c="/",d="*",f="",m="comment",h="declaration";ei=function(A,w){if(typeof A!="string")throw new TypeError("First argument must be a string");if(!A)return[];w=w||{};var y=1,_=1;function S(U){var z=U.match(t);z&&(y+=z.length);var Q=U.lastIndexOf(u);_=~Q?U.length-Q:_+U.length}function D(){var U={line:y,column:_};return function(z){return z.position=new I(U),se(),z}}function I(U){this.start=U,this.end={line:y,column:_},this.source=w.source}I.prototype.content=A;function N(U){var z=new Error(w.source+":"+y+":"+_+": "+U);if(z.reason=U,z.filename=w.source,z.line=y,z.column=_,z.source=A,!w.silent)throw z}function G(U){var z=U.exec(A);if(z){var Q=z[0];return S(Q),A=A.slice(Q.length),z}}function se(){G(n)}function ee(U){var z;for(U=U||[];z=k();)z!==!1&&U.push(z);return U}function k(){var U=D();if(!(c!=A.charAt(0)||d!=A.charAt(1))){for(var z=2;f!=A.charAt(z)&&(d!=A.charAt(z)||c!=A.charAt(z+1));)++z;if(z+=2,f===A.charAt(z-1))return N("End of comment missing");var Q=A.slice(2,z-2);return _+=2,S(Q),A=A.slice(z),_+=2,U({type:m,comment:Q})}}function M(){var U=D(),z=G(r);if(z){if(k(),!G(i))return N("property missing ':'");var Q=G(a),he=U({type:h,property:b(z[0].replace(e,f)),value:Q?b(Q[0].replace(e,f)):f});return G(s),he}}function $(){var U=[];ee(U);for(var z;z=M();)z!==!1&&(U.push(z),ee(U));return U}return se(),$()};function b(A){return A?A.replace(o,f):f}return ei}var hs;function zf(){if(hs)return an;hs=1;var e=an&&an.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(an,"__esModule",{value:!0});var t=e(jf());function n(r,i){var a=null;if(!r||typeof r!="string")return a;var s=(0,t.default)(r),o=typeof i=="function";return s.forEach(function(u){if(u.type==="declaration"){var c=u.property,d=u.value;o?i(c,d,u):d&&(a=a||{},a[c]=d)}}),a}return an.default=n,an}var $f=zf();const ms=sa($f),Yf=ms.default||ms,Rr=Iu("end"),xt=Iu("start");function Iu(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function Gf(e){const t=xt(e),n=Rr(e);if(t&&n)return{start:t,end:n}}function On(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?ps(e.position):"start"in e||"end"in e?ps(e):"line"in e||"column"in e?Ui(e):""}function Ui(e){return gs(e&&e.line)+":"+gs(e&&e.column)}function ps(e){return Ui(e&&e.start)+"-"+Ui(e&&e.end)}function gs(e){return e&&typeof e=="number"?e:1}class je extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let i="",a={},s=!1;if(n&&("line"in n&&"column"in n?a={place:n}:"start"in n&&"end"in n?a={place:n}:"type"in n?a={ancestors:[n],place:n.position}:a={...n}),typeof t=="string"?i=t:!a.cause&&t&&(s=!0,i=t.message,a.cause=t),!a.ruleId&&!a.source&&typeof r=="string"){const u=r.indexOf(":");u===-1?a.ruleId=r:(a.source=r.slice(0,u),a.ruleId=r.slice(u+1))}if(!a.place&&a.ancestors&&a.ancestors){const u=a.ancestors[a.ancestors.length-1];u&&(a.place=u.position)}const o=a.place&&"start"in a.place?a.place.start:a.place;this.ancestors=a.ancestors||void 0,this.cause=a.cause||void 0,this.column=o?o.column:void 0,this.fatal=void 0,this.file,this.message=i,this.line=o?o.line:void 0,this.name=On(a.place)||"1:1",this.place=a.place||void 0,this.reason=this.message,this.ruleId=a.ruleId||void 0,this.source=a.source||void 0,this.stack=s&&a.cause&&typeof a.cause.stack=="string"?a.cause.stack:"",this.actual,this.expected,this.note,this.url}}je.prototype.file="";je.prototype.name="";je.prototype.reason="";je.prototype.message="";je.prototype.stack="";je.prototype.column=void 0;je.prototype.line=void 0;je.prototype.ancestors=void 0;je.prototype.cause=void 0;je.prototype.fatal=void 0;je.prototype.place=void 0;je.prototype.ruleId=void 0;je.prototype.source=void 0;const ma={}.hasOwnProperty,Vf=new Map,qf=/[A-Z]/g,Wf=/-([a-z])/g,Xf=new Set(["table","tbody","thead","tfoot","tr"]),Qf=new Set(["td","th"]),Nu="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function Kf(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=ah(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=ih(n,t.jsx,t.jsxs)}const i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?Bt:Vn,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=ku(i,e,void 0);return a&&typeof a!="string"?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}function ku(e,t,n){if(t.type==="element")return Jf(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return Zf(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return th(e,t,n);if(t.type==="mdxjsEsm")return eh(e,t);if(t.type==="root")return nh(e,t,n);if(t.type==="text")return rh(e,t)}function Jf(e,t,n){const r=e.schema;let i=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=Bt,e.schema=i),e.ancestors.push(t);const a=Lu(e,t.tagName,!1),s=sh(e,t);let o=ga(e,t);return Xf.has(t.tagName)&&(o=o.filter(function(u){return typeof u=="string"?!Of(u):!0})),Ou(e,s,a,t),pa(s,o),e.ancestors.pop(),e.schema=r,e.create(t,a,s,n)}function Zf(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}Un(e,t.position)}function eh(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Un(e,t.position)}function th(e,t,n){const r=e.schema;let i=r;t.name==="svg"&&r.space==="html"&&(i=Bt,e.schema=i),e.ancestors.push(t);const a=t.name===null?e.Fragment:Lu(e,t.name,!0),s=oh(e,t),o=ga(e,t);return Ou(e,s,a,t),pa(s,o),e.ancestors.pop(),e.schema=r,e.create(t,a,s,n)}function nh(e,t,n){const r={};return pa(r,ga(e,t)),e.create(t,e.Fragment,r,n)}function rh(e,t){return t.value}function Ou(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function pa(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function ih(e,t,n){return r;function r(i,a,s,o){const c=Array.isArray(s.children)?n:t;return o?c(a,s,o):c(a,s)}}function ah(e,t){return n;function n(r,i,a,s){const o=Array.isArray(a.children),u=xt(r);return t(i,a,s,o,{columnNumber:u?u.column-1:void 0,fileName:e,lineNumber:u?u.line:void 0},void 0)}}function sh(e,t){const n={};let r,i;for(i in t.properties)if(i!=="children"&&ma.call(t.properties,i)){const a=uh(e,i,t.properties[i]);if(a){const[s,o]=a;e.tableCellAlignToStyle&&s==="align"&&typeof o=="string"&&Qf.has(t.tagName)?r=o:n[s]=o}}if(r){const a=n.style||(n.style={});a[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function oh(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const a=r.data.estree.body[0];a.type;const s=a.expression;s.type;const o=s.properties[0];o.type,Object.assign(n,e.evaluater.evaluateExpression(o.argument))}else Un(e,t.position);else{const i=r.name;let a;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const o=r.value.data.estree.body[0];o.type,a=e.evaluater.evaluateExpression(o.expression)}else Un(e,t.position);else a=r.value===null?!0:r.value;n[i]=a}return n}function ga(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:Vf;for(;++r<t.children.length;){const a=t.children[r];let s;if(e.passKeys){const u=a.type==="element"?a.tagName:a.type==="mdxJsxFlowElement"||a.type==="mdxJsxTextElement"?a.name:void 0;if(u){const c=i.get(u)||0;s=u+"-"+c,i.set(u,c+1)}}const o=ku(e,a,s);o!==void 0&&n.push(o)}return n}function uh(e,t,n){const r=Lr(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?Eu(n):vu(n)),r.property==="style"){let i=typeof n=="object"?n:lh(e,String(n));return e.stylePropertyNameCase==="css"&&(i=ch(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&r.space?Uf[r.property]||r.property:r.attribute,n]}}function lh(e,t){const n={};try{Yf(t,r)}catch(i){if(!e.ignoreInvalidStyle){const a=i,s=new je("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:a,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw s.file=e.filePath||void 0,s.url=Nu+"#cannot-parse-style-attribute",s}}return n;function r(i,a){let s=i;s.slice(0,2)!=="--"&&(s.slice(0,4)==="-ms-"&&(s="ms-"+s.slice(4)),s=s.replace(Wf,fh)),n[s]=a}}function Lu(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const i=t.split(".");let a=-1,s;for(;++a<i.length;){const o=os(i[a])?{type:"Identifier",name:i[a]}:{type:"Literal",value:i[a]};s=s?{type:"MemberExpression",object:s,property:o,computed:!!(a&&o.type==="Literal"),optional:!1}:o}r=s}else r=os(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const i=r.value;return ma.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);Un(e)}function Un(e,t){const n=new je("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=Nu+"#cannot-handle-mdx-estrees-without-createevaluater",n}function ch(e){const t={};let n;for(n in e)ma.call(e,n)&&(t[dh(n)]=e[n]);return t}function dh(e){let t=e.replace(qf,hh);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function fh(e,t){return t.toUpperCase()}function hh(e){return"-"+e.toLowerCase()}const ti={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"]},mh={};function ba(e,t){const n=mh,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return Ru(e,r,i)}function Ru(e,t,n){if(ph(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return bs(e.children,t,n)}return Array.isArray(e)?bs(e,t,n):""}function bs(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=Ru(e[i],t,n);return r.join("")}function ph(e){return!!(e&&typeof e=="object")}const Es=document.createElement("i");function Ea(e){const t="&"+e+";";Es.innerHTML=t;const n=Es.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function Je(e,t,n,r){const i=e.length;let a=0,s;if(t<0?t=-t>i?0:i+t:t=t>i?i:t,n=n>0?n:0,r.length<1e4)s=Array.from(r),s.unshift(t,n),e.splice(...s);else for(n&&e.splice(t,n);a<r.length;)s=r.slice(a,a+1e4),s.unshift(t,0),e.splice(...s),a+=1e4,t+=1e4}function nt(e,t){return e.length>0?(Je(e,e.length,0,t),e):t}const Ts={}.hasOwnProperty;function Du(e){const t={};let n=-1;for(;++n<e.length;)gh(t,e[n]);return t}function gh(e,t){let n;for(n in t){const i=(Ts.call(e,n)?e[n]:void 0)||(e[n]={}),a=t[n];let s;if(a)for(s in a){Ts.call(i,s)||(i[s]=[]);const o=a[s];bh(i[s],Array.isArray(o)?o:o?[o]:[])}}}function bh(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);Je(e,0,0,r)}function Pu(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function dt(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Ve=Ft(/[A-Za-z]/),Ue=Ft(/[\dA-Za-z]/),Eh=Ft(/[#-'*+\--9=?A-Z^-~]/);function pr(e){return e!==null&&(e<32||e===127)}const ji=Ft(/\d/),Th=Ft(/[\dA-Fa-f]/),xh=Ft(/[!-/:-@[-`{-~]/);function te(e){return e!==null&&e<-2}function Ae(e){return e!==null&&(e<0||e===32)}function de(e){return e===-2||e===-1||e===32}const Dr=Ft(new RegExp("\\p{P}|\\p{S}","u")),Wt=Ft(/\s/);function Ft(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function Tn(e){const t=[];let n=-1,r=0,i=0;for(;++n<e.length;){const a=e.charCodeAt(n);let s="";if(a===37&&Ue(e.charCodeAt(n+1))&&Ue(e.charCodeAt(n+2)))i=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(s=String.fromCharCode(a));else if(a>55295&&a<57344){const o=e.charCodeAt(n+1);a<56320&&o>56319&&o<57344?(s=String.fromCharCode(a,o),i=1):s="�"}else s=String.fromCharCode(a);s&&(t.push(e.slice(r,n),encodeURIComponent(s)),r=n+i+1,s=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}function be(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let a=0;return s;function s(u){return de(u)?(e.enter(n),o(u)):t(u)}function o(u){return de(u)&&a++<i?(e.consume(u),o):(e.exit(n),t(u))}}const yh={tokenize:Ah};function Ah(e){const t=e.attempt(this.parser.constructs.contentInitial,r,i);let n;return t;function r(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),be(e,t,"linePrefix")}function i(o){return e.enter("paragraph"),a(o)}function a(o){const u=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=u),n=u,s(o)}function s(o){if(o===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(o);return}return te(o)?(e.consume(o),e.exit("chunkText"),a):(e.consume(o),s)}}const _h={tokenize:Ch},xs={tokenize:Sh};function Ch(e){const t=this,n=[];let r=0,i,a,s;return o;function o(S){if(r<n.length){const D=n[r];return t.containerState=D[1],e.attempt(D[0].continuation,u,c)(S)}return c(S)}function u(S){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&_();const D=t.events.length;let I=D,N;for(;I--;)if(t.events[I][0]==="exit"&&t.events[I][1].type==="chunkFlow"){N=t.events[I][1].end;break}y(r);let G=D;for(;G<t.events.length;)t.events[G][1].end=Object.assign({},N),G++;return Je(t.events,I+1,0,t.events.slice(D)),t.events.length=G,c(S)}return o(S)}function c(S){if(r===n.length){if(!i)return m(S);if(i.currentConstruct&&i.currentConstruct.concrete)return b(S);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(xs,d,f)(S)}function d(S){return i&&_(),y(r),m(S)}function f(S){return t.parser.lazy[t.now().line]=r!==n.length,s=t.now().offset,b(S)}function m(S){return t.containerState={},e.attempt(xs,h,b)(S)}function h(S){return r++,n.push([t.currentConstruct,t.containerState]),m(S)}function b(S){if(S===null){i&&_(),y(0),e.consume(S);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{contentType:"flow",previous:a,_tokenizer:i}),A(S)}function A(S){if(S===null){w(e.exit("chunkFlow"),!0),y(0),e.consume(S);return}return te(S)?(e.consume(S),w(e.exit("chunkFlow")),r=0,t.interrupt=void 0,o):(e.consume(S),A)}function w(S,D){const I=t.sliceStream(S);if(D&&I.push(null),S.previous=a,a&&(a.next=S),a=S,i.defineSkip(S.start),i.write(I),t.parser.lazy[S.start.line]){let N=i.events.length;for(;N--;)if(i.events[N][1].start.offset<s&&(!i.events[N][1].end||i.events[N][1].end.offset>s))return;const G=t.events.length;let se=G,ee,k;for(;se--;)if(t.events[se][0]==="exit"&&t.events[se][1].type==="chunkFlow"){if(ee){k=t.events[se][1].end;break}ee=!0}for(y(r),N=G;N<t.events.length;)t.events[N][1].end=Object.assign({},k),N++;Je(t.events,se+1,0,t.events.slice(G)),t.events.length=N}}function y(S){let D=n.length;for(;D-- >S;){const I=n[D];t.containerState=I[1],I[0].exit.call(t,e)}n.length=S}function _(){i.write([null]),a=void 0,i=void 0,t.containerState._closeFlow=void 0}}function Sh(e,t,n){return be(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function gr(e){if(e===null||Ae(e)||Wt(e))return 1;if(Dr(e))return 2}function Pr(e,t,n){const r=[];let i=-1;for(;++i<e.length;){const a=e[i].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}const zi={name:"attention",tokenize:vh,resolveAll:wh};function wh(e,t){let n=-1,r,i,a,s,o,u,c,d;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;u=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const f=Object.assign({},e[r][1].end),m=Object.assign({},e[n][1].start);ys(f,-u),ys(m,u),s={type:u>1?"strongSequence":"emphasisSequence",start:f,end:Object.assign({},e[r][1].end)},o={type:u>1?"strongSequence":"emphasisSequence",start:Object.assign({},e[n][1].start),end:m},a={type:u>1?"strongText":"emphasisText",start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},i={type:u>1?"strong":"emphasis",start:Object.assign({},s.start),end:Object.assign({},o.end)},e[r][1].end=Object.assign({},s.start),e[n][1].start=Object.assign({},o.end),c=[],e[r][1].end.offset-e[r][1].start.offset&&(c=nt(c,[["enter",e[r][1],t],["exit",e[r][1],t]])),c=nt(c,[["enter",i,t],["enter",s,t],["exit",s,t],["enter",a,t]]),c=nt(c,Pr(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),c=nt(c,[["exit",a,t],["enter",o,t],["exit",o,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(d=2,c=nt(c,[["enter",e[n][1],t],["exit",e[n][1],t]])):d=0,Je(e,r-1,n-r+3,c),n=r+c.length-d-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function vh(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=gr(r);let a;return s;function s(u){return a=u,e.enter("attentionSequence"),o(u)}function o(u){if(u===a)return e.consume(u),o;const c=e.exit("attentionSequence"),d=gr(u),f=!d||d===2&&i||n.includes(u),m=!i||i===2&&d||n.includes(r);return c._open=!!(a===42?f:f&&(i||!m)),c._close=!!(a===42?m:m&&(d||!f)),t(u)}}function ys(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const Ih={name:"autolink",tokenize:Nh};function Nh(e,t,n){let r=0;return i;function i(h){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(h),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),a}function a(h){return Ve(h)?(e.consume(h),s):c(h)}function s(h){return h===43||h===45||h===46||Ue(h)?(r=1,o(h)):c(h)}function o(h){return h===58?(e.consume(h),r=0,u):(h===43||h===45||h===46||Ue(h))&&r++<32?(e.consume(h),o):(r=0,c(h))}function u(h){return h===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(h),e.exit("autolinkMarker"),e.exit("autolink"),t):h===null||h===32||h===60||pr(h)?n(h):(e.consume(h),u)}function c(h){return h===64?(e.consume(h),d):Eh(h)?(e.consume(h),c):n(h)}function d(h){return Ue(h)?f(h):n(h)}function f(h){return h===46?(e.consume(h),r=0,d):h===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(h),e.exit("autolinkMarker"),e.exit("autolink"),t):m(h)}function m(h){if((h===45||Ue(h))&&r++<63){const b=h===45?m:f;return e.consume(h),b}return n(h)}}const qn={tokenize:kh,partial:!0};function kh(e,t,n){return r;function r(a){return de(a)?be(e,i,"linePrefix")(a):i(a)}function i(a){return a===null||te(a)?t(a):n(a)}}const Mu={name:"blockQuote",tokenize:Oh,continuation:{tokenize:Lh},exit:Rh};function Oh(e,t,n){const r=this;return i;function i(s){if(s===62){const o=r.containerState;return o.open||(e.enter("blockQuote",{_container:!0}),o.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(s),e.exit("blockQuoteMarker"),a}return n(s)}function a(s){return de(s)?(e.enter("blockQuotePrefixWhitespace"),e.consume(s),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(s))}}function Lh(e,t,n){const r=this;return i;function i(s){return de(s)?be(e,a,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s):a(s)}function a(s){return e.attempt(Mu,t,n)(s)}}function Rh(e){e.exit("blockQuote")}const Bu={name:"characterEscape",tokenize:Dh};function Dh(e,t,n){return r;function r(a){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(a),e.exit("escapeMarker"),i}function i(a){return xh(a)?(e.enter("characterEscapeValue"),e.consume(a),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(a)}}const Fu={name:"characterReference",tokenize:Ph};function Ph(e,t,n){const r=this;let i=0,a,s;return o;function o(f){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(f),e.exit("characterReferenceMarker"),u}function u(f){return f===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(f),e.exit("characterReferenceMarkerNumeric"),c):(e.enter("characterReferenceValue"),a=31,s=Ue,d(f))}function c(f){return f===88||f===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(f),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),a=6,s=Th,d):(e.enter("characterReferenceValue"),a=7,s=ji,d(f))}function d(f){if(f===59&&i){const m=e.exit("characterReferenceValue");return s===Ue&&!Ea(r.sliceSerialize(m))?n(f):(e.enter("characterReferenceMarker"),e.consume(f),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return s(f)&&i++<a?(e.consume(f),d):n(f)}}const As={tokenize:Bh,partial:!0},_s={name:"codeFenced",tokenize:Mh,concrete:!0};function Mh(e,t,n){const r=this,i={tokenize:I,partial:!0};let a=0,s=0,o;return u;function u(N){return c(N)}function c(N){const G=r.events[r.events.length-1];return a=G&&G[1].type==="linePrefix"?G[2].sliceSerialize(G[1],!0).length:0,o=N,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),d(N)}function d(N){return N===o?(s++,e.consume(N),d):s<3?n(N):(e.exit("codeFencedFenceSequence"),de(N)?be(e,f,"whitespace")(N):f(N))}function f(N){return N===null||te(N)?(e.exit("codeFencedFence"),r.interrupt?t(N):e.check(As,A,D)(N)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),m(N))}function m(N){return N===null||te(N)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),f(N)):de(N)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),be(e,h,"whitespace")(N)):N===96&&N===o?n(N):(e.consume(N),m)}function h(N){return N===null||te(N)?f(N):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),b(N))}function b(N){return N===null||te(N)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),f(N)):N===96&&N===o?n(N):(e.consume(N),b)}function A(N){return e.attempt(i,D,w)(N)}function w(N){return e.enter("lineEnding"),e.consume(N),e.exit("lineEnding"),y}function y(N){return a>0&&de(N)?be(e,_,"linePrefix",a+1)(N):_(N)}function _(N){return N===null||te(N)?e.check(As,A,D)(N):(e.enter("codeFlowValue"),S(N))}function S(N){return N===null||te(N)?(e.exit("codeFlowValue"),_(N)):(e.consume(N),S)}function D(N){return e.exit("codeFenced"),t(N)}function I(N,G,se){let ee=0;return k;function k(Q){return N.enter("lineEnding"),N.consume(Q),N.exit("lineEnding"),M}function M(Q){return N.enter("codeFencedFence"),de(Q)?be(N,$,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(Q):$(Q)}function $(Q){return Q===o?(N.enter("codeFencedFenceSequence"),U(Q)):se(Q)}function U(Q){return Q===o?(ee++,N.consume(Q),U):ee>=s?(N.exit("codeFencedFenceSequence"),de(Q)?be(N,z,"whitespace")(Q):z(Q)):se(Q)}function z(Q){return Q===null||te(Q)?(N.exit("codeFencedFence"),G(Q)):se(Q)}}}function Bh(e,t,n){const r=this;return i;function i(s){return s===null?n(s):(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),a)}function a(s){return r.parser.lazy[r.now().line]?n(s):t(s)}}const ni={name:"codeIndented",tokenize:Hh},Fh={tokenize:Uh,partial:!0};function Hh(e,t,n){const r=this;return i;function i(c){return e.enter("codeIndented"),be(e,a,"linePrefix",5)(c)}function a(c){const d=r.events[r.events.length-1];return d&&d[1].type==="linePrefix"&&d[2].sliceSerialize(d[1],!0).length>=4?s(c):n(c)}function s(c){return c===null?u(c):te(c)?e.attempt(Fh,s,u)(c):(e.enter("codeFlowValue"),o(c))}function o(c){return c===null||te(c)?(e.exit("codeFlowValue"),s(c)):(e.consume(c),o)}function u(c){return e.exit("codeIndented"),t(c)}}function Uh(e,t,n){const r=this;return i;function i(s){return r.parser.lazy[r.now().line]?n(s):te(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),i):be(e,a,"linePrefix",5)(s)}function a(s){const o=r.events[r.events.length-1];return o&&o[1].type==="linePrefix"&&o[2].sliceSerialize(o[1],!0).length>=4?t(s):te(s)?i(s):n(s)}}const jh={name:"codeText",tokenize:Yh,resolve:zh,previous:$h};function zh(e){let t=e.length-4,n=3,r,i;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(i=r):(r===t||e[r][1].type==="lineEnding")&&(e[i][1].type="codeTextData",r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function $h(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function Yh(e,t,n){let r=0,i,a;return s;function s(f){return e.enter("codeText"),e.enter("codeTextSequence"),o(f)}function o(f){return f===96?(e.consume(f),r++,o):(e.exit("codeTextSequence"),u(f))}function u(f){return f===null?n(f):f===32?(e.enter("space"),e.consume(f),e.exit("space"),u):f===96?(a=e.enter("codeTextSequence"),i=0,d(f)):te(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),u):(e.enter("codeTextData"),c(f))}function c(f){return f===null||f===32||f===96||te(f)?(e.exit("codeTextData"),u(f)):(e.consume(f),c)}function d(f){return f===96?(e.consume(f),i++,d):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(f)):(a.type="codeTextData",c(f))}}function Hu(e){const t={};let n=-1,r,i,a,s,o,u,c;for(;++n<e.length;){for(;n in t;)n=t[n];if(r=e[n],n&&r[1].type==="chunkFlow"&&e[n-1][1].type==="listItemPrefix"&&(u=r[1]._tokenizer.events,a=0,a<u.length&&u[a][1].type==="lineEndingBlank"&&(a+=2),a<u.length&&u[a][1].type==="content"))for(;++a<u.length&&u[a][1].type!=="content";)u[a][1].type==="chunkText"&&(u[a][1]._isInFirstContentOfListItem=!0,a++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,Gh(e,n)),n=t[n],c=!0);else if(r[1]._container){for(a=n,i=void 0;a--&&(s=e[a],s[1].type==="lineEnding"||s[1].type==="lineEndingBlank");)s[0]==="enter"&&(i&&(e[i][1].type="lineEndingBlank"),s[1].type="lineEnding",i=a);i&&(r[1].end=Object.assign({},e[i][1].start),o=e.slice(i,n),o.unshift(r),Je(e,i,n-i+1,o))}}return!c}function Gh(e,t){const n=e[t][1],r=e[t][2];let i=t-1;const a=[],s=n._tokenizer||r.parser[n.contentType](n.start),o=s.events,u=[],c={};let d,f,m=-1,h=n,b=0,A=0;const w=[A];for(;h;){for(;e[++i][1]!==h;);a.push(i),h._tokenizer||(d=r.sliceStream(h),h.next||d.push(null),f&&s.defineSkip(h.start),h._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=!0),s.write(d),h._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=void 0)),f=h,h=h.next}for(h=n;++m<o.length;)o[m][0]==="exit"&&o[m-1][0]==="enter"&&o[m][1].type===o[m-1][1].type&&o[m][1].start.line!==o[m][1].end.line&&(A=m+1,w.push(A),h._tokenizer=void 0,h.previous=void 0,h=h.next);for(s.events=[],h?(h._tokenizer=void 0,h.previous=void 0):w.pop(),m=w.length;m--;){const y=o.slice(w[m],w[m+1]),_=a.pop();u.unshift([_,_+y.length-1]),Je(e,_,2,y)}for(m=-1;++m<u.length;)c[b+u[m][0]]=b+u[m][1],b+=u[m][1]-u[m][0]-1;return c}const Vh={tokenize:Xh,resolve:Wh},qh={tokenize:Qh,partial:!0};function Wh(e){return Hu(e),e}function Xh(e,t){let n;return r;function r(o){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),i(o)}function i(o){return o===null?a(o):te(o)?e.check(qh,s,a)(o):(e.consume(o),i)}function a(o){return e.exit("chunkContent"),e.exit("content"),t(o)}function s(o){return e.consume(o),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function Qh(e,t,n){const r=this;return i;function i(s){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),be(e,a,"linePrefix")}function a(s){if(s===null||te(s))return n(s);const o=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&o&&o[1].type==="linePrefix"&&o[2].sliceSerialize(o[1],!0).length>=4?t(s):e.interrupt(r.parser.constructs.flow,n,t)(s)}}function Uu(e,t,n,r,i,a,s,o,u){const c=u||Number.POSITIVE_INFINITY;let d=0;return f;function f(y){return y===60?(e.enter(r),e.enter(i),e.enter(a),e.consume(y),e.exit(a),m):y===null||y===32||y===41||pr(y)?n(y):(e.enter(r),e.enter(s),e.enter(o),e.enter("chunkString",{contentType:"string"}),A(y))}function m(y){return y===62?(e.enter(a),e.consume(y),e.exit(a),e.exit(i),e.exit(r),t):(e.enter(o),e.enter("chunkString",{contentType:"string"}),h(y))}function h(y){return y===62?(e.exit("chunkString"),e.exit(o),m(y)):y===null||y===60||te(y)?n(y):(e.consume(y),y===92?b:h)}function b(y){return y===60||y===62||y===92?(e.consume(y),h):h(y)}function A(y){return!d&&(y===null||y===41||Ae(y))?(e.exit("chunkString"),e.exit(o),e.exit(s),e.exit(r),t(y)):d<c&&y===40?(e.consume(y),d++,A):y===41?(e.consume(y),d--,A):y===null||y===32||y===40||pr(y)?n(y):(e.consume(y),y===92?w:A)}function w(y){return y===40||y===41||y===92?(e.consume(y),A):A(y)}}function ju(e,t,n,r,i,a){const s=this;let o=0,u;return c;function c(h){return e.enter(r),e.enter(i),e.consume(h),e.exit(i),e.enter(a),d}function d(h){return o>999||h===null||h===91||h===93&&!u||h===94&&!o&&"_hiddenFootnoteSupport"in s.parser.constructs?n(h):h===93?(e.exit(a),e.enter(i),e.consume(h),e.exit(i),e.exit(r),t):te(h)?(e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),d):(e.enter("chunkString",{contentType:"string"}),f(h))}function f(h){return h===null||h===91||h===93||te(h)||o++>999?(e.exit("chunkString"),d(h)):(e.consume(h),u||(u=!de(h)),h===92?m:f)}function m(h){return h===91||h===92||h===93?(e.consume(h),o++,f):f(h)}}function zu(e,t,n,r,i,a){let s;return o;function o(m){return m===34||m===39||m===40?(e.enter(r),e.enter(i),e.consume(m),e.exit(i),s=m===40?41:m,u):n(m)}function u(m){return m===s?(e.enter(i),e.consume(m),e.exit(i),e.exit(r),t):(e.enter(a),c(m))}function c(m){return m===s?(e.exit(a),u(s)):m===null?n(m):te(m)?(e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),be(e,c,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),d(m))}function d(m){return m===s||m===null||te(m)?(e.exit("chunkString"),c(m)):(e.consume(m),m===92?f:d)}function f(m){return m===s||m===92?(e.consume(m),d):d(m)}}function Ln(e,t){let n;return r;function r(i){return te(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):de(i)?be(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}const Kh={name:"definition",tokenize:Zh},Jh={tokenize:e0,partial:!0};function Zh(e,t,n){const r=this;let i;return a;function a(h){return e.enter("definition"),s(h)}function s(h){return ju.call(r,e,o,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(h)}function o(h){return i=dt(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),h===58?(e.enter("definitionMarker"),e.consume(h),e.exit("definitionMarker"),u):n(h)}function u(h){return Ae(h)?Ln(e,c)(h):c(h)}function c(h){return Uu(e,d,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(h)}function d(h){return e.attempt(Jh,f,f)(h)}function f(h){return de(h)?be(e,m,"whitespace")(h):m(h)}function m(h){return h===null||te(h)?(e.exit("definition"),r.parser.defined.push(i),t(h)):n(h)}}function e0(e,t,n){return r;function r(o){return Ae(o)?Ln(e,i)(o):n(o)}function i(o){return zu(e,a,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(o)}function a(o){return de(o)?be(e,s,"whitespace")(o):s(o)}function s(o){return o===null||te(o)?t(o):n(o)}}const t0={name:"hardBreakEscape",tokenize:n0};function n0(e,t,n){return r;function r(a){return e.enter("hardBreakEscape"),e.consume(a),i}function i(a){return te(a)?(e.exit("hardBreakEscape"),t(a)):n(a)}}const r0={name:"headingAtx",tokenize:a0,resolve:i0};function i0(e,t){let n=e.length-2,r=3,i,a;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(i={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},a={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},Je(e,r,n-r+1,[["enter",i,t],["enter",a,t],["exit",a,t],["exit",i,t]])),e}function a0(e,t,n){let r=0;return i;function i(d){return e.enter("atxHeading"),a(d)}function a(d){return e.enter("atxHeadingSequence"),s(d)}function s(d){return d===35&&r++<6?(e.consume(d),s):d===null||Ae(d)?(e.exit("atxHeadingSequence"),o(d)):n(d)}function o(d){return d===35?(e.enter("atxHeadingSequence"),u(d)):d===null||te(d)?(e.exit("atxHeading"),t(d)):de(d)?be(e,o,"whitespace")(d):(e.enter("atxHeadingText"),c(d))}function u(d){return d===35?(e.consume(d),u):(e.exit("atxHeadingSequence"),o(d))}function c(d){return d===null||d===35||Ae(d)?(e.exit("atxHeadingText"),o(d)):(e.consume(d),c)}}const s0=["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"],Cs=["pre","script","style","textarea"],o0={name:"htmlFlow",tokenize:d0,resolveTo:c0,concrete:!0},u0={tokenize:h0,partial:!0},l0={tokenize:f0,partial:!0};function c0(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function d0(e,t,n){const r=this;let i,a,s,o,u;return c;function c(T){return d(T)}function d(T){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(T),f}function f(T){return T===33?(e.consume(T),m):T===47?(e.consume(T),a=!0,A):T===63?(e.consume(T),i=3,r.interrupt?t:g):Ve(T)?(e.consume(T),s=String.fromCharCode(T),w):n(T)}function m(T){return T===45?(e.consume(T),i=2,h):T===91?(e.consume(T),i=5,o=0,b):Ve(T)?(e.consume(T),i=4,r.interrupt?t:g):n(T)}function h(T){return T===45?(e.consume(T),r.interrupt?t:g):n(T)}function b(T){const K="CDATA[";return T===K.charCodeAt(o++)?(e.consume(T),o===K.length?r.interrupt?t:$:b):n(T)}function A(T){return Ve(T)?(e.consume(T),s=String.fromCharCode(T),w):n(T)}function w(T){if(T===null||T===47||T===62||Ae(T)){const K=T===47,ne=s.toLowerCase();return!K&&!a&&Cs.includes(ne)?(i=1,r.interrupt?t(T):$(T)):s0.includes(s.toLowerCase())?(i=6,K?(e.consume(T),y):r.interrupt?t(T):$(T)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(T):a?_(T):S(T))}return T===45||Ue(T)?(e.consume(T),s+=String.fromCharCode(T),w):n(T)}function y(T){return T===62?(e.consume(T),r.interrupt?t:$):n(T)}function _(T){return de(T)?(e.consume(T),_):k(T)}function S(T){return T===47?(e.consume(T),k):T===58||T===95||Ve(T)?(e.consume(T),D):de(T)?(e.consume(T),S):k(T)}function D(T){return T===45||T===46||T===58||T===95||Ue(T)?(e.consume(T),D):I(T)}function I(T){return T===61?(e.consume(T),N):de(T)?(e.consume(T),I):S(T)}function N(T){return T===null||T===60||T===61||T===62||T===96?n(T):T===34||T===39?(e.consume(T),u=T,G):de(T)?(e.consume(T),N):se(T)}function G(T){return T===u?(e.consume(T),u=null,ee):T===null||te(T)?n(T):(e.consume(T),G)}function se(T){return T===null||T===34||T===39||T===47||T===60||T===61||T===62||T===96||Ae(T)?I(T):(e.consume(T),se)}function ee(T){return T===47||T===62||de(T)?S(T):n(T)}function k(T){return T===62?(e.consume(T),M):n(T)}function M(T){return T===null||te(T)?$(T):de(T)?(e.consume(T),M):n(T)}function $(T){return T===45&&i===2?(e.consume(T),he):T===60&&i===1?(e.consume(T),Ee):T===62&&i===4?(e.consume(T),j):T===63&&i===3?(e.consume(T),g):T===93&&i===5?(e.consume(T),Re):te(T)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(u0,J,U)(T)):T===null||te(T)?(e.exit("htmlFlowData"),U(T)):(e.consume(T),$)}function U(T){return e.check(l0,z,J)(T)}function z(T){return e.enter("lineEnding"),e.consume(T),e.exit("lineEnding"),Q}function Q(T){return T===null||te(T)?U(T):(e.enter("htmlFlowData"),$(T))}function he(T){return T===45?(e.consume(T),g):$(T)}function Ee(T){return T===47?(e.consume(T),s="",Le):$(T)}function Le(T){if(T===62){const K=s.toLowerCase();return Cs.includes(K)?(e.consume(T),j):$(T)}return Ve(T)&&s.length<8?(e.consume(T),s+=String.fromCharCode(T),Le):$(T)}function Re(T){return T===93?(e.consume(T),g):$(T)}function g(T){return T===62?(e.consume(T),j):T===45&&i===2?(e.consume(T),g):$(T)}function j(T){return T===null||te(T)?(e.exit("htmlFlowData"),J(T)):(e.consume(T),j)}function J(T){return e.exit("htmlFlow"),t(T)}}function f0(e,t,n){const r=this;return i;function i(s){return te(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),a):n(s)}function a(s){return r.parser.lazy[r.now().line]?n(s):t(s)}}function h0(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(qn,t,n)}}const m0={name:"htmlText",tokenize:p0};function p0(e,t,n){const r=this;let i,a,s;return o;function o(g){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(g),u}function u(g){return g===33?(e.consume(g),c):g===47?(e.consume(g),I):g===63?(e.consume(g),S):Ve(g)?(e.consume(g),se):n(g)}function c(g){return g===45?(e.consume(g),d):g===91?(e.consume(g),a=0,b):Ve(g)?(e.consume(g),_):n(g)}function d(g){return g===45?(e.consume(g),h):n(g)}function f(g){return g===null?n(g):g===45?(e.consume(g),m):te(g)?(s=f,Ee(g)):(e.consume(g),f)}function m(g){return g===45?(e.consume(g),h):f(g)}function h(g){return g===62?he(g):g===45?m(g):f(g)}function b(g){const j="CDATA[";return g===j.charCodeAt(a++)?(e.consume(g),a===j.length?A:b):n(g)}function A(g){return g===null?n(g):g===93?(e.consume(g),w):te(g)?(s=A,Ee(g)):(e.consume(g),A)}function w(g){return g===93?(e.consume(g),y):A(g)}function y(g){return g===62?he(g):g===93?(e.consume(g),y):A(g)}function _(g){return g===null||g===62?he(g):te(g)?(s=_,Ee(g)):(e.consume(g),_)}function S(g){return g===null?n(g):g===63?(e.consume(g),D):te(g)?(s=S,Ee(g)):(e.consume(g),S)}function D(g){return g===62?he(g):S(g)}function I(g){return Ve(g)?(e.consume(g),N):n(g)}function N(g){return g===45||Ue(g)?(e.consume(g),N):G(g)}function G(g){return te(g)?(s=G,Ee(g)):de(g)?(e.consume(g),G):he(g)}function se(g){return g===45||Ue(g)?(e.consume(g),se):g===47||g===62||Ae(g)?ee(g):n(g)}function ee(g){return g===47?(e.consume(g),he):g===58||g===95||Ve(g)?(e.consume(g),k):te(g)?(s=ee,Ee(g)):de(g)?(e.consume(g),ee):he(g)}function k(g){return g===45||g===46||g===58||g===95||Ue(g)?(e.consume(g),k):M(g)}function M(g){return g===61?(e.consume(g),$):te(g)?(s=M,Ee(g)):de(g)?(e.consume(g),M):ee(g)}function $(g){return g===null||g===60||g===61||g===62||g===96?n(g):g===34||g===39?(e.consume(g),i=g,U):te(g)?(s=$,Ee(g)):de(g)?(e.consume(g),$):(e.consume(g),z)}function U(g){return g===i?(e.consume(g),i=void 0,Q):g===null?n(g):te(g)?(s=U,Ee(g)):(e.consume(g),U)}function z(g){return g===null||g===34||g===39||g===60||g===61||g===96?n(g):g===47||g===62||Ae(g)?ee(g):(e.consume(g),z)}function Q(g){return g===47||g===62||Ae(g)?ee(g):n(g)}function he(g){return g===62?(e.consume(g),e.exit("htmlTextData"),e.exit("htmlText"),t):n(g)}function Ee(g){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(g),e.exit("lineEnding"),Le}function Le(g){return de(g)?be(e,Re,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(g):Re(g)}function Re(g){return e.enter("htmlTextData"),s(g)}}const Ta={name:"labelEnd",tokenize:y0,resolveTo:x0,resolveAll:T0},g0={tokenize:A0},b0={tokenize:_0},E0={tokenize:C0};function T0(e){let t=-1;for(;++t<e.length;){const n=e[t][1];(n.type==="labelImage"||n.type==="labelLink"||n.type==="labelEnd")&&(e.splice(t+1,n.type==="labelImage"?4:2),n.type="data",t++)}return e}function x0(e,t){let n=e.length,r=0,i,a,s,o;for(;n--;)if(i=e[n][1],a){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[n][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(s){if(e[n][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(a=n,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(s=n);const u={type:e[a][1].type==="labelLink"?"link":"image",start:Object.assign({},e[a][1].start),end:Object.assign({},e[e.length-1][1].end)},c={type:"label",start:Object.assign({},e[a][1].start),end:Object.assign({},e[s][1].end)},d={type:"labelText",start:Object.assign({},e[a+r+2][1].end),end:Object.assign({},e[s-2][1].start)};return o=[["enter",u,t],["enter",c,t]],o=nt(o,e.slice(a+1,a+r+3)),o=nt(o,[["enter",d,t]]),o=nt(o,Pr(t.parser.constructs.insideSpan.null,e.slice(a+r+4,s-3),t)),o=nt(o,[["exit",d,t],e[s-2],e[s-1],["exit",c,t]]),o=nt(o,e.slice(s+1)),o=nt(o,[["exit",u,t]]),Je(e,a,e.length,o),e}function y0(e,t,n){const r=this;let i=r.events.length,a,s;for(;i--;)if((r.events[i][1].type==="labelImage"||r.events[i][1].type==="labelLink")&&!r.events[i][1]._balanced){a=r.events[i][1];break}return o;function o(m){return a?a._inactive?f(m):(s=r.parser.defined.includes(dt(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(m),e.exit("labelMarker"),e.exit("labelEnd"),u):n(m)}function u(m){return m===40?e.attempt(g0,d,s?d:f)(m):m===91?e.attempt(b0,d,s?c:f)(m):s?d(m):f(m)}function c(m){return e.attempt(E0,d,f)(m)}function d(m){return t(m)}function f(m){return a._balanced=!0,n(m)}}function A0(e,t,n){return r;function r(f){return e.enter("resource"),e.enter("resourceMarker"),e.consume(f),e.exit("resourceMarker"),i}function i(f){return Ae(f)?Ln(e,a)(f):a(f)}function a(f){return f===41?d(f):Uu(e,s,o,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(f)}function s(f){return Ae(f)?Ln(e,u)(f):d(f)}function o(f){return n(f)}function u(f){return f===34||f===39||f===40?zu(e,c,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(f):d(f)}function c(f){return Ae(f)?Ln(e,d)(f):d(f)}function d(f){return f===41?(e.enter("resourceMarker"),e.consume(f),e.exit("resourceMarker"),e.exit("resource"),t):n(f)}}function _0(e,t,n){const r=this;return i;function i(o){return ju.call(r,e,a,s,"reference","referenceMarker","referenceString")(o)}function a(o){return r.parser.defined.includes(dt(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(o):n(o)}function s(o){return n(o)}}function C0(e,t,n){return r;function r(a){return e.enter("reference"),e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),i}function i(a){return a===93?(e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),e.exit("reference"),t):n(a)}}const S0={name:"labelStartImage",tokenize:w0,resolveAll:Ta.resolveAll};function w0(e,t,n){const r=this;return i;function i(o){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(o),e.exit("labelImageMarker"),a}function a(o){return o===91?(e.enter("labelMarker"),e.consume(o),e.exit("labelMarker"),e.exit("labelImage"),s):n(o)}function s(o){return o===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(o):t(o)}}const v0={name:"labelStartLink",tokenize:I0,resolveAll:Ta.resolveAll};function I0(e,t,n){const r=this;return i;function i(s){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(s),e.exit("labelMarker"),e.exit("labelLink"),a}function a(s){return s===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(s):t(s)}}const ri={name:"lineEnding",tokenize:N0};function N0(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),be(e,t,"linePrefix")}}const fr={name:"thematicBreak",tokenize:k0};function k0(e,t,n){let r=0,i;return a;function a(c){return e.enter("thematicBreak"),s(c)}function s(c){return i=c,o(c)}function o(c){return c===i?(e.enter("thematicBreakSequence"),u(c)):r>=3&&(c===null||te(c))?(e.exit("thematicBreak"),t(c)):n(c)}function u(c){return c===i?(e.consume(c),r++,u):(e.exit("thematicBreakSequence"),de(c)?be(e,o,"whitespace")(c):o(c))}}const Qe={name:"list",tokenize:R0,continuation:{tokenize:D0},exit:M0},O0={tokenize:B0,partial:!0},L0={tokenize:P0,partial:!0};function R0(e,t,n){const r=this,i=r.events[r.events.length-1];let a=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,s=0;return o;function o(h){const b=r.containerState.type||(h===42||h===43||h===45?"listUnordered":"listOrdered");if(b==="listUnordered"?!r.containerState.marker||h===r.containerState.marker:ji(h)){if(r.containerState.type||(r.containerState.type=b,e.enter(b,{_container:!0})),b==="listUnordered")return e.enter("listItemPrefix"),h===42||h===45?e.check(fr,n,c)(h):c(h);if(!r.interrupt||h===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),u(h)}return n(h)}function u(h){return ji(h)&&++s<10?(e.consume(h),u):(!r.interrupt||s<2)&&(r.containerState.marker?h===r.containerState.marker:h===41||h===46)?(e.exit("listItemValue"),c(h)):n(h)}function c(h){return e.enter("listItemMarker"),e.consume(h),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||h,e.check(qn,r.interrupt?n:d,e.attempt(O0,m,f))}function d(h){return r.containerState.initialBlankLine=!0,a++,m(h)}function f(h){return de(h)?(e.enter("listItemPrefixWhitespace"),e.consume(h),e.exit("listItemPrefixWhitespace"),m):n(h)}function m(h){return r.containerState.size=a+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(h)}}function D0(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(qn,i,a);function i(o){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,be(e,t,"listItemIndent",r.containerState.size+1)(o)}function a(o){return r.containerState.furtherBlankLines||!de(o)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,s(o)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(L0,t,s)(o))}function s(o){return r.containerState._closeFlow=!0,r.interrupt=void 0,be(e,e.attempt(Qe,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o)}}function P0(e,t,n){const r=this;return be(e,i,"listItemIndent",r.containerState.size+1);function i(a){const s=r.events[r.events.length-1];return s&&s[1].type==="listItemIndent"&&s[2].sliceSerialize(s[1],!0).length===r.containerState.size?t(a):n(a)}}function M0(e){e.exit(this.containerState.type)}function B0(e,t,n){const r=this;return be(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(a){const s=r.events[r.events.length-1];return!de(a)&&s&&s[1].type==="listItemPrefixWhitespace"?t(a):n(a)}}const Ss={name:"setextUnderline",tokenize:H0,resolveTo:F0};function F0(e,t){let n=e.length,r,i,a;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(i=n)}else e[n][1].type==="content"&&e.splice(n,1),!a&&e[n][1].type==="definition"&&(a=n);const s={type:"setextHeading",start:Object.assign({},e[i][1].start),end:Object.assign({},e[e.length-1][1].end)};return e[i][1].type="setextHeadingText",a?(e.splice(i,0,["enter",s,t]),e.splice(a+1,0,["exit",e[r][1],t]),e[r][1].end=Object.assign({},e[a][1].end)):e[r][1]=s,e.push(["exit",s,t]),e}function H0(e,t,n){const r=this;let i;return a;function a(c){let d=r.events.length,f;for(;d--;)if(r.events[d][1].type!=="lineEnding"&&r.events[d][1].type!=="linePrefix"&&r.events[d][1].type!=="content"){f=r.events[d][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||f)?(e.enter("setextHeadingLine"),i=c,s(c)):n(c)}function s(c){return e.enter("setextHeadingLineSequence"),o(c)}function o(c){return c===i?(e.consume(c),o):(e.exit("setextHeadingLineSequence"),de(c)?be(e,u,"lineSuffix")(c):u(c))}function u(c){return c===null||te(c)?(e.exit("setextHeadingLine"),t(c)):n(c)}}const U0={tokenize:j0};function j0(e){const t=this,n=e.attempt(qn,r,e.attempt(this.parser.constructs.flowInitial,i,be(e,e.attempt(this.parser.constructs.flow,i,e.attempt(Vh,i)),"linePrefix")));return n;function r(a){if(a===null){e.consume(a);return}return e.enter("lineEndingBlank"),e.consume(a),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function i(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const z0={resolveAll:Yu()},$0=$u("string"),Y0=$u("text");function $u(e){return{tokenize:t,resolveAll:Yu(e==="text"?G0:void 0)};function t(n){const r=this,i=this.parser.constructs[e],a=n.attempt(i,s,o);return s;function s(d){return c(d)?a(d):o(d)}function o(d){if(d===null){n.consume(d);return}return n.enter("data"),n.consume(d),u}function u(d){return c(d)?(n.exit("data"),a(d)):(n.consume(d),u)}function c(d){if(d===null)return!0;const f=i[d];let m=-1;if(f)for(;++m<f.length;){const h=f[m];if(!h.previous||h.previous.call(r,r.previous))return!0}return!1}}}function Yu(e){return t;function t(n,r){let i=-1,a;for(;++i<=n.length;)a===void 0?n[i]&&n[i][1].type==="data"&&(a=i,i++):(!n[i]||n[i][1].type!=="data")&&(i!==a+2&&(n[a][1].end=n[i-1][1].end,n.splice(a+2,i-a-2),i=a+2),a=void 0);return e?e(n,r):n}}function G0(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],i=t.sliceStream(r);let a=i.length,s=-1,o=0,u;for(;a--;){const c=i[a];if(typeof c=="string"){for(s=c.length;c.charCodeAt(s-1)===32;)o++,s--;if(s)break;s=-1}else if(c===-2)u=!0,o++;else if(c!==-1){a++;break}}if(o){const c={type:n===e.length||u||o<2?"lineSuffix":"hardBreakTrailing",start:{line:r.end.line,column:r.end.column-o,offset:r.end.offset-o,_index:r.start._index+a,_bufferIndex:a?s:r.start._bufferIndex+s},end:Object.assign({},r.end)};r.end=Object.assign({},c.start),r.start.offset===r.end.offset?Object.assign(r,c):(e.splice(n,0,["enter",c,t],["exit",c,t]),n+=2)}n++}return e}function V0(e,t,n){let r=Object.assign(n?Object.assign({},n):{line:1,column:1,offset:0},{_index:0,_bufferIndex:-1});const i={},a=[];let s=[],o=[];const u={consume:_,enter:S,exit:D,attempt:G(I),check:G(N),interrupt:G(N,{interrupt:!0})},c={previous:null,code:null,containerState:{},events:[],parser:e,sliceStream:h,sliceSerialize:m,now:b,defineSkip:A,write:f};let d=t.tokenize.call(c,u);return t.resolveAll&&a.push(t),c;function f(M){return s=nt(s,M),w(),s[s.length-1]!==null?[]:(se(t,0),c.events=Pr(a,c.events,c),c.events)}function m(M,$){return W0(h(M),$)}function h(M){return q0(s,M)}function b(){const{line:M,column:$,offset:U,_index:z,_bufferIndex:Q}=r;return{line:M,column:$,offset:U,_index:z,_bufferIndex:Q}}function A(M){i[M.line]=M.column,k()}function w(){let M;for(;r._index<s.length;){const $=s[r._index];if(typeof $=="string")for(M=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===M&&r._bufferIndex<$.length;)y($.charCodeAt(r._bufferIndex));else y($)}}function y(M){d=d(M)}function _(M){te(M)?(r.line++,r.column=1,r.offset+=M===-3?2:1,k()):M!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===s[r._index].length&&(r._bufferIndex=-1,r._index++)),c.previous=M}function S(M,$){const U=$||{};return U.type=M,U.start=b(),c.events.push(["enter",U,c]),o.push(U),U}function D(M){const $=o.pop();return $.end=b(),c.events.push(["exit",$,c]),$}function I(M,$){se(M,$.from)}function N(M,$){$.restore()}function G(M,$){return U;function U(z,Q,he){let Ee,Le,Re,g;return Array.isArray(z)?J(z):"tokenize"in z?J([z]):j(z);function j(W){return ae;function ae(re){const oe=re!==null&&W[re],ie=re!==null&&W.null,Se=[...Array.isArray(oe)?oe:oe?[oe]:[],...Array.isArray(ie)?ie:ie?[ie]:[]];return J(Se)(re)}}function J(W){return Ee=W,Le=0,W.length===0?he:T(W[Le])}function T(W){return ae;function ae(re){return g=ee(),Re=W,W.partial||(c.currentConstruct=W),W.name&&c.parser.constructs.disable.null.includes(W.name)?ne():W.tokenize.call($?Object.assign(Object.create(c),$):c,u,K,ne)(re)}}function K(W){return M(Re,g),Q}function ne(W){return g.restore(),++Le<Ee.length?T(Ee[Le]):he}}}function se(M,$){M.resolveAll&&!a.includes(M)&&a.push(M),M.resolve&&Je(c.events,$,c.events.length-$,M.resolve(c.events.slice($),c)),M.resolveTo&&(c.events=M.resolveTo(c.events,c))}function ee(){const M=b(),$=c.previous,U=c.currentConstruct,z=c.events.length,Q=Array.from(o);return{restore:he,from:z};function he(){r=M,c.previous=$,c.currentConstruct=U,c.events.length=z,o=Q,k()}}function k(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function q0(e,t){const n=t.start._index,r=t.start._bufferIndex,i=t.end._index,a=t.end._bufferIndex;let s;if(n===i)s=[e[n].slice(r,a)];else{if(s=e.slice(n,i),r>-1){const o=s[0];typeof o=="string"?s[0]=o.slice(r):s.shift()}a>0&&s.push(e[i].slice(0,a))}return s}function W0(e,t){let n=-1;const r=[];let i;for(;++n<e.length;){const a=e[n];let s;if(typeof a=="string")s=a;else switch(a){case-5:{s="\r";break}case-4:{s=`
47
+ For more details see https://formatjs.io/docs/getting-started/message-distribution`)}function gh(e,t){var n=Xf(t),r=J(J({},Pu),e),i=r.locale,a=r.defaultLocale,s=r.onError;return i?!Intl.NumberFormat.supportedLocalesOf(i).length&&s?s(new Cs('Missing locale data for locale: "'.concat(i,'" in Intl.NumberFormat. Using default locale: "').concat(a,'" as fallback. See https://formatjs.io/docs/react-intl#runtime-requirements for more details'))):!Intl.DateTimeFormat.supportedLocalesOf(i).length&&s&&s(new Cs('Missing locale data for locale: "'.concat(i,'" in Intl.DateTimeFormat. Using default locale: "').concat(a,'" as fallback. See https://formatjs.io/docs/react-intl#runtime-requirements for more details'))):(s&&s(new Gf('"locale" was not configured, using "'.concat(a,'" as fallback. See https://formatjs.io/docs/react-intl/api#intlshape for more details'))),r.locale=r.defaultLocale||"en"),mh(r),J(J({},r),{formatters:n,formatNumber:fh.bind(null,r,n.getNumberFormat),formatNumberToParts:hh.bind(null,r,n.getNumberFormat),formatRelativeTime:ch.bind(null,r,n.getRelativeTimeFormat),formatDate:Qf.bind(null,r,n.getDateTimeFormat),formatDateToParts:Jf.bind(null,r,n.getDateTimeFormat),formatTime:Kf.bind(null,r,n.getDateTimeFormat),formatDateTimeRange:Zf.bind(null,r,n.getDateTimeFormat),formatTimeToParts:eh.bind(null,r,n.getDateTimeFormat),formatPlural:oh.bind(null,r,n.getPluralRules),formatMessage:Qi.bind(null,r,n),$t:Qi.bind(null,r,n),formatList:ah.bind(null,r,n.getListFormat),formatListToParts:Fu.bind(null,r,n.getListFormat),formatDisplayName:nh.bind(null,r,n.getDisplayNames)})}function Uu(e){gu(e,"[React Intl] Could not find required `intl` object. <IntlProvider> needs to exist in the component ancestry.")}var ju=J(J({},Pu),{textComponent:ze.Fragment});function bh(e){return function(t){return e(ze.Children.toArray(t))}}function Eh(e,t){if(e===t)return!0;if(!e||!t)return!1;var n=Object.keys(e),r=Object.keys(t),i=n.length;if(r.length!==i)return!1;for(var a=0;a<i;a++){var s=n[a];if(e[s]!==t[s]||!Object.prototype.hasOwnProperty.call(t,s))return!1}return!0}var wa=typeof window<"u"&&!window.__REACT_INTL_BYPASS_GLOBAL_CONTEXT__?window.__REACT_INTL_CONTEXT__||(window.__REACT_INTL_CONTEXT__=ze.createContext(null)):ze.createContext(null);wa.Consumer;var Th=wa.Provider,yh=Th,xh=wa;function an(){var e=ze.useContext(xh);return Uu(e),e}var Ki;(function(e){e.formatDate="FormattedDate",e.formatTime="FormattedTime",e.formatNumber="FormattedNumber",e.formatList="FormattedList",e.formatDisplayName="FormattedDisplayName"})(Ki||(Ki={}));var Zi;(function(e){e.formatDate="FormattedDateParts",e.formatTime="FormattedTimeParts",e.formatNumber="FormattedNumberParts",e.formatList="FormattedListParts"})(Zi||(Zi={}));function zu(e){var t=function(n){var r=an(),i=n.value,a=n.children,s=Fr(n,["value","children"]),o=typeof i=="string"?new Date(i||0):i,u=e==="formatDate"?r.formatDateToParts(o,s):r.formatTimeToParts(o,s);return a(u)};return t.displayName=Zi[e],t}function Kn(e){var t=function(n){var r=an(),i=n.value,a=n.children,s=Fr(n,["value","children"]),o=r[e](i,s);if(typeof a=="function")return a(o);var u=r.textComponent||ze.Fragment;return ze.createElement(u,null,o)};return t.displayName=Ki[e],t}function $u(e){return e&&Object.keys(e).reduce(function(t,n){var r=e[n];return t[n]=Lu(r)?bh(r):r,t},{})}var vs=function(e,t,n,r){for(var i=[],a=4;a<arguments.length;a++)i[a-4]=arguments[a];var s=$u(r),o=Qi.apply(void 0,Tt([e,t,n,s],i,!1));return Array.isArray(o)?ze.Children.toArray(o):o},ks=function(e,t){var n=e.defaultRichTextElements,r=Fr(e,["defaultRichTextElements"]),i=$u(n),a=gh(J(J(J({},ju),r),{defaultRichTextElements:i}),t),s={locale:a.locale,timeZone:a.timeZone,fallbackOnEmptyString:a.fallbackOnEmptyString,formats:a.formats,defaultLocale:a.defaultLocale,defaultFormats:a.defaultFormats,messages:a.messages,onError:a.onError,defaultRichTextElements:i};return J(J({},a),{formatMessage:vs.bind(null,s,a.formatters),$t:vs.bind(null,s,a.formatters)})};function fi(e){return{locale:e.locale,timeZone:e.timeZone,fallbackOnEmptyString:e.fallbackOnEmptyString,formats:e.formats,textComponent:e.textComponent,messages:e.messages,defaultLocale:e.defaultLocale,defaultFormats:e.defaultFormats,onError:e.onError,onWarn:e.onWarn,wrapRichTextChunksInFragment:e.wrapRichTextChunksInFragment,defaultRichTextElements:e.defaultRichTextElements}}var Sh=(function(e){dt(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.cache=Mu(),n.state={cache:n.cache,intl:ks(fi(n.props),n.cache),prevConfig:fi(n.props)},n}return t.getDerivedStateFromProps=function(n,r){var i=r.prevConfig,a=r.cache,s=fi(n);return Eh(i,s)?null:{intl:ks(s,a),prevConfig:s}},t.prototype.render=function(){return Uu(this.state.intl),ze.createElement(yh,{value:this.state.intl},this.props.children)},t.displayName="IntlProvider",t.defaultProps=ju,t})(ze.PureComponent);Kn("formatDate");Kn("formatTime");Kn("formatNumber");Kn("formatList");Kn("formatDisplayName");zu("formatDate");zu("formatTime");const Yu=()=>{const e=an(),t=e.formatMessage({defaultMessage:"Message the assistant...",id:"chatbot.placeholder.content"}),n=e.formatMessage({defaultMessage:"You",id:"chatbot.chatline.label.user"}),r=e.formatMessage({defaultMessage:"Assistant",id:"chatbot.chatline.label.assistant"}),i=e.formatMessage({defaultMessage:"Customer support",id:"chatbot.chatline.label.customerSupport"}),a=e.formatMessage({defaultMessage:"⏳ The chatbot is a little busy at the time. Please try again later.",id:"chatbot.error.api.429"}),s=e.formatMessage({defaultMessage:"Oops ! There has been an error. Please try again later.",id:"chatbot.error.api.500"}),o=e.formatMessage({defaultMessage:"Oups ! The discussion is full. Please start a new one.",id:"chatbot.error.api.409"}),u=e.formatMessage({defaultMessage:"See",id:"chatbot.infobanner.title"}),c=e.formatMessage({defaultMessage:"You have an archived discussion.",id:"chatbot.infobanner.cta"}),d=e.formatMessage({defaultMessage:"Transferring your request to customer support...",id:"chatbot.customerSupport.connecting"}),f=e.formatMessage({defaultMessage:"Your request has been sent to Customer Support. It usually takes a few minutes to get a reply. Thank you for waiting.",id:"chatbot.customerSupport.connected"}),p=e.formatMessage({defaultMessage:"Customer support is not available right now. Please try again later.",id:"chatbot.customerSupport.connectionError"}),h=e.formatMessage({defaultMessage:"Your customer support conversation is now complete. Start a new conversation whenever you need more help.",id:"chatbot.customerSupport.closed"}),b=e.formatMessage({defaultMessage:"Restart",id:"chatbot.customerSupport.restart"}),y=e.formatMessage({defaultMessage:"Leave your contact details",id:"chatbot.customerSupport.fallback.title"}),w=e.formatMessage({defaultMessage:"Customer support has not replied yet. Leave your email and phone number and we will contact you soon.",id:"chatbot.customerSupport.fallback.description"}),_=e.formatMessage({defaultMessage:"Email",id:"chatbot.customerSupport.fallback.email"}),k=e.formatMessage({defaultMessage:"Phone",id:"chatbot.customerSupport.fallback.phone"}),N=e.formatMessage({defaultMessage:"Send",id:"chatbot.customerSupport.fallback.submit"}),L=e.formatMessage({defaultMessage:"Sending...",id:"chatbot.customerSupport.fallback.submitting"}),A=e.formatMessage({defaultMessage:"Your contact details have been saved. Customer support will contact you soon.",id:"chatbot.customerSupport.fallback.success"}),v=e.formatMessage({defaultMessage:"We could not save your contact details. Please try again.",id:"chatbot.customerSupport.fallback.error"}),z=e.formatMessage({defaultMessage:"Customer support is currently closed",id:"chatbot.customerSupport.closedHours.title"}),K=e.formatMessage({defaultMessage:"Leave your email, phone number and request. Customer support will contact you during opening hours.",id:"chatbot.customerSupport.closedHours.description"}),Q=e.formatMessage({defaultMessage:"Today:",id:"chatbot.customerSupport.closedHours.schedulePrefix"}),I=e.formatMessage({defaultMessage:"Reason for your request",id:"chatbot.customerSupport.closedHours.reason"}),H=e.formatMessage({defaultMessage:"Your request has been saved. Customer support will contact you during opening hours.",id:"chatbot.customerSupport.closedHours.success"});return{placeholderTranslation:t,chatlineLabelUserTranslation:n,chatlineLabelAssistantTranslation:r,chatlineLabelCustomerSupportTranslation:i,tooManyRequestsTranslation:a,genericErrorTranslation:s,discussionFullErrorTranslation:o,infoBannerTitleTranslation:u,infoBannerExplainationTranslation:c,customerSupportConnectingTranslation:d,customerSupportConnectedTranslation:f,customerSupportConnectionErrorTranslation:p,customerSupportClosedTranslation:h,customerSupportRestartTranslation:b,customerSupportFallbackTitleTranslation:y,customerSupportFallbackDescriptionTranslation:w,customerSupportFallbackEmailTranslation:_,customerSupportFallbackPhoneTranslation:k,customerSupportFallbackSubmitTranslation:N,customerSupportFallbackSubmittingTranslation:L,customerSupportFallbackSuccessTranslation:A,customerSupportFallbackErrorTranslation:v,customerSupportClosedHoursTitleTranslation:z,customerSupportClosedHoursDescriptionTranslation:K,customerSupportClosedHoursSchedulePrefixTranslation:Q,customerSupportClosedHoursReasonTranslation:I,customerSupportClosedHoursSuccessTranslation:H}};function Ns(e){const t=[],n=String(e||"");let r=n.indexOf(","),i=0,a=!1;for(;!a;){r===-1&&(r=n.length,a=!0);const s=n.slice(i,r).trim();(s||!a)&&t.push(s),i=r+1,r=n.indexOf(",",i)}return t}function Gu(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const _h=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Ch=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Ah={};function Os(e,t){return(Ah.jsx?Ch:_h).test(e)}const wh=/[ \t\n\f\r]/g;function Ih(e){return typeof e=="object"?e.type==="text"?Rs(e.value):!1:Rs(e)}function Rs(e){return e.replace(wh,"")===""}class Zn{constructor(t,n,r){this.property=t,this.normal=n,r&&(this.space=r)}}Zn.prototype.property={};Zn.prototype.normal={};Zn.prototype.space=null;function qu(e,t){const n={},r={};let i=-1;for(;++i<e.length;)Object.assign(n,e[i].property),Object.assign(r,e[i].normal);return new Zn(n,r,t)}function Vn(e){return e.toLowerCase()}class ht{constructor(t,n){this.property=t,this.attribute=n}}ht.prototype.space=null;ht.prototype.boolean=!1;ht.prototype.booleanish=!1;ht.prototype.overloadedBoolean=!1;ht.prototype.number=!1;ht.prototype.commaSeparated=!1;ht.prototype.spaceSeparated=!1;ht.prototype.commaOrSpaceSeparated=!1;ht.prototype.mustUseProperty=!1;ht.prototype.defined=!1;let vh=0;const he=sn(),Me=sn(),Vu=sn(),U=sn(),Ne=sn(),bn=sn(),rt=sn();function sn(){return 2**++vh}const Ji=Object.freeze(Object.defineProperty({__proto__:null,boolean:he,booleanish:Me,commaOrSpaceSeparated:rt,commaSeparated:bn,number:U,overloadedBoolean:Vu,spaceSeparated:Ne},Symbol.toStringTag,{value:"Module"})),hi=Object.keys(Ji);class Ia extends ht{constructor(t,n,r,i){let a=-1;if(super(t,n),Ls(this,"space",i),typeof r=="number")for(;++a<hi.length;){const s=hi[a];Ls(this,hi[a],(r&Ji[s])===Ji[s])}}}Ia.prototype.defined=!0;function Ls(e,t,n){n&&(e[t]=n)}const kh={}.hasOwnProperty;function Cn(e){const t={},n={};let r;for(r in e.properties)if(kh.call(e.properties,r)){const i=e.properties[r],a=new Ia(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[Vn(r)]=r,n[Vn(a.attribute)]=r}return new Zn(t,n,e.space)}const Wu=Cn({space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()},properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null}}),Xu=Cn({space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()},properties:{xmlLang:null,xmlBase:null,xmlSpace:null}});function Qu(e,t){return t in e?e[t]:t}function Ku(e,t){return Qu(e,t.toLowerCase())}const Zu=Cn({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:Ku,properties:{xmlns:null,xmlnsXLink:null}}),Ju=Cn({transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()},properties:{ariaActiveDescendant:null,ariaAtomic:Me,ariaAutoComplete:null,ariaBusy:Me,ariaChecked:Me,ariaColCount:U,ariaColIndex:U,ariaColSpan:U,ariaControls:Ne,ariaCurrent:null,ariaDescribedBy:Ne,ariaDetails:null,ariaDisabled:Me,ariaDropEffect:Ne,ariaErrorMessage:null,ariaExpanded:Me,ariaFlowTo:Ne,ariaGrabbed:Me,ariaHasPopup:null,ariaHidden:Me,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Ne,ariaLevel:U,ariaLive:null,ariaModal:Me,ariaMultiLine:Me,ariaMultiSelectable:Me,ariaOrientation:null,ariaOwns:Ne,ariaPlaceholder:null,ariaPosInSet:U,ariaPressed:Me,ariaReadOnly:Me,ariaRelevant:null,ariaRequired:Me,ariaRoleDescription:Ne,ariaRowCount:U,ariaRowIndex:U,ariaRowSpan:U,ariaSelected:Me,ariaSetSize:U,ariaSort:null,ariaValueMax:U,ariaValueMin:U,ariaValueNow:U,ariaValueText:null,role:null}}),Nh=Cn({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:Ku,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:bn,acceptCharset:Ne,accessKey:Ne,action:null,allow:null,allowFullScreen:he,allowPaymentRequest:he,allowUserMedia:he,alt:null,as:null,async:he,autoCapitalize:null,autoComplete:Ne,autoFocus:he,autoPlay:he,blocking:Ne,capture:null,charSet:null,checked:he,cite:null,className:Ne,cols:U,colSpan:null,content:null,contentEditable:Me,controls:he,controlsList:Ne,coords:U|bn,crossOrigin:null,data:null,dateTime:null,decoding:null,default:he,defer:he,dir:null,dirName:null,disabled:he,download:Vu,draggable:Me,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:he,formTarget:null,headers:Ne,height:U,hidden:he,high:U,href:null,hrefLang:null,htmlFor:Ne,httpEquiv:Ne,id:null,imageSizes:null,imageSrcSet:null,inert:he,inputMode:null,integrity:null,is:null,isMap:he,itemId:null,itemProp:Ne,itemRef:Ne,itemScope:he,itemType:Ne,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:he,low:U,manifest:null,max:null,maxLength:U,media:null,method:null,min:null,minLength:U,multiple:he,muted:he,name:null,nonce:null,noModule:he,noValidate:he,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:he,optimum:U,pattern:null,ping:Ne,placeholder:null,playsInline:he,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:he,referrerPolicy:null,rel:Ne,required:he,reversed:he,rows:U,rowSpan:U,sandbox:Ne,scope:null,scoped:he,seamless:he,selected:he,shadowRootDelegatesFocus:he,shadowRootMode:null,shape:null,size:U,sizes:null,slot:null,span:U,spellCheck:Me,src:null,srcDoc:null,srcLang:null,srcSet:null,start:U,step:null,style:null,tabIndex:U,target:null,title:null,translate:null,type:null,typeMustMatch:he,useMap:null,value:Me,width:U,wrap:null,align:null,aLink:null,archive:Ne,axis:null,background:null,bgColor:null,border:U,borderColor:null,bottomMargin:U,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:he,declare:he,event:null,face:null,frame:null,frameBorder:null,hSpace:U,leftMargin:U,link:null,longDesc:null,lowSrc:null,marginHeight:U,marginWidth:U,noResize:he,noHref:he,noShade:he,noWrap:he,object:null,profile:null,prompt:null,rev:null,rightMargin:U,rules:null,scheme:null,scrolling:Me,standby:null,summary:null,text:null,topMargin:U,valueType:null,version:null,vAlign:null,vLink:null,vSpace:U,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:he,disableRemotePlayback:he,prefix:null,property:null,results:U,security:null,unselectable:null}}),Oh=Cn({space:"svg",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"},transform:Qu,properties:{about:rt,accentHeight:U,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:U,amplitude:U,arabicForm:null,ascent:U,attributeName:null,attributeType:null,azimuth:U,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:U,by:null,calcMode:null,capHeight:U,className:Ne,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:U,diffuseConstant:U,direction:null,display:null,dur:null,divisor:U,dominantBaseline:null,download:he,dx:null,dy:null,edgeMode:null,editable:null,elevation:U,enableBackground:null,end:null,event:null,exponent:U,externalResourcesRequired:null,fill:null,fillOpacity:U,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:bn,g2:bn,glyphName:bn,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:U,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:U,horizOriginX:U,horizOriginY:U,id:null,ideographic:U,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:U,k:U,k1:U,k2:U,k3:U,k4:U,kernelMatrix:rt,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:U,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:U,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:U,overlineThickness:U,paintOrder:null,panose1:null,path:null,pathLength:U,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Ne,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:U,pointsAtY:U,pointsAtZ:U,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:rt,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:rt,rev:rt,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:rt,requiredFeatures:rt,requiredFonts:rt,requiredFormats:rt,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:U,specularExponent:U,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:U,strikethroughThickness:U,string:null,stroke:null,strokeDashArray:rt,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:U,strokeOpacity:U,strokeWidth:null,style:null,surfaceScale:U,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:rt,tabIndex:U,tableValues:null,target:null,targetX:U,targetY:U,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:rt,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:U,underlineThickness:U,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:U,values:null,vAlphabetic:U,vMathematical:U,vectorEffect:null,vHanging:U,vIdeographic:U,version:null,vertAdvY:U,vertOriginX:U,vertOriginY:U,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:U,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null}}),Rh=/^data[-\w.:]+$/i,Ds=/-[a-z]/g,Lh=/[A-Z]/g;function Ur(e,t){const n=Vn(t);let r=t,i=ht;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&Rh.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(Ds,Ph);r="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!Ds.test(a)){let s=a.replace(Lh,Dh);s.charAt(0)!=="-"&&(s="-"+s),t="data"+s}}i=Ia}return new i(r,t)}function Dh(e){return"-"+e.toLowerCase()}function Ph(e){return e.charAt(1).toUpperCase()}const Mh={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"},Jn=qu([Xu,Wu,Zu,Ju,Nh],"html"),jt=qu([Xu,Wu,Zu,Ju,Oh],"svg");function Ps(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function el(e){return e.join(" ").trim()}var cn={},pi,Ms;function Bh(){if(Ms)return pi;Ms=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,a=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,s=/^[;\s]*/,o=/^\s+|\s+$/g,u=`
48
+ `,c="/",d="*",f="",p="comment",h="declaration";pi=function(y,w){if(typeof y!="string")throw new TypeError("First argument must be a string");if(!y)return[];w=w||{};var _=1,k=1;function N(P){var j=P.match(t);j&&(_+=j.length);var X=P.lastIndexOf(u);k=~X?P.length-X:k+P.length}function L(){var P={line:_,column:k};return function(j){return j.position=new A(P),K(),j}}function A(P){this.start=P,this.end={line:_,column:k},this.source=w.source}A.prototype.content=y;function v(P){var j=new Error(w.source+":"+_+":"+k+": "+P);if(j.reason=P,j.filename=w.source,j.line=_,j.column=k,j.source=y,!w.silent)throw j}function z(P){var j=P.exec(y);if(j){var X=j[0];return N(X),y=y.slice(X.length),j}}function K(){z(n)}function Q(P){var j;for(P=P||[];j=I();)j!==!1&&P.push(j);return P}function I(){var P=L();if(!(c!=y.charAt(0)||d!=y.charAt(1))){for(var j=2;f!=y.charAt(j)&&(d!=y.charAt(j)||c!=y.charAt(j+1));)++j;if(j+=2,f===y.charAt(j-1))return v("End of comment missing");var X=y.slice(2,j-2);return k+=2,N(X),y=y.slice(j),k+=2,P({type:p,comment:X})}}function H(){var P=L(),j=z(r);if(j){if(I(),!z(i))return v("property missing ':'");var X=z(a),Ee=P({type:h,property:b(j[0].replace(e,f)),value:X?b(X[0].replace(e,f)):f});return z(s),Ee}}function $(){var P=[];Q(P);for(var j;j=H();)j!==!1&&(P.push(j),Q(P));return P}return K(),$()};function b(y){return y?y.replace(o,f):f}return pi}var Bs;function Fh(){if(Bs)return cn;Bs=1;var e=cn&&cn.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(cn,"__esModule",{value:!0});var t=e(Bh());function n(r,i){var a=null;if(!r||typeof r!="string")return a;var s=(0,t.default)(r),o=typeof i=="function";return s.forEach(function(u){if(u.type==="declaration"){var c=u.property,d=u.value;o?i(c,d,u):d&&(a=a||{},a[c]=d)}}),a}return cn.default=n,cn}var Hh=Fh();const Fs=ya(Hh),Uh=Fs.default||Fs,jr=tl("end"),At=tl("start");function tl(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function jh(e){const t=At(e),n=jr(e);if(t&&n)return{start:t,end:n}}function Hn(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Hs(e.position):"start"in e||"end"in e?Hs(e):"line"in e||"column"in e?ea(e):""}function ea(e){return Us(e&&e.line)+":"+Us(e&&e.column)}function Hs(e){return ea(e&&e.start)+"-"+ea(e&&e.end)}function Us(e){return e&&typeof e=="number"?e:1}class Ge extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let i="",a={},s=!1;if(n&&("line"in n&&"column"in n?a={place:n}:"start"in n&&"end"in n?a={place:n}:"type"in n?a={ancestors:[n],place:n.position}:a={...n}),typeof t=="string"?i=t:!a.cause&&t&&(s=!0,i=t.message,a.cause=t),!a.ruleId&&!a.source&&typeof r=="string"){const u=r.indexOf(":");u===-1?a.ruleId=r:(a.source=r.slice(0,u),a.ruleId=r.slice(u+1))}if(!a.place&&a.ancestors&&a.ancestors){const u=a.ancestors[a.ancestors.length-1];u&&(a.place=u.position)}const o=a.place&&"start"in a.place?a.place.start:a.place;this.ancestors=a.ancestors||void 0,this.cause=a.cause||void 0,this.column=o?o.column:void 0,this.fatal=void 0,this.file,this.message=i,this.line=o?o.line:void 0,this.name=Hn(a.place)||"1:1",this.place=a.place||void 0,this.reason=this.message,this.ruleId=a.ruleId||void 0,this.source=a.source||void 0,this.stack=s&&a.cause&&typeof a.cause.stack=="string"?a.cause.stack:"",this.actual,this.expected,this.note,this.url}}Ge.prototype.file="";Ge.prototype.name="";Ge.prototype.reason="";Ge.prototype.message="";Ge.prototype.stack="";Ge.prototype.column=void 0;Ge.prototype.line=void 0;Ge.prototype.ancestors=void 0;Ge.prototype.cause=void 0;Ge.prototype.fatal=void 0;Ge.prototype.place=void 0;Ge.prototype.ruleId=void 0;Ge.prototype.source=void 0;const va={}.hasOwnProperty,zh=new Map,$h=/[A-Z]/g,Yh=/-([a-z])/g,Gh=new Set(["table","tbody","thead","tfoot","tr"]),qh=new Set(["td","th"]),nl="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function Vh(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=t0(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=e0(n,t.jsx,t.jsxs)}const i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?jt:Jn,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=rl(i,e,void 0);return a&&typeof a!="string"?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}function rl(e,t,n){if(t.type==="element")return Wh(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return Xh(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return Kh(e,t,n);if(t.type==="mdxjsEsm")return Qh(e,t);if(t.type==="root")return Zh(e,t,n);if(t.type==="text")return Jh(e,t)}function Wh(e,t,n){const r=e.schema;let i=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=jt,e.schema=i),e.ancestors.push(t);const a=al(e,t.tagName,!1),s=n0(e,t);let o=Na(e,t);return Gh.has(t.tagName)&&(o=o.filter(function(u){return typeof u=="string"?!Ih(u):!0})),il(e,s,a,t),ka(s,o),e.ancestors.pop(),e.schema=r,e.create(t,a,s,n)}function Xh(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}Wn(e,t.position)}function Qh(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Wn(e,t.position)}function Kh(e,t,n){const r=e.schema;let i=r;t.name==="svg"&&r.space==="html"&&(i=jt,e.schema=i),e.ancestors.push(t);const a=t.name===null?e.Fragment:al(e,t.name,!0),s=r0(e,t),o=Na(e,t);return il(e,s,a,t),ka(s,o),e.ancestors.pop(),e.schema=r,e.create(t,a,s,n)}function Zh(e,t,n){const r={};return ka(r,Na(e,t)),e.create(t,e.Fragment,r,n)}function Jh(e,t){return t.value}function il(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function ka(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function e0(e,t,n){return r;function r(i,a,s,o){const c=Array.isArray(s.children)?n:t;return o?c(a,s,o):c(a,s)}}function t0(e,t){return n;function n(r,i,a,s){const o=Array.isArray(a.children),u=At(r);return t(i,a,s,o,{columnNumber:u?u.column-1:void 0,fileName:e,lineNumber:u?u.line:void 0},void 0)}}function n0(e,t){const n={};let r,i;for(i in t.properties)if(i!=="children"&&va.call(t.properties,i)){const a=i0(e,i,t.properties[i]);if(a){const[s,o]=a;e.tableCellAlignToStyle&&s==="align"&&typeof o=="string"&&qh.has(t.tagName)?r=o:n[s]=o}}if(r){const a=n.style||(n.style={});a[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function r0(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const a=r.data.estree.body[0];a.type;const s=a.expression;s.type;const o=s.properties[0];o.type,Object.assign(n,e.evaluater.evaluateExpression(o.argument))}else Wn(e,t.position);else{const i=r.name;let a;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const o=r.value.data.estree.body[0];o.type,a=e.evaluater.evaluateExpression(o.expression)}else Wn(e,t.position);else a=r.value===null?!0:r.value;n[i]=a}return n}function Na(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:zh;for(;++r<t.children.length;){const a=t.children[r];let s;if(e.passKeys){const u=a.type==="element"?a.tagName:a.type==="mdxJsxFlowElement"||a.type==="mdxJsxTextElement"?a.name:void 0;if(u){const c=i.get(u)||0;s=u+"-"+c,i.set(u,c+1)}}const o=rl(e,a,s);o!==void 0&&n.push(o)}return n}function i0(e,t,n){const r=Ur(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?Gu(n):el(n)),r.property==="style"){let i=typeof n=="object"?n:a0(e,String(n));return e.stylePropertyNameCase==="css"&&(i=s0(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&r.space?Mh[r.property]||r.property:r.attribute,n]}}function a0(e,t){const n={};try{Uh(t,r)}catch(i){if(!e.ignoreInvalidStyle){const a=i,s=new Ge("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:a,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw s.file=e.filePath||void 0,s.url=nl+"#cannot-parse-style-attribute",s}}return n;function r(i,a){let s=i;s.slice(0,2)!=="--"&&(s.slice(0,4)==="-ms-"&&(s="ms-"+s.slice(4)),s=s.replace(Yh,u0)),n[s]=a}}function al(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const i=t.split(".");let a=-1,s;for(;++a<i.length;){const o=Os(i[a])?{type:"Identifier",name:i[a]}:{type:"Literal",value:i[a]};s=s?{type:"MemberExpression",object:s,property:o,computed:!!(a&&o.type==="Literal"),optional:!1}:o}r=s}else r=Os(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const i=r.value;return va.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);Wn(e)}function Wn(e,t){const n=new Ge("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=nl+"#cannot-handle-mdx-estrees-without-createevaluater",n}function s0(e){const t={};let n;for(n in e)va.call(e,n)&&(t[o0(n)]=e[n]);return t}function o0(e){let t=e.replace($h,l0);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function u0(e,t){return t.toUpperCase()}function l0(e){return"-"+e.toLowerCase()}const mi={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"]},c0={};function Oa(e,t){const n=c0,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return sl(e,r,i)}function sl(e,t,n){if(d0(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return js(e.children,t,n)}return Array.isArray(e)?js(e,t,n):""}function js(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=sl(e[i],t,n);return r.join("")}function d0(e){return!!(e&&typeof e=="object")}const zs=document.createElement("i");function Ra(e){const t="&"+e+";";zs.innerHTML=t;const n=zs.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function it(e,t,n,r){const i=e.length;let a=0,s;if(t<0?t=-t>i?0:i+t:t=t>i?i:t,n=n>0?n:0,r.length<1e4)s=Array.from(r),s.unshift(t,n),e.splice(...s);else for(n&&e.splice(t,n);a<r.length;)s=r.slice(a,a+1e4),s.unshift(t,0),e.splice(...s),a+=1e4,t+=1e4}function ot(e,t){return e.length>0?(it(e,e.length,0,t),e):t}const $s={}.hasOwnProperty;function ol(e){const t={};let n=-1;for(;++n<e.length;)f0(t,e[n]);return t}function f0(e,t){let n;for(n in t){const i=($s.call(e,n)?e[n]:void 0)||(e[n]={}),a=t[n];let s;if(a)for(s in a){$s.call(i,s)||(i[s]=[]);const o=a[s];h0(i[s],Array.isArray(o)?o:o?[o]:[])}}}function h0(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);it(e,0,0,r)}function ul(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function pt(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Ke=zt(/[A-Za-z]/),Ye=zt(/[\dA-Za-z]/),p0=zt(/[#-'*+\--9=?A-Z^-~]/);function _r(e){return e!==null&&(e<32||e===127)}const ta=zt(/\d/),m0=zt(/[\dA-Fa-f]/),g0=zt(/[!-/:-@[-`{-~]/);function ae(e){return e!==null&&e<-2}function ve(e){return e!==null&&(e<0||e===32)}function be(e){return e===-2||e===-1||e===32}const zr=zt(new RegExp("\\p{P}|\\p{S}","u")),en=zt(/\s/);function zt(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function An(e){const t=[];let n=-1,r=0,i=0;for(;++n<e.length;){const a=e.charCodeAt(n);let s="";if(a===37&&Ye(e.charCodeAt(n+1))&&Ye(e.charCodeAt(n+2)))i=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(s=String.fromCharCode(a));else if(a>55295&&a<57344){const o=e.charCodeAt(n+1);a<56320&&o>56319&&o<57344?(s=String.fromCharCode(a,o),i=1):s="�"}else s=String.fromCharCode(a);s&&(t.push(e.slice(r,n),encodeURIComponent(s)),r=n+i+1,s=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}function Se(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let a=0;return s;function s(u){return be(u)?(e.enter(n),o(u)):t(u)}function o(u){return be(u)&&a++<i?(e.consume(u),o):(e.exit(n),t(u))}}const b0={tokenize:E0};function E0(e){const t=e.attempt(this.parser.constructs.contentInitial,r,i);let n;return t;function r(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),Se(e,t,"linePrefix")}function i(o){return e.enter("paragraph"),a(o)}function a(o){const u=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=u),n=u,s(o)}function s(o){if(o===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(o);return}return ae(o)?(e.consume(o),e.exit("chunkText"),a):(e.consume(o),s)}}const T0={tokenize:y0},Ys={tokenize:x0};function y0(e){const t=this,n=[];let r=0,i,a,s;return o;function o(N){if(r<n.length){const L=n[r];return t.containerState=L[1],e.attempt(L[0].continuation,u,c)(N)}return c(N)}function u(N){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&k();const L=t.events.length;let A=L,v;for(;A--;)if(t.events[A][0]==="exit"&&t.events[A][1].type==="chunkFlow"){v=t.events[A][1].end;break}_(r);let z=L;for(;z<t.events.length;)t.events[z][1].end=Object.assign({},v),z++;return it(t.events,A+1,0,t.events.slice(L)),t.events.length=z,c(N)}return o(N)}function c(N){if(r===n.length){if(!i)return p(N);if(i.currentConstruct&&i.currentConstruct.concrete)return b(N);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(Ys,d,f)(N)}function d(N){return i&&k(),_(r),p(N)}function f(N){return t.parser.lazy[t.now().line]=r!==n.length,s=t.now().offset,b(N)}function p(N){return t.containerState={},e.attempt(Ys,h,b)(N)}function h(N){return r++,n.push([t.currentConstruct,t.containerState]),p(N)}function b(N){if(N===null){i&&k(),_(0),e.consume(N);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{contentType:"flow",previous:a,_tokenizer:i}),y(N)}function y(N){if(N===null){w(e.exit("chunkFlow"),!0),_(0),e.consume(N);return}return ae(N)?(e.consume(N),w(e.exit("chunkFlow")),r=0,t.interrupt=void 0,o):(e.consume(N),y)}function w(N,L){const A=t.sliceStream(N);if(L&&A.push(null),N.previous=a,a&&(a.next=N),a=N,i.defineSkip(N.start),i.write(A),t.parser.lazy[N.start.line]){let v=i.events.length;for(;v--;)if(i.events[v][1].start.offset<s&&(!i.events[v][1].end||i.events[v][1].end.offset>s))return;const z=t.events.length;let K=z,Q,I;for(;K--;)if(t.events[K][0]==="exit"&&t.events[K][1].type==="chunkFlow"){if(Q){I=t.events[K][1].end;break}Q=!0}for(_(r),v=z;v<t.events.length;)t.events[v][1].end=Object.assign({},I),v++;it(t.events,K+1,0,t.events.slice(z)),t.events.length=v}}function _(N){let L=n.length;for(;L-- >N;){const A=n[L];t.containerState=A[1],A[0].exit.call(t,e)}n.length=N}function k(){i.write([null]),a=void 0,i=void 0,t.containerState._closeFlow=void 0}}function x0(e,t,n){return Se(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Cr(e){if(e===null||ve(e)||en(e))return 1;if(zr(e))return 2}function $r(e,t,n){const r=[];let i=-1;for(;++i<e.length;){const a=e[i].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}const na={name:"attention",tokenize:_0,resolveAll:S0};function S0(e,t){let n=-1,r,i,a,s,o,u,c,d;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;u=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const f=Object.assign({},e[r][1].end),p=Object.assign({},e[n][1].start);Gs(f,-u),Gs(p,u),s={type:u>1?"strongSequence":"emphasisSequence",start:f,end:Object.assign({},e[r][1].end)},o={type:u>1?"strongSequence":"emphasisSequence",start:Object.assign({},e[n][1].start),end:p},a={type:u>1?"strongText":"emphasisText",start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},i={type:u>1?"strong":"emphasis",start:Object.assign({},s.start),end:Object.assign({},o.end)},e[r][1].end=Object.assign({},s.start),e[n][1].start=Object.assign({},o.end),c=[],e[r][1].end.offset-e[r][1].start.offset&&(c=ot(c,[["enter",e[r][1],t],["exit",e[r][1],t]])),c=ot(c,[["enter",i,t],["enter",s,t],["exit",s,t],["enter",a,t]]),c=ot(c,$r(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),c=ot(c,[["exit",a,t],["enter",o,t],["exit",o,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(d=2,c=ot(c,[["enter",e[n][1],t],["exit",e[n][1],t]])):d=0,it(e,r-1,n-r+3,c),n=r+c.length-d-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function _0(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=Cr(r);let a;return s;function s(u){return a=u,e.enter("attentionSequence"),o(u)}function o(u){if(u===a)return e.consume(u),o;const c=e.exit("attentionSequence"),d=Cr(u),f=!d||d===2&&i||n.includes(u),p=!i||i===2&&d||n.includes(r);return c._open=!!(a===42?f:f&&(i||!p)),c._close=!!(a===42?p:p&&(d||!f)),t(u)}}function Gs(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const C0={name:"autolink",tokenize:A0};function A0(e,t,n){let r=0;return i;function i(h){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(h),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),a}function a(h){return Ke(h)?(e.consume(h),s):c(h)}function s(h){return h===43||h===45||h===46||Ye(h)?(r=1,o(h)):c(h)}function o(h){return h===58?(e.consume(h),r=0,u):(h===43||h===45||h===46||Ye(h))&&r++<32?(e.consume(h),o):(r=0,c(h))}function u(h){return h===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(h),e.exit("autolinkMarker"),e.exit("autolink"),t):h===null||h===32||h===60||_r(h)?n(h):(e.consume(h),u)}function c(h){return h===64?(e.consume(h),d):p0(h)?(e.consume(h),c):n(h)}function d(h){return Ye(h)?f(h):n(h)}function f(h){return h===46?(e.consume(h),r=0,d):h===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(h),e.exit("autolinkMarker"),e.exit("autolink"),t):p(h)}function p(h){if((h===45||Ye(h))&&r++<63){const b=h===45?p:f;return e.consume(h),b}return n(h)}}const er={tokenize:w0,partial:!0};function w0(e,t,n){return r;function r(a){return be(a)?Se(e,i,"linePrefix")(a):i(a)}function i(a){return a===null||ae(a)?t(a):n(a)}}const ll={name:"blockQuote",tokenize:I0,continuation:{tokenize:v0},exit:k0};function I0(e,t,n){const r=this;return i;function i(s){if(s===62){const o=r.containerState;return o.open||(e.enter("blockQuote",{_container:!0}),o.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(s),e.exit("blockQuoteMarker"),a}return n(s)}function a(s){return be(s)?(e.enter("blockQuotePrefixWhitespace"),e.consume(s),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(s))}}function v0(e,t,n){const r=this;return i;function i(s){return be(s)?Se(e,a,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s):a(s)}function a(s){return e.attempt(ll,t,n)(s)}}function k0(e){e.exit("blockQuote")}const cl={name:"characterEscape",tokenize:N0};function N0(e,t,n){return r;function r(a){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(a),e.exit("escapeMarker"),i}function i(a){return g0(a)?(e.enter("characterEscapeValue"),e.consume(a),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(a)}}const dl={name:"characterReference",tokenize:O0};function O0(e,t,n){const r=this;let i=0,a,s;return o;function o(f){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(f),e.exit("characterReferenceMarker"),u}function u(f){return f===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(f),e.exit("characterReferenceMarkerNumeric"),c):(e.enter("characterReferenceValue"),a=31,s=Ye,d(f))}function c(f){return f===88||f===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(f),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),a=6,s=m0,d):(e.enter("characterReferenceValue"),a=7,s=ta,d(f))}function d(f){if(f===59&&i){const p=e.exit("characterReferenceValue");return s===Ye&&!Ra(r.sliceSerialize(p))?n(f):(e.enter("characterReferenceMarker"),e.consume(f),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return s(f)&&i++<a?(e.consume(f),d):n(f)}}const qs={tokenize:L0,partial:!0},Vs={name:"codeFenced",tokenize:R0,concrete:!0};function R0(e,t,n){const r=this,i={tokenize:A,partial:!0};let a=0,s=0,o;return u;function u(v){return c(v)}function c(v){const z=r.events[r.events.length-1];return a=z&&z[1].type==="linePrefix"?z[2].sliceSerialize(z[1],!0).length:0,o=v,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),d(v)}function d(v){return v===o?(s++,e.consume(v),d):s<3?n(v):(e.exit("codeFencedFenceSequence"),be(v)?Se(e,f,"whitespace")(v):f(v))}function f(v){return v===null||ae(v)?(e.exit("codeFencedFence"),r.interrupt?t(v):e.check(qs,y,L)(v)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),p(v))}function p(v){return v===null||ae(v)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),f(v)):be(v)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Se(e,h,"whitespace")(v)):v===96&&v===o?n(v):(e.consume(v),p)}function h(v){return v===null||ae(v)?f(v):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),b(v))}function b(v){return v===null||ae(v)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),f(v)):v===96&&v===o?n(v):(e.consume(v),b)}function y(v){return e.attempt(i,L,w)(v)}function w(v){return e.enter("lineEnding"),e.consume(v),e.exit("lineEnding"),_}function _(v){return a>0&&be(v)?Se(e,k,"linePrefix",a+1)(v):k(v)}function k(v){return v===null||ae(v)?e.check(qs,y,L)(v):(e.enter("codeFlowValue"),N(v))}function N(v){return v===null||ae(v)?(e.exit("codeFlowValue"),k(v)):(e.consume(v),N)}function L(v){return e.exit("codeFenced"),t(v)}function A(v,z,K){let Q=0;return I;function I(X){return v.enter("lineEnding"),v.consume(X),v.exit("lineEnding"),H}function H(X){return v.enter("codeFencedFence"),be(X)?Se(v,$,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(X):$(X)}function $(X){return X===o?(v.enter("codeFencedFenceSequence"),P(X)):K(X)}function P(X){return X===o?(Q++,v.consume(X),P):Q>=s?(v.exit("codeFencedFenceSequence"),be(X)?Se(v,j,"whitespace")(X):j(X)):K(X)}function j(X){return X===null||ae(X)?(v.exit("codeFencedFence"),z(X)):K(X)}}}function L0(e,t,n){const r=this;return i;function i(s){return s===null?n(s):(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),a)}function a(s){return r.parser.lazy[r.now().line]?n(s):t(s)}}const gi={name:"codeIndented",tokenize:P0},D0={tokenize:M0,partial:!0};function P0(e,t,n){const r=this;return i;function i(c){return e.enter("codeIndented"),Se(e,a,"linePrefix",5)(c)}function a(c){const d=r.events[r.events.length-1];return d&&d[1].type==="linePrefix"&&d[2].sliceSerialize(d[1],!0).length>=4?s(c):n(c)}function s(c){return c===null?u(c):ae(c)?e.attempt(D0,s,u)(c):(e.enter("codeFlowValue"),o(c))}function o(c){return c===null||ae(c)?(e.exit("codeFlowValue"),s(c)):(e.consume(c),o)}function u(c){return e.exit("codeIndented"),t(c)}}function M0(e,t,n){const r=this;return i;function i(s){return r.parser.lazy[r.now().line]?n(s):ae(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),i):Se(e,a,"linePrefix",5)(s)}function a(s){const o=r.events[r.events.length-1];return o&&o[1].type==="linePrefix"&&o[2].sliceSerialize(o[1],!0).length>=4?t(s):ae(s)?i(s):n(s)}}const B0={name:"codeText",tokenize:U0,resolve:F0,previous:H0};function F0(e){let t=e.length-4,n=3,r,i;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(i=r):(r===t||e[r][1].type==="lineEnding")&&(e[i][1].type="codeTextData",r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function H0(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function U0(e,t,n){let r=0,i,a;return s;function s(f){return e.enter("codeText"),e.enter("codeTextSequence"),o(f)}function o(f){return f===96?(e.consume(f),r++,o):(e.exit("codeTextSequence"),u(f))}function u(f){return f===null?n(f):f===32?(e.enter("space"),e.consume(f),e.exit("space"),u):f===96?(a=e.enter("codeTextSequence"),i=0,d(f)):ae(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),u):(e.enter("codeTextData"),c(f))}function c(f){return f===null||f===32||f===96||ae(f)?(e.exit("codeTextData"),u(f)):(e.consume(f),c)}function d(f){return f===96?(e.consume(f),i++,d):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(f)):(a.type="codeTextData",c(f))}}function fl(e){const t={};let n=-1,r,i,a,s,o,u,c;for(;++n<e.length;){for(;n in t;)n=t[n];if(r=e[n],n&&r[1].type==="chunkFlow"&&e[n-1][1].type==="listItemPrefix"&&(u=r[1]._tokenizer.events,a=0,a<u.length&&u[a][1].type==="lineEndingBlank"&&(a+=2),a<u.length&&u[a][1].type==="content"))for(;++a<u.length&&u[a][1].type!=="content";)u[a][1].type==="chunkText"&&(u[a][1]._isInFirstContentOfListItem=!0,a++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,j0(e,n)),n=t[n],c=!0);else if(r[1]._container){for(a=n,i=void 0;a--&&(s=e[a],s[1].type==="lineEnding"||s[1].type==="lineEndingBlank");)s[0]==="enter"&&(i&&(e[i][1].type="lineEndingBlank"),s[1].type="lineEnding",i=a);i&&(r[1].end=Object.assign({},e[i][1].start),o=e.slice(i,n),o.unshift(r),it(e,i,n-i+1,o))}}return!c}function j0(e,t){const n=e[t][1],r=e[t][2];let i=t-1;const a=[],s=n._tokenizer||r.parser[n.contentType](n.start),o=s.events,u=[],c={};let d,f,p=-1,h=n,b=0,y=0;const w=[y];for(;h;){for(;e[++i][1]!==h;);a.push(i),h._tokenizer||(d=r.sliceStream(h),h.next||d.push(null),f&&s.defineSkip(h.start),h._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=!0),s.write(d),h._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=void 0)),f=h,h=h.next}for(h=n;++p<o.length;)o[p][0]==="exit"&&o[p-1][0]==="enter"&&o[p][1].type===o[p-1][1].type&&o[p][1].start.line!==o[p][1].end.line&&(y=p+1,w.push(y),h._tokenizer=void 0,h.previous=void 0,h=h.next);for(s.events=[],h?(h._tokenizer=void 0,h.previous=void 0):w.pop(),p=w.length;p--;){const _=o.slice(w[p],w[p+1]),k=a.pop();u.unshift([k,k+_.length-1]),it(e,k,2,_)}for(p=-1;++p<u.length;)c[b+u[p][0]]=b+u[p][1],b+=u[p][1]-u[p][0]-1;return c}const z0={tokenize:G0,resolve:Y0},$0={tokenize:q0,partial:!0};function Y0(e){return fl(e),e}function G0(e,t){let n;return r;function r(o){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),i(o)}function i(o){return o===null?a(o):ae(o)?e.check($0,s,a)(o):(e.consume(o),i)}function a(o){return e.exit("chunkContent"),e.exit("content"),t(o)}function s(o){return e.consume(o),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function q0(e,t,n){const r=this;return i;function i(s){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),Se(e,a,"linePrefix")}function a(s){if(s===null||ae(s))return n(s);const o=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&o&&o[1].type==="linePrefix"&&o[2].sliceSerialize(o[1],!0).length>=4?t(s):e.interrupt(r.parser.constructs.flow,n,t)(s)}}function hl(e,t,n,r,i,a,s,o,u){const c=u||Number.POSITIVE_INFINITY;let d=0;return f;function f(_){return _===60?(e.enter(r),e.enter(i),e.enter(a),e.consume(_),e.exit(a),p):_===null||_===32||_===41||_r(_)?n(_):(e.enter(r),e.enter(s),e.enter(o),e.enter("chunkString",{contentType:"string"}),y(_))}function p(_){return _===62?(e.enter(a),e.consume(_),e.exit(a),e.exit(i),e.exit(r),t):(e.enter(o),e.enter("chunkString",{contentType:"string"}),h(_))}function h(_){return _===62?(e.exit("chunkString"),e.exit(o),p(_)):_===null||_===60||ae(_)?n(_):(e.consume(_),_===92?b:h)}function b(_){return _===60||_===62||_===92?(e.consume(_),h):h(_)}function y(_){return!d&&(_===null||_===41||ve(_))?(e.exit("chunkString"),e.exit(o),e.exit(s),e.exit(r),t(_)):d<c&&_===40?(e.consume(_),d++,y):_===41?(e.consume(_),d--,y):_===null||_===32||_===40||_r(_)?n(_):(e.consume(_),_===92?w:y)}function w(_){return _===40||_===41||_===92?(e.consume(_),y):y(_)}}function pl(e,t,n,r,i,a){const s=this;let o=0,u;return c;function c(h){return e.enter(r),e.enter(i),e.consume(h),e.exit(i),e.enter(a),d}function d(h){return o>999||h===null||h===91||h===93&&!u||h===94&&!o&&"_hiddenFootnoteSupport"in s.parser.constructs?n(h):h===93?(e.exit(a),e.enter(i),e.consume(h),e.exit(i),e.exit(r),t):ae(h)?(e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),d):(e.enter("chunkString",{contentType:"string"}),f(h))}function f(h){return h===null||h===91||h===93||ae(h)||o++>999?(e.exit("chunkString"),d(h)):(e.consume(h),u||(u=!be(h)),h===92?p:f)}function p(h){return h===91||h===92||h===93?(e.consume(h),o++,f):f(h)}}function ml(e,t,n,r,i,a){let s;return o;function o(p){return p===34||p===39||p===40?(e.enter(r),e.enter(i),e.consume(p),e.exit(i),s=p===40?41:p,u):n(p)}function u(p){return p===s?(e.enter(i),e.consume(p),e.exit(i),e.exit(r),t):(e.enter(a),c(p))}function c(p){return p===s?(e.exit(a),u(s)):p===null?n(p):ae(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),Se(e,c,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),d(p))}function d(p){return p===s||p===null||ae(p)?(e.exit("chunkString"),c(p)):(e.consume(p),p===92?f:d)}function f(p){return p===s||p===92?(e.consume(p),d):d(p)}}function Un(e,t){let n;return r;function r(i){return ae(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):be(i)?Se(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}const V0={name:"definition",tokenize:X0},W0={tokenize:Q0,partial:!0};function X0(e,t,n){const r=this;let i;return a;function a(h){return e.enter("definition"),s(h)}function s(h){return pl.call(r,e,o,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(h)}function o(h){return i=pt(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),h===58?(e.enter("definitionMarker"),e.consume(h),e.exit("definitionMarker"),u):n(h)}function u(h){return ve(h)?Un(e,c)(h):c(h)}function c(h){return hl(e,d,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(h)}function d(h){return e.attempt(W0,f,f)(h)}function f(h){return be(h)?Se(e,p,"whitespace")(h):p(h)}function p(h){return h===null||ae(h)?(e.exit("definition"),r.parser.defined.push(i),t(h)):n(h)}}function Q0(e,t,n){return r;function r(o){return ve(o)?Un(e,i)(o):n(o)}function i(o){return ml(e,a,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(o)}function a(o){return be(o)?Se(e,s,"whitespace")(o):s(o)}function s(o){return o===null||ae(o)?t(o):n(o)}}const K0={name:"hardBreakEscape",tokenize:Z0};function Z0(e,t,n){return r;function r(a){return e.enter("hardBreakEscape"),e.consume(a),i}function i(a){return ae(a)?(e.exit("hardBreakEscape"),t(a)):n(a)}}const J0={name:"headingAtx",tokenize:tp,resolve:ep};function ep(e,t){let n=e.length-2,r=3,i,a;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(i={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},a={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},it(e,r,n-r+1,[["enter",i,t],["enter",a,t],["exit",a,t],["exit",i,t]])),e}function tp(e,t,n){let r=0;return i;function i(d){return e.enter("atxHeading"),a(d)}function a(d){return e.enter("atxHeadingSequence"),s(d)}function s(d){return d===35&&r++<6?(e.consume(d),s):d===null||ve(d)?(e.exit("atxHeadingSequence"),o(d)):n(d)}function o(d){return d===35?(e.enter("atxHeadingSequence"),u(d)):d===null||ae(d)?(e.exit("atxHeading"),t(d)):be(d)?Se(e,o,"whitespace")(d):(e.enter("atxHeadingText"),c(d))}function u(d){return d===35?(e.consume(d),u):(e.exit("atxHeadingSequence"),o(d))}function c(d){return d===null||d===35||ve(d)?(e.exit("atxHeadingText"),o(d)):(e.consume(d),c)}}const np=["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"],Ws=["pre","script","style","textarea"],rp={name:"htmlFlow",tokenize:op,resolveTo:sp,concrete:!0},ip={tokenize:lp,partial:!0},ap={tokenize:up,partial:!0};function sp(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function op(e,t,n){const r=this;let i,a,s,o,u;return c;function c(T){return d(T)}function d(T){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(T),f}function f(T){return T===33?(e.consume(T),p):T===47?(e.consume(T),a=!0,y):T===63?(e.consume(T),i=3,r.interrupt?t:m):Ke(T)?(e.consume(T),s=String.fromCharCode(T),w):n(T)}function p(T){return T===45?(e.consume(T),i=2,h):T===91?(e.consume(T),i=5,o=0,b):Ke(T)?(e.consume(T),i=4,r.interrupt?t:m):n(T)}function h(T){return T===45?(e.consume(T),r.interrupt?t:m):n(T)}function b(T){const W="CDATA[";return T===W.charCodeAt(o++)?(e.consume(T),o===W.length?r.interrupt?t:$:b):n(T)}function y(T){return Ke(T)?(e.consume(T),s=String.fromCharCode(T),w):n(T)}function w(T){if(T===null||T===47||T===62||ve(T)){const W=T===47,ne=s.toLowerCase();return!W&&!a&&Ws.includes(ne)?(i=1,r.interrupt?t(T):$(T)):np.includes(s.toLowerCase())?(i=6,W?(e.consume(T),_):r.interrupt?t(T):$(T)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(T):a?k(T):N(T))}return T===45||Ye(T)?(e.consume(T),s+=String.fromCharCode(T),w):n(T)}function _(T){return T===62?(e.consume(T),r.interrupt?t:$):n(T)}function k(T){return be(T)?(e.consume(T),k):I(T)}function N(T){return T===47?(e.consume(T),I):T===58||T===95||Ke(T)?(e.consume(T),L):be(T)?(e.consume(T),N):I(T)}function L(T){return T===45||T===46||T===58||T===95||Ye(T)?(e.consume(T),L):A(T)}function A(T){return T===61?(e.consume(T),v):be(T)?(e.consume(T),A):N(T)}function v(T){return T===null||T===60||T===61||T===62||T===96?n(T):T===34||T===39?(e.consume(T),u=T,z):be(T)?(e.consume(T),v):K(T)}function z(T){return T===u?(e.consume(T),u=null,Q):T===null||ae(T)?n(T):(e.consume(T),z)}function K(T){return T===null||T===34||T===39||T===47||T===60||T===61||T===62||T===96||ve(T)?A(T):(e.consume(T),K)}function Q(T){return T===47||T===62||be(T)?N(T):n(T)}function I(T){return T===62?(e.consume(T),H):n(T)}function H(T){return T===null||ae(T)?$(T):be(T)?(e.consume(T),H):n(T)}function $(T){return T===45&&i===2?(e.consume(T),Ee):T===60&&i===1?(e.consume(T),pe):T===62&&i===4?(e.consume(T),Y):T===63&&i===3?(e.consume(T),m):T===93&&i===5?(e.consume(T),ke):ae(T)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(ip,ee,P)(T)):T===null||ae(T)?(e.exit("htmlFlowData"),P(T)):(e.consume(T),$)}function P(T){return e.check(ap,j,ee)(T)}function j(T){return e.enter("lineEnding"),e.consume(T),e.exit("lineEnding"),X}function X(T){return T===null||ae(T)?P(T):(e.enter("htmlFlowData"),$(T))}function Ee(T){return T===45?(e.consume(T),m):$(T)}function pe(T){return T===47?(e.consume(T),s="",Oe):$(T)}function Oe(T){if(T===62){const W=s.toLowerCase();return Ws.includes(W)?(e.consume(T),Y):$(T)}return Ke(T)&&s.length<8?(e.consume(T),s+=String.fromCharCode(T),Oe):$(T)}function ke(T){return T===93?(e.consume(T),m):$(T)}function m(T){return T===62?(e.consume(T),Y):T===45&&i===2?(e.consume(T),m):$(T)}function Y(T){return T===null||ae(T)?(e.exit("htmlFlowData"),ee(T)):(e.consume(T),Y)}function ee(T){return e.exit("htmlFlow"),t(T)}}function up(e,t,n){const r=this;return i;function i(s){return ae(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),a):n(s)}function a(s){return r.parser.lazy[r.now().line]?n(s):t(s)}}function lp(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(er,t,n)}}const cp={name:"htmlText",tokenize:dp};function dp(e,t,n){const r=this;let i,a,s;return o;function o(m){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(m),u}function u(m){return m===33?(e.consume(m),c):m===47?(e.consume(m),A):m===63?(e.consume(m),N):Ke(m)?(e.consume(m),K):n(m)}function c(m){return m===45?(e.consume(m),d):m===91?(e.consume(m),a=0,b):Ke(m)?(e.consume(m),k):n(m)}function d(m){return m===45?(e.consume(m),h):n(m)}function f(m){return m===null?n(m):m===45?(e.consume(m),p):ae(m)?(s=f,pe(m)):(e.consume(m),f)}function p(m){return m===45?(e.consume(m),h):f(m)}function h(m){return m===62?Ee(m):m===45?p(m):f(m)}function b(m){const Y="CDATA[";return m===Y.charCodeAt(a++)?(e.consume(m),a===Y.length?y:b):n(m)}function y(m){return m===null?n(m):m===93?(e.consume(m),w):ae(m)?(s=y,pe(m)):(e.consume(m),y)}function w(m){return m===93?(e.consume(m),_):y(m)}function _(m){return m===62?Ee(m):m===93?(e.consume(m),_):y(m)}function k(m){return m===null||m===62?Ee(m):ae(m)?(s=k,pe(m)):(e.consume(m),k)}function N(m){return m===null?n(m):m===63?(e.consume(m),L):ae(m)?(s=N,pe(m)):(e.consume(m),N)}function L(m){return m===62?Ee(m):N(m)}function A(m){return Ke(m)?(e.consume(m),v):n(m)}function v(m){return m===45||Ye(m)?(e.consume(m),v):z(m)}function z(m){return ae(m)?(s=z,pe(m)):be(m)?(e.consume(m),z):Ee(m)}function K(m){return m===45||Ye(m)?(e.consume(m),K):m===47||m===62||ve(m)?Q(m):n(m)}function Q(m){return m===47?(e.consume(m),Ee):m===58||m===95||Ke(m)?(e.consume(m),I):ae(m)?(s=Q,pe(m)):be(m)?(e.consume(m),Q):Ee(m)}function I(m){return m===45||m===46||m===58||m===95||Ye(m)?(e.consume(m),I):H(m)}function H(m){return m===61?(e.consume(m),$):ae(m)?(s=H,pe(m)):be(m)?(e.consume(m),H):Q(m)}function $(m){return m===null||m===60||m===61||m===62||m===96?n(m):m===34||m===39?(e.consume(m),i=m,P):ae(m)?(s=$,pe(m)):be(m)?(e.consume(m),$):(e.consume(m),j)}function P(m){return m===i?(e.consume(m),i=void 0,X):m===null?n(m):ae(m)?(s=P,pe(m)):(e.consume(m),P)}function j(m){return m===null||m===34||m===39||m===60||m===61||m===96?n(m):m===47||m===62||ve(m)?Q(m):(e.consume(m),j)}function X(m){return m===47||m===62||ve(m)?Q(m):n(m)}function Ee(m){return m===62?(e.consume(m),e.exit("htmlTextData"),e.exit("htmlText"),t):n(m)}function pe(m){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),Oe}function Oe(m){return be(m)?Se(e,ke,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(m):ke(m)}function ke(m){return e.enter("htmlTextData"),s(m)}}const La={name:"labelEnd",tokenize:bp,resolveTo:gp,resolveAll:mp},fp={tokenize:Ep},hp={tokenize:Tp},pp={tokenize:yp};function mp(e){let t=-1;for(;++t<e.length;){const n=e[t][1];(n.type==="labelImage"||n.type==="labelLink"||n.type==="labelEnd")&&(e.splice(t+1,n.type==="labelImage"?4:2),n.type="data",t++)}return e}function gp(e,t){let n=e.length,r=0,i,a,s,o;for(;n--;)if(i=e[n][1],a){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[n][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(s){if(e[n][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(a=n,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(s=n);const u={type:e[a][1].type==="labelLink"?"link":"image",start:Object.assign({},e[a][1].start),end:Object.assign({},e[e.length-1][1].end)},c={type:"label",start:Object.assign({},e[a][1].start),end:Object.assign({},e[s][1].end)},d={type:"labelText",start:Object.assign({},e[a+r+2][1].end),end:Object.assign({},e[s-2][1].start)};return o=[["enter",u,t],["enter",c,t]],o=ot(o,e.slice(a+1,a+r+3)),o=ot(o,[["enter",d,t]]),o=ot(o,$r(t.parser.constructs.insideSpan.null,e.slice(a+r+4,s-3),t)),o=ot(o,[["exit",d,t],e[s-2],e[s-1],["exit",c,t]]),o=ot(o,e.slice(s+1)),o=ot(o,[["exit",u,t]]),it(e,a,e.length,o),e}function bp(e,t,n){const r=this;let i=r.events.length,a,s;for(;i--;)if((r.events[i][1].type==="labelImage"||r.events[i][1].type==="labelLink")&&!r.events[i][1]._balanced){a=r.events[i][1];break}return o;function o(p){return a?a._inactive?f(p):(s=r.parser.defined.includes(pt(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(p),e.exit("labelMarker"),e.exit("labelEnd"),u):n(p)}function u(p){return p===40?e.attempt(fp,d,s?d:f)(p):p===91?e.attempt(hp,d,s?c:f)(p):s?d(p):f(p)}function c(p){return e.attempt(pp,d,f)(p)}function d(p){return t(p)}function f(p){return a._balanced=!0,n(p)}}function Ep(e,t,n){return r;function r(f){return e.enter("resource"),e.enter("resourceMarker"),e.consume(f),e.exit("resourceMarker"),i}function i(f){return ve(f)?Un(e,a)(f):a(f)}function a(f){return f===41?d(f):hl(e,s,o,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(f)}function s(f){return ve(f)?Un(e,u)(f):d(f)}function o(f){return n(f)}function u(f){return f===34||f===39||f===40?ml(e,c,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(f):d(f)}function c(f){return ve(f)?Un(e,d)(f):d(f)}function d(f){return f===41?(e.enter("resourceMarker"),e.consume(f),e.exit("resourceMarker"),e.exit("resource"),t):n(f)}}function Tp(e,t,n){const r=this;return i;function i(o){return pl.call(r,e,a,s,"reference","referenceMarker","referenceString")(o)}function a(o){return r.parser.defined.includes(pt(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(o):n(o)}function s(o){return n(o)}}function yp(e,t,n){return r;function r(a){return e.enter("reference"),e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),i}function i(a){return a===93?(e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),e.exit("reference"),t):n(a)}}const xp={name:"labelStartImage",tokenize:Sp,resolveAll:La.resolveAll};function Sp(e,t,n){const r=this;return i;function i(o){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(o),e.exit("labelImageMarker"),a}function a(o){return o===91?(e.enter("labelMarker"),e.consume(o),e.exit("labelMarker"),e.exit("labelImage"),s):n(o)}function s(o){return o===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(o):t(o)}}const _p={name:"labelStartLink",tokenize:Cp,resolveAll:La.resolveAll};function Cp(e,t,n){const r=this;return i;function i(s){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(s),e.exit("labelMarker"),e.exit("labelLink"),a}function a(s){return s===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(s):t(s)}}const bi={name:"lineEnding",tokenize:Ap};function Ap(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),Se(e,t,"linePrefix")}}const yr={name:"thematicBreak",tokenize:wp};function wp(e,t,n){let r=0,i;return a;function a(c){return e.enter("thematicBreak"),s(c)}function s(c){return i=c,o(c)}function o(c){return c===i?(e.enter("thematicBreakSequence"),u(c)):r>=3&&(c===null||ae(c))?(e.exit("thematicBreak"),t(c)):n(c)}function u(c){return c===i?(e.consume(c),r++,u):(e.exit("thematicBreakSequence"),be(c)?Se(e,o,"whitespace")(c):o(c))}}const Je={name:"list",tokenize:kp,continuation:{tokenize:Np},exit:Rp},Ip={tokenize:Lp,partial:!0},vp={tokenize:Op,partial:!0};function kp(e,t,n){const r=this,i=r.events[r.events.length-1];let a=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,s=0;return o;function o(h){const b=r.containerState.type||(h===42||h===43||h===45?"listUnordered":"listOrdered");if(b==="listUnordered"?!r.containerState.marker||h===r.containerState.marker:ta(h)){if(r.containerState.type||(r.containerState.type=b,e.enter(b,{_container:!0})),b==="listUnordered")return e.enter("listItemPrefix"),h===42||h===45?e.check(yr,n,c)(h):c(h);if(!r.interrupt||h===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),u(h)}return n(h)}function u(h){return ta(h)&&++s<10?(e.consume(h),u):(!r.interrupt||s<2)&&(r.containerState.marker?h===r.containerState.marker:h===41||h===46)?(e.exit("listItemValue"),c(h)):n(h)}function c(h){return e.enter("listItemMarker"),e.consume(h),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||h,e.check(er,r.interrupt?n:d,e.attempt(Ip,p,f))}function d(h){return r.containerState.initialBlankLine=!0,a++,p(h)}function f(h){return be(h)?(e.enter("listItemPrefixWhitespace"),e.consume(h),e.exit("listItemPrefixWhitespace"),p):n(h)}function p(h){return r.containerState.size=a+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(h)}}function Np(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(er,i,a);function i(o){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Se(e,t,"listItemIndent",r.containerState.size+1)(o)}function a(o){return r.containerState.furtherBlankLines||!be(o)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,s(o)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(vp,t,s)(o))}function s(o){return r.containerState._closeFlow=!0,r.interrupt=void 0,Se(e,e.attempt(Je,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o)}}function Op(e,t,n){const r=this;return Se(e,i,"listItemIndent",r.containerState.size+1);function i(a){const s=r.events[r.events.length-1];return s&&s[1].type==="listItemIndent"&&s[2].sliceSerialize(s[1],!0).length===r.containerState.size?t(a):n(a)}}function Rp(e){e.exit(this.containerState.type)}function Lp(e,t,n){const r=this;return Se(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(a){const s=r.events[r.events.length-1];return!be(a)&&s&&s[1].type==="listItemPrefixWhitespace"?t(a):n(a)}}const Xs={name:"setextUnderline",tokenize:Pp,resolveTo:Dp};function Dp(e,t){let n=e.length,r,i,a;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(i=n)}else e[n][1].type==="content"&&e.splice(n,1),!a&&e[n][1].type==="definition"&&(a=n);const s={type:"setextHeading",start:Object.assign({},e[i][1].start),end:Object.assign({},e[e.length-1][1].end)};return e[i][1].type="setextHeadingText",a?(e.splice(i,0,["enter",s,t]),e.splice(a+1,0,["exit",e[r][1],t]),e[r][1].end=Object.assign({},e[a][1].end)):e[r][1]=s,e.push(["exit",s,t]),e}function Pp(e,t,n){const r=this;let i;return a;function a(c){let d=r.events.length,f;for(;d--;)if(r.events[d][1].type!=="lineEnding"&&r.events[d][1].type!=="linePrefix"&&r.events[d][1].type!=="content"){f=r.events[d][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||f)?(e.enter("setextHeadingLine"),i=c,s(c)):n(c)}function s(c){return e.enter("setextHeadingLineSequence"),o(c)}function o(c){return c===i?(e.consume(c),o):(e.exit("setextHeadingLineSequence"),be(c)?Se(e,u,"lineSuffix")(c):u(c))}function u(c){return c===null||ae(c)?(e.exit("setextHeadingLine"),t(c)):n(c)}}const Mp={tokenize:Bp};function Bp(e){const t=this,n=e.attempt(er,r,e.attempt(this.parser.constructs.flowInitial,i,Se(e,e.attempt(this.parser.constructs.flow,i,e.attempt(z0,i)),"linePrefix")));return n;function r(a){if(a===null){e.consume(a);return}return e.enter("lineEndingBlank"),e.consume(a),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function i(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const Fp={resolveAll:bl()},Hp=gl("string"),Up=gl("text");function gl(e){return{tokenize:t,resolveAll:bl(e==="text"?jp:void 0)};function t(n){const r=this,i=this.parser.constructs[e],a=n.attempt(i,s,o);return s;function s(d){return c(d)?a(d):o(d)}function o(d){if(d===null){n.consume(d);return}return n.enter("data"),n.consume(d),u}function u(d){return c(d)?(n.exit("data"),a(d)):(n.consume(d),u)}function c(d){if(d===null)return!0;const f=i[d];let p=-1;if(f)for(;++p<f.length;){const h=f[p];if(!h.previous||h.previous.call(r,r.previous))return!0}return!1}}}function bl(e){return t;function t(n,r){let i=-1,a;for(;++i<=n.length;)a===void 0?n[i]&&n[i][1].type==="data"&&(a=i,i++):(!n[i]||n[i][1].type!=="data")&&(i!==a+2&&(n[a][1].end=n[i-1][1].end,n.splice(a+2,i-a-2),i=a+2),a=void 0);return e?e(n,r):n}}function jp(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],i=t.sliceStream(r);let a=i.length,s=-1,o=0,u;for(;a--;){const c=i[a];if(typeof c=="string"){for(s=c.length;c.charCodeAt(s-1)===32;)o++,s--;if(s)break;s=-1}else if(c===-2)u=!0,o++;else if(c!==-1){a++;break}}if(o){const c={type:n===e.length||u||o<2?"lineSuffix":"hardBreakTrailing",start:{line:r.end.line,column:r.end.column-o,offset:r.end.offset-o,_index:r.start._index+a,_bufferIndex:a?s:r.start._bufferIndex+s},end:Object.assign({},r.end)};r.end=Object.assign({},c.start),r.start.offset===r.end.offset?Object.assign(r,c):(e.splice(n,0,["enter",c,t],["exit",c,t]),n+=2)}n++}return e}function zp(e,t,n){let r=Object.assign(n?Object.assign({},n):{line:1,column:1,offset:0},{_index:0,_bufferIndex:-1});const i={},a=[];let s=[],o=[];const u={consume:k,enter:N,exit:L,attempt:z(A),check:z(v),interrupt:z(v,{interrupt:!0})},c={previous:null,code:null,containerState:{},events:[],parser:e,sliceStream:h,sliceSerialize:p,now:b,defineSkip:y,write:f};let d=t.tokenize.call(c,u);return t.resolveAll&&a.push(t),c;function f(H){return s=ot(s,H),w(),s[s.length-1]!==null?[]:(K(t,0),c.events=$r(a,c.events,c),c.events)}function p(H,$){return Yp(h(H),$)}function h(H){return $p(s,H)}function b(){const{line:H,column:$,offset:P,_index:j,_bufferIndex:X}=r;return{line:H,column:$,offset:P,_index:j,_bufferIndex:X}}function y(H){i[H.line]=H.column,I()}function w(){let H;for(;r._index<s.length;){const $=s[r._index];if(typeof $=="string")for(H=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===H&&r._bufferIndex<$.length;)_($.charCodeAt(r._bufferIndex));else _($)}}function _(H){d=d(H)}function k(H){ae(H)?(r.line++,r.column=1,r.offset+=H===-3?2:1,I()):H!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===s[r._index].length&&(r._bufferIndex=-1,r._index++)),c.previous=H}function N(H,$){const P=$||{};return P.type=H,P.start=b(),c.events.push(["enter",P,c]),o.push(P),P}function L(H){const $=o.pop();return $.end=b(),c.events.push(["exit",$,c]),$}function A(H,$){K(H,$.from)}function v(H,$){$.restore()}function z(H,$){return P;function P(j,X,Ee){let pe,Oe,ke,m;return Array.isArray(j)?ee(j):"tokenize"in j?ee([j]):Y(j);function Y(q){return se;function se(re){const le=re!==null&&q[re],ie=re!==null&&q.null,Ae=[...Array.isArray(le)?le:le?[le]:[],...Array.isArray(ie)?ie:ie?[ie]:[]];return ee(Ae)(re)}}function ee(q){return pe=q,Oe=0,q.length===0?Ee:T(q[Oe])}function T(q){return se;function se(re){return m=Q(),ke=q,q.partial||(c.currentConstruct=q),q.name&&c.parser.constructs.disable.null.includes(q.name)?ne():q.tokenize.call($?Object.assign(Object.create(c),$):c,u,W,ne)(re)}}function W(q){return H(ke,m),X}function ne(q){return m.restore(),++Oe<pe.length?T(pe[Oe]):Ee}}}function K(H,$){H.resolveAll&&!a.includes(H)&&a.push(H),H.resolve&&it(c.events,$,c.events.length-$,H.resolve(c.events.slice($),c)),H.resolveTo&&(c.events=H.resolveTo(c.events,c))}function Q(){const H=b(),$=c.previous,P=c.currentConstruct,j=c.events.length,X=Array.from(o);return{restore:Ee,from:j};function Ee(){r=H,c.previous=$,c.currentConstruct=P,c.events.length=j,o=X,I()}}function I(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function $p(e,t){const n=t.start._index,r=t.start._bufferIndex,i=t.end._index,a=t.end._bufferIndex;let s;if(n===i)s=[e[n].slice(r,a)];else{if(s=e.slice(n,i),r>-1){const o=s[0];typeof o=="string"?s[0]=o.slice(r):s.shift()}a>0&&s.push(e[i].slice(0,a))}return s}function Yp(e,t){let n=-1;const r=[];let i;for(;++n<e.length;){const a=e[n];let s;if(typeof a=="string")s=a;else switch(a){case-5:{s="\r";break}case-4:{s=`
49
49
  `;break}case-3:{s=`\r
50
- `;break}case-2:{s=t?" ":" ";break}case-1:{if(!t&&i)continue;s=" ";break}default:s=String.fromCharCode(a)}i=a===-2,r.push(s)}return r.join("")}const X0={42:Qe,43:Qe,45:Qe,48:Qe,49:Qe,50:Qe,51:Qe,52:Qe,53:Qe,54:Qe,55:Qe,56:Qe,57:Qe,62:Mu},Q0={91:Kh},K0={[-2]:ni,[-1]:ni,32:ni},J0={35:r0,42:fr,45:[Ss,fr],60:o0,61:Ss,95:fr,96:_s,126:_s},Z0={38:Fu,92:Bu},em={[-5]:ri,[-4]:ri,[-3]:ri,33:S0,38:Fu,42:zi,60:[Ih,m0],91:v0,92:[t0,Bu],93:Ta,95:zi,96:jh},tm={null:[zi,z0]},nm={null:[42,95]},rm={null:[]},im=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:nm,contentInitial:Q0,disable:rm,document:X0,flow:J0,flowInitial:K0,insideSpan:tm,string:Z0,text:em},Symbol.toStringTag,{value:"Module"}));function am(e){const n=Du([im,...(e||{}).extensions||[]]),r={defined:[],lazy:{},constructs:n,content:i(yh),document:i(_h),flow:i(U0),string:i($0),text:i(Y0)};return r;function i(a){return s;function s(o){return V0(r,a,o)}}}function sm(e){for(;!Hu(e););return e}const ws=/[\0\t\n\r]/g;function om(){let e=1,t="",n=!0,r;return i;function i(a,s,o){const u=[];let c,d,f,m,h;for(a=t+(typeof a=="string"?a.toString():new TextDecoder(s||void 0).decode(a)),f=0,t="",n&&(a.charCodeAt(0)===65279&&f++,n=void 0);f<a.length;){if(ws.lastIndex=f,c=ws.exec(a),m=c&&c.index!==void 0?c.index:a.length,h=a.charCodeAt(m),!c){t=a.slice(f);break}if(h===10&&f===m&&r)u.push(-3),r=void 0;else switch(r&&(u.push(-5),r=void 0),f<m&&(u.push(a.slice(f,m)),e+=m-f),h){case 0:{u.push(65533),e++;break}case 9:{for(d=Math.ceil(e/4)*4,u.push(-2);e++<d;)u.push(-1);break}case 10:{u.push(-4),e=1;break}default:r=!0,e=1}f=m+1}return o&&(r&&u.push(-5),t&&u.push(t),u.push(null)),u}}const um=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function lm(e){return e.replace(um,cm)}function cm(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),a=i===120||i===88;return Pu(n.slice(a?2:1),a?16:10)}return Ea(n)||e}const Gu={}.hasOwnProperty;function dm(e,t,n){return typeof t!="string"&&(n=t,t=void 0),fm(n)(sm(am(n).document().write(om()(e,t,!0))))}function fm(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:a(He),autolinkProtocol:ee,autolinkEmail:ee,atxHeading:a($e),blockQuote:a(oe),characterEscape:ee,characterReference:ee,codeFenced:a(ie),codeFencedFenceInfo:s,codeFencedFenceMeta:s,codeIndented:a(ie,s),codeText:a(Se,s),codeTextData:ee,data:ee,codeFlowValue:ee,definition:a(Y),definitionDestinationString:s,definitionLabelString:s,definitionTitleString:s,emphasis:a(Ne),hardBreakEscape:a(lt),hardBreakTrailing:a(lt),htmlFlow:a(wt,s),htmlFlowData:ee,htmlText:a(wt,s),htmlTextData:ee,image:a(nn),label:s,link:a(He),listItem:a(vt),listItemValue:m,listOrdered:a(rn,f),listUnordered:a(rn),paragraph:a(me),reference:T,referenceString:s,resourceDestinationString:s,resourceTitleString:s,setextHeading:a($e),strong:a(we),thematicBreak:a(V)},exit:{atxHeading:u(),atxHeadingSequence:I,autolink:u(),autolinkEmail:re,autolinkProtocol:ae,blockQuote:u(),characterEscapeValue:k,characterReferenceMarkerHexadecimal:ne,characterReferenceMarkerNumeric:ne,characterReferenceValue:W,codeFenced:u(w),codeFencedFence:A,codeFencedFenceInfo:h,codeFencedFenceMeta:b,codeFlowValue:k,codeIndented:u(y),codeText:u(Q),codeTextData:k,data:k,definition:u(),definitionDestinationString:D,definitionLabelString:_,definitionTitleString:S,emphasis:u(),hardBreakEscape:u($),hardBreakTrailing:u($),htmlFlow:u(U),htmlFlowData:k,htmlText:u(z),htmlTextData:k,image:u(Ee),label:Re,labelText:Le,lineEnding:M,link:u(he),listItem:u(),listOrdered:u(),listUnordered:u(),paragraph:u(),referenceString:K,resourceDestinationString:g,resourceTitleString:j,resource:J,setextHeading:u(se),setextHeadingLineSequence:G,setextHeadingText:N,strong:u(),thematicBreak:u()}};Vu(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(L){let P={type:"root",children:[]};const q={stack:[P],tokenStack:[],config:t,enter:o,exit:c,buffer:s,resume:d,data:n},Z=[];let fe=-1;for(;++fe<L.length;)if(L[fe][1].type==="listOrdered"||L[fe][1].type==="listUnordered")if(L[fe][0]==="enter")Z.push(fe);else{const qe=Z.pop();fe=i(L,qe,fe)}for(fe=-1;++fe<L.length;){const qe=t[L[fe][0]];Gu.call(qe,L[fe][1].type)&&qe[L[fe][1].type].call(Object.assign({sliceSerialize:L[fe][2].sliceSerialize},q),L[fe][1])}if(q.tokenStack.length>0){const qe=q.tokenStack[q.tokenStack.length-1];(qe[1]||vs).call(q,void 0,qe[0])}for(P.position={start:Nt(L.length>0?L[0][1].start:{line:1,column:1,offset:0}),end:Nt(L.length>0?L[L.length-2][1].end:{line:1,column:1,offset:0})},fe=-1;++fe<t.transforms.length;)P=t.transforms[fe](P)||P;return P}function i(L,P,q){let Z=P-1,fe=-1,qe=!1,Ze,et,tt,Ht;for(;++Z<=q;){const Ye=L[Z];switch(Ye[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Ye[0]==="enter"?fe++:fe--,Ht=void 0;break}case"lineEndingBlank":{Ye[0]==="enter"&&(Ze&&!Ht&&!fe&&!tt&&(tt=Z),Ht=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Ht=void 0}if(!fe&&Ye[0]==="enter"&&Ye[1].type==="listItemPrefix"||fe===-1&&Ye[0]==="exit"&&(Ye[1].type==="listUnordered"||Ye[1].type==="listOrdered")){if(Ze){let It=Z;for(et=void 0;It--;){const ct=L[It];if(ct[1].type==="lineEnding"||ct[1].type==="lineEndingBlank"){if(ct[0]==="exit")continue;et&&(L[et][1].type="lineEndingBlank",qe=!0),ct[1].type="lineEnding",et=It}else if(!(ct[1].type==="linePrefix"||ct[1].type==="blockQuotePrefix"||ct[1].type==="blockQuotePrefixWhitespace"||ct[1].type==="blockQuoteMarker"||ct[1].type==="listItemIndent"))break}tt&&(!et||tt<et)&&(Ze._spread=!0),Ze.end=Object.assign({},et?L[et][1].start:Ye[1].end),L.splice(et||Z,0,["exit",Ze,Ye[2]]),Z++,q++}if(Ye[1].type==="listItemPrefix"){const It={type:"listItem",_spread:!1,start:Object.assign({},Ye[1].start),end:void 0};Ze=It,L.splice(Z,0,["enter",It,Ye[2]]),Z++,q++,tt=void 0,Ht=!0}}}return L[P][1]._spread=qe,q}function a(L,P){return q;function q(Z){o.call(this,L(Z),Z),P&&P.call(this,Z)}}function s(){this.stack.push({type:"fragment",children:[]})}function o(L,P,q){this.stack[this.stack.length-1].children.push(L),this.stack.push(L),this.tokenStack.push([P,q]),L.position={start:Nt(P.start),end:void 0}}function u(L){return P;function P(q){L&&L.call(this,q),c.call(this,q)}}function c(L,P){const q=this.stack.pop(),Z=this.tokenStack.pop();if(Z)Z[0].type!==L.type&&(P?P.call(this,L,Z[0]):(Z[1]||vs).call(this,L,Z[0]));else throw new Error("Cannot close `"+L.type+"` ("+On({start:L.start,end:L.end})+"): it’s not open");q.position.end=Nt(L.end)}function d(){return ba(this.stack.pop())}function f(){this.data.expectingFirstListItemValue=!0}function m(L){if(this.data.expectingFirstListItemValue){const P=this.stack[this.stack.length-2];P.start=Number.parseInt(this.sliceSerialize(L),10),this.data.expectingFirstListItemValue=void 0}}function h(){const L=this.resume(),P=this.stack[this.stack.length-1];P.lang=L}function b(){const L=this.resume(),P=this.stack[this.stack.length-1];P.meta=L}function A(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function w(){const L=this.resume(),P=this.stack[this.stack.length-1];P.value=L.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function y(){const L=this.resume(),P=this.stack[this.stack.length-1];P.value=L.replace(/(\r?\n|\r)$/g,"")}function _(L){const P=this.resume(),q=this.stack[this.stack.length-1];q.label=P,q.identifier=dt(this.sliceSerialize(L)).toLowerCase()}function S(){const L=this.resume(),P=this.stack[this.stack.length-1];P.title=L}function D(){const L=this.resume(),P=this.stack[this.stack.length-1];P.url=L}function I(L){const P=this.stack[this.stack.length-1];if(!P.depth){const q=this.sliceSerialize(L).length;P.depth=q}}function N(){this.data.setextHeadingSlurpLineEnding=!0}function G(L){const P=this.stack[this.stack.length-1];P.depth=this.sliceSerialize(L).codePointAt(0)===61?1:2}function se(){this.data.setextHeadingSlurpLineEnding=void 0}function ee(L){const q=this.stack[this.stack.length-1].children;let Z=q[q.length-1];(!Z||Z.type!=="text")&&(Z=ye(),Z.position={start:Nt(L.start),end:void 0},q.push(Z)),this.stack.push(Z)}function k(L){const P=this.stack.pop();P.value+=this.sliceSerialize(L),P.position.end=Nt(L.end)}function M(L){const P=this.stack[this.stack.length-1];if(this.data.atHardBreak){const q=P.children[P.children.length-1];q.position.end=Nt(L.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(P.type)&&(ee.call(this,L),k.call(this,L))}function $(){this.data.atHardBreak=!0}function U(){const L=this.resume(),P=this.stack[this.stack.length-1];P.value=L}function z(){const L=this.resume(),P=this.stack[this.stack.length-1];P.value=L}function Q(){const L=this.resume(),P=this.stack[this.stack.length-1];P.value=L}function he(){const L=this.stack[this.stack.length-1];if(this.data.inReference){const P=this.data.referenceType||"shortcut";L.type+="Reference",L.referenceType=P,delete L.url,delete L.title}else delete L.identifier,delete L.label;this.data.referenceType=void 0}function Ee(){const L=this.stack[this.stack.length-1];if(this.data.inReference){const P=this.data.referenceType||"shortcut";L.type+="Reference",L.referenceType=P,delete L.url,delete L.title}else delete L.identifier,delete L.label;this.data.referenceType=void 0}function Le(L){const P=this.sliceSerialize(L),q=this.stack[this.stack.length-2];q.label=lm(P),q.identifier=dt(P).toLowerCase()}function Re(){const L=this.stack[this.stack.length-1],P=this.resume(),q=this.stack[this.stack.length-1];if(this.data.inReference=!0,q.type==="link"){const Z=L.children;q.children=Z}else q.alt=P}function g(){const L=this.resume(),P=this.stack[this.stack.length-1];P.url=L}function j(){const L=this.resume(),P=this.stack[this.stack.length-1];P.title=L}function J(){this.data.inReference=void 0}function T(){this.data.referenceType="collapsed"}function K(L){const P=this.resume(),q=this.stack[this.stack.length-1];q.label=P,q.identifier=dt(this.sliceSerialize(L)).toLowerCase(),this.data.referenceType="full"}function ne(L){this.data.characterReferenceType=L.type}function W(L){const P=this.sliceSerialize(L),q=this.data.characterReferenceType;let Z;q?(Z=Pu(P,q==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Z=Ea(P);const fe=this.stack.pop();fe.value+=Z,fe.position.end=Nt(L.end)}function ae(L){k.call(this,L);const P=this.stack[this.stack.length-1];P.url=this.sliceSerialize(L)}function re(L){k.call(this,L);const P=this.stack[this.stack.length-1];P.url="mailto:"+this.sliceSerialize(L)}function oe(){return{type:"blockquote",children:[]}}function ie(){return{type:"code",lang:null,meta:null,value:""}}function Se(){return{type:"inlineCode",value:""}}function Y(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Ne(){return{type:"emphasis",children:[]}}function $e(){return{type:"heading",depth:0,children:[]}}function lt(){return{type:"break"}}function wt(){return{type:"html",value:""}}function nn(){return{type:"image",title:null,url:"",alt:null}}function He(){return{type:"link",title:null,url:"",children:[]}}function rn(L){return{type:"list",ordered:L.type==="listOrdered",start:null,spread:L._spread,children:[]}}function vt(L){return{type:"listItem",spread:L._spread,checked:null,children:[]}}function me(){return{type:"paragraph",children:[]}}function we(){return{type:"strong",children:[]}}function ye(){return{type:"text",value:""}}function V(){return{type:"thematicBreak"}}}function Nt(e){return{line:e.line,column:e.column,offset:e.offset}}function Vu(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?Vu(e,r):hm(e,r)}}function hm(e,t){let n;for(n in t)if(Gu.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 vs(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+On({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+On({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+On({start:t.start,end:t.end})+") is still open")}function mm(e){const t=this;t.parser=n;function n(r){return dm(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function pm(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function gm(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
51
- `}]}function bm(e,t){const n=t.value?t.value+`
52
- `:"",r={};t.lang&&(r.className=["language-"+t.lang]);let i={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(i.data={meta:t.meta}),e.patch(t,i),i=e.applyData(t,i),i={type:"element",tagName:"pre",properties:{},children:[i]},e.patch(t,i),i}function Em(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Tm(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function xm(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),i=Tn(r.toLowerCase()),a=e.footnoteOrder.indexOf(r);let s,o=e.footnoteCounts.get(r);o===void 0?(o=0,e.footnoteOrder.push(r),s=e.footnoteOrder.length):s=a+1,o+=1,e.footnoteCounts.set(r,o);const u={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+i,id:n+"fnref-"+i+(o>1?"-"+o:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(s)}]};e.patch(t,u);const c={type:"element",tagName:"sup",properties:{},children:[u]};return e.patch(t,c),e.applyData(t,c)}function ym(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Am(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function qu(e,t){const n=t.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+r}];const i=e.all(t),a=i[0];a&&a.type==="text"?a.value="["+a.value:i.unshift({type:"text",value:"["});const s=i[i.length-1];return s&&s.type==="text"?s.value+=r:i.push({type:"text",value:r}),i}function _m(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return qu(e,t);const i={src:Tn(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);const a={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,a),e.applyData(t,a)}function Cm(e,t){const n={src:Tn(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function Sm(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function wm(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return qu(e,t);const i={href:Tn(r.url||"")};r.title!==null&&r.title!==void 0&&(i.title=r.title);const a={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function vm(e,t){const n={href:Tn(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function Im(e,t,n){const r=e.all(t),i=n?Nm(n):Wu(t),a={},s=[];if(typeof t.checked=="boolean"){const d=r[0];let f;d&&d.type==="element"&&d.tagName==="p"?f=d:(f={type:"element",tagName:"p",properties:{},children:[]},r.unshift(f)),f.children.length>0&&f.children.unshift({type:"text",value:" "}),f.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),a.className=["task-list-item"]}let o=-1;for(;++o<r.length;){const d=r[o];(i||o!==0||d.type!=="element"||d.tagName!=="p")&&s.push({type:"text",value:`
50
+ `;break}case-2:{s=t?" ":" ";break}case-1:{if(!t&&i)continue;s=" ";break}default:s=String.fromCharCode(a)}i=a===-2,r.push(s)}return r.join("")}const Gp={42:Je,43:Je,45:Je,48:Je,49:Je,50:Je,51:Je,52:Je,53:Je,54:Je,55:Je,56:Je,57:Je,62:ll},qp={91:V0},Vp={[-2]:gi,[-1]:gi,32:gi},Wp={35:J0,42:yr,45:[Xs,yr],60:rp,61:Xs,95:yr,96:Vs,126:Vs},Xp={38:dl,92:cl},Qp={[-5]:bi,[-4]:bi,[-3]:bi,33:xp,38:dl,42:na,60:[C0,cp],91:_p,92:[K0,cl],93:La,95:na,96:B0},Kp={null:[na,Fp]},Zp={null:[42,95]},Jp={null:[]},em=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:Zp,contentInitial:qp,disable:Jp,document:Gp,flow:Wp,flowInitial:Vp,insideSpan:Kp,string:Xp,text:Qp},Symbol.toStringTag,{value:"Module"}));function tm(e){const n=ol([em,...(e||{}).extensions||[]]),r={defined:[],lazy:{},constructs:n,content:i(b0),document:i(T0),flow:i(Mp),string:i(Hp),text:i(Up)};return r;function i(a){return s;function s(o){return zp(r,a,o)}}}function nm(e){for(;!fl(e););return e}const Qs=/[\0\t\n\r]/g;function rm(){let e=1,t="",n=!0,r;return i;function i(a,s,o){const u=[];let c,d,f,p,h;for(a=t+(typeof a=="string"?a.toString():new TextDecoder(s||void 0).decode(a)),f=0,t="",n&&(a.charCodeAt(0)===65279&&f++,n=void 0);f<a.length;){if(Qs.lastIndex=f,c=Qs.exec(a),p=c&&c.index!==void 0?c.index:a.length,h=a.charCodeAt(p),!c){t=a.slice(f);break}if(h===10&&f===p&&r)u.push(-3),r=void 0;else switch(r&&(u.push(-5),r=void 0),f<p&&(u.push(a.slice(f,p)),e+=p-f),h){case 0:{u.push(65533),e++;break}case 9:{for(d=Math.ceil(e/4)*4,u.push(-2);e++<d;)u.push(-1);break}case 10:{u.push(-4),e=1;break}default:r=!0,e=1}f=p+1}return o&&(r&&u.push(-5),t&&u.push(t),u.push(null)),u}}const im=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function am(e){return e.replace(im,sm)}function sm(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),a=i===120||i===88;return ul(n.slice(a?2:1),a?16:10)}return Ra(n)||e}const El={}.hasOwnProperty;function om(e,t,n){return typeof t!="string"&&(n=t,t=void 0),um(n)(nm(tm(n).document().write(rm()(e,t,!0))))}function um(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:a(Be),autolinkProtocol:Q,autolinkEmail:Q,atxHeading:a(Fe),blockQuote:a(le),characterEscape:Q,characterReference:Q,codeFenced:a(ie),codeFencedFenceInfo:s,codeFencedFenceMeta:s,codeIndented:a(ie,s),codeText:a(Ae,s),codeTextData:Q,data:Q,codeFlowValue:Q,definition:a(G),definitionDestinationString:s,definitionLabelString:s,definitionTitleString:s,emphasis:a(De),hardBreakEscape:a(Ve),hardBreakTrailing:a(Ve),htmlFlow:a(et,s),htmlFlowData:Q,htmlText:a(et,s),htmlTextData:Q,image:a(Rt),label:s,link:a(Be),listItem:a(Te),listItemValue:p,listOrdered:a(V,f),listUnordered:a(V),paragraph:a(te),reference:T,referenceString:s,resourceDestinationString:s,resourceTitleString:s,setextHeading:a(Fe),strong:a(ce),thematicBreak:a(_e)},exit:{atxHeading:u(),atxHeadingSequence:A,autolink:u(),autolinkEmail:re,autolinkProtocol:se,blockQuote:u(),characterEscapeValue:I,characterReferenceMarkerHexadecimal:ne,characterReferenceMarkerNumeric:ne,characterReferenceValue:q,codeFenced:u(w),codeFencedFence:y,codeFencedFenceInfo:h,codeFencedFenceMeta:b,codeFlowValue:I,codeIndented:u(_),codeText:u(X),codeTextData:I,data:I,definition:u(),definitionDestinationString:L,definitionLabelString:k,definitionTitleString:N,emphasis:u(),hardBreakEscape:u($),hardBreakTrailing:u($),htmlFlow:u(P),htmlFlowData:I,htmlText:u(j),htmlTextData:I,image:u(pe),label:ke,labelText:Oe,lineEnding:H,link:u(Ee),listItem:u(),listOrdered:u(),listUnordered:u(),paragraph:u(),referenceString:W,resourceDestinationString:m,resourceTitleString:Y,resource:ee,setextHeading:u(K),setextHeadingLineSequence:z,setextHeadingText:v,strong:u(),thematicBreak:u()}};Tl(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(R){let B={type:"root",children:[]};const Z={stack:[B],tokenStack:[],config:t,enter:o,exit:c,buffer:s,resume:d,data:n},ue=[];let Ce=-1;for(;++Ce<R.length;)if(R[Ce][1].type==="listOrdered"||R[Ce][1].type==="listUnordered")if(R[Ce][0]==="enter")ue.push(Ce);else{const tt=ue.pop();Ce=i(R,tt,Ce)}for(Ce=-1;++Ce<R.length;){const tt=t[R[Ce][0]];El.call(tt,R[Ce][1].type)&&tt[R[Ce][1].type].call(Object.assign({sliceSerialize:R[Ce][2].sliceSerialize},Z),R[Ce][1])}if(Z.tokenStack.length>0){const tt=Z.tokenStack[Z.tokenStack.length-1];(tt[1]||Ks).call(Z,void 0,tt[0])}for(B.position={start:Pt(R.length>0?R[0][1].start:{line:1,column:1,offset:0}),end:Pt(R.length>0?R[R.length-2][1].end:{line:1,column:1,offset:0})},Ce=-1;++Ce<t.transforms.length;)B=t.transforms[Ce](B)||B;return B}function i(R,B,Z){let ue=B-1,Ce=-1,tt=!1,vt,at,$t,Yt;for(;++ue<=Z;){const We=R[ue];switch(We[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{We[0]==="enter"?Ce++:Ce--,Yt=void 0;break}case"lineEndingBlank":{We[0]==="enter"&&(vt&&!Yt&&!Ce&&!$t&&($t=ue),Yt=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Yt=void 0}if(!Ce&&We[0]==="enter"&&We[1].type==="listItemPrefix"||Ce===-1&&We[0]==="exit"&&(We[1].type==="listUnordered"||We[1].type==="listOrdered")){if(vt){let Lt=ue;for(at=void 0;Lt--;){const st=R[Lt];if(st[1].type==="lineEnding"||st[1].type==="lineEndingBlank"){if(st[0]==="exit")continue;at&&(R[at][1].type="lineEndingBlank",tt=!0),st[1].type="lineEnding",at=Lt}else if(!(st[1].type==="linePrefix"||st[1].type==="blockQuotePrefix"||st[1].type==="blockQuotePrefixWhitespace"||st[1].type==="blockQuoteMarker"||st[1].type==="listItemIndent"))break}$t&&(!at||$t<at)&&(vt._spread=!0),vt.end=Object.assign({},at?R[at][1].start:We[1].end),R.splice(at||ue,0,["exit",vt,We[2]]),ue++,Z++}if(We[1].type==="listItemPrefix"){const Lt={type:"listItem",_spread:!1,start:Object.assign({},We[1].start),end:void 0};vt=Lt,R.splice(ue,0,["enter",Lt,We[2]]),ue++,Z++,$t=void 0,Yt=!0}}}return R[B][1]._spread=tt,Z}function a(R,B){return Z;function Z(ue){o.call(this,R(ue),ue),B&&B.call(this,ue)}}function s(){this.stack.push({type:"fragment",children:[]})}function o(R,B,Z){this.stack[this.stack.length-1].children.push(R),this.stack.push(R),this.tokenStack.push([B,Z]),R.position={start:Pt(B.start),end:void 0}}function u(R){return B;function B(Z){R&&R.call(this,Z),c.call(this,Z)}}function c(R,B){const Z=this.stack.pop(),ue=this.tokenStack.pop();if(ue)ue[0].type!==R.type&&(B?B.call(this,R,ue[0]):(ue[1]||Ks).call(this,R,ue[0]));else throw new Error("Cannot close `"+R.type+"` ("+Hn({start:R.start,end:R.end})+"): it’s not open");Z.position.end=Pt(R.end)}function d(){return Oa(this.stack.pop())}function f(){this.data.expectingFirstListItemValue=!0}function p(R){if(this.data.expectingFirstListItemValue){const B=this.stack[this.stack.length-2];B.start=Number.parseInt(this.sliceSerialize(R),10),this.data.expectingFirstListItemValue=void 0}}function h(){const R=this.resume(),B=this.stack[this.stack.length-1];B.lang=R}function b(){const R=this.resume(),B=this.stack[this.stack.length-1];B.meta=R}function y(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function w(){const R=this.resume(),B=this.stack[this.stack.length-1];B.value=R.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function _(){const R=this.resume(),B=this.stack[this.stack.length-1];B.value=R.replace(/(\r?\n|\r)$/g,"")}function k(R){const B=this.resume(),Z=this.stack[this.stack.length-1];Z.label=B,Z.identifier=pt(this.sliceSerialize(R)).toLowerCase()}function N(){const R=this.resume(),B=this.stack[this.stack.length-1];B.title=R}function L(){const R=this.resume(),B=this.stack[this.stack.length-1];B.url=R}function A(R){const B=this.stack[this.stack.length-1];if(!B.depth){const Z=this.sliceSerialize(R).length;B.depth=Z}}function v(){this.data.setextHeadingSlurpLineEnding=!0}function z(R){const B=this.stack[this.stack.length-1];B.depth=this.sliceSerialize(R).codePointAt(0)===61?1:2}function K(){this.data.setextHeadingSlurpLineEnding=void 0}function Q(R){const Z=this.stack[this.stack.length-1].children;let ue=Z[Z.length-1];(!ue||ue.type!=="text")&&(ue=fe(),ue.position={start:Pt(R.start),end:void 0},Z.push(ue)),this.stack.push(ue)}function I(R){const B=this.stack.pop();B.value+=this.sliceSerialize(R),B.position.end=Pt(R.end)}function H(R){const B=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Z=B.children[B.children.length-1];Z.position.end=Pt(R.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(B.type)&&(Q.call(this,R),I.call(this,R))}function $(){this.data.atHardBreak=!0}function P(){const R=this.resume(),B=this.stack[this.stack.length-1];B.value=R}function j(){const R=this.resume(),B=this.stack[this.stack.length-1];B.value=R}function X(){const R=this.resume(),B=this.stack[this.stack.length-1];B.value=R}function Ee(){const R=this.stack[this.stack.length-1];if(this.data.inReference){const B=this.data.referenceType||"shortcut";R.type+="Reference",R.referenceType=B,delete R.url,delete R.title}else delete R.identifier,delete R.label;this.data.referenceType=void 0}function pe(){const R=this.stack[this.stack.length-1];if(this.data.inReference){const B=this.data.referenceType||"shortcut";R.type+="Reference",R.referenceType=B,delete R.url,delete R.title}else delete R.identifier,delete R.label;this.data.referenceType=void 0}function Oe(R){const B=this.sliceSerialize(R),Z=this.stack[this.stack.length-2];Z.label=am(B),Z.identifier=pt(B).toLowerCase()}function ke(){const R=this.stack[this.stack.length-1],B=this.resume(),Z=this.stack[this.stack.length-1];if(this.data.inReference=!0,Z.type==="link"){const ue=R.children;Z.children=ue}else Z.alt=B}function m(){const R=this.resume(),B=this.stack[this.stack.length-1];B.url=R}function Y(){const R=this.resume(),B=this.stack[this.stack.length-1];B.title=R}function ee(){this.data.inReference=void 0}function T(){this.data.referenceType="collapsed"}function W(R){const B=this.resume(),Z=this.stack[this.stack.length-1];Z.label=B,Z.identifier=pt(this.sliceSerialize(R)).toLowerCase(),this.data.referenceType="full"}function ne(R){this.data.characterReferenceType=R.type}function q(R){const B=this.sliceSerialize(R),Z=this.data.characterReferenceType;let ue;Z?(ue=ul(B,Z==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):ue=Ra(B);const Ce=this.stack.pop();Ce.value+=ue,Ce.position.end=Pt(R.end)}function se(R){I.call(this,R);const B=this.stack[this.stack.length-1];B.url=this.sliceSerialize(R)}function re(R){I.call(this,R);const B=this.stack[this.stack.length-1];B.url="mailto:"+this.sliceSerialize(R)}function le(){return{type:"blockquote",children:[]}}function ie(){return{type:"code",lang:null,meta:null,value:""}}function Ae(){return{type:"inlineCode",value:""}}function G(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function De(){return{type:"emphasis",children:[]}}function Fe(){return{type:"heading",depth:0,children:[]}}function Ve(){return{type:"break"}}function et(){return{type:"html",value:""}}function Rt(){return{type:"image",title:null,url:"",alt:null}}function Be(){return{type:"link",title:null,url:"",children:[]}}function V(R){return{type:"list",ordered:R.type==="listOrdered",start:null,spread:R._spread,children:[]}}function Te(R){return{type:"listItem",spread:R._spread,checked:null,children:[]}}function te(){return{type:"paragraph",children:[]}}function ce(){return{type:"strong",children:[]}}function fe(){return{type:"text",value:""}}function _e(){return{type:"thematicBreak"}}}function Pt(e){return{line:e.line,column:e.column,offset:e.offset}}function Tl(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?Tl(e,r):lm(e,r)}}function lm(e,t){let n;for(n in t)if(El.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 Ks(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Hn({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Hn({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Hn({start:t.start,end:t.end})+") is still open")}function cm(e){const t=this;t.parser=n;function n(r){return om(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function dm(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function fm(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
51
+ `}]}function hm(e,t){const n=t.value?t.value+`
52
+ `:"",r={};t.lang&&(r.className=["language-"+t.lang]);let i={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(i.data={meta:t.meta}),e.patch(t,i),i=e.applyData(t,i),i={type:"element",tagName:"pre",properties:{},children:[i]},e.patch(t,i),i}function pm(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function mm(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function gm(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),i=An(r.toLowerCase()),a=e.footnoteOrder.indexOf(r);let s,o=e.footnoteCounts.get(r);o===void 0?(o=0,e.footnoteOrder.push(r),s=e.footnoteOrder.length):s=a+1,o+=1,e.footnoteCounts.set(r,o);const u={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+i,id:n+"fnref-"+i+(o>1?"-"+o:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(s)}]};e.patch(t,u);const c={type:"element",tagName:"sup",properties:{},children:[u]};return e.patch(t,c),e.applyData(t,c)}function bm(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Em(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function yl(e,t){const n=t.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+r}];const i=e.all(t),a=i[0];a&&a.type==="text"?a.value="["+a.value:i.unshift({type:"text",value:"["});const s=i[i.length-1];return s&&s.type==="text"?s.value+=r:i.push({type:"text",value:r}),i}function Tm(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return yl(e,t);const i={src:An(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);const a={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,a),e.applyData(t,a)}function ym(e,t){const n={src:An(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function xm(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function Sm(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return yl(e,t);const i={href:An(r.url||"")};r.title!==null&&r.title!==void 0&&(i.title=r.title);const a={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function _m(e,t){const n={href:An(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function Cm(e,t,n){const r=e.all(t),i=n?Am(n):xl(t),a={},s=[];if(typeof t.checked=="boolean"){const d=r[0];let f;d&&d.type==="element"&&d.tagName==="p"?f=d:(f={type:"element",tagName:"p",properties:{},children:[]},r.unshift(f)),f.children.length>0&&f.children.unshift({type:"text",value:" "}),f.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),a.className=["task-list-item"]}let o=-1;for(;++o<r.length;){const d=r[o];(i||o!==0||d.type!=="element"||d.tagName!=="p")&&s.push({type:"text",value:`
53
53
  `}),d.type==="element"&&d.tagName==="p"&&!i?s.push(...d.children):s.push(d)}const u=r[r.length-1];u&&(i||u.type!=="element"||u.tagName!=="p")&&s.push({type:"text",value:`
54
- `});const c={type:"element",tagName:"li",properties:a,children:s};return e.patch(t,c),e.applyData(t,c)}function Nm(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=Wu(n[r])}return t}function Wu(e){const t=e.spread;return t??e.children.length>1}function km(e,t){const n={},r=e.all(t);let i=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++i<r.length;){const s=r[i];if(s.type==="element"&&s.tagName==="li"&&s.properties&&Array.isArray(s.properties.className)&&s.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const a={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,a),e.applyData(t,a)}function Om(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Lm(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function Rm(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Dm(e,t){const n=e.all(t),r=n.shift(),i=[];if(r){const s={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],s),i.push(s)}if(n.length>0){const s={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},o=xt(t.children[1]),u=Rr(t.children[t.children.length-1]);o&&u&&(s.position={start:o,end:u}),i.push(s)}const a={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,a),e.applyData(t,a)}function Pm(e,t,n){const r=n?n.children:void 0,a=(r?r.indexOf(t):1)===0?"th":"td",s=n&&n.type==="table"?n.align:void 0,o=s?s.length:t.children.length;let u=-1;const c=[];for(;++u<o;){const f=t.children[u],m={},h=s?s[u]:void 0;h&&(m.align=h);let b={type:"element",tagName:a,properties:m,children:[]};f&&(b.children=e.all(f),e.patch(f,b),b=e.applyData(f,b)),c.push(b)}const d={type:"element",tagName:"tr",properties:{},children:e.wrap(c,!0)};return e.patch(t,d),e.applyData(t,d)}function Mm(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const Is=9,Ns=32;function Bm(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),i=0;const a=[];for(;r;)a.push(ks(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return a.push(ks(t.slice(i),i>0,!1)),a.join("")}function ks(e,t,n){let r=0,i=e.length;if(t){let a=e.codePointAt(r);for(;a===Is||a===Ns;)r++,a=e.codePointAt(r)}if(n){let a=e.codePointAt(i-1);for(;a===Is||a===Ns;)i--,a=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function Fm(e,t){const n={type:"text",value:Bm(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function Hm(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const Um={blockquote:pm,break:gm,code:bm,delete:Em,emphasis:Tm,footnoteReference:xm,heading:ym,html:Am,imageReference:_m,image:Cm,inlineCode:Sm,linkReference:wm,link:vm,listItem:Im,list:km,paragraph:Om,root:Lm,strong:Rm,table:Dm,tableCell:Mm,tableRow:Pm,text:Fm,thematicBreak:Hm,toml:rr,yaml:rr,definition:rr,footnoteDefinition:rr};function rr(){}const Xu=-1,Mr=0,br=1,Er=2,xa=3,ya=4,Aa=5,_a=6,Qu=7,Ku=8,Os=typeof self=="object"?self:globalThis,jm=(e,t)=>{const n=(i,a)=>(e.set(a,i),i),r=i=>{if(e.has(i))return e.get(i);const[a,s]=t[i];switch(a){case Mr:case Xu:return n(s,i);case br:{const o=n([],i);for(const u of s)o.push(r(u));return o}case Er:{const o=n({},i);for(const[u,c]of s)o[r(u)]=r(c);return o}case xa:return n(new Date(s),i);case ya:{const{source:o,flags:u}=s;return n(new RegExp(o,u),i)}case Aa:{const o=n(new Map,i);for(const[u,c]of s)o.set(r(u),r(c));return o}case _a:{const o=n(new Set,i);for(const u of s)o.add(r(u));return o}case Qu:{const{name:o,message:u}=s;return n(new Os[o](u),i)}case Ku:return n(BigInt(s),i);case"BigInt":return n(Object(BigInt(s)),i)}return n(new Os[a](s),i)};return r},Ls=e=>jm(new Map,e)(0),sn="",{toString:zm}={},{keys:$m}=Object,Cn=e=>{const t=typeof e;if(t!=="object"||!e)return[Mr,t];const n=zm.call(e).slice(8,-1);switch(n){case"Array":return[br,sn];case"Object":return[Er,sn];case"Date":return[xa,sn];case"RegExp":return[ya,sn];case"Map":return[Aa,sn];case"Set":return[_a,sn]}return n.includes("Array")?[br,n]:n.includes("Error")?[Qu,n]:[Er,n]},ir=([e,t])=>e===Mr&&(t==="function"||t==="symbol"),Ym=(e,t,n,r)=>{const i=(s,o)=>{const u=r.push(s)-1;return n.set(o,u),u},a=s=>{if(n.has(s))return n.get(s);let[o,u]=Cn(s);switch(o){case Mr:{let d=s;switch(u){case"bigint":o=Ku,d=s.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+u);d=null;break;case"undefined":return i([Xu],s)}return i([o,d],s)}case br:{if(u)return i([u,[...s]],s);const d=[],f=i([o,d],s);for(const m of s)d.push(a(m));return f}case Er:{if(u)switch(u){case"BigInt":return i([u,s.toString()],s);case"Boolean":case"Number":case"String":return i([u,s.valueOf()],s)}if(t&&"toJSON"in s)return a(s.toJSON());const d=[],f=i([o,d],s);for(const m of $m(s))(e||!ir(Cn(s[m])))&&d.push([a(m),a(s[m])]);return f}case xa:return i([o,s.toISOString()],s);case ya:{const{source:d,flags:f}=s;return i([o,{source:d,flags:f}],s)}case Aa:{const d=[],f=i([o,d],s);for(const[m,h]of s)(e||!(ir(Cn(m))||ir(Cn(h))))&&d.push([a(m),a(h)]);return f}case _a:{const d=[],f=i([o,d],s);for(const m of s)(e||!ir(Cn(m)))&&d.push(a(m));return f}}const{message:c}=s;return i([o,{name:u,message:c}],s)};return a},Rs=(e,{json:t,lossy:n}={})=>{const r=[];return Ym(!(t||n),!!t,new Map,r)(e),r},pn=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?Ls(Rs(e,t)):structuredClone(e):(e,t)=>Ls(Rs(e,t));function Gm(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 Vm(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function qm(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||Gm,r=e.options.footnoteBackLabel||Vm,i=e.options.footnoteLabel||"Footnotes",a=e.options.footnoteLabelTagName||"h2",s=e.options.footnoteLabelProperties||{className:["sr-only"]},o=[];let u=-1;for(;++u<e.footnoteOrder.length;){const c=e.footnoteById.get(e.footnoteOrder[u]);if(!c)continue;const d=e.all(c),f=String(c.identifier).toUpperCase(),m=Tn(f.toLowerCase());let h=0;const b=[],A=e.footnoteCounts.get(f);for(;A!==void 0&&++h<=A;){b.length>0&&b.push({type:"text",value:" "});let _=typeof n=="string"?n:n(u,h);typeof _=="string"&&(_={type:"text",value:_}),b.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+m+(h>1?"-"+h:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(u,h),className:["data-footnote-backref"]},children:Array.isArray(_)?_:[_]})}const w=d[d.length-1];if(w&&w.type==="element"&&w.tagName==="p"){const _=w.children[w.children.length-1];_&&_.type==="text"?_.value+=" ":w.children.push({type:"text",value:" "}),w.children.push(...b)}else d.push(...b);const y={type:"element",tagName:"li",properties:{id:t+"fn-"+m},children:e.wrap(d,!0)};e.patch(c,y),o.push(y)}if(o.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:a,properties:{...pn(s),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:`
54
+ `});const c={type:"element",tagName:"li",properties:a,children:s};return e.patch(t,c),e.applyData(t,c)}function Am(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=xl(n[r])}return t}function xl(e){const t=e.spread;return t??e.children.length>1}function wm(e,t){const n={},r=e.all(t);let i=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++i<r.length;){const s=r[i];if(s.type==="element"&&s.tagName==="li"&&s.properties&&Array.isArray(s.properties.className)&&s.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const a={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,a),e.applyData(t,a)}function Im(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function vm(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function km(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Nm(e,t){const n=e.all(t),r=n.shift(),i=[];if(r){const s={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],s),i.push(s)}if(n.length>0){const s={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},o=At(t.children[1]),u=jr(t.children[t.children.length-1]);o&&u&&(s.position={start:o,end:u}),i.push(s)}const a={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,a),e.applyData(t,a)}function Om(e,t,n){const r=n?n.children:void 0,a=(r?r.indexOf(t):1)===0?"th":"td",s=n&&n.type==="table"?n.align:void 0,o=s?s.length:t.children.length;let u=-1;const c=[];for(;++u<o;){const f=t.children[u],p={},h=s?s[u]:void 0;h&&(p.align=h);let b={type:"element",tagName:a,properties:p,children:[]};f&&(b.children=e.all(f),e.patch(f,b),b=e.applyData(f,b)),c.push(b)}const d={type:"element",tagName:"tr",properties:{},children:e.wrap(c,!0)};return e.patch(t,d),e.applyData(t,d)}function Rm(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const Zs=9,Js=32;function Lm(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),i=0;const a=[];for(;r;)a.push(eo(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return a.push(eo(t.slice(i),i>0,!1)),a.join("")}function eo(e,t,n){let r=0,i=e.length;if(t){let a=e.codePointAt(r);for(;a===Zs||a===Js;)r++,a=e.codePointAt(r)}if(n){let a=e.codePointAt(i-1);for(;a===Zs||a===Js;)i--,a=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function Dm(e,t){const n={type:"text",value:Lm(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function Pm(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const Mm={blockquote:dm,break:fm,code:hm,delete:pm,emphasis:mm,footnoteReference:gm,heading:bm,html:Em,imageReference:Tm,image:ym,inlineCode:xm,linkReference:Sm,link:_m,listItem:Cm,list:wm,paragraph:Im,root:vm,strong:km,table:Nm,tableCell:Rm,tableRow:Om,text:Dm,thematicBreak:Pm,toml:cr,yaml:cr,definition:cr,footnoteDefinition:cr};function cr(){}const Sl=-1,Yr=0,Ar=1,wr=2,Da=3,Pa=4,Ma=5,Ba=6,_l=7,Cl=8,to=typeof self=="object"?self:globalThis,Bm=(e,t)=>{const n=(i,a)=>(e.set(a,i),i),r=i=>{if(e.has(i))return e.get(i);const[a,s]=t[i];switch(a){case Yr:case Sl:return n(s,i);case Ar:{const o=n([],i);for(const u of s)o.push(r(u));return o}case wr:{const o=n({},i);for(const[u,c]of s)o[r(u)]=r(c);return o}case Da:return n(new Date(s),i);case Pa:{const{source:o,flags:u}=s;return n(new RegExp(o,u),i)}case Ma:{const o=n(new Map,i);for(const[u,c]of s)o.set(r(u),r(c));return o}case Ba:{const o=n(new Set,i);for(const u of s)o.add(r(u));return o}case _l:{const{name:o,message:u}=s;return n(new to[o](u),i)}case Cl:return n(BigInt(s),i);case"BigInt":return n(Object(BigInt(s)),i)}return n(new to[a](s),i)};return r},no=e=>Bm(new Map,e)(0),dn="",{toString:Fm}={},{keys:Hm}=Object,Rn=e=>{const t=typeof e;if(t!=="object"||!e)return[Yr,t];const n=Fm.call(e).slice(8,-1);switch(n){case"Array":return[Ar,dn];case"Object":return[wr,dn];case"Date":return[Da,dn];case"RegExp":return[Pa,dn];case"Map":return[Ma,dn];case"Set":return[Ba,dn]}return n.includes("Array")?[Ar,n]:n.includes("Error")?[_l,n]:[wr,n]},dr=([e,t])=>e===Yr&&(t==="function"||t==="symbol"),Um=(e,t,n,r)=>{const i=(s,o)=>{const u=r.push(s)-1;return n.set(o,u),u},a=s=>{if(n.has(s))return n.get(s);let[o,u]=Rn(s);switch(o){case Yr:{let d=s;switch(u){case"bigint":o=Cl,d=s.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+u);d=null;break;case"undefined":return i([Sl],s)}return i([o,d],s)}case Ar:{if(u)return i([u,[...s]],s);const d=[],f=i([o,d],s);for(const p of s)d.push(a(p));return f}case wr:{if(u)switch(u){case"BigInt":return i([u,s.toString()],s);case"Boolean":case"Number":case"String":return i([u,s.valueOf()],s)}if(t&&"toJSON"in s)return a(s.toJSON());const d=[],f=i([o,d],s);for(const p of Hm(s))(e||!dr(Rn(s[p])))&&d.push([a(p),a(s[p])]);return f}case Da:return i([o,s.toISOString()],s);case Pa:{const{source:d,flags:f}=s;return i([o,{source:d,flags:f}],s)}case Ma:{const d=[],f=i([o,d],s);for(const[p,h]of s)(e||!(dr(Rn(p))||dr(Rn(h))))&&d.push([a(p),a(h)]);return f}case Ba:{const d=[],f=i([o,d],s);for(const p of s)(e||!dr(Rn(p)))&&d.push(a(p));return f}}const{message:c}=s;return i([o,{name:u,message:c}],s)};return a},ro=(e,{json:t,lossy:n}={})=>{const r=[];return Um(!(t||n),!!t,new Map,r)(e),r},yn=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?no(ro(e,t)):structuredClone(e):(e,t)=>no(ro(e,t));function jm(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 zm(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function $m(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||jm,r=e.options.footnoteBackLabel||zm,i=e.options.footnoteLabel||"Footnotes",a=e.options.footnoteLabelTagName||"h2",s=e.options.footnoteLabelProperties||{className:["sr-only"]},o=[];let u=-1;for(;++u<e.footnoteOrder.length;){const c=e.footnoteById.get(e.footnoteOrder[u]);if(!c)continue;const d=e.all(c),f=String(c.identifier).toUpperCase(),p=An(f.toLowerCase());let h=0;const b=[],y=e.footnoteCounts.get(f);for(;y!==void 0&&++h<=y;){b.length>0&&b.push({type:"text",value:" "});let k=typeof n=="string"?n:n(u,h);typeof k=="string"&&(k={type:"text",value:k}),b.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+p+(h>1?"-"+h:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(u,h),className:["data-footnote-backref"]},children:Array.isArray(k)?k:[k]})}const w=d[d.length-1];if(w&&w.type==="element"&&w.tagName==="p"){const k=w.children[w.children.length-1];k&&k.type==="text"?k.value+=" ":w.children.push({type:"text",value:" "}),w.children.push(...b)}else d.push(...b);const _={type:"element",tagName:"li",properties:{id:t+"fn-"+p},children:e.wrap(d,!0)};e.patch(c,_),o.push(_)}if(o.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:a,properties:{...yn(s),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:`
55
55
  `},{type:"element",tagName:"ol",properties:{},children:e.wrap(o,!0)},{type:"text",value:`
56
- `}]}}const Br=(function(e){if(e==null)return Km;if(typeof e=="function")return Fr(e);if(typeof e=="object")return Array.isArray(e)?Wm(e):Xm(e);if(typeof e=="string")return Qm(e);throw new Error("Expected function, string, or object as test")});function Wm(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=Br(e[n]);return Fr(r);function r(...i){let a=-1;for(;++a<t.length;)if(t[a].apply(this,i))return!0;return!1}}function Xm(e){const t=e;return Fr(n);function n(r){const i=r;let a;for(a in e)if(i[a]!==t[a])return!1;return!0}}function Qm(e){return Fr(t);function t(n){return n&&n.type===e}}function Fr(e){return t;function t(n,r,i){return!!(Jm(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function Km(){return!0}function Jm(e){return e!==null&&typeof e=="object"&&"type"in e}const Ju=[],Zm=!0,$i=!1,ep="skip";function Zu(e,t,n,r){let i;typeof t=="function"&&typeof n!="function"?(r=n,n=t):i=t;const a=Br(i),s=r?-1:1;o(e,void 0,[])();function o(u,c,d){const f=u&&typeof u=="object"?u:{};if(typeof f.type=="string"){const h=typeof f.tagName=="string"?f.tagName:typeof f.name=="string"?f.name:void 0;Object.defineProperty(m,"name",{value:"node ("+(u.type+(h?"<"+h+">":""))+")"})}return m;function m(){let h=Ju,b,A,w;if((!t||a(u,c,d[d.length-1]||void 0))&&(h=tp(n(u,d)),h[0]===$i))return h;if("children"in u&&u.children){const y=u;if(y.children&&h[0]!==ep)for(A=(r?y.children.length:-1)+s,w=d.concat(y);A>-1&&A<y.children.length;){const _=y.children[A];if(b=o(_,A,w)(),b[0]===$i)return b;A=typeof b[1]=="number"?b[1]:A+s}}return h}}}function tp(e){return Array.isArray(e)?e:typeof e=="number"?[Zm,e]:e==null?Ju:[e]}function Hr(e,t,n,r){let i,a,s;typeof t=="function"&&typeof n!="function"?(a=void 0,s=t,i=n):(a=t,s=n,i=r),Zu(e,a,o,i);function o(u,c){const d=c[c.length-1],f=d?d.children.indexOf(u):void 0;return s(u,f,d)}}const Yi={}.hasOwnProperty,np={};function rp(e,t){const n=t||np,r=new Map,i=new Map,a=new Map,s={...Um,...n.handlers},o={all:c,applyData:ap,definitionById:r,footnoteById:i,footnoteCounts:a,footnoteOrder:[],handlers:s,one:u,options:n,patch:ip,wrap:op};return Hr(e,function(d){if(d.type==="definition"||d.type==="footnoteDefinition"){const f=d.type==="definition"?r:i,m=String(d.identifier).toUpperCase();f.has(m)||f.set(m,d)}}),o;function u(d,f){const m=d.type,h=o.handlers[m];if(Yi.call(o.handlers,m)&&h)return h(o,d,f);if(o.options.passThrough&&o.options.passThrough.includes(m)){if("children"in d){const{children:A,...w}=d,y=pn(w);return y.children=o.all(d),y}return pn(d)}return(o.options.unknownHandler||sp)(o,d,f)}function c(d){const f=[];if("children"in d){const m=d.children;let h=-1;for(;++h<m.length;){const b=o.one(m[h],d);if(b){if(h&&m[h-1].type==="break"&&(!Array.isArray(b)&&b.type==="text"&&(b.value=Ds(b.value)),!Array.isArray(b)&&b.type==="element")){const A=b.children[0];A&&A.type==="text"&&(A.value=Ds(A.value))}Array.isArray(b)?f.push(...b):f.push(b)}}}return f}}function ip(e,t){e.position&&(t.position=Gf(e))}function ap(e,t){let n=t;if(e&&e.data){const r=e.data.hName,i=e.data.hChildren,a=e.data.hProperties;if(typeof r=="string")if(n.type==="element")n.tagName=r;else{const s="children"in n?n.children:[n];n={type:"element",tagName:r,properties:{},children:s}}n.type==="element"&&a&&Object.assign(n.properties,pn(a)),"children"in n&&n.children&&i!==null&&i!==void 0&&(n.children=i)}return n}function sp(e,t){const n=t.data||{},r="value"in t&&!(Yi.call(n,"hProperties")||Yi.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function op(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
56
+ `}]}}const Gr=(function(e){if(e==null)return Vm;if(typeof e=="function")return qr(e);if(typeof e=="object")return Array.isArray(e)?Ym(e):Gm(e);if(typeof e=="string")return qm(e);throw new Error("Expected function, string, or object as test")});function Ym(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=Gr(e[n]);return qr(r);function r(...i){let a=-1;for(;++a<t.length;)if(t[a].apply(this,i))return!0;return!1}}function Gm(e){const t=e;return qr(n);function n(r){const i=r;let a;for(a in e)if(i[a]!==t[a])return!1;return!0}}function qm(e){return qr(t);function t(n){return n&&n.type===e}}function qr(e){return t;function t(n,r,i){return!!(Wm(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function Vm(){return!0}function Wm(e){return e!==null&&typeof e=="object"&&"type"in e}const Al=[],Xm=!0,ra=!1,Qm="skip";function wl(e,t,n,r){let i;typeof t=="function"&&typeof n!="function"?(r=n,n=t):i=t;const a=Gr(i),s=r?-1:1;o(e,void 0,[])();function o(u,c,d){const f=u&&typeof u=="object"?u:{};if(typeof f.type=="string"){const h=typeof f.tagName=="string"?f.tagName:typeof f.name=="string"?f.name:void 0;Object.defineProperty(p,"name",{value:"node ("+(u.type+(h?"<"+h+">":""))+")"})}return p;function p(){let h=Al,b,y,w;if((!t||a(u,c,d[d.length-1]||void 0))&&(h=Km(n(u,d)),h[0]===ra))return h;if("children"in u&&u.children){const _=u;if(_.children&&h[0]!==Qm)for(y=(r?_.children.length:-1)+s,w=d.concat(_);y>-1&&y<_.children.length;){const k=_.children[y];if(b=o(k,y,w)(),b[0]===ra)return b;y=typeof b[1]=="number"?b[1]:y+s}}return h}}}function Km(e){return Array.isArray(e)?e:typeof e=="number"?[Xm,e]:e==null?Al:[e]}function Vr(e,t,n,r){let i,a,s;typeof t=="function"&&typeof n!="function"?(a=void 0,s=t,i=n):(a=t,s=n,i=r),wl(e,a,o,i);function o(u,c){const d=c[c.length-1],f=d?d.children.indexOf(u):void 0;return s(u,f,d)}}const ia={}.hasOwnProperty,Zm={};function Jm(e,t){const n=t||Zm,r=new Map,i=new Map,a=new Map,s={...Mm,...n.handlers},o={all:c,applyData:tg,definitionById:r,footnoteById:i,footnoteCounts:a,footnoteOrder:[],handlers:s,one:u,options:n,patch:eg,wrap:rg};return Vr(e,function(d){if(d.type==="definition"||d.type==="footnoteDefinition"){const f=d.type==="definition"?r:i,p=String(d.identifier).toUpperCase();f.has(p)||f.set(p,d)}}),o;function u(d,f){const p=d.type,h=o.handlers[p];if(ia.call(o.handlers,p)&&h)return h(o,d,f);if(o.options.passThrough&&o.options.passThrough.includes(p)){if("children"in d){const{children:y,...w}=d,_=yn(w);return _.children=o.all(d),_}return yn(d)}return(o.options.unknownHandler||ng)(o,d,f)}function c(d){const f=[];if("children"in d){const p=d.children;let h=-1;for(;++h<p.length;){const b=o.one(p[h],d);if(b){if(h&&p[h-1].type==="break"&&(!Array.isArray(b)&&b.type==="text"&&(b.value=io(b.value)),!Array.isArray(b)&&b.type==="element")){const y=b.children[0];y&&y.type==="text"&&(y.value=io(y.value))}Array.isArray(b)?f.push(...b):f.push(b)}}}return f}}function eg(e,t){e.position&&(t.position=jh(e))}function tg(e,t){let n=t;if(e&&e.data){const r=e.data.hName,i=e.data.hChildren,a=e.data.hProperties;if(typeof r=="string")if(n.type==="element")n.tagName=r;else{const s="children"in n?n.children:[n];n={type:"element",tagName:r,properties:{},children:s}}n.type==="element"&&a&&Object.assign(n.properties,yn(a)),"children"in n&&n.children&&i!==null&&i!==void 0&&(n.children=i)}return n}function ng(e,t){const n=t.data||{},r="value"in t&&!(ia.call(n,"hProperties")||ia.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function rg(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
57
57
  `});++r<e.length;)r&&n.push({type:"text",value:`
58
58
  `}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
59
- `}),n}function Ds(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function Ps(e,t){const n=rp(e,t),r=n.one(e,void 0),i=qm(n),a=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&a.children.push({type:"text",value:`
60
- `},i),a}function up(e,t){return e&&"run"in e?async function(n,r){const i=Ps(n,{file:r,...t});await e.run(i,r)}:function(n,r){return Ps(n,{file:r,...t||e})}}function Ms(e){if(e)throw e}var ii,Bs;function lp(){if(Bs)return ii;Bs=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=function(c){return typeof Array.isArray=="function"?Array.isArray(c):t.call(c)==="[object Array]"},a=function(c){if(!c||t.call(c)!=="[object Object]")return!1;var d=e.call(c,"constructor"),f=c.constructor&&c.constructor.prototype&&e.call(c.constructor.prototype,"isPrototypeOf");if(c.constructor&&!d&&!f)return!1;var m;for(m in c);return typeof m>"u"||e.call(c,m)},s=function(c,d){n&&d.name==="__proto__"?n(c,d.name,{enumerable:!0,configurable:!0,value:d.newValue,writable:!0}):c[d.name]=d.newValue},o=function(c,d){if(d==="__proto__")if(e.call(c,d)){if(r)return r(c,d).value}else return;return c[d]};return ii=function u(){var c,d,f,m,h,b,A=arguments[0],w=1,y=arguments.length,_=!1;for(typeof A=="boolean"&&(_=A,A=arguments[1]||{},w=2),(A==null||typeof A!="object"&&typeof A!="function")&&(A={});w<y;++w)if(c=arguments[w],c!=null)for(d in c)f=o(A,d),m=o(c,d),A!==m&&(_&&m&&(a(m)||(h=i(m)))?(h?(h=!1,b=f&&i(f)?f:[]):b=f&&a(f)?f:{},s(A,{name:d,newValue:u(_,b,m)})):typeof m<"u"&&s(A,{name:d,newValue:m}));return A},ii}var cp=lp();const ai=sa(cp);function Gi(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function dp(){const e=[],t={run:n,use:r};return t;function n(...i){let a=-1;const s=i.pop();if(typeof s!="function")throw new TypeError("Expected function as last argument, not "+s);o(null,...i);function o(u,...c){const d=e[++a];let f=-1;if(u){s(u);return}for(;++f<i.length;)(c[f]===null||c[f]===void 0)&&(c[f]=i[f]);i=c,d?fp(d,o)(...c):s(null,...c)}}function r(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),t}}function fp(e,t){let n;return r;function r(...s){const o=e.length>s.length;let u;o&&s.push(i);try{u=e.apply(this,s)}catch(c){const d=c;if(o&&n)throw d;return i(d)}o||(u&&u.then&&typeof u.then=="function"?u.then(a,i):u instanceof Error?i(u):a(u))}function i(s,...o){n||(n=!0,t(s,...o))}function a(s){i(null,s)}}const ht={basename:hp,dirname:mp,extname:pp,join:gp,sep:"/"};function hp(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Wn(e);let n=0,r=-1,i=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else r<0&&(a=!0,r=i+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let s=-1,o=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else s<0&&(a=!0,s=i+1),o>-1&&(e.codePointAt(i)===t.codePointAt(o--)?o<0&&(r=i):(o=-1,r=s));return n===r?r=s:r<0&&(r=e.length),e.slice(n,r)}function mp(e){if(Wn(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function pp(e){Wn(e);let t=e.length,n=-1,r=0,i=-1,a=0,s;for(;t--;){const o=e.codePointAt(t);if(o===47){if(s){r=t+1;break}continue}n<0&&(s=!0,n=t+1),o===46?i<0?i=t:a!==1&&(a=1):i>-1&&(a=-1)}return i<0||n<0||a===0||a===1&&i===n-1&&i===r+1?"":e.slice(i,n)}function gp(...e){let t=-1,n;for(;++t<e.length;)Wn(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":bp(n)}function bp(e){Wn(e);const t=e.codePointAt(0)===47;let n=Ep(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function Ep(e,t){let n="",r=0,i=-1,a=0,s=-1,o,u;for(;++s<=e.length;){if(s<e.length)o=e.codePointAt(s);else{if(o===47)break;o=47}if(o===47){if(!(i===s-1||a===1))if(i!==s-1&&a===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(u=n.lastIndexOf("/"),u!==n.length-1){u<0?(n="",r=0):(n=n.slice(0,u),r=n.length-1-n.lastIndexOf("/")),i=s,a=0;continue}}else if(n.length>0){n="",r=0,i=s,a=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(i+1,s):n=e.slice(i+1,s),r=s-i-1;i=s,a=0}else o===46&&a>-1?a++:a=-1}return n}function Wn(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const Tp={cwd:xp};function xp(){return"/"}function Vi(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function yp(e){if(typeof e=="string")e=new URL(e);else if(!Vi(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return Ap(e)}function Ap(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const r=t.codePointAt(n+2);if(r===70||r===102){const i=new TypeError("File URL path must not include encoded / characters");throw i.code="ERR_INVALID_FILE_URL_PATH",i}}return decodeURIComponent(t)}const si=["history","path","basename","stem","extname","dirname"];class el{constructor(t){let n;t?Vi(t)?n={path:t}:typeof t=="string"||_p(t)?n={value:t}:n=t:n={},this.cwd=Tp.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<si.length;){const a=si[r];a in n&&n[a]!==void 0&&n[a]!==null&&(this[a]=a==="history"?[...n[a]]:n[a])}let i;for(i in n)si.includes(i)||(this[i]=n[i])}get basename(){return typeof this.path=="string"?ht.basename(this.path):void 0}set basename(t){ui(t,"basename"),oi(t,"basename"),this.path=ht.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?ht.dirname(this.path):void 0}set dirname(t){Fs(this.basename,"dirname"),this.path=ht.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?ht.extname(this.path):void 0}set extname(t){if(oi(t,"extname"),Fs(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=ht.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){Vi(t)&&(t=yp(t)),ui(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?ht.basename(this.path,this.extname):void 0}set stem(t){ui(t,"stem"),oi(t,"stem"),this.path=ht.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const i=this.message(t,n,r);throw i.fatal=!0,i}info(t,n,r){const i=this.message(t,n,r);return i.fatal=void 0,i}message(t,n,r){const i=new je(t,n,r);return this.path&&(i.name=this.path+":"+i.name,i.file=this.path),i.fatal=!1,this.messages.push(i),i}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function oi(e,t){if(e&&e.includes(ht.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+ht.sep+"`")}function ui(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function Fs(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function _p(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const Cp=(function(e){const r=this.constructor.prototype,i=r[e],a=function(){return i.apply(a,arguments)};Object.setPrototypeOf(a,r);const s=Object.getOwnPropertyNames(i);for(const o of s){const u=Object.getOwnPropertyDescriptor(i,o);u&&Object.defineProperty(a,o,u)}return a}),Sp={}.hasOwnProperty;class Ca extends Cp{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=dp()}copy(){const t=new Ca;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(ai(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(di("data",this.frozen),this.namespace[t]=n,this):Sp.call(this.namespace,t)&&this.namespace[t]||void 0:t?(di("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const i=n.call(t,...r);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=ar(t),r=this.parser||this.Parser;return li("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),li("process",this.parser||this.Parser),ci("process",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(a,s){const o=ar(t),u=r.parse(o);r.run(u,o,function(d,f,m){if(d||!f||!m)return c(d);const h=f,b=r.stringify(h,m);Ip(b)?m.value=b:m.result=b,c(d,m)});function c(d,f){d||!f?s(d):a?a(f):n(void 0,f)}}}processSync(t){let n=!1,r;return this.freeze(),li("processSync",this.parser||this.Parser),ci("processSync",this.compiler||this.Compiler),this.process(t,i),Us("processSync","process",n),r;function i(a,s){n=!0,Ms(a),r=s}}run(t,n,r){Hs(t),this.freeze();const i=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?a(void 0,r):new Promise(a);function a(s,o){const u=ar(n);i.run(t,u,c);function c(d,f,m){const h=f||t;d?o(d):s?s(h):r(void 0,h,m)}}}runSync(t,n){let r=!1,i;return this.run(t,n,a),Us("runSync","run",r),i;function a(s,o){Ms(s),i=o,r=!0}}stringify(t,n){this.freeze();const r=ar(n),i=this.compiler||this.Compiler;return ci("stringify",i),Hs(t),i(t,r)}use(t,...n){const r=this.attachers,i=this.namespace;if(di("use",this.frozen),t!=null)if(typeof t=="function")u(t,n);else if(typeof t=="object")Array.isArray(t)?o(t):s(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function a(c){if(typeof c=="function")u(c,[]);else if(typeof c=="object")if(Array.isArray(c)){const[d,...f]=c;u(d,f)}else s(c);else throw new TypeError("Expected usable value, not `"+c+"`")}function s(c){if(!("plugins"in c)&&!("settings"in c))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");o(c.plugins),c.settings&&(i.settings=ai(!0,i.settings,c.settings))}function o(c){let d=-1;if(c!=null)if(Array.isArray(c))for(;++d<c.length;){const f=c[d];a(f)}else throw new TypeError("Expected a list of plugins, not `"+c+"`")}function u(c,d){let f=-1,m=-1;for(;++f<r.length;)if(r[f][0]===c){m=f;break}if(m===-1)r.push([c,...d]);else if(d.length>0){let[h,...b]=d;const A=r[m][1];Gi(A)&&Gi(h)&&(h=ai(!0,A,h)),r[m]=[c,h,...b]}}}}const wp=new Ca().freeze();function li(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function ci(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function di(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 Hs(e){if(!Gi(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function Us(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function ar(e){return vp(e)?e:new el(e)}function vp(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function Ip(e){return typeof e=="string"||Np(e)}function Np(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const kp="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",js=[],zs={allowDangerousHtml:!0},Op=/^(https?|ircs?|mailto|xmpp)$/i,Lp=[{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 tl(e){const t=e.allowedElements,n=e.allowElement,r=e.children||"",i=e.className,a=e.components,s=e.disallowedElements,o=e.rehypePlugins||js,u=e.remarkPlugins||js,c=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...zs}:zs,d=e.skipHtml,f=e.unwrapDisallowed,m=e.urlTransform||Rp,h=wp().use(mm).use(u).use(up,c).use(o),b=new el;typeof r=="string"&&(b.value=r);for(const _ of Lp)Object.hasOwn(e,_.from)&&(""+_.from+(_.to?"use `"+_.to+"` instead":"remove it")+kp+_.id,void 0);const A=h.parse(b);let w=h.runSync(A,b);return i&&(w={type:"element",tagName:"div",properties:{className:i},children:w.type==="root"?w.children:[w]}),Hr(w,y),Kf(w,{Fragment:C.Fragment,components:a,ignoreInvalidStyle:!0,jsx:C.jsx,jsxs:C.jsxs,passKeys:!0,passNode:!0});function y(_,S,D){if(_.type==="raw"&&D&&typeof S=="number")return d?D.children.splice(S,1):D.children[S]={type:"text",value:_.value},S;if(_.type==="element"){let I;for(I in ti)if(Object.hasOwn(ti,I)&&Object.hasOwn(_.properties,I)){const N=_.properties[I],G=ti[I];(G===null||G.includes(_.tagName))&&(_.properties[I]=m(String(N||""),I,_))}}if(_.type==="element"){let I=t?!t.includes(_.tagName):s?s.includes(_.tagName):!1;if(!I&&n&&typeof S=="number"&&(I=!n(_,S,D)),I&&D&&typeof S=="number")return f&&_.children?D.children.splice(S,1,..._.children):D.children.splice(S,1),S}}}function Rp(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),i=e.indexOf("/");return t<0||i>-1&&t>i||n>-1&&t>n||r>-1&&t>r||Op.test(e.slice(0,t))?e:""}const $s=/[#.]/g;function Dp(e,t){const n=e||"",r={};let i=0,a,s;for(;i<n.length;){$s.lastIndex=i;const o=$s.exec(n),u=n.slice(i,o?o.index:n.length);u&&(a?a==="#"?r.id=u:Array.isArray(r.className)?r.className.push(u):r.className=[u]:s=u,i+=u.length),o&&(a=o[0],i++)}return{type:"element",tagName:s||t||"div",properties:r,children:[]}}const Pp=new Set(["button","menu","reset","submit"]),qi={}.hasOwnProperty;function nl(e,t,n){const r=n&&Hp(n);function i(a,s,...o){let u=-1,c;if(a==null){c={type:"root",children:[]};const d=s;o.unshift(d)}else if(c=Dp(a,t),c.tagName=c.tagName.toLowerCase(),r&&qi.call(r,c.tagName)&&(c.tagName=r[c.tagName]),Mp(s,c.tagName)){let d;for(d in s)qi.call(s,d)&&Bp(e,c.properties,d,s[d])}else o.unshift(s);for(;++u<o.length;)Wi(c.children,o[u]);return c.type==="element"&&c.tagName==="template"&&(c.content={type:"root",children:c.children},c.children=[]),c}return i}function Mp(e,t){return e==null||typeof e!="object"||Array.isArray(e)?!1:t==="input"||!e.type||typeof e.type!="string"?!0:"children"in e&&Array.isArray(e.children)?!1:t==="button"?Pp.has(e.type.toLowerCase()):!("value"in e)}function Bp(e,t,n,r){const i=Lr(e,n);let a=-1,s;if(r!=null){if(typeof r=="number"){if(Number.isNaN(r))return;s=r}else typeof r=="boolean"?s=r:typeof r=="string"?i.spaceSeparated?s=ds(r):i.commaSeparated?s=ss(r):i.commaOrSpaceSeparated?s=ds(ss(r).join(" ")):s=Ys(i,i.property,r):Array.isArray(r)?s=r.concat():s=i.property==="style"?Fp(r):String(r);if(Array.isArray(s)){const o=[];for(;++a<s.length;){const u=Ys(i,i.property,s[a]);o[a]=u}s=o}if(i.property==="className"&&Array.isArray(t.className)){const o=s;s=t.className.concat(o)}t[i.property]=s}}function Wi(e,t){let n=-1;if(t!=null)if(typeof t=="string"||typeof t=="number")e.push({type:"text",value:String(t)});else if(Array.isArray(t))for(;++n<t.length;)Wi(e,t[n]);else if(typeof t=="object"&&"type"in t)t.type==="root"?Wi(e,t.children):e.push(t);else throw new Error("Expected node, nodes, or string, got `"+t+"`")}function Ys(e,t,n){if(typeof n=="string"){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===""||Hn(n)===Hn(t)))return!0}return n}function Fp(e){const t=[];let n;for(n in e)qi.call(e,n)&&t.push([n,e[n]].join(": "));return t.join("; ")}function Hp(e){const t={};let n=-1;for(;++n<e.length;)t[e[n].toLowerCase()]=e[n];return t}const Up=["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","solidColor","textArea","textPath"],jp=nl(Vn,"div"),zp=nl(Bt,"g",Up);function $p(e){const t=String(e),n=[];return{toOffset:i,toPoint:r};function r(a){if(typeof a=="number"&&a>-1&&a<=t.length){let s=0;for(;;){let o=n[s];if(o===void 0){const u=Gs(t,n[s-1]);o=u===-1?t.length+1:u+1,n[s]=o}if(o>a)return{line:s+1,column:a-(s>0?n[s-1]:0)+1,offset:a};s++}}}function i(a){if(a&&typeof a.line=="number"&&typeof a.column=="number"&&!Number.isNaN(a.line)&&!Number.isNaN(a.column)){for(;n.length<a.line;){const o=n[n.length-1],u=Gs(t,o),c=u===-1?t.length+1:u+1;if(o===c)break;n.push(c)}const s=(a.line>1?n[a.line-2]:0)+a.column-1;if(s<n[a.line-1])return s}}}function Gs(e,t){const n=e.indexOf("\r",t),r=e.indexOf(`
61
- `,t);return r===-1?n:n===-1||n+1===r?r:n<r?n:r}const Yt={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"},rl={}.hasOwnProperty,Yp=Object.prototype;function Gp(e,t){const n=t||{};return Sa({file:n.file||void 0,location:!1,schema:n.space==="svg"?Bt:Vn,verbose:n.verbose||!1},e)}function Sa(e,t){let n;switch(t.nodeName){case"#comment":{const r=t;return n={type:"comment",value:r.data},hr(e,r,n),n}case"#document":case"#document-fragment":{const r=t,i="mode"in r?r.mode==="quirks"||r.mode==="limited-quirks":!1;if(n={type:"root",children:il(e,t.childNodes),data:{quirksMode:i}},e.file&&e.location){const a=String(e.file),s=$p(a),o=s.toPoint(0),u=s.toPoint(a.length);n.position={start:o,end:u}}return n}case"#documentType":{const r=t;return n={type:"doctype"},hr(e,r,n),n}case"#text":{const r=t;return n={type:"text",value:r.value},hr(e,r,n),n}default:return n=Vp(e,t),n}}function il(e,t){let n=-1;const r=[];for(;++n<t.length;){const i=Sa(e,t[n]);r.push(i)}return r}function Vp(e,t){const n=e.schema;e.schema=t.namespaceURI===Yt.svg?Bt:Vn;let r=-1;const i={};for(;++r<t.attrs.length;){const o=t.attrs[r],u=(o.prefix?o.prefix+":":"")+o.name;rl.call(Yp,u)||(i[u]=o.value)}const s=(e.schema.space==="svg"?zp:jp)(t.tagName,i,il(e,t.childNodes));if(hr(e,t,s),s.tagName==="template"){const o=t,u=o.sourceCodeLocation,c=u&&u.startTag&&dn(u.startTag),d=u&&u.endTag&&dn(u.endTag),f=Sa(e,o.content);c&&d&&e.file&&(f.position={start:c.end,end:d.start}),s.content=f}return e.schema=n,s}function hr(e,t,n){if("sourceCodeLocation"in t&&t.sourceCodeLocation&&e.file){const r=qp(e,n,t.sourceCodeLocation);r&&(e.location=!0,n.position=r)}}function qp(e,t,n){const r=dn(n);if(t.type==="element"){const i=t.children[t.children.length-1];if(r&&!n.endTag&&i&&i.position&&i.position.end&&(r.end=Object.assign({},i.position.end)),e.verbose){const a={};let s;if(n.attrs)for(s in n.attrs)rl.call(n.attrs,s)&&(a[Lr(e.schema,s).property]=dn(n.attrs[s]));n.startTag;const o=dn(n.startTag),u=n.endTag?dn(n.endTag):void 0,c={opening:o};u&&(c.closing=u),c.properties=a,t.data={position:c}}}return r}function dn(e){const t=Vs({line:e.startLine,column:e.startCol,offset:e.startOffset}),n=Vs({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||n?{start:t,end:n}:void 0}function Vs(e){return e.line&&e.column?e:void 0}const qs={}.hasOwnProperty;function al(e,t){const n=t||{};function r(i,...a){let s=r.invalid;const o=r.handlers;if(i&&qs.call(i,e)){const u=String(i[e]);s=qs.call(o,u)?o[u]:r.unknown}if(s)return s.call(this,i,...a)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}const Wp={},Xp={}.hasOwnProperty,sl=al("type",{handlers:{root:Kp,element:ng,text:eg,comment:tg,doctype:Zp}});function Qp(e,t){const r=(t||Wp).space;return sl(e,r==="svg"?Bt:Vn)}function Kp(e,t){const n={nodeName:"#document",mode:(e.data||{}).quirksMode?"quirks":"no-quirks",childNodes:[]};return n.childNodes=wa(e.children,n,t),xn(e,n),n}function Jp(e,t){const n={nodeName:"#document-fragment",childNodes:[]};return n.childNodes=wa(e.children,n,t),xn(e,n),n}function Zp(e){const t={nodeName:"#documentType",name:"html",publicId:"",systemId:"",parentNode:null};return xn(e,t),t}function eg(e){const t={nodeName:"#text",value:e.value,parentNode:null};return xn(e,t),t}function tg(e){const t={nodeName:"#comment",data:e.value,parentNode:null};return xn(e,t),t}function ng(e,t){const n=t;let r=n;e.type==="element"&&e.tagName.toLowerCase()==="svg"&&n.space==="html"&&(r=Bt);const i=[];let a;if(e.properties){for(a in e.properties)if(a!=="children"&&Xp.call(e.properties,a)){const u=rg(r,a,e.properties[a]);u&&i.push(u)}}const s=r.space,o={nodeName:e.tagName,tagName:e.tagName,attrs:i,namespaceURI:Yt[s],childNodes:[],parentNode:null};return o.childNodes=wa(e.children,o,r),xn(e,o),e.tagName==="template"&&e.content&&(o.content=Jp(e.content,r)),o}function rg(e,t,n){const r=Lr(e,t);if(n===!1||n===null||n===void 0||typeof n=="number"&&Number.isNaN(n)||!n&&r.boolean)return;Array.isArray(n)&&(n=r.commaSeparated?Eu(n):vu(n));const i={name:r.attribute,value:n===!0?"":String(n)};if(r.space&&r.space!=="html"&&r.space!=="svg"){const a=i.name.indexOf(":");a<0?i.prefix="":(i.name=i.name.slice(a+1),i.prefix=r.attribute.slice(0,a)),i.namespace=Yt[r.space]}return i}function wa(e,t,n){let r=-1;const i=[];if(e)for(;++r<e.length;){const a=sl(e[r],n);a.parentNode=t,i.push(a)}return i}function xn(e,t){const n=e.position;n&&n.start&&n.end&&(n.start.offset,n.end.offset,t.sourceCodeLocation={startLine:n.start.line,startCol:n.start.column,startOffset:n.start.offset,endLine:n.end.line,endCol:n.end.column,endOffset:n.end.offset})}const ig=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"],ag=new Set([65534,65535,131070,131071,196606,196607,262142,262143,327678,327679,393214,393215,458750,458751,524286,524287,589822,589823,655358,655359,720894,720895,786430,786431,851966,851967,917502,917503,983038,983039,1048574,1048575,1114110,1114111]),Ie="�";var p;(function(e){e[e.EOF=-1]="EOF",e[e.NULL=0]="NULL",e[e.TABULATION=9]="TABULATION",e[e.CARRIAGE_RETURN=13]="CARRIAGE_RETURN",e[e.LINE_FEED=10]="LINE_FEED",e[e.FORM_FEED=12]="FORM_FEED",e[e.SPACE=32]="SPACE",e[e.EXCLAMATION_MARK=33]="EXCLAMATION_MARK",e[e.QUOTATION_MARK=34]="QUOTATION_MARK",e[e.AMPERSAND=38]="AMPERSAND",e[e.APOSTROPHE=39]="APOSTROPHE",e[e.HYPHEN_MINUS=45]="HYPHEN_MINUS",e[e.SOLIDUS=47]="SOLIDUS",e[e.DIGIT_0=48]="DIGIT_0",e[e.DIGIT_9=57]="DIGIT_9",e[e.SEMICOLON=59]="SEMICOLON",e[e.LESS_THAN_SIGN=60]="LESS_THAN_SIGN",e[e.EQUALS_SIGN=61]="EQUALS_SIGN",e[e.GREATER_THAN_SIGN=62]="GREATER_THAN_SIGN",e[e.QUESTION_MARK=63]="QUESTION_MARK",e[e.LATIN_CAPITAL_A=65]="LATIN_CAPITAL_A",e[e.LATIN_CAPITAL_Z=90]="LATIN_CAPITAL_Z",e[e.RIGHT_SQUARE_BRACKET=93]="RIGHT_SQUARE_BRACKET",e[e.GRAVE_ACCENT=96]="GRAVE_ACCENT",e[e.LATIN_SMALL_A=97]="LATIN_SMALL_A",e[e.LATIN_SMALL_Z=122]="LATIN_SMALL_Z"})(p||(p={}));const Xe={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function ol(e){return e>=55296&&e<=57343}function sg(e){return e>=56320&&e<=57343}function og(e,t){return(e-55296)*1024+9216+t}function ul(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function ll(e){return e>=64976&&e<=65007||ag.has(e)}var R;(function(e){e.controlCharacterInInputStream="control-character-in-input-stream",e.noncharacterInInputStream="noncharacter-in-input-stream",e.surrogateInInputStream="surrogate-in-input-stream",e.nonVoidHtmlElementStartTagWithTrailingSolidus="non-void-html-element-start-tag-with-trailing-solidus",e.endTagWithAttributes="end-tag-with-attributes",e.endTagWithTrailingSolidus="end-tag-with-trailing-solidus",e.unexpectedSolidusInTag="unexpected-solidus-in-tag",e.unexpectedNullCharacter="unexpected-null-character",e.unexpectedQuestionMarkInsteadOfTagName="unexpected-question-mark-instead-of-tag-name",e.invalidFirstCharacterOfTagName="invalid-first-character-of-tag-name",e.unexpectedEqualsSignBeforeAttributeName="unexpected-equals-sign-before-attribute-name",e.missingEndTagName="missing-end-tag-name",e.unexpectedCharacterInAttributeName="unexpected-character-in-attribute-name",e.unknownNamedCharacterReference="unknown-named-character-reference",e.missingSemicolonAfterCharacterReference="missing-semicolon-after-character-reference",e.unexpectedCharacterAfterDoctypeSystemIdentifier="unexpected-character-after-doctype-system-identifier",e.unexpectedCharacterInUnquotedAttributeValue="unexpected-character-in-unquoted-attribute-value",e.eofBeforeTagName="eof-before-tag-name",e.eofInTag="eof-in-tag",e.missingAttributeValue="missing-attribute-value",e.missingWhitespaceBetweenAttributes="missing-whitespace-between-attributes",e.missingWhitespaceAfterDoctypePublicKeyword="missing-whitespace-after-doctype-public-keyword",e.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers="missing-whitespace-between-doctype-public-and-system-identifiers",e.missingWhitespaceAfterDoctypeSystemKeyword="missing-whitespace-after-doctype-system-keyword",e.missingQuoteBeforeDoctypePublicIdentifier="missing-quote-before-doctype-public-identifier",e.missingQuoteBeforeDoctypeSystemIdentifier="missing-quote-before-doctype-system-identifier",e.missingDoctypePublicIdentifier="missing-doctype-public-identifier",e.missingDoctypeSystemIdentifier="missing-doctype-system-identifier",e.abruptDoctypePublicIdentifier="abrupt-doctype-public-identifier",e.abruptDoctypeSystemIdentifier="abrupt-doctype-system-identifier",e.cdataInHtmlContent="cdata-in-html-content",e.incorrectlyOpenedComment="incorrectly-opened-comment",e.eofInScriptHtmlCommentLikeText="eof-in-script-html-comment-like-text",e.eofInDoctype="eof-in-doctype",e.nestedComment="nested-comment",e.abruptClosingOfEmptyComment="abrupt-closing-of-empty-comment",e.eofInComment="eof-in-comment",e.incorrectlyClosedComment="incorrectly-closed-comment",e.eofInCdata="eof-in-cdata",e.absenceOfDigitsInNumericCharacterReference="absence-of-digits-in-numeric-character-reference",e.nullCharacterReference="null-character-reference",e.surrogateCharacterReference="surrogate-character-reference",e.characterReferenceOutsideUnicodeRange="character-reference-outside-unicode-range",e.controlCharacterReference="control-character-reference",e.noncharacterCharacterReference="noncharacter-character-reference",e.missingWhitespaceBeforeDoctypeName="missing-whitespace-before-doctype-name",e.missingDoctypeName="missing-doctype-name",e.invalidCharacterSequenceAfterDoctypeName="invalid-character-sequence-after-doctype-name",e.duplicateAttribute="duplicate-attribute",e.nonConformingDoctype="non-conforming-doctype",e.missingDoctype="missing-doctype",e.misplacedDoctype="misplaced-doctype",e.endTagWithoutMatchingOpenElement="end-tag-without-matching-open-element",e.closingOfElementWithOpenChildElements="closing-of-element-with-open-child-elements",e.disallowedContentInNoscriptInHead="disallowed-content-in-noscript-in-head",e.openElementsLeftAfterEof="open-elements-left-after-eof",e.abandonedHeadElementChild="abandoned-head-element-child",e.misplacedStartTagForHeadElement="misplaced-start-tag-for-head-element",e.nestedNoscriptInHead="nested-noscript-in-head",e.eofInElementThatCanContainOnlyText="eof-in-element-that-can-contain-only-text"})(R||(R={}));const ug=65536;class lg{constructor(t){this.handler=t,this.html="",this.pos=-1,this.lastGapPos=-2,this.gapStack=[],this.skipNextNewLine=!1,this.lastChunkWritten=!1,this.endOfChunkHit=!1,this.bufferWaterline=ug,this.isEol=!1,this.lineStartPos=0,this.droppedBufferSize=0,this.line=1,this.lastErrOffset=-1}get col(){return this.pos-this.lineStartPos+ +(this.lastGapPos!==this.pos)}get offset(){return this.droppedBufferSize+this.pos}getError(t,n){const{line:r,col:i,offset:a}=this,s=i+n,o=a+n;return{code:t,startLine:r,endLine:r,startCol:s,endCol:s,startOffset:o,endOffset:o}}_err(t){this.handler.onParseError&&this.lastErrOffset!==this.offset&&(this.lastErrOffset=this.offset,this.handler.onParseError(this.getError(t,0)))}_addGap(){this.gapStack.push(this.lastGapPos),this.lastGapPos=this.pos}_processSurrogate(t){if(this.pos!==this.html.length-1){const n=this.html.charCodeAt(this.pos+1);if(sg(n))return this.pos++,this._addGap(),og(t,n)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,p.EOF;return this._err(R.surrogateInInputStream),t}willDropParsedChunk(){return this.pos>this.bufferWaterline}dropParsedChunk(){this.willDropParsedChunk()&&(this.html=this.html.substring(this.pos),this.lineStartPos-=this.pos,this.droppedBufferSize+=this.pos,this.pos=0,this.lastGapPos=-2,this.gapStack.length=0)}write(t,n){this.html.length>0?this.html+=t:this.html=t,this.endOfChunkHit=!1,this.lastChunkWritten=n}insertHtmlAtCurrentPos(t){this.html=this.html.substring(0,this.pos+1)+t+this.html.substring(this.pos+1),this.endOfChunkHit=!1}startsWith(t,n){if(this.pos+t.length>this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,!1;if(n)return this.html.startsWith(t,this.pos);for(let r=0;r<t.length;r++)if((this.html.charCodeAt(this.pos+r)|32)!==t.charCodeAt(r))return!1;return!0}peek(t){const n=this.pos+t;if(n>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,p.EOF;const r=this.html.charCodeAt(n);return r===p.CARRIAGE_RETURN?p.LINE_FEED:r}advance(){if(this.pos++,this.isEol&&(this.isEol=!1,this.line++,this.lineStartPos=this.pos),this.pos>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,p.EOF;let t=this.html.charCodeAt(this.pos);return t===p.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,p.LINE_FEED):t===p.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,ol(t)&&(t=this._processSurrogate(t)),this.handler.onParseError===null||t>31&&t<127||t===p.LINE_FEED||t===p.CARRIAGE_RETURN||t>159&&t<64976||this._checkForProblematicCharacters(t),t)}_checkForProblematicCharacters(t){ul(t)?this._err(R.controlCharacterInInputStream):ll(t)&&this._err(R.noncharacterInInputStream)}retreat(t){for(this.pos-=t;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}}var ce;(function(e){e[e.CHARACTER=0]="CHARACTER",e[e.NULL_CHARACTER=1]="NULL_CHARACTER",e[e.WHITESPACE_CHARACTER=2]="WHITESPACE_CHARACTER",e[e.START_TAG=3]="START_TAG",e[e.END_TAG=4]="END_TAG",e[e.COMMENT=5]="COMMENT",e[e.DOCTYPE=6]="DOCTYPE",e[e.EOF=7]="EOF",e[e.HIBERNATION=8]="HIBERNATION"})(ce||(ce={}));function cl(e,t){for(let n=e.attrs.length-1;n>=0;n--)if(e.attrs[n].name===t)return e.attrs[n].value;return null}const dl=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏ੊ઑඡ๭༉༦჊ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ὾⁠↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms„‹•˜¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲ΂ϏϢϸontourIntegraìȹoɴ͹\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՗՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲ׌y;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱cò׋؀JTabcdfgorstר׬ׯ׺؀ؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d׷׸䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇܎ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ޷޼߂ߐĀiyޱ޵rc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄΀HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶߻dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣ঳সে্਷ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗ࡜ࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४Ānrࢃ࢏gleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpw৔ਖਛgȀLRlr৞৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼੝੠੷੼અઋ઎p;椅y;䐜Ādl੥੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑ඗ඞcy;䐊cute;䅃ƀaey઴હાron;䅇dil;䅅;䐝ƀgswે૰଎ativeƀMTV૓૟૨ediumSpace;怋hiĀcn૦૘ë૙eryThiî૙tedĀGL૸ଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷ଺reak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪୼஡௫ఄ౞಄ದ೘ൡඅ櫬Āou୛୤ngruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊ஛ement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater΀;EFGLSTஶஷ஽௉௓௘௥扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲௽ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ೒拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨೹setĀ;E೰ೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂ෉෕ෛ෠෧෼ขภยา฿ไlig;䅒cute耻Ó䃓Āiy෎ීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲ෶cr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬื฼de耻Õ䃕es;樷ml耻Ö䃖erĀBP๋๠Āar๐๓r;怾acĀek๚๜;揞et;掴arenthesis;揜Ҁacfhilors๿ງຊຏຒດຝະ໼rtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ໠໤檻cedesȀ;EST່້໏໚扺qual;檯lantEqual;扼ilde;找me;怳Ādp໩໮uct;戏ortionĀ;aȥ໹l;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬؀BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁࿫࿳ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL࿜࿝࿡憒ar;懥eftArrow;懄eiling;按oǵ࿹\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»࿝pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄ቉ቕ቞ቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHc቎ቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗Āeiቻ኉Dzኀ\0ኇefore;戴a;䎘Ācn኎ኘkSpace;쀀  Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0᏿ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0጖y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻፿on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtè૙a;䎖r;愨pf;愤cr;쀀𝒵௡ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚΀;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒΀;Eaeiop዁ᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;e዁ᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;e዁ᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰ᜼ᝃᝈ᝸᝽០៦ᠹᡐᜍ᤽᥈ᥰot;櫭Ācrᛶ᜞kȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e᜚᜛戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;t፜᜷brk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓ᝛ᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯ᝱ᝳ;䎲;愶een;扬r;쀀𝔟g΀costuvwឍឝឳេ៕៛៞ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀako៭ᠦᠵĀcn៲ᠣkƀlst៺֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘᠝斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈؀DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬ᣿ᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教΀;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ᣷᣹᣻᣽;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ᤟;敛;敘;攘;攔΀;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģ᥂bar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;e᜚᜜lƀ;bhᥨᥩᥫ䁜;槅sub;柈Ŭᥴ᥾lĀ;e᥹᥺怢t»᥺pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭍᭒\0᯽\0ᰌƀcpr᦭ᦲ᧝ute;䄇̀;abcdsᦿᧀᧄ᧊᧕᧙戩nd;橄rcup;橉Āau᧏᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r΀;Ecefms᩟᩠ᩢᩫ᪤᪪᪮旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖᪚᪟»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇᫔᫺\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ᫙\0\0᫢aĀ;t᫞᫟䀬;䁀ƀ;fl᫨᫩᫫戁îᅠeĀmx᫱᫶ent»᫩eóɍǧ᫾\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯΀delprvw᭠᭬᭷ᮂᮬᯔ᯹arrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;p᭿ᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰸᰻᰿ᱝᱩᱵᲊᲞᲬᲷ᳻᳿ᴍᵻᶑᶫᶻ᷆᷍rò΁ar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂͸᳖᳜᳠mƀ;oș᳊᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄ὎὚ĀDoḆᴴoôᲉĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»Ṻƀaeiἒ἖Ἒls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙ῜ῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao‌⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧‪‬\0‮耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₟₥₰₴⃰⃵⃺⃿℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕ₝ute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽⃉ƀ;qsؾٌ⃄lanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqr׮ⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0↎proø₞r;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢␧␭␱␵␻ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀஀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼rò৆òΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonó྘quigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d྘➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ᠛旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐௏쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop඄⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roø඄urĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓΀;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨í஘istĀ;s஠டr;쀀𝔫ȀEest௅⩦⩹⩼ƀ;qs஼⩭௡ƀ;qs஼௅⩴lanô௢ií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚΀AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs఻⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs఻⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast୻⭕⭚⭟lleì୻l;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖ΀chimpqu⮽⯍⯙⬄୸⯤⯯Ȁ;cerല⯆ഷ⯉uå൅;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭å೸åഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñ೗Ā;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰⳴ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥ⵲ⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;c᪞ⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācr⵩⵭ir;榿;쀀𝔬ͯ⵹\0\0⵼\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕ⶘ⶥⶨrò᪀Āir⶝ⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔ⷗ǒr;榷rp;榹΀;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ⹞\0⹽\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ⹧⹲຅脀¶;l⹭⹮䂶leìЃɩ⹸\0\0⹻m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳⻴ᤈ⻹⻽⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp໬⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t໻⾴ï໻rel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⿚⋢⿟⿥⿫⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei⿾々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔઀ABHabcdefhilmnoprstux぀けさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤΀cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstw࿜ガクシスゼゾダッデナp;極Ā;f࿠ゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes㄂㄄;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ì࿲âヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘㇤㇮rrowĀ;t࿜ㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowó࿪arpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓rò࿪aòՑ;怏oustĀ;a㈞㈟掱che»㈟mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦΀Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼਴t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì⹯耻­䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;q኱ኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫ਩war;椪lig耻ß䃟௡㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rë๟ƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproø዁im»ኬsðኞĀas㚺㚮ð዁rn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈ΀adempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xô᝷headĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜΀eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roð໻tré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚΀cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜ៟tré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map(e=>e.charCodeAt(0))),cg=new Uint16Array("Ȁaglq \x1Bɭ\0\0p;䀦os;䀧t;䀾t;䀼uot;䀢".split("").map(e=>e.charCodeAt(0)));var fi;const dg=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]),fg=(fi=String.fromCodePoint)!==null&&fi!==void 0?fi:function(e){let t="";return e>65535&&(e-=65536,t+=String.fromCharCode(e>>>10&1023|55296),e=56320|e&1023),t+=String.fromCharCode(e),t};function hg(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=dg.get(e))!==null&&t!==void 0?t:e}var Fe;(function(e){e[e.NUM=35]="NUM",e[e.SEMI=59]="SEMI",e[e.EQUALS=61]="EQUALS",e[e.ZERO=48]="ZERO",e[e.NINE=57]="NINE",e[e.LOWER_A=97]="LOWER_A",e[e.LOWER_F=102]="LOWER_F",e[e.LOWER_X=120]="LOWER_X",e[e.LOWER_Z=122]="LOWER_Z",e[e.UPPER_A=65]="UPPER_A",e[e.UPPER_F=70]="UPPER_F",e[e.UPPER_Z=90]="UPPER_Z"})(Fe||(Fe={}));const mg=32;var Rt;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(Rt||(Rt={}));function Xi(e){return e>=Fe.ZERO&&e<=Fe.NINE}function pg(e){return e>=Fe.UPPER_A&&e<=Fe.UPPER_F||e>=Fe.LOWER_A&&e<=Fe.LOWER_F}function gg(e){return e>=Fe.UPPER_A&&e<=Fe.UPPER_Z||e>=Fe.LOWER_A&&e<=Fe.LOWER_Z||Xi(e)}function bg(e){return e===Fe.EQUALS||gg(e)}var Me;(function(e){e[e.EntityStart=0]="EntityStart",e[e.NumericStart=1]="NumericStart",e[e.NumericDecimal=2]="NumericDecimal",e[e.NumericHex=3]="NumericHex",e[e.NamedEntity=4]="NamedEntity"})(Me||(Me={}));var Ct;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(Ct||(Ct={}));class fl{constructor(t,n,r){this.decodeTree=t,this.emitCodePoint=n,this.errors=r,this.state=Me.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=Ct.Strict}startEntity(t){this.decodeMode=t,this.state=Me.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,n){switch(this.state){case Me.EntityStart:return t.charCodeAt(n)===Fe.NUM?(this.state=Me.NumericStart,this.consumed+=1,this.stateNumericStart(t,n+1)):(this.state=Me.NamedEntity,this.stateNamedEntity(t,n));case Me.NumericStart:return this.stateNumericStart(t,n);case Me.NumericDecimal:return this.stateNumericDecimal(t,n);case Me.NumericHex:return this.stateNumericHex(t,n);case Me.NamedEntity:return this.stateNamedEntity(t,n)}}stateNumericStart(t,n){return n>=t.length?-1:(t.charCodeAt(n)|mg)===Fe.LOWER_X?(this.state=Me.NumericHex,this.consumed+=1,this.stateNumericHex(t,n+1)):(this.state=Me.NumericDecimal,this.stateNumericDecimal(t,n))}addToNumericResult(t,n,r,i){if(n!==r){const a=r-n;this.result=this.result*Math.pow(i,a)+parseInt(t.substr(n,a),i),this.consumed+=a}}stateNumericHex(t,n){const r=n;for(;n<t.length;){const i=t.charCodeAt(n);if(Xi(i)||pg(i))n+=1;else return this.addToNumericResult(t,r,n,16),this.emitNumericEntity(i,3)}return this.addToNumericResult(t,r,n,16),-1}stateNumericDecimal(t,n){const r=n;for(;n<t.length;){const i=t.charCodeAt(n);if(Xi(i))n+=1;else return this.addToNumericResult(t,r,n,10),this.emitNumericEntity(i,2)}return this.addToNumericResult(t,r,n,10),-1}emitNumericEntity(t,n){var r;if(this.consumed<=n)return(r=this.errors)===null||r===void 0||r.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(t===Fe.SEMI)this.consumed+=1;else if(this.decodeMode===Ct.Strict)return 0;return this.emitCodePoint(hg(this.result),this.consumed),this.errors&&(t!==Fe.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(t,n){const{decodeTree:r}=this;let i=r[this.treeIndex],a=(i&Rt.VALUE_LENGTH)>>14;for(;n<t.length;n++,this.excess++){const s=t.charCodeAt(n);if(this.treeIndex=Eg(r,i,this.treeIndex+Math.max(1,a),s),this.treeIndex<0)return this.result===0||this.decodeMode===Ct.Attribute&&(a===0||bg(s))?0:this.emitNotTerminatedNamedEntity();if(i=r[this.treeIndex],a=(i&Rt.VALUE_LENGTH)>>14,a!==0){if(s===Fe.SEMI)return this.emitNamedEntityData(this.treeIndex,a,this.consumed+this.excess);this.decodeMode!==Ct.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var t;const{result:n,decodeTree:r}=this,i=(r[n]&Rt.VALUE_LENGTH)>>14;return this.emitNamedEntityData(n,i,this.consumed),(t=this.errors)===null||t===void 0||t.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(t,n,r){const{decodeTree:i}=this;return this.emitCodePoint(n===1?i[t]&~Rt.VALUE_LENGTH:i[t+1],r),n===3&&this.emitCodePoint(i[t+2],r),r}end(){var t;switch(this.state){case Me.NamedEntity:return this.result!==0&&(this.decodeMode!==Ct.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case Me.NumericDecimal:return this.emitNumericEntity(0,2);case Me.NumericHex:return this.emitNumericEntity(0,3);case Me.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case Me.EntityStart:return 0}}}function hl(e){let t="";const n=new fl(e,r=>t+=fg(r));return function(i,a){let s=0,o=0;for(;(o=i.indexOf("&",o))>=0;){t+=i.slice(s,o),n.startEntity(a);const c=n.write(i,o+1);if(c<0){s=o+n.end();break}s=o+c,o=c===0?s+1:s}const u=t+i.slice(s);return t="",u}}function Eg(e,t,n,r){const i=(t&Rt.BRANCH_LENGTH)>>7,a=t&Rt.JUMP_TABLE;if(i===0)return a!==0&&r===a?n:-1;if(a){const u=r-a;return u<0||u>=i?-1:e[n+u]-1}let s=n,o=s+i-1;for(;s<=o;){const u=s+o>>>1,c=e[u];if(c<r)s=u+1;else if(c>r)o=u-1;else return e[u+i]}return-1}hl(dl);hl(cg);var B;(function(e){e.HTML="http://www.w3.org/1999/xhtml",e.MATHML="http://www.w3.org/1998/Math/MathML",e.SVG="http://www.w3.org/2000/svg",e.XLINK="http://www.w3.org/1999/xlink",e.XML="http://www.w3.org/XML/1998/namespace",e.XMLNS="http://www.w3.org/2000/xmlns/"})(B||(B={}));var Gt;(function(e){e.TYPE="type",e.ACTION="action",e.ENCODING="encoding",e.PROMPT="prompt",e.NAME="name",e.COLOR="color",e.FACE="face",e.SIZE="size"})(Gt||(Gt={}));var rt;(function(e){e.NO_QUIRKS="no-quirks",e.QUIRKS="quirks",e.LIMITED_QUIRKS="limited-quirks"})(rt||(rt={}));var O;(function(e){e.A="a",e.ADDRESS="address",e.ANNOTATION_XML="annotation-xml",e.APPLET="applet",e.AREA="area",e.ARTICLE="article",e.ASIDE="aside",e.B="b",e.BASE="base",e.BASEFONT="basefont",e.BGSOUND="bgsound",e.BIG="big",e.BLOCKQUOTE="blockquote",e.BODY="body",e.BR="br",e.BUTTON="button",e.CAPTION="caption",e.CENTER="center",e.CODE="code",e.COL="col",e.COLGROUP="colgroup",e.DD="dd",e.DESC="desc",e.DETAILS="details",e.DIALOG="dialog",e.DIR="dir",e.DIV="div",e.DL="dl",e.DT="dt",e.EM="em",e.EMBED="embed",e.FIELDSET="fieldset",e.FIGCAPTION="figcaption",e.FIGURE="figure",e.FONT="font",e.FOOTER="footer",e.FOREIGN_OBJECT="foreignObject",e.FORM="form",e.FRAME="frame",e.FRAMESET="frameset",e.H1="h1",e.H2="h2",e.H3="h3",e.H4="h4",e.H5="h5",e.H6="h6",e.HEAD="head",e.HEADER="header",e.HGROUP="hgroup",e.HR="hr",e.HTML="html",e.I="i",e.IMG="img",e.IMAGE="image",e.INPUT="input",e.IFRAME="iframe",e.KEYGEN="keygen",e.LABEL="label",e.LI="li",e.LINK="link",e.LISTING="listing",e.MAIN="main",e.MALIGNMARK="malignmark",e.MARQUEE="marquee",e.MATH="math",e.MENU="menu",e.META="meta",e.MGLYPH="mglyph",e.MI="mi",e.MO="mo",e.MN="mn",e.MS="ms",e.MTEXT="mtext",e.NAV="nav",e.NOBR="nobr",e.NOFRAMES="noframes",e.NOEMBED="noembed",e.NOSCRIPT="noscript",e.OBJECT="object",e.OL="ol",e.OPTGROUP="optgroup",e.OPTION="option",e.P="p",e.PARAM="param",e.PLAINTEXT="plaintext",e.PRE="pre",e.RB="rb",e.RP="rp",e.RT="rt",e.RTC="rtc",e.RUBY="ruby",e.S="s",e.SCRIPT="script",e.SEARCH="search",e.SECTION="section",e.SELECT="select",e.SOURCE="source",e.SMALL="small",e.SPAN="span",e.STRIKE="strike",e.STRONG="strong",e.STYLE="style",e.SUB="sub",e.SUMMARY="summary",e.SUP="sup",e.TABLE="table",e.TBODY="tbody",e.TEMPLATE="template",e.TEXTAREA="textarea",e.TFOOT="tfoot",e.TD="td",e.TH="th",e.THEAD="thead",e.TITLE="title",e.TR="tr",e.TRACK="track",e.TT="tt",e.U="u",e.UL="ul",e.SVG="svg",e.VAR="var",e.WBR="wbr",e.XMP="xmp"})(O||(O={}));var l;(function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.A=1]="A",e[e.ADDRESS=2]="ADDRESS",e[e.ANNOTATION_XML=3]="ANNOTATION_XML",e[e.APPLET=4]="APPLET",e[e.AREA=5]="AREA",e[e.ARTICLE=6]="ARTICLE",e[e.ASIDE=7]="ASIDE",e[e.B=8]="B",e[e.BASE=9]="BASE",e[e.BASEFONT=10]="BASEFONT",e[e.BGSOUND=11]="BGSOUND",e[e.BIG=12]="BIG",e[e.BLOCKQUOTE=13]="BLOCKQUOTE",e[e.BODY=14]="BODY",e[e.BR=15]="BR",e[e.BUTTON=16]="BUTTON",e[e.CAPTION=17]="CAPTION",e[e.CENTER=18]="CENTER",e[e.CODE=19]="CODE",e[e.COL=20]="COL",e[e.COLGROUP=21]="COLGROUP",e[e.DD=22]="DD",e[e.DESC=23]="DESC",e[e.DETAILS=24]="DETAILS",e[e.DIALOG=25]="DIALOG",e[e.DIR=26]="DIR",e[e.DIV=27]="DIV",e[e.DL=28]="DL",e[e.DT=29]="DT",e[e.EM=30]="EM",e[e.EMBED=31]="EMBED",e[e.FIELDSET=32]="FIELDSET",e[e.FIGCAPTION=33]="FIGCAPTION",e[e.FIGURE=34]="FIGURE",e[e.FONT=35]="FONT",e[e.FOOTER=36]="FOOTER",e[e.FOREIGN_OBJECT=37]="FOREIGN_OBJECT",e[e.FORM=38]="FORM",e[e.FRAME=39]="FRAME",e[e.FRAMESET=40]="FRAMESET",e[e.H1=41]="H1",e[e.H2=42]="H2",e[e.H3=43]="H3",e[e.H4=44]="H4",e[e.H5=45]="H5",e[e.H6=46]="H6",e[e.HEAD=47]="HEAD",e[e.HEADER=48]="HEADER",e[e.HGROUP=49]="HGROUP",e[e.HR=50]="HR",e[e.HTML=51]="HTML",e[e.I=52]="I",e[e.IMG=53]="IMG",e[e.IMAGE=54]="IMAGE",e[e.INPUT=55]="INPUT",e[e.IFRAME=56]="IFRAME",e[e.KEYGEN=57]="KEYGEN",e[e.LABEL=58]="LABEL",e[e.LI=59]="LI",e[e.LINK=60]="LINK",e[e.LISTING=61]="LISTING",e[e.MAIN=62]="MAIN",e[e.MALIGNMARK=63]="MALIGNMARK",e[e.MARQUEE=64]="MARQUEE",e[e.MATH=65]="MATH",e[e.MENU=66]="MENU",e[e.META=67]="META",e[e.MGLYPH=68]="MGLYPH",e[e.MI=69]="MI",e[e.MO=70]="MO",e[e.MN=71]="MN",e[e.MS=72]="MS",e[e.MTEXT=73]="MTEXT",e[e.NAV=74]="NAV",e[e.NOBR=75]="NOBR",e[e.NOFRAMES=76]="NOFRAMES",e[e.NOEMBED=77]="NOEMBED",e[e.NOSCRIPT=78]="NOSCRIPT",e[e.OBJECT=79]="OBJECT",e[e.OL=80]="OL",e[e.OPTGROUP=81]="OPTGROUP",e[e.OPTION=82]="OPTION",e[e.P=83]="P",e[e.PARAM=84]="PARAM",e[e.PLAINTEXT=85]="PLAINTEXT",e[e.PRE=86]="PRE",e[e.RB=87]="RB",e[e.RP=88]="RP",e[e.RT=89]="RT",e[e.RTC=90]="RTC",e[e.RUBY=91]="RUBY",e[e.S=92]="S",e[e.SCRIPT=93]="SCRIPT",e[e.SEARCH=94]="SEARCH",e[e.SECTION=95]="SECTION",e[e.SELECT=96]="SELECT",e[e.SOURCE=97]="SOURCE",e[e.SMALL=98]="SMALL",e[e.SPAN=99]="SPAN",e[e.STRIKE=100]="STRIKE",e[e.STRONG=101]="STRONG",e[e.STYLE=102]="STYLE",e[e.SUB=103]="SUB",e[e.SUMMARY=104]="SUMMARY",e[e.SUP=105]="SUP",e[e.TABLE=106]="TABLE",e[e.TBODY=107]="TBODY",e[e.TEMPLATE=108]="TEMPLATE",e[e.TEXTAREA=109]="TEXTAREA",e[e.TFOOT=110]="TFOOT",e[e.TD=111]="TD",e[e.TH=112]="TH",e[e.THEAD=113]="THEAD",e[e.TITLE=114]="TITLE",e[e.TR=115]="TR",e[e.TRACK=116]="TRACK",e[e.TT=117]="TT",e[e.U=118]="U",e[e.UL=119]="UL",e[e.SVG=120]="SVG",e[e.VAR=121]="VAR",e[e.WBR=122]="WBR",e[e.XMP=123]="XMP"})(l||(l={}));const Tg=new Map([[O.A,l.A],[O.ADDRESS,l.ADDRESS],[O.ANNOTATION_XML,l.ANNOTATION_XML],[O.APPLET,l.APPLET],[O.AREA,l.AREA],[O.ARTICLE,l.ARTICLE],[O.ASIDE,l.ASIDE],[O.B,l.B],[O.BASE,l.BASE],[O.BASEFONT,l.BASEFONT],[O.BGSOUND,l.BGSOUND],[O.BIG,l.BIG],[O.BLOCKQUOTE,l.BLOCKQUOTE],[O.BODY,l.BODY],[O.BR,l.BR],[O.BUTTON,l.BUTTON],[O.CAPTION,l.CAPTION],[O.CENTER,l.CENTER],[O.CODE,l.CODE],[O.COL,l.COL],[O.COLGROUP,l.COLGROUP],[O.DD,l.DD],[O.DESC,l.DESC],[O.DETAILS,l.DETAILS],[O.DIALOG,l.DIALOG],[O.DIR,l.DIR],[O.DIV,l.DIV],[O.DL,l.DL],[O.DT,l.DT],[O.EM,l.EM],[O.EMBED,l.EMBED],[O.FIELDSET,l.FIELDSET],[O.FIGCAPTION,l.FIGCAPTION],[O.FIGURE,l.FIGURE],[O.FONT,l.FONT],[O.FOOTER,l.FOOTER],[O.FOREIGN_OBJECT,l.FOREIGN_OBJECT],[O.FORM,l.FORM],[O.FRAME,l.FRAME],[O.FRAMESET,l.FRAMESET],[O.H1,l.H1],[O.H2,l.H2],[O.H3,l.H3],[O.H4,l.H4],[O.H5,l.H5],[O.H6,l.H6],[O.HEAD,l.HEAD],[O.HEADER,l.HEADER],[O.HGROUP,l.HGROUP],[O.HR,l.HR],[O.HTML,l.HTML],[O.I,l.I],[O.IMG,l.IMG],[O.IMAGE,l.IMAGE],[O.INPUT,l.INPUT],[O.IFRAME,l.IFRAME],[O.KEYGEN,l.KEYGEN],[O.LABEL,l.LABEL],[O.LI,l.LI],[O.LINK,l.LINK],[O.LISTING,l.LISTING],[O.MAIN,l.MAIN],[O.MALIGNMARK,l.MALIGNMARK],[O.MARQUEE,l.MARQUEE],[O.MATH,l.MATH],[O.MENU,l.MENU],[O.META,l.META],[O.MGLYPH,l.MGLYPH],[O.MI,l.MI],[O.MO,l.MO],[O.MN,l.MN],[O.MS,l.MS],[O.MTEXT,l.MTEXT],[O.NAV,l.NAV],[O.NOBR,l.NOBR],[O.NOFRAMES,l.NOFRAMES],[O.NOEMBED,l.NOEMBED],[O.NOSCRIPT,l.NOSCRIPT],[O.OBJECT,l.OBJECT],[O.OL,l.OL],[O.OPTGROUP,l.OPTGROUP],[O.OPTION,l.OPTION],[O.P,l.P],[O.PARAM,l.PARAM],[O.PLAINTEXT,l.PLAINTEXT],[O.PRE,l.PRE],[O.RB,l.RB],[O.RP,l.RP],[O.RT,l.RT],[O.RTC,l.RTC],[O.RUBY,l.RUBY],[O.S,l.S],[O.SCRIPT,l.SCRIPT],[O.SEARCH,l.SEARCH],[O.SECTION,l.SECTION],[O.SELECT,l.SELECT],[O.SOURCE,l.SOURCE],[O.SMALL,l.SMALL],[O.SPAN,l.SPAN],[O.STRIKE,l.STRIKE],[O.STRONG,l.STRONG],[O.STYLE,l.STYLE],[O.SUB,l.SUB],[O.SUMMARY,l.SUMMARY],[O.SUP,l.SUP],[O.TABLE,l.TABLE],[O.TBODY,l.TBODY],[O.TEMPLATE,l.TEMPLATE],[O.TEXTAREA,l.TEXTAREA],[O.TFOOT,l.TFOOT],[O.TD,l.TD],[O.TH,l.TH],[O.THEAD,l.THEAD],[O.TITLE,l.TITLE],[O.TR,l.TR],[O.TRACK,l.TRACK],[O.TT,l.TT],[O.U,l.U],[O.UL,l.UL],[O.SVG,l.SVG],[O.VAR,l.VAR],[O.WBR,l.WBR],[O.XMP,l.XMP]]);function yn(e){var t;return(t=Tg.get(e))!==null&&t!==void 0?t:l.UNKNOWN}const F=l,xg={[B.HTML]:new Set([F.ADDRESS,F.APPLET,F.AREA,F.ARTICLE,F.ASIDE,F.BASE,F.BASEFONT,F.BGSOUND,F.BLOCKQUOTE,F.BODY,F.BR,F.BUTTON,F.CAPTION,F.CENTER,F.COL,F.COLGROUP,F.DD,F.DETAILS,F.DIR,F.DIV,F.DL,F.DT,F.EMBED,F.FIELDSET,F.FIGCAPTION,F.FIGURE,F.FOOTER,F.FORM,F.FRAME,F.FRAMESET,F.H1,F.H2,F.H3,F.H4,F.H5,F.H6,F.HEAD,F.HEADER,F.HGROUP,F.HR,F.HTML,F.IFRAME,F.IMG,F.INPUT,F.LI,F.LINK,F.LISTING,F.MAIN,F.MARQUEE,F.MENU,F.META,F.NAV,F.NOEMBED,F.NOFRAMES,F.NOSCRIPT,F.OBJECT,F.OL,F.P,F.PARAM,F.PLAINTEXT,F.PRE,F.SCRIPT,F.SECTION,F.SELECT,F.SOURCE,F.STYLE,F.SUMMARY,F.TABLE,F.TBODY,F.TD,F.TEMPLATE,F.TEXTAREA,F.TFOOT,F.TH,F.THEAD,F.TITLE,F.TR,F.TRACK,F.UL,F.WBR,F.XMP]),[B.MATHML]:new Set([F.MI,F.MO,F.MN,F.MS,F.MTEXT,F.ANNOTATION_XML]),[B.SVG]:new Set([F.TITLE,F.FOREIGN_OBJECT,F.DESC]),[B.XLINK]:new Set,[B.XML]:new Set,[B.XMLNS]:new Set},Qi=new Set([F.H1,F.H2,F.H3,F.H4,F.H5,F.H6]);O.STYLE,O.SCRIPT,O.XMP,O.IFRAME,O.NOEMBED,O.NOFRAMES,O.PLAINTEXT;var E;(function(e){e[e.DATA=0]="DATA",e[e.RCDATA=1]="RCDATA",e[e.RAWTEXT=2]="RAWTEXT",e[e.SCRIPT_DATA=3]="SCRIPT_DATA",e[e.PLAINTEXT=4]="PLAINTEXT",e[e.TAG_OPEN=5]="TAG_OPEN",e[e.END_TAG_OPEN=6]="END_TAG_OPEN",e[e.TAG_NAME=7]="TAG_NAME",e[e.RCDATA_LESS_THAN_SIGN=8]="RCDATA_LESS_THAN_SIGN",e[e.RCDATA_END_TAG_OPEN=9]="RCDATA_END_TAG_OPEN",e[e.RCDATA_END_TAG_NAME=10]="RCDATA_END_TAG_NAME",e[e.RAWTEXT_LESS_THAN_SIGN=11]="RAWTEXT_LESS_THAN_SIGN",e[e.RAWTEXT_END_TAG_OPEN=12]="RAWTEXT_END_TAG_OPEN",e[e.RAWTEXT_END_TAG_NAME=13]="RAWTEXT_END_TAG_NAME",e[e.SCRIPT_DATA_LESS_THAN_SIGN=14]="SCRIPT_DATA_LESS_THAN_SIGN",e[e.SCRIPT_DATA_END_TAG_OPEN=15]="SCRIPT_DATA_END_TAG_OPEN",e[e.SCRIPT_DATA_END_TAG_NAME=16]="SCRIPT_DATA_END_TAG_NAME",e[e.SCRIPT_DATA_ESCAPE_START=17]="SCRIPT_DATA_ESCAPE_START",e[e.SCRIPT_DATA_ESCAPE_START_DASH=18]="SCRIPT_DATA_ESCAPE_START_DASH",e[e.SCRIPT_DATA_ESCAPED=19]="SCRIPT_DATA_ESCAPED",e[e.SCRIPT_DATA_ESCAPED_DASH=20]="SCRIPT_DATA_ESCAPED_DASH",e[e.SCRIPT_DATA_ESCAPED_DASH_DASH=21]="SCRIPT_DATA_ESCAPED_DASH_DASH",e[e.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN=22]="SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN",e[e.SCRIPT_DATA_ESCAPED_END_TAG_OPEN=23]="SCRIPT_DATA_ESCAPED_END_TAG_OPEN",e[e.SCRIPT_DATA_ESCAPED_END_TAG_NAME=24]="SCRIPT_DATA_ESCAPED_END_TAG_NAME",e[e.SCRIPT_DATA_DOUBLE_ESCAPE_START=25]="SCRIPT_DATA_DOUBLE_ESCAPE_START",e[e.SCRIPT_DATA_DOUBLE_ESCAPED=26]="SCRIPT_DATA_DOUBLE_ESCAPED",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH=27]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH=28]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN=29]="SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN",e[e.SCRIPT_DATA_DOUBLE_ESCAPE_END=30]="SCRIPT_DATA_DOUBLE_ESCAPE_END",e[e.BEFORE_ATTRIBUTE_NAME=31]="BEFORE_ATTRIBUTE_NAME",e[e.ATTRIBUTE_NAME=32]="ATTRIBUTE_NAME",e[e.AFTER_ATTRIBUTE_NAME=33]="AFTER_ATTRIBUTE_NAME",e[e.BEFORE_ATTRIBUTE_VALUE=34]="BEFORE_ATTRIBUTE_VALUE",e[e.ATTRIBUTE_VALUE_DOUBLE_QUOTED=35]="ATTRIBUTE_VALUE_DOUBLE_QUOTED",e[e.ATTRIBUTE_VALUE_SINGLE_QUOTED=36]="ATTRIBUTE_VALUE_SINGLE_QUOTED",e[e.ATTRIBUTE_VALUE_UNQUOTED=37]="ATTRIBUTE_VALUE_UNQUOTED",e[e.AFTER_ATTRIBUTE_VALUE_QUOTED=38]="AFTER_ATTRIBUTE_VALUE_QUOTED",e[e.SELF_CLOSING_START_TAG=39]="SELF_CLOSING_START_TAG",e[e.BOGUS_COMMENT=40]="BOGUS_COMMENT",e[e.MARKUP_DECLARATION_OPEN=41]="MARKUP_DECLARATION_OPEN",e[e.COMMENT_START=42]="COMMENT_START",e[e.COMMENT_START_DASH=43]="COMMENT_START_DASH",e[e.COMMENT=44]="COMMENT",e[e.COMMENT_LESS_THAN_SIGN=45]="COMMENT_LESS_THAN_SIGN",e[e.COMMENT_LESS_THAN_SIGN_BANG=46]="COMMENT_LESS_THAN_SIGN_BANG",e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH=47]="COMMENT_LESS_THAN_SIGN_BANG_DASH",e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH=48]="COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH",e[e.COMMENT_END_DASH=49]="COMMENT_END_DASH",e[e.COMMENT_END=50]="COMMENT_END",e[e.COMMENT_END_BANG=51]="COMMENT_END_BANG",e[e.DOCTYPE=52]="DOCTYPE",e[e.BEFORE_DOCTYPE_NAME=53]="BEFORE_DOCTYPE_NAME",e[e.DOCTYPE_NAME=54]="DOCTYPE_NAME",e[e.AFTER_DOCTYPE_NAME=55]="AFTER_DOCTYPE_NAME",e[e.AFTER_DOCTYPE_PUBLIC_KEYWORD=56]="AFTER_DOCTYPE_PUBLIC_KEYWORD",e[e.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER=57]="BEFORE_DOCTYPE_PUBLIC_IDENTIFIER",e[e.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED=58]="DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED",e[e.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED=59]="DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED",e[e.AFTER_DOCTYPE_PUBLIC_IDENTIFIER=60]="AFTER_DOCTYPE_PUBLIC_IDENTIFIER",e[e.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS=61]="BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS",e[e.AFTER_DOCTYPE_SYSTEM_KEYWORD=62]="AFTER_DOCTYPE_SYSTEM_KEYWORD",e[e.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER=63]="BEFORE_DOCTYPE_SYSTEM_IDENTIFIER",e[e.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED=64]="DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED",e[e.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED=65]="DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED",e[e.AFTER_DOCTYPE_SYSTEM_IDENTIFIER=66]="AFTER_DOCTYPE_SYSTEM_IDENTIFIER",e[e.BOGUS_DOCTYPE=67]="BOGUS_DOCTYPE",e[e.CDATA_SECTION=68]="CDATA_SECTION",e[e.CDATA_SECTION_BRACKET=69]="CDATA_SECTION_BRACKET",e[e.CDATA_SECTION_END=70]="CDATA_SECTION_END",e[e.CHARACTER_REFERENCE=71]="CHARACTER_REFERENCE",e[e.AMBIGUOUS_AMPERSAND=72]="AMBIGUOUS_AMPERSAND"})(E||(E={}));const Oe={DATA:E.DATA,RCDATA:E.RCDATA,RAWTEXT:E.RAWTEXT,SCRIPT_DATA:E.SCRIPT_DATA,PLAINTEXT:E.PLAINTEXT,CDATA_SECTION:E.CDATA_SECTION};function yg(e){return e>=p.DIGIT_0&&e<=p.DIGIT_9}function Nn(e){return e>=p.LATIN_CAPITAL_A&&e<=p.LATIN_CAPITAL_Z}function Ag(e){return e>=p.LATIN_SMALL_A&&e<=p.LATIN_SMALL_Z}function Ot(e){return Ag(e)||Nn(e)}function Ws(e){return Ot(e)||yg(e)}function sr(e){return e+32}function ml(e){return e===p.SPACE||e===p.LINE_FEED||e===p.TABULATION||e===p.FORM_FEED}function Xs(e){return ml(e)||e===p.SOLIDUS||e===p.GREATER_THAN_SIGN}function _g(e){return e===p.NULL?R.nullCharacterReference:e>1114111?R.characterReferenceOutsideUnicodeRange:ol(e)?R.surrogateCharacterReference:ll(e)?R.noncharacterCharacterReference:ul(e)||e===p.CARRIAGE_RETURN?R.controlCharacterReference:null}class Cg{constructor(t,n){this.options=t,this.handler=n,this.paused=!1,this.inLoop=!1,this.inForeignNode=!1,this.lastStartTagName="",this.active=!1,this.state=E.DATA,this.returnState=E.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new lg(n),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new fl(dl,(r,i)=>{this.preprocessor.pos=this.entityStartPos+i-1,this._flushCodePointConsumedAsCharacterReference(r)},n.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(R.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:r=>{this._err(R.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+r)},validateNumericCharacterReference:r=>{const i=_g(r);i&&this._err(i,1)}}:void 0)}_err(t,n=0){var r,i;(i=(r=this.handler).onParseError)===null||i===void 0||i.call(r,this.preprocessor.getError(t,n))}getCurrentLocation(t){return this.options.sourceCodeLocationInfo?{startLine:this.preprocessor.line,startCol:this.preprocessor.col-t,startOffset:this.preprocessor.offset-t,endLine:-1,endCol:-1,endOffset:-1}:null}_runParsingLoop(){if(!this.inLoop){for(this.inLoop=!0;this.active&&!this.paused;){this.consumedAfterSnapshot=0;const t=this._consume();this._ensureHibernation()||this._callState(t)}this.inLoop=!1}}pause(){this.paused=!0}resume(t){if(!this.paused)throw new Error("Parser was already resumed");this.paused=!1,!this.inLoop&&(this._runParsingLoop(),this.paused||t?.())}write(t,n,r){this.active=!0,this.preprocessor.write(t,n),this._runParsingLoop(),this.paused||r?.()}insertHtmlAtCurrentPos(t){this.active=!0,this.preprocessor.insertHtmlAtCurrentPos(t),this._runParsingLoop()}_ensureHibernation(){return this.preprocessor.endOfChunkHit?(this.preprocessor.retreat(this.consumedAfterSnapshot),this.consumedAfterSnapshot=0,this.active=!1,!0):!1}_consume(){return this.consumedAfterSnapshot++,this.preprocessor.advance()}_advanceBy(t){this.consumedAfterSnapshot+=t;for(let n=0;n<t;n++)this.preprocessor.advance()}_consumeSequenceIfMatch(t,n){return this.preprocessor.startsWith(t,n)?(this._advanceBy(t.length-1),!0):!1}_createStartTagToken(){this.currentToken={type:ce.START_TAG,tagName:"",tagID:l.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:ce.END_TAG,tagName:"",tagID:l.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(t){this.currentToken={type:ce.COMMENT,data:"",location:this.getCurrentLocation(t)}}_createDoctypeToken(t){this.currentToken={type:ce.DOCTYPE,name:t,forceQuirks:!1,publicId:null,systemId:null,location:this.currentLocation}}_createCharacterToken(t,n){this.currentCharacterToken={type:t,chars:n,location:this.currentLocation}}_createAttr(t){this.currentAttr={name:t,value:""},this.currentLocation=this.getCurrentLocation(0)}_leaveAttrName(){var t,n;const r=this.currentToken;if(cl(r,this.currentAttr.name)===null){if(r.attrs.push(this.currentAttr),r.location&&this.currentLocation){const i=(t=(n=r.location).attrs)!==null&&t!==void 0?t:n.attrs=Object.create(null);i[this.currentAttr.name]=this.currentLocation,this._leaveAttrValue()}}else this._err(R.duplicateAttribute)}_leaveAttrValue(){this.currentLocation&&(this.currentLocation.endLine=this.preprocessor.line,this.currentLocation.endCol=this.preprocessor.col,this.currentLocation.endOffset=this.preprocessor.offset)}prepareToken(t){this._emitCurrentCharacterToken(t.location),this.currentToken=null,t.location&&(t.location.endLine=this.preprocessor.line,t.location.endCol=this.preprocessor.col+1,t.location.endOffset=this.preprocessor.offset+1),this.currentLocation=this.getCurrentLocation(-1)}emitCurrentTagToken(){const t=this.currentToken;this.prepareToken(t),t.tagID=yn(t.tagName),t.type===ce.START_TAG?(this.lastStartTagName=t.tagName,this.handler.onStartTag(t)):(t.attrs.length>0&&this._err(R.endTagWithAttributes),t.selfClosing&&this._err(R.endTagWithTrailingSolidus),this.handler.onEndTag(t)),this.preprocessor.dropParsedChunk()}emitCurrentComment(t){this.prepareToken(t),this.handler.onComment(t),this.preprocessor.dropParsedChunk()}emitCurrentDoctype(t){this.prepareToken(t),this.handler.onDoctype(t),this.preprocessor.dropParsedChunk()}_emitCurrentCharacterToken(t){if(this.currentCharacterToken){switch(t&&this.currentCharacterToken.location&&(this.currentCharacterToken.location.endLine=t.startLine,this.currentCharacterToken.location.endCol=t.startCol,this.currentCharacterToken.location.endOffset=t.startOffset),this.currentCharacterToken.type){case ce.CHARACTER:{this.handler.onCharacter(this.currentCharacterToken);break}case ce.NULL_CHARACTER:{this.handler.onNullCharacter(this.currentCharacterToken);break}case ce.WHITESPACE_CHARACTER:{this.handler.onWhitespaceCharacter(this.currentCharacterToken);break}}this.currentCharacterToken=null}}_emitEOFToken(){const t=this.getCurrentLocation(0);t&&(t.endLine=t.startLine,t.endCol=t.startCol,t.endOffset=t.startOffset),this._emitCurrentCharacterToken(t),this.handler.onEof({type:ce.EOF,location:t}),this.active=!1}_appendCharToCurrentCharacterToken(t,n){if(this.currentCharacterToken)if(this.currentCharacterToken.type===t){this.currentCharacterToken.chars+=n;return}else this.currentLocation=this.getCurrentLocation(0),this._emitCurrentCharacterToken(this.currentLocation),this.preprocessor.dropParsedChunk();this._createCharacterToken(t,n)}_emitCodePoint(t){const n=ml(t)?ce.WHITESPACE_CHARACTER:t===p.NULL?ce.NULL_CHARACTER:ce.CHARACTER;this._appendCharToCurrentCharacterToken(n,String.fromCodePoint(t))}_emitChars(t){this._appendCharToCurrentCharacterToken(ce.CHARACTER,t)}_startCharacterReference(){this.returnState=this.state,this.state=E.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?Ct.Attribute:Ct.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===E.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===E.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===E.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(t){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(t):this._emitCodePoint(t)}_callState(t){switch(this.state){case E.DATA:{this._stateData(t);break}case E.RCDATA:{this._stateRcdata(t);break}case E.RAWTEXT:{this._stateRawtext(t);break}case E.SCRIPT_DATA:{this._stateScriptData(t);break}case E.PLAINTEXT:{this._statePlaintext(t);break}case E.TAG_OPEN:{this._stateTagOpen(t);break}case E.END_TAG_OPEN:{this._stateEndTagOpen(t);break}case E.TAG_NAME:{this._stateTagName(t);break}case E.RCDATA_LESS_THAN_SIGN:{this._stateRcdataLessThanSign(t);break}case E.RCDATA_END_TAG_OPEN:{this._stateRcdataEndTagOpen(t);break}case E.RCDATA_END_TAG_NAME:{this._stateRcdataEndTagName(t);break}case E.RAWTEXT_LESS_THAN_SIGN:{this._stateRawtextLessThanSign(t);break}case E.RAWTEXT_END_TAG_OPEN:{this._stateRawtextEndTagOpen(t);break}case E.RAWTEXT_END_TAG_NAME:{this._stateRawtextEndTagName(t);break}case E.SCRIPT_DATA_LESS_THAN_SIGN:{this._stateScriptDataLessThanSign(t);break}case E.SCRIPT_DATA_END_TAG_OPEN:{this._stateScriptDataEndTagOpen(t);break}case E.SCRIPT_DATA_END_TAG_NAME:{this._stateScriptDataEndTagName(t);break}case E.SCRIPT_DATA_ESCAPE_START:{this._stateScriptDataEscapeStart(t);break}case E.SCRIPT_DATA_ESCAPE_START_DASH:{this._stateScriptDataEscapeStartDash(t);break}case E.SCRIPT_DATA_ESCAPED:{this._stateScriptDataEscaped(t);break}case E.SCRIPT_DATA_ESCAPED_DASH:{this._stateScriptDataEscapedDash(t);break}case E.SCRIPT_DATA_ESCAPED_DASH_DASH:{this._stateScriptDataEscapedDashDash(t);break}case E.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataEscapedLessThanSign(t);break}case E.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:{this._stateScriptDataEscapedEndTagOpen(t);break}case E.SCRIPT_DATA_ESCAPED_END_TAG_NAME:{this._stateScriptDataEscapedEndTagName(t);break}case E.SCRIPT_DATA_DOUBLE_ESCAPE_START:{this._stateScriptDataDoubleEscapeStart(t);break}case E.SCRIPT_DATA_DOUBLE_ESCAPED:{this._stateScriptDataDoubleEscaped(t);break}case E.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:{this._stateScriptDataDoubleEscapedDash(t);break}case E.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:{this._stateScriptDataDoubleEscapedDashDash(t);break}case E.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataDoubleEscapedLessThanSign(t);break}case E.SCRIPT_DATA_DOUBLE_ESCAPE_END:{this._stateScriptDataDoubleEscapeEnd(t);break}case E.BEFORE_ATTRIBUTE_NAME:{this._stateBeforeAttributeName(t);break}case E.ATTRIBUTE_NAME:{this._stateAttributeName(t);break}case E.AFTER_ATTRIBUTE_NAME:{this._stateAfterAttributeName(t);break}case E.BEFORE_ATTRIBUTE_VALUE:{this._stateBeforeAttributeValue(t);break}case E.ATTRIBUTE_VALUE_DOUBLE_QUOTED:{this._stateAttributeValueDoubleQuoted(t);break}case E.ATTRIBUTE_VALUE_SINGLE_QUOTED:{this._stateAttributeValueSingleQuoted(t);break}case E.ATTRIBUTE_VALUE_UNQUOTED:{this._stateAttributeValueUnquoted(t);break}case E.AFTER_ATTRIBUTE_VALUE_QUOTED:{this._stateAfterAttributeValueQuoted(t);break}case E.SELF_CLOSING_START_TAG:{this._stateSelfClosingStartTag(t);break}case E.BOGUS_COMMENT:{this._stateBogusComment(t);break}case E.MARKUP_DECLARATION_OPEN:{this._stateMarkupDeclarationOpen(t);break}case E.COMMENT_START:{this._stateCommentStart(t);break}case E.COMMENT_START_DASH:{this._stateCommentStartDash(t);break}case E.COMMENT:{this._stateComment(t);break}case E.COMMENT_LESS_THAN_SIGN:{this._stateCommentLessThanSign(t);break}case E.COMMENT_LESS_THAN_SIGN_BANG:{this._stateCommentLessThanSignBang(t);break}case E.COMMENT_LESS_THAN_SIGN_BANG_DASH:{this._stateCommentLessThanSignBangDash(t);break}case E.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:{this._stateCommentLessThanSignBangDashDash(t);break}case E.COMMENT_END_DASH:{this._stateCommentEndDash(t);break}case E.COMMENT_END:{this._stateCommentEnd(t);break}case E.COMMENT_END_BANG:{this._stateCommentEndBang(t);break}case E.DOCTYPE:{this._stateDoctype(t);break}case E.BEFORE_DOCTYPE_NAME:{this._stateBeforeDoctypeName(t);break}case E.DOCTYPE_NAME:{this._stateDoctypeName(t);break}case E.AFTER_DOCTYPE_NAME:{this._stateAfterDoctypeName(t);break}case E.AFTER_DOCTYPE_PUBLIC_KEYWORD:{this._stateAfterDoctypePublicKeyword(t);break}case E.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateBeforeDoctypePublicIdentifier(t);break}case E.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypePublicIdentifierDoubleQuoted(t);break}case E.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypePublicIdentifierSingleQuoted(t);break}case E.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateAfterDoctypePublicIdentifier(t);break}case E.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:{this._stateBetweenDoctypePublicAndSystemIdentifiers(t);break}case E.AFTER_DOCTYPE_SYSTEM_KEYWORD:{this._stateAfterDoctypeSystemKeyword(t);break}case E.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateBeforeDoctypeSystemIdentifier(t);break}case E.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypeSystemIdentifierDoubleQuoted(t);break}case E.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypeSystemIdentifierSingleQuoted(t);break}case E.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateAfterDoctypeSystemIdentifier(t);break}case E.BOGUS_DOCTYPE:{this._stateBogusDoctype(t);break}case E.CDATA_SECTION:{this._stateCdataSection(t);break}case E.CDATA_SECTION_BRACKET:{this._stateCdataSectionBracket(t);break}case E.CDATA_SECTION_END:{this._stateCdataSectionEnd(t);break}case E.CHARACTER_REFERENCE:{this._stateCharacterReference();break}case E.AMBIGUOUS_AMPERSAND:{this._stateAmbiguousAmpersand(t);break}default:throw new Error("Unknown state")}}_stateData(t){switch(t){case p.LESS_THAN_SIGN:{this.state=E.TAG_OPEN;break}case p.AMPERSAND:{this._startCharacterReference();break}case p.NULL:{this._err(R.unexpectedNullCharacter),this._emitCodePoint(t);break}case p.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRcdata(t){switch(t){case p.AMPERSAND:{this._startCharacterReference();break}case p.LESS_THAN_SIGN:{this.state=E.RCDATA_LESS_THAN_SIGN;break}case p.NULL:{this._err(R.unexpectedNullCharacter),this._emitChars(Ie);break}case p.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRawtext(t){switch(t){case p.LESS_THAN_SIGN:{this.state=E.RAWTEXT_LESS_THAN_SIGN;break}case p.NULL:{this._err(R.unexpectedNullCharacter),this._emitChars(Ie);break}case p.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptData(t){switch(t){case p.LESS_THAN_SIGN:{this.state=E.SCRIPT_DATA_LESS_THAN_SIGN;break}case p.NULL:{this._err(R.unexpectedNullCharacter),this._emitChars(Ie);break}case p.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_statePlaintext(t){switch(t){case p.NULL:{this._err(R.unexpectedNullCharacter),this._emitChars(Ie);break}case p.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateTagOpen(t){if(Ot(t))this._createStartTagToken(),this.state=E.TAG_NAME,this._stateTagName(t);else switch(t){case p.EXCLAMATION_MARK:{this.state=E.MARKUP_DECLARATION_OPEN;break}case p.SOLIDUS:{this.state=E.END_TAG_OPEN;break}case p.QUESTION_MARK:{this._err(R.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=E.BOGUS_COMMENT,this._stateBogusComment(t);break}case p.EOF:{this._err(R.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break}default:this._err(R.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=E.DATA,this._stateData(t)}}_stateEndTagOpen(t){if(Ot(t))this._createEndTagToken(),this.state=E.TAG_NAME,this._stateTagName(t);else switch(t){case p.GREATER_THAN_SIGN:{this._err(R.missingEndTagName),this.state=E.DATA;break}case p.EOF:{this._err(R.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break}default:this._err(R.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=E.BOGUS_COMMENT,this._stateBogusComment(t)}}_stateTagName(t){const n=this.currentToken;switch(t){case p.SPACE:case p.LINE_FEED:case p.TABULATION:case p.FORM_FEED:{this.state=E.BEFORE_ATTRIBUTE_NAME;break}case p.SOLIDUS:{this.state=E.SELF_CLOSING_START_TAG;break}case p.GREATER_THAN_SIGN:{this.state=E.DATA,this.emitCurrentTagToken();break}case p.NULL:{this._err(R.unexpectedNullCharacter),n.tagName+=Ie;break}case p.EOF:{this._err(R.eofInTag),this._emitEOFToken();break}default:n.tagName+=String.fromCodePoint(Nn(t)?sr(t):t)}}_stateRcdataLessThanSign(t){t===p.SOLIDUS?this.state=E.RCDATA_END_TAG_OPEN:(this._emitChars("<"),this.state=E.RCDATA,this._stateRcdata(t))}_stateRcdataEndTagOpen(t){Ot(t)?(this.state=E.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(t)):(this._emitChars("</"),this.state=E.RCDATA,this._stateRcdata(t))}handleSpecialEndTag(t){if(!this.preprocessor.startsWith(this.lastStartTagName,!1))return!this._ensureHibernation();this._createEndTagToken();const n=this.currentToken;switch(n.tagName=this.lastStartTagName,this.preprocessor.peek(this.lastStartTagName.length)){case p.SPACE:case p.LINE_FEED:case p.TABULATION:case p.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=E.BEFORE_ATTRIBUTE_NAME,!1;case p.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=E.SELF_CLOSING_START_TAG,!1;case p.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=E.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=E.RCDATA,this._stateRcdata(t))}_stateRawtextLessThanSign(t){t===p.SOLIDUS?this.state=E.RAWTEXT_END_TAG_OPEN:(this._emitChars("<"),this.state=E.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagOpen(t){Ot(t)?(this.state=E.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(t)):(this._emitChars("</"),this.state=E.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=E.RAWTEXT,this._stateRawtext(t))}_stateScriptDataLessThanSign(t){switch(t){case p.SOLIDUS:{this.state=E.SCRIPT_DATA_END_TAG_OPEN;break}case p.EXCLAMATION_MARK:{this.state=E.SCRIPT_DATA_ESCAPE_START,this._emitChars("<!");break}default:this._emitChars("<"),this.state=E.SCRIPT_DATA,this._stateScriptData(t)}}_stateScriptDataEndTagOpen(t){Ot(t)?(this.state=E.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(t)):(this._emitChars("</"),this.state=E.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=E.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStart(t){t===p.HYPHEN_MINUS?(this.state=E.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars("-")):(this.state=E.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStartDash(t){t===p.HYPHEN_MINUS?(this.state=E.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-")):(this.state=E.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscaped(t){switch(t){case p.HYPHEN_MINUS:{this.state=E.SCRIPT_DATA_ESCAPED_DASH,this._emitChars("-");break}case p.LESS_THAN_SIGN:{this.state=E.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case p.NULL:{this._err(R.unexpectedNullCharacter),this._emitChars(Ie);break}case p.EOF:{this._err(R.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataEscapedDash(t){switch(t){case p.HYPHEN_MINUS:{this.state=E.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-");break}case p.LESS_THAN_SIGN:{this.state=E.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case p.NULL:{this._err(R.unexpectedNullCharacter),this.state=E.SCRIPT_DATA_ESCAPED,this._emitChars(Ie);break}case p.EOF:{this._err(R.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=E.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedDashDash(t){switch(t){case p.HYPHEN_MINUS:{this._emitChars("-");break}case p.LESS_THAN_SIGN:{this.state=E.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case p.GREATER_THAN_SIGN:{this.state=E.SCRIPT_DATA,this._emitChars(">");break}case p.NULL:{this._err(R.unexpectedNullCharacter),this.state=E.SCRIPT_DATA_ESCAPED,this._emitChars(Ie);break}case p.EOF:{this._err(R.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=E.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedLessThanSign(t){t===p.SOLIDUS?this.state=E.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:Ot(t)?(this._emitChars("<"),this.state=E.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(t)):(this._emitChars("<"),this.state=E.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagOpen(t){Ot(t)?(this.state=E.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(t)):(this._emitChars("</"),this.state=E.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=E.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscapeStart(t){if(this.preprocessor.startsWith(Xe.SCRIPT,!1)&&Xs(this.preprocessor.peek(Xe.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<Xe.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=E.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=E.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscaped(t){switch(t){case p.HYPHEN_MINUS:{this.state=E.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars("-");break}case p.LESS_THAN_SIGN:{this.state=E.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case p.NULL:{this._err(R.unexpectedNullCharacter),this._emitChars(Ie);break}case p.EOF:{this._err(R.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDash(t){switch(t){case p.HYPHEN_MINUS:{this.state=E.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars("-");break}case p.LESS_THAN_SIGN:{this.state=E.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case p.NULL:{this._err(R.unexpectedNullCharacter),this.state=E.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(Ie);break}case p.EOF:{this._err(R.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=E.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDashDash(t){switch(t){case p.HYPHEN_MINUS:{this._emitChars("-");break}case p.LESS_THAN_SIGN:{this.state=E.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case p.GREATER_THAN_SIGN:{this.state=E.SCRIPT_DATA,this._emitChars(">");break}case p.NULL:{this._err(R.unexpectedNullCharacter),this.state=E.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(Ie);break}case p.EOF:{this._err(R.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=E.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedLessThanSign(t){t===p.SOLIDUS?(this.state=E.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=E.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateScriptDataDoubleEscapeEnd(t){if(this.preprocessor.startsWith(Xe.SCRIPT,!1)&&Xs(this.preprocessor.peek(Xe.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<Xe.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=E.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=E.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateBeforeAttributeName(t){switch(t){case p.SPACE:case p.LINE_FEED:case p.TABULATION:case p.FORM_FEED:break;case p.SOLIDUS:case p.GREATER_THAN_SIGN:case p.EOF:{this.state=E.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case p.EQUALS_SIGN:{this._err(R.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=E.ATTRIBUTE_NAME;break}default:this._createAttr(""),this.state=E.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateAttributeName(t){switch(t){case p.SPACE:case p.LINE_FEED:case p.TABULATION:case p.FORM_FEED:case p.SOLIDUS:case p.GREATER_THAN_SIGN:case p.EOF:{this._leaveAttrName(),this.state=E.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case p.EQUALS_SIGN:{this._leaveAttrName(),this.state=E.BEFORE_ATTRIBUTE_VALUE;break}case p.QUOTATION_MARK:case p.APOSTROPHE:case p.LESS_THAN_SIGN:{this._err(R.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(t);break}case p.NULL:{this._err(R.unexpectedNullCharacter),this.currentAttr.name+=Ie;break}default:this.currentAttr.name+=String.fromCodePoint(Nn(t)?sr(t):t)}}_stateAfterAttributeName(t){switch(t){case p.SPACE:case p.LINE_FEED:case p.TABULATION:case p.FORM_FEED:break;case p.SOLIDUS:{this.state=E.SELF_CLOSING_START_TAG;break}case p.EQUALS_SIGN:{this.state=E.BEFORE_ATTRIBUTE_VALUE;break}case p.GREATER_THAN_SIGN:{this.state=E.DATA,this.emitCurrentTagToken();break}case p.EOF:{this._err(R.eofInTag),this._emitEOFToken();break}default:this._createAttr(""),this.state=E.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateBeforeAttributeValue(t){switch(t){case p.SPACE:case p.LINE_FEED:case p.TABULATION:case p.FORM_FEED:break;case p.QUOTATION_MARK:{this.state=E.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break}case p.APOSTROPHE:{this.state=E.ATTRIBUTE_VALUE_SINGLE_QUOTED;break}case p.GREATER_THAN_SIGN:{this._err(R.missingAttributeValue),this.state=E.DATA,this.emitCurrentTagToken();break}default:this.state=E.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(t)}}_stateAttributeValueDoubleQuoted(t){switch(t){case p.QUOTATION_MARK:{this.state=E.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case p.AMPERSAND:{this._startCharacterReference();break}case p.NULL:{this._err(R.unexpectedNullCharacter),this.currentAttr.value+=Ie;break}case p.EOF:{this._err(R.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueSingleQuoted(t){switch(t){case p.APOSTROPHE:{this.state=E.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case p.AMPERSAND:{this._startCharacterReference();break}case p.NULL:{this._err(R.unexpectedNullCharacter),this.currentAttr.value+=Ie;break}case p.EOF:{this._err(R.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueUnquoted(t){switch(t){case p.SPACE:case p.LINE_FEED:case p.TABULATION:case p.FORM_FEED:{this._leaveAttrValue(),this.state=E.BEFORE_ATTRIBUTE_NAME;break}case p.AMPERSAND:{this._startCharacterReference();break}case p.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=E.DATA,this.emitCurrentTagToken();break}case p.NULL:{this._err(R.unexpectedNullCharacter),this.currentAttr.value+=Ie;break}case p.QUOTATION_MARK:case p.APOSTROPHE:case p.LESS_THAN_SIGN:case p.EQUALS_SIGN:case p.GRAVE_ACCENT:{this._err(R.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(t);break}case p.EOF:{this._err(R.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAfterAttributeValueQuoted(t){switch(t){case p.SPACE:case p.LINE_FEED:case p.TABULATION:case p.FORM_FEED:{this._leaveAttrValue(),this.state=E.BEFORE_ATTRIBUTE_NAME;break}case p.SOLIDUS:{this._leaveAttrValue(),this.state=E.SELF_CLOSING_START_TAG;break}case p.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=E.DATA,this.emitCurrentTagToken();break}case p.EOF:{this._err(R.eofInTag),this._emitEOFToken();break}default:this._err(R.missingWhitespaceBetweenAttributes),this.state=E.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateSelfClosingStartTag(t){switch(t){case p.GREATER_THAN_SIGN:{const n=this.currentToken;n.selfClosing=!0,this.state=E.DATA,this.emitCurrentTagToken();break}case p.EOF:{this._err(R.eofInTag),this._emitEOFToken();break}default:this._err(R.unexpectedSolidusInTag),this.state=E.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateBogusComment(t){const n=this.currentToken;switch(t){case p.GREATER_THAN_SIGN:{this.state=E.DATA,this.emitCurrentComment(n);break}case p.EOF:{this.emitCurrentComment(n),this._emitEOFToken();break}case p.NULL:{this._err(R.unexpectedNullCharacter),n.data+=Ie;break}default:n.data+=String.fromCodePoint(t)}}_stateMarkupDeclarationOpen(t){this._consumeSequenceIfMatch(Xe.DASH_DASH,!0)?(this._createCommentToken(Xe.DASH_DASH.length+1),this.state=E.COMMENT_START):this._consumeSequenceIfMatch(Xe.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(Xe.DOCTYPE.length+1),this.state=E.DOCTYPE):this._consumeSequenceIfMatch(Xe.CDATA_START,!0)?this.inForeignNode?this.state=E.CDATA_SECTION:(this._err(R.cdataInHtmlContent),this._createCommentToken(Xe.CDATA_START.length+1),this.currentToken.data="[CDATA[",this.state=E.BOGUS_COMMENT):this._ensureHibernation()||(this._err(R.incorrectlyOpenedComment),this._createCommentToken(2),this.state=E.BOGUS_COMMENT,this._stateBogusComment(t))}_stateCommentStart(t){switch(t){case p.HYPHEN_MINUS:{this.state=E.COMMENT_START_DASH;break}case p.GREATER_THAN_SIGN:{this._err(R.abruptClosingOfEmptyComment),this.state=E.DATA;const n=this.currentToken;this.emitCurrentComment(n);break}default:this.state=E.COMMENT,this._stateComment(t)}}_stateCommentStartDash(t){const n=this.currentToken;switch(t){case p.HYPHEN_MINUS:{this.state=E.COMMENT_END;break}case p.GREATER_THAN_SIGN:{this._err(R.abruptClosingOfEmptyComment),this.state=E.DATA,this.emitCurrentComment(n);break}case p.EOF:{this._err(R.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=E.COMMENT,this._stateComment(t)}}_stateComment(t){const n=this.currentToken;switch(t){case p.HYPHEN_MINUS:{this.state=E.COMMENT_END_DASH;break}case p.LESS_THAN_SIGN:{n.data+="<",this.state=E.COMMENT_LESS_THAN_SIGN;break}case p.NULL:{this._err(R.unexpectedNullCharacter),n.data+=Ie;break}case p.EOF:{this._err(R.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+=String.fromCodePoint(t)}}_stateCommentLessThanSign(t){const n=this.currentToken;switch(t){case p.EXCLAMATION_MARK:{n.data+="!",this.state=E.COMMENT_LESS_THAN_SIGN_BANG;break}case p.LESS_THAN_SIGN:{n.data+="<";break}default:this.state=E.COMMENT,this._stateComment(t)}}_stateCommentLessThanSignBang(t){t===p.HYPHEN_MINUS?this.state=E.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=E.COMMENT,this._stateComment(t))}_stateCommentLessThanSignBangDash(t){t===p.HYPHEN_MINUS?this.state=E.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=E.COMMENT_END_DASH,this._stateCommentEndDash(t))}_stateCommentLessThanSignBangDashDash(t){t!==p.GREATER_THAN_SIGN&&t!==p.EOF&&this._err(R.nestedComment),this.state=E.COMMENT_END,this._stateCommentEnd(t)}_stateCommentEndDash(t){const n=this.currentToken;switch(t){case p.HYPHEN_MINUS:{this.state=E.COMMENT_END;break}case p.EOF:{this._err(R.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=E.COMMENT,this._stateComment(t)}}_stateCommentEnd(t){const n=this.currentToken;switch(t){case p.GREATER_THAN_SIGN:{this.state=E.DATA,this.emitCurrentComment(n);break}case p.EXCLAMATION_MARK:{this.state=E.COMMENT_END_BANG;break}case p.HYPHEN_MINUS:{n.data+="-";break}case p.EOF:{this._err(R.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--",this.state=E.COMMENT,this._stateComment(t)}}_stateCommentEndBang(t){const n=this.currentToken;switch(t){case p.HYPHEN_MINUS:{n.data+="--!",this.state=E.COMMENT_END_DASH;break}case p.GREATER_THAN_SIGN:{this._err(R.incorrectlyClosedComment),this.state=E.DATA,this.emitCurrentComment(n);break}case p.EOF:{this._err(R.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--!",this.state=E.COMMENT,this._stateComment(t)}}_stateDoctype(t){switch(t){case p.SPACE:case p.LINE_FEED:case p.TABULATION:case p.FORM_FEED:{this.state=E.BEFORE_DOCTYPE_NAME;break}case p.GREATER_THAN_SIGN:{this.state=E.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t);break}case p.EOF:{this._err(R.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(R.missingWhitespaceBeforeDoctypeName),this.state=E.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t)}}_stateBeforeDoctypeName(t){if(Nn(t))this._createDoctypeToken(String.fromCharCode(sr(t))),this.state=E.DOCTYPE_NAME;else switch(t){case p.SPACE:case p.LINE_FEED:case p.TABULATION:case p.FORM_FEED:break;case p.NULL:{this._err(R.unexpectedNullCharacter),this._createDoctypeToken(Ie),this.state=E.DOCTYPE_NAME;break}case p.GREATER_THAN_SIGN:{this._err(R.missingDoctypeName),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=E.DATA;break}case p.EOF:{this._err(R.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._createDoctypeToken(String.fromCodePoint(t)),this.state=E.DOCTYPE_NAME}}_stateDoctypeName(t){const n=this.currentToken;switch(t){case p.SPACE:case p.LINE_FEED:case p.TABULATION:case p.FORM_FEED:{this.state=E.AFTER_DOCTYPE_NAME;break}case p.GREATER_THAN_SIGN:{this.state=E.DATA,this.emitCurrentDoctype(n);break}case p.NULL:{this._err(R.unexpectedNullCharacter),n.name+=Ie;break}case p.EOF:{this._err(R.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.name+=String.fromCodePoint(Nn(t)?sr(t):t)}}_stateAfterDoctypeName(t){const n=this.currentToken;switch(t){case p.SPACE:case p.LINE_FEED:case p.TABULATION:case p.FORM_FEED:break;case p.GREATER_THAN_SIGN:{this.state=E.DATA,this.emitCurrentDoctype(n);break}case p.EOF:{this._err(R.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._consumeSequenceIfMatch(Xe.PUBLIC,!1)?this.state=E.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(Xe.SYSTEM,!1)?this.state=E.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(R.invalidCharacterSequenceAfterDoctypeName),n.forceQuirks=!0,this.state=E.BOGUS_DOCTYPE,this._stateBogusDoctype(t))}}_stateAfterDoctypePublicKeyword(t){const n=this.currentToken;switch(t){case p.SPACE:case p.LINE_FEED:case p.TABULATION:case p.FORM_FEED:{this.state=E.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break}case p.QUOTATION_MARK:{this._err(R.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=E.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case p.APOSTROPHE:{this._err(R.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=E.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case p.GREATER_THAN_SIGN:{this._err(R.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=E.DATA,this.emitCurrentDoctype(n);break}case p.EOF:{this._err(R.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(R.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=E.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case p.SPACE:case p.LINE_FEED:case p.TABULATION:case p.FORM_FEED:break;case p.QUOTATION_MARK:{n.publicId="",this.state=E.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case p.APOSTROPHE:{n.publicId="",this.state=E.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case p.GREATER_THAN_SIGN:{this._err(R.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=E.DATA,this.emitCurrentDoctype(n);break}case p.EOF:{this._err(R.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(R.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=E.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypePublicIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case p.QUOTATION_MARK:{this.state=E.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case p.NULL:{this._err(R.unexpectedNullCharacter),n.publicId+=Ie;break}case p.GREATER_THAN_SIGN:{this._err(R.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=E.DATA;break}case p.EOF:{this._err(R.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.publicId+=String.fromCodePoint(t)}}_stateDoctypePublicIdentifierSingleQuoted(t){const n=this.currentToken;switch(t){case p.APOSTROPHE:{this.state=E.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case p.NULL:{this._err(R.unexpectedNullCharacter),n.publicId+=Ie;break}case p.GREATER_THAN_SIGN:{this._err(R.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=E.DATA;break}case p.EOF:{this._err(R.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.publicId+=String.fromCodePoint(t)}}_stateAfterDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case p.SPACE:case p.LINE_FEED:case p.TABULATION:case p.FORM_FEED:{this.state=E.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break}case p.GREATER_THAN_SIGN:{this.state=E.DATA,this.emitCurrentDoctype(n);break}case p.QUOTATION_MARK:{this._err(R.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=E.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case p.APOSTROPHE:{this._err(R.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=E.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case p.EOF:{this._err(R.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(R.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=E.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBetweenDoctypePublicAndSystemIdentifiers(t){const n=this.currentToken;switch(t){case p.SPACE:case p.LINE_FEED:case p.TABULATION:case p.FORM_FEED:break;case p.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=E.DATA;break}case p.QUOTATION_MARK:{n.systemId="",this.state=E.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case p.APOSTROPHE:{n.systemId="",this.state=E.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case p.EOF:{this._err(R.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(R.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=E.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateAfterDoctypeSystemKeyword(t){const n=this.currentToken;switch(t){case p.SPACE:case p.LINE_FEED:case p.TABULATION:case p.FORM_FEED:{this.state=E.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break}case p.QUOTATION_MARK:{this._err(R.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=E.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case p.APOSTROPHE:{this._err(R.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=E.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case p.GREATER_THAN_SIGN:{this._err(R.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=E.DATA,this.emitCurrentDoctype(n);break}case p.EOF:{this._err(R.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(R.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=E.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case p.SPACE:case p.LINE_FEED:case p.TABULATION:case p.FORM_FEED:break;case p.QUOTATION_MARK:{n.systemId="",this.state=E.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case p.APOSTROPHE:{n.systemId="",this.state=E.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case p.GREATER_THAN_SIGN:{this._err(R.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=E.DATA,this.emitCurrentDoctype(n);break}case p.EOF:{this._err(R.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(R.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=E.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypeSystemIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case p.QUOTATION_MARK:{this.state=E.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case p.NULL:{this._err(R.unexpectedNullCharacter),n.systemId+=Ie;break}case p.GREATER_THAN_SIGN:{this._err(R.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=E.DATA;break}case p.EOF:{this._err(R.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.systemId+=String.fromCodePoint(t)}}_stateDoctypeSystemIdentifierSingleQuoted(t){const n=this.currentToken;switch(t){case p.APOSTROPHE:{this.state=E.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case p.NULL:{this._err(R.unexpectedNullCharacter),n.systemId+=Ie;break}case p.GREATER_THAN_SIGN:{this._err(R.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=E.DATA;break}case p.EOF:{this._err(R.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.systemId+=String.fromCodePoint(t)}}_stateAfterDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case p.SPACE:case p.LINE_FEED:case p.TABULATION:case p.FORM_FEED:break;case p.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=E.DATA;break}case p.EOF:{this._err(R.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(R.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=E.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBogusDoctype(t){const n=this.currentToken;switch(t){case p.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=E.DATA;break}case p.NULL:{this._err(R.unexpectedNullCharacter);break}case p.EOF:{this.emitCurrentDoctype(n),this._emitEOFToken();break}}}_stateCdataSection(t){switch(t){case p.RIGHT_SQUARE_BRACKET:{this.state=E.CDATA_SECTION_BRACKET;break}case p.EOF:{this._err(R.eofInCdata),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateCdataSectionBracket(t){t===p.RIGHT_SQUARE_BRACKET?this.state=E.CDATA_SECTION_END:(this._emitChars("]"),this.state=E.CDATA_SECTION,this._stateCdataSection(t))}_stateCdataSectionEnd(t){switch(t){case p.GREATER_THAN_SIGN:{this.state=E.DATA;break}case p.RIGHT_SQUARE_BRACKET:{this._emitChars("]");break}default:this._emitChars("]]"),this.state=E.CDATA_SECTION,this._stateCdataSection(t)}}_stateCharacterReference(){let t=this.entityDecoder.write(this.preprocessor.html,this.preprocessor.pos);if(t<0)if(this.preprocessor.lastChunkWritten)t=this.entityDecoder.end();else{this.active=!1,this.preprocessor.pos=this.preprocessor.html.length-1,this.consumedAfterSnapshot=0,this.preprocessor.endOfChunkHit=!0;return}t===0?(this.preprocessor.pos=this.entityStartPos,this._flushCodePointConsumedAsCharacterReference(p.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&Ws(this.preprocessor.peek(1))?E.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(t){Ws(t)?this._flushCodePointConsumedAsCharacterReference(t):(t===p.SEMICOLON&&this._err(R.unknownNamedCharacterReference),this.state=this.returnState,this._callState(t))}}const pl=new Set([l.DD,l.DT,l.LI,l.OPTGROUP,l.OPTION,l.P,l.RB,l.RP,l.RT,l.RTC]),Qs=new Set([...pl,l.CAPTION,l.COLGROUP,l.TBODY,l.TD,l.TFOOT,l.TH,l.THEAD,l.TR]),Tr=new Set([l.APPLET,l.CAPTION,l.HTML,l.MARQUEE,l.OBJECT,l.TABLE,l.TD,l.TEMPLATE,l.TH]),Sg=new Set([...Tr,l.OL,l.UL]),wg=new Set([...Tr,l.BUTTON]),Ks=new Set([l.ANNOTATION_XML,l.MI,l.MN,l.MO,l.MS,l.MTEXT]),Js=new Set([l.DESC,l.FOREIGN_OBJECT,l.TITLE]),vg=new Set([l.TR,l.TEMPLATE,l.HTML]),Ig=new Set([l.TBODY,l.TFOOT,l.THEAD,l.TEMPLATE,l.HTML]),Ng=new Set([l.TABLE,l.TEMPLATE,l.HTML]),kg=new Set([l.TD,l.TH]);class Og{get currentTmplContentOrNode(){return this._isInTemplate()?this.treeAdapter.getTemplateContent(this.current):this.current}constructor(t,n,r){this.treeAdapter=n,this.handler=r,this.items=[],this.tagIDs=[],this.stackTop=-1,this.tmplCount=0,this.currentTagId=l.UNKNOWN,this.current=t}_indexOf(t){return this.items.lastIndexOf(t,this.stackTop)}_isInTemplate(){return this.currentTagId===l.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===B.HTML}_updateCurrentElement(){this.current=this.items[this.stackTop],this.currentTagId=this.tagIDs[this.stackTop]}push(t,n){this.stackTop++,this.items[this.stackTop]=t,this.current=t,this.tagIDs[this.stackTop]=n,this.currentTagId=n,this._isInTemplate()&&this.tmplCount++,this.handler.onItemPush(t,n,!0)}pop(){const t=this.current;this.tmplCount>0&&this._isInTemplate()&&this.tmplCount--,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!0)}replace(t,n){const r=this._indexOf(t);this.items[r]=n,r===this.stackTop&&(this.current=n)}insertAfter(t,n,r){const i=this._indexOf(t)+1;this.items.splice(i,0,n),this.tagIDs.splice(i,0,r),this.stackTop++,i===this.stackTop&&this._updateCurrentElement(),this.handler.onItemPush(this.current,this.currentTagId,i===this.stackTop)}popUntilTagNamePopped(t){let n=this.stackTop+1;do n=this.tagIDs.lastIndexOf(t,n-1);while(n>0&&this.treeAdapter.getNamespaceURI(this.items[n])!==B.HTML);this.shortenToLength(n<0?0:n)}shortenToLength(t){for(;this.stackTop>=t;){const n=this.current;this.tmplCount>0&&this._isInTemplate()&&(this.tmplCount-=1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(n,this.stackTop<t)}}popUntilElementPopped(t){const n=this._indexOf(t);this.shortenToLength(n<0?0:n)}popUntilPopped(t,n){const r=this._indexOfTagNames(t,n);this.shortenToLength(r<0?0:r)}popUntilNumberedHeaderPopped(){this.popUntilPopped(Qi,B.HTML)}popUntilTableCellPopped(){this.popUntilPopped(kg,B.HTML)}popAllUpToHtmlElement(){this.tmplCount=0,this.shortenToLength(1)}_indexOfTagNames(t,n){for(let r=this.stackTop;r>=0;r--)if(t.has(this.tagIDs[r])&&this.treeAdapter.getNamespaceURI(this.items[r])===n)return r;return-1}clearBackTo(t,n){const r=this._indexOfTagNames(t,n);this.shortenToLength(r+1)}clearBackToTableContext(){this.clearBackTo(Ng,B.HTML)}clearBackToTableBodyContext(){this.clearBackTo(Ig,B.HTML)}clearBackToTableRowContext(){this.clearBackTo(vg,B.HTML)}remove(t){const n=this._indexOf(t);n>=0&&(n===this.stackTop?this.pop():(this.items.splice(n,1),this.tagIDs.splice(n,1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!1)))}tryPeekProperlyNestedBodyElement(){return this.stackTop>=1&&this.tagIDs[1]===l.BODY?this.items[1]:null}contains(t){return this._indexOf(t)>-1}getCommonAncestor(t){const n=this._indexOf(t)-1;return n>=0?this.items[n]:null}isRootHtmlElementCurrent(){return this.stackTop===0&&this.tagIDs[0]===l.HTML}hasInDynamicScope(t,n){for(let r=this.stackTop;r>=0;r--){const i=this.tagIDs[r];switch(this.treeAdapter.getNamespaceURI(this.items[r])){case B.HTML:{if(i===t)return!0;if(n.has(i))return!1;break}case B.SVG:{if(Js.has(i))return!1;break}case B.MATHML:{if(Ks.has(i))return!1;break}}}return!0}hasInScope(t){return this.hasInDynamicScope(t,Tr)}hasInListItemScope(t){return this.hasInDynamicScope(t,Sg)}hasInButtonScope(t){return this.hasInDynamicScope(t,wg)}hasNumberedHeaderInScope(){for(let t=this.stackTop;t>=0;t--){const n=this.tagIDs[t];switch(this.treeAdapter.getNamespaceURI(this.items[t])){case B.HTML:{if(Qi.has(n))return!0;if(Tr.has(n))return!1;break}case B.SVG:{if(Js.has(n))return!1;break}case B.MATHML:{if(Ks.has(n))return!1;break}}}return!0}hasInTableScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===B.HTML)switch(this.tagIDs[n]){case t:return!0;case l.TABLE:case l.HTML:return!1}return!0}hasTableBodyContextInTableScope(){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===B.HTML)switch(this.tagIDs[t]){case l.TBODY:case l.THEAD:case l.TFOOT:return!0;case l.TABLE:case l.HTML:return!1}return!0}hasInSelectScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===B.HTML)switch(this.tagIDs[n]){case t:return!0;case l.OPTION:case l.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;pl.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;Qs.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(t){for(;this.currentTagId!==t&&Qs.has(this.currentTagId);)this.pop()}}const hi=3;var bt;(function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"})(bt||(bt={}));const Zs={type:bt.Marker};class Lg{constructor(t){this.treeAdapter=t,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(t,n){const r=[],i=n.length,a=this.treeAdapter.getTagName(t),s=this.treeAdapter.getNamespaceURI(t);for(let o=0;o<this.entries.length;o++){const u=this.entries[o];if(u.type===bt.Marker)break;const{element:c}=u;if(this.treeAdapter.getTagName(c)===a&&this.treeAdapter.getNamespaceURI(c)===s){const d=this.treeAdapter.getAttrList(c);d.length===i&&r.push({idx:o,attrs:d})}}return r}_ensureNoahArkCondition(t){if(this.entries.length<hi)return;const n=this.treeAdapter.getAttrList(t),r=this._getNoahArkConditionCandidates(t,n);if(r.length<hi)return;const i=new Map(n.map(s=>[s.name,s.value]));let a=0;for(let s=0;s<r.length;s++){const o=r[s];o.attrs.every(u=>i.get(u.name)===u.value)&&(a+=1,a>=hi&&this.entries.splice(o.idx,1))}}insertMarker(){this.entries.unshift(Zs)}pushElement(t,n){this._ensureNoahArkCondition(t),this.entries.unshift({type:bt.Element,element:t,token:n})}insertElementAfterBookmark(t,n){const r=this.entries.indexOf(this.bookmark);this.entries.splice(r,0,{type:bt.Element,element:t,token:n})}removeEntry(t){const n=this.entries.indexOf(t);n>=0&&this.entries.splice(n,1)}clearToLastMarker(){const t=this.entries.indexOf(Zs);t>=0?this.entries.splice(0,t+1):this.entries.length=0}getElementEntryInScopeWithTagName(t){const n=this.entries.find(r=>r.type===bt.Marker||this.treeAdapter.getTagName(r.element)===t);return n&&n.type===bt.Element?n:null}getElementEntry(t){return this.entries.find(n=>n.type===bt.Element&&n.element===t)}}const Lt={createDocument(){return{nodeName:"#document",mode:rt.NO_QUIRKS,childNodes:[]}},createDocumentFragment(){return{nodeName:"#document-fragment",childNodes:[]}},createElement(e,t,n){return{nodeName:e,tagName:e,attrs:n,namespaceURI:t,childNodes:[],parentNode:null}},createCommentNode(e){return{nodeName:"#comment",data:e,parentNode:null}},createTextNode(e){return{nodeName:"#text",value:e,parentNode:null}},appendChild(e,t){e.childNodes.push(t),t.parentNode=e},insertBefore(e,t,n){const r=e.childNodes.indexOf(n);e.childNodes.splice(r,0,t),t.parentNode=e},setTemplateContent(e,t){e.content=t},getTemplateContent(e){return e.content},setDocumentType(e,t,n,r){const i=e.childNodes.find(a=>a.nodeName==="#documentType");if(i)i.name=t,i.publicId=n,i.systemId=r;else{const a={nodeName:"#documentType",name:t,publicId:n,systemId:r,parentNode:null};Lt.appendChild(e,a)}},setDocumentMode(e,t){e.mode=t},getDocumentMode(e){return e.mode},detachNode(e){if(e.parentNode){const t=e.parentNode.childNodes.indexOf(e);e.parentNode.childNodes.splice(t,1),e.parentNode=null}},insertText(e,t){if(e.childNodes.length>0){const n=e.childNodes[e.childNodes.length-1];if(Lt.isTextNode(n)){n.value+=t;return}}Lt.appendChild(e,Lt.createTextNode(t))},insertTextBefore(e,t,n){const r=e.childNodes[e.childNodes.indexOf(n)-1];r&&Lt.isTextNode(r)?r.value+=t:Lt.insertBefore(e,Lt.createTextNode(t),n)},adoptAttributes(e,t){const n=new Set(e.attrs.map(r=>r.name));for(let r=0;r<t.length;r++)n.has(t[r].name)||e.attrs.push(t[r])},getFirstChild(e){return e.childNodes[0]},getChildNodes(e){return e.childNodes},getParentNode(e){return e.parentNode},getAttrList(e){return e.attrs},getTagName(e){return e.tagName},getNamespaceURI(e){return e.namespaceURI},getTextNodeContent(e){return e.value},getCommentNodeContent(e){return e.data},getDocumentTypeNodeName(e){return e.name},getDocumentTypeNodePublicId(e){return e.publicId},getDocumentTypeNodeSystemId(e){return e.systemId},isTextNode(e){return e.nodeName==="#text"},isCommentNode(e){return e.nodeName==="#comment"},isDocumentTypeNode(e){return e.nodeName==="#documentType"},isElementNode(e){return Object.prototype.hasOwnProperty.call(e,"tagName")},setNodeSourceCodeLocation(e,t){e.sourceCodeLocation=t},getNodeSourceCodeLocation(e){return e.sourceCodeLocation},updateNodeSourceCodeLocation(e,t){e.sourceCodeLocation={...e.sourceCodeLocation,...t}}},gl="html",Rg="about:legacy-compat",Dg="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",bl=["+//silmaril//dtd html pro v0r11 19970101//","-//as//dtd html 3.0 aswedit + extensions//","-//advasoft ltd//dtd html 3.0 aswedit + extensions//","-//ietf//dtd html 2.0 level 1//","-//ietf//dtd html 2.0 level 2//","-//ietf//dtd html 2.0 strict level 1//","-//ietf//dtd html 2.0 strict level 2//","-//ietf//dtd html 2.0 strict//","-//ietf//dtd html 2.0//","-//ietf//dtd html 2.1e//","-//ietf//dtd html 3.0//","-//ietf//dtd html 3.2 final//","-//ietf//dtd html 3.2//","-//ietf//dtd html 3//","-//ietf//dtd html level 0//","-//ietf//dtd html level 1//","-//ietf//dtd html level 2//","-//ietf//dtd html level 3//","-//ietf//dtd html strict level 0//","-//ietf//dtd html strict level 1//","-//ietf//dtd html strict level 2//","-//ietf//dtd html strict level 3//","-//ietf//dtd html strict//","-//ietf//dtd html//","-//metrius//dtd metrius presentational//","-//microsoft//dtd internet explorer 2.0 html strict//","-//microsoft//dtd internet explorer 2.0 html//","-//microsoft//dtd internet explorer 2.0 tables//","-//microsoft//dtd internet explorer 3.0 html strict//","-//microsoft//dtd internet explorer 3.0 html//","-//microsoft//dtd internet explorer 3.0 tables//","-//netscape comm. corp.//dtd html//","-//netscape comm. corp.//dtd strict html//","-//o'reilly and associates//dtd html 2.0//","-//o'reilly and associates//dtd html extended 1.0//","-//o'reilly and associates//dtd html extended relaxed 1.0//","-//sq//dtd html 2.0 hotmetal + extensions//","-//softquad software//dtd hotmetal pro 6.0::19990601::extensions to html 4.0//","-//softquad//dtd hotmetal pro 4.0::19971010::extensions to html 4.0//","-//spyglass//dtd html 2.0 extended//","-//sun microsystems corp.//dtd hotjava html//","-//sun microsystems corp.//dtd hotjava strict html//","-//w3c//dtd html 3 1995-03-24//","-//w3c//dtd html 3.2 draft//","-//w3c//dtd html 3.2 final//","-//w3c//dtd html 3.2//","-//w3c//dtd html 3.2s draft//","-//w3c//dtd html 4.0 frameset//","-//w3c//dtd html 4.0 transitional//","-//w3c//dtd html experimental 19960712//","-//w3c//dtd html experimental 970421//","-//w3c//dtd w3 html//","-//w3o//dtd w3 html 3.0//","-//webtechs//dtd mozilla html 2.0//","-//webtechs//dtd mozilla html//"],Pg=[...bl,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],Mg=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),El=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],Bg=[...El,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function eo(e,t){return t.some(n=>e.startsWith(n))}function Fg(e){return e.name===gl&&e.publicId===null&&(e.systemId===null||e.systemId===Rg)}function Hg(e){if(e.name!==gl)return rt.QUIRKS;const{systemId:t}=e;if(t&&t.toLowerCase()===Dg)return rt.QUIRKS;let{publicId:n}=e;if(n!==null){if(n=n.toLowerCase(),Mg.has(n))return rt.QUIRKS;let r=t===null?Pg:bl;if(eo(n,r))return rt.QUIRKS;if(r=t===null?El:Bg,eo(n,r))return rt.LIMITED_QUIRKS}return rt.NO_QUIRKS}const to={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},Ug="definitionurl",jg="definitionURL",zg=new Map(["attributeName","attributeType","baseFrequency","baseProfile","calcMode","clipPathUnits","diffuseConstant","edgeMode","filterUnits","glyphRef","gradientTransform","gradientUnits","kernelMatrix","kernelUnitLength","keyPoints","keySplines","keyTimes","lengthAdjust","limitingConeAngle","markerHeight","markerUnits","markerWidth","maskContentUnits","maskUnits","numOctaves","pathLength","patternContentUnits","patternTransform","patternUnits","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","refX","refY","repeatCount","repeatDur","requiredExtensions","requiredFeatures","specularConstant","specularExponent","spreadMethod","startOffset","stdDeviation","stitchTiles","surfaceScale","systemLanguage","tableValues","targetX","targetY","textLength","viewBox","viewTarget","xChannelSelector","yChannelSelector","zoomAndPan"].map(e=>[e.toLowerCase(),e])),$g=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:B.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:B.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:B.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:B.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:B.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:B.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:B.XLINK}],["xml:lang",{prefix:"xml",name:"lang",namespace:B.XML}],["xml:space",{prefix:"xml",name:"space",namespace:B.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:B.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:B.XMLNS}]]),Yg=new Map(["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","textPath"].map(e=>[e.toLowerCase(),e])),Gg=new Set([l.B,l.BIG,l.BLOCKQUOTE,l.BODY,l.BR,l.CENTER,l.CODE,l.DD,l.DIV,l.DL,l.DT,l.EM,l.EMBED,l.H1,l.H2,l.H3,l.H4,l.H5,l.H6,l.HEAD,l.HR,l.I,l.IMG,l.LI,l.LISTING,l.MENU,l.META,l.NOBR,l.OL,l.P,l.PRE,l.RUBY,l.S,l.SMALL,l.SPAN,l.STRONG,l.STRIKE,l.SUB,l.SUP,l.TABLE,l.TT,l.U,l.UL,l.VAR]);function Vg(e){const t=e.tagID;return t===l.FONT&&e.attrs.some(({name:r})=>r===Gt.COLOR||r===Gt.SIZE||r===Gt.FACE)||Gg.has(t)}function Tl(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===Ug){e.attrs[t].name=jg;break}}function xl(e){for(let t=0;t<e.attrs.length;t++){const n=zg.get(e.attrs[t].name);n!=null&&(e.attrs[t].name=n)}}function va(e){for(let t=0;t<e.attrs.length;t++){const n=$g.get(e.attrs[t].name);n&&(e.attrs[t].prefix=n.prefix,e.attrs[t].name=n.name,e.attrs[t].namespace=n.namespace)}}function qg(e){const t=Yg.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=yn(e.tagName))}function Wg(e,t){return t===B.MATHML&&(e===l.MI||e===l.MO||e===l.MN||e===l.MS||e===l.MTEXT)}function Xg(e,t,n){if(t===B.MATHML&&e===l.ANNOTATION_XML){for(let r=0;r<n.length;r++)if(n[r].name===Gt.ENCODING){const i=n[r].value.toLowerCase();return i===to.TEXT_HTML||i===to.APPLICATION_XML}}return t===B.SVG&&(e===l.FOREIGN_OBJECT||e===l.DESC||e===l.TITLE)}function Qg(e,t,n,r){return(!r||r===B.HTML)&&Xg(e,t,n)||(!r||r===B.MATHML)&&Wg(e,t)}const Kg="hidden",Jg=8,Zg=3;var x;(function(e){e[e.INITIAL=0]="INITIAL",e[e.BEFORE_HTML=1]="BEFORE_HTML",e[e.BEFORE_HEAD=2]="BEFORE_HEAD",e[e.IN_HEAD=3]="IN_HEAD",e[e.IN_HEAD_NO_SCRIPT=4]="IN_HEAD_NO_SCRIPT",e[e.AFTER_HEAD=5]="AFTER_HEAD",e[e.IN_BODY=6]="IN_BODY",e[e.TEXT=7]="TEXT",e[e.IN_TABLE=8]="IN_TABLE",e[e.IN_TABLE_TEXT=9]="IN_TABLE_TEXT",e[e.IN_CAPTION=10]="IN_CAPTION",e[e.IN_COLUMN_GROUP=11]="IN_COLUMN_GROUP",e[e.IN_TABLE_BODY=12]="IN_TABLE_BODY",e[e.IN_ROW=13]="IN_ROW",e[e.IN_CELL=14]="IN_CELL",e[e.IN_SELECT=15]="IN_SELECT",e[e.IN_SELECT_IN_TABLE=16]="IN_SELECT_IN_TABLE",e[e.IN_TEMPLATE=17]="IN_TEMPLATE",e[e.AFTER_BODY=18]="AFTER_BODY",e[e.IN_FRAMESET=19]="IN_FRAMESET",e[e.AFTER_FRAMESET=20]="AFTER_FRAMESET",e[e.AFTER_AFTER_BODY=21]="AFTER_AFTER_BODY",e[e.AFTER_AFTER_FRAMESET=22]="AFTER_AFTER_FRAMESET"})(x||(x={}));const e1={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},yl=new Set([l.TABLE,l.TBODY,l.TFOOT,l.THEAD,l.TR]),no={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:Lt,onParseError:null};class ro{constructor(t,n,r=null,i=null){this.fragmentContext=r,this.scriptHandler=i,this.currentToken=null,this.stopped=!1,this.insertionMode=x.INITIAL,this.originalInsertionMode=x.INITIAL,this.headElement=null,this.formElement=null,this.currentNotInHTML=!1,this.tmplInsertionModeStack=[],this.pendingCharacterTokens=[],this.hasNonWhitespacePendingCharacterToken=!1,this.framesetOk=!0,this.skipNextNewLine=!1,this.fosterParentingEnabled=!1,this.options={...no,...t},this.treeAdapter=this.options.treeAdapter,this.onParseError=this.options.onParseError,this.onParseError&&(this.options.sourceCodeLocationInfo=!0),this.document=n??this.treeAdapter.createDocument(),this.tokenizer=new Cg(this.options,this),this.activeFormattingElements=new Lg(this.treeAdapter),this.fragmentContextID=r?yn(this.treeAdapter.getTagName(r)):l.UNKNOWN,this._setContextModes(r??this.document,this.fragmentContextID),this.openElements=new Og(this.document,this.treeAdapter,this)}static parse(t,n){const r=new this(n);return r.tokenizer.write(t,!0),r.document}static getFragmentParser(t,n){const r={...no,...n};t??(t=r.treeAdapter.createElement(O.TEMPLATE,B.HTML,[]));const i=r.treeAdapter.createElement("documentmock",B.HTML,[]),a=new this(r,i,t);return a.fragmentContextID===l.TEMPLATE&&a.tmplInsertionModeStack.unshift(x.IN_TEMPLATE),a._initTokenizerForFragmentParsing(),a._insertFakeRootElement(),a._resetInsertionMode(),a._findFormInFragmentContext(),a}getFragment(){const t=this.treeAdapter.getFirstChild(this.document),n=this.treeAdapter.createDocumentFragment();return this._adoptNodes(t,n),n}_err(t,n,r){var i;if(!this.onParseError)return;const a=(i=t.location)!==null&&i!==void 0?i:e1,s={code:n,startLine:a.startLine,startCol:a.startCol,startOffset:a.startOffset,endLine:r?a.startLine:a.endLine,endCol:r?a.startCol:a.endCol,endOffset:r?a.startOffset:a.endOffset};this.onParseError(s)}onItemPush(t,n,r){var i,a;(a=(i=this.treeAdapter).onItemPush)===null||a===void 0||a.call(i,t),r&&this.openElements.stackTop>0&&this._setContextModes(t,n)}onItemPop(t,n){var r,i;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(t,this.currentToken),(i=(r=this.treeAdapter).onItemPop)===null||i===void 0||i.call(r,t,this.openElements.current),n){let a,s;this.openElements.stackTop===0&&this.fragmentContext?(a=this.fragmentContext,s=this.fragmentContextID):{current:a,currentTagId:s}=this.openElements,this._setContextModes(a,s)}}_setContextModes(t,n){const r=t===this.document||this.treeAdapter.getNamespaceURI(t)===B.HTML;this.currentNotInHTML=!r,this.tokenizer.inForeignNode=!r&&!this._isIntegrationPoint(n,t)}_switchToTextParsing(t,n){this._insertElement(t,B.HTML),this.tokenizer.state=n,this.originalInsertionMode=this.insertionMode,this.insertionMode=x.TEXT}switchToPlaintextParsing(){this.insertionMode=x.TEXT,this.originalInsertionMode=x.IN_BODY,this.tokenizer.state=Oe.PLAINTEXT}_getAdjustedCurrentElement(){return this.openElements.stackTop===0&&this.fragmentContext?this.fragmentContext:this.openElements.current}_findFormInFragmentContext(){let t=this.fragmentContext;for(;t;){if(this.treeAdapter.getTagName(t)===O.FORM){this.formElement=t;break}t=this.treeAdapter.getParentNode(t)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==B.HTML))switch(this.fragmentContextID){case l.TITLE:case l.TEXTAREA:{this.tokenizer.state=Oe.RCDATA;break}case l.STYLE:case l.XMP:case l.IFRAME:case l.NOEMBED:case l.NOFRAMES:case l.NOSCRIPT:{this.tokenizer.state=Oe.RAWTEXT;break}case l.SCRIPT:{this.tokenizer.state=Oe.SCRIPT_DATA;break}case l.PLAINTEXT:{this.tokenizer.state=Oe.PLAINTEXT;break}}}_setDocumentType(t){const n=t.name||"",r=t.publicId||"",i=t.systemId||"";if(this.treeAdapter.setDocumentType(this.document,n,r,i),t.location){const s=this.treeAdapter.getChildNodes(this.document).find(o=>this.treeAdapter.isDocumentTypeNode(o));s&&this.treeAdapter.setNodeSourceCodeLocation(s,t.location)}}_attachElementToTree(t,n){if(this.options.sourceCodeLocationInfo){const r=n&&{...n,startTag:n};this.treeAdapter.setNodeSourceCodeLocation(t,r)}if(this._shouldFosterParentOnInsertion())this._fosterParentElement(t);else{const r=this.openElements.currentTmplContentOrNode;this.treeAdapter.appendChild(r,t)}}_appendElement(t,n){const r=this.treeAdapter.createElement(t.tagName,n,t.attrs);this._attachElementToTree(r,t.location)}_insertElement(t,n){const r=this.treeAdapter.createElement(t.tagName,n,t.attrs);this._attachElementToTree(r,t.location),this.openElements.push(r,t.tagID)}_insertFakeElement(t,n){const r=this.treeAdapter.createElement(t,B.HTML,[]);this._attachElementToTree(r,null),this.openElements.push(r,n)}_insertTemplate(t){const n=this.treeAdapter.createElement(t.tagName,B.HTML,t.attrs),r=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(n,r),this._attachElementToTree(n,t.location),this.openElements.push(n,t.tagID),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(r,null)}_insertFakeRootElement(){const t=this.treeAdapter.createElement(O.HTML,B.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(t,null),this.treeAdapter.appendChild(this.openElements.current,t),this.openElements.push(t,l.HTML)}_appendCommentNode(t,n){const r=this.treeAdapter.createCommentNode(t.data);this.treeAdapter.appendChild(n,r),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(r,t.location)}_insertCharacters(t){let n,r;if(this._shouldFosterParentOnInsertion()?({parent:n,beforeElement:r}=this._findFosterParentingLocation(),r?this.treeAdapter.insertTextBefore(n,t.chars,r):this.treeAdapter.insertText(n,t.chars)):(n=this.openElements.currentTmplContentOrNode,this.treeAdapter.insertText(n,t.chars)),!t.location)return;const i=this.treeAdapter.getChildNodes(n),a=r?i.lastIndexOf(r):i.length,s=i[a-1];if(this.treeAdapter.getNodeSourceCodeLocation(s)){const{endLine:u,endCol:c,endOffset:d}=t.location;this.treeAdapter.updateNodeSourceCodeLocation(s,{endLine:u,endCol:c,endOffset:d})}else this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(s,t.location)}_adoptNodes(t,n){for(let r=this.treeAdapter.getFirstChild(t);r;r=this.treeAdapter.getFirstChild(t))this.treeAdapter.detachNode(r),this.treeAdapter.appendChild(n,r)}_setEndLocation(t,n){if(this.treeAdapter.getNodeSourceCodeLocation(t)&&n.location){const r=n.location,i=this.treeAdapter.getTagName(t),a=n.type===ce.END_TAG&&i===n.tagName?{endTag:{...r},endLine:r.endLine,endCol:r.endCol,endOffset:r.endOffset}:{endLine:r.startLine,endCol:r.startCol,endOffset:r.startOffset};this.treeAdapter.updateNodeSourceCodeLocation(t,a)}}shouldProcessStartTagTokenInForeignContent(t){if(!this.currentNotInHTML)return!1;let n,r;return this.openElements.stackTop===0&&this.fragmentContext?(n=this.fragmentContext,r=this.fragmentContextID):{current:n,currentTagId:r}=this.openElements,t.tagID===l.SVG&&this.treeAdapter.getTagName(n)===O.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(n)===B.MATHML?!1:this.tokenizer.inForeignNode||(t.tagID===l.MGLYPH||t.tagID===l.MALIGNMARK)&&!this._isIntegrationPoint(r,n,B.HTML)}_processToken(t){switch(t.type){case ce.CHARACTER:{this.onCharacter(t);break}case ce.NULL_CHARACTER:{this.onNullCharacter(t);break}case ce.COMMENT:{this.onComment(t);break}case ce.DOCTYPE:{this.onDoctype(t);break}case ce.START_TAG:{this._processStartTag(t);break}case ce.END_TAG:{this.onEndTag(t);break}case ce.EOF:{this.onEof(t);break}case ce.WHITESPACE_CHARACTER:{this.onWhitespaceCharacter(t);break}}}_isIntegrationPoint(t,n,r){const i=this.treeAdapter.getNamespaceURI(n),a=this.treeAdapter.getAttrList(n);return Qg(t,i,a,r)}_reconstructActiveFormattingElements(){const t=this.activeFormattingElements.entries.length;if(t){const n=this.activeFormattingElements.entries.findIndex(i=>i.type===bt.Marker||this.openElements.contains(i.element)),r=n<0?t-1:n-1;for(let i=r;i>=0;i--){const a=this.activeFormattingElements.entries[i];this._insertElement(a.token,this.treeAdapter.getNamespaceURI(a.element)),a.element=this.openElements.current}}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=x.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(l.P),this.openElements.popUntilTagNamePopped(l.P)}_resetInsertionMode(){for(let t=this.openElements.stackTop;t>=0;t--)switch(t===0&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[t]){case l.TR:{this.insertionMode=x.IN_ROW;return}case l.TBODY:case l.THEAD:case l.TFOOT:{this.insertionMode=x.IN_TABLE_BODY;return}case l.CAPTION:{this.insertionMode=x.IN_CAPTION;return}case l.COLGROUP:{this.insertionMode=x.IN_COLUMN_GROUP;return}case l.TABLE:{this.insertionMode=x.IN_TABLE;return}case l.BODY:{this.insertionMode=x.IN_BODY;return}case l.FRAMESET:{this.insertionMode=x.IN_FRAMESET;return}case l.SELECT:{this._resetInsertionModeForSelect(t);return}case l.TEMPLATE:{this.insertionMode=this.tmplInsertionModeStack[0];return}case l.HTML:{this.insertionMode=this.headElement?x.AFTER_HEAD:x.BEFORE_HEAD;return}case l.TD:case l.TH:{if(t>0){this.insertionMode=x.IN_CELL;return}break}case l.HEAD:{if(t>0){this.insertionMode=x.IN_HEAD;return}break}}this.insertionMode=x.IN_BODY}_resetInsertionModeForSelect(t){if(t>0)for(let n=t-1;n>0;n--){const r=this.openElements.tagIDs[n];if(r===l.TEMPLATE)break;if(r===l.TABLE){this.insertionMode=x.IN_SELECT_IN_TABLE;return}}this.insertionMode=x.IN_SELECT}_isElementCausesFosterParenting(t){return yl.has(t)}_shouldFosterParentOnInsertion(){return this.fosterParentingEnabled&&this._isElementCausesFosterParenting(this.openElements.currentTagId)}_findFosterParentingLocation(){for(let t=this.openElements.stackTop;t>=0;t--){const n=this.openElements.items[t];switch(this.openElements.tagIDs[t]){case l.TEMPLATE:{if(this.treeAdapter.getNamespaceURI(n)===B.HTML)return{parent:this.treeAdapter.getTemplateContent(n),beforeElement:null};break}case l.TABLE:{const r=this.treeAdapter.getParentNode(n);return r?{parent:r,beforeElement:n}:{parent:this.openElements.items[t-1],beforeElement:null}}}}return{parent:this.openElements.items[0],beforeElement:null}}_fosterParentElement(t){const n=this._findFosterParentingLocation();n.beforeElement?this.treeAdapter.insertBefore(n.parent,t,n.beforeElement):this.treeAdapter.appendChild(n.parent,t)}_isSpecialElement(t,n){const r=this.treeAdapter.getNamespaceURI(t);return xg[r].has(n)}onCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){kb(this,t);return}switch(this.insertionMode){case x.INITIAL:{Sn(this,t);break}case x.BEFORE_HTML:{Rn(this,t);break}case x.BEFORE_HEAD:{Dn(this,t);break}case x.IN_HEAD:{Pn(this,t);break}case x.IN_HEAD_NO_SCRIPT:{Mn(this,t);break}case x.AFTER_HEAD:{Bn(this,t);break}case x.IN_BODY:case x.IN_CAPTION:case x.IN_CELL:case x.IN_TEMPLATE:{_l(this,t);break}case x.TEXT:case x.IN_SELECT:case x.IN_SELECT_IN_TABLE:{this._insertCharacters(t);break}case x.IN_TABLE:case x.IN_TABLE_BODY:case x.IN_ROW:{mi(this,t);break}case x.IN_TABLE_TEXT:{Nl(this,t);break}case x.IN_COLUMN_GROUP:{xr(this,t);break}case x.AFTER_BODY:{yr(this,t);break}case x.AFTER_AFTER_BODY:{mr(this,t);break}}}onNullCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){Nb(this,t);return}switch(this.insertionMode){case x.INITIAL:{Sn(this,t);break}case x.BEFORE_HTML:{Rn(this,t);break}case x.BEFORE_HEAD:{Dn(this,t);break}case x.IN_HEAD:{Pn(this,t);break}case x.IN_HEAD_NO_SCRIPT:{Mn(this,t);break}case x.AFTER_HEAD:{Bn(this,t);break}case x.TEXT:{this._insertCharacters(t);break}case x.IN_TABLE:case x.IN_TABLE_BODY:case x.IN_ROW:{mi(this,t);break}case x.IN_COLUMN_GROUP:{xr(this,t);break}case x.AFTER_BODY:{yr(this,t);break}case x.AFTER_AFTER_BODY:{mr(this,t);break}}}onComment(t){if(this.skipNextNewLine=!1,this.currentNotInHTML){Ki(this,t);return}switch(this.insertionMode){case x.INITIAL:case x.BEFORE_HTML:case x.BEFORE_HEAD:case x.IN_HEAD:case x.IN_HEAD_NO_SCRIPT:case x.AFTER_HEAD:case x.IN_BODY:case x.IN_TABLE:case x.IN_CAPTION:case x.IN_COLUMN_GROUP:case x.IN_TABLE_BODY:case x.IN_ROW:case x.IN_CELL:case x.IN_SELECT:case x.IN_SELECT_IN_TABLE:case x.IN_TEMPLATE:case x.IN_FRAMESET:case x.AFTER_FRAMESET:{Ki(this,t);break}case x.IN_TABLE_TEXT:{wn(this,t);break}case x.AFTER_BODY:{o1(this,t);break}case x.AFTER_AFTER_BODY:case x.AFTER_AFTER_FRAMESET:{u1(this,t);break}}}onDoctype(t){switch(this.skipNextNewLine=!1,this.insertionMode){case x.INITIAL:{l1(this,t);break}case x.BEFORE_HEAD:case x.IN_HEAD:case x.IN_HEAD_NO_SCRIPT:case x.AFTER_HEAD:{this._err(t,R.misplacedDoctype);break}case x.IN_TABLE_TEXT:{wn(this,t);break}}}onStartTag(t){this.skipNextNewLine=!1,this.currentToken=t,this._processStartTag(t),t.selfClosing&&!t.ackSelfClosing&&this._err(t,R.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(t){this.shouldProcessStartTagTokenInForeignContent(t)?Ob(this,t):this._startTagOutsideForeignContent(t)}_startTagOutsideForeignContent(t){switch(this.insertionMode){case x.INITIAL:{Sn(this,t);break}case x.BEFORE_HTML:{c1(this,t);break}case x.BEFORE_HEAD:{f1(this,t);break}case x.IN_HEAD:{ft(this,t);break}case x.IN_HEAD_NO_SCRIPT:{p1(this,t);break}case x.AFTER_HEAD:{b1(this,t);break}case x.IN_BODY:{ze(this,t);break}case x.IN_TABLE:{gn(this,t);break}case x.IN_TABLE_TEXT:{wn(this,t);break}case x.IN_CAPTION:{hb(this,t);break}case x.IN_COLUMN_GROUP:{ka(this,t);break}case x.IN_TABLE_BODY:{zr(this,t);break}case x.IN_ROW:{$r(this,t);break}case x.IN_CELL:{gb(this,t);break}case x.IN_SELECT:{Ll(this,t);break}case x.IN_SELECT_IN_TABLE:{Eb(this,t);break}case x.IN_TEMPLATE:{xb(this,t);break}case x.AFTER_BODY:{Ab(this,t);break}case x.IN_FRAMESET:{_b(this,t);break}case x.AFTER_FRAMESET:{Sb(this,t);break}case x.AFTER_AFTER_BODY:{vb(this,t);break}case x.AFTER_AFTER_FRAMESET:{Ib(this,t);break}}}onEndTag(t){this.skipNextNewLine=!1,this.currentToken=t,this.currentNotInHTML?Lb(this,t):this._endTagOutsideForeignContent(t)}_endTagOutsideForeignContent(t){switch(this.insertionMode){case x.INITIAL:{Sn(this,t);break}case x.BEFORE_HTML:{d1(this,t);break}case x.BEFORE_HEAD:{h1(this,t);break}case x.IN_HEAD:{m1(this,t);break}case x.IN_HEAD_NO_SCRIPT:{g1(this,t);break}case x.AFTER_HEAD:{E1(this,t);break}case x.IN_BODY:{jr(this,t);break}case x.TEXT:{rb(this,t);break}case x.IN_TABLE:{jn(this,t);break}case x.IN_TABLE_TEXT:{wn(this,t);break}case x.IN_CAPTION:{mb(this,t);break}case x.IN_COLUMN_GROUP:{pb(this,t);break}case x.IN_TABLE_BODY:{Ji(this,t);break}case x.IN_ROW:{Ol(this,t);break}case x.IN_CELL:{bb(this,t);break}case x.IN_SELECT:{Rl(this,t);break}case x.IN_SELECT_IN_TABLE:{Tb(this,t);break}case x.IN_TEMPLATE:{yb(this,t);break}case x.AFTER_BODY:{Pl(this,t);break}case x.IN_FRAMESET:{Cb(this,t);break}case x.AFTER_FRAMESET:{wb(this,t);break}case x.AFTER_AFTER_BODY:{mr(this,t);break}}}onEof(t){switch(this.insertionMode){case x.INITIAL:{Sn(this,t);break}case x.BEFORE_HTML:{Rn(this,t);break}case x.BEFORE_HEAD:{Dn(this,t);break}case x.IN_HEAD:{Pn(this,t);break}case x.IN_HEAD_NO_SCRIPT:{Mn(this,t);break}case x.AFTER_HEAD:{Bn(this,t);break}case x.IN_BODY:case x.IN_TABLE:case x.IN_CAPTION:case x.IN_COLUMN_GROUP:case x.IN_TABLE_BODY:case x.IN_ROW:case x.IN_CELL:case x.IN_SELECT:case x.IN_SELECT_IN_TABLE:{vl(this,t);break}case x.TEXT:{ib(this,t);break}case x.IN_TABLE_TEXT:{wn(this,t);break}case x.IN_TEMPLATE:{Dl(this,t);break}case x.AFTER_BODY:case x.IN_FRAMESET:case x.AFTER_FRAMESET:case x.AFTER_AFTER_BODY:case x.AFTER_AFTER_FRAMESET:{Na(this,t);break}}}onWhitespaceCharacter(t){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,t.chars.charCodeAt(0)===p.LINE_FEED)){if(t.chars.length===1)return;t.chars=t.chars.substr(1)}if(this.tokenizer.inForeignNode){this._insertCharacters(t);return}switch(this.insertionMode){case x.IN_HEAD:case x.IN_HEAD_NO_SCRIPT:case x.AFTER_HEAD:case x.TEXT:case x.IN_COLUMN_GROUP:case x.IN_SELECT:case x.IN_SELECT_IN_TABLE:case x.IN_FRAMESET:case x.AFTER_FRAMESET:{this._insertCharacters(t);break}case x.IN_BODY:case x.IN_CAPTION:case x.IN_CELL:case x.IN_TEMPLATE:case x.AFTER_BODY:case x.AFTER_AFTER_BODY:case x.AFTER_AFTER_FRAMESET:{Al(this,t);break}case x.IN_TABLE:case x.IN_TABLE_BODY:case x.IN_ROW:{mi(this,t);break}case x.IN_TABLE_TEXT:{Il(this,t);break}}}}function t1(e,t){let n=e.activeFormattingElements.getElementEntryInScopeWithTagName(t.tagName);return n?e.openElements.contains(n.element)?e.openElements.hasInScope(t.tagID)||(n=null):(e.activeFormattingElements.removeEntry(n),n=null):wl(e,t),n}function n1(e,t){let n=null,r=e.openElements.stackTop;for(;r>=0;r--){const i=e.openElements.items[r];if(i===t.element)break;e._isSpecialElement(i,e.openElements.tagIDs[r])&&(n=i)}return n||(e.openElements.shortenToLength(r<0?0:r),e.activeFormattingElements.removeEntry(t)),n}function r1(e,t,n){let r=t,i=e.openElements.getCommonAncestor(t);for(let a=0,s=i;s!==n;a++,s=i){i=e.openElements.getCommonAncestor(s);const o=e.activeFormattingElements.getElementEntry(s),u=o&&a>=Zg;!o||u?(u&&e.activeFormattingElements.removeEntry(o),e.openElements.remove(s)):(s=i1(e,o),r===t&&(e.activeFormattingElements.bookmark=o),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(s,r),r=s)}return r}function i1(e,t){const n=e.treeAdapter.getNamespaceURI(t.element),r=e.treeAdapter.createElement(t.token.tagName,n,t.token.attrs);return e.openElements.replace(t.element,r),t.element=r,r}function a1(e,t,n){const r=e.treeAdapter.getTagName(t),i=yn(r);if(e._isElementCausesFosterParenting(i))e._fosterParentElement(n);else{const a=e.treeAdapter.getNamespaceURI(t);i===l.TEMPLATE&&a===B.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function s1(e,t,n){const r=e.treeAdapter.getNamespaceURI(n.element),{token:i}=n,a=e.treeAdapter.createElement(i.tagName,r,i.attrs);e._adoptNodes(t,a),e.treeAdapter.appendChild(t,a),e.activeFormattingElements.insertElementAfterBookmark(a,i),e.activeFormattingElements.removeEntry(n),e.openElements.remove(n.element),e.openElements.insertAfter(t,a,i.tagID)}function Ia(e,t){for(let n=0;n<Jg;n++){const r=t1(e,t);if(!r)break;const i=n1(e,r);if(!i)break;e.activeFormattingElements.bookmark=r;const a=r1(e,i,r.element),s=e.openElements.getCommonAncestor(r.element);e.treeAdapter.detachNode(a),s&&a1(e,s,a),s1(e,i,r)}}function Ki(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function o1(e,t){e._appendCommentNode(t,e.openElements.items[0])}function u1(e,t){e._appendCommentNode(t,e.document)}function Na(e,t){if(e.stopped=!0,t.location){const n=e.fragmentContext?0:2;for(let r=e.openElements.stackTop;r>=n;r--)e._setEndLocation(e.openElements.items[r],t);if(!e.fragmentContext&&e.openElements.stackTop>=0){const r=e.openElements.items[0],i=e.treeAdapter.getNodeSourceCodeLocation(r);if(i&&!i.endTag&&(e._setEndLocation(r,t),e.openElements.stackTop>=1)){const a=e.openElements.items[1],s=e.treeAdapter.getNodeSourceCodeLocation(a);s&&!s.endTag&&e._setEndLocation(a,t)}}}}function l1(e,t){e._setDocumentType(t);const n=t.forceQuirks?rt.QUIRKS:Hg(t);Fg(t)||e._err(t,R.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=x.BEFORE_HTML}function Sn(e,t){e._err(t,R.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,rt.QUIRKS),e.insertionMode=x.BEFORE_HTML,e._processToken(t)}function c1(e,t){t.tagID===l.HTML?(e._insertElement(t,B.HTML),e.insertionMode=x.BEFORE_HEAD):Rn(e,t)}function d1(e,t){const n=t.tagID;(n===l.HTML||n===l.HEAD||n===l.BODY||n===l.BR)&&Rn(e,t)}function Rn(e,t){e._insertFakeRootElement(),e.insertionMode=x.BEFORE_HEAD,e._processToken(t)}function f1(e,t){switch(t.tagID){case l.HTML:{ze(e,t);break}case l.HEAD:{e._insertElement(t,B.HTML),e.headElement=e.openElements.current,e.insertionMode=x.IN_HEAD;break}default:Dn(e,t)}}function h1(e,t){const n=t.tagID;n===l.HEAD||n===l.BODY||n===l.HTML||n===l.BR?Dn(e,t):e._err(t,R.endTagWithoutMatchingOpenElement)}function Dn(e,t){e._insertFakeElement(O.HEAD,l.HEAD),e.headElement=e.openElements.current,e.insertionMode=x.IN_HEAD,e._processToken(t)}function ft(e,t){switch(t.tagID){case l.HTML:{ze(e,t);break}case l.BASE:case l.BASEFONT:case l.BGSOUND:case l.LINK:case l.META:{e._appendElement(t,B.HTML),t.ackSelfClosing=!0;break}case l.TITLE:{e._switchToTextParsing(t,Oe.RCDATA);break}case l.NOSCRIPT:{e.options.scriptingEnabled?e._switchToTextParsing(t,Oe.RAWTEXT):(e._insertElement(t,B.HTML),e.insertionMode=x.IN_HEAD_NO_SCRIPT);break}case l.NOFRAMES:case l.STYLE:{e._switchToTextParsing(t,Oe.RAWTEXT);break}case l.SCRIPT:{e._switchToTextParsing(t,Oe.SCRIPT_DATA);break}case l.TEMPLATE:{e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=x.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(x.IN_TEMPLATE);break}case l.HEAD:{e._err(t,R.misplacedStartTagForHeadElement);break}default:Pn(e,t)}}function m1(e,t){switch(t.tagID){case l.HEAD:{e.openElements.pop(),e.insertionMode=x.AFTER_HEAD;break}case l.BODY:case l.BR:case l.HTML:{Pn(e,t);break}case l.TEMPLATE:{en(e,t);break}default:e._err(t,R.endTagWithoutMatchingOpenElement)}}function en(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==l.TEMPLATE&&e._err(t,R.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(l.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,R.endTagWithoutMatchingOpenElement)}function Pn(e,t){e.openElements.pop(),e.insertionMode=x.AFTER_HEAD,e._processToken(t)}function p1(e,t){switch(t.tagID){case l.HTML:{ze(e,t);break}case l.BASEFONT:case l.BGSOUND:case l.HEAD:case l.LINK:case l.META:case l.NOFRAMES:case l.STYLE:{ft(e,t);break}case l.NOSCRIPT:{e._err(t,R.nestedNoscriptInHead);break}default:Mn(e,t)}}function g1(e,t){switch(t.tagID){case l.NOSCRIPT:{e.openElements.pop(),e.insertionMode=x.IN_HEAD;break}case l.BR:{Mn(e,t);break}default:e._err(t,R.endTagWithoutMatchingOpenElement)}}function Mn(e,t){const n=t.type===ce.EOF?R.openElementsLeftAfterEof:R.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=x.IN_HEAD,e._processToken(t)}function b1(e,t){switch(t.tagID){case l.HTML:{ze(e,t);break}case l.BODY:{e._insertElement(t,B.HTML),e.framesetOk=!1,e.insertionMode=x.IN_BODY;break}case l.FRAMESET:{e._insertElement(t,B.HTML),e.insertionMode=x.IN_FRAMESET;break}case l.BASE:case l.BASEFONT:case l.BGSOUND:case l.LINK:case l.META:case l.NOFRAMES:case l.SCRIPT:case l.STYLE:case l.TEMPLATE:case l.TITLE:{e._err(t,R.abandonedHeadElementChild),e.openElements.push(e.headElement,l.HEAD),ft(e,t),e.openElements.remove(e.headElement);break}case l.HEAD:{e._err(t,R.misplacedStartTagForHeadElement);break}default:Bn(e,t)}}function E1(e,t){switch(t.tagID){case l.BODY:case l.HTML:case l.BR:{Bn(e,t);break}case l.TEMPLATE:{en(e,t);break}default:e._err(t,R.endTagWithoutMatchingOpenElement)}}function Bn(e,t){e._insertFakeElement(O.BODY,l.BODY),e.insertionMode=x.IN_BODY,Ur(e,t)}function Ur(e,t){switch(t.type){case ce.CHARACTER:{_l(e,t);break}case ce.WHITESPACE_CHARACTER:{Al(e,t);break}case ce.COMMENT:{Ki(e,t);break}case ce.START_TAG:{ze(e,t);break}case ce.END_TAG:{jr(e,t);break}case ce.EOF:{vl(e,t);break}}}function Al(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function _l(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function T1(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function x1(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}function y1(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,B.HTML),e.insertionMode=x.IN_FRAMESET)}function A1(e,t){e.openElements.hasInButtonScope(l.P)&&e._closePElement(),e._insertElement(t,B.HTML)}function _1(e,t){e.openElements.hasInButtonScope(l.P)&&e._closePElement(),Qi.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,B.HTML)}function C1(e,t){e.openElements.hasInButtonScope(l.P)&&e._closePElement(),e._insertElement(t,B.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function S1(e,t){const n=e.openElements.tmplCount>0;(!e.formElement||n)&&(e.openElements.hasInButtonScope(l.P)&&e._closePElement(),e._insertElement(t,B.HTML),n||(e.formElement=e.openElements.current))}function w1(e,t){e.framesetOk=!1;const n=t.tagID;for(let r=e.openElements.stackTop;r>=0;r--){const i=e.openElements.tagIDs[r];if(n===l.LI&&i===l.LI||(n===l.DD||n===l.DT)&&(i===l.DD||i===l.DT)){e.openElements.generateImpliedEndTagsWithExclusion(i),e.openElements.popUntilTagNamePopped(i);break}if(i!==l.ADDRESS&&i!==l.DIV&&i!==l.P&&e._isSpecialElement(e.openElements.items[r],i))break}e.openElements.hasInButtonScope(l.P)&&e._closePElement(),e._insertElement(t,B.HTML)}function v1(e,t){e.openElements.hasInButtonScope(l.P)&&e._closePElement(),e._insertElement(t,B.HTML),e.tokenizer.state=Oe.PLAINTEXT}function I1(e,t){e.openElements.hasInScope(l.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(l.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,B.HTML),e.framesetOk=!1}function N1(e,t){const n=e.activeFormattingElements.getElementEntryInScopeWithTagName(O.A);n&&(Ia(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,B.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function k1(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,B.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function O1(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(l.NOBR)&&(Ia(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,B.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function L1(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,B.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function R1(e,t){e.treeAdapter.getDocumentMode(e.document)!==rt.QUIRKS&&e.openElements.hasInButtonScope(l.P)&&e._closePElement(),e._insertElement(t,B.HTML),e.framesetOk=!1,e.insertionMode=x.IN_TABLE}function Cl(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,B.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function Sl(e){const t=cl(e,Gt.TYPE);return t!=null&&t.toLowerCase()===Kg}function D1(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,B.HTML),Sl(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function P1(e,t){e._appendElement(t,B.HTML),t.ackSelfClosing=!0}function M1(e,t){e.openElements.hasInButtonScope(l.P)&&e._closePElement(),e._appendElement(t,B.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function B1(e,t){t.tagName=O.IMG,t.tagID=l.IMG,Cl(e,t)}function F1(e,t){e._insertElement(t,B.HTML),e.skipNextNewLine=!0,e.tokenizer.state=Oe.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=x.TEXT}function H1(e,t){e.openElements.hasInButtonScope(l.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,Oe.RAWTEXT)}function U1(e,t){e.framesetOk=!1,e._switchToTextParsing(t,Oe.RAWTEXT)}function io(e,t){e._switchToTextParsing(t,Oe.RAWTEXT)}function j1(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,B.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===x.IN_TABLE||e.insertionMode===x.IN_CAPTION||e.insertionMode===x.IN_TABLE_BODY||e.insertionMode===x.IN_ROW||e.insertionMode===x.IN_CELL?x.IN_SELECT_IN_TABLE:x.IN_SELECT}function z1(e,t){e.openElements.currentTagId===l.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,B.HTML)}function $1(e,t){e.openElements.hasInScope(l.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,B.HTML)}function Y1(e,t){e.openElements.hasInScope(l.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(l.RTC),e._insertElement(t,B.HTML)}function G1(e,t){e._reconstructActiveFormattingElements(),Tl(t),va(t),t.selfClosing?e._appendElement(t,B.MATHML):e._insertElement(t,B.MATHML),t.ackSelfClosing=!0}function V1(e,t){e._reconstructActiveFormattingElements(),xl(t),va(t),t.selfClosing?e._appendElement(t,B.SVG):e._insertElement(t,B.SVG),t.ackSelfClosing=!0}function ao(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,B.HTML)}function ze(e,t){switch(t.tagID){case l.I:case l.S:case l.B:case l.U:case l.EM:case l.TT:case l.BIG:case l.CODE:case l.FONT:case l.SMALL:case l.STRIKE:case l.STRONG:{k1(e,t);break}case l.A:{N1(e,t);break}case l.H1:case l.H2:case l.H3:case l.H4:case l.H5:case l.H6:{_1(e,t);break}case l.P:case l.DL:case l.OL:case l.UL:case l.DIV:case l.DIR:case l.NAV:case l.MAIN:case l.MENU:case l.ASIDE:case l.CENTER:case l.FIGURE:case l.FOOTER:case l.HEADER:case l.HGROUP:case l.DIALOG:case l.DETAILS:case l.ADDRESS:case l.ARTICLE:case l.SEARCH:case l.SECTION:case l.SUMMARY:case l.FIELDSET:case l.BLOCKQUOTE:case l.FIGCAPTION:{A1(e,t);break}case l.LI:case l.DD:case l.DT:{w1(e,t);break}case l.BR:case l.IMG:case l.WBR:case l.AREA:case l.EMBED:case l.KEYGEN:{Cl(e,t);break}case l.HR:{M1(e,t);break}case l.RB:case l.RTC:{$1(e,t);break}case l.RT:case l.RP:{Y1(e,t);break}case l.PRE:case l.LISTING:{C1(e,t);break}case l.XMP:{H1(e,t);break}case l.SVG:{V1(e,t);break}case l.HTML:{T1(e,t);break}case l.BASE:case l.LINK:case l.META:case l.STYLE:case l.TITLE:case l.SCRIPT:case l.BGSOUND:case l.BASEFONT:case l.TEMPLATE:{ft(e,t);break}case l.BODY:{x1(e,t);break}case l.FORM:{S1(e,t);break}case l.NOBR:{O1(e,t);break}case l.MATH:{G1(e,t);break}case l.TABLE:{R1(e,t);break}case l.INPUT:{D1(e,t);break}case l.PARAM:case l.TRACK:case l.SOURCE:{P1(e,t);break}case l.IMAGE:{B1(e,t);break}case l.BUTTON:{I1(e,t);break}case l.APPLET:case l.OBJECT:case l.MARQUEE:{L1(e,t);break}case l.IFRAME:{U1(e,t);break}case l.SELECT:{j1(e,t);break}case l.OPTION:case l.OPTGROUP:{z1(e,t);break}case l.NOEMBED:case l.NOFRAMES:{io(e,t);break}case l.FRAMESET:{y1(e,t);break}case l.TEXTAREA:{F1(e,t);break}case l.NOSCRIPT:{e.options.scriptingEnabled?io(e,t):ao(e,t);break}case l.PLAINTEXT:{v1(e,t);break}case l.COL:case l.TH:case l.TD:case l.TR:case l.HEAD:case l.FRAME:case l.TBODY:case l.TFOOT:case l.THEAD:case l.CAPTION:case l.COLGROUP:break;default:ao(e,t)}}function q1(e,t){if(e.openElements.hasInScope(l.BODY)&&(e.insertionMode=x.AFTER_BODY,e.options.sourceCodeLocationInfo)){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e._setEndLocation(n,t)}}function W1(e,t){e.openElements.hasInScope(l.BODY)&&(e.insertionMode=x.AFTER_BODY,Pl(e,t))}function X1(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function Q1(e){const t=e.openElements.tmplCount>0,{formElement:n}=e;t||(e.formElement=null),(n||t)&&e.openElements.hasInScope(l.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(l.FORM):n&&e.openElements.remove(n))}function K1(e){e.openElements.hasInButtonScope(l.P)||e._insertFakeElement(O.P,l.P),e._closePElement()}function J1(e){e.openElements.hasInListItemScope(l.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(l.LI),e.openElements.popUntilTagNamePopped(l.LI))}function Z1(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}function eb(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function tb(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function nb(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(O.BR,l.BR),e.openElements.pop(),e.framesetOk=!1}function wl(e,t){const n=t.tagName,r=t.tagID;for(let i=e.openElements.stackTop;i>0;i--){const a=e.openElements.items[i],s=e.openElements.tagIDs[i];if(r===s&&(r!==l.UNKNOWN||e.treeAdapter.getTagName(a)===n)){e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.stackTop>=i&&e.openElements.shortenToLength(i);break}if(e._isSpecialElement(a,s))break}}function jr(e,t){switch(t.tagID){case l.A:case l.B:case l.I:case l.S:case l.U:case l.EM:case l.TT:case l.BIG:case l.CODE:case l.FONT:case l.NOBR:case l.SMALL:case l.STRIKE:case l.STRONG:{Ia(e,t);break}case l.P:{K1(e);break}case l.DL:case l.UL:case l.OL:case l.DIR:case l.DIV:case l.NAV:case l.PRE:case l.MAIN:case l.MENU:case l.ASIDE:case l.BUTTON:case l.CENTER:case l.FIGURE:case l.FOOTER:case l.HEADER:case l.HGROUP:case l.DIALOG:case l.ADDRESS:case l.ARTICLE:case l.DETAILS:case l.SEARCH:case l.SECTION:case l.SUMMARY:case l.LISTING:case l.FIELDSET:case l.BLOCKQUOTE:case l.FIGCAPTION:{X1(e,t);break}case l.LI:{J1(e);break}case l.DD:case l.DT:{Z1(e,t);break}case l.H1:case l.H2:case l.H3:case l.H4:case l.H5:case l.H6:{eb(e);break}case l.BR:{nb(e);break}case l.BODY:{q1(e,t);break}case l.HTML:{W1(e,t);break}case l.FORM:{Q1(e);break}case l.APPLET:case l.OBJECT:case l.MARQUEE:{tb(e,t);break}case l.TEMPLATE:{en(e,t);break}default:wl(e,t)}}function vl(e,t){e.tmplInsertionModeStack.length>0?Dl(e,t):Na(e,t)}function rb(e,t){var n;t.tagID===l.SCRIPT&&((n=e.scriptHandler)===null||n===void 0||n.call(e,e.openElements.current)),e.openElements.pop(),e.insertionMode=e.originalInsertionMode}function ib(e,t){e._err(t,R.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function mi(e,t){if(yl.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=x.IN_TABLE_TEXT,t.type){case ce.CHARACTER:{Nl(e,t);break}case ce.WHITESPACE_CHARACTER:{Il(e,t);break}}else Xn(e,t)}function ab(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,B.HTML),e.insertionMode=x.IN_CAPTION}function sb(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,B.HTML),e.insertionMode=x.IN_COLUMN_GROUP}function ob(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(O.COLGROUP,l.COLGROUP),e.insertionMode=x.IN_COLUMN_GROUP,ka(e,t)}function ub(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,B.HTML),e.insertionMode=x.IN_TABLE_BODY}function lb(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(O.TBODY,l.TBODY),e.insertionMode=x.IN_TABLE_BODY,zr(e,t)}function cb(e,t){e.openElements.hasInTableScope(l.TABLE)&&(e.openElements.popUntilTagNamePopped(l.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function db(e,t){Sl(t)?e._appendElement(t,B.HTML):Xn(e,t),t.ackSelfClosing=!0}function fb(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,B.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function gn(e,t){switch(t.tagID){case l.TD:case l.TH:case l.TR:{lb(e,t);break}case l.STYLE:case l.SCRIPT:case l.TEMPLATE:{ft(e,t);break}case l.COL:{ob(e,t);break}case l.FORM:{fb(e,t);break}case l.TABLE:{cb(e,t);break}case l.TBODY:case l.TFOOT:case l.THEAD:{ub(e,t);break}case l.INPUT:{db(e,t);break}case l.CAPTION:{ab(e,t);break}case l.COLGROUP:{sb(e,t);break}default:Xn(e,t)}}function jn(e,t){switch(t.tagID){case l.TABLE:{e.openElements.hasInTableScope(l.TABLE)&&(e.openElements.popUntilTagNamePopped(l.TABLE),e._resetInsertionMode());break}case l.TEMPLATE:{en(e,t);break}case l.BODY:case l.CAPTION:case l.COL:case l.COLGROUP:case l.HTML:case l.TBODY:case l.TD:case l.TFOOT:case l.TH:case l.THEAD:case l.TR:break;default:Xn(e,t)}}function Xn(e,t){const n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,Ur(e,t),e.fosterParentingEnabled=n}function Il(e,t){e.pendingCharacterTokens.push(t)}function Nl(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function wn(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)Xn(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}const kl=new Set([l.CAPTION,l.COL,l.COLGROUP,l.TBODY,l.TD,l.TFOOT,l.TH,l.THEAD,l.TR]);function hb(e,t){const n=t.tagID;kl.has(n)?e.openElements.hasInTableScope(l.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(l.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=x.IN_TABLE,gn(e,t)):ze(e,t)}function mb(e,t){const n=t.tagID;switch(n){case l.CAPTION:case l.TABLE:{e.openElements.hasInTableScope(l.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(l.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=x.IN_TABLE,n===l.TABLE&&jn(e,t));break}case l.BODY:case l.COL:case l.COLGROUP:case l.HTML:case l.TBODY:case l.TD:case l.TFOOT:case l.TH:case l.THEAD:case l.TR:break;default:jr(e,t)}}function ka(e,t){switch(t.tagID){case l.HTML:{ze(e,t);break}case l.COL:{e._appendElement(t,B.HTML),t.ackSelfClosing=!0;break}case l.TEMPLATE:{ft(e,t);break}default:xr(e,t)}}function pb(e,t){switch(t.tagID){case l.COLGROUP:{e.openElements.currentTagId===l.COLGROUP&&(e.openElements.pop(),e.insertionMode=x.IN_TABLE);break}case l.TEMPLATE:{en(e,t);break}case l.COL:break;default:xr(e,t)}}function xr(e,t){e.openElements.currentTagId===l.COLGROUP&&(e.openElements.pop(),e.insertionMode=x.IN_TABLE,e._processToken(t))}function zr(e,t){switch(t.tagID){case l.TR:{e.openElements.clearBackToTableBodyContext(),e._insertElement(t,B.HTML),e.insertionMode=x.IN_ROW;break}case l.TH:case l.TD:{e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(O.TR,l.TR),e.insertionMode=x.IN_ROW,$r(e,t);break}case l.CAPTION:case l.COL:case l.COLGROUP:case l.TBODY:case l.TFOOT:case l.THEAD:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=x.IN_TABLE,gn(e,t));break}default:gn(e,t)}}function Ji(e,t){const n=t.tagID;switch(t.tagID){case l.TBODY:case l.TFOOT:case l.THEAD:{e.openElements.hasInTableScope(n)&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=x.IN_TABLE);break}case l.TABLE:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=x.IN_TABLE,jn(e,t));break}case l.BODY:case l.CAPTION:case l.COL:case l.COLGROUP:case l.HTML:case l.TD:case l.TH:case l.TR:break;default:jn(e,t)}}function $r(e,t){switch(t.tagID){case l.TH:case l.TD:{e.openElements.clearBackToTableRowContext(),e._insertElement(t,B.HTML),e.insertionMode=x.IN_CELL,e.activeFormattingElements.insertMarker();break}case l.CAPTION:case l.COL:case l.COLGROUP:case l.TBODY:case l.TFOOT:case l.THEAD:case l.TR:{e.openElements.hasInTableScope(l.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=x.IN_TABLE_BODY,zr(e,t));break}default:gn(e,t)}}function Ol(e,t){switch(t.tagID){case l.TR:{e.openElements.hasInTableScope(l.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=x.IN_TABLE_BODY);break}case l.TABLE:{e.openElements.hasInTableScope(l.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=x.IN_TABLE_BODY,Ji(e,t));break}case l.TBODY:case l.TFOOT:case l.THEAD:{(e.openElements.hasInTableScope(t.tagID)||e.openElements.hasInTableScope(l.TR))&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=x.IN_TABLE_BODY,Ji(e,t));break}case l.BODY:case l.CAPTION:case l.COL:case l.COLGROUP:case l.HTML:case l.TD:case l.TH:break;default:jn(e,t)}}function gb(e,t){const n=t.tagID;kl.has(n)?(e.openElements.hasInTableScope(l.TD)||e.openElements.hasInTableScope(l.TH))&&(e._closeTableCell(),$r(e,t)):ze(e,t)}function bb(e,t){const n=t.tagID;switch(n){case l.TD:case l.TH:{e.openElements.hasInTableScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=x.IN_ROW);break}case l.TABLE:case l.TBODY:case l.TFOOT:case l.THEAD:case l.TR:{e.openElements.hasInTableScope(n)&&(e._closeTableCell(),Ol(e,t));break}case l.BODY:case l.CAPTION:case l.COL:case l.COLGROUP:case l.HTML:break;default:jr(e,t)}}function Ll(e,t){switch(t.tagID){case l.HTML:{ze(e,t);break}case l.OPTION:{e.openElements.currentTagId===l.OPTION&&e.openElements.pop(),e._insertElement(t,B.HTML);break}case l.OPTGROUP:{e.openElements.currentTagId===l.OPTION&&e.openElements.pop(),e.openElements.currentTagId===l.OPTGROUP&&e.openElements.pop(),e._insertElement(t,B.HTML);break}case l.HR:{e.openElements.currentTagId===l.OPTION&&e.openElements.pop(),e.openElements.currentTagId===l.OPTGROUP&&e.openElements.pop(),e._appendElement(t,B.HTML),t.ackSelfClosing=!0;break}case l.INPUT:case l.KEYGEN:case l.TEXTAREA:case l.SELECT:{e.openElements.hasInSelectScope(l.SELECT)&&(e.openElements.popUntilTagNamePopped(l.SELECT),e._resetInsertionMode(),t.tagID!==l.SELECT&&e._processStartTag(t));break}case l.SCRIPT:case l.TEMPLATE:{ft(e,t);break}}}function Rl(e,t){switch(t.tagID){case l.OPTGROUP:{e.openElements.stackTop>0&&e.openElements.currentTagId===l.OPTION&&e.openElements.tagIDs[e.openElements.stackTop-1]===l.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagId===l.OPTGROUP&&e.openElements.pop();break}case l.OPTION:{e.openElements.currentTagId===l.OPTION&&e.openElements.pop();break}case l.SELECT:{e.openElements.hasInSelectScope(l.SELECT)&&(e.openElements.popUntilTagNamePopped(l.SELECT),e._resetInsertionMode());break}case l.TEMPLATE:{en(e,t);break}}}function Eb(e,t){const n=t.tagID;n===l.CAPTION||n===l.TABLE||n===l.TBODY||n===l.TFOOT||n===l.THEAD||n===l.TR||n===l.TD||n===l.TH?(e.openElements.popUntilTagNamePopped(l.SELECT),e._resetInsertionMode(),e._processStartTag(t)):Ll(e,t)}function Tb(e,t){const n=t.tagID;n===l.CAPTION||n===l.TABLE||n===l.TBODY||n===l.TFOOT||n===l.THEAD||n===l.TR||n===l.TD||n===l.TH?e.openElements.hasInTableScope(n)&&(e.openElements.popUntilTagNamePopped(l.SELECT),e._resetInsertionMode(),e.onEndTag(t)):Rl(e,t)}function xb(e,t){switch(t.tagID){case l.BASE:case l.BASEFONT:case l.BGSOUND:case l.LINK:case l.META:case l.NOFRAMES:case l.SCRIPT:case l.STYLE:case l.TEMPLATE:case l.TITLE:{ft(e,t);break}case l.CAPTION:case l.COLGROUP:case l.TBODY:case l.TFOOT:case l.THEAD:{e.tmplInsertionModeStack[0]=x.IN_TABLE,e.insertionMode=x.IN_TABLE,gn(e,t);break}case l.COL:{e.tmplInsertionModeStack[0]=x.IN_COLUMN_GROUP,e.insertionMode=x.IN_COLUMN_GROUP,ka(e,t);break}case l.TR:{e.tmplInsertionModeStack[0]=x.IN_TABLE_BODY,e.insertionMode=x.IN_TABLE_BODY,zr(e,t);break}case l.TD:case l.TH:{e.tmplInsertionModeStack[0]=x.IN_ROW,e.insertionMode=x.IN_ROW,$r(e,t);break}default:e.tmplInsertionModeStack[0]=x.IN_BODY,e.insertionMode=x.IN_BODY,ze(e,t)}}function yb(e,t){t.tagID===l.TEMPLATE&&en(e,t)}function Dl(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(l.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):Na(e,t)}function Ab(e,t){t.tagID===l.HTML?ze(e,t):yr(e,t)}function Pl(e,t){var n;if(t.tagID===l.HTML){if(e.fragmentContext||(e.insertionMode=x.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===l.HTML){e._setEndLocation(e.openElements.items[0],t);const r=e.openElements.items[1];r&&!(!((n=e.treeAdapter.getNodeSourceCodeLocation(r))===null||n===void 0)&&n.endTag)&&e._setEndLocation(r,t)}}else yr(e,t)}function yr(e,t){e.insertionMode=x.IN_BODY,Ur(e,t)}function _b(e,t){switch(t.tagID){case l.HTML:{ze(e,t);break}case l.FRAMESET:{e._insertElement(t,B.HTML);break}case l.FRAME:{e._appendElement(t,B.HTML),t.ackSelfClosing=!0;break}case l.NOFRAMES:{ft(e,t);break}}}function Cb(e,t){t.tagID===l.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==l.FRAMESET&&(e.insertionMode=x.AFTER_FRAMESET))}function Sb(e,t){switch(t.tagID){case l.HTML:{ze(e,t);break}case l.NOFRAMES:{ft(e,t);break}}}function wb(e,t){t.tagID===l.HTML&&(e.insertionMode=x.AFTER_AFTER_FRAMESET)}function vb(e,t){t.tagID===l.HTML?ze(e,t):mr(e,t)}function mr(e,t){e.insertionMode=x.IN_BODY,Ur(e,t)}function Ib(e,t){switch(t.tagID){case l.HTML:{ze(e,t);break}case l.NOFRAMES:{ft(e,t);break}}}function Nb(e,t){t.chars=Ie,e._insertCharacters(t)}function kb(e,t){e._insertCharacters(t),e.framesetOk=!1}function Ml(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==B.HTML&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function Ob(e,t){if(Vg(t))Ml(e),e._startTagOutsideForeignContent(t);else{const n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===B.MATHML?Tl(t):r===B.SVG&&(qg(t),xl(t)),va(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}function Lb(e,t){if(t.tagID===l.P||t.tagID===l.BR){Ml(e),e._endTagOutsideForeignContent(t);return}for(let n=e.openElements.stackTop;n>0;n--){const r=e.openElements.items[n];if(e.treeAdapter.getNamespaceURI(r)===B.HTML){e._endTagOutsideForeignContent(t);break}const i=e.treeAdapter.getTagName(r);if(i.toLowerCase()===t.tagName){t.tagName=i,e.openElements.shortenToLength(n);break}}}O.AREA,O.BASE,O.BASEFONT,O.BGSOUND,O.BR,O.COL,O.EMBED,O.FRAME,O.HR,O.IMG,O.INPUT,O.KEYGEN,O.LINK,O.META,O.PARAM,O.SOURCE,O.TRACK,O.WBR;const Rb=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),so={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function Bl(e,t){const n=$b(e),r=al("type",{handlers:{root:Db,element:Pb,text:Mb,comment:Hl,doctype:Bb,raw:Hb},unknown:Ub}),i={parser:n?new ro(so):ro.getFragmentParser(void 0,so),handle(o){r(o,i)},stitches:!1,options:t||{}};r(e,i),An(i,xt());const a=n?i.parser.document:i.parser.getFragment(),s=Gp(a,{file:i.options.file});return i.stitches&&Hr(s,"comment",function(o,u,c){const d=o;if(d.value.stitch&&c&&u!==void 0){const f=c.children;return f[u]=d.value.stitch,u}}),s.type==="root"&&s.children.length===1&&s.children[0].type===e.type?s.children[0]:s}function Fl(e,t){let n=-1;if(e)for(;++n<e.length;)t.handle(e[n])}function Db(e,t){Fl(e.children,t)}function Pb(e,t){jb(e,t),Fl(e.children,t),zb(e,t)}function Mb(e,t){t.parser.tokenizer.state>4&&(t.parser.tokenizer.state=0);const n={type:ce.CHARACTER,chars:e.value,location:Qn(e)};An(t,xt(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function Bb(e,t){const n={type:ce.DOCTYPE,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:Qn(e)};An(t,xt(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function Fb(e,t){t.stitches=!0;const n=Yb(e);if("children"in e&&"children"in n){const r=Bl({type:"root",children:e.children},t.options);n.children=r.children}Hl({type:"comment",value:{stitch:n}},t)}function Hl(e,t){const n=e.value,r={type:ce.COMMENT,data:n,location:Qn(e)};An(t,xt(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function Hb(e,t){if(t.parser.tokenizer.preprocessor.html="",t.parser.tokenizer.preprocessor.pos=-1,t.parser.tokenizer.preprocessor.lastGapPos=-2,t.parser.tokenizer.preprocessor.gapStack=[],t.parser.tokenizer.preprocessor.skipNextNewLine=!1,t.parser.tokenizer.preprocessor.lastChunkWritten=!1,t.parser.tokenizer.preprocessor.endOfChunkHit=!1,t.parser.tokenizer.preprocessor.isEol=!1,Ul(t,xt(e)),t.parser.tokenizer.write(e.value,!1),t.parser.tokenizer._runParsingLoop(),t.parser.tokenizer.state===72||t.parser.tokenizer.state===78){t.parser.tokenizer.preprocessor.lastChunkWritten=!0;const n=t.parser.tokenizer._consume();t.parser.tokenizer._callState(n)}}function Ub(e,t){const n=e;if(t.options.passThrough&&t.options.passThrough.includes(n.type))Fb(n,t);else{let r="";throw Rb.has(n.type)&&(r=". It looks like you are using MDX nodes with `hast-util-raw` (or `rehype-raw`). If you use this because you are using remark or rehype plugins that inject `'html'` nodes, then please raise an issue with that plugin, as its a bad and slow idea. If you use this because you are using markdown syntax, then you have to configure this utility (or plugin) to pass through these nodes (see `passThrough` in docs), but you can also migrate to use the MDX syntax"),new Error("Cannot compile `"+n.type+"` node"+r)}}function An(e,t){Ul(e,t);const n=e.parser.tokenizer.currentCharacterToken;n&&n.location&&(n.location.endLine=e.parser.tokenizer.preprocessor.line,n.location.endCol=e.parser.tokenizer.preprocessor.col+1,n.location.endOffset=e.parser.tokenizer.preprocessor.offset+1,e.parser.currentToken=n,e.parser._processToken(e.parser.currentToken)),e.parser.tokenizer.paused=!1,e.parser.tokenizer.inLoop=!1,e.parser.tokenizer.active=!1,e.parser.tokenizer.returnState=Oe.DATA,e.parser.tokenizer.charRefCode=-1,e.parser.tokenizer.consumedAfterSnapshot=-1,e.parser.tokenizer.currentLocation=null,e.parser.tokenizer.currentCharacterToken=null,e.parser.tokenizer.currentToken=null,e.parser.tokenizer.currentAttr={name:"",value:""}}function Ul(e,t){if(t&&t.offset!==void 0){const n={startLine:t.line,startCol:t.column,startOffset:t.offset,endLine:-1,endCol:-1,endOffset:-1};e.parser.tokenizer.preprocessor.lineStartPos=-t.column+1,e.parser.tokenizer.preprocessor.droppedBufferSize=t.offset,e.parser.tokenizer.preprocessor.line=t.line,e.parser.tokenizer.currentLocation=n}}function jb(e,t){const n=e.tagName.toLowerCase();if(t.parser.tokenizer.state===Oe.PLAINTEXT)return;An(t,xt(e));const r=t.parser.openElements.current;let i="namespaceURI"in r?r.namespaceURI:Yt.html;i===Yt.html&&n==="svg"&&(i=Yt.svg);const a=Qp({...e,children:[]},{space:i===Yt.svg?"svg":"html"}),s={type:ce.START_TAG,tagName:n,tagID:yn(n),selfClosing:!1,ackSelfClosing:!1,attrs:"attrs"in a?a.attrs:[],location:Qn(e)};t.parser.currentToken=s,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=n}function zb(e,t){const n=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&ig.includes(n)||t.parser.tokenizer.state===Oe.PLAINTEXT)return;An(t,Rr(e));const r={type:ce.END_TAG,tagName:n,tagID:yn(n),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:Qn(e)};t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken),n===t.parser.tokenizer.lastStartTagName&&(t.parser.tokenizer.state===Oe.RCDATA||t.parser.tokenizer.state===Oe.RAWTEXT||t.parser.tokenizer.state===Oe.SCRIPT_DATA)&&(t.parser.tokenizer.state=Oe.DATA)}function $b(e){const t=e.type==="root"?e.children[0]:e;return!!(t&&(t.type==="doctype"||t.type==="element"&&t.tagName.toLowerCase()==="html"))}function Qn(e){const t=xt(e)||{line:void 0,column:void 0,offset:void 0},n=Rr(e)||{line:void 0,column:void 0,offset:void 0};return{startLine:t.line,startCol:t.column,startOffset:t.offset,endLine:n.line,endCol:n.column,endOffset:n.offset}}function Yb(e){return"children"in e?pn({...e,children:[]}):pn(e)}function jl(e){return function(t,n){return Bl(t,{...e,file:n})}}const zl=({children:e})=>C.jsx("div",{className:"p-3",children:e}),Gb=({content:e,metaData:t})=>C.jsx(zl,{children:C.jsx("div",{className:"flex justify-end",children:C.jsx("div",{className:`ml-auto w-fit max-w-full px-4 py-3 rounded-2xl rounded-br-md transition-all duration-300 text-left ${t?.isErrorMessage?"bg-red-100 border-l-4 border-red-400 text-red-800 shadow-md animate-fade-in":"bg-violet-600 text-white shadow-sm"}`,children:C.jsx("div",{children:C.jsx(tl,{rehypePlugins:[jl],children:e&&e})})})})});function oo(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}function Vb(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function qb(e,t,n){const i=Br((n||{}).ignore||[]),a=Wb(t);let s=-1;for(;++s<a.length;)Zu(e,"text",o);function o(c,d){let f=-1,m;for(;++f<d.length;){const h=d[f],b=m?m.children:void 0;if(i(h,b?b.indexOf(h):void 0,m))return;m=h}if(m)return u(c,d)}function u(c,d){const f=d[d.length-1],m=a[s][0],h=a[s][1];let b=0;const w=f.children.indexOf(c);let y=!1,_=[];m.lastIndex=0;let S=m.exec(c.value);for(;S;){const D=S.index,I={index:S.index,input:S.input,stack:[...d,c]};let N=h(...S,I);if(typeof N=="string"&&(N=N.length>0?{type:"text",value:N}:void 0),N===!1?m.lastIndex=D+1:(b!==D&&_.push({type:"text",value:c.value.slice(b,D)}),Array.isArray(N)?_.push(...N):N&&_.push(N),b=D+S[0].length,y=!0),!m.global)break;S=m.exec(c.value)}return y?(b<c.value.length&&_.push({type:"text",value:c.value.slice(b)}),f.children.splice(w,1,..._)):_=[c],w+_.length}}function Wb(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 i=n[r];t.push([Xb(i[0]),Qb(i[1])])}return t}function Xb(e){return typeof e=="string"?new RegExp(Vb(e),"g"):e}function Qb(e){return typeof e=="function"?e:function(){return e}}const pi="phrasing",gi=["autolink","link","image","label"];function Kb(){return{transforms:[iE],enter:{literalAutolink:Zb,literalAutolinkEmail:bi,literalAutolinkHttp:bi,literalAutolinkWww:bi},exit:{literalAutolink:rE,literalAutolinkEmail:nE,literalAutolinkHttp:eE,literalAutolinkWww:tE}}}function Jb(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:pi,notInConstruct:gi},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:pi,notInConstruct:gi},{character:":",before:"[ps]",after:"\\/",inConstruct:pi,notInConstruct:gi}]}}function Zb(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function bi(e){this.config.enter.autolinkProtocol.call(this,e)}function eE(e){this.config.exit.autolinkProtocol.call(this,e)}function tE(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 nE(e){this.config.exit.autolinkEmail.call(this,e)}function rE(e){this.exit(e)}function iE(e){qb(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,aE],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),sE]],{ignore:["link","linkReference"]})}function aE(e,t,n,r,i){let a="";if(!$l(i)||(/^w/i.test(t)&&(n=t+n,t="",a="http://"),!oE(n)))return!1;const s=uE(n+r);if(!s[0])return!1;const o={type:"link",title:null,url:a+t+s[0],children:[{type:"text",value:t+s[0]}]};return s[1]?[o,{type:"text",value:s[1]}]:o}function sE(e,t,n,r){return!$l(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function oE(e){const t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function uE(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const i=oo(e,"(");let a=oo(e,")");for(;r!==-1&&i>a;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),a++;return[e,n]}function $l(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||Wt(n)||Dr(n))&&(!t||n!==47)}Yl.peek=bE;function lE(){this.buffer()}function cE(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function dE(){this.buffer()}function fE(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function hE(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=dt(this.sliceSerialize(e)).toLowerCase(),n.label=t}function mE(e){this.exit(e)}function pE(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=dt(this.sliceSerialize(e)).toLowerCase(),n.label=t}function gE(e){this.exit(e)}function bE(){return"["}function Yl(e,t,n,r){const i=n.createTracker(r);let a=i.move("[^");const s=n.enter("footnoteReference"),o=n.enter("reference");return a+=i.move(n.safe(n.associationId(e),{after:"]",before:a})),o(),s(),a+=i.move("]"),a}function EE(){return{enter:{gfmFootnoteCallString:lE,gfmFootnoteCall:cE,gfmFootnoteDefinitionLabelString:dE,gfmFootnoteDefinition:fE},exit:{gfmFootnoteCallString:hE,gfmFootnoteCall:mE,gfmFootnoteDefinitionLabelString:pE,gfmFootnoteDefinition:gE}}}function TE(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:Yl},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,i,a,s){const o=a.createTracker(s);let u=o.move("[^");const c=a.enter("footnoteDefinition"),d=a.enter("label");return u+=o.move(a.safe(a.associationId(r),{before:u,after:"]"})),d(),u+=o.move("]:"),r.children&&r.children.length>0&&(o.shift(4),u+=o.move((t?`
62
- `:" ")+a.indentLines(a.containerFlow(r,o.current()),t?Gl:xE))),c(),u}}function xE(e,t,n){return t===0?e:Gl(e,t,n)}function Gl(e,t,n){return(n?"":" ")+e}const yE=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];Vl.peek=wE;function AE(){return{canContainEols:["delete"],enter:{strikethrough:CE},exit:{strikethrough:SE}}}function _E(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:yE}],handlers:{delete:Vl}}}function CE(e){this.enter({type:"delete",children:[]},e)}function SE(e){this.exit(e)}function Vl(e,t,n,r){const i=n.createTracker(r),a=n.enter("strikethrough");let s=i.move("~~");return s+=n.containerPhrasing(e,{...i.current(),before:s,after:"~"}),s+=i.move("~~"),a(),s}function wE(){return"~"}function vE(e){return e.length}function IE(e,t){const n=t||{},r=(n.align||[]).concat(),i=n.stringLength||vE,a=[],s=[],o=[],u=[];let c=0,d=-1;for(;++d<e.length;){const A=[],w=[];let y=-1;for(e[d].length>c&&(c=e[d].length);++y<e[d].length;){const _=NE(e[d][y]);if(n.alignDelimiters!==!1){const S=i(_);w[y]=S,(u[y]===void 0||S>u[y])&&(u[y]=S)}A.push(_)}s[d]=A,o[d]=w}let f=-1;if(typeof r=="object"&&"length"in r)for(;++f<c;)a[f]=uo(r[f]);else{const A=uo(r);for(;++f<c;)a[f]=A}f=-1;const m=[],h=[];for(;++f<c;){const A=a[f];let w="",y="";A===99?(w=":",y=":"):A===108?w=":":A===114&&(y=":");let _=n.alignDelimiters===!1?1:Math.max(1,u[f]-w.length-y.length);const S=w+"-".repeat(_)+y;n.alignDelimiters!==!1&&(_=w.length+_+y.length,_>u[f]&&(u[f]=_),h[f]=_),m[f]=S}s.splice(1,0,m),o.splice(1,0,h),d=-1;const b=[];for(;++d<s.length;){const A=s[d],w=o[d];f=-1;const y=[];for(;++f<c;){const _=A[f]||"";let S="",D="";if(n.alignDelimiters!==!1){const I=u[f]-(w[f]||0),N=a[f];N===114?S=" ".repeat(I):N===99?I%2?(S=" ".repeat(I/2+.5),D=" ".repeat(I/2-.5)):(S=" ".repeat(I/2),D=S):D=" ".repeat(I)}n.delimiterStart!==!1&&!f&&y.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&_==="")&&(n.delimiterStart!==!1||f)&&y.push(" "),n.alignDelimiters!==!1&&y.push(S),y.push(_),n.alignDelimiters!==!1&&y.push(D),n.padding!==!1&&y.push(" "),(n.delimiterEnd!==!1||f!==c-1)&&y.push("|")}b.push(n.delimiterEnd===!1?y.join("").replace(/ +$/,""):y.join(""))}return b.join(`
63
- `)}function NE(e){return e==null?"":String(e)}function uo(e){const t=typeof e=="string"?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}function kE(e,t,n,r){const i=n.enter("blockquote"),a=n.createTracker(r);a.move("> "),a.shift(2);const s=n.indentLines(n.containerFlow(e,a.current()),OE);return i(),s}function OE(e,t,n){return">"+(n?"":" ")+e}function LE(e,t){return lo(e,t.inConstruct,!0)&&!lo(e,t.notInConstruct,!1)}function lo(e,t,n){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function co(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
64
- `&&LE(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?"":" ";return`\\
65
- `}function RE(e,t){const n=String(e);let r=n.indexOf(t),i=r,a=0,s=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===i?++a>s&&(s=a):a=1,i=r+t.length,r=n.indexOf(t,i);return s}function DE(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function PE(e){const t=e.options.fence||"`";if(t!=="`"&&t!=="~")throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function ME(e,t,n,r){const i=PE(n),a=e.value||"",s=i==="`"?"GraveAccent":"Tilde";if(DE(e,n)){const f=n.enter("codeIndented"),m=n.indentLines(a,BE);return f(),m}const o=n.createTracker(r),u=i.repeat(Math.max(RE(a,i)+1,3)),c=n.enter("codeFenced");let d=o.move(u);if(e.lang){const f=n.enter(`codeFencedLang${s}`);d+=o.move(n.safe(e.lang,{before:d,after:" ",encode:["`"],...o.current()})),f()}if(e.lang&&e.meta){const f=n.enter(`codeFencedMeta${s}`);d+=o.move(" "),d+=o.move(n.safe(e.meta,{before:d,after:`
59
+ `}),n}function io(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function ao(e,t){const n=Jm(e,t),r=n.one(e,void 0),i=$m(n),a=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&a.children.push({type:"text",value:`
60
+ `},i),a}function ig(e,t){return e&&"run"in e?async function(n,r){const i=ao(n,{file:r,...t});await e.run(i,r)}:function(n,r){return ao(n,{file:r,...t||e})}}function so(e){if(e)throw e}var Ei,oo;function ag(){if(oo)return Ei;oo=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=function(c){return typeof Array.isArray=="function"?Array.isArray(c):t.call(c)==="[object Array]"},a=function(c){if(!c||t.call(c)!=="[object Object]")return!1;var d=e.call(c,"constructor"),f=c.constructor&&c.constructor.prototype&&e.call(c.constructor.prototype,"isPrototypeOf");if(c.constructor&&!d&&!f)return!1;var p;for(p in c);return typeof p>"u"||e.call(c,p)},s=function(c,d){n&&d.name==="__proto__"?n(c,d.name,{enumerable:!0,configurable:!0,value:d.newValue,writable:!0}):c[d.name]=d.newValue},o=function(c,d){if(d==="__proto__")if(e.call(c,d)){if(r)return r(c,d).value}else return;return c[d]};return Ei=function u(){var c,d,f,p,h,b,y=arguments[0],w=1,_=arguments.length,k=!1;for(typeof y=="boolean"&&(k=y,y=arguments[1]||{},w=2),(y==null||typeof y!="object"&&typeof y!="function")&&(y={});w<_;++w)if(c=arguments[w],c!=null)for(d in c)f=o(y,d),p=o(c,d),y!==p&&(k&&p&&(a(p)||(h=i(p)))?(h?(h=!1,b=f&&i(f)?f:[]):b=f&&a(f)?f:{},s(y,{name:d,newValue:u(k,b,p)})):typeof p<"u"&&s(y,{name:d,newValue:p}));return y},Ei}var sg=ag();const Ti=ya(sg);function aa(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function og(){const e=[],t={run:n,use:r};return t;function n(...i){let a=-1;const s=i.pop();if(typeof s!="function")throw new TypeError("Expected function as last argument, not "+s);o(null,...i);function o(u,...c){const d=e[++a];let f=-1;if(u){s(u);return}for(;++f<i.length;)(c[f]===null||c[f]===void 0)&&(c[f]=i[f]);i=c,d?ug(d,o)(...c):s(null,...c)}}function r(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),t}}function ug(e,t){let n;return r;function r(...s){const o=e.length>s.length;let u;o&&s.push(i);try{u=e.apply(this,s)}catch(c){const d=c;if(o&&n)throw d;return i(d)}o||(u&&u.then&&typeof u.then=="function"?u.then(a,i):u instanceof Error?i(u):a(u))}function i(s,...o){n||(n=!0,t(s,...o))}function a(s){i(null,s)}}const gt={basename:lg,dirname:cg,extname:dg,join:fg,sep:"/"};function lg(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');tr(e);let n=0,r=-1,i=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else r<0&&(a=!0,r=i+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let s=-1,o=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else s<0&&(a=!0,s=i+1),o>-1&&(e.codePointAt(i)===t.codePointAt(o--)?o<0&&(r=i):(o=-1,r=s));return n===r?r=s:r<0&&(r=e.length),e.slice(n,r)}function cg(e){if(tr(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function dg(e){tr(e);let t=e.length,n=-1,r=0,i=-1,a=0,s;for(;t--;){const o=e.codePointAt(t);if(o===47){if(s){r=t+1;break}continue}n<0&&(s=!0,n=t+1),o===46?i<0?i=t:a!==1&&(a=1):i>-1&&(a=-1)}return i<0||n<0||a===0||a===1&&i===n-1&&i===r+1?"":e.slice(i,n)}function fg(...e){let t=-1,n;for(;++t<e.length;)tr(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":hg(n)}function hg(e){tr(e);const t=e.codePointAt(0)===47;let n=pg(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function pg(e,t){let n="",r=0,i=-1,a=0,s=-1,o,u;for(;++s<=e.length;){if(s<e.length)o=e.codePointAt(s);else{if(o===47)break;o=47}if(o===47){if(!(i===s-1||a===1))if(i!==s-1&&a===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(u=n.lastIndexOf("/"),u!==n.length-1){u<0?(n="",r=0):(n=n.slice(0,u),r=n.length-1-n.lastIndexOf("/")),i=s,a=0;continue}}else if(n.length>0){n="",r=0,i=s,a=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(i+1,s):n=e.slice(i+1,s),r=s-i-1;i=s,a=0}else o===46&&a>-1?a++:a=-1}return n}function tr(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const mg={cwd:gg};function gg(){return"/"}function sa(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function bg(e){if(typeof e=="string")e=new URL(e);else if(!sa(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return Eg(e)}function Eg(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const r=t.codePointAt(n+2);if(r===70||r===102){const i=new TypeError("File URL path must not include encoded / characters");throw i.code="ERR_INVALID_FILE_URL_PATH",i}}return decodeURIComponent(t)}const yi=["history","path","basename","stem","extname","dirname"];class Il{constructor(t){let n;t?sa(t)?n={path:t}:typeof t=="string"||Tg(t)?n={value:t}:n=t:n={},this.cwd=mg.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<yi.length;){const a=yi[r];a in n&&n[a]!==void 0&&n[a]!==null&&(this[a]=a==="history"?[...n[a]]:n[a])}let i;for(i in n)yi.includes(i)||(this[i]=n[i])}get basename(){return typeof this.path=="string"?gt.basename(this.path):void 0}set basename(t){Si(t,"basename"),xi(t,"basename"),this.path=gt.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?gt.dirname(this.path):void 0}set dirname(t){uo(this.basename,"dirname"),this.path=gt.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?gt.extname(this.path):void 0}set extname(t){if(xi(t,"extname"),uo(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=gt.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){sa(t)&&(t=bg(t)),Si(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?gt.basename(this.path,this.extname):void 0}set stem(t){Si(t,"stem"),xi(t,"stem"),this.path=gt.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const i=this.message(t,n,r);throw i.fatal=!0,i}info(t,n,r){const i=this.message(t,n,r);return i.fatal=void 0,i}message(t,n,r){const i=new Ge(t,n,r);return this.path&&(i.name=this.path+":"+i.name,i.file=this.path),i.fatal=!1,this.messages.push(i),i}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function xi(e,t){if(e&&e.includes(gt.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+gt.sep+"`")}function Si(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function uo(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function Tg(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const yg=(function(e){const r=this.constructor.prototype,i=r[e],a=function(){return i.apply(a,arguments)};Object.setPrototypeOf(a,r);const s=Object.getOwnPropertyNames(i);for(const o of s){const u=Object.getOwnPropertyDescriptor(i,o);u&&Object.defineProperty(a,o,u)}return a}),xg={}.hasOwnProperty;class Fa extends yg{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=og()}copy(){const t=new Fa;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(Ti(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(Ai("data",this.frozen),this.namespace[t]=n,this):xg.call(this.namespace,t)&&this.namespace[t]||void 0:t?(Ai("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const i=n.call(t,...r);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=fr(t),r=this.parser||this.Parser;return _i("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),_i("process",this.parser||this.Parser),Ci("process",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(a,s){const o=fr(t),u=r.parse(o);r.run(u,o,function(d,f,p){if(d||!f||!p)return c(d);const h=f,b=r.stringify(h,p);Cg(b)?p.value=b:p.result=b,c(d,p)});function c(d,f){d||!f?s(d):a?a(f):n(void 0,f)}}}processSync(t){let n=!1,r;return this.freeze(),_i("processSync",this.parser||this.Parser),Ci("processSync",this.compiler||this.Compiler),this.process(t,i),co("processSync","process",n),r;function i(a,s){n=!0,so(a),r=s}}run(t,n,r){lo(t),this.freeze();const i=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?a(void 0,r):new Promise(a);function a(s,o){const u=fr(n);i.run(t,u,c);function c(d,f,p){const h=f||t;d?o(d):s?s(h):r(void 0,h,p)}}}runSync(t,n){let r=!1,i;return this.run(t,n,a),co("runSync","run",r),i;function a(s,o){so(s),i=o,r=!0}}stringify(t,n){this.freeze();const r=fr(n),i=this.compiler||this.Compiler;return Ci("stringify",i),lo(t),i(t,r)}use(t,...n){const r=this.attachers,i=this.namespace;if(Ai("use",this.frozen),t!=null)if(typeof t=="function")u(t,n);else if(typeof t=="object")Array.isArray(t)?o(t):s(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function a(c){if(typeof c=="function")u(c,[]);else if(typeof c=="object")if(Array.isArray(c)){const[d,...f]=c;u(d,f)}else s(c);else throw new TypeError("Expected usable value, not `"+c+"`")}function s(c){if(!("plugins"in c)&&!("settings"in c))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");o(c.plugins),c.settings&&(i.settings=Ti(!0,i.settings,c.settings))}function o(c){let d=-1;if(c!=null)if(Array.isArray(c))for(;++d<c.length;){const f=c[d];a(f)}else throw new TypeError("Expected a list of plugins, not `"+c+"`")}function u(c,d){let f=-1,p=-1;for(;++f<r.length;)if(r[f][0]===c){p=f;break}if(p===-1)r.push([c,...d]);else if(d.length>0){let[h,...b]=d;const y=r[p][1];aa(y)&&aa(h)&&(h=Ti(!0,y,h)),r[p]=[c,h,...b]}}}}const Sg=new Fa().freeze();function _i(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Ci(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Ai(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 lo(e){if(!aa(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function co(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function fr(e){return _g(e)?e:new Il(e)}function _g(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function Cg(e){return typeof e=="string"||Ag(e)}function Ag(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const wg="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",fo=[],ho={allowDangerousHtml:!0},Ig=/^(https?|ircs?|mailto|xmpp)$/i,vg=[{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 Ha(e){const t=e.allowedElements,n=e.allowElement,r=e.children||"",i=e.className,a=e.components,s=e.disallowedElements,o=e.rehypePlugins||fo,u=e.remarkPlugins||fo,c=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...ho}:ho,d=e.skipHtml,f=e.unwrapDisallowed,p=e.urlTransform||kg,h=Sg().use(cm).use(u).use(ig,c).use(o),b=new Il;typeof r=="string"&&(b.value=r);for(const k of vg)Object.hasOwn(e,k.from)&&(""+k.from+(k.to?"use `"+k.to+"` instead":"remove it")+wg+k.id,void 0);const y=h.parse(b);let w=h.runSync(y,b);return i&&(w={type:"element",tagName:"div",properties:{className:i},children:w.type==="root"?w.children:[w]}),Vr(w,_),Vh(w,{Fragment:S.Fragment,components:a,ignoreInvalidStyle:!0,jsx:S.jsx,jsxs:S.jsxs,passKeys:!0,passNode:!0});function _(k,N,L){if(k.type==="raw"&&L&&typeof N=="number")return d?L.children.splice(N,1):L.children[N]={type:"text",value:k.value},N;if(k.type==="element"){let A;for(A in mi)if(Object.hasOwn(mi,A)&&Object.hasOwn(k.properties,A)){const v=k.properties[A],z=mi[A];(z===null||z.includes(k.tagName))&&(k.properties[A]=p(String(v||""),A,k))}}if(k.type==="element"){let A=t?!t.includes(k.tagName):s?s.includes(k.tagName):!1;if(!A&&n&&typeof N=="number"&&(A=!n(k,N,L)),A&&L&&typeof N=="number")return f&&k.children?L.children.splice(N,1,...k.children):L.children.splice(N,1),N}}}function kg(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),i=e.indexOf("/");return t<0||i>-1&&t>i||n>-1&&t>n||r>-1&&t>r||Ig.test(e.slice(0,t))?e:""}const po=/[#.]/g;function Ng(e,t){const n=e||"",r={};let i=0,a,s;for(;i<n.length;){po.lastIndex=i;const o=po.exec(n),u=n.slice(i,o?o.index:n.length);u&&(a?a==="#"?r.id=u:Array.isArray(r.className)?r.className.push(u):r.className=[u]:s=u,i+=u.length),o&&(a=o[0],i++)}return{type:"element",tagName:s||t||"div",properties:r,children:[]}}const Og=new Set(["button","menu","reset","submit"]),oa={}.hasOwnProperty;function vl(e,t,n){const r=n&&Pg(n);function i(a,s,...o){let u=-1,c;if(a==null){c={type:"root",children:[]};const d=s;o.unshift(d)}else if(c=Ng(a,t),c.tagName=c.tagName.toLowerCase(),r&&oa.call(r,c.tagName)&&(c.tagName=r[c.tagName]),Rg(s,c.tagName)){let d;for(d in s)oa.call(s,d)&&Lg(e,c.properties,d,s[d])}else o.unshift(s);for(;++u<o.length;)ua(c.children,o[u]);return c.type==="element"&&c.tagName==="template"&&(c.content={type:"root",children:c.children},c.children=[]),c}return i}function Rg(e,t){return e==null||typeof e!="object"||Array.isArray(e)?!1:t==="input"||!e.type||typeof e.type!="string"?!0:"children"in e&&Array.isArray(e.children)?!1:t==="button"?Og.has(e.type.toLowerCase()):!("value"in e)}function Lg(e,t,n,r){const i=Ur(e,n);let a=-1,s;if(r!=null){if(typeof r=="number"){if(Number.isNaN(r))return;s=r}else typeof r=="boolean"?s=r:typeof r=="string"?i.spaceSeparated?s=Ps(r):i.commaSeparated?s=Ns(r):i.commaOrSpaceSeparated?s=Ps(Ns(r).join(" ")):s=mo(i,i.property,r):Array.isArray(r)?s=r.concat():s=i.property==="style"?Dg(r):String(r);if(Array.isArray(s)){const o=[];for(;++a<s.length;){const u=mo(i,i.property,s[a]);o[a]=u}s=o}if(i.property==="className"&&Array.isArray(t.className)){const o=s;s=t.className.concat(o)}t[i.property]=s}}function ua(e,t){let n=-1;if(t!=null)if(typeof t=="string"||typeof t=="number")e.push({type:"text",value:String(t)});else if(Array.isArray(t))for(;++n<t.length;)ua(e,t[n]);else if(typeof t=="object"&&"type"in t)t.type==="root"?ua(e,t.children):e.push(t);else throw new Error("Expected node, nodes, or string, got `"+t+"`")}function mo(e,t,n){if(typeof n=="string"){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===""||Vn(n)===Vn(t)))return!0}return n}function Dg(e){const t=[];let n;for(n in e)oa.call(e,n)&&t.push([n,e[n]].join(": "));return t.join("; ")}function Pg(e){const t={};let n=-1;for(;++n<e.length;)t[e[n].toLowerCase()]=e[n];return t}const Mg=["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","solidColor","textArea","textPath"],Bg=vl(Jn,"div"),Fg=vl(jt,"g",Mg);function Hg(e){const t=String(e),n=[];return{toOffset:i,toPoint:r};function r(a){if(typeof a=="number"&&a>-1&&a<=t.length){let s=0;for(;;){let o=n[s];if(o===void 0){const u=go(t,n[s-1]);o=u===-1?t.length+1:u+1,n[s]=o}if(o>a)return{line:s+1,column:a-(s>0?n[s-1]:0)+1,offset:a};s++}}}function i(a){if(a&&typeof a.line=="number"&&typeof a.column=="number"&&!Number.isNaN(a.line)&&!Number.isNaN(a.column)){for(;n.length<a.line;){const o=n[n.length-1],u=go(t,o),c=u===-1?t.length+1:u+1;if(o===c)break;n.push(c)}const s=(a.line>1?n[a.line-2]:0)+a.column-1;if(s<n[a.line-1])return s}}}function go(e,t){const n=e.indexOf("\r",t),r=e.indexOf(`
61
+ `,t);return r===-1?n:n===-1||n+1===r?r:n<r?n:r}const Qt={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"},kl={}.hasOwnProperty,Ug=Object.prototype;function jg(e,t){const n=t||{};return Ua({file:n.file||void 0,location:!1,schema:n.space==="svg"?jt:Jn,verbose:n.verbose||!1},e)}function Ua(e,t){let n;switch(t.nodeName){case"#comment":{const r=t;return n={type:"comment",value:r.data},xr(e,r,n),n}case"#document":case"#document-fragment":{const r=t,i="mode"in r?r.mode==="quirks"||r.mode==="limited-quirks":!1;if(n={type:"root",children:Nl(e,t.childNodes),data:{quirksMode:i}},e.file&&e.location){const a=String(e.file),s=Hg(a),o=s.toPoint(0),u=s.toPoint(a.length);n.position={start:o,end:u}}return n}case"#documentType":{const r=t;return n={type:"doctype"},xr(e,r,n),n}case"#text":{const r=t;return n={type:"text",value:r.value},xr(e,r,n),n}default:return n=zg(e,t),n}}function Nl(e,t){let n=-1;const r=[];for(;++n<t.length;){const i=Ua(e,t[n]);r.push(i)}return r}function zg(e,t){const n=e.schema;e.schema=t.namespaceURI===Qt.svg?jt:Jn;let r=-1;const i={};for(;++r<t.attrs.length;){const o=t.attrs[r],u=(o.prefix?o.prefix+":":"")+o.name;kl.call(Ug,u)||(i[u]=o.value)}const s=(e.schema.space==="svg"?Fg:Bg)(t.tagName,i,Nl(e,t.childNodes));if(xr(e,t,s),s.tagName==="template"){const o=t,u=o.sourceCodeLocation,c=u&&u.startTag&&gn(u.startTag),d=u&&u.endTag&&gn(u.endTag),f=Ua(e,o.content);c&&d&&e.file&&(f.position={start:c.end,end:d.start}),s.content=f}return e.schema=n,s}function xr(e,t,n){if("sourceCodeLocation"in t&&t.sourceCodeLocation&&e.file){const r=$g(e,n,t.sourceCodeLocation);r&&(e.location=!0,n.position=r)}}function $g(e,t,n){const r=gn(n);if(t.type==="element"){const i=t.children[t.children.length-1];if(r&&!n.endTag&&i&&i.position&&i.position.end&&(r.end=Object.assign({},i.position.end)),e.verbose){const a={};let s;if(n.attrs)for(s in n.attrs)kl.call(n.attrs,s)&&(a[Ur(e.schema,s).property]=gn(n.attrs[s]));n.startTag;const o=gn(n.startTag),u=n.endTag?gn(n.endTag):void 0,c={opening:o};u&&(c.closing=u),c.properties=a,t.data={position:c}}}return r}function gn(e){const t=bo({line:e.startLine,column:e.startCol,offset:e.startOffset}),n=bo({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||n?{start:t,end:n}:void 0}function bo(e){return e.line&&e.column?e:void 0}const Eo={}.hasOwnProperty;function Ol(e,t){const n=t||{};function r(i,...a){let s=r.invalid;const o=r.handlers;if(i&&Eo.call(i,e)){const u=String(i[e]);s=Eo.call(o,u)?o[u]:r.unknown}if(s)return s.call(this,i,...a)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}const Yg={},Gg={}.hasOwnProperty,Rl=Ol("type",{handlers:{root:Vg,element:Zg,text:Qg,comment:Kg,doctype:Xg}});function qg(e,t){const r=(t||Yg).space;return Rl(e,r==="svg"?jt:Jn)}function Vg(e,t){const n={nodeName:"#document",mode:(e.data||{}).quirksMode?"quirks":"no-quirks",childNodes:[]};return n.childNodes=ja(e.children,n,t),wn(e,n),n}function Wg(e,t){const n={nodeName:"#document-fragment",childNodes:[]};return n.childNodes=ja(e.children,n,t),wn(e,n),n}function Xg(e){const t={nodeName:"#documentType",name:"html",publicId:"",systemId:"",parentNode:null};return wn(e,t),t}function Qg(e){const t={nodeName:"#text",value:e.value,parentNode:null};return wn(e,t),t}function Kg(e){const t={nodeName:"#comment",data:e.value,parentNode:null};return wn(e,t),t}function Zg(e,t){const n=t;let r=n;e.type==="element"&&e.tagName.toLowerCase()==="svg"&&n.space==="html"&&(r=jt);const i=[];let a;if(e.properties){for(a in e.properties)if(a!=="children"&&Gg.call(e.properties,a)){const u=Jg(r,a,e.properties[a]);u&&i.push(u)}}const s=r.space,o={nodeName:e.tagName,tagName:e.tagName,attrs:i,namespaceURI:Qt[s],childNodes:[],parentNode:null};return o.childNodes=ja(e.children,o,r),wn(e,o),e.tagName==="template"&&e.content&&(o.content=Wg(e.content,r)),o}function Jg(e,t,n){const r=Ur(e,t);if(n===!1||n===null||n===void 0||typeof n=="number"&&Number.isNaN(n)||!n&&r.boolean)return;Array.isArray(n)&&(n=r.commaSeparated?Gu(n):el(n));const i={name:r.attribute,value:n===!0?"":String(n)};if(r.space&&r.space!=="html"&&r.space!=="svg"){const a=i.name.indexOf(":");a<0?i.prefix="":(i.name=i.name.slice(a+1),i.prefix=r.attribute.slice(0,a)),i.namespace=Qt[r.space]}return i}function ja(e,t,n){let r=-1;const i=[];if(e)for(;++r<e.length;){const a=Rl(e[r],n);a.parentNode=t,i.push(a)}return i}function wn(e,t){const n=e.position;n&&n.start&&n.end&&(n.start.offset,n.end.offset,t.sourceCodeLocation={startLine:n.start.line,startCol:n.start.column,startOffset:n.start.offset,endLine:n.end.line,endCol:n.end.column,endOffset:n.end.offset})}const eb=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"],tb=new Set([65534,65535,131070,131071,196606,196607,262142,262143,327678,327679,393214,393215,458750,458751,524286,524287,589822,589823,655358,655359,720894,720895,786430,786431,851966,851967,917502,917503,983038,983039,1048574,1048575,1114110,1114111]),Le="�";var g;(function(e){e[e.EOF=-1]="EOF",e[e.NULL=0]="NULL",e[e.TABULATION=9]="TABULATION",e[e.CARRIAGE_RETURN=13]="CARRIAGE_RETURN",e[e.LINE_FEED=10]="LINE_FEED",e[e.FORM_FEED=12]="FORM_FEED",e[e.SPACE=32]="SPACE",e[e.EXCLAMATION_MARK=33]="EXCLAMATION_MARK",e[e.QUOTATION_MARK=34]="QUOTATION_MARK",e[e.AMPERSAND=38]="AMPERSAND",e[e.APOSTROPHE=39]="APOSTROPHE",e[e.HYPHEN_MINUS=45]="HYPHEN_MINUS",e[e.SOLIDUS=47]="SOLIDUS",e[e.DIGIT_0=48]="DIGIT_0",e[e.DIGIT_9=57]="DIGIT_9",e[e.SEMICOLON=59]="SEMICOLON",e[e.LESS_THAN_SIGN=60]="LESS_THAN_SIGN",e[e.EQUALS_SIGN=61]="EQUALS_SIGN",e[e.GREATER_THAN_SIGN=62]="GREATER_THAN_SIGN",e[e.QUESTION_MARK=63]="QUESTION_MARK",e[e.LATIN_CAPITAL_A=65]="LATIN_CAPITAL_A",e[e.LATIN_CAPITAL_Z=90]="LATIN_CAPITAL_Z",e[e.RIGHT_SQUARE_BRACKET=93]="RIGHT_SQUARE_BRACKET",e[e.GRAVE_ACCENT=96]="GRAVE_ACCENT",e[e.LATIN_SMALL_A=97]="LATIN_SMALL_A",e[e.LATIN_SMALL_Z=122]="LATIN_SMALL_Z"})(g||(g={}));const Ze={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function Ll(e){return e>=55296&&e<=57343}function nb(e){return e>=56320&&e<=57343}function rb(e,t){return(e-55296)*1024+9216+t}function Dl(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function Pl(e){return e>=64976&&e<=65007||tb.has(e)}var D;(function(e){e.controlCharacterInInputStream="control-character-in-input-stream",e.noncharacterInInputStream="noncharacter-in-input-stream",e.surrogateInInputStream="surrogate-in-input-stream",e.nonVoidHtmlElementStartTagWithTrailingSolidus="non-void-html-element-start-tag-with-trailing-solidus",e.endTagWithAttributes="end-tag-with-attributes",e.endTagWithTrailingSolidus="end-tag-with-trailing-solidus",e.unexpectedSolidusInTag="unexpected-solidus-in-tag",e.unexpectedNullCharacter="unexpected-null-character",e.unexpectedQuestionMarkInsteadOfTagName="unexpected-question-mark-instead-of-tag-name",e.invalidFirstCharacterOfTagName="invalid-first-character-of-tag-name",e.unexpectedEqualsSignBeforeAttributeName="unexpected-equals-sign-before-attribute-name",e.missingEndTagName="missing-end-tag-name",e.unexpectedCharacterInAttributeName="unexpected-character-in-attribute-name",e.unknownNamedCharacterReference="unknown-named-character-reference",e.missingSemicolonAfterCharacterReference="missing-semicolon-after-character-reference",e.unexpectedCharacterAfterDoctypeSystemIdentifier="unexpected-character-after-doctype-system-identifier",e.unexpectedCharacterInUnquotedAttributeValue="unexpected-character-in-unquoted-attribute-value",e.eofBeforeTagName="eof-before-tag-name",e.eofInTag="eof-in-tag",e.missingAttributeValue="missing-attribute-value",e.missingWhitespaceBetweenAttributes="missing-whitespace-between-attributes",e.missingWhitespaceAfterDoctypePublicKeyword="missing-whitespace-after-doctype-public-keyword",e.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers="missing-whitespace-between-doctype-public-and-system-identifiers",e.missingWhitespaceAfterDoctypeSystemKeyword="missing-whitespace-after-doctype-system-keyword",e.missingQuoteBeforeDoctypePublicIdentifier="missing-quote-before-doctype-public-identifier",e.missingQuoteBeforeDoctypeSystemIdentifier="missing-quote-before-doctype-system-identifier",e.missingDoctypePublicIdentifier="missing-doctype-public-identifier",e.missingDoctypeSystemIdentifier="missing-doctype-system-identifier",e.abruptDoctypePublicIdentifier="abrupt-doctype-public-identifier",e.abruptDoctypeSystemIdentifier="abrupt-doctype-system-identifier",e.cdataInHtmlContent="cdata-in-html-content",e.incorrectlyOpenedComment="incorrectly-opened-comment",e.eofInScriptHtmlCommentLikeText="eof-in-script-html-comment-like-text",e.eofInDoctype="eof-in-doctype",e.nestedComment="nested-comment",e.abruptClosingOfEmptyComment="abrupt-closing-of-empty-comment",e.eofInComment="eof-in-comment",e.incorrectlyClosedComment="incorrectly-closed-comment",e.eofInCdata="eof-in-cdata",e.absenceOfDigitsInNumericCharacterReference="absence-of-digits-in-numeric-character-reference",e.nullCharacterReference="null-character-reference",e.surrogateCharacterReference="surrogate-character-reference",e.characterReferenceOutsideUnicodeRange="character-reference-outside-unicode-range",e.controlCharacterReference="control-character-reference",e.noncharacterCharacterReference="noncharacter-character-reference",e.missingWhitespaceBeforeDoctypeName="missing-whitespace-before-doctype-name",e.missingDoctypeName="missing-doctype-name",e.invalidCharacterSequenceAfterDoctypeName="invalid-character-sequence-after-doctype-name",e.duplicateAttribute="duplicate-attribute",e.nonConformingDoctype="non-conforming-doctype",e.missingDoctype="missing-doctype",e.misplacedDoctype="misplaced-doctype",e.endTagWithoutMatchingOpenElement="end-tag-without-matching-open-element",e.closingOfElementWithOpenChildElements="closing-of-element-with-open-child-elements",e.disallowedContentInNoscriptInHead="disallowed-content-in-noscript-in-head",e.openElementsLeftAfterEof="open-elements-left-after-eof",e.abandonedHeadElementChild="abandoned-head-element-child",e.misplacedStartTagForHeadElement="misplaced-start-tag-for-head-element",e.nestedNoscriptInHead="nested-noscript-in-head",e.eofInElementThatCanContainOnlyText="eof-in-element-that-can-contain-only-text"})(D||(D={}));const ib=65536;class ab{constructor(t){this.handler=t,this.html="",this.pos=-1,this.lastGapPos=-2,this.gapStack=[],this.skipNextNewLine=!1,this.lastChunkWritten=!1,this.endOfChunkHit=!1,this.bufferWaterline=ib,this.isEol=!1,this.lineStartPos=0,this.droppedBufferSize=0,this.line=1,this.lastErrOffset=-1}get col(){return this.pos-this.lineStartPos+ +(this.lastGapPos!==this.pos)}get offset(){return this.droppedBufferSize+this.pos}getError(t,n){const{line:r,col:i,offset:a}=this,s=i+n,o=a+n;return{code:t,startLine:r,endLine:r,startCol:s,endCol:s,startOffset:o,endOffset:o}}_err(t){this.handler.onParseError&&this.lastErrOffset!==this.offset&&(this.lastErrOffset=this.offset,this.handler.onParseError(this.getError(t,0)))}_addGap(){this.gapStack.push(this.lastGapPos),this.lastGapPos=this.pos}_processSurrogate(t){if(this.pos!==this.html.length-1){const n=this.html.charCodeAt(this.pos+1);if(nb(n))return this.pos++,this._addGap(),rb(t,n)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,g.EOF;return this._err(D.surrogateInInputStream),t}willDropParsedChunk(){return this.pos>this.bufferWaterline}dropParsedChunk(){this.willDropParsedChunk()&&(this.html=this.html.substring(this.pos),this.lineStartPos-=this.pos,this.droppedBufferSize+=this.pos,this.pos=0,this.lastGapPos=-2,this.gapStack.length=0)}write(t,n){this.html.length>0?this.html+=t:this.html=t,this.endOfChunkHit=!1,this.lastChunkWritten=n}insertHtmlAtCurrentPos(t){this.html=this.html.substring(0,this.pos+1)+t+this.html.substring(this.pos+1),this.endOfChunkHit=!1}startsWith(t,n){if(this.pos+t.length>this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,!1;if(n)return this.html.startsWith(t,this.pos);for(let r=0;r<t.length;r++)if((this.html.charCodeAt(this.pos+r)|32)!==t.charCodeAt(r))return!1;return!0}peek(t){const n=this.pos+t;if(n>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,g.EOF;const r=this.html.charCodeAt(n);return r===g.CARRIAGE_RETURN?g.LINE_FEED:r}advance(){if(this.pos++,this.isEol&&(this.isEol=!1,this.line++,this.lineStartPos=this.pos),this.pos>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,g.EOF;let t=this.html.charCodeAt(this.pos);return t===g.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,g.LINE_FEED):t===g.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,Ll(t)&&(t=this._processSurrogate(t)),this.handler.onParseError===null||t>31&&t<127||t===g.LINE_FEED||t===g.CARRIAGE_RETURN||t>159&&t<64976||this._checkForProblematicCharacters(t),t)}_checkForProblematicCharacters(t){Dl(t)?this._err(D.controlCharacterInInputStream):Pl(t)&&this._err(D.noncharacterInInputStream)}retreat(t){for(this.pos-=t;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}}var me;(function(e){e[e.CHARACTER=0]="CHARACTER",e[e.NULL_CHARACTER=1]="NULL_CHARACTER",e[e.WHITESPACE_CHARACTER=2]="WHITESPACE_CHARACTER",e[e.START_TAG=3]="START_TAG",e[e.END_TAG=4]="END_TAG",e[e.COMMENT=5]="COMMENT",e[e.DOCTYPE=6]="DOCTYPE",e[e.EOF=7]="EOF",e[e.HIBERNATION=8]="HIBERNATION"})(me||(me={}));function Ml(e,t){for(let n=e.attrs.length-1;n>=0;n--)if(e.attrs[n].name===t)return e.attrs[n].value;return null}const Bl=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏ੊ઑඡ๭༉༦჊ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ὾⁠↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms„‹•˜¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲ΂ϏϢϸontourIntegraìȹoɴ͹\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՗՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲ׌y;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱cò׋؀JTabcdfgorstר׬ׯ׺؀ؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d׷׸䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇܎ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ޷޼߂ߐĀiyޱ޵rc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄΀HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶߻dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣ঳সে্਷ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗ࡜ࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४Ānrࢃ࢏gleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpw৔ਖਛgȀLRlr৞৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼੝੠੷੼અઋ઎p;椅y;䐜Ādl੥੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑ඗ඞcy;䐊cute;䅃ƀaey઴હાron;䅇dil;䅅;䐝ƀgswે૰଎ativeƀMTV૓૟૨ediumSpace;怋hiĀcn૦૘ë૙eryThiî૙tedĀGL૸ଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷ଺reak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪୼஡௫ఄ౞಄ದ೘ൡඅ櫬Āou୛୤ngruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊ஛ement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater΀;EFGLSTஶஷ஽௉௓௘௥扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲௽ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ೒拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨೹setĀ;E೰ೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂ෉෕ෛ෠෧෼ขภยา฿ไlig;䅒cute耻Ó䃓Āiy෎ීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲ෶cr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬื฼de耻Õ䃕es;樷ml耻Ö䃖erĀBP๋๠Āar๐๓r;怾acĀek๚๜;揞et;掴arenthesis;揜Ҁacfhilors๿ງຊຏຒດຝະ໼rtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ໠໤檻cedesȀ;EST່້໏໚扺qual;檯lantEqual;扼ilde;找me;怳Ādp໩໮uct;戏ortionĀ;aȥ໹l;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬؀BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁࿫࿳ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL࿜࿝࿡憒ar;懥eftArrow;懄eiling;按oǵ࿹\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»࿝pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄ቉ቕ቞ቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHc቎ቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗Āeiቻ኉Dzኀ\0ኇefore;戴a;䎘Ācn኎ኘkSpace;쀀  Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0᏿ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0጖y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻፿on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtè૙a;䎖r;愨pf;愤cr;쀀𝒵௡ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚΀;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒΀;Eaeiop዁ᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;e዁ᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;e዁ᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰ᜼ᝃᝈ᝸᝽០៦ᠹᡐᜍ᤽᥈ᥰot;櫭Ācrᛶ᜞kȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e᜚᜛戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;t፜᜷brk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓ᝛ᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯ᝱ᝳ;䎲;愶een;扬r;쀀𝔟g΀costuvwឍឝឳេ៕៛៞ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀako៭ᠦᠵĀcn៲ᠣkƀlst៺֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘᠝斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈؀DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬ᣿ᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教΀;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ᣷᣹᣻᣽;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ᤟;敛;敘;攘;攔΀;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģ᥂bar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;e᜚᜜lƀ;bhᥨᥩᥫ䁜;槅sub;柈Ŭᥴ᥾lĀ;e᥹᥺怢t»᥺pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭍᭒\0᯽\0ᰌƀcpr᦭ᦲ᧝ute;䄇̀;abcdsᦿᧀᧄ᧊᧕᧙戩nd;橄rcup;橉Āau᧏᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r΀;Ecefms᩟᩠ᩢᩫ᪤᪪᪮旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖᪚᪟»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇᫔᫺\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ᫙\0\0᫢aĀ;t᫞᫟䀬;䁀ƀ;fl᫨᫩᫫戁îᅠeĀmx᫱᫶ent»᫩eóɍǧ᫾\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯΀delprvw᭠᭬᭷ᮂᮬᯔ᯹arrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;p᭿ᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰸᰻᰿ᱝᱩᱵᲊᲞᲬᲷ᳻᳿ᴍᵻᶑᶫᶻ᷆᷍rò΁ar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂͸᳖᳜᳠mƀ;oș᳊᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄ὎὚ĀDoḆᴴoôᲉĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»Ṻƀaeiἒ἖Ἒls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙ῜ῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao‌⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧‪‬\0‮耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₟₥₰₴⃰⃵⃺⃿℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕ₝ute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽⃉ƀ;qsؾٌ⃄lanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqr׮ⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0↎proø₞r;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢␧␭␱␵␻ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀஀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼rò৆òΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonó྘quigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d྘➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ᠛旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐௏쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop඄⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roø඄urĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓΀;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨í஘istĀ;s஠டr;쀀𝔫ȀEest௅⩦⩹⩼ƀ;qs஼⩭௡ƀ;qs஼௅⩴lanô௢ií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚΀AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs఻⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs఻⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast୻⭕⭚⭟lleì୻l;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖ΀chimpqu⮽⯍⯙⬄୸⯤⯯Ȁ;cerല⯆ഷ⯉uå൅;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭å೸åഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñ೗Ā;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰⳴ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥ⵲ⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;c᪞ⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācr⵩⵭ir;榿;쀀𝔬ͯ⵹\0\0⵼\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕ⶘ⶥⶨrò᪀Āir⶝ⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔ⷗ǒr;榷rp;榹΀;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ⹞\0⹽\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ⹧⹲຅脀¶;l⹭⹮䂶leìЃɩ⹸\0\0⹻m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳⻴ᤈ⻹⻽⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp໬⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t໻⾴ï໻rel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⿚⋢⿟⿥⿫⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei⿾々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔઀ABHabcdefhilmnoprstux぀けさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤΀cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstw࿜ガクシスゼゾダッデナp;極Ā;f࿠ゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes㄂㄄;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ì࿲âヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘㇤㇮rrowĀ;t࿜ㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowó࿪arpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓rò࿪aòՑ;怏oustĀ;a㈞㈟掱che»㈟mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦΀Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼਴t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì⹯耻­䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;q኱ኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫ਩war;椪lig耻ß䃟௡㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rë๟ƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproø዁im»ኬsðኞĀas㚺㚮ð዁rn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈ΀adempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xô᝷headĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜΀eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roð໻tré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚΀cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜ៟tré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map(e=>e.charCodeAt(0))),sb=new Uint16Array("Ȁaglq \x1Bɭ\0\0p;䀦os;䀧t;䀾t;䀼uot;䀢".split("").map(e=>e.charCodeAt(0)));var wi;const ob=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]),ub=(wi=String.fromCodePoint)!==null&&wi!==void 0?wi:function(e){let t="";return e>65535&&(e-=65536,t+=String.fromCharCode(e>>>10&1023|55296),e=56320|e&1023),t+=String.fromCharCode(e),t};function lb(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=ob.get(e))!==null&&t!==void 0?t:e}var $e;(function(e){e[e.NUM=35]="NUM",e[e.SEMI=59]="SEMI",e[e.EQUALS=61]="EQUALS",e[e.ZERO=48]="ZERO",e[e.NINE=57]="NINE",e[e.LOWER_A=97]="LOWER_A",e[e.LOWER_F=102]="LOWER_F",e[e.LOWER_X=120]="LOWER_X",e[e.LOWER_Z=122]="LOWER_Z",e[e.UPPER_A=65]="UPPER_A",e[e.UPPER_F=70]="UPPER_F",e[e.UPPER_Z=90]="UPPER_Z"})($e||($e={}));const cb=32;var Ft;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(Ft||(Ft={}));function la(e){return e>=$e.ZERO&&e<=$e.NINE}function db(e){return e>=$e.UPPER_A&&e<=$e.UPPER_F||e>=$e.LOWER_A&&e<=$e.LOWER_F}function fb(e){return e>=$e.UPPER_A&&e<=$e.UPPER_Z||e>=$e.LOWER_A&&e<=$e.LOWER_Z||la(e)}function hb(e){return e===$e.EQUALS||fb(e)}var je;(function(e){e[e.EntityStart=0]="EntityStart",e[e.NumericStart=1]="NumericStart",e[e.NumericDecimal=2]="NumericDecimal",e[e.NumericHex=3]="NumericHex",e[e.NamedEntity=4]="NamedEntity"})(je||(je={}));var Nt;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(Nt||(Nt={}));class Fl{constructor(t,n,r){this.decodeTree=t,this.emitCodePoint=n,this.errors=r,this.state=je.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=Nt.Strict}startEntity(t){this.decodeMode=t,this.state=je.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,n){switch(this.state){case je.EntityStart:return t.charCodeAt(n)===$e.NUM?(this.state=je.NumericStart,this.consumed+=1,this.stateNumericStart(t,n+1)):(this.state=je.NamedEntity,this.stateNamedEntity(t,n));case je.NumericStart:return this.stateNumericStart(t,n);case je.NumericDecimal:return this.stateNumericDecimal(t,n);case je.NumericHex:return this.stateNumericHex(t,n);case je.NamedEntity:return this.stateNamedEntity(t,n)}}stateNumericStart(t,n){return n>=t.length?-1:(t.charCodeAt(n)|cb)===$e.LOWER_X?(this.state=je.NumericHex,this.consumed+=1,this.stateNumericHex(t,n+1)):(this.state=je.NumericDecimal,this.stateNumericDecimal(t,n))}addToNumericResult(t,n,r,i){if(n!==r){const a=r-n;this.result=this.result*Math.pow(i,a)+parseInt(t.substr(n,a),i),this.consumed+=a}}stateNumericHex(t,n){const r=n;for(;n<t.length;){const i=t.charCodeAt(n);if(la(i)||db(i))n+=1;else return this.addToNumericResult(t,r,n,16),this.emitNumericEntity(i,3)}return this.addToNumericResult(t,r,n,16),-1}stateNumericDecimal(t,n){const r=n;for(;n<t.length;){const i=t.charCodeAt(n);if(la(i))n+=1;else return this.addToNumericResult(t,r,n,10),this.emitNumericEntity(i,2)}return this.addToNumericResult(t,r,n,10),-1}emitNumericEntity(t,n){var r;if(this.consumed<=n)return(r=this.errors)===null||r===void 0||r.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(t===$e.SEMI)this.consumed+=1;else if(this.decodeMode===Nt.Strict)return 0;return this.emitCodePoint(lb(this.result),this.consumed),this.errors&&(t!==$e.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(t,n){const{decodeTree:r}=this;let i=r[this.treeIndex],a=(i&Ft.VALUE_LENGTH)>>14;for(;n<t.length;n++,this.excess++){const s=t.charCodeAt(n);if(this.treeIndex=pb(r,i,this.treeIndex+Math.max(1,a),s),this.treeIndex<0)return this.result===0||this.decodeMode===Nt.Attribute&&(a===0||hb(s))?0:this.emitNotTerminatedNamedEntity();if(i=r[this.treeIndex],a=(i&Ft.VALUE_LENGTH)>>14,a!==0){if(s===$e.SEMI)return this.emitNamedEntityData(this.treeIndex,a,this.consumed+this.excess);this.decodeMode!==Nt.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var t;const{result:n,decodeTree:r}=this,i=(r[n]&Ft.VALUE_LENGTH)>>14;return this.emitNamedEntityData(n,i,this.consumed),(t=this.errors)===null||t===void 0||t.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(t,n,r){const{decodeTree:i}=this;return this.emitCodePoint(n===1?i[t]&~Ft.VALUE_LENGTH:i[t+1],r),n===3&&this.emitCodePoint(i[t+2],r),r}end(){var t;switch(this.state){case je.NamedEntity:return this.result!==0&&(this.decodeMode!==Nt.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case je.NumericDecimal:return this.emitNumericEntity(0,2);case je.NumericHex:return this.emitNumericEntity(0,3);case je.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case je.EntityStart:return 0}}}function Hl(e){let t="";const n=new Fl(e,r=>t+=ub(r));return function(i,a){let s=0,o=0;for(;(o=i.indexOf("&",o))>=0;){t+=i.slice(s,o),n.startEntity(a);const c=n.write(i,o+1);if(c<0){s=o+n.end();break}s=o+c,o=c===0?s+1:s}const u=t+i.slice(s);return t="",u}}function pb(e,t,n,r){const i=(t&Ft.BRANCH_LENGTH)>>7,a=t&Ft.JUMP_TABLE;if(i===0)return a!==0&&r===a?n:-1;if(a){const u=r-a;return u<0||u>=i?-1:e[n+u]-1}let s=n,o=s+i-1;for(;s<=o;){const u=s+o>>>1,c=e[u];if(c<r)s=u+1;else if(c>r)o=u-1;else return e[u+i]}return-1}Hl(Bl);Hl(sb);var M;(function(e){e.HTML="http://www.w3.org/1999/xhtml",e.MATHML="http://www.w3.org/1998/Math/MathML",e.SVG="http://www.w3.org/2000/svg",e.XLINK="http://www.w3.org/1999/xlink",e.XML="http://www.w3.org/XML/1998/namespace",e.XMLNS="http://www.w3.org/2000/xmlns/"})(M||(M={}));var Kt;(function(e){e.TYPE="type",e.ACTION="action",e.ENCODING="encoding",e.PROMPT="prompt",e.NAME="name",e.COLOR="color",e.FACE="face",e.SIZE="size"})(Kt||(Kt={}));var ut;(function(e){e.NO_QUIRKS="no-quirks",e.QUIRKS="quirks",e.LIMITED_QUIRKS="limited-quirks"})(ut||(ut={}));var O;(function(e){e.A="a",e.ADDRESS="address",e.ANNOTATION_XML="annotation-xml",e.APPLET="applet",e.AREA="area",e.ARTICLE="article",e.ASIDE="aside",e.B="b",e.BASE="base",e.BASEFONT="basefont",e.BGSOUND="bgsound",e.BIG="big",e.BLOCKQUOTE="blockquote",e.BODY="body",e.BR="br",e.BUTTON="button",e.CAPTION="caption",e.CENTER="center",e.CODE="code",e.COL="col",e.COLGROUP="colgroup",e.DD="dd",e.DESC="desc",e.DETAILS="details",e.DIALOG="dialog",e.DIR="dir",e.DIV="div",e.DL="dl",e.DT="dt",e.EM="em",e.EMBED="embed",e.FIELDSET="fieldset",e.FIGCAPTION="figcaption",e.FIGURE="figure",e.FONT="font",e.FOOTER="footer",e.FOREIGN_OBJECT="foreignObject",e.FORM="form",e.FRAME="frame",e.FRAMESET="frameset",e.H1="h1",e.H2="h2",e.H3="h3",e.H4="h4",e.H5="h5",e.H6="h6",e.HEAD="head",e.HEADER="header",e.HGROUP="hgroup",e.HR="hr",e.HTML="html",e.I="i",e.IMG="img",e.IMAGE="image",e.INPUT="input",e.IFRAME="iframe",e.KEYGEN="keygen",e.LABEL="label",e.LI="li",e.LINK="link",e.LISTING="listing",e.MAIN="main",e.MALIGNMARK="malignmark",e.MARQUEE="marquee",e.MATH="math",e.MENU="menu",e.META="meta",e.MGLYPH="mglyph",e.MI="mi",e.MO="mo",e.MN="mn",e.MS="ms",e.MTEXT="mtext",e.NAV="nav",e.NOBR="nobr",e.NOFRAMES="noframes",e.NOEMBED="noembed",e.NOSCRIPT="noscript",e.OBJECT="object",e.OL="ol",e.OPTGROUP="optgroup",e.OPTION="option",e.P="p",e.PARAM="param",e.PLAINTEXT="plaintext",e.PRE="pre",e.RB="rb",e.RP="rp",e.RT="rt",e.RTC="rtc",e.RUBY="ruby",e.S="s",e.SCRIPT="script",e.SEARCH="search",e.SECTION="section",e.SELECT="select",e.SOURCE="source",e.SMALL="small",e.SPAN="span",e.STRIKE="strike",e.STRONG="strong",e.STYLE="style",e.SUB="sub",e.SUMMARY="summary",e.SUP="sup",e.TABLE="table",e.TBODY="tbody",e.TEMPLATE="template",e.TEXTAREA="textarea",e.TFOOT="tfoot",e.TD="td",e.TH="th",e.THEAD="thead",e.TITLE="title",e.TR="tr",e.TRACK="track",e.TT="tt",e.U="u",e.UL="ul",e.SVG="svg",e.VAR="var",e.WBR="wbr",e.XMP="xmp"})(O||(O={}));var l;(function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.A=1]="A",e[e.ADDRESS=2]="ADDRESS",e[e.ANNOTATION_XML=3]="ANNOTATION_XML",e[e.APPLET=4]="APPLET",e[e.AREA=5]="AREA",e[e.ARTICLE=6]="ARTICLE",e[e.ASIDE=7]="ASIDE",e[e.B=8]="B",e[e.BASE=9]="BASE",e[e.BASEFONT=10]="BASEFONT",e[e.BGSOUND=11]="BGSOUND",e[e.BIG=12]="BIG",e[e.BLOCKQUOTE=13]="BLOCKQUOTE",e[e.BODY=14]="BODY",e[e.BR=15]="BR",e[e.BUTTON=16]="BUTTON",e[e.CAPTION=17]="CAPTION",e[e.CENTER=18]="CENTER",e[e.CODE=19]="CODE",e[e.COL=20]="COL",e[e.COLGROUP=21]="COLGROUP",e[e.DD=22]="DD",e[e.DESC=23]="DESC",e[e.DETAILS=24]="DETAILS",e[e.DIALOG=25]="DIALOG",e[e.DIR=26]="DIR",e[e.DIV=27]="DIV",e[e.DL=28]="DL",e[e.DT=29]="DT",e[e.EM=30]="EM",e[e.EMBED=31]="EMBED",e[e.FIELDSET=32]="FIELDSET",e[e.FIGCAPTION=33]="FIGCAPTION",e[e.FIGURE=34]="FIGURE",e[e.FONT=35]="FONT",e[e.FOOTER=36]="FOOTER",e[e.FOREIGN_OBJECT=37]="FOREIGN_OBJECT",e[e.FORM=38]="FORM",e[e.FRAME=39]="FRAME",e[e.FRAMESET=40]="FRAMESET",e[e.H1=41]="H1",e[e.H2=42]="H2",e[e.H3=43]="H3",e[e.H4=44]="H4",e[e.H5=45]="H5",e[e.H6=46]="H6",e[e.HEAD=47]="HEAD",e[e.HEADER=48]="HEADER",e[e.HGROUP=49]="HGROUP",e[e.HR=50]="HR",e[e.HTML=51]="HTML",e[e.I=52]="I",e[e.IMG=53]="IMG",e[e.IMAGE=54]="IMAGE",e[e.INPUT=55]="INPUT",e[e.IFRAME=56]="IFRAME",e[e.KEYGEN=57]="KEYGEN",e[e.LABEL=58]="LABEL",e[e.LI=59]="LI",e[e.LINK=60]="LINK",e[e.LISTING=61]="LISTING",e[e.MAIN=62]="MAIN",e[e.MALIGNMARK=63]="MALIGNMARK",e[e.MARQUEE=64]="MARQUEE",e[e.MATH=65]="MATH",e[e.MENU=66]="MENU",e[e.META=67]="META",e[e.MGLYPH=68]="MGLYPH",e[e.MI=69]="MI",e[e.MO=70]="MO",e[e.MN=71]="MN",e[e.MS=72]="MS",e[e.MTEXT=73]="MTEXT",e[e.NAV=74]="NAV",e[e.NOBR=75]="NOBR",e[e.NOFRAMES=76]="NOFRAMES",e[e.NOEMBED=77]="NOEMBED",e[e.NOSCRIPT=78]="NOSCRIPT",e[e.OBJECT=79]="OBJECT",e[e.OL=80]="OL",e[e.OPTGROUP=81]="OPTGROUP",e[e.OPTION=82]="OPTION",e[e.P=83]="P",e[e.PARAM=84]="PARAM",e[e.PLAINTEXT=85]="PLAINTEXT",e[e.PRE=86]="PRE",e[e.RB=87]="RB",e[e.RP=88]="RP",e[e.RT=89]="RT",e[e.RTC=90]="RTC",e[e.RUBY=91]="RUBY",e[e.S=92]="S",e[e.SCRIPT=93]="SCRIPT",e[e.SEARCH=94]="SEARCH",e[e.SECTION=95]="SECTION",e[e.SELECT=96]="SELECT",e[e.SOURCE=97]="SOURCE",e[e.SMALL=98]="SMALL",e[e.SPAN=99]="SPAN",e[e.STRIKE=100]="STRIKE",e[e.STRONG=101]="STRONG",e[e.STYLE=102]="STYLE",e[e.SUB=103]="SUB",e[e.SUMMARY=104]="SUMMARY",e[e.SUP=105]="SUP",e[e.TABLE=106]="TABLE",e[e.TBODY=107]="TBODY",e[e.TEMPLATE=108]="TEMPLATE",e[e.TEXTAREA=109]="TEXTAREA",e[e.TFOOT=110]="TFOOT",e[e.TD=111]="TD",e[e.TH=112]="TH",e[e.THEAD=113]="THEAD",e[e.TITLE=114]="TITLE",e[e.TR=115]="TR",e[e.TRACK=116]="TRACK",e[e.TT=117]="TT",e[e.U=118]="U",e[e.UL=119]="UL",e[e.SVG=120]="SVG",e[e.VAR=121]="VAR",e[e.WBR=122]="WBR",e[e.XMP=123]="XMP"})(l||(l={}));const mb=new Map([[O.A,l.A],[O.ADDRESS,l.ADDRESS],[O.ANNOTATION_XML,l.ANNOTATION_XML],[O.APPLET,l.APPLET],[O.AREA,l.AREA],[O.ARTICLE,l.ARTICLE],[O.ASIDE,l.ASIDE],[O.B,l.B],[O.BASE,l.BASE],[O.BASEFONT,l.BASEFONT],[O.BGSOUND,l.BGSOUND],[O.BIG,l.BIG],[O.BLOCKQUOTE,l.BLOCKQUOTE],[O.BODY,l.BODY],[O.BR,l.BR],[O.BUTTON,l.BUTTON],[O.CAPTION,l.CAPTION],[O.CENTER,l.CENTER],[O.CODE,l.CODE],[O.COL,l.COL],[O.COLGROUP,l.COLGROUP],[O.DD,l.DD],[O.DESC,l.DESC],[O.DETAILS,l.DETAILS],[O.DIALOG,l.DIALOG],[O.DIR,l.DIR],[O.DIV,l.DIV],[O.DL,l.DL],[O.DT,l.DT],[O.EM,l.EM],[O.EMBED,l.EMBED],[O.FIELDSET,l.FIELDSET],[O.FIGCAPTION,l.FIGCAPTION],[O.FIGURE,l.FIGURE],[O.FONT,l.FONT],[O.FOOTER,l.FOOTER],[O.FOREIGN_OBJECT,l.FOREIGN_OBJECT],[O.FORM,l.FORM],[O.FRAME,l.FRAME],[O.FRAMESET,l.FRAMESET],[O.H1,l.H1],[O.H2,l.H2],[O.H3,l.H3],[O.H4,l.H4],[O.H5,l.H5],[O.H6,l.H6],[O.HEAD,l.HEAD],[O.HEADER,l.HEADER],[O.HGROUP,l.HGROUP],[O.HR,l.HR],[O.HTML,l.HTML],[O.I,l.I],[O.IMG,l.IMG],[O.IMAGE,l.IMAGE],[O.INPUT,l.INPUT],[O.IFRAME,l.IFRAME],[O.KEYGEN,l.KEYGEN],[O.LABEL,l.LABEL],[O.LI,l.LI],[O.LINK,l.LINK],[O.LISTING,l.LISTING],[O.MAIN,l.MAIN],[O.MALIGNMARK,l.MALIGNMARK],[O.MARQUEE,l.MARQUEE],[O.MATH,l.MATH],[O.MENU,l.MENU],[O.META,l.META],[O.MGLYPH,l.MGLYPH],[O.MI,l.MI],[O.MO,l.MO],[O.MN,l.MN],[O.MS,l.MS],[O.MTEXT,l.MTEXT],[O.NAV,l.NAV],[O.NOBR,l.NOBR],[O.NOFRAMES,l.NOFRAMES],[O.NOEMBED,l.NOEMBED],[O.NOSCRIPT,l.NOSCRIPT],[O.OBJECT,l.OBJECT],[O.OL,l.OL],[O.OPTGROUP,l.OPTGROUP],[O.OPTION,l.OPTION],[O.P,l.P],[O.PARAM,l.PARAM],[O.PLAINTEXT,l.PLAINTEXT],[O.PRE,l.PRE],[O.RB,l.RB],[O.RP,l.RP],[O.RT,l.RT],[O.RTC,l.RTC],[O.RUBY,l.RUBY],[O.S,l.S],[O.SCRIPT,l.SCRIPT],[O.SEARCH,l.SEARCH],[O.SECTION,l.SECTION],[O.SELECT,l.SELECT],[O.SOURCE,l.SOURCE],[O.SMALL,l.SMALL],[O.SPAN,l.SPAN],[O.STRIKE,l.STRIKE],[O.STRONG,l.STRONG],[O.STYLE,l.STYLE],[O.SUB,l.SUB],[O.SUMMARY,l.SUMMARY],[O.SUP,l.SUP],[O.TABLE,l.TABLE],[O.TBODY,l.TBODY],[O.TEMPLATE,l.TEMPLATE],[O.TEXTAREA,l.TEXTAREA],[O.TFOOT,l.TFOOT],[O.TD,l.TD],[O.TH,l.TH],[O.THEAD,l.THEAD],[O.TITLE,l.TITLE],[O.TR,l.TR],[O.TRACK,l.TRACK],[O.TT,l.TT],[O.U,l.U],[O.UL,l.UL],[O.SVG,l.SVG],[O.VAR,l.VAR],[O.WBR,l.WBR],[O.XMP,l.XMP]]);function In(e){var t;return(t=mb.get(e))!==null&&t!==void 0?t:l.UNKNOWN}const F=l,gb={[M.HTML]:new Set([F.ADDRESS,F.APPLET,F.AREA,F.ARTICLE,F.ASIDE,F.BASE,F.BASEFONT,F.BGSOUND,F.BLOCKQUOTE,F.BODY,F.BR,F.BUTTON,F.CAPTION,F.CENTER,F.COL,F.COLGROUP,F.DD,F.DETAILS,F.DIR,F.DIV,F.DL,F.DT,F.EMBED,F.FIELDSET,F.FIGCAPTION,F.FIGURE,F.FOOTER,F.FORM,F.FRAME,F.FRAMESET,F.H1,F.H2,F.H3,F.H4,F.H5,F.H6,F.HEAD,F.HEADER,F.HGROUP,F.HR,F.HTML,F.IFRAME,F.IMG,F.INPUT,F.LI,F.LINK,F.LISTING,F.MAIN,F.MARQUEE,F.MENU,F.META,F.NAV,F.NOEMBED,F.NOFRAMES,F.NOSCRIPT,F.OBJECT,F.OL,F.P,F.PARAM,F.PLAINTEXT,F.PRE,F.SCRIPT,F.SECTION,F.SELECT,F.SOURCE,F.STYLE,F.SUMMARY,F.TABLE,F.TBODY,F.TD,F.TEMPLATE,F.TEXTAREA,F.TFOOT,F.TH,F.THEAD,F.TITLE,F.TR,F.TRACK,F.UL,F.WBR,F.XMP]),[M.MATHML]:new Set([F.MI,F.MO,F.MN,F.MS,F.MTEXT,F.ANNOTATION_XML]),[M.SVG]:new Set([F.TITLE,F.FOREIGN_OBJECT,F.DESC]),[M.XLINK]:new Set,[M.XML]:new Set,[M.XMLNS]:new Set},ca=new Set([F.H1,F.H2,F.H3,F.H4,F.H5,F.H6]);O.STYLE,O.SCRIPT,O.XMP,O.IFRAME,O.NOEMBED,O.NOFRAMES,O.PLAINTEXT;var E;(function(e){e[e.DATA=0]="DATA",e[e.RCDATA=1]="RCDATA",e[e.RAWTEXT=2]="RAWTEXT",e[e.SCRIPT_DATA=3]="SCRIPT_DATA",e[e.PLAINTEXT=4]="PLAINTEXT",e[e.TAG_OPEN=5]="TAG_OPEN",e[e.END_TAG_OPEN=6]="END_TAG_OPEN",e[e.TAG_NAME=7]="TAG_NAME",e[e.RCDATA_LESS_THAN_SIGN=8]="RCDATA_LESS_THAN_SIGN",e[e.RCDATA_END_TAG_OPEN=9]="RCDATA_END_TAG_OPEN",e[e.RCDATA_END_TAG_NAME=10]="RCDATA_END_TAG_NAME",e[e.RAWTEXT_LESS_THAN_SIGN=11]="RAWTEXT_LESS_THAN_SIGN",e[e.RAWTEXT_END_TAG_OPEN=12]="RAWTEXT_END_TAG_OPEN",e[e.RAWTEXT_END_TAG_NAME=13]="RAWTEXT_END_TAG_NAME",e[e.SCRIPT_DATA_LESS_THAN_SIGN=14]="SCRIPT_DATA_LESS_THAN_SIGN",e[e.SCRIPT_DATA_END_TAG_OPEN=15]="SCRIPT_DATA_END_TAG_OPEN",e[e.SCRIPT_DATA_END_TAG_NAME=16]="SCRIPT_DATA_END_TAG_NAME",e[e.SCRIPT_DATA_ESCAPE_START=17]="SCRIPT_DATA_ESCAPE_START",e[e.SCRIPT_DATA_ESCAPE_START_DASH=18]="SCRIPT_DATA_ESCAPE_START_DASH",e[e.SCRIPT_DATA_ESCAPED=19]="SCRIPT_DATA_ESCAPED",e[e.SCRIPT_DATA_ESCAPED_DASH=20]="SCRIPT_DATA_ESCAPED_DASH",e[e.SCRIPT_DATA_ESCAPED_DASH_DASH=21]="SCRIPT_DATA_ESCAPED_DASH_DASH",e[e.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN=22]="SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN",e[e.SCRIPT_DATA_ESCAPED_END_TAG_OPEN=23]="SCRIPT_DATA_ESCAPED_END_TAG_OPEN",e[e.SCRIPT_DATA_ESCAPED_END_TAG_NAME=24]="SCRIPT_DATA_ESCAPED_END_TAG_NAME",e[e.SCRIPT_DATA_DOUBLE_ESCAPE_START=25]="SCRIPT_DATA_DOUBLE_ESCAPE_START",e[e.SCRIPT_DATA_DOUBLE_ESCAPED=26]="SCRIPT_DATA_DOUBLE_ESCAPED",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH=27]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH=28]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN=29]="SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN",e[e.SCRIPT_DATA_DOUBLE_ESCAPE_END=30]="SCRIPT_DATA_DOUBLE_ESCAPE_END",e[e.BEFORE_ATTRIBUTE_NAME=31]="BEFORE_ATTRIBUTE_NAME",e[e.ATTRIBUTE_NAME=32]="ATTRIBUTE_NAME",e[e.AFTER_ATTRIBUTE_NAME=33]="AFTER_ATTRIBUTE_NAME",e[e.BEFORE_ATTRIBUTE_VALUE=34]="BEFORE_ATTRIBUTE_VALUE",e[e.ATTRIBUTE_VALUE_DOUBLE_QUOTED=35]="ATTRIBUTE_VALUE_DOUBLE_QUOTED",e[e.ATTRIBUTE_VALUE_SINGLE_QUOTED=36]="ATTRIBUTE_VALUE_SINGLE_QUOTED",e[e.ATTRIBUTE_VALUE_UNQUOTED=37]="ATTRIBUTE_VALUE_UNQUOTED",e[e.AFTER_ATTRIBUTE_VALUE_QUOTED=38]="AFTER_ATTRIBUTE_VALUE_QUOTED",e[e.SELF_CLOSING_START_TAG=39]="SELF_CLOSING_START_TAG",e[e.BOGUS_COMMENT=40]="BOGUS_COMMENT",e[e.MARKUP_DECLARATION_OPEN=41]="MARKUP_DECLARATION_OPEN",e[e.COMMENT_START=42]="COMMENT_START",e[e.COMMENT_START_DASH=43]="COMMENT_START_DASH",e[e.COMMENT=44]="COMMENT",e[e.COMMENT_LESS_THAN_SIGN=45]="COMMENT_LESS_THAN_SIGN",e[e.COMMENT_LESS_THAN_SIGN_BANG=46]="COMMENT_LESS_THAN_SIGN_BANG",e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH=47]="COMMENT_LESS_THAN_SIGN_BANG_DASH",e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH=48]="COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH",e[e.COMMENT_END_DASH=49]="COMMENT_END_DASH",e[e.COMMENT_END=50]="COMMENT_END",e[e.COMMENT_END_BANG=51]="COMMENT_END_BANG",e[e.DOCTYPE=52]="DOCTYPE",e[e.BEFORE_DOCTYPE_NAME=53]="BEFORE_DOCTYPE_NAME",e[e.DOCTYPE_NAME=54]="DOCTYPE_NAME",e[e.AFTER_DOCTYPE_NAME=55]="AFTER_DOCTYPE_NAME",e[e.AFTER_DOCTYPE_PUBLIC_KEYWORD=56]="AFTER_DOCTYPE_PUBLIC_KEYWORD",e[e.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER=57]="BEFORE_DOCTYPE_PUBLIC_IDENTIFIER",e[e.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED=58]="DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED",e[e.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED=59]="DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED",e[e.AFTER_DOCTYPE_PUBLIC_IDENTIFIER=60]="AFTER_DOCTYPE_PUBLIC_IDENTIFIER",e[e.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS=61]="BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS",e[e.AFTER_DOCTYPE_SYSTEM_KEYWORD=62]="AFTER_DOCTYPE_SYSTEM_KEYWORD",e[e.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER=63]="BEFORE_DOCTYPE_SYSTEM_IDENTIFIER",e[e.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED=64]="DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED",e[e.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED=65]="DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED",e[e.AFTER_DOCTYPE_SYSTEM_IDENTIFIER=66]="AFTER_DOCTYPE_SYSTEM_IDENTIFIER",e[e.BOGUS_DOCTYPE=67]="BOGUS_DOCTYPE",e[e.CDATA_SECTION=68]="CDATA_SECTION",e[e.CDATA_SECTION_BRACKET=69]="CDATA_SECTION_BRACKET",e[e.CDATA_SECTION_END=70]="CDATA_SECTION_END",e[e.CHARACTER_REFERENCE=71]="CHARACTER_REFERENCE",e[e.AMBIGUOUS_AMPERSAND=72]="AMBIGUOUS_AMPERSAND"})(E||(E={}));const Pe={DATA:E.DATA,RCDATA:E.RCDATA,RAWTEXT:E.RAWTEXT,SCRIPT_DATA:E.SCRIPT_DATA,PLAINTEXT:E.PLAINTEXT,CDATA_SECTION:E.CDATA_SECTION};function bb(e){return e>=g.DIGIT_0&&e<=g.DIGIT_9}function Bn(e){return e>=g.LATIN_CAPITAL_A&&e<=g.LATIN_CAPITAL_Z}function Eb(e){return e>=g.LATIN_SMALL_A&&e<=g.LATIN_SMALL_Z}function Mt(e){return Eb(e)||Bn(e)}function To(e){return Mt(e)||bb(e)}function hr(e){return e+32}function Ul(e){return e===g.SPACE||e===g.LINE_FEED||e===g.TABULATION||e===g.FORM_FEED}function yo(e){return Ul(e)||e===g.SOLIDUS||e===g.GREATER_THAN_SIGN}function Tb(e){return e===g.NULL?D.nullCharacterReference:e>1114111?D.characterReferenceOutsideUnicodeRange:Ll(e)?D.surrogateCharacterReference:Pl(e)?D.noncharacterCharacterReference:Dl(e)||e===g.CARRIAGE_RETURN?D.controlCharacterReference:null}class yb{constructor(t,n){this.options=t,this.handler=n,this.paused=!1,this.inLoop=!1,this.inForeignNode=!1,this.lastStartTagName="",this.active=!1,this.state=E.DATA,this.returnState=E.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new ab(n),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new Fl(Bl,(r,i)=>{this.preprocessor.pos=this.entityStartPos+i-1,this._flushCodePointConsumedAsCharacterReference(r)},n.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(D.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:r=>{this._err(D.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+r)},validateNumericCharacterReference:r=>{const i=Tb(r);i&&this._err(i,1)}}:void 0)}_err(t,n=0){var r,i;(i=(r=this.handler).onParseError)===null||i===void 0||i.call(r,this.preprocessor.getError(t,n))}getCurrentLocation(t){return this.options.sourceCodeLocationInfo?{startLine:this.preprocessor.line,startCol:this.preprocessor.col-t,startOffset:this.preprocessor.offset-t,endLine:-1,endCol:-1,endOffset:-1}:null}_runParsingLoop(){if(!this.inLoop){for(this.inLoop=!0;this.active&&!this.paused;){this.consumedAfterSnapshot=0;const t=this._consume();this._ensureHibernation()||this._callState(t)}this.inLoop=!1}}pause(){this.paused=!0}resume(t){if(!this.paused)throw new Error("Parser was already resumed");this.paused=!1,!this.inLoop&&(this._runParsingLoop(),this.paused||t?.())}write(t,n,r){this.active=!0,this.preprocessor.write(t,n),this._runParsingLoop(),this.paused||r?.()}insertHtmlAtCurrentPos(t){this.active=!0,this.preprocessor.insertHtmlAtCurrentPos(t),this._runParsingLoop()}_ensureHibernation(){return this.preprocessor.endOfChunkHit?(this.preprocessor.retreat(this.consumedAfterSnapshot),this.consumedAfterSnapshot=0,this.active=!1,!0):!1}_consume(){return this.consumedAfterSnapshot++,this.preprocessor.advance()}_advanceBy(t){this.consumedAfterSnapshot+=t;for(let n=0;n<t;n++)this.preprocessor.advance()}_consumeSequenceIfMatch(t,n){return this.preprocessor.startsWith(t,n)?(this._advanceBy(t.length-1),!0):!1}_createStartTagToken(){this.currentToken={type:me.START_TAG,tagName:"",tagID:l.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:me.END_TAG,tagName:"",tagID:l.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(t){this.currentToken={type:me.COMMENT,data:"",location:this.getCurrentLocation(t)}}_createDoctypeToken(t){this.currentToken={type:me.DOCTYPE,name:t,forceQuirks:!1,publicId:null,systemId:null,location:this.currentLocation}}_createCharacterToken(t,n){this.currentCharacterToken={type:t,chars:n,location:this.currentLocation}}_createAttr(t){this.currentAttr={name:t,value:""},this.currentLocation=this.getCurrentLocation(0)}_leaveAttrName(){var t,n;const r=this.currentToken;if(Ml(r,this.currentAttr.name)===null){if(r.attrs.push(this.currentAttr),r.location&&this.currentLocation){const i=(t=(n=r.location).attrs)!==null&&t!==void 0?t:n.attrs=Object.create(null);i[this.currentAttr.name]=this.currentLocation,this._leaveAttrValue()}}else this._err(D.duplicateAttribute)}_leaveAttrValue(){this.currentLocation&&(this.currentLocation.endLine=this.preprocessor.line,this.currentLocation.endCol=this.preprocessor.col,this.currentLocation.endOffset=this.preprocessor.offset)}prepareToken(t){this._emitCurrentCharacterToken(t.location),this.currentToken=null,t.location&&(t.location.endLine=this.preprocessor.line,t.location.endCol=this.preprocessor.col+1,t.location.endOffset=this.preprocessor.offset+1),this.currentLocation=this.getCurrentLocation(-1)}emitCurrentTagToken(){const t=this.currentToken;this.prepareToken(t),t.tagID=In(t.tagName),t.type===me.START_TAG?(this.lastStartTagName=t.tagName,this.handler.onStartTag(t)):(t.attrs.length>0&&this._err(D.endTagWithAttributes),t.selfClosing&&this._err(D.endTagWithTrailingSolidus),this.handler.onEndTag(t)),this.preprocessor.dropParsedChunk()}emitCurrentComment(t){this.prepareToken(t),this.handler.onComment(t),this.preprocessor.dropParsedChunk()}emitCurrentDoctype(t){this.prepareToken(t),this.handler.onDoctype(t),this.preprocessor.dropParsedChunk()}_emitCurrentCharacterToken(t){if(this.currentCharacterToken){switch(t&&this.currentCharacterToken.location&&(this.currentCharacterToken.location.endLine=t.startLine,this.currentCharacterToken.location.endCol=t.startCol,this.currentCharacterToken.location.endOffset=t.startOffset),this.currentCharacterToken.type){case me.CHARACTER:{this.handler.onCharacter(this.currentCharacterToken);break}case me.NULL_CHARACTER:{this.handler.onNullCharacter(this.currentCharacterToken);break}case me.WHITESPACE_CHARACTER:{this.handler.onWhitespaceCharacter(this.currentCharacterToken);break}}this.currentCharacterToken=null}}_emitEOFToken(){const t=this.getCurrentLocation(0);t&&(t.endLine=t.startLine,t.endCol=t.startCol,t.endOffset=t.startOffset),this._emitCurrentCharacterToken(t),this.handler.onEof({type:me.EOF,location:t}),this.active=!1}_appendCharToCurrentCharacterToken(t,n){if(this.currentCharacterToken)if(this.currentCharacterToken.type===t){this.currentCharacterToken.chars+=n;return}else this.currentLocation=this.getCurrentLocation(0),this._emitCurrentCharacterToken(this.currentLocation),this.preprocessor.dropParsedChunk();this._createCharacterToken(t,n)}_emitCodePoint(t){const n=Ul(t)?me.WHITESPACE_CHARACTER:t===g.NULL?me.NULL_CHARACTER:me.CHARACTER;this._appendCharToCurrentCharacterToken(n,String.fromCodePoint(t))}_emitChars(t){this._appendCharToCurrentCharacterToken(me.CHARACTER,t)}_startCharacterReference(){this.returnState=this.state,this.state=E.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?Nt.Attribute:Nt.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===E.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===E.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===E.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(t){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(t):this._emitCodePoint(t)}_callState(t){switch(this.state){case E.DATA:{this._stateData(t);break}case E.RCDATA:{this._stateRcdata(t);break}case E.RAWTEXT:{this._stateRawtext(t);break}case E.SCRIPT_DATA:{this._stateScriptData(t);break}case E.PLAINTEXT:{this._statePlaintext(t);break}case E.TAG_OPEN:{this._stateTagOpen(t);break}case E.END_TAG_OPEN:{this._stateEndTagOpen(t);break}case E.TAG_NAME:{this._stateTagName(t);break}case E.RCDATA_LESS_THAN_SIGN:{this._stateRcdataLessThanSign(t);break}case E.RCDATA_END_TAG_OPEN:{this._stateRcdataEndTagOpen(t);break}case E.RCDATA_END_TAG_NAME:{this._stateRcdataEndTagName(t);break}case E.RAWTEXT_LESS_THAN_SIGN:{this._stateRawtextLessThanSign(t);break}case E.RAWTEXT_END_TAG_OPEN:{this._stateRawtextEndTagOpen(t);break}case E.RAWTEXT_END_TAG_NAME:{this._stateRawtextEndTagName(t);break}case E.SCRIPT_DATA_LESS_THAN_SIGN:{this._stateScriptDataLessThanSign(t);break}case E.SCRIPT_DATA_END_TAG_OPEN:{this._stateScriptDataEndTagOpen(t);break}case E.SCRIPT_DATA_END_TAG_NAME:{this._stateScriptDataEndTagName(t);break}case E.SCRIPT_DATA_ESCAPE_START:{this._stateScriptDataEscapeStart(t);break}case E.SCRIPT_DATA_ESCAPE_START_DASH:{this._stateScriptDataEscapeStartDash(t);break}case E.SCRIPT_DATA_ESCAPED:{this._stateScriptDataEscaped(t);break}case E.SCRIPT_DATA_ESCAPED_DASH:{this._stateScriptDataEscapedDash(t);break}case E.SCRIPT_DATA_ESCAPED_DASH_DASH:{this._stateScriptDataEscapedDashDash(t);break}case E.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataEscapedLessThanSign(t);break}case E.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:{this._stateScriptDataEscapedEndTagOpen(t);break}case E.SCRIPT_DATA_ESCAPED_END_TAG_NAME:{this._stateScriptDataEscapedEndTagName(t);break}case E.SCRIPT_DATA_DOUBLE_ESCAPE_START:{this._stateScriptDataDoubleEscapeStart(t);break}case E.SCRIPT_DATA_DOUBLE_ESCAPED:{this._stateScriptDataDoubleEscaped(t);break}case E.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:{this._stateScriptDataDoubleEscapedDash(t);break}case E.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:{this._stateScriptDataDoubleEscapedDashDash(t);break}case E.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataDoubleEscapedLessThanSign(t);break}case E.SCRIPT_DATA_DOUBLE_ESCAPE_END:{this._stateScriptDataDoubleEscapeEnd(t);break}case E.BEFORE_ATTRIBUTE_NAME:{this._stateBeforeAttributeName(t);break}case E.ATTRIBUTE_NAME:{this._stateAttributeName(t);break}case E.AFTER_ATTRIBUTE_NAME:{this._stateAfterAttributeName(t);break}case E.BEFORE_ATTRIBUTE_VALUE:{this._stateBeforeAttributeValue(t);break}case E.ATTRIBUTE_VALUE_DOUBLE_QUOTED:{this._stateAttributeValueDoubleQuoted(t);break}case E.ATTRIBUTE_VALUE_SINGLE_QUOTED:{this._stateAttributeValueSingleQuoted(t);break}case E.ATTRIBUTE_VALUE_UNQUOTED:{this._stateAttributeValueUnquoted(t);break}case E.AFTER_ATTRIBUTE_VALUE_QUOTED:{this._stateAfterAttributeValueQuoted(t);break}case E.SELF_CLOSING_START_TAG:{this._stateSelfClosingStartTag(t);break}case E.BOGUS_COMMENT:{this._stateBogusComment(t);break}case E.MARKUP_DECLARATION_OPEN:{this._stateMarkupDeclarationOpen(t);break}case E.COMMENT_START:{this._stateCommentStart(t);break}case E.COMMENT_START_DASH:{this._stateCommentStartDash(t);break}case E.COMMENT:{this._stateComment(t);break}case E.COMMENT_LESS_THAN_SIGN:{this._stateCommentLessThanSign(t);break}case E.COMMENT_LESS_THAN_SIGN_BANG:{this._stateCommentLessThanSignBang(t);break}case E.COMMENT_LESS_THAN_SIGN_BANG_DASH:{this._stateCommentLessThanSignBangDash(t);break}case E.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:{this._stateCommentLessThanSignBangDashDash(t);break}case E.COMMENT_END_DASH:{this._stateCommentEndDash(t);break}case E.COMMENT_END:{this._stateCommentEnd(t);break}case E.COMMENT_END_BANG:{this._stateCommentEndBang(t);break}case E.DOCTYPE:{this._stateDoctype(t);break}case E.BEFORE_DOCTYPE_NAME:{this._stateBeforeDoctypeName(t);break}case E.DOCTYPE_NAME:{this._stateDoctypeName(t);break}case E.AFTER_DOCTYPE_NAME:{this._stateAfterDoctypeName(t);break}case E.AFTER_DOCTYPE_PUBLIC_KEYWORD:{this._stateAfterDoctypePublicKeyword(t);break}case E.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateBeforeDoctypePublicIdentifier(t);break}case E.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypePublicIdentifierDoubleQuoted(t);break}case E.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypePublicIdentifierSingleQuoted(t);break}case E.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateAfterDoctypePublicIdentifier(t);break}case E.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:{this._stateBetweenDoctypePublicAndSystemIdentifiers(t);break}case E.AFTER_DOCTYPE_SYSTEM_KEYWORD:{this._stateAfterDoctypeSystemKeyword(t);break}case E.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateBeforeDoctypeSystemIdentifier(t);break}case E.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypeSystemIdentifierDoubleQuoted(t);break}case E.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypeSystemIdentifierSingleQuoted(t);break}case E.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateAfterDoctypeSystemIdentifier(t);break}case E.BOGUS_DOCTYPE:{this._stateBogusDoctype(t);break}case E.CDATA_SECTION:{this._stateCdataSection(t);break}case E.CDATA_SECTION_BRACKET:{this._stateCdataSectionBracket(t);break}case E.CDATA_SECTION_END:{this._stateCdataSectionEnd(t);break}case E.CHARACTER_REFERENCE:{this._stateCharacterReference();break}case E.AMBIGUOUS_AMPERSAND:{this._stateAmbiguousAmpersand(t);break}default:throw new Error("Unknown state")}}_stateData(t){switch(t){case g.LESS_THAN_SIGN:{this.state=E.TAG_OPEN;break}case g.AMPERSAND:{this._startCharacterReference();break}case g.NULL:{this._err(D.unexpectedNullCharacter),this._emitCodePoint(t);break}case g.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRcdata(t){switch(t){case g.AMPERSAND:{this._startCharacterReference();break}case g.LESS_THAN_SIGN:{this.state=E.RCDATA_LESS_THAN_SIGN;break}case g.NULL:{this._err(D.unexpectedNullCharacter),this._emitChars(Le);break}case g.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRawtext(t){switch(t){case g.LESS_THAN_SIGN:{this.state=E.RAWTEXT_LESS_THAN_SIGN;break}case g.NULL:{this._err(D.unexpectedNullCharacter),this._emitChars(Le);break}case g.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptData(t){switch(t){case g.LESS_THAN_SIGN:{this.state=E.SCRIPT_DATA_LESS_THAN_SIGN;break}case g.NULL:{this._err(D.unexpectedNullCharacter),this._emitChars(Le);break}case g.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_statePlaintext(t){switch(t){case g.NULL:{this._err(D.unexpectedNullCharacter),this._emitChars(Le);break}case g.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateTagOpen(t){if(Mt(t))this._createStartTagToken(),this.state=E.TAG_NAME,this._stateTagName(t);else switch(t){case g.EXCLAMATION_MARK:{this.state=E.MARKUP_DECLARATION_OPEN;break}case g.SOLIDUS:{this.state=E.END_TAG_OPEN;break}case g.QUESTION_MARK:{this._err(D.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=E.BOGUS_COMMENT,this._stateBogusComment(t);break}case g.EOF:{this._err(D.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break}default:this._err(D.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=E.DATA,this._stateData(t)}}_stateEndTagOpen(t){if(Mt(t))this._createEndTagToken(),this.state=E.TAG_NAME,this._stateTagName(t);else switch(t){case g.GREATER_THAN_SIGN:{this._err(D.missingEndTagName),this.state=E.DATA;break}case g.EOF:{this._err(D.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break}default:this._err(D.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=E.BOGUS_COMMENT,this._stateBogusComment(t)}}_stateTagName(t){const n=this.currentToken;switch(t){case g.SPACE:case g.LINE_FEED:case g.TABULATION:case g.FORM_FEED:{this.state=E.BEFORE_ATTRIBUTE_NAME;break}case g.SOLIDUS:{this.state=E.SELF_CLOSING_START_TAG;break}case g.GREATER_THAN_SIGN:{this.state=E.DATA,this.emitCurrentTagToken();break}case g.NULL:{this._err(D.unexpectedNullCharacter),n.tagName+=Le;break}case g.EOF:{this._err(D.eofInTag),this._emitEOFToken();break}default:n.tagName+=String.fromCodePoint(Bn(t)?hr(t):t)}}_stateRcdataLessThanSign(t){t===g.SOLIDUS?this.state=E.RCDATA_END_TAG_OPEN:(this._emitChars("<"),this.state=E.RCDATA,this._stateRcdata(t))}_stateRcdataEndTagOpen(t){Mt(t)?(this.state=E.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(t)):(this._emitChars("</"),this.state=E.RCDATA,this._stateRcdata(t))}handleSpecialEndTag(t){if(!this.preprocessor.startsWith(this.lastStartTagName,!1))return!this._ensureHibernation();this._createEndTagToken();const n=this.currentToken;switch(n.tagName=this.lastStartTagName,this.preprocessor.peek(this.lastStartTagName.length)){case g.SPACE:case g.LINE_FEED:case g.TABULATION:case g.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=E.BEFORE_ATTRIBUTE_NAME,!1;case g.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=E.SELF_CLOSING_START_TAG,!1;case g.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=E.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=E.RCDATA,this._stateRcdata(t))}_stateRawtextLessThanSign(t){t===g.SOLIDUS?this.state=E.RAWTEXT_END_TAG_OPEN:(this._emitChars("<"),this.state=E.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagOpen(t){Mt(t)?(this.state=E.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(t)):(this._emitChars("</"),this.state=E.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=E.RAWTEXT,this._stateRawtext(t))}_stateScriptDataLessThanSign(t){switch(t){case g.SOLIDUS:{this.state=E.SCRIPT_DATA_END_TAG_OPEN;break}case g.EXCLAMATION_MARK:{this.state=E.SCRIPT_DATA_ESCAPE_START,this._emitChars("<!");break}default:this._emitChars("<"),this.state=E.SCRIPT_DATA,this._stateScriptData(t)}}_stateScriptDataEndTagOpen(t){Mt(t)?(this.state=E.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(t)):(this._emitChars("</"),this.state=E.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=E.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStart(t){t===g.HYPHEN_MINUS?(this.state=E.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars("-")):(this.state=E.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStartDash(t){t===g.HYPHEN_MINUS?(this.state=E.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-")):(this.state=E.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscaped(t){switch(t){case g.HYPHEN_MINUS:{this.state=E.SCRIPT_DATA_ESCAPED_DASH,this._emitChars("-");break}case g.LESS_THAN_SIGN:{this.state=E.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case g.NULL:{this._err(D.unexpectedNullCharacter),this._emitChars(Le);break}case g.EOF:{this._err(D.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataEscapedDash(t){switch(t){case g.HYPHEN_MINUS:{this.state=E.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-");break}case g.LESS_THAN_SIGN:{this.state=E.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case g.NULL:{this._err(D.unexpectedNullCharacter),this.state=E.SCRIPT_DATA_ESCAPED,this._emitChars(Le);break}case g.EOF:{this._err(D.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=E.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedDashDash(t){switch(t){case g.HYPHEN_MINUS:{this._emitChars("-");break}case g.LESS_THAN_SIGN:{this.state=E.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case g.GREATER_THAN_SIGN:{this.state=E.SCRIPT_DATA,this._emitChars(">");break}case g.NULL:{this._err(D.unexpectedNullCharacter),this.state=E.SCRIPT_DATA_ESCAPED,this._emitChars(Le);break}case g.EOF:{this._err(D.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=E.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedLessThanSign(t){t===g.SOLIDUS?this.state=E.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:Mt(t)?(this._emitChars("<"),this.state=E.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(t)):(this._emitChars("<"),this.state=E.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagOpen(t){Mt(t)?(this.state=E.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(t)):(this._emitChars("</"),this.state=E.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=E.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscapeStart(t){if(this.preprocessor.startsWith(Ze.SCRIPT,!1)&&yo(this.preprocessor.peek(Ze.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<Ze.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=E.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=E.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscaped(t){switch(t){case g.HYPHEN_MINUS:{this.state=E.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars("-");break}case g.LESS_THAN_SIGN:{this.state=E.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case g.NULL:{this._err(D.unexpectedNullCharacter),this._emitChars(Le);break}case g.EOF:{this._err(D.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDash(t){switch(t){case g.HYPHEN_MINUS:{this.state=E.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars("-");break}case g.LESS_THAN_SIGN:{this.state=E.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case g.NULL:{this._err(D.unexpectedNullCharacter),this.state=E.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(Le);break}case g.EOF:{this._err(D.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=E.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDashDash(t){switch(t){case g.HYPHEN_MINUS:{this._emitChars("-");break}case g.LESS_THAN_SIGN:{this.state=E.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case g.GREATER_THAN_SIGN:{this.state=E.SCRIPT_DATA,this._emitChars(">");break}case g.NULL:{this._err(D.unexpectedNullCharacter),this.state=E.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(Le);break}case g.EOF:{this._err(D.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=E.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedLessThanSign(t){t===g.SOLIDUS?(this.state=E.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=E.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateScriptDataDoubleEscapeEnd(t){if(this.preprocessor.startsWith(Ze.SCRIPT,!1)&&yo(this.preprocessor.peek(Ze.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<Ze.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=E.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=E.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateBeforeAttributeName(t){switch(t){case g.SPACE:case g.LINE_FEED:case g.TABULATION:case g.FORM_FEED:break;case g.SOLIDUS:case g.GREATER_THAN_SIGN:case g.EOF:{this.state=E.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case g.EQUALS_SIGN:{this._err(D.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=E.ATTRIBUTE_NAME;break}default:this._createAttr(""),this.state=E.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateAttributeName(t){switch(t){case g.SPACE:case g.LINE_FEED:case g.TABULATION:case g.FORM_FEED:case g.SOLIDUS:case g.GREATER_THAN_SIGN:case g.EOF:{this._leaveAttrName(),this.state=E.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case g.EQUALS_SIGN:{this._leaveAttrName(),this.state=E.BEFORE_ATTRIBUTE_VALUE;break}case g.QUOTATION_MARK:case g.APOSTROPHE:case g.LESS_THAN_SIGN:{this._err(D.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(t);break}case g.NULL:{this._err(D.unexpectedNullCharacter),this.currentAttr.name+=Le;break}default:this.currentAttr.name+=String.fromCodePoint(Bn(t)?hr(t):t)}}_stateAfterAttributeName(t){switch(t){case g.SPACE:case g.LINE_FEED:case g.TABULATION:case g.FORM_FEED:break;case g.SOLIDUS:{this.state=E.SELF_CLOSING_START_TAG;break}case g.EQUALS_SIGN:{this.state=E.BEFORE_ATTRIBUTE_VALUE;break}case g.GREATER_THAN_SIGN:{this.state=E.DATA,this.emitCurrentTagToken();break}case g.EOF:{this._err(D.eofInTag),this._emitEOFToken();break}default:this._createAttr(""),this.state=E.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateBeforeAttributeValue(t){switch(t){case g.SPACE:case g.LINE_FEED:case g.TABULATION:case g.FORM_FEED:break;case g.QUOTATION_MARK:{this.state=E.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break}case g.APOSTROPHE:{this.state=E.ATTRIBUTE_VALUE_SINGLE_QUOTED;break}case g.GREATER_THAN_SIGN:{this._err(D.missingAttributeValue),this.state=E.DATA,this.emitCurrentTagToken();break}default:this.state=E.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(t)}}_stateAttributeValueDoubleQuoted(t){switch(t){case g.QUOTATION_MARK:{this.state=E.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case g.AMPERSAND:{this._startCharacterReference();break}case g.NULL:{this._err(D.unexpectedNullCharacter),this.currentAttr.value+=Le;break}case g.EOF:{this._err(D.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueSingleQuoted(t){switch(t){case g.APOSTROPHE:{this.state=E.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case g.AMPERSAND:{this._startCharacterReference();break}case g.NULL:{this._err(D.unexpectedNullCharacter),this.currentAttr.value+=Le;break}case g.EOF:{this._err(D.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueUnquoted(t){switch(t){case g.SPACE:case g.LINE_FEED:case g.TABULATION:case g.FORM_FEED:{this._leaveAttrValue(),this.state=E.BEFORE_ATTRIBUTE_NAME;break}case g.AMPERSAND:{this._startCharacterReference();break}case g.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=E.DATA,this.emitCurrentTagToken();break}case g.NULL:{this._err(D.unexpectedNullCharacter),this.currentAttr.value+=Le;break}case g.QUOTATION_MARK:case g.APOSTROPHE:case g.LESS_THAN_SIGN:case g.EQUALS_SIGN:case g.GRAVE_ACCENT:{this._err(D.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(t);break}case g.EOF:{this._err(D.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAfterAttributeValueQuoted(t){switch(t){case g.SPACE:case g.LINE_FEED:case g.TABULATION:case g.FORM_FEED:{this._leaveAttrValue(),this.state=E.BEFORE_ATTRIBUTE_NAME;break}case g.SOLIDUS:{this._leaveAttrValue(),this.state=E.SELF_CLOSING_START_TAG;break}case g.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=E.DATA,this.emitCurrentTagToken();break}case g.EOF:{this._err(D.eofInTag),this._emitEOFToken();break}default:this._err(D.missingWhitespaceBetweenAttributes),this.state=E.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateSelfClosingStartTag(t){switch(t){case g.GREATER_THAN_SIGN:{const n=this.currentToken;n.selfClosing=!0,this.state=E.DATA,this.emitCurrentTagToken();break}case g.EOF:{this._err(D.eofInTag),this._emitEOFToken();break}default:this._err(D.unexpectedSolidusInTag),this.state=E.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateBogusComment(t){const n=this.currentToken;switch(t){case g.GREATER_THAN_SIGN:{this.state=E.DATA,this.emitCurrentComment(n);break}case g.EOF:{this.emitCurrentComment(n),this._emitEOFToken();break}case g.NULL:{this._err(D.unexpectedNullCharacter),n.data+=Le;break}default:n.data+=String.fromCodePoint(t)}}_stateMarkupDeclarationOpen(t){this._consumeSequenceIfMatch(Ze.DASH_DASH,!0)?(this._createCommentToken(Ze.DASH_DASH.length+1),this.state=E.COMMENT_START):this._consumeSequenceIfMatch(Ze.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(Ze.DOCTYPE.length+1),this.state=E.DOCTYPE):this._consumeSequenceIfMatch(Ze.CDATA_START,!0)?this.inForeignNode?this.state=E.CDATA_SECTION:(this._err(D.cdataInHtmlContent),this._createCommentToken(Ze.CDATA_START.length+1),this.currentToken.data="[CDATA[",this.state=E.BOGUS_COMMENT):this._ensureHibernation()||(this._err(D.incorrectlyOpenedComment),this._createCommentToken(2),this.state=E.BOGUS_COMMENT,this._stateBogusComment(t))}_stateCommentStart(t){switch(t){case g.HYPHEN_MINUS:{this.state=E.COMMENT_START_DASH;break}case g.GREATER_THAN_SIGN:{this._err(D.abruptClosingOfEmptyComment),this.state=E.DATA;const n=this.currentToken;this.emitCurrentComment(n);break}default:this.state=E.COMMENT,this._stateComment(t)}}_stateCommentStartDash(t){const n=this.currentToken;switch(t){case g.HYPHEN_MINUS:{this.state=E.COMMENT_END;break}case g.GREATER_THAN_SIGN:{this._err(D.abruptClosingOfEmptyComment),this.state=E.DATA,this.emitCurrentComment(n);break}case g.EOF:{this._err(D.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=E.COMMENT,this._stateComment(t)}}_stateComment(t){const n=this.currentToken;switch(t){case g.HYPHEN_MINUS:{this.state=E.COMMENT_END_DASH;break}case g.LESS_THAN_SIGN:{n.data+="<",this.state=E.COMMENT_LESS_THAN_SIGN;break}case g.NULL:{this._err(D.unexpectedNullCharacter),n.data+=Le;break}case g.EOF:{this._err(D.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+=String.fromCodePoint(t)}}_stateCommentLessThanSign(t){const n=this.currentToken;switch(t){case g.EXCLAMATION_MARK:{n.data+="!",this.state=E.COMMENT_LESS_THAN_SIGN_BANG;break}case g.LESS_THAN_SIGN:{n.data+="<";break}default:this.state=E.COMMENT,this._stateComment(t)}}_stateCommentLessThanSignBang(t){t===g.HYPHEN_MINUS?this.state=E.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=E.COMMENT,this._stateComment(t))}_stateCommentLessThanSignBangDash(t){t===g.HYPHEN_MINUS?this.state=E.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=E.COMMENT_END_DASH,this._stateCommentEndDash(t))}_stateCommentLessThanSignBangDashDash(t){t!==g.GREATER_THAN_SIGN&&t!==g.EOF&&this._err(D.nestedComment),this.state=E.COMMENT_END,this._stateCommentEnd(t)}_stateCommentEndDash(t){const n=this.currentToken;switch(t){case g.HYPHEN_MINUS:{this.state=E.COMMENT_END;break}case g.EOF:{this._err(D.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=E.COMMENT,this._stateComment(t)}}_stateCommentEnd(t){const n=this.currentToken;switch(t){case g.GREATER_THAN_SIGN:{this.state=E.DATA,this.emitCurrentComment(n);break}case g.EXCLAMATION_MARK:{this.state=E.COMMENT_END_BANG;break}case g.HYPHEN_MINUS:{n.data+="-";break}case g.EOF:{this._err(D.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--",this.state=E.COMMENT,this._stateComment(t)}}_stateCommentEndBang(t){const n=this.currentToken;switch(t){case g.HYPHEN_MINUS:{n.data+="--!",this.state=E.COMMENT_END_DASH;break}case g.GREATER_THAN_SIGN:{this._err(D.incorrectlyClosedComment),this.state=E.DATA,this.emitCurrentComment(n);break}case g.EOF:{this._err(D.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--!",this.state=E.COMMENT,this._stateComment(t)}}_stateDoctype(t){switch(t){case g.SPACE:case g.LINE_FEED:case g.TABULATION:case g.FORM_FEED:{this.state=E.BEFORE_DOCTYPE_NAME;break}case g.GREATER_THAN_SIGN:{this.state=E.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t);break}case g.EOF:{this._err(D.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(D.missingWhitespaceBeforeDoctypeName),this.state=E.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t)}}_stateBeforeDoctypeName(t){if(Bn(t))this._createDoctypeToken(String.fromCharCode(hr(t))),this.state=E.DOCTYPE_NAME;else switch(t){case g.SPACE:case g.LINE_FEED:case g.TABULATION:case g.FORM_FEED:break;case g.NULL:{this._err(D.unexpectedNullCharacter),this._createDoctypeToken(Le),this.state=E.DOCTYPE_NAME;break}case g.GREATER_THAN_SIGN:{this._err(D.missingDoctypeName),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=E.DATA;break}case g.EOF:{this._err(D.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._createDoctypeToken(String.fromCodePoint(t)),this.state=E.DOCTYPE_NAME}}_stateDoctypeName(t){const n=this.currentToken;switch(t){case g.SPACE:case g.LINE_FEED:case g.TABULATION:case g.FORM_FEED:{this.state=E.AFTER_DOCTYPE_NAME;break}case g.GREATER_THAN_SIGN:{this.state=E.DATA,this.emitCurrentDoctype(n);break}case g.NULL:{this._err(D.unexpectedNullCharacter),n.name+=Le;break}case g.EOF:{this._err(D.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.name+=String.fromCodePoint(Bn(t)?hr(t):t)}}_stateAfterDoctypeName(t){const n=this.currentToken;switch(t){case g.SPACE:case g.LINE_FEED:case g.TABULATION:case g.FORM_FEED:break;case g.GREATER_THAN_SIGN:{this.state=E.DATA,this.emitCurrentDoctype(n);break}case g.EOF:{this._err(D.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._consumeSequenceIfMatch(Ze.PUBLIC,!1)?this.state=E.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(Ze.SYSTEM,!1)?this.state=E.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(D.invalidCharacterSequenceAfterDoctypeName),n.forceQuirks=!0,this.state=E.BOGUS_DOCTYPE,this._stateBogusDoctype(t))}}_stateAfterDoctypePublicKeyword(t){const n=this.currentToken;switch(t){case g.SPACE:case g.LINE_FEED:case g.TABULATION:case g.FORM_FEED:{this.state=E.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break}case g.QUOTATION_MARK:{this._err(D.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=E.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case g.APOSTROPHE:{this._err(D.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=E.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case g.GREATER_THAN_SIGN:{this._err(D.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=E.DATA,this.emitCurrentDoctype(n);break}case g.EOF:{this._err(D.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(D.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=E.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case g.SPACE:case g.LINE_FEED:case g.TABULATION:case g.FORM_FEED:break;case g.QUOTATION_MARK:{n.publicId="",this.state=E.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case g.APOSTROPHE:{n.publicId="",this.state=E.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case g.GREATER_THAN_SIGN:{this._err(D.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=E.DATA,this.emitCurrentDoctype(n);break}case g.EOF:{this._err(D.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(D.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=E.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypePublicIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case g.QUOTATION_MARK:{this.state=E.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case g.NULL:{this._err(D.unexpectedNullCharacter),n.publicId+=Le;break}case g.GREATER_THAN_SIGN:{this._err(D.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=E.DATA;break}case g.EOF:{this._err(D.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.publicId+=String.fromCodePoint(t)}}_stateDoctypePublicIdentifierSingleQuoted(t){const n=this.currentToken;switch(t){case g.APOSTROPHE:{this.state=E.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case g.NULL:{this._err(D.unexpectedNullCharacter),n.publicId+=Le;break}case g.GREATER_THAN_SIGN:{this._err(D.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=E.DATA;break}case g.EOF:{this._err(D.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.publicId+=String.fromCodePoint(t)}}_stateAfterDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case g.SPACE:case g.LINE_FEED:case g.TABULATION:case g.FORM_FEED:{this.state=E.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break}case g.GREATER_THAN_SIGN:{this.state=E.DATA,this.emitCurrentDoctype(n);break}case g.QUOTATION_MARK:{this._err(D.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=E.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case g.APOSTROPHE:{this._err(D.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=E.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case g.EOF:{this._err(D.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(D.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=E.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBetweenDoctypePublicAndSystemIdentifiers(t){const n=this.currentToken;switch(t){case g.SPACE:case g.LINE_FEED:case g.TABULATION:case g.FORM_FEED:break;case g.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=E.DATA;break}case g.QUOTATION_MARK:{n.systemId="",this.state=E.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case g.APOSTROPHE:{n.systemId="",this.state=E.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case g.EOF:{this._err(D.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(D.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=E.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateAfterDoctypeSystemKeyword(t){const n=this.currentToken;switch(t){case g.SPACE:case g.LINE_FEED:case g.TABULATION:case g.FORM_FEED:{this.state=E.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break}case g.QUOTATION_MARK:{this._err(D.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=E.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case g.APOSTROPHE:{this._err(D.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=E.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case g.GREATER_THAN_SIGN:{this._err(D.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=E.DATA,this.emitCurrentDoctype(n);break}case g.EOF:{this._err(D.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(D.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=E.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case g.SPACE:case g.LINE_FEED:case g.TABULATION:case g.FORM_FEED:break;case g.QUOTATION_MARK:{n.systemId="",this.state=E.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case g.APOSTROPHE:{n.systemId="",this.state=E.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case g.GREATER_THAN_SIGN:{this._err(D.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=E.DATA,this.emitCurrentDoctype(n);break}case g.EOF:{this._err(D.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(D.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=E.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypeSystemIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case g.QUOTATION_MARK:{this.state=E.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case g.NULL:{this._err(D.unexpectedNullCharacter),n.systemId+=Le;break}case g.GREATER_THAN_SIGN:{this._err(D.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=E.DATA;break}case g.EOF:{this._err(D.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.systemId+=String.fromCodePoint(t)}}_stateDoctypeSystemIdentifierSingleQuoted(t){const n=this.currentToken;switch(t){case g.APOSTROPHE:{this.state=E.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case g.NULL:{this._err(D.unexpectedNullCharacter),n.systemId+=Le;break}case g.GREATER_THAN_SIGN:{this._err(D.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=E.DATA;break}case g.EOF:{this._err(D.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.systemId+=String.fromCodePoint(t)}}_stateAfterDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case g.SPACE:case g.LINE_FEED:case g.TABULATION:case g.FORM_FEED:break;case g.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=E.DATA;break}case g.EOF:{this._err(D.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(D.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=E.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBogusDoctype(t){const n=this.currentToken;switch(t){case g.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=E.DATA;break}case g.NULL:{this._err(D.unexpectedNullCharacter);break}case g.EOF:{this.emitCurrentDoctype(n),this._emitEOFToken();break}}}_stateCdataSection(t){switch(t){case g.RIGHT_SQUARE_BRACKET:{this.state=E.CDATA_SECTION_BRACKET;break}case g.EOF:{this._err(D.eofInCdata),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateCdataSectionBracket(t){t===g.RIGHT_SQUARE_BRACKET?this.state=E.CDATA_SECTION_END:(this._emitChars("]"),this.state=E.CDATA_SECTION,this._stateCdataSection(t))}_stateCdataSectionEnd(t){switch(t){case g.GREATER_THAN_SIGN:{this.state=E.DATA;break}case g.RIGHT_SQUARE_BRACKET:{this._emitChars("]");break}default:this._emitChars("]]"),this.state=E.CDATA_SECTION,this._stateCdataSection(t)}}_stateCharacterReference(){let t=this.entityDecoder.write(this.preprocessor.html,this.preprocessor.pos);if(t<0)if(this.preprocessor.lastChunkWritten)t=this.entityDecoder.end();else{this.active=!1,this.preprocessor.pos=this.preprocessor.html.length-1,this.consumedAfterSnapshot=0,this.preprocessor.endOfChunkHit=!0;return}t===0?(this.preprocessor.pos=this.entityStartPos,this._flushCodePointConsumedAsCharacterReference(g.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&To(this.preprocessor.peek(1))?E.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(t){To(t)?this._flushCodePointConsumedAsCharacterReference(t):(t===g.SEMICOLON&&this._err(D.unknownNamedCharacterReference),this.state=this.returnState,this._callState(t))}}const jl=new Set([l.DD,l.DT,l.LI,l.OPTGROUP,l.OPTION,l.P,l.RB,l.RP,l.RT,l.RTC]),xo=new Set([...jl,l.CAPTION,l.COLGROUP,l.TBODY,l.TD,l.TFOOT,l.TH,l.THEAD,l.TR]),Ir=new Set([l.APPLET,l.CAPTION,l.HTML,l.MARQUEE,l.OBJECT,l.TABLE,l.TD,l.TEMPLATE,l.TH]),xb=new Set([...Ir,l.OL,l.UL]),Sb=new Set([...Ir,l.BUTTON]),So=new Set([l.ANNOTATION_XML,l.MI,l.MN,l.MO,l.MS,l.MTEXT]),_o=new Set([l.DESC,l.FOREIGN_OBJECT,l.TITLE]),_b=new Set([l.TR,l.TEMPLATE,l.HTML]),Cb=new Set([l.TBODY,l.TFOOT,l.THEAD,l.TEMPLATE,l.HTML]),Ab=new Set([l.TABLE,l.TEMPLATE,l.HTML]),wb=new Set([l.TD,l.TH]);class Ib{get currentTmplContentOrNode(){return this._isInTemplate()?this.treeAdapter.getTemplateContent(this.current):this.current}constructor(t,n,r){this.treeAdapter=n,this.handler=r,this.items=[],this.tagIDs=[],this.stackTop=-1,this.tmplCount=0,this.currentTagId=l.UNKNOWN,this.current=t}_indexOf(t){return this.items.lastIndexOf(t,this.stackTop)}_isInTemplate(){return this.currentTagId===l.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===M.HTML}_updateCurrentElement(){this.current=this.items[this.stackTop],this.currentTagId=this.tagIDs[this.stackTop]}push(t,n){this.stackTop++,this.items[this.stackTop]=t,this.current=t,this.tagIDs[this.stackTop]=n,this.currentTagId=n,this._isInTemplate()&&this.tmplCount++,this.handler.onItemPush(t,n,!0)}pop(){const t=this.current;this.tmplCount>0&&this._isInTemplate()&&this.tmplCount--,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!0)}replace(t,n){const r=this._indexOf(t);this.items[r]=n,r===this.stackTop&&(this.current=n)}insertAfter(t,n,r){const i=this._indexOf(t)+1;this.items.splice(i,0,n),this.tagIDs.splice(i,0,r),this.stackTop++,i===this.stackTop&&this._updateCurrentElement(),this.handler.onItemPush(this.current,this.currentTagId,i===this.stackTop)}popUntilTagNamePopped(t){let n=this.stackTop+1;do n=this.tagIDs.lastIndexOf(t,n-1);while(n>0&&this.treeAdapter.getNamespaceURI(this.items[n])!==M.HTML);this.shortenToLength(n<0?0:n)}shortenToLength(t){for(;this.stackTop>=t;){const n=this.current;this.tmplCount>0&&this._isInTemplate()&&(this.tmplCount-=1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(n,this.stackTop<t)}}popUntilElementPopped(t){const n=this._indexOf(t);this.shortenToLength(n<0?0:n)}popUntilPopped(t,n){const r=this._indexOfTagNames(t,n);this.shortenToLength(r<0?0:r)}popUntilNumberedHeaderPopped(){this.popUntilPopped(ca,M.HTML)}popUntilTableCellPopped(){this.popUntilPopped(wb,M.HTML)}popAllUpToHtmlElement(){this.tmplCount=0,this.shortenToLength(1)}_indexOfTagNames(t,n){for(let r=this.stackTop;r>=0;r--)if(t.has(this.tagIDs[r])&&this.treeAdapter.getNamespaceURI(this.items[r])===n)return r;return-1}clearBackTo(t,n){const r=this._indexOfTagNames(t,n);this.shortenToLength(r+1)}clearBackToTableContext(){this.clearBackTo(Ab,M.HTML)}clearBackToTableBodyContext(){this.clearBackTo(Cb,M.HTML)}clearBackToTableRowContext(){this.clearBackTo(_b,M.HTML)}remove(t){const n=this._indexOf(t);n>=0&&(n===this.stackTop?this.pop():(this.items.splice(n,1),this.tagIDs.splice(n,1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!1)))}tryPeekProperlyNestedBodyElement(){return this.stackTop>=1&&this.tagIDs[1]===l.BODY?this.items[1]:null}contains(t){return this._indexOf(t)>-1}getCommonAncestor(t){const n=this._indexOf(t)-1;return n>=0?this.items[n]:null}isRootHtmlElementCurrent(){return this.stackTop===0&&this.tagIDs[0]===l.HTML}hasInDynamicScope(t,n){for(let r=this.stackTop;r>=0;r--){const i=this.tagIDs[r];switch(this.treeAdapter.getNamespaceURI(this.items[r])){case M.HTML:{if(i===t)return!0;if(n.has(i))return!1;break}case M.SVG:{if(_o.has(i))return!1;break}case M.MATHML:{if(So.has(i))return!1;break}}}return!0}hasInScope(t){return this.hasInDynamicScope(t,Ir)}hasInListItemScope(t){return this.hasInDynamicScope(t,xb)}hasInButtonScope(t){return this.hasInDynamicScope(t,Sb)}hasNumberedHeaderInScope(){for(let t=this.stackTop;t>=0;t--){const n=this.tagIDs[t];switch(this.treeAdapter.getNamespaceURI(this.items[t])){case M.HTML:{if(ca.has(n))return!0;if(Ir.has(n))return!1;break}case M.SVG:{if(_o.has(n))return!1;break}case M.MATHML:{if(So.has(n))return!1;break}}}return!0}hasInTableScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===M.HTML)switch(this.tagIDs[n]){case t:return!0;case l.TABLE:case l.HTML:return!1}return!0}hasTableBodyContextInTableScope(){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===M.HTML)switch(this.tagIDs[t]){case l.TBODY:case l.THEAD:case l.TFOOT:return!0;case l.TABLE:case l.HTML:return!1}return!0}hasInSelectScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===M.HTML)switch(this.tagIDs[n]){case t:return!0;case l.OPTION:case l.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;jl.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;xo.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(t){for(;this.currentTagId!==t&&xo.has(this.currentTagId);)this.pop()}}const Ii=3;var yt;(function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"})(yt||(yt={}));const Co={type:yt.Marker};class vb{constructor(t){this.treeAdapter=t,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(t,n){const r=[],i=n.length,a=this.treeAdapter.getTagName(t),s=this.treeAdapter.getNamespaceURI(t);for(let o=0;o<this.entries.length;o++){const u=this.entries[o];if(u.type===yt.Marker)break;const{element:c}=u;if(this.treeAdapter.getTagName(c)===a&&this.treeAdapter.getNamespaceURI(c)===s){const d=this.treeAdapter.getAttrList(c);d.length===i&&r.push({idx:o,attrs:d})}}return r}_ensureNoahArkCondition(t){if(this.entries.length<Ii)return;const n=this.treeAdapter.getAttrList(t),r=this._getNoahArkConditionCandidates(t,n);if(r.length<Ii)return;const i=new Map(n.map(s=>[s.name,s.value]));let a=0;for(let s=0;s<r.length;s++){const o=r[s];o.attrs.every(u=>i.get(u.name)===u.value)&&(a+=1,a>=Ii&&this.entries.splice(o.idx,1))}}insertMarker(){this.entries.unshift(Co)}pushElement(t,n){this._ensureNoahArkCondition(t),this.entries.unshift({type:yt.Element,element:t,token:n})}insertElementAfterBookmark(t,n){const r=this.entries.indexOf(this.bookmark);this.entries.splice(r,0,{type:yt.Element,element:t,token:n})}removeEntry(t){const n=this.entries.indexOf(t);n>=0&&this.entries.splice(n,1)}clearToLastMarker(){const t=this.entries.indexOf(Co);t>=0?this.entries.splice(0,t+1):this.entries.length=0}getElementEntryInScopeWithTagName(t){const n=this.entries.find(r=>r.type===yt.Marker||this.treeAdapter.getTagName(r.element)===t);return n&&n.type===yt.Element?n:null}getElementEntry(t){return this.entries.find(n=>n.type===yt.Element&&n.element===t)}}const Bt={createDocument(){return{nodeName:"#document",mode:ut.NO_QUIRKS,childNodes:[]}},createDocumentFragment(){return{nodeName:"#document-fragment",childNodes:[]}},createElement(e,t,n){return{nodeName:e,tagName:e,attrs:n,namespaceURI:t,childNodes:[],parentNode:null}},createCommentNode(e){return{nodeName:"#comment",data:e,parentNode:null}},createTextNode(e){return{nodeName:"#text",value:e,parentNode:null}},appendChild(e,t){e.childNodes.push(t),t.parentNode=e},insertBefore(e,t,n){const r=e.childNodes.indexOf(n);e.childNodes.splice(r,0,t),t.parentNode=e},setTemplateContent(e,t){e.content=t},getTemplateContent(e){return e.content},setDocumentType(e,t,n,r){const i=e.childNodes.find(a=>a.nodeName==="#documentType");if(i)i.name=t,i.publicId=n,i.systemId=r;else{const a={nodeName:"#documentType",name:t,publicId:n,systemId:r,parentNode:null};Bt.appendChild(e,a)}},setDocumentMode(e,t){e.mode=t},getDocumentMode(e){return e.mode},detachNode(e){if(e.parentNode){const t=e.parentNode.childNodes.indexOf(e);e.parentNode.childNodes.splice(t,1),e.parentNode=null}},insertText(e,t){if(e.childNodes.length>0){const n=e.childNodes[e.childNodes.length-1];if(Bt.isTextNode(n)){n.value+=t;return}}Bt.appendChild(e,Bt.createTextNode(t))},insertTextBefore(e,t,n){const r=e.childNodes[e.childNodes.indexOf(n)-1];r&&Bt.isTextNode(r)?r.value+=t:Bt.insertBefore(e,Bt.createTextNode(t),n)},adoptAttributes(e,t){const n=new Set(e.attrs.map(r=>r.name));for(let r=0;r<t.length;r++)n.has(t[r].name)||e.attrs.push(t[r])},getFirstChild(e){return e.childNodes[0]},getChildNodes(e){return e.childNodes},getParentNode(e){return e.parentNode},getAttrList(e){return e.attrs},getTagName(e){return e.tagName},getNamespaceURI(e){return e.namespaceURI},getTextNodeContent(e){return e.value},getCommentNodeContent(e){return e.data},getDocumentTypeNodeName(e){return e.name},getDocumentTypeNodePublicId(e){return e.publicId},getDocumentTypeNodeSystemId(e){return e.systemId},isTextNode(e){return e.nodeName==="#text"},isCommentNode(e){return e.nodeName==="#comment"},isDocumentTypeNode(e){return e.nodeName==="#documentType"},isElementNode(e){return Object.prototype.hasOwnProperty.call(e,"tagName")},setNodeSourceCodeLocation(e,t){e.sourceCodeLocation=t},getNodeSourceCodeLocation(e){return e.sourceCodeLocation},updateNodeSourceCodeLocation(e,t){e.sourceCodeLocation={...e.sourceCodeLocation,...t}}},zl="html",kb="about:legacy-compat",Nb="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",$l=["+//silmaril//dtd html pro v0r11 19970101//","-//as//dtd html 3.0 aswedit + extensions//","-//advasoft ltd//dtd html 3.0 aswedit + extensions//","-//ietf//dtd html 2.0 level 1//","-//ietf//dtd html 2.0 level 2//","-//ietf//dtd html 2.0 strict level 1//","-//ietf//dtd html 2.0 strict level 2//","-//ietf//dtd html 2.0 strict//","-//ietf//dtd html 2.0//","-//ietf//dtd html 2.1e//","-//ietf//dtd html 3.0//","-//ietf//dtd html 3.2 final//","-//ietf//dtd html 3.2//","-//ietf//dtd html 3//","-//ietf//dtd html level 0//","-//ietf//dtd html level 1//","-//ietf//dtd html level 2//","-//ietf//dtd html level 3//","-//ietf//dtd html strict level 0//","-//ietf//dtd html strict level 1//","-//ietf//dtd html strict level 2//","-//ietf//dtd html strict level 3//","-//ietf//dtd html strict//","-//ietf//dtd html//","-//metrius//dtd metrius presentational//","-//microsoft//dtd internet explorer 2.0 html strict//","-//microsoft//dtd internet explorer 2.0 html//","-//microsoft//dtd internet explorer 2.0 tables//","-//microsoft//dtd internet explorer 3.0 html strict//","-//microsoft//dtd internet explorer 3.0 html//","-//microsoft//dtd internet explorer 3.0 tables//","-//netscape comm. corp.//dtd html//","-//netscape comm. corp.//dtd strict html//","-//o'reilly and associates//dtd html 2.0//","-//o'reilly and associates//dtd html extended 1.0//","-//o'reilly and associates//dtd html extended relaxed 1.0//","-//sq//dtd html 2.0 hotmetal + extensions//","-//softquad software//dtd hotmetal pro 6.0::19990601::extensions to html 4.0//","-//softquad//dtd hotmetal pro 4.0::19971010::extensions to html 4.0//","-//spyglass//dtd html 2.0 extended//","-//sun microsystems corp.//dtd hotjava html//","-//sun microsystems corp.//dtd hotjava strict html//","-//w3c//dtd html 3 1995-03-24//","-//w3c//dtd html 3.2 draft//","-//w3c//dtd html 3.2 final//","-//w3c//dtd html 3.2//","-//w3c//dtd html 3.2s draft//","-//w3c//dtd html 4.0 frameset//","-//w3c//dtd html 4.0 transitional//","-//w3c//dtd html experimental 19960712//","-//w3c//dtd html experimental 970421//","-//w3c//dtd w3 html//","-//w3o//dtd w3 html 3.0//","-//webtechs//dtd mozilla html 2.0//","-//webtechs//dtd mozilla html//"],Ob=[...$l,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],Rb=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),Yl=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],Lb=[...Yl,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function Ao(e,t){return t.some(n=>e.startsWith(n))}function Db(e){return e.name===zl&&e.publicId===null&&(e.systemId===null||e.systemId===kb)}function Pb(e){if(e.name!==zl)return ut.QUIRKS;const{systemId:t}=e;if(t&&t.toLowerCase()===Nb)return ut.QUIRKS;let{publicId:n}=e;if(n!==null){if(n=n.toLowerCase(),Rb.has(n))return ut.QUIRKS;let r=t===null?Ob:$l;if(Ao(n,r))return ut.QUIRKS;if(r=t===null?Yl:Lb,Ao(n,r))return ut.LIMITED_QUIRKS}return ut.NO_QUIRKS}const wo={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},Mb="definitionurl",Bb="definitionURL",Fb=new Map(["attributeName","attributeType","baseFrequency","baseProfile","calcMode","clipPathUnits","diffuseConstant","edgeMode","filterUnits","glyphRef","gradientTransform","gradientUnits","kernelMatrix","kernelUnitLength","keyPoints","keySplines","keyTimes","lengthAdjust","limitingConeAngle","markerHeight","markerUnits","markerWidth","maskContentUnits","maskUnits","numOctaves","pathLength","patternContentUnits","patternTransform","patternUnits","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","refX","refY","repeatCount","repeatDur","requiredExtensions","requiredFeatures","specularConstant","specularExponent","spreadMethod","startOffset","stdDeviation","stitchTiles","surfaceScale","systemLanguage","tableValues","targetX","targetY","textLength","viewBox","viewTarget","xChannelSelector","yChannelSelector","zoomAndPan"].map(e=>[e.toLowerCase(),e])),Hb=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:M.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:M.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:M.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:M.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:M.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:M.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:M.XLINK}],["xml:lang",{prefix:"xml",name:"lang",namespace:M.XML}],["xml:space",{prefix:"xml",name:"space",namespace:M.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:M.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:M.XMLNS}]]),Ub=new Map(["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","textPath"].map(e=>[e.toLowerCase(),e])),jb=new Set([l.B,l.BIG,l.BLOCKQUOTE,l.BODY,l.BR,l.CENTER,l.CODE,l.DD,l.DIV,l.DL,l.DT,l.EM,l.EMBED,l.H1,l.H2,l.H3,l.H4,l.H5,l.H6,l.HEAD,l.HR,l.I,l.IMG,l.LI,l.LISTING,l.MENU,l.META,l.NOBR,l.OL,l.P,l.PRE,l.RUBY,l.S,l.SMALL,l.SPAN,l.STRONG,l.STRIKE,l.SUB,l.SUP,l.TABLE,l.TT,l.U,l.UL,l.VAR]);function zb(e){const t=e.tagID;return t===l.FONT&&e.attrs.some(({name:r})=>r===Kt.COLOR||r===Kt.SIZE||r===Kt.FACE)||jb.has(t)}function Gl(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===Mb){e.attrs[t].name=Bb;break}}function ql(e){for(let t=0;t<e.attrs.length;t++){const n=Fb.get(e.attrs[t].name);n!=null&&(e.attrs[t].name=n)}}function za(e){for(let t=0;t<e.attrs.length;t++){const n=Hb.get(e.attrs[t].name);n&&(e.attrs[t].prefix=n.prefix,e.attrs[t].name=n.name,e.attrs[t].namespace=n.namespace)}}function $b(e){const t=Ub.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=In(e.tagName))}function Yb(e,t){return t===M.MATHML&&(e===l.MI||e===l.MO||e===l.MN||e===l.MS||e===l.MTEXT)}function Gb(e,t,n){if(t===M.MATHML&&e===l.ANNOTATION_XML){for(let r=0;r<n.length;r++)if(n[r].name===Kt.ENCODING){const i=n[r].value.toLowerCase();return i===wo.TEXT_HTML||i===wo.APPLICATION_XML}}return t===M.SVG&&(e===l.FOREIGN_OBJECT||e===l.DESC||e===l.TITLE)}function qb(e,t,n,r){return(!r||r===M.HTML)&&Gb(e,t,n)||(!r||r===M.MATHML)&&Yb(e,t)}const Vb="hidden",Wb=8,Xb=3;var x;(function(e){e[e.INITIAL=0]="INITIAL",e[e.BEFORE_HTML=1]="BEFORE_HTML",e[e.BEFORE_HEAD=2]="BEFORE_HEAD",e[e.IN_HEAD=3]="IN_HEAD",e[e.IN_HEAD_NO_SCRIPT=4]="IN_HEAD_NO_SCRIPT",e[e.AFTER_HEAD=5]="AFTER_HEAD",e[e.IN_BODY=6]="IN_BODY",e[e.TEXT=7]="TEXT",e[e.IN_TABLE=8]="IN_TABLE",e[e.IN_TABLE_TEXT=9]="IN_TABLE_TEXT",e[e.IN_CAPTION=10]="IN_CAPTION",e[e.IN_COLUMN_GROUP=11]="IN_COLUMN_GROUP",e[e.IN_TABLE_BODY=12]="IN_TABLE_BODY",e[e.IN_ROW=13]="IN_ROW",e[e.IN_CELL=14]="IN_CELL",e[e.IN_SELECT=15]="IN_SELECT",e[e.IN_SELECT_IN_TABLE=16]="IN_SELECT_IN_TABLE",e[e.IN_TEMPLATE=17]="IN_TEMPLATE",e[e.AFTER_BODY=18]="AFTER_BODY",e[e.IN_FRAMESET=19]="IN_FRAMESET",e[e.AFTER_FRAMESET=20]="AFTER_FRAMESET",e[e.AFTER_AFTER_BODY=21]="AFTER_AFTER_BODY",e[e.AFTER_AFTER_FRAMESET=22]="AFTER_AFTER_FRAMESET"})(x||(x={}));const Qb={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},Vl=new Set([l.TABLE,l.TBODY,l.TFOOT,l.THEAD,l.TR]),Io={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:Bt,onParseError:null};class vo{constructor(t,n,r=null,i=null){this.fragmentContext=r,this.scriptHandler=i,this.currentToken=null,this.stopped=!1,this.insertionMode=x.INITIAL,this.originalInsertionMode=x.INITIAL,this.headElement=null,this.formElement=null,this.currentNotInHTML=!1,this.tmplInsertionModeStack=[],this.pendingCharacterTokens=[],this.hasNonWhitespacePendingCharacterToken=!1,this.framesetOk=!0,this.skipNextNewLine=!1,this.fosterParentingEnabled=!1,this.options={...Io,...t},this.treeAdapter=this.options.treeAdapter,this.onParseError=this.options.onParseError,this.onParseError&&(this.options.sourceCodeLocationInfo=!0),this.document=n??this.treeAdapter.createDocument(),this.tokenizer=new yb(this.options,this),this.activeFormattingElements=new vb(this.treeAdapter),this.fragmentContextID=r?In(this.treeAdapter.getTagName(r)):l.UNKNOWN,this._setContextModes(r??this.document,this.fragmentContextID),this.openElements=new Ib(this.document,this.treeAdapter,this)}static parse(t,n){const r=new this(n);return r.tokenizer.write(t,!0),r.document}static getFragmentParser(t,n){const r={...Io,...n};t??(t=r.treeAdapter.createElement(O.TEMPLATE,M.HTML,[]));const i=r.treeAdapter.createElement("documentmock",M.HTML,[]),a=new this(r,i,t);return a.fragmentContextID===l.TEMPLATE&&a.tmplInsertionModeStack.unshift(x.IN_TEMPLATE),a._initTokenizerForFragmentParsing(),a._insertFakeRootElement(),a._resetInsertionMode(),a._findFormInFragmentContext(),a}getFragment(){const t=this.treeAdapter.getFirstChild(this.document),n=this.treeAdapter.createDocumentFragment();return this._adoptNodes(t,n),n}_err(t,n,r){var i;if(!this.onParseError)return;const a=(i=t.location)!==null&&i!==void 0?i:Qb,s={code:n,startLine:a.startLine,startCol:a.startCol,startOffset:a.startOffset,endLine:r?a.startLine:a.endLine,endCol:r?a.startCol:a.endCol,endOffset:r?a.startOffset:a.endOffset};this.onParseError(s)}onItemPush(t,n,r){var i,a;(a=(i=this.treeAdapter).onItemPush)===null||a===void 0||a.call(i,t),r&&this.openElements.stackTop>0&&this._setContextModes(t,n)}onItemPop(t,n){var r,i;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(t,this.currentToken),(i=(r=this.treeAdapter).onItemPop)===null||i===void 0||i.call(r,t,this.openElements.current),n){let a,s;this.openElements.stackTop===0&&this.fragmentContext?(a=this.fragmentContext,s=this.fragmentContextID):{current:a,currentTagId:s}=this.openElements,this._setContextModes(a,s)}}_setContextModes(t,n){const r=t===this.document||this.treeAdapter.getNamespaceURI(t)===M.HTML;this.currentNotInHTML=!r,this.tokenizer.inForeignNode=!r&&!this._isIntegrationPoint(n,t)}_switchToTextParsing(t,n){this._insertElement(t,M.HTML),this.tokenizer.state=n,this.originalInsertionMode=this.insertionMode,this.insertionMode=x.TEXT}switchToPlaintextParsing(){this.insertionMode=x.TEXT,this.originalInsertionMode=x.IN_BODY,this.tokenizer.state=Pe.PLAINTEXT}_getAdjustedCurrentElement(){return this.openElements.stackTop===0&&this.fragmentContext?this.fragmentContext:this.openElements.current}_findFormInFragmentContext(){let t=this.fragmentContext;for(;t;){if(this.treeAdapter.getTagName(t)===O.FORM){this.formElement=t;break}t=this.treeAdapter.getParentNode(t)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==M.HTML))switch(this.fragmentContextID){case l.TITLE:case l.TEXTAREA:{this.tokenizer.state=Pe.RCDATA;break}case l.STYLE:case l.XMP:case l.IFRAME:case l.NOEMBED:case l.NOFRAMES:case l.NOSCRIPT:{this.tokenizer.state=Pe.RAWTEXT;break}case l.SCRIPT:{this.tokenizer.state=Pe.SCRIPT_DATA;break}case l.PLAINTEXT:{this.tokenizer.state=Pe.PLAINTEXT;break}}}_setDocumentType(t){const n=t.name||"",r=t.publicId||"",i=t.systemId||"";if(this.treeAdapter.setDocumentType(this.document,n,r,i),t.location){const s=this.treeAdapter.getChildNodes(this.document).find(o=>this.treeAdapter.isDocumentTypeNode(o));s&&this.treeAdapter.setNodeSourceCodeLocation(s,t.location)}}_attachElementToTree(t,n){if(this.options.sourceCodeLocationInfo){const r=n&&{...n,startTag:n};this.treeAdapter.setNodeSourceCodeLocation(t,r)}if(this._shouldFosterParentOnInsertion())this._fosterParentElement(t);else{const r=this.openElements.currentTmplContentOrNode;this.treeAdapter.appendChild(r,t)}}_appendElement(t,n){const r=this.treeAdapter.createElement(t.tagName,n,t.attrs);this._attachElementToTree(r,t.location)}_insertElement(t,n){const r=this.treeAdapter.createElement(t.tagName,n,t.attrs);this._attachElementToTree(r,t.location),this.openElements.push(r,t.tagID)}_insertFakeElement(t,n){const r=this.treeAdapter.createElement(t,M.HTML,[]);this._attachElementToTree(r,null),this.openElements.push(r,n)}_insertTemplate(t){const n=this.treeAdapter.createElement(t.tagName,M.HTML,t.attrs),r=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(n,r),this._attachElementToTree(n,t.location),this.openElements.push(n,t.tagID),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(r,null)}_insertFakeRootElement(){const t=this.treeAdapter.createElement(O.HTML,M.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(t,null),this.treeAdapter.appendChild(this.openElements.current,t),this.openElements.push(t,l.HTML)}_appendCommentNode(t,n){const r=this.treeAdapter.createCommentNode(t.data);this.treeAdapter.appendChild(n,r),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(r,t.location)}_insertCharacters(t){let n,r;if(this._shouldFosterParentOnInsertion()?({parent:n,beforeElement:r}=this._findFosterParentingLocation(),r?this.treeAdapter.insertTextBefore(n,t.chars,r):this.treeAdapter.insertText(n,t.chars)):(n=this.openElements.currentTmplContentOrNode,this.treeAdapter.insertText(n,t.chars)),!t.location)return;const i=this.treeAdapter.getChildNodes(n),a=r?i.lastIndexOf(r):i.length,s=i[a-1];if(this.treeAdapter.getNodeSourceCodeLocation(s)){const{endLine:u,endCol:c,endOffset:d}=t.location;this.treeAdapter.updateNodeSourceCodeLocation(s,{endLine:u,endCol:c,endOffset:d})}else this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(s,t.location)}_adoptNodes(t,n){for(let r=this.treeAdapter.getFirstChild(t);r;r=this.treeAdapter.getFirstChild(t))this.treeAdapter.detachNode(r),this.treeAdapter.appendChild(n,r)}_setEndLocation(t,n){if(this.treeAdapter.getNodeSourceCodeLocation(t)&&n.location){const r=n.location,i=this.treeAdapter.getTagName(t),a=n.type===me.END_TAG&&i===n.tagName?{endTag:{...r},endLine:r.endLine,endCol:r.endCol,endOffset:r.endOffset}:{endLine:r.startLine,endCol:r.startCol,endOffset:r.startOffset};this.treeAdapter.updateNodeSourceCodeLocation(t,a)}}shouldProcessStartTagTokenInForeignContent(t){if(!this.currentNotInHTML)return!1;let n,r;return this.openElements.stackTop===0&&this.fragmentContext?(n=this.fragmentContext,r=this.fragmentContextID):{current:n,currentTagId:r}=this.openElements,t.tagID===l.SVG&&this.treeAdapter.getTagName(n)===O.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(n)===M.MATHML?!1:this.tokenizer.inForeignNode||(t.tagID===l.MGLYPH||t.tagID===l.MALIGNMARK)&&!this._isIntegrationPoint(r,n,M.HTML)}_processToken(t){switch(t.type){case me.CHARACTER:{this.onCharacter(t);break}case me.NULL_CHARACTER:{this.onNullCharacter(t);break}case me.COMMENT:{this.onComment(t);break}case me.DOCTYPE:{this.onDoctype(t);break}case me.START_TAG:{this._processStartTag(t);break}case me.END_TAG:{this.onEndTag(t);break}case me.EOF:{this.onEof(t);break}case me.WHITESPACE_CHARACTER:{this.onWhitespaceCharacter(t);break}}}_isIntegrationPoint(t,n,r){const i=this.treeAdapter.getNamespaceURI(n),a=this.treeAdapter.getAttrList(n);return qb(t,i,a,r)}_reconstructActiveFormattingElements(){const t=this.activeFormattingElements.entries.length;if(t){const n=this.activeFormattingElements.entries.findIndex(i=>i.type===yt.Marker||this.openElements.contains(i.element)),r=n<0?t-1:n-1;for(let i=r;i>=0;i--){const a=this.activeFormattingElements.entries[i];this._insertElement(a.token,this.treeAdapter.getNamespaceURI(a.element)),a.element=this.openElements.current}}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=x.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(l.P),this.openElements.popUntilTagNamePopped(l.P)}_resetInsertionMode(){for(let t=this.openElements.stackTop;t>=0;t--)switch(t===0&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[t]){case l.TR:{this.insertionMode=x.IN_ROW;return}case l.TBODY:case l.THEAD:case l.TFOOT:{this.insertionMode=x.IN_TABLE_BODY;return}case l.CAPTION:{this.insertionMode=x.IN_CAPTION;return}case l.COLGROUP:{this.insertionMode=x.IN_COLUMN_GROUP;return}case l.TABLE:{this.insertionMode=x.IN_TABLE;return}case l.BODY:{this.insertionMode=x.IN_BODY;return}case l.FRAMESET:{this.insertionMode=x.IN_FRAMESET;return}case l.SELECT:{this._resetInsertionModeForSelect(t);return}case l.TEMPLATE:{this.insertionMode=this.tmplInsertionModeStack[0];return}case l.HTML:{this.insertionMode=this.headElement?x.AFTER_HEAD:x.BEFORE_HEAD;return}case l.TD:case l.TH:{if(t>0){this.insertionMode=x.IN_CELL;return}break}case l.HEAD:{if(t>0){this.insertionMode=x.IN_HEAD;return}break}}this.insertionMode=x.IN_BODY}_resetInsertionModeForSelect(t){if(t>0)for(let n=t-1;n>0;n--){const r=this.openElements.tagIDs[n];if(r===l.TEMPLATE)break;if(r===l.TABLE){this.insertionMode=x.IN_SELECT_IN_TABLE;return}}this.insertionMode=x.IN_SELECT}_isElementCausesFosterParenting(t){return Vl.has(t)}_shouldFosterParentOnInsertion(){return this.fosterParentingEnabled&&this._isElementCausesFosterParenting(this.openElements.currentTagId)}_findFosterParentingLocation(){for(let t=this.openElements.stackTop;t>=0;t--){const n=this.openElements.items[t];switch(this.openElements.tagIDs[t]){case l.TEMPLATE:{if(this.treeAdapter.getNamespaceURI(n)===M.HTML)return{parent:this.treeAdapter.getTemplateContent(n),beforeElement:null};break}case l.TABLE:{const r=this.treeAdapter.getParentNode(n);return r?{parent:r,beforeElement:n}:{parent:this.openElements.items[t-1],beforeElement:null}}}}return{parent:this.openElements.items[0],beforeElement:null}}_fosterParentElement(t){const n=this._findFosterParentingLocation();n.beforeElement?this.treeAdapter.insertBefore(n.parent,t,n.beforeElement):this.treeAdapter.appendChild(n.parent,t)}_isSpecialElement(t,n){const r=this.treeAdapter.getNamespaceURI(t);return gb[r].has(n)}onCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){wE(this,t);return}switch(this.insertionMode){case x.INITIAL:{Ln(this,t);break}case x.BEFORE_HTML:{jn(this,t);break}case x.BEFORE_HEAD:{zn(this,t);break}case x.IN_HEAD:{$n(this,t);break}case x.IN_HEAD_NO_SCRIPT:{Yn(this,t);break}case x.AFTER_HEAD:{Gn(this,t);break}case x.IN_BODY:case x.IN_CAPTION:case x.IN_CELL:case x.IN_TEMPLATE:{Xl(this,t);break}case x.TEXT:case x.IN_SELECT:case x.IN_SELECT_IN_TABLE:{this._insertCharacters(t);break}case x.IN_TABLE:case x.IN_TABLE_BODY:case x.IN_ROW:{vi(this,t);break}case x.IN_TABLE_TEXT:{tc(this,t);break}case x.IN_COLUMN_GROUP:{vr(this,t);break}case x.AFTER_BODY:{kr(this,t);break}case x.AFTER_AFTER_BODY:{Sr(this,t);break}}}onNullCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){AE(this,t);return}switch(this.insertionMode){case x.INITIAL:{Ln(this,t);break}case x.BEFORE_HTML:{jn(this,t);break}case x.BEFORE_HEAD:{zn(this,t);break}case x.IN_HEAD:{$n(this,t);break}case x.IN_HEAD_NO_SCRIPT:{Yn(this,t);break}case x.AFTER_HEAD:{Gn(this,t);break}case x.TEXT:{this._insertCharacters(t);break}case x.IN_TABLE:case x.IN_TABLE_BODY:case x.IN_ROW:{vi(this,t);break}case x.IN_COLUMN_GROUP:{vr(this,t);break}case x.AFTER_BODY:{kr(this,t);break}case x.AFTER_AFTER_BODY:{Sr(this,t);break}}}onComment(t){if(this.skipNextNewLine=!1,this.currentNotInHTML){da(this,t);return}switch(this.insertionMode){case x.INITIAL:case x.BEFORE_HTML:case x.BEFORE_HEAD:case x.IN_HEAD:case x.IN_HEAD_NO_SCRIPT:case x.AFTER_HEAD:case x.IN_BODY:case x.IN_TABLE:case x.IN_CAPTION:case x.IN_COLUMN_GROUP:case x.IN_TABLE_BODY:case x.IN_ROW:case x.IN_CELL:case x.IN_SELECT:case x.IN_SELECT_IN_TABLE:case x.IN_TEMPLATE:case x.IN_FRAMESET:case x.AFTER_FRAMESET:{da(this,t);break}case x.IN_TABLE_TEXT:{Dn(this,t);break}case x.AFTER_BODY:{r1(this,t);break}case x.AFTER_AFTER_BODY:case x.AFTER_AFTER_FRAMESET:{i1(this,t);break}}}onDoctype(t){switch(this.skipNextNewLine=!1,this.insertionMode){case x.INITIAL:{a1(this,t);break}case x.BEFORE_HEAD:case x.IN_HEAD:case x.IN_HEAD_NO_SCRIPT:case x.AFTER_HEAD:{this._err(t,D.misplacedDoctype);break}case x.IN_TABLE_TEXT:{Dn(this,t);break}}}onStartTag(t){this.skipNextNewLine=!1,this.currentToken=t,this._processStartTag(t),t.selfClosing&&!t.ackSelfClosing&&this._err(t,D.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(t){this.shouldProcessStartTagTokenInForeignContent(t)?IE(this,t):this._startTagOutsideForeignContent(t)}_startTagOutsideForeignContent(t){switch(this.insertionMode){case x.INITIAL:{Ln(this,t);break}case x.BEFORE_HTML:{s1(this,t);break}case x.BEFORE_HEAD:{u1(this,t);break}case x.IN_HEAD:{mt(this,t);break}case x.IN_HEAD_NO_SCRIPT:{d1(this,t);break}case x.AFTER_HEAD:{h1(this,t);break}case x.IN_BODY:{qe(this,t);break}case x.IN_TABLE:{xn(this,t);break}case x.IN_TABLE_TEXT:{Dn(this,t);break}case x.IN_CAPTION:{lE(this,t);break}case x.IN_COLUMN_GROUP:{Ga(this,t);break}case x.IN_TABLE_BODY:{Qr(this,t);break}case x.IN_ROW:{Kr(this,t);break}case x.IN_CELL:{fE(this,t);break}case x.IN_SELECT:{ic(this,t);break}case x.IN_SELECT_IN_TABLE:{pE(this,t);break}case x.IN_TEMPLATE:{gE(this,t);break}case x.AFTER_BODY:{EE(this,t);break}case x.IN_FRAMESET:{TE(this,t);break}case x.AFTER_FRAMESET:{xE(this,t);break}case x.AFTER_AFTER_BODY:{_E(this,t);break}case x.AFTER_AFTER_FRAMESET:{CE(this,t);break}}}onEndTag(t){this.skipNextNewLine=!1,this.currentToken=t,this.currentNotInHTML?vE(this,t):this._endTagOutsideForeignContent(t)}_endTagOutsideForeignContent(t){switch(this.insertionMode){case x.INITIAL:{Ln(this,t);break}case x.BEFORE_HTML:{o1(this,t);break}case x.BEFORE_HEAD:{l1(this,t);break}case x.IN_HEAD:{c1(this,t);break}case x.IN_HEAD_NO_SCRIPT:{f1(this,t);break}case x.AFTER_HEAD:{p1(this,t);break}case x.IN_BODY:{Xr(this,t);break}case x.TEXT:{J1(this,t);break}case x.IN_TABLE:{Xn(this,t);break}case x.IN_TABLE_TEXT:{Dn(this,t);break}case x.IN_CAPTION:{cE(this,t);break}case x.IN_COLUMN_GROUP:{dE(this,t);break}case x.IN_TABLE_BODY:{fa(this,t);break}case x.IN_ROW:{rc(this,t);break}case x.IN_CELL:{hE(this,t);break}case x.IN_SELECT:{ac(this,t);break}case x.IN_SELECT_IN_TABLE:{mE(this,t);break}case x.IN_TEMPLATE:{bE(this,t);break}case x.AFTER_BODY:{oc(this,t);break}case x.IN_FRAMESET:{yE(this,t);break}case x.AFTER_FRAMESET:{SE(this,t);break}case x.AFTER_AFTER_BODY:{Sr(this,t);break}}}onEof(t){switch(this.insertionMode){case x.INITIAL:{Ln(this,t);break}case x.BEFORE_HTML:{jn(this,t);break}case x.BEFORE_HEAD:{zn(this,t);break}case x.IN_HEAD:{$n(this,t);break}case x.IN_HEAD_NO_SCRIPT:{Yn(this,t);break}case x.AFTER_HEAD:{Gn(this,t);break}case x.IN_BODY:case x.IN_TABLE:case x.IN_CAPTION:case x.IN_COLUMN_GROUP:case x.IN_TABLE_BODY:case x.IN_ROW:case x.IN_CELL:case x.IN_SELECT:case x.IN_SELECT_IN_TABLE:{Jl(this,t);break}case x.TEXT:{eE(this,t);break}case x.IN_TABLE_TEXT:{Dn(this,t);break}case x.IN_TEMPLATE:{sc(this,t);break}case x.AFTER_BODY:case x.IN_FRAMESET:case x.AFTER_FRAMESET:case x.AFTER_AFTER_BODY:case x.AFTER_AFTER_FRAMESET:{Ya(this,t);break}}}onWhitespaceCharacter(t){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,t.chars.charCodeAt(0)===g.LINE_FEED)){if(t.chars.length===1)return;t.chars=t.chars.substr(1)}if(this.tokenizer.inForeignNode){this._insertCharacters(t);return}switch(this.insertionMode){case x.IN_HEAD:case x.IN_HEAD_NO_SCRIPT:case x.AFTER_HEAD:case x.TEXT:case x.IN_COLUMN_GROUP:case x.IN_SELECT:case x.IN_SELECT_IN_TABLE:case x.IN_FRAMESET:case x.AFTER_FRAMESET:{this._insertCharacters(t);break}case x.IN_BODY:case x.IN_CAPTION:case x.IN_CELL:case x.IN_TEMPLATE:case x.AFTER_BODY:case x.AFTER_AFTER_BODY:case x.AFTER_AFTER_FRAMESET:{Wl(this,t);break}case x.IN_TABLE:case x.IN_TABLE_BODY:case x.IN_ROW:{vi(this,t);break}case x.IN_TABLE_TEXT:{ec(this,t);break}}}}function Kb(e,t){let n=e.activeFormattingElements.getElementEntryInScopeWithTagName(t.tagName);return n?e.openElements.contains(n.element)?e.openElements.hasInScope(t.tagID)||(n=null):(e.activeFormattingElements.removeEntry(n),n=null):Zl(e,t),n}function Zb(e,t){let n=null,r=e.openElements.stackTop;for(;r>=0;r--){const i=e.openElements.items[r];if(i===t.element)break;e._isSpecialElement(i,e.openElements.tagIDs[r])&&(n=i)}return n||(e.openElements.shortenToLength(r<0?0:r),e.activeFormattingElements.removeEntry(t)),n}function Jb(e,t,n){let r=t,i=e.openElements.getCommonAncestor(t);for(let a=0,s=i;s!==n;a++,s=i){i=e.openElements.getCommonAncestor(s);const o=e.activeFormattingElements.getElementEntry(s),u=o&&a>=Xb;!o||u?(u&&e.activeFormattingElements.removeEntry(o),e.openElements.remove(s)):(s=e1(e,o),r===t&&(e.activeFormattingElements.bookmark=o),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(s,r),r=s)}return r}function e1(e,t){const n=e.treeAdapter.getNamespaceURI(t.element),r=e.treeAdapter.createElement(t.token.tagName,n,t.token.attrs);return e.openElements.replace(t.element,r),t.element=r,r}function t1(e,t,n){const r=e.treeAdapter.getTagName(t),i=In(r);if(e._isElementCausesFosterParenting(i))e._fosterParentElement(n);else{const a=e.treeAdapter.getNamespaceURI(t);i===l.TEMPLATE&&a===M.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function n1(e,t,n){const r=e.treeAdapter.getNamespaceURI(n.element),{token:i}=n,a=e.treeAdapter.createElement(i.tagName,r,i.attrs);e._adoptNodes(t,a),e.treeAdapter.appendChild(t,a),e.activeFormattingElements.insertElementAfterBookmark(a,i),e.activeFormattingElements.removeEntry(n),e.openElements.remove(n.element),e.openElements.insertAfter(t,a,i.tagID)}function $a(e,t){for(let n=0;n<Wb;n++){const r=Kb(e,t);if(!r)break;const i=Zb(e,r);if(!i)break;e.activeFormattingElements.bookmark=r;const a=Jb(e,i,r.element),s=e.openElements.getCommonAncestor(r.element);e.treeAdapter.detachNode(a),s&&t1(e,s,a),n1(e,i,r)}}function da(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function r1(e,t){e._appendCommentNode(t,e.openElements.items[0])}function i1(e,t){e._appendCommentNode(t,e.document)}function Ya(e,t){if(e.stopped=!0,t.location){const n=e.fragmentContext?0:2;for(let r=e.openElements.stackTop;r>=n;r--)e._setEndLocation(e.openElements.items[r],t);if(!e.fragmentContext&&e.openElements.stackTop>=0){const r=e.openElements.items[0],i=e.treeAdapter.getNodeSourceCodeLocation(r);if(i&&!i.endTag&&(e._setEndLocation(r,t),e.openElements.stackTop>=1)){const a=e.openElements.items[1],s=e.treeAdapter.getNodeSourceCodeLocation(a);s&&!s.endTag&&e._setEndLocation(a,t)}}}}function a1(e,t){e._setDocumentType(t);const n=t.forceQuirks?ut.QUIRKS:Pb(t);Db(t)||e._err(t,D.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=x.BEFORE_HTML}function Ln(e,t){e._err(t,D.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,ut.QUIRKS),e.insertionMode=x.BEFORE_HTML,e._processToken(t)}function s1(e,t){t.tagID===l.HTML?(e._insertElement(t,M.HTML),e.insertionMode=x.BEFORE_HEAD):jn(e,t)}function o1(e,t){const n=t.tagID;(n===l.HTML||n===l.HEAD||n===l.BODY||n===l.BR)&&jn(e,t)}function jn(e,t){e._insertFakeRootElement(),e.insertionMode=x.BEFORE_HEAD,e._processToken(t)}function u1(e,t){switch(t.tagID){case l.HTML:{qe(e,t);break}case l.HEAD:{e._insertElement(t,M.HTML),e.headElement=e.openElements.current,e.insertionMode=x.IN_HEAD;break}default:zn(e,t)}}function l1(e,t){const n=t.tagID;n===l.HEAD||n===l.BODY||n===l.HTML||n===l.BR?zn(e,t):e._err(t,D.endTagWithoutMatchingOpenElement)}function zn(e,t){e._insertFakeElement(O.HEAD,l.HEAD),e.headElement=e.openElements.current,e.insertionMode=x.IN_HEAD,e._processToken(t)}function mt(e,t){switch(t.tagID){case l.HTML:{qe(e,t);break}case l.BASE:case l.BASEFONT:case l.BGSOUND:case l.LINK:case l.META:{e._appendElement(t,M.HTML),t.ackSelfClosing=!0;break}case l.TITLE:{e._switchToTextParsing(t,Pe.RCDATA);break}case l.NOSCRIPT:{e.options.scriptingEnabled?e._switchToTextParsing(t,Pe.RAWTEXT):(e._insertElement(t,M.HTML),e.insertionMode=x.IN_HEAD_NO_SCRIPT);break}case l.NOFRAMES:case l.STYLE:{e._switchToTextParsing(t,Pe.RAWTEXT);break}case l.SCRIPT:{e._switchToTextParsing(t,Pe.SCRIPT_DATA);break}case l.TEMPLATE:{e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=x.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(x.IN_TEMPLATE);break}case l.HEAD:{e._err(t,D.misplacedStartTagForHeadElement);break}default:$n(e,t)}}function c1(e,t){switch(t.tagID){case l.HEAD:{e.openElements.pop(),e.insertionMode=x.AFTER_HEAD;break}case l.BODY:case l.BR:case l.HTML:{$n(e,t);break}case l.TEMPLATE:{on(e,t);break}default:e._err(t,D.endTagWithoutMatchingOpenElement)}}function on(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==l.TEMPLATE&&e._err(t,D.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(l.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,D.endTagWithoutMatchingOpenElement)}function $n(e,t){e.openElements.pop(),e.insertionMode=x.AFTER_HEAD,e._processToken(t)}function d1(e,t){switch(t.tagID){case l.HTML:{qe(e,t);break}case l.BASEFONT:case l.BGSOUND:case l.HEAD:case l.LINK:case l.META:case l.NOFRAMES:case l.STYLE:{mt(e,t);break}case l.NOSCRIPT:{e._err(t,D.nestedNoscriptInHead);break}default:Yn(e,t)}}function f1(e,t){switch(t.tagID){case l.NOSCRIPT:{e.openElements.pop(),e.insertionMode=x.IN_HEAD;break}case l.BR:{Yn(e,t);break}default:e._err(t,D.endTagWithoutMatchingOpenElement)}}function Yn(e,t){const n=t.type===me.EOF?D.openElementsLeftAfterEof:D.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=x.IN_HEAD,e._processToken(t)}function h1(e,t){switch(t.tagID){case l.HTML:{qe(e,t);break}case l.BODY:{e._insertElement(t,M.HTML),e.framesetOk=!1,e.insertionMode=x.IN_BODY;break}case l.FRAMESET:{e._insertElement(t,M.HTML),e.insertionMode=x.IN_FRAMESET;break}case l.BASE:case l.BASEFONT:case l.BGSOUND:case l.LINK:case l.META:case l.NOFRAMES:case l.SCRIPT:case l.STYLE:case l.TEMPLATE:case l.TITLE:{e._err(t,D.abandonedHeadElementChild),e.openElements.push(e.headElement,l.HEAD),mt(e,t),e.openElements.remove(e.headElement);break}case l.HEAD:{e._err(t,D.misplacedStartTagForHeadElement);break}default:Gn(e,t)}}function p1(e,t){switch(t.tagID){case l.BODY:case l.HTML:case l.BR:{Gn(e,t);break}case l.TEMPLATE:{on(e,t);break}default:e._err(t,D.endTagWithoutMatchingOpenElement)}}function Gn(e,t){e._insertFakeElement(O.BODY,l.BODY),e.insertionMode=x.IN_BODY,Wr(e,t)}function Wr(e,t){switch(t.type){case me.CHARACTER:{Xl(e,t);break}case me.WHITESPACE_CHARACTER:{Wl(e,t);break}case me.COMMENT:{da(e,t);break}case me.START_TAG:{qe(e,t);break}case me.END_TAG:{Xr(e,t);break}case me.EOF:{Jl(e,t);break}}}function Wl(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function Xl(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function m1(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function g1(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}function b1(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,M.HTML),e.insertionMode=x.IN_FRAMESET)}function E1(e,t){e.openElements.hasInButtonScope(l.P)&&e._closePElement(),e._insertElement(t,M.HTML)}function T1(e,t){e.openElements.hasInButtonScope(l.P)&&e._closePElement(),ca.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,M.HTML)}function y1(e,t){e.openElements.hasInButtonScope(l.P)&&e._closePElement(),e._insertElement(t,M.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function x1(e,t){const n=e.openElements.tmplCount>0;(!e.formElement||n)&&(e.openElements.hasInButtonScope(l.P)&&e._closePElement(),e._insertElement(t,M.HTML),n||(e.formElement=e.openElements.current))}function S1(e,t){e.framesetOk=!1;const n=t.tagID;for(let r=e.openElements.stackTop;r>=0;r--){const i=e.openElements.tagIDs[r];if(n===l.LI&&i===l.LI||(n===l.DD||n===l.DT)&&(i===l.DD||i===l.DT)){e.openElements.generateImpliedEndTagsWithExclusion(i),e.openElements.popUntilTagNamePopped(i);break}if(i!==l.ADDRESS&&i!==l.DIV&&i!==l.P&&e._isSpecialElement(e.openElements.items[r],i))break}e.openElements.hasInButtonScope(l.P)&&e._closePElement(),e._insertElement(t,M.HTML)}function _1(e,t){e.openElements.hasInButtonScope(l.P)&&e._closePElement(),e._insertElement(t,M.HTML),e.tokenizer.state=Pe.PLAINTEXT}function C1(e,t){e.openElements.hasInScope(l.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(l.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,M.HTML),e.framesetOk=!1}function A1(e,t){const n=e.activeFormattingElements.getElementEntryInScopeWithTagName(O.A);n&&($a(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,M.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function w1(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,M.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function I1(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(l.NOBR)&&($a(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,M.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function v1(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,M.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function k1(e,t){e.treeAdapter.getDocumentMode(e.document)!==ut.QUIRKS&&e.openElements.hasInButtonScope(l.P)&&e._closePElement(),e._insertElement(t,M.HTML),e.framesetOk=!1,e.insertionMode=x.IN_TABLE}function Ql(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,M.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function Kl(e){const t=Ml(e,Kt.TYPE);return t!=null&&t.toLowerCase()===Vb}function N1(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,M.HTML),Kl(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function O1(e,t){e._appendElement(t,M.HTML),t.ackSelfClosing=!0}function R1(e,t){e.openElements.hasInButtonScope(l.P)&&e._closePElement(),e._appendElement(t,M.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function L1(e,t){t.tagName=O.IMG,t.tagID=l.IMG,Ql(e,t)}function D1(e,t){e._insertElement(t,M.HTML),e.skipNextNewLine=!0,e.tokenizer.state=Pe.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=x.TEXT}function P1(e,t){e.openElements.hasInButtonScope(l.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,Pe.RAWTEXT)}function M1(e,t){e.framesetOk=!1,e._switchToTextParsing(t,Pe.RAWTEXT)}function ko(e,t){e._switchToTextParsing(t,Pe.RAWTEXT)}function B1(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,M.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===x.IN_TABLE||e.insertionMode===x.IN_CAPTION||e.insertionMode===x.IN_TABLE_BODY||e.insertionMode===x.IN_ROW||e.insertionMode===x.IN_CELL?x.IN_SELECT_IN_TABLE:x.IN_SELECT}function F1(e,t){e.openElements.currentTagId===l.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,M.HTML)}function H1(e,t){e.openElements.hasInScope(l.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,M.HTML)}function U1(e,t){e.openElements.hasInScope(l.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(l.RTC),e._insertElement(t,M.HTML)}function j1(e,t){e._reconstructActiveFormattingElements(),Gl(t),za(t),t.selfClosing?e._appendElement(t,M.MATHML):e._insertElement(t,M.MATHML),t.ackSelfClosing=!0}function z1(e,t){e._reconstructActiveFormattingElements(),ql(t),za(t),t.selfClosing?e._appendElement(t,M.SVG):e._insertElement(t,M.SVG),t.ackSelfClosing=!0}function No(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,M.HTML)}function qe(e,t){switch(t.tagID){case l.I:case l.S:case l.B:case l.U:case l.EM:case l.TT:case l.BIG:case l.CODE:case l.FONT:case l.SMALL:case l.STRIKE:case l.STRONG:{w1(e,t);break}case l.A:{A1(e,t);break}case l.H1:case l.H2:case l.H3:case l.H4:case l.H5:case l.H6:{T1(e,t);break}case l.P:case l.DL:case l.OL:case l.UL:case l.DIV:case l.DIR:case l.NAV:case l.MAIN:case l.MENU:case l.ASIDE:case l.CENTER:case l.FIGURE:case l.FOOTER:case l.HEADER:case l.HGROUP:case l.DIALOG:case l.DETAILS:case l.ADDRESS:case l.ARTICLE:case l.SEARCH:case l.SECTION:case l.SUMMARY:case l.FIELDSET:case l.BLOCKQUOTE:case l.FIGCAPTION:{E1(e,t);break}case l.LI:case l.DD:case l.DT:{S1(e,t);break}case l.BR:case l.IMG:case l.WBR:case l.AREA:case l.EMBED:case l.KEYGEN:{Ql(e,t);break}case l.HR:{R1(e,t);break}case l.RB:case l.RTC:{H1(e,t);break}case l.RT:case l.RP:{U1(e,t);break}case l.PRE:case l.LISTING:{y1(e,t);break}case l.XMP:{P1(e,t);break}case l.SVG:{z1(e,t);break}case l.HTML:{m1(e,t);break}case l.BASE:case l.LINK:case l.META:case l.STYLE:case l.TITLE:case l.SCRIPT:case l.BGSOUND:case l.BASEFONT:case l.TEMPLATE:{mt(e,t);break}case l.BODY:{g1(e,t);break}case l.FORM:{x1(e,t);break}case l.NOBR:{I1(e,t);break}case l.MATH:{j1(e,t);break}case l.TABLE:{k1(e,t);break}case l.INPUT:{N1(e,t);break}case l.PARAM:case l.TRACK:case l.SOURCE:{O1(e,t);break}case l.IMAGE:{L1(e,t);break}case l.BUTTON:{C1(e,t);break}case l.APPLET:case l.OBJECT:case l.MARQUEE:{v1(e,t);break}case l.IFRAME:{M1(e,t);break}case l.SELECT:{B1(e,t);break}case l.OPTION:case l.OPTGROUP:{F1(e,t);break}case l.NOEMBED:case l.NOFRAMES:{ko(e,t);break}case l.FRAMESET:{b1(e,t);break}case l.TEXTAREA:{D1(e,t);break}case l.NOSCRIPT:{e.options.scriptingEnabled?ko(e,t):No(e,t);break}case l.PLAINTEXT:{_1(e,t);break}case l.COL:case l.TH:case l.TD:case l.TR:case l.HEAD:case l.FRAME:case l.TBODY:case l.TFOOT:case l.THEAD:case l.CAPTION:case l.COLGROUP:break;default:No(e,t)}}function $1(e,t){if(e.openElements.hasInScope(l.BODY)&&(e.insertionMode=x.AFTER_BODY,e.options.sourceCodeLocationInfo)){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e._setEndLocation(n,t)}}function Y1(e,t){e.openElements.hasInScope(l.BODY)&&(e.insertionMode=x.AFTER_BODY,oc(e,t))}function G1(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function q1(e){const t=e.openElements.tmplCount>0,{formElement:n}=e;t||(e.formElement=null),(n||t)&&e.openElements.hasInScope(l.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(l.FORM):n&&e.openElements.remove(n))}function V1(e){e.openElements.hasInButtonScope(l.P)||e._insertFakeElement(O.P,l.P),e._closePElement()}function W1(e){e.openElements.hasInListItemScope(l.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(l.LI),e.openElements.popUntilTagNamePopped(l.LI))}function X1(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}function Q1(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function K1(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function Z1(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(O.BR,l.BR),e.openElements.pop(),e.framesetOk=!1}function Zl(e,t){const n=t.tagName,r=t.tagID;for(let i=e.openElements.stackTop;i>0;i--){const a=e.openElements.items[i],s=e.openElements.tagIDs[i];if(r===s&&(r!==l.UNKNOWN||e.treeAdapter.getTagName(a)===n)){e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.stackTop>=i&&e.openElements.shortenToLength(i);break}if(e._isSpecialElement(a,s))break}}function Xr(e,t){switch(t.tagID){case l.A:case l.B:case l.I:case l.S:case l.U:case l.EM:case l.TT:case l.BIG:case l.CODE:case l.FONT:case l.NOBR:case l.SMALL:case l.STRIKE:case l.STRONG:{$a(e,t);break}case l.P:{V1(e);break}case l.DL:case l.UL:case l.OL:case l.DIR:case l.DIV:case l.NAV:case l.PRE:case l.MAIN:case l.MENU:case l.ASIDE:case l.BUTTON:case l.CENTER:case l.FIGURE:case l.FOOTER:case l.HEADER:case l.HGROUP:case l.DIALOG:case l.ADDRESS:case l.ARTICLE:case l.DETAILS:case l.SEARCH:case l.SECTION:case l.SUMMARY:case l.LISTING:case l.FIELDSET:case l.BLOCKQUOTE:case l.FIGCAPTION:{G1(e,t);break}case l.LI:{W1(e);break}case l.DD:case l.DT:{X1(e,t);break}case l.H1:case l.H2:case l.H3:case l.H4:case l.H5:case l.H6:{Q1(e);break}case l.BR:{Z1(e);break}case l.BODY:{$1(e,t);break}case l.HTML:{Y1(e,t);break}case l.FORM:{q1(e);break}case l.APPLET:case l.OBJECT:case l.MARQUEE:{K1(e,t);break}case l.TEMPLATE:{on(e,t);break}default:Zl(e,t)}}function Jl(e,t){e.tmplInsertionModeStack.length>0?sc(e,t):Ya(e,t)}function J1(e,t){var n;t.tagID===l.SCRIPT&&((n=e.scriptHandler)===null||n===void 0||n.call(e,e.openElements.current)),e.openElements.pop(),e.insertionMode=e.originalInsertionMode}function eE(e,t){e._err(t,D.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function vi(e,t){if(Vl.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=x.IN_TABLE_TEXT,t.type){case me.CHARACTER:{tc(e,t);break}case me.WHITESPACE_CHARACTER:{ec(e,t);break}}else nr(e,t)}function tE(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,M.HTML),e.insertionMode=x.IN_CAPTION}function nE(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,M.HTML),e.insertionMode=x.IN_COLUMN_GROUP}function rE(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(O.COLGROUP,l.COLGROUP),e.insertionMode=x.IN_COLUMN_GROUP,Ga(e,t)}function iE(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,M.HTML),e.insertionMode=x.IN_TABLE_BODY}function aE(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(O.TBODY,l.TBODY),e.insertionMode=x.IN_TABLE_BODY,Qr(e,t)}function sE(e,t){e.openElements.hasInTableScope(l.TABLE)&&(e.openElements.popUntilTagNamePopped(l.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function oE(e,t){Kl(t)?e._appendElement(t,M.HTML):nr(e,t),t.ackSelfClosing=!0}function uE(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,M.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function xn(e,t){switch(t.tagID){case l.TD:case l.TH:case l.TR:{aE(e,t);break}case l.STYLE:case l.SCRIPT:case l.TEMPLATE:{mt(e,t);break}case l.COL:{rE(e,t);break}case l.FORM:{uE(e,t);break}case l.TABLE:{sE(e,t);break}case l.TBODY:case l.TFOOT:case l.THEAD:{iE(e,t);break}case l.INPUT:{oE(e,t);break}case l.CAPTION:{tE(e,t);break}case l.COLGROUP:{nE(e,t);break}default:nr(e,t)}}function Xn(e,t){switch(t.tagID){case l.TABLE:{e.openElements.hasInTableScope(l.TABLE)&&(e.openElements.popUntilTagNamePopped(l.TABLE),e._resetInsertionMode());break}case l.TEMPLATE:{on(e,t);break}case l.BODY:case l.CAPTION:case l.COL:case l.COLGROUP:case l.HTML:case l.TBODY:case l.TD:case l.TFOOT:case l.TH:case l.THEAD:case l.TR:break;default:nr(e,t)}}function nr(e,t){const n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,Wr(e,t),e.fosterParentingEnabled=n}function ec(e,t){e.pendingCharacterTokens.push(t)}function tc(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function Dn(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)nr(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}const nc=new Set([l.CAPTION,l.COL,l.COLGROUP,l.TBODY,l.TD,l.TFOOT,l.TH,l.THEAD,l.TR]);function lE(e,t){const n=t.tagID;nc.has(n)?e.openElements.hasInTableScope(l.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(l.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=x.IN_TABLE,xn(e,t)):qe(e,t)}function cE(e,t){const n=t.tagID;switch(n){case l.CAPTION:case l.TABLE:{e.openElements.hasInTableScope(l.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(l.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=x.IN_TABLE,n===l.TABLE&&Xn(e,t));break}case l.BODY:case l.COL:case l.COLGROUP:case l.HTML:case l.TBODY:case l.TD:case l.TFOOT:case l.TH:case l.THEAD:case l.TR:break;default:Xr(e,t)}}function Ga(e,t){switch(t.tagID){case l.HTML:{qe(e,t);break}case l.COL:{e._appendElement(t,M.HTML),t.ackSelfClosing=!0;break}case l.TEMPLATE:{mt(e,t);break}default:vr(e,t)}}function dE(e,t){switch(t.tagID){case l.COLGROUP:{e.openElements.currentTagId===l.COLGROUP&&(e.openElements.pop(),e.insertionMode=x.IN_TABLE);break}case l.TEMPLATE:{on(e,t);break}case l.COL:break;default:vr(e,t)}}function vr(e,t){e.openElements.currentTagId===l.COLGROUP&&(e.openElements.pop(),e.insertionMode=x.IN_TABLE,e._processToken(t))}function Qr(e,t){switch(t.tagID){case l.TR:{e.openElements.clearBackToTableBodyContext(),e._insertElement(t,M.HTML),e.insertionMode=x.IN_ROW;break}case l.TH:case l.TD:{e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(O.TR,l.TR),e.insertionMode=x.IN_ROW,Kr(e,t);break}case l.CAPTION:case l.COL:case l.COLGROUP:case l.TBODY:case l.TFOOT:case l.THEAD:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=x.IN_TABLE,xn(e,t));break}default:xn(e,t)}}function fa(e,t){const n=t.tagID;switch(t.tagID){case l.TBODY:case l.TFOOT:case l.THEAD:{e.openElements.hasInTableScope(n)&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=x.IN_TABLE);break}case l.TABLE:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=x.IN_TABLE,Xn(e,t));break}case l.BODY:case l.CAPTION:case l.COL:case l.COLGROUP:case l.HTML:case l.TD:case l.TH:case l.TR:break;default:Xn(e,t)}}function Kr(e,t){switch(t.tagID){case l.TH:case l.TD:{e.openElements.clearBackToTableRowContext(),e._insertElement(t,M.HTML),e.insertionMode=x.IN_CELL,e.activeFormattingElements.insertMarker();break}case l.CAPTION:case l.COL:case l.COLGROUP:case l.TBODY:case l.TFOOT:case l.THEAD:case l.TR:{e.openElements.hasInTableScope(l.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=x.IN_TABLE_BODY,Qr(e,t));break}default:xn(e,t)}}function rc(e,t){switch(t.tagID){case l.TR:{e.openElements.hasInTableScope(l.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=x.IN_TABLE_BODY);break}case l.TABLE:{e.openElements.hasInTableScope(l.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=x.IN_TABLE_BODY,fa(e,t));break}case l.TBODY:case l.TFOOT:case l.THEAD:{(e.openElements.hasInTableScope(t.tagID)||e.openElements.hasInTableScope(l.TR))&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=x.IN_TABLE_BODY,fa(e,t));break}case l.BODY:case l.CAPTION:case l.COL:case l.COLGROUP:case l.HTML:case l.TD:case l.TH:break;default:Xn(e,t)}}function fE(e,t){const n=t.tagID;nc.has(n)?(e.openElements.hasInTableScope(l.TD)||e.openElements.hasInTableScope(l.TH))&&(e._closeTableCell(),Kr(e,t)):qe(e,t)}function hE(e,t){const n=t.tagID;switch(n){case l.TD:case l.TH:{e.openElements.hasInTableScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=x.IN_ROW);break}case l.TABLE:case l.TBODY:case l.TFOOT:case l.THEAD:case l.TR:{e.openElements.hasInTableScope(n)&&(e._closeTableCell(),rc(e,t));break}case l.BODY:case l.CAPTION:case l.COL:case l.COLGROUP:case l.HTML:break;default:Xr(e,t)}}function ic(e,t){switch(t.tagID){case l.HTML:{qe(e,t);break}case l.OPTION:{e.openElements.currentTagId===l.OPTION&&e.openElements.pop(),e._insertElement(t,M.HTML);break}case l.OPTGROUP:{e.openElements.currentTagId===l.OPTION&&e.openElements.pop(),e.openElements.currentTagId===l.OPTGROUP&&e.openElements.pop(),e._insertElement(t,M.HTML);break}case l.HR:{e.openElements.currentTagId===l.OPTION&&e.openElements.pop(),e.openElements.currentTagId===l.OPTGROUP&&e.openElements.pop(),e._appendElement(t,M.HTML),t.ackSelfClosing=!0;break}case l.INPUT:case l.KEYGEN:case l.TEXTAREA:case l.SELECT:{e.openElements.hasInSelectScope(l.SELECT)&&(e.openElements.popUntilTagNamePopped(l.SELECT),e._resetInsertionMode(),t.tagID!==l.SELECT&&e._processStartTag(t));break}case l.SCRIPT:case l.TEMPLATE:{mt(e,t);break}}}function ac(e,t){switch(t.tagID){case l.OPTGROUP:{e.openElements.stackTop>0&&e.openElements.currentTagId===l.OPTION&&e.openElements.tagIDs[e.openElements.stackTop-1]===l.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagId===l.OPTGROUP&&e.openElements.pop();break}case l.OPTION:{e.openElements.currentTagId===l.OPTION&&e.openElements.pop();break}case l.SELECT:{e.openElements.hasInSelectScope(l.SELECT)&&(e.openElements.popUntilTagNamePopped(l.SELECT),e._resetInsertionMode());break}case l.TEMPLATE:{on(e,t);break}}}function pE(e,t){const n=t.tagID;n===l.CAPTION||n===l.TABLE||n===l.TBODY||n===l.TFOOT||n===l.THEAD||n===l.TR||n===l.TD||n===l.TH?(e.openElements.popUntilTagNamePopped(l.SELECT),e._resetInsertionMode(),e._processStartTag(t)):ic(e,t)}function mE(e,t){const n=t.tagID;n===l.CAPTION||n===l.TABLE||n===l.TBODY||n===l.TFOOT||n===l.THEAD||n===l.TR||n===l.TD||n===l.TH?e.openElements.hasInTableScope(n)&&(e.openElements.popUntilTagNamePopped(l.SELECT),e._resetInsertionMode(),e.onEndTag(t)):ac(e,t)}function gE(e,t){switch(t.tagID){case l.BASE:case l.BASEFONT:case l.BGSOUND:case l.LINK:case l.META:case l.NOFRAMES:case l.SCRIPT:case l.STYLE:case l.TEMPLATE:case l.TITLE:{mt(e,t);break}case l.CAPTION:case l.COLGROUP:case l.TBODY:case l.TFOOT:case l.THEAD:{e.tmplInsertionModeStack[0]=x.IN_TABLE,e.insertionMode=x.IN_TABLE,xn(e,t);break}case l.COL:{e.tmplInsertionModeStack[0]=x.IN_COLUMN_GROUP,e.insertionMode=x.IN_COLUMN_GROUP,Ga(e,t);break}case l.TR:{e.tmplInsertionModeStack[0]=x.IN_TABLE_BODY,e.insertionMode=x.IN_TABLE_BODY,Qr(e,t);break}case l.TD:case l.TH:{e.tmplInsertionModeStack[0]=x.IN_ROW,e.insertionMode=x.IN_ROW,Kr(e,t);break}default:e.tmplInsertionModeStack[0]=x.IN_BODY,e.insertionMode=x.IN_BODY,qe(e,t)}}function bE(e,t){t.tagID===l.TEMPLATE&&on(e,t)}function sc(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(l.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):Ya(e,t)}function EE(e,t){t.tagID===l.HTML?qe(e,t):kr(e,t)}function oc(e,t){var n;if(t.tagID===l.HTML){if(e.fragmentContext||(e.insertionMode=x.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===l.HTML){e._setEndLocation(e.openElements.items[0],t);const r=e.openElements.items[1];r&&!(!((n=e.treeAdapter.getNodeSourceCodeLocation(r))===null||n===void 0)&&n.endTag)&&e._setEndLocation(r,t)}}else kr(e,t)}function kr(e,t){e.insertionMode=x.IN_BODY,Wr(e,t)}function TE(e,t){switch(t.tagID){case l.HTML:{qe(e,t);break}case l.FRAMESET:{e._insertElement(t,M.HTML);break}case l.FRAME:{e._appendElement(t,M.HTML),t.ackSelfClosing=!0;break}case l.NOFRAMES:{mt(e,t);break}}}function yE(e,t){t.tagID===l.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==l.FRAMESET&&(e.insertionMode=x.AFTER_FRAMESET))}function xE(e,t){switch(t.tagID){case l.HTML:{qe(e,t);break}case l.NOFRAMES:{mt(e,t);break}}}function SE(e,t){t.tagID===l.HTML&&(e.insertionMode=x.AFTER_AFTER_FRAMESET)}function _E(e,t){t.tagID===l.HTML?qe(e,t):Sr(e,t)}function Sr(e,t){e.insertionMode=x.IN_BODY,Wr(e,t)}function CE(e,t){switch(t.tagID){case l.HTML:{qe(e,t);break}case l.NOFRAMES:{mt(e,t);break}}}function AE(e,t){t.chars=Le,e._insertCharacters(t)}function wE(e,t){e._insertCharacters(t),e.framesetOk=!1}function uc(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==M.HTML&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function IE(e,t){if(zb(t))uc(e),e._startTagOutsideForeignContent(t);else{const n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===M.MATHML?Gl(t):r===M.SVG&&($b(t),ql(t)),za(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}function vE(e,t){if(t.tagID===l.P||t.tagID===l.BR){uc(e),e._endTagOutsideForeignContent(t);return}for(let n=e.openElements.stackTop;n>0;n--){const r=e.openElements.items[n];if(e.treeAdapter.getNamespaceURI(r)===M.HTML){e._endTagOutsideForeignContent(t);break}const i=e.treeAdapter.getTagName(r);if(i.toLowerCase()===t.tagName){t.tagName=i,e.openElements.shortenToLength(n);break}}}O.AREA,O.BASE,O.BASEFONT,O.BGSOUND,O.BR,O.COL,O.EMBED,O.FRAME,O.HR,O.IMG,O.INPUT,O.KEYGEN,O.LINK,O.META,O.PARAM,O.SOURCE,O.TRACK,O.WBR;const kE=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),Oo={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function lc(e,t){const n=HE(e),r=Ol("type",{handlers:{root:NE,element:OE,text:RE,comment:dc,doctype:LE,raw:PE},unknown:ME}),i={parser:n?new vo(Oo):vo.getFragmentParser(void 0,Oo),handle(o){r(o,i)},stitches:!1,options:t||{}};r(e,i),vn(i,At());const a=n?i.parser.document:i.parser.getFragment(),s=jg(a,{file:i.options.file});return i.stitches&&Vr(s,"comment",function(o,u,c){const d=o;if(d.value.stitch&&c&&u!==void 0){const f=c.children;return f[u]=d.value.stitch,u}}),s.type==="root"&&s.children.length===1&&s.children[0].type===e.type?s.children[0]:s}function cc(e,t){let n=-1;if(e)for(;++n<e.length;)t.handle(e[n])}function NE(e,t){cc(e.children,t)}function OE(e,t){BE(e,t),cc(e.children,t),FE(e,t)}function RE(e,t){t.parser.tokenizer.state>4&&(t.parser.tokenizer.state=0);const n={type:me.CHARACTER,chars:e.value,location:rr(e)};vn(t,At(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function LE(e,t){const n={type:me.DOCTYPE,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:rr(e)};vn(t,At(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function DE(e,t){t.stitches=!0;const n=UE(e);if("children"in e&&"children"in n){const r=lc({type:"root",children:e.children},t.options);n.children=r.children}dc({type:"comment",value:{stitch:n}},t)}function dc(e,t){const n=e.value,r={type:me.COMMENT,data:n,location:rr(e)};vn(t,At(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function PE(e,t){if(t.parser.tokenizer.preprocessor.html="",t.parser.tokenizer.preprocessor.pos=-1,t.parser.tokenizer.preprocessor.lastGapPos=-2,t.parser.tokenizer.preprocessor.gapStack=[],t.parser.tokenizer.preprocessor.skipNextNewLine=!1,t.parser.tokenizer.preprocessor.lastChunkWritten=!1,t.parser.tokenizer.preprocessor.endOfChunkHit=!1,t.parser.tokenizer.preprocessor.isEol=!1,fc(t,At(e)),t.parser.tokenizer.write(e.value,!1),t.parser.tokenizer._runParsingLoop(),t.parser.tokenizer.state===72||t.parser.tokenizer.state===78){t.parser.tokenizer.preprocessor.lastChunkWritten=!0;const n=t.parser.tokenizer._consume();t.parser.tokenizer._callState(n)}}function ME(e,t){const n=e;if(t.options.passThrough&&t.options.passThrough.includes(n.type))DE(n,t);else{let r="";throw kE.has(n.type)&&(r=". It looks like you are using MDX nodes with `hast-util-raw` (or `rehype-raw`). If you use this because you are using remark or rehype plugins that inject `'html'` nodes, then please raise an issue with that plugin, as its a bad and slow idea. If you use this because you are using markdown syntax, then you have to configure this utility (or plugin) to pass through these nodes (see `passThrough` in docs), but you can also migrate to use the MDX syntax"),new Error("Cannot compile `"+n.type+"` node"+r)}}function vn(e,t){fc(e,t);const n=e.parser.tokenizer.currentCharacterToken;n&&n.location&&(n.location.endLine=e.parser.tokenizer.preprocessor.line,n.location.endCol=e.parser.tokenizer.preprocessor.col+1,n.location.endOffset=e.parser.tokenizer.preprocessor.offset+1,e.parser.currentToken=n,e.parser._processToken(e.parser.currentToken)),e.parser.tokenizer.paused=!1,e.parser.tokenizer.inLoop=!1,e.parser.tokenizer.active=!1,e.parser.tokenizer.returnState=Pe.DATA,e.parser.tokenizer.charRefCode=-1,e.parser.tokenizer.consumedAfterSnapshot=-1,e.parser.tokenizer.currentLocation=null,e.parser.tokenizer.currentCharacterToken=null,e.parser.tokenizer.currentToken=null,e.parser.tokenizer.currentAttr={name:"",value:""}}function fc(e,t){if(t&&t.offset!==void 0){const n={startLine:t.line,startCol:t.column,startOffset:t.offset,endLine:-1,endCol:-1,endOffset:-1};e.parser.tokenizer.preprocessor.lineStartPos=-t.column+1,e.parser.tokenizer.preprocessor.droppedBufferSize=t.offset,e.parser.tokenizer.preprocessor.line=t.line,e.parser.tokenizer.currentLocation=n}}function BE(e,t){const n=e.tagName.toLowerCase();if(t.parser.tokenizer.state===Pe.PLAINTEXT)return;vn(t,At(e));const r=t.parser.openElements.current;let i="namespaceURI"in r?r.namespaceURI:Qt.html;i===Qt.html&&n==="svg"&&(i=Qt.svg);const a=qg({...e,children:[]},{space:i===Qt.svg?"svg":"html"}),s={type:me.START_TAG,tagName:n,tagID:In(n),selfClosing:!1,ackSelfClosing:!1,attrs:"attrs"in a?a.attrs:[],location:rr(e)};t.parser.currentToken=s,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=n}function FE(e,t){const n=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&eb.includes(n)||t.parser.tokenizer.state===Pe.PLAINTEXT)return;vn(t,jr(e));const r={type:me.END_TAG,tagName:n,tagID:In(n),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:rr(e)};t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken),n===t.parser.tokenizer.lastStartTagName&&(t.parser.tokenizer.state===Pe.RCDATA||t.parser.tokenizer.state===Pe.RAWTEXT||t.parser.tokenizer.state===Pe.SCRIPT_DATA)&&(t.parser.tokenizer.state=Pe.DATA)}function HE(e){const t=e.type==="root"?e.children[0]:e;return!!(t&&(t.type==="doctype"||t.type==="element"&&t.tagName.toLowerCase()==="html"))}function rr(e){const t=At(e)||{line:void 0,column:void 0,offset:void 0},n=jr(e)||{line:void 0,column:void 0,offset:void 0};return{startLine:t.line,startCol:t.column,startOffset:t.offset,endLine:n.line,endCol:n.column,endOffset:n.offset}}function UE(e){return"children"in e?yn({...e,children:[]}):yn(e)}function qa(e){return function(t,n){return lc(t,{...e,file:n})}}const Va=({children:e})=>S.jsx("div",{className:"p-3",children:e}),jE=({content:e,metaData:t})=>S.jsx(Va,{children:S.jsx("div",{className:"flex justify-end",children:S.jsx("div",{className:`ml-auto w-fit max-w-full px-4 py-3 rounded-2xl rounded-br-md transition-all duration-300 text-left ${t?.isErrorMessage?"bg-red-100 border-l-4 border-red-400 text-red-800 shadow-md animate-fade-in":"bg-violet-600 text-white shadow-sm"}`,children:S.jsx("div",{children:S.jsx(Ha,{rehypePlugins:[qa],children:e&&e})})})})});function Ro(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}function zE(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function $E(e,t,n){const i=Gr((n||{}).ignore||[]),a=YE(t);let s=-1;for(;++s<a.length;)wl(e,"text",o);function o(c,d){let f=-1,p;for(;++f<d.length;){const h=d[f],b=p?p.children:void 0;if(i(h,b?b.indexOf(h):void 0,p))return;p=h}if(p)return u(c,d)}function u(c,d){const f=d[d.length-1],p=a[s][0],h=a[s][1];let b=0;const w=f.children.indexOf(c);let _=!1,k=[];p.lastIndex=0;let N=p.exec(c.value);for(;N;){const L=N.index,A={index:N.index,input:N.input,stack:[...d,c]};let v=h(...N,A);if(typeof v=="string"&&(v=v.length>0?{type:"text",value:v}:void 0),v===!1?p.lastIndex=L+1:(b!==L&&k.push({type:"text",value:c.value.slice(b,L)}),Array.isArray(v)?k.push(...v):v&&k.push(v),b=L+N[0].length,_=!0),!p.global)break;N=p.exec(c.value)}return _?(b<c.value.length&&k.push({type:"text",value:c.value.slice(b)}),f.children.splice(w,1,...k)):k=[c],w+k.length}}function YE(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 i=n[r];t.push([GE(i[0]),qE(i[1])])}return t}function GE(e){return typeof e=="string"?new RegExp(zE(e),"g"):e}function qE(e){return typeof e=="function"?e:function(){return e}}const ki="phrasing",Ni=["autolink","link","image","label"];function VE(){return{transforms:[eT],enter:{literalAutolink:XE,literalAutolinkEmail:Oi,literalAutolinkHttp:Oi,literalAutolinkWww:Oi},exit:{literalAutolink:JE,literalAutolinkEmail:ZE,literalAutolinkHttp:QE,literalAutolinkWww:KE}}}function WE(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:ki,notInConstruct:Ni},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:ki,notInConstruct:Ni},{character:":",before:"[ps]",after:"\\/",inConstruct:ki,notInConstruct:Ni}]}}function XE(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Oi(e){this.config.enter.autolinkProtocol.call(this,e)}function QE(e){this.config.exit.autolinkProtocol.call(this,e)}function KE(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 ZE(e){this.config.exit.autolinkEmail.call(this,e)}function JE(e){this.exit(e)}function eT(e){$E(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,tT],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),nT]],{ignore:["link","linkReference"]})}function tT(e,t,n,r,i){let a="";if(!hc(i)||(/^w/i.test(t)&&(n=t+n,t="",a="http://"),!rT(n)))return!1;const s=iT(n+r);if(!s[0])return!1;const o={type:"link",title:null,url:a+t+s[0],children:[{type:"text",value:t+s[0]}]};return s[1]?[o,{type:"text",value:s[1]}]:o}function nT(e,t,n,r){return!hc(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function rT(e){const t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function iT(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const i=Ro(e,"(");let a=Ro(e,")");for(;r!==-1&&i>a;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),a++;return[e,n]}function hc(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||en(n)||zr(n))&&(!t||n!==47)}pc.peek=hT;function aT(){this.buffer()}function sT(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function oT(){this.buffer()}function uT(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function lT(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=pt(this.sliceSerialize(e)).toLowerCase(),n.label=t}function cT(e){this.exit(e)}function dT(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=pt(this.sliceSerialize(e)).toLowerCase(),n.label=t}function fT(e){this.exit(e)}function hT(){return"["}function pc(e,t,n,r){const i=n.createTracker(r);let a=i.move("[^");const s=n.enter("footnoteReference"),o=n.enter("reference");return a+=i.move(n.safe(n.associationId(e),{after:"]",before:a})),o(),s(),a+=i.move("]"),a}function pT(){return{enter:{gfmFootnoteCallString:aT,gfmFootnoteCall:sT,gfmFootnoteDefinitionLabelString:oT,gfmFootnoteDefinition:uT},exit:{gfmFootnoteCallString:lT,gfmFootnoteCall:cT,gfmFootnoteDefinitionLabelString:dT,gfmFootnoteDefinition:fT}}}function mT(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:pc},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,i,a,s){const o=a.createTracker(s);let u=o.move("[^");const c=a.enter("footnoteDefinition"),d=a.enter("label");return u+=o.move(a.safe(a.associationId(r),{before:u,after:"]"})),d(),u+=o.move("]:"),r.children&&r.children.length>0&&(o.shift(4),u+=o.move((t?`
62
+ `:" ")+a.indentLines(a.containerFlow(r,o.current()),t?mc:gT))),c(),u}}function gT(e,t,n){return t===0?e:mc(e,t,n)}function mc(e,t,n){return(n?"":" ")+e}const bT=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];gc.peek=ST;function ET(){return{canContainEols:["delete"],enter:{strikethrough:yT},exit:{strikethrough:xT}}}function TT(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:bT}],handlers:{delete:gc}}}function yT(e){this.enter({type:"delete",children:[]},e)}function xT(e){this.exit(e)}function gc(e,t,n,r){const i=n.createTracker(r),a=n.enter("strikethrough");let s=i.move("~~");return s+=n.containerPhrasing(e,{...i.current(),before:s,after:"~"}),s+=i.move("~~"),a(),s}function ST(){return"~"}function _T(e){return e.length}function CT(e,t){const n=t||{},r=(n.align||[]).concat(),i=n.stringLength||_T,a=[],s=[],o=[],u=[];let c=0,d=-1;for(;++d<e.length;){const y=[],w=[];let _=-1;for(e[d].length>c&&(c=e[d].length);++_<e[d].length;){const k=AT(e[d][_]);if(n.alignDelimiters!==!1){const N=i(k);w[_]=N,(u[_]===void 0||N>u[_])&&(u[_]=N)}y.push(k)}s[d]=y,o[d]=w}let f=-1;if(typeof r=="object"&&"length"in r)for(;++f<c;)a[f]=Lo(r[f]);else{const y=Lo(r);for(;++f<c;)a[f]=y}f=-1;const p=[],h=[];for(;++f<c;){const y=a[f];let w="",_="";y===99?(w=":",_=":"):y===108?w=":":y===114&&(_=":");let k=n.alignDelimiters===!1?1:Math.max(1,u[f]-w.length-_.length);const N=w+"-".repeat(k)+_;n.alignDelimiters!==!1&&(k=w.length+k+_.length,k>u[f]&&(u[f]=k),h[f]=k),p[f]=N}s.splice(1,0,p),o.splice(1,0,h),d=-1;const b=[];for(;++d<s.length;){const y=s[d],w=o[d];f=-1;const _=[];for(;++f<c;){const k=y[f]||"";let N="",L="";if(n.alignDelimiters!==!1){const A=u[f]-(w[f]||0),v=a[f];v===114?N=" ".repeat(A):v===99?A%2?(N=" ".repeat(A/2+.5),L=" ".repeat(A/2-.5)):(N=" ".repeat(A/2),L=N):L=" ".repeat(A)}n.delimiterStart!==!1&&!f&&_.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&k==="")&&(n.delimiterStart!==!1||f)&&_.push(" "),n.alignDelimiters!==!1&&_.push(N),_.push(k),n.alignDelimiters!==!1&&_.push(L),n.padding!==!1&&_.push(" "),(n.delimiterEnd!==!1||f!==c-1)&&_.push("|")}b.push(n.delimiterEnd===!1?_.join("").replace(/ +$/,""):_.join(""))}return b.join(`
63
+ `)}function AT(e){return e==null?"":String(e)}function Lo(e){const t=typeof e=="string"?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}function wT(e,t,n,r){const i=n.enter("blockquote"),a=n.createTracker(r);a.move("> "),a.shift(2);const s=n.indentLines(n.containerFlow(e,a.current()),IT);return i(),s}function IT(e,t,n){return">"+(n?"":" ")+e}function vT(e,t){return Do(e,t.inConstruct,!0)&&!Do(e,t.notInConstruct,!1)}function Do(e,t,n){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function Po(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
64
+ `&&vT(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?"":" ";return`\\
65
+ `}function kT(e,t){const n=String(e);let r=n.indexOf(t),i=r,a=0,s=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===i?++a>s&&(s=a):a=1,i=r+t.length,r=n.indexOf(t,i);return s}function NT(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function OT(e){const t=e.options.fence||"`";if(t!=="`"&&t!=="~")throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function RT(e,t,n,r){const i=OT(n),a=e.value||"",s=i==="`"?"GraveAccent":"Tilde";if(NT(e,n)){const f=n.enter("codeIndented"),p=n.indentLines(a,LT);return f(),p}const o=n.createTracker(r),u=i.repeat(Math.max(kT(a,i)+1,3)),c=n.enter("codeFenced");let d=o.move(u);if(e.lang){const f=n.enter(`codeFencedLang${s}`);d+=o.move(n.safe(e.lang,{before:d,after:" ",encode:["`"],...o.current()})),f()}if(e.lang&&e.meta){const f=n.enter(`codeFencedMeta${s}`);d+=o.move(" "),d+=o.move(n.safe(e.meta,{before:d,after:`
66
66
  `,encode:["`"],...o.current()})),f()}return d+=o.move(`
67
67
  `),a&&(d+=o.move(a+`
68
- `)),d+=o.move(u),c(),d}function BE(e,t,n){return(n?"":" ")+e}function Oa(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 FE(e,t,n,r){const i=Oa(n),a=i==='"'?"Quote":"Apostrophe",s=n.enter("definition");let o=n.enter("label");const u=n.createTracker(r);let c=u.move("[");return c+=u.move(n.safe(n.associationId(e),{before:c,after:"]",...u.current()})),c+=u.move("]: "),o(),!e.url||/[\0- \u007F]/.test(e.url)?(o=n.enter("destinationLiteral"),c+=u.move("<"),c+=u.move(n.safe(e.url,{before:c,after:">",...u.current()})),c+=u.move(">")):(o=n.enter("destinationRaw"),c+=u.move(n.safe(e.url,{before:c,after:e.title?" ":`
69
- `,...u.current()}))),o(),e.title&&(o=n.enter(`title${a}`),c+=u.move(" "+i),c+=u.move(n.safe(e.title,{before:c,after:i,...u.current()})),c+=u.move(i),o()),s(),c}function HE(e){const t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}ql.peek=UE;function ql(e,t,n,r){const i=HE(n),a=n.enter("emphasis"),s=n.createTracker(r);let o=s.move(i);return o+=s.move(n.containerPhrasing(e,{before:o,after:i,...s.current()})),o+=s.move(i),a(),o}function UE(e,t,n){return n.options.emphasis||"*"}function jE(e,t){let n=!1;return Hr(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,$i}),!!((!e.depth||e.depth<3)&&ba(e)&&(t.options.setext||n))}function zE(e,t,n,r){const i=Math.max(Math.min(6,e.depth||1),1),a=n.createTracker(r);if(jE(e,n)){const d=n.enter("headingSetext"),f=n.enter("phrasing"),m=n.containerPhrasing(e,{...a.current(),before:`
68
+ `)),d+=o.move(u),c(),d}function LT(e,t,n){return(n?"":" ")+e}function Wa(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 DT(e,t,n,r){const i=Wa(n),a=i==='"'?"Quote":"Apostrophe",s=n.enter("definition");let o=n.enter("label");const u=n.createTracker(r);let c=u.move("[");return c+=u.move(n.safe(n.associationId(e),{before:c,after:"]",...u.current()})),c+=u.move("]: "),o(),!e.url||/[\0- \u007F]/.test(e.url)?(o=n.enter("destinationLiteral"),c+=u.move("<"),c+=u.move(n.safe(e.url,{before:c,after:">",...u.current()})),c+=u.move(">")):(o=n.enter("destinationRaw"),c+=u.move(n.safe(e.url,{before:c,after:e.title?" ":`
69
+ `,...u.current()}))),o(),e.title&&(o=n.enter(`title${a}`),c+=u.move(" "+i),c+=u.move(n.safe(e.title,{before:c,after:i,...u.current()})),c+=u.move(i),o()),s(),c}function PT(e){const t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}bc.peek=MT;function bc(e,t,n,r){const i=PT(n),a=n.enter("emphasis"),s=n.createTracker(r);let o=s.move(i);return o+=s.move(n.containerPhrasing(e,{before:o,after:i,...s.current()})),o+=s.move(i),a(),o}function MT(e,t,n){return n.options.emphasis||"*"}function BT(e,t){let n=!1;return Vr(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,ra}),!!((!e.depth||e.depth<3)&&Oa(e)&&(t.options.setext||n))}function FT(e,t,n,r){const i=Math.max(Math.min(6,e.depth||1),1),a=n.createTracker(r);if(BT(e,n)){const d=n.enter("headingSetext"),f=n.enter("phrasing"),p=n.containerPhrasing(e,{...a.current(),before:`
70
70
  `,after:`
71
- `});return f(),d(),m+`
72
- `+(i===1?"=":"-").repeat(m.length-(Math.max(m.lastIndexOf("\r"),m.lastIndexOf(`
71
+ `});return f(),d(),p+`
72
+ `+(i===1?"=":"-").repeat(p.length-(Math.max(p.lastIndexOf("\r"),p.lastIndexOf(`
73
73
  `))+1))}const s="#".repeat(i),o=n.enter("headingAtx"),u=n.enter("phrasing");a.move(s+" ");let c=n.containerPhrasing(e,{before:"# ",after:`
74
- `,...a.current()});return/^[\t ]/.test(c)&&(c="&#x"+c.charCodeAt(0).toString(16).toUpperCase()+";"+c.slice(1)),c=c?s+" "+c:s,n.options.closeAtx&&(c+=" "+s),u(),o(),c}Wl.peek=$E;function Wl(e){return e.value||""}function $E(){return"<"}Xl.peek=YE;function Xl(e,t,n,r){const i=Oa(n),a=i==='"'?"Quote":"Apostrophe",s=n.enter("image");let o=n.enter("label");const u=n.createTracker(r);let c=u.move("![");return c+=u.move(n.safe(e.alt,{before:c,after:"]",...u.current()})),c+=u.move("]("),o(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(o=n.enter("destinationLiteral"),c+=u.move("<"),c+=u.move(n.safe(e.url,{before:c,after:">",...u.current()})),c+=u.move(">")):(o=n.enter("destinationRaw"),c+=u.move(n.safe(e.url,{before:c,after:e.title?" ":")",...u.current()}))),o(),e.title&&(o=n.enter(`title${a}`),c+=u.move(" "+i),c+=u.move(n.safe(e.title,{before:c,after:i,...u.current()})),c+=u.move(i),o()),c+=u.move(")"),s(),c}function YE(){return"!"}Ql.peek=GE;function Ql(e,t,n,r){const i=e.referenceType,a=n.enter("imageReference");let s=n.enter("label");const o=n.createTracker(r);let u=o.move("![");const c=n.safe(e.alt,{before:u,after:"]",...o.current()});u+=o.move(c+"]["),s();const d=n.stack;n.stack=[],s=n.enter("reference");const f=n.safe(n.associationId(e),{before:u,after:"]",...o.current()});return s(),n.stack=d,a(),i==="full"||!c||c!==f?u+=o.move(f+"]"):i==="shortcut"?u=u.slice(0,-1):u+=o.move("]"),u}function GE(){return"!"}Kl.peek=VE;function Kl(e,t,n){let r=e.value||"",i="`",a=-1;for(;new RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++a<n.unsafe.length;){const s=n.unsafe[a],o=n.compilePattern(s);let u;if(s.atBreak)for(;u=o.exec(r);){let c=u.index;r.charCodeAt(c)===10&&r.charCodeAt(c-1)===13&&c--,r=r.slice(0,c)+" "+r.slice(u.index+1)}}return i+r+i}function VE(){return"`"}function Jl(e,t){const n=ba(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}Zl.peek=qE;function Zl(e,t,n,r){const i=Oa(n),a=i==='"'?"Quote":"Apostrophe",s=n.createTracker(r);let o,u;if(Jl(e,n)){const d=n.stack;n.stack=[],o=n.enter("autolink");let f=s.move("<");return f+=s.move(n.containerPhrasing(e,{before:f,after:">",...s.current()})),f+=s.move(">"),o(),n.stack=d,f}o=n.enter("link"),u=n.enter("label");let c=s.move("[");return c+=s.move(n.containerPhrasing(e,{before:c,after:"](",...s.current()})),c+=s.move("]("),u(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(u=n.enter("destinationLiteral"),c+=s.move("<"),c+=s.move(n.safe(e.url,{before:c,after:">",...s.current()})),c+=s.move(">")):(u=n.enter("destinationRaw"),c+=s.move(n.safe(e.url,{before:c,after:e.title?" ":")",...s.current()}))),u(),e.title&&(u=n.enter(`title${a}`),c+=s.move(" "+i),c+=s.move(n.safe(e.title,{before:c,after:i,...s.current()})),c+=s.move(i),u()),c+=s.move(")"),o(),c}function qE(e,t,n){return Jl(e,n)?"<":"["}ec.peek=WE;function ec(e,t,n,r){const i=e.referenceType,a=n.enter("linkReference");let s=n.enter("label");const o=n.createTracker(r);let u=o.move("[");const c=n.containerPhrasing(e,{before:u,after:"]",...o.current()});u+=o.move(c+"]["),s();const d=n.stack;n.stack=[],s=n.enter("reference");const f=n.safe(n.associationId(e),{before:u,after:"]",...o.current()});return s(),n.stack=d,a(),i==="full"||!c||c!==f?u+=o.move(f+"]"):i==="shortcut"?u=u.slice(0,-1):u+=o.move("]"),u}function WE(){return"["}function La(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 XE(e){const t=La(e),n=e.options.bulletOther;if(!n)return t==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function QE(e){const t=e.options.bulletOrdered||".";if(t!=="."&&t!==")")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function tc(e){const t=e.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function KE(e,t,n,r){const i=n.enter("list"),a=n.bulletCurrent;let s=e.ordered?QE(n):La(n);const o=e.ordered?s==="."?")":".":XE(n);let u=t&&n.bulletLastUsed?s===n.bulletLastUsed:!1;if(!e.ordered){const d=e.children?e.children[0]:void 0;if((s==="*"||s==="-")&&d&&(!d.children||!d.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(u=!0),tc(n)===s&&d){let f=-1;for(;++f<e.children.length;){const m=e.children[f];if(m&&m.type==="listItem"&&m.children&&m.children[0]&&m.children[0].type==="thematicBreak"){u=!0;break}}}}u&&(s=o),n.bulletCurrent=s;const c=n.containerFlow(e,r);return n.bulletLastUsed=s,n.bulletCurrent=a,i(),c}function JE(e){const t=e.options.listItemIndent||"one";if(t!=="tab"&&t!=="one"&&t!=="mixed")throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function ZE(e,t,n,r){const i=JE(n);let a=n.bulletCurrent||La(n);t&&t.type==="list"&&t.ordered&&(a=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+a);let s=a.length+1;(i==="tab"||i==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(s=Math.ceil(s/4)*4);const o=n.createTracker(r);o.move(a+" ".repeat(s-a.length)),o.shift(s);const u=n.enter("listItem"),c=n.indentLines(n.containerFlow(e,o.current()),d);return u(),c;function d(f,m,h){return m?(h?"":" ".repeat(s))+f:(h?a:a+" ".repeat(s-a.length))+f}}function eT(e,t,n,r){const i=n.enter("paragraph"),a=n.enter("phrasing"),s=n.containerPhrasing(e,r);return a(),i(),s}const tT=Br(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function nT(e,t,n,r){return(e.children.some(function(s){return tT(s)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function rT(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}nc.peek=iT;function nc(e,t,n,r){const i=rT(n),a=n.enter("strong"),s=n.createTracker(r);let o=s.move(i+i);return o+=s.move(n.containerPhrasing(e,{before:o,after:i,...s.current()})),o+=s.move(i+i),a(),o}function iT(e,t,n){return n.options.strong||"*"}function aT(e,t,n,r){return n.safe(e.value,r)}function sT(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function oT(e,t,n){const r=(tc(n)+(n.options.ruleSpaces?" ":"")).repeat(sT(n));return n.options.ruleSpaces?r.slice(0,-1):r}const rc={blockquote:kE,break:co,code:ME,definition:FE,emphasis:ql,hardBreak:co,heading:zE,html:Wl,image:Xl,imageReference:Ql,inlineCode:Kl,link:Zl,linkReference:ec,list:KE,listItem:ZE,paragraph:eT,root:nT,strong:nc,text:aT,thematicBreak:oT};function uT(){return{enter:{table:lT,tableData:fo,tableHeader:fo,tableRow:dT},exit:{codeText:fT,table:cT,tableData:Ei,tableHeader:Ei,tableRow:Ei}}}function lT(e){const t=e._align;this.enter({type:"table",align:t.map(function(n){return n==="none"?null:n}),children:[]},e),this.data.inTable=!0}function cT(e){this.exit(e),this.data.inTable=void 0}function dT(e){this.enter({type:"tableRow",children:[]},e)}function Ei(e){this.exit(e)}function fo(e){this.enter({type:"tableCell",children:[]},e)}function fT(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,hT));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function hT(e,t){return t==="|"?t:e}function mT(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,a=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
75
- `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:m,table:s,tableCell:u,tableRow:o}};function s(h,b,A,w){return c(d(h,A,w),h.align)}function o(h,b,A,w){const y=f(h,A,w),_=c([y]);return _.slice(0,_.indexOf(`
76
- `))}function u(h,b,A,w){const y=A.enter("tableCell"),_=A.enter("phrasing"),S=A.containerPhrasing(h,{...w,before:a,after:a});return _(),y(),S}function c(h,b){return IE(h,{align:b,alignDelimiters:r,padding:n,stringLength:i})}function d(h,b,A){const w=h.children;let y=-1;const _=[],S=b.enter("table");for(;++y<w.length;)_[y]=f(w[y],b,A);return S(),_}function f(h,b,A){const w=h.children;let y=-1;const _=[],S=b.enter("tableRow");for(;++y<w.length;)_[y]=u(w[y],h,b,A);return S(),_}function m(h,b,A){let w=rc.inlineCode(h,b,A);return A.stack.includes("tableCell")&&(w=w.replace(/\|/g,"\\$&")),w}}function pT(){return{exit:{taskListCheckValueChecked:ho,taskListCheckValueUnchecked:ho,paragraph:bT}}}function gT(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:ET}}}function ho(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function bT(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const i=t.children;let a=-1,s;for(;++a<i.length;){const o=i[a];if(o.type==="paragraph"){s=o;break}}s===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function ET(e,t,n,r){const i=e.children[0],a=typeof e.checked=="boolean"&&i&&i.type==="paragraph",s="["+(e.checked?"x":" ")+"] ",o=n.createTracker(r);a&&o.move(s);let u=rc.listItem(e,t,n,{...r,...o.current()});return a&&(u=u.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,c)),u;function c(d){return d+s}}function TT(){return[Kb(),EE(),AE(),uT(),pT()]}function xT(e){return{extensions:[Jb(),TE(e),_E(),mT(e),gT()]}}const yT={tokenize:vT,partial:!0},ic={tokenize:IT,partial:!0},ac={tokenize:NT,partial:!0},sc={tokenize:kT,partial:!0},AT={tokenize:OT,partial:!0},oc={name:"wwwAutolink",tokenize:ST,previous:lc},uc={name:"protocolAutolink",tokenize:wT,previous:cc},St={name:"emailAutolink",tokenize:CT,previous:dc},yt={};function _T(){return{text:yt}}let jt=48;for(;jt<123;)yt[jt]=St,jt++,jt===58?jt=65:jt===91&&(jt=97);yt[43]=St;yt[45]=St;yt[46]=St;yt[95]=St;yt[72]=[St,uc];yt[104]=[St,uc];yt[87]=[St,oc];yt[119]=[St,oc];function CT(e,t,n){const r=this;let i,a;return s;function s(f){return!Zi(f)||!dc.call(r,r.previous)||Ra(r.events)?n(f):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),o(f))}function o(f){return Zi(f)?(e.consume(f),o):f===64?(e.consume(f),u):n(f)}function u(f){return f===46?e.check(AT,d,c)(f):f===45||f===95||Ue(f)?(a=!0,e.consume(f),u):d(f)}function c(f){return e.consume(f),i=!0,u}function d(f){return a&&i&&Ve(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(f)):n(f)}}function ST(e,t,n){const r=this;return i;function i(s){return s!==87&&s!==119||!lc.call(r,r.previous)||Ra(r.events)?n(s):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(yT,e.attempt(ic,e.attempt(ac,a),n),n)(s))}function a(s){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(s)}}function wT(e,t,n){const r=this;let i="",a=!1;return s;function s(f){return(f===72||f===104)&&cc.call(r,r.previous)&&!Ra(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(f),e.consume(f),o):n(f)}function o(f){if(Ve(f)&&i.length<5)return i+=String.fromCodePoint(f),e.consume(f),o;if(f===58){const m=i.toLowerCase();if(m==="http"||m==="https")return e.consume(f),u}return n(f)}function u(f){return f===47?(e.consume(f),a?c:(a=!0,u)):n(f)}function c(f){return f===null||pr(f)||Ae(f)||Wt(f)||Dr(f)?n(f):e.attempt(ic,e.attempt(ac,d),n)(f)}function d(f){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(f)}}function vT(e,t,n){let r=0;return i;function i(s){return(s===87||s===119)&&r<3?(r++,e.consume(s),i):s===46&&r===3?(e.consume(s),a):n(s)}function a(s){return s===null?n(s):t(s)}}function IT(e,t,n){let r,i,a;return s;function s(c){return c===46||c===95?e.check(sc,u,o)(c):c===null||Ae(c)||Wt(c)||c!==45&&Dr(c)?u(c):(a=!0,e.consume(c),s)}function o(c){return c===95?r=!0:(i=r,r=void 0),e.consume(c),s}function u(c){return i||r||!a?n(c):t(c)}}function NT(e,t){let n=0,r=0;return i;function i(s){return s===40?(n++,e.consume(s),i):s===41&&r<n?a(s):s===33||s===34||s===38||s===39||s===41||s===42||s===44||s===46||s===58||s===59||s===60||s===63||s===93||s===95||s===126?e.check(sc,t,a)(s):s===null||Ae(s)||Wt(s)?t(s):(e.consume(s),i)}function a(s){return s===41&&r++,e.consume(s),i}}function kT(e,t,n){return r;function r(o){return o===33||o===34||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===63||o===95||o===126?(e.consume(o),r):o===38?(e.consume(o),a):o===93?(e.consume(o),i):o===60||o===null||Ae(o)||Wt(o)?t(o):n(o)}function i(o){return o===null||o===40||o===91||Ae(o)||Wt(o)?t(o):r(o)}function a(o){return Ve(o)?s(o):n(o)}function s(o){return o===59?(e.consume(o),r):Ve(o)?(e.consume(o),s):n(o)}}function OT(e,t,n){return r;function r(a){return e.consume(a),i}function i(a){return Ue(a)?n(a):t(a)}}function lc(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||Ae(e)}function cc(e){return!Ve(e)}function dc(e){return!(e===47||Zi(e))}function Zi(e){return e===43||e===45||e===46||e===95||Ue(e)}function Ra(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const LT={tokenize:UT,partial:!0};function RT(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:BT,continuation:{tokenize:FT},exit:HT}},text:{91:{name:"gfmFootnoteCall",tokenize:MT},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:DT,resolveTo:PT}}}}function DT(e,t,n){const r=this;let i=r.events.length;const a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let s;for(;i--;){const u=r.events[i][1];if(u.type==="labelImage"){s=u;break}if(u.type==="gfmFootnoteCall"||u.type==="labelLink"||u.type==="label"||u.type==="image"||u.type==="link")break}return o;function o(u){if(!s||!s._balanced)return n(u);const c=dt(r.sliceSerialize({start:s.end,end:r.now()}));return c.codePointAt(0)!==94||!a.includes(c.slice(1))?n(u):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(u),e.exit("gfmFootnoteCallLabelMarker"),t(u))}}function PT(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;const a={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},s={type:"chunkString",contentType:"string",start:Object.assign({},a.start),end:Object.assign({},a.end)},o=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",i,t],["exit",i,t],["enter",a,t],["enter",s,t],["exit",s,t],["exit",a,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...o),e}function MT(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a=0,s;return o;function o(f){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(f),e.exit("gfmFootnoteCallLabelMarker"),u}function u(f){return f!==94?n(f):(e.enter("gfmFootnoteCallMarker"),e.consume(f),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",c)}function c(f){if(a>999||f===93&&!s||f===null||f===91||Ae(f))return n(f);if(f===93){e.exit("chunkString");const m=e.exit("gfmFootnoteCallString");return i.includes(dt(r.sliceSerialize(m)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(f),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(f)}return Ae(f)||(s=!0),a++,e.consume(f),f===92?d:c}function d(f){return f===91||f===92||f===93?(e.consume(f),a++,c):c(f)}}function BT(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a,s=0,o;return u;function u(b){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(b),e.exit("gfmFootnoteDefinitionLabelMarker"),c}function c(b){return b===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(b),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",d):n(b)}function d(b){if(s>999||b===93&&!o||b===null||b===91||Ae(b))return n(b);if(b===93){e.exit("chunkString");const A=e.exit("gfmFootnoteDefinitionLabelString");return a=dt(r.sliceSerialize(A)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(b),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),m}return Ae(b)||(o=!0),s++,e.consume(b),b===92?f:d}function f(b){return b===91||b===92||b===93?(e.consume(b),s++,d):d(b)}function m(b){return b===58?(e.enter("definitionMarker"),e.consume(b),e.exit("definitionMarker"),i.includes(a)||i.push(a),be(e,h,"gfmFootnoteDefinitionWhitespace")):n(b)}function h(b){return t(b)}}function FT(e,t,n){return e.check(qn,t,e.attempt(LT,t,n))}function HT(e){e.exit("gfmFootnoteDefinition")}function UT(e,t,n){const r=this;return be(e,i,"gfmFootnoteDefinitionIndent",5);function i(a){const s=r.events[r.events.length-1];return s&&s[1].type==="gfmFootnoteDefinitionIndent"&&s[2].sliceSerialize(s[1],!0).length===4?t(a):n(a)}}function jT(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:a,resolveAll:i};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function i(s,o){let u=-1;for(;++u<s.length;)if(s[u][0]==="enter"&&s[u][1].type==="strikethroughSequenceTemporary"&&s[u][1]._close){let c=u;for(;c--;)if(s[c][0]==="exit"&&s[c][1].type==="strikethroughSequenceTemporary"&&s[c][1]._open&&s[u][1].end.offset-s[u][1].start.offset===s[c][1].end.offset-s[c][1].start.offset){s[u][1].type="strikethroughSequence",s[c][1].type="strikethroughSequence";const d={type:"strikethrough",start:Object.assign({},s[c][1].start),end:Object.assign({},s[u][1].end)},f={type:"strikethroughText",start:Object.assign({},s[c][1].end),end:Object.assign({},s[u][1].start)},m=[["enter",d,o],["enter",s[c][1],o],["exit",s[c][1],o],["enter",f,o]],h=o.parser.constructs.insideSpan.null;h&&Je(m,m.length,0,Pr(h,s.slice(c+1,u),o)),Je(m,m.length,0,[["exit",f,o],["enter",s[u][1],o],["exit",s[u][1],o],["exit",d,o]]),Je(s,c-1,u-c+3,m),u=c+m.length-2;break}}for(u=-1;++u<s.length;)s[u][1].type==="strikethroughSequenceTemporary"&&(s[u][1].type="data");return s}function a(s,o,u){const c=this.previous,d=this.events;let f=0;return m;function m(b){return c===126&&d[d.length-1][1].type!=="characterEscape"?u(b):(s.enter("strikethroughSequenceTemporary"),h(b))}function h(b){const A=gr(c);if(b===126)return f>1?u(b):(s.consume(b),f++,h);if(f<2&&!n)return u(b);const w=s.exit("strikethroughSequenceTemporary"),y=gr(b);return w._open=!y||y===2&&!!A,w._close=!A||A===2&&!!y,o(b)}}}class zT{constructor(){this.map=[]}add(t,n,r){$T(this,t,n,r)}consume(t){if(this.map.sort(function(a,s){return a[0]-s[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push(t.slice()),t.length=0;let i=r.pop();for(;i;){for(const a of i)t.push(a);i=r.pop()}this.map.length=0}}function $T(e,t,n,r){let i=0;if(!(n===0&&r.length===0)){for(;i<e.map.length;){if(e.map[i][0]===t){e.map[i][1]+=n,e.map[i][2].push(...r);return}i+=1}e.map.push([t,n,r])}}function YT(e,t){let n=!1;const r=[];for(;t<e.length;){const i=e[t];if(n){if(i[0]==="enter")i[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(i[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const a=r.length-1;r[a]=r[a]==="left"?"center":"right"}}else if(i[1].type==="tableDelimiterRow")break}else i[0]==="enter"&&i[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function GT(){return{flow:{null:{name:"table",tokenize:VT,resolveAll:qT}}}}function VT(e,t,n){const r=this;let i=0,a=0,s;return o;function o(k){let M=r.events.length-1;for(;M>-1;){const z=r.events[M][1].type;if(z==="lineEnding"||z==="linePrefix")M--;else break}const $=M>-1?r.events[M][1].type:null,U=$==="tableHead"||$==="tableRow"?N:u;return U===N&&r.parser.lazy[r.now().line]?n(k):U(k)}function u(k){return e.enter("tableHead"),e.enter("tableRow"),c(k)}function c(k){return k===124||(s=!0,a+=1),d(k)}function d(k){return k===null?n(k):te(k)?a>1?(a=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(k),e.exit("lineEnding"),h):n(k):de(k)?be(e,d,"whitespace")(k):(a+=1,s&&(s=!1,i+=1),k===124?(e.enter("tableCellDivider"),e.consume(k),e.exit("tableCellDivider"),s=!0,d):(e.enter("data"),f(k)))}function f(k){return k===null||k===124||Ae(k)?(e.exit("data"),d(k)):(e.consume(k),k===92?m:f)}function m(k){return k===92||k===124?(e.consume(k),f):f(k)}function h(k){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(k):(e.enter("tableDelimiterRow"),s=!1,de(k)?be(e,b,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(k):b(k))}function b(k){return k===45||k===58?w(k):k===124?(s=!0,e.enter("tableCellDivider"),e.consume(k),e.exit("tableCellDivider"),A):I(k)}function A(k){return de(k)?be(e,w,"whitespace")(k):w(k)}function w(k){return k===58?(a+=1,s=!0,e.enter("tableDelimiterMarker"),e.consume(k),e.exit("tableDelimiterMarker"),y):k===45?(a+=1,y(k)):k===null||te(k)?D(k):I(k)}function y(k){return k===45?(e.enter("tableDelimiterFiller"),_(k)):I(k)}function _(k){return k===45?(e.consume(k),_):k===58?(s=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(k),e.exit("tableDelimiterMarker"),S):(e.exit("tableDelimiterFiller"),S(k))}function S(k){return de(k)?be(e,D,"whitespace")(k):D(k)}function D(k){return k===124?b(k):k===null||te(k)?!s||i!==a?I(k):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(k)):I(k)}function I(k){return n(k)}function N(k){return e.enter("tableRow"),G(k)}function G(k){return k===124?(e.enter("tableCellDivider"),e.consume(k),e.exit("tableCellDivider"),G):k===null||te(k)?(e.exit("tableRow"),t(k)):de(k)?be(e,G,"whitespace")(k):(e.enter("data"),se(k))}function se(k){return k===null||k===124||Ae(k)?(e.exit("data"),G(k)):(e.consume(k),k===92?ee:se)}function ee(k){return k===92||k===124?(e.consume(k),se):se(k)}}function qT(e,t){let n=-1,r=!0,i=0,a=[0,0,0,0],s=[0,0,0,0],o=!1,u=0,c,d,f;const m=new zT;for(;++n<e.length;){const h=e[n],b=h[1];h[0]==="enter"?b.type==="tableHead"?(o=!1,u!==0&&(mo(m,t,u,c,d),d=void 0,u=0),c={type:"table",start:Object.assign({},b.start),end:Object.assign({},b.end)},m.add(n,0,[["enter",c,t]])):b.type==="tableRow"||b.type==="tableDelimiterRow"?(r=!0,f=void 0,a=[0,0,0,0],s=[0,n+1,0,0],o&&(o=!1,d={type:"tableBody",start:Object.assign({},b.start),end:Object.assign({},b.end)},m.add(n,0,[["enter",d,t]])),i=b.type==="tableDelimiterRow"?2:d?3:1):i&&(b.type==="data"||b.type==="tableDelimiterMarker"||b.type==="tableDelimiterFiller")?(r=!1,s[2]===0&&(a[1]!==0&&(s[0]=s[1],f=or(m,t,a,i,void 0,f),a=[0,0,0,0]),s[2]=n)):b.type==="tableCellDivider"&&(r?r=!1:(a[1]!==0&&(s[0]=s[1],f=or(m,t,a,i,void 0,f)),a=s,s=[a[1],n,0,0])):b.type==="tableHead"?(o=!0,u=n):b.type==="tableRow"||b.type==="tableDelimiterRow"?(u=n,a[1]!==0?(s[0]=s[1],f=or(m,t,a,i,n,f)):s[1]!==0&&(f=or(m,t,s,i,n,f)),i=0):i&&(b.type==="data"||b.type==="tableDelimiterMarker"||b.type==="tableDelimiterFiller")&&(s[3]=n)}for(u!==0&&mo(m,t,u,c,d),m.consume(t.events),n=-1;++n<t.events.length;){const h=t.events[n];h[0]==="enter"&&h[1].type==="table"&&(h[1]._align=YT(t.events,n))}return e}function or(e,t,n,r,i,a){const s=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",o="tableContent";n[0]!==0&&(a.end=Object.assign({},un(t.events,n[0])),e.add(n[0],0,[["exit",a,t]]));const u=un(t.events,n[1]);if(a={type:s,start:Object.assign({},u),end:Object.assign({},u)},e.add(n[1],0,[["enter",a,t]]),n[2]!==0){const c=un(t.events,n[2]),d=un(t.events,n[3]),f={type:o,start:Object.assign({},c),end:Object.assign({},d)};if(e.add(n[2],0,[["enter",f,t]]),r!==2){const m=t.events[n[2]],h=t.events[n[3]];if(m[1].end=Object.assign({},h[1].end),m[1].type="chunkText",m[1].contentType="text",n[3]>n[2]+1){const b=n[2]+1,A=n[3]-n[2]-1;e.add(b,A,[])}}e.add(n[3]+1,0,[["exit",f,t]])}return i!==void 0&&(a.end=Object.assign({},un(t.events,i)),e.add(i,0,[["exit",a,t]]),a=void 0),a}function mo(e,t,n,r,i){const a=[],s=un(t.events,n);i&&(i.end=Object.assign({},s),a.push(["exit",i,t])),r.end=Object.assign({},s),a.push(["exit",r,t]),e.add(n+1,0,a)}function un(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const WT={name:"tasklistCheck",tokenize:QT};function XT(){return{text:{91:WT}}}function QT(e,t,n){const r=this;return i;function i(u){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(u):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(u),e.exit("taskListCheckMarker"),a)}function a(u){return Ae(u)?(e.enter("taskListCheckValueUnchecked"),e.consume(u),e.exit("taskListCheckValueUnchecked"),s):u===88||u===120?(e.enter("taskListCheckValueChecked"),e.consume(u),e.exit("taskListCheckValueChecked"),s):n(u)}function s(u){return u===93?(e.enter("taskListCheckMarker"),e.consume(u),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),o):n(u)}function o(u){return te(u)?t(u):de(u)?e.check({tokenize:KT},t,n)(u):n(u)}}function KT(e,t,n){return be(e,r,"whitespace");function r(i){return i===null?n(i):t(i)}}function JT(e){return Du([_T(),RT(),jT(e),GT(),XT()])}const ZT={};function e2(e){const t=this,n=e||ZT,r=t.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),a=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),s=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(JT(n)),a.push(TT()),s.push(xT(n))}const po=new Set;function t2(e){return po.has(e)?!1:(po.add(e),!0)}function n2(e,{root:t,rootSelector:n,rootMargin:r="0px",threshold:i=0,dedupeKey:a}={}){const s=v.useRef(!1),o=v.useRef();return v.useCallback(c=>{if(o.current?.(),o.current=void 0,!c||s.current)return;const d=t??(n?document.querySelector(n):null),f=()=>{a&&!t2(a)||(s.current=!0,e())};if(typeof window>"u"||!("IntersectionObserver"in window)){f();return}const m=new IntersectionObserver((h,b)=>{h[0]?.isIntersecting&&(b.disconnect(),f())},{root:d,rootMargin:r,threshold:i});m.observe(c),o.current=()=>m.disconnect()},[t,n,r,i,a,e])}class zn{constructor(){}static getApiUrl=()=>oa()?"http://localhost:3001":"https://www.api.chatsystem.ai";static getHeaders=({contentType:t="text/plain"})=>({"Content-Type":t});static getFetchConfig=({contentType:t="text/plain",httpVerb:n="GET",body:r,options:i={}})=>{const a={method:n,headers:this.getHeaders({contentType:t}),...i};return r&&(a.body=JSON.stringify(r)),a}}function r2(e,t){if(!t||!e)return e;const n=t.replace(/^[?&]+/,""),[r,i]=e.split("#"),a=r.includes("?")?"&":"?",s=`${r}${a}${n}`;return i?`${s}#${i}`:s}function i2({href:e="",queryParamToAppend:t="",children:n,context:r,onClick:i,seenRootEl:a,...s}){const{companySettings:o}=v.useContext(Pt),u=e.startsWith("/")||typeof window<"u"&&e.startsWith(window.location.origin),c=zn.getApiUrl(),d=r2(e,o.api.tracking?.queryParamToAppend),f=()=>{const y=`${c}/tracking/clicked/${r.appToken}`,_={discussionId:r.discussionId,urlClicked:e};try{fetch(y,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify(_),keepalive:!0,cache:"no-store",credentials:"omit",mode:"cors"}).catch(()=>{})}catch{}},m=()=>{const y=`${c}/tracking/displayed/${r.appToken}`,_={discussionId:r.discussionId,urlSeen:e};try{fetch(y,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify(_),keepalive:!0,cache:"no-store",credentials:"omit",mode:"cors"}).catch(()=>{})}catch{}},h=v.useMemo(()=>`${r.appToken}::${r.discussionId}::${e}`,[r.appToken,r.discussionId,e]),b=n2(m,{root:a,threshold:0,rootMargin:"0px 0px -10% 0px",dedupeKey:h}),A=y=>{f(),i?.(y)},w=u?{}:{target:"_blank",rel:"noopener noreferrer"};return u?C.jsx("a",{ref:b,href:d,...s,onClick:A,className:"customLinkInternal",children:n}):C.jsx("a",{ref:b,href:d,...w,...s,onClick:A,className:"customLinkExternal",children:n})}const a2=({content:e,metaData:t,context:n,seenRootEl:r})=>C.jsx(zl,{children:C.jsx("div",{className:"chatLineAssistant flex justify-start",children:C.jsx("div",{className:`mr-auto w-full rounded-2xl rounded-bl-md px-4 py-3 transition-all duration-300 text-left ${t?.isErrorMessage?"bg-red-100 text-red-800 shadow-md animate-fade-in":"bg-slate-100 text-gray-800 shadow-sm"}`,children:C.jsx("div",{children:C.jsx(tl,{remarkPlugins:[e2],remarkRehypeOptions:{passThrough:["link"]},rehypePlugins:[jl],components:{a:({node:i,href:a,children:s,...o})=>C.jsx(i2,{href:a??"",...o,context:n,seenRootEl:r,children:s})},children:e&&e})})})})}),s2=({userType:e,content:t,metaData:n,context:r,seenRootEl:i})=>{const a=e==="user",s=e==="assistant";return C.jsxs(C.Fragment,{children:[a&&C.jsx(Gb,{content:t,metaData:n}),s&&C.jsx(a2,{content:t,metaData:n,context:r,seenRootEl:i})]})};function o2(e,t,n){let[r,i]=v.useState(e||t),a=v.useRef(e!==void 0),s=e!==void 0;v.useEffect(()=>{let c=a.current;c!==s&&console.warn(`WARN: A component changed from ${c?"controlled":"uncontrolled"} to ${s?"controlled":"uncontrolled"}.`),a.current=s},[s]);let o=s?e:r,u=v.useCallback((c,...d)=>{let f=(m,...h)=>{n&&(Object.is(o,m)||n(m,...h)),s||(o=m)};typeof c=="function"?(console.warn("We can not support a function callback. See Github Issues for details https://github.com/adobe/react-spectrum/issues/2320"),i((h,...b)=>{let A=c(s?o:h,...b);return f(A,...d),s?h:A})):(s||i(c),f(c,...d))},[s,o,n]);return[o,u]}const Ar={prefix:String(Math.round(Math.random()*1e10)),current:0},fc=v.createContext(Ar),u2=v.createContext(!1);let l2=!!(typeof window<"u"&&window.document&&window.document.createElement),Ti=new WeakMap;function c2(e=!1){let t=v.useContext(fc),n=v.useRef(null);if(n.current===null&&!e){var r,i;let a=(i=v.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED)===null||i===void 0||(r=i.ReactCurrentOwner)===null||r===void 0?void 0:r.current;if(a){let s=Ti.get(a);s==null?Ti.set(a,{id:t.current,state:a.memoizedState}):a.memoizedState!==s.state&&(t.current=s.id,Ti.delete(a))}n.current=++t.current}return n.current}function d2(e){let t=v.useContext(fc);t===Ar&&!l2&&console.warn("When server rendering, you must wrap your application in an <SSRProvider> to ensure consistent ids are generated between the client and server.");let n=c2(!!e),r=t===Ar&&process.env.NODE_ENV==="test"?"react-aria":`react-aria${t.prefix}`;return e||`${r}-${n}`}function f2(e){let t=v.useId(),[n]=v.useState(b2()),r=n||process.env.NODE_ENV==="test"?"react-aria":`react-aria${Ar.prefix}`;return e||`${r}-${t}`}const h2=typeof v.useId=="function"?f2:d2;function m2(){return!1}function p2(){return!0}function g2(e){return()=>{}}function b2(){return typeof v.useSyncExternalStore=="function"?v.useSyncExternalStore(g2,m2,p2):v.useContext(u2)}function hc(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=hc(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function E2(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=hc(e))&&(r&&(r+=" "),r+=t);return r}const tn=typeof document<"u"?v.useLayoutEffect:()=>{};function Vt(e){const t=v.useRef(null);return tn(()=>{t.current=e},[e]),v.useCallback((...n)=>{const r=t.current;return r?.(...n)},[])}function T2(e){let[t,n]=v.useState(e),r=v.useRef(null),i=Vt(()=>{if(!r.current)return;let s=r.current.next();if(s.done){r.current=null;return}t===s.value?i():n(s.value)});tn(()=>{r.current&&i()});let a=Vt(s=>{r.current=s(t),i()});return[t,a]}let x2=!!(typeof window<"u"&&window.document&&window.document.createElement),_r=new Map;function Cr(e){let[t,n]=v.useState(e),r=v.useRef(null),i=h2(t),a=v.useCallback(s=>{r.current=s},[]);return x2&&_r.set(i,a),tn(()=>{let s=i;return()=>{_r.delete(s)}},[i]),v.useEffect(()=>{let s=r.current;s&&(r.current=null,n(s))}),i}function y2(e,t){if(e===t)return e;let n=_r.get(e);if(n)return n(t),t;let r=_r.get(t);return r?(r(e),e):t}function go(e=[]){let t=Cr(),[n,r]=T2(t),i=v.useCallback(()=>{r(function*(){yield t,yield document.getElementById(t)?t:void 0})},[t,r]);return tn(i,[t,i,...e]),n}function A2(...e){return(...t)=>{for(let n of e)typeof n=="function"&&n(...t)}}const Kn=e=>{var t;return(t=e?.ownerDocument)!==null&&t!==void 0?t:document},Sr=e=>e&&"window"in e&&e.window===e?e:Kn(e).defaultView||window;function wr(...e){let t={...e[0]};for(let n=1;n<e.length;n++){let r=e[n];for(let i in r){let a=t[i],s=r[i];typeof a=="function"&&typeof s=="function"&&i[0]==="o"&&i[1]==="n"&&i.charCodeAt(2)>=65&&i.charCodeAt(2)<=90?t[i]=A2(a,s):(i==="className"||i==="UNSAFE_className")&&typeof a=="string"&&typeof s=="string"?t[i]=E2(a,s):i==="id"&&a&&s?t.id=y2(a,s):t[i]=s!==void 0?s:a}}return t}const _2=new Set(["id"]),C2=new Set(["aria-label","aria-labelledby","aria-describedby","aria-details"]),S2=new Set(["href","target","rel","download","ping","referrerPolicy"]),w2=/^(data-.*)$/;function v2(e,t={}){let{labelable:n,isLink:r,propNames:i}=t,a={};for(const s in e)Object.prototype.hasOwnProperty.call(e,s)&&(_2.has(s)||n&&C2.has(s)||r&&S2.has(s)||i?.has(s)||w2.test(s))&&(a[s]=e[s]);return a}function bo(e){if(I2())e.focus({preventScroll:!0});else{let t=N2(e);e.focus(),k2(t)}}let ur=null;function I2(){if(ur==null){ur=!1;try{document.createElement("div").focus({get preventScroll(){return ur=!0,!0}})}catch{}}return ur}function N2(e){let t=e.parentNode,n=[],r=document.scrollingElement||document.documentElement;for(;t instanceof HTMLElement&&t!==r;)(t.offsetHeight<t.scrollHeight||t.offsetWidth<t.scrollWidth)&&n.push({element:t,scrollTop:t.scrollTop,scrollLeft:t.scrollLeft}),t=t.parentNode;return r instanceof HTMLElement&&n.push({element:r,scrollTop:r.scrollTop,scrollLeft:r.scrollLeft}),n}function k2(e){for(let{element:t,scrollTop:n,scrollLeft:r}of e)t.scrollTop=n,t.scrollLeft=r}function O2(e){var t;return typeof window>"u"||window.navigator==null?!1:((t=window.navigator.userAgentData)===null||t===void 0?void 0:t.brands.some(n=>e.test(n.brand)))||e.test(window.navigator.userAgent)}function L2(e){var t;return typeof window<"u"&&window.navigator!=null?e.test(((t=window.navigator.userAgentData)===null||t===void 0?void 0:t.platform)||window.navigator.platform):!1}function R2(){return L2(/^Mac/i)}function D2(){return O2(/Android/i)}let ln=new Map,ea=new Set;function Eo(){if(typeof window>"u")return;function e(r){return"propertyName"in r}let t=r=>{if(!e(r)||!r.target)return;let i=ln.get(r.target);i||(i=new Set,ln.set(r.target,i),r.target.addEventListener("transitioncancel",n,{once:!0})),i.add(r.propertyName)},n=r=>{if(!e(r)||!r.target)return;let i=ln.get(r.target);if(i&&(i.delete(r.propertyName),i.size===0&&(r.target.removeEventListener("transitioncancel",n),ln.delete(r.target)),ln.size===0)){for(let a of ea)a();ea.clear()}};document.body.addEventListener("transitionrun",t),document.body.addEventListener("transitionend",n)}typeof document<"u"&&(document.readyState!=="loading"?Eo():document.addEventListener("DOMContentLoaded",Eo));function P2(e){requestAnimationFrame(()=>{ln.size===0?e():ea.add(e)})}function M2(e,t){let{id:n,"aria-label":r,"aria-labelledby":i}=e;return n=Cr(n),i&&r?i=[...new Set([n,...i.trim().split(/\s+/)])].join(" "):i&&(i=i.trim().split(/\s+/).join(" ")),!r&&!i&&t&&(r=t),{id:n,"aria-label":r,"aria-labelledby":i}}function B2(e,t){tn(()=>{if(e&&e.ref&&t)return e.ref.current=t.current,()=>{e.ref&&(e.ref.current=null)}})}function F2(e){return e.mozInputSource===0&&e.isTrusted?!0:D2()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function H2(e,t,n){let r=v.useRef(t),i=Vt(()=>{n&&n(r.current)});v.useEffect(()=>{var a;let s=e==null||(a=e.current)===null||a===void 0?void 0:a.form;return s?.addEventListener("reset",i),()=>{s?.removeEventListener("reset",i)}},[e,i])}const U2=v.createContext({register:()=>{}});U2.displayName="PressResponderContext";class j2{isDefaultPrevented(){return this.nativeEvent.defaultPrevented}preventDefault(){this.defaultPrevented=!0,this.nativeEvent.preventDefault()}stopPropagation(){this.nativeEvent.stopPropagation(),this.isPropagationStopped=()=>!0}isPropagationStopped(){return!1}persist(){}constructor(t,n){this.nativeEvent=n,this.target=n.target,this.currentTarget=n.currentTarget,this.relatedTarget=n.relatedTarget,this.bubbles=n.bubbles,this.cancelable=n.cancelable,this.defaultPrevented=n.defaultPrevented,this.eventPhase=n.eventPhase,this.isTrusted=n.isTrusted,this.timeStamp=n.timeStamp,this.type=t}}function z2(e){let t=v.useRef({isFocused:!1,observer:null});tn(()=>{const r=t.current;return()=>{r.observer&&(r.observer.disconnect(),r.observer=null)}},[]);let n=Vt(r=>{e?.(r)});return v.useCallback(r=>{if(r.target instanceof HTMLButtonElement||r.target instanceof HTMLInputElement||r.target instanceof HTMLTextAreaElement||r.target instanceof HTMLSelectElement){t.current.isFocused=!0;let i=r.target,a=s=>{t.current.isFocused=!1,i.disabled&&n(new j2("blur",s)),t.current.observer&&(t.current.observer.disconnect(),t.current.observer=null)};i.addEventListener("focusout",a,{once:!0}),t.current.observer=new MutationObserver(()=>{if(t.current.isFocused&&i.disabled){var s;(s=t.current.observer)===null||s===void 0||s.disconnect();let o=i===document.activeElement?null:document.activeElement;i.dispatchEvent(new FocusEvent("blur",{relatedTarget:o})),i.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:o}))}}),t.current.observer.observe(i,{attributes:!0,attributeFilter:["disabled"]})}},[n])}function $2(e){let{isDisabled:t,onFocus:n,onBlur:r,onFocusChange:i}=e;const a=v.useCallback(u=>{if(u.target===u.currentTarget)return r&&r(u),i&&i(!1),!0},[r,i]),s=z2(a),o=v.useCallback(u=>{u.target===u.currentTarget&&document.activeElement===u.target&&(n&&n(u),i&&i(!0),s(u))},[i,n,s]);return{focusProps:{onFocus:!t&&(n||i||r)?o:void 0,onBlur:!t&&(r||i)?a:void 0}}}let _n=null,Y2=new Set,Fn=new Map,Xt=!1,ta=!1;function Yr(e,t){for(let n of Y2)n(e,t)}function G2(e){return!(e.metaKey||!R2()&&e.altKey||e.ctrlKey||e.key==="Control"||e.key==="Shift"||e.key==="Meta")}function vr(e){Xt=!0,G2(e)&&(_n="keyboard",Yr("keyboard",e))}function it(e){_n="pointer",(e.type==="mousedown"||e.type==="pointerdown")&&(Xt=!0,Yr("pointer",e))}function mc(e){F2(e)&&(Xt=!0,_n="virtual")}function pc(e){e.target===window||e.target===document||(!Xt&&!ta&&(_n="virtual",Yr("virtual",e)),Xt=!1,ta=!1)}function gc(){Xt=!1,ta=!0}function To(e){if(typeof window>"u"||Fn.get(Sr(e)))return;const t=Sr(e),n=Kn(e);let r=t.HTMLElement.prototype.focus;t.HTMLElement.prototype.focus=function(){Xt=!0,r.apply(this,arguments)},n.addEventListener("keydown",vr,!0),n.addEventListener("keyup",vr,!0),n.addEventListener("click",mc,!0),t.addEventListener("focus",pc,!0),t.addEventListener("blur",gc,!1),typeof PointerEvent<"u"?(n.addEventListener("pointerdown",it,!0),n.addEventListener("pointermove",it,!0),n.addEventListener("pointerup",it,!0)):(n.addEventListener("mousedown",it,!0),n.addEventListener("mousemove",it,!0),n.addEventListener("mouseup",it,!0)),t.addEventListener("beforeunload",()=>{bc(e)},{once:!0}),Fn.set(t,{focus:r})}const bc=(e,t)=>{const n=Sr(e),r=Kn(e);t&&r.removeEventListener("DOMContentLoaded",t),Fn.has(n)&&(n.HTMLElement.prototype.focus=Fn.get(n).focus,r.removeEventListener("keydown",vr,!0),r.removeEventListener("keyup",vr,!0),r.removeEventListener("click",mc,!0),n.removeEventListener("focus",pc,!0),n.removeEventListener("blur",gc,!1),typeof PointerEvent<"u"?(r.removeEventListener("pointerdown",it,!0),r.removeEventListener("pointermove",it,!0),r.removeEventListener("pointerup",it,!0)):(r.removeEventListener("mousedown",it,!0),r.removeEventListener("mousemove",it,!0),r.removeEventListener("mouseup",it,!0)),Fn.delete(n))};function V2(e){const t=Kn(e);let n;return t.readyState!=="loading"?To(e):(n=()=>{To(e)},t.addEventListener("DOMContentLoaded",n)),()=>bc(e,n)}typeof document<"u"&&V2();function q2(){return _n}function W2(e){_n=e,Yr(e,null)}function xo(e){if(!e)return;let t=!0;return n=>{let r={...n,preventDefault(){n.preventDefault()},isDefaultPrevented(){return n.isDefaultPrevented()},stopPropagation(){console.error("stopPropagation is now the default behavior for events in React Spectrum. You can use continuePropagation() to revert this behavior.")},continuePropagation(){t=!1}};e(r),t&&n.stopPropagation()}}function X2(e){return{keyboardProps:e.isDisabled?{}:{onKeyDown:xo(e.onKeyDown),onKeyUp:xo(e.onKeyUp)}}}function Q2(e){const t=Kn(e);if(q2()==="virtual"){let n=t.activeElement;P2(()=>{t.activeElement===n&&e.isConnected&&bo(e)})}else bo(e)}function K2(e,t){return!e||!t?!1:t.some(n=>n.contains(e))}class Da{get size(){return this.fastMap.size}getTreeNode(t){return this.fastMap.get(t)}addTreeNode(t,n,r){let i=this.fastMap.get(n??null);if(!i)return;let a=new yo({scopeRef:t});i.addChild(a),a.parent=i,this.fastMap.set(t,a),r&&(a.nodeToRestore=r)}addNode(t){this.fastMap.set(t.scopeRef,t)}removeTreeNode(t){if(t===null)return;let n=this.fastMap.get(t);if(!n)return;let r=n.parent;for(let a of this.traverse())a!==n&&n.nodeToRestore&&a.nodeToRestore&&n.scopeRef&&n.scopeRef.current&&K2(a.nodeToRestore,n.scopeRef.current)&&(a.nodeToRestore=n.nodeToRestore);let i=n.children;r&&(r.removeChild(n),i.size>0&&i.forEach(a=>r&&r.addChild(a))),this.fastMap.delete(n.scopeRef)}*traverse(t=this.root){if(t.scopeRef!=null&&(yield t),t.children.size>0)for(let n of t.children)yield*this.traverse(n)}clone(){var t;let n=new Da;var r;for(let i of this.traverse())n.addTreeNode(i.scopeRef,(r=(t=i.parent)===null||t===void 0?void 0:t.scopeRef)!==null&&r!==void 0?r:null,i.nodeToRestore);return n}constructor(){this.fastMap=new Map,this.root=new yo({scopeRef:null}),this.fastMap.set(null,this.root)}}class yo{addChild(t){this.children.add(t),t.parent=this}removeChild(t){this.children.delete(t),t.parent=void 0}constructor(t){this.children=new Set,this.contain=!1,this.scopeRef=t.scopeRef}}new Da;let J2=v.createContext(null);function Z2(e){let t=v.useContext(J2)||{};B2(t,e);let{ref:n,...r}=t;return r}function ex(e,t){let{focusProps:n}=$2(e),{keyboardProps:r}=X2(e),i=wr(n,r),a=Z2(t),s=e.isDisabled?{}:a,o=v.useRef(e.autoFocus);return v.useEffect(()=>{o.current&&t.current&&Q2(t.current),o.current=!1},[t]),{focusableProps:wr({...i,tabIndex:e.excludeFromTabOrder&&!e.isDisabled?-1:void 0},s)}}function tx(e,t,n){let{validationBehavior:r,focus:i}=e;tn(()=>{if(r==="native"&&n?.current){let u=t.realtimeValidation.isInvalid?t.realtimeValidation.validationErrors.join(" ")||"Invalid value.":"";n.current.setCustomValidity(u),n.current.hasAttribute("title")||(n.current.title=""),t.realtimeValidation.isInvalid||t.updateValidation(rx(n.current))}});let a=Vt(()=>{t.resetValidation()}),s=Vt(u=>{var c;t.displayValidation.isInvalid||t.commitValidation();let d=n==null||(c=n.current)===null||c===void 0?void 0:c.form;if(!u.defaultPrevented&&n&&d&&ix(d)===n.current){var f;i?i():(f=n.current)===null||f===void 0||f.focus(),W2("keyboard")}u.preventDefault()}),o=Vt(()=>{t.commitValidation()});v.useEffect(()=>{let u=n?.current;if(!u)return;let c=u.form;return u.addEventListener("invalid",s),u.addEventListener("change",o),c?.addEventListener("reset",a),()=>{u.removeEventListener("invalid",s),u.removeEventListener("change",o),c?.removeEventListener("reset",a)}},[n,s,o,a,r])}function nx(e){let t=e.validity;return{badInput:t.badInput,customError:t.customError,patternMismatch:t.patternMismatch,rangeOverflow:t.rangeOverflow,rangeUnderflow:t.rangeUnderflow,stepMismatch:t.stepMismatch,tooLong:t.tooLong,tooShort:t.tooShort,typeMismatch:t.typeMismatch,valueMissing:t.valueMissing,valid:t.valid}}function rx(e){return{isInvalid:!e.validity.valid,validationDetails:nx(e),validationErrors:e.validationMessage?[e.validationMessage]:[]}}function ix(e){for(let t=0;t<e.elements.length;t++){let n=e.elements[t];if(!n.validity.valid)return n}return null}const Ec={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valueMissing:!1,valid:!0},Tc={...Ec,customError:!0,valid:!1},vn={isInvalid:!1,validationDetails:Ec,validationErrors:[]},ax=v.createContext({}),Ao="__formValidationState"+Date.now();function sx(e){if(e[Ao]){let{realtimeValidation:t,displayValidation:n,updateValidation:r,resetValidation:i,commitValidation:a}=e[Ao];return{realtimeValidation:t,displayValidation:n,updateValidation:r,resetValidation:i,commitValidation:a}}return ox(e)}function ox(e){let{isInvalid:t,validationState:n,name:r,value:i,builtinValidation:a,validate:s,validationBehavior:o="aria"}=e;n&&(t||(t=n==="invalid"));let u=t?{isInvalid:!0,validationErrors:[],validationDetails:Tc}:null,c=v.useMemo(()=>_o(ux(s,i)),[s,i]);a?.validationDetails.valid&&(a=null);let d=v.useContext(ax),f=v.useMemo(()=>r?Array.isArray(r)?r.flatMap(k=>na(d[k])):na(d[r]):[],[d,r]),[m,h]=v.useState(d),[b,A]=v.useState(!1);d!==m&&(h(d),A(!1));let w=v.useMemo(()=>_o(b?[]:f),[b,f]),y=v.useRef(vn),[_,S]=v.useState(vn),D=v.useRef(vn),I=()=>{if(!N)return;G(!1);let k=c||a||y.current;xi(k,D.current)||(D.current=k,S(k))},[N,G]=v.useState(!1);return v.useEffect(I),{realtimeValidation:u||w||c||a||vn,displayValidation:o==="native"?u||w||_:u||w||c||a||_,updateValidation(k){o==="aria"&&!xi(_,k)?S(k):y.current=k},resetValidation(){let k=vn;xi(k,D.current)||(D.current=k,S(k)),o==="native"&&G(!1),A(!0)},commitValidation(){o==="native"&&G(!0),A(!0)}}}function na(e){return e?Array.isArray(e)?e:[e]:[]}function ux(e,t){if(typeof e=="function"){let n=e(t);if(n&&typeof n!="boolean")return na(n)}return[]}function _o(e){return e.length?{isInvalid:!0,validationErrors:e,validationDetails:Tc}:null}function xi(e,t){return e===t?!0:e&&t&&e.isInvalid===t.isInvalid&&e.validationErrors.length===t.validationErrors.length&&e.validationErrors.every((n,r)=>n===t.validationErrors[r])&&Object.entries(e.validationDetails).every(([n,r])=>t.validationDetails[n]===r)}function lx(e){let{id:t,label:n,"aria-labelledby":r,"aria-label":i,labelElementType:a="label"}=e;t=Cr(t);let s=Cr(),o={};n?(r=r?`${s} ${r}`:s,o={id:s,htmlFor:a==="label"?t:void 0}):!r&&!i&&console.warn("If you do not provide a visible label, you must specify an aria-label or aria-labelledby attribute for accessibility");let u=M2({id:t,"aria-label":i,"aria-labelledby":r});return{labelProps:o,fieldProps:u}}function cx(e){let{description:t,errorMessage:n,isInvalid:r,validationState:i}=e,{labelProps:a,fieldProps:s}=lx(e),o=go([!!t,!!n,r,i]),u=go([!!t,!!n,r,i]);return s=wr(s,{"aria-describedby":[o,u,e["aria-describedby"]].filter(Boolean).join(" ")||void 0}),{labelProps:a,fieldProps:s,descriptionProps:{id:o},errorMessageProps:{id:u}}}function dx(e,t){let{inputElementType:n="input",isDisabled:r=!1,isRequired:i=!1,isReadOnly:a=!1,type:s="text",validationBehavior:o="aria"}=e,[u,c]=o2(e.value,e.defaultValue||"",e.onChange),{focusableProps:d}=ex(e,t),f=sx({...e,value:u}),{isInvalid:m,validationErrors:h,validationDetails:b}=f.displayValidation,{labelProps:A,fieldProps:w,descriptionProps:y,errorMessageProps:_}=cx({...e,isInvalid:m,errorMessage:e.errorMessage||h}),S=v2(e,{labelable:!0});const D={type:s,pattern:e.pattern};return H2(t,u,c),tx(e,f,t),v.useEffect(()=>{if(t.current instanceof Sr(t.current).HTMLTextAreaElement){let I=t.current;Object.defineProperty(I,"defaultValue",{get:()=>I.value,set:()=>{},configurable:!0})}},[t]),{labelProps:A,inputProps:wr(S,n==="input"&&D,{disabled:r,readOnly:a,required:i&&o==="native","aria-required":i&&o==="aria"||void 0,"aria-invalid":m||void 0,"aria-errormessage":e["aria-errormessage"],"aria-activedescendant":e["aria-activedescendant"],"aria-autocomplete":e["aria-autocomplete"],"aria-haspopup":e["aria-haspopup"],value:u,onChange:I=>c(I.target.value),autoComplete:e.autoComplete,autoCapitalize:e.autoCapitalize,maxLength:e.maxLength,minLength:e.minLength,name:e.name,placeholder:e.placeholder,inputMode:e.inputMode,onCopy:e.onCopy,onCut:e.onCut,onPaste:e.onPaste,onCompositionEnd:e.onCompositionEnd,onCompositionStart:e.onCompositionStart,onCompositionUpdate:e.onCompositionUpdate,onSelect:e.onSelect,onBeforeInput:e.onBeforeInput,onInput:e.onInput,...d,...w}),descriptionProps:y,errorMessageProps:_,isInvalid:m,validationErrors:h,validationDetails:b}}const fx=e=>e.charCodeAt(e.length-1)===10,hx=e=>{const t=Qt(),[n,r]=v.useState(""),i=()=>{w.current&&(w.current.style.height=w.current.scrollHeight+"px")},a=()=>{w.current&&(w.current.style.height="48px")},s=M=>{r(M)};v.useEffect(i,[n]);let{label:o,SubmitComponent:u,onSubmit:c,isLoadingStream:d,audioEnabled:f=!1,MicComponent:m,onPressMicButton:h,LoadingComponent:b,onPressLoadingButton:A}=e,w=v.useRef(null),{labelProps:y,inputProps:_}=dx({...e,inputElementType:"textarea"},w);const S=M=>{fx(M.target.value)||s(M.target.value)},D=M=>{if(M.key==="Enter"||M.code==="Enter"||M.keyCode===13||M.code==="NumpadEnter"){if(M.shiftKey)s(n+`
77
- `);else if(!M.shiftKey){M.preventDefault(),M.stopPropagation(),d||G();return}}},I=M=>{(M.key==="Enter"||M.code==="Enter"||M.keyCode===13||M.code==="NumpadEnter")&&(M.preventDefault(),M.stopPropagation())};let N=e.isDisabled;e.shouldDisableIfInputIsEmpty&&(N=e.isDisabled||n.length===0);const G=()=>{a(),c&&c(n),s("")},se=n.trim().length>0,ee=f&&!!m&&!!u&&!se&&!d;t.log("audio",f);const k=()=>d&&b?C.jsx("div",{className:"relative",children:C.jsx(b,{onPressLoadingButton:A})}):u?!f||!m?C.jsx("div",{className:"relative",children:C.jsx(u,{onSubmitButton:G,isDisabled:N})}):se?C.jsx("div",{className:"relative",children:C.jsx(u,{onSubmitButton:G,isDisabled:N})}):C.jsxs("div",{className:"relative",children:[C.jsx("div",{className:"block md:hidden",children:C.jsx(m,{onPressMicButton:h})}),C.jsxs("div",{className:"hidden md:block",children:[C.jsx(m,{onPressMicButton:h,className:"md:!right-12"}),C.jsx(u,{onSubmitButton:G,isDisabled:N,className:"md:!right-3"})]})]}):null;return C.jsxs("div",{style:{display:"flex",flexDirection:"column"},className:`${e.classNameContainer} w-full`,children:[C.jsxs("div",{style:{display:"flex",flexDirection:"column"},children:[C.jsx("label",{...y,className:e.classNameLabel,children:o}),C.jsx("textarea",{..._,ref:w,className:`${e.classNameTextarea} p-3 ${ee?"pr-12 md:pr-24":"pr-12"}`,onChange:S,value:n,rows:1,style:{overflow:"hidden",outlineColor:"#a8a8a8",border:"none",outline:"none",width:ee?"calc(100% - 72px)":"calc(100% - 30px)",resize:"none"},onKeyDown:D,onKeyUp:I})]}),k()]})},mx=({onSubmitButton:e,isDisabled:t,className:n})=>C.jsx("div",{children:C.jsx("button",{className:`absolute
74
+ `,...a.current()});return/^[\t ]/.test(c)&&(c="&#x"+c.charCodeAt(0).toString(16).toUpperCase()+";"+c.slice(1)),c=c?s+" "+c:s,n.options.closeAtx&&(c+=" "+s),u(),o(),c}Ec.peek=HT;function Ec(e){return e.value||""}function HT(){return"<"}Tc.peek=UT;function Tc(e,t,n,r){const i=Wa(n),a=i==='"'?"Quote":"Apostrophe",s=n.enter("image");let o=n.enter("label");const u=n.createTracker(r);let c=u.move("![");return c+=u.move(n.safe(e.alt,{before:c,after:"]",...u.current()})),c+=u.move("]("),o(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(o=n.enter("destinationLiteral"),c+=u.move("<"),c+=u.move(n.safe(e.url,{before:c,after:">",...u.current()})),c+=u.move(">")):(o=n.enter("destinationRaw"),c+=u.move(n.safe(e.url,{before:c,after:e.title?" ":")",...u.current()}))),o(),e.title&&(o=n.enter(`title${a}`),c+=u.move(" "+i),c+=u.move(n.safe(e.title,{before:c,after:i,...u.current()})),c+=u.move(i),o()),c+=u.move(")"),s(),c}function UT(){return"!"}yc.peek=jT;function yc(e,t,n,r){const i=e.referenceType,a=n.enter("imageReference");let s=n.enter("label");const o=n.createTracker(r);let u=o.move("![");const c=n.safe(e.alt,{before:u,after:"]",...o.current()});u+=o.move(c+"]["),s();const d=n.stack;n.stack=[],s=n.enter("reference");const f=n.safe(n.associationId(e),{before:u,after:"]",...o.current()});return s(),n.stack=d,a(),i==="full"||!c||c!==f?u+=o.move(f+"]"):i==="shortcut"?u=u.slice(0,-1):u+=o.move("]"),u}function jT(){return"!"}xc.peek=zT;function xc(e,t,n){let r=e.value||"",i="`",a=-1;for(;new RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++a<n.unsafe.length;){const s=n.unsafe[a],o=n.compilePattern(s);let u;if(s.atBreak)for(;u=o.exec(r);){let c=u.index;r.charCodeAt(c)===10&&r.charCodeAt(c-1)===13&&c--,r=r.slice(0,c)+" "+r.slice(u.index+1)}}return i+r+i}function zT(){return"`"}function Sc(e,t){const n=Oa(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}_c.peek=$T;function _c(e,t,n,r){const i=Wa(n),a=i==='"'?"Quote":"Apostrophe",s=n.createTracker(r);let o,u;if(Sc(e,n)){const d=n.stack;n.stack=[],o=n.enter("autolink");let f=s.move("<");return f+=s.move(n.containerPhrasing(e,{before:f,after:">",...s.current()})),f+=s.move(">"),o(),n.stack=d,f}o=n.enter("link"),u=n.enter("label");let c=s.move("[");return c+=s.move(n.containerPhrasing(e,{before:c,after:"](",...s.current()})),c+=s.move("]("),u(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(u=n.enter("destinationLiteral"),c+=s.move("<"),c+=s.move(n.safe(e.url,{before:c,after:">",...s.current()})),c+=s.move(">")):(u=n.enter("destinationRaw"),c+=s.move(n.safe(e.url,{before:c,after:e.title?" ":")",...s.current()}))),u(),e.title&&(u=n.enter(`title${a}`),c+=s.move(" "+i),c+=s.move(n.safe(e.title,{before:c,after:i,...s.current()})),c+=s.move(i),u()),c+=s.move(")"),o(),c}function $T(e,t,n){return Sc(e,n)?"<":"["}Cc.peek=YT;function Cc(e,t,n,r){const i=e.referenceType,a=n.enter("linkReference");let s=n.enter("label");const o=n.createTracker(r);let u=o.move("[");const c=n.containerPhrasing(e,{before:u,after:"]",...o.current()});u+=o.move(c+"]["),s();const d=n.stack;n.stack=[],s=n.enter("reference");const f=n.safe(n.associationId(e),{before:u,after:"]",...o.current()});return s(),n.stack=d,a(),i==="full"||!c||c!==f?u+=o.move(f+"]"):i==="shortcut"?u=u.slice(0,-1):u+=o.move("]"),u}function YT(){return"["}function Xa(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 GT(e){const t=Xa(e),n=e.options.bulletOther;if(!n)return t==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function qT(e){const t=e.options.bulletOrdered||".";if(t!=="."&&t!==")")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function Ac(e){const t=e.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function VT(e,t,n,r){const i=n.enter("list"),a=n.bulletCurrent;let s=e.ordered?qT(n):Xa(n);const o=e.ordered?s==="."?")":".":GT(n);let u=t&&n.bulletLastUsed?s===n.bulletLastUsed:!1;if(!e.ordered){const d=e.children?e.children[0]:void 0;if((s==="*"||s==="-")&&d&&(!d.children||!d.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(u=!0),Ac(n)===s&&d){let f=-1;for(;++f<e.children.length;){const p=e.children[f];if(p&&p.type==="listItem"&&p.children&&p.children[0]&&p.children[0].type==="thematicBreak"){u=!0;break}}}}u&&(s=o),n.bulletCurrent=s;const c=n.containerFlow(e,r);return n.bulletLastUsed=s,n.bulletCurrent=a,i(),c}function WT(e){const t=e.options.listItemIndent||"one";if(t!=="tab"&&t!=="one"&&t!=="mixed")throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function XT(e,t,n,r){const i=WT(n);let a=n.bulletCurrent||Xa(n);t&&t.type==="list"&&t.ordered&&(a=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+a);let s=a.length+1;(i==="tab"||i==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(s=Math.ceil(s/4)*4);const o=n.createTracker(r);o.move(a+" ".repeat(s-a.length)),o.shift(s);const u=n.enter("listItem"),c=n.indentLines(n.containerFlow(e,o.current()),d);return u(),c;function d(f,p,h){return p?(h?"":" ".repeat(s))+f:(h?a:a+" ".repeat(s-a.length))+f}}function QT(e,t,n,r){const i=n.enter("paragraph"),a=n.enter("phrasing"),s=n.containerPhrasing(e,r);return a(),i(),s}const KT=Gr(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function ZT(e,t,n,r){return(e.children.some(function(s){return KT(s)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function JT(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}wc.peek=e2;function wc(e,t,n,r){const i=JT(n),a=n.enter("strong"),s=n.createTracker(r);let o=s.move(i+i);return o+=s.move(n.containerPhrasing(e,{before:o,after:i,...s.current()})),o+=s.move(i+i),a(),o}function e2(e,t,n){return n.options.strong||"*"}function t2(e,t,n,r){return n.safe(e.value,r)}function n2(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function r2(e,t,n){const r=(Ac(n)+(n.options.ruleSpaces?" ":"")).repeat(n2(n));return n.options.ruleSpaces?r.slice(0,-1):r}const Ic={blockquote:wT,break:Po,code:RT,definition:DT,emphasis:bc,hardBreak:Po,heading:FT,html:Ec,image:Tc,imageReference:yc,inlineCode:xc,link:_c,linkReference:Cc,list:VT,listItem:XT,paragraph:QT,root:ZT,strong:wc,text:t2,thematicBreak:r2};function i2(){return{enter:{table:a2,tableData:Mo,tableHeader:Mo,tableRow:o2},exit:{codeText:u2,table:s2,tableData:Ri,tableHeader:Ri,tableRow:Ri}}}function a2(e){const t=e._align;this.enter({type:"table",align:t.map(function(n){return n==="none"?null:n}),children:[]},e),this.data.inTable=!0}function s2(e){this.exit(e),this.data.inTable=void 0}function o2(e){this.enter({type:"tableRow",children:[]},e)}function Ri(e){this.exit(e)}function Mo(e){this.enter({type:"tableCell",children:[]},e)}function u2(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,l2));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function l2(e,t){return t==="|"?t:e}function c2(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,a=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
75
+ `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:p,table:s,tableCell:u,tableRow:o}};function s(h,b,y,w){return c(d(h,y,w),h.align)}function o(h,b,y,w){const _=f(h,y,w),k=c([_]);return k.slice(0,k.indexOf(`
76
+ `))}function u(h,b,y,w){const _=y.enter("tableCell"),k=y.enter("phrasing"),N=y.containerPhrasing(h,{...w,before:a,after:a});return k(),_(),N}function c(h,b){return CT(h,{align:b,alignDelimiters:r,padding:n,stringLength:i})}function d(h,b,y){const w=h.children;let _=-1;const k=[],N=b.enter("table");for(;++_<w.length;)k[_]=f(w[_],b,y);return N(),k}function f(h,b,y){const w=h.children;let _=-1;const k=[],N=b.enter("tableRow");for(;++_<w.length;)k[_]=u(w[_],h,b,y);return N(),k}function p(h,b,y){let w=Ic.inlineCode(h,b,y);return y.stack.includes("tableCell")&&(w=w.replace(/\|/g,"\\$&")),w}}function d2(){return{exit:{taskListCheckValueChecked:Bo,taskListCheckValueUnchecked:Bo,paragraph:h2}}}function f2(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:p2}}}function Bo(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function h2(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const i=t.children;let a=-1,s;for(;++a<i.length;){const o=i[a];if(o.type==="paragraph"){s=o;break}}s===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function p2(e,t,n,r){const i=e.children[0],a=typeof e.checked=="boolean"&&i&&i.type==="paragraph",s="["+(e.checked?"x":" ")+"] ",o=n.createTracker(r);a&&o.move(s);let u=Ic.listItem(e,t,n,{...r,...o.current()});return a&&(u=u.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,c)),u;function c(d){return d+s}}function m2(){return[VE(),pT(),ET(),i2(),d2()]}function g2(e){return{extensions:[WE(),mT(e),TT(),c2(e),f2()]}}const b2={tokenize:_2,partial:!0},vc={tokenize:C2,partial:!0},kc={tokenize:A2,partial:!0},Nc={tokenize:w2,partial:!0},E2={tokenize:I2,partial:!0},Oc={name:"wwwAutolink",tokenize:x2,previous:Lc},Rc={name:"protocolAutolink",tokenize:S2,previous:Dc},Ot={name:"emailAutolink",tokenize:y2,previous:Pc},wt={};function T2(){return{text:wt}}let Vt=48;for(;Vt<123;)wt[Vt]=Ot,Vt++,Vt===58?Vt=65:Vt===91&&(Vt=97);wt[43]=Ot;wt[45]=Ot;wt[46]=Ot;wt[95]=Ot;wt[72]=[Ot,Rc];wt[104]=[Ot,Rc];wt[87]=[Ot,Oc];wt[119]=[Ot,Oc];function y2(e,t,n){const r=this;let i,a;return s;function s(f){return!ha(f)||!Pc.call(r,r.previous)||Qa(r.events)?n(f):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),o(f))}function o(f){return ha(f)?(e.consume(f),o):f===64?(e.consume(f),u):n(f)}function u(f){return f===46?e.check(E2,d,c)(f):f===45||f===95||Ye(f)?(a=!0,e.consume(f),u):d(f)}function c(f){return e.consume(f),i=!0,u}function d(f){return a&&i&&Ke(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(f)):n(f)}}function x2(e,t,n){const r=this;return i;function i(s){return s!==87&&s!==119||!Lc.call(r,r.previous)||Qa(r.events)?n(s):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(b2,e.attempt(vc,e.attempt(kc,a),n),n)(s))}function a(s){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(s)}}function S2(e,t,n){const r=this;let i="",a=!1;return s;function s(f){return(f===72||f===104)&&Dc.call(r,r.previous)&&!Qa(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(f),e.consume(f),o):n(f)}function o(f){if(Ke(f)&&i.length<5)return i+=String.fromCodePoint(f),e.consume(f),o;if(f===58){const p=i.toLowerCase();if(p==="http"||p==="https")return e.consume(f),u}return n(f)}function u(f){return f===47?(e.consume(f),a?c:(a=!0,u)):n(f)}function c(f){return f===null||_r(f)||ve(f)||en(f)||zr(f)?n(f):e.attempt(vc,e.attempt(kc,d),n)(f)}function d(f){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(f)}}function _2(e,t,n){let r=0;return i;function i(s){return(s===87||s===119)&&r<3?(r++,e.consume(s),i):s===46&&r===3?(e.consume(s),a):n(s)}function a(s){return s===null?n(s):t(s)}}function C2(e,t,n){let r,i,a;return s;function s(c){return c===46||c===95?e.check(Nc,u,o)(c):c===null||ve(c)||en(c)||c!==45&&zr(c)?u(c):(a=!0,e.consume(c),s)}function o(c){return c===95?r=!0:(i=r,r=void 0),e.consume(c),s}function u(c){return i||r||!a?n(c):t(c)}}function A2(e,t){let n=0,r=0;return i;function i(s){return s===40?(n++,e.consume(s),i):s===41&&r<n?a(s):s===33||s===34||s===38||s===39||s===41||s===42||s===44||s===46||s===58||s===59||s===60||s===63||s===93||s===95||s===126?e.check(Nc,t,a)(s):s===null||ve(s)||en(s)?t(s):(e.consume(s),i)}function a(s){return s===41&&r++,e.consume(s),i}}function w2(e,t,n){return r;function r(o){return o===33||o===34||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===63||o===95||o===126?(e.consume(o),r):o===38?(e.consume(o),a):o===93?(e.consume(o),i):o===60||o===null||ve(o)||en(o)?t(o):n(o)}function i(o){return o===null||o===40||o===91||ve(o)||en(o)?t(o):r(o)}function a(o){return Ke(o)?s(o):n(o)}function s(o){return o===59?(e.consume(o),r):Ke(o)?(e.consume(o),s):n(o)}}function I2(e,t,n){return r;function r(a){return e.consume(a),i}function i(a){return Ye(a)?n(a):t(a)}}function Lc(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||ve(e)}function Dc(e){return!Ke(e)}function Pc(e){return!(e===47||ha(e))}function ha(e){return e===43||e===45||e===46||e===95||Ye(e)}function Qa(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const v2={tokenize:M2,partial:!0};function k2(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:L2,continuation:{tokenize:D2},exit:P2}},text:{91:{name:"gfmFootnoteCall",tokenize:R2},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:N2,resolveTo:O2}}}}function N2(e,t,n){const r=this;let i=r.events.length;const a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let s;for(;i--;){const u=r.events[i][1];if(u.type==="labelImage"){s=u;break}if(u.type==="gfmFootnoteCall"||u.type==="labelLink"||u.type==="label"||u.type==="image"||u.type==="link")break}return o;function o(u){if(!s||!s._balanced)return n(u);const c=pt(r.sliceSerialize({start:s.end,end:r.now()}));return c.codePointAt(0)!==94||!a.includes(c.slice(1))?n(u):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(u),e.exit("gfmFootnoteCallLabelMarker"),t(u))}}function O2(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;const a={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},s={type:"chunkString",contentType:"string",start:Object.assign({},a.start),end:Object.assign({},a.end)},o=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",i,t],["exit",i,t],["enter",a,t],["enter",s,t],["exit",s,t],["exit",a,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...o),e}function R2(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a=0,s;return o;function o(f){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(f),e.exit("gfmFootnoteCallLabelMarker"),u}function u(f){return f!==94?n(f):(e.enter("gfmFootnoteCallMarker"),e.consume(f),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",c)}function c(f){if(a>999||f===93&&!s||f===null||f===91||ve(f))return n(f);if(f===93){e.exit("chunkString");const p=e.exit("gfmFootnoteCallString");return i.includes(pt(r.sliceSerialize(p)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(f),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(f)}return ve(f)||(s=!0),a++,e.consume(f),f===92?d:c}function d(f){return f===91||f===92||f===93?(e.consume(f),a++,c):c(f)}}function L2(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a,s=0,o;return u;function u(b){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(b),e.exit("gfmFootnoteDefinitionLabelMarker"),c}function c(b){return b===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(b),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",d):n(b)}function d(b){if(s>999||b===93&&!o||b===null||b===91||ve(b))return n(b);if(b===93){e.exit("chunkString");const y=e.exit("gfmFootnoteDefinitionLabelString");return a=pt(r.sliceSerialize(y)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(b),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),p}return ve(b)||(o=!0),s++,e.consume(b),b===92?f:d}function f(b){return b===91||b===92||b===93?(e.consume(b),s++,d):d(b)}function p(b){return b===58?(e.enter("definitionMarker"),e.consume(b),e.exit("definitionMarker"),i.includes(a)||i.push(a),Se(e,h,"gfmFootnoteDefinitionWhitespace")):n(b)}function h(b){return t(b)}}function D2(e,t,n){return e.check(er,t,e.attempt(v2,t,n))}function P2(e){e.exit("gfmFootnoteDefinition")}function M2(e,t,n){const r=this;return Se(e,i,"gfmFootnoteDefinitionIndent",5);function i(a){const s=r.events[r.events.length-1];return s&&s[1].type==="gfmFootnoteDefinitionIndent"&&s[2].sliceSerialize(s[1],!0).length===4?t(a):n(a)}}function B2(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:a,resolveAll:i};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function i(s,o){let u=-1;for(;++u<s.length;)if(s[u][0]==="enter"&&s[u][1].type==="strikethroughSequenceTemporary"&&s[u][1]._close){let c=u;for(;c--;)if(s[c][0]==="exit"&&s[c][1].type==="strikethroughSequenceTemporary"&&s[c][1]._open&&s[u][1].end.offset-s[u][1].start.offset===s[c][1].end.offset-s[c][1].start.offset){s[u][1].type="strikethroughSequence",s[c][1].type="strikethroughSequence";const d={type:"strikethrough",start:Object.assign({},s[c][1].start),end:Object.assign({},s[u][1].end)},f={type:"strikethroughText",start:Object.assign({},s[c][1].end),end:Object.assign({},s[u][1].start)},p=[["enter",d,o],["enter",s[c][1],o],["exit",s[c][1],o],["enter",f,o]],h=o.parser.constructs.insideSpan.null;h&&it(p,p.length,0,$r(h,s.slice(c+1,u),o)),it(p,p.length,0,[["exit",f,o],["enter",s[u][1],o],["exit",s[u][1],o],["exit",d,o]]),it(s,c-1,u-c+3,p),u=c+p.length-2;break}}for(u=-1;++u<s.length;)s[u][1].type==="strikethroughSequenceTemporary"&&(s[u][1].type="data");return s}function a(s,o,u){const c=this.previous,d=this.events;let f=0;return p;function p(b){return c===126&&d[d.length-1][1].type!=="characterEscape"?u(b):(s.enter("strikethroughSequenceTemporary"),h(b))}function h(b){const y=Cr(c);if(b===126)return f>1?u(b):(s.consume(b),f++,h);if(f<2&&!n)return u(b);const w=s.exit("strikethroughSequenceTemporary"),_=Cr(b);return w._open=!_||_===2&&!!y,w._close=!y||y===2&&!!_,o(b)}}}class F2{constructor(){this.map=[]}add(t,n,r){H2(this,t,n,r)}consume(t){if(this.map.sort(function(a,s){return a[0]-s[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push(t.slice()),t.length=0;let i=r.pop();for(;i;){for(const a of i)t.push(a);i=r.pop()}this.map.length=0}}function H2(e,t,n,r){let i=0;if(!(n===0&&r.length===0)){for(;i<e.map.length;){if(e.map[i][0]===t){e.map[i][1]+=n,e.map[i][2].push(...r);return}i+=1}e.map.push([t,n,r])}}function U2(e,t){let n=!1;const r=[];for(;t<e.length;){const i=e[t];if(n){if(i[0]==="enter")i[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(i[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const a=r.length-1;r[a]=r[a]==="left"?"center":"right"}}else if(i[1].type==="tableDelimiterRow")break}else i[0]==="enter"&&i[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function j2(){return{flow:{null:{name:"table",tokenize:z2,resolveAll:$2}}}}function z2(e,t,n){const r=this;let i=0,a=0,s;return o;function o(I){let H=r.events.length-1;for(;H>-1;){const j=r.events[H][1].type;if(j==="lineEnding"||j==="linePrefix")H--;else break}const $=H>-1?r.events[H][1].type:null,P=$==="tableHead"||$==="tableRow"?v:u;return P===v&&r.parser.lazy[r.now().line]?n(I):P(I)}function u(I){return e.enter("tableHead"),e.enter("tableRow"),c(I)}function c(I){return I===124||(s=!0,a+=1),d(I)}function d(I){return I===null?n(I):ae(I)?a>1?(a=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(I),e.exit("lineEnding"),h):n(I):be(I)?Se(e,d,"whitespace")(I):(a+=1,s&&(s=!1,i+=1),I===124?(e.enter("tableCellDivider"),e.consume(I),e.exit("tableCellDivider"),s=!0,d):(e.enter("data"),f(I)))}function f(I){return I===null||I===124||ve(I)?(e.exit("data"),d(I)):(e.consume(I),I===92?p:f)}function p(I){return I===92||I===124?(e.consume(I),f):f(I)}function h(I){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(I):(e.enter("tableDelimiterRow"),s=!1,be(I)?Se(e,b,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(I):b(I))}function b(I){return I===45||I===58?w(I):I===124?(s=!0,e.enter("tableCellDivider"),e.consume(I),e.exit("tableCellDivider"),y):A(I)}function y(I){return be(I)?Se(e,w,"whitespace")(I):w(I)}function w(I){return I===58?(a+=1,s=!0,e.enter("tableDelimiterMarker"),e.consume(I),e.exit("tableDelimiterMarker"),_):I===45?(a+=1,_(I)):I===null||ae(I)?L(I):A(I)}function _(I){return I===45?(e.enter("tableDelimiterFiller"),k(I)):A(I)}function k(I){return I===45?(e.consume(I),k):I===58?(s=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(I),e.exit("tableDelimiterMarker"),N):(e.exit("tableDelimiterFiller"),N(I))}function N(I){return be(I)?Se(e,L,"whitespace")(I):L(I)}function L(I){return I===124?b(I):I===null||ae(I)?!s||i!==a?A(I):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(I)):A(I)}function A(I){return n(I)}function v(I){return e.enter("tableRow"),z(I)}function z(I){return I===124?(e.enter("tableCellDivider"),e.consume(I),e.exit("tableCellDivider"),z):I===null||ae(I)?(e.exit("tableRow"),t(I)):be(I)?Se(e,z,"whitespace")(I):(e.enter("data"),K(I))}function K(I){return I===null||I===124||ve(I)?(e.exit("data"),z(I)):(e.consume(I),I===92?Q:K)}function Q(I){return I===92||I===124?(e.consume(I),K):K(I)}}function $2(e,t){let n=-1,r=!0,i=0,a=[0,0,0,0],s=[0,0,0,0],o=!1,u=0,c,d,f;const p=new F2;for(;++n<e.length;){const h=e[n],b=h[1];h[0]==="enter"?b.type==="tableHead"?(o=!1,u!==0&&(Fo(p,t,u,c,d),d=void 0,u=0),c={type:"table",start:Object.assign({},b.start),end:Object.assign({},b.end)},p.add(n,0,[["enter",c,t]])):b.type==="tableRow"||b.type==="tableDelimiterRow"?(r=!0,f=void 0,a=[0,0,0,0],s=[0,n+1,0,0],o&&(o=!1,d={type:"tableBody",start:Object.assign({},b.start),end:Object.assign({},b.end)},p.add(n,0,[["enter",d,t]])),i=b.type==="tableDelimiterRow"?2:d?3:1):i&&(b.type==="data"||b.type==="tableDelimiterMarker"||b.type==="tableDelimiterFiller")?(r=!1,s[2]===0&&(a[1]!==0&&(s[0]=s[1],f=pr(p,t,a,i,void 0,f),a=[0,0,0,0]),s[2]=n)):b.type==="tableCellDivider"&&(r?r=!1:(a[1]!==0&&(s[0]=s[1],f=pr(p,t,a,i,void 0,f)),a=s,s=[a[1],n,0,0])):b.type==="tableHead"?(o=!0,u=n):b.type==="tableRow"||b.type==="tableDelimiterRow"?(u=n,a[1]!==0?(s[0]=s[1],f=pr(p,t,a,i,n,f)):s[1]!==0&&(f=pr(p,t,s,i,n,f)),i=0):i&&(b.type==="data"||b.type==="tableDelimiterMarker"||b.type==="tableDelimiterFiller")&&(s[3]=n)}for(u!==0&&Fo(p,t,u,c,d),p.consume(t.events),n=-1;++n<t.events.length;){const h=t.events[n];h[0]==="enter"&&h[1].type==="table"&&(h[1]._align=U2(t.events,n))}return e}function pr(e,t,n,r,i,a){const s=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",o="tableContent";n[0]!==0&&(a.end=Object.assign({},hn(t.events,n[0])),e.add(n[0],0,[["exit",a,t]]));const u=hn(t.events,n[1]);if(a={type:s,start:Object.assign({},u),end:Object.assign({},u)},e.add(n[1],0,[["enter",a,t]]),n[2]!==0){const c=hn(t.events,n[2]),d=hn(t.events,n[3]),f={type:o,start:Object.assign({},c),end:Object.assign({},d)};if(e.add(n[2],0,[["enter",f,t]]),r!==2){const p=t.events[n[2]],h=t.events[n[3]];if(p[1].end=Object.assign({},h[1].end),p[1].type="chunkText",p[1].contentType="text",n[3]>n[2]+1){const b=n[2]+1,y=n[3]-n[2]-1;e.add(b,y,[])}}e.add(n[3]+1,0,[["exit",f,t]])}return i!==void 0&&(a.end=Object.assign({},hn(t.events,i)),e.add(i,0,[["exit",a,t]]),a=void 0),a}function Fo(e,t,n,r,i){const a=[],s=hn(t.events,n);i&&(i.end=Object.assign({},s),a.push(["exit",i,t])),r.end=Object.assign({},s),a.push(["exit",r,t]),e.add(n+1,0,a)}function hn(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const Y2={name:"tasklistCheck",tokenize:q2};function G2(){return{text:{91:Y2}}}function q2(e,t,n){const r=this;return i;function i(u){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(u):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(u),e.exit("taskListCheckMarker"),a)}function a(u){return ve(u)?(e.enter("taskListCheckValueUnchecked"),e.consume(u),e.exit("taskListCheckValueUnchecked"),s):u===88||u===120?(e.enter("taskListCheckValueChecked"),e.consume(u),e.exit("taskListCheckValueChecked"),s):n(u)}function s(u){return u===93?(e.enter("taskListCheckMarker"),e.consume(u),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),o):n(u)}function o(u){return ae(u)?t(u):be(u)?e.check({tokenize:V2},t,n)(u):n(u)}}function V2(e,t,n){return Se(e,r,"whitespace");function r(i){return i===null?n(i):t(i)}}function W2(e){return ol([T2(),k2(),B2(e),j2(),G2()])}const X2={};function Q2(e){const t=this,n=e||X2,r=t.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),a=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),s=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(W2(n)),a.push(m2()),s.push(g2(n))}const Ho=new Set;function K2(e){return Ho.has(e)?!1:(Ho.add(e),!0)}function Z2(e,{root:t,rootSelector:n,rootMargin:r="0px",threshold:i=0,dedupeKey:a}={}){const s=C.useRef(!1),o=C.useRef();return C.useCallback(c=>{if(o.current?.(),o.current=void 0,!c||s.current)return;const d=t??(n?document.querySelector(n):null),f=()=>{a&&!K2(a)||(s.current=!0,e())};if(typeof window>"u"||!("IntersectionObserver"in window)){f();return}const p=new IntersectionObserver((h,b)=>{h[0]?.isIntersecting&&(b.disconnect(),f())},{root:d,rootMargin:r,threshold:i});p.observe(c),o.current=()=>p.disconnect()},[t,n,r,i,a,e])}class xt{constructor(){}static getApiUrl=()=>xa()?"http://localhost:3001":"https://www.api.chatsystem.ai";static getHeaders=({contentType:t="text/plain"})=>({"Content-Type":t});static getFetchConfig=({contentType:t="text/plain",httpVerb:n="GET",body:r,options:i={}})=>{const a={method:n,headers:this.getHeaders({contentType:t}),...i};return r&&(a.body=JSON.stringify(r)),a}}function J2(e,t){if(!t||!e)return e;const n=t.replace(/^[?&]+/,""),[r,i]=e.split("#"),a=r.includes("?")?"&":"?",s=`${r}${a}${n}`;return i?`${s}#${i}`:s}function ey({href:e="",queryParamToAppend:t="",children:n,context:r,onClick:i,seenRootEl:a,...s}){const{companySettings:o}=C.useContext(nn),u=e.startsWith("/")||typeof window<"u"&&e.startsWith(window.location.origin),c=xt.getApiUrl(),d=J2(e,o.api.tracking?.queryParamToAppend),f=()=>{const _=`${c}/tracking/clicked/${r.appToken}`,k={discussionId:r.discussionId,urlClicked:e};try{fetch(_,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify(k),keepalive:!0,cache:"no-store",credentials:"omit",mode:"cors"}).catch(()=>{})}catch{}},p=()=>{const _=`${c}/tracking/displayed/${r.appToken}`,k={discussionId:r.discussionId,urlSeen:e};try{fetch(_,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify(k),keepalive:!0,cache:"no-store",credentials:"omit",mode:"cors"}).catch(()=>{})}catch{}},h=C.useMemo(()=>`${r.appToken}::${r.discussionId}::${e}`,[r.appToken,r.discussionId,e]),b=Z2(p,{root:a,threshold:0,rootMargin:"0px 0px -10% 0px",dedupeKey:h}),y=_=>{f(),i?.(_)},w=u?{}:{target:"_blank",rel:"noopener noreferrer"};return u?S.jsx("a",{ref:b,href:d,...s,onClick:y,className:"customLinkInternal",children:n}):S.jsx("a",{ref:b,href:d,...w,...s,onClick:y,className:"customLinkExternal",children:n})}const Mc=({logo:e,label:t,className:n})=>S.jsxs("div",{className:`flex items-center gap-2 logoWrapper${n?` ${n}`:""}`,children:[e,S.jsx("p",{className:"font-bold",children:t})]}),Bc=({})=>{const{companySettings:e}=C.useContext(nn);return S.jsx("div",{className:`assistant
77
+ transition
78
+ ease-in-out
79
+ delay-50
80
+ cursor-pointer
81
+ flex
82
+ justify-center
83
+ items-center
84
+ `,children:S.jsx(Sa,{facet:e.agent.display[oe.AgentDisplayFacetRoleType.ASSISTANT]})})},ty=({content:e,metaData:t,context:n,seenRootEl:r})=>{const{chatlineLabelAssistantTranslation:i,chatlineLabelCustomerSupportTranslation:a}=Yu(),s=t?.authorType==="customer_support_operator"?t.customerSupportAuthorName??a:i,o=oe.formatCustomerSupportProviderText({text:e??"",provider:t?.customerSupportProvider});return S.jsx(Va,{children:S.jsx("div",{className:"chatLineAssistant flex justify-start",children:S.jsxs("div",{className:`mr-auto w-full rounded-2xl rounded-bl-md px-4 py-3 transition-all duration-300 text-left ${t?.isErrorMessage?"bg-red-100 text-red-800 shadow-md animate-fade-in":"bg-slate-100 text-gray-800 shadow-sm"}`,children:[S.jsx(Mc,{className:"logoWrapper--assistant w-full justify-start text-left mb-2 text-xs",logo:S.jsx(Bc,{}),label:s}),S.jsx("div",{children:S.jsx(Ha,{remarkPlugins:[Q2],remarkRehypeOptions:{passThrough:["link"]},rehypePlugins:[qa],components:{a:({node:u,href:c,children:d,...f})=>S.jsx(ey,{href:c??"",...f,context:n,seenRootEl:r,children:d})},children:o})})]})})})},ny=({content:e,metaData:t})=>{const n=t?.isErrorMessage;return S.jsx(Va,{children:S.jsx("div",{className:"chatLineSystemMessage flex justify-center px-2","data-system-event":t?.systemEvent,children:S.jsx("div",{className:`max-w-[90%] rounded-lg border px-3 py-2 text-center text-xs leading-relaxed shadow-sm ${n?"border-red-200 bg-red-50 text-red-800":"border-slate-200 bg-slate-50 text-slate-600"}`,children:S.jsx(Ha,{rehypePlugins:[qa],children:e??""})})})})},ry=({userType:e,content:t,metaData:n,context:r,seenRootEl:i})=>{if(n?.messageKind==="system")return S.jsx(ny,{content:t,metaData:n});const a=e==="user",s=e==="assistant";return S.jsxs(S.Fragment,{children:[a&&S.jsx(jE,{content:t,metaData:n}),s&&S.jsx(ty,{content:t,metaData:n,context:r,seenRootEl:i})]})};function iy(e,t,n){let[r,i]=C.useState(e||t),a=C.useRef(e!==void 0),s=e!==void 0;C.useEffect(()=>{let c=a.current;c!==s&&console.warn(`WARN: A component changed from ${c?"controlled":"uncontrolled"} to ${s?"controlled":"uncontrolled"}.`),a.current=s},[s]);let o=s?e:r,u=C.useCallback((c,...d)=>{let f=(p,...h)=>{n&&(Object.is(o,p)||n(p,...h)),s||(o=p)};typeof c=="function"?(console.warn("We can not support a function callback. See Github Issues for details https://github.com/adobe/react-spectrum/issues/2320"),i((h,...b)=>{let y=c(s?o:h,...b);return f(y,...d),s?h:y})):(s||i(c),f(c,...d))},[s,o,n]);return[o,u]}const Nr={prefix:String(Math.round(Math.random()*1e10)),current:0},Fc=C.createContext(Nr),ay=C.createContext(!1);let sy=!!(typeof window<"u"&&window.document&&window.document.createElement),Li=new WeakMap;function oy(e=!1){let t=C.useContext(Fc),n=C.useRef(null);if(n.current===null&&!e){var r,i;let a=(i=C.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED)===null||i===void 0||(r=i.ReactCurrentOwner)===null||r===void 0?void 0:r.current;if(a){let s=Li.get(a);s==null?Li.set(a,{id:t.current,state:a.memoizedState}):a.memoizedState!==s.state&&(t.current=s.id,Li.delete(a))}n.current=++t.current}return n.current}function uy(e){let t=C.useContext(Fc);t===Nr&&!sy&&console.warn("When server rendering, you must wrap your application in an <SSRProvider> to ensure consistent ids are generated between the client and server.");let n=oy(!!e),r=t===Nr&&process.env.NODE_ENV==="test"?"react-aria":`react-aria${t.prefix}`;return e||`${r}-${n}`}function ly(e){let t=C.useId(),[n]=C.useState(py()),r=n||process.env.NODE_ENV==="test"?"react-aria":`react-aria${Nr.prefix}`;return e||`${r}-${t}`}const cy=typeof C.useId=="function"?ly:uy;function dy(){return!1}function fy(){return!0}function hy(e){return()=>{}}function py(){return typeof C.useSyncExternalStore=="function"?C.useSyncExternalStore(hy,dy,fy):C.useContext(ay)}function Hc(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=Hc(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function my(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=Hc(e))&&(r&&(r+=" "),r+=t);return r}const un=typeof document<"u"?C.useLayoutEffect:()=>{};function Zt(e){const t=C.useRef(null);return un(()=>{t.current=e},[e]),C.useCallback((...n)=>{const r=t.current;return r?.(...n)},[])}function gy(e){let[t,n]=C.useState(e),r=C.useRef(null),i=Zt(()=>{if(!r.current)return;let s=r.current.next();if(s.done){r.current=null;return}t===s.value?i():n(s.value)});un(()=>{r.current&&i()});let a=Zt(s=>{r.current=s(t),i()});return[t,a]}let by=!!(typeof window<"u"&&window.document&&window.document.createElement),Or=new Map;function Rr(e){let[t,n]=C.useState(e),r=C.useRef(null),i=cy(t),a=C.useCallback(s=>{r.current=s},[]);return by&&Or.set(i,a),un(()=>{let s=i;return()=>{Or.delete(s)}},[i]),C.useEffect(()=>{let s=r.current;s&&(r.current=null,n(s))}),i}function Ey(e,t){if(e===t)return e;let n=Or.get(e);if(n)return n(t),t;let r=Or.get(t);return r?(r(e),e):t}function Uo(e=[]){let t=Rr(),[n,r]=gy(t),i=C.useCallback(()=>{r(function*(){yield t,yield document.getElementById(t)?t:void 0})},[t,r]);return un(i,[t,i,...e]),n}function Ty(...e){return(...t)=>{for(let n of e)typeof n=="function"&&n(...t)}}const ir=e=>{var t;return(t=e?.ownerDocument)!==null&&t!==void 0?t:document},Lr=e=>e&&"window"in e&&e.window===e?e:ir(e).defaultView||window;function Dr(...e){let t={...e[0]};for(let n=1;n<e.length;n++){let r=e[n];for(let i in r){let a=t[i],s=r[i];typeof a=="function"&&typeof s=="function"&&i[0]==="o"&&i[1]==="n"&&i.charCodeAt(2)>=65&&i.charCodeAt(2)<=90?t[i]=Ty(a,s):(i==="className"||i==="UNSAFE_className")&&typeof a=="string"&&typeof s=="string"?t[i]=my(a,s):i==="id"&&a&&s?t.id=Ey(a,s):t[i]=s!==void 0?s:a}}return t}const yy=new Set(["id"]),xy=new Set(["aria-label","aria-labelledby","aria-describedby","aria-details"]),Sy=new Set(["href","target","rel","download","ping","referrerPolicy"]),_y=/^(data-.*)$/;function Cy(e,t={}){let{labelable:n,isLink:r,propNames:i}=t,a={};for(const s in e)Object.prototype.hasOwnProperty.call(e,s)&&(yy.has(s)||n&&xy.has(s)||r&&Sy.has(s)||i?.has(s)||_y.test(s))&&(a[s]=e[s]);return a}function jo(e){if(Ay())e.focus({preventScroll:!0});else{let t=wy(e);e.focus(),Iy(t)}}let mr=null;function Ay(){if(mr==null){mr=!1;try{document.createElement("div").focus({get preventScroll(){return mr=!0,!0}})}catch{}}return mr}function wy(e){let t=e.parentNode,n=[],r=document.scrollingElement||document.documentElement;for(;t instanceof HTMLElement&&t!==r;)(t.offsetHeight<t.scrollHeight||t.offsetWidth<t.scrollWidth)&&n.push({element:t,scrollTop:t.scrollTop,scrollLeft:t.scrollLeft}),t=t.parentNode;return r instanceof HTMLElement&&n.push({element:r,scrollTop:r.scrollTop,scrollLeft:r.scrollLeft}),n}function Iy(e){for(let{element:t,scrollTop:n,scrollLeft:r}of e)t.scrollTop=n,t.scrollLeft=r}function vy(e){var t;return typeof window>"u"||window.navigator==null?!1:((t=window.navigator.userAgentData)===null||t===void 0?void 0:t.brands.some(n=>e.test(n.brand)))||e.test(window.navigator.userAgent)}function ky(e){var t;return typeof window<"u"&&window.navigator!=null?e.test(((t=window.navigator.userAgentData)===null||t===void 0?void 0:t.platform)||window.navigator.platform):!1}function Ny(){return ky(/^Mac/i)}function Oy(){return vy(/Android/i)}let pn=new Map,pa=new Set;function zo(){if(typeof window>"u")return;function e(r){return"propertyName"in r}let t=r=>{if(!e(r)||!r.target)return;let i=pn.get(r.target);i||(i=new Set,pn.set(r.target,i),r.target.addEventListener("transitioncancel",n,{once:!0})),i.add(r.propertyName)},n=r=>{if(!e(r)||!r.target)return;let i=pn.get(r.target);if(i&&(i.delete(r.propertyName),i.size===0&&(r.target.removeEventListener("transitioncancel",n),pn.delete(r.target)),pn.size===0)){for(let a of pa)a();pa.clear()}};document.body.addEventListener("transitionrun",t),document.body.addEventListener("transitionend",n)}typeof document<"u"&&(document.readyState!=="loading"?zo():document.addEventListener("DOMContentLoaded",zo));function Ry(e){requestAnimationFrame(()=>{pn.size===0?e():pa.add(e)})}function Ly(e,t){let{id:n,"aria-label":r,"aria-labelledby":i}=e;return n=Rr(n),i&&r?i=[...new Set([n,...i.trim().split(/\s+/)])].join(" "):i&&(i=i.trim().split(/\s+/).join(" ")),!r&&!i&&t&&(r=t),{id:n,"aria-label":r,"aria-labelledby":i}}function Dy(e,t){un(()=>{if(e&&e.ref&&t)return e.ref.current=t.current,()=>{e.ref&&(e.ref.current=null)}})}function Py(e){return e.mozInputSource===0&&e.isTrusted?!0:Oy()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function My(e,t,n){let r=C.useRef(t),i=Zt(()=>{n&&n(r.current)});C.useEffect(()=>{var a;let s=e==null||(a=e.current)===null||a===void 0?void 0:a.form;return s?.addEventListener("reset",i),()=>{s?.removeEventListener("reset",i)}},[e,i])}const By=C.createContext({register:()=>{}});By.displayName="PressResponderContext";class Fy{isDefaultPrevented(){return this.nativeEvent.defaultPrevented}preventDefault(){this.defaultPrevented=!0,this.nativeEvent.preventDefault()}stopPropagation(){this.nativeEvent.stopPropagation(),this.isPropagationStopped=()=>!0}isPropagationStopped(){return!1}persist(){}constructor(t,n){this.nativeEvent=n,this.target=n.target,this.currentTarget=n.currentTarget,this.relatedTarget=n.relatedTarget,this.bubbles=n.bubbles,this.cancelable=n.cancelable,this.defaultPrevented=n.defaultPrevented,this.eventPhase=n.eventPhase,this.isTrusted=n.isTrusted,this.timeStamp=n.timeStamp,this.type=t}}function Hy(e){let t=C.useRef({isFocused:!1,observer:null});un(()=>{const r=t.current;return()=>{r.observer&&(r.observer.disconnect(),r.observer=null)}},[]);let n=Zt(r=>{e?.(r)});return C.useCallback(r=>{if(r.target instanceof HTMLButtonElement||r.target instanceof HTMLInputElement||r.target instanceof HTMLTextAreaElement||r.target instanceof HTMLSelectElement){t.current.isFocused=!0;let i=r.target,a=s=>{t.current.isFocused=!1,i.disabled&&n(new Fy("blur",s)),t.current.observer&&(t.current.observer.disconnect(),t.current.observer=null)};i.addEventListener("focusout",a,{once:!0}),t.current.observer=new MutationObserver(()=>{if(t.current.isFocused&&i.disabled){var s;(s=t.current.observer)===null||s===void 0||s.disconnect();let o=i===document.activeElement?null:document.activeElement;i.dispatchEvent(new FocusEvent("blur",{relatedTarget:o})),i.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:o}))}}),t.current.observer.observe(i,{attributes:!0,attributeFilter:["disabled"]})}},[n])}function Uy(e){let{isDisabled:t,onFocus:n,onBlur:r,onFocusChange:i}=e;const a=C.useCallback(u=>{if(u.target===u.currentTarget)return r&&r(u),i&&i(!1),!0},[r,i]),s=Hy(a),o=C.useCallback(u=>{u.target===u.currentTarget&&document.activeElement===u.target&&(n&&n(u),i&&i(!0),s(u))},[i,n,s]);return{focusProps:{onFocus:!t&&(n||i||r)?o:void 0,onBlur:!t&&(r||i)?a:void 0}}}let kn=null,jy=new Set,qn=new Map,tn=!1,ma=!1;function Zr(e,t){for(let n of jy)n(e,t)}function zy(e){return!(e.metaKey||!Ny()&&e.altKey||e.ctrlKey||e.key==="Control"||e.key==="Shift"||e.key==="Meta")}function Pr(e){tn=!0,zy(e)&&(kn="keyboard",Zr("keyboard",e))}function lt(e){kn="pointer",(e.type==="mousedown"||e.type==="pointerdown")&&(tn=!0,Zr("pointer",e))}function Uc(e){Py(e)&&(tn=!0,kn="virtual")}function jc(e){e.target===window||e.target===document||(!tn&&!ma&&(kn="virtual",Zr("virtual",e)),tn=!1,ma=!1)}function zc(){tn=!1,ma=!0}function $o(e){if(typeof window>"u"||qn.get(Lr(e)))return;const t=Lr(e),n=ir(e);let r=t.HTMLElement.prototype.focus;t.HTMLElement.prototype.focus=function(){tn=!0,r.apply(this,arguments)},n.addEventListener("keydown",Pr,!0),n.addEventListener("keyup",Pr,!0),n.addEventListener("click",Uc,!0),t.addEventListener("focus",jc,!0),t.addEventListener("blur",zc,!1),typeof PointerEvent<"u"?(n.addEventListener("pointerdown",lt,!0),n.addEventListener("pointermove",lt,!0),n.addEventListener("pointerup",lt,!0)):(n.addEventListener("mousedown",lt,!0),n.addEventListener("mousemove",lt,!0),n.addEventListener("mouseup",lt,!0)),t.addEventListener("beforeunload",()=>{$c(e)},{once:!0}),qn.set(t,{focus:r})}const $c=(e,t)=>{const n=Lr(e),r=ir(e);t&&r.removeEventListener("DOMContentLoaded",t),qn.has(n)&&(n.HTMLElement.prototype.focus=qn.get(n).focus,r.removeEventListener("keydown",Pr,!0),r.removeEventListener("keyup",Pr,!0),r.removeEventListener("click",Uc,!0),n.removeEventListener("focus",jc,!0),n.removeEventListener("blur",zc,!1),typeof PointerEvent<"u"?(r.removeEventListener("pointerdown",lt,!0),r.removeEventListener("pointermove",lt,!0),r.removeEventListener("pointerup",lt,!0)):(r.removeEventListener("mousedown",lt,!0),r.removeEventListener("mousemove",lt,!0),r.removeEventListener("mouseup",lt,!0)),qn.delete(n))};function $y(e){const t=ir(e);let n;return t.readyState!=="loading"?$o(e):(n=()=>{$o(e)},t.addEventListener("DOMContentLoaded",n)),()=>$c(e,n)}typeof document<"u"&&$y();function Yy(){return kn}function Gy(e){kn=e,Zr(e,null)}function Yo(e){if(!e)return;let t=!0;return n=>{let r={...n,preventDefault(){n.preventDefault()},isDefaultPrevented(){return n.isDefaultPrevented()},stopPropagation(){console.error("stopPropagation is now the default behavior for events in React Spectrum. You can use continuePropagation() to revert this behavior.")},continuePropagation(){t=!1}};e(r),t&&n.stopPropagation()}}function qy(e){return{keyboardProps:e.isDisabled?{}:{onKeyDown:Yo(e.onKeyDown),onKeyUp:Yo(e.onKeyUp)}}}function Vy(e){const t=ir(e);if(Yy()==="virtual"){let n=t.activeElement;Ry(()=>{t.activeElement===n&&e.isConnected&&jo(e)})}else jo(e)}function Wy(e,t){return!e||!t?!1:t.some(n=>n.contains(e))}class Ka{get size(){return this.fastMap.size}getTreeNode(t){return this.fastMap.get(t)}addTreeNode(t,n,r){let i=this.fastMap.get(n??null);if(!i)return;let a=new Go({scopeRef:t});i.addChild(a),a.parent=i,this.fastMap.set(t,a),r&&(a.nodeToRestore=r)}addNode(t){this.fastMap.set(t.scopeRef,t)}removeTreeNode(t){if(t===null)return;let n=this.fastMap.get(t);if(!n)return;let r=n.parent;for(let a of this.traverse())a!==n&&n.nodeToRestore&&a.nodeToRestore&&n.scopeRef&&n.scopeRef.current&&Wy(a.nodeToRestore,n.scopeRef.current)&&(a.nodeToRestore=n.nodeToRestore);let i=n.children;r&&(r.removeChild(n),i.size>0&&i.forEach(a=>r&&r.addChild(a))),this.fastMap.delete(n.scopeRef)}*traverse(t=this.root){if(t.scopeRef!=null&&(yield t),t.children.size>0)for(let n of t.children)yield*this.traverse(n)}clone(){var t;let n=new Ka;var r;for(let i of this.traverse())n.addTreeNode(i.scopeRef,(r=(t=i.parent)===null||t===void 0?void 0:t.scopeRef)!==null&&r!==void 0?r:null,i.nodeToRestore);return n}constructor(){this.fastMap=new Map,this.root=new Go({scopeRef:null}),this.fastMap.set(null,this.root)}}class Go{addChild(t){this.children.add(t),t.parent=this}removeChild(t){this.children.delete(t),t.parent=void 0}constructor(t){this.children=new Set,this.contain=!1,this.scopeRef=t.scopeRef}}new Ka;let Xy=C.createContext(null);function Qy(e){let t=C.useContext(Xy)||{};Dy(t,e);let{ref:n,...r}=t;return r}function Ky(e,t){let{focusProps:n}=Uy(e),{keyboardProps:r}=qy(e),i=Dr(n,r),a=Qy(t),s=e.isDisabled?{}:a,o=C.useRef(e.autoFocus);return C.useEffect(()=>{o.current&&t.current&&Vy(t.current),o.current=!1},[t]),{focusableProps:Dr({...i,tabIndex:e.excludeFromTabOrder&&!e.isDisabled?-1:void 0},s)}}function Zy(e,t,n){let{validationBehavior:r,focus:i}=e;un(()=>{if(r==="native"&&n?.current){let u=t.realtimeValidation.isInvalid?t.realtimeValidation.validationErrors.join(" ")||"Invalid value.":"";n.current.setCustomValidity(u),n.current.hasAttribute("title")||(n.current.title=""),t.realtimeValidation.isInvalid||t.updateValidation(ex(n.current))}});let a=Zt(()=>{t.resetValidation()}),s=Zt(u=>{var c;t.displayValidation.isInvalid||t.commitValidation();let d=n==null||(c=n.current)===null||c===void 0?void 0:c.form;if(!u.defaultPrevented&&n&&d&&tx(d)===n.current){var f;i?i():(f=n.current)===null||f===void 0||f.focus(),Gy("keyboard")}u.preventDefault()}),o=Zt(()=>{t.commitValidation()});C.useEffect(()=>{let u=n?.current;if(!u)return;let c=u.form;return u.addEventListener("invalid",s),u.addEventListener("change",o),c?.addEventListener("reset",a),()=>{u.removeEventListener("invalid",s),u.removeEventListener("change",o),c?.removeEventListener("reset",a)}},[n,s,o,a,r])}function Jy(e){let t=e.validity;return{badInput:t.badInput,customError:t.customError,patternMismatch:t.patternMismatch,rangeOverflow:t.rangeOverflow,rangeUnderflow:t.rangeUnderflow,stepMismatch:t.stepMismatch,tooLong:t.tooLong,tooShort:t.tooShort,typeMismatch:t.typeMismatch,valueMissing:t.valueMissing,valid:t.valid}}function ex(e){return{isInvalid:!e.validity.valid,validationDetails:Jy(e),validationErrors:e.validationMessage?[e.validationMessage]:[]}}function tx(e){for(let t=0;t<e.elements.length;t++){let n=e.elements[t];if(!n.validity.valid)return n}return null}const Yc={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valueMissing:!1,valid:!0},Gc={...Yc,customError:!0,valid:!1},Pn={isInvalid:!1,validationDetails:Yc,validationErrors:[]},nx=C.createContext({}),qo="__formValidationState"+Date.now();function rx(e){if(e[qo]){let{realtimeValidation:t,displayValidation:n,updateValidation:r,resetValidation:i,commitValidation:a}=e[qo];return{realtimeValidation:t,displayValidation:n,updateValidation:r,resetValidation:i,commitValidation:a}}return ix(e)}function ix(e){let{isInvalid:t,validationState:n,name:r,value:i,builtinValidation:a,validate:s,validationBehavior:o="aria"}=e;n&&(t||(t=n==="invalid"));let u=t?{isInvalid:!0,validationErrors:[],validationDetails:Gc}:null,c=C.useMemo(()=>Vo(ax(s,i)),[s,i]);a?.validationDetails.valid&&(a=null);let d=C.useContext(nx),f=C.useMemo(()=>r?Array.isArray(r)?r.flatMap(I=>ga(d[I])):ga(d[r]):[],[d,r]),[p,h]=C.useState(d),[b,y]=C.useState(!1);d!==p&&(h(d),y(!1));let w=C.useMemo(()=>Vo(b?[]:f),[b,f]),_=C.useRef(Pn),[k,N]=C.useState(Pn),L=C.useRef(Pn),A=()=>{if(!v)return;z(!1);let I=c||a||_.current;Di(I,L.current)||(L.current=I,N(I))},[v,z]=C.useState(!1);return C.useEffect(A),{realtimeValidation:u||w||c||a||Pn,displayValidation:o==="native"?u||w||k:u||w||c||a||k,updateValidation(I){o==="aria"&&!Di(k,I)?N(I):_.current=I},resetValidation(){let I=Pn;Di(I,L.current)||(L.current=I,N(I)),o==="native"&&z(!1),y(!0)},commitValidation(){o==="native"&&z(!0),y(!0)}}}function ga(e){return e?Array.isArray(e)?e:[e]:[]}function ax(e,t){if(typeof e=="function"){let n=e(t);if(n&&typeof n!="boolean")return ga(n)}return[]}function Vo(e){return e.length?{isInvalid:!0,validationErrors:e,validationDetails:Gc}:null}function Di(e,t){return e===t?!0:e&&t&&e.isInvalid===t.isInvalid&&e.validationErrors.length===t.validationErrors.length&&e.validationErrors.every((n,r)=>n===t.validationErrors[r])&&Object.entries(e.validationDetails).every(([n,r])=>t.validationDetails[n]===r)}function sx(e){let{id:t,label:n,"aria-labelledby":r,"aria-label":i,labelElementType:a="label"}=e;t=Rr(t);let s=Rr(),o={};n?(r=r?`${s} ${r}`:s,o={id:s,htmlFor:a==="label"?t:void 0}):!r&&!i&&console.warn("If you do not provide a visible label, you must specify an aria-label or aria-labelledby attribute for accessibility");let u=Ly({id:t,"aria-label":i,"aria-labelledby":r});return{labelProps:o,fieldProps:u}}function ox(e){let{description:t,errorMessage:n,isInvalid:r,validationState:i}=e,{labelProps:a,fieldProps:s}=sx(e),o=Uo([!!t,!!n,r,i]),u=Uo([!!t,!!n,r,i]);return s=Dr(s,{"aria-describedby":[o,u,e["aria-describedby"]].filter(Boolean).join(" ")||void 0}),{labelProps:a,fieldProps:s,descriptionProps:{id:o},errorMessageProps:{id:u}}}function ux(e,t){let{inputElementType:n="input",isDisabled:r=!1,isRequired:i=!1,isReadOnly:a=!1,type:s="text",validationBehavior:o="aria"}=e,[u,c]=iy(e.value,e.defaultValue||"",e.onChange),{focusableProps:d}=Ky(e,t),f=rx({...e,value:u}),{isInvalid:p,validationErrors:h,validationDetails:b}=f.displayValidation,{labelProps:y,fieldProps:w,descriptionProps:_,errorMessageProps:k}=ox({...e,isInvalid:p,errorMessage:e.errorMessage||h}),N=Cy(e,{labelable:!0});const L={type:s,pattern:e.pattern};return My(t,u,c),Zy(e,f,t),C.useEffect(()=>{if(t.current instanceof Lr(t.current).HTMLTextAreaElement){let A=t.current;Object.defineProperty(A,"defaultValue",{get:()=>A.value,set:()=>{},configurable:!0})}},[t]),{labelProps:y,inputProps:Dr(N,n==="input"&&L,{disabled:r,readOnly:a,required:i&&o==="native","aria-required":i&&o==="aria"||void 0,"aria-invalid":p||void 0,"aria-errormessage":e["aria-errormessage"],"aria-activedescendant":e["aria-activedescendant"],"aria-autocomplete":e["aria-autocomplete"],"aria-haspopup":e["aria-haspopup"],value:u,onChange:A=>c(A.target.value),autoComplete:e.autoComplete,autoCapitalize:e.autoCapitalize,maxLength:e.maxLength,minLength:e.minLength,name:e.name,placeholder:e.placeholder,inputMode:e.inputMode,onCopy:e.onCopy,onCut:e.onCut,onPaste:e.onPaste,onCompositionEnd:e.onCompositionEnd,onCompositionStart:e.onCompositionStart,onCompositionUpdate:e.onCompositionUpdate,onSelect:e.onSelect,onBeforeInput:e.onBeforeInput,onInput:e.onInput,...d,...w}),descriptionProps:_,errorMessageProps:k,isInvalid:p,validationErrors:h,validationDetails:b}}const lx=e=>e.charCodeAt(e.length-1)===10,cx=e=>{const[t,n]=C.useState(""),r=()=>{y.current&&(y.current.style.height=y.current.scrollHeight+"px")},i=()=>{y.current&&(y.current.style.height="48px")},a=I=>{n(I)};C.useEffect(r,[t]);let{label:s,SubmitComponent:o,onSubmit:u,isLoadingStream:c,audioEnabled:d=!1,MicComponent:f,onPressMicButton:p,LoadingComponent:h,onPressLoadingButton:b}=e,y=C.useRef(null),{labelProps:w,inputProps:_}=ux({...e,inputElementType:"textarea"},y);const k=I=>{lx(I.target.value)||a(I.target.value)},N=I=>{if(I.key==="Enter"||I.code==="Enter"||I.keyCode===13||I.code==="NumpadEnter"){if(I.shiftKey)a(t+`
85
+ `);else if(!I.shiftKey){I.preventDefault(),I.stopPropagation(),c||z();return}}},L=I=>{(I.key==="Enter"||I.code==="Enter"||I.keyCode===13||I.code==="NumpadEnter")&&(I.preventDefault(),I.stopPropagation())},A=t.trim().length>0,v=!!(e.isDisabled||e.shouldDisableIfInputIsEmpty&&!A),z=()=>{v||(i(),u?.(t),a(""))},K=d&&!!f&&!!o&&!A&&!c,Q=()=>c&&h?S.jsx("div",{className:"relative",children:S.jsx(h,{onPressLoadingButton:b})}):o?!d||!f?S.jsx("div",{className:"relative",children:S.jsx(o,{onSubmitButton:z,isDisabled:v})}):A?S.jsx("div",{className:"relative",children:S.jsx(o,{onSubmitButton:z,isDisabled:v})}):S.jsxs("div",{className:"relative",children:[S.jsx("div",{className:"block md:hidden",children:S.jsx(f,{onPressMicButton:p})}),S.jsxs("div",{className:"hidden md:block",children:[S.jsx(f,{onPressMicButton:p,className:"md:!right-12"}),S.jsx(o,{onSubmitButton:z,isDisabled:v,className:"md:!right-3"})]})]}):null;return S.jsxs("div",{style:{display:"flex",flexDirection:"column"},className:`${e.classNameContainer} w-full`,children:[S.jsxs("div",{style:{display:"flex",flexDirection:"column"},children:[S.jsx("label",{...w,className:e.classNameLabel,children:s}),S.jsx("textarea",{..._,ref:y,className:`${e.classNameTextarea} p-3 ${K?"pr-12 md:pr-24":"pr-12"}`,onChange:k,value:t,rows:1,style:{overflow:"hidden",outlineColor:"#a8a8a8",border:"none",outline:"none",width:K?"calc(100% - 72px)":"calc(100% - 30px)",resize:"none"},onKeyDown:N,onKeyUp:L})]}),Q()]})},dx=({onSubmitButton:e,isDisabled:t,className:n})=>S.jsx("div",{children:S.jsx("button",{className:`absolute
78
86
  bg-violet-600
79
87
  md:bottom-2
80
88
  md:right-3
81
89
  dark:hover:bg-white
82
90
  right-2
83
91
  bottom-1.5
84
- disabled:opacity-10
92
+ disabled:opacity-40
93
+ disabled:cursor-not-allowed
85
94
  disabled:text-gray-400
86
95
  enabled:bg-violet-600
87
96
  text-white
@@ -92,14 +101,14 @@ For more details see https://formatjs.io/docs/getting-started/message-distributi
92
101
  dark:bg-white
93
102
  transition-colors
94
103
  chatsystem-paperplane-button
95
- ${n??""}`,"data-testid":"send-button",onClick:e,disabled:t,type:"button","aria-label":"Send message",children:C.jsx("span",{className:"","data-state":"closed",children:C.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24","aria-hidden":"true",className:"text-white dark:text-black",children:[C.jsx("path",{d:"M3 20L21 12L3 4L7.5 12L3 20Z",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinejoin:"round"}),C.jsx("path",{d:"M7.5 12H14.75",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"})]})})})});var at=(e=>(e.FRENCH="fr-FR",e.ENGLISH="en-US",e))(at||{});const px={"generic.language.english":"English","generic.language.french":"French","chatbot.placeholder.content":"Message...","chatbot.DiscussionLimitReached.title":"Discussion limit reached","chatbot.DiscussionLimitReached.explaination":"The discussion has reached its maximum number of messages. Please start a new one.","chatbot.DiscussionLimitReached.cta":"Restart","chatbot.error.api.409":"Oups ! The discussion if full. Please start a new one.","chatbot.error.api.429":"⏳ The chatbot is a little busy at the time. Please try again later.","chatbot.error.api.500":"Oops ! There has been an error. Please try again later.","chatbot.chatline.label.user":"You","chatbot.chatline.label.assistant":"Assistant","chatbot.chatline.loading.function.genericSearchMessage":"Thinking ...","chatbot.chatline.loading.function.search":"Search","chatbot.chatline.loading.function.extractProductName":"Looking into the cavern","chatbot.chatline.loading.function.suggestProductName":"Consulting the shadocks","chatbot.chatline.loading.function.criteriaDefinition":"Looking for ziboublis","chatbot.chatline.loading.function.searchStock":"Searching Stock","chatbot.chatline.loading.function.step":"Step","chatbot.chatline.loading.stepName.search":"Searching ...","chatbot.chatline.loading.stepName.building":"Building Query ...","chatbot.chatline.loading.stepName.analyzing":"Analyzing ...","chatbot.chatline.loading.stepName.redacting":"Writing answer","chatbot.chatline.loading.cancel":"Cancel","chatbot.chatline.seeRecentMessages":"see recent messages","chatbot.widget.menu.open":"Open chat menu","chatbot.widget.menu.startNewDiscussion":"Start a new discussion","chatbot.widget.close":"Close chat","recordingOverlay.recording":"Recording...","recordingOverlay.cancel":"Cancel","recordingOverlay.explaination":"Tap the mic to stop","chatbot.infobanner.title":"You have an archived discussion.","chatbot.infobanner.cta":"See"},gx={"generic.language.english":"Anglais","generic.language.french":"Français","chatbot.placeholder.content":"Message...","chatbot.DiscussionLimitReached.title":"Maximum de messages envoyés atteint.","chatbot.DiscussionLimitReached.explaination":"Le robot est à son maximum et ne peut plus envoyer de message. Merci de relancer une conversation.","chatbot.DiscussionLimitReached.cta":"Relancer une nouvelle conversation","chatbot.error.api.409":"Oups ! La discussion est à son maximum. Merci d'en commencer une nouvelle.","chatbot.error.api.429":"⏳ Le robot est un peu occupé actuellement. Merci de réessayer plus tard.","chatbot.error.api.500":"Oups ! Une erreur est survenue. Merci de réessayer plus tard !","chatbot.chatline.label.user":"Vous","chatbot.chatline.label.assistant":"Assistant","chatbot.chatline.loading.function.search":"Recherche","chatbot.chatline.loading.function.genericSearchMessage":"Je réfléchis ...","chatbot.chatline.loading.function.extractProductName":"Recherche dans la caverne","chatbot.chatline.loading.function.suggestProductName":"Consultation des shadocks","chatbot.chatline.loading.function.criteriaDefinition":"Recherche des ziboublis","chatbot.chatline.loading.function.searchStock":"Recherche en stock","chatbot.chatline.loading.function.step":"Etape","chatbot.chatline.loading.stepName.search":"Recherche ...","chatbot.chatline.loading.stepName.building":"Construction ...","chatbot.chatline.loading.stepName.analyzing":"Analyse ...","chatbot.chatline.loading.stepName.redacting":"Rédaction","chatbot.chatline.loading.cancel":"Annuler","chatbot.chatline.seeRecentMessages":"voir les messages plus récents","chatbot.widget.menu.open":"Ouvrir le menu de discussion","chatbot.widget.menu.startNewDiscussion":"Démarrer une nouvelle discussion","chatbot.widget.close":"Fermer la discussion","recordingOverlay.recording":"Micro activé...","recordingOverlay.cancel":"Annuler","recordingOverlay.explaination":"Appuyez sur le micro pour arrêter","chatbot.infobanner.title":"Vous avez une conversation archivée.","chatbot.infobanner.cta":"Voir"},Gr={[at.ENGLISH]:{translatedText:px,pictureName:at.ENGLISH,langID:0,locale:at.ENGLISH},[at.FRENCH]:{translatedText:gx,pictureName:at.FRENCH,langID:1,locale:at.FRENCH}},bx=Object.keys(Gr);bx.reduce((e,t)=>{const n=Gr[t];return[...e,n]},[]);const Ex="languageSettings",xc=v.createContext({appCurrentLang:Gr[at.ENGLISH],setAppCurrentLang:()=>{}}),Tx=e=>/(\[.*|\!\[.*)$/.test(e),xx=e=>/\)/.test(e),yx=e=>e.filter(t=>t.userType==="user").length;var ra=(e=>(e.GET_DISCUSSION_ID="/id",e.RESET_DISCUSSION="/delete",e))(ra||{});const Ax=e=>!!e.startsWith("/"),_x=(e,t,n,r)=>e===ra.GET_DISCUSSION_ID?t?`Votre ID de discussion est ${t}`:"Votre ID de discussion n'est pas encore défini. Envoyez un premier message pour que ce soit le cas.":e===ra.RESET_DISCUSSION?(n(r),null):`La commande ${e} n'est pas prise en compte.`;class kt{static pending="";constructor(){}static transformNDJSONChunkIntoObjects(t){const n=Tt();this.pending+=t;const r=this.pending.split(/\r?\n/);this.pending=r.pop()??"";const i=[];for(const a of r){const s=a.trim();if(s)try{i.push(JSON.parse(s))}catch{n.warn("[NDJSON] Could not parse line:",s)}}return i}static flushPending(){const t=this.pending.trim();if(this.pending="",!t)return[];try{return[JSON.parse(t)]}catch{return[]}}static isObjectOutputstreamMessageDeltaDTO=t=>t.type===ke.OutputStreamTypesEnum.OUTPUT_STREAM_MESSAGE_DELTA;static isObjectOutputstreamMessageStartDTO=t=>t.type===ke.OutputStreamTypesEnum.OUTPUT_STREAM_MESSAGE_START;static isObjectOutputstreamMessageEndDTO=t=>t.type===ke.OutputStreamTypesEnum.OUTPUT_STREAM_MESSAGE_END;static isObjectOutputstreamErrorDTO=t=>t.type===ke.OutputStreamTypesEnum.OUTPUT_STREAM_ERROR;static isObjectOutputstreamLoadingNumberOfStepsDTO=t=>t.type===ke.OutputStreamTypesEnum.OUTPUT_STREAM_NUMBER_OF_STEPS_TYPE;static isObjectOutputstreamLoadingCurrentStepNumberDTO=t=>t.type===ke.OutputStreamTypesEnum.OUTPUT_STREAM_CURRENT_STEP_NUMBER_TYPE;static isObjectOutputstreamLoadingCurrentStepNameDTO=t=>t.type===ke.OutputStreamTypesEnum.OUTPUT_STREAM_CURRENT_STEP_NAME_TYPE;static containsObjectWithLastAnswerToTrue=t=>{for(const n of t)if(this.isObjectOutputstreamMessageEndDTO(n)&&n.isLastAnswer)return!0;return!1}}const yc=()=>{const e=Jt(),t=e.formatMessage({defaultMessage:"Search",id:"chatbot.chatline.loading.function.search"}),n=e.formatMessage({defaultMessage:"Looking into the cavern",id:"chatbot.chatline.loading.function.extractProductName"}),r=e.formatMessage({defaultMessage:"Consulting the shadocks",id:"chatbot.chatline.loading.function.suggestProductName"}),i=e.formatMessage({defaultMessage:"Looking for ziboublis",id:"chatbot.chatline.loading.function.criteriaDefinition"}),a=e.formatMessage({defaultMessage:"Searching Stock",id:"chatbot.chatline.loading.function.searchStock"}),s=e.formatMessage({defaultMessage:"Step",id:"chatbot.chatline.loading.function.step"}),o=e.formatMessage({defaultMessage:"I'm looking for products",id:"chatbot.chatline.loading.function.genericSearchMessage"}),u=e.formatMessage({defaultMessage:"Searching ...",id:"chatbot.chatline.loading.stepName.search"}),c=e.formatMessage({defaultMessage:"Building Query ...",id:"chatbot.chatline.loading.stepName.building"}),d=e.formatMessage({defaultMessage:"Analyzing ...",id:"chatbot.chatline.loading.stepName.analyzing"}),f=e.formatMessage({defaultMessage:"Writing answer",id:"chatbot.chatline.loading.stepName.redacting"}),m=e.formatMessage({defaultMessage:"Cancel",id:"chatbot.chatline.loading.cancel"}),h=e.formatMessage({defaultMessage:"see recent messages",id:"chatbot.chatline.seeRecentMessages"}),b=w=>w?w.includes("ExtractProductNames")?n:w.includes("SuggestProductNames")?r:w==="Recherche ..."?u:w==="Construction ..."?c:w==="Analyse ..."?d:w==="Rédaction"?f:w.includes("CreateCriteriasFromProductNames")||w.includes("CreateCriteriasOrProductNamesFromDiscussion")?i:w.includes("SearchStock")?a:"":t,A=b();return{searchTranslation:t,extractProductNameTranslation:n,criteriaDefinitionTranslation:i,searchStockTranslation:a,stepTranslation:s,getCurrentStepTranslated:b,defaultStartingStep:A,lookingForProductTranslation:o,cancelTranslation:m,recentMessagesTranslation:h}},Cx=({})=>{const{companySettings:e}=v.useContext(Pt);return C.jsx("div",{className:`search
104
+ ${n??""}`,"data-testid":"send-button",onClick:e,disabled:t,type:"button","aria-label":"Send message",children:S.jsx("span",{className:"","data-state":"closed",children:S.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24","aria-hidden":"true",className:"text-white dark:text-black",children:[S.jsx("path",{d:"M3 20L21 12L3 4L7.5 12L3 20Z",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinejoin:"round"}),S.jsx("path",{d:"M7.5 12H14.75",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"})]})})})});var ct=(e=>(e.FRENCH="fr-FR",e.ENGLISH="en-US",e))(ct||{});const fx={"generic.language.english":"English","generic.language.french":"French","chatbot.placeholder.content":"Message...","chatbot.DiscussionLimitReached.title":"Discussion limit reached","chatbot.DiscussionLimitReached.explaination":"The discussion has reached its maximum number of messages. Please start a new one.","chatbot.DiscussionLimitReached.cta":"Restart","chatbot.error.api.409":"Oups ! The discussion if full. Please start a new one.","chatbot.error.api.429":"⏳ The chatbot is a little busy at the time. Please try again later.","chatbot.error.api.500":"Oops ! There has been an error. Please try again later.","chatbot.chatline.label.user":"You","chatbot.chatline.label.assistant":"Assistant","chatbot.chatline.label.customerSupport":"Customer support","chatbot.chatline.loading.function.genericSearchMessage":"Thinking ...","chatbot.chatline.loading.function.search":"Search","chatbot.chatline.loading.function.extractProductName":"Looking into the cavern","chatbot.chatline.loading.function.suggestProductName":"Consulting the shadocks","chatbot.chatline.loading.function.criteriaDefinition":"Looking for ziboublis","chatbot.chatline.loading.function.searchStock":"Searching Stock","chatbot.chatline.loading.function.step":"Step","chatbot.chatline.loading.stepName.search":"Searching ...","chatbot.chatline.loading.stepName.building":"Building Query ...","chatbot.chatline.loading.stepName.analyzing":"Analyzing ...","chatbot.chatline.loading.stepName.redacting":"Writing answer","chatbot.chatline.loading.cancel":"Cancel","chatbot.chatline.seeRecentMessages":"see recent messages","chatbot.widget.menu.open":"Open chat menu","chatbot.widget.menu.startNewDiscussion":"Start a new discussion","chatbot.widget.close":"Close chat","recordingOverlay.recording":"Recording...","recordingOverlay.cancel":"Cancel","recordingOverlay.explaination":"Tap the mic to stop","chatbot.infobanner.title":"You have an archived discussion.","chatbot.infobanner.cta":"See","chatbot.customerSupport.connecting":"Transferring your request to customer support...","chatbot.customerSupport.connected":"Your request has been sent to Customer Support. It usually takes a few minutes to get a reply. Thank you for waiting.","chatbot.customerSupport.connectionError":"Customer support is not available right now. Please try again later.","chatbot.customerSupport.closed":"Your customer support conversation is now complete. Start a new conversation if you need more help!","chatbot.customerSupport.restart":"Restart","chatbot.customerSupport.fallback.title":"Leave your contact details","chatbot.customerSupport.fallback.description":"Customer support has not replied yet. Leave your email and phone number and we will contact you soon.","chatbot.customerSupport.fallback.email":"Email","chatbot.customerSupport.fallback.phone":"Phone","chatbot.customerSupport.fallback.submit":"Send","chatbot.customerSupport.fallback.submitting":"Sending...","chatbot.customerSupport.fallback.success":"Your contact details have been saved. Customer support will contact you soon.","chatbot.customerSupport.closedHours.title":"Customer support is currently closed","chatbot.customerSupport.closedHours.description":"Leave your email, phone number and request. Customer support will contact you during opening hours.","chatbot.customerSupport.closedHours.schedulePrefix":"Today:","chatbot.customerSupport.closedHours.reason":"Reason for your request","chatbot.customerSupport.closedHours.success":"Your request has been saved. Customer support will contact you during opening hours.","chatbot.customerSupport.fallback.error":"We could not save your contact details. Please try again."},hx={"generic.language.english":"Anglais","generic.language.french":"Français","chatbot.placeholder.content":"Message...","chatbot.DiscussionLimitReached.title":"Maximum de messages envoyés atteint.","chatbot.DiscussionLimitReached.explaination":"Le robot est à son maximum et ne peut plus envoyer de message. Merci de relancer une conversation.","chatbot.DiscussionLimitReached.cta":"Relancer une nouvelle conversation","chatbot.error.api.409":"Oups ! La discussion est à son maximum. Merci d'en commencer une nouvelle.","chatbot.error.api.429":"⏳ Le robot est un peu occupé actuellement. Merci de réessayer plus tard.","chatbot.error.api.500":"Oups ! Une erreur est survenue. Merci de réessayer plus tard !","chatbot.chatline.label.user":"Vous","chatbot.chatline.label.assistant":"Assistant","chatbot.chatline.label.customerSupport":"Support client","chatbot.chatline.loading.function.search":"Recherche","chatbot.chatline.loading.function.genericSearchMessage":"Je réfléchis ...","chatbot.chatline.loading.function.extractProductName":"Recherche dans la caverne","chatbot.chatline.loading.function.suggestProductName":"Consultation des shadocks","chatbot.chatline.loading.function.criteriaDefinition":"Recherche des ziboublis","chatbot.chatline.loading.function.searchStock":"Recherche en stock","chatbot.chatline.loading.function.step":"Etape","chatbot.chatline.loading.stepName.search":"Recherche ...","chatbot.chatline.loading.stepName.building":"Construction ...","chatbot.chatline.loading.stepName.analyzing":"Analyse ...","chatbot.chatline.loading.stepName.redacting":"Rédaction","chatbot.chatline.loading.cancel":"Annuler","chatbot.chatline.seeRecentMessages":"voir les messages plus récents","chatbot.widget.menu.open":"Ouvrir le menu de discussion","chatbot.widget.menu.startNewDiscussion":"Démarrer une nouvelle discussion","chatbot.widget.close":"Fermer la discussion","recordingOverlay.recording":"Micro activé...","recordingOverlay.cancel":"Annuler","recordingOverlay.explaination":"Appuyez sur le micro pour arrêter","chatbot.infobanner.title":"Vous avez une conversation archivée.","chatbot.infobanner.cta":"Voir","chatbot.customerSupport.connecting":"Transfert de votre demande au support client...","chatbot.customerSupport.connected":"Votre demande a été transmise au support client. Il faut généralement quelques minutes pour obtenir une réponse. Merci de patienter.","chatbot.customerSupport.connectionError":"Le support client n'est pas disponible pour le moment. Merci de réessayer plus tard.","chatbot.customerSupport.closed":"Votre échange avec le support client est terminé. Relancez une nouvelle conversation quand vous le souhaitez !","chatbot.customerSupport.restart":"Relancer","chatbot.customerSupport.fallback.title":"Laissez vos coordonnées","chatbot.customerSupport.fallback.description":"Le support client n'a pas encore répondu. Laissez votre email et votre téléphone, nous vous recontacterons prochainement.","chatbot.customerSupport.fallback.email":"Email","chatbot.customerSupport.fallback.phone":"Téléphone","chatbot.customerSupport.fallback.submit":"Envoyer","chatbot.customerSupport.fallback.submitting":"Envoi...","chatbot.customerSupport.fallback.success":"Vos coordonnées ont bien été notées. Le support client vous recontactera prochainement.","chatbot.customerSupport.closedHours.title":"Le support client est actuellement fermé","chatbot.customerSupport.closedHours.description":"Laissez votre email, votre téléphone et le motif de votre demande. Le support client vous recontactera pendant ses horaires d’ouverture.","chatbot.customerSupport.closedHours.schedulePrefix":"Aujourd’hui :","chatbot.customerSupport.closedHours.reason":"Motif de votre demande","chatbot.customerSupport.closedHours.success":"Votre demande a bien été enregistrée. Le support client vous recontactera pendant ses horaires d’ouverture.","chatbot.customerSupport.fallback.error":"Impossible d'enregistrer vos coordonnées. Merci de réessayer."},Jr={[ct.ENGLISH]:{translatedText:fx,pictureName:ct.ENGLISH,langID:0,locale:ct.ENGLISH},[ct.FRENCH]:{translatedText:hx,pictureName:ct.FRENCH,langID:1,locale:ct.FRENCH}},px=Object.keys(Jr);px.reduce((e,t)=>{const n=Jr[t];return[...e,n]},[]);const mx="languageSettings",qc=C.createContext({appCurrentLang:Jr[ct.ENGLISH],setAppCurrentLang:()=>{}}),gx=e=>e.filter(t=>t.userType==="user").length;var ba=(e=>(e.GET_DISCUSSION_ID="/id",e.RESET_DISCUSSION="/delete",e))(ba||{});const bx=e=>!!e.startsWith("/"),Ex=(e,t,n)=>e===ba.GET_DISCUSSION_ID?t?`Votre ID de discussion est ${t}`:"Votre ID de discussion n'est pas encore défini. Envoyez un premier message pour que ce soit le cas.":e===ba.RESET_DISCUSSION?(n(),null):`La commande ${e} n'est pas prise en compte.`;class kt{static pending="";constructor(){}static transformNDJSONChunkIntoObjects(t){const n=Ct();this.pending+=t;const r=this.pending.split(/\r?\n/);this.pending=r.pop()??"";const i=[];for(const a of r){const s=a.trim();if(s)try{i.push(JSON.parse(s))}catch{n.warn("[NDJSON] Could not parse line:",s)}}return i}static flushPending(){const t=this.pending.trim();if(this.pending="",!t)return[];try{return[JSON.parse(t)]}catch{return[]}}static isObjectOutputstreamMessageDeltaDTO=t=>t.type===oe.OutputStreamTypesEnum.OUTPUT_STREAM_MESSAGE_DELTA;static isObjectOutputstreamMessageStartDTO=t=>t.type===oe.OutputStreamTypesEnum.OUTPUT_STREAM_MESSAGE_START;static isObjectOutputstreamMessageEndDTO=t=>t.type===oe.OutputStreamTypesEnum.OUTPUT_STREAM_MESSAGE_END;static isObjectOutputstreamErrorDTO=t=>t.type===oe.OutputStreamTypesEnum.OUTPUT_STREAM_ERROR;static isObjectOutputstreamClientEventDTO=t=>t.type===oe.OutputStreamTypesEnum.OUTPUT_STREAM_CLIENT_EVENT;static isObjectOutputstreamLoadingNumberOfStepsDTO=t=>t.type===oe.OutputStreamTypesEnum.OUTPUT_STREAM_NUMBER_OF_STEPS_TYPE;static isObjectOutputstreamLoadingCurrentStepNumberDTO=t=>t.type===oe.OutputStreamTypesEnum.OUTPUT_STREAM_CURRENT_STEP_NUMBER_TYPE;static isObjectOutputstreamLoadingCurrentStepNameDTO=t=>t.type===oe.OutputStreamTypesEnum.OUTPUT_STREAM_CURRENT_STEP_NAME_TYPE;static containsObjectWithLastAnswerToTrue=t=>{for(const n of t)if(this.isObjectOutputstreamMessageEndDTO(n)&&n.isLastAnswer)return!0;return!1}}const Tx=e=>{if(!oe.isUnknownRecord(e))return;const t=oe.readOptionalNumber(e.timeoutMinutes)??oe.DIRECT_CHAT_CUSTOMER_SUPPORT_FALLBACK_CONTACT_CAPTURE_DEFAULT_TIMEOUT_MINUTES;return{enabled:e.enabled===!0,timeoutMinutes:Math.max(1,Math.min(120,Math.round(t))),requireEmail:e.requireEmail!==!1,requirePhone:e.requirePhone!==!1}},yx=e=>{if(oe.isUnknownRecord(e))return{enabled:e.enabled!==!1,requireEmail:e.requireEmail!==!1,requirePhone:e.requirePhone!==!1,requireReason:e.requireReason!==!1}},xx=e=>{if(!oe.isUnknownRecord(e))return null;const t=e;if(t.type!=="interactive_widget_request"||t.event!=="interactiveWidget.requested"||t.widgetType!==oe.INTERACTIVE_WIDGET_TYPES.directChatCustomerSupport||!oe.isUnknownRecord(t.payload))return null;const n=t.payload;if((oe.readOptionalString(n.mode)??"live_chat")==="closed_hours_contact_capture"){const s=oe.readOptionalString(n.reconnectToken),o=oe.readOptionalNumber(n.customerSupportSessionId),u=yx(n.closedHoursContactCapture);if(n.transport!=="none"||!s||!o||!u||!u.enabled)return null;const c=oe.isUnknownRecord(n.businessHours)?n.businessHours:{};return{mode:"closed_hours_contact_capture",transport:"none",reconnectToken:s,reconnectTokenExpiresAt:oe.readOptionalString(n.reconnectTokenExpiresAt),customerSupportSessionId:o,companyId:oe.readOptionalNumber(t.companyId),agentId:oe.readOptionalNullableNumber(t.agentId),discussionId:oe.readOptionalNullableNumber(t.discussionId)??null,toolcallId:oe.readOptionalNullableString(t.toolcallId),closedHoursContactCapture:u,businessHours:{timezone:oe.readOptionalString(c.timezone)??oe.DIRECT_CHAT_CUSTOMER_SUPPORT_DEFAULT_BUSINESS_HOURS_TIMEZONE,todayScheduleLabel:oe.readOptionalString(c.todayScheduleLabel)}}}if(n.transport!=="socket"||typeof n.socketUrl!="string")return null;const i=oe.readOptionalString(n.handoffToken),a=oe.readOptionalString(n.reconnectToken);return!i&&!a?null:{mode:"live_chat",transport:"socket",socketUrl:n.socketUrl,handoffToken:i,reconnectToken:a,reconnectTokenExpiresAt:oe.readOptionalString(n.reconnectTokenExpiresAt),customerSupportSessionId:oe.readOptionalNumber(n.customerSupportSessionId),companyId:oe.readOptionalNumber(t.companyId),agentId:oe.readOptionalNullableNumber(t.agentId),discussionId:oe.readOptionalNullableNumber(t.discussionId)??null,toolcallId:oe.readOptionalNullableString(t.toolcallId),fallbackContactCapture:Tx(n.fallbackContactCapture)}},Sx=e=>xx(e),_x=e=>{const t=Sx(e.payload);return t?{type:"customer_support_handoff_requested",payload:t}:{type:"unhandled_client_event",event:e}},Cx=e=>{const t=new URL(e);return t.protocol=t.protocol==="https:"?"wss:":"ws:",t},Ax=({apiUrl:e,handoff:t})=>(t.socketUrl.startsWith("ws://")||t.socketUrl.startsWith("wss://")?new URL(t.socketUrl):new URL(t.socketUrl,Cx(e))).toString(),wx=e=>{if(typeof e!="object"||e===null)return!1;const t=e;return["connected","customer_message_ack","provider_message","closed","error"].includes(t.type)};class Ix{socket;callbacks;url;appToken;handoffToken;isIntentionalClose=!1;constructor(t){this.callbacks=t.callbacks,this.url=Ax(t),this.appToken=t.appToken;const n=t.handoff.reconnectToken??t.handoff.handoffToken;if(!n)throw new Error("Customer support socket requires a reconnect token");this.handoffToken=n,this.socket=new WebSocket(this.url),this.socket.addEventListener("open",this.sendAuthMessage),this.socket.addEventListener("message",this.handleMessage),this.socket.addEventListener("close",this.handleClose),this.socket.addEventListener("error",this.handleTransportError)}sendAuthMessage=()=>{this.socket.send(JSON.stringify({type:"auth",appToken:this.appToken,handoffToken:this.handoffToken}))};sendCustomerMessage(t){if(this.socket.readyState!==WebSocket.OPEN){this.callbacks.onError?.({type:"error",message:"Customer support connection is not ready.",code:"CUSTOMER_SUPPORT_SOCKET_NOT_READY"});return}const n={type:"customer_message",text:t,clientMessageId:crypto.randomUUID()};this.socket.send(JSON.stringify(n))}close(t,n){if(this.isIntentionalClose=!0,this.socket.readyState===WebSocket.OPEN&&n?.notifyServer){const r={type:"close",reason:t};this.socket.send(JSON.stringify(r))}this.socket.close(1e3,t??"Customer support socket detached")}handleMessage=t=>{let n;try{n=JSON.parse(t.data)}catch{this.callbacks.onError?.({type:"error",message:"Customer support sent an invalid message.",code:"CUSTOMER_SUPPORT_SOCKET_INVALID_MESSAGE"});return}if(wx(n)){if(n.type==="connected"){this.callbacks.onConnected?.(n);return}if(n.type==="provider_message"){this.callbacks.onProviderMessage?.(n);return}if(n.type==="closed"){this.callbacks.onClosed?.(n);return}n.type==="error"&&this.callbacks.onError?.(n)}};handleClose=t=>{this.isIntentionalClose||this.callbacks.onClose?.(t)};handleTransportError=()=>{this.isIntentionalClose||(this.callbacks.onTransportError?.({readyState:this.socket.readyState,url:this.safeUrlForLogs()}),this.callbacks.onError?.({type:"error",message:"Customer support connection failed.",code:"CUSTOMER_SUPPORT_SOCKET_TRANSPORT_ERROR"}))};safeUrlForLogs(){const t=new URL(this.url);return t.searchParams.has("handoffToken")&&t.searchParams.set("handoffToken","<redacted>"),t.toString()}}const St={ai:"ai",customerSupport:"customer_support"},ei="chatsystem-widget",vx=1440*60*1e3;function gr(e){return typeof e=="string"&&!Number.isNaN(Date.parse(e))}function kx(e){return!(typeof e!="object"||e===null||typeof e.enabled!="boolean"||typeof e.timeoutMinutes!="number"||typeof e.requireEmail!="boolean"||typeof e.requirePhone!="boolean")}function Nx(e){return!(typeof e!="object"||e===null||typeof e.enabled!="boolean"||typeof e.requireEmail!="boolean"||typeof e.requirePhone!="boolean"||typeof e.requireReason!="boolean")}function Ox(e){if(typeof e!="object"||e===null||typeof e.discussionId!="number"||typeof e.reconnectToken!="string"||!gr(e.startedAt)||!gr(e.updatedAt)||e.reconnectTokenExpiresAt!==void 0&&!gr(e.reconnectTokenExpiresAt)||e.closedAt!==void 0&&!gr(e.closedAt)||e.closedReason!==void 0&&typeof e.closedReason!="string")return!1;const t=e.mode??"live_chat";return t==="closed_hours_contact_capture"?!(!["active","closed"].includes(e.status)||typeof e.customerSupportSessionId!="number"||!Nx(e.closedHoursContactCapture)||typeof e.businessHours!="object"||e.businessHours===null||typeof e.businessHours.timezone!="string"||e.businessHours.todayScheduleLabel!==void 0&&typeof e.businessHours.todayScheduleLabel!="string"):!(t!=="live_chat"||!["connecting","active","closed"].includes(e.status)||typeof e.socketUrl!="string"||e.customerSupportSessionId!==void 0&&typeof e.customerSupportSessionId!="number"||e.isWaitingForFirstProviderReply!==void 0&&typeof e.isWaitingForFirstProviderReply!="boolean"||e.fallbackContactCapture!==void 0&&!kx(e.fallbackContactCapture))}function Rx(e){return!(typeof e!="object"||e===null||e.userType!=="user"&&e.userType!=="assistant"||"content"in e&&e.content!==void 0&&typeof e.content!="string"||"metaData"in e&&e.metaData!==void 0&&(typeof e.metaData!="object"||e.metaData===null||"isErrorMessage"in e.metaData&&e.metaData.isErrorMessage!==void 0&&typeof e.metaData.isErrorMessage!="boolean"||"messageKind"in e.metaData&&e.metaData.messageKind!==void 0&&!["conversation","system"].includes(e.metaData.messageKind)||"systemEvent"in e.metaData&&e.metaData.systemEvent!==void 0&&!["customer_support_connecting","customer_support_connected","customer_support_closed","customer_support_connection_error"].includes(e.metaData.systemEvent)||"customerSupportAuthorName"in e.metaData&&e.metaData.customerSupportAuthorName!==void 0&&typeof e.metaData.customerSupportAuthorName!="string"))}function Lx(e){return!(typeof e!="object"||e===null||!Array.isArray(e.items)||!e.items.every(Rx)||e.discussionId!==null&&typeof e.discussionId!="number"||typeof e.updatedAt!="string"||Number.isNaN(Date.parse(e.updatedAt))||e.customerSupport!==void 0&&e.customerSupport!==null&&!Ox(e.customerSupport))}function Dx(e){const t=Ct();if(typeof window>"u")return;const n=e.key??ei,r={items:e.conversation.items,discussionId:e.conversation.discussionId,updatedAt:new Date().toISOString(),customerSupport:e.customerSupport??null};try{const i=JSON.stringify(r);window.localStorage.setItem(n,i)}catch(i){t.error("Failed to save chat state to localStorage",i)}}function Vc(e){const t=Ct();if(typeof window>"u")return null;const n=e?.key??ei,r=window.localStorage.getItem(n);if(!r)return null;try{const i=JSON.parse(r);return Lx(i)?i:(t.warn("Chat state in localStorage has unexpected shape, ignoring."),null)}catch(i){return t.error("Failed to parse chat state from localStorage",i),null}}function Px(e){if(typeof window>"u")return null;const t=ei;window.localStorage.removeItem(t)}const Wc=(e,t)=>{if(t===null)return"discussion_not_loaded";if(t!==e.discussionId)return"discussion_mismatch";if(e.status==="closed")return"session_closed";if(!e.reconnectToken)return"missing_reconnect_token";if(e.mode==="closed_hours_contact_capture")return null;if(!e.socketUrl)return"missing_socket_url";if(e.reconnectTokenExpiresAt){const n=Date.parse(e.reconnectTokenExpiresAt);if(Number.isNaN(n))return"invalid_reconnect_expiration";if(n<=Date.now())return"expired_reconnect_token"}return null},Mx=()=>{const e=Vc(),t=e?.customerSupport??null;if(!t)return{mode:St.ai,customerSupportState:null,reason:"no_customer_support_state"};const n=Wc(t,e?.discussionId??null);return n==="session_closed"?{mode:St.customerSupport,customerSupportState:t,reason:n}:n?{mode:St.ai,customerSupportState:null,reason:n}:{mode:St.customerSupport,customerSupportState:t,reason:"valid_reconnect_state"}},Xc=e=>e.mode!==St.customerSupport?!1:e.customerSupportState.status!=="closed",Za=e=>e.mode!==St.customerSupport?!1:e.customerSupportState.status==="closed",Ja=e=>e.mode!==St.customerSupport||e.customerSupportState.status==="closed"?!1:e.customerSupportState.mode==="closed_hours_contact_capture",Bx=e=>Ja(e)?"customer_support":Xc(e)?"customer_support_connecting":Za(e)?"customer_support":"ai",Fx=e=>Ja(e)?"idle":Xc(e)?"connecting":Za(e)?"closed":"idle",Hx=e=>Ja(e)?"visible":"idle",Ux=e=>e?.trim()||void 0,jx=e=>e.mode!==St.customerSupport||e.customerSupportState.status==="closed"||e.customerSupportState.mode==="closed_hours_contact_capture"?null:e.customerSupportState,Qc=e=>!!(e&&e.mode!=="closed_hours_contact_capture"),es=e=>e?.mode==="closed_hours_contact_capture",zx=e=>{if(e.isCustomerSupportMode&&e.isCurrentDiscussion&&Qc(e.state))return e.state.fallbackContactCapture},$x=e=>{if(e.isCustomerSupportMode&&e.isCurrentDiscussion&&es(e.state))return e.state.closedHoursContactCapture},Yx=e=>{if(e.isCustomerSupportMode&&e.isCurrentDiscussion&&es(e.state))return e.state.businessHours},Gx=e=>e.isCustomerSupportMode?e.chatTransportMode==="customer_support_connecting"?"customer_support_connecting":e.isCurrentDiscussion?es(e.state)?"customer_support_closed_hours_form":e.socketStatus!=="connected"?`socket_${e.socketStatus}`:e.isWaitingForFirstProviderReply?"waiting_first_provider_reply":e.isCustomerSupportClosed?"customer_support_closed":null:e.currentDiscussionId===null?"discussion_not_loaded":"discussion_mismatch":null;function qx({appToken:e,currentConversation:t,loadingStatus:n,labels:r,logger:i,setCurrentConversationId:a,setLoadingStatus:s,addMessageToCurrentConversation:o,onCustomerSupportOperatorMessage:u,chatboxBootState:c,resetConversationRequestId:d}){const f=c,[p,h]=C.useState(()=>Bx(f)),[b,y]=C.useState(f.customerSupportState),[w,_]=C.useState(()=>Fx(f)),[k,N]=C.useState("idle"),[L,A]=C.useState(()=>Hx(f)),v=C.useRef(null),z=C.useRef(d),K=C.useRef(!1),Q=C.useRef(null),I=C.useRef(jx(f)),H=C.useRef(Za(f)),$=C.useRef(!1),P=p!=="ai",j=b?.discussionId===t.discussionId,X=P&&b?.status==="closed",Ee=X||P&&w==="failed",pe=!!(P&&j&&b?.mode!=="closed_hours_contact_capture"&&b?.isWaitingForFirstProviderReply),Oe={isCustomerSupportMode:P,isCurrentDiscussion:j,state:b},ke=zx(Oe),m=$x(Oe),Y=Yx(Oe),ee=!!ke?.enabled&&["visible","submitting","submitted","failed"].includes(k),T=!!m?.enabled&&["visible","submitting","submitted","failed"].includes(L),W=Gx({chatTransportMode:p,currentDiscussionId:t.discussionId,isCustomerSupportClosed:X,isCustomerSupportMode:P,isCurrentDiscussion:j,isWaitingForFirstProviderReply:pe,socketStatus:w,state:b}),ne=W!==null;C.useEffect(()=>{if(n!=="notLoading"||t.items.length===0)return;const V=j?b:null;!t.discussionId&&!V||Dx({conversation:t,customerSupport:V})},[n,t,b,j]),C.useEffect(()=>($.current=!1,()=>{$.current=!0,v.current?.close("Widget unmounted"),v.current=null}),[]);const q=(V,Te,te)=>{o({userType:"assistant",content:V,metaData:{messageKind:"system",systemEvent:Te,...te},temporaryId:crypto.randomUUID()})},se=(V,Te)=>{o({userType:"assistant",content:V,metaData:{messageKind:"conversation",authorType:"customer_support_operator",...Te},temporaryId:crypto.randomUUID()})},re=V=>{v.current?.close(V),v.current=null},le=()=>{Q.current=null,I.current=null,H.current=!1,y(null),_("idle"),h("ai")},ie=V=>{re(V),le()};C.useEffect(()=>{z.current!==d&&(z.current=d,K.current=!0,ie("Starting new conversation"))},[d]),C.useEffect(()=>{t.discussionId===null&&K.current&&b===null&&p==="ai"&&(K.current=!1)},[p,t.discussionId,b]);const Ae=V=>{H.current||(H.current=!0,Q.current=null,v.current=null,V?.discussionId&&a(V.discussionId),s("notLoading"),_("closed"),h("customer_support"),y(Te=>{if(!Te)return Te;const te=new Date().toISOString();return{...Te,status:"closed",discussionId:V?.discussionId??Te.discussionId,updatedAt:te,closedAt:V?.closedAt??te,closedReason:V?.reason,isWaitingForFirstProviderReply:!1}}))},G=(V,Te)=>{v.current&&re("Replacing customer support socket"),_("connecting");let te=!1;v.current=new Ix({apiUrl:xt.getApiUrl(),appToken:e,handoff:V,callbacks:{onConnected:ce=>{const fe=V.reconnectToken??V.handoffToken;if(!fe){Ae({reason:"Missing reconnect token"});return}te=!0,Te?.isStoredReconnect&&(I.current=null);const _e=new Date().toISOString();a(ce.discussionId),_("connected"),h("customer_support"),s("notLoading"),y(R=>{const B=Qc(R)?R:null;return{mode:"live_chat",status:"active",discussionId:ce.discussionId,socketUrl:V.socketUrl,reconnectToken:fe,reconnectTokenExpiresAt:ce.reconnectTokenExpiresAt??V.reconnectTokenExpiresAt,customerSupportSessionId:ce.customerSupportSessionId??V.customerSupportSessionId,provider:B?.provider,isWaitingForFirstProviderReply:B?.isWaitingForFirstProviderReply??!0,fallbackContactCapture:B?.fallbackContactCapture,startedAt:B?.startedAt??_e,updatedAt:_e}}),Te?.addConnectedMessage!==!1&&q(r.connected,"customer_support_connected")},onProviderMessage:ce=>{N(fe=>fe==="submitted"?fe:"idle"),y(fe=>!fe||fe.mode==="closed_hours_contact_capture"?fe:{...fe,status:"active",provider:ce.provider??fe.provider,reconnectTokenExpiresAt:ce.reconnectTokenExpiresAt??fe.reconnectTokenExpiresAt,isWaitingForFirstProviderReply:!1,updatedAt:new Date().toISOString()}),se(ce.text,{customerSupportAuthorName:Ux(ce.authorName),customerSupportProvider:ce.provider}),u?.()},onClosed:ce=>{Ae({reason:ce.reason,closedAt:ce.closedAt,discussionId:ce.discussionId})},onError:()=>{_("failed"),q(r.connectionError,"customer_support_connection_error",{isErrorMessage:!0}),s("notLoading")},onClose:ce=>{if(!($.current||H.current)){if(!te){_("failed");return}Ae({reason:ce.reason||void 0})}},onTransportError:ce=>{i.error(`Customer support socket transport error readyState=${ce.readyState} url=${ce.url}`)}}})};C.useEffect(()=>{const V=I.current;if(!V)return;const Te=Wc(V,t.discussionId);if(Te!=="discussion_not_loaded"){if(Te==="session_closed"){I.current=null,_("closed"),h("customer_support");return}if(Te){I.current=null,y(te=>te?.discussionId===t.discussionId?te:null),_("idle"),h("ai");return}v.current||(_("connecting"),h("customer_support_connecting"),G({mode:"live_chat",transport:"socket",socketUrl:V.socketUrl,reconnectToken:V.reconnectToken,reconnectTokenExpiresAt:V.reconnectTokenExpiresAt,customerSupportSessionId:V.customerSupportSessionId,discussionId:V.discussionId,fallbackContactCapture:V.fallbackContactCapture},{addConnectedMessage:!1,isStoredReconnect:!0}))}},[t.discussionId]);const De=V=>{if(V.mode==="closed_hours_contact_capture"){Rt(V);return}const Te=V.reconnectToken??V.handoffToken;if(!V.discussionId||!Te){q(r.connectionError,"customer_support_connection_error",{isErrorMessage:!0});return}const te=new Date().toISOString();Q.current=V,H.current=!1,y({mode:"live_chat",status:"connecting",discussionId:V.discussionId,socketUrl:V.socketUrl,reconnectToken:Te,reconnectTokenExpiresAt:V.reconnectTokenExpiresAt,customerSupportSessionId:V.customerSupportSessionId,isWaitingForFirstProviderReply:!0,fallbackContactCapture:V.fallbackContactCapture,startedAt:te,updatedAt:te}),_("connecting"),h("customer_support_connecting"),q(r.connecting,"customer_support_connecting")},Fe=()=>{const V=Q.current;!V||V.mode!=="live_chat"||(Q.current=null,G(V))},Ve=V=>p!=="customer_support"||w!=="connected"||!j||!v.current?(q(r.connectionError,"customer_support_connection_error",{isErrorMessage:!0}),!1):(v.current.sendCustomerMessage(V),!0);C.useEffect(()=>{if(!ke?.enabled||!pe||!j||w!=="connected"||k!=="idle")return;const V=Math.max(1,ke.timeoutMinutes)*60*1e3,Te=window.setTimeout(()=>{N("visible")},V);return()=>window.clearTimeout(Te)},[ke,k,j,pe,w]);const et=async({email:V,phone:Te})=>{if(!b?.customerSupportSessionId||!b.reconnectToken)return!1;N("submitting");const te=`${xt.getApiUrl()}/customer-support/sessions/${b.customerSupportSessionId}/fallback-contact`;return(await fetch(te,xt.getFetchConfig({httpVerb:"POST",contentType:"application/json",body:{reconnectToken:b.reconnectToken,reasonType:"fallback_no_reply",email:V,phone:Te}}))).ok?(N("submitted"),re("Fallback contact submitted"),Ae({reason:"fallback_contact_submitted",discussionId:b.discussionId}),!0):(N("failed"),!1)},Rt=V=>{if(!V.discussionId){q(r.connectionError,"customer_support_connection_error",{isErrorMessage:!0});return}const Te=new Date().toISOString();Q.current=null,H.current=!1,re("Closed-hours contact capture"),y({mode:"closed_hours_contact_capture",status:"active",discussionId:V.discussionId,reconnectToken:V.reconnectToken,reconnectTokenExpiresAt:V.reconnectTokenExpiresAt,customerSupportSessionId:V.customerSupportSessionId,closedHoursContactCapture:V.closedHoursContactCapture,businessHours:V.businessHours,startedAt:Te,updatedAt:Te}),_("idle"),h("customer_support"),s("notLoading"),A("visible")},Be=async({email:V,phone:Te,reason:te})=>{if(b?.mode!=="closed_hours_contact_capture")return!1;A("submitting");const ce=xt.getApiUrl()+"/customer-support/sessions/"+b.customerSupportSessionId+"/fallback-contact";return(await fetch(ce,xt.getFetchConfig({httpVerb:"POST",contentType:"application/json",body:{reconnectToken:b.reconnectToken,reasonType:"closed_hours",email:V,phone:Te,reason:te}}))).ok?(A("submitted"),Ae({reason:"closed_hours_contact_submitted",discussionId:b.discussionId}),!0):(A("failed"),!1)};return C.useEffect(()=>{if(P&&b&&b.status!=="closed"&&t.discussionId!==b.discussionId&&t.discussionId===null){if(K.current)return;a(b.discussionId);return}},[t.discussionId,b,P,w,a]),{chatTransportMode:p,socketStatus:w,isCustomerSupportMode:P,isCustomerSupportClosed:X,isCustomerSupportUnavailable:Ee,isCustomerSupportInputDisabled:ne,customerSupportInputDisabledReason:W,enterCustomerSupportMode:De,flushPendingCustomerSupportHandoff:Fe,sendToCustomerSupport:Ve,resetCustomerSupport:ie,fallbackContactCaptureConfig:ke,fallbackContactCaptureStatus:k,shouldDisplayFallbackContactCapture:ee,submitFallbackContactCapture:et,closedHoursContactCaptureConfig:m,closedHoursBusinessHours:Y,closedHoursContactCaptureStatus:L,shouldDisplayClosedHoursContactCapture:T,submitClosedHoursContactCapture:Be}}const Kc=()=>{const e=an(),t=e.formatMessage({defaultMessage:"Search",id:"chatbot.chatline.loading.function.search"}),n=e.formatMessage({defaultMessage:"Looking into the cavern",id:"chatbot.chatline.loading.function.extractProductName"}),r=e.formatMessage({defaultMessage:"Consulting the shadocks",id:"chatbot.chatline.loading.function.suggestProductName"}),i=e.formatMessage({defaultMessage:"Looking for ziboublis",id:"chatbot.chatline.loading.function.criteriaDefinition"}),a=e.formatMessage({defaultMessage:"Searching Stock",id:"chatbot.chatline.loading.function.searchStock"}),s=e.formatMessage({defaultMessage:"Step",id:"chatbot.chatline.loading.function.step"}),o=e.formatMessage({defaultMessage:"I'm looking for products",id:"chatbot.chatline.loading.function.genericSearchMessage"}),u=e.formatMessage({defaultMessage:"Searching ...",id:"chatbot.chatline.loading.stepName.search"}),c=e.formatMessage({defaultMessage:"Building Query ...",id:"chatbot.chatline.loading.stepName.building"}),d=e.formatMessage({defaultMessage:"Analyzing ...",id:"chatbot.chatline.loading.stepName.analyzing"}),f=e.formatMessage({defaultMessage:"Writing answer",id:"chatbot.chatline.loading.stepName.redacting"}),p=e.formatMessage({defaultMessage:"Cancel",id:"chatbot.chatline.loading.cancel"}),h=e.formatMessage({defaultMessage:"see recent messages",id:"chatbot.chatline.seeRecentMessages"}),b=w=>w?w.includes("ExtractProductNames")?n:w.includes("SuggestProductNames")?r:w==="Recherche ..."?u:w==="Construction ..."?c:w==="Analyse ..."?d:w==="Rédaction"?f:w.includes("CreateCriteriasFromProductNames")||w.includes("CreateCriteriasOrProductNamesFromDiscussion")?i:w.includes("SearchStock")?a:"":t,y=b();return{searchTranslation:t,extractProductNameTranslation:n,criteriaDefinitionTranslation:i,searchStockTranslation:a,stepTranslation:s,getCurrentStepTranslated:b,defaultStartingStep:y,lookingForProductTranslation:o,cancelTranslation:p,recentMessagesTranslation:h}},Vx=({})=>{const{companySettings:e}=C.useContext(nn);return S.jsx("div",{className:`search
96
105
  transition
97
106
  ease-in-out
98
107
  delay-50
99
108
  flex
100
109
  justify-center
101
110
  items-center
102
- `,children:C.jsx(ua,{facet:e.agent.display[ke.AgentDisplayFacetRoleType.SEARCH]})})},Sx=({loadingStatus:e,currentStepName:t,currentStepNumber:n,numberOfSteps:r})=>{const{getCurrentStepTranslated:i,stepTranslation:a,lookingForProductTranslation:s}=yc();return C.jsx(C.Fragment,{children:e==="loadingIntermediaryStates"&&C.jsxs("div",{children:[C.jsxs("div",{children:[C.jsx("p",{className:"text-center my-2 text-lg",children:s}),C.jsx("p",{className:"text-center my-1 text-md",children:t&&`${i(t)}`}),n&&C.jsxs("p",{className:"text-center my-2",children:[a,C.jsx("span",{children:" "}),n,"/",r]})]}),C.jsx("div",{className:"flex justify-center",children:C.jsx(Cx,{})})]})})},wx=({onPressLoadingButton:e})=>C.jsx("div",{children:C.jsx("button",{className:`
111
+ `,children:S.jsx(Sa,{facet:e.agent.display[oe.AgentDisplayFacetRoleType.SEARCH]})})},Wx=({loadingStatus:e,currentStepName:t,currentStepNumber:n,numberOfSteps:r})=>{const{getCurrentStepTranslated:i,stepTranslation:a,lookingForProductTranslation:s}=Kc();return S.jsx(S.Fragment,{children:e==="loadingIntermediaryStates"&&S.jsxs("div",{children:[S.jsxs("div",{children:[S.jsx("p",{className:"text-center my-2 text-lg",children:s}),S.jsx("p",{className:"text-center my-1 text-md",children:t&&`${i(t)}`}),n&&S.jsxs("p",{className:"text-center my-2",children:[a,S.jsx("span",{children:" "}),n,"/",r]})]}),S.jsx("div",{className:"flex justify-center",children:S.jsx(Vx,{})})]})})},Xx=({onPressLoadingButton:e})=>S.jsx("div",{children:S.jsx("button",{className:`
103
112
  absolute
104
113
  bg-white
105
114
  md:bottom-2
@@ -110,13 +119,13 @@ For more details see https://formatjs.io/docs/getting-started/message-distributi
110
119
  disabled:opacity-10
111
120
  disabled:text-gray-400
112
121
  enabled:bg-white
113
- text-white p-0.5 border border-white rounded-lg dark:border-white dark:bg-white transition-colors chatsystem-stop-button`,"data-testid":"send-button",onClick:e,type:"button",style:{outline:"none"},tabIndex:-1,onMouseDown:t=>t.preventDefault(),onKeyDown:t=>{(t.key==="Enter"||t.key===" ")&&t.preventDefault()},onKeyUp:t=>{(t.key==="Enter"||t.key===" ")&&t.preventDefault()},children:C.jsx("span",{className:"","data-state":"closed",children:C.jsxs("svg",{fill:"#000000",height:"24",width:"24",version:"1.1",id:"Capa_1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 297 297",children:[C.jsx("g",{id:"SVGRepo_bgCarrier",strokeWidth:"0"}),C.jsx("g",{id:"SVGRepo_tracerCarrier",strokeLinecap:"round",strokeLinejoin:"round"}),C.jsxs("g",{id:"SVGRepo_iconCarrier",children:[" ",C.jsx("path",{d:"M148.5,0C66.486,0,0,66.486,0,148.5S66.486,297,148.5,297S297,230.514,297,148.5S230.514,0,148.5,0z M213.292,190.121 c0,12.912-10.467,23.379-23.378,23.379H106.67c-12.911,0-23.378-10.467-23.378-23.379v-83.242c0-12.912,10.467-23.379,23.378-23.379 h83.244c12.911,0,23.378,10.467,23.378,23.379V190.121z"})," "]})]})})})}),vx=e=>{const t=v.useRef(null),[n,r]=v.useState(!1),i=v.useRef(!0),a=v.useRef(!1),s=v.useRef(0),o=()=>{const d=t.current,f=4;if(d){d.scrollTop<s.current-1&&(a.current=!1);const h=d.scrollHeight>d.clientHeight,b=d.scrollHeight-d.scrollTop<=d.clientHeight+f;r(h&&!b),i.current=b,s.current=d.scrollTop}},u=({smooth:d=!1,sticky:f=!1})=>{const m=t.current;f?(a.current=!0,i.current=!0):m&&m.scrollTo({top:m.scrollHeight,behavior:d?"smooth":"auto"}),m&&a.current&&m.scrollTo({top:m.scrollHeight,behavior:d?"smooth":"auto"})};return v.useEffect(()=>{o()},[e.length]),v.useEffect(()=>{const d=t.current;if(d)return d.addEventListener("scroll",o),o(),()=>{d.removeEventListener("scroll",o)}},[]),v.useLayoutEffect(()=>{a.current&&u({smooth:!1})},[e.length]),{scrollToBottom:u,removeStickyNess:()=>{a.current=!1},messagesContainerRef:t,showScrollButton:n}},Ix=()=>{const e=Jt(),t=e.formatMessage({defaultMessage:"Discussion limit reached",id:"chatbot.DiscussionLimitReached.title"}),n=e.formatMessage({defaultMessage:"The discussion has reached its maximum number of messages. Please start a new one.",id:"chatbot.DiscussionLimitReached.explaination"}),r=e.formatMessage({defaultMessage:"Restart",id:"chatbot.DiscussionLimitReached.cta"});return{DiscussionLimitReachedTitleTranslation:t,DiscussionLimitReachedExplainationTranslation:n,DiscussionLimitReachedCtaTranslation:r}},Nx=e=>Be.createElement("svg",{width:"800px",height:"800px",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},Be.createElement("g",{clipPath:"url(#clip0_1276_7761)"},Be.createElement("path",{d:"M19.7285 10.9288C20.4413 13.5978 19.7507 16.5635 17.6569 18.6573C15.1798 21.1344 11.4826 21.6475 8.5 20.1966M18.364 8.05071L17.6569 7.3436C14.5327 4.21941 9.46736 4.21941 6.34316 7.3436C3.42964 10.2571 3.23318 14.8588 5.75376 18M18.364 8.05071H14.1213M18.364 8.05071V3.80807",stroke:"#1C274C",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),Be.createElement("defs",null,Be.createElement("clipPath",{id:"clip0_1276_7761"},Be.createElement("rect",{width:24,height:24,fill:"white"})))),kx=({resetDiscussion:e,companySettings:t})=>{const{DiscussionLimitReachedCtaTranslation:n,DiscussionLimitReachedExplainationTranslation:r,DiscussionLimitReachedTitleTranslation:i}=Ix();return C.jsx(C.Fragment,{children:C.jsx("div",{className:"px-3 mt-4",children:C.jsxs("div",{role:"status","aria-live":"polite",className:"info-banner not-prose flex items-start gap-3 rounded-lg bg-blue-50 border-l-4 border-blue-500 p-4 shadow-sm",children:[C.jsx("div",{className:"flex flex-col justify-center items-center mx-3",children:C.jsx("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",className:"!w-5 !h-5 mt-0.5 flex-shrink-0 pointer-events-none",children:C.jsx("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16Zm.75-11.5a.75.75 0 10-1.5 0 .75.75 0 001.5 0ZM9 8.75A.75.75 0 019.75 8h.5a.75.75 0 01.75.75v5a.75.75 0 01-.75.75h-.5A.75.75 0 019 13.75v-5Z",clipRule:"evenodd"})})}),C.jsxs("div",{className:"flex-1 min-w-0",children:[C.jsx("p",{className:"font-semibold",children:i}),C.jsx("p",{className:"text-sm break-words",children:r}),C.jsx("div",{className:"my-2",children:C.jsxs("button",{type:"button",onClick:()=>e(t),title:n,"aria-label":n,className:`group inline-flex items-center gap-2 rounded-full px-3 py-1.5
122
+ text-white p-0.5 border border-white rounded-lg dark:border-white dark:bg-white transition-colors chatsystem-stop-button`,"data-testid":"send-button",onClick:e,type:"button",style:{outline:"none"},tabIndex:-1,onMouseDown:t=>t.preventDefault(),onKeyDown:t=>{(t.key==="Enter"||t.key===" ")&&t.preventDefault()},onKeyUp:t=>{(t.key==="Enter"||t.key===" ")&&t.preventDefault()},children:S.jsx("span",{className:"","data-state":"closed",children:S.jsxs("svg",{fill:"#000000",height:"24",width:"24",version:"1.1",id:"Capa_1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 297 297",children:[S.jsx("g",{id:"SVGRepo_bgCarrier",strokeWidth:"0"}),S.jsx("g",{id:"SVGRepo_tracerCarrier",strokeLinecap:"round",strokeLinejoin:"round"}),S.jsxs("g",{id:"SVGRepo_iconCarrier",children:[" ",S.jsx("path",{d:"M148.5,0C66.486,0,0,66.486,0,148.5S66.486,297,148.5,297S297,230.514,297,148.5S230.514,0,148.5,0z M213.292,190.121 c0,12.912-10.467,23.379-23.378,23.379H106.67c-12.911,0-23.378-10.467-23.378-23.379v-83.242c0-12.912,10.467-23.379,23.378-23.379 h83.244c12.911,0,23.378,10.467,23.378,23.379V190.121z"})," "]})]})})})}),Qx=e=>{const t=C.useRef(null),[n,r]=C.useState(!1),i=C.useRef(!0),a=C.useRef(!1),s=C.useRef(0),o=()=>{const d=t.current,f=4;if(d){d.scrollTop<s.current-1&&(a.current=!1);const h=d.scrollHeight>d.clientHeight,b=d.scrollHeight-d.scrollTop<=d.clientHeight+f;r(h&&!b),i.current=b,s.current=d.scrollTop}},u=({smooth:d=!1,sticky:f=!1})=>{const p=t.current;f?(a.current=!0,i.current=!0):p&&p.scrollTo({top:p.scrollHeight,behavior:d?"smooth":"auto"}),p&&a.current&&p.scrollTo({top:p.scrollHeight,behavior:d?"smooth":"auto"})};return C.useEffect(()=>{o()},[e.length]),C.useEffect(()=>{const d=t.current;if(d)return d.addEventListener("scroll",o),o(),()=>{d.removeEventListener("scroll",o)}},[]),C.useLayoutEffect(()=>{a.current&&u({smooth:!1})},[e.length]),{scrollToBottom:u,removeStickyNess:()=>{a.current=!1},messagesContainerRef:t,showScrollButton:n}},Kx=()=>{const e=an(),t=e.formatMessage({defaultMessage:"Discussion limit reached",id:"chatbot.DiscussionLimitReached.title"}),n=e.formatMessage({defaultMessage:"The discussion has reached its maximum number of messages. Please start a new one.",id:"chatbot.DiscussionLimitReached.explaination"}),r=e.formatMessage({defaultMessage:"Restart",id:"chatbot.DiscussionLimitReached.cta"});return{DiscussionLimitReachedTitleTranslation:t,DiscussionLimitReachedExplainationTranslation:n,DiscussionLimitReachedCtaTranslation:r}},Zx=e=>ze.createElement("svg",{width:"800px",height:"800px",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},ze.createElement("g",{clipPath:"url(#clip0_1276_7761)"},ze.createElement("path",{d:"M19.7285 10.9288C20.4413 13.5978 19.7507 16.5635 17.6569 18.6573C15.1798 21.1344 11.4826 21.6475 8.5 20.1966M18.364 8.05071L17.6569 7.3436C14.5327 4.21941 9.46736 4.21941 6.34316 7.3436C3.42964 10.2571 3.23318 14.8588 5.75376 18M18.364 8.05071H14.1213M18.364 8.05071V3.80807",stroke:"#1C274C",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),ze.createElement("defs",null,ze.createElement("clipPath",{id:"clip0_1276_7761"},ze.createElement("rect",{width:24,height:24,fill:"white"})))),Jx=({onReset:e})=>{const{DiscussionLimitReachedCtaTranslation:t,DiscussionLimitReachedExplainationTranslation:n,DiscussionLimitReachedTitleTranslation:r}=Kx();return S.jsx(S.Fragment,{children:S.jsx("div",{className:"px-3 mt-4",children:S.jsxs("div",{role:"status","aria-live":"polite",className:"info-banner not-prose flex items-start gap-3 rounded-lg bg-blue-50 border-l-4 border-blue-500 p-4 shadow-sm",children:[S.jsx("div",{className:"flex flex-col justify-center items-center mx-3",children:S.jsx("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",className:"!w-5 !h-5 mt-0.5 flex-shrink-0 pointer-events-none",children:S.jsx("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16Zm.75-11.5a.75.75 0 10-1.5 0 .75.75 0 001.5 0ZM9 8.75A.75.75 0 019.75 8h.5a.75.75 0 01.75.75v5a.75.75 0 01-.75.75h-.5A.75.75 0 019 13.75v-5Z",clipRule:"evenodd"})})}),S.jsxs("div",{className:"flex-1 min-w-0",children:[S.jsx("p",{className:"font-semibold",children:r}),S.jsx("p",{className:"text-sm break-words",children:n}),S.jsx("div",{className:"my-2",children:S.jsxs("button",{type:"button",onClick:e,title:t,"aria-label":t,className:`group inline-flex items-center gap-2 rounded-full px-3 py-1.5
114
123
  font-medium text-blue-700 dark:text-blue-300
115
124
  bg-blue-50/70 hover:bg-blue-100 dark:bg-blue-900/20 dark:hover:bg-blue-900/30
116
125
  ring-1 ring-inset ring-blue-600/20 hover:ring-blue-600/30
117
126
  shadow-sm transition-all duration-200
118
127
  focus:outline-none focus-visible:ring-2 focus-visible:ring-blue-600/50
119
- active:scale-[0.98]`,children:[C.jsx(Nx,{"aria-hidden":"true",className:"w-5 h-5 transition-transform duration-200 group-hover:rotate-180"}),C.jsx("span",{children:n})]})})]})]})})})},Ox=({onClick:e,label:t="voir les messages plus récents",className:n})=>{const[r,i]=v.useState(!1);return v.useEffect(()=>{const a=requestAnimationFrame(()=>i(!0));return()=>cancelAnimationFrame(a)},[]),C.jsx("button",{onClick:e,className:["absolute z-10 select-none outline-none","bottom-20 right-8 left-auto translate-x-0 top-auto","transition-all duration-300 ease-out",r?"opacity-100 translate-y-0":"opacity-0 -translate-y-1",n??""].join(" "),"aria-label":t,title:t,children:C.jsx("span",{className:["inline-flex items-center justify-center","w-9 h-9","rounded-full bg-white shadow-md","hover:shadow-lg transition-shadow","p-2"].join(" "),children:C.jsx(Do,{className:"w-4 h-4",fill:"#64748b"})})})},Ac="chatsystem-widget",Lx=1440*60*1e3;function Rx(e){return!(typeof e!="object"||e===null||e.userType!=="user"&&e.userType!=="assistant"||"content"in e&&e.content!==void 0&&typeof e.content!="string"||"metaData"in e&&e.metaData!==void 0&&(typeof e.metaData!="object"||e.metaData===null||"isErrorMessage"in e.metaData&&e.metaData.isErrorMessage!==void 0&&typeof e.metaData.isErrorMessage!="boolean"))}function Dx(e){return!(typeof e!="object"||e===null||!Array.isArray(e.items)||!e.items.every(Rx)||e.discussionId!==null&&typeof e.discussionId!="number"||typeof e.updatedAt!="string"||Number.isNaN(Date.parse(e.updatedAt)))}function Px(e){const t=Tt();if(typeof window>"u")return;const n=e.key??Ac,r={items:e.conversation.items,discussionId:e.conversation.discussionId,updatedAt:new Date().toISOString()};try{const i=JSON.stringify(r);window.localStorage.setItem(n,i)}catch(i){t.error("Failed to save chat state to localStorage",i)}}function Mx(e){const t=Tt();if(typeof window>"u")return null;const n=e?.key,r=window.localStorage.getItem(n);if(!r)return null;try{const i=JSON.parse(r);return Dx(i)?i:(t.warn("Chat state in localStorage has unexpected shape, ignoring."),null)}catch(i){return t.error("Failed to parse chat state from localStorage",i),null}}const _c=v.createContext({currentConversation:{items:[],discussionId:null},setCurrentConversation:()=>{},archivedConversation:{items:[],discussionId:null},setArchivedConversation:()=>{}}),Pa=()=>{const e=v.useContext(_c);if(!e)throw new Error("useChatbotConversation must be used within ChatbotInitialtextContext.Provider");const{currentConversation:t,setCurrentConversation:n,archivedConversation:r,setArchivedConversation:i}=e,a=y=>{n(_=>({..._,discussionId:y}))},s=y=>{n(_=>({..._,items:y}))},o=y=>{n(_=>({..._,items:[..._.items,y]}))},u=({messageStreamId:y,role:_})=>{n(S=>({...S,items:[...S.items,{userType:_,content:"",metaData:{messageStreamId:y},temporaryId:crypto.randomUUID()}]}))},c=()=>{n(y=>({...y,items:y.items.filter(_=>!(_.content?.length===0&&_.userType==="assistant"))}))},d=()=>{n(y=>{const _=[...y.items];return _.pop(),{...y,items:_}})},f=y=>{n(_=>({..._,updatedAt:y.updatedAt}))},m=y=>{n({discussionId:null,items:[{userType:"assistant",content:y?.agent?.text?.initialText,temporaryId:crypto.randomUUID()}],updatedAt:null})},h=()=>{i({discussionId:null,items:[],updatedAt:null})};return{currentConversation:t,setCurrentConversation:n,setCurrentConversationId:a,setCurrentConversationMetadata:f,resetConversation:m,setCurrentConversationItems:s,addMessageToCurrentConversation:o,removeEmptyAssistantMessageFromCurrentConversation:c,removeLastMessageFromCurrentConversation:d,updateCurrentConversationLastMessage:({newContent:y})=>{n(_=>{const S=[..._.items],D=S.length-1,I=S[D];return S[D]={...I,content:I.content=y},{..._,items:S}})},archivedConversation:r,setArchivedConversationAsMain:()=>{n(r),h()},addEmptyMessageToCurrentConversation:u,updateCurrentConversationMessageById:({newContent:y,id:_})=>{n(S=>{const D=[...S.items],I=D.findIndex(G=>G.metaData?.messageStreamId===_),N=D[I];return D[I]={...N,content:N.content=y},{...S,items:D}})}}},Bx=({message:e,actionLabel:t,onClick:n})=>C.jsxs("div",{className:"mt-3 flex items-start gap-2 rounded-md border border-sky-100 bg-sky-50 px-3 py-2 text-xs text-sky-900 shadow-sm",children:[C.jsx("div",{className:"mt-0.5 inline-flex h-4 w-4 items-center justify-center rounded-full bg-sky-500 text-[10px] font-semibold text-white",children:"i"}),C.jsxs("div",{className:"flex-1",children:[C.jsx("p",{className:"leading-snug",children:e}),C.jsx("button",{type:"button",onClick:n,className:"mt-1 inline-flex items-center text-[11px] font-medium text-sky-700 hover:text-sky-900 hover:underline",children:t})]})]}),Fx=({onPressMicButton:e,isDisabled:t,className:n})=>C.jsx("div",{children:C.jsx("button",{className:`absolute
128
+ active:scale-[0.98]`,children:[S.jsx(Zx,{"aria-hidden":"true",className:"w-5 h-5 transition-transform duration-200 group-hover:rotate-180"}),S.jsx("span",{children:t})]})})]})]})})})},eS=({onClick:e,label:t="voir les messages plus récents",className:n})=>{const[r,i]=C.useState(!1);return C.useEffect(()=>{const a=requestAnimationFrame(()=>i(!0));return()=>cancelAnimationFrame(a)},[]),S.jsx("button",{onClick:e,className:["absolute z-10 select-none outline-none","bottom-20 right-8 left-auto translate-x-0 top-auto","transition-all duration-300 ease-out",r?"opacity-100 translate-y-0":"opacity-0 -translate-y-1",n??""].join(" "),"aria-label":t,title:t,children:S.jsx("span",{className:["inline-flex items-center justify-center","w-9 h-9","rounded-full bg-white shadow-md","hover:shadow-lg transition-shadow","p-2"].join(" "),children:S.jsx(su,{className:"w-4 h-4",fill:"#64748b"})})})},Zc=C.createContext({currentConversation:{items:[],discussionId:null},setCurrentConversation:()=>{},archivedConversation:{items:[],discussionId:null},setArchivedConversation:()=>{},chatboxBootState:{mode:St.ai,customerSupportState:null,reason:"context_default"},setChatboxBootState:()=>{},resetConversationRequestId:0,resetConversation:()=>{}}),ts=()=>{const e=C.useContext(Zc);if(!e)throw new Error("useChatbotConversation must be used within ChatbotInitialtextContext.Provider");const{currentConversation:t,setCurrentConversation:n,archivedConversation:r,setArchivedConversation:i,chatboxBootState:a,setChatboxBootState:s,resetConversationRequestId:o,resetConversation:u}=e,c=L=>{n(A=>({...A,discussionId:L}))},d=L=>{n(A=>({...A,items:L}))},f=L=>{n(A=>({...A,items:[...A.items,L]}))},p=({messageStreamId:L,role:A})=>{n(v=>({...v,items:[...v.items,{userType:A,content:"",metaData:{messageStreamId:L},temporaryId:crypto.randomUUID()}]}))},h=()=>{n(L=>({...L,items:L.items.filter(A=>!(A.content?.length===0&&A.userType==="assistant"))}))},b=()=>{n(L=>{const A=[...L.items];return A.pop(),{...L,items:A}})},y=L=>{n(A=>({...A,updatedAt:L.updatedAt}))},w=()=>{i({discussionId:null,items:[],updatedAt:null})};return{currentConversation:t,setCurrentConversation:n,setCurrentConversationId:c,setCurrentConversationMetadata:y,resetConversation:u,setCurrentConversationItems:d,addMessageToCurrentConversation:f,removeEmptyAssistantMessageFromCurrentConversation:h,removeLastMessageFromCurrentConversation:b,updateCurrentConversationLastMessage:({newContent:L})=>{n(A=>{const v=[...A.items],z=v.length-1,K=v[z];return v[z]={...K,content:K.content=L},{...A,items:v}})},archivedConversation:r,chatboxBootState:a,setChatboxBootState:s,resetConversationRequestId:o,setArchivedConversationAsMain:()=>{n(r),w()},addEmptyMessageToCurrentConversation:p,updateCurrentConversationMessageById:({newContent:L,id:A})=>{n(v=>{const z=[...v.items],K=z.findIndex(I=>I.metaData?.messageStreamId===A),Q=z[K];return z[K]={...Q,content:Q.content=L},{...v,items:z}})}}},Wo=({message:e,actionLabel:t,onClick:n})=>S.jsxs("div",{className:"mt-3 flex items-start gap-2 rounded-md border border-sky-100 bg-sky-50 px-3 py-2 text-xs text-sky-900 shadow-sm",children:[S.jsx("div",{className:"mt-0.5 inline-flex h-4 w-4 items-center justify-center rounded-full bg-sky-500 text-[10px] font-semibold text-white",children:"i"}),S.jsxs("div",{className:"flex-1",children:[S.jsx("p",{className:"leading-snug",children:e}),S.jsx("button",{type:"button",onClick:n,className:"mt-1 inline-flex items-center text-[11px] font-medium text-sky-700 hover:text-sky-900 hover:underline",children:t})]})]}),tS=({config:e,status:t,labels:n,onSubmit:r})=>{const[i,a]=C.useState(""),[s,o]=C.useState(""),u=t==="submitting",c=t==="submitted";return S.jsx("div",{className:["customer-support-fallback",c?"customer-support-fallback--success":"",u?"customer-support-fallback--submitting":""].join(" "),children:c?S.jsxs("div",{className:"customer-support-fallback__success",children:[S.jsx("span",{className:"customer-support-fallback__check","aria-hidden":"true",children:"✓"}),S.jsx("p",{children:n.success})]}):S.jsxs("form",{className:"customer-support-fallback__form",onSubmit:async d=>{d.preventDefault(),await r({email:i,phone:s})},children:[S.jsxs("div",{className:"customer-support-fallback__copy",children:[S.jsx("strong",{children:n.title}),S.jsx("p",{children:n.description})]}),S.jsxs("div",{className:"customer-support-fallback__fields",children:[S.jsx("input",{type:"email",value:i,required:e.requireEmail,disabled:u,placeholder:n.email,"aria-label":n.email,onChange:d=>a(d.currentTarget.value)}),S.jsx("input",{type:"tel",value:s,required:e.requirePhone,disabled:u,placeholder:n.phone,"aria-label":n.phone,onChange:d=>o(d.currentTarget.value)})]}),t==="failed"&&S.jsx("p",{className:"customer-support-fallback__error",children:n.error}),S.jsxs("button",{className:"customer-support-fallback__submit",type:"submit",disabled:u,children:[u&&S.jsx("span",{className:"customer-support-fallback__spinner","aria-hidden":"true"}),S.jsx("span",{children:u?n.submitting:n.submit})]})]})})},nS=({config:e,status:t,scheduleLabel:n,labels:r,onSubmit:i})=>{const[a,s]=C.useState(""),[o,u]=C.useState(""),[c,d]=C.useState(""),f=t==="submitting",p=t==="submitted";return S.jsx("div",{className:["customer-support-fallback","customer-support-fallback--closed-hours",p?"customer-support-fallback--success":"",f?"customer-support-fallback--submitting":""].join(" "),children:p?S.jsxs("div",{className:"customer-support-fallback__success",children:[S.jsx("span",{className:"customer-support-fallback__check","aria-hidden":"true",children:"✓"}),S.jsx("p",{children:r.success})]}):S.jsxs("form",{className:"customer-support-fallback__form",onSubmit:async h=>{h.preventDefault(),await i({email:a,phone:o,reason:c})},children:[S.jsxs("div",{className:"customer-support-fallback__copy",children:[S.jsx("strong",{children:r.title}),S.jsx("p",{children:r.description}),n?S.jsxs("p",{className:"customer-support-fallback__schedule",children:[r.schedulePrefix," ",n]}):null]}),S.jsxs("div",{className:"customer-support-fallback__fields",children:[S.jsx("input",{type:"email",value:a,required:e.requireEmail,disabled:f,placeholder:r.email,"aria-label":r.email,onChange:h=>s(h.currentTarget.value)}),S.jsx("input",{type:"tel",value:o,required:e.requirePhone,disabled:f,placeholder:r.phone,"aria-label":r.phone,onChange:h=>u(h.currentTarget.value)}),S.jsx("textarea",{value:c,required:e.requireReason,disabled:f,placeholder:r.reason,"aria-label":r.reason,onChange:h=>d(h.currentTarget.value)})]}),t==="failed"&&S.jsx("p",{className:"customer-support-fallback__error",children:r.error}),S.jsxs("button",{className:"customer-support-fallback__submit",type:"submit",disabled:f,children:[f&&S.jsx("span",{className:"customer-support-fallback__spinner","aria-hidden":"true"}),S.jsx("span",{children:f?r.submitting:r.submit})]})]})})},rS=({onPressMicButton:e,isDisabled:t,className:n})=>S.jsx("div",{children:S.jsx("button",{className:`absolute
120
129
  bg-violet-600
121
130
  md:bottom-2
122
131
  md:right-3
@@ -135,12 +144,12 @@ For more details see https://formatjs.io/docs/getting-started/message-distributi
135
144
  transition-colors
136
145
  enabled:hover:scale-[1.02] active:scale-[0.98]
137
146
  chatsystem-mic-button
138
- ${n??""}`,"data-testid":"mic-button",onClick:e,disabled:t,type:"button","aria-label":"Start voice input",children:C.jsx("span",{"data-state":"closed",children:C.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24","aria-hidden":"true",className:"text-white dark:text-black",children:[C.jsx("path",{d:"M12 14.5c1.66 0 3-1.34 3-3V6.5c0-1.66-1.34-3-3-3s-3 1.34-3 3v5c0 1.66 1.34 3 3 3Z",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinejoin:"round"}),C.jsx("path",{d:"M12 14.5V18",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"}),C.jsx("path",{d:"M8.5 18h7",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"}),C.jsx("path",{d:"M7 11.5c0 2.76 2.24 5 5 5s5-2.24 5-5",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"})]})})})});function Hx(){const[e,t]=v.useState("idle"),[n,r]=v.useState(null),[i,a]=v.useState(0),s=v.useRef(null),o=v.useRef(null),u=v.useRef([]),c=v.useRef(null),d=v.useRef(null),f=v.useRef(null),m=v.useRef(null),h=v.useCallback(()=>{m.current!==null&&(cancelAnimationFrame(m.current),m.current=null);try{f.current?.disconnect()}catch{}f.current=null;try{d.current?.disconnect()}catch{}d.current=null;const _=c.current;c.current=null,_&&_.close().catch(()=>{}),a(0)},[]),b=v.useCallback(_=>{try{const S=new AudioContext,D=S.createAnalyser(),I=S.createMediaStreamSource(_);D.fftSize=256,D.smoothingTimeConstant=.85,I.connect(D),c.current=S,d.current=D,f.current=I;const N=new Uint8Array(D.fftSize),G=()=>{const se=d.current;if(!se)return;se.getByteTimeDomainData(N);let ee=0;for(let $=0;$<N.length;$++){const U=(N[$]-128)/128;ee+=U*U}const k=Math.sqrt(ee/N.length),M=Math.min(1,k*6);a(M),m.current=requestAnimationFrame(G)};m.current=requestAnimationFrame(G)}catch{a(0)}},[]),A=v.useCallback(async()=>{r(null),h();try{const _=await navigator.mediaDevices.getUserMedia({audio:!0});o.current=_,b(_);const D=["audio/webm;codecs=opus","audio/webm","audio/ogg;codecs=opus","audio/ogg"].find(N=>MediaRecorder.isTypeSupported(N))||"",I=new MediaRecorder(_,D?{mimeType:D}:void 0);s.current=I,u.current=[],I.ondataavailable=N=>{N.data&&N.data.size>0&&u.current.push(N.data)},I.onerror=()=>{t("error"),r("Recorder error.")},I.onstart=()=>t("recording"),I.onstop=()=>t("stopped"),I.start()}catch(_){h(),t("error"),r(_?.message??"Microphone permission denied.")}},[b,h]),w=v.useCallback(async()=>{const _=s.current,S=o.current;return!_||e!=="recording"?null:new Promise(D=>{_.onstop=()=>{h();const I=_.mimeType||"audio/webm",N=new Blob(u.current,{type:I}),G=I.includes("ogg")?"ogg":"webm",se=new File([N],`voice-message.${G}`,{type:I});S?.getTracks().forEach(ee=>ee.stop()),o.current=null,s.current=null,D({blob:N,file:se})},_.stop()})},[e,h]),y=v.useCallback(()=>{const _=s.current,S=o.current;try{_&&e==="recording"&&_.stop()}catch{}h(),S?.getTracks().forEach(D=>D.stop()),o.current=null,s.current=null,u.current=[],t("idle")},[e,h]);return v.useEffect(()=>()=>{h(),o.current?.getTracks().forEach(_=>_.stop())},[h]),{state:e,error:n,audioLevel:i,start:A,stop:w,cancel:y}}const Ux=()=>{const e=Jt(),t=e.formatMessage({defaultMessage:"Recording...",id:"recordingOverlay.recording"}),n=e.formatMessage({defaultMessage:"Cancel",id:"recordingOverlay.cancel"}),r=e.formatMessage({defaultMessage:"Tap the mic to stop",id:"recordingOverlay.explaination"});return{recordingTranslation:t,cancelTranslation:n,recordingExplainationTranslation:r}},jx=({isOpen:e,onStop:t,onCancel:n,audioLevel:r=0})=>{if(!e)return null;const{recordingTranslation:i}=Ux(),a=v.useMemo(()=>{const s=Math.max(0,Math.min(1,r));return Array.from({length:20},(o,u)=>{const c=Math.sin(u/19*Math.PI*2)*.5+.5,d=u%2===0?.9:.65,f=6+s*(14+c*18)*d;return Math.round(f)})},[r]);return C.jsx("div",{className:"relative mt-3 w-full rounded-lg border border-slate-400 bg-white p-1",role:"group","aria-label":"Recording voice message",children:C.jsxs("div",{className:"flex min-h-[48px] items-center gap-3 px-2",children:[C.jsxs("div",{className:"relative flex h-8 w-8 items-center justify-center",children:[C.jsx("span",{className:"absolute h-5 w-5 rounded-full bg-red-100 motion-safe:animate-ping","aria-hidden":!0}),C.jsx("span",{className:"absolute h-5 w-5 rounded-full bg-red-50","aria-hidden":!0}),C.jsx("span",{className:"absolute h-3.5 w-3.5 rounded-full bg-red-200","aria-hidden":!0}),C.jsx("span",{className:"h-2.5 w-2.5 rounded-full bg-red-500","aria-hidden":!0})]}),C.jsxs("div",{className:"min-w-0 flex-1",children:[C.jsx("div",{className:"mb-0.5 text-[11px] font-medium leading-3 text-slate-600",children:i}),C.jsx("div",{className:"flex h-5 items-center gap-[3px] overflow-hidden","aria-hidden":"true",children:a.map((s,o)=>C.jsx("span",{className:"block w-1 rounded-full bg-slate-400 transition-[height,background-color] duration-75",style:{height:`${s}px`,backgroundColor:r>.08?"rgb(59 130 246)":"rgb(148 163 184)"}},o))})]}),C.jsx("button",{type:"button",onClick:n,className:"flex h-9 w-9 items-center justify-center rounded-full text-slate-500 hover:bg-slate-100 hover:text-slate-700","aria-label":"Cancel recording",children:C.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"18",height:"18","aria-hidden":"true",children:C.jsx("path",{d:"M6 6l12 12M18 6L6 18",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})})}),C.jsx("button",{type:"button",onClick:t,className:"flex h-9 w-9 items-center justify-center rounded-full bg-violet-600 text-white hover:bg-violet-700","aria-label":"Validate recording",children:C.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"18",height:"18","aria-hidden":"true",children:C.jsx("path",{d:"M5 13l4 4L19 7",fill:"none",stroke:"currentColor",strokeWidth:"2.2",strokeLinecap:"round",strokeLinejoin:"round"})})})]})})};let lr=new AbortController;const Cc=({appToken:e,containerClassName:t})=>{const n=Qt();e||n.error("App Token missing");const r=v.useRef(null),{placeholderTranslation:i,genericErrorTranslation:a,tooManyRequestsTranslation:s,discussionFullErrorTranslation:o,infoBannerExplainationTranslation:u,infoBannerTitleTranslation:c}=wf(),{currentConversation:d,addEmptyMessageToCurrentConversation:f,addMessageToCurrentConversation:m,removeEmptyAssistantMessageFromCurrentConversation:h,resetConversation:b,setCurrentConversationId:A,updateCurrentConversationMessageById:w,archivedConversation:y,setArchivedConversationAsMain:_}=Pa(),[S,D]=v.useState("notLoading"),{defaultStartingStep:I,recentMessagesTranslation:N}=yc(),[G,se]=v.useState(null),[ee,k]=v.useState(I),[M,$]=v.useState(null),[U,z]=v.useState(!1),[Q,he]=v.useState(!1),{start:Ee,stop:Le,cancel:Re,audioLevel:g}=Hx(),{companySettings:j}=v.useContext(Pt),{appCurrentLang:J}=v.useContext(xc),[T,K]=v.useState(()=>{if(typeof window>"u")return!0;const V=window.matchMedia("(pointer: coarse)"),L=window.matchMedia("(hover: none)");return!(V.matches||L.matches)}),ne=v.useRef(new Map);v.useEffect(()=>{if(typeof window>"u")return;const V=window.matchMedia("(pointer: coarse)"),L=window.matchMedia("(hover: none)"),P=()=>{K(!(V.matches||L.matches))};return P(),V.addEventListener?(V.addEventListener("change",P),L.addEventListener("change",P)):(V.addListener(P),L.addListener(P)),()=>{V.removeEventListener?(V.removeEventListener("change",P),L.removeEventListener("change",P)):(V.removeListener(P),L.removeListener(P))}},[]);const W=S!=="notLoading"||(d?.items?.length??0)>0,[ae,re]=v.useState(!0),oe=!!y&&(y.items?.length??0)>0,ie=()=>{_(),re(!1)},Se=v.useRef(S);v.useEffect(()=>{const V=Se.current,L=S;V!=="notLoading"&&L==="notLoading"&&d.discussionId!==null&&d?.items.length>0&&Px({conversation:d}),Se.current=L},[S,d?.items.length,d.discussionId]);const Y={...W?{maxHeight:"100vh"}:{height:"250px"}};v.useEffect(()=>{yx(d.items)>=j?.api?.settings?.maxUserMessagesPerDiscussion&&z(!0)},[d.items.length]);const{scrollToBottom:Ne,showScrollButton:$e,messagesContainerRef:lt,removeStickyNess:wt}=vx(d.items),nn=()=>{lr.abort("Cancelling stream on purpose."),n.log("Stream request aborted"),D("notLoading"),h()},He=async V=>{const L=V?.body?.getReader(),P=new TextDecoder;let q=!1;const Z=V.headers.get("discussionId"),fe=parseInt(Z,10);Number.isNaN(fe)||A(fe),await new ReadableStream({start(Ze){return et();async function et(){if(!V.ok){D("notLoading");let tt=a;V.status===409?(tt=o,z(!0)):V.status===429?tt=s:tt=a,m({userType:"assistant",content:tt,metaData:{isErrorMessage:!0},temporaryId:crypto.randomUUID()}),lr=new AbortController;return}return L?.read().then(tt=>{const{done:Ht,value:Ye}=tt,It=P.decode(Ye),ct=kt.transformNDJSONChunkIntoObjects(It);for(const ve of ct)if(kt.isObjectOutputstreamMessageStartDTO(ve))ne.current.set(ve.messageId,{rendered:"",markdownTag:"",isWritingTag:!1,lastStreamSourceUuid:null}),ve.role==="assistant"&&D("loadingDisplayedAnswer"),f({messageStreamId:ve.messageId,role:ve.role});else if(kt.isObjectOutputstreamMessageDeltaDTO(ve)){const{delta:Pe,streamSourceUuid:Jn}=ve;ne.current.get(ve.messageId)||(ne.current.set(ve.messageId,{rendered:"",markdownTag:"",isWritingTag:!1,lastStreamSourceUuid:null}),f({messageStreamId:ve.messageId,role:"assistant"}));const We=ne.current.get(ve.messageId);We.lastStreamSourceUuid&&We.lastStreamSourceUuid!==Jn&&(We.rendered+='<span style="display:block;height:1rem;"></span>'),We.lastStreamSourceUuid=Jn??null,xx(Pe)?(We.markdownTag+=Pe,We.rendered+=We.markdownTag,We.markdownTag="",We.isWritingTag=!1):We.isWritingTag||Tx(Pe)?(We.markdownTag+=Pe,We.isWritingTag=!0):We.rendered+=Pe,w({id:ve.messageId,newContent:We.rendered})}else if(kt.isObjectOutputstreamMessageEndDTO(ve)){const{isLastAnswer:Pe,shouldStopStream:Jn}=ve;(Pe||Jn)&&(q=!0),ne.current.delete(ve.messageId)}else if(kt.isObjectOutputstreamLoadingCurrentStepNumberDTO(ve)){const{content:Pe}=ve;Ze.enqueue(Pe),$(Pe)}else if(kt.isObjectOutputstreamLoadingCurrentStepNameDTO(ve)){const{content:Pe}=ve;Ze.enqueue(Pe),k(Pe)}else if(kt.isObjectOutputstreamLoadingNumberOfStepsDTO(ve)){const{content:Pe}=ve;Ze.enqueue(Pe),se(Pe)}else if(kt.isObjectOutputstreamErrorDTO(ve)){const{message:Pe}=ve;m({userType:"assistant",metaData:{isErrorMessage:!0},content:Pe,temporaryId:crypto.randomUUID()})}else n.warn(`Packet shape not handled - ${ve}`);if(Ht&&q){Ze.close(),D("notLoading"),k(I),$(null);return}return et()})}}}).pipeTo(new WritableStream)},rn=V=>{const P=`${zn.getApiUrl()}/ai/prompt/${e}`,q=lr.signal;if(V.mode==="text"){const fe={query:V.text,language:J.locale};d?.discussionId&&(fe.discussionId=d.discussionId);const qe=zn.getFetchConfig({httpVerb:"POST",body:fe,contentType:"application/json",options:{signal:q}});return{url:P,fetchConfig:qe}}const Z=new FormData;return Z.append("language",J.locale),d?.discussionId&&Z.append("discussionId",String(d.discussionId)),Z.append("audioInput",V.audioFile,V.audioFile.name),{url:P,fetchConfig:{method:"POST",body:Z,signal:q}}},vt=async V=>{D("loadingIntermediaryStates"),requestAnimationFrame(()=>Ne({smooth:!1,sticky:!1}));const{url:L,fetchConfig:P}=rn(V);fetch(L,P).then(async q=>{await He(q)}).catch(q=>{n.error(q),D("notLoading"),lr=new AbortController})},me=async()=>{he(!0),await Ee()},we=async()=>{const V=await Le();he(!1),V&&(n.log("Audio blob:",V.blob),n.log("Audio file:",V.file),vt({mode:"audio",audioFile:V.file}))},ye=()=>{Re(),he(!1)};return C.jsxs("div",{className:["chatbox-root relative p-2","flex flex-col min-h-0 overflow-visible","h-auto",t??"mx-auto"].join(" "),ref:r,style:Y,children:[C.jsxs("div",{className:"flex-1 overflow-y-auto min-h-0 messagesContainer",ref:lt,children:[d.items.map((V,L)=>C.jsx(s2,{content:V.content,userType:V.userType,metaData:V.metaData,context:{discussionId:d?.discussionId,messageIndex:L,appToken:e},seenRootEl:lt.current},V.temporaryId)),C.jsx(Sx,{currentStepName:ee,currentStepNumber:M,loadingStatus:S,numberOfSteps:G})]}),$e&&C.jsx(Ox,{label:N,onClick:()=>Ne({smooth:!0,sticky:!0})}),U&&C.jsx(kx,{resetDiscussion:V=>{z(!1),b(V)},companySettings:j}),oe&&ae&&C.jsx(Bx,{actionLabel:c,message:u,onClick:ie}),C.jsx("div",{className:"chatbox-input-wrapper flex-shrink-0",children:Q?C.jsx(jx,{isOpen:Q,onStop:we,onCancel:ye,audioLevel:g}):C.jsx(hx,{classNameTextarea:"",classNameContainer:"relative mt-2 border-slate-400 border-[1px] rounded-lg p-1",SubmitComponent:mx,isDisabled:S!=="notLoading"||U,shouldDisableIfInputIsEmpty:!0,"aria-label":"TextArea For Bot Conversation",onSubmit:V=>{if(re(!1),Ax(V)){const L=_x(V,d.discussionId,b,j);L&&m({userType:"user",content:L,temporaryId:crypto.randomUUID()}),wt(),Ne({smooth:!0,sticky:!1})}else m({userType:"user",content:V,temporaryId:crypto.randomUUID()}),wt(),Ne({smooth:!0,sticky:!1}),vt({mode:"text",text:V})},placeholder:i,autoFocus:T,isLoadingStream:S==="loadingDisplayedAnswer"||S==="loadingIntermediaryStates",LoadingComponent:wx,onPressLoadingButton:nn,onPressMicButton:()=>{me()},MicComponent:Fx,audioEnabled:j?.agent?.isAudioAllowed})})]})};function Ir(){return Ir=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},Ir.apply(this,arguments)}function Sc(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function ia(e,t){return ia=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},ia(e,t)}function wc(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,ia(e,t)}var cr={exports:{}};/*
147
+ ${n??""}`,"data-testid":"mic-button",onClick:e,disabled:t,type:"button","aria-label":"Start voice input",children:S.jsx("span",{"data-state":"closed",children:S.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24","aria-hidden":"true",className:"text-white dark:text-black",children:[S.jsx("path",{d:"M12 14.5c1.66 0 3-1.34 3-3V6.5c0-1.66-1.34-3-3-3s-3 1.34-3 3v5c0 1.66 1.34 3 3 3Z",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinejoin:"round"}),S.jsx("path",{d:"M12 14.5V18",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"}),S.jsx("path",{d:"M8.5 18h7",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"}),S.jsx("path",{d:"M7 11.5c0 2.76 2.24 5 5 5s5-2.24 5-5",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"})]})})})});function iS(){const[e,t]=C.useState("idle"),[n,r]=C.useState(null),[i,a]=C.useState(0),s=C.useRef(null),o=C.useRef(null),u=C.useRef([]),c=C.useRef(null),d=C.useRef(null),f=C.useRef(null),p=C.useRef(null),h=C.useCallback(()=>{p.current!==null&&(cancelAnimationFrame(p.current),p.current=null);try{f.current?.disconnect()}catch{}f.current=null;try{d.current?.disconnect()}catch{}d.current=null;const k=c.current;c.current=null,k&&k.close().catch(()=>{}),a(0)},[]),b=C.useCallback(k=>{try{const N=new AudioContext,L=N.createAnalyser(),A=N.createMediaStreamSource(k);L.fftSize=256,L.smoothingTimeConstant=.85,A.connect(L),c.current=N,d.current=L,f.current=A;const v=new Uint8Array(L.fftSize),z=()=>{const K=d.current;if(!K)return;K.getByteTimeDomainData(v);let Q=0;for(let $=0;$<v.length;$++){const P=(v[$]-128)/128;Q+=P*P}const I=Math.sqrt(Q/v.length),H=Math.min(1,I*6);a(H),p.current=requestAnimationFrame(z)};p.current=requestAnimationFrame(z)}catch{a(0)}},[]),y=C.useCallback(async()=>{r(null),h();try{const k=await navigator.mediaDevices.getUserMedia({audio:!0});o.current=k,b(k);const L=["audio/webm;codecs=opus","audio/webm","audio/ogg;codecs=opus","audio/ogg"].find(v=>MediaRecorder.isTypeSupported(v))||"",A=new MediaRecorder(k,L?{mimeType:L}:void 0);s.current=A,u.current=[],A.ondataavailable=v=>{v.data&&v.data.size>0&&u.current.push(v.data)},A.onerror=()=>{t("error"),r("Recorder error.")},A.onstart=()=>t("recording"),A.onstop=()=>t("stopped"),A.start()}catch(k){h(),t("error"),r(k?.message??"Microphone permission denied.")}},[b,h]),w=C.useCallback(async()=>{const k=s.current,N=o.current;return!k||e!=="recording"?null:new Promise(L=>{k.onstop=()=>{h();const A=k.mimeType||"audio/webm",v=new Blob(u.current,{type:A}),z=A.includes("ogg")?"ogg":"webm",K=new File([v],`voice-message.${z}`,{type:A});N?.getTracks().forEach(Q=>Q.stop()),o.current=null,s.current=null,L({blob:v,file:K})},k.stop()})},[e,h]),_=C.useCallback(()=>{const k=s.current,N=o.current;try{k&&e==="recording"&&k.stop()}catch{}h(),N?.getTracks().forEach(L=>L.stop()),o.current=null,s.current=null,u.current=[],t("idle")},[e,h]);return C.useEffect(()=>()=>{h(),o.current?.getTracks().forEach(k=>k.stop())},[h]),{state:e,error:n,audioLevel:i,start:y,stop:w,cancel:_}}const aS=()=>{const e=an(),t=e.formatMessage({defaultMessage:"Recording...",id:"recordingOverlay.recording"}),n=e.formatMessage({defaultMessage:"Cancel",id:"recordingOverlay.cancel"}),r=e.formatMessage({defaultMessage:"Tap the mic to stop",id:"recordingOverlay.explaination"});return{recordingTranslation:t,cancelTranslation:n,recordingExplainationTranslation:r}},sS=({isOpen:e,onStop:t,onCancel:n,audioLevel:r=0})=>{if(!e)return null;const{recordingTranslation:i}=aS(),a=C.useMemo(()=>{const s=Math.max(0,Math.min(1,r));return Array.from({length:20},(o,u)=>{const c=Math.sin(u/19*Math.PI*2)*.5+.5,d=u%2===0?.9:.65,f=6+s*(14+c*18)*d;return Math.round(f)})},[r]);return S.jsx("div",{className:"relative mt-3 w-full rounded-lg border border-slate-400 bg-white p-1",role:"group","aria-label":"Recording voice message",children:S.jsxs("div",{className:"flex min-h-[48px] items-center gap-3 px-2",children:[S.jsxs("div",{className:"relative flex h-8 w-8 items-center justify-center",children:[S.jsx("span",{className:"absolute h-5 w-5 rounded-full bg-red-100 motion-safe:animate-ping","aria-hidden":!0}),S.jsx("span",{className:"absolute h-5 w-5 rounded-full bg-red-50","aria-hidden":!0}),S.jsx("span",{className:"absolute h-3.5 w-3.5 rounded-full bg-red-200","aria-hidden":!0}),S.jsx("span",{className:"h-2.5 w-2.5 rounded-full bg-red-500","aria-hidden":!0})]}),S.jsxs("div",{className:"min-w-0 flex-1",children:[S.jsx("div",{className:"mb-0.5 text-[11px] font-medium leading-3 text-slate-600",children:i}),S.jsx("div",{className:"flex h-5 items-center gap-[3px] overflow-hidden","aria-hidden":"true",children:a.map((s,o)=>S.jsx("span",{className:"block w-1 rounded-full bg-slate-400 transition-[height,background-color] duration-75",style:{height:`${s}px`,backgroundColor:r>.08?"rgb(59 130 246)":"rgb(148 163 184)"}},o))})]}),S.jsx("button",{type:"button",onClick:n,className:"flex h-9 w-9 items-center justify-center rounded-full text-slate-500 hover:bg-slate-100 hover:text-slate-700","aria-label":"Cancel recording",children:S.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"18",height:"18","aria-hidden":"true",children:S.jsx("path",{d:"M6 6l12 12M18 6L6 18",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})})}),S.jsx("button",{type:"button",onClick:t,className:"flex h-9 w-9 items-center justify-center rounded-full bg-violet-600 text-white hover:bg-violet-700","aria-label":"Validate recording",children:S.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"18",height:"18","aria-hidden":"true",children:S.jsx("path",{d:"M5 13l4 4L19 7",fill:"none",stroke:"currentColor",strokeWidth:"2.2",strokeLinecap:"round",strokeLinejoin:"round"})})})]})})},oS=e=>/(\[.*|\!\[.*)$/.test(e),uS=e=>/\)/.test(e),Xo=()=>({rendered:"",markdownTag:"",isWritingTag:!1,lastStreamSourceUuid:null});class lS{buffers=new Map;callbacks;constructor(t){this.callbacks=t}handleStart(t){this.buffers.set(t.messageId,Xo()),t.role==="assistant"&&this.callbacks.onAssistantMessageStart?.(),this.callbacks.addEmptyMessage({messageStreamId:t.messageId,role:t.role})}handleDelta(t){this.ensureBufferExists(t.messageId);const n=this.buffers.get(t.messageId);this.appendSourceSeparatorIfNeeded(n,t.streamSourceUuid),this.appendDelta(n,t.delta),this.callbacks.updateMessage({id:t.messageId,newContent:n.rendered})}handleEnd(t){this.buffers.delete(t.messageId)}hasBuffer(t){return this.buffers.has(t)}ensureBufferExists(t){this.buffers.has(t)||(this.buffers.set(t,Xo()),this.callbacks.addEmptyMessage({messageStreamId:t,role:"assistant"}))}appendSourceSeparatorIfNeeded(t,n){t.lastStreamSourceUuid&&t.lastStreamSourceUuid!==n&&(t.rendered+='<span style="display:block;height:1rem;"></span>'),t.lastStreamSourceUuid=n??null}appendDelta(t,n){if(uS(n)){t.markdownTag+=n,t.rendered+=t.markdownTag,t.markdownTag="",t.isWritingTag=!1;return}if(t.isWritingTag||oS(n)){t.markdownTag+=n,t.isWritingTag=!0;return}t.rendered+=n}}let br=new AbortController;const Jc=({appToken:e,agentId:t,containerClassName:n})=>{const r=_n();e||r.error("App Token missing");const i=C.useRef(null),{placeholderTranslation:a,genericErrorTranslation:s,tooManyRequestsTranslation:o,discussionFullErrorTranslation:u,infoBannerExplainationTranslation:c,infoBannerTitleTranslation:d,customerSupportConnectingTranslation:f,customerSupportConnectedTranslation:p,customerSupportConnectionErrorTranslation:h,customerSupportClosedTranslation:b,customerSupportRestartTranslation:y,customerSupportFallbackTitleTranslation:w,customerSupportFallbackDescriptionTranslation:_,customerSupportFallbackEmailTranslation:k,customerSupportFallbackPhoneTranslation:N,customerSupportFallbackSubmitTranslation:L,customerSupportFallbackSubmittingTranslation:A,customerSupportFallbackSuccessTranslation:v,customerSupportFallbackErrorTranslation:z,customerSupportClosedHoursTitleTranslation:K,customerSupportClosedHoursDescriptionTranslation:Q,customerSupportClosedHoursSchedulePrefixTranslation:I,customerSupportClosedHoursReasonTranslation:H,customerSupportClosedHoursSuccessTranslation:$}=Yu(),{currentConversation:P,addEmptyMessageToCurrentConversation:j,addMessageToCurrentConversation:X,removeEmptyAssistantMessageFromCurrentConversation:Ee,resetConversation:pe,setCurrentConversationId:Oe,updateCurrentConversationMessageById:ke,archivedConversation:m,chatboxBootState:Y,resetConversationRequestId:ee,setArchivedConversationAsMain:T}=ts(),[W,ne]=C.useState("notLoading"),{defaultStartingStep:q,recentMessagesTranslation:se}=Kc(),[re,le]=C.useState(null),[ie,Ae]=C.useState(q),[G,De]=C.useState(null),[Fe,Ve]=C.useState(!1),{scrollToBottom:et,showScrollButton:Rt,messagesContainerRef:Be,removeStickyNess:V}=Qx(P.items),{chatTransportMode:Te,isCustomerSupportMode:te,isCustomerSupportUnavailable:ce,isCustomerSupportInputDisabled:fe,enterCustomerSupportMode:_e,flushPendingCustomerSupportHandoff:R,sendToCustomerSupport:B,resetCustomerSupport:Z,fallbackContactCaptureConfig:ue,fallbackContactCaptureStatus:Ce,shouldDisplayFallbackContactCapture:tt,submitFallbackContactCapture:vt,closedHoursContactCaptureConfig:at,closedHoursBusinessHours:$t,closedHoursContactCaptureStatus:Yt,shouldDisplayClosedHoursContactCapture:We,submitClosedHoursContactCapture:Lt}=qx({appToken:e,currentConversation:P,loadingStatus:W,labels:{connecting:f,connected:p,connectionError:h},logger:r,setCurrentConversationId:Oe,setLoadingStatus:ne,addMessageToCurrentConversation:X,onCustomerSupportOperatorMessage:()=>{window.requestAnimationFrame(()=>{et({smooth:!0,sticky:!1})})},chatboxBootState:Y,resetConversationRequestId:ee}),[st,ti]=C.useState(!1),{start:ld,stop:cd,cancel:dd,audioLevel:fd}=iS(),{companySettings:ni}=C.useContext(nn),{appCurrentLang:is}=C.useContext(qc),[hd,pd]=C.useState(()=>{if(typeof window>"u")return!0;const ge=window.matchMedia("(pointer: coarse)"),He=window.matchMedia("(hover: none)");return!(ge.matches||He.matches)}),ri=C.useRef(null);ri.current||(ri.current=new lS({addEmptyMessage:j,updateMessage:ke,onAssistantMessageStart:()=>ne("loadingDisplayedAnswer")}));const ii=ri.current;C.useEffect(()=>{if(typeof window>"u")return;const ge=window.matchMedia("(pointer: coarse)"),He=window.matchMedia("(hover: none)"),Xe=()=>{pd(!(ge.matches||He.matches))};return Xe(),ge.addEventListener?(ge.addEventListener("change",Xe),He.addEventListener("change",Xe)):(ge.addListener(Xe),He.addListener(Xe)),()=>{ge.removeEventListener?(ge.removeEventListener("change",Xe),He.removeEventListener("change",Xe)):(ge.removeListener(Xe),He.removeListener(Xe))}},[]);const md=W!=="notLoading"||(P?.items?.length??0)>0,[gd,as]=C.useState(!0),bd=!!m&&(m.items?.length??0)>0,Ed=()=>{T(),as(!1)},Td=!te&&(W!=="notLoading"||Fe)||te&&(W!=="notLoading"||fe),yd={...md?{maxHeight:"100vh"}:{height:"250px"}};C.useEffect(()=>{if(te){Ve(!1);return}gx(P.items)>=ni?.api?.settings?.maxUserMessagesPerDiscussion&&Ve(!0)},[ni?.api?.settings?.maxUserMessagesPerDiscussion,P.items,te]);const ss=C.useRef(ee);C.useEffect(()=>{ss.current!==ee&&(ss.current=ee,Z("Starting new conversation"),ne("notLoading"),Ve(!1))},[Z,ee]);const xd=()=>{br.abort("Cancelling stream on purpose."),r.log("Stream request aborted"),ne("notLoading"),Ee()},Sd=async ge=>{const He=ge?.body?.getReader(),Xe=new TextDecoder,Dt=ge.headers.get("discussionId"),Nn=parseInt(Dt,10);Number.isNaN(Nn)||Oe(Nn),await new ReadableStream({start(Gt){return ar();async function ar(){if(!ge.ok){ne("notLoading");let ln=s;ge.status===409?(ln=u,Ve(!0)):ge.status===429?ln=o:ln=s,X({userType:"assistant",content:ln,metaData:{isErrorMessage:!0},temporaryId:crypto.randomUUID()}),br=new AbortController;return}return He?.read().then(ln=>{const{done:Id,value:vd}=ln,kd=Xe.decode(vd),Nd=kt.transformNDJSONChunkIntoObjects(kd);for(const Ue of Nd)if(kt.isObjectOutputstreamMessageStartDTO(Ue))ii.handleStart(Ue);else if(kt.isObjectOutputstreamMessageDeltaDTO(Ue))ii.handleDelta(Ue);else if(kt.isObjectOutputstreamMessageEndDTO(Ue))ii.handleEnd(Ue);else if(kt.isObjectOutputstreamLoadingCurrentStepNumberDTO(Ue)){const{content:nt}=Ue;Gt.enqueue(nt),De(nt)}else if(kt.isObjectOutputstreamLoadingCurrentStepNameDTO(Ue)){const{content:nt}=Ue;Gt.enqueue(nt),Ae(nt)}else if(kt.isObjectOutputstreamLoadingNumberOfStepsDTO(Ue)){const{content:nt}=Ue;Gt.enqueue(nt),le(nt)}else if(kt.isObjectOutputstreamClientEventDTO(Ue)){const nt=_x(Ue);nt.type==="customer_support_handoff_requested"?_e(nt.payload):r.warn(`Client event not handled - ${Ue.event}`)}else if(kt.isObjectOutputstreamErrorDTO(Ue)){const{message:nt}=Ue;X({userType:"assistant",metaData:{isErrorMessage:!0},content:nt,temporaryId:crypto.randomUUID()})}else r.warn(`Packet shape not handled - ${Ue}`);if(Id){Gt.close(),ne("notLoading"),Ae(q),De(null),R();return}return ar()})}}}).pipeTo(new WritableStream)},_d=ge=>{const He=xt.getApiUrl(),Xe=t?`?agentId=${encodeURIComponent(String(t))}`:"",Dt=`${He}/ai/prompt/${e}${Xe}`,Nn=br.signal;if(ge.mode==="text"){const Gt={query:ge.text,language:is.locale};P?.discussionId&&(Gt.discussionId=P.discussionId);const ar=xt.getFetchConfig({httpVerb:"POST",body:Gt,contentType:"application/json",options:{signal:Nn}});return{url:Dt,fetchConfig:ar}}const On=new FormData;return On.append("language",is.locale),P?.discussionId&&On.append("discussionId",String(P.discussionId)),On.append("audioInput",ge.audioFile,ge.audioFile.name),{url:Dt,fetchConfig:{method:"POST",body:On,signal:Nn}}},os=async ge=>{ne("loadingIntermediaryStates"),requestAnimationFrame(()=>et({smooth:!1,sticky:!1}));const{url:He,fetchConfig:Xe}=_d(ge);fetch(He,Xe).then(async Dt=>{await Sd(Dt)}).catch(Dt=>{r.error(Dt),ne("notLoading"),br=new AbortController})},Cd=async()=>{ti(!0),await ld()},Ad=async()=>{const ge=await cd();ti(!1),ge&&os({mode:"audio",audioFile:ge.file})},wd=()=>{dd(),ti(!1)};return S.jsxs("div",{className:["chatbox-root relative p-2","flex flex-col min-h-0 overflow-visible","h-auto",n??"mx-auto"].join(" "),ref:i,style:yd,children:[S.jsxs("div",{className:"flex-1 overflow-y-auto min-h-0 messagesContainer",ref:Be,children:[P.items.map((ge,He)=>S.jsx(ry,{content:ge.content,userType:ge.userType,metaData:ge.metaData,context:{discussionId:P?.discussionId,messageIndex:He,appToken:e},seenRootEl:Be.current},ge.temporaryId)),S.jsx(Wx,{currentStepName:ie,currentStepNumber:G,loadingStatus:W,numberOfSteps:re})]}),Rt&&S.jsx(eS,{label:se,onClick:()=>et({smooth:!0,sticky:!0})}),!te&&Fe&&S.jsx(Jx,{onReset:pe}),We&&at&&S.jsx(nS,{config:at,status:Yt,scheduleLabel:$t?.todayScheduleLabel,labels:{title:K,description:Q,schedulePrefix:I,email:k,phone:N,reason:H,submit:L,submitting:A,success:$,error:z},onSubmit:Lt}),tt&&ue&&S.jsx(tS,{config:ue,status:Ce,labels:{title:w,description:_,email:k,phone:N,submit:L,submitting:A,success:v,error:z},onSubmit:vt}),ce&&S.jsx(Wo,{actionLabel:y,message:b,onClick:pe}),bd&&gd&&S.jsx(Wo,{actionLabel:d,message:c,onClick:Ed}),S.jsx("div",{className:"chatbox-input-wrapper flex-shrink-0",children:st?S.jsx(sS,{isOpen:st,onStop:Ad,onCancel:wd,audioLevel:fd}):S.jsx(cx,{classNameTextarea:"",classNameContainer:"relative mt-2 border-slate-400 border-[1px] rounded-lg p-1",SubmitComponent:dx,isDisabled:Td,shouldDisableIfInputIsEmpty:!0,"aria-label":"TextArea For Bot Conversation",onSubmit:ge=>{if(as(!1),bx(ge)){const He=Ex(ge,P.discussionId,pe);He&&X({userType:"user",content:He,temporaryId:crypto.randomUUID()}),V(),et({smooth:!0,sticky:!1})}else X({userType:"user",content:ge,temporaryId:crypto.randomUUID()}),V(),et({smooth:!0,sticky:!1}),Te==="customer_support"?B(ge):os({mode:"text",text:ge})},placeholder:a,autoFocus:hd,isLoadingStream:W==="loadingDisplayedAnswer"||W==="loadingIntermediaryStates",LoadingComponent:Xx,onPressLoadingButton:xd,onPressMicButton:()=>{Cd()},MicComponent:rS,audioEnabled:ni?.agent?.isAudioAllowed&&!te})})]})};function Mr(){return Mr=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},Mr.apply(this,arguments)}function ed(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function Ea(e,t){return Ea=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},Ea(e,t)}function td(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Ea(e,t)}var Er={exports:{}};/*
139
148
  object-assign
140
149
  (c) Sindre Sorhus
141
150
  @license MIT
142
- */var yi,Co;function zx(){if(Co)return yi;Co=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function r(a){if(a==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(a)}function i(){try{if(!Object.assign)return!1;var a=new String("abc");if(a[5]="de",Object.getOwnPropertyNames(a)[0]==="5")return!1;for(var s={},o=0;o<10;o++)s["_"+String.fromCharCode(o)]=o;var u=Object.getOwnPropertyNames(s).map(function(d){return s[d]});if(u.join("")!=="0123456789")return!1;var c={};return"abcdefghijklmnopqrst".split("").forEach(function(d){c[d]=d}),Object.keys(Object.assign({},c)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return yi=i()?Object.assign:function(a,s){for(var o,u=r(a),c,d=1;d<arguments.length;d++){o=Object(arguments[d]);for(var f in o)t.call(o,f)&&(u[f]=o[f]);if(e){c=e(o);for(var m=0;m<c.length;m++)n.call(o,c[m])&&(u[c[m]]=o[c[m]])}}return u},yi}var Ai,So;function Ma(){if(So)return Ai;So=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Ai=e,Ai}var _i,wo;function vc(){return wo||(wo=1,_i=Function.call.bind(Object.prototype.hasOwnProperty)),_i}var Ci,vo;function $x(){if(vo)return Ci;vo=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=Ma(),n={},r=vc();e=function(a){var s="Warning: "+a;typeof console<"u"&&console.error(s);try{throw new Error(s)}catch{}}}function i(a,s,o,u,c){if(process.env.NODE_ENV!=="production"){for(var d in a)if(r(a,d)){var f;try{if(typeof a[d]!="function"){var m=Error((u||"React class")+": "+o+" type `"+d+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof a[d]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw m.name="Invariant Violation",m}f=a[d](s,d,u,o,null,t)}catch(b){f=b}if(f&&!(f instanceof Error)&&e((u||"React class")+": type specification of "+o+" `"+d+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof f+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),f instanceof Error&&!(f.message in n)){n[f.message]=!0;var h=c?c():"";e("Failed "+o+" type: "+f.message+(h??""))}}}}return i.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(n={})},Ci=i,Ci}var Si,Io;function Yx(){if(Io)return Si;Io=1;var e=la(),t=zx(),n=Ma(),r=vc(),i=$x(),a=function(){};process.env.NODE_ENV!=="production"&&(a=function(o){var u="Warning: "+o;typeof console<"u"&&console.error(u);try{throw new Error(u)}catch{}});function s(){return null}return Si=function(o,u){var c=typeof Symbol=="function"&&Symbol.iterator,d="@@iterator";function f(g){var j=g&&(c&&g[c]||g[d]);if(typeof j=="function")return j}var m="<<anonymous>>",h={array:y("array"),bigint:y("bigint"),bool:y("boolean"),func:y("function"),number:y("number"),object:y("object"),string:y("string"),symbol:y("symbol"),any:_(),arrayOf:S,element:D(),elementType:I(),instanceOf:N,node:k(),objectOf:se,oneOf:G,oneOfType:ee,shape:$,exact:U};function b(g,j){return g===j?g!==0||1/g===1/j:g!==g&&j!==j}function A(g,j){this.message=g,this.data=j&&typeof j=="object"?j:{},this.stack=""}A.prototype=Error.prototype;function w(g){if(process.env.NODE_ENV!=="production")var j={},J=0;function T(ne,W,ae,re,oe,ie,Se){if(re=re||m,ie=ie||ae,Se!==n){if(u){var Y=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 Y.name="Invariant Violation",Y}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var Ne=re+":"+ae;!j[Ne]&&J<3&&(a("You are manually calling a React.PropTypes validation function for the `"+ie+"` prop on `"+re+"`. 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."),j[Ne]=!0,J++)}}return W[ae]==null?ne?W[ae]===null?new A("The "+oe+" `"+ie+"` is marked as required "+("in `"+re+"`, but its value is `null`.")):new A("The "+oe+" `"+ie+"` is marked as required in "+("`"+re+"`, but its value is `undefined`.")):null:g(W,ae,re,oe,ie)}var K=T.bind(null,!1);return K.isRequired=T.bind(null,!0),K}function y(g){function j(J,T,K,ne,W,ae){var re=J[T],oe=he(re);if(oe!==g){var ie=Ee(re);return new A("Invalid "+ne+" `"+W+"` of type "+("`"+ie+"` supplied to `"+K+"`, expected ")+("`"+g+"`."),{expectedType:g})}return null}return w(j)}function _(){return w(s)}function S(g){function j(J,T,K,ne,W){if(typeof g!="function")return new A("Property `"+W+"` of component `"+K+"` has invalid PropType notation inside arrayOf.");var ae=J[T];if(!Array.isArray(ae)){var re=he(ae);return new A("Invalid "+ne+" `"+W+"` of type "+("`"+re+"` supplied to `"+K+"`, expected an array."))}for(var oe=0;oe<ae.length;oe++){var ie=g(ae,oe,K,ne,W+"["+oe+"]",n);if(ie instanceof Error)return ie}return null}return w(j)}function D(){function g(j,J,T,K,ne){var W=j[J];if(!o(W)){var ae=he(W);return new A("Invalid "+K+" `"+ne+"` of type "+("`"+ae+"` supplied to `"+T+"`, expected a single ReactElement."))}return null}return w(g)}function I(){function g(j,J,T,K,ne){var W=j[J];if(!e.isValidElementType(W)){var ae=he(W);return new A("Invalid "+K+" `"+ne+"` of type "+("`"+ae+"` supplied to `"+T+"`, expected a single ReactElement type."))}return null}return w(g)}function N(g){function j(J,T,K,ne,W){if(!(J[T]instanceof g)){var ae=g.name||m,re=Re(J[T]);return new A("Invalid "+ne+" `"+W+"` of type "+("`"+re+"` supplied to `"+K+"`, expected ")+("instance of `"+ae+"`."))}return null}return w(j)}function G(g){if(!Array.isArray(g))return process.env.NODE_ENV!=="production"&&(arguments.length>1?a("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])."):a("Invalid argument supplied to oneOf, expected an array.")),s;function j(J,T,K,ne,W){for(var ae=J[T],re=0;re<g.length;re++)if(b(ae,g[re]))return null;var oe=JSON.stringify(g,function(Se,Y){var Ne=Ee(Y);return Ne==="symbol"?String(Y):Y});return new A("Invalid "+ne+" `"+W+"` of value `"+String(ae)+"` "+("supplied to `"+K+"`, expected one of "+oe+"."))}return w(j)}function se(g){function j(J,T,K,ne,W){if(typeof g!="function")return new A("Property `"+W+"` of component `"+K+"` has invalid PropType notation inside objectOf.");var ae=J[T],re=he(ae);if(re!=="object")return new A("Invalid "+ne+" `"+W+"` of type "+("`"+re+"` supplied to `"+K+"`, expected an object."));for(var oe in ae)if(r(ae,oe)){var ie=g(ae,oe,K,ne,W+"."+oe,n);if(ie instanceof Error)return ie}return null}return w(j)}function ee(g){if(!Array.isArray(g))return process.env.NODE_ENV!=="production"&&a("Invalid argument supplied to oneOfType, expected an instance of array."),s;for(var j=0;j<g.length;j++){var J=g[j];if(typeof J!="function")return a("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+Le(J)+" at index "+j+"."),s}function T(K,ne,W,ae,re){for(var oe=[],ie=0;ie<g.length;ie++){var Se=g[ie],Y=Se(K,ne,W,ae,re,n);if(Y==null)return null;Y.data&&r(Y.data,"expectedType")&&oe.push(Y.data.expectedType)}var Ne=oe.length>0?", expected one of type ["+oe.join(", ")+"]":"";return new A("Invalid "+ae+" `"+re+"` supplied to "+("`"+W+"`"+Ne+"."))}return w(T)}function k(){function g(j,J,T,K,ne){return z(j[J])?null:new A("Invalid "+K+" `"+ne+"` supplied to "+("`"+T+"`, expected a ReactNode."))}return w(g)}function M(g,j,J,T,K){return new A((g||"React class")+": "+j+" type `"+J+"."+T+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+K+"`.")}function $(g){function j(J,T,K,ne,W){var ae=J[T],re=he(ae);if(re!=="object")return new A("Invalid "+ne+" `"+W+"` of type `"+re+"` "+("supplied to `"+K+"`, expected `object`."));for(var oe in g){var ie=g[oe];if(typeof ie!="function")return M(K,ne,W,oe,Ee(ie));var Se=ie(ae,oe,K,ne,W+"."+oe,n);if(Se)return Se}return null}return w(j)}function U(g){function j(J,T,K,ne,W){var ae=J[T],re=he(ae);if(re!=="object")return new A("Invalid "+ne+" `"+W+"` of type `"+re+"` "+("supplied to `"+K+"`, expected `object`."));var oe=t({},J[T],g);for(var ie in oe){var Se=g[ie];if(r(g,ie)&&typeof Se!="function")return M(K,ne,W,ie,Ee(Se));if(!Se)return new A("Invalid "+ne+" `"+W+"` key `"+ie+"` supplied to `"+K+"`.\nBad object: "+JSON.stringify(J[T],null," ")+`
143
- Valid keys: `+JSON.stringify(Object.keys(g),null," "));var Y=Se(ae,ie,K,ne,W+"."+ie,n);if(Y)return Y}return null}return w(j)}function z(g){switch(typeof g){case"number":case"string":case"undefined":return!0;case"boolean":return!g;case"object":if(Array.isArray(g))return g.every(z);if(g===null||o(g))return!0;var j=f(g);if(j){var J=j.call(g),T;if(j!==g.entries){for(;!(T=J.next()).done;)if(!z(T.value))return!1}else for(;!(T=J.next()).done;){var K=T.value;if(K&&!z(K[1]))return!1}}else return!1;return!0;default:return!1}}function Q(g,j){return g==="symbol"?!0:j?j["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&j instanceof Symbol:!1}function he(g){var j=typeof g;return Array.isArray(g)?"array":g instanceof RegExp?"object":Q(j,g)?"symbol":j}function Ee(g){if(typeof g>"u"||g===null)return""+g;var j=he(g);if(j==="object"){if(g instanceof Date)return"date";if(g instanceof RegExp)return"regexp"}return j}function Le(g){var j=Ee(g);switch(j){case"array":case"object":return"an "+j;case"boolean":case"date":case"regexp":return"a "+j;default:return j}}function Re(g){return!g.constructor||!g.constructor.name?m:g.constructor.name}return h.checkPropTypes=i,h.resetWarningCache=i.resetWarningCache,h.PropTypes=h,h},Si}var wi,No;function Gx(){if(No)return wi;No=1;var e=Ma();function t(){}function n(){}return n.resetWarningCache=t,wi=function(){function r(s,o,u,c,d,f){if(f!==e){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}}r.isRequired=r;function i(){return r}var a={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:i,element:r,elementType:r,instanceOf:i,node:r,objectOf:i,oneOf:i,oneOfType:i,shape:i,exact:i,checkPropTypes:n,resetWarningCache:t};return a.PropTypes=a,a},wi}var ko;function Vx(){if(ko)return cr.exports;if(ko=1,process.env.NODE_ENV!=="production"){var e=la(),t=!0;cr.exports=Yx()(e.isElement,t)}else cr.exports=Gx()();return cr.exports}var qx=Vx();const ue=sa(qx);function Wx(e,t){return e.classList?!!t&&e.classList.contains(t):(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")!==-1}function Xx(e,t){e.classList?e.classList.add(t):Wx(e,t)||(typeof e.className=="string"?e.className=e.className+" "+t:e.setAttribute("class",(e.className&&e.className.baseVal||"")+" "+t))}function Oo(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}function Qx(e,t){e.classList?e.classList.remove(t):typeof e.className=="string"?e.className=Oo(e.className,t):e.setAttribute("class",Oo(e.className&&e.className.baseVal||"",t))}const Lo={disabled:!1};var Kx=process.env.NODE_ENV!=="production"?ue.oneOfType([ue.number,ue.shape({enter:ue.number,exit:ue.number,appear:ue.number}).isRequired]):null,Jx=process.env.NODE_ENV!=="production"?ue.oneOfType([ue.string,ue.shape({enter:ue.string,exit:ue.string,active:ue.string}),ue.shape({enter:ue.string,enterDone:ue.string,enterActive:ue.string,exit:ue.string,exitDone:ue.string,exitActive:ue.string})]):null;const Ic=v.createContext(null);var Nc=function(t){return t.scrollTop},kn="unmounted",zt="exited",$t="entering",cn="entered",aa="exiting",At=(function(e){wc(t,e);function t(r,i){var a;a=e.call(this,r,i)||this;var s=i,o=s&&!s.isMounting?r.enter:r.appear,u;return a.appearStatus=null,r.in?o?(u=zt,a.appearStatus=$t):u=cn:r.unmountOnExit||r.mountOnEnter?u=kn:u=zt,a.state={status:u},a.nextCallback=null,a}t.getDerivedStateFromProps=function(i,a){var s=i.in;return s&&a.status===kn?{status:zt}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(i){var a=null;if(i!==this.props){var s=this.state.status;this.props.in?s!==$t&&s!==cn&&(a=$t):(s===$t||s===cn)&&(a=aa)}this.updateStatus(!1,a)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var i=this.props.timeout,a,s,o;return a=s=o=i,i!=null&&typeof i!="number"&&(a=i.exit,s=i.enter,o=i.appear!==void 0?i.appear:s),{exit:a,enter:s,appear:o}},n.updateStatus=function(i,a){if(i===void 0&&(i=!1),a!==null)if(this.cancelNextCallback(),a===$t){if(this.props.unmountOnExit||this.props.mountOnEnter){var s=this.props.nodeRef?this.props.nodeRef.current:In.findDOMNode(this);s&&Nc(s)}this.performEnter(i)}else this.performExit();else this.props.unmountOnExit&&this.state.status===zt&&this.setState({status:kn})},n.performEnter=function(i){var a=this,s=this.props.enter,o=this.context?this.context.isMounting:i,u=this.props.nodeRef?[o]:[In.findDOMNode(this),o],c=u[0],d=u[1],f=this.getTimeouts(),m=o?f.appear:f.enter;if(!i&&!s||Lo.disabled){this.safeSetState({status:cn},function(){a.props.onEntered(c)});return}this.props.onEnter(c,d),this.safeSetState({status:$t},function(){a.props.onEntering(c,d),a.onTransitionEnd(m,function(){a.safeSetState({status:cn},function(){a.props.onEntered(c,d)})})})},n.performExit=function(){var i=this,a=this.props.exit,s=this.getTimeouts(),o=this.props.nodeRef?void 0:In.findDOMNode(this);if(!a||Lo.disabled){this.safeSetState({status:zt},function(){i.props.onExited(o)});return}this.props.onExit(o),this.safeSetState({status:aa},function(){i.props.onExiting(o),i.onTransitionEnd(s.exit,function(){i.safeSetState({status:zt},function(){i.props.onExited(o)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(i,a){a=this.setNextCallback(a),this.setState(i,a)},n.setNextCallback=function(i){var a=this,s=!0;return this.nextCallback=function(o){s&&(s=!1,a.nextCallback=null,i(o))},this.nextCallback.cancel=function(){s=!1},this.nextCallback},n.onTransitionEnd=function(i,a){this.setNextCallback(a);var s=this.props.nodeRef?this.props.nodeRef.current:In.findDOMNode(this),o=i==null&&!this.props.addEndListener;if(!s||o){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var u=this.props.nodeRef?[this.nextCallback]:[s,this.nextCallback],c=u[0],d=u[1];this.props.addEndListener(c,d)}i!=null&&setTimeout(this.nextCallback,i)},n.render=function(){var i=this.state.status;if(i===kn)return null;var a=this.props,s=a.children;a.in,a.mountOnEnter,a.unmountOnExit,a.appear,a.enter,a.exit,a.timeout,a.addEndListener,a.onEnter,a.onEntering,a.onEntered,a.onExit,a.onExiting,a.onExited,a.nodeRef;var o=Sc(a,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return v.createElement(Ic.Provider,{value:null},typeof s=="function"?s(i,o):v.cloneElement(v.Children.only(s),o))},t})(v.Component);At.contextType=Ic;At.propTypes=process.env.NODE_ENV!=="production"?{nodeRef:ue.shape({current:typeof Element>"u"?ue.any:function(e,t,n,r,i,a){var s=e[t];return ue.instanceOf(s&&"ownerDocument"in s?s.ownerDocument.defaultView.Element:Element)(e,t,n,r,i,a)}}),children:ue.oneOfType([ue.func.isRequired,ue.element.isRequired]).isRequired,in:ue.bool,mountOnEnter:ue.bool,unmountOnExit:ue.bool,appear:ue.bool,enter:ue.bool,exit:ue.bool,timeout:function(t){var n=Kx;t.addEndListener||(n=n.isRequired);for(var r=arguments.length,i=new Array(r>1?r-1:0),a=1;a<r;a++)i[a-1]=arguments[a];return n.apply(void 0,[t].concat(i))},addEndListener:ue.func,onEnter:ue.func,onEntering:ue.func,onEntered:ue.func,onExit:ue.func,onExiting:ue.func,onExited:ue.func}:{};function on(){}At.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:on,onEntering:on,onEntered:on,onExit:on,onExiting:on,onExited:on};At.UNMOUNTED=kn;At.EXITED=zt;At.ENTERING=$t;At.ENTERED=cn;At.EXITING=aa;var Zx=function(t,n){return t&&n&&n.split(" ").forEach(function(r){return Xx(t,r)})},vi=function(t,n){return t&&n&&n.split(" ").forEach(function(r){return Qx(t,r)})},Ba=(function(e){wc(t,e);function t(){for(var r,i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];return r=e.call.apply(e,[this].concat(a))||this,r.appliedClasses={appear:{},enter:{},exit:{}},r.onEnter=function(o,u){var c=r.resolveArguments(o,u),d=c[0],f=c[1];r.removeClasses(d,"exit"),r.addClass(d,f?"appear":"enter","base"),r.props.onEnter&&r.props.onEnter(o,u)},r.onEntering=function(o,u){var c=r.resolveArguments(o,u),d=c[0],f=c[1],m=f?"appear":"enter";r.addClass(d,m,"active"),r.props.onEntering&&r.props.onEntering(o,u)},r.onEntered=function(o,u){var c=r.resolveArguments(o,u),d=c[0],f=c[1],m=f?"appear":"enter";r.removeClasses(d,m),r.addClass(d,m,"done"),r.props.onEntered&&r.props.onEntered(o,u)},r.onExit=function(o){var u=r.resolveArguments(o),c=u[0];r.removeClasses(c,"appear"),r.removeClasses(c,"enter"),r.addClass(c,"exit","base"),r.props.onExit&&r.props.onExit(o)},r.onExiting=function(o){var u=r.resolveArguments(o),c=u[0];r.addClass(c,"exit","active"),r.props.onExiting&&r.props.onExiting(o)},r.onExited=function(o){var u=r.resolveArguments(o),c=u[0];r.removeClasses(c,"exit"),r.addClass(c,"exit","done"),r.props.onExited&&r.props.onExited(o)},r.resolveArguments=function(o,u){return r.props.nodeRef?[r.props.nodeRef.current,o]:[o,u]},r.getClassNames=function(o){var u=r.props.classNames,c=typeof u=="string",d=c&&u?u+"-":"",f=c?""+d+o:u[o],m=c?f+"-active":u[o+"Active"],h=c?f+"-done":u[o+"Done"];return{baseClassName:f,activeClassName:m,doneClassName:h}},r}var n=t.prototype;return n.addClass=function(i,a,s){var o=this.getClassNames(a)[s+"ClassName"],u=this.getClassNames("enter"),c=u.doneClassName;a==="appear"&&s==="done"&&c&&(o+=" "+c),s==="active"&&i&&Nc(i),o&&(this.appliedClasses[a][s]=o,Zx(i,o))},n.removeClasses=function(i,a){var s=this.appliedClasses[a],o=s.base,u=s.active,c=s.done;this.appliedClasses[a]={},o&&vi(i,o),u&&vi(i,u),c&&vi(i,c)},n.render=function(){var i=this.props;i.classNames;var a=Sc(i,["classNames"]);return v.createElement(At,Ir({},a,{onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}))},t})(v.Component);Ba.defaultProps={classNames:""};Ba.propTypes=process.env.NODE_ENV!=="production"?Ir({},At.propTypes,{classNames:Jx,onEnter:ue.func,onEntering:ue.func,onEntered:ue.func,onExit:ue.func,onExiting:ue.func,onExited:ue.func}):{};const kc=()=>{const e=Jt(),t=e.formatMessage({defaultMessage:"Open chat menu",id:"chatbot.widget.menu.open"}),n=e.formatMessage({defaultMessage:"Start a new discussion",id:"chatbot.widget.menu.startNewDiscussion"}),r=e.formatMessage({defaultMessage:"Close chat",id:"chatbot.widget.close"});return{openMenuTranslation:t,startNewDiscussionTranslation:n,closeChatTranslation:r}},ey=({setIsWidgetOpen:e})=>{const{closeChatTranslation:t}=kc();return C.jsx(C.Fragment,{children:C.jsx("button",{type:"button","aria-label":t,onClick:()=>e(!1),className:`absolute right-2 top-1/2 -translate-y-1/2
151
+ */var Pi,Qo;function cS(){if(Qo)return Pi;Qo=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function r(a){if(a==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(a)}function i(){try{if(!Object.assign)return!1;var a=new String("abc");if(a[5]="de",Object.getOwnPropertyNames(a)[0]==="5")return!1;for(var s={},o=0;o<10;o++)s["_"+String.fromCharCode(o)]=o;var u=Object.getOwnPropertyNames(s).map(function(d){return s[d]});if(u.join("")!=="0123456789")return!1;var c={};return"abcdefghijklmnopqrst".split("").forEach(function(d){c[d]=d}),Object.keys(Object.assign({},c)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return Pi=i()?Object.assign:function(a,s){for(var o,u=r(a),c,d=1;d<arguments.length;d++){o=Object(arguments[d]);for(var f in o)t.call(o,f)&&(u[f]=o[f]);if(e){c=e(o);for(var p=0;p<c.length;p++)n.call(o,c[p])&&(u[c[p]]=o[c[p]])}}return u},Pi}var Mi,Ko;function ns(){if(Ko)return Mi;Ko=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Mi=e,Mi}var Bi,Zo;function nd(){return Zo||(Zo=1,Bi=Function.call.bind(Object.prototype.hasOwnProperty)),Bi}var Fi,Jo;function dS(){if(Jo)return Fi;Jo=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=ns(),n={},r=nd();e=function(a){var s="Warning: "+a;typeof console<"u"&&console.error(s);try{throw new Error(s)}catch{}}}function i(a,s,o,u,c){if(process.env.NODE_ENV!=="production"){for(var d in a)if(r(a,d)){var f;try{if(typeof a[d]!="function"){var p=Error((u||"React class")+": "+o+" type `"+d+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof a[d]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw p.name="Invariant Violation",p}f=a[d](s,d,u,o,null,t)}catch(b){f=b}if(f&&!(f instanceof Error)&&e((u||"React class")+": type specification of "+o+" `"+d+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof f+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),f instanceof Error&&!(f.message in n)){n[f.message]=!0;var h=c?c():"";e("Failed "+o+" type: "+f.message+(h??""))}}}}return i.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(n={})},Fi=i,Fi}var Hi,eu;function fS(){if(eu)return Hi;eu=1;var e=_a(),t=cS(),n=ns(),r=nd(),i=dS(),a=function(){};process.env.NODE_ENV!=="production"&&(a=function(o){var u="Warning: "+o;typeof console<"u"&&console.error(u);try{throw new Error(u)}catch{}});function s(){return null}return Hi=function(o,u){var c=typeof Symbol=="function"&&Symbol.iterator,d="@@iterator";function f(m){var Y=m&&(c&&m[c]||m[d]);if(typeof Y=="function")return Y}var p="<<anonymous>>",h={array:_("array"),bigint:_("bigint"),bool:_("boolean"),func:_("function"),number:_("number"),object:_("object"),string:_("string"),symbol:_("symbol"),any:k(),arrayOf:N,element:L(),elementType:A(),instanceOf:v,node:I(),objectOf:K,oneOf:z,oneOfType:Q,shape:$,exact:P};function b(m,Y){return m===Y?m!==0||1/m===1/Y:m!==m&&Y!==Y}function y(m,Y){this.message=m,this.data=Y&&typeof Y=="object"?Y:{},this.stack=""}y.prototype=Error.prototype;function w(m){if(process.env.NODE_ENV!=="production")var Y={},ee=0;function T(ne,q,se,re,le,ie,Ae){if(re=re||p,ie=ie||se,Ae!==n){if(u){var G=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 G.name="Invariant Violation",G}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var De=re+":"+se;!Y[De]&&ee<3&&(a("You are manually calling a React.PropTypes validation function for the `"+ie+"` prop on `"+re+"`. 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."),Y[De]=!0,ee++)}}return q[se]==null?ne?q[se]===null?new y("The "+le+" `"+ie+"` is marked as required "+("in `"+re+"`, but its value is `null`.")):new y("The "+le+" `"+ie+"` is marked as required in "+("`"+re+"`, but its value is `undefined`.")):null:m(q,se,re,le,ie)}var W=T.bind(null,!1);return W.isRequired=T.bind(null,!0),W}function _(m){function Y(ee,T,W,ne,q,se){var re=ee[T],le=Ee(re);if(le!==m){var ie=pe(re);return new y("Invalid "+ne+" `"+q+"` of type "+("`"+ie+"` supplied to `"+W+"`, expected ")+("`"+m+"`."),{expectedType:m})}return null}return w(Y)}function k(){return w(s)}function N(m){function Y(ee,T,W,ne,q){if(typeof m!="function")return new y("Property `"+q+"` of component `"+W+"` has invalid PropType notation inside arrayOf.");var se=ee[T];if(!Array.isArray(se)){var re=Ee(se);return new y("Invalid "+ne+" `"+q+"` of type "+("`"+re+"` supplied to `"+W+"`, expected an array."))}for(var le=0;le<se.length;le++){var ie=m(se,le,W,ne,q+"["+le+"]",n);if(ie instanceof Error)return ie}return null}return w(Y)}function L(){function m(Y,ee,T,W,ne){var q=Y[ee];if(!o(q)){var se=Ee(q);return new y("Invalid "+W+" `"+ne+"` of type "+("`"+se+"` supplied to `"+T+"`, expected a single ReactElement."))}return null}return w(m)}function A(){function m(Y,ee,T,W,ne){var q=Y[ee];if(!e.isValidElementType(q)){var se=Ee(q);return new y("Invalid "+W+" `"+ne+"` of type "+("`"+se+"` supplied to `"+T+"`, expected a single ReactElement type."))}return null}return w(m)}function v(m){function Y(ee,T,W,ne,q){if(!(ee[T]instanceof m)){var se=m.name||p,re=ke(ee[T]);return new y("Invalid "+ne+" `"+q+"` of type "+("`"+re+"` supplied to `"+W+"`, expected ")+("instance of `"+se+"`."))}return null}return w(Y)}function z(m){if(!Array.isArray(m))return process.env.NODE_ENV!=="production"&&(arguments.length>1?a("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])."):a("Invalid argument supplied to oneOf, expected an array.")),s;function Y(ee,T,W,ne,q){for(var se=ee[T],re=0;re<m.length;re++)if(b(se,m[re]))return null;var le=JSON.stringify(m,function(Ae,G){var De=pe(G);return De==="symbol"?String(G):G});return new y("Invalid "+ne+" `"+q+"` of value `"+String(se)+"` "+("supplied to `"+W+"`, expected one of "+le+"."))}return w(Y)}function K(m){function Y(ee,T,W,ne,q){if(typeof m!="function")return new y("Property `"+q+"` of component `"+W+"` has invalid PropType notation inside objectOf.");var se=ee[T],re=Ee(se);if(re!=="object")return new y("Invalid "+ne+" `"+q+"` of type "+("`"+re+"` supplied to `"+W+"`, expected an object."));for(var le in se)if(r(se,le)){var ie=m(se,le,W,ne,q+"."+le,n);if(ie instanceof Error)return ie}return null}return w(Y)}function Q(m){if(!Array.isArray(m))return process.env.NODE_ENV!=="production"&&a("Invalid argument supplied to oneOfType, expected an instance of array."),s;for(var Y=0;Y<m.length;Y++){var ee=m[Y];if(typeof ee!="function")return a("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+Oe(ee)+" at index "+Y+"."),s}function T(W,ne,q,se,re){for(var le=[],ie=0;ie<m.length;ie++){var Ae=m[ie],G=Ae(W,ne,q,se,re,n);if(G==null)return null;G.data&&r(G.data,"expectedType")&&le.push(G.data.expectedType)}var De=le.length>0?", expected one of type ["+le.join(", ")+"]":"";return new y("Invalid "+se+" `"+re+"` supplied to "+("`"+q+"`"+De+"."))}return w(T)}function I(){function m(Y,ee,T,W,ne){return j(Y[ee])?null:new y("Invalid "+W+" `"+ne+"` supplied to "+("`"+T+"`, expected a ReactNode."))}return w(m)}function H(m,Y,ee,T,W){return new y((m||"React class")+": "+Y+" type `"+ee+"."+T+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+W+"`.")}function $(m){function Y(ee,T,W,ne,q){var se=ee[T],re=Ee(se);if(re!=="object")return new y("Invalid "+ne+" `"+q+"` of type `"+re+"` "+("supplied to `"+W+"`, expected `object`."));for(var le in m){var ie=m[le];if(typeof ie!="function")return H(W,ne,q,le,pe(ie));var Ae=ie(se,le,W,ne,q+"."+le,n);if(Ae)return Ae}return null}return w(Y)}function P(m){function Y(ee,T,W,ne,q){var se=ee[T],re=Ee(se);if(re!=="object")return new y("Invalid "+ne+" `"+q+"` of type `"+re+"` "+("supplied to `"+W+"`, expected `object`."));var le=t({},ee[T],m);for(var ie in le){var Ae=m[ie];if(r(m,ie)&&typeof Ae!="function")return H(W,ne,q,ie,pe(Ae));if(!Ae)return new y("Invalid "+ne+" `"+q+"` key `"+ie+"` supplied to `"+W+"`.\nBad object: "+JSON.stringify(ee[T],null," ")+`
152
+ Valid keys: `+JSON.stringify(Object.keys(m),null," "));var G=Ae(se,ie,W,ne,q+"."+ie,n);if(G)return G}return null}return w(Y)}function j(m){switch(typeof m){case"number":case"string":case"undefined":return!0;case"boolean":return!m;case"object":if(Array.isArray(m))return m.every(j);if(m===null||o(m))return!0;var Y=f(m);if(Y){var ee=Y.call(m),T;if(Y!==m.entries){for(;!(T=ee.next()).done;)if(!j(T.value))return!1}else for(;!(T=ee.next()).done;){var W=T.value;if(W&&!j(W[1]))return!1}}else return!1;return!0;default:return!1}}function X(m,Y){return m==="symbol"?!0:Y?Y["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&Y instanceof Symbol:!1}function Ee(m){var Y=typeof m;return Array.isArray(m)?"array":m instanceof RegExp?"object":X(Y,m)?"symbol":Y}function pe(m){if(typeof m>"u"||m===null)return""+m;var Y=Ee(m);if(Y==="object"){if(m instanceof Date)return"date";if(m instanceof RegExp)return"regexp"}return Y}function Oe(m){var Y=pe(m);switch(Y){case"array":case"object":return"an "+Y;case"boolean":case"date":case"regexp":return"a "+Y;default:return Y}}function ke(m){return!m.constructor||!m.constructor.name?p:m.constructor.name}return h.checkPropTypes=i,h.resetWarningCache=i.resetWarningCache,h.PropTypes=h,h},Hi}var Ui,tu;function hS(){if(tu)return Ui;tu=1;var e=ns();function t(){}function n(){}return n.resetWarningCache=t,Ui=function(){function r(s,o,u,c,d,f){if(f!==e){var p=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 p.name="Invariant Violation",p}}r.isRequired=r;function i(){return r}var a={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:i,element:r,elementType:r,instanceOf:i,node:r,objectOf:i,oneOf:i,oneOfType:i,shape:i,exact:i,checkPropTypes:n,resetWarningCache:t};return a.PropTypes=a,a},Ui}var nu;function pS(){if(nu)return Er.exports;if(nu=1,process.env.NODE_ENV!=="production"){var e=_a(),t=!0;Er.exports=fS()(e.isElement,t)}else Er.exports=hS()();return Er.exports}var mS=pS();const de=ya(mS);function gS(e,t){return e.classList?!!t&&e.classList.contains(t):(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")!==-1}function bS(e,t){e.classList?e.classList.add(t):gS(e,t)||(typeof e.className=="string"?e.className=e.className+" "+t:e.setAttribute("class",(e.className&&e.className.baseVal||"")+" "+t))}function ru(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}function ES(e,t){e.classList?e.classList.remove(t):typeof e.className=="string"?e.className=ru(e.className,t):e.setAttribute("class",ru(e.className&&e.className.baseVal||"",t))}const iu={disabled:!1};var TS=process.env.NODE_ENV!=="production"?de.oneOfType([de.number,de.shape({enter:de.number,exit:de.number,appear:de.number}).isRequired]):null,yS=process.env.NODE_ENV!=="production"?de.oneOfType([de.string,de.shape({enter:de.string,exit:de.string,active:de.string}),de.shape({enter:de.string,enterDone:de.string,enterActive:de.string,exit:de.string,exitDone:de.string,exitActive:de.string})]):null;const rd=C.createContext(null);var id=function(t){return t.scrollTop},Fn="unmounted",Wt="exited",Xt="entering",mn="entered",Ta="exiting",It=(function(e){td(t,e);function t(r,i){var a;a=e.call(this,r,i)||this;var s=i,o=s&&!s.isMounting?r.enter:r.appear,u;return a.appearStatus=null,r.in?o?(u=Wt,a.appearStatus=Xt):u=mn:r.unmountOnExit||r.mountOnEnter?u=Fn:u=Wt,a.state={status:u},a.nextCallback=null,a}t.getDerivedStateFromProps=function(i,a){var s=i.in;return s&&a.status===Fn?{status:Wt}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(i){var a=null;if(i!==this.props){var s=this.state.status;this.props.in?s!==Xt&&s!==mn&&(a=Xt):(s===Xt||s===mn)&&(a=Ta)}this.updateStatus(!1,a)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var i=this.props.timeout,a,s,o;return a=s=o=i,i!=null&&typeof i!="number"&&(a=i.exit,s=i.enter,o=i.appear!==void 0?i.appear:s),{exit:a,enter:s,appear:o}},n.updateStatus=function(i,a){if(i===void 0&&(i=!1),a!==null)if(this.cancelNextCallback(),a===Xt){if(this.props.unmountOnExit||this.props.mountOnEnter){var s=this.props.nodeRef?this.props.nodeRef.current:Mn.findDOMNode(this);s&&id(s)}this.performEnter(i)}else this.performExit();else this.props.unmountOnExit&&this.state.status===Wt&&this.setState({status:Fn})},n.performEnter=function(i){var a=this,s=this.props.enter,o=this.context?this.context.isMounting:i,u=this.props.nodeRef?[o]:[Mn.findDOMNode(this),o],c=u[0],d=u[1],f=this.getTimeouts(),p=o?f.appear:f.enter;if(!i&&!s||iu.disabled){this.safeSetState({status:mn},function(){a.props.onEntered(c)});return}this.props.onEnter(c,d),this.safeSetState({status:Xt},function(){a.props.onEntering(c,d),a.onTransitionEnd(p,function(){a.safeSetState({status:mn},function(){a.props.onEntered(c,d)})})})},n.performExit=function(){var i=this,a=this.props.exit,s=this.getTimeouts(),o=this.props.nodeRef?void 0:Mn.findDOMNode(this);if(!a||iu.disabled){this.safeSetState({status:Wt},function(){i.props.onExited(o)});return}this.props.onExit(o),this.safeSetState({status:Ta},function(){i.props.onExiting(o),i.onTransitionEnd(s.exit,function(){i.safeSetState({status:Wt},function(){i.props.onExited(o)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(i,a){a=this.setNextCallback(a),this.setState(i,a)},n.setNextCallback=function(i){var a=this,s=!0;return this.nextCallback=function(o){s&&(s=!1,a.nextCallback=null,i(o))},this.nextCallback.cancel=function(){s=!1},this.nextCallback},n.onTransitionEnd=function(i,a){this.setNextCallback(a);var s=this.props.nodeRef?this.props.nodeRef.current:Mn.findDOMNode(this),o=i==null&&!this.props.addEndListener;if(!s||o){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var u=this.props.nodeRef?[this.nextCallback]:[s,this.nextCallback],c=u[0],d=u[1];this.props.addEndListener(c,d)}i!=null&&setTimeout(this.nextCallback,i)},n.render=function(){var i=this.state.status;if(i===Fn)return null;var a=this.props,s=a.children;a.in,a.mountOnEnter,a.unmountOnExit,a.appear,a.enter,a.exit,a.timeout,a.addEndListener,a.onEnter,a.onEntering,a.onEntered,a.onExit,a.onExiting,a.onExited,a.nodeRef;var o=ed(a,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return C.createElement(rd.Provider,{value:null},typeof s=="function"?s(i,o):C.cloneElement(C.Children.only(s),o))},t})(C.Component);It.contextType=rd;It.propTypes=process.env.NODE_ENV!=="production"?{nodeRef:de.shape({current:typeof Element>"u"?de.any:function(e,t,n,r,i,a){var s=e[t];return de.instanceOf(s&&"ownerDocument"in s?s.ownerDocument.defaultView.Element:Element)(e,t,n,r,i,a)}}),children:de.oneOfType([de.func.isRequired,de.element.isRequired]).isRequired,in:de.bool,mountOnEnter:de.bool,unmountOnExit:de.bool,appear:de.bool,enter:de.bool,exit:de.bool,timeout:function(t){var n=TS;t.addEndListener||(n=n.isRequired);for(var r=arguments.length,i=new Array(r>1?r-1:0),a=1;a<r;a++)i[a-1]=arguments[a];return n.apply(void 0,[t].concat(i))},addEndListener:de.func,onEnter:de.func,onEntering:de.func,onEntered:de.func,onExit:de.func,onExiting:de.func,onExited:de.func}:{};function fn(){}It.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:fn,onEntering:fn,onEntered:fn,onExit:fn,onExiting:fn,onExited:fn};It.UNMOUNTED=Fn;It.EXITED=Wt;It.ENTERING=Xt;It.ENTERED=mn;It.EXITING=Ta;var xS=function(t,n){return t&&n&&n.split(" ").forEach(function(r){return bS(t,r)})},ji=function(t,n){return t&&n&&n.split(" ").forEach(function(r){return ES(t,r)})},rs=(function(e){td(t,e);function t(){for(var r,i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];return r=e.call.apply(e,[this].concat(a))||this,r.appliedClasses={appear:{},enter:{},exit:{}},r.onEnter=function(o,u){var c=r.resolveArguments(o,u),d=c[0],f=c[1];r.removeClasses(d,"exit"),r.addClass(d,f?"appear":"enter","base"),r.props.onEnter&&r.props.onEnter(o,u)},r.onEntering=function(o,u){var c=r.resolveArguments(o,u),d=c[0],f=c[1],p=f?"appear":"enter";r.addClass(d,p,"active"),r.props.onEntering&&r.props.onEntering(o,u)},r.onEntered=function(o,u){var c=r.resolveArguments(o,u),d=c[0],f=c[1],p=f?"appear":"enter";r.removeClasses(d,p),r.addClass(d,p,"done"),r.props.onEntered&&r.props.onEntered(o,u)},r.onExit=function(o){var u=r.resolveArguments(o),c=u[0];r.removeClasses(c,"appear"),r.removeClasses(c,"enter"),r.addClass(c,"exit","base"),r.props.onExit&&r.props.onExit(o)},r.onExiting=function(o){var u=r.resolveArguments(o),c=u[0];r.addClass(c,"exit","active"),r.props.onExiting&&r.props.onExiting(o)},r.onExited=function(o){var u=r.resolveArguments(o),c=u[0];r.removeClasses(c,"exit"),r.addClass(c,"exit","done"),r.props.onExited&&r.props.onExited(o)},r.resolveArguments=function(o,u){return r.props.nodeRef?[r.props.nodeRef.current,o]:[o,u]},r.getClassNames=function(o){var u=r.props.classNames,c=typeof u=="string",d=c&&u?u+"-":"",f=c?""+d+o:u[o],p=c?f+"-active":u[o+"Active"],h=c?f+"-done":u[o+"Done"];return{baseClassName:f,activeClassName:p,doneClassName:h}},r}var n=t.prototype;return n.addClass=function(i,a,s){var o=this.getClassNames(a)[s+"ClassName"],u=this.getClassNames("enter"),c=u.doneClassName;a==="appear"&&s==="done"&&c&&(o+=" "+c),s==="active"&&i&&id(i),o&&(this.appliedClasses[a][s]=o,xS(i,o))},n.removeClasses=function(i,a){var s=this.appliedClasses[a],o=s.base,u=s.active,c=s.done;this.appliedClasses[a]={},o&&ji(i,o),u&&ji(i,u),c&&ji(i,c)},n.render=function(){var i=this.props;i.classNames;var a=ed(i,["classNames"]);return C.createElement(It,Mr({},a,{onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}))},t})(C.Component);rs.defaultProps={classNames:""};rs.propTypes=process.env.NODE_ENV!=="production"?Mr({},It.propTypes,{classNames:yS,onEnter:de.func,onEntering:de.func,onEntered:de.func,onExit:de.func,onExiting:de.func,onExited:de.func}):{};const ad=()=>{const e=an(),t=e.formatMessage({defaultMessage:"Open chat menu",id:"chatbot.widget.menu.open"}),n=e.formatMessage({defaultMessage:"Start a new discussion",id:"chatbot.widget.menu.startNewDiscussion"}),r=e.formatMessage({defaultMessage:"Close chat",id:"chatbot.widget.close"});return{openMenuTranslation:t,startNewDiscussionTranslation:n,closeChatTranslation:r}},SS=({setIsWidgetOpen:e})=>{const{closeChatTranslation:t}=ad();return S.jsx(S.Fragment,{children:S.jsx("button",{type:"button","aria-label":t,onClick:()=>e(!1),className:`absolute right-2 top-1/2 -translate-y-1/2
144
153
  inline-flex items-center justify-center
145
154
  rounded-full p-1.5
146
155
  text-white
@@ -151,15 +160,7 @@ Valid keys: `+JSON.stringify(Object.keys(g),null," "));var Y=Se(ae,ie,K,ne,W+".
151
160
  focus-visible:ring-white/80
152
161
  focus-visible:ring-offset-2
153
162
  focus-visible:ring-offset-violet-700
154
- `,"data-testid":"close-button",children:C.jsx("svg",{viewBox:"0 0 24 24",width:"20",height:"20",fill:"none","aria-hidden":"true",className:"select-none outline-none",children:C.jsx("path",{d:"M6 6L18 18M6 18L18 6",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})})})})},Oc=({onStartNewDiscussion:e,className:t="",tone:n="light"})=>{const[r,i]=v.useState(!1),a=v.useRef(null),{openMenuTranslation:s,startNewDiscussionTranslation:o}=kc();v.useEffect(()=>{if(!r)return;const c=f=>{a.current?.contains(f.target)||i(!1)},d=f=>{f.key==="Escape"&&i(!1)};return document.addEventListener("mousedown",c),document.addEventListener("keydown",d),()=>{document.removeEventListener("mousedown",c),document.removeEventListener("keydown",d)}},[r]);const u=n==="dark"?"text-white bg-white/10 hover:bg-white/20 focus-visible:ring-white/80 focus-visible:ring-offset-violet-700":"text-slate-700 bg-slate-100 hover:bg-slate-200 focus-visible:ring-slate-400 focus-visible:ring-offset-white";return C.jsxs("div",{ref:a,className:`relative inline-flex ${t}`,onMouseDown:c=>c.stopPropagation(),children:[C.jsx("button",{type:"button","aria-label":s,"aria-haspopup":"menu","aria-expanded":r,onClick:()=>i(c=>!c),className:`inline-flex items-center justify-center rounded-full p-1.5 transition-transform duration-150 ease-out hover:scale-110 active:scale-95 focus:outline-none focus-visible:ring-offset-2 ${u}`,"data-testid":"discussion-menu-button",children:C.jsxs("svg",{viewBox:"0 0 24 24",width:"20",height:"20",fill:"none","aria-hidden":"true",className:"select-none outline-none",children:[C.jsx("circle",{cx:"5",cy:"12",r:"1.5",fill:"currentColor"}),C.jsx("circle",{cx:"12",cy:"12",r:"1.5",fill:"currentColor"}),C.jsx("circle",{cx:"19",cy:"12",r:"1.5",fill:"currentColor"})]})}),r&&C.jsx("div",{role:"menu",className:"absolute right-0 top-full z-30 mt-2 min-w-[210px] rounded-md border border-slate-200 bg-white p-1 shadow-lg",onMouseDown:c=>c.stopPropagation(),children:C.jsx("button",{type:"button",role:"menuitem",className:"block w-full rounded px-3 py-2 text-left text-sm text-slate-800 hover:bg-slate-100",onClick:()=>{e(),i(!1)},children:o})})]})},ty=({})=>{const{companySettings:e}=v.useContext(Pt);return C.jsx("div",{className:`assistant
155
- transition
156
- ease-in-out
157
- delay-50
158
- cursor-pointer
159
- flex
160
- justify-center
161
- items-center
162
- `,children:C.jsx(ua,{facet:e.agent.display[ke.AgentDisplayFacetRoleType.ASSISTANT]})})},ny=({logo:e,label:t,className:n})=>C.jsxs("div",{className:`flex items-center gap-2 logoWrapper${n?` ${n}`:""}`,children:[e,C.jsx("p",{className:"font-bold",children:t})]}),ry=v.forwardRef(({props:e},t)=>{const{companySettings:n}=v.useContext(Pt),{resetConversation:r}=Pa(),i=n.agent?.customNameToDisplay||"Assistant";return C.jsxs("div",{ref:t,className:`
163
+ `,"data-testid":"close-button",children:S.jsx("svg",{viewBox:"0 0 24 24",width:"20",height:"20",fill:"none","aria-hidden":"true",className:"select-none outline-none",children:S.jsx("path",{d:"M6 6L18 18M6 18L18 6",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})})})})},sd=({onStartNewDiscussion:e,className:t="",tone:n="light"})=>{const[r,i]=C.useState(!1),a=C.useRef(null),{openMenuTranslation:s,startNewDiscussionTranslation:o}=ad();C.useEffect(()=>{if(!r)return;const c=f=>{a.current?.contains(f.target)||i(!1)},d=f=>{f.key==="Escape"&&i(!1)};return document.addEventListener("mousedown",c),document.addEventListener("keydown",d),()=>{document.removeEventListener("mousedown",c),document.removeEventListener("keydown",d)}},[r]);const u=n==="dark"?"text-white bg-white/10 hover:bg-white/20 focus-visible:ring-white/80 focus-visible:ring-offset-violet-700":"text-slate-700 bg-slate-100 hover:bg-slate-200 focus-visible:ring-slate-400 focus-visible:ring-offset-white";return S.jsxs("div",{ref:a,className:`relative inline-flex ${t}`,onMouseDown:c=>c.stopPropagation(),children:[S.jsx("button",{type:"button","aria-label":s,"aria-haspopup":"menu","aria-expanded":r,onClick:()=>i(c=>!c),className:`inline-flex items-center justify-center rounded-full p-1.5 transition-transform duration-150 ease-out hover:scale-110 active:scale-95 focus:outline-none focus-visible:ring-offset-2 ${u}`,"data-testid":"discussion-menu-button",children:S.jsxs("svg",{viewBox:"0 0 24 24",width:"20",height:"20",fill:"none","aria-hidden":"true",className:"select-none outline-none",children:[S.jsx("circle",{cx:"5",cy:"12",r:"1.5",fill:"currentColor"}),S.jsx("circle",{cx:"12",cy:"12",r:"1.5",fill:"currentColor"}),S.jsx("circle",{cx:"19",cy:"12",r:"1.5",fill:"currentColor"})]})}),r&&S.jsx("div",{role:"menu",className:"absolute right-0 top-full z-30 mt-2 min-w-[210px] rounded-md border border-slate-200 bg-white p-1 shadow-lg",onMouseDown:c=>c.stopPropagation(),children:S.jsx("button",{type:"button",role:"menuitem",className:"block w-full rounded px-3 py-2 text-left text-sm text-slate-800 hover:bg-slate-100",onClick:()=>{e(),i(!1)},children:o})})]})},_S=C.forwardRef(({props:e},t)=>{const{companySettings:n}=C.useContext(nn),{resetConversation:r}=ts(),i=n.agent?.customNameToDisplay||"Assistant";return S.jsxs("div",{ref:t,className:`
163
164
  chatBox
164
165
  fixed z-[2147483647]
165
166
  inset-0 w-screen h-[100svh] rounded-none
@@ -168,7 +169,7 @@ Valid keys: `+JSON.stringify(Object.keys(g),null," "));var Y=Se(ae,ie,K,ne,W+".
168
169
  md:h-[clamp(420px,70dvh,640px)]
169
170
  md:rounded-xl
170
171
  bg-white shadow-xl flex flex-col overflow-hidden
171
- `,children:[C.jsxs("div",{className:"pl-3 relative z-20 bg-violet-700 py-2 text-white text-left flex justify-start items-center chatsystem-header",children:[C.jsx(ny,{className:"chatSystem-widgetLogo",logo:C.jsx(ty,{}),label:i}),C.jsx("div",{className:"absolute right-12 top-1/2 -translate-y-1/2",children:C.jsx(Oc,{tone:"dark",onStartNewDiscussion:()=>r(n)})}),C.jsx(ey,{setIsWidgetOpen:e.setIsWidgetOpen})]}),C.jsx(Cc,{appToken:e.appToken})]})}),iy=({isWidgetOpen:e,appToken:t,setIsWidgetOpen:n})=>{const r=v.useRef(null);return v.useEffect(()=>{if(!e)return;const i=a=>{const s=r.current;if(!s)return;const o=typeof a.composedPath=="function"?a.composedPath():[];if(o.length>0){if(o.includes(s))return}else{const u=a.target;if(u&&s.contains(u))return}n(!1)};return document.addEventListener("pointerdown",i,!0),()=>{document.removeEventListener("pointerdown",i,!0)}},[e,n]),C.jsx("div",{children:C.jsx(Ba,{nodeRef:r,in:e,timeout:200,classNames:"menuTransition",unmountOnExit:!0,children:C.jsx(ry,{ref:r,props:{appToken:t,setIsWidgetOpen:n}})})})},ay=()=>{const{companySettings:e}=v.useContext(Pt),{resetConversation:t}=Pa();return C.jsx("div",{className:"relative z-20 flex justify-end px-2 pt-2",children:C.jsx(Oc,{tone:"light",onStartNewDiscussion:()=>t(e)})})},Lc=()=>({hasFetchedSettings:!1,hasDisplayedCSS:!1}),sy=()=>{const[e,t]=v.useState(Lc());return{appInternalContext:e,setAppInternalContext:t,setHasFetchedSettings:()=>{t(i=>({...i,hasFetchedSettings:!0}))},setHasDisplayedCss:()=>{t(i=>({...i,hasDisplayedCSS:!0}))}}},Rc=v.createContext({appInternalContext:Lc(),setAppInternalContext:()=>{},setHasFetchedSettings:()=>{}}),oy=({displayMode:e,appToken:t})=>{const[n,r]=v.useState(!1),{appInternalContext:i}=v.useContext(Rc);return C.jsxs(C.Fragment,{children:[e===bn.LAUNCHER&&i.hasFetchedSettings&&C.jsxs(C.Fragment,{children:[C.jsx(ed,{isWidgetOpen:n,setIsWidgetOpen:r}),C.jsx(iy,{isWidgetOpen:n,appToken:t,setIsWidgetOpen:r})]}),e===bn.CHATBOX&&i.hasFetchedSettings&&C.jsxs("div",{className:"chatBox w-full max-w-[1200px] mx-auto",children:[C.jsx(ay,{}),C.jsx(Cc,{appToken:t})]})]})},uy=e=>Object.values(bn).includes(e),ly=e=>{const t=Tt();return uy(e)?e:(t.warn(`Display mode not valid. Using ${bn.LAUNCHER} as default.`),bn.LAUNCHER)},cy=(e,t)=>{let n,r;return typeof window<"u"&&(r=window.localStorage.getItem(Ex)),r&&e?.[r]!==void 0?n=e[r]:(n=e[t],n.isDefault=!0),n},dy=(e,t)=>{const[n,r]=v.useState(e[t]),i=a=>{Object.keys(e).includes(a?.locale)?r(a):r(e[at.ENGLISH])};return v.useEffect(()=>{let a=cy(e,t);a.locale!==t&&r(e[a.locale])},[]),{appCurrentLang:n,handleSetContextCurrentLang:i}},fy=e=>Object.values(at).includes(e),hy=(e,t)=>{const n=t??Tt();return fy(e)?e:(n.warn(`Language ${e} not handled for now. Using ${at.ENGLISH}.`),at.ENGLISH)};function my(e,t=Date.now()){return t-e}function py(e,t=Date.now()){return my(new Date(e).getTime(),t)<=Lx}function gy({settings:e,setCurrentConversation:t,setArchivedConversation:n}){const r=Mx({key:Ac});if(!r){t({discussionId:null,items:[{userType:"assistant",content:e.agent.text.initialText,temporaryId:crypto.randomUUID()}]});return}py(r.updatedAt)?t({discussionId:r.discussionId,items:r.items,updatedAt:r.updatedAt}):(t({discussionId:null,items:[{userType:"assistant",content:e.agent.text.initialText,temporaryId:crypto.randomUUID()}]}),n({discussionId:r.discussionId,items:r.items,updatedAt:r.updatedAt}))}const by=({agentId:e,appToken:t,onFetched:n})=>{const r=Qt(),[i,a]=v.useState({}),s={companySettings:i,setCompanySettings:a},[o,u]=v.useState({discussionId:null,items:[],updatedAt:null}),[c,d]=v.useState({discussionId:null,items:[],updatedAt:null}),f={currentConversation:o,setCurrentConversation:u,archivedConversation:c,setArchivedConversation:d};return v.useEffect(()=>{const m=zn.getApiUrl(),h=zn.getFetchConfig({httpVerb:"GET",contentType:"application/json"});let b=`${m}/company/settings/${t}`;b+=`/${e}`,fetch(b,{...h,credentials:"omit"}).then(async A=>{const w=await A.json();a(w),gy({settings:w,setCurrentConversation:u,setArchivedConversation:d}),n?.()}).catch(A=>{r.warn("error in settings fetch",A)})},[t,e,r]),{contextCompanySettings:s,contextInitialConversationState:f}};function Ey(e,t={},n,r){const i=Qt(),{id:a,nonce:s,target:o,disableConstructable:u}=t,c=o,d=v.useRef(null),f=v.useRef(null);v.useEffect(()=>{if(!o)return;if(!e){n&&(i.log("No custom css found."),r?.());return}if(!u&&"adoptedStyleSheets"in c&&typeof CSSStyleSheet<"u"&&"replaceSync"in CSSStyleSheet.prototype)return d.current||(d.current=new CSSStyleSheet,c.adoptedStyleSheets=[...c.adoptedStyleSheets,d.current]),d.current.replaceSync(e),i.log("Loading custom css via stylesheet."),r?.(),()=>{const h=c.adoptedStyleSheets||[],b=h.indexOf(d.current);if(b>=0){const A=h.slice();A.splice(b,1),c.adoptedStyleSheets=A}d.current=null};if(!f.current){const h=document.createElement("style");h.type="text/css",a&&(h.id=a),s&&(h.nonce=s),(c instanceof Document&&c.head||c).appendChild(h),f.current=h}return f.current.textContent=e,i.log("Loading custom css via style tag."),r?.(),()=>{f.current?.parentNode?.removeChild(f.current),f.current=null}},[e,a,s,o,u,i])}function Ty(e,t){const{manifest:n,origins:r}=xy(e,t);r.forEach($c),Gc(n),zc(n)}function xy(e,t){const n=t??Tt(),r=yy(e),i=new Set,a=new Set,s=new Set,o=new Set;for(const{url:d,mode:f}of r)switch(Ay(f,d,n)){case"svg":a.add(d);break;case"lottie":s.add(d);break;case"spritesheet":o.add(d);break;case"image":i.add(d);break}const u={images:Array.from(i),svgs:Array.from(a),lotties:Array.from(s),sprites:Array.from(o)},c=_y(u,n);return{manifest:u,origins:c}}function yy(e){if(!e?.agent?.display)return[];const t=e.agent.display,n=[t.launcher,t.assistant,t.search].filter(Boolean),r=[];for(const i of n)i?.assetUrl&&r.push({url:i.assetUrl,mode:i.mode});return r}function Ay(e,t,n){if(e)switch(e){case"svg":return"svg";case"lottie":return"lottie";case"spritesheet":return"spritesheet";case"image":return"image";case"video":return"video"}try{const i=new URL(t,document.baseURI).pathname.toLowerCase();if(i.endsWith(".svg"))return"svg";if(i.endsWith(".lottie")||i.endsWith(".zip")||i.endsWith(".json"))return i.endsWith(".json"),"lottie";if(/\.(png|webp|jpg|jpeg|gif|avi,ef)$/.test(i))return"image";if(/\.(mp4|webm|mov|m4v|ogg)$/.test(i))return"video"}catch(r){n.warn("error in normalizeKind:",r)}return"unknown"}function _y(e,t){const n=new Set,r=i=>{if(i)try{const a=new URL(i,document.baseURI);n.add(`${a.protocol}//${a.host}`)}catch(a){t.warn("error in uniqueOriginsFromManifest",a)}};return(e.images??[]).forEach(r),(e.svgs??[]).forEach(r),(e.lotties??[]).forEach(r),(e.sprites??[]).forEach(r),Array.from(n)}const Cy=({children:e,appToken:t,agentId:n,appRoot:r,logger:i})=>{var a=navigator.language;i.log("Brower language",a);const s=hy(a,i),{appCurrentLang:o,handleSetContextCurrentLang:u}=dy(Gr,s),c={appCurrentLang:o,setAppCurrentLang:u},d=sy(),{contextCompanySettings:f,contextInitialConversationState:m}=by({agentId:n,appToken:t,onFetched:d.setHasFetchedSettings});return Ty(f.companySettings,i),Ey(f.companySettings?.agent?.display?.CSSRules,{id:`${n}`,target:r},d.appInternalContext.hasFetchedSettings,d.setHasDisplayedCss),C.jsx(C.Fragment,{children:C.jsx($o.Provider,{value:i,children:C.jsx(Sf,{locale:o?.locale,messages:o?.translatedText,children:C.jsx(xc.Provider,{value:c,children:C.jsx(Rc.Provider,{value:d,children:C.jsx(Pt.Provider,{value:f,children:C.jsx(_c.Provider,{value:m,children:d.appInternalContext.hasDisplayedCSS&&e})})})})})})})};var bn=(e=>(e.LAUNCHER="launcher",e.CHATBOX="chatbox",e))(bn||{});function Sy({appToken:e,displayMode:t="launcher",agentId:n,appRoot:r}){const i=Qt();e||i.warn("appToken not defined in ai-client. Please see the documentation at URL_ERROR_IN_DOC");const a=ly(t);return i.log(`App boot in ${a} mode.`),C.jsx("div",{className:"chatSystemWidget app-root",id:"chatSystemWidget",children:C.jsx(Cy,{appToken:e,agentId:n,appRoot:r,logger:i,children:C.jsx(oy,{displayMode:a,appToken:e})})})}const wy=`*, ::before, ::after {
172
+ `,children:[S.jsxs("div",{className:"pl-3 relative z-20 bg-violet-700 py-2 text-white text-left flex justify-start items-center chatsystem-header",children:[S.jsx(Mc,{className:"chatSystem-widgetLogo",logo:S.jsx(Bc,{}),label:i}),S.jsx("div",{className:"absolute right-12 top-1/2 -translate-y-1/2",children:S.jsx(sd,{tone:"dark",onStartNewDiscussion:r})}),S.jsx(SS,{setIsWidgetOpen:e.setIsWidgetOpen})]}),S.jsx(Jc,{appToken:e.appToken,agentId:e.agentId})]})}),CS=({isWidgetOpen:e,appToken:t,agentId:n,setIsWidgetOpen:r})=>{const i=C.useRef(null);return C.useEffect(()=>{if(!e)return;const a=s=>{const o=i.current;if(!o)return;const u=typeof s.composedPath=="function"?s.composedPath():[];if(u.length>0){if(u.includes(o))return}else{const c=s.target;if(c&&o.contains(c))return}r(!1)};return document.addEventListener("pointerdown",a,!0),()=>{document.removeEventListener("pointerdown",a,!0)}},[e,r]),S.jsx("div",{children:S.jsx(rs,{nodeRef:i,in:e,timeout:200,classNames:"menuTransition",unmountOnExit:!0,children:S.jsx(_S,{ref:i,props:{appToken:t,agentId:n,setIsWidgetOpen:r}})})})},AS=()=>{const{resetConversation:e}=ts();return S.jsx("div",{className:"relative z-20 flex justify-end px-2 pt-2",children:S.jsx(sd,{tone:"light",onStartNewDiscussion:e})})},od=()=>({hasFetchedSettings:!1,hasDisplayedCSS:!1}),wS=()=>{const[e,t]=C.useState(od());return{appInternalContext:e,setAppInternalContext:t,setHasFetchedSettings:()=>{t(i=>({...i,hasFetchedSettings:!0}))},setHasDisplayedCss:()=>{t(i=>({...i,hasDisplayedCSS:!0}))}}},ud=C.createContext({appInternalContext:od(),setAppInternalContext:()=>{},setHasFetchedSettings:()=>{}}),IS=({displayMode:e,appToken:t,agentId:n})=>{const[r,i]=C.useState(!1),{appInternalContext:a}=C.useContext(ud);return S.jsxs(S.Fragment,{children:[e===Sn.LAUNCHER&&a.hasFetchedSettings&&S.jsxs(S.Fragment,{children:[S.jsx(Kd,{isWidgetOpen:r,setIsWidgetOpen:i}),S.jsx(CS,{isWidgetOpen:r,appToken:t,agentId:n,setIsWidgetOpen:i})]}),e===Sn.CHATBOX&&a.hasFetchedSettings&&S.jsxs("div",{className:"chatBox w-full max-w-[1200px] mx-auto",children:[S.jsx(AS,{}),S.jsx(Jc,{appToken:t,agentId:n})]})]})},vS=e=>Object.values(Sn).includes(e),kS=e=>{const t=Ct();return vS(e)?e:(t.warn(`Display mode not valid. Using ${Sn.LAUNCHER} as default.`),Sn.LAUNCHER)},NS=(e,t)=>{let n,r;return typeof window<"u"&&(r=window.localStorage.getItem(mx)),r&&e?.[r]!==void 0?n=e[r]:(n=e[t],n.isDefault=!0),n},OS=(e,t)=>{const[n,r]=C.useState(e[t]),i=a=>{Object.keys(e).includes(a?.locale)?r(a):r(e[ct.ENGLISH])};return C.useEffect(()=>{let a=NS(e,t);a.locale!==t&&r(e[a.locale])},[]),{appCurrentLang:n,handleSetContextCurrentLang:i}},RS=e=>Object.values(ct).includes(e),LS=(e,t)=>{const n=t??Ct();return RS(e)?e:(n.warn(`Language ${e} not handled for now. Using ${ct.ENGLISH}.`),ct.ENGLISH)};function DS(e,t=Date.now()){return t-e}function PS(e,t=Date.now()){return DS(new Date(e).getTime(),t)<=vx}function MS({settings:e,setCurrentConversation:t,setArchivedConversation:n}){const r=Vc({key:ei});if(!r){t({discussionId:null,items:[{userType:"assistant",content:e.agent.text.initialText,temporaryId:crypto.randomUUID()}]});return}PS(r.updatedAt)?t({discussionId:r.discussionId,items:r.items,updatedAt:r.updatedAt}):(t({discussionId:null,items:[{userType:"assistant",content:e.agent.text.initialText,temporaryId:crypto.randomUUID()}]}),n({discussionId:r.discussionId,items:r.items,updatedAt:r.updatedAt}))}const BS=({agentId:e,appToken:t,onFetched:n})=>{const r=_n(),[i,a]=C.useState({}),s={companySettings:i,setCompanySettings:a},[o,u]=C.useState({discussionId:null,items:[],updatedAt:null}),[c,d]=C.useState({discussionId:null,items:[],updatedAt:null}),[f,p]=C.useState(()=>Mx()),[h,b]=C.useState(0),w={currentConversation:o,setCurrentConversation:u,archivedConversation:c,setArchivedConversation:d,chatboxBootState:f,setChatboxBootState:p,resetConversationRequestId:h,resetConversation:()=>{Px(),p({mode:St.ai,customerSupportState:null,reason:"manual_start_new_conversation"}),u({discussionId:null,items:[{userType:"assistant",content:i?.agent?.text?.initialText,temporaryId:crypto.randomUUID()}],updatedAt:null}),b(_=>_+1)}};return C.useEffect(()=>{const _=xt.getApiUrl(),k=xt.getFetchConfig({httpVerb:"GET",contentType:"application/json"});let N=`${_}/company/settings/${t}`;N+=`/${e}`,fetch(N,{...k,credentials:"omit"}).then(async L=>{const A=await L.json();a(A),MS({settings:A,setCurrentConversation:u,setArchivedConversation:d}),n?.()}).catch(L=>{r.warn("error in settings fetch",L)})},[t,e,r]),{contextCompanySettings:s,contextInitialConversationState:w}};function FS(e,t={},n,r){const i=_n(),{id:a,nonce:s,target:o,disableConstructable:u}=t,c=o,d=C.useRef(null),f=C.useRef(null);C.useEffect(()=>{if(!o)return;if(!e){n&&(i.log("No custom css found."),r?.());return}if(!u&&"adoptedStyleSheets"in c&&typeof CSSStyleSheet<"u"&&"replaceSync"in CSSStyleSheet.prototype)return d.current||(d.current=new CSSStyleSheet,c.adoptedStyleSheets=[...c.adoptedStyleSheets,d.current]),d.current.replaceSync(e),i.log("Loading custom css via stylesheet."),r?.(),()=>{const h=c.adoptedStyleSheets||[],b=h.indexOf(d.current);if(b>=0){const y=h.slice();y.splice(b,1),c.adoptedStyleSheets=y}d.current=null};if(!f.current){const h=document.createElement("style");h.type="text/css",a&&(h.id=a),s&&(h.nonce=s),(c instanceof Document&&c.head||c).appendChild(h),f.current=h}return f.current.textContent=e,i.log("Loading custom css via style tag."),r?.(),()=>{f.current?.parentNode?.removeChild(f.current),f.current=null}},[e,a,s,o,u,i])}function HS(e,t){const{manifest:n,origins:r}=US(e,t);r.forEach(Ud),zd(n),Hd(n)}function US(e,t){const n=t??Ct(),r=jS(e),i=new Set,a=new Set,s=new Set,o=new Set;for(const{url:d,mode:f}of r)switch(zS(f,d,n)){case"svg":a.add(d);break;case"lottie":s.add(d);break;case"spritesheet":o.add(d);break;case"image":i.add(d);break}const u={images:Array.from(i),svgs:Array.from(a),lotties:Array.from(s),sprites:Array.from(o)},c=$S(u,n);return{manifest:u,origins:c}}function jS(e){if(!e?.agent?.display)return[];const t=e.agent.display,n=[t.launcher,t.assistant,t.search].filter(Boolean),r=[];for(const i of n)i?.assetUrl&&r.push({url:i.assetUrl,mode:i.mode});return r}function zS(e,t,n){if(e)switch(e){case"svg":return"svg";case"lottie":return"lottie";case"spritesheet":return"spritesheet";case"image":return"image";case"video":return"video"}try{const i=new URL(t,document.baseURI).pathname.toLowerCase();if(i.endsWith(".svg"))return"svg";if(i.endsWith(".lottie")||i.endsWith(".zip")||i.endsWith(".json"))return i.endsWith(".json"),"lottie";if(/\.(png|webp|jpg|jpeg|gif|avi,ef)$/.test(i))return"image";if(/\.(mp4|webm|mov|m4v|ogg)$/.test(i))return"video"}catch(r){n.warn("error in normalizeKind:",r)}return"unknown"}function $S(e,t){const n=new Set,r=i=>{if(i)try{const a=new URL(i,document.baseURI);n.add(`${a.protocol}//${a.host}`)}catch(a){t.warn("error in uniqueOriginsFromManifest",a)}};return(e.images??[]).forEach(r),(e.svgs??[]).forEach(r),(e.lotties??[]).forEach(r),(e.sprites??[]).forEach(r),Array.from(n)}const YS=({children:e,appToken:t,agentId:n,appRoot:r,logger:i})=>{var a=navigator.language;i.log("Brower language",a);const s=LS(a,i),{appCurrentLang:o,handleSetContextCurrentLang:u}=OS(Jr,s),c={appCurrentLang:o,setAppCurrentLang:u},d=wS(),{contextCompanySettings:f,contextInitialConversationState:p}=BS({agentId:n,appToken:t,onFetched:d.setHasFetchedSettings});return HS(f.companySettings,i),FS(f.companySettings?.agent?.display?.CSSRules,{id:`${n}`,target:r},d.appInternalContext.hasFetchedSettings,d.setHasDisplayedCss),S.jsx(S.Fragment,{children:S.jsx(mu.Provider,{value:i,children:S.jsx(Sh,{locale:o?.locale,messages:o?.translatedText,children:S.jsx(qc.Provider,{value:c,children:S.jsx(ud.Provider,{value:d,children:S.jsx(nn.Provider,{value:f,children:S.jsx(Zc.Provider,{value:p,children:d.appInternalContext.hasDisplayedCSS&&e})})})})})})})};var Sn=(e=>(e.LAUNCHER="launcher",e.CHATBOX="chatbox",e))(Sn||{});function GS({appToken:e,displayMode:t="launcher",agentId:n,appRoot:r}){const i=_n();e||i.warn("appToken not defined in ai-client. Please see the documentation at URL_ERROR_IN_DOC");const a=kS(t);return i.log(`App boot in ${a} mode.`),S.jsx("div",{className:"chatSystemWidget app-root",id:"chatSystemWidget",children:S.jsx(YS,{appToken:e,agentId:n,appRoot:r,logger:i,children:S.jsx(IS,{displayMode:a,appToken:e,agentId:n})})})}const qS=`*, ::before, ::after {
172
173
  --tw-border-spacing-x: 0;
173
174
  --tw-border-spacing-y: 0;
174
175
  --tw-translate-x: 0;
@@ -2070,7 +2071,7 @@ video {
2070
2071
  padding-right: 6rem;
2071
2072
  }
2072
2073
  }
2073
- `,vy=`
2074
+ `,VS=`
2074
2075
  .chatBox {
2075
2076
  overflow-x: hidden; /* Hide horizontal scrollbar */
2076
2077
  overflow-wrap: anywhere;
@@ -2123,7 +2124,179 @@ video {
2123
2124
  height: 100%;
2124
2125
  }
2125
2126
 
2126
- `,Iy=`/* React-Css Transitions */
2127
+
2128
+
2129
+ .customer-support-fallback {
2130
+ margin: 0.5rem 0 0;
2131
+ border: 1px solid rgba(22, 163, 74, 0.28);
2132
+ border-radius: 8px;
2133
+ background: #f0fdf4;
2134
+ box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
2135
+ animation: customer-support-fallback-in 180ms ease-out;
2136
+ overflow: hidden;
2137
+ }
2138
+
2139
+ .customer-support-fallback__form {
2140
+ display: flex;
2141
+ flex-direction: column;
2142
+ gap: 0.55rem;
2143
+ padding: 0.75rem;
2144
+ }
2145
+
2146
+ .customer-support-fallback__copy strong {
2147
+ display: block;
2148
+ color: #14532d;
2149
+ font-size: 0.92rem;
2150
+ line-height: 1.25;
2151
+ }
2152
+
2153
+ .customer-support-fallback__copy p,
2154
+ .customer-support-fallback__success p,
2155
+ .customer-support-fallback__error {
2156
+ margin: 0.18rem 0 0;
2157
+ font-size: 0.82rem;
2158
+ line-height: 1.35;
2159
+ }
2160
+
2161
+ .customer-support-fallback__copy p {
2162
+ color: #166534;
2163
+ }
2164
+
2165
+ .customer-support-fallback__fields {
2166
+ display: grid;
2167
+ grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
2168
+ gap: 0.45rem;
2169
+ }
2170
+
2171
+ .customer-support-fallback__fields input,
2172
+ .customer-support-fallback__fields textarea {
2173
+ min-width: 0;
2174
+ border: 1px solid rgba(21, 128, 61, 0.32);
2175
+ border-radius: 7px;
2176
+ background: rgba(255, 255, 255, 0.92);
2177
+ color: #0f172a;
2178
+ font-size: 0.88rem;
2179
+ line-height: 1.2;
2180
+ padding: 0.55rem 0.6rem;
2181
+ outline: none;
2182
+ }
2183
+
2184
+ .customer-support-fallback__fields textarea {
2185
+ grid-column: 1 / -1;
2186
+ min-height: 4.25rem;
2187
+ resize: vertical;
2188
+ }
2189
+
2190
+ .customer-support-fallback__schedule {
2191
+ font-weight: 600;
2192
+ }
2193
+
2194
+ .customer-support-fallback--closed-hours {
2195
+ border-color: rgba(13, 148, 136, 0.3);
2196
+ background: #ecfdf5;
2197
+ }
2198
+
2199
+ .customer-support-fallback__fields input:focus,
2200
+ .customer-support-fallback__fields textarea:focus {
2201
+ border-color: #16a34a;
2202
+ box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.16);
2203
+ }
2204
+
2205
+ .customer-support-fallback__submit {
2206
+ align-self: flex-end;
2207
+ display: inline-flex;
2208
+ align-items: center;
2209
+ justify-content: center;
2210
+ gap: 0.4rem;
2211
+ min-height: 2.1rem;
2212
+ min-width: 6.25rem;
2213
+ border: 0;
2214
+ border-radius: 7px;
2215
+ background: #15803d;
2216
+ color: white;
2217
+ cursor: pointer;
2218
+ font-size: 0.86rem;
2219
+ font-weight: 600;
2220
+ padding: 0.5rem 0.85rem;
2221
+ }
2222
+
2223
+ .customer-support-fallback__submit:disabled {
2224
+ cursor: default;
2225
+ opacity: 0.82;
2226
+ }
2227
+
2228
+ .customer-support-fallback__spinner {
2229
+ width: 0.9rem;
2230
+ height: 0.9rem;
2231
+ border: 2px solid rgba(255, 255, 255, 0.35);
2232
+ border-top-color: white;
2233
+ border-radius: 999px;
2234
+ animation: customer-support-fallback-spin 700ms linear infinite;
2235
+ }
2236
+
2237
+ .customer-support-fallback__success {
2238
+ display: flex;
2239
+ align-items: center;
2240
+ gap: 0.6rem;
2241
+ padding: 0.8rem;
2242
+ color: #14532d;
2243
+ }
2244
+
2245
+ .customer-support-fallback__check {
2246
+ display: inline-flex;
2247
+ align-items: center;
2248
+ justify-content: center;
2249
+ flex: 0 0 auto;
2250
+ width: 1.65rem;
2251
+ height: 1.65rem;
2252
+ border-radius: 999px;
2253
+ background: #16a34a;
2254
+ color: white;
2255
+ font-size: 1rem;
2256
+ font-weight: 700;
2257
+ animation: customer-support-fallback-check 220ms ease-out;
2258
+ }
2259
+
2260
+ .customer-support-fallback__error {
2261
+ color: #b91c1c;
2262
+ }
2263
+
2264
+ @keyframes customer-support-fallback-in {
2265
+ from {
2266
+ opacity: 0;
2267
+ transform: translateY(6px);
2268
+ }
2269
+ to {
2270
+ opacity: 1;
2271
+ transform: translateY(0);
2272
+ }
2273
+ }
2274
+
2275
+ @keyframes customer-support-fallback-spin {
2276
+ to {
2277
+ transform: rotate(360deg);
2278
+ }
2279
+ }
2280
+
2281
+ @keyframes customer-support-fallback-check {
2282
+ from {
2283
+ transform: scale(0.82);
2284
+ }
2285
+ to {
2286
+ transform: scale(1);
2287
+ }
2288
+ }
2289
+
2290
+ @media (max-width: 520px) {
2291
+ .customer-support-fallback__fields {
2292
+ grid-template-columns: 1fr;
2293
+ }
2294
+
2295
+ .customer-support-fallback__submit {
2296
+ width: 100%;
2297
+ }
2298
+ }
2299
+ `,WS=`/* React-Css Transitions */
2127
2300
  .menuTransition-enter {
2128
2301
  opacity: 0;
2129
2302
  transform: scale(0.9) translateX(200px);
@@ -2192,7 +2365,7 @@ textarea::placeholder {
2192
2365
  .messagesContainer {
2193
2366
  outline:none
2194
2367
  }
2195
- `,Ny=`/* Core mic button */
2368
+ `,XS=`/* Core mic button */
2196
2369
  .mic-core {
2197
2370
  position: absolute;
2198
2371
  inset: 0;
@@ -2240,7 +2413,7 @@ textarea::placeholder {
2240
2413
  70% { opacity: 0.12; }
2241
2414
  100% { transform: scale(2.1); opacity: 0; }
2242
2415
  }
2243
- `,ky=`/* 1) Remove UA outline on the shadow host */
2416
+ `,QS=`/* 1) Remove UA outline on the shadow host */
2244
2417
  :host(:focus),
2245
2418
  :host(:focus-visible) { outline: none; }
2246
2419
 
@@ -2252,9 +2425,9 @@ textarea::placeholder {
2252
2425
 
2253
2426
  /* Ensure the wrapper itself doesn't get a default outline either */
2254
2427
  .app-root:focus { outline: none; }
2255
- `,Ro=`${wy}
2256
- ${vy}
2257
- ${Iy}
2258
- ${ky}
2259
- ${Ny}`;function Oy({cssHref:e,appToken:t,agentId:n,displayMode:r,shouldDisplayLogs:i,...a}){const s=r==="launcher"?"body":"inline",o=v.useRef(null),u=v.useRef(null),[c,d]=v.useState(null),[f,m]=v.useState(null),h=v.useMemo(()=>Hc(i),[i]);return Uc(h),v.useEffect(()=>{if(typeof document>"u")return;const b=s==="inline"?o.current:document.body;if(!b)return;const A=document.createElement("div");b.appendChild(A),u.current=A;const w=A.attachShadow({mode:"open",delegatesFocus:!0});m(w);let y=!1;try{if("adoptedStyleSheets"in w&&!e){const S=new CSSStyleSheet;S.replaceSync(Ro),w.adoptedStyleSheets=[...w.adoptedStyleSheets??[],S],y=!0}}catch{}if(!y)if(e){const S=document.createElement("link");S.rel="stylesheet",S.href=e,w.appendChild(S)}else{const S=document.createElement("style");S.textContent=Ro,w.appendChild(S)}const _=document.createElement("div");return w.appendChild(_),d(_),()=>{d(null),A.remove(),u.current=null}},[s,e]),C.jsxs(C.Fragment,{children:[s==="inline"&&C.jsx("div",{ref:o})," ",c&&In.createPortal(C.jsx(Sy,{...a,appToken:t,agentId:n,displayMode:r,appRoot:f}),c)]})}exports.App=Oy;
2428
+ `,au=`${qS}
2429
+ ${VS}
2430
+ ${WS}
2431
+ ${QS}
2432
+ ${XS}`;function KS({cssHref:e,appToken:t,agentId:n,displayMode:r,shouldDisplayLogs:i,...a}){const s=r==="launcher"?"body":"inline",o=C.useRef(null),u=C.useRef(null),[c,d]=C.useState(null),[f,p]=C.useState(null),h=C.useMemo(()=>Md(i),[i]);return Bd(h),C.useEffect(()=>{if(typeof document>"u")return;const b=s==="inline"?o.current:document.body;if(!b)return;const y=document.createElement("div");b.appendChild(y),u.current=y;const w=y.attachShadow({mode:"open",delegatesFocus:!0});p(w);let _=!1;try{if("adoptedStyleSheets"in w&&!e){const N=new CSSStyleSheet;N.replaceSync(au),w.adoptedStyleSheets=[...w.adoptedStyleSheets??[],N],_=!0}}catch{}if(!_)if(e){const N=document.createElement("link");N.rel="stylesheet",N.href=e,w.appendChild(N)}else{const N=document.createElement("style");N.textContent=au,w.appendChild(N)}const k=document.createElement("div");return w.appendChild(k),d(k),()=>{d(null),y.remove(),u.current=null}},[s,e]),S.jsxs(S.Fragment,{children:[s==="inline"&&S.jsx("div",{ref:o})," ",c&&Mn.createPortal(S.jsx(GS,{...a,appToken:t,agentId:n,displayMode:r,appRoot:f}),c)]})}exports.App=KS;
2260
2433
  //# sourceMappingURL=index.cjs.map