@chatsystem/client 1.1.74 → 1.1.75

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 _=require("react/jsx-runtime"),k=require("react"),Sn=require("react-dom"),yc=require("lottie-react"),Ac=require("@lottiefiles/dotlottie-react");function _c(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=_c(k),Sc=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 ta(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var At={},Ra;function Cc(){if(Ra)return At;Ra=1,Object.defineProperty(At,"__esModule",{value:!0}),At.OutputStreamTypesEnum=At.AgentDisplayFacetRoleType=At.AgentDisplayFacetModeType=void 0;var e;(function(r){r.SPRITESHEET="spritesheet",r.LOTTIE="lottie",r.IMAGE="image",r.SVG="svg",r.VIDEO="video"})(e||(At.AgentDisplayFacetModeType=e={}));var t;(function(r){r.LAUNCHER="launcher",r.ASSISTANT="assistant",r.SEARCH="search"})(t||(At.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||(At.OutputStreamTypesEnum=n={})),At}var Le=Cc();const jr=e=>({mode:Le.AgentDisplayFacetModeType.SVG,role:e}),wc=()=>({agent:{display:{name:"",CSSRules:"",[Le.AgentDisplayFacetRoleType.LAUNCHER]:jr(Le.AgentDisplayFacetRoleType.LAUNCHER),[Le.AgentDisplayFacetRoleType.ASSISTANT]:jr(Le.AgentDisplayFacetRoleType.ASSISTANT),[Le.AgentDisplayFacetRoleType.SEARCH]:jr(Le.AgentDisplayFacetRoleType.SEARCH)},text:{initialText:""},isAudioAllowed:!0},api:{settings:{maxUserMessagesPerDiscussion:20},tracking:{queryParamToAppend:""}}}),dn=k.createContext({companySettings:wc(),setCompanySettings:()=>{}}),un=globalThis;un.__WIDGET_ASSET_CACHE__||(un.__WIDGET_ASSET_CACHE__={svg:new Map,img:new Map,lot:new Map,spr:new Map});un.__WIDGET_PRELOAD_KEYS__||(un.__WIDGET_PRELOAD_KEYS__=new Set);const zr=un.__WIDGET_PRELOAD_KEYS__,Rt=un.__WIDGET_ASSET_CACHE__,vc="widget-assets-v1";async function Sr(e,t){try{const n=await caches.open(vc),r=await n.match(e,{ignoreSearch:!1});if(r)return r.clone();const i=await fetch(e,{cache:"force-cache",mode:"cors",keepalive:!0,...t});if(!i.ok)throw new Error(`HTTP ${i.status} for ${e}`);return n.put(e,i.clone()),i}catch(n){return console.log("error while fetching",n),new Response(null,{status:520,statusText:"Error in client - Fetch failed"})}}async function vu(e){const t=Rt.svg.get(e);if(t)return t.promise;const n=(async()=>{const i=await(await Sr(e)).text();if(typeof globalThis.DOMPurify<"u"&&typeof globalThis.DOMPurify.sanitize=="function")try{const s=new DOMParser().parseFromString(i,"image/svg+xml"),u=new XMLSerializer().serializeToString(s.documentElement);return{sanitized:globalThis.DOMPurify.sanitize(u,{USE_PROFILES:{svg:!0,svgFilters:!0}})}}catch{return{sanitized:globalThis.DOMPurify.sanitize(i,{USE_PROFILES:{svg:!0,svgFilters:!0}})}}else return{sanitized:i}})();return Rt.svg.set(e,{promise:n,ts:Date.now()}),n}function Iu(e){const t=Rt.img.get(e);if(t)return t.promise;const n=(async()=>{const i=await(await Sr(e)).blob();return{blobUrl:URL.createObjectURL(i)}})();return Rt.img.set(e,{promise:n,ts:Date.now()}),n}function Nu(e){const t=Rt.lot.get(e);if(t)return t.promise;const n=(async()=>{const i=await(await Sr(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 u=new TextDecoder().decode(a);return{kind:"json",data:JSON.parse(u)}})();return Rt.lot.set(e,{promise:n,ts:Date.now()}),n}function ku(e){const t=Rt.spr.get(e);if(t)return t.promise;const n=(async()=>{const i=await(await Sr(e)).blob();let a=null;try{a=await createImageBitmap(i)}catch{a=null}const{imgEl:s,width:u,height:o}=await new Promise((c,f)=>{const d=URL.createObjectURL(i),h=new Image;h.crossOrigin="anonymous",h.onload=()=>{const m=h.naturalWidth,b=h.naturalHeight;c({imgEl:h,width:m,height:b})},h.onerror=()=>{URL.revokeObjectURL(d),f(new Error("Spritesheet image decode failed"))},h.src=d,h.decode?.().catch(()=>{})});return{imgEl:s,bitmap:a,width:u,height:o}})();return Rt.spr.set(e,{promise:n,ts:Date.now()}),n}function Ic(e){e.images?.forEach(t=>void Iu(t)),e.svgs?.forEach(t=>void vu(t)),e.lotties?.forEach(t=>void Nu(t)),e.sprites?.forEach(t=>void ku(t))}function Nc(e){try{const t=document.createElement("link");t.rel="preconnect",t.href=e,t.crossOrigin="anonymous",document.head.appendChild(t);const n=document.createElement("link");n.rel="dns-prefetch",n.href=e,document.head.appendChild(n)}catch(t){console.log("error in injectPreconnect",t)}}function Ou(e){return new URL(e,document.baseURI).toString()}function kc(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 Wn(e,t,n,r){const i=Ou(n),a=`${e}|${t??""}|${i}`;if(zr.has(a))return;if(kc(t,i)){zr.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),zr.add(a)}function Oc(e){const t=s=>Array.from(new Set((s??[]).map(Ou))),n=t(e.images),r=t(e.svgs),i=t(e.lotties),a=t(e.sprites);n.forEach(s=>Wn("preload","image",s)),r.forEach(s=>Wn("preload","fetch",s,"image/svg+xml")),i.forEach(s=>Wn("preload","fetch",s,"application/zip")),a.forEach(s=>Wn("preload","fetch",s))}const Rc=({src:e})=>{const[t,n]=k.useState(null);return k.useEffect(()=>{let r=!1;return Iu(e).then(({blobUrl:i})=>{n(i)}).catch(()=>n(null)),()=>{t&&!r&&(URL.revokeObjectURL(t),r=!0)}},[e]),_.jsx("img",{src:t??e,decoding:"async",loading:"eager"})};function Lc(e){return!!e&&typeof e=="object"&&"blob"in e&&e.blob instanceof Blob}function Dc({src:e,autoplay:t=!0,loop:n=!0,className:r,style:i,placeholder:a,fallback:s,onLoaded:u,onError:o}){const[c,f]=k.useState({kind:"loading"});return k.useEffect(()=>{let d=null,h=!1;return f({kind:"loading"}),Nu(e).then(async m=>{if(!h)if(m.kind==="zip"){const b=Lc(m)?m.blob:await(await fetch(m.blobUrl)).blob();d=URL.createObjectURL(b),f({kind:"lottieZip",blobUrl:d}),u?.(d)}else f({kind:"json",data:m.data}),u?.(m.data)}).catch(m=>!h&&(f({kind:"error",err:m}),o?.(m))),()=>{h=!0,d&&URL.revokeObjectURL(d)}},[e]),c.kind==="loading"?_.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"?_.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"?_.jsx(yc,{animationData:c.data,loop:n,autoplay:t,className:r,style:i,rendererSettings:{preserveAspectRatio:"xMidYMid meet"}}):_.jsx(Ac.DotLottieReact,{src:c.blobUrl,loop:n,autoplay:t,className:r,style:i})}async function Pc(e,t={}){const{minPeriod:n=8,maxPeriod:r=Math.floor(Math.min(e.width,e.height)/2),gutterSearchRadius:i=3,debug:a=!1}=t;if(e.width<n*2||e.height<n*2)return a&&console.warn("detectGrid: image too small"),null;const s=document.createElement("canvas");s.width=e.naturalWidth,s.height=e.naturalHeight;const u=s.getContext("2d");if(!u)return null;u.drawImage(e,0,0);const{data:o}=u.getImageData(0,0,s.width,s.height),c=s.width,f=s.height,d=new Uint8ClampedArray(c*f);for(let w=0;w<f;w++){let j=w*c;for(let H=0;H<c;H++){const $=(j+H)*4;d[j+H]=.299*o[$]+.587*o[$+1]+.114*o[$+2]|0}}const h=new Float32Array(c),m=new Float32Array(f);for(let w=1;w<c-1;w++){let j=0;for(let H=0;H<f;H++){const $=H*c+w,Y=d[$+1]-d[$-1];j+=Math.abs(Y)}h[w]=j}for(let w=1;w<f-1;w++){let j=0;for(let H=0;H<c;H++){const $=w*c+H,Y=d[$+c]-d[$-c];j+=Math.abs(Y)}m[w]=j}const b=La(h,n,Math.min(r,c/2)),A=La(m,n,Math.min(r,f/2));if(!b||!A)return a&&console.warn("detectGrid: could not find periods"),null;const C=Math.max(1,Math.round(c/b)),y=Math.max(1,Math.round(f/A)),S=Da(h,b,C,i),v=Da(m,A,y,i),D=Math.max(1,b-S),N=Math.max(1,A-v);if(D*C>c+2||N*y>f+2)return a&&console.warn("detectGrid: sanity check failed"),null;const O=_i(h,60),q=_i(m,60),ue=Math.max(0,Pa(h,O)),G=Math.max(0,Pa(m,q));return a&&console.log({periodX:b,periodY:A,columns:C,rows:y,gutterX:S,gutterY:v,frameWidth:D,frameHeight:N,originX:ue,originY:G}),{columns:C,rows:y,frameWidth:D,frameHeight:N,gutterX:S,gutterY:v,originX:ue,originY:G}}function La(e,t,n){const r=Ru(e);let i=0;for(let m=0;m<e.length;m++){const b=e[m]-r;i+=b*b}if(i===0)return null;const a=new Float32Array(n+1);let s=0,u=-1/0;for(let m=t;m<=n;m++){let b=0;for(let C=0;C+m<e.length;C++)b+=(e[C]-r)*(e[C+m]-r);const A=b/i;a[m]=A,A>u&&(u=A,s=m)}if(s<=t||s>=n)return s||null;const o=a[s-1],c=a[s],f=a[s+1],d=o-2*c+f,h=d===0?0:.5*(o-f)/d;return s+h}function Da(e,t,n,r){const i=[];for(let u=1;u<n;u++){const o=u*t;let c=1/0,f=o;for(let d=-r;d<=r;d++){const h=o+d;if(h<=0||h>=e.length)continue;const m=e[h];m<c&&(c=m,f=h)}i.push(f)}if(i.length<1)return 0;let a=[];for(const u of i){const o=e[u]*1.5+_i(e,10)*.5;let c=u,f=u;for(;c>1&&e[c-1]<=o;)c--;for(;f<e.length-2&&e[f+1]<=o;)f++;a.push(Math.max(0,f-c+1))}const s=Math.round(Ru(a));return Math.max(0,Math.min(s,Math.floor(t/4)))}function Ru(e){let t=0;for(let n=0;n<e.length;n++)t+=e[n];return t/e.length}function _i(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 Pa(e,t){for(let n=0;n<e.length;n++)if(e[n]>t)return n;return 0}function Mc(e,t,n,r,i){const{data:a}=e.getImageData(t,n,r,i);let s=0;for(let u=3;u<a.length;u+=4)s+=a[u];return s/(255*(a.length/4))<.03}const Bc=k.forwardRef(function({src:t,frameWidth:n,frameHeight:r,columns:i,rows:a,gutterX:s=0,gutterY:u=0,frameCount:o,atlasFrames:c,fps:f=12,autoplay:d=!0,loop:h=!0,startFrame:m=0,direction:b="forward",scale:A=1,backgroundColor:C,className:y,style:S,pauseWhenHidden:v=!1,originX:D,originY:N,onLoad:O,onEnd:q,onFrame:ue},G){const w=k.useRef(null),j=k.useRef(null),[H,$]=k.useState(null),[Y,J]=k.useState(null),[he,Se]=k.useState(null),[Oe,Re]=k.useState(!1),[p,U]=k.useState(!!d),[Z,T]=k.useState(m),Q=k.useRef(1),[ne,W]=k.useState(null),ee=Math.max(1,Math.floor(typeof window<"u"&&window.devicePixelRatio||1));k.useEffect(()=>{let V=!1;return Re(!1),ku(t).then(({imgEl:me,bitmap:be})=>{V||($(me),J(be),Se({w:me.naturalWidth,h:me.naturalHeight}),Re(!0),O?.())}).catch(()=>{}),()=>{V=!0}},[t,O]),k.useEffect(()=>{let V=!1;return(async()=>{if(!H)return;if(c&&c.length){W(null);return}if(!(!n||!r||!i||!a)){W(null);return}const be=await Pc(H,{debug:!0});V||(be?W({frameWidth:be.frameWidth,frameHeight:be.frameHeight,columns:be.columns,rows:be.rows,gutterX:be.gutterX,gutterY:be.gutterY}):(W(null),console.warn("RemoteSpritesheet: auto-detect failed; please provide grid props.")))})(),()=>{V=!0}},[H,c,n,r,i,a]);const re=ne?.frameWidth??n,ie=ne?.frameHeight??r,ae=ne?.columns??i,Ne=ne?.rows??a,z=ne?.gutterX??s,Pe=ne?.gutterY??u,Ze=ne?.originX??D??0,ct=ne?.originY??N??0,Ct=k.useMemo(()=>{if(c&&c.length>0)return{cols:0,rows:0};if(!he||!re||!ie)return{cols:0,rows:0};const V=ae??Math.floor((he.w+z)/(re+z)),me=Ne??Math.floor((he.h+Pe)/(ie+Pe));return{cols:Math.max(0,V),rows:Math.max(0,me)}},[c,he,re,ie,ae,Ne,z,Pe]),$e=k.useMemo(()=>{if(c?.length)return c;if(!re||!ie)return[];const{cols:V,rows:me}=Ct;if(!V||!me)return[];const be=Math.min(o??V*me,V*me),fe=[];for(let Ce=0;Ce<be;Ce++){const R=Ce%V,B=Math.floor(Ce/V),K=Ze+R*(re+z),le=ct+B*(ie+Pe);fe.push({x:K,y:le,w:re,h:ie})}if(H&&fe.length){const Ce=document.createElement("canvas");Ce.width=H.naturalWidth,Ce.height=H.naturalHeight;const R=Ce.getContext("2d");if(R){R.drawImage(H,0,0);let B=fe.length;for(;B>0&&Mc(R,fe[B-1].x,fe[B-1].y,fe[B-1].w,fe[B-1].h);)B--;return fe.slice(0,B)}}return fe},[c,Ct,o,re,ie,z,Pe,H,Ze,ct]),Kt=()=>{const V=w.current;if(!V||$e.length===0)return;const me=$e[Math.max(0,Math.min(Z,$e.length-1))],be=Math.max(1,Math.round(me.w*A)),fe=Math.max(1,Math.round(me.h*A));V.style.width=be+"px",V.style.height=fe+"px",V.width=be*ee,V.height=fe*ee};k.useEffect(()=>{Kt()},[Oe,A,$e.length,ee,Z]);const wt=V=>{const me=Y??H??null,be=w.current;if(!be||!me||$e.length===0)return;const fe=be.getContext("2d");if(!fe)return;fe.save(),fe.setTransform(1,0,0,1,0,0),fe.clearRect(0,0,be.width,be.height),C&&(fe.fillStyle=C,fe.fillRect(0,0,be.width,be.height));const Ce=$e[V];fe.scale(ee,ee),fe.drawImage(me,Ce.x,Ce.y,Ce.w,Ce.h,0,0,Math.round(Ce.w*A),Math.round(Ce.h*A)),fe.restore()};return k.useEffect(()=>{if(!Oe||$e.length===0)return;let V=performance.now();const me=1e3/Math.max(1,Math.min(120,f)),be=fe=>{if(j.current=requestAnimationFrame(be),!p){wt(Z);return}const Ce=fe-V;if(Ce<me){wt(Z);return}V=fe-Ce%me,T(R=>{const B=$e.length-1;let K=R;return b==="forward"?K=R+1:b==="backward"?K=R-1:((R>=B&&Q.current===1||R<=0&&Q.current===-1)&&(Q.current*=-1),K=R+Q.current),(K>B||K<0)&&(h?K=b==="backward"?B:0:(K=Math.max(0,Math.min(K,B)),U(!1),q?.())),K})};return j.current=requestAnimationFrame(be),()=>{j.current&&cancelAnimationFrame(j.current)}},[Oe,f,p,h,b,$e.length,Z]),k.useEffect(()=>{wt(Z),ue?.(Z)},[Z,Oe,A,ee]),k.useEffect(()=>{if(!v)return;const V=()=>{document.hidden&&U(!1)};return document.addEventListener("visibilitychange",V),()=>document.removeEventListener("visibilitychange",V)},[v]),k.useImperativeHandle(G,()=>({play:()=>U(!0),pause:()=>U(!1),toggle:()=>U(V=>!V),gotoFrame:V=>T(()=>Math.max(0,Math.min(V,Math.max(0,$e.length-1)))),isPlaying:()=>p,currentFrame:()=>Z}),[p,Z,$e.length]),_.jsx("div",{className:y,style:S,children:_.jsx("canvas",{ref:w,"aria-label":"spritesheet animation"})})});function Fc({url:e,className:t}){const[n,r]=k.useState(""),[i,a]=k.useState(null);return k.useEffect(()=>{let s=!1;return vu(e).then(({sanitized:u})=>{s||(r(u),a(null))}).catch(u=>!s&&a(u.message??"Failed to load")),()=>{s=!0}},[e]),i?_.jsxs("div",{className:t,role:"alert",children:["Couldn’t load SVG: ",i]}):n?_.jsx("div",{className:t,dangerouslySetInnerHTML:{__html:n}}):_.jsx("div",{className:t})}function Hc({mobile:e=.6,tablet:t=.8,desktop:n=1}){const[r,i]=k.useState(n);return k.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:u,value:o}of a)if(u.matches){i(o);break}};return a.forEach(({mq:u})=>u.addEventListener("change",s)),s(),()=>{a.forEach(({mq:u})=>u.removeEventListener("change",s))}},[e,t,n]),r}const na=({facet:e})=>{const{mode:t,assetUrl:n,spr_columns:r,spr_fps:i,spr_frameCount:a,spr_frameHeight:s,spr_frameWidth:u,spr_gutterX:o,spr_gutterY:c,spr_rows:f,spr_originX:d,spr_originY:h,spr_scaleDesktop:m,spr_scaleMobile:b,spr_scaleTablet:A}=e,C=Hc({mobile:b??.6,tablet:A??.8,desktop:m??1});return _.jsxs("div",{className:"assetContainer",children:[t===Le.AgentDisplayFacetModeType.LOTTIE&&_.jsx(Dc,{src:n,autoplay:!0,onError:y=>console.error(y)}),t===Le.AgentDisplayFacetModeType.SVG&&_.jsx("div",{children:_.jsx(Fc,{url:n})}),t===Le.AgentDisplayFacetModeType.IMAGE&&_.jsx(Rc,{src:n}),t===Le.AgentDisplayFacetModeType.SPRITESHEET&&_.jsx(Bc,{src:n,frameCount:a,columns:r,rows:f,fps:i,frameHeight:s,frameWidth:u,gutterX:o,gutterY:c,originX:d,originY:h,scale:C,autoplay:!0})]})},Uc=({isWidgetOpen:e,setIsWidgetOpen:t})=>{const{companySettings:n}=k.useContext(dn);return _.jsxs("div",{className:`launcher
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const S=require("react/jsx-runtime"),N=require("react"),wn=require("react-dom"),Ic=require("lottie-react"),vc=require("@lottiefiles/dotlottie-react");function Nc(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 Me=Nc(N),kc=e=>Me.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},Me.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 ra(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var xt={},Pa;function Oc(){if(Pa)return xt;Pa=1,Object.defineProperty(xt,"__esModule",{value:!0}),xt.OutputStreamTypesEnum=xt.AgentDisplayFacetRoleType=xt.AgentDisplayFacetModeType=void 0;var e;(function(r){r.SPRITESHEET="spritesheet",r.LOTTIE="lottie",r.IMAGE="image",r.SVG="svg",r.VIDEO="video"})(e||(xt.AgentDisplayFacetModeType=e={}));var t;(function(r){r.LAUNCHER="launcher",r.ASSISTANT="assistant",r.SEARCH="search"})(t||(xt.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||(xt.OutputStreamTypesEnum=n={})),xt}var Oe=Oc();const $r=e=>({mode:Oe.AgentDisplayFacetModeType.SVG,role:e}),Lc=()=>({agent:{display:{name:"",CSSRules:"",[Oe.AgentDisplayFacetRoleType.LAUNCHER]:$r(Oe.AgentDisplayFacetRoleType.LAUNCHER),[Oe.AgentDisplayFacetRoleType.ASSISTANT]:$r(Oe.AgentDisplayFacetRoleType.ASSISTANT),[Oe.AgentDisplayFacetRoleType.SEARCH]:$r(Oe.AgentDisplayFacetRoleType.SEARCH)},text:{initialText:""},isAudioAllowed:!0},api:{settings:{maxUserMessagesPerDiscussion:20},tracking:{queryParamToAppend:""}}}),mn=N.createContext({companySettings:Lc(),setCompanySettings:()=>{}}),ia=()=>{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 ku{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 Ou=new ku({isLocalDev:ia(),shouldDisplayLogs:!1});const Rc=e=>new ku({isLocalDev:ia(),shouldDisplayLogs:!!e}),Dc=e=>{Ou=e},gt=()=>Ou,ln=globalThis;ln.__WIDGET_ASSET_CACHE__||(ln.__WIDGET_ASSET_CACHE__={svg:new Map,img:new Map,lot:new Map,spr:new Map});ln.__WIDGET_PRELOAD_KEYS__||(ln.__WIDGET_PRELOAD_KEYS__=new Set);const Yr=ln.__WIDGET_PRELOAD_KEYS__,Nt=ln.__WIDGET_ASSET_CACHE__,Pc="widget-assets-v1";async function wr(e,t){const n=gt();try{const r=await caches.open(Pc),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=Nt.svg.get(e);if(t)return t.promise;const n=(async()=>{const i=await(await wr(e)).text();if(typeof globalThis.DOMPurify<"u"&&typeof globalThis.DOMPurify.sanitize=="function")try{const s=new DOMParser().parseFromString(i,"image/svg+xml"),u=new XMLSerializer().serializeToString(s.documentElement);return{sanitized:globalThis.DOMPurify.sanitize(u,{USE_PROFILES:{svg:!0,svgFilters:!0}})}}catch{return{sanitized:globalThis.DOMPurify.sanitize(i,{USE_PROFILES:{svg:!0,svgFilters:!0}})}}else return{sanitized:i}})();return Nt.svg.set(e,{promise:n,ts:Date.now()}),n}function Ru(e){const t=Nt.img.get(e);if(t)return t.promise;const n=(async()=>{const i=await(await wr(e)).blob();return{blobUrl:URL.createObjectURL(i)}})();return Nt.img.set(e,{promise:n,ts:Date.now()}),n}function Du(e){const t=Nt.lot.get(e);if(t)return t.promise;const n=(async()=>{const i=await(await wr(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 u=new TextDecoder().decode(a);return{kind:"json",data:JSON.parse(u)}})();return Nt.lot.set(e,{promise:n,ts:Date.now()}),n}function Pu(e){const t=Nt.spr.get(e);if(t)return t.promise;const n=(async()=>{const i=await(await wr(e)).blob();let a=null;try{a=await createImageBitmap(i)}catch{a=null}const{imgEl:s,width:u,height:l}=await new Promise((c,f)=>{const d=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(d),f(new Error("Spritesheet image decode failed"))},m.src=d,m.decode?.().catch(()=>{})});return{imgEl:s,bitmap:a,width:u,height:l}})();return Nt.spr.set(e,{promise:n,ts:Date.now()}),n}function Mc(e){e.images?.forEach(t=>void Ru(t)),e.svgs?.forEach(t=>void Lu(t)),e.lotties?.forEach(t=>void Du(t)),e.sprites?.forEach(t=>void Pu(t))}function Bc(e){const t=gt();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 Mu(e){return new URL(e,document.baseURI).toString()}function Fc(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 Qn(e,t,n,r){const i=Mu(n),a=`${e}|${t??""}|${i}`;if(Yr.has(a))return;if(Fc(t,i)){Yr.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),Yr.add(a)}function Hc(e){const t=s=>Array.from(new Set((s??[]).map(Mu))),n=t(e.images),r=t(e.svgs),i=t(e.lotties),a=t(e.sprites);n.forEach(s=>Qn("preload","image",s)),r.forEach(s=>Qn("preload","fetch",s,"image/svg+xml")),i.forEach(s=>Qn("preload","fetch",s,"application/zip")),a.forEach(s=>Qn("preload","fetch",s))}const Uc=({src:e})=>{const[t,n]=N.useState(null);return N.useEffect(()=>{let r=!1;return Ru(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 jc(e){return!!e&&typeof e=="object"&&"blob"in e&&e.blob instanceof Blob}function zc({src:e,autoplay:t=!0,loop:n=!0,className:r,style:i,placeholder:a,fallback:s,onLoaded:u,onError:l}){const[c,f]=N.useState({kind:"loading"});return N.useEffect(()=>{let d=null,m=!1;return f({kind:"loading"}),Du(e).then(async h=>{if(!m)if(h.kind==="zip"){const b=jc(h)?h.blob:await(await fetch(h.blobUrl)).blob();d=URL.createObjectURL(b),f({kind:"lottieZip",blobUrl:d}),u?.(d)}else f({kind:"json",data:h.data}),u?.(h.data)}).catch(h=>!m&&(f({kind:"error",err:h}),l?.(h))),()=>{m=!0,d&&URL.revokeObjectURL(d)}},[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(Ic,{animationData:c.data,loop:n,autoplay:t,className:r,style:i,rendererSettings:{preserveAspectRatio:"xMidYMid meet"}}):S.jsx(vc.DotLottieReact,{src:c.blobUrl,loop:n,autoplay:t,className:r,style:i})}async function $c(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=gt();if(e.width<n*2||e.height<n*2)return a&&s.warn("detectGrid: image too small"),null;const u=document.createElement("canvas");u.width=e.naturalWidth,u.height=e.naturalHeight;const l=u.getContext("2d");if(!l)return null;l.drawImage(e,0,0);const{data:c}=l.getImageData(0,0,u.width,u.height),f=u.width,d=u.height,m=new Uint8ClampedArray(f*d);for(let j=0;j<d;j++){let $=j*f;for(let H=0;H<f;H++){const U=($+H)*4;m[$+H]=.299*c[U]+.587*c[U+1]+.114*c[U+2]|0}}const h=new Float32Array(f),b=new Float32Array(d);for(let j=1;j<f-1;j++){let $=0;for(let H=0;H<d;H++){const U=H*f+j,Q=m[U+1]-m[U-1];$+=Math.abs(Q)}h[j]=$}for(let j=1;j<d-1;j++){let $=0;for(let H=0;H<f;H++){const U=j*f+H,Q=m[U+f]-m[U-f];$+=Math.abs(Q)}b[j]=$}const A=Ma(h,n,Math.min(r,f/2)),_=Ma(b,n,Math.min(r,d/2));if(!A||!_)return a&&s.warn("detectGrid: could not find periods"),null;const x=Math.max(1,Math.round(f/A)),I=Math.max(1,Math.round(d/_)),C=Ba(h,A,x,i),D=Ba(b,_,I,i),k=Math.max(1,A-C),O=Math.max(1,_-D);if(k*x>f+2||O*I>d+2)return a&&s.warn("detectGrid: sanity check failed"),null;const G=Ci(h,60),oe=Ci(b,60),ae=Math.max(0,Fa(h,G)),w=Math.max(0,Fa(b,oe));return a&&s.log({periodX:A,periodY:_,columns:x,rows:I,gutterX:C,gutterY:D,frameWidth:k,frameHeight:O,originX:ae,originY:w}),{columns:x,rows:I,frameWidth:k,frameHeight:O,gutterX:C,gutterY:D,originX:ae,originY:w}}function Ma(e,t,n){const r=Bu(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,u=-1/0;for(let h=t;h<=n;h++){let b=0;for(let _=0;_+h<e.length;_++)b+=(e[_]-r)*(e[_+h]-r);const A=b/i;a[h]=A,A>u&&(u=A,s=h)}if(s<=t||s>=n)return s||null;const l=a[s-1],c=a[s],f=a[s+1],d=l-2*c+f,m=d===0?0:.5*(l-f)/d;return s+m}function Ba(e,t,n,r){const i=[];for(let u=1;u<n;u++){const l=u*t;let c=1/0,f=l;for(let d=-r;d<=r;d++){const m=l+d;if(m<=0||m>=e.length)continue;const h=e[m];h<c&&(c=h,f=m)}i.push(f)}if(i.length<1)return 0;let a=[];for(const u of i){const l=e[u]*1.5+Ci(e,10)*.5;let c=u,f=u;for(;c>1&&e[c-1]<=l;)c--;for(;f<e.length-2&&e[f+1]<=l;)f++;a.push(Math.max(0,f-c+1))}const s=Math.round(Bu(a));return Math.max(0,Math.min(s,Math.floor(t/4)))}function Bu(e){let t=0;for(let n=0;n<e.length;n++)t+=e[n];return t/e.length}function Ci(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 Fa(e,t){for(let n=0;n<e.length;n++)if(e[n]>t)return n;return 0}function Yc(e,t,n,r,i){const{data:a}=e.getImageData(t,n,r,i);let s=0;for(let u=3;u<a.length;u+=4)s+=a[u];return s/(255*(a.length/4))<.03}const Fu=N.createContext(gt()),Wt=()=>N.useContext(Fu),Gc=N.forwardRef(function({src:t,frameWidth:n,frameHeight:r,columns:i,rows:a,gutterX:s=0,gutterY:u=0,frameCount:l,atlasFrames:c,fps:f=12,autoplay:d=!0,loop:m=!0,startFrame:h=0,direction:b="forward",scale:A=1,backgroundColor:_,className:x,style:I,pauseWhenHidden:C=!1,originX:D,originY:k,onLoad:O,onEnd:G,onFrame:oe},ae){const w=Wt(),j=N.useRef(null),$=N.useRef(null),[H,U]=N.useState(null),[Q,me]=N.useState(null),[xe,Re]=N.useState(null),[De,p]=N.useState(!1),[z,K]=N.useState(!!d),[T,Z]=N.useState(h),ie=N.useRef(1),[V,re]=N.useState(null),ne=Math.max(1,Math.floor(typeof window<"u"&&window.devicePixelRatio||1));N.useEffect(()=>{let q=!1;return p(!1),Pu(t).then(({imgEl:pe,bitmap:be})=>{q||(U(pe),me(be),Re({w:pe.naturalWidth,h:pe.naturalHeight}),p(!0),O?.())}).catch(()=>{}),()=>{q=!0}},[t,O]),N.useEffect(()=>{let q=!1;return(async()=>{if(!H)return;if(c&&c.length){re(null);return}if(!(!n||!r||!i||!a)){re(null);return}const be=await $c(H,{debug:!0});q||(be?re({frameWidth:be.frameWidth,frameHeight:be.frameHeight,columns:be.columns,rows:be.rows,gutterX:be.gutterX,gutterY:be.gutterY}):(re(null),w.warn("RemoteSpritesheet: auto-detect failed; please provide grid props.")))})(),()=>{q=!0}},[H,c,n,r,i,a,w]);const se=V?.frameWidth??n,J=V?.frameHeight??r,Ne=V?.columns??i,Y=V?.rows??a,ke=V?.gutterX??s,Ye=V?.gutterY??u,lt=V?.originX??D??0,Rt=V?.originY??k??0,Dt=N.useMemo(()=>{if(c&&c.length>0)return{cols:0,rows:0};if(!xe||!se||!J)return{cols:0,rows:0};const q=Ne??Math.floor((xe.w+ke)/(se+ke)),pe=Y??Math.floor((xe.h+Ye)/(J+Ye));return{cols:Math.max(0,q),rows:Math.max(0,pe)}},[c,xe,se,J,Ne,Y,ke,Ye]),Ue=N.useMemo(()=>{if(c?.length)return c;if(!se||!J)return[];const{cols:q,rows:pe}=Dt;if(!q||!pe)return[];const be=Math.min(l??q*pe,q*pe),de=[];for(let L=0;L<be;L++){const M=L%q,W=Math.floor(L/q),ee=lt+M*(se+ke),ye=Rt+W*(J+Ye);de.push({x:ee,y:ye,w:se,h:J})}if(H&&de.length){const L=document.createElement("canvas");L.width=H.naturalWidth,L.height=H.naturalHeight;const M=L.getContext("2d");if(M){M.drawImage(H,0,0);let W=de.length;for(;W>0&&Yc(M,de[W-1].x,de[W-1].y,de[W-1].w,de[W-1].h);)W--;return de.slice(0,W)}}return de},[c,Dt,l,se,J,ke,Ye,H,lt,Rt]),Jt=()=>{const q=j.current;if(!q||Ue.length===0)return;const pe=Ue[Math.max(0,Math.min(T,Ue.length-1))],be=Math.max(1,Math.round(pe.w*A)),de=Math.max(1,Math.round(pe.h*A));q.style.width=be+"px",q.style.height=de+"px",q.width=be*ne,q.height=de*ne};N.useEffect(()=>{Jt()},[De,A,Ue.length,ne,T]);const Pt=q=>{const pe=Q??H??null,be=j.current;if(!be||!pe||Ue.length===0)return;const de=be.getContext("2d");if(!de)return;de.save(),de.setTransform(1,0,0,1,0,0),de.clearRect(0,0,be.width,be.height),_&&(de.fillStyle=_,de.fillRect(0,0,be.width,be.height));const L=Ue[q];de.scale(ne,ne),de.drawImage(pe,L.x,L.y,L.w,L.h,0,0,Math.round(L.w*A),Math.round(L.h*A)),de.restore()};return N.useEffect(()=>{if(!De||Ue.length===0)return;let q=performance.now();const pe=1e3/Math.max(1,Math.min(120,f)),be=de=>{if($.current=requestAnimationFrame(be),!z){Pt(T);return}const L=de-q;if(L<pe){Pt(T);return}q=de-L%pe,Z(M=>{const W=Ue.length-1;let ee=M;return b==="forward"?ee=M+1:b==="backward"?ee=M-1:((M>=W&&ie.current===1||M<=0&&ie.current===-1)&&(ie.current*=-1),ee=M+ie.current),(ee>W||ee<0)&&(m?ee=b==="backward"?W:0:(ee=Math.max(0,Math.min(ee,W)),K(!1),G?.())),ee})};return $.current=requestAnimationFrame(be),()=>{$.current&&cancelAnimationFrame($.current)}},[De,f,z,m,b,Ue.length,T]),N.useEffect(()=>{Pt(T),oe?.(T)},[T,De,A,ne]),N.useEffect(()=>{if(!C)return;const q=()=>{document.hidden&&K(!1)};return document.addEventListener("visibilitychange",q),()=>document.removeEventListener("visibilitychange",q)},[C]),N.useImperativeHandle(ae,()=>({play:()=>K(!0),pause:()=>K(!1),toggle:()=>K(q=>!q),gotoFrame:q=>Z(()=>Math.max(0,Math.min(q,Math.max(0,Ue.length-1)))),isPlaying:()=>z,currentFrame:()=>T}),[z,T,Ue.length]),S.jsx("div",{className:x,style:I,children:S.jsx("canvas",{ref:j,"aria-label":"spritesheet animation"})})});function Vc({url:e,className:t}){const[n,r]=N.useState(""),[i,a]=N.useState(null);return N.useEffect(()=>{let s=!1;return Lu(e).then(({sanitized:u})=>{s||(r(u),a(null))}).catch(u=>!s&&a(u.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 qc({mobile:e=.6,tablet:t=.8,desktop:n=1}){const[r,i]=N.useState(n);return N.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:u,value:l}of a)if(u.matches){i(l);break}};return a.forEach(({mq:u})=>u.addEventListener("change",s)),s(),()=>{a.forEach(({mq:u})=>u.removeEventListener("change",s))}},[e,t,n]),r}const aa=({facet:e})=>{const t=Wt(),{mode:n,assetUrl:r,spr_columns:i,spr_fps:a,spr_frameCount:s,spr_frameHeight:u,spr_frameWidth:l,spr_gutterX:c,spr_gutterY:f,spr_rows:d,spr_originX:m,spr_originY:h,spr_scaleDesktop:b,spr_scaleMobile:A,spr_scaleTablet:_}=e,x=qc({mobile:A??.6,tablet:_??.8,desktop:b??1});return S.jsxs("div",{className:"assetContainer",children:[n===Oe.AgentDisplayFacetModeType.LOTTIE&&S.jsx(zc,{src:r,autoplay:!0,onError:I=>t.error(I)}),n===Oe.AgentDisplayFacetModeType.SVG&&S.jsx("div",{children:S.jsx(Vc,{url:r})}),n===Oe.AgentDisplayFacetModeType.IMAGE&&S.jsx(Uc,{src:r}),n===Oe.AgentDisplayFacetModeType.SPRITESHEET&&S.jsx(Gc,{src:r,frameCount:s,columns:i,rows:d,fps:a,frameHeight:u,frameWidth:l,gutterX:c,gutterY:f,originX:m,originY:h,scale:x,autoplay:!0})]})},Wc=({isWidgetOpen:e,setIsWidgetOpen:t})=>{const{companySettings:n}=N.useContext(mn);return S.jsxs("div",{className:`launcher
2
2
  fixed
3
3
  z-[999999999]
4
4
  transition
@@ -9,71 +9,71 @@
9
9
  flex
10
10
  justify-center
11
11
  items-center
12
- `,onClick:()=>t(!e),children:[!e&&_.jsx(na,{facet:n.agent.display[Le.AgentDisplayFacetRoleType.LAUNCHER]}),e&&_.jsx(Sc,{className:"w-6 h-6",fill:"white"})]})};var Si=function(e,t){return Si=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])},Si(e,t)};function rt(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");Si(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 Cr(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 pt(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 Xn={exports:{}},Ae={};/** @license React v16.13.1
12
+ `,onClick:()=>t(!e),children:[!e&&S.jsx(aa,{facet:n.agent.display[Oe.AgentDisplayFacetRoleType.LAUNCHER]}),e&&S.jsx(kc,{className:"w-6 h-6",fill:"white"})]})};var wi=function(e,t){return wi=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])},wi(e,t)};function rt(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");wi(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 Ir(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 ht(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 Kn={exports:{}},Ae={};/** @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 Ma;function jc(){if(Ma)return Ae;Ma=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,u=e?Symbol.for("react.context"):60110,o=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,f=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,h=e?Symbol.for("react.suspense_list"):60120,m=e?Symbol.for("react.memo"):60115,b=e?Symbol.for("react.lazy"):60116,A=e?Symbol.for("react.block"):60121,C=e?Symbol.for("react.fundamental"):60117,y=e?Symbol.for("react.responder"):60118,S=e?Symbol.for("react.scope"):60119;function v(N){if(typeof N=="object"&&N!==null){var O=N.$$typeof;switch(O){case t:switch(N=N.type,N){case o:case c:case r:case a:case i:case d:return N;default:switch(N=N&&N.$$typeof,N){case u:case f:case b:case m:case s:return N;default:return O}}case n:return O}}}function D(N){return v(N)===c}return Ae.AsyncMode=o,Ae.ConcurrentMode=c,Ae.ContextConsumer=u,Ae.ContextProvider=s,Ae.Element=t,Ae.ForwardRef=f,Ae.Fragment=r,Ae.Lazy=b,Ae.Memo=m,Ae.Portal=n,Ae.Profiler=a,Ae.StrictMode=i,Ae.Suspense=d,Ae.isAsyncMode=function(N){return D(N)||v(N)===o},Ae.isConcurrentMode=D,Ae.isContextConsumer=function(N){return v(N)===u},Ae.isContextProvider=function(N){return v(N)===s},Ae.isElement=function(N){return typeof N=="object"&&N!==null&&N.$$typeof===t},Ae.isForwardRef=function(N){return v(N)===f},Ae.isFragment=function(N){return v(N)===r},Ae.isLazy=function(N){return v(N)===b},Ae.isMemo=function(N){return v(N)===m},Ae.isPortal=function(N){return v(N)===n},Ae.isProfiler=function(N){return v(N)===a},Ae.isStrictMode=function(N){return v(N)===i},Ae.isSuspense=function(N){return v(N)===d},Ae.isValidElementType=function(N){return typeof N=="string"||typeof N=="function"||N===r||N===c||N===a||N===i||N===d||N===h||typeof N=="object"&&N!==null&&(N.$$typeof===b||N.$$typeof===m||N.$$typeof===s||N.$$typeof===u||N.$$typeof===f||N.$$typeof===C||N.$$typeof===y||N.$$typeof===S||N.$$typeof===A)},Ae.typeOf=v,Ae}var _e={};/** @license React v16.13.1
19
+ */var Ha;function Xc(){if(Ha)return Ae;Ha=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,u=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,f=e?Symbol.for("react.forward_ref"):60112,d=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,_=e?Symbol.for("react.fundamental"):60117,x=e?Symbol.for("react.responder"):60118,I=e?Symbol.for("react.scope"):60119;function C(k){if(typeof k=="object"&&k!==null){var O=k.$$typeof;switch(O){case t:switch(k=k.type,k){case l:case c:case r:case a:case i:case d:return k;default:switch(k=k&&k.$$typeof,k){case u:case f:case b:case h:case s:return k;default:return O}}case n:return O}}}function D(k){return C(k)===c}return Ae.AsyncMode=l,Ae.ConcurrentMode=c,Ae.ContextConsumer=u,Ae.ContextProvider=s,Ae.Element=t,Ae.ForwardRef=f,Ae.Fragment=r,Ae.Lazy=b,Ae.Memo=h,Ae.Portal=n,Ae.Profiler=a,Ae.StrictMode=i,Ae.Suspense=d,Ae.isAsyncMode=function(k){return D(k)||C(k)===l},Ae.isConcurrentMode=D,Ae.isContextConsumer=function(k){return C(k)===u},Ae.isContextProvider=function(k){return C(k)===s},Ae.isElement=function(k){return typeof k=="object"&&k!==null&&k.$$typeof===t},Ae.isForwardRef=function(k){return C(k)===f},Ae.isFragment=function(k){return C(k)===r},Ae.isLazy=function(k){return C(k)===b},Ae.isMemo=function(k){return C(k)===h},Ae.isPortal=function(k){return C(k)===n},Ae.isProfiler=function(k){return C(k)===a},Ae.isStrictMode=function(k){return C(k)===i},Ae.isSuspense=function(k){return C(k)===d},Ae.isValidElementType=function(k){return typeof k=="string"||typeof k=="function"||k===r||k===c||k===a||k===i||k===d||k===m||typeof k=="object"&&k!==null&&(k.$$typeof===b||k.$$typeof===h||k.$$typeof===s||k.$$typeof===u||k.$$typeof===f||k.$$typeof===_||k.$$typeof===x||k.$$typeof===I||k.$$typeof===A)},Ae.typeOf=C,Ae}var _e={};/** @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 Ba;function zc(){return Ba||(Ba=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,u=e?Symbol.for("react.context"):60110,o=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,f=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,h=e?Symbol.for("react.suspense_list"):60120,m=e?Symbol.for("react.memo"):60115,b=e?Symbol.for("react.lazy"):60116,A=e?Symbol.for("react.block"):60121,C=e?Symbol.for("react.fundamental"):60117,y=e?Symbol.for("react.responder"):60118,S=e?Symbol.for("react.scope"):60119;function v(z){return typeof z=="string"||typeof z=="function"||z===r||z===c||z===a||z===i||z===d||z===h||typeof z=="object"&&z!==null&&(z.$$typeof===b||z.$$typeof===m||z.$$typeof===s||z.$$typeof===u||z.$$typeof===f||z.$$typeof===C||z.$$typeof===y||z.$$typeof===S||z.$$typeof===A)}function D(z){if(typeof z=="object"&&z!==null){var Pe=z.$$typeof;switch(Pe){case t:var Ze=z.type;switch(Ze){case o:case c:case r:case a:case i:case d:return Ze;default:var ct=Ze&&Ze.$$typeof;switch(ct){case u:case f:case b:case m:case s:return ct;default:return Pe}}case n:return Pe}}}var N=o,O=c,q=u,ue=s,G=t,w=f,j=r,H=b,$=m,Y=n,J=a,he=i,Se=d,Oe=!1;function Re(z){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.")),p(z)||D(z)===o}function p(z){return D(z)===c}function U(z){return D(z)===u}function Z(z){return D(z)===s}function T(z){return typeof z=="object"&&z!==null&&z.$$typeof===t}function Q(z){return D(z)===f}function ne(z){return D(z)===r}function W(z){return D(z)===b}function ee(z){return D(z)===m}function re(z){return D(z)===n}function ie(z){return D(z)===a}function ae(z){return D(z)===i}function Ne(z){return D(z)===d}_e.AsyncMode=N,_e.ConcurrentMode=O,_e.ContextConsumer=q,_e.ContextProvider=ue,_e.Element=G,_e.ForwardRef=w,_e.Fragment=j,_e.Lazy=H,_e.Memo=$,_e.Portal=Y,_e.Profiler=J,_e.StrictMode=he,_e.Suspense=Se,_e.isAsyncMode=Re,_e.isConcurrentMode=p,_e.isContextConsumer=U,_e.isContextProvider=Z,_e.isElement=T,_e.isForwardRef=Q,_e.isFragment=ne,_e.isLazy=W,_e.isMemo=ee,_e.isPortal=re,_e.isProfiler=ie,_e.isStrictMode=ae,_e.isSuspense=Ne,_e.isValidElementType=v,_e.typeOf=D})()),_e}var Fa;function ra(){return Fa||(Fa=1,process.env.NODE_ENV==="production"?Xn.exports=jc():Xn.exports=zc()),Xn.exports}var $r,Ha;function $c(){if(Ha)return $r;Ha=1;var e=ra(),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 u=Object.defineProperty,o=Object.getOwnPropertyNames,c=Object.getOwnPropertySymbols,f=Object.getOwnPropertyDescriptor,d=Object.getPrototypeOf,h=Object.prototype;function m(b,A,C){if(typeof A!="string"){if(h){var y=d(A);y&&y!==h&&m(b,y,C)}var S=o(A);c&&(S=S.concat(c(A)));for(var v=s(b),D=s(A),N=0;N<S.length;++N){var O=S[N];if(!n[O]&&!(C&&C[O])&&!(D&&D[O])&&!(v&&v[O])){var q=f(A,O);try{u(b,O,q)}catch{}}}}return b}return $r=m,$r}$c();function Lu(e,t,n){if(n===void 0&&(n=Error),!e)throw new n(t)}var ge;(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"})(ge||(ge={}));var Ie;(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"})(Ie||(Ie={}));var on;(function(e){e[e.number=0]="number",e[e.dateTime=1]="dateTime"})(on||(on={}));function Ua(e){return e.type===Ie.literal}function Yc(e){return e.type===Ie.argument}function Du(e){return e.type===Ie.number}function Pu(e){return e.type===Ie.date}function Mu(e){return e.type===Ie.time}function Bu(e){return e.type===Ie.select}function Fu(e){return e.type===Ie.plural}function Gc(e){return e.type===Ie.pound}function Hu(e){return e.type===Ie.tag}function Uu(e){return!!(e&&typeof e=="object"&&e.type===on.number)}function Ci(e){return!!(e&&typeof e=="object"&&e.type===on.dateTime)}var ju=/[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/,Vc=/(?:[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 qc(e){var t={};return e.replace(Vc,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 Wc=/[\t-\r \x85\u200E\u200F\u2028\u2029]/i;function Xc(e){if(e.length===0)throw new Error("Number skeleton cannot be empty");for(var t=e.split(Wc).filter(function(h){return h.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 u=s[0],o=s.slice(1),c=0,f=o;c<f.length;c++){var d=f[c];if(d.length===0)throw new Error("Invalid number skeleton")}n.push({stem:u,options:o})}return n}function Qc(e){return e.replace(/^(.*?)-/,"")}var ja=/^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g,zu=/^(@+)?(\+|#+)?[rs]?$/g,Kc=/(\*)(0+)|(#+)(0+)|(0+)/g,$u=/^(0+)$/;function za(e){var t={};return e[e.length-1]==="r"?t.roundingPriority="morePrecision":e[e.length-1]==="s"&&(t.roundingPriority="lessPrecision"),e.replace(zu,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 Yu(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 Zc(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)),!$u.test(e))throw new Error("Malformed concise eng/scientific notation");t.minimumIntegerDigits=e.length}return t}function $a(e){var t={},n=Yu(e);return n||t}function Jc(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=Qc(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(o,c){return X(X({},o),$a(c))},{}));continue;case"engineering":t=X(X(X({},t),{notation:"engineering"}),i.options.reduce(function(o,c){return X(X({},o),$a(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(Kc,function(o,c,f,d,h,m){if(c)t.minimumIntegerDigits=f.length;else{if(d&&h)throw new Error("We currently do not support maximum integer digits");if(m)throw new Error("We currently do not support exact integer digits")}return""});continue}if($u.test(i.stem)){t.minimumIntegerDigits=i.stem.length;continue}if(ja.test(i.stem)){if(i.options.length>1)throw new RangeError("Fraction-precision stems only accept a single optional option");i.stem.replace(ja,function(o,c,f,d,h,m){return f==="*"?t.minimumFractionDigits=c.length:d&&d[0]==="#"?t.maximumFractionDigits=d.length:h&&m?(t.minimumFractionDigits=h.length,t.maximumFractionDigits=h.length+m.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),za(a)));continue}if(zu.test(i.stem)){t=X(X({},t),za(i.stem));continue}var s=Yu(i.stem);s&&(t=X(X({},t),s));var u=Zc(i.stem);u&&(t=X(X({},t),u))}return t}var Qn={"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 ef(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),u=a<2?1:3+(a>>1),o="a",c=tf(t);for((c=="H"||c=="k")&&(u=0);u-- >0;)n+=o;for(;s-- >0;)n=c+n}else i==="J"?n+="H":n+=i}return n}function tf(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=Qn[r||""]||Qn[n||""]||Qn["".concat(n,"-001")]||Qn["001"];return i[0]}var Yr,nf=new RegExp("^".concat(ju.source,"*")),rf=new RegExp("".concat(ju.source,"*$"));function Ee(e,t){return{start:e,end:t}}var af=!!String.prototype.startsWith&&"_a".startsWith("a",1),sf=!!String.fromCodePoint,uf=!!Object.fromEntries,of=!!String.prototype.codePointAt,lf=!!String.prototype.trimStart,cf=!!String.prototype.trimEnd,ff=!!Number.isSafeInteger,df=ff?Number.isSafeInteger:function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e&&Math.abs(e)<=9007199254740991},wi=!0;try{var hf=Vu("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");wi=((Yr=hf.exec("a"))===null||Yr===void 0?void 0:Yr[0])==="a"}catch{wi=!1}var Ya=af?function(t,n,r){return t.startsWith(n,r)}:function(t,n,r){return t.slice(r,r+n.length)===n},vi=sf?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},Ga=uf?Object.fromEntries:function(t){for(var n={},r=0,i=t;r<i.length;r++){var a=i[r],s=a[0],u=a[1];n[s]=u}return n},Gu=of?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}},mf=lf?function(t){return t.trimStart()}:function(t){return t.replace(nf,"")},pf=cf?function(t){return t.trimEnd()}:function(t){return t.replace(rf,"")};function Vu(e,t){return new RegExp(e,t)}var Ii;if(wi){var Va=Vu("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");Ii=function(t,n){var r;Va.lastIndex=n;var i=Va.exec(t);return(r=i[1])!==null&&r!==void 0?r:""}}else Ii=function(t,n){for(var r=[];;){var i=Gu(t,n);if(i===void 0||qu(i)||Tf(i))break;r.push(i),n+=i>=65536?2:1}return vi.apply(void 0,r)};var gf=(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 u=this.clonePosition();this.bump(),i.push({type:Ie.pound,location:Ee(u,this.clonePosition())})}else if(a===60&&!this.ignoreTag&&this.peek()===47){if(r)break;return this.error(ge.UNMATCHED_CLOSING_TAG,Ee(this.clonePosition(),this.clonePosition()))}else if(a===60&&!this.ignoreTag&&Ni(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:Ie.literal,value:"<".concat(i,"/>"),location:Ee(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,u=this.clonePosition();if(this.bumpIf("</")){if(this.isEOF()||!Ni(this.char()))return this.error(ge.INVALID_TAG,Ee(u,this.clonePosition()));var o=this.clonePosition(),c=this.parseTagName();return i!==c?this.error(ge.UNMATCHED_CLOSING_TAG,Ee(o,this.clonePosition())):(this.bumpSpace(),this.bumpIf(">")?{val:{type:Ie.tag,value:i,children:s,location:Ee(r,this.clonePosition())},err:null}:this.error(ge.INVALID_TAG,Ee(u,this.clonePosition())))}else return this.error(ge.UNCLOSED_TAG,Ee(r,this.clonePosition()))}else return this.error(ge.INVALID_TAG,Ee(r,this.clonePosition()))},e.prototype.parseTagName=function(){var t=this.offset();for(this.bump();!this.isEOF()&&Ef(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 u=this.tryParseLeftAngleBracket();if(u){i+=u;continue}break}var o=Ee(r,this.clonePosition());return{val:{type:Ie.literal,value:i,location:o},err:null}},e.prototype.tryParseLeftAngleBracket=function(){return!this.isEOF()&&this.char()===60&&(this.ignoreTag||!bf(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 vi.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(),vi(r))},e.prototype.parseArgument=function(t,n){var r=this.clonePosition();if(this.bump(),this.bumpSpace(),this.isEOF())return this.error(ge.EXPECT_ARGUMENT_CLOSING_BRACE,Ee(r,this.clonePosition()));if(this.char()===125)return this.bump(),this.error(ge.EMPTY_ARGUMENT,Ee(r,this.clonePosition()));var i=this.parseIdentifierIfPossible().value;if(!i)return this.error(ge.MALFORMED_ARGUMENT,Ee(r,this.clonePosition()));if(this.bumpSpace(),this.isEOF())return this.error(ge.EXPECT_ARGUMENT_CLOSING_BRACE,Ee(r,this.clonePosition()));switch(this.char()){case 125:return this.bump(),{val:{type:Ie.argument,value:i,location:Ee(r,this.clonePosition())},err:null};case 44:return this.bump(),this.bumpSpace(),this.isEOF()?this.error(ge.EXPECT_ARGUMENT_CLOSING_BRACE,Ee(r,this.clonePosition())):this.parseArgumentOptions(t,n,i,r);default:return this.error(ge.MALFORMED_ARGUMENT,Ee(r,this.clonePosition()))}},e.prototype.parseIdentifierIfPossible=function(){var t=this.clonePosition(),n=this.offset(),r=Ii(this.message,n),i=n+r.length;this.bumpTo(i);var a=this.clonePosition(),s=Ee(t,a);return{value:r,location:s}},e.prototype.parseArgumentOptions=function(t,n,r,i){var a,s=this.clonePosition(),u=this.parseIdentifierIfPossible().value,o=this.clonePosition();switch(u){case"":return this.error(ge.EXPECT_ARGUMENT_TYPE,Ee(s,o));case"number":case"date":case"time":{this.bumpSpace();var c=null;if(this.bumpIf(",")){this.bumpSpace();var f=this.clonePosition(),d=this.parseSimpleArgStyleIfPossible();if(d.err)return d;var h=pf(d.val);if(h.length===0)return this.error(ge.EXPECT_ARGUMENT_STYLE,Ee(this.clonePosition(),this.clonePosition()));var m=Ee(f,this.clonePosition());c={style:h,styleLocation:m}}var b=this.tryParseArgumentClose(i);if(b.err)return b;var A=Ee(i,this.clonePosition());if(c&&Ya(c?.style,"::",0)){var C=mf(c.style.slice(2));if(u==="number"){var d=this.parseNumberSkeletonFromString(C,c.styleLocation);return d.err?d:{val:{type:Ie.number,value:r,location:A,style:d.val},err:null}}else{if(C.length===0)return this.error(ge.EXPECT_DATE_TIME_SKELETON,A);var y=C;this.locale&&(y=ef(C,this.locale));var h={type:on.dateTime,pattern:y,location:c.styleLocation,parsedOptions:this.shouldParseSkeletons?qc(y):{}},S=u==="date"?Ie.date:Ie.time;return{val:{type:S,value:r,location:A,style:h},err:null}}}return{val:{type:u==="number"?Ie.number:u==="date"?Ie.date:Ie.time,value:r,location:A,style:(a=c?.style)!==null&&a!==void 0?a:null},err:null}}case"plural":case"selectordinal":case"select":{var v=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(","))return this.error(ge.EXPECT_SELECT_ARGUMENT_OPTIONS,Ee(v,X({},v)));this.bumpSpace();var D=this.parseIdentifierIfPossible(),N=0;if(u!=="select"&&D.value==="offset"){if(!this.bumpIf(":"))return this.error(ge.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,Ee(this.clonePosition(),this.clonePosition()));this.bumpSpace();var d=this.tryParseDecimalInteger(ge.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,ge.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE);if(d.err)return d;this.bumpSpace(),D=this.parseIdentifierIfPossible(),N=d.val}var O=this.tryParsePluralOrSelectOptions(t,u,n,D);if(O.err)return O;var b=this.tryParseArgumentClose(i);if(b.err)return b;var q=Ee(i,this.clonePosition());return u==="select"?{val:{type:Ie.select,value:r,options:Ga(O.val),location:q},err:null}:{val:{type:Ie.plural,value:r,options:Ga(O.val),offset:N,pluralType:u==="plural"?"cardinal":"ordinal",location:q},err:null}}default:return this.error(ge.INVALID_ARGUMENT_TYPE,Ee(s,o))}},e.prototype.tryParseArgumentClose=function(t){return this.isEOF()||this.char()!==125?this.error(ge.EXPECT_ARGUMENT_CLOSING_BRACE,Ee(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(ge.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE,Ee(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=Xc(t)}catch{return this.error(ge.INVALID_NUMBER_SKELETON,n)}return{val:{type:on.number,tokens:r,location:n,parsedOptions:this.shouldParseSkeletons?Jc(r):{}},err:null}},e.prototype.tryParsePluralOrSelectOptions=function(t,n,r,i){for(var a,s=!1,u=[],o=new Set,c=i.value,f=i.location;;){if(c.length===0){var d=this.clonePosition();if(n!=="select"&&this.bumpIf("=")){var h=this.tryParseDecimalInteger(ge.EXPECT_PLURAL_ARGUMENT_SELECTOR,ge.INVALID_PLURAL_ARGUMENT_SELECTOR);if(h.err)return h;f=Ee(d,this.clonePosition()),c=this.message.slice(d.offset,this.offset())}else break}if(o.has(c))return this.error(n==="select"?ge.DUPLICATE_SELECT_ARGUMENT_SELECTOR:ge.DUPLICATE_PLURAL_ARGUMENT_SELECTOR,f);c==="other"&&(s=!0),this.bumpSpace();var m=this.clonePosition();if(!this.bumpIf("{"))return this.error(n==="select"?ge.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT:ge.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT,Ee(this.clonePosition(),this.clonePosition()));var b=this.parseMessage(t+1,n,r);if(b.err)return b;var A=this.tryParseArgumentClose(m);if(A.err)return A;u.push([c,{value:b.val,location:Ee(m,this.clonePosition())}]),o.add(c),this.bumpSpace(),a=this.parseIdentifierIfPossible(),c=a.value,f=a.location}return u.length===0?this.error(n==="select"?ge.EXPECT_SELECT_ARGUMENT_SELECTOR:ge.EXPECT_PLURAL_ARGUMENT_SELECTOR,Ee(this.clonePosition(),this.clonePosition())):this.requiresOtherClause&&!s?this.error(ge.MISSING_OTHER_CLAUSE,Ee(this.clonePosition(),this.clonePosition())):{val:u,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 u=this.char();if(u>=48&&u<=57)a=!0,s=s*10+(u-48),this.bump();else break}var o=Ee(i,this.clonePosition());return a?(s*=r,df(s)?{val:s,err:null}:this.error(n,o)):this.error(t,o)},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=Gu(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(Ya(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()&&qu(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 Ni(e){return e>=97&&e<=122||e>=65&&e<=90}function bf(e){return Ni(e)||e===47}function Ef(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 qu(e){return e>=9&&e<=13||e===32||e===133||e>=8206&&e<=8207||e===8232||e===8233}function Tf(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 ki(e){e.forEach(function(t){if(delete t.location,Bu(t)||Fu(t))for(var n in t.options)delete t.options[n].location,ki(t.options[n].value);else Du(t)&&Uu(t.style)||(Pu(t)||Mu(t))&&Ci(t.style)?delete t.style.location:Hu(t)&&ki(t.children)})}function xf(e,t){t===void 0&&(t={}),t=X({shouldParseSkeletons:!0,requiresOtherClause:!0},t);var n=new gf(e,t).parse();if(n.err){var r=SyntaxError(ge[n.err.kind]);throw r.location=n.err.location,r.originalMessage=n.err.message,r}return t?.captureLocation||ki(n.val),n.val}function ht(e,t){var n=t&&t.cache?t.cache:wf,r=t&&t.serializer?t.serializer:Cf,i=t&&t.strategy?t.strategy:_f;return i(e,{cache:n,serializer:r})}function yf(e){return e==null||typeof e=="number"||typeof e=="boolean"}function Af(e,t,n,r){var i=yf(r)?r:n(r),a=t.get(i);return typeof a>"u"&&(a=e.call(this,r),t.set(i,a)),a}function Wu(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 Xu(e,t,n,r,i){return n.bind(t,e,r,i)}function _f(e,t){var n=e.length===1?Af:Wu;return Xu(e,this,n,t.cache.create(),t.serializer)}function Sf(e,t){return Xu(e,this,Wu,t.cache.create(),t.serializer)}var Cf=function(){return JSON.stringify(arguments)};function ia(){this.cache=Object.create(null)}ia.prototype.get=function(e){return this.cache[e]};ia.prototype.set=function(e,t){this.cache[e]=t};var wf={create:function(){return new ia}},mt={variadic:Sf},bt;(function(e){e.MISSING_VALUE="MISSING_VALUE",e.INVALID_VALUE="INVALID_VALUE",e.MISSING_INTL_API="MISSING_INTL_API"})(bt||(bt={}));var Lt=(function(e){rt(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),qa=(function(e){rt(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('", "'),'"'),bt.INVALID_VALUE,a)||this}return t})(Lt),vf=(function(e){rt(t,e);function t(n,r,i){return e.call(this,'Value for "'.concat(n,'" must be of type ').concat(r),bt.INVALID_VALUE,i)||this}return t})(Lt),If=(function(e){rt(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,'"'),bt.MISSING_VALUE,r)||this}return t})(Lt),Ye;(function(e){e[e.literal=0]="literal",e[e.object=1]="object"})(Ye||(Ye={}));function Nf(e){return e.length<2?e:e.reduce(function(t,n){var r=t[t.length-1];return!r||r.type!==Ye.literal||n.type!==Ye.literal?t.push(n):r.value+=n.value,t},[])}function Qu(e){return typeof e=="function"}function sr(e,t,n,r,i,a,s){if(e.length===1&&Ua(e[0]))return[{type:Ye.literal,value:e[0].value}];for(var u=[],o=0,c=e;o<c.length;o++){var f=c[o];if(Ua(f)){u.push({type:Ye.literal,value:f.value});continue}if(Gc(f)){typeof a=="number"&&u.push({type:Ye.literal,value:n.getNumberFormat(t).format(a)});continue}var d=f.value;if(!(i&&d in i))throw new If(d,s);var h=i[d];if(Yc(f)){(!h||typeof h=="string"||typeof h=="number")&&(h=typeof h=="string"||typeof h=="number"?String(h):""),u.push({type:typeof h=="string"?Ye.literal:Ye.object,value:h});continue}if(Pu(f)){var m=typeof f.style=="string"?r.date[f.style]:Ci(f.style)?f.style.parsedOptions:void 0;u.push({type:Ye.literal,value:n.getDateTimeFormat(t,m).format(h)});continue}if(Mu(f)){var m=typeof f.style=="string"?r.time[f.style]:Ci(f.style)?f.style.parsedOptions:r.time.medium;u.push({type:Ye.literal,value:n.getDateTimeFormat(t,m).format(h)});continue}if(Du(f)){var m=typeof f.style=="string"?r.number[f.style]:Uu(f.style)?f.style.parsedOptions:void 0;m&&m.scale&&(h=h*(m.scale||1)),u.push({type:Ye.literal,value:n.getNumberFormat(t,m).format(h)});continue}if(Hu(f)){var b=f.children,A=f.value,C=i[A];if(!Qu(C))throw new vf(A,"function",s);var y=sr(b,t,n,r,i,a),S=C(y.map(function(N){return N.value}));Array.isArray(S)||(S=[S]),u.push.apply(u,S.map(function(N){return{type:typeof N=="string"?Ye.literal:Ye.object,value:N}}))}if(Bu(f)){var v=f.options[h]||f.options.other;if(!v)throw new qa(f.value,h,Object.keys(f.options),s);u.push.apply(u,sr(v.value,t,n,r,i));continue}if(Fu(f)){var v=f.options["=".concat(h)];if(!v){if(!Intl.PluralRules)throw new Lt(`Intl.PluralRules is not available in this environment.
26
+ */var Ua;function Qc(){return Ua||(Ua=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,u=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,f=e?Symbol.for("react.forward_ref"):60112,d=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,_=e?Symbol.for("react.fundamental"):60117,x=e?Symbol.for("react.responder"):60118,I=e?Symbol.for("react.scope"):60119;function C(Y){return typeof Y=="string"||typeof Y=="function"||Y===r||Y===c||Y===a||Y===i||Y===d||Y===m||typeof Y=="object"&&Y!==null&&(Y.$$typeof===b||Y.$$typeof===h||Y.$$typeof===s||Y.$$typeof===u||Y.$$typeof===f||Y.$$typeof===_||Y.$$typeof===x||Y.$$typeof===I||Y.$$typeof===A)}function D(Y){if(typeof Y=="object"&&Y!==null){var ke=Y.$$typeof;switch(ke){case t:var Ye=Y.type;switch(Ye){case l:case c:case r:case a:case i:case d:return Ye;default:var lt=Ye&&Ye.$$typeof;switch(lt){case u:case f:case b:case h:case s:return lt;default:return ke}}case n:return ke}}}var k=l,O=c,G=u,oe=s,ae=t,w=f,j=r,$=b,H=h,U=n,Q=a,me=i,xe=d,Re=!1;function De(Y){return Re||(Re=!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.")),p(Y)||D(Y)===l}function p(Y){return D(Y)===c}function z(Y){return D(Y)===u}function K(Y){return D(Y)===s}function T(Y){return typeof Y=="object"&&Y!==null&&Y.$$typeof===t}function Z(Y){return D(Y)===f}function ie(Y){return D(Y)===r}function V(Y){return D(Y)===b}function re(Y){return D(Y)===h}function ne(Y){return D(Y)===n}function se(Y){return D(Y)===a}function J(Y){return D(Y)===i}function Ne(Y){return D(Y)===d}_e.AsyncMode=k,_e.ConcurrentMode=O,_e.ContextConsumer=G,_e.ContextProvider=oe,_e.Element=ae,_e.ForwardRef=w,_e.Fragment=j,_e.Lazy=$,_e.Memo=H,_e.Portal=U,_e.Profiler=Q,_e.StrictMode=me,_e.Suspense=xe,_e.isAsyncMode=De,_e.isConcurrentMode=p,_e.isContextConsumer=z,_e.isContextProvider=K,_e.isElement=T,_e.isForwardRef=Z,_e.isFragment=ie,_e.isLazy=V,_e.isMemo=re,_e.isPortal=ne,_e.isProfiler=se,_e.isStrictMode=J,_e.isSuspense=Ne,_e.isValidElementType=C,_e.typeOf=D})()),_e}var ja;function sa(){return ja||(ja=1,process.env.NODE_ENV==="production"?Kn.exports=Xc():Kn.exports=Qc()),Kn.exports}var Gr,za;function Kc(){if(za)return Gr;za=1;var e=sa(),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 u=Object.defineProperty,l=Object.getOwnPropertyNames,c=Object.getOwnPropertySymbols,f=Object.getOwnPropertyDescriptor,d=Object.getPrototypeOf,m=Object.prototype;function h(b,A,_){if(typeof A!="string"){if(m){var x=d(A);x&&x!==m&&h(b,x,_)}var I=l(A);c&&(I=I.concat(c(A)));for(var C=s(b),D=s(A),k=0;k<I.length;++k){var O=I[k];if(!n[O]&&!(_&&_[O])&&!(D&&D[O])&&!(C&&C[O])){var G=f(A,O);try{u(b,O,G)}catch{}}}}return b}return Gr=h,Gr}Kc();function Hu(e,t,n){if(n===void 0&&(n=Error),!e)throw new n(t)}var ge;(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"})(ge||(ge={}));var Ie;(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"})(Ie||(Ie={}));var cn;(function(e){e[e.number=0]="number",e[e.dateTime=1]="dateTime"})(cn||(cn={}));function $a(e){return e.type===Ie.literal}function Zc(e){return e.type===Ie.argument}function Uu(e){return e.type===Ie.number}function ju(e){return e.type===Ie.date}function zu(e){return e.type===Ie.time}function $u(e){return e.type===Ie.select}function Yu(e){return e.type===Ie.plural}function Jc(e){return e.type===Ie.pound}function Gu(e){return e.type===Ie.tag}function Vu(e){return!!(e&&typeof e=="object"&&e.type===cn.number)}function Ii(e){return!!(e&&typeof e=="object"&&e.type===cn.dateTime)}var qu=/[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/,ef=/(?:[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 tf(e){var t={};return e.replace(ef,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 nf=/[\t-\r \x85\u200E\u200F\u2028\u2029]/i;function rf(e){if(e.length===0)throw new Error("Number skeleton cannot be empty");for(var t=e.split(nf).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 u=s[0],l=s.slice(1),c=0,f=l;c<f.length;c++){var d=f[c];if(d.length===0)throw new Error("Invalid number skeleton")}n.push({stem:u,options:l})}return n}function af(e){return e.replace(/^(.*?)-/,"")}var Ya=/^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g,Wu=/^(@+)?(\+|#+)?[rs]?$/g,sf=/(\*)(0+)|(#+)(0+)|(0+)/g,Xu=/^(0+)$/;function Ga(e){var t={};return e[e.length-1]==="r"?t.roundingPriority="morePrecision":e[e.length-1]==="s"&&(t.roundingPriority="lessPrecision"),e.replace(Wu,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 Qu(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 uf(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)),!Xu.test(e))throw new Error("Malformed concise eng/scientific notation");t.minimumIntegerDigits=e.length}return t}function Va(e){var t={},n=Qu(e);return n||t}function of(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=af(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(l,c){return X(X({},l),Va(c))},{}));continue;case"engineering":t=X(X(X({},t),{notation:"engineering"}),i.options.reduce(function(l,c){return X(X({},l),Va(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(sf,function(l,c,f,d,m,h){if(c)t.minimumIntegerDigits=f.length;else{if(d&&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(Xu.test(i.stem)){t.minimumIntegerDigits=i.stem.length;continue}if(Ya.test(i.stem)){if(i.options.length>1)throw new RangeError("Fraction-precision stems only accept a single optional option");i.stem.replace(Ya,function(l,c,f,d,m,h){return f==="*"?t.minimumFractionDigits=c.length:d&&d[0]==="#"?t.maximumFractionDigits=d.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),Ga(a)));continue}if(Wu.test(i.stem)){t=X(X({},t),Ga(i.stem));continue}var s=Qu(i.stem);s&&(t=X(X({},t),s));var u=uf(i.stem);u&&(t=X(X({},t),u))}return t}var Zn={"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 lf(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),u=a<2?1:3+(a>>1),l="a",c=cf(t);for((c=="H"||c=="k")&&(u=0);u-- >0;)n+=l;for(;s-- >0;)n=c+n}else i==="J"?n+="H":n+=i}return n}function cf(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=Zn[r||""]||Zn[n||""]||Zn["".concat(n,"-001")]||Zn["001"];return i[0]}var Vr,ff=new RegExp("^".concat(qu.source,"*")),df=new RegExp("".concat(qu.source,"*$"));function Ee(e,t){return{start:e,end:t}}var hf=!!String.prototype.startsWith&&"_a".startsWith("a",1),mf=!!String.fromCodePoint,pf=!!Object.fromEntries,gf=!!String.prototype.codePointAt,bf=!!String.prototype.trimStart,Ef=!!String.prototype.trimEnd,Tf=!!Number.isSafeInteger,yf=Tf?Number.isSafeInteger:function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e&&Math.abs(e)<=9007199254740991},vi=!0;try{var xf=Zu("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");vi=((Vr=xf.exec("a"))===null||Vr===void 0?void 0:Vr[0])==="a"}catch{vi=!1}var qa=hf?function(t,n,r){return t.startsWith(n,r)}:function(t,n,r){return t.slice(r,r+n.length)===n},Ni=mf?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},Wa=pf?Object.fromEntries:function(t){for(var n={},r=0,i=t;r<i.length;r++){var a=i[r],s=a[0],u=a[1];n[s]=u}return n},Ku=gf?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=bf?function(t){return t.trimStart()}:function(t){return t.replace(ff,"")},_f=Ef?function(t){return t.trimEnd()}:function(t){return t.replace(df,"")};function Zu(e,t){return new RegExp(e,t)}var ki;if(vi){var Xa=Zu("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");ki=function(t,n){var r;Xa.lastIndex=n;var i=Xa.exec(t);return(r=i[1])!==null&&r!==void 0?r:""}}else ki=function(t,n){for(var r=[];;){var i=Ku(t,n);if(i===void 0||Ju(i)||If(i))break;r.push(i),n+=i>=65536?2:1}return Ni.apply(void 0,r)};var Sf=(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 u=this.clonePosition();this.bump(),i.push({type:Ie.pound,location:Ee(u,this.clonePosition())})}else if(a===60&&!this.ignoreTag&&this.peek()===47){if(r)break;return this.error(ge.UNMATCHED_CLOSING_TAG,Ee(this.clonePosition(),this.clonePosition()))}else if(a===60&&!this.ignoreTag&&Oi(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:Ie.literal,value:"<".concat(i,"/>"),location:Ee(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,u=this.clonePosition();if(this.bumpIf("</")){if(this.isEOF()||!Oi(this.char()))return this.error(ge.INVALID_TAG,Ee(u,this.clonePosition()));var l=this.clonePosition(),c=this.parseTagName();return i!==c?this.error(ge.UNMATCHED_CLOSING_TAG,Ee(l,this.clonePosition())):(this.bumpSpace(),this.bumpIf(">")?{val:{type:Ie.tag,value:i,children:s,location:Ee(r,this.clonePosition())},err:null}:this.error(ge.INVALID_TAG,Ee(u,this.clonePosition())))}else return this.error(ge.UNCLOSED_TAG,Ee(r,this.clonePosition()))}else return this.error(ge.INVALID_TAG,Ee(r,this.clonePosition()))},e.prototype.parseTagName=function(){var t=this.offset();for(this.bump();!this.isEOF()&&wf(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 u=this.tryParseLeftAngleBracket();if(u){i+=u;continue}break}var l=Ee(r,this.clonePosition());return{val:{type:Ie.literal,value:i,location:l},err:null}},e.prototype.tryParseLeftAngleBracket=function(){return!this.isEOF()&&this.char()===60&&(this.ignoreTag||!Cf(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 Ni.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(),Ni(r))},e.prototype.parseArgument=function(t,n){var r=this.clonePosition();if(this.bump(),this.bumpSpace(),this.isEOF())return this.error(ge.EXPECT_ARGUMENT_CLOSING_BRACE,Ee(r,this.clonePosition()));if(this.char()===125)return this.bump(),this.error(ge.EMPTY_ARGUMENT,Ee(r,this.clonePosition()));var i=this.parseIdentifierIfPossible().value;if(!i)return this.error(ge.MALFORMED_ARGUMENT,Ee(r,this.clonePosition()));if(this.bumpSpace(),this.isEOF())return this.error(ge.EXPECT_ARGUMENT_CLOSING_BRACE,Ee(r,this.clonePosition()));switch(this.char()){case 125:return this.bump(),{val:{type:Ie.argument,value:i,location:Ee(r,this.clonePosition())},err:null};case 44:return this.bump(),this.bumpSpace(),this.isEOF()?this.error(ge.EXPECT_ARGUMENT_CLOSING_BRACE,Ee(r,this.clonePosition())):this.parseArgumentOptions(t,n,i,r);default:return this.error(ge.MALFORMED_ARGUMENT,Ee(r,this.clonePosition()))}},e.prototype.parseIdentifierIfPossible=function(){var t=this.clonePosition(),n=this.offset(),r=ki(this.message,n),i=n+r.length;this.bumpTo(i);var a=this.clonePosition(),s=Ee(t,a);return{value:r,location:s}},e.prototype.parseArgumentOptions=function(t,n,r,i){var a,s=this.clonePosition(),u=this.parseIdentifierIfPossible().value,l=this.clonePosition();switch(u){case"":return this.error(ge.EXPECT_ARGUMENT_TYPE,Ee(s,l));case"number":case"date":case"time":{this.bumpSpace();var c=null;if(this.bumpIf(",")){this.bumpSpace();var f=this.clonePosition(),d=this.parseSimpleArgStyleIfPossible();if(d.err)return d;var m=_f(d.val);if(m.length===0)return this.error(ge.EXPECT_ARGUMENT_STYLE,Ee(this.clonePosition(),this.clonePosition()));var h=Ee(f,this.clonePosition());c={style:m,styleLocation:h}}var b=this.tryParseArgumentClose(i);if(b.err)return b;var A=Ee(i,this.clonePosition());if(c&&qa(c?.style,"::",0)){var _=Af(c.style.slice(2));if(u==="number"){var d=this.parseNumberSkeletonFromString(_,c.styleLocation);return d.err?d:{val:{type:Ie.number,value:r,location:A,style:d.val},err:null}}else{if(_.length===0)return this.error(ge.EXPECT_DATE_TIME_SKELETON,A);var x=_;this.locale&&(x=lf(_,this.locale));var m={type:cn.dateTime,pattern:x,location:c.styleLocation,parsedOptions:this.shouldParseSkeletons?tf(x):{}},I=u==="date"?Ie.date:Ie.time;return{val:{type:I,value:r,location:A,style:m},err:null}}}return{val:{type:u==="number"?Ie.number:u==="date"?Ie.date:Ie.time,value:r,location:A,style:(a=c?.style)!==null&&a!==void 0?a:null},err:null}}case"plural":case"selectordinal":case"select":{var C=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(","))return this.error(ge.EXPECT_SELECT_ARGUMENT_OPTIONS,Ee(C,X({},C)));this.bumpSpace();var D=this.parseIdentifierIfPossible(),k=0;if(u!=="select"&&D.value==="offset"){if(!this.bumpIf(":"))return this.error(ge.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,Ee(this.clonePosition(),this.clonePosition()));this.bumpSpace();var d=this.tryParseDecimalInteger(ge.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,ge.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE);if(d.err)return d;this.bumpSpace(),D=this.parseIdentifierIfPossible(),k=d.val}var O=this.tryParsePluralOrSelectOptions(t,u,n,D);if(O.err)return O;var b=this.tryParseArgumentClose(i);if(b.err)return b;var G=Ee(i,this.clonePosition());return u==="select"?{val:{type:Ie.select,value:r,options:Wa(O.val),location:G},err:null}:{val:{type:Ie.plural,value:r,options:Wa(O.val),offset:k,pluralType:u==="plural"?"cardinal":"ordinal",location:G},err:null}}default:return this.error(ge.INVALID_ARGUMENT_TYPE,Ee(s,l))}},e.prototype.tryParseArgumentClose=function(t){return this.isEOF()||this.char()!==125?this.error(ge.EXPECT_ARGUMENT_CLOSING_BRACE,Ee(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(ge.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE,Ee(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=rf(t)}catch{return this.error(ge.INVALID_NUMBER_SKELETON,n)}return{val:{type:cn.number,tokens:r,location:n,parsedOptions:this.shouldParseSkeletons?of(r):{}},err:null}},e.prototype.tryParsePluralOrSelectOptions=function(t,n,r,i){for(var a,s=!1,u=[],l=new Set,c=i.value,f=i.location;;){if(c.length===0){var d=this.clonePosition();if(n!=="select"&&this.bumpIf("=")){var m=this.tryParseDecimalInteger(ge.EXPECT_PLURAL_ARGUMENT_SELECTOR,ge.INVALID_PLURAL_ARGUMENT_SELECTOR);if(m.err)return m;f=Ee(d,this.clonePosition()),c=this.message.slice(d.offset,this.offset())}else break}if(l.has(c))return this.error(n==="select"?ge.DUPLICATE_SELECT_ARGUMENT_SELECTOR:ge.DUPLICATE_PLURAL_ARGUMENT_SELECTOR,f);c==="other"&&(s=!0),this.bumpSpace();var h=this.clonePosition();if(!this.bumpIf("{"))return this.error(n==="select"?ge.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT:ge.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT,Ee(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;u.push([c,{value:b.val,location:Ee(h,this.clonePosition())}]),l.add(c),this.bumpSpace(),a=this.parseIdentifierIfPossible(),c=a.value,f=a.location}return u.length===0?this.error(n==="select"?ge.EXPECT_SELECT_ARGUMENT_SELECTOR:ge.EXPECT_PLURAL_ARGUMENT_SELECTOR,Ee(this.clonePosition(),this.clonePosition())):this.requiresOtherClause&&!s?this.error(ge.MISSING_OTHER_CLAUSE,Ee(this.clonePosition(),this.clonePosition())):{val:u,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 u=this.char();if(u>=48&&u<=57)a=!0,s=s*10+(u-48),this.bump();else break}var l=Ee(i,this.clonePosition());return a?(s*=r,yf(s)?{val:s,err:null}:this.error(n,l)):this.error(t,l)},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=Ku(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()&&Ju(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 Oi(e){return e>=97&&e<=122||e>=65&&e<=90}function Cf(e){return Oi(e)||e===47}function wf(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 Ju(e){return e>=9&&e<=13||e===32||e===133||e>=8206&&e<=8207||e===8232||e===8233}function If(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 Li(e){e.forEach(function(t){if(delete t.location,$u(t)||Yu(t))for(var n in t.options)delete t.options[n].location,Li(t.options[n].value);else Uu(t)&&Vu(t.style)||(ju(t)||zu(t))&&Ii(t.style)?delete t.style.location:Gu(t)&&Li(t.children)})}function vf(e,t){t===void 0&&(t={}),t=X({shouldParseSkeletons:!0,requiresOtherClause:!0},t);var n=new Sf(e,t).parse();if(n.err){var r=SyntaxError(ge[n.err.kind]);throw r.location=n.err.location,r.originalMessage=n.err.message,r}return t?.captureLocation||Li(n.val),n.val}function ft(e,t){var n=t&&t.cache?t.cache:Df,r=t&&t.serializer?t.serializer:Rf,i=t&&t.strategy?t.strategy:Of;return i(e,{cache:n,serializer:r})}function Nf(e){return e==null||typeof e=="number"||typeof e=="boolean"}function kf(e,t,n,r){var i=Nf(r)?r:n(r),a=t.get(i);return typeof a>"u"&&(a=e.call(this,r),t.set(i,a)),a}function eo(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 to(e,t,n,r,i){return n.bind(t,e,r,i)}function Of(e,t){var n=e.length===1?kf:eo;return to(e,this,n,t.cache.create(),t.serializer)}function Lf(e,t){return to(e,this,eo,t.cache.create(),t.serializer)}var Rf=function(){return JSON.stringify(arguments)};function ua(){this.cache=Object.create(null)}ua.prototype.get=function(e){return this.cache[e]};ua.prototype.set=function(e,t){this.cache[e]=t};var Df={create:function(){return new ua}},dt={variadic:Lf},pt;(function(e){e.MISSING_VALUE="MISSING_VALUE",e.INVALID_VALUE="INVALID_VALUE",e.MISSING_INTL_API="MISSING_INTL_API"})(pt||(pt={}));var kt=(function(e){rt(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),Qa=(function(e){rt(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('", "'),'"'),pt.INVALID_VALUE,a)||this}return t})(kt),Pf=(function(e){rt(t,e);function t(n,r,i){return e.call(this,'Value for "'.concat(n,'" must be of type ').concat(r),pt.INVALID_VALUE,i)||this}return t})(kt),Mf=(function(e){rt(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,'"'),pt.MISSING_VALUE,r)||this}return t})(kt),Ge;(function(e){e[e.literal=0]="literal",e[e.object=1]="object"})(Ge||(Ge={}));function Bf(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 no(e){return typeof e=="function"}function or(e,t,n,r,i,a,s){if(e.length===1&&$a(e[0]))return[{type:Ge.literal,value:e[0].value}];for(var u=[],l=0,c=e;l<c.length;l++){var f=c[l];if($a(f)){u.push({type:Ge.literal,value:f.value});continue}if(Jc(f)){typeof a=="number"&&u.push({type:Ge.literal,value:n.getNumberFormat(t).format(a)});continue}var d=f.value;if(!(i&&d in i))throw new Mf(d,s);var m=i[d];if(Zc(f)){(!m||typeof m=="string"||typeof m=="number")&&(m=typeof m=="string"||typeof m=="number"?String(m):""),u.push({type:typeof m=="string"?Ge.literal:Ge.object,value:m});continue}if(ju(f)){var h=typeof f.style=="string"?r.date[f.style]:Ii(f.style)?f.style.parsedOptions:void 0;u.push({type:Ge.literal,value:n.getDateTimeFormat(t,h).format(m)});continue}if(zu(f)){var h=typeof f.style=="string"?r.time[f.style]:Ii(f.style)?f.style.parsedOptions:r.time.medium;u.push({type:Ge.literal,value:n.getDateTimeFormat(t,h).format(m)});continue}if(Uu(f)){var h=typeof f.style=="string"?r.number[f.style]:Vu(f.style)?f.style.parsedOptions:void 0;h&&h.scale&&(m=m*(h.scale||1)),u.push({type:Ge.literal,value:n.getNumberFormat(t,h).format(m)});continue}if(Gu(f)){var b=f.children,A=f.value,_=i[A];if(!no(_))throw new Pf(A,"function",s);var x=or(b,t,n,r,i,a),I=_(x.map(function(k){return k.value}));Array.isArray(I)||(I=[I]),u.push.apply(u,I.map(function(k){return{type:typeof k=="string"?Ge.literal:Ge.object,value:k}}))}if($u(f)){var C=f.options[m]||f.options.other;if(!C)throw new Qa(f.value,m,Object.keys(f.options),s);u.push.apply(u,or(C.value,t,n,r,i));continue}if(Yu(f)){var C=f.options["=".concat(m)];if(!C){if(!Intl.PluralRules)throw new kt(`Intl.PluralRules is not available in this environment.
27
27
  Try polyfilling it using "@formatjs/intl-pluralrules"
28
- `,bt.MISSING_INTL_API,s);var D=n.getPluralRules(t,{type:f.pluralType}).select(h-(f.offset||0));v=f.options[D]||f.options.other}if(!v)throw new qa(f.value,h,Object.keys(f.options),s);u.push.apply(u,sr(v.value,t,n,r,i,h-(f.offset||0)));continue}}return Nf(u)}function kf(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 Of(e,t){return t?Object.keys(e).reduce(function(n,r){return n[r]=kf(e[r],t[r]),n},X({},e)):e}function Gr(e){return{create:function(){return{get:function(t){return e[t]},set:function(t,n){e[t]=n}}}}}function Rf(e){return e===void 0&&(e={number:{},dateTime:{},pluralRules:{}}),{getNumberFormat:ht(function(){for(var t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return new((t=Intl.NumberFormat).bind.apply(t,pt([void 0],n,!1)))},{cache:Gr(e.number),strategy:mt.variadic}),getDateTimeFormat:ht(function(){for(var t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return new((t=Intl.DateTimeFormat).bind.apply(t,pt([void 0],n,!1)))},{cache:Gr(e.dateTime),strategy:mt.variadic}),getPluralRules:ht(function(){for(var t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return new((t=Intl.PluralRules).bind.apply(t,pt([void 0],n,!1)))},{cache:Gr(e.pluralRules),strategy:mt.variadic})}}var Ku=(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(o){var c=a.formatToParts(o);if(c.length===1)return c[0].value;var f=c.reduce(function(d,h){return!d.length||h.type!==Ye.literal||typeof d[d.length-1]!="string"?d.push(h.value):d[d.length-1]+=h.value,d},[]);return f.length<=1?f[0]||"":f},this.formatToParts=function(o){return sr(a.ast,a.locales,a.formatters,a.formats,o,void 0,a.message)},this.resolvedOptions=function(){var o;return{locale:((o=a.resolvedLocale)===null||o===void 0?void 0:o.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 u=Cr(s,["formatters"]);this.ast=e.__parse(t,X(X({},u),{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=Of(e.formats,r),this.formatters=i&&i.formatters||Rf(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=xf,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})(),Yt;(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"})(Yt||(Yt={}));var Hn=(function(e){rt(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
+ `,pt.MISSING_INTL_API,s);var D=n.getPluralRules(t,{type:f.pluralType}).select(m-(f.offset||0));C=f.options[D]||f.options.other}if(!C)throw new Qa(f.value,m,Object.keys(f.options),s);u.push.apply(u,or(C.value,t,n,r,i,m-(f.offset||0)));continue}}return Bf(u)}function Ff(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 Hf(e,t){return t?Object.keys(e).reduce(function(n,r){return n[r]=Ff(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 Uf(e){return e===void 0&&(e={number:{},dateTime:{},pluralRules:{}}),{getNumberFormat:ft(function(){for(var t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return new((t=Intl.NumberFormat).bind.apply(t,ht([void 0],n,!1)))},{cache:qr(e.number),strategy:dt.variadic}),getDateTimeFormat:ft(function(){for(var t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return new((t=Intl.DateTimeFormat).bind.apply(t,ht([void 0],n,!1)))},{cache:qr(e.dateTime),strategy:dt.variadic}),getPluralRules:ft(function(){for(var t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return new((t=Intl.PluralRules).bind.apply(t,ht([void 0],n,!1)))},{cache:qr(e.pluralRules),strategy:dt.variadic})}}var ro=(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(l){var c=a.formatToParts(l);if(c.length===1)return c[0].value;var f=c.reduce(function(d,m){return!d.length||m.type!==Ge.literal||typeof d[d.length-1]!="string"?d.push(m.value):d[d.length-1]+=m.value,d},[]);return f.length<=1?f[0]||"":f},this.formatToParts=function(l){return or(a.ast,a.locales,a.formatters,a.formats,l,void 0,a.message)},this.resolvedOptions=function(){var l;return{locale:((l=a.resolvedLocale)===null||l===void 0?void 0:l.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 u=Ir(s,["formatters"]);this.ast=e.__parse(t,X(X({},u),{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=Hf(e.formats,r),this.formatters=i&&i.formatters||Uf(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=vf,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})(),Gt;(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"})(Gt||(Gt={}));var jn=(function(e){rt(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),Lf=(function(e){rt(t,e);function t(n,r){return e.call(this,Yt.UNSUPPORTED_FORMATTER,n,r)||this}return t})(Hn),Df=(function(e){rt(t,e);function t(n,r){return e.call(this,Yt.INVALID_CONFIG,n,r)||this}return t})(Hn),Wa=(function(e){rt(t,e);function t(n,r){return e.call(this,Yt.MISSING_DATA,n,r)||this}return t})(Hn),it=(function(e){rt(t,e);function t(n,r,i){var a=e.call(this,Yt.FORMAT_ERROR,"".concat(n,`
31
+ `).concat(s.stack):""))||this,a.code=n,typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(a,t),a}return t})(Error),jf=(function(e){rt(t,e);function t(n,r){return e.call(this,Gt.UNSUPPORTED_FORMATTER,n,r)||this}return t})(jn),zf=(function(e){rt(t,e);function t(n,r){return e.call(this,Gt.INVALID_CONFIG,n,r)||this}return t})(jn),Ka=(function(e){rt(t,e);function t(n,r){return e.call(this,Gt.MISSING_DATA,n,r)||this}return t})(jn),it=(function(e){rt(t,e);function t(n,r,i){var a=e.call(this,Gt.FORMAT_ERROR,"".concat(n,`
32
32
  Locale: `).concat(r,`
33
- `),i)||this;return a.locale=r,a}return t})(Hn),Vr=(function(e){rt(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})(jn),Wr=(function(e){rt(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})(it),Pf=(function(e){rt(t,e);function t(n,r){var i=e.call(this,Yt.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})(Hn);function qt(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 Mf=function(e){process.env.NODE_ENV!=="production"&&console.error(e)},Bf=function(e){process.env.NODE_ENV!=="production"&&console.warn(e)},Zu={formats:{},messages:{},timeZone:void 0,defaultLocale:"en",defaultFormats:{},fallbackOnEmptyString:!0,onError:Mf,onWarn:Bf};function Ju(){return{dateTime:{},number:{},message:{},relativeTime:{},pluralRules:{},list:{},displayNames:{}}}function Bt(e){return{create:function(){return{get:function(t){return e[t]},set:function(t,n){e[t]=n}}}}}function Ff(e){e===void 0&&(e=Ju());var t=Intl.RelativeTimeFormat,n=Intl.ListFormat,r=Intl.DisplayNames,i=ht(function(){for(var u,o=[],c=0;c<arguments.length;c++)o[c]=arguments[c];return new((u=Intl.DateTimeFormat).bind.apply(u,pt([void 0],o,!1)))},{cache:Bt(e.dateTime),strategy:mt.variadic}),a=ht(function(){for(var u,o=[],c=0;c<arguments.length;c++)o[c]=arguments[c];return new((u=Intl.NumberFormat).bind.apply(u,pt([void 0],o,!1)))},{cache:Bt(e.number),strategy:mt.variadic}),s=ht(function(){for(var u,o=[],c=0;c<arguments.length;c++)o[c]=arguments[c];return new((u=Intl.PluralRules).bind.apply(u,pt([void 0],o,!1)))},{cache:Bt(e.pluralRules),strategy:mt.variadic});return{getDateTimeFormat:i,getNumberFormat:a,getMessageFormat:ht(function(u,o,c,f){return new Ku(u,o,c,X({formatters:{getNumberFormat:a,getDateTimeFormat:i,getPluralRules:s}},f||{}))},{cache:Bt(e.message),strategy:mt.variadic}),getRelativeTimeFormat:ht(function(){for(var u=[],o=0;o<arguments.length;o++)u[o]=arguments[o];return new(t.bind.apply(t,pt([void 0],u,!1)))},{cache:Bt(e.relativeTime),strategy:mt.variadic}),getPluralRules:s,getListFormat:ht(function(){for(var u=[],o=0;o<arguments.length;o++)u[o]=arguments[o];return new(n.bind.apply(n,pt([void 0],u,!1)))},{cache:Bt(e.list),strategy:mt.variadic}),getDisplayNames:ht(function(){for(var u=[],o=0;o<arguments.length;o++)u[o]=arguments[o];return new(r.bind.apply(r,pt([void 0],u,!1)))},{cache:Bt(e.displayNames),strategy:mt.variadic})}}function aa(e,t,n,r){var i=e&&e[t],a;if(i&&(a=i[n]),a)return a;r(new Lf("No ".concat(t," format named: ").concat(n)))}function Kn(e,t){return Object.keys(e).reduce(function(n,r){return n[r]=X({timeZone:t},e[r]),n},{})}function Xa(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 Qa(e,t){if(!t)return e;var n=Ku.formats;return X(X(X({},n),e),{date:Xa(Kn(n.date,t),Kn(e.date||{},t)),time:Xa(Kn(n.time,t),Kn(e.time||{},t))})}var Oi=function(e,t,n,r,i){var a=e.locale,s=e.formats,u=e.messages,o=e.defaultLocale,c=e.defaultFormats,f=e.fallbackOnEmptyString,d=e.onError,h=e.timeZone,m=e.defaultRichTextElements;n===void 0&&(n={id:""});var b=n.id,A=n.defaultMessage;Lu(!!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 C=String(b),y=u&&Object.prototype.hasOwnProperty.call(u,C)&&u[C];if(Array.isArray(y)&&y.length===1&&y[0].type===Ie.literal)return y[0].value;if(!r&&y&&typeof y=="string"&&!m)return y.replace(/'\{(.*?)\}'/gi,"{$1}");if(r=X(X({},m),r||{}),s=Qa(s,h),c=Qa(c,h),!y){if(f===!1&&y==="")return y;if((!A||a&&a.toLowerCase()!==o.toLowerCase())&&d(new Pf(n,a)),A)try{var S=t.getMessageFormat(A,o,c,i);return S.format(r)}catch(v){return d(new Vr('Error formatting default message for: "'.concat(C,'", rendering default message verbatim'),a,n,v)),typeof A=="string"?A:C}return C}try{var S=t.getMessageFormat(y,a,s,X({formatters:t},i||{}));return S.format(r)}catch(v){d(new Vr('Error formatting message: "'.concat(C,'", using ').concat(A?"default message":"id"," as fallback."),a,n,v))}if(A)try{var S=t.getMessageFormat(A,o,c,i);return S.format(r)}catch(v){d(new Vr('Error formatting the default message for: "'.concat(C,'", rendering message verbatim'),a,n,v))}return typeof y=="string"?y:typeof A=="string"?A:C},eo=["formatMatcher","timeZone","hour12","weekday","era","year","month","day","hour","minute","second","timeZoneName","hourCycle","dateStyle","timeStyle","calendar","numberingSystem","fractionalSecondDigits"];function wr(e,t,n,r){var i=e.locale,a=e.formats,s=e.onError,u=e.timeZone;r===void 0&&(r={});var o=r.format,c=X(X({},u&&{timeZone:u}),o&&aa(a,t,o,s)),f=qt(r,eo,c);return t==="time"&&!f.hour&&!f.minute&&!f.second&&!f.timeStyle&&!f.dateStyle&&(f=X(X({},f),{hour:"numeric",minute:"numeric"})),n(i,f)}function Hf(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,u=typeof i=="string"?new Date(i||0):i;try{return wr(e,"date",t,s).format(u)}catch(o){e.onError(new it("Error formatting date.",e.locale,o))}return String(u)}function Uf(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,u=typeof i=="string"?new Date(i||0):i;try{return wr(e,"time",t,s).format(u)}catch(o){e.onError(new it("Error formatting time.",e.locale,o))}return String(u)}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=n[2],u=s===void 0?{}:s,o=e.timeZone,c=e.locale,f=e.onError,d=qt(u,eo,o?{timeZone:o}:{});try{return t(c,d).formatRange(i,a)}catch(h){f(new it("Error formatting date time range.",e.locale,h))}return String(i)}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=a===void 0?{}:a,u=typeof i=="string"?new Date(i||0):i;try{return wr(e,"date",t,s).formatToParts(u)}catch(o){e.onError(new it("Error formatting date.",e.locale,o))}return[]}function $f(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,u=typeof i=="string"?new Date(i||0):i;try{return wr(e,"time",t,s).formatToParts(u)}catch(o){e.onError(new it("Error formatting time.",e.locale,o))}return[]}var Yf=["style","type","fallback","languageDisplay"];function Gf(e,t,n,r){var i=e.locale,a=e.onError,s=Intl.DisplayNames;s||a(new Lt(`Intl.DisplayNames is not available in this environment.
37
+ `),r,a)||this;return s.descriptor=i,s.locale=r,s}return t})(it),$f=(function(e){rt(t,e);function t(n,r){var i=e.call(this,Gt.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})(jn);function Xt(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 Yf=function(e){process.env.NODE_ENV!=="production"&&console.error(e)},Gf=function(e){process.env.NODE_ENV!=="production"&&console.warn(e)},io={formats:{},messages:{},timeZone:void 0,defaultLocale:"en",defaultFormats:{},fallbackOnEmptyString:!0,onError:Yf,onWarn:Gf};function ao(){return{dateTime:{},number:{},message:{},relativeTime:{},pluralRules:{},list:{},displayNames:{}}}function Ft(e){return{create:function(){return{get:function(t){return e[t]},set:function(t,n){e[t]=n}}}}}function Vf(e){e===void 0&&(e=ao());var t=Intl.RelativeTimeFormat,n=Intl.ListFormat,r=Intl.DisplayNames,i=ft(function(){for(var u,l=[],c=0;c<arguments.length;c++)l[c]=arguments[c];return new((u=Intl.DateTimeFormat).bind.apply(u,ht([void 0],l,!1)))},{cache:Ft(e.dateTime),strategy:dt.variadic}),a=ft(function(){for(var u,l=[],c=0;c<arguments.length;c++)l[c]=arguments[c];return new((u=Intl.NumberFormat).bind.apply(u,ht([void 0],l,!1)))},{cache:Ft(e.number),strategy:dt.variadic}),s=ft(function(){for(var u,l=[],c=0;c<arguments.length;c++)l[c]=arguments[c];return new((u=Intl.PluralRules).bind.apply(u,ht([void 0],l,!1)))},{cache:Ft(e.pluralRules),strategy:dt.variadic});return{getDateTimeFormat:i,getNumberFormat:a,getMessageFormat:ft(function(u,l,c,f){return new ro(u,l,c,X({formatters:{getNumberFormat:a,getDateTimeFormat:i,getPluralRules:s}},f||{}))},{cache:Ft(e.message),strategy:dt.variadic}),getRelativeTimeFormat:ft(function(){for(var u=[],l=0;l<arguments.length;l++)u[l]=arguments[l];return new(t.bind.apply(t,ht([void 0],u,!1)))},{cache:Ft(e.relativeTime),strategy:dt.variadic}),getPluralRules:s,getListFormat:ft(function(){for(var u=[],l=0;l<arguments.length;l++)u[l]=arguments[l];return new(n.bind.apply(n,ht([void 0],u,!1)))},{cache:Ft(e.list),strategy:dt.variadic}),getDisplayNames:ft(function(){for(var u=[],l=0;l<arguments.length;l++)u[l]=arguments[l];return new(r.bind.apply(r,ht([void 0],u,!1)))},{cache:Ft(e.displayNames),strategy:dt.variadic})}}function oa(e,t,n,r){var i=e&&e[t],a;if(i&&(a=i[n]),a)return a;r(new jf("No ".concat(t," format named: ").concat(n)))}function Jn(e,t){return Object.keys(e).reduce(function(n,r){return n[r]=X({timeZone:t},e[r]),n},{})}function Za(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 Ja(e,t){if(!t)return e;var n=ro.formats;return X(X(X({},n),e),{date:Za(Jn(n.date,t),Jn(e.date||{},t)),time:Za(Jn(n.time,t),Jn(e.time||{},t))})}var Ri=function(e,t,n,r,i){var a=e.locale,s=e.formats,u=e.messages,l=e.defaultLocale,c=e.defaultFormats,f=e.fallbackOnEmptyString,d=e.onError,m=e.timeZone,h=e.defaultRichTextElements;n===void 0&&(n={id:""});var b=n.id,A=n.defaultMessage;Hu(!!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 _=String(b),x=u&&Object.prototype.hasOwnProperty.call(u,_)&&u[_];if(Array.isArray(x)&&x.length===1&&x[0].type===Ie.literal)return x[0].value;if(!r&&x&&typeof x=="string"&&!h)return x.replace(/'\{(.*?)\}'/gi,"{$1}");if(r=X(X({},h),r||{}),s=Ja(s,m),c=Ja(c,m),!x){if(f===!1&&x==="")return x;if((!A||a&&a.toLowerCase()!==l.toLowerCase())&&d(new $f(n,a)),A)try{var I=t.getMessageFormat(A,l,c,i);return I.format(r)}catch(C){return d(new Wr('Error formatting default message for: "'.concat(_,'", rendering default message verbatim'),a,n,C)),typeof A=="string"?A:_}return _}try{var I=t.getMessageFormat(x,a,s,X({formatters:t},i||{}));return I.format(r)}catch(C){d(new Wr('Error formatting message: "'.concat(_,'", using ').concat(A?"default message":"id"," as fallback."),a,n,C))}if(A)try{var I=t.getMessageFormat(A,l,c,i);return I.format(r)}catch(C){d(new Wr('Error formatting the default message for: "'.concat(_,'", rendering message verbatim'),a,n,C))}return typeof x=="string"?x:typeof A=="string"?A:_},so=["formatMatcher","timeZone","hour12","weekday","era","year","month","day","hour","minute","second","timeZoneName","hourCycle","dateStyle","timeStyle","calendar","numberingSystem","fractionalSecondDigits"];function vr(e,t,n,r){var i=e.locale,a=e.formats,s=e.onError,u=e.timeZone;r===void 0&&(r={});var l=r.format,c=X(X({},u&&{timeZone:u}),l&&oa(a,t,l,s)),f=Xt(r,so,c);return t==="time"&&!f.hour&&!f.minute&&!f.second&&!f.timeStyle&&!f.dateStyle&&(f=X(X({},f),{hour:"numeric",minute:"numeric"})),n(i,f)}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,u=typeof i=="string"?new Date(i||0):i;try{return vr(e,"date",t,s).format(u)}catch(l){e.onError(new it("Error formatting date.",e.locale,l))}return String(u)}function Wf(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,u=typeof i=="string"?new Date(i||0):i;try{return vr(e,"time",t,s).format(u)}catch(l){e.onError(new it("Error formatting time.",e.locale,l))}return String(u)}function Xf(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],u=s===void 0?{}:s,l=e.timeZone,c=e.locale,f=e.onError,d=Xt(u,so,l?{timeZone:l}:{});try{return t(c,d).formatRange(i,a)}catch(m){f(new it("Error formatting date time range.",e.locale,m))}return String(i)}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,u=typeof i=="string"?new Date(i||0):i;try{return vr(e,"date",t,s).formatToParts(u)}catch(l){e.onError(new it("Error formatting date.",e.locale,l))}return[]}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,u=typeof i=="string"?new Date(i||0):i;try{return vr(e,"time",t,s).formatToParts(u)}catch(l){e.onError(new it("Error formatting time.",e.locale,l))}return[]}var Zf=["style","type","fallback","languageDisplay"];function Jf(e,t,n,r){var i=e.locale,a=e.onError,s=Intl.DisplayNames;s||a(new kt(`Intl.DisplayNames is not available in this environment.
38
38
  Try polyfilling it using "@formatjs/intl-displaynames"
39
- `,bt.MISSING_INTL_API));var u=qt(r,Yf);try{return t(i,u).of(n)}catch(o){a(new it("Error formatting display name.",i,o))}}var Vf=["type","style"],Ka=Date.now();function qf(e){return"".concat(Ka,"_").concat(e,"_").concat(Ka)}function Wf(e,t,n,r){r===void 0&&(r={});var i=to(e,t,n,r).reduce(function(a,s){var u=s.value;return typeof u!="string"?a.push(u):typeof a[a.length-1]=="string"?a[a.length-1]+=u:a.push(u),a},[]);return i.length===1?i[0]:i.length===0?"":i}function to(e,t,n,r){var i=e.locale,a=e.onError;r===void 0&&(r={});var s=Intl.ListFormat;s||a(new Lt(`Intl.ListFormat is not available in this environment.
39
+ `,pt.MISSING_INTL_API));var u=Xt(r,Zf);try{return t(i,u).of(n)}catch(l){a(new it("Error formatting display name.",i,l))}}var ed=["type","style"],es=Date.now();function td(e){return"".concat(es,"_").concat(e,"_").concat(es)}function nd(e,t,n,r){r===void 0&&(r={});var i=uo(e,t,n,r).reduce(function(a,s){var u=s.value;return typeof u!="string"?a.push(u):typeof a[a.length-1]=="string"?a[a.length-1]+=u:a.push(u),a},[]);return i.length===1?i[0]:i.length===0?"":i}function uo(e,t,n,r){var i=e.locale,a=e.onError;r===void 0&&(r={});var s=Intl.ListFormat;s||a(new kt(`Intl.ListFormat is not available in this environment.
40
40
  Try polyfilling it using "@formatjs/intl-listformat"
41
- `,bt.MISSING_INTL_API));var u=qt(r,Vf);try{var o={},c=n.map(function(f,d){if(typeof f=="object"){var h=qf(d);return o[h]=f,h}return String(f)});return t(i,u).formatToParts(c).map(function(f){return f.type==="literal"?f:X(X({},f),{value:o[f.value]||f.value})})}catch(f){a(new it("Error formatting list.",i,f))}return n}var Xf=["type"];function Qf(e,t,n,r){var i=e.locale,a=e.onError;r===void 0&&(r={}),Intl.PluralRules||a(new Lt(`Intl.PluralRules is not available in this environment.
41
+ `,pt.MISSING_INTL_API));var u=Xt(r,ed);try{var l={},c=n.map(function(f,d){if(typeof f=="object"){var m=td(d);return l[m]=f,m}return String(f)});return t(i,u).formatToParts(c).map(function(f){return f.type==="literal"?f:X(X({},f),{value:l[f.value]||f.value})})}catch(f){a(new it("Error formatting list.",i,f))}return n}var rd=["type"];function id(e,t,n,r){var i=e.locale,a=e.onError;r===void 0&&(r={}),Intl.PluralRules||a(new kt(`Intl.PluralRules is not available in this environment.
42
42
  Try polyfilling it using "@formatjs/intl-pluralrules"
43
- `,bt.MISSING_INTL_API));var s=qt(r,Xf);try{return t(i,s).select(n)}catch(u){a(new it("Error formatting plural.",i,u))}return"other"}var Kf=["numeric","style"];function Zf(e,t,n){var r=e.locale,i=e.formats,a=e.onError;n===void 0&&(n={});var s=n.format,u=!!s&&aa(i,"relative",s,a)||{},o=qt(n,Kf,u);return t(r,o)}function Jf(e,t,n,r,i){i===void 0&&(i={}),r||(r="second");var a=Intl.RelativeTimeFormat;a||e.onError(new Lt(`Intl.RelativeTimeFormat is not available in this environment.
43
+ `,pt.MISSING_INTL_API));var s=Xt(r,rd);try{return t(i,s).select(n)}catch(u){a(new it("Error formatting plural.",i,u))}return"other"}var ad=["numeric","style"];function sd(e,t,n){var r=e.locale,i=e.formats,a=e.onError;n===void 0&&(n={});var s=n.format,u=!!s&&oa(i,"relative",s,a)||{},l=Xt(n,ad,u);return t(r,l)}function ud(e,t,n,r,i){i===void 0&&(i={}),r||(r="second");var a=Intl.RelativeTimeFormat;a||e.onError(new kt(`Intl.RelativeTimeFormat is not available in this environment.
44
44
  Try polyfilling it using "@formatjs/intl-relativetimeformat"
45
- `,bt.MISSING_INTL_API));try{return Zf(e,t,i).format(n,r)}catch(s){e.onError(new it("Error formatting relative time.",e.locale,s))}return String(n)}var ed=["style","currency","unit","unitDisplay","useGrouping","minimumIntegerDigits","minimumFractionDigits","maximumFractionDigits","minimumSignificantDigits","maximumSignificantDigits","compactDisplay","currencyDisplay","currencySign","notation","signDisplay","unit","unitDisplay","numberingSystem","trailingZeroDisplay","roundingPriority","roundingIncrement","roundingMode"];function no(e,t,n){var r=e.locale,i=e.formats,a=e.onError;n===void 0&&(n={});var s=n.format,u=s&&aa(i,"number",s,a)||{},o=qt(n,ed,u);return t(r,o)}function td(e,t,n,r){r===void 0&&(r={});try{return no(e,t,r).format(n)}catch(i){e.onError(new it("Error formatting number.",e.locale,i))}return String(n)}function nd(e,t,n,r){r===void 0&&(r={});try{return no(e,t,r).formatToParts(n)}catch(i){e.onError(new it("Error formatting number.",e.locale,i))}return[]}function rd(e){var t=e?e[Object.keys(e)[0]]:void 0;return typeof t=="string"}function id(e){e.onWarn&&e.defaultRichTextElements&&rd(e.messages||{})&&e.onWarn(`[@formatjs/intl] "defaultRichTextElements" was specified but "message" was not pre-compiled.
45
+ `,pt.MISSING_INTL_API));try{return sd(e,t,i).format(n,r)}catch(s){e.onError(new it("Error formatting relative time.",e.locale,s))}return String(n)}var od=["style","currency","unit","unitDisplay","useGrouping","minimumIntegerDigits","minimumFractionDigits","maximumFractionDigits","minimumSignificantDigits","maximumSignificantDigits","compactDisplay","currencyDisplay","currencySign","notation","signDisplay","unit","unitDisplay","numberingSystem","trailingZeroDisplay","roundingPriority","roundingIncrement","roundingMode"];function oo(e,t,n){var r=e.locale,i=e.formats,a=e.onError;n===void 0&&(n={});var s=n.format,u=s&&oa(i,"number",s,a)||{},l=Xt(n,od,u);return t(r,l)}function ld(e,t,n,r){r===void 0&&(r={});try{return oo(e,t,r).format(n)}catch(i){e.onError(new it("Error formatting number.",e.locale,i))}return String(n)}function cd(e,t,n,r){r===void 0&&(r={});try{return oo(e,t,r).formatToParts(n)}catch(i){e.onError(new it("Error formatting number.",e.locale,i))}return[]}function fd(e){var t=e?e[Object.keys(e)[0]]:void 0;return typeof t=="string"}function dd(e){e.onWarn&&e.defaultRichTextElements&&fd(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 ad(e,t){var n=Ff(t),r=X(X({},Zu),e),i=r.locale,a=r.defaultLocale,s=r.onError;return i?!Intl.NumberFormat.supportedLocalesOf(i).length&&s?s(new Wa('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 Wa('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 Df('"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"),id(r),X(X({},r),{formatters:n,formatNumber:td.bind(null,r,n.getNumberFormat),formatNumberToParts:nd.bind(null,r,n.getNumberFormat),formatRelativeTime:Jf.bind(null,r,n.getRelativeTimeFormat),formatDate:Hf.bind(null,r,n.getDateTimeFormat),formatDateToParts:zf.bind(null,r,n.getDateTimeFormat),formatTime:Uf.bind(null,r,n.getDateTimeFormat),formatDateTimeRange:jf.bind(null,r,n.getDateTimeFormat),formatTimeToParts:$f.bind(null,r,n.getDateTimeFormat),formatPlural:Qf.bind(null,r,n.getPluralRules),formatMessage:Oi.bind(null,r,n),$t:Oi.bind(null,r,n),formatList:Wf.bind(null,r,n.getListFormat),formatListToParts:to.bind(null,r,n.getListFormat),formatDisplayName:Gf.bind(null,r,n.getDisplayNames)})}function ro(e){Lu(e,"[React Intl] Could not find required `intl` object. <IntlProvider> needs to exist in the component ancestry.")}var io=X(X({},Zu),{textComponent:Be.Fragment});function sd(e){return function(t){return e(Be.Children.toArray(t))}}function ud(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 sa=typeof window<"u"&&!window.__REACT_INTL_BYPASS_GLOBAL_CONTEXT__?window.__REACT_INTL_CONTEXT__||(window.__REACT_INTL_CONTEXT__=Be.createContext(null)):Be.createContext(null);sa.Consumer;var od=sa.Provider,ld=od,cd=sa;function hn(){var e=Be.useContext(cd);return ro(e),e}var Ri;(function(e){e.formatDate="FormattedDate",e.formatTime="FormattedTime",e.formatNumber="FormattedNumber",e.formatList="FormattedList",e.formatDisplayName="FormattedDisplayName"})(Ri||(Ri={}));var Li;(function(e){e.formatDate="FormattedDateParts",e.formatTime="FormattedTimeParts",e.formatNumber="FormattedNumberParts",e.formatList="FormattedListParts"})(Li||(Li={}));function ao(e){var t=function(n){var r=hn(),i=n.value,a=n.children,s=Cr(n,["value","children"]),u=typeof i=="string"?new Date(i||0):i,o=e==="formatDate"?r.formatDateToParts(u,s):r.formatTimeToParts(u,s);return a(o)};return t.displayName=Li[e],t}function Un(e){var t=function(n){var r=hn(),i=n.value,a=n.children,s=Cr(n,["value","children"]),u=r[e](i,s);if(typeof a=="function")return a(u);var o=r.textComponent||Be.Fragment;return Be.createElement(o,null,u)};return t.displayName=Ri[e],t}function so(e){return e&&Object.keys(e).reduce(function(t,n){var r=e[n];return t[n]=Qu(r)?sd(r):r,t},{})}var Za=function(e,t,n,r){for(var i=[],a=4;a<arguments.length;a++)i[a-4]=arguments[a];var s=so(r),u=Oi.apply(void 0,pt([e,t,n,s],i,!1));return Array.isArray(u)?Be.Children.toArray(u):u},Ja=function(e,t){var n=e.defaultRichTextElements,r=Cr(e,["defaultRichTextElements"]),i=so(n),a=ad(X(X(X({},io),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:Za.bind(null,s,a.formatters),$t:Za.bind(null,s,a.formatters)})};function qr(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 fd=(function(e){rt(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.cache=Ju(),n.state={cache:n.cache,intl:Ja(qr(n.props),n.cache),prevConfig:qr(n.props)},n}return t.getDerivedStateFromProps=function(n,r){var i=r.prevConfig,a=r.cache,s=qr(n);return ud(i,s)?null:{intl:Ja(s,a),prevConfig:s}},t.prototype.render=function(){return ro(this.state.intl),Be.createElement(ld,{value:this.state.intl},this.props.children)},t.displayName="IntlProvider",t.defaultProps=io,t})(Be.PureComponent);Un("formatDate");Un("formatTime");Un("formatNumber");Un("formatList");Un("formatDisplayName");ao("formatDate");ao("formatTime");const ua=()=>{const e=hn(),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"}),u=e.formatMessage({defaultMessage:"See",id:"chatbot.infobanner.title"}),o=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:u,infoBannerExplainationTranslation:o}};function es(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 uo(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const dd=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,hd=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,md={};function ts(e,t){return(md.jsx?hd:dd).test(e)}const pd=/[ \t\n\f\r]/g;function gd(e){return typeof e=="object"?e.type==="text"?ns(e.value):!1:ns(e)}function ns(e){return e.replace(pd,"")===""}class jn{constructor(t,n,r){this.property=t,this.normal=n,r&&(this.space=r)}}jn.prototype.property={};jn.prototype.normal={};jn.prototype.space=null;function oo(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 jn(n,r,t)}function Pn(e){return e.toLowerCase()}class at{constructor(t,n){this.property=t,this.attribute=n}}at.prototype.space=null;at.prototype.boolean=!1;at.prototype.booleanish=!1;at.prototype.overloadedBoolean=!1;at.prototype.number=!1;at.prototype.commaSeparated=!1;at.prototype.spaceSeparated=!1;at.prototype.commaOrSpaceSeparated=!1;at.prototype.mustUseProperty=!1;at.prototype.defined=!1;let bd=0;const oe=Wt(),Me=Wt(),lo=Wt(),F=Wt(),ve=Wt(),sn=Wt(),Qe=Wt();function Wt(){return 2**++bd}const Di=Object.freeze(Object.defineProperty({__proto__:null,boolean:oe,booleanish:Me,commaOrSpaceSeparated:Qe,commaSeparated:sn,number:F,overloadedBoolean:lo,spaceSeparated:ve},Symbol.toStringTag,{value:"Module"})),Wr=Object.keys(Di);class oa extends at{constructor(t,n,r,i){let a=-1;if(super(t,n),rs(this,"space",i),typeof r=="number")for(;++a<Wr.length;){const s=Wr[a];rs(this,Wr[a],(r&Di[s])===Di[s])}}}oa.prototype.defined=!0;function rs(e,t,n){n&&(e[t]=n)}const Ed={}.hasOwnProperty;function mn(e){const t={},n={};let r;for(r in e.properties)if(Ed.call(e.properties,r)){const i=e.properties[r],a=new oa(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[Pn(r)]=r,n[Pn(a.attribute)]=r}return new jn(t,n,e.space)}const co=mn({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}}),fo=mn({space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()},properties:{xmlLang:null,xmlBase:null,xmlSpace:null}});function ho(e,t){return t in e?e[t]:t}function mo(e,t){return ho(e,t.toLowerCase())}const po=mn({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:mo,properties:{xmlns:null,xmlnsXLink:null}}),go=mn({transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()},properties:{ariaActiveDescendant:null,ariaAtomic:Me,ariaAutoComplete:null,ariaBusy:Me,ariaChecked:Me,ariaColCount:F,ariaColIndex:F,ariaColSpan:F,ariaControls:ve,ariaCurrent:null,ariaDescribedBy:ve,ariaDetails:null,ariaDisabled:Me,ariaDropEffect:ve,ariaErrorMessage:null,ariaExpanded:Me,ariaFlowTo:ve,ariaGrabbed:Me,ariaHasPopup:null,ariaHidden:Me,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:ve,ariaLevel:F,ariaLive:null,ariaModal:Me,ariaMultiLine:Me,ariaMultiSelectable:Me,ariaOrientation:null,ariaOwns:ve,ariaPlaceholder:null,ariaPosInSet:F,ariaPressed:Me,ariaReadOnly:Me,ariaRelevant:null,ariaRequired:Me,ariaRoleDescription:ve,ariaRowCount:F,ariaRowIndex:F,ariaRowSpan:F,ariaSelected:Me,ariaSetSize:F,ariaSort:null,ariaValueMax:F,ariaValueMin:F,ariaValueNow:F,ariaValueText:null,role:null}}),Td=mn({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:mo,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:sn,acceptCharset:ve,accessKey:ve,action:null,allow:null,allowFullScreen:oe,allowPaymentRequest:oe,allowUserMedia:oe,alt:null,as:null,async:oe,autoCapitalize:null,autoComplete:ve,autoFocus:oe,autoPlay:oe,blocking:ve,capture:null,charSet:null,checked:oe,cite:null,className:ve,cols:F,colSpan:null,content:null,contentEditable:Me,controls:oe,controlsList:ve,coords:F|sn,crossOrigin:null,data:null,dateTime:null,decoding:null,default:oe,defer:oe,dir:null,dirName:null,disabled:oe,download:lo,draggable:Me,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:oe,formTarget:null,headers:ve,height:F,hidden:oe,high:F,href:null,hrefLang:null,htmlFor:ve,httpEquiv:ve,id:null,imageSizes:null,imageSrcSet:null,inert:oe,inputMode:null,integrity:null,is:null,isMap:oe,itemId:null,itemProp:ve,itemRef:ve,itemScope:oe,itemType:ve,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:oe,low:F,manifest:null,max:null,maxLength:F,media:null,method:null,min:null,minLength:F,multiple:oe,muted:oe,name:null,nonce:null,noModule:oe,noValidate:oe,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:oe,optimum:F,pattern:null,ping:ve,placeholder:null,playsInline:oe,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:oe,referrerPolicy:null,rel:ve,required:oe,reversed:oe,rows:F,rowSpan:F,sandbox:ve,scope:null,scoped:oe,seamless:oe,selected:oe,shadowRootDelegatesFocus:oe,shadowRootMode:null,shape:null,size:F,sizes:null,slot:null,span:F,spellCheck:Me,src:null,srcDoc:null,srcLang:null,srcSet:null,start:F,step:null,style:null,tabIndex:F,target:null,title:null,translate:null,type:null,typeMustMatch:oe,useMap:null,value:Me,width:F,wrap:null,align:null,aLink:null,archive:ve,axis:null,background:null,bgColor:null,border:F,borderColor:null,bottomMargin:F,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:oe,declare:oe,event:null,face:null,frame:null,frameBorder:null,hSpace:F,leftMargin:F,link:null,longDesc:null,lowSrc:null,marginHeight:F,marginWidth:F,noResize:oe,noHref:oe,noShade:oe,noWrap:oe,object:null,profile:null,prompt:null,rev:null,rightMargin:F,rules:null,scheme:null,scrolling:Me,standby:null,summary:null,text:null,topMargin:F,valueType:null,version:null,vAlign:null,vLink:null,vSpace:F,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:oe,disableRemotePlayback:oe,prefix:null,property:null,results:F,security:null,unselectable:null}}),xd=mn({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:ho,properties:{about:Qe,accentHeight:F,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:F,amplitude:F,arabicForm:null,ascent:F,attributeName:null,attributeType:null,azimuth:F,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:F,by:null,calcMode:null,capHeight:F,className:ve,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:F,diffuseConstant:F,direction:null,display:null,dur:null,divisor:F,dominantBaseline:null,download:oe,dx:null,dy:null,edgeMode:null,editable:null,elevation:F,enableBackground:null,end:null,event:null,exponent:F,externalResourcesRequired:null,fill:null,fillOpacity:F,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:sn,g2:sn,glyphName:sn,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:F,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:F,horizOriginX:F,horizOriginY:F,id:null,ideographic:F,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:F,k:F,k1:F,k2:F,k3:F,k4:F,kernelMatrix:Qe,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:F,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:F,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:F,overlineThickness:F,paintOrder:null,panose1:null,path:null,pathLength:F,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:ve,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:F,pointsAtY:F,pointsAtZ:F,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Qe,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Qe,rev:Qe,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Qe,requiredFeatures:Qe,requiredFonts:Qe,requiredFormats:Qe,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:F,specularExponent:F,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:F,strikethroughThickness:F,string:null,stroke:null,strokeDashArray:Qe,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:F,strokeOpacity:F,strokeWidth:null,style:null,surfaceScale:F,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Qe,tabIndex:F,tableValues:null,target:null,targetX:F,targetY:F,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Qe,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:F,underlineThickness:F,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:F,values:null,vAlphabetic:F,vMathematical:F,vectorEffect:null,vHanging:F,vIdeographic:F,version:null,vertAdvY:F,vertOriginX:F,vertOriginY:F,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:F,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null}}),yd=/^data[-\w.:]+$/i,is=/-[a-z]/g,Ad=/[A-Z]/g;function vr(e,t){const n=Pn(t);let r=t,i=at;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&yd.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(is,Sd);r="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!is.test(a)){let s=a.replace(Ad,_d);s.charAt(0)!=="-"&&(s="-"+s),t="data"+s}}i=oa}return new i(r,t)}function _d(e){return"-"+e.toLowerCase()}function Sd(e){return e.charAt(1).toUpperCase()}const Cd={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"},zn=oo([fo,co,po,go,Td],"html"),Dt=oo([fo,co,po,go,xd],"svg");function as(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function bo(e){return e.join(" ").trim()}var Zt={},Xr,ss;function wd(){if(ss)return Xr;ss=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,a=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,s=/^[;\s]*/,u=/^\s+|\s+$/g,o=`
48
- `,c="/",f="*",d="",h="comment",m="declaration";Xr=function(A,C){if(typeof A!="string")throw new TypeError("First argument must be a string");if(!A)return[];C=C||{};var y=1,S=1;function v($){var Y=$.match(t);Y&&(y+=Y.length);var J=$.lastIndexOf(o);S=~J?$.length-J:S+$.length}function D(){var $={line:y,column:S};return function(Y){return Y.position=new N($),ue(),Y}}function N($){this.start=$,this.end={line:y,column:S},this.source=C.source}N.prototype.content=A;function O($){var Y=new Error(C.source+":"+y+":"+S+": "+$);if(Y.reason=$,Y.filename=C.source,Y.line=y,Y.column=S,Y.source=A,!C.silent)throw Y}function q($){var Y=$.exec(A);if(Y){var J=Y[0];return v(J),A=A.slice(J.length),Y}}function ue(){q(n)}function G($){var Y;for($=$||[];Y=w();)Y!==!1&&$.push(Y);return $}function w(){var $=D();if(!(c!=A.charAt(0)||f!=A.charAt(1))){for(var Y=2;d!=A.charAt(Y)&&(f!=A.charAt(Y)||c!=A.charAt(Y+1));)++Y;if(Y+=2,d===A.charAt(Y-1))return O("End of comment missing");var J=A.slice(2,Y-2);return S+=2,v(J),A=A.slice(Y),S+=2,$({type:h,comment:J})}}function j(){var $=D(),Y=q(r);if(Y){if(w(),!q(i))return O("property missing ':'");var J=q(a),he=$({type:m,property:b(Y[0].replace(e,d)),value:J?b(J[0].replace(e,d)):d});return q(s),he}}function H(){var $=[];G($);for(var Y;Y=j();)Y!==!1&&($.push(Y),G($));return $}return ue(),H()};function b(A){return A?A.replace(u,d):d}return Xr}var us;function vd(){if(us)return Zt;us=1;var e=Zt&&Zt.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Zt,"__esModule",{value:!0});var t=e(wd());function n(r,i){var a=null;if(!r||typeof r!="string")return a;var s=(0,t.default)(r),u=typeof i=="function";return s.forEach(function(o){if(o.type==="declaration"){var c=o.property,f=o.value;u?i(c,f,o):f&&(a=a||{},a[c]=f)}}),a}return Zt.default=n,Zt}var Id=vd();const os=ta(Id),Nd=os.default||os,Ir=Eo("end"),Et=Eo("start");function Eo(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 kd(e){const t=Et(e),n=Ir(e);if(t&&n)return{start:t,end:n}}function vn(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?ls(e.position):"start"in e||"end"in e?ls(e):"line"in e||"column"in e?Pi(e):""}function Pi(e){return cs(e&&e.line)+":"+cs(e&&e.column)}function ls(e){return Pi(e&&e.start)+"-"+Pi(e&&e.end)}function cs(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 o=r.indexOf(":");o===-1?a.ruleId=r:(a.source=r.slice(0,o),a.ruleId=r.slice(o+1))}if(!a.place&&a.ancestors&&a.ancestors){const o=a.ancestors[a.ancestors.length-1];o&&(a.place=o.position)}const u=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=u?u.column:void 0,this.fatal=void 0,this.file,this.message=i,this.line=u?u.line:void 0,this.name=vn(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 la={}.hasOwnProperty,Od=new Map,Rd=/[A-Z]/g,Ld=/-([a-z])/g,Dd=new Set(["table","tbody","thead","tfoot","tr"]),Pd=new Set(["td","th"]),To="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function Md(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=Yd(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=$d(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"?Dt:zn,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=xo(i,e,void 0);return a&&typeof a!="string"?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}function xo(e,t,n){if(t.type==="element")return Bd(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return Fd(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return Ud(e,t,n);if(t.type==="mdxjsEsm")return Hd(e,t);if(t.type==="root")return jd(e,t,n);if(t.type==="text")return zd(e,t)}function Bd(e,t,n){const r=e.schema;let i=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=Dt,e.schema=i),e.ancestors.push(t);const a=Ao(e,t.tagName,!1),s=Gd(e,t);let u=fa(e,t);return Dd.has(t.tagName)&&(u=u.filter(function(o){return typeof o=="string"?!gd(o):!0})),yo(e,s,a,t),ca(s,u),e.ancestors.pop(),e.schema=r,e.create(t,a,s,n)}function Fd(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)}Mn(e,t.position)}function Hd(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Mn(e,t.position)}function Ud(e,t,n){const r=e.schema;let i=r;t.name==="svg"&&r.space==="html"&&(i=Dt,e.schema=i),e.ancestors.push(t);const a=t.name===null?e.Fragment:Ao(e,t.name,!0),s=Vd(e,t),u=fa(e,t);return yo(e,s,a,t),ca(s,u),e.ancestors.pop(),e.schema=r,e.create(t,a,s,n)}function jd(e,t,n){const r={};return ca(r,fa(e,t)),e.create(t,e.Fragment,r,n)}function zd(e,t){return t.value}function yo(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function ca(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function $d(e,t,n){return r;function r(i,a,s,u){const c=Array.isArray(s.children)?n:t;return u?c(a,s,u):c(a,s)}}function Yd(e,t){return n;function n(r,i,a,s){const u=Array.isArray(a.children),o=Et(r);return t(i,a,s,u,{columnNumber:o?o.column-1:void 0,fileName:e,lineNumber:o?o.line:void 0},void 0)}}function Gd(e,t){const n={};let r,i;for(i in t.properties)if(i!=="children"&&la.call(t.properties,i)){const a=qd(e,i,t.properties[i]);if(a){const[s,u]=a;e.tableCellAlignToStyle&&s==="align"&&typeof u=="string"&&Pd.has(t.tagName)?r=u:n[s]=u}}if(r){const a=n.style||(n.style={});a[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function Vd(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 u=s.properties[0];u.type,Object.assign(n,e.evaluater.evaluateExpression(u.argument))}else Mn(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 u=r.value.data.estree.body[0];u.type,a=e.evaluater.evaluateExpression(u.expression)}else Mn(e,t.position);else a=r.value===null?!0:r.value;n[i]=a}return n}function fa(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:Od;for(;++r<t.children.length;){const a=t.children[r];let s;if(e.passKeys){const o=a.type==="element"?a.tagName:a.type==="mdxJsxFlowElement"||a.type==="mdxJsxTextElement"?a.name:void 0;if(o){const c=i.get(o)||0;s=o+"-"+c,i.set(o,c+1)}}const u=xo(e,a,s);u!==void 0&&n.push(u)}return n}function qd(e,t,n){const r=vr(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?uo(n):bo(n)),r.property==="style"){let i=typeof n=="object"?n:Wd(e,String(n));return e.stylePropertyNameCase==="css"&&(i=Xd(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&r.space?Cd[r.property]||r.property:r.attribute,n]}}function Wd(e,t){const n={};try{Nd(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=To+"#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(Ld,Kd)),n[s]=a}}function Ao(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 u=ts(i[a])?{type:"Identifier",name:i[a]}:{type:"Literal",value:i[a]};s=s?{type:"MemberExpression",object:s,property:u,computed:!!(a&&u.type==="Literal"),optional:!1}:u}r=s}else r=ts(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const i=r.value;return la.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);Mn(e)}function Mn(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=To+"#cannot-handle-mdx-estrees-without-createevaluater",n}function Xd(e){const t={};let n;for(n in e)la.call(e,n)&&(t[Qd(n)]=e[n]);return t}function Qd(e){let t=e.replace(Rd,Zd);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function Kd(e,t){return t.toUpperCase()}function Zd(e){return"-"+e.toLowerCase()}const Qr={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"]},Jd={};function da(e,t){const n=Jd,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return _o(e,r,i)}function _o(e,t,n){if(eh(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 fs(e.children,t,n)}return Array.isArray(e)?fs(e,t,n):""}function fs(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=_o(e[i],t,n);return r.join("")}function eh(e){return!!(e&&typeof e=="object")}const ds=document.createElement("i");function ha(e){const t="&"+e+";";ds.innerHTML=t;const n=ds.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function Ke(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 Je(e,t){return e.length>0?(Ke(e,e.length,0,t),e):t}const hs={}.hasOwnProperty;function So(e){const t={};let n=-1;for(;++n<e.length;)th(t,e[n]);return t}function th(e,t){let n;for(n in t){const i=(hs.call(e,n)?e[n]:void 0)||(e[n]={}),a=t[n];let s;if(a)for(s in a){hs.call(i,s)||(i[s]=[]);const u=a[s];nh(i[s],Array.isArray(u)?u:u?[u]:[])}}}function nh(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);Ke(e,0,0,r)}function Co(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 ot(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Ge=Pt(/[A-Za-z]/),Ue=Pt(/[\dA-Za-z]/),rh=Pt(/[#-'*+\--9=?A-Z^-~]/);function cr(e){return e!==null&&(e<32||e===127)}const Mi=Pt(/\d/),ih=Pt(/[\dA-Fa-f]/),ah=Pt(/[!-/:-@[-`{-~]/);function te(e){return e!==null&&e<-2}function we(e){return e!==null&&(e<0||e===32)}function de(e){return e===-2||e===-1||e===32}const Nr=Pt(new RegExp("\\p{P}|\\p{S}","u")),Gt=Pt(/\s/);function Pt(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function pn(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 u=e.charCodeAt(n+1);a<56320&&u>56319&&u<57344?(s=String.fromCharCode(a,u),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 Te(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let a=0;return s;function s(o){return de(o)?(e.enter(n),u(o)):t(o)}function u(o){return de(o)&&a++<i?(e.consume(o),u):(e.exit(n),t(o))}}const sh={tokenize:uh};function uh(e){const t=e.attempt(this.parser.constructs.contentInitial,r,i);let n;return t;function r(u){if(u===null){e.consume(u);return}return e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),Te(e,t,"linePrefix")}function i(u){return e.enter("paragraph"),a(u)}function a(u){const o=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=o),n=o,s(u)}function s(u){if(u===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(u);return}return te(u)?(e.consume(u),e.exit("chunkText"),a):(e.consume(u),s)}}const oh={tokenize:lh},ms={tokenize:ch};function lh(e){const t=this,n=[];let r=0,i,a,s;return u;function u(v){if(r<n.length){const D=n[r];return t.containerState=D[1],e.attempt(D[0].continuation,o,c)(v)}return c(v)}function o(v){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&S();const D=t.events.length;let N=D,O;for(;N--;)if(t.events[N][0]==="exit"&&t.events[N][1].type==="chunkFlow"){O=t.events[N][1].end;break}y(r);let q=D;for(;q<t.events.length;)t.events[q][1].end=Object.assign({},O),q++;return Ke(t.events,N+1,0,t.events.slice(D)),t.events.length=q,c(v)}return u(v)}function c(v){if(r===n.length){if(!i)return h(v);if(i.currentConstruct&&i.currentConstruct.concrete)return b(v);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(ms,f,d)(v)}function f(v){return i&&S(),y(r),h(v)}function d(v){return t.parser.lazy[t.now().line]=r!==n.length,s=t.now().offset,b(v)}function h(v){return t.containerState={},e.attempt(ms,m,b)(v)}function m(v){return r++,n.push([t.currentConstruct,t.containerState]),h(v)}function b(v){if(v===null){i&&S(),y(0),e.consume(v);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{contentType:"flow",previous:a,_tokenizer:i}),A(v)}function A(v){if(v===null){C(e.exit("chunkFlow"),!0),y(0),e.consume(v);return}return te(v)?(e.consume(v),C(e.exit("chunkFlow")),r=0,t.interrupt=void 0,u):(e.consume(v),A)}function C(v,D){const N=t.sliceStream(v);if(D&&N.push(null),v.previous=a,a&&(a.next=v),a=v,i.defineSkip(v.start),i.write(N),t.parser.lazy[v.start.line]){let O=i.events.length;for(;O--;)if(i.events[O][1].start.offset<s&&(!i.events[O][1].end||i.events[O][1].end.offset>s))return;const q=t.events.length;let ue=q,G,w;for(;ue--;)if(t.events[ue][0]==="exit"&&t.events[ue][1].type==="chunkFlow"){if(G){w=t.events[ue][1].end;break}G=!0}for(y(r),O=q;O<t.events.length;)t.events[O][1].end=Object.assign({},w),O++;Ke(t.events,ue+1,0,t.events.slice(q)),t.events.length=O}}function y(v){let D=n.length;for(;D-- >v;){const N=n[D];t.containerState=N[1],N[0].exit.call(t,e)}n.length=v}function S(){i.write([null]),a=void 0,i=void 0,t.containerState._closeFlow=void 0}}function ch(e,t,n){return Te(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function fr(e){if(e===null||we(e)||Gt(e))return 1;if(Nr(e))return 2}function kr(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 Bi={name:"attention",tokenize:dh,resolveAll:fh};function fh(e,t){let n=-1,r,i,a,s,u,o,c,f;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;o=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 d=Object.assign({},e[r][1].end),h=Object.assign({},e[n][1].start);ps(d,-o),ps(h,o),s={type:o>1?"strongSequence":"emphasisSequence",start:d,end:Object.assign({},e[r][1].end)},u={type:o>1?"strongSequence":"emphasisSequence",start:Object.assign({},e[n][1].start),end:h},a={type:o>1?"strongText":"emphasisText",start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},i={type:o>1?"strong":"emphasis",start:Object.assign({},s.start),end:Object.assign({},u.end)},e[r][1].end=Object.assign({},s.start),e[n][1].start=Object.assign({},u.end),c=[],e[r][1].end.offset-e[r][1].start.offset&&(c=Je(c,[["enter",e[r][1],t],["exit",e[r][1],t]])),c=Je(c,[["enter",i,t],["enter",s,t],["exit",s,t],["enter",a,t]]),c=Je(c,kr(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),c=Je(c,[["exit",a,t],["enter",u,t],["exit",u,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(f=2,c=Je(c,[["enter",e[n][1],t],["exit",e[n][1],t]])):f=0,Ke(e,r-1,n-r+3,c),n=r+c.length-f-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function dh(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=fr(r);let a;return s;function s(o){return a=o,e.enter("attentionSequence"),u(o)}function u(o){if(o===a)return e.consume(o),u;const c=e.exit("attentionSequence"),f=fr(o),d=!f||f===2&&i||n.includes(o),h=!i||i===2&&f||n.includes(r);return c._open=!!(a===42?d:d&&(i||!h)),c._close=!!(a===42?h:h&&(f||!d)),t(o)}}function ps(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const hh={name:"autolink",tokenize:mh};function mh(e,t,n){let r=0;return i;function i(m){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(m),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),a}function a(m){return Ge(m)?(e.consume(m),s):c(m)}function s(m){return m===43||m===45||m===46||Ue(m)?(r=1,u(m)):c(m)}function u(m){return m===58?(e.consume(m),r=0,o):(m===43||m===45||m===46||Ue(m))&&r++<32?(e.consume(m),u):(r=0,c(m))}function o(m){return m===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(m),e.exit("autolinkMarker"),e.exit("autolink"),t):m===null||m===32||m===60||cr(m)?n(m):(e.consume(m),o)}function c(m){return m===64?(e.consume(m),f):rh(m)?(e.consume(m),c):n(m)}function f(m){return Ue(m)?d(m):n(m)}function d(m){return m===46?(e.consume(m),r=0,f):m===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(m),e.exit("autolinkMarker"),e.exit("autolink"),t):h(m)}function h(m){if((m===45||Ue(m))&&r++<63){const b=m===45?h:d;return e.consume(m),b}return n(m)}}const $n={tokenize:ph,partial:!0};function ph(e,t,n){return r;function r(a){return de(a)?Te(e,i,"linePrefix")(a):i(a)}function i(a){return a===null||te(a)?t(a):n(a)}}const wo={name:"blockQuote",tokenize:gh,continuation:{tokenize:bh},exit:Eh};function gh(e,t,n){const r=this;return i;function i(s){if(s===62){const u=r.containerState;return u.open||(e.enter("blockQuote",{_container:!0}),u.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 bh(e,t,n){const r=this;return i;function i(s){return de(s)?Te(e,a,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s):a(s)}function a(s){return e.attempt(wo,t,n)(s)}}function Eh(e){e.exit("blockQuote")}const vo={name:"characterEscape",tokenize:Th};function Th(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 ah(a)?(e.enter("characterEscapeValue"),e.consume(a),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(a)}}const Io={name:"characterReference",tokenize:xh};function xh(e,t,n){const r=this;let i=0,a,s;return u;function u(d){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(d),e.exit("characterReferenceMarker"),o}function o(d){return d===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(d),e.exit("characterReferenceMarkerNumeric"),c):(e.enter("characterReferenceValue"),a=31,s=Ue,f(d))}function c(d){return d===88||d===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(d),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),a=6,s=ih,f):(e.enter("characterReferenceValue"),a=7,s=Mi,f(d))}function f(d){if(d===59&&i){const h=e.exit("characterReferenceValue");return s===Ue&&!ha(r.sliceSerialize(h))?n(d):(e.enter("characterReferenceMarker"),e.consume(d),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return s(d)&&i++<a?(e.consume(d),f):n(d)}}const gs={tokenize:Ah,partial:!0},bs={name:"codeFenced",tokenize:yh,concrete:!0};function yh(e,t,n){const r=this,i={tokenize:N,partial:!0};let a=0,s=0,u;return o;function o(O){return c(O)}function c(O){const q=r.events[r.events.length-1];return a=q&&q[1].type==="linePrefix"?q[2].sliceSerialize(q[1],!0).length:0,u=O,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),f(O)}function f(O){return O===u?(s++,e.consume(O),f):s<3?n(O):(e.exit("codeFencedFenceSequence"),de(O)?Te(e,d,"whitespace")(O):d(O))}function d(O){return O===null||te(O)?(e.exit("codeFencedFence"),r.interrupt?t(O):e.check(gs,A,D)(O)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),h(O))}function h(O){return O===null||te(O)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),d(O)):de(O)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Te(e,m,"whitespace")(O)):O===96&&O===u?n(O):(e.consume(O),h)}function m(O){return O===null||te(O)?d(O):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),b(O))}function b(O){return O===null||te(O)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),d(O)):O===96&&O===u?n(O):(e.consume(O),b)}function A(O){return e.attempt(i,D,C)(O)}function C(O){return e.enter("lineEnding"),e.consume(O),e.exit("lineEnding"),y}function y(O){return a>0&&de(O)?Te(e,S,"linePrefix",a+1)(O):S(O)}function S(O){return O===null||te(O)?e.check(gs,A,D)(O):(e.enter("codeFlowValue"),v(O))}function v(O){return O===null||te(O)?(e.exit("codeFlowValue"),S(O)):(e.consume(O),v)}function D(O){return e.exit("codeFenced"),t(O)}function N(O,q,ue){let G=0;return w;function w(J){return O.enter("lineEnding"),O.consume(J),O.exit("lineEnding"),j}function j(J){return O.enter("codeFencedFence"),de(J)?Te(O,H,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(J):H(J)}function H(J){return J===u?(O.enter("codeFencedFenceSequence"),$(J)):ue(J)}function $(J){return J===u?(G++,O.consume(J),$):G>=s?(O.exit("codeFencedFenceSequence"),de(J)?Te(O,Y,"whitespace")(J):Y(J)):ue(J)}function Y(J){return J===null||te(J)?(O.exit("codeFencedFence"),q(J)):ue(J)}}}function Ah(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 Kr={name:"codeIndented",tokenize:Sh},_h={tokenize:Ch,partial:!0};function Sh(e,t,n){const r=this;return i;function i(c){return e.enter("codeIndented"),Te(e,a,"linePrefix",5)(c)}function a(c){const f=r.events[r.events.length-1];return f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?s(c):n(c)}function s(c){return c===null?o(c):te(c)?e.attempt(_h,s,o)(c):(e.enter("codeFlowValue"),u(c))}function u(c){return c===null||te(c)?(e.exit("codeFlowValue"),s(c)):(e.consume(c),u)}function o(c){return e.exit("codeIndented"),t(c)}}function Ch(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):Te(e,a,"linePrefix",5)(s)}function a(s){const u=r.events[r.events.length-1];return u&&u[1].type==="linePrefix"&&u[2].sliceSerialize(u[1],!0).length>=4?t(s):te(s)?i(s):n(s)}}const wh={name:"codeText",tokenize:Nh,resolve:vh,previous:Ih};function vh(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 Ih(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function Nh(e,t,n){let r=0,i,a;return s;function s(d){return e.enter("codeText"),e.enter("codeTextSequence"),u(d)}function u(d){return d===96?(e.consume(d),r++,u):(e.exit("codeTextSequence"),o(d))}function o(d){return d===null?n(d):d===32?(e.enter("space"),e.consume(d),e.exit("space"),o):d===96?(a=e.enter("codeTextSequence"),i=0,f(d)):te(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),o):(e.enter("codeTextData"),c(d))}function c(d){return d===null||d===32||d===96||te(d)?(e.exit("codeTextData"),o(d)):(e.consume(d),c)}function f(d){return d===96?(e.consume(d),i++,f):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(d)):(a.type="codeTextData",c(d))}}function No(e){const t={};let n=-1,r,i,a,s,u,o,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"&&(o=r[1]._tokenizer.events,a=0,a<o.length&&o[a][1].type==="lineEndingBlank"&&(a+=2),a<o.length&&o[a][1].type==="content"))for(;++a<o.length&&o[a][1].type!=="content";)o[a][1].type==="chunkText"&&(o[a][1]._isInFirstContentOfListItem=!0,a++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,kh(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),u=e.slice(i,n),u.unshift(r),Ke(e,i,n-i+1,u))}}return!c}function kh(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),u=s.events,o=[],c={};let f,d,h=-1,m=n,b=0,A=0;const C=[A];for(;m;){for(;e[++i][1]!==m;);a.push(i),m._tokenizer||(f=r.sliceStream(m),m.next||f.push(null),d&&s.defineSkip(m.start),m._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=!0),s.write(f),m._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=void 0)),d=m,m=m.next}for(m=n;++h<u.length;)u[h][0]==="exit"&&u[h-1][0]==="enter"&&u[h][1].type===u[h-1][1].type&&u[h][1].start.line!==u[h][1].end.line&&(A=h+1,C.push(A),m._tokenizer=void 0,m.previous=void 0,m=m.next);for(s.events=[],m?(m._tokenizer=void 0,m.previous=void 0):C.pop(),h=C.length;h--;){const y=u.slice(C[h],C[h+1]),S=a.pop();o.unshift([S,S+y.length-1]),Ke(e,S,2,y)}for(h=-1;++h<o.length;)c[b+o[h][0]]=b+o[h][1],b+=o[h][1]-o[h][0]-1;return c}const Oh={tokenize:Dh,resolve:Lh},Rh={tokenize:Ph,partial:!0};function Lh(e){return No(e),e}function Dh(e,t){let n;return r;function r(u){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),i(u)}function i(u){return u===null?a(u):te(u)?e.check(Rh,s,a)(u):(e.consume(u),i)}function a(u){return e.exit("chunkContent"),e.exit("content"),t(u)}function s(u){return e.consume(u),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function Ph(e,t,n){const r=this;return i;function i(s){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),Te(e,a,"linePrefix")}function a(s){if(s===null||te(s))return n(s);const u=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&u&&u[1].type==="linePrefix"&&u[2].sliceSerialize(u[1],!0).length>=4?t(s):e.interrupt(r.parser.constructs.flow,n,t)(s)}}function ko(e,t,n,r,i,a,s,u,o){const c=o||Number.POSITIVE_INFINITY;let f=0;return d;function d(y){return y===60?(e.enter(r),e.enter(i),e.enter(a),e.consume(y),e.exit(a),h):y===null||y===32||y===41||cr(y)?n(y):(e.enter(r),e.enter(s),e.enter(u),e.enter("chunkString",{contentType:"string"}),A(y))}function h(y){return y===62?(e.enter(a),e.consume(y),e.exit(a),e.exit(i),e.exit(r),t):(e.enter(u),e.enter("chunkString",{contentType:"string"}),m(y))}function m(y){return y===62?(e.exit("chunkString"),e.exit(u),h(y)):y===null||y===60||te(y)?n(y):(e.consume(y),y===92?b:m)}function b(y){return y===60||y===62||y===92?(e.consume(y),m):m(y)}function A(y){return!f&&(y===null||y===41||we(y))?(e.exit("chunkString"),e.exit(u),e.exit(s),e.exit(r),t(y)):f<c&&y===40?(e.consume(y),f++,A):y===41?(e.consume(y),f--,A):y===null||y===32||y===40||cr(y)?n(y):(e.consume(y),y===92?C:A)}function C(y){return y===40||y===41||y===92?(e.consume(y),A):A(y)}}function Oo(e,t,n,r,i,a){const s=this;let u=0,o;return c;function c(m){return e.enter(r),e.enter(i),e.consume(m),e.exit(i),e.enter(a),f}function f(m){return u>999||m===null||m===91||m===93&&!o||m===94&&!u&&"_hiddenFootnoteSupport"in s.parser.constructs?n(m):m===93?(e.exit(a),e.enter(i),e.consume(m),e.exit(i),e.exit(r),t):te(m)?(e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),f):(e.enter("chunkString",{contentType:"string"}),d(m))}function d(m){return m===null||m===91||m===93||te(m)||u++>999?(e.exit("chunkString"),f(m)):(e.consume(m),o||(o=!de(m)),m===92?h:d)}function h(m){return m===91||m===92||m===93?(e.consume(m),u++,d):d(m)}}function Ro(e,t,n,r,i,a){let s;return u;function u(h){return h===34||h===39||h===40?(e.enter(r),e.enter(i),e.consume(h),e.exit(i),s=h===40?41:h,o):n(h)}function o(h){return h===s?(e.enter(i),e.consume(h),e.exit(i),e.exit(r),t):(e.enter(a),c(h))}function c(h){return h===s?(e.exit(a),o(s)):h===null?n(h):te(h)?(e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),Te(e,c,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),f(h))}function f(h){return h===s||h===null||te(h)?(e.exit("chunkString"),c(h)):(e.consume(h),h===92?d:f)}function d(h){return h===s||h===92?(e.consume(h),f):f(h)}}function In(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)?Te(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}const Mh={name:"definition",tokenize:Fh},Bh={tokenize:Hh,partial:!0};function Fh(e,t,n){const r=this;let i;return a;function a(m){return e.enter("definition"),s(m)}function s(m){return Oo.call(r,e,u,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(m)}function u(m){return i=ot(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),m===58?(e.enter("definitionMarker"),e.consume(m),e.exit("definitionMarker"),o):n(m)}function o(m){return we(m)?In(e,c)(m):c(m)}function c(m){return ko(e,f,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(m)}function f(m){return e.attempt(Bh,d,d)(m)}function d(m){return de(m)?Te(e,h,"whitespace")(m):h(m)}function h(m){return m===null||te(m)?(e.exit("definition"),r.parser.defined.push(i),t(m)):n(m)}}function Hh(e,t,n){return r;function r(u){return we(u)?In(e,i)(u):n(u)}function i(u){return Ro(e,a,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(u)}function a(u){return de(u)?Te(e,s,"whitespace")(u):s(u)}function s(u){return u===null||te(u)?t(u):n(u)}}const Uh={name:"hardBreakEscape",tokenize:jh};function jh(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 zh={name:"headingAtx",tokenize:Yh,resolve:$h};function $h(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"},Ke(e,r,n-r+1,[["enter",i,t],["enter",a,t],["exit",a,t],["exit",i,t]])),e}function Yh(e,t,n){let r=0;return i;function i(f){return e.enter("atxHeading"),a(f)}function a(f){return e.enter("atxHeadingSequence"),s(f)}function s(f){return f===35&&r++<6?(e.consume(f),s):f===null||we(f)?(e.exit("atxHeadingSequence"),u(f)):n(f)}function u(f){return f===35?(e.enter("atxHeadingSequence"),o(f)):f===null||te(f)?(e.exit("atxHeading"),t(f)):de(f)?Te(e,u,"whitespace")(f):(e.enter("atxHeadingText"),c(f))}function o(f){return f===35?(e.consume(f),o):(e.exit("atxHeadingSequence"),u(f))}function c(f){return f===null||f===35||we(f)?(e.exit("atxHeadingText"),u(f)):(e.consume(f),c)}}const Gh=["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"],Es=["pre","script","style","textarea"],Vh={name:"htmlFlow",tokenize:Qh,resolveTo:Xh,concrete:!0},qh={tokenize:Zh,partial:!0},Wh={tokenize:Kh,partial:!0};function Xh(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 Qh(e,t,n){const r=this;let i,a,s,u,o;return c;function c(T){return f(T)}function f(T){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(T),d}function d(T){return T===33?(e.consume(T),h):T===47?(e.consume(T),a=!0,A):T===63?(e.consume(T),i=3,r.interrupt?t:p):Ge(T)?(e.consume(T),s=String.fromCharCode(T),C):n(T)}function h(T){return T===45?(e.consume(T),i=2,m):T===91?(e.consume(T),i=5,u=0,b):Ge(T)?(e.consume(T),i=4,r.interrupt?t:p):n(T)}function m(T){return T===45?(e.consume(T),r.interrupt?t:p):n(T)}function b(T){const Q="CDATA[";return T===Q.charCodeAt(u++)?(e.consume(T),u===Q.length?r.interrupt?t:H:b):n(T)}function A(T){return Ge(T)?(e.consume(T),s=String.fromCharCode(T),C):n(T)}function C(T){if(T===null||T===47||T===62||we(T)){const Q=T===47,ne=s.toLowerCase();return!Q&&!a&&Es.includes(ne)?(i=1,r.interrupt?t(T):H(T)):Gh.includes(s.toLowerCase())?(i=6,Q?(e.consume(T),y):r.interrupt?t(T):H(T)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(T):a?S(T):v(T))}return T===45||Ue(T)?(e.consume(T),s+=String.fromCharCode(T),C):n(T)}function y(T){return T===62?(e.consume(T),r.interrupt?t:H):n(T)}function S(T){return de(T)?(e.consume(T),S):w(T)}function v(T){return T===47?(e.consume(T),w):T===58||T===95||Ge(T)?(e.consume(T),D):de(T)?(e.consume(T),v):w(T)}function D(T){return T===45||T===46||T===58||T===95||Ue(T)?(e.consume(T),D):N(T)}function N(T){return T===61?(e.consume(T),O):de(T)?(e.consume(T),N):v(T)}function O(T){return T===null||T===60||T===61||T===62||T===96?n(T):T===34||T===39?(e.consume(T),o=T,q):de(T)?(e.consume(T),O):ue(T)}function q(T){return T===o?(e.consume(T),o=null,G):T===null||te(T)?n(T):(e.consume(T),q)}function ue(T){return T===null||T===34||T===39||T===47||T===60||T===61||T===62||T===96||we(T)?N(T):(e.consume(T),ue)}function G(T){return T===47||T===62||de(T)?v(T):n(T)}function w(T){return T===62?(e.consume(T),j):n(T)}function j(T){return T===null||te(T)?H(T):de(T)?(e.consume(T),j):n(T)}function H(T){return T===45&&i===2?(e.consume(T),he):T===60&&i===1?(e.consume(T),Se):T===62&&i===4?(e.consume(T),U):T===63&&i===3?(e.consume(T),p):T===93&&i===5?(e.consume(T),Re):te(T)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(qh,Z,$)(T)):T===null||te(T)?(e.exit("htmlFlowData"),$(T)):(e.consume(T),H)}function $(T){return e.check(Wh,Y,Z)(T)}function Y(T){return e.enter("lineEnding"),e.consume(T),e.exit("lineEnding"),J}function J(T){return T===null||te(T)?$(T):(e.enter("htmlFlowData"),H(T))}function he(T){return T===45?(e.consume(T),p):H(T)}function Se(T){return T===47?(e.consume(T),s="",Oe):H(T)}function Oe(T){if(T===62){const Q=s.toLowerCase();return Es.includes(Q)?(e.consume(T),U):H(T)}return Ge(T)&&s.length<8?(e.consume(T),s+=String.fromCharCode(T),Oe):H(T)}function Re(T){return T===93?(e.consume(T),p):H(T)}function p(T){return T===62?(e.consume(T),U):T===45&&i===2?(e.consume(T),p):H(T)}function U(T){return T===null||te(T)?(e.exit("htmlFlowData"),Z(T)):(e.consume(T),U)}function Z(T){return e.exit("htmlFlow"),t(T)}}function Kh(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 Zh(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt($n,t,n)}}const Jh={name:"htmlText",tokenize:e0};function e0(e,t,n){const r=this;let i,a,s;return u;function u(p){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(p),o}function o(p){return p===33?(e.consume(p),c):p===47?(e.consume(p),N):p===63?(e.consume(p),v):Ge(p)?(e.consume(p),ue):n(p)}function c(p){return p===45?(e.consume(p),f):p===91?(e.consume(p),a=0,b):Ge(p)?(e.consume(p),S):n(p)}function f(p){return p===45?(e.consume(p),m):n(p)}function d(p){return p===null?n(p):p===45?(e.consume(p),h):te(p)?(s=d,Se(p)):(e.consume(p),d)}function h(p){return p===45?(e.consume(p),m):d(p)}function m(p){return p===62?he(p):p===45?h(p):d(p)}function b(p){const U="CDATA[";return p===U.charCodeAt(a++)?(e.consume(p),a===U.length?A:b):n(p)}function A(p){return p===null?n(p):p===93?(e.consume(p),C):te(p)?(s=A,Se(p)):(e.consume(p),A)}function C(p){return p===93?(e.consume(p),y):A(p)}function y(p){return p===62?he(p):p===93?(e.consume(p),y):A(p)}function S(p){return p===null||p===62?he(p):te(p)?(s=S,Se(p)):(e.consume(p),S)}function v(p){return p===null?n(p):p===63?(e.consume(p),D):te(p)?(s=v,Se(p)):(e.consume(p),v)}function D(p){return p===62?he(p):v(p)}function N(p){return Ge(p)?(e.consume(p),O):n(p)}function O(p){return p===45||Ue(p)?(e.consume(p),O):q(p)}function q(p){return te(p)?(s=q,Se(p)):de(p)?(e.consume(p),q):he(p)}function ue(p){return p===45||Ue(p)?(e.consume(p),ue):p===47||p===62||we(p)?G(p):n(p)}function G(p){return p===47?(e.consume(p),he):p===58||p===95||Ge(p)?(e.consume(p),w):te(p)?(s=G,Se(p)):de(p)?(e.consume(p),G):he(p)}function w(p){return p===45||p===46||p===58||p===95||Ue(p)?(e.consume(p),w):j(p)}function j(p){return p===61?(e.consume(p),H):te(p)?(s=j,Se(p)):de(p)?(e.consume(p),j):G(p)}function H(p){return p===null||p===60||p===61||p===62||p===96?n(p):p===34||p===39?(e.consume(p),i=p,$):te(p)?(s=H,Se(p)):de(p)?(e.consume(p),H):(e.consume(p),Y)}function $(p){return p===i?(e.consume(p),i=void 0,J):p===null?n(p):te(p)?(s=$,Se(p)):(e.consume(p),$)}function Y(p){return p===null||p===34||p===39||p===60||p===61||p===96?n(p):p===47||p===62||we(p)?G(p):(e.consume(p),Y)}function J(p){return p===47||p===62||we(p)?G(p):n(p)}function he(p){return p===62?(e.consume(p),e.exit("htmlTextData"),e.exit("htmlText"),t):n(p)}function Se(p){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),Oe}function Oe(p){return de(p)?Te(e,Re,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(p):Re(p)}function Re(p){return e.enter("htmlTextData"),s(p)}}const ma={name:"labelEnd",tokenize:s0,resolveTo:a0,resolveAll:i0},t0={tokenize:u0},n0={tokenize:o0},r0={tokenize:l0};function i0(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 a0(e,t){let n=e.length,r=0,i,a,s,u;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 o={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)},f={type:"labelText",start:Object.assign({},e[a+r+2][1].end),end:Object.assign({},e[s-2][1].start)};return u=[["enter",o,t],["enter",c,t]],u=Je(u,e.slice(a+1,a+r+3)),u=Je(u,[["enter",f,t]]),u=Je(u,kr(t.parser.constructs.insideSpan.null,e.slice(a+r+4,s-3),t)),u=Je(u,[["exit",f,t],e[s-2],e[s-1],["exit",c,t]]),u=Je(u,e.slice(s+1)),u=Je(u,[["exit",o,t]]),Ke(e,a,e.length,u),e}function s0(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 u;function u(h){return a?a._inactive?d(h):(s=r.parser.defined.includes(ot(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(h),e.exit("labelMarker"),e.exit("labelEnd"),o):n(h)}function o(h){return h===40?e.attempt(t0,f,s?f:d)(h):h===91?e.attempt(n0,f,s?c:d)(h):s?f(h):d(h)}function c(h){return e.attempt(r0,f,d)(h)}function f(h){return t(h)}function d(h){return a._balanced=!0,n(h)}}function u0(e,t,n){return r;function r(d){return e.enter("resource"),e.enter("resourceMarker"),e.consume(d),e.exit("resourceMarker"),i}function i(d){return we(d)?In(e,a)(d):a(d)}function a(d){return d===41?f(d):ko(e,s,u,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(d)}function s(d){return we(d)?In(e,o)(d):f(d)}function u(d){return n(d)}function o(d){return d===34||d===39||d===40?Ro(e,c,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(d):f(d)}function c(d){return we(d)?In(e,f)(d):f(d)}function f(d){return d===41?(e.enter("resourceMarker"),e.consume(d),e.exit("resourceMarker"),e.exit("resource"),t):n(d)}}function o0(e,t,n){const r=this;return i;function i(u){return Oo.call(r,e,a,s,"reference","referenceMarker","referenceString")(u)}function a(u){return r.parser.defined.includes(ot(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(u):n(u)}function s(u){return n(u)}}function l0(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 c0={name:"labelStartImage",tokenize:f0,resolveAll:ma.resolveAll};function f0(e,t,n){const r=this;return i;function i(u){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(u),e.exit("labelImageMarker"),a}function a(u){return u===91?(e.enter("labelMarker"),e.consume(u),e.exit("labelMarker"),e.exit("labelImage"),s):n(u)}function s(u){return u===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(u):t(u)}}const d0={name:"labelStartLink",tokenize:h0,resolveAll:ma.resolveAll};function h0(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 Zr={name:"lineEnding",tokenize:m0};function m0(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),Te(e,t,"linePrefix")}}const ur={name:"thematicBreak",tokenize:p0};function p0(e,t,n){let r=0,i;return a;function a(c){return e.enter("thematicBreak"),s(c)}function s(c){return i=c,u(c)}function u(c){return c===i?(e.enter("thematicBreakSequence"),o(c)):r>=3&&(c===null||te(c))?(e.exit("thematicBreak"),t(c)):n(c)}function o(c){return c===i?(e.consume(c),r++,o):(e.exit("thematicBreakSequence"),de(c)?Te(e,u,"whitespace")(c):u(c))}}const We={name:"list",tokenize:E0,continuation:{tokenize:T0},exit:y0},g0={tokenize:A0,partial:!0},b0={tokenize:x0,partial:!0};function E0(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 u;function u(m){const b=r.containerState.type||(m===42||m===43||m===45?"listUnordered":"listOrdered");if(b==="listUnordered"?!r.containerState.marker||m===r.containerState.marker:Mi(m)){if(r.containerState.type||(r.containerState.type=b,e.enter(b,{_container:!0})),b==="listUnordered")return e.enter("listItemPrefix"),m===42||m===45?e.check(ur,n,c)(m):c(m);if(!r.interrupt||m===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),o(m)}return n(m)}function o(m){return Mi(m)&&++s<10?(e.consume(m),o):(!r.interrupt||s<2)&&(r.containerState.marker?m===r.containerState.marker:m===41||m===46)?(e.exit("listItemValue"),c(m)):n(m)}function c(m){return e.enter("listItemMarker"),e.consume(m),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||m,e.check($n,r.interrupt?n:f,e.attempt(g0,h,d))}function f(m){return r.containerState.initialBlankLine=!0,a++,h(m)}function d(m){return de(m)?(e.enter("listItemPrefixWhitespace"),e.consume(m),e.exit("listItemPrefixWhitespace"),h):n(m)}function h(m){return r.containerState.size=a+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(m)}}function T0(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check($n,i,a);function i(u){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Te(e,t,"listItemIndent",r.containerState.size+1)(u)}function a(u){return r.containerState.furtherBlankLines||!de(u)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,s(u)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(b0,t,s)(u))}function s(u){return r.containerState._closeFlow=!0,r.interrupt=void 0,Te(e,e.attempt(We,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(u)}}function x0(e,t,n){const r=this;return Te(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 y0(e){e.exit(this.containerState.type)}function A0(e,t,n){const r=this;return Te(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 Ts={name:"setextUnderline",tokenize:S0,resolveTo:_0};function _0(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 S0(e,t,n){const r=this;let i;return a;function a(c){let f=r.events.length,d;for(;f--;)if(r.events[f][1].type!=="lineEnding"&&r.events[f][1].type!=="linePrefix"&&r.events[f][1].type!=="content"){d=r.events[f][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||d)?(e.enter("setextHeadingLine"),i=c,s(c)):n(c)}function s(c){return e.enter("setextHeadingLineSequence"),u(c)}function u(c){return c===i?(e.consume(c),u):(e.exit("setextHeadingLineSequence"),de(c)?Te(e,o,"lineSuffix")(c):o(c))}function o(c){return c===null||te(c)?(e.exit("setextHeadingLine"),t(c)):n(c)}}const C0={tokenize:w0};function w0(e){const t=this,n=e.attempt($n,r,e.attempt(this.parser.constructs.flowInitial,i,Te(e,e.attempt(this.parser.constructs.flow,i,e.attempt(Oh,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 v0={resolveAll:Do()},I0=Lo("string"),N0=Lo("text");function Lo(e){return{tokenize:t,resolveAll:Do(e==="text"?k0:void 0)};function t(n){const r=this,i=this.parser.constructs[e],a=n.attempt(i,s,u);return s;function s(f){return c(f)?a(f):u(f)}function u(f){if(f===null){n.consume(f);return}return n.enter("data"),n.consume(f),o}function o(f){return c(f)?(n.exit("data"),a(f)):(n.consume(f),o)}function c(f){if(f===null)return!0;const d=i[f];let h=-1;if(d)for(;++h<d.length;){const m=d[h];if(!m.previous||m.previous.call(r,r.previous))return!0}return!1}}}function Do(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 k0(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,u=0,o;for(;a--;){const c=i[a];if(typeof c=="string"){for(s=c.length;c.charCodeAt(s-1)===32;)u++,s--;if(s)break;s=-1}else if(c===-2)o=!0,u++;else if(c!==-1){a++;break}}if(u){const c={type:n===e.length||o||u<2?"lineSuffix":"hardBreakTrailing",start:{line:r.end.line,column:r.end.column-u,offset:r.end.offset-u,_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 O0(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=[],u=[];const o={consume:S,enter:v,exit:D,attempt:q(N),check:q(O),interrupt:q(O,{interrupt:!0})},c={previous:null,code:null,containerState:{},events:[],parser:e,sliceStream:m,sliceSerialize:h,now:b,defineSkip:A,write:d};let f=t.tokenize.call(c,o);return t.resolveAll&&a.push(t),c;function d(j){return s=Je(s,j),C(),s[s.length-1]!==null?[]:(ue(t,0),c.events=kr(a,c.events,c),c.events)}function h(j,H){return L0(m(j),H)}function m(j){return R0(s,j)}function b(){const{line:j,column:H,offset:$,_index:Y,_bufferIndex:J}=r;return{line:j,column:H,offset:$,_index:Y,_bufferIndex:J}}function A(j){i[j.line]=j.column,w()}function C(){let j;for(;r._index<s.length;){const H=s[r._index];if(typeof H=="string")for(j=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===j&&r._bufferIndex<H.length;)y(H.charCodeAt(r._bufferIndex));else y(H)}}function y(j){f=f(j)}function S(j){te(j)?(r.line++,r.column=1,r.offset+=j===-3?2:1,w()):j!==-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=j}function v(j,H){const $=H||{};return $.type=j,$.start=b(),c.events.push(["enter",$,c]),u.push($),$}function D(j){const H=u.pop();return H.end=b(),c.events.push(["exit",H,c]),H}function N(j,H){ue(j,H.from)}function O(j,H){H.restore()}function q(j,H){return $;function $(Y,J,he){let Se,Oe,Re,p;return Array.isArray(Y)?Z(Y):"tokenize"in Y?Z([Y]):U(Y);function U(W){return ee;function ee(re){const ie=re!==null&&W[re],ae=re!==null&&W.null,Ne=[...Array.isArray(ie)?ie:ie?[ie]:[],...Array.isArray(ae)?ae:ae?[ae]:[]];return Z(Ne)(re)}}function Z(W){return Se=W,Oe=0,W.length===0?he:T(W[Oe])}function T(W){return ee;function ee(re){return p=G(),Re=W,W.partial||(c.currentConstruct=W),W.name&&c.parser.constructs.disable.null.includes(W.name)?ne():W.tokenize.call(H?Object.assign(Object.create(c),H):c,o,Q,ne)(re)}}function Q(W){return j(Re,p),J}function ne(W){return p.restore(),++Oe<Se.length?T(Se[Oe]):he}}}function ue(j,H){j.resolveAll&&!a.includes(j)&&a.push(j),j.resolve&&Ke(c.events,H,c.events.length-H,j.resolve(c.events.slice(H),c)),j.resolveTo&&(c.events=j.resolveTo(c.events,c))}function G(){const j=b(),H=c.previous,$=c.currentConstruct,Y=c.events.length,J=Array.from(u);return{restore:he,from:Y};function he(){r=j,c.previous=H,c.currentConstruct=$,c.events.length=Y,u=J,w()}}function w(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function R0(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 u=s[0];typeof u=="string"?s[0]=u.slice(r):s.shift()}a>0&&s.push(e[i].slice(0,a))}return s}function L0(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 hd(e,t){var n=Vf(t),r=X(X({},io),e),i=r.locale,a=r.defaultLocale,s=r.onError;return i?!Intl.NumberFormat.supportedLocalesOf(i).length&&s?s(new Ka('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 Ka('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 zf('"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"),dd(r),X(X({},r),{formatters:n,formatNumber:ld.bind(null,r,n.getNumberFormat),formatNumberToParts:cd.bind(null,r,n.getNumberFormat),formatRelativeTime:ud.bind(null,r,n.getRelativeTimeFormat),formatDate:qf.bind(null,r,n.getDateTimeFormat),formatDateToParts:Qf.bind(null,r,n.getDateTimeFormat),formatTime:Wf.bind(null,r,n.getDateTimeFormat),formatDateTimeRange:Xf.bind(null,r,n.getDateTimeFormat),formatTimeToParts:Kf.bind(null,r,n.getDateTimeFormat),formatPlural:id.bind(null,r,n.getPluralRules),formatMessage:Ri.bind(null,r,n),$t:Ri.bind(null,r,n),formatList:nd.bind(null,r,n.getListFormat),formatListToParts:uo.bind(null,r,n.getListFormat),formatDisplayName:Jf.bind(null,r,n.getDisplayNames)})}function lo(e){Hu(e,"[React Intl] Could not find required `intl` object. <IntlProvider> needs to exist in the component ancestry.")}var co=X(X({},io),{textComponent:Me.Fragment});function md(e){return function(t){return e(Me.Children.toArray(t))}}function pd(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 la=typeof window<"u"&&!window.__REACT_INTL_BYPASS_GLOBAL_CONTEXT__?window.__REACT_INTL_CONTEXT__||(window.__REACT_INTL_CONTEXT__=Me.createContext(null)):Me.createContext(null);la.Consumer;var gd=la.Provider,bd=gd,Ed=la;function pn(){var e=Me.useContext(Ed);return lo(e),e}var Di;(function(e){e.formatDate="FormattedDate",e.formatTime="FormattedTime",e.formatNumber="FormattedNumber",e.formatList="FormattedList",e.formatDisplayName="FormattedDisplayName"})(Di||(Di={}));var Pi;(function(e){e.formatDate="FormattedDateParts",e.formatTime="FormattedTimeParts",e.formatNumber="FormattedNumberParts",e.formatList="FormattedListParts"})(Pi||(Pi={}));function fo(e){var t=function(n){var r=pn(),i=n.value,a=n.children,s=Ir(n,["value","children"]),u=typeof i=="string"?new Date(i||0):i,l=e==="formatDate"?r.formatDateToParts(u,s):r.formatTimeToParts(u,s);return a(l)};return t.displayName=Pi[e],t}function zn(e){var t=function(n){var r=pn(),i=n.value,a=n.children,s=Ir(n,["value","children"]),u=r[e](i,s);if(typeof a=="function")return a(u);var l=r.textComponent||Me.Fragment;return Me.createElement(l,null,u)};return t.displayName=Di[e],t}function ho(e){return e&&Object.keys(e).reduce(function(t,n){var r=e[n];return t[n]=no(r)?md(r):r,t},{})}var ts=function(e,t,n,r){for(var i=[],a=4;a<arguments.length;a++)i[a-4]=arguments[a];var s=ho(r),u=Ri.apply(void 0,ht([e,t,n,s],i,!1));return Array.isArray(u)?Me.Children.toArray(u):u},ns=function(e,t){var n=e.defaultRichTextElements,r=Ir(e,["defaultRichTextElements"]),i=ho(n),a=hd(X(X(X({},co),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:ts.bind(null,s,a.formatters),$t:ts.bind(null,s,a.formatters)})};function Xr(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 Td=(function(e){rt(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.cache=ao(),n.state={cache:n.cache,intl:ns(Xr(n.props),n.cache),prevConfig:Xr(n.props)},n}return t.getDerivedStateFromProps=function(n,r){var i=r.prevConfig,a=r.cache,s=Xr(n);return pd(i,s)?null:{intl:ns(s,a),prevConfig:s}},t.prototype.render=function(){return lo(this.state.intl),Me.createElement(bd,{value:this.state.intl},this.props.children)},t.displayName="IntlProvider",t.defaultProps=co,t})(Me.PureComponent);zn("formatDate");zn("formatTime");zn("formatNumber");zn("formatList");zn("formatDisplayName");fo("formatDate");fo("formatTime");const ca=()=>{const e=pn(),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"}),u=e.formatMessage({defaultMessage:"See",id:"chatbot.infobanner.title"}),l=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:u,infoBannerExplainationTranslation:l}};function rs(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 mo(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const yd=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,xd=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Ad={};function is(e,t){return(Ad.jsx?xd:yd).test(e)}const _d=/[ \t\n\f\r]/g;function Sd(e){return typeof e=="object"?e.type==="text"?as(e.value):!1:as(e)}function as(e){return e.replace(_d,"")===""}class $n{constructor(t,n,r){this.property=t,this.normal=n,r&&(this.space=r)}}$n.prototype.property={};$n.prototype.normal={};$n.prototype.space=null;function po(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 $n(n,r,t)}function Bn(e){return e.toLowerCase()}class at{constructor(t,n){this.property=t,this.attribute=n}}at.prototype.space=null;at.prototype.boolean=!1;at.prototype.booleanish=!1;at.prototype.overloadedBoolean=!1;at.prototype.number=!1;at.prototype.commaSeparated=!1;at.prototype.spaceSeparated=!1;at.prototype.commaOrSpaceSeparated=!1;at.prototype.mustUseProperty=!1;at.prototype.defined=!1;let Cd=0;const le=Qt(),Pe=Qt(),go=Qt(),F=Qt(),Ce=Qt(),on=Qt(),Ke=Qt();function Qt(){return 2**++Cd}const Mi=Object.freeze(Object.defineProperty({__proto__:null,boolean:le,booleanish:Pe,commaOrSpaceSeparated:Ke,commaSeparated:on,number:F,overloadedBoolean:go,spaceSeparated:Ce},Symbol.toStringTag,{value:"Module"})),Qr=Object.keys(Mi);class fa extends at{constructor(t,n,r,i){let a=-1;if(super(t,n),ss(this,"space",i),typeof r=="number")for(;++a<Qr.length;){const s=Qr[a];ss(this,Qr[a],(r&Mi[s])===Mi[s])}}}fa.prototype.defined=!0;function ss(e,t,n){n&&(e[t]=n)}const wd={}.hasOwnProperty;function gn(e){const t={},n={};let r;for(r in e.properties)if(wd.call(e.properties,r)){const i=e.properties[r],a=new fa(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[Bn(r)]=r,n[Bn(a.attribute)]=r}return new $n(t,n,e.space)}const bo=gn({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}}),Eo=gn({space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()},properties:{xmlLang:null,xmlBase:null,xmlSpace:null}});function To(e,t){return t in e?e[t]:t}function yo(e,t){return To(e,t.toLowerCase())}const xo=gn({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:yo,properties:{xmlns:null,xmlnsXLink:null}}),Ao=gn({transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()},properties:{ariaActiveDescendant:null,ariaAtomic:Pe,ariaAutoComplete:null,ariaBusy:Pe,ariaChecked:Pe,ariaColCount:F,ariaColIndex:F,ariaColSpan:F,ariaControls:Ce,ariaCurrent:null,ariaDescribedBy:Ce,ariaDetails:null,ariaDisabled:Pe,ariaDropEffect:Ce,ariaErrorMessage:null,ariaExpanded:Pe,ariaFlowTo:Ce,ariaGrabbed:Pe,ariaHasPopup:null,ariaHidden:Pe,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Ce,ariaLevel:F,ariaLive:null,ariaModal:Pe,ariaMultiLine:Pe,ariaMultiSelectable:Pe,ariaOrientation:null,ariaOwns:Ce,ariaPlaceholder:null,ariaPosInSet:F,ariaPressed:Pe,ariaReadOnly:Pe,ariaRelevant:null,ariaRequired:Pe,ariaRoleDescription:Ce,ariaRowCount:F,ariaRowIndex:F,ariaRowSpan:F,ariaSelected:Pe,ariaSetSize:F,ariaSort:null,ariaValueMax:F,ariaValueMin:F,ariaValueNow:F,ariaValueText:null,role:null}}),Id=gn({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:yo,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:on,acceptCharset:Ce,accessKey:Ce,action:null,allow:null,allowFullScreen:le,allowPaymentRequest:le,allowUserMedia:le,alt:null,as:null,async:le,autoCapitalize:null,autoComplete:Ce,autoFocus:le,autoPlay:le,blocking:Ce,capture:null,charSet:null,checked:le,cite:null,className:Ce,cols:F,colSpan:null,content:null,contentEditable:Pe,controls:le,controlsList:Ce,coords:F|on,crossOrigin:null,data:null,dateTime:null,decoding:null,default:le,defer:le,dir:null,dirName:null,disabled:le,download:go,draggable:Pe,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:le,formTarget:null,headers:Ce,height:F,hidden:le,high:F,href:null,hrefLang:null,htmlFor:Ce,httpEquiv:Ce,id:null,imageSizes:null,imageSrcSet:null,inert:le,inputMode:null,integrity:null,is:null,isMap:le,itemId:null,itemProp:Ce,itemRef:Ce,itemScope:le,itemType:Ce,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:le,low:F,manifest:null,max:null,maxLength:F,media:null,method:null,min:null,minLength:F,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:F,pattern:null,ping:Ce,placeholder:null,playsInline:le,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:le,referrerPolicy:null,rel:Ce,required:le,reversed:le,rows:F,rowSpan:F,sandbox:Ce,scope:null,scoped:le,seamless:le,selected:le,shadowRootDelegatesFocus:le,shadowRootMode:null,shape:null,size:F,sizes:null,slot:null,span:F,spellCheck:Pe,src:null,srcDoc:null,srcLang:null,srcSet:null,start:F,step:null,style:null,tabIndex:F,target:null,title:null,translate:null,type:null,typeMustMatch:le,useMap:null,value:Pe,width:F,wrap:null,align:null,aLink:null,archive:Ce,axis:null,background:null,bgColor:null,border:F,borderColor:null,bottomMargin:F,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:F,leftMargin:F,link:null,longDesc:null,lowSrc:null,marginHeight:F,marginWidth:F,noResize:le,noHref:le,noShade:le,noWrap:le,object:null,profile:null,prompt:null,rev:null,rightMargin:F,rules:null,scheme:null,scrolling:Pe,standby:null,summary:null,text:null,topMargin:F,valueType:null,version:null,vAlign:null,vLink:null,vSpace:F,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:le,disableRemotePlayback:le,prefix:null,property:null,results:F,security:null,unselectable:null}}),vd=gn({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:To,properties:{about:Ke,accentHeight:F,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:F,amplitude:F,arabicForm:null,ascent:F,attributeName:null,attributeType:null,azimuth:F,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:F,by:null,calcMode:null,capHeight:F,className:Ce,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:F,diffuseConstant:F,direction:null,display:null,dur:null,divisor:F,dominantBaseline:null,download:le,dx:null,dy:null,edgeMode:null,editable:null,elevation:F,enableBackground:null,end:null,event:null,exponent:F,externalResourcesRequired:null,fill:null,fillOpacity:F,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:on,g2:on,glyphName:on,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:F,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:F,horizOriginX:F,horizOriginY:F,id:null,ideographic:F,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:F,k:F,k1:F,k2:F,k3:F,k4:F,kernelMatrix:Ke,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:F,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:F,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:F,overlineThickness:F,paintOrder:null,panose1:null,path:null,pathLength:F,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Ce,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:F,pointsAtY:F,pointsAtZ:F,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:F,specularExponent:F,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:F,strikethroughThickness:F,string:null,stroke:null,strokeDashArray:Ke,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:F,strokeOpacity:F,strokeWidth:null,style:null,surfaceScale:F,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Ke,tabIndex:F,tableValues:null,target:null,targetX:F,targetY:F,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:F,underlineThickness:F,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:F,values:null,vAlphabetic:F,vMathematical:F,vectorEffect:null,vHanging:F,vIdeographic:F,version:null,vertAdvY:F,vertOriginX:F,vertOriginY:F,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:F,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null}}),Nd=/^data[-\w.:]+$/i,us=/-[a-z]/g,kd=/[A-Z]/g;function Nr(e,t){const n=Bn(t);let r=t,i=at;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&Nd.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(us,Ld);r="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!us.test(a)){let s=a.replace(kd,Od);s.charAt(0)!=="-"&&(s="-"+s),t="data"+s}}i=fa}return new i(r,t)}function Od(e){return"-"+e.toLowerCase()}function Ld(e){return e.charAt(1).toUpperCase()}const Rd={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"},Yn=po([Eo,bo,xo,Ao,Id],"html"),Ot=po([Eo,bo,xo,Ao,vd],"svg");function os(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function _o(e){return e.join(" ").trim()}var en={},Kr,ls;function Dd(){if(ls)return Kr;ls=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,a=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,s=/^[;\s]*/,u=/^\s+|\s+$/g,l=`
48
+ `,c="/",f="*",d="",m="comment",h="declaration";Kr=function(A,_){if(typeof A!="string")throw new TypeError("First argument must be a string");if(!A)return[];_=_||{};var x=1,I=1;function C(H){var U=H.match(t);U&&(x+=U.length);var Q=H.lastIndexOf(l);I=~Q?H.length-Q:I+H.length}function D(){var H={line:x,column:I};return function(U){return U.position=new k(H),oe(),U}}function k(H){this.start=H,this.end={line:x,column:I},this.source=_.source}k.prototype.content=A;function O(H){var U=new Error(_.source+":"+x+":"+I+": "+H);if(U.reason=H,U.filename=_.source,U.line=x,U.column=I,U.source=A,!_.silent)throw U}function G(H){var U=H.exec(A);if(U){var Q=U[0];return C(Q),A=A.slice(Q.length),U}}function oe(){G(n)}function ae(H){var U;for(H=H||[];U=w();)U!==!1&&H.push(U);return H}function w(){var H=D();if(!(c!=A.charAt(0)||f!=A.charAt(1))){for(var U=2;d!=A.charAt(U)&&(f!=A.charAt(U)||c!=A.charAt(U+1));)++U;if(U+=2,d===A.charAt(U-1))return O("End of comment missing");var Q=A.slice(2,U-2);return I+=2,C(Q),A=A.slice(U),I+=2,H({type:m,comment:Q})}}function j(){var H=D(),U=G(r);if(U){if(w(),!G(i))return O("property missing ':'");var Q=G(a),me=H({type:h,property:b(U[0].replace(e,d)),value:Q?b(Q[0].replace(e,d)):d});return G(s),me}}function $(){var H=[];ae(H);for(var U;U=j();)U!==!1&&(H.push(U),ae(H));return H}return oe(),$()};function b(A){return A?A.replace(u,d):d}return Kr}var cs;function Pd(){if(cs)return en;cs=1;var e=en&&en.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(en,"__esModule",{value:!0});var t=e(Dd());function n(r,i){var a=null;if(!r||typeof r!="string")return a;var s=(0,t.default)(r),u=typeof i=="function";return s.forEach(function(l){if(l.type==="declaration"){var c=l.property,f=l.value;u?i(c,f,l):f&&(a=a||{},a[c]=f)}}),a}return en.default=n,en}var Md=Pd();const fs=ra(Md),Bd=fs.default||fs,kr=So("end"),bt=So("start");function So(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 Fd(e){const t=bt(e),n=kr(e);if(t&&n)return{start:t,end:n}}function Nn(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?ds(e.position):"start"in e||"end"in e?ds(e):"line"in e||"column"in e?Bi(e):""}function Bi(e){return hs(e&&e.line)+":"+hs(e&&e.column)}function ds(e){return Bi(e&&e.start)+"-"+Bi(e&&e.end)}function hs(e){return e&&typeof e=="number"?e:1}class ze 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 l=r.indexOf(":");l===-1?a.ruleId=r:(a.source=r.slice(0,l),a.ruleId=r.slice(l+1))}if(!a.place&&a.ancestors&&a.ancestors){const l=a.ancestors[a.ancestors.length-1];l&&(a.place=l.position)}const u=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=u?u.column:void 0,this.fatal=void 0,this.file,this.message=i,this.line=u?u.line:void 0,this.name=Nn(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}}ze.prototype.file="";ze.prototype.name="";ze.prototype.reason="";ze.prototype.message="";ze.prototype.stack="";ze.prototype.column=void 0;ze.prototype.line=void 0;ze.prototype.ancestors=void 0;ze.prototype.cause=void 0;ze.prototype.fatal=void 0;ze.prototype.place=void 0;ze.prototype.ruleId=void 0;ze.prototype.source=void 0;const da={}.hasOwnProperty,Hd=new Map,Ud=/[A-Z]/g,jd=/-([a-z])/g,zd=new Set(["table","tbody","thead","tfoot","tr"]),$d=new Set(["td","th"]),Co="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function Yd(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=Zd(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=Kd(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"?Ot:Yn,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=wo(i,e,void 0);return a&&typeof a!="string"?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}function wo(e,t,n){if(t.type==="element")return Gd(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return Vd(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return Wd(e,t,n);if(t.type==="mdxjsEsm")return qd(e,t);if(t.type==="root")return Xd(e,t,n);if(t.type==="text")return Qd(e,t)}function Gd(e,t,n){const r=e.schema;let i=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=Ot,e.schema=i),e.ancestors.push(t);const a=vo(e,t.tagName,!1),s=Jd(e,t);let u=ma(e,t);return zd.has(t.tagName)&&(u=u.filter(function(l){return typeof l=="string"?!Sd(l):!0})),Io(e,s,a,t),ha(s,u),e.ancestors.pop(),e.schema=r,e.create(t,a,s,n)}function Vd(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)}Fn(e,t.position)}function qd(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Fn(e,t.position)}function Wd(e,t,n){const r=e.schema;let i=r;t.name==="svg"&&r.space==="html"&&(i=Ot,e.schema=i),e.ancestors.push(t);const a=t.name===null?e.Fragment:vo(e,t.name,!0),s=eh(e,t),u=ma(e,t);return Io(e,s,a,t),ha(s,u),e.ancestors.pop(),e.schema=r,e.create(t,a,s,n)}function Xd(e,t,n){const r={};return ha(r,ma(e,t)),e.create(t,e.Fragment,r,n)}function Qd(e,t){return t.value}function Io(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function ha(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function Kd(e,t,n){return r;function r(i,a,s,u){const c=Array.isArray(s.children)?n:t;return u?c(a,s,u):c(a,s)}}function Zd(e,t){return n;function n(r,i,a,s){const u=Array.isArray(a.children),l=bt(r);return t(i,a,s,u,{columnNumber:l?l.column-1:void 0,fileName:e,lineNumber:l?l.line:void 0},void 0)}}function Jd(e,t){const n={};let r,i;for(i in t.properties)if(i!=="children"&&da.call(t.properties,i)){const a=th(e,i,t.properties[i]);if(a){const[s,u]=a;e.tableCellAlignToStyle&&s==="align"&&typeof u=="string"&&$d.has(t.tagName)?r=u:n[s]=u}}if(r){const a=n.style||(n.style={});a[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function eh(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 u=s.properties[0];u.type,Object.assign(n,e.evaluater.evaluateExpression(u.argument))}else Fn(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 u=r.value.data.estree.body[0];u.type,a=e.evaluater.evaluateExpression(u.expression)}else Fn(e,t.position);else a=r.value===null?!0:r.value;n[i]=a}return n}function ma(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:Hd;for(;++r<t.children.length;){const a=t.children[r];let s;if(e.passKeys){const l=a.type==="element"?a.tagName:a.type==="mdxJsxFlowElement"||a.type==="mdxJsxTextElement"?a.name:void 0;if(l){const c=i.get(l)||0;s=l+"-"+c,i.set(l,c+1)}}const u=wo(e,a,s);u!==void 0&&n.push(u)}return n}function th(e,t,n){const r=Nr(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?mo(n):_o(n)),r.property==="style"){let i=typeof n=="object"?n:nh(e,String(n));return e.stylePropertyNameCase==="css"&&(i=rh(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&r.space?Rd[r.property]||r.property:r.attribute,n]}}function nh(e,t){const n={};try{Bd(t,r)}catch(i){if(!e.ignoreInvalidStyle){const a=i,s=new ze("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=Co+"#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(jd,ah)),n[s]=a}}function vo(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 u=is(i[a])?{type:"Identifier",name:i[a]}:{type:"Literal",value:i[a]};s=s?{type:"MemberExpression",object:s,property:u,computed:!!(a&&u.type==="Literal"),optional:!1}:u}r=s}else r=is(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const i=r.value;return da.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);Fn(e)}function Fn(e,t){const n=new ze("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=Co+"#cannot-handle-mdx-estrees-without-createevaluater",n}function rh(e){const t={};let n;for(n in e)da.call(e,n)&&(t[ih(n)]=e[n]);return t}function ih(e){let t=e.replace(Ud,sh);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function ah(e,t){return t.toUpperCase()}function sh(e){return"-"+e.toLowerCase()}const Zr={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"]},uh={};function pa(e,t){const n=uh,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return No(e,r,i)}function No(e,t,n){if(oh(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 ms(e.children,t,n)}return Array.isArray(e)?ms(e,t,n):""}function ms(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=No(e[i],t,n);return r.join("")}function oh(e){return!!(e&&typeof e=="object")}const ps=document.createElement("i");function ga(e){const t="&"+e+";";ps.innerHTML=t;const n=ps.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function Ze(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 Je(e,t){return e.length>0?(Ze(e,e.length,0,t),e):t}const gs={}.hasOwnProperty;function ko(e){const t={};let n=-1;for(;++n<e.length;)lh(t,e[n]);return t}function lh(e,t){let n;for(n in t){const i=(gs.call(e,n)?e[n]:void 0)||(e[n]={}),a=t[n];let s;if(a)for(s in a){gs.call(i,s)||(i[s]=[]);const u=a[s];ch(i[s],Array.isArray(u)?u:u?[u]:[])}}}function ch(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);Ze(e,0,0,r)}function Oo(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 ut(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Ve=Lt(/[A-Za-z]/),je=Lt(/[\dA-Za-z]/),fh=Lt(/[#-'*+\--9=?A-Z^-~]/);function dr(e){return e!==null&&(e<32||e===127)}const Fi=Lt(/\d/),dh=Lt(/[\dA-Fa-f]/),hh=Lt(/[!-/:-@[-`{-~]/);function te(e){return e!==null&&e<-2}function Se(e){return e!==null&&(e<0||e===32)}function he(e){return e===-2||e===-1||e===32}const Or=Lt(new RegExp("\\p{P}|\\p{S}","u")),Vt=Lt(/\s/);function Lt(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function bn(e){const t=[];let n=-1,r=0,i=0;for(;++n<e.length;){const a=e.charCodeAt(n);let s="";if(a===37&&je(e.charCodeAt(n+1))&&je(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 u=e.charCodeAt(n+1);a<56320&&u>56319&&u<57344?(s=String.fromCharCode(a,u),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 Te(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let a=0;return s;function s(l){return he(l)?(e.enter(n),u(l)):t(l)}function u(l){return he(l)&&a++<i?(e.consume(l),u):(e.exit(n),t(l))}}const mh={tokenize:ph};function ph(e){const t=e.attempt(this.parser.constructs.contentInitial,r,i);let n;return t;function r(u){if(u===null){e.consume(u);return}return e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),Te(e,t,"linePrefix")}function i(u){return e.enter("paragraph"),a(u)}function a(u){const l=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=l),n=l,s(u)}function s(u){if(u===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(u);return}return te(u)?(e.consume(u),e.exit("chunkText"),a):(e.consume(u),s)}}const gh={tokenize:bh},bs={tokenize:Eh};function bh(e){const t=this,n=[];let r=0,i,a,s;return u;function u(C){if(r<n.length){const D=n[r];return t.containerState=D[1],e.attempt(D[0].continuation,l,c)(C)}return c(C)}function l(C){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&I();const D=t.events.length;let k=D,O;for(;k--;)if(t.events[k][0]==="exit"&&t.events[k][1].type==="chunkFlow"){O=t.events[k][1].end;break}x(r);let G=D;for(;G<t.events.length;)t.events[G][1].end=Object.assign({},O),G++;return Ze(t.events,k+1,0,t.events.slice(D)),t.events.length=G,c(C)}return u(C)}function c(C){if(r===n.length){if(!i)return m(C);if(i.currentConstruct&&i.currentConstruct.concrete)return b(C);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(bs,f,d)(C)}function f(C){return i&&I(),x(r),m(C)}function d(C){return t.parser.lazy[t.now().line]=r!==n.length,s=t.now().offset,b(C)}function m(C){return t.containerState={},e.attempt(bs,h,b)(C)}function h(C){return r++,n.push([t.currentConstruct,t.containerState]),m(C)}function b(C){if(C===null){i&&I(),x(0),e.consume(C);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{contentType:"flow",previous:a,_tokenizer:i}),A(C)}function A(C){if(C===null){_(e.exit("chunkFlow"),!0),x(0),e.consume(C);return}return te(C)?(e.consume(C),_(e.exit("chunkFlow")),r=0,t.interrupt=void 0,u):(e.consume(C),A)}function _(C,D){const k=t.sliceStream(C);if(D&&k.push(null),C.previous=a,a&&(a.next=C),a=C,i.defineSkip(C.start),i.write(k),t.parser.lazy[C.start.line]){let O=i.events.length;for(;O--;)if(i.events[O][1].start.offset<s&&(!i.events[O][1].end||i.events[O][1].end.offset>s))return;const G=t.events.length;let oe=G,ae,w;for(;oe--;)if(t.events[oe][0]==="exit"&&t.events[oe][1].type==="chunkFlow"){if(ae){w=t.events[oe][1].end;break}ae=!0}for(x(r),O=G;O<t.events.length;)t.events[O][1].end=Object.assign({},w),O++;Ze(t.events,oe+1,0,t.events.slice(G)),t.events.length=O}}function x(C){let D=n.length;for(;D-- >C;){const k=n[D];t.containerState=k[1],k[0].exit.call(t,e)}n.length=C}function I(){i.write([null]),a=void 0,i=void 0,t.containerState._closeFlow=void 0}}function Eh(e,t,n){return Te(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function hr(e){if(e===null||Se(e)||Vt(e))return 1;if(Or(e))return 2}function Lr(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 Hi={name:"attention",tokenize:yh,resolveAll:Th};function Th(e,t){let n=-1,r,i,a,s,u,l,c,f;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;l=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 d=Object.assign({},e[r][1].end),m=Object.assign({},e[n][1].start);Es(d,-l),Es(m,l),s={type:l>1?"strongSequence":"emphasisSequence",start:d,end:Object.assign({},e[r][1].end)},u={type:l>1?"strongSequence":"emphasisSequence",start:Object.assign({},e[n][1].start),end:m},a={type:l>1?"strongText":"emphasisText",start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},i={type:l>1?"strong":"emphasis",start:Object.assign({},s.start),end:Object.assign({},u.end)},e[r][1].end=Object.assign({},s.start),e[n][1].start=Object.assign({},u.end),c=[],e[r][1].end.offset-e[r][1].start.offset&&(c=Je(c,[["enter",e[r][1],t],["exit",e[r][1],t]])),c=Je(c,[["enter",i,t],["enter",s,t],["exit",s,t],["enter",a,t]]),c=Je(c,Lr(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),c=Je(c,[["exit",a,t],["enter",u,t],["exit",u,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(f=2,c=Je(c,[["enter",e[n][1],t],["exit",e[n][1],t]])):f=0,Ze(e,r-1,n-r+3,c),n=r+c.length-f-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function yh(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=hr(r);let a;return s;function s(l){return a=l,e.enter("attentionSequence"),u(l)}function u(l){if(l===a)return e.consume(l),u;const c=e.exit("attentionSequence"),f=hr(l),d=!f||f===2&&i||n.includes(l),m=!i||i===2&&f||n.includes(r);return c._open=!!(a===42?d:d&&(i||!m)),c._close=!!(a===42?m:m&&(f||!d)),t(l)}}function Es(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const xh={name:"autolink",tokenize:Ah};function Ah(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||je(h)?(r=1,u(h)):c(h)}function u(h){return h===58?(e.consume(h),r=0,l):(h===43||h===45||h===46||je(h))&&r++<32?(e.consume(h),u):(r=0,c(h))}function l(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||dr(h)?n(h):(e.consume(h),l)}function c(h){return h===64?(e.consume(h),f):fh(h)?(e.consume(h),c):n(h)}function f(h){return je(h)?d(h):n(h)}function d(h){return h===46?(e.consume(h),r=0,f):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||je(h))&&r++<63){const b=h===45?m:d;return e.consume(h),b}return n(h)}}const Gn={tokenize:_h,partial:!0};function _h(e,t,n){return r;function r(a){return he(a)?Te(e,i,"linePrefix")(a):i(a)}function i(a){return a===null||te(a)?t(a):n(a)}}const Lo={name:"blockQuote",tokenize:Sh,continuation:{tokenize:Ch},exit:wh};function Sh(e,t,n){const r=this;return i;function i(s){if(s===62){const u=r.containerState;return u.open||(e.enter("blockQuote",{_container:!0}),u.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(s),e.exit("blockQuoteMarker"),a}return n(s)}function a(s){return he(s)?(e.enter("blockQuotePrefixWhitespace"),e.consume(s),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(s))}}function Ch(e,t,n){const r=this;return i;function i(s){return he(s)?Te(e,a,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s):a(s)}function a(s){return e.attempt(Lo,t,n)(s)}}function wh(e){e.exit("blockQuote")}const Ro={name:"characterEscape",tokenize:Ih};function Ih(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 hh(a)?(e.enter("characterEscapeValue"),e.consume(a),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(a)}}const Do={name:"characterReference",tokenize:vh};function vh(e,t,n){const r=this;let i=0,a,s;return u;function u(d){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(d),e.exit("characterReferenceMarker"),l}function l(d){return d===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(d),e.exit("characterReferenceMarkerNumeric"),c):(e.enter("characterReferenceValue"),a=31,s=je,f(d))}function c(d){return d===88||d===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(d),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),a=6,s=dh,f):(e.enter("characterReferenceValue"),a=7,s=Fi,f(d))}function f(d){if(d===59&&i){const m=e.exit("characterReferenceValue");return s===je&&!ga(r.sliceSerialize(m))?n(d):(e.enter("characterReferenceMarker"),e.consume(d),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return s(d)&&i++<a?(e.consume(d),f):n(d)}}const Ts={tokenize:kh,partial:!0},ys={name:"codeFenced",tokenize:Nh,concrete:!0};function Nh(e,t,n){const r=this,i={tokenize:k,partial:!0};let a=0,s=0,u;return l;function l(O){return c(O)}function c(O){const G=r.events[r.events.length-1];return a=G&&G[1].type==="linePrefix"?G[2].sliceSerialize(G[1],!0).length:0,u=O,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),f(O)}function f(O){return O===u?(s++,e.consume(O),f):s<3?n(O):(e.exit("codeFencedFenceSequence"),he(O)?Te(e,d,"whitespace")(O):d(O))}function d(O){return O===null||te(O)?(e.exit("codeFencedFence"),r.interrupt?t(O):e.check(Ts,A,D)(O)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),m(O))}function m(O){return O===null||te(O)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),d(O)):he(O)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Te(e,h,"whitespace")(O)):O===96&&O===u?n(O):(e.consume(O),m)}function h(O){return O===null||te(O)?d(O):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),b(O))}function b(O){return O===null||te(O)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),d(O)):O===96&&O===u?n(O):(e.consume(O),b)}function A(O){return e.attempt(i,D,_)(O)}function _(O){return e.enter("lineEnding"),e.consume(O),e.exit("lineEnding"),x}function x(O){return a>0&&he(O)?Te(e,I,"linePrefix",a+1)(O):I(O)}function I(O){return O===null||te(O)?e.check(Ts,A,D)(O):(e.enter("codeFlowValue"),C(O))}function C(O){return O===null||te(O)?(e.exit("codeFlowValue"),I(O)):(e.consume(O),C)}function D(O){return e.exit("codeFenced"),t(O)}function k(O,G,oe){let ae=0;return w;function w(Q){return O.enter("lineEnding"),O.consume(Q),O.exit("lineEnding"),j}function j(Q){return O.enter("codeFencedFence"),he(Q)?Te(O,$,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(Q):$(Q)}function $(Q){return Q===u?(O.enter("codeFencedFenceSequence"),H(Q)):oe(Q)}function H(Q){return Q===u?(ae++,O.consume(Q),H):ae>=s?(O.exit("codeFencedFenceSequence"),he(Q)?Te(O,U,"whitespace")(Q):U(Q)):oe(Q)}function U(Q){return Q===null||te(Q)?(O.exit("codeFencedFence"),G(Q)):oe(Q)}}}function kh(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 Jr={name:"codeIndented",tokenize:Lh},Oh={tokenize:Rh,partial:!0};function Lh(e,t,n){const r=this;return i;function i(c){return e.enter("codeIndented"),Te(e,a,"linePrefix",5)(c)}function a(c){const f=r.events[r.events.length-1];return f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?s(c):n(c)}function s(c){return c===null?l(c):te(c)?e.attempt(Oh,s,l)(c):(e.enter("codeFlowValue"),u(c))}function u(c){return c===null||te(c)?(e.exit("codeFlowValue"),s(c)):(e.consume(c),u)}function l(c){return e.exit("codeIndented"),t(c)}}function Rh(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):Te(e,a,"linePrefix",5)(s)}function a(s){const u=r.events[r.events.length-1];return u&&u[1].type==="linePrefix"&&u[2].sliceSerialize(u[1],!0).length>=4?t(s):te(s)?i(s):n(s)}}const Dh={name:"codeText",tokenize:Bh,resolve:Ph,previous:Mh};function Ph(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 Mh(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function Bh(e,t,n){let r=0,i,a;return s;function s(d){return e.enter("codeText"),e.enter("codeTextSequence"),u(d)}function u(d){return d===96?(e.consume(d),r++,u):(e.exit("codeTextSequence"),l(d))}function l(d){return d===null?n(d):d===32?(e.enter("space"),e.consume(d),e.exit("space"),l):d===96?(a=e.enter("codeTextSequence"),i=0,f(d)):te(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),l):(e.enter("codeTextData"),c(d))}function c(d){return d===null||d===32||d===96||te(d)?(e.exit("codeTextData"),l(d)):(e.consume(d),c)}function f(d){return d===96?(e.consume(d),i++,f):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(d)):(a.type="codeTextData",c(d))}}function Po(e){const t={};let n=-1,r,i,a,s,u,l,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"&&(l=r[1]._tokenizer.events,a=0,a<l.length&&l[a][1].type==="lineEndingBlank"&&(a+=2),a<l.length&&l[a][1].type==="content"))for(;++a<l.length&&l[a][1].type!=="content";)l[a][1].type==="chunkText"&&(l[a][1]._isInFirstContentOfListItem=!0,a++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,Fh(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),u=e.slice(i,n),u.unshift(r),Ze(e,i,n-i+1,u))}}return!c}function Fh(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),u=s.events,l=[],c={};let f,d,m=-1,h=n,b=0,A=0;const _=[A];for(;h;){for(;e[++i][1]!==h;);a.push(i),h._tokenizer||(f=r.sliceStream(h),h.next||f.push(null),d&&s.defineSkip(h.start),h._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=!0),s.write(f),h._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=void 0)),d=h,h=h.next}for(h=n;++m<u.length;)u[m][0]==="exit"&&u[m-1][0]==="enter"&&u[m][1].type===u[m-1][1].type&&u[m][1].start.line!==u[m][1].end.line&&(A=m+1,_.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):_.pop(),m=_.length;m--;){const x=u.slice(_[m],_[m+1]),I=a.pop();l.unshift([I,I+x.length-1]),Ze(e,I,2,x)}for(m=-1;++m<l.length;)c[b+l[m][0]]=b+l[m][1],b+=l[m][1]-l[m][0]-1;return c}const Hh={tokenize:zh,resolve:jh},Uh={tokenize:$h,partial:!0};function jh(e){return Po(e),e}function zh(e,t){let n;return r;function r(u){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),i(u)}function i(u){return u===null?a(u):te(u)?e.check(Uh,s,a)(u):(e.consume(u),i)}function a(u){return e.exit("chunkContent"),e.exit("content"),t(u)}function s(u){return e.consume(u),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function $h(e,t,n){const r=this;return i;function i(s){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),Te(e,a,"linePrefix")}function a(s){if(s===null||te(s))return n(s);const u=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&u&&u[1].type==="linePrefix"&&u[2].sliceSerialize(u[1],!0).length>=4?t(s):e.interrupt(r.parser.constructs.flow,n,t)(s)}}function Mo(e,t,n,r,i,a,s,u,l){const c=l||Number.POSITIVE_INFINITY;let f=0;return d;function d(x){return x===60?(e.enter(r),e.enter(i),e.enter(a),e.consume(x),e.exit(a),m):x===null||x===32||x===41||dr(x)?n(x):(e.enter(r),e.enter(s),e.enter(u),e.enter("chunkString",{contentType:"string"}),A(x))}function m(x){return x===62?(e.enter(a),e.consume(x),e.exit(a),e.exit(i),e.exit(r),t):(e.enter(u),e.enter("chunkString",{contentType:"string"}),h(x))}function h(x){return x===62?(e.exit("chunkString"),e.exit(u),m(x)):x===null||x===60||te(x)?n(x):(e.consume(x),x===92?b:h)}function b(x){return x===60||x===62||x===92?(e.consume(x),h):h(x)}function A(x){return!f&&(x===null||x===41||Se(x))?(e.exit("chunkString"),e.exit(u),e.exit(s),e.exit(r),t(x)):f<c&&x===40?(e.consume(x),f++,A):x===41?(e.consume(x),f--,A):x===null||x===32||x===40||dr(x)?n(x):(e.consume(x),x===92?_:A)}function _(x){return x===40||x===41||x===92?(e.consume(x),A):A(x)}}function Bo(e,t,n,r,i,a){const s=this;let u=0,l;return c;function c(h){return e.enter(r),e.enter(i),e.consume(h),e.exit(i),e.enter(a),f}function f(h){return u>999||h===null||h===91||h===93&&!l||h===94&&!u&&"_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"),f):(e.enter("chunkString",{contentType:"string"}),d(h))}function d(h){return h===null||h===91||h===93||te(h)||u++>999?(e.exit("chunkString"),f(h)):(e.consume(h),l||(l=!he(h)),h===92?m:d)}function m(h){return h===91||h===92||h===93?(e.consume(h),u++,d):d(h)}}function Fo(e,t,n,r,i,a){let s;return u;function u(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,l):n(m)}function l(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),l(s)):m===null?n(m):te(m)?(e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),Te(e,c,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),f(m))}function f(m){return m===s||m===null||te(m)?(e.exit("chunkString"),c(m)):(e.consume(m),m===92?d:f)}function d(m){return m===s||m===92?(e.consume(m),f):f(m)}}function kn(e,t){let n;return r;function r(i){return te(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):he(i)?Te(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}const Yh={name:"definition",tokenize:Vh},Gh={tokenize:qh,partial:!0};function Vh(e,t,n){const r=this;let i;return a;function a(h){return e.enter("definition"),s(h)}function s(h){return Bo.call(r,e,u,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(h)}function u(h){return i=ut(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),h===58?(e.enter("definitionMarker"),e.consume(h),e.exit("definitionMarker"),l):n(h)}function l(h){return Se(h)?kn(e,c)(h):c(h)}function c(h){return Mo(e,f,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(h)}function f(h){return e.attempt(Gh,d,d)(h)}function d(h){return he(h)?Te(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 qh(e,t,n){return r;function r(u){return Se(u)?kn(e,i)(u):n(u)}function i(u){return Fo(e,a,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(u)}function a(u){return he(u)?Te(e,s,"whitespace")(u):s(u)}function s(u){return u===null||te(u)?t(u):n(u)}}const Wh={name:"hardBreakEscape",tokenize:Xh};function Xh(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 Qh={name:"headingAtx",tokenize:Zh,resolve:Kh};function Kh(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"},Ze(e,r,n-r+1,[["enter",i,t],["enter",a,t],["exit",a,t],["exit",i,t]])),e}function Zh(e,t,n){let r=0;return i;function i(f){return e.enter("atxHeading"),a(f)}function a(f){return e.enter("atxHeadingSequence"),s(f)}function s(f){return f===35&&r++<6?(e.consume(f),s):f===null||Se(f)?(e.exit("atxHeadingSequence"),u(f)):n(f)}function u(f){return f===35?(e.enter("atxHeadingSequence"),l(f)):f===null||te(f)?(e.exit("atxHeading"),t(f)):he(f)?Te(e,u,"whitespace")(f):(e.enter("atxHeadingText"),c(f))}function l(f){return f===35?(e.consume(f),l):(e.exit("atxHeadingSequence"),u(f))}function c(f){return f===null||f===35||Se(f)?(e.exit("atxHeadingText"),u(f)):(e.consume(f),c)}}const Jh=["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"],xs=["pre","script","style","textarea"],e0={name:"htmlFlow",tokenize:i0,resolveTo:r0,concrete:!0},t0={tokenize:s0,partial:!0},n0={tokenize:a0,partial:!0};function r0(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 i0(e,t,n){const r=this;let i,a,s,u,l;return c;function c(T){return f(T)}function f(T){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(T),d}function d(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:p):Ve(T)?(e.consume(T),s=String.fromCharCode(T),_):n(T)}function m(T){return T===45?(e.consume(T),i=2,h):T===91?(e.consume(T),i=5,u=0,b):Ve(T)?(e.consume(T),i=4,r.interrupt?t:p):n(T)}function h(T){return T===45?(e.consume(T),r.interrupt?t:p):n(T)}function b(T){const Z="CDATA[";return T===Z.charCodeAt(u++)?(e.consume(T),u===Z.length?r.interrupt?t:$:b):n(T)}function A(T){return Ve(T)?(e.consume(T),s=String.fromCharCode(T),_):n(T)}function _(T){if(T===null||T===47||T===62||Se(T)){const Z=T===47,ie=s.toLowerCase();return!Z&&!a&&xs.includes(ie)?(i=1,r.interrupt?t(T):$(T)):Jh.includes(s.toLowerCase())?(i=6,Z?(e.consume(T),x):r.interrupt?t(T):$(T)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(T):a?I(T):C(T))}return T===45||je(T)?(e.consume(T),s+=String.fromCharCode(T),_):n(T)}function x(T){return T===62?(e.consume(T),r.interrupt?t:$):n(T)}function I(T){return he(T)?(e.consume(T),I):w(T)}function C(T){return T===47?(e.consume(T),w):T===58||T===95||Ve(T)?(e.consume(T),D):he(T)?(e.consume(T),C):w(T)}function D(T){return T===45||T===46||T===58||T===95||je(T)?(e.consume(T),D):k(T)}function k(T){return T===61?(e.consume(T),O):he(T)?(e.consume(T),k):C(T)}function O(T){return T===null||T===60||T===61||T===62||T===96?n(T):T===34||T===39?(e.consume(T),l=T,G):he(T)?(e.consume(T),O):oe(T)}function G(T){return T===l?(e.consume(T),l=null,ae):T===null||te(T)?n(T):(e.consume(T),G)}function oe(T){return T===null||T===34||T===39||T===47||T===60||T===61||T===62||T===96||Se(T)?k(T):(e.consume(T),oe)}function ae(T){return T===47||T===62||he(T)?C(T):n(T)}function w(T){return T===62?(e.consume(T),j):n(T)}function j(T){return T===null||te(T)?$(T):he(T)?(e.consume(T),j):n(T)}function $(T){return T===45&&i===2?(e.consume(T),me):T===60&&i===1?(e.consume(T),xe):T===62&&i===4?(e.consume(T),z):T===63&&i===3?(e.consume(T),p):T===93&&i===5?(e.consume(T),De):te(T)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(t0,K,H)(T)):T===null||te(T)?(e.exit("htmlFlowData"),H(T)):(e.consume(T),$)}function H(T){return e.check(n0,U,K)(T)}function U(T){return e.enter("lineEnding"),e.consume(T),e.exit("lineEnding"),Q}function Q(T){return T===null||te(T)?H(T):(e.enter("htmlFlowData"),$(T))}function me(T){return T===45?(e.consume(T),p):$(T)}function xe(T){return T===47?(e.consume(T),s="",Re):$(T)}function Re(T){if(T===62){const Z=s.toLowerCase();return xs.includes(Z)?(e.consume(T),z):$(T)}return Ve(T)&&s.length<8?(e.consume(T),s+=String.fromCharCode(T),Re):$(T)}function De(T){return T===93?(e.consume(T),p):$(T)}function p(T){return T===62?(e.consume(T),z):T===45&&i===2?(e.consume(T),p):$(T)}function z(T){return T===null||te(T)?(e.exit("htmlFlowData"),K(T)):(e.consume(T),z)}function K(T){return e.exit("htmlFlow"),t(T)}}function a0(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 s0(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(Gn,t,n)}}const u0={name:"htmlText",tokenize:o0};function o0(e,t,n){const r=this;let i,a,s;return u;function u(p){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(p),l}function l(p){return p===33?(e.consume(p),c):p===47?(e.consume(p),k):p===63?(e.consume(p),C):Ve(p)?(e.consume(p),oe):n(p)}function c(p){return p===45?(e.consume(p),f):p===91?(e.consume(p),a=0,b):Ve(p)?(e.consume(p),I):n(p)}function f(p){return p===45?(e.consume(p),h):n(p)}function d(p){return p===null?n(p):p===45?(e.consume(p),m):te(p)?(s=d,xe(p)):(e.consume(p),d)}function m(p){return p===45?(e.consume(p),h):d(p)}function h(p){return p===62?me(p):p===45?m(p):d(p)}function b(p){const z="CDATA[";return p===z.charCodeAt(a++)?(e.consume(p),a===z.length?A:b):n(p)}function A(p){return p===null?n(p):p===93?(e.consume(p),_):te(p)?(s=A,xe(p)):(e.consume(p),A)}function _(p){return p===93?(e.consume(p),x):A(p)}function x(p){return p===62?me(p):p===93?(e.consume(p),x):A(p)}function I(p){return p===null||p===62?me(p):te(p)?(s=I,xe(p)):(e.consume(p),I)}function C(p){return p===null?n(p):p===63?(e.consume(p),D):te(p)?(s=C,xe(p)):(e.consume(p),C)}function D(p){return p===62?me(p):C(p)}function k(p){return Ve(p)?(e.consume(p),O):n(p)}function O(p){return p===45||je(p)?(e.consume(p),O):G(p)}function G(p){return te(p)?(s=G,xe(p)):he(p)?(e.consume(p),G):me(p)}function oe(p){return p===45||je(p)?(e.consume(p),oe):p===47||p===62||Se(p)?ae(p):n(p)}function ae(p){return p===47?(e.consume(p),me):p===58||p===95||Ve(p)?(e.consume(p),w):te(p)?(s=ae,xe(p)):he(p)?(e.consume(p),ae):me(p)}function w(p){return p===45||p===46||p===58||p===95||je(p)?(e.consume(p),w):j(p)}function j(p){return p===61?(e.consume(p),$):te(p)?(s=j,xe(p)):he(p)?(e.consume(p),j):ae(p)}function $(p){return p===null||p===60||p===61||p===62||p===96?n(p):p===34||p===39?(e.consume(p),i=p,H):te(p)?(s=$,xe(p)):he(p)?(e.consume(p),$):(e.consume(p),U)}function H(p){return p===i?(e.consume(p),i=void 0,Q):p===null?n(p):te(p)?(s=H,xe(p)):(e.consume(p),H)}function U(p){return p===null||p===34||p===39||p===60||p===61||p===96?n(p):p===47||p===62||Se(p)?ae(p):(e.consume(p),U)}function Q(p){return p===47||p===62||Se(p)?ae(p):n(p)}function me(p){return p===62?(e.consume(p),e.exit("htmlTextData"),e.exit("htmlText"),t):n(p)}function xe(p){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),Re}function Re(p){return he(p)?Te(e,De,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(p):De(p)}function De(p){return e.enter("htmlTextData"),s(p)}}const ba={name:"labelEnd",tokenize:m0,resolveTo:h0,resolveAll:d0},l0={tokenize:p0},c0={tokenize:g0},f0={tokenize:b0};function d0(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 h0(e,t){let n=e.length,r=0,i,a,s,u;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 l={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)},f={type:"labelText",start:Object.assign({},e[a+r+2][1].end),end:Object.assign({},e[s-2][1].start)};return u=[["enter",l,t],["enter",c,t]],u=Je(u,e.slice(a+1,a+r+3)),u=Je(u,[["enter",f,t]]),u=Je(u,Lr(t.parser.constructs.insideSpan.null,e.slice(a+r+4,s-3),t)),u=Je(u,[["exit",f,t],e[s-2],e[s-1],["exit",c,t]]),u=Je(u,e.slice(s+1)),u=Je(u,[["exit",l,t]]),Ze(e,a,e.length,u),e}function m0(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 u;function u(m){return a?a._inactive?d(m):(s=r.parser.defined.includes(ut(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(m),e.exit("labelMarker"),e.exit("labelEnd"),l):n(m)}function l(m){return m===40?e.attempt(l0,f,s?f:d)(m):m===91?e.attempt(c0,f,s?c:d)(m):s?f(m):d(m)}function c(m){return e.attempt(f0,f,d)(m)}function f(m){return t(m)}function d(m){return a._balanced=!0,n(m)}}function p0(e,t,n){return r;function r(d){return e.enter("resource"),e.enter("resourceMarker"),e.consume(d),e.exit("resourceMarker"),i}function i(d){return Se(d)?kn(e,a)(d):a(d)}function a(d){return d===41?f(d):Mo(e,s,u,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(d)}function s(d){return Se(d)?kn(e,l)(d):f(d)}function u(d){return n(d)}function l(d){return d===34||d===39||d===40?Fo(e,c,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(d):f(d)}function c(d){return Se(d)?kn(e,f)(d):f(d)}function f(d){return d===41?(e.enter("resourceMarker"),e.consume(d),e.exit("resourceMarker"),e.exit("resource"),t):n(d)}}function g0(e,t,n){const r=this;return i;function i(u){return Bo.call(r,e,a,s,"reference","referenceMarker","referenceString")(u)}function a(u){return r.parser.defined.includes(ut(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(u):n(u)}function s(u){return n(u)}}function b0(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 E0={name:"labelStartImage",tokenize:T0,resolveAll:ba.resolveAll};function T0(e,t,n){const r=this;return i;function i(u){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(u),e.exit("labelImageMarker"),a}function a(u){return u===91?(e.enter("labelMarker"),e.consume(u),e.exit("labelMarker"),e.exit("labelImage"),s):n(u)}function s(u){return u===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(u):t(u)}}const y0={name:"labelStartLink",tokenize:x0,resolveAll:ba.resolveAll};function x0(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 ei={name:"lineEnding",tokenize:A0};function A0(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),Te(e,t,"linePrefix")}}const lr={name:"thematicBreak",tokenize:_0};function _0(e,t,n){let r=0,i;return a;function a(c){return e.enter("thematicBreak"),s(c)}function s(c){return i=c,u(c)}function u(c){return c===i?(e.enter("thematicBreakSequence"),l(c)):r>=3&&(c===null||te(c))?(e.exit("thematicBreak"),t(c)):n(c)}function l(c){return c===i?(e.consume(c),r++,l):(e.exit("thematicBreakSequence"),he(c)?Te(e,u,"whitespace")(c):u(c))}}const Qe={name:"list",tokenize:w0,continuation:{tokenize:I0},exit:N0},S0={tokenize:k0,partial:!0},C0={tokenize:v0,partial:!0};function w0(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 u;function u(h){const b=r.containerState.type||(h===42||h===43||h===45?"listUnordered":"listOrdered");if(b==="listUnordered"?!r.containerState.marker||h===r.containerState.marker:Fi(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(lr,n,c)(h):c(h);if(!r.interrupt||h===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),l(h)}return n(h)}function l(h){return Fi(h)&&++s<10?(e.consume(h),l):(!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(Gn,r.interrupt?n:f,e.attempt(S0,m,d))}function f(h){return r.containerState.initialBlankLine=!0,a++,m(h)}function d(h){return he(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 I0(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(Gn,i,a);function i(u){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Te(e,t,"listItemIndent",r.containerState.size+1)(u)}function a(u){return r.containerState.furtherBlankLines||!he(u)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,s(u)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(C0,t,s)(u))}function s(u){return r.containerState._closeFlow=!0,r.interrupt=void 0,Te(e,e.attempt(Qe,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(u)}}function v0(e,t,n){const r=this;return Te(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 N0(e){e.exit(this.containerState.type)}function k0(e,t,n){const r=this;return Te(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!he(a)&&s&&s[1].type==="listItemPrefixWhitespace"?t(a):n(a)}}const As={name:"setextUnderline",tokenize:L0,resolveTo:O0};function O0(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 L0(e,t,n){const r=this;let i;return a;function a(c){let f=r.events.length,d;for(;f--;)if(r.events[f][1].type!=="lineEnding"&&r.events[f][1].type!=="linePrefix"&&r.events[f][1].type!=="content"){d=r.events[f][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||d)?(e.enter("setextHeadingLine"),i=c,s(c)):n(c)}function s(c){return e.enter("setextHeadingLineSequence"),u(c)}function u(c){return c===i?(e.consume(c),u):(e.exit("setextHeadingLineSequence"),he(c)?Te(e,l,"lineSuffix")(c):l(c))}function l(c){return c===null||te(c)?(e.exit("setextHeadingLine"),t(c)):n(c)}}const R0={tokenize:D0};function D0(e){const t=this,n=e.attempt(Gn,r,e.attempt(this.parser.constructs.flowInitial,i,Te(e,e.attempt(this.parser.constructs.flow,i,e.attempt(Hh,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 P0={resolveAll:Uo()},M0=Ho("string"),B0=Ho("text");function Ho(e){return{tokenize:t,resolveAll:Uo(e==="text"?F0:void 0)};function t(n){const r=this,i=this.parser.constructs[e],a=n.attempt(i,s,u);return s;function s(f){return c(f)?a(f):u(f)}function u(f){if(f===null){n.consume(f);return}return n.enter("data"),n.consume(f),l}function l(f){return c(f)?(n.exit("data"),a(f)):(n.consume(f),l)}function c(f){if(f===null)return!0;const d=i[f];let m=-1;if(d)for(;++m<d.length;){const h=d[m];if(!h.previous||h.previous.call(r,r.previous))return!0}return!1}}}function Uo(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 F0(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,u=0,l;for(;a--;){const c=i[a];if(typeof c=="string"){for(s=c.length;c.charCodeAt(s-1)===32;)u++,s--;if(s)break;s=-1}else if(c===-2)l=!0,u++;else if(c!==-1){a++;break}}if(u){const c={type:n===e.length||l||u<2?"lineSuffix":"hardBreakTrailing",start:{line:r.end.line,column:r.end.column-u,offset:r.end.offset-u,_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 H0(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=[],u=[];const l={consume:I,enter:C,exit:D,attempt:G(k),check:G(O),interrupt:G(O,{interrupt:!0})},c={previous:null,code:null,containerState:{},events:[],parser:e,sliceStream:h,sliceSerialize:m,now:b,defineSkip:A,write:d};let f=t.tokenize.call(c,l);return t.resolveAll&&a.push(t),c;function d(j){return s=Je(s,j),_(),s[s.length-1]!==null?[]:(oe(t,0),c.events=Lr(a,c.events,c),c.events)}function m(j,$){return j0(h(j),$)}function h(j){return U0(s,j)}function b(){const{line:j,column:$,offset:H,_index:U,_bufferIndex:Q}=r;return{line:j,column:$,offset:H,_index:U,_bufferIndex:Q}}function A(j){i[j.line]=j.column,w()}function _(){let j;for(;r._index<s.length;){const $=s[r._index];if(typeof $=="string")for(j=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===j&&r._bufferIndex<$.length;)x($.charCodeAt(r._bufferIndex));else x($)}}function x(j){f=f(j)}function I(j){te(j)?(r.line++,r.column=1,r.offset+=j===-3?2:1,w()):j!==-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=j}function C(j,$){const H=$||{};return H.type=j,H.start=b(),c.events.push(["enter",H,c]),u.push(H),H}function D(j){const $=u.pop();return $.end=b(),c.events.push(["exit",$,c]),$}function k(j,$){oe(j,$.from)}function O(j,$){$.restore()}function G(j,$){return H;function H(U,Q,me){let xe,Re,De,p;return Array.isArray(U)?K(U):"tokenize"in U?K([U]):z(U);function z(V){return re;function re(ne){const se=ne!==null&&V[ne],J=ne!==null&&V.null,Ne=[...Array.isArray(se)?se:se?[se]:[],...Array.isArray(J)?J:J?[J]:[]];return K(Ne)(ne)}}function K(V){return xe=V,Re=0,V.length===0?me:T(V[Re])}function T(V){return re;function re(ne){return p=ae(),De=V,V.partial||(c.currentConstruct=V),V.name&&c.parser.constructs.disable.null.includes(V.name)?ie():V.tokenize.call($?Object.assign(Object.create(c),$):c,l,Z,ie)(ne)}}function Z(V){return j(De,p),Q}function ie(V){return p.restore(),++Re<xe.length?T(xe[Re]):me}}}function oe(j,$){j.resolveAll&&!a.includes(j)&&a.push(j),j.resolve&&Ze(c.events,$,c.events.length-$,j.resolve(c.events.slice($),c)),j.resolveTo&&(c.events=j.resolveTo(c.events,c))}function ae(){const j=b(),$=c.previous,H=c.currentConstruct,U=c.events.length,Q=Array.from(u);return{restore:me,from:U};function me(){r=j,c.previous=$,c.currentConstruct=H,c.events.length=U,u=Q,w()}}function w(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function U0(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 u=s[0];typeof u=="string"?s[0]=u.slice(r):s.shift()}a>0&&s.push(e[i].slice(0,a))}return s}function j0(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 D0={42:We,43:We,45:We,48:We,49:We,50:We,51:We,52:We,53:We,54:We,55:We,56:We,57:We,62:wo},P0={91:Mh},M0={[-2]:Kr,[-1]:Kr,32:Kr},B0={35:zh,42:ur,45:[Ts,ur],60:Vh,61:Ts,95:ur,96:bs,126:bs},F0={38:Io,92:vo},H0={[-5]:Zr,[-4]:Zr,[-3]:Zr,33:c0,38:Io,42:Bi,60:[hh,Jh],91:d0,92:[Uh,vo],93:ma,95:Bi,96:wh},U0={null:[Bi,v0]},j0={null:[42,95]},z0={null:[]},$0=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:j0,contentInitial:P0,disable:z0,document:D0,flow:B0,flowInitial:M0,insideSpan:U0,string:F0,text:H0},Symbol.toStringTag,{value:"Module"}));function Y0(e){const n=So([$0,...(e||{}).extensions||[]]),r={defined:[],lazy:{},constructs:n,content:i(sh),document:i(oh),flow:i(C0),string:i(I0),text:i(N0)};return r;function i(a){return s;function s(u){return O0(r,a,u)}}}function G0(e){for(;!No(e););return e}const xs=/[\0\t\n\r]/g;function V0(){let e=1,t="",n=!0,r;return i;function i(a,s,u){const o=[];let c,f,d,h,m;for(a=t+(typeof a=="string"?a.toString():new TextDecoder(s||void 0).decode(a)),d=0,t="",n&&(a.charCodeAt(0)===65279&&d++,n=void 0);d<a.length;){if(xs.lastIndex=d,c=xs.exec(a),h=c&&c.index!==void 0?c.index:a.length,m=a.charCodeAt(h),!c){t=a.slice(d);break}if(m===10&&d===h&&r)o.push(-3),r=void 0;else switch(r&&(o.push(-5),r=void 0),d<h&&(o.push(a.slice(d,h)),e+=h-d),m){case 0:{o.push(65533),e++;break}case 9:{for(f=Math.ceil(e/4)*4,o.push(-2);e++<f;)o.push(-1);break}case 10:{o.push(-4),e=1;break}default:r=!0,e=1}d=h+1}return u&&(r&&o.push(-5),t&&o.push(t),o.push(null)),o}}const q0=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function W0(e){return e.replace(q0,X0)}function X0(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),a=i===120||i===88;return Co(n.slice(a?2:1),a?16:10)}return ha(n)||e}const Po={}.hasOwnProperty;function Q0(e,t,n){return typeof t!="string"&&(n=t,t=void 0),K0(n)(G0(Y0(n).document().write(V0()(e,t,!0))))}function K0(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:a(Kt),autolinkProtocol:G,autolinkEmail:G,atxHeading:a(Ze),blockQuote:a(ie),characterEscape:G,characterReference:G,codeFenced:a(ae),codeFencedFenceInfo:s,codeFencedFenceMeta:s,codeIndented:a(ae,s),codeText:a(Ne,s),codeTextData:G,data:G,codeFlowValue:G,definition:a(z),definitionDestinationString:s,definitionLabelString:s,definitionTitleString:s,emphasis:a(Pe),hardBreakEscape:a(ct),hardBreakTrailing:a(ct),htmlFlow:a(Ct,s),htmlFlowData:G,htmlText:a(Ct,s),htmlTextData:G,image:a($e),label:s,link:a(Kt),listItem:a(V),listItemValue:h,listOrdered:a(wt,d),listUnordered:a(wt),paragraph:a(me),reference:T,referenceString:s,resourceDestinationString:s,resourceTitleString:s,setextHeading:a(Ze),strong:a(be),thematicBreak:a(Ce)},exit:{atxHeading:o(),atxHeadingSequence:N,autolink:o(),autolinkEmail:re,autolinkProtocol:ee,blockQuote:o(),characterEscapeValue:w,characterReferenceMarkerHexadecimal:ne,characterReferenceMarkerNumeric:ne,characterReferenceValue:W,codeFenced:o(C),codeFencedFence:A,codeFencedFenceInfo:m,codeFencedFenceMeta:b,codeFlowValue:w,codeIndented:o(y),codeText:o(J),codeTextData:w,data:w,definition:o(),definitionDestinationString:D,definitionLabelString:S,definitionTitleString:v,emphasis:o(),hardBreakEscape:o(H),hardBreakTrailing:o(H),htmlFlow:o($),htmlFlowData:w,htmlText:o(Y),htmlTextData:w,image:o(Se),label:Re,labelText:Oe,lineEnding:j,link:o(he),listItem:o(),listOrdered:o(),listUnordered:o(),paragraph:o(),referenceString:Q,resourceDestinationString:p,resourceTitleString:U,resource:Z,setextHeading:o(ue),setextHeadingLineSequence:q,setextHeadingText:O,strong:o(),thematicBreak:o()}};Mo(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(R){let B={type:"root",children:[]};const K={stack:[B],tokenStack:[],config:t,enter:u,exit:c,buffer:s,resume:f,data:n},le=[];let pe=-1;for(;++pe<R.length;)if(R[pe][1].type==="listOrdered"||R[pe][1].type==="listUnordered")if(R[pe][0]==="enter")le.push(pe);else{const Xe=le.pop();pe=i(R,Xe,pe)}for(pe=-1;++pe<R.length;){const Xe=t[R[pe][0]];Po.call(Xe,R[pe][1].type)&&Xe[R[pe][1].type].call(Object.assign({sliceSerialize:R[pe][2].sliceSerialize},K),R[pe][1])}if(K.tokenStack.length>0){const Xe=K.tokenStack[K.tokenStack.length-1];(Xe[1]||ys).call(K,void 0,Xe[0])}for(B.position={start:vt(R.length>0?R[0][1].start:{line:1,column:1,offset:0}),end:vt(R.length>0?R[R.length-2][1].end:{line:1,column:1,offset:0})},pe=-1;++pe<t.transforms.length;)B=t.transforms[pe](B)||B;return B}function i(R,B,K){let le=B-1,pe=-1,Xe=!1,yt,st,Mt,ye;for(;++le<=K;){const xe=R[le];switch(xe[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{xe[0]==="enter"?pe++:pe--,ye=void 0;break}case"lineEndingBlank":{xe[0]==="enter"&&(yt&&!ye&&!pe&&!Mt&&(Mt=le),ye=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:ye=void 0}if(!pe&&xe[0]==="enter"&&xe[1].type==="listItemPrefix"||pe===-1&&xe[0]==="exit"&&(xe[1].type==="listUnordered"||xe[1].type==="listOrdered")){if(yt){let ut=le;for(st=void 0;ut--;){const ft=R[ut];if(ft[1].type==="lineEnding"||ft[1].type==="lineEndingBlank"){if(ft[0]==="exit")continue;st&&(R[st][1].type="lineEndingBlank",Xe=!0),ft[1].type="lineEnding",st=ut}else if(!(ft[1].type==="linePrefix"||ft[1].type==="blockQuotePrefix"||ft[1].type==="blockQuotePrefixWhitespace"||ft[1].type==="blockQuoteMarker"||ft[1].type==="listItemIndent"))break}Mt&&(!st||Mt<st)&&(yt._spread=!0),yt.end=Object.assign({},st?R[st][1].start:xe[1].end),R.splice(st||le,0,["exit",yt,xe[2]]),le++,K++}if(xe[1].type==="listItemPrefix"){const ut={type:"listItem",_spread:!1,start:Object.assign({},xe[1].start),end:void 0};yt=ut,R.splice(le,0,["enter",ut,xe[2]]),le++,K++,Mt=void 0,ye=!0}}}return R[B][1]._spread=Xe,K}function a(R,B){return K;function K(le){u.call(this,R(le),le),B&&B.call(this,le)}}function s(){this.stack.push({type:"fragment",children:[]})}function u(R,B,K){this.stack[this.stack.length-1].children.push(R),this.stack.push(R),this.tokenStack.push([B,K]),R.position={start:vt(B.start),end:void 0}}function o(R){return B;function B(K){R&&R.call(this,K),c.call(this,K)}}function c(R,B){const K=this.stack.pop(),le=this.tokenStack.pop();if(le)le[0].type!==R.type&&(B?B.call(this,R,le[0]):(le[1]||ys).call(this,R,le[0]));else throw new Error("Cannot close `"+R.type+"` ("+vn({start:R.start,end:R.end})+"): it’s not open");K.position.end=vt(R.end)}function f(){return da(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function h(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 m(){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 A(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function C(){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 y(){const R=this.resume(),B=this.stack[this.stack.length-1];B.value=R.replace(/(\r?\n|\r)$/g,"")}function S(R){const B=this.resume(),K=this.stack[this.stack.length-1];K.label=B,K.identifier=ot(this.sliceSerialize(R)).toLowerCase()}function v(){const R=this.resume(),B=this.stack[this.stack.length-1];B.title=R}function D(){const R=this.resume(),B=this.stack[this.stack.length-1];B.url=R}function N(R){const B=this.stack[this.stack.length-1];if(!B.depth){const K=this.sliceSerialize(R).length;B.depth=K}}function O(){this.data.setextHeadingSlurpLineEnding=!0}function q(R){const B=this.stack[this.stack.length-1];B.depth=this.sliceSerialize(R).codePointAt(0)===61?1:2}function ue(){this.data.setextHeadingSlurpLineEnding=void 0}function G(R){const K=this.stack[this.stack.length-1].children;let le=K[K.length-1];(!le||le.type!=="text")&&(le=fe(),le.position={start:vt(R.start),end:void 0},K.push(le)),this.stack.push(le)}function w(R){const B=this.stack.pop();B.value+=this.sliceSerialize(R),B.position.end=vt(R.end)}function j(R){const B=this.stack[this.stack.length-1];if(this.data.atHardBreak){const K=B.children[B.children.length-1];K.position.end=vt(R.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(B.type)&&(G.call(this,R),w.call(this,R))}function H(){this.data.atHardBreak=!0}function $(){const R=this.resume(),B=this.stack[this.stack.length-1];B.value=R}function Y(){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 he(){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 Se(){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),K=this.stack[this.stack.length-2];K.label=W0(B),K.identifier=ot(B).toLowerCase()}function Re(){const R=this.stack[this.stack.length-1],B=this.resume(),K=this.stack[this.stack.length-1];if(this.data.inReference=!0,K.type==="link"){const le=R.children;K.children=le}else K.alt=B}function p(){const R=this.resume(),B=this.stack[this.stack.length-1];B.url=R}function U(){const R=this.resume(),B=this.stack[this.stack.length-1];B.title=R}function Z(){this.data.inReference=void 0}function T(){this.data.referenceType="collapsed"}function Q(R){const B=this.resume(),K=this.stack[this.stack.length-1];K.label=B,K.identifier=ot(this.sliceSerialize(R)).toLowerCase(),this.data.referenceType="full"}function ne(R){this.data.characterReferenceType=R.type}function W(R){const B=this.sliceSerialize(R),K=this.data.characterReferenceType;let le;K?(le=Co(B,K==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):le=ha(B);const pe=this.stack.pop();pe.value+=le,pe.position.end=vt(R.end)}function ee(R){w.call(this,R);const B=this.stack[this.stack.length-1];B.url=this.sliceSerialize(R)}function re(R){w.call(this,R);const B=this.stack[this.stack.length-1];B.url="mailto:"+this.sliceSerialize(R)}function ie(){return{type:"blockquote",children:[]}}function ae(){return{type:"code",lang:null,meta:null,value:""}}function Ne(){return{type:"inlineCode",value:""}}function z(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Pe(){return{type:"emphasis",children:[]}}function Ze(){return{type:"heading",depth:0,children:[]}}function ct(){return{type:"break"}}function Ct(){return{type:"html",value:""}}function $e(){return{type:"image",title:null,url:"",alt:null}}function Kt(){return{type:"link",title:null,url:"",children:[]}}function wt(R){return{type:"list",ordered:R.type==="listOrdered",start:null,spread:R._spread,children:[]}}function V(R){return{type:"listItem",spread:R._spread,checked:null,children:[]}}function me(){return{type:"paragraph",children:[]}}function be(){return{type:"strong",children:[]}}function fe(){return{type:"text",value:""}}function Ce(){return{type:"thematicBreak"}}}function vt(e){return{line:e.line,column:e.column,offset:e.offset}}function Mo(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?Mo(e,r):Z0(e,r)}}function Z0(e,t){let n;for(n in t)if(Po.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 ys(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+vn({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+vn({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+vn({start:t.start,end:t.end})+") is still open")}function J0(e){const t=this;t.parser=n;function n(r){return Q0(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function em(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 tm(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
51
- `}]}function nm(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 rm(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function im(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function am(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),i=pn(r.toLowerCase()),a=e.footnoteOrder.indexOf(r);let s,u=e.footnoteCounts.get(r);u===void 0?(u=0,e.footnoteOrder.push(r),s=e.footnoteOrder.length):s=a+1,u+=1,e.footnoteCounts.set(r,u);const o={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+i,id:n+"fnref-"+i+(u>1?"-"+u:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(s)}]};e.patch(t,o);const c={type:"element",tagName:"sup",properties:{},children:[o]};return e.patch(t,c),e.applyData(t,c)}function sm(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 um(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function Bo(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 om(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Bo(e,t);const i={src:pn(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 lm(e,t){const n={src:pn(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 cm(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 fm(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Bo(e,t);const i={href:pn(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 dm(e,t){const n={href:pn(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 hm(e,t,n){const r=e.all(t),i=n?mm(n):Fo(t),a={},s=[];if(typeof t.checked=="boolean"){const f=r[0];let d;f&&f.type==="element"&&f.tagName==="p"?d=f:(d={type:"element",tagName:"p",properties:{},children:[]},r.unshift(d)),d.children.length>0&&d.children.unshift({type:"text",value:" "}),d.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),a.className=["task-list-item"]}let u=-1;for(;++u<r.length;){const f=r[u];(i||u!==0||f.type!=="element"||f.tagName!=="p")&&s.push({type:"text",value:`
53
- `}),f.type==="element"&&f.tagName==="p"&&!i?s.push(...f.children):s.push(f)}const o=r[r.length-1];o&&(i||o.type!=="element"||o.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 mm(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=Fo(n[r])}return t}function Fo(e){const t=e.spread;return t??e.children.length>1}function pm(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 gm(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function bm(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function Em(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Tm(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)},u=Et(t.children[1]),o=Ir(t.children[t.children.length-1]);u&&o&&(s.position={start:u,end:o}),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 xm(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,u=s?s.length:t.children.length;let o=-1;const c=[];for(;++o<u;){const d=t.children[o],h={},m=s?s[o]:void 0;m&&(h.align=m);let b={type:"element",tagName:a,properties:h,children:[]};d&&(b.children=e.all(d),e.patch(d,b),b=e.applyData(d,b)),c.push(b)}const f={type:"element",tagName:"tr",properties:{},children:e.wrap(c,!0)};return e.patch(t,f),e.applyData(t,f)}function ym(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const As=9,_s=32;function Am(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),i=0;const a=[];for(;r;)a.push(Ss(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return a.push(Ss(t.slice(i),i>0,!1)),a.join("")}function Ss(e,t,n){let r=0,i=e.length;if(t){let a=e.codePointAt(r);for(;a===As||a===_s;)r++,a=e.codePointAt(r)}if(n){let a=e.codePointAt(i-1);for(;a===As||a===_s;)i--,a=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function _m(e,t){const n={type:"text",value:Am(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function Sm(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const Cm={blockquote:em,break:tm,code:nm,delete:rm,emphasis:im,footnoteReference:am,heading:sm,html:um,imageReference:om,image:lm,inlineCode:cm,linkReference:fm,link:dm,listItem:hm,list:pm,paragraph:gm,root:bm,strong:Em,table:Tm,tableCell:ym,tableRow:xm,text:_m,thematicBreak:Sm,toml:Zn,yaml:Zn,definition:Zn,footnoteDefinition:Zn};function Zn(){}const Ho=-1,Or=0,dr=1,hr=2,pa=3,ga=4,ba=5,Ea=6,Uo=7,jo=8,Cs=typeof self=="object"?self:globalThis,wm=(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 Or:case Ho:return n(s,i);case dr:{const u=n([],i);for(const o of s)u.push(r(o));return u}case hr:{const u=n({},i);for(const[o,c]of s)u[r(o)]=r(c);return u}case pa:return n(new Date(s),i);case ga:{const{source:u,flags:o}=s;return n(new RegExp(u,o),i)}case ba:{const u=n(new Map,i);for(const[o,c]of s)u.set(r(o),r(c));return u}case Ea:{const u=n(new Set,i);for(const o of s)u.add(r(o));return u}case Uo:{const{name:u,message:o}=s;return n(new Cs[u](o),i)}case jo:return n(BigInt(s),i);case"BigInt":return n(Object(BigInt(s)),i)}return n(new Cs[a](s),i)};return r},ws=e=>wm(new Map,e)(0),Jt="",{toString:vm}={},{keys:Im}=Object,xn=e=>{const t=typeof e;if(t!=="object"||!e)return[Or,t];const n=vm.call(e).slice(8,-1);switch(n){case"Array":return[dr,Jt];case"Object":return[hr,Jt];case"Date":return[pa,Jt];case"RegExp":return[ga,Jt];case"Map":return[ba,Jt];case"Set":return[Ea,Jt]}return n.includes("Array")?[dr,n]:n.includes("Error")?[Uo,n]:[hr,n]},Jn=([e,t])=>e===Or&&(t==="function"||t==="symbol"),Nm=(e,t,n,r)=>{const i=(s,u)=>{const o=r.push(s)-1;return n.set(u,o),o},a=s=>{if(n.has(s))return n.get(s);let[u,o]=xn(s);switch(u){case Or:{let f=s;switch(o){case"bigint":u=jo,f=s.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+o);f=null;break;case"undefined":return i([Ho],s)}return i([u,f],s)}case dr:{if(o)return i([o,[...s]],s);const f=[],d=i([u,f],s);for(const h of s)f.push(a(h));return d}case hr:{if(o)switch(o){case"BigInt":return i([o,s.toString()],s);case"Boolean":case"Number":case"String":return i([o,s.valueOf()],s)}if(t&&"toJSON"in s)return a(s.toJSON());const f=[],d=i([u,f],s);for(const h of Im(s))(e||!Jn(xn(s[h])))&&f.push([a(h),a(s[h])]);return d}case pa:return i([u,s.toISOString()],s);case ga:{const{source:f,flags:d}=s;return i([u,{source:f,flags:d}],s)}case ba:{const f=[],d=i([u,f],s);for(const[h,m]of s)(e||!(Jn(xn(h))||Jn(xn(m))))&&f.push([a(h),a(m)]);return d}case Ea:{const f=[],d=i([u,f],s);for(const h of s)(e||!Jn(xn(h)))&&f.push(a(h));return d}}const{message:c}=s;return i([u,{name:o,message:c}],s)};return a},vs=(e,{json:t,lossy:n}={})=>{const r=[];return Nm(!(t||n),!!t,new Map,r)(e),r},ln=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?ws(vs(e,t)):structuredClone(e):(e,t)=>ws(vs(e,t));function km(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 Om(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function Rm(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||km,r=e.options.footnoteBackLabel||Om,i=e.options.footnoteLabel||"Footnotes",a=e.options.footnoteLabelTagName||"h2",s=e.options.footnoteLabelProperties||{className:["sr-only"]},u=[];let o=-1;for(;++o<e.footnoteOrder.length;){const c=e.footnoteById.get(e.footnoteOrder[o]);if(!c)continue;const f=e.all(c),d=String(c.identifier).toUpperCase(),h=pn(d.toLowerCase());let m=0;const b=[],A=e.footnoteCounts.get(d);for(;A!==void 0&&++m<=A;){b.length>0&&b.push({type:"text",value:" "});let S=typeof n=="string"?n:n(o,m);typeof S=="string"&&(S={type:"text",value:S}),b.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+h+(m>1?"-"+m:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(o,m),className:["data-footnote-backref"]},children:Array.isArray(S)?S:[S]})}const C=f[f.length-1];if(C&&C.type==="element"&&C.tagName==="p"){const S=C.children[C.children.length-1];S&&S.type==="text"?S.value+=" ":C.children.push({type:"text",value:" "}),C.children.push(...b)}else f.push(...b);const y={type:"element",tagName:"li",properties:{id:t+"fn-"+h},children:e.wrap(f,!0)};e.patch(c,y),u.push(y)}if(u.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:a,properties:{...ln(s),id:"footnote-label"},children:[{type:"text",value:i}]},{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 z0={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:Lo},$0={91:Yh},Y0={[-2]:Jr,[-1]:Jr,32:Jr},G0={35:Qh,42:lr,45:[As,lr],60:e0,61:As,95:lr,96:ys,126:ys},V0={38:Do,92:Ro},q0={[-5]:ei,[-4]:ei,[-3]:ei,33:E0,38:Do,42:Hi,60:[xh,u0],91:y0,92:[Wh,Ro],93:ba,95:Hi,96:Dh},W0={null:[Hi,P0]},X0={null:[42,95]},Q0={null:[]},K0=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:X0,contentInitial:$0,disable:Q0,document:z0,flow:G0,flowInitial:Y0,insideSpan:W0,string:V0,text:q0},Symbol.toStringTag,{value:"Module"}));function Z0(e){const n=ko([K0,...(e||{}).extensions||[]]),r={defined:[],lazy:{},constructs:n,content:i(mh),document:i(gh),flow:i(R0),string:i(M0),text:i(B0)};return r;function i(a){return s;function s(u){return H0(r,a,u)}}}function J0(e){for(;!Po(e););return e}const _s=/[\0\t\n\r]/g;function em(){let e=1,t="",n=!0,r;return i;function i(a,s,u){const l=[];let c,f,d,m,h;for(a=t+(typeof a=="string"?a.toString():new TextDecoder(s||void 0).decode(a)),d=0,t="",n&&(a.charCodeAt(0)===65279&&d++,n=void 0);d<a.length;){if(_s.lastIndex=d,c=_s.exec(a),m=c&&c.index!==void 0?c.index:a.length,h=a.charCodeAt(m),!c){t=a.slice(d);break}if(h===10&&d===m&&r)l.push(-3),r=void 0;else switch(r&&(l.push(-5),r=void 0),d<m&&(l.push(a.slice(d,m)),e+=m-d),h){case 0:{l.push(65533),e++;break}case 9:{for(f=Math.ceil(e/4)*4,l.push(-2);e++<f;)l.push(-1);break}case 10:{l.push(-4),e=1;break}default:r=!0,e=1}d=m+1}return u&&(r&&l.push(-5),t&&l.push(t),l.push(null)),l}}const tm=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function nm(e){return e.replace(tm,rm)}function rm(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),a=i===120||i===88;return Oo(n.slice(a?2:1),a?16:10)}return ga(n)||e}const jo={}.hasOwnProperty;function im(e,t,n){return typeof t!="string"&&(n=t,t=void 0),am(n)(J0(Z0(n).document().write(em()(e,t,!0))))}function am(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:a(Ue),autolinkProtocol:ae,autolinkEmail:ae,atxHeading:a(Ye),blockQuote:a(se),characterEscape:ae,characterReference:ae,codeFenced:a(J),codeFencedFenceInfo:s,codeFencedFenceMeta:s,codeIndented:a(J,s),codeText:a(Ne,s),codeTextData:ae,data:ae,codeFlowValue:ae,definition:a(Y),definitionDestinationString:s,definitionLabelString:s,definitionTitleString:s,emphasis:a(ke),hardBreakEscape:a(lt),hardBreakTrailing:a(lt),htmlFlow:a(Rt,s),htmlFlowData:ae,htmlText:a(Rt,s),htmlTextData:ae,image:a(Dt),label:s,link:a(Ue),listItem:a(Pt),listItemValue:m,listOrdered:a(Jt,d),listUnordered:a(Jt),paragraph:a(q),reference:T,referenceString:s,resourceDestinationString:s,resourceTitleString:s,setextHeading:a(Ye),strong:a(pe),thematicBreak:a(de)},exit:{atxHeading:l(),atxHeadingSequence:k,autolink:l(),autolinkEmail:ne,autolinkProtocol:re,blockQuote:l(),characterEscapeValue:w,characterReferenceMarkerHexadecimal:ie,characterReferenceMarkerNumeric:ie,characterReferenceValue:V,codeFenced:l(_),codeFencedFence:A,codeFencedFenceInfo:h,codeFencedFenceMeta:b,codeFlowValue:w,codeIndented:l(x),codeText:l(Q),codeTextData:w,data:w,definition:l(),definitionDestinationString:D,definitionLabelString:I,definitionTitleString:C,emphasis:l(),hardBreakEscape:l($),hardBreakTrailing:l($),htmlFlow:l(H),htmlFlowData:w,htmlText:l(U),htmlTextData:w,image:l(xe),label:De,labelText:Re,lineEnding:j,link:l(me),listItem:l(),listOrdered:l(),listUnordered:l(),paragraph:l(),referenceString:Z,resourceDestinationString:p,resourceTitleString:z,resource:K,setextHeading:l(oe),setextHeadingLineSequence:G,setextHeadingText:O,strong:l(),thematicBreak:l()}};zo(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(L){let M={type:"root",children:[]};const W={stack:[M],tokenStack:[],config:t,enter:u,exit:c,buffer:s,resume:f,data:n},ee=[];let ye=-1;for(;++ye<L.length;)if(L[ye][1].type==="listOrdered"||L[ye][1].type==="listUnordered")if(L[ye][0]==="enter")ee.push(ye);else{const Be=ee.pop();ye=i(L,Be,ye)}for(ye=-1;++ye<L.length;){const Be=t[L[ye][0]];jo.call(Be,L[ye][1].type)&&Be[L[ye][1].type].call(Object.assign({sliceSerialize:L[ye][2].sliceSerialize},W),L[ye][1])}if(W.tokenStack.length>0){const Be=W.tokenStack[W.tokenStack.length-1];(Be[1]||Ss).call(W,void 0,Be[0])}for(M.position={start:St(L.length>0?L[0][1].start:{line:1,column:1,offset:0}),end:St(L.length>0?L[L.length-2][1].end:{line:1,column:1,offset:0})},ye=-1;++ye<t.transforms.length;)M=t.transforms[ye](M)||M;return M}function i(L,M,W){let ee=M-1,ye=-1,Be=!1,yt,st,Mt,Bt;for(;++ee<=W;){const ce=L[ee];switch(ce[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{ce[0]==="enter"?ye++:ye--,Bt=void 0;break}case"lineEndingBlank":{ce[0]==="enter"&&(yt&&!Bt&&!ye&&!Mt&&(Mt=ee),Bt=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Bt=void 0}if(!ye&&ce[0]==="enter"&&ce[1].type==="listItemPrefix"||ye===-1&&ce[0]==="exit"&&(ce[1].type==="listUnordered"||ce[1].type==="listOrdered")){if(yt){let we=ee;for(st=void 0;we--;){const qe=L[we];if(qe[1].type==="lineEnding"||qe[1].type==="lineEndingBlank"){if(qe[0]==="exit")continue;st&&(L[st][1].type="lineEndingBlank",Be=!0),qe[1].type="lineEnding",st=we}else if(!(qe[1].type==="linePrefix"||qe[1].type==="blockQuotePrefix"||qe[1].type==="blockQuotePrefixWhitespace"||qe[1].type==="blockQuoteMarker"||qe[1].type==="listItemIndent"))break}Mt&&(!st||Mt<st)&&(yt._spread=!0),yt.end=Object.assign({},st?L[st][1].start:ce[1].end),L.splice(st||ee,0,["exit",yt,ce[2]]),ee++,W++}if(ce[1].type==="listItemPrefix"){const we={type:"listItem",_spread:!1,start:Object.assign({},ce[1].start),end:void 0};yt=we,L.splice(ee,0,["enter",we,ce[2]]),ee++,W++,Mt=void 0,Bt=!0}}}return L[M][1]._spread=Be,W}function a(L,M){return W;function W(ee){u.call(this,L(ee),ee),M&&M.call(this,ee)}}function s(){this.stack.push({type:"fragment",children:[]})}function u(L,M,W){this.stack[this.stack.length-1].children.push(L),this.stack.push(L),this.tokenStack.push([M,W]),L.position={start:St(M.start),end:void 0}}function l(L){return M;function M(W){L&&L.call(this,W),c.call(this,W)}}function c(L,M){const W=this.stack.pop(),ee=this.tokenStack.pop();if(ee)ee[0].type!==L.type&&(M?M.call(this,L,ee[0]):(ee[1]||Ss).call(this,L,ee[0]));else throw new Error("Cannot close `"+L.type+"` ("+Nn({start:L.start,end:L.end})+"): it’s not open");W.position.end=St(L.end)}function f(){return pa(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function m(L){if(this.data.expectingFirstListItemValue){const M=this.stack[this.stack.length-2];M.start=Number.parseInt(this.sliceSerialize(L),10),this.data.expectingFirstListItemValue=void 0}}function h(){const L=this.resume(),M=this.stack[this.stack.length-1];M.lang=L}function b(){const L=this.resume(),M=this.stack[this.stack.length-1];M.meta=L}function A(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function _(){const L=this.resume(),M=this.stack[this.stack.length-1];M.value=L.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function x(){const L=this.resume(),M=this.stack[this.stack.length-1];M.value=L.replace(/(\r?\n|\r)$/g,"")}function I(L){const M=this.resume(),W=this.stack[this.stack.length-1];W.label=M,W.identifier=ut(this.sliceSerialize(L)).toLowerCase()}function C(){const L=this.resume(),M=this.stack[this.stack.length-1];M.title=L}function D(){const L=this.resume(),M=this.stack[this.stack.length-1];M.url=L}function k(L){const M=this.stack[this.stack.length-1];if(!M.depth){const W=this.sliceSerialize(L).length;M.depth=W}}function O(){this.data.setextHeadingSlurpLineEnding=!0}function G(L){const M=this.stack[this.stack.length-1];M.depth=this.sliceSerialize(L).codePointAt(0)===61?1:2}function oe(){this.data.setextHeadingSlurpLineEnding=void 0}function ae(L){const W=this.stack[this.stack.length-1].children;let ee=W[W.length-1];(!ee||ee.type!=="text")&&(ee=be(),ee.position={start:St(L.start),end:void 0},W.push(ee)),this.stack.push(ee)}function w(L){const M=this.stack.pop();M.value+=this.sliceSerialize(L),M.position.end=St(L.end)}function j(L){const M=this.stack[this.stack.length-1];if(this.data.atHardBreak){const W=M.children[M.children.length-1];W.position.end=St(L.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(M.type)&&(ae.call(this,L),w.call(this,L))}function $(){this.data.atHardBreak=!0}function H(){const L=this.resume(),M=this.stack[this.stack.length-1];M.value=L}function U(){const L=this.resume(),M=this.stack[this.stack.length-1];M.value=L}function Q(){const L=this.resume(),M=this.stack[this.stack.length-1];M.value=L}function me(){const L=this.stack[this.stack.length-1];if(this.data.inReference){const M=this.data.referenceType||"shortcut";L.type+="Reference",L.referenceType=M,delete L.url,delete L.title}else delete L.identifier,delete L.label;this.data.referenceType=void 0}function xe(){const L=this.stack[this.stack.length-1];if(this.data.inReference){const M=this.data.referenceType||"shortcut";L.type+="Reference",L.referenceType=M,delete L.url,delete L.title}else delete L.identifier,delete L.label;this.data.referenceType=void 0}function Re(L){const M=this.sliceSerialize(L),W=this.stack[this.stack.length-2];W.label=nm(M),W.identifier=ut(M).toLowerCase()}function De(){const L=this.stack[this.stack.length-1],M=this.resume(),W=this.stack[this.stack.length-1];if(this.data.inReference=!0,W.type==="link"){const ee=L.children;W.children=ee}else W.alt=M}function p(){const L=this.resume(),M=this.stack[this.stack.length-1];M.url=L}function z(){const L=this.resume(),M=this.stack[this.stack.length-1];M.title=L}function K(){this.data.inReference=void 0}function T(){this.data.referenceType="collapsed"}function Z(L){const M=this.resume(),W=this.stack[this.stack.length-1];W.label=M,W.identifier=ut(this.sliceSerialize(L)).toLowerCase(),this.data.referenceType="full"}function ie(L){this.data.characterReferenceType=L.type}function V(L){const M=this.sliceSerialize(L),W=this.data.characterReferenceType;let ee;W?(ee=Oo(M,W==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):ee=ga(M);const ye=this.stack.pop();ye.value+=ee,ye.position.end=St(L.end)}function re(L){w.call(this,L);const M=this.stack[this.stack.length-1];M.url=this.sliceSerialize(L)}function ne(L){w.call(this,L);const M=this.stack[this.stack.length-1];M.url="mailto:"+this.sliceSerialize(L)}function se(){return{type:"blockquote",children:[]}}function J(){return{type:"code",lang:null,meta:null,value:""}}function Ne(){return{type:"inlineCode",value:""}}function Y(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function ke(){return{type:"emphasis",children:[]}}function Ye(){return{type:"heading",depth:0,children:[]}}function lt(){return{type:"break"}}function Rt(){return{type:"html",value:""}}function Dt(){return{type:"image",title:null,url:"",alt:null}}function Ue(){return{type:"link",title:null,url:"",children:[]}}function Jt(L){return{type:"list",ordered:L.type==="listOrdered",start:null,spread:L._spread,children:[]}}function Pt(L){return{type:"listItem",spread:L._spread,checked:null,children:[]}}function q(){return{type:"paragraph",children:[]}}function pe(){return{type:"strong",children:[]}}function be(){return{type:"text",value:""}}function de(){return{type:"thematicBreak"}}}function St(e){return{line:e.line,column:e.column,offset:e.offset}}function zo(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?zo(e,r):sm(e,r)}}function sm(e,t){let n;for(n in t)if(jo.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 Ss(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Nn({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Nn({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Nn({start:t.start,end:t.end})+") is still open")}function um(e){const t=this;t.parser=n;function n(r){return im(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function om(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 lm(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
51
+ `}]}function cm(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 fm(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function dm(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function hm(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),i=bn(r.toLowerCase()),a=e.footnoteOrder.indexOf(r);let s,u=e.footnoteCounts.get(r);u===void 0?(u=0,e.footnoteOrder.push(r),s=e.footnoteOrder.length):s=a+1,u+=1,e.footnoteCounts.set(r,u);const l={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+i,id:n+"fnref-"+i+(u>1?"-"+u:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(s)}]};e.patch(t,l);const c={type:"element",tagName:"sup",properties:{},children:[l]};return e.patch(t,c),e.applyData(t,c)}function mm(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 pm(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function $o(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 gm(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return $o(e,t);const i={src:bn(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 bm(e,t){const n={src:bn(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 Em(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 Tm(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return $o(e,t);const i={href:bn(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 ym(e,t){const n={href:bn(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 xm(e,t,n){const r=e.all(t),i=n?Am(n):Yo(t),a={},s=[];if(typeof t.checked=="boolean"){const f=r[0];let d;f&&f.type==="element"&&f.tagName==="p"?d=f:(d={type:"element",tagName:"p",properties:{},children:[]},r.unshift(d)),d.children.length>0&&d.children.unshift({type:"text",value:" "}),d.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),a.className=["task-list-item"]}let u=-1;for(;++u<r.length;){const f=r[u];(i||u!==0||f.type!=="element"||f.tagName!=="p")&&s.push({type:"text",value:`
53
+ `}),f.type==="element"&&f.tagName==="p"&&!i?s.push(...f.children):s.push(f)}const l=r[r.length-1];l&&(i||l.type!=="element"||l.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 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=Yo(n[r])}return t}function Yo(e){const t=e.spread;return t??e.children.length>1}function _m(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 Sm(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Cm(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function wm(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Im(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)},u=bt(t.children[1]),l=kr(t.children[t.children.length-1]);u&&l&&(s.position={start:u,end:l}),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 vm(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,u=s?s.length:t.children.length;let l=-1;const c=[];for(;++l<u;){const d=t.children[l],m={},h=s?s[l]:void 0;h&&(m.align=h);let b={type:"element",tagName:a,properties:m,children:[]};d&&(b.children=e.all(d),e.patch(d,b),b=e.applyData(d,b)),c.push(b)}const f={type:"element",tagName:"tr",properties:{},children:e.wrap(c,!0)};return e.patch(t,f),e.applyData(t,f)}function Nm(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const Cs=9,ws=32;function km(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),i=0;const a=[];for(;r;)a.push(Is(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return a.push(Is(t.slice(i),i>0,!1)),a.join("")}function Is(e,t,n){let r=0,i=e.length;if(t){let a=e.codePointAt(r);for(;a===Cs||a===ws;)r++,a=e.codePointAt(r)}if(n){let a=e.codePointAt(i-1);for(;a===Cs||a===ws;)i--,a=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function Om(e,t){const n={type:"text",value:km(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function Lm(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const Rm={blockquote:om,break:lm,code:cm,delete:fm,emphasis:dm,footnoteReference:hm,heading:mm,html:pm,imageReference:gm,image:bm,inlineCode:Em,linkReference:Tm,link:ym,listItem:xm,list:_m,paragraph:Sm,root:Cm,strong:wm,table:Im,tableCell:Nm,tableRow:vm,text:Om,thematicBreak:Lm,toml:er,yaml:er,definition:er,footnoteDefinition:er};function er(){}const Go=-1,Rr=0,mr=1,pr=2,Ea=3,Ta=4,ya=5,xa=6,Vo=7,qo=8,vs=typeof self=="object"?self:globalThis,Dm=(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 Rr:case Go:return n(s,i);case mr:{const u=n([],i);for(const l of s)u.push(r(l));return u}case pr:{const u=n({},i);for(const[l,c]of s)u[r(l)]=r(c);return u}case Ea:return n(new Date(s),i);case Ta:{const{source:u,flags:l}=s;return n(new RegExp(u,l),i)}case ya:{const u=n(new Map,i);for(const[l,c]of s)u.set(r(l),r(c));return u}case xa:{const u=n(new Set,i);for(const l of s)u.add(r(l));return u}case Vo:{const{name:u,message:l}=s;return n(new vs[u](l),i)}case qo:return n(BigInt(s),i);case"BigInt":return n(Object(BigInt(s)),i)}return n(new vs[a](s),i)};return r},Ns=e=>Dm(new Map,e)(0),tn="",{toString:Pm}={},{keys:Mm}=Object,An=e=>{const t=typeof e;if(t!=="object"||!e)return[Rr,t];const n=Pm.call(e).slice(8,-1);switch(n){case"Array":return[mr,tn];case"Object":return[pr,tn];case"Date":return[Ea,tn];case"RegExp":return[Ta,tn];case"Map":return[ya,tn];case"Set":return[xa,tn]}return n.includes("Array")?[mr,n]:n.includes("Error")?[Vo,n]:[pr,n]},tr=([e,t])=>e===Rr&&(t==="function"||t==="symbol"),Bm=(e,t,n,r)=>{const i=(s,u)=>{const l=r.push(s)-1;return n.set(u,l),l},a=s=>{if(n.has(s))return n.get(s);let[u,l]=An(s);switch(u){case Rr:{let f=s;switch(l){case"bigint":u=qo,f=s.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+l);f=null;break;case"undefined":return i([Go],s)}return i([u,f],s)}case mr:{if(l)return i([l,[...s]],s);const f=[],d=i([u,f],s);for(const m of s)f.push(a(m));return d}case pr:{if(l)switch(l){case"BigInt":return i([l,s.toString()],s);case"Boolean":case"Number":case"String":return i([l,s.valueOf()],s)}if(t&&"toJSON"in s)return a(s.toJSON());const f=[],d=i([u,f],s);for(const m of Mm(s))(e||!tr(An(s[m])))&&f.push([a(m),a(s[m])]);return d}case Ea:return i([u,s.toISOString()],s);case Ta:{const{source:f,flags:d}=s;return i([u,{source:f,flags:d}],s)}case ya:{const f=[],d=i([u,f],s);for(const[m,h]of s)(e||!(tr(An(m))||tr(An(h))))&&f.push([a(m),a(h)]);return d}case xa:{const f=[],d=i([u,f],s);for(const m of s)(e||!tr(An(m)))&&f.push(a(m));return d}}const{message:c}=s;return i([u,{name:l,message:c}],s)};return a},ks=(e,{json:t,lossy:n}={})=>{const r=[];return Bm(!(t||n),!!t,new Map,r)(e),r},fn=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?Ns(ks(e,t)):structuredClone(e):(e,t)=>Ns(ks(e,t));function Fm(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 Hm(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function Um(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||Fm,r=e.options.footnoteBackLabel||Hm,i=e.options.footnoteLabel||"Footnotes",a=e.options.footnoteLabelTagName||"h2",s=e.options.footnoteLabelProperties||{className:["sr-only"]},u=[];let l=-1;for(;++l<e.footnoteOrder.length;){const c=e.footnoteById.get(e.footnoteOrder[l]);if(!c)continue;const f=e.all(c),d=String(c.identifier).toUpperCase(),m=bn(d.toLowerCase());let h=0;const b=[],A=e.footnoteCounts.get(d);for(;A!==void 0&&++h<=A;){b.length>0&&b.push({type:"text",value:" "});let I=typeof n=="string"?n:n(l,h);typeof I=="string"&&(I={type:"text",value:I}),b.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+m+(h>1?"-"+h:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(l,h),className:["data-footnote-backref"]},children:Array.isArray(I)?I:[I]})}const _=f[f.length-1];if(_&&_.type==="element"&&_.tagName==="p"){const I=_.children[_.children.length-1];I&&I.type==="text"?I.value+=" ":_.children.push({type:"text",value:" "}),_.children.push(...b)}else f.push(...b);const x={type:"element",tagName:"li",properties:{id:t+"fn-"+m},children:e.wrap(f,!0)};e.patch(c,x),u.push(x)}if(u.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:a,properties:{...fn(s),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:`
55
55
  `},{type:"element",tagName:"ol",properties:{},children:e.wrap(u,!0)},{type:"text",value:`
56
- `}]}}const Rr=(function(e){if(e==null)return Mm;if(typeof e=="function")return Lr(e);if(typeof e=="object")return Array.isArray(e)?Lm(e):Dm(e);if(typeof e=="string")return Pm(e);throw new Error("Expected function, string, or object as test")});function Lm(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=Rr(e[n]);return Lr(r);function r(...i){let a=-1;for(;++a<t.length;)if(t[a].apply(this,i))return!0;return!1}}function Dm(e){const t=e;return Lr(n);function n(r){const i=r;let a;for(a in e)if(i[a]!==t[a])return!1;return!0}}function Pm(e){return Lr(t);function t(n){return n&&n.type===e}}function Lr(e){return t;function t(n,r,i){return!!(Bm(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function Mm(){return!0}function Bm(e){return e!==null&&typeof e=="object"&&"type"in e}const zo=[],Fm=!0,Fi=!1,Hm="skip";function $o(e,t,n,r){let i;typeof t=="function"&&typeof n!="function"?(r=n,n=t):i=t;const a=Rr(i),s=r?-1:1;u(e,void 0,[])();function u(o,c,f){const d=o&&typeof o=="object"?o:{};if(typeof d.type=="string"){const m=typeof d.tagName=="string"?d.tagName:typeof d.name=="string"?d.name:void 0;Object.defineProperty(h,"name",{value:"node ("+(o.type+(m?"<"+m+">":""))+")"})}return h;function h(){let m=zo,b,A,C;if((!t||a(o,c,f[f.length-1]||void 0))&&(m=Um(n(o,f)),m[0]===Fi))return m;if("children"in o&&o.children){const y=o;if(y.children&&m[0]!==Hm)for(A=(r?y.children.length:-1)+s,C=f.concat(y);A>-1&&A<y.children.length;){const S=y.children[A];if(b=u(S,A,C)(),b[0]===Fi)return b;A=typeof b[1]=="number"?b[1]:A+s}}return m}}}function Um(e){return Array.isArray(e)?e:typeof e=="number"?[Fm,e]:e==null?zo:[e]}function Dr(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),$o(e,a,u,i);function u(o,c){const f=c[c.length-1],d=f?f.children.indexOf(o):void 0;return s(o,d,f)}}const Hi={}.hasOwnProperty,jm={};function zm(e,t){const n=t||jm,r=new Map,i=new Map,a=new Map,s={...Cm,...n.handlers},u={all:c,applyData:Ym,definitionById:r,footnoteById:i,footnoteCounts:a,footnoteOrder:[],handlers:s,one:o,options:n,patch:$m,wrap:Vm};return Dr(e,function(f){if(f.type==="definition"||f.type==="footnoteDefinition"){const d=f.type==="definition"?r:i,h=String(f.identifier).toUpperCase();d.has(h)||d.set(h,f)}}),u;function o(f,d){const h=f.type,m=u.handlers[h];if(Hi.call(u.handlers,h)&&m)return m(u,f,d);if(u.options.passThrough&&u.options.passThrough.includes(h)){if("children"in f){const{children:A,...C}=f,y=ln(C);return y.children=u.all(f),y}return ln(f)}return(u.options.unknownHandler||Gm)(u,f,d)}function c(f){const d=[];if("children"in f){const h=f.children;let m=-1;for(;++m<h.length;){const b=u.one(h[m],f);if(b){if(m&&h[m-1].type==="break"&&(!Array.isArray(b)&&b.type==="text"&&(b.value=Is(b.value)),!Array.isArray(b)&&b.type==="element")){const A=b.children[0];A&&A.type==="text"&&(A.value=Is(A.value))}Array.isArray(b)?d.push(...b):d.push(b)}}}return d}}function $m(e,t){e.position&&(t.position=kd(e))}function Ym(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,ln(a)),"children"in n&&n.children&&i!==null&&i!==void 0&&(n.children=i)}return n}function Gm(e,t){const n=t.data||{},r="value"in t&&!(Hi.call(n,"hProperties")||Hi.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 Vm(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
56
+ `}]}}const Dr=(function(e){if(e==null)return Ym;if(typeof e=="function")return Pr(e);if(typeof e=="object")return Array.isArray(e)?jm(e):zm(e);if(typeof e=="string")return $m(e);throw new Error("Expected function, string, or object as test")});function jm(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=Dr(e[n]);return Pr(r);function r(...i){let a=-1;for(;++a<t.length;)if(t[a].apply(this,i))return!0;return!1}}function zm(e){const t=e;return Pr(n);function n(r){const i=r;let a;for(a in e)if(i[a]!==t[a])return!1;return!0}}function $m(e){return Pr(t);function t(n){return n&&n.type===e}}function Pr(e){return t;function t(n,r,i){return!!(Gm(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function Ym(){return!0}function Gm(e){return e!==null&&typeof e=="object"&&"type"in e}const Wo=[],Vm=!0,Ui=!1,qm="skip";function Xo(e,t,n,r){let i;typeof t=="function"&&typeof n!="function"?(r=n,n=t):i=t;const a=Dr(i),s=r?-1:1;u(e,void 0,[])();function u(l,c,f){const d=l&&typeof l=="object"?l:{};if(typeof d.type=="string"){const h=typeof d.tagName=="string"?d.tagName:typeof d.name=="string"?d.name:void 0;Object.defineProperty(m,"name",{value:"node ("+(l.type+(h?"<"+h+">":""))+")"})}return m;function m(){let h=Wo,b,A,_;if((!t||a(l,c,f[f.length-1]||void 0))&&(h=Wm(n(l,f)),h[0]===Ui))return h;if("children"in l&&l.children){const x=l;if(x.children&&h[0]!==qm)for(A=(r?x.children.length:-1)+s,_=f.concat(x);A>-1&&A<x.children.length;){const I=x.children[A];if(b=u(I,A,_)(),b[0]===Ui)return b;A=typeof b[1]=="number"?b[1]:A+s}}return h}}}function Wm(e){return Array.isArray(e)?e:typeof e=="number"?[Vm,e]:e==null?Wo:[e]}function Mr(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),Xo(e,a,u,i);function u(l,c){const f=c[c.length-1],d=f?f.children.indexOf(l):void 0;return s(l,d,f)}}const ji={}.hasOwnProperty,Xm={};function Qm(e,t){const n=t||Xm,r=new Map,i=new Map,a=new Map,s={...Rm,...n.handlers},u={all:c,applyData:Zm,definitionById:r,footnoteById:i,footnoteCounts:a,footnoteOrder:[],handlers:s,one:l,options:n,patch:Km,wrap:ep};return Mr(e,function(f){if(f.type==="definition"||f.type==="footnoteDefinition"){const d=f.type==="definition"?r:i,m=String(f.identifier).toUpperCase();d.has(m)||d.set(m,f)}}),u;function l(f,d){const m=f.type,h=u.handlers[m];if(ji.call(u.handlers,m)&&h)return h(u,f,d);if(u.options.passThrough&&u.options.passThrough.includes(m)){if("children"in f){const{children:A,..._}=f,x=fn(_);return x.children=u.all(f),x}return fn(f)}return(u.options.unknownHandler||Jm)(u,f,d)}function c(f){const d=[];if("children"in f){const m=f.children;let h=-1;for(;++h<m.length;){const b=u.one(m[h],f);if(b){if(h&&m[h-1].type==="break"&&(!Array.isArray(b)&&b.type==="text"&&(b.value=Os(b.value)),!Array.isArray(b)&&b.type==="element")){const A=b.children[0];A&&A.type==="text"&&(A.value=Os(A.value))}Array.isArray(b)?d.push(...b):d.push(b)}}}return d}}function Km(e,t){e.position&&(t.position=Fd(e))}function Zm(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,fn(a)),"children"in n&&n.children&&i!==null&&i!==void 0&&(n.children=i)}return n}function Jm(e,t){const n=t.data||{},r="value"in t&&!(ji.call(n,"hProperties")||ji.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 ep(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 Is(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function Ns(e,t){const n=zm(e,t),r=n.one(e,void 0),i=Rm(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 qm(e,t){return e&&"run"in e?async function(n,r){const i=Ns(n,{file:r,...t});await e.run(i,r)}:function(n,r){return Ns(n,{file:r,...t||e})}}function ks(e){if(e)throw e}var Jr,Os;function Wm(){if(Os)return Jr;Os=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 f=e.call(c,"constructor"),d=c.constructor&&c.constructor.prototype&&e.call(c.constructor.prototype,"isPrototypeOf");if(c.constructor&&!f&&!d)return!1;var h;for(h in c);return typeof h>"u"||e.call(c,h)},s=function(c,f){n&&f.name==="__proto__"?n(c,f.name,{enumerable:!0,configurable:!0,value:f.newValue,writable:!0}):c[f.name]=f.newValue},u=function(c,f){if(f==="__proto__")if(e.call(c,f)){if(r)return r(c,f).value}else return;return c[f]};return Jr=function o(){var c,f,d,h,m,b,A=arguments[0],C=1,y=arguments.length,S=!1;for(typeof A=="boolean"&&(S=A,A=arguments[1]||{},C=2),(A==null||typeof A!="object"&&typeof A!="function")&&(A={});C<y;++C)if(c=arguments[C],c!=null)for(f in c)d=u(A,f),h=u(c,f),A!==h&&(S&&h&&(a(h)||(m=i(h)))?(m?(m=!1,b=d&&i(d)?d:[]):b=d&&a(d)?d:{},s(A,{name:f,newValue:o(S,b,h)})):typeof h<"u"&&s(A,{name:f,newValue:h}));return A},Jr}var Xm=Wm();const ei=ta(Xm);function Ui(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 Qm(){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);u(null,...i);function u(o,...c){const f=e[++a];let d=-1;if(o){s(o);return}for(;++d<i.length;)(c[d]===null||c[d]===void 0)&&(c[d]=i[d]);i=c,f?Km(f,u)(...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 Km(e,t){let n;return r;function r(...s){const u=e.length>s.length;let o;u&&s.push(i);try{o=e.apply(this,s)}catch(c){const f=c;if(u&&n)throw f;return i(f)}u||(o&&o.then&&typeof o.then=="function"?o.then(a,i):o instanceof Error?i(o):a(o))}function i(s,...u){n||(n=!0,t(s,...u))}function a(s){i(null,s)}}const dt={basename:Zm,dirname:Jm,extname:ep,join:tp,sep:"/"};function Zm(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Yn(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,u=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else s<0&&(a=!0,s=i+1),u>-1&&(e.codePointAt(i)===t.codePointAt(u--)?u<0&&(r=i):(u=-1,r=s));return n===r?r=s:r<0&&(r=e.length),e.slice(n,r)}function Jm(e){if(Yn(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 ep(e){Yn(e);let t=e.length,n=-1,r=0,i=-1,a=0,s;for(;t--;){const u=e.codePointAt(t);if(u===47){if(s){r=t+1;break}continue}n<0&&(s=!0,n=t+1),u===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 tp(...e){let t=-1,n;for(;++t<e.length;)Yn(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":np(n)}function np(e){Yn(e);const t=e.codePointAt(0)===47;let n=rp(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function rp(e,t){let n="",r=0,i=-1,a=0,s=-1,u,o;for(;++s<=e.length;){if(s<e.length)u=e.codePointAt(s);else{if(u===47)break;u=47}if(u===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(o=n.lastIndexOf("/"),o!==n.length-1){o<0?(n="",r=0):(n=n.slice(0,o),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 u===46&&a>-1?a++:a=-1}return n}function Yn(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const ip={cwd:ap};function ap(){return"/"}function ji(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function sp(e){if(typeof e=="string")e=new URL(e);else if(!ji(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 up(e)}function up(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 ti=["history","path","basename","stem","extname","dirname"];class Yo{constructor(t){let n;t?ji(t)?n={path:t}:typeof t=="string"||op(t)?n={value:t}:n=t:n={},this.cwd=ip.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<ti.length;){const a=ti[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)ti.includes(i)||(this[i]=n[i])}get basename(){return typeof this.path=="string"?dt.basename(this.path):void 0}set basename(t){ri(t,"basename"),ni(t,"basename"),this.path=dt.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?dt.dirname(this.path):void 0}set dirname(t){Rs(this.basename,"dirname"),this.path=dt.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?dt.extname(this.path):void 0}set extname(t){if(ni(t,"extname"),Rs(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=dt.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){ji(t)&&(t=sp(t)),ri(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?dt.basename(this.path,this.extname):void 0}set stem(t){ri(t,"stem"),ni(t,"stem"),this.path=dt.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 ni(e,t){if(e&&e.includes(dt.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+dt.sep+"`")}function ri(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function Rs(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function op(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const lp=(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 u of s){const o=Object.getOwnPropertyDescriptor(i,u);o&&Object.defineProperty(a,u,o)}return a}),cp={}.hasOwnProperty;class Ta extends lp{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=Qm()}copy(){const t=new Ta;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(ei(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(si("data",this.frozen),this.namespace[t]=n,this):cp.call(this.namespace,t)&&this.namespace[t]||void 0:t?(si("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=er(t),r=this.parser||this.Parser;return ii("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),ii("process",this.parser||this.Parser),ai("process",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(a,s){const u=er(t),o=r.parse(u);r.run(o,u,function(f,d,h){if(f||!d||!h)return c(f);const m=d,b=r.stringify(m,h);hp(b)?h.value=b:h.result=b,c(f,h)});function c(f,d){f||!d?s(f):a?a(d):n(void 0,d)}}}processSync(t){let n=!1,r;return this.freeze(),ii("processSync",this.parser||this.Parser),ai("processSync",this.compiler||this.Compiler),this.process(t,i),Ds("processSync","process",n),r;function i(a,s){n=!0,ks(a),r=s}}run(t,n,r){Ls(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,u){const o=er(n);i.run(t,o,c);function c(f,d,h){const m=d||t;f?u(f):s?s(m):r(void 0,m,h)}}}runSync(t,n){let r=!1,i;return this.run(t,n,a),Ds("runSync","run",r),i;function a(s,u){ks(s),i=u,r=!0}}stringify(t,n){this.freeze();const r=er(n),i=this.compiler||this.Compiler;return ai("stringify",i),Ls(t),i(t,r)}use(t,...n){const r=this.attachers,i=this.namespace;if(si("use",this.frozen),t!=null)if(typeof t=="function")o(t,n);else if(typeof t=="object")Array.isArray(t)?u(t):s(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function a(c){if(typeof c=="function")o(c,[]);else if(typeof c=="object")if(Array.isArray(c)){const[f,...d]=c;o(f,d)}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");u(c.plugins),c.settings&&(i.settings=ei(!0,i.settings,c.settings))}function u(c){let f=-1;if(c!=null)if(Array.isArray(c))for(;++f<c.length;){const d=c[f];a(d)}else throw new TypeError("Expected a list of plugins, not `"+c+"`")}function o(c,f){let d=-1,h=-1;for(;++d<r.length;)if(r[d][0]===c){h=d;break}if(h===-1)r.push([c,...f]);else if(f.length>0){let[m,...b]=f;const A=r[h][1];Ui(A)&&Ui(m)&&(m=ei(!0,A,m)),r[h]=[c,m,...b]}}}}const fp=new Ta().freeze();function ii(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function ai(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function si(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 Ls(e){if(!Ui(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function Ds(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function er(e){return dp(e)?e:new Yo(e)}function dp(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function hp(e){return typeof e=="string"||mp(e)}function mp(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const pp="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",Ps=[],Ms={allowDangerousHtml:!0},gp=/^(https?|ircs?|mailto|xmpp)$/i,bp=[{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 Go(e){const t=e.allowedElements,n=e.allowElement,r=e.children||"",i=e.className,a=e.components,s=e.disallowedElements,u=e.rehypePlugins||Ps,o=e.remarkPlugins||Ps,c=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...Ms}:Ms,f=e.skipHtml,d=e.unwrapDisallowed,h=e.urlTransform||Ep,m=fp().use(J0).use(o).use(qm,c).use(u),b=new Yo;typeof r=="string"&&(b.value=r);for(const S of bp)Object.hasOwn(e,S.from)&&(""+S.from+(S.to?"use `"+S.to+"` instead":"remove it")+pp+S.id,void 0);const A=m.parse(b);let C=m.runSync(A,b);return i&&(C={type:"element",tagName:"div",properties:{className:i},children:C.type==="root"?C.children:[C]}),Dr(C,y),Md(C,{Fragment:_.Fragment,components:a,ignoreInvalidStyle:!0,jsx:_.jsx,jsxs:_.jsxs,passKeys:!0,passNode:!0});function y(S,v,D){if(S.type==="raw"&&D&&typeof v=="number")return f?D.children.splice(v,1):D.children[v]={type:"text",value:S.value},v;if(S.type==="element"){let N;for(N in Qr)if(Object.hasOwn(Qr,N)&&Object.hasOwn(S.properties,N)){const O=S.properties[N],q=Qr[N];(q===null||q.includes(S.tagName))&&(S.properties[N]=h(String(O||""),N,S))}}if(S.type==="element"){let N=t?!t.includes(S.tagName):s?s.includes(S.tagName):!1;if(!N&&n&&typeof v=="number"&&(N=!n(S,v,D)),N&&D&&typeof v=="number")return d&&S.children?D.children.splice(v,1,...S.children):D.children.splice(v,1),v}}}function Ep(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||gp.test(e.slice(0,t))?e:""}const Bs=/[#.]/g;function Tp(e,t){const n=e||"",r={};let i=0,a,s;for(;i<n.length;){Bs.lastIndex=i;const u=Bs.exec(n),o=n.slice(i,u?u.index:n.length);o&&(a?a==="#"?r.id=o:Array.isArray(r.className)?r.className.push(o):r.className=[o]:s=o,i+=o.length),u&&(a=u[0],i++)}return{type:"element",tagName:s||t||"div",properties:r,children:[]}}const xp=new Set(["button","menu","reset","submit"]),zi={}.hasOwnProperty;function Vo(e,t,n){const r=n&&Sp(n);function i(a,s,...u){let o=-1,c;if(a==null){c={type:"root",children:[]};const f=s;u.unshift(f)}else if(c=Tp(a,t),c.tagName=c.tagName.toLowerCase(),r&&zi.call(r,c.tagName)&&(c.tagName=r[c.tagName]),yp(s,c.tagName)){let f;for(f in s)zi.call(s,f)&&Ap(e,c.properties,f,s[f])}else u.unshift(s);for(;++o<u.length;)$i(c.children,u[o]);return c.type==="element"&&c.tagName==="template"&&(c.content={type:"root",children:c.children},c.children=[]),c}return i}function yp(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"?xp.has(e.type.toLowerCase()):!("value"in e)}function Ap(e,t,n,r){const i=vr(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=as(r):i.commaSeparated?s=es(r):i.commaOrSpaceSeparated?s=as(es(r).join(" ")):s=Fs(i,i.property,r):Array.isArray(r)?s=r.concat():s=i.property==="style"?_p(r):String(r);if(Array.isArray(s)){const u=[];for(;++a<s.length;){const o=Fs(i,i.property,s[a]);u[a]=o}s=u}if(i.property==="className"&&Array.isArray(t.className)){const u=s;s=t.className.concat(u)}t[i.property]=s}}function $i(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;)$i(e,t[n]);else if(typeof t=="object"&&"type"in t)t.type==="root"?$i(e,t.children):e.push(t);else throw new Error("Expected node, nodes, or string, got `"+t+"`")}function Fs(e,t,n){if(typeof n=="string"){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===""||Pn(n)===Pn(t)))return!0}return n}function _p(e){const t=[];let n;for(n in e)zi.call(e,n)&&t.push([n,e[n]].join(": "));return t.join("; ")}function Sp(e){const t={};let n=-1;for(;++n<e.length;)t[e[n].toLowerCase()]=e[n];return t}const Cp=["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"],wp=Vo(zn,"div"),vp=Vo(Dt,"g",Cp);function Ip(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 u=n[s];if(u===void 0){const o=Hs(t,n[s-1]);u=o===-1?t.length+1:o+1,n[s]=u}if(u>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 u=n[n.length-1],o=Hs(t,u),c=o===-1?t.length+1:o+1;if(u===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 Hs(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 jt={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/"},qo={}.hasOwnProperty,Np=Object.prototype;function kp(e,t){const n=t||{};return xa({file:n.file||void 0,location:!1,schema:n.space==="svg"?Dt:zn,verbose:n.verbose||!1},e)}function xa(e,t){let n;switch(t.nodeName){case"#comment":{const r=t;return n={type:"comment",value:r.data},or(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:Wo(e,t.childNodes),data:{quirksMode:i}},e.file&&e.location){const a=String(e.file),s=Ip(a),u=s.toPoint(0),o=s.toPoint(a.length);n.position={start:u,end:o}}return n}case"#documentType":{const r=t;return n={type:"doctype"},or(e,r,n),n}case"#text":{const r=t;return n={type:"text",value:r.value},or(e,r,n),n}default:return n=Op(e,t),n}}function Wo(e,t){let n=-1;const r=[];for(;++n<t.length;){const i=xa(e,t[n]);r.push(i)}return r}function Op(e,t){const n=e.schema;e.schema=t.namespaceURI===jt.svg?Dt:zn;let r=-1;const i={};for(;++r<t.attrs.length;){const u=t.attrs[r],o=(u.prefix?u.prefix+":":"")+u.name;qo.call(Np,o)||(i[o]=u.value)}const s=(e.schema.space==="svg"?vp:wp)(t.tagName,i,Wo(e,t.childNodes));if(or(e,t,s),s.tagName==="template"){const u=t,o=u.sourceCodeLocation,c=o&&o.startTag&&an(o.startTag),f=o&&o.endTag&&an(o.endTag),d=xa(e,u.content);c&&f&&e.file&&(d.position={start:c.end,end:f.start}),s.content=d}return e.schema=n,s}function or(e,t,n){if("sourceCodeLocation"in t&&t.sourceCodeLocation&&e.file){const r=Rp(e,n,t.sourceCodeLocation);r&&(e.location=!0,n.position=r)}}function Rp(e,t,n){const r=an(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)qo.call(n.attrs,s)&&(a[vr(e.schema,s).property]=an(n.attrs[s]));n.startTag;const u=an(n.startTag),o=n.endTag?an(n.endTag):void 0,c={opening:u};o&&(c.closing=o),c.properties=a,t.data={position:c}}}return r}function an(e){const t=Us({line:e.startLine,column:e.startCol,offset:e.startOffset}),n=Us({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||n?{start:t,end:n}:void 0}function Us(e){return e.line&&e.column?e:void 0}const js={}.hasOwnProperty;function Xo(e,t){const n=t||{};function r(i,...a){let s=r.invalid;const u=r.handlers;if(i&&js.call(i,e)){const o=String(i[e]);s=js.call(u,o)?u[o]: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 Lp={},Dp={}.hasOwnProperty,Qo=Xo("type",{handlers:{root:Mp,element:jp,text:Hp,comment:Up,doctype:Fp}});function Pp(e,t){const r=(t||Lp).space;return Qo(e,r==="svg"?Dt:zn)}function Mp(e,t){const n={nodeName:"#document",mode:(e.data||{}).quirksMode?"quirks":"no-quirks",childNodes:[]};return n.childNodes=ya(e.children,n,t),gn(e,n),n}function Bp(e,t){const n={nodeName:"#document-fragment",childNodes:[]};return n.childNodes=ya(e.children,n,t),gn(e,n),n}function Fp(e){const t={nodeName:"#documentType",name:"html",publicId:"",systemId:"",parentNode:null};return gn(e,t),t}function Hp(e){const t={nodeName:"#text",value:e.value,parentNode:null};return gn(e,t),t}function Up(e){const t={nodeName:"#comment",data:e.value,parentNode:null};return gn(e,t),t}function jp(e,t){const n=t;let r=n;e.type==="element"&&e.tagName.toLowerCase()==="svg"&&n.space==="html"&&(r=Dt);const i=[];let a;if(e.properties){for(a in e.properties)if(a!=="children"&&Dp.call(e.properties,a)){const o=zp(r,a,e.properties[a]);o&&i.push(o)}}const s=r.space,u={nodeName:e.tagName,tagName:e.tagName,attrs:i,namespaceURI:jt[s],childNodes:[],parentNode:null};return u.childNodes=ya(e.children,u,r),gn(e,u),e.tagName==="template"&&e.content&&(u.content=Bp(e.content,r)),u}function zp(e,t,n){const r=vr(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?uo(n):bo(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=jt[r.space]}return i}function ya(e,t,n){let r=-1;const i=[];if(e)for(;++r<e.length;){const a=Qo(e[r],n);a.parentNode=t,i.push(a)}return i}function gn(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 $p=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"],Yp=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]),ke="�";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 qe={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function Ko(e){return e>=55296&&e<=57343}function Gp(e){return e>=56320&&e<=57343}function Vp(e,t){return(e-55296)*1024+9216+t}function Zo(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function Jo(e){return e>=64976&&e<=65007||Yp.has(e)}var L;(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"})(L||(L={}));const qp=65536;class Wp{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=qp,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,u=a+n;return{code:t,startLine:r,endLine:r,startCol:s,endCol:s,startOffset:u,endOffset:u}}_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(Gp(n))return this.pos++,this._addGap(),Vp(t,n)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,g.EOF;return this._err(L.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,Ko(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){Zo(t)?this._err(L.controlCharacterInInputStream):Jo(t)&&this._err(L.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 el(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 tl=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))),Xp=new Uint16Array("Ȁaglq \x1Bɭ\0\0p;䀦os;䀧t;䀾t;䀼uot;䀢".split("").map(e=>e.charCodeAt(0)));var ui;const Qp=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]]),Kp=(ui=String.fromCodePoint)!==null&&ui!==void 0?ui: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 Zp(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=Qp.get(e))!==null&&t!==void 0?t:e}var He;(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"})(He||(He={}));const Jp=32;var Ot;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(Ot||(Ot={}));function Yi(e){return e>=He.ZERO&&e<=He.NINE}function eg(e){return e>=He.UPPER_A&&e<=He.UPPER_F||e>=He.LOWER_A&&e<=He.LOWER_F}function tg(e){return e>=He.UPPER_A&&e<=He.UPPER_Z||e>=He.LOWER_A&&e<=He.LOWER_Z||Yi(e)}function ng(e){return e===He.EQUALS||tg(e)}var Fe;(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"})(Fe||(Fe={}));var _t;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(_t||(_t={}));class nl{constructor(t,n,r){this.decodeTree=t,this.emitCodePoint=n,this.errors=r,this.state=Fe.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=_t.Strict}startEntity(t){this.decodeMode=t,this.state=Fe.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,n){switch(this.state){case Fe.EntityStart:return t.charCodeAt(n)===He.NUM?(this.state=Fe.NumericStart,this.consumed+=1,this.stateNumericStart(t,n+1)):(this.state=Fe.NamedEntity,this.stateNamedEntity(t,n));case Fe.NumericStart:return this.stateNumericStart(t,n);case Fe.NumericDecimal:return this.stateNumericDecimal(t,n);case Fe.NumericHex:return this.stateNumericHex(t,n);case Fe.NamedEntity:return this.stateNamedEntity(t,n)}}stateNumericStart(t,n){return n>=t.length?-1:(t.charCodeAt(n)|Jp)===He.LOWER_X?(this.state=Fe.NumericHex,this.consumed+=1,this.stateNumericHex(t,n+1)):(this.state=Fe.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(Yi(i)||eg(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(Yi(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===He.SEMI)this.consumed+=1;else if(this.decodeMode===_t.Strict)return 0;return this.emitCodePoint(Zp(this.result),this.consumed),this.errors&&(t!==He.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&Ot.VALUE_LENGTH)>>14;for(;n<t.length;n++,this.excess++){const s=t.charCodeAt(n);if(this.treeIndex=rg(r,i,this.treeIndex+Math.max(1,a),s),this.treeIndex<0)return this.result===0||this.decodeMode===_t.Attribute&&(a===0||ng(s))?0:this.emitNotTerminatedNamedEntity();if(i=r[this.treeIndex],a=(i&Ot.VALUE_LENGTH)>>14,a!==0){if(s===He.SEMI)return this.emitNamedEntityData(this.treeIndex,a,this.consumed+this.excess);this.decodeMode!==_t.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]&Ot.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]&~Ot.VALUE_LENGTH:i[t+1],r),n===3&&this.emitCodePoint(i[t+2],r),r}end(){var t;switch(this.state){case Fe.NamedEntity:return this.result!==0&&(this.decodeMode!==_t.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case Fe.NumericDecimal:return this.emitNumericEntity(0,2);case Fe.NumericHex:return this.emitNumericEntity(0,3);case Fe.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case Fe.EntityStart:return 0}}}function rl(e){let t="";const n=new nl(e,r=>t+=Kp(r));return function(i,a){let s=0,u=0;for(;(u=i.indexOf("&",u))>=0;){t+=i.slice(s,u),n.startEntity(a);const c=n.write(i,u+1);if(c<0){s=u+n.end();break}s=u+c,u=c===0?s+1:s}const o=t+i.slice(s);return t="",o}}function rg(e,t,n,r){const i=(t&Ot.BRANCH_LENGTH)>>7,a=t&Ot.JUMP_TABLE;if(i===0)return a!==0&&r===a?n:-1;if(a){const o=r-a;return o<0||o>=i?-1:e[n+o]-1}let s=n,u=s+i-1;for(;s<=u;){const o=s+u>>>1,c=e[o];if(c<r)s=o+1;else if(c>r)u=o-1;else return e[o+i]}return-1}rl(tl);rl(Xp);var P;(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/"})(P||(P={}));var zt;(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"})(zt||(zt={}));var et;(function(e){e.NO_QUIRKS="no-quirks",e.QUIRKS="quirks",e.LIMITED_QUIRKS="limited-quirks"})(et||(et={}));var I;(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"})(I||(I={}));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 ig=new Map([[I.A,l.A],[I.ADDRESS,l.ADDRESS],[I.ANNOTATION_XML,l.ANNOTATION_XML],[I.APPLET,l.APPLET],[I.AREA,l.AREA],[I.ARTICLE,l.ARTICLE],[I.ASIDE,l.ASIDE],[I.B,l.B],[I.BASE,l.BASE],[I.BASEFONT,l.BASEFONT],[I.BGSOUND,l.BGSOUND],[I.BIG,l.BIG],[I.BLOCKQUOTE,l.BLOCKQUOTE],[I.BODY,l.BODY],[I.BR,l.BR],[I.BUTTON,l.BUTTON],[I.CAPTION,l.CAPTION],[I.CENTER,l.CENTER],[I.CODE,l.CODE],[I.COL,l.COL],[I.COLGROUP,l.COLGROUP],[I.DD,l.DD],[I.DESC,l.DESC],[I.DETAILS,l.DETAILS],[I.DIALOG,l.DIALOG],[I.DIR,l.DIR],[I.DIV,l.DIV],[I.DL,l.DL],[I.DT,l.DT],[I.EM,l.EM],[I.EMBED,l.EMBED],[I.FIELDSET,l.FIELDSET],[I.FIGCAPTION,l.FIGCAPTION],[I.FIGURE,l.FIGURE],[I.FONT,l.FONT],[I.FOOTER,l.FOOTER],[I.FOREIGN_OBJECT,l.FOREIGN_OBJECT],[I.FORM,l.FORM],[I.FRAME,l.FRAME],[I.FRAMESET,l.FRAMESET],[I.H1,l.H1],[I.H2,l.H2],[I.H3,l.H3],[I.H4,l.H4],[I.H5,l.H5],[I.H6,l.H6],[I.HEAD,l.HEAD],[I.HEADER,l.HEADER],[I.HGROUP,l.HGROUP],[I.HR,l.HR],[I.HTML,l.HTML],[I.I,l.I],[I.IMG,l.IMG],[I.IMAGE,l.IMAGE],[I.INPUT,l.INPUT],[I.IFRAME,l.IFRAME],[I.KEYGEN,l.KEYGEN],[I.LABEL,l.LABEL],[I.LI,l.LI],[I.LINK,l.LINK],[I.LISTING,l.LISTING],[I.MAIN,l.MAIN],[I.MALIGNMARK,l.MALIGNMARK],[I.MARQUEE,l.MARQUEE],[I.MATH,l.MATH],[I.MENU,l.MENU],[I.META,l.META],[I.MGLYPH,l.MGLYPH],[I.MI,l.MI],[I.MO,l.MO],[I.MN,l.MN],[I.MS,l.MS],[I.MTEXT,l.MTEXT],[I.NAV,l.NAV],[I.NOBR,l.NOBR],[I.NOFRAMES,l.NOFRAMES],[I.NOEMBED,l.NOEMBED],[I.NOSCRIPT,l.NOSCRIPT],[I.OBJECT,l.OBJECT],[I.OL,l.OL],[I.OPTGROUP,l.OPTGROUP],[I.OPTION,l.OPTION],[I.P,l.P],[I.PARAM,l.PARAM],[I.PLAINTEXT,l.PLAINTEXT],[I.PRE,l.PRE],[I.RB,l.RB],[I.RP,l.RP],[I.RT,l.RT],[I.RTC,l.RTC],[I.RUBY,l.RUBY],[I.S,l.S],[I.SCRIPT,l.SCRIPT],[I.SEARCH,l.SEARCH],[I.SECTION,l.SECTION],[I.SELECT,l.SELECT],[I.SOURCE,l.SOURCE],[I.SMALL,l.SMALL],[I.SPAN,l.SPAN],[I.STRIKE,l.STRIKE],[I.STRONG,l.STRONG],[I.STYLE,l.STYLE],[I.SUB,l.SUB],[I.SUMMARY,l.SUMMARY],[I.SUP,l.SUP],[I.TABLE,l.TABLE],[I.TBODY,l.TBODY],[I.TEMPLATE,l.TEMPLATE],[I.TEXTAREA,l.TEXTAREA],[I.TFOOT,l.TFOOT],[I.TD,l.TD],[I.TH,l.TH],[I.THEAD,l.THEAD],[I.TITLE,l.TITLE],[I.TR,l.TR],[I.TRACK,l.TRACK],[I.TT,l.TT],[I.U,l.U],[I.UL,l.UL],[I.SVG,l.SVG],[I.VAR,l.VAR],[I.WBR,l.WBR],[I.XMP,l.XMP]]);function bn(e){var t;return(t=ig.get(e))!==null&&t!==void 0?t:l.UNKNOWN}const M=l,ag={[P.HTML]:new Set([M.ADDRESS,M.APPLET,M.AREA,M.ARTICLE,M.ASIDE,M.BASE,M.BASEFONT,M.BGSOUND,M.BLOCKQUOTE,M.BODY,M.BR,M.BUTTON,M.CAPTION,M.CENTER,M.COL,M.COLGROUP,M.DD,M.DETAILS,M.DIR,M.DIV,M.DL,M.DT,M.EMBED,M.FIELDSET,M.FIGCAPTION,M.FIGURE,M.FOOTER,M.FORM,M.FRAME,M.FRAMESET,M.H1,M.H2,M.H3,M.H4,M.H5,M.H6,M.HEAD,M.HEADER,M.HGROUP,M.HR,M.HTML,M.IFRAME,M.IMG,M.INPUT,M.LI,M.LINK,M.LISTING,M.MAIN,M.MARQUEE,M.MENU,M.META,M.NAV,M.NOEMBED,M.NOFRAMES,M.NOSCRIPT,M.OBJECT,M.OL,M.P,M.PARAM,M.PLAINTEXT,M.PRE,M.SCRIPT,M.SECTION,M.SELECT,M.SOURCE,M.STYLE,M.SUMMARY,M.TABLE,M.TBODY,M.TD,M.TEMPLATE,M.TEXTAREA,M.TFOOT,M.TH,M.THEAD,M.TITLE,M.TR,M.TRACK,M.UL,M.WBR,M.XMP]),[P.MATHML]:new Set([M.MI,M.MO,M.MN,M.MS,M.MTEXT,M.ANNOTATION_XML]),[P.SVG]:new Set([M.TITLE,M.FOREIGN_OBJECT,M.DESC]),[P.XLINK]:new Set,[P.XML]:new Set,[P.XMLNS]:new Set},Gi=new Set([M.H1,M.H2,M.H3,M.H4,M.H5,M.H6]);I.STYLE,I.SCRIPT,I.XMP,I.IFRAME,I.NOEMBED,I.NOFRAMES,I.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 De={DATA:E.DATA,RCDATA:E.RCDATA,RAWTEXT:E.RAWTEXT,SCRIPT_DATA:E.SCRIPT_DATA,PLAINTEXT:E.PLAINTEXT,CDATA_SECTION:E.CDATA_SECTION};function sg(e){return e>=g.DIGIT_0&&e<=g.DIGIT_9}function Cn(e){return e>=g.LATIN_CAPITAL_A&&e<=g.LATIN_CAPITAL_Z}function ug(e){return e>=g.LATIN_SMALL_A&&e<=g.LATIN_SMALL_Z}function Nt(e){return ug(e)||Cn(e)}function zs(e){return Nt(e)||sg(e)}function tr(e){return e+32}function il(e){return e===g.SPACE||e===g.LINE_FEED||e===g.TABULATION||e===g.FORM_FEED}function $s(e){return il(e)||e===g.SOLIDUS||e===g.GREATER_THAN_SIGN}function og(e){return e===g.NULL?L.nullCharacterReference:e>1114111?L.characterReferenceOutsideUnicodeRange:Ko(e)?L.surrogateCharacterReference:Jo(e)?L.noncharacterCharacterReference:Zo(e)||e===g.CARRIAGE_RETURN?L.controlCharacterReference:null}class lg{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 Wp(n),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new nl(tl,(r,i)=>{this.preprocessor.pos=this.entityStartPos+i-1,this._flushCodePointConsumedAsCharacterReference(r)},n.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(L.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:r=>{this._err(L.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+r)},validateNumericCharacterReference:r=>{const i=og(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(el(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(L.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=bn(t.tagName),t.type===ce.START_TAG?(this.lastStartTagName=t.tagName,this.handler.onStartTag(t)):(t.attrs.length>0&&this._err(L.endTagWithAttributes),t.selfClosing&&this._err(L.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=il(t)?ce.WHITESPACE_CHARACTER:t===g.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()?_t.Attribute:_t.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(L.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(L.unexpectedNullCharacter),this._emitChars(ke);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(L.unexpectedNullCharacter),this._emitChars(ke);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(L.unexpectedNullCharacter),this._emitChars(ke);break}case g.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_statePlaintext(t){switch(t){case g.NULL:{this._err(L.unexpectedNullCharacter),this._emitChars(ke);break}case g.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateTagOpen(t){if(Nt(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(L.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=E.BOGUS_COMMENT,this._stateBogusComment(t);break}case g.EOF:{this._err(L.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break}default:this._err(L.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=E.DATA,this._stateData(t)}}_stateEndTagOpen(t){if(Nt(t))this._createEndTagToken(),this.state=E.TAG_NAME,this._stateTagName(t);else switch(t){case g.GREATER_THAN_SIGN:{this._err(L.missingEndTagName),this.state=E.DATA;break}case g.EOF:{this._err(L.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break}default:this._err(L.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(L.unexpectedNullCharacter),n.tagName+=ke;break}case g.EOF:{this._err(L.eofInTag),this._emitEOFToken();break}default:n.tagName+=String.fromCodePoint(Cn(t)?tr(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){Nt(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){Nt(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){Nt(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(L.unexpectedNullCharacter),this._emitChars(ke);break}case g.EOF:{this._err(L.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(L.unexpectedNullCharacter),this.state=E.SCRIPT_DATA_ESCAPED,this._emitChars(ke);break}case g.EOF:{this._err(L.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(L.unexpectedNullCharacter),this.state=E.SCRIPT_DATA_ESCAPED,this._emitChars(ke);break}case g.EOF:{this._err(L.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:Nt(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){Nt(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(qe.SCRIPT,!1)&&$s(this.preprocessor.peek(qe.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<qe.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(L.unexpectedNullCharacter),this._emitChars(ke);break}case g.EOF:{this._err(L.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(L.unexpectedNullCharacter),this.state=E.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(ke);break}case g.EOF:{this._err(L.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(L.unexpectedNullCharacter),this.state=E.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(ke);break}case g.EOF:{this._err(L.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(qe.SCRIPT,!1)&&$s(this.preprocessor.peek(qe.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<qe.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(L.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(L.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(t);break}case g.NULL:{this._err(L.unexpectedNullCharacter),this.currentAttr.name+=ke;break}default:this.currentAttr.name+=String.fromCodePoint(Cn(t)?tr(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(L.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(L.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(L.unexpectedNullCharacter),this.currentAttr.value+=ke;break}case g.EOF:{this._err(L.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(L.unexpectedNullCharacter),this.currentAttr.value+=ke;break}case g.EOF:{this._err(L.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(L.unexpectedNullCharacter),this.currentAttr.value+=ke;break}case g.QUOTATION_MARK:case g.APOSTROPHE:case g.LESS_THAN_SIGN:case g.EQUALS_SIGN:case g.GRAVE_ACCENT:{this._err(L.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(t);break}case g.EOF:{this._err(L.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(L.eofInTag),this._emitEOFToken();break}default:this._err(L.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(L.eofInTag),this._emitEOFToken();break}default:this._err(L.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(L.unexpectedNullCharacter),n.data+=ke;break}default:n.data+=String.fromCodePoint(t)}}_stateMarkupDeclarationOpen(t){this._consumeSequenceIfMatch(qe.DASH_DASH,!0)?(this._createCommentToken(qe.DASH_DASH.length+1),this.state=E.COMMENT_START):this._consumeSequenceIfMatch(qe.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(qe.DOCTYPE.length+1),this.state=E.DOCTYPE):this._consumeSequenceIfMatch(qe.CDATA_START,!0)?this.inForeignNode?this.state=E.CDATA_SECTION:(this._err(L.cdataInHtmlContent),this._createCommentToken(qe.CDATA_START.length+1),this.currentToken.data="[CDATA[",this.state=E.BOGUS_COMMENT):this._ensureHibernation()||(this._err(L.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(L.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(L.abruptClosingOfEmptyComment),this.state=E.DATA,this.emitCurrentComment(n);break}case g.EOF:{this._err(L.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(L.unexpectedNullCharacter),n.data+=ke;break}case g.EOF:{this._err(L.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(L.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(L.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(L.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(L.incorrectlyClosedComment),this.state=E.DATA,this.emitCurrentComment(n);break}case g.EOF:{this._err(L.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(L.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(L.missingWhitespaceBeforeDoctypeName),this.state=E.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t)}}_stateBeforeDoctypeName(t){if(Cn(t))this._createDoctypeToken(String.fromCharCode(tr(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(L.unexpectedNullCharacter),this._createDoctypeToken(ke),this.state=E.DOCTYPE_NAME;break}case g.GREATER_THAN_SIGN:{this._err(L.missingDoctypeName),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=E.DATA;break}case g.EOF:{this._err(L.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(L.unexpectedNullCharacter),n.name+=ke;break}case g.EOF:{this._err(L.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.name+=String.fromCodePoint(Cn(t)?tr(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(L.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._consumeSequenceIfMatch(qe.PUBLIC,!1)?this.state=E.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(qe.SYSTEM,!1)?this.state=E.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(L.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(L.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=E.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case g.APOSTROPHE:{this._err(L.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=E.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case g.GREATER_THAN_SIGN:{this._err(L.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=E.DATA,this.emitCurrentDoctype(n);break}case g.EOF:{this._err(L.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(L.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(L.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=E.DATA,this.emitCurrentDoctype(n);break}case g.EOF:{this._err(L.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(L.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(L.unexpectedNullCharacter),n.publicId+=ke;break}case g.GREATER_THAN_SIGN:{this._err(L.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=E.DATA;break}case g.EOF:{this._err(L.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(L.unexpectedNullCharacter),n.publicId+=ke;break}case g.GREATER_THAN_SIGN:{this._err(L.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=E.DATA;break}case g.EOF:{this._err(L.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(L.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=E.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case g.APOSTROPHE:{this._err(L.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=E.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case g.EOF:{this._err(L.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(L.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(L.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(L.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(L.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=E.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case g.APOSTROPHE:{this._err(L.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=E.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case g.GREATER_THAN_SIGN:{this._err(L.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=E.DATA,this.emitCurrentDoctype(n);break}case g.EOF:{this._err(L.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(L.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(L.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=E.DATA,this.emitCurrentDoctype(n);break}case g.EOF:{this._err(L.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(L.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(L.unexpectedNullCharacter),n.systemId+=ke;break}case g.GREATER_THAN_SIGN:{this._err(L.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=E.DATA;break}case g.EOF:{this._err(L.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(L.unexpectedNullCharacter),n.systemId+=ke;break}case g.GREATER_THAN_SIGN:{this._err(L.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=E.DATA;break}case g.EOF:{this._err(L.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(L.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(L.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(L.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(L.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()&&zs(this.preprocessor.peek(1))?E.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(t){zs(t)?this._flushCodePointConsumedAsCharacterReference(t):(t===g.SEMICOLON&&this._err(L.unknownNamedCharacterReference),this.state=this.returnState,this._callState(t))}}const al=new Set([l.DD,l.DT,l.LI,l.OPTGROUP,l.OPTION,l.P,l.RB,l.RP,l.RT,l.RTC]),Ys=new Set([...al,l.CAPTION,l.COLGROUP,l.TBODY,l.TD,l.TFOOT,l.TH,l.THEAD,l.TR]),mr=new Set([l.APPLET,l.CAPTION,l.HTML,l.MARQUEE,l.OBJECT,l.TABLE,l.TD,l.TEMPLATE,l.TH]),cg=new Set([...mr,l.OL,l.UL]),fg=new Set([...mr,l.BUTTON]),Gs=new Set([l.ANNOTATION_XML,l.MI,l.MN,l.MO,l.MS,l.MTEXT]),Vs=new Set([l.DESC,l.FOREIGN_OBJECT,l.TITLE]),dg=new Set([l.TR,l.TEMPLATE,l.HTML]),hg=new Set([l.TBODY,l.TFOOT,l.THEAD,l.TEMPLATE,l.HTML]),mg=new Set([l.TABLE,l.TEMPLATE,l.HTML]),pg=new Set([l.TD,l.TH]);class gg{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)===P.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])!==P.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(Gi,P.HTML)}popUntilTableCellPopped(){this.popUntilPopped(pg,P.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(mg,P.HTML)}clearBackToTableBodyContext(){this.clearBackTo(hg,P.HTML)}clearBackToTableRowContext(){this.clearBackTo(dg,P.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 P.HTML:{if(i===t)return!0;if(n.has(i))return!1;break}case P.SVG:{if(Vs.has(i))return!1;break}case P.MATHML:{if(Gs.has(i))return!1;break}}}return!0}hasInScope(t){return this.hasInDynamicScope(t,mr)}hasInListItemScope(t){return this.hasInDynamicScope(t,cg)}hasInButtonScope(t){return this.hasInDynamicScope(t,fg)}hasNumberedHeaderInScope(){for(let t=this.stackTop;t>=0;t--){const n=this.tagIDs[t];switch(this.treeAdapter.getNamespaceURI(this.items[t])){case P.HTML:{if(Gi.has(n))return!0;if(mr.has(n))return!1;break}case P.SVG:{if(Vs.has(n))return!1;break}case P.MATHML:{if(Gs.has(n))return!1;break}}}return!0}hasInTableScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===P.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])===P.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])===P.HTML)switch(this.tagIDs[n]){case t:return!0;case l.OPTION:case l.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;al.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;Ys.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(t){for(;this.currentTagId!==t&&Ys.has(this.currentTagId);)this.pop()}}const oi=3;var gt;(function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"})(gt||(gt={}));const qs={type:gt.Marker};class bg{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 u=0;u<this.entries.length;u++){const o=this.entries[u];if(o.type===gt.Marker)break;const{element:c}=o;if(this.treeAdapter.getTagName(c)===a&&this.treeAdapter.getNamespaceURI(c)===s){const f=this.treeAdapter.getAttrList(c);f.length===i&&r.push({idx:u,attrs:f})}}return r}_ensureNoahArkCondition(t){if(this.entries.length<oi)return;const n=this.treeAdapter.getAttrList(t),r=this._getNoahArkConditionCandidates(t,n);if(r.length<oi)return;const i=new Map(n.map(s=>[s.name,s.value]));let a=0;for(let s=0;s<r.length;s++){const u=r[s];u.attrs.every(o=>i.get(o.name)===o.value)&&(a+=1,a>=oi&&this.entries.splice(u.idx,1))}}insertMarker(){this.entries.unshift(qs)}pushElement(t,n){this._ensureNoahArkCondition(t),this.entries.unshift({type:gt.Element,element:t,token:n})}insertElementAfterBookmark(t,n){const r=this.entries.indexOf(this.bookmark);this.entries.splice(r,0,{type:gt.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(qs);t>=0?this.entries.splice(0,t+1):this.entries.length=0}getElementEntryInScopeWithTagName(t){const n=this.entries.find(r=>r.type===gt.Marker||this.treeAdapter.getTagName(r.element)===t);return n&&n.type===gt.Element?n:null}getElementEntry(t){return this.entries.find(n=>n.type===gt.Element&&n.element===t)}}const kt={createDocument(){return{nodeName:"#document",mode:et.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};kt.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(kt.isTextNode(n)){n.value+=t;return}}kt.appendChild(e,kt.createTextNode(t))},insertTextBefore(e,t,n){const r=e.childNodes[e.childNodes.indexOf(n)-1];r&&kt.isTextNode(r)?r.value+=t:kt.insertBefore(e,kt.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}}},sl="html",Eg="about:legacy-compat",Tg="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",ul=["+//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//"],xg=[...ul,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],yg=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),ol=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],Ag=[...ol,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function Ws(e,t){return t.some(n=>e.startsWith(n))}function _g(e){return e.name===sl&&e.publicId===null&&(e.systemId===null||e.systemId===Eg)}function Sg(e){if(e.name!==sl)return et.QUIRKS;const{systemId:t}=e;if(t&&t.toLowerCase()===Tg)return et.QUIRKS;let{publicId:n}=e;if(n!==null){if(n=n.toLowerCase(),yg.has(n))return et.QUIRKS;let r=t===null?xg:ul;if(Ws(n,r))return et.QUIRKS;if(r=t===null?ol:Ag,Ws(n,r))return et.LIMITED_QUIRKS}return et.NO_QUIRKS}const Xs={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},Cg="definitionurl",wg="definitionURL",vg=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])),Ig=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:P.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:P.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:P.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:P.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:P.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:P.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:P.XLINK}],["xml:lang",{prefix:"xml",name:"lang",namespace:P.XML}],["xml:space",{prefix:"xml",name:"space",namespace:P.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:P.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:P.XMLNS}]]),Ng=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])),kg=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 Og(e){const t=e.tagID;return t===l.FONT&&e.attrs.some(({name:r})=>r===zt.COLOR||r===zt.SIZE||r===zt.FACE)||kg.has(t)}function ll(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===Cg){e.attrs[t].name=wg;break}}function cl(e){for(let t=0;t<e.attrs.length;t++){const n=vg.get(e.attrs[t].name);n!=null&&(e.attrs[t].name=n)}}function Aa(e){for(let t=0;t<e.attrs.length;t++){const n=Ig.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 Rg(e){const t=Ng.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=bn(e.tagName))}function Lg(e,t){return t===P.MATHML&&(e===l.MI||e===l.MO||e===l.MN||e===l.MS||e===l.MTEXT)}function Dg(e,t,n){if(t===P.MATHML&&e===l.ANNOTATION_XML){for(let r=0;r<n.length;r++)if(n[r].name===zt.ENCODING){const i=n[r].value.toLowerCase();return i===Xs.TEXT_HTML||i===Xs.APPLICATION_XML}}return t===P.SVG&&(e===l.FOREIGN_OBJECT||e===l.DESC||e===l.TITLE)}function Pg(e,t,n,r){return(!r||r===P.HTML)&&Dg(e,t,n)||(!r||r===P.MATHML)&&Lg(e,t)}const Mg="hidden",Bg=8,Fg=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 Hg={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},fl=new Set([l.TABLE,l.TBODY,l.TFOOT,l.THEAD,l.TR]),Qs={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:kt,onParseError:null};class Ks{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={...Qs,...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 lg(this.options,this),this.activeFormattingElements=new bg(this.treeAdapter),this.fragmentContextID=r?bn(this.treeAdapter.getTagName(r)):l.UNKNOWN,this._setContextModes(r??this.document,this.fragmentContextID),this.openElements=new gg(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={...Qs,...n};t??(t=r.treeAdapter.createElement(I.TEMPLATE,P.HTML,[]));const i=r.treeAdapter.createElement("documentmock",P.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:Hg,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)===P.HTML;this.currentNotInHTML=!r,this.tokenizer.inForeignNode=!r&&!this._isIntegrationPoint(n,t)}_switchToTextParsing(t,n){this._insertElement(t,P.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=De.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)===I.FORM){this.formElement=t;break}t=this.treeAdapter.getParentNode(t)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==P.HTML))switch(this.fragmentContextID){case l.TITLE:case l.TEXTAREA:{this.tokenizer.state=De.RCDATA;break}case l.STYLE:case l.XMP:case l.IFRAME:case l.NOEMBED:case l.NOFRAMES:case l.NOSCRIPT:{this.tokenizer.state=De.RAWTEXT;break}case l.SCRIPT:{this.tokenizer.state=De.SCRIPT_DATA;break}case l.PLAINTEXT:{this.tokenizer.state=De.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(u=>this.treeAdapter.isDocumentTypeNode(u));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,P.HTML,[]);this._attachElementToTree(r,null),this.openElements.push(r,n)}_insertTemplate(t){const n=this.treeAdapter.createElement(t.tagName,P.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(I.HTML,P.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:o,endCol:c,endOffset:f}=t.location;this.treeAdapter.updateNodeSourceCodeLocation(s,{endLine:o,endCol:c,endOffset:f})}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)===I.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(n)===P.MATHML?!1:this.tokenizer.inForeignNode||(t.tagID===l.MGLYPH||t.tagID===l.MALIGNMARK)&&!this._isIntegrationPoint(r,n,P.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 Pg(t,i,a,r)}_reconstructActiveFormattingElements(){const t=this.activeFormattingElements.entries.length;if(t){const n=this.activeFormattingElements.entries.findIndex(i=>i.type===gt.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 fl.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)===P.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 ag[r].has(n)}onCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){pb(this,t);return}switch(this.insertionMode){case x.INITIAL:{yn(this,t);break}case x.BEFORE_HTML:{Nn(this,t);break}case x.BEFORE_HEAD:{kn(this,t);break}case x.IN_HEAD:{On(this,t);break}case x.IN_HEAD_NO_SCRIPT:{Rn(this,t);break}case x.AFTER_HEAD:{Ln(this,t);break}case x.IN_BODY:case x.IN_CAPTION:case x.IN_CELL:case x.IN_TEMPLATE:{hl(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:{li(this,t);break}case x.IN_TABLE_TEXT:{Tl(this,t);break}case x.IN_COLUMN_GROUP:{pr(this,t);break}case x.AFTER_BODY:{gr(this,t);break}case x.AFTER_AFTER_BODY:{lr(this,t);break}}}onNullCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){mb(this,t);return}switch(this.insertionMode){case x.INITIAL:{yn(this,t);break}case x.BEFORE_HTML:{Nn(this,t);break}case x.BEFORE_HEAD:{kn(this,t);break}case x.IN_HEAD:{On(this,t);break}case x.IN_HEAD_NO_SCRIPT:{Rn(this,t);break}case x.AFTER_HEAD:{Ln(this,t);break}case x.TEXT:{this._insertCharacters(t);break}case x.IN_TABLE:case x.IN_TABLE_BODY:case x.IN_ROW:{li(this,t);break}case x.IN_COLUMN_GROUP:{pr(this,t);break}case x.AFTER_BODY:{gr(this,t);break}case x.AFTER_AFTER_BODY:{lr(this,t);break}}}onComment(t){if(this.skipNextNewLine=!1,this.currentNotInHTML){Vi(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:{Vi(this,t);break}case x.IN_TABLE_TEXT:{An(this,t);break}case x.AFTER_BODY:{Vg(this,t);break}case x.AFTER_AFTER_BODY:case x.AFTER_AFTER_FRAMESET:{qg(this,t);break}}}onDoctype(t){switch(this.skipNextNewLine=!1,this.insertionMode){case x.INITIAL:{Wg(this,t);break}case x.BEFORE_HEAD:case x.IN_HEAD:case x.IN_HEAD_NO_SCRIPT:case x.AFTER_HEAD:{this._err(t,L.misplacedDoctype);break}case x.IN_TABLE_TEXT:{An(this,t);break}}}onStartTag(t){this.skipNextNewLine=!1,this.currentToken=t,this._processStartTag(t),t.selfClosing&&!t.ackSelfClosing&&this._err(t,L.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(t){this.shouldProcessStartTagTokenInForeignContent(t)?gb(this,t):this._startTagOutsideForeignContent(t)}_startTagOutsideForeignContent(t){switch(this.insertionMode){case x.INITIAL:{yn(this,t);break}case x.BEFORE_HTML:{Xg(this,t);break}case x.BEFORE_HEAD:{Kg(this,t);break}case x.IN_HEAD:{lt(this,t);break}case x.IN_HEAD_NO_SCRIPT:{e1(this,t);break}case x.AFTER_HEAD:{n1(this,t);break}case x.IN_BODY:{ze(this,t);break}case x.IN_TABLE:{cn(this,t);break}case x.IN_TABLE_TEXT:{An(this,t);break}case x.IN_CAPTION:{Z1(this,t);break}case x.IN_COLUMN_GROUP:{Ca(this,t);break}case x.IN_TABLE_BODY:{Br(this,t);break}case x.IN_ROW:{Fr(this,t);break}case x.IN_CELL:{tb(this,t);break}case x.IN_SELECT:{Al(this,t);break}case x.IN_SELECT_IN_TABLE:{rb(this,t);break}case x.IN_TEMPLATE:{ab(this,t);break}case x.AFTER_BODY:{ub(this,t);break}case x.IN_FRAMESET:{ob(this,t);break}case x.AFTER_FRAMESET:{cb(this,t);break}case x.AFTER_AFTER_BODY:{db(this,t);break}case x.AFTER_AFTER_FRAMESET:{hb(this,t);break}}}onEndTag(t){this.skipNextNewLine=!1,this.currentToken=t,this.currentNotInHTML?bb(this,t):this._endTagOutsideForeignContent(t)}_endTagOutsideForeignContent(t){switch(this.insertionMode){case x.INITIAL:{yn(this,t);break}case x.BEFORE_HTML:{Qg(this,t);break}case x.BEFORE_HEAD:{Zg(this,t);break}case x.IN_HEAD:{Jg(this,t);break}case x.IN_HEAD_NO_SCRIPT:{t1(this,t);break}case x.AFTER_HEAD:{r1(this,t);break}case x.IN_BODY:{Mr(this,t);break}case x.TEXT:{z1(this,t);break}case x.IN_TABLE:{Bn(this,t);break}case x.IN_TABLE_TEXT:{An(this,t);break}case x.IN_CAPTION:{J1(this,t);break}case x.IN_COLUMN_GROUP:{eb(this,t);break}case x.IN_TABLE_BODY:{qi(this,t);break}case x.IN_ROW:{yl(this,t);break}case x.IN_CELL:{nb(this,t);break}case x.IN_SELECT:{_l(this,t);break}case x.IN_SELECT_IN_TABLE:{ib(this,t);break}case x.IN_TEMPLATE:{sb(this,t);break}case x.AFTER_BODY:{Cl(this,t);break}case x.IN_FRAMESET:{lb(this,t);break}case x.AFTER_FRAMESET:{fb(this,t);break}case x.AFTER_AFTER_BODY:{lr(this,t);break}}}onEof(t){switch(this.insertionMode){case x.INITIAL:{yn(this,t);break}case x.BEFORE_HTML:{Nn(this,t);break}case x.BEFORE_HEAD:{kn(this,t);break}case x.IN_HEAD:{On(this,t);break}case x.IN_HEAD_NO_SCRIPT:{Rn(this,t);break}case x.AFTER_HEAD:{Ln(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:{bl(this,t);break}case x.TEXT:{$1(this,t);break}case x.IN_TABLE_TEXT:{An(this,t);break}case x.IN_TEMPLATE:{Sl(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:{Sa(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:{dl(this,t);break}case x.IN_TABLE:case x.IN_TABLE_BODY:case x.IN_ROW:{li(this,t);break}case x.IN_TABLE_TEXT:{El(this,t);break}}}}function Ug(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):gl(e,t),n}function jg(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 zg(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 u=e.activeFormattingElements.getElementEntry(s),o=u&&a>=Fg;!u||o?(o&&e.activeFormattingElements.removeEntry(u),e.openElements.remove(s)):(s=$g(e,u),r===t&&(e.activeFormattingElements.bookmark=u),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(s,r),r=s)}return r}function $g(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 Yg(e,t,n){const r=e.treeAdapter.getTagName(t),i=bn(r);if(e._isElementCausesFosterParenting(i))e._fosterParentElement(n);else{const a=e.treeAdapter.getNamespaceURI(t);i===l.TEMPLATE&&a===P.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function Gg(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<Bg;n++){const r=Ug(e,t);if(!r)break;const i=jg(e,r);if(!i)break;e.activeFormattingElements.bookmark=r;const a=zg(e,i,r.element),s=e.openElements.getCommonAncestor(r.element);e.treeAdapter.detachNode(a),s&&Yg(e,s,a),Gg(e,i,r)}}function Vi(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function Vg(e,t){e._appendCommentNode(t,e.openElements.items[0])}function qg(e,t){e._appendCommentNode(t,e.document)}function Sa(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 Wg(e,t){e._setDocumentType(t);const n=t.forceQuirks?et.QUIRKS:Sg(t);_g(t)||e._err(t,L.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=x.BEFORE_HTML}function yn(e,t){e._err(t,L.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,et.QUIRKS),e.insertionMode=x.BEFORE_HTML,e._processToken(t)}function Xg(e,t){t.tagID===l.HTML?(e._insertElement(t,P.HTML),e.insertionMode=x.BEFORE_HEAD):Nn(e,t)}function Qg(e,t){const n=t.tagID;(n===l.HTML||n===l.HEAD||n===l.BODY||n===l.BR)&&Nn(e,t)}function Nn(e,t){e._insertFakeRootElement(),e.insertionMode=x.BEFORE_HEAD,e._processToken(t)}function Kg(e,t){switch(t.tagID){case l.HTML:{ze(e,t);break}case l.HEAD:{e._insertElement(t,P.HTML),e.headElement=e.openElements.current,e.insertionMode=x.IN_HEAD;break}default:kn(e,t)}}function Zg(e,t){const n=t.tagID;n===l.HEAD||n===l.BODY||n===l.HTML||n===l.BR?kn(e,t):e._err(t,L.endTagWithoutMatchingOpenElement)}function kn(e,t){e._insertFakeElement(I.HEAD,l.HEAD),e.headElement=e.openElements.current,e.insertionMode=x.IN_HEAD,e._processToken(t)}function lt(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,P.HTML),t.ackSelfClosing=!0;break}case l.TITLE:{e._switchToTextParsing(t,De.RCDATA);break}case l.NOSCRIPT:{e.options.scriptingEnabled?e._switchToTextParsing(t,De.RAWTEXT):(e._insertElement(t,P.HTML),e.insertionMode=x.IN_HEAD_NO_SCRIPT);break}case l.NOFRAMES:case l.STYLE:{e._switchToTextParsing(t,De.RAWTEXT);break}case l.SCRIPT:{e._switchToTextParsing(t,De.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,L.misplacedStartTagForHeadElement);break}default:On(e,t)}}function Jg(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:{On(e,t);break}case l.TEMPLATE:{Xt(e,t);break}default:e._err(t,L.endTagWithoutMatchingOpenElement)}}function Xt(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==l.TEMPLATE&&e._err(t,L.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(l.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,L.endTagWithoutMatchingOpenElement)}function On(e,t){e.openElements.pop(),e.insertionMode=x.AFTER_HEAD,e._processToken(t)}function e1(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:{lt(e,t);break}case l.NOSCRIPT:{e._err(t,L.nestedNoscriptInHead);break}default:Rn(e,t)}}function t1(e,t){switch(t.tagID){case l.NOSCRIPT:{e.openElements.pop(),e.insertionMode=x.IN_HEAD;break}case l.BR:{Rn(e,t);break}default:e._err(t,L.endTagWithoutMatchingOpenElement)}}function Rn(e,t){const n=t.type===ce.EOF?L.openElementsLeftAfterEof:L.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=x.IN_HEAD,e._processToken(t)}function n1(e,t){switch(t.tagID){case l.HTML:{ze(e,t);break}case l.BODY:{e._insertElement(t,P.HTML),e.framesetOk=!1,e.insertionMode=x.IN_BODY;break}case l.FRAMESET:{e._insertElement(t,P.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,L.abandonedHeadElementChild),e.openElements.push(e.headElement,l.HEAD),lt(e,t),e.openElements.remove(e.headElement);break}case l.HEAD:{e._err(t,L.misplacedStartTagForHeadElement);break}default:Ln(e,t)}}function r1(e,t){switch(t.tagID){case l.BODY:case l.HTML:case l.BR:{Ln(e,t);break}case l.TEMPLATE:{Xt(e,t);break}default:e._err(t,L.endTagWithoutMatchingOpenElement)}}function Ln(e,t){e._insertFakeElement(I.BODY,l.BODY),e.insertionMode=x.IN_BODY,Pr(e,t)}function Pr(e,t){switch(t.type){case ce.CHARACTER:{hl(e,t);break}case ce.WHITESPACE_CHARACTER:{dl(e,t);break}case ce.COMMENT:{Vi(e,t);break}case ce.START_TAG:{ze(e,t);break}case ce.END_TAG:{Mr(e,t);break}case ce.EOF:{bl(e,t);break}}}function dl(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function hl(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function i1(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function a1(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}function s1(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,P.HTML),e.insertionMode=x.IN_FRAMESET)}function u1(e,t){e.openElements.hasInButtonScope(l.P)&&e._closePElement(),e._insertElement(t,P.HTML)}function o1(e,t){e.openElements.hasInButtonScope(l.P)&&e._closePElement(),Gi.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,P.HTML)}function l1(e,t){e.openElements.hasInButtonScope(l.P)&&e._closePElement(),e._insertElement(t,P.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function c1(e,t){const n=e.openElements.tmplCount>0;(!e.formElement||n)&&(e.openElements.hasInButtonScope(l.P)&&e._closePElement(),e._insertElement(t,P.HTML),n||(e.formElement=e.openElements.current))}function f1(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,P.HTML)}function d1(e,t){e.openElements.hasInButtonScope(l.P)&&e._closePElement(),e._insertElement(t,P.HTML),e.tokenizer.state=De.PLAINTEXT}function h1(e,t){e.openElements.hasInScope(l.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(l.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,P.HTML),e.framesetOk=!1}function m1(e,t){const n=e.activeFormattingElements.getElementEntryInScopeWithTagName(I.A);n&&(_a(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,P.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function p1(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,P.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function g1(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(l.NOBR)&&(_a(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,P.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function b1(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,P.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function E1(e,t){e.treeAdapter.getDocumentMode(e.document)!==et.QUIRKS&&e.openElements.hasInButtonScope(l.P)&&e._closePElement(),e._insertElement(t,P.HTML),e.framesetOk=!1,e.insertionMode=x.IN_TABLE}function ml(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,P.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function pl(e){const t=el(e,zt.TYPE);return t!=null&&t.toLowerCase()===Mg}function T1(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,P.HTML),pl(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function x1(e,t){e._appendElement(t,P.HTML),t.ackSelfClosing=!0}function y1(e,t){e.openElements.hasInButtonScope(l.P)&&e._closePElement(),e._appendElement(t,P.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function A1(e,t){t.tagName=I.IMG,t.tagID=l.IMG,ml(e,t)}function _1(e,t){e._insertElement(t,P.HTML),e.skipNextNewLine=!0,e.tokenizer.state=De.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=x.TEXT}function S1(e,t){e.openElements.hasInButtonScope(l.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,De.RAWTEXT)}function C1(e,t){e.framesetOk=!1,e._switchToTextParsing(t,De.RAWTEXT)}function Zs(e,t){e._switchToTextParsing(t,De.RAWTEXT)}function w1(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,P.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 v1(e,t){e.openElements.currentTagId===l.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,P.HTML)}function I1(e,t){e.openElements.hasInScope(l.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,P.HTML)}function N1(e,t){e.openElements.hasInScope(l.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(l.RTC),e._insertElement(t,P.HTML)}function k1(e,t){e._reconstructActiveFormattingElements(),ll(t),Aa(t),t.selfClosing?e._appendElement(t,P.MATHML):e._insertElement(t,P.MATHML),t.ackSelfClosing=!0}function O1(e,t){e._reconstructActiveFormattingElements(),cl(t),Aa(t),t.selfClosing?e._appendElement(t,P.SVG):e._insertElement(t,P.SVG),t.ackSelfClosing=!0}function Js(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,P.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:{p1(e,t);break}case l.A:{m1(e,t);break}case l.H1:case l.H2:case l.H3:case l.H4:case l.H5:case l.H6:{o1(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:{u1(e,t);break}case l.LI:case l.DD:case l.DT:{f1(e,t);break}case l.BR:case l.IMG:case l.WBR:case l.AREA:case l.EMBED:case l.KEYGEN:{ml(e,t);break}case l.HR:{y1(e,t);break}case l.RB:case l.RTC:{I1(e,t);break}case l.RT:case l.RP:{N1(e,t);break}case l.PRE:case l.LISTING:{l1(e,t);break}case l.XMP:{S1(e,t);break}case l.SVG:{O1(e,t);break}case l.HTML:{i1(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:{lt(e,t);break}case l.BODY:{a1(e,t);break}case l.FORM:{c1(e,t);break}case l.NOBR:{g1(e,t);break}case l.MATH:{k1(e,t);break}case l.TABLE:{E1(e,t);break}case l.INPUT:{T1(e,t);break}case l.PARAM:case l.TRACK:case l.SOURCE:{x1(e,t);break}case l.IMAGE:{A1(e,t);break}case l.BUTTON:{h1(e,t);break}case l.APPLET:case l.OBJECT:case l.MARQUEE:{b1(e,t);break}case l.IFRAME:{C1(e,t);break}case l.SELECT:{w1(e,t);break}case l.OPTION:case l.OPTGROUP:{v1(e,t);break}case l.NOEMBED:case l.NOFRAMES:{Zs(e,t);break}case l.FRAMESET:{s1(e,t);break}case l.TEXTAREA:{_1(e,t);break}case l.NOSCRIPT:{e.options.scriptingEnabled?Zs(e,t):Js(e,t);break}case l.PLAINTEXT:{d1(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:Js(e,t)}}function R1(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 L1(e,t){e.openElements.hasInScope(l.BODY)&&(e.insertionMode=x.AFTER_BODY,Cl(e,t))}function D1(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function P1(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 M1(e){e.openElements.hasInButtonScope(l.P)||e._insertFakeElement(I.P,l.P),e._closePElement()}function B1(e){e.openElements.hasInListItemScope(l.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(l.LI),e.openElements.popUntilTagNamePopped(l.LI))}function F1(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}function H1(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function U1(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function j1(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(I.BR,l.BR),e.openElements.pop(),e.framesetOk=!1}function gl(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 Mr(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:{M1(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:{D1(e,t);break}case l.LI:{B1(e);break}case l.DD:case l.DT:{F1(e,t);break}case l.H1:case l.H2:case l.H3:case l.H4:case l.H5:case l.H6:{H1(e);break}case l.BR:{j1(e);break}case l.BODY:{R1(e,t);break}case l.HTML:{L1(e,t);break}case l.FORM:{P1(e);break}case l.APPLET:case l.OBJECT:case l.MARQUEE:{U1(e,t);break}case l.TEMPLATE:{Xt(e,t);break}default:gl(e,t)}}function bl(e,t){e.tmplInsertionModeStack.length>0?Sl(e,t):Sa(e,t)}function z1(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 $1(e,t){e._err(t,L.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function li(e,t){if(fl.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:{Tl(e,t);break}case ce.WHITESPACE_CHARACTER:{El(e,t);break}}else Gn(e,t)}function Y1(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,P.HTML),e.insertionMode=x.IN_CAPTION}function G1(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,P.HTML),e.insertionMode=x.IN_COLUMN_GROUP}function V1(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(I.COLGROUP,l.COLGROUP),e.insertionMode=x.IN_COLUMN_GROUP,Ca(e,t)}function q1(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,P.HTML),e.insertionMode=x.IN_TABLE_BODY}function W1(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(I.TBODY,l.TBODY),e.insertionMode=x.IN_TABLE_BODY,Br(e,t)}function X1(e,t){e.openElements.hasInTableScope(l.TABLE)&&(e.openElements.popUntilTagNamePopped(l.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function Q1(e,t){pl(t)?e._appendElement(t,P.HTML):Gn(e,t),t.ackSelfClosing=!0}function K1(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,P.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function cn(e,t){switch(t.tagID){case l.TD:case l.TH:case l.TR:{W1(e,t);break}case l.STYLE:case l.SCRIPT:case l.TEMPLATE:{lt(e,t);break}case l.COL:{V1(e,t);break}case l.FORM:{K1(e,t);break}case l.TABLE:{X1(e,t);break}case l.TBODY:case l.TFOOT:case l.THEAD:{q1(e,t);break}case l.INPUT:{Q1(e,t);break}case l.CAPTION:{Y1(e,t);break}case l.COLGROUP:{G1(e,t);break}default:Gn(e,t)}}function Bn(e,t){switch(t.tagID){case l.TABLE:{e.openElements.hasInTableScope(l.TABLE)&&(e.openElements.popUntilTagNamePopped(l.TABLE),e._resetInsertionMode());break}case l.TEMPLATE:{Xt(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:Gn(e,t)}}function Gn(e,t){const n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,Pr(e,t),e.fosterParentingEnabled=n}function El(e,t){e.pendingCharacterTokens.push(t)}function Tl(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function An(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)Gn(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}const xl=new Set([l.CAPTION,l.COL,l.COLGROUP,l.TBODY,l.TD,l.TFOOT,l.TH,l.THEAD,l.TR]);function Z1(e,t){const n=t.tagID;xl.has(n)?e.openElements.hasInTableScope(l.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(l.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=x.IN_TABLE,cn(e,t)):ze(e,t)}function J1(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&&Bn(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:Mr(e,t)}}function Ca(e,t){switch(t.tagID){case l.HTML:{ze(e,t);break}case l.COL:{e._appendElement(t,P.HTML),t.ackSelfClosing=!0;break}case l.TEMPLATE:{lt(e,t);break}default:pr(e,t)}}function eb(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:{Xt(e,t);break}case l.COL:break;default:pr(e,t)}}function pr(e,t){e.openElements.currentTagId===l.COLGROUP&&(e.openElements.pop(),e.insertionMode=x.IN_TABLE,e._processToken(t))}function Br(e,t){switch(t.tagID){case l.TR:{e.openElements.clearBackToTableBodyContext(),e._insertElement(t,P.HTML),e.insertionMode=x.IN_ROW;break}case l.TH:case l.TD:{e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(I.TR,l.TR),e.insertionMode=x.IN_ROW,Fr(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,cn(e,t));break}default:cn(e,t)}}function qi(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,Bn(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:Bn(e,t)}}function Fr(e,t){switch(t.tagID){case l.TH:case l.TD:{e.openElements.clearBackToTableRowContext(),e._insertElement(t,P.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,Br(e,t));break}default:cn(e,t)}}function yl(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,qi(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,qi(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:Bn(e,t)}}function tb(e,t){const n=t.tagID;xl.has(n)?(e.openElements.hasInTableScope(l.TD)||e.openElements.hasInTableScope(l.TH))&&(e._closeTableCell(),Fr(e,t)):ze(e,t)}function nb(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(),yl(e,t));break}case l.BODY:case l.CAPTION:case l.COL:case l.COLGROUP:case l.HTML:break;default:Mr(e,t)}}function Al(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,P.HTML);break}case l.OPTGROUP:{e.openElements.currentTagId===l.OPTION&&e.openElements.pop(),e.openElements.currentTagId===l.OPTGROUP&&e.openElements.pop(),e._insertElement(t,P.HTML);break}case l.HR:{e.openElements.currentTagId===l.OPTION&&e.openElements.pop(),e.openElements.currentTagId===l.OPTGROUP&&e.openElements.pop(),e._appendElement(t,P.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:{lt(e,t);break}}}function _l(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:{Xt(e,t);break}}}function rb(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)):Al(e,t)}function ib(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)):_l(e,t)}function ab(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:{lt(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,cn(e,t);break}case l.COL:{e.tmplInsertionModeStack[0]=x.IN_COLUMN_GROUP,e.insertionMode=x.IN_COLUMN_GROUP,Ca(e,t);break}case l.TR:{e.tmplInsertionModeStack[0]=x.IN_TABLE_BODY,e.insertionMode=x.IN_TABLE_BODY,Br(e,t);break}case l.TD:case l.TH:{e.tmplInsertionModeStack[0]=x.IN_ROW,e.insertionMode=x.IN_ROW,Fr(e,t);break}default:e.tmplInsertionModeStack[0]=x.IN_BODY,e.insertionMode=x.IN_BODY,ze(e,t)}}function sb(e,t){t.tagID===l.TEMPLATE&&Xt(e,t)}function Sl(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(l.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):Sa(e,t)}function ub(e,t){t.tagID===l.HTML?ze(e,t):gr(e,t)}function Cl(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 gr(e,t)}function gr(e,t){e.insertionMode=x.IN_BODY,Pr(e,t)}function ob(e,t){switch(t.tagID){case l.HTML:{ze(e,t);break}case l.FRAMESET:{e._insertElement(t,P.HTML);break}case l.FRAME:{e._appendElement(t,P.HTML),t.ackSelfClosing=!0;break}case l.NOFRAMES:{lt(e,t);break}}}function lb(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 cb(e,t){switch(t.tagID){case l.HTML:{ze(e,t);break}case l.NOFRAMES:{lt(e,t);break}}}function fb(e,t){t.tagID===l.HTML&&(e.insertionMode=x.AFTER_AFTER_FRAMESET)}function db(e,t){t.tagID===l.HTML?ze(e,t):lr(e,t)}function lr(e,t){e.insertionMode=x.IN_BODY,Pr(e,t)}function hb(e,t){switch(t.tagID){case l.HTML:{ze(e,t);break}case l.NOFRAMES:{lt(e,t);break}}}function mb(e,t){t.chars=ke,e._insertCharacters(t)}function pb(e,t){e._insertCharacters(t),e.framesetOk=!1}function wl(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==P.HTML&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function gb(e,t){if(Og(t))wl(e),e._startTagOutsideForeignContent(t);else{const n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===P.MATHML?ll(t):r===P.SVG&&(Rg(t),cl(t)),Aa(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}function bb(e,t){if(t.tagID===l.P||t.tagID===l.BR){wl(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)===P.HTML){e._endTagOutsideForeignContent(t);break}const i=e.treeAdapter.getTagName(r);if(i.toLowerCase()===t.tagName){t.tagName=i,e.openElements.shortenToLength(n);break}}}I.AREA,I.BASE,I.BASEFONT,I.BGSOUND,I.BR,I.COL,I.EMBED,I.FRAME,I.HR,I.IMG,I.INPUT,I.KEYGEN,I.LINK,I.META,I.PARAM,I.SOURCE,I.TRACK,I.WBR;const Eb=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),eu={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function vl(e,t){const n=Ib(e),r=Xo("type",{handlers:{root:Tb,element:xb,text:yb,comment:Nl,doctype:Ab,raw:Sb},unknown:Cb}),i={parser:n?new Ks(eu):Ks.getFragmentParser(void 0,eu),handle(u){r(u,i)},stitches:!1,options:t||{}};r(e,i),En(i,Et());const a=n?i.parser.document:i.parser.getFragment(),s=kp(a,{file:i.options.file});return i.stitches&&Dr(s,"comment",function(u,o,c){const f=u;if(f.value.stitch&&c&&o!==void 0){const d=c.children;return d[o]=f.value.stitch,o}}),s.type==="root"&&s.children.length===1&&s.children[0].type===e.type?s.children[0]:s}function Il(e,t){let n=-1;if(e)for(;++n<e.length;)t.handle(e[n])}function Tb(e,t){Il(e.children,t)}function xb(e,t){wb(e,t),Il(e.children,t),vb(e,t)}function yb(e,t){t.parser.tokenizer.state>4&&(t.parser.tokenizer.state=0);const n={type:ce.CHARACTER,chars:e.value,location:Vn(e)};En(t,Et(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function Ab(e,t){const n={type:ce.DOCTYPE,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:Vn(e)};En(t,Et(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function _b(e,t){t.stitches=!0;const n=Nb(e);if("children"in e&&"children"in n){const r=vl({type:"root",children:e.children},t.options);n.children=r.children}Nl({type:"comment",value:{stitch:n}},t)}function Nl(e,t){const n=e.value,r={type:ce.COMMENT,data:n,location:Vn(e)};En(t,Et(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function Sb(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,kl(t,Et(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 Cb(e,t){const n=e;if(t.options.passThrough&&t.options.passThrough.includes(n.type))_b(n,t);else{let r="";throw Eb.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 En(e,t){kl(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=De.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 kl(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 wb(e,t){const n=e.tagName.toLowerCase();if(t.parser.tokenizer.state===De.PLAINTEXT)return;En(t,Et(e));const r=t.parser.openElements.current;let i="namespaceURI"in r?r.namespaceURI:jt.html;i===jt.html&&n==="svg"&&(i=jt.svg);const a=Pp({...e,children:[]},{space:i===jt.svg?"svg":"html"}),s={type:ce.START_TAG,tagName:n,tagID:bn(n),selfClosing:!1,ackSelfClosing:!1,attrs:"attrs"in a?a.attrs:[],location:Vn(e)};t.parser.currentToken=s,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=n}function vb(e,t){const n=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&$p.includes(n)||t.parser.tokenizer.state===De.PLAINTEXT)return;En(t,Ir(e));const r={type:ce.END_TAG,tagName:n,tagID:bn(n),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:Vn(e)};t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken),n===t.parser.tokenizer.lastStartTagName&&(t.parser.tokenizer.state===De.RCDATA||t.parser.tokenizer.state===De.RAWTEXT||t.parser.tokenizer.state===De.SCRIPT_DATA)&&(t.parser.tokenizer.state=De.DATA)}function Ib(e){const t=e.type==="root"?e.children[0]:e;return!!(t&&(t.type==="doctype"||t.type==="element"&&t.tagName.toLowerCase()==="html"))}function Vn(e){const t=Et(e)||{line:void 0,column:void 0,offset:void 0},n=Ir(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 Nb(e){return"children"in e?ln({...e,children:[]}):ln(e)}function Ol(e){return function(t,n){return vl(t,{...e,file:n})}}const kb=e=>Be.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",...e},Be.createElement("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10s10-4.48 10-10S17.52 2 12 2zM7.07 18.28c.43-.9 3.05-1.78 4.93-1.78s4.51.88 4.93 1.78C15.57 19.36 13.86 20 12 20s-3.57-.64-4.93-1.72zm11.29-1.45c-1.43-1.74-4.9-2.33-6.36-2.33s-4.93.59-6.36 2.33A7.95 7.95 0 0 1 4 12c0-4.41 3.59-8 8-8s8 3.59 8 8c0 1.82-.62 3.49-1.64 4.83zM12 6c-1.94 0-3.5 1.56-3.5 3.5S10.06 13 12 13s3.5-1.56 3.5-3.5S13.94 6 12 6zm0 5c-.83 0-1.5-.67-1.5-1.5S11.17 8 12 8s1.5.67 1.5 1.5S12.83 11 12 11z"})),Ob=({content:e,metaData:t})=>{const{chatlineLabelUserTranslation:n}=ua();return _.jsxs("div",{className:"flex px-3 justify-between mt-8 bg-gray-200 rounded-lg",children:[_.jsx("div",{className:"w-10 mr-3 flex-col content-center",children:_.jsx("div",{children:_.jsx(kb,{fill:"#4564d6"})})}),_.jsxs("div",{className:`w-full p-4 rounded-lg transition-all duration-300 ${t?.isErrorMessage?"bg-red-100 border-l-4 border-red-400 text-red-800 shadow-md animate-fade-in":" text-gray-800"}`,children:[_.jsx("p",{className:"font-bold",children:n}),_.jsx("div",{children:_.jsx(Go,{rehypePlugins:[Ol],children:e&&e})})]})]})};function tu(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 Rb(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function Lb(e,t,n){const i=Rr((n||{}).ignore||[]),a=Db(t);let s=-1;for(;++s<a.length;)$o(e,"text",u);function u(c,f){let d=-1,h;for(;++d<f.length;){const m=f[d],b=h?h.children:void 0;if(i(m,b?b.indexOf(m):void 0,h))return;h=m}if(h)return o(c,f)}function o(c,f){const d=f[f.length-1],h=a[s][0],m=a[s][1];let b=0;const C=d.children.indexOf(c);let y=!1,S=[];h.lastIndex=0;let v=h.exec(c.value);for(;v;){const D=v.index,N={index:v.index,input:v.input,stack:[...f,c]};let O=m(...v,N);if(typeof O=="string"&&(O=O.length>0?{type:"text",value:O}:void 0),O===!1?h.lastIndex=D+1:(b!==D&&S.push({type:"text",value:c.value.slice(b,D)}),Array.isArray(O)?S.push(...O):O&&S.push(O),b=D+v[0].length,y=!0),!h.global)break;v=h.exec(c.value)}return y?(b<c.value.length&&S.push({type:"text",value:c.value.slice(b)}),d.children.splice(C,1,...S)):S=[c],C+S.length}}function Db(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([Pb(i[0]),Mb(i[1])])}return t}function Pb(e){return typeof e=="string"?new RegExp(Rb(e),"g"):e}function Mb(e){return typeof e=="function"?e:function(){return e}}const ci="phrasing",fi=["autolink","link","image","label"];function Bb(){return{transforms:[Yb],enter:{literalAutolink:Hb,literalAutolinkEmail:di,literalAutolinkHttp:di,literalAutolinkWww:di},exit:{literalAutolink:$b,literalAutolinkEmail:zb,literalAutolinkHttp:Ub,literalAutolinkWww:jb}}}function Fb(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:ci,notInConstruct:fi},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:ci,notInConstruct:fi},{character:":",before:"[ps]",after:"\\/",inConstruct:ci,notInConstruct:fi}]}}function Hb(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function di(e){this.config.enter.autolinkProtocol.call(this,e)}function Ub(e){this.config.exit.autolinkProtocol.call(this,e)}function jb(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 zb(e){this.config.exit.autolinkEmail.call(this,e)}function $b(e){this.exit(e)}function Yb(e){Lb(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,Gb],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),Vb]],{ignore:["link","linkReference"]})}function Gb(e,t,n,r,i){let a="";if(!Rl(i)||(/^w/i.test(t)&&(n=t+n,t="",a="http://"),!qb(n)))return!1;const s=Wb(n+r);if(!s[0])return!1;const u={type:"link",title:null,url:a+t+s[0],children:[{type:"text",value:t+s[0]}]};return s[1]?[u,{type:"text",value:s[1]}]:u}function Vb(e,t,n,r){return!Rl(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function qb(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 Wb(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=tu(e,"(");let a=tu(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 Rl(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||Gt(n)||Nr(n))&&(!t||n!==47)}Ll.peek=rE;function Xb(){this.buffer()}function Qb(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function Kb(){this.buffer()}function Zb(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function Jb(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=ot(this.sliceSerialize(e)).toLowerCase(),n.label=t}function eE(e){this.exit(e)}function tE(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=ot(this.sliceSerialize(e)).toLowerCase(),n.label=t}function nE(e){this.exit(e)}function rE(){return"["}function Ll(e,t,n,r){const i=n.createTracker(r);let a=i.move("[^");const s=n.enter("footnoteReference"),u=n.enter("reference");return a+=i.move(n.safe(n.associationId(e),{after:"]",before:a})),u(),s(),a+=i.move("]"),a}function iE(){return{enter:{gfmFootnoteCallString:Xb,gfmFootnoteCall:Qb,gfmFootnoteDefinitionLabelString:Kb,gfmFootnoteDefinition:Zb},exit:{gfmFootnoteCallString:Jb,gfmFootnoteCall:eE,gfmFootnoteDefinitionLabelString:tE,gfmFootnoteDefinition:nE}}}function aE(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:Ll},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,i,a,s){const u=a.createTracker(s);let o=u.move("[^");const c=a.enter("footnoteDefinition"),f=a.enter("label");return o+=u.move(a.safe(a.associationId(r),{before:o,after:"]"})),f(),o+=u.move("]:"),r.children&&r.children.length>0&&(u.shift(4),o+=u.move((t?`
62
- `:" ")+a.indentLines(a.containerFlow(r,u.current()),t?Dl:sE))),c(),o}}function sE(e,t,n){return t===0?e:Dl(e,t,n)}function Dl(e,t,n){return(n?"":" ")+e}const uE=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];Pl.peek=dE;function oE(){return{canContainEols:["delete"],enter:{strikethrough:cE},exit:{strikethrough:fE}}}function lE(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:uE}],handlers:{delete:Pl}}}function cE(e){this.enter({type:"delete",children:[]},e)}function fE(e){this.exit(e)}function Pl(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 dE(){return"~"}function hE(e){return e.length}function mE(e,t){const n=t||{},r=(n.align||[]).concat(),i=n.stringLength||hE,a=[],s=[],u=[],o=[];let c=0,f=-1;for(;++f<e.length;){const A=[],C=[];let y=-1;for(e[f].length>c&&(c=e[f].length);++y<e[f].length;){const S=pE(e[f][y]);if(n.alignDelimiters!==!1){const v=i(S);C[y]=v,(o[y]===void 0||v>o[y])&&(o[y]=v)}A.push(S)}s[f]=A,u[f]=C}let d=-1;if(typeof r=="object"&&"length"in r)for(;++d<c;)a[d]=nu(r[d]);else{const A=nu(r);for(;++d<c;)a[d]=A}d=-1;const h=[],m=[];for(;++d<c;){const A=a[d];let C="",y="";A===99?(C=":",y=":"):A===108?C=":":A===114&&(y=":");let S=n.alignDelimiters===!1?1:Math.max(1,o[d]-C.length-y.length);const v=C+"-".repeat(S)+y;n.alignDelimiters!==!1&&(S=C.length+S+y.length,S>o[d]&&(o[d]=S),m[d]=S),h[d]=v}s.splice(1,0,h),u.splice(1,0,m),f=-1;const b=[];for(;++f<s.length;){const A=s[f],C=u[f];d=-1;const y=[];for(;++d<c;){const S=A[d]||"";let v="",D="";if(n.alignDelimiters!==!1){const N=o[d]-(C[d]||0),O=a[d];O===114?v=" ".repeat(N):O===99?N%2?(v=" ".repeat(N/2+.5),D=" ".repeat(N/2-.5)):(v=" ".repeat(N/2),D=v):D=" ".repeat(N)}n.delimiterStart!==!1&&!d&&y.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&S==="")&&(n.delimiterStart!==!1||d)&&y.push(" "),n.alignDelimiters!==!1&&y.push(v),y.push(S),n.alignDelimiters!==!1&&y.push(D),n.padding!==!1&&y.push(" "),(n.delimiterEnd!==!1||d!==c-1)&&y.push("|")}b.push(n.delimiterEnd===!1?y.join("").replace(/ +$/,""):y.join(""))}return b.join(`
63
- `)}function pE(e){return e==null?"":String(e)}function nu(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 gE(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()),bE);return i(),s}function bE(e,t,n){return">"+(n?"":" ")+e}function EE(e,t){return ru(e,t.inConstruct,!0)&&!ru(e,t.notInConstruct,!1)}function ru(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 iu(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
64
- `&&EE(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?"":" ";return`\\
65
- `}function TE(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 xE(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 yE(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 AE(e,t,n,r){const i=yE(n),a=e.value||"",s=i==="`"?"GraveAccent":"Tilde";if(xE(e,n)){const d=n.enter("codeIndented"),h=n.indentLines(a,_E);return d(),h}const u=n.createTracker(r),o=i.repeat(Math.max(TE(a,i)+1,3)),c=n.enter("codeFenced");let f=u.move(o);if(e.lang){const d=n.enter(`codeFencedLang${s}`);f+=u.move(n.safe(e.lang,{before:f,after:" ",encode:["`"],...u.current()})),d()}if(e.lang&&e.meta){const d=n.enter(`codeFencedMeta${s}`);f+=u.move(" "),f+=u.move(n.safe(e.meta,{before:f,after:`
59
+ `}),n}function Os(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function Ls(e,t){const n=Qm(e,t),r=n.one(e,void 0),i=Um(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 tp(e,t){return e&&"run"in e?async function(n,r){const i=Ls(n,{file:r,...t});await e.run(i,r)}:function(n,r){return Ls(n,{file:r,...t||e})}}function Rs(e){if(e)throw e}var ti,Ds;function np(){if(Ds)return ti;Ds=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 f=e.call(c,"constructor"),d=c.constructor&&c.constructor.prototype&&e.call(c.constructor.prototype,"isPrototypeOf");if(c.constructor&&!f&&!d)return!1;var m;for(m in c);return typeof m>"u"||e.call(c,m)},s=function(c,f){n&&f.name==="__proto__"?n(c,f.name,{enumerable:!0,configurable:!0,value:f.newValue,writable:!0}):c[f.name]=f.newValue},u=function(c,f){if(f==="__proto__")if(e.call(c,f)){if(r)return r(c,f).value}else return;return c[f]};return ti=function l(){var c,f,d,m,h,b,A=arguments[0],_=1,x=arguments.length,I=!1;for(typeof A=="boolean"&&(I=A,A=arguments[1]||{},_=2),(A==null||typeof A!="object"&&typeof A!="function")&&(A={});_<x;++_)if(c=arguments[_],c!=null)for(f in c)d=u(A,f),m=u(c,f),A!==m&&(I&&m&&(a(m)||(h=i(m)))?(h?(h=!1,b=d&&i(d)?d:[]):b=d&&a(d)?d:{},s(A,{name:f,newValue:l(I,b,m)})):typeof m<"u"&&s(A,{name:f,newValue:m}));return A},ti}var rp=np();const ni=ra(rp);function zi(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 ip(){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);u(null,...i);function u(l,...c){const f=e[++a];let d=-1;if(l){s(l);return}for(;++d<i.length;)(c[d]===null||c[d]===void 0)&&(c[d]=i[d]);i=c,f?ap(f,u)(...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 ap(e,t){let n;return r;function r(...s){const u=e.length>s.length;let l;u&&s.push(i);try{l=e.apply(this,s)}catch(c){const f=c;if(u&&n)throw f;return i(f)}u||(l&&l.then&&typeof l.then=="function"?l.then(a,i):l instanceof Error?i(l):a(l))}function i(s,...u){n||(n=!0,t(s,...u))}function a(s){i(null,s)}}const ct={basename:sp,dirname:up,extname:op,join:lp,sep:"/"};function sp(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Vn(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,u=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else s<0&&(a=!0,s=i+1),u>-1&&(e.codePointAt(i)===t.codePointAt(u--)?u<0&&(r=i):(u=-1,r=s));return n===r?r=s:r<0&&(r=e.length),e.slice(n,r)}function up(e){if(Vn(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 op(e){Vn(e);let t=e.length,n=-1,r=0,i=-1,a=0,s;for(;t--;){const u=e.codePointAt(t);if(u===47){if(s){r=t+1;break}continue}n<0&&(s=!0,n=t+1),u===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 lp(...e){let t=-1,n;for(;++t<e.length;)Vn(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":cp(n)}function cp(e){Vn(e);const t=e.codePointAt(0)===47;let n=fp(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function fp(e,t){let n="",r=0,i=-1,a=0,s=-1,u,l;for(;++s<=e.length;){if(s<e.length)u=e.codePointAt(s);else{if(u===47)break;u=47}if(u===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(l=n.lastIndexOf("/"),l!==n.length-1){l<0?(n="",r=0):(n=n.slice(0,l),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 u===46&&a>-1?a++:a=-1}return n}function Vn(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const dp={cwd:hp};function hp(){return"/"}function $i(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function mp(e){if(typeof e=="string")e=new URL(e);else if(!$i(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 pp(e)}function pp(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 ri=["history","path","basename","stem","extname","dirname"];class Qo{constructor(t){let n;t?$i(t)?n={path:t}:typeof t=="string"||gp(t)?n={value:t}:n=t:n={},this.cwd=dp.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<ri.length;){const a=ri[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)ri.includes(i)||(this[i]=n[i])}get basename(){return typeof this.path=="string"?ct.basename(this.path):void 0}set basename(t){ai(t,"basename"),ii(t,"basename"),this.path=ct.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?ct.dirname(this.path):void 0}set dirname(t){Ps(this.basename,"dirname"),this.path=ct.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?ct.extname(this.path):void 0}set extname(t){if(ii(t,"extname"),Ps(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=ct.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){$i(t)&&(t=mp(t)),ai(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?ct.basename(this.path,this.extname):void 0}set stem(t){ai(t,"stem"),ii(t,"stem"),this.path=ct.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 ze(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 ii(e,t){if(e&&e.includes(ct.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+ct.sep+"`")}function ai(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function Ps(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function gp(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const bp=(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 u of s){const l=Object.getOwnPropertyDescriptor(i,u);l&&Object.defineProperty(a,u,l)}return a}),Ep={}.hasOwnProperty;class Aa extends bp{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=ip()}copy(){const t=new Aa;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(ni(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(oi("data",this.frozen),this.namespace[t]=n,this):Ep.call(this.namespace,t)&&this.namespace[t]||void 0:t?(oi("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=nr(t),r=this.parser||this.Parser;return si("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),si("process",this.parser||this.Parser),ui("process",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(a,s){const u=nr(t),l=r.parse(u);r.run(l,u,function(f,d,m){if(f||!d||!m)return c(f);const h=d,b=r.stringify(h,m);xp(b)?m.value=b:m.result=b,c(f,m)});function c(f,d){f||!d?s(f):a?a(d):n(void 0,d)}}}processSync(t){let n=!1,r;return this.freeze(),si("processSync",this.parser||this.Parser),ui("processSync",this.compiler||this.Compiler),this.process(t,i),Bs("processSync","process",n),r;function i(a,s){n=!0,Rs(a),r=s}}run(t,n,r){Ms(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,u){const l=nr(n);i.run(t,l,c);function c(f,d,m){const h=d||t;f?u(f):s?s(h):r(void 0,h,m)}}}runSync(t,n){let r=!1,i;return this.run(t,n,a),Bs("runSync","run",r),i;function a(s,u){Rs(s),i=u,r=!0}}stringify(t,n){this.freeze();const r=nr(n),i=this.compiler||this.Compiler;return ui("stringify",i),Ms(t),i(t,r)}use(t,...n){const r=this.attachers,i=this.namespace;if(oi("use",this.frozen),t!=null)if(typeof t=="function")l(t,n);else if(typeof t=="object")Array.isArray(t)?u(t):s(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function a(c){if(typeof c=="function")l(c,[]);else if(typeof c=="object")if(Array.isArray(c)){const[f,...d]=c;l(f,d)}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");u(c.plugins),c.settings&&(i.settings=ni(!0,i.settings,c.settings))}function u(c){let f=-1;if(c!=null)if(Array.isArray(c))for(;++f<c.length;){const d=c[f];a(d)}else throw new TypeError("Expected a list of plugins, not `"+c+"`")}function l(c,f){let d=-1,m=-1;for(;++d<r.length;)if(r[d][0]===c){m=d;break}if(m===-1)r.push([c,...f]);else if(f.length>0){let[h,...b]=f;const A=r[m][1];zi(A)&&zi(h)&&(h=ni(!0,A,h)),r[m]=[c,h,...b]}}}}const Tp=new Aa().freeze();function si(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function ui(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function oi(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 Ms(e){if(!zi(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function Bs(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function nr(e){return yp(e)?e:new Qo(e)}function yp(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function xp(e){return typeof e=="string"||Ap(e)}function Ap(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const _p="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",Fs=[],Hs={allowDangerousHtml:!0},Sp=/^(https?|ircs?|mailto|xmpp)$/i,Cp=[{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 Ko(e){const t=e.allowedElements,n=e.allowElement,r=e.children||"",i=e.className,a=e.components,s=e.disallowedElements,u=e.rehypePlugins||Fs,l=e.remarkPlugins||Fs,c=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...Hs}:Hs,f=e.skipHtml,d=e.unwrapDisallowed,m=e.urlTransform||wp,h=Tp().use(um).use(l).use(tp,c).use(u),b=new Qo;typeof r=="string"&&(b.value=r);for(const I of Cp)Object.hasOwn(e,I.from)&&(""+I.from+(I.to?"use `"+I.to+"` instead":"remove it")+_p+I.id,void 0);const A=h.parse(b);let _=h.runSync(A,b);return i&&(_={type:"element",tagName:"div",properties:{className:i},children:_.type==="root"?_.children:[_]}),Mr(_,x),Yd(_,{Fragment:S.Fragment,components:a,ignoreInvalidStyle:!0,jsx:S.jsx,jsxs:S.jsxs,passKeys:!0,passNode:!0});function x(I,C,D){if(I.type==="raw"&&D&&typeof C=="number")return f?D.children.splice(C,1):D.children[C]={type:"text",value:I.value},C;if(I.type==="element"){let k;for(k in Zr)if(Object.hasOwn(Zr,k)&&Object.hasOwn(I.properties,k)){const O=I.properties[k],G=Zr[k];(G===null||G.includes(I.tagName))&&(I.properties[k]=m(String(O||""),k,I))}}if(I.type==="element"){let k=t?!t.includes(I.tagName):s?s.includes(I.tagName):!1;if(!k&&n&&typeof C=="number"&&(k=!n(I,C,D)),k&&D&&typeof C=="number")return d&&I.children?D.children.splice(C,1,...I.children):D.children.splice(C,1),C}}}function wp(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||Sp.test(e.slice(0,t))?e:""}const Us=/[#.]/g;function Ip(e,t){const n=e||"",r={};let i=0,a,s;for(;i<n.length;){Us.lastIndex=i;const u=Us.exec(n),l=n.slice(i,u?u.index:n.length);l&&(a?a==="#"?r.id=l:Array.isArray(r.className)?r.className.push(l):r.className=[l]:s=l,i+=l.length),u&&(a=u[0],i++)}return{type:"element",tagName:s||t||"div",properties:r,children:[]}}const vp=new Set(["button","menu","reset","submit"]),Yi={}.hasOwnProperty;function Zo(e,t,n){const r=n&&Lp(n);function i(a,s,...u){let l=-1,c;if(a==null){c={type:"root",children:[]};const f=s;u.unshift(f)}else if(c=Ip(a,t),c.tagName=c.tagName.toLowerCase(),r&&Yi.call(r,c.tagName)&&(c.tagName=r[c.tagName]),Np(s,c.tagName)){let f;for(f in s)Yi.call(s,f)&&kp(e,c.properties,f,s[f])}else u.unshift(s);for(;++l<u.length;)Gi(c.children,u[l]);return c.type==="element"&&c.tagName==="template"&&(c.content={type:"root",children:c.children},c.children=[]),c}return i}function Np(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"?vp.has(e.type.toLowerCase()):!("value"in e)}function kp(e,t,n,r){const i=Nr(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=os(r):i.commaSeparated?s=rs(r):i.commaOrSpaceSeparated?s=os(rs(r).join(" ")):s=js(i,i.property,r):Array.isArray(r)?s=r.concat():s=i.property==="style"?Op(r):String(r);if(Array.isArray(s)){const u=[];for(;++a<s.length;){const l=js(i,i.property,s[a]);u[a]=l}s=u}if(i.property==="className"&&Array.isArray(t.className)){const u=s;s=t.className.concat(u)}t[i.property]=s}}function Gi(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;)Gi(e,t[n]);else if(typeof t=="object"&&"type"in t)t.type==="root"?Gi(e,t.children):e.push(t);else throw new Error("Expected node, nodes, or string, got `"+t+"`")}function js(e,t,n){if(typeof n=="string"){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===""||Bn(n)===Bn(t)))return!0}return n}function Op(e){const t=[];let n;for(n in e)Yi.call(e,n)&&t.push([n,e[n]].join(": "));return t.join("; ")}function Lp(e){const t={};let n=-1;for(;++n<e.length;)t[e[n].toLowerCase()]=e[n];return t}const Rp=["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"],Dp=Zo(Yn,"div"),Pp=Zo(Ot,"g",Rp);function Mp(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 u=n[s];if(u===void 0){const l=zs(t,n[s-1]);u=l===-1?t.length+1:l+1,n[s]=u}if(u>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 u=n[n.length-1],l=zs(t,u),c=l===-1?t.length+1:l+1;if(u===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 zs(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 zt={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/"},Jo={}.hasOwnProperty,Bp=Object.prototype;function Fp(e,t){const n=t||{};return _a({file:n.file||void 0,location:!1,schema:n.space==="svg"?Ot:Yn,verbose:n.verbose||!1},e)}function _a(e,t){let n;switch(t.nodeName){case"#comment":{const r=t;return n={type:"comment",value:r.data},cr(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:el(e,t.childNodes),data:{quirksMode:i}},e.file&&e.location){const a=String(e.file),s=Mp(a),u=s.toPoint(0),l=s.toPoint(a.length);n.position={start:u,end:l}}return n}case"#documentType":{const r=t;return n={type:"doctype"},cr(e,r,n),n}case"#text":{const r=t;return n={type:"text",value:r.value},cr(e,r,n),n}default:return n=Hp(e,t),n}}function el(e,t){let n=-1;const r=[];for(;++n<t.length;){const i=_a(e,t[n]);r.push(i)}return r}function Hp(e,t){const n=e.schema;e.schema=t.namespaceURI===zt.svg?Ot:Yn;let r=-1;const i={};for(;++r<t.attrs.length;){const u=t.attrs[r],l=(u.prefix?u.prefix+":":"")+u.name;Jo.call(Bp,l)||(i[l]=u.value)}const s=(e.schema.space==="svg"?Pp:Dp)(t.tagName,i,el(e,t.childNodes));if(cr(e,t,s),s.tagName==="template"){const u=t,l=u.sourceCodeLocation,c=l&&l.startTag&&un(l.startTag),f=l&&l.endTag&&un(l.endTag),d=_a(e,u.content);c&&f&&e.file&&(d.position={start:c.end,end:f.start}),s.content=d}return e.schema=n,s}function cr(e,t,n){if("sourceCodeLocation"in t&&t.sourceCodeLocation&&e.file){const r=Up(e,n,t.sourceCodeLocation);r&&(e.location=!0,n.position=r)}}function Up(e,t,n){const r=un(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)Jo.call(n.attrs,s)&&(a[Nr(e.schema,s).property]=un(n.attrs[s]));n.startTag;const u=un(n.startTag),l=n.endTag?un(n.endTag):void 0,c={opening:u};l&&(c.closing=l),c.properties=a,t.data={position:c}}}return r}function un(e){const t=$s({line:e.startLine,column:e.startCol,offset:e.startOffset}),n=$s({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||n?{start:t,end:n}:void 0}function $s(e){return e.line&&e.column?e:void 0}const Ys={}.hasOwnProperty;function tl(e,t){const n=t||{};function r(i,...a){let s=r.invalid;const u=r.handlers;if(i&&Ys.call(i,e)){const l=String(i[e]);s=Ys.call(u,l)?u[l]: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 jp={},zp={}.hasOwnProperty,nl=tl("type",{handlers:{root:Yp,element:Xp,text:qp,comment:Wp,doctype:Vp}});function $p(e,t){const r=(t||jp).space;return nl(e,r==="svg"?Ot:Yn)}function Yp(e,t){const n={nodeName:"#document",mode:(e.data||{}).quirksMode?"quirks":"no-quirks",childNodes:[]};return n.childNodes=Sa(e.children,n,t),En(e,n),n}function Gp(e,t){const n={nodeName:"#document-fragment",childNodes:[]};return n.childNodes=Sa(e.children,n,t),En(e,n),n}function Vp(e){const t={nodeName:"#documentType",name:"html",publicId:"",systemId:"",parentNode:null};return En(e,t),t}function qp(e){const t={nodeName:"#text",value:e.value,parentNode:null};return En(e,t),t}function Wp(e){const t={nodeName:"#comment",data:e.value,parentNode:null};return En(e,t),t}function Xp(e,t){const n=t;let r=n;e.type==="element"&&e.tagName.toLowerCase()==="svg"&&n.space==="html"&&(r=Ot);const i=[];let a;if(e.properties){for(a in e.properties)if(a!=="children"&&zp.call(e.properties,a)){const l=Qp(r,a,e.properties[a]);l&&i.push(l)}}const s=r.space,u={nodeName:e.tagName,tagName:e.tagName,attrs:i,namespaceURI:zt[s],childNodes:[],parentNode:null};return u.childNodes=Sa(e.children,u,r),En(e,u),e.tagName==="template"&&e.content&&(u.content=Gp(e.content,r)),u}function Qp(e,t,n){const r=Nr(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?mo(n):_o(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=zt[r.space]}return i}function Sa(e,t,n){let r=-1;const i=[];if(e)for(;++r<e.length;){const a=nl(e[r],n);a.parentNode=t,i.push(a)}return i}function En(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 Kp=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"],Zp=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]),ve="�";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 Xe={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function rl(e){return e>=55296&&e<=57343}function Jp(e){return e>=56320&&e<=57343}function eg(e,t){return(e-55296)*1024+9216+t}function il(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function al(e){return e>=64976&&e<=65007||Zp.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 tg=65536;class ng{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=tg,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,u=a+n;return{code:t,startLine:r,endLine:r,startCol:s,endCol:s,startOffset:u,endOffset:u}}_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(Jp(n))return this.pos++,this._addGap(),eg(t,n)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,g.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,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,rl(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){il(t)?this._err(R.controlCharacterInInputStream):al(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 fe;(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"})(fe||(fe={}));function sl(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 ul=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))),rg=new Uint16Array("Ȁaglq \x1Bɭ\0\0p;䀦os;䀧t;䀾t;䀼uot;䀢".split("").map(e=>e.charCodeAt(0)));var li;const ig=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]]),ag=(li=String.fromCodePoint)!==null&&li!==void 0?li: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 sg(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=ig.get(e))!==null&&t!==void 0?t:e}var He;(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"})(He||(He={}));const ug=32;var vt;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(vt||(vt={}));function Vi(e){return e>=He.ZERO&&e<=He.NINE}function og(e){return e>=He.UPPER_A&&e<=He.UPPER_F||e>=He.LOWER_A&&e<=He.LOWER_F}function lg(e){return e>=He.UPPER_A&&e<=He.UPPER_Z||e>=He.LOWER_A&&e<=He.LOWER_Z||Vi(e)}function cg(e){return e===He.EQUALS||lg(e)}var Fe;(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"})(Fe||(Fe={}));var At;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(At||(At={}));class ol{constructor(t,n,r){this.decodeTree=t,this.emitCodePoint=n,this.errors=r,this.state=Fe.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=At.Strict}startEntity(t){this.decodeMode=t,this.state=Fe.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,n){switch(this.state){case Fe.EntityStart:return t.charCodeAt(n)===He.NUM?(this.state=Fe.NumericStart,this.consumed+=1,this.stateNumericStart(t,n+1)):(this.state=Fe.NamedEntity,this.stateNamedEntity(t,n));case Fe.NumericStart:return this.stateNumericStart(t,n);case Fe.NumericDecimal:return this.stateNumericDecimal(t,n);case Fe.NumericHex:return this.stateNumericHex(t,n);case Fe.NamedEntity:return this.stateNamedEntity(t,n)}}stateNumericStart(t,n){return n>=t.length?-1:(t.charCodeAt(n)|ug)===He.LOWER_X?(this.state=Fe.NumericHex,this.consumed+=1,this.stateNumericHex(t,n+1)):(this.state=Fe.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(Vi(i)||og(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(Vi(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===He.SEMI)this.consumed+=1;else if(this.decodeMode===At.Strict)return 0;return this.emitCodePoint(sg(this.result),this.consumed),this.errors&&(t!==He.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&vt.VALUE_LENGTH)>>14;for(;n<t.length;n++,this.excess++){const s=t.charCodeAt(n);if(this.treeIndex=fg(r,i,this.treeIndex+Math.max(1,a),s),this.treeIndex<0)return this.result===0||this.decodeMode===At.Attribute&&(a===0||cg(s))?0:this.emitNotTerminatedNamedEntity();if(i=r[this.treeIndex],a=(i&vt.VALUE_LENGTH)>>14,a!==0){if(s===He.SEMI)return this.emitNamedEntityData(this.treeIndex,a,this.consumed+this.excess);this.decodeMode!==At.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]&vt.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]&~vt.VALUE_LENGTH:i[t+1],r),n===3&&this.emitCodePoint(i[t+2],r),r}end(){var t;switch(this.state){case Fe.NamedEntity:return this.result!==0&&(this.decodeMode!==At.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case Fe.NumericDecimal:return this.emitNumericEntity(0,2);case Fe.NumericHex:return this.emitNumericEntity(0,3);case Fe.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case Fe.EntityStart:return 0}}}function ll(e){let t="";const n=new ol(e,r=>t+=ag(r));return function(i,a){let s=0,u=0;for(;(u=i.indexOf("&",u))>=0;){t+=i.slice(s,u),n.startEntity(a);const c=n.write(i,u+1);if(c<0){s=u+n.end();break}s=u+c,u=c===0?s+1:s}const l=t+i.slice(s);return t="",l}}function fg(e,t,n,r){const i=(t&vt.BRANCH_LENGTH)>>7,a=t&vt.JUMP_TABLE;if(i===0)return a!==0&&r===a?n:-1;if(a){const l=r-a;return l<0||l>=i?-1:e[n+l]-1}let s=n,u=s+i-1;for(;s<=u;){const l=s+u>>>1,c=e[l];if(c<r)s=l+1;else if(c>r)u=l-1;else return e[l+i]}return-1}ll(ul);ll(rg);var P;(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/"})(P||(P={}));var $t;(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"})($t||($t={}));var et;(function(e){e.NO_QUIRKS="no-quirks",e.QUIRKS="quirks",e.LIMITED_QUIRKS="limited-quirks"})(et||(et={}));var v;(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"})(v||(v={}));var o;(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"})(o||(o={}));const dg=new Map([[v.A,o.A],[v.ADDRESS,o.ADDRESS],[v.ANNOTATION_XML,o.ANNOTATION_XML],[v.APPLET,o.APPLET],[v.AREA,o.AREA],[v.ARTICLE,o.ARTICLE],[v.ASIDE,o.ASIDE],[v.B,o.B],[v.BASE,o.BASE],[v.BASEFONT,o.BASEFONT],[v.BGSOUND,o.BGSOUND],[v.BIG,o.BIG],[v.BLOCKQUOTE,o.BLOCKQUOTE],[v.BODY,o.BODY],[v.BR,o.BR],[v.BUTTON,o.BUTTON],[v.CAPTION,o.CAPTION],[v.CENTER,o.CENTER],[v.CODE,o.CODE],[v.COL,o.COL],[v.COLGROUP,o.COLGROUP],[v.DD,o.DD],[v.DESC,o.DESC],[v.DETAILS,o.DETAILS],[v.DIALOG,o.DIALOG],[v.DIR,o.DIR],[v.DIV,o.DIV],[v.DL,o.DL],[v.DT,o.DT],[v.EM,o.EM],[v.EMBED,o.EMBED],[v.FIELDSET,o.FIELDSET],[v.FIGCAPTION,o.FIGCAPTION],[v.FIGURE,o.FIGURE],[v.FONT,o.FONT],[v.FOOTER,o.FOOTER],[v.FOREIGN_OBJECT,o.FOREIGN_OBJECT],[v.FORM,o.FORM],[v.FRAME,o.FRAME],[v.FRAMESET,o.FRAMESET],[v.H1,o.H1],[v.H2,o.H2],[v.H3,o.H3],[v.H4,o.H4],[v.H5,o.H5],[v.H6,o.H6],[v.HEAD,o.HEAD],[v.HEADER,o.HEADER],[v.HGROUP,o.HGROUP],[v.HR,o.HR],[v.HTML,o.HTML],[v.I,o.I],[v.IMG,o.IMG],[v.IMAGE,o.IMAGE],[v.INPUT,o.INPUT],[v.IFRAME,o.IFRAME],[v.KEYGEN,o.KEYGEN],[v.LABEL,o.LABEL],[v.LI,o.LI],[v.LINK,o.LINK],[v.LISTING,o.LISTING],[v.MAIN,o.MAIN],[v.MALIGNMARK,o.MALIGNMARK],[v.MARQUEE,o.MARQUEE],[v.MATH,o.MATH],[v.MENU,o.MENU],[v.META,o.META],[v.MGLYPH,o.MGLYPH],[v.MI,o.MI],[v.MO,o.MO],[v.MN,o.MN],[v.MS,o.MS],[v.MTEXT,o.MTEXT],[v.NAV,o.NAV],[v.NOBR,o.NOBR],[v.NOFRAMES,o.NOFRAMES],[v.NOEMBED,o.NOEMBED],[v.NOSCRIPT,o.NOSCRIPT],[v.OBJECT,o.OBJECT],[v.OL,o.OL],[v.OPTGROUP,o.OPTGROUP],[v.OPTION,o.OPTION],[v.P,o.P],[v.PARAM,o.PARAM],[v.PLAINTEXT,o.PLAINTEXT],[v.PRE,o.PRE],[v.RB,o.RB],[v.RP,o.RP],[v.RT,o.RT],[v.RTC,o.RTC],[v.RUBY,o.RUBY],[v.S,o.S],[v.SCRIPT,o.SCRIPT],[v.SEARCH,o.SEARCH],[v.SECTION,o.SECTION],[v.SELECT,o.SELECT],[v.SOURCE,o.SOURCE],[v.SMALL,o.SMALL],[v.SPAN,o.SPAN],[v.STRIKE,o.STRIKE],[v.STRONG,o.STRONG],[v.STYLE,o.STYLE],[v.SUB,o.SUB],[v.SUMMARY,o.SUMMARY],[v.SUP,o.SUP],[v.TABLE,o.TABLE],[v.TBODY,o.TBODY],[v.TEMPLATE,o.TEMPLATE],[v.TEXTAREA,o.TEXTAREA],[v.TFOOT,o.TFOOT],[v.TD,o.TD],[v.TH,o.TH],[v.THEAD,o.THEAD],[v.TITLE,o.TITLE],[v.TR,o.TR],[v.TRACK,o.TRACK],[v.TT,o.TT],[v.U,o.U],[v.UL,o.UL],[v.SVG,o.SVG],[v.VAR,o.VAR],[v.WBR,o.WBR],[v.XMP,o.XMP]]);function Tn(e){var t;return(t=dg.get(e))!==null&&t!==void 0?t:o.UNKNOWN}const B=o,hg={[P.HTML]:new Set([B.ADDRESS,B.APPLET,B.AREA,B.ARTICLE,B.ASIDE,B.BASE,B.BASEFONT,B.BGSOUND,B.BLOCKQUOTE,B.BODY,B.BR,B.BUTTON,B.CAPTION,B.CENTER,B.COL,B.COLGROUP,B.DD,B.DETAILS,B.DIR,B.DIV,B.DL,B.DT,B.EMBED,B.FIELDSET,B.FIGCAPTION,B.FIGURE,B.FOOTER,B.FORM,B.FRAME,B.FRAMESET,B.H1,B.H2,B.H3,B.H4,B.H5,B.H6,B.HEAD,B.HEADER,B.HGROUP,B.HR,B.HTML,B.IFRAME,B.IMG,B.INPUT,B.LI,B.LINK,B.LISTING,B.MAIN,B.MARQUEE,B.MENU,B.META,B.NAV,B.NOEMBED,B.NOFRAMES,B.NOSCRIPT,B.OBJECT,B.OL,B.P,B.PARAM,B.PLAINTEXT,B.PRE,B.SCRIPT,B.SECTION,B.SELECT,B.SOURCE,B.STYLE,B.SUMMARY,B.TABLE,B.TBODY,B.TD,B.TEMPLATE,B.TEXTAREA,B.TFOOT,B.TH,B.THEAD,B.TITLE,B.TR,B.TRACK,B.UL,B.WBR,B.XMP]),[P.MATHML]:new Set([B.MI,B.MO,B.MN,B.MS,B.MTEXT,B.ANNOTATION_XML]),[P.SVG]:new Set([B.TITLE,B.FOREIGN_OBJECT,B.DESC]),[P.XLINK]:new Set,[P.XML]:new Set,[P.XMLNS]:new Set},qi=new Set([B.H1,B.H2,B.H3,B.H4,B.H5,B.H6]);v.STYLE,v.SCRIPT,v.XMP,v.IFRAME,v.NOEMBED,v.NOFRAMES,v.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 Le={DATA:E.DATA,RCDATA:E.RCDATA,RAWTEXT:E.RAWTEXT,SCRIPT_DATA:E.SCRIPT_DATA,PLAINTEXT:E.PLAINTEXT,CDATA_SECTION:E.CDATA_SECTION};function mg(e){return e>=g.DIGIT_0&&e<=g.DIGIT_9}function In(e){return e>=g.LATIN_CAPITAL_A&&e<=g.LATIN_CAPITAL_Z}function pg(e){return e>=g.LATIN_SMALL_A&&e<=g.LATIN_SMALL_Z}function wt(e){return pg(e)||In(e)}function Gs(e){return wt(e)||mg(e)}function rr(e){return e+32}function cl(e){return e===g.SPACE||e===g.LINE_FEED||e===g.TABULATION||e===g.FORM_FEED}function Vs(e){return cl(e)||e===g.SOLIDUS||e===g.GREATER_THAN_SIGN}function gg(e){return e===g.NULL?R.nullCharacterReference:e>1114111?R.characterReferenceOutsideUnicodeRange:rl(e)?R.surrogateCharacterReference:al(e)?R.noncharacterCharacterReference:il(e)||e===g.CARRIAGE_RETURN?R.controlCharacterReference:null}class bg{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 ng(n),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new ol(ul,(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=gg(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:fe.START_TAG,tagName:"",tagID:o.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:fe.END_TAG,tagName:"",tagID:o.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(t){this.currentToken={type:fe.COMMENT,data:"",location:this.getCurrentLocation(t)}}_createDoctypeToken(t){this.currentToken={type:fe.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(sl(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=Tn(t.tagName),t.type===fe.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 fe.CHARACTER:{this.handler.onCharacter(this.currentCharacterToken);break}case fe.NULL_CHARACTER:{this.handler.onNullCharacter(this.currentCharacterToken);break}case fe.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:fe.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=cl(t)?fe.WHITESPACE_CHARACTER:t===g.NULL?fe.NULL_CHARACTER:fe.CHARACTER;this._appendCharToCurrentCharacterToken(n,String.fromCodePoint(t))}_emitChars(t){this._appendCharToCurrentCharacterToken(fe.CHARACTER,t)}_startCharacterReference(){this.returnState=this.state,this.state=E.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?At.Attribute:At.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(R.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(R.unexpectedNullCharacter),this._emitChars(ve);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(R.unexpectedNullCharacter),this._emitChars(ve);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(R.unexpectedNullCharacter),this._emitChars(ve);break}case g.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_statePlaintext(t){switch(t){case g.NULL:{this._err(R.unexpectedNullCharacter),this._emitChars(ve);break}case g.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateTagOpen(t){if(wt(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(R.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=E.BOGUS_COMMENT,this._stateBogusComment(t);break}case g.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(wt(t))this._createEndTagToken(),this.state=E.TAG_NAME,this._stateTagName(t);else switch(t){case g.GREATER_THAN_SIGN:{this._err(R.missingEndTagName),this.state=E.DATA;break}case g.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 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(R.unexpectedNullCharacter),n.tagName+=ve;break}case g.EOF:{this._err(R.eofInTag),this._emitEOFToken();break}default:n.tagName+=String.fromCodePoint(In(t)?rr(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){wt(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){wt(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){wt(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(R.unexpectedNullCharacter),this._emitChars(ve);break}case g.EOF:{this._err(R.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(R.unexpectedNullCharacter),this.state=E.SCRIPT_DATA_ESCAPED,this._emitChars(ve);break}case g.EOF:{this._err(R.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(R.unexpectedNullCharacter),this.state=E.SCRIPT_DATA_ESCAPED,this._emitChars(ve);break}case g.EOF:{this._err(R.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:wt(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){wt(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)&&Vs(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 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(R.unexpectedNullCharacter),this._emitChars(ve);break}case g.EOF:{this._err(R.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(R.unexpectedNullCharacter),this.state=E.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(ve);break}case g.EOF:{this._err(R.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(R.unexpectedNullCharacter),this.state=E.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(ve);break}case g.EOF:{this._err(R.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(Xe.SCRIPT,!1)&&Vs(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 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(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 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(R.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(t);break}case g.NULL:{this._err(R.unexpectedNullCharacter),this.currentAttr.name+=ve;break}default:this.currentAttr.name+=String.fromCodePoint(In(t)?rr(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(R.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(R.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(R.unexpectedNullCharacter),this.currentAttr.value+=ve;break}case g.EOF:{this._err(R.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(R.unexpectedNullCharacter),this.currentAttr.value+=ve;break}case g.EOF:{this._err(R.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(R.unexpectedNullCharacter),this.currentAttr.value+=ve;break}case g.QUOTATION_MARK:case g.APOSTROPHE:case g.LESS_THAN_SIGN:case g.EQUALS_SIGN:case g.GRAVE_ACCENT:{this._err(R.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(t);break}case g.EOF:{this._err(R.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(R.eofInTag),this._emitEOFToken();break}default:this._err(R.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(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 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(R.unexpectedNullCharacter),n.data+=ve;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 g.HYPHEN_MINUS:{this.state=E.COMMENT_START_DASH;break}case g.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 g.HYPHEN_MINUS:{this.state=E.COMMENT_END;break}case g.GREATER_THAN_SIGN:{this._err(R.abruptClosingOfEmptyComment),this.state=E.DATA,this.emitCurrentComment(n);break}case g.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 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(R.unexpectedNullCharacter),n.data+=ve;break}case g.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 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(R.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(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 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(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 g.HYPHEN_MINUS:{n.data+="--!",this.state=E.COMMENT_END_DASH;break}case g.GREATER_THAN_SIGN:{this._err(R.incorrectlyClosedComment),this.state=E.DATA,this.emitCurrentComment(n);break}case g.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 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(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(In(t))this._createDoctypeToken(String.fromCharCode(rr(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(R.unexpectedNullCharacter),this._createDoctypeToken(ve),this.state=E.DOCTYPE_NAME;break}case g.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 g.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 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(R.unexpectedNullCharacter),n.name+=ve;break}case g.EOF:{this._err(R.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.name+=String.fromCodePoint(In(t)?rr(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(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 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(R.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=E.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case g.APOSTROPHE:{this._err(R.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=E.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case g.GREATER_THAN_SIGN:{this._err(R.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=E.DATA,this.emitCurrentDoctype(n);break}case g.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 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(R.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=E.DATA,this.emitCurrentDoctype(n);break}case g.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 g.QUOTATION_MARK:{this.state=E.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case g.NULL:{this._err(R.unexpectedNullCharacter),n.publicId+=ve;break}case g.GREATER_THAN_SIGN:{this._err(R.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=E.DATA;break}case g.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 g.APOSTROPHE:{this.state=E.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case g.NULL:{this._err(R.unexpectedNullCharacter),n.publicId+=ve;break}case g.GREATER_THAN_SIGN:{this._err(R.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=E.DATA;break}case g.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 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(R.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=E.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case g.APOSTROPHE:{this._err(R.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=E.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case g.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 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(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 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(R.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=E.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case g.APOSTROPHE:{this._err(R.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=E.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case g.GREATER_THAN_SIGN:{this._err(R.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=E.DATA,this.emitCurrentDoctype(n);break}case g.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 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(R.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=E.DATA,this.emitCurrentDoctype(n);break}case g.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 g.QUOTATION_MARK:{this.state=E.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case g.NULL:{this._err(R.unexpectedNullCharacter),n.systemId+=ve;break}case g.GREATER_THAN_SIGN:{this._err(R.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=E.DATA;break}case g.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 g.APOSTROPHE:{this.state=E.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case g.NULL:{this._err(R.unexpectedNullCharacter),n.systemId+=ve;break}case g.GREATER_THAN_SIGN:{this._err(R.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=E.DATA;break}case g.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 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(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 g.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=E.DATA;break}case g.NULL:{this._err(R.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(R.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()&&Gs(this.preprocessor.peek(1))?E.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(t){Gs(t)?this._flushCodePointConsumedAsCharacterReference(t):(t===g.SEMICOLON&&this._err(R.unknownNamedCharacterReference),this.state=this.returnState,this._callState(t))}}const fl=new Set([o.DD,o.DT,o.LI,o.OPTGROUP,o.OPTION,o.P,o.RB,o.RP,o.RT,o.RTC]),qs=new Set([...fl,o.CAPTION,o.COLGROUP,o.TBODY,o.TD,o.TFOOT,o.TH,o.THEAD,o.TR]),gr=new Set([o.APPLET,o.CAPTION,o.HTML,o.MARQUEE,o.OBJECT,o.TABLE,o.TD,o.TEMPLATE,o.TH]),Eg=new Set([...gr,o.OL,o.UL]),Tg=new Set([...gr,o.BUTTON]),Ws=new Set([o.ANNOTATION_XML,o.MI,o.MN,o.MO,o.MS,o.MTEXT]),Xs=new Set([o.DESC,o.FOREIGN_OBJECT,o.TITLE]),yg=new Set([o.TR,o.TEMPLATE,o.HTML]),xg=new Set([o.TBODY,o.TFOOT,o.THEAD,o.TEMPLATE,o.HTML]),Ag=new Set([o.TABLE,o.TEMPLATE,o.HTML]),_g=new Set([o.TD,o.TH]);class Sg{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=o.UNKNOWN,this.current=t}_indexOf(t){return this.items.lastIndexOf(t,this.stackTop)}_isInTemplate(){return this.currentTagId===o.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===P.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])!==P.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,P.HTML)}popUntilTableCellPopped(){this.popUntilPopped(_g,P.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(Ag,P.HTML)}clearBackToTableBodyContext(){this.clearBackTo(xg,P.HTML)}clearBackToTableRowContext(){this.clearBackTo(yg,P.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]===o.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]===o.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 P.HTML:{if(i===t)return!0;if(n.has(i))return!1;break}case P.SVG:{if(Xs.has(i))return!1;break}case P.MATHML:{if(Ws.has(i))return!1;break}}}return!0}hasInScope(t){return this.hasInDynamicScope(t,gr)}hasInListItemScope(t){return this.hasInDynamicScope(t,Eg)}hasInButtonScope(t){return this.hasInDynamicScope(t,Tg)}hasNumberedHeaderInScope(){for(let t=this.stackTop;t>=0;t--){const n=this.tagIDs[t];switch(this.treeAdapter.getNamespaceURI(this.items[t])){case P.HTML:{if(qi.has(n))return!0;if(gr.has(n))return!1;break}case P.SVG:{if(Xs.has(n))return!1;break}case P.MATHML:{if(Ws.has(n))return!1;break}}}return!0}hasInTableScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===P.HTML)switch(this.tagIDs[n]){case t:return!0;case o.TABLE:case o.HTML:return!1}return!0}hasTableBodyContextInTableScope(){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===P.HTML)switch(this.tagIDs[t]){case o.TBODY:case o.THEAD:case o.TFOOT:return!0;case o.TABLE:case o.HTML:return!1}return!0}hasInSelectScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===P.HTML)switch(this.tagIDs[n]){case t:return!0;case o.OPTION:case o.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;fl.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 ci=3;var mt;(function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"})(mt||(mt={}));const Qs={type:mt.Marker};class Cg{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 u=0;u<this.entries.length;u++){const l=this.entries[u];if(l.type===mt.Marker)break;const{element:c}=l;if(this.treeAdapter.getTagName(c)===a&&this.treeAdapter.getNamespaceURI(c)===s){const f=this.treeAdapter.getAttrList(c);f.length===i&&r.push({idx:u,attrs:f})}}return r}_ensureNoahArkCondition(t){if(this.entries.length<ci)return;const n=this.treeAdapter.getAttrList(t),r=this._getNoahArkConditionCandidates(t,n);if(r.length<ci)return;const i=new Map(n.map(s=>[s.name,s.value]));let a=0;for(let s=0;s<r.length;s++){const u=r[s];u.attrs.every(l=>i.get(l.name)===l.value)&&(a+=1,a>=ci&&this.entries.splice(u.idx,1))}}insertMarker(){this.entries.unshift(Qs)}pushElement(t,n){this._ensureNoahArkCondition(t),this.entries.unshift({type:mt.Element,element:t,token:n})}insertElementAfterBookmark(t,n){const r=this.entries.indexOf(this.bookmark);this.entries.splice(r,0,{type:mt.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(Qs);t>=0?this.entries.splice(0,t+1):this.entries.length=0}getElementEntryInScopeWithTagName(t){const n=this.entries.find(r=>r.type===mt.Marker||this.treeAdapter.getTagName(r.element)===t);return n&&n.type===mt.Element?n:null}getElementEntry(t){return this.entries.find(n=>n.type===mt.Element&&n.element===t)}}const It={createDocument(){return{nodeName:"#document",mode:et.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};It.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(It.isTextNode(n)){n.value+=t;return}}It.appendChild(e,It.createTextNode(t))},insertTextBefore(e,t,n){const r=e.childNodes[e.childNodes.indexOf(n)-1];r&&It.isTextNode(r)?r.value+=t:It.insertBefore(e,It.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}}},dl="html",wg="about:legacy-compat",Ig="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",hl=["+//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//"],vg=[...hl,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],Ng=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),ml=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],kg=[...ml,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function Ks(e,t){return t.some(n=>e.startsWith(n))}function Og(e){return e.name===dl&&e.publicId===null&&(e.systemId===null||e.systemId===wg)}function Lg(e){if(e.name!==dl)return et.QUIRKS;const{systemId:t}=e;if(t&&t.toLowerCase()===Ig)return et.QUIRKS;let{publicId:n}=e;if(n!==null){if(n=n.toLowerCase(),Ng.has(n))return et.QUIRKS;let r=t===null?vg:hl;if(Ks(n,r))return et.QUIRKS;if(r=t===null?ml:kg,Ks(n,r))return et.LIMITED_QUIRKS}return et.NO_QUIRKS}const Zs={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},Rg="definitionurl",Dg="definitionURL",Pg=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])),Mg=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:P.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:P.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:P.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:P.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:P.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:P.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:P.XLINK}],["xml:lang",{prefix:"xml",name:"lang",namespace:P.XML}],["xml:space",{prefix:"xml",name:"space",namespace:P.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:P.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:P.XMLNS}]]),Bg=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])),Fg=new Set([o.B,o.BIG,o.BLOCKQUOTE,o.BODY,o.BR,o.CENTER,o.CODE,o.DD,o.DIV,o.DL,o.DT,o.EM,o.EMBED,o.H1,o.H2,o.H3,o.H4,o.H5,o.H6,o.HEAD,o.HR,o.I,o.IMG,o.LI,o.LISTING,o.MENU,o.META,o.NOBR,o.OL,o.P,o.PRE,o.RUBY,o.S,o.SMALL,o.SPAN,o.STRONG,o.STRIKE,o.SUB,o.SUP,o.TABLE,o.TT,o.U,o.UL,o.VAR]);function Hg(e){const t=e.tagID;return t===o.FONT&&e.attrs.some(({name:r})=>r===$t.COLOR||r===$t.SIZE||r===$t.FACE)||Fg.has(t)}function pl(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===Rg){e.attrs[t].name=Dg;break}}function gl(e){for(let t=0;t<e.attrs.length;t++){const n=Pg.get(e.attrs[t].name);n!=null&&(e.attrs[t].name=n)}}function Ca(e){for(let t=0;t<e.attrs.length;t++){const n=Mg.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 Ug(e){const t=Bg.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=Tn(e.tagName))}function jg(e,t){return t===P.MATHML&&(e===o.MI||e===o.MO||e===o.MN||e===o.MS||e===o.MTEXT)}function zg(e,t,n){if(t===P.MATHML&&e===o.ANNOTATION_XML){for(let r=0;r<n.length;r++)if(n[r].name===$t.ENCODING){const i=n[r].value.toLowerCase();return i===Zs.TEXT_HTML||i===Zs.APPLICATION_XML}}return t===P.SVG&&(e===o.FOREIGN_OBJECT||e===o.DESC||e===o.TITLE)}function $g(e,t,n,r){return(!r||r===P.HTML)&&zg(e,t,n)||(!r||r===P.MATHML)&&jg(e,t)}const Yg="hidden",Gg=8,Vg=3;var y;(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"})(y||(y={}));const qg={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},bl=new Set([o.TABLE,o.TBODY,o.TFOOT,o.THEAD,o.TR]),Js={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:It,onParseError:null};class eu{constructor(t,n,r=null,i=null){this.fragmentContext=r,this.scriptHandler=i,this.currentToken=null,this.stopped=!1,this.insertionMode=y.INITIAL,this.originalInsertionMode=y.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={...Js,...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 bg(this.options,this),this.activeFormattingElements=new Cg(this.treeAdapter),this.fragmentContextID=r?Tn(this.treeAdapter.getTagName(r)):o.UNKNOWN,this._setContextModes(r??this.document,this.fragmentContextID),this.openElements=new Sg(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={...Js,...n};t??(t=r.treeAdapter.createElement(v.TEMPLATE,P.HTML,[]));const i=r.treeAdapter.createElement("documentmock",P.HTML,[]),a=new this(r,i,t);return a.fragmentContextID===o.TEMPLATE&&a.tmplInsertionModeStack.unshift(y.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:qg,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)===P.HTML;this.currentNotInHTML=!r,this.tokenizer.inForeignNode=!r&&!this._isIntegrationPoint(n,t)}_switchToTextParsing(t,n){this._insertElement(t,P.HTML),this.tokenizer.state=n,this.originalInsertionMode=this.insertionMode,this.insertionMode=y.TEXT}switchToPlaintextParsing(){this.insertionMode=y.TEXT,this.originalInsertionMode=y.IN_BODY,this.tokenizer.state=Le.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)===v.FORM){this.formElement=t;break}t=this.treeAdapter.getParentNode(t)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==P.HTML))switch(this.fragmentContextID){case o.TITLE:case o.TEXTAREA:{this.tokenizer.state=Le.RCDATA;break}case o.STYLE:case o.XMP:case o.IFRAME:case o.NOEMBED:case o.NOFRAMES:case o.NOSCRIPT:{this.tokenizer.state=Le.RAWTEXT;break}case o.SCRIPT:{this.tokenizer.state=Le.SCRIPT_DATA;break}case o.PLAINTEXT:{this.tokenizer.state=Le.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(u=>this.treeAdapter.isDocumentTypeNode(u));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,P.HTML,[]);this._attachElementToTree(r,null),this.openElements.push(r,n)}_insertTemplate(t){const n=this.treeAdapter.createElement(t.tagName,P.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(v.HTML,P.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(t,null),this.treeAdapter.appendChild(this.openElements.current,t),this.openElements.push(t,o.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:l,endCol:c,endOffset:f}=t.location;this.treeAdapter.updateNodeSourceCodeLocation(s,{endLine:l,endCol:c,endOffset:f})}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===fe.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===o.SVG&&this.treeAdapter.getTagName(n)===v.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(n)===P.MATHML?!1:this.tokenizer.inForeignNode||(t.tagID===o.MGLYPH||t.tagID===o.MALIGNMARK)&&!this._isIntegrationPoint(r,n,P.HTML)}_processToken(t){switch(t.type){case fe.CHARACTER:{this.onCharacter(t);break}case fe.NULL_CHARACTER:{this.onNullCharacter(t);break}case fe.COMMENT:{this.onComment(t);break}case fe.DOCTYPE:{this.onDoctype(t);break}case fe.START_TAG:{this._processStartTag(t);break}case fe.END_TAG:{this.onEndTag(t);break}case fe.EOF:{this.onEof(t);break}case fe.WHITESPACE_CHARACTER:{this.onWhitespaceCharacter(t);break}}}_isIntegrationPoint(t,n,r){const i=this.treeAdapter.getNamespaceURI(n),a=this.treeAdapter.getAttrList(n);return $g(t,i,a,r)}_reconstructActiveFormattingElements(){const t=this.activeFormattingElements.entries.length;if(t){const n=this.activeFormattingElements.entries.findIndex(i=>i.type===mt.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=y.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(o.P),this.openElements.popUntilTagNamePopped(o.P)}_resetInsertionMode(){for(let t=this.openElements.stackTop;t>=0;t--)switch(t===0&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[t]){case o.TR:{this.insertionMode=y.IN_ROW;return}case o.TBODY:case o.THEAD:case o.TFOOT:{this.insertionMode=y.IN_TABLE_BODY;return}case o.CAPTION:{this.insertionMode=y.IN_CAPTION;return}case o.COLGROUP:{this.insertionMode=y.IN_COLUMN_GROUP;return}case o.TABLE:{this.insertionMode=y.IN_TABLE;return}case o.BODY:{this.insertionMode=y.IN_BODY;return}case o.FRAMESET:{this.insertionMode=y.IN_FRAMESET;return}case o.SELECT:{this._resetInsertionModeForSelect(t);return}case o.TEMPLATE:{this.insertionMode=this.tmplInsertionModeStack[0];return}case o.HTML:{this.insertionMode=this.headElement?y.AFTER_HEAD:y.BEFORE_HEAD;return}case o.TD:case o.TH:{if(t>0){this.insertionMode=y.IN_CELL;return}break}case o.HEAD:{if(t>0){this.insertionMode=y.IN_HEAD;return}break}}this.insertionMode=y.IN_BODY}_resetInsertionModeForSelect(t){if(t>0)for(let n=t-1;n>0;n--){const r=this.openElements.tagIDs[n];if(r===o.TEMPLATE)break;if(r===o.TABLE){this.insertionMode=y.IN_SELECT_IN_TABLE;return}}this.insertionMode=y.IN_SELECT}_isElementCausesFosterParenting(t){return bl.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 o.TEMPLATE:{if(this.treeAdapter.getNamespaceURI(n)===P.HTML)return{parent:this.treeAdapter.getTemplateContent(n),beforeElement:null};break}case o.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 hg[r].has(n)}onCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){_b(this,t);return}switch(this.insertionMode){case y.INITIAL:{_n(this,t);break}case y.BEFORE_HTML:{On(this,t);break}case y.BEFORE_HEAD:{Ln(this,t);break}case y.IN_HEAD:{Rn(this,t);break}case y.IN_HEAD_NO_SCRIPT:{Dn(this,t);break}case y.AFTER_HEAD:{Pn(this,t);break}case y.IN_BODY:case y.IN_CAPTION:case y.IN_CELL:case y.IN_TEMPLATE:{Tl(this,t);break}case y.TEXT:case y.IN_SELECT:case y.IN_SELECT_IN_TABLE:{this._insertCharacters(t);break}case y.IN_TABLE:case y.IN_TABLE_BODY:case y.IN_ROW:{fi(this,t);break}case y.IN_TABLE_TEXT:{Cl(this,t);break}case y.IN_COLUMN_GROUP:{br(this,t);break}case y.AFTER_BODY:{Er(this,t);break}case y.AFTER_AFTER_BODY:{fr(this,t);break}}}onNullCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){Ab(this,t);return}switch(this.insertionMode){case y.INITIAL:{_n(this,t);break}case y.BEFORE_HTML:{On(this,t);break}case y.BEFORE_HEAD:{Ln(this,t);break}case y.IN_HEAD:{Rn(this,t);break}case y.IN_HEAD_NO_SCRIPT:{Dn(this,t);break}case y.AFTER_HEAD:{Pn(this,t);break}case y.TEXT:{this._insertCharacters(t);break}case y.IN_TABLE:case y.IN_TABLE_BODY:case y.IN_ROW:{fi(this,t);break}case y.IN_COLUMN_GROUP:{br(this,t);break}case y.AFTER_BODY:{Er(this,t);break}case y.AFTER_AFTER_BODY:{fr(this,t);break}}}onComment(t){if(this.skipNextNewLine=!1,this.currentNotInHTML){Wi(this,t);return}switch(this.insertionMode){case y.INITIAL:case y.BEFORE_HTML:case y.BEFORE_HEAD:case y.IN_HEAD:case y.IN_HEAD_NO_SCRIPT:case y.AFTER_HEAD:case y.IN_BODY:case y.IN_TABLE:case y.IN_CAPTION:case y.IN_COLUMN_GROUP:case y.IN_TABLE_BODY:case y.IN_ROW:case y.IN_CELL:case y.IN_SELECT:case y.IN_SELECT_IN_TABLE:case y.IN_TEMPLATE:case y.IN_FRAMESET:case y.AFTER_FRAMESET:{Wi(this,t);break}case y.IN_TABLE_TEXT:{Sn(this,t);break}case y.AFTER_BODY:{e1(this,t);break}case y.AFTER_AFTER_BODY:case y.AFTER_AFTER_FRAMESET:{t1(this,t);break}}}onDoctype(t){switch(this.skipNextNewLine=!1,this.insertionMode){case y.INITIAL:{n1(this,t);break}case y.BEFORE_HEAD:case y.IN_HEAD:case y.IN_HEAD_NO_SCRIPT:case y.AFTER_HEAD:{this._err(t,R.misplacedDoctype);break}case y.IN_TABLE_TEXT:{Sn(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)?Sb(this,t):this._startTagOutsideForeignContent(t)}_startTagOutsideForeignContent(t){switch(this.insertionMode){case y.INITIAL:{_n(this,t);break}case y.BEFORE_HTML:{r1(this,t);break}case y.BEFORE_HEAD:{a1(this,t);break}case y.IN_HEAD:{ot(this,t);break}case y.IN_HEAD_NO_SCRIPT:{o1(this,t);break}case y.AFTER_HEAD:{c1(this,t);break}case y.IN_BODY:{$e(this,t);break}case y.IN_TABLE:{dn(this,t);break}case y.IN_TABLE_TEXT:{Sn(this,t);break}case y.IN_CAPTION:{sb(this,t);break}case y.IN_COLUMN_GROUP:{va(this,t);break}case y.IN_TABLE_BODY:{Hr(this,t);break}case y.IN_ROW:{Ur(this,t);break}case y.IN_CELL:{lb(this,t);break}case y.IN_SELECT:{vl(this,t);break}case y.IN_SELECT_IN_TABLE:{fb(this,t);break}case y.IN_TEMPLATE:{hb(this,t);break}case y.AFTER_BODY:{pb(this,t);break}case y.IN_FRAMESET:{gb(this,t);break}case y.AFTER_FRAMESET:{Eb(this,t);break}case y.AFTER_AFTER_BODY:{yb(this,t);break}case y.AFTER_AFTER_FRAMESET:{xb(this,t);break}}}onEndTag(t){this.skipNextNewLine=!1,this.currentToken=t,this.currentNotInHTML?Cb(this,t):this._endTagOutsideForeignContent(t)}_endTagOutsideForeignContent(t){switch(this.insertionMode){case y.INITIAL:{_n(this,t);break}case y.BEFORE_HTML:{i1(this,t);break}case y.BEFORE_HEAD:{s1(this,t);break}case y.IN_HEAD:{u1(this,t);break}case y.IN_HEAD_NO_SCRIPT:{l1(this,t);break}case y.AFTER_HEAD:{f1(this,t);break}case y.IN_BODY:{Fr(this,t);break}case y.TEXT:{Q1(this,t);break}case y.IN_TABLE:{Hn(this,t);break}case y.IN_TABLE_TEXT:{Sn(this,t);break}case y.IN_CAPTION:{ub(this,t);break}case y.IN_COLUMN_GROUP:{ob(this,t);break}case y.IN_TABLE_BODY:{Xi(this,t);break}case y.IN_ROW:{Il(this,t);break}case y.IN_CELL:{cb(this,t);break}case y.IN_SELECT:{Nl(this,t);break}case y.IN_SELECT_IN_TABLE:{db(this,t);break}case y.IN_TEMPLATE:{mb(this,t);break}case y.AFTER_BODY:{Ol(this,t);break}case y.IN_FRAMESET:{bb(this,t);break}case y.AFTER_FRAMESET:{Tb(this,t);break}case y.AFTER_AFTER_BODY:{fr(this,t);break}}}onEof(t){switch(this.insertionMode){case y.INITIAL:{_n(this,t);break}case y.BEFORE_HTML:{On(this,t);break}case y.BEFORE_HEAD:{Ln(this,t);break}case y.IN_HEAD:{Rn(this,t);break}case y.IN_HEAD_NO_SCRIPT:{Dn(this,t);break}case y.AFTER_HEAD:{Pn(this,t);break}case y.IN_BODY:case y.IN_TABLE:case y.IN_CAPTION:case y.IN_COLUMN_GROUP:case y.IN_TABLE_BODY:case y.IN_ROW:case y.IN_CELL:case y.IN_SELECT:case y.IN_SELECT_IN_TABLE:{_l(this,t);break}case y.TEXT:{K1(this,t);break}case y.IN_TABLE_TEXT:{Sn(this,t);break}case y.IN_TEMPLATE:{kl(this,t);break}case y.AFTER_BODY:case y.IN_FRAMESET:case y.AFTER_FRAMESET:case y.AFTER_AFTER_BODY:case y.AFTER_AFTER_FRAMESET:{Ia(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 y.IN_HEAD:case y.IN_HEAD_NO_SCRIPT:case y.AFTER_HEAD:case y.TEXT:case y.IN_COLUMN_GROUP:case y.IN_SELECT:case y.IN_SELECT_IN_TABLE:case y.IN_FRAMESET:case y.AFTER_FRAMESET:{this._insertCharacters(t);break}case y.IN_BODY:case y.IN_CAPTION:case y.IN_CELL:case y.IN_TEMPLATE:case y.AFTER_BODY:case y.AFTER_AFTER_BODY:case y.AFTER_AFTER_FRAMESET:{El(this,t);break}case y.IN_TABLE:case y.IN_TABLE_BODY:case y.IN_ROW:{fi(this,t);break}case y.IN_TABLE_TEXT:{Sl(this,t);break}}}}function Wg(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):Al(e,t),n}function Xg(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 Qg(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 u=e.activeFormattingElements.getElementEntry(s),l=u&&a>=Vg;!u||l?(l&&e.activeFormattingElements.removeEntry(u),e.openElements.remove(s)):(s=Kg(e,u),r===t&&(e.activeFormattingElements.bookmark=u),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(s,r),r=s)}return r}function Kg(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 Zg(e,t,n){const r=e.treeAdapter.getTagName(t),i=Tn(r);if(e._isElementCausesFosterParenting(i))e._fosterParentElement(n);else{const a=e.treeAdapter.getNamespaceURI(t);i===o.TEMPLATE&&a===P.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function Jg(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 wa(e,t){for(let n=0;n<Gg;n++){const r=Wg(e,t);if(!r)break;const i=Xg(e,r);if(!i)break;e.activeFormattingElements.bookmark=r;const a=Qg(e,i,r.element),s=e.openElements.getCommonAncestor(r.element);e.treeAdapter.detachNode(a),s&&Zg(e,s,a),Jg(e,i,r)}}function Wi(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function e1(e,t){e._appendCommentNode(t,e.openElements.items[0])}function t1(e,t){e._appendCommentNode(t,e.document)}function Ia(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 n1(e,t){e._setDocumentType(t);const n=t.forceQuirks?et.QUIRKS:Lg(t);Og(t)||e._err(t,R.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=y.BEFORE_HTML}function _n(e,t){e._err(t,R.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,et.QUIRKS),e.insertionMode=y.BEFORE_HTML,e._processToken(t)}function r1(e,t){t.tagID===o.HTML?(e._insertElement(t,P.HTML),e.insertionMode=y.BEFORE_HEAD):On(e,t)}function i1(e,t){const n=t.tagID;(n===o.HTML||n===o.HEAD||n===o.BODY||n===o.BR)&&On(e,t)}function On(e,t){e._insertFakeRootElement(),e.insertionMode=y.BEFORE_HEAD,e._processToken(t)}function a1(e,t){switch(t.tagID){case o.HTML:{$e(e,t);break}case o.HEAD:{e._insertElement(t,P.HTML),e.headElement=e.openElements.current,e.insertionMode=y.IN_HEAD;break}default:Ln(e,t)}}function s1(e,t){const n=t.tagID;n===o.HEAD||n===o.BODY||n===o.HTML||n===o.BR?Ln(e,t):e._err(t,R.endTagWithoutMatchingOpenElement)}function Ln(e,t){e._insertFakeElement(v.HEAD,o.HEAD),e.headElement=e.openElements.current,e.insertionMode=y.IN_HEAD,e._processToken(t)}function ot(e,t){switch(t.tagID){case o.HTML:{$e(e,t);break}case o.BASE:case o.BASEFONT:case o.BGSOUND:case o.LINK:case o.META:{e._appendElement(t,P.HTML),t.ackSelfClosing=!0;break}case o.TITLE:{e._switchToTextParsing(t,Le.RCDATA);break}case o.NOSCRIPT:{e.options.scriptingEnabled?e._switchToTextParsing(t,Le.RAWTEXT):(e._insertElement(t,P.HTML),e.insertionMode=y.IN_HEAD_NO_SCRIPT);break}case o.NOFRAMES:case o.STYLE:{e._switchToTextParsing(t,Le.RAWTEXT);break}case o.SCRIPT:{e._switchToTextParsing(t,Le.SCRIPT_DATA);break}case o.TEMPLATE:{e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=y.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(y.IN_TEMPLATE);break}case o.HEAD:{e._err(t,R.misplacedStartTagForHeadElement);break}default:Rn(e,t)}}function u1(e,t){switch(t.tagID){case o.HEAD:{e.openElements.pop(),e.insertionMode=y.AFTER_HEAD;break}case o.BODY:case o.BR:case o.HTML:{Rn(e,t);break}case o.TEMPLATE:{Kt(e,t);break}default:e._err(t,R.endTagWithoutMatchingOpenElement)}}function Kt(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==o.TEMPLATE&&e._err(t,R.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(o.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,R.endTagWithoutMatchingOpenElement)}function Rn(e,t){e.openElements.pop(),e.insertionMode=y.AFTER_HEAD,e._processToken(t)}function o1(e,t){switch(t.tagID){case o.HTML:{$e(e,t);break}case o.BASEFONT:case o.BGSOUND:case o.HEAD:case o.LINK:case o.META:case o.NOFRAMES:case o.STYLE:{ot(e,t);break}case o.NOSCRIPT:{e._err(t,R.nestedNoscriptInHead);break}default:Dn(e,t)}}function l1(e,t){switch(t.tagID){case o.NOSCRIPT:{e.openElements.pop(),e.insertionMode=y.IN_HEAD;break}case o.BR:{Dn(e,t);break}default:e._err(t,R.endTagWithoutMatchingOpenElement)}}function Dn(e,t){const n=t.type===fe.EOF?R.openElementsLeftAfterEof:R.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=y.IN_HEAD,e._processToken(t)}function c1(e,t){switch(t.tagID){case o.HTML:{$e(e,t);break}case o.BODY:{e._insertElement(t,P.HTML),e.framesetOk=!1,e.insertionMode=y.IN_BODY;break}case o.FRAMESET:{e._insertElement(t,P.HTML),e.insertionMode=y.IN_FRAMESET;break}case o.BASE:case o.BASEFONT:case o.BGSOUND:case o.LINK:case o.META:case o.NOFRAMES:case o.SCRIPT:case o.STYLE:case o.TEMPLATE:case o.TITLE:{e._err(t,R.abandonedHeadElementChild),e.openElements.push(e.headElement,o.HEAD),ot(e,t),e.openElements.remove(e.headElement);break}case o.HEAD:{e._err(t,R.misplacedStartTagForHeadElement);break}default:Pn(e,t)}}function f1(e,t){switch(t.tagID){case o.BODY:case o.HTML:case o.BR:{Pn(e,t);break}case o.TEMPLATE:{Kt(e,t);break}default:e._err(t,R.endTagWithoutMatchingOpenElement)}}function Pn(e,t){e._insertFakeElement(v.BODY,o.BODY),e.insertionMode=y.IN_BODY,Br(e,t)}function Br(e,t){switch(t.type){case fe.CHARACTER:{Tl(e,t);break}case fe.WHITESPACE_CHARACTER:{El(e,t);break}case fe.COMMENT:{Wi(e,t);break}case fe.START_TAG:{$e(e,t);break}case fe.END_TAG:{Fr(e,t);break}case fe.EOF:{_l(e,t);break}}}function El(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function Tl(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function d1(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function h1(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}function m1(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,P.HTML),e.insertionMode=y.IN_FRAMESET)}function p1(e,t){e.openElements.hasInButtonScope(o.P)&&e._closePElement(),e._insertElement(t,P.HTML)}function g1(e,t){e.openElements.hasInButtonScope(o.P)&&e._closePElement(),qi.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,P.HTML)}function b1(e,t){e.openElements.hasInButtonScope(o.P)&&e._closePElement(),e._insertElement(t,P.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function E1(e,t){const n=e.openElements.tmplCount>0;(!e.formElement||n)&&(e.openElements.hasInButtonScope(o.P)&&e._closePElement(),e._insertElement(t,P.HTML),n||(e.formElement=e.openElements.current))}function T1(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===o.LI&&i===o.LI||(n===o.DD||n===o.DT)&&(i===o.DD||i===o.DT)){e.openElements.generateImpliedEndTagsWithExclusion(i),e.openElements.popUntilTagNamePopped(i);break}if(i!==o.ADDRESS&&i!==o.DIV&&i!==o.P&&e._isSpecialElement(e.openElements.items[r],i))break}e.openElements.hasInButtonScope(o.P)&&e._closePElement(),e._insertElement(t,P.HTML)}function y1(e,t){e.openElements.hasInButtonScope(o.P)&&e._closePElement(),e._insertElement(t,P.HTML),e.tokenizer.state=Le.PLAINTEXT}function x1(e,t){e.openElements.hasInScope(o.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(o.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,P.HTML),e.framesetOk=!1}function A1(e,t){const n=e.activeFormattingElements.getElementEntryInScopeWithTagName(v.A);n&&(wa(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,P.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function _1(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,P.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function S1(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(o.NOBR)&&(wa(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,P.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function C1(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,P.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function w1(e,t){e.treeAdapter.getDocumentMode(e.document)!==et.QUIRKS&&e.openElements.hasInButtonScope(o.P)&&e._closePElement(),e._insertElement(t,P.HTML),e.framesetOk=!1,e.insertionMode=y.IN_TABLE}function yl(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,P.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function xl(e){const t=sl(e,$t.TYPE);return t!=null&&t.toLowerCase()===Yg}function I1(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,P.HTML),xl(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function v1(e,t){e._appendElement(t,P.HTML),t.ackSelfClosing=!0}function N1(e,t){e.openElements.hasInButtonScope(o.P)&&e._closePElement(),e._appendElement(t,P.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function k1(e,t){t.tagName=v.IMG,t.tagID=o.IMG,yl(e,t)}function O1(e,t){e._insertElement(t,P.HTML),e.skipNextNewLine=!0,e.tokenizer.state=Le.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=y.TEXT}function L1(e,t){e.openElements.hasInButtonScope(o.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,Le.RAWTEXT)}function R1(e,t){e.framesetOk=!1,e._switchToTextParsing(t,Le.RAWTEXT)}function tu(e,t){e._switchToTextParsing(t,Le.RAWTEXT)}function D1(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,P.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===y.IN_TABLE||e.insertionMode===y.IN_CAPTION||e.insertionMode===y.IN_TABLE_BODY||e.insertionMode===y.IN_ROW||e.insertionMode===y.IN_CELL?y.IN_SELECT_IN_TABLE:y.IN_SELECT}function P1(e,t){e.openElements.currentTagId===o.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,P.HTML)}function M1(e,t){e.openElements.hasInScope(o.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,P.HTML)}function B1(e,t){e.openElements.hasInScope(o.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(o.RTC),e._insertElement(t,P.HTML)}function F1(e,t){e._reconstructActiveFormattingElements(),pl(t),Ca(t),t.selfClosing?e._appendElement(t,P.MATHML):e._insertElement(t,P.MATHML),t.ackSelfClosing=!0}function H1(e,t){e._reconstructActiveFormattingElements(),gl(t),Ca(t),t.selfClosing?e._appendElement(t,P.SVG):e._insertElement(t,P.SVG),t.ackSelfClosing=!0}function nu(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,P.HTML)}function $e(e,t){switch(t.tagID){case o.I:case o.S:case o.B:case o.U:case o.EM:case o.TT:case o.BIG:case o.CODE:case o.FONT:case o.SMALL:case o.STRIKE:case o.STRONG:{_1(e,t);break}case o.A:{A1(e,t);break}case o.H1:case o.H2:case o.H3:case o.H4:case o.H5:case o.H6:{g1(e,t);break}case o.P:case o.DL:case o.OL:case o.UL:case o.DIV:case o.DIR:case o.NAV:case o.MAIN:case o.MENU:case o.ASIDE:case o.CENTER:case o.FIGURE:case o.FOOTER:case o.HEADER:case o.HGROUP:case o.DIALOG:case o.DETAILS:case o.ADDRESS:case o.ARTICLE:case o.SEARCH:case o.SECTION:case o.SUMMARY:case o.FIELDSET:case o.BLOCKQUOTE:case o.FIGCAPTION:{p1(e,t);break}case o.LI:case o.DD:case o.DT:{T1(e,t);break}case o.BR:case o.IMG:case o.WBR:case o.AREA:case o.EMBED:case o.KEYGEN:{yl(e,t);break}case o.HR:{N1(e,t);break}case o.RB:case o.RTC:{M1(e,t);break}case o.RT:case o.RP:{B1(e,t);break}case o.PRE:case o.LISTING:{b1(e,t);break}case o.XMP:{L1(e,t);break}case o.SVG:{H1(e,t);break}case o.HTML:{d1(e,t);break}case o.BASE:case o.LINK:case o.META:case o.STYLE:case o.TITLE:case o.SCRIPT:case o.BGSOUND:case o.BASEFONT:case o.TEMPLATE:{ot(e,t);break}case o.BODY:{h1(e,t);break}case o.FORM:{E1(e,t);break}case o.NOBR:{S1(e,t);break}case o.MATH:{F1(e,t);break}case o.TABLE:{w1(e,t);break}case o.INPUT:{I1(e,t);break}case o.PARAM:case o.TRACK:case o.SOURCE:{v1(e,t);break}case o.IMAGE:{k1(e,t);break}case o.BUTTON:{x1(e,t);break}case o.APPLET:case o.OBJECT:case o.MARQUEE:{C1(e,t);break}case o.IFRAME:{R1(e,t);break}case o.SELECT:{D1(e,t);break}case o.OPTION:case o.OPTGROUP:{P1(e,t);break}case o.NOEMBED:case o.NOFRAMES:{tu(e,t);break}case o.FRAMESET:{m1(e,t);break}case o.TEXTAREA:{O1(e,t);break}case o.NOSCRIPT:{e.options.scriptingEnabled?tu(e,t):nu(e,t);break}case o.PLAINTEXT:{y1(e,t);break}case o.COL:case o.TH:case o.TD:case o.TR:case o.HEAD:case o.FRAME:case o.TBODY:case o.TFOOT:case o.THEAD:case o.CAPTION:case o.COLGROUP:break;default:nu(e,t)}}function U1(e,t){if(e.openElements.hasInScope(o.BODY)&&(e.insertionMode=y.AFTER_BODY,e.options.sourceCodeLocationInfo)){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e._setEndLocation(n,t)}}function j1(e,t){e.openElements.hasInScope(o.BODY)&&(e.insertionMode=y.AFTER_BODY,Ol(e,t))}function z1(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function $1(e){const t=e.openElements.tmplCount>0,{formElement:n}=e;t||(e.formElement=null),(n||t)&&e.openElements.hasInScope(o.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(o.FORM):n&&e.openElements.remove(n))}function Y1(e){e.openElements.hasInButtonScope(o.P)||e._insertFakeElement(v.P,o.P),e._closePElement()}function G1(e){e.openElements.hasInListItemScope(o.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(o.LI),e.openElements.popUntilTagNamePopped(o.LI))}function V1(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 W1(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function X1(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(v.BR,o.BR),e.openElements.pop(),e.framesetOk=!1}function Al(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!==o.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 Fr(e,t){switch(t.tagID){case o.A:case o.B:case o.I:case o.S:case o.U:case o.EM:case o.TT:case o.BIG:case o.CODE:case o.FONT:case o.NOBR:case o.SMALL:case o.STRIKE:case o.STRONG:{wa(e,t);break}case o.P:{Y1(e);break}case o.DL:case o.UL:case o.OL:case o.DIR:case o.DIV:case o.NAV:case o.PRE:case o.MAIN:case o.MENU:case o.ASIDE:case o.BUTTON:case o.CENTER:case o.FIGURE:case o.FOOTER:case o.HEADER:case o.HGROUP:case o.DIALOG:case o.ADDRESS:case o.ARTICLE:case o.DETAILS:case o.SEARCH:case o.SECTION:case o.SUMMARY:case o.LISTING:case o.FIELDSET:case o.BLOCKQUOTE:case o.FIGCAPTION:{z1(e,t);break}case o.LI:{G1(e);break}case o.DD:case o.DT:{V1(e,t);break}case o.H1:case o.H2:case o.H3:case o.H4:case o.H5:case o.H6:{q1(e);break}case o.BR:{X1(e);break}case o.BODY:{U1(e,t);break}case o.HTML:{j1(e,t);break}case o.FORM:{$1(e);break}case o.APPLET:case o.OBJECT:case o.MARQUEE:{W1(e,t);break}case o.TEMPLATE:{Kt(e,t);break}default:Al(e,t)}}function _l(e,t){e.tmplInsertionModeStack.length>0?kl(e,t):Ia(e,t)}function Q1(e,t){var n;t.tagID===o.SCRIPT&&((n=e.scriptHandler)===null||n===void 0||n.call(e,e.openElements.current)),e.openElements.pop(),e.insertionMode=e.originalInsertionMode}function K1(e,t){e._err(t,R.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function fi(e,t){if(bl.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=y.IN_TABLE_TEXT,t.type){case fe.CHARACTER:{Cl(e,t);break}case fe.WHITESPACE_CHARACTER:{Sl(e,t);break}}else qn(e,t)}function Z1(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,P.HTML),e.insertionMode=y.IN_CAPTION}function J1(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,P.HTML),e.insertionMode=y.IN_COLUMN_GROUP}function eb(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(v.COLGROUP,o.COLGROUP),e.insertionMode=y.IN_COLUMN_GROUP,va(e,t)}function tb(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,P.HTML),e.insertionMode=y.IN_TABLE_BODY}function nb(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(v.TBODY,o.TBODY),e.insertionMode=y.IN_TABLE_BODY,Hr(e,t)}function rb(e,t){e.openElements.hasInTableScope(o.TABLE)&&(e.openElements.popUntilTagNamePopped(o.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function ib(e,t){xl(t)?e._appendElement(t,P.HTML):qn(e,t),t.ackSelfClosing=!0}function ab(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,P.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function dn(e,t){switch(t.tagID){case o.TD:case o.TH:case o.TR:{nb(e,t);break}case o.STYLE:case o.SCRIPT:case o.TEMPLATE:{ot(e,t);break}case o.COL:{eb(e,t);break}case o.FORM:{ab(e,t);break}case o.TABLE:{rb(e,t);break}case o.TBODY:case o.TFOOT:case o.THEAD:{tb(e,t);break}case o.INPUT:{ib(e,t);break}case o.CAPTION:{Z1(e,t);break}case o.COLGROUP:{J1(e,t);break}default:qn(e,t)}}function Hn(e,t){switch(t.tagID){case o.TABLE:{e.openElements.hasInTableScope(o.TABLE)&&(e.openElements.popUntilTagNamePopped(o.TABLE),e._resetInsertionMode());break}case o.TEMPLATE:{Kt(e,t);break}case o.BODY:case o.CAPTION:case o.COL:case o.COLGROUP:case o.HTML:case o.TBODY:case o.TD:case o.TFOOT:case o.TH:case o.THEAD:case o.TR:break;default:qn(e,t)}}function qn(e,t){const n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,Br(e,t),e.fosterParentingEnabled=n}function Sl(e,t){e.pendingCharacterTokens.push(t)}function Cl(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function Sn(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)qn(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}const wl=new Set([o.CAPTION,o.COL,o.COLGROUP,o.TBODY,o.TD,o.TFOOT,o.TH,o.THEAD,o.TR]);function sb(e,t){const n=t.tagID;wl.has(n)?e.openElements.hasInTableScope(o.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(o.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=y.IN_TABLE,dn(e,t)):$e(e,t)}function ub(e,t){const n=t.tagID;switch(n){case o.CAPTION:case o.TABLE:{e.openElements.hasInTableScope(o.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(o.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=y.IN_TABLE,n===o.TABLE&&Hn(e,t));break}case o.BODY:case o.COL:case o.COLGROUP:case o.HTML:case o.TBODY:case o.TD:case o.TFOOT:case o.TH:case o.THEAD:case o.TR:break;default:Fr(e,t)}}function va(e,t){switch(t.tagID){case o.HTML:{$e(e,t);break}case o.COL:{e._appendElement(t,P.HTML),t.ackSelfClosing=!0;break}case o.TEMPLATE:{ot(e,t);break}default:br(e,t)}}function ob(e,t){switch(t.tagID){case o.COLGROUP:{e.openElements.currentTagId===o.COLGROUP&&(e.openElements.pop(),e.insertionMode=y.IN_TABLE);break}case o.TEMPLATE:{Kt(e,t);break}case o.COL:break;default:br(e,t)}}function br(e,t){e.openElements.currentTagId===o.COLGROUP&&(e.openElements.pop(),e.insertionMode=y.IN_TABLE,e._processToken(t))}function Hr(e,t){switch(t.tagID){case o.TR:{e.openElements.clearBackToTableBodyContext(),e._insertElement(t,P.HTML),e.insertionMode=y.IN_ROW;break}case o.TH:case o.TD:{e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(v.TR,o.TR),e.insertionMode=y.IN_ROW,Ur(e,t);break}case o.CAPTION:case o.COL:case o.COLGROUP:case o.TBODY:case o.TFOOT:case o.THEAD:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=y.IN_TABLE,dn(e,t));break}default:dn(e,t)}}function Xi(e,t){const n=t.tagID;switch(t.tagID){case o.TBODY:case o.TFOOT:case o.THEAD:{e.openElements.hasInTableScope(n)&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=y.IN_TABLE);break}case o.TABLE:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=y.IN_TABLE,Hn(e,t));break}case o.BODY:case o.CAPTION:case o.COL:case o.COLGROUP:case o.HTML:case o.TD:case o.TH:case o.TR:break;default:Hn(e,t)}}function Ur(e,t){switch(t.tagID){case o.TH:case o.TD:{e.openElements.clearBackToTableRowContext(),e._insertElement(t,P.HTML),e.insertionMode=y.IN_CELL,e.activeFormattingElements.insertMarker();break}case o.CAPTION:case o.COL:case o.COLGROUP:case o.TBODY:case o.TFOOT:case o.THEAD:case o.TR:{e.openElements.hasInTableScope(o.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=y.IN_TABLE_BODY,Hr(e,t));break}default:dn(e,t)}}function Il(e,t){switch(t.tagID){case o.TR:{e.openElements.hasInTableScope(o.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=y.IN_TABLE_BODY);break}case o.TABLE:{e.openElements.hasInTableScope(o.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=y.IN_TABLE_BODY,Xi(e,t));break}case o.TBODY:case o.TFOOT:case o.THEAD:{(e.openElements.hasInTableScope(t.tagID)||e.openElements.hasInTableScope(o.TR))&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=y.IN_TABLE_BODY,Xi(e,t));break}case o.BODY:case o.CAPTION:case o.COL:case o.COLGROUP:case o.HTML:case o.TD:case o.TH:break;default:Hn(e,t)}}function lb(e,t){const n=t.tagID;wl.has(n)?(e.openElements.hasInTableScope(o.TD)||e.openElements.hasInTableScope(o.TH))&&(e._closeTableCell(),Ur(e,t)):$e(e,t)}function cb(e,t){const n=t.tagID;switch(n){case o.TD:case o.TH:{e.openElements.hasInTableScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=y.IN_ROW);break}case o.TABLE:case o.TBODY:case o.TFOOT:case o.THEAD:case o.TR:{e.openElements.hasInTableScope(n)&&(e._closeTableCell(),Il(e,t));break}case o.BODY:case o.CAPTION:case o.COL:case o.COLGROUP:case o.HTML:break;default:Fr(e,t)}}function vl(e,t){switch(t.tagID){case o.HTML:{$e(e,t);break}case o.OPTION:{e.openElements.currentTagId===o.OPTION&&e.openElements.pop(),e._insertElement(t,P.HTML);break}case o.OPTGROUP:{e.openElements.currentTagId===o.OPTION&&e.openElements.pop(),e.openElements.currentTagId===o.OPTGROUP&&e.openElements.pop(),e._insertElement(t,P.HTML);break}case o.HR:{e.openElements.currentTagId===o.OPTION&&e.openElements.pop(),e.openElements.currentTagId===o.OPTGROUP&&e.openElements.pop(),e._appendElement(t,P.HTML),t.ackSelfClosing=!0;break}case o.INPUT:case o.KEYGEN:case o.TEXTAREA:case o.SELECT:{e.openElements.hasInSelectScope(o.SELECT)&&(e.openElements.popUntilTagNamePopped(o.SELECT),e._resetInsertionMode(),t.tagID!==o.SELECT&&e._processStartTag(t));break}case o.SCRIPT:case o.TEMPLATE:{ot(e,t);break}}}function Nl(e,t){switch(t.tagID){case o.OPTGROUP:{e.openElements.stackTop>0&&e.openElements.currentTagId===o.OPTION&&e.openElements.tagIDs[e.openElements.stackTop-1]===o.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagId===o.OPTGROUP&&e.openElements.pop();break}case o.OPTION:{e.openElements.currentTagId===o.OPTION&&e.openElements.pop();break}case o.SELECT:{e.openElements.hasInSelectScope(o.SELECT)&&(e.openElements.popUntilTagNamePopped(o.SELECT),e._resetInsertionMode());break}case o.TEMPLATE:{Kt(e,t);break}}}function fb(e,t){const n=t.tagID;n===o.CAPTION||n===o.TABLE||n===o.TBODY||n===o.TFOOT||n===o.THEAD||n===o.TR||n===o.TD||n===o.TH?(e.openElements.popUntilTagNamePopped(o.SELECT),e._resetInsertionMode(),e._processStartTag(t)):vl(e,t)}function db(e,t){const n=t.tagID;n===o.CAPTION||n===o.TABLE||n===o.TBODY||n===o.TFOOT||n===o.THEAD||n===o.TR||n===o.TD||n===o.TH?e.openElements.hasInTableScope(n)&&(e.openElements.popUntilTagNamePopped(o.SELECT),e._resetInsertionMode(),e.onEndTag(t)):Nl(e,t)}function hb(e,t){switch(t.tagID){case o.BASE:case o.BASEFONT:case o.BGSOUND:case o.LINK:case o.META:case o.NOFRAMES:case o.SCRIPT:case o.STYLE:case o.TEMPLATE:case o.TITLE:{ot(e,t);break}case o.CAPTION:case o.COLGROUP:case o.TBODY:case o.TFOOT:case o.THEAD:{e.tmplInsertionModeStack[0]=y.IN_TABLE,e.insertionMode=y.IN_TABLE,dn(e,t);break}case o.COL:{e.tmplInsertionModeStack[0]=y.IN_COLUMN_GROUP,e.insertionMode=y.IN_COLUMN_GROUP,va(e,t);break}case o.TR:{e.tmplInsertionModeStack[0]=y.IN_TABLE_BODY,e.insertionMode=y.IN_TABLE_BODY,Hr(e,t);break}case o.TD:case o.TH:{e.tmplInsertionModeStack[0]=y.IN_ROW,e.insertionMode=y.IN_ROW,Ur(e,t);break}default:e.tmplInsertionModeStack[0]=y.IN_BODY,e.insertionMode=y.IN_BODY,$e(e,t)}}function mb(e,t){t.tagID===o.TEMPLATE&&Kt(e,t)}function kl(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(o.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):Ia(e,t)}function pb(e,t){t.tagID===o.HTML?$e(e,t):Er(e,t)}function Ol(e,t){var n;if(t.tagID===o.HTML){if(e.fragmentContext||(e.insertionMode=y.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===o.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 Er(e,t)}function Er(e,t){e.insertionMode=y.IN_BODY,Br(e,t)}function gb(e,t){switch(t.tagID){case o.HTML:{$e(e,t);break}case o.FRAMESET:{e._insertElement(t,P.HTML);break}case o.FRAME:{e._appendElement(t,P.HTML),t.ackSelfClosing=!0;break}case o.NOFRAMES:{ot(e,t);break}}}function bb(e,t){t.tagID===o.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==o.FRAMESET&&(e.insertionMode=y.AFTER_FRAMESET))}function Eb(e,t){switch(t.tagID){case o.HTML:{$e(e,t);break}case o.NOFRAMES:{ot(e,t);break}}}function Tb(e,t){t.tagID===o.HTML&&(e.insertionMode=y.AFTER_AFTER_FRAMESET)}function yb(e,t){t.tagID===o.HTML?$e(e,t):fr(e,t)}function fr(e,t){e.insertionMode=y.IN_BODY,Br(e,t)}function xb(e,t){switch(t.tagID){case o.HTML:{$e(e,t);break}case o.NOFRAMES:{ot(e,t);break}}}function Ab(e,t){t.chars=ve,e._insertCharacters(t)}function _b(e,t){e._insertCharacters(t),e.framesetOk=!1}function Ll(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==P.HTML&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function Sb(e,t){if(Hg(t))Ll(e),e._startTagOutsideForeignContent(t);else{const n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===P.MATHML?pl(t):r===P.SVG&&(Ug(t),gl(t)),Ca(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}function Cb(e,t){if(t.tagID===o.P||t.tagID===o.BR){Ll(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)===P.HTML){e._endTagOutsideForeignContent(t);break}const i=e.treeAdapter.getTagName(r);if(i.toLowerCase()===t.tagName){t.tagName=i,e.openElements.shortenToLength(n);break}}}v.AREA,v.BASE,v.BASEFONT,v.BGSOUND,v.BR,v.COL,v.EMBED,v.FRAME,v.HR,v.IMG,v.INPUT,v.KEYGEN,v.LINK,v.META,v.PARAM,v.SOURCE,v.TRACK,v.WBR;const wb=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),ru={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function Rl(e,t){const n=Mb(e),r=tl("type",{handlers:{root:Ib,element:vb,text:Nb,comment:Pl,doctype:kb,raw:Lb},unknown:Rb}),i={parser:n?new eu(ru):eu.getFragmentParser(void 0,ru),handle(u){r(u,i)},stitches:!1,options:t||{}};r(e,i),yn(i,bt());const a=n?i.parser.document:i.parser.getFragment(),s=Fp(a,{file:i.options.file});return i.stitches&&Mr(s,"comment",function(u,l,c){const f=u;if(f.value.stitch&&c&&l!==void 0){const d=c.children;return d[l]=f.value.stitch,l}}),s.type==="root"&&s.children.length===1&&s.children[0].type===e.type?s.children[0]:s}function Dl(e,t){let n=-1;if(e)for(;++n<e.length;)t.handle(e[n])}function Ib(e,t){Dl(e.children,t)}function vb(e,t){Db(e,t),Dl(e.children,t),Pb(e,t)}function Nb(e,t){t.parser.tokenizer.state>4&&(t.parser.tokenizer.state=0);const n={type:fe.CHARACTER,chars:e.value,location:Wn(e)};yn(t,bt(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function kb(e,t){const n={type:fe.DOCTYPE,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:Wn(e)};yn(t,bt(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function Ob(e,t){t.stitches=!0;const n=Bb(e);if("children"in e&&"children"in n){const r=Rl({type:"root",children:e.children},t.options);n.children=r.children}Pl({type:"comment",value:{stitch:n}},t)}function Pl(e,t){const n=e.value,r={type:fe.COMMENT,data:n,location:Wn(e)};yn(t,bt(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function Lb(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,Ml(t,bt(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 Rb(e,t){const n=e;if(t.options.passThrough&&t.options.passThrough.includes(n.type))Ob(n,t);else{let r="";throw wb.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 yn(e,t){Ml(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=Le.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 Ml(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 Db(e,t){const n=e.tagName.toLowerCase();if(t.parser.tokenizer.state===Le.PLAINTEXT)return;yn(t,bt(e));const r=t.parser.openElements.current;let i="namespaceURI"in r?r.namespaceURI:zt.html;i===zt.html&&n==="svg"&&(i=zt.svg);const a=$p({...e,children:[]},{space:i===zt.svg?"svg":"html"}),s={type:fe.START_TAG,tagName:n,tagID:Tn(n),selfClosing:!1,ackSelfClosing:!1,attrs:"attrs"in a?a.attrs:[],location:Wn(e)};t.parser.currentToken=s,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=n}function Pb(e,t){const n=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&Kp.includes(n)||t.parser.tokenizer.state===Le.PLAINTEXT)return;yn(t,kr(e));const r={type:fe.END_TAG,tagName:n,tagID:Tn(n),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:Wn(e)};t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken),n===t.parser.tokenizer.lastStartTagName&&(t.parser.tokenizer.state===Le.RCDATA||t.parser.tokenizer.state===Le.RAWTEXT||t.parser.tokenizer.state===Le.SCRIPT_DATA)&&(t.parser.tokenizer.state=Le.DATA)}function Mb(e){const t=e.type==="root"?e.children[0]:e;return!!(t&&(t.type==="doctype"||t.type==="element"&&t.tagName.toLowerCase()==="html"))}function Wn(e){const t=bt(e)||{line:void 0,column:void 0,offset:void 0},n=kr(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 Bb(e){return"children"in e?fn({...e,children:[]}):fn(e)}function Bl(e){return function(t,n){return Rl(t,{...e,file:n})}}const Fb=e=>Me.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",...e},Me.createElement("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10s10-4.48 10-10S17.52 2 12 2zM7.07 18.28c.43-.9 3.05-1.78 4.93-1.78s4.51.88 4.93 1.78C15.57 19.36 13.86 20 12 20s-3.57-.64-4.93-1.72zm11.29-1.45c-1.43-1.74-4.9-2.33-6.36-2.33s-4.93.59-6.36 2.33A7.95 7.95 0 0 1 4 12c0-4.41 3.59-8 8-8s8 3.59 8 8c0 1.82-.62 3.49-1.64 4.83zM12 6c-1.94 0-3.5 1.56-3.5 3.5S10.06 13 12 13s3.5-1.56 3.5-3.5S13.94 6 12 6zm0 5c-.83 0-1.5-.67-1.5-1.5S11.17 8 12 8s1.5.67 1.5 1.5S12.83 11 12 11z"})),Hb=({content:e,metaData:t})=>{const{chatlineLabelUserTranslation:n}=ca();return S.jsxs("div",{className:"flex px-3 justify-between mt-8 bg-gray-200 rounded-lg",children:[S.jsx("div",{className:"w-10 mr-3 flex-col content-center",children:S.jsx("div",{children:S.jsx(Fb,{fill:"#4564d6"})})}),S.jsxs("div",{className:`w-full p-4 rounded-lg transition-all duration-300 ${t?.isErrorMessage?"bg-red-100 border-l-4 border-red-400 text-red-800 shadow-md animate-fade-in":" text-gray-800"}`,children:[S.jsx("p",{className:"font-bold",children:n}),S.jsx("div",{children:S.jsx(Ko,{rehypePlugins:[Bl],children:e&&e})})]})]})};function iu(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 Ub(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function jb(e,t,n){const i=Dr((n||{}).ignore||[]),a=zb(t);let s=-1;for(;++s<a.length;)Xo(e,"text",u);function u(c,f){let d=-1,m;for(;++d<f.length;){const h=f[d],b=m?m.children:void 0;if(i(h,b?b.indexOf(h):void 0,m))return;m=h}if(m)return l(c,f)}function l(c,f){const d=f[f.length-1],m=a[s][0],h=a[s][1];let b=0;const _=d.children.indexOf(c);let x=!1,I=[];m.lastIndex=0;let C=m.exec(c.value);for(;C;){const D=C.index,k={index:C.index,input:C.input,stack:[...f,c]};let O=h(...C,k);if(typeof O=="string"&&(O=O.length>0?{type:"text",value:O}:void 0),O===!1?m.lastIndex=D+1:(b!==D&&I.push({type:"text",value:c.value.slice(b,D)}),Array.isArray(O)?I.push(...O):O&&I.push(O),b=D+C[0].length,x=!0),!m.global)break;C=m.exec(c.value)}return x?(b<c.value.length&&I.push({type:"text",value:c.value.slice(b)}),d.children.splice(_,1,...I)):I=[c],_+I.length}}function zb(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([$b(i[0]),Yb(i[1])])}return t}function $b(e){return typeof e=="string"?new RegExp(Ub(e),"g"):e}function Yb(e){return typeof e=="function"?e:function(){return e}}const di="phrasing",hi=["autolink","link","image","label"];function Gb(){return{transforms:[Zb],enter:{literalAutolink:qb,literalAutolinkEmail:mi,literalAutolinkHttp:mi,literalAutolinkWww:mi},exit:{literalAutolink:Kb,literalAutolinkEmail:Qb,literalAutolinkHttp:Wb,literalAutolinkWww:Xb}}}function Vb(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:di,notInConstruct:hi},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:di,notInConstruct:hi},{character:":",before:"[ps]",after:"\\/",inConstruct:di,notInConstruct:hi}]}}function qb(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function mi(e){this.config.enter.autolinkProtocol.call(this,e)}function Wb(e){this.config.exit.autolinkProtocol.call(this,e)}function Xb(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 Qb(e){this.config.exit.autolinkEmail.call(this,e)}function Kb(e){this.exit(e)}function Zb(e){jb(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,Jb],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),eE]],{ignore:["link","linkReference"]})}function Jb(e,t,n,r,i){let a="";if(!Fl(i)||(/^w/i.test(t)&&(n=t+n,t="",a="http://"),!tE(n)))return!1;const s=nE(n+r);if(!s[0])return!1;const u={type:"link",title:null,url:a+t+s[0],children:[{type:"text",value:t+s[0]}]};return s[1]?[u,{type:"text",value:s[1]}]:u}function eE(e,t,n,r){return!Fl(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function tE(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 nE(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=iu(e,"(");let a=iu(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 Fl(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||Vt(n)||Or(n))&&(!t||n!==47)}Hl.peek=fE;function rE(){this.buffer()}function iE(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function aE(){this.buffer()}function sE(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function uE(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=ut(this.sliceSerialize(e)).toLowerCase(),n.label=t}function oE(e){this.exit(e)}function lE(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=ut(this.sliceSerialize(e)).toLowerCase(),n.label=t}function cE(e){this.exit(e)}function fE(){return"["}function Hl(e,t,n,r){const i=n.createTracker(r);let a=i.move("[^");const s=n.enter("footnoteReference"),u=n.enter("reference");return a+=i.move(n.safe(n.associationId(e),{after:"]",before:a})),u(),s(),a+=i.move("]"),a}function dE(){return{enter:{gfmFootnoteCallString:rE,gfmFootnoteCall:iE,gfmFootnoteDefinitionLabelString:aE,gfmFootnoteDefinition:sE},exit:{gfmFootnoteCallString:uE,gfmFootnoteCall:oE,gfmFootnoteDefinitionLabelString:lE,gfmFootnoteDefinition:cE}}}function hE(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:Hl},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,i,a,s){const u=a.createTracker(s);let l=u.move("[^");const c=a.enter("footnoteDefinition"),f=a.enter("label");return l+=u.move(a.safe(a.associationId(r),{before:l,after:"]"})),f(),l+=u.move("]:"),r.children&&r.children.length>0&&(u.shift(4),l+=u.move((t?`
62
+ `:" ")+a.indentLines(a.containerFlow(r,u.current()),t?Ul:mE))),c(),l}}function mE(e,t,n){return t===0?e:Ul(e,t,n)}function Ul(e,t,n){return(n?"":" ")+e}const pE=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];jl.peek=yE;function gE(){return{canContainEols:["delete"],enter:{strikethrough:EE},exit:{strikethrough:TE}}}function bE(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:pE}],handlers:{delete:jl}}}function EE(e){this.enter({type:"delete",children:[]},e)}function TE(e){this.exit(e)}function jl(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 yE(){return"~"}function xE(e){return e.length}function AE(e,t){const n=t||{},r=(n.align||[]).concat(),i=n.stringLength||xE,a=[],s=[],u=[],l=[];let c=0,f=-1;for(;++f<e.length;){const A=[],_=[];let x=-1;for(e[f].length>c&&(c=e[f].length);++x<e[f].length;){const I=_E(e[f][x]);if(n.alignDelimiters!==!1){const C=i(I);_[x]=C,(l[x]===void 0||C>l[x])&&(l[x]=C)}A.push(I)}s[f]=A,u[f]=_}let d=-1;if(typeof r=="object"&&"length"in r)for(;++d<c;)a[d]=au(r[d]);else{const A=au(r);for(;++d<c;)a[d]=A}d=-1;const m=[],h=[];for(;++d<c;){const A=a[d];let _="",x="";A===99?(_=":",x=":"):A===108?_=":":A===114&&(x=":");let I=n.alignDelimiters===!1?1:Math.max(1,l[d]-_.length-x.length);const C=_+"-".repeat(I)+x;n.alignDelimiters!==!1&&(I=_.length+I+x.length,I>l[d]&&(l[d]=I),h[d]=I),m[d]=C}s.splice(1,0,m),u.splice(1,0,h),f=-1;const b=[];for(;++f<s.length;){const A=s[f],_=u[f];d=-1;const x=[];for(;++d<c;){const I=A[d]||"";let C="",D="";if(n.alignDelimiters!==!1){const k=l[d]-(_[d]||0),O=a[d];O===114?C=" ".repeat(k):O===99?k%2?(C=" ".repeat(k/2+.5),D=" ".repeat(k/2-.5)):(C=" ".repeat(k/2),D=C):D=" ".repeat(k)}n.delimiterStart!==!1&&!d&&x.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&I==="")&&(n.delimiterStart!==!1||d)&&x.push(" "),n.alignDelimiters!==!1&&x.push(C),x.push(I),n.alignDelimiters!==!1&&x.push(D),n.padding!==!1&&x.push(" "),(n.delimiterEnd!==!1||d!==c-1)&&x.push("|")}b.push(n.delimiterEnd===!1?x.join("").replace(/ +$/,""):x.join(""))}return b.join(`
63
+ `)}function _E(e){return e==null?"":String(e)}function au(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 SE(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()),CE);return i(),s}function CE(e,t,n){return">"+(n?"":" ")+e}function wE(e,t){return su(e,t.inConstruct,!0)&&!su(e,t.notInConstruct,!1)}function su(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 uu(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
64
+ `&&wE(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?"":" ";return`\\
65
+ `}function IE(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 vE(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 NE(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 kE(e,t,n,r){const i=NE(n),a=e.value||"",s=i==="`"?"GraveAccent":"Tilde";if(vE(e,n)){const d=n.enter("codeIndented"),m=n.indentLines(a,OE);return d(),m}const u=n.createTracker(r),l=i.repeat(Math.max(IE(a,i)+1,3)),c=n.enter("codeFenced");let f=u.move(l);if(e.lang){const d=n.enter(`codeFencedLang${s}`);f+=u.move(n.safe(e.lang,{before:f,after:" ",encode:["`"],...u.current()})),d()}if(e.lang&&e.meta){const d=n.enter(`codeFencedMeta${s}`);f+=u.move(" "),f+=u.move(n.safe(e.meta,{before:f,after:`
66
66
  `,encode:["`"],...u.current()})),d()}return f+=u.move(`
67
67
  `),a&&(f+=u.move(a+`
68
- `)),f+=u.move(o),c(),f}function _E(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 SE(e,t,n,r){const i=wa(n),a=i==='"'?"Quote":"Apostrophe",s=n.enter("definition");let u=n.enter("label");const o=n.createTracker(r);let c=o.move("[");return c+=o.move(n.safe(n.associationId(e),{before:c,after:"]",...o.current()})),c+=o.move("]: "),u(),!e.url||/[\0- \u007F]/.test(e.url)?(u=n.enter("destinationLiteral"),c+=o.move("<"),c+=o.move(n.safe(e.url,{before:c,after:">",...o.current()})),c+=o.move(">")):(u=n.enter("destinationRaw"),c+=o.move(n.safe(e.url,{before:c,after:e.title?" ":`
69
- `,...o.current()}))),u(),e.title&&(u=n.enter(`title${a}`),c+=o.move(" "+i),c+=o.move(n.safe(e.title,{before:c,after:i,...o.current()})),c+=o.move(i),u()),s(),c}function CE(e){const t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}Ml.peek=wE;function Ml(e,t,n,r){const i=CE(n),a=n.enter("emphasis"),s=n.createTracker(r);let u=s.move(i);return u+=s.move(n.containerPhrasing(e,{before:u,after:i,...s.current()})),u+=s.move(i),a(),u}function wE(e,t,n){return n.options.emphasis||"*"}function vE(e,t){let n=!1;return Dr(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,Fi}),!!((!e.depth||e.depth<3)&&da(e)&&(t.options.setext||n))}function IE(e,t,n,r){const i=Math.max(Math.min(6,e.depth||1),1),a=n.createTracker(r);if(vE(e,n)){const f=n.enter("headingSetext"),d=n.enter("phrasing"),h=n.containerPhrasing(e,{...a.current(),before:`
68
+ `)),f+=u.move(l),c(),f}function OE(e,t,n){return(n?"":" ")+e}function Na(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 LE(e,t,n,r){const i=Na(n),a=i==='"'?"Quote":"Apostrophe",s=n.enter("definition");let u=n.enter("label");const l=n.createTracker(r);let c=l.move("[");return c+=l.move(n.safe(n.associationId(e),{before:c,after:"]",...l.current()})),c+=l.move("]: "),u(),!e.url||/[\0- \u007F]/.test(e.url)?(u=n.enter("destinationLiteral"),c+=l.move("<"),c+=l.move(n.safe(e.url,{before:c,after:">",...l.current()})),c+=l.move(">")):(u=n.enter("destinationRaw"),c+=l.move(n.safe(e.url,{before:c,after:e.title?" ":`
69
+ `,...l.current()}))),u(),e.title&&(u=n.enter(`title${a}`),c+=l.move(" "+i),c+=l.move(n.safe(e.title,{before:c,after:i,...l.current()})),c+=l.move(i),u()),s(),c}function RE(e){const t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}zl.peek=DE;function zl(e,t,n,r){const i=RE(n),a=n.enter("emphasis"),s=n.createTracker(r);let u=s.move(i);return u+=s.move(n.containerPhrasing(e,{before:u,after:i,...s.current()})),u+=s.move(i),a(),u}function DE(e,t,n){return n.options.emphasis||"*"}function PE(e,t){let n=!1;return Mr(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,Ui}),!!((!e.depth||e.depth<3)&&pa(e)&&(t.options.setext||n))}function ME(e,t,n,r){const i=Math.max(Math.min(6,e.depth||1),1),a=n.createTracker(r);if(PE(e,n)){const f=n.enter("headingSetext"),d=n.enter("phrasing"),m=n.containerPhrasing(e,{...a.current(),before:`
70
70
  `,after:`
71
- `});return d(),f(),h+`
72
- `+(i===1?"=":"-").repeat(h.length-(Math.max(h.lastIndexOf("\r"),h.lastIndexOf(`
73
- `))+1))}const s="#".repeat(i),u=n.enter("headingAtx"),o=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),o(),u(),c}Bl.peek=NE;function Bl(e){return e.value||""}function NE(){return"<"}Fl.peek=kE;function Fl(e,t,n,r){const i=wa(n),a=i==='"'?"Quote":"Apostrophe",s=n.enter("image");let u=n.enter("label");const o=n.createTracker(r);let c=o.move("![");return c+=o.move(n.safe(e.alt,{before:c,after:"]",...o.current()})),c+=o.move("]("),u(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(u=n.enter("destinationLiteral"),c+=o.move("<"),c+=o.move(n.safe(e.url,{before:c,after:">",...o.current()})),c+=o.move(">")):(u=n.enter("destinationRaw"),c+=o.move(n.safe(e.url,{before:c,after:e.title?" ":")",...o.current()}))),u(),e.title&&(u=n.enter(`title${a}`),c+=o.move(" "+i),c+=o.move(n.safe(e.title,{before:c,after:i,...o.current()})),c+=o.move(i),u()),c+=o.move(")"),s(),c}function kE(){return"!"}Hl.peek=OE;function Hl(e,t,n,r){const i=e.referenceType,a=n.enter("imageReference");let s=n.enter("label");const u=n.createTracker(r);let o=u.move("![");const c=n.safe(e.alt,{before:o,after:"]",...u.current()});o+=u.move(c+"]["),s();const f=n.stack;n.stack=[],s=n.enter("reference");const d=n.safe(n.associationId(e),{before:o,after:"]",...u.current()});return s(),n.stack=f,a(),i==="full"||!c||c!==d?o+=u.move(d+"]"):i==="shortcut"?o=o.slice(0,-1):o+=u.move("]"),o}function OE(){return"!"}Ul.peek=RE;function Ul(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],u=n.compilePattern(s);let o;if(s.atBreak)for(;o=u.exec(r);){let c=o.index;r.charCodeAt(c)===10&&r.charCodeAt(c-1)===13&&c--,r=r.slice(0,c)+" "+r.slice(o.index+1)}}return i+r+i}function RE(){return"`"}function jl(e,t){const n=da(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=LE;function zl(e,t,n,r){const i=wa(n),a=i==='"'?"Quote":"Apostrophe",s=n.createTracker(r);let u,o;if(jl(e,n)){const f=n.stack;n.stack=[],u=n.enter("autolink");let d=s.move("<");return d+=s.move(n.containerPhrasing(e,{before:d,after:">",...s.current()})),d+=s.move(">"),u(),n.stack=f,d}u=n.enter("link"),o=n.enter("label");let c=s.move("[");return c+=s.move(n.containerPhrasing(e,{before:c,after:"](",...s.current()})),c+=s.move("]("),o(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(o=n.enter("destinationLiteral"),c+=s.move("<"),c+=s.move(n.safe(e.url,{before:c,after:">",...s.current()})),c+=s.move(">")):(o=n.enter("destinationRaw"),c+=s.move(n.safe(e.url,{before:c,after:e.title?" ":")",...s.current()}))),o(),e.title&&(o=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),o()),c+=s.move(")"),u(),c}function LE(e,t,n){return jl(e,n)?"<":"["}$l.peek=DE;function $l(e,t,n,r){const i=e.referenceType,a=n.enter("linkReference");let s=n.enter("label");const u=n.createTracker(r);let o=u.move("[");const c=n.containerPhrasing(e,{before:o,after:"]",...u.current()});o+=u.move(c+"]["),s();const f=n.stack;n.stack=[],s=n.enter("reference");const d=n.safe(n.associationId(e),{before:o,after:"]",...u.current()});return s(),n.stack=f,a(),i==="full"||!c||c!==d?o+=u.move(d+"]"):i==="shortcut"?o=o.slice(0,-1):o+=u.move("]"),o}function DE(){return"["}function va(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 PE(e){const t=va(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 ME(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 Yl(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 BE(e,t,n,r){const i=n.enter("list"),a=n.bulletCurrent;let s=e.ordered?ME(n):va(n);const u=e.ordered?s==="."?")":".":PE(n);let o=t&&n.bulletLastUsed?s===n.bulletLastUsed:!1;if(!e.ordered){const f=e.children?e.children[0]:void 0;if((s==="*"||s==="-")&&f&&(!f.children||!f.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&&(o=!0),Yl(n)===s&&f){let d=-1;for(;++d<e.children.length;){const h=e.children[d];if(h&&h.type==="listItem"&&h.children&&h.children[0]&&h.children[0].type==="thematicBreak"){o=!0;break}}}}o&&(s=u),n.bulletCurrent=s;const c=n.containerFlow(e,r);return n.bulletLastUsed=s,n.bulletCurrent=a,i(),c}function FE(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 HE(e,t,n,r){const i=FE(n);let a=n.bulletCurrent||va(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 u=n.createTracker(r);u.move(a+" ".repeat(s-a.length)),u.shift(s);const o=n.enter("listItem"),c=n.indentLines(n.containerFlow(e,u.current()),f);return o(),c;function f(d,h,m){return h?(m?"":" ".repeat(s))+d:(m?a:a+" ".repeat(s-a.length))+d}}function UE(e,t,n,r){const i=n.enter("paragraph"),a=n.enter("phrasing"),s=n.containerPhrasing(e,r);return a(),i(),s}const jE=Rr(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function zE(e,t,n,r){return(e.children.some(function(s){return jE(s)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function $E(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}Gl.peek=YE;function Gl(e,t,n,r){const i=$E(n),a=n.enter("strong"),s=n.createTracker(r);let u=s.move(i+i);return u+=s.move(n.containerPhrasing(e,{before:u,after:i,...s.current()})),u+=s.move(i+i),a(),u}function YE(e,t,n){return n.options.strong||"*"}function GE(e,t,n,r){return n.safe(e.value,r)}function VE(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 qE(e,t,n){const r=(Yl(n)+(n.options.ruleSpaces?" ":"")).repeat(VE(n));return n.options.ruleSpaces?r.slice(0,-1):r}const Vl={blockquote:gE,break:iu,code:AE,definition:SE,emphasis:Ml,hardBreak:iu,heading:IE,html:Bl,image:Fl,imageReference:Hl,inlineCode:Ul,link:zl,linkReference:$l,list:BE,listItem:HE,paragraph:UE,root:zE,strong:Gl,text:GE,thematicBreak:qE};function WE(){return{enter:{table:XE,tableData:au,tableHeader:au,tableRow:KE},exit:{codeText:ZE,table:QE,tableData:hi,tableHeader:hi,tableRow:hi}}}function XE(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 QE(e){this.exit(e),this.data.inTable=void 0}function KE(e){this.enter({type:"tableRow",children:[]},e)}function hi(e){this.exit(e)}function au(e){this.enter({type:"tableCell",children:[]},e)}function ZE(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,JE));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function JE(e,t){return t==="|"?t:e}function eT(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:h,table:s,tableCell:o,tableRow:u}};function s(m,b,A,C){return c(f(m,A,C),m.align)}function u(m,b,A,C){const y=d(m,A,C),S=c([y]);return S.slice(0,S.indexOf(`
76
- `))}function o(m,b,A,C){const y=A.enter("tableCell"),S=A.enter("phrasing"),v=A.containerPhrasing(m,{...C,before:a,after:a});return S(),y(),v}function c(m,b){return mE(m,{align:b,alignDelimiters:r,padding:n,stringLength:i})}function f(m,b,A){const C=m.children;let y=-1;const S=[],v=b.enter("table");for(;++y<C.length;)S[y]=d(C[y],b,A);return v(),S}function d(m,b,A){const C=m.children;let y=-1;const S=[],v=b.enter("tableRow");for(;++y<C.length;)S[y]=o(C[y],m,b,A);return v(),S}function h(m,b,A){let C=Vl.inlineCode(m,b,A);return A.stack.includes("tableCell")&&(C=C.replace(/\|/g,"\\$&")),C}}function tT(){return{exit:{taskListCheckValueChecked:su,taskListCheckValueUnchecked:su,paragraph:rT}}}function nT(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:iT}}}function su(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function rT(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 u=i[a];if(u.type==="paragraph"){s=u;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 iT(e,t,n,r){const i=e.children[0],a=typeof e.checked=="boolean"&&i&&i.type==="paragraph",s="["+(e.checked?"x":" ")+"] ",u=n.createTracker(r);a&&u.move(s);let o=Vl.listItem(e,t,n,{...r,...u.current()});return a&&(o=o.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,c)),o;function c(f){return f+s}}function aT(){return[Bb(),iE(),oE(),WE(),tT()]}function sT(e){return{extensions:[Fb(),aE(e),lE(),eT(e),nT()]}}const uT={tokenize:hT,partial:!0},ql={tokenize:mT,partial:!0},Wl={tokenize:pT,partial:!0},Xl={tokenize:gT,partial:!0},oT={tokenize:bT,partial:!0},Ql={name:"wwwAutolink",tokenize:fT,previous:Zl},Kl={name:"protocolAutolink",tokenize:dT,previous:Jl},St={name:"emailAutolink",tokenize:cT,previous:ec},Tt={};function lT(){return{text:Tt}}let Ft=48;for(;Ft<123;)Tt[Ft]=St,Ft++,Ft===58?Ft=65:Ft===91&&(Ft=97);Tt[43]=St;Tt[45]=St;Tt[46]=St;Tt[95]=St;Tt[72]=[St,Kl];Tt[104]=[St,Kl];Tt[87]=[St,Ql];Tt[119]=[St,Ql];function cT(e,t,n){const r=this;let i,a;return s;function s(d){return!Wi(d)||!ec.call(r,r.previous)||Ia(r.events)?n(d):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),u(d))}function u(d){return Wi(d)?(e.consume(d),u):d===64?(e.consume(d),o):n(d)}function o(d){return d===46?e.check(oT,f,c)(d):d===45||d===95||Ue(d)?(a=!0,e.consume(d),o):f(d)}function c(d){return e.consume(d),i=!0,o}function f(d){return a&&i&&Ge(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(d)):n(d)}}function fT(e,t,n){const r=this;return i;function i(s){return s!==87&&s!==119||!Zl.call(r,r.previous)||Ia(r.events)?n(s):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(uT,e.attempt(ql,e.attempt(Wl,a),n),n)(s))}function a(s){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(s)}}function dT(e,t,n){const r=this;let i="",a=!1;return s;function s(d){return(d===72||d===104)&&Jl.call(r,r.previous)&&!Ia(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(d),e.consume(d),u):n(d)}function u(d){if(Ge(d)&&i.length<5)return i+=String.fromCodePoint(d),e.consume(d),u;if(d===58){const h=i.toLowerCase();if(h==="http"||h==="https")return e.consume(d),o}return n(d)}function o(d){return d===47?(e.consume(d),a?c:(a=!0,o)):n(d)}function c(d){return d===null||cr(d)||we(d)||Gt(d)||Nr(d)?n(d):e.attempt(ql,e.attempt(Wl,f),n)(d)}function f(d){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(d)}}function hT(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 mT(e,t,n){let r,i,a;return s;function s(c){return c===46||c===95?e.check(Xl,o,u)(c):c===null||we(c)||Gt(c)||c!==45&&Nr(c)?o(c):(a=!0,e.consume(c),s)}function u(c){return c===95?r=!0:(i=r,r=void 0),e.consume(c),s}function o(c){return i||r||!a?n(c):t(c)}}function pT(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(Xl,t,a)(s):s===null||we(s)||Gt(s)?t(s):(e.consume(s),i)}function a(s){return s===41&&r++,e.consume(s),i}}function gT(e,t,n){return r;function r(u){return u===33||u===34||u===39||u===41||u===42||u===44||u===46||u===58||u===59||u===63||u===95||u===126?(e.consume(u),r):u===38?(e.consume(u),a):u===93?(e.consume(u),i):u===60||u===null||we(u)||Gt(u)?t(u):n(u)}function i(u){return u===null||u===40||u===91||we(u)||Gt(u)?t(u):r(u)}function a(u){return Ge(u)?s(u):n(u)}function s(u){return u===59?(e.consume(u),r):Ge(u)?(e.consume(u),s):n(u)}}function bT(e,t,n){return r;function r(a){return e.consume(a),i}function i(a){return Ue(a)?n(a):t(a)}}function Zl(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||we(e)}function Jl(e){return!Ge(e)}function ec(e){return!(e===47||Wi(e))}function Wi(e){return e===43||e===45||e===46||e===95||Ue(e)}function Ia(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 ET={tokenize:wT,partial:!0};function TT(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:_T,continuation:{tokenize:ST},exit:CT}},text:{91:{name:"gfmFootnoteCall",tokenize:AT},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:xT,resolveTo:yT}}}}function xT(e,t,n){const r=this;let i=r.events.length;const a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let s;for(;i--;){const o=r.events[i][1];if(o.type==="labelImage"){s=o;break}if(o.type==="gfmFootnoteCall"||o.type==="labelLink"||o.type==="label"||o.type==="image"||o.type==="link")break}return u;function u(o){if(!s||!s._balanced)return n(o);const c=ot(r.sliceSerialize({start:s.end,end:r.now()}));return c.codePointAt(0)!==94||!a.includes(c.slice(1))?n(o):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(o),e.exit("gfmFootnoteCallLabelMarker"),t(o))}}function yT(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)},u=[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,...u),e}function AT(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a=0,s;return u;function u(d){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),o}function o(d){return d!==94?n(d):(e.enter("gfmFootnoteCallMarker"),e.consume(d),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",c)}function c(d){if(a>999||d===93&&!s||d===null||d===91||we(d))return n(d);if(d===93){e.exit("chunkString");const h=e.exit("gfmFootnoteCallString");return i.includes(ot(r.sliceSerialize(h)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(d)}return we(d)||(s=!0),a++,e.consume(d),d===92?f:c}function f(d){return d===91||d===92||d===93?(e.consume(d),a++,c):c(d)}}function _T(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a,s=0,u;return o;function o(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",f):n(b)}function f(b){if(s>999||b===93&&!u||b===null||b===91||we(b))return n(b);if(b===93){e.exit("chunkString");const A=e.exit("gfmFootnoteDefinitionLabelString");return a=ot(r.sliceSerialize(A)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(b),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),h}return we(b)||(u=!0),s++,e.consume(b),b===92?d:f}function d(b){return b===91||b===92||b===93?(e.consume(b),s++,f):f(b)}function h(b){return b===58?(e.enter("definitionMarker"),e.consume(b),e.exit("definitionMarker"),i.includes(a)||i.push(a),Te(e,m,"gfmFootnoteDefinitionWhitespace")):n(b)}function m(b){return t(b)}}function ST(e,t,n){return e.check($n,t,e.attempt(ET,t,n))}function CT(e){e.exit("gfmFootnoteDefinition")}function wT(e,t,n){const r=this;return Te(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 vT(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,u){let o=-1;for(;++o<s.length;)if(s[o][0]==="enter"&&s[o][1].type==="strikethroughSequenceTemporary"&&s[o][1]._close){let c=o;for(;c--;)if(s[c][0]==="exit"&&s[c][1].type==="strikethroughSequenceTemporary"&&s[c][1]._open&&s[o][1].end.offset-s[o][1].start.offset===s[c][1].end.offset-s[c][1].start.offset){s[o][1].type="strikethroughSequence",s[c][1].type="strikethroughSequence";const f={type:"strikethrough",start:Object.assign({},s[c][1].start),end:Object.assign({},s[o][1].end)},d={type:"strikethroughText",start:Object.assign({},s[c][1].end),end:Object.assign({},s[o][1].start)},h=[["enter",f,u],["enter",s[c][1],u],["exit",s[c][1],u],["enter",d,u]],m=u.parser.constructs.insideSpan.null;m&&Ke(h,h.length,0,kr(m,s.slice(c+1,o),u)),Ke(h,h.length,0,[["exit",d,u],["enter",s[o][1],u],["exit",s[o][1],u],["exit",f,u]]),Ke(s,c-1,o-c+3,h),o=c+h.length-2;break}}for(o=-1;++o<s.length;)s[o][1].type==="strikethroughSequenceTemporary"&&(s[o][1].type="data");return s}function a(s,u,o){const c=this.previous,f=this.events;let d=0;return h;function h(b){return c===126&&f[f.length-1][1].type!=="characterEscape"?o(b):(s.enter("strikethroughSequenceTemporary"),m(b))}function m(b){const A=fr(c);if(b===126)return d>1?o(b):(s.consume(b),d++,m);if(d<2&&!n)return o(b);const C=s.exit("strikethroughSequenceTemporary"),y=fr(b);return C._open=!y||y===2&&!!A,C._close=!A||A===2&&!!y,u(b)}}}class IT{constructor(){this.map=[]}add(t,n,r){NT(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 NT(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 kT(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 OT(){return{flow:{null:{name:"table",tokenize:RT,resolveAll:LT}}}}function RT(e,t,n){const r=this;let i=0,a=0,s;return u;function u(w){let j=r.events.length-1;for(;j>-1;){const Y=r.events[j][1].type;if(Y==="lineEnding"||Y==="linePrefix")j--;else break}const H=j>-1?r.events[j][1].type:null,$=H==="tableHead"||H==="tableRow"?O:o;return $===O&&r.parser.lazy[r.now().line]?n(w):$(w)}function o(w){return e.enter("tableHead"),e.enter("tableRow"),c(w)}function c(w){return w===124||(s=!0,a+=1),f(w)}function f(w){return w===null?n(w):te(w)?a>1?(a=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(w),e.exit("lineEnding"),m):n(w):de(w)?Te(e,f,"whitespace")(w):(a+=1,s&&(s=!1,i+=1),w===124?(e.enter("tableCellDivider"),e.consume(w),e.exit("tableCellDivider"),s=!0,f):(e.enter("data"),d(w)))}function d(w){return w===null||w===124||we(w)?(e.exit("data"),f(w)):(e.consume(w),w===92?h:d)}function h(w){return w===92||w===124?(e.consume(w),d):d(w)}function m(w){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(w):(e.enter("tableDelimiterRow"),s=!1,de(w)?Te(e,b,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(w):b(w))}function b(w){return w===45||w===58?C(w):w===124?(s=!0,e.enter("tableCellDivider"),e.consume(w),e.exit("tableCellDivider"),A):N(w)}function A(w){return de(w)?Te(e,C,"whitespace")(w):C(w)}function C(w){return w===58?(a+=1,s=!0,e.enter("tableDelimiterMarker"),e.consume(w),e.exit("tableDelimiterMarker"),y):w===45?(a+=1,y(w)):w===null||te(w)?D(w):N(w)}function y(w){return w===45?(e.enter("tableDelimiterFiller"),S(w)):N(w)}function S(w){return w===45?(e.consume(w),S):w===58?(s=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(w),e.exit("tableDelimiterMarker"),v):(e.exit("tableDelimiterFiller"),v(w))}function v(w){return de(w)?Te(e,D,"whitespace")(w):D(w)}function D(w){return w===124?b(w):w===null||te(w)?!s||i!==a?N(w):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(w)):N(w)}function N(w){return n(w)}function O(w){return e.enter("tableRow"),q(w)}function q(w){return w===124?(e.enter("tableCellDivider"),e.consume(w),e.exit("tableCellDivider"),q):w===null||te(w)?(e.exit("tableRow"),t(w)):de(w)?Te(e,q,"whitespace")(w):(e.enter("data"),ue(w))}function ue(w){return w===null||w===124||we(w)?(e.exit("data"),q(w)):(e.consume(w),w===92?G:ue)}function G(w){return w===92||w===124?(e.consume(w),ue):ue(w)}}function LT(e,t){let n=-1,r=!0,i=0,a=[0,0,0,0],s=[0,0,0,0],u=!1,o=0,c,f,d;const h=new IT;for(;++n<e.length;){const m=e[n],b=m[1];m[0]==="enter"?b.type==="tableHead"?(u=!1,o!==0&&(uu(h,t,o,c,f),f=void 0,o=0),c={type:"table",start:Object.assign({},b.start),end:Object.assign({},b.end)},h.add(n,0,[["enter",c,t]])):b.type==="tableRow"||b.type==="tableDelimiterRow"?(r=!0,d=void 0,a=[0,0,0,0],s=[0,n+1,0,0],u&&(u=!1,f={type:"tableBody",start:Object.assign({},b.start),end:Object.assign({},b.end)},h.add(n,0,[["enter",f,t]])),i=b.type==="tableDelimiterRow"?2:f?3:1):i&&(b.type==="data"||b.type==="tableDelimiterMarker"||b.type==="tableDelimiterFiller")?(r=!1,s[2]===0&&(a[1]!==0&&(s[0]=s[1],d=nr(h,t,a,i,void 0,d),a=[0,0,0,0]),s[2]=n)):b.type==="tableCellDivider"&&(r?r=!1:(a[1]!==0&&(s[0]=s[1],d=nr(h,t,a,i,void 0,d)),a=s,s=[a[1],n,0,0])):b.type==="tableHead"?(u=!0,o=n):b.type==="tableRow"||b.type==="tableDelimiterRow"?(o=n,a[1]!==0?(s[0]=s[1],d=nr(h,t,a,i,n,d)):s[1]!==0&&(d=nr(h,t,s,i,n,d)),i=0):i&&(b.type==="data"||b.type==="tableDelimiterMarker"||b.type==="tableDelimiterFiller")&&(s[3]=n)}for(o!==0&&uu(h,t,o,c,f),h.consume(t.events),n=-1;++n<t.events.length;){const m=t.events[n];m[0]==="enter"&&m[1].type==="table"&&(m[1]._align=kT(t.events,n))}return e}function nr(e,t,n,r,i,a){const s=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",u="tableContent";n[0]!==0&&(a.end=Object.assign({},tn(t.events,n[0])),e.add(n[0],0,[["exit",a,t]]));const o=tn(t.events,n[1]);if(a={type:s,start:Object.assign({},o),end:Object.assign({},o)},e.add(n[1],0,[["enter",a,t]]),n[2]!==0){const c=tn(t.events,n[2]),f=tn(t.events,n[3]),d={type:u,start:Object.assign({},c),end:Object.assign({},f)};if(e.add(n[2],0,[["enter",d,t]]),r!==2){const h=t.events[n[2]],m=t.events[n[3]];if(h[1].end=Object.assign({},m[1].end),h[1].type="chunkText",h[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",d,t]])}return i!==void 0&&(a.end=Object.assign({},tn(t.events,i)),e.add(i,0,[["exit",a,t]]),a=void 0),a}function uu(e,t,n,r,i){const a=[],s=tn(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 tn(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const DT={name:"tasklistCheck",tokenize:MT};function PT(){return{text:{91:DT}}}function MT(e,t,n){const r=this;return i;function i(o){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(o):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(o),e.exit("taskListCheckMarker"),a)}function a(o){return we(o)?(e.enter("taskListCheckValueUnchecked"),e.consume(o),e.exit("taskListCheckValueUnchecked"),s):o===88||o===120?(e.enter("taskListCheckValueChecked"),e.consume(o),e.exit("taskListCheckValueChecked"),s):n(o)}function s(o){return o===93?(e.enter("taskListCheckMarker"),e.consume(o),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),u):n(o)}function u(o){return te(o)?t(o):de(o)?e.check({tokenize:BT},t,n)(o):n(o)}}function BT(e,t,n){return Te(e,r,"whitespace");function r(i){return i===null?n(i):t(i)}}function FT(e){return So([lT(),TT(),vT(e),OT(),PT()])}const HT={};function UT(e){const t=this,n=e||HT,r=t.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),a=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),s=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(FT(n)),a.push(aT()),s.push(sT(n))}const jT=({})=>{const{companySettings:e}=k.useContext(dn);return _.jsx("div",{className:`assistant
71
+ `});return d(),f(),m+`
72
+ `+(i===1?"=":"-").repeat(m.length-(Math.max(m.lastIndexOf("\r"),m.lastIndexOf(`
73
+ `))+1))}const s="#".repeat(i),u=n.enter("headingAtx"),l=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),l(),u(),c}$l.peek=BE;function $l(e){return e.value||""}function BE(){return"<"}Yl.peek=FE;function Yl(e,t,n,r){const i=Na(n),a=i==='"'?"Quote":"Apostrophe",s=n.enter("image");let u=n.enter("label");const l=n.createTracker(r);let c=l.move("![");return c+=l.move(n.safe(e.alt,{before:c,after:"]",...l.current()})),c+=l.move("]("),u(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(u=n.enter("destinationLiteral"),c+=l.move("<"),c+=l.move(n.safe(e.url,{before:c,after:">",...l.current()})),c+=l.move(">")):(u=n.enter("destinationRaw"),c+=l.move(n.safe(e.url,{before:c,after:e.title?" ":")",...l.current()}))),u(),e.title&&(u=n.enter(`title${a}`),c+=l.move(" "+i),c+=l.move(n.safe(e.title,{before:c,after:i,...l.current()})),c+=l.move(i),u()),c+=l.move(")"),s(),c}function FE(){return"!"}Gl.peek=HE;function Gl(e,t,n,r){const i=e.referenceType,a=n.enter("imageReference");let s=n.enter("label");const u=n.createTracker(r);let l=u.move("![");const c=n.safe(e.alt,{before:l,after:"]",...u.current()});l+=u.move(c+"]["),s();const f=n.stack;n.stack=[],s=n.enter("reference");const d=n.safe(n.associationId(e),{before:l,after:"]",...u.current()});return s(),n.stack=f,a(),i==="full"||!c||c!==d?l+=u.move(d+"]"):i==="shortcut"?l=l.slice(0,-1):l+=u.move("]"),l}function HE(){return"!"}Vl.peek=UE;function Vl(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],u=n.compilePattern(s);let l;if(s.atBreak)for(;l=u.exec(r);){let c=l.index;r.charCodeAt(c)===10&&r.charCodeAt(c-1)===13&&c--,r=r.slice(0,c)+" "+r.slice(l.index+1)}}return i+r+i}function UE(){return"`"}function ql(e,t){const n=pa(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))}Wl.peek=jE;function Wl(e,t,n,r){const i=Na(n),a=i==='"'?"Quote":"Apostrophe",s=n.createTracker(r);let u,l;if(ql(e,n)){const f=n.stack;n.stack=[],u=n.enter("autolink");let d=s.move("<");return d+=s.move(n.containerPhrasing(e,{before:d,after:">",...s.current()})),d+=s.move(">"),u(),n.stack=f,d}u=n.enter("link"),l=n.enter("label");let c=s.move("[");return c+=s.move(n.containerPhrasing(e,{before:c,after:"](",...s.current()})),c+=s.move("]("),l(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(l=n.enter("destinationLiteral"),c+=s.move("<"),c+=s.move(n.safe(e.url,{before:c,after:">",...s.current()})),c+=s.move(">")):(l=n.enter("destinationRaw"),c+=s.move(n.safe(e.url,{before:c,after:e.title?" ":")",...s.current()}))),l(),e.title&&(l=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),l()),c+=s.move(")"),u(),c}function jE(e,t,n){return ql(e,n)?"<":"["}Xl.peek=zE;function Xl(e,t,n,r){const i=e.referenceType,a=n.enter("linkReference");let s=n.enter("label");const u=n.createTracker(r);let l=u.move("[");const c=n.containerPhrasing(e,{before:l,after:"]",...u.current()});l+=u.move(c+"]["),s();const f=n.stack;n.stack=[],s=n.enter("reference");const d=n.safe(n.associationId(e),{before:l,after:"]",...u.current()});return s(),n.stack=f,a(),i==="full"||!c||c!==d?l+=u.move(d+"]"):i==="shortcut"?l=l.slice(0,-1):l+=u.move("]"),l}function zE(){return"["}function ka(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 $E(e){const t=ka(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 YE(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 Ql(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 GE(e,t,n,r){const i=n.enter("list"),a=n.bulletCurrent;let s=e.ordered?YE(n):ka(n);const u=e.ordered?s==="."?")":".":$E(n);let l=t&&n.bulletLastUsed?s===n.bulletLastUsed:!1;if(!e.ordered){const f=e.children?e.children[0]:void 0;if((s==="*"||s==="-")&&f&&(!f.children||!f.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&&(l=!0),Ql(n)===s&&f){let d=-1;for(;++d<e.children.length;){const m=e.children[d];if(m&&m.type==="listItem"&&m.children&&m.children[0]&&m.children[0].type==="thematicBreak"){l=!0;break}}}}l&&(s=u),n.bulletCurrent=s;const c=n.containerFlow(e,r);return n.bulletLastUsed=s,n.bulletCurrent=a,i(),c}function VE(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 qE(e,t,n,r){const i=VE(n);let a=n.bulletCurrent||ka(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 u=n.createTracker(r);u.move(a+" ".repeat(s-a.length)),u.shift(s);const l=n.enter("listItem"),c=n.indentLines(n.containerFlow(e,u.current()),f);return l(),c;function f(d,m,h){return m?(h?"":" ".repeat(s))+d:(h?a:a+" ".repeat(s-a.length))+d}}function WE(e,t,n,r){const i=n.enter("paragraph"),a=n.enter("phrasing"),s=n.containerPhrasing(e,r);return a(),i(),s}const XE=Dr(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function QE(e,t,n,r){return(e.children.some(function(s){return XE(s)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function KE(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}Kl.peek=ZE;function Kl(e,t,n,r){const i=KE(n),a=n.enter("strong"),s=n.createTracker(r);let u=s.move(i+i);return u+=s.move(n.containerPhrasing(e,{before:u,after:i,...s.current()})),u+=s.move(i+i),a(),u}function ZE(e,t,n){return n.options.strong||"*"}function JE(e,t,n,r){return n.safe(e.value,r)}function eT(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 tT(e,t,n){const r=(Ql(n)+(n.options.ruleSpaces?" ":"")).repeat(eT(n));return n.options.ruleSpaces?r.slice(0,-1):r}const Zl={blockquote:SE,break:uu,code:kE,definition:LE,emphasis:zl,hardBreak:uu,heading:ME,html:$l,image:Yl,imageReference:Gl,inlineCode:Vl,link:Wl,linkReference:Xl,list:GE,listItem:qE,paragraph:WE,root:QE,strong:Kl,text:JE,thematicBreak:tT};function nT(){return{enter:{table:rT,tableData:ou,tableHeader:ou,tableRow:aT},exit:{codeText:sT,table:iT,tableData:pi,tableHeader:pi,tableRow:pi}}}function rT(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 iT(e){this.exit(e),this.data.inTable=void 0}function aT(e){this.enter({type:"tableRow",children:[]},e)}function pi(e){this.exit(e)}function ou(e){this.enter({type:"tableCell",children:[]},e)}function sT(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,uT));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function uT(e,t){return t==="|"?t:e}function oT(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:l,tableRow:u}};function s(h,b,A,_){return c(f(h,A,_),h.align)}function u(h,b,A,_){const x=d(h,A,_),I=c([x]);return I.slice(0,I.indexOf(`
76
+ `))}function l(h,b,A,_){const x=A.enter("tableCell"),I=A.enter("phrasing"),C=A.containerPhrasing(h,{..._,before:a,after:a});return I(),x(),C}function c(h,b){return AE(h,{align:b,alignDelimiters:r,padding:n,stringLength:i})}function f(h,b,A){const _=h.children;let x=-1;const I=[],C=b.enter("table");for(;++x<_.length;)I[x]=d(_[x],b,A);return C(),I}function d(h,b,A){const _=h.children;let x=-1;const I=[],C=b.enter("tableRow");for(;++x<_.length;)I[x]=l(_[x],h,b,A);return C(),I}function m(h,b,A){let _=Zl.inlineCode(h,b,A);return A.stack.includes("tableCell")&&(_=_.replace(/\|/g,"\\$&")),_}}function lT(){return{exit:{taskListCheckValueChecked:lu,taskListCheckValueUnchecked:lu,paragraph:fT}}}function cT(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:dT}}}function lu(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function fT(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 u=i[a];if(u.type==="paragraph"){s=u;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 dT(e,t,n,r){const i=e.children[0],a=typeof e.checked=="boolean"&&i&&i.type==="paragraph",s="["+(e.checked?"x":" ")+"] ",u=n.createTracker(r);a&&u.move(s);let l=Zl.listItem(e,t,n,{...r,...u.current()});return a&&(l=l.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,c)),l;function c(f){return f+s}}function hT(){return[Gb(),dE(),gE(),nT(),lT()]}function mT(e){return{extensions:[Vb(),hE(e),bE(),oT(e),cT()]}}const pT={tokenize:xT,partial:!0},Jl={tokenize:AT,partial:!0},ec={tokenize:_T,partial:!0},tc={tokenize:ST,partial:!0},gT={tokenize:CT,partial:!0},nc={name:"wwwAutolink",tokenize:TT,previous:ic},rc={name:"protocolAutolink",tokenize:yT,previous:ac},_t={name:"emailAutolink",tokenize:ET,previous:sc},Et={};function bT(){return{text:Et}}let Ht=48;for(;Ht<123;)Et[Ht]=_t,Ht++,Ht===58?Ht=65:Ht===91&&(Ht=97);Et[43]=_t;Et[45]=_t;Et[46]=_t;Et[95]=_t;Et[72]=[_t,rc];Et[104]=[_t,rc];Et[87]=[_t,nc];Et[119]=[_t,nc];function ET(e,t,n){const r=this;let i,a;return s;function s(d){return!Qi(d)||!sc.call(r,r.previous)||Oa(r.events)?n(d):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),u(d))}function u(d){return Qi(d)?(e.consume(d),u):d===64?(e.consume(d),l):n(d)}function l(d){return d===46?e.check(gT,f,c)(d):d===45||d===95||je(d)?(a=!0,e.consume(d),l):f(d)}function c(d){return e.consume(d),i=!0,l}function f(d){return a&&i&&Ve(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(d)):n(d)}}function TT(e,t,n){const r=this;return i;function i(s){return s!==87&&s!==119||!ic.call(r,r.previous)||Oa(r.events)?n(s):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(pT,e.attempt(Jl,e.attempt(ec,a),n),n)(s))}function a(s){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(s)}}function yT(e,t,n){const r=this;let i="",a=!1;return s;function s(d){return(d===72||d===104)&&ac.call(r,r.previous)&&!Oa(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(d),e.consume(d),u):n(d)}function u(d){if(Ve(d)&&i.length<5)return i+=String.fromCodePoint(d),e.consume(d),u;if(d===58){const m=i.toLowerCase();if(m==="http"||m==="https")return e.consume(d),l}return n(d)}function l(d){return d===47?(e.consume(d),a?c:(a=!0,l)):n(d)}function c(d){return d===null||dr(d)||Se(d)||Vt(d)||Or(d)?n(d):e.attempt(Jl,e.attempt(ec,f),n)(d)}function f(d){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(d)}}function xT(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 AT(e,t,n){let r,i,a;return s;function s(c){return c===46||c===95?e.check(tc,l,u)(c):c===null||Se(c)||Vt(c)||c!==45&&Or(c)?l(c):(a=!0,e.consume(c),s)}function u(c){return c===95?r=!0:(i=r,r=void 0),e.consume(c),s}function l(c){return i||r||!a?n(c):t(c)}}function _T(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(tc,t,a)(s):s===null||Se(s)||Vt(s)?t(s):(e.consume(s),i)}function a(s){return s===41&&r++,e.consume(s),i}}function ST(e,t,n){return r;function r(u){return u===33||u===34||u===39||u===41||u===42||u===44||u===46||u===58||u===59||u===63||u===95||u===126?(e.consume(u),r):u===38?(e.consume(u),a):u===93?(e.consume(u),i):u===60||u===null||Se(u)||Vt(u)?t(u):n(u)}function i(u){return u===null||u===40||u===91||Se(u)||Vt(u)?t(u):r(u)}function a(u){return Ve(u)?s(u):n(u)}function s(u){return u===59?(e.consume(u),r):Ve(u)?(e.consume(u),s):n(u)}}function CT(e,t,n){return r;function r(a){return e.consume(a),i}function i(a){return je(a)?n(a):t(a)}}function ic(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||Se(e)}function ac(e){return!Ve(e)}function sc(e){return!(e===47||Qi(e))}function Qi(e){return e===43||e===45||e===46||e===95||je(e)}function Oa(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 wT={tokenize:DT,partial:!0};function IT(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:OT,continuation:{tokenize:LT},exit:RT}},text:{91:{name:"gfmFootnoteCall",tokenize:kT},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:vT,resolveTo:NT}}}}function vT(e,t,n){const r=this;let i=r.events.length;const a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let s;for(;i--;){const l=r.events[i][1];if(l.type==="labelImage"){s=l;break}if(l.type==="gfmFootnoteCall"||l.type==="labelLink"||l.type==="label"||l.type==="image"||l.type==="link")break}return u;function u(l){if(!s||!s._balanced)return n(l);const c=ut(r.sliceSerialize({start:s.end,end:r.now()}));return c.codePointAt(0)!==94||!a.includes(c.slice(1))?n(l):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(l),e.exit("gfmFootnoteCallLabelMarker"),t(l))}}function NT(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)},u=[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,...u),e}function kT(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a=0,s;return u;function u(d){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),l}function l(d){return d!==94?n(d):(e.enter("gfmFootnoteCallMarker"),e.consume(d),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",c)}function c(d){if(a>999||d===93&&!s||d===null||d===91||Se(d))return n(d);if(d===93){e.exit("chunkString");const m=e.exit("gfmFootnoteCallString");return i.includes(ut(r.sliceSerialize(m)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(d)}return Se(d)||(s=!0),a++,e.consume(d),d===92?f:c}function f(d){return d===91||d===92||d===93?(e.consume(d),a++,c):c(d)}}function OT(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a,s=0,u;return l;function l(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",f):n(b)}function f(b){if(s>999||b===93&&!u||b===null||b===91||Se(b))return n(b);if(b===93){e.exit("chunkString");const A=e.exit("gfmFootnoteDefinitionLabelString");return a=ut(r.sliceSerialize(A)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(b),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),m}return Se(b)||(u=!0),s++,e.consume(b),b===92?d:f}function d(b){return b===91||b===92||b===93?(e.consume(b),s++,f):f(b)}function m(b){return b===58?(e.enter("definitionMarker"),e.consume(b),e.exit("definitionMarker"),i.includes(a)||i.push(a),Te(e,h,"gfmFootnoteDefinitionWhitespace")):n(b)}function h(b){return t(b)}}function LT(e,t,n){return e.check(Gn,t,e.attempt(wT,t,n))}function RT(e){e.exit("gfmFootnoteDefinition")}function DT(e,t,n){const r=this;return Te(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 PT(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,u){let l=-1;for(;++l<s.length;)if(s[l][0]==="enter"&&s[l][1].type==="strikethroughSequenceTemporary"&&s[l][1]._close){let c=l;for(;c--;)if(s[c][0]==="exit"&&s[c][1].type==="strikethroughSequenceTemporary"&&s[c][1]._open&&s[l][1].end.offset-s[l][1].start.offset===s[c][1].end.offset-s[c][1].start.offset){s[l][1].type="strikethroughSequence",s[c][1].type="strikethroughSequence";const f={type:"strikethrough",start:Object.assign({},s[c][1].start),end:Object.assign({},s[l][1].end)},d={type:"strikethroughText",start:Object.assign({},s[c][1].end),end:Object.assign({},s[l][1].start)},m=[["enter",f,u],["enter",s[c][1],u],["exit",s[c][1],u],["enter",d,u]],h=u.parser.constructs.insideSpan.null;h&&Ze(m,m.length,0,Lr(h,s.slice(c+1,l),u)),Ze(m,m.length,0,[["exit",d,u],["enter",s[l][1],u],["exit",s[l][1],u],["exit",f,u]]),Ze(s,c-1,l-c+3,m),l=c+m.length-2;break}}for(l=-1;++l<s.length;)s[l][1].type==="strikethroughSequenceTemporary"&&(s[l][1].type="data");return s}function a(s,u,l){const c=this.previous,f=this.events;let d=0;return m;function m(b){return c===126&&f[f.length-1][1].type!=="characterEscape"?l(b):(s.enter("strikethroughSequenceTemporary"),h(b))}function h(b){const A=hr(c);if(b===126)return d>1?l(b):(s.consume(b),d++,h);if(d<2&&!n)return l(b);const _=s.exit("strikethroughSequenceTemporary"),x=hr(b);return _._open=!x||x===2&&!!A,_._close=!A||A===2&&!!x,u(b)}}}class MT{constructor(){this.map=[]}add(t,n,r){BT(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 BT(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 FT(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 HT(){return{flow:{null:{name:"table",tokenize:UT,resolveAll:jT}}}}function UT(e,t,n){const r=this;let i=0,a=0,s;return u;function u(w){let j=r.events.length-1;for(;j>-1;){const U=r.events[j][1].type;if(U==="lineEnding"||U==="linePrefix")j--;else break}const $=j>-1?r.events[j][1].type:null,H=$==="tableHead"||$==="tableRow"?O:l;return H===O&&r.parser.lazy[r.now().line]?n(w):H(w)}function l(w){return e.enter("tableHead"),e.enter("tableRow"),c(w)}function c(w){return w===124||(s=!0,a+=1),f(w)}function f(w){return w===null?n(w):te(w)?a>1?(a=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(w),e.exit("lineEnding"),h):n(w):he(w)?Te(e,f,"whitespace")(w):(a+=1,s&&(s=!1,i+=1),w===124?(e.enter("tableCellDivider"),e.consume(w),e.exit("tableCellDivider"),s=!0,f):(e.enter("data"),d(w)))}function d(w){return w===null||w===124||Se(w)?(e.exit("data"),f(w)):(e.consume(w),w===92?m:d)}function m(w){return w===92||w===124?(e.consume(w),d):d(w)}function h(w){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(w):(e.enter("tableDelimiterRow"),s=!1,he(w)?Te(e,b,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(w):b(w))}function b(w){return w===45||w===58?_(w):w===124?(s=!0,e.enter("tableCellDivider"),e.consume(w),e.exit("tableCellDivider"),A):k(w)}function A(w){return he(w)?Te(e,_,"whitespace")(w):_(w)}function _(w){return w===58?(a+=1,s=!0,e.enter("tableDelimiterMarker"),e.consume(w),e.exit("tableDelimiterMarker"),x):w===45?(a+=1,x(w)):w===null||te(w)?D(w):k(w)}function x(w){return w===45?(e.enter("tableDelimiterFiller"),I(w)):k(w)}function I(w){return w===45?(e.consume(w),I):w===58?(s=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(w),e.exit("tableDelimiterMarker"),C):(e.exit("tableDelimiterFiller"),C(w))}function C(w){return he(w)?Te(e,D,"whitespace")(w):D(w)}function D(w){return w===124?b(w):w===null||te(w)?!s||i!==a?k(w):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(w)):k(w)}function k(w){return n(w)}function O(w){return e.enter("tableRow"),G(w)}function G(w){return w===124?(e.enter("tableCellDivider"),e.consume(w),e.exit("tableCellDivider"),G):w===null||te(w)?(e.exit("tableRow"),t(w)):he(w)?Te(e,G,"whitespace")(w):(e.enter("data"),oe(w))}function oe(w){return w===null||w===124||Se(w)?(e.exit("data"),G(w)):(e.consume(w),w===92?ae:oe)}function ae(w){return w===92||w===124?(e.consume(w),oe):oe(w)}}function jT(e,t){let n=-1,r=!0,i=0,a=[0,0,0,0],s=[0,0,0,0],u=!1,l=0,c,f,d;const m=new MT;for(;++n<e.length;){const h=e[n],b=h[1];h[0]==="enter"?b.type==="tableHead"?(u=!1,l!==0&&(cu(m,t,l,c,f),f=void 0,l=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,d=void 0,a=[0,0,0,0],s=[0,n+1,0,0],u&&(u=!1,f={type:"tableBody",start:Object.assign({},b.start),end:Object.assign({},b.end)},m.add(n,0,[["enter",f,t]])),i=b.type==="tableDelimiterRow"?2:f?3:1):i&&(b.type==="data"||b.type==="tableDelimiterMarker"||b.type==="tableDelimiterFiller")?(r=!1,s[2]===0&&(a[1]!==0&&(s[0]=s[1],d=ir(m,t,a,i,void 0,d),a=[0,0,0,0]),s[2]=n)):b.type==="tableCellDivider"&&(r?r=!1:(a[1]!==0&&(s[0]=s[1],d=ir(m,t,a,i,void 0,d)),a=s,s=[a[1],n,0,0])):b.type==="tableHead"?(u=!0,l=n):b.type==="tableRow"||b.type==="tableDelimiterRow"?(l=n,a[1]!==0?(s[0]=s[1],d=ir(m,t,a,i,n,d)):s[1]!==0&&(d=ir(m,t,s,i,n,d)),i=0):i&&(b.type==="data"||b.type==="tableDelimiterMarker"||b.type==="tableDelimiterFiller")&&(s[3]=n)}for(l!==0&&cu(m,t,l,c,f),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=FT(t.events,n))}return e}function ir(e,t,n,r,i,a){const s=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",u="tableContent";n[0]!==0&&(a.end=Object.assign({},rn(t.events,n[0])),e.add(n[0],0,[["exit",a,t]]));const l=rn(t.events,n[1]);if(a={type:s,start:Object.assign({},l),end:Object.assign({},l)},e.add(n[1],0,[["enter",a,t]]),n[2]!==0){const c=rn(t.events,n[2]),f=rn(t.events,n[3]),d={type:u,start:Object.assign({},c),end:Object.assign({},f)};if(e.add(n[2],0,[["enter",d,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",d,t]])}return i!==void 0&&(a.end=Object.assign({},rn(t.events,i)),e.add(i,0,[["exit",a,t]]),a=void 0),a}function cu(e,t,n,r,i){const a=[],s=rn(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 rn(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const zT={name:"tasklistCheck",tokenize:YT};function $T(){return{text:{91:zT}}}function YT(e,t,n){const r=this;return i;function i(l){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(l):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(l),e.exit("taskListCheckMarker"),a)}function a(l){return Se(l)?(e.enter("taskListCheckValueUnchecked"),e.consume(l),e.exit("taskListCheckValueUnchecked"),s):l===88||l===120?(e.enter("taskListCheckValueChecked"),e.consume(l),e.exit("taskListCheckValueChecked"),s):n(l)}function s(l){return l===93?(e.enter("taskListCheckMarker"),e.consume(l),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),u):n(l)}function u(l){return te(l)?t(l):he(l)?e.check({tokenize:GT},t,n)(l):n(l)}}function GT(e,t,n){return Te(e,r,"whitespace");function r(i){return i===null?n(i):t(i)}}function VT(e){return ko([bT(),IT(),PT(e),HT(),$T()])}const qT={};function WT(e){const t=this,n=e||qT,r=t.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),a=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),s=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(VT(n)),a.push(hT()),s.push(mT(n))}const XT=({})=>{const{companySettings:e}=N.useContext(mn);return S.jsx("div",{className:`assistant
77
77
  transition
78
78
  ease-in-out
79
79
  delay-50
@@ -81,8 +81,8 @@ For more details see https://formatjs.io/docs/getting-started/message-distributi
81
81
  flex
82
82
  justify-center
83
83
  items-center
84
- `,children:_.jsx(na,{facet:e.agent.display[Le.AgentDisplayFacetRoleType.ASSISTANT]})})},ou=new Set;function zT(e){return ou.has(e)?!1:(ou.add(e),!0)}function $T(e,{root:t,rootSelector:n,rootMargin:r="0px",threshold:i=0,dedupeKey:a}={}){const s=k.useRef(!1),u=k.useRef();return k.useCallback(c=>{if(u.current?.(),u.current=void 0,!c||s.current)return;const f=t??(n?document.querySelector(n):null),d=()=>{a&&!zT(a)||(s.current=!0,e())};if(typeof window>"u"||!("IntersectionObserver"in window)){d();return}const h=new IntersectionObserver((m,b)=>{m[0]?.isIntersecting&&(b.disconnect(),d())},{root:f,rootMargin:r,threshold:i});h.observe(c),u.current=()=>h.disconnect()},[t,n,r,i,a,e])}class Fn{constructor(){}static getApiUrl=()=>typeof document<"u"&&new URL(document.URL)?.host.includes("localhost:3080")?"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 YT(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 GT({href:e="",queryParamToAppend:t="",children:n,context:r,onClick:i,seenRootEl:a,...s}){const{companySettings:u}=k.useContext(dn),o=e.startsWith("/")||typeof window<"u"&&e.startsWith(window.location.origin),c=Fn.getApiUrl(),f=YT(e,u.api.tracking?.queryParamToAppend),d=()=>{const y=`${c}/tracking/clicked/${r.appToken}`,S={discussionId:r.discussionId,urlClicked:e};try{fetch(y,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify(S),keepalive:!0,cache:"no-store",credentials:"omit",mode:"cors"}).catch(()=>{})}catch{}},h=()=>{const y=`${c}/tracking/displayed/${r.appToken}`,S={discussionId:r.discussionId,urlSeen:e};try{fetch(y,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify(S),keepalive:!0,cache:"no-store",credentials:"omit",mode:"cors"}).catch(()=>{})}catch{}},m=k.useMemo(()=>`${r.appToken}::${r.discussionId}::${e}`,[r.appToken,r.discussionId,e]),b=$T(h,{root:a,threshold:0,rootMargin:"0px 0px -10% 0px",dedupeKey:m}),A=y=>{d(),i?.(y)},C=o?{}:{target:"_blank",rel:"noopener noreferrer"};return o?_.jsx("a",{ref:b,href:f,...s,onClick:A,className:"customLinkInternal",children:n}):_.jsx("a",{ref:b,href:f,...C,...s,onClick:A,className:"customLinkExternal",children:n})}const VT=({content:e,metaData:t,context:n,seenRootEl:r})=>{const{chatlineLabelAssistantTranslation:i}=ua();return _.jsxs("div",{className:"flex justify-between mt-8 px-3 chatLineAssistant",children:[_.jsx("div",{className:"w-10 mr-3 mt-6",children:_.jsx("div",{children:_.jsx(jT,{})})}),_.jsxs("div",{className:`w-full p-4 rounded-lg transition-all duration-300 ${t?.isErrorMessage?"bg-red-100 border-l-4 border-red-400 text-red-800 shadow-md animate-fade-in":"bg-white text-gray-800"}`,children:[_.jsx("p",{className:"font-bold",children:i}),_.jsx("div",{children:_.jsx(Go,{remarkPlugins:[UT],remarkRehypeOptions:{passThrough:["link"]},rehypePlugins:[Ol],components:{a:({node:a,href:s,children:u,...o})=>_.jsx(GT,{href:s??"",...o,context:n,seenRootEl:r,children:u})},children:e&&e})})]})]})},qT=({userType:e,content:t,metaData:n,context:r,seenRootEl:i})=>{const a=e==="user",s=e==="assistant";return _.jsxs(_.Fragment,{children:[a&&_.jsx(Ob,{content:t,metaData:n}),s&&_.jsx(VT,{content:t,metaData:n,context:r,seenRootEl:i})]})};function WT(e,t,n){let[r,i]=k.useState(e||t),a=k.useRef(e!==void 0),s=e!==void 0;k.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 u=s?e:r,o=k.useCallback((c,...f)=>{let d=(h,...m)=>{n&&(Object.is(u,h)||n(h,...m)),s||(u=h)};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((m,...b)=>{let A=c(s?u:m,...b);return d(A,...f),s?m:A})):(s||i(c),d(c,...f))},[s,u,n]);return[u,o]}const br={prefix:String(Math.round(Math.random()*1e10)),current:0},tc=k.createContext(br),XT=k.createContext(!1);let QT=!!(typeof window<"u"&&window.document&&window.document.createElement),mi=new WeakMap;function KT(e=!1){let t=k.useContext(tc),n=k.useRef(null);if(n.current===null&&!e){var r,i;let a=(i=k.__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=mi.get(a);s==null?mi.set(a,{id:t.current,state:a.memoizedState}):a.memoizedState!==s.state&&(t.current=s.id,mi.delete(a))}n.current=++t.current}return n.current}function ZT(e){let t=k.useContext(tc);t===br&&!QT&&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=KT(!!e),r=t===br&&process.env.NODE_ENV==="test"?"react-aria":`react-aria${t.prefix}`;return e||`${r}-${n}`}function JT(e){let t=k.useId(),[n]=k.useState(i2()),r=n||process.env.NODE_ENV==="test"?"react-aria":`react-aria${br.prefix}`;return e||`${r}-${t}`}const e2=typeof k.useId=="function"?JT:ZT;function t2(){return!1}function n2(){return!0}function r2(e){return()=>{}}function i2(){return typeof k.useSyncExternalStore=="function"?k.useSyncExternalStore(r2,t2,n2):k.useContext(XT)}function nc(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=nc(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function a2(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=nc(e))&&(r&&(r+=" "),r+=t);return r}const Qt=typeof document<"u"?k.useLayoutEffect:()=>{};function $t(e){const t=k.useRef(null);return Qt(()=>{t.current=e},[e]),k.useCallback((...n)=>{const r=t.current;return r?.(...n)},[])}function s2(e){let[t,n]=k.useState(e),r=k.useRef(null),i=$t(()=>{if(!r.current)return;let s=r.current.next();if(s.done){r.current=null;return}t===s.value?i():n(s.value)});Qt(()=>{r.current&&i()});let a=$t(s=>{r.current=s(t),i()});return[t,a]}let u2=!!(typeof window<"u"&&window.document&&window.document.createElement),Er=new Map;function Tr(e){let[t,n]=k.useState(e),r=k.useRef(null),i=e2(t),a=k.useCallback(s=>{r.current=s},[]);return u2&&Er.set(i,a),Qt(()=>{let s=i;return()=>{Er.delete(s)}},[i]),k.useEffect(()=>{let s=r.current;s&&(r.current=null,n(s))}),i}function o2(e,t){if(e===t)return e;let n=Er.get(e);if(n)return n(t),t;let r=Er.get(t);return r?(r(e),e):t}function lu(e=[]){let t=Tr(),[n,r]=s2(t),i=k.useCallback(()=>{r(function*(){yield t,yield document.getElementById(t)?t:void 0})},[t,r]);return Qt(i,[t,i,...e]),n}function l2(...e){return(...t)=>{for(let n of e)typeof n=="function"&&n(...t)}}const qn=e=>{var t;return(t=e?.ownerDocument)!==null&&t!==void 0?t:document},xr=e=>e&&"window"in e&&e.window===e?e:qn(e).defaultView||window;function yr(...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]=l2(a,s):(i==="className"||i==="UNSAFE_className")&&typeof a=="string"&&typeof s=="string"?t[i]=a2(a,s):i==="id"&&a&&s?t.id=o2(a,s):t[i]=s!==void 0?s:a}}return t}const c2=new Set(["id"]),f2=new Set(["aria-label","aria-labelledby","aria-describedby","aria-details"]),d2=new Set(["href","target","rel","download","ping","referrerPolicy"]),h2=/^(data-.*)$/;function m2(e,t={}){let{labelable:n,isLink:r,propNames:i}=t,a={};for(const s in e)Object.prototype.hasOwnProperty.call(e,s)&&(c2.has(s)||n&&f2.has(s)||r&&d2.has(s)||i?.has(s)||h2.test(s))&&(a[s]=e[s]);return a}function cu(e){if(p2())e.focus({preventScroll:!0});else{let t=g2(e);e.focus(),b2(t)}}let rr=null;function p2(){if(rr==null){rr=!1;try{document.createElement("div").focus({get preventScroll(){return rr=!0,!0}})}catch{}}return rr}function g2(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 b2(e){for(let{element:t,scrollTop:n,scrollLeft:r}of e)t.scrollTop=n,t.scrollLeft=r}function E2(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 T2(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 x2(){return T2(/^Mac/i)}function y2(){return E2(/Android/i)}let nn=new Map,Xi=new Set;function fu(){if(typeof window>"u")return;function e(r){return"propertyName"in r}let t=r=>{if(!e(r)||!r.target)return;let i=nn.get(r.target);i||(i=new Set,nn.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=nn.get(r.target);if(i&&(i.delete(r.propertyName),i.size===0&&(r.target.removeEventListener("transitioncancel",n),nn.delete(r.target)),nn.size===0)){for(let a of Xi)a();Xi.clear()}};document.body.addEventListener("transitionrun",t),document.body.addEventListener("transitionend",n)}typeof document<"u"&&(document.readyState!=="loading"?fu():document.addEventListener("DOMContentLoaded",fu));function A2(e){requestAnimationFrame(()=>{nn.size===0?e():Xi.add(e)})}function _2(e,t){let{id:n,"aria-label":r,"aria-labelledby":i}=e;return n=Tr(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 S2(e,t){Qt(()=>{if(e&&e.ref&&t)return e.ref.current=t.current,()=>{e.ref&&(e.ref.current=null)}})}function C2(e){return e.mozInputSource===0&&e.isTrusted?!0:y2()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function w2(e,t,n){let r=k.useRef(t),i=$t(()=>{n&&n(r.current)});k.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 v2=k.createContext({register:()=>{}});v2.displayName="PressResponderContext";class I2{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 N2(e){let t=k.useRef({isFocused:!1,observer:null});Qt(()=>{const r=t.current;return()=>{r.observer&&(r.observer.disconnect(),r.observer=null)}},[]);let n=$t(r=>{e?.(r)});return k.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 I2("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 u=i===document.activeElement?null:document.activeElement;i.dispatchEvent(new FocusEvent("blur",{relatedTarget:u})),i.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:u}))}}),t.current.observer.observe(i,{attributes:!0,attributeFilter:["disabled"]})}},[n])}function k2(e){let{isDisabled:t,onFocus:n,onBlur:r,onFocusChange:i}=e;const a=k.useCallback(o=>{if(o.target===o.currentTarget)return r&&r(o),i&&i(!1),!0},[r,i]),s=N2(a),u=k.useCallback(o=>{o.target===o.currentTarget&&document.activeElement===o.target&&(n&&n(o),i&&i(!0),s(o))},[i,n,s]);return{focusProps:{onFocus:!t&&(n||i||r)?u:void 0,onBlur:!t&&(r||i)?a:void 0}}}let Tn=null,O2=new Set,Dn=new Map,Vt=!1,Qi=!1;function Hr(e,t){for(let n of O2)n(e,t)}function R2(e){return!(e.metaKey||!x2()&&e.altKey||e.ctrlKey||e.key==="Control"||e.key==="Shift"||e.key==="Meta")}function Ar(e){Vt=!0,R2(e)&&(Tn="keyboard",Hr("keyboard",e))}function tt(e){Tn="pointer",(e.type==="mousedown"||e.type==="pointerdown")&&(Vt=!0,Hr("pointer",e))}function rc(e){C2(e)&&(Vt=!0,Tn="virtual")}function ic(e){e.target===window||e.target===document||(!Vt&&!Qi&&(Tn="virtual",Hr("virtual",e)),Vt=!1,Qi=!1)}function ac(){Vt=!1,Qi=!0}function du(e){if(typeof window>"u"||Dn.get(xr(e)))return;const t=xr(e),n=qn(e);let r=t.HTMLElement.prototype.focus;t.HTMLElement.prototype.focus=function(){Vt=!0,r.apply(this,arguments)},n.addEventListener("keydown",Ar,!0),n.addEventListener("keyup",Ar,!0),n.addEventListener("click",rc,!0),t.addEventListener("focus",ic,!0),t.addEventListener("blur",ac,!1),typeof PointerEvent<"u"?(n.addEventListener("pointerdown",tt,!0),n.addEventListener("pointermove",tt,!0),n.addEventListener("pointerup",tt,!0)):(n.addEventListener("mousedown",tt,!0),n.addEventListener("mousemove",tt,!0),n.addEventListener("mouseup",tt,!0)),t.addEventListener("beforeunload",()=>{sc(e)},{once:!0}),Dn.set(t,{focus:r})}const sc=(e,t)=>{const n=xr(e),r=qn(e);t&&r.removeEventListener("DOMContentLoaded",t),Dn.has(n)&&(n.HTMLElement.prototype.focus=Dn.get(n).focus,r.removeEventListener("keydown",Ar,!0),r.removeEventListener("keyup",Ar,!0),r.removeEventListener("click",rc,!0),n.removeEventListener("focus",ic,!0),n.removeEventListener("blur",ac,!1),typeof PointerEvent<"u"?(r.removeEventListener("pointerdown",tt,!0),r.removeEventListener("pointermove",tt,!0),r.removeEventListener("pointerup",tt,!0)):(r.removeEventListener("mousedown",tt,!0),r.removeEventListener("mousemove",tt,!0),r.removeEventListener("mouseup",tt,!0)),Dn.delete(n))};function L2(e){const t=qn(e);let n;return t.readyState!=="loading"?du(e):(n=()=>{du(e)},t.addEventListener("DOMContentLoaded",n)),()=>sc(e,n)}typeof document<"u"&&L2();function D2(){return Tn}function P2(e){Tn=e,Hr(e,null)}function hu(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 M2(e){return{keyboardProps:e.isDisabled?{}:{onKeyDown:hu(e.onKeyDown),onKeyUp:hu(e.onKeyUp)}}}function B2(e){const t=qn(e);if(D2()==="virtual"){let n=t.activeElement;A2(()=>{t.activeElement===n&&e.isConnected&&cu(e)})}else cu(e)}function F2(e,t){return!e||!t?!1:t.some(n=>n.contains(e))}class Na{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 mu({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&&F2(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 Na;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 mu({scopeRef:null}),this.fastMap.set(null,this.root)}}class mu{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 Na;let H2=k.createContext(null);function U2(e){let t=k.useContext(H2)||{};S2(t,e);let{ref:n,...r}=t;return r}function j2(e,t){let{focusProps:n}=k2(e),{keyboardProps:r}=M2(e),i=yr(n,r),a=U2(t),s=e.isDisabled?{}:a,u=k.useRef(e.autoFocus);return k.useEffect(()=>{u.current&&t.current&&B2(t.current),u.current=!1},[t]),{focusableProps:yr({...i,tabIndex:e.excludeFromTabOrder&&!e.isDisabled?-1:void 0},s)}}function z2(e,t,n){let{validationBehavior:r,focus:i}=e;Qt(()=>{if(r==="native"&&n?.current){let o=t.realtimeValidation.isInvalid?t.realtimeValidation.validationErrors.join(" ")||"Invalid value.":"";n.current.setCustomValidity(o),n.current.hasAttribute("title")||(n.current.title=""),t.realtimeValidation.isInvalid||t.updateValidation(Y2(n.current))}});let a=$t(()=>{t.resetValidation()}),s=$t(o=>{var c;t.displayValidation.isInvalid||t.commitValidation();let f=n==null||(c=n.current)===null||c===void 0?void 0:c.form;if(!o.defaultPrevented&&n&&f&&G2(f)===n.current){var d;i?i():(d=n.current)===null||d===void 0||d.focus(),P2("keyboard")}o.preventDefault()}),u=$t(()=>{t.commitValidation()});k.useEffect(()=>{let o=n?.current;if(!o)return;let c=o.form;return o.addEventListener("invalid",s),o.addEventListener("change",u),c?.addEventListener("reset",a),()=>{o.removeEventListener("invalid",s),o.removeEventListener("change",u),c?.removeEventListener("reset",a)}},[n,s,u,a,r])}function $2(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 Y2(e){return{isInvalid:!e.validity.valid,validationDetails:$2(e),validationErrors:e.validationMessage?[e.validationMessage]:[]}}function G2(e){for(let t=0;t<e.elements.length;t++){let n=e.elements[t];if(!n.validity.valid)return n}return null}const uc={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valueMissing:!1,valid:!0},oc={...uc,customError:!0,valid:!1},_n={isInvalid:!1,validationDetails:uc,validationErrors:[]},V2=k.createContext({}),pu="__formValidationState"+Date.now();function q2(e){if(e[pu]){let{realtimeValidation:t,displayValidation:n,updateValidation:r,resetValidation:i,commitValidation:a}=e[pu];return{realtimeValidation:t,displayValidation:n,updateValidation:r,resetValidation:i,commitValidation:a}}return W2(e)}function W2(e){let{isInvalid:t,validationState:n,name:r,value:i,builtinValidation:a,validate:s,validationBehavior:u="aria"}=e;n&&(t||(t=n==="invalid"));let o=t?{isInvalid:!0,validationErrors:[],validationDetails:oc}:null,c=k.useMemo(()=>gu(X2(s,i)),[s,i]);a?.validationDetails.valid&&(a=null);let f=k.useContext(V2),d=k.useMemo(()=>r?Array.isArray(r)?r.flatMap(w=>Ki(f[w])):Ki(f[r]):[],[f,r]),[h,m]=k.useState(f),[b,A]=k.useState(!1);f!==h&&(m(f),A(!1));let C=k.useMemo(()=>gu(b?[]:d),[b,d]),y=k.useRef(_n),[S,v]=k.useState(_n),D=k.useRef(_n),N=()=>{if(!O)return;q(!1);let w=c||a||y.current;pi(w,D.current)||(D.current=w,v(w))},[O,q]=k.useState(!1);return k.useEffect(N),{realtimeValidation:o||C||c||a||_n,displayValidation:u==="native"?o||C||S:o||C||c||a||S,updateValidation(w){u==="aria"&&!pi(S,w)?v(w):y.current=w},resetValidation(){let w=_n;pi(w,D.current)||(D.current=w,v(w)),u==="native"&&q(!1),A(!0)},commitValidation(){u==="native"&&q(!0),A(!0)}}}function Ki(e){return e?Array.isArray(e)?e:[e]:[]}function X2(e,t){if(typeof e=="function"){let n=e(t);if(n&&typeof n!="boolean")return Ki(n)}return[]}function gu(e){return e.length?{isInvalid:!0,validationErrors:e,validationDetails:oc}:null}function pi(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 Q2(e){let{id:t,label:n,"aria-labelledby":r,"aria-label":i,labelElementType:a="label"}=e;t=Tr(t);let s=Tr(),u={};n?(r=r?`${s} ${r}`:s,u={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 o=_2({id:t,"aria-label":i,"aria-labelledby":r});return{labelProps:u,fieldProps:o}}function K2(e){let{description:t,errorMessage:n,isInvalid:r,validationState:i}=e,{labelProps:a,fieldProps:s}=Q2(e),u=lu([!!t,!!n,r,i]),o=lu([!!t,!!n,r,i]);return s=yr(s,{"aria-describedby":[u,o,e["aria-describedby"]].filter(Boolean).join(" ")||void 0}),{labelProps:a,fieldProps:s,descriptionProps:{id:u},errorMessageProps:{id:o}}}function Z2(e,t){let{inputElementType:n="input",isDisabled:r=!1,isRequired:i=!1,isReadOnly:a=!1,type:s="text",validationBehavior:u="aria"}=e,[o,c]=WT(e.value,e.defaultValue||"",e.onChange),{focusableProps:f}=j2(e,t),d=q2({...e,value:o}),{isInvalid:h,validationErrors:m,validationDetails:b}=d.displayValidation,{labelProps:A,fieldProps:C,descriptionProps:y,errorMessageProps:S}=K2({...e,isInvalid:h,errorMessage:e.errorMessage||m}),v=m2(e,{labelable:!0});const D={type:s,pattern:e.pattern};return w2(t,o,c),z2(e,d,t),k.useEffect(()=>{if(t.current instanceof xr(t.current).HTMLTextAreaElement){let N=t.current;Object.defineProperty(N,"defaultValue",{get:()=>N.value,set:()=>{},configurable:!0})}},[t]),{labelProps:A,inputProps:yr(v,n==="input"&&D,{disabled:r,readOnly:a,required:i&&u==="native","aria-required":i&&u==="aria"||void 0,"aria-invalid":h||void 0,"aria-errormessage":e["aria-errormessage"],"aria-activedescendant":e["aria-activedescendant"],"aria-autocomplete":e["aria-autocomplete"],"aria-haspopup":e["aria-haspopup"],value:o,onChange:N=>c(N.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,...f,...C}),descriptionProps:y,errorMessageProps:S,isInvalid:h,validationErrors:m,validationDetails:b}}const J2=e=>e.charCodeAt(e.length-1)===10,ex=e=>{const[t,n]=k.useState(""),r=()=>{A.current&&(A.current.style.height=A.current.scrollHeight+"px")},i=()=>{A.current&&(A.current.style.height="48px")},a=G=>{n(G)};k.useEffect(r,[t]);let{label:s,SubmitComponent:u,onSubmit:o,isLoadingStream:c,audioEnabled:f=!1,MicComponent:d,onPressMicButton:h,LoadingComponent:m,onPressLoadingButton:b}=e,A=k.useRef(null),{labelProps:C,inputProps:y}=Z2({...e,inputElementType:"textarea"},A);const S=G=>{J2(G.target.value)||a(G.target.value)},v=G=>{if(G.key==="Enter"||G.code==="Enter"||G.keyCode===13||G.code==="NumpadEnter"){if(G.shiftKey)a(t+`
85
- `);else if(!G.shiftKey){G.preventDefault(),G.stopPropagation(),c||O();return}}},D=G=>{(G.key==="Enter"||G.code==="Enter"||G.keyCode===13||G.code==="NumpadEnter")&&(G.preventDefault(),G.stopPropagation())};let N=e.isDisabled;e.shouldDisableIfInputIsEmpty&&(N=e.isDisabled||t.length===0);const O=()=>{i(),o&&o(t),a("")},q=t.trim().length>0;console.log("audio",f);const ue=()=>c&&m?_.jsx("div",{className:"relative",children:_.jsx(m,{onPressLoadingButton:b})}):u?!f||!d?_.jsx("div",{className:"relative",children:_.jsx(u,{onSubmitButton:O,isDisabled:N})}):q?_.jsx("div",{className:"relative",children:_.jsx(u,{onSubmitButton:O,isDisabled:N})}):_.jsxs("div",{className:"relative",children:[_.jsx("div",{className:"block md:hidden",children:_.jsx(d,{onPressMicButton:h})}),_.jsxs("div",{className:"hidden md:block",children:[_.jsx(d,{onPressMicButton:h,className:"md:right-12"}),_.jsx(u,{onSubmitButton:O,isDisabled:N,className:"md:right-3"})]})]}):null;return _.jsxs("div",{style:{display:"flex",flexDirection:"column"},className:`${e.classNameContainer} w-full`,children:[_.jsxs("div",{style:{display:"flex",flexDirection:"column"},children:[_.jsx("label",{...C,className:e.classNameLabel,children:s}),_.jsx("textarea",{...y,ref:A,className:`${e.classNameTextarea} p-3`,onChange:S,value:t,rows:1,style:{overflow:"hidden",outlineColor:"#a8a8a8",border:"none",outline:"none",width:"calc(100% - 30px)",resize:"none"},onKeyDown:v,onKeyUp:D})]}),ue()]})},tx=({onSubmitButton:e,isDisabled:t,className:n})=>_.jsx("div",{children:_.jsx("button",{className:`absolute
84
+ `,children:S.jsx(aa,{facet:e.agent.display[Oe.AgentDisplayFacetRoleType.ASSISTANT]})})},fu=new Set;function QT(e){return fu.has(e)?!1:(fu.add(e),!0)}function KT(e,{root:t,rootSelector:n,rootMargin:r="0px",threshold:i=0,dedupeKey:a}={}){const s=N.useRef(!1),u=N.useRef();return N.useCallback(c=>{if(u.current?.(),u.current=void 0,!c||s.current)return;const f=t??(n?document.querySelector(n):null),d=()=>{a&&!QT(a)||(s.current=!0,e())};if(typeof window>"u"||!("IntersectionObserver"in window)){d();return}const m=new IntersectionObserver((h,b)=>{h[0]?.isIntersecting&&(b.disconnect(),d())},{root:f,rootMargin:r,threshold:i});m.observe(c),u.current=()=>m.disconnect()},[t,n,r,i,a,e])}class Un{constructor(){}static getApiUrl=()=>ia()?"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 ZT(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 JT({href:e="",queryParamToAppend:t="",children:n,context:r,onClick:i,seenRootEl:a,...s}){const{companySettings:u}=N.useContext(mn),l=e.startsWith("/")||typeof window<"u"&&e.startsWith(window.location.origin),c=Un.getApiUrl(),f=ZT(e,u.api.tracking?.queryParamToAppend),d=()=>{const x=`${c}/tracking/clicked/${r.appToken}`,I={discussionId:r.discussionId,urlClicked:e};try{fetch(x,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify(I),keepalive:!0,cache:"no-store",credentials:"omit",mode:"cors"}).catch(()=>{})}catch{}},m=()=>{const x=`${c}/tracking/displayed/${r.appToken}`,I={discussionId:r.discussionId,urlSeen:e};try{fetch(x,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify(I),keepalive:!0,cache:"no-store",credentials:"omit",mode:"cors"}).catch(()=>{})}catch{}},h=N.useMemo(()=>`${r.appToken}::${r.discussionId}::${e}`,[r.appToken,r.discussionId,e]),b=KT(m,{root:a,threshold:0,rootMargin:"0px 0px -10% 0px",dedupeKey:h}),A=x=>{d(),i?.(x)},_=l?{}:{target:"_blank",rel:"noopener noreferrer"};return l?S.jsx("a",{ref:b,href:f,...s,onClick:A,className:"customLinkInternal",children:n}):S.jsx("a",{ref:b,href:f,..._,...s,onClick:A,className:"customLinkExternal",children:n})}const e2=({content:e,metaData:t,context:n,seenRootEl:r})=>{const{chatlineLabelAssistantTranslation:i}=ca();return S.jsxs("div",{className:"flex justify-between mt-8 px-3 chatLineAssistant",children:[S.jsx("div",{className:"w-10 mr-3 mt-6",children:S.jsx("div",{children:S.jsx(XT,{})})}),S.jsxs("div",{className:`w-full p-4 rounded-lg transition-all duration-300 ${t?.isErrorMessage?"bg-red-100 border-l-4 border-red-400 text-red-800 shadow-md animate-fade-in":"bg-white text-gray-800"}`,children:[S.jsx("p",{className:"font-bold",children:i}),S.jsx("div",{children:S.jsx(Ko,{remarkPlugins:[WT],remarkRehypeOptions:{passThrough:["link"]},rehypePlugins:[Bl],components:{a:({node:a,href:s,children:u,...l})=>S.jsx(JT,{href:s??"",...l,context:n,seenRootEl:r,children:u})},children:e&&e})})]})]})},t2=({userType:e,content:t,metaData:n,context:r,seenRootEl:i})=>{const a=e==="user",s=e==="assistant";return S.jsxs(S.Fragment,{children:[a&&S.jsx(Hb,{content:t,metaData:n}),s&&S.jsx(e2,{content:t,metaData:n,context:r,seenRootEl:i})]})};function n2(e,t,n){let[r,i]=N.useState(e||t),a=N.useRef(e!==void 0),s=e!==void 0;N.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 u=s?e:r,l=N.useCallback((c,...f)=>{let d=(m,...h)=>{n&&(Object.is(u,m)||n(m,...h)),s||(u=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?u:h,...b);return d(A,...f),s?h:A})):(s||i(c),d(c,...f))},[s,u,n]);return[u,l]}const Tr={prefix:String(Math.round(Math.random()*1e10)),current:0},uc=N.createContext(Tr),r2=N.createContext(!1);let i2=!!(typeof window<"u"&&window.document&&window.document.createElement),gi=new WeakMap;function a2(e=!1){let t=N.useContext(uc),n=N.useRef(null);if(n.current===null&&!e){var r,i;let a=(i=N.__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=gi.get(a);s==null?gi.set(a,{id:t.current,state:a.memoizedState}):a.memoizedState!==s.state&&(t.current=s.id,gi.delete(a))}n.current=++t.current}return n.current}function s2(e){let t=N.useContext(uc);t===Tr&&!i2&&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=a2(!!e),r=t===Tr&&process.env.NODE_ENV==="test"?"react-aria":`react-aria${t.prefix}`;return e||`${r}-${n}`}function u2(e){let t=N.useId(),[n]=N.useState(d2()),r=n||process.env.NODE_ENV==="test"?"react-aria":`react-aria${Tr.prefix}`;return e||`${r}-${t}`}const o2=typeof N.useId=="function"?u2:s2;function l2(){return!1}function c2(){return!0}function f2(e){return()=>{}}function d2(){return typeof N.useSyncExternalStore=="function"?N.useSyncExternalStore(f2,l2,c2):N.useContext(r2)}function oc(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=oc(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function h2(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=oc(e))&&(r&&(r+=" "),r+=t);return r}const Zt=typeof document<"u"?N.useLayoutEffect:()=>{};function Yt(e){const t=N.useRef(null);return Zt(()=>{t.current=e},[e]),N.useCallback((...n)=>{const r=t.current;return r?.(...n)},[])}function m2(e){let[t,n]=N.useState(e),r=N.useRef(null),i=Yt(()=>{if(!r.current)return;let s=r.current.next();if(s.done){r.current=null;return}t===s.value?i():n(s.value)});Zt(()=>{r.current&&i()});let a=Yt(s=>{r.current=s(t),i()});return[t,a]}let p2=!!(typeof window<"u"&&window.document&&window.document.createElement),yr=new Map;function xr(e){let[t,n]=N.useState(e),r=N.useRef(null),i=o2(t),a=N.useCallback(s=>{r.current=s},[]);return p2&&yr.set(i,a),Zt(()=>{let s=i;return()=>{yr.delete(s)}},[i]),N.useEffect(()=>{let s=r.current;s&&(r.current=null,n(s))}),i}function g2(e,t){if(e===t)return e;let n=yr.get(e);if(n)return n(t),t;let r=yr.get(t);return r?(r(e),e):t}function du(e=[]){let t=xr(),[n,r]=m2(t),i=N.useCallback(()=>{r(function*(){yield t,yield document.getElementById(t)?t:void 0})},[t,r]);return Zt(i,[t,i,...e]),n}function b2(...e){return(...t)=>{for(let n of e)typeof n=="function"&&n(...t)}}const Xn=e=>{var t;return(t=e?.ownerDocument)!==null&&t!==void 0?t:document},Ar=e=>e&&"window"in e&&e.window===e?e:Xn(e).defaultView||window;function _r(...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]=b2(a,s):(i==="className"||i==="UNSAFE_className")&&typeof a=="string"&&typeof s=="string"?t[i]=h2(a,s):i==="id"&&a&&s?t.id=g2(a,s):t[i]=s!==void 0?s:a}}return t}const E2=new Set(["id"]),T2=new Set(["aria-label","aria-labelledby","aria-describedby","aria-details"]),y2=new Set(["href","target","rel","download","ping","referrerPolicy"]),x2=/^(data-.*)$/;function A2(e,t={}){let{labelable:n,isLink:r,propNames:i}=t,a={};for(const s in e)Object.prototype.hasOwnProperty.call(e,s)&&(E2.has(s)||n&&T2.has(s)||r&&y2.has(s)||i?.has(s)||x2.test(s))&&(a[s]=e[s]);return a}function hu(e){if(_2())e.focus({preventScroll:!0});else{let t=S2(e);e.focus(),C2(t)}}let ar=null;function _2(){if(ar==null){ar=!1;try{document.createElement("div").focus({get preventScroll(){return ar=!0,!0}})}catch{}}return ar}function S2(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 C2(e){for(let{element:t,scrollTop:n,scrollLeft:r}of e)t.scrollTop=n,t.scrollLeft=r}function w2(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 I2(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 v2(){return I2(/^Mac/i)}function N2(){return w2(/Android/i)}let an=new Map,Ki=new Set;function mu(){if(typeof window>"u")return;function e(r){return"propertyName"in r}let t=r=>{if(!e(r)||!r.target)return;let i=an.get(r.target);i||(i=new Set,an.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=an.get(r.target);if(i&&(i.delete(r.propertyName),i.size===0&&(r.target.removeEventListener("transitioncancel",n),an.delete(r.target)),an.size===0)){for(let a of Ki)a();Ki.clear()}};document.body.addEventListener("transitionrun",t),document.body.addEventListener("transitionend",n)}typeof document<"u"&&(document.readyState!=="loading"?mu():document.addEventListener("DOMContentLoaded",mu));function k2(e){requestAnimationFrame(()=>{an.size===0?e():Ki.add(e)})}function O2(e,t){let{id:n,"aria-label":r,"aria-labelledby":i}=e;return n=xr(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 L2(e,t){Zt(()=>{if(e&&e.ref&&t)return e.ref.current=t.current,()=>{e.ref&&(e.ref.current=null)}})}function R2(e){return e.mozInputSource===0&&e.isTrusted?!0:N2()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function D2(e,t,n){let r=N.useRef(t),i=Yt(()=>{n&&n(r.current)});N.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 P2=N.createContext({register:()=>{}});P2.displayName="PressResponderContext";class M2{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 B2(e){let t=N.useRef({isFocused:!1,observer:null});Zt(()=>{const r=t.current;return()=>{r.observer&&(r.observer.disconnect(),r.observer=null)}},[]);let n=Yt(r=>{e?.(r)});return N.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 M2("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 u=i===document.activeElement?null:document.activeElement;i.dispatchEvent(new FocusEvent("blur",{relatedTarget:u})),i.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:u}))}}),t.current.observer.observe(i,{attributes:!0,attributeFilter:["disabled"]})}},[n])}function F2(e){let{isDisabled:t,onFocus:n,onBlur:r,onFocusChange:i}=e;const a=N.useCallback(l=>{if(l.target===l.currentTarget)return r&&r(l),i&&i(!1),!0},[r,i]),s=B2(a),u=N.useCallback(l=>{l.target===l.currentTarget&&document.activeElement===l.target&&(n&&n(l),i&&i(!0),s(l))},[i,n,s]);return{focusProps:{onFocus:!t&&(n||i||r)?u:void 0,onBlur:!t&&(r||i)?a:void 0}}}let xn=null,H2=new Set,Mn=new Map,qt=!1,Zi=!1;function jr(e,t){for(let n of H2)n(e,t)}function U2(e){return!(e.metaKey||!v2()&&e.altKey||e.ctrlKey||e.key==="Control"||e.key==="Shift"||e.key==="Meta")}function Sr(e){qt=!0,U2(e)&&(xn="keyboard",jr("keyboard",e))}function tt(e){xn="pointer",(e.type==="mousedown"||e.type==="pointerdown")&&(qt=!0,jr("pointer",e))}function lc(e){R2(e)&&(qt=!0,xn="virtual")}function cc(e){e.target===window||e.target===document||(!qt&&!Zi&&(xn="virtual",jr("virtual",e)),qt=!1,Zi=!1)}function fc(){qt=!1,Zi=!0}function pu(e){if(typeof window>"u"||Mn.get(Ar(e)))return;const t=Ar(e),n=Xn(e);let r=t.HTMLElement.prototype.focus;t.HTMLElement.prototype.focus=function(){qt=!0,r.apply(this,arguments)},n.addEventListener("keydown",Sr,!0),n.addEventListener("keyup",Sr,!0),n.addEventListener("click",lc,!0),t.addEventListener("focus",cc,!0),t.addEventListener("blur",fc,!1),typeof PointerEvent<"u"?(n.addEventListener("pointerdown",tt,!0),n.addEventListener("pointermove",tt,!0),n.addEventListener("pointerup",tt,!0)):(n.addEventListener("mousedown",tt,!0),n.addEventListener("mousemove",tt,!0),n.addEventListener("mouseup",tt,!0)),t.addEventListener("beforeunload",()=>{dc(e)},{once:!0}),Mn.set(t,{focus:r})}const dc=(e,t)=>{const n=Ar(e),r=Xn(e);t&&r.removeEventListener("DOMContentLoaded",t),Mn.has(n)&&(n.HTMLElement.prototype.focus=Mn.get(n).focus,r.removeEventListener("keydown",Sr,!0),r.removeEventListener("keyup",Sr,!0),r.removeEventListener("click",lc,!0),n.removeEventListener("focus",cc,!0),n.removeEventListener("blur",fc,!1),typeof PointerEvent<"u"?(r.removeEventListener("pointerdown",tt,!0),r.removeEventListener("pointermove",tt,!0),r.removeEventListener("pointerup",tt,!0)):(r.removeEventListener("mousedown",tt,!0),r.removeEventListener("mousemove",tt,!0),r.removeEventListener("mouseup",tt,!0)),Mn.delete(n))};function j2(e){const t=Xn(e);let n;return t.readyState!=="loading"?pu(e):(n=()=>{pu(e)},t.addEventListener("DOMContentLoaded",n)),()=>dc(e,n)}typeof document<"u"&&j2();function z2(){return xn}function $2(e){xn=e,jr(e,null)}function gu(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 Y2(e){return{keyboardProps:e.isDisabled?{}:{onKeyDown:gu(e.onKeyDown),onKeyUp:gu(e.onKeyUp)}}}function G2(e){const t=Xn(e);if(z2()==="virtual"){let n=t.activeElement;k2(()=>{t.activeElement===n&&e.isConnected&&hu(e)})}else hu(e)}function V2(e,t){return!e||!t?!1:t.some(n=>n.contains(e))}class La{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 bu({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&&V2(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 La;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 bu({scopeRef:null}),this.fastMap.set(null,this.root)}}class bu{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 La;let q2=N.createContext(null);function W2(e){let t=N.useContext(q2)||{};L2(t,e);let{ref:n,...r}=t;return r}function X2(e,t){let{focusProps:n}=F2(e),{keyboardProps:r}=Y2(e),i=_r(n,r),a=W2(t),s=e.isDisabled?{}:a,u=N.useRef(e.autoFocus);return N.useEffect(()=>{u.current&&t.current&&G2(t.current),u.current=!1},[t]),{focusableProps:_r({...i,tabIndex:e.excludeFromTabOrder&&!e.isDisabled?-1:void 0},s)}}function Q2(e,t,n){let{validationBehavior:r,focus:i}=e;Zt(()=>{if(r==="native"&&n?.current){let l=t.realtimeValidation.isInvalid?t.realtimeValidation.validationErrors.join(" ")||"Invalid value.":"";n.current.setCustomValidity(l),n.current.hasAttribute("title")||(n.current.title=""),t.realtimeValidation.isInvalid||t.updateValidation(Z2(n.current))}});let a=Yt(()=>{t.resetValidation()}),s=Yt(l=>{var c;t.displayValidation.isInvalid||t.commitValidation();let f=n==null||(c=n.current)===null||c===void 0?void 0:c.form;if(!l.defaultPrevented&&n&&f&&J2(f)===n.current){var d;i?i():(d=n.current)===null||d===void 0||d.focus(),$2("keyboard")}l.preventDefault()}),u=Yt(()=>{t.commitValidation()});N.useEffect(()=>{let l=n?.current;if(!l)return;let c=l.form;return l.addEventListener("invalid",s),l.addEventListener("change",u),c?.addEventListener("reset",a),()=>{l.removeEventListener("invalid",s),l.removeEventListener("change",u),c?.removeEventListener("reset",a)}},[n,s,u,a,r])}function K2(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 Z2(e){return{isInvalid:!e.validity.valid,validationDetails:K2(e),validationErrors:e.validationMessage?[e.validationMessage]:[]}}function J2(e){for(let t=0;t<e.elements.length;t++){let n=e.elements[t];if(!n.validity.valid)return n}return null}const hc={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valueMissing:!1,valid:!0},mc={...hc,customError:!0,valid:!1},Cn={isInvalid:!1,validationDetails:hc,validationErrors:[]},ey=N.createContext({}),Eu="__formValidationState"+Date.now();function ty(e){if(e[Eu]){let{realtimeValidation:t,displayValidation:n,updateValidation:r,resetValidation:i,commitValidation:a}=e[Eu];return{realtimeValidation:t,displayValidation:n,updateValidation:r,resetValidation:i,commitValidation:a}}return ny(e)}function ny(e){let{isInvalid:t,validationState:n,name:r,value:i,builtinValidation:a,validate:s,validationBehavior:u="aria"}=e;n&&(t||(t=n==="invalid"));let l=t?{isInvalid:!0,validationErrors:[],validationDetails:mc}:null,c=N.useMemo(()=>Tu(ry(s,i)),[s,i]);a?.validationDetails.valid&&(a=null);let f=N.useContext(ey),d=N.useMemo(()=>r?Array.isArray(r)?r.flatMap(w=>Ji(f[w])):Ji(f[r]):[],[f,r]),[m,h]=N.useState(f),[b,A]=N.useState(!1);f!==m&&(h(f),A(!1));let _=N.useMemo(()=>Tu(b?[]:d),[b,d]),x=N.useRef(Cn),[I,C]=N.useState(Cn),D=N.useRef(Cn),k=()=>{if(!O)return;G(!1);let w=c||a||x.current;bi(w,D.current)||(D.current=w,C(w))},[O,G]=N.useState(!1);return N.useEffect(k),{realtimeValidation:l||_||c||a||Cn,displayValidation:u==="native"?l||_||I:l||_||c||a||I,updateValidation(w){u==="aria"&&!bi(I,w)?C(w):x.current=w},resetValidation(){let w=Cn;bi(w,D.current)||(D.current=w,C(w)),u==="native"&&G(!1),A(!0)},commitValidation(){u==="native"&&G(!0),A(!0)}}}function Ji(e){return e?Array.isArray(e)?e:[e]:[]}function ry(e,t){if(typeof e=="function"){let n=e(t);if(n&&typeof n!="boolean")return Ji(n)}return[]}function Tu(e){return e.length?{isInvalid:!0,validationErrors:e,validationDetails:mc}:null}function bi(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 iy(e){let{id:t,label:n,"aria-labelledby":r,"aria-label":i,labelElementType:a="label"}=e;t=xr(t);let s=xr(),u={};n?(r=r?`${s} ${r}`:s,u={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 l=O2({id:t,"aria-label":i,"aria-labelledby":r});return{labelProps:u,fieldProps:l}}function ay(e){let{description:t,errorMessage:n,isInvalid:r,validationState:i}=e,{labelProps:a,fieldProps:s}=iy(e),u=du([!!t,!!n,r,i]),l=du([!!t,!!n,r,i]);return s=_r(s,{"aria-describedby":[u,l,e["aria-describedby"]].filter(Boolean).join(" ")||void 0}),{labelProps:a,fieldProps:s,descriptionProps:{id:u},errorMessageProps:{id:l}}}function sy(e,t){let{inputElementType:n="input",isDisabled:r=!1,isRequired:i=!1,isReadOnly:a=!1,type:s="text",validationBehavior:u="aria"}=e,[l,c]=n2(e.value,e.defaultValue||"",e.onChange),{focusableProps:f}=X2(e,t),d=ty({...e,value:l}),{isInvalid:m,validationErrors:h,validationDetails:b}=d.displayValidation,{labelProps:A,fieldProps:_,descriptionProps:x,errorMessageProps:I}=ay({...e,isInvalid:m,errorMessage:e.errorMessage||h}),C=A2(e,{labelable:!0});const D={type:s,pattern:e.pattern};return D2(t,l,c),Q2(e,d,t),N.useEffect(()=>{if(t.current instanceof Ar(t.current).HTMLTextAreaElement){let k=t.current;Object.defineProperty(k,"defaultValue",{get:()=>k.value,set:()=>{},configurable:!0})}},[t]),{labelProps:A,inputProps:_r(C,n==="input"&&D,{disabled:r,readOnly:a,required:i&&u==="native","aria-required":i&&u==="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:l,onChange:k=>c(k.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,...f,..._}),descriptionProps:x,errorMessageProps:I,isInvalid:m,validationErrors:h,validationDetails:b}}const uy=e=>e.charCodeAt(e.length-1)===10,oy=e=>{const t=Wt(),[n,r]=N.useState(""),i=()=>{_.current&&(_.current.style.height=_.current.scrollHeight+"px")},a=()=>{_.current&&(_.current.style.height="48px")},s=w=>{r(w)};N.useEffect(i,[n]);let{label:u,SubmitComponent:l,onSubmit:c,isLoadingStream:f,audioEnabled:d=!1,MicComponent:m,onPressMicButton:h,LoadingComponent:b,onPressLoadingButton:A}=e,_=N.useRef(null),{labelProps:x,inputProps:I}=sy({...e,inputElementType:"textarea"},_);const C=w=>{uy(w.target.value)||s(w.target.value)},D=w=>{if(w.key==="Enter"||w.code==="Enter"||w.keyCode===13||w.code==="NumpadEnter"){if(w.shiftKey)s(n+`
85
+ `);else if(!w.shiftKey){w.preventDefault(),w.stopPropagation(),f||G();return}}},k=w=>{(w.key==="Enter"||w.code==="Enter"||w.keyCode===13||w.code==="NumpadEnter")&&(w.preventDefault(),w.stopPropagation())};let O=e.isDisabled;e.shouldDisableIfInputIsEmpty&&(O=e.isDisabled||n.length===0);const G=()=>{a(),c&&c(n),s("")},oe=n.trim().length>0;t.log("audio",d);const ae=()=>f&&b?S.jsx("div",{className:"relative",children:S.jsx(b,{onPressLoadingButton:A})}):l?!d||!m?S.jsx("div",{className:"relative",children:S.jsx(l,{onSubmitButton:G,isDisabled:O})}):oe?S.jsx("div",{className:"relative",children:S.jsx(l,{onSubmitButton:G,isDisabled:O})}):S.jsxs("div",{className:"relative",children:[S.jsx("div",{className:"block md:hidden",children:S.jsx(m,{onPressMicButton:h})}),S.jsxs("div",{className:"hidden md:block",children:[S.jsx(m,{onPressMicButton:h,className:"md:right-12"}),S.jsx(l,{onSubmitButton:G,isDisabled:O,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",{...x,className:e.classNameLabel,children:u}),S.jsx("textarea",{...I,ref:_,className:`${e.classNameTextarea} p-3`,onChange:C,value:n,rows:1,style:{overflow:"hidden",outlineColor:"#a8a8a8",border:"none",outline:"none",width:"calc(100% - 30px)",resize:"none"},onKeyDown:D,onKeyUp:k})]}),ae()]})},ly=({onSubmitButton:e,isDisabled:t,className:n})=>S.jsx("div",{children:S.jsx("button",{className:`absolute
86
86
  bg-violet-600
87
87
  md:bottom-2
88
88
  md:right-3
@@ -99,20 +99,32 @@ For more details see https://formatjs.io/docs/getting-started/message-distributi
99
99
  dark:border-white
100
100
  dark:bg-white
101
101
  transition-colors
102
- ${n??""}`,"data-testid":"send-button",onClick:e,disabled:t,type:"button","aria-label":"Send message",children:_.jsx("span",{className:"","data-state":"closed",children:_.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:[_.jsx("path",{d:"M3 20L21 12L3 4L7.5 12L3 20Z",fill:"none",stroke:"currentColor","stroke-width":"1.6","stroke-linejoin":"round"}),_.jsx("path",{d:"M7.5 12H14.75",fill:"none",stroke:"currentColor","stroke-width":"1.6","stroke-linecap":"round"})]})})})});var nt=(e=>(e.FRENCH="fr-FR",e.ENGLISH="en-US",e))(nt||{});const nx={"generic.language.english":"English","generic.language.french":"French","chatbot.placeholder.content":"Message the assistant...","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","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"},rx={"generic.language.english":"Anglais","generic.language.french":"Français","chatbot.placeholder.content":"Envoyez un message à l'assistant ...","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","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"},Ur={[nt.ENGLISH]:{translatedText:nx,pictureName:nt.ENGLISH,langID:0,locale:nt.ENGLISH},[nt.FRENCH]:{translatedText:rx,pictureName:nt.FRENCH,langID:1,locale:nt.FRENCH}},ix=Object.keys(Ur);ix.reduce((e,t)=>{const n=Ur[t];return[...e,n]},[]);const ax="languageSettings",lc=k.createContext({appCurrentLang:Ur[nt.ENGLISH],setAppCurrentLang:()=>{}}),sx=e=>/(\[.*|\!\[.*)$/.test(e),ux=e=>/\)/.test(e),ox=e=>e.filter(t=>t.userType==="user").length;var Zi=(e=>(e.GET_DISCUSSION_ID="/id",e.RESET_DISCUSSION="/delete",e))(Zi||{});const lx=e=>!!e.startsWith("/"),cx=(e,t,n,r)=>e===Zi.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===Zi.RESET_DISCUSSION?(n(r),null):`La commande ${e} n'est pas prise en compte.`;class It{static pending="";constructor(){}static transformNDJSONChunkIntoObjects(t){this.pending+=t;const n=this.pending.split(/\r?\n/);this.pending=n.pop()??"";const r=[];for(const i of n){const a=i.trim();if(a)try{r.push(JSON.parse(a))}catch{console.warn("[NDJSON] Could not parse line:",a)}}return r}static flushPending(){const t=this.pending.trim();if(this.pending="",!t)return[];try{return[JSON.parse(t)]}catch{return[]}}static isObjectOutputstreamMessageDeltaDTO=t=>t.type===Le.OutputStreamTypesEnum.OUTPUT_STREAM_MESSAGE_DELTA;static isObjectOutputstreamMessageStartDTO=t=>t.type===Le.OutputStreamTypesEnum.OUTPUT_STREAM_MESSAGE_START;static isObjectOutputstreamMessageEndDTO=t=>t.type===Le.OutputStreamTypesEnum.OUTPUT_STREAM_MESSAGE_END;static isObjectOutputstreamErrorDTO=t=>t.type===Le.OutputStreamTypesEnum.OUTPUT_STREAM_ERROR;static isObjectOutputstreamLoadingNumberOfStepsDTO=t=>t.type===Le.OutputStreamTypesEnum.OUTPUT_STREAM_NUMBER_OF_STEPS_TYPE;static isObjectOutputstreamLoadingCurrentStepNumberDTO=t=>t.type===Le.OutputStreamTypesEnum.OUTPUT_STREAM_CURRENT_STEP_NUMBER_TYPE;static isObjectOutputstreamLoadingCurrentStepNameDTO=t=>t.type===Le.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 cc=()=>{const e=hn(),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"}),u=e.formatMessage({defaultMessage:"I'm looking for products",id:"chatbot.chatline.loading.function.genericSearchMessage"}),o=e.formatMessage({defaultMessage:"Searching ...",id:"chatbot.chatline.loading.stepName.search"}),c=e.formatMessage({defaultMessage:"Building Query ...",id:"chatbot.chatline.loading.stepName.building"}),f=e.formatMessage({defaultMessage:"Analyzing ...",id:"chatbot.chatline.loading.stepName.analyzing"}),d=e.formatMessage({defaultMessage:"Writing answer",id:"chatbot.chatline.loading.stepName.redacting"}),h=e.formatMessage({defaultMessage:"Cancel",id:"chatbot.chatline.loading.cancel"}),m=e.formatMessage({defaultMessage:"see recent messages",id:"chatbot.chatline.seeRecentMessages"}),b=C=>C?C.includes("ExtractProductNames")?n:C.includes("SuggestProductNames")?r:C==="Recherche ..."?o:C==="Construction ..."?c:C==="Analyse ..."?f:C==="Rédaction"?d:C.includes("CreateCriteriasFromProductNames")||C.includes("CreateCriteriasOrProductNamesFromDiscussion")?i:C.includes("SearchStock")?a:"":t,A=b();return{searchTranslation:t,extractProductNameTranslation:n,criteriaDefinitionTranslation:i,searchStockTranslation:a,stepTranslation:s,getCurrentStepTranslated:b,defaultStartingStep:A,lookingForProductTranslation:u,cancelTranslation:h,recentMessagesTranslation:m}},fx=({})=>{const{companySettings:e}=k.useContext(dn);return _.jsx("div",{className:`search
102
+ chatsystem-paperplane-button
103
+ ${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 nt=(e=>(e.FRENCH="fr-FR",e.ENGLISH="en-US",e))(nt||{});const cy={"generic.language.english":"English","generic.language.french":"French","chatbot.placeholder.content":"Message the assistant...","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","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"},fy={"generic.language.english":"Anglais","generic.language.french":"Français","chatbot.placeholder.content":"Envoyez un message à l'assistant ...","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","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"},zr={[nt.ENGLISH]:{translatedText:cy,pictureName:nt.ENGLISH,langID:0,locale:nt.ENGLISH},[nt.FRENCH]:{translatedText:fy,pictureName:nt.FRENCH,langID:1,locale:nt.FRENCH}},dy=Object.keys(zr);dy.reduce((e,t)=>{const n=zr[t];return[...e,n]},[]);const hy="languageSettings",pc=N.createContext({appCurrentLang:zr[nt.ENGLISH],setAppCurrentLang:()=>{}}),my=e=>/(\[.*|\!\[.*)$/.test(e),py=e=>/\)/.test(e),gy=e=>e.filter(t=>t.userType==="user").length;var ea=(e=>(e.GET_DISCUSSION_ID="/id",e.RESET_DISCUSSION="/delete",e))(ea||{});const by=e=>!!e.startsWith("/"),Ey=(e,t,n,r)=>e===ea.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===ea.RESET_DISCUSSION?(n(r),null):`La commande ${e} n'est pas prise en compte.`;class Ct{static pending="";constructor(){}static transformNDJSONChunkIntoObjects(t){const n=gt();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 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 gc=()=>{const e=pn(),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"}),u=e.formatMessage({defaultMessage:"I'm looking for products",id:"chatbot.chatline.loading.function.genericSearchMessage"}),l=e.formatMessage({defaultMessage:"Searching ...",id:"chatbot.chatline.loading.stepName.search"}),c=e.formatMessage({defaultMessage:"Building Query ...",id:"chatbot.chatline.loading.stepName.building"}),f=e.formatMessage({defaultMessage:"Analyzing ...",id:"chatbot.chatline.loading.stepName.analyzing"}),d=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=_=>_?_.includes("ExtractProductNames")?n:_.includes("SuggestProductNames")?r:_==="Recherche ..."?l:_==="Construction ..."?c:_==="Analyse ..."?f:_==="Rédaction"?d:_.includes("CreateCriteriasFromProductNames")||_.includes("CreateCriteriasOrProductNamesFromDiscussion")?i:_.includes("SearchStock")?a:"":t,A=b();return{searchTranslation:t,extractProductNameTranslation:n,criteriaDefinitionTranslation:i,searchStockTranslation:a,stepTranslation:s,getCurrentStepTranslated:b,defaultStartingStep:A,lookingForProductTranslation:u,cancelTranslation:m,recentMessagesTranslation:h}},Ty=({})=>{const{companySettings:e}=N.useContext(mn);return S.jsx("div",{className:`search
103
104
  transition
104
105
  ease-in-out
105
106
  delay-50
106
107
  flex
107
108
  justify-center
108
109
  items-center
109
- `,children:_.jsx(na,{facet:e.agent.display[Le.AgentDisplayFacetRoleType.SEARCH]})})},dx=({loadingStatus:e,currentStepName:t,currentStepNumber:n,numberOfSteps:r})=>{const{getCurrentStepTranslated:i,stepTranslation:a,lookingForProductTranslation:s}=cc();return _.jsx(_.Fragment,{children:e==="loadingIntermediaryStates"&&_.jsxs("div",{children:[_.jsxs("div",{children:[_.jsx("p",{className:"text-center my-2 text-lg",children:s}),_.jsx("p",{className:"text-center my-1 text-md",children:t&&`${i(t)}`}),n&&_.jsxs("p",{className:"text-center my-2",children:[a,_.jsx("span",{children:" "}),n,"/",r]})]}),_.jsx("div",{className:"flex justify-center",children:_.jsx(fx,{})})]})})},hx=({onPressLoadingButton:e})=>_.jsx("div",{children:_.jsx("button",{className:"absolute bg-white md:bottom-2 md:right-3 dark:hover:bg-white right-2 bottom-1.5 disabled:opacity-10 disabled:text-gray-400 enabled:bg-white text-white p-0.5 border border-white rounded-lg dark:border-white dark:bg-white transition-colors","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:_.jsx("span",{className:"","data-state":"closed",children:_.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:[_.jsx("g",{id:"SVGRepo_bgCarrier","stroke-width":"0"}),_.jsx("g",{id:"SVGRepo_tracerCarrier","stroke-linecap":"round","stroke-linejoin":"round"}),_.jsxs("g",{id:"SVGRepo_iconCarrier",children:[" ",_.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"})," "]})]})})})}),mx=e=>{const t=k.useRef(null),[n,r]=k.useState(!1),i=k.useRef(!0),a=k.useRef(!1),s=k.useRef(0),u=()=>{const f=t.current,d=4;if(f){f.scrollTop<s.current-1&&(a.current=!1);const m=f.scrollHeight>f.clientHeight,b=f.scrollHeight-f.scrollTop<=f.clientHeight+d;r(m&&!b),i.current=b,s.current=f.scrollTop}},o=({smooth:f=!1,sticky:d=!1})=>{const h=t.current;d?(a.current=!0,i.current=!0):h&&h.scrollTo({top:h.scrollHeight,behavior:f?"smooth":"auto"}),h&&a.current&&h.scrollTo({top:h.scrollHeight,behavior:f?"smooth":"auto"})};return k.useEffect(()=>{u()},[e.length]),k.useEffect(()=>{const f=t.current;if(f)return f.addEventListener("scroll",u),u(),()=>{f.removeEventListener("scroll",u)}},[]),k.useLayoutEffect(()=>{a.current&&o({smooth:!1})},[e.length]),{scrollToBottom:o,removeStickyNess:()=>{a.current=!1},messagesContainerRef:t,showScrollButton:n}},px=()=>{const e=hn(),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}},gx=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"})))),bx=({resetDiscussion:e,companySettings:t})=>{const{DiscussionLimitReachedCtaTranslation:n,DiscussionLimitReachedExplainationTranslation:r,DiscussionLimitReachedTitleTranslation:i}=px();return _.jsx(_.Fragment,{children:_.jsx("div",{className:"px-3 mt-4",children:_.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:[_.jsx("div",{className:"flex flex-col justify-center items-center mx-3",children:_.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:_.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"})})}),_.jsxs("div",{className:"flex-1 min-w-0",children:[_.jsx("p",{className:"font-semibold",children:i}),_.jsx("p",{className:"text-sm break-words",children:r}),_.jsx("div",{className:"my-2",children:_.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
110
+ `,children:S.jsx(aa,{facet:e.agent.display[Oe.AgentDisplayFacetRoleType.SEARCH]})})},yy=({loadingStatus:e,currentStepName:t,currentStepNumber:n,numberOfSteps:r})=>{const{getCurrentStepTranslated:i,stepTranslation:a,lookingForProductTranslation:s}=gc();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(Ty,{})})]})})},xy=({onPressLoadingButton:e})=>S.jsx("div",{children:S.jsx("button",{className:`
111
+ absolute
112
+ bg-white
113
+ md:bottom-2
114
+ md:right-3
115
+ dark:hover:bg-white
116
+ right-2
117
+ bottom-1.5
118
+ disabled:opacity-10
119
+ disabled:text-gray-400
120
+ enabled:bg-white
121
+ 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"})," "]})]})})})}),Ay=e=>{const t=N.useRef(null),[n,r]=N.useState(!1),i=N.useRef(!0),a=N.useRef(!1),s=N.useRef(0),u=()=>{const f=t.current,d=4;if(f){f.scrollTop<s.current-1&&(a.current=!1);const h=f.scrollHeight>f.clientHeight,b=f.scrollHeight-f.scrollTop<=f.clientHeight+d;r(h&&!b),i.current=b,s.current=f.scrollTop}},l=({smooth:f=!1,sticky:d=!1})=>{const m=t.current;d?(a.current=!0,i.current=!0):m&&m.scrollTo({top:m.scrollHeight,behavior:f?"smooth":"auto"}),m&&a.current&&m.scrollTo({top:m.scrollHeight,behavior:f?"smooth":"auto"})};return N.useEffect(()=>{u()},[e.length]),N.useEffect(()=>{const f=t.current;if(f)return f.addEventListener("scroll",u),u(),()=>{f.removeEventListener("scroll",u)}},[]),N.useLayoutEffect(()=>{a.current&&l({smooth:!1})},[e.length]),{scrollToBottom:l,removeStickyNess:()=>{a.current=!1},messagesContainerRef:t,showScrollButton:n}},_y=()=>{const e=pn(),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}},Sy=e=>Me.createElement("svg",{width:"800px",height:"800px",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},Me.createElement("g",{clipPath:"url(#clip0_1276_7761)"},Me.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"})),Me.createElement("defs",null,Me.createElement("clipPath",{id:"clip0_1276_7761"},Me.createElement("rect",{width:24,height:24,fill:"white"})))),Cy=({resetDiscussion:e,companySettings:t})=>{const{DiscussionLimitReachedCtaTranslation:n,DiscussionLimitReachedExplainationTranslation:r,DiscussionLimitReachedTitleTranslation:i}=_y();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:i}),S.jsx("p",{className:"text-sm break-words",children:r}),S.jsx("div",{className:"my-2",children:S.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
110
122
  font-medium text-blue-700 dark:text-blue-300
111
123
  bg-blue-50/70 hover:bg-blue-100 dark:bg-blue-900/20 dark:hover:bg-blue-900/30
112
124
  ring-1 ring-inset ring-blue-600/20 hover:ring-blue-600/30
113
125
  shadow-sm transition-all duration-200
114
126
  focus:outline-none focus-visible:ring-2 focus-visible:ring-blue-600/50
115
- active:scale-[0.98]`,children:[_.jsx(gx,{"aria-hidden":"true",className:"w-5 h-5 transition-transform duration-200 group-hover:rotate-180"}),_.jsx("span",{children:n})]})})]})]})})})},Ex=({onClick:e,label:t="voir les messages plus récents",className:n})=>{const[r,i]=k.useState(!1);return k.useEffect(()=>{const a=requestAnimationFrame(()=>i(!0));return()=>cancelAnimationFrame(a)},[]),_.jsx("button",{onClick:e,className:["absolute z-10 select-none outline-none","left-1/2 -translate-x-1/2 right-auto","bottom-[80px]","transition-all duration-300 ease-out",r?"opacity-100 translate-y-0":"opacity-0 translate-y-2",n??""].join(" "),"aria-label":t,title:t,children:_.jsx("span",{className:["inline-block text-center leading-tight","text-sm px-3 py-1.5","bg-violet-600/90 text-white rounded-full shadow-md backdrop-blur-[2px]","break-words max-w-[min(22rem,calc(100vw-4rem))]"].join(" "),children:t})})},fc="chatsystem-widget",Tx=1440*60*1e3;function xx(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 yx(e){return!(typeof e!="object"||e===null||!Array.isArray(e.items)||!e.items.every(xx)||e.discussionId!==null&&typeof e.discussionId!="number"||typeof e.updatedAt!="string"||Number.isNaN(Date.parse(e.updatedAt)))}function Ax(e){if(typeof window>"u")return;const t=e.key??fc,n={items:e.conversation.items,discussionId:e.conversation.discussionId,updatedAt:new Date().toISOString()};try{const r=JSON.stringify(n);window.localStorage.setItem(t,r)}catch(r){console.error("Failed to save chat state to localStorage",r)}}function _x(e){if(typeof window>"u")return null;const t=e?.key,n=window.localStorage.getItem(t);if(!n)return null;try{const r=JSON.parse(n);return yx(r)?r:(console.warn("Chat state in localStorage has unexpected shape, ignoring."),null)}catch(r){return console.error("Failed to parse chat state from localStorage",r),null}}const dc=k.createContext({currentConversation:{items:[],discussionId:null},setCurrentConversation:()=>{},archivedConversation:{items:[],discussionId:null},setArchivedConversation:()=>{}}),Sx=()=>{const e=k.useContext(dc);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(S=>({...S,discussionId:y}))},s=y=>{n(S=>({...S,items:y}))},u=y=>{n(S=>({...S,items:[...S.items,y]}))},o=({messageStreamId:y,role:S})=>{n(v=>({...v,items:[...v.items,{userType:S,content:"",metaData:{messageStreamId:y}}]}))},c=()=>{n(y=>({...y,items:y.items.filter(S=>!(S.content?.length===0&&S.userType==="assistant"))}))},f=()=>{n(y=>{const S=[...y.items];return S.pop(),{...y,items:S}})},d=y=>{n(S=>({...S,updatedAt:y.updatedAt}))},h=y=>{n({discussionId:null,items:[{userType:"assistant",content:y?.agent?.text?.initialText}],updatedAt:null})},m=()=>{i({discussionId:null,items:[],updatedAt:null})};return{currentConversation:t,setCurrentConversation:n,setCurrentConversationId:a,setCurrentConversationMetadata:d,resetConversation:h,setCurrentConversationItems:s,addMessageToCurrentConversation:u,removeEmptyAssistantMessageFromCurrentConversation:c,removeLastMessageFromCurrentConversation:f,updateCurrentConversationLastMessage:({newContent:y})=>{n(S=>{const v=[...S.items],D=v.length-1,N=v[D];return v[D]={...N,content:N.content=y},{...S,items:v}})},archivedConversation:r,setArchivedConversationAsMain:()=>{n(r),m()},addEmptyMessageToCurrentConversation:o,updateCurrentConversationMessageById:({newContent:y,id:S})=>{n(v=>{const D=[...v.items],N=D.findIndex(q=>q.metaData?.messageStreamId===S),O=D[N];return D[N]={...O,content:O.content=y},{...v,items:D}})}}},Cx=({message:e,actionLabel:t,onClick:n})=>_.jsxs("div",{className:"mt-3 mb-2 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:[_.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"}),_.jsxs("div",{className:"flex-1",children:[_.jsx("p",{className:"leading-snug",children:e}),_.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})]})]}),wx=({onPressMicButton:e,isDisabled:t,className:n})=>_.jsx("div",{children:_.jsx("button",{className:`absolute
127
+ active:scale-[0.98]`,children:[S.jsx(Sy,{"aria-hidden":"true",className:"w-5 h-5 transition-transform duration-200 group-hover:rotate-180"}),S.jsx("span",{children:n})]})})]})]})})})},wy=({onClick:e,label:t="voir les messages plus récents",className:n})=>{const[r,i]=N.useState(!1);return N.useEffect(()=>{const a=requestAnimationFrame(()=>i(!0));return()=>cancelAnimationFrame(a)},[]),S.jsx("button",{onClick:e,className:["absolute z-10 select-none outline-none","left-1/2 -translate-x-1/2 right-auto","bottom-[80px]","transition-all duration-300 ease-out",r?"opacity-100 translate-y-0":"opacity-0 translate-y-2",n??""].join(" "),"aria-label":t,title:t,children:S.jsx("span",{className:["inline-block text-center leading-tight","text-sm px-3 py-1.5","bg-violet-600/90 text-white rounded-full shadow-md backdrop-blur-[2px]","break-words max-w-[min(22rem,calc(100vw-4rem))]"].join(" "),children:t})})},bc="chatsystem-widget",Iy=1440*60*1e3;function vy(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 Ny(e){return!(typeof e!="object"||e===null||!Array.isArray(e.items)||!e.items.every(vy)||e.discussionId!==null&&typeof e.discussionId!="number"||typeof e.updatedAt!="string"||Number.isNaN(Date.parse(e.updatedAt)))}function ky(e){const t=gt();if(typeof window>"u")return;const n=e.key??bc,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 Oy(e){const t=gt();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 Ny(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 Ec=N.createContext({currentConversation:{items:[],discussionId:null},setCurrentConversation:()=>{},archivedConversation:{items:[],discussionId:null},setArchivedConversation:()=>{}}),Ly=()=>{const e=N.useContext(Ec);if(!e)throw new Error("useChatbotConversation must be used within ChatbotInitialtextContext.Provider");const{currentConversation:t,setCurrentConversation:n,archivedConversation:r,setArchivedConversation:i}=e,a=x=>{n(I=>({...I,discussionId:x}))},s=x=>{n(I=>({...I,items:x}))},u=x=>{n(I=>({...I,items:[...I.items,x]}))},l=({messageStreamId:x,role:I})=>{n(C=>({...C,items:[...C.items,{userType:I,content:"",metaData:{messageStreamId:x},temporaryId:crypto.randomUUID()}]}))},c=()=>{n(x=>({...x,items:x.items.filter(I=>!(I.content?.length===0&&I.userType==="assistant"))}))},f=()=>{n(x=>{const I=[...x.items];return I.pop(),{...x,items:I}})},d=x=>{n(I=>({...I,updatedAt:x.updatedAt}))},m=x=>{n({discussionId:null,items:[{userType:"assistant",content:x?.agent?.text?.initialText,temporaryId:crypto.randomUUID()}],updatedAt:null})},h=()=>{i({discussionId:null,items:[],updatedAt:null})};return{currentConversation:t,setCurrentConversation:n,setCurrentConversationId:a,setCurrentConversationMetadata:d,resetConversation:m,setCurrentConversationItems:s,addMessageToCurrentConversation:u,removeEmptyAssistantMessageFromCurrentConversation:c,removeLastMessageFromCurrentConversation:f,updateCurrentConversationLastMessage:({newContent:x})=>{n(I=>{const C=[...I.items],D=C.length-1,k=C[D];return C[D]={...k,content:k.content=x},{...I,items:C}})},archivedConversation:r,setArchivedConversationAsMain:()=>{n(r),h()},addEmptyMessageToCurrentConversation:l,updateCurrentConversationMessageById:({newContent:x,id:I})=>{n(C=>{const D=[...C.items],k=D.findIndex(G=>G.metaData?.messageStreamId===I),O=D[k];return D[k]={...O,content:O.content=x},{...C,items:D}})}}},Ry=({message:e,actionLabel:t,onClick:n})=>S.jsxs("div",{className:"mt-3 mb-2 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})]})]}),Dy=({onPressMicButton:e,isDisabled:t,className:n})=>S.jsx("div",{children:S.jsx("button",{className:`absolute
116
128
  bg-violet-600
117
129
  md:bottom-2
118
130
  md:right-3
@@ -130,12 +142,13 @@ For more details see https://formatjs.io/docs/getting-started/message-distributi
130
142
  dark:bg-white
131
143
  transition-colors
132
144
  enabled:hover:scale-[1.02] active:scale-[0.98]
133
- ${n??""}`,"data-testid":"mic-button",onClick:e,disabled:t,type:"button","aria-label":"Start voice input",children:_.jsx("span",{"data-state":"closed",children:_.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:[_.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"}),_.jsx("path",{d:"M12 14.5V18",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"}),_.jsx("path",{d:"M8.5 18h7",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"}),_.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 vx(){const[e,t]=k.useState("idle"),[n,r]=k.useState(null),i=k.useRef(null),a=k.useRef(null),s=k.useRef([]),u=k.useCallback(async()=>{r(null);try{const f=await navigator.mediaDevices.getUserMedia({audio:!0});a.current=f;const h=["audio/webm;codecs=opus","audio/webm","audio/ogg;codecs=opus","audio/ogg"].find(b=>MediaRecorder.isTypeSupported(b))||"",m=new MediaRecorder(f,h?{mimeType:h}:void 0);i.current=m,s.current=[],m.ondataavailable=b=>{b.data&&b.data.size>0&&s.current.push(b.data)},m.onerror=()=>{t("error"),r("Recorder error.")},m.onstart=()=>t("recording"),m.onstop=()=>t("stopped"),m.start()}catch(f){t("error"),r(f?.message??"Microphone permission denied.")}},[]),o=k.useCallback(async()=>{const f=i.current,d=a.current;return!f||e!=="recording"?null:new Promise(h=>{f.onstop=()=>{const m=f.mimeType||"audio/webm",b=new Blob(s.current,{type:m}),A=m.includes("ogg")?"ogg":"webm",C=new File([b],`voice-message.${A}`,{type:m});d?.getTracks().forEach(y=>y.stop()),a.current=null,i.current=null,h({blob:b,file:C})},f.stop()})},[e]),c=k.useCallback(()=>{const f=i.current,d=a.current;try{f&&e==="recording"&&f.stop()}catch{}d?.getTracks().forEach(h=>h.stop()),a.current=null,i.current=null,s.current=[],t("idle")},[e]);return{state:e,error:n,start:u,stop:o,cancel:c}}const Ix=()=>{const e=hn(),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}},Nx=({isOpen:e,onStop:t,onCancel:n})=>{if(!e)return null;const{cancelTranslation:r,recordingExplainationTranslation:i,recordingTranslation:a}=Ix();return _.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center",role:"dialog","aria-modal":"true","aria-label":"Recording voice message",children:[_.jsx("div",{className:"absolute inset-0 bg-black/70",onClick:n}),_.jsxs("div",{className:"relative z-10 flex flex-col items-center gap-6 px-6",children:[_.jsxs("div",{className:"relative h-40 w-40",children:[_.jsx("div",{className:"mic-ripple mic-ripple--a"}),_.jsx("div",{className:"mic-ripple mic-ripple--b"}),_.jsx("div",{className:"mic-ripple mic-ripple--c"}),_.jsx("button",{type:"button",onClick:t,className:"mic-core","aria-label":"Stop recording",children:_.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"34",height:"34","aria-hidden":"true",className:"text-white",children:[_.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"}),_.jsx("path",{d:"M12 14.5V18",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"}),_.jsx("path",{d:"M8.5 18h7",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"}),_.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"})]})})]}),_.jsxs("div",{className:"text-center text-white",children:[_.jsx("div",{className:"text-lg font-semibold",children:a}),_.jsx("div",{className:"text-sm opacity-80",children:i})]}),_.jsx("button",{type:"button",onClick:n,className:"rounded-lg border border-white/30 px-4 py-2 text-white/90 hover:bg-white/10",children:r})]})]})};let ir=new AbortController;const hc=({appToken:e,containerClassName:t})=>{e||console.log("Dev - Admin settings");const n=k.useRef(null),{placeholderTranslation:r,genericErrorTranslation:i,tooManyRequestsTranslation:a,discussionFullErrorTranslation:s,infoBannerExplainationTranslation:u,infoBannerTitleTranslation:o}=ua(),{currentConversation:c,addEmptyMessageToCurrentConversation:f,addMessageToCurrentConversation:d,removeEmptyAssistantMessageFromCurrentConversation:h,resetConversation:m,setCurrentConversationId:b,updateCurrentConversationMessageById:A,archivedConversation:C,setArchivedConversationAsMain:y}=Sx(),[S,v]=k.useState("notLoading"),{defaultStartingStep:D,recentMessagesTranslation:N}=cc(),[O,q]=k.useState(null),[ue,G]=k.useState(D),[w,j]=k.useState(null),[H,$]=k.useState(!1),[Y,J]=k.useState(!1),{start:he,stop:Se,cancel:Oe}=vx(),{companySettings:Re}=k.useContext(dn),{appCurrentLang:p}=k.useContext(lc),U=k.useRef(new Map),Z=S!=="notLoading"||(c?.items?.length??0)>0,[T,Q]=k.useState(!0),ne=!!C&&(C.items?.length??0)>0,W=()=>{y(),Q(!1)},ee=k.useRef(S);k.useEffect(()=>{const V=ee.current,me=S;V!=="notLoading"&&me==="notLoading"&&c.discussionId!==null&&c?.items.length>0&&Ax({conversation:c}),ee.current=me},[S,c?.items.length,c.discussionId]);const re={...Z?{maxHeight:"100vh"}:{height:"250px"}};k.useEffect(()=>{ox(c.items)>=Re?.api?.settings?.maxUserMessagesPerDiscussion&&$(!0)},[c.items.length]);const{scrollToBottom:ie,showScrollButton:ae,messagesContainerRef:Ne,removeStickyNess:z}=mx(c.items),Pe=()=>{ir.abort("Cancelling stream on purpose."),console.log("Stream request aborted"),v("notLoading"),h()},Ze=async V=>{const me=V?.body?.getReader(),be=new TextDecoder;let fe=!1;const Ce=V.headers.get("discussionId"),R=parseInt(Ce,10);Number.isNaN(R)||b(R),await new ReadableStream({start(K){return le();async function le(){if(!V.ok){v("notLoading");let pe=i;V.status===409?(pe=s,$(!0)):V.status===429?pe=a:pe=i,d({userType:"assistant",content:pe,metaData:{isErrorMessage:!0}}),ir=new AbortController;return}return me?.read().then(pe=>{const{done:Xe,value:yt}=pe,st=be.decode(yt),Mt=It.transformNDJSONChunkIntoObjects(st);for(const ye of Mt)if(It.isObjectOutputstreamMessageStartDTO(ye))U.current.set(ye.messageId,{rendered:"",markdownTag:"",isWritingTag:!1,lastStreamSourceUuid:null}),ye.role==="assistant"&&v("loadingDisplayedAnswer"),f({messageStreamId:ye.messageId,role:ye.role});else if(It.isObjectOutputstreamMessageDeltaDTO(ye)){const{delta:xe,streamSourceUuid:ut}=ye;U.current.get(ye.messageId)||(U.current.set(ye.messageId,{rendered:"",markdownTag:"",isWritingTag:!1,lastStreamSourceUuid:null}),f({messageStreamId:ye.messageId,role:"assistant"}));const Ve=U.current.get(ye.messageId);Ve.lastStreamSourceUuid&&Ve.lastStreamSourceUuid!==ut&&(Ve.rendered+='<span style="display:block;height:1rem;"></span>'),Ve.lastStreamSourceUuid=ut??null,ux(xe)?(Ve.markdownTag+=xe,Ve.rendered+=Ve.markdownTag,Ve.markdownTag="",Ve.isWritingTag=!1):Ve.isWritingTag||sx(xe)?(Ve.markdownTag+=xe,Ve.isWritingTag=!0):Ve.rendered+=xe,A({id:ye.messageId,newContent:Ve.rendered})}else if(It.isObjectOutputstreamMessageEndDTO(ye)){const{isLastAnswer:xe,shouldStopStream:ut}=ye;(xe||ut)&&(fe=!0),U.current.delete(ye.messageId)}else if(It.isObjectOutputstreamLoadingCurrentStepNumberDTO(ye)){const{content:xe}=ye;K.enqueue(xe),j(xe)}else if(It.isObjectOutputstreamLoadingCurrentStepNameDTO(ye)){const{content:xe}=ye;K.enqueue(xe),G(xe)}else if(It.isObjectOutputstreamLoadingNumberOfStepsDTO(ye)){const{content:xe}=ye;K.enqueue(xe),q(xe)}else if(It.isObjectOutputstreamErrorDTO(ye)){const{message:xe}=ye;d({userType:"assistant",metaData:{isErrorMessage:!0},content:xe})}else console.warn(`Packet shape not handled - ${ye}`);if(Xe&&fe){K.close(),v("notLoading"),G(D),j(null);return}return le()})}}}).pipeTo(new WritableStream)},ct=V=>{const be=`${Fn.getApiUrl()}/ai/prompt/${e}`,fe=ir.signal;if(V.mode==="text"){const R={query:V.text,language:p.locale};c?.discussionId&&(R.discussionId=c.discussionId);const B=Fn.getFetchConfig({httpVerb:"POST",body:R,contentType:"application/json",options:{signal:fe}});return{url:be,fetchConfig:B}}const Ce=new FormData;return Ce.append("language",p.locale),c?.discussionId&&Ce.append("discussionId",String(c.discussionId)),Ce.append("audioInput",V.audioFile,V.audioFile.name),{url:be,fetchConfig:{method:"POST",body:Ce,signal:fe}}},Ct=async V=>{v("loadingIntermediaryStates"),requestAnimationFrame(()=>ie({smooth:!1,sticky:!1}));const{url:me,fetchConfig:be}=ct(V);fetch(me,be).then(async fe=>{await Ze(fe)}).catch(fe=>{console.error(fe),v("notLoading"),ir=new AbortController})},$e=async()=>{J(!0),await he()},Kt=async()=>{const V=await Se();J(!1),V&&(console.log("Audio blob:",V.blob),console.log("Audio file:",V.file),Ct({mode:"audio",audioFile:V.file}))},wt=()=>{Oe(),J(!1)};return _.jsxs("div",{className:["relative p-2","flex flex-col min-h-0 overflow-hidden","h-auto",t??"max-w-[90%] mx-auto"].join(" "),ref:n,style:re,children:[_.jsxs("div",{className:"flex-1 overflow-y-auto min-h-0 messagesContainer",ref:Ne,children:[c.items.map((V,me)=>_.jsx(qT,{content:V.content,userType:V.userType,metaData:V.metaData,context:{discussionId:c?.discussionId,messageIndex:me,appToken:e},seenRootEl:Ne.current},V.metaData?.messageStreamId)),_.jsx(dx,{currentStepName:ue,currentStepNumber:w,loadingStatus:S,numberOfSteps:O})]}),ae&&_.jsx(Ex,{label:N,onClick:()=>ie({smooth:!0,sticky:!0})}),H&&_.jsx(bx,{resetDiscussion:V=>{$(!1),m(V)},companySettings:Re}),ne&&T&&_.jsx(Cx,{actionLabel:o,message:u,onClick:W}),_.jsxs("div",{className:"flex-shrink-0",children:[_.jsx(ex,{classNameTextarea:"",classNameContainer:"relative mt-6 mt-3 border-slate-400 border-[1px] rounded-lg p-1",SubmitComponent:tx,isDisabled:S!=="notLoading"||H,shouldDisableIfInputIsEmpty:!0,"aria-label":"TextArea For Bot Conversation",onSubmit:V=>{if(Q(!1),lx(V)){const me=cx(V,c.discussionId,m,Re);me&&d({userType:"user",content:me}),z(),ie({smooth:!0,sticky:!1})}else d({userType:"user",content:V}),z(),ie({smooth:!0,sticky:!1}),Ct({mode:"text",text:V})},placeholder:r,autoFocus:!0,isLoadingStream:S==="loadingDisplayedAnswer"||S==="loadingIntermediaryStates",LoadingComponent:hx,onPressLoadingButton:Pe,onPressMicButton:()=>{$e()},MicComponent:wx,audioEnabled:Re?.agent?.isAudioAllowed}),_.jsx(Nx,{isOpen:Y,onStop:Kt,onCancel:wt})]})]})};function _r(){return _r=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},_r.apply(this,arguments)}function mc(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 Ji(e,t){return Ji=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},Ji(e,t)}function pc(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Ji(e,t)}var ar={exports:{}};/*
145
+ chatsystem-mic-button
146
+ ${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 Py(){const[e,t]=N.useState("idle"),[n,r]=N.useState(null),i=N.useRef(null),a=N.useRef(null),s=N.useRef([]),u=N.useCallback(async()=>{r(null);try{const f=await navigator.mediaDevices.getUserMedia({audio:!0});a.current=f;const m=["audio/webm;codecs=opus","audio/webm","audio/ogg;codecs=opus","audio/ogg"].find(b=>MediaRecorder.isTypeSupported(b))||"",h=new MediaRecorder(f,m?{mimeType:m}:void 0);i.current=h,s.current=[],h.ondataavailable=b=>{b.data&&b.data.size>0&&s.current.push(b.data)},h.onerror=()=>{t("error"),r("Recorder error.")},h.onstart=()=>t("recording"),h.onstop=()=>t("stopped"),h.start()}catch(f){t("error"),r(f?.message??"Microphone permission denied.")}},[]),l=N.useCallback(async()=>{const f=i.current,d=a.current;return!f||e!=="recording"?null:new Promise(m=>{f.onstop=()=>{const h=f.mimeType||"audio/webm",b=new Blob(s.current,{type:h}),A=h.includes("ogg")?"ogg":"webm",_=new File([b],`voice-message.${A}`,{type:h});d?.getTracks().forEach(x=>x.stop()),a.current=null,i.current=null,m({blob:b,file:_})},f.stop()})},[e]),c=N.useCallback(()=>{const f=i.current,d=a.current;try{f&&e==="recording"&&f.stop()}catch{}d?.getTracks().forEach(m=>m.stop()),a.current=null,i.current=null,s.current=[],t("idle")},[e]);return{state:e,error:n,start:u,stop:l,cancel:c}}const My=()=>{const e=pn(),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}},By=({isOpen:e,onStop:t,onCancel:n})=>{if(!e)return null;const{cancelTranslation:r,recordingExplainationTranslation:i,recordingTranslation:a}=My();return S.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center",role:"dialog","aria-modal":"true","aria-label":"Recording voice message",children:[S.jsx("div",{className:"absolute inset-0 bg-black/70",onClick:n}),S.jsxs("div",{className:"relative z-10 flex flex-col items-center gap-6 px-6",children:[S.jsxs("div",{className:"relative h-40 w-40",children:[S.jsx("div",{className:"mic-ripple mic-ripple--a"}),S.jsx("div",{className:"mic-ripple mic-ripple--b"}),S.jsx("div",{className:"mic-ripple mic-ripple--c"}),S.jsx("button",{type:"button",onClick:t,className:"mic-core","aria-label":"Stop recording",children:S.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"34",height:"34","aria-hidden":"true",className:"text-white",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"})]})})]}),S.jsxs("div",{className:"text-center text-white",children:[S.jsx("div",{className:"text-lg font-semibold",children:a}),S.jsx("div",{className:"text-sm opacity-80",children:i})]}),S.jsx("button",{type:"button",onClick:n,className:"rounded-lg border border-white/30 px-4 py-2 text-white/90 hover:bg-white/10",children:r})]})]})};let sr=new AbortController;const Tc=({appToken:e,containerClassName:t})=>{const n=Wt();e||n.error("App Token missing");const r=N.useRef(null),{placeholderTranslation:i,genericErrorTranslation:a,tooManyRequestsTranslation:s,discussionFullErrorTranslation:u,infoBannerExplainationTranslation:l,infoBannerTitleTranslation:c}=ca(),{currentConversation:f,addEmptyMessageToCurrentConversation:d,addMessageToCurrentConversation:m,removeEmptyAssistantMessageFromCurrentConversation:h,resetConversation:b,setCurrentConversationId:A,updateCurrentConversationMessageById:_,archivedConversation:x,setArchivedConversationAsMain:I}=Ly(),[C,D]=N.useState("notLoading"),{defaultStartingStep:k,recentMessagesTranslation:O}=gc(),[G,oe]=N.useState(null),[ae,w]=N.useState(k),[j,$]=N.useState(null),[H,U]=N.useState(!1),[Q,me]=N.useState(!1),{start:xe,stop:Re,cancel:De}=Py(),{companySettings:p}=N.useContext(mn),{appCurrentLang:z}=N.useContext(pc),K=N.useRef(new Map),T=C!=="notLoading"||(f?.items?.length??0)>0,[Z,ie]=N.useState(!0),V=!!x&&(x.items?.length??0)>0,re=()=>{I(),ie(!1)},ne=N.useRef(C);N.useEffect(()=>{const q=ne.current,pe=C;q!=="notLoading"&&pe==="notLoading"&&f.discussionId!==null&&f?.items.length>0&&ky({conversation:f}),ne.current=pe},[C,f?.items.length,f.discussionId]);const se={...T?{maxHeight:"100vh"}:{height:"250px"}};N.useEffect(()=>{gy(f.items)>=p?.api?.settings?.maxUserMessagesPerDiscussion&&U(!0)},[f.items.length]);const{scrollToBottom:J,showScrollButton:Ne,messagesContainerRef:Y,removeStickyNess:ke}=Ay(f.items),Ye=()=>{sr.abort("Cancelling stream on purpose."),n.log("Stream request aborted"),D("notLoading"),h()},lt=async q=>{const pe=q?.body?.getReader(),be=new TextDecoder;let de=!1;const L=q.headers.get("discussionId"),M=parseInt(L,10);Number.isNaN(M)||A(M),await new ReadableStream({start(ee){return ye();async function ye(){if(!q.ok){D("notLoading");let Be=a;q.status===409?(Be=u,U(!0)):q.status===429?Be=s:Be=a,m({userType:"assistant",content:Be,metaData:{isErrorMessage:!0},temporaryId:crypto.randomUUID()}),sr=new AbortController;return}return pe?.read().then(Be=>{const{done:yt,value:st}=Be,Mt=be.decode(st),Bt=Ct.transformNDJSONChunkIntoObjects(Mt);for(const ce of Bt)if(Ct.isObjectOutputstreamMessageStartDTO(ce))K.current.set(ce.messageId,{rendered:"",markdownTag:"",isWritingTag:!1,lastStreamSourceUuid:null}),ce.role==="assistant"&&D("loadingDisplayedAnswer"),d({messageStreamId:ce.messageId,role:ce.role});else if(Ct.isObjectOutputstreamMessageDeltaDTO(ce)){const{delta:we,streamSourceUuid:qe}=ce;K.current.get(ce.messageId)||(K.current.set(ce.messageId,{rendered:"",markdownTag:"",isWritingTag:!1,lastStreamSourceUuid:null}),d({messageStreamId:ce.messageId,role:"assistant"}));const We=K.current.get(ce.messageId);We.lastStreamSourceUuid&&We.lastStreamSourceUuid!==qe&&(We.rendered+='<span style="display:block;height:1rem;"></span>'),We.lastStreamSourceUuid=qe??null,py(we)?(We.markdownTag+=we,We.rendered+=We.markdownTag,We.markdownTag="",We.isWritingTag=!1):We.isWritingTag||my(we)?(We.markdownTag+=we,We.isWritingTag=!0):We.rendered+=we,_({id:ce.messageId,newContent:We.rendered})}else if(Ct.isObjectOutputstreamMessageEndDTO(ce)){const{isLastAnswer:we,shouldStopStream:qe}=ce;(we||qe)&&(de=!0),K.current.delete(ce.messageId)}else if(Ct.isObjectOutputstreamLoadingCurrentStepNumberDTO(ce)){const{content:we}=ce;ee.enqueue(we),$(we)}else if(Ct.isObjectOutputstreamLoadingCurrentStepNameDTO(ce)){const{content:we}=ce;ee.enqueue(we),w(we)}else if(Ct.isObjectOutputstreamLoadingNumberOfStepsDTO(ce)){const{content:we}=ce;ee.enqueue(we),oe(we)}else if(Ct.isObjectOutputstreamErrorDTO(ce)){const{message:we}=ce;m({userType:"assistant",metaData:{isErrorMessage:!0},content:we,temporaryId:crypto.randomUUID()})}else n.warn(`Packet shape not handled - ${ce}`);if(yt&&de){ee.close(),D("notLoading"),w(k),$(null);return}return ye()})}}}).pipeTo(new WritableStream)},Rt=q=>{const be=`${Un.getApiUrl()}/ai/prompt/${e}`,de=sr.signal;if(q.mode==="text"){const M={query:q.text,language:z.locale};f?.discussionId&&(M.discussionId=f.discussionId);const W=Un.getFetchConfig({httpVerb:"POST",body:M,contentType:"application/json",options:{signal:de}});return{url:be,fetchConfig:W}}const L=new FormData;return L.append("language",z.locale),f?.discussionId&&L.append("discussionId",String(f.discussionId)),L.append("audioInput",q.audioFile,q.audioFile.name),{url:be,fetchConfig:{method:"POST",body:L,signal:de}}},Dt=async q=>{D("loadingIntermediaryStates"),requestAnimationFrame(()=>J({smooth:!1,sticky:!1}));const{url:pe,fetchConfig:be}=Rt(q);fetch(pe,be).then(async de=>{await lt(de)}).catch(de=>{n.error(de),D("notLoading"),sr=new AbortController})},Ue=async()=>{me(!0),await xe()},Jt=async()=>{const q=await Re();me(!1),q&&(n.log("Audio blob:",q.blob),n.log("Audio file:",q.file),Dt({mode:"audio",audioFile:q.file}))},Pt=()=>{De(),me(!1)};return S.jsxs("div",{className:["relative p-2","flex flex-col min-h-0 overflow-hidden","h-auto",t??"max-w-[90%] mx-auto"].join(" "),ref:r,style:se,children:[S.jsxs("div",{className:"flex-1 overflow-y-auto min-h-0 messagesContainer",ref:Y,children:[f.items.map((q,pe)=>S.jsx(t2,{content:q.content,userType:q.userType,metaData:q.metaData,context:{discussionId:f?.discussionId,messageIndex:pe,appToken:e},seenRootEl:Y.current},q.temporaryId)),S.jsx(yy,{currentStepName:ae,currentStepNumber:j,loadingStatus:C,numberOfSteps:G})]}),Ne&&S.jsx(wy,{label:O,onClick:()=>J({smooth:!0,sticky:!0})}),H&&S.jsx(Cy,{resetDiscussion:q=>{U(!1),b(q)},companySettings:p}),V&&Z&&S.jsx(Ry,{actionLabel:c,message:l,onClick:re}),S.jsxs("div",{className:"flex-shrink-0",children:[S.jsx(oy,{classNameTextarea:"",classNameContainer:"relative mt-6 mt-3 border-slate-400 border-[1px] rounded-lg p-1",SubmitComponent:ly,isDisabled:C!=="notLoading"||H,shouldDisableIfInputIsEmpty:!0,"aria-label":"TextArea For Bot Conversation",onSubmit:q=>{if(ie(!1),by(q)){const pe=Ey(q,f.discussionId,b,p);pe&&m({userType:"user",content:pe,temporaryId:crypto.randomUUID()}),ke(),J({smooth:!0,sticky:!1})}else m({userType:"user",content:q,temporaryId:crypto.randomUUID()}),ke(),J({smooth:!0,sticky:!1}),Dt({mode:"text",text:q})},placeholder:i,autoFocus:!0,isLoadingStream:C==="loadingDisplayedAnswer"||C==="loadingIntermediaryStates",LoadingComponent:xy,onPressLoadingButton:Ye,onPressMicButton:()=>{Ue()},MicComponent:Dy,audioEnabled:p?.agent?.isAudioAllowed}),S.jsx(By,{isOpen:Q,onStop:Jt,onCancel:Pt})]})]})};function Cr(){return Cr=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},Cr.apply(this,arguments)}function yc(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 ta(e,t){return ta=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},ta(e,t)}function xc(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,ta(e,t)}var ur={exports:{}};/*
134
147
  object-assign
135
148
  (c) Sindre Sorhus
136
149
  @license MIT
137
- */var gi,bu;function kx(){if(bu)return gi;bu=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={},u=0;u<10;u++)s["_"+String.fromCharCode(u)]=u;var o=Object.getOwnPropertyNames(s).map(function(f){return s[f]});if(o.join("")!=="0123456789")return!1;var c={};return"abcdefghijklmnopqrst".split("").forEach(function(f){c[f]=f}),Object.keys(Object.assign({},c)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return gi=i()?Object.assign:function(a,s){for(var u,o=r(a),c,f=1;f<arguments.length;f++){u=Object(arguments[f]);for(var d in u)t.call(u,d)&&(o[d]=u[d]);if(e){c=e(u);for(var h=0;h<c.length;h++)n.call(u,c[h])&&(o[c[h]]=u[c[h]])}}return o},gi}var bi,Eu;function ka(){if(Eu)return bi;Eu=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return bi=e,bi}var Ei,Tu;function gc(){return Tu||(Tu=1,Ei=Function.call.bind(Object.prototype.hasOwnProperty)),Ei}var Ti,xu;function Ox(){if(xu)return Ti;xu=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=ka(),n={},r=gc();e=function(a){var s="Warning: "+a;typeof console<"u"&&console.error(s);try{throw new Error(s)}catch{}}}function i(a,s,u,o,c){if(process.env.NODE_ENV!=="production"){for(var f in a)if(r(a,f)){var d;try{if(typeof a[f]!="function"){var h=Error((o||"React class")+": "+u+" type `"+f+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof a[f]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw h.name="Invariant Violation",h}d=a[f](s,f,o,u,null,t)}catch(b){d=b}if(d&&!(d instanceof Error)&&e((o||"React class")+": type specification of "+u+" `"+f+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof d+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),d instanceof Error&&!(d.message in n)){n[d.message]=!0;var m=c?c():"";e("Failed "+u+" type: "+d.message+(m??""))}}}}return i.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(n={})},Ti=i,Ti}var xi,yu;function Rx(){if(yu)return xi;yu=1;var e=ra(),t=kx(),n=ka(),r=gc(),i=Ox(),a=function(){};process.env.NODE_ENV!=="production"&&(a=function(u){var o="Warning: "+u;typeof console<"u"&&console.error(o);try{throw new Error(o)}catch{}});function s(){return null}return xi=function(u,o){var c=typeof Symbol=="function"&&Symbol.iterator,f="@@iterator";function d(p){var U=p&&(c&&p[c]||p[f]);if(typeof U=="function")return U}var h="<<anonymous>>",m={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:S(),arrayOf:v,element:D(),elementType:N(),instanceOf:O,node:w(),objectOf:ue,oneOf:q,oneOfType:G,shape:H,exact:$};function b(p,U){return p===U?p!==0||1/p===1/U:p!==p&&U!==U}function A(p,U){this.message=p,this.data=U&&typeof U=="object"?U:{},this.stack=""}A.prototype=Error.prototype;function C(p){if(process.env.NODE_ENV!=="production")var U={},Z=0;function T(ne,W,ee,re,ie,ae,Ne){if(re=re||h,ae=ae||ee,Ne!==n){if(o){var z=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 z.name="Invariant Violation",z}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var Pe=re+":"+ee;!U[Pe]&&Z<3&&(a("You are manually calling a React.PropTypes validation function for the `"+ae+"` 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."),U[Pe]=!0,Z++)}}return W[ee]==null?ne?W[ee]===null?new A("The "+ie+" `"+ae+"` is marked as required "+("in `"+re+"`, but its value is `null`.")):new A("The "+ie+" `"+ae+"` is marked as required in "+("`"+re+"`, but its value is `undefined`.")):null:p(W,ee,re,ie,ae)}var Q=T.bind(null,!1);return Q.isRequired=T.bind(null,!0),Q}function y(p){function U(Z,T,Q,ne,W,ee){var re=Z[T],ie=he(re);if(ie!==p){var ae=Se(re);return new A("Invalid "+ne+" `"+W+"` of type "+("`"+ae+"` supplied to `"+Q+"`, expected ")+("`"+p+"`."),{expectedType:p})}return null}return C(U)}function S(){return C(s)}function v(p){function U(Z,T,Q,ne,W){if(typeof p!="function")return new A("Property `"+W+"` of component `"+Q+"` has invalid PropType notation inside arrayOf.");var ee=Z[T];if(!Array.isArray(ee)){var re=he(ee);return new A("Invalid "+ne+" `"+W+"` of type "+("`"+re+"` supplied to `"+Q+"`, expected an array."))}for(var ie=0;ie<ee.length;ie++){var ae=p(ee,ie,Q,ne,W+"["+ie+"]",n);if(ae instanceof Error)return ae}return null}return C(U)}function D(){function p(U,Z,T,Q,ne){var W=U[Z];if(!u(W)){var ee=he(W);return new A("Invalid "+Q+" `"+ne+"` of type "+("`"+ee+"` supplied to `"+T+"`, expected a single ReactElement."))}return null}return C(p)}function N(){function p(U,Z,T,Q,ne){var W=U[Z];if(!e.isValidElementType(W)){var ee=he(W);return new A("Invalid "+Q+" `"+ne+"` of type "+("`"+ee+"` supplied to `"+T+"`, expected a single ReactElement type."))}return null}return C(p)}function O(p){function U(Z,T,Q,ne,W){if(!(Z[T]instanceof p)){var ee=p.name||h,re=Re(Z[T]);return new A("Invalid "+ne+" `"+W+"` of type "+("`"+re+"` supplied to `"+Q+"`, expected ")+("instance of `"+ee+"`."))}return null}return C(U)}function q(p){if(!Array.isArray(p))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 U(Z,T,Q,ne,W){for(var ee=Z[T],re=0;re<p.length;re++)if(b(ee,p[re]))return null;var ie=JSON.stringify(p,function(Ne,z){var Pe=Se(z);return Pe==="symbol"?String(z):z});return new A("Invalid "+ne+" `"+W+"` of value `"+String(ee)+"` "+("supplied to `"+Q+"`, expected one of "+ie+"."))}return C(U)}function ue(p){function U(Z,T,Q,ne,W){if(typeof p!="function")return new A("Property `"+W+"` of component `"+Q+"` has invalid PropType notation inside objectOf.");var ee=Z[T],re=he(ee);if(re!=="object")return new A("Invalid "+ne+" `"+W+"` of type "+("`"+re+"` supplied to `"+Q+"`, expected an object."));for(var ie in ee)if(r(ee,ie)){var ae=p(ee,ie,Q,ne,W+"."+ie,n);if(ae instanceof Error)return ae}return null}return C(U)}function G(p){if(!Array.isArray(p))return process.env.NODE_ENV!=="production"&&a("Invalid argument supplied to oneOfType, expected an instance of array."),s;for(var U=0;U<p.length;U++){var Z=p[U];if(typeof Z!="function")return a("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+Oe(Z)+" at index "+U+"."),s}function T(Q,ne,W,ee,re){for(var ie=[],ae=0;ae<p.length;ae++){var Ne=p[ae],z=Ne(Q,ne,W,ee,re,n);if(z==null)return null;z.data&&r(z.data,"expectedType")&&ie.push(z.data.expectedType)}var Pe=ie.length>0?", expected one of type ["+ie.join(", ")+"]":"";return new A("Invalid "+ee+" `"+re+"` supplied to "+("`"+W+"`"+Pe+"."))}return C(T)}function w(){function p(U,Z,T,Q,ne){return Y(U[Z])?null:new A("Invalid "+Q+" `"+ne+"` supplied to "+("`"+T+"`, expected a ReactNode."))}return C(p)}function j(p,U,Z,T,Q){return new A((p||"React class")+": "+U+" type `"+Z+"."+T+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+Q+"`.")}function H(p){function U(Z,T,Q,ne,W){var ee=Z[T],re=he(ee);if(re!=="object")return new A("Invalid "+ne+" `"+W+"` of type `"+re+"` "+("supplied to `"+Q+"`, expected `object`."));for(var ie in p){var ae=p[ie];if(typeof ae!="function")return j(Q,ne,W,ie,Se(ae));var Ne=ae(ee,ie,Q,ne,W+"."+ie,n);if(Ne)return Ne}return null}return C(U)}function $(p){function U(Z,T,Q,ne,W){var ee=Z[T],re=he(ee);if(re!=="object")return new A("Invalid "+ne+" `"+W+"` of type `"+re+"` "+("supplied to `"+Q+"`, expected `object`."));var ie=t({},Z[T],p);for(var ae in ie){var Ne=p[ae];if(r(p,ae)&&typeof Ne!="function")return j(Q,ne,W,ae,Se(Ne));if(!Ne)return new A("Invalid "+ne+" `"+W+"` key `"+ae+"` supplied to `"+Q+"`.\nBad object: "+JSON.stringify(Z[T],null," ")+`
138
- Valid keys: `+JSON.stringify(Object.keys(p),null," "));var z=Ne(ee,ae,Q,ne,W+"."+ae,n);if(z)return z}return null}return C(U)}function Y(p){switch(typeof p){case"number":case"string":case"undefined":return!0;case"boolean":return!p;case"object":if(Array.isArray(p))return p.every(Y);if(p===null||u(p))return!0;var U=d(p);if(U){var Z=U.call(p),T;if(U!==p.entries){for(;!(T=Z.next()).done;)if(!Y(T.value))return!1}else for(;!(T=Z.next()).done;){var Q=T.value;if(Q&&!Y(Q[1]))return!1}}else return!1;return!0;default:return!1}}function J(p,U){return p==="symbol"?!0:U?U["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&U instanceof Symbol:!1}function he(p){var U=typeof p;return Array.isArray(p)?"array":p instanceof RegExp?"object":J(U,p)?"symbol":U}function Se(p){if(typeof p>"u"||p===null)return""+p;var U=he(p);if(U==="object"){if(p instanceof Date)return"date";if(p instanceof RegExp)return"regexp"}return U}function Oe(p){var U=Se(p);switch(U){case"array":case"object":return"an "+U;case"boolean":case"date":case"regexp":return"a "+U;default:return U}}function Re(p){return!p.constructor||!p.constructor.name?h:p.constructor.name}return m.checkPropTypes=i,m.resetWarningCache=i.resetWarningCache,m.PropTypes=m,m},xi}var yi,Au;function Lx(){if(Au)return yi;Au=1;var e=ka();function t(){}function n(){}return n.resetWarningCache=t,yi=function(){function r(s,u,o,c,f,d){if(d!==e){var h=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 h.name="Invariant Violation",h}}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},yi}var _u;function Dx(){if(_u)return ar.exports;if(_u=1,process.env.NODE_ENV!=="production"){var e=ra(),t=!0;ar.exports=Rx()(e.isElement,t)}else ar.exports=Lx()();return ar.exports}var Px=Dx();const se=ta(Px);function Mx(e,t){return e.classList?!!t&&e.classList.contains(t):(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")!==-1}function Bx(e,t){e.classList?e.classList.add(t):Mx(e,t)||(typeof e.className=="string"?e.className=e.className+" "+t:e.setAttribute("class",(e.className&&e.className.baseVal||"")+" "+t))}function Su(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}function Fx(e,t){e.classList?e.classList.remove(t):typeof e.className=="string"?e.className=Su(e.className,t):e.setAttribute("class",Su(e.className&&e.className.baseVal||"",t))}const Cu={disabled:!1};var Hx=process.env.NODE_ENV!=="production"?se.oneOfType([se.number,se.shape({enter:se.number,exit:se.number,appear:se.number}).isRequired]):null,Ux=process.env.NODE_ENV!=="production"?se.oneOfType([se.string,se.shape({enter:se.string,exit:se.string,active:se.string}),se.shape({enter:se.string,enterDone:se.string,enterActive:se.string,exit:se.string,exitDone:se.string,exitActive:se.string})]):null;const bc=k.createContext(null);var Ec=function(t){return t.scrollTop},wn="unmounted",Ht="exited",Ut="entering",rn="entered",ea="exiting",xt=(function(e){pc(t,e);function t(r,i){var a;a=e.call(this,r,i)||this;var s=i,u=s&&!s.isMounting?r.enter:r.appear,o;return a.appearStatus=null,r.in?u?(o=Ht,a.appearStatus=Ut):o=rn:r.unmountOnExit||r.mountOnEnter?o=wn:o=Ht,a.state={status:o},a.nextCallback=null,a}t.getDerivedStateFromProps=function(i,a){var s=i.in;return s&&a.status===wn?{status:Ht}: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!==Ut&&s!==rn&&(a=Ut):(s===Ut||s===rn)&&(a=ea)}this.updateStatus(!1,a)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var i=this.props.timeout,a,s,u;return a=s=u=i,i!=null&&typeof i!="number"&&(a=i.exit,s=i.enter,u=i.appear!==void 0?i.appear:s),{exit:a,enter:s,appear:u}},n.updateStatus=function(i,a){if(i===void 0&&(i=!1),a!==null)if(this.cancelNextCallback(),a===Ut){if(this.props.unmountOnExit||this.props.mountOnEnter){var s=this.props.nodeRef?this.props.nodeRef.current:Sn.findDOMNode(this);s&&Ec(s)}this.performEnter(i)}else this.performExit();else this.props.unmountOnExit&&this.state.status===Ht&&this.setState({status:wn})},n.performEnter=function(i){var a=this,s=this.props.enter,u=this.context?this.context.isMounting:i,o=this.props.nodeRef?[u]:[Sn.findDOMNode(this),u],c=o[0],f=o[1],d=this.getTimeouts(),h=u?d.appear:d.enter;if(!i&&!s||Cu.disabled){this.safeSetState({status:rn},function(){a.props.onEntered(c)});return}this.props.onEnter(c,f),this.safeSetState({status:Ut},function(){a.props.onEntering(c,f),a.onTransitionEnd(h,function(){a.safeSetState({status:rn},function(){a.props.onEntered(c,f)})})})},n.performExit=function(){var i=this,a=this.props.exit,s=this.getTimeouts(),u=this.props.nodeRef?void 0:Sn.findDOMNode(this);if(!a||Cu.disabled){this.safeSetState({status:Ht},function(){i.props.onExited(u)});return}this.props.onExit(u),this.safeSetState({status:ea},function(){i.props.onExiting(u),i.onTransitionEnd(s.exit,function(){i.safeSetState({status:Ht},function(){i.props.onExited(u)})})})},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(u){s&&(s=!1,a.nextCallback=null,i(u))},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:Sn.findDOMNode(this),u=i==null&&!this.props.addEndListener;if(!s||u){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var o=this.props.nodeRef?[this.nextCallback]:[s,this.nextCallback],c=o[0],f=o[1];this.props.addEndListener(c,f)}i!=null&&setTimeout(this.nextCallback,i)},n.render=function(){var i=this.state.status;if(i===wn)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 u=mc(a,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return k.createElement(bc.Provider,{value:null},typeof s=="function"?s(i,u):k.cloneElement(k.Children.only(s),u))},t})(k.Component);xt.contextType=bc;xt.propTypes=process.env.NODE_ENV!=="production"?{nodeRef:se.shape({current:typeof Element>"u"?se.any:function(e,t,n,r,i,a){var s=e[t];return se.instanceOf(s&&"ownerDocument"in s?s.ownerDocument.defaultView.Element:Element)(e,t,n,r,i,a)}}),children:se.oneOfType([se.func.isRequired,se.element.isRequired]).isRequired,in:se.bool,mountOnEnter:se.bool,unmountOnExit:se.bool,appear:se.bool,enter:se.bool,exit:se.bool,timeout:function(t){var n=Hx;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:se.func,onEnter:se.func,onEntering:se.func,onEntered:se.func,onExit:se.func,onExiting:se.func,onExited:se.func}:{};function en(){}xt.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:en,onEntering:en,onEntered:en,onExit:en,onExiting:en,onExited:en};xt.UNMOUNTED=wn;xt.EXITED=Ht;xt.ENTERING=Ut;xt.ENTERED=rn;xt.EXITING=ea;var jx=function(t,n){return t&&n&&n.split(" ").forEach(function(r){return Bx(t,r)})},Ai=function(t,n){return t&&n&&n.split(" ").forEach(function(r){return Fx(t,r)})},Oa=(function(e){pc(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(u,o){var c=r.resolveArguments(u,o),f=c[0],d=c[1];r.removeClasses(f,"exit"),r.addClass(f,d?"appear":"enter","base"),r.props.onEnter&&r.props.onEnter(u,o)},r.onEntering=function(u,o){var c=r.resolveArguments(u,o),f=c[0],d=c[1],h=d?"appear":"enter";r.addClass(f,h,"active"),r.props.onEntering&&r.props.onEntering(u,o)},r.onEntered=function(u,o){var c=r.resolveArguments(u,o),f=c[0],d=c[1],h=d?"appear":"enter";r.removeClasses(f,h),r.addClass(f,h,"done"),r.props.onEntered&&r.props.onEntered(u,o)},r.onExit=function(u){var o=r.resolveArguments(u),c=o[0];r.removeClasses(c,"appear"),r.removeClasses(c,"enter"),r.addClass(c,"exit","base"),r.props.onExit&&r.props.onExit(u)},r.onExiting=function(u){var o=r.resolveArguments(u),c=o[0];r.addClass(c,"exit","active"),r.props.onExiting&&r.props.onExiting(u)},r.onExited=function(u){var o=r.resolveArguments(u),c=o[0];r.removeClasses(c,"exit"),r.addClass(c,"exit","done"),r.props.onExited&&r.props.onExited(u)},r.resolveArguments=function(u,o){return r.props.nodeRef?[r.props.nodeRef.current,u]:[u,o]},r.getClassNames=function(u){var o=r.props.classNames,c=typeof o=="string",f=c&&o?o+"-":"",d=c?""+f+u:o[u],h=c?d+"-active":o[u+"Active"],m=c?d+"-done":o[u+"Done"];return{baseClassName:d,activeClassName:h,doneClassName:m}},r}var n=t.prototype;return n.addClass=function(i,a,s){var u=this.getClassNames(a)[s+"ClassName"],o=this.getClassNames("enter"),c=o.doneClassName;a==="appear"&&s==="done"&&c&&(u+=" "+c),s==="active"&&i&&Ec(i),u&&(this.appliedClasses[a][s]=u,jx(i,u))},n.removeClasses=function(i,a){var s=this.appliedClasses[a],u=s.base,o=s.active,c=s.done;this.appliedClasses[a]={},u&&Ai(i,u),o&&Ai(i,o),c&&Ai(i,c)},n.render=function(){var i=this.props;i.classNames;var a=mc(i,["classNames"]);return k.createElement(xt,_r({},a,{onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}))},t})(k.Component);Oa.defaultProps={classNames:""};Oa.propTypes=process.env.NODE_ENV!=="production"?_r({},xt.propTypes,{classNames:Ux,onEnter:se.func,onEntering:se.func,onEntered:se.func,onExit:se.func,onExiting:se.func,onExited:se.func}):{};const zx=({setIsWidgetOpen:e})=>_.jsx(_.Fragment,{children:_.jsx("button",{type:"button","aria-label":"Close chat",onClick:()=>e(!1),className:`absolute right-2 top-1/2 -translate-y-1/2
150
+ */var Ei,yu;function Fy(){if(yu)return Ei;yu=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={},u=0;u<10;u++)s["_"+String.fromCharCode(u)]=u;var l=Object.getOwnPropertyNames(s).map(function(f){return s[f]});if(l.join("")!=="0123456789")return!1;var c={};return"abcdefghijklmnopqrst".split("").forEach(function(f){c[f]=f}),Object.keys(Object.assign({},c)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return Ei=i()?Object.assign:function(a,s){for(var u,l=r(a),c,f=1;f<arguments.length;f++){u=Object(arguments[f]);for(var d in u)t.call(u,d)&&(l[d]=u[d]);if(e){c=e(u);for(var m=0;m<c.length;m++)n.call(u,c[m])&&(l[c[m]]=u[c[m]])}}return l},Ei}var Ti,xu;function Ra(){if(xu)return Ti;xu=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Ti=e,Ti}var yi,Au;function Ac(){return Au||(Au=1,yi=Function.call.bind(Object.prototype.hasOwnProperty)),yi}var xi,_u;function Hy(){if(_u)return xi;_u=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=Ra(),n={},r=Ac();e=function(a){var s="Warning: "+a;typeof console<"u"&&console.error(s);try{throw new Error(s)}catch{}}}function i(a,s,u,l,c){if(process.env.NODE_ENV!=="production"){for(var f in a)if(r(a,f)){var d;try{if(typeof a[f]!="function"){var m=Error((l||"React class")+": "+u+" type `"+f+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof a[f]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw m.name="Invariant Violation",m}d=a[f](s,f,l,u,null,t)}catch(b){d=b}if(d&&!(d instanceof Error)&&e((l||"React class")+": type specification of "+u+" `"+f+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof d+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),d instanceof Error&&!(d.message in n)){n[d.message]=!0;var h=c?c():"";e("Failed "+u+" type: "+d.message+(h??""))}}}}return i.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(n={})},xi=i,xi}var Ai,Su;function Uy(){if(Su)return Ai;Su=1;var e=sa(),t=Fy(),n=Ra(),r=Ac(),i=Hy(),a=function(){};process.env.NODE_ENV!=="production"&&(a=function(u){var l="Warning: "+u;typeof console<"u"&&console.error(l);try{throw new Error(l)}catch{}});function s(){return null}return Ai=function(u,l){var c=typeof Symbol=="function"&&Symbol.iterator,f="@@iterator";function d(p){var z=p&&(c&&p[c]||p[f]);if(typeof z=="function")return z}var m="<<anonymous>>",h={array:x("array"),bigint:x("bigint"),bool:x("boolean"),func:x("function"),number:x("number"),object:x("object"),string:x("string"),symbol:x("symbol"),any:I(),arrayOf:C,element:D(),elementType:k(),instanceOf:O,node:w(),objectOf:oe,oneOf:G,oneOfType:ae,shape:$,exact:H};function b(p,z){return p===z?p!==0||1/p===1/z:p!==p&&z!==z}function A(p,z){this.message=p,this.data=z&&typeof z=="object"?z:{},this.stack=""}A.prototype=Error.prototype;function _(p){if(process.env.NODE_ENV!=="production")var z={},K=0;function T(ie,V,re,ne,se,J,Ne){if(ne=ne||m,J=J||re,Ne!==n){if(l){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 ke=ne+":"+re;!z[ke]&&K<3&&(a("You are manually calling a React.PropTypes validation function for the `"+J+"` prop on `"+ne+"`. 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."),z[ke]=!0,K++)}}return V[re]==null?ie?V[re]===null?new A("The "+se+" `"+J+"` is marked as required "+("in `"+ne+"`, but its value is `null`.")):new A("The "+se+" `"+J+"` is marked as required in "+("`"+ne+"`, but its value is `undefined`.")):null:p(V,re,ne,se,J)}var Z=T.bind(null,!1);return Z.isRequired=T.bind(null,!0),Z}function x(p){function z(K,T,Z,ie,V,re){var ne=K[T],se=me(ne);if(se!==p){var J=xe(ne);return new A("Invalid "+ie+" `"+V+"` of type "+("`"+J+"` supplied to `"+Z+"`, expected ")+("`"+p+"`."),{expectedType:p})}return null}return _(z)}function I(){return _(s)}function C(p){function z(K,T,Z,ie,V){if(typeof p!="function")return new A("Property `"+V+"` of component `"+Z+"` has invalid PropType notation inside arrayOf.");var re=K[T];if(!Array.isArray(re)){var ne=me(re);return new A("Invalid "+ie+" `"+V+"` of type "+("`"+ne+"` supplied to `"+Z+"`, expected an array."))}for(var se=0;se<re.length;se++){var J=p(re,se,Z,ie,V+"["+se+"]",n);if(J instanceof Error)return J}return null}return _(z)}function D(){function p(z,K,T,Z,ie){var V=z[K];if(!u(V)){var re=me(V);return new A("Invalid "+Z+" `"+ie+"` of type "+("`"+re+"` supplied to `"+T+"`, expected a single ReactElement."))}return null}return _(p)}function k(){function p(z,K,T,Z,ie){var V=z[K];if(!e.isValidElementType(V)){var re=me(V);return new A("Invalid "+Z+" `"+ie+"` of type "+("`"+re+"` supplied to `"+T+"`, expected a single ReactElement type."))}return null}return _(p)}function O(p){function z(K,T,Z,ie,V){if(!(K[T]instanceof p)){var re=p.name||m,ne=De(K[T]);return new A("Invalid "+ie+" `"+V+"` of type "+("`"+ne+"` supplied to `"+Z+"`, expected ")+("instance of `"+re+"`."))}return null}return _(z)}function G(p){if(!Array.isArray(p))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 z(K,T,Z,ie,V){for(var re=K[T],ne=0;ne<p.length;ne++)if(b(re,p[ne]))return null;var se=JSON.stringify(p,function(Ne,Y){var ke=xe(Y);return ke==="symbol"?String(Y):Y});return new A("Invalid "+ie+" `"+V+"` of value `"+String(re)+"` "+("supplied to `"+Z+"`, expected one of "+se+"."))}return _(z)}function oe(p){function z(K,T,Z,ie,V){if(typeof p!="function")return new A("Property `"+V+"` of component `"+Z+"` has invalid PropType notation inside objectOf.");var re=K[T],ne=me(re);if(ne!=="object")return new A("Invalid "+ie+" `"+V+"` of type "+("`"+ne+"` supplied to `"+Z+"`, expected an object."));for(var se in re)if(r(re,se)){var J=p(re,se,Z,ie,V+"."+se,n);if(J instanceof Error)return J}return null}return _(z)}function ae(p){if(!Array.isArray(p))return process.env.NODE_ENV!=="production"&&a("Invalid argument supplied to oneOfType, expected an instance of array."),s;for(var z=0;z<p.length;z++){var K=p[z];if(typeof K!="function")return a("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+Re(K)+" at index "+z+"."),s}function T(Z,ie,V,re,ne){for(var se=[],J=0;J<p.length;J++){var Ne=p[J],Y=Ne(Z,ie,V,re,ne,n);if(Y==null)return null;Y.data&&r(Y.data,"expectedType")&&se.push(Y.data.expectedType)}var ke=se.length>0?", expected one of type ["+se.join(", ")+"]":"";return new A("Invalid "+re+" `"+ne+"` supplied to "+("`"+V+"`"+ke+"."))}return _(T)}function w(){function p(z,K,T,Z,ie){return U(z[K])?null:new A("Invalid "+Z+" `"+ie+"` supplied to "+("`"+T+"`, expected a ReactNode."))}return _(p)}function j(p,z,K,T,Z){return new A((p||"React class")+": "+z+" type `"+K+"."+T+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+Z+"`.")}function $(p){function z(K,T,Z,ie,V){var re=K[T],ne=me(re);if(ne!=="object")return new A("Invalid "+ie+" `"+V+"` of type `"+ne+"` "+("supplied to `"+Z+"`, expected `object`."));for(var se in p){var J=p[se];if(typeof J!="function")return j(Z,ie,V,se,xe(J));var Ne=J(re,se,Z,ie,V+"."+se,n);if(Ne)return Ne}return null}return _(z)}function H(p){function z(K,T,Z,ie,V){var re=K[T],ne=me(re);if(ne!=="object")return new A("Invalid "+ie+" `"+V+"` of type `"+ne+"` "+("supplied to `"+Z+"`, expected `object`."));var se=t({},K[T],p);for(var J in se){var Ne=p[J];if(r(p,J)&&typeof Ne!="function")return j(Z,ie,V,J,xe(Ne));if(!Ne)return new A("Invalid "+ie+" `"+V+"` key `"+J+"` supplied to `"+Z+"`.\nBad object: "+JSON.stringify(K[T],null," ")+`
151
+ Valid keys: `+JSON.stringify(Object.keys(p),null," "));var Y=Ne(re,J,Z,ie,V+"."+J,n);if(Y)return Y}return null}return _(z)}function U(p){switch(typeof p){case"number":case"string":case"undefined":return!0;case"boolean":return!p;case"object":if(Array.isArray(p))return p.every(U);if(p===null||u(p))return!0;var z=d(p);if(z){var K=z.call(p),T;if(z!==p.entries){for(;!(T=K.next()).done;)if(!U(T.value))return!1}else for(;!(T=K.next()).done;){var Z=T.value;if(Z&&!U(Z[1]))return!1}}else return!1;return!0;default:return!1}}function Q(p,z){return p==="symbol"?!0:z?z["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&z instanceof Symbol:!1}function me(p){var z=typeof p;return Array.isArray(p)?"array":p instanceof RegExp?"object":Q(z,p)?"symbol":z}function xe(p){if(typeof p>"u"||p===null)return""+p;var z=me(p);if(z==="object"){if(p instanceof Date)return"date";if(p instanceof RegExp)return"regexp"}return z}function Re(p){var z=xe(p);switch(z){case"array":case"object":return"an "+z;case"boolean":case"date":case"regexp":return"a "+z;default:return z}}function De(p){return!p.constructor||!p.constructor.name?m:p.constructor.name}return h.checkPropTypes=i,h.resetWarningCache=i.resetWarningCache,h.PropTypes=h,h},Ai}var _i,Cu;function jy(){if(Cu)return _i;Cu=1;var e=Ra();function t(){}function n(){}return n.resetWarningCache=t,_i=function(){function r(s,u,l,c,f,d){if(d!==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},_i}var wu;function zy(){if(wu)return ur.exports;if(wu=1,process.env.NODE_ENV!=="production"){var e=sa(),t=!0;ur.exports=Uy()(e.isElement,t)}else ur.exports=jy()();return ur.exports}var $y=zy();const ue=ra($y);function Yy(e,t){return e.classList?!!t&&e.classList.contains(t):(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")!==-1}function Gy(e,t){e.classList?e.classList.add(t):Yy(e,t)||(typeof e.className=="string"?e.className=e.className+" "+t:e.setAttribute("class",(e.className&&e.className.baseVal||"")+" "+t))}function Iu(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}function Vy(e,t){e.classList?e.classList.remove(t):typeof e.className=="string"?e.className=Iu(e.className,t):e.setAttribute("class",Iu(e.className&&e.className.baseVal||"",t))}const vu={disabled:!1};var qy=process.env.NODE_ENV!=="production"?ue.oneOfType([ue.number,ue.shape({enter:ue.number,exit:ue.number,appear:ue.number}).isRequired]):null,Wy=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 _c=N.createContext(null);var Sc=function(t){return t.scrollTop},vn="unmounted",Ut="exited",jt="entering",sn="entered",na="exiting",Tt=(function(e){xc(t,e);function t(r,i){var a;a=e.call(this,r,i)||this;var s=i,u=s&&!s.isMounting?r.enter:r.appear,l;return a.appearStatus=null,r.in?u?(l=Ut,a.appearStatus=jt):l=sn:r.unmountOnExit||r.mountOnEnter?l=vn:l=Ut,a.state={status:l},a.nextCallback=null,a}t.getDerivedStateFromProps=function(i,a){var s=i.in;return s&&a.status===vn?{status:Ut}: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!==jt&&s!==sn&&(a=jt):(s===jt||s===sn)&&(a=na)}this.updateStatus(!1,a)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var i=this.props.timeout,a,s,u;return a=s=u=i,i!=null&&typeof i!="number"&&(a=i.exit,s=i.enter,u=i.appear!==void 0?i.appear:s),{exit:a,enter:s,appear:u}},n.updateStatus=function(i,a){if(i===void 0&&(i=!1),a!==null)if(this.cancelNextCallback(),a===jt){if(this.props.unmountOnExit||this.props.mountOnEnter){var s=this.props.nodeRef?this.props.nodeRef.current:wn.findDOMNode(this);s&&Sc(s)}this.performEnter(i)}else this.performExit();else this.props.unmountOnExit&&this.state.status===Ut&&this.setState({status:vn})},n.performEnter=function(i){var a=this,s=this.props.enter,u=this.context?this.context.isMounting:i,l=this.props.nodeRef?[u]:[wn.findDOMNode(this),u],c=l[0],f=l[1],d=this.getTimeouts(),m=u?d.appear:d.enter;if(!i&&!s||vu.disabled){this.safeSetState({status:sn},function(){a.props.onEntered(c)});return}this.props.onEnter(c,f),this.safeSetState({status:jt},function(){a.props.onEntering(c,f),a.onTransitionEnd(m,function(){a.safeSetState({status:sn},function(){a.props.onEntered(c,f)})})})},n.performExit=function(){var i=this,a=this.props.exit,s=this.getTimeouts(),u=this.props.nodeRef?void 0:wn.findDOMNode(this);if(!a||vu.disabled){this.safeSetState({status:Ut},function(){i.props.onExited(u)});return}this.props.onExit(u),this.safeSetState({status:na},function(){i.props.onExiting(u),i.onTransitionEnd(s.exit,function(){i.safeSetState({status:Ut},function(){i.props.onExited(u)})})})},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(u){s&&(s=!1,a.nextCallback=null,i(u))},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:wn.findDOMNode(this),u=i==null&&!this.props.addEndListener;if(!s||u){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var l=this.props.nodeRef?[this.nextCallback]:[s,this.nextCallback],c=l[0],f=l[1];this.props.addEndListener(c,f)}i!=null&&setTimeout(this.nextCallback,i)},n.render=function(){var i=this.state.status;if(i===vn)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 u=yc(a,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return N.createElement(_c.Provider,{value:null},typeof s=="function"?s(i,u):N.cloneElement(N.Children.only(s),u))},t})(N.Component);Tt.contextType=_c;Tt.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=qy;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 nn(){}Tt.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:nn,onEntering:nn,onEntered:nn,onExit:nn,onExiting:nn,onExited:nn};Tt.UNMOUNTED=vn;Tt.EXITED=Ut;Tt.ENTERING=jt;Tt.ENTERED=sn;Tt.EXITING=na;var Xy=function(t,n){return t&&n&&n.split(" ").forEach(function(r){return Gy(t,r)})},Si=function(t,n){return t&&n&&n.split(" ").forEach(function(r){return Vy(t,r)})},Da=(function(e){xc(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(u,l){var c=r.resolveArguments(u,l),f=c[0],d=c[1];r.removeClasses(f,"exit"),r.addClass(f,d?"appear":"enter","base"),r.props.onEnter&&r.props.onEnter(u,l)},r.onEntering=function(u,l){var c=r.resolveArguments(u,l),f=c[0],d=c[1],m=d?"appear":"enter";r.addClass(f,m,"active"),r.props.onEntering&&r.props.onEntering(u,l)},r.onEntered=function(u,l){var c=r.resolveArguments(u,l),f=c[0],d=c[1],m=d?"appear":"enter";r.removeClasses(f,m),r.addClass(f,m,"done"),r.props.onEntered&&r.props.onEntered(u,l)},r.onExit=function(u){var l=r.resolveArguments(u),c=l[0];r.removeClasses(c,"appear"),r.removeClasses(c,"enter"),r.addClass(c,"exit","base"),r.props.onExit&&r.props.onExit(u)},r.onExiting=function(u){var l=r.resolveArguments(u),c=l[0];r.addClass(c,"exit","active"),r.props.onExiting&&r.props.onExiting(u)},r.onExited=function(u){var l=r.resolveArguments(u),c=l[0];r.removeClasses(c,"exit"),r.addClass(c,"exit","done"),r.props.onExited&&r.props.onExited(u)},r.resolveArguments=function(u,l){return r.props.nodeRef?[r.props.nodeRef.current,u]:[u,l]},r.getClassNames=function(u){var l=r.props.classNames,c=typeof l=="string",f=c&&l?l+"-":"",d=c?""+f+u:l[u],m=c?d+"-active":l[u+"Active"],h=c?d+"-done":l[u+"Done"];return{baseClassName:d,activeClassName:m,doneClassName:h}},r}var n=t.prototype;return n.addClass=function(i,a,s){var u=this.getClassNames(a)[s+"ClassName"],l=this.getClassNames("enter"),c=l.doneClassName;a==="appear"&&s==="done"&&c&&(u+=" "+c),s==="active"&&i&&Sc(i),u&&(this.appliedClasses[a][s]=u,Xy(i,u))},n.removeClasses=function(i,a){var s=this.appliedClasses[a],u=s.base,l=s.active,c=s.done;this.appliedClasses[a]={},u&&Si(i,u),l&&Si(i,l),c&&Si(i,c)},n.render=function(){var i=this.props;i.classNames;var a=yc(i,["classNames"]);return N.createElement(Tt,Cr({},a,{onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}))},t})(N.Component);Da.defaultProps={classNames:""};Da.propTypes=process.env.NODE_ENV!=="production"?Cr({},Tt.propTypes,{classNames:Wy,onEnter:ue.func,onEntering:ue.func,onEntered:ue.func,onExit:ue.func,onExiting:ue.func,onExited:ue.func}):{};const Qy=({setIsWidgetOpen:e})=>S.jsx(S.Fragment,{children:S.jsx("button",{type:"button","aria-label":"Close chat",onClick:()=>e(!1),className:`absolute right-2 top-1/2 -translate-y-1/2
139
152
  inline-flex items-center justify-center
140
153
  rounded-full p-1.5
141
154
  text-white
@@ -146,7 +159,7 @@ Valid keys: `+JSON.stringify(Object.keys(p),null," "));var z=Ne(ee,ae,Q,ne,W+".
146
159
  focus-visible:ring-white/80
147
160
  focus-visible:ring-offset-2
148
161
  focus-visible:ring-offset-violet-700
149
- `,"data-testid":"close-button",children:_.jsx("svg",{viewBox:"0 0 24 24",width:"20",height:"20",fill:"none","aria-hidden":"true",className:"select-none outline-none",children:_.jsx("path",{d:"M6 6L18 18M6 18L18 6",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})})})}),$x=k.forwardRef(({props:e},t)=>_.jsxs("div",{ref:t,className:`
162
+ `,"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"})})})}),Ky=N.forwardRef(({props:e},t)=>S.jsxs("div",{ref:t,className:`
150
163
  chatBox
151
164
  fixed z-[2147483647]
152
165
  inset-0 w-screen h-[100svh] rounded-none
@@ -155,7 +168,7 @@ Valid keys: `+JSON.stringify(Object.keys(p),null," "));var z=Ne(ee,ae,Q,ne,W+".
155
168
  md:h-[clamp(420px,70dvh,640px)]
156
169
  md:rounded-xl
157
170
  bg-white shadow-xl flex flex-col overflow-hidden
158
- `,children:[_.jsxs("div",{className:"relative bg-violet-700 py-2 text-white text-center flex justify-center items-center chatsystem-header",children:[_.jsx("span",{className:"font-medium",children:"Assistant"}),_.jsx(zx,{setIsWidgetOpen:e.setIsWidgetOpen})]}),_.jsx(hc,{appToken:e.appToken})]})),Yx=({isWidgetOpen:e,appToken:t,setIsWidgetOpen:n})=>{const r=k.useRef(null);return _.jsx("div",{children:_.jsx(Oa,{nodeRef:r,in:e,timeout:200,classNames:"menuTransition",unmountOnExit:!0,children:_.jsx($x,{ref:r,props:{appToken:t,setIsWidgetOpen:n}})})})},Tc=()=>({hasFetchedSettings:!1,hasDisplayedCSS:!1}),Gx=()=>{const[e,t]=k.useState(Tc());return{appInternalContext:e,setAppInternalContext:t,setHasFetchedSettings:()=>{t(i=>({...i,hasFetchedSettings:!0}))},setHasDisplayedCss:()=>{t(i=>({...i,hasDisplayedCSS:!0}))}}},xc=k.createContext({appInternalContext:Tc(),setAppInternalContext:()=>{},setHasFetchedSettings:()=>{}}),Vx=({displayMode:e,appToken:t})=>{const[n,r]=k.useState(!1),{appInternalContext:i}=k.useContext(xc);return _.jsxs(_.Fragment,{children:[e===fn.LAUNCHER&&i.hasFetchedSettings&&_.jsxs(_.Fragment,{children:[_.jsx(Uc,{isWidgetOpen:n,setIsWidgetOpen:r}),_.jsx(Yx,{isWidgetOpen:n,appToken:t,setIsWidgetOpen:r})]}),e===fn.CHATBOX&&i.hasFetchedSettings&&_.jsx("div",{className:"chatBox",children:_.jsx(hc,{appToken:t})})]})},qx=e=>Object.values(fn).includes(e),Wx=e=>qx(e)?e:(console.warn(`Display mode not valid. Using ${fn.LAUNCHER} as default.`),fn.LAUNCHER),Xx=(e,t)=>{let n,r;return typeof window<"u"&&(r=window.localStorage.getItem(ax)),r&&e?.[r]!==void 0?n=e[r]:(n=e[t],n.isDefault=!0),n},Qx=(e,t)=>{const[n,r]=k.useState(e[t]),i=a=>{Object.keys(e).includes(a?.locale)?r(a):r(e[nt.ENGLISH])};return k.useEffect(()=>{let a=Xx(e,t);a.locale!==t&&r(e[a.locale])},[]),{appCurrentLang:n,handleSetContextCurrentLang:i}},Kx=e=>Object.values(nt).includes(e),Zx=e=>Kx(e)?e:(console.log(`Language ${e} not handled for now. Using ${nt.ENGLISH}.`),nt.ENGLISH);function Jx(e,t=Date.now()){return t-e}function ey(e,t=Date.now()){return Jx(new Date(e).getTime(),t)<=Tx}function ty({settings:e,setCurrentConversation:t,setArchivedConversation:n}){const r=_x({key:fc});if(!r){t({discussionId:null,items:[{userType:"assistant",content:e.agent.text.initialText}]});return}ey(r.updatedAt)?t({discussionId:r.discussionId,items:r.items,updatedAt:r.updatedAt}):(t({discussionId:null,items:[{userType:"assistant",content:e.agent.text.initialText}]}),n({discussionId:r.discussionId,items:r.items,updatedAt:r.updatedAt}))}const ny=({agentId:e,appToken:t,onFetched:n})=>{const[r,i]=k.useState({}),a={companySettings:r,setCompanySettings:i},[s,u]=k.useState({discussionId:null,items:[],updatedAt:null}),[o,c]=k.useState({discussionId:null,items:[],updatedAt:null}),f={currentConversation:s,setCurrentConversation:u,archivedConversation:o,setArchivedConversation:c};return k.useEffect(()=>{const d=Fn.getApiUrl(),h=Fn.getFetchConfig({httpVerb:"GET",contentType:"application/json"});let m=`${d}/company/settings/${t}`;m+=`/${e}`,fetch(m,{...h,credentials:"omit"}).then(async b=>{const A=await b.json();i(A),ty({settings:A,setCurrentConversation:u,setArchivedConversation:c}),n?.()}).catch(b=>console.log("error in settings fetch",b))},[t,e]),{contextCompanySettings:a,contextInitialConversationState:f}};function ry(e,t={},n,r){const{id:i,nonce:a,target:s,disableConstructable:u}=t,o=s,c=k.useRef(null),f=k.useRef(null);k.useEffect(()=>{if(!s)return;if(!e){n&&(console.log("No custom css found."),r?.());return}if(!u&&"adoptedStyleSheets"in o&&typeof CSSStyleSheet<"u"&&"replaceSync"in CSSStyleSheet.prototype)return c.current||(c.current=new CSSStyleSheet,o.adoptedStyleSheets=[...o.adoptedStyleSheets,c.current]),c.current.replaceSync(e),console.log("Loading custom css via stylesheet."),r?.(),()=>{const h=o.adoptedStyleSheets||[],m=h.indexOf(c.current);if(m>=0){const b=h.slice();b.splice(m,1),o.adoptedStyleSheets=b}c.current=null};if(!f.current){const h=document.createElement("style");h.type="text/css",i&&(h.id=i),a&&(h.nonce=a),(o instanceof Document&&o.head||o).appendChild(h),f.current=h}return f.current.textContent=e,console.log("Loading custom css via style tag."),r?.(),()=>{f.current?.parentNode?.removeChild(f.current),f.current=null}},[e,i,a,s,u])}function iy(e){const{manifest:t,origins:n}=ay(e);n.forEach(Nc),Oc(t),Ic(t)}function ay(e){const t=sy(e),n=new Set,r=new Set,i=new Set,a=new Set;for(const{url:o,mode:c}of t)switch(uy(c,o)){case"svg":r.add(o);break;case"lottie":i.add(o);break;case"spritesheet":a.add(o);break;case"image":n.add(o);break}const s={images:Array.from(n),svgs:Array.from(r),lotties:Array.from(i),sprites:Array.from(a)},u=oy(s);return{manifest:s,origins:u}}function sy(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 uy(e,t){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 r=new URL(t,document.baseURI).pathname.toLowerCase();if(r.endsWith(".svg"))return"svg";if(r.endsWith(".lottie")||r.endsWith(".zip")||r.endsWith(".json"))return r.endsWith(".json"),"lottie";if(/\.(png|webp|jpg|jpeg|gif|avi,ef)$/.test(r))return"image";if(/\.(mp4|webm|mov|m4v|ogg)$/.test(r))return"video"}catch(n){console.log("error in normalizeKind:",n)}return"unknown"}function oy(e){const t=new Set,n=r=>{if(r)try{const i=new URL(r,document.baseURI);t.add(`${i.protocol}//${i.host}`)}catch(i){console.log("error in uniqueOriginsFromManifest",i)}};return(e.images??[]).forEach(n),(e.svgs??[]).forEach(n),(e.lotties??[]).forEach(n),(e.sprites??[]).forEach(n),Array.from(t)}const ly=({children:e,appToken:t,agentId:n,appRoot:r})=>{var i=navigator.language;console.log("Brower language",i);const a=Zx(i),{appCurrentLang:s,handleSetContextCurrentLang:u}=Qx(Ur,a),o={appCurrentLang:s,setAppCurrentLang:u},c=Gx(),{contextCompanySettings:f,contextInitialConversationState:d}=ny({agentId:n,appToken:t,onFetched:c.setHasFetchedSettings});return iy(f.companySettings),ry(f.companySettings?.agent?.display?.CSSRules,{id:`${n}`,target:r},c.appInternalContext.hasFetchedSettings,c.setHasDisplayedCss),_.jsx(_.Fragment,{children:_.jsx(fd,{locale:s?.locale,messages:s?.translatedText,children:_.jsx(lc.Provider,{value:o,children:_.jsx(xc.Provider,{value:c,children:_.jsx(dn.Provider,{value:f,children:_.jsx(dc.Provider,{value:d,children:c.appInternalContext.hasDisplayedCSS&&e})})})})})})};var fn=(e=>(e.LAUNCHER="launcher",e.CHATBOX="chatbox",e))(fn||{});function cy({appToken:e,displayMode:t="launcher",agentId:n,appRoot:r}){e||console.warn("appToken not defined in ai-client. Please see the documentation at URL_ERROR_IN_DOC");const i=Wx(t);return console.log(`App boot in ${i} mode.`),_.jsx("div",{className:"chatSystemWidget app-root",id:"chatSystemWidget",children:_.jsx(ly,{appToken:e,agentId:n,appRoot:r,children:_.jsx(Vx,{displayMode:i,appToken:e})})})}const fy=`*, ::before, ::after {
171
+ `,children:[S.jsxs("div",{className:"relative bg-violet-700 py-2 text-white text-center flex justify-center items-center chatsystem-header",children:[S.jsx("span",{className:"font-medium",children:"Assistant"}),S.jsx(Qy,{setIsWidgetOpen:e.setIsWidgetOpen})]}),S.jsx(Tc,{appToken:e.appToken})]})),Zy=({isWidgetOpen:e,appToken:t,setIsWidgetOpen:n})=>{const r=N.useRef(null);return S.jsx("div",{children:S.jsx(Da,{nodeRef:r,in:e,timeout:200,classNames:"menuTransition",unmountOnExit:!0,children:S.jsx(Ky,{ref:r,props:{appToken:t,setIsWidgetOpen:n}})})})},Cc=()=>({hasFetchedSettings:!1,hasDisplayedCSS:!1}),Jy=()=>{const[e,t]=N.useState(Cc());return{appInternalContext:e,setAppInternalContext:t,setHasFetchedSettings:()=>{t(i=>({...i,hasFetchedSettings:!0}))},setHasDisplayedCss:()=>{t(i=>({...i,hasDisplayedCSS:!0}))}}},wc=N.createContext({appInternalContext:Cc(),setAppInternalContext:()=>{},setHasFetchedSettings:()=>{}}),ex=({displayMode:e,appToken:t})=>{const[n,r]=N.useState(!1),{appInternalContext:i}=N.useContext(wc);return S.jsxs(S.Fragment,{children:[e===hn.LAUNCHER&&i.hasFetchedSettings&&S.jsxs(S.Fragment,{children:[S.jsx(Wc,{isWidgetOpen:n,setIsWidgetOpen:r}),S.jsx(Zy,{isWidgetOpen:n,appToken:t,setIsWidgetOpen:r})]}),e===hn.CHATBOX&&i.hasFetchedSettings&&S.jsx("div",{className:"chatBox",children:S.jsx(Tc,{appToken:t})})]})},tx=e=>Object.values(hn).includes(e),nx=e=>{const t=gt();return tx(e)?e:(t.warn(`Display mode not valid. Using ${hn.LAUNCHER} as default.`),hn.LAUNCHER)},rx=(e,t)=>{let n,r;return typeof window<"u"&&(r=window.localStorage.getItem(hy)),r&&e?.[r]!==void 0?n=e[r]:(n=e[t],n.isDefault=!0),n},ix=(e,t)=>{const[n,r]=N.useState(e[t]),i=a=>{Object.keys(e).includes(a?.locale)?r(a):r(e[nt.ENGLISH])};return N.useEffect(()=>{let a=rx(e,t);a.locale!==t&&r(e[a.locale])},[]),{appCurrentLang:n,handleSetContextCurrentLang:i}},ax=e=>Object.values(nt).includes(e),sx=(e,t)=>{const n=t??gt();return ax(e)?e:(n.warn(`Language ${e} not handled for now. Using ${nt.ENGLISH}.`),nt.ENGLISH)};function ux(e,t=Date.now()){return t-e}function ox(e,t=Date.now()){return ux(new Date(e).getTime(),t)<=Iy}function lx({settings:e,setCurrentConversation:t,setArchivedConversation:n}){const r=Oy({key:bc});if(!r){t({discussionId:null,items:[{userType:"assistant",content:e.agent.text.initialText,temporaryId:crypto.randomUUID()}]});return}ox(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 cx=({agentId:e,appToken:t,onFetched:n})=>{const r=Wt(),[i,a]=N.useState({}),s={companySettings:i,setCompanySettings:a},[u,l]=N.useState({discussionId:null,items:[],updatedAt:null}),[c,f]=N.useState({discussionId:null,items:[],updatedAt:null}),d={currentConversation:u,setCurrentConversation:l,archivedConversation:c,setArchivedConversation:f};return N.useEffect(()=>{const m=Un.getApiUrl(),h=Un.getFetchConfig({httpVerb:"GET",contentType:"application/json"});let b=`${m}/company/settings/${t}`;b+=`/${e}`,fetch(b,{...h,credentials:"omit"}).then(async A=>{const _=await A.json();a(_),lx({settings:_,setCurrentConversation:l,setArchivedConversation:f}),n?.()}).catch(A=>{r.warn("error in settings fetch",A)})},[t,e,r]),{contextCompanySettings:s,contextInitialConversationState:d}};function fx(e,t={},n,r){const i=Wt(),{id:a,nonce:s,target:u,disableConstructable:l}=t,c=u,f=N.useRef(null),d=N.useRef(null);N.useEffect(()=>{if(!u)return;if(!e){n&&(i.log("No custom css found."),r?.());return}if(!l&&"adoptedStyleSheets"in c&&typeof CSSStyleSheet<"u"&&"replaceSync"in CSSStyleSheet.prototype)return f.current||(f.current=new CSSStyleSheet,c.adoptedStyleSheets=[...c.adoptedStyleSheets,f.current]),f.current.replaceSync(e),i.log("Loading custom css via stylesheet."),r?.(),()=>{const h=c.adoptedStyleSheets||[],b=h.indexOf(f.current);if(b>=0){const A=h.slice();A.splice(b,1),c.adoptedStyleSheets=A}f.current=null};if(!d.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),d.current=h}return d.current.textContent=e,i.log("Loading custom css via style tag."),r?.(),()=>{d.current?.parentNode?.removeChild(d.current),d.current=null}},[e,a,s,u,l,i])}function dx(e,t){const{manifest:n,origins:r}=hx(e,t);r.forEach(Bc),Hc(n),Mc(n)}function hx(e,t){const n=t??gt(),r=mx(e),i=new Set,a=new Set,s=new Set,u=new Set;for(const{url:f,mode:d}of r)switch(px(d,f,n)){case"svg":a.add(f);break;case"lottie":s.add(f);break;case"spritesheet":u.add(f);break;case"image":i.add(f);break}const l={images:Array.from(i),svgs:Array.from(a),lotties:Array.from(s),sprites:Array.from(u)},c=gx(l,n);return{manifest:l,origins:c}}function mx(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 px(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 gx(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 bx=({children:e,appToken:t,agentId:n,appRoot:r,logger:i})=>{var a=navigator.language;i.log("Brower language",a);const s=sx(a,i),{appCurrentLang:u,handleSetContextCurrentLang:l}=ix(zr,s),c={appCurrentLang:u,setAppCurrentLang:l},f=Jy(),{contextCompanySettings:d,contextInitialConversationState:m}=cx({agentId:n,appToken:t,onFetched:f.setHasFetchedSettings});return dx(d.companySettings,i),fx(d.companySettings?.agent?.display?.CSSRules,{id:`${n}`,target:r},f.appInternalContext.hasFetchedSettings,f.setHasDisplayedCss),S.jsx(S.Fragment,{children:S.jsx(Fu.Provider,{value:i,children:S.jsx(Td,{locale:u?.locale,messages:u?.translatedText,children:S.jsx(pc.Provider,{value:c,children:S.jsx(wc.Provider,{value:f,children:S.jsx(mn.Provider,{value:d,children:S.jsx(Ec.Provider,{value:m,children:f.appInternalContext.hasDisplayedCSS&&e})})})})})})})};var hn=(e=>(e.LAUNCHER="launcher",e.CHATBOX="chatbox",e))(hn||{});function Ex({appToken:e,displayMode:t="launcher",agentId:n,appRoot:r}){const i=Wt();e||i.warn("appToken not defined in ai-client. Please see the documentation at URL_ERROR_IN_DOC");const a=nx(t);return i.log(`App boot in ${a} mode.`),S.jsx("div",{className:"chatSystemWidget app-root",id:"chatSystemWidget",children:S.jsx(bx,{appToken:e,agentId:n,appRoot:r,logger:i,children:S.jsx(ex,{displayMode:a,appToken:e})})})}const Tx=`*, ::before, ::after {
159
172
  --tw-border-spacing-x: 0;
160
173
  --tw-border-spacing-y: 0;
161
174
  --tw-translate-x: 0;
@@ -1782,7 +1795,7 @@ video {
1782
1795
  border-radius: 0.75rem;
1783
1796
  }
1784
1797
  }
1785
- `,dy=`
1798
+ `,yx=`
1786
1799
  .chatBox {
1787
1800
  overflow-x: hidden; /* Hide horizontal scrollbar */
1788
1801
  overflow-wrap: anywhere;
@@ -1831,7 +1844,7 @@ video {
1831
1844
  }
1832
1845
 
1833
1846
 
1834
- `,hy=`/* React-Css Transitions */
1847
+ `,xx=`/* React-Css Transitions */
1835
1848
  .menuTransition-enter {
1836
1849
  opacity: 0;
1837
1850
  transform: scale(0.9) translateX(200px);
@@ -1894,7 +1907,7 @@ textarea::placeholder {
1894
1907
 
1895
1908
  .messagesContainer {
1896
1909
  outline:none
1897
- }`,my=`/* Core mic button */
1910
+ }`,Ax=`/* Core mic button */
1898
1911
  .mic-core {
1899
1912
  position: absolute;
1900
1913
  inset: 0;
@@ -1942,7 +1955,7 @@ textarea::placeholder {
1942
1955
  70% { opacity: 0.12; }
1943
1956
  100% { transform: scale(2.1); opacity: 0; }
1944
1957
  }
1945
- `,py=`/* 1) Remove UA outline on the shadow host */
1958
+ `,_x=`/* 1) Remove UA outline on the shadow host */
1946
1959
  :host(:focus),
1947
1960
  :host(:focus-visible) { outline: none; }
1948
1961
 
@@ -1954,9 +1967,9 @@ textarea::placeholder {
1954
1967
 
1955
1968
  /* Ensure the wrapper itself doesn't get a default outline either */
1956
1969
  .app-root:focus { outline: none; }
1957
- `,wu=`${fy}
1958
- ${dy}
1959
- ${hy}
1960
- ${py}
1961
- ${my}`;function gy({cssHref:e,appToken:t,agentId:n,displayMode:r,...i}){const a=r==="launcher"?"body":"inline",s=k.useRef(null),u=k.useRef(null),[o,c]=k.useState(null),[f,d]=k.useState(null);return k.useEffect(()=>{if(typeof document>"u")return;const h=a==="inline"?s.current:document.body;if(!h)return;const m=document.createElement("div");h.appendChild(m),u.current=m;const b=m.attachShadow({mode:"open",delegatesFocus:!0});d(b);let A=!1;try{if("adoptedStyleSheets"in b&&!e){const y=new CSSStyleSheet;y.replaceSync(wu),b.adoptedStyleSheets=[...b.adoptedStyleSheets??[],y],A=!0}}catch{}if(!A)if(e){const y=document.createElement("link");y.rel="stylesheet",y.href=e,b.appendChild(y)}else{const y=document.createElement("style");y.textContent=wu,b.appendChild(y)}const C=document.createElement("div");return b.appendChild(C),c(C),()=>{c(null),m.remove(),u.current=null}},[a,e]),_.jsxs(_.Fragment,{children:[a==="inline"&&_.jsx("div",{ref:s})," ",o&&Sn.createPortal(_.jsx(cy,{...i,appToken:t,agentId:n,displayMode:r,appRoot:f}),o)]})}exports.App=gy;
1970
+ `,Nu=`${Tx}
1971
+ ${yx}
1972
+ ${xx}
1973
+ ${_x}
1974
+ ${Ax}`;function Sx({cssHref:e,appToken:t,agentId:n,displayMode:r,shouldDisplayLogs:i,...a}){const s=r==="launcher"?"body":"inline",u=N.useRef(null),l=N.useRef(null),[c,f]=N.useState(null),[d,m]=N.useState(null),h=N.useMemo(()=>Rc(i),[i]);return Dc(h),N.useEffect(()=>{if(typeof document>"u")return;const b=s==="inline"?u.current:document.body;if(!b)return;const A=document.createElement("div");b.appendChild(A),l.current=A;const _=A.attachShadow({mode:"open",delegatesFocus:!0});m(_);let x=!1;try{if("adoptedStyleSheets"in _&&!e){const C=new CSSStyleSheet;C.replaceSync(Nu),_.adoptedStyleSheets=[..._.adoptedStyleSheets??[],C],x=!0}}catch{}if(!x)if(e){const C=document.createElement("link");C.rel="stylesheet",C.href=e,_.appendChild(C)}else{const C=document.createElement("style");C.textContent=Nu,_.appendChild(C)}const I=document.createElement("div");return _.appendChild(I),f(I),()=>{f(null),A.remove(),l.current=null}},[s,e]),S.jsxs(S.Fragment,{children:[s==="inline"&&S.jsx("div",{ref:u})," ",c&&wn.createPortal(S.jsx(Ex,{...a,appToken:t,agentId:n,displayMode:r,appRoot:d}),c)]})}exports.App=Sx;
1962
1975
  //# sourceMappingURL=index.cjs.map