@inploi/plugin-kin 3.1.0 → 4.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cdn/frame/assets/{highlighted-body-B3W2YXNL-3225cf48.js → highlighted-body-B3W2YXNL-658ad560.js} +1 -1
- package/cdn/frame/assets/{index-94d05bc4.js → index-fec8f8e3.js} +7 -7
- package/cdn/frame/assets/mermaid-3ZIDBTTL-a634ad0a.js +1 -0
- package/cdn/frame/index.html +1 -1
- package/cdn/index.js +1 -1
- package/dist/plugin-kin.cjs +1 -1
- package/dist/plugin-kin.js +17 -17
- package/package.json +4 -4
- package/cdn/frame/assets/mermaid-3ZIDBTTL-848de26a.js +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
var Jh=Object.defineProperty;var ef=(e,t,n)=>t in e?Jh(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var ge=(e,t,n)=>(ef(e,typeof t!="symbol"?t+"":t,n),n);(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const a of i)if(a.type==="childList")for(const s of a.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&r(s)}).observe(document,{childList:!0,subtree:!0});function n(i){const a={};return i.integrity&&(a.integrity=i.integrity),i.referrerPolicy&&(a.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?a.credentials="include":i.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function r(i){if(i.ep)return;i.ep=!0;const a=n(i);fetch(i.href,a)}})();var kr,G,Il,Nl,Xt,to,Ll,_a,Rl,_n={},Ol=[],tf=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,ki=Array.isArray;function Nt(e,t){for(var n in t)e[n]=t[n];return e}function Dl(e){var t=e.parentNode;t&&t.removeChild(e)}function _t(e,t,n){var r,i,a,s={};for(a in t)a=="key"?r=t[a]:a=="ref"?i=t[a]:s[a]=t[a];if(arguments.length>2&&(s.children=arguments.length>3?kr.call(arguments,2):n),typeof e=="function"&&e.defaultProps!=null)for(a in e.defaultProps)s[a]===void 0&&(s[a]=e.defaultProps[a]);return Xn(e,s,r,i,null)}function Xn(e,t,n,r,i){var a={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:i??++Il};return i==null&&G.vnode!=null&&G.vnode(a),a}function pe(e){return e.children}function Tt(e,t){this.props=e,this.context=t}function ti(e,t){if(t==null)return e.__?ti(e.__,e.__.__k.indexOf(e)+1):null;for(var n;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null)return n.__e;return typeof e.type=="function"?ti(e):null}function Pl(e){var t,n;if((e=e.__)!=null&&e.__c!=null){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null){e.__e=e.__c.base=n.__e;break}return Pl(e)}}function Ta(e){(!e.__d&&(e.__d=!0)&&Xt.push(e)&&!ni.__r++||to!==G.debounceRendering)&&((to=G.debounceRendering)||Ll)(ni)}function ni(){var e,t,n,r,i,a,s,o,u;for(Xt.sort(_a);e=Xt.shift();)e.__d&&(t=Xt.length,r=void 0,i=void 0,a=void 0,o=(s=(n=e).__v).__e,(u=n.__P)&&(r=[],i=[],(a=Nt({},s)).__v=s.__v+1,ns(u,s,a,n.__n,u.ownerSVGElement!==void 0,s.__h!=null?[o]:null,r,o??ti(s),s.__h,i),Hl(r,s,i),s.__e!=o&&Pl(s)),Xt.length>t&&Xt.sort(_a));ni.__r=0}function Ml(e,t,n,r,i,a,s,o,u,c,h){var d,f,p,g,k,C,w,A,x,L,P=0,v=r&&r.__k||Ol,V=v.length,O=V,Y=t.length;for(n.__k=[],d=0;d<Y;d++)(g=n.__k[d]=(g=t[d])==null||typeof g=="boolean"||typeof g=="function"?null:typeof g=="string"||typeof g=="number"||typeof g=="bigint"?Xn(null,g,null,null,g):ki(g)?Xn(pe,{children:g},null,null,null):g.__b>0?Xn(g.type,g.props,g.key,g.ref?g.ref:null,g.__v):g)!=null&&(g.__=n,g.__b=n.__b+1,(A=nf(g,v,w=d+P,O))===-1?p=_n:(p=v[A]||_n,v[A]=void 0,O--),ns(e,g,p,i,a,s,o,u,c,h),k=g.__e,(f=g.ref)&&p.ref!=f&&(p.ref&&rs(p.ref,null,g),h.push(f,g.__c||k,g)),k!=null&&(C==null&&(C=k),L=!(x=p===_n||p.__v===null)&&A===w,x?A==-1&&P--:A!==w&&(A===w+1?(P++,L=!0):A>w?O>Y-w?(P+=A-w,L=!0):P--:P=A<w&&A==w-1?A-w:0),w=d+P,L=L||A==d&&!x,typeof g.type!="function"||A===w&&p.__k!==g.__k?typeof g.type=="function"||L?g.__d!==void 0?(u=g.__d,g.__d=void 0):u=k.nextSibling:u=Fl(e,k,u):u=Bl(g,u,e),typeof n.type=="function"&&(n.__d=u)));for(n.__e=C,d=V;d--;)v[d]!=null&&(typeof n.type=="function"&&v[d].__e!=null&&v[d].__e==n.__d&&(n.__d=v[d].__e.nextSibling),Ul(v[d],v[d]))}function Bl(e,t,n){for(var r,i=e.__k,a=0;i&&a<i.length;a++)(r=i[a])&&(r.__=e,t=typeof r.type=="function"?Bl(r,t,n):Fl(n,r.__e,t));return t}function ri(e,t){return t=t||[],e==null||typeof e=="boolean"||(ki(e)?e.some(function(n){ri(n,t)}):t.push(e)),t}function Fl(e,t,n){return n==null||n.parentNode!==e?e.insertBefore(t,null):t==n&&t.parentNode!=null||e.insertBefore(t,n),t.nextSibling}function nf(e,t,n,r){var i=e.key,a=e.type,s=n-1,o=n+1,u=t[n];if(u===null||u&&i==u.key&&a===u.type)return n;if(r>(u!=null?1:0))for(;s>=0||o<t.length;){if(s>=0){if((u=t[s])&&i==u.key&&a===u.type)return s;s--}if(o<t.length){if((u=t[o])&&i==u.key&&a===u.type)return o;o++}}return-1}function rf(e,t,n,r,i){var a;for(a in n)a==="children"||a==="key"||a in t||ii(e,a,null,n[a],r);for(a in t)i&&typeof t[a]!="function"||a==="children"||a==="key"||a==="value"||a==="checked"||n[a]===t[a]||ii(e,a,t[a],n[a],r)}function no(e,t,n){t[0]==="-"?e.setProperty(t,n??""):e[t]=n==null?"":typeof n!="number"||tf.test(t)?n:n+"px"}function ii(e,t,n,r,i){var a;e:if(t==="style")if(typeof n=="string")e.style.cssText=n;else{if(typeof r=="string"&&(e.style.cssText=r=""),r)for(t in r)n&&t in n||no(e.style,t,"");if(n)for(t in n)r&&n[t]===r[t]||no(e.style,t,n[t])}else if(t[0]==="o"&&t[1]==="n")a=t!==(t=t.replace(/Capture$/,"")),t=t.toLowerCase()in e?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+a]=n,n?r||e.addEventListener(t,a?io:ro,a):e.removeEventListener(t,a?io:ro,a);else if(t!=="dangerouslySetInnerHTML"){if(i)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(t!=="width"&&t!=="height"&&t!=="href"&&t!=="list"&&t!=="form"&&t!=="tabIndex"&&t!=="download"&&t!=="rowSpan"&&t!=="colSpan"&&t in e)try{e[t]=n??"";break e}catch{}typeof n=="function"||(n==null||n===!1&&t[4]!=="-"?e.removeAttribute(t):e.setAttribute(t,n))}}function ro(e){return this.l[e.type+!1](G.event?G.event(e):e)}function io(e){return this.l[e.type+!0](G.event?G.event(e):e)}function ns(e,t,n,r,i,a,s,o,u,c){var h,d,f,p,g,k,C,w,A,x,L,P,v,V,O,Y=t.type;if(t.constructor!==void 0)return null;n.__h!=null&&(u=n.__h,o=t.__e=n.__e,t.__h=null,a=[o]),(h=G.__b)&&h(t);try{e:if(typeof Y=="function"){if(w=t.props,A=(h=Y.contextType)&&r[h.__c],x=h?A?A.props.value:h.__:r,n.__c?C=(d=t.__c=n.__c).__=d.__E:("prototype"in Y&&Y.prototype.render?t.__c=d=new Y(w,x):(t.__c=d=new Tt(w,x),d.constructor=Y,d.render=sf),A&&A.sub(d),d.props=w,d.state||(d.state={}),d.context=x,d.__n=r,f=d.__d=!0,d.__h=[],d._sb=[]),d.__s==null&&(d.__s=d.state),Y.getDerivedStateFromProps!=null&&(d.__s==d.state&&(d.__s=Nt({},d.__s)),Nt(d.__s,Y.getDerivedStateFromProps(w,d.__s))),p=d.props,g=d.state,d.__v=t,f)Y.getDerivedStateFromProps==null&&d.componentWillMount!=null&&d.componentWillMount(),d.componentDidMount!=null&&d.__h.push(d.componentDidMount);else{if(Y.getDerivedStateFromProps==null&&w!==p&&d.componentWillReceiveProps!=null&&d.componentWillReceiveProps(w,x),!d.__e&&(d.shouldComponentUpdate!=null&&d.shouldComponentUpdate(w,d.__s,x)===!1||t.__v===n.__v)){for(t.__v!==n.__v&&(d.props=w,d.state=d.__s,d.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.forEach(function(I){I&&(I.__=t)}),L=0;L<d._sb.length;L++)d.__h.push(d._sb[L]);d._sb=[],d.__h.length&&s.push(d);break e}d.componentWillUpdate!=null&&d.componentWillUpdate(w,d.__s,x),d.componentDidUpdate!=null&&d.__h.push(function(){d.componentDidUpdate(p,g,k)})}if(d.context=x,d.props=w,d.__P=e,d.__e=!1,P=G.__r,v=0,"prototype"in Y&&Y.prototype.render){for(d.state=d.__s,d.__d=!1,P&&P(t),h=d.render(d.props,d.state,d.context),V=0;V<d._sb.length;V++)d.__h.push(d._sb[V]);d._sb=[]}else do d.__d=!1,P&&P(t),h=d.render(d.props,d.state,d.context),d.state=d.__s;while(d.__d&&++v<25);d.state=d.__s,d.getChildContext!=null&&(r=Nt(Nt({},r),d.getChildContext())),f||d.getSnapshotBeforeUpdate==null||(k=d.getSnapshotBeforeUpdate(p,g)),Ml(e,ki(O=h!=null&&h.type===pe&&h.key==null?h.props.children:h)?O:[O],t,n,r,i,a,s,o,u,c),d.base=t.__e,t.__h=null,d.__h.length&&s.push(d),C&&(d.__E=d.__=null)}else a==null&&t.__v===n.__v?(t.__k=n.__k,t.__e=n.__e):t.__e=af(n.__e,t,n,r,i,a,s,u,c);(h=G.diffed)&&h(t)}catch(I){t.__v=null,(u||a!=null)&&(t.__e=o,t.__h=!!u,a[a.indexOf(o)]=null),G.__e(I,t,n)}}function Hl(e,t,n){for(var r=0;r<n.length;r++)rs(n[r],n[++r],n[++r]);G.__c&&G.__c(t,e),e.some(function(i){try{e=i.__h,i.__h=[],e.some(function(a){a.call(i)})}catch(a){G.__e(a,i.__v)}})}function af(e,t,n,r,i,a,s,o,u){var c,h,d,f=n.props,p=t.props,g=t.type,k=0;if(g==="svg"&&(i=!0),a!=null){for(;k<a.length;k++)if((c=a[k])&&"setAttribute"in c==!!g&&(g?c.localName===g:c.nodeType===3)){e=c,a[k]=null;break}}if(e==null){if(g===null)return document.createTextNode(p);e=i?document.createElementNS("http://www.w3.org/2000/svg",g):document.createElement(g,p.is&&p),a=null,o=!1}if(g===null)f===p||o&&e.data===p||(e.data=p);else{if(a=a&&kr.call(e.childNodes),h=(f=n.props||_n).dangerouslySetInnerHTML,d=p.dangerouslySetInnerHTML,!o){if(a!=null)for(f={},k=0;k<e.attributes.length;k++)f[e.attributes[k].name]=e.attributes[k].value;(d||h)&&(d&&(h&&d.__html==h.__html||d.__html===e.innerHTML)||(e.innerHTML=d&&d.__html||""))}if(rf(e,p,f,i,o),d)t.__k=[];else if(Ml(e,ki(k=t.props.children)?k:[k],t,n,r,i&&g!=="foreignObject",a,s,a?a[0]:n.__k&&ti(n,0),o,u),a!=null)for(k=a.length;k--;)a[k]!=null&&Dl(a[k]);o||("value"in p&&(k=p.value)!==void 0&&(k!==e.value||g==="progress"&&!k||g==="option"&&k!==f.value)&&ii(e,"value",k,f.value,!1),"checked"in p&&(k=p.checked)!==void 0&&k!==e.checked&&ii(e,"checked",k,f.checked,!1))}return e}function rs(e,t,n){try{typeof e=="function"?e(t):e.current=t}catch(r){G.__e(r,n)}}function Ul(e,t,n){var r,i;if(G.unmount&&G.unmount(e),(r=e.ref)&&(r.current&&r.current!==e.__e||rs(r,null,t)),(r=e.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(a){G.__e(a,t)}r.base=r.__P=null,e.__c=void 0}if(r=e.__k)for(i=0;i<r.length;i++)r[i]&&Ul(r[i],t,n||typeof e.type!="function");n||e.__e==null||Dl(e.__e),e.__=e.__e=e.__d=void 0}function sf(e,t,n){return this.constructor(e,n)}function ai(e,t,n){var r,i,a,s;G.__&&G.__(e,t),i=(r=typeof n=="function")?null:n&&n.__k||t.__k,a=[],s=[],ns(t,e=(!r&&n||t).__k=_t(pe,null,[e]),i||_n,_n,t.ownerSVGElement!==void 0,!r&&n?[n]:i?null:t.firstChild?kr.call(t.childNodes):null,a,!r&&n?n:i?i.__e:t.firstChild,r,s),Hl(a,e,s)}function zl(e,t,n){var r,i,a,s,o=Nt({},e.props);for(a in e.type&&e.type.defaultProps&&(s=e.type.defaultProps),t)a=="key"?r=t[a]:a=="ref"?i=t[a]:o[a]=t[a]===void 0&&s!==void 0?s[a]:t[a];return arguments.length>2&&(o.children=arguments.length>3?kr.call(arguments,2):n),Xn(e.type,o,r||e.key,i||e.ref,null)}function yi(e,t){var n={__c:t="__cC"+Rl++,__:e,Consumer:function(r,i){return r.children(i)},Provider:function(r){var i,a;return this.getChildContext||(i=[],(a={})[t]=this,this.getChildContext=function(){return a},this.shouldComponentUpdate=function(s){this.props.value!==s.value&&i.some(function(o){o.__e=!0,Ta(o)})},this.sub=function(s){i.push(s);var o=s.componentWillUnmount;s.componentWillUnmount=function(){i.splice(i.indexOf(s),1),o&&o.call(s)}}),r.children}};return n.Provider.__=n.Consumer.contextType=n}kr=Ol.slice,G={__e:function(e,t,n,r){for(var i,a,s;t=t.__;)if((i=t.__c)&&!i.__)try{if((a=i.constructor)&&a.getDerivedStateFromError!=null&&(i.setState(a.getDerivedStateFromError(e)),s=i.__d),i.componentDidCatch!=null&&(i.componentDidCatch(e,r||{}),s=i.__d),s)return i.__E=i}catch(o){e=o}throw e}},Il=0,Nl=function(e){return e!=null&&e.constructor===void 0},Tt.prototype.setState=function(e,t){var n;n=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=Nt({},this.state),typeof e=="function"&&(e=e(Nt({},n),this.props)),e&&Nt(n,e),e!=null&&this.__v&&(t&&this._sb.push(t),Ta(this))},Tt.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),Ta(this))},Tt.prototype.render=pe,Xt=[],Ll=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,_a=function(e,t){return e.__v.__b-t.__v.__b},ni.__r=0,Rl=0;function $l(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=$l(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function Wi(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=$l(e))&&(r&&(r+=" "),r+=t);return r}const ao=e=>typeof e=="boolean"?"".concat(e):e===0?"0":e,of=e=>{const t=function(){for(var i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];var o,u;return typeof(e==null||(o=e.hooks)===null||o===void 0?void 0:o["cx:done"])<"u"?e?.hooks["cx:done"](Wi(a)):typeof(e==null||(u=e.hooks)===null||u===void 0?void 0:u.onComplete)<"u"?e?.hooks.onComplete(Wi(a)):Wi(a)};return{compose:function(){for(var i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];return o=>{const u=Object.fromEntries(Object.entries(o||{}).filter(c=>{let[h]=c;return!["class","className"].includes(h)}));return t(a.map(c=>c(u)),o?.class,o?.className)}},cva:i=>a=>{var s;if(i?.variants==null)return t(i?.base,a?.class,a?.className);const{variants:o,defaultVariants:u}=i,c=Object.keys(o).map(f=>{const p=a?.[f],g=u?.[f],k=ao(p)||ao(g);return o[f][k]}),h={...u,...a&&Object.entries(a).reduce((f,p)=>{let[g,k]=p;return typeof k>"u"?f:{...f,[g]:k}},{})},d=i==null||(s=i.compoundVariants)===null||s===void 0?void 0:s.reduce((f,p)=>{let{class:g,className:k,...C}=p;return Object.entries(C).every(w=>{let[A,x]=w;const L=h[A];return Array.isArray(x)?x.includes(L):L===x})?[...f,g,k]:f},[]);return t(i?.base,c,d,a?.class,a?.className)},cx:t}},{compose:Ow,cva:xt,cx:si}=of();var zt,Ae,Gi,so,hr=0,Yl=[],Wr=[],oo=G.__b,uo=G.__r,lo=G.diffed,co=G.__c,ho=G.unmount;function vn(e,t){G.__h&&G.__h(Ae,e,hr||t),hr=0;var n=Ae.__H||(Ae.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({__V:Wr}),n.__[e]}function he(e){return hr=1,uf(jl,e)}function uf(e,t,n){var r=vn(zt++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):jl(void 0,t),function(o){var u=r.__N?r.__N[0]:r.__[0],c=r.t(u,o);u!==c&&(r.__N=[c,r.__[1]],r.__c.setState({}))}],r.__c=Ae,!Ae.u)){var i=function(o,u,c){if(!r.__c.__H)return!0;var h=r.__c.__H.__.filter(function(f){return f.__c});if(h.every(function(f){return!f.__N}))return!a||a.call(this,o,u,c);var d=!1;return h.forEach(function(f){if(f.__N){var p=f.__[0];f.__=f.__N,f.__N=void 0,p!==f.__[0]&&(d=!0)}}),!(!d&&r.__c.props===o)&&(!a||a.call(this,o,u,c))};Ae.u=!0;var a=Ae.shouldComponentUpdate,s=Ae.componentWillUpdate;Ae.componentWillUpdate=function(o,u,c){if(this.__e){var h=a;a=void 0,i(o,u,c),a=h}s&&s.call(this,o,u,c)},Ae.shouldComponentUpdate=i}return r.__N||r.__}function be(e,t){var n=vn(zt++,3);!G.__s&&is(n.__H,t)&&(n.__=e,n.i=t,Ae.__H.__h.push(n))}function lf(e,t){var n=vn(zt++,4);!G.__s&&is(n.__H,t)&&(n.__=e,n.i=t,Ae.__h.push(n))}function Ce(e){return hr=5,Re(function(){return{current:e}},[])}function Re(e,t){var n=vn(zt++,7);return is(n.__H,t)?(n.__V=e(),n.i=t,n.__h=e,n.__V):n.__}function Ge(e,t){return hr=8,Re(function(){return e},t)}function it(e){var t=Ae.context[e.__c],n=vn(zt++,9);return n.c=e,t?(n.__==null&&(n.__=!0,t.sub(Ae)),t.props.value):e.__}function cf(){var e=vn(zt++,11);if(!e.__){for(var t=Ae.__v;t!==null&&!t.__m&&t.__!==null;)t=t.__;var n=t.__m||(t.__m=[0,0]);e.__="P"+n[0]+"-"+n[1]++}return e.__}function df(){for(var e;e=Yl.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(Gr),e.__H.__h.forEach(ka),e.__H.__h=[]}catch(t){e.__H.__h=[],G.__e(t,e.__v)}}G.__b=function(e){Ae=null,oo&&oo(e)},G.__r=function(e){uo&&uo(e),zt=0;var t=(Ae=e.__c).__H;t&&(Gi===Ae?(t.__h=[],Ae.__h=[],t.__.forEach(function(n){n.__N&&(n.__=n.__N),n.__V=Wr,n.__N=n.i=void 0})):(t.__h.forEach(Gr),t.__h.forEach(ka),t.__h=[],zt=0)),Gi=Ae},G.diffed=function(e){lo&&lo(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(Yl.push(t)!==1&&so===G.requestAnimationFrame||((so=G.requestAnimationFrame)||hf)(df)),t.__H.__.forEach(function(n){n.i&&(n.__H=n.i),n.__V!==Wr&&(n.__=n.__V),n.i=void 0,n.__V=Wr})),Gi=Ae=null},G.__c=function(e,t){t.some(function(n){try{n.__h.forEach(Gr),n.__h=n.__h.filter(function(r){return!r.__||ka(r)})}catch(r){t.some(function(i){i.__h&&(i.__h=[])}),t=[],G.__e(r,n.__v)}}),co&&co(e,t)},G.unmount=function(e){ho&&ho(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach(function(r){try{Gr(r)}catch(i){t=i}}),n.__H=void 0,t&&G.__e(t,n.__v))};var fo=typeof requestAnimationFrame=="function";function hf(e){var t,n=function(){clearTimeout(r),fo&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);fo&&(t=requestAnimationFrame(n))}function Gr(e){var t=Ae,n=e.__c;typeof n=="function"&&(e.__c=void 0,n()),Ae=t}function ka(e){var t=Ae;e.__c=e.__(),Ae=t}function is(e,t){return!e||e.length!==t.length||t.some(function(n,r){return n!==e[r]})}function jl(e,t){return typeof t=="function"?t(e):t}var Vl=()=>typeof crypto<"u"&&typeof crypto.randomUUID=="function"?crypto.randomUUID():"10000000-1000-4000-8000-100000000000".replace(/[018]/g,e=>(+e^crypto.getRandomValues(new Uint8Array(1))[0]&15>>+e/4).toString(16)),ff=Symbol.for("preact-signals");function as(){if(Tn>1)Tn--;else{for(var e,t=!1;Zn!==void 0;){var n=Zn;for(Zn=void 0,ya++;n!==void 0;){var r=n.o;if(n.o=void 0,n.f&=-3,!(8&n.f)&&Wl(n))try{n.c()}catch(i){t||(e=i,t=!0)}n=r}}if(ya=0,Tn--,t)throw e}}var ke=void 0,Zn=void 0,Tn=0,ya=0,oi=0;function ql(e){if(ke!==void 0){var t=e.n;if(t===void 0||t.t!==ke)return t={i:0,S:e,p:ke.s,n:void 0,t:ke,e:void 0,x:void 0,r:t},ke.s!==void 0&&(ke.s.n=t),ke.s=t,e.n=t,32&ke.f&&e.S(t),t;if(t.i===-1)return t.i=0,t.n!==void 0&&(t.n.p=t.p,t.p!==void 0&&(t.p.n=t.n),t.p=ke.s,t.n=void 0,ke.s.n=t,ke.s=t),t}}function ze(e){this.v=e,this.i=0,this.n=void 0,this.t=void 0}ze.prototype.brand=ff;ze.prototype.h=function(){return!0};ze.prototype.S=function(e){this.t!==e&&e.e===void 0&&(e.x=this.t,this.t!==void 0&&(this.t.e=e),this.t=e)};ze.prototype.U=function(e){if(this.t!==void 0){var t=e.e,n=e.x;t!==void 0&&(t.x=n,e.e=void 0),n!==void 0&&(n.e=t,e.x=void 0),e===this.t&&(this.t=n)}};ze.prototype.subscribe=function(e){var t=this;return os(function(){var n=t.value,r=ke;ke=void 0;try{e(n)}finally{ke=r}})};ze.prototype.valueOf=function(){return this.value};ze.prototype.toString=function(){return this.value+""};ze.prototype.toJSON=function(){return this.value};ze.prototype.peek=function(){var e=ke;ke=void 0;try{return this.value}finally{ke=e}};Object.defineProperty(ze.prototype,"value",{get:function(){var e=ql(this);return e!==void 0&&(e.i=this.i),this.v},set:function(e){if(e!==this.v){if(ya>100)throw new Error("Cycle detected");this.v=e,this.i++,oi++,Tn++;try{for(var t=this.t;t!==void 0;t=t.x)t.t.N()}finally{as()}}}});function $e(e){return new ze(e)}function Wl(e){for(var t=e.s;t!==void 0;t=t.n)if(t.S.i!==t.i||!t.S.h()||t.S.i!==t.i)return!0;return!1}function Gl(e){for(var t=e.s;t!==void 0;t=t.n){var n=t.S.n;if(n!==void 0&&(t.r=n),t.S.n=t,t.i=-1,t.n===void 0){e.s=t;break}}}function Kl(e){for(var t=e.s,n=void 0;t!==void 0;){var r=t.p;t.i===-1?(t.S.U(t),r!==void 0&&(r.n=t.n),t.n!==void 0&&(t.n.p=r)):n=t,t.S.n=t.r,t.r!==void 0&&(t.r=void 0),t=r}e.s=n}function Sn(e){ze.call(this,void 0),this.x=e,this.s=void 0,this.g=oi-1,this.f=4}(Sn.prototype=new ze).h=function(){if(this.f&=-3,1&this.f)return!1;if((36&this.f)==32||(this.f&=-5,this.g===oi))return!0;if(this.g=oi,this.f|=1,this.i>0&&!Wl(this))return this.f&=-2,!0;var e=ke;try{Gl(this),ke=this;var t=this.x();(16&this.f||this.v!==t||this.i===0)&&(this.v=t,this.f&=-17,this.i++)}catch(n){this.v=n,this.f|=16,this.i++}return ke=e,Kl(this),this.f&=-2,!0};Sn.prototype.S=function(e){if(this.t===void 0){this.f|=36;for(var t=this.s;t!==void 0;t=t.n)t.S.S(t)}ze.prototype.S.call(this,e)};Sn.prototype.U=function(e){if(this.t!==void 0&&(ze.prototype.U.call(this,e),this.t===void 0)){this.f&=-33;for(var t=this.s;t!==void 0;t=t.n)t.S.U(t)}};Sn.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(var e=this.t;e!==void 0;e=e.x)e.t.N()}};Object.defineProperty(Sn.prototype,"value",{get:function(){if(1&this.f)throw new Error("Cycle detected");var e=ql(this);if(this.h(),e!==void 0&&(e.i=this.i),16&this.f)throw this.v;return this.v}});function pf(e){return new Sn(e)}function Ql(e){var t=e.u;if(e.u=void 0,typeof t=="function"){Tn++;var n=ke;ke=void 0;try{t()}catch(r){throw e.f&=-2,e.f|=8,ss(e),r}finally{ke=n,as()}}}function ss(e){for(var t=e.s;t!==void 0;t=t.n)t.S.U(t);e.x=void 0,e.s=void 0,Ql(e)}function mf(e){if(ke!==this)throw new Error("Out-of-order effect");Kl(this),ke=e,this.f&=-2,8&this.f&&ss(this),as()}function yr(e){this.x=e,this.u=void 0,this.s=void 0,this.o=void 0,this.f=32}yr.prototype.c=function(){var e=this.S();try{if(8&this.f||this.x===void 0)return;var t=this.x();typeof t=="function"&&(this.u=t)}finally{e()}};yr.prototype.S=function(){if(1&this.f)throw new Error("Cycle detected");this.f|=1,this.f&=-9,Ql(this),Gl(this),Tn++;var e=ke;return ke=this,mf.bind(this,e)};yr.prototype.N=function(){2&this.f||(this.f|=2,this.o=Zn,Zn=this)};yr.prototype.d=function(){this.f|=8,1&this.f||ss(this)};function os(e){var t=new yr(e);try{t.c()}catch(n){throw t.d(),n}return t.d.bind(t)}var Ki;function In(e,t){G[e]=t.bind(null,G[e]||function(){})}function ui(e){Ki&&Ki(),Ki=e&&e.S()}function Xl(e){var t=this,n=e.data,r=bf(n);r.value=n;var i=Re(function(){for(var a=t.__v;a=a.__;)if(a.__c){a.__c.__$f|=4;break}return t.__$u.c=function(){var s;!Nl(i.peek())&&((s=t.base)==null?void 0:s.nodeType)===3?t.base.data=i.peek():(t.__$f|=1,t.setState({}))},pf(function(){var s=r.value.value;return s===0?0:s===!0?"":s||""})},[]);return i.value}Xl.displayName="_st";Object.defineProperties(ze.prototype,{constructor:{configurable:!0,value:void 0},type:{configurable:!0,value:Xl},props:{configurable:!0,get:function(){return{data:this}}},__b:{configurable:!0,value:1}});In("__b",function(e,t){if(typeof t.type=="string"){var n,r=t.props;for(var i in r)if(i!=="children"){var a=r[i];a instanceof ze&&(n||(t.__np=n={}),n[i]=a,r[i]=a.peek())}}e(t)});In("__r",function(e,t){ui();var n,r=t.__c;r&&(r.__$f&=-2,(n=r.__$u)===void 0&&(r.__$u=n=function(i){var a;return os(function(){a=this}),a.c=function(){r.__$f|=1,r.setState({})},a}())),ui(n),e(t)});In("__e",function(e,t,n,r){ui(),e(t,n,r)});In("diffed",function(e,t){ui();var n;if(typeof t.type=="string"&&(n=t.__e)){var r=t.__np,i=t.props;if(r){var a=n.U;if(a)for(var s in a){var o=a[s];o!==void 0&&!(s in r)&&(o.d(),a[s]=void 0)}else n.U=a={};for(var u in r){var c=a[u],h=r[u];c===void 0?(c=gf(n,u,h,i),a[u]=c):c.o(h,i)}}}e(t)});function gf(e,t,n,r){var i=t in e&&e.ownerSVGElement===void 0,a=$e(n);return{o:function(s,o){a.value=s,r=o},d:os(function(){var s=a.value.value;r[t]!==s&&(r[t]=s,i?e[t]=s:s?e.setAttribute(t,s):e.removeAttribute(t))})}}In("unmount",function(e,t){if(typeof t.type=="string"){var n=t.__e;if(n){var r=n.U;if(r){n.U=void 0;for(var i in r){var a=r[i];a&&a.d()}}}}else{var s=t.__c;if(s){var o=s.__$u;o&&(s.__$u=void 0,o.d())}}e(t)});In("__h",function(e,t,n,r){(r<3||r===9)&&(t.__$f|=2),e(t,n,r)});Tt.prototype.shouldComponentUpdate=function(e,t){var n=this.__$u;if(!(n&&n.s!==void 0||4&this.__$f)||3&this.__$f)return!0;for(var r in t)return!0;for(var i in e)if(i!=="__source"&&e[i]!==this.props[i])return!0;for(var a in this.props)if(!(a in e))return!0;return!1};function bf(e){return Re(function(){return $e(e)},[])}const Zl=$e(!1),Jl=$e(!1),xi=$e(!1),wi=$e(null),rn=$e(null),ec=$e("idle"),tc=$e(!1),nc=$e("idle"),rc=$e(null),ic=$e(null),kt=$e([]),Nn=$e([]),Ef=e=>({...e,id:"id"in e?e.id:Vl(),timestamp:new Date(e.timestamp)}),Ai=e=>({...e,id:Vl(),timestamp:new Date});let xa=null,ac="",sc="",wa=0;const _f=({id:e,timestamp:t,...n})=>({...n,timestamp:t.toISOString()}),oc=e=>{xa&&(wa+=1,xa({...e,syncKey:ac,sourceInstanceId:sc,revision:wa}))},Ci=()=>{oc({type:"messages_updated",messages:kt.value.map(_f)})},uc=(e,t=!0)=>{kt.value=[...kt.value,e],Nn.value=[],t&&Ci()},Tf=e=>{const t=Ai(e);return uc(t),t},kf=e=>{kt.value=kt.value.filter(t=>t.id!==e),Ci()},yf=()=>{xi.value=!0,wi.value="thinking",rn.value=Ai({role:"assistant",content:""})},xf=e=>{if(!e)return;const t=rn.value;t&&(rn.value={...t,content:t.content+e})},xr=()=>{rn.value=null,xi.value=!1,wi.value=null},wf=e=>{const{commit:t=!0,sync:n=!0,blocks:r}=e??{},i=rn.value;if(xr(),t&&(i?.content||r?.length)){const a=i??Ai({role:"assistant",content:""});uc(r?.length?{...a,blocks:r}:a,!1)}n&&Ci()},lc=(e=!0)=>{kt.value=[],xr(),Nn.value=[],e&&oc({type:"messages_cleared"})},Af=(e,t=!0)=>{xr(),kt.value=e.filter(n=>n.role!=="system").map(Ai),Nn.value=[],t&&Ci()},cc=e=>{xa=e?.emit??null,ac=e?.syncKey??"",sc=e?.sourceInstanceId??"",wa=0},Cf=e=>{if(xr(),Nn.value=[],e.type==="messages_updated"){kt.value=e.messages.map(Ef);return}kt.value=[]},dc=$e(null),tn=$e({}),hc=$e(null),us=(e,t)=>{const n=tn.value[e]??{status:"loading"};tn.value={...tn.value,[e]:{...n,...t}}},vf=(e,t)=>{const n=tn.value[e];n&&us(e,{liveSummary:(n.liveSummary??"")+t})},Sf=(e,t)=>{const n=tn.value[e]?.liveSummary;us(e,{status:"ready",summary:t||n||"",liveSummary:void 0})},fc=(e,t,n)=>{nc.value=e,ic.value=t??null,rc.value=n??null},If=()=>{Zl.value=!1,Jl.value=!1,xi.value=!1,wi.value=null,rn.value=null,ec.value="idle",Nn.value=[],tc.value=!1,tn.value={},dc.value=null,hc.value=null,lc(!1),fc("idle"),cc(null)},F={isOpen:Zl,embedded:Jl,isStreaming:xi,assistantStatus:wi,liveAssistantMessage:rn,connectionState:ec,messages:kt,quickReplies:Nn,uploadState:nc,uploadError:rc,uploadFileName:ic,hasUnreadMessages:tc,jobDetails:tn,overlay:dc,requestJobDetail:hc,setJobDetail:us,appendJobSummaryChunk:vf,finalizeJobSummary:Sf,configureSync:cc,applySyncSnapshot:Cf,addMessage:Tf,removeMessage:kf,startAssistantResponse:yf,appendToLiveAssistantMessage:xf,finishAssistantResponse:wf,clearAssistantResponse:xr,clearMessages:lc,setMessages:Af,setUploadState:fc,resetState:If},yt=xt({base:"fr inline-flex shrink-0 items-center corner-smooth justify-center no-underline transition-all ease-kin-click disabled:cursor-not-allowed",variants:{variant:{ghost:"bg-transparent text-n-9 hover:bg-n-3 hover:text-n-11 disabled:text-n-6 active:scale-95",neutral:"bg-n-3 text-n-10 hover:bg-n-4 hover:text-n-11 disabled:opacity-50 active:scale-95",accent:"bg-a-9 text-white hover:bg-a-10 disabled:opacity-50 active:scale-95"},size:{iconSm:"size-8 sm:size-7 [&_svg]:size-3.5 rounded-kin-xl",iconMd:"size-10 sm:size-8 [&_svg]:size-4 rounded-kin-2xl sm:rounded-kin-xl",iconLg:"size-12 [&_svg]:size-6 rounded-kin-3xl",sm:"px-2.5 py-2 text-xs font-medium rounded-kin-md",md:"px-4 py-2 text-sm font-medium rounded-kin-lg"}},defaultVariants:{size:"iconMd"}});var Nf=0;function m(e,t,n,r,i,a){var s,o,u={};for(o in t)o=="ref"?s=t[o]:u[o]=t[o];var c={type:e,props:u,key:n,ref:s,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:--Nf,__source:i,__self:a};if(typeof e=="function"&&(s=e.defaultProps))for(o in s)u[o]===void 0&&(u[o]=s[o]);return G.vnode&&G.vnode(c),c}function Ye(e){return function(n){return m("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:n.strokeWidth??1.5,strokeLinecap:"round",strokeLinejoin:"round",focusable:"false","aria-hidden":"true",...n,children:e()})}}function Lf({class:e}){return m("svg",{class:e,viewBox:"0 0 32 16",fill:"currentColor","aria-hidden":"true",focusable:"false",children:m("path",{d:"M8.28 12.54c-.76-.34-1.52-1.08-2.88-2.44l-2.02-2.02-.68-.68-.12-.16a.76.76 90 010-.72l.12-.16.68-.68A16.5 16.5 90 015.9 3.36a4.5 4.5 90 014.62 0c.44.26.94.72 2.5 2.32l1.1 1.1 1.54-1.54-1.1-1.1c-1.48-1.44-2.22-2.18-2.98-2.62a6.76 6.76 90 00-6.82 0c-.74.42-1.46 1.16-2.94 2.6-.64.64-.92.94-1.14 1.28a3 3 90 000 2.92c.2.34.52.64 1.14 1.28L4.3 12.1c1.1 1.08 1.64 1.62 2.26 2.02a6 6 90 001.76.72c.72.18 1.5.18 3.04.18h10.9c1.54 0 2.32 0 3.04-.18q.92-.22 1.76-.72c.64-.4 1.16-.94 2.26-2.02l.46-.48c5.8-5.8-2.88-14.48-8.66-8.66L13.98 10.1c-1.52 1.5-2.28 2.28-3.16 2.56a3.76 3.76 90 01-2.16.02l-.4-.16Z"})})}const Rf=Ye(()=>m("path",{d:"M6 10c2-4 3.5-7 6-7s4 3 6 7 4 8 2 9-6-2.5-8-2.5S6 20 4 19s0-5 2-9"})),ls=Ye(()=>m("path",{d:"M18 6 6 18M18 18 6 6"})),Of=Ye(()=>m(pe,{children:[m("path",{d:"M3 6H21"}),m("path",{d:"M4.5 6C5.5 22 6 22 12 22s6.5 0 7.5-16"}),m("path",{d:"M8 6c1-4 1-4 4-4s3 0 4 4"})]})),Df=Ye(()=>m("path",{d:"M5 14s1.5.5 3.5 4C8.5 18 12 11 19 7"})),pc=Ye(()=>m("path",{d:"m15 7-6.5 6.5c-.4.4-.6.9-.6 1.5s.2 1.1.6 1.5.9.6 1.5.6 1.1-.2 1.5-.6L18 10c.8-.8 1.2-1.9 1.2-3s-.4-2.2-1.2-3-1.9-1.2-3-1.2-2.2.4-3 1.2l-6.5 6.5c-1.2 1.2-1.9 2.8-1.9 4.5s.7 3.3 1.9 4.5 2.8 1.9 4.5 1.9 3.3-.7 4.5-1.9L21 13"})),Pf=Ye(()=>m("path",{d:"M21 12a9 9 0 11-6.219-8.56"})),Aa=Ye(()=>m(pe,{children:[m("path",{d:"M9.5 7c.5-1.5 1.5-1.5 2 0 1 3 2.5 4.5 5.5 5.5 1.5.5 1.5 1.5 0 2-3 1-4.5 2.5-5.5 5.5-.5 1.5-1.5 1.5-2 0-1-3-2.5-4.5-5.5-5.5-1.5-.5-1.5-1.5 0-2C7 11.5 8.5 10 9.5 7Z"}),m("path",{d:"M17 2V6"}),m("path",{d:"M21 8V10"}),m("path",{d:"M15 4H19"}),m("path",{d:"M20 9H22"})]})),Mf=Ye(()=>m(pe,{children:[m("circle",{cx:"10",cy:"10",r:"7"}),m("path",{d:"M17.5 17.5L15 15"}),m("path",{d:"M17.5 19.6c-.7-.7-.7-1.4 0-2.1s1.4-.7 2.1 0l1.4 1.4c.7.7.7 1.4 0 2.1-.7.7-1.4.7-2.1 0l-1.4-1.4Z"})]})),po=Ye(()=>m(pe,{children:[m("path",{d:"M8 6c1-3.5 1-3.5 4-3.5s3 0 4 3.5"}),m("path",{d:"M12 20.5s-2.5 0-5 0-4-1.5-4-4S3 10 3 10C3 7.5 4.5 6 7 6s7.5 0 10 0 4 1.5 4 4v3.5"}),m("circle",{cx:"18",cy:"19",r:"3"}),m("path",{d:"M22 23l-1.8-1.8"}),m("path",{d:"M7 11s2 .5 5 .5 5-.5 5-.5"})]})),mo=Ye(()=>m(pe,{children:[m("path",{d:"M16 4h1.5c2 0 2.5.5 2.5 2.5V8"}),m("path",{d:"M20 16v1.5c0 2-.5 2.5-2.5 2.5H16"}),m("path",{d:"M8 12H16"}),m("path",{d:"M8 9H14"}),m("path",{d:"M8 15H12"}),m("path",{d:"M8 4H6.5C4.5 4 4 4.5 4 6.5V8"}),m("path",{d:"M4 16v1.5c0 2 .5 2.5 2.5 2.5H8"})]})),Bf=Ye(()=>m(pe,{children:[m("path",{d:"M5 14v6"}),m("path",{d:"M5 4v7"}),m("path",{d:"M9 8h6"}),m("path",{d:"M2 14H8"}),m("path",{d:"M16 12h6"}),m("path",{d:"M12 8V4"}),m("path",{d:"M12 11v9"}),m("path",{d:"M19 4v8"}),m("path",{d:"M19 15v5"})]})),Ff=Ye(()=>m("path",{d:"M13 3H11C6.5 3 5 4.5 5 9V20c0 1 1 1.5 2 1l4-2c1-.5 1-.5 2 0l4 2c1 .5 2 0 2-1V9c0-4.5-1.5-6-6-6Z"})),go=Ye(()=>m(pe,{children:[m("path",{d:"M20.4 6.6 13 14 9 15l1-4 7.4-7.4c.4-.4.9-.6 1.5-.6.6 0 1.1.2 1.5.6s.6.9.6 1.5-.2 1.1-.6 1.5Z"}),m("path",{d:"M16 5L19 8"}),m("path",{d:"M9 6H7C4.5 6 3 7.5 3 10v7c0 2.5 1.5 4 4 4h7c2.5 0 4-1.5 4-4V15"})]})),mc=Ye(()=>m("path",{d:"M6 10s3.5 6 6 6 6-6 6-6"})),Hf=Ye(()=>m(pe,{children:[m("path",{d:"M4 11c0-4 3-8 8-8s8 4 8 8c0 5-5 9-5 9-2.5 2-3.5 2-6 0 0 0-5-4-5-9Z"}),m("circle",{cx:"12",cy:"11",r:"3"})]})),Uf=Ye(()=>m(pe,{children:[m("path",{d:"M18.5 5.5H5.5C3 5.5 2 6.5 2 9v6c0 2.5 1 3.5 3.5 3.5h13c2.5 0 3.5-1 3.5-3.5V9c0-2.5-1-3.5-3.5-3.5Z"}),m("path",{d:"M18 12H18.01"}),m("path",{d:"M6 12H6.01"}),m("circle",{cx:"12",cy:"12",r:"3"})]})),zf=Ye(()=>m(pe,{children:[m("path",{d:"M12 12L15 14"}),m("path",{d:"M12 7V12"}),m("path",{d:"M12 3C7 3 3 7 3 12s4 9 9 9c3.1 0 5.9-1.6 7.5-4"}),m("path",{d:"M12 3c5 0 9 4 9 9 0 1.9-.6 3.6-1.5 5","stroke-dasharray":"0.01 2.75"})]})),$f="modulepreload",Yf=function(e,t){return new URL(e,t).href},bo={},gc=function(t,n,r){if(!n||n.length===0)return t();const i=document.getElementsByTagName("link");return Promise.all(n.map(a=>{if(a=Yf(a,r),a in bo)return;bo[a]=!0;const s=a.endsWith(".css"),o=s?'[rel="stylesheet"]':"";if(!!r)for(let h=i.length-1;h>=0;h--){const d=i[h];if(d.href===a&&(!s||d.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${a}"]${o}`))return;const c=document.createElement("link");if(c.rel=s?"stylesheet":$f,s||(c.as="script",c.crossOrigin=""),c.href=a,document.head.appendChild(c),s)return new Promise((h,d)=>{c.addEventListener("load",h),c.addEventListener("error",()=>d(new Error(`Unable to preload CSS for ${a}`)))})})).then(()=>t()).catch(a=>{const s=new Event("vite:preloadError",{cancelable:!0});if(s.payload=a,window.dispatchEvent(s),!s.defaultPrevented)throw a})};function jf(e,t){for(var n in t)e[n]=t[n];return e}function Ca(e,t){for(var n in e)if(n!=="__source"&&!(n in t))return!0;for(var r in t)if(r!=="__source"&&e[r]!==t[r])return!0;return!1}function Eo(e){this.props=e}function _e(e,t){function n(i){var a=this.props.ref,s=a==i.ref;return!s&&a&&(a.call?a(null):a.current=null),t?!t(this.props,i)||!s:Ca(this.props,i)}function r(i){return this.shouldComponentUpdate=n,_t(e,i)}return r.displayName="Memo("+(e.displayName||e.name)+")",r.prototype.isReactComponent=!0,r.__f=!0,r}(Eo.prototype=new Tt).isPureReactComponent=!0,Eo.prototype.shouldComponentUpdate=function(e,t){return Ca(this.props,e)||Ca(this.state,t)};var _o=G.__b;G.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),_o&&_o(e)};var Vf=G.__e;G.__e=function(e,t,n,r){if(e.then){for(var i,a=t;a=a.__;)if((i=a.__c)&&i.__c)return t.__e==null&&(t.__e=n.__e,t.__k=n.__k),i.__c(e,t)}Vf(e,t,n,r)};var To=G.unmount;function bc(e,t,n){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach(function(r){typeof r.__c=="function"&&r.__c()}),e.__c.__H=null),(e=jf({},e)).__c!=null&&(e.__c.__P===n&&(e.__c.__P=t),e.__c=null),e.__k=e.__k&&e.__k.map(function(r){return bc(r,t,n)})),e}function Ec(e,t,n){return e&&(e.__v=null,e.__k=e.__k&&e.__k.map(function(r){return Ec(r,t,n)}),e.__c&&e.__c.__P===t&&(e.__e&&n.insertBefore(e.__e,e.__d),e.__c.__e=!0,e.__c.__P=n)),e}function Jn(){this.__u=0,this.t=null,this.__b=null}function _c(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function Tc(e){var t,n,r;function i(a){if(t||(t=e()).then(function(s){n=s.default||s},function(s){r=s}),r)throw r;if(!n)throw t;return _t(n,a)}return i.displayName="Lazy",i.__f=!0,i}function Or(){this.u=null,this.o=null}G.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&e.__h===!0&&(e.type=null),To&&To(e)},(Jn.prototype=new Tt).__c=function(e,t){var n=t.__c,r=this;r.t==null&&(r.t=[]),r.t.push(n);var i=_c(r.__v),a=!1,s=function(){a||(a=!0,n.__R=null,i?i(o):o())};n.__R=s;var o=function(){if(!--r.__u){if(r.state.__a){var c=r.state.__a;r.__v.__k[0]=Ec(c,c.__c.__P,c.__c.__O)}var h;for(r.setState({__a:r.__b=null});h=r.t.pop();)h.forceUpdate()}},u=t.__h===!0;r.__u++||u||r.setState({__a:r.__b=r.__v.__k[0]}),e.then(s,s)},Jn.prototype.componentWillUnmount=function(){this.t=[]},Jn.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),r=this.__v.__k[0].__c;this.__v.__k[0]=bc(this.__b,n,r.__O=r.__P)}this.__b=null}var i=t.__a&&_t(pe,null,e.fallback);return i&&(i.__h=null),[_t(pe,null,t.__a?null:e.children),i]};var ko=function(e,t,n){if(++n[1]===n[0]&&e.o.delete(t),e.props.revealOrder&&(e.props.revealOrder[0]!=="t"||!e.o.size))for(n=e.u;n;){for(;n.length>3;)n.pop()();if(n[1]<n[0])break;e.u=n=n[2]}};function qf(e){return this.getChildContext=function(){return e.context},e.children}function Wf(e){var t=this,n=e.i;t.componentWillUnmount=function(){ai(null,t.l),t.l=null,t.i=null},t.i&&t.i!==n&&t.componentWillUnmount(),e.__v?(t.l||(t.i=n,t.l={nodeType:1,parentNode:n,childNodes:[],appendChild:function(r){this.childNodes.push(r),t.i.appendChild(r)},insertBefore:function(r,i){this.childNodes.push(r),t.i.appendChild(r)},removeChild:function(r){this.childNodes.splice(this.childNodes.indexOf(r)>>>1,1),t.i.removeChild(r)}}),ai(_t(qf,{context:t.context},e.__v),t.l)):t.l&&t.componentWillUnmount()}function kc(e,t){var n=_t(Wf,{__v:e,i:t});return n.containerInfo=t,n}(Or.prototype=new Tt).__a=function(e){var t=this,n=_c(t.__v),r=t.o.get(e);return r[0]++,function(i){var a=function(){t.props.revealOrder?(r.push(i),ko(t,e,r)):i()};n?n(a):a()}},Or.prototype.render=function(e){this.u=null,this.o=new Map;var t=ri(e.children);e.revealOrder&&e.revealOrder[0]==="b"&&t.reverse();for(var n=t.length;n--;)this.o.set(t[n],this.u=[1,0,this.u]);return e.children},Or.prototype.componentDidUpdate=Or.prototype.componentDidMount=function(){var e=this;this.o.forEach(function(t,n){ko(e,n,t)})};var yc=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,Gf=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,Kf=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,Qf=/[A-Z0-9]/g,Xf=typeof document<"u",Zf=function(e){return(typeof Symbol<"u"&&typeof Symbol()=="symbol"?/fil|che|rad/:/fil|che|ra/).test(e)};Tt.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(e){Object.defineProperty(Tt.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})});var yo=G.event;function Jf(){}function ep(){return this.cancelBubble}function tp(){return this.defaultPrevented}G.event=function(e){return yo&&(e=yo(e)),e.persist=Jf,e.isPropagationStopped=ep,e.isDefaultPrevented=tp,e.nativeEvent=e};var np={enumerable:!1,configurable:!0,get:function(){return this.class}},xo=G.vnode;G.vnode=function(e){typeof e.type=="string"&&function(t){var n=t.props,r=t.type,i={};for(var a in n){var s=n[a];if(!(a==="value"&&"defaultValue"in n&&s==null||Xf&&a==="children"&&r==="noscript"||a==="class"||a==="className")){var o=a.toLowerCase();a==="defaultValue"&&"value"in n&&n.value==null?a="value":a==="download"&&s===!0?s="":o==="ondoubleclick"?a="ondblclick":o!=="onchange"||r!=="input"&&r!=="textarea"||Zf(n.type)?o==="onfocus"?a="onfocusin":o==="onblur"?a="onfocusout":Kf.test(a)?a=o:r.indexOf("-")===-1&&Gf.test(a)?a=a.replace(Qf,"-$&").toLowerCase():s===null&&(s=void 0):o=a="oninput",o==="oninput"&&i[a=o]&&(a="oninputCapture"),i[a]=s}}r=="select"&&i.multiple&&Array.isArray(i.value)&&(i.value=ri(n.children).forEach(function(u){u.props.selected=i.value.indexOf(u.props.value)!=-1})),r=="select"&&i.defaultValue!=null&&(i.value=ri(n.children).forEach(function(u){u.props.selected=i.multiple?i.defaultValue.indexOf(u.props.value)!=-1:i.defaultValue==u.props.value})),n.class&&!n.className?(i.class=n.class,Object.defineProperty(i,"className",np)):(n.className&&!n.class||n.class&&n.className)&&(i.class=i.className=n.className),t.props=i}(e),e.$$typeof=yc,xo&&xo(e)};var wo=G.__r;G.__r=function(e){wo&&wo(e),e.__c};var Ao=G.diffed;G.diffed=function(e){Ao&&Ao(e);var t=e.props,n=e.__e;n!=null&&e.type==="textarea"&&"value"in t&&t.value!==n.value&&(n.value=t.value==null?"":t.value)};function Ht(e){return!!e&&e.$$typeof===yc}function rp(e){return Ht(e)?zl.apply(null,arguments):e}function ip(e){e()}function ap(){return[!1,ip]}const vi=function(e){if(e==null)return lp;if(typeof e=="function")return Si(e);if(typeof e=="object")return Array.isArray(e)?sp(e):op(e);if(typeof e=="string")return up(e);throw new Error("Expected function, string, or object as test")};function sp(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=vi(e[n]);return Si(r);function r(...i){let a=-1;for(;++a<t.length;)if(t[a].apply(this,i))return!0;return!1}}function op(e){const t=e;return Si(n);function n(r){const i=r;let a;for(a in e)if(i[a]!==t[a])return!1;return!0}}function up(e){return Si(t);function t(n){return n&&n.type===e}}function Si(e){return t;function t(n,r,i){return!!(cp(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function lp(){return!0}function cp(e){return e!==null&&typeof e=="object"&&"type"in e}const xc=[],Wn=!0,va=!1,bn="skip";function cs(e,t,n,r){let i;typeof t=="function"&&typeof n!="function"?(r=n,n=t):i=t;const a=vi(i),s=r?-1:1;o(e,void 0,[])();function o(u,c,h){const d=u&&typeof u=="object"?u:{};if(typeof d.type=="string"){const p=typeof d.tagName=="string"?d.tagName:typeof d.name=="string"?d.name:void 0;Object.defineProperty(f,"name",{value:"node ("+(u.type+(p?"<"+p+">":""))+")"})}return f;function f(){let p=xc,g,k,C;if((!t||a(u,c,h[h.length-1]||void 0))&&(p=dp(n(u,h)),p[0]===va))return p;if("children"in u&&u.children){const w=u;if(w.children&&p[0]!==bn)for(k=(r?w.children.length:-1)+s,C=h.concat(w);k>-1&&k<w.children.length;){const A=w.children[k];if(g=o(A,k,C)(),g[0]===va)return g;k=typeof g[1]=="number"?g[1]:k+s}}return p}}}function dp(e){return Array.isArray(e)?e:typeof e=="number"?[Wn,e]:e==null?xc:[e]}function $t(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),cs(e,a,o,i);function o(u,c){const h=c[c.length-1],d=h?h.children.indexOf(u):void 0;return s(u,d,h)}}const wn={indicator:"indicator",textOnly:"text-only",remove:"remove"};function hp({defaultOrigin:e="",allowedLinkPrefixes:t=[],allowedImagePrefixes:n=[],allowDataImages:r=!1,allowedProtocols:i=[],blockedImageClass:a="inline-block bg-gray-200 dark:bg-gray-700 text-gray-600 dark:text-gray-400 px-3 py-1 rounded text-sm",blockedLinkClass:s="text-gray-500",linkBlockPolicy:o=wn.indicator,imageBlockPolicy:u=wn.indicator}){const c=t.length&&!t.every(d=>d==="*"),h=n.length&&!n.every(d=>d==="*");if(!e&&(c||h))throw new Error("defaultOrigin is required when allowedLinkPrefixes or allowedImagePrefixes are provided");return d=>{const f=Ep(e,t,n,r,i,a,s,o,u);wc(d),$t(d,f)}}function Co(e,t){if(typeof e!="string")return null;try{return new URL(e)}catch{if(t)try{return new URL(e,t)}catch{return null}if(e.startsWith("/")||e.startsWith("./")||e.startsWith("../"))try{return new URL(e,"http://example.com")}catch{return null}return null}}function fp(e){return typeof e!="string"?!1:e.startsWith("/")||e.startsWith("./")||e.startsWith("../")}const pp=new Set(["https:","http:","irc:","ircs:","mailto:","xmpp:","blob:"]),mp=new Set(["javascript:","data:","file:","vbscript:"]);function vo(e,t,n,r=!1,i=!1,a=[]){if(!e)return null;if(typeof e=="string"&&e.startsWith("#")&&!i)try{if(new URL(e,"http://example.com").hash===e)return e}catch{}if(typeof e=="string"&&e.startsWith("data:"))return i&&r&&e.startsWith("data:image/")?e:null;if(typeof e=="string"&&e.startsWith("blob:")){try{if(new URL(e).protocol==="blob:"&&e.length>5){const h=e.substring(5);if(h&&h.length>0&&h!=="invalid")return e}}catch{return null}return null}const s=Co(e,n);if(!s||mp.has(s.protocol)||!(pp.has(s.protocol)||a.includes(s.protocol)||a.includes("*")))return null;if(s.protocol==="mailto:"||!s.protocol.match(/^https?:$/))return s.href;const u=fp(e);return s&&t.some(c=>{const h=Co(c,n);return!h||h.origin!==s.origin?!1:s.href.startsWith(h.href)})?u?s.pathname+s.search+s.hash:s.href:t.includes("*")?s.protocol!=="https:"&&s.protocol!=="http:"?null:u?s.pathname+s.search+s.hash:s.href:null}function wc(e){if("children"in e&&Array.isArray(e.children)){e.children=e.children.filter(t=>t!=null);for(const t of e.children)wc(t)}}const Qi=Symbol("node-seen");function gp(e,t,n){return t===wn.remove?{type:"remove"}:t===wn.textOnly?{type:"replace",element:{type:"element",tagName:"span",properties:{},children:[...e.children]}}:{type:"replace",element:{type:"element",tagName:"span",properties:{title:"Blocked URL: "+String(e.properties.href),class:n},children:[...e.children,{type:"text",value:" [blocked]"}]}}}function bp(e,t,n){if(t===wn.remove)return{type:"remove"};if(t===wn.textOnly){const r=String(e.properties.alt||"");return r?{type:"replace",element:{type:"element",tagName:"span",properties:{},children:[{type:"text",value:r}]}}:{type:"remove"}}return{type:"replace",element:{type:"element",tagName:"span",properties:{class:n},children:[{type:"text",value:"[Image blocked: "+String(e.properties.alt||"No description")+"]"}]}}}const Ep=(e,t,n,r,i,a,s,o,u)=>{const c=(h,d,f)=>{if(h.type!=="element"||h[Qi])return Wn;if(h.tagName==="a"){const p=vo(h.properties.href,t,e,!1,!1,i);if(p===null){if(h[Qi]=!0,$t(h,c),f&&typeof d=="number"){const g=gp(h,o,s);if(g.type==="remove")return f.children.splice(d,1),[bn,d];f.children[d]=g.element}return bn}else return h.properties.href=p,h.properties.target="_blank",h.properties.rel="noopener noreferrer",Wn}if(h.tagName==="img"){const p=vo(h.properties.src,n,e,r,!0,i);if(p===null){if(h[Qi]=!0,$t(h,c),f&&typeof d=="number"){const g=bp(h,u,a);if(g.type==="remove")return f.children.splice(d,1),[bn,d];f.children[d]=g.element}return bn}else return h.properties.src=p,Wn}return Wn};return c},Ac=-1,Ii=0,er=1,li=2,ds=3,hs=4,fs=5,ps=6,Cc=7,vc=8,So=typeof self=="object"?self:globalThis,_p=(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 Ii:case Ac:return n(s,i);case er:{const o=n([],i);for(const u of s)o.push(r(u));return o}case li:{const o=n({},i);for(const[u,c]of s)o[r(u)]=r(c);return o}case ds:return n(new Date(s),i);case hs:{const{source:o,flags:u}=s;return n(new RegExp(o,u),i)}case fs:{const o=n(new Map,i);for(const[u,c]of s)o.set(r(u),r(c));return o}case ps:{const o=n(new Set,i);for(const u of s)o.add(r(u));return o}case Cc:{const{name:o,message:u}=s;return n(new So[o](u),i)}case vc:return n(BigInt(s),i);case"BigInt":return n(Object(BigInt(s)),i);case"ArrayBuffer":return n(new Uint8Array(s).buffer,s);case"DataView":{const{buffer:o}=new Uint8Array(s);return n(new DataView(o),s)}}return n(new So[a](s),i)};return r},Io=e=>_p(new Map,e)(0),mn="",{toString:Tp}={},{keys:kp}=Object,Un=e=>{const t=typeof e;if(t!=="object"||!e)return[Ii,t];const n=Tp.call(e).slice(8,-1);switch(n){case"Array":return[er,mn];case"Object":return[li,mn];case"Date":return[ds,mn];case"RegExp":return[hs,mn];case"Map":return[fs,mn];case"Set":return[ps,mn];case"DataView":return[er,n]}return n.includes("Array")?[er,n]:n.includes("Error")?[Cc,n]:[li,n]},Dr=([e,t])=>e===Ii&&(t==="function"||t==="symbol"),yp=(e,t,n,r)=>{const i=(s,o)=>{const u=r.push(s)-1;return n.set(o,u),u},a=s=>{if(n.has(s))return n.get(s);let[o,u]=Un(s);switch(o){case Ii:{let h=s;switch(u){case"bigint":o=vc,h=s.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+u);h=null;break;case"undefined":return i([Ac],s)}return i([o,h],s)}case er:{if(u){let f=s;return u==="DataView"?f=new Uint8Array(s.buffer):u==="ArrayBuffer"&&(f=new Uint8Array(s)),i([u,[...f]],s)}const h=[],d=i([o,h],s);for(const f of s)h.push(a(f));return d}case li:{if(u)switch(u){case"BigInt":return i([u,s.toString()],s);case"Boolean":case"Number":case"String":return i([u,s.valueOf()],s)}if(t&&"toJSON"in s)return a(s.toJSON());const h=[],d=i([o,h],s);for(const f of kp(s))(e||!Dr(Un(s[f])))&&h.push([a(f),a(s[f])]);return d}case ds:return i([o,s.toISOString()],s);case hs:{const{source:h,flags:d}=s;return i([o,{source:h,flags:d}],s)}case fs:{const h=[],d=i([o,h],s);for(const[f,p]of s)(e||!(Dr(Un(f))||Dr(Un(p))))&&h.push([a(f),a(p)]);return d}case ps:{const h=[],d=i([o,h],s);for(const f of s)(e||!Dr(Un(f)))&&h.push(a(f));return d}}const{message:c}=s;return i([o,{name:u,message:c}],s)};return a},No=(e,{json:t,lossy:n}={})=>{const r=[];return yp(!(t||n),!!t,new Map,r)(e),r},an=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?Io(No(e,t)):structuredClone(e):(e,t)=>Io(No(e,t));class wr{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}wr.prototype.normal={};wr.prototype.property={};wr.prototype.space=void 0;function Sc(e,t){const n={},r={};for(const i of e)Object.assign(n,i.property),Object.assign(r,i.normal);return new wr(n,r,t)}function fr(e){return e.toLowerCase()}class Je{constructor(t,n){this.attribute=n,this.property=t}}Je.prototype.attribute="";Je.prototype.booleanish=!1;Je.prototype.boolean=!1;Je.prototype.commaOrSpaceSeparated=!1;Je.prototype.commaSeparated=!1;Je.prototype.defined=!1;Je.prototype.mustUseProperty=!1;Je.prototype.number=!1;Je.prototype.overloadedBoolean=!1;Je.prototype.property="";Je.prototype.spaceSeparated=!1;Je.prototype.space=void 0;let xp=0;const ne=un(),Me=un(),Sa=un(),H=un(),xe=un(),kn=un(),tt=un();function un(){return 2**++xp}const Ia=Object.freeze(Object.defineProperty({__proto__:null,boolean:ne,booleanish:Me,commaOrSpaceSeparated:tt,commaSeparated:kn,number:H,overloadedBoolean:Sa,spaceSeparated:xe},Symbol.toStringTag,{value:"Module"})),Xi=Object.keys(Ia);class ms extends Je{constructor(t,n,r,i){let a=-1;if(super(t,n),Lo(this,"space",i),typeof r=="number")for(;++a<Xi.length;){const s=Xi[a];Lo(this,Xi[a],(r&Ia[s])===Ia[s])}}}ms.prototype.defined=!0;function Lo(e,t,n){n&&(e[t]=n)}function Ln(e){const t={},n={};for(const[r,i]of Object.entries(e.properties)){const a=new ms(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[fr(r)]=r,n[fr(a.attribute)]=r}return new wr(t,n,e.space)}const Ic=Ln({properties:{ariaActiveDescendant:null,ariaAtomic:Me,ariaAutoComplete:null,ariaBusy:Me,ariaChecked:Me,ariaColCount:H,ariaColIndex:H,ariaColSpan:H,ariaControls:xe,ariaCurrent:null,ariaDescribedBy:xe,ariaDetails:null,ariaDisabled:Me,ariaDropEffect:xe,ariaErrorMessage:null,ariaExpanded:Me,ariaFlowTo:xe,ariaGrabbed:Me,ariaHasPopup:null,ariaHidden:Me,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:xe,ariaLevel:H,ariaLive:null,ariaModal:Me,ariaMultiLine:Me,ariaMultiSelectable:Me,ariaOrientation:null,ariaOwns:xe,ariaPlaceholder:null,ariaPosInSet:H,ariaPressed:Me,ariaReadOnly:Me,ariaRelevant:null,ariaRequired:Me,ariaRoleDescription:xe,ariaRowCount:H,ariaRowIndex:H,ariaRowSpan:H,ariaSelected:Me,ariaSetSize:H,ariaSort:null,ariaValueMax:H,ariaValueMin:H,ariaValueNow:H,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function Nc(e,t){return t in e?e[t]:t}function Lc(e,t){return Nc(e,t.toLowerCase())}const wp=Ln({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:kn,acceptCharset:xe,accessKey:xe,action:null,allow:null,allowFullScreen:ne,allowPaymentRequest:ne,allowUserMedia:ne,alt:null,as:null,async:ne,autoCapitalize:null,autoComplete:xe,autoFocus:ne,autoPlay:ne,blocking:xe,capture:null,charSet:null,checked:ne,cite:null,className:xe,cols:H,colSpan:null,content:null,contentEditable:Me,controls:ne,controlsList:xe,coords:H|kn,crossOrigin:null,data:null,dateTime:null,decoding:null,default:ne,defer:ne,dir:null,dirName:null,disabled:ne,download:Sa,draggable:Me,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:ne,formTarget:null,headers:xe,height:H,hidden:Sa,high:H,href:null,hrefLang:null,htmlFor:xe,httpEquiv:xe,id:null,imageSizes:null,imageSrcSet:null,inert:ne,inputMode:null,integrity:null,is:null,isMap:ne,itemId:null,itemProp:xe,itemRef:xe,itemScope:ne,itemType:xe,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:ne,low:H,manifest:null,max:null,maxLength:H,media:null,method:null,min:null,minLength:H,multiple:ne,muted:ne,name:null,nonce:null,noModule:ne,noValidate:ne,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:ne,optimum:H,pattern:null,ping:xe,placeholder:null,playsInline:ne,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:ne,referrerPolicy:null,rel:xe,required:ne,reversed:ne,rows:H,rowSpan:H,sandbox:xe,scope:null,scoped:ne,seamless:ne,selected:ne,shadowRootClonable:ne,shadowRootDelegatesFocus:ne,shadowRootMode:null,shape:null,size:H,sizes:null,slot:null,span:H,spellCheck:Me,src:null,srcDoc:null,srcLang:null,srcSet:null,start:H,step:null,style:null,tabIndex:H,target:null,title:null,translate:null,type:null,typeMustMatch:ne,useMap:null,value:Me,width:H,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:xe,axis:null,background:null,bgColor:null,border:H,borderColor:null,bottomMargin:H,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:ne,declare:ne,event:null,face:null,frame:null,frameBorder:null,hSpace:H,leftMargin:H,link:null,longDesc:null,lowSrc:null,marginHeight:H,marginWidth:H,noResize:ne,noHref:ne,noShade:ne,noWrap:ne,object:null,profile:null,prompt:null,rev:null,rightMargin:H,rules:null,scheme:null,scrolling:Me,standby:null,summary:null,text:null,topMargin:H,valueType:null,version:null,vAlign:null,vLink:null,vSpace:H,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:ne,disableRemotePlayback:ne,prefix:null,property:null,results:H,security:null,unselectable:null},space:"html",transform:Lc}),Ap=Ln({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:tt,accentHeight:H,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:H,amplitude:H,arabicForm:null,ascent:H,attributeName:null,attributeType:null,azimuth:H,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:H,by:null,calcMode:null,capHeight:H,className:xe,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:H,diffuseConstant:H,direction:null,display:null,dur:null,divisor:H,dominantBaseline:null,download:ne,dx:null,dy:null,edgeMode:null,editable:null,elevation:H,enableBackground:null,end:null,event:null,exponent:H,externalResourcesRequired:null,fill:null,fillOpacity:H,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:kn,g2:kn,glyphName:kn,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:H,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:H,horizOriginX:H,horizOriginY:H,id:null,ideographic:H,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:H,k:H,k1:H,k2:H,k3:H,k4:H,kernelMatrix:tt,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:H,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:H,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:H,overlineThickness:H,paintOrder:null,panose1:null,path:null,pathLength:H,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:xe,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:H,pointsAtY:H,pointsAtZ:H,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:tt,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:tt,rev:tt,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:tt,requiredFeatures:tt,requiredFonts:tt,requiredFormats:tt,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:H,specularExponent:H,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:H,strikethroughThickness:H,string:null,stroke:null,strokeDashArray:tt,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:H,strokeOpacity:H,strokeWidth:null,style:null,surfaceScale:H,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:tt,tabIndex:H,tableValues:null,target:null,targetX:H,targetY:H,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:tt,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:H,underlineThickness:H,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:H,values:null,vAlphabetic:H,vMathematical:H,vectorEffect:null,vHanging:H,vIdeographic:H,version:null,vertAdvY:H,vertOriginX:H,vertOriginY:H,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:H,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Nc}),Rc=Ln({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),Oc=Ln({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Lc}),Dc=Ln({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),Cp={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"},vp=/[A-Z]/g,Ro=/-[a-z]/g,Sp=/^data[-\w.:]+$/i;function Ni(e,t){const n=fr(t);let r=t,i=Je;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&Sp.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(Ro,Np);r="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!Ro.test(a)){let s=a.replace(vp,Ip);s.charAt(0)!=="-"&&(s="-"+s),t="data"+s}}i=ms}return new i(r,t)}function Ip(e){return"-"+e.toLowerCase()}function Np(e){return e.charAt(1).toUpperCase()}const Ar=Sc([Ic,wp,Rc,Oc,Dc],"html"),jt=Sc([Ic,Ap,Rc,Oc,Dc],"svg");function Oo(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 Pc(e,t){const n=t||{};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const Do=/[#.]/g;function Lp(e,t){const n=e||"",r={};let i=0,a,s;for(;i<n.length;){Do.lastIndex=i;const o=Do.exec(n),u=n.slice(i,o?o.index:n.length);u&&(a?a==="#"?r.id=u:Array.isArray(r.className)?r.className.push(u):r.className=[u]:s=u,i+=u.length),o&&(a=o[0],i++)}return{type:"element",tagName:s||t||"div",properties:r,children:[]}}function Po(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function Mc(e){return e.join(" ").trim()}function Bc(e,t,n){const r=n?Pp(n):void 0;function i(a,s,...o){let u;if(a==null){u={type:"root",children:[]};const c=s;o.unshift(c)}else{u=Lp(a,t);const c=u.tagName.toLowerCase(),h=r?r.get(c):void 0;if(u.tagName=h||c,Rp(s))o.unshift(s);else for(const[d,f]of Object.entries(s))Op(e,u.properties,d,f)}for(const c of o)Na(u.children,c);return u.type==="element"&&u.tagName==="template"&&(u.content={type:"root",children:u.children},u.children=[]),u}return i}function Rp(e){if(e===null||typeof e!="object"||Array.isArray(e))return!0;if(typeof e.type!="string")return!1;const t=e,n=Object.keys(e);for(const r of n){const i=t[r];if(i&&typeof i=="object"){if(!Array.isArray(i))return!0;const a=i;for(const s of a)if(typeof s!="number"&&typeof s!="string")return!0}}return!!("children"in e&&Array.isArray(e.children))}function Op(e,t,n,r){const i=Ni(e,n);let a;if(r!=null){if(typeof r=="number"){if(Number.isNaN(r))return;a=r}else typeof r=="boolean"?a=r:typeof r=="string"?i.spaceSeparated?a=Po(r):i.commaSeparated?a=Oo(r):i.commaOrSpaceSeparated?a=Po(Oo(r).join(" ")):a=Mo(i,i.property,r):Array.isArray(r)?a=[...r]:a=i.property==="style"?Dp(r):String(r);if(Array.isArray(a)){const s=[];for(const o of a)s.push(Mo(i,i.property,o));a=s}i.property==="className"&&Array.isArray(t.className)&&(a=t.className.concat(a)),t[i.property]=a}}function Na(e,t){if(t!=null)if(typeof t=="number"||typeof t=="string")e.push({type:"text",value:String(t)});else if(Array.isArray(t))for(const n of t)Na(e,n);else if(typeof t=="object"&&"type"in t)t.type==="root"?Na(e,t.children):e.push(t);else throw new Error("Expected node, nodes, or string, got `"+t+"`")}function Mo(e,t,n){if(typeof n=="string"){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===""||fr(n)===fr(t)))return!0}return n}function Dp(e){const t=[];for(const[n,r]of Object.entries(e))t.push([n,r].join(": "));return t.join("; ")}function Pp(e){const t=new Map;for(const n of e)t.set(n.toLowerCase(),n);return t}const Mp=["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"],Bp=Bc(Ar,"div"),Fp=Bc(jt,"g",Mp);function Hp(e){const t=String(e),n=[];return{toOffset:i,toPoint:r};function r(a){if(typeof a=="number"&&a>-1&&a<=t.length){let s=0;for(;;){let o=n[s];if(o===void 0){const u=Bo(t,n[s-1]);o=u===-1?t.length+1:u+1,n[s]=o}if(o>a)return{line:s+1,column:a-(s>0?n[s-1]:0)+1,offset:a};s++}}}function i(a){if(a&&typeof a.line=="number"&&typeof a.column=="number"&&!Number.isNaN(a.line)&&!Number.isNaN(a.column)){for(;n.length<a.line;){const o=n[n.length-1],u=Bo(t,o),c=u===-1?t.length+1:u+1;if(o===c)break;n.push(c)}const s=(a.line>1?n[a.line-2]:0)+a.column-1;if(s<n[a.line-1])return s}}}function Bo(e,t){const n=e.indexOf("\r",t),r=e.indexOf(`
|
|
2
|
-
`,t);return r===-1?n:n===-1||n+1===r?r:n<r?n:r}const en={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/"},Fc={}.hasOwnProperty,Up=Object.prototype;function zp(e,t){const n=t||{};return gs({file:n.file||void 0,location:!1,schema:n.space==="svg"?jt:Ar,verbose:n.verbose||!1},e)}function gs(e,t){let n;switch(t.nodeName){case"#comment":{const r=t;return n={type:"comment",value:r.data},Kr(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:Hc(e,t.childNodes),data:{quirksMode:i}},e.file&&e.location){const a=String(e.file),s=Hp(a),o=s.toPoint(0),u=s.toPoint(a.length);n.position={start:o,end:u}}return n}case"#documentType":{const r=t;return n={type:"doctype"},Kr(e,r,n),n}case"#text":{const r=t;return n={type:"text",value:r.value},Kr(e,r,n),n}default:return n=$p(e,t),n}}function Hc(e,t){let n=-1;const r=[];for(;++n<t.length;){const i=gs(e,t[n]);r.push(i)}return r}function $p(e,t){const n=e.schema;e.schema=t.namespaceURI===en.svg?jt:Ar;let r=-1;const i={};for(;++r<t.attrs.length;){const o=t.attrs[r],u=(o.prefix?o.prefix+":":"")+o.name;Fc.call(Up,u)||(i[u]=o.value)}const s=(e.schema.space==="svg"?Fp:Bp)(t.tagName,i,Hc(e,t.childNodes));if(Kr(e,t,s),s.tagName==="template"){const o=t,u=o.sourceCodeLocation,c=u&&u.startTag&&En(u.startTag),h=u&&u.endTag&&En(u.endTag),d=gs(e,o.content);c&&h&&e.file&&(d.position={start:c.end,end:h.start}),s.content=d}return e.schema=n,s}function Kr(e,t,n){if("sourceCodeLocation"in t&&t.sourceCodeLocation&&e.file){const r=Yp(e,n,t.sourceCodeLocation);r&&(e.location=!0,n.position=r)}}function Yp(e,t,n){const r=En(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)Fc.call(n.attrs,s)&&(a[Ni(e.schema,s).property]=En(n.attrs[s]));n.startTag;const o=En(n.startTag),u=n.endTag?En(n.endTag):void 0,c={opening:o};u&&(c.closing=u),c.properties=a,t.data={position:c}}}return r}function En(e){const t=Fo({line:e.startLine,column:e.startCol,offset:e.startOffset}),n=Fo({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||n?{start:t,end:n}:void 0}function Fo(e){return e.line&&e.column?e:void 0}const Ho={}.hasOwnProperty;function Uc(e,t){const n=t||{};function r(i,...a){let s=r.invalid;const o=r.handlers;if(i&&Ho.call(i,e)){const u=String(i[e]);s=Ho.call(o,u)?o[u]:r.unknown}if(s)return s.call(this,i,...a)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}const jp={},Vp={}.hasOwnProperty,zc=Uc("type",{handlers:{root:Wp,element:Zp,text:Qp,comment:Xp,doctype:Kp}});function qp(e,t){const r=(t||jp).space;return zc(e,r==="svg"?jt:Ar)}function Wp(e,t){const n={nodeName:"#document",mode:(e.data||{}).quirksMode?"quirks":"no-quirks",childNodes:[]};return n.childNodes=bs(e.children,n,t),Rn(e,n),n}function Gp(e,t){const n={nodeName:"#document-fragment",childNodes:[]};return n.childNodes=bs(e.children,n,t),Rn(e,n),n}function Kp(e){const t={nodeName:"#documentType",name:"html",publicId:"",systemId:"",parentNode:null};return Rn(e,t),t}function Qp(e){const t={nodeName:"#text",value:e.value,parentNode:null};return Rn(e,t),t}function Xp(e){const t={nodeName:"#comment",data:e.value,parentNode:null};return Rn(e,t),t}function Zp(e,t){const n=t;let r=n;e.type==="element"&&e.tagName.toLowerCase()==="svg"&&n.space==="html"&&(r=jt);const i=[];let a;if(e.properties){for(a in e.properties)if(a!=="children"&&Vp.call(e.properties,a)){const u=Jp(r,a,e.properties[a]);u&&i.push(u)}}const s=r.space,o={nodeName:e.tagName,tagName:e.tagName,attrs:i,namespaceURI:en[s],childNodes:[],parentNode:null};return o.childNodes=bs(e.children,o,r),Rn(e,o),e.tagName==="template"&&e.content&&(o.content=Gp(e.content,r)),o}function Jp(e,t,n){const r=Ni(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?Pc(n):Mc(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=en[r.space]}return i}function bs(e,t,n){let r=-1;const i=[];if(e)for(;++r<e.length;){const a=zc(e[r],n);a.parentNode=t,i.push(a)}return i}function Rn(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 em=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"],tm=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 b;(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"})(b||(b={}));const Xe={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function $c(e){return e>=55296&&e<=57343}function nm(e){return e>=56320&&e<=57343}function rm(e,t){return(e-55296)*1024+9216+t}function Yc(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function jc(e){return e>=64976&&e<=65007||tm.has(e)}var N;(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"})(N||(N={}));const im=65536;class am{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=im,this.isEol=!1,this.lineStartPos=0,this.droppedBufferSize=0,this.line=1,this.lastErrOffset=-1}get col(){return this.pos-this.lineStartPos+ +(this.lastGapPos!==this.pos)}get offset(){return this.droppedBufferSize+this.pos}getError(t,n){const{line:r,col:i,offset:a}=this,s=i+n,o=a+n;return{code:t,startLine:r,endLine:r,startCol:s,endCol:s,startOffset:o,endOffset:o}}_err(t){this.handler.onParseError&&this.lastErrOffset!==this.offset&&(this.lastErrOffset=this.offset,this.handler.onParseError(this.getError(t,0)))}_addGap(){this.gapStack.push(this.lastGapPos),this.lastGapPos=this.pos}_processSurrogate(t){if(this.pos!==this.html.length-1){const n=this.html.charCodeAt(this.pos+1);if(nm(n))return this.pos++,this._addGap(),rm(t,n)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,b.EOF;return this._err(N.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,b.EOF;const r=this.html.charCodeAt(n);return r===b.CARRIAGE_RETURN?b.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,b.EOF;let t=this.html.charCodeAt(this.pos);return t===b.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,b.LINE_FEED):t===b.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,$c(t)&&(t=this._processSurrogate(t)),this.handler.onParseError===null||t>31&&t<127||t===b.LINE_FEED||t===b.CARRIAGE_RETURN||t>159&&t<64976||this._checkForProblematicCharacters(t),t)}_checkForProblematicCharacters(t){Yc(t)?this._err(N.controlCharacterInInputStream):jc(t)&&this._err(N.noncharacterInInputStream)}retreat(t){for(this.pos-=t;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}}var se;(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"})(se||(se={}));function Vc(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 sm=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୕ୖ୪௫ఄ಄ದൡඅ櫬Āoungruent;扢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;怳Ādpuct;戏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ǣጓ\0y;䐎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Ā;tbrk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯᝳ;䎲;愶een;扬r;쀀𝔟gcostuvwឍឝឳេ៕៛ƀ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Ā;elƀ;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\0aĀ;t䀬;䁀ƀ;fl戁îᅠeĀmxent»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ↄⅪ←ٖ↛ǰ↉\0proø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;䅓Ācrir;榿;쀀𝔬ͯ\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\0m;櫳;櫽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))),om=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]]);function um(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=om.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 lm=32;var Ut;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(Ut||(Ut={}));function La(e){return e>=He.ZERO&&e<=He.NINE}function cm(e){return e>=He.UPPER_A&&e<=He.UPPER_F||e>=He.LOWER_A&&e<=He.LOWER_F}function dm(e){return e>=He.UPPER_A&&e<=He.UPPER_Z||e>=He.LOWER_A&&e<=He.LOWER_Z||La(e)}function hm(e){return e===He.EQUALS||dm(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 It;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(It||(It={}));class fm{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=It.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)|lm)===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)+Number.parseInt(t.substr(n,a),i),this.consumed+=a}}stateNumericHex(t,n){const r=n;for(;n<t.length;){const i=t.charCodeAt(n);if(La(i)||cm(i))n+=1;else return this.addToNumericResult(t,r,n,16),this.emitNumericEntity(i,3)}return this.addToNumericResult(t,r,n,16),-1}stateNumericDecimal(t,n){const r=n;for(;n<t.length;){const i=t.charCodeAt(n);if(La(i))n+=1;else return this.addToNumericResult(t,r,n,10),this.emitNumericEntity(i,2)}return this.addToNumericResult(t,r,n,10),-1}emitNumericEntity(t,n){var r;if(this.consumed<=n)return(r=this.errors)===null||r===void 0||r.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(t===He.SEMI)this.consumed+=1;else if(this.decodeMode===It.Strict)return 0;return this.emitCodePoint(um(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&Ut.VALUE_LENGTH)>>14;for(;n<t.length;n++,this.excess++){const s=t.charCodeAt(n);if(this.treeIndex=pm(r,i,this.treeIndex+Math.max(1,a),s),this.treeIndex<0)return this.result===0||this.decodeMode===It.Attribute&&(a===0||hm(s))?0:this.emitNotTerminatedNamedEntity();if(i=r[this.treeIndex],a=(i&Ut.VALUE_LENGTH)>>14,a!==0){if(s===He.SEMI)return this.emitNamedEntityData(this.treeIndex,a,this.consumed+this.excess);this.decodeMode!==It.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]&Ut.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]&~Ut.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!==It.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 pm(e,t,n,r){const i=(t&Ut.BRANCH_LENGTH)>>7,a=t&Ut.JUMP_TABLE;if(i===0)return a!==0&&r===a?n:-1;if(a){const u=r-a;return u<0||u>=i?-1:e[n+u]-1}let s=n,o=s+i-1;for(;s<=o;){const u=s+o>>>1,c=e[u];if(c<r)s=u+1;else if(c>r)o=u-1;else return e[u+i]}return-1}var D;(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/"})(D||(D={}));var nn;(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"})(nn||(nn={}));var at;(function(e){e.NO_QUIRKS="no-quirks",e.QUIRKS="quirks",e.LIMITED_QUIRKS="limited-quirks"})(at||(at={}));var S;(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"})(S||(S={}));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 mm=new Map([[S.A,l.A],[S.ADDRESS,l.ADDRESS],[S.ANNOTATION_XML,l.ANNOTATION_XML],[S.APPLET,l.APPLET],[S.AREA,l.AREA],[S.ARTICLE,l.ARTICLE],[S.ASIDE,l.ASIDE],[S.B,l.B],[S.BASE,l.BASE],[S.BASEFONT,l.BASEFONT],[S.BGSOUND,l.BGSOUND],[S.BIG,l.BIG],[S.BLOCKQUOTE,l.BLOCKQUOTE],[S.BODY,l.BODY],[S.BR,l.BR],[S.BUTTON,l.BUTTON],[S.CAPTION,l.CAPTION],[S.CENTER,l.CENTER],[S.CODE,l.CODE],[S.COL,l.COL],[S.COLGROUP,l.COLGROUP],[S.DD,l.DD],[S.DESC,l.DESC],[S.DETAILS,l.DETAILS],[S.DIALOG,l.DIALOG],[S.DIR,l.DIR],[S.DIV,l.DIV],[S.DL,l.DL],[S.DT,l.DT],[S.EM,l.EM],[S.EMBED,l.EMBED],[S.FIELDSET,l.FIELDSET],[S.FIGCAPTION,l.FIGCAPTION],[S.FIGURE,l.FIGURE],[S.FONT,l.FONT],[S.FOOTER,l.FOOTER],[S.FOREIGN_OBJECT,l.FOREIGN_OBJECT],[S.FORM,l.FORM],[S.FRAME,l.FRAME],[S.FRAMESET,l.FRAMESET],[S.H1,l.H1],[S.H2,l.H2],[S.H3,l.H3],[S.H4,l.H4],[S.H5,l.H5],[S.H6,l.H6],[S.HEAD,l.HEAD],[S.HEADER,l.HEADER],[S.HGROUP,l.HGROUP],[S.HR,l.HR],[S.HTML,l.HTML],[S.I,l.I],[S.IMG,l.IMG],[S.IMAGE,l.IMAGE],[S.INPUT,l.INPUT],[S.IFRAME,l.IFRAME],[S.KEYGEN,l.KEYGEN],[S.LABEL,l.LABEL],[S.LI,l.LI],[S.LINK,l.LINK],[S.LISTING,l.LISTING],[S.MAIN,l.MAIN],[S.MALIGNMARK,l.MALIGNMARK],[S.MARQUEE,l.MARQUEE],[S.MATH,l.MATH],[S.MENU,l.MENU],[S.META,l.META],[S.MGLYPH,l.MGLYPH],[S.MI,l.MI],[S.MO,l.MO],[S.MN,l.MN],[S.MS,l.MS],[S.MTEXT,l.MTEXT],[S.NAV,l.NAV],[S.NOBR,l.NOBR],[S.NOFRAMES,l.NOFRAMES],[S.NOEMBED,l.NOEMBED],[S.NOSCRIPT,l.NOSCRIPT],[S.OBJECT,l.OBJECT],[S.OL,l.OL],[S.OPTGROUP,l.OPTGROUP],[S.OPTION,l.OPTION],[S.P,l.P],[S.PARAM,l.PARAM],[S.PLAINTEXT,l.PLAINTEXT],[S.PRE,l.PRE],[S.RB,l.RB],[S.RP,l.RP],[S.RT,l.RT],[S.RTC,l.RTC],[S.RUBY,l.RUBY],[S.S,l.S],[S.SCRIPT,l.SCRIPT],[S.SEARCH,l.SEARCH],[S.SECTION,l.SECTION],[S.SELECT,l.SELECT],[S.SOURCE,l.SOURCE],[S.SMALL,l.SMALL],[S.SPAN,l.SPAN],[S.STRIKE,l.STRIKE],[S.STRONG,l.STRONG],[S.STYLE,l.STYLE],[S.SUB,l.SUB],[S.SUMMARY,l.SUMMARY],[S.SUP,l.SUP],[S.TABLE,l.TABLE],[S.TBODY,l.TBODY],[S.TEMPLATE,l.TEMPLATE],[S.TEXTAREA,l.TEXTAREA],[S.TFOOT,l.TFOOT],[S.TD,l.TD],[S.TH,l.TH],[S.THEAD,l.THEAD],[S.TITLE,l.TITLE],[S.TR,l.TR],[S.TRACK,l.TRACK],[S.TT,l.TT],[S.U,l.U],[S.UL,l.UL],[S.SVG,l.SVG],[S.VAR,l.VAR],[S.WBR,l.WBR],[S.XMP,l.XMP]]);function On(e){var t;return(t=mm.get(e))!==null&&t!==void 0?t:l.UNKNOWN}const B=l,gm={[D.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]),[D.MATHML]:new Set([B.MI,B.MO,B.MN,B.MS,B.MTEXT,B.ANNOTATION_XML]),[D.SVG]:new Set([B.TITLE,B.FOREIGN_OBJECT,B.DESC]),[D.XLINK]:new Set,[D.XML]:new Set,[D.XMLNS]:new Set},Ra=new Set([B.H1,B.H2,B.H3,B.H4,B.H5,B.H6]);S.STYLE,S.SCRIPT,S.XMP,S.IFRAME,S.NOEMBED,S.NOFRAMES,S.PLAINTEXT;var E;(function(e){e[e.DATA=0]="DATA",e[e.RCDATA=1]="RCDATA",e[e.RAWTEXT=2]="RAWTEXT",e[e.SCRIPT_DATA=3]="SCRIPT_DATA",e[e.PLAINTEXT=4]="PLAINTEXT",e[e.TAG_OPEN=5]="TAG_OPEN",e[e.END_TAG_OPEN=6]="END_TAG_OPEN",e[e.TAG_NAME=7]="TAG_NAME",e[e.RCDATA_LESS_THAN_SIGN=8]="RCDATA_LESS_THAN_SIGN",e[e.RCDATA_END_TAG_OPEN=9]="RCDATA_END_TAG_OPEN",e[e.RCDATA_END_TAG_NAME=10]="RCDATA_END_TAG_NAME",e[e.RAWTEXT_LESS_THAN_SIGN=11]="RAWTEXT_LESS_THAN_SIGN",e[e.RAWTEXT_END_TAG_OPEN=12]="RAWTEXT_END_TAG_OPEN",e[e.RAWTEXT_END_TAG_NAME=13]="RAWTEXT_END_TAG_NAME",e[e.SCRIPT_DATA_LESS_THAN_SIGN=14]="SCRIPT_DATA_LESS_THAN_SIGN",e[e.SCRIPT_DATA_END_TAG_OPEN=15]="SCRIPT_DATA_END_TAG_OPEN",e[e.SCRIPT_DATA_END_TAG_NAME=16]="SCRIPT_DATA_END_TAG_NAME",e[e.SCRIPT_DATA_ESCAPE_START=17]="SCRIPT_DATA_ESCAPE_START",e[e.SCRIPT_DATA_ESCAPE_START_DASH=18]="SCRIPT_DATA_ESCAPE_START_DASH",e[e.SCRIPT_DATA_ESCAPED=19]="SCRIPT_DATA_ESCAPED",e[e.SCRIPT_DATA_ESCAPED_DASH=20]="SCRIPT_DATA_ESCAPED_DASH",e[e.SCRIPT_DATA_ESCAPED_DASH_DASH=21]="SCRIPT_DATA_ESCAPED_DASH_DASH",e[e.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN=22]="SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN",e[e.SCRIPT_DATA_ESCAPED_END_TAG_OPEN=23]="SCRIPT_DATA_ESCAPED_END_TAG_OPEN",e[e.SCRIPT_DATA_ESCAPED_END_TAG_NAME=24]="SCRIPT_DATA_ESCAPED_END_TAG_NAME",e[e.SCRIPT_DATA_DOUBLE_ESCAPE_START=25]="SCRIPT_DATA_DOUBLE_ESCAPE_START",e[e.SCRIPT_DATA_DOUBLE_ESCAPED=26]="SCRIPT_DATA_DOUBLE_ESCAPED",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH=27]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH=28]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN=29]="SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN",e[e.SCRIPT_DATA_DOUBLE_ESCAPE_END=30]="SCRIPT_DATA_DOUBLE_ESCAPE_END",e[e.BEFORE_ATTRIBUTE_NAME=31]="BEFORE_ATTRIBUTE_NAME",e[e.ATTRIBUTE_NAME=32]="ATTRIBUTE_NAME",e[e.AFTER_ATTRIBUTE_NAME=33]="AFTER_ATTRIBUTE_NAME",e[e.BEFORE_ATTRIBUTE_VALUE=34]="BEFORE_ATTRIBUTE_VALUE",e[e.ATTRIBUTE_VALUE_DOUBLE_QUOTED=35]="ATTRIBUTE_VALUE_DOUBLE_QUOTED",e[e.ATTRIBUTE_VALUE_SINGLE_QUOTED=36]="ATTRIBUTE_VALUE_SINGLE_QUOTED",e[e.ATTRIBUTE_VALUE_UNQUOTED=37]="ATTRIBUTE_VALUE_UNQUOTED",e[e.AFTER_ATTRIBUTE_VALUE_QUOTED=38]="AFTER_ATTRIBUTE_VALUE_QUOTED",e[e.SELF_CLOSING_START_TAG=39]="SELF_CLOSING_START_TAG",e[e.BOGUS_COMMENT=40]="BOGUS_COMMENT",e[e.MARKUP_DECLARATION_OPEN=41]="MARKUP_DECLARATION_OPEN",e[e.COMMENT_START=42]="COMMENT_START",e[e.COMMENT_START_DASH=43]="COMMENT_START_DASH",e[e.COMMENT=44]="COMMENT",e[e.COMMENT_LESS_THAN_SIGN=45]="COMMENT_LESS_THAN_SIGN",e[e.COMMENT_LESS_THAN_SIGN_BANG=46]="COMMENT_LESS_THAN_SIGN_BANG",e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH=47]="COMMENT_LESS_THAN_SIGN_BANG_DASH",e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH=48]="COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH",e[e.COMMENT_END_DASH=49]="COMMENT_END_DASH",e[e.COMMENT_END=50]="COMMENT_END",e[e.COMMENT_END_BANG=51]="COMMENT_END_BANG",e[e.DOCTYPE=52]="DOCTYPE",e[e.BEFORE_DOCTYPE_NAME=53]="BEFORE_DOCTYPE_NAME",e[e.DOCTYPE_NAME=54]="DOCTYPE_NAME",e[e.AFTER_DOCTYPE_NAME=55]="AFTER_DOCTYPE_NAME",e[e.AFTER_DOCTYPE_PUBLIC_KEYWORD=56]="AFTER_DOCTYPE_PUBLIC_KEYWORD",e[e.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER=57]="BEFORE_DOCTYPE_PUBLIC_IDENTIFIER",e[e.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED=58]="DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED",e[e.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED=59]="DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED",e[e.AFTER_DOCTYPE_PUBLIC_IDENTIFIER=60]="AFTER_DOCTYPE_PUBLIC_IDENTIFIER",e[e.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS=61]="BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS",e[e.AFTER_DOCTYPE_SYSTEM_KEYWORD=62]="AFTER_DOCTYPE_SYSTEM_KEYWORD",e[e.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER=63]="BEFORE_DOCTYPE_SYSTEM_IDENTIFIER",e[e.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED=64]="DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED",e[e.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED=65]="DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED",e[e.AFTER_DOCTYPE_SYSTEM_IDENTIFIER=66]="AFTER_DOCTYPE_SYSTEM_IDENTIFIER",e[e.BOGUS_DOCTYPE=67]="BOGUS_DOCTYPE",e[e.CDATA_SECTION=68]="CDATA_SECTION",e[e.CDATA_SECTION_BRACKET=69]="CDATA_SECTION_BRACKET",e[e.CDATA_SECTION_END=70]="CDATA_SECTION_END",e[e.CHARACTER_REFERENCE=71]="CHARACTER_REFERENCE",e[e.AMBIGUOUS_AMPERSAND=72]="AMBIGUOUS_AMPERSAND"})(E||(E={}));const Oe={DATA:E.DATA,RCDATA:E.RCDATA,RAWTEXT:E.RAWTEXT,SCRIPT_DATA:E.SCRIPT_DATA,PLAINTEXT:E.PLAINTEXT,CDATA_SECTION:E.CDATA_SECTION};function bm(e){return e>=b.DIGIT_0&&e<=b.DIGIT_9}function Gn(e){return e>=b.LATIN_CAPITAL_A&&e<=b.LATIN_CAPITAL_Z}function Em(e){return e>=b.LATIN_SMALL_A&&e<=b.LATIN_SMALL_Z}function Mt(e){return Em(e)||Gn(e)}function Uo(e){return Mt(e)||bm(e)}function Pr(e){return e+32}function qc(e){return e===b.SPACE||e===b.LINE_FEED||e===b.TABULATION||e===b.FORM_FEED}function zo(e){return qc(e)||e===b.SOLIDUS||e===b.GREATER_THAN_SIGN}function _m(e){return e===b.NULL?N.nullCharacterReference:e>1114111?N.characterReferenceOutsideUnicodeRange:$c(e)?N.surrogateCharacterReference:jc(e)?N.noncharacterCharacterReference:Yc(e)||e===b.CARRIAGE_RETURN?N.controlCharacterReference:null}class Tm{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 am(n),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new fm(sm,(r,i)=>{this.preprocessor.pos=this.entityStartPos+i-1,this._flushCodePointConsumedAsCharacterReference(r)},n.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(N.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:r=>{this._err(N.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+r)},validateNumericCharacterReference:r=>{const i=_m(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:se.START_TAG,tagName:"",tagID:l.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:se.END_TAG,tagName:"",tagID:l.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(t){this.currentToken={type:se.COMMENT,data:"",location:this.getCurrentLocation(t)}}_createDoctypeToken(t){this.currentToken={type:se.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(Vc(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(N.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=On(t.tagName),t.type===se.START_TAG?(this.lastStartTagName=t.tagName,this.handler.onStartTag(t)):(t.attrs.length>0&&this._err(N.endTagWithAttributes),t.selfClosing&&this._err(N.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 se.CHARACTER:{this.handler.onCharacter(this.currentCharacterToken);break}case se.NULL_CHARACTER:{this.handler.onNullCharacter(this.currentCharacterToken);break}case se.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:se.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=qc(t)?se.WHITESPACE_CHARACTER:t===b.NULL?se.NULL_CHARACTER:se.CHARACTER;this._appendCharToCurrentCharacterToken(n,String.fromCodePoint(t))}_emitChars(t){this._appendCharToCurrentCharacterToken(se.CHARACTER,t)}_startCharacterReference(){this.returnState=this.state,this.state=E.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?It.Attribute:It.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 b.LESS_THAN_SIGN:{this.state=E.TAG_OPEN;break}case b.AMPERSAND:{this._startCharacterReference();break}case b.NULL:{this._err(N.unexpectedNullCharacter),this._emitCodePoint(t);break}case b.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRcdata(t){switch(t){case b.AMPERSAND:{this._startCharacterReference();break}case b.LESS_THAN_SIGN:{this.state=E.RCDATA_LESS_THAN_SIGN;break}case b.NULL:{this._err(N.unexpectedNullCharacter),this._emitChars(ve);break}case b.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRawtext(t){switch(t){case b.LESS_THAN_SIGN:{this.state=E.RAWTEXT_LESS_THAN_SIGN;break}case b.NULL:{this._err(N.unexpectedNullCharacter),this._emitChars(ve);break}case b.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptData(t){switch(t){case b.LESS_THAN_SIGN:{this.state=E.SCRIPT_DATA_LESS_THAN_SIGN;break}case b.NULL:{this._err(N.unexpectedNullCharacter),this._emitChars(ve);break}case b.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_statePlaintext(t){switch(t){case b.NULL:{this._err(N.unexpectedNullCharacter),this._emitChars(ve);break}case b.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateTagOpen(t){if(Mt(t))this._createStartTagToken(),this.state=E.TAG_NAME,this._stateTagName(t);else switch(t){case b.EXCLAMATION_MARK:{this.state=E.MARKUP_DECLARATION_OPEN;break}case b.SOLIDUS:{this.state=E.END_TAG_OPEN;break}case b.QUESTION_MARK:{this._err(N.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=E.BOGUS_COMMENT,this._stateBogusComment(t);break}case b.EOF:{this._err(N.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break}default:this._err(N.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=E.DATA,this._stateData(t)}}_stateEndTagOpen(t){if(Mt(t))this._createEndTagToken(),this.state=E.TAG_NAME,this._stateTagName(t);else switch(t){case b.GREATER_THAN_SIGN:{this._err(N.missingEndTagName),this.state=E.DATA;break}case b.EOF:{this._err(N.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break}default:this._err(N.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=E.BOGUS_COMMENT,this._stateBogusComment(t)}}_stateTagName(t){const n=this.currentToken;switch(t){case b.SPACE:case b.LINE_FEED:case b.TABULATION:case b.FORM_FEED:{this.state=E.BEFORE_ATTRIBUTE_NAME;break}case b.SOLIDUS:{this.state=E.SELF_CLOSING_START_TAG;break}case b.GREATER_THAN_SIGN:{this.state=E.DATA,this.emitCurrentTagToken();break}case b.NULL:{this._err(N.unexpectedNullCharacter),n.tagName+=ve;break}case b.EOF:{this._err(N.eofInTag),this._emitEOFToken();break}default:n.tagName+=String.fromCodePoint(Gn(t)?Pr(t):t)}}_stateRcdataLessThanSign(t){t===b.SOLIDUS?this.state=E.RCDATA_END_TAG_OPEN:(this._emitChars("<"),this.state=E.RCDATA,this._stateRcdata(t))}_stateRcdataEndTagOpen(t){Mt(t)?(this.state=E.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(t)):(this._emitChars("</"),this.state=E.RCDATA,this._stateRcdata(t))}handleSpecialEndTag(t){if(!this.preprocessor.startsWith(this.lastStartTagName,!1))return!this._ensureHibernation();this._createEndTagToken();const n=this.currentToken;switch(n.tagName=this.lastStartTagName,this.preprocessor.peek(this.lastStartTagName.length)){case b.SPACE:case b.LINE_FEED:case b.TABULATION:case b.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=E.BEFORE_ATTRIBUTE_NAME,!1;case b.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=E.SELF_CLOSING_START_TAG,!1;case b.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===b.SOLIDUS?this.state=E.RAWTEXT_END_TAG_OPEN:(this._emitChars("<"),this.state=E.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagOpen(t){Mt(t)?(this.state=E.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(t)):(this._emitChars("</"),this.state=E.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=E.RAWTEXT,this._stateRawtext(t))}_stateScriptDataLessThanSign(t){switch(t){case b.SOLIDUS:{this.state=E.SCRIPT_DATA_END_TAG_OPEN;break}case b.EXCLAMATION_MARK:{this.state=E.SCRIPT_DATA_ESCAPE_START,this._emitChars("<!");break}default:this._emitChars("<"),this.state=E.SCRIPT_DATA,this._stateScriptData(t)}}_stateScriptDataEndTagOpen(t){Mt(t)?(this.state=E.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(t)):(this._emitChars("</"),this.state=E.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=E.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStart(t){t===b.HYPHEN_MINUS?(this.state=E.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars("-")):(this.state=E.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStartDash(t){t===b.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 b.HYPHEN_MINUS:{this.state=E.SCRIPT_DATA_ESCAPED_DASH,this._emitChars("-");break}case b.LESS_THAN_SIGN:{this.state=E.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case b.NULL:{this._err(N.unexpectedNullCharacter),this._emitChars(ve);break}case b.EOF:{this._err(N.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataEscapedDash(t){switch(t){case b.HYPHEN_MINUS:{this.state=E.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-");break}case b.LESS_THAN_SIGN:{this.state=E.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case b.NULL:{this._err(N.unexpectedNullCharacter),this.state=E.SCRIPT_DATA_ESCAPED,this._emitChars(ve);break}case b.EOF:{this._err(N.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=E.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedDashDash(t){switch(t){case b.HYPHEN_MINUS:{this._emitChars("-");break}case b.LESS_THAN_SIGN:{this.state=E.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case b.GREATER_THAN_SIGN:{this.state=E.SCRIPT_DATA,this._emitChars(">");break}case b.NULL:{this._err(N.unexpectedNullCharacter),this.state=E.SCRIPT_DATA_ESCAPED,this._emitChars(ve);break}case b.EOF:{this._err(N.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=E.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedLessThanSign(t){t===b.SOLIDUS?this.state=E.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:Mt(t)?(this._emitChars("<"),this.state=E.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(t)):(this._emitChars("<"),this.state=E.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagOpen(t){Mt(t)?(this.state=E.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(t)):(this._emitChars("</"),this.state=E.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=E.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscapeStart(t){if(this.preprocessor.startsWith(Xe.SCRIPT,!1)&&zo(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 b.HYPHEN_MINUS:{this.state=E.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars("-");break}case b.LESS_THAN_SIGN:{this.state=E.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case b.NULL:{this._err(N.unexpectedNullCharacter),this._emitChars(ve);break}case b.EOF:{this._err(N.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDash(t){switch(t){case b.HYPHEN_MINUS:{this.state=E.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars("-");break}case b.LESS_THAN_SIGN:{this.state=E.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case b.NULL:{this._err(N.unexpectedNullCharacter),this.state=E.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(ve);break}case b.EOF:{this._err(N.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=E.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDashDash(t){switch(t){case b.HYPHEN_MINUS:{this._emitChars("-");break}case b.LESS_THAN_SIGN:{this.state=E.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case b.GREATER_THAN_SIGN:{this.state=E.SCRIPT_DATA,this._emitChars(">");break}case b.NULL:{this._err(N.unexpectedNullCharacter),this.state=E.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(ve);break}case b.EOF:{this._err(N.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=E.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedLessThanSign(t){t===b.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)&&zo(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 b.SPACE:case b.LINE_FEED:case b.TABULATION:case b.FORM_FEED:break;case b.SOLIDUS:case b.GREATER_THAN_SIGN:case b.EOF:{this.state=E.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case b.EQUALS_SIGN:{this._err(N.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 b.SPACE:case b.LINE_FEED:case b.TABULATION:case b.FORM_FEED:case b.SOLIDUS:case b.GREATER_THAN_SIGN:case b.EOF:{this._leaveAttrName(),this.state=E.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case b.EQUALS_SIGN:{this._leaveAttrName(),this.state=E.BEFORE_ATTRIBUTE_VALUE;break}case b.QUOTATION_MARK:case b.APOSTROPHE:case b.LESS_THAN_SIGN:{this._err(N.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(t);break}case b.NULL:{this._err(N.unexpectedNullCharacter),this.currentAttr.name+=ve;break}default:this.currentAttr.name+=String.fromCodePoint(Gn(t)?Pr(t):t)}}_stateAfterAttributeName(t){switch(t){case b.SPACE:case b.LINE_FEED:case b.TABULATION:case b.FORM_FEED:break;case b.SOLIDUS:{this.state=E.SELF_CLOSING_START_TAG;break}case b.EQUALS_SIGN:{this.state=E.BEFORE_ATTRIBUTE_VALUE;break}case b.GREATER_THAN_SIGN:{this.state=E.DATA,this.emitCurrentTagToken();break}case b.EOF:{this._err(N.eofInTag),this._emitEOFToken();break}default:this._createAttr(""),this.state=E.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateBeforeAttributeValue(t){switch(t){case b.SPACE:case b.LINE_FEED:case b.TABULATION:case b.FORM_FEED:break;case b.QUOTATION_MARK:{this.state=E.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break}case b.APOSTROPHE:{this.state=E.ATTRIBUTE_VALUE_SINGLE_QUOTED;break}case b.GREATER_THAN_SIGN:{this._err(N.missingAttributeValue),this.state=E.DATA,this.emitCurrentTagToken();break}default:this.state=E.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(t)}}_stateAttributeValueDoubleQuoted(t){switch(t){case b.QUOTATION_MARK:{this.state=E.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case b.AMPERSAND:{this._startCharacterReference();break}case b.NULL:{this._err(N.unexpectedNullCharacter),this.currentAttr.value+=ve;break}case b.EOF:{this._err(N.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueSingleQuoted(t){switch(t){case b.APOSTROPHE:{this.state=E.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case b.AMPERSAND:{this._startCharacterReference();break}case b.NULL:{this._err(N.unexpectedNullCharacter),this.currentAttr.value+=ve;break}case b.EOF:{this._err(N.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueUnquoted(t){switch(t){case b.SPACE:case b.LINE_FEED:case b.TABULATION:case b.FORM_FEED:{this._leaveAttrValue(),this.state=E.BEFORE_ATTRIBUTE_NAME;break}case b.AMPERSAND:{this._startCharacterReference();break}case b.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=E.DATA,this.emitCurrentTagToken();break}case b.NULL:{this._err(N.unexpectedNullCharacter),this.currentAttr.value+=ve;break}case b.QUOTATION_MARK:case b.APOSTROPHE:case b.LESS_THAN_SIGN:case b.EQUALS_SIGN:case b.GRAVE_ACCENT:{this._err(N.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(t);break}case b.EOF:{this._err(N.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAfterAttributeValueQuoted(t){switch(t){case b.SPACE:case b.LINE_FEED:case b.TABULATION:case b.FORM_FEED:{this._leaveAttrValue(),this.state=E.BEFORE_ATTRIBUTE_NAME;break}case b.SOLIDUS:{this._leaveAttrValue(),this.state=E.SELF_CLOSING_START_TAG;break}case b.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=E.DATA,this.emitCurrentTagToken();break}case b.EOF:{this._err(N.eofInTag),this._emitEOFToken();break}default:this._err(N.missingWhitespaceBetweenAttributes),this.state=E.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateSelfClosingStartTag(t){switch(t){case b.GREATER_THAN_SIGN:{const n=this.currentToken;n.selfClosing=!0,this.state=E.DATA,this.emitCurrentTagToken();break}case b.EOF:{this._err(N.eofInTag),this._emitEOFToken();break}default:this._err(N.unexpectedSolidusInTag),this.state=E.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateBogusComment(t){const n=this.currentToken;switch(t){case b.GREATER_THAN_SIGN:{this.state=E.DATA,this.emitCurrentComment(n);break}case b.EOF:{this.emitCurrentComment(n),this._emitEOFToken();break}case b.NULL:{this._err(N.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(N.cdataInHtmlContent),this._createCommentToken(Xe.CDATA_START.length+1),this.currentToken.data="[CDATA[",this.state=E.BOGUS_COMMENT):this._ensureHibernation()||(this._err(N.incorrectlyOpenedComment),this._createCommentToken(2),this.state=E.BOGUS_COMMENT,this._stateBogusComment(t))}_stateCommentStart(t){switch(t){case b.HYPHEN_MINUS:{this.state=E.COMMENT_START_DASH;break}case b.GREATER_THAN_SIGN:{this._err(N.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 b.HYPHEN_MINUS:{this.state=E.COMMENT_END;break}case b.GREATER_THAN_SIGN:{this._err(N.abruptClosingOfEmptyComment),this.state=E.DATA,this.emitCurrentComment(n);break}case b.EOF:{this._err(N.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 b.HYPHEN_MINUS:{this.state=E.COMMENT_END_DASH;break}case b.LESS_THAN_SIGN:{n.data+="<",this.state=E.COMMENT_LESS_THAN_SIGN;break}case b.NULL:{this._err(N.unexpectedNullCharacter),n.data+=ve;break}case b.EOF:{this._err(N.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+=String.fromCodePoint(t)}}_stateCommentLessThanSign(t){const n=this.currentToken;switch(t){case b.EXCLAMATION_MARK:{n.data+="!",this.state=E.COMMENT_LESS_THAN_SIGN_BANG;break}case b.LESS_THAN_SIGN:{n.data+="<";break}default:this.state=E.COMMENT,this._stateComment(t)}}_stateCommentLessThanSignBang(t){t===b.HYPHEN_MINUS?this.state=E.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=E.COMMENT,this._stateComment(t))}_stateCommentLessThanSignBangDash(t){t===b.HYPHEN_MINUS?this.state=E.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=E.COMMENT_END_DASH,this._stateCommentEndDash(t))}_stateCommentLessThanSignBangDashDash(t){t!==b.GREATER_THAN_SIGN&&t!==b.EOF&&this._err(N.nestedComment),this.state=E.COMMENT_END,this._stateCommentEnd(t)}_stateCommentEndDash(t){const n=this.currentToken;switch(t){case b.HYPHEN_MINUS:{this.state=E.COMMENT_END;break}case b.EOF:{this._err(N.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 b.GREATER_THAN_SIGN:{this.state=E.DATA,this.emitCurrentComment(n);break}case b.EXCLAMATION_MARK:{this.state=E.COMMENT_END_BANG;break}case b.HYPHEN_MINUS:{n.data+="-";break}case b.EOF:{this._err(N.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 b.HYPHEN_MINUS:{n.data+="--!",this.state=E.COMMENT_END_DASH;break}case b.GREATER_THAN_SIGN:{this._err(N.incorrectlyClosedComment),this.state=E.DATA,this.emitCurrentComment(n);break}case b.EOF:{this._err(N.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--!",this.state=E.COMMENT,this._stateComment(t)}}_stateDoctype(t){switch(t){case b.SPACE:case b.LINE_FEED:case b.TABULATION:case b.FORM_FEED:{this.state=E.BEFORE_DOCTYPE_NAME;break}case b.GREATER_THAN_SIGN:{this.state=E.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t);break}case b.EOF:{this._err(N.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(N.missingWhitespaceBeforeDoctypeName),this.state=E.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t)}}_stateBeforeDoctypeName(t){if(Gn(t))this._createDoctypeToken(String.fromCharCode(Pr(t))),this.state=E.DOCTYPE_NAME;else switch(t){case b.SPACE:case b.LINE_FEED:case b.TABULATION:case b.FORM_FEED:break;case b.NULL:{this._err(N.unexpectedNullCharacter),this._createDoctypeToken(ve),this.state=E.DOCTYPE_NAME;break}case b.GREATER_THAN_SIGN:{this._err(N.missingDoctypeName),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=E.DATA;break}case b.EOF:{this._err(N.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 b.SPACE:case b.LINE_FEED:case b.TABULATION:case b.FORM_FEED:{this.state=E.AFTER_DOCTYPE_NAME;break}case b.GREATER_THAN_SIGN:{this.state=E.DATA,this.emitCurrentDoctype(n);break}case b.NULL:{this._err(N.unexpectedNullCharacter),n.name+=ve;break}case b.EOF:{this._err(N.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.name+=String.fromCodePoint(Gn(t)?Pr(t):t)}}_stateAfterDoctypeName(t){const n=this.currentToken;switch(t){case b.SPACE:case b.LINE_FEED:case b.TABULATION:case b.FORM_FEED:break;case b.GREATER_THAN_SIGN:{this.state=E.DATA,this.emitCurrentDoctype(n);break}case b.EOF:{this._err(N.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(N.invalidCharacterSequenceAfterDoctypeName),n.forceQuirks=!0,this.state=E.BOGUS_DOCTYPE,this._stateBogusDoctype(t))}}_stateAfterDoctypePublicKeyword(t){const n=this.currentToken;switch(t){case b.SPACE:case b.LINE_FEED:case b.TABULATION:case b.FORM_FEED:{this.state=E.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break}case b.QUOTATION_MARK:{this._err(N.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=E.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case b.APOSTROPHE:{this._err(N.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=E.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case b.GREATER_THAN_SIGN:{this._err(N.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=E.DATA,this.emitCurrentDoctype(n);break}case b.EOF:{this._err(N.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(N.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=E.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case b.SPACE:case b.LINE_FEED:case b.TABULATION:case b.FORM_FEED:break;case b.QUOTATION_MARK:{n.publicId="",this.state=E.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case b.APOSTROPHE:{n.publicId="",this.state=E.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case b.GREATER_THAN_SIGN:{this._err(N.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=E.DATA,this.emitCurrentDoctype(n);break}case b.EOF:{this._err(N.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(N.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=E.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypePublicIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case b.QUOTATION_MARK:{this.state=E.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case b.NULL:{this._err(N.unexpectedNullCharacter),n.publicId+=ve;break}case b.GREATER_THAN_SIGN:{this._err(N.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=E.DATA;break}case b.EOF:{this._err(N.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 b.APOSTROPHE:{this.state=E.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case b.NULL:{this._err(N.unexpectedNullCharacter),n.publicId+=ve;break}case b.GREATER_THAN_SIGN:{this._err(N.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=E.DATA;break}case b.EOF:{this._err(N.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 b.SPACE:case b.LINE_FEED:case b.TABULATION:case b.FORM_FEED:{this.state=E.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break}case b.GREATER_THAN_SIGN:{this.state=E.DATA,this.emitCurrentDoctype(n);break}case b.QUOTATION_MARK:{this._err(N.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=E.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case b.APOSTROPHE:{this._err(N.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=E.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case b.EOF:{this._err(N.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(N.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=E.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBetweenDoctypePublicAndSystemIdentifiers(t){const n=this.currentToken;switch(t){case b.SPACE:case b.LINE_FEED:case b.TABULATION:case b.FORM_FEED:break;case b.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=E.DATA;break}case b.QUOTATION_MARK:{n.systemId="",this.state=E.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case b.APOSTROPHE:{n.systemId="",this.state=E.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case b.EOF:{this._err(N.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(N.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=E.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateAfterDoctypeSystemKeyword(t){const n=this.currentToken;switch(t){case b.SPACE:case b.LINE_FEED:case b.TABULATION:case b.FORM_FEED:{this.state=E.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break}case b.QUOTATION_MARK:{this._err(N.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=E.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case b.APOSTROPHE:{this._err(N.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=E.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case b.GREATER_THAN_SIGN:{this._err(N.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=E.DATA,this.emitCurrentDoctype(n);break}case b.EOF:{this._err(N.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(N.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=E.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case b.SPACE:case b.LINE_FEED:case b.TABULATION:case b.FORM_FEED:break;case b.QUOTATION_MARK:{n.systemId="",this.state=E.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case b.APOSTROPHE:{n.systemId="",this.state=E.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case b.GREATER_THAN_SIGN:{this._err(N.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=E.DATA,this.emitCurrentDoctype(n);break}case b.EOF:{this._err(N.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(N.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=E.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypeSystemIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case b.QUOTATION_MARK:{this.state=E.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case b.NULL:{this._err(N.unexpectedNullCharacter),n.systemId+=ve;break}case b.GREATER_THAN_SIGN:{this._err(N.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=E.DATA;break}case b.EOF:{this._err(N.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 b.APOSTROPHE:{this.state=E.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case b.NULL:{this._err(N.unexpectedNullCharacter),n.systemId+=ve;break}case b.GREATER_THAN_SIGN:{this._err(N.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=E.DATA;break}case b.EOF:{this._err(N.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 b.SPACE:case b.LINE_FEED:case b.TABULATION:case b.FORM_FEED:break;case b.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=E.DATA;break}case b.EOF:{this._err(N.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(N.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=E.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBogusDoctype(t){const n=this.currentToken;switch(t){case b.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=E.DATA;break}case b.NULL:{this._err(N.unexpectedNullCharacter);break}case b.EOF:{this.emitCurrentDoctype(n),this._emitEOFToken();break}}}_stateCdataSection(t){switch(t){case b.RIGHT_SQUARE_BRACKET:{this.state=E.CDATA_SECTION_BRACKET;break}case b.EOF:{this._err(N.eofInCdata),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateCdataSectionBracket(t){t===b.RIGHT_SQUARE_BRACKET?this.state=E.CDATA_SECTION_END:(this._emitChars("]"),this.state=E.CDATA_SECTION,this._stateCdataSection(t))}_stateCdataSectionEnd(t){switch(t){case b.GREATER_THAN_SIGN:{this.state=E.DATA;break}case b.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(b.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&Uo(this.preprocessor.peek(1))?E.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(t){Uo(t)?this._flushCodePointConsumedAsCharacterReference(t):(t===b.SEMICOLON&&this._err(N.unknownNamedCharacterReference),this.state=this.returnState,this._callState(t))}}const Wc=new Set([l.DD,l.DT,l.LI,l.OPTGROUP,l.OPTION,l.P,l.RB,l.RP,l.RT,l.RTC]),$o=new Set([...Wc,l.CAPTION,l.COLGROUP,l.TBODY,l.TD,l.TFOOT,l.TH,l.THEAD,l.TR]),ci=new Set([l.APPLET,l.CAPTION,l.HTML,l.MARQUEE,l.OBJECT,l.TABLE,l.TD,l.TEMPLATE,l.TH]),km=new Set([...ci,l.OL,l.UL]),ym=new Set([...ci,l.BUTTON]),Yo=new Set([l.ANNOTATION_XML,l.MI,l.MN,l.MO,l.MS,l.MTEXT]),jo=new Set([l.DESC,l.FOREIGN_OBJECT,l.TITLE]),xm=new Set([l.TR,l.TEMPLATE,l.HTML]),wm=new Set([l.TBODY,l.TFOOT,l.THEAD,l.TEMPLATE,l.HTML]),Am=new Set([l.TABLE,l.TEMPLATE,l.HTML]),Cm=new Set([l.TD,l.TH]);class vm{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)===D.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.current&&this.currentTagId!==void 0&&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])!==D.HTML);this.shortenToLength(Math.max(n,0))}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(Math.max(n,0))}popUntilPopped(t,n){const r=this._indexOfTagNames(t,n);this.shortenToLength(Math.max(r,0))}popUntilNumberedHeaderPopped(){this.popUntilPopped(Ra,D.HTML)}popUntilTableCellPopped(){this.popUntilPopped(Cm,D.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(Am,D.HTML)}clearBackToTableBodyContext(){this.clearBackTo(wm,D.HTML)}clearBackToTableRowContext(){this.clearBackTo(xm,D.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 D.HTML:{if(i===t)return!0;if(n.has(i))return!1;break}case D.SVG:{if(jo.has(i))return!1;break}case D.MATHML:{if(Yo.has(i))return!1;break}}}return!0}hasInScope(t){return this.hasInDynamicScope(t,ci)}hasInListItemScope(t){return this.hasInDynamicScope(t,km)}hasInButtonScope(t){return this.hasInDynamicScope(t,ym)}hasNumberedHeaderInScope(){for(let t=this.stackTop;t>=0;t--){const n=this.tagIDs[t];switch(this.treeAdapter.getNamespaceURI(this.items[t])){case D.HTML:{if(Ra.has(n))return!0;if(ci.has(n))return!1;break}case D.SVG:{if(jo.has(n))return!1;break}case D.MATHML:{if(Yo.has(n))return!1;break}}}return!0}hasInTableScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===D.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])===D.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])===D.HTML)switch(this.tagIDs[n]){case t:return!0;case l.OPTION:case l.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;this.currentTagId!==void 0&&Wc.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&$o.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(t){for(;this.currentTagId!==void 0&&this.currentTagId!==t&&$o.has(this.currentTagId);)this.pop()}}const Zi=3;var Et;(function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"})(Et||(Et={}));const Vo={type:Et.Marker};class Sm{constructor(t){this.treeAdapter=t,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(t,n){const r=[],i=n.length,a=this.treeAdapter.getTagName(t),s=this.treeAdapter.getNamespaceURI(t);for(let o=0;o<this.entries.length;o++){const u=this.entries[o];if(u.type===Et.Marker)break;const{element:c}=u;if(this.treeAdapter.getTagName(c)===a&&this.treeAdapter.getNamespaceURI(c)===s){const h=this.treeAdapter.getAttrList(c);h.length===i&&r.push({idx:o,attrs:h})}}return r}_ensureNoahArkCondition(t){if(this.entries.length<Zi)return;const n=this.treeAdapter.getAttrList(t),r=this._getNoahArkConditionCandidates(t,n);if(r.length<Zi)return;const i=new Map(n.map(s=>[s.name,s.value]));let a=0;for(let s=0;s<r.length;s++){const o=r[s];o.attrs.every(u=>i.get(u.name)===u.value)&&(a+=1,a>=Zi&&this.entries.splice(o.idx,1))}}insertMarker(){this.entries.unshift(Vo)}pushElement(t,n){this._ensureNoahArkCondition(t),this.entries.unshift({type:Et.Element,element:t,token:n})}insertElementAfterBookmark(t,n){const r=this.entries.indexOf(this.bookmark);this.entries.splice(r,0,{type:Et.Element,element:t,token:n})}removeEntry(t){const n=this.entries.indexOf(t);n!==-1&&this.entries.splice(n,1)}clearToLastMarker(){const t=this.entries.indexOf(Vo);t===-1?this.entries.length=0:this.entries.splice(0,t+1)}getElementEntryInScopeWithTagName(t){const n=this.entries.find(r=>r.type===Et.Marker||this.treeAdapter.getTagName(r.element)===t);return n&&n.type===Et.Element?n:null}getElementEntry(t){return this.entries.find(n=>n.type===Et.Element&&n.element===t)}}const Bt={createDocument(){return{nodeName:"#document",mode:at.NO_QUIRKS,childNodes:[]}},createDocumentFragment(){return{nodeName:"#document-fragment",childNodes:[]}},createElement(e,t,n){return{nodeName:e,tagName:e,attrs:n,namespaceURI:t,childNodes:[],parentNode:null}},createCommentNode(e){return{nodeName:"#comment",data:e,parentNode:null}},createTextNode(e){return{nodeName:"#text",value:e,parentNode:null}},appendChild(e,t){e.childNodes.push(t),t.parentNode=e},insertBefore(e,t,n){const r=e.childNodes.indexOf(n);e.childNodes.splice(r,0,t),t.parentNode=e},setTemplateContent(e,t){e.content=t},getTemplateContent(e){return e.content},setDocumentType(e,t,n,r){const i=e.childNodes.find(a=>a.nodeName==="#documentType");if(i)i.name=t,i.publicId=n,i.systemId=r;else{const a={nodeName:"#documentType",name:t,publicId:n,systemId:r,parentNode:null};Bt.appendChild(e,a)}},setDocumentMode(e,t){e.mode=t},getDocumentMode(e){return e.mode},detachNode(e){if(e.parentNode){const t=e.parentNode.childNodes.indexOf(e);e.parentNode.childNodes.splice(t,1),e.parentNode=null}},insertText(e,t){if(e.childNodes.length>0){const n=e.childNodes[e.childNodes.length-1];if(Bt.isTextNode(n)){n.value+=t;return}}Bt.appendChild(e,Bt.createTextNode(t))},insertTextBefore(e,t,n){const r=e.childNodes[e.childNodes.indexOf(n)-1];r&&Bt.isTextNode(r)?r.value+=t:Bt.insertBefore(e,Bt.createTextNode(t),n)},adoptAttributes(e,t){const n=new Set(e.attrs.map(r=>r.name));for(let r=0;r<t.length;r++)n.has(t[r].name)||e.attrs.push(t[r])},getFirstChild(e){return e.childNodes[0]},getChildNodes(e){return e.childNodes},getParentNode(e){return e.parentNode},getAttrList(e){return e.attrs},getTagName(e){return e.tagName},getNamespaceURI(e){return e.namespaceURI},getTextNodeContent(e){return e.value},getCommentNodeContent(e){return e.data},getDocumentTypeNodeName(e){return e.name},getDocumentTypeNodePublicId(e){return e.publicId},getDocumentTypeNodeSystemId(e){return e.systemId},isTextNode(e){return e.nodeName==="#text"},isCommentNode(e){return e.nodeName==="#comment"},isDocumentTypeNode(e){return e.nodeName==="#documentType"},isElementNode(e){return Object.prototype.hasOwnProperty.call(e,"tagName")},setNodeSourceCodeLocation(e,t){e.sourceCodeLocation=t},getNodeSourceCodeLocation(e){return e.sourceCodeLocation},updateNodeSourceCodeLocation(e,t){e.sourceCodeLocation={...e.sourceCodeLocation,...t}}},Gc="html",Im="about:legacy-compat",Nm="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",Kc=["+//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//"],Lm=[...Kc,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],Rm=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),Qc=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],Om=[...Qc,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function qo(e,t){return t.some(n=>e.startsWith(n))}function Dm(e){return e.name===Gc&&e.publicId===null&&(e.systemId===null||e.systemId===Im)}function Pm(e){if(e.name!==Gc)return at.QUIRKS;const{systemId:t}=e;if(t&&t.toLowerCase()===Nm)return at.QUIRKS;let{publicId:n}=e;if(n!==null){if(n=n.toLowerCase(),Rm.has(n))return at.QUIRKS;let r=t===null?Lm:Kc;if(qo(n,r))return at.QUIRKS;if(r=t===null?Qc:Om,qo(n,r))return at.LIMITED_QUIRKS}return at.NO_QUIRKS}const Wo={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},Mm="definitionurl",Bm="definitionURL",Fm=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])),Hm=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:D.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:D.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:D.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:D.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:D.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:D.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:D.XLINK}],["xml:lang",{prefix:"xml",name:"lang",namespace:D.XML}],["xml:space",{prefix:"xml",name:"space",namespace:D.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:D.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:D.XMLNS}]]),Um=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])),zm=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 $m(e){const t=e.tagID;return t===l.FONT&&e.attrs.some(({name:r})=>r===nn.COLOR||r===nn.SIZE||r===nn.FACE)||zm.has(t)}function Xc(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===Mm){e.attrs[t].name=Bm;break}}function Zc(e){for(let t=0;t<e.attrs.length;t++){const n=Fm.get(e.attrs[t].name);n!=null&&(e.attrs[t].name=n)}}function Es(e){for(let t=0;t<e.attrs.length;t++){const n=Hm.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 Ym(e){const t=Um.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=On(e.tagName))}function jm(e,t){return t===D.MATHML&&(e===l.MI||e===l.MO||e===l.MN||e===l.MS||e===l.MTEXT)}function Vm(e,t,n){if(t===D.MATHML&&e===l.ANNOTATION_XML){for(let r=0;r<n.length;r++)if(n[r].name===nn.ENCODING){const i=n[r].value.toLowerCase();return i===Wo.TEXT_HTML||i===Wo.APPLICATION_XML}}return t===D.SVG&&(e===l.FOREIGN_OBJECT||e===l.DESC||e===l.TITLE)}function qm(e,t,n,r){return(!r||r===D.HTML)&&Vm(e,t,n)||(!r||r===D.MATHML)&&jm(e,t)}const Wm="hidden",Gm=8,Km=3;var T;(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"})(T||(T={}));const Qm={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},Jc=new Set([l.TABLE,l.TBODY,l.TFOOT,l.THEAD,l.TR]),Go={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:Bt,onParseError:null};class Ko{constructor(t,n,r=null,i=null){this.fragmentContext=r,this.scriptHandler=i,this.currentToken=null,this.stopped=!1,this.insertionMode=T.INITIAL,this.originalInsertionMode=T.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={...Go,...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 Tm(this.options,this),this.activeFormattingElements=new Sm(this.treeAdapter),this.fragmentContextID=r?On(this.treeAdapter.getTagName(r)):l.UNKNOWN,this._setContextModes(r??this.document,this.fragmentContextID),this.openElements=new vm(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={...Go,...n};t??(t=r.treeAdapter.createElement(S.TEMPLATE,D.HTML,[]));const i=r.treeAdapter.createElement("documentmock",D.HTML,[]),a=new this(r,i,t);return a.fragmentContextID===l.TEMPLATE&&a.tmplInsertionModeStack.unshift(T.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:Qm,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||t&&this.treeAdapter.getNamespaceURI(t)===D.HTML;this.currentNotInHTML=!r,this.tokenizer.inForeignNode=!r&&t!==void 0&&n!==void 0&&!this._isIntegrationPoint(n,t)}_switchToTextParsing(t,n){this._insertElement(t,D.HTML),this.tokenizer.state=n,this.originalInsertionMode=this.insertionMode,this.insertionMode=T.TEXT}switchToPlaintextParsing(){this.insertionMode=T.TEXT,this.originalInsertionMode=T.IN_BODY,this.tokenizer.state=Oe.PLAINTEXT}_getAdjustedCurrentElement(){return this.openElements.stackTop===0&&this.fragmentContext?this.fragmentContext:this.openElements.current}_findFormInFragmentContext(){let t=this.fragmentContext;for(;t;){if(this.treeAdapter.getTagName(t)===S.FORM){this.formElement=t;break}t=this.treeAdapter.getParentNode(t)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==D.HTML))switch(this.fragmentContextID){case l.TITLE:case l.TEXTAREA:{this.tokenizer.state=Oe.RCDATA;break}case l.STYLE:case l.XMP:case l.IFRAME:case l.NOEMBED:case l.NOFRAMES:case l.NOSCRIPT:{this.tokenizer.state=Oe.RAWTEXT;break}case l.SCRIPT:{this.tokenizer.state=Oe.SCRIPT_DATA;break}case l.PLAINTEXT:{this.tokenizer.state=Oe.PLAINTEXT;break}}}_setDocumentType(t){const n=t.name||"",r=t.publicId||"",i=t.systemId||"";if(this.treeAdapter.setDocumentType(this.document,n,r,i),t.location){const s=this.treeAdapter.getChildNodes(this.document).find(o=>this.treeAdapter.isDocumentTypeNode(o));s&&this.treeAdapter.setNodeSourceCodeLocation(s,t.location)}}_attachElementToTree(t,n){if(this.options.sourceCodeLocationInfo){const r=n&&{...n,startTag:n};this.treeAdapter.setNodeSourceCodeLocation(t,r)}if(this._shouldFosterParentOnInsertion())this._fosterParentElement(t);else{const r=this.openElements.currentTmplContentOrNode;this.treeAdapter.appendChild(r??this.document,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,D.HTML,[]);this._attachElementToTree(r,null),this.openElements.push(r,n)}_insertTemplate(t){const n=this.treeAdapter.createElement(t.tagName,D.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(S.HTML,D.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(t,null),this.treeAdapter.appendChild(this.openElements.current,t),this.openElements.push(t,l.HTML)}_appendCommentNode(t,n){const r=this.treeAdapter.createCommentNode(t.data);this.treeAdapter.appendChild(n,r),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(r,t.location)}_insertCharacters(t){let n,r;if(this._shouldFosterParentOnInsertion()?({parent:n,beforeElement:r}=this._findFosterParentingLocation(),r?this.treeAdapter.insertTextBefore(n,t.chars,r):this.treeAdapter.insertText(n,t.chars)):(n=this.openElements.currentTmplContentOrNode,this.treeAdapter.insertText(n,t.chars)),!t.location)return;const i=this.treeAdapter.getChildNodes(n),a=r?i.lastIndexOf(r):i.length,s=i[a-1];if(this.treeAdapter.getNodeSourceCodeLocation(s)){const{endLine:u,endCol:c,endOffset:h}=t.location;this.treeAdapter.updateNodeSourceCodeLocation(s,{endLine:u,endCol:c,endOffset:h})}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===se.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)===S.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(n)===D.MATHML?!1:this.tokenizer.inForeignNode||(t.tagID===l.MGLYPH||t.tagID===l.MALIGNMARK)&&r!==void 0&&!this._isIntegrationPoint(r,n,D.HTML)}_processToken(t){switch(t.type){case se.CHARACTER:{this.onCharacter(t);break}case se.NULL_CHARACTER:{this.onNullCharacter(t);break}case se.COMMENT:{this.onComment(t);break}case se.DOCTYPE:{this.onDoctype(t);break}case se.START_TAG:{this._processStartTag(t);break}case se.END_TAG:{this.onEndTag(t);break}case se.EOF:{this.onEof(t);break}case se.WHITESPACE_CHARACTER:{this.onWhitespaceCharacter(t);break}}}_isIntegrationPoint(t,n,r){const i=this.treeAdapter.getNamespaceURI(n),a=this.treeAdapter.getAttrList(n);return qm(t,i,a,r)}_reconstructActiveFormattingElements(){const t=this.activeFormattingElements.entries.length;if(t){const n=this.activeFormattingElements.entries.findIndex(i=>i.type===Et.Marker||this.openElements.contains(i.element)),r=n===-1?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=T.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=T.IN_ROW;return}case l.TBODY:case l.THEAD:case l.TFOOT:{this.insertionMode=T.IN_TABLE_BODY;return}case l.CAPTION:{this.insertionMode=T.IN_CAPTION;return}case l.COLGROUP:{this.insertionMode=T.IN_COLUMN_GROUP;return}case l.TABLE:{this.insertionMode=T.IN_TABLE;return}case l.BODY:{this.insertionMode=T.IN_BODY;return}case l.FRAMESET:{this.insertionMode=T.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?T.AFTER_HEAD:T.BEFORE_HEAD;return}case l.TD:case l.TH:{if(t>0){this.insertionMode=T.IN_CELL;return}break}case l.HEAD:{if(t>0){this.insertionMode=T.IN_HEAD;return}break}}this.insertionMode=T.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=T.IN_SELECT_IN_TABLE;return}}this.insertionMode=T.IN_SELECT}_isElementCausesFosterParenting(t){return Jc.has(t)}_shouldFosterParentOnInsertion(){return this.fosterParentingEnabled&&this.openElements.currentTagId!==void 0&&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)===D.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 gm[r].has(n)}onCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){Cg(this,t);return}switch(this.insertionMode){case T.INITIAL:{zn(this,t);break}case T.BEFORE_HTML:{tr(this,t);break}case T.BEFORE_HEAD:{nr(this,t);break}case T.IN_HEAD:{rr(this,t);break}case T.IN_HEAD_NO_SCRIPT:{ir(this,t);break}case T.AFTER_HEAD:{ar(this,t);break}case T.IN_BODY:case T.IN_CAPTION:case T.IN_CELL:case T.IN_TEMPLATE:{td(this,t);break}case T.TEXT:case T.IN_SELECT:case T.IN_SELECT_IN_TABLE:{this._insertCharacters(t);break}case T.IN_TABLE:case T.IN_TABLE_BODY:case T.IN_ROW:{Ji(this,t);break}case T.IN_TABLE_TEXT:{od(this,t);break}case T.IN_COLUMN_GROUP:{di(this,t);break}case T.AFTER_BODY:{hi(this,t);break}case T.AFTER_AFTER_BODY:{Qr(this,t);break}}}onNullCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){Ag(this,t);return}switch(this.insertionMode){case T.INITIAL:{zn(this,t);break}case T.BEFORE_HTML:{tr(this,t);break}case T.BEFORE_HEAD:{nr(this,t);break}case T.IN_HEAD:{rr(this,t);break}case T.IN_HEAD_NO_SCRIPT:{ir(this,t);break}case T.AFTER_HEAD:{ar(this,t);break}case T.TEXT:{this._insertCharacters(t);break}case T.IN_TABLE:case T.IN_TABLE_BODY:case T.IN_ROW:{Ji(this,t);break}case T.IN_COLUMN_GROUP:{di(this,t);break}case T.AFTER_BODY:{hi(this,t);break}case T.AFTER_AFTER_BODY:{Qr(this,t);break}}}onComment(t){if(this.skipNextNewLine=!1,this.currentNotInHTML){Oa(this,t);return}switch(this.insertionMode){case T.INITIAL:case T.BEFORE_HTML:case T.BEFORE_HEAD:case T.IN_HEAD:case T.IN_HEAD_NO_SCRIPT:case T.AFTER_HEAD:case T.IN_BODY:case T.IN_TABLE:case T.IN_CAPTION:case T.IN_COLUMN_GROUP:case T.IN_TABLE_BODY:case T.IN_ROW:case T.IN_CELL:case T.IN_SELECT:case T.IN_SELECT_IN_TABLE:case T.IN_TEMPLATE:case T.IN_FRAMESET:case T.AFTER_FRAMESET:{Oa(this,t);break}case T.IN_TABLE_TEXT:{$n(this,t);break}case T.AFTER_BODY:{r1(this,t);break}case T.AFTER_AFTER_BODY:case T.AFTER_AFTER_FRAMESET:{i1(this,t);break}}}onDoctype(t){switch(this.skipNextNewLine=!1,this.insertionMode){case T.INITIAL:{a1(this,t);break}case T.BEFORE_HEAD:case T.IN_HEAD:case T.IN_HEAD_NO_SCRIPT:case T.AFTER_HEAD:{this._err(t,N.misplacedDoctype);break}case T.IN_TABLE_TEXT:{$n(this,t);break}}}onStartTag(t){this.skipNextNewLine=!1,this.currentToken=t,this._processStartTag(t),t.selfClosing&&!t.ackSelfClosing&&this._err(t,N.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(t){this.shouldProcessStartTagTokenInForeignContent(t)?vg(this,t):this._startTagOutsideForeignContent(t)}_startTagOutsideForeignContent(t){switch(this.insertionMode){case T.INITIAL:{zn(this,t);break}case T.BEFORE_HTML:{s1(this,t);break}case T.BEFORE_HEAD:{u1(this,t);break}case T.IN_HEAD:{pt(this,t);break}case T.IN_HEAD_NO_SCRIPT:{d1(this,t);break}case T.AFTER_HEAD:{f1(this,t);break}case T.IN_BODY:{Ve(this,t);break}case T.IN_TABLE:{An(this,t);break}case T.IN_TABLE_TEXT:{$n(this,t);break}case T.IN_CAPTION:{lg(this,t);break}case T.IN_COLUMN_GROUP:{ks(this,t);break}case T.IN_TABLE_BODY:{Oi(this,t);break}case T.IN_ROW:{Di(this,t);break}case T.IN_CELL:{hg(this,t);break}case T.IN_SELECT:{cd(this,t);break}case T.IN_SELECT_IN_TABLE:{pg(this,t);break}case T.IN_TEMPLATE:{gg(this,t);break}case T.AFTER_BODY:{Eg(this,t);break}case T.IN_FRAMESET:{_g(this,t);break}case T.AFTER_FRAMESET:{kg(this,t);break}case T.AFTER_AFTER_BODY:{xg(this,t);break}case T.AFTER_AFTER_FRAMESET:{wg(this,t);break}}}onEndTag(t){this.skipNextNewLine=!1,this.currentToken=t,this.currentNotInHTML?Sg(this,t):this._endTagOutsideForeignContent(t)}_endTagOutsideForeignContent(t){switch(this.insertionMode){case T.INITIAL:{zn(this,t);break}case T.BEFORE_HTML:{o1(this,t);break}case T.BEFORE_HEAD:{l1(this,t);break}case T.IN_HEAD:{c1(this,t);break}case T.IN_HEAD_NO_SCRIPT:{h1(this,t);break}case T.AFTER_HEAD:{p1(this,t);break}case T.IN_BODY:{Ri(this,t);break}case T.TEXT:{J1(this,t);break}case T.IN_TABLE:{pr(this,t);break}case T.IN_TABLE_TEXT:{$n(this,t);break}case T.IN_CAPTION:{cg(this,t);break}case T.IN_COLUMN_GROUP:{dg(this,t);break}case T.IN_TABLE_BODY:{Da(this,t);break}case T.IN_ROW:{ld(this,t);break}case T.IN_CELL:{fg(this,t);break}case T.IN_SELECT:{dd(this,t);break}case T.IN_SELECT_IN_TABLE:{mg(this,t);break}case T.IN_TEMPLATE:{bg(this,t);break}case T.AFTER_BODY:{fd(this,t);break}case T.IN_FRAMESET:{Tg(this,t);break}case T.AFTER_FRAMESET:{yg(this,t);break}case T.AFTER_AFTER_BODY:{Qr(this,t);break}}}onEof(t){switch(this.insertionMode){case T.INITIAL:{zn(this,t);break}case T.BEFORE_HTML:{tr(this,t);break}case T.BEFORE_HEAD:{nr(this,t);break}case T.IN_HEAD:{rr(this,t);break}case T.IN_HEAD_NO_SCRIPT:{ir(this,t);break}case T.AFTER_HEAD:{ar(this,t);break}case T.IN_BODY:case T.IN_TABLE:case T.IN_CAPTION:case T.IN_COLUMN_GROUP:case T.IN_TABLE_BODY:case T.IN_ROW:case T.IN_CELL:case T.IN_SELECT:case T.IN_SELECT_IN_TABLE:{ad(this,t);break}case T.TEXT:{eg(this,t);break}case T.IN_TABLE_TEXT:{$n(this,t);break}case T.IN_TEMPLATE:{hd(this,t);break}case T.AFTER_BODY:case T.IN_FRAMESET:case T.AFTER_FRAMESET:case T.AFTER_AFTER_BODY:case T.AFTER_AFTER_FRAMESET:{Ts(this,t);break}}}onWhitespaceCharacter(t){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,t.chars.charCodeAt(0)===b.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 T.IN_HEAD:case T.IN_HEAD_NO_SCRIPT:case T.AFTER_HEAD:case T.TEXT:case T.IN_COLUMN_GROUP:case T.IN_SELECT:case T.IN_SELECT_IN_TABLE:case T.IN_FRAMESET:case T.AFTER_FRAMESET:{this._insertCharacters(t);break}case T.IN_BODY:case T.IN_CAPTION:case T.IN_CELL:case T.IN_TEMPLATE:case T.AFTER_BODY:case T.AFTER_AFTER_BODY:case T.AFTER_AFTER_FRAMESET:{ed(this,t);break}case T.IN_TABLE:case T.IN_TABLE_BODY:case T.IN_ROW:{Ji(this,t);break}case T.IN_TABLE_TEXT:{sd(this,t);break}}}}function Xm(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):id(e,t),n}function Zm(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(Math.max(r,0)),e.activeFormattingElements.removeEntry(t)),n}function Jm(e,t,n){let r=t,i=e.openElements.getCommonAncestor(t);for(let a=0,s=i;s!==n;a++,s=i){i=e.openElements.getCommonAncestor(s);const o=e.activeFormattingElements.getElementEntry(s),u=o&&a>=Km;!o||u?(u&&e.activeFormattingElements.removeEntry(o),e.openElements.remove(s)):(s=e1(e,o),r===t&&(e.activeFormattingElements.bookmark=o),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(s,r),r=s)}return r}function e1(e,t){const n=e.treeAdapter.getNamespaceURI(t.element),r=e.treeAdapter.createElement(t.token.tagName,n,t.token.attrs);return e.openElements.replace(t.element,r),t.element=r,r}function t1(e,t,n){const r=e.treeAdapter.getTagName(t),i=On(r);if(e._isElementCausesFosterParenting(i))e._fosterParentElement(n);else{const a=e.treeAdapter.getNamespaceURI(t);i===l.TEMPLATE&&a===D.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function n1(e,t,n){const r=e.treeAdapter.getNamespaceURI(n.element),{token:i}=n,a=e.treeAdapter.createElement(i.tagName,r,i.attrs);e._adoptNodes(t,a),e.treeAdapter.appendChild(t,a),e.activeFormattingElements.insertElementAfterBookmark(a,i),e.activeFormattingElements.removeEntry(n),e.openElements.remove(n.element),e.openElements.insertAfter(t,a,i.tagID)}function _s(e,t){for(let n=0;n<Gm;n++){const r=Xm(e,t);if(!r)break;const i=Zm(e,r);if(!i)break;e.activeFormattingElements.bookmark=r;const a=Jm(e,i,r.element),s=e.openElements.getCommonAncestor(r.element);e.treeAdapter.detachNode(a),s&&t1(e,s,a),n1(e,i,r)}}function Oa(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function r1(e,t){e._appendCommentNode(t,e.openElements.items[0])}function i1(e,t){e._appendCommentNode(t,e.document)}function Ts(e,t){if(e.stopped=!0,t.location){const n=e.fragmentContext?0:2;for(let r=e.openElements.stackTop;r>=n;r--)e._setEndLocation(e.openElements.items[r],t);if(!e.fragmentContext&&e.openElements.stackTop>=0){const r=e.openElements.items[0],i=e.treeAdapter.getNodeSourceCodeLocation(r);if(i&&!i.endTag&&(e._setEndLocation(r,t),e.openElements.stackTop>=1)){const a=e.openElements.items[1],s=e.treeAdapter.getNodeSourceCodeLocation(a);s&&!s.endTag&&e._setEndLocation(a,t)}}}}function a1(e,t){e._setDocumentType(t);const n=t.forceQuirks?at.QUIRKS:Pm(t);Dm(t)||e._err(t,N.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=T.BEFORE_HTML}function zn(e,t){e._err(t,N.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,at.QUIRKS),e.insertionMode=T.BEFORE_HTML,e._processToken(t)}function s1(e,t){t.tagID===l.HTML?(e._insertElement(t,D.HTML),e.insertionMode=T.BEFORE_HEAD):tr(e,t)}function o1(e,t){const n=t.tagID;(n===l.HTML||n===l.HEAD||n===l.BODY||n===l.BR)&&tr(e,t)}function tr(e,t){e._insertFakeRootElement(),e.insertionMode=T.BEFORE_HEAD,e._processToken(t)}function u1(e,t){switch(t.tagID){case l.HTML:{Ve(e,t);break}case l.HEAD:{e._insertElement(t,D.HTML),e.headElement=e.openElements.current,e.insertionMode=T.IN_HEAD;break}default:nr(e,t)}}function l1(e,t){const n=t.tagID;n===l.HEAD||n===l.BODY||n===l.HTML||n===l.BR?nr(e,t):e._err(t,N.endTagWithoutMatchingOpenElement)}function nr(e,t){e._insertFakeElement(S.HEAD,l.HEAD),e.headElement=e.openElements.current,e.insertionMode=T.IN_HEAD,e._processToken(t)}function pt(e,t){switch(t.tagID){case l.HTML:{Ve(e,t);break}case l.BASE:case l.BASEFONT:case l.BGSOUND:case l.LINK:case l.META:{e._appendElement(t,D.HTML),t.ackSelfClosing=!0;break}case l.TITLE:{e._switchToTextParsing(t,Oe.RCDATA);break}case l.NOSCRIPT:{e.options.scriptingEnabled?e._switchToTextParsing(t,Oe.RAWTEXT):(e._insertElement(t,D.HTML),e.insertionMode=T.IN_HEAD_NO_SCRIPT);break}case l.NOFRAMES:case l.STYLE:{e._switchToTextParsing(t,Oe.RAWTEXT);break}case l.SCRIPT:{e._switchToTextParsing(t,Oe.SCRIPT_DATA);break}case l.TEMPLATE:{e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=T.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(T.IN_TEMPLATE);break}case l.HEAD:{e._err(t,N.misplacedStartTagForHeadElement);break}default:rr(e,t)}}function c1(e,t){switch(t.tagID){case l.HEAD:{e.openElements.pop(),e.insertionMode=T.AFTER_HEAD;break}case l.BODY:case l.BR:case l.HTML:{rr(e,t);break}case l.TEMPLATE:{ln(e,t);break}default:e._err(t,N.endTagWithoutMatchingOpenElement)}}function ln(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==l.TEMPLATE&&e._err(t,N.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(l.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,N.endTagWithoutMatchingOpenElement)}function rr(e,t){e.openElements.pop(),e.insertionMode=T.AFTER_HEAD,e._processToken(t)}function d1(e,t){switch(t.tagID){case l.HTML:{Ve(e,t);break}case l.BASEFONT:case l.BGSOUND:case l.HEAD:case l.LINK:case l.META:case l.NOFRAMES:case l.STYLE:{pt(e,t);break}case l.NOSCRIPT:{e._err(t,N.nestedNoscriptInHead);break}default:ir(e,t)}}function h1(e,t){switch(t.tagID){case l.NOSCRIPT:{e.openElements.pop(),e.insertionMode=T.IN_HEAD;break}case l.BR:{ir(e,t);break}default:e._err(t,N.endTagWithoutMatchingOpenElement)}}function ir(e,t){const n=t.type===se.EOF?N.openElementsLeftAfterEof:N.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=T.IN_HEAD,e._processToken(t)}function f1(e,t){switch(t.tagID){case l.HTML:{Ve(e,t);break}case l.BODY:{e._insertElement(t,D.HTML),e.framesetOk=!1,e.insertionMode=T.IN_BODY;break}case l.FRAMESET:{e._insertElement(t,D.HTML),e.insertionMode=T.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,N.abandonedHeadElementChild),e.openElements.push(e.headElement,l.HEAD),pt(e,t),e.openElements.remove(e.headElement);break}case l.HEAD:{e._err(t,N.misplacedStartTagForHeadElement);break}default:ar(e,t)}}function p1(e,t){switch(t.tagID){case l.BODY:case l.HTML:case l.BR:{ar(e,t);break}case l.TEMPLATE:{ln(e,t);break}default:e._err(t,N.endTagWithoutMatchingOpenElement)}}function ar(e,t){e._insertFakeElement(S.BODY,l.BODY),e.insertionMode=T.IN_BODY,Li(e,t)}function Li(e,t){switch(t.type){case se.CHARACTER:{td(e,t);break}case se.WHITESPACE_CHARACTER:{ed(e,t);break}case se.COMMENT:{Oa(e,t);break}case se.START_TAG:{Ve(e,t);break}case se.END_TAG:{Ri(e,t);break}case se.EOF:{ad(e,t);break}}}function ed(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function td(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function m1(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function g1(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}function b1(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,D.HTML),e.insertionMode=T.IN_FRAMESET)}function E1(e,t){e.openElements.hasInButtonScope(l.P)&&e._closePElement(),e._insertElement(t,D.HTML)}function _1(e,t){e.openElements.hasInButtonScope(l.P)&&e._closePElement(),e.openElements.currentTagId!==void 0&&Ra.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,D.HTML)}function T1(e,t){e.openElements.hasInButtonScope(l.P)&&e._closePElement(),e._insertElement(t,D.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function k1(e,t){const n=e.openElements.tmplCount>0;(!e.formElement||n)&&(e.openElements.hasInButtonScope(l.P)&&e._closePElement(),e._insertElement(t,D.HTML),n||(e.formElement=e.openElements.current))}function y1(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,D.HTML)}function x1(e,t){e.openElements.hasInButtonScope(l.P)&&e._closePElement(),e._insertElement(t,D.HTML),e.tokenizer.state=Oe.PLAINTEXT}function w1(e,t){e.openElements.hasInScope(l.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(l.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,D.HTML),e.framesetOk=!1}function A1(e,t){const n=e.activeFormattingElements.getElementEntryInScopeWithTagName(S.A);n&&(_s(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,D.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function C1(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,D.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function v1(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(l.NOBR)&&(_s(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,D.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function S1(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,D.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function I1(e,t){e.treeAdapter.getDocumentMode(e.document)!==at.QUIRKS&&e.openElements.hasInButtonScope(l.P)&&e._closePElement(),e._insertElement(t,D.HTML),e.framesetOk=!1,e.insertionMode=T.IN_TABLE}function nd(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,D.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function rd(e){const t=Vc(e,nn.TYPE);return t!=null&&t.toLowerCase()===Wm}function N1(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,D.HTML),rd(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function L1(e,t){e._appendElement(t,D.HTML),t.ackSelfClosing=!0}function R1(e,t){e.openElements.hasInButtonScope(l.P)&&e._closePElement(),e._appendElement(t,D.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function O1(e,t){t.tagName=S.IMG,t.tagID=l.IMG,nd(e,t)}function D1(e,t){e._insertElement(t,D.HTML),e.skipNextNewLine=!0,e.tokenizer.state=Oe.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=T.TEXT}function P1(e,t){e.openElements.hasInButtonScope(l.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,Oe.RAWTEXT)}function M1(e,t){e.framesetOk=!1,e._switchToTextParsing(t,Oe.RAWTEXT)}function Qo(e,t){e._switchToTextParsing(t,Oe.RAWTEXT)}function B1(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,D.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===T.IN_TABLE||e.insertionMode===T.IN_CAPTION||e.insertionMode===T.IN_TABLE_BODY||e.insertionMode===T.IN_ROW||e.insertionMode===T.IN_CELL?T.IN_SELECT_IN_TABLE:T.IN_SELECT}function F1(e,t){e.openElements.currentTagId===l.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,D.HTML)}function H1(e,t){e.openElements.hasInScope(l.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,D.HTML)}function U1(e,t){e.openElements.hasInScope(l.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(l.RTC),e._insertElement(t,D.HTML)}function z1(e,t){e._reconstructActiveFormattingElements(),Xc(t),Es(t),t.selfClosing?e._appendElement(t,D.MATHML):e._insertElement(t,D.MATHML),t.ackSelfClosing=!0}function $1(e,t){e._reconstructActiveFormattingElements(),Zc(t),Es(t),t.selfClosing?e._appendElement(t,D.SVG):e._insertElement(t,D.SVG),t.ackSelfClosing=!0}function Xo(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,D.HTML)}function Ve(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:{C1(e,t);break}case l.A:{A1(e,t);break}case l.H1:case l.H2:case l.H3:case l.H4:case l.H5:case l.H6:{_1(e,t);break}case l.P:case l.DL:case l.OL:case l.UL:case l.DIV:case l.DIR:case l.NAV:case l.MAIN:case l.MENU:case l.ASIDE:case l.CENTER:case l.FIGURE:case l.FOOTER:case l.HEADER:case l.HGROUP:case l.DIALOG:case l.DETAILS:case l.ADDRESS:case l.ARTICLE:case l.SEARCH:case l.SECTION:case l.SUMMARY:case l.FIELDSET:case l.BLOCKQUOTE:case l.FIGCAPTION:{E1(e,t);break}case l.LI:case l.DD:case l.DT:{y1(e,t);break}case l.BR:case l.IMG:case l.WBR:case l.AREA:case l.EMBED:case l.KEYGEN:{nd(e,t);break}case l.HR:{R1(e,t);break}case l.RB:case l.RTC:{H1(e,t);break}case l.RT:case l.RP:{U1(e,t);break}case l.PRE:case l.LISTING:{T1(e,t);break}case l.XMP:{P1(e,t);break}case l.SVG:{$1(e,t);break}case l.HTML:{m1(e,t);break}case l.BASE:case l.LINK:case l.META:case l.STYLE:case l.TITLE:case l.SCRIPT:case l.BGSOUND:case l.BASEFONT:case l.TEMPLATE:{pt(e,t);break}case l.BODY:{g1(e,t);break}case l.FORM:{k1(e,t);break}case l.NOBR:{v1(e,t);break}case l.MATH:{z1(e,t);break}case l.TABLE:{I1(e,t);break}case l.INPUT:{N1(e,t);break}case l.PARAM:case l.TRACK:case l.SOURCE:{L1(e,t);break}case l.IMAGE:{O1(e,t);break}case l.BUTTON:{w1(e,t);break}case l.APPLET:case l.OBJECT:case l.MARQUEE:{S1(e,t);break}case l.IFRAME:{M1(e,t);break}case l.SELECT:{B1(e,t);break}case l.OPTION:case l.OPTGROUP:{F1(e,t);break}case l.NOEMBED:case l.NOFRAMES:{Qo(e,t);break}case l.FRAMESET:{b1(e,t);break}case l.TEXTAREA:{D1(e,t);break}case l.NOSCRIPT:{e.options.scriptingEnabled?Qo(e,t):Xo(e,t);break}case l.PLAINTEXT:{x1(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:Xo(e,t)}}function Y1(e,t){if(e.openElements.hasInScope(l.BODY)&&(e.insertionMode=T.AFTER_BODY,e.options.sourceCodeLocationInfo)){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e._setEndLocation(n,t)}}function j1(e,t){e.openElements.hasInScope(l.BODY)&&(e.insertionMode=T.AFTER_BODY,fd(e,t))}function V1(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function q1(e){const t=e.openElements.tmplCount>0,{formElement:n}=e;t||(e.formElement=null),(n||t)&&e.openElements.hasInScope(l.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(l.FORM):n&&e.openElements.remove(n))}function W1(e){e.openElements.hasInButtonScope(l.P)||e._insertFakeElement(S.P,l.P),e._closePElement()}function G1(e){e.openElements.hasInListItemScope(l.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(l.LI),e.openElements.popUntilTagNamePopped(l.LI))}function K1(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 X1(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function Z1(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(S.BR,l.BR),e.openElements.pop(),e.framesetOk=!1}function id(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 Ri(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:{_s(e,t);break}case l.P:{W1(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:{V1(e,t);break}case l.LI:{G1(e);break}case l.DD:case l.DT:{K1(e,t);break}case l.H1:case l.H2:case l.H3:case l.H4:case l.H5:case l.H6:{Q1(e);break}case l.BR:{Z1(e);break}case l.BODY:{Y1(e,t);break}case l.HTML:{j1(e,t);break}case l.FORM:{q1(e);break}case l.APPLET:case l.OBJECT:case l.MARQUEE:{X1(e,t);break}case l.TEMPLATE:{ln(e,t);break}default:id(e,t)}}function ad(e,t){e.tmplInsertionModeStack.length>0?hd(e,t):Ts(e,t)}function J1(e,t){var n;t.tagID===l.SCRIPT&&((n=e.scriptHandler)===null||n===void 0||n.call(e,e.openElements.current)),e.openElements.pop(),e.insertionMode=e.originalInsertionMode}function eg(e,t){e._err(t,N.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function Ji(e,t){if(e.openElements.currentTagId!==void 0&&Jc.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=T.IN_TABLE_TEXT,t.type){case se.CHARACTER:{od(e,t);break}case se.WHITESPACE_CHARACTER:{sd(e,t);break}}else Cr(e,t)}function tg(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,D.HTML),e.insertionMode=T.IN_CAPTION}function ng(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,D.HTML),e.insertionMode=T.IN_COLUMN_GROUP}function rg(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(S.COLGROUP,l.COLGROUP),e.insertionMode=T.IN_COLUMN_GROUP,ks(e,t)}function ig(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,D.HTML),e.insertionMode=T.IN_TABLE_BODY}function ag(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(S.TBODY,l.TBODY),e.insertionMode=T.IN_TABLE_BODY,Oi(e,t)}function sg(e,t){e.openElements.hasInTableScope(l.TABLE)&&(e.openElements.popUntilTagNamePopped(l.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function og(e,t){rd(t)?e._appendElement(t,D.HTML):Cr(e,t),t.ackSelfClosing=!0}function ug(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,D.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function An(e,t){switch(t.tagID){case l.TD:case l.TH:case l.TR:{ag(e,t);break}case l.STYLE:case l.SCRIPT:case l.TEMPLATE:{pt(e,t);break}case l.COL:{rg(e,t);break}case l.FORM:{ug(e,t);break}case l.TABLE:{sg(e,t);break}case l.TBODY:case l.TFOOT:case l.THEAD:{ig(e,t);break}case l.INPUT:{og(e,t);break}case l.CAPTION:{tg(e,t);break}case l.COLGROUP:{ng(e,t);break}default:Cr(e,t)}}function pr(e,t){switch(t.tagID){case l.TABLE:{e.openElements.hasInTableScope(l.TABLE)&&(e.openElements.popUntilTagNamePopped(l.TABLE),e._resetInsertionMode());break}case l.TEMPLATE:{ln(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:Cr(e,t)}}function Cr(e,t){const n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,Li(e,t),e.fosterParentingEnabled=n}function sd(e,t){e.pendingCharacterTokens.push(t)}function od(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function $n(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)Cr(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}const ud=new Set([l.CAPTION,l.COL,l.COLGROUP,l.TBODY,l.TD,l.TFOOT,l.TH,l.THEAD,l.TR]);function lg(e,t){const n=t.tagID;ud.has(n)?e.openElements.hasInTableScope(l.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(l.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=T.IN_TABLE,An(e,t)):Ve(e,t)}function cg(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=T.IN_TABLE,n===l.TABLE&&pr(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:Ri(e,t)}}function ks(e,t){switch(t.tagID){case l.HTML:{Ve(e,t);break}case l.COL:{e._appendElement(t,D.HTML),t.ackSelfClosing=!0;break}case l.TEMPLATE:{pt(e,t);break}default:di(e,t)}}function dg(e,t){switch(t.tagID){case l.COLGROUP:{e.openElements.currentTagId===l.COLGROUP&&(e.openElements.pop(),e.insertionMode=T.IN_TABLE);break}case l.TEMPLATE:{ln(e,t);break}case l.COL:break;default:di(e,t)}}function di(e,t){e.openElements.currentTagId===l.COLGROUP&&(e.openElements.pop(),e.insertionMode=T.IN_TABLE,e._processToken(t))}function Oi(e,t){switch(t.tagID){case l.TR:{e.openElements.clearBackToTableBodyContext(),e._insertElement(t,D.HTML),e.insertionMode=T.IN_ROW;break}case l.TH:case l.TD:{e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(S.TR,l.TR),e.insertionMode=T.IN_ROW,Di(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=T.IN_TABLE,An(e,t));break}default:An(e,t)}}function Da(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=T.IN_TABLE);break}case l.TABLE:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=T.IN_TABLE,pr(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:pr(e,t)}}function Di(e,t){switch(t.tagID){case l.TH:case l.TD:{e.openElements.clearBackToTableRowContext(),e._insertElement(t,D.HTML),e.insertionMode=T.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=T.IN_TABLE_BODY,Oi(e,t));break}default:An(e,t)}}function ld(e,t){switch(t.tagID){case l.TR:{e.openElements.hasInTableScope(l.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=T.IN_TABLE_BODY);break}case l.TABLE:{e.openElements.hasInTableScope(l.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=T.IN_TABLE_BODY,Da(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=T.IN_TABLE_BODY,Da(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:pr(e,t)}}function hg(e,t){const n=t.tagID;ud.has(n)?(e.openElements.hasInTableScope(l.TD)||e.openElements.hasInTableScope(l.TH))&&(e._closeTableCell(),Di(e,t)):Ve(e,t)}function fg(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=T.IN_ROW);break}case l.TABLE:case l.TBODY:case l.TFOOT:case l.THEAD:case l.TR:{e.openElements.hasInTableScope(n)&&(e._closeTableCell(),ld(e,t));break}case l.BODY:case l.CAPTION:case l.COL:case l.COLGROUP:case l.HTML:break;default:Ri(e,t)}}function cd(e,t){switch(t.tagID){case l.HTML:{Ve(e,t);break}case l.OPTION:{e.openElements.currentTagId===l.OPTION&&e.openElements.pop(),e._insertElement(t,D.HTML);break}case l.OPTGROUP:{e.openElements.currentTagId===l.OPTION&&e.openElements.pop(),e.openElements.currentTagId===l.OPTGROUP&&e.openElements.pop(),e._insertElement(t,D.HTML);break}case l.HR:{e.openElements.currentTagId===l.OPTION&&e.openElements.pop(),e.openElements.currentTagId===l.OPTGROUP&&e.openElements.pop(),e._appendElement(t,D.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:{pt(e,t);break}}}function dd(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:{ln(e,t);break}}}function pg(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)):cd(e,t)}function mg(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)):dd(e,t)}function gg(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:{pt(e,t);break}case l.CAPTION:case l.COLGROUP:case l.TBODY:case l.TFOOT:case l.THEAD:{e.tmplInsertionModeStack[0]=T.IN_TABLE,e.insertionMode=T.IN_TABLE,An(e,t);break}case l.COL:{e.tmplInsertionModeStack[0]=T.IN_COLUMN_GROUP,e.insertionMode=T.IN_COLUMN_GROUP,ks(e,t);break}case l.TR:{e.tmplInsertionModeStack[0]=T.IN_TABLE_BODY,e.insertionMode=T.IN_TABLE_BODY,Oi(e,t);break}case l.TD:case l.TH:{e.tmplInsertionModeStack[0]=T.IN_ROW,e.insertionMode=T.IN_ROW,Di(e,t);break}default:e.tmplInsertionModeStack[0]=T.IN_BODY,e.insertionMode=T.IN_BODY,Ve(e,t)}}function bg(e,t){t.tagID===l.TEMPLATE&&ln(e,t)}function hd(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(l.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):Ts(e,t)}function Eg(e,t){t.tagID===l.HTML?Ve(e,t):hi(e,t)}function fd(e,t){var n;if(t.tagID===l.HTML){if(e.fragmentContext||(e.insertionMode=T.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 hi(e,t)}function hi(e,t){e.insertionMode=T.IN_BODY,Li(e,t)}function _g(e,t){switch(t.tagID){case l.HTML:{Ve(e,t);break}case l.FRAMESET:{e._insertElement(t,D.HTML);break}case l.FRAME:{e._appendElement(t,D.HTML),t.ackSelfClosing=!0;break}case l.NOFRAMES:{pt(e,t);break}}}function Tg(e,t){t.tagID===l.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==l.FRAMESET&&(e.insertionMode=T.AFTER_FRAMESET))}function kg(e,t){switch(t.tagID){case l.HTML:{Ve(e,t);break}case l.NOFRAMES:{pt(e,t);break}}}function yg(e,t){t.tagID===l.HTML&&(e.insertionMode=T.AFTER_AFTER_FRAMESET)}function xg(e,t){t.tagID===l.HTML?Ve(e,t):Qr(e,t)}function Qr(e,t){e.insertionMode=T.IN_BODY,Li(e,t)}function wg(e,t){switch(t.tagID){case l.HTML:{Ve(e,t);break}case l.NOFRAMES:{pt(e,t);break}}}function Ag(e,t){t.chars=ve,e._insertCharacters(t)}function Cg(e,t){e._insertCharacters(t),e.framesetOk=!1}function pd(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==D.HTML&&e.openElements.currentTagId!==void 0&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function vg(e,t){if($m(t))pd(e),e._startTagOutsideForeignContent(t);else{const n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===D.MATHML?Xc(t):r===D.SVG&&(Ym(t),Zc(t)),Es(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}function Sg(e,t){if(t.tagID===l.P||t.tagID===l.BR){pd(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)===D.HTML){e._endTagOutsideForeignContent(t);break}const i=e.treeAdapter.getTagName(r);if(i.toLowerCase()===t.tagName){t.tagName=i,e.openElements.shortenToLength(n);break}}}S.AREA,S.BASE,S.BASEFONT,S.BGSOUND,S.BR,S.COL,S.EMBED,S.FRAME,S.HR,S.IMG,S.INPUT,S.KEYGEN,S.LINK,S.META,S.PARAM,S.SOURCE,S.TRACK,S.WBR;const Pi=md("end"),wt=md("start");function md(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 gd(e){const t=wt(e),n=Pi(e);if(t&&n)return{start:t,end:n}}const Ig=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,Ng=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),Zo={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function bd(e,t){const n=Ug(e),r=Uc("type",{handlers:{root:Lg,element:Rg,text:Og,comment:_d,doctype:Dg,raw:Mg},unknown:Bg}),i={parser:n?new Ko(Zo):Ko.getFragmentParser(void 0,Zo),handle(o){r(o,i)},stitches:!1,options:t||{}};r(e,i),Dn(i,wt());const a=n?i.parser.document:i.parser.getFragment(),s=zp(a,{file:i.options.file});return i.stitches&&$t(s,"comment",function(o,u,c){const h=o;if(h.value.stitch&&c&&u!==void 0){const d=c.children;return d[u]=h.value.stitch,u}}),s.type==="root"&&s.children.length===1&&s.children[0].type===e.type?s.children[0]:s}function Ed(e,t){let n=-1;if(e)for(;++n<e.length;)t.handle(e[n])}function Lg(e,t){Ed(e.children,t)}function Rg(e,t){Fg(e,t),Ed(e.children,t),Hg(e,t)}function Og(e,t){t.parser.tokenizer.state>4&&(t.parser.tokenizer.state=0);const n={type:se.CHARACTER,chars:e.value,location:vr(e)};Dn(t,wt(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function Dg(e,t){const n={type:se.DOCTYPE,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:vr(e)};Dn(t,wt(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function Pg(e,t){t.stitches=!0;const n=zg(e);if("children"in e&&"children"in n){const r=bd({type:"root",children:e.children},t.options);n.children=r.children}_d({type:"comment",value:{stitch:n}},t)}function _d(e,t){const n=e.value,r={type:se.COMMENT,data:n,location:vr(e)};Dn(t,wt(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function Mg(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,Td(t,wt(e)),t.parser.tokenizer.write(t.options.tagfilter?e.value.replace(Ig,"<$1$2"):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 Bg(e,t){const n=e;if(t.options.passThrough&&t.options.passThrough.includes(n.type))Pg(n,t);else{let r="";throw Ng.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 Dn(e,t){Td(e,t);const n=e.parser.tokenizer.currentCharacterToken;n&&n.location&&(n.location.endLine=e.parser.tokenizer.preprocessor.line,n.location.endCol=e.parser.tokenizer.preprocessor.col+1,n.location.endOffset=e.parser.tokenizer.preprocessor.offset+1,e.parser.currentToken=n,e.parser._processToken(e.parser.currentToken)),e.parser.tokenizer.paused=!1,e.parser.tokenizer.inLoop=!1,e.parser.tokenizer.active=!1,e.parser.tokenizer.returnState=Oe.DATA,e.parser.tokenizer.charRefCode=-1,e.parser.tokenizer.consumedAfterSnapshot=-1,e.parser.tokenizer.currentLocation=null,e.parser.tokenizer.currentCharacterToken=null,e.parser.tokenizer.currentToken=null,e.parser.tokenizer.currentAttr={name:"",value:""}}function Td(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 Fg(e,t){const n=e.tagName.toLowerCase();if(t.parser.tokenizer.state===Oe.PLAINTEXT)return;Dn(t,wt(e));const r=t.parser.openElements.current;let i="namespaceURI"in r?r.namespaceURI:en.html;i===en.html&&n==="svg"&&(i=en.svg);const a=qp({...e,children:[]},{space:i===en.svg?"svg":"html"}),s={type:se.START_TAG,tagName:n,tagID:On(n),selfClosing:!1,ackSelfClosing:!1,attrs:"attrs"in a?a.attrs:[],location:vr(e)};t.parser.currentToken=s,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=n}function Hg(e,t){const n=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&em.includes(n)||t.parser.tokenizer.state===Oe.PLAINTEXT)return;Dn(t,Pi(e));const r={type:se.END_TAG,tagName:n,tagID:On(n),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:vr(e)};t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken),n===t.parser.tokenizer.lastStartTagName&&(t.parser.tokenizer.state===Oe.RCDATA||t.parser.tokenizer.state===Oe.RAWTEXT||t.parser.tokenizer.state===Oe.SCRIPT_DATA)&&(t.parser.tokenizer.state=Oe.DATA)}function Ug(e){const t=e.type==="root"?e.children[0]:e;return!!(t&&(t.type==="doctype"||t.type==="element"&&t.tagName.toLowerCase()==="html"))}function vr(e){const t=wt(e)||{line:void 0,column:void 0,offset:void 0},n=Pi(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 zg(e){return"children"in e?an({...e,children:[]}):an(e)}function Pa(e){return function(t,n){return bd(t,{...e,file:n})}}const Gt=["ariaDescribedBy","ariaLabel","ariaLabelledBy"],sr={ancestors:{tbody:["table"],td:["table"],th:["table"],thead:["table"],tfoot:["table"],tr:["table"]},attributes:{a:[...Gt,"dataFootnoteBackref","dataFootnoteRef",["className","data-footnote-backref"],"href"],blockquote:["cite"],code:[["className",/^language-./]],del:["cite"],div:["itemScope","itemType"],dl:[...Gt],h2:[["className","sr-only"]],img:[...Gt,"longDesc","src"],input:[["disabled",!0],["type","checkbox"]],ins:["cite"],li:[["className","task-list-item"]],ol:[...Gt,["className","contains-task-list"]],q:["cite"],section:["dataFootnotes",["className","footnotes"]],source:["srcSet"],summary:[...Gt],table:[...Gt],ul:[...Gt,["className","contains-task-list"]],"*":["abbr","accept","acceptCharset","accessKey","action","align","alt","axis","border","cellPadding","cellSpacing","char","charOff","charSet","checked","clear","colSpan","color","cols","compact","coords","dateTime","dir","encType","frame","hSpace","headers","height","hrefLang","htmlFor","id","isMap","itemProp","label","lang","maxLength","media","method","multiple","name","noHref","noShade","noWrap","open","prompt","readOnly","rev","rowSpan","rows","rules","scope","selected","shape","size","span","start","summary","tabIndex","title","useMap","vAlign","value","width"]},clobber:["ariaDescribedBy","ariaLabelledBy","id","name"],clobberPrefix:"user-content-",protocols:{cite:["http","https"],href:["http","https","irc","ircs","mailto","xmpp"],longDesc:["http","https"],src:["http","https"]},required:{input:{disabled:!0,type:"checkbox"}},strip:["script"],tagNames:["a","b","blockquote","br","code","dd","del","details","div","dl","dt","em","h1","h2","h3","h4","h5","h6","hr","i","img","input","ins","kbd","li","ol","p","picture","pre","q","rp","rt","ruby","s","samp","section","source","span","strike","strong","sub","summary","sup","table","tbody","td","tfoot","th","thead","tr","tt","ul","var"]},Ft={}.hasOwnProperty;function $g(e,t){let n={type:"root",children:[]};const r={schema:t?{...sr,...t}:sr,stack:[]},i=kd(r,e);return i&&(Array.isArray(i)?i.length===1?n=i[0]:n.children=i:n=i),n}function kd(e,t){if(t&&typeof t=="object"){const n=t;switch(typeof n.type=="string"?n.type:""){case"comment":return Yg(e,n);case"doctype":return jg(e,n);case"element":return Vg(e,n);case"root":return qg(e,n);case"text":return Wg(e,n)}}}function Yg(e,t){if(e.schema.allowComments){const n=typeof t.value=="string"?t.value:"",r=n.indexOf("-->"),a={type:"comment",value:r<0?n:n.slice(0,r)};return Sr(a,t),a}}function jg(e,t){if(e.schema.allowDoctypes){const n={type:"doctype"};return Sr(n,t),n}}function Vg(e,t){const n=typeof t.tagName=="string"?t.tagName:"";e.stack.push(n);const r=yd(e,t.children),i=Gg(e,t.properties);e.stack.pop();let a=!1;if(n&&n!=="*"&&(!e.schema.tagNames||e.schema.tagNames.includes(n))&&(a=!0,e.schema.ancestors&&Ft.call(e.schema.ancestors,n))){const o=e.schema.ancestors[n];let u=-1;for(a=!1;++u<o.length;)e.stack.includes(o[u])&&(a=!0)}if(!a)return e.schema.strip&&!e.schema.strip.includes(n)?r:void 0;const s={type:"element",tagName:n,properties:i,children:r};return Sr(s,t),s}function qg(e,t){const r={type:"root",children:yd(e,t.children)};return Sr(r,t),r}function Wg(e,t){const r={type:"text",value:typeof t.value=="string"?t.value:""};return Sr(r,t),r}function yd(e,t){const n=[];if(Array.isArray(t)){const r=t;let i=-1;for(;++i<r.length;){const a=kd(e,r[i]);a&&(Array.isArray(a)?n.push(...a):n.push(a))}}return n}function Gg(e,t){const n=e.stack[e.stack.length-1],r=e.schema.attributes,i=e.schema.required,a=r&&Ft.call(r,n)?r[n]:void 0,s=r&&Ft.call(r,"*")?r["*"]:void 0,o=t&&typeof t=="object"?t:{},u={};let c;for(c in o)if(Ft.call(o,c)){const h=o[c];let d=Jo(e,eu(a,c),c,h);d==null&&(d=Jo(e,eu(s,c),c,h)),d!=null&&(u[c]=d)}if(i&&Ft.call(i,n)){const h=i[n];for(c in h)Ft.call(h,c)&&!Ft.call(u,c)&&(u[c]=h[c])}return u}function Jo(e,t,n,r){return t?Array.isArray(r)?Kg(e,t,n,r):xd(e,t,n,r):void 0}function Kg(e,t,n,r){let i=-1;const a=[];for(;++i<r.length;){const s=xd(e,t,n,r[i]);(typeof s=="number"||typeof s=="string")&&a.push(s)}return a}function xd(e,t,n,r){if(!(typeof r!="boolean"&&typeof r!="number"&&typeof r!="string")&&Qg(e,n,r)){if(typeof t=="object"&&t.length>1){let i=!1,a=0;for(;++a<t.length;){const s=t[a];if(s&&typeof s=="object"&&"flags"in s){if(s.test(String(r))){i=!0;break}}else if(s===r){i=!0;break}}if(!i)return}return e.schema.clobber&&e.schema.clobberPrefix&&e.schema.clobber.includes(n)?e.schema.clobberPrefix+r:r}}function Qg(e,t,n){const r=e.schema.protocols&&Ft.call(e.schema.protocols,t)?e.schema.protocols[t]:void 0;if(!r||r.length===0)return!0;const i=String(n),a=i.indexOf(":"),s=i.indexOf("?"),o=i.indexOf("#"),u=i.indexOf("/");if(a<0||u>-1&&a>u||s>-1&&a>s||o>-1&&a>o)return!0;let c=-1;for(;++c<r.length;){const h=r[c];if(a===h.length&&i.slice(0,h.length)===h)return!0}return!1}function Sr(e,t){const n=gd(t);t.data&&(e.data=an(t.data)),n&&(e.position=n)}function eu(e,t){let n,r=-1;if(e)for(;++r<e.length;){const i=e[r],a=typeof i=="string"?i:i[0];if(a===t)return i;a==="data*"&&(n=i)}if(t.length>4&&t.slice(0,4).toLowerCase()==="data")return n}function wd(e){return function(t){return $g(t,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}const Ke=Vt(/[A-Za-z]/),je=Vt(/[\dA-Za-z]/),Xg=Vt(/[#-'*+\--9=?A-Z^-~]/);function fi(e){return e!==null&&(e<32||e===127)}const Ma=Vt(/\d/),Zg=Vt(/[\dA-Fa-f]/),Jg=Vt(/[!-/:-@[-`{-~]/);function Q(e){return e!==null&&e<-2}function ye(e){return e!==null&&(e<0||e===32)}function oe(e){return e===-2||e===-1||e===32}const Mi=Vt(/\p{P}|\p{S}/u),sn=Vt(/\s/);function Vt(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function eb(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function tb(e,t,n){const i=vi((n||{}).ignore||[]),a=nb(t);let s=-1;for(;++s<a.length;)cs(e,"text",o);function o(c,h){let d=-1,f;for(;++d<h.length;){const p=h[d],g=f?f.children:void 0;if(i(p,g?g.indexOf(p):void 0,f))return;f=p}if(f)return u(c,h)}function u(c,h){const d=h[h.length-1],f=a[s][0],p=a[s][1];let g=0;const C=d.children.indexOf(c);let w=!1,A=[];f.lastIndex=0;let x=f.exec(c.value);for(;x;){const L=x.index,P={index:x.index,input:x.input,stack:[...h,c]};let v=p(...x,P);if(typeof v=="string"&&(v=v.length>0?{type:"text",value:v}:void 0),v===!1?f.lastIndex=L+1:(g!==L&&A.push({type:"text",value:c.value.slice(g,L)}),Array.isArray(v)?A.push(...v):v&&A.push(v),g=L+x[0].length,w=!0),!f.global)break;x=f.exec(c.value)}return w?(g<c.value.length&&A.push({type:"text",value:c.value.slice(g)}),d.children.splice(C,1,...A)):A=[c],C+A.length}}function nb(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([rb(i[0]),ib(i[1])])}return t}function rb(e){return typeof e=="string"?new RegExp(eb(e),"g"):e}function ib(e){return typeof e=="function"?e:function(){return e}}const ea="phrasing",ta=["autolink","link","image","label"];function ab(){return{transforms:[hb],enter:{literalAutolink:ob,literalAutolinkEmail:na,literalAutolinkHttp:na,literalAutolinkWww:na},exit:{literalAutolink:db,literalAutolinkEmail:cb,literalAutolinkHttp:ub,literalAutolinkWww:lb}}}function sb(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:ea,notInConstruct:ta},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:ea,notInConstruct:ta},{character:":",before:"[ps]",after:"\\/",inConstruct:ea,notInConstruct:ta}]}}function ob(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function na(e){this.config.enter.autolinkProtocol.call(this,e)}function ub(e){this.config.exit.autolinkProtocol.call(this,e)}function lb(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 cb(e){this.config.exit.autolinkEmail.call(this,e)}function db(e){this.exit(e)}function hb(e){tb(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,fb],[/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu,pb]],{ignore:["link","linkReference"]})}function fb(e,t,n,r,i){let a="";if(!Ad(i)||(/^w/i.test(t)&&(n=t+n,t="",a="http://"),!mb(n)))return!1;const s=gb(n+r);if(!s[0])return!1;const o={type:"link",title:null,url:a+t+s[0],children:[{type:"text",value:t+s[0]}]};return s[1]?[o,{type:"text",value:s[1]}]:o}function pb(e,t,n,r){return!Ad(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function mb(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 gb(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 Ad(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||sn(n)||Mi(n))&&(!t||n!==47)}function ft(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}Cd.peek=Ab;function bb(){this.buffer()}function Eb(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function _b(){this.buffer()}function Tb(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function kb(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=ft(this.sliceSerialize(e)).toLowerCase(),n.label=t}function yb(e){this.exit(e)}function xb(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=ft(this.sliceSerialize(e)).toLowerCase(),n.label=t}function wb(e){this.exit(e)}function Ab(){return"["}function Cd(e,t,n,r){const i=n.createTracker(r);let a=i.move("[^");const s=n.enter("footnoteReference"),o=n.enter("reference");return a+=i.move(n.safe(n.associationId(e),{after:"]",before:a})),o(),s(),a+=i.move("]"),a}function Cb(){return{enter:{gfmFootnoteCallString:bb,gfmFootnoteCall:Eb,gfmFootnoteDefinitionLabelString:_b,gfmFootnoteDefinition:Tb},exit:{gfmFootnoteCallString:kb,gfmFootnoteCall:yb,gfmFootnoteDefinitionLabelString:xb,gfmFootnoteDefinition:wb}}}function vb(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:Cd},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,i,a,s){const o=a.createTracker(s);let u=o.move("[^");const c=a.enter("footnoteDefinition"),h=a.enter("label");return u+=o.move(a.safe(a.associationId(r),{before:u,after:"]"})),h(),u+=o.move("]:"),r.children&&r.children.length>0&&(o.shift(4),u+=o.move((t?`
|
|
1
|
+
var Jh=Object.defineProperty;var ef=(e,t,n)=>t in e?Jh(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var ge=(e,t,n)=>(ef(e,typeof t!="symbol"?t+"":t,n),n);(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const a of i)if(a.type==="childList")for(const s of a.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&r(s)}).observe(document,{childList:!0,subtree:!0});function n(i){const a={};return i.integrity&&(a.integrity=i.integrity),i.referrerPolicy&&(a.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?a.credentials="include":i.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function r(i){if(i.ep)return;i.ep=!0;const a=n(i);fetch(i.href,a)}})();var kr,G,Il,Nl,Xt,to,Ll,_a,Rl,_n={},Ol=[],tf=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,ki=Array.isArray;function Nt(e,t){for(var n in t)e[n]=t[n];return e}function Dl(e){var t=e.parentNode;t&&t.removeChild(e)}function _t(e,t,n){var r,i,a,s={};for(a in t)a=="key"?r=t[a]:a=="ref"?i=t[a]:s[a]=t[a];if(arguments.length>2&&(s.children=arguments.length>3?kr.call(arguments,2):n),typeof e=="function"&&e.defaultProps!=null)for(a in e.defaultProps)s[a]===void 0&&(s[a]=e.defaultProps[a]);return Xn(e,s,r,i,null)}function Xn(e,t,n,r,i){var a={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:i??++Il};return i==null&&G.vnode!=null&&G.vnode(a),a}function pe(e){return e.children}function Tt(e,t){this.props=e,this.context=t}function ti(e,t){if(t==null)return e.__?ti(e.__,e.__.__k.indexOf(e)+1):null;for(var n;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null)return n.__e;return typeof e.type=="function"?ti(e):null}function Pl(e){var t,n;if((e=e.__)!=null&&e.__c!=null){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null){e.__e=e.__c.base=n.__e;break}return Pl(e)}}function Ta(e){(!e.__d&&(e.__d=!0)&&Xt.push(e)&&!ni.__r++||to!==G.debounceRendering)&&((to=G.debounceRendering)||Ll)(ni)}function ni(){var e,t,n,r,i,a,s,o,u;for(Xt.sort(_a);e=Xt.shift();)e.__d&&(t=Xt.length,r=void 0,i=void 0,a=void 0,o=(s=(n=e).__v).__e,(u=n.__P)&&(r=[],i=[],(a=Nt({},s)).__v=s.__v+1,ns(u,s,a,n.__n,u.ownerSVGElement!==void 0,s.__h!=null?[o]:null,r,o??ti(s),s.__h,i),Hl(r,s,i),s.__e!=o&&Pl(s)),Xt.length>t&&Xt.sort(_a));ni.__r=0}function Ml(e,t,n,r,i,a,s,o,u,c,h){var d,f,p,g,k,C,w,A,x,L,P=0,v=r&&r.__k||Ol,V=v.length,O=V,Y=t.length;for(n.__k=[],d=0;d<Y;d++)(g=n.__k[d]=(g=t[d])==null||typeof g=="boolean"||typeof g=="function"?null:typeof g=="string"||typeof g=="number"||typeof g=="bigint"?Xn(null,g,null,null,g):ki(g)?Xn(pe,{children:g},null,null,null):g.__b>0?Xn(g.type,g.props,g.key,g.ref?g.ref:null,g.__v):g)!=null&&(g.__=n,g.__b=n.__b+1,(A=nf(g,v,w=d+P,O))===-1?p=_n:(p=v[A]||_n,v[A]=void 0,O--),ns(e,g,p,i,a,s,o,u,c,h),k=g.__e,(f=g.ref)&&p.ref!=f&&(p.ref&&rs(p.ref,null,g),h.push(f,g.__c||k,g)),k!=null&&(C==null&&(C=k),L=!(x=p===_n||p.__v===null)&&A===w,x?A==-1&&P--:A!==w&&(A===w+1?(P++,L=!0):A>w?O>Y-w?(P+=A-w,L=!0):P--:P=A<w&&A==w-1?A-w:0),w=d+P,L=L||A==d&&!x,typeof g.type!="function"||A===w&&p.__k!==g.__k?typeof g.type=="function"||L?g.__d!==void 0?(u=g.__d,g.__d=void 0):u=k.nextSibling:u=Fl(e,k,u):u=Bl(g,u,e),typeof n.type=="function"&&(n.__d=u)));for(n.__e=C,d=V;d--;)v[d]!=null&&(typeof n.type=="function"&&v[d].__e!=null&&v[d].__e==n.__d&&(n.__d=v[d].__e.nextSibling),Ul(v[d],v[d]))}function Bl(e,t,n){for(var r,i=e.__k,a=0;i&&a<i.length;a++)(r=i[a])&&(r.__=e,t=typeof r.type=="function"?Bl(r,t,n):Fl(n,r.__e,t));return t}function ri(e,t){return t=t||[],e==null||typeof e=="boolean"||(ki(e)?e.some(function(n){ri(n,t)}):t.push(e)),t}function Fl(e,t,n){return n==null||n.parentNode!==e?e.insertBefore(t,null):t==n&&t.parentNode!=null||e.insertBefore(t,n),t.nextSibling}function nf(e,t,n,r){var i=e.key,a=e.type,s=n-1,o=n+1,u=t[n];if(u===null||u&&i==u.key&&a===u.type)return n;if(r>(u!=null?1:0))for(;s>=0||o<t.length;){if(s>=0){if((u=t[s])&&i==u.key&&a===u.type)return s;s--}if(o<t.length){if((u=t[o])&&i==u.key&&a===u.type)return o;o++}}return-1}function rf(e,t,n,r,i){var a;for(a in n)a==="children"||a==="key"||a in t||ii(e,a,null,n[a],r);for(a in t)i&&typeof t[a]!="function"||a==="children"||a==="key"||a==="value"||a==="checked"||n[a]===t[a]||ii(e,a,t[a],n[a],r)}function no(e,t,n){t[0]==="-"?e.setProperty(t,n??""):e[t]=n==null?"":typeof n!="number"||tf.test(t)?n:n+"px"}function ii(e,t,n,r,i){var a;e:if(t==="style")if(typeof n=="string")e.style.cssText=n;else{if(typeof r=="string"&&(e.style.cssText=r=""),r)for(t in r)n&&t in n||no(e.style,t,"");if(n)for(t in n)r&&n[t]===r[t]||no(e.style,t,n[t])}else if(t[0]==="o"&&t[1]==="n")a=t!==(t=t.replace(/Capture$/,"")),t=t.toLowerCase()in e?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+a]=n,n?r||e.addEventListener(t,a?io:ro,a):e.removeEventListener(t,a?io:ro,a);else if(t!=="dangerouslySetInnerHTML"){if(i)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(t!=="width"&&t!=="height"&&t!=="href"&&t!=="list"&&t!=="form"&&t!=="tabIndex"&&t!=="download"&&t!=="rowSpan"&&t!=="colSpan"&&t in e)try{e[t]=n??"";break e}catch{}typeof n=="function"||(n==null||n===!1&&t[4]!=="-"?e.removeAttribute(t):e.setAttribute(t,n))}}function ro(e){return this.l[e.type+!1](G.event?G.event(e):e)}function io(e){return this.l[e.type+!0](G.event?G.event(e):e)}function ns(e,t,n,r,i,a,s,o,u,c){var h,d,f,p,g,k,C,w,A,x,L,P,v,V,O,Y=t.type;if(t.constructor!==void 0)return null;n.__h!=null&&(u=n.__h,o=t.__e=n.__e,t.__h=null,a=[o]),(h=G.__b)&&h(t);try{e:if(typeof Y=="function"){if(w=t.props,A=(h=Y.contextType)&&r[h.__c],x=h?A?A.props.value:h.__:r,n.__c?C=(d=t.__c=n.__c).__=d.__E:("prototype"in Y&&Y.prototype.render?t.__c=d=new Y(w,x):(t.__c=d=new Tt(w,x),d.constructor=Y,d.render=sf),A&&A.sub(d),d.props=w,d.state||(d.state={}),d.context=x,d.__n=r,f=d.__d=!0,d.__h=[],d._sb=[]),d.__s==null&&(d.__s=d.state),Y.getDerivedStateFromProps!=null&&(d.__s==d.state&&(d.__s=Nt({},d.__s)),Nt(d.__s,Y.getDerivedStateFromProps(w,d.__s))),p=d.props,g=d.state,d.__v=t,f)Y.getDerivedStateFromProps==null&&d.componentWillMount!=null&&d.componentWillMount(),d.componentDidMount!=null&&d.__h.push(d.componentDidMount);else{if(Y.getDerivedStateFromProps==null&&w!==p&&d.componentWillReceiveProps!=null&&d.componentWillReceiveProps(w,x),!d.__e&&(d.shouldComponentUpdate!=null&&d.shouldComponentUpdate(w,d.__s,x)===!1||t.__v===n.__v)){for(t.__v!==n.__v&&(d.props=w,d.state=d.__s,d.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.forEach(function(I){I&&(I.__=t)}),L=0;L<d._sb.length;L++)d.__h.push(d._sb[L]);d._sb=[],d.__h.length&&s.push(d);break e}d.componentWillUpdate!=null&&d.componentWillUpdate(w,d.__s,x),d.componentDidUpdate!=null&&d.__h.push(function(){d.componentDidUpdate(p,g,k)})}if(d.context=x,d.props=w,d.__P=e,d.__e=!1,P=G.__r,v=0,"prototype"in Y&&Y.prototype.render){for(d.state=d.__s,d.__d=!1,P&&P(t),h=d.render(d.props,d.state,d.context),V=0;V<d._sb.length;V++)d.__h.push(d._sb[V]);d._sb=[]}else do d.__d=!1,P&&P(t),h=d.render(d.props,d.state,d.context),d.state=d.__s;while(d.__d&&++v<25);d.state=d.__s,d.getChildContext!=null&&(r=Nt(Nt({},r),d.getChildContext())),f||d.getSnapshotBeforeUpdate==null||(k=d.getSnapshotBeforeUpdate(p,g)),Ml(e,ki(O=h!=null&&h.type===pe&&h.key==null?h.props.children:h)?O:[O],t,n,r,i,a,s,o,u,c),d.base=t.__e,t.__h=null,d.__h.length&&s.push(d),C&&(d.__E=d.__=null)}else a==null&&t.__v===n.__v?(t.__k=n.__k,t.__e=n.__e):t.__e=af(n.__e,t,n,r,i,a,s,u,c);(h=G.diffed)&&h(t)}catch(I){t.__v=null,(u||a!=null)&&(t.__e=o,t.__h=!!u,a[a.indexOf(o)]=null),G.__e(I,t,n)}}function Hl(e,t,n){for(var r=0;r<n.length;r++)rs(n[r],n[++r],n[++r]);G.__c&&G.__c(t,e),e.some(function(i){try{e=i.__h,i.__h=[],e.some(function(a){a.call(i)})}catch(a){G.__e(a,i.__v)}})}function af(e,t,n,r,i,a,s,o,u){var c,h,d,f=n.props,p=t.props,g=t.type,k=0;if(g==="svg"&&(i=!0),a!=null){for(;k<a.length;k++)if((c=a[k])&&"setAttribute"in c==!!g&&(g?c.localName===g:c.nodeType===3)){e=c,a[k]=null;break}}if(e==null){if(g===null)return document.createTextNode(p);e=i?document.createElementNS("http://www.w3.org/2000/svg",g):document.createElement(g,p.is&&p),a=null,o=!1}if(g===null)f===p||o&&e.data===p||(e.data=p);else{if(a=a&&kr.call(e.childNodes),h=(f=n.props||_n).dangerouslySetInnerHTML,d=p.dangerouslySetInnerHTML,!o){if(a!=null)for(f={},k=0;k<e.attributes.length;k++)f[e.attributes[k].name]=e.attributes[k].value;(d||h)&&(d&&(h&&d.__html==h.__html||d.__html===e.innerHTML)||(e.innerHTML=d&&d.__html||""))}if(rf(e,p,f,i,o),d)t.__k=[];else if(Ml(e,ki(k=t.props.children)?k:[k],t,n,r,i&&g!=="foreignObject",a,s,a?a[0]:n.__k&&ti(n,0),o,u),a!=null)for(k=a.length;k--;)a[k]!=null&&Dl(a[k]);o||("value"in p&&(k=p.value)!==void 0&&(k!==e.value||g==="progress"&&!k||g==="option"&&k!==f.value)&&ii(e,"value",k,f.value,!1),"checked"in p&&(k=p.checked)!==void 0&&k!==e.checked&&ii(e,"checked",k,f.checked,!1))}return e}function rs(e,t,n){try{typeof e=="function"?e(t):e.current=t}catch(r){G.__e(r,n)}}function Ul(e,t,n){var r,i;if(G.unmount&&G.unmount(e),(r=e.ref)&&(r.current&&r.current!==e.__e||rs(r,null,t)),(r=e.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(a){G.__e(a,t)}r.base=r.__P=null,e.__c=void 0}if(r=e.__k)for(i=0;i<r.length;i++)r[i]&&Ul(r[i],t,n||typeof e.type!="function");n||e.__e==null||Dl(e.__e),e.__=e.__e=e.__d=void 0}function sf(e,t,n){return this.constructor(e,n)}function ai(e,t,n){var r,i,a,s;G.__&&G.__(e,t),i=(r=typeof n=="function")?null:n&&n.__k||t.__k,a=[],s=[],ns(t,e=(!r&&n||t).__k=_t(pe,null,[e]),i||_n,_n,t.ownerSVGElement!==void 0,!r&&n?[n]:i?null:t.firstChild?kr.call(t.childNodes):null,a,!r&&n?n:i?i.__e:t.firstChild,r,s),Hl(a,e,s)}function zl(e,t,n){var r,i,a,s,o=Nt({},e.props);for(a in e.type&&e.type.defaultProps&&(s=e.type.defaultProps),t)a=="key"?r=t[a]:a=="ref"?i=t[a]:o[a]=t[a]===void 0&&s!==void 0?s[a]:t[a];return arguments.length>2&&(o.children=arguments.length>3?kr.call(arguments,2):n),Xn(e.type,o,r||e.key,i||e.ref,null)}function yi(e,t){var n={__c:t="__cC"+Rl++,__:e,Consumer:function(r,i){return r.children(i)},Provider:function(r){var i,a;return this.getChildContext||(i=[],(a={})[t]=this,this.getChildContext=function(){return a},this.shouldComponentUpdate=function(s){this.props.value!==s.value&&i.some(function(o){o.__e=!0,Ta(o)})},this.sub=function(s){i.push(s);var o=s.componentWillUnmount;s.componentWillUnmount=function(){i.splice(i.indexOf(s),1),o&&o.call(s)}}),r.children}};return n.Provider.__=n.Consumer.contextType=n}kr=Ol.slice,G={__e:function(e,t,n,r){for(var i,a,s;t=t.__;)if((i=t.__c)&&!i.__)try{if((a=i.constructor)&&a.getDerivedStateFromError!=null&&(i.setState(a.getDerivedStateFromError(e)),s=i.__d),i.componentDidCatch!=null&&(i.componentDidCatch(e,r||{}),s=i.__d),s)return i.__E=i}catch(o){e=o}throw e}},Il=0,Nl=function(e){return e!=null&&e.constructor===void 0},Tt.prototype.setState=function(e,t){var n;n=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=Nt({},this.state),typeof e=="function"&&(e=e(Nt({},n),this.props)),e&&Nt(n,e),e!=null&&this.__v&&(t&&this._sb.push(t),Ta(this))},Tt.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),Ta(this))},Tt.prototype.render=pe,Xt=[],Ll=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,_a=function(e,t){return e.__v.__b-t.__v.__b},ni.__r=0,Rl=0;function $l(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=$l(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function Wi(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=$l(e))&&(r&&(r+=" "),r+=t);return r}const ao=e=>typeof e=="boolean"?"".concat(e):e===0?"0":e,of=e=>{const t=function(){for(var i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];var o,u;return typeof(e==null||(o=e.hooks)===null||o===void 0?void 0:o["cx:done"])<"u"?e?.hooks["cx:done"](Wi(a)):typeof(e==null||(u=e.hooks)===null||u===void 0?void 0:u.onComplete)<"u"?e?.hooks.onComplete(Wi(a)):Wi(a)};return{compose:function(){for(var i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];return o=>{const u=Object.fromEntries(Object.entries(o||{}).filter(c=>{let[h]=c;return!["class","className"].includes(h)}));return t(a.map(c=>c(u)),o?.class,o?.className)}},cva:i=>a=>{var s;if(i?.variants==null)return t(i?.base,a?.class,a?.className);const{variants:o,defaultVariants:u}=i,c=Object.keys(o).map(f=>{const p=a?.[f],g=u?.[f],k=ao(p)||ao(g);return o[f][k]}),h={...u,...a&&Object.entries(a).reduce((f,p)=>{let[g,k]=p;return typeof k>"u"?f:{...f,[g]:k}},{})},d=i==null||(s=i.compoundVariants)===null||s===void 0?void 0:s.reduce((f,p)=>{let{class:g,className:k,...C}=p;return Object.entries(C).every(w=>{let[A,x]=w;const L=h[A];return Array.isArray(x)?x.includes(L):L===x})?[...f,g,k]:f},[]);return t(i?.base,c,d,a?.class,a?.className)},cx:t}},{compose:Dw,cva:xt,cx:si}=of();var zt,Ae,Gi,so,hr=0,Yl=[],Wr=[],oo=G.__b,uo=G.__r,lo=G.diffed,co=G.__c,ho=G.unmount;function vn(e,t){G.__h&&G.__h(Ae,e,hr||t),hr=0;var n=Ae.__H||(Ae.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({__V:Wr}),n.__[e]}function he(e){return hr=1,uf(jl,e)}function uf(e,t,n){var r=vn(zt++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):jl(void 0,t),function(o){var u=r.__N?r.__N[0]:r.__[0],c=r.t(u,o);u!==c&&(r.__N=[c,r.__[1]],r.__c.setState({}))}],r.__c=Ae,!Ae.u)){var i=function(o,u,c){if(!r.__c.__H)return!0;var h=r.__c.__H.__.filter(function(f){return f.__c});if(h.every(function(f){return!f.__N}))return!a||a.call(this,o,u,c);var d=!1;return h.forEach(function(f){if(f.__N){var p=f.__[0];f.__=f.__N,f.__N=void 0,p!==f.__[0]&&(d=!0)}}),!(!d&&r.__c.props===o)&&(!a||a.call(this,o,u,c))};Ae.u=!0;var a=Ae.shouldComponentUpdate,s=Ae.componentWillUpdate;Ae.componentWillUpdate=function(o,u,c){if(this.__e){var h=a;a=void 0,i(o,u,c),a=h}s&&s.call(this,o,u,c)},Ae.shouldComponentUpdate=i}return r.__N||r.__}function be(e,t){var n=vn(zt++,3);!G.__s&&is(n.__H,t)&&(n.__=e,n.i=t,Ae.__H.__h.push(n))}function lf(e,t){var n=vn(zt++,4);!G.__s&&is(n.__H,t)&&(n.__=e,n.i=t,Ae.__h.push(n))}function Ce(e){return hr=5,Re(function(){return{current:e}},[])}function Re(e,t){var n=vn(zt++,7);return is(n.__H,t)?(n.__V=e(),n.i=t,n.__h=e,n.__V):n.__}function Ge(e,t){return hr=8,Re(function(){return e},t)}function it(e){var t=Ae.context[e.__c],n=vn(zt++,9);return n.c=e,t?(n.__==null&&(n.__=!0,t.sub(Ae)),t.props.value):e.__}function cf(){var e=vn(zt++,11);if(!e.__){for(var t=Ae.__v;t!==null&&!t.__m&&t.__!==null;)t=t.__;var n=t.__m||(t.__m=[0,0]);e.__="P"+n[0]+"-"+n[1]++}return e.__}function df(){for(var e;e=Yl.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(Gr),e.__H.__h.forEach(ka),e.__H.__h=[]}catch(t){e.__H.__h=[],G.__e(t,e.__v)}}G.__b=function(e){Ae=null,oo&&oo(e)},G.__r=function(e){uo&&uo(e),zt=0;var t=(Ae=e.__c).__H;t&&(Gi===Ae?(t.__h=[],Ae.__h=[],t.__.forEach(function(n){n.__N&&(n.__=n.__N),n.__V=Wr,n.__N=n.i=void 0})):(t.__h.forEach(Gr),t.__h.forEach(ka),t.__h=[],zt=0)),Gi=Ae},G.diffed=function(e){lo&&lo(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(Yl.push(t)!==1&&so===G.requestAnimationFrame||((so=G.requestAnimationFrame)||hf)(df)),t.__H.__.forEach(function(n){n.i&&(n.__H=n.i),n.__V!==Wr&&(n.__=n.__V),n.i=void 0,n.__V=Wr})),Gi=Ae=null},G.__c=function(e,t){t.some(function(n){try{n.__h.forEach(Gr),n.__h=n.__h.filter(function(r){return!r.__||ka(r)})}catch(r){t.some(function(i){i.__h&&(i.__h=[])}),t=[],G.__e(r,n.__v)}}),co&&co(e,t)},G.unmount=function(e){ho&&ho(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach(function(r){try{Gr(r)}catch(i){t=i}}),n.__H=void 0,t&&G.__e(t,n.__v))};var fo=typeof requestAnimationFrame=="function";function hf(e){var t,n=function(){clearTimeout(r),fo&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);fo&&(t=requestAnimationFrame(n))}function Gr(e){var t=Ae,n=e.__c;typeof n=="function"&&(e.__c=void 0,n()),Ae=t}function ka(e){var t=Ae;e.__c=e.__(),Ae=t}function is(e,t){return!e||e.length!==t.length||t.some(function(n,r){return n!==e[r]})}function jl(e,t){return typeof t=="function"?t(e):t}var Vl=()=>typeof crypto<"u"&&typeof crypto.randomUUID=="function"?crypto.randomUUID():"10000000-1000-4000-8000-100000000000".replace(/[018]/g,e=>(+e^crypto.getRandomValues(new Uint8Array(1))[0]&15>>+e/4).toString(16)),ff=Symbol.for("preact-signals");function as(){if(Tn>1)Tn--;else{for(var e,t=!1;Zn!==void 0;){var n=Zn;for(Zn=void 0,ya++;n!==void 0;){var r=n.o;if(n.o=void 0,n.f&=-3,!(8&n.f)&&Wl(n))try{n.c()}catch(i){t||(e=i,t=!0)}n=r}}if(ya=0,Tn--,t)throw e}}var ke=void 0,Zn=void 0,Tn=0,ya=0,oi=0;function ql(e){if(ke!==void 0){var t=e.n;if(t===void 0||t.t!==ke)return t={i:0,S:e,p:ke.s,n:void 0,t:ke,e:void 0,x:void 0,r:t},ke.s!==void 0&&(ke.s.n=t),ke.s=t,e.n=t,32&ke.f&&e.S(t),t;if(t.i===-1)return t.i=0,t.n!==void 0&&(t.n.p=t.p,t.p!==void 0&&(t.p.n=t.n),t.p=ke.s,t.n=void 0,ke.s.n=t,ke.s=t),t}}function ze(e){this.v=e,this.i=0,this.n=void 0,this.t=void 0}ze.prototype.brand=ff;ze.prototype.h=function(){return!0};ze.prototype.S=function(e){this.t!==e&&e.e===void 0&&(e.x=this.t,this.t!==void 0&&(this.t.e=e),this.t=e)};ze.prototype.U=function(e){if(this.t!==void 0){var t=e.e,n=e.x;t!==void 0&&(t.x=n,e.e=void 0),n!==void 0&&(n.e=t,e.x=void 0),e===this.t&&(this.t=n)}};ze.prototype.subscribe=function(e){var t=this;return os(function(){var n=t.value,r=ke;ke=void 0;try{e(n)}finally{ke=r}})};ze.prototype.valueOf=function(){return this.value};ze.prototype.toString=function(){return this.value+""};ze.prototype.toJSON=function(){return this.value};ze.prototype.peek=function(){var e=ke;ke=void 0;try{return this.value}finally{ke=e}};Object.defineProperty(ze.prototype,"value",{get:function(){var e=ql(this);return e!==void 0&&(e.i=this.i),this.v},set:function(e){if(e!==this.v){if(ya>100)throw new Error("Cycle detected");this.v=e,this.i++,oi++,Tn++;try{for(var t=this.t;t!==void 0;t=t.x)t.t.N()}finally{as()}}}});function $e(e){return new ze(e)}function Wl(e){for(var t=e.s;t!==void 0;t=t.n)if(t.S.i!==t.i||!t.S.h()||t.S.i!==t.i)return!0;return!1}function Gl(e){for(var t=e.s;t!==void 0;t=t.n){var n=t.S.n;if(n!==void 0&&(t.r=n),t.S.n=t,t.i=-1,t.n===void 0){e.s=t;break}}}function Kl(e){for(var t=e.s,n=void 0;t!==void 0;){var r=t.p;t.i===-1?(t.S.U(t),r!==void 0&&(r.n=t.n),t.n!==void 0&&(t.n.p=r)):n=t,t.S.n=t.r,t.r!==void 0&&(t.r=void 0),t=r}e.s=n}function Sn(e){ze.call(this,void 0),this.x=e,this.s=void 0,this.g=oi-1,this.f=4}(Sn.prototype=new ze).h=function(){if(this.f&=-3,1&this.f)return!1;if((36&this.f)==32||(this.f&=-5,this.g===oi))return!0;if(this.g=oi,this.f|=1,this.i>0&&!Wl(this))return this.f&=-2,!0;var e=ke;try{Gl(this),ke=this;var t=this.x();(16&this.f||this.v!==t||this.i===0)&&(this.v=t,this.f&=-17,this.i++)}catch(n){this.v=n,this.f|=16,this.i++}return ke=e,Kl(this),this.f&=-2,!0};Sn.prototype.S=function(e){if(this.t===void 0){this.f|=36;for(var t=this.s;t!==void 0;t=t.n)t.S.S(t)}ze.prototype.S.call(this,e)};Sn.prototype.U=function(e){if(this.t!==void 0&&(ze.prototype.U.call(this,e),this.t===void 0)){this.f&=-33;for(var t=this.s;t!==void 0;t=t.n)t.S.U(t)}};Sn.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(var e=this.t;e!==void 0;e=e.x)e.t.N()}};Object.defineProperty(Sn.prototype,"value",{get:function(){if(1&this.f)throw new Error("Cycle detected");var e=ql(this);if(this.h(),e!==void 0&&(e.i=this.i),16&this.f)throw this.v;return this.v}});function pf(e){return new Sn(e)}function Ql(e){var t=e.u;if(e.u=void 0,typeof t=="function"){Tn++;var n=ke;ke=void 0;try{t()}catch(r){throw e.f&=-2,e.f|=8,ss(e),r}finally{ke=n,as()}}}function ss(e){for(var t=e.s;t!==void 0;t=t.n)t.S.U(t);e.x=void 0,e.s=void 0,Ql(e)}function mf(e){if(ke!==this)throw new Error("Out-of-order effect");Kl(this),ke=e,this.f&=-2,8&this.f&&ss(this),as()}function yr(e){this.x=e,this.u=void 0,this.s=void 0,this.o=void 0,this.f=32}yr.prototype.c=function(){var e=this.S();try{if(8&this.f||this.x===void 0)return;var t=this.x();typeof t=="function"&&(this.u=t)}finally{e()}};yr.prototype.S=function(){if(1&this.f)throw new Error("Cycle detected");this.f|=1,this.f&=-9,Ql(this),Gl(this),Tn++;var e=ke;return ke=this,mf.bind(this,e)};yr.prototype.N=function(){2&this.f||(this.f|=2,this.o=Zn,Zn=this)};yr.prototype.d=function(){this.f|=8,1&this.f||ss(this)};function os(e){var t=new yr(e);try{t.c()}catch(n){throw t.d(),n}return t.d.bind(t)}var Ki;function In(e,t){G[e]=t.bind(null,G[e]||function(){})}function ui(e){Ki&&Ki(),Ki=e&&e.S()}function Xl(e){var t=this,n=e.data,r=bf(n);r.value=n;var i=Re(function(){for(var a=t.__v;a=a.__;)if(a.__c){a.__c.__$f|=4;break}return t.__$u.c=function(){var s;!Nl(i.peek())&&((s=t.base)==null?void 0:s.nodeType)===3?t.base.data=i.peek():(t.__$f|=1,t.setState({}))},pf(function(){var s=r.value.value;return s===0?0:s===!0?"":s||""})},[]);return i.value}Xl.displayName="_st";Object.defineProperties(ze.prototype,{constructor:{configurable:!0,value:void 0},type:{configurable:!0,value:Xl},props:{configurable:!0,get:function(){return{data:this}}},__b:{configurable:!0,value:1}});In("__b",function(e,t){if(typeof t.type=="string"){var n,r=t.props;for(var i in r)if(i!=="children"){var a=r[i];a instanceof ze&&(n||(t.__np=n={}),n[i]=a,r[i]=a.peek())}}e(t)});In("__r",function(e,t){ui();var n,r=t.__c;r&&(r.__$f&=-2,(n=r.__$u)===void 0&&(r.__$u=n=function(i){var a;return os(function(){a=this}),a.c=function(){r.__$f|=1,r.setState({})},a}())),ui(n),e(t)});In("__e",function(e,t,n,r){ui(),e(t,n,r)});In("diffed",function(e,t){ui();var n;if(typeof t.type=="string"&&(n=t.__e)){var r=t.__np,i=t.props;if(r){var a=n.U;if(a)for(var s in a){var o=a[s];o!==void 0&&!(s in r)&&(o.d(),a[s]=void 0)}else n.U=a={};for(var u in r){var c=a[u],h=r[u];c===void 0?(c=gf(n,u,h,i),a[u]=c):c.o(h,i)}}}e(t)});function gf(e,t,n,r){var i=t in e&&e.ownerSVGElement===void 0,a=$e(n);return{o:function(s,o){a.value=s,r=o},d:os(function(){var s=a.value.value;r[t]!==s&&(r[t]=s,i?e[t]=s:s?e.setAttribute(t,s):e.removeAttribute(t))})}}In("unmount",function(e,t){if(typeof t.type=="string"){var n=t.__e;if(n){var r=n.U;if(r){n.U=void 0;for(var i in r){var a=r[i];a&&a.d()}}}}else{var s=t.__c;if(s){var o=s.__$u;o&&(s.__$u=void 0,o.d())}}e(t)});In("__h",function(e,t,n,r){(r<3||r===9)&&(t.__$f|=2),e(t,n,r)});Tt.prototype.shouldComponentUpdate=function(e,t){var n=this.__$u;if(!(n&&n.s!==void 0||4&this.__$f)||3&this.__$f)return!0;for(var r in t)return!0;for(var i in e)if(i!=="__source"&&e[i]!==this.props[i])return!0;for(var a in this.props)if(!(a in e))return!0;return!1};function bf(e){return Re(function(){return $e(e)},[])}const Zl=$e(!1),Jl=$e(!1),xi=$e(!1),wi=$e(null),rn=$e(null),ec=$e("idle"),tc=$e(!1),nc=$e("idle"),rc=$e(null),ic=$e(null),kt=$e([]),Nn=$e([]),Ef=e=>({...e,id:"id"in e?e.id:Vl(),timestamp:new Date(e.timestamp)}),Ai=e=>({...e,id:Vl(),timestamp:new Date});let xa=null,ac="",sc="",wa=0;const _f=({id:e,timestamp:t,...n})=>({...n,timestamp:t.toISOString()}),oc=e=>{xa&&(wa+=1,xa({...e,syncKey:ac,sourceInstanceId:sc,revision:wa}))},Ci=()=>{oc({type:"messages_updated",messages:kt.value.map(_f)})},uc=(e,t=!0)=>{kt.value=[...kt.value,e],Nn.value=[],t&&Ci()},Tf=e=>{const t=Ai(e);return uc(t),t},kf=e=>{kt.value=kt.value.filter(t=>t.id!==e),Ci()},yf=()=>{xi.value=!0,wi.value="thinking",rn.value=Ai({role:"assistant",content:""})},xf=e=>{if(!e)return;const t=rn.value;t&&(rn.value={...t,content:t.content+e})},xr=()=>{rn.value=null,xi.value=!1,wi.value=null},wf=e=>{const{commit:t=!0,sync:n=!0,blocks:r}=e??{},i=rn.value;if(xr(),t&&(i?.content||r?.length)){const a=i??Ai({role:"assistant",content:""});uc(r?.length?{...a,blocks:r}:a,!1)}n&&Ci()},lc=(e=!0)=>{kt.value=[],xr(),Nn.value=[],e&&oc({type:"messages_cleared"})},Af=(e,t=!0)=>{xr(),kt.value=e.filter(n=>n.role!=="system").map(Ai),Nn.value=[],t&&Ci()},cc=e=>{xa=e?.emit??null,ac=e?.syncKey??"",sc=e?.sourceInstanceId??"",wa=0},Cf=e=>{if(xr(),Nn.value=[],e.type==="messages_updated"){kt.value=e.messages.map(Ef);return}kt.value=[]},dc=$e(null),tn=$e({}),hc=$e(null),us=(e,t)=>{const n=tn.value[e]??{status:"loading"};tn.value={...tn.value,[e]:{...n,...t}}},vf=(e,t)=>{const n=tn.value[e];n&&us(e,{liveSummary:(n.liveSummary??"")+t})},Sf=(e,t)=>{const n=tn.value[e]?.liveSummary;us(e,{status:"ready",summary:t||n||"",liveSummary:void 0})},fc=(e,t,n)=>{nc.value=e,ic.value=t??null,rc.value=n??null},If=()=>{Zl.value=!1,Jl.value=!1,xi.value=!1,wi.value=null,rn.value=null,ec.value="idle",Nn.value=[],tc.value=!1,tn.value={},dc.value=null,hc.value=null,lc(!1),fc("idle"),cc(null)},F={isOpen:Zl,embedded:Jl,isStreaming:xi,assistantStatus:wi,liveAssistantMessage:rn,connectionState:ec,messages:kt,quickReplies:Nn,uploadState:nc,uploadError:rc,uploadFileName:ic,hasUnreadMessages:tc,jobDetails:tn,overlay:dc,requestJobDetail:hc,setJobDetail:us,appendJobSummaryChunk:vf,finalizeJobSummary:Sf,configureSync:cc,applySyncSnapshot:Cf,addMessage:Tf,removeMessage:kf,startAssistantResponse:yf,appendToLiveAssistantMessage:xf,finishAssistantResponse:wf,clearAssistantResponse:xr,clearMessages:lc,setMessages:Af,setUploadState:fc,resetState:If},yt=xt({base:"fr inline-flex shrink-0 items-center corner-smooth justify-center no-underline transition-all ease-kin-click disabled:cursor-not-allowed",variants:{variant:{ghost:"bg-transparent text-n-9 hover:bg-n-3 hover:text-n-11 disabled:text-n-6 active:scale-95",neutral:"bg-n-3 text-n-10 hover:bg-n-4 hover:text-n-11 disabled:opacity-50 active:scale-95",accent:"bg-a-9 text-white hover:bg-a-10 disabled:opacity-50 active:scale-95"},size:{iconSm:"size-8 sm:size-7 [&_svg]:size-3.5 rounded-kin-xl",iconMd:"size-10 sm:size-8 [&_svg]:size-4 rounded-kin-2xl sm:rounded-kin-xl",iconLg:"size-12 [&_svg]:size-6 rounded-kin-3xl",sm:"px-2.5 py-2 text-xs font-medium rounded-kin-md",md:"px-4 py-2 text-sm font-medium rounded-kin-lg"}},defaultVariants:{size:"iconMd"}});var Nf=0;function m(e,t,n,r,i,a){var s,o,u={};for(o in t)o=="ref"?s=t[o]:u[o]=t[o];var c={type:e,props:u,key:n,ref:s,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:--Nf,__source:i,__self:a};if(typeof e=="function"&&(s=e.defaultProps))for(o in s)u[o]===void 0&&(u[o]=s[o]);return G.vnode&&G.vnode(c),c}function Ye(e){return function(n){return m("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:n.strokeWidth??1.5,strokeLinecap:"round",strokeLinejoin:"round",focusable:"false","aria-hidden":"true",...n,children:e()})}}function Lf({class:e}){return m("svg",{class:e,viewBox:"0 0 32 16",fill:"currentColor","aria-hidden":"true",focusable:"false",children:m("path",{d:"M8.28 12.54c-.76-.34-1.52-1.08-2.88-2.44l-2.02-2.02-.68-.68-.12-.16a.76.76 90 010-.72l.12-.16.68-.68A16.5 16.5 90 015.9 3.36a4.5 4.5 90 014.62 0c.44.26.94.72 2.5 2.32l1.1 1.1 1.54-1.54-1.1-1.1c-1.48-1.44-2.22-2.18-2.98-2.62a6.76 6.76 90 00-6.82 0c-.74.42-1.46 1.16-2.94 2.6-.64.64-.92.94-1.14 1.28a3 3 90 000 2.92c.2.34.52.64 1.14 1.28L4.3 12.1c1.1 1.08 1.64 1.62 2.26 2.02a6 6 90 001.76.72c.72.18 1.5.18 3.04.18h10.9c1.54 0 2.32 0 3.04-.18q.92-.22 1.76-.72c.64-.4 1.16-.94 2.26-2.02l.46-.48c5.8-5.8-2.88-14.48-8.66-8.66L13.98 10.1c-1.52 1.5-2.28 2.28-3.16 2.56a3.76 3.76 90 01-2.16.02l-.4-.16Z"})})}const Rf=Ye(()=>m("path",{d:"M6 10c2-4 3.5-7 6-7s4 3 6 7 4 8 2 9-6-2.5-8-2.5S6 20 4 19s0-5 2-9"})),ls=Ye(()=>m("path",{d:"M18 6 6 18M18 18 6 6"})),Of=Ye(()=>m(pe,{children:[m("path",{d:"M3 6H21"}),m("path",{d:"M4.5 6C5.5 22 6 22 12 22s6.5 0 7.5-16"}),m("path",{d:"M8 6c1-4 1-4 4-4s3 0 4 4"})]})),Df=Ye(()=>m("path",{d:"M5 14s1.5.5 3.5 4C8.5 18 12 11 19 7"})),pc=Ye(()=>m("path",{d:"m15 7-6.5 6.5c-.4.4-.6.9-.6 1.5s.2 1.1.6 1.5.9.6 1.5.6 1.1-.2 1.5-.6L18 10c.8-.8 1.2-1.9 1.2-3s-.4-2.2-1.2-3-1.9-1.2-3-1.2-2.2.4-3 1.2l-6.5 6.5c-1.2 1.2-1.9 2.8-1.9 4.5s.7 3.3 1.9 4.5 2.8 1.9 4.5 1.9 3.3-.7 4.5-1.9L21 13"})),Pf=Ye(()=>m("path",{d:"M21 12a9 9 0 11-6.219-8.56"})),Aa=Ye(()=>m(pe,{children:[m("path",{d:"M9.5 7c.5-1.5 1.5-1.5 2 0 1 3 2.5 4.5 5.5 5.5 1.5.5 1.5 1.5 0 2-3 1-4.5 2.5-5.5 5.5-.5 1.5-1.5 1.5-2 0-1-3-2.5-4.5-5.5-5.5-1.5-.5-1.5-1.5 0-2C7 11.5 8.5 10 9.5 7Z"}),m("path",{d:"M17 2V6"}),m("path",{d:"M21 8V10"}),m("path",{d:"M15 4H19"}),m("path",{d:"M20 9H22"})]})),Mf=Ye(()=>m(pe,{children:[m("circle",{cx:"10",cy:"10",r:"7"}),m("path",{d:"M17.5 17.5L15 15"}),m("path",{d:"M17.5 19.6c-.7-.7-.7-1.4 0-2.1s1.4-.7 2.1 0l1.4 1.4c.7.7.7 1.4 0 2.1-.7.7-1.4.7-2.1 0l-1.4-1.4Z"})]})),po=Ye(()=>m(pe,{children:[m("path",{d:"M8 6c1-3.5 1-3.5 4-3.5s3 0 4 3.5"}),m("path",{d:"M12 20.5s-2.5 0-5 0-4-1.5-4-4S3 10 3 10C3 7.5 4.5 6 7 6s7.5 0 10 0 4 1.5 4 4v3.5"}),m("circle",{cx:"18",cy:"19",r:"3"}),m("path",{d:"M22 23l-1.8-1.8"}),m("path",{d:"M7 11s2 .5 5 .5 5-.5 5-.5"})]})),mo=Ye(()=>m(pe,{children:[m("path",{d:"M16 4h1.5c2 0 2.5.5 2.5 2.5V8"}),m("path",{d:"M20 16v1.5c0 2-.5 2.5-2.5 2.5H16"}),m("path",{d:"M8 12H16"}),m("path",{d:"M8 9H14"}),m("path",{d:"M8 15H12"}),m("path",{d:"M8 4H6.5C4.5 4 4 4.5 4 6.5V8"}),m("path",{d:"M4 16v1.5c0 2 .5 2.5 2.5 2.5H8"})]})),Bf=Ye(()=>m(pe,{children:[m("path",{d:"M5 14v6"}),m("path",{d:"M5 4v7"}),m("path",{d:"M9 8h6"}),m("path",{d:"M2 14H8"}),m("path",{d:"M16 12h6"}),m("path",{d:"M12 8V4"}),m("path",{d:"M12 11v9"}),m("path",{d:"M19 4v8"}),m("path",{d:"M19 15v5"})]})),Ff=Ye(()=>m("path",{d:"M13 3H11C6.5 3 5 4.5 5 9V20c0 1 1 1.5 2 1l4-2c1-.5 1-.5 2 0l4 2c1 .5 2 0 2-1V9c0-4.5-1.5-6-6-6Z"})),go=Ye(()=>m(pe,{children:[m("path",{d:"M20.4 6.6 13 14 9 15l1-4 7.4-7.4c.4-.4.9-.6 1.5-.6.6 0 1.1.2 1.5.6s.6.9.6 1.5-.2 1.1-.6 1.5Z"}),m("path",{d:"M16 5L19 8"}),m("path",{d:"M9 6H7C4.5 6 3 7.5 3 10v7c0 2.5 1.5 4 4 4h7c2.5 0 4-1.5 4-4V15"})]})),mc=Ye(()=>m("path",{d:"M6 10s3.5 6 6 6 6-6 6-6"})),Hf=Ye(()=>m(pe,{children:[m("path",{d:"M4 11c0-4 3-8 8-8s8 4 8 8c0 5-5 9-5 9-2.5 2-3.5 2-6 0 0 0-5-4-5-9Z"}),m("circle",{cx:"12",cy:"11",r:"3"})]})),Uf=Ye(()=>m(pe,{children:[m("path",{d:"M18.5 5.5H5.5C3 5.5 2 6.5 2 9v6c0 2.5 1 3.5 3.5 3.5h13c2.5 0 3.5-1 3.5-3.5V9c0-2.5-1-3.5-3.5-3.5Z"}),m("path",{d:"M18 12H18.01"}),m("path",{d:"M6 12H6.01"}),m("circle",{cx:"12",cy:"12",r:"3"})]})),zf=Ye(()=>m(pe,{children:[m("path",{d:"M12 12L15 14"}),m("path",{d:"M12 7V12"}),m("path",{d:"M12 3C7 3 3 7 3 12s4 9 9 9c3.1 0 5.9-1.6 7.5-4"}),m("path",{d:"M12 3c5 0 9 4 9 9 0 1.9-.6 3.6-1.5 5","stroke-dasharray":"0.01 2.75"})]})),$f="modulepreload",Yf=function(e,t){return new URL(e,t).href},bo={},gc=function(t,n,r){if(!n||n.length===0)return t();const i=document.getElementsByTagName("link");return Promise.all(n.map(a=>{if(a=Yf(a,r),a in bo)return;bo[a]=!0;const s=a.endsWith(".css"),o=s?'[rel="stylesheet"]':"";if(!!r)for(let h=i.length-1;h>=0;h--){const d=i[h];if(d.href===a&&(!s||d.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${a}"]${o}`))return;const c=document.createElement("link");if(c.rel=s?"stylesheet":$f,s||(c.as="script",c.crossOrigin=""),c.href=a,document.head.appendChild(c),s)return new Promise((h,d)=>{c.addEventListener("load",h),c.addEventListener("error",()=>d(new Error(`Unable to preload CSS for ${a}`)))})})).then(()=>t()).catch(a=>{const s=new Event("vite:preloadError",{cancelable:!0});if(s.payload=a,window.dispatchEvent(s),!s.defaultPrevented)throw a})};function jf(e,t){for(var n in t)e[n]=t[n];return e}function Ca(e,t){for(var n in e)if(n!=="__source"&&!(n in t))return!0;for(var r in t)if(r!=="__source"&&e[r]!==t[r])return!0;return!1}function Eo(e){this.props=e}function _e(e,t){function n(i){var a=this.props.ref,s=a==i.ref;return!s&&a&&(a.call?a(null):a.current=null),t?!t(this.props,i)||!s:Ca(this.props,i)}function r(i){return this.shouldComponentUpdate=n,_t(e,i)}return r.displayName="Memo("+(e.displayName||e.name)+")",r.prototype.isReactComponent=!0,r.__f=!0,r}(Eo.prototype=new Tt).isPureReactComponent=!0,Eo.prototype.shouldComponentUpdate=function(e,t){return Ca(this.props,e)||Ca(this.state,t)};var _o=G.__b;G.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),_o&&_o(e)};var Vf=G.__e;G.__e=function(e,t,n,r){if(e.then){for(var i,a=t;a=a.__;)if((i=a.__c)&&i.__c)return t.__e==null&&(t.__e=n.__e,t.__k=n.__k),i.__c(e,t)}Vf(e,t,n,r)};var To=G.unmount;function bc(e,t,n){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach(function(r){typeof r.__c=="function"&&r.__c()}),e.__c.__H=null),(e=jf({},e)).__c!=null&&(e.__c.__P===n&&(e.__c.__P=t),e.__c=null),e.__k=e.__k&&e.__k.map(function(r){return bc(r,t,n)})),e}function Ec(e,t,n){return e&&(e.__v=null,e.__k=e.__k&&e.__k.map(function(r){return Ec(r,t,n)}),e.__c&&e.__c.__P===t&&(e.__e&&n.insertBefore(e.__e,e.__d),e.__c.__e=!0,e.__c.__P=n)),e}function Jn(){this.__u=0,this.t=null,this.__b=null}function _c(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function Tc(e){var t,n,r;function i(a){if(t||(t=e()).then(function(s){n=s.default||s},function(s){r=s}),r)throw r;if(!n)throw t;return _t(n,a)}return i.displayName="Lazy",i.__f=!0,i}function Or(){this.u=null,this.o=null}G.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&e.__h===!0&&(e.type=null),To&&To(e)},(Jn.prototype=new Tt).__c=function(e,t){var n=t.__c,r=this;r.t==null&&(r.t=[]),r.t.push(n);var i=_c(r.__v),a=!1,s=function(){a||(a=!0,n.__R=null,i?i(o):o())};n.__R=s;var o=function(){if(!--r.__u){if(r.state.__a){var c=r.state.__a;r.__v.__k[0]=Ec(c,c.__c.__P,c.__c.__O)}var h;for(r.setState({__a:r.__b=null});h=r.t.pop();)h.forceUpdate()}},u=t.__h===!0;r.__u++||u||r.setState({__a:r.__b=r.__v.__k[0]}),e.then(s,s)},Jn.prototype.componentWillUnmount=function(){this.t=[]},Jn.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),r=this.__v.__k[0].__c;this.__v.__k[0]=bc(this.__b,n,r.__O=r.__P)}this.__b=null}var i=t.__a&&_t(pe,null,e.fallback);return i&&(i.__h=null),[_t(pe,null,t.__a?null:e.children),i]};var ko=function(e,t,n){if(++n[1]===n[0]&&e.o.delete(t),e.props.revealOrder&&(e.props.revealOrder[0]!=="t"||!e.o.size))for(n=e.u;n;){for(;n.length>3;)n.pop()();if(n[1]<n[0])break;e.u=n=n[2]}};function qf(e){return this.getChildContext=function(){return e.context},e.children}function Wf(e){var t=this,n=e.i;t.componentWillUnmount=function(){ai(null,t.l),t.l=null,t.i=null},t.i&&t.i!==n&&t.componentWillUnmount(),e.__v?(t.l||(t.i=n,t.l={nodeType:1,parentNode:n,childNodes:[],appendChild:function(r){this.childNodes.push(r),t.i.appendChild(r)},insertBefore:function(r,i){this.childNodes.push(r),t.i.appendChild(r)},removeChild:function(r){this.childNodes.splice(this.childNodes.indexOf(r)>>>1,1),t.i.removeChild(r)}}),ai(_t(qf,{context:t.context},e.__v),t.l)):t.l&&t.componentWillUnmount()}function kc(e,t){var n=_t(Wf,{__v:e,i:t});return n.containerInfo=t,n}(Or.prototype=new Tt).__a=function(e){var t=this,n=_c(t.__v),r=t.o.get(e);return r[0]++,function(i){var a=function(){t.props.revealOrder?(r.push(i),ko(t,e,r)):i()};n?n(a):a()}},Or.prototype.render=function(e){this.u=null,this.o=new Map;var t=ri(e.children);e.revealOrder&&e.revealOrder[0]==="b"&&t.reverse();for(var n=t.length;n--;)this.o.set(t[n],this.u=[1,0,this.u]);return e.children},Or.prototype.componentDidUpdate=Or.prototype.componentDidMount=function(){var e=this;this.o.forEach(function(t,n){ko(e,n,t)})};var yc=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,Gf=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,Kf=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,Qf=/[A-Z0-9]/g,Xf=typeof document<"u",Zf=function(e){return(typeof Symbol<"u"&&typeof Symbol()=="symbol"?/fil|che|rad/:/fil|che|ra/).test(e)};Tt.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(e){Object.defineProperty(Tt.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})});var yo=G.event;function Jf(){}function ep(){return this.cancelBubble}function tp(){return this.defaultPrevented}G.event=function(e){return yo&&(e=yo(e)),e.persist=Jf,e.isPropagationStopped=ep,e.isDefaultPrevented=tp,e.nativeEvent=e};var np={enumerable:!1,configurable:!0,get:function(){return this.class}},xo=G.vnode;G.vnode=function(e){typeof e.type=="string"&&function(t){var n=t.props,r=t.type,i={};for(var a in n){var s=n[a];if(!(a==="value"&&"defaultValue"in n&&s==null||Xf&&a==="children"&&r==="noscript"||a==="class"||a==="className")){var o=a.toLowerCase();a==="defaultValue"&&"value"in n&&n.value==null?a="value":a==="download"&&s===!0?s="":o==="ondoubleclick"?a="ondblclick":o!=="onchange"||r!=="input"&&r!=="textarea"||Zf(n.type)?o==="onfocus"?a="onfocusin":o==="onblur"?a="onfocusout":Kf.test(a)?a=o:r.indexOf("-")===-1&&Gf.test(a)?a=a.replace(Qf,"-$&").toLowerCase():s===null&&(s=void 0):o=a="oninput",o==="oninput"&&i[a=o]&&(a="oninputCapture"),i[a]=s}}r=="select"&&i.multiple&&Array.isArray(i.value)&&(i.value=ri(n.children).forEach(function(u){u.props.selected=i.value.indexOf(u.props.value)!=-1})),r=="select"&&i.defaultValue!=null&&(i.value=ri(n.children).forEach(function(u){u.props.selected=i.multiple?i.defaultValue.indexOf(u.props.value)!=-1:i.defaultValue==u.props.value})),n.class&&!n.className?(i.class=n.class,Object.defineProperty(i,"className",np)):(n.className&&!n.class||n.class&&n.className)&&(i.class=i.className=n.className),t.props=i}(e),e.$$typeof=yc,xo&&xo(e)};var wo=G.__r;G.__r=function(e){wo&&wo(e),e.__c};var Ao=G.diffed;G.diffed=function(e){Ao&&Ao(e);var t=e.props,n=e.__e;n!=null&&e.type==="textarea"&&"value"in t&&t.value!==n.value&&(n.value=t.value==null?"":t.value)};function Ht(e){return!!e&&e.$$typeof===yc}function rp(e){return Ht(e)?zl.apply(null,arguments):e}function ip(e){e()}function ap(){return[!1,ip]}const vi=function(e){if(e==null)return lp;if(typeof e=="function")return Si(e);if(typeof e=="object")return Array.isArray(e)?sp(e):op(e);if(typeof e=="string")return up(e);throw new Error("Expected function, string, or object as test")};function sp(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=vi(e[n]);return Si(r);function r(...i){let a=-1;for(;++a<t.length;)if(t[a].apply(this,i))return!0;return!1}}function op(e){const t=e;return Si(n);function n(r){const i=r;let a;for(a in e)if(i[a]!==t[a])return!1;return!0}}function up(e){return Si(t);function t(n){return n&&n.type===e}}function Si(e){return t;function t(n,r,i){return!!(cp(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function lp(){return!0}function cp(e){return e!==null&&typeof e=="object"&&"type"in e}const xc=[],Wn=!0,va=!1,bn="skip";function cs(e,t,n,r){let i;typeof t=="function"&&typeof n!="function"?(r=n,n=t):i=t;const a=vi(i),s=r?-1:1;o(e,void 0,[])();function o(u,c,h){const d=u&&typeof u=="object"?u:{};if(typeof d.type=="string"){const p=typeof d.tagName=="string"?d.tagName:typeof d.name=="string"?d.name:void 0;Object.defineProperty(f,"name",{value:"node ("+(u.type+(p?"<"+p+">":""))+")"})}return f;function f(){let p=xc,g,k,C;if((!t||a(u,c,h[h.length-1]||void 0))&&(p=dp(n(u,h)),p[0]===va))return p;if("children"in u&&u.children){const w=u;if(w.children&&p[0]!==bn)for(k=(r?w.children.length:-1)+s,C=h.concat(w);k>-1&&k<w.children.length;){const A=w.children[k];if(g=o(A,k,C)(),g[0]===va)return g;k=typeof g[1]=="number"?g[1]:k+s}}return p}}}function dp(e){return Array.isArray(e)?e:typeof e=="number"?[Wn,e]:e==null?xc:[e]}function $t(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),cs(e,a,o,i);function o(u,c){const h=c[c.length-1],d=h?h.children.indexOf(u):void 0;return s(u,d,h)}}const wn={indicator:"indicator",textOnly:"text-only",remove:"remove"};function hp({defaultOrigin:e="",allowedLinkPrefixes:t=[],allowedImagePrefixes:n=[],allowDataImages:r=!1,allowedProtocols:i=[],blockedImageClass:a="inline-block bg-gray-200 dark:bg-gray-700 text-gray-600 dark:text-gray-400 px-3 py-1 rounded text-sm",blockedLinkClass:s="text-gray-500",linkBlockPolicy:o=wn.indicator,imageBlockPolicy:u=wn.indicator}){const c=t.length&&!t.every(d=>d==="*"),h=n.length&&!n.every(d=>d==="*");if(!e&&(c||h))throw new Error("defaultOrigin is required when allowedLinkPrefixes or allowedImagePrefixes are provided");return d=>{const f=Ep(e,t,n,r,i,a,s,o,u);wc(d),$t(d,f)}}function Co(e,t){if(typeof e!="string")return null;try{return new URL(e)}catch{if(t)try{return new URL(e,t)}catch{return null}if(e.startsWith("/")||e.startsWith("./")||e.startsWith("../"))try{return new URL(e,"http://example.com")}catch{return null}return null}}function fp(e){return typeof e!="string"?!1:e.startsWith("/")||e.startsWith("./")||e.startsWith("../")}const pp=new Set(["https:","http:","irc:","ircs:","mailto:","xmpp:","blob:"]),mp=new Set(["javascript:","data:","file:","vbscript:"]);function vo(e,t,n,r=!1,i=!1,a=[]){if(!e)return null;if(typeof e=="string"&&e.startsWith("#")&&!i)try{if(new URL(e,"http://example.com").hash===e)return e}catch{}if(typeof e=="string"&&e.startsWith("data:"))return i&&r&&e.startsWith("data:image/")?e:null;if(typeof e=="string"&&e.startsWith("blob:")){try{if(new URL(e).protocol==="blob:"&&e.length>5){const h=e.substring(5);if(h&&h.length>0&&h!=="invalid")return e}}catch{return null}return null}const s=Co(e,n);if(!s||mp.has(s.protocol)||!(pp.has(s.protocol)||a.includes(s.protocol)||a.includes("*")))return null;if(s.protocol==="mailto:"||!s.protocol.match(/^https?:$/))return s.href;const u=fp(e);return s&&t.some(c=>{const h=Co(c,n);return!h||h.origin!==s.origin?!1:s.href.startsWith(h.href)})?u?s.pathname+s.search+s.hash:s.href:t.includes("*")?s.protocol!=="https:"&&s.protocol!=="http:"?null:u?s.pathname+s.search+s.hash:s.href:null}function wc(e){if("children"in e&&Array.isArray(e.children)){e.children=e.children.filter(t=>t!=null);for(const t of e.children)wc(t)}}const Qi=Symbol("node-seen");function gp(e,t,n){return t===wn.remove?{type:"remove"}:t===wn.textOnly?{type:"replace",element:{type:"element",tagName:"span",properties:{},children:[...e.children]}}:{type:"replace",element:{type:"element",tagName:"span",properties:{title:"Blocked URL: "+String(e.properties.href),class:n},children:[...e.children,{type:"text",value:" [blocked]"}]}}}function bp(e,t,n){if(t===wn.remove)return{type:"remove"};if(t===wn.textOnly){const r=String(e.properties.alt||"");return r?{type:"replace",element:{type:"element",tagName:"span",properties:{},children:[{type:"text",value:r}]}}:{type:"remove"}}return{type:"replace",element:{type:"element",tagName:"span",properties:{class:n},children:[{type:"text",value:"[Image blocked: "+String(e.properties.alt||"No description")+"]"}]}}}const Ep=(e,t,n,r,i,a,s,o,u)=>{const c=(h,d,f)=>{if(h.type!=="element"||h[Qi])return Wn;if(h.tagName==="a"){const p=vo(h.properties.href,t,e,!1,!1,i);if(p===null){if(h[Qi]=!0,$t(h,c),f&&typeof d=="number"){const g=gp(h,o,s);if(g.type==="remove")return f.children.splice(d,1),[bn,d];f.children[d]=g.element}return bn}else return h.properties.href=p,h.properties.target="_blank",h.properties.rel="noopener noreferrer",Wn}if(h.tagName==="img"){const p=vo(h.properties.src,n,e,r,!0,i);if(p===null){if(h[Qi]=!0,$t(h,c),f&&typeof d=="number"){const g=bp(h,u,a);if(g.type==="remove")return f.children.splice(d,1),[bn,d];f.children[d]=g.element}return bn}else return h.properties.src=p,Wn}return Wn};return c},Ac=-1,Ii=0,er=1,li=2,ds=3,hs=4,fs=5,ps=6,Cc=7,vc=8,So=typeof self=="object"?self:globalThis,_p=(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 Ii:case Ac:return n(s,i);case er:{const o=n([],i);for(const u of s)o.push(r(u));return o}case li:{const o=n({},i);for(const[u,c]of s)o[r(u)]=r(c);return o}case ds:return n(new Date(s),i);case hs:{const{source:o,flags:u}=s;return n(new RegExp(o,u),i)}case fs:{const o=n(new Map,i);for(const[u,c]of s)o.set(r(u),r(c));return o}case ps:{const o=n(new Set,i);for(const u of s)o.add(r(u));return o}case Cc:{const{name:o,message:u}=s;return n(new So[o](u),i)}case vc:return n(BigInt(s),i);case"BigInt":return n(Object(BigInt(s)),i);case"ArrayBuffer":return n(new Uint8Array(s).buffer,s);case"DataView":{const{buffer:o}=new Uint8Array(s);return n(new DataView(o),s)}}return n(new So[a](s),i)};return r},Io=e=>_p(new Map,e)(0),mn="",{toString:Tp}={},{keys:kp}=Object,Un=e=>{const t=typeof e;if(t!=="object"||!e)return[Ii,t];const n=Tp.call(e).slice(8,-1);switch(n){case"Array":return[er,mn];case"Object":return[li,mn];case"Date":return[ds,mn];case"RegExp":return[hs,mn];case"Map":return[fs,mn];case"Set":return[ps,mn];case"DataView":return[er,n]}return n.includes("Array")?[er,n]:n.includes("Error")?[Cc,n]:[li,n]},Dr=([e,t])=>e===Ii&&(t==="function"||t==="symbol"),yp=(e,t,n,r)=>{const i=(s,o)=>{const u=r.push(s)-1;return n.set(o,u),u},a=s=>{if(n.has(s))return n.get(s);let[o,u]=Un(s);switch(o){case Ii:{let h=s;switch(u){case"bigint":o=vc,h=s.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+u);h=null;break;case"undefined":return i([Ac],s)}return i([o,h],s)}case er:{if(u){let f=s;return u==="DataView"?f=new Uint8Array(s.buffer):u==="ArrayBuffer"&&(f=new Uint8Array(s)),i([u,[...f]],s)}const h=[],d=i([o,h],s);for(const f of s)h.push(a(f));return d}case li:{if(u)switch(u){case"BigInt":return i([u,s.toString()],s);case"Boolean":case"Number":case"String":return i([u,s.valueOf()],s)}if(t&&"toJSON"in s)return a(s.toJSON());const h=[],d=i([o,h],s);for(const f of kp(s))(e||!Dr(Un(s[f])))&&h.push([a(f),a(s[f])]);return d}case ds:return i([o,s.toISOString()],s);case hs:{const{source:h,flags:d}=s;return i([o,{source:h,flags:d}],s)}case fs:{const h=[],d=i([o,h],s);for(const[f,p]of s)(e||!(Dr(Un(f))||Dr(Un(p))))&&h.push([a(f),a(p)]);return d}case ps:{const h=[],d=i([o,h],s);for(const f of s)(e||!Dr(Un(f)))&&h.push(a(f));return d}}const{message:c}=s;return i([o,{name:u,message:c}],s)};return a},No=(e,{json:t,lossy:n}={})=>{const r=[];return yp(!(t||n),!!t,new Map,r)(e),r},an=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?Io(No(e,t)):structuredClone(e):(e,t)=>Io(No(e,t));class wr{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}wr.prototype.normal={};wr.prototype.property={};wr.prototype.space=void 0;function Sc(e,t){const n={},r={};for(const i of e)Object.assign(n,i.property),Object.assign(r,i.normal);return new wr(n,r,t)}function fr(e){return e.toLowerCase()}class Je{constructor(t,n){this.attribute=n,this.property=t}}Je.prototype.attribute="";Je.prototype.booleanish=!1;Je.prototype.boolean=!1;Je.prototype.commaOrSpaceSeparated=!1;Je.prototype.commaSeparated=!1;Je.prototype.defined=!1;Je.prototype.mustUseProperty=!1;Je.prototype.number=!1;Je.prototype.overloadedBoolean=!1;Je.prototype.property="";Je.prototype.spaceSeparated=!1;Je.prototype.space=void 0;let xp=0;const ne=un(),Me=un(),Sa=un(),H=un(),xe=un(),kn=un(),tt=un();function un(){return 2**++xp}const Ia=Object.freeze(Object.defineProperty({__proto__:null,boolean:ne,booleanish:Me,commaOrSpaceSeparated:tt,commaSeparated:kn,number:H,overloadedBoolean:Sa,spaceSeparated:xe},Symbol.toStringTag,{value:"Module"})),Xi=Object.keys(Ia);class ms extends Je{constructor(t,n,r,i){let a=-1;if(super(t,n),Lo(this,"space",i),typeof r=="number")for(;++a<Xi.length;){const s=Xi[a];Lo(this,Xi[a],(r&Ia[s])===Ia[s])}}}ms.prototype.defined=!0;function Lo(e,t,n){n&&(e[t]=n)}function Ln(e){const t={},n={};for(const[r,i]of Object.entries(e.properties)){const a=new ms(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[fr(r)]=r,n[fr(a.attribute)]=r}return new wr(t,n,e.space)}const Ic=Ln({properties:{ariaActiveDescendant:null,ariaAtomic:Me,ariaAutoComplete:null,ariaBusy:Me,ariaChecked:Me,ariaColCount:H,ariaColIndex:H,ariaColSpan:H,ariaControls:xe,ariaCurrent:null,ariaDescribedBy:xe,ariaDetails:null,ariaDisabled:Me,ariaDropEffect:xe,ariaErrorMessage:null,ariaExpanded:Me,ariaFlowTo:xe,ariaGrabbed:Me,ariaHasPopup:null,ariaHidden:Me,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:xe,ariaLevel:H,ariaLive:null,ariaModal:Me,ariaMultiLine:Me,ariaMultiSelectable:Me,ariaOrientation:null,ariaOwns:xe,ariaPlaceholder:null,ariaPosInSet:H,ariaPressed:Me,ariaReadOnly:Me,ariaRelevant:null,ariaRequired:Me,ariaRoleDescription:xe,ariaRowCount:H,ariaRowIndex:H,ariaRowSpan:H,ariaSelected:Me,ariaSetSize:H,ariaSort:null,ariaValueMax:H,ariaValueMin:H,ariaValueNow:H,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function Nc(e,t){return t in e?e[t]:t}function Lc(e,t){return Nc(e,t.toLowerCase())}const wp=Ln({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:kn,acceptCharset:xe,accessKey:xe,action:null,allow:null,allowFullScreen:ne,allowPaymentRequest:ne,allowUserMedia:ne,alt:null,as:null,async:ne,autoCapitalize:null,autoComplete:xe,autoFocus:ne,autoPlay:ne,blocking:xe,capture:null,charSet:null,checked:ne,cite:null,className:xe,cols:H,colSpan:null,content:null,contentEditable:Me,controls:ne,controlsList:xe,coords:H|kn,crossOrigin:null,data:null,dateTime:null,decoding:null,default:ne,defer:ne,dir:null,dirName:null,disabled:ne,download:Sa,draggable:Me,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:ne,formTarget:null,headers:xe,height:H,hidden:Sa,high:H,href:null,hrefLang:null,htmlFor:xe,httpEquiv:xe,id:null,imageSizes:null,imageSrcSet:null,inert:ne,inputMode:null,integrity:null,is:null,isMap:ne,itemId:null,itemProp:xe,itemRef:xe,itemScope:ne,itemType:xe,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:ne,low:H,manifest:null,max:null,maxLength:H,media:null,method:null,min:null,minLength:H,multiple:ne,muted:ne,name:null,nonce:null,noModule:ne,noValidate:ne,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:ne,optimum:H,pattern:null,ping:xe,placeholder:null,playsInline:ne,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:ne,referrerPolicy:null,rel:xe,required:ne,reversed:ne,rows:H,rowSpan:H,sandbox:xe,scope:null,scoped:ne,seamless:ne,selected:ne,shadowRootClonable:ne,shadowRootDelegatesFocus:ne,shadowRootMode:null,shape:null,size:H,sizes:null,slot:null,span:H,spellCheck:Me,src:null,srcDoc:null,srcLang:null,srcSet:null,start:H,step:null,style:null,tabIndex:H,target:null,title:null,translate:null,type:null,typeMustMatch:ne,useMap:null,value:Me,width:H,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:xe,axis:null,background:null,bgColor:null,border:H,borderColor:null,bottomMargin:H,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:ne,declare:ne,event:null,face:null,frame:null,frameBorder:null,hSpace:H,leftMargin:H,link:null,longDesc:null,lowSrc:null,marginHeight:H,marginWidth:H,noResize:ne,noHref:ne,noShade:ne,noWrap:ne,object:null,profile:null,prompt:null,rev:null,rightMargin:H,rules:null,scheme:null,scrolling:Me,standby:null,summary:null,text:null,topMargin:H,valueType:null,version:null,vAlign:null,vLink:null,vSpace:H,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:ne,disableRemotePlayback:ne,prefix:null,property:null,results:H,security:null,unselectable:null},space:"html",transform:Lc}),Ap=Ln({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:tt,accentHeight:H,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:H,amplitude:H,arabicForm:null,ascent:H,attributeName:null,attributeType:null,azimuth:H,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:H,by:null,calcMode:null,capHeight:H,className:xe,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:H,diffuseConstant:H,direction:null,display:null,dur:null,divisor:H,dominantBaseline:null,download:ne,dx:null,dy:null,edgeMode:null,editable:null,elevation:H,enableBackground:null,end:null,event:null,exponent:H,externalResourcesRequired:null,fill:null,fillOpacity:H,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:kn,g2:kn,glyphName:kn,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:H,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:H,horizOriginX:H,horizOriginY:H,id:null,ideographic:H,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:H,k:H,k1:H,k2:H,k3:H,k4:H,kernelMatrix:tt,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:H,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:H,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:H,overlineThickness:H,paintOrder:null,panose1:null,path:null,pathLength:H,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:xe,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:H,pointsAtY:H,pointsAtZ:H,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:tt,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:tt,rev:tt,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:tt,requiredFeatures:tt,requiredFonts:tt,requiredFormats:tt,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:H,specularExponent:H,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:H,strikethroughThickness:H,string:null,stroke:null,strokeDashArray:tt,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:H,strokeOpacity:H,strokeWidth:null,style:null,surfaceScale:H,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:tt,tabIndex:H,tableValues:null,target:null,targetX:H,targetY:H,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:tt,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:H,underlineThickness:H,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:H,values:null,vAlphabetic:H,vMathematical:H,vectorEffect:null,vHanging:H,vIdeographic:H,version:null,vertAdvY:H,vertOriginX:H,vertOriginY:H,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:H,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Nc}),Rc=Ln({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),Oc=Ln({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Lc}),Dc=Ln({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),Cp={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"},vp=/[A-Z]/g,Ro=/-[a-z]/g,Sp=/^data[-\w.:]+$/i;function Ni(e,t){const n=fr(t);let r=t,i=Je;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&Sp.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(Ro,Np);r="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!Ro.test(a)){let s=a.replace(vp,Ip);s.charAt(0)!=="-"&&(s="-"+s),t="data"+s}}i=ms}return new i(r,t)}function Ip(e){return"-"+e.toLowerCase()}function Np(e){return e.charAt(1).toUpperCase()}const Ar=Sc([Ic,wp,Rc,Oc,Dc],"html"),jt=Sc([Ic,Ap,Rc,Oc,Dc],"svg");function Oo(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 Pc(e,t){const n=t||{};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const Do=/[#.]/g;function Lp(e,t){const n=e||"",r={};let i=0,a,s;for(;i<n.length;){Do.lastIndex=i;const o=Do.exec(n),u=n.slice(i,o?o.index:n.length);u&&(a?a==="#"?r.id=u:Array.isArray(r.className)?r.className.push(u):r.className=[u]:s=u,i+=u.length),o&&(a=o[0],i++)}return{type:"element",tagName:s||t||"div",properties:r,children:[]}}function Po(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function Mc(e){return e.join(" ").trim()}function Bc(e,t,n){const r=n?Pp(n):void 0;function i(a,s,...o){let u;if(a==null){u={type:"root",children:[]};const c=s;o.unshift(c)}else{u=Lp(a,t);const c=u.tagName.toLowerCase(),h=r?r.get(c):void 0;if(u.tagName=h||c,Rp(s))o.unshift(s);else for(const[d,f]of Object.entries(s))Op(e,u.properties,d,f)}for(const c of o)Na(u.children,c);return u.type==="element"&&u.tagName==="template"&&(u.content={type:"root",children:u.children},u.children=[]),u}return i}function Rp(e){if(e===null||typeof e!="object"||Array.isArray(e))return!0;if(typeof e.type!="string")return!1;const t=e,n=Object.keys(e);for(const r of n){const i=t[r];if(i&&typeof i=="object"){if(!Array.isArray(i))return!0;const a=i;for(const s of a)if(typeof s!="number"&&typeof s!="string")return!0}}return!!("children"in e&&Array.isArray(e.children))}function Op(e,t,n,r){const i=Ni(e,n);let a;if(r!=null){if(typeof r=="number"){if(Number.isNaN(r))return;a=r}else typeof r=="boolean"?a=r:typeof r=="string"?i.spaceSeparated?a=Po(r):i.commaSeparated?a=Oo(r):i.commaOrSpaceSeparated?a=Po(Oo(r).join(" ")):a=Mo(i,i.property,r):Array.isArray(r)?a=[...r]:a=i.property==="style"?Dp(r):String(r);if(Array.isArray(a)){const s=[];for(const o of a)s.push(Mo(i,i.property,o));a=s}i.property==="className"&&Array.isArray(t.className)&&(a=t.className.concat(a)),t[i.property]=a}}function Na(e,t){if(t!=null)if(typeof t=="number"||typeof t=="string")e.push({type:"text",value:String(t)});else if(Array.isArray(t))for(const n of t)Na(e,n);else if(typeof t=="object"&&"type"in t)t.type==="root"?Na(e,t.children):e.push(t);else throw new Error("Expected node, nodes, or string, got `"+t+"`")}function Mo(e,t,n){if(typeof n=="string"){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===""||fr(n)===fr(t)))return!0}return n}function Dp(e){const t=[];for(const[n,r]of Object.entries(e))t.push([n,r].join(": "));return t.join("; ")}function Pp(e){const t=new Map;for(const n of e)t.set(n.toLowerCase(),n);return t}const Mp=["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"],Bp=Bc(Ar,"div"),Fp=Bc(jt,"g",Mp);function Hp(e){const t=String(e),n=[];return{toOffset:i,toPoint:r};function r(a){if(typeof a=="number"&&a>-1&&a<=t.length){let s=0;for(;;){let o=n[s];if(o===void 0){const u=Bo(t,n[s-1]);o=u===-1?t.length+1:u+1,n[s]=o}if(o>a)return{line:s+1,column:a-(s>0?n[s-1]:0)+1,offset:a};s++}}}function i(a){if(a&&typeof a.line=="number"&&typeof a.column=="number"&&!Number.isNaN(a.line)&&!Number.isNaN(a.column)){for(;n.length<a.line;){const o=n[n.length-1],u=Bo(t,o),c=u===-1?t.length+1:u+1;if(o===c)break;n.push(c)}const s=(a.line>1?n[a.line-2]:0)+a.column-1;if(s<n[a.line-1])return s}}}function Bo(e,t){const n=e.indexOf("\r",t),r=e.indexOf(`
|
|
2
|
+
`,t);return r===-1?n:n===-1||n+1===r?r:n<r?n:r}const en={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/"},Fc={}.hasOwnProperty,Up=Object.prototype;function zp(e,t){const n=t||{};return gs({file:n.file||void 0,location:!1,schema:n.space==="svg"?jt:Ar,verbose:n.verbose||!1},e)}function gs(e,t){let n;switch(t.nodeName){case"#comment":{const r=t;return n={type:"comment",value:r.data},Kr(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:Hc(e,t.childNodes),data:{quirksMode:i}},e.file&&e.location){const a=String(e.file),s=Hp(a),o=s.toPoint(0),u=s.toPoint(a.length);n.position={start:o,end:u}}return n}case"#documentType":{const r=t;return n={type:"doctype"},Kr(e,r,n),n}case"#text":{const r=t;return n={type:"text",value:r.value},Kr(e,r,n),n}default:return n=$p(e,t),n}}function Hc(e,t){let n=-1;const r=[];for(;++n<t.length;){const i=gs(e,t[n]);r.push(i)}return r}function $p(e,t){const n=e.schema;e.schema=t.namespaceURI===en.svg?jt:Ar;let r=-1;const i={};for(;++r<t.attrs.length;){const o=t.attrs[r],u=(o.prefix?o.prefix+":":"")+o.name;Fc.call(Up,u)||(i[u]=o.value)}const s=(e.schema.space==="svg"?Fp:Bp)(t.tagName,i,Hc(e,t.childNodes));if(Kr(e,t,s),s.tagName==="template"){const o=t,u=o.sourceCodeLocation,c=u&&u.startTag&&En(u.startTag),h=u&&u.endTag&&En(u.endTag),d=gs(e,o.content);c&&h&&e.file&&(d.position={start:c.end,end:h.start}),s.content=d}return e.schema=n,s}function Kr(e,t,n){if("sourceCodeLocation"in t&&t.sourceCodeLocation&&e.file){const r=Yp(e,n,t.sourceCodeLocation);r&&(e.location=!0,n.position=r)}}function Yp(e,t,n){const r=En(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)Fc.call(n.attrs,s)&&(a[Ni(e.schema,s).property]=En(n.attrs[s]));n.startTag;const o=En(n.startTag),u=n.endTag?En(n.endTag):void 0,c={opening:o};u&&(c.closing=u),c.properties=a,t.data={position:c}}}return r}function En(e){const t=Fo({line:e.startLine,column:e.startCol,offset:e.startOffset}),n=Fo({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||n?{start:t,end:n}:void 0}function Fo(e){return e.line&&e.column?e:void 0}const Ho={}.hasOwnProperty;function Uc(e,t){const n=t||{};function r(i,...a){let s=r.invalid;const o=r.handlers;if(i&&Ho.call(i,e)){const u=String(i[e]);s=Ho.call(o,u)?o[u]:r.unknown}if(s)return s.call(this,i,...a)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}const jp={},Vp={}.hasOwnProperty,zc=Uc("type",{handlers:{root:Wp,element:Zp,text:Qp,comment:Xp,doctype:Kp}});function qp(e,t){const r=(t||jp).space;return zc(e,r==="svg"?jt:Ar)}function Wp(e,t){const n={nodeName:"#document",mode:(e.data||{}).quirksMode?"quirks":"no-quirks",childNodes:[]};return n.childNodes=bs(e.children,n,t),Rn(e,n),n}function Gp(e,t){const n={nodeName:"#document-fragment",childNodes:[]};return n.childNodes=bs(e.children,n,t),Rn(e,n),n}function Kp(e){const t={nodeName:"#documentType",name:"html",publicId:"",systemId:"",parentNode:null};return Rn(e,t),t}function Qp(e){const t={nodeName:"#text",value:e.value,parentNode:null};return Rn(e,t),t}function Xp(e){const t={nodeName:"#comment",data:e.value,parentNode:null};return Rn(e,t),t}function Zp(e,t){const n=t;let r=n;e.type==="element"&&e.tagName.toLowerCase()==="svg"&&n.space==="html"&&(r=jt);const i=[];let a;if(e.properties){for(a in e.properties)if(a!=="children"&&Vp.call(e.properties,a)){const u=Jp(r,a,e.properties[a]);u&&i.push(u)}}const s=r.space,o={nodeName:e.tagName,tagName:e.tagName,attrs:i,namespaceURI:en[s],childNodes:[],parentNode:null};return o.childNodes=bs(e.children,o,r),Rn(e,o),e.tagName==="template"&&e.content&&(o.content=Gp(e.content,r)),o}function Jp(e,t,n){const r=Ni(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?Pc(n):Mc(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=en[r.space]}return i}function bs(e,t,n){let r=-1;const i=[];if(e)for(;++r<e.length;){const a=zc(e[r],n);a.parentNode=t,i.push(a)}return i}function Rn(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 e1=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"],t1=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 b;(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"})(b||(b={}));const Xe={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function $c(e){return e>=55296&&e<=57343}function n1(e){return e>=56320&&e<=57343}function r1(e,t){return(e-55296)*1024+9216+t}function Yc(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function jc(e){return e>=64976&&e<=65007||t1.has(e)}var N;(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"})(N||(N={}));const i1=65536;class a1{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=i1,this.isEol=!1,this.lineStartPos=0,this.droppedBufferSize=0,this.line=1,this.lastErrOffset=-1}get col(){return this.pos-this.lineStartPos+ +(this.lastGapPos!==this.pos)}get offset(){return this.droppedBufferSize+this.pos}getError(t,n){const{line:r,col:i,offset:a}=this,s=i+n,o=a+n;return{code:t,startLine:r,endLine:r,startCol:s,endCol:s,startOffset:o,endOffset:o}}_err(t){this.handler.onParseError&&this.lastErrOffset!==this.offset&&(this.lastErrOffset=this.offset,this.handler.onParseError(this.getError(t,0)))}_addGap(){this.gapStack.push(this.lastGapPos),this.lastGapPos=this.pos}_processSurrogate(t){if(this.pos!==this.html.length-1){const n=this.html.charCodeAt(this.pos+1);if(n1(n))return this.pos++,this._addGap(),r1(t,n)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,b.EOF;return this._err(N.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,b.EOF;const r=this.html.charCodeAt(n);return r===b.CARRIAGE_RETURN?b.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,b.EOF;let t=this.html.charCodeAt(this.pos);return t===b.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,b.LINE_FEED):t===b.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,$c(t)&&(t=this._processSurrogate(t)),this.handler.onParseError===null||t>31&&t<127||t===b.LINE_FEED||t===b.CARRIAGE_RETURN||t>159&&t<64976||this._checkForProblematicCharacters(t),t)}_checkForProblematicCharacters(t){Yc(t)?this._err(N.controlCharacterInInputStream):jc(t)&&this._err(N.noncharacterInInputStream)}retreat(t){for(this.pos-=t;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}}var se;(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"})(se||(se={}));function Vc(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 s1=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୕ୖ୪௫ఄ಄ದൡඅ櫬Āoungruent;扢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;怳Ādpuct;戏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ǣጓ\0y;䐎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Ā;tbrk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯᝳ;䎲;愶een;扬r;쀀𝔟gcostuvwឍឝឳេ៕៛ƀ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Ā;elƀ;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\0aĀ;t䀬;䁀ƀ;fl戁îᅠeĀmxent»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ↄⅪ←ٖ↛ǰ↉\0proø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;䅓Ācrir;榿;쀀𝔬ͯ\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\0m;櫳;櫽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))),o1=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]]);function u1(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=o1.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 l1=32;var Ut;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(Ut||(Ut={}));function La(e){return e>=He.ZERO&&e<=He.NINE}function c1(e){return e>=He.UPPER_A&&e<=He.UPPER_F||e>=He.LOWER_A&&e<=He.LOWER_F}function d1(e){return e>=He.UPPER_A&&e<=He.UPPER_Z||e>=He.LOWER_A&&e<=He.LOWER_Z||La(e)}function h1(e){return e===He.EQUALS||d1(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 It;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(It||(It={}));class f1{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=It.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)|l1)===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)+Number.parseInt(t.substr(n,a),i),this.consumed+=a}}stateNumericHex(t,n){const r=n;for(;n<t.length;){const i=t.charCodeAt(n);if(La(i)||c1(i))n+=1;else return this.addToNumericResult(t,r,n,16),this.emitNumericEntity(i,3)}return this.addToNumericResult(t,r,n,16),-1}stateNumericDecimal(t,n){const r=n;for(;n<t.length;){const i=t.charCodeAt(n);if(La(i))n+=1;else return this.addToNumericResult(t,r,n,10),this.emitNumericEntity(i,2)}return this.addToNumericResult(t,r,n,10),-1}emitNumericEntity(t,n){var r;if(this.consumed<=n)return(r=this.errors)===null||r===void 0||r.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(t===He.SEMI)this.consumed+=1;else if(this.decodeMode===It.Strict)return 0;return this.emitCodePoint(u1(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&Ut.VALUE_LENGTH)>>14;for(;n<t.length;n++,this.excess++){const s=t.charCodeAt(n);if(this.treeIndex=p1(r,i,this.treeIndex+Math.max(1,a),s),this.treeIndex<0)return this.result===0||this.decodeMode===It.Attribute&&(a===0||h1(s))?0:this.emitNotTerminatedNamedEntity();if(i=r[this.treeIndex],a=(i&Ut.VALUE_LENGTH)>>14,a!==0){if(s===He.SEMI)return this.emitNamedEntityData(this.treeIndex,a,this.consumed+this.excess);this.decodeMode!==It.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]&Ut.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]&~Ut.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!==It.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 p1(e,t,n,r){const i=(t&Ut.BRANCH_LENGTH)>>7,a=t&Ut.JUMP_TABLE;if(i===0)return a!==0&&r===a?n:-1;if(a){const u=r-a;return u<0||u>=i?-1:e[n+u]-1}let s=n,o=s+i-1;for(;s<=o;){const u=s+o>>>1,c=e[u];if(c<r)s=u+1;else if(c>r)o=u-1;else return e[u+i]}return-1}var D;(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/"})(D||(D={}));var nn;(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"})(nn||(nn={}));var at;(function(e){e.NO_QUIRKS="no-quirks",e.QUIRKS="quirks",e.LIMITED_QUIRKS="limited-quirks"})(at||(at={}));var S;(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"})(S||(S={}));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 m1=new Map([[S.A,l.A],[S.ADDRESS,l.ADDRESS],[S.ANNOTATION_XML,l.ANNOTATION_XML],[S.APPLET,l.APPLET],[S.AREA,l.AREA],[S.ARTICLE,l.ARTICLE],[S.ASIDE,l.ASIDE],[S.B,l.B],[S.BASE,l.BASE],[S.BASEFONT,l.BASEFONT],[S.BGSOUND,l.BGSOUND],[S.BIG,l.BIG],[S.BLOCKQUOTE,l.BLOCKQUOTE],[S.BODY,l.BODY],[S.BR,l.BR],[S.BUTTON,l.BUTTON],[S.CAPTION,l.CAPTION],[S.CENTER,l.CENTER],[S.CODE,l.CODE],[S.COL,l.COL],[S.COLGROUP,l.COLGROUP],[S.DD,l.DD],[S.DESC,l.DESC],[S.DETAILS,l.DETAILS],[S.DIALOG,l.DIALOG],[S.DIR,l.DIR],[S.DIV,l.DIV],[S.DL,l.DL],[S.DT,l.DT],[S.EM,l.EM],[S.EMBED,l.EMBED],[S.FIELDSET,l.FIELDSET],[S.FIGCAPTION,l.FIGCAPTION],[S.FIGURE,l.FIGURE],[S.FONT,l.FONT],[S.FOOTER,l.FOOTER],[S.FOREIGN_OBJECT,l.FOREIGN_OBJECT],[S.FORM,l.FORM],[S.FRAME,l.FRAME],[S.FRAMESET,l.FRAMESET],[S.H1,l.H1],[S.H2,l.H2],[S.H3,l.H3],[S.H4,l.H4],[S.H5,l.H5],[S.H6,l.H6],[S.HEAD,l.HEAD],[S.HEADER,l.HEADER],[S.HGROUP,l.HGROUP],[S.HR,l.HR],[S.HTML,l.HTML],[S.I,l.I],[S.IMG,l.IMG],[S.IMAGE,l.IMAGE],[S.INPUT,l.INPUT],[S.IFRAME,l.IFRAME],[S.KEYGEN,l.KEYGEN],[S.LABEL,l.LABEL],[S.LI,l.LI],[S.LINK,l.LINK],[S.LISTING,l.LISTING],[S.MAIN,l.MAIN],[S.MALIGNMARK,l.MALIGNMARK],[S.MARQUEE,l.MARQUEE],[S.MATH,l.MATH],[S.MENU,l.MENU],[S.META,l.META],[S.MGLYPH,l.MGLYPH],[S.MI,l.MI],[S.MO,l.MO],[S.MN,l.MN],[S.MS,l.MS],[S.MTEXT,l.MTEXT],[S.NAV,l.NAV],[S.NOBR,l.NOBR],[S.NOFRAMES,l.NOFRAMES],[S.NOEMBED,l.NOEMBED],[S.NOSCRIPT,l.NOSCRIPT],[S.OBJECT,l.OBJECT],[S.OL,l.OL],[S.OPTGROUP,l.OPTGROUP],[S.OPTION,l.OPTION],[S.P,l.P],[S.PARAM,l.PARAM],[S.PLAINTEXT,l.PLAINTEXT],[S.PRE,l.PRE],[S.RB,l.RB],[S.RP,l.RP],[S.RT,l.RT],[S.RTC,l.RTC],[S.RUBY,l.RUBY],[S.S,l.S],[S.SCRIPT,l.SCRIPT],[S.SEARCH,l.SEARCH],[S.SECTION,l.SECTION],[S.SELECT,l.SELECT],[S.SOURCE,l.SOURCE],[S.SMALL,l.SMALL],[S.SPAN,l.SPAN],[S.STRIKE,l.STRIKE],[S.STRONG,l.STRONG],[S.STYLE,l.STYLE],[S.SUB,l.SUB],[S.SUMMARY,l.SUMMARY],[S.SUP,l.SUP],[S.TABLE,l.TABLE],[S.TBODY,l.TBODY],[S.TEMPLATE,l.TEMPLATE],[S.TEXTAREA,l.TEXTAREA],[S.TFOOT,l.TFOOT],[S.TD,l.TD],[S.TH,l.TH],[S.THEAD,l.THEAD],[S.TITLE,l.TITLE],[S.TR,l.TR],[S.TRACK,l.TRACK],[S.TT,l.TT],[S.U,l.U],[S.UL,l.UL],[S.SVG,l.SVG],[S.VAR,l.VAR],[S.WBR,l.WBR],[S.XMP,l.XMP]]);function On(e){var t;return(t=m1.get(e))!==null&&t!==void 0?t:l.UNKNOWN}const B=l,g1={[D.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]),[D.MATHML]:new Set([B.MI,B.MO,B.MN,B.MS,B.MTEXT,B.ANNOTATION_XML]),[D.SVG]:new Set([B.TITLE,B.FOREIGN_OBJECT,B.DESC]),[D.XLINK]:new Set,[D.XML]:new Set,[D.XMLNS]:new Set},Ra=new Set([B.H1,B.H2,B.H3,B.H4,B.H5,B.H6]);S.STYLE,S.SCRIPT,S.XMP,S.IFRAME,S.NOEMBED,S.NOFRAMES,S.PLAINTEXT;var E;(function(e){e[e.DATA=0]="DATA",e[e.RCDATA=1]="RCDATA",e[e.RAWTEXT=2]="RAWTEXT",e[e.SCRIPT_DATA=3]="SCRIPT_DATA",e[e.PLAINTEXT=4]="PLAINTEXT",e[e.TAG_OPEN=5]="TAG_OPEN",e[e.END_TAG_OPEN=6]="END_TAG_OPEN",e[e.TAG_NAME=7]="TAG_NAME",e[e.RCDATA_LESS_THAN_SIGN=8]="RCDATA_LESS_THAN_SIGN",e[e.RCDATA_END_TAG_OPEN=9]="RCDATA_END_TAG_OPEN",e[e.RCDATA_END_TAG_NAME=10]="RCDATA_END_TAG_NAME",e[e.RAWTEXT_LESS_THAN_SIGN=11]="RAWTEXT_LESS_THAN_SIGN",e[e.RAWTEXT_END_TAG_OPEN=12]="RAWTEXT_END_TAG_OPEN",e[e.RAWTEXT_END_TAG_NAME=13]="RAWTEXT_END_TAG_NAME",e[e.SCRIPT_DATA_LESS_THAN_SIGN=14]="SCRIPT_DATA_LESS_THAN_SIGN",e[e.SCRIPT_DATA_END_TAG_OPEN=15]="SCRIPT_DATA_END_TAG_OPEN",e[e.SCRIPT_DATA_END_TAG_NAME=16]="SCRIPT_DATA_END_TAG_NAME",e[e.SCRIPT_DATA_ESCAPE_START=17]="SCRIPT_DATA_ESCAPE_START",e[e.SCRIPT_DATA_ESCAPE_START_DASH=18]="SCRIPT_DATA_ESCAPE_START_DASH",e[e.SCRIPT_DATA_ESCAPED=19]="SCRIPT_DATA_ESCAPED",e[e.SCRIPT_DATA_ESCAPED_DASH=20]="SCRIPT_DATA_ESCAPED_DASH",e[e.SCRIPT_DATA_ESCAPED_DASH_DASH=21]="SCRIPT_DATA_ESCAPED_DASH_DASH",e[e.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN=22]="SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN",e[e.SCRIPT_DATA_ESCAPED_END_TAG_OPEN=23]="SCRIPT_DATA_ESCAPED_END_TAG_OPEN",e[e.SCRIPT_DATA_ESCAPED_END_TAG_NAME=24]="SCRIPT_DATA_ESCAPED_END_TAG_NAME",e[e.SCRIPT_DATA_DOUBLE_ESCAPE_START=25]="SCRIPT_DATA_DOUBLE_ESCAPE_START",e[e.SCRIPT_DATA_DOUBLE_ESCAPED=26]="SCRIPT_DATA_DOUBLE_ESCAPED",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH=27]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH=28]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN=29]="SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN",e[e.SCRIPT_DATA_DOUBLE_ESCAPE_END=30]="SCRIPT_DATA_DOUBLE_ESCAPE_END",e[e.BEFORE_ATTRIBUTE_NAME=31]="BEFORE_ATTRIBUTE_NAME",e[e.ATTRIBUTE_NAME=32]="ATTRIBUTE_NAME",e[e.AFTER_ATTRIBUTE_NAME=33]="AFTER_ATTRIBUTE_NAME",e[e.BEFORE_ATTRIBUTE_VALUE=34]="BEFORE_ATTRIBUTE_VALUE",e[e.ATTRIBUTE_VALUE_DOUBLE_QUOTED=35]="ATTRIBUTE_VALUE_DOUBLE_QUOTED",e[e.ATTRIBUTE_VALUE_SINGLE_QUOTED=36]="ATTRIBUTE_VALUE_SINGLE_QUOTED",e[e.ATTRIBUTE_VALUE_UNQUOTED=37]="ATTRIBUTE_VALUE_UNQUOTED",e[e.AFTER_ATTRIBUTE_VALUE_QUOTED=38]="AFTER_ATTRIBUTE_VALUE_QUOTED",e[e.SELF_CLOSING_START_TAG=39]="SELF_CLOSING_START_TAG",e[e.BOGUS_COMMENT=40]="BOGUS_COMMENT",e[e.MARKUP_DECLARATION_OPEN=41]="MARKUP_DECLARATION_OPEN",e[e.COMMENT_START=42]="COMMENT_START",e[e.COMMENT_START_DASH=43]="COMMENT_START_DASH",e[e.COMMENT=44]="COMMENT",e[e.COMMENT_LESS_THAN_SIGN=45]="COMMENT_LESS_THAN_SIGN",e[e.COMMENT_LESS_THAN_SIGN_BANG=46]="COMMENT_LESS_THAN_SIGN_BANG",e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH=47]="COMMENT_LESS_THAN_SIGN_BANG_DASH",e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH=48]="COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH",e[e.COMMENT_END_DASH=49]="COMMENT_END_DASH",e[e.COMMENT_END=50]="COMMENT_END",e[e.COMMENT_END_BANG=51]="COMMENT_END_BANG",e[e.DOCTYPE=52]="DOCTYPE",e[e.BEFORE_DOCTYPE_NAME=53]="BEFORE_DOCTYPE_NAME",e[e.DOCTYPE_NAME=54]="DOCTYPE_NAME",e[e.AFTER_DOCTYPE_NAME=55]="AFTER_DOCTYPE_NAME",e[e.AFTER_DOCTYPE_PUBLIC_KEYWORD=56]="AFTER_DOCTYPE_PUBLIC_KEYWORD",e[e.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER=57]="BEFORE_DOCTYPE_PUBLIC_IDENTIFIER",e[e.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED=58]="DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED",e[e.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED=59]="DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED",e[e.AFTER_DOCTYPE_PUBLIC_IDENTIFIER=60]="AFTER_DOCTYPE_PUBLIC_IDENTIFIER",e[e.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS=61]="BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS",e[e.AFTER_DOCTYPE_SYSTEM_KEYWORD=62]="AFTER_DOCTYPE_SYSTEM_KEYWORD",e[e.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER=63]="BEFORE_DOCTYPE_SYSTEM_IDENTIFIER",e[e.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED=64]="DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED",e[e.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED=65]="DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED",e[e.AFTER_DOCTYPE_SYSTEM_IDENTIFIER=66]="AFTER_DOCTYPE_SYSTEM_IDENTIFIER",e[e.BOGUS_DOCTYPE=67]="BOGUS_DOCTYPE",e[e.CDATA_SECTION=68]="CDATA_SECTION",e[e.CDATA_SECTION_BRACKET=69]="CDATA_SECTION_BRACKET",e[e.CDATA_SECTION_END=70]="CDATA_SECTION_END",e[e.CHARACTER_REFERENCE=71]="CHARACTER_REFERENCE",e[e.AMBIGUOUS_AMPERSAND=72]="AMBIGUOUS_AMPERSAND"})(E||(E={}));const Oe={DATA:E.DATA,RCDATA:E.RCDATA,RAWTEXT:E.RAWTEXT,SCRIPT_DATA:E.SCRIPT_DATA,PLAINTEXT:E.PLAINTEXT,CDATA_SECTION:E.CDATA_SECTION};function b1(e){return e>=b.DIGIT_0&&e<=b.DIGIT_9}function Gn(e){return e>=b.LATIN_CAPITAL_A&&e<=b.LATIN_CAPITAL_Z}function E1(e){return e>=b.LATIN_SMALL_A&&e<=b.LATIN_SMALL_Z}function Mt(e){return E1(e)||Gn(e)}function Uo(e){return Mt(e)||b1(e)}function Pr(e){return e+32}function qc(e){return e===b.SPACE||e===b.LINE_FEED||e===b.TABULATION||e===b.FORM_FEED}function zo(e){return qc(e)||e===b.SOLIDUS||e===b.GREATER_THAN_SIGN}function _1(e){return e===b.NULL?N.nullCharacterReference:e>1114111?N.characterReferenceOutsideUnicodeRange:$c(e)?N.surrogateCharacterReference:jc(e)?N.noncharacterCharacterReference:Yc(e)||e===b.CARRIAGE_RETURN?N.controlCharacterReference:null}class T1{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 a1(n),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new f1(s1,(r,i)=>{this.preprocessor.pos=this.entityStartPos+i-1,this._flushCodePointConsumedAsCharacterReference(r)},n.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(N.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:r=>{this._err(N.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+r)},validateNumericCharacterReference:r=>{const i=_1(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:se.START_TAG,tagName:"",tagID:l.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:se.END_TAG,tagName:"",tagID:l.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(t){this.currentToken={type:se.COMMENT,data:"",location:this.getCurrentLocation(t)}}_createDoctypeToken(t){this.currentToken={type:se.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(Vc(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(N.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=On(t.tagName),t.type===se.START_TAG?(this.lastStartTagName=t.tagName,this.handler.onStartTag(t)):(t.attrs.length>0&&this._err(N.endTagWithAttributes),t.selfClosing&&this._err(N.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 se.CHARACTER:{this.handler.onCharacter(this.currentCharacterToken);break}case se.NULL_CHARACTER:{this.handler.onNullCharacter(this.currentCharacterToken);break}case se.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:se.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=qc(t)?se.WHITESPACE_CHARACTER:t===b.NULL?se.NULL_CHARACTER:se.CHARACTER;this._appendCharToCurrentCharacterToken(n,String.fromCodePoint(t))}_emitChars(t){this._appendCharToCurrentCharacterToken(se.CHARACTER,t)}_startCharacterReference(){this.returnState=this.state,this.state=E.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?It.Attribute:It.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 b.LESS_THAN_SIGN:{this.state=E.TAG_OPEN;break}case b.AMPERSAND:{this._startCharacterReference();break}case b.NULL:{this._err(N.unexpectedNullCharacter),this._emitCodePoint(t);break}case b.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRcdata(t){switch(t){case b.AMPERSAND:{this._startCharacterReference();break}case b.LESS_THAN_SIGN:{this.state=E.RCDATA_LESS_THAN_SIGN;break}case b.NULL:{this._err(N.unexpectedNullCharacter),this._emitChars(ve);break}case b.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRawtext(t){switch(t){case b.LESS_THAN_SIGN:{this.state=E.RAWTEXT_LESS_THAN_SIGN;break}case b.NULL:{this._err(N.unexpectedNullCharacter),this._emitChars(ve);break}case b.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptData(t){switch(t){case b.LESS_THAN_SIGN:{this.state=E.SCRIPT_DATA_LESS_THAN_SIGN;break}case b.NULL:{this._err(N.unexpectedNullCharacter),this._emitChars(ve);break}case b.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_statePlaintext(t){switch(t){case b.NULL:{this._err(N.unexpectedNullCharacter),this._emitChars(ve);break}case b.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateTagOpen(t){if(Mt(t))this._createStartTagToken(),this.state=E.TAG_NAME,this._stateTagName(t);else switch(t){case b.EXCLAMATION_MARK:{this.state=E.MARKUP_DECLARATION_OPEN;break}case b.SOLIDUS:{this.state=E.END_TAG_OPEN;break}case b.QUESTION_MARK:{this._err(N.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=E.BOGUS_COMMENT,this._stateBogusComment(t);break}case b.EOF:{this._err(N.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break}default:this._err(N.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=E.DATA,this._stateData(t)}}_stateEndTagOpen(t){if(Mt(t))this._createEndTagToken(),this.state=E.TAG_NAME,this._stateTagName(t);else switch(t){case b.GREATER_THAN_SIGN:{this._err(N.missingEndTagName),this.state=E.DATA;break}case b.EOF:{this._err(N.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break}default:this._err(N.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=E.BOGUS_COMMENT,this._stateBogusComment(t)}}_stateTagName(t){const n=this.currentToken;switch(t){case b.SPACE:case b.LINE_FEED:case b.TABULATION:case b.FORM_FEED:{this.state=E.BEFORE_ATTRIBUTE_NAME;break}case b.SOLIDUS:{this.state=E.SELF_CLOSING_START_TAG;break}case b.GREATER_THAN_SIGN:{this.state=E.DATA,this.emitCurrentTagToken();break}case b.NULL:{this._err(N.unexpectedNullCharacter),n.tagName+=ve;break}case b.EOF:{this._err(N.eofInTag),this._emitEOFToken();break}default:n.tagName+=String.fromCodePoint(Gn(t)?Pr(t):t)}}_stateRcdataLessThanSign(t){t===b.SOLIDUS?this.state=E.RCDATA_END_TAG_OPEN:(this._emitChars("<"),this.state=E.RCDATA,this._stateRcdata(t))}_stateRcdataEndTagOpen(t){Mt(t)?(this.state=E.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(t)):(this._emitChars("</"),this.state=E.RCDATA,this._stateRcdata(t))}handleSpecialEndTag(t){if(!this.preprocessor.startsWith(this.lastStartTagName,!1))return!this._ensureHibernation();this._createEndTagToken();const n=this.currentToken;switch(n.tagName=this.lastStartTagName,this.preprocessor.peek(this.lastStartTagName.length)){case b.SPACE:case b.LINE_FEED:case b.TABULATION:case b.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=E.BEFORE_ATTRIBUTE_NAME,!1;case b.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=E.SELF_CLOSING_START_TAG,!1;case b.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===b.SOLIDUS?this.state=E.RAWTEXT_END_TAG_OPEN:(this._emitChars("<"),this.state=E.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagOpen(t){Mt(t)?(this.state=E.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(t)):(this._emitChars("</"),this.state=E.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=E.RAWTEXT,this._stateRawtext(t))}_stateScriptDataLessThanSign(t){switch(t){case b.SOLIDUS:{this.state=E.SCRIPT_DATA_END_TAG_OPEN;break}case b.EXCLAMATION_MARK:{this.state=E.SCRIPT_DATA_ESCAPE_START,this._emitChars("<!");break}default:this._emitChars("<"),this.state=E.SCRIPT_DATA,this._stateScriptData(t)}}_stateScriptDataEndTagOpen(t){Mt(t)?(this.state=E.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(t)):(this._emitChars("</"),this.state=E.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=E.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStart(t){t===b.HYPHEN_MINUS?(this.state=E.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars("-")):(this.state=E.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStartDash(t){t===b.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 b.HYPHEN_MINUS:{this.state=E.SCRIPT_DATA_ESCAPED_DASH,this._emitChars("-");break}case b.LESS_THAN_SIGN:{this.state=E.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case b.NULL:{this._err(N.unexpectedNullCharacter),this._emitChars(ve);break}case b.EOF:{this._err(N.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataEscapedDash(t){switch(t){case b.HYPHEN_MINUS:{this.state=E.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-");break}case b.LESS_THAN_SIGN:{this.state=E.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case b.NULL:{this._err(N.unexpectedNullCharacter),this.state=E.SCRIPT_DATA_ESCAPED,this._emitChars(ve);break}case b.EOF:{this._err(N.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=E.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedDashDash(t){switch(t){case b.HYPHEN_MINUS:{this._emitChars("-");break}case b.LESS_THAN_SIGN:{this.state=E.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case b.GREATER_THAN_SIGN:{this.state=E.SCRIPT_DATA,this._emitChars(">");break}case b.NULL:{this._err(N.unexpectedNullCharacter),this.state=E.SCRIPT_DATA_ESCAPED,this._emitChars(ve);break}case b.EOF:{this._err(N.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=E.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedLessThanSign(t){t===b.SOLIDUS?this.state=E.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:Mt(t)?(this._emitChars("<"),this.state=E.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(t)):(this._emitChars("<"),this.state=E.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagOpen(t){Mt(t)?(this.state=E.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(t)):(this._emitChars("</"),this.state=E.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=E.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscapeStart(t){if(this.preprocessor.startsWith(Xe.SCRIPT,!1)&&zo(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 b.HYPHEN_MINUS:{this.state=E.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars("-");break}case b.LESS_THAN_SIGN:{this.state=E.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case b.NULL:{this._err(N.unexpectedNullCharacter),this._emitChars(ve);break}case b.EOF:{this._err(N.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDash(t){switch(t){case b.HYPHEN_MINUS:{this.state=E.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars("-");break}case b.LESS_THAN_SIGN:{this.state=E.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case b.NULL:{this._err(N.unexpectedNullCharacter),this.state=E.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(ve);break}case b.EOF:{this._err(N.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=E.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDashDash(t){switch(t){case b.HYPHEN_MINUS:{this._emitChars("-");break}case b.LESS_THAN_SIGN:{this.state=E.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case b.GREATER_THAN_SIGN:{this.state=E.SCRIPT_DATA,this._emitChars(">");break}case b.NULL:{this._err(N.unexpectedNullCharacter),this.state=E.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(ve);break}case b.EOF:{this._err(N.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=E.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedLessThanSign(t){t===b.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)&&zo(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 b.SPACE:case b.LINE_FEED:case b.TABULATION:case b.FORM_FEED:break;case b.SOLIDUS:case b.GREATER_THAN_SIGN:case b.EOF:{this.state=E.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case b.EQUALS_SIGN:{this._err(N.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 b.SPACE:case b.LINE_FEED:case b.TABULATION:case b.FORM_FEED:case b.SOLIDUS:case b.GREATER_THAN_SIGN:case b.EOF:{this._leaveAttrName(),this.state=E.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case b.EQUALS_SIGN:{this._leaveAttrName(),this.state=E.BEFORE_ATTRIBUTE_VALUE;break}case b.QUOTATION_MARK:case b.APOSTROPHE:case b.LESS_THAN_SIGN:{this._err(N.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(t);break}case b.NULL:{this._err(N.unexpectedNullCharacter),this.currentAttr.name+=ve;break}default:this.currentAttr.name+=String.fromCodePoint(Gn(t)?Pr(t):t)}}_stateAfterAttributeName(t){switch(t){case b.SPACE:case b.LINE_FEED:case b.TABULATION:case b.FORM_FEED:break;case b.SOLIDUS:{this.state=E.SELF_CLOSING_START_TAG;break}case b.EQUALS_SIGN:{this.state=E.BEFORE_ATTRIBUTE_VALUE;break}case b.GREATER_THAN_SIGN:{this.state=E.DATA,this.emitCurrentTagToken();break}case b.EOF:{this._err(N.eofInTag),this._emitEOFToken();break}default:this._createAttr(""),this.state=E.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateBeforeAttributeValue(t){switch(t){case b.SPACE:case b.LINE_FEED:case b.TABULATION:case b.FORM_FEED:break;case b.QUOTATION_MARK:{this.state=E.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break}case b.APOSTROPHE:{this.state=E.ATTRIBUTE_VALUE_SINGLE_QUOTED;break}case b.GREATER_THAN_SIGN:{this._err(N.missingAttributeValue),this.state=E.DATA,this.emitCurrentTagToken();break}default:this.state=E.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(t)}}_stateAttributeValueDoubleQuoted(t){switch(t){case b.QUOTATION_MARK:{this.state=E.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case b.AMPERSAND:{this._startCharacterReference();break}case b.NULL:{this._err(N.unexpectedNullCharacter),this.currentAttr.value+=ve;break}case b.EOF:{this._err(N.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueSingleQuoted(t){switch(t){case b.APOSTROPHE:{this.state=E.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case b.AMPERSAND:{this._startCharacterReference();break}case b.NULL:{this._err(N.unexpectedNullCharacter),this.currentAttr.value+=ve;break}case b.EOF:{this._err(N.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueUnquoted(t){switch(t){case b.SPACE:case b.LINE_FEED:case b.TABULATION:case b.FORM_FEED:{this._leaveAttrValue(),this.state=E.BEFORE_ATTRIBUTE_NAME;break}case b.AMPERSAND:{this._startCharacterReference();break}case b.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=E.DATA,this.emitCurrentTagToken();break}case b.NULL:{this._err(N.unexpectedNullCharacter),this.currentAttr.value+=ve;break}case b.QUOTATION_MARK:case b.APOSTROPHE:case b.LESS_THAN_SIGN:case b.EQUALS_SIGN:case b.GRAVE_ACCENT:{this._err(N.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(t);break}case b.EOF:{this._err(N.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAfterAttributeValueQuoted(t){switch(t){case b.SPACE:case b.LINE_FEED:case b.TABULATION:case b.FORM_FEED:{this._leaveAttrValue(),this.state=E.BEFORE_ATTRIBUTE_NAME;break}case b.SOLIDUS:{this._leaveAttrValue(),this.state=E.SELF_CLOSING_START_TAG;break}case b.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=E.DATA,this.emitCurrentTagToken();break}case b.EOF:{this._err(N.eofInTag),this._emitEOFToken();break}default:this._err(N.missingWhitespaceBetweenAttributes),this.state=E.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateSelfClosingStartTag(t){switch(t){case b.GREATER_THAN_SIGN:{const n=this.currentToken;n.selfClosing=!0,this.state=E.DATA,this.emitCurrentTagToken();break}case b.EOF:{this._err(N.eofInTag),this._emitEOFToken();break}default:this._err(N.unexpectedSolidusInTag),this.state=E.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateBogusComment(t){const n=this.currentToken;switch(t){case b.GREATER_THAN_SIGN:{this.state=E.DATA,this.emitCurrentComment(n);break}case b.EOF:{this.emitCurrentComment(n),this._emitEOFToken();break}case b.NULL:{this._err(N.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(N.cdataInHtmlContent),this._createCommentToken(Xe.CDATA_START.length+1),this.currentToken.data="[CDATA[",this.state=E.BOGUS_COMMENT):this._ensureHibernation()||(this._err(N.incorrectlyOpenedComment),this._createCommentToken(2),this.state=E.BOGUS_COMMENT,this._stateBogusComment(t))}_stateCommentStart(t){switch(t){case b.HYPHEN_MINUS:{this.state=E.COMMENT_START_DASH;break}case b.GREATER_THAN_SIGN:{this._err(N.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 b.HYPHEN_MINUS:{this.state=E.COMMENT_END;break}case b.GREATER_THAN_SIGN:{this._err(N.abruptClosingOfEmptyComment),this.state=E.DATA,this.emitCurrentComment(n);break}case b.EOF:{this._err(N.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 b.HYPHEN_MINUS:{this.state=E.COMMENT_END_DASH;break}case b.LESS_THAN_SIGN:{n.data+="<",this.state=E.COMMENT_LESS_THAN_SIGN;break}case b.NULL:{this._err(N.unexpectedNullCharacter),n.data+=ve;break}case b.EOF:{this._err(N.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+=String.fromCodePoint(t)}}_stateCommentLessThanSign(t){const n=this.currentToken;switch(t){case b.EXCLAMATION_MARK:{n.data+="!",this.state=E.COMMENT_LESS_THAN_SIGN_BANG;break}case b.LESS_THAN_SIGN:{n.data+="<";break}default:this.state=E.COMMENT,this._stateComment(t)}}_stateCommentLessThanSignBang(t){t===b.HYPHEN_MINUS?this.state=E.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=E.COMMENT,this._stateComment(t))}_stateCommentLessThanSignBangDash(t){t===b.HYPHEN_MINUS?this.state=E.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=E.COMMENT_END_DASH,this._stateCommentEndDash(t))}_stateCommentLessThanSignBangDashDash(t){t!==b.GREATER_THAN_SIGN&&t!==b.EOF&&this._err(N.nestedComment),this.state=E.COMMENT_END,this._stateCommentEnd(t)}_stateCommentEndDash(t){const n=this.currentToken;switch(t){case b.HYPHEN_MINUS:{this.state=E.COMMENT_END;break}case b.EOF:{this._err(N.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 b.GREATER_THAN_SIGN:{this.state=E.DATA,this.emitCurrentComment(n);break}case b.EXCLAMATION_MARK:{this.state=E.COMMENT_END_BANG;break}case b.HYPHEN_MINUS:{n.data+="-";break}case b.EOF:{this._err(N.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 b.HYPHEN_MINUS:{n.data+="--!",this.state=E.COMMENT_END_DASH;break}case b.GREATER_THAN_SIGN:{this._err(N.incorrectlyClosedComment),this.state=E.DATA,this.emitCurrentComment(n);break}case b.EOF:{this._err(N.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--!",this.state=E.COMMENT,this._stateComment(t)}}_stateDoctype(t){switch(t){case b.SPACE:case b.LINE_FEED:case b.TABULATION:case b.FORM_FEED:{this.state=E.BEFORE_DOCTYPE_NAME;break}case b.GREATER_THAN_SIGN:{this.state=E.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t);break}case b.EOF:{this._err(N.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(N.missingWhitespaceBeforeDoctypeName),this.state=E.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t)}}_stateBeforeDoctypeName(t){if(Gn(t))this._createDoctypeToken(String.fromCharCode(Pr(t))),this.state=E.DOCTYPE_NAME;else switch(t){case b.SPACE:case b.LINE_FEED:case b.TABULATION:case b.FORM_FEED:break;case b.NULL:{this._err(N.unexpectedNullCharacter),this._createDoctypeToken(ve),this.state=E.DOCTYPE_NAME;break}case b.GREATER_THAN_SIGN:{this._err(N.missingDoctypeName),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=E.DATA;break}case b.EOF:{this._err(N.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 b.SPACE:case b.LINE_FEED:case b.TABULATION:case b.FORM_FEED:{this.state=E.AFTER_DOCTYPE_NAME;break}case b.GREATER_THAN_SIGN:{this.state=E.DATA,this.emitCurrentDoctype(n);break}case b.NULL:{this._err(N.unexpectedNullCharacter),n.name+=ve;break}case b.EOF:{this._err(N.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.name+=String.fromCodePoint(Gn(t)?Pr(t):t)}}_stateAfterDoctypeName(t){const n=this.currentToken;switch(t){case b.SPACE:case b.LINE_FEED:case b.TABULATION:case b.FORM_FEED:break;case b.GREATER_THAN_SIGN:{this.state=E.DATA,this.emitCurrentDoctype(n);break}case b.EOF:{this._err(N.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(N.invalidCharacterSequenceAfterDoctypeName),n.forceQuirks=!0,this.state=E.BOGUS_DOCTYPE,this._stateBogusDoctype(t))}}_stateAfterDoctypePublicKeyword(t){const n=this.currentToken;switch(t){case b.SPACE:case b.LINE_FEED:case b.TABULATION:case b.FORM_FEED:{this.state=E.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break}case b.QUOTATION_MARK:{this._err(N.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=E.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case b.APOSTROPHE:{this._err(N.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=E.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case b.GREATER_THAN_SIGN:{this._err(N.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=E.DATA,this.emitCurrentDoctype(n);break}case b.EOF:{this._err(N.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(N.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=E.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case b.SPACE:case b.LINE_FEED:case b.TABULATION:case b.FORM_FEED:break;case b.QUOTATION_MARK:{n.publicId="",this.state=E.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case b.APOSTROPHE:{n.publicId="",this.state=E.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case b.GREATER_THAN_SIGN:{this._err(N.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=E.DATA,this.emitCurrentDoctype(n);break}case b.EOF:{this._err(N.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(N.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=E.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypePublicIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case b.QUOTATION_MARK:{this.state=E.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case b.NULL:{this._err(N.unexpectedNullCharacter),n.publicId+=ve;break}case b.GREATER_THAN_SIGN:{this._err(N.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=E.DATA;break}case b.EOF:{this._err(N.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 b.APOSTROPHE:{this.state=E.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case b.NULL:{this._err(N.unexpectedNullCharacter),n.publicId+=ve;break}case b.GREATER_THAN_SIGN:{this._err(N.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=E.DATA;break}case b.EOF:{this._err(N.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 b.SPACE:case b.LINE_FEED:case b.TABULATION:case b.FORM_FEED:{this.state=E.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break}case b.GREATER_THAN_SIGN:{this.state=E.DATA,this.emitCurrentDoctype(n);break}case b.QUOTATION_MARK:{this._err(N.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=E.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case b.APOSTROPHE:{this._err(N.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=E.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case b.EOF:{this._err(N.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(N.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=E.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBetweenDoctypePublicAndSystemIdentifiers(t){const n=this.currentToken;switch(t){case b.SPACE:case b.LINE_FEED:case b.TABULATION:case b.FORM_FEED:break;case b.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=E.DATA;break}case b.QUOTATION_MARK:{n.systemId="",this.state=E.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case b.APOSTROPHE:{n.systemId="",this.state=E.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case b.EOF:{this._err(N.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(N.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=E.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateAfterDoctypeSystemKeyword(t){const n=this.currentToken;switch(t){case b.SPACE:case b.LINE_FEED:case b.TABULATION:case b.FORM_FEED:{this.state=E.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break}case b.QUOTATION_MARK:{this._err(N.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=E.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case b.APOSTROPHE:{this._err(N.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=E.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case b.GREATER_THAN_SIGN:{this._err(N.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=E.DATA,this.emitCurrentDoctype(n);break}case b.EOF:{this._err(N.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(N.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=E.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case b.SPACE:case b.LINE_FEED:case b.TABULATION:case b.FORM_FEED:break;case b.QUOTATION_MARK:{n.systemId="",this.state=E.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case b.APOSTROPHE:{n.systemId="",this.state=E.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case b.GREATER_THAN_SIGN:{this._err(N.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=E.DATA,this.emitCurrentDoctype(n);break}case b.EOF:{this._err(N.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(N.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=E.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypeSystemIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case b.QUOTATION_MARK:{this.state=E.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case b.NULL:{this._err(N.unexpectedNullCharacter),n.systemId+=ve;break}case b.GREATER_THAN_SIGN:{this._err(N.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=E.DATA;break}case b.EOF:{this._err(N.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 b.APOSTROPHE:{this.state=E.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case b.NULL:{this._err(N.unexpectedNullCharacter),n.systemId+=ve;break}case b.GREATER_THAN_SIGN:{this._err(N.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=E.DATA;break}case b.EOF:{this._err(N.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 b.SPACE:case b.LINE_FEED:case b.TABULATION:case b.FORM_FEED:break;case b.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=E.DATA;break}case b.EOF:{this._err(N.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(N.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=E.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBogusDoctype(t){const n=this.currentToken;switch(t){case b.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=E.DATA;break}case b.NULL:{this._err(N.unexpectedNullCharacter);break}case b.EOF:{this.emitCurrentDoctype(n),this._emitEOFToken();break}}}_stateCdataSection(t){switch(t){case b.RIGHT_SQUARE_BRACKET:{this.state=E.CDATA_SECTION_BRACKET;break}case b.EOF:{this._err(N.eofInCdata),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateCdataSectionBracket(t){t===b.RIGHT_SQUARE_BRACKET?this.state=E.CDATA_SECTION_END:(this._emitChars("]"),this.state=E.CDATA_SECTION,this._stateCdataSection(t))}_stateCdataSectionEnd(t){switch(t){case b.GREATER_THAN_SIGN:{this.state=E.DATA;break}case b.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(b.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&Uo(this.preprocessor.peek(1))?E.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(t){Uo(t)?this._flushCodePointConsumedAsCharacterReference(t):(t===b.SEMICOLON&&this._err(N.unknownNamedCharacterReference),this.state=this.returnState,this._callState(t))}}const Wc=new Set([l.DD,l.DT,l.LI,l.OPTGROUP,l.OPTION,l.P,l.RB,l.RP,l.RT,l.RTC]),$o=new Set([...Wc,l.CAPTION,l.COLGROUP,l.TBODY,l.TD,l.TFOOT,l.TH,l.THEAD,l.TR]),ci=new Set([l.APPLET,l.CAPTION,l.HTML,l.MARQUEE,l.OBJECT,l.TABLE,l.TD,l.TEMPLATE,l.TH]),k1=new Set([...ci,l.OL,l.UL]),y1=new Set([...ci,l.BUTTON]),Yo=new Set([l.ANNOTATION_XML,l.MI,l.MN,l.MO,l.MS,l.MTEXT]),jo=new Set([l.DESC,l.FOREIGN_OBJECT,l.TITLE]),x1=new Set([l.TR,l.TEMPLATE,l.HTML]),w1=new Set([l.TBODY,l.TFOOT,l.THEAD,l.TEMPLATE,l.HTML]),A1=new Set([l.TABLE,l.TEMPLATE,l.HTML]),C1=new Set([l.TD,l.TH]);class v1{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)===D.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.current&&this.currentTagId!==void 0&&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])!==D.HTML);this.shortenToLength(Math.max(n,0))}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(Math.max(n,0))}popUntilPopped(t,n){const r=this._indexOfTagNames(t,n);this.shortenToLength(Math.max(r,0))}popUntilNumberedHeaderPopped(){this.popUntilPopped(Ra,D.HTML)}popUntilTableCellPopped(){this.popUntilPopped(C1,D.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(A1,D.HTML)}clearBackToTableBodyContext(){this.clearBackTo(w1,D.HTML)}clearBackToTableRowContext(){this.clearBackTo(x1,D.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 D.HTML:{if(i===t)return!0;if(n.has(i))return!1;break}case D.SVG:{if(jo.has(i))return!1;break}case D.MATHML:{if(Yo.has(i))return!1;break}}}return!0}hasInScope(t){return this.hasInDynamicScope(t,ci)}hasInListItemScope(t){return this.hasInDynamicScope(t,k1)}hasInButtonScope(t){return this.hasInDynamicScope(t,y1)}hasNumberedHeaderInScope(){for(let t=this.stackTop;t>=0;t--){const n=this.tagIDs[t];switch(this.treeAdapter.getNamespaceURI(this.items[t])){case D.HTML:{if(Ra.has(n))return!0;if(ci.has(n))return!1;break}case D.SVG:{if(jo.has(n))return!1;break}case D.MATHML:{if(Yo.has(n))return!1;break}}}return!0}hasInTableScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===D.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])===D.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])===D.HTML)switch(this.tagIDs[n]){case t:return!0;case l.OPTION:case l.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;this.currentTagId!==void 0&&Wc.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&$o.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(t){for(;this.currentTagId!==void 0&&this.currentTagId!==t&&$o.has(this.currentTagId);)this.pop()}}const Zi=3;var Et;(function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"})(Et||(Et={}));const Vo={type:Et.Marker};class S1{constructor(t){this.treeAdapter=t,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(t,n){const r=[],i=n.length,a=this.treeAdapter.getTagName(t),s=this.treeAdapter.getNamespaceURI(t);for(let o=0;o<this.entries.length;o++){const u=this.entries[o];if(u.type===Et.Marker)break;const{element:c}=u;if(this.treeAdapter.getTagName(c)===a&&this.treeAdapter.getNamespaceURI(c)===s){const h=this.treeAdapter.getAttrList(c);h.length===i&&r.push({idx:o,attrs:h})}}return r}_ensureNoahArkCondition(t){if(this.entries.length<Zi)return;const n=this.treeAdapter.getAttrList(t),r=this._getNoahArkConditionCandidates(t,n);if(r.length<Zi)return;const i=new Map(n.map(s=>[s.name,s.value]));let a=0;for(let s=0;s<r.length;s++){const o=r[s];o.attrs.every(u=>i.get(u.name)===u.value)&&(a+=1,a>=Zi&&this.entries.splice(o.idx,1))}}insertMarker(){this.entries.unshift(Vo)}pushElement(t,n){this._ensureNoahArkCondition(t),this.entries.unshift({type:Et.Element,element:t,token:n})}insertElementAfterBookmark(t,n){const r=this.entries.indexOf(this.bookmark);this.entries.splice(r,0,{type:Et.Element,element:t,token:n})}removeEntry(t){const n=this.entries.indexOf(t);n!==-1&&this.entries.splice(n,1)}clearToLastMarker(){const t=this.entries.indexOf(Vo);t===-1?this.entries.length=0:this.entries.splice(0,t+1)}getElementEntryInScopeWithTagName(t){const n=this.entries.find(r=>r.type===Et.Marker||this.treeAdapter.getTagName(r.element)===t);return n&&n.type===Et.Element?n:null}getElementEntry(t){return this.entries.find(n=>n.type===Et.Element&&n.element===t)}}const Bt={createDocument(){return{nodeName:"#document",mode:at.NO_QUIRKS,childNodes:[]}},createDocumentFragment(){return{nodeName:"#document-fragment",childNodes:[]}},createElement(e,t,n){return{nodeName:e,tagName:e,attrs:n,namespaceURI:t,childNodes:[],parentNode:null}},createCommentNode(e){return{nodeName:"#comment",data:e,parentNode:null}},createTextNode(e){return{nodeName:"#text",value:e,parentNode:null}},appendChild(e,t){e.childNodes.push(t),t.parentNode=e},insertBefore(e,t,n){const r=e.childNodes.indexOf(n);e.childNodes.splice(r,0,t),t.parentNode=e},setTemplateContent(e,t){e.content=t},getTemplateContent(e){return e.content},setDocumentType(e,t,n,r){const i=e.childNodes.find(a=>a.nodeName==="#documentType");if(i)i.name=t,i.publicId=n,i.systemId=r;else{const a={nodeName:"#documentType",name:t,publicId:n,systemId:r,parentNode:null};Bt.appendChild(e,a)}},setDocumentMode(e,t){e.mode=t},getDocumentMode(e){return e.mode},detachNode(e){if(e.parentNode){const t=e.parentNode.childNodes.indexOf(e);e.parentNode.childNodes.splice(t,1),e.parentNode=null}},insertText(e,t){if(e.childNodes.length>0){const n=e.childNodes[e.childNodes.length-1];if(Bt.isTextNode(n)){n.value+=t;return}}Bt.appendChild(e,Bt.createTextNode(t))},insertTextBefore(e,t,n){const r=e.childNodes[e.childNodes.indexOf(n)-1];r&&Bt.isTextNode(r)?r.value+=t:Bt.insertBefore(e,Bt.createTextNode(t),n)},adoptAttributes(e,t){const n=new Set(e.attrs.map(r=>r.name));for(let r=0;r<t.length;r++)n.has(t[r].name)||e.attrs.push(t[r])},getFirstChild(e){return e.childNodes[0]},getChildNodes(e){return e.childNodes},getParentNode(e){return e.parentNode},getAttrList(e){return e.attrs},getTagName(e){return e.tagName},getNamespaceURI(e){return e.namespaceURI},getTextNodeContent(e){return e.value},getCommentNodeContent(e){return e.data},getDocumentTypeNodeName(e){return e.name},getDocumentTypeNodePublicId(e){return e.publicId},getDocumentTypeNodeSystemId(e){return e.systemId},isTextNode(e){return e.nodeName==="#text"},isCommentNode(e){return e.nodeName==="#comment"},isDocumentTypeNode(e){return e.nodeName==="#documentType"},isElementNode(e){return Object.prototype.hasOwnProperty.call(e,"tagName")},setNodeSourceCodeLocation(e,t){e.sourceCodeLocation=t},getNodeSourceCodeLocation(e){return e.sourceCodeLocation},updateNodeSourceCodeLocation(e,t){e.sourceCodeLocation={...e.sourceCodeLocation,...t}}},Gc="html",I1="about:legacy-compat",N1="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",Kc=["+//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//"],L1=[...Kc,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],R1=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),Qc=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],O1=[...Qc,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function qo(e,t){return t.some(n=>e.startsWith(n))}function D1(e){return e.name===Gc&&e.publicId===null&&(e.systemId===null||e.systemId===I1)}function P1(e){if(e.name!==Gc)return at.QUIRKS;const{systemId:t}=e;if(t&&t.toLowerCase()===N1)return at.QUIRKS;let{publicId:n}=e;if(n!==null){if(n=n.toLowerCase(),R1.has(n))return at.QUIRKS;let r=t===null?L1:Kc;if(qo(n,r))return at.QUIRKS;if(r=t===null?Qc:O1,qo(n,r))return at.LIMITED_QUIRKS}return at.NO_QUIRKS}const Wo={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},M1="definitionurl",B1="definitionURL",F1=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])),H1=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:D.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:D.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:D.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:D.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:D.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:D.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:D.XLINK}],["xml:lang",{prefix:"xml",name:"lang",namespace:D.XML}],["xml:space",{prefix:"xml",name:"space",namespace:D.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:D.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:D.XMLNS}]]),U1=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])),z1=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 $1(e){const t=e.tagID;return t===l.FONT&&e.attrs.some(({name:r})=>r===nn.COLOR||r===nn.SIZE||r===nn.FACE)||z1.has(t)}function Xc(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===M1){e.attrs[t].name=B1;break}}function Zc(e){for(let t=0;t<e.attrs.length;t++){const n=F1.get(e.attrs[t].name);n!=null&&(e.attrs[t].name=n)}}function Es(e){for(let t=0;t<e.attrs.length;t++){const n=H1.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 Y1(e){const t=U1.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=On(e.tagName))}function j1(e,t){return t===D.MATHML&&(e===l.MI||e===l.MO||e===l.MN||e===l.MS||e===l.MTEXT)}function V1(e,t,n){if(t===D.MATHML&&e===l.ANNOTATION_XML){for(let r=0;r<n.length;r++)if(n[r].name===nn.ENCODING){const i=n[r].value.toLowerCase();return i===Wo.TEXT_HTML||i===Wo.APPLICATION_XML}}return t===D.SVG&&(e===l.FOREIGN_OBJECT||e===l.DESC||e===l.TITLE)}function q1(e,t,n,r){return(!r||r===D.HTML)&&V1(e,t,n)||(!r||r===D.MATHML)&&j1(e,t)}const W1="hidden",G1=8,K1=3;var T;(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"})(T||(T={}));const Q1={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},Jc=new Set([l.TABLE,l.TBODY,l.TFOOT,l.THEAD,l.TR]),Go={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:Bt,onParseError:null};class Ko{constructor(t,n,r=null,i=null){this.fragmentContext=r,this.scriptHandler=i,this.currentToken=null,this.stopped=!1,this.insertionMode=T.INITIAL,this.originalInsertionMode=T.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={...Go,...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 T1(this.options,this),this.activeFormattingElements=new S1(this.treeAdapter),this.fragmentContextID=r?On(this.treeAdapter.getTagName(r)):l.UNKNOWN,this._setContextModes(r??this.document,this.fragmentContextID),this.openElements=new v1(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={...Go,...n};t??(t=r.treeAdapter.createElement(S.TEMPLATE,D.HTML,[]));const i=r.treeAdapter.createElement("documentmock",D.HTML,[]),a=new this(r,i,t);return a.fragmentContextID===l.TEMPLATE&&a.tmplInsertionModeStack.unshift(T.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:Q1,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||t&&this.treeAdapter.getNamespaceURI(t)===D.HTML;this.currentNotInHTML=!r,this.tokenizer.inForeignNode=!r&&t!==void 0&&n!==void 0&&!this._isIntegrationPoint(n,t)}_switchToTextParsing(t,n){this._insertElement(t,D.HTML),this.tokenizer.state=n,this.originalInsertionMode=this.insertionMode,this.insertionMode=T.TEXT}switchToPlaintextParsing(){this.insertionMode=T.TEXT,this.originalInsertionMode=T.IN_BODY,this.tokenizer.state=Oe.PLAINTEXT}_getAdjustedCurrentElement(){return this.openElements.stackTop===0&&this.fragmentContext?this.fragmentContext:this.openElements.current}_findFormInFragmentContext(){let t=this.fragmentContext;for(;t;){if(this.treeAdapter.getTagName(t)===S.FORM){this.formElement=t;break}t=this.treeAdapter.getParentNode(t)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==D.HTML))switch(this.fragmentContextID){case l.TITLE:case l.TEXTAREA:{this.tokenizer.state=Oe.RCDATA;break}case l.STYLE:case l.XMP:case l.IFRAME:case l.NOEMBED:case l.NOFRAMES:case l.NOSCRIPT:{this.tokenizer.state=Oe.RAWTEXT;break}case l.SCRIPT:{this.tokenizer.state=Oe.SCRIPT_DATA;break}case l.PLAINTEXT:{this.tokenizer.state=Oe.PLAINTEXT;break}}}_setDocumentType(t){const n=t.name||"",r=t.publicId||"",i=t.systemId||"";if(this.treeAdapter.setDocumentType(this.document,n,r,i),t.location){const s=this.treeAdapter.getChildNodes(this.document).find(o=>this.treeAdapter.isDocumentTypeNode(o));s&&this.treeAdapter.setNodeSourceCodeLocation(s,t.location)}}_attachElementToTree(t,n){if(this.options.sourceCodeLocationInfo){const r=n&&{...n,startTag:n};this.treeAdapter.setNodeSourceCodeLocation(t,r)}if(this._shouldFosterParentOnInsertion())this._fosterParentElement(t);else{const r=this.openElements.currentTmplContentOrNode;this.treeAdapter.appendChild(r??this.document,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,D.HTML,[]);this._attachElementToTree(r,null),this.openElements.push(r,n)}_insertTemplate(t){const n=this.treeAdapter.createElement(t.tagName,D.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(S.HTML,D.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(t,null),this.treeAdapter.appendChild(this.openElements.current,t),this.openElements.push(t,l.HTML)}_appendCommentNode(t,n){const r=this.treeAdapter.createCommentNode(t.data);this.treeAdapter.appendChild(n,r),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(r,t.location)}_insertCharacters(t){let n,r;if(this._shouldFosterParentOnInsertion()?({parent:n,beforeElement:r}=this._findFosterParentingLocation(),r?this.treeAdapter.insertTextBefore(n,t.chars,r):this.treeAdapter.insertText(n,t.chars)):(n=this.openElements.currentTmplContentOrNode,this.treeAdapter.insertText(n,t.chars)),!t.location)return;const i=this.treeAdapter.getChildNodes(n),a=r?i.lastIndexOf(r):i.length,s=i[a-1];if(this.treeAdapter.getNodeSourceCodeLocation(s)){const{endLine:u,endCol:c,endOffset:h}=t.location;this.treeAdapter.updateNodeSourceCodeLocation(s,{endLine:u,endCol:c,endOffset:h})}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===se.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)===S.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(n)===D.MATHML?!1:this.tokenizer.inForeignNode||(t.tagID===l.MGLYPH||t.tagID===l.MALIGNMARK)&&r!==void 0&&!this._isIntegrationPoint(r,n,D.HTML)}_processToken(t){switch(t.type){case se.CHARACTER:{this.onCharacter(t);break}case se.NULL_CHARACTER:{this.onNullCharacter(t);break}case se.COMMENT:{this.onComment(t);break}case se.DOCTYPE:{this.onDoctype(t);break}case se.START_TAG:{this._processStartTag(t);break}case se.END_TAG:{this.onEndTag(t);break}case se.EOF:{this.onEof(t);break}case se.WHITESPACE_CHARACTER:{this.onWhitespaceCharacter(t);break}}}_isIntegrationPoint(t,n,r){const i=this.treeAdapter.getNamespaceURI(n),a=this.treeAdapter.getAttrList(n);return q1(t,i,a,r)}_reconstructActiveFormattingElements(){const t=this.activeFormattingElements.entries.length;if(t){const n=this.activeFormattingElements.entries.findIndex(i=>i.type===Et.Marker||this.openElements.contains(i.element)),r=n===-1?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=T.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=T.IN_ROW;return}case l.TBODY:case l.THEAD:case l.TFOOT:{this.insertionMode=T.IN_TABLE_BODY;return}case l.CAPTION:{this.insertionMode=T.IN_CAPTION;return}case l.COLGROUP:{this.insertionMode=T.IN_COLUMN_GROUP;return}case l.TABLE:{this.insertionMode=T.IN_TABLE;return}case l.BODY:{this.insertionMode=T.IN_BODY;return}case l.FRAMESET:{this.insertionMode=T.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?T.AFTER_HEAD:T.BEFORE_HEAD;return}case l.TD:case l.TH:{if(t>0){this.insertionMode=T.IN_CELL;return}break}case l.HEAD:{if(t>0){this.insertionMode=T.IN_HEAD;return}break}}this.insertionMode=T.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=T.IN_SELECT_IN_TABLE;return}}this.insertionMode=T.IN_SELECT}_isElementCausesFosterParenting(t){return Jc.has(t)}_shouldFosterParentOnInsertion(){return this.fosterParentingEnabled&&this.openElements.currentTagId!==void 0&&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)===D.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 g1[r].has(n)}onCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){Cg(this,t);return}switch(this.insertionMode){case T.INITIAL:{zn(this,t);break}case T.BEFORE_HTML:{tr(this,t);break}case T.BEFORE_HEAD:{nr(this,t);break}case T.IN_HEAD:{rr(this,t);break}case T.IN_HEAD_NO_SCRIPT:{ir(this,t);break}case T.AFTER_HEAD:{ar(this,t);break}case T.IN_BODY:case T.IN_CAPTION:case T.IN_CELL:case T.IN_TEMPLATE:{td(this,t);break}case T.TEXT:case T.IN_SELECT:case T.IN_SELECT_IN_TABLE:{this._insertCharacters(t);break}case T.IN_TABLE:case T.IN_TABLE_BODY:case T.IN_ROW:{Ji(this,t);break}case T.IN_TABLE_TEXT:{od(this,t);break}case T.IN_COLUMN_GROUP:{di(this,t);break}case T.AFTER_BODY:{hi(this,t);break}case T.AFTER_AFTER_BODY:{Qr(this,t);break}}}onNullCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){Ag(this,t);return}switch(this.insertionMode){case T.INITIAL:{zn(this,t);break}case T.BEFORE_HTML:{tr(this,t);break}case T.BEFORE_HEAD:{nr(this,t);break}case T.IN_HEAD:{rr(this,t);break}case T.IN_HEAD_NO_SCRIPT:{ir(this,t);break}case T.AFTER_HEAD:{ar(this,t);break}case T.TEXT:{this._insertCharacters(t);break}case T.IN_TABLE:case T.IN_TABLE_BODY:case T.IN_ROW:{Ji(this,t);break}case T.IN_COLUMN_GROUP:{di(this,t);break}case T.AFTER_BODY:{hi(this,t);break}case T.AFTER_AFTER_BODY:{Qr(this,t);break}}}onComment(t){if(this.skipNextNewLine=!1,this.currentNotInHTML){Oa(this,t);return}switch(this.insertionMode){case T.INITIAL:case T.BEFORE_HTML:case T.BEFORE_HEAD:case T.IN_HEAD:case T.IN_HEAD_NO_SCRIPT:case T.AFTER_HEAD:case T.IN_BODY:case T.IN_TABLE:case T.IN_CAPTION:case T.IN_COLUMN_GROUP:case T.IN_TABLE_BODY:case T.IN_ROW:case T.IN_CELL:case T.IN_SELECT:case T.IN_SELECT_IN_TABLE:case T.IN_TEMPLATE:case T.IN_FRAMESET:case T.AFTER_FRAMESET:{Oa(this,t);break}case T.IN_TABLE_TEXT:{$n(this,t);break}case T.AFTER_BODY:{rm(this,t);break}case T.AFTER_AFTER_BODY:case T.AFTER_AFTER_FRAMESET:{im(this,t);break}}}onDoctype(t){switch(this.skipNextNewLine=!1,this.insertionMode){case T.INITIAL:{am(this,t);break}case T.BEFORE_HEAD:case T.IN_HEAD:case T.IN_HEAD_NO_SCRIPT:case T.AFTER_HEAD:{this._err(t,N.misplacedDoctype);break}case T.IN_TABLE_TEXT:{$n(this,t);break}}}onStartTag(t){this.skipNextNewLine=!1,this.currentToken=t,this._processStartTag(t),t.selfClosing&&!t.ackSelfClosing&&this._err(t,N.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(t){this.shouldProcessStartTagTokenInForeignContent(t)?vg(this,t):this._startTagOutsideForeignContent(t)}_startTagOutsideForeignContent(t){switch(this.insertionMode){case T.INITIAL:{zn(this,t);break}case T.BEFORE_HTML:{sm(this,t);break}case T.BEFORE_HEAD:{um(this,t);break}case T.IN_HEAD:{pt(this,t);break}case T.IN_HEAD_NO_SCRIPT:{dm(this,t);break}case T.AFTER_HEAD:{fm(this,t);break}case T.IN_BODY:{Ve(this,t);break}case T.IN_TABLE:{An(this,t);break}case T.IN_TABLE_TEXT:{$n(this,t);break}case T.IN_CAPTION:{lg(this,t);break}case T.IN_COLUMN_GROUP:{ks(this,t);break}case T.IN_TABLE_BODY:{Oi(this,t);break}case T.IN_ROW:{Di(this,t);break}case T.IN_CELL:{hg(this,t);break}case T.IN_SELECT:{cd(this,t);break}case T.IN_SELECT_IN_TABLE:{pg(this,t);break}case T.IN_TEMPLATE:{gg(this,t);break}case T.AFTER_BODY:{Eg(this,t);break}case T.IN_FRAMESET:{_g(this,t);break}case T.AFTER_FRAMESET:{kg(this,t);break}case T.AFTER_AFTER_BODY:{xg(this,t);break}case T.AFTER_AFTER_FRAMESET:{wg(this,t);break}}}onEndTag(t){this.skipNextNewLine=!1,this.currentToken=t,this.currentNotInHTML?Sg(this,t):this._endTagOutsideForeignContent(t)}_endTagOutsideForeignContent(t){switch(this.insertionMode){case T.INITIAL:{zn(this,t);break}case T.BEFORE_HTML:{om(this,t);break}case T.BEFORE_HEAD:{lm(this,t);break}case T.IN_HEAD:{cm(this,t);break}case T.IN_HEAD_NO_SCRIPT:{hm(this,t);break}case T.AFTER_HEAD:{pm(this,t);break}case T.IN_BODY:{Ri(this,t);break}case T.TEXT:{Jm(this,t);break}case T.IN_TABLE:{pr(this,t);break}case T.IN_TABLE_TEXT:{$n(this,t);break}case T.IN_CAPTION:{cg(this,t);break}case T.IN_COLUMN_GROUP:{dg(this,t);break}case T.IN_TABLE_BODY:{Da(this,t);break}case T.IN_ROW:{ld(this,t);break}case T.IN_CELL:{fg(this,t);break}case T.IN_SELECT:{dd(this,t);break}case T.IN_SELECT_IN_TABLE:{mg(this,t);break}case T.IN_TEMPLATE:{bg(this,t);break}case T.AFTER_BODY:{fd(this,t);break}case T.IN_FRAMESET:{Tg(this,t);break}case T.AFTER_FRAMESET:{yg(this,t);break}case T.AFTER_AFTER_BODY:{Qr(this,t);break}}}onEof(t){switch(this.insertionMode){case T.INITIAL:{zn(this,t);break}case T.BEFORE_HTML:{tr(this,t);break}case T.BEFORE_HEAD:{nr(this,t);break}case T.IN_HEAD:{rr(this,t);break}case T.IN_HEAD_NO_SCRIPT:{ir(this,t);break}case T.AFTER_HEAD:{ar(this,t);break}case T.IN_BODY:case T.IN_TABLE:case T.IN_CAPTION:case T.IN_COLUMN_GROUP:case T.IN_TABLE_BODY:case T.IN_ROW:case T.IN_CELL:case T.IN_SELECT:case T.IN_SELECT_IN_TABLE:{ad(this,t);break}case T.TEXT:{eg(this,t);break}case T.IN_TABLE_TEXT:{$n(this,t);break}case T.IN_TEMPLATE:{hd(this,t);break}case T.AFTER_BODY:case T.IN_FRAMESET:case T.AFTER_FRAMESET:case T.AFTER_AFTER_BODY:case T.AFTER_AFTER_FRAMESET:{Ts(this,t);break}}}onWhitespaceCharacter(t){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,t.chars.charCodeAt(0)===b.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 T.IN_HEAD:case T.IN_HEAD_NO_SCRIPT:case T.AFTER_HEAD:case T.TEXT:case T.IN_COLUMN_GROUP:case T.IN_SELECT:case T.IN_SELECT_IN_TABLE:case T.IN_FRAMESET:case T.AFTER_FRAMESET:{this._insertCharacters(t);break}case T.IN_BODY:case T.IN_CAPTION:case T.IN_CELL:case T.IN_TEMPLATE:case T.AFTER_BODY:case T.AFTER_AFTER_BODY:case T.AFTER_AFTER_FRAMESET:{ed(this,t);break}case T.IN_TABLE:case T.IN_TABLE_BODY:case T.IN_ROW:{Ji(this,t);break}case T.IN_TABLE_TEXT:{sd(this,t);break}}}}function X1(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):id(e,t),n}function Z1(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(Math.max(r,0)),e.activeFormattingElements.removeEntry(t)),n}function J1(e,t,n){let r=t,i=e.openElements.getCommonAncestor(t);for(let a=0,s=i;s!==n;a++,s=i){i=e.openElements.getCommonAncestor(s);const o=e.activeFormattingElements.getElementEntry(s),u=o&&a>=K1;!o||u?(u&&e.activeFormattingElements.removeEntry(o),e.openElements.remove(s)):(s=em(e,o),r===t&&(e.activeFormattingElements.bookmark=o),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(s,r),r=s)}return r}function em(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 tm(e,t,n){const r=e.treeAdapter.getTagName(t),i=On(r);if(e._isElementCausesFosterParenting(i))e._fosterParentElement(n);else{const a=e.treeAdapter.getNamespaceURI(t);i===l.TEMPLATE&&a===D.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function nm(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 _s(e,t){for(let n=0;n<G1;n++){const r=X1(e,t);if(!r)break;const i=Z1(e,r);if(!i)break;e.activeFormattingElements.bookmark=r;const a=J1(e,i,r.element),s=e.openElements.getCommonAncestor(r.element);e.treeAdapter.detachNode(a),s&&tm(e,s,a),nm(e,i,r)}}function Oa(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function rm(e,t){e._appendCommentNode(t,e.openElements.items[0])}function im(e,t){e._appendCommentNode(t,e.document)}function Ts(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 am(e,t){e._setDocumentType(t);const n=t.forceQuirks?at.QUIRKS:P1(t);D1(t)||e._err(t,N.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=T.BEFORE_HTML}function zn(e,t){e._err(t,N.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,at.QUIRKS),e.insertionMode=T.BEFORE_HTML,e._processToken(t)}function sm(e,t){t.tagID===l.HTML?(e._insertElement(t,D.HTML),e.insertionMode=T.BEFORE_HEAD):tr(e,t)}function om(e,t){const n=t.tagID;(n===l.HTML||n===l.HEAD||n===l.BODY||n===l.BR)&&tr(e,t)}function tr(e,t){e._insertFakeRootElement(),e.insertionMode=T.BEFORE_HEAD,e._processToken(t)}function um(e,t){switch(t.tagID){case l.HTML:{Ve(e,t);break}case l.HEAD:{e._insertElement(t,D.HTML),e.headElement=e.openElements.current,e.insertionMode=T.IN_HEAD;break}default:nr(e,t)}}function lm(e,t){const n=t.tagID;n===l.HEAD||n===l.BODY||n===l.HTML||n===l.BR?nr(e,t):e._err(t,N.endTagWithoutMatchingOpenElement)}function nr(e,t){e._insertFakeElement(S.HEAD,l.HEAD),e.headElement=e.openElements.current,e.insertionMode=T.IN_HEAD,e._processToken(t)}function pt(e,t){switch(t.tagID){case l.HTML:{Ve(e,t);break}case l.BASE:case l.BASEFONT:case l.BGSOUND:case l.LINK:case l.META:{e._appendElement(t,D.HTML),t.ackSelfClosing=!0;break}case l.TITLE:{e._switchToTextParsing(t,Oe.RCDATA);break}case l.NOSCRIPT:{e.options.scriptingEnabled?e._switchToTextParsing(t,Oe.RAWTEXT):(e._insertElement(t,D.HTML),e.insertionMode=T.IN_HEAD_NO_SCRIPT);break}case l.NOFRAMES:case l.STYLE:{e._switchToTextParsing(t,Oe.RAWTEXT);break}case l.SCRIPT:{e._switchToTextParsing(t,Oe.SCRIPT_DATA);break}case l.TEMPLATE:{e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=T.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(T.IN_TEMPLATE);break}case l.HEAD:{e._err(t,N.misplacedStartTagForHeadElement);break}default:rr(e,t)}}function cm(e,t){switch(t.tagID){case l.HEAD:{e.openElements.pop(),e.insertionMode=T.AFTER_HEAD;break}case l.BODY:case l.BR:case l.HTML:{rr(e,t);break}case l.TEMPLATE:{ln(e,t);break}default:e._err(t,N.endTagWithoutMatchingOpenElement)}}function ln(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==l.TEMPLATE&&e._err(t,N.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(l.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,N.endTagWithoutMatchingOpenElement)}function rr(e,t){e.openElements.pop(),e.insertionMode=T.AFTER_HEAD,e._processToken(t)}function dm(e,t){switch(t.tagID){case l.HTML:{Ve(e,t);break}case l.BASEFONT:case l.BGSOUND:case l.HEAD:case l.LINK:case l.META:case l.NOFRAMES:case l.STYLE:{pt(e,t);break}case l.NOSCRIPT:{e._err(t,N.nestedNoscriptInHead);break}default:ir(e,t)}}function hm(e,t){switch(t.tagID){case l.NOSCRIPT:{e.openElements.pop(),e.insertionMode=T.IN_HEAD;break}case l.BR:{ir(e,t);break}default:e._err(t,N.endTagWithoutMatchingOpenElement)}}function ir(e,t){const n=t.type===se.EOF?N.openElementsLeftAfterEof:N.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=T.IN_HEAD,e._processToken(t)}function fm(e,t){switch(t.tagID){case l.HTML:{Ve(e,t);break}case l.BODY:{e._insertElement(t,D.HTML),e.framesetOk=!1,e.insertionMode=T.IN_BODY;break}case l.FRAMESET:{e._insertElement(t,D.HTML),e.insertionMode=T.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,N.abandonedHeadElementChild),e.openElements.push(e.headElement,l.HEAD),pt(e,t),e.openElements.remove(e.headElement);break}case l.HEAD:{e._err(t,N.misplacedStartTagForHeadElement);break}default:ar(e,t)}}function pm(e,t){switch(t.tagID){case l.BODY:case l.HTML:case l.BR:{ar(e,t);break}case l.TEMPLATE:{ln(e,t);break}default:e._err(t,N.endTagWithoutMatchingOpenElement)}}function ar(e,t){e._insertFakeElement(S.BODY,l.BODY),e.insertionMode=T.IN_BODY,Li(e,t)}function Li(e,t){switch(t.type){case se.CHARACTER:{td(e,t);break}case se.WHITESPACE_CHARACTER:{ed(e,t);break}case se.COMMENT:{Oa(e,t);break}case se.START_TAG:{Ve(e,t);break}case se.END_TAG:{Ri(e,t);break}case se.EOF:{ad(e,t);break}}}function ed(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function td(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function mm(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function gm(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}function bm(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,D.HTML),e.insertionMode=T.IN_FRAMESET)}function Em(e,t){e.openElements.hasInButtonScope(l.P)&&e._closePElement(),e._insertElement(t,D.HTML)}function _m(e,t){e.openElements.hasInButtonScope(l.P)&&e._closePElement(),e.openElements.currentTagId!==void 0&&Ra.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,D.HTML)}function Tm(e,t){e.openElements.hasInButtonScope(l.P)&&e._closePElement(),e._insertElement(t,D.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function km(e,t){const n=e.openElements.tmplCount>0;(!e.formElement||n)&&(e.openElements.hasInButtonScope(l.P)&&e._closePElement(),e._insertElement(t,D.HTML),n||(e.formElement=e.openElements.current))}function ym(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,D.HTML)}function xm(e,t){e.openElements.hasInButtonScope(l.P)&&e._closePElement(),e._insertElement(t,D.HTML),e.tokenizer.state=Oe.PLAINTEXT}function wm(e,t){e.openElements.hasInScope(l.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(l.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,D.HTML),e.framesetOk=!1}function Am(e,t){const n=e.activeFormattingElements.getElementEntryInScopeWithTagName(S.A);n&&(_s(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,D.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function Cm(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,D.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function vm(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(l.NOBR)&&(_s(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,D.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function Sm(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,D.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function Im(e,t){e.treeAdapter.getDocumentMode(e.document)!==at.QUIRKS&&e.openElements.hasInButtonScope(l.P)&&e._closePElement(),e._insertElement(t,D.HTML),e.framesetOk=!1,e.insertionMode=T.IN_TABLE}function nd(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,D.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function rd(e){const t=Vc(e,nn.TYPE);return t!=null&&t.toLowerCase()===W1}function Nm(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,D.HTML),rd(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function Lm(e,t){e._appendElement(t,D.HTML),t.ackSelfClosing=!0}function Rm(e,t){e.openElements.hasInButtonScope(l.P)&&e._closePElement(),e._appendElement(t,D.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function Om(e,t){t.tagName=S.IMG,t.tagID=l.IMG,nd(e,t)}function Dm(e,t){e._insertElement(t,D.HTML),e.skipNextNewLine=!0,e.tokenizer.state=Oe.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=T.TEXT}function Pm(e,t){e.openElements.hasInButtonScope(l.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,Oe.RAWTEXT)}function Mm(e,t){e.framesetOk=!1,e._switchToTextParsing(t,Oe.RAWTEXT)}function Qo(e,t){e._switchToTextParsing(t,Oe.RAWTEXT)}function Bm(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,D.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===T.IN_TABLE||e.insertionMode===T.IN_CAPTION||e.insertionMode===T.IN_TABLE_BODY||e.insertionMode===T.IN_ROW||e.insertionMode===T.IN_CELL?T.IN_SELECT_IN_TABLE:T.IN_SELECT}function Fm(e,t){e.openElements.currentTagId===l.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,D.HTML)}function Hm(e,t){e.openElements.hasInScope(l.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,D.HTML)}function Um(e,t){e.openElements.hasInScope(l.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(l.RTC),e._insertElement(t,D.HTML)}function zm(e,t){e._reconstructActiveFormattingElements(),Xc(t),Es(t),t.selfClosing?e._appendElement(t,D.MATHML):e._insertElement(t,D.MATHML),t.ackSelfClosing=!0}function $m(e,t){e._reconstructActiveFormattingElements(),Zc(t),Es(t),t.selfClosing?e._appendElement(t,D.SVG):e._insertElement(t,D.SVG),t.ackSelfClosing=!0}function Xo(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,D.HTML)}function Ve(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:{Cm(e,t);break}case l.A:{Am(e,t);break}case l.H1:case l.H2:case l.H3:case l.H4:case l.H5:case l.H6:{_m(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:{Em(e,t);break}case l.LI:case l.DD:case l.DT:{ym(e,t);break}case l.BR:case l.IMG:case l.WBR:case l.AREA:case l.EMBED:case l.KEYGEN:{nd(e,t);break}case l.HR:{Rm(e,t);break}case l.RB:case l.RTC:{Hm(e,t);break}case l.RT:case l.RP:{Um(e,t);break}case l.PRE:case l.LISTING:{Tm(e,t);break}case l.XMP:{Pm(e,t);break}case l.SVG:{$m(e,t);break}case l.HTML:{mm(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:{pt(e,t);break}case l.BODY:{gm(e,t);break}case l.FORM:{km(e,t);break}case l.NOBR:{vm(e,t);break}case l.MATH:{zm(e,t);break}case l.TABLE:{Im(e,t);break}case l.INPUT:{Nm(e,t);break}case l.PARAM:case l.TRACK:case l.SOURCE:{Lm(e,t);break}case l.IMAGE:{Om(e,t);break}case l.BUTTON:{wm(e,t);break}case l.APPLET:case l.OBJECT:case l.MARQUEE:{Sm(e,t);break}case l.IFRAME:{Mm(e,t);break}case l.SELECT:{Bm(e,t);break}case l.OPTION:case l.OPTGROUP:{Fm(e,t);break}case l.NOEMBED:case l.NOFRAMES:{Qo(e,t);break}case l.FRAMESET:{bm(e,t);break}case l.TEXTAREA:{Dm(e,t);break}case l.NOSCRIPT:{e.options.scriptingEnabled?Qo(e,t):Xo(e,t);break}case l.PLAINTEXT:{xm(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:Xo(e,t)}}function Ym(e,t){if(e.openElements.hasInScope(l.BODY)&&(e.insertionMode=T.AFTER_BODY,e.options.sourceCodeLocationInfo)){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e._setEndLocation(n,t)}}function jm(e,t){e.openElements.hasInScope(l.BODY)&&(e.insertionMode=T.AFTER_BODY,fd(e,t))}function Vm(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function qm(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 Wm(e){e.openElements.hasInButtonScope(l.P)||e._insertFakeElement(S.P,l.P),e._closePElement()}function Gm(e){e.openElements.hasInListItemScope(l.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(l.LI),e.openElements.popUntilTagNamePopped(l.LI))}function Km(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}function Qm(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function Xm(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function Zm(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(S.BR,l.BR),e.openElements.pop(),e.framesetOk=!1}function id(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 Ri(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:{_s(e,t);break}case l.P:{Wm(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:{Vm(e,t);break}case l.LI:{Gm(e);break}case l.DD:case l.DT:{Km(e,t);break}case l.H1:case l.H2:case l.H3:case l.H4:case l.H5:case l.H6:{Qm(e);break}case l.BR:{Zm(e);break}case l.BODY:{Ym(e,t);break}case l.HTML:{jm(e,t);break}case l.FORM:{qm(e);break}case l.APPLET:case l.OBJECT:case l.MARQUEE:{Xm(e,t);break}case l.TEMPLATE:{ln(e,t);break}default:id(e,t)}}function ad(e,t){e.tmplInsertionModeStack.length>0?hd(e,t):Ts(e,t)}function Jm(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 eg(e,t){e._err(t,N.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function Ji(e,t){if(e.openElements.currentTagId!==void 0&&Jc.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=T.IN_TABLE_TEXT,t.type){case se.CHARACTER:{od(e,t);break}case se.WHITESPACE_CHARACTER:{sd(e,t);break}}else Cr(e,t)}function tg(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,D.HTML),e.insertionMode=T.IN_CAPTION}function ng(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,D.HTML),e.insertionMode=T.IN_COLUMN_GROUP}function rg(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(S.COLGROUP,l.COLGROUP),e.insertionMode=T.IN_COLUMN_GROUP,ks(e,t)}function ig(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,D.HTML),e.insertionMode=T.IN_TABLE_BODY}function ag(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(S.TBODY,l.TBODY),e.insertionMode=T.IN_TABLE_BODY,Oi(e,t)}function sg(e,t){e.openElements.hasInTableScope(l.TABLE)&&(e.openElements.popUntilTagNamePopped(l.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function og(e,t){rd(t)?e._appendElement(t,D.HTML):Cr(e,t),t.ackSelfClosing=!0}function ug(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,D.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function An(e,t){switch(t.tagID){case l.TD:case l.TH:case l.TR:{ag(e,t);break}case l.STYLE:case l.SCRIPT:case l.TEMPLATE:{pt(e,t);break}case l.COL:{rg(e,t);break}case l.FORM:{ug(e,t);break}case l.TABLE:{sg(e,t);break}case l.TBODY:case l.TFOOT:case l.THEAD:{ig(e,t);break}case l.INPUT:{og(e,t);break}case l.CAPTION:{tg(e,t);break}case l.COLGROUP:{ng(e,t);break}default:Cr(e,t)}}function pr(e,t){switch(t.tagID){case l.TABLE:{e.openElements.hasInTableScope(l.TABLE)&&(e.openElements.popUntilTagNamePopped(l.TABLE),e._resetInsertionMode());break}case l.TEMPLATE:{ln(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:Cr(e,t)}}function Cr(e,t){const n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,Li(e,t),e.fosterParentingEnabled=n}function sd(e,t){e.pendingCharacterTokens.push(t)}function od(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function $n(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)Cr(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}const ud=new Set([l.CAPTION,l.COL,l.COLGROUP,l.TBODY,l.TD,l.TFOOT,l.TH,l.THEAD,l.TR]);function lg(e,t){const n=t.tagID;ud.has(n)?e.openElements.hasInTableScope(l.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(l.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=T.IN_TABLE,An(e,t)):Ve(e,t)}function cg(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=T.IN_TABLE,n===l.TABLE&&pr(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:Ri(e,t)}}function ks(e,t){switch(t.tagID){case l.HTML:{Ve(e,t);break}case l.COL:{e._appendElement(t,D.HTML),t.ackSelfClosing=!0;break}case l.TEMPLATE:{pt(e,t);break}default:di(e,t)}}function dg(e,t){switch(t.tagID){case l.COLGROUP:{e.openElements.currentTagId===l.COLGROUP&&(e.openElements.pop(),e.insertionMode=T.IN_TABLE);break}case l.TEMPLATE:{ln(e,t);break}case l.COL:break;default:di(e,t)}}function di(e,t){e.openElements.currentTagId===l.COLGROUP&&(e.openElements.pop(),e.insertionMode=T.IN_TABLE,e._processToken(t))}function Oi(e,t){switch(t.tagID){case l.TR:{e.openElements.clearBackToTableBodyContext(),e._insertElement(t,D.HTML),e.insertionMode=T.IN_ROW;break}case l.TH:case l.TD:{e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(S.TR,l.TR),e.insertionMode=T.IN_ROW,Di(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=T.IN_TABLE,An(e,t));break}default:An(e,t)}}function Da(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=T.IN_TABLE);break}case l.TABLE:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=T.IN_TABLE,pr(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:pr(e,t)}}function Di(e,t){switch(t.tagID){case l.TH:case l.TD:{e.openElements.clearBackToTableRowContext(),e._insertElement(t,D.HTML),e.insertionMode=T.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=T.IN_TABLE_BODY,Oi(e,t));break}default:An(e,t)}}function ld(e,t){switch(t.tagID){case l.TR:{e.openElements.hasInTableScope(l.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=T.IN_TABLE_BODY);break}case l.TABLE:{e.openElements.hasInTableScope(l.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=T.IN_TABLE_BODY,Da(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=T.IN_TABLE_BODY,Da(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:pr(e,t)}}function hg(e,t){const n=t.tagID;ud.has(n)?(e.openElements.hasInTableScope(l.TD)||e.openElements.hasInTableScope(l.TH))&&(e._closeTableCell(),Di(e,t)):Ve(e,t)}function fg(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=T.IN_ROW);break}case l.TABLE:case l.TBODY:case l.TFOOT:case l.THEAD:case l.TR:{e.openElements.hasInTableScope(n)&&(e._closeTableCell(),ld(e,t));break}case l.BODY:case l.CAPTION:case l.COL:case l.COLGROUP:case l.HTML:break;default:Ri(e,t)}}function cd(e,t){switch(t.tagID){case l.HTML:{Ve(e,t);break}case l.OPTION:{e.openElements.currentTagId===l.OPTION&&e.openElements.pop(),e._insertElement(t,D.HTML);break}case l.OPTGROUP:{e.openElements.currentTagId===l.OPTION&&e.openElements.pop(),e.openElements.currentTagId===l.OPTGROUP&&e.openElements.pop(),e._insertElement(t,D.HTML);break}case l.HR:{e.openElements.currentTagId===l.OPTION&&e.openElements.pop(),e.openElements.currentTagId===l.OPTGROUP&&e.openElements.pop(),e._appendElement(t,D.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:{pt(e,t);break}}}function dd(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:{ln(e,t);break}}}function pg(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)):cd(e,t)}function mg(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)):dd(e,t)}function gg(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:{pt(e,t);break}case l.CAPTION:case l.COLGROUP:case l.TBODY:case l.TFOOT:case l.THEAD:{e.tmplInsertionModeStack[0]=T.IN_TABLE,e.insertionMode=T.IN_TABLE,An(e,t);break}case l.COL:{e.tmplInsertionModeStack[0]=T.IN_COLUMN_GROUP,e.insertionMode=T.IN_COLUMN_GROUP,ks(e,t);break}case l.TR:{e.tmplInsertionModeStack[0]=T.IN_TABLE_BODY,e.insertionMode=T.IN_TABLE_BODY,Oi(e,t);break}case l.TD:case l.TH:{e.tmplInsertionModeStack[0]=T.IN_ROW,e.insertionMode=T.IN_ROW,Di(e,t);break}default:e.tmplInsertionModeStack[0]=T.IN_BODY,e.insertionMode=T.IN_BODY,Ve(e,t)}}function bg(e,t){t.tagID===l.TEMPLATE&&ln(e,t)}function hd(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(l.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):Ts(e,t)}function Eg(e,t){t.tagID===l.HTML?Ve(e,t):hi(e,t)}function fd(e,t){var n;if(t.tagID===l.HTML){if(e.fragmentContext||(e.insertionMode=T.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 hi(e,t)}function hi(e,t){e.insertionMode=T.IN_BODY,Li(e,t)}function _g(e,t){switch(t.tagID){case l.HTML:{Ve(e,t);break}case l.FRAMESET:{e._insertElement(t,D.HTML);break}case l.FRAME:{e._appendElement(t,D.HTML),t.ackSelfClosing=!0;break}case l.NOFRAMES:{pt(e,t);break}}}function Tg(e,t){t.tagID===l.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==l.FRAMESET&&(e.insertionMode=T.AFTER_FRAMESET))}function kg(e,t){switch(t.tagID){case l.HTML:{Ve(e,t);break}case l.NOFRAMES:{pt(e,t);break}}}function yg(e,t){t.tagID===l.HTML&&(e.insertionMode=T.AFTER_AFTER_FRAMESET)}function xg(e,t){t.tagID===l.HTML?Ve(e,t):Qr(e,t)}function Qr(e,t){e.insertionMode=T.IN_BODY,Li(e,t)}function wg(e,t){switch(t.tagID){case l.HTML:{Ve(e,t);break}case l.NOFRAMES:{pt(e,t);break}}}function Ag(e,t){t.chars=ve,e._insertCharacters(t)}function Cg(e,t){e._insertCharacters(t),e.framesetOk=!1}function pd(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==D.HTML&&e.openElements.currentTagId!==void 0&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function vg(e,t){if($1(t))pd(e),e._startTagOutsideForeignContent(t);else{const n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===D.MATHML?Xc(t):r===D.SVG&&(Y1(t),Zc(t)),Es(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}function Sg(e,t){if(t.tagID===l.P||t.tagID===l.BR){pd(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)===D.HTML){e._endTagOutsideForeignContent(t);break}const i=e.treeAdapter.getTagName(r);if(i.toLowerCase()===t.tagName){t.tagName=i,e.openElements.shortenToLength(n);break}}}S.AREA,S.BASE,S.BASEFONT,S.BGSOUND,S.BR,S.COL,S.EMBED,S.FRAME,S.HR,S.IMG,S.INPUT,S.KEYGEN,S.LINK,S.META,S.PARAM,S.SOURCE,S.TRACK,S.WBR;const Pi=md("end"),wt=md("start");function md(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 gd(e){const t=wt(e),n=Pi(e);if(t&&n)return{start:t,end:n}}const Ig=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,Ng=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),Zo={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function bd(e,t){const n=Ug(e),r=Uc("type",{handlers:{root:Lg,element:Rg,text:Og,comment:_d,doctype:Dg,raw:Mg},unknown:Bg}),i={parser:n?new Ko(Zo):Ko.getFragmentParser(void 0,Zo),handle(o){r(o,i)},stitches:!1,options:t||{}};r(e,i),Dn(i,wt());const a=n?i.parser.document:i.parser.getFragment(),s=zp(a,{file:i.options.file});return i.stitches&&$t(s,"comment",function(o,u,c){const h=o;if(h.value.stitch&&c&&u!==void 0){const d=c.children;return d[u]=h.value.stitch,u}}),s.type==="root"&&s.children.length===1&&s.children[0].type===e.type?s.children[0]:s}function Ed(e,t){let n=-1;if(e)for(;++n<e.length;)t.handle(e[n])}function Lg(e,t){Ed(e.children,t)}function Rg(e,t){Fg(e,t),Ed(e.children,t),Hg(e,t)}function Og(e,t){t.parser.tokenizer.state>4&&(t.parser.tokenizer.state=0);const n={type:se.CHARACTER,chars:e.value,location:vr(e)};Dn(t,wt(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function Dg(e,t){const n={type:se.DOCTYPE,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:vr(e)};Dn(t,wt(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function Pg(e,t){t.stitches=!0;const n=zg(e);if("children"in e&&"children"in n){const r=bd({type:"root",children:e.children},t.options);n.children=r.children}_d({type:"comment",value:{stitch:n}},t)}function _d(e,t){const n=e.value,r={type:se.COMMENT,data:n,location:vr(e)};Dn(t,wt(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function Mg(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,Td(t,wt(e)),t.parser.tokenizer.write(t.options.tagfilter?e.value.replace(Ig,"<$1$2"):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 Bg(e,t){const n=e;if(t.options.passThrough&&t.options.passThrough.includes(n.type))Pg(n,t);else{let r="";throw Ng.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 Dn(e,t){Td(e,t);const n=e.parser.tokenizer.currentCharacterToken;n&&n.location&&(n.location.endLine=e.parser.tokenizer.preprocessor.line,n.location.endCol=e.parser.tokenizer.preprocessor.col+1,n.location.endOffset=e.parser.tokenizer.preprocessor.offset+1,e.parser.currentToken=n,e.parser._processToken(e.parser.currentToken)),e.parser.tokenizer.paused=!1,e.parser.tokenizer.inLoop=!1,e.parser.tokenizer.active=!1,e.parser.tokenizer.returnState=Oe.DATA,e.parser.tokenizer.charRefCode=-1,e.parser.tokenizer.consumedAfterSnapshot=-1,e.parser.tokenizer.currentLocation=null,e.parser.tokenizer.currentCharacterToken=null,e.parser.tokenizer.currentToken=null,e.parser.tokenizer.currentAttr={name:"",value:""}}function Td(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 Fg(e,t){const n=e.tagName.toLowerCase();if(t.parser.tokenizer.state===Oe.PLAINTEXT)return;Dn(t,wt(e));const r=t.parser.openElements.current;let i="namespaceURI"in r?r.namespaceURI:en.html;i===en.html&&n==="svg"&&(i=en.svg);const a=qp({...e,children:[]},{space:i===en.svg?"svg":"html"}),s={type:se.START_TAG,tagName:n,tagID:On(n),selfClosing:!1,ackSelfClosing:!1,attrs:"attrs"in a?a.attrs:[],location:vr(e)};t.parser.currentToken=s,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=n}function Hg(e,t){const n=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&e1.includes(n)||t.parser.tokenizer.state===Oe.PLAINTEXT)return;Dn(t,Pi(e));const r={type:se.END_TAG,tagName:n,tagID:On(n),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:vr(e)};t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken),n===t.parser.tokenizer.lastStartTagName&&(t.parser.tokenizer.state===Oe.RCDATA||t.parser.tokenizer.state===Oe.RAWTEXT||t.parser.tokenizer.state===Oe.SCRIPT_DATA)&&(t.parser.tokenizer.state=Oe.DATA)}function Ug(e){const t=e.type==="root"?e.children[0]:e;return!!(t&&(t.type==="doctype"||t.type==="element"&&t.tagName.toLowerCase()==="html"))}function vr(e){const t=wt(e)||{line:void 0,column:void 0,offset:void 0},n=Pi(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 zg(e){return"children"in e?an({...e,children:[]}):an(e)}function Pa(e){return function(t,n){return bd(t,{...e,file:n})}}const Gt=["ariaDescribedBy","ariaLabel","ariaLabelledBy"],sr={ancestors:{tbody:["table"],td:["table"],th:["table"],thead:["table"],tfoot:["table"],tr:["table"]},attributes:{a:[...Gt,"dataFootnoteBackref","dataFootnoteRef",["className","data-footnote-backref"],"href"],blockquote:["cite"],code:[["className",/^language-./]],del:["cite"],div:["itemScope","itemType"],dl:[...Gt],h2:[["className","sr-only"]],img:[...Gt,"longDesc","src"],input:[["disabled",!0],["type","checkbox"]],ins:["cite"],li:[["className","task-list-item"]],ol:[...Gt,["className","contains-task-list"]],q:["cite"],section:["dataFootnotes",["className","footnotes"]],source:["srcSet"],summary:[...Gt],table:[...Gt],ul:[...Gt,["className","contains-task-list"]],"*":["abbr","accept","acceptCharset","accessKey","action","align","alt","axis","border","cellPadding","cellSpacing","char","charOff","charSet","checked","clear","colSpan","color","cols","compact","coords","dateTime","dir","encType","frame","hSpace","headers","height","hrefLang","htmlFor","id","isMap","itemProp","label","lang","maxLength","media","method","multiple","name","noHref","noShade","noWrap","open","prompt","readOnly","rev","rowSpan","rows","rules","scope","selected","shape","size","span","start","summary","tabIndex","title","useMap","vAlign","value","width"]},clobber:["ariaDescribedBy","ariaLabelledBy","id","name"],clobberPrefix:"user-content-",protocols:{cite:["http","https"],href:["http","https","irc","ircs","mailto","xmpp"],longDesc:["http","https"],src:["http","https"]},required:{input:{disabled:!0,type:"checkbox"}},strip:["script"],tagNames:["a","b","blockquote","br","code","dd","del","details","div","dl","dt","em","h1","h2","h3","h4","h5","h6","hr","i","img","input","ins","kbd","li","ol","p","picture","pre","q","rp","rt","ruby","s","samp","section","source","span","strike","strong","sub","summary","sup","table","tbody","td","tfoot","th","thead","tr","tt","ul","var"]},Ft={}.hasOwnProperty;function $g(e,t){let n={type:"root",children:[]};const r={schema:t?{...sr,...t}:sr,stack:[]},i=kd(r,e);return i&&(Array.isArray(i)?i.length===1?n=i[0]:n.children=i:n=i),n}function kd(e,t){if(t&&typeof t=="object"){const n=t;switch(typeof n.type=="string"?n.type:""){case"comment":return Yg(e,n);case"doctype":return jg(e,n);case"element":return Vg(e,n);case"root":return qg(e,n);case"text":return Wg(e,n)}}}function Yg(e,t){if(e.schema.allowComments){const n=typeof t.value=="string"?t.value:"",r=n.indexOf("-->"),a={type:"comment",value:r<0?n:n.slice(0,r)};return Sr(a,t),a}}function jg(e,t){if(e.schema.allowDoctypes){const n={type:"doctype"};return Sr(n,t),n}}function Vg(e,t){const n=typeof t.tagName=="string"?t.tagName:"";e.stack.push(n);const r=yd(e,t.children),i=Gg(e,t.properties);e.stack.pop();let a=!1;if(n&&n!=="*"&&(!e.schema.tagNames||e.schema.tagNames.includes(n))&&(a=!0,e.schema.ancestors&&Ft.call(e.schema.ancestors,n))){const o=e.schema.ancestors[n];let u=-1;for(a=!1;++u<o.length;)e.stack.includes(o[u])&&(a=!0)}if(!a)return e.schema.strip&&!e.schema.strip.includes(n)?r:void 0;const s={type:"element",tagName:n,properties:i,children:r};return Sr(s,t),s}function qg(e,t){const r={type:"root",children:yd(e,t.children)};return Sr(r,t),r}function Wg(e,t){const r={type:"text",value:typeof t.value=="string"?t.value:""};return Sr(r,t),r}function yd(e,t){const n=[];if(Array.isArray(t)){const r=t;let i=-1;for(;++i<r.length;){const a=kd(e,r[i]);a&&(Array.isArray(a)?n.push(...a):n.push(a))}}return n}function Gg(e,t){const n=e.stack[e.stack.length-1],r=e.schema.attributes,i=e.schema.required,a=r&&Ft.call(r,n)?r[n]:void 0,s=r&&Ft.call(r,"*")?r["*"]:void 0,o=t&&typeof t=="object"?t:{},u={};let c;for(c in o)if(Ft.call(o,c)){const h=o[c];let d=Jo(e,eu(a,c),c,h);d==null&&(d=Jo(e,eu(s,c),c,h)),d!=null&&(u[c]=d)}if(i&&Ft.call(i,n)){const h=i[n];for(c in h)Ft.call(h,c)&&!Ft.call(u,c)&&(u[c]=h[c])}return u}function Jo(e,t,n,r){return t?Array.isArray(r)?Kg(e,t,n,r):xd(e,t,n,r):void 0}function Kg(e,t,n,r){let i=-1;const a=[];for(;++i<r.length;){const s=xd(e,t,n,r[i]);(typeof s=="number"||typeof s=="string")&&a.push(s)}return a}function xd(e,t,n,r){if(!(typeof r!="boolean"&&typeof r!="number"&&typeof r!="string")&&Qg(e,n,r)){if(typeof t=="object"&&t.length>1){let i=!1,a=0;for(;++a<t.length;){const s=t[a];if(s&&typeof s=="object"&&"flags"in s){if(s.test(String(r))){i=!0;break}}else if(s===r){i=!0;break}}if(!i)return}return e.schema.clobber&&e.schema.clobberPrefix&&e.schema.clobber.includes(n)?e.schema.clobberPrefix+r:r}}function Qg(e,t,n){const r=e.schema.protocols&&Ft.call(e.schema.protocols,t)?e.schema.protocols[t]:void 0;if(!r||r.length===0)return!0;const i=String(n),a=i.indexOf(":"),s=i.indexOf("?"),o=i.indexOf("#"),u=i.indexOf("/");if(a<0||u>-1&&a>u||s>-1&&a>s||o>-1&&a>o)return!0;let c=-1;for(;++c<r.length;){const h=r[c];if(a===h.length&&i.slice(0,h.length)===h)return!0}return!1}function Sr(e,t){const n=gd(t);t.data&&(e.data=an(t.data)),n&&(e.position=n)}function eu(e,t){let n,r=-1;if(e)for(;++r<e.length;){const i=e[r],a=typeof i=="string"?i:i[0];if(a===t)return i;a==="data*"&&(n=i)}if(t.length>4&&t.slice(0,4).toLowerCase()==="data")return n}function wd(e){return function(t){return $g(t,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}const Ke=Vt(/[A-Za-z]/),je=Vt(/[\dA-Za-z]/),Xg=Vt(/[#-'*+\--9=?A-Z^-~]/);function fi(e){return e!==null&&(e<32||e===127)}const Ma=Vt(/\d/),Zg=Vt(/[\dA-Fa-f]/),Jg=Vt(/[!-/:-@[-`{-~]/);function Q(e){return e!==null&&e<-2}function ye(e){return e!==null&&(e<0||e===32)}function oe(e){return e===-2||e===-1||e===32}const Mi=Vt(/\p{P}|\p{S}/u),sn=Vt(/\s/);function Vt(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function eb(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function tb(e,t,n){const i=vi((n||{}).ignore||[]),a=nb(t);let s=-1;for(;++s<a.length;)cs(e,"text",o);function o(c,h){let d=-1,f;for(;++d<h.length;){const p=h[d],g=f?f.children:void 0;if(i(p,g?g.indexOf(p):void 0,f))return;f=p}if(f)return u(c,h)}function u(c,h){const d=h[h.length-1],f=a[s][0],p=a[s][1];let g=0;const C=d.children.indexOf(c);let w=!1,A=[];f.lastIndex=0;let x=f.exec(c.value);for(;x;){const L=x.index,P={index:x.index,input:x.input,stack:[...h,c]};let v=p(...x,P);if(typeof v=="string"&&(v=v.length>0?{type:"text",value:v}:void 0),v===!1?f.lastIndex=L+1:(g!==L&&A.push({type:"text",value:c.value.slice(g,L)}),Array.isArray(v)?A.push(...v):v&&A.push(v),g=L+x[0].length,w=!0),!f.global)break;x=f.exec(c.value)}return w?(g<c.value.length&&A.push({type:"text",value:c.value.slice(g)}),d.children.splice(C,1,...A)):A=[c],C+A.length}}function nb(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([rb(i[0]),ib(i[1])])}return t}function rb(e){return typeof e=="string"?new RegExp(eb(e),"g"):e}function ib(e){return typeof e=="function"?e:function(){return e}}const ea="phrasing",ta=["autolink","link","image","label"];function ab(){return{transforms:[hb],enter:{literalAutolink:ob,literalAutolinkEmail:na,literalAutolinkHttp:na,literalAutolinkWww:na},exit:{literalAutolink:db,literalAutolinkEmail:cb,literalAutolinkHttp:ub,literalAutolinkWww:lb}}}function sb(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:ea,notInConstruct:ta},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:ea,notInConstruct:ta},{character:":",before:"[ps]",after:"\\/",inConstruct:ea,notInConstruct:ta}]}}function ob(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function na(e){this.config.enter.autolinkProtocol.call(this,e)}function ub(e){this.config.exit.autolinkProtocol.call(this,e)}function lb(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 cb(e){this.config.exit.autolinkEmail.call(this,e)}function db(e){this.exit(e)}function hb(e){tb(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,fb],[/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu,pb]],{ignore:["link","linkReference"]})}function fb(e,t,n,r,i){let a="";if(!Ad(i)||(/^w/i.test(t)&&(n=t+n,t="",a="http://"),!mb(n)))return!1;const s=gb(n+r);if(!s[0])return!1;const o={type:"link",title:null,url:a+t+s[0],children:[{type:"text",value:t+s[0]}]};return s[1]?[o,{type:"text",value:s[1]}]:o}function pb(e,t,n,r){return!Ad(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function mb(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 gb(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 Ad(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||sn(n)||Mi(n))&&(!t||n!==47)}function ft(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}Cd.peek=Ab;function bb(){this.buffer()}function Eb(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function _b(){this.buffer()}function Tb(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function kb(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=ft(this.sliceSerialize(e)).toLowerCase(),n.label=t}function yb(e){this.exit(e)}function xb(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=ft(this.sliceSerialize(e)).toLowerCase(),n.label=t}function wb(e){this.exit(e)}function Ab(){return"["}function Cd(e,t,n,r){const i=n.createTracker(r);let a=i.move("[^");const s=n.enter("footnoteReference"),o=n.enter("reference");return a+=i.move(n.safe(n.associationId(e),{after:"]",before:a})),o(),s(),a+=i.move("]"),a}function Cb(){return{enter:{gfmFootnoteCallString:bb,gfmFootnoteCall:Eb,gfmFootnoteDefinitionLabelString:_b,gfmFootnoteDefinition:Tb},exit:{gfmFootnoteCallString:kb,gfmFootnoteCall:yb,gfmFootnoteDefinitionLabelString:xb,gfmFootnoteDefinition:wb}}}function vb(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:Cd},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,i,a,s){const o=a.createTracker(s);let u=o.move("[^");const c=a.enter("footnoteDefinition"),h=a.enter("label");return u+=o.move(a.safe(a.associationId(r),{before:u,after:"]"})),h(),u+=o.move("]:"),r.children&&r.children.length>0&&(o.shift(4),u+=o.move((t?`
|
|
3
3
|
`:" ")+a.indentLines(a.containerFlow(r,o.current()),t?vd:Sb))),c(),u}}function Sb(e,t,n){return t===0?e:vd(e,t,n)}function vd(e,t,n){return(n?"":" ")+e}const Ib=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];Sd.peek=Db;function Nb(){return{canContainEols:["delete"],enter:{strikethrough:Rb},exit:{strikethrough:Ob}}}function Lb(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:Ib}],handlers:{delete:Sd}}}function Rb(e){this.enter({type:"delete",children:[]},e)}function Ob(e){this.exit(e)}function Sd(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 Db(){return"~"}function Pb(e){return e.length}function Mb(e,t){const n=t||{},r=(n.align||[]).concat(),i=n.stringLength||Pb,a=[],s=[],o=[],u=[];let c=0,h=-1;for(;++h<e.length;){const k=[],C=[];let w=-1;for(e[h].length>c&&(c=e[h].length);++w<e[h].length;){const A=Bb(e[h][w]);if(n.alignDelimiters!==!1){const x=i(A);C[w]=x,(u[w]===void 0||x>u[w])&&(u[w]=x)}k.push(A)}s[h]=k,o[h]=C}let d=-1;if(typeof r=="object"&&"length"in r)for(;++d<c;)a[d]=nu(r[d]);else{const k=nu(r);for(;++d<c;)a[d]=k}d=-1;const f=[],p=[];for(;++d<c;){const k=a[d];let C="",w="";k===99?(C=":",w=":"):k===108?C=":":k===114&&(w=":");let A=n.alignDelimiters===!1?1:Math.max(1,u[d]-C.length-w.length);const x=C+"-".repeat(A)+w;n.alignDelimiters!==!1&&(A=C.length+A+w.length,A>u[d]&&(u[d]=A),p[d]=A),f[d]=x}s.splice(1,0,f),o.splice(1,0,p),h=-1;const g=[];for(;++h<s.length;){const k=s[h],C=o[h];d=-1;const w=[];for(;++d<c;){const A=k[d]||"";let x="",L="";if(n.alignDelimiters!==!1){const P=u[d]-(C[d]||0),v=a[d];v===114?x=" ".repeat(P):v===99?P%2?(x=" ".repeat(P/2+.5),L=" ".repeat(P/2-.5)):(x=" ".repeat(P/2),L=x):L=" ".repeat(P)}n.delimiterStart!==!1&&!d&&w.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&A==="")&&(n.delimiterStart!==!1||d)&&w.push(" "),n.alignDelimiters!==!1&&w.push(x),w.push(A),n.alignDelimiters!==!1&&w.push(L),n.padding!==!1&&w.push(" "),(n.delimiterEnd!==!1||d!==c-1)&&w.push("|")}g.push(n.delimiterEnd===!1?w.join("").replace(/ +$/,""):w.join(""))}return g.join(`
|
|
4
4
|
`)}function Bb(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 Fb(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()),Hb);return i(),s}function Hb(e,t,n){return">"+(n?"":" ")+e}function Ub(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===`
|
|
5
5
|
`&&Ub(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?"":" ";return`\\
|
|
@@ -106,18 +106,18 @@ ${this.parser.parse(e)}</blockquote>
|
|
|
106
106
|
${e}</tr>
|
|
107
107
|
`}tablecell(e){let t=this.parser.parseInline(e.tokens),n=e.header?"th":"td";return(e.align?`<${n} align="${e.align}">`:`<${n}>`)+t+`</${n}>
|
|
108
108
|
`}strong({tokens:e}){return`<strong>${this.parser.parseInline(e)}</strong>`}em({tokens:e}){return`<em>${this.parser.parseInline(e)}</em>`}codespan({text:e}){return`<code>${gt(e,!0)}</code>`}br(e){return"<br>"}del({tokens:e}){return`<del>${this.parser.parseInline(e)}</del>`}link({href:e,title:t,tokens:n}){let r=this.parser.parseInline(n),i=rl(e);if(i===null)return r;e=i;let a='<a href="'+e+'"';return t&&(a+=' title="'+gt(t)+'"'),a+=">"+r+"</a>",a}image({href:e,title:t,text:n,tokens:r}){r&&(n=this.parser.parseInline(r,this.parser.textRenderer));let i=rl(e);if(i===null)return gt(n);e=i;let a=`<img src="${e}" alt="${gt(n)}"`;return t&&(a+=` title="${gt(t)}"`),a+=">",a}text(e){return"tokens"in e&&e.tokens?this.parser.parseInline(e.tokens):"escaped"in e&&e.escaped?e.text:gt(e.text)}},Vs=class{strong({text:e}){return e}em({text:e}){return e}codespan({text:e}){return e}del({text:e}){return e}html({text:e}){return e}text({text:e}){return e}link({text:e}){return""+e}image({text:e}){return""+e}br(){return""}checkbox({raw:e}){return e}},dt=class Wa{constructor(t){ge(this,"options");ge(this,"renderer");ge(this,"textRenderer");this.options=t||hn,this.options.renderer=this.options.renderer||new _i,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Vs}static parse(t,n){return new Wa(n).parse(t)}static parseInline(t,n){return new Wa(n).parseInline(t)}parse(t){let n="";for(let r=0;r<t.length;r++){let i=t[r];if(this.options.extensions?.renderers?.[i.type]){let s=i,o=this.options.extensions.renderers[s.type].call({parser:this},s);if(o!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(s.type)){n+=o||"";continue}}let a=i;switch(a.type){case"space":{n+=this.renderer.space(a);break}case"hr":{n+=this.renderer.hr(a);break}case"heading":{n+=this.renderer.heading(a);break}case"code":{n+=this.renderer.code(a);break}case"table":{n+=this.renderer.table(a);break}case"blockquote":{n+=this.renderer.blockquote(a);break}case"list":{n+=this.renderer.list(a);break}case"checkbox":{n+=this.renderer.checkbox(a);break}case"html":{n+=this.renderer.html(a);break}case"def":{n+=this.renderer.def(a);break}case"paragraph":{n+=this.renderer.paragraph(a);break}case"text":{n+=this.renderer.text(a);break}default:{let s='Token with "'+a.type+'" type was not found.';if(this.options.silent)return console.error(s),"";throw new Error(s)}}}return n}parseInline(t,n=this.renderer){let r="";for(let i=0;i<t.length;i++){let a=t[i];if(this.options.extensions?.renderers?.[a.type]){let o=this.options.extensions.renderers[a.type].call({parser:this},a);if(o!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(a.type)){r+=o||"";continue}}let s=a;switch(s.type){case"escape":{r+=n.text(s);break}case"html":{r+=n.html(s);break}case"link":{r+=n.link(s);break}case"image":{r+=n.image(s);break}case"checkbox":{r+=n.checkbox(s);break}case"strong":{r+=n.strong(s);break}case"em":{r+=n.em(s);break}case"codespan":{r+=n.codespan(s);break}case"br":{r+=n.br(s);break}case"del":{r+=n.del(s);break}case"text":{r+=n.text(s);break}default:{let o='Token with "'+s.type+'" type was not found.';if(this.options.silent)return console.error(o),"";throw new Error(o)}}}return r}},qr,Kn=(qr=class{constructor(e){ge(this,"options");ge(this,"block");this.options=e||hn}preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}emStrongMask(e){return e}provideLexer(){return this.block?ot.lex:ot.lexInline}provideParser(){return this.block?dt.parse:dt.parseInline}},ge(qr,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens","emStrongMask"])),ge(qr,"passThroughHooksRespectAsync",new Set(["preprocess","postprocess","processAllTokens"])),qr),Kx=class{constructor(...e){ge(this,"defaults",Bs());ge(this,"options",this.setOptions);ge(this,"parse",this.parseMarkdown(!0));ge(this,"parseInline",this.parseMarkdown(!1));ge(this,"Parser",dt);ge(this,"Renderer",_i);ge(this,"TextRenderer",Vs);ge(this,"Lexer",ot);ge(this,"Tokenizer",Ei);ge(this,"Hooks",Kn);this.use(...e)}walkTokens(e,t){let n=[];for(let r of e)switch(n=n.concat(t.call(this,r)),r.type){case"table":{let i=r;for(let a of i.header)n=n.concat(this.walkTokens(a.tokens,t));for(let a of i.rows)for(let s of a)n=n.concat(this.walkTokens(s.tokens,t));break}case"list":{let i=r;n=n.concat(this.walkTokens(i.items,t));break}default:{let i=r;this.defaults.extensions?.childTokens?.[i.type]?this.defaults.extensions.childTokens[i.type].forEach(a=>{let s=i[a].flat(1/0);n=n.concat(this.walkTokens(s,t))}):i.tokens&&(n=n.concat(this.walkTokens(i.tokens,t)))}}return n}use(...e){let t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(n=>{let r={...n};if(r.async=this.defaults.async||r.async||!1,n.extensions&&(n.extensions.forEach(i=>{if(!i.name)throw new Error("extension name required");if("renderer"in i){let a=t.renderers[i.name];a?t.renderers[i.name]=function(...s){let o=i.renderer.apply(this,s);return o===!1&&(o=a.apply(this,s)),o}:t.renderers[i.name]=i.renderer}if("tokenizer"in i){if(!i.level||i.level!=="block"&&i.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let a=t[i.level];a?a.unshift(i.tokenizer):t[i.level]=[i.tokenizer],i.start&&(i.level==="block"?t.startBlock?t.startBlock.push(i.start):t.startBlock=[i.start]:i.level==="inline"&&(t.startInline?t.startInline.push(i.start):t.startInline=[i.start]))}"childTokens"in i&&i.childTokens&&(t.childTokens[i.name]=i.childTokens)}),r.extensions=t),n.renderer){let i=this.defaults.renderer||new _i(this.defaults);for(let a in n.renderer){if(!(a in i))throw new Error(`renderer '${a}' does not exist`);if(["options","parser"].includes(a))continue;let s=a,o=n.renderer[s],u=i[s];i[s]=(...c)=>{let h=o.apply(i,c);return h===!1&&(h=u.apply(i,c)),h||""}}r.renderer=i}if(n.tokenizer){let i=this.defaults.tokenizer||new Ei(this.defaults);for(let a in n.tokenizer){if(!(a in i))throw new Error(`tokenizer '${a}' does not exist`);if(["options","rules","lexer"].includes(a))continue;let s=a,o=n.tokenizer[s],u=i[s];i[s]=(...c)=>{let h=o.apply(i,c);return h===!1&&(h=u.apply(i,c)),h}}r.tokenizer=i}if(n.hooks){let i=this.defaults.hooks||new Kn;for(let a in n.hooks){if(!(a in i))throw new Error(`hook '${a}' does not exist`);if(["options","block"].includes(a))continue;let s=a,o=n.hooks[s],u=i[s];Kn.passThroughHooks.has(a)?i[s]=c=>{if(this.defaults.async&&Kn.passThroughHooksRespectAsync.has(a))return(async()=>{let d=await o.call(i,c);return u.call(i,d)})();let h=o.call(i,c);return u.call(i,h)}:i[s]=(...c)=>{if(this.defaults.async)return(async()=>{let d=await o.apply(i,c);return d===!1&&(d=await u.apply(i,c)),d})();let h=o.apply(i,c);return h===!1&&(h=u.apply(i,c)),h}}r.hooks=i}if(n.walkTokens){let i=this.defaults.walkTokens,a=n.walkTokens;r.walkTokens=function(s){let o=[];return o.push(a.call(this,s)),i&&(o=o.concat(i.call(this,s))),o}}this.defaults={...this.defaults,...r}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return ot.lex(e,t??this.defaults)}parser(e,t){return dt.parse(e,t??this.defaults)}parseMarkdown(e){return(t,n)=>{let r={...n},i={...this.defaults,...r},a=this.onError(!!i.silent,!!i.async);if(this.defaults.async===!0&&r.async===!1)return a(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof t>"u"||t===null)return a(new Error("marked(): input parameter is undefined or null"));if(typeof t!="string")return a(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(t)+", string expected"));if(i.hooks&&(i.hooks.options=i,i.hooks.block=e),i.async)return(async()=>{let s=i.hooks?await i.hooks.preprocess(t):t,o=await(i.hooks?await i.hooks.provideLexer():e?ot.lex:ot.lexInline)(s,i),u=i.hooks?await i.hooks.processAllTokens(o):o;i.walkTokens&&await Promise.all(this.walkTokens(u,i.walkTokens));let c=await(i.hooks?await i.hooks.provideParser():e?dt.parse:dt.parseInline)(u,i);return i.hooks?await i.hooks.postprocess(c):c})().catch(a);try{i.hooks&&(t=i.hooks.preprocess(t));let s=(i.hooks?i.hooks.provideLexer():e?ot.lex:ot.lexInline)(t,i);i.hooks&&(s=i.hooks.processAllTokens(s)),i.walkTokens&&this.walkTokens(s,i.walkTokens);let o=(i.hooks?i.hooks.provideParser():e?dt.parse:dt.parseInline)(s,i);return i.hooks&&(o=i.hooks.postprocess(o)),o}catch(s){return a(s)}}}onError(e,t){return n=>{if(n.message+=`
|
|
109
|
-
Please report this to https://github.com/markedjs/marked.`,e){let r="<p>An error occurred:</p><pre>"+gt(n.message+"",!0)+"</pre>";return t?Promise.resolve(r):r}if(t)return Promise.reject(n);throw n}}},on=new Kx;function Ee(e,t){return on.parse(e,t)}Ee.options=Ee.setOptions=function(e){return on.setOptions(e),Ee.defaults=on.defaults,H0(Ee.defaults),Ee};Ee.getDefaults=Bs;Ee.defaults=hn;Ee.use=function(...e){return on.use(...e),Ee.defaults=on.defaults,H0(Ee.defaults),Ee};Ee.walkTokens=function(e,t){return on.walkTokens(e,t)};Ee.parseInline=on.parseInline;Ee.Parser=dt;Ee.parser=dt.parse;Ee.Renderer=_i;Ee.TextRenderer=Vs;Ee.Lexer=ot;Ee.lexer=ot.lex;Ee.Tokenizer=Ei;Ee.Hooks=Kn;Ee.parse=Ee;Ee.options;Ee.setOptions;Ee.use;Ee.walkTokens;Ee.parseInline;dt.parse;ot.lex;var Qx=300,Xx="300px",Zx=500;function Jx(e={}){let{immediate:t=!1,debounceDelay:n=Qx,rootMargin:r=Xx,idleTimeout:i=Zx}=e,[a,s]=he(!1),o=Ce(null),u=Ce(null),c=Ce(null),h=Re(()=>p=>{let g=Date.now();return window.setTimeout(()=>{p({didTimeout:!1,timeRemaining:()=>Math.max(0,50-(Date.now()-g))})},1)},[]),d=Re(()=>typeof window<"u"&&window.requestIdleCallback?(p,g)=>window.requestIdleCallback(p,g):h,[h]),f=Re(()=>typeof window<"u"&&window.cancelIdleCallback?p=>window.cancelIdleCallback(p):p=>{clearTimeout(p)},[]);return be(()=>{if(t){s(!0);return}let p=o.current;if(!p)return;u.current&&(clearTimeout(u.current),u.current=null),c.current&&(f(c.current),c.current=null);let g=()=>{u.current&&(clearTimeout(u.current),u.current=null),c.current&&(f(c.current),c.current=null)},k=x=>{c.current=d(L=>{L.timeRemaining()>0||L.didTimeout?(s(!0),x.disconnect()):c.current=d(()=>{s(!0),x.disconnect()},{timeout:i/2})},{timeout:i})},C=x=>{g(),u.current=window.setTimeout(()=>{var L,P;let v=x.takeRecords();(v.length===0||(P=(L=v.at(-1))==null?void 0:L.isIntersecting)!=null&&P)&&k(x)},n)},w=(x,L)=>{x.isIntersecting?C(L):g()},A=new IntersectionObserver(x=>{for(let L of x)w(L,A)},{rootMargin:r,threshold:0});return A.observe(p),()=>{u.current&&clearTimeout(u.current),c.current&&f(c.current),A.disconnect()}},[t,n,r,i,f,d]),{shouldRender:a,containerRef:o}}var X0=/\s/,e6=/^\s+$/,t6=new Set(["code","pre","svg","math","annotation"]),n6=e=>typeof e=="object"&&e!==null&&"type"in e&&e.type==="element",r6=e=>e.some(t=>n6(t)&&t6.has(t.tagName)),i6=e=>{let t=[],n="",r=!1;for(let i of e){let a=X0.test(i);a!==r&&n&&(t.push(n),n=""),n+=i,r=a}return n&&t.push(n),t},a6=e=>{let t=[],n="";for(let r of e)X0.test(r)?n+=r:(n&&(t.push(n),n=""),t.push(r));return n&&t.push(n),t},s6=(e,t,n,r)=>({type:"element",tagName:"span",properties:{"data-sd-animate":!0,style:`--sd-animation:sd-${t};--sd-duration:${n}ms;--sd-easing:${r}`},children:[{type:"text",value:e}]}),o6=(e,t,n)=>{let r=t.at(-1);if(!(r&&"children"in r))return;if(r6(t))return bn;let i=r,a=i.children.indexOf(e);if(a===-1)return;let s=e.value;if(!s.trim())return;let o=(n.sep==="char"?a6(s):i6(s)).map(u=>e6.test(u)?{type:"text",value:u}:s6(u,n.animation,n.duration,n.easing));return i.children.splice(a,1,...o),a+o.length};function Ga(e){var t,n,r,i;let a={animation:(t=e?.animation)!=null?t:"fadeIn",duration:(n=e?.duration)!=null?n:150,easing:(r=e?.easing)!=null?r:"ease",sep:(i=e?.sep)!=null?i:"word"};return{name:"animate",type:"animate",rehypePlugin:()=>s=>{cs(s,"text",(o,u)=>o6(o,u,a))}}}Ga();var Z0=yi(!1),u6=()=>it(Z0),Z=(...e)=>vT(F_(e)),yn=(e,t,n)=>{let r=typeof t=="string"?new Blob([t],{type:n}):t,i=URL.createObjectURL(r),a=document.createElement("a");a.href=i,a.download=e,document.body.appendChild(a),a.click(),document.body.removeChild(a),URL.revokeObjectURL(i)},l6=Z("block","before:content-[counter(line)]","before:inline-block","before:[counter-increment:line]","before:w-6","before:mr-4","before:text-[13px]","before:text-right","before:text-muted-foreground/50","before:font-mono","before:select-none"),c6=e=>{let t={};for(let n of e.split(";")){let r=n.indexOf(":");if(r>0){let i=n.slice(0,r).trim(),a=n.slice(r+1).trim();i&&a&&(t[i]=a)}}return t},d6=_e(({children:e,result:t,language:n,className:r,...i})=>{let a=Re(()=>{let s={};return t.bg&&(s["--sdm-bg"]=t.bg),t.fg&&(s["--sdm-fg"]=t.fg),t.rootStyle&&Object.assign(s,c6(t.rootStyle)),s},[t.bg,t.fg,t.rootStyle]);return m("div",{className:Z(r,"overflow-hidden rounded-md border border-border bg-background p-4 text-sm"),"data-language":n,"data-streamdown":"code-block-body",...i,children:m("pre",{className:Z(r,"bg-[var(--sdm-bg,inherit]","dark:bg-[var(--shiki-dark-bg,var(--sdm-bg,inherit)]"),style:a,children:m("code",{className:"[counter-increment:line_0] [counter-reset:line]",children:t.tokens.map((s,o)=>m("span",{className:l6,children:s.map((u,c)=>{let h={},d=!!u.bgColor;if(u.color&&(h["--sdm-c"]=u.color),u.bgColor&&(h["--sdm-tbg"]=u.bgColor),u.htmlStyle)for(let[f,p]of Object.entries(u.htmlStyle))f==="color"?h["--sdm-c"]=p:f==="background-color"?(h["--sdm-tbg"]=p,d=!0):h[f]=p;return m("span",{className:Z("text-[var(--sdm-c,inherit)]","dark:text-[var(--shiki-dark,var(--sdm-c,inherit))]",d&&"bg-[var(--sdm-tbg)]",d&&"dark:bg-[var(--shiki-dark-bg,var(--sdm-tbg))]"),style:h,...u.htmlAttrs,children:u.content},c)})},o))})})})},(e,t)=>e.result===t.result&&e.language===t.language&&e.className===t.className),h6=({className:e,language:t,style:n,isIncomplete:r,...i})=>m("div",{className:Z("my-4 flex w-full flex-col gap-2 rounded-xl border border-border bg-sidebar p-2",e),"data-incomplete":r||void 0,"data-language":t,"data-streamdown":"code-block",style:{contentVisibility:"auto",containIntrinsicSize:"auto 200px",...n},...i}),J0=yi({code:""}),eh=()=>it(J0),f6=({language:e})=>m("div",{className:"flex h-8 items-center text-muted-foreground text-xs","data-language":e,"data-streamdown":"code-block-header",children:m("span",{className:"ml-1 font-mono lowercase",children:e})}),p6=/\n+$/,m6=Tc(()=>gc(()=>import("./highlighted-body-B3W2YXNL-
|
|
110
|
-
`).map(u=>[{content:u,color:"inherit",bgColor:"transparent",htmlStyle:{},offset:0}])}),[s]);return m(J0.Provider,{value:{code:e},children:m(h6,{isIncomplete:i,language:t,children:[m(f6,{language:t}),r?m("div",{className:"pointer-events-none sticky top-2 z-10 -mt-10 flex h-8 items-center justify-end",children:m("div",{className:"pointer-events-auto flex shrink-0 items-center gap-2 rounded-md border border-sidebar bg-sidebar/80 px-1.5 py-1 supports-[backdrop-filter]:bg-sidebar/70 supports-[backdrop-filter]:backdrop-blur","data-streamdown":"code-block-actions",children:r})}):null,m(Jn,{fallback:m(d6,{className:n,language:t,result:o,...a}),children:m(m6,{className:n,code:s,language:t,raw:o,...a})})]})})},qs=e=>m("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:m("path",{clipRule:"evenodd",d:"M15.5607 3.99999L15.0303 4.53032L6.23744 13.3232C5.55403 14.0066 4.44599 14.0066 3.76257 13.3232L4.2929 12.7929L3.76257 13.3232L0.969676 10.5303L0.439346 9.99999L1.50001 8.93933L2.03034 9.46966L4.82323 12.2626C4.92086 12.3602 5.07915 12.3602 5.17678 12.2626L13.9697 3.46966L14.5 2.93933L15.5607 3.99999Z",fill:"currentColor",fillRule:"evenodd"})}),Ws=e=>m("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:m("path",{clipRule:"evenodd",d:"M2.75 0.5C1.7835 0.5 1 1.2835 1 2.25V9.75C1 10.7165 1.7835 11.5 2.75 11.5H3.75H4.5V10H3.75H2.75C2.61193 10 2.5 9.88807 2.5 9.75V2.25C2.5 2.11193 2.61193 2 2.75 2H8.25C8.38807 2 8.5 2.11193 8.5 2.25V3H10V2.25C10 1.2835 9.2165 0.5 8.25 0.5H2.75ZM7.75 4.5C6.7835 4.5 6 5.2835 6 6.25V13.75C6 14.7165 6.7835 15.5 7.75 15.5H13.25C14.2165 15.5 15 14.7165 15 13.75V6.25C15 5.2835 14.2165 4.5 13.25 4.5H7.75ZM7.5 6.25C7.5 6.11193 7.61193 6 7.75 6H13.25C13.3881 6 13.5 6.11193 13.5 6.25V13.75C13.5 13.8881 13.3881 14 13.25 14H7.75C7.61193 14 7.5 13.8881 7.5 13.75V6.25Z",fill:"currentColor",fillRule:"evenodd"})}),$i=e=>m("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:m("path",{clipRule:"evenodd",d:"M8.75 1V1.75V8.68934L10.7197 6.71967L11.25 6.18934L12.3107 7.25L11.7803 7.78033L8.70711 10.8536C8.31658 11.2441 7.68342 11.2441 7.29289 10.8536L4.21967 7.78033L3.68934 7.25L4.75 6.18934L5.28033 6.71967L7.25 8.68934V1.75V1H8.75ZM13.5 9.25V13.5H2.5V9.25V8.5H1V9.25V14C1 14.5523 1.44771 15 2 15H14C14.5523 15 15 14.5523 15 14V9.25V8.5H13.5V9.25Z",fill:"currentColor",fillRule:"evenodd"})}),b6=e=>m("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:[m("path",{d:"M8 0V4",stroke:"currentColor",strokeWidth:"1.5"}),m("path",{d:"M8 16V12",opacity:"0.5",stroke:"currentColor",strokeWidth:"1.5"}),m("path",{d:"M3.29773 1.52783L5.64887 4.7639",opacity:"0.9",stroke:"currentColor",strokeWidth:"1.5"}),m("path",{d:"M12.7023 1.52783L10.3511 4.7639",opacity:"0.1",stroke:"currentColor",strokeWidth:"1.5"}),m("path",{d:"M12.7023 14.472L10.3511 11.236",opacity:"0.4",stroke:"currentColor",strokeWidth:"1.5"}),m("path",{d:"M3.29773 14.472L5.64887 11.236",opacity:"0.6",stroke:"currentColor",strokeWidth:"1.5"}),m("path",{d:"M15.6085 5.52783L11.8043 6.7639",opacity:"0.2",stroke:"currentColor",strokeWidth:"1.5"}),m("path",{d:"M0.391602 10.472L4.19583 9.23598",opacity:"0.7",stroke:"currentColor",strokeWidth:"1.5"}),m("path",{d:"M15.6085 10.4722L11.8043 9.2361",opacity:"0.3",stroke:"currentColor",strokeWidth:"1.5"}),m("path",{d:"M0.391602 5.52783L4.19583 6.7639",opacity:"0.8",stroke:"currentColor",strokeWidth:"1.5"})]}),E6=e=>m("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:m("path",{clipRule:"evenodd",d:"M1 5.25V6H2.5V5.25V2.5H5.25H6V1H5.25H2C1.44772 1 1 1.44772 1 2V5.25ZM5.25 14.9994H6V13.4994H5.25H2.5V10.7494V9.99939H1V10.7494V13.9994C1 14.5517 1.44772 14.9994 2 14.9994H5.25ZM15 10V10.75V14C15 14.5523 14.5523 15 14 15H10.75H10V13.5H10.75H13.5V10.75V10H15ZM10.75 1H10V2.5H10.75H13.5V5.25V6H15V5.25V2C15 1.44772 14.5523 1 14 1H10.75Z",fill:"currentColor",fillRule:"evenodd"})}),_6=e=>m("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:m("path",{clipRule:"evenodd",d:"M13.5 8C13.5 4.96643 11.0257 2.5 7.96452 2.5C5.42843 2.5 3.29365 4.19393 2.63724 6.5H5.25H6V8H5.25H0.75C0.335787 8 0 7.66421 0 7.25V2.75V2H1.5V2.75V5.23347C2.57851 2.74164 5.06835 1 7.96452 1C11.8461 1 15 4.13001 15 8C15 11.87 11.8461 15 7.96452 15C5.62368 15 3.54872 13.8617 2.27046 12.1122L1.828 11.5066L3.03915 10.6217L3.48161 11.2273C4.48831 12.6051 6.12055 13.5 7.96452 13.5C11.0257 13.5 13.5 11.0336 13.5 8Z",fill:"currentColor",fillRule:"evenodd"})}),th=e=>m("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:m("path",{clipRule:"evenodd",d:"M12.4697 13.5303L13 14.0607L14.0607 13L13.5303 12.4697L9.06065 7.99999L13.5303 3.53032L14.0607 2.99999L13 1.93933L12.4697 2.46966L7.99999 6.93933L3.53032 2.46966L2.99999 1.93933L1.93933 2.99999L2.46966 3.53032L6.93933 7.99999L2.46966 12.4697L1.93933 13L2.99999 14.0607L3.53032 13.5303L7.99999 9.06065L12.4697 13.5303Z",fill:"currentColor",fillRule:"evenodd"})}),sl=e=>m("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:m("path",{clipRule:"evenodd",d:"M13.5 10.25V13.25C13.5 13.3881 13.3881 13.5 13.25 13.5H2.75C2.61193 13.5 2.5 13.3881 2.5 13.25L2.5 2.75C2.5 2.61193 2.61193 2.5 2.75 2.5H5.75H6.5V1H5.75H2.75C1.7835 1 1 1.7835 1 2.75V13.25C1 14.2165 1.7835 15 2.75 15H13.25C14.2165 15 15 14.2165 15 13.25V10.25V9.5H13.5V10.25ZM9 1H9.75H14.2495C14.6637 1 14.9995 1.33579 14.9995 1.75V6.25V7H13.4995V6.25V3.56066L8.53033 8.52978L8 9.06011L6.93934 7.99945L7.46967 7.46912L12.4388 2.5H9.75H9V1Z",fill:"currentColor",fillRule:"evenodd"})}),T6=e=>m("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:m("path",{clipRule:"evenodd",d:"M1.5 6.5C1.5 3.73858 3.73858 1.5 6.5 1.5C9.26142 1.5 11.5 3.73858 11.5 6.5C11.5 9.26142 9.26142 11.5 6.5 11.5C3.73858 11.5 1.5 9.26142 1.5 6.5ZM6.5 0C2.91015 0 0 2.91015 0 6.5C0 10.0899 2.91015 13 6.5 13C8.02469 13 9.42677 12.475 10.5353 11.596L13.9697 15.0303L14.5 15.5607L15.5607 14.5L15.0303 13.9697L11.596 10.5353C12.475 9.42677 13 8.02469 13 6.5C13 2.91015 10.0899 0 6.5 0ZM4.125 5.875H4.75H5.875V4.75V4.125H7.125V4.75V5.875H8.25H8.875V7.125H8.25H7.125V8.25V8.875H5.875V8.25V7.125H4.75H4.125V5.875Z",fill:"currentColor",fillRule:"evenodd"})}),k6=e=>m("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:m("path",{clipRule:"evenodd",d:"M1.5 6.5C1.5 3.73858 3.73858 1.5 6.5 1.5C9.26142 1.5 11.5 3.73858 11.5 6.5C11.5 9.26142 9.26142 11.5 6.5 11.5C3.73858 11.5 1.5 9.26142 1.5 6.5ZM6.5 0C2.91015 0 0 2.91015 0 6.5C0 10.0899 2.91015 13 6.5 13C8.02469 13 9.42677 12.475 10.5353 11.596L13.9697 15.0303L14.5 15.5607L15.5607 14.5L15.0303 13.9697L11.596 10.5353C12.475 9.42677 13 8.02469 13 6.5C13 2.91015 10.0899 0 6.5 0ZM4.125 5.875H4.75H8.25H8.875V7.125H8.25H4.75H4.125V5.875Z",fill:"currentColor",fillRule:"evenodd"})}),ol=({onCopy:e,onError:t,timeout:n=2e3,children:r,className:i,code:a,...s})=>{let[o,u]=he(!1),c=Ce(0),{code:h}=eh(),{isAnimating:d}=it(ut),f=a??h,p=async()=>{var k;if(typeof window>"u"||!((k=navigator?.clipboard)!=null&&k.writeText)){t?.(new Error("Clipboard API not available"));return}try{o||(await navigator.clipboard.writeText(f),u(!0),e?.(),c.current=window.setTimeout(()=>u(!1),n))}catch(C){t?.(C)}};be(()=>()=>{window.clearTimeout(c.current)},[]);let g=o?qs:Ws;return m("button",{className:Z("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",i),"data-streamdown":"code-block-copy-button",disabled:d,onClick:p,title:"Copy Code",type:"button",...s,children:r??m(g,{size:14})})},ul={"1c":"1c","1c-query":"1cq",abap:"abap","actionscript-3":"as",ada:"ada",adoc:"adoc","angular-html":"html","angular-ts":"ts",apache:"conf",apex:"cls",apl:"apl",applescript:"applescript",ara:"ara",asciidoc:"adoc",asm:"asm",astro:"astro",awk:"awk",ballerina:"bal",bash:"sh",bat:"bat",batch:"bat",be:"be",beancount:"beancount",berry:"berry",bibtex:"bib",bicep:"bicep",blade:"blade.php",bsl:"bsl",c:"c","c#":"cs","c++":"cpp",cadence:"cdc",cairo:"cairo",cdc:"cdc",clarity:"clar",clj:"clj",clojure:"clj","closure-templates":"soy",cmake:"cmake",cmd:"cmd",cobol:"cob",codeowners:"CODEOWNERS",codeql:"ql",coffee:"coffee",coffeescript:"coffee","common-lisp":"lisp",console:"sh",coq:"v",cpp:"cpp",cql:"cql",crystal:"cr",cs:"cs",csharp:"cs",css:"css",csv:"csv",cue:"cue",cypher:"cql",d:"d",dart:"dart",dax:"dax",desktop:"desktop",diff:"diff",docker:"dockerfile",dockerfile:"dockerfile",dotenv:"env","dream-maker":"dm",edge:"edge",elisp:"el",elixir:"ex",elm:"elm","emacs-lisp":"el",erb:"erb",erl:"erl",erlang:"erl",f:"f","f#":"fs",f03:"f03",f08:"f08",f18:"f18",f77:"f77",f90:"f90",f95:"f95",fennel:"fnl",fish:"fish",fluent:"ftl",for:"for","fortran-fixed-form":"f","fortran-free-form":"f90",fs:"fs",fsharp:"fs",fsl:"fsl",ftl:"ftl",gdresource:"tres",gdscript:"gd",gdshader:"gdshader",genie:"gs",gherkin:"feature","git-commit":"gitcommit","git-rebase":"gitrebase",gjs:"js",gleam:"gleam","glimmer-js":"js","glimmer-ts":"ts",glsl:"glsl",gnuplot:"plt",go:"go",gql:"gql",graphql:"graphql",groovy:"groovy",gts:"gts",hack:"hack",haml:"haml",handlebars:"hbs",haskell:"hs",haxe:"hx",hbs:"hbs",hcl:"hcl",hjson:"hjson",hlsl:"hlsl",hs:"hs",html:"html","html-derivative":"html",http:"http",hxml:"hxml",hy:"hy",imba:"imba",ini:"ini",jade:"jade",java:"java",javascript:"js",jinja:"jinja",jison:"jison",jl:"jl",js:"js",json:"json",json5:"json5",jsonc:"jsonc",jsonl:"jsonl",jsonnet:"jsonnet",jssm:"jssm",jsx:"jsx",julia:"jl",kotlin:"kt",kql:"kql",kt:"kt",kts:"kts",kusto:"kql",latex:"tex",lean:"lean",lean4:"lean",less:"less",liquid:"liquid",lisp:"lisp",lit:"lit",llvm:"ll",log:"log",logo:"logo",lua:"lua",luau:"luau",make:"mak",makefile:"mak",markdown:"md",marko:"marko",matlab:"m",md:"md",mdc:"mdc",mdx:"mdx",mediawiki:"wiki",mermaid:"mmd",mips:"s",mipsasm:"s",mmd:"mmd",mojo:"mojo",move:"move",nar:"nar",narrat:"narrat",nextflow:"nf",nf:"nf",nginx:"conf",nim:"nim",nix:"nix",nu:"nu",nushell:"nu",objc:"m","objective-c":"m","objective-cpp":"mm",ocaml:"ml",pascal:"pas",perl:"pl",perl6:"p6",php:"php",plsql:"pls",po:"po",polar:"polar",postcss:"pcss",pot:"pot",potx:"potx",powerquery:"pq",powershell:"ps1",prisma:"prisma",prolog:"pl",properties:"properties",proto:"proto",protobuf:"proto",ps:"ps",ps1:"ps1",pug:"pug",puppet:"pp",purescript:"purs",py:"py",python:"py",ql:"ql",qml:"qml",qmldir:"qmldir",qss:"qss",r:"r",racket:"rkt",raku:"raku",razor:"cshtml",rb:"rb",reg:"reg",regex:"regex",regexp:"regexp",rel:"rel",riscv:"s",rs:"rs",rst:"rst",ruby:"rb",rust:"rs",sas:"sas",sass:"sass",scala:"scala",scheme:"scm",scss:"scss",sdbl:"sdbl",sh:"sh",shader:"shader",shaderlab:"shader",shell:"sh",shellscript:"sh",shellsession:"sh",smalltalk:"st",solidity:"sol",soy:"soy",sparql:"rq",spl:"spl",splunk:"spl",sql:"sql","ssh-config":"config",stata:"do",styl:"styl",stylus:"styl",svelte:"svelte",swift:"swift","system-verilog":"sv",systemd:"service",talon:"talon",talonscript:"talon",tasl:"tasl",tcl:"tcl",templ:"templ",terraform:"tf",tex:"tex",tf:"tf",tfvars:"tfvars",toml:"toml",ts:"ts","ts-tags":"ts",tsp:"tsp",tsv:"tsv",tsx:"tsx",turtle:"ttl",twig:"twig",typ:"typ",typescript:"ts",typespec:"tsp",typst:"typ",v:"v",vala:"vala",vb:"vb",verilog:"v",vhdl:"vhdl",vim:"vim",viml:"vim",vimscript:"vim",vue:"vue","vue-html":"html","vue-vine":"vine",vy:"vy",vyper:"vy",wasm:"wasm",wenyan:"wy",wgsl:"wgsl",wiki:"wiki",wikitext:"wiki",wit:"wit",wl:"wl",wolfram:"wl",xml:"xml",xsl:"xsl",yaml:"yaml",yml:"yml",zenscript:"zs",zig:"zig",zsh:"zsh",文言:"wy"},y6=({onDownload:e,onError:t,language:n,children:r,className:i,code:a,...s})=>{let{code:o}=eh(),{isAnimating:u}=it(ut),c=a??o,h=`file.${n&&n in ul?ul[n]:"txt"}`,d="text/plain",f=()=>{try{yn(h,c,d),e?.()}catch(p){t?.(p)}};return m("button",{className:Z("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",i),"data-streamdown":"code-block-download-button",disabled:u,onClick:f,title:"Download file",type:"button",...s,children:r??m($i,{size:14})})},x6=()=>m("div",{className:"w-full divide-y divide-border overflow-hidden rounded-xl border border-border",children:[m("div",{className:"h-[46px] w-full bg-muted/80"}),m("div",{className:"flex w-full items-center justify-center p-4",children:m(b6,{className:"size-4 animate-spin"})})]}),w6=/\.[^/.]+$/,A6=({node:e,className:t,src:n,alt:r,onLoad:i,onError:a,...s})=>{let o=Ce(null),[u,c]=he(!1),[h,d]=he(!1),f=s.width!=null||s.height!=null,p=(u||f)&&!h,g=h&&!f;be(()=>{let A=o.current;if(A!=null&&A.complete){let x=A.naturalWidth>0;c(x),d(!x)}},[]);let k=Ge(A=>{c(!0),d(!1),i?.(A)},[i]),C=Ge(A=>{c(!1),d(!0),a?.(A)},[a]),w=async()=>{if(n)try{let A=await(await fetch(n)).blob(),x=new URL(n,window.location.origin).pathname.split("/").pop()||"",L=x.split(".").pop(),P=x.includes(".")&&L!==void 0&&L.length<=4,v="";if(P)v=x;else{let V=A.type,O="png";V.includes("jpeg")||V.includes("jpg")?O="jpg":V.includes("png")?O="png":V.includes("svg")?O="svg":V.includes("gif")?O="gif":V.includes("webp")&&(O="webp"),v=`${(r||x||"image").replace(w6,"")}.${O}`}yn(v,A,A.type)}catch{window.open(n,"_blank")}};return n?m("div",{className:"group relative my-4 inline-block","data-streamdown":"image-wrapper",children:[m("img",{alt:r,className:Z("max-w-full rounded-lg",g&&"hidden",t),"data-streamdown":"image",onError:C,onLoad:k,ref:o,src:n,...s}),g&&m("span",{className:"text-muted-foreground text-xs italic","data-streamdown":"image-fallback",children:"Image not available"}),m("div",{className:"pointer-events-none absolute inset-0 hidden rounded-lg bg-black/10 group-hover:block"}),p&&m("button",{className:Z("absolute right-2 bottom-2 flex h-8 w-8 cursor-pointer items-center justify-center rounded-md border border-border bg-background/90 shadow-sm backdrop-blur-sm transition-all duration-200 hover:bg-background","opacity-0 group-hover:opacity-100"),onClick:w,title:"Download image",type:"button",children:m($i,{size:14})})]}):null},lr=0,C6=()=>{lr+=1,lr===1&&(document.body.style.overflow="hidden")},v6=()=>{lr=Math.max(0,lr-1),lr===0&&(document.body.style.overflow="")},S6=({url:e,isOpen:t,onClose:n,onConfirm:r})=>{let[i,a]=he(!1),s=Ge(async()=>{try{await navigator.clipboard.writeText(e),a(!0),setTimeout(()=>a(!1),2e3)}catch{}},[e]),o=Ge(()=>{r(),n()},[r,n]);return be(()=>{if(t){C6();let u=c=>{c.key==="Escape"&&n()};return document.addEventListener("keydown",u),()=>{document.removeEventListener("keydown",u),v6()}}},[t,n]),t?m("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-background/50 backdrop-blur-sm","data-streamdown":"link-safety-modal",onClick:n,onKeyDown:u=>{u.key==="Escape"&&n()},role:"button",tabIndex:0,children:m("div",{className:"relative mx-4 flex w-full max-w-md flex-col gap-4 rounded-xl border bg-background p-6 shadow-lg",onClick:u=>u.stopPropagation(),onKeyDown:u=>u.stopPropagation(),role:"presentation",children:[m("button",{className:"absolute top-4 right-4 rounded-md p-1 text-muted-foreground transition-all hover:bg-muted hover:text-foreground",onClick:n,title:"Close",type:"button",children:m(th,{size:16})}),m("div",{className:"flex flex-col gap-2",children:[m("div",{className:"flex items-center gap-2 font-semibold text-lg",children:[m(sl,{size:20}),m("span",{children:"Open external link?"})]}),m("p",{className:"text-muted-foreground text-sm",children:"You're about to visit an external website."})]}),m("div",{className:Z("break-all rounded-md bg-muted p-3 font-mono text-sm",e.length>100&&"max-h-32 overflow-y-auto"),children:e}),m("div",{className:"flex gap-2",children:[m("button",{className:"flex flex-1 items-center justify-center gap-2 rounded-md border bg-background px-4 py-2 font-medium text-sm transition-all hover:bg-muted",onClick:s,type:"button",children:i?m(pe,{children:[m(qs,{size:14}),m("span",{children:"Copied"})]}):m(pe,{children:[m(Ws,{size:14}),m("span",{children:"Copy link"})]})}),m("button",{className:"flex flex-1 items-center justify-center gap-2 rounded-md bg-primary px-4 py-2 font-medium text-primary-foreground text-sm transition-all hover:bg-primary/90",onClick:o,type:"button",children:[m(sl,{size:14}),m("span",{children:"Open link"})]})]})]})}):null},Ka=yi(null),nh=()=>it(Ka),Dw=()=>{var e;let t=nh();return(e=t?.code)!=null?e:null},Gs=()=>{var e;let t=nh();return(e=t?.mermaid)!=null?e:null},I6=(e,t)=>{var n;let r=(n=void 0)!=null?n:5;return new Promise((i,a)=>{let s="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(e))),o=new Image;o.crossOrigin="anonymous",o.onload=()=>{let u=document.createElement("canvas"),c=o.width*r,h=o.height*r;u.width=c,u.height=h;let d=u.getContext("2d");if(!d){a(new Error("Failed to create 2D canvas context for PNG export"));return}d.drawImage(o,0,0,c,h),u.toBlob(f=>{if(!f){a(new Error("Failed to create PNG blob"));return}i(f)},"image/png")},o.onerror=()=>a(new Error("Failed to load SVG image")),o.src=s})},N6=({chart:e,children:t,className:n,onDownload:r,config:i,onError:a})=>{let[s,o]=he(!1),u=Ce(null),{isAnimating:c}=it(ut),h=Gs(),d=async f=>{try{if(f==="mmd"){yn("diagram.mmd",e,"text/plain"),o(!1),r?.(f);return}if(!h){a?.(new Error("Mermaid plugin not available"));return}let p=h.getMermaid(i),g=e.split("").reduce((w,A)=>(w<<5)-w+A.charCodeAt(0)|0,0),k=`mermaid-${Math.abs(g)}-${Date.now()}-${Math.random().toString(36).substring(2,9)}`,{svg:C}=await p.render(k,e);if(!C){a?.(new Error("SVG not found. Please wait for the diagram to render."));return}if(f==="svg"){yn("diagram.svg",C,"image/svg+xml"),o(!1),r?.(f);return}if(f==="png"){let w=await I6(C);yn("diagram.png",w,"image/png"),r?.(f),o(!1);return}}catch(p){a?.(p)}};return be(()=>{let f=p=>{let g=p.composedPath();u.current&&!g.includes(u.current)&&o(!1)};return document.addEventListener("mousedown",f),()=>{document.removeEventListener("mousedown",f)}},[]),m("div",{className:"relative",ref:u,children:[m("button",{className:Z("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",n),disabled:c,onClick:()=>o(!s),title:"Download diagram",type:"button",children:t??m($i,{size:14})}),s?m("div",{className:"absolute top-full right-0 z-10 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg",children:[m("button",{className:"w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40",onClick:()=>d("svg"),title:"Download diagram as SVG",type:"button",children:"SVG"}),m("button",{className:"w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40",onClick:()=>d("png"),title:"Download diagram as PNG",type:"button",children:"PNG"}),m("button",{className:"w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40",onClick:()=>d("mmd"),title:"Download diagram as MMD",type:"button",children:"MMD"})]}):null]})},cr=0,L6=()=>{cr+=1,cr===1&&(document.body.style.overflow="hidden")},R6=()=>{cr=Math.max(0,cr-1),cr===0&&(document.body.style.overflow="")},O6=({chart:e,config:t,onFullscreen:n,onExit:r,className:i,...a})=>{let[s,o]=he(!1),{isAnimating:u,controls:c}=it(ut),h=(()=>{if(typeof c=="boolean")return c;let f=c.mermaid;return f===!1?!1:f===!0||f===void 0?!0:f.panZoom!==!1})(),d=()=>{o(!s)};return be(()=>{if(s){L6();let f=p=>{p.key==="Escape"&&o(!1)};return document.addEventListener("keydown",f),()=>{document.removeEventListener("keydown",f),R6()}}},[s]),be(()=>{s?n?.():r&&r()},[s,n,r]),m(pe,{children:[m("button",{className:Z("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",i),disabled:u,onClick:d,title:"View fullscreen",type:"button",...a,children:m(E6,{size:14})}),s?kc(m("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-background/95 backdrop-blur-sm",onClick:d,onKeyDown:f=>{f.key==="Escape"&&d()},role:"button",tabIndex:0,children:[m("button",{className:"absolute top-4 right-4 z-10 rounded-md p-2 text-muted-foreground transition-all hover:bg-muted hover:text-foreground",onClick:d,title:"Exit fullscreen",type:"button",children:m(th,{size:20})}),m("div",{className:"flex size-full items-center justify-center p-4",onClick:f=>f.stopPropagation(),onKeyDown:f=>f.stopPropagation(),role:"presentation",children:m(T5,{chart:e,className:"size-full [&_svg]:h-auto [&_svg]:w-auto",config:t,fullscreen:!0,showControls:h})})]}),document.body):null]})},rh=e=>{var t,n;let r=[],i=[],a=e.querySelectorAll("thead th");for(let o of a)r.push(((t=o.textContent)==null?void 0:t.trim())||"");let s=e.querySelectorAll("tbody tr");for(let o of s){let u=[],c=o.querySelectorAll("td");for(let h of c)u.push(((n=h.textContent)==null?void 0:n.trim())||"");i.push(u)}return{headers:r,rows:i}},ih=e=>{let{headers:t,rows:n}=e,r=o=>{let u=!1,c=!1;for(let h of o){if(h==='"'){u=!0,c=!0;break}(h===","||h===`
|
|
109
|
+
Please report this to https://github.com/markedjs/marked.`,e){let r="<p>An error occurred:</p><pre>"+gt(n.message+"",!0)+"</pre>";return t?Promise.resolve(r):r}if(t)return Promise.reject(n);throw n}}},on=new Kx;function Ee(e,t){return on.parse(e,t)}Ee.options=Ee.setOptions=function(e){return on.setOptions(e),Ee.defaults=on.defaults,H0(Ee.defaults),Ee};Ee.getDefaults=Bs;Ee.defaults=hn;Ee.use=function(...e){return on.use(...e),Ee.defaults=on.defaults,H0(Ee.defaults),Ee};Ee.walkTokens=function(e,t){return on.walkTokens(e,t)};Ee.parseInline=on.parseInline;Ee.Parser=dt;Ee.parser=dt.parse;Ee.Renderer=_i;Ee.TextRenderer=Vs;Ee.Lexer=ot;Ee.lexer=ot.lex;Ee.Tokenizer=Ei;Ee.Hooks=Kn;Ee.parse=Ee;Ee.options;Ee.setOptions;Ee.use;Ee.walkTokens;Ee.parseInline;dt.parse;ot.lex;var Qx=300,Xx="300px",Zx=500;function Jx(e={}){let{immediate:t=!1,debounceDelay:n=Qx,rootMargin:r=Xx,idleTimeout:i=Zx}=e,[a,s]=he(!1),o=Ce(null),u=Ce(null),c=Ce(null),h=Re(()=>p=>{let g=Date.now();return window.setTimeout(()=>{p({didTimeout:!1,timeRemaining:()=>Math.max(0,50-(Date.now()-g))})},1)},[]),d=Re(()=>typeof window<"u"&&window.requestIdleCallback?(p,g)=>window.requestIdleCallback(p,g):h,[h]),f=Re(()=>typeof window<"u"&&window.cancelIdleCallback?p=>window.cancelIdleCallback(p):p=>{clearTimeout(p)},[]);return be(()=>{if(t){s(!0);return}let p=o.current;if(!p)return;u.current&&(clearTimeout(u.current),u.current=null),c.current&&(f(c.current),c.current=null);let g=()=>{u.current&&(clearTimeout(u.current),u.current=null),c.current&&(f(c.current),c.current=null)},k=x=>{c.current=d(L=>{L.timeRemaining()>0||L.didTimeout?(s(!0),x.disconnect()):c.current=d(()=>{s(!0),x.disconnect()},{timeout:i/2})},{timeout:i})},C=x=>{g(),u.current=window.setTimeout(()=>{var L,P;let v=x.takeRecords();(v.length===0||(P=(L=v.at(-1))==null?void 0:L.isIntersecting)!=null&&P)&&k(x)},n)},w=(x,L)=>{x.isIntersecting?C(L):g()},A=new IntersectionObserver(x=>{for(let L of x)w(L,A)},{rootMargin:r,threshold:0});return A.observe(p),()=>{u.current&&clearTimeout(u.current),c.current&&f(c.current),A.disconnect()}},[t,n,r,i,f,d]),{shouldRender:a,containerRef:o}}var X0=/\s/,e6=/^\s+$/,t6=new Set(["code","pre","svg","math","annotation"]),n6=e=>typeof e=="object"&&e!==null&&"type"in e&&e.type==="element",r6=e=>e.some(t=>n6(t)&&t6.has(t.tagName)),i6=e=>{let t=[],n="",r=!1;for(let i of e){let a=X0.test(i);a!==r&&n&&(t.push(n),n=""),n+=i,r=a}return n&&t.push(n),t},a6=e=>{let t=[],n="";for(let r of e)X0.test(r)?n+=r:(n&&(t.push(n),n=""),t.push(r));return n&&t.push(n),t},s6=(e,t,n,r)=>({type:"element",tagName:"span",properties:{"data-sd-animate":!0,style:`--sd-animation:sd-${t};--sd-duration:${n}ms;--sd-easing:${r}`},children:[{type:"text",value:e}]}),o6=(e,t,n)=>{let r=t.at(-1);if(!(r&&"children"in r))return;if(r6(t))return bn;let i=r,a=i.children.indexOf(e);if(a===-1)return;let s=e.value;if(!s.trim())return;let o=(n.sep==="char"?a6(s):i6(s)).map(u=>e6.test(u)?{type:"text",value:u}:s6(u,n.animation,n.duration,n.easing));return i.children.splice(a,1,...o),a+o.length};function Ga(e){var t,n,r,i;let a={animation:(t=e?.animation)!=null?t:"fadeIn",duration:(n=e?.duration)!=null?n:150,easing:(r=e?.easing)!=null?r:"ease",sep:(i=e?.sep)!=null?i:"word"};return{name:"animate",type:"animate",rehypePlugin:()=>s=>{cs(s,"text",(o,u)=>o6(o,u,a))}}}Ga();var Z0=yi(!1),u6=()=>it(Z0),Z=(...e)=>vT(F_(e)),yn=(e,t,n)=>{let r=typeof t=="string"?new Blob([t],{type:n}):t,i=URL.createObjectURL(r),a=document.createElement("a");a.href=i,a.download=e,document.body.appendChild(a),a.click(),document.body.removeChild(a),URL.revokeObjectURL(i)},l6=Z("block","before:content-[counter(line)]","before:inline-block","before:[counter-increment:line]","before:w-6","before:mr-4","before:text-[13px]","before:text-right","before:text-muted-foreground/50","before:font-mono","before:select-none"),c6=e=>{let t={};for(let n of e.split(";")){let r=n.indexOf(":");if(r>0){let i=n.slice(0,r).trim(),a=n.slice(r+1).trim();i&&a&&(t[i]=a)}}return t},d6=_e(({children:e,result:t,language:n,className:r,...i})=>{let a=Re(()=>{let s={};return t.bg&&(s["--sdm-bg"]=t.bg),t.fg&&(s["--sdm-fg"]=t.fg),t.rootStyle&&Object.assign(s,c6(t.rootStyle)),s},[t.bg,t.fg,t.rootStyle]);return m("div",{className:Z(r,"overflow-hidden rounded-md border border-border bg-background p-4 text-sm"),"data-language":n,"data-streamdown":"code-block-body",...i,children:m("pre",{className:Z(r,"bg-[var(--sdm-bg,inherit]","dark:bg-[var(--shiki-dark-bg,var(--sdm-bg,inherit)]"),style:a,children:m("code",{className:"[counter-increment:line_0] [counter-reset:line]",children:t.tokens.map((s,o)=>m("span",{className:l6,children:s.map((u,c)=>{let h={},d=!!u.bgColor;if(u.color&&(h["--sdm-c"]=u.color),u.bgColor&&(h["--sdm-tbg"]=u.bgColor),u.htmlStyle)for(let[f,p]of Object.entries(u.htmlStyle))f==="color"?h["--sdm-c"]=p:f==="background-color"?(h["--sdm-tbg"]=p,d=!0):h[f]=p;return m("span",{className:Z("text-[var(--sdm-c,inherit)]","dark:text-[var(--shiki-dark,var(--sdm-c,inherit))]",d&&"bg-[var(--sdm-tbg)]",d&&"dark:bg-[var(--shiki-dark-bg,var(--sdm-tbg))]"),style:h,...u.htmlAttrs,children:u.content},c)})},o))})})})},(e,t)=>e.result===t.result&&e.language===t.language&&e.className===t.className),h6=({className:e,language:t,style:n,isIncomplete:r,...i})=>m("div",{className:Z("my-4 flex w-full flex-col gap-2 rounded-xl border border-border bg-sidebar p-2",e),"data-incomplete":r||void 0,"data-language":t,"data-streamdown":"code-block",style:{contentVisibility:"auto",containIntrinsicSize:"auto 200px",...n},...i}),J0=yi({code:""}),eh=()=>it(J0),f6=({language:e})=>m("div",{className:"flex h-8 items-center text-muted-foreground text-xs","data-language":e,"data-streamdown":"code-block-header",children:m("span",{className:"ml-1 font-mono lowercase",children:e})}),p6=/\n+$/,m6=Tc(()=>gc(()=>import("./highlighted-body-B3W2YXNL-658ad560.js"),[],import.meta.url).then(e=>({default:e.HighlightedCodeBlockBody}))),g6=({code:e,language:t,className:n,children:r,isIncomplete:i=!1,...a})=>{let s=Re(()=>e.replace(p6,""),[e]),o=Re(()=>({bg:"transparent",fg:"inherit",tokens:s.split(`
|
|
110
|
+
`).map(u=>[{content:u,color:"inherit",bgColor:"transparent",htmlStyle:{},offset:0}])}),[s]);return m(J0.Provider,{value:{code:e},children:m(h6,{isIncomplete:i,language:t,children:[m(f6,{language:t}),r?m("div",{className:"pointer-events-none sticky top-2 z-10 -mt-10 flex h-8 items-center justify-end",children:m("div",{className:"pointer-events-auto flex shrink-0 items-center gap-2 rounded-md border border-sidebar bg-sidebar/80 px-1.5 py-1 supports-[backdrop-filter]:bg-sidebar/70 supports-[backdrop-filter]:backdrop-blur","data-streamdown":"code-block-actions",children:r})}):null,m(Jn,{fallback:m(d6,{className:n,language:t,result:o,...a}),children:m(m6,{className:n,code:s,language:t,raw:o,...a})})]})})},qs=e=>m("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:m("path",{clipRule:"evenodd",d:"M15.5607 3.99999L15.0303 4.53032L6.23744 13.3232C5.55403 14.0066 4.44599 14.0066 3.76257 13.3232L4.2929 12.7929L3.76257 13.3232L0.969676 10.5303L0.439346 9.99999L1.50001 8.93933L2.03034 9.46966L4.82323 12.2626C4.92086 12.3602 5.07915 12.3602 5.17678 12.2626L13.9697 3.46966L14.5 2.93933L15.5607 3.99999Z",fill:"currentColor",fillRule:"evenodd"})}),Ws=e=>m("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:m("path",{clipRule:"evenodd",d:"M2.75 0.5C1.7835 0.5 1 1.2835 1 2.25V9.75C1 10.7165 1.7835 11.5 2.75 11.5H3.75H4.5V10H3.75H2.75C2.61193 10 2.5 9.88807 2.5 9.75V2.25C2.5 2.11193 2.61193 2 2.75 2H8.25C8.38807 2 8.5 2.11193 8.5 2.25V3H10V2.25C10 1.2835 9.2165 0.5 8.25 0.5H2.75ZM7.75 4.5C6.7835 4.5 6 5.2835 6 6.25V13.75C6 14.7165 6.7835 15.5 7.75 15.5H13.25C14.2165 15.5 15 14.7165 15 13.75V6.25C15 5.2835 14.2165 4.5 13.25 4.5H7.75ZM7.5 6.25C7.5 6.11193 7.61193 6 7.75 6H13.25C13.3881 6 13.5 6.11193 13.5 6.25V13.75C13.5 13.8881 13.3881 14 13.25 14H7.75C7.61193 14 7.5 13.8881 7.5 13.75V6.25Z",fill:"currentColor",fillRule:"evenodd"})}),$i=e=>m("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:m("path",{clipRule:"evenodd",d:"M8.75 1V1.75V8.68934L10.7197 6.71967L11.25 6.18934L12.3107 7.25L11.7803 7.78033L8.70711 10.8536C8.31658 11.2441 7.68342 11.2441 7.29289 10.8536L4.21967 7.78033L3.68934 7.25L4.75 6.18934L5.28033 6.71967L7.25 8.68934V1.75V1H8.75ZM13.5 9.25V13.5H2.5V9.25V8.5H1V9.25V14C1 14.5523 1.44771 15 2 15H14C14.5523 15 15 14.5523 15 14V9.25V8.5H13.5V9.25Z",fill:"currentColor",fillRule:"evenodd"})}),b6=e=>m("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:[m("path",{d:"M8 0V4",stroke:"currentColor",strokeWidth:"1.5"}),m("path",{d:"M8 16V12",opacity:"0.5",stroke:"currentColor",strokeWidth:"1.5"}),m("path",{d:"M3.29773 1.52783L5.64887 4.7639",opacity:"0.9",stroke:"currentColor",strokeWidth:"1.5"}),m("path",{d:"M12.7023 1.52783L10.3511 4.7639",opacity:"0.1",stroke:"currentColor",strokeWidth:"1.5"}),m("path",{d:"M12.7023 14.472L10.3511 11.236",opacity:"0.4",stroke:"currentColor",strokeWidth:"1.5"}),m("path",{d:"M3.29773 14.472L5.64887 11.236",opacity:"0.6",stroke:"currentColor",strokeWidth:"1.5"}),m("path",{d:"M15.6085 5.52783L11.8043 6.7639",opacity:"0.2",stroke:"currentColor",strokeWidth:"1.5"}),m("path",{d:"M0.391602 10.472L4.19583 9.23598",opacity:"0.7",stroke:"currentColor",strokeWidth:"1.5"}),m("path",{d:"M15.6085 10.4722L11.8043 9.2361",opacity:"0.3",stroke:"currentColor",strokeWidth:"1.5"}),m("path",{d:"M0.391602 5.52783L4.19583 6.7639",opacity:"0.8",stroke:"currentColor",strokeWidth:"1.5"})]}),E6=e=>m("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:m("path",{clipRule:"evenodd",d:"M1 5.25V6H2.5V5.25V2.5H5.25H6V1H5.25H2C1.44772 1 1 1.44772 1 2V5.25ZM5.25 14.9994H6V13.4994H5.25H2.5V10.7494V9.99939H1V10.7494V13.9994C1 14.5517 1.44772 14.9994 2 14.9994H5.25ZM15 10V10.75V14C15 14.5523 14.5523 15 14 15H10.75H10V13.5H10.75H13.5V10.75V10H15ZM10.75 1H10V2.5H10.75H13.5V5.25V6H15V5.25V2C15 1.44772 14.5523 1 14 1H10.75Z",fill:"currentColor",fillRule:"evenodd"})}),_6=e=>m("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:m("path",{clipRule:"evenodd",d:"M13.5 8C13.5 4.96643 11.0257 2.5 7.96452 2.5C5.42843 2.5 3.29365 4.19393 2.63724 6.5H5.25H6V8H5.25H0.75C0.335787 8 0 7.66421 0 7.25V2.75V2H1.5V2.75V5.23347C2.57851 2.74164 5.06835 1 7.96452 1C11.8461 1 15 4.13001 15 8C15 11.87 11.8461 15 7.96452 15C5.62368 15 3.54872 13.8617 2.27046 12.1122L1.828 11.5066L3.03915 10.6217L3.48161 11.2273C4.48831 12.6051 6.12055 13.5 7.96452 13.5C11.0257 13.5 13.5 11.0336 13.5 8Z",fill:"currentColor",fillRule:"evenodd"})}),th=e=>m("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:m("path",{clipRule:"evenodd",d:"M12.4697 13.5303L13 14.0607L14.0607 13L13.5303 12.4697L9.06065 7.99999L13.5303 3.53032L14.0607 2.99999L13 1.93933L12.4697 2.46966L7.99999 6.93933L3.53032 2.46966L2.99999 1.93933L1.93933 2.99999L2.46966 3.53032L6.93933 7.99999L2.46966 12.4697L1.93933 13L2.99999 14.0607L3.53032 13.5303L7.99999 9.06065L12.4697 13.5303Z",fill:"currentColor",fillRule:"evenodd"})}),sl=e=>m("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:m("path",{clipRule:"evenodd",d:"M13.5 10.25V13.25C13.5 13.3881 13.3881 13.5 13.25 13.5H2.75C2.61193 13.5 2.5 13.3881 2.5 13.25L2.5 2.75C2.5 2.61193 2.61193 2.5 2.75 2.5H5.75H6.5V1H5.75H2.75C1.7835 1 1 1.7835 1 2.75V13.25C1 14.2165 1.7835 15 2.75 15H13.25C14.2165 15 15 14.2165 15 13.25V10.25V9.5H13.5V10.25ZM9 1H9.75H14.2495C14.6637 1 14.9995 1.33579 14.9995 1.75V6.25V7H13.4995V6.25V3.56066L8.53033 8.52978L8 9.06011L6.93934 7.99945L7.46967 7.46912L12.4388 2.5H9.75H9V1Z",fill:"currentColor",fillRule:"evenodd"})}),T6=e=>m("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:m("path",{clipRule:"evenodd",d:"M1.5 6.5C1.5 3.73858 3.73858 1.5 6.5 1.5C9.26142 1.5 11.5 3.73858 11.5 6.5C11.5 9.26142 9.26142 11.5 6.5 11.5C3.73858 11.5 1.5 9.26142 1.5 6.5ZM6.5 0C2.91015 0 0 2.91015 0 6.5C0 10.0899 2.91015 13 6.5 13C8.02469 13 9.42677 12.475 10.5353 11.596L13.9697 15.0303L14.5 15.5607L15.5607 14.5L15.0303 13.9697L11.596 10.5353C12.475 9.42677 13 8.02469 13 6.5C13 2.91015 10.0899 0 6.5 0ZM4.125 5.875H4.75H5.875V4.75V4.125H7.125V4.75V5.875H8.25H8.875V7.125H8.25H7.125V8.25V8.875H5.875V8.25V7.125H4.75H4.125V5.875Z",fill:"currentColor",fillRule:"evenodd"})}),k6=e=>m("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:m("path",{clipRule:"evenodd",d:"M1.5 6.5C1.5 3.73858 3.73858 1.5 6.5 1.5C9.26142 1.5 11.5 3.73858 11.5 6.5C11.5 9.26142 9.26142 11.5 6.5 11.5C3.73858 11.5 1.5 9.26142 1.5 6.5ZM6.5 0C2.91015 0 0 2.91015 0 6.5C0 10.0899 2.91015 13 6.5 13C8.02469 13 9.42677 12.475 10.5353 11.596L13.9697 15.0303L14.5 15.5607L15.5607 14.5L15.0303 13.9697L11.596 10.5353C12.475 9.42677 13 8.02469 13 6.5C13 2.91015 10.0899 0 6.5 0ZM4.125 5.875H4.75H8.25H8.875V7.125H8.25H4.75H4.125V5.875Z",fill:"currentColor",fillRule:"evenodd"})}),ol=({onCopy:e,onError:t,timeout:n=2e3,children:r,className:i,code:a,...s})=>{let[o,u]=he(!1),c=Ce(0),{code:h}=eh(),{isAnimating:d}=it(ut),f=a??h,p=async()=>{var k;if(typeof window>"u"||!((k=navigator?.clipboard)!=null&&k.writeText)){t?.(new Error("Clipboard API not available"));return}try{o||(await navigator.clipboard.writeText(f),u(!0),e?.(),c.current=window.setTimeout(()=>u(!1),n))}catch(C){t?.(C)}};be(()=>()=>{window.clearTimeout(c.current)},[]);let g=o?qs:Ws;return m("button",{className:Z("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",i),"data-streamdown":"code-block-copy-button",disabled:d,onClick:p,title:"Copy Code",type:"button",...s,children:r??m(g,{size:14})})},ul={"1c":"1c","1c-query":"1cq",abap:"abap","actionscript-3":"as",ada:"ada",adoc:"adoc","angular-html":"html","angular-ts":"ts",apache:"conf",apex:"cls",apl:"apl",applescript:"applescript",ara:"ara",asciidoc:"adoc",asm:"asm",astro:"astro",awk:"awk",ballerina:"bal",bash:"sh",bat:"bat",batch:"bat",be:"be",beancount:"beancount",berry:"berry",bibtex:"bib",bicep:"bicep",blade:"blade.php",bsl:"bsl",c:"c","c#":"cs","c++":"cpp",cadence:"cdc",cairo:"cairo",cdc:"cdc",clarity:"clar",clj:"clj",clojure:"clj","closure-templates":"soy",cmake:"cmake",cmd:"cmd",cobol:"cob",codeowners:"CODEOWNERS",codeql:"ql",coffee:"coffee",coffeescript:"coffee","common-lisp":"lisp",console:"sh",coq:"v",cpp:"cpp",cql:"cql",crystal:"cr",cs:"cs",csharp:"cs",css:"css",csv:"csv",cue:"cue",cypher:"cql",d:"d",dart:"dart",dax:"dax",desktop:"desktop",diff:"diff",docker:"dockerfile",dockerfile:"dockerfile",dotenv:"env","dream-maker":"dm",edge:"edge",elisp:"el",elixir:"ex",elm:"elm","emacs-lisp":"el",erb:"erb",erl:"erl",erlang:"erl",f:"f","f#":"fs",f03:"f03",f08:"f08",f18:"f18",f77:"f77",f90:"f90",f95:"f95",fennel:"fnl",fish:"fish",fluent:"ftl",for:"for","fortran-fixed-form":"f","fortran-free-form":"f90",fs:"fs",fsharp:"fs",fsl:"fsl",ftl:"ftl",gdresource:"tres",gdscript:"gd",gdshader:"gdshader",genie:"gs",gherkin:"feature","git-commit":"gitcommit","git-rebase":"gitrebase",gjs:"js",gleam:"gleam","glimmer-js":"js","glimmer-ts":"ts",glsl:"glsl",gnuplot:"plt",go:"go",gql:"gql",graphql:"graphql",groovy:"groovy",gts:"gts",hack:"hack",haml:"haml",handlebars:"hbs",haskell:"hs",haxe:"hx",hbs:"hbs",hcl:"hcl",hjson:"hjson",hlsl:"hlsl",hs:"hs",html:"html","html-derivative":"html",http:"http",hxml:"hxml",hy:"hy",imba:"imba",ini:"ini",jade:"jade",java:"java",javascript:"js",jinja:"jinja",jison:"jison",jl:"jl",js:"js",json:"json",json5:"json5",jsonc:"jsonc",jsonl:"jsonl",jsonnet:"jsonnet",jssm:"jssm",jsx:"jsx",julia:"jl",kotlin:"kt",kql:"kql",kt:"kt",kts:"kts",kusto:"kql",latex:"tex",lean:"lean",lean4:"lean",less:"less",liquid:"liquid",lisp:"lisp",lit:"lit",llvm:"ll",log:"log",logo:"logo",lua:"lua",luau:"luau",make:"mak",makefile:"mak",markdown:"md",marko:"marko",matlab:"m",md:"md",mdc:"mdc",mdx:"mdx",mediawiki:"wiki",mermaid:"mmd",mips:"s",mipsasm:"s",mmd:"mmd",mojo:"mojo",move:"move",nar:"nar",narrat:"narrat",nextflow:"nf",nf:"nf",nginx:"conf",nim:"nim",nix:"nix",nu:"nu",nushell:"nu",objc:"m","objective-c":"m","objective-cpp":"mm",ocaml:"ml",pascal:"pas",perl:"pl",perl6:"p6",php:"php",plsql:"pls",po:"po",polar:"polar",postcss:"pcss",pot:"pot",potx:"potx",powerquery:"pq",powershell:"ps1",prisma:"prisma",prolog:"pl",properties:"properties",proto:"proto",protobuf:"proto",ps:"ps",ps1:"ps1",pug:"pug",puppet:"pp",purescript:"purs",py:"py",python:"py",ql:"ql",qml:"qml",qmldir:"qmldir",qss:"qss",r:"r",racket:"rkt",raku:"raku",razor:"cshtml",rb:"rb",reg:"reg",regex:"regex",regexp:"regexp",rel:"rel",riscv:"s",rs:"rs",rst:"rst",ruby:"rb",rust:"rs",sas:"sas",sass:"sass",scala:"scala",scheme:"scm",scss:"scss",sdbl:"sdbl",sh:"sh",shader:"shader",shaderlab:"shader",shell:"sh",shellscript:"sh",shellsession:"sh",smalltalk:"st",solidity:"sol",soy:"soy",sparql:"rq",spl:"spl",splunk:"spl",sql:"sql","ssh-config":"config",stata:"do",styl:"styl",stylus:"styl",svelte:"svelte",swift:"swift","system-verilog":"sv",systemd:"service",talon:"talon",talonscript:"talon",tasl:"tasl",tcl:"tcl",templ:"templ",terraform:"tf",tex:"tex",tf:"tf",tfvars:"tfvars",toml:"toml",ts:"ts","ts-tags":"ts",tsp:"tsp",tsv:"tsv",tsx:"tsx",turtle:"ttl",twig:"twig",typ:"typ",typescript:"ts",typespec:"tsp",typst:"typ",v:"v",vala:"vala",vb:"vb",verilog:"v",vhdl:"vhdl",vim:"vim",viml:"vim",vimscript:"vim",vue:"vue","vue-html":"html","vue-vine":"vine",vy:"vy",vyper:"vy",wasm:"wasm",wenyan:"wy",wgsl:"wgsl",wiki:"wiki",wikitext:"wiki",wit:"wit",wl:"wl",wolfram:"wl",xml:"xml",xsl:"xsl",yaml:"yaml",yml:"yml",zenscript:"zs",zig:"zig",zsh:"zsh",文言:"wy"},y6=({onDownload:e,onError:t,language:n,children:r,className:i,code:a,...s})=>{let{code:o}=eh(),{isAnimating:u}=it(ut),c=a??o,h=`file.${n&&n in ul?ul[n]:"txt"}`,d="text/plain",f=()=>{try{yn(h,c,d),e?.()}catch(p){t?.(p)}};return m("button",{className:Z("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",i),"data-streamdown":"code-block-download-button",disabled:u,onClick:f,title:"Download file",type:"button",...s,children:r??m($i,{size:14})})},x6=()=>m("div",{className:"w-full divide-y divide-border overflow-hidden rounded-xl border border-border",children:[m("div",{className:"h-[46px] w-full bg-muted/80"}),m("div",{className:"flex w-full items-center justify-center p-4",children:m(b6,{className:"size-4 animate-spin"})})]}),w6=/\.[^/.]+$/,A6=({node:e,className:t,src:n,alt:r,onLoad:i,onError:a,...s})=>{let o=Ce(null),[u,c]=he(!1),[h,d]=he(!1),f=s.width!=null||s.height!=null,p=(u||f)&&!h,g=h&&!f;be(()=>{let A=o.current;if(A!=null&&A.complete){let x=A.naturalWidth>0;c(x),d(!x)}},[]);let k=Ge(A=>{c(!0),d(!1),i?.(A)},[i]),C=Ge(A=>{c(!1),d(!0),a?.(A)},[a]),w=async()=>{if(n)try{let A=await(await fetch(n)).blob(),x=new URL(n,window.location.origin).pathname.split("/").pop()||"",L=x.split(".").pop(),P=x.includes(".")&&L!==void 0&&L.length<=4,v="";if(P)v=x;else{let V=A.type,O="png";V.includes("jpeg")||V.includes("jpg")?O="jpg":V.includes("png")?O="png":V.includes("svg")?O="svg":V.includes("gif")?O="gif":V.includes("webp")&&(O="webp"),v=`${(r||x||"image").replace(w6,"")}.${O}`}yn(v,A,A.type)}catch{window.open(n,"_blank")}};return n?m("div",{className:"group relative my-4 inline-block","data-streamdown":"image-wrapper",children:[m("img",{alt:r,className:Z("max-w-full rounded-lg",g&&"hidden",t),"data-streamdown":"image",onError:C,onLoad:k,ref:o,src:n,...s}),g&&m("span",{className:"text-muted-foreground text-xs italic","data-streamdown":"image-fallback",children:"Image not available"}),m("div",{className:"pointer-events-none absolute inset-0 hidden rounded-lg bg-black/10 group-hover:block"}),p&&m("button",{className:Z("absolute right-2 bottom-2 flex h-8 w-8 cursor-pointer items-center justify-center rounded-md border border-border bg-background/90 shadow-sm backdrop-blur-sm transition-all duration-200 hover:bg-background","opacity-0 group-hover:opacity-100"),onClick:w,title:"Download image",type:"button",children:m($i,{size:14})})]}):null},lr=0,C6=()=>{lr+=1,lr===1&&(document.body.style.overflow="hidden")},v6=()=>{lr=Math.max(0,lr-1),lr===0&&(document.body.style.overflow="")},S6=({url:e,isOpen:t,onClose:n,onConfirm:r})=>{let[i,a]=he(!1),s=Ge(async()=>{try{await navigator.clipboard.writeText(e),a(!0),setTimeout(()=>a(!1),2e3)}catch{}},[e]),o=Ge(()=>{r(),n()},[r,n]);return be(()=>{if(t){C6();let u=c=>{c.key==="Escape"&&n()};return document.addEventListener("keydown",u),()=>{document.removeEventListener("keydown",u),v6()}}},[t,n]),t?m("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-background/50 backdrop-blur-sm","data-streamdown":"link-safety-modal",onClick:n,onKeyDown:u=>{u.key==="Escape"&&n()},role:"button",tabIndex:0,children:m("div",{className:"relative mx-4 flex w-full max-w-md flex-col gap-4 rounded-xl border bg-background p-6 shadow-lg",onClick:u=>u.stopPropagation(),onKeyDown:u=>u.stopPropagation(),role:"presentation",children:[m("button",{className:"absolute top-4 right-4 rounded-md p-1 text-muted-foreground transition-all hover:bg-muted hover:text-foreground",onClick:n,title:"Close",type:"button",children:m(th,{size:16})}),m("div",{className:"flex flex-col gap-2",children:[m("div",{className:"flex items-center gap-2 font-semibold text-lg",children:[m(sl,{size:20}),m("span",{children:"Open external link?"})]}),m("p",{className:"text-muted-foreground text-sm",children:"You're about to visit an external website."})]}),m("div",{className:Z("break-all rounded-md bg-muted p-3 font-mono text-sm",e.length>100&&"max-h-32 overflow-y-auto"),children:e}),m("div",{className:"flex gap-2",children:[m("button",{className:"flex flex-1 items-center justify-center gap-2 rounded-md border bg-background px-4 py-2 font-medium text-sm transition-all hover:bg-muted",onClick:s,type:"button",children:i?m(pe,{children:[m(qs,{size:14}),m("span",{children:"Copied"})]}):m(pe,{children:[m(Ws,{size:14}),m("span",{children:"Copy link"})]})}),m("button",{className:"flex flex-1 items-center justify-center gap-2 rounded-md bg-primary px-4 py-2 font-medium text-primary-foreground text-sm transition-all hover:bg-primary/90",onClick:o,type:"button",children:[m(sl,{size:14}),m("span",{children:"Open link"})]})]})]})}):null},Ka=yi(null),nh=()=>it(Ka),Pw=()=>{var e;let t=nh();return(e=t?.code)!=null?e:null},Gs=()=>{var e;let t=nh();return(e=t?.mermaid)!=null?e:null},I6=(e,t)=>{var n;let r=(n=void 0)!=null?n:5;return new Promise((i,a)=>{let s="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(e))),o=new Image;o.crossOrigin="anonymous",o.onload=()=>{let u=document.createElement("canvas"),c=o.width*r,h=o.height*r;u.width=c,u.height=h;let d=u.getContext("2d");if(!d){a(new Error("Failed to create 2D canvas context for PNG export"));return}d.drawImage(o,0,0,c,h),u.toBlob(f=>{if(!f){a(new Error("Failed to create PNG blob"));return}i(f)},"image/png")},o.onerror=()=>a(new Error("Failed to load SVG image")),o.src=s})},N6=({chart:e,children:t,className:n,onDownload:r,config:i,onError:a})=>{let[s,o]=he(!1),u=Ce(null),{isAnimating:c}=it(ut),h=Gs(),d=async f=>{try{if(f==="mmd"){yn("diagram.mmd",e,"text/plain"),o(!1),r?.(f);return}if(!h){a?.(new Error("Mermaid plugin not available"));return}let p=h.getMermaid(i),g=e.split("").reduce((w,A)=>(w<<5)-w+A.charCodeAt(0)|0,0),k=`mermaid-${Math.abs(g)}-${Date.now()}-${Math.random().toString(36).substring(2,9)}`,{svg:C}=await p.render(k,e);if(!C){a?.(new Error("SVG not found. Please wait for the diagram to render."));return}if(f==="svg"){yn("diagram.svg",C,"image/svg+xml"),o(!1),r?.(f);return}if(f==="png"){let w=await I6(C);yn("diagram.png",w,"image/png"),r?.(f),o(!1);return}}catch(p){a?.(p)}};return be(()=>{let f=p=>{let g=p.composedPath();u.current&&!g.includes(u.current)&&o(!1)};return document.addEventListener("mousedown",f),()=>{document.removeEventListener("mousedown",f)}},[]),m("div",{className:"relative",ref:u,children:[m("button",{className:Z("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",n),disabled:c,onClick:()=>o(!s),title:"Download diagram",type:"button",children:t??m($i,{size:14})}),s?m("div",{className:"absolute top-full right-0 z-10 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg",children:[m("button",{className:"w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40",onClick:()=>d("svg"),title:"Download diagram as SVG",type:"button",children:"SVG"}),m("button",{className:"w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40",onClick:()=>d("png"),title:"Download diagram as PNG",type:"button",children:"PNG"}),m("button",{className:"w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40",onClick:()=>d("mmd"),title:"Download diagram as MMD",type:"button",children:"MMD"})]}):null]})},cr=0,L6=()=>{cr+=1,cr===1&&(document.body.style.overflow="hidden")},R6=()=>{cr=Math.max(0,cr-1),cr===0&&(document.body.style.overflow="")},O6=({chart:e,config:t,onFullscreen:n,onExit:r,className:i,...a})=>{let[s,o]=he(!1),{isAnimating:u,controls:c}=it(ut),h=(()=>{if(typeof c=="boolean")return c;let f=c.mermaid;return f===!1?!1:f===!0||f===void 0?!0:f.panZoom!==!1})(),d=()=>{o(!s)};return be(()=>{if(s){L6();let f=p=>{p.key==="Escape"&&o(!1)};return document.addEventListener("keydown",f),()=>{document.removeEventListener("keydown",f),R6()}}},[s]),be(()=>{s?n?.():r&&r()},[s,n,r]),m(pe,{children:[m("button",{className:Z("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",i),disabled:u,onClick:d,title:"View fullscreen",type:"button",...a,children:m(E6,{size:14})}),s?kc(m("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-background/95 backdrop-blur-sm",onClick:d,onKeyDown:f=>{f.key==="Escape"&&d()},role:"button",tabIndex:0,children:[m("button",{className:"absolute top-4 right-4 z-10 rounded-md p-2 text-muted-foreground transition-all hover:bg-muted hover:text-foreground",onClick:d,title:"Exit fullscreen",type:"button",children:m(th,{size:20})}),m("div",{className:"flex size-full items-center justify-center p-4",onClick:f=>f.stopPropagation(),onKeyDown:f=>f.stopPropagation(),role:"presentation",children:m(T5,{chart:e,className:"size-full [&_svg]:h-auto [&_svg]:w-auto",config:t,fullscreen:!0,showControls:h})})]}),document.body):null]})},rh=e=>{var t,n;let r=[],i=[],a=e.querySelectorAll("thead th");for(let o of a)r.push(((t=o.textContent)==null?void 0:t.trim())||"");let s=e.querySelectorAll("tbody tr");for(let o of s){let u=[],c=o.querySelectorAll("td");for(let h of c)u.push(((n=h.textContent)==null?void 0:n.trim())||"");i.push(u)}return{headers:r,rows:i}},ih=e=>{let{headers:t,rows:n}=e,r=o=>{let u=!1,c=!1;for(let h of o){if(h==='"'){u=!0,c=!0;break}(h===","||h===`
|
|
111
111
|
`)&&(u=!0)}return u?c?`"${o.replace(/"/g,'""')}"`:`"${o}"`:o},i=t.length>0?n.length+1:n.length,a=new Array(i),s=0;t.length>0&&(a[s]=t.map(r).join(","),s+=1);for(let o of n)a[s]=o.map(r).join(","),s+=1;return a.join(`
|
|
112
112
|
`)},D6=e=>{let{headers:t,rows:n}=e,r=o=>{let u=!1;for(let h of o)if(h===" "||h===`
|
|
113
113
|
`||h==="\r"){u=!0;break}if(!u)return o;let c=[];for(let h of o)h===" "?c.push("\\t"):h===`
|
|
114
114
|
`?c.push("\\n"):h==="\r"?c.push("\\r"):c.push(h);return c.join("")},i=t.length>0?n.length+1:n.length,a=new Array(i),s=0;t.length>0&&(a[s]=t.map(r).join(" "),s+=1);for(let o of n)a[s]=o.map(r).join(" "),s+=1;return a.join(`
|
|
115
115
|
`)},ga=e=>{let t=!1;for(let r of e)if(r==="\\"||r==="|"){t=!0;break}if(!t)return e;let n=[];for(let r of e)r==="\\"?n.push("\\\\"):r==="|"?n.push("\\|"):n.push(r);return n.join("")},Qa=e=>{let{headers:t,rows:n}=e;if(t.length===0)return"";let r=new Array(n.length+2),i=0,a=t.map(o=>ga(o));r[i]=`| ${a.join(" | ")} |`,i+=1;let s=new Array(t.length);for(let o=0;o<t.length;o+=1)s[o]="---";r[i]=`| ${s.join(" | ")} |`,i+=1;for(let o of n)if(o.length<t.length){let u=new Array(t.length);for(let c=0;c<t.length;c+=1)u[c]=c<o.length?ga(o[c]):"";r[i]=`| ${u.join(" | ")} |`,i+=1}else{let u=o.map(c=>ga(c));r[i]=`| ${u.join(" | ")} |`,i+=1}return r.join(`
|
|
116
|
-
`)},P6=({children:e,className:t,onCopy:n,onError:r,timeout:i=2e3})=>{let[a,s]=he(!1),[o,u]=he(!1),c=Ce(null),h=Ce(0),{isAnimating:d}=it(ut),f=async g=>{var k,C;if(typeof window>"u"||!((k=navigator?.clipboard)!=null&&k.write)){r?.(new Error("Clipboard API not available"));return}try{let w=(C=c.current)==null?void 0:C.closest('[data-streamdown="table-wrapper"]'),A=w?.querySelector("table");if(!A){r?.(new Error("Table not found"));return}let x=rh(A),L=({csv:ih,tsv:D6,md:Qa}[g]||Qa)(x),P=new ClipboardItem({"text/plain":new Blob([L],{type:"text/plain"}),"text/html":new Blob([A.outerHTML],{type:"text/html"})});await navigator.clipboard.write([P]),u(!0),s(!1),n?.(g),h.current=window.setTimeout(()=>u(!1),i)}catch(w){r?.(w)}};be(()=>{let g=k=>{let C=k.composedPath();c.current&&!C.includes(c.current)&&s(!1)};return document.addEventListener("mousedown",g),()=>{document.removeEventListener("mousedown",g),window.clearTimeout(h.current)}},[]);let p=o?qs:Ws;return m("div",{className:"relative",ref:c,children:[m("button",{className:Z("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",t),disabled:d,onClick:()=>s(!a),title:"Copy table",type:"button",children:e??m(p,{size:14})}),a?m("div",{className:"absolute top-full right-0 z-10 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg",children:[m("button",{className:"w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40",onClick:()=>f("md"),title:"Copy table as Markdown",type:"button",children:"Markdown"}),m("button",{className:"w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40",onClick:()=>f("csv"),title:"Copy table as CSV",type:"button",children:"CSV"}),m("button",{className:"w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40",onClick:()=>f("tsv"),title:"Copy table as TSV",type:"button",children:"TSV"})]}):null]})},M6=({children:e,className:t,onDownload:n,onError:r})=>{let[i,a]=he(!1),s=Ce(null),{isAnimating:o}=it(ut),u=c=>{var h;try{let d=(h=s.current)==null?void 0:h.closest('[data-streamdown="table-wrapper"]'),f=d?.querySelector("table");if(!f){r?.(new Error("Table not found"));return}let p=rh(f),g=c==="csv"?ih(p):Qa(p);yn(`table.${c==="csv"?"csv":"md"}`,g,c==="csv"?"text/csv":"text/markdown"),a(!1),n?.(c)}catch(d){r?.(d)}};return be(()=>{let c=h=>{let d=h.composedPath();s.current&&!d.includes(s.current)&&a(!1)};return document.addEventListener("mousedown",c),()=>{document.removeEventListener("mousedown",c)}},[]),m("div",{className:"relative",ref:s,children:[m("button",{className:Z("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",t),disabled:o,onClick:()=>a(!i),title:"Download table",type:"button",children:e??m($i,{size:14})}),i?m("div",{className:"absolute top-full right-0 z-10 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg",children:[m("button",{className:"w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40",onClick:()=>u("csv"),title:"Download table as CSV",type:"button",children:"CSV"}),m("button",{className:"w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40",onClick:()=>u("markdown"),title:"Download table as Markdown",type:"button",children:"Markdown"})]}):null]})},B6=({children:e,className:t,showControls:n,...r})=>m("div",{className:"my-4 flex flex-col gap-2 rounded-lg border border-border bg-sidebar p-2","data-streamdown":"table-wrapper",children:[n?m("div",{className:"flex items-center justify-end gap-1",children:[m(P6,{}),m(M6,{})]}):null,m("div",{className:"border-collapse overflow-x-auto overscroll-y-auto rounded-md border border-border bg-background",children:m("table",{className:Z("w-full divide-y divide-border",t),"data-streamdown":"table",...r,children:e})})]}),F6=Tc(()=>gc(()=>import("./mermaid-3ZIDBTTL-848de26a.js"),[],import.meta.url).then(e=>({default:e.Mermaid}))),H6=/language-([^\s]+)/;function Yi(e,t){if(!(e!=null&&e.position||t!=null&&t.position))return!0;if(!(e!=null&&e.position&&t!=null&&t.position))return!1;let n=e.position.start,r=t.position.start,i=e.position.end,a=t.position.end;return n?.line===r?.line&&n?.column===r?.column&&i?.line===a?.line&&i?.column===a?.column}function Ne(e,t){return e.className===t.className&&Yi(e.node,t.node)}var Xa=(e,t)=>typeof e=="boolean"?e:e[t]!==!1,$r=(e,t)=>{if(typeof e=="boolean")return e;let n=e.mermaid;return n===!1?!1:n===!0||n===void 0?!0:n[t]!==!1},Ks=_e(({children:e,className:t,node:n,...r})=>m("ol",{className:Z("list-inside list-decimal whitespace-normal [li_&]:pl-6",t),"data-streamdown":"ordered-list",...r,children:e}),(e,t)=>Ne(e,t));Ks.displayName="MarkdownOl";var ah=_e(({children:e,className:t,node:n,...r})=>m("li",{className:Z("py-1 [&>p]:inline",t),"data-streamdown":"list-item",...r,children:e}),(e,t)=>e.className===t.className&&Yi(e.node,t.node));ah.displayName="MarkdownLi";var sh=_e(({children:e,className:t,node:n,...r})=>m("ul",{className:Z("list-inside list-disc whitespace-normal [li_&]:pl-6",t),"data-streamdown":"unordered-list",...r,children:e}),(e,t)=>Ne(e,t));sh.displayName="MarkdownUl";var oh=_e(({className:e,node:t,...n})=>m("hr",{className:Z("my-6 border-border",e),"data-streamdown":"horizontal-rule",...n}),(e,t)=>Ne(e,t));oh.displayName="MarkdownHr";var uh=_e(({children:e,className:t,node:n,...r})=>m("span",{className:Z("font-semibold",t),"data-streamdown":"strong",...r,children:e}),(e,t)=>Ne(e,t));uh.displayName="MarkdownStrong";var U6=({children:e,className:t,href:n,node:r,...i})=>{let{linkSafety:a}=it(ut),[s,o]=he(!1),u=n==="streamdown:incomplete-link",c=Ge(async p=>{if(!(!(a!=null&&a.enabled&&n)||u)){if(p.preventDefault(),a.onLinkCheck&&await a.onLinkCheck(n)){window.open(n,"_blank","noreferrer");return}o(!0)}},[a,n,u]),h=Ge(()=>{n&&window.open(n,"_blank","noreferrer")},[n]),d=Ge(()=>{o(!1)},[]),f={url:n??"",isOpen:s,onClose:d,onConfirm:h};return a!=null&&a.enabled&&n?m(pe,{children:[m("button",{className:Z("wrap-anywhere appearance-none text-left font-medium text-primary underline",t),"data-incomplete":u,"data-streamdown":"link",onClick:c,type:"button",children:e}),a.renderModal?a.renderModal(f):m(S6,{...f})]}):m("a",{className:Z("wrap-anywhere font-medium text-primary underline",t),"data-incomplete":u,"data-streamdown":"link",href:n,rel:"noreferrer",target:"_blank",...i,children:e})},lh=_e(U6,(e,t)=>Ne(e,t)&&e.href===t.href);lh.displayName="MarkdownA";var ch=_e(({children:e,className:t,node:n,...r})=>m("h1",{className:Z("mt-6 mb-2 font-semibold text-3xl",t),"data-streamdown":"heading-1",...r,children:e}),(e,t)=>Ne(e,t));ch.displayName="MarkdownH1";var dh=_e(({children:e,className:t,node:n,...r})=>m("h2",{className:Z("mt-6 mb-2 font-semibold text-2xl",t),"data-streamdown":"heading-2",...r,children:e}),(e,t)=>Ne(e,t));dh.displayName="MarkdownH2";var hh=_e(({children:e,className:t,node:n,...r})=>m("h3",{className:Z("mt-6 mb-2 font-semibold text-xl",t),"data-streamdown":"heading-3",...r,children:e}),(e,t)=>Ne(e,t));hh.displayName="MarkdownH3";var fh=_e(({children:e,className:t,node:n,...r})=>m("h4",{className:Z("mt-6 mb-2 font-semibold text-lg",t),"data-streamdown":"heading-4",...r,children:e}),(e,t)=>Ne(e,t));fh.displayName="MarkdownH4";var ph=_e(({children:e,className:t,node:n,...r})=>m("h5",{className:Z("mt-6 mb-2 font-semibold text-base",t),"data-streamdown":"heading-5",...r,children:e}),(e,t)=>Ne(e,t));ph.displayName="MarkdownH5";var mh=_e(({children:e,className:t,node:n,...r})=>m("h6",{className:Z("mt-6 mb-2 font-semibold text-sm",t),"data-streamdown":"heading-6",...r,children:e}),(e,t)=>Ne(e,t));mh.displayName="MarkdownH6";var gh=_e(({children:e,className:t,node:n,...r})=>{let{controls:i}=it(ut),a=Xa(i,"table");return m(B6,{className:t,showControls:a,...r,children:e})},(e,t)=>Ne(e,t));gh.displayName="MarkdownTable";var bh=_e(({children:e,className:t,node:n,...r})=>m("thead",{className:Z("bg-muted/80",t),"data-streamdown":"table-header",...r,children:e}),(e,t)=>Ne(e,t));bh.displayName="MarkdownThead";var Eh=_e(({children:e,className:t,node:n,...r})=>m("tbody",{className:Z("divide-y divide-border",t),"data-streamdown":"table-body",...r,children:e}),(e,t)=>Ne(e,t));Eh.displayName="MarkdownTbody";var _h=_e(({children:e,className:t,node:n,...r})=>m("tr",{className:Z("border-border",t),"data-streamdown":"table-row",...r,children:e}),(e,t)=>Ne(e,t));_h.displayName="MarkdownTr";var Th=_e(({children:e,className:t,node:n,...r})=>m("th",{className:Z("whitespace-nowrap px-4 py-2 text-left font-semibold text-sm",t),"data-streamdown":"table-header-cell",...r,children:e}),(e,t)=>Ne(e,t));Th.displayName="MarkdownTh";var kh=_e(({children:e,className:t,node:n,...r})=>m("td",{className:Z("px-4 py-2 text-sm",t),"data-streamdown":"table-cell",...r,children:e}),(e,t)=>Ne(e,t));kh.displayName="MarkdownTd";var yh=_e(({children:e,className:t,node:n,...r})=>m("blockquote",{className:Z("my-4 border-muted-foreground/30 border-l-4 pl-4 text-muted-foreground italic",t),"data-streamdown":"blockquote",...r,children:e}),(e,t)=>Ne(e,t));yh.displayName="MarkdownBlockquote";var xh=_e(({children:e,className:t,node:n,...r})=>m("sup",{className:Z("text-sm",t),"data-streamdown":"superscript",...r,children:e}),(e,t)=>Ne(e,t));xh.displayName="MarkdownSup";var wh=_e(({children:e,className:t,node:n,...r})=>m("sub",{className:Z("text-sm",t),"data-streamdown":"subscript",...r,children:e}),(e,t)=>Ne(e,t));wh.displayName="MarkdownSub";var Ah=_e(({children:e,className:t,node:n,...r})=>{if("data-footnotes"in r){let i=s=>{var o,u;if(!Ht(s))return!1;let c=Array.isArray(s.props.children)?s.props.children:[s.props.children],h=!1,d=!1;for(let f of c)if(f){if(typeof f=="string")f.trim()!==""&&(h=!0);else if(Ht(f))if(((o=f.props)==null?void 0:o["data-footnote-backref"])!==void 0)d=!0;else{let p=Array.isArray(f.props.children)?f.props.children:[f.props.children];for(let g of p){if(typeof g=="string"&&g.trim()!==""){h=!0;break}if(Ht(g)&&((u=g.props)==null?void 0:u["data-footnote-backref"])===void 0){h=!0;break}}}}return d&&!h},a=Array.isArray(e)?e.map(s=>{if(!Ht(s))return s;if(s.type===Ks){let o=(Array.isArray(s.props.children)?s.props.children:[s.props.children]).filter(u=>!i(u));return o.length===0?null:{...s,props:{...s.props,children:o}}}return s}):e;return(Array.isArray(a)?a.some(s=>s!==null):a!==null)?m("section",{className:t,...r,children:a}):null}return m("section",{className:t,...r,children:e})},(e,t)=>Ne(e,t));Ah.displayName="MarkdownSection";var z6=({node:e,className:t,children:n,...r})=>{var i;let a=!("data-block"in r),{mermaid:s,controls:o}=it(ut),u=Gs(),c=u6();if(a)return m("code",{className:Z("rounded bg-muted px-1.5 py-0.5 font-mono text-sm",t),"data-streamdown":"inline-code",...r,children:n});let h=t?.match(H6),d=(i=h?.at(1))!=null?i:"",f="";if(Ht(n)&&n.props&&typeof n.props=="object"&&"children"in n.props&&typeof n.props.children=="string"?f=n.props.children:typeof n=="string"&&(f=n),d==="mermaid"&&u){let g=Xa(o,"mermaid"),k=$r(o,"download"),C=$r(o,"copy"),w=$r(o,"fullscreen"),A=$r(o,"panZoom"),x=g&&(k||C||w);return m(Jn,{fallback:m(x6,{}),children:m("div",{className:Z("group relative my-4 flex w-full flex-col gap-2 rounded-xl border border-border bg-sidebar p-2",t),"data-streamdown":"mermaid-block",children:[m("div",{className:"flex h-8 items-center text-muted-foreground text-xs",children:m("span",{className:"ml-1 font-mono lowercase",children:"mermaid"})}),x?m("div",{className:"pointer-events-none sticky top-2 z-10 -mt-10 flex h-8 items-center justify-end",children:m("div",{className:"pointer-events-auto flex shrink-0 items-center gap-2 rounded-md border border-sidebar bg-sidebar/80 px-1.5 py-1 supports-[backdrop-filter]:bg-sidebar/70 supports-[backdrop-filter]:backdrop-blur","data-streamdown":"mermaid-block-actions",children:[k?m(N6,{chart:f,config:s?.config}):null,C?m(ol,{code:f}):null,w?m(O6,{chart:f,config:s?.config}):null]})}):null,m("div",{className:"rounded-md border border-border bg-background",children:m(F6,{chart:f,config:s?.config,showControls:A})})]})})}let p=Xa(o,"code");return m(g6,{className:t,code:f,isIncomplete:c,language:d,children:p?m(pe,{children:[m(y6,{code:f,language:d}),m(ol,{})]}):null})},Ch=_e(z6,(e,t)=>e.className===t.className&&Yi(e.node,t.node));Ch.displayName="MarkdownCode";var vh=_e(A6,(e,t)=>e.className===t.className&&Yi(e.node,t.node));vh.displayName="MarkdownImg";var Sh=_e(({children:e,node:t,...n})=>{let r=(Array.isArray(e)?e:[e]).filter(i=>i!=null&&i!=="");if(r.length===1&&Ht(r[0])){let i=r[0].props.node,a=i?.tagName;if(a==="img")return m(pe,{children:e});if(a==="code"&&"data-block"in r[0].props)return m(pe,{children:e})}return m("p",{...n,children:e})},(e,t)=>Ne(e,t));Sh.displayName="MarkdownParagraph";var $6={ol:Ks,li:ah,ul:sh,hr:oh,strong:uh,a:lh,h1:ch,h2:dh,h3:hh,h4:fh,h5:ph,h6:mh,table:gh,thead:bh,tbody:Eh,tr:_h,th:Th,td:kh,blockquote:yh,code:Ch,img:vh,pre:({children:e})=>Ht(e)?rp(e,{"data-block":"true"}):e,sup:xh,sub:wh,p:Sh,section:Ah},Y6=/^[ \t]{0,3}(`{3,}|~{3,})/,j6=/^\|?[ \t]*:?-{1,}:?[ \t]*(\|[ \t]*:?-{1,}:?[ \t]*)*\|?$/,ll=e=>{let t=e.split(`
|
|
116
|
+
`)},P6=({children:e,className:t,onCopy:n,onError:r,timeout:i=2e3})=>{let[a,s]=he(!1),[o,u]=he(!1),c=Ce(null),h=Ce(0),{isAnimating:d}=it(ut),f=async g=>{var k,C;if(typeof window>"u"||!((k=navigator?.clipboard)!=null&&k.write)){r?.(new Error("Clipboard API not available"));return}try{let w=(C=c.current)==null?void 0:C.closest('[data-streamdown="table-wrapper"]'),A=w?.querySelector("table");if(!A){r?.(new Error("Table not found"));return}let x=rh(A),L=({csv:ih,tsv:D6,md:Qa}[g]||Qa)(x),P=new ClipboardItem({"text/plain":new Blob([L],{type:"text/plain"}),"text/html":new Blob([A.outerHTML],{type:"text/html"})});await navigator.clipboard.write([P]),u(!0),s(!1),n?.(g),h.current=window.setTimeout(()=>u(!1),i)}catch(w){r?.(w)}};be(()=>{let g=k=>{let C=k.composedPath();c.current&&!C.includes(c.current)&&s(!1)};return document.addEventListener("mousedown",g),()=>{document.removeEventListener("mousedown",g),window.clearTimeout(h.current)}},[]);let p=o?qs:Ws;return m("div",{className:"relative",ref:c,children:[m("button",{className:Z("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",t),disabled:d,onClick:()=>s(!a),title:"Copy table",type:"button",children:e??m(p,{size:14})}),a?m("div",{className:"absolute top-full right-0 z-10 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg",children:[m("button",{className:"w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40",onClick:()=>f("md"),title:"Copy table as Markdown",type:"button",children:"Markdown"}),m("button",{className:"w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40",onClick:()=>f("csv"),title:"Copy table as CSV",type:"button",children:"CSV"}),m("button",{className:"w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40",onClick:()=>f("tsv"),title:"Copy table as TSV",type:"button",children:"TSV"})]}):null]})},M6=({children:e,className:t,onDownload:n,onError:r})=>{let[i,a]=he(!1),s=Ce(null),{isAnimating:o}=it(ut),u=c=>{var h;try{let d=(h=s.current)==null?void 0:h.closest('[data-streamdown="table-wrapper"]'),f=d?.querySelector("table");if(!f){r?.(new Error("Table not found"));return}let p=rh(f),g=c==="csv"?ih(p):Qa(p);yn(`table.${c==="csv"?"csv":"md"}`,g,c==="csv"?"text/csv":"text/markdown"),a(!1),n?.(c)}catch(d){r?.(d)}};return be(()=>{let c=h=>{let d=h.composedPath();s.current&&!d.includes(s.current)&&a(!1)};return document.addEventListener("mousedown",c),()=>{document.removeEventListener("mousedown",c)}},[]),m("div",{className:"relative",ref:s,children:[m("button",{className:Z("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",t),disabled:o,onClick:()=>a(!i),title:"Download table",type:"button",children:e??m($i,{size:14})}),i?m("div",{className:"absolute top-full right-0 z-10 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg",children:[m("button",{className:"w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40",onClick:()=>u("csv"),title:"Download table as CSV",type:"button",children:"CSV"}),m("button",{className:"w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40",onClick:()=>u("markdown"),title:"Download table as Markdown",type:"button",children:"Markdown"})]}):null]})},B6=({children:e,className:t,showControls:n,...r})=>m("div",{className:"my-4 flex flex-col gap-2 rounded-lg border border-border bg-sidebar p-2","data-streamdown":"table-wrapper",children:[n?m("div",{className:"flex items-center justify-end gap-1",children:[m(P6,{}),m(M6,{})]}):null,m("div",{className:"border-collapse overflow-x-auto overscroll-y-auto rounded-md border border-border bg-background",children:m("table",{className:Z("w-full divide-y divide-border",t),"data-streamdown":"table",...r,children:e})})]}),F6=Tc(()=>gc(()=>import("./mermaid-3ZIDBTTL-a634ad0a.js"),[],import.meta.url).then(e=>({default:e.Mermaid}))),H6=/language-([^\s]+)/;function Yi(e,t){if(!(e!=null&&e.position||t!=null&&t.position))return!0;if(!(e!=null&&e.position&&t!=null&&t.position))return!1;let n=e.position.start,r=t.position.start,i=e.position.end,a=t.position.end;return n?.line===r?.line&&n?.column===r?.column&&i?.line===a?.line&&i?.column===a?.column}function Ne(e,t){return e.className===t.className&&Yi(e.node,t.node)}var Xa=(e,t)=>typeof e=="boolean"?e:e[t]!==!1,$r=(e,t)=>{if(typeof e=="boolean")return e;let n=e.mermaid;return n===!1?!1:n===!0||n===void 0?!0:n[t]!==!1},Ks=_e(({children:e,className:t,node:n,...r})=>m("ol",{className:Z("list-inside list-decimal whitespace-normal [li_&]:pl-6",t),"data-streamdown":"ordered-list",...r,children:e}),(e,t)=>Ne(e,t));Ks.displayName="MarkdownOl";var ah=_e(({children:e,className:t,node:n,...r})=>m("li",{className:Z("py-1 [&>p]:inline",t),"data-streamdown":"list-item",...r,children:e}),(e,t)=>e.className===t.className&&Yi(e.node,t.node));ah.displayName="MarkdownLi";var sh=_e(({children:e,className:t,node:n,...r})=>m("ul",{className:Z("list-inside list-disc whitespace-normal [li_&]:pl-6",t),"data-streamdown":"unordered-list",...r,children:e}),(e,t)=>Ne(e,t));sh.displayName="MarkdownUl";var oh=_e(({className:e,node:t,...n})=>m("hr",{className:Z("my-6 border-border",e),"data-streamdown":"horizontal-rule",...n}),(e,t)=>Ne(e,t));oh.displayName="MarkdownHr";var uh=_e(({children:e,className:t,node:n,...r})=>m("span",{className:Z("font-semibold",t),"data-streamdown":"strong",...r,children:e}),(e,t)=>Ne(e,t));uh.displayName="MarkdownStrong";var U6=({children:e,className:t,href:n,node:r,...i})=>{let{linkSafety:a}=it(ut),[s,o]=he(!1),u=n==="streamdown:incomplete-link",c=Ge(async p=>{if(!(!(a!=null&&a.enabled&&n)||u)){if(p.preventDefault(),a.onLinkCheck&&await a.onLinkCheck(n)){window.open(n,"_blank","noreferrer");return}o(!0)}},[a,n,u]),h=Ge(()=>{n&&window.open(n,"_blank","noreferrer")},[n]),d=Ge(()=>{o(!1)},[]),f={url:n??"",isOpen:s,onClose:d,onConfirm:h};return a!=null&&a.enabled&&n?m(pe,{children:[m("button",{className:Z("wrap-anywhere appearance-none text-left font-medium text-primary underline",t),"data-incomplete":u,"data-streamdown":"link",onClick:c,type:"button",children:e}),a.renderModal?a.renderModal(f):m(S6,{...f})]}):m("a",{className:Z("wrap-anywhere font-medium text-primary underline",t),"data-incomplete":u,"data-streamdown":"link",href:n,rel:"noreferrer",target:"_blank",...i,children:e})},lh=_e(U6,(e,t)=>Ne(e,t)&&e.href===t.href);lh.displayName="MarkdownA";var ch=_e(({children:e,className:t,node:n,...r})=>m("h1",{className:Z("mt-6 mb-2 font-semibold text-3xl",t),"data-streamdown":"heading-1",...r,children:e}),(e,t)=>Ne(e,t));ch.displayName="MarkdownH1";var dh=_e(({children:e,className:t,node:n,...r})=>m("h2",{className:Z("mt-6 mb-2 font-semibold text-2xl",t),"data-streamdown":"heading-2",...r,children:e}),(e,t)=>Ne(e,t));dh.displayName="MarkdownH2";var hh=_e(({children:e,className:t,node:n,...r})=>m("h3",{className:Z("mt-6 mb-2 font-semibold text-xl",t),"data-streamdown":"heading-3",...r,children:e}),(e,t)=>Ne(e,t));hh.displayName="MarkdownH3";var fh=_e(({children:e,className:t,node:n,...r})=>m("h4",{className:Z("mt-6 mb-2 font-semibold text-lg",t),"data-streamdown":"heading-4",...r,children:e}),(e,t)=>Ne(e,t));fh.displayName="MarkdownH4";var ph=_e(({children:e,className:t,node:n,...r})=>m("h5",{className:Z("mt-6 mb-2 font-semibold text-base",t),"data-streamdown":"heading-5",...r,children:e}),(e,t)=>Ne(e,t));ph.displayName="MarkdownH5";var mh=_e(({children:e,className:t,node:n,...r})=>m("h6",{className:Z("mt-6 mb-2 font-semibold text-sm",t),"data-streamdown":"heading-6",...r,children:e}),(e,t)=>Ne(e,t));mh.displayName="MarkdownH6";var gh=_e(({children:e,className:t,node:n,...r})=>{let{controls:i}=it(ut),a=Xa(i,"table");return m(B6,{className:t,showControls:a,...r,children:e})},(e,t)=>Ne(e,t));gh.displayName="MarkdownTable";var bh=_e(({children:e,className:t,node:n,...r})=>m("thead",{className:Z("bg-muted/80",t),"data-streamdown":"table-header",...r,children:e}),(e,t)=>Ne(e,t));bh.displayName="MarkdownThead";var Eh=_e(({children:e,className:t,node:n,...r})=>m("tbody",{className:Z("divide-y divide-border",t),"data-streamdown":"table-body",...r,children:e}),(e,t)=>Ne(e,t));Eh.displayName="MarkdownTbody";var _h=_e(({children:e,className:t,node:n,...r})=>m("tr",{className:Z("border-border",t),"data-streamdown":"table-row",...r,children:e}),(e,t)=>Ne(e,t));_h.displayName="MarkdownTr";var Th=_e(({children:e,className:t,node:n,...r})=>m("th",{className:Z("whitespace-nowrap px-4 py-2 text-left font-semibold text-sm",t),"data-streamdown":"table-header-cell",...r,children:e}),(e,t)=>Ne(e,t));Th.displayName="MarkdownTh";var kh=_e(({children:e,className:t,node:n,...r})=>m("td",{className:Z("px-4 py-2 text-sm",t),"data-streamdown":"table-cell",...r,children:e}),(e,t)=>Ne(e,t));kh.displayName="MarkdownTd";var yh=_e(({children:e,className:t,node:n,...r})=>m("blockquote",{className:Z("my-4 border-muted-foreground/30 border-l-4 pl-4 text-muted-foreground italic",t),"data-streamdown":"blockquote",...r,children:e}),(e,t)=>Ne(e,t));yh.displayName="MarkdownBlockquote";var xh=_e(({children:e,className:t,node:n,...r})=>m("sup",{className:Z("text-sm",t),"data-streamdown":"superscript",...r,children:e}),(e,t)=>Ne(e,t));xh.displayName="MarkdownSup";var wh=_e(({children:e,className:t,node:n,...r})=>m("sub",{className:Z("text-sm",t),"data-streamdown":"subscript",...r,children:e}),(e,t)=>Ne(e,t));wh.displayName="MarkdownSub";var Ah=_e(({children:e,className:t,node:n,...r})=>{if("data-footnotes"in r){let i=s=>{var o,u;if(!Ht(s))return!1;let c=Array.isArray(s.props.children)?s.props.children:[s.props.children],h=!1,d=!1;for(let f of c)if(f){if(typeof f=="string")f.trim()!==""&&(h=!0);else if(Ht(f))if(((o=f.props)==null?void 0:o["data-footnote-backref"])!==void 0)d=!0;else{let p=Array.isArray(f.props.children)?f.props.children:[f.props.children];for(let g of p){if(typeof g=="string"&&g.trim()!==""){h=!0;break}if(Ht(g)&&((u=g.props)==null?void 0:u["data-footnote-backref"])===void 0){h=!0;break}}}}return d&&!h},a=Array.isArray(e)?e.map(s=>{if(!Ht(s))return s;if(s.type===Ks){let o=(Array.isArray(s.props.children)?s.props.children:[s.props.children]).filter(u=>!i(u));return o.length===0?null:{...s,props:{...s.props,children:o}}}return s}):e;return(Array.isArray(a)?a.some(s=>s!==null):a!==null)?m("section",{className:t,...r,children:a}):null}return m("section",{className:t,...r,children:e})},(e,t)=>Ne(e,t));Ah.displayName="MarkdownSection";var z6=({node:e,className:t,children:n,...r})=>{var i;let a=!("data-block"in r),{mermaid:s,controls:o}=it(ut),u=Gs(),c=u6();if(a)return m("code",{className:Z("rounded bg-muted px-1.5 py-0.5 font-mono text-sm",t),"data-streamdown":"inline-code",...r,children:n});let h=t?.match(H6),d=(i=h?.at(1))!=null?i:"",f="";if(Ht(n)&&n.props&&typeof n.props=="object"&&"children"in n.props&&typeof n.props.children=="string"?f=n.props.children:typeof n=="string"&&(f=n),d==="mermaid"&&u){let g=Xa(o,"mermaid"),k=$r(o,"download"),C=$r(o,"copy"),w=$r(o,"fullscreen"),A=$r(o,"panZoom"),x=g&&(k||C||w);return m(Jn,{fallback:m(x6,{}),children:m("div",{className:Z("group relative my-4 flex w-full flex-col gap-2 rounded-xl border border-border bg-sidebar p-2",t),"data-streamdown":"mermaid-block",children:[m("div",{className:"flex h-8 items-center text-muted-foreground text-xs",children:m("span",{className:"ml-1 font-mono lowercase",children:"mermaid"})}),x?m("div",{className:"pointer-events-none sticky top-2 z-10 -mt-10 flex h-8 items-center justify-end",children:m("div",{className:"pointer-events-auto flex shrink-0 items-center gap-2 rounded-md border border-sidebar bg-sidebar/80 px-1.5 py-1 supports-[backdrop-filter]:bg-sidebar/70 supports-[backdrop-filter]:backdrop-blur","data-streamdown":"mermaid-block-actions",children:[k?m(N6,{chart:f,config:s?.config}):null,C?m(ol,{code:f}):null,w?m(O6,{chart:f,config:s?.config}):null]})}):null,m("div",{className:"rounded-md border border-border bg-background",children:m(F6,{chart:f,config:s?.config,showControls:A})})]})})}let p=Xa(o,"code");return m(g6,{className:t,code:f,isIncomplete:c,language:d,children:p?m(pe,{children:[m(y6,{code:f,language:d}),m(ol,{})]}):null})},Ch=_e(z6,(e,t)=>e.className===t.className&&Yi(e.node,t.node));Ch.displayName="MarkdownCode";var vh=_e(A6,(e,t)=>e.className===t.className&&Yi(e.node,t.node));vh.displayName="MarkdownImg";var Sh=_e(({children:e,node:t,...n})=>{let r=(Array.isArray(e)?e:[e]).filter(i=>i!=null&&i!=="");if(r.length===1&&Ht(r[0])){let i=r[0].props.node,a=i?.tagName;if(a==="img")return m(pe,{children:e});if(a==="code"&&"data-block"in r[0].props)return m(pe,{children:e})}return m("p",{...n,children:e})},(e,t)=>Ne(e,t));Sh.displayName="MarkdownParagraph";var $6={ol:Ks,li:ah,ul:sh,hr:oh,strong:uh,a:lh,h1:ch,h2:dh,h3:hh,h4:fh,h5:ph,h6:mh,table:gh,thead:bh,tbody:Eh,tr:_h,th:Th,td:kh,blockquote:yh,code:Ch,img:vh,pre:({children:e})=>Ht(e)?rp(e,{"data-block":"true"}):e,sup:xh,sub:wh,p:Sh,section:Ah},Y6=/^[ \t]{0,3}(`{3,}|~{3,})/,j6=/^\|?[ \t]*:?-{1,}:?[ \t]*(\|[ \t]*:?-{1,}:?[ \t]*)*\|?$/,ll=e=>{let t=e.split(`
|
|
117
117
|
`),n=null,r=0;for(let i of t){let a=Y6.exec(i);if(n===null){if(a){let s=a[1];n=s[0],r=s.length}}else if(a){let s=a[1],o=s[0],u=s.length;o===n&&u>=r&&(n=null,r=0)}}return n!==null},V6=e=>{let t=e.split(`
|
|
118
118
|
`);for(let n of t){let r=n.trim();if(r.length>0&&r.includes("|")&&j6.test(r))return!0}return!1},q6=()=>e=>{$t(e,"html",(t,n,r)=>{!r||typeof n!="number"||(r.children[n]={type:"text",value:t.value})})},cl=[],dl={allowDangerousHtml:!0},Yr=new WeakMap,W6=class{constructor(){this.cache=new Map,this.keyCache=new WeakMap,this.maxSize=100}generateCacheKey(e){let t=this.keyCache.get(e);if(t)return t;let n=e.rehypePlugins,r=e.remarkPlugins,i=e.remarkRehypeOptions;if(!(n||r||i)){let h="default";return this.keyCache.set(e,h),h}let a=h=>{if(!h||h.length===0)return"";let d="";for(let f=0;f<h.length;f+=1){let p=h[f];if(f>0&&(d+=","),Array.isArray(p)){let[g,k]=p;if(typeof g=="function"){let C=Yr.get(g);C||(C=g.name,Yr.set(g,C)),d+=C}else d+=String(g);d+=":",d+=JSON.stringify(k)}else if(typeof p=="function"){let g=Yr.get(p);g||(g=p.name,Yr.set(p,g)),d+=g}else d+=String(p)}return d},s=a(n),o=a(r),u=i?JSON.stringify(i):"",c=`${o}::${s}::${u}`;return this.keyCache.set(e,c),c}get(e){let t=this.generateCacheKey(e),n=this.cache.get(t);return n&&(this.cache.delete(t),this.cache.set(t,n)),n}set(e,t){let n=this.generateCacheKey(e);if(this.cache.size>=this.maxSize){let r=this.cache.keys().next().value;r&&this.cache.delete(r)}this.cache.set(n,t)}clear(){this.cache.clear()}},hl=new W6,Ih=e=>{let t=G6(e),n=e.children||"";return t5(t.runSync(t.parse(n),n),e)},G6=e=>{let t=hl.get(e);if(t)return t;let n=Q6(e);return hl.set(e,n),n},K6=e=>e.some(t=>Array.isArray(t)?t[0]===Pa:t===Pa),Q6=e=>{let t=e.rehypePlugins||cl,n=e.remarkPlugins||cl,r=K6(t)?n:[...n,q6],i=e.remarkRehypeOptions?{...dl,...e.remarkRehypeOptions}:dl;return rx().use(ry).use(r).use(Hy,i).use(t)},X6=e=>e,Z6=(e,t,n,r)=>{n?e.children.splice(t,1):e.children[t]={type:"text",value:r}},J6=(e,t)=>{var n;for(let r in ua)if(Object.hasOwn(ua,r)&&Object.hasOwn(e.properties,r)){let i=e.properties[r],a=ua[r];(a===null||a.includes(e.tagName))&&(e.properties[r]=(n=t(String(i||""),r,e))!=null?n:void 0)}},e5=(e,t,n,r,i,a)=>{let s=!1;return r?s=!r.includes(e.tagName):i&&(s=i.includes(e.tagName)),!s&&a&&typeof t=="number"&&(s=!a(e,t,n)),s},t5=(e,t)=>{let{allowElement:n,allowedElements:r,disallowedElements:i,skipHtml:a,unwrapDisallowed:s,urlTransform:o}=t;if(n||r||i||a||o){let u=o||X6;$t(e,(c,h,d)=>{if(c.type==="raw"&&d&&typeof h=="number")return Z6(d,h,a,c.value),h;if(c.type==="element"&&(J6(c,u),e5(c,h,d,r,i,n)&&d&&typeof h=="number"))return s&&c.children?d.children.splice(h,1,...c.children):d.children.splice(h,1),h})}return dk(e,{Fragment:pe,components:t.components,ignoreInvalidStyle:!0,jsx:m,jsxs:m,passKeys:!0,passNode:!0})},n5=/\[\^[\w-]{1,200}\](?!:)/,r5=/\[\^[\w-]{1,200}\]:/,i5=/<(\w+)[\s>]/,a5=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),fl=new Map,pl=new Map,s5=e=>{let t=e.toLowerCase(),n=fl.get(t);if(n)return n;let r=new RegExp(`<${t}(?=[\\s>/])[^>]*>`,"gi");return fl.set(t,r),r},o5=e=>{let t=e.toLowerCase(),n=pl.get(t);if(n)return n;let r=new RegExp(`</${t}(?=[\\s>])[^>]*>`,"gi");return pl.set(t,r),r},ml=(e,t)=>{if(a5.has(t.toLowerCase()))return 0;let n=e.match(s5(t));if(!n)return 0;let r=0;for(let i of n)i.trimEnd().endsWith("/>")||(r+=1);return r},gl=(e,t)=>{let n=e.match(o5(t));return n?n.length:0},u5=e=>{let t=0;for(let n=0;n<e.length-1;n+=1)e[n]==="$"&&e[n+1]==="$"&&(t+=1,n+=1);return t},l5=e=>{let t=n5.test(e),n=r5.test(e);if(t||n)return[e];let r=ot.lex(e,{gfm:!0}),i=[],a=[],s=!1;for(let o of r){let u=o.raw,c=i.length;if(a.length>0){i[c-1]+=u;let h=a.at(-1),d=ml(u,h),f=gl(u,h);for(let p=0;p<d;p+=1)a.push(h);for(let p=0;p<f;p+=1)a.length>0&&a.at(-1)===h&&a.pop();continue}if(o.type==="html"&&o.block){let h=u.match(i5);if(h){let d=h[1],f=ml(u,d),p=gl(u,d);f>p&&a.push(d)}}if(c>0&&!s){let h=i[c-1];if(u5(h)%2===1){i[c-1]=h+u;continue}}i.push(u),o.type!=="space"&&(s=o.type==="code")}return i},c5=(e,t)=>{if(!t.length)return e;let n=e;for(let r of t){let i=new RegExp(`(<${r}(?=[\\s>/])[^>]*>)([\\s\\S]*?)(</${r}\\s*>)`,"gi");n=n.replace(i,(a,s,o,u)=>{let c=o.replace(/\n\n/g,`
|
|
119
119
|
<!---->
|
|
120
|
-
`);return s+c+u})}return n},d5=/^[ \t]*<[\w!/?-]/,h5=/(^|\n)[ \t]{4,}(?=<[\w!/?-])/g,f5=e=>typeof e!="string"||e.length===0||!d5.test(e)?e:e.replace(h5,"$1"),bl,El,Jr={...sr,protocols:{...sr.protocols,href:[...(El=(bl=sr.protocols)==null?void 0:bl.href)!=null?El:[],"tel"]}},Za={raw:Pa,sanitize:[wd,Jr],harden:[hp,{allowedImagePrefixes:["*"],allowedLinkPrefixes:["*"],allowedProtocols:["*"],defaultOrigin:void 0,allowDataImages:!0}]},p5={gfm:[N3,{}]},_l=Object.values(Za),m5=Object.values(p5),g5={block:" ▋",circle:" ●"},b5={shikiTheme:["github-light","github-dark"],controls:!0,isAnimating:!1,mode:"streaming",mermaid:void 0,linkSafety:{enabled:!0}},ut=yi(b5),Nh=_e(({content:e,shouldParseIncompleteMarkdown:t,shouldNormalizeHtmlIndentation:n,index:r,isIncomplete:i,...a})=>{let s=typeof e=="string"&&n?f5(e):e;return m(Z0.Provider,{value:i,children:m(Ih,{...a,children:s})})},(e,t)=>{if(e.content!==t.content||e.shouldNormalizeHtmlIndentation!==t.shouldNormalizeHtmlIndentation||e.index!==t.index||e.isIncomplete!==t.isIncomplete)return!1;if(e.components!==t.components){let n=Object.keys(e.components||{}),r=Object.keys(t.components||{});if(n.length!==r.length||n.some(i=>{var a,s;return((a=e.components)==null?void 0:a[i])!==((s=t.components)==null?void 0:s[i])}))return!1}return!(e.rehypePlugins!==t.rehypePlugins||e.remarkPlugins!==t.remarkPlugins)});Nh.displayName="Block";var E5=["github-light","github-dark"],Lh=_e(({children:e,mode:t="streaming",parseIncompleteMarkdown:n=!0,normalizeHtmlIndentation:r=!1,components:i,rehypePlugins:a=_l,remarkPlugins:s=m5,className:o,shikiTheme:u=E5,mermaid:c,controls:h=!0,isAnimating:d=!1,animated:f,BlockComponent:p=Nh,parseMarkdownIntoBlocksFn:g=l5,caret:k,plugins:C,remend:w,linkSafety:A={enabled:!0},allowedTags:x,...L})=>{let P=cf(),[v,V]=ap(),O=Re(()=>x?Object.keys(x):[],[x]),Y=Re(()=>{if(typeof e!="string")return"";let ee=t==="streaming"&&n?B_(e,w):e;return O.length>0&&(ee=c5(ee,O)),ee},[e,t,n,w,O]),I=Re(()=>g(Y),[Y,g]),[$,M]=he(I);be(()=>{t==="streaming"?V(()=>{M(I)}):M(I)},[I,t]);let K=t==="streaming"?$:I,re=Re(()=>K.map((ee,y)=>`${P}-${y}`),[K.length,P]),X=Re(()=>f?f===!0?Ga():Ga(f):null,[f]),ie=Re(()=>{var ee,y;return{shikiTheme:(y=(ee=C?.code)==null?void 0:ee.getThemes())!=null?y:u,controls:h,isAnimating:d,mode:t,mermaid:c,linkSafety:A}},[u,h,d,t,c,A,C?.code]),le=Re(()=>({...$6,...i}),[i]),we=Re(()=>{let ee=[];return C!=null&&C.cjk&&(ee=[...ee,...C.cjk.remarkPluginsBefore]),ee=[...ee,...s],C!=null&&C.cjk&&(ee=[...ee,...C.cjk.remarkPluginsAfter]),C!=null&&C.math&&(ee=[...ee,C.math.remarkPlugin]),ee},[s,C?.math,C?.cjk]),De=Re(()=>{var ee;let y=a;if(x&&Object.keys(x).length>0&&a===_l){let Se={...Jr,tagNames:[...(ee=Jr.tagNames)!=null?ee:[],...Object.keys(x)],attributes:{...Jr.attributes,...x}};y=[Za.raw,[wd,Se],Za.harden]}return C!=null&&C.math&&(y=[...y,C.math.rehypePlugin]),X&&d&&(y=[...y,X.rehypePlugin]),y},[a,C?.math,X,d,x]),_=Re(()=>{if(!d||K.length===0)return!1;let ee=K.at(-1);return ll(ee)||V6(ee)},[d,K]),Le=Re(()=>k&&d&&!_?{"--streamdown-caret":`"${g5[k]}"`}:void 0,[k,d,_]);return t==="static"?m(Ka.Provider,{value:C??null,children:m(ut.Provider,{value:ie,children:m("div",{className:Z("space-y-4 whitespace-normal *:first:mt-0 *:last:mb-0",o),children:m(Ih,{components:le,rehypePlugins:De,remarkPlugins:we,...L,children:Y})})})}):m(Ka.Provider,{value:C??null,children:m(ut.Provider,{value:ie,children:m("div",{className:Z("space-y-4 whitespace-normal *:first:mt-0 *:last:mb-0",k&&!_?"*:last:after:inline *:last:after:align-baseline *:last:after:content-[var(--streamdown-caret)]":null,o),style:Le,children:[K.length===0&&k&&d&&m("span",{}),K.map((ee,y)=>{let Se=y===K.length-1,U=d&&Se&&ll(ee);return m(p,{components:le,content:ee,index:y,isIncomplete:U,rehypePlugins:De,remarkPlugins:we,shouldNormalizeHtmlIndentation:r,shouldParseIncompleteMarkdown:n,...L},re[y])})]})})})},(e,t)=>e.children===t.children&&e.shikiTheme===t.shikiTheme&&e.isAnimating===t.isAnimating&&e.animated===t.animated&&e.mode===t.mode&&e.plugins===t.plugins&&e.className===t.className&&e.linkSafety===t.linkSafety&&e.normalizeHtmlIndentation===t.normalizeHtmlIndentation);Lh.displayName="Streamdown";var _5=({children:e,className:t,minZoom:n=.5,maxZoom:r=3,zoomStep:i=.1,showControls:a=!0,initialZoom:s=1,fullscreen:o=!1})=>{let u=Ce(null),c=Ce(null),[h,d]=he(s),[f,p]=he({x:0,y:0}),[g,k]=he(!1),[C,w]=he({x:0,y:0}),[A,x]=he({x:0,y:0}),L=Ge(M=>{d(K=>Math.max(n,Math.min(r,K+M)))},[n,r]),P=Ge(()=>{L(i)},[L,i]),v=Ge(()=>{L(-i)},[L,i]),V=Ge(()=>{d(s),p({x:0,y:0})},[s]),O=Ge(M=>{M.preventDefault();let K=M.deltaY>0?-i:i;L(K)},[L,i]),Y=Ge(M=>{if(M.button!==0||M.isPrimary===!1)return;k(!0),w({x:M.clientX,y:M.clientY}),x(f);let K=M.currentTarget;K instanceof HTMLElement&&K.setPointerCapture(M.pointerId)},[f]),I=Ge(M=>{if(!g)return;M.preventDefault();let K=M.clientX-C.x,re=M.clientY-C.y;p({x:A.x+K,y:A.y+re})},[g,C,A]),$=Ge(M=>{k(!1);let K=M.currentTarget;K instanceof HTMLElement&&K.releasePointerCapture(M.pointerId)},[]);return be(()=>{let M=u.current;if(M)return M.addEventListener("wheel",O,{passive:!1}),()=>{M.removeEventListener("wheel",O)}},[O]),be(()=>{let M=c.current;if(M&&g)return document.body.style.userSelect="none",M.addEventListener("pointermove",I,{passive:!1}),M.addEventListener("pointerup",$),M.addEventListener("pointercancel",$),()=>{document.body.style.userSelect="",M.removeEventListener("pointermove",I),M.removeEventListener("pointerup",$),M.removeEventListener("pointercancel",$)}},[g,I,$]),m("div",{className:Z("relative flex flex-col",o?"h-full w-full":"min-h-28 w-full",t),ref:u,style:{cursor:g?"grabbing":"grab"},children:[a?m("div",{className:Z("absolute z-10 flex flex-col gap-1 rounded-md border border-border bg-background/80 p-1 supports-[backdrop-filter]:bg-background/70 supports-[backdrop-filter]:backdrop-blur-sm",o?"bottom-4 left-4":"bottom-2 left-2"),children:[m("button",{className:"flex items-center justify-center rounded p-1.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",disabled:h>=r,onClick:P,title:"Zoom in",type:"button",children:m(T6,{size:16})}),m("button",{className:"flex items-center justify-center rounded p-1.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",disabled:h<=n,onClick:v,title:"Zoom out",type:"button",children:m(k6,{size:16})}),m("button",{className:"flex items-center justify-center rounded p-1.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground",onClick:V,title:"Reset zoom and pan",type:"button",children:m(_6,{size:16})})]}):null,m("div",{className:Z("flex-1 origin-center transition-transform duration-150 ease-out",o?"flex h-full w-full items-center justify-center":"flex w-full items-center justify-center"),onPointerDown:Y,ref:c,role:"application",style:{transform:`translate(${f.x}px, ${f.y}px) scale(${h})`,transformOrigin:"center center",touchAction:"none",willChange:"transform"},children:e})]})},T5=({chart:e,className:t,config:n,fullscreen:r=!1,showControls:i=!0})=>{let[a,s]=he(null),[o,u]=he(!1),[c,h]=he(""),[d,f]=he(""),[p,g]=he(0),{mermaid:k}=it(ut),C=Gs(),w=k?.errorComponent,{shouldRender:A,containerRef:x}=Jx({immediate:r});if(be(()=>{if(A){if(!C){s("Mermaid plugin not available. Please add the mermaid plugin to enable diagram rendering.");return}(async()=>{try{s(null),u(!0);let P=C.getMermaid(n),v=e.split("").reduce((Y,I)=>(Y<<5)-Y+I.charCodeAt(0)|0,0),V=`mermaid-${Math.abs(v)}-${Date.now()}-${Math.random().toString(36).substring(2,9)}`,{svg:O}=await P.render(V,e);h(O),f(O)}catch(P){if(!(d||c)){let v=P instanceof Error?P.message:"Failed to render Mermaid chart";s(v)}}finally{u(!1)}})()}},[e,n,p,A,C]),!(A||c||d))return m("div",{className:Z("my-4 min-h-[200px]",t),ref:x});if(o&&!c&&!d)return m("div",{className:Z("my-4 flex justify-center p-4",t),ref:x,children:m("div",{className:"flex items-center space-x-2 text-muted-foreground",children:[m("div",{className:"h-4 w-4 animate-spin rounded-full border-current border-b-2"}),m("span",{className:"text-sm",children:"Loading diagram..."})]})});if(a&&!c&&!d)return w?m("div",{ref:x,children:m(w,{chart:e,error:a,retry:()=>g(v=>v+1)})}):m("div",{className:Z("rounded-md bg-red-50 p-4",t),ref:x,children:[m("p",{className:"font-mono text-red-700 text-sm",children:["Mermaid Error: ",a]}),m("details",{className:"mt-2",children:[m("summary",{className:"cursor-pointer text-red-600 text-xs",children:"Show Code"}),m("pre",{className:"mt-2 overflow-x-auto rounded bg-red-100 p-2 text-red-800 text-xs",children:e})]})]});let L=c||d;return m("div",{className:Z("size-full",t),"data-streamdown":"mermaid",ref:x,children:m(_5,{className:Z(r?"size-full overflow-hidden":"overflow-hidden",t),fullscreen:r,maxZoom:3,minZoom:.5,showControls:i,zoomStep:.1,children:m("div",{"aria-label":"Mermaid chart",className:Z("flex justify-center",r?"size-full items-center":null),dangerouslySetInnerHTML:{__html:L},role:"img"})})})};function k5({href:e,children:t}){return m("a",{href:e,target:"_blank",rel:"noopener noreferrer",class:"fr hover:text-a-9 focus-visible:rounded-kin-xs text-inherit underline underline-offset-2 transition-all hover:underline-offset-4",children:t})}const y5={a:k5};function Qs({content:e,isStreaming:t=!1}){return e?m(Lh,{className:"kin-markdown text-n-12 text-sm leading-relaxed",isAnimating:t,mode:t?"streaming":"static",components:y5,children:e}):null}const x5=.25,w5=.4,A5=10,C5=5,Tl=240,kl=()=>({pointerId:null,startX:0,startY:0,startTime:0,targetHeight:0,currentTranslateY:0,threshold:0,phase:"idle"});function jr(e){e.style.removeProperty("transform"),e.style.removeProperty("will-change"),e.style.removeProperty("transition")}function v5(e,t,n){if(!(e instanceof Element)||e.closest("button,input,textarea,select,a"))return!1;if(n!=="mouse"){let r=e;for(;r&&r!==t;){const i=window.getComputedStyle(r);if((/(auto|scroll)/.test(i.overflowY)||/(auto|scroll)/.test(i.overflow))&&r.scrollHeight>r.clientHeight&&r.scrollTop>0)return!1;r=r.parentElement}}return!0}function Rh({enabled:e,onClose:t,dragVar:n}){const r=Ce(null),i=Ce(kl()),a=Ce(null),[s,o]=he(!1),u=()=>{a.current&&(clearTimeout(a.current),a.current=null)},c=A=>{if(!n)return;const x=r.current?.closest("[data-kin-root]");x&&(A===null?x.style.removeProperty(n):x.style.setProperty(n,String(Math.min(1,A))))},h=()=>{const A=i.current.phase;i.current=kl();const x=r.current;x&&(x.style.removeProperty("user-select"),A==="dragging"&&x.toggleAttribute("data-dragging",!1))},d=A=>{if(A===null)return;const x=r.current;x?.hasPointerCapture(A)&&x.releasePointerCapture(A)},f=()=>{const A=r.current;A&&(c(0),A.style.removeProperty("transition"),A.style.transform="translate3d(0, 0, 0)",setTimeout(()=>{a.current||jr(A),c(null)},Tl))},p=()=>{if(!e||a.current)return;const A=r.current;if(!A){t();return}o(!0),c(1),A.style.willChange="transform",A.style.removeProperty("transition"),A.style.transform=`translate3d(0, ${A.getBoundingClientRect().height+32}px, 0)`,a.current=setTimeout(()=>{a.current=null,t(),o(!1),c(null),requestAnimationFrame(()=>jr(A))},Tl)},g=A=>{if(!e||a.current||i.current.phase!=="idle"||A.pointerType==="mouse"&&A.button!==0)return;const x=r.current;!x||!v5(A.target,x,A.pointerType)||(i.current={pointerId:A.pointerId,startX:A.clientX,startY:A.clientY,startTime:performance.now(),targetHeight:x.getBoundingClientRect().height,currentTranslateY:0,threshold:A.pointerType==="touch"||A.pointerType==="pen"?A5:C5,phase:"pending"})},k=A=>{const x=i.current;if(x.phase!=="pending"&&x.phase!=="dragging"||x.pointerId!==A.pointerId||a.current)return;const L=r.current;if(!L)return;const P=A.clientX-x.startX,v=A.clientY-x.startY;if(x.phase==="pending"){if(Math.abs(P)<x.threshold&&Math.abs(v)<x.threshold)return;if(Math.abs(v)<=Math.abs(P)||v<=0){h();return}x.phase="dragging",L.toggleAttribute("data-dragging",!0),L.setPointerCapture(A.pointerId),L.style.willChange="transform",L.style.transition="none",L.style.userSelect="none",window.getSelection()?.removeAllRanges()}x.phase==="dragging"&&(x.currentTranslateY=Math.max(0,v),L.style.transform=`translate3d(0, ${x.currentTranslateY}px, 0)`,x.targetHeight>0&&c(x.currentTranslateY/x.targetHeight),A.preventDefault())},C=A=>{const x=i.current;if(x.pointerId!==A.pointerId)return;d(x.pointerId);const L=x.phase==="dragging";h(),L&&f()},w=A=>{const x=i.current;if(x.pointerId!==A.pointerId)return;if(d(x.pointerId),x.phase!=="dragging"){h();return}const L=x.currentTranslateY,P=Math.max(1,performance.now()-x.startTime),v=L/P,V=L>=x.targetHeight*x5||v>w5;h(),V?p():f()};return be(()=>{if(e)return;u(),o(!1),h(),c(null);const A=r.current;A&&jr(A)},[e]),be(()=>()=>{u(),c(null);const A=r.current;A&&(A.toggleAttribute("data-dragging",!1),jr(A))},[]),{shellRef:r,isClosing:s,closeWithSlideOut:p,dragHandlers:{onPointerDown:g,onPointerMove:k,onPointerUp:w,onPointerCancel:C}}}function S5({onClose:e,ariaLabel:t,children:n}){const r=F.embedded.value,{shellRef:i,isClosing:a,closeWithSlideOut:s,dragHandlers:o}=Rh({enabled:!0,onClose:e,dragVar:"--kin-overlay-drag"}),[u,c]=he(!1);return be(()=>{requestAnimationFrame(()=>c(!0))},[]),be(()=>{const h=d=>{d.key==="Escape"&&(d.stopPropagation(),s())};return document.addEventListener("keydown",h,{capture:!0}),()=>document.removeEventListener("keydown",h,{capture:!0})},[s]),m(pe,{children:[m("div",{class:Hh({visible:u&&!a}),style:u&&!a?{opacity:"calc(1 - var(--kin-overlay-drag, 0))"}:void 0,"aria-hidden":"true",onClick:s}),m("div",{ref:i,class:Fh({layout:r?"embedded":"open",class:`animate-kin-drawer-in ${r?"absolute inset-0 [--kin-inset:0px]":"[--kin-inset:2rem]"}`}),role:"dialog","aria-modal":"true","aria-label":t,...o,children:[m("div",{"aria-hidden":"true",class:"bg-n-5/50 absolute left-1/2 top-2 h-1 w-12 -translate-x-1/2 rounded-full"}),n(s)]})]})}function Ja({text:e,icon:t=Aa}){return m("div",{class:"text-n-9 flex items-center gap-1.5 text-xs",children:[m(t,{class:"size-3 shrink-0 animate-pulse"}),m("span",{class:"animate-kin-shimmer bg-[linear-gradient(90deg,oklch(var(--n-9))_40%,oklch(var(--n-11))_50%,oklch(var(--n-9))_60%)] bg-[length:200%_100%] bg-clip-text text-transparent",children:e})]})}const I5={location:Hf,type:zf,salary:Uf};function N5({details:e}){return e.length===0?null:m("div",{class:"text-n-10 flex flex-wrap gap-x-2.5 gap-y-1 text-xs",children:e.map(t=>{const n=I5[t.key];return m("span",{class:"flex items-center gap-1",children:[n&&m(n,{class:"size-3 shrink-0"}),t.value]},t.key)})})}function Oh({job:e}){return m("div",{class:"flex min-w-0 flex-1 flex-col gap-1 py-1 pl-2",children:[m("p",{class:"text-n-12 text-sm font-semibold leading-tight",children:e.title}),m(N5,{details:e.details})]})}function L5({jobs:e}){const[t,n]=he(null),r=i=>{n(a=>a===i?null:i)};return m("div",{class:"grid gap-2 py-1.5",children:e.map(i=>m(O5,{job:i,open:t===i.id,onToggle:()=>r(i.id)},i.id))})}function R5(){F.overlay.value=null}function yl(e,t){t&&t.status!=="error"||(F.setJobDetail(e,{status:"loading",error:void 0}),F.requestJobDetail.value?.(e))}function O5({job:e,open:t,onToggle:n}){const r=F.jobDetails.value[e.id],i=r?.status==="streaming"?r.liveSummary:r?.summary,a=()=>{t||yl(e.id,r),n()},s=()=>{yl(e.id,r),F.overlay.value=m(D5,{job:e})};return m("div",{class:"corner-smooth rounded-kin-xl outline-n-3 bg-n-2 flex flex-col overflow-clip outline outline-1",children:[m("button",{type:"button",class:"hover:bg-n-3/50 active:bg-n-3/75 flex flex-1 items-center py-1 pl-1 pr-2 text-left transition-colors duration-200",onClick:a,"aria-expanded":t,children:[m(Oh,{job:e}),m(mc,{class:si("text-n-9 ease-kin-fluid duration-kin size-3.5 shrink-0 transition-transform",t&&"rotate-180"),strokeWidth:2})]}),m("div",{class:si("duration-kin ease-kin-fluid grid transition-all",t?"grid-rows-[1fr] opacity-100":"grid-rows-[0fr] opacity-0"),children:m("div",{class:"overflow-hidden",children:m("div",{class:"border-n-3 flex flex-col gap-2 border-t px-3 py-3",children:!r||r.status==="loading"?m(Ja,{text:"Loading job details…"}):r.status==="error"?m("p",{class:"text-n-9 text-xs",children:r.error}):m(pe,{children:[i&&m(pe,{children:[m("div",{class:"kin-markdown text-n-11 text-xs leading-relaxed",children:m(Qs,{content:i,isStreaming:r.status==="streaming"})}),m("p",{class:"text-n-9 text-[11px] italic",children:"AI-generated summary (may contain inaccuracies)"})]}),!i&&r.status==="streaming"&&m(Ja,{text:"Generating summary…"}),r.description&&m("div",{class:"flex gap-2",children:[m("button",{type:"button",class:yt({variant:"neutral",size:"sm",class:"flex-1"}),onClick:s,children:"Full description"}),e.applyUrl&&m("a",{href:e.applyUrl,target:"_blank",rel:"noopener noreferrer",class:yt({variant:"accent",size:"sm",class:"flex-1"}),onClick:o=>o.stopPropagation(),children:"Apply now"})]})]})})})})]})}function D5({job:e}){const t=F.jobDetails.value[e.id];return m(S5,{onClose:R5,ariaLabel:`Job details: ${e.title}`,children:n=>m(pe,{children:[m("header",{class:"from-a-2/50 relative flex select-none items-start justify-between bg-gradient-to-b to-transparent p-3 pb-1",children:[m(Oh,{job:e}),m("button",{type:"button",class:yt({variant:"neutral",size:"iconSm"}),onClick:n,"aria-label":"Close",children:m(ls,{strokeWidth:2})})]}),m("div",{class:Ph({class:"pl-5 pr-5 text-sm sm:px-5"}),children:t?.description?m("div",{dangerouslySetInnerHTML:{__html:t.description}}):m("p",{class:"text-n-9 text-sm",children:"No description available."})}),e.applyUrl&&m("div",{class:"flex p-4 pt-2",children:m("a",{href:e.applyUrl,target:"_blank",rel:"noopener noreferrer",class:yt({variant:"accent",size:"md",class:"flex-1"}),onClick:r=>r.stopPropagation(),children:"Apply now"})})]})})}const P5={thinking:{text:"Thinking…",icon:Aa},responding:{text:"Writing response…",icon:go},processing_results:{text:"Processing results…",icon:Aa},processing_cv:{text:"Scanning your CV…",icon:mo},searchJobs:{text:"Searching jobs…",icon:po},matchJobs:{text:"Matching jobs…",icon:po},searchKnowledge:{text:"Searching company info…",icon:Mf},getProfileSummary:{text:"Reviewing your profile…",icon:mo},updatePreferences:{text:"Updating your preferences…",icon:Bf},remember:{text:"Saving details…",icon:Ff},suggestQuickReplies:{text:"Preparing reply options…",icon:go}},Dh=xt({base:"animate-kin-message-in flex max-w-[95%] flex-col",variants:{side:{user:"self-end",assistant:"self-start w-full gap-2.5 p-1"}}}),Ph=xt({base:"[&::-webkit-scrollbar-thumb]:bg-n-4 [&::-webkit-scrollbar-thumb]:rounded-kin-xs flex min-h-0 flex-1 flex-col gap-4 overflow-y-auto overscroll-none scroll-smooth break-words py-4 [mask-image:linear-gradient(to_bottom,transparent_0,_black_1.5rem,_black_calc(100%-1.5rem),transparent_100%),linear-gradient(black,black)] [mask-size:calc(100%-6px)_100%,6px_100%] [mask-position:0_0,100%_0] [mask-repeat:no-repeat,no-repeat] sm:overscroll-auto [&::-webkit-scrollbar-track]:bg-transparent [&::-webkit-scrollbar]:w-1.5"});function M5(){const e=Ce(null);return m("div",{ref:e,class:Ph({class:"pl-safe-l pr-safe-r sm:px-4 [&>:first-child]:mt-auto"}),role:"log","aria-label":"Chat messages","aria-live":"polite","aria-relevant":"additions",children:[m(F5,{}),m(H5,{}),m(U5,{}),m(B5,{containerRef:e})]})}function B5({containerRef:e}){const[t,n]=he(!0),r=Ce(!1),i=F.messages.value.length,a=F.messages.value.at(-1)?.role==="user",s=F.liveAssistantMessage.value?.content,o=F.assistantStatus.value,u=F.quickReplies.value.length,c=()=>{const h=e.current;h&&(r.current=!0,h.scrollTop=h.scrollHeight,n(!0))};return be(()=>{const h=e.current;if(!h)return;c();const d=()=>{const f=h.scrollHeight-h.scrollTop-h.clientHeight<80;r.current?r.current=!f:n(f)};return h.addEventListener("scroll",d,{passive:!0}),()=>h.removeEventListener("scroll",d)},[]),be(()=>{(t||a)&&c()},[i,s,o,u,a]),t?null:m("button",{type:"button",class:yt({variant:"neutral",size:"iconSm",class:"animate-kin-fade-in absolute bottom-3 left-1/2 -translate-x-1/2"}),"aria-label":"Scroll to latest message",onClick:c,children:m(mc,{strokeWidth:2})})}function F5(){const e=F.messages.value.length,t=!!(F.liveAssistantMessage.value||F.isStreaming.value||F.assistantStatus.value);return e||t?null:m("div",{class:"animate-kin-fade-in my-auto px-6 py-6 text-center",style:{animationDelay:"150ms"},children:[m("p",{class:"text-n-12 mb-2 text-base",children:"Hi there, you're speaking with Kin AI Agent."}),m("p",{class:"text-n-9 text-sm",children:"How can I help you today?"})]})}function H5(){return m(pe,{children:F.messages.value.filter(e=>e.role==="assistant"?!!e.content.trim()||!!e.blocks?.length:e.role==="user"?!!e.content.trim()||!!e.attachment:!0).map((e,t)=>m(z5,{message:e,animationIndex:t},e.id))})}function Mh({statusMeta:e,timestamp:t}){return m("div",{class:"text-n-9 border-n-4 inline-flex items-center gap-1.5 self-start border-t pt-1.5 text-xs first:border-t-0 first:pt-0","aria-hidden":"true",children:e?m(Ja,{...e}):m("span",{children:["Kin • AI Agent • ",t?Y5(t):"typing..."]})})}function U5(){const e=F.liveAssistantMessage.value,t=F.isStreaming.value,n=F.assistantStatus.value,r=n?P5[n]:void 0;return!e&&!t&&!r?null:m("article",{class:Dh({side:"assistant"}),"aria-label":"Message from Kin AI Agent",children:[e?.content&&m(Qs,{content:e.content,isStreaming:t}),m(Mh,{statusMeta:r,timestamp:t?void 0:e?.timestamp})]})}function z5({message:e,animationIndex:t}){const{role:n,content:r,timestamp:i,attachment:a,blocks:s}=e,o=n==="user",u=Math.min((t+1)*.05,.35);return n==="system"?m("div",{class:"flex justify-center px-4 py-2",role:"status","aria-label":"System notification",children:m("span",{class:"border-n-6/40 bg-n-3 text-n-9 corner-smooth rounded-kin-lg border px-3 py-1.5 text-xs",children:r})}):m("article",{class:Dh({side:o?"user":"assistant"}),style:{animationDelay:`${u}s`},"aria-label":`Message from ${o?"You":"Kin AI Agent"}`,children:[o&&m("div",{class:"bg-n-3 text-n-12 corner-smooth rounded-kin-lg relative px-3.5 py-2 text-sm",children:[a&&m("div",{class:"text-n-10 flex items-center gap-1.5",children:[m(pc,{class:"text-n-9 size-3.5 shrink-0"}),m("span",{class:"max-w-full truncate",children:a.name})]}),m("p",{children:r}),m("svg",{class:"text-n-3 absolute -bottom-1.5 right-1.5 w-4","aria-hidden":"true",viewBox:"0 0 16 8",children:m("path",{d:"M15 0S16 3 16 7C16 8 15 7 15 7 11 3 9 2 0 2Z",fill:"currentColor"})})]}),!o&&r&&m(Qs,{content:r}),!o&&s?.map((c,h)=>m($5,{block:c},h)),!o&&m(Mh,{timestamp:i})]})}function $5({block:e}){switch(e.kind){case"job_cards":return m(L5,{jobs:e.jobs});default:return null}}function Y5(e){const n=new Date().getTime()-e.getTime();return n<6e4?"Just now":n<36e5?`${Math.floor(n/6e4)}m ago`:e.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})}function Bh({content:e,children:t}){const[n,r]=he(!1),i=Ce(null),a=Ce(null),s=t.props,o=zl(t,{ref:i,onMouseEnter:Vr(s.onMouseEnter,()=>r(!0)),onMouseLeave:Vr(s.onMouseLeave,()=>r(!1)),onFocus:Vr(s.onFocus,()=>r(!0)),onBlur:Vr(s.onBlur,()=>r(!1))});be(()=>{if(!n)return;const c=h=>{i.current&&!h.composedPath().includes(i.current)&&r(!1)};return document.addEventListener("pointerdown",c),()=>document.removeEventListener("pointerdown",c)},[n]),lf(()=>{const c=i.current,h=a.current;if(!n||!c||!h)return;const d=c.getBoundingClientRect(),f=h.offsetWidth,p=h.offsetHeight,g=d.top>p+8,k=Math.max(4,Math.min(d.left+(d.width-f)/2,innerWidth-f-4)),C=d.left+d.width/2-k;h.setAttribute("data-side",g?"top":"bottom"),h.style.left=`${k}px`,h.style.top=`${g?d.top-p-6:d.bottom+6}px`,h.style.setProperty("--ax",`${C-12}px`),h.style.setProperty("--origin",`${C}px ${g?"100%":"0%"}`),requestAnimationFrame(()=>h.setAttribute("data-open",""))},[n,e]);const u=n?i.current?.closest("[data-kin-root]"):null;return m(pe,{children:[o,u&&kc(m("span",{ref:a,"data-side":"top",role:"tooltip",class:"bg-n-12 text-n-1 corner-smooth ease-out-back rounded-kin-sm duration-kin group pointer-events-none fixed z-[999999] origin-[--origin] scale-90 whitespace-nowrap px-2.5 py-1.5 text-xs opacity-0 transition-[opacity,transform] data-[open]:scale-100 data-[open]:opacity-100 data-[open]:delay-300",children:[e,m("svg",{viewBox:"0 0 32 32","aria-hidden":"true",class:"fill-n-12 absolute left-[--ax] w-6 group-data-[side=bottom]:-top-6 group-data-[side=top]:-bottom-6 group-data-[side=top]:rotate-180",children:m("path",{d:"M3 32C9 32 10 31 15 26Q16 25 17 26C22 31 23 32 29 32"})})]}),u)]})}function Vr(e,t){return typeof e=="function"?(...n)=>{e(...n),t()}:t}const j5=xt({base:"relative animate-none flex min-h-0 w-full flex-1 flex-col overflow-hidden",variants:{embedded:{false:"sm:animate-kin-panel-in [will-change:transform,opacity]"}}}),xl=xt({base:"transition-all duration-kin ease-kin-fluid col-span-full row-span-full",variants:{show:{false:"scale-50 opacity-0 blur-sm",true:"scale-100 opacity-100 blur-0"}}});function V5({embedded:e=!1,onClose:t,onClearData:n,onSkipToInput:r}){const[i,a]=he(!1),s=Ce(),o=()=>{clearTimeout(s.current),a(!1)};be(()=>()=>clearTimeout(s.current),[]);const u=c=>{if(c.key==="Escape"){if(c.preventDefault(),i){o();return}e||t()}};return m("div",{class:j5({embedded:e}),"aria-labelledby":"kin-panel-title",onKeyDown:u,onClick:()=>i&&o(),children:[m("button",{type:"button",class:"fr bg-n-2 text-n-12 rounded-kin-sm absolute -top-full left-1/2 z-50 -translate-x-1/2 px-3 py-1.5 text-sm font-medium no-underline focus:top-2",onClick:r,children:"Skip to chat input"}),m("header",{class:"from-a-2/50 relative flex select-none items-center justify-between bg-gradient-to-b to-transparent p-3",children:[m("h2",{id:"kin-panel-title",class:"text-n-12 m-0 pl-2 text-base font-semibold sm:text-sm sm:font-medium",children:"Kin Assistant"}),!e&&m("div",{"aria-hidden":"true",class:"bg-n-5/50 absolute left-1/2 top-2 h-1 w-12 -translate-x-1/2 rounded-full"}),m("div",{class:"flex items-center gap-1.5",children:[m(Bh,{content:i?"Click again to confirm":"Clear my data",children:m("button",{class:yt({variant:i?"accent":"ghost",size:"iconSm",class:"grid place-items-center"}),"aria-label":i?"Confirm clear data":"Clear my data",type:"button",onMouseDown:c=>c.preventDefault(),onClick:c=>{c.stopPropagation(),i?(n(),o()):a(!0)},onMouseLeave:()=>{i&&(s.current=setTimeout(o,2e3))},onMouseEnter:()=>clearTimeout(s.current),children:[m(Of,{class:xl({show:!i})}),m(Df,{class:xl({show:i})})]})}),!e&&m("button",{class:yt({variant:"neutral",size:"iconSm"}),"aria-label":"Close chat",type:"button",onClick:t,children:m(ls,{strokeWidth:2})})]})]}),m(M5,{})]})}const q5={left:"justify-start",center:"justify-center",right:"justify-end"};function W5({onOpen:e,placement:t="center",buttonRef:n,logo:r=null}){const[i,a]=he(!1);return m("div",{class:si("pointer-events-auto flex p-3 sm:p-2",q5[t]),children:m("button",{ref:n,type:"button",class:yt({variant:"accent",size:"iconLg",class:"shadow-a-9/20 shadow-lg hover:shadow-xl"}),"aria-label":"Open Kin AI Chat",onClick:e,children:m("span",{class:"grid size-6 place-items-center","aria-hidden":"true",children:!r||i?m(Lf,{class:"w-6"}):m("img",{src:r,alt:"",class:"size-full object-contain",draggable:!1,onError:()=>a(!0)})})})})}const G5={"application/pdf":{maxSize:1e7},"application/vnd.openxmlformats-officedocument.wordprocessingml.document":{maxSize:1e7},"application/msword":{maxSize:1e7},"text/plain":{maxSize:1e6},"image/jpeg":{maxSize:1e7},"image/png":{maxSize:1e7},"image/webp":{maxSize:1e7}},K5=".pdf,.docx,.doc,.txt,.jpg,.jpeg,.png,.webp";function Q5(e){const t=G5[e.type];return t?e.size>t.maxSize?{valid:!1,error:`File is too large. Maximum size is ${Math.round(t.maxSize/1e6)}MB.`}:e.size===0?{valid:!1,error:"The file appears to be empty."}:{valid:!0}:{valid:!1,error:"Unsupported file format. Please upload a PDF, Word document, text file, or image."}}function X5(e){return new Promise((t,n)=>{const r=new FileReader;r.onload=()=>{typeof r.result=="string"?t(r.result):n(new Error("Failed to read file"))},r.onerror=()=>n(r.error),r.readAsDataURL(e)})}function Z5({url:e,onMessage:t,onClose:n,onError:r}){let i=null,a=[];const s=()=>i?.readyState===WebSocket.OPEN,o=d=>{s()&&i.send(JSON.stringify(d))},u=d=>o({type:"user_message",content:d}),c=()=>{if(s()){for(const d of a)u(d);a.length=0}};return(()=>{i=new WebSocket(e),i.onopen=()=>{c()},i.onmessage=d=>{try{const f=JSON.parse(d.data);t(f)}catch(f){console.error("Failed to parse message:",f)}},i.onclose=()=>{a=[],n(),i=null},i.onerror=d=>{r(d)}})(),{sendMessage:d=>{i&&(s()?u(d):i.readyState===WebSocket.CONNECTING&&a.push(d))},uploadFile:async(d,f)=>{if(!s())return{success:!1,error:"Not connected"};const p=Q5(d);if(!p.valid)return{success:!1,error:p.error};try{const g=await X5(d);return s()?(o({type:"file_upload",fileType:f,fileName:d.name,mimeType:d.type,data:g}),{success:!0}):{success:!1,error:"Connection lost while reading file. Please try again."}}catch(g){return{success:!1,error:g instanceof Error?g.message:"Failed to read file"}}},requestJobDetail:d=>{o({type:"job_detail",jobId:d})},clearData:()=>{o({type:"clear_data"})},disconnect:()=>{i&&(i.close(),i=null)},isConnected:()=>i?.readyState===WebSocket.OPEN}}const wl=2e3,Al=xt({base:"absolute bottom-full left-1/2 mb-2 -translate-x-1/2 rounded-kin-md corner-smooth px-3 py-2.5 text-xs leading-relaxed shadow-lg",variants:{tone:{error:"w-[calc(100%-1rem)] bg-red-600 text-white shadow-red-600/20",neutral:"whitespace-nowrap bg-n-12 text-n-1 shadow-n-12/20"},dismissing:{true:"animate-kin-toast-out",false:"animate-kin-toast-in"}}}),J5=xt({base:"w-full pt-1 px-2 pb-safe-b focus-within:pb-2 transition-all duration-kin ease-kin-fluid group-data-[placement=embedded]:pb-2",variants:{panelOpen:{true:"bg-gradient-to-b from-transparent to-n-2",false:"px-5 sm:px-14 group-data-[placement=left]:sm:pl-2 group-data-[placement=left]:sm:pr-24 group-data-[placement=right]:sm:pl-24 group-data-[placement=right]:sm:pr-2"}}}),ew=xt({base:"border outline relative flex p-0.5 gap-1 flex-col corner-smooth rounded-kin-3xl bg-highest transition-all duration-kin ease-kin-fluid",variants:{panelOpen:{true:"outline-1 outline-transparent border-n-4 focus-within:outline-[3px] focus-within:outline-a-4/50 focus-within:border-a-6/50 shadow-md shadow-n-4/30",false:"outline-2 outline-a-9 border-transparent shadow-xl shadow-a-9/10"},unread:{true:"after:absolute after:-inset-0.5 after:outline-offset-2 after:outline after:outline-a-9/20 after:outline-2 after:rounded-kin-3xl after:corner-smooth after:pointer-events-none after:animate-kin-pulse after:content-['']"}}});function tw({panelOpen:e,suggestions:t,onSubmit:n,onEscape:r,onFocus:i,onBlur:a,onUploadFile:s,inputRef:o}){const[u,c]=he(""),[h,d]=he(!1),f=Ce(null),p=Ce(),g=F.isStreaming.value,k=F.connectionState.value,C=F.uploadState.value,w=F.uploadError.value,A=F.uploadFileName.value;be(()=>{if(C!=="error"){d(!1),clearTimeout(p.current);return}return p.current=setTimeout(()=>d(!0),5e3),()=>clearTimeout(p.current)},[C]);const x=()=>d(!0),L=()=>{h&&F.setUploadState("idle")},P=()=>clearTimeout(p.current),v=()=>{C==="error"&&!h&&(p.current=setTimeout(()=>d(!0),2e3))},V=k==="connected",O=k==="connecting",Y=k==="disconnected",I=k==="idle",$=C==="uploading"||C==="processing",M=u.length>wl,K=u.trim(),re=K.length>0,X=t.length>0,ie=A?`Uploading ${A}...`:"Uploading file...",le=re&&!g&&!$&&!M&&(V||O),we=V&&!g&&!$,De=X?"Or type a message...":$?ie:O?"Connecting...":Y?"Disconnected – Tap to retry":g?"Waiting for response...":!e&&F.hasUnreadMessages.value?"You have a new reply":!e&&F.messages.value.length>0?"Continue conversation...":"Ask me anything...",_=$?ie:g?"Waiting for response":I?"Click to connect":O?"Connecting...":re?V?"Send message":"Cannot send message":"Enter a message to send",Le=$?ie:we?"Attach file (CV, document, or image)":"Cannot upload file",ee=U=>{U.preventDefault(),le&&(n(K),c(""),o.current&&(o.current.style.height="auto"))},y=U=>{U.key==="Enter"&&!U.shiftKey?(U.preventDefault(),ee(U)):U.key==="Escape"&&(U.preventDefault(),U.stopPropagation(),r())},Se=U=>{const j=U.target,fe=j.files?.[0];fe&&s(fe,"cv"),j.value=""};return m("div",{class:J5({panelOpen:e}),role:"search","aria-label":"Chat with Kin AI",children:m("form",{onSubmit:ee,class:ew({panelOpen:e,unread:!e&&F.hasUnreadMessages.value}),autoComplete:"off",children:[X&&m("div",{class:"bg-n-3/75 corner-smooth shadow-n-4/50 rounded-b-kin-sm rounded-t-kin-2xl flex flex-wrap gap-1.5 p-2 shadow-inner","aria-label":"Suggested prompts",children:t.map((U,j)=>m("button",{type:"button",class:"fr bg-highest animate-kin-pop-in text-n-11 corner-smooth outline-n-4/50 hover:outline-n-7/50 hover:text-n-12 rounded-kin-xl ease-kin-click inline-flex items-center whitespace-nowrap px-3 py-1.5 text-sm outline outline-1 transition-all hover:outline-2 active:scale-95",style:{animationDelay:`${.05+j*.05}s`},onPointerDown:fe=>fe.preventDefault(),onClick:()=>n(U.value),children:U.label},U.id))}),m("div",{class:"flex items-end gap-1 p-1 pl-3",children:[m("label",{for:"kin-input",class:"sr-only",children:"Ask Kin a question"}),m("textarea",{id:"kin-input",ref:o,rows:1,enterkeyhint:"send",class:"text-n-12 placeholder:text-n-9 -my-[0.125em] max-h-[6.5em] min-w-0 flex-1 resize-none self-center overflow-y-auto overscroll-none border-none bg-transparent px-0 py-[0.25em] text-base outline-none [mask-image:linear-gradient(to_bottom,transparent_0,_black_0.5em,_black_calc(100%-0.5em),transparent_100%)] disabled:cursor-not-allowed sm:text-sm",placeholder:De,value:u,onInput:U=>{const j=U.target;c(j.value),j.style.height="auto",j.style.height=`${j.scrollHeight}px`},onFocus:i,onBlur:U=>a(U.relatedTarget),onKeyDown:y,"aria-describedby":"kin-input-status",autoComplete:"off",disabled:$}),m("input",{ref:f,type:"file",class:"sr-only",accept:K5,onChange:Se,"aria-hidden":"true",tabIndex:-1}),m(Bh,{content:Le,children:m("button",{type:"button",class:yt({variant:"ghost"}),disabled:!we,"aria-label":Le,onPointerDown:U=>U.preventDefault(),onClick:()=>f.current?.click(),children:$?m(Pf,{class:"animate-kin-spin"}):m(pc,{})})}),m("button",{type:"submit",class:yt({variant:"accent"}),disabled:!le,"aria-label":_,onPointerDown:U=>U.preventDefault(),children:m(Rf,{strokeWidth:2})})]}),m("div",{id:"kin-input-status",class:"sr-only",role:"status","aria-live":"polite",children:[O&&"Connecting to Kin...",Y&&"Connection lost. Click input to retry.",g&&"Kin is responding...",$&&ie]}),w&&C==="error"&&m("div",{class:Al({tone:"error",dismissing:h,class:"flex items-start gap-2"}),role:"alert",onAnimationEnd:L,onMouseEnter:P,onMouseLeave:v,children:[m("span",{class:"flex-1",children:w}),m("button",{type:"button",class:"-mr-1 -mt-0.5 flex size-5 flex-shrink-0 items-center justify-center rounded-full text-white/60 transition-colors hover:text-white/100","aria-label":"Dismiss",onClick:x,children:m(ls,{class:"size-3.5",strokeWidth:2.5})})]}),M&&m("div",{class:Al({tone:"neutral",dismissing:!1}),role:"alert",children:["Message too long (",u.length.toLocaleString(),"/",wl.toLocaleString()," characters)"]})]})})}const ba="(hover: none) and (pointer: coarse)",nw='a[href], button:not([disabled]), input:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])',Fh=xt({base:"pointer-events-auto sm:w-[480px] rounded-t-kin-4xl flex w-full flex-col transition-all outline outline-1 outline-transparent duration-kin sm:rounded-kin-4xl corner-smooth ease-kin-fluid group-data-[placement=left]:sm:left-4 group-data-[placement=right]:sm:right-4 group-data-[placement=center]:sm:justify-self-center",variants:{layout:{embedded:"h-full rounded-none bg-n-1 outline-none sm:w-full sm:rounded-none self-stretch",closed:"bottom-0 sm:bottom-4 self-end absolute",open:"bottom-0 absolute self-end sm:bottom-4 sm:min-h-[50vh] h-[calc(var(--kin-vv-h,100dvh)_-_var(--kin-inset,1.5rem))] sm:h-auto top-[calc(var(--kin-vv-top,0px)_+_var(--kin-inset,1.5rem))] sm:top-auto bg-n-1 overflow-hidden sm:max-h-[calc(min(90vh,var(--kin-vv-h,90svh))_-_var(--kin-inset,1.5rem))] outline-n-6/50 shadow-2xl shadow-n-6/30 [touch-action:manipulation]"}}}),Hh=xt({base:"absolute inset-0 bg-black/20 transition-opacity duration-kin ease-kin-fluid",variants:{visible:{false:"pointer-events-none opacity-0",true:"pointer-events-auto opacity-100"}}});function rw({starterPrompts:e,onSendMessage:t,onOpen:n,onClose:r,onConnect:i,onClearData:a,onUploadFile:s,onClipInset:o,placement:u={desktop:"center",mobile:"center"},launcher:c={desktop:"input",mobile:"icon"},logo:h=null}){const d=F.embedded.value,f=F.isOpen.value,p=d?"embedded":f?"open":"closed",g=p!=="closed",[k,C]=he(!1),[w,A]=he(()=>typeof window<"u"&&window.matchMedia(ba).matches);be(()=>{const U=window.matchMedia(ba),j=fe=>A(fe.matches);return U.addEventListener("change",j),()=>U.removeEventListener("change",j)},[]);const x=w?u.mobile:u.desktop,L=w?c.mobile:c.desktop,P=Ce(null),v=Ce(null),V=Ce(null),O=Ce(null),Y=F.messages.value.length>0,I=F.quickReplies.value,$=!Y&&e.length>0&&(k||!d&&g&&L==="icon"),M=g&&I.length>0,K=$?e.map((U,j)=>({id:`sp-${j}`,label:U.label,value:U.message})):M?I.map((U,j)=>({id:`qr-${j}`,label:U,value:U})):[];be(()=>{if(g){const U=document.activeElement;V.current=U instanceof HTMLElement&&!P.current?.contains(U)?U:null,requestAnimationFrame(()=>O.current?.focus())}else C(!1)},[g]),be(()=>{d&&!f&&n()},[d,n,f]),be(()=>{if(p!=="open")return;const U=window.matchMedia(ba);if(!U.matches)return;const j=P.current,fe=window.visualViewport;if(!j||!fe)return;const me=()=>{j.style.setProperty("--kin-vv-h",`${fe.height}px`),j.style.setProperty("--kin-vv-top",`${fe.offsetTop}px`)};me(),fe.addEventListener("resize",me),fe.addEventListener("scroll",me);let J=0;const Pe=We=>{J=We.touches[0]?.clientY??0},Ie=We=>{const Rr=J-(We.touches[0]?.clientY??J),Mn=We.composedPath(),Bn=Mn.indexOf(j);if(Bn<0)return;const qi=Rt=>Rt instanceof Element&&(Rr>0?Rt.scrollTop+Rt.clientHeight<Rt.scrollHeight-1:Rt.scrollTop>0);We.cancelable&&!Mn.slice(0,Bn).some(qi)&&We.preventDefault()};document.addEventListener("touchstart",Pe,{passive:!0}),document.addEventListener("touchmove",Ie,{passive:!1});const lt=()=>{fe.removeEventListener("resize",me),fe.removeEventListener("scroll",me),j.style.removeProperty("--kin-vv-h"),j.style.removeProperty("--kin-vv-top"),document.removeEventListener("touchstart",Pe),document.removeEventListener("touchmove",Ie)},mt=We=>{We.matches||lt()};return U.addEventListener("change",mt),()=>{lt(),U.removeEventListener("change",mt)}},[p]),be(()=>{if(p!=="open")return;const U=j=>{if(j.key!=="Tab")return;const fe=P.current;if(!fe)return;const me=fe.querySelectorAll(nw),J=me[0],Pe=me[me.length-1];if(!J||!Pe)return;const Ie=document.activeElement;j.shiftKey&&Ie===J?(j.preventDefault(),Pe.focus()):!j.shiftKey&&Ie===Pe&&(j.preventDefault(),J.focus())};return document.addEventListener("keydown",U),()=>document.removeEventListener("keydown",U)},[p]);const re=()=>{p==="closed"&&n()},X=()=>{O.current?.blur(),r(),V.current&&requestAnimationFrame(()=>V.current?.focus())},{shellRef:ie,isClosing:le,closeWithSlideOut:we,dragHandlers:De}=Rh({enabled:p==="open"&&!d,onClose:X,dragVar:"--kin-shell-drag"});be(()=>{const U=L==="icon"?v.current:ie.current;if(!U||d||p==="open")return;const j=L==="icon"?12:16,fe=L==="icon"?j:48,me=window.visualViewport,J=()=>{if(U.style.transform)return;const Ie=U.getBoundingClientRect();if(Ie.width<=0&&Ie.height<=0)return;const lt=window.innerWidth,mt=window.innerHeight;Ie.top>=mt||o?.({top:Math.max(0,Math.floor(Ie.top)-fe),right:Math.max(0,Math.floor(lt-Ie.right)-j),bottom:0,left:Math.max(0,Math.floor(Ie.left)-j)})},Pe=new ResizeObserver(J);return Pe.observe(U),window.addEventListener("resize",J),me?.addEventListener("resize",J),me?.addEventListener("scroll",J),U.addEventListener("transitionend",J),J(),()=>{Pe.disconnect(),window.removeEventListener("resize",J),me?.removeEventListener("resize",J),me?.removeEventListener("scroll",J),U.removeEventListener("transitionend",J)}},[x,d,L,p,o]);const _=U=>{const j=U.trim();if(!j)return;const fe=F.isStreaming.value,me=F.uploadState.value==="uploading"||F.uploadState.value==="processing",J=F.connectionState.value;!fe&&!me&&(J==="connected"||J==="connecting")&&(F.addMessage({role:"user",content:j}),re(),i(),t(j))},Le=()=>{C(!0),i(),!g&&Y&&re()},ee=U=>{U instanceof Node&&P.current?.contains(U)||C(!1)},y=()=>{g?we():O.current?.blur()},Se=(U,j)=>{re(),s(U,j)};return m("div",{ref:P,class:si("font-kin text-kin text-n-12 group pointer-events-none",d?"relative h-full":"fixed inset-0"),"data-placement":x,"data-kin-root":!0,role:"region","aria-label":"Kin AI Chat",children:[!d&&m("div",{class:Hh({visible:p==="open"&&!le}),style:p==="open"&&!le?{opacity:"calc(1 - var(--kin-shell-drag, 0))"}:void 0,"aria-hidden":"true",onClick:we}),m("div",{ref:ie,class:Fh({layout:p,class:"group-has-[[data-dragging]]:!transition-none"}),style:F.overlay.value!==null?{transformOrigin:"top",transform:"translate3d(0, calc(-8px + 8px * var(--kin-overlay-drag, 0)), 0) scale(calc(0.96 + 0.04 * var(--kin-overlay-drag, 0)))"}:void 0,role:g&&!d?"dialog":void 0,"aria-modal":g&&!d,...De,children:[m("div",{class:"sr-only",role:"status","aria-live":"polite","aria-atomic":"true",children:g?"Chat panel opened":""}),g&&m(V5,{embedded:d,onClose:we,onClearData:a,onSkipToInput:()=>O.current?.focus()}),!g&&L==="icon"?m(W5,{buttonRef:v,logo:h,onOpen:re,placement:x}):m(tw,{panelOpen:g,suggestions:K,onSubmit:_,onEscape:y,onFocus:Le,onBlur:ee,onUploadFile:Se,inputRef:O})]}),F.overlay.value]})}const iw=`*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*{box-sizing:border-box;font:inherit;border:0 solid;-webkit-tap-highlight-color:transparent}button{all:unset;cursor:pointer;touch-action:manipulation}ul,ol,li,p{margin:0;padding:0}ul,ol{list-style:none}svg{display:block}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.pointer-events-none{pointer-events:none}.pointer-events-auto{pointer-events:auto}.visible{visibility:visible}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.inset-0{inset:0}.-bottom-1\\.5{bottom:-.375rem}.-top-full{top:-100%}.bottom-0{bottom:0}.bottom-3{bottom:.75rem}.bottom-full{bottom:100%}.left-1\\/2{left:50%}.left-\\[--ax\\]{left:var(--ax)}.right-1\\.5{right:.375rem}.top-2{top:.5rem}.top-\\[calc\\(var\\(--kin-vv-top\\,0px\\)_\\+_var\\(--kin-inset\\,1\\.5rem\\)\\)\\]{top:calc(var(--kin-vv-top,0px) + var(--kin-inset,1.5rem))}.z-50{z-index:50}.z-\\[999999\\]{z-index:999999}.col-span-full{grid-column:1 / -1}.row-span-full{grid-row:1 / -1}.m-0{margin:0}.-my-\\[0\\.125em\\]{margin-top:-.125em;margin-bottom:-.125em}.my-auto{margin-top:auto;margin-bottom:auto}.-mr-1{margin-right:-.25rem}.-mt-0\\.5{margin-top:-.125rem}.mb-2{margin-bottom:.5rem}.block{display:block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.grid{display:grid}.hidden{display:none}.size-10{width:2.5rem;height:2.5rem}.size-12{width:3rem;height:3rem}.size-3{width:.75rem;height:.75rem}.size-3\\.5{width:.875rem;height:.875rem}.size-5{width:1.25rem;height:1.25rem}.size-6{width:1.5rem;height:1.5rem}.size-8{width:2rem;height:2rem}.size-full{width:100%;height:100%}.h-1{height:.25rem}.h-\\[calc\\(var\\(--kin-vv-h\\,100dvh\\)_-_var\\(--kin-inset\\,1\\.5rem\\)\\)\\]{height:calc(var(--kin-vv-h,100dvh) - var(--kin-inset,1.5rem))}.h-full{height:100%}.max-h-\\[6\\.5em\\]{max-height:6.5em}.min-h-0{min-height:0px}.w-12{width:3rem}.w-4{width:1rem}.w-6{width:1.5rem}.w-\\[calc\\(100\\%-1rem\\)\\]{width:calc(100% - 1rem)}.w-full{width:100%}.min-w-0{min-width:0px}.max-w-\\[95\\%\\]{max-width:95%}.max-w-full{max-width:100%}.flex-1{flex:1 1 0%}.flex-shrink-0,.shrink-0{flex-shrink:0}.origin-\\[--origin\\]{transform-origin:var(--origin)}.-translate-x-1\\/2{--tw-translate-x: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rotate-180{--tw-rotate: 180deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-100{--tw-scale-x: 1;--tw-scale-y: 1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-50{--tw-scale-x: .5;--tw-scale-y: .5;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-90{--tw-scale-x: .9;--tw-scale-y: .9;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes kin-drawer-in{0%{transform:translateY(100%)}to{transform:translateY(0)}}.animate-kin-drawer-in{animation:kin-drawer-in .24s var(--kin-fluid-ease) backwards}@keyframes kin-fade{0%{opacity:0}to{opacity:1}}.animate-kin-fade-in{animation:kin-fade .4s ease both}@keyframes kin-slide-up{0%{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}.animate-kin-message-in{animation:kin-slide-up .24s var(--kin-fluid-ease) both}@keyframes kin-pop{0%{opacity:0;scale:.9}to{opacity:1;scale:1}}.animate-kin-pop-in{animation:kin-pop .24s cubic-bezier(.34,1.56,.64,1) backwards}@keyframes kin-shimmer{0%{background-position:200% 50%}to{background-position:-200% 50%}}.animate-kin-shimmer{animation:kin-shimmer 2.5s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}.animate-kin-spin{animation:spin 1s linear infinite}@keyframes kin-toast-in{0%{opacity:0;transform:translate(-50%) translateY(16px)}to{opacity:1;transform:translate(-50%) translateY(0)}}.animate-kin-toast-in{animation:kin-toast-in .28s var(--kin-fluid-ease) both}@keyframes kin-toast-out{0%{opacity:1;transform:translate(-50%) translateY(0)}to{opacity:0;transform:translate(-50%) translateY(16px)}}.animate-kin-toast-out{animation:kin-toast-out .22s var(--kin-fluid-ease) forwards}.animate-none{animation:none}@keyframes pulse{50%{opacity:.5}}.animate-pulse{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.resize-none{resize:none}.resize{resize:both}.grid-rows-\\[0fr\\]{grid-template-rows:0fr}.grid-rows-\\[1fr\\]{grid-template-rows:1fr}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.place-items-center{place-items:center}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center{align-items:center}.justify-start{justify-content:flex-start}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-1{gap:.25rem}.gap-1\\.5{gap:.375rem}.gap-2{gap:.5rem}.gap-2\\.5{gap:.625rem}.gap-4{gap:1rem}.gap-x-2\\.5{-moz-column-gap:.625rem;column-gap:.625rem}.gap-y-1{row-gap:.25rem}.self-start{align-self:flex-start}.self-end{align-self:flex-end}.self-center{align-self:center}.self-stretch{align-self:stretch}.overflow-hidden{overflow:hidden}.overflow-clip{overflow:clip}.overflow-y-auto{overflow-y:auto}.overscroll-none{overscroll-behavior:none}.scroll-smooth{scroll-behavior:smooth}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.whitespace-nowrap{white-space:nowrap}.break-words{overflow-wrap:break-word}.rounded{border-radius:.25rem}.rounded-full{border-radius:9999px}.rounded-kin-2xl{border-radius:var(--kin-r-2xl)}.rounded-kin-3xl{border-radius:var(--kin-r-3xl)}.rounded-kin-lg{border-radius:var(--kin-r-lg)}.rounded-kin-md{border-radius:var(--kin-r-md)}.rounded-kin-sm{border-radius:var(--kin-r-sm)}.rounded-kin-xl{border-radius:var(--kin-r-xl)}.rounded-none{border-radius:0}.rounded-b-kin-sm{border-bottom-right-radius:var(--kin-r-sm);border-bottom-left-radius:var(--kin-r-sm)}.rounded-t-kin-2xl{border-top-left-radius:var(--kin-r-2xl);border-top-right-radius:var(--kin-r-2xl)}.rounded-t-kin-4xl{border-top-left-radius:var(--kin-r-4xl);border-top-right-radius:var(--kin-r-4xl)}.border{border-width:1px}.border-t{border-top-width:1px}.border-none{border-style:none}.border-n-3{--tw-border-opacity: 1;border-color:oklch(var(--n-3) / var(--tw-border-opacity, 1))}.border-n-4{--tw-border-opacity: 1;border-color:oklch(var(--n-4) / var(--tw-border-opacity, 1))}.border-n-6\\/40{border-color:oklch(var(--n-6) / .4)}.border-transparent{border-color:transparent}.bg-a-9{--tw-bg-opacity: 1;background-color:oklch(var(--a-9) / var(--tw-bg-opacity, 1))}.bg-black\\/20{background-color:#0003}.bg-highest{--tw-bg-opacity: 1;background-color:oklch(var(--highest) / var(--tw-bg-opacity, 1))}.bg-n-1{--tw-bg-opacity: 1;background-color:oklch(var(--n-1) / var(--tw-bg-opacity, 1))}.bg-n-12{--tw-bg-opacity: 1;background-color:oklch(var(--n-12) / var(--tw-bg-opacity, 1))}.bg-n-2{--tw-bg-opacity: 1;background-color:oklch(var(--n-2) / var(--tw-bg-opacity, 1))}.bg-n-3{--tw-bg-opacity: 1;background-color:oklch(var(--n-3) / var(--tw-bg-opacity, 1))}.bg-n-3\\/75{background-color:oklch(var(--n-3) / .75)}.bg-n-5\\/50{background-color:oklch(var(--n-5) / .5)}.bg-red-600{--tw-bg-opacity: 1;background-color:rgb(220 38 38 / var(--tw-bg-opacity, 1))}.bg-transparent{background-color:transparent}.bg-\\[linear-gradient\\(90deg\\,oklch\\(var\\(--n-9\\)\\)_40\\%\\,oklch\\(var\\(--n-11\\)\\)_50\\%\\,oklch\\(var\\(--n-9\\)\\)_60\\%\\)\\]{background-image:linear-gradient(90deg,oklch(var(--n-9)) 40%,oklch(var(--n-11)) 50%,oklch(var(--n-9)) 60%)}.bg-gradient-to-b{background-image:linear-gradient(to bottom,var(--tw-gradient-stops))}.from-a-2\\/50{--tw-gradient-from: oklch(var(--a-2) / .5) var(--tw-gradient-from-position);--tw-gradient-to: rgb(255 255 255 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-transparent{--tw-gradient-from: transparent var(--tw-gradient-from-position);--tw-gradient-to: rgb(0 0 0 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.to-n-2{--tw-gradient-to: oklch(var(--n-2) / 1) var(--tw-gradient-to-position)}.to-transparent{--tw-gradient-to: transparent var(--tw-gradient-to-position)}.bg-\\[length\\:200\\%_100\\%\\]{background-size:200% 100%}.bg-clip-text{-webkit-background-clip:text;background-clip:text}.fill-n-12{fill:oklch(var(--n-12) / 1)}.object-contain{-o-object-fit:contain;object-fit:contain}.p-0\\.5{padding:.125rem}.p-1{padding:.25rem}.p-2{padding:.5rem}.p-3{padding:.75rem}.p-4{padding:1rem}.px-0{padding-left:0;padding-right:0}.px-2{padding-left:.5rem;padding-right:.5rem}.px-2\\.5{padding-left:.625rem;padding-right:.625rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-3\\.5{padding-left:.875rem;padding-right:.875rem}.px-4{padding-left:1rem;padding-right:1rem}.px-5{padding-left:1.25rem;padding-right:1.25rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\\.5{padding-top:.375rem;padding-bottom:.375rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-2\\.5{padding-top:.625rem;padding-bottom:.625rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-4{padding-top:1rem;padding-bottom:1rem}.py-6{padding-top:1.5rem;padding-bottom:1.5rem}.py-\\[0\\.25em\\]{padding-top:.25em;padding-bottom:.25em}.pb-1{padding-bottom:.25rem}.pb-safe-b{padding-bottom:max(.5rem,calc(env(safe-area-inset-bottom,0px) + .5rem))}.pl-1{padding-left:.25rem}.pl-2{padding-left:.5rem}.pl-3{padding-left:.75rem}.pl-5{padding-left:1.25rem}.pl-safe-l{padding-left:max(1rem,env(safe-area-inset-left,1rem))}.pr-2{padding-right:.5rem}.pr-5{padding-right:1.25rem}.pr-safe-r{padding-right:max(1rem,env(safe-area-inset-right,1rem))}.pt-1{padding-top:.25rem}.pt-1\\.5{padding-top:.375rem}.pt-2{padding-top:.5rem}.text-left{text-align:left}.text-center{text-align:center}.font-kin{font-family:var(--kin-font-family)}.text-\\[11px\\]{font-size:11px}.text-base{font-size:1rem;line-height:1.5rem}.text-kin{font-size:max(14px,1rem);line-height:1.5}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xs{font-size:.75rem;line-height:1rem}.font-medium{font-weight:500}.font-semibold{font-weight:600}.italic{font-style:italic}.leading-relaxed{line-height:1.625}.leading-tight{line-height:1.25}.text-inherit{color:inherit}.text-n-1{--tw-text-opacity: 1;color:oklch(var(--n-1) / var(--tw-text-opacity, 1))}.text-n-10{--tw-text-opacity: 1;color:oklch(var(--n-10) / var(--tw-text-opacity, 1))}.text-n-11{--tw-text-opacity: 1;color:oklch(var(--n-11) / var(--tw-text-opacity, 1))}.text-n-12{--tw-text-opacity: 1;color:oklch(var(--n-12) / var(--tw-text-opacity, 1))}.text-n-3{--tw-text-opacity: 1;color:oklch(var(--n-3) / var(--tw-text-opacity, 1))}.text-n-9{--tw-text-opacity: 1;color:oklch(var(--n-9) / var(--tw-text-opacity, 1))}.text-transparent{color:transparent}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.text-white\\/60{color:#fff9}.underline{text-decoration-line:underline}.no-underline{text-decoration-line:none}.underline-offset-2{text-underline-offset:2px}.opacity-0{opacity:0}.opacity-100{opacity:1}.shadow-2xl{--tw-shadow: 0 25px 50px -12px rgb(0 0 0 / .25);--tw-shadow-colored: 0 25px 50px -12px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-inner{--tw-shadow: inset 0 2px 4px 0 rgb(0 0 0 / .05);--tw-shadow-colored: inset 0 2px 4px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-md{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-xl{--tw-shadow: 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1);--tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-a-9\\/10{--tw-shadow-color: oklch(var(--a-9) / .1);--tw-shadow: var(--tw-shadow-colored)}.shadow-a-9\\/20{--tw-shadow-color: oklch(var(--a-9) / .2);--tw-shadow: var(--tw-shadow-colored)}.shadow-n-12\\/20{--tw-shadow-color: oklch(var(--n-12) / .2);--tw-shadow: var(--tw-shadow-colored)}.shadow-n-4\\/30{--tw-shadow-color: oklch(var(--n-4) / .3);--tw-shadow: var(--tw-shadow-colored)}.shadow-n-4\\/50{--tw-shadow-color: oklch(var(--n-4) / .5);--tw-shadow: var(--tw-shadow-colored)}.shadow-n-6\\/30{--tw-shadow-color: oklch(var(--n-6) / .3);--tw-shadow: var(--tw-shadow-colored)}.shadow-red-600\\/20{--tw-shadow-color: rgb(220 38 38 / .2);--tw-shadow: var(--tw-shadow-colored)}.outline-none{outline:2px solid transparent;outline-offset:2px}.outline{outline-style:solid}.outline-1{outline-width:1px}.outline-2{outline-width:2px}.outline-a-9{outline-color:oklch(var(--a-9) / 1)}.outline-n-3{outline-color:oklch(var(--n-3) / 1)}.outline-n-4\\/50{outline-color:oklch(var(--n-4) / .5)}.outline-n-6\\/50{outline-color:oklch(var(--n-6) / .5)}.outline-transparent{outline-color:transparent}.blur{--tw-blur: blur(8px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.blur-0{--tw-blur: blur(0);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.blur-sm{--tw-blur: blur(4px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-\\[opacity\\,transform\\]{transition-property:opacity,transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-200{transition-duration:.2s}.duration-kin{transition-duration:.24s}.ease-kin-click{transition-timing-function:cubic-bezier(.5,.1,.9,.1)}.ease-kin-fluid{transition-timing-function:var(--kin-fluid-ease)}.ease-out-back{transition-timing-function:cubic-bezier(.34,1.56,.64,1)}.fr:focus-visible{outline:2px solid oklch(var(--a-9) / .5);outline-offset:2px}.corner-smooth{corner-shape:superellipse(1.25)}.\\[--kin-inset\\:0px\\]{--kin-inset: 0px}.\\[--kin-inset\\:2rem\\]{--kin-inset: 2rem}.\\[mask-image\\:linear-gradient\\(to_bottom\\,transparent_0\\,_black_0\\.5em\\,_black_calc\\(100\\%-0\\.5em\\)\\,transparent_100\\%\\)\\]{-webkit-mask-image:linear-gradient(to bottom,transparent 0,black .5em,black calc(100% - .5em),transparent 100%);mask-image:linear-gradient(to bottom,transparent 0,black .5em,black calc(100% - .5em),transparent 100%)}.\\[mask-image\\:linear-gradient\\(to_bottom\\,transparent_0\\,_black_1\\.5rem\\,_black_calc\\(100\\%-1\\.5rem\\)\\,transparent_100\\%\\)\\,linear-gradient\\(black\\,black\\)\\]{-webkit-mask-image:linear-gradient(to bottom,transparent 0,black 1.5rem,black calc(100% - 1.5rem),transparent 100%),linear-gradient(black,black);mask-image:linear-gradient(to bottom,transparent 0,black 1.5rem,black calc(100% - 1.5rem),transparent 100%),linear-gradient(black,black)}.\\[mask-position\\:0_0\\,100\\%_0\\]{-webkit-mask-position:0 0,100% 0;mask-position:0 0,100% 0}.\\[mask-repeat\\:no-repeat\\,no-repeat\\]{-webkit-mask-repeat:no-repeat,no-repeat;mask-repeat:no-repeat,no-repeat}.\\[mask-size\\:calc\\(100\\%-6px\\)_100\\%\\,6px_100\\%\\]{-webkit-mask-size:calc(100% - 6px) 100%,6px 100%;mask-size:calc(100% - 6px) 100%,6px 100%}.\\[touch-action\\:manipulation\\]{touch-action:manipulation}.\\[will-change\\:transform\\,opacity\\]{will-change:transform,opacity}:root{font-size:16px;--a-1: 99.4% .003 22.8;--a-2: 98.4% .007 31;--a-3: 95.4% .022 30.9;--a-4: 92.6% .047 31.8;--a-5: 89.2% .063 31.5;--a-6: 85.2% .077 32;--a-7: 80.3% .094 32.2;--a-8: 74.1% .118 32.1;--a-9: 62.7% .194 33.3;--a-10: 60.4% .195 33.3;--a-11: 56.7% .198 32.8;--a-12: 34.6% .08 30.5;--n-1: 99.1% 0 0;--n-2: 98.1% 0 0;--n-3: 95.3% 0 0;--n-4: 93% 0 0;--n-5: 90.8% 0 0;--n-6: 88.4% 0 0;--n-7: 85.1% 0 0;--n-8: 79.1% 0 0;--n-9: 64.3% 0 0;--n-10: 60.9% 0 0;--n-11: 50.3% 0 0;--n-12: 24.3% 0 0;--kin-vv-h:calc(100dvh - 16px);--kin-vv-top: 16px;--kin-fluid-ease: cubic-bezier(.88, .77, .12, .98);--kin-font-family: inherit}.kin-markdown p{margin:0 0 1em}.kin-markdown p:last-child{margin-bottom:0}.kin-markdown :is(strong,b){font-weight:600}.kin-markdown :is(em,i){font-style:italic}.kin-markdown code{background:rgba(255,255,255,.1);padding:.15em .4em;border-radius:var(--kin-r-xs);font-family:SF Mono,Monaco,Consolas,monospace;font-size:.875em}.kin-markdown pre{background:rgba(0,0,0,.4);padding:14px 16px;border-radius:var(--kin-r-sm);overflow-x:auto;margin:1em 0;border:1px solid oklch(var(--n-6) / .4)}.kin-markdown pre code{background:none;padding:0;font-size:.85em;line-height:1.5}.kin-markdown :is(ul,ol){margin:.75em 0;padding-left:1.5em}.kin-markdown ul{list-style-type:disc}.kin-markdown ol{list-style-type:decimal}.kin-markdown li{margin:.35em 0}.kin-markdown li::marker{color:oklch(var(--n-9))}.kin-markdown :is(ul,ol) :is(ul,ol){margin:.25em 0}.kin-markdown blockquote{border-left:3px solid oklch(var(--a-9));margin:1em 0;padding:.5em 0 .5em 1em;color:oklch(var(--n-11));font-style:italic}.kin-markdown :is(h1,h2,h3,h4){font-weight:600;margin:1.25em 0 .5em;line-height:1.3}.kin-markdown :is(h1,h2,h3):first-child{margin-top:0}.kin-markdown h1{font-size:1.4em}.kin-markdown h2{font-size:1.25em}.kin-markdown h3{font-size:1.1em}.kin-markdown table{width:100%;border-collapse:collapse;margin:1em 0;font-size:.9em}.kin-markdown :is(th,td){padding:.5em .75em;border:1px solid oklch(var(--n-6) / .4);text-align:left}.kin-markdown th{background:oklch(var(--n-4));font-weight:600}.kin-markdown hr{border:none;border-top:1px solid oklch(var(--n-6) / .4);margin:1.5em 0}.kin-markdown hr+p{display:flex;flex-wrap:wrap;align-items:center;gap:5px;font-size:.75em;color:oklch(var(--n-9));margin:-1em 0 0;line-height:1.6}.kin-markdown input[type=checkbox]{margin-right:.5em;accent-color:oklch(var(--a-9))}.kin-markdown .streamdown-caret{display:inline-block;width:2px;height:1em;background:oklch(var(--a-9));margin-left:2px;animation:kin-caret 1s ease-in-out infinite;vertical-align:text-bottom}@keyframes kin-caret{0%,to{opacity:1}50%{opacity:0}}@media (prefers-reduced-motion: reduce){*,*:before,*:after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}}[data-dragging],[data-dragging] *{touch-action:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;cursor:grabbing}.placeholder\\:text-n-9::-moz-placeholder{--tw-text-opacity: 1;color:oklch(var(--n-9) / var(--tw-text-opacity, 1))}.placeholder\\:text-n-9::placeholder{--tw-text-opacity: 1;color:oklch(var(--n-9) / var(--tw-text-opacity, 1))}.after\\:pointer-events-none:after{content:var(--tw-content);pointer-events:none}.after\\:absolute:after{content:var(--tw-content);position:absolute}.after\\:-inset-0\\.5:after{content:var(--tw-content);inset:-.125rem}@keyframes kin-fade-out{0%{content:var(--tw-content);opacity:1}to{content:var(--tw-content);opacity:0}}.after\\:animate-kin-pulse:after{content:var(--tw-content);animation:kin-fade-out 2.5s var(--kin-fluid-ease) infinite alternate-reverse}.after\\:rounded-kin-3xl:after{content:var(--tw-content);border-radius:var(--kin-r-3xl)}.after\\:outline:after{content:var(--tw-content);outline-style:solid}.after\\:outline-2:after{content:var(--tw-content);outline-width:2px}.after\\:outline-offset-2:after{content:var(--tw-content);outline-offset:2px}.after\\:outline-a-9\\/20:after{content:var(--tw-content);outline-color:oklch(var(--a-9) / .2)}.after\\:content-\\[\\'\\'\\]:after{--tw-content: "";content:var(--tw-content)}.after\\:corner-smooth:after{content:var(--tw-content);corner-shape:superellipse(1.25)}.first\\:border-t-0:first-child{border-top-width:0px}.first\\:pt-0:first-child{padding-top:0}.focus-within\\:border-a-6\\/50:focus-within{border-color:oklch(var(--a-6) / .5)}.focus-within\\:pb-2:focus-within{padding-bottom:.5rem}.focus-within\\:outline-\\[3px\\]:focus-within{outline-width:3px}.focus-within\\:outline-a-4\\/50:focus-within{outline-color:oklch(var(--a-4) / .5)}.hover\\:bg-a-10:hover{--tw-bg-opacity: 1;background-color:oklch(var(--a-10) / var(--tw-bg-opacity, 1))}.hover\\:bg-n-3:hover{--tw-bg-opacity: 1;background-color:oklch(var(--n-3) / var(--tw-bg-opacity, 1))}.hover\\:bg-n-3\\/50:hover{background-color:oklch(var(--n-3) / .5)}.hover\\:bg-n-4:hover{--tw-bg-opacity: 1;background-color:oklch(var(--n-4) / var(--tw-bg-opacity, 1))}.hover\\:text-a-9:hover{--tw-text-opacity: 1;color:oklch(var(--a-9) / var(--tw-text-opacity, 1))}.hover\\:text-n-11:hover{--tw-text-opacity: 1;color:oklch(var(--n-11) / var(--tw-text-opacity, 1))}.hover\\:text-n-12:hover{--tw-text-opacity: 1;color:oklch(var(--n-12) / var(--tw-text-opacity, 1))}.hover\\:text-white\\/100:hover{color:#fff}.hover\\:underline-offset-4:hover{text-underline-offset:4px}.hover\\:shadow-xl:hover{--tw-shadow: 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1);--tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.hover\\:outline-2:hover{outline-width:2px}.hover\\:outline-n-7\\/50:hover{outline-color:oklch(var(--n-7) / .5)}.focus\\:top-2:focus{top:.5rem}.focus-visible\\:rounded-kin-xs:focus-visible{border-radius:var(--kin-r-xs)}.active\\:scale-95:active{--tw-scale-x: .95;--tw-scale-y: .95;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.active\\:bg-n-3\\/75:active{background-color:oklch(var(--n-3) / .75)}.disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\\:text-n-6:disabled{--tw-text-opacity: 1;color:oklch(var(--n-6) / var(--tw-text-opacity, 1))}.disabled\\:opacity-50:disabled{opacity:.5}.group:has([data-dragging]) .group-has-\\[\\[data-dragging\\]\\]\\:\\!transition-none{transition-property:none!important}.data-\\[open\\]\\:scale-100[data-open]{--tw-scale-x: 1;--tw-scale-y: 1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\\[open\\]\\:opacity-100[data-open]{opacity:1}.data-\\[open\\]\\:delay-300[data-open]{transition-delay:.3s}.group[data-side=bottom] .group-data-\\[side\\=bottom\\]\\:-top-6{top:-1.5rem}.group[data-side=top] .group-data-\\[side\\=top\\]\\:-bottom-6{bottom:-1.5rem}.group[data-side=top] .group-data-\\[side\\=top\\]\\:rotate-180{--tw-rotate: 180deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.group[data-placement=embedded] .group-data-\\[placement\\=embedded\\]\\:pb-2{padding-bottom:.5rem}@media (min-width: 640px){.sm\\:bottom-4{bottom:1rem}.sm\\:top-auto{top:auto}.sm\\:size-7{width:1.75rem;height:1.75rem}.sm\\:size-8{width:2rem;height:2rem}.sm\\:h-auto{height:auto}.sm\\:max-h-\\[calc\\(min\\(90vh\\,var\\(--kin-vv-h\\,90svh\\)\\)_-_var\\(--kin-inset\\,1\\.5rem\\)\\)\\]{max-height:calc(min(90vh,var(--kin-vv-h,90svh)) - var(--kin-inset,1.5rem))}.sm\\:min-h-\\[50vh\\]{min-height:50vh}.sm\\:w-\\[480px\\]{width:480px}.sm\\:w-full{width:100%}@keyframes kin-slide-up{0%{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}.sm\\:animate-kin-panel-in{animation:kin-slide-up .35s var(--kin-fluid-ease) both}.sm\\:overscroll-auto{overscroll-behavior:auto}.sm\\:rounded-kin-4xl{border-radius:var(--kin-r-4xl)}.sm\\:rounded-kin-xl{border-radius:var(--kin-r-xl)}.sm\\:rounded-none{border-radius:0}.sm\\:p-2{padding:.5rem}.sm\\:px-14{padding-left:3.5rem;padding-right:3.5rem}.sm\\:px-4{padding-left:1rem;padding-right:1rem}.sm\\:px-5{padding-left:1.25rem;padding-right:1.25rem}.sm\\:text-sm{font-size:.875rem;line-height:1.25rem}.sm\\:font-medium{font-weight:500}.group[data-placement=left] .group-data-\\[placement\\=left\\]\\:sm\\:left-4{left:1rem}.group[data-placement=right] .group-data-\\[placement\\=right\\]\\:sm\\:right-4{right:1rem}.group[data-placement=center] .group-data-\\[placement\\=center\\]\\:sm\\:justify-self-center{justify-self:center}.group[data-placement=left] .group-data-\\[placement\\=left\\]\\:sm\\:pl-2{padding-left:.5rem}.group[data-placement=left] .group-data-\\[placement\\=left\\]\\:sm\\:pr-24{padding-right:6rem}.group[data-placement=right] .group-data-\\[placement\\=right\\]\\:sm\\:pl-24{padding-left:6rem}.group[data-placement=right] .group-data-\\[placement\\=right\\]\\:sm\\:pr-2{padding-right:.5rem}}.\\[\\&\\:\\:-webkit-scrollbar-thumb\\]\\:rounded-kin-xs::-webkit-scrollbar-thumb{border-radius:var(--kin-r-xs)}.\\[\\&\\:\\:-webkit-scrollbar-thumb\\]\\:bg-n-4::-webkit-scrollbar-thumb{--tw-bg-opacity: 1;background-color:oklch(var(--n-4) / var(--tw-bg-opacity, 1))}.\\[\\&\\:\\:-webkit-scrollbar-track\\]\\:bg-transparent::-webkit-scrollbar-track{background-color:transparent}.\\[\\&\\:\\:-webkit-scrollbar\\]\\:w-1\\.5::-webkit-scrollbar{width:.375rem}.\\[\\&\\>\\:first-child\\]\\:mt-auto>:first-child{margin-top:auto}.\\[\\&_svg\\]\\:size-3\\.5 svg{width:.875rem;height:.875rem}.\\[\\&_svg\\]\\:size-4 svg{width:1rem;height:1rem}.\\[\\&_svg\\]\\:size-6 svg{width:1.5rem;height:1.5rem}
|
|
120
|
+
`);return s+c+u})}return n},d5=/^[ \t]*<[\w!/?-]/,h5=/(^|\n)[ \t]{4,}(?=<[\w!/?-])/g,f5=e=>typeof e!="string"||e.length===0||!d5.test(e)?e:e.replace(h5,"$1"),bl,El,Jr={...sr,protocols:{...sr.protocols,href:[...(El=(bl=sr.protocols)==null?void 0:bl.href)!=null?El:[],"tel"]}},Za={raw:Pa,sanitize:[wd,Jr],harden:[hp,{allowedImagePrefixes:["*"],allowedLinkPrefixes:["*"],allowedProtocols:["*"],defaultOrigin:void 0,allowDataImages:!0}]},p5={gfm:[N3,{}]},_l=Object.values(Za),m5=Object.values(p5),g5={block:" ▋",circle:" ●"},b5={shikiTheme:["github-light","github-dark"],controls:!0,isAnimating:!1,mode:"streaming",mermaid:void 0,linkSafety:{enabled:!0}},ut=yi(b5),Nh=_e(({content:e,shouldParseIncompleteMarkdown:t,shouldNormalizeHtmlIndentation:n,index:r,isIncomplete:i,...a})=>{let s=typeof e=="string"&&n?f5(e):e;return m(Z0.Provider,{value:i,children:m(Ih,{...a,children:s})})},(e,t)=>{if(e.content!==t.content||e.shouldNormalizeHtmlIndentation!==t.shouldNormalizeHtmlIndentation||e.index!==t.index||e.isIncomplete!==t.isIncomplete)return!1;if(e.components!==t.components){let n=Object.keys(e.components||{}),r=Object.keys(t.components||{});if(n.length!==r.length||n.some(i=>{var a,s;return((a=e.components)==null?void 0:a[i])!==((s=t.components)==null?void 0:s[i])}))return!1}return!(e.rehypePlugins!==t.rehypePlugins||e.remarkPlugins!==t.remarkPlugins)});Nh.displayName="Block";var E5=["github-light","github-dark"],Lh=_e(({children:e,mode:t="streaming",parseIncompleteMarkdown:n=!0,normalizeHtmlIndentation:r=!1,components:i,rehypePlugins:a=_l,remarkPlugins:s=m5,className:o,shikiTheme:u=E5,mermaid:c,controls:h=!0,isAnimating:d=!1,animated:f,BlockComponent:p=Nh,parseMarkdownIntoBlocksFn:g=l5,caret:k,plugins:C,remend:w,linkSafety:A={enabled:!0},allowedTags:x,...L})=>{let P=cf(),[v,V]=ap(),O=Re(()=>x?Object.keys(x):[],[x]),Y=Re(()=>{if(typeof e!="string")return"";let ee=t==="streaming"&&n?B_(e,w):e;return O.length>0&&(ee=c5(ee,O)),ee},[e,t,n,w,O]),I=Re(()=>g(Y),[Y,g]),[$,M]=he(I);be(()=>{t==="streaming"?V(()=>{M(I)}):M(I)},[I,t]);let K=t==="streaming"?$:I,re=Re(()=>K.map((ee,y)=>`${P}-${y}`),[K.length,P]),X=Re(()=>f?f===!0?Ga():Ga(f):null,[f]),ie=Re(()=>{var ee,y;return{shikiTheme:(y=(ee=C?.code)==null?void 0:ee.getThemes())!=null?y:u,controls:h,isAnimating:d,mode:t,mermaid:c,linkSafety:A}},[u,h,d,t,c,A,C?.code]),le=Re(()=>({...$6,...i}),[i]),we=Re(()=>{let ee=[];return C!=null&&C.cjk&&(ee=[...ee,...C.cjk.remarkPluginsBefore]),ee=[...ee,...s],C!=null&&C.cjk&&(ee=[...ee,...C.cjk.remarkPluginsAfter]),C!=null&&C.math&&(ee=[...ee,C.math.remarkPlugin]),ee},[s,C?.math,C?.cjk]),De=Re(()=>{var ee;let y=a;if(x&&Object.keys(x).length>0&&a===_l){let Se={...Jr,tagNames:[...(ee=Jr.tagNames)!=null?ee:[],...Object.keys(x)],attributes:{...Jr.attributes,...x}};y=[Za.raw,[wd,Se],Za.harden]}return C!=null&&C.math&&(y=[...y,C.math.rehypePlugin]),X&&d&&(y=[...y,X.rehypePlugin]),y},[a,C?.math,X,d,x]),_=Re(()=>{if(!d||K.length===0)return!1;let ee=K.at(-1);return ll(ee)||V6(ee)},[d,K]),Le=Re(()=>k&&d&&!_?{"--streamdown-caret":`"${g5[k]}"`}:void 0,[k,d,_]);return t==="static"?m(Ka.Provider,{value:C??null,children:m(ut.Provider,{value:ie,children:m("div",{className:Z("space-y-4 whitespace-normal *:first:mt-0 *:last:mb-0",o),children:m(Ih,{components:le,rehypePlugins:De,remarkPlugins:we,...L,children:Y})})})}):m(Ka.Provider,{value:C??null,children:m(ut.Provider,{value:ie,children:m("div",{className:Z("space-y-4 whitespace-normal *:first:mt-0 *:last:mb-0",k&&!_?"*:last:after:inline *:last:after:align-baseline *:last:after:content-[var(--streamdown-caret)]":null,o),style:Le,children:[K.length===0&&k&&d&&m("span",{}),K.map((ee,y)=>{let Se=y===K.length-1,U=d&&Se&&ll(ee);return m(p,{components:le,content:ee,index:y,isIncomplete:U,rehypePlugins:De,remarkPlugins:we,shouldNormalizeHtmlIndentation:r,shouldParseIncompleteMarkdown:n,...L},re[y])})]})})})},(e,t)=>e.children===t.children&&e.shikiTheme===t.shikiTheme&&e.isAnimating===t.isAnimating&&e.animated===t.animated&&e.mode===t.mode&&e.plugins===t.plugins&&e.className===t.className&&e.linkSafety===t.linkSafety&&e.normalizeHtmlIndentation===t.normalizeHtmlIndentation);Lh.displayName="Streamdown";var _5=({children:e,className:t,minZoom:n=.5,maxZoom:r=3,zoomStep:i=.1,showControls:a=!0,initialZoom:s=1,fullscreen:o=!1})=>{let u=Ce(null),c=Ce(null),[h,d]=he(s),[f,p]=he({x:0,y:0}),[g,k]=he(!1),[C,w]=he({x:0,y:0}),[A,x]=he({x:0,y:0}),L=Ge(M=>{d(K=>Math.max(n,Math.min(r,K+M)))},[n,r]),P=Ge(()=>{L(i)},[L,i]),v=Ge(()=>{L(-i)},[L,i]),V=Ge(()=>{d(s),p({x:0,y:0})},[s]),O=Ge(M=>{M.preventDefault();let K=M.deltaY>0?-i:i;L(K)},[L,i]),Y=Ge(M=>{if(M.button!==0||M.isPrimary===!1)return;k(!0),w({x:M.clientX,y:M.clientY}),x(f);let K=M.currentTarget;K instanceof HTMLElement&&K.setPointerCapture(M.pointerId)},[f]),I=Ge(M=>{if(!g)return;M.preventDefault();let K=M.clientX-C.x,re=M.clientY-C.y;p({x:A.x+K,y:A.y+re})},[g,C,A]),$=Ge(M=>{k(!1);let K=M.currentTarget;K instanceof HTMLElement&&K.releasePointerCapture(M.pointerId)},[]);return be(()=>{let M=u.current;if(M)return M.addEventListener("wheel",O,{passive:!1}),()=>{M.removeEventListener("wheel",O)}},[O]),be(()=>{let M=c.current;if(M&&g)return document.body.style.userSelect="none",M.addEventListener("pointermove",I,{passive:!1}),M.addEventListener("pointerup",$),M.addEventListener("pointercancel",$),()=>{document.body.style.userSelect="",M.removeEventListener("pointermove",I),M.removeEventListener("pointerup",$),M.removeEventListener("pointercancel",$)}},[g,I,$]),m("div",{className:Z("relative flex flex-col",o?"h-full w-full":"min-h-28 w-full",t),ref:u,style:{cursor:g?"grabbing":"grab"},children:[a?m("div",{className:Z("absolute z-10 flex flex-col gap-1 rounded-md border border-border bg-background/80 p-1 supports-[backdrop-filter]:bg-background/70 supports-[backdrop-filter]:backdrop-blur-sm",o?"bottom-4 left-4":"bottom-2 left-2"),children:[m("button",{className:"flex items-center justify-center rounded p-1.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",disabled:h>=r,onClick:P,title:"Zoom in",type:"button",children:m(T6,{size:16})}),m("button",{className:"flex items-center justify-center rounded p-1.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",disabled:h<=n,onClick:v,title:"Zoom out",type:"button",children:m(k6,{size:16})}),m("button",{className:"flex items-center justify-center rounded p-1.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground",onClick:V,title:"Reset zoom and pan",type:"button",children:m(_6,{size:16})})]}):null,m("div",{className:Z("flex-1 origin-center transition-transform duration-150 ease-out",o?"flex h-full w-full items-center justify-center":"flex w-full items-center justify-center"),onPointerDown:Y,ref:c,role:"application",style:{transform:`translate(${f.x}px, ${f.y}px) scale(${h})`,transformOrigin:"center center",touchAction:"none",willChange:"transform"},children:e})]})},T5=({chart:e,className:t,config:n,fullscreen:r=!1,showControls:i=!0})=>{let[a,s]=he(null),[o,u]=he(!1),[c,h]=he(""),[d,f]=he(""),[p,g]=he(0),{mermaid:k}=it(ut),C=Gs(),w=k?.errorComponent,{shouldRender:A,containerRef:x}=Jx({immediate:r});if(be(()=>{if(A){if(!C){s("Mermaid plugin not available. Please add the mermaid plugin to enable diagram rendering.");return}(async()=>{try{s(null),u(!0);let P=C.getMermaid(n),v=e.split("").reduce((Y,I)=>(Y<<5)-Y+I.charCodeAt(0)|0,0),V=`mermaid-${Math.abs(v)}-${Date.now()}-${Math.random().toString(36).substring(2,9)}`,{svg:O}=await P.render(V,e);h(O),f(O)}catch(P){if(!(d||c)){let v=P instanceof Error?P.message:"Failed to render Mermaid chart";s(v)}}finally{u(!1)}})()}},[e,n,p,A,C]),!(A||c||d))return m("div",{className:Z("my-4 min-h-[200px]",t),ref:x});if(o&&!c&&!d)return m("div",{className:Z("my-4 flex justify-center p-4",t),ref:x,children:m("div",{className:"flex items-center space-x-2 text-muted-foreground",children:[m("div",{className:"h-4 w-4 animate-spin rounded-full border-current border-b-2"}),m("span",{className:"text-sm",children:"Loading diagram..."})]})});if(a&&!c&&!d)return w?m("div",{ref:x,children:m(w,{chart:e,error:a,retry:()=>g(v=>v+1)})}):m("div",{className:Z("rounded-md bg-red-50 p-4",t),ref:x,children:[m("p",{className:"font-mono text-red-700 text-sm",children:["Mermaid Error: ",a]}),m("details",{className:"mt-2",children:[m("summary",{className:"cursor-pointer text-red-600 text-xs",children:"Show Code"}),m("pre",{className:"mt-2 overflow-x-auto rounded bg-red-100 p-2 text-red-800 text-xs",children:e})]})]});let L=c||d;return m("div",{className:Z("size-full",t),"data-streamdown":"mermaid",ref:x,children:m(_5,{className:Z(r?"size-full overflow-hidden":"overflow-hidden",t),fullscreen:r,maxZoom:3,minZoom:.5,showControls:i,zoomStep:.1,children:m("div",{"aria-label":"Mermaid chart",className:Z("flex justify-center",r?"size-full items-center":null),dangerouslySetInnerHTML:{__html:L},role:"img"})})})};function k5({href:e,children:t}){return m("a",{href:e,target:"_blank",rel:"noopener noreferrer",class:"fr hover:text-a-9 focus-visible:rounded-kin-xs text-inherit underline underline-offset-2 transition-all hover:underline-offset-4",children:t})}const y5={a:k5};function Qs({content:e,isStreaming:t=!1}){return e?m(Lh,{className:"kin-markdown text-n-12 text-sm leading-relaxed",isAnimating:t,mode:t?"streaming":"static",components:y5,children:e}):null}const x5=.25,w5=.4,A5=10,C5=5,Tl=240,kl=()=>({pointerId:null,startX:0,startY:0,startTime:0,targetHeight:0,currentTranslateY:0,threshold:0,phase:"idle"});function jr(e){e.style.removeProperty("transform"),e.style.removeProperty("will-change"),e.style.removeProperty("transition")}function v5(e,t,n){if(!(e instanceof Element)||e.closest("button,input,textarea,select,a"))return!1;if(n!=="mouse"){let r=e;for(;r&&r!==t;){const i=window.getComputedStyle(r);if((/(auto|scroll)/.test(i.overflowY)||/(auto|scroll)/.test(i.overflow))&&r.scrollHeight>r.clientHeight&&r.scrollTop>0)return!1;r=r.parentElement}}return!0}function Rh({enabled:e,onClose:t,dragVar:n}){const r=Ce(null),i=Ce(kl()),a=Ce(null),[s,o]=he(!1),u=()=>{a.current&&(clearTimeout(a.current),a.current=null)},c=A=>{if(!n)return;const x=r.current?.closest("[data-kin-root]");x&&(A===null?x.style.removeProperty(n):x.style.setProperty(n,String(Math.min(1,A))))},h=()=>{const A=i.current.phase;i.current=kl();const x=r.current;x&&(x.style.removeProperty("user-select"),A==="dragging"&&x.toggleAttribute("data-dragging",!1))},d=A=>{if(A===null)return;const x=r.current;x?.hasPointerCapture(A)&&x.releasePointerCapture(A)},f=()=>{const A=r.current;A&&(c(0),A.style.removeProperty("transition"),A.style.transform="translate3d(0, 0, 0)",setTimeout(()=>{a.current||jr(A),c(null)},Tl))},p=()=>{if(!e||a.current)return;const A=r.current;if(!A){t();return}o(!0),c(1),A.style.willChange="transform",A.style.removeProperty("transition"),A.style.transform=`translate3d(0, ${A.getBoundingClientRect().height+32}px, 0)`,a.current=setTimeout(()=>{a.current=null,t(),o(!1),c(null),requestAnimationFrame(()=>jr(A))},Tl)},g=A=>{if(!e||a.current||i.current.phase!=="idle"||A.pointerType==="mouse"&&A.button!==0)return;const x=r.current;!x||!v5(A.target,x,A.pointerType)||(i.current={pointerId:A.pointerId,startX:A.clientX,startY:A.clientY,startTime:performance.now(),targetHeight:x.getBoundingClientRect().height,currentTranslateY:0,threshold:A.pointerType==="touch"||A.pointerType==="pen"?A5:C5,phase:"pending"})},k=A=>{const x=i.current;if(x.phase!=="pending"&&x.phase!=="dragging"||x.pointerId!==A.pointerId||a.current)return;const L=r.current;if(!L)return;const P=A.clientX-x.startX,v=A.clientY-x.startY;if(x.phase==="pending"){if(Math.abs(P)<x.threshold&&Math.abs(v)<x.threshold)return;if(Math.abs(v)<=Math.abs(P)||v<=0){h();return}x.phase="dragging",L.toggleAttribute("data-dragging",!0),L.setPointerCapture(A.pointerId),L.style.willChange="transform",L.style.transition="none",L.style.userSelect="none",window.getSelection()?.removeAllRanges()}x.phase==="dragging"&&(x.currentTranslateY=Math.max(0,v),L.style.transform=`translate3d(0, ${x.currentTranslateY}px, 0)`,x.targetHeight>0&&c(x.currentTranslateY/x.targetHeight),A.preventDefault())},C=A=>{const x=i.current;if(x.pointerId!==A.pointerId)return;d(x.pointerId);const L=x.phase==="dragging";h(),L&&f()},w=A=>{const x=i.current;if(x.pointerId!==A.pointerId)return;if(d(x.pointerId),x.phase!=="dragging"){h();return}const L=x.currentTranslateY,P=Math.max(1,performance.now()-x.startTime),v=L/P,V=L>=x.targetHeight*x5||v>w5;h(),V?p():f()};return be(()=>{if(e)return;u(),o(!1),h(),c(null);const A=r.current;A&&jr(A)},[e]),be(()=>()=>{u(),c(null);const A=r.current;A&&(A.toggleAttribute("data-dragging",!1),jr(A))},[]),{shellRef:r,isClosing:s,closeWithSlideOut:p,dragHandlers:{onPointerDown:g,onPointerMove:k,onPointerUp:w,onPointerCancel:C}}}function S5({onClose:e,ariaLabel:t,children:n}){const r=F.embedded.value,{shellRef:i,isClosing:a,closeWithSlideOut:s,dragHandlers:o}=Rh({enabled:!0,onClose:e,dragVar:"--kin-overlay-drag"}),[u,c]=he(!1);return be(()=>{requestAnimationFrame(()=>c(!0))},[]),be(()=>{const h=d=>{d.key==="Escape"&&(d.stopPropagation(),s())};return document.addEventListener("keydown",h,{capture:!0}),()=>document.removeEventListener("keydown",h,{capture:!0})},[s]),m(pe,{children:[m("div",{class:Hh({visible:u&&!a}),style:u&&!a?{opacity:"calc(1 - var(--kin-overlay-drag, 0))"}:void 0,"aria-hidden":"true",onClick:s}),m("div",{ref:i,class:Fh({layout:r?"embedded":"open",class:`animate-kin-drawer-in ${r?"absolute inset-0 [--kin-inset:0px]":"[--kin-inset:2rem]"}`}),role:"dialog","aria-modal":"true","aria-label":t,...o,children:[m("div",{"aria-hidden":"true",class:"bg-n-5/50 absolute left-1/2 top-2 h-1 w-12 -translate-x-1/2 rounded-full"}),n(s)]})]})}function Ja({text:e,icon:t=Aa}){return m("div",{class:"text-n-9 flex items-center gap-1.5 text-xs",children:[m(t,{class:"size-3 shrink-0 animate-pulse"}),m("span",{class:"animate-kin-shimmer bg-[linear-gradient(90deg,oklch(var(--n-9))_40%,oklch(var(--n-11))_50%,oklch(var(--n-9))_60%)] bg-[length:200%_100%] bg-clip-text text-transparent",children:e})]})}const I5={location:Hf,type:zf,salary:Uf};function N5({details:e}){return e.length===0?null:m("div",{class:"text-n-11 flex flex-wrap gap-x-2.5 gap-y-1 text-xs",children:e.map(t=>{const n=I5[t.key];return m("span",{class:"flex items-center gap-1",children:[n&&m(n,{class:"size-3 shrink-0"}),t.value]},t.key)})})}function Oh({job:e}){return m("div",{class:"flex min-w-0 flex-1 flex-col gap-1 py-1 pl-2",children:[m("p",{class:"text-n-12 text-sm font-semibold leading-tight",children:e.title}),m(N5,{details:e.details})]})}function L5({jobs:e}){const[t,n]=he(null),r=i=>{n(a=>a===i?null:i)};return m("div",{class:"grid gap-2 py-1.5",children:e.map(i=>m(O5,{job:i,open:t===i.id,onToggle:()=>r(i.id)},i.id))})}function R5(){F.overlay.value=null}function yl(e,t){t&&t.status!=="error"||(F.setJobDetail(e,{status:"loading",error:void 0}),F.requestJobDetail.value?.(e))}function O5({job:e,open:t,onToggle:n}){const r=F.jobDetails.value[e.id],i=r?.status==="streaming"?r.liveSummary:r?.summary,a=()=>{t||yl(e.id,r),n()},s=()=>{yl(e.id,r),F.overlay.value=m(D5,{job:e})};return m("div",{class:"corner-smooth rounded-kin-xl outline-n-3 bg-n-2 flex flex-col overflow-clip outline outline-1",children:[m("button",{type:"button",class:"hover:bg-n-3/50 active:bg-n-3/75 flex flex-1 items-center py-1 pl-1 pr-2 text-left transition-colors duration-200",onClick:a,"aria-expanded":t,children:[m(Oh,{job:e}),m(mc,{class:si("text-n-9 ease-kin-fluid duration-kin size-3.5 shrink-0 transition-transform",t&&"rotate-180"),strokeWidth:2})]}),m("div",{class:si("duration-kin ease-kin-fluid grid transition-all",t?"grid-rows-[1fr] opacity-100":"grid-rows-[0fr] opacity-0"),children:m("div",{class:"overflow-hidden",children:m("div",{class:"border-n-3 flex flex-col gap-2 border-t px-3 py-3",children:!r||r.status==="loading"?m(Ja,{text:"Loading job details…"}):r.status==="error"?m("p",{class:"text-n-9 text-xs",children:r.error}):m(pe,{children:[i&&m(pe,{children:[m("div",{class:"kin-markdown text-n-11 text-xs leading-relaxed",children:m(Qs,{content:i,isStreaming:r.status==="streaming"})}),m("p",{class:"text-n-9 text-[11px] italic",children:"AI-generated summary (may contain inaccuracies)"})]}),!i&&r.status==="streaming"&&m(Ja,{text:"Generating summary…"}),r.description&&m("div",{class:"flex gap-2",children:[m("button",{type:"button",class:yt({variant:"neutral",size:"sm",class:"flex-1"}),onClick:s,children:"Full description"}),e.applyUrl&&m("a",{href:e.applyUrl,target:"_blank",rel:"noopener noreferrer",class:yt({variant:"accent",size:"sm",class:"flex-1"}),onClick:o=>o.stopPropagation(),children:"Apply now"})]})]})})})})]})}function D5({job:e}){const t=F.jobDetails.value[e.id];return m(S5,{onClose:R5,ariaLabel:`Job details: ${e.title}`,children:n=>m(pe,{children:[m("header",{class:"from-a-2/50 relative flex select-none items-start justify-between bg-gradient-to-b to-transparent p-3 pb-1",children:[m(Oh,{job:e}),m("button",{type:"button",class:yt({variant:"neutral",size:"iconSm"}),onClick:n,"aria-label":"Close",children:m(ls,{strokeWidth:2})})]}),m("div",{class:Ph({class:"pl-5 pr-5 text-sm sm:px-5"}),children:t?.description?m("div",{dangerouslySetInnerHTML:{__html:t.description}}):m("p",{class:"text-n-9 text-sm",children:"No description available."})}),e.applyUrl&&m("div",{class:"flex p-4 pt-2",children:m("a",{href:e.applyUrl,target:"_blank",rel:"noopener noreferrer",class:yt({variant:"accent",size:"md",class:"flex-1"}),onClick:r=>r.stopPropagation(),children:"Apply now"})})]})})}const P5={thinking:{text:"Thinking…",icon:Aa},responding:{text:"Writing response…",icon:go},processing_results:{text:"Processing results…",icon:Aa},processing_cv:{text:"Scanning your CV…",icon:mo},searchJobs:{text:"Searching jobs…",icon:po},matchJobs:{text:"Matching jobs…",icon:po},searchKnowledge:{text:"Searching company info…",icon:Mf},getProfileSummary:{text:"Reviewing your profile…",icon:mo},updatePreferences:{text:"Updating your preferences…",icon:Bf},remember:{text:"Saving details…",icon:Ff},suggestQuickReplies:{text:"Preparing reply options…",icon:go}},Dh=xt({base:"animate-kin-message-in flex max-w-[95%] flex-col",variants:{side:{user:"self-end",assistant:"self-start w-full gap-2.5 p-1"}}}),Ph=xt({base:"[&::-webkit-scrollbar-thumb]:bg-n-4 [&::-webkit-scrollbar-thumb]:rounded-kin-xs flex min-h-0 flex-1 flex-col gap-4 overflow-y-auto overscroll-none scroll-smooth break-words py-4 [mask-image:linear-gradient(to_bottom,transparent_0,_black_1.5rem,_black_calc(100%-1.5rem),transparent_100%),linear-gradient(black,black)] [mask-size:calc(100%-6px)_100%,6px_100%] [mask-position:0_0,100%_0] [mask-repeat:no-repeat,no-repeat] sm:overscroll-auto [&::-webkit-scrollbar-track]:bg-transparent [&::-webkit-scrollbar]:w-1.5"});function M5(){const e=Ce(null);return m("div",{ref:e,class:Ph({class:"pl-safe-l pr-safe-r sm:px-4 [&>:first-child]:mt-auto"}),role:"log","aria-label":"Chat messages","aria-live":"polite","aria-relevant":"additions",children:[m(F5,{}),m(H5,{}),m(U5,{}),m(B5,{containerRef:e})]})}function B5({containerRef:e}){const[t,n]=he(!0),r=Ce(!1),i=F.messages.value.length,a=F.messages.value.at(-1)?.role==="user",s=F.liveAssistantMessage.value?.content,o=F.assistantStatus.value,u=F.quickReplies.value.length,c=()=>{const h=e.current;h&&(r.current=!0,h.scrollTop=h.scrollHeight,n(!0))};return be(()=>{const h=e.current;if(!h)return;c();const d=()=>{const f=h.scrollHeight-h.scrollTop-h.clientHeight<80;r.current?r.current=!f:n(f)};return h.addEventListener("scroll",d,{passive:!0}),()=>h.removeEventListener("scroll",d)},[]),be(()=>{(t||a)&&c()},[i,s,o,u,a]),t?null:m("button",{type:"button",class:yt({variant:"neutral",size:"iconSm",class:"animate-kin-fade-in absolute bottom-3 left-1/2 -translate-x-1/2"}),"aria-label":"Scroll to latest message",onClick:c,children:m(mc,{strokeWidth:2})})}function F5(){const e=F.messages.value.length,t=!!(F.liveAssistantMessage.value||F.isStreaming.value||F.assistantStatus.value);return e||t?null:m("div",{class:"animate-kin-fade-in my-auto px-6 py-6 text-center",style:{animationDelay:"150ms"},children:[m("p",{class:"text-n-12 mb-2 text-base",children:"Hi there, you're speaking with Kin AI Agent."}),m("p",{class:"text-n-9 text-sm",children:"How can I help you today?"})]})}function H5(){return m(pe,{children:F.messages.value.filter(e=>e.role==="assistant"?!!e.content.trim()||!!e.blocks?.length:e.role==="user"?!!e.content.trim()||!!e.attachment:!0).map((e,t)=>m(z5,{message:e,animationIndex:t},e.id))})}function Mh({statusMeta:e,timestamp:t}){return m("div",{class:"text-n-11 border-n-5 inline-flex items-center gap-1.5 self-start border-t pt-1.5 text-xs first:border-t-0 first:pt-0","aria-hidden":"true",children:e?m(Ja,{...e}):m("span",{children:["AI Agent • ",t?Y5(t):"typing..."]})})}function U5(){const e=F.liveAssistantMessage.value,t=F.isStreaming.value,n=F.assistantStatus.value,r=n?P5[n]:void 0;return!e&&!t&&!r?null:m("article",{class:Dh({side:"assistant"}),"aria-label":"Message from Kin AI Agent",children:[e?.content&&m(Qs,{content:e.content,isStreaming:t}),m(Mh,{statusMeta:r,timestamp:t?void 0:e?.timestamp})]})}function z5({message:e,animationIndex:t}){const{role:n,content:r,timestamp:i,attachment:a,blocks:s}=e,o=n==="user",u=Math.min((t+1)*.05,.35);return n==="system"?m("div",{class:"flex justify-center px-4 py-2",role:"status","aria-label":"System notification",children:m("span",{class:"border-n-6/40 bg-n-3 text-n-9 corner-smooth rounded-kin-lg border px-3 py-1.5 text-xs",children:r})}):m("article",{class:Dh({side:o?"user":"assistant"}),style:{animationDelay:`${u}s`},"aria-label":`Message from ${o?"You":"Kin AI Agent"}`,children:[o&&m("div",{class:"bg-n-3 text-n-12 corner-smooth rounded-kin-lg relative px-3.5 py-2 text-sm",children:[a&&m("div",{class:"text-n-10 flex items-center gap-1.5",children:[m(pc,{class:"text-n-9 size-3.5 shrink-0"}),m("span",{class:"max-w-full truncate",children:a.name})]}),m("p",{children:r}),m("svg",{class:"text-n-3 absolute -bottom-1.5 right-1.5 w-4","aria-hidden":"true",viewBox:"0 0 16 8",children:m("path",{d:"M15 0S16 3 16 7C16 8 15 7 15 7 11 3 9 2 0 2Z",fill:"currentColor"})})]}),!o&&r&&m(Qs,{content:r}),!o&&s?.map((c,h)=>m($5,{block:c},h)),!o&&m(Mh,{timestamp:i})]})}function $5({block:e}){switch(e.kind){case"job_cards":return m(L5,{jobs:e.jobs});default:return null}}function Y5(e){const n=new Date().getTime()-e.getTime();return n<6e4?"Just now":n<36e5?`${Math.floor(n/6e4)}m ago`:e.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})}function Bh({content:e,children:t}){const[n,r]=he(!1),i=Ce(null),a=Ce(null),s=t.props,o=zl(t,{ref:i,onMouseEnter:Vr(s.onMouseEnter,()=>r(!0)),onMouseLeave:Vr(s.onMouseLeave,()=>r(!1)),onFocus:Vr(s.onFocus,()=>r(!0)),onBlur:Vr(s.onBlur,()=>r(!1))});be(()=>{if(!n)return;const c=h=>{i.current&&!h.composedPath().includes(i.current)&&r(!1)};return document.addEventListener("pointerdown",c),()=>document.removeEventListener("pointerdown",c)},[n]),lf(()=>{const c=i.current,h=a.current;if(!n||!c||!h)return;const d=c.getBoundingClientRect(),f=h.offsetWidth,p=h.offsetHeight,g=d.top>p+8,k=Math.max(4,Math.min(d.left+(d.width-f)/2,innerWidth-f-4)),C=d.left+d.width/2-k;h.setAttribute("data-side",g?"top":"bottom"),h.style.left=`${k}px`,h.style.top=`${g?d.top-p-6:d.bottom+6}px`,h.style.setProperty("--ax",`${C-12}px`),h.style.setProperty("--origin",`${C}px ${g?"100%":"0%"}`),requestAnimationFrame(()=>h.setAttribute("data-open",""))},[n,e]);const u=n?i.current?.closest("[data-kin-root]"):null;return m(pe,{children:[o,u&&kc(m("span",{ref:a,"data-side":"top",role:"tooltip",class:"bg-n-12 text-n-1 corner-smooth ease-out-back rounded-kin-sm duration-kin group pointer-events-none fixed z-[999999] origin-[--origin] scale-90 whitespace-nowrap px-2.5 py-1.5 text-xs opacity-0 transition-[opacity,transform] data-[open]:scale-100 data-[open]:opacity-100 data-[open]:delay-300",children:[e,m("svg",{viewBox:"0 0 32 32","aria-hidden":"true",class:"fill-n-12 absolute left-[--ax] w-6 group-data-[side=bottom]:-top-6 group-data-[side=top]:-bottom-6 group-data-[side=top]:rotate-180",children:m("path",{d:"M3 32C9 32 10 31 15 26Q16 25 17 26C22 31 23 32 29 32"})})]}),u)]})}function Vr(e,t){return typeof e=="function"?(...n)=>{e(...n),t()}:t}const j5=xt({base:"relative animate-none flex min-h-0 w-full flex-1 flex-col overflow-hidden",variants:{embedded:{false:"sm:animate-kin-panel-in [will-change:transform,opacity]"}}}),xl=xt({base:"transition-all duration-kin ease-kin-fluid col-span-full row-span-full",variants:{show:{false:"scale-50 opacity-0 blur-sm",true:"scale-100 opacity-100 blur-0"}}});function V5({embedded:e=!1,onClose:t,onClearData:n,onSkipToInput:r}){const[i,a]=he(!1),s=Ce(),o=()=>{clearTimeout(s.current),a(!1)};be(()=>()=>clearTimeout(s.current),[]);const u=c=>{if(c.key==="Escape"){if(c.preventDefault(),i){o();return}e||t()}};return m("div",{class:j5({embedded:e}),"aria-labelledby":"kin-panel-title",onKeyDown:u,onClick:()=>i&&o(),children:[m("button",{type:"button",class:"fr bg-n-2 text-n-12 rounded-kin-sm absolute -top-full left-1/2 z-50 -translate-x-1/2 px-3 py-1.5 text-sm font-medium no-underline focus:top-2",onClick:r,children:"Skip to chat input"}),m("header",{class:"from-a-2/50 relative flex select-none items-center justify-between bg-gradient-to-b to-transparent p-3",children:[m("h2",{id:"kin-panel-title",class:"text-n-12 m-0 pl-2 text-base font-semibold sm:text-sm sm:font-medium",children:"Kin Assistant"}),!e&&m("div",{"aria-hidden":"true",class:"bg-n-5/50 absolute left-1/2 top-2 h-1 w-12 -translate-x-1/2 rounded-full"}),m("div",{class:"flex items-center gap-1.5",children:[m(Bh,{content:i?"Click again to confirm":"Clear my data",children:m("button",{class:yt({variant:i?"accent":"ghost",size:"iconSm",class:"grid place-items-center"}),"aria-label":i?"Confirm clear data":"Clear my data",type:"button",onMouseDown:c=>c.preventDefault(),onClick:c=>{c.stopPropagation(),i?(n(),o()):a(!0)},onMouseLeave:()=>{i&&(s.current=setTimeout(o,2e3))},onMouseEnter:()=>clearTimeout(s.current),children:[m(Of,{class:xl({show:!i})}),m(Df,{class:xl({show:i})})]})}),!e&&m("button",{class:yt({variant:"neutral",size:"iconSm"}),"aria-label":"Close chat",type:"button",onClick:t,children:m(ls,{strokeWidth:2})})]})]}),m(M5,{})]})}const q5={left:"justify-start",center:"justify-center",right:"justify-end"};function W5({onOpen:e,placement:t="center",buttonRef:n,logo:r=null}){const[i,a]=he(!1);return m("div",{class:si("pointer-events-auto flex p-3 sm:p-2",q5[t]),children:m("button",{ref:n,type:"button",class:yt({variant:"accent",size:"iconLg",class:"border-a-4 outline-a-7 shadow-a-8/30 hover:shadow-a-8/40 border border-solid shadow-lg outline outline-1 [box-shadow:var(--tw-ring-offset-shadow,_0_0_#0000),var(--tw-ring-shadow,_0_0_#0000),var(--tw-shadow,_0_0_#0000),inset_0_4px_16px_-4px_oklch(var(--a-8))]"}),"aria-label":"Open Kin AI Chat",onClick:e,children:m("span",{class:"grid size-6 place-items-center","aria-hidden":"true",children:!r||i?m(Lf,{class:"w-6"}):m("img",{src:r,alt:"",class:"size-full object-contain",draggable:!1,onError:()=>a(!0)})})})})}const G5={"application/pdf":{maxSize:1e7},"application/vnd.openxmlformats-officedocument.wordprocessingml.document":{maxSize:1e7},"application/msword":{maxSize:1e7},"text/plain":{maxSize:1e6},"image/jpeg":{maxSize:1e7},"image/png":{maxSize:1e7},"image/webp":{maxSize:1e7}},K5=".pdf,.docx,.doc,.txt,.jpg,.jpeg,.png,.webp";function Q5(e){const t=G5[e.type];return t?e.size>t.maxSize?{valid:!1,error:`File is too large. Maximum size is ${Math.round(t.maxSize/1e6)}MB.`}:e.size===0?{valid:!1,error:"The file appears to be empty."}:{valid:!0}:{valid:!1,error:"Unsupported file format. Please upload a PDF, Word document, text file, or image."}}function X5(e){return new Promise((t,n)=>{const r=new FileReader;r.onload=()=>{typeof r.result=="string"?t(r.result):n(new Error("Failed to read file"))},r.onerror=()=>n(r.error),r.readAsDataURL(e)})}function Z5({url:e,onMessage:t,onClose:n,onError:r}){let i=null,a=[];const s=()=>i?.readyState===WebSocket.OPEN,o=d=>{s()&&i.send(JSON.stringify(d))},u=d=>o({type:"user_message",content:d}),c=()=>{if(s()){for(const d of a)u(d);a.length=0}};return(()=>{i=new WebSocket(e),i.onopen=()=>{c()},i.onmessage=d=>{try{const f=JSON.parse(d.data);t(f)}catch(f){console.error("Failed to parse message:",f)}},i.onclose=()=>{a=[],n(),i=null},i.onerror=d=>{r(d)}})(),{sendMessage:d=>{i&&(s()?u(d):i.readyState===WebSocket.CONNECTING&&a.push(d))},uploadFile:async(d,f)=>{if(!s())return{success:!1,error:"Not connected"};const p=Q5(d);if(!p.valid)return{success:!1,error:p.error};try{const g=await X5(d);return s()?(o({type:"file_upload",fileType:f,fileName:d.name,mimeType:d.type,data:g}),{success:!0}):{success:!1,error:"Connection lost while reading file. Please try again."}}catch(g){return{success:!1,error:g instanceof Error?g.message:"Failed to read file"}}},requestJobDetail:d=>{o({type:"job_detail",jobId:d})},clearData:()=>{o({type:"clear_data"})},disconnect:()=>{i&&(i.close(),i=null)},isConnected:()=>i?.readyState===WebSocket.OPEN}}const wl=2e3,Al=xt({base:"absolute bottom-full left-1/2 mb-2 -translate-x-1/2 rounded-kin-md corner-smooth px-3 py-2.5 text-xs leading-relaxed shadow-lg",variants:{tone:{error:"w-[calc(100%-1rem)] bg-red-600 text-white shadow-red-600/20",neutral:"whitespace-nowrap bg-n-12 text-n-1 shadow-n-12/20"},dismissing:{true:"animate-kin-toast-out",false:"animate-kin-toast-in"}}}),J5=xt({base:"w-full pt-1 px-2 pb-safe-b focus-within:pb-2 transition-all duration-kin ease-kin-fluid group-data-[placement=embedded]:pb-2",variants:{panelOpen:{true:"bg-gradient-to-b from-transparent to-n-2",false:"px-5 sm:px-14 group-data-[placement=left]:sm:pl-2 group-data-[placement=left]:sm:pr-24 group-data-[placement=right]:sm:pl-24 group-data-[placement=right]:sm:pr-2"}}}),ew=xt({base:"border outline relative flex p-0.5 gap-1 flex-col corner-smooth rounded-kin-3xl bg-highest transition-all duration-kin ease-kin-fluid",variants:{panelOpen:{true:"outline-1 outline-transparent border-n-4 focus-within:outline-[3px] focus-within:outline-a-4/50 focus-within:border-a-6/50 shadow-md shadow-n-4/30",false:"outline-2 outline-a-9 border-transparent shadow-xl shadow-a-9/10"},unread:{true:"after:absolute after:-inset-0.5 after:outline-offset-2 after:outline after:outline-a-9/20 after:outline-2 after:rounded-kin-3xl after:corner-smooth after:pointer-events-none after:animate-kin-pulse after:content-['']"}}});function tw({panelOpen:e,suggestions:t,onSubmit:n,onEscape:r,onFocus:i,onBlur:a,onUploadFile:s,inputRef:o}){const[u,c]=he(""),[h,d]=he(!1),f=Ce(null),p=Ce(),g=F.isStreaming.value,k=F.connectionState.value,C=F.uploadState.value,w=F.uploadError.value,A=F.uploadFileName.value;be(()=>{if(C!=="error"){d(!1),clearTimeout(p.current);return}return p.current=setTimeout(()=>d(!0),5e3),()=>clearTimeout(p.current)},[C]);const x=()=>d(!0),L=()=>{h&&F.setUploadState("idle")},P=()=>clearTimeout(p.current),v=()=>{C==="error"&&!h&&(p.current=setTimeout(()=>d(!0),2e3))},V=k==="connected",O=k==="connecting",Y=k==="disconnected",I=k==="idle",$=C==="uploading"||C==="processing",M=u.length>wl,K=u.trim(),re=K.length>0,X=t.length>0,ie=A?`Uploading ${A}...`:"Uploading file...",le=re&&!g&&!$&&!M&&(V||O),we=V&&!g&&!$,De=X?"Or type a message...":$?ie:O?"Connecting...":Y?"Disconnected – Tap to retry":g?"Waiting for response...":!e&&F.hasUnreadMessages.value?"You have a new reply":!e&&F.messages.value.length>0?"Continue conversation...":"Ask me anything...",_=$?ie:g?"Waiting for response":I?"Click to connect":O?"Connecting...":re?V?"Send message":"Cannot send message":"Enter a message to send",Le=$?ie:we?"Attach file (CV, document, or image)":"Cannot upload file",ee=U=>{U.preventDefault(),le&&(n(K),c(""),o.current&&(o.current.style.height="auto"))},y=U=>{U.key==="Enter"&&!U.shiftKey?(U.preventDefault(),ee(U)):U.key==="Escape"&&(U.preventDefault(),U.stopPropagation(),r())},Se=U=>{const j=U.target,fe=j.files?.[0];fe&&s(fe,"cv"),j.value=""};return m("div",{class:J5({panelOpen:e}),role:"search","aria-label":"Chat with Kin AI",children:m("form",{onSubmit:ee,class:ew({panelOpen:e,unread:!e&&F.hasUnreadMessages.value}),autoComplete:"off",children:[X&&m("div",{class:"bg-n-3/75 corner-smooth shadow-n-4/50 rounded-b-kin-sm rounded-t-kin-2xl flex flex-wrap gap-1.5 p-2 shadow-inner","aria-label":"Suggested prompts",children:t.map((U,j)=>m("button",{type:"button",class:"fr bg-highest animate-kin-pop-in text-n-11 corner-smooth outline-n-4/50 hover:outline-n-7/50 hover:text-n-12 rounded-kin-xl ease-kin-click inline-flex items-center whitespace-nowrap px-3 py-1.5 text-sm outline outline-1 transition-all hover:outline-2 active:scale-95",style:{animationDelay:`${.05+j*.05}s`},onPointerDown:fe=>fe.preventDefault(),onClick:()=>n(U.value),children:U.label},U.id))}),m("div",{class:"flex items-end gap-1 p-1 pl-3",children:[m("label",{for:"kin-input",class:"sr-only",children:"Ask Kin a question"}),m("textarea",{id:"kin-input",ref:o,rows:1,enterkeyhint:"send",class:"text-n-12 placeholder:text-n-9 -my-[0.125em] max-h-[6.5em] min-w-0 flex-1 resize-none self-center overflow-y-auto overscroll-none border-none bg-transparent px-0 py-[0.25em] text-base outline-none [mask-image:linear-gradient(to_bottom,transparent_0,_black_0.5em,_black_calc(100%-0.5em),transparent_100%)] disabled:cursor-not-allowed sm:text-sm",placeholder:De,value:u,onInput:U=>{const j=U.target;c(j.value),j.style.height="auto",j.style.height=`${j.scrollHeight}px`},onFocus:i,onBlur:U=>a(U.relatedTarget),onKeyDown:y,"aria-describedby":"kin-input-status",autoComplete:"off",disabled:$}),m("input",{ref:f,type:"file",class:"sr-only",accept:K5,onChange:Se,"aria-hidden":"true",tabIndex:-1}),m(Bh,{content:Le,children:m("button",{type:"button",class:yt({variant:"ghost"}),disabled:!we,"aria-label":Le,onPointerDown:U=>U.preventDefault(),onClick:()=>f.current?.click(),children:$?m(Pf,{class:"animate-kin-spin"}):m(pc,{})})}),m("button",{type:"submit",class:yt({variant:"accent"}),disabled:!le,"aria-label":_,onPointerDown:U=>U.preventDefault(),children:m(Rf,{strokeWidth:2})})]}),m("div",{id:"kin-input-status",class:"sr-only",role:"status","aria-live":"polite",children:[O&&"Connecting to Kin...",Y&&"Connection lost. Click input to retry.",g&&"Kin is responding...",$&&ie]}),w&&C==="error"&&m("div",{class:Al({tone:"error",dismissing:h,class:"flex items-start gap-2"}),role:"alert",onAnimationEnd:L,onMouseEnter:P,onMouseLeave:v,children:[m("span",{class:"flex-1",children:w}),m("button",{type:"button",class:"-mr-1 -mt-0.5 flex size-5 flex-shrink-0 items-center justify-center rounded-full text-white/60 transition-colors hover:text-white/100","aria-label":"Dismiss",onClick:x,children:m(ls,{class:"size-3.5",strokeWidth:2.5})})]}),M&&m("div",{class:Al({tone:"neutral",dismissing:!1}),role:"alert",children:["Message too long (",u.length.toLocaleString(),"/",wl.toLocaleString()," characters)"]})]})})}const ba="(hover: none) and (pointer: coarse)",nw='a[href], button:not([disabled]), input:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])',Fh=xt({base:"pointer-events-auto sm:w-[480px] rounded-t-kin-4xl flex w-full flex-col transition-all outline outline-1 outline-transparent duration-kin sm:rounded-kin-4xl corner-smooth ease-kin-fluid group-data-[placement=left]:sm:left-4 group-data-[placement=right]:sm:right-4 group-data-[placement=center]:sm:justify-self-center",variants:{layout:{embedded:"h-full rounded-none bg-n-1 outline-none sm:w-full sm:rounded-none self-stretch",closed:"bottom-0 sm:bottom-4 self-end absolute",open:"bottom-0 absolute self-end sm:bottom-4 sm:min-h-[50vh] h-[calc(var(--kin-vv-h,100dvh)_-_var(--kin-inset,1.5rem))] sm:h-auto top-[calc(var(--kin-vv-top,0px)_+_var(--kin-inset,1.5rem))] sm:top-auto bg-n-1 overflow-hidden sm:max-h-[calc(min(90vh,var(--kin-vv-h,90svh))_-_var(--kin-inset,1.5rem))] outline-n-6/50 shadow-2xl shadow-n-6/30 [touch-action:manipulation]"}}}),Hh=xt({base:"absolute inset-0 bg-black/20 transition-opacity duration-kin ease-kin-fluid",variants:{visible:{false:"pointer-events-none opacity-0",true:"pointer-events-auto opacity-100"}}});function rw({starterPrompts:e,onSendMessage:t,onOpen:n,onClose:r,onConnect:i,onClearData:a,onUploadFile:s,onClipInset:o,placement:u={desktop:"center",mobile:"center"},launcher:c={desktop:"input",mobile:"icon"},logo:h=null}){const d=F.embedded.value,f=F.isOpen.value,p=d?"embedded":f?"open":"closed",g=p!=="closed",[k,C]=he(!1),[w,A]=he(()=>typeof window<"u"&&window.matchMedia(ba).matches);be(()=>{const U=window.matchMedia(ba),j=fe=>A(fe.matches);return U.addEventListener("change",j),()=>U.removeEventListener("change",j)},[]);const x=w?u.mobile:u.desktop,L=w?c.mobile:c.desktop,P=Ce(null),v=Ce(null),V=Ce(null),O=Ce(null),Y=F.messages.value.length>0,I=F.quickReplies.value,$=!Y&&e.length>0&&(k||!d&&g&&L==="icon"),M=g&&I.length>0,K=$?e.map((U,j)=>({id:`sp-${j}`,label:U.label,value:U.message})):M?I.map((U,j)=>({id:`qr-${j}`,label:U,value:U})):[];be(()=>{if(g){const U=document.activeElement;V.current=U instanceof HTMLElement&&!P.current?.contains(U)?U:null,requestAnimationFrame(()=>O.current?.focus())}else C(!1)},[g]),be(()=>{d&&!f&&n()},[d,n,f]),be(()=>{if(p!=="open")return;const U=window.matchMedia(ba);if(!U.matches)return;const j=P.current,fe=window.visualViewport;if(!j||!fe)return;const me=()=>{j.style.setProperty("--kin-vv-h",`${fe.height}px`),j.style.setProperty("--kin-vv-top",`${fe.offsetTop}px`)};me(),fe.addEventListener("resize",me),fe.addEventListener("scroll",me);let J=0;const Pe=We=>{J=We.touches[0]?.clientY??0},Ie=We=>{const Rr=J-(We.touches[0]?.clientY??J),Mn=We.composedPath(),Bn=Mn.indexOf(j);if(Bn<0)return;const qi=Rt=>Rt instanceof Element&&(Rr>0?Rt.scrollTop+Rt.clientHeight<Rt.scrollHeight-1:Rt.scrollTop>0);We.cancelable&&!Mn.slice(0,Bn).some(qi)&&We.preventDefault()};document.addEventListener("touchstart",Pe,{passive:!0}),document.addEventListener("touchmove",Ie,{passive:!1});const lt=()=>{fe.removeEventListener("resize",me),fe.removeEventListener("scroll",me),j.style.removeProperty("--kin-vv-h"),j.style.removeProperty("--kin-vv-top"),document.removeEventListener("touchstart",Pe),document.removeEventListener("touchmove",Ie)},mt=We=>{We.matches||lt()};return U.addEventListener("change",mt),()=>{lt(),U.removeEventListener("change",mt)}},[p]),be(()=>{if(p!=="open")return;const U=j=>{if(j.key!=="Tab")return;const fe=P.current;if(!fe)return;const me=fe.querySelectorAll(nw),J=me[0],Pe=me[me.length-1];if(!J||!Pe)return;const Ie=document.activeElement;j.shiftKey&&Ie===J?(j.preventDefault(),Pe.focus()):!j.shiftKey&&Ie===Pe&&(j.preventDefault(),J.focus())};return document.addEventListener("keydown",U),()=>document.removeEventListener("keydown",U)},[p]);const re=()=>{p==="closed"&&n()},X=()=>{O.current?.blur(),r(),V.current&&requestAnimationFrame(()=>V.current?.focus())},{shellRef:ie,isClosing:le,closeWithSlideOut:we,dragHandlers:De}=Rh({enabled:p==="open"&&!d,onClose:X,dragVar:"--kin-shell-drag"});be(()=>{const U=L==="icon"?v.current:ie.current;if(!U||d||p==="open")return;const j=L==="icon"?12:16,fe=L==="icon"?j:48,me=window.visualViewport,J=()=>{if(U.style.transform)return;const Ie=U.getBoundingClientRect();if(Ie.width<=0&&Ie.height<=0)return;const lt=window.innerWidth,mt=window.innerHeight;Ie.top>=mt||o?.({top:Math.max(0,Math.floor(Ie.top)-fe),right:Math.max(0,Math.floor(lt-Ie.right)-j),bottom:0,left:Math.max(0,Math.floor(Ie.left)-j)})},Pe=new ResizeObserver(J);return Pe.observe(U),window.addEventListener("resize",J),me?.addEventListener("resize",J),me?.addEventListener("scroll",J),U.addEventListener("transitionend",J),J(),()=>{Pe.disconnect(),window.removeEventListener("resize",J),me?.removeEventListener("resize",J),me?.removeEventListener("scroll",J),U.removeEventListener("transitionend",J)}},[x,d,L,p,o]);const _=U=>{const j=U.trim();if(!j)return;const fe=F.isStreaming.value,me=F.uploadState.value==="uploading"||F.uploadState.value==="processing",J=F.connectionState.value;!fe&&!me&&(J==="connected"||J==="connecting")&&(F.addMessage({role:"user",content:j}),re(),i(),t(j))},Le=()=>{C(!0),i(),!g&&Y&&re()},ee=U=>{U instanceof Node&&P.current?.contains(U)||C(!1)},y=()=>{g?we():O.current?.blur()},Se=(U,j)=>{re(),s(U,j)};return m("div",{ref:P,class:si("font-kin text-kin text-n-12 group pointer-events-none",d?"relative h-full":"fixed inset-0"),"data-placement":x,"data-kin-root":!0,role:"region","aria-label":"Kin AI Chat",children:[!d&&m("div",{class:Hh({visible:p==="open"&&!le}),style:p==="open"&&!le?{opacity:"calc(1 - var(--kin-shell-drag, 0))"}:void 0,"aria-hidden":"true",onClick:we}),m("div",{ref:ie,class:Fh({layout:p,class:"group-has-[[data-dragging]]:!transition-none"}),style:F.overlay.value!==null?{transformOrigin:"top",transform:"translate3d(0, calc(-8px + 8px * var(--kin-overlay-drag, 0)), 0) scale(calc(0.96 + 0.04 * var(--kin-overlay-drag, 0)))"}:void 0,role:g&&!d?"dialog":void 0,"aria-modal":g&&!d,...De,children:[m("div",{class:"sr-only",role:"status","aria-live":"polite","aria-atomic":"true",children:g?"Chat panel opened":""}),g&&m(V5,{embedded:d,onClose:we,onClearData:a,onSkipToInput:()=>O.current?.focus()}),!g&&L==="icon"?m(W5,{buttonRef:v,logo:h,onOpen:re,placement:x}):m(tw,{panelOpen:g,suggestions:K,onSubmit:_,onEscape:y,onFocus:Le,onBlur:ee,onUploadFile:Se,inputRef:O})]}),F.overlay.value]})}const iw=`*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*{box-sizing:border-box;font:inherit;border:0 solid;-webkit-tap-highlight-color:transparent}button{all:unset;cursor:pointer;touch-action:manipulation}ul,ol,li,p{margin:0;padding:0}ul,ol{list-style:none}svg{display:block}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.pointer-events-none{pointer-events:none}.pointer-events-auto{pointer-events:auto}.visible{visibility:visible}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.inset-0{inset:0}.-bottom-1\\.5{bottom:-.375rem}.-top-full{top:-100%}.bottom-0{bottom:0}.bottom-3{bottom:.75rem}.bottom-full{bottom:100%}.left-1\\/2{left:50%}.left-\\[--ax\\]{left:var(--ax)}.right-1\\.5{right:.375rem}.top-2{top:.5rem}.top-\\[calc\\(var\\(--kin-vv-top\\,0px\\)_\\+_var\\(--kin-inset\\,1\\.5rem\\)\\)\\]{top:calc(var(--kin-vv-top,0px) + var(--kin-inset,1.5rem))}.z-50{z-index:50}.z-\\[999999\\]{z-index:999999}.col-span-full{grid-column:1 / -1}.row-span-full{grid-row:1 / -1}.m-0{margin:0}.-my-\\[0\\.125em\\]{margin-top:-.125em;margin-bottom:-.125em}.my-auto{margin-top:auto;margin-bottom:auto}.-mr-1{margin-right:-.25rem}.-mt-0\\.5{margin-top:-.125rem}.mb-2{margin-bottom:.5rem}.block{display:block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.grid{display:grid}.hidden{display:none}.size-10{width:2.5rem;height:2.5rem}.size-12{width:3rem;height:3rem}.size-3{width:.75rem;height:.75rem}.size-3\\.5{width:.875rem;height:.875rem}.size-5{width:1.25rem;height:1.25rem}.size-6{width:1.5rem;height:1.5rem}.size-8{width:2rem;height:2rem}.size-full{width:100%;height:100%}.h-1{height:.25rem}.h-\\[calc\\(var\\(--kin-vv-h\\,100dvh\\)_-_var\\(--kin-inset\\,1\\.5rem\\)\\)\\]{height:calc(var(--kin-vv-h,100dvh) - var(--kin-inset,1.5rem))}.h-full{height:100%}.max-h-\\[6\\.5em\\]{max-height:6.5em}.min-h-0{min-height:0px}.w-12{width:3rem}.w-4{width:1rem}.w-6{width:1.5rem}.w-\\[calc\\(100\\%-1rem\\)\\]{width:calc(100% - 1rem)}.w-full{width:100%}.min-w-0{min-width:0px}.max-w-\\[95\\%\\]{max-width:95%}.max-w-full{max-width:100%}.flex-1{flex:1 1 0%}.flex-shrink-0,.shrink-0{flex-shrink:0}.origin-\\[--origin\\]{transform-origin:var(--origin)}.-translate-x-1\\/2{--tw-translate-x: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rotate-180{--tw-rotate: 180deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-100{--tw-scale-x: 1;--tw-scale-y: 1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-50{--tw-scale-x: .5;--tw-scale-y: .5;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-90{--tw-scale-x: .9;--tw-scale-y: .9;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes kin-drawer-in{0%{transform:translateY(100%)}to{transform:translateY(0)}}.animate-kin-drawer-in{animation:kin-drawer-in .24s var(--kin-fluid-ease) backwards}@keyframes kin-fade{0%{opacity:0}to{opacity:1}}.animate-kin-fade-in{animation:kin-fade .4s ease both}@keyframes kin-slide-up{0%{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}.animate-kin-message-in{animation:kin-slide-up .24s var(--kin-fluid-ease) both}@keyframes kin-pop{0%{opacity:0;scale:.9}to{opacity:1;scale:1}}.animate-kin-pop-in{animation:kin-pop .24s cubic-bezier(.34,1.56,.64,1) backwards}@keyframes kin-shimmer{0%{background-position:200% 50%}to{background-position:-200% 50%}}.animate-kin-shimmer{animation:kin-shimmer 2.5s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}.animate-kin-spin{animation:spin 1s linear infinite}@keyframes kin-toast-in{0%{opacity:0;transform:translate(-50%) translateY(16px)}to{opacity:1;transform:translate(-50%) translateY(0)}}.animate-kin-toast-in{animation:kin-toast-in .28s var(--kin-fluid-ease) both}@keyframes kin-toast-out{0%{opacity:1;transform:translate(-50%) translateY(0)}to{opacity:0;transform:translate(-50%) translateY(16px)}}.animate-kin-toast-out{animation:kin-toast-out .22s var(--kin-fluid-ease) forwards}.animate-none{animation:none}@keyframes pulse{50%{opacity:.5}}.animate-pulse{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.resize-none{resize:none}.resize{resize:both}.grid-rows-\\[0fr\\]{grid-template-rows:0fr}.grid-rows-\\[1fr\\]{grid-template-rows:1fr}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.place-items-center{place-items:center}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center{align-items:center}.justify-start{justify-content:flex-start}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-1{gap:.25rem}.gap-1\\.5{gap:.375rem}.gap-2{gap:.5rem}.gap-2\\.5{gap:.625rem}.gap-4{gap:1rem}.gap-x-2\\.5{-moz-column-gap:.625rem;column-gap:.625rem}.gap-y-1{row-gap:.25rem}.self-start{align-self:flex-start}.self-end{align-self:flex-end}.self-center{align-self:center}.self-stretch{align-self:stretch}.overflow-hidden{overflow:hidden}.overflow-clip{overflow:clip}.overflow-y-auto{overflow-y:auto}.overscroll-none{overscroll-behavior:none}.scroll-smooth{scroll-behavior:smooth}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.whitespace-nowrap{white-space:nowrap}.break-words{overflow-wrap:break-word}.rounded{border-radius:.25rem}.rounded-full{border-radius:9999px}.rounded-kin-2xl{border-radius:var(--kin-r-2xl)}.rounded-kin-3xl{border-radius:var(--kin-r-3xl)}.rounded-kin-lg{border-radius:var(--kin-r-lg)}.rounded-kin-md{border-radius:var(--kin-r-md)}.rounded-kin-sm{border-radius:var(--kin-r-sm)}.rounded-kin-xl{border-radius:var(--kin-r-xl)}.rounded-none{border-radius:0}.rounded-b-kin-sm{border-bottom-right-radius:var(--kin-r-sm);border-bottom-left-radius:var(--kin-r-sm)}.rounded-t-kin-2xl{border-top-left-radius:var(--kin-r-2xl);border-top-right-radius:var(--kin-r-2xl)}.rounded-t-kin-4xl{border-top-left-radius:var(--kin-r-4xl);border-top-right-radius:var(--kin-r-4xl)}.border{border-width:1px}.border-t{border-top-width:1px}.border-solid{border-style:solid}.border-none{border-style:none}.border-a-4{--tw-border-opacity: 1;border-color:oklch(var(--a-4) / var(--tw-border-opacity, 1))}.border-n-3{--tw-border-opacity: 1;border-color:oklch(var(--n-3) / var(--tw-border-opacity, 1))}.border-n-4{--tw-border-opacity: 1;border-color:oklch(var(--n-4) / var(--tw-border-opacity, 1))}.border-n-5{--tw-border-opacity: 1;border-color:oklch(var(--n-5) / var(--tw-border-opacity, 1))}.border-n-6\\/40{border-color:oklch(var(--n-6) / .4)}.border-transparent{border-color:transparent}.bg-a-9{--tw-bg-opacity: 1;background-color:oklch(var(--a-9) / var(--tw-bg-opacity, 1))}.bg-black\\/20{background-color:#0003}.bg-highest{--tw-bg-opacity: 1;background-color:oklch(var(--highest) / var(--tw-bg-opacity, 1))}.bg-n-1{--tw-bg-opacity: 1;background-color:oklch(var(--n-1) / var(--tw-bg-opacity, 1))}.bg-n-12{--tw-bg-opacity: 1;background-color:oklch(var(--n-12) / var(--tw-bg-opacity, 1))}.bg-n-2{--tw-bg-opacity: 1;background-color:oklch(var(--n-2) / var(--tw-bg-opacity, 1))}.bg-n-3{--tw-bg-opacity: 1;background-color:oklch(var(--n-3) / var(--tw-bg-opacity, 1))}.bg-n-3\\/75{background-color:oklch(var(--n-3) / .75)}.bg-n-5\\/50{background-color:oklch(var(--n-5) / .5)}.bg-red-600{--tw-bg-opacity: 1;background-color:rgb(220 38 38 / var(--tw-bg-opacity, 1))}.bg-transparent{background-color:transparent}.bg-\\[linear-gradient\\(90deg\\,oklch\\(var\\(--n-9\\)\\)_40\\%\\,oklch\\(var\\(--n-11\\)\\)_50\\%\\,oklch\\(var\\(--n-9\\)\\)_60\\%\\)\\]{background-image:linear-gradient(90deg,oklch(var(--n-9)) 40%,oklch(var(--n-11)) 50%,oklch(var(--n-9)) 60%)}.bg-gradient-to-b{background-image:linear-gradient(to bottom,var(--tw-gradient-stops))}.from-a-2\\/50{--tw-gradient-from: oklch(var(--a-2) / .5) var(--tw-gradient-from-position);--tw-gradient-to: rgb(255 255 255 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-transparent{--tw-gradient-from: transparent var(--tw-gradient-from-position);--tw-gradient-to: rgb(0 0 0 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.to-n-2{--tw-gradient-to: oklch(var(--n-2) / 1) var(--tw-gradient-to-position)}.to-transparent{--tw-gradient-to: transparent var(--tw-gradient-to-position)}.bg-\\[length\\:200\\%_100\\%\\]{background-size:200% 100%}.bg-clip-text{-webkit-background-clip:text;background-clip:text}.fill-n-12{fill:oklch(var(--n-12) / 1)}.object-contain{-o-object-fit:contain;object-fit:contain}.p-0\\.5{padding:.125rem}.p-1{padding:.25rem}.p-2{padding:.5rem}.p-3{padding:.75rem}.p-4{padding:1rem}.px-0{padding-left:0;padding-right:0}.px-2{padding-left:.5rem;padding-right:.5rem}.px-2\\.5{padding-left:.625rem;padding-right:.625rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-3\\.5{padding-left:.875rem;padding-right:.875rem}.px-4{padding-left:1rem;padding-right:1rem}.px-5{padding-left:1.25rem;padding-right:1.25rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\\.5{padding-top:.375rem;padding-bottom:.375rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-2\\.5{padding-top:.625rem;padding-bottom:.625rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-4{padding-top:1rem;padding-bottom:1rem}.py-6{padding-top:1.5rem;padding-bottom:1.5rem}.py-\\[0\\.25em\\]{padding-top:.25em;padding-bottom:.25em}.pb-1{padding-bottom:.25rem}.pb-safe-b{padding-bottom:max(.5rem,calc(env(safe-area-inset-bottom,0px) + .5rem))}.pl-1{padding-left:.25rem}.pl-2{padding-left:.5rem}.pl-3{padding-left:.75rem}.pl-5{padding-left:1.25rem}.pl-safe-l{padding-left:max(1rem,env(safe-area-inset-left,1rem))}.pr-2{padding-right:.5rem}.pr-5{padding-right:1.25rem}.pr-safe-r{padding-right:max(1rem,env(safe-area-inset-right,1rem))}.pt-1{padding-top:.25rem}.pt-1\\.5{padding-top:.375rem}.pt-2{padding-top:.5rem}.text-left{text-align:left}.text-center{text-align:center}.font-kin{font-family:var(--kin-font-family)}.text-\\[11px\\]{font-size:11px}.text-base{font-size:1rem;line-height:1.5rem}.text-kin{font-size:max(14px,1rem);line-height:1.5}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xs{font-size:.75rem;line-height:1rem}.font-medium{font-weight:500}.font-semibold{font-weight:600}.italic{font-style:italic}.leading-relaxed{line-height:1.625}.leading-tight{line-height:1.25}.text-inherit{color:inherit}.text-n-1{--tw-text-opacity: 1;color:oklch(var(--n-1) / var(--tw-text-opacity, 1))}.text-n-10{--tw-text-opacity: 1;color:oklch(var(--n-10) / var(--tw-text-opacity, 1))}.text-n-11{--tw-text-opacity: 1;color:oklch(var(--n-11) / var(--tw-text-opacity, 1))}.text-n-12{--tw-text-opacity: 1;color:oklch(var(--n-12) / var(--tw-text-opacity, 1))}.text-n-3{--tw-text-opacity: 1;color:oklch(var(--n-3) / var(--tw-text-opacity, 1))}.text-n-9{--tw-text-opacity: 1;color:oklch(var(--n-9) / var(--tw-text-opacity, 1))}.text-transparent{color:transparent}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.text-white\\/60{color:#fff9}.underline{text-decoration-line:underline}.no-underline{text-decoration-line:none}.underline-offset-2{text-underline-offset:2px}.opacity-0{opacity:0}.opacity-100{opacity:1}.shadow-2xl{--tw-shadow: 0 25px 50px -12px rgb(0 0 0 / .25);--tw-shadow-colored: 0 25px 50px -12px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-inner{--tw-shadow: inset 0 2px 4px 0 rgb(0 0 0 / .05);--tw-shadow-colored: inset 0 2px 4px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-md{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-xl{--tw-shadow: 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1);--tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-a-8\\/30{--tw-shadow-color: oklch(var(--a-8) / .3);--tw-shadow: var(--tw-shadow-colored)}.shadow-a-9\\/10{--tw-shadow-color: oklch(var(--a-9) / .1);--tw-shadow: var(--tw-shadow-colored)}.shadow-n-12\\/20{--tw-shadow-color: oklch(var(--n-12) / .2);--tw-shadow: var(--tw-shadow-colored)}.shadow-n-4\\/30{--tw-shadow-color: oklch(var(--n-4) / .3);--tw-shadow: var(--tw-shadow-colored)}.shadow-n-4\\/50{--tw-shadow-color: oklch(var(--n-4) / .5);--tw-shadow: var(--tw-shadow-colored)}.shadow-n-6\\/30{--tw-shadow-color: oklch(var(--n-6) / .3);--tw-shadow: var(--tw-shadow-colored)}.shadow-red-600\\/20{--tw-shadow-color: rgb(220 38 38 / .2);--tw-shadow: var(--tw-shadow-colored)}.outline-none{outline:2px solid transparent;outline-offset:2px}.outline{outline-style:solid}.outline-1{outline-width:1px}.outline-2{outline-width:2px}.outline-a-7{outline-color:oklch(var(--a-7) / 1)}.outline-a-9{outline-color:oklch(var(--a-9) / 1)}.outline-n-3{outline-color:oklch(var(--n-3) / 1)}.outline-n-4\\/50{outline-color:oklch(var(--n-4) / .5)}.outline-n-6\\/50{outline-color:oklch(var(--n-6) / .5)}.outline-transparent{outline-color:transparent}.blur{--tw-blur: blur(8px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.blur-0{--tw-blur: blur(0);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.blur-sm{--tw-blur: blur(4px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-\\[opacity\\,transform\\]{transition-property:opacity,transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-200{transition-duration:.2s}.duration-kin{transition-duration:.24s}.ease-kin-click{transition-timing-function:cubic-bezier(.5,.1,.9,.1)}.ease-kin-fluid{transition-timing-function:var(--kin-fluid-ease)}.ease-out-back{transition-timing-function:cubic-bezier(.34,1.56,.64,1)}.fr:focus-visible{outline:2px solid oklch(var(--a-9) / .5);outline-offset:2px}.corner-smooth{corner-shape:superellipse(1.25)}.\\[--kin-inset\\:0px\\]{--kin-inset: 0px}.\\[--kin-inset\\:2rem\\]{--kin-inset: 2rem}.\\[box-shadow\\:var\\(--tw-ring-offset-shadow\\,_0_0_\\#0000\\)\\,var\\(--tw-ring-shadow\\,_0_0_\\#0000\\)\\,var\\(--tw-shadow\\,_0_0_\\#0000\\)\\,inset_0_4px_16px_-4px_oklch\\(var\\(--a-8\\)\\)\\]{box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow, 0 0 #0000),inset 0 4px 16px -4px oklch(var(--a-8))}.\\[mask-image\\:linear-gradient\\(to_bottom\\,transparent_0\\,_black_0\\.5em\\,_black_calc\\(100\\%-0\\.5em\\)\\,transparent_100\\%\\)\\]{-webkit-mask-image:linear-gradient(to bottom,transparent 0,black .5em,black calc(100% - .5em),transparent 100%);mask-image:linear-gradient(to bottom,transparent 0,black .5em,black calc(100% - .5em),transparent 100%)}.\\[mask-image\\:linear-gradient\\(to_bottom\\,transparent_0\\,_black_1\\.5rem\\,_black_calc\\(100\\%-1\\.5rem\\)\\,transparent_100\\%\\)\\,linear-gradient\\(black\\,black\\)\\]{-webkit-mask-image:linear-gradient(to bottom,transparent 0,black 1.5rem,black calc(100% - 1.5rem),transparent 100%),linear-gradient(black,black);mask-image:linear-gradient(to bottom,transparent 0,black 1.5rem,black calc(100% - 1.5rem),transparent 100%),linear-gradient(black,black)}.\\[mask-position\\:0_0\\,100\\%_0\\]{-webkit-mask-position:0 0,100% 0;mask-position:0 0,100% 0}.\\[mask-repeat\\:no-repeat\\,no-repeat\\]{-webkit-mask-repeat:no-repeat,no-repeat;mask-repeat:no-repeat,no-repeat}.\\[mask-size\\:calc\\(100\\%-6px\\)_100\\%\\,6px_100\\%\\]{-webkit-mask-size:calc(100% - 6px) 100%,6px 100%;mask-size:calc(100% - 6px) 100%,6px 100%}.\\[touch-action\\:manipulation\\]{touch-action:manipulation}.\\[will-change\\:transform\\,opacity\\]{will-change:transform,opacity}:root{font-size:16px;--a-1: 99.4% .003 22.8;--a-2: 98.4% .007 31;--a-3: 95.4% .022 30.9;--a-4: 92.6% .047 31.8;--a-5: 89.2% .063 31.5;--a-6: 85.2% .077 32;--a-7: 80.3% .094 32.2;--a-8: 74.1% .118 32.1;--a-9: 62.7% .194 33.3;--a-10: 60.4% .195 33.3;--a-11: 56.7% .198 32.8;--a-12: 34.6% .08 30.5;--n-1: 99.1% 0 0;--n-2: 98.1% 0 0;--n-3: 95.3% 0 0;--n-4: 93% 0 0;--n-5: 90.8% 0 0;--n-6: 88.4% 0 0;--n-7: 85.1% 0 0;--n-8: 79.1% 0 0;--n-9: 64.3% 0 0;--n-10: 60.9% 0 0;--n-11: 50.3% 0 0;--n-12: 24.3% 0 0;--kin-vv-h:calc(100dvh - 16px);--kin-vv-top: 16px;--kin-fluid-ease: cubic-bezier(.88, .77, .12, .98);--kin-font-family: inherit}.kin-markdown p{margin:0 0 1em}.kin-markdown p:last-child{margin-bottom:0}.kin-markdown :is(strong,b){font-weight:600}.kin-markdown :is(em,i){font-style:italic}.kin-markdown code{background:rgba(255,255,255,.1);padding:.15em .4em;border-radius:var(--kin-r-xs);font-family:SF Mono,Monaco,Consolas,monospace;font-size:.875em}.kin-markdown pre{background:rgba(0,0,0,.4);padding:14px 16px;border-radius:var(--kin-r-sm);overflow-x:auto;margin:1em 0;border:1px solid oklch(var(--n-6) / .4)}.kin-markdown pre code{background:none;padding:0;font-size:.85em;line-height:1.5}.kin-markdown :is(ul,ol){margin:.75em 0;padding-left:1.5em}.kin-markdown ul{list-style-type:disc}.kin-markdown ol{list-style-type:decimal}.kin-markdown li{margin:.35em 0}.kin-markdown li::marker{color:oklch(var(--n-9))}.kin-markdown :is(ul,ol) :is(ul,ol){margin:.25em 0}.kin-markdown blockquote{border-left:3px solid oklch(var(--a-9));margin:1em 0;padding:.5em 0 .5em 1em;color:oklch(var(--n-11));font-style:italic}.kin-markdown :is(h1,h2,h3,h4){font-weight:600;margin:1.25em 0 .5em;line-height:1.3}.kin-markdown :is(h1,h2,h3):first-child{margin-top:0}.kin-markdown h1{font-size:1.4em}.kin-markdown h2{font-size:1.25em}.kin-markdown h3{font-size:1.1em}.kin-markdown table{width:100%;border-collapse:collapse;margin:1em 0;font-size:.9em}.kin-markdown :is(th,td){padding:.5em .75em;border:1px solid oklch(var(--n-6) / .4);text-align:left}.kin-markdown th{background:oklch(var(--n-4));font-weight:600}.kin-markdown hr{border:none;border-top:1px solid oklch(var(--n-6) / .4);margin:1.5em 0}.kin-markdown hr+p{display:flex;flex-wrap:wrap;align-items:center;gap:5px;font-size:.75em;color:oklch(var(--n-9));margin:-1em 0 0;line-height:1.6}.kin-markdown input[type=checkbox]{margin-right:.5em;accent-color:oklch(var(--a-9))}.kin-markdown .streamdown-caret{display:inline-block;width:2px;height:1em;background:oklch(var(--a-9));margin-left:2px;animation:kin-caret 1s ease-in-out infinite;vertical-align:text-bottom}@keyframes kin-caret{0%,to{opacity:1}50%{opacity:0}}@media (prefers-reduced-motion: reduce){*,*:before,*:after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}}[data-dragging],[data-dragging] *{touch-action:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;cursor:grabbing}.placeholder\\:text-n-9::-moz-placeholder{--tw-text-opacity: 1;color:oklch(var(--n-9) / var(--tw-text-opacity, 1))}.placeholder\\:text-n-9::placeholder{--tw-text-opacity: 1;color:oklch(var(--n-9) / var(--tw-text-opacity, 1))}.after\\:pointer-events-none:after{content:var(--tw-content);pointer-events:none}.after\\:absolute:after{content:var(--tw-content);position:absolute}.after\\:-inset-0\\.5:after{content:var(--tw-content);inset:-.125rem}@keyframes kin-fade-out{0%{content:var(--tw-content);opacity:1}to{content:var(--tw-content);opacity:0}}.after\\:animate-kin-pulse:after{content:var(--tw-content);animation:kin-fade-out 2.5s var(--kin-fluid-ease) infinite alternate-reverse}.after\\:rounded-kin-3xl:after{content:var(--tw-content);border-radius:var(--kin-r-3xl)}.after\\:outline:after{content:var(--tw-content);outline-style:solid}.after\\:outline-2:after{content:var(--tw-content);outline-width:2px}.after\\:outline-offset-2:after{content:var(--tw-content);outline-offset:2px}.after\\:outline-a-9\\/20:after{content:var(--tw-content);outline-color:oklch(var(--a-9) / .2)}.after\\:content-\\[\\'\\'\\]:after{--tw-content: "";content:var(--tw-content)}.after\\:corner-smooth:after{content:var(--tw-content);corner-shape:superellipse(1.25)}.first\\:border-t-0:first-child{border-top-width:0px}.first\\:pt-0:first-child{padding-top:0}.focus-within\\:border-a-6\\/50:focus-within{border-color:oklch(var(--a-6) / .5)}.focus-within\\:pb-2:focus-within{padding-bottom:.5rem}.focus-within\\:outline-\\[3px\\]:focus-within{outline-width:3px}.focus-within\\:outline-a-4\\/50:focus-within{outline-color:oklch(var(--a-4) / .5)}.hover\\:bg-a-10:hover{--tw-bg-opacity: 1;background-color:oklch(var(--a-10) / var(--tw-bg-opacity, 1))}.hover\\:bg-n-3:hover{--tw-bg-opacity: 1;background-color:oklch(var(--n-3) / var(--tw-bg-opacity, 1))}.hover\\:bg-n-3\\/50:hover{background-color:oklch(var(--n-3) / .5)}.hover\\:bg-n-4:hover{--tw-bg-opacity: 1;background-color:oklch(var(--n-4) / var(--tw-bg-opacity, 1))}.hover\\:text-a-9:hover{--tw-text-opacity: 1;color:oklch(var(--a-9) / var(--tw-text-opacity, 1))}.hover\\:text-n-11:hover{--tw-text-opacity: 1;color:oklch(var(--n-11) / var(--tw-text-opacity, 1))}.hover\\:text-n-12:hover{--tw-text-opacity: 1;color:oklch(var(--n-12) / var(--tw-text-opacity, 1))}.hover\\:text-white\\/100:hover{color:#fff}.hover\\:underline-offset-4:hover{text-underline-offset:4px}.hover\\:shadow-a-8\\/40:hover{--tw-shadow-color: oklch(var(--a-8) / .4);--tw-shadow: var(--tw-shadow-colored)}.hover\\:outline-2:hover{outline-width:2px}.hover\\:outline-n-7\\/50:hover{outline-color:oklch(var(--n-7) / .5)}.focus\\:top-2:focus{top:.5rem}.focus-visible\\:rounded-kin-xs:focus-visible{border-radius:var(--kin-r-xs)}.active\\:scale-95:active{--tw-scale-x: .95;--tw-scale-y: .95;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.active\\:bg-n-3\\/75:active{background-color:oklch(var(--n-3) / .75)}.disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\\:text-n-6:disabled{--tw-text-opacity: 1;color:oklch(var(--n-6) / var(--tw-text-opacity, 1))}.disabled\\:opacity-50:disabled{opacity:.5}.group:has([data-dragging]) .group-has-\\[\\[data-dragging\\]\\]\\:\\!transition-none{transition-property:none!important}.data-\\[open\\]\\:scale-100[data-open]{--tw-scale-x: 1;--tw-scale-y: 1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\\[open\\]\\:opacity-100[data-open]{opacity:1}.data-\\[open\\]\\:delay-300[data-open]{transition-delay:.3s}.group[data-side=bottom] .group-data-\\[side\\=bottom\\]\\:-top-6{top:-1.5rem}.group[data-side=top] .group-data-\\[side\\=top\\]\\:-bottom-6{bottom:-1.5rem}.group[data-side=top] .group-data-\\[side\\=top\\]\\:rotate-180{--tw-rotate: 180deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.group[data-placement=embedded] .group-data-\\[placement\\=embedded\\]\\:pb-2{padding-bottom:.5rem}@media (min-width: 640px){.sm\\:bottom-4{bottom:1rem}.sm\\:top-auto{top:auto}.sm\\:size-7{width:1.75rem;height:1.75rem}.sm\\:size-8{width:2rem;height:2rem}.sm\\:h-auto{height:auto}.sm\\:max-h-\\[calc\\(min\\(90vh\\,var\\(--kin-vv-h\\,90svh\\)\\)_-_var\\(--kin-inset\\,1\\.5rem\\)\\)\\]{max-height:calc(min(90vh,var(--kin-vv-h,90svh)) - var(--kin-inset,1.5rem))}.sm\\:min-h-\\[50vh\\]{min-height:50vh}.sm\\:w-\\[480px\\]{width:480px}.sm\\:w-full{width:100%}@keyframes kin-slide-up{0%{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}.sm\\:animate-kin-panel-in{animation:kin-slide-up .35s var(--kin-fluid-ease) both}.sm\\:overscroll-auto{overscroll-behavior:auto}.sm\\:rounded-kin-4xl{border-radius:var(--kin-r-4xl)}.sm\\:rounded-kin-xl{border-radius:var(--kin-r-xl)}.sm\\:rounded-none{border-radius:0}.sm\\:p-2{padding:.5rem}.sm\\:px-14{padding-left:3.5rem;padding-right:3.5rem}.sm\\:px-4{padding-left:1rem;padding-right:1rem}.sm\\:px-5{padding-left:1.25rem;padding-right:1.25rem}.sm\\:text-sm{font-size:.875rem;line-height:1.25rem}.sm\\:font-medium{font-weight:500}.group[data-placement=left] .group-data-\\[placement\\=left\\]\\:sm\\:left-4{left:1rem}.group[data-placement=right] .group-data-\\[placement\\=right\\]\\:sm\\:right-4{right:1rem}.group[data-placement=center] .group-data-\\[placement\\=center\\]\\:sm\\:justify-self-center{justify-self:center}.group[data-placement=left] .group-data-\\[placement\\=left\\]\\:sm\\:pl-2{padding-left:.5rem}.group[data-placement=left] .group-data-\\[placement\\=left\\]\\:sm\\:pr-24{padding-right:6rem}.group[data-placement=right] .group-data-\\[placement\\=right\\]\\:sm\\:pl-24{padding-left:6rem}.group[data-placement=right] .group-data-\\[placement\\=right\\]\\:sm\\:pr-2{padding-right:.5rem}}.\\[\\&\\:\\:-webkit-scrollbar-thumb\\]\\:rounded-kin-xs::-webkit-scrollbar-thumb{border-radius:var(--kin-r-xs)}.\\[\\&\\:\\:-webkit-scrollbar-thumb\\]\\:bg-n-4::-webkit-scrollbar-thumb{--tw-bg-opacity: 1;background-color:oklch(var(--n-4) / var(--tw-bg-opacity, 1))}.\\[\\&\\:\\:-webkit-scrollbar-track\\]\\:bg-transparent::-webkit-scrollbar-track{background-color:transparent}.\\[\\&\\:\\:-webkit-scrollbar\\]\\:w-1\\.5::-webkit-scrollbar{width:.375rem}.\\[\\&\\>\\:first-child\\]\\:mt-auto>:first-child{margin-top:auto}.\\[\\&_svg\\]\\:size-3\\.5 svg{width:.875rem;height:.875rem}.\\[\\&_svg\\]\\:size-4 svg{width:1rem;height:1rem}.\\[\\&_svg\\]\\:size-6 svg{width:1.5rem;height:1.5rem}
|
|
121
121
|
`,aw=e=>typeof e=="object"&&e!==null&&typeof e.type=="string"&&e.type.startsWith("kin:"),Uh=["gray","mauve","slate","sage","olive","sand","tomato","red","ruby","crimson","pink","plum","purple","violet","iris","indigo","blue","cyan","teal","jade","green","grass","brown","orange","sky","mint","lime","yellow","amber","bronze","gold"],zh={gray:[[.178,0,null],[.213,0,null],[.254,0,null],[.283,0,null],[.313,0,null],[.349,0,null],[.402,0,null],[.488,0,null],[.538,0,null],[.584,0,null],[.77,0,null],[.949,0,null]],mauve:[[.18,.004,307.8],[.215,.004,307.8],[.255,.006,306.5],[.284,.008,307.8],[.314,.009,306.9],[.35,.01,304],[.402,.012,304.4],[.492,.016,300.7],[.54,.017,294],[.586,.017,295.4],[.77,.014,296.6],[.949,.003,286.3]],slate:[[.179,.004,286],[.213,.004,264.4],[.253,.006,261.2],[.283,.007,259.5],[.311,.008,259.7],[.346,.01,256.5],[.398,.012,253.8],[.49,.016,247.6],[.537,.015,261.1],[.583,.014,263.3],[.768,.01,261.3],[.949,.003,264.6]],sage:[[.179,.004,167.4],[.211,.004,160.2],[.251,.004,164.2],[.281,.005,164.9],[.311,.005,167.4],[.347,.006,167.4],[.399,.008,167.4],[.488,.009,169.8],[.533,.018,170.8],[.579,.016,170.5],[.766,.01,167.5],[.947,.002,167.7]],olive:[[.18,.004,128.3],[.212,.004,128.3],[.252,.005,129],[.281,.006,131.4],[.31,.007,131.4],[.346,.008,134.4],[.399,.01,136],[.488,.012,140.8],[.535,.018,139.6],[.581,.016,140.1],[.766,.013,139.5],[.947,.003,144.8]],sand:[[.178,.002,106.6],[.213,.002,106.6],[.253,.003,106.6],[.283,.004,99],[.312,.004,100.7],[.349,.006,102.2],[.401,.007,96.1],[.49,.01,91.7],[.535,.011,94.1],[.581,.011,94],[.767,.009,97.4],[.948,.003,106.4]],tomato:[[.187,.012,19.6],[.208,.017,32],[.254,.054,26.9],[.291,.087,28.2],[.331,.097,28.7],[.38,.099,30],[.447,.107,31.5],[.538,.13,32.9],[.627,.194,33.3],[.665,.179,34.1],[.784,.164,36],[.899,.047,31.1]],red:[[.188,.013,19.4],[.205,.022,14.7],[.25,.064,13.1],[.289,.096,14.3],[.332,.107,15.5],[.383,.111,16.9],[.451,.121,18.9],[.544,.147,21.4],[.625,.193,23],[.665,.177,23.1],[.784,.162,22.3],[.902,.053,6.14]],ruby:[[.189,.014,2.9],[.208,.016,5.29],[.254,.06,6.54],[.292,.089,5.5],[.333,.1,6.4],[.382,.105,7.59],[.448,.117,9.02],[.544,.145,11.1],[.628,.195,13.2],[.664,.179,13.7],[.786,.161,17],[.905,.053,355.8]],crimson:[[.189,.014,354.2],[.207,.022,352.9],[.256,.059,353.9],[.293,.094,354.1],[.333,.104,354.7],[.382,.109,355.5],[.45,.12,356.7],[.542,.148,358.3],[.634,.213,1.3],[.664,.197,1.95],[.787,.167,6.72],[.909,.054,346.7]],pink:[[.191,.017,334.9],[.207,.031,338.2],[.261,.061,337.5],[.299,.098,340.1],[.338,.104,340.6],[.389,.107,341.6],[.459,.119,342.6],[.545,.145,344.1],[.617,.208,346.1],[.65,.197,346.2],[.789,.19,350.7],[.905,.059,343.2]],plum:[[.19,.017,327],[.21,.031,327.7],[.266,.062,326.7],[.307,.088,325.3],[.343,.095,324.6],[.389,.097,324.2],[.456,.106,323.4],[.545,.128,322.2],[.579,.188,322.1],[.616,.182,322.1],[.786,.154,322.1],[.906,.055,325.8]],purple:[[.192,.022,316],[.213,.031,314.3],[.266,.062,312],[.308,.083,310.7],[.344,.091,310.1],[.388,.097,309.7],[.45,.108,308.7],[.541,.133,307.1],[.555,.183,305.9],[.596,.177,306.3],[.785,.156,307.9],[.911,.049,310.9]],violet:[[.191,.026,290.5],[.211,.032,299.5],[.271,.066,293.9],[.312,.093,291.7],[.348,.099,291.4],[.39,.102,291.8],[.445,.111,291.6],[.516,.131,290.2],[.542,.179,288.1],[.588,.17,289.7],[.778,.137,293.6],[.912,.045,292.6]],iris:[[.193,.022,284.2],[.209,.029,286.5],[.273,.069,278.6],[.319,.102,276.1],[.358,.109,277.4],[.399,.112,279.6],[.448,.12,280.8],[.507,.138,281.1],[.54,.184,278.3],[.587,.172,281.2],[.776,.131,286.6],[.914,.042,287]],indigo:[[.191,.025,276.7],[.209,.03,276],[.272,.069,267.8],[.319,.093,267],[.362,.105,267.5],[.404,.111,268.3],[.45,.12,268.8],[.503,.137,268.4],[.544,.191,267.1],[.59,.176,269.2],[.777,.123,273.3],[.911,.043,270]],blue:[[.193,.026,256.8],[.213,.03,258.8],[.274,.067,254],[.317,.1,248.3],[.365,.108,249.7],[.416,.112,251.7],[.475,.121,252.8],[.541,.14,253.2],[.649,.193,251.8],[.689,.17,251.5],[.768,.135,248.8],[.907,.051,238.3]],cyan:[[.191,.017,219.9],[.214,.018,225.4],[.272,.044,222.5],[.315,.063,222.1],[.362,.07,221.5],[.414,.075,221.7],[.478,.083,221.4],[.558,.098,220.7],[.661,.122,221.5],[.698,.12,219.1],[.786,.115,213.4],[.909,.057,211.7]],teal:[[.189,.012,184.5],[.217,.017,189.3],[.274,.038,186.3],[.317,.055,187],[.363,.06,186.5],[.414,.065,185.4],[.473,.074,184.5],[.539,.087,183.5],[.649,.113,182],[.687,.123,180.3],[.789,.147,175.7],[.905,.072,175.3]],jade:[[.188,.014,166.3],[.216,.018,166.1],[.272,.042,166.8],[.316,.057,168],[.362,.064,168.5],[.411,.068,169.7],[.468,.075,170.6],[.537,.088,171.8],[.642,.115,170.8],[.678,.125,169.9],[.785,.156,167.1],[.903,.078,167]],green:[[.189,.013,163.3],[.213,.016,162.2],[.271,.039,162.7],[.318,.057,161.5],[.365,.066,161.1],[.413,.073,160.7],[.467,.083,159.9],[.527,.096,159.2],[.64,.133,157.8],[.676,.141,157.6],[.78,.166,157.2],[.905,.083,158.3]],grass:[[.188,.014,155.8],[.211,.014,151.5],[.267,.03,150.7],[.319,.052,150.4],[.367,.062,149.9],[.416,.072,149.3],[.468,.084,148.9],[.524,.097,148.2],[.652,.147,147.4],[.69,.145,147.6],[.78,.142,148.5],[.911,.078,144.9]],brown:[[.178,.005,81.5],[.213,.007,51.6],[.254,.013,53.5],[.288,.018,55.4],[.325,.024,55.9],[.37,.032,57.7],[.429,.041,59.8],[.509,.053,62.2],[.633,.078,60.8],[.674,.075,61.5],[.798,.063,62.5],[.918,.036,75.7]],bronze:[[.181,.005,41.6],[.215,.005,41.5],[.255,.008,42.7],[.291,.01,45.5],[.329,.013,43.3],[.374,.016,44.3],[.43,.02,44.8],[.499,.024,45.2],[.627,.046,44.3],[.669,.045,44.3],[.792,.043,44.5],[.915,.017,50.3]],gold:[[.182,.002,106.6],[.216,.006,92.5],[.255,.008,88.3],[.291,.01,86.8],[.329,.011,83.7],[.374,.014,82.4],[.429,.016,80.9],[.498,.02,79.5],[.621,.049,78.1],[.662,.047,77.2],[.794,.041,77.2],[.915,.014,77.4]],sky:[[.19,.024,257.1],[.216,.029,258.5],[.271,.054,251.9],[.322,.07,247.8],[.372,.079,245.8],[.427,.087,243.6],[.488,.098,240.7],[.557,.114,237.2],[.861,.103,217.8],[.908,.073,214.9],[.793,.099,231.7],[.934,.053,214.4]],mint:[[.188,.012,192.3],[.21,.017,196.6],[.269,.039,192.5],[.313,.058,191.6],[.359,.063,188.9],[.41,.067,186.3],[.471,.073,183.4],[.54,.085,179.6],[.87,.1,178],[.916,.08,179.4],[.795,.118,176.4],[.93,.057,168.5]],lime:[[.18,.014,120.3],[.208,.019,129],[.266,.034,132.2],[.317,.047,131.8],[.363,.058,131.6],[.412,.069,131.4],[.464,.08,131.2],[.524,.095,130.9],[.888,.175,126.1],[.942,.175,123.7],[.868,.156,124.8],[.946,.082,122.6]],yellow:[[.181,.013,86],[.209,.017,92.1],[.259,.047,90.3],[.293,.069,94.2],[.333,.079,94.6],[.384,.077,93.3],[.452,.081,91.5],[.535,.095,89.9],[.927,.209,102.1],[.971,.182,109.4],[.9,.166,101.6],[.941,.075,101]],amber:[[.184,.013,77.3],[.212,.018,78.7],[.258,.044,74.6],[.296,.071,76.2],[.337,.081,76.4],[.387,.078,75.1],[.453,.082,74.5],[.536,.096,73.6],[.856,.178,81.4],[.902,.206,97],[.871,.175,85.1],[.935,.072,86]],orange:[[.186,.012,53.7],[.209,.019,67.4],[.257,.045,59.5],[.293,.08,58.6],[.335,.087,58.1],[.386,.087,55.2],[.453,.095,53.1],[.541,.116,49.7],[.689,.191,44.8],[.741,.199,46.3],[.799,.163,50.8],[.925,.052,66.2]]},$h={gray:[[.991,0,null],[.981,0,null],[.953,0,null],[.93,0,null],[.908,0,null],[.884,0,null],[.851,0,null],[.791,0,null],[.643,0,null],[.609,0,null],[.503,0,null],[.243,0,null]],mauve:[[.992,.002,321.1],[.983,.003,311.2],[.956,.006,314.2],[.932,.008,310],[.909,.01,306.6],[.886,.012,304],[.854,.014,300.6],[.794,.019,293.5],[.646,.019,292.6],[.611,.018,293.1],[.505,.016,296.1],[.245,.013,298]],slate:[[.991,.001,286.4],[.982,.003,286.3],[.956,.004,281.9],[.931,.006,283],[.91,.008,283.6],[.888,.009,281.8],[.853,.012,280.8],[.794,.016,278.1],[.646,.016,277.8],[.61,.016,273.2],[.503,.014,263.4],[.241,.01,249.5]],sage:[[.992,.003,160.4],[.981,.003,171.2],[.955,.003,170.4],[.931,.003,170.4],[.909,.004,167.7],[.885,.004,167.7],[.851,.004,169.9],[.792,.005,169.5],[.639,.01,172.4],[.605,.01,172.8],[.501,.008,175.9],[.24,.012,166.8]],olive:[[.993,.002,149.1],[.983,.003,144.8],[.956,.004,141.1],[.932,.004,142.1],[.909,.005,139.3],[.886,.006,141.1],[.852,.006,141.1],[.792,.007,140.6],[.64,.011,136.5],[.605,.012,136.5],[.5,.011,139.9],[.242,.011,138.2]],sand:[[.994,.001,106.4],[.982,.001,106.4],[.956,.002,97.6],[.932,.003,100.6],[.91,.004,95.9],[.886,.005,98.3],[.853,.006,96.6],[.792,.008,96.5],[.641,.01,106.7],[.606,.01,106.7],[.498,.008,106.7],[.243,.008,96.3]],tomato:[[.994,.003,22.8],[.984,.007,31],[.954,.022,30.9],[.926,.047,31.8],[.892,.063,31.5],[.852,.077,32],[.803,.094,32.2],[.741,.118,32.1],[.627,.194,33.3],[.604,.195,33.3],[.567,.198,32.8],[.346,.08,30.5]],red:[[.994,.003,22.8],[.983,.008,16],[.956,.021,16.2],[.928,.047,16.7],[.896,.062,17.3],[.857,.075,17.9],[.807,.089,18.4],[.745,.113,19.1],[.625,.193,23],[.6,.195,23.9],[.557,.198,25.1],[.339,.109,16.7]],ruby:[[.994,.003,356.3],[.983,.008,8.41],[.954,.022,8.56],[.928,.042,8.46],[.896,.055,8.16],[.858,.066,7.84],[.81,.08,7.49],[.749,.101,6.86],[.628,.195,13.2],[.601,.196,13.4],[.549,.199,13.9],[.341,.11,10]],crimson:[[.994,.003,356.3],[.982,.008,357.2],[.954,.026,356.3],[.925,.041,356.3],[.893,.054,355.8],[.855,.065,355.6],[.808,.078,354.8],[.75,.099,354.1],[.634,.213,1.3],[.608,.211,2.36],[.552,.207,4.49],[.341,.113,356.8]],pink:[[.994,.004,336.3],[.983,.009,340],[.954,.027,340.6],[.925,.042,340.7],[.893,.054,340.9],[.855,.067,340.9],[.809,.083,341.2],[.752,.107,341.6],[.617,.208,346.1],[.596,.207,346.5],[.557,.206,347.3],[.35,.129,345.5]],plum:[[.993,.005,316.9],[.983,.009,326],[.957,.027,325.5],[.929,.044,324.9],[.898,.057,324.4],[.86,.072,323.9],[.809,.091,323.1],[.742,.12,321.9],[.579,.188,322.1],[.553,.181,322.1],[.521,.173,322],[.338,.125,321.4]],purple:[[.993,.004,325.4],[.982,.009,313.1],[.959,.024,313.3],[.933,.039,312.1],[.901,.054,311.6],[.86,.071,311],[.804,.093,309.9],[.733,.123,308],[.555,.183,305.9],[.524,.176,305.7],[.516,.174,305.7],[.322,.11,303.8]],violet:[[.992,.003,308],[.983,.009,295],[.963,.019,296.6],[.934,.039,295.4],[.904,.057,294.1],[.864,.072,293.9],[.806,.09,293.5],[.729,.119,292.4],[.542,.179,288.1],[.511,.177,287.6],[.508,.159,288.6],[.313,.098,286.8]],iris:[[.994,.003,286.4],[.981,.009,284.1],[.961,.018,283.8],[.935,.035,283.4],[.904,.053,283.8],[.865,.07,283.1],[.808,.088,282.9],[.729,.118,281.5],[.54,.184,278.3],[.509,.186,277.5],[.51,.173,279.7],[.315,.099,277.4]],indigo:[[.994,.001,286.4],[.983,.008,271.4],[.961,.017,268.5],[.935,.034,268.5],[.903,.051,270],[.863,.071,271.5],[.807,.087,271.4],[.73,.113,270.5],[.544,.191,267.1],[.511,.195,266.5],[.51,.173,267.1],[.313,.086,268.6]],blue:[[.993,.003,247.6],[.982,.01,243.3],[.96,.02,236.7],[.937,.037,239],[.906,.053,242.8],[.864,.069,243.2],[.809,.088,243.3],[.735,.121,243],[.649,.193,251.8],[.621,.184,251.9],[.558,.189,253],[.324,.097,259]],cyan:[[.992,.004,219.2],[.98,.009,202.9],[.958,.026,203.6],[.932,.041,204.7],[.9,.054,206.5],[.859,.066,207.7],[.805,.082,209.6],[.727,.11,211.7],[.661,.122,221.5],[.627,.114,221.3],[.54,.127,223.7],[.332,.053,218.6]],teal:[[.994,.005,177.5],[.981,.009,179],[.961,.027,180.3],[.935,.042,180.2],[.9,.054,180.5],[.856,.064,181.4],[.797,.076,182.2],[.721,.097,183.5],[.649,.113,182],[.619,.11,181.2],[.53,.124,179],[.327,.05,185]],jade:[[.995,.004,172.6],[.982,.009,160.3],[.96,.022,161.9],[.934,.034,163.5],[.902,.046,164.8],[.859,.059,166.9],[.8,.077,169.5],[.721,.103,173.4],[.642,.115,170.8],[.613,.11,170.6],[.529,.127,167.2],[.326,.041,169.8]],green:[[.994,.004,159.1],[.982,.009,155.3],[.959,.023,156.4],[.933,.036,156.6],[.9,.05,157.2],[.857,.065,157.9],[.798,.084,159],[.714,.112,160.6],[.64,.133,157.8],[.611,.126,158.3],[.529,.133,158.3],[.322,.047,164.6]],grass:[[.994,.005,146.4],[.982,.009,145.9],[.961,.023,145.3],[.934,.037,146.2],[.901,.053,146.4],[.858,.071,146.8],[.798,.095,147.5],[.716,.13,148.3],[.652,.147,147.4],[.614,.142,147.3],[.527,.13,147.2],[.327,.053,148.6]],brown:[[.994,.002,63.2],[.983,.006,65.7],[.954,.013,67.8],[.926,.02,66.9],[.897,.029,65.8],[.862,.039,65.5],[.815,.053,64.2],[.747,.072,62.4],[.633,.078,60.8],[.597,.072,59.3],[.512,.058,55.5],[.332,.018,47]],bronze:[[.992,.001,15.9],[.981,.007,43],[.953,.01,44.3],[.925,.014,43.6],[.895,.018,42.6],[.86,.023,43.4],[.811,.03,41.9],[.742,.039,41.2],[.627,.046,44.3],[.588,.045,42.4],[.51,.044,38.4],[.329,.029,35.2]],gold:[[.994,.001,106.4],[.981,.009,97.3],[.953,.012,94.7],[.926,.015,93.2],[.896,.019,90.7],[.86,.025,88.4],[.81,.032,83.4],[.739,.042,78.2],[.621,.049,78.1],[.588,.047,77.4],[.504,.039,78.1],[.332,.019,81.7]],sky:[[.993,.005,211.9],[.98,.01,217.7],[.961,.024,219.6],[.936,.036,220.4],[.903,.047,221.4],[.861,.058,222.9],[.806,.072,225.7],[.729,.096,228],[.861,.103,217.8],[.838,.104,219.6],[.526,.108,232.5],[.351,.057,241.6]],mint:[[.993,.005,183.7],[.982,.01,178.7],[.96,.03,179.6],[.933,.047,179],[.899,.061,178.7],[.856,.072,178.7],[.798,.085,178.2],[.722,.107,177.7],[.87,.1,178],[.841,.1,177.8],[.512,.095,176],[.35,.051,181.4]],lime:[[.992,.004,120.7],[.982,.01,116.7],[.959,.043,119.1],[.932,.069,120.4],[.897,.087,121.8],[.853,.099,123.4],[.795,.111,125.3],[.724,.135,128.1],[.888,.175,126.1],[.859,.188,126.7],[.544,.111,128.6],[.354,.057,121.2]],yellow:[[.993,.005,106.5],[.988,.025,102.9],[.974,.084,104.4],[.953,.117,101.7],[.925,.141,98.2],[.881,.134,95.4],[.836,.12,92.8],[.766,.137,89.8],[.927,.209,102.1],[.897,.185,97.5],[.574,.136,81.7],[.358,.046,86.6]],amber:[[.994,.003,84.6],[.986,.024,100.3],[.969,.069,100.4],[.945,.104,98.2],[.918,.133,98.4],[.881,.124,93.2],[.827,.122,86.2],[.758,.14,76.7],[.856,.178,81.4],[.831,.168,80.9],[.569,.144,67.3],[.352,.049,53.7]],orange:[[.992,.003,40.7],[.979,.015,70.8],[.958,.037,78.1],[.92,.081,74.2],[.89,.107,70.8],[.857,.11,64.4],[.805,.113,59.9],[.745,.132,54.8],[.689,.191,44.8],[.662,.194,43.5],[.592,.186,47],[.35,.069,40.8]]},Ea=e=>(e/=255,e<=.04045?e/12.92:((e+.055)/1.055)**2.4),sw=(e,t,n)=>{const r=.4122214708*e+.5363325363*t+.0514459929*n,i=.2119034982*e+.6806995451*t+.1073969566*n,a=.0883024619*e+.2817188376*t+.6299787005*n,s=Math.cbrt(r),o=Math.cbrt(i),u=Math.cbrt(a),c=.2104542553*s+.793617785*o-.0040720468*u,h=1.9779984951*s-2.428592205*o+.4505937099*u,d=.0259040371*s+.7827717662*o-.808675766*u;return[c,h,d]},Yh=([e,t,n])=>{const r=Math.sqrt(t*t+n*n),i=Math.atan2(n,t)*180/Math.PI;return[e,r,(i+360)%360]},Ti=([e,t,n])=>{const r=(n??0)*Math.PI/180;return[e,t*Math.cos(r),t*Math.sin(r)]},ow=e=>{const t=e.replace("#",""),n=parseInt(t.length===3?t.replace(/./g,s=>s+s):t,16),r=Ea(n>>16&255),i=Ea(n>>8&255),a=Ea(n&255);return Yh(sw(r,i,a))},Qn=(e,t)=>{const[n,r,i]=Ti(e),[a,s,o]=Ti(t);return Math.hypot(n-a,r-s,i-o)},uw=(e,t,n)=>{const r=Ti(e),i=Ti(t),a=[r[0]+(i[0]-r[0])*n,r[1]+(i[1]-r[1])*n,r[2]+(i[2]-r[2])*n];return Yh(a)},lw=([e,t,n])=>`oklch(${(e*100).toFixed(1)}% ${+t.toFixed(3)} ${+(n??0).toFixed(2)})`,jh=["1","2","3","4","5","6","7","8","9","10","11","12"],Xs=["gray","mauve","slate","sage","olive","sand"];function ji(e,t){return Object.fromEntries(t.map(n=>[n,e[n]]))}const cw=ji($h,Uh),dw=ji(zh,Uh),hw=ji($h,Xs),fw=ji(zh,Xs),Cl=({prefix:e,appearance:t,color:n,isNeutral:r=!1})=>{if(!/^#?[0-9A-Fa-f]{6}$/.test(n))throw new Error("Color must be a valid 6-digit hex");const i=t==="light"?cw:dw,a=t==="light"?hw:fw,s=ow(n),o=r?vl(s,a):vl(s,i);if(!r){o[8]=s,o[9]=pw(s,[o]);const u=Math.max(o[8][1],o[7][1]);o[10][1]=Math.min(u,o[10][1]),o[11][1]=Math.min(u,o[11][1])}return Object.fromEntries(jh.map((u,c)=>[`${e}${u}`,lw(o[c])]))};function pw(e,t){const[n,r,i]=e,a=n>.4?n-.03/(n+.1):n+.03/(n+.1),s=n>.4&&i!==null?r*.93:r,o=[a,s,i];let u=o,c=1/0;for(const h of t)for(const d of h){const f=Qn(o,d);f<c&&(c=f,u=d)}return[a,u[1],u[2]]}function vl(e,t){const n=[];for(const[x,L]of Object.entries(t))for(const P of L)n.push({scale:x,color:P,distance:Qn(e,P)});n.sort((x,L)=>x.distance-L.distance);const r=n.filter((x,L,P)=>L===P.findIndex(v=>v.scale===x.scale)),i=new Set(Xs);if(!r.every(x=>i.has(x.scale))&&i.has(r[0].scale))for(;r.length>1&&i.has(r[1].scale);)r.splice(1,1);const[s,o]=[r[0],r[1]],u=o.distance,c=s.distance,h=Qn(s.color,o.color),d=(c**2+h**2-u**2)/(2*c*h),f=(u**2+h**2-c**2)/(2*u*h),p=Math.max(0,d/Math.sqrt(1-d**2)/(f/Math.sqrt(1-f**2)))*.5,g=t[s.scale],k=t[o.scale],C=jh.map((x,L)=>uw(g[L],k[L],p)),w=C.slice().sort((x,L)=>Qn(e,x)-Qn(e,L))[0],A=e[1]/(w[1]||1e-6);for(const x of C)x[1]=Math.min(e[1]*1.5,x[1]*A),x[2]=e[2];return C}const mw=e=>e.slice(6,-1),Sl=e=>Object.entries(e).map(([t,n])=>`--${t}: ${mw(n)};`);function gw(e){const t=Cl({prefix:"a-",appearance:e.mode,color:e.accentColor}),n=Cl({prefix:"n-",appearance:e.mode,color:e.neutralColor??"#555555",isNeutral:!0}),r=`--highest: ${e.mode==="light"?"100% 0 0":"10% 0 0"};`;return[...Sl(t),...Sl(n),r].join(`
|
|
122
122
|
`)}const bw={sm:.25,md:.5,lg:1},Ew={"kin-r-xs":4,"kin-r-sm":8,"kin-r-md":10,"kin-r-lg":12,"kin-r-xl":16,"kin-r-2xl":20,"kin-r-3xl":24,"kin-r-4xl":32},_w=e=>`${Number(e.toFixed(3))}px`;function Tw(e){return Object.entries(Ew).map(([t,n])=>`--${t}: ${_w(n*bw[e])};`).join(`
|
|
123
123
|
`)}const es=e=>typeof e=="object"&&e!==null&&!Array.isArray(e),ei=e=>{if(typeof e!="string")return null;const t=e.trim();return t.length>0?t:null},kw=e=>{const t=ei(e);return t&&(t.startsWith("http://")||t.startsWith("https://")||t.startsWith("/")&&!t.startsWith("//"))?t:null},yw=e=>{if(!es(e))return null;if(e.kind==="job_cards"&&Array.isArray(e.jobs)){const t=e.jobs.flatMap(n=>{const r=xw(n);return r?[r]:[]});return t.length>0?{kind:"job_cards",jobs:t}:null}return null},Vh=e=>{if(!Array.isArray(e))return null;const t=e.flatMap(n=>{const r=yw(n);return r?[r]:[]});return t.length>0?t:null},xw=e=>{if(!es(e))return null;const t=e.id;if(typeof t!="string"&&typeof t!="number")return null;const n=ei(e.title);if(!n)return null;const r=Array.isArray(e.details)?e.details.flatMap(s=>{if(!es(s))return[];const o=ei(s.key),u=ei(s.value);return o&&u?[{key:o,value:u}]:[]}):[],i={id:String(t),title:n,details:r},a=kw(e.applyUrl);return a&&(i.applyUrl=a),i},ww=/^\[System: CV uploaded and processed - "(.+?)"/,Aw=e=>{if(e.role!=="assistant"&&e.role!=="user")return[];const t=typeof e.content=="string"?e.content:"";if(e.role==="user"){const r=ww.exec(t)?.[1];if(r)return[{role:"user",content:"",attachment:{name:r}}];if(t.startsWith("[System:"))return[]}const n=Vh(e.blocks)??void 0;return[{role:e.role,content:t,...n&&{blocks:n}}]},Cw=e=>`${iw}
|
|
@@ -125,4 +125,4 @@ Please report this to https://github.com/markedjs/marked.`,e){let r="<p>An error
|
|
|
125
125
|
:root {
|
|
126
126
|
${gw(e)}
|
|
127
127
|
${Tw(e.rounded??"lg")}
|
|
128
|
-
}`,Zs=document.getElementById("kin-root");if(!Zs)throw new Error("Kin frame root element is missing.");let xn=null,_r=null;const fn=e=>{xn&&_r&&_r.postMessage(e,xn)};let Tr,ht=null,ts=!1,dr=null,Ue;const qh=()=>{document.documentElement.dataset.mode=Tr.mode,ai(_t(pe,{},[_t("style",{id:"kin-styles"},Cw(Tr)),_t(rw,{starterPrompts:Ue.starterPrompts,placement:Ue.placement,launcher:Ue.launcher,logo:Ue.logo,onSendMessage:e=>ht?.sendMessage(e),onOpen:Js,onClose:()=>Wh(!0),onConnect:Vi,onClearData:()=>ht?.clearData(),onClipInset:
|
|
128
|
+
}`,Zs=document.getElementById("kin-root");if(!Zs)throw new Error("Kin frame root element is missing.");let xn=null,_r=null;const fn=e=>{xn&&_r&&_r.postMessage(e,xn)};let Tr,ht=null,ts=!1,dr=null,Ue;const vw=e=>fn({type:"kin:clip-inset",payload:e}),qh=()=>{document.documentElement.dataset.mode=Tr.mode,ai(_t(pe,{},[_t("style",{id:"kin-styles"},Cw(Tr)),_t(rw,{starterPrompts:Ue.starterPrompts,placement:Ue.placement,launcher:Ue.launcher,logo:Ue.logo,onSendMessage:e=>ht?.sendMessage(e),onOpen:Js,onClose:()=>Wh(!0),onConnect:Vi,onClearData:()=>ht?.clearData(),onClipInset:vw,onUploadFile:async(e,t)=>{if(!ht){F.setUploadState("error",e.name,"Not connected");return}const{id:n}=F.addMessage({role:"user",content:"",attachment:{name:e.name}});F.setUploadState("uploading",e.name);const r=await ht.uploadFile(e,t);r.success||(F.removeMessage(n),F.setUploadState("error",e.name,r.error))}})]),Zs)},Sw=e=>{Tr={...Tr,...e},qh()},Iw=e=>{switch(e.type){case"authenticated":F.connectionState.value="connected";break;case"history":e.messages?.length&&F.setMessages(e.messages.flatMap(Aw));break;case"response_start":F.startAssistantResponse();break;case"response_chunk":F.assistantStatus.value="responding",F.appendToLiveAssistantMessage(e.content||"");break;case"response_end":{const t=Vh(e.blocks)??void 0;F.finishAssistantResponse({blocks:t}),F.isOpen.value||(F.hasUnreadMessages.value=!0);break}case"quick_replies":e.options&&e.options.length>=2&&(F.quickReplies.value=e.options),F.assistantStatus.value=null;break;case"tool_call":F.assistantStatus.value=e.tool??"thinking";break;case"tool_result":e.tool&&e.tool!=="suggestQuickReplies"&&(F.assistantStatus.value="processing_results");break;case"data_cleared":F.clearMessages(),F.addMessage({role:"system",content:"Your conversation data has been cleared."});break;case"guardrail_block":F.finishAssistantResponse({sync:!1}),F.addMessage({role:"system",content:e.content||"I'm not able to help with that request."});break;case"upload_received":case"file_processing":F.setUploadState("processing",e.fileName),F.assistantStatus.value="processing_cv";break;case"file_processed":e.status==="success"?(F.setUploadState("success",e.fileName),F.assistantStatus.value=null,setTimeout(()=>F.setUploadState("idle"),2e3)):(F.setUploadState("error",e.fileName,e.error),F.assistantStatus.value=null);break;case"job_detail":e.jobId&&F.setJobDetail(e.jobId,{status:e.summary?"ready":"streaming",description:e.description,summary:e.summary});break;case"job_detail_chunk":e.jobId&&e.content&&F.appendJobSummaryChunk(e.jobId,e.content);break;case"job_detail_done":e.jobId&&F.finalizeJobSummary(e.jobId,e.summary??"");break;case"job_detail_error":e.jobId&&F.setJobDetail(e.jobId,{status:"error",error:e.content||"Unavailable"});break;case"error":F.finishAssistantResponse({sync:!1}),F.uploadState.value!=="idle"&&F.setUploadState("error",void 0,e.content),F.addMessage({role:"assistant",content:e.content||"An error occurred"}),fn({type:"kin:error",payload:{message:e.content||"Kin connection error"}});break}},Vi=()=>{if(ht)return;F.connectionState.value="connecting";const e=`${Ue.serviceUrl}/agent/candidate/${Ue.anonymousId}?key=${Ue.publishableKey}`;ht=Z5({url:e,onMessage:Iw,onClose:()=>{F.connectionState.value="disconnected",F.finishAssistantResponse({sync:!1}),F.jobDetails.value={};const t=ts;ht=null,ts=!1,!t&&F.isOpen.value&&(dr=setTimeout(()=>{dr=null,Vi()},1e3))},onError:()=>{F.connectionState.value="error",F.finishAssistantResponse({sync:!1}),F.jobDetails.value={},fn({type:"kin:error",payload:{message:"Kin connection error"}})}}),F.requestJobDetail.value=t=>ht?.requestJobDetail(t)},Nw=()=>{dr&&(clearTimeout(dr),dr=null),ht&&(ts=!0,ht.disconnect(),ht=null,F.requestJobDetail.value=null)},Js=()=>{F.isOpen.value=!0,F.hasUnreadMessages.value=!1,Vi(),Ue.embedded||fn({type:"kin:opened"})},Wh=(e=!1)=>{Ue.embedded||(F.isOpen.value=!1,e&&fn({type:"kin:request-close"}))},Lw=()=>{Nw(),ai(null,Zs),F.resetState(),xn=null,_r=null},Rw=e=>{Ue=e,Tr={...e.theme},F.resetState(),F.configureSync({syncKey:[Ue.publishableKey,Ue.serviceUrl,Ue.anonymousId].join("|"),sourceInstanceId:Ue.instanceId,emit:t=>fn({type:"kin:state-snapshot",payload:t})}),F.embedded.value=Ue.embedded,F.isOpen.value=Ue.embedded,qh(),Ue.embedded?Js():Vi()};window.addEventListener("message",e=>{if(!aw(e.data))return;const t=e.data;if(!xn){if(e.source!==window.parent||t.type!=="kin:init")return;xn=e.origin,_r=e.source,Rw(t.payload),fn({type:"kin:ready"});return}if(!(e.source!==_r||e.origin!==xn))switch(t.type){case"kin:open":Js();break;case"kin:close":Wh();break;case"kin:set-appearance":Sw(t.payload);break;case"kin:sync-snapshot":F.applySyncSnapshot(t.payload);break;case"kin:destroy":Lw();break}});export{Pw as K,T5 as N,d6 as Q,ut as R,he as h,m as o,be as p,it as q};
|