@cimulate/copilot-widget 1.9.1 → 1.9.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/messaging.umd.js
CHANGED
|
@@ -34,7 +34,7 @@ Error generating stack: `+y.message+`
|
|
|
34
34
|
`}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
|
|
35
35
|
`}),n}function Lg(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function Dg(e,t){const n=wk(e,t),r=n.one(e,void 0),o=hk(n),a=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return o&&a.children.push({type:"text",value:`
|
|
36
36
|
`},o),a}function kk(e,t){return e&&"run"in e?function(n,r){return et(this,null,function*(){const o=Dg(n,U({file:r},t));yield e.run(o,r)})}:function(n,r){return Dg(n,U({file:r},e||t))}}function Mg(e){if(e)throw e}var Hd,Fg;function Nk(){if(Fg)return Hd;Fg=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,o=function(h){return typeof Array.isArray=="function"?Array.isArray(h):t.call(h)==="[object Array]"},a=function(h){if(!h||t.call(h)!=="[object Object]")return!1;var m=e.call(h,"constructor"),E=h.constructor&&h.constructor.prototype&&e.call(h.constructor.prototype,"isPrototypeOf");if(h.constructor&&!m&&!E)return!1;var T;for(T in h);return typeof T=="undefined"||e.call(h,T)},u=function(h,m){n&&m.name==="__proto__"?n(h,m.name,{enumerable:!0,configurable:!0,value:m.newValue,writable:!0}):h[m.name]=m.newValue},c=function(h,m){if(m==="__proto__")if(e.call(h,m)){if(r)return r(h,m).value}else return;return h[m]};return Hd=function d(){var h,m,E,T,b,_,w=arguments[0],A=1,C=arguments.length,I=!1;for(typeof w=="boolean"&&(I=w,w=arguments[1]||{},A=2),(w==null||typeof w!="object"&&typeof w!="function")&&(w={});A<C;++A)if(h=arguments[A],h!=null)for(m in h)E=c(w,m),T=c(h,m),w!==T&&(I&&T&&(a(T)||(b=o(T)))?(b?(b=!1,_=E&&o(E)?E:[]):_=E&&a(E)?E:{},u(w,{name:m,newValue:d(I,_,T)})):typeof T!="undefined"&&u(w,{name:m,newValue:T}));return w},Hd}var Ok=Nk();const zd=We(Ok);function jd(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function Ik(){const e=[],t={run:n,use:r};return t;function n(...o){let a=-1;const u=o.pop();if(typeof u!="function")throw new TypeError("Expected function as last argument, not "+u);c(null,...o);function c(d,...h){const m=e[++a];let E=-1;if(d){u(d);return}for(;++E<o.length;)(h[E]===null||h[E]===void 0)&&(h[E]=o[E]);o=h,m?Rk(m,c)(...h):u(null,...h)}}function r(o){if(typeof o!="function")throw new TypeError("Expected `middelware` to be a function, not "+o);return e.push(o),t}}function Rk(e,t){let n;return r;function r(...u){const c=e.length>u.length;let d;c&&u.push(o);try{d=e.apply(this,u)}catch(h){const m=h;if(c&&n)throw m;return o(m)}c||(d&&d.then&&typeof d.then=="function"?d.then(a,o):d instanceof Error?o(d):a(d))}function o(u,...c){n||(n=!0,t(u,...c))}function a(u){o(null,u)}}const ur={basename:Pk,dirname:Lk,extname:Dk,join:Mk,sep:"/"};function Pk(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Hs(e);let n=0,r=-1,o=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;o--;)if(e.codePointAt(o)===47){if(a){n=o+1;break}}else r<0&&(a=!0,r=o+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let u=-1,c=t.length-1;for(;o--;)if(e.codePointAt(o)===47){if(a){n=o+1;break}}else u<0&&(a=!0,u=o+1),c>-1&&(e.codePointAt(o)===t.codePointAt(c--)?c<0&&(r=o):(c=-1,r=u));return n===r?r=u:r<0&&(r=e.length),e.slice(n,r)}function Lk(e){if(Hs(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function Dk(e){Hs(e);let t=e.length,n=-1,r=0,o=-1,a=0,u;for(;t--;){const c=e.codePointAt(t);if(c===47){if(u){r=t+1;break}continue}n<0&&(u=!0,n=t+1),c===46?o<0?o=t:a!==1&&(a=1):o>-1&&(a=-1)}return o<0||n<0||a===0||a===1&&o===n-1&&o===r+1?"":e.slice(o,n)}function Mk(...e){let t=-1,n;for(;++t<e.length;)Hs(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":Fk(n)}function Fk(e){Hs(e);const t=e.codePointAt(0)===47;let n=Bk(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function Bk(e,t){let n="",r=0,o=-1,a=0,u=-1,c,d;for(;++u<=e.length;){if(u<e.length)c=e.codePointAt(u);else{if(c===47)break;c=47}if(c===47){if(!(o===u-1||a===1))if(o!==u-1&&a===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(d=n.lastIndexOf("/"),d!==n.length-1){d<0?(n="",r=0):(n=n.slice(0,d),r=n.length-1-n.lastIndexOf("/")),o=u,a=0;continue}}else if(n.length>0){n="",r=0,o=u,a=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(o+1,u):n=e.slice(o+1,u),r=u-o-1;o=u,a=0}else c===46&&a>-1?a++:a=-1}return n}function Hs(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const Uk={cwd:Hk};function Hk(){return"/"}function $d(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function zk(e){if(typeof e=="string")e=new URL(e);else if(!$d(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return jk(e)}function jk(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const r=t.codePointAt(n+2);if(r===70||r===102){const o=new TypeError("File URL path must not include encoded / characters");throw o.code="ERR_INVALID_FILE_URL_PATH",o}}return decodeURIComponent(t)}const Vd=["history","path","basename","stem","extname","dirname"];class Bg{constructor(t){let n;t?$d(t)?n={path:t}:typeof t=="string"||$k(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":Uk.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<Vd.length;){const a=Vd[r];a in n&&n[a]!==void 0&&n[a]!==null&&(this[a]=a==="history"?[...n[a]]:n[a])}let o;for(o in n)Vd.includes(o)||(this[o]=n[o])}get basename(){return typeof this.path=="string"?ur.basename(this.path):void 0}set basename(t){Wd(t,"basename"),Yd(t,"basename"),this.path=ur.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?ur.dirname(this.path):void 0}set dirname(t){Ug(this.basename,"dirname"),this.path=ur.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?ur.extname(this.path):void 0}set extname(t){if(Yd(t,"extname"),Ug(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=ur.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){$d(t)&&(t=zk(t)),Wd(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?ur.basename(this.path,this.extname):void 0}set stem(t){Wd(t,"stem"),Yd(t,"stem"),this.path=ur.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const o=this.message(t,n,r);throw o.fatal=!0,o}info(t,n,r){const o=this.message(t,n,r);return o.fatal=void 0,o}message(t,n,r){const o=new Wt(t,n,r);return this.path&&(o.name=this.path+":"+o.name,o.file=this.path),o.fatal=!1,this.messages.push(o),o}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function Yd(e,t){if(e&&e.includes(ur.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+ur.sep+"`")}function Wd(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function Ug(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function $k(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const Vk=(function(e){const r=this.constructor.prototype,o=r[e],a=function(){return o.apply(a,arguments)};return Object.setPrototypeOf(a,r),a}),Yk={}.hasOwnProperty;class qd extends Vk{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=Ik()}copy(){const t=new qd;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(zd(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(Qd("data",this.frozen),this.namespace[t]=n,this):Yk.call(this.namespace,t)&&this.namespace[t]||void 0:t?(Qd("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const o=n.call(t,...r);typeof o=="function"&&this.transformers.use(o)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=Du(t),r=this.parser||this.Parser;return Gd("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),Gd("process",this.parser||this.Parser),Kd("process",this.compiler||this.Compiler),n?o(void 0,n):new Promise(o);function o(a,u){const c=Du(t),d=r.parse(c);r.run(d,c,function(m,E,T){if(m||!E||!T)return h(m);const b=E,_=r.stringify(b,T);Gk(_)?T.value=_:T.result=_,h(m,T)});function h(m,E){m||!E?u(m):a?a(E):n(void 0,E)}}}processSync(t){let n=!1,r;return this.freeze(),Gd("processSync",this.parser||this.Parser),Kd("processSync",this.compiler||this.Compiler),this.process(t,o),zg("processSync","process",n),r;function o(a,u){n=!0,Mg(a),r=u}}run(t,n,r){Hg(t),this.freeze();const o=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?a(void 0,r):new Promise(a);function a(u,c){const d=Du(n);o.run(t,d,h);function h(m,E,T){const b=E||t;m?c(m):u?u(b):r(void 0,b,T)}}}runSync(t,n){let r=!1,o;return this.run(t,n,a),zg("runSync","run",r),o;function a(u,c){Mg(u),o=c,r=!0}}stringify(t,n){this.freeze();const r=Du(n),o=this.compiler||this.Compiler;return Kd("stringify",o),Hg(t),o(t,r)}use(t,...n){const r=this.attachers,o=this.namespace;if(Qd("use",this.frozen),t!=null)if(typeof t=="function")d(t,n);else if(typeof t=="object")Array.isArray(t)?c(t):u(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function a(h){if(typeof h=="function")d(h,[]);else if(typeof h=="object")if(Array.isArray(h)){const[m,...E]=h;d(m,E)}else u(h);else throw new TypeError("Expected usable value, not `"+h+"`")}function u(h){if(!("plugins"in h)&&!("settings"in h))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");c(h.plugins),h.settings&&(o.settings=zd(!0,o.settings,h.settings))}function c(h){let m=-1;if(h!=null)if(Array.isArray(h))for(;++m<h.length;){const E=h[m];a(E)}else throw new TypeError("Expected a list of plugins, not `"+h+"`")}function d(h,m){let E=-1,T=-1;for(;++E<r.length;)if(r[E][0]===h){T=E;break}if(T===-1)r.push([h,...m]);else if(m.length>0){let[b,..._]=m;const w=r[T][1];jd(w)&&jd(b)&&(b=zd(!0,w,b)),r[T]=[h,b,..._]}}}}const Wk=new qd().freeze();function Gd(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Kd(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Qd(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function Hg(e){if(!jd(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function zg(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Du(e){return qk(e)?e:new Bg(e)}function qk(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function Gk(e){return typeof e=="string"||Kk(e)}function Kk(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const Qk="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",jg=[],$g={allowDangerousHtml:!0},Xk=/^(https?|ircs?|mailto|xmpp)$/i,Jk=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function Vg(e){const t=Zk(e),n=eN(e);return tN(t.runSync(t.parse(n),n),e)}function Zk(e){const t=e.rehypePlugins||jg,n=e.remarkPlugins||jg,r=e.remarkRehypeOptions?U(U({},e.remarkRehypeOptions),$g):$g;return Wk().use(LC).use(n).use(kk,r).use(t)}function eN(e){const t=e.children||"",n=new Bg;return typeof t=="string"&&(n.value=t),n}function tN(e,t){const n=t.allowedElements,r=t.allowElement,o=t.components,a=t.disallowedElements,u=t.skipHtml,c=t.unwrapDisallowed,d=t.urlTransform||nN;for(const m of Jk)Object.hasOwn(t,m.from)&&(""+m.from+(m.to?"use `"+m.to+"` instead":"remove it")+Qk+m.id,void 0);return Lu(e,h),vA(e,{Fragment:P.Fragment,components:o,ignoreInvalidStyle:!0,jsx:P.jsx,jsxs:P.jsxs,passKeys:!0,passNode:!0});function h(m,E,T){if(m.type==="raw"&&T&&typeof E=="number")return u?T.children.splice(E,1):T.children[E]={type:"text",value:m.value},E;if(m.type==="element"){let b;for(b in vd)if(Object.hasOwn(vd,b)&&Object.hasOwn(m.properties,b)){const _=m.properties[b],w=vd[b];(w===null||w.includes(m.tagName))&&(m.properties[b]=d(String(_||""),b,m))}}if(m.type==="element"){let b=n?!n.includes(m.tagName):a?a.includes(m.tagName):!1;if(!b&&r&&typeof E=="number"&&(b=!r(m,E,T)),b&&T&&typeof E=="number")return c&&m.children?T.children.splice(E,1,...m.children):T.children.splice(E,1),E}}}function nN(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),o=e.indexOf("/");return t===-1||o!==-1&&t>o||n!==-1&&t>n||r!==-1&&t>r||Xk.test(e.slice(0,t))?e:""}const Yg=/[#.]/g;function rN(e,t){const n=e||"",r={};let o=0,a,u;for(;o<n.length;){Yg.lastIndex=o;const c=Yg.exec(n),d=n.slice(o,c?c.index:n.length);d&&(a?a==="#"?r.id=d:Array.isArray(r.className)?r.className.push(d):r.className=[d]:u=d,o+=d.length),c&&(a=c[0],o++)}return{type:"element",tagName:u||t||"div",properties:r,children:[]}}function Wg(e,t,n){const r=n?aN(n):void 0;function o(a,u,...c){let d;if(a==null){d={type:"root",children:[]};const h=u;c.unshift(h)}else{d=rN(a,t);const h=d.tagName.toLowerCase(),m=r?r.get(h):void 0;if(d.tagName=m||h,iN(u))c.unshift(u);else for(const[E,T]of Object.entries(u))oN(e,d.properties,E,T)}for(const h of c)Xd(d.children,h);return d.type==="element"&&d.tagName==="template"&&(d.content={type:"root",children:d.children},d.children=[]),d}return o}function iN(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 o=t[r];if(o&&typeof o=="object"){if(!Array.isArray(o))return!0;const a=o;for(const u of a)if(typeof u!="number"&&typeof u!="string")return!0}}return!!("children"in e&&Array.isArray(e.children))}function oN(e,t,n,r){const o=bd(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"?o.spaceSeparated?a=M0(r):o.commaSeparated?a=w0(r):o.commaOrSpaceSeparated?a=M0(w0(r).join(" ")):a=qg(o,o.property,r):Array.isArray(r)?a=[...r]:a=o.property==="style"?sN(r):String(r);if(Array.isArray(a)){const u=[];for(const c of a)u.push(qg(o,o.property,c));a=u}o.property==="className"&&Array.isArray(t.className)&&(a=t.className.concat(a)),t[o.property]=a}}function Xd(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)Xd(e,n);else if(typeof t=="object"&&"type"in t)t.type==="root"?Xd(e,t.children):e.push(t);else throw new Error("Expected node, nodes, or string, got `"+t+"`")}function qg(e,t,n){if(typeof n=="string"){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===""||Os(n)===Os(t)))return!0}return n}function sN(e){const t=[];for(const[n,r]of Object.entries(e))t.push([n,r].join(": "));return t.join("; ")}function aN(e){const t=new Map;for(const n of e)t.set(n.toLowerCase(),n);return t}const uN=["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"],lN=Wg(_u,"div"),cN=Wg(mo,"g",uN);function dN(e){const t=String(e),n=[];return{toOffset:o,toPoint:r};function r(a){if(typeof a=="number"&&a>-1&&a<=t.length){let u=0;for(;;){let c=n[u];if(c===void 0){const d=Gg(t,n[u-1]);c=d===-1?t.length+1:d+1,n[u]=c}if(c>a)return{line:u+1,column:a-(u>0?n[u-1]:0)+1,offset:a};u++}}}function o(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 c=n[n.length-1],d=Gg(t,c),h=d===-1?t.length+1:d+1;if(c===h)break;n.push(h)}const u=(a.line>1?n[a.line-2]:0)+a.column-1;if(u<n[a.line-1])return u}}}function Gg(e,t){const n=e.indexOf("\r",t),r=e.indexOf(`
|
|
37
|
-
`,t);return r===-1?n:n===-1||n+1===r?r:n<r?n:r}const Ri={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/"},Kg={}.hasOwnProperty,fN=Object.prototype;function hN(e,t){const n=t||{};return Jd({file:n.file||void 0,location:!1,schema:n.space==="svg"?mo:_u,verbose:n.verbose||!1},e)}function Jd(e,t){let n;switch(t.nodeName){case"#comment":{const r=t;return n={type:"comment",value:r.data},Mu(e,r,n),n}case"#document":case"#document-fragment":{const r=t,o="mode"in r?r.mode==="quirks"||r.mode==="limited-quirks":!1;if(n={type:"root",children:Qg(e,t.childNodes),data:{quirksMode:o}},e.file&&e.location){const a=String(e.file),u=dN(a),c=u.toPoint(0),d=u.toPoint(a.length);n.position={start:c,end:d}}return n}case"#documentType":{const r=t;return n={type:"doctype"},Mu(e,r,n),n}case"#text":{const r=t;return n={type:"text",value:r.value},Mu(e,r,n),n}default:return n=pN(e,t),n}}function Qg(e,t){let n=-1;const r=[];for(;++n<t.length;){const o=Jd(e,t[n]);r.push(o)}return r}function pN(e,t){const n=e.schema;e.schema=t.namespaceURI===Ri.svg?mo:_u;let r=-1;const o={};for(;++r<t.attrs.length;){const c=t.attrs[r],d=(c.prefix?c.prefix+":":"")+c.name;Kg.call(fN,d)||(o[d]=c.value)}const u=(e.schema.space==="svg"?cN:lN)(t.tagName,o,Qg(e,t.childNodes));if(Mu(e,t,u),u.tagName==="template"){const c=t,d=c.sourceCodeLocation,h=d&&d.startTag&&bo(d.startTag),m=d&&d.endTag&&bo(d.endTag),E=Jd(e,c.content);h&&m&&e.file&&(E.position={start:h.end,end:m.start}),u.content=E}return e.schema=n,u}function Mu(e,t,n){if("sourceCodeLocation"in t&&t.sourceCodeLocation&&e.file){const r=mN(e,n,t.sourceCodeLocation);r&&(e.location=!0,n.position=r)}}function mN(e,t,n){const r=bo(n);if(t.type==="element"){const o=t.children[t.children.length-1];if(r&&!n.endTag&&o&&o.position&&o.position.end&&(r.end=Object.assign({},o.position.end)),e.verbose){const a={};let u;if(n.attrs)for(u in n.attrs)Kg.call(n.attrs,u)&&(a[bd(e.schema,u).property]=bo(n.attrs[u]));n.startTag;const c=bo(n.startTag),d=n.endTag?bo(n.endTag):void 0,h={opening:c};d&&(h.closing=d),h.properties=a,t.data={position:h}}}return r}function bo(e){const t=Xg({line:e.startLine,column:e.startCol,offset:e.startOffset}),n=Xg({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||n?{start:t,end:n}:void 0}function Xg(e){return e.line&&e.column?e:void 0}class zs{constructor(t,n,r){this.property=t,this.normal=n,r&&(this.space=r)}}zs.prototype.property={},zs.prototype.normal={},zs.prototype.space=null;function Jg(e,t){const n={},r={};let o=-1;for(;++o<e.length;)Object.assign(n,e[o].property),Object.assign(r,e[o].normal);return new zs(n,r,t)}function Zd(e){return e.toLowerCase()}class Pn{constructor(t,n){this.property=t,this.attribute=n}}Pn.prototype.space=null,Pn.prototype.boolean=!1,Pn.prototype.booleanish=!1,Pn.prototype.overloadedBoolean=!1,Pn.prototype.number=!1,Pn.prototype.commaSeparated=!1,Pn.prototype.spaceSeparated=!1,Pn.prototype.commaOrSpaceSeparated=!1,Pn.prototype.mustUseProperty=!1,Pn.prototype.defined=!1;let gN=0;const ze=Pi(),vt=Pi(),Zg=Pi(),me=Pi(),st=Pi(),xo=Pi(),_n=Pi();function Pi(){return Ja(2,++gN)}const ef=Object.freeze(Object.defineProperty({__proto__:null,boolean:ze,booleanish:vt,commaOrSpaceSeparated:_n,commaSeparated:xo,number:me,overloadedBoolean:Zg,spaceSeparated:st},Symbol.toStringTag,{value:"Module"})),tf=Object.keys(ef);class nf extends Pn{constructor(t,n,r,o){let a=-1;if(super(t,n),e1(this,"space",o),typeof r=="number")for(;++a<tf.length;){const u=tf[a];e1(this,tf[a],(r&ef[u])===ef[u])}}}nf.prototype.defined=!0;function e1(e,t,n){n&&(e[t]=n)}const EN={}.hasOwnProperty;function _o(e){const t={},n={};let r;for(r in e.properties)if(EN.call(e.properties,r)){const o=e.properties[r],a=new nf(r,e.transform(e.attributes||{},r),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[Zd(r)]=r,n[Zd(a.attribute)]=r}return new zs(t,n,e.space)}const t1=_o({space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()},properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null}}),n1=_o({space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()},properties:{xmlLang:null,xmlBase:null,xmlSpace:null}});function r1(e,t){return t in e?e[t]:t}function i1(e,t){return r1(e,t.toLowerCase())}const o1=_o({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:i1,properties:{xmlns:null,xmlnsXLink:null}}),s1=_o({transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()},properties:{ariaActiveDescendant:null,ariaAtomic:vt,ariaAutoComplete:null,ariaBusy:vt,ariaChecked:vt,ariaColCount:me,ariaColIndex:me,ariaColSpan:me,ariaControls:st,ariaCurrent:null,ariaDescribedBy:st,ariaDetails:null,ariaDisabled:vt,ariaDropEffect:st,ariaErrorMessage:null,ariaExpanded:vt,ariaFlowTo:st,ariaGrabbed:vt,ariaHasPopup:null,ariaHidden:vt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:st,ariaLevel:me,ariaLive:null,ariaModal:vt,ariaMultiLine:vt,ariaMultiSelectable:vt,ariaOrientation:null,ariaOwns:st,ariaPlaceholder:null,ariaPosInSet:me,ariaPressed:vt,ariaReadOnly:vt,ariaRelevant:null,ariaRequired:vt,ariaRoleDescription:st,ariaRowCount:me,ariaRowIndex:me,ariaRowSpan:me,ariaSelected:vt,ariaSetSize:me,ariaSort:null,ariaValueMax:me,ariaValueMin:me,ariaValueNow:me,ariaValueText:null,role:null}}),yN=_o({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:i1,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:xo,acceptCharset:st,accessKey:st,action:null,allow:null,allowFullScreen:ze,allowPaymentRequest:ze,allowUserMedia:ze,alt:null,as:null,async:ze,autoCapitalize:null,autoComplete:st,autoFocus:ze,autoPlay:ze,blocking:st,capture:null,charSet:null,checked:ze,cite:null,className:st,cols:me,colSpan:null,content:null,contentEditable:vt,controls:ze,controlsList:st,coords:me|xo,crossOrigin:null,data:null,dateTime:null,decoding:null,default:ze,defer:ze,dir:null,dirName:null,disabled:ze,download:Zg,draggable:vt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:ze,formTarget:null,headers:st,height:me,hidden:ze,high:me,href:null,hrefLang:null,htmlFor:st,httpEquiv:st,id:null,imageSizes:null,imageSrcSet:null,inert:ze,inputMode:null,integrity:null,is:null,isMap:ze,itemId:null,itemProp:st,itemRef:st,itemScope:ze,itemType:st,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:ze,low:me,manifest:null,max:null,maxLength:me,media:null,method:null,min:null,minLength:me,multiple:ze,muted:ze,name:null,nonce:null,noModule:ze,noValidate:ze,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:ze,optimum:me,pattern:null,ping:st,placeholder:null,playsInline:ze,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:ze,referrerPolicy:null,rel:st,required:ze,reversed:ze,rows:me,rowSpan:me,sandbox:st,scope:null,scoped:ze,seamless:ze,selected:ze,shadowRootClonable:ze,shadowRootDelegatesFocus:ze,shadowRootMode:null,shape:null,size:me,sizes:null,slot:null,span:me,spellCheck:vt,src:null,srcDoc:null,srcLang:null,srcSet:null,start:me,step:null,style:null,tabIndex:me,target:null,title:null,translate:null,type:null,typeMustMatch:ze,useMap:null,value:vt,width:me,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:st,axis:null,background:null,bgColor:null,border:me,borderColor:null,bottomMargin:me,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:ze,declare:ze,event:null,face:null,frame:null,frameBorder:null,hSpace:me,leftMargin:me,link:null,longDesc:null,lowSrc:null,marginHeight:me,marginWidth:me,noResize:ze,noHref:ze,noShade:ze,noWrap:ze,object:null,profile:null,prompt:null,rev:null,rightMargin:me,rules:null,scheme:null,scrolling:vt,standby:null,summary:null,text:null,topMargin:me,valueType:null,version:null,vAlign:null,vLink:null,vSpace:me,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:ze,disableRemotePlayback:ze,prefix:null,property:null,results:me,security:null,unselectable:null}}),TN=_o({space:"svg",attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},transform:r1,properties:{about:_n,accentHeight:me,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:me,amplitude:me,arabicForm:null,ascent:me,attributeName:null,attributeType:null,azimuth:me,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:me,by:null,calcMode:null,capHeight:me,className:st,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:me,diffuseConstant:me,direction:null,display:null,dur:null,divisor:me,dominantBaseline:null,download:ze,dx:null,dy:null,edgeMode:null,editable:null,elevation:me,enableBackground:null,end:null,event:null,exponent:me,externalResourcesRequired:null,fill:null,fillOpacity:me,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:xo,g2:xo,glyphName:xo,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:me,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:me,horizOriginX:me,horizOriginY:me,id:null,ideographic:me,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:me,k:me,k1:me,k2:me,k3:me,k4:me,kernelMatrix:_n,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:me,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:me,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:me,overlineThickness:me,paintOrder:null,panose1:null,path:null,pathLength:me,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:st,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:me,pointsAtY:me,pointsAtZ:me,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:_n,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:_n,rev:_n,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:_n,requiredFeatures:_n,requiredFonts:_n,requiredFormats:_n,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:me,specularExponent:me,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:me,strikethroughThickness:me,string:null,stroke:null,strokeDashArray:_n,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:me,strokeOpacity:me,strokeWidth:null,style:null,surfaceScale:me,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:_n,tabIndex:me,tableValues:null,target:null,targetX:me,targetY:me,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:_n,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:me,underlineThickness:me,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:me,values:null,vAlphabetic:me,vMathematical:me,vectorEffect:null,vHanging:me,vIdeographic:me,version:null,vertAdvY:me,vertOriginX:me,vertOriginY:me,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:me,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null}}),bN=/^data[-\w.:]+$/i,a1=/-[a-z]/g,xN=/[A-Z]/g;function _N(e,t){const n=Zd(t);let r=t,o=Pn;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&bN.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(a1,SN);r="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!a1.test(a)){let u=a.replace(xN,wN);u.charAt(0)!=="-"&&(u="-"+u),t="data"+u}}o=nf}return new o(r,t)}function wN(e){return"-"+e.toLowerCase()}function SN(e){return e.charAt(1).toUpperCase()}const AN=Jg([n1,t1,o1,s1,yN],"html"),u1=Jg([n1,t1,o1,s1,TN],"svg"),l1={}.hasOwnProperty;function c1(e,t){const n=t||{};function r(o,...a){let u=r.invalid;const c=r.handlers;if(o&&l1.call(o,e)){const d=String(o[e]);u=l1.call(c,d)?c[d]:r.unknown}if(u)return u.call(this,o,...a)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}const vN={},CN={}.hasOwnProperty,d1=c1("type",{handlers:{root:NN,element:LN,text:RN,comment:PN,doctype:IN}});function kN(e,t){const r=(t||vN).space;return d1(e,r==="svg"?u1:AN)}function NN(e,t){const n={nodeName:"#document",mode:(e.data||{}).quirksMode?"quirks":"no-quirks",childNodes:[]};return n.childNodes=rf(e.children,n,t),wo(e,n),n}function ON(e,t){const n={nodeName:"#document-fragment",childNodes:[]};return n.childNodes=rf(e.children,n,t),wo(e,n),n}function IN(e){const t={nodeName:"#documentType",name:"html",publicId:"",systemId:"",parentNode:null};return wo(e,t),t}function RN(e){const t={nodeName:"#text",value:e.value,parentNode:null};return wo(e,t),t}function PN(e){const t={nodeName:"#comment",data:e.value,parentNode:null};return wo(e,t),t}function LN(e,t){const n=t;let r=n;e.type==="element"&&e.tagName.toLowerCase()==="svg"&&n.space==="html"&&(r=u1);const o=[];let a;if(e.properties){for(a in e.properties)if(a!=="children"&&CN.call(e.properties,a)){const d=DN(r,a,e.properties[a]);d&&o.push(d)}}const u=r.space,c={nodeName:e.tagName,tagName:e.tagName,attrs:o,namespaceURI:Ri[u],childNodes:[],parentNode:null};return c.childNodes=rf(e.children,c,r),wo(e,c),e.tagName==="template"&&e.content&&(c.content=ON(e.content,r)),c}function DN(e,t,n){const r=_N(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?S0(n):F0(n));const o={name:r.attribute,value:n===!0?"":String(n)};if(r.space&&r.space!=="html"&&r.space!=="svg"){const a=o.name.indexOf(":");a<0?o.prefix="":(o.name=o.name.slice(a+1),o.prefix=r.attribute.slice(0,a)),o.namespace=Ri[r.space]}return o}function rf(e,t,n){let r=-1;const o=[];if(e)for(;++r<e.length;){const a=d1(e[r],n);a.parentNode=t,o.push(a)}return o}function wo(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 MN=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"],FN=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]),ft="�";var v;(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"})(v||(v={}));const fn={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function f1(e){return e>=55296&&e<=57343}function BN(e){return e>=56320&&e<=57343}function UN(e,t){return(e-55296)*1024+9216+t}function h1(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function p1(e){return e>=64976&&e<=65007||FN.has(e)}var Q;(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"})(Q||(Q={}));const HN=65536;class zN{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=HN,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:o,offset:a}=this,u=o+n,c=a+n;return{code:t,startLine:r,endLine:r,startCol:u,endCol:u,startOffset:c,endOffset:c}}_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(BN(n))return this.pos++,this._addGap(),UN(t,n)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,v.EOF;return this._err(Q.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,v.EOF;const r=this.html.charCodeAt(n);return r===v.CARRIAGE_RETURN?v.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,v.EOF;let t=this.html.charCodeAt(this.pos);return t===v.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,v.LINE_FEED):t===v.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,f1(t)&&(t=this._processSurrogate(t)),this.handler.onParseError===null||t>31&&t<127||t===v.LINE_FEED||t===v.CARRIAGE_RETURN||t>159&&t<64976||this._checkForProblematicCharacters(t),t)}_checkForProblematicCharacters(t){h1(t)?this._err(Q.controlCharacterInInputStream):p1(t)&&this._err(Q.noncharacterInInputStream)}retreat(t){for(this.pos-=t;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}}var $e;(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"})($e||($e={}));function m1(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 jN=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))),$N=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 VN(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=$N.get(e))!==null&&t!==void 0?t:e}var Pt;(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"})(Pt||(Pt={}));const YN=32;var Yr;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(Yr||(Yr={}));function of(e){return e>=Pt.ZERO&&e<=Pt.NINE}function WN(e){return e>=Pt.UPPER_A&&e<=Pt.UPPER_F||e>=Pt.LOWER_A&&e<=Pt.LOWER_F}function qN(e){return e>=Pt.UPPER_A&&e<=Pt.UPPER_Z||e>=Pt.LOWER_A&&e<=Pt.LOWER_Z||of(e)}function GN(e){return e===Pt.EQUALS||qN(e)}var Lt;(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"})(Lt||(Lt={}));var Ar;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(Ar||(Ar={}));class KN{constructor(t,n,r){this.decodeTree=t,this.emitCodePoint=n,this.errors=r,this.state=Lt.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=Ar.Strict}startEntity(t){this.decodeMode=t,this.state=Lt.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,n){switch(this.state){case Lt.EntityStart:return t.charCodeAt(n)===Pt.NUM?(this.state=Lt.NumericStart,this.consumed+=1,this.stateNumericStart(t,n+1)):(this.state=Lt.NamedEntity,this.stateNamedEntity(t,n));case Lt.NumericStart:return this.stateNumericStart(t,n);case Lt.NumericDecimal:return this.stateNumericDecimal(t,n);case Lt.NumericHex:return this.stateNumericHex(t,n);case Lt.NamedEntity:return this.stateNamedEntity(t,n)}}stateNumericStart(t,n){return n>=t.length?-1:(t.charCodeAt(n)|YN)===Pt.LOWER_X?(this.state=Lt.NumericHex,this.consumed+=1,this.stateNumericHex(t,n+1)):(this.state=Lt.NumericDecimal,this.stateNumericDecimal(t,n))}addToNumericResult(t,n,r,o){if(n!==r){const a=r-n;this.result=this.result*Math.pow(o,a)+Number.parseInt(t.substr(n,a),o),this.consumed+=a}}stateNumericHex(t,n){const r=n;for(;n<t.length;){const o=t.charCodeAt(n);if(of(o)||WN(o))n+=1;else return this.addToNumericResult(t,r,n,16),this.emitNumericEntity(o,3)}return this.addToNumericResult(t,r,n,16),-1}stateNumericDecimal(t,n){const r=n;for(;n<t.length;){const o=t.charCodeAt(n);if(of(o))n+=1;else return this.addToNumericResult(t,r,n,10),this.emitNumericEntity(o,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===Pt.SEMI)this.consumed+=1;else if(this.decodeMode===Ar.Strict)return 0;return this.emitCodePoint(VN(this.result),this.consumed),this.errors&&(t!==Pt.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(t,n){const{decodeTree:r}=this;let o=r[this.treeIndex],a=(o&Yr.VALUE_LENGTH)>>14;for(;n<t.length;n++,this.excess++){const u=t.charCodeAt(n);if(this.treeIndex=QN(r,o,this.treeIndex+Math.max(1,a),u),this.treeIndex<0)return this.result===0||this.decodeMode===Ar.Attribute&&(a===0||GN(u))?0:this.emitNotTerminatedNamedEntity();if(o=r[this.treeIndex],a=(o&Yr.VALUE_LENGTH)>>14,a!==0){if(u===Pt.SEMI)return this.emitNamedEntityData(this.treeIndex,a,this.consumed+this.excess);this.decodeMode!==Ar.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var t;const{result:n,decodeTree:r}=this,o=(r[n]&Yr.VALUE_LENGTH)>>14;return this.emitNamedEntityData(n,o,this.consumed),(t=this.errors)===null||t===void 0||t.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(t,n,r){const{decodeTree:o}=this;return this.emitCodePoint(n===1?o[t]&~Yr.VALUE_LENGTH:o[t+1],r),n===3&&this.emitCodePoint(o[t+2],r),r}end(){var t;switch(this.state){case Lt.NamedEntity:return this.result!==0&&(this.decodeMode!==Ar.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case Lt.NumericDecimal:return this.emitNumericEntity(0,2);case Lt.NumericHex:return this.emitNumericEntity(0,3);case Lt.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case Lt.EntityStart:return 0}}}function QN(e,t,n,r){const o=(t&Yr.BRANCH_LENGTH)>>7,a=t&Yr.JUMP_TABLE;if(o===0)return a!==0&&r===a?n:-1;if(a){const d=r-a;return d<0||d>=o?-1:e[n+d]-1}let u=n,c=u+o-1;for(;u<=c;){const d=u+c>>>1,h=e[d];if(h<r)u=d+1;else if(h>r)c=d-1;else return e[d+o]}return-1}var oe;(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/"})(oe||(oe={}));var Li;(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"})(Li||(Li={}));var Ln;(function(e){e.NO_QUIRKS="no-quirks",e.QUIRKS="quirks",e.LIMITED_QUIRKS="limited-quirks"})(Ln||(Ln={}));var Y;(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"})(Y||(Y={}));var p;(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"})(p||(p={}));const XN=new Map([[Y.A,p.A],[Y.ADDRESS,p.ADDRESS],[Y.ANNOTATION_XML,p.ANNOTATION_XML],[Y.APPLET,p.APPLET],[Y.AREA,p.AREA],[Y.ARTICLE,p.ARTICLE],[Y.ASIDE,p.ASIDE],[Y.B,p.B],[Y.BASE,p.BASE],[Y.BASEFONT,p.BASEFONT],[Y.BGSOUND,p.BGSOUND],[Y.BIG,p.BIG],[Y.BLOCKQUOTE,p.BLOCKQUOTE],[Y.BODY,p.BODY],[Y.BR,p.BR],[Y.BUTTON,p.BUTTON],[Y.CAPTION,p.CAPTION],[Y.CENTER,p.CENTER],[Y.CODE,p.CODE],[Y.COL,p.COL],[Y.COLGROUP,p.COLGROUP],[Y.DD,p.DD],[Y.DESC,p.DESC],[Y.DETAILS,p.DETAILS],[Y.DIALOG,p.DIALOG],[Y.DIR,p.DIR],[Y.DIV,p.DIV],[Y.DL,p.DL],[Y.DT,p.DT],[Y.EM,p.EM],[Y.EMBED,p.EMBED],[Y.FIELDSET,p.FIELDSET],[Y.FIGCAPTION,p.FIGCAPTION],[Y.FIGURE,p.FIGURE],[Y.FONT,p.FONT],[Y.FOOTER,p.FOOTER],[Y.FOREIGN_OBJECT,p.FOREIGN_OBJECT],[Y.FORM,p.FORM],[Y.FRAME,p.FRAME],[Y.FRAMESET,p.FRAMESET],[Y.H1,p.H1],[Y.H2,p.H2],[Y.H3,p.H3],[Y.H4,p.H4],[Y.H5,p.H5],[Y.H6,p.H6],[Y.HEAD,p.HEAD],[Y.HEADER,p.HEADER],[Y.HGROUP,p.HGROUP],[Y.HR,p.HR],[Y.HTML,p.HTML],[Y.I,p.I],[Y.IMG,p.IMG],[Y.IMAGE,p.IMAGE],[Y.INPUT,p.INPUT],[Y.IFRAME,p.IFRAME],[Y.KEYGEN,p.KEYGEN],[Y.LABEL,p.LABEL],[Y.LI,p.LI],[Y.LINK,p.LINK],[Y.LISTING,p.LISTING],[Y.MAIN,p.MAIN],[Y.MALIGNMARK,p.MALIGNMARK],[Y.MARQUEE,p.MARQUEE],[Y.MATH,p.MATH],[Y.MENU,p.MENU],[Y.META,p.META],[Y.MGLYPH,p.MGLYPH],[Y.MI,p.MI],[Y.MO,p.MO],[Y.MN,p.MN],[Y.MS,p.MS],[Y.MTEXT,p.MTEXT],[Y.NAV,p.NAV],[Y.NOBR,p.NOBR],[Y.NOFRAMES,p.NOFRAMES],[Y.NOEMBED,p.NOEMBED],[Y.NOSCRIPT,p.NOSCRIPT],[Y.OBJECT,p.OBJECT],[Y.OL,p.OL],[Y.OPTGROUP,p.OPTGROUP],[Y.OPTION,p.OPTION],[Y.P,p.P],[Y.PARAM,p.PARAM],[Y.PLAINTEXT,p.PLAINTEXT],[Y.PRE,p.PRE],[Y.RB,p.RB],[Y.RP,p.RP],[Y.RT,p.RT],[Y.RTC,p.RTC],[Y.RUBY,p.RUBY],[Y.S,p.S],[Y.SCRIPT,p.SCRIPT],[Y.SEARCH,p.SEARCH],[Y.SECTION,p.SECTION],[Y.SELECT,p.SELECT],[Y.SOURCE,p.SOURCE],[Y.SMALL,p.SMALL],[Y.SPAN,p.SPAN],[Y.STRIKE,p.STRIKE],[Y.STRONG,p.STRONG],[Y.STYLE,p.STYLE],[Y.SUB,p.SUB],[Y.SUMMARY,p.SUMMARY],[Y.SUP,p.SUP],[Y.TABLE,p.TABLE],[Y.TBODY,p.TBODY],[Y.TEMPLATE,p.TEMPLATE],[Y.TEXTAREA,p.TEXTAREA],[Y.TFOOT,p.TFOOT],[Y.TD,p.TD],[Y.TH,p.TH],[Y.THEAD,p.THEAD],[Y.TITLE,p.TITLE],[Y.TR,p.TR],[Y.TRACK,p.TRACK],[Y.TT,p.TT],[Y.U,p.U],[Y.UL,p.UL],[Y.SVG,p.SVG],[Y.VAR,p.VAR],[Y.WBR,p.WBR],[Y.XMP,p.XMP]]);function So(e){var t;return(t=XN.get(e))!==null&&t!==void 0?t:p.UNKNOWN}const le=p,JN={[oe.HTML]:new Set([le.ADDRESS,le.APPLET,le.AREA,le.ARTICLE,le.ASIDE,le.BASE,le.BASEFONT,le.BGSOUND,le.BLOCKQUOTE,le.BODY,le.BR,le.BUTTON,le.CAPTION,le.CENTER,le.COL,le.COLGROUP,le.DD,le.DETAILS,le.DIR,le.DIV,le.DL,le.DT,le.EMBED,le.FIELDSET,le.FIGCAPTION,le.FIGURE,le.FOOTER,le.FORM,le.FRAME,le.FRAMESET,le.H1,le.H2,le.H3,le.H4,le.H5,le.H6,le.HEAD,le.HEADER,le.HGROUP,le.HR,le.HTML,le.IFRAME,le.IMG,le.INPUT,le.LI,le.LINK,le.LISTING,le.MAIN,le.MARQUEE,le.MENU,le.META,le.NAV,le.NOEMBED,le.NOFRAMES,le.NOSCRIPT,le.OBJECT,le.OL,le.P,le.PARAM,le.PLAINTEXT,le.PRE,le.SCRIPT,le.SECTION,le.SELECT,le.SOURCE,le.STYLE,le.SUMMARY,le.TABLE,le.TBODY,le.TD,le.TEMPLATE,le.TEXTAREA,le.TFOOT,le.TH,le.THEAD,le.TITLE,le.TR,le.TRACK,le.UL,le.WBR,le.XMP]),[oe.MATHML]:new Set([le.MI,le.MO,le.MN,le.MS,le.MTEXT,le.ANNOTATION_XML]),[oe.SVG]:new Set([le.TITLE,le.FOREIGN_OBJECT,le.DESC]),[oe.XLINK]:new Set,[oe.XML]:new Set,[oe.XMLNS]:new Set},sf=new Set([le.H1,le.H2,le.H3,le.H4,le.H5,le.H6]);Y.STYLE,Y.SCRIPT,Y.XMP,Y.IFRAME,Y.NOEMBED,Y.NOFRAMES,Y.PLAINTEXT;var N;(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"})(N||(N={}));const xt={DATA:N.DATA,RCDATA:N.RCDATA,RAWTEXT:N.RAWTEXT,SCRIPT_DATA:N.SCRIPT_DATA,PLAINTEXT:N.PLAINTEXT,CDATA_SECTION:N.CDATA_SECTION};function ZN(e){return e>=v.DIGIT_0&&e<=v.DIGIT_9}function js(e){return e>=v.LATIN_CAPITAL_A&&e<=v.LATIN_CAPITAL_Z}function e3(e){return e>=v.LATIN_SMALL_A&&e<=v.LATIN_SMALL_Z}function Wr(e){return e3(e)||js(e)}function g1(e){return Wr(e)||ZN(e)}function Fu(e){return e+32}function E1(e){return e===v.SPACE||e===v.LINE_FEED||e===v.TABULATION||e===v.FORM_FEED}function y1(e){return E1(e)||e===v.SOLIDUS||e===v.GREATER_THAN_SIGN}function t3(e){return e===v.NULL?Q.nullCharacterReference:e>1114111?Q.characterReferenceOutsideUnicodeRange:f1(e)?Q.surrogateCharacterReference:p1(e)?Q.noncharacterCharacterReference:h1(e)||e===v.CARRIAGE_RETURN?Q.controlCharacterReference:null}class n3{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=N.DATA,this.returnState=N.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new zN(n),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new KN(jN,(r,o)=>{this.preprocessor.pos=this.entityStartPos+o-1,this._flushCodePointConsumedAsCharacterReference(r)},n.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(Q.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:r=>{this._err(Q.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+r)},validateNumericCharacterReference:r=>{const o=t3(r);o&&this._err(o,1)}}:void 0)}_err(t,n=0){var r,o;(o=(r=this.handler).onParseError)===null||o===void 0||o.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==null||t())}write(t,n,r){this.active=!0,this.preprocessor.write(t,n),this._runParsingLoop(),this.paused||r==null||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:$e.START_TAG,tagName:"",tagID:p.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:$e.END_TAG,tagName:"",tagID:p.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(t){this.currentToken={type:$e.COMMENT,data:"",location:this.getCurrentLocation(t)}}_createDoctypeToken(t){this.currentToken={type:$e.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(m1(r,this.currentAttr.name)===null){if(r.attrs.push(this.currentAttr),r.location&&this.currentLocation){const o=(t=(n=r.location).attrs)!==null&&t!==void 0?t:n.attrs=Object.create(null);o[this.currentAttr.name]=this.currentLocation,this._leaveAttrValue()}}else this._err(Q.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=So(t.tagName),t.type===$e.START_TAG?(this.lastStartTagName=t.tagName,this.handler.onStartTag(t)):(t.attrs.length>0&&this._err(Q.endTagWithAttributes),t.selfClosing&&this._err(Q.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 $e.CHARACTER:{this.handler.onCharacter(this.currentCharacterToken);break}case $e.NULL_CHARACTER:{this.handler.onNullCharacter(this.currentCharacterToken);break}case $e.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:$e.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=E1(t)?$e.WHITESPACE_CHARACTER:t===v.NULL?$e.NULL_CHARACTER:$e.CHARACTER;this._appendCharToCurrentCharacterToken(n,String.fromCodePoint(t))}_emitChars(t){this._appendCharToCurrentCharacterToken($e.CHARACTER,t)}_startCharacterReference(){this.returnState=this.state,this.state=N.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?Ar.Attribute:Ar.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===N.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===N.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===N.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(t){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(t):this._emitCodePoint(t)}_callState(t){switch(this.state){case N.DATA:{this._stateData(t);break}case N.RCDATA:{this._stateRcdata(t);break}case N.RAWTEXT:{this._stateRawtext(t);break}case N.SCRIPT_DATA:{this._stateScriptData(t);break}case N.PLAINTEXT:{this._statePlaintext(t);break}case N.TAG_OPEN:{this._stateTagOpen(t);break}case N.END_TAG_OPEN:{this._stateEndTagOpen(t);break}case N.TAG_NAME:{this._stateTagName(t);break}case N.RCDATA_LESS_THAN_SIGN:{this._stateRcdataLessThanSign(t);break}case N.RCDATA_END_TAG_OPEN:{this._stateRcdataEndTagOpen(t);break}case N.RCDATA_END_TAG_NAME:{this._stateRcdataEndTagName(t);break}case N.RAWTEXT_LESS_THAN_SIGN:{this._stateRawtextLessThanSign(t);break}case N.RAWTEXT_END_TAG_OPEN:{this._stateRawtextEndTagOpen(t);break}case N.RAWTEXT_END_TAG_NAME:{this._stateRawtextEndTagName(t);break}case N.SCRIPT_DATA_LESS_THAN_SIGN:{this._stateScriptDataLessThanSign(t);break}case N.SCRIPT_DATA_END_TAG_OPEN:{this._stateScriptDataEndTagOpen(t);break}case N.SCRIPT_DATA_END_TAG_NAME:{this._stateScriptDataEndTagName(t);break}case N.SCRIPT_DATA_ESCAPE_START:{this._stateScriptDataEscapeStart(t);break}case N.SCRIPT_DATA_ESCAPE_START_DASH:{this._stateScriptDataEscapeStartDash(t);break}case N.SCRIPT_DATA_ESCAPED:{this._stateScriptDataEscaped(t);break}case N.SCRIPT_DATA_ESCAPED_DASH:{this._stateScriptDataEscapedDash(t);break}case N.SCRIPT_DATA_ESCAPED_DASH_DASH:{this._stateScriptDataEscapedDashDash(t);break}case N.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataEscapedLessThanSign(t);break}case N.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:{this._stateScriptDataEscapedEndTagOpen(t);break}case N.SCRIPT_DATA_ESCAPED_END_TAG_NAME:{this._stateScriptDataEscapedEndTagName(t);break}case N.SCRIPT_DATA_DOUBLE_ESCAPE_START:{this._stateScriptDataDoubleEscapeStart(t);break}case N.SCRIPT_DATA_DOUBLE_ESCAPED:{this._stateScriptDataDoubleEscaped(t);break}case N.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:{this._stateScriptDataDoubleEscapedDash(t);break}case N.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:{this._stateScriptDataDoubleEscapedDashDash(t);break}case N.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataDoubleEscapedLessThanSign(t);break}case N.SCRIPT_DATA_DOUBLE_ESCAPE_END:{this._stateScriptDataDoubleEscapeEnd(t);break}case N.BEFORE_ATTRIBUTE_NAME:{this._stateBeforeAttributeName(t);break}case N.ATTRIBUTE_NAME:{this._stateAttributeName(t);break}case N.AFTER_ATTRIBUTE_NAME:{this._stateAfterAttributeName(t);break}case N.BEFORE_ATTRIBUTE_VALUE:{this._stateBeforeAttributeValue(t);break}case N.ATTRIBUTE_VALUE_DOUBLE_QUOTED:{this._stateAttributeValueDoubleQuoted(t);break}case N.ATTRIBUTE_VALUE_SINGLE_QUOTED:{this._stateAttributeValueSingleQuoted(t);break}case N.ATTRIBUTE_VALUE_UNQUOTED:{this._stateAttributeValueUnquoted(t);break}case N.AFTER_ATTRIBUTE_VALUE_QUOTED:{this._stateAfterAttributeValueQuoted(t);break}case N.SELF_CLOSING_START_TAG:{this._stateSelfClosingStartTag(t);break}case N.BOGUS_COMMENT:{this._stateBogusComment(t);break}case N.MARKUP_DECLARATION_OPEN:{this._stateMarkupDeclarationOpen(t);break}case N.COMMENT_START:{this._stateCommentStart(t);break}case N.COMMENT_START_DASH:{this._stateCommentStartDash(t);break}case N.COMMENT:{this._stateComment(t);break}case N.COMMENT_LESS_THAN_SIGN:{this._stateCommentLessThanSign(t);break}case N.COMMENT_LESS_THAN_SIGN_BANG:{this._stateCommentLessThanSignBang(t);break}case N.COMMENT_LESS_THAN_SIGN_BANG_DASH:{this._stateCommentLessThanSignBangDash(t);break}case N.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:{this._stateCommentLessThanSignBangDashDash(t);break}case N.COMMENT_END_DASH:{this._stateCommentEndDash(t);break}case N.COMMENT_END:{this._stateCommentEnd(t);break}case N.COMMENT_END_BANG:{this._stateCommentEndBang(t);break}case N.DOCTYPE:{this._stateDoctype(t);break}case N.BEFORE_DOCTYPE_NAME:{this._stateBeforeDoctypeName(t);break}case N.DOCTYPE_NAME:{this._stateDoctypeName(t);break}case N.AFTER_DOCTYPE_NAME:{this._stateAfterDoctypeName(t);break}case N.AFTER_DOCTYPE_PUBLIC_KEYWORD:{this._stateAfterDoctypePublicKeyword(t);break}case N.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateBeforeDoctypePublicIdentifier(t);break}case N.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypePublicIdentifierDoubleQuoted(t);break}case N.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypePublicIdentifierSingleQuoted(t);break}case N.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateAfterDoctypePublicIdentifier(t);break}case N.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:{this._stateBetweenDoctypePublicAndSystemIdentifiers(t);break}case N.AFTER_DOCTYPE_SYSTEM_KEYWORD:{this._stateAfterDoctypeSystemKeyword(t);break}case N.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateBeforeDoctypeSystemIdentifier(t);break}case N.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypeSystemIdentifierDoubleQuoted(t);break}case N.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypeSystemIdentifierSingleQuoted(t);break}case N.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateAfterDoctypeSystemIdentifier(t);break}case N.BOGUS_DOCTYPE:{this._stateBogusDoctype(t);break}case N.CDATA_SECTION:{this._stateCdataSection(t);break}case N.CDATA_SECTION_BRACKET:{this._stateCdataSectionBracket(t);break}case N.CDATA_SECTION_END:{this._stateCdataSectionEnd(t);break}case N.CHARACTER_REFERENCE:{this._stateCharacterReference();break}case N.AMBIGUOUS_AMPERSAND:{this._stateAmbiguousAmpersand(t);break}default:throw new Error("Unknown state")}}_stateData(t){switch(t){case v.LESS_THAN_SIGN:{this.state=N.TAG_OPEN;break}case v.AMPERSAND:{this._startCharacterReference();break}case v.NULL:{this._err(Q.unexpectedNullCharacter),this._emitCodePoint(t);break}case v.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRcdata(t){switch(t){case v.AMPERSAND:{this._startCharacterReference();break}case v.LESS_THAN_SIGN:{this.state=N.RCDATA_LESS_THAN_SIGN;break}case v.NULL:{this._err(Q.unexpectedNullCharacter),this._emitChars(ft);break}case v.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRawtext(t){switch(t){case v.LESS_THAN_SIGN:{this.state=N.RAWTEXT_LESS_THAN_SIGN;break}case v.NULL:{this._err(Q.unexpectedNullCharacter),this._emitChars(ft);break}case v.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptData(t){switch(t){case v.LESS_THAN_SIGN:{this.state=N.SCRIPT_DATA_LESS_THAN_SIGN;break}case v.NULL:{this._err(Q.unexpectedNullCharacter),this._emitChars(ft);break}case v.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_statePlaintext(t){switch(t){case v.NULL:{this._err(Q.unexpectedNullCharacter),this._emitChars(ft);break}case v.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateTagOpen(t){if(Wr(t))this._createStartTagToken(),this.state=N.TAG_NAME,this._stateTagName(t);else switch(t){case v.EXCLAMATION_MARK:{this.state=N.MARKUP_DECLARATION_OPEN;break}case v.SOLIDUS:{this.state=N.END_TAG_OPEN;break}case v.QUESTION_MARK:{this._err(Q.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=N.BOGUS_COMMENT,this._stateBogusComment(t);break}case v.EOF:{this._err(Q.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break}default:this._err(Q.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=N.DATA,this._stateData(t)}}_stateEndTagOpen(t){if(Wr(t))this._createEndTagToken(),this.state=N.TAG_NAME,this._stateTagName(t);else switch(t){case v.GREATER_THAN_SIGN:{this._err(Q.missingEndTagName),this.state=N.DATA;break}case v.EOF:{this._err(Q.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break}default:this._err(Q.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=N.BOGUS_COMMENT,this._stateBogusComment(t)}}_stateTagName(t){const n=this.currentToken;switch(t){case v.SPACE:case v.LINE_FEED:case v.TABULATION:case v.FORM_FEED:{this.state=N.BEFORE_ATTRIBUTE_NAME;break}case v.SOLIDUS:{this.state=N.SELF_CLOSING_START_TAG;break}case v.GREATER_THAN_SIGN:{this.state=N.DATA,this.emitCurrentTagToken();break}case v.NULL:{this._err(Q.unexpectedNullCharacter),n.tagName+=ft;break}case v.EOF:{this._err(Q.eofInTag),this._emitEOFToken();break}default:n.tagName+=String.fromCodePoint(js(t)?Fu(t):t)}}_stateRcdataLessThanSign(t){t===v.SOLIDUS?this.state=N.RCDATA_END_TAG_OPEN:(this._emitChars("<"),this.state=N.RCDATA,this._stateRcdata(t))}_stateRcdataEndTagOpen(t){Wr(t)?(this.state=N.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(t)):(this._emitChars("</"),this.state=N.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 v.SPACE:case v.LINE_FEED:case v.TABULATION:case v.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=N.BEFORE_ATTRIBUTE_NAME,!1;case v.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=N.SELF_CLOSING_START_TAG,!1;case v.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=N.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=N.RCDATA,this._stateRcdata(t))}_stateRawtextLessThanSign(t){t===v.SOLIDUS?this.state=N.RAWTEXT_END_TAG_OPEN:(this._emitChars("<"),this.state=N.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagOpen(t){Wr(t)?(this.state=N.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(t)):(this._emitChars("</"),this.state=N.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=N.RAWTEXT,this._stateRawtext(t))}_stateScriptDataLessThanSign(t){switch(t){case v.SOLIDUS:{this.state=N.SCRIPT_DATA_END_TAG_OPEN;break}case v.EXCLAMATION_MARK:{this.state=N.SCRIPT_DATA_ESCAPE_START,this._emitChars("<!");break}default:this._emitChars("<"),this.state=N.SCRIPT_DATA,this._stateScriptData(t)}}_stateScriptDataEndTagOpen(t){Wr(t)?(this.state=N.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(t)):(this._emitChars("</"),this.state=N.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=N.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStart(t){t===v.HYPHEN_MINUS?(this.state=N.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars("-")):(this.state=N.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStartDash(t){t===v.HYPHEN_MINUS?(this.state=N.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-")):(this.state=N.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscaped(t){switch(t){case v.HYPHEN_MINUS:{this.state=N.SCRIPT_DATA_ESCAPED_DASH,this._emitChars("-");break}case v.LESS_THAN_SIGN:{this.state=N.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case v.NULL:{this._err(Q.unexpectedNullCharacter),this._emitChars(ft);break}case v.EOF:{this._err(Q.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataEscapedDash(t){switch(t){case v.HYPHEN_MINUS:{this.state=N.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-");break}case v.LESS_THAN_SIGN:{this.state=N.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case v.NULL:{this._err(Q.unexpectedNullCharacter),this.state=N.SCRIPT_DATA_ESCAPED,this._emitChars(ft);break}case v.EOF:{this._err(Q.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=N.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedDashDash(t){switch(t){case v.HYPHEN_MINUS:{this._emitChars("-");break}case v.LESS_THAN_SIGN:{this.state=N.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case v.GREATER_THAN_SIGN:{this.state=N.SCRIPT_DATA,this._emitChars(">");break}case v.NULL:{this._err(Q.unexpectedNullCharacter),this.state=N.SCRIPT_DATA_ESCAPED,this._emitChars(ft);break}case v.EOF:{this._err(Q.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=N.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedLessThanSign(t){t===v.SOLIDUS?this.state=N.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:Wr(t)?(this._emitChars("<"),this.state=N.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(t)):(this._emitChars("<"),this.state=N.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagOpen(t){Wr(t)?(this.state=N.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(t)):(this._emitChars("</"),this.state=N.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=N.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscapeStart(t){if(this.preprocessor.startsWith(fn.SCRIPT,!1)&&y1(this.preprocessor.peek(fn.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<fn.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=N.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=N.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscaped(t){switch(t){case v.HYPHEN_MINUS:{this.state=N.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars("-");break}case v.LESS_THAN_SIGN:{this.state=N.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case v.NULL:{this._err(Q.unexpectedNullCharacter),this._emitChars(ft);break}case v.EOF:{this._err(Q.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDash(t){switch(t){case v.HYPHEN_MINUS:{this.state=N.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars("-");break}case v.LESS_THAN_SIGN:{this.state=N.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case v.NULL:{this._err(Q.unexpectedNullCharacter),this.state=N.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(ft);break}case v.EOF:{this._err(Q.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=N.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDashDash(t){switch(t){case v.HYPHEN_MINUS:{this._emitChars("-");break}case v.LESS_THAN_SIGN:{this.state=N.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case v.GREATER_THAN_SIGN:{this.state=N.SCRIPT_DATA,this._emitChars(">");break}case v.NULL:{this._err(Q.unexpectedNullCharacter),this.state=N.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(ft);break}case v.EOF:{this._err(Q.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=N.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedLessThanSign(t){t===v.SOLIDUS?(this.state=N.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=N.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateScriptDataDoubleEscapeEnd(t){if(this.preprocessor.startsWith(fn.SCRIPT,!1)&&y1(this.preprocessor.peek(fn.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<fn.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=N.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=N.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateBeforeAttributeName(t){switch(t){case v.SPACE:case v.LINE_FEED:case v.TABULATION:case v.FORM_FEED:break;case v.SOLIDUS:case v.GREATER_THAN_SIGN:case v.EOF:{this.state=N.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case v.EQUALS_SIGN:{this._err(Q.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=N.ATTRIBUTE_NAME;break}default:this._createAttr(""),this.state=N.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateAttributeName(t){switch(t){case v.SPACE:case v.LINE_FEED:case v.TABULATION:case v.FORM_FEED:case v.SOLIDUS:case v.GREATER_THAN_SIGN:case v.EOF:{this._leaveAttrName(),this.state=N.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case v.EQUALS_SIGN:{this._leaveAttrName(),this.state=N.BEFORE_ATTRIBUTE_VALUE;break}case v.QUOTATION_MARK:case v.APOSTROPHE:case v.LESS_THAN_SIGN:{this._err(Q.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(t);break}case v.NULL:{this._err(Q.unexpectedNullCharacter),this.currentAttr.name+=ft;break}default:this.currentAttr.name+=String.fromCodePoint(js(t)?Fu(t):t)}}_stateAfterAttributeName(t){switch(t){case v.SPACE:case v.LINE_FEED:case v.TABULATION:case v.FORM_FEED:break;case v.SOLIDUS:{this.state=N.SELF_CLOSING_START_TAG;break}case v.EQUALS_SIGN:{this.state=N.BEFORE_ATTRIBUTE_VALUE;break}case v.GREATER_THAN_SIGN:{this.state=N.DATA,this.emitCurrentTagToken();break}case v.EOF:{this._err(Q.eofInTag),this._emitEOFToken();break}default:this._createAttr(""),this.state=N.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateBeforeAttributeValue(t){switch(t){case v.SPACE:case v.LINE_FEED:case v.TABULATION:case v.FORM_FEED:break;case v.QUOTATION_MARK:{this.state=N.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break}case v.APOSTROPHE:{this.state=N.ATTRIBUTE_VALUE_SINGLE_QUOTED;break}case v.GREATER_THAN_SIGN:{this._err(Q.missingAttributeValue),this.state=N.DATA,this.emitCurrentTagToken();break}default:this.state=N.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(t)}}_stateAttributeValueDoubleQuoted(t){switch(t){case v.QUOTATION_MARK:{this.state=N.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case v.AMPERSAND:{this._startCharacterReference();break}case v.NULL:{this._err(Q.unexpectedNullCharacter),this.currentAttr.value+=ft;break}case v.EOF:{this._err(Q.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueSingleQuoted(t){switch(t){case v.APOSTROPHE:{this.state=N.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case v.AMPERSAND:{this._startCharacterReference();break}case v.NULL:{this._err(Q.unexpectedNullCharacter),this.currentAttr.value+=ft;break}case v.EOF:{this._err(Q.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueUnquoted(t){switch(t){case v.SPACE:case v.LINE_FEED:case v.TABULATION:case v.FORM_FEED:{this._leaveAttrValue(),this.state=N.BEFORE_ATTRIBUTE_NAME;break}case v.AMPERSAND:{this._startCharacterReference();break}case v.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=N.DATA,this.emitCurrentTagToken();break}case v.NULL:{this._err(Q.unexpectedNullCharacter),this.currentAttr.value+=ft;break}case v.QUOTATION_MARK:case v.APOSTROPHE:case v.LESS_THAN_SIGN:case v.EQUALS_SIGN:case v.GRAVE_ACCENT:{this._err(Q.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(t);break}case v.EOF:{this._err(Q.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAfterAttributeValueQuoted(t){switch(t){case v.SPACE:case v.LINE_FEED:case v.TABULATION:case v.FORM_FEED:{this._leaveAttrValue(),this.state=N.BEFORE_ATTRIBUTE_NAME;break}case v.SOLIDUS:{this._leaveAttrValue(),this.state=N.SELF_CLOSING_START_TAG;break}case v.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=N.DATA,this.emitCurrentTagToken();break}case v.EOF:{this._err(Q.eofInTag),this._emitEOFToken();break}default:this._err(Q.missingWhitespaceBetweenAttributes),this.state=N.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateSelfClosingStartTag(t){switch(t){case v.GREATER_THAN_SIGN:{const n=this.currentToken;n.selfClosing=!0,this.state=N.DATA,this.emitCurrentTagToken();break}case v.EOF:{this._err(Q.eofInTag),this._emitEOFToken();break}default:this._err(Q.unexpectedSolidusInTag),this.state=N.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateBogusComment(t){const n=this.currentToken;switch(t){case v.GREATER_THAN_SIGN:{this.state=N.DATA,this.emitCurrentComment(n);break}case v.EOF:{this.emitCurrentComment(n),this._emitEOFToken();break}case v.NULL:{this._err(Q.unexpectedNullCharacter),n.data+=ft;break}default:n.data+=String.fromCodePoint(t)}}_stateMarkupDeclarationOpen(t){this._consumeSequenceIfMatch(fn.DASH_DASH,!0)?(this._createCommentToken(fn.DASH_DASH.length+1),this.state=N.COMMENT_START):this._consumeSequenceIfMatch(fn.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(fn.DOCTYPE.length+1),this.state=N.DOCTYPE):this._consumeSequenceIfMatch(fn.CDATA_START,!0)?this.inForeignNode?this.state=N.CDATA_SECTION:(this._err(Q.cdataInHtmlContent),this._createCommentToken(fn.CDATA_START.length+1),this.currentToken.data="[CDATA[",this.state=N.BOGUS_COMMENT):this._ensureHibernation()||(this._err(Q.incorrectlyOpenedComment),this._createCommentToken(2),this.state=N.BOGUS_COMMENT,this._stateBogusComment(t))}_stateCommentStart(t){switch(t){case v.HYPHEN_MINUS:{this.state=N.COMMENT_START_DASH;break}case v.GREATER_THAN_SIGN:{this._err(Q.abruptClosingOfEmptyComment),this.state=N.DATA;const n=this.currentToken;this.emitCurrentComment(n);break}default:this.state=N.COMMENT,this._stateComment(t)}}_stateCommentStartDash(t){const n=this.currentToken;switch(t){case v.HYPHEN_MINUS:{this.state=N.COMMENT_END;break}case v.GREATER_THAN_SIGN:{this._err(Q.abruptClosingOfEmptyComment),this.state=N.DATA,this.emitCurrentComment(n);break}case v.EOF:{this._err(Q.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=N.COMMENT,this._stateComment(t)}}_stateComment(t){const n=this.currentToken;switch(t){case v.HYPHEN_MINUS:{this.state=N.COMMENT_END_DASH;break}case v.LESS_THAN_SIGN:{n.data+="<",this.state=N.COMMENT_LESS_THAN_SIGN;break}case v.NULL:{this._err(Q.unexpectedNullCharacter),n.data+=ft;break}case v.EOF:{this._err(Q.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+=String.fromCodePoint(t)}}_stateCommentLessThanSign(t){const n=this.currentToken;switch(t){case v.EXCLAMATION_MARK:{n.data+="!",this.state=N.COMMENT_LESS_THAN_SIGN_BANG;break}case v.LESS_THAN_SIGN:{n.data+="<";break}default:this.state=N.COMMENT,this._stateComment(t)}}_stateCommentLessThanSignBang(t){t===v.HYPHEN_MINUS?this.state=N.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=N.COMMENT,this._stateComment(t))}_stateCommentLessThanSignBangDash(t){t===v.HYPHEN_MINUS?this.state=N.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=N.COMMENT_END_DASH,this._stateCommentEndDash(t))}_stateCommentLessThanSignBangDashDash(t){t!==v.GREATER_THAN_SIGN&&t!==v.EOF&&this._err(Q.nestedComment),this.state=N.COMMENT_END,this._stateCommentEnd(t)}_stateCommentEndDash(t){const n=this.currentToken;switch(t){case v.HYPHEN_MINUS:{this.state=N.COMMENT_END;break}case v.EOF:{this._err(Q.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=N.COMMENT,this._stateComment(t)}}_stateCommentEnd(t){const n=this.currentToken;switch(t){case v.GREATER_THAN_SIGN:{this.state=N.DATA,this.emitCurrentComment(n);break}case v.EXCLAMATION_MARK:{this.state=N.COMMENT_END_BANG;break}case v.HYPHEN_MINUS:{n.data+="-";break}case v.EOF:{this._err(Q.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--",this.state=N.COMMENT,this._stateComment(t)}}_stateCommentEndBang(t){const n=this.currentToken;switch(t){case v.HYPHEN_MINUS:{n.data+="--!",this.state=N.COMMENT_END_DASH;break}case v.GREATER_THAN_SIGN:{this._err(Q.incorrectlyClosedComment),this.state=N.DATA,this.emitCurrentComment(n);break}case v.EOF:{this._err(Q.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--!",this.state=N.COMMENT,this._stateComment(t)}}_stateDoctype(t){switch(t){case v.SPACE:case v.LINE_FEED:case v.TABULATION:case v.FORM_FEED:{this.state=N.BEFORE_DOCTYPE_NAME;break}case v.GREATER_THAN_SIGN:{this.state=N.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t);break}case v.EOF:{this._err(Q.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(Q.missingWhitespaceBeforeDoctypeName),this.state=N.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t)}}_stateBeforeDoctypeName(t){if(js(t))this._createDoctypeToken(String.fromCharCode(Fu(t))),this.state=N.DOCTYPE_NAME;else switch(t){case v.SPACE:case v.LINE_FEED:case v.TABULATION:case v.FORM_FEED:break;case v.NULL:{this._err(Q.unexpectedNullCharacter),this._createDoctypeToken(ft),this.state=N.DOCTYPE_NAME;break}case v.GREATER_THAN_SIGN:{this._err(Q.missingDoctypeName),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=N.DATA;break}case v.EOF:{this._err(Q.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=N.DOCTYPE_NAME}}_stateDoctypeName(t){const n=this.currentToken;switch(t){case v.SPACE:case v.LINE_FEED:case v.TABULATION:case v.FORM_FEED:{this.state=N.AFTER_DOCTYPE_NAME;break}case v.GREATER_THAN_SIGN:{this.state=N.DATA,this.emitCurrentDoctype(n);break}case v.NULL:{this._err(Q.unexpectedNullCharacter),n.name+=ft;break}case v.EOF:{this._err(Q.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.name+=String.fromCodePoint(js(t)?Fu(t):t)}}_stateAfterDoctypeName(t){const n=this.currentToken;switch(t){case v.SPACE:case v.LINE_FEED:case v.TABULATION:case v.FORM_FEED:break;case v.GREATER_THAN_SIGN:{this.state=N.DATA,this.emitCurrentDoctype(n);break}case v.EOF:{this._err(Q.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._consumeSequenceIfMatch(fn.PUBLIC,!1)?this.state=N.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(fn.SYSTEM,!1)?this.state=N.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(Q.invalidCharacterSequenceAfterDoctypeName),n.forceQuirks=!0,this.state=N.BOGUS_DOCTYPE,this._stateBogusDoctype(t))}}_stateAfterDoctypePublicKeyword(t){const n=this.currentToken;switch(t){case v.SPACE:case v.LINE_FEED:case v.TABULATION:case v.FORM_FEED:{this.state=N.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break}case v.QUOTATION_MARK:{this._err(Q.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=N.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case v.APOSTROPHE:{this._err(Q.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=N.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case v.GREATER_THAN_SIGN:{this._err(Q.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=N.DATA,this.emitCurrentDoctype(n);break}case v.EOF:{this._err(Q.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(Q.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=N.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case v.SPACE:case v.LINE_FEED:case v.TABULATION:case v.FORM_FEED:break;case v.QUOTATION_MARK:{n.publicId="",this.state=N.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case v.APOSTROPHE:{n.publicId="",this.state=N.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case v.GREATER_THAN_SIGN:{this._err(Q.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=N.DATA,this.emitCurrentDoctype(n);break}case v.EOF:{this._err(Q.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(Q.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=N.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypePublicIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case v.QUOTATION_MARK:{this.state=N.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case v.NULL:{this._err(Q.unexpectedNullCharacter),n.publicId+=ft;break}case v.GREATER_THAN_SIGN:{this._err(Q.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=N.DATA;break}case v.EOF:{this._err(Q.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 v.APOSTROPHE:{this.state=N.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case v.NULL:{this._err(Q.unexpectedNullCharacter),n.publicId+=ft;break}case v.GREATER_THAN_SIGN:{this._err(Q.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=N.DATA;break}case v.EOF:{this._err(Q.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 v.SPACE:case v.LINE_FEED:case v.TABULATION:case v.FORM_FEED:{this.state=N.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break}case v.GREATER_THAN_SIGN:{this.state=N.DATA,this.emitCurrentDoctype(n);break}case v.QUOTATION_MARK:{this._err(Q.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=N.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case v.APOSTROPHE:{this._err(Q.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=N.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case v.EOF:{this._err(Q.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(Q.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=N.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBetweenDoctypePublicAndSystemIdentifiers(t){const n=this.currentToken;switch(t){case v.SPACE:case v.LINE_FEED:case v.TABULATION:case v.FORM_FEED:break;case v.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=N.DATA;break}case v.QUOTATION_MARK:{n.systemId="",this.state=N.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case v.APOSTROPHE:{n.systemId="",this.state=N.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case v.EOF:{this._err(Q.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(Q.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=N.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateAfterDoctypeSystemKeyword(t){const n=this.currentToken;switch(t){case v.SPACE:case v.LINE_FEED:case v.TABULATION:case v.FORM_FEED:{this.state=N.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break}case v.QUOTATION_MARK:{this._err(Q.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=N.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case v.APOSTROPHE:{this._err(Q.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=N.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case v.GREATER_THAN_SIGN:{this._err(Q.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=N.DATA,this.emitCurrentDoctype(n);break}case v.EOF:{this._err(Q.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(Q.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=N.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case v.SPACE:case v.LINE_FEED:case v.TABULATION:case v.FORM_FEED:break;case v.QUOTATION_MARK:{n.systemId="",this.state=N.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case v.APOSTROPHE:{n.systemId="",this.state=N.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case v.GREATER_THAN_SIGN:{this._err(Q.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=N.DATA,this.emitCurrentDoctype(n);break}case v.EOF:{this._err(Q.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(Q.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=N.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypeSystemIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case v.QUOTATION_MARK:{this.state=N.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case v.NULL:{this._err(Q.unexpectedNullCharacter),n.systemId+=ft;break}case v.GREATER_THAN_SIGN:{this._err(Q.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=N.DATA;break}case v.EOF:{this._err(Q.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 v.APOSTROPHE:{this.state=N.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case v.NULL:{this._err(Q.unexpectedNullCharacter),n.systemId+=ft;break}case v.GREATER_THAN_SIGN:{this._err(Q.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=N.DATA;break}case v.EOF:{this._err(Q.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 v.SPACE:case v.LINE_FEED:case v.TABULATION:case v.FORM_FEED:break;case v.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=N.DATA;break}case v.EOF:{this._err(Q.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(Q.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=N.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBogusDoctype(t){const n=this.currentToken;switch(t){case v.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=N.DATA;break}case v.NULL:{this._err(Q.unexpectedNullCharacter);break}case v.EOF:{this.emitCurrentDoctype(n),this._emitEOFToken();break}}}_stateCdataSection(t){switch(t){case v.RIGHT_SQUARE_BRACKET:{this.state=N.CDATA_SECTION_BRACKET;break}case v.EOF:{this._err(Q.eofInCdata),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateCdataSectionBracket(t){t===v.RIGHT_SQUARE_BRACKET?this.state=N.CDATA_SECTION_END:(this._emitChars("]"),this.state=N.CDATA_SECTION,this._stateCdataSection(t))}_stateCdataSectionEnd(t){switch(t){case v.GREATER_THAN_SIGN:{this.state=N.DATA;break}case v.RIGHT_SQUARE_BRACKET:{this._emitChars("]");break}default:this._emitChars("]]"),this.state=N.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(v.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&g1(this.preprocessor.peek(1))?N.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(t){g1(t)?this._flushCodePointConsumedAsCharacterReference(t):(t===v.SEMICOLON&&this._err(Q.unknownNamedCharacterReference),this.state=this.returnState,this._callState(t))}}const T1=new Set([p.DD,p.DT,p.LI,p.OPTGROUP,p.OPTION,p.P,p.RB,p.RP,p.RT,p.RTC]),b1=new Set([...T1,p.CAPTION,p.COLGROUP,p.TBODY,p.TD,p.TFOOT,p.TH,p.THEAD,p.TR]),Bu=new Set([p.APPLET,p.CAPTION,p.HTML,p.MARQUEE,p.OBJECT,p.TABLE,p.TD,p.TEMPLATE,p.TH]),r3=new Set([...Bu,p.OL,p.UL]),i3=new Set([...Bu,p.BUTTON]),x1=new Set([p.ANNOTATION_XML,p.MI,p.MN,p.MO,p.MS,p.MTEXT]),_1=new Set([p.DESC,p.FOREIGN_OBJECT,p.TITLE]),o3=new Set([p.TR,p.TEMPLATE,p.HTML]),s3=new Set([p.TBODY,p.TFOOT,p.THEAD,p.TEMPLATE,p.HTML]),a3=new Set([p.TABLE,p.TEMPLATE,p.HTML]),u3=new Set([p.TD,p.TH]);class l3{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=p.UNKNOWN,this.current=t}_indexOf(t){return this.items.lastIndexOf(t,this.stackTop)}_isInTemplate(){return this.currentTagId===p.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===oe.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 o=this._indexOf(t)+1;this.items.splice(o,0,n),this.tagIDs.splice(o,0,r),this.stackTop++,o===this.stackTop&&this._updateCurrentElement(),this.current&&this.currentTagId!==void 0&&this.handler.onItemPush(this.current,this.currentTagId,o===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])!==oe.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(sf,oe.HTML)}popUntilTableCellPopped(){this.popUntilPopped(u3,oe.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(a3,oe.HTML)}clearBackToTableBodyContext(){this.clearBackTo(s3,oe.HTML)}clearBackToTableRowContext(){this.clearBackTo(o3,oe.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]===p.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]===p.HTML}hasInDynamicScope(t,n){for(let r=this.stackTop;r>=0;r--){const o=this.tagIDs[r];switch(this.treeAdapter.getNamespaceURI(this.items[r])){case oe.HTML:{if(o===t)return!0;if(n.has(o))return!1;break}case oe.SVG:{if(_1.has(o))return!1;break}case oe.MATHML:{if(x1.has(o))return!1;break}}}return!0}hasInScope(t){return this.hasInDynamicScope(t,Bu)}hasInListItemScope(t){return this.hasInDynamicScope(t,r3)}hasInButtonScope(t){return this.hasInDynamicScope(t,i3)}hasNumberedHeaderInScope(){for(let t=this.stackTop;t>=0;t--){const n=this.tagIDs[t];switch(this.treeAdapter.getNamespaceURI(this.items[t])){case oe.HTML:{if(sf.has(n))return!0;if(Bu.has(n))return!1;break}case oe.SVG:{if(_1.has(n))return!1;break}case oe.MATHML:{if(x1.has(n))return!1;break}}}return!0}hasInTableScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===oe.HTML)switch(this.tagIDs[n]){case t:return!0;case p.TABLE:case p.HTML:return!1}return!0}hasTableBodyContextInTableScope(){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===oe.HTML)switch(this.tagIDs[t]){case p.TBODY:case p.THEAD:case p.TFOOT:return!0;case p.TABLE:case p.HTML:return!1}return!0}hasInSelectScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===oe.HTML)switch(this.tagIDs[n]){case t:return!0;case p.OPTION:case p.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;this.currentTagId!==void 0&&T1.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&b1.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(t){for(;this.currentTagId!==void 0&&this.currentTagId!==t&&b1.has(this.currentTagId);)this.pop()}}const af=3;var lr;(function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"})(lr||(lr={}));const w1={type:lr.Marker};class c3{constructor(t){this.treeAdapter=t,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(t,n){const r=[],o=n.length,a=this.treeAdapter.getTagName(t),u=this.treeAdapter.getNamespaceURI(t);for(let c=0;c<this.entries.length;c++){const d=this.entries[c];if(d.type===lr.Marker)break;const{element:h}=d;if(this.treeAdapter.getTagName(h)===a&&this.treeAdapter.getNamespaceURI(h)===u){const m=this.treeAdapter.getAttrList(h);m.length===o&&r.push({idx:c,attrs:m})}}return r}_ensureNoahArkCondition(t){if(this.entries.length<af)return;const n=this.treeAdapter.getAttrList(t),r=this._getNoahArkConditionCandidates(t,n);if(r.length<af)return;const o=new Map(n.map(u=>[u.name,u.value]));let a=0;for(let u=0;u<r.length;u++){const c=r[u];c.attrs.every(d=>o.get(d.name)===d.value)&&(a+=1,a>=af&&this.entries.splice(c.idx,1))}}insertMarker(){this.entries.unshift(w1)}pushElement(t,n){this._ensureNoahArkCondition(t),this.entries.unshift({type:lr.Element,element:t,token:n})}insertElementAfterBookmark(t,n){const r=this.entries.indexOf(this.bookmark);this.entries.splice(r,0,{type:lr.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(w1);t===-1?this.entries.length=0:this.entries.splice(0,t+1)}getElementEntryInScopeWithTagName(t){const n=this.entries.find(r=>r.type===lr.Marker||this.treeAdapter.getTagName(r.element)===t);return n&&n.type===lr.Element?n:null}getElementEntry(t){return this.entries.find(n=>n.type===lr.Element&&n.element===t)}}const qr={createDocument(){return{nodeName:"#document",mode:Ln.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 o=e.childNodes.find(a=>a.nodeName==="#documentType");if(o)o.name=t,o.publicId=n,o.systemId=r;else{const a={nodeName:"#documentType",name:t,publicId:n,systemId:r,parentNode:null};qr.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(qr.isTextNode(n)){n.value+=t;return}}qr.appendChild(e,qr.createTextNode(t))},insertTextBefore(e,t,n){const r=e.childNodes[e.childNodes.indexOf(n)-1];r&&qr.isTextNode(r)?r.value+=t:qr.insertBefore(e,qr.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=U(U({},e.sourceCodeLocation),t)}},S1="html",d3="about:legacy-compat",f3="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",A1=["+//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//"],h3=[...A1,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],p3=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),v1=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],m3=[...v1,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function C1(e,t){return t.some(n=>e.startsWith(n))}function g3(e){return e.name===S1&&e.publicId===null&&(e.systemId===null||e.systemId===d3)}function E3(e){if(e.name!==S1)return Ln.QUIRKS;const{systemId:t}=e;if(t&&t.toLowerCase()===f3)return Ln.QUIRKS;let{publicId:n}=e;if(n!==null){if(n=n.toLowerCase(),p3.has(n))return Ln.QUIRKS;let r=t===null?h3:A1;if(C1(n,r))return Ln.QUIRKS;if(r=t===null?v1:m3,C1(n,r))return Ln.LIMITED_QUIRKS}return Ln.NO_QUIRKS}const k1={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},y3="definitionurl",T3="definitionURL",b3=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])),x3=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:oe.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:oe.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:oe.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:oe.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:oe.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:oe.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:oe.XLINK}],["xml:lang",{prefix:"xml",name:"lang",namespace:oe.XML}],["xml:space",{prefix:"xml",name:"space",namespace:oe.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:oe.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:oe.XMLNS}]]),_3=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])),w3=new Set([p.B,p.BIG,p.BLOCKQUOTE,p.BODY,p.BR,p.CENTER,p.CODE,p.DD,p.DIV,p.DL,p.DT,p.EM,p.EMBED,p.H1,p.H2,p.H3,p.H4,p.H5,p.H6,p.HEAD,p.HR,p.I,p.IMG,p.LI,p.LISTING,p.MENU,p.META,p.NOBR,p.OL,p.P,p.PRE,p.RUBY,p.S,p.SMALL,p.SPAN,p.STRONG,p.STRIKE,p.SUB,p.SUP,p.TABLE,p.TT,p.U,p.UL,p.VAR]);function S3(e){const t=e.tagID;return t===p.FONT&&e.attrs.some(({name:r})=>r===Li.COLOR||r===Li.SIZE||r===Li.FACE)||w3.has(t)}function N1(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===y3){e.attrs[t].name=T3;break}}function O1(e){for(let t=0;t<e.attrs.length;t++){const n=b3.get(e.attrs[t].name);n!=null&&(e.attrs[t].name=n)}}function uf(e){for(let t=0;t<e.attrs.length;t++){const n=x3.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 A3(e){const t=_3.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=So(e.tagName))}function v3(e,t){return t===oe.MATHML&&(e===p.MI||e===p.MO||e===p.MN||e===p.MS||e===p.MTEXT)}function C3(e,t,n){if(t===oe.MATHML&&e===p.ANNOTATION_XML){for(let r=0;r<n.length;r++)if(n[r].name===Li.ENCODING){const o=n[r].value.toLowerCase();return o===k1.TEXT_HTML||o===k1.APPLICATION_XML}}return t===oe.SVG&&(e===p.FOREIGN_OBJECT||e===p.DESC||e===p.TITLE)}function k3(e,t,n,r){return(!r||r===oe.HTML)&&C3(e,t,n)||(!r||r===oe.MATHML)&&v3(e,t)}const N3="hidden",O3=8,I3=3;var L;(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"})(L||(L={}));const R3={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},I1=new Set([p.TABLE,p.TBODY,p.TFOOT,p.THEAD,p.TR]),R1={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:qr,onParseError:null};class P1{constructor(t,n,r=null,o=null){this.fragmentContext=r,this.scriptHandler=o,this.currentToken=null,this.stopped=!1,this.insertionMode=L.INITIAL,this.originalInsertionMode=L.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=U(U({},R1),t),this.treeAdapter=this.options.treeAdapter,this.onParseError=this.options.onParseError,this.onParseError&&(this.options.sourceCodeLocationInfo=!0),this.document=n!=null?n:this.treeAdapter.createDocument(),this.tokenizer=new n3(this.options,this),this.activeFormattingElements=new c3(this.treeAdapter),this.fragmentContextID=r?So(this.treeAdapter.getTagName(r)):p.UNKNOWN,this._setContextModes(r!=null?r:this.document,this.fragmentContextID),this.openElements=new l3(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=U(U({},R1),n);t!=null||(t=r.treeAdapter.createElement(Y.TEMPLATE,oe.HTML,[]));const o=r.treeAdapter.createElement("documentmock",oe.HTML,[]),a=new this(r,o,t);return a.fragmentContextID===p.TEMPLATE&&a.tmplInsertionModeStack.unshift(L.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 o;if(!this.onParseError)return;const a=(o=t.location)!==null&&o!==void 0?o:R3,u={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(u)}onItemPush(t,n,r){var o,a;(a=(o=this.treeAdapter).onItemPush)===null||a===void 0||a.call(o,t),r&&this.openElements.stackTop>0&&this._setContextModes(t,n)}onItemPop(t,n){var r,o;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(t,this.currentToken),(o=(r=this.treeAdapter).onItemPop)===null||o===void 0||o.call(r,t,this.openElements.current),n){let a,u;this.openElements.stackTop===0&&this.fragmentContext?(a=this.fragmentContext,u=this.fragmentContextID):{current:a,currentTagId:u}=this.openElements,this._setContextModes(a,u)}}_setContextModes(t,n){const r=t===this.document||t&&this.treeAdapter.getNamespaceURI(t)===oe.HTML;this.currentNotInHTML=!r,this.tokenizer.inForeignNode=!r&&t!==void 0&&n!==void 0&&!this._isIntegrationPoint(n,t)}_switchToTextParsing(t,n){this._insertElement(t,oe.HTML),this.tokenizer.state=n,this.originalInsertionMode=this.insertionMode,this.insertionMode=L.TEXT}switchToPlaintextParsing(){this.insertionMode=L.TEXT,this.originalInsertionMode=L.IN_BODY,this.tokenizer.state=xt.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)===Y.FORM){this.formElement=t;break}t=this.treeAdapter.getParentNode(t)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==oe.HTML))switch(this.fragmentContextID){case p.TITLE:case p.TEXTAREA:{this.tokenizer.state=xt.RCDATA;break}case p.STYLE:case p.XMP:case p.IFRAME:case p.NOEMBED:case p.NOFRAMES:case p.NOSCRIPT:{this.tokenizer.state=xt.RAWTEXT;break}case p.SCRIPT:{this.tokenizer.state=xt.SCRIPT_DATA;break}case p.PLAINTEXT:{this.tokenizer.state=xt.PLAINTEXT;break}}}_setDocumentType(t){const n=t.name||"",r=t.publicId||"",o=t.systemId||"";if(this.treeAdapter.setDocumentType(this.document,n,r,o),t.location){const u=this.treeAdapter.getChildNodes(this.document).find(c=>this.treeAdapter.isDocumentTypeNode(c));u&&this.treeAdapter.setNodeSourceCodeLocation(u,t.location)}}_attachElementToTree(t,n){if(this.options.sourceCodeLocationInfo){const r=n&&ne(U({},n),{startTag:n});this.treeAdapter.setNodeSourceCodeLocation(t,r)}if(this._shouldFosterParentOnInsertion())this._fosterParentElement(t);else{const r=this.openElements.currentTmplContentOrNode;this.treeAdapter.appendChild(r!=null?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,oe.HTML,[]);this._attachElementToTree(r,null),this.openElements.push(r,n)}_insertTemplate(t){const n=this.treeAdapter.createElement(t.tagName,oe.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(Y.HTML,oe.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(t,null),this.treeAdapter.appendChild(this.openElements.current,t),this.openElements.push(t,p.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 o=this.treeAdapter.getChildNodes(n),a=r?o.lastIndexOf(r):o.length,u=o[a-1];if(this.treeAdapter.getNodeSourceCodeLocation(u)){const{endLine:d,endCol:h,endOffset:m}=t.location;this.treeAdapter.updateNodeSourceCodeLocation(u,{endLine:d,endCol:h,endOffset:m})}else this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(u,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,o=this.treeAdapter.getTagName(t),a=n.type===$e.END_TAG&&o===n.tagName?{endTag:U({},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===p.SVG&&this.treeAdapter.getTagName(n)===Y.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(n)===oe.MATHML?!1:this.tokenizer.inForeignNode||(t.tagID===p.MGLYPH||t.tagID===p.MALIGNMARK)&&r!==void 0&&!this._isIntegrationPoint(r,n,oe.HTML)}_processToken(t){switch(t.type){case $e.CHARACTER:{this.onCharacter(t);break}case $e.NULL_CHARACTER:{this.onNullCharacter(t);break}case $e.COMMENT:{this.onComment(t);break}case $e.DOCTYPE:{this.onDoctype(t);break}case $e.START_TAG:{this._processStartTag(t);break}case $e.END_TAG:{this.onEndTag(t);break}case $e.EOF:{this.onEof(t);break}case $e.WHITESPACE_CHARACTER:{this.onWhitespaceCharacter(t);break}}}_isIntegrationPoint(t,n,r){const o=this.treeAdapter.getNamespaceURI(n),a=this.treeAdapter.getAttrList(n);return k3(t,o,a,r)}_reconstructActiveFormattingElements(){const t=this.activeFormattingElements.entries.length;if(t){const n=this.activeFormattingElements.entries.findIndex(o=>o.type===lr.Marker||this.openElements.contains(o.element)),r=n===-1?t-1:n-1;for(let o=r;o>=0;o--){const a=this.activeFormattingElements.entries[o];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=L.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(p.P),this.openElements.popUntilTagNamePopped(p.P)}_resetInsertionMode(){for(let t=this.openElements.stackTop;t>=0;t--)switch(t===0&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[t]){case p.TR:{this.insertionMode=L.IN_ROW;return}case p.TBODY:case p.THEAD:case p.TFOOT:{this.insertionMode=L.IN_TABLE_BODY;return}case p.CAPTION:{this.insertionMode=L.IN_CAPTION;return}case p.COLGROUP:{this.insertionMode=L.IN_COLUMN_GROUP;return}case p.TABLE:{this.insertionMode=L.IN_TABLE;return}case p.BODY:{this.insertionMode=L.IN_BODY;return}case p.FRAMESET:{this.insertionMode=L.IN_FRAMESET;return}case p.SELECT:{this._resetInsertionModeForSelect(t);return}case p.TEMPLATE:{this.insertionMode=this.tmplInsertionModeStack[0];return}case p.HTML:{this.insertionMode=this.headElement?L.AFTER_HEAD:L.BEFORE_HEAD;return}case p.TD:case p.TH:{if(t>0){this.insertionMode=L.IN_CELL;return}break}case p.HEAD:{if(t>0){this.insertionMode=L.IN_HEAD;return}break}}this.insertionMode=L.IN_BODY}_resetInsertionModeForSelect(t){if(t>0)for(let n=t-1;n>0;n--){const r=this.openElements.tagIDs[n];if(r===p.TEMPLATE)break;if(r===p.TABLE){this.insertionMode=L.IN_SELECT_IN_TABLE;return}}this.insertionMode=L.IN_SELECT}_isElementCausesFosterParenting(t){return I1.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 p.TEMPLATE:{if(this.treeAdapter.getNamespaceURI(n)===oe.HTML)return{parent:this.treeAdapter.getTemplateContent(n),beforeElement:null};break}case p.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 JN[r].has(n)}onCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){uI(this,t);return}switch(this.insertionMode){case L.INITIAL:{$s(this,t);break}case L.BEFORE_HTML:{Vs(this,t);break}case L.BEFORE_HEAD:{Ys(this,t);break}case L.IN_HEAD:{Ws(this,t);break}case L.IN_HEAD_NO_SCRIPT:{qs(this,t);break}case L.AFTER_HEAD:{Gs(this,t);break}case L.IN_BODY:case L.IN_CAPTION:case L.IN_CELL:case L.IN_TEMPLATE:{D1(this,t);break}case L.TEXT:case L.IN_SELECT:case L.IN_SELECT_IN_TABLE:{this._insertCharacters(t);break}case L.IN_TABLE:case L.IN_TABLE_BODY:case L.IN_ROW:{ff(this,t);break}case L.IN_TABLE_TEXT:{$1(this,t);break}case L.IN_COLUMN_GROUP:{zu(this,t);break}case L.AFTER_BODY:{Vu(this,t);break}case L.AFTER_AFTER_BODY:{Yu(this,t);break}}}onNullCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){aI(this,t);return}switch(this.insertionMode){case L.INITIAL:{$s(this,t);break}case L.BEFORE_HTML:{Vs(this,t);break}case L.BEFORE_HEAD:{Ys(this,t);break}case L.IN_HEAD:{Ws(this,t);break}case L.IN_HEAD_NO_SCRIPT:{qs(this,t);break}case L.AFTER_HEAD:{Gs(this,t);break}case L.TEXT:{this._insertCharacters(t);break}case L.IN_TABLE:case L.IN_TABLE_BODY:case L.IN_ROW:{ff(this,t);break}case L.IN_COLUMN_GROUP:{zu(this,t);break}case L.AFTER_BODY:{Vu(this,t);break}case L.AFTER_AFTER_BODY:{Yu(this,t);break}}}onComment(t){if(this.skipNextNewLine=!1,this.currentNotInHTML){cf(this,t);return}switch(this.insertionMode){case L.INITIAL:case L.BEFORE_HTML:case L.BEFORE_HEAD:case L.IN_HEAD:case L.IN_HEAD_NO_SCRIPT:case L.AFTER_HEAD:case L.IN_BODY:case L.IN_TABLE:case L.IN_CAPTION:case L.IN_COLUMN_GROUP:case L.IN_TABLE_BODY:case L.IN_ROW:case L.IN_CELL:case L.IN_SELECT:case L.IN_SELECT_IN_TABLE:case L.IN_TEMPLATE:case L.IN_FRAMESET:case L.AFTER_FRAMESET:{cf(this,t);break}case L.IN_TABLE_TEXT:{Xs(this,t);break}case L.AFTER_BODY:{U3(this,t);break}case L.AFTER_AFTER_BODY:case L.AFTER_AFTER_FRAMESET:{H3(this,t);break}}}onDoctype(t){switch(this.skipNextNewLine=!1,this.insertionMode){case L.INITIAL:{z3(this,t);break}case L.BEFORE_HEAD:case L.IN_HEAD:case L.IN_HEAD_NO_SCRIPT:case L.AFTER_HEAD:{this._err(t,Q.misplacedDoctype);break}case L.IN_TABLE_TEXT:{Xs(this,t);break}}}onStartTag(t){this.skipNextNewLine=!1,this.currentToken=t,this._processStartTag(t),t.selfClosing&&!t.ackSelfClosing&&this._err(t,Q.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(t){this.shouldProcessStartTagTokenInForeignContent(t)?lI(this,t):this._startTagOutsideForeignContent(t)}_startTagOutsideForeignContent(t){switch(this.insertionMode){case L.INITIAL:{$s(this,t);break}case L.BEFORE_HTML:{j3(this,t);break}case L.BEFORE_HEAD:{V3(this,t);break}case L.IN_HEAD:{qn(this,t);break}case L.IN_HEAD_NO_SCRIPT:{q3(this,t);break}case L.AFTER_HEAD:{K3(this,t);break}case L.IN_BODY:{Gt(this,t);break}case L.IN_TABLE:{Ao(this,t);break}case L.IN_TABLE_TEXT:{Xs(this,t);break}case L.IN_CAPTION:{YO(this,t);break}case L.IN_COLUMN_GROUP:{hf(this,t);break}case L.IN_TABLE_BODY:{ju(this,t);break}case L.IN_ROW:{$u(this,t);break}case L.IN_CELL:{GO(this,t);break}case L.IN_SELECT:{W1(this,t);break}case L.IN_SELECT_IN_TABLE:{QO(this,t);break}case L.IN_TEMPLATE:{JO(this,t);break}case L.AFTER_BODY:{eI(this,t);break}case L.IN_FRAMESET:{tI(this,t);break}case L.AFTER_FRAMESET:{rI(this,t);break}case L.AFTER_AFTER_BODY:{oI(this,t);break}case L.AFTER_AFTER_FRAMESET:{sI(this,t);break}}}onEndTag(t){this.skipNextNewLine=!1,this.currentToken=t,this.currentNotInHTML?cI(this,t):this._endTagOutsideForeignContent(t)}_endTagOutsideForeignContent(t){switch(this.insertionMode){case L.INITIAL:{$s(this,t);break}case L.BEFORE_HTML:{$3(this,t);break}case L.BEFORE_HEAD:{Y3(this,t);break}case L.IN_HEAD:{W3(this,t);break}case L.IN_HEAD_NO_SCRIPT:{G3(this,t);break}case L.AFTER_HEAD:{Q3(this,t);break}case L.IN_BODY:{Hu(this,t);break}case L.TEXT:{DO(this,t);break}case L.IN_TABLE:{Ks(this,t);break}case L.IN_TABLE_TEXT:{Xs(this,t);break}case L.IN_CAPTION:{WO(this,t);break}case L.IN_COLUMN_GROUP:{qO(this,t);break}case L.IN_TABLE_BODY:{pf(this,t);break}case L.IN_ROW:{Y1(this,t);break}case L.IN_CELL:{KO(this,t);break}case L.IN_SELECT:{q1(this,t);break}case L.IN_SELECT_IN_TABLE:{XO(this,t);break}case L.IN_TEMPLATE:{ZO(this,t);break}case L.AFTER_BODY:{K1(this,t);break}case L.IN_FRAMESET:{nI(this,t);break}case L.AFTER_FRAMESET:{iI(this,t);break}case L.AFTER_AFTER_BODY:{Yu(this,t);break}}}onEof(t){switch(this.insertionMode){case L.INITIAL:{$s(this,t);break}case L.BEFORE_HTML:{Vs(this,t);break}case L.BEFORE_HEAD:{Ys(this,t);break}case L.IN_HEAD:{Ws(this,t);break}case L.IN_HEAD_NO_SCRIPT:{qs(this,t);break}case L.AFTER_HEAD:{Gs(this,t);break}case L.IN_BODY:case L.IN_TABLE:case L.IN_CAPTION:case L.IN_COLUMN_GROUP:case L.IN_TABLE_BODY:case L.IN_ROW:case L.IN_CELL:case L.IN_SELECT:case L.IN_SELECT_IN_TABLE:{z1(this,t);break}case L.TEXT:{MO(this,t);break}case L.IN_TABLE_TEXT:{Xs(this,t);break}case L.IN_TEMPLATE:{G1(this,t);break}case L.AFTER_BODY:case L.IN_FRAMESET:case L.AFTER_FRAMESET:case L.AFTER_AFTER_BODY:case L.AFTER_AFTER_FRAMESET:{df(this,t);break}}}onWhitespaceCharacter(t){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,t.chars.charCodeAt(0)===v.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 L.IN_HEAD:case L.IN_HEAD_NO_SCRIPT:case L.AFTER_HEAD:case L.TEXT:case L.IN_COLUMN_GROUP:case L.IN_SELECT:case L.IN_SELECT_IN_TABLE:case L.IN_FRAMESET:case L.AFTER_FRAMESET:{this._insertCharacters(t);break}case L.IN_BODY:case L.IN_CAPTION:case L.IN_CELL:case L.IN_TEMPLATE:case L.AFTER_BODY:case L.AFTER_AFTER_BODY:case L.AFTER_AFTER_FRAMESET:{L1(this,t);break}case L.IN_TABLE:case L.IN_TABLE_BODY:case L.IN_ROW:{ff(this,t);break}case L.IN_TABLE_TEXT:{j1(this,t);break}}}}function P3(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):H1(e,t),n}function L3(e,t){let n=null,r=e.openElements.stackTop;for(;r>=0;r--){const o=e.openElements.items[r];if(o===t.element)break;e._isSpecialElement(o,e.openElements.tagIDs[r])&&(n=o)}return n||(e.openElements.shortenToLength(Math.max(r,0)),e.activeFormattingElements.removeEntry(t)),n}function D3(e,t,n){let r=t,o=e.openElements.getCommonAncestor(t);for(let a=0,u=o;u!==n;a++,u=o){o=e.openElements.getCommonAncestor(u);const c=e.activeFormattingElements.getElementEntry(u),d=c&&a>=I3;!c||d?(d&&e.activeFormattingElements.removeEntry(c),e.openElements.remove(u)):(u=M3(e,c),r===t&&(e.activeFormattingElements.bookmark=c),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(u,r),r=u)}return r}function M3(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 F3(e,t,n){const r=e.treeAdapter.getTagName(t),o=So(r);if(e._isElementCausesFosterParenting(o))e._fosterParentElement(n);else{const a=e.treeAdapter.getNamespaceURI(t);o===p.TEMPLATE&&a===oe.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function B3(e,t,n){const r=e.treeAdapter.getNamespaceURI(n.element),{token:o}=n,a=e.treeAdapter.createElement(o.tagName,r,o.attrs);e._adoptNodes(t,a),e.treeAdapter.appendChild(t,a),e.activeFormattingElements.insertElementAfterBookmark(a,o),e.activeFormattingElements.removeEntry(n),e.openElements.remove(n.element),e.openElements.insertAfter(t,a,o.tagID)}function lf(e,t){for(let n=0;n<O3;n++){const r=P3(e,t);if(!r)break;const o=L3(e,r);if(!o)break;e.activeFormattingElements.bookmark=r;const a=D3(e,o,r.element),u=e.openElements.getCommonAncestor(r.element);e.treeAdapter.detachNode(a),u&&F3(e,u,a),B3(e,o,r)}}function cf(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function U3(e,t){e._appendCommentNode(t,e.openElements.items[0])}function H3(e,t){e._appendCommentNode(t,e.document)}function df(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],o=e.treeAdapter.getNodeSourceCodeLocation(r);if(o&&!o.endTag&&(e._setEndLocation(r,t),e.openElements.stackTop>=1)){const a=e.openElements.items[1],u=e.treeAdapter.getNodeSourceCodeLocation(a);u&&!u.endTag&&e._setEndLocation(a,t)}}}}function z3(e,t){e._setDocumentType(t);const n=t.forceQuirks?Ln.QUIRKS:E3(t);g3(t)||e._err(t,Q.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=L.BEFORE_HTML}function $s(e,t){e._err(t,Q.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,Ln.QUIRKS),e.insertionMode=L.BEFORE_HTML,e._processToken(t)}function j3(e,t){t.tagID===p.HTML?(e._insertElement(t,oe.HTML),e.insertionMode=L.BEFORE_HEAD):Vs(e,t)}function $3(e,t){const n=t.tagID;(n===p.HTML||n===p.HEAD||n===p.BODY||n===p.BR)&&Vs(e,t)}function Vs(e,t){e._insertFakeRootElement(),e.insertionMode=L.BEFORE_HEAD,e._processToken(t)}function V3(e,t){switch(t.tagID){case p.HTML:{Gt(e,t);break}case p.HEAD:{e._insertElement(t,oe.HTML),e.headElement=e.openElements.current,e.insertionMode=L.IN_HEAD;break}default:Ys(e,t)}}function Y3(e,t){const n=t.tagID;n===p.HEAD||n===p.BODY||n===p.HTML||n===p.BR?Ys(e,t):e._err(t,Q.endTagWithoutMatchingOpenElement)}function Ys(e,t){e._insertFakeElement(Y.HEAD,p.HEAD),e.headElement=e.openElements.current,e.insertionMode=L.IN_HEAD,e._processToken(t)}function qn(e,t){switch(t.tagID){case p.HTML:{Gt(e,t);break}case p.BASE:case p.BASEFONT:case p.BGSOUND:case p.LINK:case p.META:{e._appendElement(t,oe.HTML),t.ackSelfClosing=!0;break}case p.TITLE:{e._switchToTextParsing(t,xt.RCDATA);break}case p.NOSCRIPT:{e.options.scriptingEnabled?e._switchToTextParsing(t,xt.RAWTEXT):(e._insertElement(t,oe.HTML),e.insertionMode=L.IN_HEAD_NO_SCRIPT);break}case p.NOFRAMES:case p.STYLE:{e._switchToTextParsing(t,xt.RAWTEXT);break}case p.SCRIPT:{e._switchToTextParsing(t,xt.SCRIPT_DATA);break}case p.TEMPLATE:{e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=L.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(L.IN_TEMPLATE);break}case p.HEAD:{e._err(t,Q.misplacedStartTagForHeadElement);break}default:Ws(e,t)}}function W3(e,t){switch(t.tagID){case p.HEAD:{e.openElements.pop(),e.insertionMode=L.AFTER_HEAD;break}case p.BODY:case p.BR:case p.HTML:{Ws(e,t);break}case p.TEMPLATE:{Di(e,t);break}default:e._err(t,Q.endTagWithoutMatchingOpenElement)}}function Di(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==p.TEMPLATE&&e._err(t,Q.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(p.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,Q.endTagWithoutMatchingOpenElement)}function Ws(e,t){e.openElements.pop(),e.insertionMode=L.AFTER_HEAD,e._processToken(t)}function q3(e,t){switch(t.tagID){case p.HTML:{Gt(e,t);break}case p.BASEFONT:case p.BGSOUND:case p.HEAD:case p.LINK:case p.META:case p.NOFRAMES:case p.STYLE:{qn(e,t);break}case p.NOSCRIPT:{e._err(t,Q.nestedNoscriptInHead);break}default:qs(e,t)}}function G3(e,t){switch(t.tagID){case p.NOSCRIPT:{e.openElements.pop(),e.insertionMode=L.IN_HEAD;break}case p.BR:{qs(e,t);break}default:e._err(t,Q.endTagWithoutMatchingOpenElement)}}function qs(e,t){const n=t.type===$e.EOF?Q.openElementsLeftAfterEof:Q.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=L.IN_HEAD,e._processToken(t)}function K3(e,t){switch(t.tagID){case p.HTML:{Gt(e,t);break}case p.BODY:{e._insertElement(t,oe.HTML),e.framesetOk=!1,e.insertionMode=L.IN_BODY;break}case p.FRAMESET:{e._insertElement(t,oe.HTML),e.insertionMode=L.IN_FRAMESET;break}case p.BASE:case p.BASEFONT:case p.BGSOUND:case p.LINK:case p.META:case p.NOFRAMES:case p.SCRIPT:case p.STYLE:case p.TEMPLATE:case p.TITLE:{e._err(t,Q.abandonedHeadElementChild),e.openElements.push(e.headElement,p.HEAD),qn(e,t),e.openElements.remove(e.headElement);break}case p.HEAD:{e._err(t,Q.misplacedStartTagForHeadElement);break}default:Gs(e,t)}}function Q3(e,t){switch(t.tagID){case p.BODY:case p.HTML:case p.BR:{Gs(e,t);break}case p.TEMPLATE:{Di(e,t);break}default:e._err(t,Q.endTagWithoutMatchingOpenElement)}}function Gs(e,t){e._insertFakeElement(Y.BODY,p.BODY),e.insertionMode=L.IN_BODY,Uu(e,t)}function Uu(e,t){switch(t.type){case $e.CHARACTER:{D1(e,t);break}case $e.WHITESPACE_CHARACTER:{L1(e,t);break}case $e.COMMENT:{cf(e,t);break}case $e.START_TAG:{Gt(e,t);break}case $e.END_TAG:{Hu(e,t);break}case $e.EOF:{z1(e,t);break}}}function L1(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function D1(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function X3(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function J3(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}function Z3(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,oe.HTML),e.insertionMode=L.IN_FRAMESET)}function eO(e,t){e.openElements.hasInButtonScope(p.P)&&e._closePElement(),e._insertElement(t,oe.HTML)}function tO(e,t){e.openElements.hasInButtonScope(p.P)&&e._closePElement(),e.openElements.currentTagId!==void 0&&sf.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,oe.HTML)}function nO(e,t){e.openElements.hasInButtonScope(p.P)&&e._closePElement(),e._insertElement(t,oe.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function rO(e,t){const n=e.openElements.tmplCount>0;(!e.formElement||n)&&(e.openElements.hasInButtonScope(p.P)&&e._closePElement(),e._insertElement(t,oe.HTML),n||(e.formElement=e.openElements.current))}function iO(e,t){e.framesetOk=!1;const n=t.tagID;for(let r=e.openElements.stackTop;r>=0;r--){const o=e.openElements.tagIDs[r];if(n===p.LI&&o===p.LI||(n===p.DD||n===p.DT)&&(o===p.DD||o===p.DT)){e.openElements.generateImpliedEndTagsWithExclusion(o),e.openElements.popUntilTagNamePopped(o);break}if(o!==p.ADDRESS&&o!==p.DIV&&o!==p.P&&e._isSpecialElement(e.openElements.items[r],o))break}e.openElements.hasInButtonScope(p.P)&&e._closePElement(),e._insertElement(t,oe.HTML)}function oO(e,t){e.openElements.hasInButtonScope(p.P)&&e._closePElement(),e._insertElement(t,oe.HTML),e.tokenizer.state=xt.PLAINTEXT}function sO(e,t){e.openElements.hasInScope(p.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(p.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,oe.HTML),e.framesetOk=!1}function aO(e,t){const n=e.activeFormattingElements.getElementEntryInScopeWithTagName(Y.A);n&&(lf(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,oe.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function uO(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,oe.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function lO(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(p.NOBR)&&(lf(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,oe.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function cO(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,oe.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function dO(e,t){e.treeAdapter.getDocumentMode(e.document)!==Ln.QUIRKS&&e.openElements.hasInButtonScope(p.P)&&e._closePElement(),e._insertElement(t,oe.HTML),e.framesetOk=!1,e.insertionMode=L.IN_TABLE}function M1(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,oe.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function F1(e){const t=m1(e,Li.TYPE);return t!=null&&t.toLowerCase()===N3}function fO(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,oe.HTML),F1(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function hO(e,t){e._appendElement(t,oe.HTML),t.ackSelfClosing=!0}function pO(e,t){e.openElements.hasInButtonScope(p.P)&&e._closePElement(),e._appendElement(t,oe.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function mO(e,t){t.tagName=Y.IMG,t.tagID=p.IMG,M1(e,t)}function gO(e,t){e._insertElement(t,oe.HTML),e.skipNextNewLine=!0,e.tokenizer.state=xt.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=L.TEXT}function EO(e,t){e.openElements.hasInButtonScope(p.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,xt.RAWTEXT)}function yO(e,t){e.framesetOk=!1,e._switchToTextParsing(t,xt.RAWTEXT)}function B1(e,t){e._switchToTextParsing(t,xt.RAWTEXT)}function TO(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,oe.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===L.IN_TABLE||e.insertionMode===L.IN_CAPTION||e.insertionMode===L.IN_TABLE_BODY||e.insertionMode===L.IN_ROW||e.insertionMode===L.IN_CELL?L.IN_SELECT_IN_TABLE:L.IN_SELECT}function bO(e,t){e.openElements.currentTagId===p.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,oe.HTML)}function xO(e,t){e.openElements.hasInScope(p.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,oe.HTML)}function _O(e,t){e.openElements.hasInScope(p.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(p.RTC),e._insertElement(t,oe.HTML)}function wO(e,t){e._reconstructActiveFormattingElements(),N1(t),uf(t),t.selfClosing?e._appendElement(t,oe.MATHML):e._insertElement(t,oe.MATHML),t.ackSelfClosing=!0}function SO(e,t){e._reconstructActiveFormattingElements(),O1(t),uf(t),t.selfClosing?e._appendElement(t,oe.SVG):e._insertElement(t,oe.SVG),t.ackSelfClosing=!0}function U1(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,oe.HTML)}function Gt(e,t){switch(t.tagID){case p.I:case p.S:case p.B:case p.U:case p.EM:case p.TT:case p.BIG:case p.CODE:case p.FONT:case p.SMALL:case p.STRIKE:case p.STRONG:{uO(e,t);break}case p.A:{aO(e,t);break}case p.H1:case p.H2:case p.H3:case p.H4:case p.H5:case p.H6:{tO(e,t);break}case p.P:case p.DL:case p.OL:case p.UL:case p.DIV:case p.DIR:case p.NAV:case p.MAIN:case p.MENU:case p.ASIDE:case p.CENTER:case p.FIGURE:case p.FOOTER:case p.HEADER:case p.HGROUP:case p.DIALOG:case p.DETAILS:case p.ADDRESS:case p.ARTICLE:case p.SEARCH:case p.SECTION:case p.SUMMARY:case p.FIELDSET:case p.BLOCKQUOTE:case p.FIGCAPTION:{eO(e,t);break}case p.LI:case p.DD:case p.DT:{iO(e,t);break}case p.BR:case p.IMG:case p.WBR:case p.AREA:case p.EMBED:case p.KEYGEN:{M1(e,t);break}case p.HR:{pO(e,t);break}case p.RB:case p.RTC:{xO(e,t);break}case p.RT:case p.RP:{_O(e,t);break}case p.PRE:case p.LISTING:{nO(e,t);break}case p.XMP:{EO(e,t);break}case p.SVG:{SO(e,t);break}case p.HTML:{X3(e,t);break}case p.BASE:case p.LINK:case p.META:case p.STYLE:case p.TITLE:case p.SCRIPT:case p.BGSOUND:case p.BASEFONT:case p.TEMPLATE:{qn(e,t);break}case p.BODY:{J3(e,t);break}case p.FORM:{rO(e,t);break}case p.NOBR:{lO(e,t);break}case p.MATH:{wO(e,t);break}case p.TABLE:{dO(e,t);break}case p.INPUT:{fO(e,t);break}case p.PARAM:case p.TRACK:case p.SOURCE:{hO(e,t);break}case p.IMAGE:{mO(e,t);break}case p.BUTTON:{sO(e,t);break}case p.APPLET:case p.OBJECT:case p.MARQUEE:{cO(e,t);break}case p.IFRAME:{yO(e,t);break}case p.SELECT:{TO(e,t);break}case p.OPTION:case p.OPTGROUP:{bO(e,t);break}case p.NOEMBED:case p.NOFRAMES:{B1(e,t);break}case p.FRAMESET:{Z3(e,t);break}case p.TEXTAREA:{gO(e,t);break}case p.NOSCRIPT:{e.options.scriptingEnabled?B1(e,t):U1(e,t);break}case p.PLAINTEXT:{oO(e,t);break}case p.COL:case p.TH:case p.TD:case p.TR:case p.HEAD:case p.FRAME:case p.TBODY:case p.TFOOT:case p.THEAD:case p.CAPTION:case p.COLGROUP:break;default:U1(e,t)}}function AO(e,t){if(e.openElements.hasInScope(p.BODY)&&(e.insertionMode=L.AFTER_BODY,e.options.sourceCodeLocationInfo)){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e._setEndLocation(n,t)}}function vO(e,t){e.openElements.hasInScope(p.BODY)&&(e.insertionMode=L.AFTER_BODY,K1(e,t))}function CO(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function kO(e){const t=e.openElements.tmplCount>0,{formElement:n}=e;t||(e.formElement=null),(n||t)&&e.openElements.hasInScope(p.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(p.FORM):n&&e.openElements.remove(n))}function NO(e){e.openElements.hasInButtonScope(p.P)||e._insertFakeElement(Y.P,p.P),e._closePElement()}function OO(e){e.openElements.hasInListItemScope(p.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(p.LI),e.openElements.popUntilTagNamePopped(p.LI))}function IO(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}function RO(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function PO(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function LO(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(Y.BR,p.BR),e.openElements.pop(),e.framesetOk=!1}function H1(e,t){const n=t.tagName,r=t.tagID;for(let o=e.openElements.stackTop;o>0;o--){const a=e.openElements.items[o],u=e.openElements.tagIDs[o];if(r===u&&(r!==p.UNKNOWN||e.treeAdapter.getTagName(a)===n)){e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.stackTop>=o&&e.openElements.shortenToLength(o);break}if(e._isSpecialElement(a,u))break}}function Hu(e,t){switch(t.tagID){case p.A:case p.B:case p.I:case p.S:case p.U:case p.EM:case p.TT:case p.BIG:case p.CODE:case p.FONT:case p.NOBR:case p.SMALL:case p.STRIKE:case p.STRONG:{lf(e,t);break}case p.P:{NO(e);break}case p.DL:case p.UL:case p.OL:case p.DIR:case p.DIV:case p.NAV:case p.PRE:case p.MAIN:case p.MENU:case p.ASIDE:case p.BUTTON:case p.CENTER:case p.FIGURE:case p.FOOTER:case p.HEADER:case p.HGROUP:case p.DIALOG:case p.ADDRESS:case p.ARTICLE:case p.DETAILS:case p.SEARCH:case p.SECTION:case p.SUMMARY:case p.LISTING:case p.FIELDSET:case p.BLOCKQUOTE:case p.FIGCAPTION:{CO(e,t);break}case p.LI:{OO(e);break}case p.DD:case p.DT:{IO(e,t);break}case p.H1:case p.H2:case p.H3:case p.H4:case p.H5:case p.H6:{RO(e);break}case p.BR:{LO(e);break}case p.BODY:{AO(e,t);break}case p.HTML:{vO(e,t);break}case p.FORM:{kO(e);break}case p.APPLET:case p.OBJECT:case p.MARQUEE:{PO(e,t);break}case p.TEMPLATE:{Di(e,t);break}default:H1(e,t)}}function z1(e,t){e.tmplInsertionModeStack.length>0?G1(e,t):df(e,t)}function DO(e,t){var n;t.tagID===p.SCRIPT&&((n=e.scriptHandler)===null||n===void 0||n.call(e,e.openElements.current)),e.openElements.pop(),e.insertionMode=e.originalInsertionMode}function MO(e,t){e._err(t,Q.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function ff(e,t){if(e.openElements.currentTagId!==void 0&&I1.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=L.IN_TABLE_TEXT,t.type){case $e.CHARACTER:{$1(e,t);break}case $e.WHITESPACE_CHARACTER:{j1(e,t);break}}else Qs(e,t)}function FO(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,oe.HTML),e.insertionMode=L.IN_CAPTION}function BO(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,oe.HTML),e.insertionMode=L.IN_COLUMN_GROUP}function UO(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(Y.COLGROUP,p.COLGROUP),e.insertionMode=L.IN_COLUMN_GROUP,hf(e,t)}function HO(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,oe.HTML),e.insertionMode=L.IN_TABLE_BODY}function zO(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(Y.TBODY,p.TBODY),e.insertionMode=L.IN_TABLE_BODY,ju(e,t)}function jO(e,t){e.openElements.hasInTableScope(p.TABLE)&&(e.openElements.popUntilTagNamePopped(p.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function $O(e,t){F1(t)?e._appendElement(t,oe.HTML):Qs(e,t),t.ackSelfClosing=!0}function VO(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,oe.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function Ao(e,t){switch(t.tagID){case p.TD:case p.TH:case p.TR:{zO(e,t);break}case p.STYLE:case p.SCRIPT:case p.TEMPLATE:{qn(e,t);break}case p.COL:{UO(e,t);break}case p.FORM:{VO(e,t);break}case p.TABLE:{jO(e,t);break}case p.TBODY:case p.TFOOT:case p.THEAD:{HO(e,t);break}case p.INPUT:{$O(e,t);break}case p.CAPTION:{FO(e,t);break}case p.COLGROUP:{BO(e,t);break}default:Qs(e,t)}}function Ks(e,t){switch(t.tagID){case p.TABLE:{e.openElements.hasInTableScope(p.TABLE)&&(e.openElements.popUntilTagNamePopped(p.TABLE),e._resetInsertionMode());break}case p.TEMPLATE:{Di(e,t);break}case p.BODY:case p.CAPTION:case p.COL:case p.COLGROUP:case p.HTML:case p.TBODY:case p.TD:case p.TFOOT:case p.TH:case p.THEAD:case p.TR:break;default:Qs(e,t)}}function Qs(e,t){const n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,Uu(e,t),e.fosterParentingEnabled=n}function j1(e,t){e.pendingCharacterTokens.push(t)}function $1(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function Xs(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)Qs(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}const V1=new Set([p.CAPTION,p.COL,p.COLGROUP,p.TBODY,p.TD,p.TFOOT,p.TH,p.THEAD,p.TR]);function YO(e,t){const n=t.tagID;V1.has(n)?e.openElements.hasInTableScope(p.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(p.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=L.IN_TABLE,Ao(e,t)):Gt(e,t)}function WO(e,t){const n=t.tagID;switch(n){case p.CAPTION:case p.TABLE:{e.openElements.hasInTableScope(p.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(p.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=L.IN_TABLE,n===p.TABLE&&Ks(e,t));break}case p.BODY:case p.COL:case p.COLGROUP:case p.HTML:case p.TBODY:case p.TD:case p.TFOOT:case p.TH:case p.THEAD:case p.TR:break;default:Hu(e,t)}}function hf(e,t){switch(t.tagID){case p.HTML:{Gt(e,t);break}case p.COL:{e._appendElement(t,oe.HTML),t.ackSelfClosing=!0;break}case p.TEMPLATE:{qn(e,t);break}default:zu(e,t)}}function qO(e,t){switch(t.tagID){case p.COLGROUP:{e.openElements.currentTagId===p.COLGROUP&&(e.openElements.pop(),e.insertionMode=L.IN_TABLE);break}case p.TEMPLATE:{Di(e,t);break}case p.COL:break;default:zu(e,t)}}function zu(e,t){e.openElements.currentTagId===p.COLGROUP&&(e.openElements.pop(),e.insertionMode=L.IN_TABLE,e._processToken(t))}function ju(e,t){switch(t.tagID){case p.TR:{e.openElements.clearBackToTableBodyContext(),e._insertElement(t,oe.HTML),e.insertionMode=L.IN_ROW;break}case p.TH:case p.TD:{e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(Y.TR,p.TR),e.insertionMode=L.IN_ROW,$u(e,t);break}case p.CAPTION:case p.COL:case p.COLGROUP:case p.TBODY:case p.TFOOT:case p.THEAD:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=L.IN_TABLE,Ao(e,t));break}default:Ao(e,t)}}function pf(e,t){const n=t.tagID;switch(t.tagID){case p.TBODY:case p.TFOOT:case p.THEAD:{e.openElements.hasInTableScope(n)&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=L.IN_TABLE);break}case p.TABLE:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=L.IN_TABLE,Ks(e,t));break}case p.BODY:case p.CAPTION:case p.COL:case p.COLGROUP:case p.HTML:case p.TD:case p.TH:case p.TR:break;default:Ks(e,t)}}function $u(e,t){switch(t.tagID){case p.TH:case p.TD:{e.openElements.clearBackToTableRowContext(),e._insertElement(t,oe.HTML),e.insertionMode=L.IN_CELL,e.activeFormattingElements.insertMarker();break}case p.CAPTION:case p.COL:case p.COLGROUP:case p.TBODY:case p.TFOOT:case p.THEAD:case p.TR:{e.openElements.hasInTableScope(p.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=L.IN_TABLE_BODY,ju(e,t));break}default:Ao(e,t)}}function Y1(e,t){switch(t.tagID){case p.TR:{e.openElements.hasInTableScope(p.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=L.IN_TABLE_BODY);break}case p.TABLE:{e.openElements.hasInTableScope(p.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=L.IN_TABLE_BODY,pf(e,t));break}case p.TBODY:case p.TFOOT:case p.THEAD:{(e.openElements.hasInTableScope(t.tagID)||e.openElements.hasInTableScope(p.TR))&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=L.IN_TABLE_BODY,pf(e,t));break}case p.BODY:case p.CAPTION:case p.COL:case p.COLGROUP:case p.HTML:case p.TD:case p.TH:break;default:Ks(e,t)}}function GO(e,t){const n=t.tagID;V1.has(n)?(e.openElements.hasInTableScope(p.TD)||e.openElements.hasInTableScope(p.TH))&&(e._closeTableCell(),$u(e,t)):Gt(e,t)}function KO(e,t){const n=t.tagID;switch(n){case p.TD:case p.TH:{e.openElements.hasInTableScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=L.IN_ROW);break}case p.TABLE:case p.TBODY:case p.TFOOT:case p.THEAD:case p.TR:{e.openElements.hasInTableScope(n)&&(e._closeTableCell(),Y1(e,t));break}case p.BODY:case p.CAPTION:case p.COL:case p.COLGROUP:case p.HTML:break;default:Hu(e,t)}}function W1(e,t){switch(t.tagID){case p.HTML:{Gt(e,t);break}case p.OPTION:{e.openElements.currentTagId===p.OPTION&&e.openElements.pop(),e._insertElement(t,oe.HTML);break}case p.OPTGROUP:{e.openElements.currentTagId===p.OPTION&&e.openElements.pop(),e.openElements.currentTagId===p.OPTGROUP&&e.openElements.pop(),e._insertElement(t,oe.HTML);break}case p.HR:{e.openElements.currentTagId===p.OPTION&&e.openElements.pop(),e.openElements.currentTagId===p.OPTGROUP&&e.openElements.pop(),e._appendElement(t,oe.HTML),t.ackSelfClosing=!0;break}case p.INPUT:case p.KEYGEN:case p.TEXTAREA:case p.SELECT:{e.openElements.hasInSelectScope(p.SELECT)&&(e.openElements.popUntilTagNamePopped(p.SELECT),e._resetInsertionMode(),t.tagID!==p.SELECT&&e._processStartTag(t));break}case p.SCRIPT:case p.TEMPLATE:{qn(e,t);break}}}function q1(e,t){switch(t.tagID){case p.OPTGROUP:{e.openElements.stackTop>0&&e.openElements.currentTagId===p.OPTION&&e.openElements.tagIDs[e.openElements.stackTop-1]===p.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagId===p.OPTGROUP&&e.openElements.pop();break}case p.OPTION:{e.openElements.currentTagId===p.OPTION&&e.openElements.pop();break}case p.SELECT:{e.openElements.hasInSelectScope(p.SELECT)&&(e.openElements.popUntilTagNamePopped(p.SELECT),e._resetInsertionMode());break}case p.TEMPLATE:{Di(e,t);break}}}function QO(e,t){const n=t.tagID;n===p.CAPTION||n===p.TABLE||n===p.TBODY||n===p.TFOOT||n===p.THEAD||n===p.TR||n===p.TD||n===p.TH?(e.openElements.popUntilTagNamePopped(p.SELECT),e._resetInsertionMode(),e._processStartTag(t)):W1(e,t)}function XO(e,t){const n=t.tagID;n===p.CAPTION||n===p.TABLE||n===p.TBODY||n===p.TFOOT||n===p.THEAD||n===p.TR||n===p.TD||n===p.TH?e.openElements.hasInTableScope(n)&&(e.openElements.popUntilTagNamePopped(p.SELECT),e._resetInsertionMode(),e.onEndTag(t)):q1(e,t)}function JO(e,t){switch(t.tagID){case p.BASE:case p.BASEFONT:case p.BGSOUND:case p.LINK:case p.META:case p.NOFRAMES:case p.SCRIPT:case p.STYLE:case p.TEMPLATE:case p.TITLE:{qn(e,t);break}case p.CAPTION:case p.COLGROUP:case p.TBODY:case p.TFOOT:case p.THEAD:{e.tmplInsertionModeStack[0]=L.IN_TABLE,e.insertionMode=L.IN_TABLE,Ao(e,t);break}case p.COL:{e.tmplInsertionModeStack[0]=L.IN_COLUMN_GROUP,e.insertionMode=L.IN_COLUMN_GROUP,hf(e,t);break}case p.TR:{e.tmplInsertionModeStack[0]=L.IN_TABLE_BODY,e.insertionMode=L.IN_TABLE_BODY,ju(e,t);break}case p.TD:case p.TH:{e.tmplInsertionModeStack[0]=L.IN_ROW,e.insertionMode=L.IN_ROW,$u(e,t);break}default:e.tmplInsertionModeStack[0]=L.IN_BODY,e.insertionMode=L.IN_BODY,Gt(e,t)}}function ZO(e,t){t.tagID===p.TEMPLATE&&Di(e,t)}function G1(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(p.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):df(e,t)}function eI(e,t){t.tagID===p.HTML?Gt(e,t):Vu(e,t)}function K1(e,t){var n;if(t.tagID===p.HTML){if(e.fragmentContext||(e.insertionMode=L.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===p.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 Vu(e,t)}function Vu(e,t){e.insertionMode=L.IN_BODY,Uu(e,t)}function tI(e,t){switch(t.tagID){case p.HTML:{Gt(e,t);break}case p.FRAMESET:{e._insertElement(t,oe.HTML);break}case p.FRAME:{e._appendElement(t,oe.HTML),t.ackSelfClosing=!0;break}case p.NOFRAMES:{qn(e,t);break}}}function nI(e,t){t.tagID===p.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==p.FRAMESET&&(e.insertionMode=L.AFTER_FRAMESET))}function rI(e,t){switch(t.tagID){case p.HTML:{Gt(e,t);break}case p.NOFRAMES:{qn(e,t);break}}}function iI(e,t){t.tagID===p.HTML&&(e.insertionMode=L.AFTER_AFTER_FRAMESET)}function oI(e,t){t.tagID===p.HTML?Gt(e,t):Yu(e,t)}function Yu(e,t){e.insertionMode=L.IN_BODY,Uu(e,t)}function sI(e,t){switch(t.tagID){case p.HTML:{Gt(e,t);break}case p.NOFRAMES:{qn(e,t);break}}}function aI(e,t){t.chars=ft,e._insertCharacters(t)}function uI(e,t){e._insertCharacters(t),e.framesetOk=!1}function Q1(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==oe.HTML&&e.openElements.currentTagId!==void 0&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function lI(e,t){if(S3(t))Q1(e),e._startTagOutsideForeignContent(t);else{const n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===oe.MATHML?N1(t):r===oe.SVG&&(A3(t),O1(t)),uf(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}function cI(e,t){if(t.tagID===p.P||t.tagID===p.BR){Q1(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)===oe.HTML){e._endTagOutsideForeignContent(t);break}const o=e.treeAdapter.getTagName(r);if(o.toLowerCase()===t.tagName){t.tagName=o,e.openElements.shortenToLength(n);break}}}Y.AREA,Y.BASE,Y.BASEFONT,Y.BGSOUND,Y.BR,Y.COL,Y.EMBED,Y.FRAME,Y.HR,Y.IMG,Y.INPUT,Y.KEYGEN,Y.LINK,Y.META,Y.PARAM,Y.SOURCE,Y.TRACK,Y.WBR;const dI=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,fI=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),X1={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function J1(e,t){const n=_I(e),r=c1("type",{handlers:{root:hI,element:pI,text:mI,comment:eE,doctype:gI,raw:yI},unknown:TI}),o={parser:n?new P1(X1):P1.getFragmentParser(void 0,X1),handle(c){r(c,o)},stitches:!1,options:t||{}};r(e,o),vo(o,ar());const a=n?o.parser.document:o.parser.getFragment(),u=hN(a,{file:o.options.file});return o.stitches&&Lu(u,"comment",function(c,d,h){const m=c;if(m.value.stitch&&h&&d!==void 0){const E=h.children;return E[d]=m.value.stitch,d}}),u.type==="root"&&u.children.length===1&&u.children[0].type===e.type?u.children[0]:u}function Z1(e,t){let n=-1;if(e)for(;++n<e.length;)t.handle(e[n])}function hI(e,t){Z1(e.children,t)}function pI(e,t){bI(e,t),Z1(e.children,t),xI(e,t)}function mI(e,t){t.parser.tokenizer.state>4&&(t.parser.tokenizer.state=0);const n={type:$e.CHARACTER,chars:e.value,location:Js(e)};vo(t,ar(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function gI(e,t){const n={type:$e.DOCTYPE,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:Js(e)};vo(t,ar(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function EI(e,t){t.stitches=!0;const n=wI(e);if("children"in e&&"children"in n){const r=J1({type:"root",children:e.children},t.options);n.children=r.children}eE({type:"comment",value:{stitch:n}},t)}function eE(e,t){const n=e.value,r={type:$e.COMMENT,data:n,location:Js(e)};vo(t,ar(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function yI(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,tE(t,ar(e)),t.parser.tokenizer.write(t.options.tagfilter?e.value.replace(dI,"<$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 TI(e,t){const n=e;if(t.options.passThrough&&t.options.passThrough.includes(n.type))EI(n,t);else{let r="";throw fI.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 vo(e,t){tE(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=xt.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 tE(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 bI(e,t){const n=e.tagName.toLowerCase();if(t.parser.tokenizer.state===xt.PLAINTEXT)return;vo(t,ar(e));const r=t.parser.openElements.current;let o="namespaceURI"in r?r.namespaceURI:Ri.html;o===Ri.html&&n==="svg"&&(o=Ri.svg);const a=kN(ne(U({},e),{children:[]}),{space:o===Ri.svg?"svg":"html"}),u={type:$e.START_TAG,tagName:n,tagID:So(n),selfClosing:!1,ackSelfClosing:!1,attrs:"attrs"in a?a.attrs:[],location:Js(e)};t.parser.currentToken=u,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=n}function xI(e,t){const n=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&MN.includes(n)||t.parser.tokenizer.state===xt.PLAINTEXT)return;vo(t,wu(e));const r={type:$e.END_TAG,tagName:n,tagID:So(n),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:Js(e)};t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken),n===t.parser.tokenizer.lastStartTagName&&(t.parser.tokenizer.state===xt.RCDATA||t.parser.tokenizer.state===xt.RAWTEXT||t.parser.tokenizer.state===xt.SCRIPT_DATA)&&(t.parser.tokenizer.state=xt.DATA)}function _I(e){const t=e.type==="root"?e.children[0]:e;return!!(t&&(t.type==="doctype"||t.type==="element"&&t.tagName.toLowerCase()==="html"))}function Js(e){const t=ar(e)||{line:void 0,column:void 0,offset:void 0},n=wu(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 wI(e){return"children"in e?Ii(ne(U({},e),{children:[]})):Ii(e)}function nE(e){return function(t,n){return J1(t,ne(U({},e),{file:n}))}}const Mi=["ariaDescribedBy","ariaLabel","ariaLabelledBy"],rE={ancestors:{tbody:["table"],td:["table"],th:["table"],thead:["table"],tfoot:["table"],tr:["table"]},attributes:{a:[...Mi,"dataFootnoteBackref","dataFootnoteRef",["className","data-footnote-backref"],"href"],blockquote:["cite"],code:[["className",/^language-./]],del:["cite"],div:["itemScope","itemType"],dl:[...Mi],h2:[["className","sr-only"]],img:[...Mi,"longDesc","src"],input:[["disabled",!0],["type","checkbox"]],ins:["cite"],li:[["className","task-list-item"]],ol:[...Mi,["className","contains-task-list"]],q:["cite"],section:["dataFootnotes",["className","footnotes"]],source:["srcSet"],summary:[...Mi],table:[...Mi],ul:[...Mi,["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"]},Gr={}.hasOwnProperty;function SI(e,t){let n={type:"root",children:[]};const r={schema:t?U(U({},rE),t):rE,stack:[]},o=iE(r,e);return o&&(Array.isArray(o)?o.length===1?n=o[0]:n.children=o:n=o),n}function iE(e,t){if(t&&typeof t=="object"){const n=t;switch(typeof n.type=="string"?n.type:""){case"comment":return AI(e,n);case"doctype":return vI(e,n);case"element":return CI(e,n);case"root":return kI(e,n);case"text":return NI(e,n)}}}function AI(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 Zs(a,t),a}}function vI(e,t){if(e.schema.allowDoctypes){const n={type:"doctype"};return Zs(n,t),n}}function CI(e,t){const n=typeof t.tagName=="string"?t.tagName:"";e.stack.push(n);const r=oE(e,t.children),o=OI(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&&Gr.call(e.schema.ancestors,n))){const c=e.schema.ancestors[n];let d=-1;for(a=!1;++d<c.length;)e.stack.includes(c[d])&&(a=!0)}if(!a)return e.schema.strip&&!e.schema.strip.includes(n)?r:void 0;const u={type:"element",tagName:n,properties:o,children:r};return Zs(u,t),u}function kI(e,t){const r={type:"root",children:oE(e,t.children)};return Zs(r,t),r}function NI(e,t){const r={type:"text",value:typeof t.value=="string"?t.value:""};return Zs(r,t),r}function oE(e,t){const n=[];if(Array.isArray(t)){const r=t;let o=-1;for(;++o<r.length;){const a=iE(e,r[o]);a&&(Array.isArray(a)?n.push(...a):n.push(a))}}return n}function OI(e,t){const n=e.stack[e.stack.length-1],r=e.schema.attributes,o=e.schema.required,a=r&&Gr.call(r,n)?r[n]:void 0,u=r&&Gr.call(r,"*")?r["*"]:void 0,c=t&&typeof t=="object"?t:{},d={};let h;for(h in c)if(Gr.call(c,h)){const m=c[h];let E=sE(e,uE(a,h),h,m);E==null&&(E=sE(e,uE(u,h),h,m)),E!=null&&(d[h]=E)}if(o&&Gr.call(o,n)){const m=o[n];for(h in m)Gr.call(m,h)&&!Gr.call(d,h)&&(d[h]=m[h])}return d}function sE(e,t,n,r){return t?Array.isArray(r)?II(e,t,n,r):aE(e,t,n,r):void 0}function II(e,t,n,r){let o=-1;const a=[];for(;++o<r.length;){const u=aE(e,t,n,r[o]);(typeof u=="number"||typeof u=="string")&&a.push(u)}return a}function aE(e,t,n,r){if(!(typeof r!="boolean"&&typeof r!="number"&&typeof r!="string")&&RI(e,n,r)){if(typeof t=="object"&&t.length>1){let o=!1,a=0;for(;++a<t.length;){const u=t[a];if(u&&typeof u=="object"&&"flags"in u){if(u.test(String(r))){o=!0;break}}else if(u===r){o=!0;break}}if(!o)return}return e.schema.clobber&&e.schema.clobberPrefix&&e.schema.clobber.includes(n)?e.schema.clobberPrefix+r:r}}function RI(e,t,n){const r=e.schema.protocols&&Gr.call(e.schema.protocols,t)?e.schema.protocols[t]:void 0;if(!r||r.length===0)return!0;const o=String(n),a=o.indexOf(":"),u=o.indexOf("?"),c=o.indexOf("#"),d=o.indexOf("/");if(a<0||d>-1&&a>d||u>-1&&a>u||c>-1&&a>c)return!0;let h=-1;for(;++h<r.length;){const m=r[h];if(a===m.length&&o.slice(0,m.length)===m)return!0}return!1}function Zs(e,t){const n=$0(t);t.data&&(e.data=Ii(t.data)),n&&(e.position=n)}function uE(e,t){let n,r=-1;if(e)for(;++r<e.length;){const o=e[r],a=typeof o=="string"?o:o[0];if(a===t)return o;a==="data*"&&(n=o)}if(t.length>4&&t.slice(0,4).toLowerCase()==="data")return n}function PI(e){return function(t){return SI(t,e)}}const lE=({globalClassName:e,openLinksInNewTab:t,href:n,title:r,children:o})=>{const a=n?t?"_blank":"_self":void 0;return P.jsx("a",ne(U(U({className:re(e,`${J}-link`)},n?{href:n,target:a}:{}),r?{title:r}:{}),{rel:"noopener noreferrer",children:o}))},LI=()=>{const{disclaimerText:e,disclaimerMarkdown:t,globalClassName:n}=Ht();return!e&&!t?null:P.jsx("div",{className:re(n,`${J}-disclaimer`),children:t?P.jsx(Vg,{rehypePlugins:[nE,PI],components:{ul:({children:r})=>P.jsx("ul",{className:re(n,`${J}-ul`),children:r}),ol:({children:r})=>P.jsx("ol",{className:re(n,`${J}-ol`),children:r}),li:({children:r})=>P.jsx("li",{className:re(n,`${J}-li`),children:r}),a:({href:r,title:o,children:a})=>P.jsx(lE,{globalClassName:n,openLinksInNewTab:!0,href:r,title:o,children:a}),img:({src:r,alt:o})=>P.jsx("img",{className:re(n,`${J}-disclaimer-image`),src:r,alt:o}),p:({children:r})=>P.jsx("p",{className:re(n,`${J}-disclaimer-text`),children:r}),span:({children:r})=>P.jsx("span",{className:re(n,`${J}-disclaimer-text-span`),children:r})},children:t}):P.jsx("p",{className:re(n,`${J}-disclaimer-text`),children:e})})},mf=({className:e,isLoading:t,componentType:n,onSubmit:r})=>{const{isConnected:o}=ki(),{globalClassName:a,searchConfig:u}=Ht(),c=Z.useRef(null),d=t||!o,h=E=>{var b;E.preventDefault();const T=(((b=c.current)==null?void 0:b.value)||"").trim();T&&(c.current.value="",r(T))},m=()=>{r("Can you connect me to a human?")};return P.jsxs("div",{className:re(a,e,`cim-${n}-component`,`${J}-search-bar-wrapper`),children:[P.jsxs("form",{className:re(a,e,`cim-${n}-component`,`${J}-search-bar`),name:`${J}-search-form`,onSubmit:h,children:[P.jsx("input",{className:re(a,e,`cim-${n}-component`,`${J}-search-input`),type:"text",ref:c,placeholder:(u==null?void 0:u.placeholder)||"Ask us anything",name:`${J}-user-input`,disabled:d}),P.jsx(nA,{className:e,globalClassName:a,searchConfig:u,componentType:n,isLoading:d}),P.jsx(jr,{className:re(a,`${J}-escalate-btn`),ariaLabel:"Connect to a human agent",title:"Connect to a human agent",disabled:d,onClick:m,icon:P.jsx(QS,{})})]}),P.jsx(LI,{})]})};function DI(e){return ln({attr:{version:"1.1",viewBox:"0 0 17 17"},child:[{tag:"g",attr:{},child:[]},{tag:"path",attr:{d:"M6 8h-6v-6h1v4.109c1.013-3.193 4.036-5.484 7.5-5.484 3.506 0 6.621 2.36 7.574 5.739l-0.963 0.271c-0.832-2.95-3.551-5.011-6.611-5.011-3.226 0.001-6.016 2.276-6.708 5.376h4.208v1zM11 9v1h4.208c-0.693 3.101-3.479 5.375-6.708 5.375-3.062 0-5.78-2.061-6.611-5.011l-0.963 0.271c0.952 3.379 4.067 5.739 7.574 5.739 3.459 0 6.475-2.28 7.5-5.482v4.108h1v-6h-6z"},child:[]}]})(e)}const cE=Z.createContext({isOpen:!1}),gf=Z.createContext(null),dE=Z.createContext(null),ea=()=>{var n,r;const e=Z.useContext(gf),t=Z.useContext(dE);return(r=(n=e==null?void 0:e.closeMenu)!=null?n:t==null?void 0:t.closeMenu)!=null?r:(()=>{})},fE=({onClearChat:e,componentType:t})=>{const n=ea(),r=()=>{e(),n()};return P.jsxs("button",{className:re(`${J}-overflow-menu-button`,"clear-chat-button",`cim-${t}-component`),onClick:r,children:[P.jsx(DI,{}),"Clear chat"]})};function MI(e){return e==null?[]:Array.isArray(e)?e:[e]}var FI=(e,...t)=>e.concat(t),BI=(e,...t)=>e.filter(n=>!t.includes(n)),UI=e=>Array.from(new Set(e));function hE(e,t,n={}){const{step:r=1,loop:o=!0}=n,a=t+r,u=e.length,c=u-1;return t===-1?r>0?0:c:a<0?o?c:0:a>=u?o?0:t>u?u:t:a}function HI(e,t,n={}){const{step:r=1,loop:o=!0}=n;return hE(e,t,{step:-r,loop:o})}var zI=e=>Array.isArray(e),pE=e=>e!=null&&typeof e=="object",jI=e=>pE(e)&&!zI(e),Wu=e=>typeof e=="string",Co=e=>typeof e=="function",$I=e=>e==null,VI=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),YI=e=>Object.prototype.toString.call(e),mE=Function.prototype.toString,WI=mE.call(Object),qI=e=>{if(!pE(e)||YI(e)!="[object Object]"||QI(e))return!1;const t=Object.getPrototypeOf(e);if(t===null)return!0;const n=VI(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&mE.call(n)==WI},GI=e=>typeof e=="object"&&e!==null&&"$$typeof"in e&&"props"in e,KI=e=>typeof e=="object"&&e!==null&&"__v_isVNode"in e,QI=e=>GI(e)||KI(e),XI=e=>e(),JI=()=>{},Ef=(...e)=>(...t)=>{e.forEach(function(n){n==null||n(...t)})};function ZI(e,t=0){let n=0,r=null;return((...o)=>{const a=Date.now(),u=a-n;u>=t?(r&&(clearTimeout(r),r=null),e(...o),n=a):r||(r=setTimeout(()=>{e(...o),n=Date.now(),r=null},t-u))})}var{min:eR,max:tR}=Math,nR=e=>Number.isNaN(e),rR=e=>nR(e)?0:e,gE=(e,t,n)=>eR(tR(rR(e),t),n);function yf(e){if(!qI(e)||e===void 0)return e;const t=Reflect.ownKeys(e).filter(r=>typeof r=="string"),n={};for(const r of t){const o=e[r];o!==void 0&&(n[r]=yf(o))}return n}function Tf(...e){e.length===1?e[0]:e[1],e.length===2&&e[0]}function iR(e,t){if(e==null)throw new Error(t())}function oR(e,t,n){let r=[];for(const o of t)e[o]==null&&r.push(o);if(r.length>0)throw new Error(`[zag-js${` > ${n}`}] missing required props: ${r.join(", ")}`)}var sR=Object.defineProperty,aR=(e,t,n)=>t in e?sR(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,bf=(e,t,n)=>aR(e,typeof t!="symbol"?t+"":t,n),EE=()=>{},qu=e=>typeof e=="object"&&e!==null,ko=e=>e?"":void 0,yE=e=>e?"true":void 0,uR=1,lR=9,cR=11,Dt=e=>qu(e)&&e.nodeType===uR&&typeof e.nodeName=="string",Gu=e=>qu(e)&&e.nodeType===lR,dR=e=>qu(e)&&e===e.window,TE=e=>Dt(e)?e.localName||"":"#document";function fR(e){return["html","body","#document"].includes(TE(e))}var hR=e=>qu(e)&&e.nodeType!==void 0,Fi=e=>hR(e)&&e.nodeType===cR&&"host"in e,pR=e=>Dt(e)&&e.localName==="input",mR=e=>Dt(e)?e.offsetWidth>0||e.offsetHeight>0||e.getClientRects().length>0:!1;function ta(e){if(!e)return!1;const t=e.getRootNode();return Io(t)===e}var gR=/(textarea|select)/;function ER(e){if(e==null||!Dt(e))return!1;try{return pR(e)&&e.selectionStart!=null||gR.test(e.localName)||e.isContentEditable||e.getAttribute("contenteditable")==="true"||e.getAttribute("contenteditable")===""}catch(t){return!1}}function No(e,t){var r;if(!e||!t||!Dt(e)||!Dt(t))return!1;const n=(r=t.getRootNode)==null?void 0:r.call(t);if(e===t||e.contains(t))return!0;if(n&&Fi(n)){let o=t;for(;o;){if(e===o)return!0;o=o.parentNode||o.host}}return!1}function cr(e){var t;return Gu(e)?e:dR(e)?e.document:(t=e==null?void 0:e.ownerDocument)!=null?t:document}function yR(e){return cr(e).documentElement}function Oo(e){var t,n,r;return Fi(e)?Oo(e.host):Gu(e)?(t=e.defaultView)!=null?t:window:Dt(e)&&(r=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?r:window}function Io(e){let t=e.activeElement;for(;t!=null&&t.shadowRoot;){const n=t.shadowRoot.activeElement;if(!n||n===t)break;t=n}return t}function TR(e){if(TE(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Fi(e)&&e.host||yR(e);return Fi(t)?t.host:t}function xf(e){var n;let t;try{if(t=e.getRootNode({composed:!0}),Gu(t)||Fi(t))return t}catch(r){}return(n=e.ownerDocument)!=null?n:document}var _f=new WeakMap;function Ro(e){return _f.has(e)||_f.set(e,Oo(e).getComputedStyle(e)),_f.get(e)}var wf=new Set(["menu","listbox","dialog","grid","tree","region"]),bR=e=>wf.has(e),bE=e=>{var t;return((t=e.getAttribute("aria-controls"))==null?void 0:t.split(" "))||[]};function xE(e,t){const n=new Set,r=xf(e),o=a=>{const u=a.querySelectorAll("[aria-controls]");for(const c of u){if(c.getAttribute("aria-expanded")!=="true")continue;const d=bE(c);for(const h of d){if(!h||n.has(h))continue;n.add(h);const m=r.getElementById(h);if(m){const E=m.getAttribute("role"),T=m.getAttribute("aria-modal")==="true";if(E&&bR(E)&&!T&&(m===t||m.contains(t)||o(m)))return!0}}}return!1};return o(e)}function _E(e,t){const n=xf(e),r=new Set,o=a=>{const u=a.querySelectorAll("[aria-controls]");for(const c of u){if(c.getAttribute("aria-expanded")!=="true")continue;const d=bE(c);for(const h of d){if(!h||r.has(h))continue;r.add(h);const m=n.getElementById(h);if(m){const E=m.getAttribute("role"),T=m.getAttribute("aria-modal")==="true";E&&wf.has(E)&&!T&&(t(m),o(m))}}}};o(e)}function xR(e){const t=new Set;return _E(e,n=>{e.contains(n)||t.add(n)}),Array.from(t)}function _R(e){const t=e.getAttribute("role");return!!(t&&wf.has(t))}function wR(e){return e.hasAttribute("aria-controls")&&e.getAttribute("aria-expanded")==="true"}function SR(e){var t;return wR(e)?!0:!!((t=e.querySelector)!=null&&t.call(e,'[aria-controls][aria-expanded="true"]'))}function AR(e){if(!e.id)return!1;const t=xf(e),n=CSS.escape(e.id),r=`[aria-controls~="${n}"][aria-expanded="true"], [aria-controls="${n}"][aria-expanded="true"]`;return!!(t.querySelector(r)&&_R(e))}var Sf=()=>typeof document!="undefined";function vR(){var t;const e=navigator.userAgentData;return(t=e==null?void 0:e.platform)!=null?t:navigator.platform}var Af=e=>Sf()&&e.test(vR()),CR=e=>Sf()&&e.test(navigator.vendor),wE=()=>Sf()&&!!navigator.maxTouchPoints,kR=()=>Af(/^iPhone/i),NR=()=>Af(/^iPad/i)||vf()&&navigator.maxTouchPoints>1,Ku=()=>kR()||NR(),OR=()=>vf()||Ku(),vf=()=>Af(/^Mac/i),IR=()=>OR()&&CR(/apple/i);function RR(e){var t,n,r,o;return(o=(t=e.composedPath)==null?void 0:t.call(e))!=null?o:(r=(n=e.nativeEvent)==null?void 0:n.composedPath)==null?void 0:r.call(n)}function Gn(e){var n;const t=RR(e);return(n=t==null?void 0:t[0])!=null?n:e.target}var SE=e=>e.button===0,PR=e=>e.button===2||vf()&&e.ctrlKey&&e.button===0,LR=e=>"touches"in e&&e.touches.length>0,DR={Up:"ArrowUp",Down:"ArrowDown",Esc:"Escape"," ":"Space",",":"Comma",Left:"ArrowLeft",Right:"ArrowRight"},AE={ArrowLeft:"ArrowRight",ArrowRight:"ArrowLeft"};function MR(e,t={}){var u;const{dir:n="ltr",orientation:r="horizontal"}=t;let o=e.key;return o=(u=DR[o])!=null?u:o,n==="rtl"&&r==="horizontal"&&o in AE&&(o=AE[o]),o}function vE(e,t="client"){const n=LR(e)?e.touches[0]||e.changedTouches[0]:e;return{x:n[`${t}X`],y:n[`${t}Y`]}}var Mt=(e,t,n,r)=>{const o=typeof e=="function"?e():e;return o==null||o.addEventListener(t,n,r),()=>{o==null||o.removeEventListener(t,n,r)}},CE=e=>Dt(e)&&e.tagName==="IFRAME",FR=/^(audio|video|details)$/;function kE(e){const t=e.getAttribute("tabindex");return t?parseInt(t,10):NaN}var BR=e=>!Number.isNaN(kE(e)),UR=e=>kE(e)<0;function HR(e,t){if(!t)return null;if(t===!0)return e.shadowRoot||null;const n=t(e);return(n===!0?e.shadowRoot:n)||null}function NE(e,t,n){const r=[...e],o=[...e],a=new Set,u=new Map;e.forEach((d,h)=>u.set(d,h));let c=0;for(;c<o.length;){const d=o[c++];if(!d||a.has(d))continue;a.add(d);const h=HR(d,t);if(h){const m=Array.from(h.querySelectorAll(Qu)).filter(n),E=u.get(d);if(E!==void 0){const T=E+1;r.splice(T,0,...m),m.forEach((b,_)=>{u.set(b,T+_)});for(let b=T+m.length;b<r.length;b++)u.set(r[b],b)}else{const T=r.length;r.push(...m),m.forEach((b,_)=>{u.set(b,T+_)})}o.push(...m)}}return r}var Qu="input:not([type='hidden']):not([disabled]), select:not([disabled]), textarea:not([disabled]), a[href], button:not([disabled]), [tabindex], iframe, object, embed, area[href], audio[controls], video[controls], [contenteditable]:not([contenteditable='false']), details > summary:first-of-type",OE=(e,t={})=>{if(!e)return[];const{includeContainer:n=!1,getShadowRoot:r}=t,o=Array.from(e.querySelectorAll(Qu));(n==!0||n=="if-empty"&&o.length===0)&&Dt(e)&&dr(e)&&o.unshift(e);const u=[];for(const c of o)if(dr(c)){if(CE(c)&&c.contentDocument){const d=c.contentDocument.body;u.push(...OE(d,{getShadowRoot:r}));continue}u.push(c)}return r?NE(u,r,dr):u};function dr(e){return!Dt(e)||e.closest("[inert]")?!1:e.matches(Qu)&&mR(e)}function Po(e,t={}){if(!e)return[];const{includeContainer:n,getShadowRoot:r}=t,o=Array.from(e.querySelectorAll(Qu));n&&Bi(e)&&o.unshift(e);const a=[];for(const u of o)if(Bi(u)){if(CE(u)&&u.contentDocument){const c=u.contentDocument.body;a.push(...Po(c,{getShadowRoot:r}));continue}a.push(u)}if(r){const u=NE(a,r,Bi);return!u.length&&n?o:u}return!a.length&&n?o:a}function Bi(e){return Dt(e)&&e.tabIndex>0?!0:dr(e)&&!UR(e)}function zR(e,t={}){const n=Po(e,t),r=n[0]||null,o=n[n.length-1]||null;return[r,o]}function jR(e,t={}){const{current:n,getShadowRoot:r}=t,o=Po(e,{getShadowRoot:r}),a=(e==null?void 0:e.ownerDocument)||document,u=n!=null?n:Io(a);if(!u)return null;const c=o.indexOf(u);return o[c+1]||null}function na(e){return e.tabIndex<0&&(FR.test(e.localName)||ER(e))&&!BR(e)?0:e.tabIndex}function IE(e){const{root:t,getInitialEl:n,filter:r,enabled:o=!0}=e;if(!o)return;let a=null;if(a||(a=typeof n=="function"?n():n),a||(a=t==null?void 0:t.querySelector("[data-autofocus],[autofocus]")),!a){const u=Po(t);a=r?u.filter(r)[0]:u[0]}return a||t||void 0}var $R=class Px{constructor(){bf(this,"id",null),bf(this,"fn_cleanup"),bf(this,"cleanup",()=>{this.cancel()})}static create(){return new Px}request(t){this.cancel(),this.id=globalThis.requestAnimationFrame(()=>{this.id=null,this.fn_cleanup=t==null?void 0:t()})}cancel(){var t;this.id!==null&&(globalThis.cancelAnimationFrame(this.id),this.id=null),(t=this.fn_cleanup)==null||t.call(this),this.fn_cleanup=void 0}isActive(){return this.id!==null}};function kt(e){const t=$R.create();return t.request(e),t.cleanup}function RE(e){const t=new Set;function n(r){const o=globalThis.requestAnimationFrame(r);t.add(()=>globalThis.cancelAnimationFrame(o))}return n(()=>n(e)),function(){t.forEach(o=>o())}}function Cf(e){const t=TR(e);return fR(t)?cr(t).body:Dt(t)&&WR(t)?t:Cf(t)}var VR=/auto|scroll|overlay|hidden|clip/,YR=new Set(["inline","contents"]);function WR(e){const t=Oo(e),{overflow:n,overflowX:r,overflowY:o,display:a}=t.getComputedStyle(e);return VR.test(n+o+r)&&!YR.has(a)}var Lo="default",kf="",Xu=new WeakMap;function qR(e={}){const{target:t,doc:n}=e,r=n!=null?n:document,o=r.documentElement;return Ku()?(Lo==="default"&&(kf=o.style.webkitUserSelect,o.style.webkitUserSelect="none"),Lo="disabled"):t&&(Xu.set(t,t.style.userSelect),t.style.userSelect="none"),()=>GR({target:t,doc:r})}function GR(e={}){const{target:t,doc:n}=e,o=(n!=null?n:document).documentElement;if(Ku()){if(Lo!=="disabled")return;Lo="restoring",setTimeout(()=>{RE(()=>{Lo==="restoring"&&(o.style.webkitUserSelect==="none"&&(o.style.webkitUserSelect=kf||""),kf="",Lo="default")})},300)}else if(t&&Xu.has(t)){const a=Xu.get(t);t.style.userSelect==="none"&&(t.style.userSelect=a!=null?a:""),t.getAttribute("style")===""&&t.removeAttribute("style"),Xu.delete(t)}}function KR(e={}){const u=e,{defer:t,target:n}=u,r=on(u,["defer","target"]),o=t?kt:c=>c(),a=[];return a.push(o(()=>{const c=typeof n=="function"?n():n;a.push(qR(ne(U({},r),{target:c})))})),()=>{a.forEach(c=>c==null?void 0:c())}}function QR(e,t){const{onPointerMove:n,onPointerUp:r}=t,o=c=>{const d=vE(c),h=Math.sqrt(Ja(d.x,2)+Ja(d.y,2)),m=c.pointerType==="touch"?10:5;if(!(h<m)){if(c.pointerType==="mouse"&&c.button===0){a(c);return}n({point:d,event:c})}},a=c=>{const d=vE(c);r({point:d,event:c})},u=[Mt(e,"pointermove",o,!1),Mt(e,"pointerup",a,!1),Mt(e,"pointercancel",a,!1),Mt(e,"contextmenu",a,!1),KR({doc:e})];return()=>{u.forEach(c=>c())}}function XR(e,t={}){const{triggerElement:n,onFocus:r,onFocusEnter:o,getShadowRoot:a}=t,u=(e==null?void 0:e.ownerDocument)||document,c=u.body;function d(h){if(h.key!=="Tab")return;let m=null;const[E,T]=zR(e,{includeContainer:!0,getShadowRoot:a}),b=jR(c,{current:n,getShadowRoot:a}),_=!E&&!T;h.shiftKey&&ta(b)?(o==null||o(),m=T):h.shiftKey&&(ta(E)||_)?m=n:!h.shiftKey&&ta(n)?(o==null||o(),m=E):!h.shiftKey&&(ta(T)||_)&&(m=b),m&&(h.preventDefault(),typeof r=="function"?r(m):m.focus())}return Mt(u,"keydown",d,!0)}function JR(e,t){const c=t,{defer:n,triggerElement:r}=c,o=on(c,["defer","triggerElement"]),a=n?kt:d=>d(),u=[];return u.push(a(()=>{const d=typeof e=="function"?e():e,h=typeof r=="function"?r():r;u.push(XR(d,U({triggerElement:h},o)))})),()=>{u.forEach(d=>d==null?void 0:d())}}function ZR(e,t){var n;return Array.from((n=e==null?void 0:e.querySelectorAll(t))!=null?n:[])}function Ju(e,t){if(!e)return EE;const n=Object.keys(t).reduce((r,o)=>(r[o]=e.style.getPropertyValue(o),r),{});return Object.assign(e.style,t),()=>{Object.assign(e.style,n),e.style.length===0&&e.removeAttribute("style")}}function eP(e,t,n){if(!e)return EE;const r=e.style.getPropertyValue(t);return e.style.setProperty(t,n),()=>{e.style.setProperty(t,r),e.style.length===0&&e.removeAttribute("style")}}function tP(e,t,n){const{signal:r}=t;return[new Promise((u,c)=>{const d=setTimeout(()=>{c(new Error(`Timeout of ${n}ms exceeded`))},n);r.addEventListener("abort",()=>{clearTimeout(d),c(new Error("Promise aborted"))}),e.then(h=>{r.aborted||(clearTimeout(d),u(h))}).catch(h=>{r.aborted||(clearTimeout(d),c(h))})}),()=>t.abort()]}function nP(e,t){const{timeout:n,rootNode:r}=t,o=Oo(r),a=cr(r),u=new o.AbortController;return tP(new Promise(c=>{const d=e();if(d){c(d);return}const h=new o.MutationObserver(()=>{const m=e();m&&m.isConnected&&(h.disconnect(),c(m))});h.observe(a.body,{childList:!0,subtree:!0})}),u,n)}var rP=(...e)=>e.map(t=>{var n;return(n=t==null?void 0:t.trim)==null?void 0:n.call(t)}).filter(Boolean).join(" "),iP=/((?:--)?(?:\w+-?)+)\s*:\s*([^;]*)/g,PE=e=>{const t={};let n;for(;n=iP.exec(e);)t[n[1]]=n[2];return t},oP=(e,t)=>{if(Wu(e)){if(Wu(t))return`${e};${t}`;e=PE(e)}else Wu(t)&&(t=PE(t));return Object.assign({},e!=null?e:{},t!=null?t:{})};function Nt(...e){let t={};for(let n of e){if(!n)continue;for(let o in t){if(o.startsWith("on")&&typeof t[o]=="function"&&typeof n[o]=="function"){t[o]=Ef(n[o],t[o]);continue}if(o==="className"||o==="class"){t[o]=rP(t[o],n[o]);continue}if(o==="style"){t[o]=oP(t[o],n[o]);continue}t[o]=n[o]!==void 0?n[o]:t[o]}for(let o in n)t[o]===void 0&&(t[o]=n[o]);const r=Object.getOwnPropertySymbols(n);for(let o of r)t[o]=n[o]}return t}function bF(e){return e}var Do=(e=>(e.NotStarted="Not Started",e.Started="Started",e.Stopped="Stopped",e))(Do||{}),Nf="__init__";function sP(e){const t=()=>{var u,c;return(c=(u=e.getRootNode)==null?void 0:u.call(e))!=null?c:document},n=()=>cr(t()),r=()=>{var u;return(u=n().defaultView)!=null?u:window},o=()=>Io(t()),a=u=>t().getElementById(u);return ne(U({},e),{getRootNode:t,getDoc:n,getWin:r,getActiveElement:o,isActiveElement:ta,getById:a})}function aP(e){return new Proxy({},{get(t,n){return n==="style"?r=>e({style:r}).style:e}})}var Mo=()=>e=>Array.from(new Set(e)),LE=typeof globalThis.document!="undefined"?Z.useLayoutEffect:Z.useEffect;function Zu(e){var E,T;const t=(E=e().value)!=null?E:e().defaultValue,n=(T=e().isEqual)!=null?T:Object.is,[r]=Z.useState(t),[o,a]=Z.useState(r),u=e().value!==void 0,c=Z.useRef(o);c.current=u?e().value:o;const d=Z.useRef(c.current);LE(()=>{d.current=c.current},[o,e().value]);const h=b=>{var A,C;const _=d.current,w=Co(b)?b(_):b;e().debug&&console.log(`[bindable > ${e().debug}] setValue`,{next:w,prev:_}),u||a(w),n(w,_)||(C=(A=e()).onChange)==null||C.call(A,w,_)};function m(){return u?e().value:o}return{initial:r,ref:c,get:m,set(b){(e().sync?ks.flushSync:XI)(()=>h(b))},invoke(b,_){var w,A;(A=(w=e()).onChange)==null||A.call(w,b,_)},hash(b){var _,w,A;return(A=(w=(_=e()).hash)==null?void 0:w.call(_,b))!=null?A:String(b)}}}Zu.cleanup=e=>{Z.useEffect(()=>e,[])},Zu.ref=e=>{const t=Z.useRef(e);return{get:()=>t.current,set:n=>{t.current=n}}};function uP(e){const t=Z.useRef(e);return{get(n){return t.current[n]},set(n,r){t.current[n]=r}}}var lP=(e,t)=>{const n=Z.useRef(!1),r=Z.useRef(!1);Z.useEffect(()=>{if(n.current&&r.current)return t();r.current=!0},[...(e!=null?e:[]).map(o=>typeof o=="function"?o():o)]),Z.useEffect(()=>(n.current=!0,()=>{n.current=!1}),[])};function el(e,t={}){var ae,he,ge,ue,Te,Ne;const n=Z.useMemo(()=>{const{id:fe,ids:K,getRootNode:te}=t;return sP({id:fe,ids:K,getRootNode:te})},[t]),r=(...fe)=>{e.debug&&console.log(...fe)},o=(he=(ae=e.props)==null?void 0:ae.call(e,{props:yf(t),scope:n}))!=null?he:t,a=cP(o),u=(ge=e.context)==null?void 0:ge.call(e,{prop:a,bindable:Zu,scope:n,flush:ME,getContext(){return d},getComputed(){return z},getRefs(){return w},getEvent(){return b()}}),c=DE(u),d={get(fe){var K;return(K=c.current)==null?void 0:K[fe].ref.current},set(fe,K){var te;(te=c.current)==null||te[fe].set(K)},initial(fe){var K;return(K=c.current)==null?void 0:K[fe].initial},hash(fe){var te,S;const K=(te=c.current)==null?void 0:te[fe].get();return(S=c.current)==null?void 0:S[fe].hash(K)}},h=Z.useRef(new Map),m=Z.useRef(null),E=Z.useRef(null),T=Z.useRef({type:""}),b=()=>ne(U({},T.current),{current(){return T.current},previous(){return E.current}}),_=()=>ne(U({},D),{matches(...fe){return fe.includes(D.ref.current)},hasTag(fe){var K,te;return!!((te=(K=e.states[D.ref.current])==null?void 0:K.tags)!=null&&te.includes(fe))}}),w=uP((Te=(ue=e.refs)==null?void 0:ue.call(e,{prop:a,context:d}))!=null?Te:{}),A=()=>({state:_(),context:d,event:b(),prop:a,send:j,action:C,guard:I,track:lP,refs:w,computed:z,flush:ME,scope:n,choose:F}),C=fe=>{const K=Co(fe)?fe(A()):fe;if(!K)return;const te=K.map(S=>{var X,k;const M=(k=(X=e.implementations)==null?void 0:X.actions)==null?void 0:k[S];return M||Tf(`[zag-js] No implementation found for action "${JSON.stringify(S)}"`),M});for(const S of te)S==null||S(A())},I=fe=>{var K,te;return Co(fe)?fe(A()):(te=(K=e.implementations)==null?void 0:K.guards)==null?void 0:te[fe](A())},R=fe=>{const K=Co(fe)?fe(A()):fe;if(!K)return;const te=K.map(M=>{var k,xe;const X=(xe=(k=e.implementations)==null?void 0:k.effects)==null?void 0:xe[M];return X||Tf(`[zag-js] No implementation found for effect "${JSON.stringify(M)}"`),X}),S=[];for(const M of te){const X=M==null?void 0:M(A());X&&S.push(X)}return()=>S.forEach(M=>M==null?void 0:M())},F=fe=>MI(fe).find(K=>{let te=!K.guard;return Wu(K.guard)?te=!!I(K.guard):Co(K.guard)&&(te=K.guard(A())),te}),z=fe=>{iR(e.computed,()=>"[zag-js] No computed object found on machine");const K=e.computed[fe];return K({context:d,event:b(),prop:a,refs:w,scope:n,computed:z})},D=Zu(()=>({defaultValue:e.initialState({prop:a}),onChange(fe,K){var S,M,X,k;if(K){const xe=h.current.get(K);xe==null||xe(),h.current.delete(K)}K&&C((S=e.states[K])==null?void 0:S.exit),C((M=m.current)==null?void 0:M.actions);const te=R((X=e.states[fe])==null?void 0:X.effects);if(te&&h.current.set(fe,te),K===Nf){C(e.entry);const xe=R(e.effects);xe&&h.current.set(Nf,xe)}C((k=e.states[fe])==null?void 0:k.entry)}})),q=Z.useRef(void 0),ce=Z.useRef(Do.NotStarted);LE(()=>{queueMicrotask(()=>{var M;const te=ce.current===Do.Started;ce.current=Do.Started,r(te?"rehydrating...":"initializing...");const S=(M=q.current)!=null?M:D.initial;D.invoke(S,te?D.get():Nf)});const fe=h.current,K=D.ref.current;return()=>{r("unmounting..."),q.current=K,ce.current=Do.Stopped,fe.forEach(te=>te==null?void 0:te()),h.current=new Map,m.current=null,queueMicrotask(()=>{C(e.exit)})}},[]);const be=()=>"ref"in D?D.ref.current:D.get(),j=fe=>{queueMicrotask(()=>{var k,xe,Pe,Oe,He;if(ce.current!==Do.Started)return;E.current=T.current,T.current=fe;let K=be();const te=(Pe=(k=e.states[K].on)==null?void 0:k[fe.type])!=null?Pe:(xe=e.on)==null?void 0:xe[fe.type],S=F(te);if(!S)return;m.current=S;const M=(Oe=S.target)!=null?Oe:K;r("transition",fe.type,S.target||K,`(${S.actions})`);const X=M!==K;X?ks.flushSync(()=>D.set(M)):S.reenter&&!X?D.invoke(K,K):C((He=S.actions)!=null?He:[])})};return(Ne=e.watch)==null||Ne.call(e,A()),{state:_(),send:j,context:d,prop:a,scope:n,refs:w,computed:z,event:b(),getStatus:()=>ce.current}}function DE(e){const t=Z.useRef(e);return t.current=e,t}function cP(e){const t=DE(e);return function(r){return t.current[r]}}function ME(e){queueMicrotask(()=>{ks.flushSync(()=>e())})}var Of=aP(e=>e);function tl(...e){return t=>{const n=[];for(const r of e)if(typeof r=="function"){const o=r(t);typeof o=="function"&&n.push(o)}else r&&(r.current=t);if(n.length)return()=>{for(const r of n)r()}}}function dP(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}const If=e=>{const t=Z.memo(Z.forwardRef((n,r)=>{const h=n,{asChild:o,children:a}=h,u=on(h,["asChild","children"]);if(!o)return Z.createElement(e,ne(U({},u),{ref:r}),a);if(!Z.isValidElement(a))return null;const c=Z.Children.only(a),d=dP(c);return Z.cloneElement(c,ne(U({},Nt(u,c.props)),{ref:r?tl(r,d):d}))}));return t.displayName=e.displayName||e.name,t},Kt=(()=>{const e=new Map;return new Proxy(If,{apply(t,n,r){return If(r[0])},get(t,n){const r=n;return e.has(r)||e.set(r,If(r)),e.get(r)}})})();function fP(e,t){return`${e} returned \`undefined\`. Seems you forgot to wrap component within ${t}`}function Ui(e={}){const{name:t,strict:n=!0,hookName:r="useContext",providerName:o="Provider",errorMessage:a,defaultValue:u}=e,c=Z.createContext(u);c.displayName=t;function d(){var m;const h=Z.useContext(c);if(!h&&n){const E=new Error(a!=null?a:fP(r,o));throw E.name="ContextError",(m=Error.captureStackTrace)==null||m.call(Error,E,d),E}return h}return[c.Provider,d,c]}const[hP,Rf]=Ui({name:"PopoverContext",hookName:"usePopoverContext",providerName:"<PopoverProvider />"}),[FE,ra]=Ui({name:"PresenceContext",hookName:"usePresenceContext",providerName:"<PresenceProvider />"}),BE=Z.forwardRef((e,t)=>{const n=Rf(),r=ra(),o=Nt(n.getContentProps(),r.getPresenceProps(),e);return r.unmounted?null:P.jsx(Kt.div,ne(U({},o),{ref:tl(r.ref,t)}))});BE.displayName="PopoverContent";const UE=Z.forwardRef((e,t)=>{const n=Rf(),r=ra(),o=Nt(n.getPositionerProps(),e);return r.unmounted?null:P.jsx(Kt.div,ne(U({},o),{ref:t}))});UE.displayName="PopoverPositioner";const ia=()=>(e,t)=>t.reduce((n,r)=>{const[o,a]=n,u=r;return a[u]!==void 0&&(o[u]=a[u]),delete a[u],[o,a]},[{},U({},e)]),HE=e=>ia()(e,["immediate","lazyMount","onExitComplete","present","skipAnimationOnMount","unmountOnExit"]);function pP(e,t){const{state:n,send:r,context:o}=e,a=n.matches("mounted","unmountSuspended");return{skip:!o.get("initial"),present:a,setNode(u){u&&r({type:"NODE.SET",node:u})},unmount(){r({type:"UNMOUNT"})}}}var mP={props({props:e}){return ne(U({},e),{present:!!e.present})},initialState({prop:e}){return e("present")?"mounted":"unmounted"},refs(){return{node:null,styles:null}},context({bindable:e}){return{unmountAnimationName:e(()=>({defaultValue:null})),prevAnimationName:e(()=>({defaultValue:null})),present:e(()=>({defaultValue:!1})),initial:e(()=>({sync:!0,defaultValue:!1}))}},exit:["clearInitial","cleanupNode"],watch({track:e,prop:t,send:n}){e([()=>t("present")],()=>{n({type:"PRESENCE.CHANGED"})})},on:{"NODE.SET":{actions:["setupNode"]},"PRESENCE.CHANGED":{actions:["setInitial","syncPresence"]}},states:{mounted:{on:{UNMOUNT:{target:"unmounted",actions:["clearPrevAnimationName","invokeOnExitComplete"]},"UNMOUNT.SUSPEND":{target:"unmountSuspended"}}},unmountSuspended:{effects:["trackAnimationEvents"],on:{MOUNT:{target:"mounted",actions:["setPrevAnimationName"]},UNMOUNT:{target:"unmounted",actions:["clearPrevAnimationName","invokeOnExitComplete"]}}},unmounted:{on:{MOUNT:{target:"mounted",actions:["setPrevAnimationName"]}}}},implementations:{actions:{setInitial:({context:e})=>{e.get("initial")||queueMicrotask(()=>{e.set("initial",!0)})},clearInitial:({context:e})=>{e.set("initial",!1)},invokeOnExitComplete:({prop:e})=>{var t;(t=e("onExitComplete"))==null||t()},setupNode:({refs:e,event:t})=>{e.get("node")!==t.node&&(e.set("node",t.node),e.set("styles",Ro(t.node)))},cleanupNode:({refs:e})=>{e.set("node",null),e.set("styles",null)},syncPresence:({context:e,refs:t,send:n,prop:r})=>{const o=r("present");if(o)return n({type:"MOUNT",src:"presence.changed"});const a=t.get("node");if(!o&&(a==null?void 0:a.ownerDocument.visibilityState)==="hidden")return n({type:"UNMOUNT",src:"visibilitychange"});kt(()=>{var c,d;const u=nl(t.get("styles"));e.set("unmountAnimationName",u),u==="none"||u===e.get("prevAnimationName")||((c=t.get("styles"))==null?void 0:c.display)==="none"||((d=t.get("styles"))==null?void 0:d.animationDuration)==="0s"?n({type:"UNMOUNT",src:"presence.changed"}):n({type:"UNMOUNT.SUSPEND"})})},setPrevAnimationName:({context:e,refs:t})=>{kt(()=>{e.set("prevAnimationName",nl(t.get("styles")))})},clearPrevAnimationName:({context:e})=>{e.set("prevAnimationName",null)}},effects:{trackAnimationEvents:({context:e,refs:t,send:n,prop:r})=>{const o=t.get("node");if(!o)return;const a=d=>{var m,E,T;((T=(E=(m=d.composedPath)==null?void 0:m.call(d))==null?void 0:E[0])!=null?T:d.target)===o&&e.set("prevAnimationName",nl(t.get("styles")))},u=d=>{const h=nl(t.get("styles"));Gn(d)===o&&h===e.get("unmountAnimationName")&&!r("present")&&n({type:"UNMOUNT",src:"animationend"})};o.addEventListener("animationstart",a),o.addEventListener("animationcancel",u),o.addEventListener("animationend",u);const c=Ju(o,{animationFillMode:"forwards"});return()=>{o.removeEventListener("animationstart",a),o.removeEventListener("animationcancel",u),o.removeEventListener("animationend",u),RE(()=>c())}}}}};function nl(e){return(e==null?void 0:e.animationName)||"none"}Mo()(["onExitComplete","present","immediate"]);function gP(e,t={}){const{sync:n=!1}=t,r=EP(e);return Z.useCallback((...o)=>{var a;return n?queueMicrotask(()=>{var u;return(u=r.current)==null?void 0:u.call(r,...o)}):(a=r.current)==null?void 0:a.call(r,...o)},[n,r])}function EP(e){const t=Z.useRef(e);return t.current=e,t}const Pf=(e={})=>{const T=e,{lazyMount:t,unmountOnExit:n,present:r,skipAnimationOnMount:o=!1}=T,a=on(T,["lazyMount","unmountOnExit","present","skipAnimationOnMount"]),u=Z.useRef(!1),c=ne(U({},a),{present:r,onExitComplete:gP(e.onExitComplete)}),d=el(mP,c),h=pP(d);h.present&&(u.current=!0);const m=!h.present&&!u.current&&t||n&&!h.present&&u.current,E=()=>({"data-state":h.skip&&o?void 0:r?"open":"closed",hidden:!h.present});return{ref:h.setNode,getPresenceProps:E,present:h.present,unmounted:m}};var Hi=(e,t=[])=>({parts:(...n)=>{if(yP(t))return Hi(e,n);throw new Error("createAnatomy().parts(...) should only be called once. Did you mean to use .extendWith(...) ?")},extendWith:(...n)=>Hi(e,[...t,...n]),omit:(...n)=>Hi(e,t.filter(r=>!n.includes(r))),rename:n=>Hi(n,t),keys:()=>t,build:()=>[...new Set(t)].reduce((n,r)=>Object.assign(n,{[r]:{selector:[`&[data-scope="${Fo(e)}"][data-part="${Fo(r)}"]`,`& [data-scope="${Fo(e)}"][data-part="${Fo(r)}"]`].join(", "),attrs:{"data-scope":Fo(e),"data-part":Fo(r)}}}),{})}),Fo=e=>e.replace(/([A-Z])([A-Z])/g,"$1-$2").replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase(),yP=e=>e.length===0;const TP=["top","right","bottom","left"],Kr=Math.min,wn=Math.max,rl=Math.round,il=Math.floor,fr=e=>({x:e,y:e}),bP={left:"right",right:"left",bottom:"top",top:"bottom"},xP={start:"end",end:"start"};function Lf(e,t,n){return wn(e,Kr(t,n))}function vr(e,t){return typeof e=="function"?e(t):e}function Cr(e){return e.split("-")[0]}function Bo(e){return e.split("-")[1]}function Df(e){return e==="x"?"y":"x"}function Mf(e){return e==="y"?"height":"width"}const _P=new Set(["top","bottom"]);function hr(e){return _P.has(Cr(e))?"y":"x"}function Ff(e){return Df(hr(e))}function wP(e,t,n){n===void 0&&(n=!1);const r=Bo(e),o=Ff(e),a=Mf(o);let u=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(u=ol(u)),[u,ol(u)]}function SP(e){const t=ol(e);return[Bf(e),t,Bf(t)]}function Bf(e){return e.replace(/start|end/g,t=>xP[t])}const zE=["left","right"],jE=["right","left"],AP=["top","bottom"],vP=["bottom","top"];function CP(e,t,n){switch(e){case"top":case"bottom":return n?t?jE:zE:t?zE:jE;case"left":case"right":return t?AP:vP;default:return[]}}function kP(e,t,n,r){const o=Bo(e);let a=CP(Cr(e),n==="start",r);return o&&(a=a.map(u=>u+"-"+o),t&&(a=a.concat(a.map(Bf)))),a}function ol(e){return e.replace(/left|right|bottom|top/g,t=>bP[t])}function NP(e){return U({top:0,right:0,bottom:0,left:0},e)}function $E(e){return typeof e!="number"?NP(e):{top:e,right:e,bottom:e,left:e}}function sl(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function VE(e,t,n){let{reference:r,floating:o}=e;const a=hr(t),u=Ff(t),c=Mf(u),d=Cr(t),h=a==="y",m=r.x+r.width/2-o.width/2,E=r.y+r.height/2-o.height/2,T=r[c]/2-o[c]/2;let b;switch(d){case"top":b={x:m,y:r.y-o.height};break;case"bottom":b={x:m,y:r.y+r.height};break;case"right":b={x:r.x+r.width,y:E};break;case"left":b={x:r.x-o.width,y:E};break;default:b={x:r.x,y:r.y}}switch(Bo(t)){case"start":b[u]-=T*(n&&h?-1:1);break;case"end":b[u]+=T*(n&&h?-1:1);break}return b}const OP=(e,t,n)=>et(null,null,function*(){const{placement:r="bottom",strategy:o="absolute",middleware:a=[],platform:u}=n,c=a.filter(Boolean),d=yield u.isRTL==null?void 0:u.isRTL(t);let h=yield u.getElementRects({reference:e,floating:t,strategy:o}),{x:m,y:E}=VE(h,r,d),T=r,b={},_=0;for(let w=0;w<c.length;w++){const{name:A,fn:C}=c[w],{x:I,y:R,data:F,reset:z}=yield C({x:m,y:E,initialPlacement:r,placement:T,strategy:o,middlewareData:b,rects:h,platform:u,elements:{reference:e,floating:t}});m=I!=null?I:m,E=R!=null?R:E,b=ne(U({},b),{[A]:U(U({},b[A]),F)}),z&&_<=50&&(_++,typeof z=="object"&&(z.placement&&(T=z.placement),z.rects&&(h=z.rects===!0?yield u.getElementRects({reference:e,floating:t,strategy:o}):z.rects),{x:m,y:E}=VE(h,T,d)),w=-1)}return{x:m,y:E,placement:T,strategy:o,middlewareData:b}});function oa(e,t){return et(this,null,function*(){var n;t===void 0&&(t={});const{x:r,y:o,platform:a,rects:u,elements:c,strategy:d}=e,{boundary:h="clippingAncestors",rootBoundary:m="viewport",elementContext:E="floating",altBoundary:T=!1,padding:b=0}=vr(t,e),_=$E(b),A=c[T?E==="floating"?"reference":"floating":E],C=sl(yield a.getClippingRect({element:(n=yield a.isElement==null?void 0:a.isElement(A))==null||n?A:A.contextElement||(yield a.getDocumentElement==null?void 0:a.getDocumentElement(c.floating)),boundary:h,rootBoundary:m,strategy:d})),I=E==="floating"?{x:r,y:o,width:u.floating.width,height:u.floating.height}:u.reference,R=yield a.getOffsetParent==null?void 0:a.getOffsetParent(c.floating),F=(yield a.isElement==null?void 0:a.isElement(R))?(yield a.getScale==null?void 0:a.getScale(R))||{x:1,y:1}:{x:1,y:1},z=sl(a.convertOffsetParentRelativeRectToViewportRelativeRect?yield a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:I,offsetParent:R,strategy:d}):I);return{top:(C.top-z.top+_.top)/F.y,bottom:(z.bottom-C.bottom+_.bottom)/F.y,left:(C.left-z.left+_.left)/F.x,right:(z.right-C.right+_.right)/F.x}})}const IP=e=>({name:"arrow",options:e,fn(n){return et(this,null,function*(){const{x:r,y:o,placement:a,rects:u,platform:c,elements:d,middlewareData:h}=n,{element:m,padding:E=0}=vr(e,n)||{};if(m==null)return{};const T=$E(E),b={x:r,y:o},_=Ff(a),w=Mf(_),A=yield c.getDimensions(m),C=_==="y",I=C?"top":"left",R=C?"bottom":"right",F=C?"clientHeight":"clientWidth",z=u.reference[w]+u.reference[_]-b[_]-u.floating[w],D=b[_]-u.reference[_],q=yield c.getOffsetParent==null?void 0:c.getOffsetParent(m);let ce=q?q[F]:0;(!ce||!(yield c.isElement==null?void 0:c.isElement(q)))&&(ce=d.floating[F]||u.floating[w]);const be=z/2-D/2,j=ce/2-A[w]/2-1,ae=Kr(T[I],j),he=Kr(T[R],j),ge=ae,ue=ce-A[w]-he,Te=ce/2-A[w]/2+be,Ne=Lf(ge,Te,ue),fe=!h.arrow&&Bo(a)!=null&&Te!==Ne&&u.reference[w]/2-(Te<ge?ae:he)-A[w]/2<0,K=fe?Te<ge?Te-ge:Te-ue:0;return{[_]:b[_]+K,data:U({[_]:Ne,centerOffset:Te-Ne-K},fe&&{alignmentOffset:K}),reset:fe}})}}),RP=function(e){return e===void 0&&(e={}),{name:"flip",options:e,fn(n){return et(this,null,function*(){var r,o;const{placement:a,middlewareData:u,rects:c,initialPlacement:d,platform:h,elements:m}=n,Te=vr(e,n),{mainAxis:E=!0,crossAxis:T=!0,fallbackPlacements:b,fallbackStrategy:_="bestFit",fallbackAxisSideDirection:w="none",flipAlignment:A=!0}=Te,C=on(Te,["mainAxis","crossAxis","fallbackPlacements","fallbackStrategy","fallbackAxisSideDirection","flipAlignment"]);if((r=u.arrow)!=null&&r.alignmentOffset)return{};const I=Cr(a),R=hr(d),F=Cr(d)===d,z=yield h.isRTL==null?void 0:h.isRTL(m.floating),D=b||(F||!A?[ol(d)]:SP(d)),q=w!=="none";!b&&q&&D.push(...kP(d,A,w,z));const ce=[d,...D],be=yield oa(n,C),j=[];let ae=((o=u.flip)==null?void 0:o.overflows)||[];if(E&&j.push(be[I]),T){const Ne=wP(a,c,z);j.push(be[Ne[0]],be[Ne[1]])}if(ae=[...ae,{placement:a,overflows:j}],!j.every(Ne=>Ne<=0)){var he,ge;const Ne=(((he=u.flip)==null?void 0:he.index)||0)+1,fe=ce[Ne];if(fe&&(!(T==="alignment"?R!==hr(fe):!1)||ae.every(S=>hr(S.placement)===R?S.overflows[0]>0:!0)))return{data:{index:Ne,overflows:ae},reset:{placement:fe}};let K=(ge=ae.filter(te=>te.overflows[0]<=0).sort((te,S)=>te.overflows[1]-S.overflows[1])[0])==null?void 0:ge.placement;if(!K)switch(_){case"bestFit":{var ue;const te=(ue=ae.filter(S=>{if(q){const M=hr(S.placement);return M===R||M==="y"}return!0}).map(S=>[S.placement,S.overflows.filter(M=>M>0).reduce((M,X)=>M+X,0)]).sort((S,M)=>S[1]-M[1])[0])==null?void 0:ue[0];te&&(K=te);break}case"initialPlacement":K=d;break}if(a!==K)return{reset:{placement:K}}}return{}})}}};function YE(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function WE(e){return TP.some(t=>e[t]>=0)}const PP=function(e){return e===void 0&&(e={}),{name:"hide",options:e,fn(n){return et(this,null,function*(){const{rects:r}=n,u=vr(e,n),{strategy:o="referenceHidden"}=u,a=on(u,["strategy"]);switch(o){case"referenceHidden":{const c=yield oa(n,ne(U({},a),{elementContext:"reference"})),d=YE(c,r.reference);return{data:{referenceHiddenOffsets:d,referenceHidden:WE(d)}}}case"escaped":{const c=yield oa(n,ne(U({},a),{altBoundary:!0})),d=YE(c,r.floating);return{data:{escapedOffsets:d,escaped:WE(d)}}}default:return{}}})}}},qE=new Set(["left","top"]);function LP(e,t){return et(this,null,function*(){const{placement:n,platform:r,elements:o}=e,a=yield r.isRTL==null?void 0:r.isRTL(o.floating),u=Cr(n),c=Bo(n),d=hr(n)==="y",h=qE.has(u)?-1:1,m=a&&d?-1:1,E=vr(t,e);let{mainAxis:T,crossAxis:b,alignmentAxis:_}=typeof E=="number"?{mainAxis:E,crossAxis:0,alignmentAxis:null}:{mainAxis:E.mainAxis||0,crossAxis:E.crossAxis||0,alignmentAxis:E.alignmentAxis};return c&&typeof _=="number"&&(b=c==="end"?_*-1:_),d?{x:b*m,y:T*h}:{x:T*h,y:b*m}})}const DP=function(e){return e===void 0&&(e=0),{name:"offset",options:e,fn(n){return et(this,null,function*(){var r,o;const{x:a,y:u,placement:c,middlewareData:d}=n,h=yield LP(n,e);return c===((r=d.offset)==null?void 0:r.placement)&&(o=d.arrow)!=null&&o.alignmentOffset?{}:{x:a+h.x,y:u+h.y,data:ne(U({},h),{placement:c})}})}}},MP=function(e){return e===void 0&&(e={}),{name:"shift",options:e,fn(n){return et(this,null,function*(){const{x:r,y:o,placement:a}=n,C=vr(e,n),{mainAxis:u=!0,crossAxis:c=!1,limiter:d={fn:I=>{let{x:R,y:F}=I;return{x:R,y:F}}}}=C,h=on(C,["mainAxis","crossAxis","limiter"]),m={x:r,y:o},E=yield oa(n,h),T=hr(Cr(a)),b=Df(T);let _=m[b],w=m[T];if(u){const I=b==="y"?"top":"left",R=b==="y"?"bottom":"right",F=_+E[I],z=_-E[R];_=Lf(F,_,z)}if(c){const I=T==="y"?"top":"left",R=T==="y"?"bottom":"right",F=w+E[I],z=w-E[R];w=Lf(F,w,z)}const A=d.fn(ne(U({},n),{[b]:_,[T]:w}));return ne(U({},A),{data:{x:A.x-r,y:A.y-o,enabled:{[b]:u,[T]:c}}})})}}},FP=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:a,middlewareData:u}=t,{offset:c=0,mainAxis:d=!0,crossAxis:h=!0}=vr(e,t),m={x:n,y:r},E=hr(o),T=Df(E);let b=m[T],_=m[E];const w=vr(c,t),A=typeof w=="number"?{mainAxis:w,crossAxis:0}:U({mainAxis:0,crossAxis:0},w);if(d){const R=T==="y"?"height":"width",F=a.reference[T]-a.floating[R]+A.mainAxis,z=a.reference[T]+a.reference[R]-A.mainAxis;b<F?b=F:b>z&&(b=z)}if(h){var C,I;const R=T==="y"?"width":"height",F=qE.has(Cr(o)),z=a.reference[E]-a.floating[R]+(F&&((C=u.offset)==null?void 0:C[E])||0)+(F?0:A.crossAxis),D=a.reference[E]+a.reference[R]+(F?0:((I=u.offset)==null?void 0:I[E])||0)-(F?A.crossAxis:0);_<z?_=z:_>D&&(_=D)}return{[T]:b,[E]:_}}}},BP=function(e){return e===void 0&&(e={}),{name:"size",options:e,fn(n){return et(this,null,function*(){var r,o;const{placement:a,rects:u,platform:c,elements:d}=n,ae=vr(e,n),{apply:h=()=>{}}=ae,m=on(ae,["apply"]),E=yield oa(n,m),T=Cr(a),b=Bo(a),_=hr(a)==="y",{width:w,height:A}=u.floating;let C,I;T==="top"||T==="bottom"?(C=T,I=b===((yield c.isRTL==null?void 0:c.isRTL(d.floating))?"start":"end")?"left":"right"):(I=T,C=b==="end"?"top":"bottom");const R=A-E.top-E.bottom,F=w-E.left-E.right,z=Kr(A-E[C],R),D=Kr(w-E[I],F),q=!n.middlewareData.shift;let ce=z,be=D;if((r=n.middlewareData.shift)!=null&&r.enabled.x&&(be=F),(o=n.middlewareData.shift)!=null&&o.enabled.y&&(ce=R),q&&!b){const he=wn(E.left,0),ge=wn(E.right,0),ue=wn(E.top,0),Te=wn(E.bottom,0);_?be=w-2*(he!==0||ge!==0?he+ge:wn(E.left,E.right)):ce=A-2*(ue!==0||Te!==0?ue+Te:wn(E.top,E.bottom))}yield h(ne(U({},n),{availableWidth:be,availableHeight:ce}));const j=yield c.getDimensions(d.floating);return w!==j.width||A!==j.height?{reset:{rects:!0}}:{}})}}};function al(){return typeof window!="undefined"}function Uo(e){return GE(e)?(e.nodeName||"").toLowerCase():"#document"}function Sn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function pr(e){var t;return(t=(GE(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function GE(e){return al()?e instanceof Node||e instanceof Sn(e).Node:!1}function Kn(e){return al()?e instanceof Element||e instanceof Sn(e).Element:!1}function mr(e){return al()?e instanceof HTMLElement||e instanceof Sn(e).HTMLElement:!1}function KE(e){return!al()||typeof ShadowRoot=="undefined"?!1:e instanceof ShadowRoot||e instanceof Sn(e).ShadowRoot}const UP=new Set(["inline","contents"]);function sa(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Qn(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!UP.has(o)}const HP=new Set(["table","td","th"]);function zP(e){return HP.has(Uo(e))}const jP=[":popover-open",":modal"];function ul(e){return jP.some(t=>{try{return e.matches(t)}catch(n){return!1}})}const $P=["transform","translate","scale","rotate","perspective"],VP=["transform","translate","scale","rotate","perspective","filter"],YP=["paint","layout","strict","content"];function Uf(e){const t=Hf(),n=Kn(e)?Qn(e):e;return $P.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||VP.some(r=>(n.willChange||"").includes(r))||YP.some(r=>(n.contain||"").includes(r))}function WP(e){let t=Qr(e);for(;mr(t)&&!Ho(t);){if(Uf(t))return t;if(ul(t))return null;t=Qr(t)}return null}function Hf(){return typeof CSS=="undefined"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const qP=new Set(["html","body","#document"]);function Ho(e){return qP.has(Uo(e))}function Qn(e){return Sn(e).getComputedStyle(e)}function ll(e){return Kn(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Qr(e){if(Uo(e)==="html")return e;const t=e.assignedSlot||e.parentNode||KE(e)&&e.host||pr(e);return KE(t)?t.host:t}function QE(e){const t=Qr(e);return Ho(t)?e.ownerDocument?e.ownerDocument.body:e.body:mr(t)&&sa(t)?t:QE(t)}function aa(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=QE(e),a=o===((r=e.ownerDocument)==null?void 0:r.body),u=Sn(o);if(a){const c=zf(u);return t.concat(u,u.visualViewport||[],sa(o)?o:[],c&&n?aa(c):[])}return t.concat(o,aa(o,[],n))}function zf(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function XE(e){const t=Qn(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=mr(e),a=o?e.offsetWidth:n,u=o?e.offsetHeight:r,c=rl(n)!==a||rl(r)!==u;return c&&(n=a,r=u),{width:n,height:r,$:c}}function jf(e){return Kn(e)?e:e.contextElement}function zo(e){const t=jf(e);if(!mr(t))return fr(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:a}=XE(t);let u=(a?rl(n.width):n.width)/r,c=(a?rl(n.height):n.height)/o;return(!u||!Number.isFinite(u))&&(u=1),(!c||!Number.isFinite(c))&&(c=1),{x:u,y:c}}const GP=fr(0);function JE(e){const t=Sn(e);return!Hf()||!t.visualViewport?GP:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function KP(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Sn(e)?!1:t}function zi(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),a=jf(e);let u=fr(1);t&&(r?Kn(r)&&(u=zo(r)):u=zo(e));const c=KP(a,n,r)?JE(a):fr(0);let d=(o.left+c.x)/u.x,h=(o.top+c.y)/u.y,m=o.width/u.x,E=o.height/u.y;if(a){const T=Sn(a),b=r&&Kn(r)?Sn(r):r;let _=T,w=zf(_);for(;w&&r&&b!==_;){const A=zo(w),C=w.getBoundingClientRect(),I=Qn(w),R=C.left+(w.clientLeft+parseFloat(I.paddingLeft))*A.x,F=C.top+(w.clientTop+parseFloat(I.paddingTop))*A.y;d*=A.x,h*=A.y,m*=A.x,E*=A.y,d+=R,h+=F,_=Sn(w),w=zf(_)}}return sl({width:m,height:E,x:d,y:h})}function cl(e,t){const n=ll(e).scrollLeft;return t?t.left+n:zi(pr(e)).left+n}function ZE(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-cl(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function QP(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const a=o==="fixed",u=pr(r),c=t?ul(t.floating):!1;if(r===u||c&&a)return n;let d={scrollLeft:0,scrollTop:0},h=fr(1);const m=fr(0),E=mr(r);if((E||!E&&!a)&&((Uo(r)!=="body"||sa(u))&&(d=ll(r)),mr(r))){const b=zi(r);h=zo(r),m.x=b.x+r.clientLeft,m.y=b.y+r.clientTop}const T=u&&!E&&!a?ZE(u,d):fr(0);return{width:n.width*h.x,height:n.height*h.y,x:n.x*h.x-d.scrollLeft*h.x+m.x+T.x,y:n.y*h.y-d.scrollTop*h.y+m.y+T.y}}function XP(e){return Array.from(e.getClientRects())}function JP(e){const t=pr(e),n=ll(e),r=e.ownerDocument.body,o=wn(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=wn(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let u=-n.scrollLeft+cl(e);const c=-n.scrollTop;return Qn(r).direction==="rtl"&&(u+=wn(t.clientWidth,r.clientWidth)-o),{width:o,height:a,x:u,y:c}}const ey=25;function ZP(e,t){const n=Sn(e),r=pr(e),o=n.visualViewport;let a=r.clientWidth,u=r.clientHeight,c=0,d=0;if(o){a=o.width,u=o.height;const m=Hf();(!m||m&&t==="fixed")&&(c=o.offsetLeft,d=o.offsetTop)}const h=cl(r);if(h<=0){const m=r.ownerDocument,E=m.body,T=getComputedStyle(E),b=m.compatMode==="CSS1Compat"&&parseFloat(T.marginLeft)+parseFloat(T.marginRight)||0,_=Math.abs(r.clientWidth-E.clientWidth-b);_<=ey&&(a-=_)}else h<=ey&&(a+=h);return{width:a,height:u,x:c,y:d}}const eL=new Set(["absolute","fixed"]);function tL(e,t){const n=zi(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,a=mr(e)?zo(e):fr(1),u=e.clientWidth*a.x,c=e.clientHeight*a.y,d=o*a.x,h=r*a.y;return{width:u,height:c,x:d,y:h}}function ty(e,t,n){let r;if(t==="viewport")r=ZP(e,n);else if(t==="document")r=JP(pr(e));else if(Kn(t))r=tL(t,n);else{const o=JE(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return sl(r)}function ny(e,t){const n=Qr(e);return n===t||!Kn(n)||Ho(n)?!1:Qn(n).position==="fixed"||ny(n,t)}function nL(e,t){const n=t.get(e);if(n)return n;let r=aa(e,[],!1).filter(c=>Kn(c)&&Uo(c)!=="body"),o=null;const a=Qn(e).position==="fixed";let u=a?Qr(e):e;for(;Kn(u)&&!Ho(u);){const c=Qn(u),d=Uf(u);!d&&c.position==="fixed"&&(o=null),(a?!d&&!o:!d&&c.position==="static"&&!!o&&eL.has(o.position)||sa(u)&&!d&&ny(e,u))?r=r.filter(m=>m!==u):o=c,u=Qr(u)}return t.set(e,r),r}function rL(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const u=[...n==="clippingAncestors"?ul(t)?[]:nL(t,this._c):[].concat(n),r],c=u[0],d=u.reduce((h,m)=>{const E=ty(t,m,o);return h.top=wn(E.top,h.top),h.right=Kr(E.right,h.right),h.bottom=Kr(E.bottom,h.bottom),h.left=wn(E.left,h.left),h},ty(t,c,o));return{width:d.right-d.left,height:d.bottom-d.top,x:d.left,y:d.top}}function iL(e){const{width:t,height:n}=XE(e);return{width:t,height:n}}function oL(e,t,n){const r=mr(t),o=pr(t),a=n==="fixed",u=zi(e,!0,a,t);let c={scrollLeft:0,scrollTop:0};const d=fr(0);function h(){d.x=cl(o)}if(r||!r&&!a)if((Uo(t)!=="body"||sa(o))&&(c=ll(t)),r){const b=zi(t,!0,a,t);d.x=b.x+t.clientLeft,d.y=b.y+t.clientTop}else o&&h();a&&!r&&o&&h();const m=o&&!r&&!a?ZE(o,c):fr(0),E=u.left+c.scrollLeft-d.x-m.x,T=u.top+c.scrollTop-d.y-m.y;return{x:E,y:T,width:u.width,height:u.height}}function $f(e){return Qn(e).position==="static"}function ry(e,t){if(!mr(e)||Qn(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return pr(e)===n&&(n=n.ownerDocument.body),n}function iy(e,t){const n=Sn(e);if(ul(e))return n;if(!mr(e)){let o=Qr(e);for(;o&&!Ho(o);){if(Kn(o)&&!$f(o))return o;o=Qr(o)}return n}let r=ry(e,t);for(;r&&zP(r)&&$f(r);)r=ry(r,t);return r&&Ho(r)&&$f(r)&&!Uf(r)?n:r||WP(e)||n}const sL=function(e){return et(this,null,function*(){const t=this.getOffsetParent||iy,n=this.getDimensions,r=yield n(e.floating);return{reference:oL(e.reference,yield t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}})};function aL(e){return Qn(e).direction==="rtl"}const uL={convertOffsetParentRelativeRectToViewportRelativeRect:QP,getDocumentElement:pr,getClippingRect:rL,getOffsetParent:iy,getElementRects:sL,getClientRects:XP,getDimensions:iL,getScale:zo,isElement:Kn,isRTL:aL};function oy(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function lL(e,t){let n=null,r;const o=pr(e);function a(){var c;clearTimeout(r),(c=n)==null||c.disconnect(),n=null}function u(c,d){c===void 0&&(c=!1),d===void 0&&(d=1),a();const h=e.getBoundingClientRect(),{left:m,top:E,width:T,height:b}=h;if(c||t(),!T||!b)return;const _=il(E),w=il(o.clientWidth-(m+T)),A=il(o.clientHeight-(E+b)),C=il(m),R={rootMargin:-_+"px "+-w+"px "+-A+"px "+-C+"px",threshold:wn(0,Kr(1,d))||1};let F=!0;function z(D){const q=D[0].intersectionRatio;if(q!==d){if(!F)return u();q?u(!1,q):r=setTimeout(()=>{u(!1,1e-7)},1e3)}q===1&&!oy(h,e.getBoundingClientRect())&&u(),F=!1}try{n=new IntersectionObserver(z,ne(U({},R),{root:o.ownerDocument}))}catch(D){n=new IntersectionObserver(z,R)}n.observe(e)}return u(!0),a}function cL(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:a=!0,elementResize:u=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:d=!1}=r,h=jf(e),m=o||a?[...h?aa(h):[],...aa(t)]:[];m.forEach(C=>{o&&C.addEventListener("scroll",n,{passive:!0}),a&&C.addEventListener("resize",n)});const E=h&&c?lL(h,n):null;let T=-1,b=null;u&&(b=new ResizeObserver(C=>{let[I]=C;I&&I.target===h&&b&&(b.unobserve(t),cancelAnimationFrame(T),T=requestAnimationFrame(()=>{var R;(R=b)==null||R.observe(t)})),n()}),h&&!d&&b.observe(h),b.observe(t));let _,w=d?zi(e):null;d&&A();function A(){const C=zi(e);w&&!oy(w,C)&&n(),w=C,_=requestAnimationFrame(A)}return n(),()=>{var C;m.forEach(I=>{o&&I.removeEventListener("scroll",n),a&&I.removeEventListener("resize",n)}),E==null||E(),(C=b)==null||C.disconnect(),b=null,d&&cancelAnimationFrame(_)}}const dL=DP,fL=MP,hL=RP,pL=BP,mL=PP,gL=IP,EL=FP,yL=(e,t,n)=>{const r=new Map,o=U({platform:uL},n),a=ne(U({},o.platform),{_c:r});return OP(e,t,ne(U({},o),{platform:a}))};function sy(e=0,t=0,n=0,r=0){if(typeof DOMRect=="function")return new DOMRect(e,t,n,r);const o={x:e,y:t,width:n,height:r,top:t,right:e+n,bottom:t+r,left:e};return ne(U({},o),{toJSON:()=>o})}function TL(e){if(!e)return sy();const{x:t,y:n,width:r,height:o}=e;return sy(t,n,r,o)}function bL(e,t){return{contextElement:Dt(e)?e:void 0,getBoundingClientRect:()=>{const n=e,r=t==null?void 0:t(n);return r||!n?TL(r):n.getBoundingClientRect()}}}var ua=e=>({variable:e,reference:`var(${e})`}),kr={arrowSize:ua("--arrow-size"),arrowSizeHalf:ua("--arrow-size-half"),arrowBg:ua("--arrow-background"),transformOrigin:ua("--transform-origin"),arrowOffset:ua("--arrow-offset")},xL=e=>e==="top"||e==="bottom"?"y":"x";function _L(e,t){return{name:"transformOrigin",fn(n){var be,j,ae,he,ge;const{elements:r,middlewareData:o,placement:a,rects:u,y:c}=n,d=a.split("-")[0],h=xL(d),m=((be=o.arrow)==null?void 0:be.x)||0,E=((j=o.arrow)==null?void 0:j.y)||0,T=(t==null?void 0:t.clientWidth)||0,b=(t==null?void 0:t.clientHeight)||0,_=m+T/2,w=E+b/2,A=Math.abs(((ae=o.shift)==null?void 0:ae.y)||0),C=u.reference.height/2,I=b/2,R=(ge=(he=e.offset)==null?void 0:he.mainAxis)!=null?ge:e.gutter,F=typeof R=="number"?R+I:R!=null?R:I,z=A>F,D={top:`${_}px calc(100% + ${F}px)`,bottom:`${_}px ${-F}px`,left:`calc(100% + ${F}px) ${w}px`,right:`${-F}px ${w}px`}[d],q=`${_}px ${u.reference.y+C-c}px`,ce=!!e.overlap&&h==="y"&&z;return r.floating.style.setProperty(kr.transformOrigin.variable,ce?q:D),{data:{transformOrigin:ce?q:D}}}}}var wL={name:"rects",fn({rects:e}){return{data:e}}},SL=e=>{if(e)return{name:"shiftArrow",fn({placement:t,middlewareData:n}){if(!n.arrow)return{};const{x:r,y:o}=n.arrow,a=t.split("-")[0];return Object.assign(e.style,{left:r!=null?`${r}px`:"",top:o!=null?`${o}px`:"",[a]:`calc(100% + ${kr.arrowOffset.reference})`}),{}}}};function AL(e){const[t,n]=e.split("-");return{side:t,align:n,hasAlign:n!=null}}var vL={strategy:"absolute",placement:"bottom",listeners:!0,gutter:8,flip:!0,slide:!0,overlap:!1,sameWidth:!1,fitViewport:!1,overflowPadding:8,arrowPadding:4};function ay(e,t){const n=e.devicePixelRatio||1;return Math.round(t*n)/n}function Vf(e){return typeof e=="function"?e():e==="clipping-ancestors"?"clippingAncestors":e}function CL(e,t,n){const r=e||t.createElement("div");return gL({element:r,padding:n.arrowPadding})}function kL(e,t){var n;if(!$I((n=t.offset)!=null?n:t.gutter))return dL(({placement:r})=>{var m,E,T,b;const o=((e==null?void 0:e.clientHeight)||0)/2,a=(E=(m=t.offset)==null?void 0:m.mainAxis)!=null?E:t.gutter,u=typeof a=="number"?a+o:a!=null?a:o,{hasAlign:c}=AL(r),d=c?void 0:t.shift,h=(b=(T=t.offset)==null?void 0:T.crossAxis)!=null?b:d;return yf({crossAxis:h,mainAxis:u,alignmentAxis:t.shift})})}function NL(e){if(!e.flip)return;const t=Vf(e.boundary);return hL(ne(U({},t?{boundary:t}:void 0),{padding:e.overflowPadding,fallbackPlacements:e.flip===!0?void 0:e.flip}))}function OL(e){if(!e.slide&&!e.overlap)return;const t=Vf(e.boundary);return fL(ne(U({},t?{boundary:t}:void 0),{mainAxis:e.slide,crossAxis:e.overlap,padding:e.overflowPadding,limiter:EL()}))}function IL(e){return pL({padding:e.overflowPadding,apply({elements:t,rects:n,availableHeight:r,availableWidth:o}){const a=t.floating,u=Math.round(n.reference.width),c=Math.round(n.reference.height);o=Math.floor(o),r=Math.floor(r),a.style.setProperty("--reference-width",`${u}px`),a.style.setProperty("--reference-height",`${c}px`),a.style.setProperty("--available-width",`${o}px`),a.style.setProperty("--available-height",`${r}px`)}})}function RL(e){var t;if(e.hideWhenDetached)return mL({strategy:"referenceHidden",boundary:(t=Vf(e.boundary))!=null?t:"clippingAncestors"})}function PL(e){return e?e===!0?{ancestorResize:!0,ancestorScroll:!0,elementResize:!0,layoutShift:!0}:e:{}}function LL(e,t,n={}){const r=bL(e,n.getAnchorRect);if(!t||!r)return;const o=Object.assign({},vL,n),a=t.querySelector("[data-part=arrow]"),u=[kL(a,o),NL(o),OL(o),CL(a,t.ownerDocument,o),SL(a),_L({gutter:o.gutter,offset:o.offset,overlap:o.overlap},a),IL(o),RL(o),wL],{placement:c,strategy:d,onComplete:h,onPositioned:m}=o,E=()=>et(null,null,function*(){var F;if(!r||!t)return;const w=yield yL(r,t,{placement:c,middleware:u,strategy:d});h==null||h(w),m==null||m({placed:!0});const A=Oo(t),C=ay(A,w.x),I=ay(A,w.y);t.style.setProperty("--x",`${C}px`),t.style.setProperty("--y",`${I}px`),o.hideWhenDetached&&(((F=w.middlewareData.hide)==null?void 0:F.referenceHidden)?(t.style.setProperty("visibility","hidden"),t.style.setProperty("pointer-events","none")):(t.style.removeProperty("visibility"),t.style.removeProperty("pointer-events")));const R=t.firstElementChild;if(R){const z=Ro(R);t.style.setProperty("--z-index",z.zIndex)}}),T=()=>et(null,null,function*(){n.updatePosition?(yield n.updatePosition({updatePosition:E,floatingElement:t}),m==null||m({placed:!0})):yield E()}),b=PL(o.listeners),_=o.listeners?cL(r,t,T,b):JI;return T(),()=>{_==null||_(),m==null||m({placed:!1})}}function uy(e,t,n={}){const c=n,{defer:r}=c,o=on(c,["defer"]),a=r?kt:d=>d(),u=[];return u.push(a(()=>{const d=typeof e=="function"?e():e,h=typeof t=="function"?t():t;u.push(LL(d,h,o))})),()=>{u.forEach(d=>d==null?void 0:d())}}var DL={bottom:"rotate(45deg)",left:"rotate(135deg)",top:"rotate(225deg)",right:"rotate(315deg)"};function ML(e={}){const{placement:t,sameWidth:n,fitViewport:r,strategy:o="absolute"}=e;return{arrow:{position:"absolute",width:kr.arrowSize.reference,height:kr.arrowSize.reference,[kr.arrowSizeHalf.variable]:`calc(${kr.arrowSize.reference} / 2)`,[kr.arrowOffset.variable]:`calc(${kr.arrowSizeHalf.reference} * -1)`},arrowTip:{transform:t?DL[t.split("-")[0]]:void 0,background:kr.arrowBg.reference,top:"0",left:"0",width:"100%",height:"100%",position:"absolute",zIndex:"inherit"},floating:{position:o,isolation:"isolate",minWidth:n?void 0:"max-content",width:n?"var(--reference-width)":void 0,maxWidth:r?"var(--available-width)":void 0,maxHeight:r?"var(--available-height)":void 0,pointerEvents:t?void 0:"none",top:"0px",left:"0px",transform:t?"translate3d(var(--x), var(--y), 0)":"translate3d(0, -100vh, 0)",zIndex:"var(--z-index)"}}}var jo=new WeakMap,dl=new WeakMap,fl={},Yf=0,ly=e=>e&&(e.host||ly(e.parentNode)),FL=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=ly(n);return r&&e.contains(r)?r:(console.error("[zag-js > ariaHidden] target",n,"in not contained inside",e,". Doing nothing"),null)}).filter(n=>!!n),BL=new Set(["script","output","status","next-route-announcer"]),UL=e=>BL.has(e.localName)||e.role==="status"||e.hasAttribute("aria-live")?!0:e.matches("[data-live-announcer]"),HL=(e,t)=>{const{parentNode:n,markerName:r,controlAttribute:o,followControlledElements:a=!0}=t,u=FL(n,Array.isArray(e)?e:[e]);fl[r]||(fl[r]=new WeakMap);const c=fl[r],d=[],h=new Set,m=new Set(u),E=b=>{!b||h.has(b)||(h.add(b),E(b.parentNode))};u.forEach(b=>{E(b),a&&Dt(b)&&_E(b,_=>{E(_)})});const T=b=>{!b||m.has(b)||Array.prototype.forEach.call(b.children,_=>{if(h.has(_))T(_);else try{if(UL(_))return;const A=_.getAttribute(o)==="true",C=(jo.get(_)||0)+1,I=(c.get(_)||0)+1;jo.set(_,C),c.set(_,I),d.push(_),C===1&&A&&dl.set(_,!0),I===1&&_.setAttribute(r,""),A||_.setAttribute(o,"true")}catch(w){console.error("[zag-js > ariaHidden] cannot operate on ",_,w)}})};return T(n),h.clear(),Yf++,()=>{d.forEach(b=>{const _=jo.get(b)-1,w=c.get(b)-1;jo.set(b,_),c.set(b,w),_||(dl.has(b)||b.removeAttribute(o),dl.delete(b)),w||b.removeAttribute(r)}),Yf--,Yf||(jo=new WeakMap,jo=new WeakMap,dl=new WeakMap,fl={})}},zL=e=>(Array.isArray(e)?e[0]:e).ownerDocument.body,jL=(e,t=zL(e),n="data-aria-hidden",r=!0)=>{if(t)return HL(e,{parentNode:t,markerName:n,controlAttribute:"aria-hidden",followControlledElements:r})},$L=e=>{const t=requestAnimationFrame(()=>e());return()=>cancelAnimationFrame(t)};function cy(e,t={}){const{defer:n=!0}=t,r=n?$L:a=>a(),o=[];return o.push(r(()=>{const u=(typeof e=="function"?e():e).filter(Boolean);u.length!==0&&o.push(jL(u))})),()=>{o.forEach(a=>a==null?void 0:a())}}function VL(e){const t={each(n){var r;for(let o=0;o<((r=e.frames)==null?void 0:r.length);o+=1){const a=e.frames[o];a&&n(a)}},addEventListener(n,r,o){return t.each(a=>{try{a.document.addEventListener(n,r,o)}catch(u){}}),()=>{try{t.removeEventListener(n,r,o)}catch(a){}}},removeEventListener(n,r,o){t.each(a=>{try{a.document.removeEventListener(n,r,o)}catch(u){}})}};return t}function YL(e){const t=e.frameElement!=null?e.parent:null;return{addEventListener:(n,r,o)=>{try{t==null||t.addEventListener(n,r,o)}catch(a){}return()=>{try{t==null||t.removeEventListener(n,r,o)}catch(a){}}},removeEventListener:(n,r,o)=>{try{t==null||t.removeEventListener(n,r,o)}catch(a){}}}}var dy="pointerdown.outside",fy="focus.outside";function WL(e){for(const t of e)if(Dt(t)&&dr(t))return!0;return!1}var hy=e=>"clientY"in e;function qL(e,t){if(!hy(t)||!e)return!1;const n=e.getBoundingClientRect();return n.width===0||n.height===0?!1:n.top<=t.clientY&&t.clientY<=n.top+n.height&&n.left<=t.clientX&&t.clientX<=n.left+n.width}function GL(e,t){return e.y<=t.y&&t.y<=e.y+e.height&&e.x<=t.x&&t.x<=e.x+e.width}function py(e,t){if(!t||!hy(e))return!1;const n=t.scrollHeight>t.clientHeight,r=n&&e.clientX>t.offsetLeft+t.clientWidth,o=t.scrollWidth>t.clientWidth,a=o&&e.clientY>t.offsetTop+t.clientHeight,u={x:t.offsetLeft,y:t.offsetTop,width:t.clientWidth+(n?16:0),height:t.clientHeight+(o?16:0)},c={x:e.clientX,y:e.clientY};return GL(u,c)?r||a:!1}function KL(e,t){const{exclude:n,onFocusOutside:r,onPointerDownOutside:o,onInteractOutside:a,defer:u,followControlledElements:c=!0}=t;if(!e)return;const d=cr(e),h=Oo(e),m=VL(h),E=YL(h);function T(R,F){if(!Dt(F)||!F.isConnected||No(e,F)||qL(e,R)||c&&xE(e,F))return!1;const z=d.querySelector(`[aria-controls="${e.id}"]`);if(z){const q=Cf(z);if(py(R,q))return!1}const D=Cf(e);return py(R,D)?!1:!(n!=null&&n(F))}const b=new Set,_=Fi(e==null?void 0:e.getRootNode());function w(R){function F(z){var be,j;const D=u&&!wE()?kt:ae=>ae(),q=z!=null?z:R,ce=(j=(be=q==null?void 0:q.composedPath)==null?void 0:be.call(q))!=null?j:[q==null?void 0:q.target];D(()=>{const ae=_?ce[0]:Gn(R);if(!(!e||!T(R,ae))){if(o||a){const he=Ef(o,a);e.addEventListener(dy,he,{once:!0})}my(e,dy,{bubbles:!1,cancelable:!0,detail:{originalEvent:q,contextmenu:PR(q),focusable:WL(ce),target:ae}})}})}R.pointerType==="touch"?(b.forEach(z=>z()),b.add(Mt(d,"click",F,{once:!0})),b.add(E.addEventListener("click",F,{once:!0})),b.add(m.addEventListener("click",F,{once:!0}))):F()}const A=new Set,C=setTimeout(()=>{A.add(Mt(d,"pointerdown",w,!0)),A.add(E.addEventListener("pointerdown",w,!0)),A.add(m.addEventListener("pointerdown",w,!0))},0);function I(R){(u?kt:z=>z())(()=>{var q,ce;const z=(ce=(q=R==null?void 0:R.composedPath)==null?void 0:q.call(R))!=null?ce:[R==null?void 0:R.target],D=_?z[0]:Gn(R);if(!(!e||!T(R,D))){if(r||a){const be=Ef(r,a);e.addEventListener(fy,be,{once:!0})}my(e,fy,{bubbles:!1,cancelable:!0,detail:{originalEvent:R,contextmenu:!1,focusable:dr(D),target:D}})}})}return wE()||(A.add(Mt(d,"focusin",I,!0)),A.add(E.addEventListener("focusin",I,!0)),A.add(m.addEventListener("focusin",I,!0))),()=>{clearTimeout(C),b.forEach(R=>R()),A.forEach(R=>R())}}function QL(e,t){const{defer:n}=t,r=n?kt:a=>a(),o=[];return o.push(r(()=>{const a=typeof e=="function"?e():e;o.push(KL(a,t))})),()=>{o.forEach(a=>a==null?void 0:a())}}function my(e,t,n){const r=e.ownerDocument.defaultView||window,o=new r.CustomEvent(t,n);return e.dispatchEvent(o)}function XL(e,t){const n=r=>{r.key==="Escape"&&(r.isComposing||t==null||t(r))};return Mt(cr(e),"keydown",n,{capture:!0})}var gy="layer:request-dismiss",Dn={layers:[],branches:[],count(){return this.layers.length},pointerBlockingLayers(){return this.layers.filter(e=>e.pointerBlocking)},topMostPointerBlockingLayer(){return[...this.pointerBlockingLayers()].slice(-1)[0]},hasPointerBlockingLayer(){return this.pointerBlockingLayers().length>0},isBelowPointerBlockingLayer(e){var r;const t=this.indexOf(e),n=this.topMostPointerBlockingLayer()?this.indexOf((r=this.topMostPointerBlockingLayer())==null?void 0:r.node):-1;return t<n},isTopMost(e){const t=this.layers[this.count()-1];return(t==null?void 0:t.node)===e},getNestedLayers(e){return Array.from(this.layers).slice(this.indexOf(e)+1)},getLayersByType(e){return this.layers.filter(t=>t.type===e)},getNestedLayersByType(e,t){const n=this.indexOf(e);return n===-1?[]:this.layers.slice(n+1).filter(r=>r.type===t)},getParentLayerOfType(e,t){const n=this.indexOf(e);if(!(n<=0))return this.layers.slice(0,n).reverse().find(r=>r.type===t)},countNestedLayersOfType(e,t){return this.getNestedLayersByType(e,t).length},isInNestedLayer(e,t){return this.getNestedLayers(e).some(n=>No(n.node,t))},isInBranch(e){return Array.from(this.branches).some(t=>No(t,e))},add(e){this.layers.push(e),this.syncLayers()},addBranch(e){this.branches.push(e)},remove(e){const t=this.indexOf(e);t<0||(t<this.count()-1&&this.getNestedLayers(e).forEach(r=>Dn.dismiss(r.node,e)),this.layers.splice(t,1),this.syncLayers())},removeBranch(e){const t=this.branches.indexOf(e);t>=0&&this.branches.splice(t,1)},syncLayers(){this.layers.forEach((e,t)=>{e.node.style.setProperty("--layer-index",`${t}`),e.node.removeAttribute("data-nested"),e.node.removeAttribute("data-has-nested"),this.getParentLayerOfType(e.node,e.type)&&e.node.setAttribute("data-nested",e.type);const r=this.countNestedLayersOfType(e.node,e.type);r>0&&e.node.setAttribute("data-has-nested",e.type),e.node.style.setProperty("--nested-layer-count",`${r}`)})},indexOf(e){return this.layers.findIndex(t=>t.node===e)},dismiss(e,t){const n=this.indexOf(e);if(n===-1)return;const r=this.layers[n];ZL(e,gy,o=>{var a;(a=r.requestDismiss)==null||a.call(r,o),o.defaultPrevented||r==null||r.dismiss()}),JL(e,gy,{originalLayer:e,targetLayer:t,originalIndex:n,targetIndex:t?this.indexOf(t):-1}),this.syncLayers()},clear(){this.remove(this.layers[0].node)}};function JL(e,t,n){const r=e.ownerDocument.defaultView||window,o=new r.CustomEvent(t,{cancelable:!0,bubbles:!0,detail:n});return e.dispatchEvent(o)}function ZL(e,t,n){e.addEventListener(t,n,{once:!0})}var Ey;function yy(){Dn.layers.forEach(({node:e})=>{e.style.pointerEvents=Dn.isBelowPointerBlockingLayer(e)?"none":"auto"})}function e6(e){e.style.pointerEvents=""}function t6(e,t){const n=cr(e),r=[];return Dn.hasPointerBlockingLayer()&&!n.body.hasAttribute("data-inert")&&(Ey=document.body.style.pointerEvents,queueMicrotask(()=>{n.body.style.pointerEvents="none",n.body.setAttribute("data-inert","")})),t==null||t.forEach(o=>{const[a,u]=nP(()=>{const c=o();return Dt(c)?c:null},{timeout:1e3});a.then(c=>r.push(Ju(c,{pointerEvents:"auto"}))),r.push(u)}),()=>{Dn.hasPointerBlockingLayer()||(queueMicrotask(()=>{n.body.style.pointerEvents=Ey,n.body.removeAttribute("data-inert"),n.body.style.length===0&&n.body.removeAttribute("style")}),r.forEach(o=>o()))}}function n6(e,t){const{warnOnMissingNode:n=!0}=t;if(n&&!e){Tf("[@zag-js/dismissable] node is `null` or `undefined`");return}if(!e)return;const{onDismiss:r,onRequestDismiss:o,pointerBlocking:a,exclude:u,debug:c,type:d="dialog"}=t,h={dismiss:r,node:e,type:d,pointerBlocking:a,requestDismiss:o};Dn.add(h),yy();function m(w){var C,I;const A=Gn(w.detail.originalEvent);Dn.isBelowPointerBlockingLayer(e)||Dn.isInBranch(A)||((C=t.onPointerDownOutside)==null||C.call(t,w),(I=t.onInteractOutside)==null||I.call(t,w),!w.defaultPrevented&&(c&&console.log("onPointerDownOutside:",w.detail.originalEvent),r==null||r()))}function E(w){var C,I;const A=Gn(w.detail.originalEvent);Dn.isInBranch(A)||((C=t.onFocusOutside)==null||C.call(t,w),(I=t.onInteractOutside)==null||I.call(t,w),!w.defaultPrevented&&(c&&console.log("onFocusOutside:",w.detail.originalEvent),r==null||r()))}function T(w){var A;Dn.isTopMost(e)&&((A=t.onEscapeKeyDown)==null||A.call(t,w),!w.defaultPrevented&&r&&(w.preventDefault(),r()))}function b(w){var R;if(!e)return!1;const A=typeof u=="function"?u():u,C=Array.isArray(A)?A:[A],I=(R=t.persistentElements)==null?void 0:R.map(F=>F()).filter(Dt);return I&&C.push(...I),C.some(F=>No(F,w))||Dn.isInNestedLayer(e,w)}const _=[a?t6(e,t.persistentElements):void 0,XL(e,T),QL(e,{exclude:b,onFocusOutside:E,onPointerDownOutside:m,defer:t.defer})];return()=>{Dn.remove(e),yy(),e6(e),_.forEach(w=>w==null?void 0:w())}}function Ty(e,t){const{defer:n}=t,r=n?kt:a=>a(),o=[];return o.push(r(()=>{const a=Co(e)?e():e;o.push(n6(a,t))})),()=>{o.forEach(a=>a==null?void 0:a())}}var r6=Object.defineProperty,i6=(e,t,n)=>t in e?r6(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ht=(e,t,n)=>i6(e,typeof t!="symbol"?t+"":t,n),by={activateTrap(e,t){if(e.length>0){const r=e[e.length-1];r!==t&&r.pause()}const n=e.indexOf(t);n===-1||e.splice(n,1),e.push(t)},deactivateTrap(e,t){const n=e.indexOf(t);n!==-1&&e.splice(n,1),e.length>0&&e[e.length-1].unpause()}},o6=[],s6=class{constructor(e,t){ht(this,"trapStack"),ht(this,"config"),ht(this,"doc"),ht(this,"state",{containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,delayInitialFocusTimer:void 0,recentNavEvent:void 0}),ht(this,"portalContainers",new Set),ht(this,"listenerCleanups",[]),ht(this,"handleFocus",r=>{const o=Gn(r),a=this.findContainerIndex(o,r)>=0;if(a||Gu(o))a&&(this.state.mostRecentlyFocusedNode=o);else{r.stopImmediatePropagation();let u,c=!0;if(this.state.mostRecentlyFocusedNode)if(na(this.state.mostRecentlyFocusedNode)>0){const d=this.findContainerIndex(this.state.mostRecentlyFocusedNode),{tabbableNodes:h}=this.state.containerGroups[d];if(h.length>0){const m=h.findIndex(E=>E===this.state.mostRecentlyFocusedNode);m>=0&&(this.config.isKeyForward(this.state.recentNavEvent)?m+1<h.length&&(u=h[m+1],c=!1):m-1>=0&&(u=h[m-1],c=!1))}}else this.state.containerGroups.some(d=>d.tabbableNodes.some(h=>na(h)>0))||(c=!1);else c=!1;c&&(u=this.findNextNavNode({target:this.state.mostRecentlyFocusedNode,isBackward:this.config.isKeyBackward(this.state.recentNavEvent)})),u?this.tryFocus(u):this.tryFocus(this.state.mostRecentlyFocusedNode||this.getInitialFocusNode())}this.state.recentNavEvent=void 0}),ht(this,"handlePointerDown",r=>{const o=Gn(r);if(!(this.findContainerIndex(o,r)>=0)){if(ca(this.config.clickOutsideDeactivates,r)){this.deactivate({returnFocus:this.config.returnFocusOnDeactivate});return}ca(this.config.allowOutsideClick,r)||r.preventDefault()}}),ht(this,"handleClick",r=>{const o=Gn(r);this.findContainerIndex(o,r)>=0||ca(this.config.clickOutsideDeactivates,r)||ca(this.config.allowOutsideClick,r)||(r.preventDefault(),r.stopImmediatePropagation())}),ht(this,"handleTabKey",r=>{if(this.config.isKeyForward(r)||this.config.isKeyBackward(r)){this.state.recentNavEvent=r;const o=this.config.isKeyBackward(r),a=this.findNextNavNode({event:r,isBackward:o});if(!a)return;la(r)&&r.preventDefault(),this.tryFocus(a)}}),ht(this,"handleEscapeKey",r=>{a6(r)&&ca(this.config.escapeDeactivates,r)!==!1&&(r.preventDefault(),this.deactivate())}),ht(this,"_mutationObserver"),ht(this,"setupMutationObserver",()=>{const r=this.doc.defaultView||window;this._mutationObserver=new r.MutationObserver(o=>{o.some(c=>Array.from(c.removedNodes).some(h=>h===this.state.mostRecentlyFocusedNode))&&this.tryFocus(this.getInitialFocusNode()),o.some(c=>c.type==="attributes"&&(c.attributeName==="aria-controls"||c.attributeName==="aria-expanded")?!0:c.type==="childList"&&c.addedNodes.length>0?Array.from(c.addedNodes).some(d=>{if(d.nodeType!==Node.ELEMENT_NODE)return!1;const h=d;return SR(h)?!0:h.id&&!this.state.containers.some(m=>m.contains(h))?AR(h):!1}):!1)&&this.state.active&&!this.state.paused&&(this.updateTabbableNodes(),this.updatePortalContainers())})}),ht(this,"updateObservedNodes",()=>{var r;(r=this._mutationObserver)==null||r.disconnect(),this.state.active&&!this.state.paused&&(this.state.containers.map(o=>{var a;(a=this._mutationObserver)==null||a.observe(o,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["aria-controls","aria-expanded"]})}),this.portalContainers.forEach(o=>{this.observePortalContainer(o)}))}),ht(this,"getInitialFocusNode",()=>{let r=this.getNodeForOption("initialFocus",{hasFallback:!0});if(r===!1)return!1;if(r===void 0||r&&!dr(r)){const o=Io(this.doc);if(o&&this.findContainerIndex(o)>=0)r=o;else{const a=this.state.tabbableGroups[0];r=a&&a.firstTabbableNode||this.getNodeForOption("fallbackFocus")}}else r===null&&(r=this.getNodeForOption("fallbackFocus"));if(!r)throw new Error("Your focus-trap needs to have at least one focusable element");return r.isConnected||(r=this.getNodeForOption("fallbackFocus")),r}),ht(this,"tryFocus",r=>{if(r!==!1&&r!==Io(this.doc)){if(!r||!r.focus){this.tryFocus(this.getInitialFocusNode());return}r.focus({preventScroll:!!this.config.preventScroll}),this.state.mostRecentlyFocusedNode=r,u6(r)&&r.select()}}),ht(this,"deactivate",r=>{if(!this.state.active)return this;const o=U({onDeactivate:this.config.onDeactivate,onPostDeactivate:this.config.onPostDeactivate,checkCanReturnFocus:this.config.checkCanReturnFocus},r);clearTimeout(this.state.delayInitialFocusTimer),this.state.delayInitialFocusTimer=void 0,this.removeListeners(),this.state.active=!1,this.state.paused=!1,this.updateObservedNodes(),by.deactivateTrap(this.trapStack,this),this.portalContainers.clear();const a=this.getOption(o,"onDeactivate"),u=this.getOption(o,"onPostDeactivate"),c=this.getOption(o,"checkCanReturnFocus"),d=this.getOption(o,"returnFocus","returnFocusOnDeactivate");a==null||a();const h=()=>{xy(()=>{if(d){const m=this.getReturnFocusNode(this.state.nodeFocusedBeforeActivation);this.tryFocus(m)}u==null||u()})};if(d&&c){const m=this.getReturnFocusNode(this.state.nodeFocusedBeforeActivation);return c(m).then(h,h),this}return h(),this}),ht(this,"pause",r=>{if(this.state.paused||!this.state.active)return this;const o=this.getOption(r,"onPause"),a=this.getOption(r,"onPostPause");return this.state.paused=!0,o==null||o(),this.removeListeners(),this.updateObservedNodes(),a==null||a(),this}),ht(this,"unpause",r=>{if(!this.state.paused||!this.state.active)return this;const o=this.getOption(r,"onUnpause"),a=this.getOption(r,"onPostUnpause");return this.state.paused=!1,o==null||o(),this.updateTabbableNodes(),this.addListeners(),this.updateObservedNodes(),a==null||a(),this}),ht(this,"updateContainerElements",r=>(this.state.containers=Array.isArray(r)?r.filter(Boolean):[r].filter(Boolean),this.state.active&&this.updateTabbableNodes(),this.updateObservedNodes(),this)),ht(this,"getReturnFocusNode",r=>{const o=this.getNodeForOption("setReturnFocus",{params:[r]});return o||(o===!1?!1:r)}),ht(this,"getOption",(r,o,a)=>r&&r[o]!==void 0?r[o]:this.config[a||o]),ht(this,"getNodeForOption",(r,{hasFallback:o=!1,params:a=[]}={})=>{let u=this.config[r];if(typeof u=="function"&&(u=u(...a)),u===!0&&(u=void 0),!u){if(u===void 0||u===!1)return u;throw new Error(`\`${r}\` was specified but was not a node, or did not return a node`)}let c=u;if(typeof u=="string"){try{c=this.doc.querySelector(u)}catch(d){throw new Error(`\`${r}\` appears to be an invalid selector; error="${d.message}"`)}if(!c&&!o)throw new Error(`\`${r}\` as selector refers to no known node`)}return c}),ht(this,"findNextNavNode",r=>{const{event:o,isBackward:a=!1}=r,u=r.target||Gn(o);this.updateTabbableNodes();let c=null;if(this.state.tabbableGroups.length>0){const d=this.findContainerIndex(u,o),h=d>=0?this.state.containerGroups[d]:void 0;if(d<0)a?c=this.state.tabbableGroups[this.state.tabbableGroups.length-1].lastTabbableNode:c=this.state.tabbableGroups[0].firstTabbableNode;else if(a){let m=this.state.tabbableGroups.findIndex(({firstTabbableNode:E})=>u===E);if(m<0&&((h==null?void 0:h.container)===u||dr(u)&&!Bi(u)&&!(h!=null&&h.nextTabbableNode(u,!1)))&&(m=d),m>=0){const E=m===0?this.state.tabbableGroups.length-1:m-1,T=this.state.tabbableGroups[E];c=na(u)>=0?T.lastTabbableNode:T.lastDomTabbableNode}else la(o)||(c=h==null?void 0:h.nextTabbableNode(u,!1))}else{let m=this.state.tabbableGroups.findIndex(({lastTabbableNode:E})=>u===E);if(m<0&&((h==null?void 0:h.container)===u||dr(u)&&!Bi(u)&&!(h!=null&&h.nextTabbableNode(u)))&&(m=d),m>=0){const E=m===this.state.tabbableGroups.length-1?0:m+1,T=this.state.tabbableGroups[E];c=na(u)>=0?T.firstTabbableNode:T.firstDomTabbableNode}else la(o)||(c=h==null?void 0:h.nextTabbableNode(u))}}else c=this.getNodeForOption("fallbackFocus");return c}),this.trapStack=t.trapStack||o6;const n=U({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,followControlledElements:!0,isKeyForward(r){return la(r)&&!r.shiftKey},isKeyBackward(r){return la(r)&&r.shiftKey}},t);this.doc=n.document||cr(Array.isArray(e)?e[0]:e),this.config=n,this.updateContainerElements(e),this.setupMutationObserver()}addPortalContainer(e){const t=e.parentElement;t&&!this.portalContainers.has(t)&&(this.portalContainers.add(t),this.state.active&&!this.state.paused&&this.observePortalContainer(t))}observePortalContainer(e){var t;(t=this._mutationObserver)==null||t.observe(e,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["aria-controls","aria-expanded"]})}updatePortalContainers(){this.config.followControlledElements&&this.state.containers.forEach(e=>{xR(e).forEach(n=>{this.addPortalContainer(n)})})}get active(){return this.state.active}get paused(){return this.state.paused}findContainerIndex(e,t){const n=typeof(t==null?void 0:t.composedPath)=="function"?t.composedPath():void 0;return this.state.containerGroups.findIndex(({container:r,tabbableNodes:o})=>r.contains(e)||(n==null?void 0:n.includes(r))||o.find(a=>a===e)||this.isControlledElement(r,e))}isControlledElement(e,t){return this.config.followControlledElements?xE(e,t):!1}updateTabbableNodes(){if(this.state.containerGroups=this.state.containers.map(e=>{const t=Po(e,{getShadowRoot:this.config.getShadowRoot}),n=OE(e,{getShadowRoot:this.config.getShadowRoot}),r=t[0],o=t[t.length-1],a=r,u=o;let c=!1;for(let h=0;h<t.length;h++)if(na(t[h])>0){c=!0;break}function d(h,m=!0){const E=t.indexOf(h);if(E>=0)return t[E+(m?1:-1)];const T=n.indexOf(h);if(!(T<0)){if(m){for(let b=T+1;b<n.length;b++)if(Bi(n[b]))return n[b]}else for(let b=T-1;b>=0;b--)if(Bi(n[b]))return n[b]}}return{container:e,tabbableNodes:t,focusableNodes:n,posTabIndexesFound:c,firstTabbableNode:r,lastTabbableNode:o,firstDomTabbableNode:a,lastDomTabbableNode:u,nextTabbableNode:d}}),this.state.tabbableGroups=this.state.containerGroups.filter(e=>e.tabbableNodes.length>0),this.state.tabbableGroups.length<=0&&!this.getNodeForOption("fallbackFocus"))throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times");if(this.state.containerGroups.find(e=>e.posTabIndexesFound)&&this.state.containerGroups.length>1)throw new Error("At least one node with a positive tabindex was found in one of your focus-trap's multiple containers. Positive tabindexes are only supported in single-container focus-traps.")}addListeners(){if(this.state.active)return by.activateTrap(this.trapStack,this),this.state.delayInitialFocusTimer=this.config.delayInitialFocus?xy(()=>{this.tryFocus(this.getInitialFocusNode())}):this.tryFocus(this.getInitialFocusNode()),this.listenerCleanups.push(Mt(this.doc,"focusin",this.handleFocus,!0),Mt(this.doc,"mousedown",this.handlePointerDown,{capture:!0,passive:!1}),Mt(this.doc,"touchstart",this.handlePointerDown,{capture:!0,passive:!1}),Mt(this.doc,"click",this.handleClick,{capture:!0,passive:!1}),Mt(this.doc,"keydown",this.handleTabKey,{capture:!0,passive:!1}),Mt(this.doc,"keydown",this.handleEscapeKey)),this}removeListeners(){if(this.state.active)return this.listenerCleanups.forEach(e=>e()),this.listenerCleanups=[],this}activate(e){if(this.state.active)return this;const t=this.getOption(e,"onActivate"),n=this.getOption(e,"onPostActivate"),r=this.getOption(e,"checkCanFocusTrap");r||this.updateTabbableNodes(),this.state.active=!0,this.state.paused=!1,this.state.nodeFocusedBeforeActivation=Io(this.doc),t==null||t();const o=()=>{r&&this.updateTabbableNodes(),this.addListeners(),this.updateObservedNodes(),n==null||n()};return r?(r(this.state.containers.concat()).then(o,o),this):(o(),this)}},la=e=>e.key==="Tab",ca=(e,...t)=>typeof e=="function"?e(...t):e,a6=e=>!e.isComposing&&e.key==="Escape",xy=e=>setTimeout(e,0),u6=e=>e.localName==="input"&&"select"in e&&typeof e.select=="function";function _y(e,t={}){let n;const r=kt(()=>{const o=typeof e=="function"?e():e;if(o){n=new s6(o,ne(U({escapeDeactivates:!1,allowOutsideClick:!0,preventScroll:!0,returnFocusOnDeactivate:!0,delayInitialFocus:!1,fallbackFocus:o},t),{document:cr(o)}));try{n.activate()}catch(a){}}});return function(){n==null||n.deactivate(),r()}}var Wf="data-scroll-lock";function l6(e){const t=e.getBoundingClientRect().left;return Math.round(t)+e.scrollLeft?"paddingLeft":"paddingRight"}function wy(e){const t=Ro(e),n=t==null?void 0:t.scrollbarGutter;return n==="stable"||(n==null?void 0:n.startsWith("stable "))===!0}function Sy(e){var b;const t=e!=null?e:document,n=(b=t.defaultView)!=null?b:window,{documentElement:r,body:o}=t;if(o.hasAttribute(Wf))return;const u=wy(r)||wy(o),c=n.innerWidth-r.clientWidth;o.setAttribute(Wf,"");const d=()=>eP(r,"--scrollbar-width",`${c}px`),h=l6(r),m=()=>{const _={overflow:"hidden"};return!u&&c>0&&(_[h]=`${c}px`),Ju(o,_)},E=()=>{var z,D;const{scrollX:_,scrollY:w,visualViewport:A}=n,C=(z=A==null?void 0:A.offsetLeft)!=null?z:0,I=(D=A==null?void 0:A.offsetTop)!=null?D:0,R={position:"fixed",overflow:"hidden",top:`${-(w-Math.floor(I))}px`,left:`${-(_-Math.floor(C))}px`,right:"0"};!u&&c>0&&(R[h]=`${c}px`);const F=Ju(o,R);return()=>{F==null||F(),n.scrollTo({left:_,top:w,behavior:"instant"})}},T=[d(),Ku()?E():m()];return()=>{T.forEach(_=>_==null?void 0:_()),o.removeAttribute(Wf)}}var c6=Hi("popover").parts("arrow","arrowTip","anchor","trigger","indicator","positioner","content","title","description","closeTrigger"),gr=c6.build(),Ay=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.anchor)!=null?n:`popover:${e.id}:anchor`},vy=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.trigger)!=null?n:`popover:${e.id}:trigger`},qf=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.content)!=null?n:`popover:${e.id}:content`},Cy=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.positioner)!=null?n:`popover:${e.id}:popper`},d6=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.arrow)!=null?n:`popover:${e.id}:arrow`},Gf=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.title)!=null?n:`popover:${e.id}:title`},Kf=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.description)!=null?n:`popover:${e.id}:desc`},f6=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.closeTrigger)!=null?n:`popover:${e.id}:close`},ky=e=>e.getById(Ay(e)),$o=e=>e.getById(vy(e)),Vo=e=>e.getById(qf(e)),Ny=e=>e.getById(Cy(e)),h6=e=>e.getById(Gf(e)),p6=e=>e.getById(Kf(e));function m6(e,t){const{state:n,context:r,send:o,computed:a,prop:u,scope:c}=e,d=n.matches("open"),h=r.get("currentPlacement"),m=a("currentPortalled"),E=r.get("renderedElements"),T=ML(ne(U({},u("positioning")),{placement:h}));return{portalled:m,open:d,setOpen(b){n.matches("open")!==b&&o({type:b?"OPEN":"CLOSE"})},reposition(b={}){o({type:"POSITIONING.SET",options:b})},getArrowProps(){return t.element(ne(U({id:d6(c)},gr.arrow.attrs),{dir:u("dir"),style:T.arrow}))},getArrowTipProps(){return t.element(ne(U({},gr.arrowTip.attrs),{dir:u("dir"),style:T.arrowTip}))},getAnchorProps(){return t.element(ne(U({},gr.anchor.attrs),{dir:u("dir"),id:Ay(c)}))},getTriggerProps(){return t.button(ne(U({},gr.trigger.attrs),{dir:u("dir"),type:"button","data-placement":h,id:vy(c),"aria-haspopup":"dialog","aria-expanded":d,"data-state":d?"open":"closed","aria-controls":qf(c),onPointerDown(b){SE(b)&&IR()&&b.currentTarget.focus()},onClick(b){b.defaultPrevented||o({type:"TOGGLE"})},onBlur(b){o({type:"TRIGGER_BLUR",target:b.relatedTarget})}}))},getIndicatorProps(){return t.element(ne(U({},gr.indicator.attrs),{dir:u("dir"),"data-state":d?"open":"closed"}))},getPositionerProps(){return t.element(ne(U({id:Cy(c)},gr.positioner.attrs),{dir:u("dir"),style:T.floating}))},getContentProps(){return t.element(ne(U({},gr.content.attrs),{dir:u("dir"),id:qf(c),tabIndex:-1,role:"dialog","aria-modal":yE(u("modal")),hidden:!d,"data-state":d?"open":"closed","data-expanded":ko(d),"aria-labelledby":E.title?Gf(c):void 0,"aria-describedby":E.description?Kf(c):void 0,"data-placement":h}))},getTitleProps(){return t.element(ne(U({},gr.title.attrs),{id:Gf(c),dir:u("dir")}))},getDescriptionProps(){return t.element(ne(U({},gr.description.attrs),{id:Kf(c),dir:u("dir")}))},getCloseTriggerProps(){return t.button(ne(U({},gr.closeTrigger.attrs),{dir:u("dir"),id:f6(c),type:"button","aria-label":"close",onClick(b){b.defaultPrevented||(b.stopPropagation(),o({type:"CLOSE"}))}}))}}}var g6={props({props:e}){return ne(U({closeOnInteractOutside:!0,closeOnEscape:!0,autoFocus:!0,modal:!1,portalled:!0},e),{positioning:U({placement:"bottom"},e.positioning)})},initialState({prop:e}){return e("open")||e("defaultOpen")?"open":"closed"},context({bindable:e}){return{currentPlacement:e(()=>({defaultValue:void 0})),renderedElements:e(()=>({defaultValue:{title:!0,description:!0}}))}},computed:{currentPortalled:({prop:e})=>!!e("modal")||!!e("portalled")},watch({track:e,prop:t,action:n}){e([()=>t("open")],()=>{n(["toggleVisibility"])})},entry:["checkRenderedElements"],states:{closed:{on:{"CONTROLLED.OPEN":{target:"open",actions:["setInitialFocus"]},TOGGLE:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen","setInitialFocus"]}],OPEN:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen","setInitialFocus"]}]}},open:{effects:["trapFocus","preventScroll","hideContentBelow","trackPositioning","trackDismissableElement","proxyTabFocus"],on:{"CONTROLLED.CLOSE":{target:"closed",actions:["setFinalFocus"]},CLOSE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["invokeOnClose","setFinalFocus"]}],TOGGLE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["invokeOnClose"]}],"POSITIONING.SET":{actions:["reposition"]}}}},implementations:{guards:{isOpenControlled:({prop:e})=>e("open")!=null},effects:{trackPositioning({context:e,prop:t,scope:n}){var a;e.set("currentPlacement",t("positioning").placement);const r=(a=ky(n))!=null?a:$o(n);return uy(r,()=>Ny(n),ne(U({},t("positioning")),{defer:!0,onComplete(u){e.set("currentPlacement",u.placement)}}))},trackDismissableElement({send:e,prop:t,scope:n}){const r=()=>Vo(n);let o=!0;return Ty(r,{type:"popover",pointerBlocking:t("modal"),exclude:$o(n),defer:!0,onEscapeKeyDown(a){var u;(u=t("onEscapeKeyDown"))==null||u(a),!t("closeOnEscape")&&a.preventDefault()},onInteractOutside(a){var u;(u=t("onInteractOutside"))==null||u(a),!a.defaultPrevented&&(o=!(a.detail.focusable||a.detail.contextmenu),t("closeOnInteractOutside")||a.preventDefault())},onPointerDownOutside:t("onPointerDownOutside"),onFocusOutside:t("onFocusOutside"),persistentElements:t("persistentElements"),onRequestDismiss:t("onRequestDismiss"),onDismiss(){e({type:"CLOSE",src:"interact-outside",restoreFocus:o})}})},proxyTabFocus({prop:e,scope:t}){return e("modal")||!e("portalled")?void 0:JR(()=>Vo(t),{triggerElement:$o(t),defer:!0,getShadowRoot:!0,onFocus(r){r.focus({preventScroll:!0})}})},hideContentBelow({prop:e,scope:t}){return e("modal")?cy(()=>[Vo(t),$o(t)],{defer:!0}):void 0},preventScroll({prop:e,scope:t}){if(e("modal"))return Sy(t.getDoc())},trapFocus({prop:e,scope:t}){return e("modal")?_y(()=>Vo(t),{initialFocus:()=>IE({root:Vo(t),getInitialEl:e("initialFocusEl"),enabled:e("autoFocus")}),getShadowRoot:!0}):void 0}},actions:{reposition({event:e,prop:t,scope:n,context:r}){var u;const o=(u=ky(n))!=null?u:$o(n);uy(o,()=>Ny(n),ne(U(U({},t("positioning")),e.options),{defer:!0,listeners:!1,onComplete(c){r.set("currentPlacement",c.placement)}}))},checkRenderedElements({context:e,scope:t}){kt(()=>{Object.assign(e.get("renderedElements"),{title:!!h6(t),description:!!p6(t)})})},setInitialFocus({prop:e,scope:t}){e("modal")||kt(()=>{const n=IE({root:Vo(t),getInitialEl:e("initialFocusEl"),enabled:e("autoFocus")});n==null||n.focus({preventScroll:!0})})},setFinalFocus({event:e,scope:t}){var r,o;const n=(o=e.restoreFocus)!=null?o:(r=e.previousEvent)==null?void 0:r.restoreFocus;n!=null&&!n||kt(()=>{const a=$o(t);a==null||a.focus({preventScroll:!0})})},invokeOnOpen({prop:e,flush:t}){t(()=>{var n;(n=e("onOpenChange"))==null||n({open:!0})})},invokeOnClose({prop:e,flush:t}){t(()=>{var n;(n=e("onOpenChange"))==null||n({open:!1})})},toggleVisibility({event:e,send:t,prop:n}){t({type:n("open")?"CONTROLLED.OPEN":"CONTROLLED.CLOSE",previousEvent:e})}}}};Mo()(["autoFocus","closeOnEscape","closeOnInteractOutside","dir","getRootNode","id","ids","initialFocusEl","modal","onEscapeKeyDown","onFocusOutside","onInteractOutside","onOpenChange","onPointerDownOutside","onRequestDismiss","defaultOpen","open","persistentElements","portalled","positioning"]);const[_F,hl]=Ui({name:"EnvironmentContext",hookName:"useEnvironmentContext",providerName:"<EnvironmentProvider />",strict:!1,defaultValue:{getRootNode:()=>document,getDocument:()=>document,getWindow:()=>window}}),[wF,Qf]=Ui({name:"LocaleContext",hookName:"useLocaleContext",providerName:"<LocaleProvider />",strict:!1,defaultValue:{dir:"ltr",locale:"en-US"}}),E6=e=>{const t=Z.useId(),{getRootNode:n}=hl(),{dir:r}=Qf(),o=U({id:t,dir:r,getRootNode:n},e),a=el(g6,o);return m6(a,Of)},y6=e=>{const[t,u]=HE(e),c=u,{children:n}=c,r=on(c,["children"]),o=E6(r),a=Pf(Nt({present:o.open},t));return P.jsx(hP,{value:o,children:P.jsx(FE,{value:a,children:n})})},Oy=Z.forwardRef((e,t)=>{const n=Rf(),r=ra(),o=Nt(ne(U({},n.getTriggerProps()),{"aria-controls":r.unmounted?void 0:n.getTriggerProps()["aria-controls"]}),e);return P.jsx(Kt.button,ne(U({},o),{ref:t}))});Oy.displayName="PopoverTrigger";function T6(e){return ln({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{fillRule:"evenodd",d:"M11.854 3.646a.5.5 0 0 1 0 .708L8.207 8l3.647 3.646a.5.5 0 0 1-.708.708l-4-4a.5.5 0 0 1 0-.708l4-4a.5.5 0 0 1 .708 0M4.5 1a.5.5 0 0 0-.5.5v13a.5.5 0 0 0 1 0v-13a.5.5 0 0 0-.5-.5"},child:[]}]})(e)}function b6(e){return ln({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{fillRule:"evenodd",d:"M4.146 3.646a.5.5 0 0 0 0 .708L7.793 8l-3.647 3.646a.5.5 0 0 0 .708.708l4-4a.5.5 0 0 0 0-.708l-4-4a.5.5 0 0 0-.708 0M11.5 1a.5.5 0 0 1 .5.5v13a.5.5 0 0 1-1 0v-13a.5.5 0 0 1 .5-.5"},child:[]}]})(e)}function x6(e){return ln({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{fillRule:"evenodd",d:"M11.354 1.646a.5.5 0 0 1 0 .708L5.707 8l5.647 5.646a.5.5 0 0 1-.708.708l-6-6a.5.5 0 0 1 0-.708l6-6a.5.5 0 0 1 .708 0"},child:[]}]})(e)}function _6(e){return ln({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{fillRule:"evenodd",d:"M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708"},child:[]}]})(e)}function Iy(e){return ln({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M9.5 13a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0m0-5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0m0-5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0"},child:[]}]})(e)}const w6=({className:e,componentType:t,children:n})=>{const[r,o]=Z.useState(!1),{globalClassName:a}=Ht(),u=h=>{o(h.open)},c=Z.useCallback(()=>{o(!1)},[]),d=Z.useMemo(()=>({closeMenu:c}),[c]);return P.jsxs(y6,{open:r,onOpenChange:u,positioning:{placement:"bottom-end"},children:[P.jsx(Oy,{"aria-label":`Overflow menu for ${t}`,className:re(`${J}-overflow-menu-button-trigger`,`${J}-icon-button`,a,e,`cim-${t}-component`),children:P.jsx(Iy,{})}),P.jsx(UE,{children:P.jsx(BE,{className:re(`${J}-overflow-menu-list`,a,`cim-${t}-component`),children:P.jsx(dE.Provider,{value:d,children:n})})})]})};function Ry(e){return ln({attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M15 4.00008H13V11.0001H20V9.00008H16.4142L20.7071 4.70718L19.2929 3.29297L15 7.58586V4.00008ZM4.00008 15H7.58586L3.29297 19.2929L4.70718 20.7071L9.00008 16.4142V20H11.0001V13H4.00008V15Z"},child:[]}]})(e)}function Py(e){return ln({attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M17.5858 5H14V3H21V10H19V6.41421L14.7071 10.7071L13.2929 9.29289L17.5858 5ZM3 14H5V17.5858L9.29289 13.2929L10.7071 14.7071L6.41421 19H10V21H3V14Z"},child:[]}]})(e)}const[S6,ji]=Ui({name:"CarouselContext",hookName:"useCarouselContext",providerName:"<CarouselProvider />"}),Ly=Z.forwardRef((e,t)=>{const n=ji(),r=Nt(n.getControlProps(),e);return P.jsx(Kt.div,ne(U(U({},r),e),{ref:t}))});Ly.displayName="CarouselControl";const Dy=Z.forwardRef((e,t)=>{const[n,r]=ia()(e,["readOnly","index"]),o=ji(),a=Nt(o.getIndicatorProps(n),r);return P.jsx(Kt.button,ne(U({},a),{ref:t}))});Dy.displayName="CarouselIndicator";const My=Z.forwardRef((e,t)=>{const n=ji(),r=Nt(n.getIndicatorGroupProps(),e);return P.jsx(Kt.div,ne(U({},r),{ref:t}))});My.displayName="CarouselIndicatorGroup";const Fy=Z.forwardRef((e,t)=>{const[n,r]=ia()(e,["index","snapAlign"]),o=ji(),a=Nt(o.getItemProps(n),r);return P.jsx(Kt.div,ne(U({},a),{ref:t}))});Fy.displayName="CarouselItem";const By=Z.forwardRef((e,t)=>{const n=ji(),r=Nt(n.getItemGroupProps(),e);return P.jsx(Kt.div,ne(U({},r),{ref:t}))});By.displayName="CarouselItemGroup";const Uy=Z.forwardRef((e,t)=>{const n=ji(),r=Nt(n.getNextTriggerProps(),e);return P.jsx(Kt.button,ne(U({},r),{ref:t}))});Uy.displayName="CarouselNextTrigger";const Hy=Z.forwardRef((e,t)=>{const n=ji(),r=Nt(n.getPrevTriggerProps(),e);return P.jsx(Kt.button,ne(U({},r),{ref:t}))});Hy.displayName="CarouselPrevTrigger";function A6(e){const t=Ro(e),n=e.getBoundingClientRect();let r=t.getPropertyValue("scroll-padding-left").replace("auto","0px"),o=t.getPropertyValue("scroll-padding-top").replace("auto","0px"),a=t.getPropertyValue("scroll-padding-right").replace("auto","0px"),u=t.getPropertyValue("scroll-padding-bottom").replace("auto","0px");function c(T,b){let _=parseFloat(T);return/%/.test(T)&&(_/=100,_*=b),Number.isNaN(_)?0:_}let d=c(r,n.width),h=c(o,n.height),m=c(a,n.width),E=c(u,n.height);return{x:{before:d,after:m},y:{before:h,after:E}}}function v6(e,t,n="both"){return n==="x"&&e.right>=t.left&&e.left<=t.right||n==="y"&&e.bottom>=t.top&&e.top<=t.bottom||n==="both"&&e.right>=t.left&&e.left<=t.right&&e.bottom>=t.top&&e.top<=t.bottom}function zy(e){let t=[];for(const n of e.children)t=t.concat(n,zy(n));return t}function jy(e,t=!1){const n=e.getBoundingClientRect(),r={x:{start:[],center:[],end:[]},y:{start:[],center:[],end:[]}},o=t?zy(e):e.children;for(const a of["x","y"]){const u=a==="x"?"y":"x",c=a==="x"?"left":"top",d=a==="x"?"width":"height",h=a==="x"?"scrollLeft":"scrollTop";for(const m of o){const E=m.getBoundingClientRect();if(!v6(n,E,u))continue;const T=Ro(m);let[b,_]=T.getPropertyValue("scroll-snap-align").split(" ");typeof _=="undefined"&&(_=b);const w=a==="x"?_:b,A=E[c]-n[c]+e[h];switch(w){case"none":break;case"start":r[a].start.push({node:m,position:A});break;case"center":r[a].center.push({node:m,position:A+E[d]/2});break;case"end":r[a].end.push({node:m,position:A+E[d]});break}}}return r}function $y(e){const t=e.getBoundingClientRect(),n=A6(e),r=jy(e),o={x:e.scrollWidth-e.offsetWidth,y:e.scrollHeight-e.offsetHeight};return{x:Vy([...r.x.start.map(a=>a.position-n.x.before),...r.x.center.map(a=>a.position-t.width/2),...r.x.end.map(a=>a.position-t.width+n.x.after)].map(Yy(0,o.x))),y:Vy([...r.y.start.map(a=>a.position-n.y.before),...r.y.center.map(a=>a.position-t.height/2),...r.y.end.map(a=>a.position-t.height+n.y.after)].map(Yy(0,o.y)))}}function C6(e,t,n){const r=jy(e),o=[...r[t].start,...r[t].center,...r[t].end];for(const a of o)if(n(a.node))return a.position}var Vy=e=>[...new Set(e)],Yy=(e,t)=>n=>Math.max(e,Math.min(t,n)),k6=Hi("carousel").parts("root","itemGroup","item","control","nextTrigger","prevTrigger","indicatorGroup","indicator","autoplayTrigger"),Nr=k6.build(),N6=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.root)!=null?n:`carousel:${e.id}`},O6=(e,t)=>{var n,r,o;return(o=(r=(n=e.ids)==null?void 0:n.item)==null?void 0:r.call(n,t))!=null?o:`carousel:${e.id}:item:${t}`},pl=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.itemGroup)!=null?n:`carousel:${e.id}:item-group`},I6=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.nextTrigger)!=null?n:`carousel:${e.id}:next-trigger`},R6=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.prevTrigger)!=null?n:`carousel:${e.id}:prev-trigger`},P6=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.indicatorGroup)!=null?n:`carousel:${e.id}:indicator-group`},Wy=(e,t)=>{var n,r,o;return(o=(r=(n=e.ids)==null?void 0:n.indicator)==null?void 0:r.call(n,t))!=null?o:`carousel:${e.id}:indicator:${t}`},hn=e=>e.getById(pl(e)),qy=e=>ZR(hn(e),"[data-part=item]"),L6=(e,t)=>e.getById(Wy(e,t)),Gy=e=>{const t=hn(e);if(!t)return;const n=Po(t);t.setAttribute("tabindex",n.length>0?"-1":"0")};function D6(e,t){const{state:n,context:r,computed:o,send:a,scope:u,prop:c}=e,d=n.matches("autoplay"),h=n.matches("dragging"),m=o("canScrollNext"),E=o("canScrollPrev"),T=o("isHorizontal"),b=Array.from(r.get("pageSnapPoints")),_=r.get("page"),w=c("slidesPerPage"),A=c("padding"),C=c("translations");return{isPlaying:d,isDragging:h,page:_,pageSnapPoints:b,canScrollNext:m,canScrollPrev:E,getProgress(){return _/b.length},scrollToIndex(I,R){a({type:"INDEX.SET",index:I,instant:R})},scrollTo(I,R){a({type:"PAGE.SET",index:I,instant:R})},scrollNext(I){a({type:"PAGE.NEXT",instant:I})},scrollPrev(I){a({type:"PAGE.PREV",instant:I})},play(){a({type:"AUTOPLAY.START"})},pause(){a({type:"AUTOPLAY.PAUSE"})},isInView(I){return Array.from(r.get("slidesInView")).includes(I)},refresh(){a({type:"SNAP.REFRESH"})},getRootProps(){return t.element(ne(U({},Nr.root.attrs),{id:N6(u),role:"region","aria-roledescription":"carousel","data-orientation":c("orientation"),dir:c("dir"),style:{"--slides-per-page":w,"--slide-spacing":c("spacing"),"--slide-item-size":"calc(100% / var(--slides-per-page) - var(--slide-spacing) * (var(--slides-per-page) - 1) / var(--slides-per-page))"}}))},getItemGroupProps(){return t.element(ne(U({},Nr.itemGroup.attrs),{id:pl(u),"data-orientation":c("orientation"),"data-dragging":ko(h),dir:c("dir"),"aria-live":d?"off":"polite",onFocus(I){No(I.currentTarget,Gn(I))&&a({type:"VIEWPORT.FOCUS"})},onBlur(I){No(I.currentTarget,I.relatedTarget)||a({type:"VIEWPORT.BLUR"})},onMouseDown(I){if(I.defaultPrevented||!c("allowMouseDrag")||!SE(I))return;const R=Gn(I);dr(R)&&R!==I.currentTarget||(I.preventDefault(),a({type:"DRAGGING.START"}))},onWheel:ZI(I=>{const R=c("orientation")==="horizontal"?"deltaX":"deltaY";I[R]<0&&!o("canScrollPrev")||I[R]>0&&!o("canScrollNext")||a({type:"USER.SCROLL"})},150),onTouchStart(){a({type:"USER.SCROLL"})},style:{display:"grid",gap:"var(--slide-spacing)",scrollSnapType:[T?"x":"y",c("snapType")].join(" "),gridAutoFlow:T?"column":"row",scrollbarWidth:"none",overscrollBehaviorX:"contain",[T?"gridAutoColumns":"gridAutoRows"]:"var(--slide-item-size)",[T?"scrollPaddingInline":"scrollPaddingBlock"]:A,[T?"paddingInline":"paddingBlock"]:A,[T?"overflowX":"overflowY"]:"auto"}}))},getItemProps(I){const R=r.get("slidesInView").includes(I.index);return t.element(ne(U({},Nr.item.attrs),{id:O6(u,I.index),dir:c("dir"),role:"group","data-index":I.index,"data-inview":ko(R),"aria-roledescription":"slide","data-orientation":c("orientation"),"aria-label":C.item(I.index,c("slideCount")),"aria-hidden":yE(!R),style:{scrollSnapAlign:(()=>{var ce;const F=(ce=I.snapAlign)!=null?ce:"start",z=c("slidesPerMove"),D=z==="auto"?Math.floor(c("slidesPerPage")):z;return(I.index+D)%D===0?F:void 0})()}}))},getControlProps(){return t.element(ne(U({},Nr.control.attrs),{"data-orientation":c("orientation")}))},getPrevTriggerProps(){return t.button(ne(U({},Nr.prevTrigger.attrs),{id:R6(u),type:"button",disabled:!E,dir:c("dir"),"aria-label":C.prevTrigger,"data-orientation":c("orientation"),"aria-controls":pl(u),onClick(I){I.defaultPrevented||a({type:"PAGE.PREV",src:"trigger"})}}))},getNextTriggerProps(){return t.button(ne(U({},Nr.nextTrigger.attrs),{dir:c("dir"),id:I6(u),type:"button","aria-label":C.nextTrigger,"data-orientation":c("orientation"),"aria-controls":pl(u),disabled:!m,onClick(I){I.defaultPrevented||a({type:"PAGE.NEXT",src:"trigger"})}}))},getIndicatorGroupProps(){return t.element(ne(U({},Nr.indicatorGroup.attrs),{dir:c("dir"),id:P6(u),"data-orientation":c("orientation"),onKeyDown(I){if(I.defaultPrevented)return;const R="indicator",F={ArrowDown(q){T||(a({type:"PAGE.NEXT",src:R}),q.preventDefault())},ArrowUp(q){T||(a({type:"PAGE.PREV",src:R}),q.preventDefault())},ArrowRight(q){T&&(a({type:"PAGE.NEXT",src:R}),q.preventDefault())},ArrowLeft(q){T&&(a({type:"PAGE.PREV",src:R}),q.preventDefault())},Home(q){a({type:"PAGE.SET",index:0,src:R}),q.preventDefault()},End(q){a({type:"PAGE.SET",index:b.length-1,src:R}),q.preventDefault()}},z=MR(I,{dir:c("dir"),orientation:c("orientation")}),D=F[z];D==null||D(I)}}))},getIndicatorProps(I){return t.button(ne(U({},Nr.indicator.attrs),{dir:c("dir"),id:Wy(u,I.index),type:"button","data-orientation":c("orientation"),"data-index":I.index,"data-readonly":ko(I.readOnly),"data-current":ko(I.index===_),"aria-label":C.indicator(I.index),onClick(R){R.defaultPrevented||I.readOnly||a({type:"PAGE.SET",index:I.index,src:"indicator"})}}))},getAutoplayTriggerProps(){return t.button(ne(U({},Nr.autoplayTrigger.attrs),{type:"button","data-orientation":c("orientation"),"data-pressed":ko(d),"aria-label":d?C.autoplayStop:C.autoplayStart,onClick(I){I.defaultPrevented||a({type:d?"AUTOPLAY.PAUSE":"AUTOPLAY.START"})}}))}}}var M6={props({props:e}){return oR(e,["slideCount"],"carousel"),ne(U({dir:"ltr",defaultPage:0,orientation:"horizontal",snapType:"mandatory",loop:!!e.autoplay,slidesPerPage:1,slidesPerMove:"auto",spacing:"0px",autoplay:!1,allowMouseDrag:!1,inViewThreshold:.6},e),{translations:U({nextTrigger:"Next slide",prevTrigger:"Previous slide",indicator:t=>`Go to slide ${t+1}`,item:(t,n)=>`${t+1} of ${n}`,autoplayStart:"Start slide rotation",autoplayStop:"Stop slide rotation"},e.translations)})},refs(){return{timeoutRef:void 0}},initialState({prop:e}){return e("autoplay")?"autoplay":"idle"},context({prop:e,bindable:t,getContext:n}){return{page:t(()=>({defaultValue:e("defaultPage"),value:e("page"),onChange(r){var u;const a=n().get("pageSnapPoints");(u=e("onPageChange"))==null||u({page:r,pageSnapPoint:a[r]})}})),pageSnapPoints:t(()=>({defaultValue:F6(e("slideCount"),e("slidesPerMove"),e("slidesPerPage"))})),slidesInView:t(()=>({defaultValue:[]}))}},computed:{isRtl:({prop:e})=>e("dir")==="rtl",isHorizontal:({prop:e})=>e("orientation")==="horizontal",canScrollNext:({prop:e,context:t})=>e("loop")||t.get("page")<t.get("pageSnapPoints").length-1,canScrollPrev:({prop:e,context:t})=>e("loop")||t.get("page")>0,autoplayInterval:({prop:e})=>{const t=e("autoplay");return jI(t)?t.delay:4e3}},watch({track:e,action:t,context:n,prop:r,send:o}){e([()=>r("slidesPerPage"),()=>r("slidesPerMove")],()=>{t(["setSnapPoints"])}),e([()=>n.get("page")],()=>{t(["scrollToPage","focusIndicatorEl"])}),e([()=>r("orientation")],()=>{t(["setSnapPoints","scrollToPage"])}),e([()=>r("slideCount")],()=>{o({type:"SNAP.REFRESH",src:"slide.count"})}),e([()=>!!r("autoplay")],()=>{o({type:r("autoplay")?"AUTOPLAY.START":"AUTOPLAY.PAUSE",src:"autoplay.prop.change"})})},on:{"PAGE.NEXT":{target:"idle",actions:["clearScrollEndTimer","setNextPage"]},"PAGE.PREV":{target:"idle",actions:["clearScrollEndTimer","setPrevPage"]},"PAGE.SET":{target:"idle",actions:["clearScrollEndTimer","setPage"]},"INDEX.SET":{target:"idle",actions:["clearScrollEndTimer","setMatchingPage"]},"SNAP.REFRESH":{actions:["setSnapPoints","clampPage"]},"PAGE.SCROLL":{actions:["scrollToPage"]}},effects:["trackSlideMutation","trackSlideIntersections","trackSlideResize"],entry:["setSnapPoints","setPage"],exit:["clearScrollEndTimer"],states:{idle:{on:{"DRAGGING.START":{target:"dragging",actions:["invokeDragStart"]},"AUTOPLAY.START":{target:"autoplay",actions:["invokeAutoplayStart"]},"USER.SCROLL":{target:"userScroll"},"VIEWPORT.FOCUS":{target:"focus"}}},focus:{effects:["trackKeyboardScroll"],on:{"VIEWPORT.BLUR":{target:"idle"},"PAGE.NEXT":{actions:["clearScrollEndTimer","setNextPage"]},"PAGE.PREV":{actions:["clearScrollEndTimer","setPrevPage"]},"PAGE.SET":{actions:["clearScrollEndTimer","setPage"]},"INDEX.SET":{actions:["clearScrollEndTimer","setMatchingPage"]},"USER.SCROLL":{target:"userScroll"}}},dragging:{effects:["trackPointerMove"],entry:["disableScrollSnap"],on:{DRAGGING:{actions:["scrollSlides","invokeDragging"]},"DRAGGING.END":{target:"idle",actions:["endDragging","invokeDraggingEnd"]}}},userScroll:{effects:["trackScroll"],on:{"SCROLL.END":[{guard:"isFocused",target:"focus",actions:["setClosestPage"]},{target:"idle",actions:["setClosestPage"]}]}},autoplay:{effects:["trackDocumentVisibility","trackScroll","autoUpdateSlide"],exit:["invokeAutoplayEnd"],on:{"AUTOPLAY.TICK":{actions:["setNextPage","invokeAutoplay"]},"DRAGGING.START":{target:"dragging",actions:["invokeDragStart"]},"AUTOPLAY.PAUSE":{target:"idle"}}}},implementations:{guards:{isFocused:({scope:e})=>e.isActiveElement(hn(e))},effects:{autoUpdateSlide({computed:e,send:t}){const n=setInterval(()=>{t({type:e("canScrollNext")?"AUTOPLAY.TICK":"AUTOPLAY.PAUSE",src:"autoplay.interval"})},e("autoplayInterval"));return()=>clearInterval(n)},trackSlideMutation({scope:e,send:t}){const n=hn(e);if(!n)return;const r=e.getWin(),o=new r.MutationObserver(()=>{t({type:"SNAP.REFRESH",src:"slide.mutation"}),Gy(e)});return Gy(e),o.observe(n,{childList:!0,subtree:!0}),()=>o.disconnect()},trackSlideResize({scope:e,send:t}){if(!hn(e))return;const r=e.getWin(),o=()=>{t({type:"SNAP.REFRESH",src:"slide.resize"})};kt(()=>{o(),kt(()=>{t({type:"PAGE.SCROLL",instant:!0})})});const a=new r.ResizeObserver(o);return qy(e).forEach(u=>a.observe(u)),()=>a.disconnect()},trackSlideIntersections({scope:e,prop:t,context:n}){const r=hn(e),o=e.getWin(),a=new o.IntersectionObserver(u=>{const c=u.reduce((d,h)=>{var T;const m=h.target,E=Number((T=m.dataset.index)!=null?T:"-1");return E==null||Number.isNaN(E)||E===-1?d:h.isIntersecting?FI(d,E):BI(d,E)},n.get("slidesInView"));n.set("slidesInView",UI(c))},{root:r,threshold:t("inViewThreshold")});return qy(e).forEach(u=>a.observe(u)),()=>a.disconnect()},trackScroll({send:e,refs:t,scope:n}){const r=hn(n);return r?Mt(r,"scroll",()=>{clearTimeout(t.get("timeoutRef")),t.set("timeoutRef",void 0),t.set("timeoutRef",setTimeout(()=>{e({type:"SCROLL.END"})},150))},{passive:!0}):void 0},trackDocumentVisibility({scope:e,send:t}){const n=e.getDoc();return Mt(n,"visibilitychange",()=>{n.visibilityState!=="visible"&&t({type:"AUTOPLAY.PAUSE",src:"doc.hidden"})})},trackPointerMove({scope:e,send:t}){const n=e.getDoc();return QR(n,{onPointerMove({event:r}){t({type:"DRAGGING",left:-r.movementX,top:-r.movementY})},onPointerUp(){t({type:"DRAGGING.END"})}})},trackKeyboardScroll({scope:e,send:t,context:n}){const r=e.getWin();return Mt(r,"keydown",a=>{switch(a.key){case"ArrowRight":a.preventDefault(),t({type:"PAGE.NEXT"});break;case"ArrowLeft":a.preventDefault(),t({type:"PAGE.PREV"});break;case"Home":a.preventDefault(),t({type:"PAGE.SET",index:0});break;case"End":a.preventDefault(),t({type:"PAGE.SET",index:n.get("pageSnapPoints").length-1})}},{capture:!0})}},actions:{clearScrollEndTimer({refs:e}){e.get("timeoutRef")!=null&&(clearTimeout(e.get("timeoutRef")),e.set("timeoutRef",void 0))},scrollToPage({context:e,event:t,scope:n,computed:r,flush:o}){var h;const a=t.instant?"instant":"smooth",u=gE((h=t.index)!=null?h:e.get("page"),0,e.get("pageSnapPoints").length-1),c=hn(n);if(!c)return;const d=r("isHorizontal")?"left":"top";o(()=>{c.scrollTo({[d]:e.get("pageSnapPoints")[u],behavior:a})})},setClosestPage({context:e,scope:t,computed:n}){const r=hn(t);if(!r)return;const o=n("isHorizontal")?r.scrollLeft:r.scrollTop,a=e.get("pageSnapPoints").findIndex(u=>Math.abs(u-o)<1);a!==-1&&e.set("page",a)},setNextPage({context:e,prop:t,state:n}){const r=n.matches("autoplay")||t("loop"),o=hE(e.get("pageSnapPoints"),e.get("page"),{loop:r});e.set("page",o)},setPrevPage({context:e,prop:t,state:n}){const r=n.matches("autoplay")||t("loop"),o=HI(e.get("pageSnapPoints"),e.get("page"),{loop:r});e.set("page",o)},setMatchingPage({context:e,event:t,computed:n,scope:r}){const o=hn(r);if(!o)return;const a=C6(o,n("isHorizontal")?"x":"y",c=>c.dataset.index===t.index.toString());if(a==null)return;const u=e.get("pageSnapPoints").findIndex(c=>Math.abs(c-a)<1);e.set("page",u)},setPage({context:e,event:t}){var r;const n=(r=t.index)!=null?r:e.get("page");e.set("page",n)},clampPage({context:e}){const t=gE(e.get("page"),0,e.get("pageSnapPoints").length-1);e.set("page",t)},setSnapPoints({context:e,computed:t,scope:n}){const r=hn(n);if(!r)return;const o=$y(r);e.set("pageSnapPoints",t("isHorizontal")?o.x:o.y)},disableScrollSnap({scope:e}){const t=hn(e);if(!t)return;const n=getComputedStyle(t);t.dataset.scrollSnapType=n.getPropertyValue("scroll-snap-type"),t.style.setProperty("scroll-snap-type","none")},scrollSlides({scope:e,event:t}){const n=hn(e);n==null||n.scrollBy({left:t.left,top:t.top,behavior:"instant"})},endDragging({scope:e,context:t,computed:n}){const r=hn(e);if(!r)return;const o=r.scrollLeft,a=r.scrollTop,u=$y(r),c=u.x.reduce((h,m)=>Math.abs(m-o)<Math.abs(h-o)?m:h,u.x[0]),d=u.y.reduce((h,m)=>Math.abs(m-a)<Math.abs(h-a)?m:h,u.y[0]);kt(()=>{r.scrollTo({left:c,top:d,behavior:"smooth"});const h=n("isHorizontal")?c:d;t.set("page",t.get("pageSnapPoints").indexOf(h));const m=r.dataset.scrollSnapType;m&&(r.style.setProperty("scroll-snap-type",m),delete r.dataset.scrollSnapType)})},focusIndicatorEl({context:e,event:t,scope:n}){if(t.src!=="indicator")return;const r=L6(n,e.get("page"));r&&kt(()=>r.focus({preventScroll:!0}))},invokeDragStart({context:e,prop:t}){var n;(n=t("onDragStatusChange"))==null||n({type:"dragging.start",isDragging:!0,page:e.get("page")})},invokeDragging({context:e,prop:t}){var n;(n=t("onDragStatusChange"))==null||n({type:"dragging",isDragging:!0,page:e.get("page")})},invokeDraggingEnd({context:e,prop:t}){var n;(n=t("onDragStatusChange"))==null||n({type:"dragging.end",isDragging:!1,page:e.get("page")})},invokeAutoplay({context:e,prop:t}){var n;(n=t("onAutoplayStatusChange"))==null||n({type:"autoplay",isPlaying:!0,page:e.get("page")})},invokeAutoplayStart({context:e,prop:t}){var n;(n=t("onAutoplayStatusChange"))==null||n({type:"autoplay.start",isPlaying:!0,page:e.get("page")})},invokeAutoplayEnd({context:e,prop:t}){var n;(n=t("onAutoplayStatusChange"))==null||n({type:"autoplay.stop",isPlaying:!1,page:e.get("page")})}}}};function F6(e,t,n){if(e==null||n<=0)return[];const r=[],o=t==="auto"?Math.floor(n):t;if(o<=0)return[];for(let a=0;a<e&&!(a+n>e);a+=o)r.push(a);return r}Mo()(["dir","getRootNode","id","ids","loop","page","defaultPage","onPageChange","orientation","slideCount","slidesPerPage","slidesPerMove","spacing","padding","autoplay","allowMouseDrag","inViewThreshold","translations","snapType","onDragStatusChange","onAutoplayStatusChange"]),Mo()(["index","readOnly"]),Mo()(["index","snapAlign"]);const B6=e=>{const t=Z.useId(),{getRootNode:n}=hl(),{dir:r}=Qf(),o=U({id:t,dir:r,getRootNode:n},e),a=el(M6,o);return D6(a,Of)},Ky=Z.forwardRef((e,t)=>{const[n,r]=ia()(e,["allowMouseDrag","autoplay","defaultPage","id","ids","inViewThreshold","loop","onAutoplayStatusChange","onDragStatusChange","onPageChange","orientation","padding","page","slideCount","slidesPerMove","slidesPerPage","snapType","spacing","translations"]),o=B6(n),a=Nt(o.getRootProps(),r);return P.jsx(S6,{value:o,children:P.jsx(Kt.div,ne(U({},a),{ref:t}))})});Ky.displayName="CarouselRoot";const U6=180,H6=e=>{const t=e.trim(),n=parseFloat(t);return Number.isNaN(n)?0:t.endsWith("rem")?n*16:n},z6=({globalClassName:e,className:t,itemMinWidth:n=U6,spacing:r="0.5rem",loop:o=!1,allowMouseDrag:a=!0,showIndicators:u=!0,showNavigation:c=!0,onPageChange:d,ariaLabel:h="Product carousel",children:m})=>{const E=Array.from(m),T=E.length,b=Z.useRef(null),[_,w]=Z.useState(0),{width:A}=IS();Z.useLayoutEffect(()=>{b.current&&w(b.current.getBoundingClientRect().width)},[A,T]);const C=H6(r),I=n+C,R=_>0?(_+C)/I:1,F=Math.max(1,Math.floor(R));if(T===0)return null;const z=T>F,D=Math.ceil(T/F),q=z?Math.max(1,R):F;return P.jsxs(Ky,{ref:b,className:re(e,t,`${J}-carousel`),slidesPerPage:q,slidesPerMove:F,spacing:r,loop:o,allowMouseDrag:a,slideCount:T,onPageChange:d,"aria-label":h,children:[P.jsx(By,{className:re(e,`${J}-carousel__item-group`,{"carousel-row-container":!z}),children:E.map((ce,be)=>P.jsx(Fy,{index:be,className:re(e,`${J}-carousel__item`),children:ce},be))}),c&&z&&P.jsxs(Ly,{className:re(e,`${J}-carousel__control`),children:[P.jsx(Hy,{className:re(e,`${J}-carousel__prev-trigger`),"aria-label":"Previous slide",children:P.jsx(x6,{})}),P.jsx(Uy,{className:re(e,`${J}-carousel__next-trigger`),"aria-label":"Next slide",children:P.jsx(_6,{})})]}),u&&z&&P.jsx(My,{className:re(e,`${J}-carousel__indicator-group`),children:Array.from({length:D},(ce,be)=>P.jsx(Dy,{index:be,className:re(e,`${J}-carousel__indicator`),"aria-label":`Go to slide group ${be+1}`},be))})]})},j6=({className:e,label:t="Close",onClick:n,disabled:r=!1})=>P.jsx("button",{"aria-label":t,className:re(e,`${J}-close-button`),disabled:r,onClick:n,children:P.jsx("svg",{role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 20",width:"16",height:"16",fill:"currentColor",children:P.jsx("path",{d:"M18.3 5.7a1 1 0 0 0-1.4-1.4L12 9.6 7.1 4.7a1 1 0 1 0-1.4 1.4l4.9 4.9-4.9 4.9a1 1 0 1 0 1.4 1.4l4.9-4.9 4.9 4.9a1 1 0 0 0 1.4-1.4l-4.9-4.9 4.9-4.9z"})})}),[$6,V6]=Ui({name:"RenderStrategyContext",hookName:"useRenderStrategyContext",providerName:"<RenderStrategyPropsProvider />"}),Y6=e=>ia()(e,["lazyMount","unmountOnExit"]),[W6,da]=Ui({name:"DialogContext",hookName:"useDialogContext",providerName:"<DialogProvider />"}),Qy=Z.forwardRef((e,t)=>{const n=da(),r=V6(),o=Pf(ne(U({},r),{present:n.open})),a=Nt(n.getBackdropProps(),o.getPresenceProps(),e);return o.unmounted?null:P.jsx(Kt.div,ne(U({},a),{ref:tl(o.ref,t)}))});Qy.displayName="DialogBackdrop";const Xf=Z.forwardRef((e,t)=>{const n=da(),r=ra(),o=Nt(n.getContentProps(),r.getPresenceProps(),e);return r.unmounted?null:P.jsx(Kt.div,ne(U({},o),{ref:tl(r.ref,t)}))});Xf.displayName="DialogContent";const Jf=Z.forwardRef((e,t)=>{const n=da(),r=Nt(n.getDescriptionProps(),e);return P.jsx(Kt.div,ne(U({},r),{ref:t}))});Jf.displayName="DialogDescription";const Zf=Z.forwardRef((e,t)=>{const n=da(),r=Nt(n.getPositionerProps(),e);return ra().unmounted?null:P.jsx(Kt.div,ne(U({},r),{ref:t}))});Zf.displayName="DialogPositioner";var q6=Hi("dialog").parts("trigger","backdrop","positioner","content","title","description","closeTrigger"),$i=q6.build(),Xy=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.positioner)!=null?n:`dialog:${e.id}:positioner`},Jy=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.backdrop)!=null?n:`dialog:${e.id}:backdrop`},eh=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.content)!=null?n:`dialog:${e.id}:content`},Zy=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.trigger)!=null?n:`dialog:${e.id}:trigger`},th=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.title)!=null?n:`dialog:${e.id}:title`},nh=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.description)!=null?n:`dialog:${e.id}:description`},eT=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.closeTrigger)!=null?n:`dialog:${e.id}:close`},ml=e=>e.getById(eh(e)),G6=e=>e.getById(Xy(e)),K6=e=>e.getById(Jy(e)),Q6=e=>e.getById(Zy(e)),X6=e=>e.getById(th(e)),J6=e=>e.getById(nh(e)),Z6=e=>e.getById(eT(e));function e4(e,t){const{state:n,send:r,context:o,prop:a,scope:u}=e,c=a("aria-label"),d=n.matches("open");return{open:d,setOpen(h){n.matches("open")!==h&&r({type:h?"OPEN":"CLOSE"})},getTriggerProps(){return t.button(ne(U({},$i.trigger.attrs),{dir:a("dir"),id:Zy(u),"aria-haspopup":"dialog",type:"button","aria-expanded":d,"data-state":d?"open":"closed","aria-controls":eh(u),onClick(h){h.defaultPrevented||r({type:"TOGGLE"})}}))},getBackdropProps(){return t.element(ne(U({},$i.backdrop.attrs),{dir:a("dir"),hidden:!d,id:Jy(u),"data-state":d?"open":"closed"}))},getPositionerProps(){return t.element(ne(U({},$i.positioner.attrs),{dir:a("dir"),id:Xy(u),style:{pointerEvents:d?void 0:"none"}}))},getContentProps(){const h=o.get("rendered");return t.element(ne(U({},$i.content.attrs),{dir:a("dir"),role:a("role"),hidden:!d,id:eh(u),tabIndex:-1,"data-state":d?"open":"closed","aria-modal":!0,"aria-label":c||void 0,"aria-labelledby":c||!h.title?void 0:th(u),"aria-describedby":h.description?nh(u):void 0}))},getTitleProps(){return t.element(ne(U({},$i.title.attrs),{dir:a("dir"),id:th(u)}))},getDescriptionProps(){return t.element(ne(U({},$i.description.attrs),{dir:a("dir"),id:nh(u)}))},getCloseTriggerProps(){return t.button(ne(U({},$i.closeTrigger.attrs),{dir:a("dir"),id:eT(u),type:"button",onClick(h){h.defaultPrevented||(h.stopPropagation(),r({type:"CLOSE"}))}}))}}}var t4={props({props:e,scope:t}){const n=e.role==="alertdialog",r=n?()=>Z6(t):void 0,o=typeof e.modal=="boolean"?e.modal:!0;return U({role:"dialog",modal:o,trapFocus:o,preventScroll:o,closeOnInteractOutside:!n,closeOnEscape:!0,restoreFocus:!0,initialFocusEl:r},e)},initialState({prop:e}){return e("open")||e("defaultOpen")?"open":"closed"},context({bindable:e}){return{rendered:e(()=>({defaultValue:{title:!0,description:!0}}))}},watch({track:e,action:t,prop:n}){e([()=>n("open")],()=>{t(["toggleVisibility"])})},states:{open:{entry:["checkRenderedElements","syncZIndex"],effects:["trackDismissableElement","trapFocus","preventScroll","hideContentBelow"],on:{"CONTROLLED.CLOSE":{target:"closed"},CLOSE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["invokeOnClose"]}],TOGGLE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["invokeOnClose"]}]}},closed:{on:{"CONTROLLED.OPEN":{target:"open"},OPEN:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen"]}],TOGGLE:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen"]}]}}},implementations:{guards:{isOpenControlled:({prop:e})=>e("open")!=null},effects:{trackDismissableElement({scope:e,send:t,prop:n}){return Ty(()=>ml(e),{type:"dialog",defer:!0,pointerBlocking:n("modal"),exclude:[Q6(e)],onInteractOutside(o){var a;(a=n("onInteractOutside"))==null||a(o),n("closeOnInteractOutside")||o.preventDefault()},persistentElements:n("persistentElements"),onFocusOutside:n("onFocusOutside"),onPointerDownOutside:n("onPointerDownOutside"),onRequestDismiss:n("onRequestDismiss"),onEscapeKeyDown(o){var a;(a=n("onEscapeKeyDown"))==null||a(o),n("closeOnEscape")||o.preventDefault()},onDismiss(){t({type:"CLOSE",src:"interact-outside"})}})},preventScroll({scope:e,prop:t}){if(t("preventScroll"))return Sy(e.getDoc())},trapFocus({scope:e,prop:t}){return t("trapFocus")?_y(()=>ml(e),{preventScroll:!0,returnFocusOnDeactivate:!!t("restoreFocus"),initialFocus:t("initialFocusEl"),setReturnFocus:r=>{var o,a;return(a=(o=t("finalFocusEl"))==null?void 0:o())!=null?a:r},getShadowRoot:!0}):void 0},hideContentBelow({scope:e,prop:t}){return t("modal")?cy(()=>[ml(e)],{defer:!0}):void 0}},actions:{checkRenderedElements({context:e,scope:t}){kt(()=>{e.set("rendered",{title:!!X6(t),description:!!J6(t)})})},syncZIndex({scope:e}){kt(()=>{const t=ml(e);if(!t)return;const n=Ro(t);[G6(e),K6(e)].forEach(o=>{o==null||o.style.setProperty("--z-index",n.zIndex),o==null||o.style.setProperty("--layer-index",n.getPropertyValue("--layer-index"))})})},invokeOnClose({prop:e}){var t;(t=e("onOpenChange"))==null||t({open:!1})},invokeOnOpen({prop:e}){var t;(t=e("onOpenChange"))==null||t({open:!0})},toggleVisibility({prop:e,send:t,event:n}){t({type:e("open")?"CONTROLLED.OPEN":"CONTROLLED.CLOSE",previousEvent:n})}}}};Mo()(["aria-label","closeOnEscape","closeOnInteractOutside","dir","finalFocusEl","getRootNode","getRootNode","id","id","ids","initialFocusEl","modal","onEscapeKeyDown","onFocusOutside","onInteractOutside","onOpenChange","onPointerDownOutside","onRequestDismiss","defaultOpen","open","persistentElements","preventScroll","restoreFocus","role","trapFocus"]);const n4=e=>{const t=Z.useId(),{getRootNode:n}=hl(),{dir:r}=Qf(),o=U({id:t,getRootNode:n,dir:r},e),a=el(t4,o);return e4(a,Of)},tT=e=>{const[t,c]=HE(e),d=c,{children:n}=d,r=on(d,["children"]),[o]=Y6(t),a=n4(r),u=Pf(Nt({present:a.open},t));return P.jsx(W6,{value:a,children:P.jsx($6,{value:o,children:P.jsx(FE,{value:u,children:n})})})},nT=Z.forwardRef((e,t)=>{const n=da(),r=Nt(n.getTitleProps(),e);return P.jsx(Kt.h2,ne(U({},r),{ref:t}))});nT.displayName="DialogTitle";const r4=({children:e})=>{const[t,n]=Z.useState(!1),r=Z.useMemo(()=>({toggleMenu:()=>n(a=>!a),closeMenu:()=>n(!1)}),[]),o=Z.useMemo(()=>({isOpen:t}),[t]);return P.jsx(gf.Provider,{value:r,children:P.jsx(cE.Provider,{value:o,children:e})})},rT=()=>Z.useContext(cE),iT=()=>{const e=Z.useContext(gf);if(!e)throw new Error("useOverflowMenuDispatch must be used within an OverflowMenuProvider");return e},i4=`${J}-overflow-menu-button-trigger`,o4=({componentType:e,children:t})=>{const{isOpen:n}=rT(),{closeMenu:r}=iT(),{globalClassName:o}=Ht(),a=Z.useRef(null);return Z.useEffect(()=>{if(!n)return;const u=d=>{d.key==="Escape"&&r()},c=d=>{const h=d.target;h instanceof Element&&h.closest(`.${i4}`)||a.current&&!a.current.contains(h)&&r()};return document.addEventListener("keydown",u),document.addEventListener("mousedown",c),()=>{document.removeEventListener("keydown",u),document.removeEventListener("mousedown",c)}},[n,r]),n?P.jsx("div",{ref:a,role:"menu","aria-label":`Overflow menu for ${e}`,className:re(`${J}-overflow-panel`,o,`cim-${e}-component`),children:t}):null},s4=({componentType:e,className:t})=>{const{toggleMenu:n}=iT(),{isOpen:r}=rT(),{globalClassName:o}=Ht();return P.jsx("button",{"aria-label":`Overflow menu for ${e}`,"aria-expanded":r,"aria-haspopup":"menu",className:re(`${J}-overflow-menu-button-trigger`,`${J}-icon-button`,o,t,`cim-${e}-component`),onClick:n,children:P.jsx(Iy,{})})},a4=({componentType:e,isIcon:t})=>{const{globalClassName:n}=Ht(),{previousComponentType:r}=Ci(),o=ea(),a=()=>{Tu(r||"dialog"),o()};return t?P.jsx(jr,{className:re(n,`${J}-toggle-dialog-button`,`cim-${e}-component`),ariaLabel:"Toggle Dialog",onClick:a,icon:P.jsx(Ry,{})}):P.jsxs("button",{className:re(n,`${J}-overflow-menu-button`,`${J}-toggle-dialog-button`,`cim-${e}-component`),onClick:a,children:[P.jsx(Ry,{}),"Show ",r||"dialog"]})},u4=({componentType:e,isIcon:t})=>{const{globalClassName:n}=Ht(),{isModalFullscreen:r}=Ci(),o=ea(),a=()=>{dd(!r),o()},u=r?ZS:eA,c="Toggle Fullscreen";return t?P.jsx(jr,{ariaLabel:c,title:c,className:re(n,`${J}-modal-fullscreen-button`,`cim-${e}-component`),icon:P.jsx(u,{}),onClick:a}):P.jsxs("button",{className:re(n,`${J}-overflow-menu-button`,`${J}-modal-fullscreen-button`,`cim-${e}-component`),onClick:a,children:[P.jsx(u,{}),c]})},l4=({componentType:e,isIcon:t})=>{const{globalClassName:n}=Ht(),{dialogPosition:r}=Ci(),o=ea(),a=r==="bottom-left",u=()=>{fd(a?"bottom-right":"bottom-left"),o()},c=a?b6:T6,d=a?"Move right":"Move left";return t?P.jsx(jr,{className:re(n,`${J}-left-right-toggle-button`,`cim-${e}-component`),ariaLabel:d,onClick:u,icon:P.jsx(c,{})}):P.jsxs("button",{className:re(n,`${J}-overflow-menu-button`,`${J}-left-right-toggle-button`,`cim-${e}-component`),onClick:u,children:[P.jsx(c,{}),d]})},oT=({componentType:e,onClearChat:t,onClose:n})=>{const{headerConfig:r,globalClassName:o}=Ht(),{mode:a}=Ci(),u=a==="standalone",c=e==="modal",d=c?a4:sT,h=c?u4:l4,m=Z.useMemo(()=>r?XS(r):{},[r]);return P.jsx(r4,{children:P.jsxs("div",{className:re(o,`${J}-${e}-header-wrapper`),style:{display:"flex",flexDirection:"column",position:"relative"},children:[P.jsxs("div",{className:re(o,`${J}-${e}-header`,{standalone:u,embedded:!u}),style:m,children:[(r==null?void 0:r.logoUrl)&&P.jsx("img",{alt:"",role:"img",className:re(o,`${J}-${e}-logo`,{standalone:u,embedded:!u}),src:r.logoUrl}),P.jsx(nT,{className:re(o,`${J}-${e}-title`,{standalone:u,embedded:!u}),children:r==null?void 0:r.headerText}),P.jsxs("div",{className:re(o,`${J}-${e}-controls`),children:[P.jsx(d,{componentType:e,isIcon:!0}),P.jsx(s4,{componentType:e}),P.jsx(j6,{className:re(o,`cim-${e}-component`),onClick:n})]})]}),P.jsxs(o4,{componentType:e,children:[P.jsx(h,{componentType:e}),P.jsx(d4,{componentType:e}),P.jsx(fE,{componentType:e,onClearChat:t})]})]})})},c4=({className:e,globalClassName:t,suggestions:n,disabled:r,isWidgetStandalone:o,onSuggestionClick:a})=>{const u=o?"standalone":"embedded",c=d=>()=>{a(d)};return P.jsx("div",{className:re(t,`${J}-suggestion-container ${u}`,e),children:n.map(d=>o?P.jsx(_0,{disabled:r,className:re(t,`${J}-suggestion-button standalone`),onClick:c(d),children:d},d):P.jsx("button",{disabled:r,className:re(t,`${J}-suggestion-button embedded`),onClick:c(d),children:d},d))})},d4=({componentType:e,isIcon:t})=>{const{globalClassName:n,enableMinimize:r}=Ht();if(!r)return null;const o=()=>{vi(!1),yu(!0)};return t?P.jsx(jr,{className:re(n,`${J}-toggle-minimize-button`,`cim-${e}-component`),ariaLabel:"Toggle Minimize",title:"Minimize",onClick:o,icon:P.jsx(b0,{})}):P.jsxs("button",{className:re(n,`${J}-overflow-menu-button`,`${J}-toggle-minimize-button`,`cim-${e}-component`),onClick:o,children:[P.jsx(b0,{}),"Minimize"]})},sT=({componentType:e,isIcon:t})=>{const{globalClassName:n}=Ht(),r=ea(),o=()=>{Tu("modal"),r()};return t?P.jsx(jr,{className:re(n,`${J}-toggle-modal-button`,`cim-${e}-component`),ariaLabel:"Toggle Modal",onClick:o,icon:P.jsx(Py,{})}):P.jsxs("button",{className:re(n,`${J}-overflow-menu-button`,`${J}-toggle-modal-button`,`cim-${e}-component`),onClick:o,children:[P.jsx(Py,{}),"Show modal"]})};function aT(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,o=n.indexOf(t);for(;o!==-1;)r++,o=n.indexOf(t,o+t.length);return r}function f4(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function h4(e,t,n){const o=Ru((n||{}).ignore||[]),a=p4(t);let u=-1;for(;++u<a.length;)Pg(e,"text",c);function c(h,m){let E=-1,T;for(;++E<m.length;){const b=m[E],_=T?T.children:void 0;if(o(b,_?_.indexOf(b):void 0,T))return;T=b}if(T)return d(h,m)}function d(h,m){const E=m[m.length-1],T=a[u][0],b=a[u][1];let _=0;const A=E.children.indexOf(h);let C=!1,I=[];T.lastIndex=0;let R=T.exec(h.value);for(;R;){const F=R.index,z={index:R.index,input:R.input,stack:[...m,h]};let D=b(...R,z);if(typeof D=="string"&&(D=D.length>0?{type:"text",value:D}:void 0),D===!1?T.lastIndex=F+1:(_!==F&&I.push({type:"text",value:h.value.slice(_,F)}),Array.isArray(D)?I.push(...D):D&&I.push(D),_=F+R[0].length,C=!0),!T.global)break;R=T.exec(h.value)}return C?(_<h.value.length&&I.push({type:"text",value:h.value.slice(_)}),E.children.splice(A,1,...I)):I=[h],A+I.length}}function p4(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 o=n[r];t.push([m4(o[0]),g4(o[1])])}return t}function m4(e){return typeof e=="string"?new RegExp(f4(e),"g"):e}function g4(e){return typeof e=="function"?e:function(){return e}}const rh="phrasing",ih=["autolink","link","image","label"];function E4(){return{transforms:[S4],enter:{literalAutolink:T4,literalAutolinkEmail:oh,literalAutolinkHttp:oh,literalAutolinkWww:oh},exit:{literalAutolink:w4,literalAutolinkEmail:_4,literalAutolinkHttp:b4,literalAutolinkWww:x4}}}function y4(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:rh,notInConstruct:ih},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:rh,notInConstruct:ih},{character:":",before:"[ps]",after:"\\/",inConstruct:rh,notInConstruct:ih}]}}function T4(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function oh(e){this.config.enter.autolinkProtocol.call(this,e)}function b4(e){this.config.exit.autolinkProtocol.call(this,e)}function x4(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 _4(e){this.config.exit.autolinkEmail.call(this,e)}function w4(e){this.exit(e)}function S4(e){h4(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,A4],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),v4]],{ignore:["link","linkReference"]})}function A4(e,t,n,r,o){let a="";if(!uT(o)||(/^w/i.test(t)&&(n=t+n,t="",a="http://"),!C4(n)))return!1;const u=k4(n+r);if(!u[0])return!1;const c={type:"link",title:null,url:a+t+u[0],children:[{type:"text",value:t+u[0]}]};return u[1]?[c,{type:"text",value:u[1]}]:c}function v4(e,t,n,r){return!uT(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function C4(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 k4(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const o=aT(e,"(");let a=aT(e,")");for(;r!==-1&&o>a;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),a++;return[e,n]}function uT(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||Oi(n)||Au(n))&&(!t||n!==47)}lT.peek=F4;function N4(){this.buffer()}function O4(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function I4(){this.buffer()}function R4(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function P4(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Wn(this.sliceSerialize(e)).toLowerCase(),n.label=t}function L4(e){this.exit(e)}function D4(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Wn(this.sliceSerialize(e)).toLowerCase(),n.label=t}function M4(e){this.exit(e)}function F4(){return"["}function lT(e,t,n,r){const o=n.createTracker(r);let a=o.move("[^");const u=n.enter("footnoteReference"),c=n.enter("reference");return a+=o.move(n.safe(n.associationId(e),{after:"]",before:a})),c(),u(),a+=o.move("]"),a}function B4(){return{enter:{gfmFootnoteCallString:N4,gfmFootnoteCall:O4,gfmFootnoteDefinitionLabelString:I4,gfmFootnoteDefinition:R4},exit:{gfmFootnoteCallString:P4,gfmFootnoteCall:L4,gfmFootnoteDefinitionLabelString:D4,gfmFootnoteDefinition:M4}}}function U4(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:lT},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,o,a,u){const c=a.createTracker(u);let d=c.move("[^");const h=a.enter("footnoteDefinition"),m=a.enter("label");return d+=c.move(a.safe(a.associationId(r),{before:d,after:"]"})),m(),d+=c.move("]:"),r.children&&r.children.length>0&&(c.shift(4),d+=c.move((t?`
|
|
37
|
+
`,t);return r===-1?n:n===-1||n+1===r?r:n<r?n:r}const Ri={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/"},Kg={}.hasOwnProperty,fN=Object.prototype;function hN(e,t){const n=t||{};return Jd({file:n.file||void 0,location:!1,schema:n.space==="svg"?mo:_u,verbose:n.verbose||!1},e)}function Jd(e,t){let n;switch(t.nodeName){case"#comment":{const r=t;return n={type:"comment",value:r.data},Mu(e,r,n),n}case"#document":case"#document-fragment":{const r=t,o="mode"in r?r.mode==="quirks"||r.mode==="limited-quirks":!1;if(n={type:"root",children:Qg(e,t.childNodes),data:{quirksMode:o}},e.file&&e.location){const a=String(e.file),u=dN(a),c=u.toPoint(0),d=u.toPoint(a.length);n.position={start:c,end:d}}return n}case"#documentType":{const r=t;return n={type:"doctype"},Mu(e,r,n),n}case"#text":{const r=t;return n={type:"text",value:r.value},Mu(e,r,n),n}default:return n=pN(e,t),n}}function Qg(e,t){let n=-1;const r=[];for(;++n<t.length;){const o=Jd(e,t[n]);r.push(o)}return r}function pN(e,t){const n=e.schema;e.schema=t.namespaceURI===Ri.svg?mo:_u;let r=-1;const o={};for(;++r<t.attrs.length;){const c=t.attrs[r],d=(c.prefix?c.prefix+":":"")+c.name;Kg.call(fN,d)||(o[d]=c.value)}const u=(e.schema.space==="svg"?cN:lN)(t.tagName,o,Qg(e,t.childNodes));if(Mu(e,t,u),u.tagName==="template"){const c=t,d=c.sourceCodeLocation,h=d&&d.startTag&&bo(d.startTag),m=d&&d.endTag&&bo(d.endTag),E=Jd(e,c.content);h&&m&&e.file&&(E.position={start:h.end,end:m.start}),u.content=E}return e.schema=n,u}function Mu(e,t,n){if("sourceCodeLocation"in t&&t.sourceCodeLocation&&e.file){const r=mN(e,n,t.sourceCodeLocation);r&&(e.location=!0,n.position=r)}}function mN(e,t,n){const r=bo(n);if(t.type==="element"){const o=t.children[t.children.length-1];if(r&&!n.endTag&&o&&o.position&&o.position.end&&(r.end=Object.assign({},o.position.end)),e.verbose){const a={};let u;if(n.attrs)for(u in n.attrs)Kg.call(n.attrs,u)&&(a[bd(e.schema,u).property]=bo(n.attrs[u]));n.startTag;const c=bo(n.startTag),d=n.endTag?bo(n.endTag):void 0,h={opening:c};d&&(h.closing=d),h.properties=a,t.data={position:h}}}return r}function bo(e){const t=Xg({line:e.startLine,column:e.startCol,offset:e.startOffset}),n=Xg({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||n?{start:t,end:n}:void 0}function Xg(e){return e.line&&e.column?e:void 0}class zs{constructor(t,n,r){this.property=t,this.normal=n,r&&(this.space=r)}}zs.prototype.property={},zs.prototype.normal={},zs.prototype.space=null;function Jg(e,t){const n={},r={};let o=-1;for(;++o<e.length;)Object.assign(n,e[o].property),Object.assign(r,e[o].normal);return new zs(n,r,t)}function Zd(e){return e.toLowerCase()}class Pn{constructor(t,n){this.property=t,this.attribute=n}}Pn.prototype.space=null,Pn.prototype.boolean=!1,Pn.prototype.booleanish=!1,Pn.prototype.overloadedBoolean=!1,Pn.prototype.number=!1,Pn.prototype.commaSeparated=!1,Pn.prototype.spaceSeparated=!1,Pn.prototype.commaOrSpaceSeparated=!1,Pn.prototype.mustUseProperty=!1,Pn.prototype.defined=!1;let gN=0;const ze=Pi(),vt=Pi(),Zg=Pi(),me=Pi(),st=Pi(),xo=Pi(),_n=Pi();function Pi(){return Ja(2,++gN)}const ef=Object.freeze(Object.defineProperty({__proto__:null,boolean:ze,booleanish:vt,commaOrSpaceSeparated:_n,commaSeparated:xo,number:me,overloadedBoolean:Zg,spaceSeparated:st},Symbol.toStringTag,{value:"Module"})),tf=Object.keys(ef);class nf extends Pn{constructor(t,n,r,o){let a=-1;if(super(t,n),e1(this,"space",o),typeof r=="number")for(;++a<tf.length;){const u=tf[a];e1(this,tf[a],(r&ef[u])===ef[u])}}}nf.prototype.defined=!0;function e1(e,t,n){n&&(e[t]=n)}const EN={}.hasOwnProperty;function _o(e){const t={},n={};let r;for(r in e.properties)if(EN.call(e.properties,r)){const o=e.properties[r],a=new nf(r,e.transform(e.attributes||{},r),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[Zd(r)]=r,n[Zd(a.attribute)]=r}return new zs(t,n,e.space)}const t1=_o({space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()},properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null}}),n1=_o({space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()},properties:{xmlLang:null,xmlBase:null,xmlSpace:null}});function r1(e,t){return t in e?e[t]:t}function i1(e,t){return r1(e,t.toLowerCase())}const o1=_o({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:i1,properties:{xmlns:null,xmlnsXLink:null}}),s1=_o({transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()},properties:{ariaActiveDescendant:null,ariaAtomic:vt,ariaAutoComplete:null,ariaBusy:vt,ariaChecked:vt,ariaColCount:me,ariaColIndex:me,ariaColSpan:me,ariaControls:st,ariaCurrent:null,ariaDescribedBy:st,ariaDetails:null,ariaDisabled:vt,ariaDropEffect:st,ariaErrorMessage:null,ariaExpanded:vt,ariaFlowTo:st,ariaGrabbed:vt,ariaHasPopup:null,ariaHidden:vt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:st,ariaLevel:me,ariaLive:null,ariaModal:vt,ariaMultiLine:vt,ariaMultiSelectable:vt,ariaOrientation:null,ariaOwns:st,ariaPlaceholder:null,ariaPosInSet:me,ariaPressed:vt,ariaReadOnly:vt,ariaRelevant:null,ariaRequired:vt,ariaRoleDescription:st,ariaRowCount:me,ariaRowIndex:me,ariaRowSpan:me,ariaSelected:vt,ariaSetSize:me,ariaSort:null,ariaValueMax:me,ariaValueMin:me,ariaValueNow:me,ariaValueText:null,role:null}}),yN=_o({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:i1,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:xo,acceptCharset:st,accessKey:st,action:null,allow:null,allowFullScreen:ze,allowPaymentRequest:ze,allowUserMedia:ze,alt:null,as:null,async:ze,autoCapitalize:null,autoComplete:st,autoFocus:ze,autoPlay:ze,blocking:st,capture:null,charSet:null,checked:ze,cite:null,className:st,cols:me,colSpan:null,content:null,contentEditable:vt,controls:ze,controlsList:st,coords:me|xo,crossOrigin:null,data:null,dateTime:null,decoding:null,default:ze,defer:ze,dir:null,dirName:null,disabled:ze,download:Zg,draggable:vt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:ze,formTarget:null,headers:st,height:me,hidden:ze,high:me,href:null,hrefLang:null,htmlFor:st,httpEquiv:st,id:null,imageSizes:null,imageSrcSet:null,inert:ze,inputMode:null,integrity:null,is:null,isMap:ze,itemId:null,itemProp:st,itemRef:st,itemScope:ze,itemType:st,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:ze,low:me,manifest:null,max:null,maxLength:me,media:null,method:null,min:null,minLength:me,multiple:ze,muted:ze,name:null,nonce:null,noModule:ze,noValidate:ze,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:ze,optimum:me,pattern:null,ping:st,placeholder:null,playsInline:ze,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:ze,referrerPolicy:null,rel:st,required:ze,reversed:ze,rows:me,rowSpan:me,sandbox:st,scope:null,scoped:ze,seamless:ze,selected:ze,shadowRootClonable:ze,shadowRootDelegatesFocus:ze,shadowRootMode:null,shape:null,size:me,sizes:null,slot:null,span:me,spellCheck:vt,src:null,srcDoc:null,srcLang:null,srcSet:null,start:me,step:null,style:null,tabIndex:me,target:null,title:null,translate:null,type:null,typeMustMatch:ze,useMap:null,value:vt,width:me,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:st,axis:null,background:null,bgColor:null,border:me,borderColor:null,bottomMargin:me,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:ze,declare:ze,event:null,face:null,frame:null,frameBorder:null,hSpace:me,leftMargin:me,link:null,longDesc:null,lowSrc:null,marginHeight:me,marginWidth:me,noResize:ze,noHref:ze,noShade:ze,noWrap:ze,object:null,profile:null,prompt:null,rev:null,rightMargin:me,rules:null,scheme:null,scrolling:vt,standby:null,summary:null,text:null,topMargin:me,valueType:null,version:null,vAlign:null,vLink:null,vSpace:me,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:ze,disableRemotePlayback:ze,prefix:null,property:null,results:me,security:null,unselectable:null}}),TN=_o({space:"svg",attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},transform:r1,properties:{about:_n,accentHeight:me,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:me,amplitude:me,arabicForm:null,ascent:me,attributeName:null,attributeType:null,azimuth:me,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:me,by:null,calcMode:null,capHeight:me,className:st,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:me,diffuseConstant:me,direction:null,display:null,dur:null,divisor:me,dominantBaseline:null,download:ze,dx:null,dy:null,edgeMode:null,editable:null,elevation:me,enableBackground:null,end:null,event:null,exponent:me,externalResourcesRequired:null,fill:null,fillOpacity:me,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:xo,g2:xo,glyphName:xo,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:me,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:me,horizOriginX:me,horizOriginY:me,id:null,ideographic:me,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:me,k:me,k1:me,k2:me,k3:me,k4:me,kernelMatrix:_n,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:me,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:me,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:me,overlineThickness:me,paintOrder:null,panose1:null,path:null,pathLength:me,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:st,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:me,pointsAtY:me,pointsAtZ:me,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:_n,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:_n,rev:_n,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:_n,requiredFeatures:_n,requiredFonts:_n,requiredFormats:_n,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:me,specularExponent:me,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:me,strikethroughThickness:me,string:null,stroke:null,strokeDashArray:_n,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:me,strokeOpacity:me,strokeWidth:null,style:null,surfaceScale:me,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:_n,tabIndex:me,tableValues:null,target:null,targetX:me,targetY:me,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:_n,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:me,underlineThickness:me,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:me,values:null,vAlphabetic:me,vMathematical:me,vectorEffect:null,vHanging:me,vIdeographic:me,version:null,vertAdvY:me,vertOriginX:me,vertOriginY:me,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:me,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null}}),bN=/^data[-\w.:]+$/i,a1=/-[a-z]/g,xN=/[A-Z]/g;function _N(e,t){const n=Zd(t);let r=t,o=Pn;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&bN.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(a1,SN);r="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!a1.test(a)){let u=a.replace(xN,wN);u.charAt(0)!=="-"&&(u="-"+u),t="data"+u}}o=nf}return new o(r,t)}function wN(e){return"-"+e.toLowerCase()}function SN(e){return e.charAt(1).toUpperCase()}const AN=Jg([n1,t1,o1,s1,yN],"html"),u1=Jg([n1,t1,o1,s1,TN],"svg"),l1={}.hasOwnProperty;function c1(e,t){const n=t||{};function r(o,...a){let u=r.invalid;const c=r.handlers;if(o&&l1.call(o,e)){const d=String(o[e]);u=l1.call(c,d)?c[d]:r.unknown}if(u)return u.call(this,o,...a)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}const vN={},CN={}.hasOwnProperty,d1=c1("type",{handlers:{root:NN,element:LN,text:RN,comment:PN,doctype:IN}});function kN(e,t){const r=(t||vN).space;return d1(e,r==="svg"?u1:AN)}function NN(e,t){const n={nodeName:"#document",mode:(e.data||{}).quirksMode?"quirks":"no-quirks",childNodes:[]};return n.childNodes=rf(e.children,n,t),wo(e,n),n}function ON(e,t){const n={nodeName:"#document-fragment",childNodes:[]};return n.childNodes=rf(e.children,n,t),wo(e,n),n}function IN(e){const t={nodeName:"#documentType",name:"html",publicId:"",systemId:"",parentNode:null};return wo(e,t),t}function RN(e){const t={nodeName:"#text",value:e.value,parentNode:null};return wo(e,t),t}function PN(e){const t={nodeName:"#comment",data:e.value,parentNode:null};return wo(e,t),t}function LN(e,t){const n=t;let r=n;e.type==="element"&&e.tagName.toLowerCase()==="svg"&&n.space==="html"&&(r=u1);const o=[];let a;if(e.properties){for(a in e.properties)if(a!=="children"&&CN.call(e.properties,a)){const d=DN(r,a,e.properties[a]);d&&o.push(d)}}const u=r.space,c={nodeName:e.tagName,tagName:e.tagName,attrs:o,namespaceURI:Ri[u],childNodes:[],parentNode:null};return c.childNodes=rf(e.children,c,r),wo(e,c),e.tagName==="template"&&e.content&&(c.content=ON(e.content,r)),c}function DN(e,t,n){const r=_N(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?S0(n):F0(n));const o={name:r.attribute,value:n===!0?"":String(n)};if(r.space&&r.space!=="html"&&r.space!=="svg"){const a=o.name.indexOf(":");a<0?o.prefix="":(o.name=o.name.slice(a+1),o.prefix=r.attribute.slice(0,a)),o.namespace=Ri[r.space]}return o}function rf(e,t,n){let r=-1;const o=[];if(e)for(;++r<e.length;){const a=d1(e[r],n);a.parentNode=t,o.push(a)}return o}function wo(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 MN=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"],FN=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]),ft="�";var v;(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"})(v||(v={}));const fn={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function f1(e){return e>=55296&&e<=57343}function BN(e){return e>=56320&&e<=57343}function UN(e,t){return(e-55296)*1024+9216+t}function h1(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function p1(e){return e>=64976&&e<=65007||FN.has(e)}var Q;(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"})(Q||(Q={}));const HN=65536;class zN{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=HN,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:o,offset:a}=this,u=o+n,c=a+n;return{code:t,startLine:r,endLine:r,startCol:u,endCol:u,startOffset:c,endOffset:c}}_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(BN(n))return this.pos++,this._addGap(),UN(t,n)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,v.EOF;return this._err(Q.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,v.EOF;const r=this.html.charCodeAt(n);return r===v.CARRIAGE_RETURN?v.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,v.EOF;let t=this.html.charCodeAt(this.pos);return t===v.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,v.LINE_FEED):t===v.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,f1(t)&&(t=this._processSurrogate(t)),this.handler.onParseError===null||t>31&&t<127||t===v.LINE_FEED||t===v.CARRIAGE_RETURN||t>159&&t<64976||this._checkForProblematicCharacters(t),t)}_checkForProblematicCharacters(t){h1(t)?this._err(Q.controlCharacterInInputStream):p1(t)&&this._err(Q.noncharacterInInputStream)}retreat(t){for(this.pos-=t;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}}var $e;(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"})($e||($e={}));function m1(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 jN=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))),$N=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 VN(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=$N.get(e))!==null&&t!==void 0?t:e}var Pt;(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"})(Pt||(Pt={}));const YN=32;var Yr;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(Yr||(Yr={}));function of(e){return e>=Pt.ZERO&&e<=Pt.NINE}function WN(e){return e>=Pt.UPPER_A&&e<=Pt.UPPER_F||e>=Pt.LOWER_A&&e<=Pt.LOWER_F}function qN(e){return e>=Pt.UPPER_A&&e<=Pt.UPPER_Z||e>=Pt.LOWER_A&&e<=Pt.LOWER_Z||of(e)}function GN(e){return e===Pt.EQUALS||qN(e)}var Lt;(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"})(Lt||(Lt={}));var Ar;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(Ar||(Ar={}));class KN{constructor(t,n,r){this.decodeTree=t,this.emitCodePoint=n,this.errors=r,this.state=Lt.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=Ar.Strict}startEntity(t){this.decodeMode=t,this.state=Lt.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,n){switch(this.state){case Lt.EntityStart:return t.charCodeAt(n)===Pt.NUM?(this.state=Lt.NumericStart,this.consumed+=1,this.stateNumericStart(t,n+1)):(this.state=Lt.NamedEntity,this.stateNamedEntity(t,n));case Lt.NumericStart:return this.stateNumericStart(t,n);case Lt.NumericDecimal:return this.stateNumericDecimal(t,n);case Lt.NumericHex:return this.stateNumericHex(t,n);case Lt.NamedEntity:return this.stateNamedEntity(t,n)}}stateNumericStart(t,n){return n>=t.length?-1:(t.charCodeAt(n)|YN)===Pt.LOWER_X?(this.state=Lt.NumericHex,this.consumed+=1,this.stateNumericHex(t,n+1)):(this.state=Lt.NumericDecimal,this.stateNumericDecimal(t,n))}addToNumericResult(t,n,r,o){if(n!==r){const a=r-n;this.result=this.result*Math.pow(o,a)+Number.parseInt(t.substr(n,a),o),this.consumed+=a}}stateNumericHex(t,n){const r=n;for(;n<t.length;){const o=t.charCodeAt(n);if(of(o)||WN(o))n+=1;else return this.addToNumericResult(t,r,n,16),this.emitNumericEntity(o,3)}return this.addToNumericResult(t,r,n,16),-1}stateNumericDecimal(t,n){const r=n;for(;n<t.length;){const o=t.charCodeAt(n);if(of(o))n+=1;else return this.addToNumericResult(t,r,n,10),this.emitNumericEntity(o,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===Pt.SEMI)this.consumed+=1;else if(this.decodeMode===Ar.Strict)return 0;return this.emitCodePoint(VN(this.result),this.consumed),this.errors&&(t!==Pt.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(t,n){const{decodeTree:r}=this;let o=r[this.treeIndex],a=(o&Yr.VALUE_LENGTH)>>14;for(;n<t.length;n++,this.excess++){const u=t.charCodeAt(n);if(this.treeIndex=QN(r,o,this.treeIndex+Math.max(1,a),u),this.treeIndex<0)return this.result===0||this.decodeMode===Ar.Attribute&&(a===0||GN(u))?0:this.emitNotTerminatedNamedEntity();if(o=r[this.treeIndex],a=(o&Yr.VALUE_LENGTH)>>14,a!==0){if(u===Pt.SEMI)return this.emitNamedEntityData(this.treeIndex,a,this.consumed+this.excess);this.decodeMode!==Ar.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var t;const{result:n,decodeTree:r}=this,o=(r[n]&Yr.VALUE_LENGTH)>>14;return this.emitNamedEntityData(n,o,this.consumed),(t=this.errors)===null||t===void 0||t.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(t,n,r){const{decodeTree:o}=this;return this.emitCodePoint(n===1?o[t]&~Yr.VALUE_LENGTH:o[t+1],r),n===3&&this.emitCodePoint(o[t+2],r),r}end(){var t;switch(this.state){case Lt.NamedEntity:return this.result!==0&&(this.decodeMode!==Ar.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case Lt.NumericDecimal:return this.emitNumericEntity(0,2);case Lt.NumericHex:return this.emitNumericEntity(0,3);case Lt.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case Lt.EntityStart:return 0}}}function QN(e,t,n,r){const o=(t&Yr.BRANCH_LENGTH)>>7,a=t&Yr.JUMP_TABLE;if(o===0)return a!==0&&r===a?n:-1;if(a){const d=r-a;return d<0||d>=o?-1:e[n+d]-1}let u=n,c=u+o-1;for(;u<=c;){const d=u+c>>>1,h=e[d];if(h<r)u=d+1;else if(h>r)c=d-1;else return e[d+o]}return-1}var oe;(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/"})(oe||(oe={}));var Li;(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"})(Li||(Li={}));var Ln;(function(e){e.NO_QUIRKS="no-quirks",e.QUIRKS="quirks",e.LIMITED_QUIRKS="limited-quirks"})(Ln||(Ln={}));var Y;(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"})(Y||(Y={}));var p;(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"})(p||(p={}));const XN=new Map([[Y.A,p.A],[Y.ADDRESS,p.ADDRESS],[Y.ANNOTATION_XML,p.ANNOTATION_XML],[Y.APPLET,p.APPLET],[Y.AREA,p.AREA],[Y.ARTICLE,p.ARTICLE],[Y.ASIDE,p.ASIDE],[Y.B,p.B],[Y.BASE,p.BASE],[Y.BASEFONT,p.BASEFONT],[Y.BGSOUND,p.BGSOUND],[Y.BIG,p.BIG],[Y.BLOCKQUOTE,p.BLOCKQUOTE],[Y.BODY,p.BODY],[Y.BR,p.BR],[Y.BUTTON,p.BUTTON],[Y.CAPTION,p.CAPTION],[Y.CENTER,p.CENTER],[Y.CODE,p.CODE],[Y.COL,p.COL],[Y.COLGROUP,p.COLGROUP],[Y.DD,p.DD],[Y.DESC,p.DESC],[Y.DETAILS,p.DETAILS],[Y.DIALOG,p.DIALOG],[Y.DIR,p.DIR],[Y.DIV,p.DIV],[Y.DL,p.DL],[Y.DT,p.DT],[Y.EM,p.EM],[Y.EMBED,p.EMBED],[Y.FIELDSET,p.FIELDSET],[Y.FIGCAPTION,p.FIGCAPTION],[Y.FIGURE,p.FIGURE],[Y.FONT,p.FONT],[Y.FOOTER,p.FOOTER],[Y.FOREIGN_OBJECT,p.FOREIGN_OBJECT],[Y.FORM,p.FORM],[Y.FRAME,p.FRAME],[Y.FRAMESET,p.FRAMESET],[Y.H1,p.H1],[Y.H2,p.H2],[Y.H3,p.H3],[Y.H4,p.H4],[Y.H5,p.H5],[Y.H6,p.H6],[Y.HEAD,p.HEAD],[Y.HEADER,p.HEADER],[Y.HGROUP,p.HGROUP],[Y.HR,p.HR],[Y.HTML,p.HTML],[Y.I,p.I],[Y.IMG,p.IMG],[Y.IMAGE,p.IMAGE],[Y.INPUT,p.INPUT],[Y.IFRAME,p.IFRAME],[Y.KEYGEN,p.KEYGEN],[Y.LABEL,p.LABEL],[Y.LI,p.LI],[Y.LINK,p.LINK],[Y.LISTING,p.LISTING],[Y.MAIN,p.MAIN],[Y.MALIGNMARK,p.MALIGNMARK],[Y.MARQUEE,p.MARQUEE],[Y.MATH,p.MATH],[Y.MENU,p.MENU],[Y.META,p.META],[Y.MGLYPH,p.MGLYPH],[Y.MI,p.MI],[Y.MO,p.MO],[Y.MN,p.MN],[Y.MS,p.MS],[Y.MTEXT,p.MTEXT],[Y.NAV,p.NAV],[Y.NOBR,p.NOBR],[Y.NOFRAMES,p.NOFRAMES],[Y.NOEMBED,p.NOEMBED],[Y.NOSCRIPT,p.NOSCRIPT],[Y.OBJECT,p.OBJECT],[Y.OL,p.OL],[Y.OPTGROUP,p.OPTGROUP],[Y.OPTION,p.OPTION],[Y.P,p.P],[Y.PARAM,p.PARAM],[Y.PLAINTEXT,p.PLAINTEXT],[Y.PRE,p.PRE],[Y.RB,p.RB],[Y.RP,p.RP],[Y.RT,p.RT],[Y.RTC,p.RTC],[Y.RUBY,p.RUBY],[Y.S,p.S],[Y.SCRIPT,p.SCRIPT],[Y.SEARCH,p.SEARCH],[Y.SECTION,p.SECTION],[Y.SELECT,p.SELECT],[Y.SOURCE,p.SOURCE],[Y.SMALL,p.SMALL],[Y.SPAN,p.SPAN],[Y.STRIKE,p.STRIKE],[Y.STRONG,p.STRONG],[Y.STYLE,p.STYLE],[Y.SUB,p.SUB],[Y.SUMMARY,p.SUMMARY],[Y.SUP,p.SUP],[Y.TABLE,p.TABLE],[Y.TBODY,p.TBODY],[Y.TEMPLATE,p.TEMPLATE],[Y.TEXTAREA,p.TEXTAREA],[Y.TFOOT,p.TFOOT],[Y.TD,p.TD],[Y.TH,p.TH],[Y.THEAD,p.THEAD],[Y.TITLE,p.TITLE],[Y.TR,p.TR],[Y.TRACK,p.TRACK],[Y.TT,p.TT],[Y.U,p.U],[Y.UL,p.UL],[Y.SVG,p.SVG],[Y.VAR,p.VAR],[Y.WBR,p.WBR],[Y.XMP,p.XMP]]);function So(e){var t;return(t=XN.get(e))!==null&&t!==void 0?t:p.UNKNOWN}const le=p,JN={[oe.HTML]:new Set([le.ADDRESS,le.APPLET,le.AREA,le.ARTICLE,le.ASIDE,le.BASE,le.BASEFONT,le.BGSOUND,le.BLOCKQUOTE,le.BODY,le.BR,le.BUTTON,le.CAPTION,le.CENTER,le.COL,le.COLGROUP,le.DD,le.DETAILS,le.DIR,le.DIV,le.DL,le.DT,le.EMBED,le.FIELDSET,le.FIGCAPTION,le.FIGURE,le.FOOTER,le.FORM,le.FRAME,le.FRAMESET,le.H1,le.H2,le.H3,le.H4,le.H5,le.H6,le.HEAD,le.HEADER,le.HGROUP,le.HR,le.HTML,le.IFRAME,le.IMG,le.INPUT,le.LI,le.LINK,le.LISTING,le.MAIN,le.MARQUEE,le.MENU,le.META,le.NAV,le.NOEMBED,le.NOFRAMES,le.NOSCRIPT,le.OBJECT,le.OL,le.P,le.PARAM,le.PLAINTEXT,le.PRE,le.SCRIPT,le.SECTION,le.SELECT,le.SOURCE,le.STYLE,le.SUMMARY,le.TABLE,le.TBODY,le.TD,le.TEMPLATE,le.TEXTAREA,le.TFOOT,le.TH,le.THEAD,le.TITLE,le.TR,le.TRACK,le.UL,le.WBR,le.XMP]),[oe.MATHML]:new Set([le.MI,le.MO,le.MN,le.MS,le.MTEXT,le.ANNOTATION_XML]),[oe.SVG]:new Set([le.TITLE,le.FOREIGN_OBJECT,le.DESC]),[oe.XLINK]:new Set,[oe.XML]:new Set,[oe.XMLNS]:new Set},sf=new Set([le.H1,le.H2,le.H3,le.H4,le.H5,le.H6]);Y.STYLE,Y.SCRIPT,Y.XMP,Y.IFRAME,Y.NOEMBED,Y.NOFRAMES,Y.PLAINTEXT;var N;(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"})(N||(N={}));const xt={DATA:N.DATA,RCDATA:N.RCDATA,RAWTEXT:N.RAWTEXT,SCRIPT_DATA:N.SCRIPT_DATA,PLAINTEXT:N.PLAINTEXT,CDATA_SECTION:N.CDATA_SECTION};function ZN(e){return e>=v.DIGIT_0&&e<=v.DIGIT_9}function js(e){return e>=v.LATIN_CAPITAL_A&&e<=v.LATIN_CAPITAL_Z}function e3(e){return e>=v.LATIN_SMALL_A&&e<=v.LATIN_SMALL_Z}function Wr(e){return e3(e)||js(e)}function g1(e){return Wr(e)||ZN(e)}function Fu(e){return e+32}function E1(e){return e===v.SPACE||e===v.LINE_FEED||e===v.TABULATION||e===v.FORM_FEED}function y1(e){return E1(e)||e===v.SOLIDUS||e===v.GREATER_THAN_SIGN}function t3(e){return e===v.NULL?Q.nullCharacterReference:e>1114111?Q.characterReferenceOutsideUnicodeRange:f1(e)?Q.surrogateCharacterReference:p1(e)?Q.noncharacterCharacterReference:h1(e)||e===v.CARRIAGE_RETURN?Q.controlCharacterReference:null}class n3{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=N.DATA,this.returnState=N.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new zN(n),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new KN(jN,(r,o)=>{this.preprocessor.pos=this.entityStartPos+o-1,this._flushCodePointConsumedAsCharacterReference(r)},n.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(Q.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:r=>{this._err(Q.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+r)},validateNumericCharacterReference:r=>{const o=t3(r);o&&this._err(o,1)}}:void 0)}_err(t,n=0){var r,o;(o=(r=this.handler).onParseError)===null||o===void 0||o.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==null||t())}write(t,n,r){this.active=!0,this.preprocessor.write(t,n),this._runParsingLoop(),this.paused||r==null||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:$e.START_TAG,tagName:"",tagID:p.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:$e.END_TAG,tagName:"",tagID:p.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(t){this.currentToken={type:$e.COMMENT,data:"",location:this.getCurrentLocation(t)}}_createDoctypeToken(t){this.currentToken={type:$e.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(m1(r,this.currentAttr.name)===null){if(r.attrs.push(this.currentAttr),r.location&&this.currentLocation){const o=(t=(n=r.location).attrs)!==null&&t!==void 0?t:n.attrs=Object.create(null);o[this.currentAttr.name]=this.currentLocation,this._leaveAttrValue()}}else this._err(Q.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=So(t.tagName),t.type===$e.START_TAG?(this.lastStartTagName=t.tagName,this.handler.onStartTag(t)):(t.attrs.length>0&&this._err(Q.endTagWithAttributes),t.selfClosing&&this._err(Q.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 $e.CHARACTER:{this.handler.onCharacter(this.currentCharacterToken);break}case $e.NULL_CHARACTER:{this.handler.onNullCharacter(this.currentCharacterToken);break}case $e.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:$e.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=E1(t)?$e.WHITESPACE_CHARACTER:t===v.NULL?$e.NULL_CHARACTER:$e.CHARACTER;this._appendCharToCurrentCharacterToken(n,String.fromCodePoint(t))}_emitChars(t){this._appendCharToCurrentCharacterToken($e.CHARACTER,t)}_startCharacterReference(){this.returnState=this.state,this.state=N.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?Ar.Attribute:Ar.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===N.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===N.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===N.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(t){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(t):this._emitCodePoint(t)}_callState(t){switch(this.state){case N.DATA:{this._stateData(t);break}case N.RCDATA:{this._stateRcdata(t);break}case N.RAWTEXT:{this._stateRawtext(t);break}case N.SCRIPT_DATA:{this._stateScriptData(t);break}case N.PLAINTEXT:{this._statePlaintext(t);break}case N.TAG_OPEN:{this._stateTagOpen(t);break}case N.END_TAG_OPEN:{this._stateEndTagOpen(t);break}case N.TAG_NAME:{this._stateTagName(t);break}case N.RCDATA_LESS_THAN_SIGN:{this._stateRcdataLessThanSign(t);break}case N.RCDATA_END_TAG_OPEN:{this._stateRcdataEndTagOpen(t);break}case N.RCDATA_END_TAG_NAME:{this._stateRcdataEndTagName(t);break}case N.RAWTEXT_LESS_THAN_SIGN:{this._stateRawtextLessThanSign(t);break}case N.RAWTEXT_END_TAG_OPEN:{this._stateRawtextEndTagOpen(t);break}case N.RAWTEXT_END_TAG_NAME:{this._stateRawtextEndTagName(t);break}case N.SCRIPT_DATA_LESS_THAN_SIGN:{this._stateScriptDataLessThanSign(t);break}case N.SCRIPT_DATA_END_TAG_OPEN:{this._stateScriptDataEndTagOpen(t);break}case N.SCRIPT_DATA_END_TAG_NAME:{this._stateScriptDataEndTagName(t);break}case N.SCRIPT_DATA_ESCAPE_START:{this._stateScriptDataEscapeStart(t);break}case N.SCRIPT_DATA_ESCAPE_START_DASH:{this._stateScriptDataEscapeStartDash(t);break}case N.SCRIPT_DATA_ESCAPED:{this._stateScriptDataEscaped(t);break}case N.SCRIPT_DATA_ESCAPED_DASH:{this._stateScriptDataEscapedDash(t);break}case N.SCRIPT_DATA_ESCAPED_DASH_DASH:{this._stateScriptDataEscapedDashDash(t);break}case N.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataEscapedLessThanSign(t);break}case N.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:{this._stateScriptDataEscapedEndTagOpen(t);break}case N.SCRIPT_DATA_ESCAPED_END_TAG_NAME:{this._stateScriptDataEscapedEndTagName(t);break}case N.SCRIPT_DATA_DOUBLE_ESCAPE_START:{this._stateScriptDataDoubleEscapeStart(t);break}case N.SCRIPT_DATA_DOUBLE_ESCAPED:{this._stateScriptDataDoubleEscaped(t);break}case N.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:{this._stateScriptDataDoubleEscapedDash(t);break}case N.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:{this._stateScriptDataDoubleEscapedDashDash(t);break}case N.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataDoubleEscapedLessThanSign(t);break}case N.SCRIPT_DATA_DOUBLE_ESCAPE_END:{this._stateScriptDataDoubleEscapeEnd(t);break}case N.BEFORE_ATTRIBUTE_NAME:{this._stateBeforeAttributeName(t);break}case N.ATTRIBUTE_NAME:{this._stateAttributeName(t);break}case N.AFTER_ATTRIBUTE_NAME:{this._stateAfterAttributeName(t);break}case N.BEFORE_ATTRIBUTE_VALUE:{this._stateBeforeAttributeValue(t);break}case N.ATTRIBUTE_VALUE_DOUBLE_QUOTED:{this._stateAttributeValueDoubleQuoted(t);break}case N.ATTRIBUTE_VALUE_SINGLE_QUOTED:{this._stateAttributeValueSingleQuoted(t);break}case N.ATTRIBUTE_VALUE_UNQUOTED:{this._stateAttributeValueUnquoted(t);break}case N.AFTER_ATTRIBUTE_VALUE_QUOTED:{this._stateAfterAttributeValueQuoted(t);break}case N.SELF_CLOSING_START_TAG:{this._stateSelfClosingStartTag(t);break}case N.BOGUS_COMMENT:{this._stateBogusComment(t);break}case N.MARKUP_DECLARATION_OPEN:{this._stateMarkupDeclarationOpen(t);break}case N.COMMENT_START:{this._stateCommentStart(t);break}case N.COMMENT_START_DASH:{this._stateCommentStartDash(t);break}case N.COMMENT:{this._stateComment(t);break}case N.COMMENT_LESS_THAN_SIGN:{this._stateCommentLessThanSign(t);break}case N.COMMENT_LESS_THAN_SIGN_BANG:{this._stateCommentLessThanSignBang(t);break}case N.COMMENT_LESS_THAN_SIGN_BANG_DASH:{this._stateCommentLessThanSignBangDash(t);break}case N.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:{this._stateCommentLessThanSignBangDashDash(t);break}case N.COMMENT_END_DASH:{this._stateCommentEndDash(t);break}case N.COMMENT_END:{this._stateCommentEnd(t);break}case N.COMMENT_END_BANG:{this._stateCommentEndBang(t);break}case N.DOCTYPE:{this._stateDoctype(t);break}case N.BEFORE_DOCTYPE_NAME:{this._stateBeforeDoctypeName(t);break}case N.DOCTYPE_NAME:{this._stateDoctypeName(t);break}case N.AFTER_DOCTYPE_NAME:{this._stateAfterDoctypeName(t);break}case N.AFTER_DOCTYPE_PUBLIC_KEYWORD:{this._stateAfterDoctypePublicKeyword(t);break}case N.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateBeforeDoctypePublicIdentifier(t);break}case N.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypePublicIdentifierDoubleQuoted(t);break}case N.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypePublicIdentifierSingleQuoted(t);break}case N.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateAfterDoctypePublicIdentifier(t);break}case N.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:{this._stateBetweenDoctypePublicAndSystemIdentifiers(t);break}case N.AFTER_DOCTYPE_SYSTEM_KEYWORD:{this._stateAfterDoctypeSystemKeyword(t);break}case N.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateBeforeDoctypeSystemIdentifier(t);break}case N.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypeSystemIdentifierDoubleQuoted(t);break}case N.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypeSystemIdentifierSingleQuoted(t);break}case N.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateAfterDoctypeSystemIdentifier(t);break}case N.BOGUS_DOCTYPE:{this._stateBogusDoctype(t);break}case N.CDATA_SECTION:{this._stateCdataSection(t);break}case N.CDATA_SECTION_BRACKET:{this._stateCdataSectionBracket(t);break}case N.CDATA_SECTION_END:{this._stateCdataSectionEnd(t);break}case N.CHARACTER_REFERENCE:{this._stateCharacterReference();break}case N.AMBIGUOUS_AMPERSAND:{this._stateAmbiguousAmpersand(t);break}default:throw new Error("Unknown state")}}_stateData(t){switch(t){case v.LESS_THAN_SIGN:{this.state=N.TAG_OPEN;break}case v.AMPERSAND:{this._startCharacterReference();break}case v.NULL:{this._err(Q.unexpectedNullCharacter),this._emitCodePoint(t);break}case v.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRcdata(t){switch(t){case v.AMPERSAND:{this._startCharacterReference();break}case v.LESS_THAN_SIGN:{this.state=N.RCDATA_LESS_THAN_SIGN;break}case v.NULL:{this._err(Q.unexpectedNullCharacter),this._emitChars(ft);break}case v.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRawtext(t){switch(t){case v.LESS_THAN_SIGN:{this.state=N.RAWTEXT_LESS_THAN_SIGN;break}case v.NULL:{this._err(Q.unexpectedNullCharacter),this._emitChars(ft);break}case v.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptData(t){switch(t){case v.LESS_THAN_SIGN:{this.state=N.SCRIPT_DATA_LESS_THAN_SIGN;break}case v.NULL:{this._err(Q.unexpectedNullCharacter),this._emitChars(ft);break}case v.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_statePlaintext(t){switch(t){case v.NULL:{this._err(Q.unexpectedNullCharacter),this._emitChars(ft);break}case v.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateTagOpen(t){if(Wr(t))this._createStartTagToken(),this.state=N.TAG_NAME,this._stateTagName(t);else switch(t){case v.EXCLAMATION_MARK:{this.state=N.MARKUP_DECLARATION_OPEN;break}case v.SOLIDUS:{this.state=N.END_TAG_OPEN;break}case v.QUESTION_MARK:{this._err(Q.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=N.BOGUS_COMMENT,this._stateBogusComment(t);break}case v.EOF:{this._err(Q.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break}default:this._err(Q.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=N.DATA,this._stateData(t)}}_stateEndTagOpen(t){if(Wr(t))this._createEndTagToken(),this.state=N.TAG_NAME,this._stateTagName(t);else switch(t){case v.GREATER_THAN_SIGN:{this._err(Q.missingEndTagName),this.state=N.DATA;break}case v.EOF:{this._err(Q.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break}default:this._err(Q.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=N.BOGUS_COMMENT,this._stateBogusComment(t)}}_stateTagName(t){const n=this.currentToken;switch(t){case v.SPACE:case v.LINE_FEED:case v.TABULATION:case v.FORM_FEED:{this.state=N.BEFORE_ATTRIBUTE_NAME;break}case v.SOLIDUS:{this.state=N.SELF_CLOSING_START_TAG;break}case v.GREATER_THAN_SIGN:{this.state=N.DATA,this.emitCurrentTagToken();break}case v.NULL:{this._err(Q.unexpectedNullCharacter),n.tagName+=ft;break}case v.EOF:{this._err(Q.eofInTag),this._emitEOFToken();break}default:n.tagName+=String.fromCodePoint(js(t)?Fu(t):t)}}_stateRcdataLessThanSign(t){t===v.SOLIDUS?this.state=N.RCDATA_END_TAG_OPEN:(this._emitChars("<"),this.state=N.RCDATA,this._stateRcdata(t))}_stateRcdataEndTagOpen(t){Wr(t)?(this.state=N.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(t)):(this._emitChars("</"),this.state=N.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 v.SPACE:case v.LINE_FEED:case v.TABULATION:case v.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=N.BEFORE_ATTRIBUTE_NAME,!1;case v.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=N.SELF_CLOSING_START_TAG,!1;case v.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=N.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=N.RCDATA,this._stateRcdata(t))}_stateRawtextLessThanSign(t){t===v.SOLIDUS?this.state=N.RAWTEXT_END_TAG_OPEN:(this._emitChars("<"),this.state=N.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagOpen(t){Wr(t)?(this.state=N.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(t)):(this._emitChars("</"),this.state=N.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=N.RAWTEXT,this._stateRawtext(t))}_stateScriptDataLessThanSign(t){switch(t){case v.SOLIDUS:{this.state=N.SCRIPT_DATA_END_TAG_OPEN;break}case v.EXCLAMATION_MARK:{this.state=N.SCRIPT_DATA_ESCAPE_START,this._emitChars("<!");break}default:this._emitChars("<"),this.state=N.SCRIPT_DATA,this._stateScriptData(t)}}_stateScriptDataEndTagOpen(t){Wr(t)?(this.state=N.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(t)):(this._emitChars("</"),this.state=N.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=N.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStart(t){t===v.HYPHEN_MINUS?(this.state=N.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars("-")):(this.state=N.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStartDash(t){t===v.HYPHEN_MINUS?(this.state=N.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-")):(this.state=N.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscaped(t){switch(t){case v.HYPHEN_MINUS:{this.state=N.SCRIPT_DATA_ESCAPED_DASH,this._emitChars("-");break}case v.LESS_THAN_SIGN:{this.state=N.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case v.NULL:{this._err(Q.unexpectedNullCharacter),this._emitChars(ft);break}case v.EOF:{this._err(Q.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataEscapedDash(t){switch(t){case v.HYPHEN_MINUS:{this.state=N.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-");break}case v.LESS_THAN_SIGN:{this.state=N.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case v.NULL:{this._err(Q.unexpectedNullCharacter),this.state=N.SCRIPT_DATA_ESCAPED,this._emitChars(ft);break}case v.EOF:{this._err(Q.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=N.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedDashDash(t){switch(t){case v.HYPHEN_MINUS:{this._emitChars("-");break}case v.LESS_THAN_SIGN:{this.state=N.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case v.GREATER_THAN_SIGN:{this.state=N.SCRIPT_DATA,this._emitChars(">");break}case v.NULL:{this._err(Q.unexpectedNullCharacter),this.state=N.SCRIPT_DATA_ESCAPED,this._emitChars(ft);break}case v.EOF:{this._err(Q.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=N.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedLessThanSign(t){t===v.SOLIDUS?this.state=N.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:Wr(t)?(this._emitChars("<"),this.state=N.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(t)):(this._emitChars("<"),this.state=N.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagOpen(t){Wr(t)?(this.state=N.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(t)):(this._emitChars("</"),this.state=N.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=N.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscapeStart(t){if(this.preprocessor.startsWith(fn.SCRIPT,!1)&&y1(this.preprocessor.peek(fn.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<fn.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=N.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=N.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscaped(t){switch(t){case v.HYPHEN_MINUS:{this.state=N.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars("-");break}case v.LESS_THAN_SIGN:{this.state=N.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case v.NULL:{this._err(Q.unexpectedNullCharacter),this._emitChars(ft);break}case v.EOF:{this._err(Q.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDash(t){switch(t){case v.HYPHEN_MINUS:{this.state=N.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars("-");break}case v.LESS_THAN_SIGN:{this.state=N.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case v.NULL:{this._err(Q.unexpectedNullCharacter),this.state=N.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(ft);break}case v.EOF:{this._err(Q.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=N.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDashDash(t){switch(t){case v.HYPHEN_MINUS:{this._emitChars("-");break}case v.LESS_THAN_SIGN:{this.state=N.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case v.GREATER_THAN_SIGN:{this.state=N.SCRIPT_DATA,this._emitChars(">");break}case v.NULL:{this._err(Q.unexpectedNullCharacter),this.state=N.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(ft);break}case v.EOF:{this._err(Q.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=N.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedLessThanSign(t){t===v.SOLIDUS?(this.state=N.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=N.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateScriptDataDoubleEscapeEnd(t){if(this.preprocessor.startsWith(fn.SCRIPT,!1)&&y1(this.preprocessor.peek(fn.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<fn.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=N.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=N.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateBeforeAttributeName(t){switch(t){case v.SPACE:case v.LINE_FEED:case v.TABULATION:case v.FORM_FEED:break;case v.SOLIDUS:case v.GREATER_THAN_SIGN:case v.EOF:{this.state=N.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case v.EQUALS_SIGN:{this._err(Q.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=N.ATTRIBUTE_NAME;break}default:this._createAttr(""),this.state=N.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateAttributeName(t){switch(t){case v.SPACE:case v.LINE_FEED:case v.TABULATION:case v.FORM_FEED:case v.SOLIDUS:case v.GREATER_THAN_SIGN:case v.EOF:{this._leaveAttrName(),this.state=N.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case v.EQUALS_SIGN:{this._leaveAttrName(),this.state=N.BEFORE_ATTRIBUTE_VALUE;break}case v.QUOTATION_MARK:case v.APOSTROPHE:case v.LESS_THAN_SIGN:{this._err(Q.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(t);break}case v.NULL:{this._err(Q.unexpectedNullCharacter),this.currentAttr.name+=ft;break}default:this.currentAttr.name+=String.fromCodePoint(js(t)?Fu(t):t)}}_stateAfterAttributeName(t){switch(t){case v.SPACE:case v.LINE_FEED:case v.TABULATION:case v.FORM_FEED:break;case v.SOLIDUS:{this.state=N.SELF_CLOSING_START_TAG;break}case v.EQUALS_SIGN:{this.state=N.BEFORE_ATTRIBUTE_VALUE;break}case v.GREATER_THAN_SIGN:{this.state=N.DATA,this.emitCurrentTagToken();break}case v.EOF:{this._err(Q.eofInTag),this._emitEOFToken();break}default:this._createAttr(""),this.state=N.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateBeforeAttributeValue(t){switch(t){case v.SPACE:case v.LINE_FEED:case v.TABULATION:case v.FORM_FEED:break;case v.QUOTATION_MARK:{this.state=N.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break}case v.APOSTROPHE:{this.state=N.ATTRIBUTE_VALUE_SINGLE_QUOTED;break}case v.GREATER_THAN_SIGN:{this._err(Q.missingAttributeValue),this.state=N.DATA,this.emitCurrentTagToken();break}default:this.state=N.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(t)}}_stateAttributeValueDoubleQuoted(t){switch(t){case v.QUOTATION_MARK:{this.state=N.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case v.AMPERSAND:{this._startCharacterReference();break}case v.NULL:{this._err(Q.unexpectedNullCharacter),this.currentAttr.value+=ft;break}case v.EOF:{this._err(Q.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueSingleQuoted(t){switch(t){case v.APOSTROPHE:{this.state=N.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case v.AMPERSAND:{this._startCharacterReference();break}case v.NULL:{this._err(Q.unexpectedNullCharacter),this.currentAttr.value+=ft;break}case v.EOF:{this._err(Q.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueUnquoted(t){switch(t){case v.SPACE:case v.LINE_FEED:case v.TABULATION:case v.FORM_FEED:{this._leaveAttrValue(),this.state=N.BEFORE_ATTRIBUTE_NAME;break}case v.AMPERSAND:{this._startCharacterReference();break}case v.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=N.DATA,this.emitCurrentTagToken();break}case v.NULL:{this._err(Q.unexpectedNullCharacter),this.currentAttr.value+=ft;break}case v.QUOTATION_MARK:case v.APOSTROPHE:case v.LESS_THAN_SIGN:case v.EQUALS_SIGN:case v.GRAVE_ACCENT:{this._err(Q.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(t);break}case v.EOF:{this._err(Q.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAfterAttributeValueQuoted(t){switch(t){case v.SPACE:case v.LINE_FEED:case v.TABULATION:case v.FORM_FEED:{this._leaveAttrValue(),this.state=N.BEFORE_ATTRIBUTE_NAME;break}case v.SOLIDUS:{this._leaveAttrValue(),this.state=N.SELF_CLOSING_START_TAG;break}case v.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=N.DATA,this.emitCurrentTagToken();break}case v.EOF:{this._err(Q.eofInTag),this._emitEOFToken();break}default:this._err(Q.missingWhitespaceBetweenAttributes),this.state=N.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateSelfClosingStartTag(t){switch(t){case v.GREATER_THAN_SIGN:{const n=this.currentToken;n.selfClosing=!0,this.state=N.DATA,this.emitCurrentTagToken();break}case v.EOF:{this._err(Q.eofInTag),this._emitEOFToken();break}default:this._err(Q.unexpectedSolidusInTag),this.state=N.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateBogusComment(t){const n=this.currentToken;switch(t){case v.GREATER_THAN_SIGN:{this.state=N.DATA,this.emitCurrentComment(n);break}case v.EOF:{this.emitCurrentComment(n),this._emitEOFToken();break}case v.NULL:{this._err(Q.unexpectedNullCharacter),n.data+=ft;break}default:n.data+=String.fromCodePoint(t)}}_stateMarkupDeclarationOpen(t){this._consumeSequenceIfMatch(fn.DASH_DASH,!0)?(this._createCommentToken(fn.DASH_DASH.length+1),this.state=N.COMMENT_START):this._consumeSequenceIfMatch(fn.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(fn.DOCTYPE.length+1),this.state=N.DOCTYPE):this._consumeSequenceIfMatch(fn.CDATA_START,!0)?this.inForeignNode?this.state=N.CDATA_SECTION:(this._err(Q.cdataInHtmlContent),this._createCommentToken(fn.CDATA_START.length+1),this.currentToken.data="[CDATA[",this.state=N.BOGUS_COMMENT):this._ensureHibernation()||(this._err(Q.incorrectlyOpenedComment),this._createCommentToken(2),this.state=N.BOGUS_COMMENT,this._stateBogusComment(t))}_stateCommentStart(t){switch(t){case v.HYPHEN_MINUS:{this.state=N.COMMENT_START_DASH;break}case v.GREATER_THAN_SIGN:{this._err(Q.abruptClosingOfEmptyComment),this.state=N.DATA;const n=this.currentToken;this.emitCurrentComment(n);break}default:this.state=N.COMMENT,this._stateComment(t)}}_stateCommentStartDash(t){const n=this.currentToken;switch(t){case v.HYPHEN_MINUS:{this.state=N.COMMENT_END;break}case v.GREATER_THAN_SIGN:{this._err(Q.abruptClosingOfEmptyComment),this.state=N.DATA,this.emitCurrentComment(n);break}case v.EOF:{this._err(Q.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=N.COMMENT,this._stateComment(t)}}_stateComment(t){const n=this.currentToken;switch(t){case v.HYPHEN_MINUS:{this.state=N.COMMENT_END_DASH;break}case v.LESS_THAN_SIGN:{n.data+="<",this.state=N.COMMENT_LESS_THAN_SIGN;break}case v.NULL:{this._err(Q.unexpectedNullCharacter),n.data+=ft;break}case v.EOF:{this._err(Q.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+=String.fromCodePoint(t)}}_stateCommentLessThanSign(t){const n=this.currentToken;switch(t){case v.EXCLAMATION_MARK:{n.data+="!",this.state=N.COMMENT_LESS_THAN_SIGN_BANG;break}case v.LESS_THAN_SIGN:{n.data+="<";break}default:this.state=N.COMMENT,this._stateComment(t)}}_stateCommentLessThanSignBang(t){t===v.HYPHEN_MINUS?this.state=N.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=N.COMMENT,this._stateComment(t))}_stateCommentLessThanSignBangDash(t){t===v.HYPHEN_MINUS?this.state=N.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=N.COMMENT_END_DASH,this._stateCommentEndDash(t))}_stateCommentLessThanSignBangDashDash(t){t!==v.GREATER_THAN_SIGN&&t!==v.EOF&&this._err(Q.nestedComment),this.state=N.COMMENT_END,this._stateCommentEnd(t)}_stateCommentEndDash(t){const n=this.currentToken;switch(t){case v.HYPHEN_MINUS:{this.state=N.COMMENT_END;break}case v.EOF:{this._err(Q.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=N.COMMENT,this._stateComment(t)}}_stateCommentEnd(t){const n=this.currentToken;switch(t){case v.GREATER_THAN_SIGN:{this.state=N.DATA,this.emitCurrentComment(n);break}case v.EXCLAMATION_MARK:{this.state=N.COMMENT_END_BANG;break}case v.HYPHEN_MINUS:{n.data+="-";break}case v.EOF:{this._err(Q.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--",this.state=N.COMMENT,this._stateComment(t)}}_stateCommentEndBang(t){const n=this.currentToken;switch(t){case v.HYPHEN_MINUS:{n.data+="--!",this.state=N.COMMENT_END_DASH;break}case v.GREATER_THAN_SIGN:{this._err(Q.incorrectlyClosedComment),this.state=N.DATA,this.emitCurrentComment(n);break}case v.EOF:{this._err(Q.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--!",this.state=N.COMMENT,this._stateComment(t)}}_stateDoctype(t){switch(t){case v.SPACE:case v.LINE_FEED:case v.TABULATION:case v.FORM_FEED:{this.state=N.BEFORE_DOCTYPE_NAME;break}case v.GREATER_THAN_SIGN:{this.state=N.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t);break}case v.EOF:{this._err(Q.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(Q.missingWhitespaceBeforeDoctypeName),this.state=N.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t)}}_stateBeforeDoctypeName(t){if(js(t))this._createDoctypeToken(String.fromCharCode(Fu(t))),this.state=N.DOCTYPE_NAME;else switch(t){case v.SPACE:case v.LINE_FEED:case v.TABULATION:case v.FORM_FEED:break;case v.NULL:{this._err(Q.unexpectedNullCharacter),this._createDoctypeToken(ft),this.state=N.DOCTYPE_NAME;break}case v.GREATER_THAN_SIGN:{this._err(Q.missingDoctypeName),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=N.DATA;break}case v.EOF:{this._err(Q.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=N.DOCTYPE_NAME}}_stateDoctypeName(t){const n=this.currentToken;switch(t){case v.SPACE:case v.LINE_FEED:case v.TABULATION:case v.FORM_FEED:{this.state=N.AFTER_DOCTYPE_NAME;break}case v.GREATER_THAN_SIGN:{this.state=N.DATA,this.emitCurrentDoctype(n);break}case v.NULL:{this._err(Q.unexpectedNullCharacter),n.name+=ft;break}case v.EOF:{this._err(Q.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.name+=String.fromCodePoint(js(t)?Fu(t):t)}}_stateAfterDoctypeName(t){const n=this.currentToken;switch(t){case v.SPACE:case v.LINE_FEED:case v.TABULATION:case v.FORM_FEED:break;case v.GREATER_THAN_SIGN:{this.state=N.DATA,this.emitCurrentDoctype(n);break}case v.EOF:{this._err(Q.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._consumeSequenceIfMatch(fn.PUBLIC,!1)?this.state=N.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(fn.SYSTEM,!1)?this.state=N.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(Q.invalidCharacterSequenceAfterDoctypeName),n.forceQuirks=!0,this.state=N.BOGUS_DOCTYPE,this._stateBogusDoctype(t))}}_stateAfterDoctypePublicKeyword(t){const n=this.currentToken;switch(t){case v.SPACE:case v.LINE_FEED:case v.TABULATION:case v.FORM_FEED:{this.state=N.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break}case v.QUOTATION_MARK:{this._err(Q.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=N.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case v.APOSTROPHE:{this._err(Q.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=N.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case v.GREATER_THAN_SIGN:{this._err(Q.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=N.DATA,this.emitCurrentDoctype(n);break}case v.EOF:{this._err(Q.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(Q.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=N.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case v.SPACE:case v.LINE_FEED:case v.TABULATION:case v.FORM_FEED:break;case v.QUOTATION_MARK:{n.publicId="",this.state=N.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case v.APOSTROPHE:{n.publicId="",this.state=N.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case v.GREATER_THAN_SIGN:{this._err(Q.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=N.DATA,this.emitCurrentDoctype(n);break}case v.EOF:{this._err(Q.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(Q.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=N.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypePublicIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case v.QUOTATION_MARK:{this.state=N.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case v.NULL:{this._err(Q.unexpectedNullCharacter),n.publicId+=ft;break}case v.GREATER_THAN_SIGN:{this._err(Q.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=N.DATA;break}case v.EOF:{this._err(Q.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 v.APOSTROPHE:{this.state=N.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case v.NULL:{this._err(Q.unexpectedNullCharacter),n.publicId+=ft;break}case v.GREATER_THAN_SIGN:{this._err(Q.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=N.DATA;break}case v.EOF:{this._err(Q.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 v.SPACE:case v.LINE_FEED:case v.TABULATION:case v.FORM_FEED:{this.state=N.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break}case v.GREATER_THAN_SIGN:{this.state=N.DATA,this.emitCurrentDoctype(n);break}case v.QUOTATION_MARK:{this._err(Q.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=N.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case v.APOSTROPHE:{this._err(Q.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=N.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case v.EOF:{this._err(Q.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(Q.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=N.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBetweenDoctypePublicAndSystemIdentifiers(t){const n=this.currentToken;switch(t){case v.SPACE:case v.LINE_FEED:case v.TABULATION:case v.FORM_FEED:break;case v.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=N.DATA;break}case v.QUOTATION_MARK:{n.systemId="",this.state=N.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case v.APOSTROPHE:{n.systemId="",this.state=N.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case v.EOF:{this._err(Q.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(Q.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=N.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateAfterDoctypeSystemKeyword(t){const n=this.currentToken;switch(t){case v.SPACE:case v.LINE_FEED:case v.TABULATION:case v.FORM_FEED:{this.state=N.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break}case v.QUOTATION_MARK:{this._err(Q.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=N.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case v.APOSTROPHE:{this._err(Q.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=N.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case v.GREATER_THAN_SIGN:{this._err(Q.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=N.DATA,this.emitCurrentDoctype(n);break}case v.EOF:{this._err(Q.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(Q.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=N.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case v.SPACE:case v.LINE_FEED:case v.TABULATION:case v.FORM_FEED:break;case v.QUOTATION_MARK:{n.systemId="",this.state=N.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case v.APOSTROPHE:{n.systemId="",this.state=N.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case v.GREATER_THAN_SIGN:{this._err(Q.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=N.DATA,this.emitCurrentDoctype(n);break}case v.EOF:{this._err(Q.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(Q.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=N.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypeSystemIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case v.QUOTATION_MARK:{this.state=N.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case v.NULL:{this._err(Q.unexpectedNullCharacter),n.systemId+=ft;break}case v.GREATER_THAN_SIGN:{this._err(Q.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=N.DATA;break}case v.EOF:{this._err(Q.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 v.APOSTROPHE:{this.state=N.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case v.NULL:{this._err(Q.unexpectedNullCharacter),n.systemId+=ft;break}case v.GREATER_THAN_SIGN:{this._err(Q.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=N.DATA;break}case v.EOF:{this._err(Q.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 v.SPACE:case v.LINE_FEED:case v.TABULATION:case v.FORM_FEED:break;case v.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=N.DATA;break}case v.EOF:{this._err(Q.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(Q.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=N.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBogusDoctype(t){const n=this.currentToken;switch(t){case v.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=N.DATA;break}case v.NULL:{this._err(Q.unexpectedNullCharacter);break}case v.EOF:{this.emitCurrentDoctype(n),this._emitEOFToken();break}}}_stateCdataSection(t){switch(t){case v.RIGHT_SQUARE_BRACKET:{this.state=N.CDATA_SECTION_BRACKET;break}case v.EOF:{this._err(Q.eofInCdata),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateCdataSectionBracket(t){t===v.RIGHT_SQUARE_BRACKET?this.state=N.CDATA_SECTION_END:(this._emitChars("]"),this.state=N.CDATA_SECTION,this._stateCdataSection(t))}_stateCdataSectionEnd(t){switch(t){case v.GREATER_THAN_SIGN:{this.state=N.DATA;break}case v.RIGHT_SQUARE_BRACKET:{this._emitChars("]");break}default:this._emitChars("]]"),this.state=N.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(v.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&g1(this.preprocessor.peek(1))?N.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(t){g1(t)?this._flushCodePointConsumedAsCharacterReference(t):(t===v.SEMICOLON&&this._err(Q.unknownNamedCharacterReference),this.state=this.returnState,this._callState(t))}}const T1=new Set([p.DD,p.DT,p.LI,p.OPTGROUP,p.OPTION,p.P,p.RB,p.RP,p.RT,p.RTC]),b1=new Set([...T1,p.CAPTION,p.COLGROUP,p.TBODY,p.TD,p.TFOOT,p.TH,p.THEAD,p.TR]),Bu=new Set([p.APPLET,p.CAPTION,p.HTML,p.MARQUEE,p.OBJECT,p.TABLE,p.TD,p.TEMPLATE,p.TH]),r3=new Set([...Bu,p.OL,p.UL]),i3=new Set([...Bu,p.BUTTON]),x1=new Set([p.ANNOTATION_XML,p.MI,p.MN,p.MO,p.MS,p.MTEXT]),_1=new Set([p.DESC,p.FOREIGN_OBJECT,p.TITLE]),o3=new Set([p.TR,p.TEMPLATE,p.HTML]),s3=new Set([p.TBODY,p.TFOOT,p.THEAD,p.TEMPLATE,p.HTML]),a3=new Set([p.TABLE,p.TEMPLATE,p.HTML]),u3=new Set([p.TD,p.TH]);class l3{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=p.UNKNOWN,this.current=t}_indexOf(t){return this.items.lastIndexOf(t,this.stackTop)}_isInTemplate(){return this.currentTagId===p.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===oe.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 o=this._indexOf(t)+1;this.items.splice(o,0,n),this.tagIDs.splice(o,0,r),this.stackTop++,o===this.stackTop&&this._updateCurrentElement(),this.current&&this.currentTagId!==void 0&&this.handler.onItemPush(this.current,this.currentTagId,o===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])!==oe.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(sf,oe.HTML)}popUntilTableCellPopped(){this.popUntilPopped(u3,oe.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(a3,oe.HTML)}clearBackToTableBodyContext(){this.clearBackTo(s3,oe.HTML)}clearBackToTableRowContext(){this.clearBackTo(o3,oe.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]===p.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]===p.HTML}hasInDynamicScope(t,n){for(let r=this.stackTop;r>=0;r--){const o=this.tagIDs[r];switch(this.treeAdapter.getNamespaceURI(this.items[r])){case oe.HTML:{if(o===t)return!0;if(n.has(o))return!1;break}case oe.SVG:{if(_1.has(o))return!1;break}case oe.MATHML:{if(x1.has(o))return!1;break}}}return!0}hasInScope(t){return this.hasInDynamicScope(t,Bu)}hasInListItemScope(t){return this.hasInDynamicScope(t,r3)}hasInButtonScope(t){return this.hasInDynamicScope(t,i3)}hasNumberedHeaderInScope(){for(let t=this.stackTop;t>=0;t--){const n=this.tagIDs[t];switch(this.treeAdapter.getNamespaceURI(this.items[t])){case oe.HTML:{if(sf.has(n))return!0;if(Bu.has(n))return!1;break}case oe.SVG:{if(_1.has(n))return!1;break}case oe.MATHML:{if(x1.has(n))return!1;break}}}return!0}hasInTableScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===oe.HTML)switch(this.tagIDs[n]){case t:return!0;case p.TABLE:case p.HTML:return!1}return!0}hasTableBodyContextInTableScope(){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===oe.HTML)switch(this.tagIDs[t]){case p.TBODY:case p.THEAD:case p.TFOOT:return!0;case p.TABLE:case p.HTML:return!1}return!0}hasInSelectScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===oe.HTML)switch(this.tagIDs[n]){case t:return!0;case p.OPTION:case p.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;this.currentTagId!==void 0&&T1.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&b1.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(t){for(;this.currentTagId!==void 0&&this.currentTagId!==t&&b1.has(this.currentTagId);)this.pop()}}const af=3;var lr;(function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"})(lr||(lr={}));const w1={type:lr.Marker};class c3{constructor(t){this.treeAdapter=t,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(t,n){const r=[],o=n.length,a=this.treeAdapter.getTagName(t),u=this.treeAdapter.getNamespaceURI(t);for(let c=0;c<this.entries.length;c++){const d=this.entries[c];if(d.type===lr.Marker)break;const{element:h}=d;if(this.treeAdapter.getTagName(h)===a&&this.treeAdapter.getNamespaceURI(h)===u){const m=this.treeAdapter.getAttrList(h);m.length===o&&r.push({idx:c,attrs:m})}}return r}_ensureNoahArkCondition(t){if(this.entries.length<af)return;const n=this.treeAdapter.getAttrList(t),r=this._getNoahArkConditionCandidates(t,n);if(r.length<af)return;const o=new Map(n.map(u=>[u.name,u.value]));let a=0;for(let u=0;u<r.length;u++){const c=r[u];c.attrs.every(d=>o.get(d.name)===d.value)&&(a+=1,a>=af&&this.entries.splice(c.idx,1))}}insertMarker(){this.entries.unshift(w1)}pushElement(t,n){this._ensureNoahArkCondition(t),this.entries.unshift({type:lr.Element,element:t,token:n})}insertElementAfterBookmark(t,n){const r=this.entries.indexOf(this.bookmark);this.entries.splice(r,0,{type:lr.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(w1);t===-1?this.entries.length=0:this.entries.splice(0,t+1)}getElementEntryInScopeWithTagName(t){const n=this.entries.find(r=>r.type===lr.Marker||this.treeAdapter.getTagName(r.element)===t);return n&&n.type===lr.Element?n:null}getElementEntry(t){return this.entries.find(n=>n.type===lr.Element&&n.element===t)}}const qr={createDocument(){return{nodeName:"#document",mode:Ln.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 o=e.childNodes.find(a=>a.nodeName==="#documentType");if(o)o.name=t,o.publicId=n,o.systemId=r;else{const a={nodeName:"#documentType",name:t,publicId:n,systemId:r,parentNode:null};qr.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(qr.isTextNode(n)){n.value+=t;return}}qr.appendChild(e,qr.createTextNode(t))},insertTextBefore(e,t,n){const r=e.childNodes[e.childNodes.indexOf(n)-1];r&&qr.isTextNode(r)?r.value+=t:qr.insertBefore(e,qr.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=U(U({},e.sourceCodeLocation),t)}},S1="html",d3="about:legacy-compat",f3="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",A1=["+//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//"],h3=[...A1,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],p3=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),v1=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],m3=[...v1,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function C1(e,t){return t.some(n=>e.startsWith(n))}function g3(e){return e.name===S1&&e.publicId===null&&(e.systemId===null||e.systemId===d3)}function E3(e){if(e.name!==S1)return Ln.QUIRKS;const{systemId:t}=e;if(t&&t.toLowerCase()===f3)return Ln.QUIRKS;let{publicId:n}=e;if(n!==null){if(n=n.toLowerCase(),p3.has(n))return Ln.QUIRKS;let r=t===null?h3:A1;if(C1(n,r))return Ln.QUIRKS;if(r=t===null?v1:m3,C1(n,r))return Ln.LIMITED_QUIRKS}return Ln.NO_QUIRKS}const k1={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},y3="definitionurl",T3="definitionURL",b3=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])),x3=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:oe.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:oe.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:oe.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:oe.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:oe.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:oe.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:oe.XLINK}],["xml:lang",{prefix:"xml",name:"lang",namespace:oe.XML}],["xml:space",{prefix:"xml",name:"space",namespace:oe.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:oe.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:oe.XMLNS}]]),_3=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])),w3=new Set([p.B,p.BIG,p.BLOCKQUOTE,p.BODY,p.BR,p.CENTER,p.CODE,p.DD,p.DIV,p.DL,p.DT,p.EM,p.EMBED,p.H1,p.H2,p.H3,p.H4,p.H5,p.H6,p.HEAD,p.HR,p.I,p.IMG,p.LI,p.LISTING,p.MENU,p.META,p.NOBR,p.OL,p.P,p.PRE,p.RUBY,p.S,p.SMALL,p.SPAN,p.STRONG,p.STRIKE,p.SUB,p.SUP,p.TABLE,p.TT,p.U,p.UL,p.VAR]);function S3(e){const t=e.tagID;return t===p.FONT&&e.attrs.some(({name:r})=>r===Li.COLOR||r===Li.SIZE||r===Li.FACE)||w3.has(t)}function N1(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===y3){e.attrs[t].name=T3;break}}function O1(e){for(let t=0;t<e.attrs.length;t++){const n=b3.get(e.attrs[t].name);n!=null&&(e.attrs[t].name=n)}}function uf(e){for(let t=0;t<e.attrs.length;t++){const n=x3.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 A3(e){const t=_3.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=So(e.tagName))}function v3(e,t){return t===oe.MATHML&&(e===p.MI||e===p.MO||e===p.MN||e===p.MS||e===p.MTEXT)}function C3(e,t,n){if(t===oe.MATHML&&e===p.ANNOTATION_XML){for(let r=0;r<n.length;r++)if(n[r].name===Li.ENCODING){const o=n[r].value.toLowerCase();return o===k1.TEXT_HTML||o===k1.APPLICATION_XML}}return t===oe.SVG&&(e===p.FOREIGN_OBJECT||e===p.DESC||e===p.TITLE)}function k3(e,t,n,r){return(!r||r===oe.HTML)&&C3(e,t,n)||(!r||r===oe.MATHML)&&v3(e,t)}const N3="hidden",O3=8,I3=3;var L;(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"})(L||(L={}));const R3={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},I1=new Set([p.TABLE,p.TBODY,p.TFOOT,p.THEAD,p.TR]),R1={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:qr,onParseError:null};class P1{constructor(t,n,r=null,o=null){this.fragmentContext=r,this.scriptHandler=o,this.currentToken=null,this.stopped=!1,this.insertionMode=L.INITIAL,this.originalInsertionMode=L.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=U(U({},R1),t),this.treeAdapter=this.options.treeAdapter,this.onParseError=this.options.onParseError,this.onParseError&&(this.options.sourceCodeLocationInfo=!0),this.document=n!=null?n:this.treeAdapter.createDocument(),this.tokenizer=new n3(this.options,this),this.activeFormattingElements=new c3(this.treeAdapter),this.fragmentContextID=r?So(this.treeAdapter.getTagName(r)):p.UNKNOWN,this._setContextModes(r!=null?r:this.document,this.fragmentContextID),this.openElements=new l3(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=U(U({},R1),n);t!=null||(t=r.treeAdapter.createElement(Y.TEMPLATE,oe.HTML,[]));const o=r.treeAdapter.createElement("documentmock",oe.HTML,[]),a=new this(r,o,t);return a.fragmentContextID===p.TEMPLATE&&a.tmplInsertionModeStack.unshift(L.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 o;if(!this.onParseError)return;const a=(o=t.location)!==null&&o!==void 0?o:R3,u={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(u)}onItemPush(t,n,r){var o,a;(a=(o=this.treeAdapter).onItemPush)===null||a===void 0||a.call(o,t),r&&this.openElements.stackTop>0&&this._setContextModes(t,n)}onItemPop(t,n){var r,o;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(t,this.currentToken),(o=(r=this.treeAdapter).onItemPop)===null||o===void 0||o.call(r,t,this.openElements.current),n){let a,u;this.openElements.stackTop===0&&this.fragmentContext?(a=this.fragmentContext,u=this.fragmentContextID):{current:a,currentTagId:u}=this.openElements,this._setContextModes(a,u)}}_setContextModes(t,n){const r=t===this.document||t&&this.treeAdapter.getNamespaceURI(t)===oe.HTML;this.currentNotInHTML=!r,this.tokenizer.inForeignNode=!r&&t!==void 0&&n!==void 0&&!this._isIntegrationPoint(n,t)}_switchToTextParsing(t,n){this._insertElement(t,oe.HTML),this.tokenizer.state=n,this.originalInsertionMode=this.insertionMode,this.insertionMode=L.TEXT}switchToPlaintextParsing(){this.insertionMode=L.TEXT,this.originalInsertionMode=L.IN_BODY,this.tokenizer.state=xt.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)===Y.FORM){this.formElement=t;break}t=this.treeAdapter.getParentNode(t)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==oe.HTML))switch(this.fragmentContextID){case p.TITLE:case p.TEXTAREA:{this.tokenizer.state=xt.RCDATA;break}case p.STYLE:case p.XMP:case p.IFRAME:case p.NOEMBED:case p.NOFRAMES:case p.NOSCRIPT:{this.tokenizer.state=xt.RAWTEXT;break}case p.SCRIPT:{this.tokenizer.state=xt.SCRIPT_DATA;break}case p.PLAINTEXT:{this.tokenizer.state=xt.PLAINTEXT;break}}}_setDocumentType(t){const n=t.name||"",r=t.publicId||"",o=t.systemId||"";if(this.treeAdapter.setDocumentType(this.document,n,r,o),t.location){const u=this.treeAdapter.getChildNodes(this.document).find(c=>this.treeAdapter.isDocumentTypeNode(c));u&&this.treeAdapter.setNodeSourceCodeLocation(u,t.location)}}_attachElementToTree(t,n){if(this.options.sourceCodeLocationInfo){const r=n&&ne(U({},n),{startTag:n});this.treeAdapter.setNodeSourceCodeLocation(t,r)}if(this._shouldFosterParentOnInsertion())this._fosterParentElement(t);else{const r=this.openElements.currentTmplContentOrNode;this.treeAdapter.appendChild(r!=null?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,oe.HTML,[]);this._attachElementToTree(r,null),this.openElements.push(r,n)}_insertTemplate(t){const n=this.treeAdapter.createElement(t.tagName,oe.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(Y.HTML,oe.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(t,null),this.treeAdapter.appendChild(this.openElements.current,t),this.openElements.push(t,p.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 o=this.treeAdapter.getChildNodes(n),a=r?o.lastIndexOf(r):o.length,u=o[a-1];if(this.treeAdapter.getNodeSourceCodeLocation(u)){const{endLine:d,endCol:h,endOffset:m}=t.location;this.treeAdapter.updateNodeSourceCodeLocation(u,{endLine:d,endCol:h,endOffset:m})}else this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(u,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,o=this.treeAdapter.getTagName(t),a=n.type===$e.END_TAG&&o===n.tagName?{endTag:U({},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===p.SVG&&this.treeAdapter.getTagName(n)===Y.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(n)===oe.MATHML?!1:this.tokenizer.inForeignNode||(t.tagID===p.MGLYPH||t.tagID===p.MALIGNMARK)&&r!==void 0&&!this._isIntegrationPoint(r,n,oe.HTML)}_processToken(t){switch(t.type){case $e.CHARACTER:{this.onCharacter(t);break}case $e.NULL_CHARACTER:{this.onNullCharacter(t);break}case $e.COMMENT:{this.onComment(t);break}case $e.DOCTYPE:{this.onDoctype(t);break}case $e.START_TAG:{this._processStartTag(t);break}case $e.END_TAG:{this.onEndTag(t);break}case $e.EOF:{this.onEof(t);break}case $e.WHITESPACE_CHARACTER:{this.onWhitespaceCharacter(t);break}}}_isIntegrationPoint(t,n,r){const o=this.treeAdapter.getNamespaceURI(n),a=this.treeAdapter.getAttrList(n);return k3(t,o,a,r)}_reconstructActiveFormattingElements(){const t=this.activeFormattingElements.entries.length;if(t){const n=this.activeFormattingElements.entries.findIndex(o=>o.type===lr.Marker||this.openElements.contains(o.element)),r=n===-1?t-1:n-1;for(let o=r;o>=0;o--){const a=this.activeFormattingElements.entries[o];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=L.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(p.P),this.openElements.popUntilTagNamePopped(p.P)}_resetInsertionMode(){for(let t=this.openElements.stackTop;t>=0;t--)switch(t===0&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[t]){case p.TR:{this.insertionMode=L.IN_ROW;return}case p.TBODY:case p.THEAD:case p.TFOOT:{this.insertionMode=L.IN_TABLE_BODY;return}case p.CAPTION:{this.insertionMode=L.IN_CAPTION;return}case p.COLGROUP:{this.insertionMode=L.IN_COLUMN_GROUP;return}case p.TABLE:{this.insertionMode=L.IN_TABLE;return}case p.BODY:{this.insertionMode=L.IN_BODY;return}case p.FRAMESET:{this.insertionMode=L.IN_FRAMESET;return}case p.SELECT:{this._resetInsertionModeForSelect(t);return}case p.TEMPLATE:{this.insertionMode=this.tmplInsertionModeStack[0];return}case p.HTML:{this.insertionMode=this.headElement?L.AFTER_HEAD:L.BEFORE_HEAD;return}case p.TD:case p.TH:{if(t>0){this.insertionMode=L.IN_CELL;return}break}case p.HEAD:{if(t>0){this.insertionMode=L.IN_HEAD;return}break}}this.insertionMode=L.IN_BODY}_resetInsertionModeForSelect(t){if(t>0)for(let n=t-1;n>0;n--){const r=this.openElements.tagIDs[n];if(r===p.TEMPLATE)break;if(r===p.TABLE){this.insertionMode=L.IN_SELECT_IN_TABLE;return}}this.insertionMode=L.IN_SELECT}_isElementCausesFosterParenting(t){return I1.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 p.TEMPLATE:{if(this.treeAdapter.getNamespaceURI(n)===oe.HTML)return{parent:this.treeAdapter.getTemplateContent(n),beforeElement:null};break}case p.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 JN[r].has(n)}onCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){uI(this,t);return}switch(this.insertionMode){case L.INITIAL:{$s(this,t);break}case L.BEFORE_HTML:{Vs(this,t);break}case L.BEFORE_HEAD:{Ys(this,t);break}case L.IN_HEAD:{Ws(this,t);break}case L.IN_HEAD_NO_SCRIPT:{qs(this,t);break}case L.AFTER_HEAD:{Gs(this,t);break}case L.IN_BODY:case L.IN_CAPTION:case L.IN_CELL:case L.IN_TEMPLATE:{D1(this,t);break}case L.TEXT:case L.IN_SELECT:case L.IN_SELECT_IN_TABLE:{this._insertCharacters(t);break}case L.IN_TABLE:case L.IN_TABLE_BODY:case L.IN_ROW:{ff(this,t);break}case L.IN_TABLE_TEXT:{$1(this,t);break}case L.IN_COLUMN_GROUP:{zu(this,t);break}case L.AFTER_BODY:{Vu(this,t);break}case L.AFTER_AFTER_BODY:{Yu(this,t);break}}}onNullCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){aI(this,t);return}switch(this.insertionMode){case L.INITIAL:{$s(this,t);break}case L.BEFORE_HTML:{Vs(this,t);break}case L.BEFORE_HEAD:{Ys(this,t);break}case L.IN_HEAD:{Ws(this,t);break}case L.IN_HEAD_NO_SCRIPT:{qs(this,t);break}case L.AFTER_HEAD:{Gs(this,t);break}case L.TEXT:{this._insertCharacters(t);break}case L.IN_TABLE:case L.IN_TABLE_BODY:case L.IN_ROW:{ff(this,t);break}case L.IN_COLUMN_GROUP:{zu(this,t);break}case L.AFTER_BODY:{Vu(this,t);break}case L.AFTER_AFTER_BODY:{Yu(this,t);break}}}onComment(t){if(this.skipNextNewLine=!1,this.currentNotInHTML){cf(this,t);return}switch(this.insertionMode){case L.INITIAL:case L.BEFORE_HTML:case L.BEFORE_HEAD:case L.IN_HEAD:case L.IN_HEAD_NO_SCRIPT:case L.AFTER_HEAD:case L.IN_BODY:case L.IN_TABLE:case L.IN_CAPTION:case L.IN_COLUMN_GROUP:case L.IN_TABLE_BODY:case L.IN_ROW:case L.IN_CELL:case L.IN_SELECT:case L.IN_SELECT_IN_TABLE:case L.IN_TEMPLATE:case L.IN_FRAMESET:case L.AFTER_FRAMESET:{cf(this,t);break}case L.IN_TABLE_TEXT:{Xs(this,t);break}case L.AFTER_BODY:{U3(this,t);break}case L.AFTER_AFTER_BODY:case L.AFTER_AFTER_FRAMESET:{H3(this,t);break}}}onDoctype(t){switch(this.skipNextNewLine=!1,this.insertionMode){case L.INITIAL:{z3(this,t);break}case L.BEFORE_HEAD:case L.IN_HEAD:case L.IN_HEAD_NO_SCRIPT:case L.AFTER_HEAD:{this._err(t,Q.misplacedDoctype);break}case L.IN_TABLE_TEXT:{Xs(this,t);break}}}onStartTag(t){this.skipNextNewLine=!1,this.currentToken=t,this._processStartTag(t),t.selfClosing&&!t.ackSelfClosing&&this._err(t,Q.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(t){this.shouldProcessStartTagTokenInForeignContent(t)?lI(this,t):this._startTagOutsideForeignContent(t)}_startTagOutsideForeignContent(t){switch(this.insertionMode){case L.INITIAL:{$s(this,t);break}case L.BEFORE_HTML:{j3(this,t);break}case L.BEFORE_HEAD:{V3(this,t);break}case L.IN_HEAD:{qn(this,t);break}case L.IN_HEAD_NO_SCRIPT:{q3(this,t);break}case L.AFTER_HEAD:{K3(this,t);break}case L.IN_BODY:{Gt(this,t);break}case L.IN_TABLE:{Ao(this,t);break}case L.IN_TABLE_TEXT:{Xs(this,t);break}case L.IN_CAPTION:{YO(this,t);break}case L.IN_COLUMN_GROUP:{hf(this,t);break}case L.IN_TABLE_BODY:{ju(this,t);break}case L.IN_ROW:{$u(this,t);break}case L.IN_CELL:{GO(this,t);break}case L.IN_SELECT:{W1(this,t);break}case L.IN_SELECT_IN_TABLE:{QO(this,t);break}case L.IN_TEMPLATE:{JO(this,t);break}case L.AFTER_BODY:{eI(this,t);break}case L.IN_FRAMESET:{tI(this,t);break}case L.AFTER_FRAMESET:{rI(this,t);break}case L.AFTER_AFTER_BODY:{oI(this,t);break}case L.AFTER_AFTER_FRAMESET:{sI(this,t);break}}}onEndTag(t){this.skipNextNewLine=!1,this.currentToken=t,this.currentNotInHTML?cI(this,t):this._endTagOutsideForeignContent(t)}_endTagOutsideForeignContent(t){switch(this.insertionMode){case L.INITIAL:{$s(this,t);break}case L.BEFORE_HTML:{$3(this,t);break}case L.BEFORE_HEAD:{Y3(this,t);break}case L.IN_HEAD:{W3(this,t);break}case L.IN_HEAD_NO_SCRIPT:{G3(this,t);break}case L.AFTER_HEAD:{Q3(this,t);break}case L.IN_BODY:{Hu(this,t);break}case L.TEXT:{DO(this,t);break}case L.IN_TABLE:{Ks(this,t);break}case L.IN_TABLE_TEXT:{Xs(this,t);break}case L.IN_CAPTION:{WO(this,t);break}case L.IN_COLUMN_GROUP:{qO(this,t);break}case L.IN_TABLE_BODY:{pf(this,t);break}case L.IN_ROW:{Y1(this,t);break}case L.IN_CELL:{KO(this,t);break}case L.IN_SELECT:{q1(this,t);break}case L.IN_SELECT_IN_TABLE:{XO(this,t);break}case L.IN_TEMPLATE:{ZO(this,t);break}case L.AFTER_BODY:{K1(this,t);break}case L.IN_FRAMESET:{nI(this,t);break}case L.AFTER_FRAMESET:{iI(this,t);break}case L.AFTER_AFTER_BODY:{Yu(this,t);break}}}onEof(t){switch(this.insertionMode){case L.INITIAL:{$s(this,t);break}case L.BEFORE_HTML:{Vs(this,t);break}case L.BEFORE_HEAD:{Ys(this,t);break}case L.IN_HEAD:{Ws(this,t);break}case L.IN_HEAD_NO_SCRIPT:{qs(this,t);break}case L.AFTER_HEAD:{Gs(this,t);break}case L.IN_BODY:case L.IN_TABLE:case L.IN_CAPTION:case L.IN_COLUMN_GROUP:case L.IN_TABLE_BODY:case L.IN_ROW:case L.IN_CELL:case L.IN_SELECT:case L.IN_SELECT_IN_TABLE:{z1(this,t);break}case L.TEXT:{MO(this,t);break}case L.IN_TABLE_TEXT:{Xs(this,t);break}case L.IN_TEMPLATE:{G1(this,t);break}case L.AFTER_BODY:case L.IN_FRAMESET:case L.AFTER_FRAMESET:case L.AFTER_AFTER_BODY:case L.AFTER_AFTER_FRAMESET:{df(this,t);break}}}onWhitespaceCharacter(t){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,t.chars.charCodeAt(0)===v.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 L.IN_HEAD:case L.IN_HEAD_NO_SCRIPT:case L.AFTER_HEAD:case L.TEXT:case L.IN_COLUMN_GROUP:case L.IN_SELECT:case L.IN_SELECT_IN_TABLE:case L.IN_FRAMESET:case L.AFTER_FRAMESET:{this._insertCharacters(t);break}case L.IN_BODY:case L.IN_CAPTION:case L.IN_CELL:case L.IN_TEMPLATE:case L.AFTER_BODY:case L.AFTER_AFTER_BODY:case L.AFTER_AFTER_FRAMESET:{L1(this,t);break}case L.IN_TABLE:case L.IN_TABLE_BODY:case L.IN_ROW:{ff(this,t);break}case L.IN_TABLE_TEXT:{j1(this,t);break}}}}function P3(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):H1(e,t),n}function L3(e,t){let n=null,r=e.openElements.stackTop;for(;r>=0;r--){const o=e.openElements.items[r];if(o===t.element)break;e._isSpecialElement(o,e.openElements.tagIDs[r])&&(n=o)}return n||(e.openElements.shortenToLength(Math.max(r,0)),e.activeFormattingElements.removeEntry(t)),n}function D3(e,t,n){let r=t,o=e.openElements.getCommonAncestor(t);for(let a=0,u=o;u!==n;a++,u=o){o=e.openElements.getCommonAncestor(u);const c=e.activeFormattingElements.getElementEntry(u),d=c&&a>=I3;!c||d?(d&&e.activeFormattingElements.removeEntry(c),e.openElements.remove(u)):(u=M3(e,c),r===t&&(e.activeFormattingElements.bookmark=c),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(u,r),r=u)}return r}function M3(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 F3(e,t,n){const r=e.treeAdapter.getTagName(t),o=So(r);if(e._isElementCausesFosterParenting(o))e._fosterParentElement(n);else{const a=e.treeAdapter.getNamespaceURI(t);o===p.TEMPLATE&&a===oe.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function B3(e,t,n){const r=e.treeAdapter.getNamespaceURI(n.element),{token:o}=n,a=e.treeAdapter.createElement(o.tagName,r,o.attrs);e._adoptNodes(t,a),e.treeAdapter.appendChild(t,a),e.activeFormattingElements.insertElementAfterBookmark(a,o),e.activeFormattingElements.removeEntry(n),e.openElements.remove(n.element),e.openElements.insertAfter(t,a,o.tagID)}function lf(e,t){for(let n=0;n<O3;n++){const r=P3(e,t);if(!r)break;const o=L3(e,r);if(!o)break;e.activeFormattingElements.bookmark=r;const a=D3(e,o,r.element),u=e.openElements.getCommonAncestor(r.element);e.treeAdapter.detachNode(a),u&&F3(e,u,a),B3(e,o,r)}}function cf(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function U3(e,t){e._appendCommentNode(t,e.openElements.items[0])}function H3(e,t){e._appendCommentNode(t,e.document)}function df(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],o=e.treeAdapter.getNodeSourceCodeLocation(r);if(o&&!o.endTag&&(e._setEndLocation(r,t),e.openElements.stackTop>=1)){const a=e.openElements.items[1],u=e.treeAdapter.getNodeSourceCodeLocation(a);u&&!u.endTag&&e._setEndLocation(a,t)}}}}function z3(e,t){e._setDocumentType(t);const n=t.forceQuirks?Ln.QUIRKS:E3(t);g3(t)||e._err(t,Q.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=L.BEFORE_HTML}function $s(e,t){e._err(t,Q.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,Ln.QUIRKS),e.insertionMode=L.BEFORE_HTML,e._processToken(t)}function j3(e,t){t.tagID===p.HTML?(e._insertElement(t,oe.HTML),e.insertionMode=L.BEFORE_HEAD):Vs(e,t)}function $3(e,t){const n=t.tagID;(n===p.HTML||n===p.HEAD||n===p.BODY||n===p.BR)&&Vs(e,t)}function Vs(e,t){e._insertFakeRootElement(),e.insertionMode=L.BEFORE_HEAD,e._processToken(t)}function V3(e,t){switch(t.tagID){case p.HTML:{Gt(e,t);break}case p.HEAD:{e._insertElement(t,oe.HTML),e.headElement=e.openElements.current,e.insertionMode=L.IN_HEAD;break}default:Ys(e,t)}}function Y3(e,t){const n=t.tagID;n===p.HEAD||n===p.BODY||n===p.HTML||n===p.BR?Ys(e,t):e._err(t,Q.endTagWithoutMatchingOpenElement)}function Ys(e,t){e._insertFakeElement(Y.HEAD,p.HEAD),e.headElement=e.openElements.current,e.insertionMode=L.IN_HEAD,e._processToken(t)}function qn(e,t){switch(t.tagID){case p.HTML:{Gt(e,t);break}case p.BASE:case p.BASEFONT:case p.BGSOUND:case p.LINK:case p.META:{e._appendElement(t,oe.HTML),t.ackSelfClosing=!0;break}case p.TITLE:{e._switchToTextParsing(t,xt.RCDATA);break}case p.NOSCRIPT:{e.options.scriptingEnabled?e._switchToTextParsing(t,xt.RAWTEXT):(e._insertElement(t,oe.HTML),e.insertionMode=L.IN_HEAD_NO_SCRIPT);break}case p.NOFRAMES:case p.STYLE:{e._switchToTextParsing(t,xt.RAWTEXT);break}case p.SCRIPT:{e._switchToTextParsing(t,xt.SCRIPT_DATA);break}case p.TEMPLATE:{e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=L.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(L.IN_TEMPLATE);break}case p.HEAD:{e._err(t,Q.misplacedStartTagForHeadElement);break}default:Ws(e,t)}}function W3(e,t){switch(t.tagID){case p.HEAD:{e.openElements.pop(),e.insertionMode=L.AFTER_HEAD;break}case p.BODY:case p.BR:case p.HTML:{Ws(e,t);break}case p.TEMPLATE:{Di(e,t);break}default:e._err(t,Q.endTagWithoutMatchingOpenElement)}}function Di(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==p.TEMPLATE&&e._err(t,Q.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(p.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,Q.endTagWithoutMatchingOpenElement)}function Ws(e,t){e.openElements.pop(),e.insertionMode=L.AFTER_HEAD,e._processToken(t)}function q3(e,t){switch(t.tagID){case p.HTML:{Gt(e,t);break}case p.BASEFONT:case p.BGSOUND:case p.HEAD:case p.LINK:case p.META:case p.NOFRAMES:case p.STYLE:{qn(e,t);break}case p.NOSCRIPT:{e._err(t,Q.nestedNoscriptInHead);break}default:qs(e,t)}}function G3(e,t){switch(t.tagID){case p.NOSCRIPT:{e.openElements.pop(),e.insertionMode=L.IN_HEAD;break}case p.BR:{qs(e,t);break}default:e._err(t,Q.endTagWithoutMatchingOpenElement)}}function qs(e,t){const n=t.type===$e.EOF?Q.openElementsLeftAfterEof:Q.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=L.IN_HEAD,e._processToken(t)}function K3(e,t){switch(t.tagID){case p.HTML:{Gt(e,t);break}case p.BODY:{e._insertElement(t,oe.HTML),e.framesetOk=!1,e.insertionMode=L.IN_BODY;break}case p.FRAMESET:{e._insertElement(t,oe.HTML),e.insertionMode=L.IN_FRAMESET;break}case p.BASE:case p.BASEFONT:case p.BGSOUND:case p.LINK:case p.META:case p.NOFRAMES:case p.SCRIPT:case p.STYLE:case p.TEMPLATE:case p.TITLE:{e._err(t,Q.abandonedHeadElementChild),e.openElements.push(e.headElement,p.HEAD),qn(e,t),e.openElements.remove(e.headElement);break}case p.HEAD:{e._err(t,Q.misplacedStartTagForHeadElement);break}default:Gs(e,t)}}function Q3(e,t){switch(t.tagID){case p.BODY:case p.HTML:case p.BR:{Gs(e,t);break}case p.TEMPLATE:{Di(e,t);break}default:e._err(t,Q.endTagWithoutMatchingOpenElement)}}function Gs(e,t){e._insertFakeElement(Y.BODY,p.BODY),e.insertionMode=L.IN_BODY,Uu(e,t)}function Uu(e,t){switch(t.type){case $e.CHARACTER:{D1(e,t);break}case $e.WHITESPACE_CHARACTER:{L1(e,t);break}case $e.COMMENT:{cf(e,t);break}case $e.START_TAG:{Gt(e,t);break}case $e.END_TAG:{Hu(e,t);break}case $e.EOF:{z1(e,t);break}}}function L1(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function D1(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function X3(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function J3(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}function Z3(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,oe.HTML),e.insertionMode=L.IN_FRAMESET)}function eO(e,t){e.openElements.hasInButtonScope(p.P)&&e._closePElement(),e._insertElement(t,oe.HTML)}function tO(e,t){e.openElements.hasInButtonScope(p.P)&&e._closePElement(),e.openElements.currentTagId!==void 0&&sf.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,oe.HTML)}function nO(e,t){e.openElements.hasInButtonScope(p.P)&&e._closePElement(),e._insertElement(t,oe.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function rO(e,t){const n=e.openElements.tmplCount>0;(!e.formElement||n)&&(e.openElements.hasInButtonScope(p.P)&&e._closePElement(),e._insertElement(t,oe.HTML),n||(e.formElement=e.openElements.current))}function iO(e,t){e.framesetOk=!1;const n=t.tagID;for(let r=e.openElements.stackTop;r>=0;r--){const o=e.openElements.tagIDs[r];if(n===p.LI&&o===p.LI||(n===p.DD||n===p.DT)&&(o===p.DD||o===p.DT)){e.openElements.generateImpliedEndTagsWithExclusion(o),e.openElements.popUntilTagNamePopped(o);break}if(o!==p.ADDRESS&&o!==p.DIV&&o!==p.P&&e._isSpecialElement(e.openElements.items[r],o))break}e.openElements.hasInButtonScope(p.P)&&e._closePElement(),e._insertElement(t,oe.HTML)}function oO(e,t){e.openElements.hasInButtonScope(p.P)&&e._closePElement(),e._insertElement(t,oe.HTML),e.tokenizer.state=xt.PLAINTEXT}function sO(e,t){e.openElements.hasInScope(p.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(p.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,oe.HTML),e.framesetOk=!1}function aO(e,t){const n=e.activeFormattingElements.getElementEntryInScopeWithTagName(Y.A);n&&(lf(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,oe.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function uO(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,oe.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function lO(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(p.NOBR)&&(lf(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,oe.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function cO(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,oe.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function dO(e,t){e.treeAdapter.getDocumentMode(e.document)!==Ln.QUIRKS&&e.openElements.hasInButtonScope(p.P)&&e._closePElement(),e._insertElement(t,oe.HTML),e.framesetOk=!1,e.insertionMode=L.IN_TABLE}function M1(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,oe.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function F1(e){const t=m1(e,Li.TYPE);return t!=null&&t.toLowerCase()===N3}function fO(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,oe.HTML),F1(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function hO(e,t){e._appendElement(t,oe.HTML),t.ackSelfClosing=!0}function pO(e,t){e.openElements.hasInButtonScope(p.P)&&e._closePElement(),e._appendElement(t,oe.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function mO(e,t){t.tagName=Y.IMG,t.tagID=p.IMG,M1(e,t)}function gO(e,t){e._insertElement(t,oe.HTML),e.skipNextNewLine=!0,e.tokenizer.state=xt.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=L.TEXT}function EO(e,t){e.openElements.hasInButtonScope(p.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,xt.RAWTEXT)}function yO(e,t){e.framesetOk=!1,e._switchToTextParsing(t,xt.RAWTEXT)}function B1(e,t){e._switchToTextParsing(t,xt.RAWTEXT)}function TO(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,oe.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===L.IN_TABLE||e.insertionMode===L.IN_CAPTION||e.insertionMode===L.IN_TABLE_BODY||e.insertionMode===L.IN_ROW||e.insertionMode===L.IN_CELL?L.IN_SELECT_IN_TABLE:L.IN_SELECT}function bO(e,t){e.openElements.currentTagId===p.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,oe.HTML)}function xO(e,t){e.openElements.hasInScope(p.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,oe.HTML)}function _O(e,t){e.openElements.hasInScope(p.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(p.RTC),e._insertElement(t,oe.HTML)}function wO(e,t){e._reconstructActiveFormattingElements(),N1(t),uf(t),t.selfClosing?e._appendElement(t,oe.MATHML):e._insertElement(t,oe.MATHML),t.ackSelfClosing=!0}function SO(e,t){e._reconstructActiveFormattingElements(),O1(t),uf(t),t.selfClosing?e._appendElement(t,oe.SVG):e._insertElement(t,oe.SVG),t.ackSelfClosing=!0}function U1(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,oe.HTML)}function Gt(e,t){switch(t.tagID){case p.I:case p.S:case p.B:case p.U:case p.EM:case p.TT:case p.BIG:case p.CODE:case p.FONT:case p.SMALL:case p.STRIKE:case p.STRONG:{uO(e,t);break}case p.A:{aO(e,t);break}case p.H1:case p.H2:case p.H3:case p.H4:case p.H5:case p.H6:{tO(e,t);break}case p.P:case p.DL:case p.OL:case p.UL:case p.DIV:case p.DIR:case p.NAV:case p.MAIN:case p.MENU:case p.ASIDE:case p.CENTER:case p.FIGURE:case p.FOOTER:case p.HEADER:case p.HGROUP:case p.DIALOG:case p.DETAILS:case p.ADDRESS:case p.ARTICLE:case p.SEARCH:case p.SECTION:case p.SUMMARY:case p.FIELDSET:case p.BLOCKQUOTE:case p.FIGCAPTION:{eO(e,t);break}case p.LI:case p.DD:case p.DT:{iO(e,t);break}case p.BR:case p.IMG:case p.WBR:case p.AREA:case p.EMBED:case p.KEYGEN:{M1(e,t);break}case p.HR:{pO(e,t);break}case p.RB:case p.RTC:{xO(e,t);break}case p.RT:case p.RP:{_O(e,t);break}case p.PRE:case p.LISTING:{nO(e,t);break}case p.XMP:{EO(e,t);break}case p.SVG:{SO(e,t);break}case p.HTML:{X3(e,t);break}case p.BASE:case p.LINK:case p.META:case p.STYLE:case p.TITLE:case p.SCRIPT:case p.BGSOUND:case p.BASEFONT:case p.TEMPLATE:{qn(e,t);break}case p.BODY:{J3(e,t);break}case p.FORM:{rO(e,t);break}case p.NOBR:{lO(e,t);break}case p.MATH:{wO(e,t);break}case p.TABLE:{dO(e,t);break}case p.INPUT:{fO(e,t);break}case p.PARAM:case p.TRACK:case p.SOURCE:{hO(e,t);break}case p.IMAGE:{mO(e,t);break}case p.BUTTON:{sO(e,t);break}case p.APPLET:case p.OBJECT:case p.MARQUEE:{cO(e,t);break}case p.IFRAME:{yO(e,t);break}case p.SELECT:{TO(e,t);break}case p.OPTION:case p.OPTGROUP:{bO(e,t);break}case p.NOEMBED:case p.NOFRAMES:{B1(e,t);break}case p.FRAMESET:{Z3(e,t);break}case p.TEXTAREA:{gO(e,t);break}case p.NOSCRIPT:{e.options.scriptingEnabled?B1(e,t):U1(e,t);break}case p.PLAINTEXT:{oO(e,t);break}case p.COL:case p.TH:case p.TD:case p.TR:case p.HEAD:case p.FRAME:case p.TBODY:case p.TFOOT:case p.THEAD:case p.CAPTION:case p.COLGROUP:break;default:U1(e,t)}}function AO(e,t){if(e.openElements.hasInScope(p.BODY)&&(e.insertionMode=L.AFTER_BODY,e.options.sourceCodeLocationInfo)){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e._setEndLocation(n,t)}}function vO(e,t){e.openElements.hasInScope(p.BODY)&&(e.insertionMode=L.AFTER_BODY,K1(e,t))}function CO(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function kO(e){const t=e.openElements.tmplCount>0,{formElement:n}=e;t||(e.formElement=null),(n||t)&&e.openElements.hasInScope(p.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(p.FORM):n&&e.openElements.remove(n))}function NO(e){e.openElements.hasInButtonScope(p.P)||e._insertFakeElement(Y.P,p.P),e._closePElement()}function OO(e){e.openElements.hasInListItemScope(p.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(p.LI),e.openElements.popUntilTagNamePopped(p.LI))}function IO(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}function RO(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function PO(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function LO(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(Y.BR,p.BR),e.openElements.pop(),e.framesetOk=!1}function H1(e,t){const n=t.tagName,r=t.tagID;for(let o=e.openElements.stackTop;o>0;o--){const a=e.openElements.items[o],u=e.openElements.tagIDs[o];if(r===u&&(r!==p.UNKNOWN||e.treeAdapter.getTagName(a)===n)){e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.stackTop>=o&&e.openElements.shortenToLength(o);break}if(e._isSpecialElement(a,u))break}}function Hu(e,t){switch(t.tagID){case p.A:case p.B:case p.I:case p.S:case p.U:case p.EM:case p.TT:case p.BIG:case p.CODE:case p.FONT:case p.NOBR:case p.SMALL:case p.STRIKE:case p.STRONG:{lf(e,t);break}case p.P:{NO(e);break}case p.DL:case p.UL:case p.OL:case p.DIR:case p.DIV:case p.NAV:case p.PRE:case p.MAIN:case p.MENU:case p.ASIDE:case p.BUTTON:case p.CENTER:case p.FIGURE:case p.FOOTER:case p.HEADER:case p.HGROUP:case p.DIALOG:case p.ADDRESS:case p.ARTICLE:case p.DETAILS:case p.SEARCH:case p.SECTION:case p.SUMMARY:case p.LISTING:case p.FIELDSET:case p.BLOCKQUOTE:case p.FIGCAPTION:{CO(e,t);break}case p.LI:{OO(e);break}case p.DD:case p.DT:{IO(e,t);break}case p.H1:case p.H2:case p.H3:case p.H4:case p.H5:case p.H6:{RO(e);break}case p.BR:{LO(e);break}case p.BODY:{AO(e,t);break}case p.HTML:{vO(e,t);break}case p.FORM:{kO(e);break}case p.APPLET:case p.OBJECT:case p.MARQUEE:{PO(e,t);break}case p.TEMPLATE:{Di(e,t);break}default:H1(e,t)}}function z1(e,t){e.tmplInsertionModeStack.length>0?G1(e,t):df(e,t)}function DO(e,t){var n;t.tagID===p.SCRIPT&&((n=e.scriptHandler)===null||n===void 0||n.call(e,e.openElements.current)),e.openElements.pop(),e.insertionMode=e.originalInsertionMode}function MO(e,t){e._err(t,Q.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function ff(e,t){if(e.openElements.currentTagId!==void 0&&I1.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=L.IN_TABLE_TEXT,t.type){case $e.CHARACTER:{$1(e,t);break}case $e.WHITESPACE_CHARACTER:{j1(e,t);break}}else Qs(e,t)}function FO(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,oe.HTML),e.insertionMode=L.IN_CAPTION}function BO(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,oe.HTML),e.insertionMode=L.IN_COLUMN_GROUP}function UO(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(Y.COLGROUP,p.COLGROUP),e.insertionMode=L.IN_COLUMN_GROUP,hf(e,t)}function HO(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,oe.HTML),e.insertionMode=L.IN_TABLE_BODY}function zO(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(Y.TBODY,p.TBODY),e.insertionMode=L.IN_TABLE_BODY,ju(e,t)}function jO(e,t){e.openElements.hasInTableScope(p.TABLE)&&(e.openElements.popUntilTagNamePopped(p.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function $O(e,t){F1(t)?e._appendElement(t,oe.HTML):Qs(e,t),t.ackSelfClosing=!0}function VO(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,oe.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function Ao(e,t){switch(t.tagID){case p.TD:case p.TH:case p.TR:{zO(e,t);break}case p.STYLE:case p.SCRIPT:case p.TEMPLATE:{qn(e,t);break}case p.COL:{UO(e,t);break}case p.FORM:{VO(e,t);break}case p.TABLE:{jO(e,t);break}case p.TBODY:case p.TFOOT:case p.THEAD:{HO(e,t);break}case p.INPUT:{$O(e,t);break}case p.CAPTION:{FO(e,t);break}case p.COLGROUP:{BO(e,t);break}default:Qs(e,t)}}function Ks(e,t){switch(t.tagID){case p.TABLE:{e.openElements.hasInTableScope(p.TABLE)&&(e.openElements.popUntilTagNamePopped(p.TABLE),e._resetInsertionMode());break}case p.TEMPLATE:{Di(e,t);break}case p.BODY:case p.CAPTION:case p.COL:case p.COLGROUP:case p.HTML:case p.TBODY:case p.TD:case p.TFOOT:case p.TH:case p.THEAD:case p.TR:break;default:Qs(e,t)}}function Qs(e,t){const n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,Uu(e,t),e.fosterParentingEnabled=n}function j1(e,t){e.pendingCharacterTokens.push(t)}function $1(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function Xs(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)Qs(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}const V1=new Set([p.CAPTION,p.COL,p.COLGROUP,p.TBODY,p.TD,p.TFOOT,p.TH,p.THEAD,p.TR]);function YO(e,t){const n=t.tagID;V1.has(n)?e.openElements.hasInTableScope(p.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(p.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=L.IN_TABLE,Ao(e,t)):Gt(e,t)}function WO(e,t){const n=t.tagID;switch(n){case p.CAPTION:case p.TABLE:{e.openElements.hasInTableScope(p.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(p.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=L.IN_TABLE,n===p.TABLE&&Ks(e,t));break}case p.BODY:case p.COL:case p.COLGROUP:case p.HTML:case p.TBODY:case p.TD:case p.TFOOT:case p.TH:case p.THEAD:case p.TR:break;default:Hu(e,t)}}function hf(e,t){switch(t.tagID){case p.HTML:{Gt(e,t);break}case p.COL:{e._appendElement(t,oe.HTML),t.ackSelfClosing=!0;break}case p.TEMPLATE:{qn(e,t);break}default:zu(e,t)}}function qO(e,t){switch(t.tagID){case p.COLGROUP:{e.openElements.currentTagId===p.COLGROUP&&(e.openElements.pop(),e.insertionMode=L.IN_TABLE);break}case p.TEMPLATE:{Di(e,t);break}case p.COL:break;default:zu(e,t)}}function zu(e,t){e.openElements.currentTagId===p.COLGROUP&&(e.openElements.pop(),e.insertionMode=L.IN_TABLE,e._processToken(t))}function ju(e,t){switch(t.tagID){case p.TR:{e.openElements.clearBackToTableBodyContext(),e._insertElement(t,oe.HTML),e.insertionMode=L.IN_ROW;break}case p.TH:case p.TD:{e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(Y.TR,p.TR),e.insertionMode=L.IN_ROW,$u(e,t);break}case p.CAPTION:case p.COL:case p.COLGROUP:case p.TBODY:case p.TFOOT:case p.THEAD:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=L.IN_TABLE,Ao(e,t));break}default:Ao(e,t)}}function pf(e,t){const n=t.tagID;switch(t.tagID){case p.TBODY:case p.TFOOT:case p.THEAD:{e.openElements.hasInTableScope(n)&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=L.IN_TABLE);break}case p.TABLE:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=L.IN_TABLE,Ks(e,t));break}case p.BODY:case p.CAPTION:case p.COL:case p.COLGROUP:case p.HTML:case p.TD:case p.TH:case p.TR:break;default:Ks(e,t)}}function $u(e,t){switch(t.tagID){case p.TH:case p.TD:{e.openElements.clearBackToTableRowContext(),e._insertElement(t,oe.HTML),e.insertionMode=L.IN_CELL,e.activeFormattingElements.insertMarker();break}case p.CAPTION:case p.COL:case p.COLGROUP:case p.TBODY:case p.TFOOT:case p.THEAD:case p.TR:{e.openElements.hasInTableScope(p.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=L.IN_TABLE_BODY,ju(e,t));break}default:Ao(e,t)}}function Y1(e,t){switch(t.tagID){case p.TR:{e.openElements.hasInTableScope(p.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=L.IN_TABLE_BODY);break}case p.TABLE:{e.openElements.hasInTableScope(p.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=L.IN_TABLE_BODY,pf(e,t));break}case p.TBODY:case p.TFOOT:case p.THEAD:{(e.openElements.hasInTableScope(t.tagID)||e.openElements.hasInTableScope(p.TR))&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=L.IN_TABLE_BODY,pf(e,t));break}case p.BODY:case p.CAPTION:case p.COL:case p.COLGROUP:case p.HTML:case p.TD:case p.TH:break;default:Ks(e,t)}}function GO(e,t){const n=t.tagID;V1.has(n)?(e.openElements.hasInTableScope(p.TD)||e.openElements.hasInTableScope(p.TH))&&(e._closeTableCell(),$u(e,t)):Gt(e,t)}function KO(e,t){const n=t.tagID;switch(n){case p.TD:case p.TH:{e.openElements.hasInTableScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=L.IN_ROW);break}case p.TABLE:case p.TBODY:case p.TFOOT:case p.THEAD:case p.TR:{e.openElements.hasInTableScope(n)&&(e._closeTableCell(),Y1(e,t));break}case p.BODY:case p.CAPTION:case p.COL:case p.COLGROUP:case p.HTML:break;default:Hu(e,t)}}function W1(e,t){switch(t.tagID){case p.HTML:{Gt(e,t);break}case p.OPTION:{e.openElements.currentTagId===p.OPTION&&e.openElements.pop(),e._insertElement(t,oe.HTML);break}case p.OPTGROUP:{e.openElements.currentTagId===p.OPTION&&e.openElements.pop(),e.openElements.currentTagId===p.OPTGROUP&&e.openElements.pop(),e._insertElement(t,oe.HTML);break}case p.HR:{e.openElements.currentTagId===p.OPTION&&e.openElements.pop(),e.openElements.currentTagId===p.OPTGROUP&&e.openElements.pop(),e._appendElement(t,oe.HTML),t.ackSelfClosing=!0;break}case p.INPUT:case p.KEYGEN:case p.TEXTAREA:case p.SELECT:{e.openElements.hasInSelectScope(p.SELECT)&&(e.openElements.popUntilTagNamePopped(p.SELECT),e._resetInsertionMode(),t.tagID!==p.SELECT&&e._processStartTag(t));break}case p.SCRIPT:case p.TEMPLATE:{qn(e,t);break}}}function q1(e,t){switch(t.tagID){case p.OPTGROUP:{e.openElements.stackTop>0&&e.openElements.currentTagId===p.OPTION&&e.openElements.tagIDs[e.openElements.stackTop-1]===p.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagId===p.OPTGROUP&&e.openElements.pop();break}case p.OPTION:{e.openElements.currentTagId===p.OPTION&&e.openElements.pop();break}case p.SELECT:{e.openElements.hasInSelectScope(p.SELECT)&&(e.openElements.popUntilTagNamePopped(p.SELECT),e._resetInsertionMode());break}case p.TEMPLATE:{Di(e,t);break}}}function QO(e,t){const n=t.tagID;n===p.CAPTION||n===p.TABLE||n===p.TBODY||n===p.TFOOT||n===p.THEAD||n===p.TR||n===p.TD||n===p.TH?(e.openElements.popUntilTagNamePopped(p.SELECT),e._resetInsertionMode(),e._processStartTag(t)):W1(e,t)}function XO(e,t){const n=t.tagID;n===p.CAPTION||n===p.TABLE||n===p.TBODY||n===p.TFOOT||n===p.THEAD||n===p.TR||n===p.TD||n===p.TH?e.openElements.hasInTableScope(n)&&(e.openElements.popUntilTagNamePopped(p.SELECT),e._resetInsertionMode(),e.onEndTag(t)):q1(e,t)}function JO(e,t){switch(t.tagID){case p.BASE:case p.BASEFONT:case p.BGSOUND:case p.LINK:case p.META:case p.NOFRAMES:case p.SCRIPT:case p.STYLE:case p.TEMPLATE:case p.TITLE:{qn(e,t);break}case p.CAPTION:case p.COLGROUP:case p.TBODY:case p.TFOOT:case p.THEAD:{e.tmplInsertionModeStack[0]=L.IN_TABLE,e.insertionMode=L.IN_TABLE,Ao(e,t);break}case p.COL:{e.tmplInsertionModeStack[0]=L.IN_COLUMN_GROUP,e.insertionMode=L.IN_COLUMN_GROUP,hf(e,t);break}case p.TR:{e.tmplInsertionModeStack[0]=L.IN_TABLE_BODY,e.insertionMode=L.IN_TABLE_BODY,ju(e,t);break}case p.TD:case p.TH:{e.tmplInsertionModeStack[0]=L.IN_ROW,e.insertionMode=L.IN_ROW,$u(e,t);break}default:e.tmplInsertionModeStack[0]=L.IN_BODY,e.insertionMode=L.IN_BODY,Gt(e,t)}}function ZO(e,t){t.tagID===p.TEMPLATE&&Di(e,t)}function G1(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(p.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):df(e,t)}function eI(e,t){t.tagID===p.HTML?Gt(e,t):Vu(e,t)}function K1(e,t){var n;if(t.tagID===p.HTML){if(e.fragmentContext||(e.insertionMode=L.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===p.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 Vu(e,t)}function Vu(e,t){e.insertionMode=L.IN_BODY,Uu(e,t)}function tI(e,t){switch(t.tagID){case p.HTML:{Gt(e,t);break}case p.FRAMESET:{e._insertElement(t,oe.HTML);break}case p.FRAME:{e._appendElement(t,oe.HTML),t.ackSelfClosing=!0;break}case p.NOFRAMES:{qn(e,t);break}}}function nI(e,t){t.tagID===p.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==p.FRAMESET&&(e.insertionMode=L.AFTER_FRAMESET))}function rI(e,t){switch(t.tagID){case p.HTML:{Gt(e,t);break}case p.NOFRAMES:{qn(e,t);break}}}function iI(e,t){t.tagID===p.HTML&&(e.insertionMode=L.AFTER_AFTER_FRAMESET)}function oI(e,t){t.tagID===p.HTML?Gt(e,t):Yu(e,t)}function Yu(e,t){e.insertionMode=L.IN_BODY,Uu(e,t)}function sI(e,t){switch(t.tagID){case p.HTML:{Gt(e,t);break}case p.NOFRAMES:{qn(e,t);break}}}function aI(e,t){t.chars=ft,e._insertCharacters(t)}function uI(e,t){e._insertCharacters(t),e.framesetOk=!1}function Q1(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==oe.HTML&&e.openElements.currentTagId!==void 0&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function lI(e,t){if(S3(t))Q1(e),e._startTagOutsideForeignContent(t);else{const n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===oe.MATHML?N1(t):r===oe.SVG&&(A3(t),O1(t)),uf(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}function cI(e,t){if(t.tagID===p.P||t.tagID===p.BR){Q1(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)===oe.HTML){e._endTagOutsideForeignContent(t);break}const o=e.treeAdapter.getTagName(r);if(o.toLowerCase()===t.tagName){t.tagName=o,e.openElements.shortenToLength(n);break}}}Y.AREA,Y.BASE,Y.BASEFONT,Y.BGSOUND,Y.BR,Y.COL,Y.EMBED,Y.FRAME,Y.HR,Y.IMG,Y.INPUT,Y.KEYGEN,Y.LINK,Y.META,Y.PARAM,Y.SOURCE,Y.TRACK,Y.WBR;const dI=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,fI=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),X1={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function J1(e,t){const n=_I(e),r=c1("type",{handlers:{root:hI,element:pI,text:mI,comment:eE,doctype:gI,raw:yI},unknown:TI}),o={parser:n?new P1(X1):P1.getFragmentParser(void 0,X1),handle(c){r(c,o)},stitches:!1,options:t||{}};r(e,o),vo(o,ar());const a=n?o.parser.document:o.parser.getFragment(),u=hN(a,{file:o.options.file});return o.stitches&&Lu(u,"comment",function(c,d,h){const m=c;if(m.value.stitch&&h&&d!==void 0){const E=h.children;return E[d]=m.value.stitch,d}}),u.type==="root"&&u.children.length===1&&u.children[0].type===e.type?u.children[0]:u}function Z1(e,t){let n=-1;if(e)for(;++n<e.length;)t.handle(e[n])}function hI(e,t){Z1(e.children,t)}function pI(e,t){bI(e,t),Z1(e.children,t),xI(e,t)}function mI(e,t){t.parser.tokenizer.state>4&&(t.parser.tokenizer.state=0);const n={type:$e.CHARACTER,chars:e.value,location:Js(e)};vo(t,ar(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function gI(e,t){const n={type:$e.DOCTYPE,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:Js(e)};vo(t,ar(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function EI(e,t){t.stitches=!0;const n=wI(e);if("children"in e&&"children"in n){const r=J1({type:"root",children:e.children},t.options);n.children=r.children}eE({type:"comment",value:{stitch:n}},t)}function eE(e,t){const n=e.value,r={type:$e.COMMENT,data:n,location:Js(e)};vo(t,ar(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function yI(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,tE(t,ar(e)),t.parser.tokenizer.write(t.options.tagfilter?e.value.replace(dI,"<$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 TI(e,t){const n=e;if(t.options.passThrough&&t.options.passThrough.includes(n.type))EI(n,t);else{let r="";throw fI.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 vo(e,t){tE(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=xt.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 tE(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 bI(e,t){const n=e.tagName.toLowerCase();if(t.parser.tokenizer.state===xt.PLAINTEXT)return;vo(t,ar(e));const r=t.parser.openElements.current;let o="namespaceURI"in r?r.namespaceURI:Ri.html;o===Ri.html&&n==="svg"&&(o=Ri.svg);const a=kN(ne(U({},e),{children:[]}),{space:o===Ri.svg?"svg":"html"}),u={type:$e.START_TAG,tagName:n,tagID:So(n),selfClosing:!1,ackSelfClosing:!1,attrs:"attrs"in a?a.attrs:[],location:Js(e)};t.parser.currentToken=u,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=n}function xI(e,t){const n=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&MN.includes(n)||t.parser.tokenizer.state===xt.PLAINTEXT)return;vo(t,wu(e));const r={type:$e.END_TAG,tagName:n,tagID:So(n),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:Js(e)};t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken),n===t.parser.tokenizer.lastStartTagName&&(t.parser.tokenizer.state===xt.RCDATA||t.parser.tokenizer.state===xt.RAWTEXT||t.parser.tokenizer.state===xt.SCRIPT_DATA)&&(t.parser.tokenizer.state=xt.DATA)}function _I(e){const t=e.type==="root"?e.children[0]:e;return!!(t&&(t.type==="doctype"||t.type==="element"&&t.tagName.toLowerCase()==="html"))}function Js(e){const t=ar(e)||{line:void 0,column:void 0,offset:void 0},n=wu(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 wI(e){return"children"in e?Ii(ne(U({},e),{children:[]})):Ii(e)}function nE(e){return function(t,n){return J1(t,ne(U({},e),{file:n}))}}const Mi=["ariaDescribedBy","ariaLabel","ariaLabelledBy"],rE={ancestors:{tbody:["table"],td:["table"],th:["table"],thead:["table"],tfoot:["table"],tr:["table"]},attributes:{a:[...Mi,"dataFootnoteBackref","dataFootnoteRef",["className","data-footnote-backref"],"href"],blockquote:["cite"],code:[["className",/^language-./]],del:["cite"],div:["itemScope","itemType"],dl:[...Mi],h2:[["className","sr-only"]],img:[...Mi,"longDesc","src"],input:[["disabled",!0],["type","checkbox"]],ins:["cite"],li:[["className","task-list-item"]],ol:[...Mi,["className","contains-task-list"]],q:["cite"],section:["dataFootnotes",["className","footnotes"]],source:["srcSet"],summary:[...Mi],table:[...Mi],ul:[...Mi,["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"]},Gr={}.hasOwnProperty;function SI(e,t){let n={type:"root",children:[]};const r={schema:t?U(U({},rE),t):rE,stack:[]},o=iE(r,e);return o&&(Array.isArray(o)?o.length===1?n=o[0]:n.children=o:n=o),n}function iE(e,t){if(t&&typeof t=="object"){const n=t;switch(typeof n.type=="string"?n.type:""){case"comment":return AI(e,n);case"doctype":return vI(e,n);case"element":return CI(e,n);case"root":return kI(e,n);case"text":return NI(e,n)}}}function AI(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 Zs(a,t),a}}function vI(e,t){if(e.schema.allowDoctypes){const n={type:"doctype"};return Zs(n,t),n}}function CI(e,t){const n=typeof t.tagName=="string"?t.tagName:"";e.stack.push(n);const r=oE(e,t.children),o=OI(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&&Gr.call(e.schema.ancestors,n))){const c=e.schema.ancestors[n];let d=-1;for(a=!1;++d<c.length;)e.stack.includes(c[d])&&(a=!0)}if(!a)return e.schema.strip&&!e.schema.strip.includes(n)?r:void 0;const u={type:"element",tagName:n,properties:o,children:r};return Zs(u,t),u}function kI(e,t){const r={type:"root",children:oE(e,t.children)};return Zs(r,t),r}function NI(e,t){const r={type:"text",value:typeof t.value=="string"?t.value:""};return Zs(r,t),r}function oE(e,t){const n=[];if(Array.isArray(t)){const r=t;let o=-1;for(;++o<r.length;){const a=iE(e,r[o]);a&&(Array.isArray(a)?n.push(...a):n.push(a))}}return n}function OI(e,t){const n=e.stack[e.stack.length-1],r=e.schema.attributes,o=e.schema.required,a=r&&Gr.call(r,n)?r[n]:void 0,u=r&&Gr.call(r,"*")?r["*"]:void 0,c=t&&typeof t=="object"?t:{},d={};let h;for(h in c)if(Gr.call(c,h)){const m=c[h];let E=sE(e,uE(a,h),h,m);E==null&&(E=sE(e,uE(u,h),h,m)),E!=null&&(d[h]=E)}if(o&&Gr.call(o,n)){const m=o[n];for(h in m)Gr.call(m,h)&&!Gr.call(d,h)&&(d[h]=m[h])}return d}function sE(e,t,n,r){return t?Array.isArray(r)?II(e,t,n,r):aE(e,t,n,r):void 0}function II(e,t,n,r){let o=-1;const a=[];for(;++o<r.length;){const u=aE(e,t,n,r[o]);(typeof u=="number"||typeof u=="string")&&a.push(u)}return a}function aE(e,t,n,r){if(!(typeof r!="boolean"&&typeof r!="number"&&typeof r!="string")&&RI(e,n,r)){if(typeof t=="object"&&t.length>1){let o=!1,a=0;for(;++a<t.length;){const u=t[a];if(u&&typeof u=="object"&&"flags"in u){if(u.test(String(r))){o=!0;break}}else if(u===r){o=!0;break}}if(!o)return}return e.schema.clobber&&e.schema.clobberPrefix&&e.schema.clobber.includes(n)?e.schema.clobberPrefix+r:r}}function RI(e,t,n){const r=e.schema.protocols&&Gr.call(e.schema.protocols,t)?e.schema.protocols[t]:void 0;if(!r||r.length===0)return!0;const o=String(n),a=o.indexOf(":"),u=o.indexOf("?"),c=o.indexOf("#"),d=o.indexOf("/");if(a<0||d>-1&&a>d||u>-1&&a>u||c>-1&&a>c)return!0;let h=-1;for(;++h<r.length;){const m=r[h];if(a===m.length&&o.slice(0,m.length)===m)return!0}return!1}function Zs(e,t){const n=$0(t);t.data&&(e.data=Ii(t.data)),n&&(e.position=n)}function uE(e,t){let n,r=-1;if(e)for(;++r<e.length;){const o=e[r],a=typeof o=="string"?o:o[0];if(a===t)return o;a==="data*"&&(n=o)}if(t.length>4&&t.slice(0,4).toLowerCase()==="data")return n}function PI(e){return function(t){return SI(t,e)}}const lE=({globalClassName:e,openLinksInNewTab:t,href:n,title:r,children:o})=>{const a=n?t?"_blank":"_self":void 0;return P.jsx("a",ne(U(U({className:re(e,`${J}-link`)},n?{href:n,target:a}:{}),r?{title:r}:{}),{rel:"noopener noreferrer",children:o}))},LI=()=>{const{disclaimerText:e,disclaimerMarkdown:t,globalClassName:n}=Ht();return!e&&!t?null:P.jsx("div",{className:re(n,`${J}-disclaimer`),children:t?P.jsx(Vg,{rehypePlugins:[nE,PI],components:{ul:({children:r})=>P.jsx("ul",{className:re(n,`${J}-ul`),children:r}),ol:({children:r})=>P.jsx("ol",{className:re(n,`${J}-ol`),children:r}),li:({children:r})=>P.jsx("li",{className:re(n,`${J}-li`),children:r}),a:({href:r,title:o,children:a})=>P.jsx(lE,{globalClassName:n,openLinksInNewTab:!0,href:r,title:o,children:a}),img:({src:r,alt:o})=>P.jsx("img",{className:re(n,`${J}-disclaimer-image`),src:r,alt:o}),p:({children:r})=>P.jsx("p",{className:re(n,`${J}-disclaimer-text`),children:r}),span:({children:r})=>P.jsx("span",{className:re(n,`${J}-disclaimer-text-span`),children:r})},children:t}):P.jsx("p",{className:re(n,`${J}-disclaimer-text`),children:e})})},mf=({className:e,isLoading:t,componentType:n,onSubmit:r})=>{const{isConnected:o}=ki(),{globalClassName:a,searchConfig:u}=Ht(),c=Z.useRef(null),d=t||!o,h=E=>{var b;E.preventDefault();const T=(((b=c.current)==null?void 0:b.value)||"").trim();T&&(c.current.value="",r(T))},m=()=>{r("Can you connect me to a human?")};return P.jsxs("div",{className:re(a,e,`cim-${n}-component`,`${J}-search-bar-wrapper`),children:[P.jsxs("form",{className:re(a,e,`cim-${n}-component`,`${J}-search-bar`),name:`${J}-search-form`,onSubmit:h,children:[P.jsx("input",{className:re(a,e,`cim-${n}-component`,`${J}-search-input`),type:"text",ref:c,placeholder:(u==null?void 0:u.placeholder)||"Ask us anything",name:`${J}-user-input`,disabled:d}),P.jsx(nA,{className:e,globalClassName:a,searchConfig:u,componentType:n,isLoading:d}),P.jsx(jr,{className:re(a,`${J}-escalate-btn`),ariaLabel:"Connect to a human agent",title:"Connect to a human agent",disabled:d,onClick:m,icon:P.jsx(QS,{})})]}),P.jsx(LI,{})]})};function DI(e){return ln({attr:{version:"1.1",viewBox:"0 0 17 17"},child:[{tag:"g",attr:{},child:[]},{tag:"path",attr:{d:"M6 8h-6v-6h1v4.109c1.013-3.193 4.036-5.484 7.5-5.484 3.506 0 6.621 2.36 7.574 5.739l-0.963 0.271c-0.832-2.95-3.551-5.011-6.611-5.011-3.226 0.001-6.016 2.276-6.708 5.376h4.208v1zM11 9v1h4.208c-0.693 3.101-3.479 5.375-6.708 5.375-3.062 0-5.78-2.061-6.611-5.011l-0.963 0.271c0.952 3.379 4.067 5.739 7.574 5.739 3.459 0 6.475-2.28 7.5-5.482v4.108h1v-6h-6z"},child:[]}]})(e)}const cE=Z.createContext({isOpen:!1}),gf=Z.createContext(null),dE=Z.createContext(null),ea=()=>{var n,r;const e=Z.useContext(gf),t=Z.useContext(dE);return(r=(n=e==null?void 0:e.closeMenu)!=null?n:t==null?void 0:t.closeMenu)!=null?r:(()=>{})},fE=({onClearChat:e,componentType:t})=>{const n=ea(),r=()=>{e(),n()};return P.jsxs("button",{className:re(`${J}-overflow-menu-button`,"clear-chat-button",`cim-${t}-component`),onClick:r,children:[P.jsx(DI,{}),"Clear chat"]})};function MI(e){return e==null?[]:Array.isArray(e)?e:[e]}var FI=(e,...t)=>e.concat(t),BI=(e,...t)=>e.filter(n=>!t.includes(n)),UI=e=>Array.from(new Set(e));function hE(e,t,n={}){const{step:r=1,loop:o=!0}=n,a=t+r,u=e.length,c=u-1;return t===-1?r>0?0:c:a<0?o?c:0:a>=u?o?0:t>u?u:t:a}function HI(e,t,n={}){const{step:r=1,loop:o=!0}=n;return hE(e,t,{step:-r,loop:o})}var zI=e=>Array.isArray(e),pE=e=>e!=null&&typeof e=="object",jI=e=>pE(e)&&!zI(e),Wu=e=>typeof e=="string",Co=e=>typeof e=="function",$I=e=>e==null,VI=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),YI=e=>Object.prototype.toString.call(e),mE=Function.prototype.toString,WI=mE.call(Object),qI=e=>{if(!pE(e)||YI(e)!="[object Object]"||QI(e))return!1;const t=Object.getPrototypeOf(e);if(t===null)return!0;const n=VI(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&mE.call(n)==WI},GI=e=>typeof e=="object"&&e!==null&&"$$typeof"in e&&"props"in e,KI=e=>typeof e=="object"&&e!==null&&"__v_isVNode"in e,QI=e=>GI(e)||KI(e),XI=e=>e(),JI=()=>{},Ef=(...e)=>(...t)=>{e.forEach(function(n){n==null||n(...t)})};function ZI(e,t=0){let n=0,r=null;return((...o)=>{const a=Date.now(),u=a-n;u>=t?(r&&(clearTimeout(r),r=null),e(...o),n=a):r||(r=setTimeout(()=>{e(...o),n=Date.now(),r=null},t-u))})}var{min:eR,max:tR}=Math,nR=e=>Number.isNaN(e),rR=e=>nR(e)?0:e,gE=(e,t,n)=>eR(tR(rR(e),t),n);function yf(e){if(!qI(e)||e===void 0)return e;const t=Reflect.ownKeys(e).filter(r=>typeof r=="string"),n={};for(const r of t){const o=e[r];o!==void 0&&(n[r]=yf(o))}return n}function Tf(...e){e.length===1?e[0]:e[1],e.length===2&&e[0]}function iR(e,t){if(e==null)throw new Error(t())}function oR(e,t,n){let r=[];for(const o of t)e[o]==null&&r.push(o);if(r.length>0)throw new Error(`[zag-js${` > ${n}`}] missing required props: ${r.join(", ")}`)}var sR=Object.defineProperty,aR=(e,t,n)=>t in e?sR(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,bf=(e,t,n)=>aR(e,typeof t!="symbol"?t+"":t,n),EE=()=>{},qu=e=>typeof e=="object"&&e!==null,ko=e=>e?"":void 0,yE=e=>e?"true":void 0,uR=1,lR=9,cR=11,Dt=e=>qu(e)&&e.nodeType===uR&&typeof e.nodeName=="string",Gu=e=>qu(e)&&e.nodeType===lR,dR=e=>qu(e)&&e===e.window,TE=e=>Dt(e)?e.localName||"":"#document";function fR(e){return["html","body","#document"].includes(TE(e))}var hR=e=>qu(e)&&e.nodeType!==void 0,Fi=e=>hR(e)&&e.nodeType===cR&&"host"in e,pR=e=>Dt(e)&&e.localName==="input",mR=e=>Dt(e)?e.offsetWidth>0||e.offsetHeight>0||e.getClientRects().length>0:!1;function ta(e){if(!e)return!1;const t=e.getRootNode();return Io(t)===e}var gR=/(textarea|select)/;function ER(e){if(e==null||!Dt(e))return!1;try{return pR(e)&&e.selectionStart!=null||gR.test(e.localName)||e.isContentEditable||e.getAttribute("contenteditable")==="true"||e.getAttribute("contenteditable")===""}catch(t){return!1}}function No(e,t){var r;if(!e||!t||!Dt(e)||!Dt(t))return!1;const n=(r=t.getRootNode)==null?void 0:r.call(t);if(e===t||e.contains(t))return!0;if(n&&Fi(n)){let o=t;for(;o;){if(e===o)return!0;o=o.parentNode||o.host}}return!1}function cr(e){var t;return Gu(e)?e:dR(e)?e.document:(t=e==null?void 0:e.ownerDocument)!=null?t:document}function yR(e){return cr(e).documentElement}function Oo(e){var t,n,r;return Fi(e)?Oo(e.host):Gu(e)?(t=e.defaultView)!=null?t:window:Dt(e)&&(r=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?r:window}function Io(e){let t=e.activeElement;for(;t!=null&&t.shadowRoot;){const n=t.shadowRoot.activeElement;if(!n||n===t)break;t=n}return t}function TR(e){if(TE(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Fi(e)&&e.host||yR(e);return Fi(t)?t.host:t}function xf(e){var n;let t;try{if(t=e.getRootNode({composed:!0}),Gu(t)||Fi(t))return t}catch(r){}return(n=e.ownerDocument)!=null?n:document}var _f=new WeakMap;function Ro(e){return _f.has(e)||_f.set(e,Oo(e).getComputedStyle(e)),_f.get(e)}var wf=new Set(["menu","listbox","dialog","grid","tree","region"]),bR=e=>wf.has(e),bE=e=>{var t;return((t=e.getAttribute("aria-controls"))==null?void 0:t.split(" "))||[]};function xE(e,t){const n=new Set,r=xf(e),o=a=>{const u=a.querySelectorAll("[aria-controls]");for(const c of u){if(c.getAttribute("aria-expanded")!=="true")continue;const d=bE(c);for(const h of d){if(!h||n.has(h))continue;n.add(h);const m=r.getElementById(h);if(m){const E=m.getAttribute("role"),T=m.getAttribute("aria-modal")==="true";if(E&&bR(E)&&!T&&(m===t||m.contains(t)||o(m)))return!0}}}return!1};return o(e)}function _E(e,t){const n=xf(e),r=new Set,o=a=>{const u=a.querySelectorAll("[aria-controls]");for(const c of u){if(c.getAttribute("aria-expanded")!=="true")continue;const d=bE(c);for(const h of d){if(!h||r.has(h))continue;r.add(h);const m=n.getElementById(h);if(m){const E=m.getAttribute("role"),T=m.getAttribute("aria-modal")==="true";E&&wf.has(E)&&!T&&(t(m),o(m))}}}};o(e)}function xR(e){const t=new Set;return _E(e,n=>{e.contains(n)||t.add(n)}),Array.from(t)}function _R(e){const t=e.getAttribute("role");return!!(t&&wf.has(t))}function wR(e){return e.hasAttribute("aria-controls")&&e.getAttribute("aria-expanded")==="true"}function SR(e){var t;return wR(e)?!0:!!((t=e.querySelector)!=null&&t.call(e,'[aria-controls][aria-expanded="true"]'))}function AR(e){if(!e.id)return!1;const t=xf(e),n=CSS.escape(e.id),r=`[aria-controls~="${n}"][aria-expanded="true"], [aria-controls="${n}"][aria-expanded="true"]`;return!!(t.querySelector(r)&&_R(e))}var Sf=()=>typeof document!="undefined";function vR(){var t;const e=navigator.userAgentData;return(t=e==null?void 0:e.platform)!=null?t:navigator.platform}var Af=e=>Sf()&&e.test(vR()),CR=e=>Sf()&&e.test(navigator.vendor),wE=()=>Sf()&&!!navigator.maxTouchPoints,kR=()=>Af(/^iPhone/i),NR=()=>Af(/^iPad/i)||vf()&&navigator.maxTouchPoints>1,Ku=()=>kR()||NR(),OR=()=>vf()||Ku(),vf=()=>Af(/^Mac/i),IR=()=>OR()&&CR(/apple/i);function RR(e){var t,n,r,o;return(o=(t=e.composedPath)==null?void 0:t.call(e))!=null?o:(r=(n=e.nativeEvent)==null?void 0:n.composedPath)==null?void 0:r.call(n)}function Gn(e){var n;const t=RR(e);return(n=t==null?void 0:t[0])!=null?n:e.target}var SE=e=>e.button===0,PR=e=>e.button===2||vf()&&e.ctrlKey&&e.button===0,LR=e=>"touches"in e&&e.touches.length>0,DR={Up:"ArrowUp",Down:"ArrowDown",Esc:"Escape"," ":"Space",",":"Comma",Left:"ArrowLeft",Right:"ArrowRight"},AE={ArrowLeft:"ArrowRight",ArrowRight:"ArrowLeft"};function MR(e,t={}){var u;const{dir:n="ltr",orientation:r="horizontal"}=t;let o=e.key;return o=(u=DR[o])!=null?u:o,n==="rtl"&&r==="horizontal"&&o in AE&&(o=AE[o]),o}function vE(e,t="client"){const n=LR(e)?e.touches[0]||e.changedTouches[0]:e;return{x:n[`${t}X`],y:n[`${t}Y`]}}var Mt=(e,t,n,r)=>{const o=typeof e=="function"?e():e;return o==null||o.addEventListener(t,n,r),()=>{o==null||o.removeEventListener(t,n,r)}},CE=e=>Dt(e)&&e.tagName==="IFRAME",FR=/^(audio|video|details)$/;function kE(e){const t=e.getAttribute("tabindex");return t?parseInt(t,10):NaN}var BR=e=>!Number.isNaN(kE(e)),UR=e=>kE(e)<0;function HR(e,t){if(!t)return null;if(t===!0)return e.shadowRoot||null;const n=t(e);return(n===!0?e.shadowRoot:n)||null}function NE(e,t,n){const r=[...e],o=[...e],a=new Set,u=new Map;e.forEach((d,h)=>u.set(d,h));let c=0;for(;c<o.length;){const d=o[c++];if(!d||a.has(d))continue;a.add(d);const h=HR(d,t);if(h){const m=Array.from(h.querySelectorAll(Qu)).filter(n),E=u.get(d);if(E!==void 0){const T=E+1;r.splice(T,0,...m),m.forEach((b,_)=>{u.set(b,T+_)});for(let b=T+m.length;b<r.length;b++)u.set(r[b],b)}else{const T=r.length;r.push(...m),m.forEach((b,_)=>{u.set(b,T+_)})}o.push(...m)}}return r}var Qu="input:not([type='hidden']):not([disabled]), select:not([disabled]), textarea:not([disabled]), a[href], button:not([disabled]), [tabindex], iframe, object, embed, area[href], audio[controls], video[controls], [contenteditable]:not([contenteditable='false']), details > summary:first-of-type",OE=(e,t={})=>{if(!e)return[];const{includeContainer:n=!1,getShadowRoot:r}=t,o=Array.from(e.querySelectorAll(Qu));(n==!0||n=="if-empty"&&o.length===0)&&Dt(e)&&dr(e)&&o.unshift(e);const u=[];for(const c of o)if(dr(c)){if(CE(c)&&c.contentDocument){const d=c.contentDocument.body;u.push(...OE(d,{getShadowRoot:r}));continue}u.push(c)}return r?NE(u,r,dr):u};function dr(e){return!Dt(e)||e.closest("[inert]")?!1:e.matches(Qu)&&mR(e)}function Po(e,t={}){if(!e)return[];const{includeContainer:n,getShadowRoot:r}=t,o=Array.from(e.querySelectorAll(Qu));n&&Bi(e)&&o.unshift(e);const a=[];for(const u of o)if(Bi(u)){if(CE(u)&&u.contentDocument){const c=u.contentDocument.body;a.push(...Po(c,{getShadowRoot:r}));continue}a.push(u)}if(r){const u=NE(a,r,Bi);return!u.length&&n?o:u}return!a.length&&n?o:a}function Bi(e){return Dt(e)&&e.tabIndex>0?!0:dr(e)&&!UR(e)}function zR(e,t={}){const n=Po(e,t),r=n[0]||null,o=n[n.length-1]||null;return[r,o]}function jR(e,t={}){const{current:n,getShadowRoot:r}=t,o=Po(e,{getShadowRoot:r}),a=(e==null?void 0:e.ownerDocument)||document,u=n!=null?n:Io(a);if(!u)return null;const c=o.indexOf(u);return o[c+1]||null}function na(e){return e.tabIndex<0&&(FR.test(e.localName)||ER(e))&&!BR(e)?0:e.tabIndex}function IE(e){const{root:t,getInitialEl:n,filter:r,enabled:o=!0}=e;if(!o)return;let a=null;if(a||(a=typeof n=="function"?n():n),a||(a=t==null?void 0:t.querySelector("[data-autofocus],[autofocus]")),!a){const u=Po(t);a=r?u.filter(r)[0]:u[0]}return a||t||void 0}var $R=class Px{constructor(){bf(this,"id",null),bf(this,"fn_cleanup"),bf(this,"cleanup",()=>{this.cancel()})}static create(){return new Px}request(t){this.cancel(),this.id=globalThis.requestAnimationFrame(()=>{this.id=null,this.fn_cleanup=t==null?void 0:t()})}cancel(){var t;this.id!==null&&(globalThis.cancelAnimationFrame(this.id),this.id=null),(t=this.fn_cleanup)==null||t.call(this),this.fn_cleanup=void 0}isActive(){return this.id!==null}};function kt(e){const t=$R.create();return t.request(e),t.cleanup}function RE(e){const t=new Set;function n(r){const o=globalThis.requestAnimationFrame(r);t.add(()=>globalThis.cancelAnimationFrame(o))}return n(()=>n(e)),function(){t.forEach(o=>o())}}function Cf(e){const t=TR(e);return fR(t)?cr(t).body:Dt(t)&&WR(t)?t:Cf(t)}var VR=/auto|scroll|overlay|hidden|clip/,YR=new Set(["inline","contents"]);function WR(e){const t=Oo(e),{overflow:n,overflowX:r,overflowY:o,display:a}=t.getComputedStyle(e);return VR.test(n+o+r)&&!YR.has(a)}var Lo="default",kf="",Xu=new WeakMap;function qR(e={}){const{target:t,doc:n}=e,r=n!=null?n:document,o=r.documentElement;return Ku()?(Lo==="default"&&(kf=o.style.webkitUserSelect,o.style.webkitUserSelect="none"),Lo="disabled"):t&&(Xu.set(t,t.style.userSelect),t.style.userSelect="none"),()=>GR({target:t,doc:r})}function GR(e={}){const{target:t,doc:n}=e,o=(n!=null?n:document).documentElement;if(Ku()){if(Lo!=="disabled")return;Lo="restoring",setTimeout(()=>{RE(()=>{Lo==="restoring"&&(o.style.webkitUserSelect==="none"&&(o.style.webkitUserSelect=kf||""),kf="",Lo="default")})},300)}else if(t&&Xu.has(t)){const a=Xu.get(t);t.style.userSelect==="none"&&(t.style.userSelect=a!=null?a:""),t.getAttribute("style")===""&&t.removeAttribute("style"),Xu.delete(t)}}function KR(e={}){const u=e,{defer:t,target:n}=u,r=on(u,["defer","target"]),o=t?kt:c=>c(),a=[];return a.push(o(()=>{const c=typeof n=="function"?n():n;a.push(qR(ne(U({},r),{target:c})))})),()=>{a.forEach(c=>c==null?void 0:c())}}function QR(e,t){const{onPointerMove:n,onPointerUp:r}=t,o=c=>{const d=vE(c),h=Math.sqrt(Ja(d.x,2)+Ja(d.y,2)),m=c.pointerType==="touch"?10:5;if(!(h<m)){if(c.pointerType==="mouse"&&c.button===0){a(c);return}n({point:d,event:c})}},a=c=>{const d=vE(c);r({point:d,event:c})},u=[Mt(e,"pointermove",o,!1),Mt(e,"pointerup",a,!1),Mt(e,"pointercancel",a,!1),Mt(e,"contextmenu",a,!1),KR({doc:e})];return()=>{u.forEach(c=>c())}}function XR(e,t={}){const{triggerElement:n,onFocus:r,onFocusEnter:o,getShadowRoot:a}=t,u=(e==null?void 0:e.ownerDocument)||document,c=u.body;function d(h){if(h.key!=="Tab")return;let m=null;const[E,T]=zR(e,{includeContainer:!0,getShadowRoot:a}),b=jR(c,{current:n,getShadowRoot:a}),_=!E&&!T;h.shiftKey&&ta(b)?(o==null||o(),m=T):h.shiftKey&&(ta(E)||_)?m=n:!h.shiftKey&&ta(n)?(o==null||o(),m=E):!h.shiftKey&&(ta(T)||_)&&(m=b),m&&(h.preventDefault(),typeof r=="function"?r(m):m.focus())}return Mt(u,"keydown",d,!0)}function JR(e,t){const c=t,{defer:n,triggerElement:r}=c,o=on(c,["defer","triggerElement"]),a=n?kt:d=>d(),u=[];return u.push(a(()=>{const d=typeof e=="function"?e():e,h=typeof r=="function"?r():r;u.push(XR(d,U({triggerElement:h},o)))})),()=>{u.forEach(d=>d==null?void 0:d())}}function ZR(e,t){var n;return Array.from((n=e==null?void 0:e.querySelectorAll(t))!=null?n:[])}function Ju(e,t){if(!e)return EE;const n=Object.keys(t).reduce((r,o)=>(r[o]=e.style.getPropertyValue(o),r),{});return Object.assign(e.style,t),()=>{Object.assign(e.style,n),e.style.length===0&&e.removeAttribute("style")}}function eP(e,t,n){if(!e)return EE;const r=e.style.getPropertyValue(t);return e.style.setProperty(t,n),()=>{e.style.setProperty(t,r),e.style.length===0&&e.removeAttribute("style")}}function tP(e,t,n){const{signal:r}=t;return[new Promise((u,c)=>{const d=setTimeout(()=>{c(new Error(`Timeout of ${n}ms exceeded`))},n);r.addEventListener("abort",()=>{clearTimeout(d),c(new Error("Promise aborted"))}),e.then(h=>{r.aborted||(clearTimeout(d),u(h))}).catch(h=>{r.aborted||(clearTimeout(d),c(h))})}),()=>t.abort()]}function nP(e,t){const{timeout:n,rootNode:r}=t,o=Oo(r),a=cr(r),u=new o.AbortController;return tP(new Promise(c=>{const d=e();if(d){c(d);return}const h=new o.MutationObserver(()=>{const m=e();m&&m.isConnected&&(h.disconnect(),c(m))});h.observe(a.body,{childList:!0,subtree:!0})}),u,n)}var rP=(...e)=>e.map(t=>{var n;return(n=t==null?void 0:t.trim)==null?void 0:n.call(t)}).filter(Boolean).join(" "),iP=/((?:--)?(?:\w+-?)+)\s*:\s*([^;]*)/g,PE=e=>{const t={};let n;for(;n=iP.exec(e);)t[n[1]]=n[2];return t},oP=(e,t)=>{if(Wu(e)){if(Wu(t))return`${e};${t}`;e=PE(e)}else Wu(t)&&(t=PE(t));return Object.assign({},e!=null?e:{},t!=null?t:{})};function Nt(...e){let t={};for(let n of e){if(!n)continue;for(let o in t){if(o.startsWith("on")&&typeof t[o]=="function"&&typeof n[o]=="function"){t[o]=Ef(n[o],t[o]);continue}if(o==="className"||o==="class"){t[o]=rP(t[o],n[o]);continue}if(o==="style"){t[o]=oP(t[o],n[o]);continue}t[o]=n[o]!==void 0?n[o]:t[o]}for(let o in n)t[o]===void 0&&(t[o]=n[o]);const r=Object.getOwnPropertySymbols(n);for(let o of r)t[o]=n[o]}return t}function bF(e){return e}var Do=(e=>(e.NotStarted="Not Started",e.Started="Started",e.Stopped="Stopped",e))(Do||{}),Nf="__init__";function sP(e){const t=()=>{var u,c;return(c=(u=e.getRootNode)==null?void 0:u.call(e))!=null?c:document},n=()=>cr(t()),r=()=>{var u;return(u=n().defaultView)!=null?u:window},o=()=>Io(t()),a=u=>t().getElementById(u);return ne(U({},e),{getRootNode:t,getDoc:n,getWin:r,getActiveElement:o,isActiveElement:ta,getById:a})}function aP(e){return new Proxy({},{get(t,n){return n==="style"?r=>e({style:r}).style:e}})}var Mo=()=>e=>Array.from(new Set(e)),LE=typeof globalThis.document!="undefined"?Z.useLayoutEffect:Z.useEffect;function Zu(e){var E,T;const t=(E=e().value)!=null?E:e().defaultValue,n=(T=e().isEqual)!=null?T:Object.is,[r]=Z.useState(t),[o,a]=Z.useState(r),u=e().value!==void 0,c=Z.useRef(o);c.current=u?e().value:o;const d=Z.useRef(c.current);LE(()=>{d.current=c.current},[o,e().value]);const h=b=>{var A,C;const _=d.current,w=Co(b)?b(_):b;e().debug&&console.log(`[bindable > ${e().debug}] setValue`,{next:w,prev:_}),u||a(w),n(w,_)||(C=(A=e()).onChange)==null||C.call(A,w,_)};function m(){return u?e().value:o}return{initial:r,ref:c,get:m,set(b){(e().sync?ks.flushSync:XI)(()=>h(b))},invoke(b,_){var w,A;(A=(w=e()).onChange)==null||A.call(w,b,_)},hash(b){var _,w,A;return(A=(w=(_=e()).hash)==null?void 0:w.call(_,b))!=null?A:String(b)}}}Zu.cleanup=e=>{Z.useEffect(()=>e,[])},Zu.ref=e=>{const t=Z.useRef(e);return{get:()=>t.current,set:n=>{t.current=n}}};function uP(e){const t=Z.useRef(e);return{get(n){return t.current[n]},set(n,r){t.current[n]=r}}}var lP=(e,t)=>{const n=Z.useRef(!1),r=Z.useRef(!1);Z.useEffect(()=>{if(n.current&&r.current)return t();r.current=!0},[...(e!=null?e:[]).map(o=>typeof o=="function"?o():o)]),Z.useEffect(()=>(n.current=!0,()=>{n.current=!1}),[])};function el(e,t={}){var ae,he,ge,ue,Te,Ne;const n=Z.useMemo(()=>{const{id:fe,ids:K,getRootNode:te}=t;return sP({id:fe,ids:K,getRootNode:te})},[t]),r=(...fe)=>{e.debug&&console.log(...fe)},o=(he=(ae=e.props)==null?void 0:ae.call(e,{props:yf(t),scope:n}))!=null?he:t,a=cP(o),u=(ge=e.context)==null?void 0:ge.call(e,{prop:a,bindable:Zu,scope:n,flush:ME,getContext(){return d},getComputed(){return z},getRefs(){return w},getEvent(){return b()}}),c=DE(u),d={get(fe){var K;return(K=c.current)==null?void 0:K[fe].ref.current},set(fe,K){var te;(te=c.current)==null||te[fe].set(K)},initial(fe){var K;return(K=c.current)==null?void 0:K[fe].initial},hash(fe){var te,S;const K=(te=c.current)==null?void 0:te[fe].get();return(S=c.current)==null?void 0:S[fe].hash(K)}},h=Z.useRef(new Map),m=Z.useRef(null),E=Z.useRef(null),T=Z.useRef({type:""}),b=()=>ne(U({},T.current),{current(){return T.current},previous(){return E.current}}),_=()=>ne(U({},D),{matches(...fe){return fe.includes(D.ref.current)},hasTag(fe){var K,te;return!!((te=(K=e.states[D.ref.current])==null?void 0:K.tags)!=null&&te.includes(fe))}}),w=uP((Te=(ue=e.refs)==null?void 0:ue.call(e,{prop:a,context:d}))!=null?Te:{}),A=()=>({state:_(),context:d,event:b(),prop:a,send:j,action:C,guard:I,track:lP,refs:w,computed:z,flush:ME,scope:n,choose:F}),C=fe=>{const K=Co(fe)?fe(A()):fe;if(!K)return;const te=K.map(S=>{var X,k;const M=(k=(X=e.implementations)==null?void 0:X.actions)==null?void 0:k[S];return M||Tf(`[zag-js] No implementation found for action "${JSON.stringify(S)}"`),M});for(const S of te)S==null||S(A())},I=fe=>{var K,te;return Co(fe)?fe(A()):(te=(K=e.implementations)==null?void 0:K.guards)==null?void 0:te[fe](A())},R=fe=>{const K=Co(fe)?fe(A()):fe;if(!K)return;const te=K.map(M=>{var k,xe;const X=(xe=(k=e.implementations)==null?void 0:k.effects)==null?void 0:xe[M];return X||Tf(`[zag-js] No implementation found for effect "${JSON.stringify(M)}"`),X}),S=[];for(const M of te){const X=M==null?void 0:M(A());X&&S.push(X)}return()=>S.forEach(M=>M==null?void 0:M())},F=fe=>MI(fe).find(K=>{let te=!K.guard;return Wu(K.guard)?te=!!I(K.guard):Co(K.guard)&&(te=K.guard(A())),te}),z=fe=>{iR(e.computed,()=>"[zag-js] No computed object found on machine");const K=e.computed[fe];return K({context:d,event:b(),prop:a,refs:w,scope:n,computed:z})},D=Zu(()=>({defaultValue:e.initialState({prop:a}),onChange(fe,K){var S,M,X,k;if(K){const xe=h.current.get(K);xe==null||xe(),h.current.delete(K)}K&&C((S=e.states[K])==null?void 0:S.exit),C((M=m.current)==null?void 0:M.actions);const te=R((X=e.states[fe])==null?void 0:X.effects);if(te&&h.current.set(fe,te),K===Nf){C(e.entry);const xe=R(e.effects);xe&&h.current.set(Nf,xe)}C((k=e.states[fe])==null?void 0:k.entry)}})),q=Z.useRef(void 0),ce=Z.useRef(Do.NotStarted);LE(()=>{queueMicrotask(()=>{var M;const te=ce.current===Do.Started;ce.current=Do.Started,r(te?"rehydrating...":"initializing...");const S=(M=q.current)!=null?M:D.initial;D.invoke(S,te?D.get():Nf)});const fe=h.current,K=D.ref.current;return()=>{r("unmounting..."),q.current=K,ce.current=Do.Stopped,fe.forEach(te=>te==null?void 0:te()),h.current=new Map,m.current=null,queueMicrotask(()=>{C(e.exit)})}},[]);const be=()=>"ref"in D?D.ref.current:D.get(),j=fe=>{queueMicrotask(()=>{var k,xe,Pe,Oe,He;if(ce.current!==Do.Started)return;E.current=T.current,T.current=fe;let K=be();const te=(Pe=(k=e.states[K].on)==null?void 0:k[fe.type])!=null?Pe:(xe=e.on)==null?void 0:xe[fe.type],S=F(te);if(!S)return;m.current=S;const M=(Oe=S.target)!=null?Oe:K;r("transition",fe.type,S.target||K,`(${S.actions})`);const X=M!==K;X?ks.flushSync(()=>D.set(M)):S.reenter&&!X?D.invoke(K,K):C((He=S.actions)!=null?He:[])})};return(Ne=e.watch)==null||Ne.call(e,A()),{state:_(),send:j,context:d,prop:a,scope:n,refs:w,computed:z,event:b(),getStatus:()=>ce.current}}function DE(e){const t=Z.useRef(e);return t.current=e,t}function cP(e){const t=DE(e);return function(r){return t.current[r]}}function ME(e){queueMicrotask(()=>{ks.flushSync(()=>e())})}var Of=aP(e=>e);function tl(...e){return t=>{const n=[];for(const r of e)if(typeof r=="function"){const o=r(t);typeof o=="function"&&n.push(o)}else r&&(r.current=t);if(n.length)return()=>{for(const r of n)r()}}}function dP(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}const If=e=>{const t=Z.memo(Z.forwardRef((n,r)=>{const h=n,{asChild:o,children:a}=h,u=on(h,["asChild","children"]);if(!o)return Z.createElement(e,ne(U({},u),{ref:r}),a);if(!Z.isValidElement(a))return null;const c=Z.Children.only(a),d=dP(c);return Z.cloneElement(c,ne(U({},Nt(u,c.props)),{ref:r?tl(r,d):d}))}));return t.displayName=e.displayName||e.name,t},Kt=(()=>{const e=new Map;return new Proxy(If,{apply(t,n,r){return If(r[0])},get(t,n){const r=n;return e.has(r)||e.set(r,If(r)),e.get(r)}})})();function fP(e,t){return`${e} returned \`undefined\`. Seems you forgot to wrap component within ${t}`}function Ui(e={}){const{name:t,strict:n=!0,hookName:r="useContext",providerName:o="Provider",errorMessage:a,defaultValue:u}=e,c=Z.createContext(u);c.displayName=t;function d(){var m;const h=Z.useContext(c);if(!h&&n){const E=new Error(a!=null?a:fP(r,o));throw E.name="ContextError",(m=Error.captureStackTrace)==null||m.call(Error,E,d),E}return h}return[c.Provider,d,c]}const[hP,Rf]=Ui({name:"PopoverContext",hookName:"usePopoverContext",providerName:"<PopoverProvider />"}),[FE,ra]=Ui({name:"PresenceContext",hookName:"usePresenceContext",providerName:"<PresenceProvider />"}),BE=Z.forwardRef((e,t)=>{const n=Rf(),r=ra(),o=Nt(n.getContentProps(),r.getPresenceProps(),e);return r.unmounted?null:P.jsx(Kt.div,ne(U({},o),{ref:tl(r.ref,t)}))});BE.displayName="PopoverContent";const UE=Z.forwardRef((e,t)=>{const n=Rf(),r=ra(),o=Nt(n.getPositionerProps(),e);return r.unmounted?null:P.jsx(Kt.div,ne(U({},o),{ref:t}))});UE.displayName="PopoverPositioner";const ia=()=>(e,t)=>t.reduce((n,r)=>{const[o,a]=n,u=r;return a[u]!==void 0&&(o[u]=a[u]),delete a[u],[o,a]},[{},U({},e)]),HE=e=>ia()(e,["immediate","lazyMount","onExitComplete","present","skipAnimationOnMount","unmountOnExit"]);function pP(e,t){const{state:n,send:r,context:o}=e,a=n.matches("mounted","unmountSuspended");return{skip:!o.get("initial"),present:a,setNode(u){u&&r({type:"NODE.SET",node:u})},unmount(){r({type:"UNMOUNT"})}}}var mP={props({props:e}){return ne(U({},e),{present:!!e.present})},initialState({prop:e}){return e("present")?"mounted":"unmounted"},refs(){return{node:null,styles:null}},context({bindable:e}){return{unmountAnimationName:e(()=>({defaultValue:null})),prevAnimationName:e(()=>({defaultValue:null})),present:e(()=>({defaultValue:!1})),initial:e(()=>({sync:!0,defaultValue:!1}))}},exit:["clearInitial","cleanupNode"],watch({track:e,prop:t,send:n}){e([()=>t("present")],()=>{n({type:"PRESENCE.CHANGED"})})},on:{"NODE.SET":{actions:["setupNode"]},"PRESENCE.CHANGED":{actions:["setInitial","syncPresence"]}},states:{mounted:{on:{UNMOUNT:{target:"unmounted",actions:["clearPrevAnimationName","invokeOnExitComplete"]},"UNMOUNT.SUSPEND":{target:"unmountSuspended"}}},unmountSuspended:{effects:["trackAnimationEvents"],on:{MOUNT:{target:"mounted",actions:["setPrevAnimationName"]},UNMOUNT:{target:"unmounted",actions:["clearPrevAnimationName","invokeOnExitComplete"]}}},unmounted:{on:{MOUNT:{target:"mounted",actions:["setPrevAnimationName"]}}}},implementations:{actions:{setInitial:({context:e})=>{e.get("initial")||queueMicrotask(()=>{e.set("initial",!0)})},clearInitial:({context:e})=>{e.set("initial",!1)},invokeOnExitComplete:({prop:e})=>{var t;(t=e("onExitComplete"))==null||t()},setupNode:({refs:e,event:t})=>{e.get("node")!==t.node&&(e.set("node",t.node),e.set("styles",Ro(t.node)))},cleanupNode:({refs:e})=>{e.set("node",null),e.set("styles",null)},syncPresence:({context:e,refs:t,send:n,prop:r})=>{const o=r("present");if(o)return n({type:"MOUNT",src:"presence.changed"});const a=t.get("node");if(!o&&(a==null?void 0:a.ownerDocument.visibilityState)==="hidden")return n({type:"UNMOUNT",src:"visibilitychange"});kt(()=>{var c,d;const u=nl(t.get("styles"));e.set("unmountAnimationName",u),u==="none"||u===e.get("prevAnimationName")||((c=t.get("styles"))==null?void 0:c.display)==="none"||((d=t.get("styles"))==null?void 0:d.animationDuration)==="0s"?n({type:"UNMOUNT",src:"presence.changed"}):n({type:"UNMOUNT.SUSPEND"})})},setPrevAnimationName:({context:e,refs:t})=>{kt(()=>{e.set("prevAnimationName",nl(t.get("styles")))})},clearPrevAnimationName:({context:e})=>{e.set("prevAnimationName",null)}},effects:{trackAnimationEvents:({context:e,refs:t,send:n,prop:r})=>{const o=t.get("node");if(!o)return;const a=d=>{var m,E,T;((T=(E=(m=d.composedPath)==null?void 0:m.call(d))==null?void 0:E[0])!=null?T:d.target)===o&&e.set("prevAnimationName",nl(t.get("styles")))},u=d=>{const h=nl(t.get("styles"));Gn(d)===o&&h===e.get("unmountAnimationName")&&!r("present")&&n({type:"UNMOUNT",src:"animationend"})};o.addEventListener("animationstart",a),o.addEventListener("animationcancel",u),o.addEventListener("animationend",u);const c=Ju(o,{animationFillMode:"forwards"});return()=>{o.removeEventListener("animationstart",a),o.removeEventListener("animationcancel",u),o.removeEventListener("animationend",u),RE(()=>c())}}}}};function nl(e){return(e==null?void 0:e.animationName)||"none"}Mo()(["onExitComplete","present","immediate"]);function gP(e,t={}){const{sync:n=!1}=t,r=EP(e);return Z.useCallback((...o)=>{var a;return n?queueMicrotask(()=>{var u;return(u=r.current)==null?void 0:u.call(r,...o)}):(a=r.current)==null?void 0:a.call(r,...o)},[n,r])}function EP(e){const t=Z.useRef(e);return t.current=e,t}const Pf=(e={})=>{const T=e,{lazyMount:t,unmountOnExit:n,present:r,skipAnimationOnMount:o=!1}=T,a=on(T,["lazyMount","unmountOnExit","present","skipAnimationOnMount"]),u=Z.useRef(!1),c=ne(U({},a),{present:r,onExitComplete:gP(e.onExitComplete)}),d=el(mP,c),h=pP(d);h.present&&(u.current=!0);const m=!h.present&&!u.current&&t||n&&!h.present&&u.current,E=()=>({"data-state":h.skip&&o?void 0:r?"open":"closed",hidden:!h.present});return{ref:h.setNode,getPresenceProps:E,present:h.present,unmounted:m}};var Hi=(e,t=[])=>({parts:(...n)=>{if(yP(t))return Hi(e,n);throw new Error("createAnatomy().parts(...) should only be called once. Did you mean to use .extendWith(...) ?")},extendWith:(...n)=>Hi(e,[...t,...n]),omit:(...n)=>Hi(e,t.filter(r=>!n.includes(r))),rename:n=>Hi(n,t),keys:()=>t,build:()=>[...new Set(t)].reduce((n,r)=>Object.assign(n,{[r]:{selector:[`&[data-scope="${Fo(e)}"][data-part="${Fo(r)}"]`,`& [data-scope="${Fo(e)}"][data-part="${Fo(r)}"]`].join(", "),attrs:{"data-scope":Fo(e),"data-part":Fo(r)}}}),{})}),Fo=e=>e.replace(/([A-Z])([A-Z])/g,"$1-$2").replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase(),yP=e=>e.length===0;const TP=["top","right","bottom","left"],Kr=Math.min,wn=Math.max,rl=Math.round,il=Math.floor,fr=e=>({x:e,y:e}),bP={left:"right",right:"left",bottom:"top",top:"bottom"},xP={start:"end",end:"start"};function Lf(e,t,n){return wn(e,Kr(t,n))}function vr(e,t){return typeof e=="function"?e(t):e}function Cr(e){return e.split("-")[0]}function Bo(e){return e.split("-")[1]}function Df(e){return e==="x"?"y":"x"}function Mf(e){return e==="y"?"height":"width"}const _P=new Set(["top","bottom"]);function hr(e){return _P.has(Cr(e))?"y":"x"}function Ff(e){return Df(hr(e))}function wP(e,t,n){n===void 0&&(n=!1);const r=Bo(e),o=Ff(e),a=Mf(o);let u=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(u=ol(u)),[u,ol(u)]}function SP(e){const t=ol(e);return[Bf(e),t,Bf(t)]}function Bf(e){return e.replace(/start|end/g,t=>xP[t])}const zE=["left","right"],jE=["right","left"],AP=["top","bottom"],vP=["bottom","top"];function CP(e,t,n){switch(e){case"top":case"bottom":return n?t?jE:zE:t?zE:jE;case"left":case"right":return t?AP:vP;default:return[]}}function kP(e,t,n,r){const o=Bo(e);let a=CP(Cr(e),n==="start",r);return o&&(a=a.map(u=>u+"-"+o),t&&(a=a.concat(a.map(Bf)))),a}function ol(e){return e.replace(/left|right|bottom|top/g,t=>bP[t])}function NP(e){return U({top:0,right:0,bottom:0,left:0},e)}function $E(e){return typeof e!="number"?NP(e):{top:e,right:e,bottom:e,left:e}}function sl(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function VE(e,t,n){let{reference:r,floating:o}=e;const a=hr(t),u=Ff(t),c=Mf(u),d=Cr(t),h=a==="y",m=r.x+r.width/2-o.width/2,E=r.y+r.height/2-o.height/2,T=r[c]/2-o[c]/2;let b;switch(d){case"top":b={x:m,y:r.y-o.height};break;case"bottom":b={x:m,y:r.y+r.height};break;case"right":b={x:r.x+r.width,y:E};break;case"left":b={x:r.x-o.width,y:E};break;default:b={x:r.x,y:r.y}}switch(Bo(t)){case"start":b[u]-=T*(n&&h?-1:1);break;case"end":b[u]+=T*(n&&h?-1:1);break}return b}const OP=(e,t,n)=>et(null,null,function*(){const{placement:r="bottom",strategy:o="absolute",middleware:a=[],platform:u}=n,c=a.filter(Boolean),d=yield u.isRTL==null?void 0:u.isRTL(t);let h=yield u.getElementRects({reference:e,floating:t,strategy:o}),{x:m,y:E}=VE(h,r,d),T=r,b={},_=0;for(let w=0;w<c.length;w++){const{name:A,fn:C}=c[w],{x:I,y:R,data:F,reset:z}=yield C({x:m,y:E,initialPlacement:r,placement:T,strategy:o,middlewareData:b,rects:h,platform:u,elements:{reference:e,floating:t}});m=I!=null?I:m,E=R!=null?R:E,b=ne(U({},b),{[A]:U(U({},b[A]),F)}),z&&_<=50&&(_++,typeof z=="object"&&(z.placement&&(T=z.placement),z.rects&&(h=z.rects===!0?yield u.getElementRects({reference:e,floating:t,strategy:o}):z.rects),{x:m,y:E}=VE(h,T,d)),w=-1)}return{x:m,y:E,placement:T,strategy:o,middlewareData:b}});function oa(e,t){return et(this,null,function*(){var n;t===void 0&&(t={});const{x:r,y:o,platform:a,rects:u,elements:c,strategy:d}=e,{boundary:h="clippingAncestors",rootBoundary:m="viewport",elementContext:E="floating",altBoundary:T=!1,padding:b=0}=vr(t,e),_=$E(b),A=c[T?E==="floating"?"reference":"floating":E],C=sl(yield a.getClippingRect({element:(n=yield a.isElement==null?void 0:a.isElement(A))==null||n?A:A.contextElement||(yield a.getDocumentElement==null?void 0:a.getDocumentElement(c.floating)),boundary:h,rootBoundary:m,strategy:d})),I=E==="floating"?{x:r,y:o,width:u.floating.width,height:u.floating.height}:u.reference,R=yield a.getOffsetParent==null?void 0:a.getOffsetParent(c.floating),F=(yield a.isElement==null?void 0:a.isElement(R))?(yield a.getScale==null?void 0:a.getScale(R))||{x:1,y:1}:{x:1,y:1},z=sl(a.convertOffsetParentRelativeRectToViewportRelativeRect?yield a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:I,offsetParent:R,strategy:d}):I);return{top:(C.top-z.top+_.top)/F.y,bottom:(z.bottom-C.bottom+_.bottom)/F.y,left:(C.left-z.left+_.left)/F.x,right:(z.right-C.right+_.right)/F.x}})}const IP=e=>({name:"arrow",options:e,fn(n){return et(this,null,function*(){const{x:r,y:o,placement:a,rects:u,platform:c,elements:d,middlewareData:h}=n,{element:m,padding:E=0}=vr(e,n)||{};if(m==null)return{};const T=$E(E),b={x:r,y:o},_=Ff(a),w=Mf(_),A=yield c.getDimensions(m),C=_==="y",I=C?"top":"left",R=C?"bottom":"right",F=C?"clientHeight":"clientWidth",z=u.reference[w]+u.reference[_]-b[_]-u.floating[w],D=b[_]-u.reference[_],q=yield c.getOffsetParent==null?void 0:c.getOffsetParent(m);let ce=q?q[F]:0;(!ce||!(yield c.isElement==null?void 0:c.isElement(q)))&&(ce=d.floating[F]||u.floating[w]);const be=z/2-D/2,j=ce/2-A[w]/2-1,ae=Kr(T[I],j),he=Kr(T[R],j),ge=ae,ue=ce-A[w]-he,Te=ce/2-A[w]/2+be,Ne=Lf(ge,Te,ue),fe=!h.arrow&&Bo(a)!=null&&Te!==Ne&&u.reference[w]/2-(Te<ge?ae:he)-A[w]/2<0,K=fe?Te<ge?Te-ge:Te-ue:0;return{[_]:b[_]+K,data:U({[_]:Ne,centerOffset:Te-Ne-K},fe&&{alignmentOffset:K}),reset:fe}})}}),RP=function(e){return e===void 0&&(e={}),{name:"flip",options:e,fn(n){return et(this,null,function*(){var r,o;const{placement:a,middlewareData:u,rects:c,initialPlacement:d,platform:h,elements:m}=n,Te=vr(e,n),{mainAxis:E=!0,crossAxis:T=!0,fallbackPlacements:b,fallbackStrategy:_="bestFit",fallbackAxisSideDirection:w="none",flipAlignment:A=!0}=Te,C=on(Te,["mainAxis","crossAxis","fallbackPlacements","fallbackStrategy","fallbackAxisSideDirection","flipAlignment"]);if((r=u.arrow)!=null&&r.alignmentOffset)return{};const I=Cr(a),R=hr(d),F=Cr(d)===d,z=yield h.isRTL==null?void 0:h.isRTL(m.floating),D=b||(F||!A?[ol(d)]:SP(d)),q=w!=="none";!b&&q&&D.push(...kP(d,A,w,z));const ce=[d,...D],be=yield oa(n,C),j=[];let ae=((o=u.flip)==null?void 0:o.overflows)||[];if(E&&j.push(be[I]),T){const Ne=wP(a,c,z);j.push(be[Ne[0]],be[Ne[1]])}if(ae=[...ae,{placement:a,overflows:j}],!j.every(Ne=>Ne<=0)){var he,ge;const Ne=(((he=u.flip)==null?void 0:he.index)||0)+1,fe=ce[Ne];if(fe&&(!(T==="alignment"?R!==hr(fe):!1)||ae.every(S=>hr(S.placement)===R?S.overflows[0]>0:!0)))return{data:{index:Ne,overflows:ae},reset:{placement:fe}};let K=(ge=ae.filter(te=>te.overflows[0]<=0).sort((te,S)=>te.overflows[1]-S.overflows[1])[0])==null?void 0:ge.placement;if(!K)switch(_){case"bestFit":{var ue;const te=(ue=ae.filter(S=>{if(q){const M=hr(S.placement);return M===R||M==="y"}return!0}).map(S=>[S.placement,S.overflows.filter(M=>M>0).reduce((M,X)=>M+X,0)]).sort((S,M)=>S[1]-M[1])[0])==null?void 0:ue[0];te&&(K=te);break}case"initialPlacement":K=d;break}if(a!==K)return{reset:{placement:K}}}return{}})}}};function YE(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function WE(e){return TP.some(t=>e[t]>=0)}const PP=function(e){return e===void 0&&(e={}),{name:"hide",options:e,fn(n){return et(this,null,function*(){const{rects:r}=n,u=vr(e,n),{strategy:o="referenceHidden"}=u,a=on(u,["strategy"]);switch(o){case"referenceHidden":{const c=yield oa(n,ne(U({},a),{elementContext:"reference"})),d=YE(c,r.reference);return{data:{referenceHiddenOffsets:d,referenceHidden:WE(d)}}}case"escaped":{const c=yield oa(n,ne(U({},a),{altBoundary:!0})),d=YE(c,r.floating);return{data:{escapedOffsets:d,escaped:WE(d)}}}default:return{}}})}}},qE=new Set(["left","top"]);function LP(e,t){return et(this,null,function*(){const{placement:n,platform:r,elements:o}=e,a=yield r.isRTL==null?void 0:r.isRTL(o.floating),u=Cr(n),c=Bo(n),d=hr(n)==="y",h=qE.has(u)?-1:1,m=a&&d?-1:1,E=vr(t,e);let{mainAxis:T,crossAxis:b,alignmentAxis:_}=typeof E=="number"?{mainAxis:E,crossAxis:0,alignmentAxis:null}:{mainAxis:E.mainAxis||0,crossAxis:E.crossAxis||0,alignmentAxis:E.alignmentAxis};return c&&typeof _=="number"&&(b=c==="end"?_*-1:_),d?{x:b*m,y:T*h}:{x:T*h,y:b*m}})}const DP=function(e){return e===void 0&&(e=0),{name:"offset",options:e,fn(n){return et(this,null,function*(){var r,o;const{x:a,y:u,placement:c,middlewareData:d}=n,h=yield LP(n,e);return c===((r=d.offset)==null?void 0:r.placement)&&(o=d.arrow)!=null&&o.alignmentOffset?{}:{x:a+h.x,y:u+h.y,data:ne(U({},h),{placement:c})}})}}},MP=function(e){return e===void 0&&(e={}),{name:"shift",options:e,fn(n){return et(this,null,function*(){const{x:r,y:o,placement:a}=n,C=vr(e,n),{mainAxis:u=!0,crossAxis:c=!1,limiter:d={fn:I=>{let{x:R,y:F}=I;return{x:R,y:F}}}}=C,h=on(C,["mainAxis","crossAxis","limiter"]),m={x:r,y:o},E=yield oa(n,h),T=hr(Cr(a)),b=Df(T);let _=m[b],w=m[T];if(u){const I=b==="y"?"top":"left",R=b==="y"?"bottom":"right",F=_+E[I],z=_-E[R];_=Lf(F,_,z)}if(c){const I=T==="y"?"top":"left",R=T==="y"?"bottom":"right",F=w+E[I],z=w-E[R];w=Lf(F,w,z)}const A=d.fn(ne(U({},n),{[b]:_,[T]:w}));return ne(U({},A),{data:{x:A.x-r,y:A.y-o,enabled:{[b]:u,[T]:c}}})})}}},FP=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:a,middlewareData:u}=t,{offset:c=0,mainAxis:d=!0,crossAxis:h=!0}=vr(e,t),m={x:n,y:r},E=hr(o),T=Df(E);let b=m[T],_=m[E];const w=vr(c,t),A=typeof w=="number"?{mainAxis:w,crossAxis:0}:U({mainAxis:0,crossAxis:0},w);if(d){const R=T==="y"?"height":"width",F=a.reference[T]-a.floating[R]+A.mainAxis,z=a.reference[T]+a.reference[R]-A.mainAxis;b<F?b=F:b>z&&(b=z)}if(h){var C,I;const R=T==="y"?"width":"height",F=qE.has(Cr(o)),z=a.reference[E]-a.floating[R]+(F&&((C=u.offset)==null?void 0:C[E])||0)+(F?0:A.crossAxis),D=a.reference[E]+a.reference[R]+(F?0:((I=u.offset)==null?void 0:I[E])||0)-(F?A.crossAxis:0);_<z?_=z:_>D&&(_=D)}return{[T]:b,[E]:_}}}},BP=function(e){return e===void 0&&(e={}),{name:"size",options:e,fn(n){return et(this,null,function*(){var r,o;const{placement:a,rects:u,platform:c,elements:d}=n,ae=vr(e,n),{apply:h=()=>{}}=ae,m=on(ae,["apply"]),E=yield oa(n,m),T=Cr(a),b=Bo(a),_=hr(a)==="y",{width:w,height:A}=u.floating;let C,I;T==="top"||T==="bottom"?(C=T,I=b===((yield c.isRTL==null?void 0:c.isRTL(d.floating))?"start":"end")?"left":"right"):(I=T,C=b==="end"?"top":"bottom");const R=A-E.top-E.bottom,F=w-E.left-E.right,z=Kr(A-E[C],R),D=Kr(w-E[I],F),q=!n.middlewareData.shift;let ce=z,be=D;if((r=n.middlewareData.shift)!=null&&r.enabled.x&&(be=F),(o=n.middlewareData.shift)!=null&&o.enabled.y&&(ce=R),q&&!b){const he=wn(E.left,0),ge=wn(E.right,0),ue=wn(E.top,0),Te=wn(E.bottom,0);_?be=w-2*(he!==0||ge!==0?he+ge:wn(E.left,E.right)):ce=A-2*(ue!==0||Te!==0?ue+Te:wn(E.top,E.bottom))}yield h(ne(U({},n),{availableWidth:be,availableHeight:ce}));const j=yield c.getDimensions(d.floating);return w!==j.width||A!==j.height?{reset:{rects:!0}}:{}})}}};function al(){return typeof window!="undefined"}function Uo(e){return GE(e)?(e.nodeName||"").toLowerCase():"#document"}function Sn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function pr(e){var t;return(t=(GE(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function GE(e){return al()?e instanceof Node||e instanceof Sn(e).Node:!1}function Kn(e){return al()?e instanceof Element||e instanceof Sn(e).Element:!1}function mr(e){return al()?e instanceof HTMLElement||e instanceof Sn(e).HTMLElement:!1}function KE(e){return!al()||typeof ShadowRoot=="undefined"?!1:e instanceof ShadowRoot||e instanceof Sn(e).ShadowRoot}const UP=new Set(["inline","contents"]);function sa(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Qn(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!UP.has(o)}const HP=new Set(["table","td","th"]);function zP(e){return HP.has(Uo(e))}const jP=[":popover-open",":modal"];function ul(e){return jP.some(t=>{try{return e.matches(t)}catch(n){return!1}})}const $P=["transform","translate","scale","rotate","perspective"],VP=["transform","translate","scale","rotate","perspective","filter"],YP=["paint","layout","strict","content"];function Uf(e){const t=Hf(),n=Kn(e)?Qn(e):e;return $P.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||VP.some(r=>(n.willChange||"").includes(r))||YP.some(r=>(n.contain||"").includes(r))}function WP(e){let t=Qr(e);for(;mr(t)&&!Ho(t);){if(Uf(t))return t;if(ul(t))return null;t=Qr(t)}return null}function Hf(){return typeof CSS=="undefined"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const qP=new Set(["html","body","#document"]);function Ho(e){return qP.has(Uo(e))}function Qn(e){return Sn(e).getComputedStyle(e)}function ll(e){return Kn(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Qr(e){if(Uo(e)==="html")return e;const t=e.assignedSlot||e.parentNode||KE(e)&&e.host||pr(e);return KE(t)?t.host:t}function QE(e){const t=Qr(e);return Ho(t)?e.ownerDocument?e.ownerDocument.body:e.body:mr(t)&&sa(t)?t:QE(t)}function aa(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=QE(e),a=o===((r=e.ownerDocument)==null?void 0:r.body),u=Sn(o);if(a){const c=zf(u);return t.concat(u,u.visualViewport||[],sa(o)?o:[],c&&n?aa(c):[])}return t.concat(o,aa(o,[],n))}function zf(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function XE(e){const t=Qn(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=mr(e),a=o?e.offsetWidth:n,u=o?e.offsetHeight:r,c=rl(n)!==a||rl(r)!==u;return c&&(n=a,r=u),{width:n,height:r,$:c}}function jf(e){return Kn(e)?e:e.contextElement}function zo(e){const t=jf(e);if(!mr(t))return fr(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:a}=XE(t);let u=(a?rl(n.width):n.width)/r,c=(a?rl(n.height):n.height)/o;return(!u||!Number.isFinite(u))&&(u=1),(!c||!Number.isFinite(c))&&(c=1),{x:u,y:c}}const GP=fr(0);function JE(e){const t=Sn(e);return!Hf()||!t.visualViewport?GP:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function KP(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Sn(e)?!1:t}function zi(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),a=jf(e);let u=fr(1);t&&(r?Kn(r)&&(u=zo(r)):u=zo(e));const c=KP(a,n,r)?JE(a):fr(0);let d=(o.left+c.x)/u.x,h=(o.top+c.y)/u.y,m=o.width/u.x,E=o.height/u.y;if(a){const T=Sn(a),b=r&&Kn(r)?Sn(r):r;let _=T,w=zf(_);for(;w&&r&&b!==_;){const A=zo(w),C=w.getBoundingClientRect(),I=Qn(w),R=C.left+(w.clientLeft+parseFloat(I.paddingLeft))*A.x,F=C.top+(w.clientTop+parseFloat(I.paddingTop))*A.y;d*=A.x,h*=A.y,m*=A.x,E*=A.y,d+=R,h+=F,_=Sn(w),w=zf(_)}}return sl({width:m,height:E,x:d,y:h})}function cl(e,t){const n=ll(e).scrollLeft;return t?t.left+n:zi(pr(e)).left+n}function ZE(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-cl(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function QP(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const a=o==="fixed",u=pr(r),c=t?ul(t.floating):!1;if(r===u||c&&a)return n;let d={scrollLeft:0,scrollTop:0},h=fr(1);const m=fr(0),E=mr(r);if((E||!E&&!a)&&((Uo(r)!=="body"||sa(u))&&(d=ll(r)),mr(r))){const b=zi(r);h=zo(r),m.x=b.x+r.clientLeft,m.y=b.y+r.clientTop}const T=u&&!E&&!a?ZE(u,d):fr(0);return{width:n.width*h.x,height:n.height*h.y,x:n.x*h.x-d.scrollLeft*h.x+m.x+T.x,y:n.y*h.y-d.scrollTop*h.y+m.y+T.y}}function XP(e){return Array.from(e.getClientRects())}function JP(e){const t=pr(e),n=ll(e),r=e.ownerDocument.body,o=wn(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=wn(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let u=-n.scrollLeft+cl(e);const c=-n.scrollTop;return Qn(r).direction==="rtl"&&(u+=wn(t.clientWidth,r.clientWidth)-o),{width:o,height:a,x:u,y:c}}const ey=25;function ZP(e,t){const n=Sn(e),r=pr(e),o=n.visualViewport;let a=r.clientWidth,u=r.clientHeight,c=0,d=0;if(o){a=o.width,u=o.height;const m=Hf();(!m||m&&t==="fixed")&&(c=o.offsetLeft,d=o.offsetTop)}const h=cl(r);if(h<=0){const m=r.ownerDocument,E=m.body,T=getComputedStyle(E),b=m.compatMode==="CSS1Compat"&&parseFloat(T.marginLeft)+parseFloat(T.marginRight)||0,_=Math.abs(r.clientWidth-E.clientWidth-b);_<=ey&&(a-=_)}else h<=ey&&(a+=h);return{width:a,height:u,x:c,y:d}}const eL=new Set(["absolute","fixed"]);function tL(e,t){const n=zi(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,a=mr(e)?zo(e):fr(1),u=e.clientWidth*a.x,c=e.clientHeight*a.y,d=o*a.x,h=r*a.y;return{width:u,height:c,x:d,y:h}}function ty(e,t,n){let r;if(t==="viewport")r=ZP(e,n);else if(t==="document")r=JP(pr(e));else if(Kn(t))r=tL(t,n);else{const o=JE(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return sl(r)}function ny(e,t){const n=Qr(e);return n===t||!Kn(n)||Ho(n)?!1:Qn(n).position==="fixed"||ny(n,t)}function nL(e,t){const n=t.get(e);if(n)return n;let r=aa(e,[],!1).filter(c=>Kn(c)&&Uo(c)!=="body"),o=null;const a=Qn(e).position==="fixed";let u=a?Qr(e):e;for(;Kn(u)&&!Ho(u);){const c=Qn(u),d=Uf(u);!d&&c.position==="fixed"&&(o=null),(a?!d&&!o:!d&&c.position==="static"&&!!o&&eL.has(o.position)||sa(u)&&!d&&ny(e,u))?r=r.filter(m=>m!==u):o=c,u=Qr(u)}return t.set(e,r),r}function rL(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const u=[...n==="clippingAncestors"?ul(t)?[]:nL(t,this._c):[].concat(n),r],c=u[0],d=u.reduce((h,m)=>{const E=ty(t,m,o);return h.top=wn(E.top,h.top),h.right=Kr(E.right,h.right),h.bottom=Kr(E.bottom,h.bottom),h.left=wn(E.left,h.left),h},ty(t,c,o));return{width:d.right-d.left,height:d.bottom-d.top,x:d.left,y:d.top}}function iL(e){const{width:t,height:n}=XE(e);return{width:t,height:n}}function oL(e,t,n){const r=mr(t),o=pr(t),a=n==="fixed",u=zi(e,!0,a,t);let c={scrollLeft:0,scrollTop:0};const d=fr(0);function h(){d.x=cl(o)}if(r||!r&&!a)if((Uo(t)!=="body"||sa(o))&&(c=ll(t)),r){const b=zi(t,!0,a,t);d.x=b.x+t.clientLeft,d.y=b.y+t.clientTop}else o&&h();a&&!r&&o&&h();const m=o&&!r&&!a?ZE(o,c):fr(0),E=u.left+c.scrollLeft-d.x-m.x,T=u.top+c.scrollTop-d.y-m.y;return{x:E,y:T,width:u.width,height:u.height}}function $f(e){return Qn(e).position==="static"}function ry(e,t){if(!mr(e)||Qn(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return pr(e)===n&&(n=n.ownerDocument.body),n}function iy(e,t){const n=Sn(e);if(ul(e))return n;if(!mr(e)){let o=Qr(e);for(;o&&!Ho(o);){if(Kn(o)&&!$f(o))return o;o=Qr(o)}return n}let r=ry(e,t);for(;r&&zP(r)&&$f(r);)r=ry(r,t);return r&&Ho(r)&&$f(r)&&!Uf(r)?n:r||WP(e)||n}const sL=function(e){return et(this,null,function*(){const t=this.getOffsetParent||iy,n=this.getDimensions,r=yield n(e.floating);return{reference:oL(e.reference,yield t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}})};function aL(e){return Qn(e).direction==="rtl"}const uL={convertOffsetParentRelativeRectToViewportRelativeRect:QP,getDocumentElement:pr,getClippingRect:rL,getOffsetParent:iy,getElementRects:sL,getClientRects:XP,getDimensions:iL,getScale:zo,isElement:Kn,isRTL:aL};function oy(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function lL(e,t){let n=null,r;const o=pr(e);function a(){var c;clearTimeout(r),(c=n)==null||c.disconnect(),n=null}function u(c,d){c===void 0&&(c=!1),d===void 0&&(d=1),a();const h=e.getBoundingClientRect(),{left:m,top:E,width:T,height:b}=h;if(c||t(),!T||!b)return;const _=il(E),w=il(o.clientWidth-(m+T)),A=il(o.clientHeight-(E+b)),C=il(m),R={rootMargin:-_+"px "+-w+"px "+-A+"px "+-C+"px",threshold:wn(0,Kr(1,d))||1};let F=!0;function z(D){const q=D[0].intersectionRatio;if(q!==d){if(!F)return u();q?u(!1,q):r=setTimeout(()=>{u(!1,1e-7)},1e3)}q===1&&!oy(h,e.getBoundingClientRect())&&u(),F=!1}try{n=new IntersectionObserver(z,ne(U({},R),{root:o.ownerDocument}))}catch(D){n=new IntersectionObserver(z,R)}n.observe(e)}return u(!0),a}function cL(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:a=!0,elementResize:u=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:d=!1}=r,h=jf(e),m=o||a?[...h?aa(h):[],...aa(t)]:[];m.forEach(C=>{o&&C.addEventListener("scroll",n,{passive:!0}),a&&C.addEventListener("resize",n)});const E=h&&c?lL(h,n):null;let T=-1,b=null;u&&(b=new ResizeObserver(C=>{let[I]=C;I&&I.target===h&&b&&(b.unobserve(t),cancelAnimationFrame(T),T=requestAnimationFrame(()=>{var R;(R=b)==null||R.observe(t)})),n()}),h&&!d&&b.observe(h),b.observe(t));let _,w=d?zi(e):null;d&&A();function A(){const C=zi(e);w&&!oy(w,C)&&n(),w=C,_=requestAnimationFrame(A)}return n(),()=>{var C;m.forEach(I=>{o&&I.removeEventListener("scroll",n),a&&I.removeEventListener("resize",n)}),E==null||E(),(C=b)==null||C.disconnect(),b=null,d&&cancelAnimationFrame(_)}}const dL=DP,fL=MP,hL=RP,pL=BP,mL=PP,gL=IP,EL=FP,yL=(e,t,n)=>{const r=new Map,o=U({platform:uL},n),a=ne(U({},o.platform),{_c:r});return OP(e,t,ne(U({},o),{platform:a}))};function sy(e=0,t=0,n=0,r=0){if(typeof DOMRect=="function")return new DOMRect(e,t,n,r);const o={x:e,y:t,width:n,height:r,top:t,right:e+n,bottom:t+r,left:e};return ne(U({},o),{toJSON:()=>o})}function TL(e){if(!e)return sy();const{x:t,y:n,width:r,height:o}=e;return sy(t,n,r,o)}function bL(e,t){return{contextElement:Dt(e)?e:void 0,getBoundingClientRect:()=>{const n=e,r=t==null?void 0:t(n);return r||!n?TL(r):n.getBoundingClientRect()}}}var ua=e=>({variable:e,reference:`var(${e})`}),kr={arrowSize:ua("--arrow-size"),arrowSizeHalf:ua("--arrow-size-half"),arrowBg:ua("--arrow-background"),transformOrigin:ua("--transform-origin"),arrowOffset:ua("--arrow-offset")},xL=e=>e==="top"||e==="bottom"?"y":"x";function _L(e,t){return{name:"transformOrigin",fn(n){var be,j,ae,he,ge;const{elements:r,middlewareData:o,placement:a,rects:u,y:c}=n,d=a.split("-")[0],h=xL(d),m=((be=o.arrow)==null?void 0:be.x)||0,E=((j=o.arrow)==null?void 0:j.y)||0,T=(t==null?void 0:t.clientWidth)||0,b=(t==null?void 0:t.clientHeight)||0,_=m+T/2,w=E+b/2,A=Math.abs(((ae=o.shift)==null?void 0:ae.y)||0),C=u.reference.height/2,I=b/2,R=(ge=(he=e.offset)==null?void 0:he.mainAxis)!=null?ge:e.gutter,F=typeof R=="number"?R+I:R!=null?R:I,z=A>F,D={top:`${_}px calc(100% + ${F}px)`,bottom:`${_}px ${-F}px`,left:`calc(100% + ${F}px) ${w}px`,right:`${-F}px ${w}px`}[d],q=`${_}px ${u.reference.y+C-c}px`,ce=!!e.overlap&&h==="y"&&z;return r.floating.style.setProperty(kr.transformOrigin.variable,ce?q:D),{data:{transformOrigin:ce?q:D}}}}}var wL={name:"rects",fn({rects:e}){return{data:e}}},SL=e=>{if(e)return{name:"shiftArrow",fn({placement:t,middlewareData:n}){if(!n.arrow)return{};const{x:r,y:o}=n.arrow,a=t.split("-")[0];return Object.assign(e.style,{left:r!=null?`${r}px`:"",top:o!=null?`${o}px`:"",[a]:`calc(100% + ${kr.arrowOffset.reference})`}),{}}}};function AL(e){const[t,n]=e.split("-");return{side:t,align:n,hasAlign:n!=null}}var vL={strategy:"absolute",placement:"bottom",listeners:!0,gutter:8,flip:!0,slide:!0,overlap:!1,sameWidth:!1,fitViewport:!1,overflowPadding:8,arrowPadding:4};function ay(e,t){const n=e.devicePixelRatio||1;return Math.round(t*n)/n}function Vf(e){return typeof e=="function"?e():e==="clipping-ancestors"?"clippingAncestors":e}function CL(e,t,n){const r=e||t.createElement("div");return gL({element:r,padding:n.arrowPadding})}function kL(e,t){var n;if(!$I((n=t.offset)!=null?n:t.gutter))return dL(({placement:r})=>{var m,E,T,b;const o=((e==null?void 0:e.clientHeight)||0)/2,a=(E=(m=t.offset)==null?void 0:m.mainAxis)!=null?E:t.gutter,u=typeof a=="number"?a+o:a!=null?a:o,{hasAlign:c}=AL(r),d=c?void 0:t.shift,h=(b=(T=t.offset)==null?void 0:T.crossAxis)!=null?b:d;return yf({crossAxis:h,mainAxis:u,alignmentAxis:t.shift})})}function NL(e){if(!e.flip)return;const t=Vf(e.boundary);return hL(ne(U({},t?{boundary:t}:void 0),{padding:e.overflowPadding,fallbackPlacements:e.flip===!0?void 0:e.flip}))}function OL(e){if(!e.slide&&!e.overlap)return;const t=Vf(e.boundary);return fL(ne(U({},t?{boundary:t}:void 0),{mainAxis:e.slide,crossAxis:e.overlap,padding:e.overflowPadding,limiter:EL()}))}function IL(e){return pL({padding:e.overflowPadding,apply({elements:t,rects:n,availableHeight:r,availableWidth:o}){const a=t.floating,u=Math.round(n.reference.width),c=Math.round(n.reference.height);o=Math.floor(o),r=Math.floor(r),a.style.setProperty("--reference-width",`${u}px`),a.style.setProperty("--reference-height",`${c}px`),a.style.setProperty("--available-width",`${o}px`),a.style.setProperty("--available-height",`${r}px`)}})}function RL(e){var t;if(e.hideWhenDetached)return mL({strategy:"referenceHidden",boundary:(t=Vf(e.boundary))!=null?t:"clippingAncestors"})}function PL(e){return e?e===!0?{ancestorResize:!0,ancestorScroll:!0,elementResize:!0,layoutShift:!0}:e:{}}function LL(e,t,n={}){const r=bL(e,n.getAnchorRect);if(!t||!r)return;const o=Object.assign({},vL,n),a=t.querySelector("[data-part=arrow]"),u=[kL(a,o),NL(o),OL(o),CL(a,t.ownerDocument,o),SL(a),_L({gutter:o.gutter,offset:o.offset,overlap:o.overlap},a),IL(o),RL(o),wL],{placement:c,strategy:d,onComplete:h,onPositioned:m}=o,E=()=>et(null,null,function*(){var F;if(!r||!t)return;const w=yield yL(r,t,{placement:c,middleware:u,strategy:d});h==null||h(w),m==null||m({placed:!0});const A=Oo(t),C=ay(A,w.x),I=ay(A,w.y);t.style.setProperty("--x",`${C}px`),t.style.setProperty("--y",`${I}px`),o.hideWhenDetached&&(((F=w.middlewareData.hide)==null?void 0:F.referenceHidden)?(t.style.setProperty("visibility","hidden"),t.style.setProperty("pointer-events","none")):(t.style.removeProperty("visibility"),t.style.removeProperty("pointer-events")));const R=t.firstElementChild;if(R){const z=Ro(R);t.style.setProperty("--z-index",z.zIndex)}}),T=()=>et(null,null,function*(){n.updatePosition?(yield n.updatePosition({updatePosition:E,floatingElement:t}),m==null||m({placed:!0})):yield E()}),b=PL(o.listeners),_=o.listeners?cL(r,t,T,b):JI;return T(),()=>{_==null||_(),m==null||m({placed:!1})}}function uy(e,t,n={}){const c=n,{defer:r}=c,o=on(c,["defer"]),a=r?kt:d=>d(),u=[];return u.push(a(()=>{const d=typeof e=="function"?e():e,h=typeof t=="function"?t():t;u.push(LL(d,h,o))})),()=>{u.forEach(d=>d==null?void 0:d())}}var DL={bottom:"rotate(45deg)",left:"rotate(135deg)",top:"rotate(225deg)",right:"rotate(315deg)"};function ML(e={}){const{placement:t,sameWidth:n,fitViewport:r,strategy:o="absolute"}=e;return{arrow:{position:"absolute",width:kr.arrowSize.reference,height:kr.arrowSize.reference,[kr.arrowSizeHalf.variable]:`calc(${kr.arrowSize.reference} / 2)`,[kr.arrowOffset.variable]:`calc(${kr.arrowSizeHalf.reference} * -1)`},arrowTip:{transform:t?DL[t.split("-")[0]]:void 0,background:kr.arrowBg.reference,top:"0",left:"0",width:"100%",height:"100%",position:"absolute",zIndex:"inherit"},floating:{position:o,isolation:"isolate",minWidth:n?void 0:"max-content",width:n?"var(--reference-width)":void 0,maxWidth:r?"var(--available-width)":void 0,maxHeight:r?"var(--available-height)":void 0,pointerEvents:t?void 0:"none",top:"0px",left:"0px",transform:t?"translate3d(var(--x), var(--y), 0)":"translate3d(0, -100vh, 0)",zIndex:"var(--z-index)"}}}var jo=new WeakMap,dl=new WeakMap,fl={},Yf=0,ly=e=>e&&(e.host||ly(e.parentNode)),FL=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=ly(n);return r&&e.contains(r)?r:(console.error("[zag-js > ariaHidden] target",n,"in not contained inside",e,". Doing nothing"),null)}).filter(n=>!!n),BL=new Set(["script","output","status","next-route-announcer"]),UL=e=>BL.has(e.localName)||e.role==="status"||e.hasAttribute("aria-live")?!0:e.matches("[data-live-announcer]"),HL=(e,t)=>{const{parentNode:n,markerName:r,controlAttribute:o,followControlledElements:a=!0}=t,u=FL(n,Array.isArray(e)?e:[e]);fl[r]||(fl[r]=new WeakMap);const c=fl[r],d=[],h=new Set,m=new Set(u),E=b=>{!b||h.has(b)||(h.add(b),E(b.parentNode))};u.forEach(b=>{E(b),a&&Dt(b)&&_E(b,_=>{E(_)})});const T=b=>{!b||m.has(b)||Array.prototype.forEach.call(b.children,_=>{if(h.has(_))T(_);else try{if(UL(_))return;const A=_.getAttribute(o)==="true",C=(jo.get(_)||0)+1,I=(c.get(_)||0)+1;jo.set(_,C),c.set(_,I),d.push(_),C===1&&A&&dl.set(_,!0),I===1&&_.setAttribute(r,""),A||_.setAttribute(o,"true")}catch(w){console.error("[zag-js > ariaHidden] cannot operate on ",_,w)}})};return T(n),h.clear(),Yf++,()=>{d.forEach(b=>{const _=jo.get(b)-1,w=c.get(b)-1;jo.set(b,_),c.set(b,w),_||(dl.has(b)||b.removeAttribute(o),dl.delete(b)),w||b.removeAttribute(r)}),Yf--,Yf||(jo=new WeakMap,jo=new WeakMap,dl=new WeakMap,fl={})}},zL=e=>(Array.isArray(e)?e[0]:e).ownerDocument.body,jL=(e,t=zL(e),n="data-aria-hidden",r=!0)=>{if(t)return HL(e,{parentNode:t,markerName:n,controlAttribute:"aria-hidden",followControlledElements:r})},$L=e=>{const t=requestAnimationFrame(()=>e());return()=>cancelAnimationFrame(t)};function cy(e,t={}){const{defer:n=!0}=t,r=n?$L:a=>a(),o=[];return o.push(r(()=>{const u=(typeof e=="function"?e():e).filter(Boolean);u.length!==0&&o.push(jL(u))})),()=>{o.forEach(a=>a==null?void 0:a())}}function VL(e){const t={each(n){var r;for(let o=0;o<((r=e.frames)==null?void 0:r.length);o+=1){const a=e.frames[o];a&&n(a)}},addEventListener(n,r,o){return t.each(a=>{try{a.document.addEventListener(n,r,o)}catch(u){}}),()=>{try{t.removeEventListener(n,r,o)}catch(a){}}},removeEventListener(n,r,o){t.each(a=>{try{a.document.removeEventListener(n,r,o)}catch(u){}})}};return t}function YL(e){const t=e.frameElement!=null?e.parent:null;return{addEventListener:(n,r,o)=>{try{t==null||t.addEventListener(n,r,o)}catch(a){}return()=>{try{t==null||t.removeEventListener(n,r,o)}catch(a){}}},removeEventListener:(n,r,o)=>{try{t==null||t.removeEventListener(n,r,o)}catch(a){}}}}var dy="pointerdown.outside",fy="focus.outside";function WL(e){for(const t of e)if(Dt(t)&&dr(t))return!0;return!1}var hy=e=>"clientY"in e;function qL(e,t){if(!hy(t)||!e)return!1;const n=e.getBoundingClientRect();return n.width===0||n.height===0?!1:n.top<=t.clientY&&t.clientY<=n.top+n.height&&n.left<=t.clientX&&t.clientX<=n.left+n.width}function GL(e,t){return e.y<=t.y&&t.y<=e.y+e.height&&e.x<=t.x&&t.x<=e.x+e.width}function py(e,t){if(!t||!hy(e))return!1;const n=t.scrollHeight>t.clientHeight,r=n&&e.clientX>t.offsetLeft+t.clientWidth,o=t.scrollWidth>t.clientWidth,a=o&&e.clientY>t.offsetTop+t.clientHeight,u={x:t.offsetLeft,y:t.offsetTop,width:t.clientWidth+(n?16:0),height:t.clientHeight+(o?16:0)},c={x:e.clientX,y:e.clientY};return GL(u,c)?r||a:!1}function KL(e,t){const{exclude:n,onFocusOutside:r,onPointerDownOutside:o,onInteractOutside:a,defer:u,followControlledElements:c=!0}=t;if(!e)return;const d=cr(e),h=Oo(e),m=VL(h),E=YL(h);function T(R,F){if(!Dt(F)||!F.isConnected||No(e,F)||qL(e,R)||c&&xE(e,F))return!1;const z=d.querySelector(`[aria-controls="${e.id}"]`);if(z){const q=Cf(z);if(py(R,q))return!1}const D=Cf(e);return py(R,D)?!1:!(n!=null&&n(F))}const b=new Set,_=Fi(e==null?void 0:e.getRootNode());function w(R){function F(z){var be,j;const D=u&&!wE()?kt:ae=>ae(),q=z!=null?z:R,ce=(j=(be=q==null?void 0:q.composedPath)==null?void 0:be.call(q))!=null?j:[q==null?void 0:q.target];D(()=>{const ae=_?ce[0]:Gn(R);if(!(!e||!T(R,ae))){if(o||a){const he=Ef(o,a);e.addEventListener(dy,he,{once:!0})}my(e,dy,{bubbles:!1,cancelable:!0,detail:{originalEvent:q,contextmenu:PR(q),focusable:WL(ce),target:ae}})}})}R.pointerType==="touch"?(b.forEach(z=>z()),b.add(Mt(d,"click",F,{once:!0})),b.add(E.addEventListener("click",F,{once:!0})),b.add(m.addEventListener("click",F,{once:!0}))):F()}const A=new Set,C=setTimeout(()=>{A.add(Mt(d,"pointerdown",w,!0)),A.add(E.addEventListener("pointerdown",w,!0)),A.add(m.addEventListener("pointerdown",w,!0))},0);function I(R){(u?kt:z=>z())(()=>{var q,ce;const z=(ce=(q=R==null?void 0:R.composedPath)==null?void 0:q.call(R))!=null?ce:[R==null?void 0:R.target],D=_?z[0]:Gn(R);if(!(!e||!T(R,D))){if(r||a){const be=Ef(r,a);e.addEventListener(fy,be,{once:!0})}my(e,fy,{bubbles:!1,cancelable:!0,detail:{originalEvent:R,contextmenu:!1,focusable:dr(D),target:D}})}})}return wE()||(A.add(Mt(d,"focusin",I,!0)),A.add(E.addEventListener("focusin",I,!0)),A.add(m.addEventListener("focusin",I,!0))),()=>{clearTimeout(C),b.forEach(R=>R()),A.forEach(R=>R())}}function QL(e,t){const{defer:n}=t,r=n?kt:a=>a(),o=[];return o.push(r(()=>{const a=typeof e=="function"?e():e;o.push(KL(a,t))})),()=>{o.forEach(a=>a==null?void 0:a())}}function my(e,t,n){const r=e.ownerDocument.defaultView||window,o=new r.CustomEvent(t,n);return e.dispatchEvent(o)}function XL(e,t){const n=r=>{r.key==="Escape"&&(r.isComposing||t==null||t(r))};return Mt(cr(e),"keydown",n,{capture:!0})}var gy="layer:request-dismiss",Dn={layers:[],branches:[],count(){return this.layers.length},pointerBlockingLayers(){return this.layers.filter(e=>e.pointerBlocking)},topMostPointerBlockingLayer(){return[...this.pointerBlockingLayers()].slice(-1)[0]},hasPointerBlockingLayer(){return this.pointerBlockingLayers().length>0},isBelowPointerBlockingLayer(e){var r;const t=this.indexOf(e),n=this.topMostPointerBlockingLayer()?this.indexOf((r=this.topMostPointerBlockingLayer())==null?void 0:r.node):-1;return t<n},isTopMost(e){const t=this.layers[this.count()-1];return(t==null?void 0:t.node)===e},getNestedLayers(e){return Array.from(this.layers).slice(this.indexOf(e)+1)},getLayersByType(e){return this.layers.filter(t=>t.type===e)},getNestedLayersByType(e,t){const n=this.indexOf(e);return n===-1?[]:this.layers.slice(n+1).filter(r=>r.type===t)},getParentLayerOfType(e,t){const n=this.indexOf(e);if(!(n<=0))return this.layers.slice(0,n).reverse().find(r=>r.type===t)},countNestedLayersOfType(e,t){return this.getNestedLayersByType(e,t).length},isInNestedLayer(e,t){return this.getNestedLayers(e).some(n=>No(n.node,t))},isInBranch(e){return Array.from(this.branches).some(t=>No(t,e))},add(e){this.layers.push(e),this.syncLayers()},addBranch(e){this.branches.push(e)},remove(e){const t=this.indexOf(e);t<0||(t<this.count()-1&&this.getNestedLayers(e).forEach(r=>Dn.dismiss(r.node,e)),this.layers.splice(t,1),this.syncLayers())},removeBranch(e){const t=this.branches.indexOf(e);t>=0&&this.branches.splice(t,1)},syncLayers(){this.layers.forEach((e,t)=>{e.node.style.setProperty("--layer-index",`${t}`),e.node.removeAttribute("data-nested"),e.node.removeAttribute("data-has-nested"),this.getParentLayerOfType(e.node,e.type)&&e.node.setAttribute("data-nested",e.type);const r=this.countNestedLayersOfType(e.node,e.type);r>0&&e.node.setAttribute("data-has-nested",e.type),e.node.style.setProperty("--nested-layer-count",`${r}`)})},indexOf(e){return this.layers.findIndex(t=>t.node===e)},dismiss(e,t){const n=this.indexOf(e);if(n===-1)return;const r=this.layers[n];ZL(e,gy,o=>{var a;(a=r.requestDismiss)==null||a.call(r,o),o.defaultPrevented||r==null||r.dismiss()}),JL(e,gy,{originalLayer:e,targetLayer:t,originalIndex:n,targetIndex:t?this.indexOf(t):-1}),this.syncLayers()},clear(){this.remove(this.layers[0].node)}};function JL(e,t,n){const r=e.ownerDocument.defaultView||window,o=new r.CustomEvent(t,{cancelable:!0,bubbles:!0,detail:n});return e.dispatchEvent(o)}function ZL(e,t,n){e.addEventListener(t,n,{once:!0})}var Ey;function yy(){Dn.layers.forEach(({node:e})=>{e.style.pointerEvents=Dn.isBelowPointerBlockingLayer(e)?"none":"auto"})}function e6(e){e.style.pointerEvents=""}function t6(e,t){const n=cr(e),r=[];return Dn.hasPointerBlockingLayer()&&!n.body.hasAttribute("data-inert")&&(Ey=document.body.style.pointerEvents,queueMicrotask(()=>{n.body.style.pointerEvents="none",n.body.setAttribute("data-inert","")})),t==null||t.forEach(o=>{const[a,u]=nP(()=>{const c=o();return Dt(c)?c:null},{timeout:1e3});a.then(c=>r.push(Ju(c,{pointerEvents:"auto"}))),r.push(u)}),()=>{Dn.hasPointerBlockingLayer()||(queueMicrotask(()=>{n.body.style.pointerEvents=Ey,n.body.removeAttribute("data-inert"),n.body.style.length===0&&n.body.removeAttribute("style")}),r.forEach(o=>o()))}}function n6(e,t){const{warnOnMissingNode:n=!0}=t;if(n&&!e){Tf("[@zag-js/dismissable] node is `null` or `undefined`");return}if(!e)return;const{onDismiss:r,onRequestDismiss:o,pointerBlocking:a,exclude:u,debug:c,type:d="dialog"}=t,h={dismiss:r,node:e,type:d,pointerBlocking:a,requestDismiss:o};Dn.add(h),yy();function m(w){var C,I;const A=Gn(w.detail.originalEvent);Dn.isBelowPointerBlockingLayer(e)||Dn.isInBranch(A)||((C=t.onPointerDownOutside)==null||C.call(t,w),(I=t.onInteractOutside)==null||I.call(t,w),!w.defaultPrevented&&(c&&console.log("onPointerDownOutside:",w.detail.originalEvent),r==null||r()))}function E(w){var C,I;const A=Gn(w.detail.originalEvent);Dn.isInBranch(A)||((C=t.onFocusOutside)==null||C.call(t,w),(I=t.onInteractOutside)==null||I.call(t,w),!w.defaultPrevented&&(c&&console.log("onFocusOutside:",w.detail.originalEvent),r==null||r()))}function T(w){var A;Dn.isTopMost(e)&&((A=t.onEscapeKeyDown)==null||A.call(t,w),!w.defaultPrevented&&r&&(w.preventDefault(),r()))}function b(w){var R;if(!e)return!1;const A=typeof u=="function"?u():u,C=Array.isArray(A)?A:[A],I=(R=t.persistentElements)==null?void 0:R.map(F=>F()).filter(Dt);return I&&C.push(...I),C.some(F=>No(F,w))||Dn.isInNestedLayer(e,w)}const _=[a?t6(e,t.persistentElements):void 0,XL(e,T),QL(e,{exclude:b,onFocusOutside:E,onPointerDownOutside:m,defer:t.defer})];return()=>{Dn.remove(e),yy(),e6(e),_.forEach(w=>w==null?void 0:w())}}function Ty(e,t){const{defer:n}=t,r=n?kt:a=>a(),o=[];return o.push(r(()=>{const a=Co(e)?e():e;o.push(n6(a,t))})),()=>{o.forEach(a=>a==null?void 0:a())}}var r6=Object.defineProperty,i6=(e,t,n)=>t in e?r6(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ht=(e,t,n)=>i6(e,typeof t!="symbol"?t+"":t,n),by={activateTrap(e,t){if(e.length>0){const r=e[e.length-1];r!==t&&r.pause()}const n=e.indexOf(t);n===-1||e.splice(n,1),e.push(t)},deactivateTrap(e,t){const n=e.indexOf(t);n!==-1&&e.splice(n,1),e.length>0&&e[e.length-1].unpause()}},o6=[],s6=class{constructor(e,t){ht(this,"trapStack"),ht(this,"config"),ht(this,"doc"),ht(this,"state",{containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,delayInitialFocusTimer:void 0,recentNavEvent:void 0}),ht(this,"portalContainers",new Set),ht(this,"listenerCleanups",[]),ht(this,"handleFocus",r=>{const o=Gn(r),a=this.findContainerIndex(o,r)>=0;if(a||Gu(o))a&&(this.state.mostRecentlyFocusedNode=o);else{r.stopImmediatePropagation();let u,c=!0;if(this.state.mostRecentlyFocusedNode)if(na(this.state.mostRecentlyFocusedNode)>0){const d=this.findContainerIndex(this.state.mostRecentlyFocusedNode),{tabbableNodes:h}=this.state.containerGroups[d];if(h.length>0){const m=h.findIndex(E=>E===this.state.mostRecentlyFocusedNode);m>=0&&(this.config.isKeyForward(this.state.recentNavEvent)?m+1<h.length&&(u=h[m+1],c=!1):m-1>=0&&(u=h[m-1],c=!1))}}else this.state.containerGroups.some(d=>d.tabbableNodes.some(h=>na(h)>0))||(c=!1);else c=!1;c&&(u=this.findNextNavNode({target:this.state.mostRecentlyFocusedNode,isBackward:this.config.isKeyBackward(this.state.recentNavEvent)})),u?this.tryFocus(u):this.tryFocus(this.state.mostRecentlyFocusedNode||this.getInitialFocusNode())}this.state.recentNavEvent=void 0}),ht(this,"handlePointerDown",r=>{const o=Gn(r);if(!(this.findContainerIndex(o,r)>=0)){if(ca(this.config.clickOutsideDeactivates,r)){this.deactivate({returnFocus:this.config.returnFocusOnDeactivate});return}ca(this.config.allowOutsideClick,r)||r.preventDefault()}}),ht(this,"handleClick",r=>{const o=Gn(r);this.findContainerIndex(o,r)>=0||ca(this.config.clickOutsideDeactivates,r)||ca(this.config.allowOutsideClick,r)||(r.preventDefault(),r.stopImmediatePropagation())}),ht(this,"handleTabKey",r=>{if(this.config.isKeyForward(r)||this.config.isKeyBackward(r)){this.state.recentNavEvent=r;const o=this.config.isKeyBackward(r),a=this.findNextNavNode({event:r,isBackward:o});if(!a)return;la(r)&&r.preventDefault(),this.tryFocus(a)}}),ht(this,"handleEscapeKey",r=>{a6(r)&&ca(this.config.escapeDeactivates,r)!==!1&&(r.preventDefault(),this.deactivate())}),ht(this,"_mutationObserver"),ht(this,"setupMutationObserver",()=>{const r=this.doc.defaultView||window;this._mutationObserver=new r.MutationObserver(o=>{o.some(c=>Array.from(c.removedNodes).some(h=>h===this.state.mostRecentlyFocusedNode))&&this.tryFocus(this.getInitialFocusNode()),o.some(c=>c.type==="attributes"&&(c.attributeName==="aria-controls"||c.attributeName==="aria-expanded")?!0:c.type==="childList"&&c.addedNodes.length>0?Array.from(c.addedNodes).some(d=>{if(d.nodeType!==Node.ELEMENT_NODE)return!1;const h=d;return SR(h)?!0:h.id&&!this.state.containers.some(m=>m.contains(h))?AR(h):!1}):!1)&&this.state.active&&!this.state.paused&&(this.updateTabbableNodes(),this.updatePortalContainers())})}),ht(this,"updateObservedNodes",()=>{var r;(r=this._mutationObserver)==null||r.disconnect(),this.state.active&&!this.state.paused&&(this.state.containers.map(o=>{var a;(a=this._mutationObserver)==null||a.observe(o,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["aria-controls","aria-expanded"]})}),this.portalContainers.forEach(o=>{this.observePortalContainer(o)}))}),ht(this,"getInitialFocusNode",()=>{let r=this.getNodeForOption("initialFocus",{hasFallback:!0});if(r===!1)return!1;if(r===void 0||r&&!dr(r)){const o=Io(this.doc);if(o&&this.findContainerIndex(o)>=0)r=o;else{const a=this.state.tabbableGroups[0];r=a&&a.firstTabbableNode||this.getNodeForOption("fallbackFocus")}}else r===null&&(r=this.getNodeForOption("fallbackFocus"));if(!r)throw new Error("Your focus-trap needs to have at least one focusable element");return r.isConnected||(r=this.getNodeForOption("fallbackFocus")),r}),ht(this,"tryFocus",r=>{if(r!==!1&&r!==Io(this.doc)){if(!r||!r.focus){this.tryFocus(this.getInitialFocusNode());return}r.focus({preventScroll:!!this.config.preventScroll}),this.state.mostRecentlyFocusedNode=r,u6(r)&&r.select()}}),ht(this,"deactivate",r=>{if(!this.state.active)return this;const o=U({onDeactivate:this.config.onDeactivate,onPostDeactivate:this.config.onPostDeactivate,checkCanReturnFocus:this.config.checkCanReturnFocus},r);clearTimeout(this.state.delayInitialFocusTimer),this.state.delayInitialFocusTimer=void 0,this.removeListeners(),this.state.active=!1,this.state.paused=!1,this.updateObservedNodes(),by.deactivateTrap(this.trapStack,this),this.portalContainers.clear();const a=this.getOption(o,"onDeactivate"),u=this.getOption(o,"onPostDeactivate"),c=this.getOption(o,"checkCanReturnFocus"),d=this.getOption(o,"returnFocus","returnFocusOnDeactivate");a==null||a();const h=()=>{xy(()=>{if(d){const m=this.getReturnFocusNode(this.state.nodeFocusedBeforeActivation);this.tryFocus(m)}u==null||u()})};if(d&&c){const m=this.getReturnFocusNode(this.state.nodeFocusedBeforeActivation);return c(m).then(h,h),this}return h(),this}),ht(this,"pause",r=>{if(this.state.paused||!this.state.active)return this;const o=this.getOption(r,"onPause"),a=this.getOption(r,"onPostPause");return this.state.paused=!0,o==null||o(),this.removeListeners(),this.updateObservedNodes(),a==null||a(),this}),ht(this,"unpause",r=>{if(!this.state.paused||!this.state.active)return this;const o=this.getOption(r,"onUnpause"),a=this.getOption(r,"onPostUnpause");return this.state.paused=!1,o==null||o(),this.updateTabbableNodes(),this.addListeners(),this.updateObservedNodes(),a==null||a(),this}),ht(this,"updateContainerElements",r=>(this.state.containers=Array.isArray(r)?r.filter(Boolean):[r].filter(Boolean),this.state.active&&this.updateTabbableNodes(),this.updateObservedNodes(),this)),ht(this,"getReturnFocusNode",r=>{const o=this.getNodeForOption("setReturnFocus",{params:[r]});return o||(o===!1?!1:r)}),ht(this,"getOption",(r,o,a)=>r&&r[o]!==void 0?r[o]:this.config[a||o]),ht(this,"getNodeForOption",(r,{hasFallback:o=!1,params:a=[]}={})=>{let u=this.config[r];if(typeof u=="function"&&(u=u(...a)),u===!0&&(u=void 0),!u){if(u===void 0||u===!1)return u;throw new Error(`\`${r}\` was specified but was not a node, or did not return a node`)}let c=u;if(typeof u=="string"){try{c=this.doc.querySelector(u)}catch(d){throw new Error(`\`${r}\` appears to be an invalid selector; error="${d.message}"`)}if(!c&&!o)throw new Error(`\`${r}\` as selector refers to no known node`)}return c}),ht(this,"findNextNavNode",r=>{const{event:o,isBackward:a=!1}=r,u=r.target||Gn(o);this.updateTabbableNodes();let c=null;if(this.state.tabbableGroups.length>0){const d=this.findContainerIndex(u,o),h=d>=0?this.state.containerGroups[d]:void 0;if(d<0)a?c=this.state.tabbableGroups[this.state.tabbableGroups.length-1].lastTabbableNode:c=this.state.tabbableGroups[0].firstTabbableNode;else if(a){let m=this.state.tabbableGroups.findIndex(({firstTabbableNode:E})=>u===E);if(m<0&&((h==null?void 0:h.container)===u||dr(u)&&!Bi(u)&&!(h!=null&&h.nextTabbableNode(u,!1)))&&(m=d),m>=0){const E=m===0?this.state.tabbableGroups.length-1:m-1,T=this.state.tabbableGroups[E];c=na(u)>=0?T.lastTabbableNode:T.lastDomTabbableNode}else la(o)||(c=h==null?void 0:h.nextTabbableNode(u,!1))}else{let m=this.state.tabbableGroups.findIndex(({lastTabbableNode:E})=>u===E);if(m<0&&((h==null?void 0:h.container)===u||dr(u)&&!Bi(u)&&!(h!=null&&h.nextTabbableNode(u)))&&(m=d),m>=0){const E=m===this.state.tabbableGroups.length-1?0:m+1,T=this.state.tabbableGroups[E];c=na(u)>=0?T.firstTabbableNode:T.firstDomTabbableNode}else la(o)||(c=h==null?void 0:h.nextTabbableNode(u))}}else c=this.getNodeForOption("fallbackFocus");return c}),this.trapStack=t.trapStack||o6;const n=U({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,followControlledElements:!0,isKeyForward(r){return la(r)&&!r.shiftKey},isKeyBackward(r){return la(r)&&r.shiftKey}},t);this.doc=n.document||cr(Array.isArray(e)?e[0]:e),this.config=n,this.updateContainerElements(e),this.setupMutationObserver()}addPortalContainer(e){const t=e.parentElement;t&&!this.portalContainers.has(t)&&(this.portalContainers.add(t),this.state.active&&!this.state.paused&&this.observePortalContainer(t))}observePortalContainer(e){var t;(t=this._mutationObserver)==null||t.observe(e,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["aria-controls","aria-expanded"]})}updatePortalContainers(){this.config.followControlledElements&&this.state.containers.forEach(e=>{xR(e).forEach(n=>{this.addPortalContainer(n)})})}get active(){return this.state.active}get paused(){return this.state.paused}findContainerIndex(e,t){const n=typeof(t==null?void 0:t.composedPath)=="function"?t.composedPath():void 0;return this.state.containerGroups.findIndex(({container:r,tabbableNodes:o})=>r.contains(e)||(n==null?void 0:n.includes(r))||o.find(a=>a===e)||this.isControlledElement(r,e))}isControlledElement(e,t){return this.config.followControlledElements?xE(e,t):!1}updateTabbableNodes(){if(this.state.containerGroups=this.state.containers.map(e=>{const t=Po(e,{getShadowRoot:this.config.getShadowRoot}),n=OE(e,{getShadowRoot:this.config.getShadowRoot}),r=t[0],o=t[t.length-1],a=r,u=o;let c=!1;for(let h=0;h<t.length;h++)if(na(t[h])>0){c=!0;break}function d(h,m=!0){const E=t.indexOf(h);if(E>=0)return t[E+(m?1:-1)];const T=n.indexOf(h);if(!(T<0)){if(m){for(let b=T+1;b<n.length;b++)if(Bi(n[b]))return n[b]}else for(let b=T-1;b>=0;b--)if(Bi(n[b]))return n[b]}}return{container:e,tabbableNodes:t,focusableNodes:n,posTabIndexesFound:c,firstTabbableNode:r,lastTabbableNode:o,firstDomTabbableNode:a,lastDomTabbableNode:u,nextTabbableNode:d}}),this.state.tabbableGroups=this.state.containerGroups.filter(e=>e.tabbableNodes.length>0),this.state.tabbableGroups.length<=0&&!this.getNodeForOption("fallbackFocus"))throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times");if(this.state.containerGroups.find(e=>e.posTabIndexesFound)&&this.state.containerGroups.length>1)throw new Error("At least one node with a positive tabindex was found in one of your focus-trap's multiple containers. Positive tabindexes are only supported in single-container focus-traps.")}addListeners(){if(this.state.active)return by.activateTrap(this.trapStack,this),this.state.delayInitialFocusTimer=this.config.delayInitialFocus?xy(()=>{this.tryFocus(this.getInitialFocusNode())}):this.tryFocus(this.getInitialFocusNode()),this.listenerCleanups.push(Mt(this.doc,"focusin",this.handleFocus,!0),Mt(this.doc,"mousedown",this.handlePointerDown,{capture:!0,passive:!1}),Mt(this.doc,"touchstart",this.handlePointerDown,{capture:!0,passive:!1}),Mt(this.doc,"click",this.handleClick,{capture:!0,passive:!1}),Mt(this.doc,"keydown",this.handleTabKey,{capture:!0,passive:!1}),Mt(this.doc,"keydown",this.handleEscapeKey)),this}removeListeners(){if(this.state.active)return this.listenerCleanups.forEach(e=>e()),this.listenerCleanups=[],this}activate(e){if(this.state.active)return this;const t=this.getOption(e,"onActivate"),n=this.getOption(e,"onPostActivate"),r=this.getOption(e,"checkCanFocusTrap");r||this.updateTabbableNodes(),this.state.active=!0,this.state.paused=!1,this.state.nodeFocusedBeforeActivation=Io(this.doc),t==null||t();const o=()=>{r&&this.updateTabbableNodes(),this.addListeners(),this.updateObservedNodes(),n==null||n()};return r?(r(this.state.containers.concat()).then(o,o),this):(o(),this)}},la=e=>e.key==="Tab",ca=(e,...t)=>typeof e=="function"?e(...t):e,a6=e=>!e.isComposing&&e.key==="Escape",xy=e=>setTimeout(e,0),u6=e=>e.localName==="input"&&"select"in e&&typeof e.select=="function";function _y(e,t={}){let n;const r=kt(()=>{const o=typeof e=="function"?e():e;if(o){n=new s6(o,ne(U({escapeDeactivates:!1,allowOutsideClick:!0,preventScroll:!0,returnFocusOnDeactivate:!0,delayInitialFocus:!1,fallbackFocus:o},t),{document:cr(o)}));try{n.activate()}catch(a){}}});return function(){n==null||n.deactivate(),r()}}var Wf="data-scroll-lock";function l6(e){const t=e.getBoundingClientRect().left;return Math.round(t)+e.scrollLeft?"paddingLeft":"paddingRight"}function wy(e){const t=Ro(e),n=t==null?void 0:t.scrollbarGutter;return n==="stable"||(n==null?void 0:n.startsWith("stable "))===!0}function Sy(e){var b;const t=e!=null?e:document,n=(b=t.defaultView)!=null?b:window,{documentElement:r,body:o}=t;if(o.hasAttribute(Wf))return;const u=wy(r)||wy(o),c=n.innerWidth-r.clientWidth;o.setAttribute(Wf,"");const d=()=>eP(r,"--scrollbar-width",`${c}px`),h=l6(r),m=()=>{const _={overflow:"hidden"};return!u&&c>0&&(_[h]=`${c}px`),Ju(o,_)},E=()=>{var z,D;const{scrollX:_,scrollY:w,visualViewport:A}=n,C=(z=A==null?void 0:A.offsetLeft)!=null?z:0,I=(D=A==null?void 0:A.offsetTop)!=null?D:0,R={position:"fixed",overflow:"hidden",top:`${-(w-Math.floor(I))}px`,left:`${-(_-Math.floor(C))}px`,right:"0"};!u&&c>0&&(R[h]=`${c}px`);const F=Ju(o,R);return()=>{F==null||F(),n.scrollTo({left:_,top:w,behavior:"instant"})}},T=[d(),Ku()?E():m()];return()=>{T.forEach(_=>_==null?void 0:_()),o.removeAttribute(Wf)}}var c6=Hi("popover").parts("arrow","arrowTip","anchor","trigger","indicator","positioner","content","title","description","closeTrigger"),gr=c6.build(),Ay=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.anchor)!=null?n:`popover:${e.id}:anchor`},vy=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.trigger)!=null?n:`popover:${e.id}:trigger`},qf=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.content)!=null?n:`popover:${e.id}:content`},Cy=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.positioner)!=null?n:`popover:${e.id}:popper`},d6=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.arrow)!=null?n:`popover:${e.id}:arrow`},Gf=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.title)!=null?n:`popover:${e.id}:title`},Kf=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.description)!=null?n:`popover:${e.id}:desc`},f6=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.closeTrigger)!=null?n:`popover:${e.id}:close`},ky=e=>e.getById(Ay(e)),$o=e=>e.getById(vy(e)),Vo=e=>e.getById(qf(e)),Ny=e=>e.getById(Cy(e)),h6=e=>e.getById(Gf(e)),p6=e=>e.getById(Kf(e));function m6(e,t){const{state:n,context:r,send:o,computed:a,prop:u,scope:c}=e,d=n.matches("open"),h=r.get("currentPlacement"),m=a("currentPortalled"),E=r.get("renderedElements"),T=ML(ne(U({},u("positioning")),{placement:h}));return{portalled:m,open:d,setOpen(b){n.matches("open")!==b&&o({type:b?"OPEN":"CLOSE"})},reposition(b={}){o({type:"POSITIONING.SET",options:b})},getArrowProps(){return t.element(ne(U({id:d6(c)},gr.arrow.attrs),{dir:u("dir"),style:T.arrow}))},getArrowTipProps(){return t.element(ne(U({},gr.arrowTip.attrs),{dir:u("dir"),style:T.arrowTip}))},getAnchorProps(){return t.element(ne(U({},gr.anchor.attrs),{dir:u("dir"),id:Ay(c)}))},getTriggerProps(){return t.button(ne(U({},gr.trigger.attrs),{dir:u("dir"),type:"button","data-placement":h,id:vy(c),"aria-haspopup":"dialog","aria-expanded":d,"data-state":d?"open":"closed","aria-controls":qf(c),onPointerDown(b){SE(b)&&IR()&&b.currentTarget.focus()},onClick(b){b.defaultPrevented||o({type:"TOGGLE"})},onBlur(b){o({type:"TRIGGER_BLUR",target:b.relatedTarget})}}))},getIndicatorProps(){return t.element(ne(U({},gr.indicator.attrs),{dir:u("dir"),"data-state":d?"open":"closed"}))},getPositionerProps(){return t.element(ne(U({id:Cy(c)},gr.positioner.attrs),{dir:u("dir"),style:T.floating}))},getContentProps(){return t.element(ne(U({},gr.content.attrs),{dir:u("dir"),id:qf(c),tabIndex:-1,role:"dialog","aria-modal":yE(u("modal")),hidden:!d,"data-state":d?"open":"closed","data-expanded":ko(d),"aria-labelledby":E.title?Gf(c):void 0,"aria-describedby":E.description?Kf(c):void 0,"data-placement":h}))},getTitleProps(){return t.element(ne(U({},gr.title.attrs),{id:Gf(c),dir:u("dir")}))},getDescriptionProps(){return t.element(ne(U({},gr.description.attrs),{id:Kf(c),dir:u("dir")}))},getCloseTriggerProps(){return t.button(ne(U({},gr.closeTrigger.attrs),{dir:u("dir"),id:f6(c),type:"button","aria-label":"close",onClick(b){b.defaultPrevented||(b.stopPropagation(),o({type:"CLOSE"}))}}))}}}var g6={props({props:e}){return ne(U({closeOnInteractOutside:!0,closeOnEscape:!0,autoFocus:!0,modal:!1,portalled:!0},e),{positioning:U({placement:"bottom"},e.positioning)})},initialState({prop:e}){return e("open")||e("defaultOpen")?"open":"closed"},context({bindable:e}){return{currentPlacement:e(()=>({defaultValue:void 0})),renderedElements:e(()=>({defaultValue:{title:!0,description:!0}}))}},computed:{currentPortalled:({prop:e})=>!!e("modal")||!!e("portalled")},watch({track:e,prop:t,action:n}){e([()=>t("open")],()=>{n(["toggleVisibility"])})},entry:["checkRenderedElements"],states:{closed:{on:{"CONTROLLED.OPEN":{target:"open",actions:["setInitialFocus"]},TOGGLE:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen","setInitialFocus"]}],OPEN:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen","setInitialFocus"]}]}},open:{effects:["trapFocus","preventScroll","hideContentBelow","trackPositioning","trackDismissableElement","proxyTabFocus"],on:{"CONTROLLED.CLOSE":{target:"closed",actions:["setFinalFocus"]},CLOSE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["invokeOnClose","setFinalFocus"]}],TOGGLE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["invokeOnClose"]}],"POSITIONING.SET":{actions:["reposition"]}}}},implementations:{guards:{isOpenControlled:({prop:e})=>e("open")!=null},effects:{trackPositioning({context:e,prop:t,scope:n}){var a;e.set("currentPlacement",t("positioning").placement);const r=(a=ky(n))!=null?a:$o(n);return uy(r,()=>Ny(n),ne(U({},t("positioning")),{defer:!0,onComplete(u){e.set("currentPlacement",u.placement)}}))},trackDismissableElement({send:e,prop:t,scope:n}){const r=()=>Vo(n);let o=!0;return Ty(r,{type:"popover",pointerBlocking:t("modal"),exclude:$o(n),defer:!0,onEscapeKeyDown(a){var u;(u=t("onEscapeKeyDown"))==null||u(a),!t("closeOnEscape")&&a.preventDefault()},onInteractOutside(a){var u;(u=t("onInteractOutside"))==null||u(a),!a.defaultPrevented&&(o=!(a.detail.focusable||a.detail.contextmenu),t("closeOnInteractOutside")||a.preventDefault())},onPointerDownOutside:t("onPointerDownOutside"),onFocusOutside:t("onFocusOutside"),persistentElements:t("persistentElements"),onRequestDismiss:t("onRequestDismiss"),onDismiss(){e({type:"CLOSE",src:"interact-outside",restoreFocus:o})}})},proxyTabFocus({prop:e,scope:t}){return e("modal")||!e("portalled")?void 0:JR(()=>Vo(t),{triggerElement:$o(t),defer:!0,getShadowRoot:!0,onFocus(r){r.focus({preventScroll:!0})}})},hideContentBelow({prop:e,scope:t}){return e("modal")?cy(()=>[Vo(t),$o(t)],{defer:!0}):void 0},preventScroll({prop:e,scope:t}){if(e("modal"))return Sy(t.getDoc())},trapFocus({prop:e,scope:t}){return e("modal")?_y(()=>Vo(t),{initialFocus:()=>IE({root:Vo(t),getInitialEl:e("initialFocusEl"),enabled:e("autoFocus")}),getShadowRoot:!0}):void 0}},actions:{reposition({event:e,prop:t,scope:n,context:r}){var u;const o=(u=ky(n))!=null?u:$o(n);uy(o,()=>Ny(n),ne(U(U({},t("positioning")),e.options),{defer:!0,listeners:!1,onComplete(c){r.set("currentPlacement",c.placement)}}))},checkRenderedElements({context:e,scope:t}){kt(()=>{Object.assign(e.get("renderedElements"),{title:!!h6(t),description:!!p6(t)})})},setInitialFocus({prop:e,scope:t}){e("modal")||kt(()=>{const n=IE({root:Vo(t),getInitialEl:e("initialFocusEl"),enabled:e("autoFocus")});n==null||n.focus({preventScroll:!0})})},setFinalFocus({event:e,scope:t}){var r,o;const n=(o=e.restoreFocus)!=null?o:(r=e.previousEvent)==null?void 0:r.restoreFocus;n!=null&&!n||kt(()=>{const a=$o(t);a==null||a.focus({preventScroll:!0})})},invokeOnOpen({prop:e,flush:t}){t(()=>{var n;(n=e("onOpenChange"))==null||n({open:!0})})},invokeOnClose({prop:e,flush:t}){t(()=>{var n;(n=e("onOpenChange"))==null||n({open:!1})})},toggleVisibility({event:e,send:t,prop:n}){t({type:n("open")?"CONTROLLED.OPEN":"CONTROLLED.CLOSE",previousEvent:e})}}}};Mo()(["autoFocus","closeOnEscape","closeOnInteractOutside","dir","getRootNode","id","ids","initialFocusEl","modal","onEscapeKeyDown","onFocusOutside","onInteractOutside","onOpenChange","onPointerDownOutside","onRequestDismiss","defaultOpen","open","persistentElements","portalled","positioning"]);const[_F,hl]=Ui({name:"EnvironmentContext",hookName:"useEnvironmentContext",providerName:"<EnvironmentProvider />",strict:!1,defaultValue:{getRootNode:()=>document,getDocument:()=>document,getWindow:()=>window}}),[wF,Qf]=Ui({name:"LocaleContext",hookName:"useLocaleContext",providerName:"<LocaleProvider />",strict:!1,defaultValue:{dir:"ltr",locale:"en-US"}}),E6=e=>{const t=Z.useId(),{getRootNode:n}=hl(),{dir:r}=Qf(),o=U({id:t,dir:r,getRootNode:n},e),a=el(g6,o);return m6(a,Of)},y6=e=>{const[t,u]=HE(e),c=u,{children:n}=c,r=on(c,["children"]),o=E6(r),a=Pf(Nt({present:o.open},t));return P.jsx(hP,{value:o,children:P.jsx(FE,{value:a,children:n})})},Oy=Z.forwardRef((e,t)=>{const n=Rf(),r=ra(),o=Nt(ne(U({},n.getTriggerProps()),{"aria-controls":r.unmounted?void 0:n.getTriggerProps()["aria-controls"]}),e);return P.jsx(Kt.button,ne(U({},o),{ref:t}))});Oy.displayName="PopoverTrigger";function T6(e){return ln({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{fillRule:"evenodd",d:"M11.854 3.646a.5.5 0 0 1 0 .708L8.207 8l3.647 3.646a.5.5 0 0 1-.708.708l-4-4a.5.5 0 0 1 0-.708l4-4a.5.5 0 0 1 .708 0M4.5 1a.5.5 0 0 0-.5.5v13a.5.5 0 0 0 1 0v-13a.5.5 0 0 0-.5-.5"},child:[]}]})(e)}function b6(e){return ln({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{fillRule:"evenodd",d:"M4.146 3.646a.5.5 0 0 0 0 .708L7.793 8l-3.647 3.646a.5.5 0 0 0 .708.708l4-4a.5.5 0 0 0 0-.708l-4-4a.5.5 0 0 0-.708 0M11.5 1a.5.5 0 0 1 .5.5v13a.5.5 0 0 1-1 0v-13a.5.5 0 0 1 .5-.5"},child:[]}]})(e)}function x6(e){return ln({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{fillRule:"evenodd",d:"M11.354 1.646a.5.5 0 0 1 0 .708L5.707 8l5.647 5.646a.5.5 0 0 1-.708.708l-6-6a.5.5 0 0 1 0-.708l6-6a.5.5 0 0 1 .708 0"},child:[]}]})(e)}function _6(e){return ln({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{fillRule:"evenodd",d:"M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708"},child:[]}]})(e)}function Iy(e){return ln({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M9.5 13a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0m0-5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0m0-5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0"},child:[]}]})(e)}const w6=({className:e,componentType:t,children:n})=>{const[r,o]=Z.useState(!1),{globalClassName:a}=Ht(),u=h=>{o(h.open)},c=Z.useCallback(()=>{o(!1)},[]),d=Z.useMemo(()=>({closeMenu:c}),[c]);return P.jsxs(y6,{open:r,onOpenChange:u,positioning:{placement:"bottom-end"},children:[P.jsx(Oy,{"aria-label":`Overflow menu for ${t}`,className:re(`${J}-overflow-menu-button-trigger`,`${J}-icon-button`,a,e,`cim-${t}-component`),children:P.jsx(Iy,{})}),P.jsx(UE,{children:P.jsx(BE,{className:re(`${J}-overflow-menu-list`,a,`cim-${t}-component`),children:P.jsx(dE.Provider,{value:d,children:n})})})]})};function Ry(e){return ln({attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M15 4.00008H13V11.0001H20V9.00008H16.4142L20.7071 4.70718L19.2929 3.29297L15 7.58586V4.00008ZM4.00008 15H7.58586L3.29297 19.2929L4.70718 20.7071L9.00008 16.4142V20H11.0001V13H4.00008V15Z"},child:[]}]})(e)}function Py(e){return ln({attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M17.5858 5H14V3H21V10H19V6.41421L14.7071 10.7071L13.2929 9.29289L17.5858 5ZM3 14H5V17.5858L9.29289 13.2929L10.7071 14.7071L6.41421 19H10V21H3V14Z"},child:[]}]})(e)}const[S6,ji]=Ui({name:"CarouselContext",hookName:"useCarouselContext",providerName:"<CarouselProvider />"}),Ly=Z.forwardRef((e,t)=>{const n=ji(),r=Nt(n.getControlProps(),e);return P.jsx(Kt.div,ne(U(U({},r),e),{ref:t}))});Ly.displayName="CarouselControl";const Dy=Z.forwardRef((e,t)=>{const[n,r]=ia()(e,["readOnly","index"]),o=ji(),a=Nt(o.getIndicatorProps(n),r);return P.jsx(Kt.button,ne(U({},a),{ref:t}))});Dy.displayName="CarouselIndicator";const My=Z.forwardRef((e,t)=>{const n=ji(),r=Nt(n.getIndicatorGroupProps(),e);return P.jsx(Kt.div,ne(U({},r),{ref:t}))});My.displayName="CarouselIndicatorGroup";const Fy=Z.forwardRef((e,t)=>{const[n,r]=ia()(e,["index","snapAlign"]),o=ji(),a=Nt(o.getItemProps(n),r);return P.jsx(Kt.div,ne(U({},a),{ref:t}))});Fy.displayName="CarouselItem";const By=Z.forwardRef((e,t)=>{const n=ji(),r=Nt(n.getItemGroupProps(),e);return P.jsx(Kt.div,ne(U({},r),{ref:t}))});By.displayName="CarouselItemGroup";const Uy=Z.forwardRef((e,t)=>{const n=ji(),r=Nt(n.getNextTriggerProps(),e);return P.jsx(Kt.button,ne(U({},r),{ref:t}))});Uy.displayName="CarouselNextTrigger";const Hy=Z.forwardRef((e,t)=>{const n=ji(),r=Nt(n.getPrevTriggerProps(),e);return P.jsx(Kt.button,ne(U({},r),{ref:t}))});Hy.displayName="CarouselPrevTrigger";function A6(e){const t=Ro(e),n=e.getBoundingClientRect();let r=t.getPropertyValue("scroll-padding-left").replace("auto","0px"),o=t.getPropertyValue("scroll-padding-top").replace("auto","0px"),a=t.getPropertyValue("scroll-padding-right").replace("auto","0px"),u=t.getPropertyValue("scroll-padding-bottom").replace("auto","0px");function c(T,b){let _=parseFloat(T);return/%/.test(T)&&(_/=100,_*=b),Number.isNaN(_)?0:_}let d=c(r,n.width),h=c(o,n.height),m=c(a,n.width),E=c(u,n.height);return{x:{before:d,after:m},y:{before:h,after:E}}}function v6(e,t,n="both"){return n==="x"&&e.right>=t.left&&e.left<=t.right||n==="y"&&e.bottom>=t.top&&e.top<=t.bottom||n==="both"&&e.right>=t.left&&e.left<=t.right&&e.bottom>=t.top&&e.top<=t.bottom}function zy(e){let t=[];for(const n of e.children)t=t.concat(n,zy(n));return t}function jy(e,t=!1){const n=e.getBoundingClientRect(),r={x:{start:[],center:[],end:[]},y:{start:[],center:[],end:[]}},o=t?zy(e):e.children;for(const a of["x","y"]){const u=a==="x"?"y":"x",c=a==="x"?"left":"top",d=a==="x"?"width":"height",h=a==="x"?"scrollLeft":"scrollTop";for(const m of o){const E=m.getBoundingClientRect();if(!v6(n,E,u))continue;const T=Ro(m);let[b,_]=T.getPropertyValue("scroll-snap-align").split(" ");typeof _=="undefined"&&(_=b);const w=a==="x"?_:b,A=E[c]-n[c]+e[h];switch(w){case"none":break;case"start":r[a].start.push({node:m,position:A});break;case"center":r[a].center.push({node:m,position:A+E[d]/2});break;case"end":r[a].end.push({node:m,position:A+E[d]});break}}}return r}function $y(e){const t=e.getBoundingClientRect(),n=A6(e),r=jy(e),o={x:e.scrollWidth-e.offsetWidth,y:e.scrollHeight-e.offsetHeight};return{x:Vy([...r.x.start.map(a=>a.position-n.x.before),...r.x.center.map(a=>a.position-t.width/2),...r.x.end.map(a=>a.position-t.width+n.x.after)].map(Yy(0,o.x))),y:Vy([...r.y.start.map(a=>a.position-n.y.before),...r.y.center.map(a=>a.position-t.height/2),...r.y.end.map(a=>a.position-t.height+n.y.after)].map(Yy(0,o.y)))}}function C6(e,t,n){const r=jy(e),o=[...r[t].start,...r[t].center,...r[t].end];for(const a of o)if(n(a.node))return a.position}var Vy=e=>[...new Set(e)],Yy=(e,t)=>n=>Math.max(e,Math.min(t,n)),k6=Hi("carousel").parts("root","itemGroup","item","control","nextTrigger","prevTrigger","indicatorGroup","indicator","autoplayTrigger"),Nr=k6.build(),N6=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.root)!=null?n:`carousel:${e.id}`},O6=(e,t)=>{var n,r,o;return(o=(r=(n=e.ids)==null?void 0:n.item)==null?void 0:r.call(n,t))!=null?o:`carousel:${e.id}:item:${t}`},pl=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.itemGroup)!=null?n:`carousel:${e.id}:item-group`},I6=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.nextTrigger)!=null?n:`carousel:${e.id}:next-trigger`},R6=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.prevTrigger)!=null?n:`carousel:${e.id}:prev-trigger`},P6=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.indicatorGroup)!=null?n:`carousel:${e.id}:indicator-group`},Wy=(e,t)=>{var n,r,o;return(o=(r=(n=e.ids)==null?void 0:n.indicator)==null?void 0:r.call(n,t))!=null?o:`carousel:${e.id}:indicator:${t}`},hn=e=>e.getById(pl(e)),qy=e=>ZR(hn(e),"[data-part=item]"),L6=(e,t)=>e.getById(Wy(e,t)),Gy=e=>{const t=hn(e);if(!t)return;const n=Po(t);t.setAttribute("tabindex",n.length>0?"-1":"0")};function D6(e,t){const{state:n,context:r,computed:o,send:a,scope:u,prop:c}=e,d=n.matches("autoplay"),h=n.matches("dragging"),m=o("canScrollNext"),E=o("canScrollPrev"),T=o("isHorizontal"),b=Array.from(r.get("pageSnapPoints")),_=r.get("page"),w=c("slidesPerPage"),A=c("padding"),C=c("translations");return{isPlaying:d,isDragging:h,page:_,pageSnapPoints:b,canScrollNext:m,canScrollPrev:E,getProgress(){return _/b.length},scrollToIndex(I,R){a({type:"INDEX.SET",index:I,instant:R})},scrollTo(I,R){a({type:"PAGE.SET",index:I,instant:R})},scrollNext(I){a({type:"PAGE.NEXT",instant:I})},scrollPrev(I){a({type:"PAGE.PREV",instant:I})},play(){a({type:"AUTOPLAY.START"})},pause(){a({type:"AUTOPLAY.PAUSE"})},isInView(I){return Array.from(r.get("slidesInView")).includes(I)},refresh(){a({type:"SNAP.REFRESH"})},getRootProps(){return t.element(ne(U({},Nr.root.attrs),{id:N6(u),role:"region","aria-roledescription":"carousel","data-orientation":c("orientation"),dir:c("dir"),style:{"--slides-per-page":w,"--slide-spacing":c("spacing"),"--slide-item-size":"calc(100% / var(--slides-per-page) - var(--slide-spacing) * (var(--slides-per-page) - 1) / var(--slides-per-page))"}}))},getItemGroupProps(){return t.element(ne(U({},Nr.itemGroup.attrs),{id:pl(u),"data-orientation":c("orientation"),"data-dragging":ko(h),dir:c("dir"),"aria-live":d?"off":"polite",onFocus(I){No(I.currentTarget,Gn(I))&&a({type:"VIEWPORT.FOCUS"})},onBlur(I){No(I.currentTarget,I.relatedTarget)||a({type:"VIEWPORT.BLUR"})},onMouseDown(I){if(I.defaultPrevented||!c("allowMouseDrag")||!SE(I))return;const R=Gn(I);dr(R)&&R!==I.currentTarget||(I.preventDefault(),a({type:"DRAGGING.START"}))},onWheel:ZI(I=>{const R=c("orientation")==="horizontal"?"deltaX":"deltaY";I[R]<0&&!o("canScrollPrev")||I[R]>0&&!o("canScrollNext")||a({type:"USER.SCROLL"})},150),onTouchStart(){a({type:"USER.SCROLL"})},style:{display:"grid",gap:"var(--slide-spacing)",scrollSnapType:[T?"x":"y",c("snapType")].join(" "),gridAutoFlow:T?"column":"row",scrollbarWidth:"none",overscrollBehaviorX:"contain",[T?"gridAutoColumns":"gridAutoRows"]:"var(--slide-item-size)",[T?"scrollPaddingInline":"scrollPaddingBlock"]:A,[T?"paddingInline":"paddingBlock"]:A,[T?"overflowX":"overflowY"]:"auto"}}))},getItemProps(I){const R=r.get("slidesInView").includes(I.index);return t.element(ne(U({},Nr.item.attrs),{id:O6(u,I.index),dir:c("dir"),role:"group","data-index":I.index,"data-inview":ko(R),"aria-roledescription":"slide","data-orientation":c("orientation"),"aria-label":C.item(I.index,c("slideCount")),"aria-hidden":yE(!R),style:{scrollSnapAlign:(()=>{var ce;const F=(ce=I.snapAlign)!=null?ce:"start",z=c("slidesPerMove"),D=z==="auto"?Math.floor(c("slidesPerPage")):z;return(I.index+D)%D===0?F:void 0})()}}))},getControlProps(){return t.element(ne(U({},Nr.control.attrs),{"data-orientation":c("orientation")}))},getPrevTriggerProps(){return t.button(ne(U({},Nr.prevTrigger.attrs),{id:R6(u),type:"button",disabled:!E,dir:c("dir"),"aria-label":C.prevTrigger,"data-orientation":c("orientation"),"aria-controls":pl(u),onClick(I){I.defaultPrevented||a({type:"PAGE.PREV",src:"trigger"})}}))},getNextTriggerProps(){return t.button(ne(U({},Nr.nextTrigger.attrs),{dir:c("dir"),id:I6(u),type:"button","aria-label":C.nextTrigger,"data-orientation":c("orientation"),"aria-controls":pl(u),disabled:!m,onClick(I){I.defaultPrevented||a({type:"PAGE.NEXT",src:"trigger"})}}))},getIndicatorGroupProps(){return t.element(ne(U({},Nr.indicatorGroup.attrs),{dir:c("dir"),id:P6(u),"data-orientation":c("orientation"),onKeyDown(I){if(I.defaultPrevented)return;const R="indicator",F={ArrowDown(q){T||(a({type:"PAGE.NEXT",src:R}),q.preventDefault())},ArrowUp(q){T||(a({type:"PAGE.PREV",src:R}),q.preventDefault())},ArrowRight(q){T&&(a({type:"PAGE.NEXT",src:R}),q.preventDefault())},ArrowLeft(q){T&&(a({type:"PAGE.PREV",src:R}),q.preventDefault())},Home(q){a({type:"PAGE.SET",index:0,src:R}),q.preventDefault()},End(q){a({type:"PAGE.SET",index:b.length-1,src:R}),q.preventDefault()}},z=MR(I,{dir:c("dir"),orientation:c("orientation")}),D=F[z];D==null||D(I)}}))},getIndicatorProps(I){return t.button(ne(U({},Nr.indicator.attrs),{dir:c("dir"),id:Wy(u,I.index),type:"button","data-orientation":c("orientation"),"data-index":I.index,"data-readonly":ko(I.readOnly),"data-current":ko(I.index===_),"aria-label":C.indicator(I.index),onClick(R){R.defaultPrevented||I.readOnly||a({type:"PAGE.SET",index:I.index,src:"indicator"})}}))},getAutoplayTriggerProps(){return t.button(ne(U({},Nr.autoplayTrigger.attrs),{type:"button","data-orientation":c("orientation"),"data-pressed":ko(d),"aria-label":d?C.autoplayStop:C.autoplayStart,onClick(I){I.defaultPrevented||a({type:d?"AUTOPLAY.PAUSE":"AUTOPLAY.START"})}}))}}}var M6={props({props:e}){return oR(e,["slideCount"],"carousel"),ne(U({dir:"ltr",defaultPage:0,orientation:"horizontal",snapType:"mandatory",loop:!!e.autoplay,slidesPerPage:1,slidesPerMove:"auto",spacing:"0px",autoplay:!1,allowMouseDrag:!1,inViewThreshold:.6},e),{translations:U({nextTrigger:"Next slide",prevTrigger:"Previous slide",indicator:t=>`Go to slide ${t+1}`,item:(t,n)=>`${t+1} of ${n}`,autoplayStart:"Start slide rotation",autoplayStop:"Stop slide rotation"},e.translations)})},refs(){return{timeoutRef:void 0}},initialState({prop:e}){return e("autoplay")?"autoplay":"idle"},context({prop:e,bindable:t,getContext:n}){return{page:t(()=>({defaultValue:e("defaultPage"),value:e("page"),onChange(r){var u;const a=n().get("pageSnapPoints");(u=e("onPageChange"))==null||u({page:r,pageSnapPoint:a[r]})}})),pageSnapPoints:t(()=>({defaultValue:F6(e("slideCount"),e("slidesPerMove"),e("slidesPerPage"))})),slidesInView:t(()=>({defaultValue:[]}))}},computed:{isRtl:({prop:e})=>e("dir")==="rtl",isHorizontal:({prop:e})=>e("orientation")==="horizontal",canScrollNext:({prop:e,context:t})=>e("loop")||t.get("page")<t.get("pageSnapPoints").length-1,canScrollPrev:({prop:e,context:t})=>e("loop")||t.get("page")>0,autoplayInterval:({prop:e})=>{const t=e("autoplay");return jI(t)?t.delay:4e3}},watch({track:e,action:t,context:n,prop:r,send:o}){e([()=>r("slidesPerPage"),()=>r("slidesPerMove")],()=>{t(["setSnapPoints"])}),e([()=>n.get("page")],()=>{t(["scrollToPage","focusIndicatorEl"])}),e([()=>r("orientation")],()=>{t(["setSnapPoints","scrollToPage"])}),e([()=>r("slideCount")],()=>{o({type:"SNAP.REFRESH",src:"slide.count"})}),e([()=>!!r("autoplay")],()=>{o({type:r("autoplay")?"AUTOPLAY.START":"AUTOPLAY.PAUSE",src:"autoplay.prop.change"})})},on:{"PAGE.NEXT":{target:"idle",actions:["clearScrollEndTimer","setNextPage"]},"PAGE.PREV":{target:"idle",actions:["clearScrollEndTimer","setPrevPage"]},"PAGE.SET":{target:"idle",actions:["clearScrollEndTimer","setPage"]},"INDEX.SET":{target:"idle",actions:["clearScrollEndTimer","setMatchingPage"]},"SNAP.REFRESH":{actions:["setSnapPoints","clampPage"]},"PAGE.SCROLL":{actions:["scrollToPage"]}},effects:["trackSlideMutation","trackSlideIntersections","trackSlideResize"],entry:["setSnapPoints","setPage"],exit:["clearScrollEndTimer"],states:{idle:{on:{"DRAGGING.START":{target:"dragging",actions:["invokeDragStart"]},"AUTOPLAY.START":{target:"autoplay",actions:["invokeAutoplayStart"]},"USER.SCROLL":{target:"userScroll"},"VIEWPORT.FOCUS":{target:"focus"}}},focus:{effects:["trackKeyboardScroll"],on:{"VIEWPORT.BLUR":{target:"idle"},"PAGE.NEXT":{actions:["clearScrollEndTimer","setNextPage"]},"PAGE.PREV":{actions:["clearScrollEndTimer","setPrevPage"]},"PAGE.SET":{actions:["clearScrollEndTimer","setPage"]},"INDEX.SET":{actions:["clearScrollEndTimer","setMatchingPage"]},"USER.SCROLL":{target:"userScroll"}}},dragging:{effects:["trackPointerMove"],entry:["disableScrollSnap"],on:{DRAGGING:{actions:["scrollSlides","invokeDragging"]},"DRAGGING.END":{target:"idle",actions:["endDragging","invokeDraggingEnd"]}}},userScroll:{effects:["trackScroll"],on:{"SCROLL.END":[{guard:"isFocused",target:"focus",actions:["setClosestPage"]},{target:"idle",actions:["setClosestPage"]}]}},autoplay:{effects:["trackDocumentVisibility","trackScroll","autoUpdateSlide"],exit:["invokeAutoplayEnd"],on:{"AUTOPLAY.TICK":{actions:["setNextPage","invokeAutoplay"]},"DRAGGING.START":{target:"dragging",actions:["invokeDragStart"]},"AUTOPLAY.PAUSE":{target:"idle"}}}},implementations:{guards:{isFocused:({scope:e})=>e.isActiveElement(hn(e))},effects:{autoUpdateSlide({computed:e,send:t}){const n=setInterval(()=>{t({type:e("canScrollNext")?"AUTOPLAY.TICK":"AUTOPLAY.PAUSE",src:"autoplay.interval"})},e("autoplayInterval"));return()=>clearInterval(n)},trackSlideMutation({scope:e,send:t}){const n=hn(e);if(!n)return;const r=e.getWin(),o=new r.MutationObserver(()=>{t({type:"SNAP.REFRESH",src:"slide.mutation"}),Gy(e)});return Gy(e),o.observe(n,{childList:!0,subtree:!0}),()=>o.disconnect()},trackSlideResize({scope:e,send:t}){if(!hn(e))return;const r=e.getWin(),o=()=>{t({type:"SNAP.REFRESH",src:"slide.resize"})};kt(()=>{o(),kt(()=>{t({type:"PAGE.SCROLL",instant:!0})})});const a=new r.ResizeObserver(o);return qy(e).forEach(u=>a.observe(u)),()=>a.disconnect()},trackSlideIntersections({scope:e,prop:t,context:n}){const r=hn(e),o=e.getWin(),a=new o.IntersectionObserver(u=>{const c=u.reduce((d,h)=>{var T;const m=h.target,E=Number((T=m.dataset.index)!=null?T:"-1");return E==null||Number.isNaN(E)||E===-1?d:h.isIntersecting?FI(d,E):BI(d,E)},n.get("slidesInView"));n.set("slidesInView",UI(c))},{root:r,threshold:t("inViewThreshold")});return qy(e).forEach(u=>a.observe(u)),()=>a.disconnect()},trackScroll({send:e,refs:t,scope:n}){const r=hn(n);return r?Mt(r,"scroll",()=>{clearTimeout(t.get("timeoutRef")),t.set("timeoutRef",void 0),t.set("timeoutRef",setTimeout(()=>{e({type:"SCROLL.END"})},150))},{passive:!0}):void 0},trackDocumentVisibility({scope:e,send:t}){const n=e.getDoc();return Mt(n,"visibilitychange",()=>{n.visibilityState!=="visible"&&t({type:"AUTOPLAY.PAUSE",src:"doc.hidden"})})},trackPointerMove({scope:e,send:t}){const n=e.getDoc();return QR(n,{onPointerMove({event:r}){t({type:"DRAGGING",left:-r.movementX,top:-r.movementY})},onPointerUp(){t({type:"DRAGGING.END"})}})},trackKeyboardScroll({scope:e,send:t,context:n}){const r=e.getWin();return Mt(r,"keydown",a=>{switch(a.key){case"ArrowRight":a.preventDefault(),t({type:"PAGE.NEXT"});break;case"ArrowLeft":a.preventDefault(),t({type:"PAGE.PREV"});break;case"Home":a.preventDefault(),t({type:"PAGE.SET",index:0});break;case"End":a.preventDefault(),t({type:"PAGE.SET",index:n.get("pageSnapPoints").length-1})}},{capture:!0})}},actions:{clearScrollEndTimer({refs:e}){e.get("timeoutRef")!=null&&(clearTimeout(e.get("timeoutRef")),e.set("timeoutRef",void 0))},scrollToPage({context:e,event:t,scope:n,computed:r,flush:o}){var h;const a=t.instant?"instant":"smooth",u=gE((h=t.index)!=null?h:e.get("page"),0,e.get("pageSnapPoints").length-1),c=hn(n);if(!c)return;const d=r("isHorizontal")?"left":"top";o(()=>{c.scrollTo({[d]:e.get("pageSnapPoints")[u],behavior:a})})},setClosestPage({context:e,scope:t,computed:n}){const r=hn(t);if(!r)return;const o=n("isHorizontal")?r.scrollLeft:r.scrollTop,a=e.get("pageSnapPoints").findIndex(u=>Math.abs(u-o)<1);a!==-1&&e.set("page",a)},setNextPage({context:e,prop:t,state:n}){const r=n.matches("autoplay")||t("loop"),o=hE(e.get("pageSnapPoints"),e.get("page"),{loop:r});e.set("page",o)},setPrevPage({context:e,prop:t,state:n}){const r=n.matches("autoplay")||t("loop"),o=HI(e.get("pageSnapPoints"),e.get("page"),{loop:r});e.set("page",o)},setMatchingPage({context:e,event:t,computed:n,scope:r}){const o=hn(r);if(!o)return;const a=C6(o,n("isHorizontal")?"x":"y",c=>c.dataset.index===t.index.toString());if(a==null)return;const u=e.get("pageSnapPoints").findIndex(c=>Math.abs(c-a)<1);e.set("page",u)},setPage({context:e,event:t}){var r;const n=(r=t.index)!=null?r:e.get("page");e.set("page",n)},clampPage({context:e}){const t=gE(e.get("page"),0,e.get("pageSnapPoints").length-1);e.set("page",t)},setSnapPoints({context:e,computed:t,scope:n}){const r=hn(n);if(!r)return;const o=$y(r);e.set("pageSnapPoints",t("isHorizontal")?o.x:o.y)},disableScrollSnap({scope:e}){const t=hn(e);if(!t)return;const n=getComputedStyle(t);t.dataset.scrollSnapType=n.getPropertyValue("scroll-snap-type"),t.style.setProperty("scroll-snap-type","none")},scrollSlides({scope:e,event:t}){const n=hn(e);n==null||n.scrollBy({left:t.left,top:t.top,behavior:"instant"})},endDragging({scope:e,context:t,computed:n}){const r=hn(e);if(!r)return;const o=r.scrollLeft,a=r.scrollTop,u=$y(r),c=u.x.reduce((h,m)=>Math.abs(m-o)<Math.abs(h-o)?m:h,u.x[0]),d=u.y.reduce((h,m)=>Math.abs(m-a)<Math.abs(h-a)?m:h,u.y[0]);kt(()=>{r.scrollTo({left:c,top:d,behavior:"smooth"});const h=n("isHorizontal")?c:d;t.set("page",t.get("pageSnapPoints").indexOf(h));const m=r.dataset.scrollSnapType;m&&(r.style.setProperty("scroll-snap-type",m),delete r.dataset.scrollSnapType)})},focusIndicatorEl({context:e,event:t,scope:n}){if(t.src!=="indicator")return;const r=L6(n,e.get("page"));r&&kt(()=>r.focus({preventScroll:!0}))},invokeDragStart({context:e,prop:t}){var n;(n=t("onDragStatusChange"))==null||n({type:"dragging.start",isDragging:!0,page:e.get("page")})},invokeDragging({context:e,prop:t}){var n;(n=t("onDragStatusChange"))==null||n({type:"dragging",isDragging:!0,page:e.get("page")})},invokeDraggingEnd({context:e,prop:t}){var n;(n=t("onDragStatusChange"))==null||n({type:"dragging.end",isDragging:!1,page:e.get("page")})},invokeAutoplay({context:e,prop:t}){var n;(n=t("onAutoplayStatusChange"))==null||n({type:"autoplay",isPlaying:!0,page:e.get("page")})},invokeAutoplayStart({context:e,prop:t}){var n;(n=t("onAutoplayStatusChange"))==null||n({type:"autoplay.start",isPlaying:!0,page:e.get("page")})},invokeAutoplayEnd({context:e,prop:t}){var n;(n=t("onAutoplayStatusChange"))==null||n({type:"autoplay.stop",isPlaying:!1,page:e.get("page")})}}}};function F6(e,t,n){if(e==null||n<=0)return[];const r=[],o=t==="auto"?Math.floor(n):t;if(o<=0)return[];for(let a=0;a<e&&!(a+n>e);a+=o)r.push(a);return r}Mo()(["dir","getRootNode","id","ids","loop","page","defaultPage","onPageChange","orientation","slideCount","slidesPerPage","slidesPerMove","spacing","padding","autoplay","allowMouseDrag","inViewThreshold","translations","snapType","onDragStatusChange","onAutoplayStatusChange"]),Mo()(["index","readOnly"]),Mo()(["index","snapAlign"]);const B6=e=>{const t=Z.useId(),{getRootNode:n}=hl(),{dir:r}=Qf(),o=U({id:t,dir:r,getRootNode:n},e),a=el(M6,o);return D6(a,Of)},Ky=Z.forwardRef((e,t)=>{const[n,r]=ia()(e,["allowMouseDrag","autoplay","defaultPage","id","ids","inViewThreshold","loop","onAutoplayStatusChange","onDragStatusChange","onPageChange","orientation","padding","page","slideCount","slidesPerMove","slidesPerPage","snapType","spacing","translations"]),o=B6(n),a=Nt(o.getRootProps(),r);return P.jsx(S6,{value:o,children:P.jsx(Kt.div,ne(U({},a),{ref:t}))})});Ky.displayName="CarouselRoot";const U6=180,H6=e=>{const t=e.trim(),n=parseFloat(t);return Number.isNaN(n)?0:t.endsWith("rem")?n*16:n},z6=({globalClassName:e,className:t,itemMinWidth:n=U6,spacing:r="0.5rem",loop:o=!1,allowMouseDrag:a=!0,showIndicators:u=!0,showNavigation:c=!0,onPageChange:d,ariaLabel:h="Product carousel",children:m})=>{const E=Array.from(m),T=E.length,b=Z.useRef(null),[_,w]=Z.useState(0),{width:A}=IS();Z.useLayoutEffect(()=>{b.current&&w(b.current.getBoundingClientRect().width)},[A,T]);const C=H6(r),I=n+C,R=_>0?(_+C)/I:1,F=Math.max(1,Math.floor(R));if(T===0)return null;const z=T>F,D=Math.ceil(T/F),q=z?Math.max(1,R):F;return P.jsxs(Ky,{ref:b,className:re(e,t,`${J}-carousel`),slidesPerPage:q,slidesPerMove:F,spacing:r,loop:o,allowMouseDrag:a,slideCount:T,onPageChange:d,"aria-label":h,children:[P.jsx(By,{className:re(e,`${J}-carousel__item-group`,{"carousel-row-container":!z}),children:E.map((ce,be)=>P.jsx(Fy,{index:be,className:re(e,`${J}-carousel__item`),children:ce},be))}),c&&z&&P.jsxs(Ly,{className:re(e,`${J}-carousel__control`),children:[P.jsx(Hy,{className:re(e,`${J}-carousel__prev-trigger`),"aria-label":"Previous slide",children:P.jsx(x6,{})}),P.jsx(Uy,{className:re(e,`${J}-carousel__next-trigger`),"aria-label":"Next slide",children:P.jsx(_6,{})})]}),u&&z&&P.jsx(My,{className:re(e,`${J}-carousel__indicator-group`),children:Array.from({length:D},(ce,be)=>P.jsx(Dy,{index:be,className:re(e,`${J}-carousel__indicator`),"aria-label":`Go to slide group ${be+1}`},be))})]})},j6=({className:e,label:t="Close",onClick:n,disabled:r=!1})=>P.jsx("button",{"aria-label":t,title:t,className:re(e,`${J}-close-button`),disabled:r,onClick:n,children:P.jsx("svg",{role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 20",width:"16",height:"16",fill:"currentColor",children:P.jsx("path",{d:"M18.3 5.7a1 1 0 0 0-1.4-1.4L12 9.6 7.1 4.7a1 1 0 1 0-1.4 1.4l4.9 4.9-4.9 4.9a1 1 0 1 0 1.4 1.4l4.9-4.9 4.9 4.9a1 1 0 0 0 1.4-1.4l-4.9-4.9 4.9-4.9z"})})}),[$6,V6]=Ui({name:"RenderStrategyContext",hookName:"useRenderStrategyContext",providerName:"<RenderStrategyPropsProvider />"}),Y6=e=>ia()(e,["lazyMount","unmountOnExit"]),[W6,da]=Ui({name:"DialogContext",hookName:"useDialogContext",providerName:"<DialogProvider />"}),Qy=Z.forwardRef((e,t)=>{const n=da(),r=V6(),o=Pf(ne(U({},r),{present:n.open})),a=Nt(n.getBackdropProps(),o.getPresenceProps(),e);return o.unmounted?null:P.jsx(Kt.div,ne(U({},a),{ref:tl(o.ref,t)}))});Qy.displayName="DialogBackdrop";const Xf=Z.forwardRef((e,t)=>{const n=da(),r=ra(),o=Nt(n.getContentProps(),r.getPresenceProps(),e);return r.unmounted?null:P.jsx(Kt.div,ne(U({},o),{ref:tl(r.ref,t)}))});Xf.displayName="DialogContent";const Jf=Z.forwardRef((e,t)=>{const n=da(),r=Nt(n.getDescriptionProps(),e);return P.jsx(Kt.div,ne(U({},r),{ref:t}))});Jf.displayName="DialogDescription";const Zf=Z.forwardRef((e,t)=>{const n=da(),r=Nt(n.getPositionerProps(),e);return ra().unmounted?null:P.jsx(Kt.div,ne(U({},r),{ref:t}))});Zf.displayName="DialogPositioner";var q6=Hi("dialog").parts("trigger","backdrop","positioner","content","title","description","closeTrigger"),$i=q6.build(),Xy=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.positioner)!=null?n:`dialog:${e.id}:positioner`},Jy=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.backdrop)!=null?n:`dialog:${e.id}:backdrop`},eh=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.content)!=null?n:`dialog:${e.id}:content`},Zy=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.trigger)!=null?n:`dialog:${e.id}:trigger`},th=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.title)!=null?n:`dialog:${e.id}:title`},nh=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.description)!=null?n:`dialog:${e.id}:description`},eT=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.closeTrigger)!=null?n:`dialog:${e.id}:close`},ml=e=>e.getById(eh(e)),G6=e=>e.getById(Xy(e)),K6=e=>e.getById(Jy(e)),Q6=e=>e.getById(Zy(e)),X6=e=>e.getById(th(e)),J6=e=>e.getById(nh(e)),Z6=e=>e.getById(eT(e));function e4(e,t){const{state:n,send:r,context:o,prop:a,scope:u}=e,c=a("aria-label"),d=n.matches("open");return{open:d,setOpen(h){n.matches("open")!==h&&r({type:h?"OPEN":"CLOSE"})},getTriggerProps(){return t.button(ne(U({},$i.trigger.attrs),{dir:a("dir"),id:Zy(u),"aria-haspopup":"dialog",type:"button","aria-expanded":d,"data-state":d?"open":"closed","aria-controls":eh(u),onClick(h){h.defaultPrevented||r({type:"TOGGLE"})}}))},getBackdropProps(){return t.element(ne(U({},$i.backdrop.attrs),{dir:a("dir"),hidden:!d,id:Jy(u),"data-state":d?"open":"closed"}))},getPositionerProps(){return t.element(ne(U({},$i.positioner.attrs),{dir:a("dir"),id:Xy(u),style:{pointerEvents:d?void 0:"none"}}))},getContentProps(){const h=o.get("rendered");return t.element(ne(U({},$i.content.attrs),{dir:a("dir"),role:a("role"),hidden:!d,id:eh(u),tabIndex:-1,"data-state":d?"open":"closed","aria-modal":!0,"aria-label":c||void 0,"aria-labelledby":c||!h.title?void 0:th(u),"aria-describedby":h.description?nh(u):void 0}))},getTitleProps(){return t.element(ne(U({},$i.title.attrs),{dir:a("dir"),id:th(u)}))},getDescriptionProps(){return t.element(ne(U({},$i.description.attrs),{dir:a("dir"),id:nh(u)}))},getCloseTriggerProps(){return t.button(ne(U({},$i.closeTrigger.attrs),{dir:a("dir"),id:eT(u),type:"button",onClick(h){h.defaultPrevented||(h.stopPropagation(),r({type:"CLOSE"}))}}))}}}var t4={props({props:e,scope:t}){const n=e.role==="alertdialog",r=n?()=>Z6(t):void 0,o=typeof e.modal=="boolean"?e.modal:!0;return U({role:"dialog",modal:o,trapFocus:o,preventScroll:o,closeOnInteractOutside:!n,closeOnEscape:!0,restoreFocus:!0,initialFocusEl:r},e)},initialState({prop:e}){return e("open")||e("defaultOpen")?"open":"closed"},context({bindable:e}){return{rendered:e(()=>({defaultValue:{title:!0,description:!0}}))}},watch({track:e,action:t,prop:n}){e([()=>n("open")],()=>{t(["toggleVisibility"])})},states:{open:{entry:["checkRenderedElements","syncZIndex"],effects:["trackDismissableElement","trapFocus","preventScroll","hideContentBelow"],on:{"CONTROLLED.CLOSE":{target:"closed"},CLOSE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["invokeOnClose"]}],TOGGLE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["invokeOnClose"]}]}},closed:{on:{"CONTROLLED.OPEN":{target:"open"},OPEN:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen"]}],TOGGLE:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen"]}]}}},implementations:{guards:{isOpenControlled:({prop:e})=>e("open")!=null},effects:{trackDismissableElement({scope:e,send:t,prop:n}){return Ty(()=>ml(e),{type:"dialog",defer:!0,pointerBlocking:n("modal"),exclude:[Q6(e)],onInteractOutside(o){var a;(a=n("onInteractOutside"))==null||a(o),n("closeOnInteractOutside")||o.preventDefault()},persistentElements:n("persistentElements"),onFocusOutside:n("onFocusOutside"),onPointerDownOutside:n("onPointerDownOutside"),onRequestDismiss:n("onRequestDismiss"),onEscapeKeyDown(o){var a;(a=n("onEscapeKeyDown"))==null||a(o),n("closeOnEscape")||o.preventDefault()},onDismiss(){t({type:"CLOSE",src:"interact-outside"})}})},preventScroll({scope:e,prop:t}){if(t("preventScroll"))return Sy(e.getDoc())},trapFocus({scope:e,prop:t}){return t("trapFocus")?_y(()=>ml(e),{preventScroll:!0,returnFocusOnDeactivate:!!t("restoreFocus"),initialFocus:t("initialFocusEl"),setReturnFocus:r=>{var o,a;return(a=(o=t("finalFocusEl"))==null?void 0:o())!=null?a:r},getShadowRoot:!0}):void 0},hideContentBelow({scope:e,prop:t}){return t("modal")?cy(()=>[ml(e)],{defer:!0}):void 0}},actions:{checkRenderedElements({context:e,scope:t}){kt(()=>{e.set("rendered",{title:!!X6(t),description:!!J6(t)})})},syncZIndex({scope:e}){kt(()=>{const t=ml(e);if(!t)return;const n=Ro(t);[G6(e),K6(e)].forEach(o=>{o==null||o.style.setProperty("--z-index",n.zIndex),o==null||o.style.setProperty("--layer-index",n.getPropertyValue("--layer-index"))})})},invokeOnClose({prop:e}){var t;(t=e("onOpenChange"))==null||t({open:!1})},invokeOnOpen({prop:e}){var t;(t=e("onOpenChange"))==null||t({open:!0})},toggleVisibility({prop:e,send:t,event:n}){t({type:e("open")?"CONTROLLED.OPEN":"CONTROLLED.CLOSE",previousEvent:n})}}}};Mo()(["aria-label","closeOnEscape","closeOnInteractOutside","dir","finalFocusEl","getRootNode","getRootNode","id","id","ids","initialFocusEl","modal","onEscapeKeyDown","onFocusOutside","onInteractOutside","onOpenChange","onPointerDownOutside","onRequestDismiss","defaultOpen","open","persistentElements","preventScroll","restoreFocus","role","trapFocus"]);const n4=e=>{const t=Z.useId(),{getRootNode:n}=hl(),{dir:r}=Qf(),o=U({id:t,getRootNode:n,dir:r},e),a=el(t4,o);return e4(a,Of)},tT=e=>{const[t,c]=HE(e),d=c,{children:n}=d,r=on(d,["children"]),[o]=Y6(t),a=n4(r),u=Pf(Nt({present:a.open},t));return P.jsx(W6,{value:a,children:P.jsx($6,{value:o,children:P.jsx(FE,{value:u,children:n})})})},nT=Z.forwardRef((e,t)=>{const n=da(),r=Nt(n.getTitleProps(),e);return P.jsx(Kt.h2,ne(U({},r),{ref:t}))});nT.displayName="DialogTitle";const r4=({children:e})=>{const[t,n]=Z.useState(!1),r=Z.useMemo(()=>({toggleMenu:()=>n(a=>!a),closeMenu:()=>n(!1)}),[]),o=Z.useMemo(()=>({isOpen:t}),[t]);return P.jsx(gf.Provider,{value:r,children:P.jsx(cE.Provider,{value:o,children:e})})},rT=()=>Z.useContext(cE),iT=()=>{const e=Z.useContext(gf);if(!e)throw new Error("useOverflowMenuDispatch must be used within an OverflowMenuProvider");return e},i4=`${J}-overflow-menu-button-trigger`,o4=({componentType:e,children:t})=>{const{isOpen:n}=rT(),{closeMenu:r}=iT(),{globalClassName:o}=Ht(),a=Z.useRef(null);return Z.useEffect(()=>{if(!n)return;const u=d=>{d.key==="Escape"&&r()},c=d=>{const h=d.target;h instanceof Element&&h.closest(`.${i4}`)||a.current&&!a.current.contains(h)&&r()};return document.addEventListener("keydown",u),document.addEventListener("mousedown",c),()=>{document.removeEventListener("keydown",u),document.removeEventListener("mousedown",c)}},[n,r]),n?P.jsx("div",{ref:a,role:"menu","aria-label":`Overflow menu for ${e}`,className:re(`${J}-overflow-panel`,o,`cim-${e}-component`),children:t}):null},s4=({componentType:e,className:t})=>{const{toggleMenu:n}=iT(),{isOpen:r}=rT(),{globalClassName:o}=Ht();return P.jsx("button",{"aria-label":`Overflow menu for ${e}`,title:"More options","aria-expanded":r,"aria-haspopup":"menu",className:re(`${J}-overflow-menu-button-trigger`,`${J}-icon-button`,o,t,`cim-${e}-component`),onClick:n,children:P.jsx(Iy,{})})},a4=({componentType:e,isIcon:t})=>{const{globalClassName:n}=Ht(),{previousComponentType:r}=Ci(),o=ea(),a=()=>{Tu(r||"dialog"),o()};return t?P.jsx(jr,{className:re(n,`${J}-toggle-dialog-button`,`cim-${e}-component`),ariaLabel:"Collapse",title:"Collapse",onClick:a,icon:P.jsx(Ry,{})}):P.jsxs("button",{className:re(n,`${J}-overflow-menu-button`,`${J}-toggle-dialog-button`,`cim-${e}-component`),onClick:a,children:[P.jsx(Ry,{}),"Show ",r||"dialog"]})},u4=({componentType:e,isIcon:t})=>{const{globalClassName:n}=Ht(),{isModalFullscreen:r}=Ci(),o=ea(),a=()=>{dd(!r),o()},u=r?ZS:eA,c="Toggle Fullscreen";return t?P.jsx(jr,{ariaLabel:c,title:c,className:re(n,`${J}-modal-fullscreen-button`,`cim-${e}-component`),icon:P.jsx(u,{}),onClick:a}):P.jsxs("button",{className:re(n,`${J}-overflow-menu-button`,`${J}-modal-fullscreen-button`,`cim-${e}-component`),onClick:a,children:[P.jsx(u,{}),c]})},l4=({componentType:e,isIcon:t})=>{const{globalClassName:n}=Ht(),{dialogPosition:r}=Ci(),o=ea(),a=r==="bottom-left",u=()=>{fd(a?"bottom-right":"bottom-left"),o()},c=a?b6:T6,d=a?"Move right":"Move left";return t?P.jsx(jr,{className:re(n,`${J}-left-right-toggle-button`,`cim-${e}-component`),ariaLabel:d,title:d,onClick:u,icon:P.jsx(c,{})}):P.jsxs("button",{className:re(n,`${J}-overflow-menu-button`,`${J}-left-right-toggle-button`,`cim-${e}-component`),onClick:u,children:[P.jsx(c,{}),d]})},oT=({componentType:e,onClearChat:t,onClose:n})=>{const{headerConfig:r,globalClassName:o}=Ht(),{mode:a}=Ci(),u=a==="standalone",c=e==="modal",d=c?a4:sT,h=c?u4:l4,m=Z.useMemo(()=>r?XS(r):{},[r]);return P.jsx(r4,{children:P.jsxs("div",{className:re(o,`${J}-${e}-header-wrapper`),style:{display:"flex",flexDirection:"column",position:"relative"},children:[P.jsxs("div",{className:re(o,`${J}-${e}-header`,{standalone:u,embedded:!u}),style:m,children:[(r==null?void 0:r.logoUrl)&&P.jsx("img",{alt:"",role:"img",className:re(o,`${J}-${e}-logo`,{standalone:u,embedded:!u}),src:r.logoUrl}),P.jsx(nT,{className:re(o,`${J}-${e}-title`,{standalone:u,embedded:!u}),children:r==null?void 0:r.headerText}),P.jsxs("div",{className:re(o,`${J}-${e}-controls`),children:[P.jsx(d,{componentType:e,isIcon:!0}),P.jsx(s4,{componentType:e}),P.jsx(j6,{className:re(o,`cim-${e}-component`),onClick:n})]})]}),P.jsxs(o4,{componentType:e,children:[P.jsx(h,{componentType:e}),P.jsx(d4,{componentType:e}),P.jsx(fE,{componentType:e,onClearChat:t})]})]})})},c4=({className:e,globalClassName:t,suggestions:n,disabled:r,isWidgetStandalone:o,onSuggestionClick:a})=>{const u=o?"standalone":"embedded",c=d=>()=>{a(d)};return P.jsx("div",{className:re(t,`${J}-suggestion-container ${u}`,e),children:n.map(d=>o?P.jsx(_0,{disabled:r,className:re(t,`${J}-suggestion-button standalone`),onClick:c(d),children:d},d):P.jsx("button",{disabled:r,className:re(t,`${J}-suggestion-button embedded`),onClick:c(d),children:d},d))})},d4=({componentType:e,isIcon:t})=>{const{globalClassName:n,enableMinimize:r}=Ht();if(!r)return null;const o=()=>{vi(!1),yu(!0)};return t?P.jsx(jr,{className:re(n,`${J}-toggle-minimize-button`,`cim-${e}-component`),ariaLabel:"Toggle Minimize",title:"Minimize",onClick:o,icon:P.jsx(b0,{})}):P.jsxs("button",{className:re(n,`${J}-overflow-menu-button`,`${J}-toggle-minimize-button`,`cim-${e}-component`),onClick:o,children:[P.jsx(b0,{}),"Minimize"]})},sT=({componentType:e,isIcon:t})=>{const{globalClassName:n}=Ht(),r=ea(),o=()=>{Tu("modal"),r()};return t?P.jsx(jr,{className:re(n,`${J}-toggle-modal-button`,`cim-${e}-component`),ariaLabel:"Expand",title:"Expand",onClick:o,icon:P.jsx(Py,{})}):P.jsxs("button",{className:re(n,`${J}-overflow-menu-button`,`${J}-toggle-modal-button`,`cim-${e}-component`),onClick:o,children:[P.jsx(Py,{}),"Show modal"]})};function aT(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,o=n.indexOf(t);for(;o!==-1;)r++,o=n.indexOf(t,o+t.length);return r}function f4(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function h4(e,t,n){const o=Ru((n||{}).ignore||[]),a=p4(t);let u=-1;for(;++u<a.length;)Pg(e,"text",c);function c(h,m){let E=-1,T;for(;++E<m.length;){const b=m[E],_=T?T.children:void 0;if(o(b,_?_.indexOf(b):void 0,T))return;T=b}if(T)return d(h,m)}function d(h,m){const E=m[m.length-1],T=a[u][0],b=a[u][1];let _=0;const A=E.children.indexOf(h);let C=!1,I=[];T.lastIndex=0;let R=T.exec(h.value);for(;R;){const F=R.index,z={index:R.index,input:R.input,stack:[...m,h]};let D=b(...R,z);if(typeof D=="string"&&(D=D.length>0?{type:"text",value:D}:void 0),D===!1?T.lastIndex=F+1:(_!==F&&I.push({type:"text",value:h.value.slice(_,F)}),Array.isArray(D)?I.push(...D):D&&I.push(D),_=F+R[0].length,C=!0),!T.global)break;R=T.exec(h.value)}return C?(_<h.value.length&&I.push({type:"text",value:h.value.slice(_)}),E.children.splice(A,1,...I)):I=[h],A+I.length}}function p4(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 o=n[r];t.push([m4(o[0]),g4(o[1])])}return t}function m4(e){return typeof e=="string"?new RegExp(f4(e),"g"):e}function g4(e){return typeof e=="function"?e:function(){return e}}const rh="phrasing",ih=["autolink","link","image","label"];function E4(){return{transforms:[S4],enter:{literalAutolink:T4,literalAutolinkEmail:oh,literalAutolinkHttp:oh,literalAutolinkWww:oh},exit:{literalAutolink:w4,literalAutolinkEmail:_4,literalAutolinkHttp:b4,literalAutolinkWww:x4}}}function y4(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:rh,notInConstruct:ih},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:rh,notInConstruct:ih},{character:":",before:"[ps]",after:"\\/",inConstruct:rh,notInConstruct:ih}]}}function T4(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function oh(e){this.config.enter.autolinkProtocol.call(this,e)}function b4(e){this.config.exit.autolinkProtocol.call(this,e)}function x4(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 _4(e){this.config.exit.autolinkEmail.call(this,e)}function w4(e){this.exit(e)}function S4(e){h4(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,A4],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),v4]],{ignore:["link","linkReference"]})}function A4(e,t,n,r,o){let a="";if(!uT(o)||(/^w/i.test(t)&&(n=t+n,t="",a="http://"),!C4(n)))return!1;const u=k4(n+r);if(!u[0])return!1;const c={type:"link",title:null,url:a+t+u[0],children:[{type:"text",value:t+u[0]}]};return u[1]?[c,{type:"text",value:u[1]}]:c}function v4(e,t,n,r){return!uT(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function C4(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 k4(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const o=aT(e,"(");let a=aT(e,")");for(;r!==-1&&o>a;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),a++;return[e,n]}function uT(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||Oi(n)||Au(n))&&(!t||n!==47)}lT.peek=F4;function N4(){this.buffer()}function O4(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function I4(){this.buffer()}function R4(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function P4(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Wn(this.sliceSerialize(e)).toLowerCase(),n.label=t}function L4(e){this.exit(e)}function D4(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Wn(this.sliceSerialize(e)).toLowerCase(),n.label=t}function M4(e){this.exit(e)}function F4(){return"["}function lT(e,t,n,r){const o=n.createTracker(r);let a=o.move("[^");const u=n.enter("footnoteReference"),c=n.enter("reference");return a+=o.move(n.safe(n.associationId(e),{after:"]",before:a})),c(),u(),a+=o.move("]"),a}function B4(){return{enter:{gfmFootnoteCallString:N4,gfmFootnoteCall:O4,gfmFootnoteDefinitionLabelString:I4,gfmFootnoteDefinition:R4},exit:{gfmFootnoteCallString:P4,gfmFootnoteCall:L4,gfmFootnoteDefinitionLabelString:D4,gfmFootnoteDefinition:M4}}}function U4(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:lT},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,o,a,u){const c=a.createTracker(u);let d=c.move("[^");const h=a.enter("footnoteDefinition"),m=a.enter("label");return d+=c.move(a.safe(a.associationId(r),{before:d,after:"]"})),m(),d+=c.move("]:"),r.children&&r.children.length>0&&(c.shift(4),d+=c.move((t?`
|
|
38
38
|
`:" ")+a.indentLines(a.containerFlow(r,c.current()),t?cT:H4))),h(),d}}function H4(e,t,n){return t===0?e:cT(e,t,n)}function cT(e,t,n){return(n?"":" ")+e}const z4=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];dT.peek=W4;function j4(){return{canContainEols:["delete"],enter:{strikethrough:V4},exit:{strikethrough:Y4}}}function $4(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:z4}],handlers:{delete:dT}}}function V4(e){this.enter({type:"delete",children:[]},e)}function Y4(e){this.exit(e)}function dT(e,t,n,r){const o=n.createTracker(r),a=n.enter("strikethrough");let u=o.move("~~");return u+=n.containerPhrasing(e,ne(U({},o.current()),{before:u,after:"~"})),u+=o.move("~~"),a(),u}function W4(){return"~"}function q4(e){return e.length}function G4(e,t){const n=t||{},r=(n.align||[]).concat(),o=n.stringLength||q4,a=[],u=[],c=[],d=[];let h=0,m=-1;for(;++m<e.length;){const w=[],A=[];let C=-1;for(e[m].length>h&&(h=e[m].length);++C<e[m].length;){const I=K4(e[m][C]);if(n.alignDelimiters!==!1){const R=o(I);A[C]=R,(d[C]===void 0||R>d[C])&&(d[C]=R)}w.push(I)}u[m]=w,c[m]=A}let E=-1;if(typeof r=="object"&&"length"in r)for(;++E<h;)a[E]=fT(r[E]);else{const w=fT(r);for(;++E<h;)a[E]=w}E=-1;const T=[],b=[];for(;++E<h;){const w=a[E];let A="",C="";w===99?(A=":",C=":"):w===108?A=":":w===114&&(C=":");let I=n.alignDelimiters===!1?1:Math.max(1,d[E]-A.length-C.length);const R=A+"-".repeat(I)+C;n.alignDelimiters!==!1&&(I=A.length+I+C.length,I>d[E]&&(d[E]=I),b[E]=I),T[E]=R}u.splice(1,0,T),c.splice(1,0,b),m=-1;const _=[];for(;++m<u.length;){const w=u[m],A=c[m];E=-1;const C=[];for(;++E<h;){const I=w[E]||"";let R="",F="";if(n.alignDelimiters!==!1){const z=d[E]-(A[E]||0),D=a[E];D===114?R=" ".repeat(z):D===99?z%2?(R=" ".repeat(z/2+.5),F=" ".repeat(z/2-.5)):(R=" ".repeat(z/2),F=R):F=" ".repeat(z)}n.delimiterStart!==!1&&!E&&C.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&I==="")&&(n.delimiterStart!==!1||E)&&C.push(" "),n.alignDelimiters!==!1&&C.push(R),C.push(I),n.alignDelimiters!==!1&&C.push(F),n.padding!==!1&&C.push(" "),(n.delimiterEnd!==!1||E!==h-1)&&C.push("|")}_.push(n.delimiterEnd===!1?C.join("").replace(/ +$/,""):C.join(""))}return _.join(`
|
|
39
39
|
`)}function K4(e){return e==null?"":String(e)}function fT(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 Q4(e,t,n,r){const o=n.enter("blockquote"),a=n.createTracker(r);a.move("> "),a.shift(2);const u=n.indentLines(n.containerFlow(e,a.current()),X4);return o(),u}function X4(e,t,n){return">"+(n?"":" ")+e}function J4(e,t){return hT(e,t.inConstruct,!0)&&!hT(e,t.notInConstruct,!1)}function hT(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 pT(e,t,n,r){let o=-1;for(;++o<n.unsafe.length;)if(n.unsafe[o].character===`
|
|
40
40
|
`&&J4(n.stack,n.unsafe[o]))return/[ \t]/.test(r.before)?"":" ";return`\\
|