@spscommerce/max 0.2.0 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/index.umd.cjs CHANGED
@@ -466,7 +466,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
466
466
  )
467
467
  }
468
468
  `;const hb=W.createContext({agentApiService:null,showAgentPanel:()=>{},hideAgentPanel:()=>{},toggleAgentPanelVisibility:()=>{},isAgentPanelOpen:!1,currentConversationId:null,updateCurrentConversationId:()=>{},lastSentUserMessage:"",updateLastSentUserMessage:()=>{},usageStatus:"active",updateUsageStatus:()=>{},userHasAgentPerms:!1,updateUserHasAgentPerms:()=>{},isInPreprod:!1,updateIsInPreprod:()=>{},currentUser:null,flags:null,isInCustomerView:!1,token:null,env:"",currentApp:null}),pn=()=>W.useContext(hb),Mb=20;function $k(e,t){const[o,n]=h.useState(!1),[s,a]=h.useState(!1),[r,i]=h.useState(!1),[c,l]=h.useState([]),[p,d]=h.useState(),[b,M]=h.useState([]),[f,m]=h.useState([]),[O,g]=h.useState(!1),[C,E]=h.useState(null),[L,T]=h.useState(!1),{currentConversationId:I,updateCurrentConversationId:Q,lastSentUserMessage:z,updateLastSentUserMessage:x,updateUsageStatus:q,updateUserHasAgentPerms:R,isInPreprod:H,currentUser:w,flags:N,isInCustomerView:v}=pn(),V=h.useRef(null),F=h.useRef(""),$=h.useRef(),t0=h.useCallback(()=>{V.current&&clearTimeout(V.current),V.current=setTimeout(()=>{i(!0)},500)},[]),B=h.useCallback(()=>{V.current&&clearTimeout(V.current),i(!1)},[]);h.useEffect(()=>()=>{V.current&&clearTimeout(V.current),$.current&&cancelAnimationFrame($.current)},[]);function o0(g0){return g0.replace(/\n/g,`
469
- `)}const a0=h.useCallback(()=>{if(F.current){const g0=F.current;F.current="",d(I0=>(I0||"")+g0)}$.current=void 0},[]);h.useEffect(()=>{const g0=x0=>{a(!1),i(!1),t0(),F.current+=x0.detail,$.current||($.current=requestAnimationFrame(a0))},I0=x0=>{$.current&&(cancelAnimationFrame($.current),$.current=void 0),F.current="",a(!1),B();const T0=x0.detail.content,f1=x0.detail.messageId;Q(x0.detail.conversationId),l(B1=>[...B1,{role:"agent",content:T0,id:f1}]),d("")},L0=x0=>{$.current&&(cancelAnimationFrame($.current),$.current=void 0),F.current="",a(!1),B(),d(""),n(!0)};return document.addEventListener("agentChatStreamResponse",g0),document.addEventListener("agentChatStreamDone",I0),document.addEventListener("agentChatStreamError",L0),()=>{document.removeEventListener("agentChatStreamResponse",g0),document.removeEventListener("agentChatStreamDone",I0),document.removeEventListener("agentChatStreamError",L0)}},[I,t0,B,a0]);const D=h.useCallback(()=>{e.getSocket()?.close(1e3,"Cancelled by user"),$.current&&(cancelAnimationFrame($.current),$.current=void 0),F.current="",a(!1),B(),d("")},[B]),Y=h.useCallback(()=>{g(!1),l([]),M([]),a(!1),B(),n(!1),E(null),T(!1),Q(null),D()},[I,B,D]),j=({currentUser:g0})=>g0?!!["sps-agent:user"].every(L0=>g0?.acting_entity.permissions.includes(L0)):!1,G=h.useCallback(()=>{const g0=N?.aiAgentPanel&&j({currentUser:w})||!1;return R(g0),g0},[N,w,R]),s0=h.useCallback(async()=>{const g0=G();if(R(g0),w&&w.acting_entity?.org_user_id&&g0)try{const I0=await e.fetchUsageStatus(w.acting_entity.org_user_id);return q(I0.status),I0.status}catch(I0){console.error(I0)}},[w,e,q,G]),p0=h.useCallback(async(g0,I0,L0)=>{if(!v&&G()&&!H){if(await s0()!=="active")return;g(!0),t0(),n(!1),M([]),l(G0=>[...G0,{role:"user",content:o0(g0),obo:v}]),x(o0(g0));const T0=t(),f1=window.location.href,B1=w?.acting_entity?.user_info?.preferences?.timezone||null;try{await e.postChat(o0(g0),L0||"",I,T0,f1,I0,B1),await s0()}catch(G0){console.error(G0),B(),n(!0)}}},[e,I,t0,B,v,G,s0,x,w,H]);function C0(g0){let I0=[];return g0.forEach(L0=>{I0.push({role:"user",content:L0.request,obo:L0.obo}),I0.push({role:"agent",content:L0.response,id:L0.id})}),I0}const f0=h.useCallback(async()=>{try{p0(z,!1)}catch(g0){console.error(g0)}},[p0,z]),d0=h.useCallback(async g0=>{a(!0),n(!1),E(null),T(!1),Q(g0),D();try{const I0=await e.fetchConversationMessages(g0,{limit:Mb}),L0=C0(I0.results);l(L0),E(I0.next),a(!1)}catch{a(!1),n(!0)}},[e,I,D]),O0=h.useCallback(async()=>{if(!(!C||!I||L)){T(!0);try{const g0=await e.fetchConversationMessages(I,{cursor:C,limit:Mb}),I0=C0(g0.results.reverse());l(L0=>[...I0,...L0]),E(g0.next)}catch(g0){console.error("Error loading older messages:",g0)}finally{T(!1)}}},[C,I,L,e]),X=h.useCallback(async g0=>{try{return I?(await e.fetchConversationMessages(I)).results.find(x0=>x0.id===g0):void 0}catch(I0){console.error("Error fetching message",I0);return}},[e,I]),b0=h.useCallback(async()=>{a(!0),n(!1);try{const I0=(await e.fetchConversationList()).results.sort((L0,x0)=>new Date(L0.modifiedDateTime).getTime()-new Date(x0.modifiedDateTime).getTime());m(I0),a(!1)}catch{a(!1),n(!0)}},[e,I]),c0=h.useCallback(async(g0,I0,L0)=>{try{await e.postFeedback(g0,I0,L0)}catch(x0){console.error(x0)}},[e]);return{error:o,loading:s,isAgentThinking:r,messages:c,displayedMessages:c,hasMoreMessages:C!==null,loadOlderMessages:O0,isLoadingOlderMessages:L,streamingResponse:p,sendMessage:p0,startNewConversation:Y,suggestedMessages:b,loadConversation:d0,conversationList:f,fetchConversationList:b0,sendFeedback:c0,fetchMessagePair:X,retrySendMessage:f0,messageHasBeenSent:O,fetchUsageStatus:s0,doesUserHaveAgentPerms:G}}function fb(e,t){return function(){return e.apply(t,arguments)}}const{toString:ev}=Object.prototype,{getPrototypeOf:Hl}=Object,{iterator:Lr,toStringTag:_b}=Symbol,Tr=(e=>t=>{const o=ev.call(t);return e[o]||(e[o]=o.slice(8,-1).toLowerCase())})(Object.create(null)),Oe=e=>(e=e.toLowerCase(),t=>Tr(t)===e),Ir=e=>t=>typeof t===e,{isArray:dn}=Array,un=Ir("undefined");function Ss(e){return e!==null&&!un(e)&&e.constructor!==null&&!un(e.constructor)&&F2(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const zb=Oe("ArrayBuffer");function tv(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&zb(e.buffer),t}const ov=Ir("string"),F2=Ir("function"),Ab=Ir("number"),ys=e=>e!==null&&typeof e=="object",nv=e=>e===!0||e===!1,Nr=e=>{if(Tr(e)!=="object")return!1;const t=Hl(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(_b in e)&&!(Lr in e)},sv=e=>{if(!ys(e)||Ss(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},av=Oe("Date"),rv=Oe("File"),iv=Oe("Blob"),cv=Oe("FileList"),lv=e=>ys(e)&&F2(e.pipe),pv=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||F2(e.append)&&((t=Tr(e))==="formdata"||t==="object"&&F2(e.toString)&&e.toString()==="[object FormData]"))},dv=Oe("URLSearchParams"),[uv,bv,hv,Mv]=["ReadableStream","Request","Response","Headers"].map(Oe),fv=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Rs(e,t,{allOwnKeys:o=!1}={}){if(e===null||typeof e>"u")return;let n,s;if(typeof e!="object"&&(e=[e]),dn(e))for(n=0,s=e.length;n<s;n++)t.call(null,e[n],n,e);else{if(Ss(e))return;const a=o?Object.getOwnPropertyNames(e):Object.keys(e),r=a.length;let i;for(n=0;n<r;n++)i=a[n],t.call(null,e[i],i,e)}}function mb(e,t){if(Ss(e))return null;t=t.toLowerCase();const o=Object.keys(e);let n=o.length,s;for(;n-- >0;)if(s=o[n],t===s.toLowerCase())return s;return null}const mo=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Ob=e=>!un(e)&&e!==mo;function Vl(){const{caseless:e,skipUndefined:t}=Ob(this)&&this||{},o={},n=(s,a)=>{const r=e&&mb(o,a)||a;Nr(o[r])&&Nr(s)?o[r]=Vl(o[r],s):Nr(s)?o[r]=Vl({},s):dn(s)?o[r]=s.slice():(!t||!un(s))&&(o[r]=s)};for(let s=0,a=arguments.length;s<a;s++)arguments[s]&&Rs(arguments[s],n);return o}const _v=(e,t,o,{allOwnKeys:n}={})=>(Rs(t,(s,a)=>{o&&F2(s)?e[a]=fb(s,o):e[a]=s},{allOwnKeys:n}),e),zv=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),Av=(e,t,o,n)=>{e.prototype=Object.create(t.prototype,n),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),o&&Object.assign(e.prototype,o)},mv=(e,t,o,n)=>{let s,a,r;const i={};if(t=t||{},e==null)return t;do{for(s=Object.getOwnPropertyNames(e),a=s.length;a-- >0;)r=s[a],(!n||n(r,e,t))&&!i[r]&&(t[r]=e[r],i[r]=!0);e=o!==!1&&Hl(e)}while(e&&(!o||o(e,t))&&e!==Object.prototype);return t},Ov=(e,t,o)=>{e=String(e),(o===void 0||o>e.length)&&(o=e.length),o-=t.length;const n=e.indexOf(t,o);return n!==-1&&n===o},gv=e=>{if(!e)return null;if(dn(e))return e;let t=e.length;if(!Ab(t))return null;const o=new Array(t);for(;t-- >0;)o[t]=e[t];return o},Cv=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Hl(Uint8Array)),kv=(e,t)=>{const n=(e&&e[Lr]).call(e);let s;for(;(s=n.next())&&!s.done;){const a=s.value;t.call(e,a[0],a[1])}},vv=(e,t)=>{let o;const n=[];for(;(o=e.exec(t))!==null;)n.push(o);return n},Ev=Oe("HTMLFormElement"),wv=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(o,n,s){return n.toUpperCase()+s}),gb=(({hasOwnProperty:e})=>(t,o)=>e.call(t,o))(Object.prototype),qv=Oe("RegExp"),Cb=(e,t)=>{const o=Object.getOwnPropertyDescriptors(e),n={};Rs(o,(s,a)=>{let r;(r=t(s,a,e))!==!1&&(n[a]=r||s)}),Object.defineProperties(e,n)},Sv=e=>{Cb(e,(t,o)=>{if(F2(e)&&["arguments","caller","callee"].indexOf(o)!==-1)return!1;const n=e[o];if(F2(n)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+o+"'")})}})},yv=(e,t)=>{const o={},n=s=>{s.forEach(a=>{o[a]=!0})};return dn(e)?n(e):n(String(e).split(t)),o},Rv=()=>{},Bv=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function Wv(e){return!!(e&&F2(e.append)&&e[_b]==="FormData"&&e[Lr])}const Lv=e=>{const t=new Array(10),o=(n,s)=>{if(ys(n)){if(t.indexOf(n)>=0)return;if(Ss(n))return n;if(!("toJSON"in n)){t[s]=n;const a=dn(n)?[]:{};return Rs(n,(r,i)=>{const c=o(r,s+1);!un(c)&&(a[i]=c)}),t[s]=void 0,a}}return n};return o(e,0)},Tv=Oe("AsyncFunction"),Iv=e=>e&&(ys(e)||F2(e))&&F2(e.then)&&F2(e.catch),kb=((e,t)=>e?setImmediate:t?((o,n)=>(mo.addEventListener("message",({source:s,data:a})=>{s===mo&&a===o&&n.length&&n.shift()()},!1),s=>{n.push(s),mo.postMessage(o,"*")}))(`axios@${Math.random()}`,[]):o=>setTimeout(o))(typeof setImmediate=="function",F2(mo.postMessage)),Nv=typeof queueMicrotask<"u"?queueMicrotask.bind(mo):typeof process<"u"&&process.nextTick||kb,h0={isArray:dn,isArrayBuffer:zb,isBuffer:Ss,isFormData:pv,isArrayBufferView:tv,isString:ov,isNumber:Ab,isBoolean:nv,isObject:ys,isPlainObject:Nr,isEmptyObject:sv,isReadableStream:uv,isRequest:bv,isResponse:hv,isHeaders:Mv,isUndefined:un,isDate:av,isFile:rv,isBlob:iv,isRegExp:qv,isFunction:F2,isStream:lv,isURLSearchParams:dv,isTypedArray:Cv,isFileList:cv,forEach:Rs,merge:Vl,extend:_v,trim:fv,stripBOM:zv,inherits:Av,toFlatObject:mv,kindOf:Tr,kindOfTest:Oe,endsWith:Ov,toArray:gv,forEachEntry:kv,matchAll:vv,isHTMLForm:Ev,hasOwnProperty:gb,hasOwnProp:gb,reduceDescriptors:Cb,freezeMethods:Sv,toObjectSet:yv,toCamelCase:wv,noop:Rv,toFiniteNumber:Bv,findKey:mb,global:mo,isContextDefined:Ob,isSpecCompliantForm:Wv,toJSONObject:Lv,isAsyncFn:Tv,isThenable:Iv,setImmediate:kb,asap:Nv,isIterable:e=>e!=null&&F2(e[Lr])};function s1(e,t,o,n,s){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),o&&(this.config=o),n&&(this.request=n),s&&(this.response=s,this.status=s.status?s.status:null)}h0.inherits(s1,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:h0.toJSONObject(this.config),code:this.code,status:this.status}}});const vb=s1.prototype,Eb={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{Eb[e]={value:e}}),Object.defineProperties(s1,Eb),Object.defineProperty(vb,"isAxiosError",{value:!0}),s1.from=(e,t,o,n,s,a)=>{const r=Object.create(vb);h0.toFlatObject(e,r,function(p){return p!==Error.prototype},l=>l!=="isAxiosError");const i=e&&e.message?e.message:"Error",c=t==null&&e?e.code:t;return s1.call(r,i,c,o,n,s),e&&r.cause==null&&Object.defineProperty(r,"cause",{value:e,configurable:!0}),r.name=e&&e.name||"Error",a&&Object.assign(r,a),r};const xv=null;function Ul(e){return h0.isPlainObject(e)||h0.isArray(e)}function wb(e){return h0.endsWith(e,"[]")?e.slice(0,-2):e}function qb(e,t,o){return e?e.concat(t).map(function(s,a){return s=wb(s),!o&&a?"["+s+"]":s}).join(o?".":""):t}function Dv(e){return h0.isArray(e)&&!e.some(Ul)}const Pv=h0.toFlatObject(h0,{},null,function(t){return/^is[A-Z]/.test(t)});function xr(e,t,o){if(!h0.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,o=h0.toFlatObject(o,{metaTokens:!0,dots:!1,indexes:!1},!1,function(m,O){return!h0.isUndefined(O[m])});const n=o.metaTokens,s=o.visitor||p,a=o.dots,r=o.indexes,c=(o.Blob||typeof Blob<"u"&&Blob)&&h0.isSpecCompliantForm(t);if(!h0.isFunction(s))throw new TypeError("visitor must be a function");function l(f){if(f===null)return"";if(h0.isDate(f))return f.toISOString();if(h0.isBoolean(f))return f.toString();if(!c&&h0.isBlob(f))throw new s1("Blob is not supported. Use a Buffer instead.");return h0.isArrayBuffer(f)||h0.isTypedArray(f)?c&&typeof Blob=="function"?new Blob([f]):Buffer.from(f):f}function p(f,m,O){let g=f;if(f&&!O&&typeof f=="object"){if(h0.endsWith(m,"{}"))m=n?m:m.slice(0,-2),f=JSON.stringify(f);else if(h0.isArray(f)&&Dv(f)||(h0.isFileList(f)||h0.endsWith(m,"[]"))&&(g=h0.toArray(f)))return m=wb(m),g.forEach(function(E,L){!(h0.isUndefined(E)||E===null)&&t.append(r===!0?qb([m],L,a):r===null?m:m+"[]",l(E))}),!1}return Ul(f)?!0:(t.append(qb(O,m,a),l(f)),!1)}const d=[],b=Object.assign(Pv,{defaultVisitor:p,convertValue:l,isVisitable:Ul});function M(f,m){if(!h0.isUndefined(f)){if(d.indexOf(f)!==-1)throw Error("Circular reference detected in "+m.join("."));d.push(f),h0.forEach(f,function(g,C){(!(h0.isUndefined(g)||g===null)&&s.call(t,g,h0.isString(C)?C.trim():C,m,b))===!0&&M(g,m?m.concat(C):[C])}),d.pop()}}if(!h0.isObject(e))throw new TypeError("data must be an object");return M(e),t}function Sb(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(n){return t[n]})}function Kl(e,t){this._pairs=[],e&&xr(e,this,t)}const yb=Kl.prototype;yb.append=function(t,o){this._pairs.push([t,o])},yb.toString=function(t){const o=t?function(n){return t.call(this,n,Sb)}:Sb;return this._pairs.map(function(s){return o(s[0])+"="+o(s[1])},"").join("&")};function Fv(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function Rb(e,t,o){if(!t)return e;const n=o&&o.encode||Fv;h0.isFunction(o)&&(o={serialize:o});const s=o&&o.serialize;let a;if(s?a=s(t,o):a=h0.isURLSearchParams(t)?t.toString():new Kl(t,o).toString(n),a){const r=e.indexOf("#");r!==-1&&(e=e.slice(0,r)),e+=(e.indexOf("?")===-1?"?":"&")+a}return e}class Bb{constructor(){this.handlers=[]}use(t,o,n){return this.handlers.push({fulfilled:t,rejected:o,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){h0.forEach(this.handlers,function(n){n!==null&&t(n)})}}const Wb={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Qv={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:Kl,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},jl=typeof window<"u"&&typeof document<"u",Gl=typeof navigator=="object"&&navigator||void 0,Hv=jl&&(!Gl||["ReactNative","NativeScript","NS"].indexOf(Gl.product)<0),Vv=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Uv=jl&&window.location.href||"http://localhost",v2={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:jl,hasStandardBrowserEnv:Hv,hasStandardBrowserWebWorkerEnv:Vv,navigator:Gl,origin:Uv},Symbol.toStringTag,{value:"Module"})),...Qv};function Kv(e,t){return xr(e,new v2.classes.URLSearchParams,{visitor:function(o,n,s,a){return v2.isNode&&h0.isBuffer(o)?(this.append(n,o.toString("base64")),!1):a.defaultVisitor.apply(this,arguments)},...t})}function jv(e){return h0.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function Gv(e){const t={},o=Object.keys(e);let n;const s=o.length;let a;for(n=0;n<s;n++)a=o[n],t[a]=e[a];return t}function Lb(e){function t(o,n,s,a){let r=o[a++];if(r==="__proto__")return!0;const i=Number.isFinite(+r),c=a>=o.length;return r=!r&&h0.isArray(s)?s.length:r,c?(h0.hasOwnProp(s,r)?s[r]=[s[r],n]:s[r]=n,!i):((!s[r]||!h0.isObject(s[r]))&&(s[r]=[]),t(o,n,s[r],a)&&h0.isArray(s[r])&&(s[r]=Gv(s[r])),!i)}if(h0.isFormData(e)&&h0.isFunction(e.entries)){const o={};return h0.forEachEntry(e,(n,s)=>{t(jv(n),s,o,0)}),o}return null}function Yv(e,t,o){if(h0.isString(e))try{return(t||JSON.parse)(e),h0.trim(e)}catch(n){if(n.name!=="SyntaxError")throw n}return(o||JSON.stringify)(e)}const Bs={transitional:Wb,adapter:["xhr","http","fetch"],transformRequest:[function(t,o){const n=o.getContentType()||"",s=n.indexOf("application/json")>-1,a=h0.isObject(t);if(a&&h0.isHTMLForm(t)&&(t=new FormData(t)),h0.isFormData(t))return s?JSON.stringify(Lb(t)):t;if(h0.isArrayBuffer(t)||h0.isBuffer(t)||h0.isStream(t)||h0.isFile(t)||h0.isBlob(t)||h0.isReadableStream(t))return t;if(h0.isArrayBufferView(t))return t.buffer;if(h0.isURLSearchParams(t))return o.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let i;if(a){if(n.indexOf("application/x-www-form-urlencoded")>-1)return Kv(t,this.formSerializer).toString();if((i=h0.isFileList(t))||n.indexOf("multipart/form-data")>-1){const c=this.env&&this.env.FormData;return xr(i?{"files[]":t}:t,c&&new c,this.formSerializer)}}return a||s?(o.setContentType("application/json",!1),Yv(t)):t}],transformResponse:[function(t){const o=this.transitional||Bs.transitional,n=o&&o.forcedJSONParsing,s=this.responseType==="json";if(h0.isResponse(t)||h0.isReadableStream(t))return t;if(t&&h0.isString(t)&&(n&&!this.responseType||s)){const r=!(o&&o.silentJSONParsing)&&s;try{return JSON.parse(t,this.parseReviver)}catch(i){if(r)throw i.name==="SyntaxError"?s1.from(i,s1.ERR_BAD_RESPONSE,this,null,this.response):i}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:v2.classes.FormData,Blob:v2.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};h0.forEach(["delete","get","head","post","put","patch"],e=>{Bs.headers[e]={}});const Xv=h0.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Zv=e=>{const t={};let o,n,s;return e&&e.split(`
469
+ `)}const a0=h.useCallback(()=>{if(F.current){const g0=F.current;F.current="",d(I0=>(I0||"")+g0)}$.current=void 0},[]);h.useEffect(()=>{const g0=x0=>{a(!1),i(!1),t0(),F.current+=x0.detail,$.current||($.current=requestAnimationFrame(a0))},I0=x0=>{$.current&&(cancelAnimationFrame($.current),$.current=void 0),F.current="",a(!1),B();const T0=x0.detail.content,f1=x0.detail.messageId;Q(x0.detail.conversationId),l(B1=>[...B1,{role:"agent",content:T0,id:f1}]),d("")},L0=x0=>{$.current&&(cancelAnimationFrame($.current),$.current=void 0),F.current="",a(!1),B(),d(""),n(!0)};return document.addEventListener("agentChatStreamResponse",g0),document.addEventListener("agentChatStreamDone",I0),document.addEventListener("agentChatStreamError",L0),()=>{document.removeEventListener("agentChatStreamResponse",g0),document.removeEventListener("agentChatStreamDone",I0),document.removeEventListener("agentChatStreamError",L0)}},[I,t0,B,a0]);const D=h.useCallback(()=>{e.getSocket()?.close(1e3,"Cancelled by user"),$.current&&(cancelAnimationFrame($.current),$.current=void 0),F.current="",a(!1),B(),d("")},[B]),Y=h.useCallback(()=>{g(!1),l([]),M([]),a(!1),B(),n(!1),E(null),T(!1),Q(null),D()},[I,B,D]),j=({currentUser:g0})=>g0?!!["sps-agent:user"].every(L0=>g0?.acting_entity.permissions.includes(L0)):!1,G=h.useCallback(()=>{const g0=N?.["show-max-panel"]&&j({currentUser:w})||!1;return R(g0),g0},[N,w,R]),s0=h.useCallback(async()=>{const g0=G();if(R(g0),w&&w.acting_entity?.org_user_id&&g0)try{const I0=await e.fetchUsageStatus(w.acting_entity.org_user_id);return q(I0.status),I0.status}catch(I0){console.error(I0)}},[w,e,q,G]),p0=h.useCallback(async(g0,I0,L0)=>{if(!v&&G()&&!H){if(await s0()!=="active")return;g(!0),t0(),n(!1),M([]),l(G0=>[...G0,{role:"user",content:o0(g0),obo:v}]),x(o0(g0));const T0=t(),f1=window.location.href,B1=w?.acting_entity?.user_info?.preferences?.timezone||null;try{await e.postChat(o0(g0),L0||"",I,T0,f1,I0,B1),await s0()}catch(G0){console.error(G0),B(),n(!0)}}},[e,I,t0,B,v,G,s0,x,w,H]);function C0(g0){let I0=[];return g0.forEach(L0=>{I0.push({role:"user",content:L0.request,obo:L0.obo}),I0.push({role:"agent",content:L0.response,id:L0.id})}),I0}const f0=h.useCallback(async()=>{try{p0(z,!1)}catch(g0){console.error(g0)}},[p0,z]),d0=h.useCallback(async g0=>{a(!0),n(!1),E(null),T(!1),Q(g0),D();try{const I0=await e.fetchConversationMessages(g0,{limit:Mb}),L0=C0(I0.results);l(L0),E(I0.next),a(!1)}catch{a(!1),n(!0)}},[e,I,D]),O0=h.useCallback(async()=>{if(!(!C||!I||L)){T(!0);try{const g0=await e.fetchConversationMessages(I,{cursor:C,limit:Mb}),I0=C0(g0.results.reverse());l(L0=>[...I0,...L0]),E(g0.next)}catch(g0){console.error("Error loading older messages:",g0)}finally{T(!1)}}},[C,I,L,e]),X=h.useCallback(async g0=>{try{return I?(await e.fetchConversationMessages(I)).results.find(x0=>x0.id===g0):void 0}catch(I0){console.error("Error fetching message",I0);return}},[e,I]),b0=h.useCallback(async()=>{a(!0),n(!1);try{const I0=(await e.fetchConversationList()).results.sort((L0,x0)=>new Date(L0.modifiedDateTime).getTime()-new Date(x0.modifiedDateTime).getTime());m(I0),a(!1)}catch{a(!1),n(!0)}},[e,I]),c0=h.useCallback(async(g0,I0,L0)=>{try{await e.postFeedback(g0,I0,L0)}catch(x0){console.error(x0)}},[e]);return{error:o,loading:s,isAgentThinking:r,messages:c,displayedMessages:c,hasMoreMessages:C!==null,loadOlderMessages:O0,isLoadingOlderMessages:L,streamingResponse:p,sendMessage:p0,startNewConversation:Y,suggestedMessages:b,loadConversation:d0,conversationList:f,fetchConversationList:b0,sendFeedback:c0,fetchMessagePair:X,retrySendMessage:f0,messageHasBeenSent:O,fetchUsageStatus:s0,doesUserHaveAgentPerms:G}}function fb(e,t){return function(){return e.apply(t,arguments)}}const{toString:ev}=Object.prototype,{getPrototypeOf:Hl}=Object,{iterator:Lr,toStringTag:_b}=Symbol,Tr=(e=>t=>{const o=ev.call(t);return e[o]||(e[o]=o.slice(8,-1).toLowerCase())})(Object.create(null)),Oe=e=>(e=e.toLowerCase(),t=>Tr(t)===e),Ir=e=>t=>typeof t===e,{isArray:dn}=Array,un=Ir("undefined");function Ss(e){return e!==null&&!un(e)&&e.constructor!==null&&!un(e.constructor)&&F2(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const zb=Oe("ArrayBuffer");function tv(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&zb(e.buffer),t}const ov=Ir("string"),F2=Ir("function"),Ab=Ir("number"),ys=e=>e!==null&&typeof e=="object",nv=e=>e===!0||e===!1,Nr=e=>{if(Tr(e)!=="object")return!1;const t=Hl(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(_b in e)&&!(Lr in e)},sv=e=>{if(!ys(e)||Ss(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},av=Oe("Date"),rv=Oe("File"),iv=Oe("Blob"),cv=Oe("FileList"),lv=e=>ys(e)&&F2(e.pipe),pv=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||F2(e.append)&&((t=Tr(e))==="formdata"||t==="object"&&F2(e.toString)&&e.toString()==="[object FormData]"))},dv=Oe("URLSearchParams"),[uv,bv,hv,Mv]=["ReadableStream","Request","Response","Headers"].map(Oe),fv=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Rs(e,t,{allOwnKeys:o=!1}={}){if(e===null||typeof e>"u")return;let n,s;if(typeof e!="object"&&(e=[e]),dn(e))for(n=0,s=e.length;n<s;n++)t.call(null,e[n],n,e);else{if(Ss(e))return;const a=o?Object.getOwnPropertyNames(e):Object.keys(e),r=a.length;let i;for(n=0;n<r;n++)i=a[n],t.call(null,e[i],i,e)}}function mb(e,t){if(Ss(e))return null;t=t.toLowerCase();const o=Object.keys(e);let n=o.length,s;for(;n-- >0;)if(s=o[n],t===s.toLowerCase())return s;return null}const mo=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Ob=e=>!un(e)&&e!==mo;function Vl(){const{caseless:e,skipUndefined:t}=Ob(this)&&this||{},o={},n=(s,a)=>{const r=e&&mb(o,a)||a;Nr(o[r])&&Nr(s)?o[r]=Vl(o[r],s):Nr(s)?o[r]=Vl({},s):dn(s)?o[r]=s.slice():(!t||!un(s))&&(o[r]=s)};for(let s=0,a=arguments.length;s<a;s++)arguments[s]&&Rs(arguments[s],n);return o}const _v=(e,t,o,{allOwnKeys:n}={})=>(Rs(t,(s,a)=>{o&&F2(s)?e[a]=fb(s,o):e[a]=s},{allOwnKeys:n}),e),zv=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),Av=(e,t,o,n)=>{e.prototype=Object.create(t.prototype,n),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),o&&Object.assign(e.prototype,o)},mv=(e,t,o,n)=>{let s,a,r;const i={};if(t=t||{},e==null)return t;do{for(s=Object.getOwnPropertyNames(e),a=s.length;a-- >0;)r=s[a],(!n||n(r,e,t))&&!i[r]&&(t[r]=e[r],i[r]=!0);e=o!==!1&&Hl(e)}while(e&&(!o||o(e,t))&&e!==Object.prototype);return t},Ov=(e,t,o)=>{e=String(e),(o===void 0||o>e.length)&&(o=e.length),o-=t.length;const n=e.indexOf(t,o);return n!==-1&&n===o},gv=e=>{if(!e)return null;if(dn(e))return e;let t=e.length;if(!Ab(t))return null;const o=new Array(t);for(;t-- >0;)o[t]=e[t];return o},Cv=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Hl(Uint8Array)),kv=(e,t)=>{const n=(e&&e[Lr]).call(e);let s;for(;(s=n.next())&&!s.done;){const a=s.value;t.call(e,a[0],a[1])}},vv=(e,t)=>{let o;const n=[];for(;(o=e.exec(t))!==null;)n.push(o);return n},Ev=Oe("HTMLFormElement"),wv=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(o,n,s){return n.toUpperCase()+s}),gb=(({hasOwnProperty:e})=>(t,o)=>e.call(t,o))(Object.prototype),qv=Oe("RegExp"),Cb=(e,t)=>{const o=Object.getOwnPropertyDescriptors(e),n={};Rs(o,(s,a)=>{let r;(r=t(s,a,e))!==!1&&(n[a]=r||s)}),Object.defineProperties(e,n)},Sv=e=>{Cb(e,(t,o)=>{if(F2(e)&&["arguments","caller","callee"].indexOf(o)!==-1)return!1;const n=e[o];if(F2(n)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+o+"'")})}})},yv=(e,t)=>{const o={},n=s=>{s.forEach(a=>{o[a]=!0})};return dn(e)?n(e):n(String(e).split(t)),o},Rv=()=>{},Bv=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function Wv(e){return!!(e&&F2(e.append)&&e[_b]==="FormData"&&e[Lr])}const Lv=e=>{const t=new Array(10),o=(n,s)=>{if(ys(n)){if(t.indexOf(n)>=0)return;if(Ss(n))return n;if(!("toJSON"in n)){t[s]=n;const a=dn(n)?[]:{};return Rs(n,(r,i)=>{const c=o(r,s+1);!un(c)&&(a[i]=c)}),t[s]=void 0,a}}return n};return o(e,0)},Tv=Oe("AsyncFunction"),Iv=e=>e&&(ys(e)||F2(e))&&F2(e.then)&&F2(e.catch),kb=((e,t)=>e?setImmediate:t?((o,n)=>(mo.addEventListener("message",({source:s,data:a})=>{s===mo&&a===o&&n.length&&n.shift()()},!1),s=>{n.push(s),mo.postMessage(o,"*")}))(`axios@${Math.random()}`,[]):o=>setTimeout(o))(typeof setImmediate=="function",F2(mo.postMessage)),Nv=typeof queueMicrotask<"u"?queueMicrotask.bind(mo):typeof process<"u"&&process.nextTick||kb,h0={isArray:dn,isArrayBuffer:zb,isBuffer:Ss,isFormData:pv,isArrayBufferView:tv,isString:ov,isNumber:Ab,isBoolean:nv,isObject:ys,isPlainObject:Nr,isEmptyObject:sv,isReadableStream:uv,isRequest:bv,isResponse:hv,isHeaders:Mv,isUndefined:un,isDate:av,isFile:rv,isBlob:iv,isRegExp:qv,isFunction:F2,isStream:lv,isURLSearchParams:dv,isTypedArray:Cv,isFileList:cv,forEach:Rs,merge:Vl,extend:_v,trim:fv,stripBOM:zv,inherits:Av,toFlatObject:mv,kindOf:Tr,kindOfTest:Oe,endsWith:Ov,toArray:gv,forEachEntry:kv,matchAll:vv,isHTMLForm:Ev,hasOwnProperty:gb,hasOwnProp:gb,reduceDescriptors:Cb,freezeMethods:Sv,toObjectSet:yv,toCamelCase:wv,noop:Rv,toFiniteNumber:Bv,findKey:mb,global:mo,isContextDefined:Ob,isSpecCompliantForm:Wv,toJSONObject:Lv,isAsyncFn:Tv,isThenable:Iv,setImmediate:kb,asap:Nv,isIterable:e=>e!=null&&F2(e[Lr])};function s1(e,t,o,n,s){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),o&&(this.config=o),n&&(this.request=n),s&&(this.response=s,this.status=s.status?s.status:null)}h0.inherits(s1,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:h0.toJSONObject(this.config),code:this.code,status:this.status}}});const vb=s1.prototype,Eb={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{Eb[e]={value:e}}),Object.defineProperties(s1,Eb),Object.defineProperty(vb,"isAxiosError",{value:!0}),s1.from=(e,t,o,n,s,a)=>{const r=Object.create(vb);h0.toFlatObject(e,r,function(p){return p!==Error.prototype},l=>l!=="isAxiosError");const i=e&&e.message?e.message:"Error",c=t==null&&e?e.code:t;return s1.call(r,i,c,o,n,s),e&&r.cause==null&&Object.defineProperty(r,"cause",{value:e,configurable:!0}),r.name=e&&e.name||"Error",a&&Object.assign(r,a),r};const xv=null;function Ul(e){return h0.isPlainObject(e)||h0.isArray(e)}function wb(e){return h0.endsWith(e,"[]")?e.slice(0,-2):e}function qb(e,t,o){return e?e.concat(t).map(function(s,a){return s=wb(s),!o&&a?"["+s+"]":s}).join(o?".":""):t}function Dv(e){return h0.isArray(e)&&!e.some(Ul)}const Pv=h0.toFlatObject(h0,{},null,function(t){return/^is[A-Z]/.test(t)});function xr(e,t,o){if(!h0.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,o=h0.toFlatObject(o,{metaTokens:!0,dots:!1,indexes:!1},!1,function(m,O){return!h0.isUndefined(O[m])});const n=o.metaTokens,s=o.visitor||p,a=o.dots,r=o.indexes,c=(o.Blob||typeof Blob<"u"&&Blob)&&h0.isSpecCompliantForm(t);if(!h0.isFunction(s))throw new TypeError("visitor must be a function");function l(f){if(f===null)return"";if(h0.isDate(f))return f.toISOString();if(h0.isBoolean(f))return f.toString();if(!c&&h0.isBlob(f))throw new s1("Blob is not supported. Use a Buffer instead.");return h0.isArrayBuffer(f)||h0.isTypedArray(f)?c&&typeof Blob=="function"?new Blob([f]):Buffer.from(f):f}function p(f,m,O){let g=f;if(f&&!O&&typeof f=="object"){if(h0.endsWith(m,"{}"))m=n?m:m.slice(0,-2),f=JSON.stringify(f);else if(h0.isArray(f)&&Dv(f)||(h0.isFileList(f)||h0.endsWith(m,"[]"))&&(g=h0.toArray(f)))return m=wb(m),g.forEach(function(E,L){!(h0.isUndefined(E)||E===null)&&t.append(r===!0?qb([m],L,a):r===null?m:m+"[]",l(E))}),!1}return Ul(f)?!0:(t.append(qb(O,m,a),l(f)),!1)}const d=[],b=Object.assign(Pv,{defaultVisitor:p,convertValue:l,isVisitable:Ul});function M(f,m){if(!h0.isUndefined(f)){if(d.indexOf(f)!==-1)throw Error("Circular reference detected in "+m.join("."));d.push(f),h0.forEach(f,function(g,C){(!(h0.isUndefined(g)||g===null)&&s.call(t,g,h0.isString(C)?C.trim():C,m,b))===!0&&M(g,m?m.concat(C):[C])}),d.pop()}}if(!h0.isObject(e))throw new TypeError("data must be an object");return M(e),t}function Sb(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(n){return t[n]})}function Kl(e,t){this._pairs=[],e&&xr(e,this,t)}const yb=Kl.prototype;yb.append=function(t,o){this._pairs.push([t,o])},yb.toString=function(t){const o=t?function(n){return t.call(this,n,Sb)}:Sb;return this._pairs.map(function(s){return o(s[0])+"="+o(s[1])},"").join("&")};function Fv(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function Rb(e,t,o){if(!t)return e;const n=o&&o.encode||Fv;h0.isFunction(o)&&(o={serialize:o});const s=o&&o.serialize;let a;if(s?a=s(t,o):a=h0.isURLSearchParams(t)?t.toString():new Kl(t,o).toString(n),a){const r=e.indexOf("#");r!==-1&&(e=e.slice(0,r)),e+=(e.indexOf("?")===-1?"?":"&")+a}return e}class Bb{constructor(){this.handlers=[]}use(t,o,n){return this.handlers.push({fulfilled:t,rejected:o,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){h0.forEach(this.handlers,function(n){n!==null&&t(n)})}}const Wb={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Qv={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:Kl,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},jl=typeof window<"u"&&typeof document<"u",Gl=typeof navigator=="object"&&navigator||void 0,Hv=jl&&(!Gl||["ReactNative","NativeScript","NS"].indexOf(Gl.product)<0),Vv=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Uv=jl&&window.location.href||"http://localhost",v2={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:jl,hasStandardBrowserEnv:Hv,hasStandardBrowserWebWorkerEnv:Vv,navigator:Gl,origin:Uv},Symbol.toStringTag,{value:"Module"})),...Qv};function Kv(e,t){return xr(e,new v2.classes.URLSearchParams,{visitor:function(o,n,s,a){return v2.isNode&&h0.isBuffer(o)?(this.append(n,o.toString("base64")),!1):a.defaultVisitor.apply(this,arguments)},...t})}function jv(e){return h0.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function Gv(e){const t={},o=Object.keys(e);let n;const s=o.length;let a;for(n=0;n<s;n++)a=o[n],t[a]=e[a];return t}function Lb(e){function t(o,n,s,a){let r=o[a++];if(r==="__proto__")return!0;const i=Number.isFinite(+r),c=a>=o.length;return r=!r&&h0.isArray(s)?s.length:r,c?(h0.hasOwnProp(s,r)?s[r]=[s[r],n]:s[r]=n,!i):((!s[r]||!h0.isObject(s[r]))&&(s[r]=[]),t(o,n,s[r],a)&&h0.isArray(s[r])&&(s[r]=Gv(s[r])),!i)}if(h0.isFormData(e)&&h0.isFunction(e.entries)){const o={};return h0.forEachEntry(e,(n,s)=>{t(jv(n),s,o,0)}),o}return null}function Yv(e,t,o){if(h0.isString(e))try{return(t||JSON.parse)(e),h0.trim(e)}catch(n){if(n.name!=="SyntaxError")throw n}return(o||JSON.stringify)(e)}const Bs={transitional:Wb,adapter:["xhr","http","fetch"],transformRequest:[function(t,o){const n=o.getContentType()||"",s=n.indexOf("application/json")>-1,a=h0.isObject(t);if(a&&h0.isHTMLForm(t)&&(t=new FormData(t)),h0.isFormData(t))return s?JSON.stringify(Lb(t)):t;if(h0.isArrayBuffer(t)||h0.isBuffer(t)||h0.isStream(t)||h0.isFile(t)||h0.isBlob(t)||h0.isReadableStream(t))return t;if(h0.isArrayBufferView(t))return t.buffer;if(h0.isURLSearchParams(t))return o.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let i;if(a){if(n.indexOf("application/x-www-form-urlencoded")>-1)return Kv(t,this.formSerializer).toString();if((i=h0.isFileList(t))||n.indexOf("multipart/form-data")>-1){const c=this.env&&this.env.FormData;return xr(i?{"files[]":t}:t,c&&new c,this.formSerializer)}}return a||s?(o.setContentType("application/json",!1),Yv(t)):t}],transformResponse:[function(t){const o=this.transitional||Bs.transitional,n=o&&o.forcedJSONParsing,s=this.responseType==="json";if(h0.isResponse(t)||h0.isReadableStream(t))return t;if(t&&h0.isString(t)&&(n&&!this.responseType||s)){const r=!(o&&o.silentJSONParsing)&&s;try{return JSON.parse(t,this.parseReviver)}catch(i){if(r)throw i.name==="SyntaxError"?s1.from(i,s1.ERR_BAD_RESPONSE,this,null,this.response):i}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:v2.classes.FormData,Blob:v2.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};h0.forEach(["delete","get","head","post","put","patch"],e=>{Bs.headers[e]={}});const Xv=h0.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Zv=e=>{const t={};let o,n,s;return e&&e.split(`
470
470
  `).forEach(function(r){s=r.indexOf(":"),o=r.substring(0,s).trim().toLowerCase(),n=r.substring(s+1).trim(),!(!o||t[o]&&Xv[o])&&(o==="set-cookie"?t[o]?t[o].push(n):t[o]=[n]:t[o]=t[o]?t[o]+", "+n:n)}),t},Tb=Symbol("internals");function Ws(e){return e&&String(e).trim().toLowerCase()}function Dr(e){return e===!1||e==null?e:h0.isArray(e)?e.map(Dr):String(e)}function Jv(e){const t=Object.create(null),o=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=o.exec(e);)t[n[1]]=n[2];return t}const $v=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Yl(e,t,o,n,s){if(h0.isFunction(n))return n.call(this,t,o);if(s&&(t=o),!!h0.isString(t)){if(h0.isString(n))return t.indexOf(n)!==-1;if(h0.isRegExp(n))return n.test(t)}}function eE(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,o,n)=>o.toUpperCase()+n)}function tE(e,t){const o=h0.toCamelCase(" "+t);["get","set","has"].forEach(n=>{Object.defineProperty(e,n+o,{value:function(s,a,r){return this[n].call(this,t,s,a,r)},configurable:!0})})}let Q2=class{constructor(t){t&&this.set(t)}set(t,o,n){const s=this;function a(i,c,l){const p=Ws(c);if(!p)throw new Error("header name must be a non-empty string");const d=h0.findKey(s,p);(!d||s[d]===void 0||l===!0||l===void 0&&s[d]!==!1)&&(s[d||c]=Dr(i))}const r=(i,c)=>h0.forEach(i,(l,p)=>a(l,p,c));if(h0.isPlainObject(t)||t instanceof this.constructor)r(t,o);else if(h0.isString(t)&&(t=t.trim())&&!$v(t))r(Zv(t),o);else if(h0.isObject(t)&&h0.isIterable(t)){let i={},c,l;for(const p of t){if(!h0.isArray(p))throw TypeError("Object iterator must return a key-value pair");i[l=p[0]]=(c=i[l])?h0.isArray(c)?[...c,p[1]]:[c,p[1]]:p[1]}r(i,o)}else t!=null&&a(o,t,n);return this}get(t,o){if(t=Ws(t),t){const n=h0.findKey(this,t);if(n){const s=this[n];if(!o)return s;if(o===!0)return Jv(s);if(h0.isFunction(o))return o.call(this,s,n);if(h0.isRegExp(o))return o.exec(s);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,o){if(t=Ws(t),t){const n=h0.findKey(this,t);return!!(n&&this[n]!==void 0&&(!o||Yl(this,this[n],n,o)))}return!1}delete(t,o){const n=this;let s=!1;function a(r){if(r=Ws(r),r){const i=h0.findKey(n,r);i&&(!o||Yl(n,n[i],i,o))&&(delete n[i],s=!0)}}return h0.isArray(t)?t.forEach(a):a(t),s}clear(t){const o=Object.keys(this);let n=o.length,s=!1;for(;n--;){const a=o[n];(!t||Yl(this,this[a],a,t,!0))&&(delete this[a],s=!0)}return s}normalize(t){const o=this,n={};return h0.forEach(this,(s,a)=>{const r=h0.findKey(n,a);if(r){o[r]=Dr(s),delete o[a];return}const i=t?eE(a):String(a).trim();i!==a&&delete o[a],o[i]=Dr(s),n[i]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const o=Object.create(null);return h0.forEach(this,(n,s)=>{n!=null&&n!==!1&&(o[s]=t&&h0.isArray(n)?n.join(", "):n)}),o}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,o])=>t+": "+o).join(`
471
471
  `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...o){const n=new this(t);return o.forEach(s=>n.set(s)),n}static accessor(t){const n=(this[Tb]=this[Tb]={accessors:{}}).accessors,s=this.prototype;function a(r){const i=Ws(r);n[i]||(tE(s,r),n[i]=!0)}return h0.isArray(t)?t.forEach(a):a(t),this}};Q2.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),h0.reduceDescriptors(Q2.prototype,({value:e},t)=>{let o=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(n){this[o]=n}}}),h0.freezeMethods(Q2);function Xl(e,t){const o=this||Bs,n=t||o,s=Q2.from(n.headers);let a=n.data;return h0.forEach(e,function(i){a=i.call(o,a,s.normalize(),t?t.status:void 0)}),s.normalize(),a}function Ib(e){return!!(e&&e.__CANCEL__)}function bn(e,t,o){s1.call(this,e??"canceled",s1.ERR_CANCELED,t,o),this.name="CanceledError"}h0.inherits(bn,s1,{__CANCEL__:!0});function Nb(e,t,o){const n=o.config.validateStatus;!o.status||!n||n(o.status)?e(o):t(new s1("Request failed with status code "+o.status,[s1.ERR_BAD_REQUEST,s1.ERR_BAD_RESPONSE][Math.floor(o.status/100)-4],o.config,o.request,o))}function oE(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function nE(e,t){e=e||10;const o=new Array(e),n=new Array(e);let s=0,a=0,r;return t=t!==void 0?t:1e3,function(c){const l=Date.now(),p=n[a];r||(r=l),o[s]=c,n[s]=l;let d=a,b=0;for(;d!==s;)b+=o[d++],d=d%e;if(s=(s+1)%e,s===a&&(a=(a+1)%e),l-r<t)return;const M=p&&l-p;return M?Math.round(b*1e3/M):void 0}}function sE(e,t){let o=0,n=1e3/t,s,a;const r=(l,p=Date.now())=>{o=p,s=null,a&&(clearTimeout(a),a=null),e(...l)};return[(...l)=>{const p=Date.now(),d=p-o;d>=n?r(l,p):(s=l,a||(a=setTimeout(()=>{a=null,r(s)},n-d)))},()=>s&&r(s)]}const Pr=(e,t,o=3)=>{let n=0;const s=nE(50,250);return sE(a=>{const r=a.loaded,i=a.lengthComputable?a.total:void 0,c=r-n,l=s(c),p=r<=i;n=r;const d={loaded:r,total:i,progress:i?r/i:void 0,bytes:c,rate:l||void 0,estimated:l&&i&&p?(i-r)/l:void 0,event:a,lengthComputable:i!=null,[t?"download":"upload"]:!0};e(d)},o)},xb=(e,t)=>{const o=e!=null;return[n=>t[0]({lengthComputable:o,total:e,loaded:n}),t[1]]},Db=e=>(...t)=>h0.asap(()=>e(...t)),aE=v2.hasStandardBrowserEnv?((e,t)=>o=>(o=new URL(o,v2.origin),e.protocol===o.protocol&&e.host===o.host&&(t||e.port===o.port)))(new URL(v2.origin),v2.navigator&&/(msie|trident)/i.test(v2.navigator.userAgent)):()=>!0,rE=v2.hasStandardBrowserEnv?{write(e,t,o,n,s,a){const r=[e+"="+encodeURIComponent(t)];h0.isNumber(o)&&r.push("expires="+new Date(o).toGMTString()),h0.isString(n)&&r.push("path="+n),h0.isString(s)&&r.push("domain="+s),a===!0&&r.push("secure"),document.cookie=r.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function iE(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function cE(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function Pb(e,t,o){let n=!iE(t);return e&&(n||o==!1)?cE(e,t):t}const Fb=e=>e instanceof Q2?{...e}:e;function Oo(e,t){t=t||{};const o={};function n(l,p,d,b){return h0.isPlainObject(l)&&h0.isPlainObject(p)?h0.merge.call({caseless:b},l,p):h0.isPlainObject(p)?h0.merge({},p):h0.isArray(p)?p.slice():p}function s(l,p,d,b){if(h0.isUndefined(p)){if(!h0.isUndefined(l))return n(void 0,l,d,b)}else return n(l,p,d,b)}function a(l,p){if(!h0.isUndefined(p))return n(void 0,p)}function r(l,p){if(h0.isUndefined(p)){if(!h0.isUndefined(l))return n(void 0,l)}else return n(void 0,p)}function i(l,p,d){if(d in t)return n(l,p);if(d in e)return n(void 0,l)}const c={url:a,method:a,data:a,baseURL:r,transformRequest:r,transformResponse:r,paramsSerializer:r,timeout:r,timeoutMessage:r,withCredentials:r,withXSRFToken:r,adapter:r,responseType:r,xsrfCookieName:r,xsrfHeaderName:r,onUploadProgress:r,onDownloadProgress:r,decompress:r,maxContentLength:r,maxBodyLength:r,beforeRedirect:r,transport:r,httpAgent:r,httpsAgent:r,cancelToken:r,socketPath:r,responseEncoding:r,validateStatus:i,headers:(l,p,d)=>s(Fb(l),Fb(p),d,!0)};return h0.forEach(Object.keys({...e,...t}),function(p){const d=c[p]||s,b=d(e[p],t[p],p);h0.isUndefined(b)&&d!==i||(o[p]=b)}),o}const Qb=e=>{const t=Oo({},e);let{data:o,withXSRFToken:n,xsrfHeaderName:s,xsrfCookieName:a,headers:r,auth:i}=t;if(t.headers=r=Q2.from(r),t.url=Rb(Pb(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),i&&r.set("Authorization","Basic "+btoa((i.username||"")+":"+(i.password?unescape(encodeURIComponent(i.password)):""))),h0.isFormData(o)){if(v2.hasStandardBrowserEnv||v2.hasStandardBrowserWebWorkerEnv)r.setContentType(void 0);else if(h0.isFunction(o.getHeaders)){const c=o.getHeaders(),l=["content-type","content-length"];Object.entries(c).forEach(([p,d])=>{l.includes(p.toLowerCase())&&r.set(p,d)})}}if(v2.hasStandardBrowserEnv&&(n&&h0.isFunction(n)&&(n=n(t)),n||n!==!1&&aE(t.url))){const c=s&&a&&rE.read(a);c&&r.set(s,c)}return t},lE=typeof XMLHttpRequest<"u"&&function(e){return new Promise(function(o,n){const s=Qb(e);let a=s.data;const r=Q2.from(s.headers).normalize();let{responseType:i,onUploadProgress:c,onDownloadProgress:l}=s,p,d,b,M,f;function m(){M&&M(),f&&f(),s.cancelToken&&s.cancelToken.unsubscribe(p),s.signal&&s.signal.removeEventListener("abort",p)}let O=new XMLHttpRequest;O.open(s.method.toUpperCase(),s.url,!0),O.timeout=s.timeout;function g(){if(!O)return;const E=Q2.from("getAllResponseHeaders"in O&&O.getAllResponseHeaders()),T={data:!i||i==="text"||i==="json"?O.responseText:O.response,status:O.status,statusText:O.statusText,headers:E,config:e,request:O};Nb(function(Q){o(Q),m()},function(Q){n(Q),m()},T),O=null}"onloadend"in O?O.onloadend=g:O.onreadystatechange=function(){!O||O.readyState!==4||O.status===0&&!(O.responseURL&&O.responseURL.indexOf("file:")===0)||setTimeout(g)},O.onabort=function(){O&&(n(new s1("Request aborted",s1.ECONNABORTED,e,O)),O=null)},O.onerror=function(L){const T=L&&L.message?L.message:"Network Error",I=new s1(T,s1.ERR_NETWORK,e,O);I.event=L||null,n(I),O=null},O.ontimeout=function(){let L=s.timeout?"timeout of "+s.timeout+"ms exceeded":"timeout exceeded";const T=s.transitional||Wb;s.timeoutErrorMessage&&(L=s.timeoutErrorMessage),n(new s1(L,T.clarifyTimeoutError?s1.ETIMEDOUT:s1.ECONNABORTED,e,O)),O=null},a===void 0&&r.setContentType(null),"setRequestHeader"in O&&h0.forEach(r.toJSON(),function(L,T){O.setRequestHeader(T,L)}),h0.isUndefined(s.withCredentials)||(O.withCredentials=!!s.withCredentials),i&&i!=="json"&&(O.responseType=s.responseType),l&&([b,f]=Pr(l,!0),O.addEventListener("progress",b)),c&&O.upload&&([d,M]=Pr(c),O.upload.addEventListener("progress",d),O.upload.addEventListener("loadend",M)),(s.cancelToken||s.signal)&&(p=E=>{O&&(n(!E||E.type?new bn(null,e,O):E),O.abort(),O=null)},s.cancelToken&&s.cancelToken.subscribe(p),s.signal&&(s.signal.aborted?p():s.signal.addEventListener("abort",p)));const C=oE(s.url);if(C&&v2.protocols.indexOf(C)===-1){n(new s1("Unsupported protocol "+C+":",s1.ERR_BAD_REQUEST,e));return}O.send(a||null)})},pE=(e,t)=>{const{length:o}=e=e?e.filter(Boolean):[];if(t||o){let n=new AbortController,s;const a=function(l){if(!s){s=!0,i();const p=l instanceof Error?l:this.reason;n.abort(p instanceof s1?p:new bn(p instanceof Error?p.message:p))}};let r=t&&setTimeout(()=>{r=null,a(new s1(`timeout ${t} of ms exceeded`,s1.ETIMEDOUT))},t);const i=()=>{e&&(r&&clearTimeout(r),r=null,e.forEach(l=>{l.unsubscribe?l.unsubscribe(a):l.removeEventListener("abort",a)}),e=null)};e.forEach(l=>l.addEventListener("abort",a));const{signal:c}=n;return c.unsubscribe=()=>h0.asap(i),c}},dE=function*(e,t){let o=e.byteLength;if(o<t){yield e;return}let n=0,s;for(;n<o;)s=n+t,yield e.slice(n,s),n=s},uE=async function*(e,t){for await(const o of bE(e))yield*dE(o,t)},bE=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:o,value:n}=await t.read();if(o)break;yield n}}finally{await t.cancel()}},Hb=(e,t,o,n)=>{const s=uE(e,t);let a=0,r,i=c=>{r||(r=!0,n&&n(c))};return new ReadableStream({async pull(c){try{const{done:l,value:p}=await s.next();if(l){i(),c.close();return}let d=p.byteLength;if(o){let b=a+=d;o(b)}c.enqueue(new Uint8Array(p))}catch(l){throw i(l),l}},cancel(c){return i(c),s.return()}},{highWaterMark:2})},Vb=64*1024,{isFunction:Fr}=h0,hE=(({Request:e,Response:t})=>({Request:e,Response:t}))(h0.global),{ReadableStream:Ub,TextEncoder:Kb}=h0.global,jb=(e,...t)=>{try{return!!e(...t)}catch{return!1}},ME=e=>{e=h0.merge.call({skipUndefined:!0},hE,e);const{fetch:t,Request:o,Response:n}=e,s=t?Fr(t):typeof fetch=="function",a=Fr(o),r=Fr(n);if(!s)return!1;const i=s&&Fr(Ub),c=s&&(typeof Kb=="function"?(f=>m=>f.encode(m))(new Kb):async f=>new Uint8Array(await new o(f).arrayBuffer())),l=a&&i&&jb(()=>{let f=!1;const m=new o(v2.origin,{body:new Ub,method:"POST",get duplex(){return f=!0,"half"}}).headers.has("Content-Type");return f&&!m}),p=r&&i&&jb(()=>h0.isReadableStream(new n("").body)),d={stream:p&&(f=>f.body)};s&&["text","arrayBuffer","blob","formData","stream"].forEach(f=>{!d[f]&&(d[f]=(m,O)=>{let g=m&&m[f];if(g)return g.call(m);throw new s1(`Response type '${f}' is not supported`,s1.ERR_NOT_SUPPORT,O)})});const b=async f=>{if(f==null)return 0;if(h0.isBlob(f))return f.size;if(h0.isSpecCompliantForm(f))return(await new o(v2.origin,{method:"POST",body:f}).arrayBuffer()).byteLength;if(h0.isArrayBufferView(f)||h0.isArrayBuffer(f))return f.byteLength;if(h0.isURLSearchParams(f)&&(f=f+""),h0.isString(f))return(await c(f)).byteLength},M=async(f,m)=>{const O=h0.toFiniteNumber(f.getContentLength());return O??b(m)};return async f=>{let{url:m,method:O,data:g,signal:C,cancelToken:E,timeout:L,onDownloadProgress:T,onUploadProgress:I,responseType:Q,headers:z,withCredentials:x="same-origin",fetchOptions:q}=Qb(f),R=t||fetch;Q=Q?(Q+"").toLowerCase():"text";let H=pE([C,E&&E.toAbortSignal()],L),w=null;const N=H&&H.unsubscribe&&(()=>{H.unsubscribe()});let v;try{if(I&&l&&O!=="get"&&O!=="head"&&(v=await M(z,g))!==0){let o0=new o(m,{method:"POST",body:g,duplex:"half"}),a0;if(h0.isFormData(g)&&(a0=o0.headers.get("content-type"))&&z.setContentType(a0),o0.body){const[D,Y]=xb(v,Pr(Db(I)));g=Hb(o0.body,Vb,D,Y)}}h0.isString(x)||(x=x?"include":"omit");const V=a&&"credentials"in o.prototype,F={...q,signal:H,method:O.toUpperCase(),headers:z.normalize().toJSON(),body:g,duplex:"half",credentials:V?x:void 0};w=a&&new o(m,F);let $=await(a?R(w,q):R(m,F));const t0=p&&(Q==="stream"||Q==="response");if(p&&(T||t0&&N)){const o0={};["status","statusText","headers"].forEach(j=>{o0[j]=$[j]});const a0=h0.toFiniteNumber($.headers.get("content-length")),[D,Y]=T&&xb(a0,Pr(Db(T),!0))||[];$=new n(Hb($.body,Vb,D,()=>{Y&&Y(),N&&N()}),o0)}Q=Q||"text";let B=await d[h0.findKey(d,Q)||"text"]($,f);return!t0&&N&&N(),await new Promise((o0,a0)=>{Nb(o0,a0,{data:B,headers:Q2.from($.headers),status:$.status,statusText:$.statusText,config:f,request:w})})}catch(V){throw N&&N(),V&&V.name==="TypeError"&&/Load failed|fetch/i.test(V.message)?Object.assign(new s1("Network Error",s1.ERR_NETWORK,f,w),{cause:V.cause||V}):s1.from(V,V&&V.code,f,w)}}},fE=new Map,Gb=e=>{let t=e?e.env:{};const{fetch:o,Request:n,Response:s}=t,a=[n,s,o];let r=a.length,i=r,c,l,p=fE;for(;i--;)c=a[i],l=p.get(c),l===void 0&&p.set(c,l=i?new Map:ME(t)),p=l;return l};Gb();const Zl={http:xv,xhr:lE,fetch:{get:Gb}};h0.forEach(Zl,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const Yb=e=>`- ${e}`,_E=e=>h0.isFunction(e)||e===null||e===!1,Xb={getAdapter:(e,t)=>{e=h0.isArray(e)?e:[e];const{length:o}=e;let n,s;const a={};for(let r=0;r<o;r++){n=e[r];let i;if(s=n,!_E(n)&&(s=Zl[(i=String(n)).toLowerCase()],s===void 0))throw new s1(`Unknown adapter '${i}'`);if(s&&(h0.isFunction(s)||(s=s.get(t))))break;a[i||"#"+r]=s}if(!s){const r=Object.entries(a).map(([c,l])=>`adapter ${c} `+(l===!1?"is not supported by the environment":"is not available in the build"));let i=o?r.length>1?`since :
472
472
  `+r.map(Yb).join(`
@@ -13288,7 +13288,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
13288
13288
  </Card>
13289
13289
  );
13290
13290
  }
13291
- `;const SK=({children:e,message:t,sendFeedback:o,fetchMessagePair:n,handleSendMessage:s,suggestedMessages:a})=>{const[r,i]=h.useState(null),[c,l]=h.useState(!1),[p,d]=h.useState(""),[b,M]=h.useState(!1),[f,m]=h.useState(!1),{isInCustomerView:O,flags:g}=pn(),{t:C}=Zn(),E={Accurate:C("accurate",{defaultValue:"Accurate"}),Helpful:C("helpful",{defaultValue:"Helpful"}),"Followed instructions":C("followedInstructions",{defaultValue:"Followed instructions"}),"Saved time":C("savedTime",{defaultValue:"Saved time"}),"It's something else...":C("somethingElse",{defaultValue:"It's something else..."})},L={Inaccurate:C("inaccurate",{defaultValue:"Inaccurate"}),"Too long":C("tooLong",{defaultValue:"Too long"}),"Too short":C("tooShort",{defaultValue:"Too short"}),"Not helpful":C("notHelpful",{defaultValue:"Not helpful"}),"It's something else...":C("somethingElse",{defaultValue:"It's something else..."})},T={feedback:""},{formValue:I,formMeta:Q,updateForm:z}=z3(T);async function x(N){d(N),M(!0),l(!1),z(T),t?.id&&r!==null&&o&&o(t.id,r,N)}function q(){i(null),l(!1),d(""),M(!1),z(T)}async function R(){if(n&&s&&t?.id){const N=await n(t.id);N?.request&&await s(N.request)}}async function H(){try{await navigator.clipboard.writeText(t?.content||""),m(!0),setTimeout(()=>m(!1),2e3)}catch(N){console.error("Error copying message",N)}}function w(N){s&&s(N)}return u0.jsxs("div",{className:"agent-message",children:[u0.jsx("div",{className:"agent-icon",children:g?.agentBeta?u0.jsx("img",{src:Du,alt:"AI Logo (beta)",width:40,height:40,style:{marginTop:"10px"}}):u0.jsx("img",{src:xu,alt:"AI Logo",width:32,height:32})}),u0.jsxs("div",{className:"agent-message-content",children:[e,t&&a&&u0.jsx("div",{className:"suggested-questions",children:a.map((N,v)=>u0.jsx(cd,{onClick:()=>w(N),children:N},`${N} - ${v}`))}),t&&u0.jsxs("div",{className:"agent-message-buttons",children:[f?u0.jsx(U1,{kind:"icon",icon:"checkmark",className:O2({color:"green-medium",marginRight:"xxs"})}):u0.jsx(U1,{kind:"icon",icon:"duplicate",title:"Copy",onClick:H}),u0.jsx(U1,{kind:"icon",icon:"redo",title:"Retry",onClick:R}),u0.jsx(U1,{kind:"icon",icon:r==="1.0"?"thumbs-up":"thumbs-up-outline",title:"Helpful",onClick:()=>{O||(i("1.0"),l(!0),M(!1))}}),u0.jsx(U1,{kind:"icon",icon:r==="0.0"?"thumbs-down":"thumbs-down-outline",title:"Unhelpful",onClick:()=>{O||(i("0.0"),l(!0),M(!1))}})]}),c&&u0.jsx(u0.Fragment,{children:u0.jsxs(N7,{children:[u0.jsxs(ld,{style:{borderBottom:"none"},children:[u0.jsx(x7,{children:C("tellUsMore",{defaultValue:"Tell us more"})}),u0.jsx(U1,{kind:"icon",icon:"x",onClick:()=>{q()}})]}),p==="It's something else..."?u0.jsxs(u0.Fragment,{children:[u0.jsx(y4,{for:Q.fields.feedback,children:C("feedback",{defaultValue:"Feedback"})}),u0.jsx($_,{value:I.feedback,formMeta:Q.fields.feedback,additionalText:C("feedbackAdditionalText",{defaultValue:"Provide feedback. Feel free to add specific details."})}),u0.jsx(U1,{kind:"confirm",className:O2({mt:"sm"}),onClick:()=>x(I.feedback),children:C("submit",{defaultValue:"Submit"})})]}):u0.jsx(u0.Fragment,{children:Object.keys(r==="1.0"?E:L).map(N=>u0.jsx(U1,{className:O2({mr:"sm",mb:"sm"}),onClick:()=>{d(N),N!=="It's something else..."&&(l(!1),x(N))},children:r==="1.0"?E[N]:L[N]},N))})]})}),b&&u0.jsx("div",{className:O2({pt:"md"}),children:u0.jsx("p",{className:"feedback-submitted",children:C("thankYouForYourFeedback",{defaultValue:"Thank you for your feedback!"})})})]})]})},zc=h.memo(SK);function yK(e,t,o){return t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function F7(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),o.push.apply(o,n)}return o}function Q7(e){for(var t=1;t<arguments.length;t++){var o=arguments[t]!=null?arguments[t]:{};t%2?F7(Object(o),!0).forEach(function(n){yK(e,n,o[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):F7(Object(o)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(o,n))})}return e}var RK=(e,t,o)=>{for(var n of Object.keys(e)){var s;if(e[n]!==((s=t[n])!==null&&s!==void 0?s:o[n]))return!1}return!0},pd=e=>t=>{var o=e.defaultClassName,n=Q7(Q7({},e.defaultVariants),t);for(var s in n){var a,r=(a=n[s])!==null&&a!==void 0?a:e.defaultVariants[s];if(r!=null){var i=r;typeof i=="boolean"&&(i=i===!0?"true":"false");var c=e.variantClassNames[s][i];c&&(o+=" "+c)}}for(var[l,p]of e.compoundVariants)RK(l,n,e.defaultVariants)&&(o+=" "+p);return o},BK=pd({defaultClassName:"pkg_sps-woodland_feedback-block__version_8_42_4__hash_1r00l560",variantClassNames:{kind:{tip:"pkg_sps-woodland_feedback-block__version_8_42_4__hash_1r00l561",success:"pkg_sps-woodland_feedback-block__version_8_42_4__hash_1r00l562",warning:"pkg_sps-woodland_feedback-block__version_8_42_4__hash_1r00l563",info:"pkg_sps-woodland_feedback-block__version_8_42_4__hash_1r00l564",error:"pkg_sps-woodland_feedback-block__version_8_42_4__hash_1r00l565"},micro:{true:"pkg_sps-woodland_feedback-block__version_8_42_4__hash_1r00l566",false:"pkg_sps-woodland_feedback-block__version_8_42_4__hash_1r00l567"}},defaultVariants:{kind:"tip",micro:!1},compoundVariants:[]}),WK=pd({defaultClassName:"",variantClassNames:{kind:{tip:"pkg_sps-woodland_feedback-block__version_8_42_4__hash_1r00l568",success:"pkg_sps-woodland_feedback-block__version_8_42_4__hash_1r00l569",warning:"pkg_sps-woodland_feedback-block__version_8_42_4__hash_1r00l56a",info:"pkg_sps-woodland_feedback-block__version_8_42_4__hash_1r00l56b",error:"pkg_sps-woodland_feedback-block__version_8_42_4__hash_1r00l56c"},micro:{true:"pkg_sps-woodland_feedback-block__version_8_42_4__hash_1r00l56d",false:"pkg_sps-woodland_feedback-block__version_8_42_4__hash_1r00l56e"}},defaultVariants:{kind:"tip",micro:!1},compoundVariants:[[{kind:"tip",micro:!0},"pkg_sps-woodland_feedback-block__version_8_42_4__hash_1r00l56f"]]}),LK=pd({defaultClassName:"",variantClassNames:{micro:{true:"pkg_sps-woodland_feedback-block__version_8_42_4__hash_1r00l56g",false:"pkg_sps-woodland_feedback-block__version_8_42_4__hash_1r00l56h"}},defaultVariants:{micro:!1},compoundVariants:[]});const TK=Object.freeze({tip:"lightbulb",success:"checkmark",warning:"exclamation-triangle",error:"exclamation-circle",info:"info-circle"});function Ac({children:e,className:t,kind:o="tip",micro:n,...s}){return h.createElement("div",{className:Y1(BK({kind:o,micro:n}),t),...s},h.createElement(It,{size:n?"sm":"lg",className:WK({kind:o,micro:n}),icon:TK[o],"aria-hidden":"true"}),h.createElement("span",{className:LK({micro:n})},e))}v1.set(Ac,{name:"FeedbackBlock",props:{kind:{type:"FeedbackBlockKind",default:"tip"},micro:{type:"boolean",default:"false"}}}),y`
13291
+ `;const SK=({children:e,message:t,sendFeedback:o,fetchMessagePair:n,handleSendMessage:s,suggestedMessages:a})=>{const[r,i]=h.useState(null),[c,l]=h.useState(!1),[p,d]=h.useState(""),[b,M]=h.useState(!1),[f,m]=h.useState(!1),{isInCustomerView:O,flags:g}=pn(),{t:C}=Zn(),E={Accurate:C("accurate",{defaultValue:"Accurate"}),Helpful:C("helpful",{defaultValue:"Helpful"}),"Followed instructions":C("followedInstructions",{defaultValue:"Followed instructions"}),"Saved time":C("savedTime",{defaultValue:"Saved time"}),"It's something else...":C("somethingElse",{defaultValue:"It's something else..."})},L={Inaccurate:C("inaccurate",{defaultValue:"Inaccurate"}),"Too long":C("tooLong",{defaultValue:"Too long"}),"Too short":C("tooShort",{defaultValue:"Too short"}),"Not helpful":C("notHelpful",{defaultValue:"Not helpful"}),"It's something else...":C("somethingElse",{defaultValue:"It's something else..."})},T={feedback:""},{formValue:I,formMeta:Q,updateForm:z}=z3(T);async function x(N){d(N),M(!0),l(!1),z(T),t?.id&&r!==null&&o&&o(t.id,r,N)}function q(){i(null),l(!1),d(""),M(!1),z(T)}async function R(){if(n&&s&&t?.id){const N=await n(t.id);N?.request&&await s(N.request)}}async function H(){try{await navigator.clipboard.writeText(t?.content||""),m(!0),setTimeout(()=>m(!1),2e3)}catch(N){console.error("Error copying message",N)}}function w(N){s&&s(N)}return u0.jsxs("div",{className:"agent-message",children:[u0.jsx("div",{className:"agent-icon",children:g?.["max-beta"]?u0.jsx("img",{src:Du,alt:"AI Logo (beta)",width:40,height:40,style:{marginTop:"10px"}}):u0.jsx("img",{src:xu,alt:"AI Logo",width:32,height:32})}),u0.jsxs("div",{className:"agent-message-content",children:[e,t&&a&&u0.jsx("div",{className:"suggested-questions",children:a.map((N,v)=>u0.jsx(cd,{onClick:()=>w(N),children:N},`${N} - ${v}`))}),t&&u0.jsxs("div",{className:"agent-message-buttons",children:[f?u0.jsx(U1,{kind:"icon",icon:"checkmark",className:O2({color:"green-medium",marginRight:"xxs"})}):u0.jsx(U1,{kind:"icon",icon:"duplicate",title:"Copy",onClick:H}),u0.jsx(U1,{kind:"icon",icon:"redo",title:"Retry",onClick:R}),u0.jsx(U1,{kind:"icon",icon:r==="1.0"?"thumbs-up":"thumbs-up-outline",title:"Helpful",onClick:()=>{O||(i("1.0"),l(!0),M(!1))}}),u0.jsx(U1,{kind:"icon",icon:r==="0.0"?"thumbs-down":"thumbs-down-outline",title:"Unhelpful",onClick:()=>{O||(i("0.0"),l(!0),M(!1))}})]}),c&&u0.jsx(u0.Fragment,{children:u0.jsxs(N7,{children:[u0.jsxs(ld,{style:{borderBottom:"none"},children:[u0.jsx(x7,{children:C("tellUsMore",{defaultValue:"Tell us more"})}),u0.jsx(U1,{kind:"icon",icon:"x",onClick:()=>{q()}})]}),p==="It's something else..."?u0.jsxs(u0.Fragment,{children:[u0.jsx(y4,{for:Q.fields.feedback,children:C("feedback",{defaultValue:"Feedback"})}),u0.jsx($_,{value:I.feedback,formMeta:Q.fields.feedback,additionalText:C("feedbackAdditionalText",{defaultValue:"Provide feedback. Feel free to add specific details."})}),u0.jsx(U1,{kind:"confirm",className:O2({mt:"sm"}),onClick:()=>x(I.feedback),children:C("submit",{defaultValue:"Submit"})})]}):u0.jsx(u0.Fragment,{children:Object.keys(r==="1.0"?E:L).map(N=>u0.jsx(U1,{className:O2({mr:"sm",mb:"sm"}),onClick:()=>{d(N),N!=="It's something else..."&&(l(!1),x(N))},children:r==="1.0"?E[N]:L[N]},N))})]})}),b&&u0.jsx("div",{className:O2({pt:"md"}),children:u0.jsx("p",{className:"feedback-submitted",children:C("thankYouForYourFeedback",{defaultValue:"Thank you for your feedback!"})})})]})]})},zc=h.memo(SK);function yK(e,t,o){return t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function F7(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),o.push.apply(o,n)}return o}function Q7(e){for(var t=1;t<arguments.length;t++){var o=arguments[t]!=null?arguments[t]:{};t%2?F7(Object(o),!0).forEach(function(n){yK(e,n,o[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):F7(Object(o)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(o,n))})}return e}var RK=(e,t,o)=>{for(var n of Object.keys(e)){var s;if(e[n]!==((s=t[n])!==null&&s!==void 0?s:o[n]))return!1}return!0},pd=e=>t=>{var o=e.defaultClassName,n=Q7(Q7({},e.defaultVariants),t);for(var s in n){var a,r=(a=n[s])!==null&&a!==void 0?a:e.defaultVariants[s];if(r!=null){var i=r;typeof i=="boolean"&&(i=i===!0?"true":"false");var c=e.variantClassNames[s][i];c&&(o+=" "+c)}}for(var[l,p]of e.compoundVariants)RK(l,n,e.defaultVariants)&&(o+=" "+p);return o},BK=pd({defaultClassName:"pkg_sps-woodland_feedback-block__version_8_42_4__hash_1r00l560",variantClassNames:{kind:{tip:"pkg_sps-woodland_feedback-block__version_8_42_4__hash_1r00l561",success:"pkg_sps-woodland_feedback-block__version_8_42_4__hash_1r00l562",warning:"pkg_sps-woodland_feedback-block__version_8_42_4__hash_1r00l563",info:"pkg_sps-woodland_feedback-block__version_8_42_4__hash_1r00l564",error:"pkg_sps-woodland_feedback-block__version_8_42_4__hash_1r00l565"},micro:{true:"pkg_sps-woodland_feedback-block__version_8_42_4__hash_1r00l566",false:"pkg_sps-woodland_feedback-block__version_8_42_4__hash_1r00l567"}},defaultVariants:{kind:"tip",micro:!1},compoundVariants:[]}),WK=pd({defaultClassName:"",variantClassNames:{kind:{tip:"pkg_sps-woodland_feedback-block__version_8_42_4__hash_1r00l568",success:"pkg_sps-woodland_feedback-block__version_8_42_4__hash_1r00l569",warning:"pkg_sps-woodland_feedback-block__version_8_42_4__hash_1r00l56a",info:"pkg_sps-woodland_feedback-block__version_8_42_4__hash_1r00l56b",error:"pkg_sps-woodland_feedback-block__version_8_42_4__hash_1r00l56c"},micro:{true:"pkg_sps-woodland_feedback-block__version_8_42_4__hash_1r00l56d",false:"pkg_sps-woodland_feedback-block__version_8_42_4__hash_1r00l56e"}},defaultVariants:{kind:"tip",micro:!1},compoundVariants:[[{kind:"tip",micro:!0},"pkg_sps-woodland_feedback-block__version_8_42_4__hash_1r00l56f"]]}),LK=pd({defaultClassName:"",variantClassNames:{micro:{true:"pkg_sps-woodland_feedback-block__version_8_42_4__hash_1r00l56g",false:"pkg_sps-woodland_feedback-block__version_8_42_4__hash_1r00l56h"}},defaultVariants:{micro:!1},compoundVariants:[]});const TK=Object.freeze({tip:"lightbulb",success:"checkmark",warning:"exclamation-triangle",error:"exclamation-circle",info:"info-circle"});function Ac({children:e,className:t,kind:o="tip",micro:n,...s}){return h.createElement("div",{className:Y1(BK({kind:o,micro:n}),t),...s},h.createElement(It,{size:n?"sm":"lg",className:WK({kind:o,micro:n}),icon:TK[o],"aria-hidden":"true"}),h.createElement("span",{className:LK({micro:n})},e))}v1.set(Ac,{name:"FeedbackBlock",props:{kind:{type:"FeedbackBlockKind",default:"tip"},micro:{type:"boolean",default:"false"}}}),y`
13292
13292
  import { FeedbackBlock } from "@sps-woodland/feedback-block";
13293
13293
 
13294
13294
  function Component() {
@@ -13417,4 +13417,4 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
13417
13417
  `,...a.current()});return/^[\t ]/.test(l)&&(l=Ua(l.charCodeAt(0))+l.slice(1)),l=l?r+" "+l:r,o.options.closeAtx&&(l+=" "+r),c(),i(),l}mm.peek=TZ;function mm(e){return e.value||""}function TZ(){return"<"}Om.peek=IZ;function Om(e,t,o,n){const s=Gd(o),a=s==='"'?"Quote":"Apostrophe",r=o.enter("image");let i=o.enter("label");const c=o.createTracker(n);let l=c.move("![");return l+=c.move(o.safe(e.alt,{before:l,after:"]",...c.current()})),l+=c.move("]("),i(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(i=o.enter("destinationLiteral"),l+=c.move("<"),l+=c.move(o.safe(e.url,{before:l,after:">",...c.current()})),l+=c.move(">")):(i=o.enter("destinationRaw"),l+=c.move(o.safe(e.url,{before:l,after:e.title?" ":")",...c.current()}))),i(),e.title&&(i=o.enter(`title${a}`),l+=c.move(" "+s),l+=c.move(o.safe(e.title,{before:l,after:s,...c.current()})),l+=c.move(s),i()),l+=c.move(")"),r(),l}function IZ(){return"!"}gm.peek=NZ;function gm(e,t,o,n){const s=e.referenceType,a=o.enter("imageReference");let r=o.enter("label");const i=o.createTracker(n);let c=i.move("![");const l=o.safe(e.alt,{before:c,after:"]",...i.current()});c+=i.move(l+"]["),r();const p=o.stack;o.stack=[],r=o.enter("reference");const d=o.safe(o.associationId(e),{before:c,after:"]",...i.current()});return r(),o.stack=p,a(),s==="full"||!l||l!==d?c+=i.move(d+"]"):s==="shortcut"?c=c.slice(0,-1):c+=i.move("]"),c}function NZ(){return"!"}Cm.peek=xZ;function Cm(e,t,o){let n=e.value||"",s="`",a=-1;for(;new RegExp("(^|[^`])"+s+"([^`]|$)").test(n);)s+="`";for(/[^ \r\n]/.test(n)&&(/^[ \r\n]/.test(n)&&/[ \r\n]$/.test(n)||/^`|`$/.test(n))&&(n=" "+n+" ");++a<o.unsafe.length;){const r=o.unsafe[a],i=o.compilePattern(r);let c;if(r.atBreak)for(;c=i.exec(n);){let l=c.index;n.charCodeAt(l)===10&&n.charCodeAt(l-1)===13&&l--,n=n.slice(0,l)+" "+n.slice(c.index+1)}}return s+n+s}function xZ(){return"`"}function km(e,t){const o=Od(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(o===e.url||"mailto:"+o===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}vm.peek=DZ;function vm(e,t,o,n){const s=Gd(o),a=s==='"'?"Quote":"Apostrophe",r=o.createTracker(n);let i,c;if(km(e,o)){const p=o.stack;o.stack=[],i=o.enter("autolink");let d=r.move("<");return d+=r.move(o.containerPhrasing(e,{before:d,after:">",...r.current()})),d+=r.move(">"),i(),o.stack=p,d}i=o.enter("link"),c=o.enter("label");let l=r.move("[");return l+=r.move(o.containerPhrasing(e,{before:l,after:"](",...r.current()})),l+=r.move("]("),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=o.enter("destinationLiteral"),l+=r.move("<"),l+=r.move(o.safe(e.url,{before:l,after:">",...r.current()})),l+=r.move(">")):(c=o.enter("destinationRaw"),l+=r.move(o.safe(e.url,{before:l,after:e.title?" ":")",...r.current()}))),c(),e.title&&(c=o.enter(`title${a}`),l+=r.move(" "+s),l+=r.move(o.safe(e.title,{before:l,after:s,...r.current()})),l+=r.move(s),c()),l+=r.move(")"),i(),l}function DZ(e,t,o){return km(e,o)?"<":"["}Em.peek=PZ;function Em(e,t,o,n){const s=e.referenceType,a=o.enter("linkReference");let r=o.enter("label");const i=o.createTracker(n);let c=i.move("[");const l=o.containerPhrasing(e,{before:c,after:"]",...i.current()});c+=i.move(l+"]["),r();const p=o.stack;o.stack=[],r=o.enter("reference");const d=o.safe(o.associationId(e),{before:c,after:"]",...i.current()});return r(),o.stack=p,a(),s==="full"||!l||l!==d?c+=i.move(d+"]"):s==="shortcut"?c=c.slice(0,-1):c+=i.move("]"),c}function PZ(){return"["}function Yd(e){const t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function FZ(e){const t=Yd(e),o=e.options.bulletOther;if(!o)return t==="*"?"-":"*";if(o!=="*"&&o!=="+"&&o!=="-")throw new Error("Cannot serialize items with `"+o+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(o===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+o+"`) to be different");return o}function QZ(e){const t=e.options.bulletOrdered||".";if(t!=="."&&t!==")")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function wm(e){const t=e.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function HZ(e,t,o,n){const s=o.enter("list"),a=o.bulletCurrent;let r=e.ordered?QZ(o):Yd(o);const i=e.ordered?r==="."?")":".":FZ(o);let c=t&&o.bulletLastUsed?r===o.bulletLastUsed:!1;if(!e.ordered){const p=e.children?e.children[0]:void 0;if((r==="*"||r==="-")&&p&&(!p.children||!p.children[0])&&o.stack[o.stack.length-1]==="list"&&o.stack[o.stack.length-2]==="listItem"&&o.stack[o.stack.length-3]==="list"&&o.stack[o.stack.length-4]==="listItem"&&o.indexStack[o.indexStack.length-1]===0&&o.indexStack[o.indexStack.length-2]===0&&o.indexStack[o.indexStack.length-3]===0&&(c=!0),wm(o)===r&&p){let d=-1;for(;++d<e.children.length;){const b=e.children[d];if(b&&b.type==="listItem"&&b.children&&b.children[0]&&b.children[0].type==="thematicBreak"){c=!0;break}}}}c&&(r=i),o.bulletCurrent=r;const l=o.containerFlow(e,n);return o.bulletLastUsed=r,o.bulletCurrent=a,s(),l}function VZ(e){const t=e.options.listItemIndent||"one";if(t!=="tab"&&t!=="one"&&t!=="mixed")throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function UZ(e,t,o,n){const s=VZ(o);let a=o.bulletCurrent||Yd(o);t&&t.type==="list"&&t.ordered&&(a=(typeof t.start=="number"&&t.start>-1?t.start:1)+(o.options.incrementListMarker===!1?0:t.children.indexOf(e))+a);let r=a.length+1;(s==="tab"||s==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(r=Math.ceil(r/4)*4);const i=o.createTracker(n);i.move(a+" ".repeat(r-a.length)),i.shift(r);const c=o.enter("listItem"),l=o.indentLines(o.containerFlow(e,i.current()),p);return c(),l;function p(d,b,M){return b?(M?"":" ".repeat(r))+d:(M?a:a+" ".repeat(r-a.length))+d}}function KZ(e,t,o,n){const s=o.enter("paragraph"),a=o.enter("phrasing"),r=o.containerPhrasing(e,n);return a(),s(),r}const jZ=Rc(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function GZ(e,t,o,n){return(e.children.some(function(r){return jZ(r)})?o.containerPhrasing:o.containerFlow).call(o,e,n)}function YZ(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}qm.peek=XZ;function qm(e,t,o,n){const s=YZ(o),a=o.enter("strong"),r=o.createTracker(n),i=r.move(s+s);let c=r.move(o.containerPhrasing(e,{after:s,before:i,...r.current()}));const l=c.charCodeAt(0),p=Tc(n.before.charCodeAt(n.before.length-1),l,s);p.inside&&(c=Ua(l)+c.slice(1));const d=c.charCodeAt(c.length-1),b=Tc(n.after.charCodeAt(0),d,s);b.inside&&(c=c.slice(0,-1)+Ua(d));const M=r.move(s+s);return a(),o.attentionEncodeSurroundingInfo={after:b.outside,before:p.outside},i+c+M}function XZ(e,t,o){return o.options.strong||"*"}function ZZ(e,t,o,n){return o.safe(e.value,n)}function JZ(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function $Z(e,t,o){const n=(wm(o)+(o.options.ruleSpaces?" ":"")).repeat(JZ(o));return o.options.ruleSpaces?n.slice(0,-1):n}const Sm={blockquote:gZ,break:zm,code:qZ,definition:yZ,emphasis:Am,hardBreak:zm,heading:LZ,html:mm,image:Om,imageReference:gm,inlineCode:Cm,link:vm,linkReference:Em,list:HZ,listItem:UZ,paragraph:KZ,root:GZ,strong:qm,text:ZZ,thematicBreak:$Z};function eJ(){return{enter:{table:tJ,tableData:ym,tableHeader:ym,tableRow:nJ},exit:{codeText:sJ,table:oJ,tableData:Xd,tableHeader:Xd,tableRow:Xd}}}function tJ(e){const t=e._align;this.enter({type:"table",align:t.map(function(o){return o==="none"?null:o}),children:[]},e),this.data.inTable=!0}function oJ(e){this.exit(e),this.data.inTable=void 0}function nJ(e){this.enter({type:"tableRow",children:[]},e)}function Xd(e){this.exit(e)}function ym(e){this.enter({type:"tableCell",children:[]},e)}function sJ(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,aJ));const o=this.stack[this.stack.length-1];o.type,o.value=t,this.exit(e)}function aJ(e,t){return t==="|"?t:e}function rJ(e){const t=e||{},o=t.tableCellPadding,n=t.tablePipeAlign,s=t.stringLength,a=o?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
13418
13418
  `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:b,table:r,tableCell:c,tableRow:i}};function r(M,f,m,O){return l(p(M,m,O),M.align)}function i(M,f,m,O){const g=d(M,m,O),C=l([g]);return C.slice(0,C.indexOf(`
13419
13419
  `))}function c(M,f,m,O){const g=m.enter("tableCell"),C=m.enter("phrasing"),E=m.containerPhrasing(M,{...O,before:a,after:a});return C(),g(),E}function l(M,f){return mZ(M,{align:f,alignDelimiters:n,padding:o,stringLength:s})}function p(M,f,m){const O=M.children;let g=-1;const C=[],E=f.enter("table");for(;++g<O.length;)C[g]=d(O[g],f,m);return E(),C}function d(M,f,m){const O=M.children;let g=-1;const C=[],E=f.enter("tableRow");for(;++g<O.length;)C[g]=c(O[g],M,f,m);return E(),C}function b(M,f,m){let O=Sm.inlineCode(M,f,m);return m.stack.includes("tableCell")&&(O=O.replace(/\|/g,"\\$&")),O}}function iJ(){return{exit:{taskListCheckValueChecked:Rm,taskListCheckValueUnchecked:Rm,paragraph:lJ}}}function cJ(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:pJ}}}function Rm(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function lJ(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const o=this.stack[this.stack.length-1];o.type;const n=o.children[0];if(n&&n.type==="text"){const s=t.children;let a=-1,r;for(;++a<s.length;){const i=s[a];if(i.type==="paragraph"){r=i;break}}r===o&&(n.value=n.value.slice(1),n.value.length===0?o.children.shift():o.position&&n.position&&typeof n.position.start.offset=="number"&&(n.position.start.column++,n.position.start.offset++,o.position.start=Object.assign({},n.position.start)))}}this.exit(e)}function pJ(e,t,o,n){const s=e.children[0],a=typeof e.checked=="boolean"&&s&&s.type==="paragraph",r="["+(e.checked?"x":" ")+"] ",i=o.createTracker(n);a&&i.move(r);let c=Sm.listItem(e,t,o,{...n,...i.current()});return a&&(c=c.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,l)),c;function l(p){return p+r}}function dJ(){return[HX(),pZ(),hZ(),eJ(),iJ()]}function uJ(e){return{extensions:[VX(),dZ(e),MZ(),rJ(e),cJ()]}}const bJ={tokenize:AJ,partial:!0},Bm={tokenize:mJ,partial:!0},Wm={tokenize:OJ,partial:!0},Lm={tokenize:gJ,partial:!0},hJ={tokenize:CJ,partial:!0},Tm={name:"wwwAutolink",tokenize:_J,previous:Nm},Im={name:"protocolAutolink",tokenize:zJ,previous:xm},Et={name:"emailAutolink",tokenize:fJ,previous:Dm},Je={};function MJ(){return{text:Je}}let Yo=48;for(;Yo<123;)Je[Yo]=Et,Yo++,Yo===58?Yo=65:Yo===91&&(Yo=97);Je[43]=Et,Je[45]=Et,Je[46]=Et,Je[95]=Et,Je[72]=[Et,Im],Je[104]=[Et,Im],Je[87]=[Et,Tm],Je[119]=[Et,Tm];function fJ(e,t,o){const n=this;let s,a;return r;function r(d){return!Zd(d)||!Dm.call(n,n.previous)||Jd(n.events)?o(d):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),i(d))}function i(d){return Zd(d)?(e.consume(d),i):d===64?(e.consume(d),c):o(d)}function c(d){return d===46?e.check(hJ,p,l)(d):d===45||d===95||y2(d)?(a=!0,e.consume(d),c):p(d)}function l(d){return e.consume(d),s=!0,c}function p(d){return a&&s&&x2(n.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(d)):o(d)}}function _J(e,t,o){const n=this;return s;function s(r){return r!==87&&r!==119||!Nm.call(n,n.previous)||Jd(n.events)?o(r):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(bJ,e.attempt(Bm,e.attempt(Wm,a),o),o)(r))}function a(r){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(r)}}function zJ(e,t,o){const n=this;let s="",a=!1;return r;function r(d){return(d===72||d===104)&&xm.call(n,n.previous)&&!Jd(n.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),s+=String.fromCodePoint(d),e.consume(d),i):o(d)}function i(d){if(x2(d)&&s.length<5)return s+=String.fromCodePoint(d),e.consume(d),i;if(d===58){const b=s.toLowerCase();if(b==="http"||b==="https")return e.consume(d),c}return o(d)}function c(d){return d===47?(e.consume(d),a?l:(a=!0,c)):o(d)}function l(d){return d===null||gc(d)||P1(d)||Go(d)||Cc(d)?o(d):e.attempt(Bm,e.attempt(Wm,p),o)(d)}function p(d){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(d)}}function AJ(e,t,o){let n=0;return s;function s(r){return(r===87||r===119)&&n<3?(n++,e.consume(r),s):r===46&&n===3?(e.consume(r),a):o(r)}function a(r){return r===null?o(r):t(r)}}function mJ(e,t,o){let n,s,a;return r;function r(l){return l===46||l===95?e.check(Lm,c,i)(l):l===null||P1(l)||Go(l)||l!==45&&Cc(l)?c(l):(a=!0,e.consume(l),r)}function i(l){return l===95?n=!0:(s=n,n=void 0),e.consume(l),r}function c(l){return s||n||!a?o(l):t(l)}}function OJ(e,t){let o=0,n=0;return s;function s(r){return r===40?(o++,e.consume(r),s):r===41&&n<o?a(r):r===33||r===34||r===38||r===39||r===41||r===42||r===44||r===46||r===58||r===59||r===60||r===63||r===93||r===95||r===126?e.check(Lm,t,a)(r):r===null||P1(r)||Go(r)?t(r):(e.consume(r),s)}function a(r){return r===41&&n++,e.consume(r),s}}function gJ(e,t,o){return n;function n(i){return i===33||i===34||i===39||i===41||i===42||i===44||i===46||i===58||i===59||i===63||i===95||i===126?(e.consume(i),n):i===38?(e.consume(i),a):i===93?(e.consume(i),s):i===60||i===null||P1(i)||Go(i)?t(i):o(i)}function s(i){return i===null||i===40||i===91||P1(i)||Go(i)?t(i):n(i)}function a(i){return x2(i)?r(i):o(i)}function r(i){return i===59?(e.consume(i),n):x2(i)?(e.consume(i),r):o(i)}}function CJ(e,t,o){return n;function n(a){return e.consume(a),s}function s(a){return y2(a)?o(a):t(a)}}function Nm(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||P1(e)}function xm(e){return!x2(e)}function Dm(e){return!(e===47||Zd(e))}function Zd(e){return e===43||e===45||e===46||e===95||y2(e)}function Jd(e){let t=e.length,o=!1;for(;t--;){const n=e[t][1];if((n.type==="labelLink"||n.type==="labelImage")&&!n._balanced){o=!0;break}if(n._gfmAutolinkLiteralWalkedInto){o=!1;break}}return e.length>0&&!o&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),o}const kJ={tokenize:BJ,partial:!0};function vJ(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:SJ,continuation:{tokenize:yJ},exit:RJ}},text:{91:{name:"gfmFootnoteCall",tokenize:qJ},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:EJ,resolveTo:wJ}}}}function EJ(e,t,o){const n=this;let s=n.events.length;const a=n.parser.gfmFootnotes||(n.parser.gfmFootnotes=[]);let r;for(;s--;){const c=n.events[s][1];if(c.type==="labelImage"){r=c;break}if(c.type==="gfmFootnoteCall"||c.type==="labelLink"||c.type==="label"||c.type==="image"||c.type==="link")break}return i;function i(c){if(!r||!r._balanced)return o(c);const l=Le(n.sliceSerialize({start:r.end,end:n.now()}));return l.codePointAt(0)!==94||!a.includes(l.slice(1))?o(c):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(c),e.exit("gfmFootnoteCallLabelMarker"),t(c))}}function wJ(e,t){let o=e.length;for(;o--;)if(e[o][1].type==="labelImage"&&e[o][0]==="enter"){e[o][1];break}e[o+1][1].type="data",e[o+3][1].type="gfmFootnoteCallLabelMarker";const n={type:"gfmFootnoteCall",start:Object.assign({},e[o+3][1].start),end:Object.assign({},e[e.length-1][1].end)},s={type:"gfmFootnoteCallMarker",start:Object.assign({},e[o+3][1].end),end:Object.assign({},e[o+3][1].end)};s.end.column++,s.end.offset++,s.end._bufferIndex++;const a={type:"gfmFootnoteCallString",start:Object.assign({},s.end),end:Object.assign({},e[e.length-1][1].start)},r={type:"chunkString",contentType:"string",start:Object.assign({},a.start),end:Object.assign({},a.end)},i=[e[o+1],e[o+2],["enter",n,t],e[o+3],e[o+4],["enter",s,t],["exit",s,t],["enter",a,t],["enter",r,t],["exit",r,t],["exit",a,t],e[e.length-2],e[e.length-1],["exit",n,t]];return e.splice(o,e.length-o+1,...i),e}function qJ(e,t,o){const n=this,s=n.parser.gfmFootnotes||(n.parser.gfmFootnotes=[]);let a=0,r;return i;function i(d){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),c}function c(d){return d!==94?o(d):(e.enter("gfmFootnoteCallMarker"),e.consume(d),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",l)}function l(d){if(a>999||d===93&&!r||d===null||d===91||P1(d))return o(d);if(d===93){e.exit("chunkString");const b=e.exit("gfmFootnoteCallString");return s.includes(Le(n.sliceSerialize(b)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):o(d)}return P1(d)||(r=!0),a++,e.consume(d),d===92?p:l}function p(d){return d===91||d===92||d===93?(e.consume(d),a++,l):l(d)}}function SJ(e,t,o){const n=this,s=n.parser.gfmFootnotes||(n.parser.gfmFootnotes=[]);let a,r=0,i;return c;function c(f){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(f),e.exit("gfmFootnoteDefinitionLabelMarker"),l}function l(f){return f===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(f),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",p):o(f)}function p(f){if(r>999||f===93&&!i||f===null||f===91||P1(f))return o(f);if(f===93){e.exit("chunkString");const m=e.exit("gfmFootnoteDefinitionLabelString");return a=Le(n.sliceSerialize(m)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(f),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),b}return P1(f)||(i=!0),r++,e.consume(f),f===92?d:p}function d(f){return f===91||f===92||f===93?(e.consume(f),r++,p):p(f)}function b(f){return f===58?(e.enter("definitionMarker"),e.consume(f),e.exit("definitionMarker"),s.includes(a)||s.push(a),g1(e,M,"gfmFootnoteDefinitionWhitespace")):o(f)}function M(f){return t(f)}}function yJ(e,t,o){return e.check(Pa,t,e.attempt(kJ,t,o))}function RJ(e){e.exit("gfmFootnoteDefinition")}function BJ(e,t,o){const n=this;return g1(e,s,"gfmFootnoteDefinitionIndent",5);function s(a){const r=n.events[n.events.length-1];return r&&r[1].type==="gfmFootnoteDefinitionIndent"&&r[2].sliceSerialize(r[1],!0).length===4?t(a):o(a)}}function WJ(e){let o=(e||{}).singleTilde;const n={name:"strikethrough",tokenize:a,resolveAll:s};return o==null&&(o=!0),{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}};function s(r,i){let c=-1;for(;++c<r.length;)if(r[c][0]==="enter"&&r[c][1].type==="strikethroughSequenceTemporary"&&r[c][1]._close){let l=c;for(;l--;)if(r[l][0]==="exit"&&r[l][1].type==="strikethroughSequenceTemporary"&&r[l][1]._open&&r[c][1].end.offset-r[c][1].start.offset===r[l][1].end.offset-r[l][1].start.offset){r[c][1].type="strikethroughSequence",r[l][1].type="strikethroughSequence";const p={type:"strikethrough",start:Object.assign({},r[l][1].start),end:Object.assign({},r[c][1].end)},d={type:"strikethroughText",start:Object.assign({},r[l][1].end),end:Object.assign({},r[c][1].start)},b=[["enter",p,i],["enter",r[l][1],i],["exit",r[l][1],i],["enter",d,i]],M=i.parser.constructs.insideSpan.null;M&&ne(b,b.length,0,kc(M,r.slice(l+1,c),i)),ne(b,b.length,0,[["exit",d,i],["enter",r[c][1],i],["exit",r[c][1],i],["exit",p,i]]),ne(r,l-1,c-l+3,b),c=l+b.length-2;break}}for(c=-1;++c<r.length;)r[c][1].type==="strikethroughSequenceTemporary"&&(r[c][1].type="data");return r}function a(r,i,c){const l=this.previous,p=this.events;let d=0;return b;function b(f){return l===126&&p[p.length-1][1].type!=="characterEscape"?c(f):(r.enter("strikethroughSequenceTemporary"),M(f))}function M(f){const m=os(l);if(f===126)return d>1?c(f):(r.consume(f),d++,M);if(d<2&&!o)return c(f);const O=r.exit("strikethroughSequenceTemporary"),g=os(f);return O._open=!g||g===2&&!!m,O._close=!m||m===2&&!!g,i(f)}}}class LJ{constructor(){this.map=[]}add(t,o,n){TJ(this,t,o,n)}consume(t){if(this.map.sort(function(a,r){return a[0]-r[0]}),this.map.length===0)return;let o=this.map.length;const n=[];for(;o>0;)o-=1,n.push(t.slice(this.map[o][0]+this.map[o][1]),this.map[o][2]),t.length=this.map[o][0];n.push(t.slice()),t.length=0;let s=n.pop();for(;s;){for(const a of s)t.push(a);s=n.pop()}this.map.length=0}}function TJ(e,t,o,n){let s=0;if(!(o===0&&n.length===0)){for(;s<e.map.length;){if(e.map[s][0]===t){e.map[s][1]+=o,e.map[s][2].push(...n);return}s+=1}e.map.push([t,o,n])}}function IJ(e,t){let o=!1;const n=[];for(;t<e.length;){const s=e[t];if(o){if(s[0]==="enter")s[1].type==="tableContent"&&n.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(s[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const a=n.length-1;n[a]=n[a]==="left"?"center":"right"}}else if(s[1].type==="tableDelimiterRow")break}else s[0]==="enter"&&s[1].type==="tableDelimiterRow"&&(o=!0);t+=1}return n}function NJ(){return{flow:{null:{name:"table",tokenize:xJ,resolveAll:DJ}}}}function xJ(e,t,o){const n=this;let s=0,a=0,r;return i;function i(q){let R=n.events.length-1;for(;R>-1;){const N=n.events[R][1].type;if(N==="lineEnding"||N==="linePrefix")R--;else break}const H=R>-1?n.events[R][1].type:null,w=H==="tableHead"||H==="tableRow"?I:c;return w===I&&n.parser.lazy[n.now().line]?o(q):w(q)}function c(q){return e.enter("tableHead"),e.enter("tableRow"),l(q)}function l(q){return q===124||(r=!0,a+=1),p(q)}function p(q){return q===null?o(q):X0(q)?a>1?(a=0,n.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(q),e.exit("lineEnding"),M):o(q):u1(q)?g1(e,p,"whitespace")(q):(a+=1,r&&(r=!1,s+=1),q===124?(e.enter("tableCellDivider"),e.consume(q),e.exit("tableCellDivider"),r=!0,p):(e.enter("data"),d(q)))}function d(q){return q===null||q===124||P1(q)?(e.exit("data"),p(q)):(e.consume(q),q===92?b:d)}function b(q){return q===92||q===124?(e.consume(q),d):d(q)}function M(q){return n.interrupt=!1,n.parser.lazy[n.now().line]?o(q):(e.enter("tableDelimiterRow"),r=!1,u1(q)?g1(e,f,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(q):f(q))}function f(q){return q===45||q===58?O(q):q===124?(r=!0,e.enter("tableCellDivider"),e.consume(q),e.exit("tableCellDivider"),m):T(q)}function m(q){return u1(q)?g1(e,O,"whitespace")(q):O(q)}function O(q){return q===58?(a+=1,r=!0,e.enter("tableDelimiterMarker"),e.consume(q),e.exit("tableDelimiterMarker"),g):q===45?(a+=1,g(q)):q===null||X0(q)?L(q):T(q)}function g(q){return q===45?(e.enter("tableDelimiterFiller"),C(q)):T(q)}function C(q){return q===45?(e.consume(q),C):q===58?(r=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(q),e.exit("tableDelimiterMarker"),E):(e.exit("tableDelimiterFiller"),E(q))}function E(q){return u1(q)?g1(e,L,"whitespace")(q):L(q)}function L(q){return q===124?f(q):q===null||X0(q)?!r||s!==a?T(q):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(q)):T(q)}function T(q){return o(q)}function I(q){return e.enter("tableRow"),Q(q)}function Q(q){return q===124?(e.enter("tableCellDivider"),e.consume(q),e.exit("tableCellDivider"),Q):q===null||X0(q)?(e.exit("tableRow"),t(q)):u1(q)?g1(e,Q,"whitespace")(q):(e.enter("data"),z(q))}function z(q){return q===null||q===124||P1(q)?(e.exit("data"),Q(q)):(e.consume(q),q===92?x:z)}function x(q){return q===92||q===124?(e.consume(q),z):z(q)}}function DJ(e,t){let o=-1,n=!0,s=0,a=[0,0,0,0],r=[0,0,0,0],i=!1,c=0,l,p,d;const b=new LJ;for(;++o<e.length;){const M=e[o],f=M[1];M[0]==="enter"?f.type==="tableHead"?(i=!1,c!==0&&(Pm(b,t,c,l,p),p=void 0,c=0),l={type:"table",start:Object.assign({},f.start),end:Object.assign({},f.end)},b.add(o,0,[["enter",l,t]])):f.type==="tableRow"||f.type==="tableDelimiterRow"?(n=!0,d=void 0,a=[0,0,0,0],r=[0,o+1,0,0],i&&(i=!1,p={type:"tableBody",start:Object.assign({},f.start),end:Object.assign({},f.end)},b.add(o,0,[["enter",p,t]])),s=f.type==="tableDelimiterRow"?2:p?3:1):s&&(f.type==="data"||f.type==="tableDelimiterMarker"||f.type==="tableDelimiterFiller")?(n=!1,r[2]===0&&(a[1]!==0&&(r[0]=r[1],d=Ic(b,t,a,s,void 0,d),a=[0,0,0,0]),r[2]=o)):f.type==="tableCellDivider"&&(n?n=!1:(a[1]!==0&&(r[0]=r[1],d=Ic(b,t,a,s,void 0,d)),a=r,r=[a[1],o,0,0])):f.type==="tableHead"?(i=!0,c=o):f.type==="tableRow"||f.type==="tableDelimiterRow"?(c=o,a[1]!==0?(r[0]=r[1],d=Ic(b,t,a,s,o,d)):r[1]!==0&&(d=Ic(b,t,r,s,o,d)),s=0):s&&(f.type==="data"||f.type==="tableDelimiterMarker"||f.type==="tableDelimiterFiller")&&(r[3]=o)}for(c!==0&&Pm(b,t,c,l,p),b.consume(t.events),o=-1;++o<t.events.length;){const M=t.events[o];M[0]==="enter"&&M[1].type==="table"&&(M[1]._align=IJ(t.events,o))}return e}function Ic(e,t,o,n,s,a){const r=n===1?"tableHeader":n===2?"tableDelimiter":"tableData",i="tableContent";o[0]!==0&&(a.end=Object.assign({},as(t.events,o[0])),e.add(o[0],0,[["exit",a,t]]));const c=as(t.events,o[1]);if(a={type:r,start:Object.assign({},c),end:Object.assign({},c)},e.add(o[1],0,[["enter",a,t]]),o[2]!==0){const l=as(t.events,o[2]),p=as(t.events,o[3]),d={type:i,start:Object.assign({},l),end:Object.assign({},p)};if(e.add(o[2],0,[["enter",d,t]]),n!==2){const b=t.events[o[2]],M=t.events[o[3]];if(b[1].end=Object.assign({},M[1].end),b[1].type="chunkText",b[1].contentType="text",o[3]>o[2]+1){const f=o[2]+1,m=o[3]-o[2]-1;e.add(f,m,[])}}e.add(o[3]+1,0,[["exit",d,t]])}return s!==void 0&&(a.end=Object.assign({},as(t.events,s)),e.add(s,0,[["exit",a,t]]),a=void 0),a}function Pm(e,t,o,n,s){const a=[],r=as(t.events,o);s&&(s.end=Object.assign({},r),a.push(["exit",s,t])),n.end=Object.assign({},r),a.push(["exit",n,t]),e.add(o+1,0,a)}function as(e,t){const o=e[t],n=o[0]==="enter"?"start":"end";return o[1][n]}const PJ={name:"tasklistCheck",tokenize:QJ};function FJ(){return{text:{91:PJ}}}function QJ(e,t,o){const n=this;return s;function s(c){return n.previous!==null||!n._gfmTasklistFirstContentOfListItem?o(c):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(c),e.exit("taskListCheckMarker"),a)}function a(c){return P1(c)?(e.enter("taskListCheckValueUnchecked"),e.consume(c),e.exit("taskListCheckValueUnchecked"),r):c===88||c===120?(e.enter("taskListCheckValueChecked"),e.consume(c),e.exit("taskListCheckValueChecked"),r):o(c)}function r(c){return c===93?(e.enter("taskListCheckMarker"),e.consume(c),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),i):o(c)}function i(c){return X0(c)?t(c):u1(c)?e.check({tokenize:HJ},t,o)(c):o(c)}}function HJ(e,t,o){return g1(e,n,"whitespace");function n(s){return s===null?o(s):t(s)}}function VJ(e){return AA([MJ(),vJ(),WJ(e),NJ(),FJ()])}const UJ={};function KJ(e){const t=this,o=e||UJ,n=t.data(),s=n.micromarkExtensions||(n.micromarkExtensions=[]),a=n.fromMarkdownExtensions||(n.fromMarkdownExtensions=[]),r=n.toMarkdownExtensions||(n.toMarkdownExtensions=[]);s.push(VJ(o)),a.push(dJ()),r.push(uJ(o))}const Fm=/[#.]/g;function jJ(e,t){const o=e||"",n={};let s=0,a,r;for(;s<o.length;){Fm.lastIndex=s;const i=Fm.exec(o),c=o.slice(s,i?i.index:o.length);c&&(a?a==="#"?n.id=c:Array.isArray(n.className)?n.className.push(c):n.className=[c]:r=c,s+=c.length),i&&(a=i[0],s++)}return{type:"element",tagName:r||t||"div",properties:n,children:[]}}function Qm(e,t,o){const n=o?ZJ(o):void 0;function s(a,r,...i){let c;if(a==null){c={type:"root",children:[]};const l=r;i.unshift(l)}else{c=jJ(a,t);const l=c.tagName.toLowerCase(),p=n?n.get(l):void 0;if(c.tagName=p||l,GJ(r))i.unshift(r);else for(const[d,b]of Object.entries(r))YJ(e,c.properties,d,b)}for(const l of i)$d(c.children,l);return c.type==="element"&&c.tagName==="template"&&(c.content={type:"root",children:c.children},c.children=[]),c}return s}function GJ(e){if(e===null||typeof e!="object"||Array.isArray(e))return!0;if(typeof e.type!="string")return!1;const t=e,o=Object.keys(e);for(const n of o){const s=t[n];if(s&&typeof s=="object"){if(!Array.isArray(s))return!0;const a=s;for(const r of a)if(typeof r!="number"&&typeof r!="string")return!0}}return!!("children"in e&&Array.isArray(e.children))}function YJ(e,t,o,n){const s=mc(e,o);let a;if(n!=null){if(typeof n=="number"){if(Number.isNaN(n))return;a=n}else typeof n=="boolean"?a=n:typeof n=="string"?s.spaceSeparated?a=oA(n):s.commaSeparated?a=H7(n):s.commaOrSpaceSeparated?a=oA(H7(n).join(" ")):a=Hm(s,s.property,n):Array.isArray(n)?a=[...n]:a=s.property==="style"?XJ(n):String(n);if(Array.isArray(a)){const r=[];for(const i of a)r.push(Hm(s,s.property,i));a=r}s.property==="className"&&Array.isArray(t.className)&&(a=t.className.concat(a)),t[s.property]=a}}function $d(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 o of t)$d(e,o);else if(typeof t=="object"&&"type"in t)t.type==="root"?$d(e,t.children):e.push(t);else throw new Error("Expected node, nodes, or string, got `"+t+"`")}function Hm(e,t,o){if(typeof o=="string"){if(e.number&&o&&!Number.isNaN(Number(o)))return Number(o);if((e.boolean||e.overloadedBoolean)&&(o===""||La(o)===La(t)))return!0}return o}function XJ(e){const t=[];for(const[o,n]of Object.entries(e))t.push([o,n].join(": "));return t.join("; ")}function ZJ(e){const t=new Map;for(const o of e)t.set(o.toLowerCase(),o);return t}const JJ=["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"],$J=Qm(Ta,"div"),e$=Qm(ro,"g",JJ);function t$(e){const t=String(e),o=[];return{toOffset:s,toPoint:n};function n(a){if(typeof a=="number"&&a>-1&&a<=t.length){let r=0;for(;;){let i=o[r];if(i===void 0){const c=Vm(t,o[r-1]);i=c===-1?t.length+1:c+1,o[r]=i}if(i>a)return{line:r+1,column:a-(r>0?o[r-1]:0)+1,offset:a};r++}}}function s(a){if(a&&typeof a.line=="number"&&typeof a.column=="number"&&!Number.isNaN(a.line)&&!Number.isNaN(a.column)){for(;o.length<a.line;){const i=o[o.length-1],c=Vm(t,i),l=c===-1?t.length+1:c+1;if(i===l)break;o.push(l)}const r=(a.line>1?o[a.line-2]:0)+a.column-1;if(r<o[a.line-1])return r}}}function Vm(e,t){const o=e.indexOf("\r",t),n=e.indexOf(`
13420
- `,t);return n===-1?o:o===-1||o+1===n?n:o<n?o:n}const Xo={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/"},Um={}.hasOwnProperty,o$=Object.prototype;function n$(e,t){const o=t||{};return eu({file:o.file||void 0,location:!1,schema:o.space==="svg"?ro:Ta,verbose:o.verbose||!1},e)}function eu(e,t){let o;switch(t.nodeName){case"#comment":{const n=t;return o={type:"comment",value:n.data},Nc(e,n,o),o}case"#document":case"#document-fragment":{const n=t,s="mode"in n?n.mode==="quirks"||n.mode==="limited-quirks":!1;if(o={type:"root",children:Km(e,t.childNodes),data:{quirksMode:s}},e.file&&e.location){const a=String(e.file),r=t$(a),i=r.toPoint(0),c=r.toPoint(a.length);o.position={start:i,end:c}}return o}case"#documentType":{const n=t;return o={type:"doctype"},Nc(e,n,o),o}case"#text":{const n=t;return o={type:"text",value:n.value},Nc(e,n,o),o}default:return o=s$(e,t),o}}function Km(e,t){let o=-1;const n=[];for(;++o<t.length;){const s=eu(e,t[o]);n.push(s)}return n}function s$(e,t){const o=e.schema;e.schema=t.namespaceURI===Xo.svg?ro:Ta;let n=-1;const s={};for(;++n<t.attrs.length;){const i=t.attrs[n],c=(i.prefix?i.prefix+":":"")+i.name;Um.call(o$,c)||(s[c]=i.value)}const r=(e.schema.space==="svg"?e$:$J)(t.tagName,s,Km(e,t.childNodes));if(Nc(e,t,r),r.tagName==="template"){const i=t,c=i.sourceCodeLocation,l=c&&c.startTag&&rs(c.startTag),p=c&&c.endTag&&rs(c.endTag),d=eu(e,i.content);l&&p&&e.file&&(d.position={start:l.end,end:p.start}),r.content=d}return e.schema=o,r}function Nc(e,t,o){if("sourceCodeLocation"in t&&t.sourceCodeLocation&&e.file){const n=a$(e,o,t.sourceCodeLocation);n&&(e.location=!0,o.position=n)}}function a$(e,t,o){const n=rs(o);if(t.type==="element"){const s=t.children[t.children.length-1];if(n&&!o.endTag&&s&&s.position&&s.position.end&&(n.end=Object.assign({},s.position.end)),e.verbose){const a={};let r;if(o.attrs)for(r in o.attrs)Um.call(o.attrs,r)&&(a[mc(e.schema,r).property]=rs(o.attrs[r]));o.startTag;const i=rs(o.startTag),c=o.endTag?rs(o.endTag):void 0,l={opening:i};c&&(l.closing=c),l.properties=a,t.data={position:l}}}return n}function rs(e){const t=jm({line:e.startLine,column:e.startCol,offset:e.startOffset}),o=jm({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||o?{start:t,end:o}:void 0}function jm(e){return e.line&&e.column?e:void 0}const r$={},i$={}.hasOwnProperty,Gm=fm("type",{handlers:{root:l$,element:h$,text:u$,comment:b$,doctype:d$}});function c$(e,t){const n=(t||r$).space;return Gm(e,n==="svg"?ro:Ta)}function l$(e,t){const o={nodeName:"#document",mode:(e.data||{}).quirksMode?"quirks":"no-quirks",childNodes:[]};return o.childNodes=tu(e.children,o,t),is(e,o),o}function p$(e,t){const o={nodeName:"#document-fragment",childNodes:[]};return o.childNodes=tu(e.children,o,t),is(e,o),o}function d$(e){const t={nodeName:"#documentType",name:"html",publicId:"",systemId:"",parentNode:null};return is(e,t),t}function u$(e){const t={nodeName:"#text",value:e.value,parentNode:null};return is(e,t),t}function b$(e){const t={nodeName:"#comment",data:e.value,parentNode:null};return is(e,t),t}function h$(e,t){const o=t;let n=o;e.type==="element"&&e.tagName.toLowerCase()==="svg"&&o.space==="html"&&(n=ro);const s=[];let a;if(e.properties){for(a in e.properties)if(a!=="children"&&i$.call(e.properties,a)){const c=M$(n,a,e.properties[a]);c&&s.push(c)}}const r=n.space,i={nodeName:e.tagName,tagName:e.tagName,attrs:s,namespaceURI:Xo[r],childNodes:[],parentNode:null};return i.childNodes=tu(e.children,i,n),is(e,i),e.tagName==="template"&&e.content&&(i.content=p$(e.content,n)),i}function M$(e,t,o){const n=mc(e,t);if(o===!1||o===null||o===void 0||typeof o=="number"&&Number.isNaN(o)||!o&&n.boolean)return;Array.isArray(o)&&(o=n.commaSeparated?V7(o):nA(o));const s={name:n.attribute,value:o===!0?"":String(o)};if(n.space&&n.space!=="html"&&n.space!=="svg"){const a=s.name.indexOf(":");a<0?s.prefix="":(s.name=s.name.slice(a+1),s.prefix=n.attribute.slice(0,a)),s.namespace=Xo[n.space]}return s}function tu(e,t,o){let n=-1;const s=[];if(e)for(;++n<e.length;){const a=Gm(e[n],o);a.parentNode=t,s.push(a)}return s}function is(e,t){const o=e.position;o&&o.start&&o.end&&(o.start.offset,o.end.offset,t.sourceCodeLocation={startLine:o.start.line,startCol:o.start.column,startOffset:o.start.offset,endLine:o.end.line,endCol:o.end.column,endOffset:o.end.offset})}const f$=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"],_$=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]),Z1="�";var U;(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"})(U||(U={}));const G2={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function Ym(e){return e>=55296&&e<=57343}function z$(e){return e>=56320&&e<=57343}function A$(e,t){return(e-55296)*1024+9216+t}function Xm(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function Zm(e){return e>=64976&&e<=65007||_$.has(e)}var M0;(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"})(M0||(M0={}));const m$=65536;class O${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=m$,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,o){const{line:n,col:s,offset:a}=this,r=s+o,i=a+o;return{code:t,startLine:n,endLine:n,startCol:r,endCol:r,startOffset:i,endOffset:i}}_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 o=this.html.charCodeAt(this.pos+1);if(z$(o))return this.pos++,this._addGap(),A$(t,o)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,U.EOF;return this._err(M0.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,o){this.html.length>0?this.html+=t:this.html=t,this.endOfChunkHit=!1,this.lastChunkWritten=o}insertHtmlAtCurrentPos(t){this.html=this.html.substring(0,this.pos+1)+t+this.html.substring(this.pos+1),this.endOfChunkHit=!1}startsWith(t,o){if(this.pos+t.length>this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,!1;if(o)return this.html.startsWith(t,this.pos);for(let n=0;n<t.length;n++)if((this.html.charCodeAt(this.pos+n)|32)!==t.charCodeAt(n))return!1;return!0}peek(t){const o=this.pos+t;if(o>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,U.EOF;const n=this.html.charCodeAt(o);return n===U.CARRIAGE_RETURN?U.LINE_FEED:n}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,U.EOF;let t=this.html.charCodeAt(this.pos);return t===U.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,U.LINE_FEED):t===U.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,Ym(t)&&(t=this._processSurrogate(t)),this.handler.onParseError===null||t>31&&t<127||t===U.LINE_FEED||t===U.CARRIAGE_RETURN||t>159&&t<64976||this._checkForProblematicCharacters(t),t)}_checkForProblematicCharacters(t){Xm(t)?this._err(M0.controlCharacterInInputStream):Zm(t)&&this._err(M0.noncharacterInInputStream)}retreat(t){for(this.pos-=t;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}}var p1;(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"})(p1||(p1={}));function Jm(e,t){for(let o=e.attrs.length-1;o>=0;o--)if(e.attrs[o].name===t)return e.attrs[o].value;return null}const g$=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏ੊ઑඡ๭༉༦჊ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ὾⁠↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms„‹•˜¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲ΂ϏϢϸontourIntegraìȹoɴ͹\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՗՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲ׌y;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱cò׋؀JTabcdfgorstר׬ׯ׺؀ؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d׷׸䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇܎ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ޷޼߂ߐĀiyޱ޵rc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄΀HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶߻dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣ঳সে্਷ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗ࡜ࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४Ānrࢃ࢏gleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpw৔ਖਛgȀLRlr৞৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼੝੠੷੼અઋ઎p;椅y;䐜Ādl੥੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑ඗ඞcy;䐊cute;䅃ƀaey઴હાron;䅇dil;䅅;䐝ƀgswે૰଎ativeƀMTV૓૟૨ediumSpace;怋hiĀcn૦૘ë૙eryThiî૙tedĀGL૸ଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷ଺reak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪୼஡௫ఄ౞಄ದ೘ൡඅ櫬Āou୛୤ngruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊ஛ement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater΀;EFGLSTஶஷ஽௉௓௘௥扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲௽ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ೒拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨೹setĀ;E೰ೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂ෉෕ෛ෠෧෼ขภยา฿ไlig;䅒cute耻Ó䃓Āiy෎ීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲ෶cr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬื฼de耻Õ䃕es;樷ml耻Ö䃖erĀBP๋๠Āar๐๓r;怾acĀek๚๜;揞et;掴arenthesis;揜Ҁacfhilors๿ງຊຏຒດຝະ໼rtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ໠໤檻cedesȀ;EST່້໏໚扺qual;檯lantEqual;扼ilde;找me;怳Ādp໩໮uct;戏ortionĀ;aȥ໹l;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬؀BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁࿫࿳ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL࿜࿝࿡憒ar;懥eftArrow;懄eiling;按oǵ࿹\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»࿝pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄ቉ቕ቞ቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHc቎ቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗Āeiቻ኉Dzኀ\0ኇefore;戴a;䎘Ācn኎ኘkSpace;쀀  Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0᏿ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0጖y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻፿on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtè૙a;䎖r;愨pf;愤cr;쀀𝒵௡ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚΀;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒΀;Eaeiop዁ᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;e዁ᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;e዁ᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰ᜼ᝃᝈ᝸᝽០៦ᠹᡐᜍ᤽᥈ᥰot;櫭Ācrᛶ᜞kȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e᜚᜛戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;t፜᜷brk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓ᝛ᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯ᝱ᝳ;䎲;愶een;扬r;쀀𝔟g΀costuvwឍឝឳេ៕៛៞ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀako៭ᠦᠵĀcn៲ᠣkƀlst៺֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘᠝斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈؀DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬ᣿ᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教΀;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ᣷᣹᣻᣽;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ᤟;敛;敘;攘;攔΀;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģ᥂bar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;e᜚᜜lƀ;bhᥨᥩᥫ䁜;槅sub;柈Ŭᥴ᥾lĀ;e᥹᥺怢t»᥺pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭍᭒\0᯽\0ᰌƀcpr᦭ᦲ᧝ute;䄇̀;abcdsᦿᧀᧄ᧊᧕᧙戩nd;橄rcup;橉Āau᧏᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r΀;Ecefms᩟᩠ᩢᩫ᪤᪪᪮旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖᪚᪟»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇᫔᫺\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ᫙\0\0᫢aĀ;t᫞᫟䀬;䁀ƀ;fl᫨᫩᫫戁îᅠeĀmx᫱᫶ent»᫩eóɍǧ᫾\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯΀delprvw᭠᭬᭷ᮂᮬᯔ᯹arrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;p᭿ᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰸᰻᰿ᱝᱩᱵᲊᲞᲬᲷ᳻᳿ᴍᵻᶑᶫᶻ᷆᷍rò΁ar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂͸᳖᳜᳠mƀ;oș᳊᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄ὎὚ĀDoḆᴴoôᲉĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»Ṻƀaeiἒ἖Ἒls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙ῜ῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao‌⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧‪‬\0‮耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₟₥₰₴⃰⃵⃺⃿℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕ₝ute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽⃉ƀ;qsؾٌ⃄lanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqr׮ⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0↎proø₞r;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢␧␭␱␵␻ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀஀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼rò৆òΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonó྘quigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d྘➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ᠛旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐௏쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop඄⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roø඄urĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓΀;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨í஘istĀ;s஠டr;쀀𝔫ȀEest௅⩦⩹⩼ƀ;qs஼⩭௡ƀ;qs஼௅⩴lanô௢ií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚΀AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs఻⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs఻⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast୻⭕⭚⭟lleì୻l;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖ΀chimpqu⮽⯍⯙⬄୸⯤⯯Ȁ;cerല⯆ഷ⯉uå൅;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭å೸åഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñ೗Ā;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰⳴ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥ⵲ⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;c᪞ⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācr⵩⵭ir;榿;쀀𝔬ͯ⵹\0\0⵼\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕ⶘ⶥⶨrò᪀Āir⶝ⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔ⷗ǒr;榷rp;榹΀;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ⹞\0⹽\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ⹧⹲຅脀¶;l⹭⹮䂶leìЃɩ⹸\0\0⹻m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳⻴ᤈ⻹⻽⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp໬⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t໻⾴ï໻rel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⿚⋢⿟⿥⿫⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei⿾々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔઀ABHabcdefhilmnoprstux぀けさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤΀cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstw࿜ガクシスゼゾダッデナp;極Ā;f࿠ゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes㄂㄄;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ì࿲âヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘㇤㇮rrowĀ;t࿜ㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowó࿪arpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓rò࿪aòՑ;怏oustĀ;a㈞㈟掱che»㈟mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦΀Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼਴t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì⹯耻­䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;q኱ኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫ਩war;椪lig耻ß䃟௡㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rë๟ƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproø዁im»ኬsðኞĀas㚺㚮ð዁rn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈ΀adempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xô᝷headĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜΀eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roð໻tré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚΀cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜ៟tré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map(e=>e.charCodeAt(0))),C$=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 k$(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=C$.get(e))!==null&&t!==void 0?t:e}var _2;(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"})(_2||(_2={}));const v$=32;var lo;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(lo||(lo={}));function ou(e){return e>=_2.ZERO&&e<=_2.NINE}function E$(e){return e>=_2.UPPER_A&&e<=_2.UPPER_F||e>=_2.LOWER_A&&e<=_2.LOWER_F}function w$(e){return e>=_2.UPPER_A&&e<=_2.UPPER_Z||e>=_2.LOWER_A&&e<=_2.LOWER_Z||ou(e)}function q$(e){return e===_2.EQUALS||w$(e)}var z2;(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"})(z2||(z2={}));var wt;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(wt||(wt={}));class S${constructor(t,o,n){this.decodeTree=t,this.emitCodePoint=o,this.errors=n,this.state=z2.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=wt.Strict}startEntity(t){this.decodeMode=t,this.state=z2.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,o){switch(this.state){case z2.EntityStart:return t.charCodeAt(o)===_2.NUM?(this.state=z2.NumericStart,this.consumed+=1,this.stateNumericStart(t,o+1)):(this.state=z2.NamedEntity,this.stateNamedEntity(t,o));case z2.NumericStart:return this.stateNumericStart(t,o);case z2.NumericDecimal:return this.stateNumericDecimal(t,o);case z2.NumericHex:return this.stateNumericHex(t,o);case z2.NamedEntity:return this.stateNamedEntity(t,o)}}stateNumericStart(t,o){return o>=t.length?-1:(t.charCodeAt(o)|v$)===_2.LOWER_X?(this.state=z2.NumericHex,this.consumed+=1,this.stateNumericHex(t,o+1)):(this.state=z2.NumericDecimal,this.stateNumericDecimal(t,o))}addToNumericResult(t,o,n,s){if(o!==n){const a=n-o;this.result=this.result*Math.pow(s,a)+Number.parseInt(t.substr(o,a),s),this.consumed+=a}}stateNumericHex(t,o){const n=o;for(;o<t.length;){const s=t.charCodeAt(o);if(ou(s)||E$(s))o+=1;else return this.addToNumericResult(t,n,o,16),this.emitNumericEntity(s,3)}return this.addToNumericResult(t,n,o,16),-1}stateNumericDecimal(t,o){const n=o;for(;o<t.length;){const s=t.charCodeAt(o);if(ou(s))o+=1;else return this.addToNumericResult(t,n,o,10),this.emitNumericEntity(s,2)}return this.addToNumericResult(t,n,o,10),-1}emitNumericEntity(t,o){var n;if(this.consumed<=o)return(n=this.errors)===null||n===void 0||n.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(t===_2.SEMI)this.consumed+=1;else if(this.decodeMode===wt.Strict)return 0;return this.emitCodePoint(k$(this.result),this.consumed),this.errors&&(t!==_2.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(t,o){const{decodeTree:n}=this;let s=n[this.treeIndex],a=(s&lo.VALUE_LENGTH)>>14;for(;o<t.length;o++,this.excess++){const r=t.charCodeAt(o);if(this.treeIndex=y$(n,s,this.treeIndex+Math.max(1,a),r),this.treeIndex<0)return this.result===0||this.decodeMode===wt.Attribute&&(a===0||q$(r))?0:this.emitNotTerminatedNamedEntity();if(s=n[this.treeIndex],a=(s&lo.VALUE_LENGTH)>>14,a!==0){if(r===_2.SEMI)return this.emitNamedEntityData(this.treeIndex,a,this.consumed+this.excess);this.decodeMode!==wt.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var t;const{result:o,decodeTree:n}=this,s=(n[o]&lo.VALUE_LENGTH)>>14;return this.emitNamedEntityData(o,s,this.consumed),(t=this.errors)===null||t===void 0||t.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(t,o,n){const{decodeTree:s}=this;return this.emitCodePoint(o===1?s[t]&~lo.VALUE_LENGTH:s[t+1],n),o===3&&this.emitCodePoint(s[t+2],n),n}end(){var t;switch(this.state){case z2.NamedEntity:return this.result!==0&&(this.decodeMode!==wt.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case z2.NumericDecimal:return this.emitNumericEntity(0,2);case z2.NumericHex:return this.emitNumericEntity(0,3);case z2.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case z2.EntityStart:return 0}}}function y$(e,t,o,n){const s=(t&lo.BRANCH_LENGTH)>>7,a=t&lo.JUMP_TABLE;if(s===0)return a!==0&&n===a?o:-1;if(a){const c=n-a;return c<0||c>=s?-1:e[o+c]-1}let r=o,i=r+s-1;for(;r<=i;){const c=r+i>>>1,l=e[c];if(l<n)r=c+1;else if(l>n)i=c-1;else return e[c+s]}return-1}var E0;(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/"})(E0||(E0={}));var Zo;(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"})(Zo||(Zo={}));var _e;(function(e){e.NO_QUIRKS="no-quirks",e.QUIRKS="quirks",e.LIMITED_QUIRKS="limited-quirks"})(_e||(_e={}));var l0;(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"})(l0||(l0={}));var A;(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"})(A||(A={}));const R$=new Map([[l0.A,A.A],[l0.ADDRESS,A.ADDRESS],[l0.ANNOTATION_XML,A.ANNOTATION_XML],[l0.APPLET,A.APPLET],[l0.AREA,A.AREA],[l0.ARTICLE,A.ARTICLE],[l0.ASIDE,A.ASIDE],[l0.B,A.B],[l0.BASE,A.BASE],[l0.BASEFONT,A.BASEFONT],[l0.BGSOUND,A.BGSOUND],[l0.BIG,A.BIG],[l0.BLOCKQUOTE,A.BLOCKQUOTE],[l0.BODY,A.BODY],[l0.BR,A.BR],[l0.BUTTON,A.BUTTON],[l0.CAPTION,A.CAPTION],[l0.CENTER,A.CENTER],[l0.CODE,A.CODE],[l0.COL,A.COL],[l0.COLGROUP,A.COLGROUP],[l0.DD,A.DD],[l0.DESC,A.DESC],[l0.DETAILS,A.DETAILS],[l0.DIALOG,A.DIALOG],[l0.DIR,A.DIR],[l0.DIV,A.DIV],[l0.DL,A.DL],[l0.DT,A.DT],[l0.EM,A.EM],[l0.EMBED,A.EMBED],[l0.FIELDSET,A.FIELDSET],[l0.FIGCAPTION,A.FIGCAPTION],[l0.FIGURE,A.FIGURE],[l0.FONT,A.FONT],[l0.FOOTER,A.FOOTER],[l0.FOREIGN_OBJECT,A.FOREIGN_OBJECT],[l0.FORM,A.FORM],[l0.FRAME,A.FRAME],[l0.FRAMESET,A.FRAMESET],[l0.H1,A.H1],[l0.H2,A.H2],[l0.H3,A.H3],[l0.H4,A.H4],[l0.H5,A.H5],[l0.H6,A.H6],[l0.HEAD,A.HEAD],[l0.HEADER,A.HEADER],[l0.HGROUP,A.HGROUP],[l0.HR,A.HR],[l0.HTML,A.HTML],[l0.I,A.I],[l0.IMG,A.IMG],[l0.IMAGE,A.IMAGE],[l0.INPUT,A.INPUT],[l0.IFRAME,A.IFRAME],[l0.KEYGEN,A.KEYGEN],[l0.LABEL,A.LABEL],[l0.LI,A.LI],[l0.LINK,A.LINK],[l0.LISTING,A.LISTING],[l0.MAIN,A.MAIN],[l0.MALIGNMARK,A.MALIGNMARK],[l0.MARQUEE,A.MARQUEE],[l0.MATH,A.MATH],[l0.MENU,A.MENU],[l0.META,A.META],[l0.MGLYPH,A.MGLYPH],[l0.MI,A.MI],[l0.MO,A.MO],[l0.MN,A.MN],[l0.MS,A.MS],[l0.MTEXT,A.MTEXT],[l0.NAV,A.NAV],[l0.NOBR,A.NOBR],[l0.NOFRAMES,A.NOFRAMES],[l0.NOEMBED,A.NOEMBED],[l0.NOSCRIPT,A.NOSCRIPT],[l0.OBJECT,A.OBJECT],[l0.OL,A.OL],[l0.OPTGROUP,A.OPTGROUP],[l0.OPTION,A.OPTION],[l0.P,A.P],[l0.PARAM,A.PARAM],[l0.PLAINTEXT,A.PLAINTEXT],[l0.PRE,A.PRE],[l0.RB,A.RB],[l0.RP,A.RP],[l0.RT,A.RT],[l0.RTC,A.RTC],[l0.RUBY,A.RUBY],[l0.S,A.S],[l0.SCRIPT,A.SCRIPT],[l0.SEARCH,A.SEARCH],[l0.SECTION,A.SECTION],[l0.SELECT,A.SELECT],[l0.SOURCE,A.SOURCE],[l0.SMALL,A.SMALL],[l0.SPAN,A.SPAN],[l0.STRIKE,A.STRIKE],[l0.STRONG,A.STRONG],[l0.STYLE,A.STYLE],[l0.SUB,A.SUB],[l0.SUMMARY,A.SUMMARY],[l0.SUP,A.SUP],[l0.TABLE,A.TABLE],[l0.TBODY,A.TBODY],[l0.TEMPLATE,A.TEMPLATE],[l0.TEXTAREA,A.TEXTAREA],[l0.TFOOT,A.TFOOT],[l0.TD,A.TD],[l0.TH,A.TH],[l0.THEAD,A.THEAD],[l0.TITLE,A.TITLE],[l0.TR,A.TR],[l0.TRACK,A.TRACK],[l0.TT,A.TT],[l0.U,A.U],[l0.UL,A.UL],[l0.SVG,A.SVG],[l0.VAR,A.VAR],[l0.WBR,A.WBR],[l0.XMP,A.XMP]]);function cs(e){var t;return(t=R$.get(e))!==null&&t!==void 0?t:A.UNKNOWN}const w0=A,B$={[E0.HTML]:new Set([w0.ADDRESS,w0.APPLET,w0.AREA,w0.ARTICLE,w0.ASIDE,w0.BASE,w0.BASEFONT,w0.BGSOUND,w0.BLOCKQUOTE,w0.BODY,w0.BR,w0.BUTTON,w0.CAPTION,w0.CENTER,w0.COL,w0.COLGROUP,w0.DD,w0.DETAILS,w0.DIR,w0.DIV,w0.DL,w0.DT,w0.EMBED,w0.FIELDSET,w0.FIGCAPTION,w0.FIGURE,w0.FOOTER,w0.FORM,w0.FRAME,w0.FRAMESET,w0.H1,w0.H2,w0.H3,w0.H4,w0.H5,w0.H6,w0.HEAD,w0.HEADER,w0.HGROUP,w0.HR,w0.HTML,w0.IFRAME,w0.IMG,w0.INPUT,w0.LI,w0.LINK,w0.LISTING,w0.MAIN,w0.MARQUEE,w0.MENU,w0.META,w0.NAV,w0.NOEMBED,w0.NOFRAMES,w0.NOSCRIPT,w0.OBJECT,w0.OL,w0.P,w0.PARAM,w0.PLAINTEXT,w0.PRE,w0.SCRIPT,w0.SECTION,w0.SELECT,w0.SOURCE,w0.STYLE,w0.SUMMARY,w0.TABLE,w0.TBODY,w0.TD,w0.TEMPLATE,w0.TEXTAREA,w0.TFOOT,w0.TH,w0.THEAD,w0.TITLE,w0.TR,w0.TRACK,w0.UL,w0.WBR,w0.XMP]),[E0.MATHML]:new Set([w0.MI,w0.MO,w0.MN,w0.MS,w0.MTEXT,w0.ANNOTATION_XML]),[E0.SVG]:new Set([w0.TITLE,w0.FOREIGN_OBJECT,w0.DESC]),[E0.XLINK]:new Set,[E0.XML]:new Set,[E0.XMLNS]:new Set},nu=new Set([w0.H1,w0.H2,w0.H3,w0.H4,w0.H5,w0.H6]);l0.STYLE,l0.SCRIPT,l0.XMP,l0.IFRAME,l0.NOEMBED,l0.NOFRAMES,l0.PLAINTEXT;var K;(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"})(K||(K={}));const r2={DATA:K.DATA,RCDATA:K.RCDATA,RAWTEXT:K.RAWTEXT,SCRIPT_DATA:K.SCRIPT_DATA,PLAINTEXT:K.PLAINTEXT,CDATA_SECTION:K.CDATA_SECTION};function W$(e){return e>=U.DIGIT_0&&e<=U.DIGIT_9}function Ka(e){return e>=U.LATIN_CAPITAL_A&&e<=U.LATIN_CAPITAL_Z}function L$(e){return e>=U.LATIN_SMALL_A&&e<=U.LATIN_SMALL_Z}function po(e){return L$(e)||Ka(e)}function $m(e){return po(e)||W$(e)}function xc(e){return e+32}function eO(e){return e===U.SPACE||e===U.LINE_FEED||e===U.TABULATION||e===U.FORM_FEED}function tO(e){return eO(e)||e===U.SOLIDUS||e===U.GREATER_THAN_SIGN}function T$(e){return e===U.NULL?M0.nullCharacterReference:e>1114111?M0.characterReferenceOutsideUnicodeRange:Ym(e)?M0.surrogateCharacterReference:Zm(e)?M0.noncharacterCharacterReference:Xm(e)||e===U.CARRIAGE_RETURN?M0.controlCharacterReference:null}class I${constructor(t,o){this.options=t,this.handler=o,this.paused=!1,this.inLoop=!1,this.inForeignNode=!1,this.lastStartTagName="",this.active=!1,this.state=K.DATA,this.returnState=K.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new O$(o),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new S$(g$,(n,s)=>{this.preprocessor.pos=this.entityStartPos+s-1,this._flushCodePointConsumedAsCharacterReference(n)},o.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(M0.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:n=>{this._err(M0.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+n)},validateNumericCharacterReference:n=>{const s=T$(n);s&&this._err(s,1)}}:void 0)}_err(t,o=0){var n,s;(s=(n=this.handler).onParseError)===null||s===void 0||s.call(n,this.preprocessor.getError(t,o))}getCurrentLocation(t){return this.options.sourceCodeLocationInfo?{startLine:this.preprocessor.line,startCol:this.preprocessor.col-t,startOffset:this.preprocessor.offset-t,endLine:-1,endCol:-1,endOffset:-1}:null}_runParsingLoop(){if(!this.inLoop){for(this.inLoop=!0;this.active&&!this.paused;){this.consumedAfterSnapshot=0;const t=this._consume();this._ensureHibernation()||this._callState(t)}this.inLoop=!1}}pause(){this.paused=!0}resume(t){if(!this.paused)throw new Error("Parser was already resumed");this.paused=!1,!this.inLoop&&(this._runParsingLoop(),this.paused||t?.())}write(t,o,n){this.active=!0,this.preprocessor.write(t,o),this._runParsingLoop(),this.paused||n?.()}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 o=0;o<t;o++)this.preprocessor.advance()}_consumeSequenceIfMatch(t,o){return this.preprocessor.startsWith(t,o)?(this._advanceBy(t.length-1),!0):!1}_createStartTagToken(){this.currentToken={type:p1.START_TAG,tagName:"",tagID:A.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:p1.END_TAG,tagName:"",tagID:A.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(t){this.currentToken={type:p1.COMMENT,data:"",location:this.getCurrentLocation(t)}}_createDoctypeToken(t){this.currentToken={type:p1.DOCTYPE,name:t,forceQuirks:!1,publicId:null,systemId:null,location:this.currentLocation}}_createCharacterToken(t,o){this.currentCharacterToken={type:t,chars:o,location:this.currentLocation}}_createAttr(t){this.currentAttr={name:t,value:""},this.currentLocation=this.getCurrentLocation(0)}_leaveAttrName(){var t,o;const n=this.currentToken;if(Jm(n,this.currentAttr.name)===null){if(n.attrs.push(this.currentAttr),n.location&&this.currentLocation){const s=(t=(o=n.location).attrs)!==null&&t!==void 0?t:o.attrs=Object.create(null);s[this.currentAttr.name]=this.currentLocation,this._leaveAttrValue()}}else this._err(M0.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=cs(t.tagName),t.type===p1.START_TAG?(this.lastStartTagName=t.tagName,this.handler.onStartTag(t)):(t.attrs.length>0&&this._err(M0.endTagWithAttributes),t.selfClosing&&this._err(M0.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 p1.CHARACTER:{this.handler.onCharacter(this.currentCharacterToken);break}case p1.NULL_CHARACTER:{this.handler.onNullCharacter(this.currentCharacterToken);break}case p1.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:p1.EOF,location:t}),this.active=!1}_appendCharToCurrentCharacterToken(t,o){if(this.currentCharacterToken)if(this.currentCharacterToken.type===t){this.currentCharacterToken.chars+=o;return}else this.currentLocation=this.getCurrentLocation(0),this._emitCurrentCharacterToken(this.currentLocation),this.preprocessor.dropParsedChunk();this._createCharacterToken(t,o)}_emitCodePoint(t){const o=eO(t)?p1.WHITESPACE_CHARACTER:t===U.NULL?p1.NULL_CHARACTER:p1.CHARACTER;this._appendCharToCurrentCharacterToken(o,String.fromCodePoint(t))}_emitChars(t){this._appendCharToCurrentCharacterToken(p1.CHARACTER,t)}_startCharacterReference(){this.returnState=this.state,this.state=K.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?wt.Attribute:wt.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===K.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===K.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===K.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(t){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(t):this._emitCodePoint(t)}_callState(t){switch(this.state){case K.DATA:{this._stateData(t);break}case K.RCDATA:{this._stateRcdata(t);break}case K.RAWTEXT:{this._stateRawtext(t);break}case K.SCRIPT_DATA:{this._stateScriptData(t);break}case K.PLAINTEXT:{this._statePlaintext(t);break}case K.TAG_OPEN:{this._stateTagOpen(t);break}case K.END_TAG_OPEN:{this._stateEndTagOpen(t);break}case K.TAG_NAME:{this._stateTagName(t);break}case K.RCDATA_LESS_THAN_SIGN:{this._stateRcdataLessThanSign(t);break}case K.RCDATA_END_TAG_OPEN:{this._stateRcdataEndTagOpen(t);break}case K.RCDATA_END_TAG_NAME:{this._stateRcdataEndTagName(t);break}case K.RAWTEXT_LESS_THAN_SIGN:{this._stateRawtextLessThanSign(t);break}case K.RAWTEXT_END_TAG_OPEN:{this._stateRawtextEndTagOpen(t);break}case K.RAWTEXT_END_TAG_NAME:{this._stateRawtextEndTagName(t);break}case K.SCRIPT_DATA_LESS_THAN_SIGN:{this._stateScriptDataLessThanSign(t);break}case K.SCRIPT_DATA_END_TAG_OPEN:{this._stateScriptDataEndTagOpen(t);break}case K.SCRIPT_DATA_END_TAG_NAME:{this._stateScriptDataEndTagName(t);break}case K.SCRIPT_DATA_ESCAPE_START:{this._stateScriptDataEscapeStart(t);break}case K.SCRIPT_DATA_ESCAPE_START_DASH:{this._stateScriptDataEscapeStartDash(t);break}case K.SCRIPT_DATA_ESCAPED:{this._stateScriptDataEscaped(t);break}case K.SCRIPT_DATA_ESCAPED_DASH:{this._stateScriptDataEscapedDash(t);break}case K.SCRIPT_DATA_ESCAPED_DASH_DASH:{this._stateScriptDataEscapedDashDash(t);break}case K.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataEscapedLessThanSign(t);break}case K.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:{this._stateScriptDataEscapedEndTagOpen(t);break}case K.SCRIPT_DATA_ESCAPED_END_TAG_NAME:{this._stateScriptDataEscapedEndTagName(t);break}case K.SCRIPT_DATA_DOUBLE_ESCAPE_START:{this._stateScriptDataDoubleEscapeStart(t);break}case K.SCRIPT_DATA_DOUBLE_ESCAPED:{this._stateScriptDataDoubleEscaped(t);break}case K.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:{this._stateScriptDataDoubleEscapedDash(t);break}case K.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:{this._stateScriptDataDoubleEscapedDashDash(t);break}case K.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataDoubleEscapedLessThanSign(t);break}case K.SCRIPT_DATA_DOUBLE_ESCAPE_END:{this._stateScriptDataDoubleEscapeEnd(t);break}case K.BEFORE_ATTRIBUTE_NAME:{this._stateBeforeAttributeName(t);break}case K.ATTRIBUTE_NAME:{this._stateAttributeName(t);break}case K.AFTER_ATTRIBUTE_NAME:{this._stateAfterAttributeName(t);break}case K.BEFORE_ATTRIBUTE_VALUE:{this._stateBeforeAttributeValue(t);break}case K.ATTRIBUTE_VALUE_DOUBLE_QUOTED:{this._stateAttributeValueDoubleQuoted(t);break}case K.ATTRIBUTE_VALUE_SINGLE_QUOTED:{this._stateAttributeValueSingleQuoted(t);break}case K.ATTRIBUTE_VALUE_UNQUOTED:{this._stateAttributeValueUnquoted(t);break}case K.AFTER_ATTRIBUTE_VALUE_QUOTED:{this._stateAfterAttributeValueQuoted(t);break}case K.SELF_CLOSING_START_TAG:{this._stateSelfClosingStartTag(t);break}case K.BOGUS_COMMENT:{this._stateBogusComment(t);break}case K.MARKUP_DECLARATION_OPEN:{this._stateMarkupDeclarationOpen(t);break}case K.COMMENT_START:{this._stateCommentStart(t);break}case K.COMMENT_START_DASH:{this._stateCommentStartDash(t);break}case K.COMMENT:{this._stateComment(t);break}case K.COMMENT_LESS_THAN_SIGN:{this._stateCommentLessThanSign(t);break}case K.COMMENT_LESS_THAN_SIGN_BANG:{this._stateCommentLessThanSignBang(t);break}case K.COMMENT_LESS_THAN_SIGN_BANG_DASH:{this._stateCommentLessThanSignBangDash(t);break}case K.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:{this._stateCommentLessThanSignBangDashDash(t);break}case K.COMMENT_END_DASH:{this._stateCommentEndDash(t);break}case K.COMMENT_END:{this._stateCommentEnd(t);break}case K.COMMENT_END_BANG:{this._stateCommentEndBang(t);break}case K.DOCTYPE:{this._stateDoctype(t);break}case K.BEFORE_DOCTYPE_NAME:{this._stateBeforeDoctypeName(t);break}case K.DOCTYPE_NAME:{this._stateDoctypeName(t);break}case K.AFTER_DOCTYPE_NAME:{this._stateAfterDoctypeName(t);break}case K.AFTER_DOCTYPE_PUBLIC_KEYWORD:{this._stateAfterDoctypePublicKeyword(t);break}case K.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateBeforeDoctypePublicIdentifier(t);break}case K.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypePublicIdentifierDoubleQuoted(t);break}case K.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypePublicIdentifierSingleQuoted(t);break}case K.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateAfterDoctypePublicIdentifier(t);break}case K.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:{this._stateBetweenDoctypePublicAndSystemIdentifiers(t);break}case K.AFTER_DOCTYPE_SYSTEM_KEYWORD:{this._stateAfterDoctypeSystemKeyword(t);break}case K.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateBeforeDoctypeSystemIdentifier(t);break}case K.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypeSystemIdentifierDoubleQuoted(t);break}case K.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypeSystemIdentifierSingleQuoted(t);break}case K.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateAfterDoctypeSystemIdentifier(t);break}case K.BOGUS_DOCTYPE:{this._stateBogusDoctype(t);break}case K.CDATA_SECTION:{this._stateCdataSection(t);break}case K.CDATA_SECTION_BRACKET:{this._stateCdataSectionBracket(t);break}case K.CDATA_SECTION_END:{this._stateCdataSectionEnd(t);break}case K.CHARACTER_REFERENCE:{this._stateCharacterReference();break}case K.AMBIGUOUS_AMPERSAND:{this._stateAmbiguousAmpersand(t);break}default:throw new Error("Unknown state")}}_stateData(t){switch(t){case U.LESS_THAN_SIGN:{this.state=K.TAG_OPEN;break}case U.AMPERSAND:{this._startCharacterReference();break}case U.NULL:{this._err(M0.unexpectedNullCharacter),this._emitCodePoint(t);break}case U.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRcdata(t){switch(t){case U.AMPERSAND:{this._startCharacterReference();break}case U.LESS_THAN_SIGN:{this.state=K.RCDATA_LESS_THAN_SIGN;break}case U.NULL:{this._err(M0.unexpectedNullCharacter),this._emitChars(Z1);break}case U.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRawtext(t){switch(t){case U.LESS_THAN_SIGN:{this.state=K.RAWTEXT_LESS_THAN_SIGN;break}case U.NULL:{this._err(M0.unexpectedNullCharacter),this._emitChars(Z1);break}case U.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptData(t){switch(t){case U.LESS_THAN_SIGN:{this.state=K.SCRIPT_DATA_LESS_THAN_SIGN;break}case U.NULL:{this._err(M0.unexpectedNullCharacter),this._emitChars(Z1);break}case U.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_statePlaintext(t){switch(t){case U.NULL:{this._err(M0.unexpectedNullCharacter),this._emitChars(Z1);break}case U.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateTagOpen(t){if(po(t))this._createStartTagToken(),this.state=K.TAG_NAME,this._stateTagName(t);else switch(t){case U.EXCLAMATION_MARK:{this.state=K.MARKUP_DECLARATION_OPEN;break}case U.SOLIDUS:{this.state=K.END_TAG_OPEN;break}case U.QUESTION_MARK:{this._err(M0.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=K.BOGUS_COMMENT,this._stateBogusComment(t);break}case U.EOF:{this._err(M0.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break}default:this._err(M0.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=K.DATA,this._stateData(t)}}_stateEndTagOpen(t){if(po(t))this._createEndTagToken(),this.state=K.TAG_NAME,this._stateTagName(t);else switch(t){case U.GREATER_THAN_SIGN:{this._err(M0.missingEndTagName),this.state=K.DATA;break}case U.EOF:{this._err(M0.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break}default:this._err(M0.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=K.BOGUS_COMMENT,this._stateBogusComment(t)}}_stateTagName(t){const o=this.currentToken;switch(t){case U.SPACE:case U.LINE_FEED:case U.TABULATION:case U.FORM_FEED:{this.state=K.BEFORE_ATTRIBUTE_NAME;break}case U.SOLIDUS:{this.state=K.SELF_CLOSING_START_TAG;break}case U.GREATER_THAN_SIGN:{this.state=K.DATA,this.emitCurrentTagToken();break}case U.NULL:{this._err(M0.unexpectedNullCharacter),o.tagName+=Z1;break}case U.EOF:{this._err(M0.eofInTag),this._emitEOFToken();break}default:o.tagName+=String.fromCodePoint(Ka(t)?xc(t):t)}}_stateRcdataLessThanSign(t){t===U.SOLIDUS?this.state=K.RCDATA_END_TAG_OPEN:(this._emitChars("<"),this.state=K.RCDATA,this._stateRcdata(t))}_stateRcdataEndTagOpen(t){po(t)?(this.state=K.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(t)):(this._emitChars("</"),this.state=K.RCDATA,this._stateRcdata(t))}handleSpecialEndTag(t){if(!this.preprocessor.startsWith(this.lastStartTagName,!1))return!this._ensureHibernation();this._createEndTagToken();const o=this.currentToken;switch(o.tagName=this.lastStartTagName,this.preprocessor.peek(this.lastStartTagName.length)){case U.SPACE:case U.LINE_FEED:case U.TABULATION:case U.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=K.BEFORE_ATTRIBUTE_NAME,!1;case U.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=K.SELF_CLOSING_START_TAG,!1;case U.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=K.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=K.RCDATA,this._stateRcdata(t))}_stateRawtextLessThanSign(t){t===U.SOLIDUS?this.state=K.RAWTEXT_END_TAG_OPEN:(this._emitChars("<"),this.state=K.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagOpen(t){po(t)?(this.state=K.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(t)):(this._emitChars("</"),this.state=K.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=K.RAWTEXT,this._stateRawtext(t))}_stateScriptDataLessThanSign(t){switch(t){case U.SOLIDUS:{this.state=K.SCRIPT_DATA_END_TAG_OPEN;break}case U.EXCLAMATION_MARK:{this.state=K.SCRIPT_DATA_ESCAPE_START,this._emitChars("<!");break}default:this._emitChars("<"),this.state=K.SCRIPT_DATA,this._stateScriptData(t)}}_stateScriptDataEndTagOpen(t){po(t)?(this.state=K.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(t)):(this._emitChars("</"),this.state=K.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=K.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStart(t){t===U.HYPHEN_MINUS?(this.state=K.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars("-")):(this.state=K.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStartDash(t){t===U.HYPHEN_MINUS?(this.state=K.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-")):(this.state=K.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscaped(t){switch(t){case U.HYPHEN_MINUS:{this.state=K.SCRIPT_DATA_ESCAPED_DASH,this._emitChars("-");break}case U.LESS_THAN_SIGN:{this.state=K.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case U.NULL:{this._err(M0.unexpectedNullCharacter),this._emitChars(Z1);break}case U.EOF:{this._err(M0.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataEscapedDash(t){switch(t){case U.HYPHEN_MINUS:{this.state=K.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-");break}case U.LESS_THAN_SIGN:{this.state=K.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case U.NULL:{this._err(M0.unexpectedNullCharacter),this.state=K.SCRIPT_DATA_ESCAPED,this._emitChars(Z1);break}case U.EOF:{this._err(M0.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=K.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedDashDash(t){switch(t){case U.HYPHEN_MINUS:{this._emitChars("-");break}case U.LESS_THAN_SIGN:{this.state=K.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case U.GREATER_THAN_SIGN:{this.state=K.SCRIPT_DATA,this._emitChars(">");break}case U.NULL:{this._err(M0.unexpectedNullCharacter),this.state=K.SCRIPT_DATA_ESCAPED,this._emitChars(Z1);break}case U.EOF:{this._err(M0.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=K.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedLessThanSign(t){t===U.SOLIDUS?this.state=K.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:po(t)?(this._emitChars("<"),this.state=K.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(t)):(this._emitChars("<"),this.state=K.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagOpen(t){po(t)?(this.state=K.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(t)):(this._emitChars("</"),this.state=K.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=K.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscapeStart(t){if(this.preprocessor.startsWith(G2.SCRIPT,!1)&&tO(this.preprocessor.peek(G2.SCRIPT.length))){this._emitCodePoint(t);for(let o=0;o<G2.SCRIPT.length;o++)this._emitCodePoint(this._consume());this.state=K.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=K.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscaped(t){switch(t){case U.HYPHEN_MINUS:{this.state=K.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars("-");break}case U.LESS_THAN_SIGN:{this.state=K.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case U.NULL:{this._err(M0.unexpectedNullCharacter),this._emitChars(Z1);break}case U.EOF:{this._err(M0.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDash(t){switch(t){case U.HYPHEN_MINUS:{this.state=K.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars("-");break}case U.LESS_THAN_SIGN:{this.state=K.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case U.NULL:{this._err(M0.unexpectedNullCharacter),this.state=K.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(Z1);break}case U.EOF:{this._err(M0.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=K.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDashDash(t){switch(t){case U.HYPHEN_MINUS:{this._emitChars("-");break}case U.LESS_THAN_SIGN:{this.state=K.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case U.GREATER_THAN_SIGN:{this.state=K.SCRIPT_DATA,this._emitChars(">");break}case U.NULL:{this._err(M0.unexpectedNullCharacter),this.state=K.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(Z1);break}case U.EOF:{this._err(M0.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=K.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedLessThanSign(t){t===U.SOLIDUS?(this.state=K.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=K.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateScriptDataDoubleEscapeEnd(t){if(this.preprocessor.startsWith(G2.SCRIPT,!1)&&tO(this.preprocessor.peek(G2.SCRIPT.length))){this._emitCodePoint(t);for(let o=0;o<G2.SCRIPT.length;o++)this._emitCodePoint(this._consume());this.state=K.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=K.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateBeforeAttributeName(t){switch(t){case U.SPACE:case U.LINE_FEED:case U.TABULATION:case U.FORM_FEED:break;case U.SOLIDUS:case U.GREATER_THAN_SIGN:case U.EOF:{this.state=K.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case U.EQUALS_SIGN:{this._err(M0.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=K.ATTRIBUTE_NAME;break}default:this._createAttr(""),this.state=K.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateAttributeName(t){switch(t){case U.SPACE:case U.LINE_FEED:case U.TABULATION:case U.FORM_FEED:case U.SOLIDUS:case U.GREATER_THAN_SIGN:case U.EOF:{this._leaveAttrName(),this.state=K.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case U.EQUALS_SIGN:{this._leaveAttrName(),this.state=K.BEFORE_ATTRIBUTE_VALUE;break}case U.QUOTATION_MARK:case U.APOSTROPHE:case U.LESS_THAN_SIGN:{this._err(M0.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(t);break}case U.NULL:{this._err(M0.unexpectedNullCharacter),this.currentAttr.name+=Z1;break}default:this.currentAttr.name+=String.fromCodePoint(Ka(t)?xc(t):t)}}_stateAfterAttributeName(t){switch(t){case U.SPACE:case U.LINE_FEED:case U.TABULATION:case U.FORM_FEED:break;case U.SOLIDUS:{this.state=K.SELF_CLOSING_START_TAG;break}case U.EQUALS_SIGN:{this.state=K.BEFORE_ATTRIBUTE_VALUE;break}case U.GREATER_THAN_SIGN:{this.state=K.DATA,this.emitCurrentTagToken();break}case U.EOF:{this._err(M0.eofInTag),this._emitEOFToken();break}default:this._createAttr(""),this.state=K.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateBeforeAttributeValue(t){switch(t){case U.SPACE:case U.LINE_FEED:case U.TABULATION:case U.FORM_FEED:break;case U.QUOTATION_MARK:{this.state=K.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break}case U.APOSTROPHE:{this.state=K.ATTRIBUTE_VALUE_SINGLE_QUOTED;break}case U.GREATER_THAN_SIGN:{this._err(M0.missingAttributeValue),this.state=K.DATA,this.emitCurrentTagToken();break}default:this.state=K.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(t)}}_stateAttributeValueDoubleQuoted(t){switch(t){case U.QUOTATION_MARK:{this.state=K.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case U.AMPERSAND:{this._startCharacterReference();break}case U.NULL:{this._err(M0.unexpectedNullCharacter),this.currentAttr.value+=Z1;break}case U.EOF:{this._err(M0.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueSingleQuoted(t){switch(t){case U.APOSTROPHE:{this.state=K.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case U.AMPERSAND:{this._startCharacterReference();break}case U.NULL:{this._err(M0.unexpectedNullCharacter),this.currentAttr.value+=Z1;break}case U.EOF:{this._err(M0.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueUnquoted(t){switch(t){case U.SPACE:case U.LINE_FEED:case U.TABULATION:case U.FORM_FEED:{this._leaveAttrValue(),this.state=K.BEFORE_ATTRIBUTE_NAME;break}case U.AMPERSAND:{this._startCharacterReference();break}case U.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=K.DATA,this.emitCurrentTagToken();break}case U.NULL:{this._err(M0.unexpectedNullCharacter),this.currentAttr.value+=Z1;break}case U.QUOTATION_MARK:case U.APOSTROPHE:case U.LESS_THAN_SIGN:case U.EQUALS_SIGN:case U.GRAVE_ACCENT:{this._err(M0.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(t);break}case U.EOF:{this._err(M0.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAfterAttributeValueQuoted(t){switch(t){case U.SPACE:case U.LINE_FEED:case U.TABULATION:case U.FORM_FEED:{this._leaveAttrValue(),this.state=K.BEFORE_ATTRIBUTE_NAME;break}case U.SOLIDUS:{this._leaveAttrValue(),this.state=K.SELF_CLOSING_START_TAG;break}case U.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=K.DATA,this.emitCurrentTagToken();break}case U.EOF:{this._err(M0.eofInTag),this._emitEOFToken();break}default:this._err(M0.missingWhitespaceBetweenAttributes),this.state=K.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateSelfClosingStartTag(t){switch(t){case U.GREATER_THAN_SIGN:{const o=this.currentToken;o.selfClosing=!0,this.state=K.DATA,this.emitCurrentTagToken();break}case U.EOF:{this._err(M0.eofInTag),this._emitEOFToken();break}default:this._err(M0.unexpectedSolidusInTag),this.state=K.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateBogusComment(t){const o=this.currentToken;switch(t){case U.GREATER_THAN_SIGN:{this.state=K.DATA,this.emitCurrentComment(o);break}case U.EOF:{this.emitCurrentComment(o),this._emitEOFToken();break}case U.NULL:{this._err(M0.unexpectedNullCharacter),o.data+=Z1;break}default:o.data+=String.fromCodePoint(t)}}_stateMarkupDeclarationOpen(t){this._consumeSequenceIfMatch(G2.DASH_DASH,!0)?(this._createCommentToken(G2.DASH_DASH.length+1),this.state=K.COMMENT_START):this._consumeSequenceIfMatch(G2.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(G2.DOCTYPE.length+1),this.state=K.DOCTYPE):this._consumeSequenceIfMatch(G2.CDATA_START,!0)?this.inForeignNode?this.state=K.CDATA_SECTION:(this._err(M0.cdataInHtmlContent),this._createCommentToken(G2.CDATA_START.length+1),this.currentToken.data="[CDATA[",this.state=K.BOGUS_COMMENT):this._ensureHibernation()||(this._err(M0.incorrectlyOpenedComment),this._createCommentToken(2),this.state=K.BOGUS_COMMENT,this._stateBogusComment(t))}_stateCommentStart(t){switch(t){case U.HYPHEN_MINUS:{this.state=K.COMMENT_START_DASH;break}case U.GREATER_THAN_SIGN:{this._err(M0.abruptClosingOfEmptyComment),this.state=K.DATA;const o=this.currentToken;this.emitCurrentComment(o);break}default:this.state=K.COMMENT,this._stateComment(t)}}_stateCommentStartDash(t){const o=this.currentToken;switch(t){case U.HYPHEN_MINUS:{this.state=K.COMMENT_END;break}case U.GREATER_THAN_SIGN:{this._err(M0.abruptClosingOfEmptyComment),this.state=K.DATA,this.emitCurrentComment(o);break}case U.EOF:{this._err(M0.eofInComment),this.emitCurrentComment(o),this._emitEOFToken();break}default:o.data+="-",this.state=K.COMMENT,this._stateComment(t)}}_stateComment(t){const o=this.currentToken;switch(t){case U.HYPHEN_MINUS:{this.state=K.COMMENT_END_DASH;break}case U.LESS_THAN_SIGN:{o.data+="<",this.state=K.COMMENT_LESS_THAN_SIGN;break}case U.NULL:{this._err(M0.unexpectedNullCharacter),o.data+=Z1;break}case U.EOF:{this._err(M0.eofInComment),this.emitCurrentComment(o),this._emitEOFToken();break}default:o.data+=String.fromCodePoint(t)}}_stateCommentLessThanSign(t){const o=this.currentToken;switch(t){case U.EXCLAMATION_MARK:{o.data+="!",this.state=K.COMMENT_LESS_THAN_SIGN_BANG;break}case U.LESS_THAN_SIGN:{o.data+="<";break}default:this.state=K.COMMENT,this._stateComment(t)}}_stateCommentLessThanSignBang(t){t===U.HYPHEN_MINUS?this.state=K.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=K.COMMENT,this._stateComment(t))}_stateCommentLessThanSignBangDash(t){t===U.HYPHEN_MINUS?this.state=K.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=K.COMMENT_END_DASH,this._stateCommentEndDash(t))}_stateCommentLessThanSignBangDashDash(t){t!==U.GREATER_THAN_SIGN&&t!==U.EOF&&this._err(M0.nestedComment),this.state=K.COMMENT_END,this._stateCommentEnd(t)}_stateCommentEndDash(t){const o=this.currentToken;switch(t){case U.HYPHEN_MINUS:{this.state=K.COMMENT_END;break}case U.EOF:{this._err(M0.eofInComment),this.emitCurrentComment(o),this._emitEOFToken();break}default:o.data+="-",this.state=K.COMMENT,this._stateComment(t)}}_stateCommentEnd(t){const o=this.currentToken;switch(t){case U.GREATER_THAN_SIGN:{this.state=K.DATA,this.emitCurrentComment(o);break}case U.EXCLAMATION_MARK:{this.state=K.COMMENT_END_BANG;break}case U.HYPHEN_MINUS:{o.data+="-";break}case U.EOF:{this._err(M0.eofInComment),this.emitCurrentComment(o),this._emitEOFToken();break}default:o.data+="--",this.state=K.COMMENT,this._stateComment(t)}}_stateCommentEndBang(t){const o=this.currentToken;switch(t){case U.HYPHEN_MINUS:{o.data+="--!",this.state=K.COMMENT_END_DASH;break}case U.GREATER_THAN_SIGN:{this._err(M0.incorrectlyClosedComment),this.state=K.DATA,this.emitCurrentComment(o);break}case U.EOF:{this._err(M0.eofInComment),this.emitCurrentComment(o),this._emitEOFToken();break}default:o.data+="--!",this.state=K.COMMENT,this._stateComment(t)}}_stateDoctype(t){switch(t){case U.SPACE:case U.LINE_FEED:case U.TABULATION:case U.FORM_FEED:{this.state=K.BEFORE_DOCTYPE_NAME;break}case U.GREATER_THAN_SIGN:{this.state=K.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t);break}case U.EOF:{this._err(M0.eofInDoctype),this._createDoctypeToken(null);const o=this.currentToken;o.forceQuirks=!0,this.emitCurrentDoctype(o),this._emitEOFToken();break}default:this._err(M0.missingWhitespaceBeforeDoctypeName),this.state=K.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t)}}_stateBeforeDoctypeName(t){if(Ka(t))this._createDoctypeToken(String.fromCharCode(xc(t))),this.state=K.DOCTYPE_NAME;else switch(t){case U.SPACE:case U.LINE_FEED:case U.TABULATION:case U.FORM_FEED:break;case U.NULL:{this._err(M0.unexpectedNullCharacter),this._createDoctypeToken(Z1),this.state=K.DOCTYPE_NAME;break}case U.GREATER_THAN_SIGN:{this._err(M0.missingDoctypeName),this._createDoctypeToken(null);const o=this.currentToken;o.forceQuirks=!0,this.emitCurrentDoctype(o),this.state=K.DATA;break}case U.EOF:{this._err(M0.eofInDoctype),this._createDoctypeToken(null);const o=this.currentToken;o.forceQuirks=!0,this.emitCurrentDoctype(o),this._emitEOFToken();break}default:this._createDoctypeToken(String.fromCodePoint(t)),this.state=K.DOCTYPE_NAME}}_stateDoctypeName(t){const o=this.currentToken;switch(t){case U.SPACE:case U.LINE_FEED:case U.TABULATION:case U.FORM_FEED:{this.state=K.AFTER_DOCTYPE_NAME;break}case U.GREATER_THAN_SIGN:{this.state=K.DATA,this.emitCurrentDoctype(o);break}case U.NULL:{this._err(M0.unexpectedNullCharacter),o.name+=Z1;break}case U.EOF:{this._err(M0.eofInDoctype),o.forceQuirks=!0,this.emitCurrentDoctype(o),this._emitEOFToken();break}default:o.name+=String.fromCodePoint(Ka(t)?xc(t):t)}}_stateAfterDoctypeName(t){const o=this.currentToken;switch(t){case U.SPACE:case U.LINE_FEED:case U.TABULATION:case U.FORM_FEED:break;case U.GREATER_THAN_SIGN:{this.state=K.DATA,this.emitCurrentDoctype(o);break}case U.EOF:{this._err(M0.eofInDoctype),o.forceQuirks=!0,this.emitCurrentDoctype(o),this._emitEOFToken();break}default:this._consumeSequenceIfMatch(G2.PUBLIC,!1)?this.state=K.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(G2.SYSTEM,!1)?this.state=K.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(M0.invalidCharacterSequenceAfterDoctypeName),o.forceQuirks=!0,this.state=K.BOGUS_DOCTYPE,this._stateBogusDoctype(t))}}_stateAfterDoctypePublicKeyword(t){const o=this.currentToken;switch(t){case U.SPACE:case U.LINE_FEED:case U.TABULATION:case U.FORM_FEED:{this.state=K.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break}case U.QUOTATION_MARK:{this._err(M0.missingWhitespaceAfterDoctypePublicKeyword),o.publicId="",this.state=K.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case U.APOSTROPHE:{this._err(M0.missingWhitespaceAfterDoctypePublicKeyword),o.publicId="",this.state=K.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case U.GREATER_THAN_SIGN:{this._err(M0.missingDoctypePublicIdentifier),o.forceQuirks=!0,this.state=K.DATA,this.emitCurrentDoctype(o);break}case U.EOF:{this._err(M0.eofInDoctype),o.forceQuirks=!0,this.emitCurrentDoctype(o),this._emitEOFToken();break}default:this._err(M0.missingQuoteBeforeDoctypePublicIdentifier),o.forceQuirks=!0,this.state=K.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypePublicIdentifier(t){const o=this.currentToken;switch(t){case U.SPACE:case U.LINE_FEED:case U.TABULATION:case U.FORM_FEED:break;case U.QUOTATION_MARK:{o.publicId="",this.state=K.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case U.APOSTROPHE:{o.publicId="",this.state=K.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case U.GREATER_THAN_SIGN:{this._err(M0.missingDoctypePublicIdentifier),o.forceQuirks=!0,this.state=K.DATA,this.emitCurrentDoctype(o);break}case U.EOF:{this._err(M0.eofInDoctype),o.forceQuirks=!0,this.emitCurrentDoctype(o),this._emitEOFToken();break}default:this._err(M0.missingQuoteBeforeDoctypePublicIdentifier),o.forceQuirks=!0,this.state=K.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypePublicIdentifierDoubleQuoted(t){const o=this.currentToken;switch(t){case U.QUOTATION_MARK:{this.state=K.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case U.NULL:{this._err(M0.unexpectedNullCharacter),o.publicId+=Z1;break}case U.GREATER_THAN_SIGN:{this._err(M0.abruptDoctypePublicIdentifier),o.forceQuirks=!0,this.emitCurrentDoctype(o),this.state=K.DATA;break}case U.EOF:{this._err(M0.eofInDoctype),o.forceQuirks=!0,this.emitCurrentDoctype(o),this._emitEOFToken();break}default:o.publicId+=String.fromCodePoint(t)}}_stateDoctypePublicIdentifierSingleQuoted(t){const o=this.currentToken;switch(t){case U.APOSTROPHE:{this.state=K.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case U.NULL:{this._err(M0.unexpectedNullCharacter),o.publicId+=Z1;break}case U.GREATER_THAN_SIGN:{this._err(M0.abruptDoctypePublicIdentifier),o.forceQuirks=!0,this.emitCurrentDoctype(o),this.state=K.DATA;break}case U.EOF:{this._err(M0.eofInDoctype),o.forceQuirks=!0,this.emitCurrentDoctype(o),this._emitEOFToken();break}default:o.publicId+=String.fromCodePoint(t)}}_stateAfterDoctypePublicIdentifier(t){const o=this.currentToken;switch(t){case U.SPACE:case U.LINE_FEED:case U.TABULATION:case U.FORM_FEED:{this.state=K.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break}case U.GREATER_THAN_SIGN:{this.state=K.DATA,this.emitCurrentDoctype(o);break}case U.QUOTATION_MARK:{this._err(M0.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),o.systemId="",this.state=K.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case U.APOSTROPHE:{this._err(M0.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),o.systemId="",this.state=K.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case U.EOF:{this._err(M0.eofInDoctype),o.forceQuirks=!0,this.emitCurrentDoctype(o),this._emitEOFToken();break}default:this._err(M0.missingQuoteBeforeDoctypeSystemIdentifier),o.forceQuirks=!0,this.state=K.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBetweenDoctypePublicAndSystemIdentifiers(t){const o=this.currentToken;switch(t){case U.SPACE:case U.LINE_FEED:case U.TABULATION:case U.FORM_FEED:break;case U.GREATER_THAN_SIGN:{this.emitCurrentDoctype(o),this.state=K.DATA;break}case U.QUOTATION_MARK:{o.systemId="",this.state=K.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case U.APOSTROPHE:{o.systemId="",this.state=K.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case U.EOF:{this._err(M0.eofInDoctype),o.forceQuirks=!0,this.emitCurrentDoctype(o),this._emitEOFToken();break}default:this._err(M0.missingQuoteBeforeDoctypeSystemIdentifier),o.forceQuirks=!0,this.state=K.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateAfterDoctypeSystemKeyword(t){const o=this.currentToken;switch(t){case U.SPACE:case U.LINE_FEED:case U.TABULATION:case U.FORM_FEED:{this.state=K.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break}case U.QUOTATION_MARK:{this._err(M0.missingWhitespaceAfterDoctypeSystemKeyword),o.systemId="",this.state=K.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case U.APOSTROPHE:{this._err(M0.missingWhitespaceAfterDoctypeSystemKeyword),o.systemId="",this.state=K.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case U.GREATER_THAN_SIGN:{this._err(M0.missingDoctypeSystemIdentifier),o.forceQuirks=!0,this.state=K.DATA,this.emitCurrentDoctype(o);break}case U.EOF:{this._err(M0.eofInDoctype),o.forceQuirks=!0,this.emitCurrentDoctype(o),this._emitEOFToken();break}default:this._err(M0.missingQuoteBeforeDoctypeSystemIdentifier),o.forceQuirks=!0,this.state=K.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypeSystemIdentifier(t){const o=this.currentToken;switch(t){case U.SPACE:case U.LINE_FEED:case U.TABULATION:case U.FORM_FEED:break;case U.QUOTATION_MARK:{o.systemId="",this.state=K.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case U.APOSTROPHE:{o.systemId="",this.state=K.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case U.GREATER_THAN_SIGN:{this._err(M0.missingDoctypeSystemIdentifier),o.forceQuirks=!0,this.state=K.DATA,this.emitCurrentDoctype(o);break}case U.EOF:{this._err(M0.eofInDoctype),o.forceQuirks=!0,this.emitCurrentDoctype(o),this._emitEOFToken();break}default:this._err(M0.missingQuoteBeforeDoctypeSystemIdentifier),o.forceQuirks=!0,this.state=K.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypeSystemIdentifierDoubleQuoted(t){const o=this.currentToken;switch(t){case U.QUOTATION_MARK:{this.state=K.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case U.NULL:{this._err(M0.unexpectedNullCharacter),o.systemId+=Z1;break}case U.GREATER_THAN_SIGN:{this._err(M0.abruptDoctypeSystemIdentifier),o.forceQuirks=!0,this.emitCurrentDoctype(o),this.state=K.DATA;break}case U.EOF:{this._err(M0.eofInDoctype),o.forceQuirks=!0,this.emitCurrentDoctype(o),this._emitEOFToken();break}default:o.systemId+=String.fromCodePoint(t)}}_stateDoctypeSystemIdentifierSingleQuoted(t){const o=this.currentToken;switch(t){case U.APOSTROPHE:{this.state=K.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case U.NULL:{this._err(M0.unexpectedNullCharacter),o.systemId+=Z1;break}case U.GREATER_THAN_SIGN:{this._err(M0.abruptDoctypeSystemIdentifier),o.forceQuirks=!0,this.emitCurrentDoctype(o),this.state=K.DATA;break}case U.EOF:{this._err(M0.eofInDoctype),o.forceQuirks=!0,this.emitCurrentDoctype(o),this._emitEOFToken();break}default:o.systemId+=String.fromCodePoint(t)}}_stateAfterDoctypeSystemIdentifier(t){const o=this.currentToken;switch(t){case U.SPACE:case U.LINE_FEED:case U.TABULATION:case U.FORM_FEED:break;case U.GREATER_THAN_SIGN:{this.emitCurrentDoctype(o),this.state=K.DATA;break}case U.EOF:{this._err(M0.eofInDoctype),o.forceQuirks=!0,this.emitCurrentDoctype(o),this._emitEOFToken();break}default:this._err(M0.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=K.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBogusDoctype(t){const o=this.currentToken;switch(t){case U.GREATER_THAN_SIGN:{this.emitCurrentDoctype(o),this.state=K.DATA;break}case U.NULL:{this._err(M0.unexpectedNullCharacter);break}case U.EOF:{this.emitCurrentDoctype(o),this._emitEOFToken();break}}}_stateCdataSection(t){switch(t){case U.RIGHT_SQUARE_BRACKET:{this.state=K.CDATA_SECTION_BRACKET;break}case U.EOF:{this._err(M0.eofInCdata),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateCdataSectionBracket(t){t===U.RIGHT_SQUARE_BRACKET?this.state=K.CDATA_SECTION_END:(this._emitChars("]"),this.state=K.CDATA_SECTION,this._stateCdataSection(t))}_stateCdataSectionEnd(t){switch(t){case U.GREATER_THAN_SIGN:{this.state=K.DATA;break}case U.RIGHT_SQUARE_BRACKET:{this._emitChars("]");break}default:this._emitChars("]]"),this.state=K.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(U.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&$m(this.preprocessor.peek(1))?K.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(t){$m(t)?this._flushCodePointConsumedAsCharacterReference(t):(t===U.SEMICOLON&&this._err(M0.unknownNamedCharacterReference),this.state=this.returnState,this._callState(t))}}const oO=new Set([A.DD,A.DT,A.LI,A.OPTGROUP,A.OPTION,A.P,A.RB,A.RP,A.RT,A.RTC]),nO=new Set([...oO,A.CAPTION,A.COLGROUP,A.TBODY,A.TD,A.TFOOT,A.TH,A.THEAD,A.TR]),Dc=new Set([A.APPLET,A.CAPTION,A.HTML,A.MARQUEE,A.OBJECT,A.TABLE,A.TD,A.TEMPLATE,A.TH]),N$=new Set([...Dc,A.OL,A.UL]),x$=new Set([...Dc,A.BUTTON]),sO=new Set([A.ANNOTATION_XML,A.MI,A.MN,A.MO,A.MS,A.MTEXT]),aO=new Set([A.DESC,A.FOREIGN_OBJECT,A.TITLE]),D$=new Set([A.TR,A.TEMPLATE,A.HTML]),P$=new Set([A.TBODY,A.TFOOT,A.THEAD,A.TEMPLATE,A.HTML]),F$=new Set([A.TABLE,A.TEMPLATE,A.HTML]),Q$=new Set([A.TD,A.TH]);class H${get currentTmplContentOrNode(){return this._isInTemplate()?this.treeAdapter.getTemplateContent(this.current):this.current}constructor(t,o,n){this.treeAdapter=o,this.handler=n,this.items=[],this.tagIDs=[],this.stackTop=-1,this.tmplCount=0,this.currentTagId=A.UNKNOWN,this.current=t}_indexOf(t){return this.items.lastIndexOf(t,this.stackTop)}_isInTemplate(){return this.currentTagId===A.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===E0.HTML}_updateCurrentElement(){this.current=this.items[this.stackTop],this.currentTagId=this.tagIDs[this.stackTop]}push(t,o){this.stackTop++,this.items[this.stackTop]=t,this.current=t,this.tagIDs[this.stackTop]=o,this.currentTagId=o,this._isInTemplate()&&this.tmplCount++,this.handler.onItemPush(t,o,!0)}pop(){const t=this.current;this.tmplCount>0&&this._isInTemplate()&&this.tmplCount--,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!0)}replace(t,o){const n=this._indexOf(t);this.items[n]=o,n===this.stackTop&&(this.current=o)}insertAfter(t,o,n){const s=this._indexOf(t)+1;this.items.splice(s,0,o),this.tagIDs.splice(s,0,n),this.stackTop++,s===this.stackTop&&this._updateCurrentElement(),this.current&&this.currentTagId!==void 0&&this.handler.onItemPush(this.current,this.currentTagId,s===this.stackTop)}popUntilTagNamePopped(t){let o=this.stackTop+1;do o=this.tagIDs.lastIndexOf(t,o-1);while(o>0&&this.treeAdapter.getNamespaceURI(this.items[o])!==E0.HTML);this.shortenToLength(Math.max(o,0))}shortenToLength(t){for(;this.stackTop>=t;){const o=this.current;this.tmplCount>0&&this._isInTemplate()&&(this.tmplCount-=1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(o,this.stackTop<t)}}popUntilElementPopped(t){const o=this._indexOf(t);this.shortenToLength(Math.max(o,0))}popUntilPopped(t,o){const n=this._indexOfTagNames(t,o);this.shortenToLength(Math.max(n,0))}popUntilNumberedHeaderPopped(){this.popUntilPopped(nu,E0.HTML)}popUntilTableCellPopped(){this.popUntilPopped(Q$,E0.HTML)}popAllUpToHtmlElement(){this.tmplCount=0,this.shortenToLength(1)}_indexOfTagNames(t,o){for(let n=this.stackTop;n>=0;n--)if(t.has(this.tagIDs[n])&&this.treeAdapter.getNamespaceURI(this.items[n])===o)return n;return-1}clearBackTo(t,o){const n=this._indexOfTagNames(t,o);this.shortenToLength(n+1)}clearBackToTableContext(){this.clearBackTo(F$,E0.HTML)}clearBackToTableBodyContext(){this.clearBackTo(P$,E0.HTML)}clearBackToTableRowContext(){this.clearBackTo(D$,E0.HTML)}remove(t){const o=this._indexOf(t);o>=0&&(o===this.stackTop?this.pop():(this.items.splice(o,1),this.tagIDs.splice(o,1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!1)))}tryPeekProperlyNestedBodyElement(){return this.stackTop>=1&&this.tagIDs[1]===A.BODY?this.items[1]:null}contains(t){return this._indexOf(t)>-1}getCommonAncestor(t){const o=this._indexOf(t)-1;return o>=0?this.items[o]:null}isRootHtmlElementCurrent(){return this.stackTop===0&&this.tagIDs[0]===A.HTML}hasInDynamicScope(t,o){for(let n=this.stackTop;n>=0;n--){const s=this.tagIDs[n];switch(this.treeAdapter.getNamespaceURI(this.items[n])){case E0.HTML:{if(s===t)return!0;if(o.has(s))return!1;break}case E0.SVG:{if(aO.has(s))return!1;break}case E0.MATHML:{if(sO.has(s))return!1;break}}}return!0}hasInScope(t){return this.hasInDynamicScope(t,Dc)}hasInListItemScope(t){return this.hasInDynamicScope(t,N$)}hasInButtonScope(t){return this.hasInDynamicScope(t,x$)}hasNumberedHeaderInScope(){for(let t=this.stackTop;t>=0;t--){const o=this.tagIDs[t];switch(this.treeAdapter.getNamespaceURI(this.items[t])){case E0.HTML:{if(nu.has(o))return!0;if(Dc.has(o))return!1;break}case E0.SVG:{if(aO.has(o))return!1;break}case E0.MATHML:{if(sO.has(o))return!1;break}}}return!0}hasInTableScope(t){for(let o=this.stackTop;o>=0;o--)if(this.treeAdapter.getNamespaceURI(this.items[o])===E0.HTML)switch(this.tagIDs[o]){case t:return!0;case A.TABLE:case A.HTML:return!1}return!0}hasTableBodyContextInTableScope(){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===E0.HTML)switch(this.tagIDs[t]){case A.TBODY:case A.THEAD:case A.TFOOT:return!0;case A.TABLE:case A.HTML:return!1}return!0}hasInSelectScope(t){for(let o=this.stackTop;o>=0;o--)if(this.treeAdapter.getNamespaceURI(this.items[o])===E0.HTML)switch(this.tagIDs[o]){case t:return!0;case A.OPTION:case A.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;this.currentTagId!==void 0&&oO.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&nO.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(t){for(;this.currentTagId!==void 0&&this.currentTagId!==t&&nO.has(this.currentTagId);)this.pop()}}const su=3;var $e;(function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"})($e||($e={}));const rO={type:$e.Marker};class V${constructor(t){this.treeAdapter=t,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(t,o){const n=[],s=o.length,a=this.treeAdapter.getTagName(t),r=this.treeAdapter.getNamespaceURI(t);for(let i=0;i<this.entries.length;i++){const c=this.entries[i];if(c.type===$e.Marker)break;const{element:l}=c;if(this.treeAdapter.getTagName(l)===a&&this.treeAdapter.getNamespaceURI(l)===r){const p=this.treeAdapter.getAttrList(l);p.length===s&&n.push({idx:i,attrs:p})}}return n}_ensureNoahArkCondition(t){if(this.entries.length<su)return;const o=this.treeAdapter.getAttrList(t),n=this._getNoahArkConditionCandidates(t,o);if(n.length<su)return;const s=new Map(o.map(r=>[r.name,r.value]));let a=0;for(let r=0;r<n.length;r++){const i=n[r];i.attrs.every(c=>s.get(c.name)===c.value)&&(a+=1,a>=su&&this.entries.splice(i.idx,1))}}insertMarker(){this.entries.unshift(rO)}pushElement(t,o){this._ensureNoahArkCondition(t),this.entries.unshift({type:$e.Element,element:t,token:o})}insertElementAfterBookmark(t,o){const n=this.entries.indexOf(this.bookmark);this.entries.splice(n,0,{type:$e.Element,element:t,token:o})}removeEntry(t){const o=this.entries.indexOf(t);o!==-1&&this.entries.splice(o,1)}clearToLastMarker(){const t=this.entries.indexOf(rO);t===-1?this.entries.length=0:this.entries.splice(0,t+1)}getElementEntryInScopeWithTagName(t){const o=this.entries.find(n=>n.type===$e.Marker||this.treeAdapter.getTagName(n.element)===t);return o&&o.type===$e.Element?o:null}getElementEntry(t){return this.entries.find(o=>o.type===$e.Element&&o.element===t)}}const uo={createDocument(){return{nodeName:"#document",mode:_e.NO_QUIRKS,childNodes:[]}},createDocumentFragment(){return{nodeName:"#document-fragment",childNodes:[]}},createElement(e,t,o){return{nodeName:e,tagName:e,attrs:o,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,o){const n=e.childNodes.indexOf(o);e.childNodes.splice(n,0,t),t.parentNode=e},setTemplateContent(e,t){e.content=t},getTemplateContent(e){return e.content},setDocumentType(e,t,o,n){const s=e.childNodes.find(a=>a.nodeName==="#documentType");if(s)s.name=t,s.publicId=o,s.systemId=n;else{const a={nodeName:"#documentType",name:t,publicId:o,systemId:n,parentNode:null};uo.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 o=e.childNodes[e.childNodes.length-1];if(uo.isTextNode(o)){o.value+=t;return}}uo.appendChild(e,uo.createTextNode(t))},insertTextBefore(e,t,o){const n=e.childNodes[e.childNodes.indexOf(o)-1];n&&uo.isTextNode(n)?n.value+=t:uo.insertBefore(e,uo.createTextNode(t),o)},adoptAttributes(e,t){const o=new Set(e.attrs.map(n=>n.name));for(let n=0;n<t.length;n++)o.has(t[n].name)||e.attrs.push(t[n])},getFirstChild(e){return e.childNodes[0]},getChildNodes(e){return e.childNodes},getParentNode(e){return e.parentNode},getAttrList(e){return e.attrs},getTagName(e){return e.tagName},getNamespaceURI(e){return e.namespaceURI},getTextNodeContent(e){return e.value},getCommentNodeContent(e){return e.data},getDocumentTypeNodeName(e){return e.name},getDocumentTypeNodePublicId(e){return e.publicId},getDocumentTypeNodeSystemId(e){return e.systemId},isTextNode(e){return e.nodeName==="#text"},isCommentNode(e){return e.nodeName==="#comment"},isDocumentTypeNode(e){return e.nodeName==="#documentType"},isElementNode(e){return Object.prototype.hasOwnProperty.call(e,"tagName")},setNodeSourceCodeLocation(e,t){e.sourceCodeLocation=t},getNodeSourceCodeLocation(e){return e.sourceCodeLocation},updateNodeSourceCodeLocation(e,t){e.sourceCodeLocation={...e.sourceCodeLocation,...t}}},iO="html",U$="about:legacy-compat",K$="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",cO=["+//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//"],j$=[...cO,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],G$=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),lO=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],Y$=[...lO,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function pO(e,t){return t.some(o=>e.startsWith(o))}function X$(e){return e.name===iO&&e.publicId===null&&(e.systemId===null||e.systemId===U$)}function Z$(e){if(e.name!==iO)return _e.QUIRKS;const{systemId:t}=e;if(t&&t.toLowerCase()===K$)return _e.QUIRKS;let{publicId:o}=e;if(o!==null){if(o=o.toLowerCase(),G$.has(o))return _e.QUIRKS;let n=t===null?j$:cO;if(pO(o,n))return _e.QUIRKS;if(n=t===null?lO:Y$,pO(o,n))return _e.LIMITED_QUIRKS}return _e.NO_QUIRKS}const dO={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},J$="definitionurl",$$="definitionURL",e00=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])),t00=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:E0.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:E0.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:E0.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:E0.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:E0.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:E0.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:E0.XLINK}],["xml:lang",{prefix:"xml",name:"lang",namespace:E0.XML}],["xml:space",{prefix:"xml",name:"space",namespace:E0.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:E0.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:E0.XMLNS}]]),o00=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])),n00=new Set([A.B,A.BIG,A.BLOCKQUOTE,A.BODY,A.BR,A.CENTER,A.CODE,A.DD,A.DIV,A.DL,A.DT,A.EM,A.EMBED,A.H1,A.H2,A.H3,A.H4,A.H5,A.H6,A.HEAD,A.HR,A.I,A.IMG,A.LI,A.LISTING,A.MENU,A.META,A.NOBR,A.OL,A.P,A.PRE,A.RUBY,A.S,A.SMALL,A.SPAN,A.STRONG,A.STRIKE,A.SUB,A.SUP,A.TABLE,A.TT,A.U,A.UL,A.VAR]);function s00(e){const t=e.tagID;return t===A.FONT&&e.attrs.some(({name:n})=>n===Zo.COLOR||n===Zo.SIZE||n===Zo.FACE)||n00.has(t)}function uO(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===J$){e.attrs[t].name=$$;break}}function bO(e){for(let t=0;t<e.attrs.length;t++){const o=e00.get(e.attrs[t].name);o!=null&&(e.attrs[t].name=o)}}function au(e){for(let t=0;t<e.attrs.length;t++){const o=t00.get(e.attrs[t].name);o&&(e.attrs[t].prefix=o.prefix,e.attrs[t].name=o.name,e.attrs[t].namespace=o.namespace)}}function a00(e){const t=o00.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=cs(e.tagName))}function r00(e,t){return t===E0.MATHML&&(e===A.MI||e===A.MO||e===A.MN||e===A.MS||e===A.MTEXT)}function i00(e,t,o){if(t===E0.MATHML&&e===A.ANNOTATION_XML){for(let n=0;n<o.length;n++)if(o[n].name===Zo.ENCODING){const s=o[n].value.toLowerCase();return s===dO.TEXT_HTML||s===dO.APPLICATION_XML}}return t===E0.SVG&&(e===A.FOREIGN_OBJECT||e===A.DESC||e===A.TITLE)}function c00(e,t,o,n){return(!n||n===E0.HTML)&&i00(e,t,o)||(!n||n===E0.MATHML)&&r00(e,t)}const l00="hidden",p00=8,d00=3;var Z;(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"})(Z||(Z={}));const u00={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},hO=new Set([A.TABLE,A.TBODY,A.TFOOT,A.THEAD,A.TR]),MO={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:uo,onParseError:null};class fO{constructor(t,o,n=null,s=null){this.fragmentContext=n,this.scriptHandler=s,this.currentToken=null,this.stopped=!1,this.insertionMode=Z.INITIAL,this.originalInsertionMode=Z.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={...MO,...t},this.treeAdapter=this.options.treeAdapter,this.onParseError=this.options.onParseError,this.onParseError&&(this.options.sourceCodeLocationInfo=!0),this.document=o??this.treeAdapter.createDocument(),this.tokenizer=new I$(this.options,this),this.activeFormattingElements=new V$(this.treeAdapter),this.fragmentContextID=n?cs(this.treeAdapter.getTagName(n)):A.UNKNOWN,this._setContextModes(n??this.document,this.fragmentContextID),this.openElements=new H$(this.document,this.treeAdapter,this)}static parse(t,o){const n=new this(o);return n.tokenizer.write(t,!0),n.document}static getFragmentParser(t,o){const n={...MO,...o};t??(t=n.treeAdapter.createElement(l0.TEMPLATE,E0.HTML,[]));const s=n.treeAdapter.createElement("documentmock",E0.HTML,[]),a=new this(n,s,t);return a.fragmentContextID===A.TEMPLATE&&a.tmplInsertionModeStack.unshift(Z.IN_TEMPLATE),a._initTokenizerForFragmentParsing(),a._insertFakeRootElement(),a._resetInsertionMode(),a._findFormInFragmentContext(),a}getFragment(){const t=this.treeAdapter.getFirstChild(this.document),o=this.treeAdapter.createDocumentFragment();return this._adoptNodes(t,o),o}_err(t,o,n){var s;if(!this.onParseError)return;const a=(s=t.location)!==null&&s!==void 0?s:u00,r={code:o,startLine:a.startLine,startCol:a.startCol,startOffset:a.startOffset,endLine:n?a.startLine:a.endLine,endCol:n?a.startCol:a.endCol,endOffset:n?a.startOffset:a.endOffset};this.onParseError(r)}onItemPush(t,o,n){var s,a;(a=(s=this.treeAdapter).onItemPush)===null||a===void 0||a.call(s,t),n&&this.openElements.stackTop>0&&this._setContextModes(t,o)}onItemPop(t,o){var n,s;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(t,this.currentToken),(s=(n=this.treeAdapter).onItemPop)===null||s===void 0||s.call(n,t,this.openElements.current),o){let a,r;this.openElements.stackTop===0&&this.fragmentContext?(a=this.fragmentContext,r=this.fragmentContextID):{current:a,currentTagId:r}=this.openElements,this._setContextModes(a,r)}}_setContextModes(t,o){const n=t===this.document||t&&this.treeAdapter.getNamespaceURI(t)===E0.HTML;this.currentNotInHTML=!n,this.tokenizer.inForeignNode=!n&&t!==void 0&&o!==void 0&&!this._isIntegrationPoint(o,t)}_switchToTextParsing(t,o){this._insertElement(t,E0.HTML),this.tokenizer.state=o,this.originalInsertionMode=this.insertionMode,this.insertionMode=Z.TEXT}switchToPlaintextParsing(){this.insertionMode=Z.TEXT,this.originalInsertionMode=Z.IN_BODY,this.tokenizer.state=r2.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)===l0.FORM){this.formElement=t;break}t=this.treeAdapter.getParentNode(t)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==E0.HTML))switch(this.fragmentContextID){case A.TITLE:case A.TEXTAREA:{this.tokenizer.state=r2.RCDATA;break}case A.STYLE:case A.XMP:case A.IFRAME:case A.NOEMBED:case A.NOFRAMES:case A.NOSCRIPT:{this.tokenizer.state=r2.RAWTEXT;break}case A.SCRIPT:{this.tokenizer.state=r2.SCRIPT_DATA;break}case A.PLAINTEXT:{this.tokenizer.state=r2.PLAINTEXT;break}}}_setDocumentType(t){const o=t.name||"",n=t.publicId||"",s=t.systemId||"";if(this.treeAdapter.setDocumentType(this.document,o,n,s),t.location){const r=this.treeAdapter.getChildNodes(this.document).find(i=>this.treeAdapter.isDocumentTypeNode(i));r&&this.treeAdapter.setNodeSourceCodeLocation(r,t.location)}}_attachElementToTree(t,o){if(this.options.sourceCodeLocationInfo){const n=o&&{...o,startTag:o};this.treeAdapter.setNodeSourceCodeLocation(t,n)}if(this._shouldFosterParentOnInsertion())this._fosterParentElement(t);else{const n=this.openElements.currentTmplContentOrNode;this.treeAdapter.appendChild(n??this.document,t)}}_appendElement(t,o){const n=this.treeAdapter.createElement(t.tagName,o,t.attrs);this._attachElementToTree(n,t.location)}_insertElement(t,o){const n=this.treeAdapter.createElement(t.tagName,o,t.attrs);this._attachElementToTree(n,t.location),this.openElements.push(n,t.tagID)}_insertFakeElement(t,o){const n=this.treeAdapter.createElement(t,E0.HTML,[]);this._attachElementToTree(n,null),this.openElements.push(n,o)}_insertTemplate(t){const o=this.treeAdapter.createElement(t.tagName,E0.HTML,t.attrs),n=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(o,n),this._attachElementToTree(o,t.location),this.openElements.push(o,t.tagID),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(n,null)}_insertFakeRootElement(){const t=this.treeAdapter.createElement(l0.HTML,E0.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(t,null),this.treeAdapter.appendChild(this.openElements.current,t),this.openElements.push(t,A.HTML)}_appendCommentNode(t,o){const n=this.treeAdapter.createCommentNode(t.data);this.treeAdapter.appendChild(o,n),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(n,t.location)}_insertCharacters(t){let o,n;if(this._shouldFosterParentOnInsertion()?({parent:o,beforeElement:n}=this._findFosterParentingLocation(),n?this.treeAdapter.insertTextBefore(o,t.chars,n):this.treeAdapter.insertText(o,t.chars)):(o=this.openElements.currentTmplContentOrNode,this.treeAdapter.insertText(o,t.chars)),!t.location)return;const s=this.treeAdapter.getChildNodes(o),a=n?s.lastIndexOf(n):s.length,r=s[a-1];if(this.treeAdapter.getNodeSourceCodeLocation(r)){const{endLine:c,endCol:l,endOffset:p}=t.location;this.treeAdapter.updateNodeSourceCodeLocation(r,{endLine:c,endCol:l,endOffset:p})}else this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(r,t.location)}_adoptNodes(t,o){for(let n=this.treeAdapter.getFirstChild(t);n;n=this.treeAdapter.getFirstChild(t))this.treeAdapter.detachNode(n),this.treeAdapter.appendChild(o,n)}_setEndLocation(t,o){if(this.treeAdapter.getNodeSourceCodeLocation(t)&&o.location){const n=o.location,s=this.treeAdapter.getTagName(t),a=o.type===p1.END_TAG&&s===o.tagName?{endTag:{...n},endLine:n.endLine,endCol:n.endCol,endOffset:n.endOffset}:{endLine:n.startLine,endCol:n.startCol,endOffset:n.startOffset};this.treeAdapter.updateNodeSourceCodeLocation(t,a)}}shouldProcessStartTagTokenInForeignContent(t){if(!this.currentNotInHTML)return!1;let o,n;return this.openElements.stackTop===0&&this.fragmentContext?(o=this.fragmentContext,n=this.fragmentContextID):{current:o,currentTagId:n}=this.openElements,t.tagID===A.SVG&&this.treeAdapter.getTagName(o)===l0.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(o)===E0.MATHML?!1:this.tokenizer.inForeignNode||(t.tagID===A.MGLYPH||t.tagID===A.MALIGNMARK)&&n!==void 0&&!this._isIntegrationPoint(n,o,E0.HTML)}_processToken(t){switch(t.type){case p1.CHARACTER:{this.onCharacter(t);break}case p1.NULL_CHARACTER:{this.onNullCharacter(t);break}case p1.COMMENT:{this.onComment(t);break}case p1.DOCTYPE:{this.onDoctype(t);break}case p1.START_TAG:{this._processStartTag(t);break}case p1.END_TAG:{this.onEndTag(t);break}case p1.EOF:{this.onEof(t);break}case p1.WHITESPACE_CHARACTER:{this.onWhitespaceCharacter(t);break}}}_isIntegrationPoint(t,o,n){const s=this.treeAdapter.getNamespaceURI(o),a=this.treeAdapter.getAttrList(o);return c00(t,s,a,n)}_reconstructActiveFormattingElements(){const t=this.activeFormattingElements.entries.length;if(t){const o=this.activeFormattingElements.entries.findIndex(s=>s.type===$e.Marker||this.openElements.contains(s.element)),n=o===-1?t-1:o-1;for(let s=n;s>=0;s--){const a=this.activeFormattingElements.entries[s];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=Z.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(A.P),this.openElements.popUntilTagNamePopped(A.P)}_resetInsertionMode(){for(let t=this.openElements.stackTop;t>=0;t--)switch(t===0&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[t]){case A.TR:{this.insertionMode=Z.IN_ROW;return}case A.TBODY:case A.THEAD:case A.TFOOT:{this.insertionMode=Z.IN_TABLE_BODY;return}case A.CAPTION:{this.insertionMode=Z.IN_CAPTION;return}case A.COLGROUP:{this.insertionMode=Z.IN_COLUMN_GROUP;return}case A.TABLE:{this.insertionMode=Z.IN_TABLE;return}case A.BODY:{this.insertionMode=Z.IN_BODY;return}case A.FRAMESET:{this.insertionMode=Z.IN_FRAMESET;return}case A.SELECT:{this._resetInsertionModeForSelect(t);return}case A.TEMPLATE:{this.insertionMode=this.tmplInsertionModeStack[0];return}case A.HTML:{this.insertionMode=this.headElement?Z.AFTER_HEAD:Z.BEFORE_HEAD;return}case A.TD:case A.TH:{if(t>0){this.insertionMode=Z.IN_CELL;return}break}case A.HEAD:{if(t>0){this.insertionMode=Z.IN_HEAD;return}break}}this.insertionMode=Z.IN_BODY}_resetInsertionModeForSelect(t){if(t>0)for(let o=t-1;o>0;o--){const n=this.openElements.tagIDs[o];if(n===A.TEMPLATE)break;if(n===A.TABLE){this.insertionMode=Z.IN_SELECT_IN_TABLE;return}}this.insertionMode=Z.IN_SELECT}_isElementCausesFosterParenting(t){return hO.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 o=this.openElements.items[t];switch(this.openElements.tagIDs[t]){case A.TEMPLATE:{if(this.treeAdapter.getNamespaceURI(o)===E0.HTML)return{parent:this.treeAdapter.getTemplateContent(o),beforeElement:null};break}case A.TABLE:{const n=this.treeAdapter.getParentNode(o);return n?{parent:n,beforeElement:o}:{parent:this.openElements.items[t-1],beforeElement:null}}}}return{parent:this.openElements.items[0],beforeElement:null}}_fosterParentElement(t){const o=this._findFosterParentingLocation();o.beforeElement?this.treeAdapter.insertBefore(o.parent,t,o.beforeElement):this.treeAdapter.appendChild(o.parent,t)}_isSpecialElement(t,o){const n=this.treeAdapter.getNamespaceURI(t);return B$[n].has(o)}onCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){Q10(this,t);return}switch(this.insertionMode){case Z.INITIAL:{ja(this,t);break}case Z.BEFORE_HTML:{Ga(this,t);break}case Z.BEFORE_HEAD:{Ya(this,t);break}case Z.IN_HEAD:{Xa(this,t);break}case Z.IN_HEAD_NO_SCRIPT:{Za(this,t);break}case Z.AFTER_HEAD:{Ja(this,t);break}case Z.IN_BODY:case Z.IN_CAPTION:case Z.IN_CELL:case Z.IN_TEMPLATE:{zO(this,t);break}case Z.TEXT:case Z.IN_SELECT:case Z.IN_SELECT_IN_TABLE:{this._insertCharacters(t);break}case Z.IN_TABLE:case Z.IN_TABLE_BODY:case Z.IN_ROW:{lu(this,t);break}case Z.IN_TABLE_TEXT:{EO(this,t);break}case Z.IN_COLUMN_GROUP:{Qc(this,t);break}case Z.AFTER_BODY:{Uc(this,t);break}case Z.AFTER_AFTER_BODY:{Kc(this,t);break}}}onNullCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){F10(this,t);return}switch(this.insertionMode){case Z.INITIAL:{ja(this,t);break}case Z.BEFORE_HTML:{Ga(this,t);break}case Z.BEFORE_HEAD:{Ya(this,t);break}case Z.IN_HEAD:{Xa(this,t);break}case Z.IN_HEAD_NO_SCRIPT:{Za(this,t);break}case Z.AFTER_HEAD:{Ja(this,t);break}case Z.TEXT:{this._insertCharacters(t);break}case Z.IN_TABLE:case Z.IN_TABLE_BODY:case Z.IN_ROW:{lu(this,t);break}case Z.IN_COLUMN_GROUP:{Qc(this,t);break}case Z.AFTER_BODY:{Uc(this,t);break}case Z.AFTER_AFTER_BODY:{Kc(this,t);break}}}onComment(t){if(this.skipNextNewLine=!1,this.currentNotInHTML){iu(this,t);return}switch(this.insertionMode){case Z.INITIAL:case Z.BEFORE_HTML:case Z.BEFORE_HEAD:case Z.IN_HEAD:case Z.IN_HEAD_NO_SCRIPT:case Z.AFTER_HEAD:case Z.IN_BODY:case Z.IN_TABLE:case Z.IN_CAPTION:case Z.IN_COLUMN_GROUP:case Z.IN_TABLE_BODY:case Z.IN_ROW:case Z.IN_CELL:case Z.IN_SELECT:case Z.IN_SELECT_IN_TABLE:case Z.IN_TEMPLATE:case Z.IN_FRAMESET:case Z.AFTER_FRAMESET:{iu(this,t);break}case Z.IN_TABLE_TEXT:{tr(this,t);break}case Z.AFTER_BODY:{A00(this,t);break}case Z.AFTER_AFTER_BODY:case Z.AFTER_AFTER_FRAMESET:{m00(this,t);break}}}onDoctype(t){switch(this.skipNextNewLine=!1,this.insertionMode){case Z.INITIAL:{O00(this,t);break}case Z.BEFORE_HEAD:case Z.IN_HEAD:case Z.IN_HEAD_NO_SCRIPT:case Z.AFTER_HEAD:{this._err(t,M0.misplacedDoctype);break}case Z.IN_TABLE_TEXT:{tr(this,t);break}}}onStartTag(t){this.skipNextNewLine=!1,this.currentToken=t,this._processStartTag(t),t.selfClosing&&!t.ackSelfClosing&&this._err(t,M0.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(t){this.shouldProcessStartTagTokenInForeignContent(t)?H10(this,t):this._startTagOutsideForeignContent(t)}_startTagOutsideForeignContent(t){switch(this.insertionMode){case Z.INITIAL:{ja(this,t);break}case Z.BEFORE_HTML:{g00(this,t);break}case Z.BEFORE_HEAD:{k00(this,t);break}case Z.IN_HEAD:{Te(this,t);break}case Z.IN_HEAD_NO_SCRIPT:{w00(this,t);break}case Z.AFTER_HEAD:{S00(this,t);break}case Z.IN_BODY:{R2(this,t);break}case Z.IN_TABLE:{ls(this,t);break}case Z.IN_TABLE_TEXT:{tr(this,t);break}case Z.IN_CAPTION:{v10(this,t);break}case Z.IN_COLUMN_GROUP:{pu(this,t);break}case Z.IN_TABLE_BODY:{Hc(this,t);break}case Z.IN_ROW:{Vc(this,t);break}case Z.IN_CELL:{q10(this,t);break}case Z.IN_SELECT:{SO(this,t);break}case Z.IN_SELECT_IN_TABLE:{y10(this,t);break}case Z.IN_TEMPLATE:{B10(this,t);break}case Z.AFTER_BODY:{L10(this,t);break}case Z.IN_FRAMESET:{T10(this,t);break}case Z.AFTER_FRAMESET:{N10(this,t);break}case Z.AFTER_AFTER_BODY:{D10(this,t);break}case Z.AFTER_AFTER_FRAMESET:{P10(this,t);break}}}onEndTag(t){this.skipNextNewLine=!1,this.currentToken=t,this.currentNotInHTML?V10(this,t):this._endTagOutsideForeignContent(t)}_endTagOutsideForeignContent(t){switch(this.insertionMode){case Z.INITIAL:{ja(this,t);break}case Z.BEFORE_HTML:{C00(this,t);break}case Z.BEFORE_HEAD:{v00(this,t);break}case Z.IN_HEAD:{E00(this,t);break}case Z.IN_HEAD_NO_SCRIPT:{q00(this,t);break}case Z.AFTER_HEAD:{y00(this,t);break}case Z.IN_BODY:{Fc(this,t);break}case Z.TEXT:{M10(this,t);break}case Z.IN_TABLE:{$a(this,t);break}case Z.IN_TABLE_TEXT:{tr(this,t);break}case Z.IN_CAPTION:{E10(this,t);break}case Z.IN_COLUMN_GROUP:{w10(this,t);break}case Z.IN_TABLE_BODY:{du(this,t);break}case Z.IN_ROW:{qO(this,t);break}case Z.IN_CELL:{S10(this,t);break}case Z.IN_SELECT:{yO(this,t);break}case Z.IN_SELECT_IN_TABLE:{R10(this,t);break}case Z.IN_TEMPLATE:{W10(this,t);break}case Z.AFTER_BODY:{BO(this,t);break}case Z.IN_FRAMESET:{I10(this,t);break}case Z.AFTER_FRAMESET:{x10(this,t);break}case Z.AFTER_AFTER_BODY:{Kc(this,t);break}}}onEof(t){switch(this.insertionMode){case Z.INITIAL:{ja(this,t);break}case Z.BEFORE_HTML:{Ga(this,t);break}case Z.BEFORE_HEAD:{Ya(this,t);break}case Z.IN_HEAD:{Xa(this,t);break}case Z.IN_HEAD_NO_SCRIPT:{Za(this,t);break}case Z.AFTER_HEAD:{Ja(this,t);break}case Z.IN_BODY:case Z.IN_TABLE:case Z.IN_CAPTION:case Z.IN_COLUMN_GROUP:case Z.IN_TABLE_BODY:case Z.IN_ROW:case Z.IN_CELL:case Z.IN_SELECT:case Z.IN_SELECT_IN_TABLE:{kO(this,t);break}case Z.TEXT:{f10(this,t);break}case Z.IN_TABLE_TEXT:{tr(this,t);break}case Z.IN_TEMPLATE:{RO(this,t);break}case Z.AFTER_BODY:case Z.IN_FRAMESET:case Z.AFTER_FRAMESET:case Z.AFTER_AFTER_BODY:case Z.AFTER_AFTER_FRAMESET:{cu(this,t);break}}}onWhitespaceCharacter(t){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,t.chars.charCodeAt(0)===U.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 Z.IN_HEAD:case Z.IN_HEAD_NO_SCRIPT:case Z.AFTER_HEAD:case Z.TEXT:case Z.IN_COLUMN_GROUP:case Z.IN_SELECT:case Z.IN_SELECT_IN_TABLE:case Z.IN_FRAMESET:case Z.AFTER_FRAMESET:{this._insertCharacters(t);break}case Z.IN_BODY:case Z.IN_CAPTION:case Z.IN_CELL:case Z.IN_TEMPLATE:case Z.AFTER_BODY:case Z.AFTER_AFTER_BODY:case Z.AFTER_AFTER_FRAMESET:{_O(this,t);break}case Z.IN_TABLE:case Z.IN_TABLE_BODY:case Z.IN_ROW:{lu(this,t);break}case Z.IN_TABLE_TEXT:{vO(this,t);break}}}}function b00(e,t){let o=e.activeFormattingElements.getElementEntryInScopeWithTagName(t.tagName);return o?e.openElements.contains(o.element)?e.openElements.hasInScope(t.tagID)||(o=null):(e.activeFormattingElements.removeEntry(o),o=null):CO(e,t),o}function h00(e,t){let o=null,n=e.openElements.stackTop;for(;n>=0;n--){const s=e.openElements.items[n];if(s===t.element)break;e._isSpecialElement(s,e.openElements.tagIDs[n])&&(o=s)}return o||(e.openElements.shortenToLength(Math.max(n,0)),e.activeFormattingElements.removeEntry(t)),o}function M00(e,t,o){let n=t,s=e.openElements.getCommonAncestor(t);for(let a=0,r=s;r!==o;a++,r=s){s=e.openElements.getCommonAncestor(r);const i=e.activeFormattingElements.getElementEntry(r),c=i&&a>=d00;!i||c?(c&&e.activeFormattingElements.removeEntry(i),e.openElements.remove(r)):(r=f00(e,i),n===t&&(e.activeFormattingElements.bookmark=i),e.treeAdapter.detachNode(n),e.treeAdapter.appendChild(r,n),n=r)}return n}function f00(e,t){const o=e.treeAdapter.getNamespaceURI(t.element),n=e.treeAdapter.createElement(t.token.tagName,o,t.token.attrs);return e.openElements.replace(t.element,n),t.element=n,n}function _00(e,t,o){const n=e.treeAdapter.getTagName(t),s=cs(n);if(e._isElementCausesFosterParenting(s))e._fosterParentElement(o);else{const a=e.treeAdapter.getNamespaceURI(t);s===A.TEMPLATE&&a===E0.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,o)}}function z00(e,t,o){const n=e.treeAdapter.getNamespaceURI(o.element),{token:s}=o,a=e.treeAdapter.createElement(s.tagName,n,s.attrs);e._adoptNodes(t,a),e.treeAdapter.appendChild(t,a),e.activeFormattingElements.insertElementAfterBookmark(a,s),e.activeFormattingElements.removeEntry(o),e.openElements.remove(o.element),e.openElements.insertAfter(t,a,s.tagID)}function ru(e,t){for(let o=0;o<p00;o++){const n=b00(e,t);if(!n)break;const s=h00(e,n);if(!s)break;e.activeFormattingElements.bookmark=n;const a=M00(e,s,n.element),r=e.openElements.getCommonAncestor(n.element);e.treeAdapter.detachNode(a),r&&_00(e,r,a),z00(e,s,n)}}function iu(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function A00(e,t){e._appendCommentNode(t,e.openElements.items[0])}function m00(e,t){e._appendCommentNode(t,e.document)}function cu(e,t){if(e.stopped=!0,t.location){const o=e.fragmentContext?0:2;for(let n=e.openElements.stackTop;n>=o;n--)e._setEndLocation(e.openElements.items[n],t);if(!e.fragmentContext&&e.openElements.stackTop>=0){const n=e.openElements.items[0],s=e.treeAdapter.getNodeSourceCodeLocation(n);if(s&&!s.endTag&&(e._setEndLocation(n,t),e.openElements.stackTop>=1)){const a=e.openElements.items[1],r=e.treeAdapter.getNodeSourceCodeLocation(a);r&&!r.endTag&&e._setEndLocation(a,t)}}}}function O00(e,t){e._setDocumentType(t);const o=t.forceQuirks?_e.QUIRKS:Z$(t);X$(t)||e._err(t,M0.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,o),e.insertionMode=Z.BEFORE_HTML}function ja(e,t){e._err(t,M0.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,_e.QUIRKS),e.insertionMode=Z.BEFORE_HTML,e._processToken(t)}function g00(e,t){t.tagID===A.HTML?(e._insertElement(t,E0.HTML),e.insertionMode=Z.BEFORE_HEAD):Ga(e,t)}function C00(e,t){const o=t.tagID;(o===A.HTML||o===A.HEAD||o===A.BODY||o===A.BR)&&Ga(e,t)}function Ga(e,t){e._insertFakeRootElement(),e.insertionMode=Z.BEFORE_HEAD,e._processToken(t)}function k00(e,t){switch(t.tagID){case A.HTML:{R2(e,t);break}case A.HEAD:{e._insertElement(t,E0.HTML),e.headElement=e.openElements.current,e.insertionMode=Z.IN_HEAD;break}default:Ya(e,t)}}function v00(e,t){const o=t.tagID;o===A.HEAD||o===A.BODY||o===A.HTML||o===A.BR?Ya(e,t):e._err(t,M0.endTagWithoutMatchingOpenElement)}function Ya(e,t){e._insertFakeElement(l0.HEAD,A.HEAD),e.headElement=e.openElements.current,e.insertionMode=Z.IN_HEAD,e._processToken(t)}function Te(e,t){switch(t.tagID){case A.HTML:{R2(e,t);break}case A.BASE:case A.BASEFONT:case A.BGSOUND:case A.LINK:case A.META:{e._appendElement(t,E0.HTML),t.ackSelfClosing=!0;break}case A.TITLE:{e._switchToTextParsing(t,r2.RCDATA);break}case A.NOSCRIPT:{e.options.scriptingEnabled?e._switchToTextParsing(t,r2.RAWTEXT):(e._insertElement(t,E0.HTML),e.insertionMode=Z.IN_HEAD_NO_SCRIPT);break}case A.NOFRAMES:case A.STYLE:{e._switchToTextParsing(t,r2.RAWTEXT);break}case A.SCRIPT:{e._switchToTextParsing(t,r2.SCRIPT_DATA);break}case A.TEMPLATE:{e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=Z.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(Z.IN_TEMPLATE);break}case A.HEAD:{e._err(t,M0.misplacedStartTagForHeadElement);break}default:Xa(e,t)}}function E00(e,t){switch(t.tagID){case A.HEAD:{e.openElements.pop(),e.insertionMode=Z.AFTER_HEAD;break}case A.BODY:case A.BR:case A.HTML:{Xa(e,t);break}case A.TEMPLATE:{Jo(e,t);break}default:e._err(t,M0.endTagWithoutMatchingOpenElement)}}function Jo(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==A.TEMPLATE&&e._err(t,M0.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(A.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,M0.endTagWithoutMatchingOpenElement)}function Xa(e,t){e.openElements.pop(),e.insertionMode=Z.AFTER_HEAD,e._processToken(t)}function w00(e,t){switch(t.tagID){case A.HTML:{R2(e,t);break}case A.BASEFONT:case A.BGSOUND:case A.HEAD:case A.LINK:case A.META:case A.NOFRAMES:case A.STYLE:{Te(e,t);break}case A.NOSCRIPT:{e._err(t,M0.nestedNoscriptInHead);break}default:Za(e,t)}}function q00(e,t){switch(t.tagID){case A.NOSCRIPT:{e.openElements.pop(),e.insertionMode=Z.IN_HEAD;break}case A.BR:{Za(e,t);break}default:e._err(t,M0.endTagWithoutMatchingOpenElement)}}function Za(e,t){const o=t.type===p1.EOF?M0.openElementsLeftAfterEof:M0.disallowedContentInNoscriptInHead;e._err(t,o),e.openElements.pop(),e.insertionMode=Z.IN_HEAD,e._processToken(t)}function S00(e,t){switch(t.tagID){case A.HTML:{R2(e,t);break}case A.BODY:{e._insertElement(t,E0.HTML),e.framesetOk=!1,e.insertionMode=Z.IN_BODY;break}case A.FRAMESET:{e._insertElement(t,E0.HTML),e.insertionMode=Z.IN_FRAMESET;break}case A.BASE:case A.BASEFONT:case A.BGSOUND:case A.LINK:case A.META:case A.NOFRAMES:case A.SCRIPT:case A.STYLE:case A.TEMPLATE:case A.TITLE:{e._err(t,M0.abandonedHeadElementChild),e.openElements.push(e.headElement,A.HEAD),Te(e,t),e.openElements.remove(e.headElement);break}case A.HEAD:{e._err(t,M0.misplacedStartTagForHeadElement);break}default:Ja(e,t)}}function y00(e,t){switch(t.tagID){case A.BODY:case A.HTML:case A.BR:{Ja(e,t);break}case A.TEMPLATE:{Jo(e,t);break}default:e._err(t,M0.endTagWithoutMatchingOpenElement)}}function Ja(e,t){e._insertFakeElement(l0.BODY,A.BODY),e.insertionMode=Z.IN_BODY,Pc(e,t)}function Pc(e,t){switch(t.type){case p1.CHARACTER:{zO(e,t);break}case p1.WHITESPACE_CHARACTER:{_O(e,t);break}case p1.COMMENT:{iu(e,t);break}case p1.START_TAG:{R2(e,t);break}case p1.END_TAG:{Fc(e,t);break}case p1.EOF:{kO(e,t);break}}}function _O(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function zO(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function R00(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function B00(e,t){const o=e.openElements.tryPeekProperlyNestedBodyElement();o&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(o,t.attrs))}function W00(e,t){const o=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&o&&(e.treeAdapter.detachNode(o),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,E0.HTML),e.insertionMode=Z.IN_FRAMESET)}function L00(e,t){e.openElements.hasInButtonScope(A.P)&&e._closePElement(),e._insertElement(t,E0.HTML)}function T00(e,t){e.openElements.hasInButtonScope(A.P)&&e._closePElement(),e.openElements.currentTagId!==void 0&&nu.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,E0.HTML)}function I00(e,t){e.openElements.hasInButtonScope(A.P)&&e._closePElement(),e._insertElement(t,E0.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function N00(e,t){const o=e.openElements.tmplCount>0;(!e.formElement||o)&&(e.openElements.hasInButtonScope(A.P)&&e._closePElement(),e._insertElement(t,E0.HTML),o||(e.formElement=e.openElements.current))}function x00(e,t){e.framesetOk=!1;const o=t.tagID;for(let n=e.openElements.stackTop;n>=0;n--){const s=e.openElements.tagIDs[n];if(o===A.LI&&s===A.LI||(o===A.DD||o===A.DT)&&(s===A.DD||s===A.DT)){e.openElements.generateImpliedEndTagsWithExclusion(s),e.openElements.popUntilTagNamePopped(s);break}if(s!==A.ADDRESS&&s!==A.DIV&&s!==A.P&&e._isSpecialElement(e.openElements.items[n],s))break}e.openElements.hasInButtonScope(A.P)&&e._closePElement(),e._insertElement(t,E0.HTML)}function D00(e,t){e.openElements.hasInButtonScope(A.P)&&e._closePElement(),e._insertElement(t,E0.HTML),e.tokenizer.state=r2.PLAINTEXT}function P00(e,t){e.openElements.hasInScope(A.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(A.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,E0.HTML),e.framesetOk=!1}function F00(e,t){const o=e.activeFormattingElements.getElementEntryInScopeWithTagName(l0.A);o&&(ru(e,t),e.openElements.remove(o.element),e.activeFormattingElements.removeEntry(o)),e._reconstructActiveFormattingElements(),e._insertElement(t,E0.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function Q00(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,E0.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function H00(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(A.NOBR)&&(ru(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,E0.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function V00(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,E0.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function U00(e,t){e.treeAdapter.getDocumentMode(e.document)!==_e.QUIRKS&&e.openElements.hasInButtonScope(A.P)&&e._closePElement(),e._insertElement(t,E0.HTML),e.framesetOk=!1,e.insertionMode=Z.IN_TABLE}function AO(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,E0.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function mO(e){const t=Jm(e,Zo.TYPE);return t!=null&&t.toLowerCase()===l00}function K00(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,E0.HTML),mO(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function j00(e,t){e._appendElement(t,E0.HTML),t.ackSelfClosing=!0}function G00(e,t){e.openElements.hasInButtonScope(A.P)&&e._closePElement(),e._appendElement(t,E0.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function Y00(e,t){t.tagName=l0.IMG,t.tagID=A.IMG,AO(e,t)}function X00(e,t){e._insertElement(t,E0.HTML),e.skipNextNewLine=!0,e.tokenizer.state=r2.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=Z.TEXT}function Z00(e,t){e.openElements.hasInButtonScope(A.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,r2.RAWTEXT)}function J00(e,t){e.framesetOk=!1,e._switchToTextParsing(t,r2.RAWTEXT)}function OO(e,t){e._switchToTextParsing(t,r2.RAWTEXT)}function $00(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,E0.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===Z.IN_TABLE||e.insertionMode===Z.IN_CAPTION||e.insertionMode===Z.IN_TABLE_BODY||e.insertionMode===Z.IN_ROW||e.insertionMode===Z.IN_CELL?Z.IN_SELECT_IN_TABLE:Z.IN_SELECT}function e10(e,t){e.openElements.currentTagId===A.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,E0.HTML)}function t10(e,t){e.openElements.hasInScope(A.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,E0.HTML)}function o10(e,t){e.openElements.hasInScope(A.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(A.RTC),e._insertElement(t,E0.HTML)}function n10(e,t){e._reconstructActiveFormattingElements(),uO(t),au(t),t.selfClosing?e._appendElement(t,E0.MATHML):e._insertElement(t,E0.MATHML),t.ackSelfClosing=!0}function s10(e,t){e._reconstructActiveFormattingElements(),bO(t),au(t),t.selfClosing?e._appendElement(t,E0.SVG):e._insertElement(t,E0.SVG),t.ackSelfClosing=!0}function gO(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,E0.HTML)}function R2(e,t){switch(t.tagID){case A.I:case A.S:case A.B:case A.U:case A.EM:case A.TT:case A.BIG:case A.CODE:case A.FONT:case A.SMALL:case A.STRIKE:case A.STRONG:{Q00(e,t);break}case A.A:{F00(e,t);break}case A.H1:case A.H2:case A.H3:case A.H4:case A.H5:case A.H6:{T00(e,t);break}case A.P:case A.DL:case A.OL:case A.UL:case A.DIV:case A.DIR:case A.NAV:case A.MAIN:case A.MENU:case A.ASIDE:case A.CENTER:case A.FIGURE:case A.FOOTER:case A.HEADER:case A.HGROUP:case A.DIALOG:case A.DETAILS:case A.ADDRESS:case A.ARTICLE:case A.SEARCH:case A.SECTION:case A.SUMMARY:case A.FIELDSET:case A.BLOCKQUOTE:case A.FIGCAPTION:{L00(e,t);break}case A.LI:case A.DD:case A.DT:{x00(e,t);break}case A.BR:case A.IMG:case A.WBR:case A.AREA:case A.EMBED:case A.KEYGEN:{AO(e,t);break}case A.HR:{G00(e,t);break}case A.RB:case A.RTC:{t10(e,t);break}case A.RT:case A.RP:{o10(e,t);break}case A.PRE:case A.LISTING:{I00(e,t);break}case A.XMP:{Z00(e,t);break}case A.SVG:{s10(e,t);break}case A.HTML:{R00(e,t);break}case A.BASE:case A.LINK:case A.META:case A.STYLE:case A.TITLE:case A.SCRIPT:case A.BGSOUND:case A.BASEFONT:case A.TEMPLATE:{Te(e,t);break}case A.BODY:{B00(e,t);break}case A.FORM:{N00(e,t);break}case A.NOBR:{H00(e,t);break}case A.MATH:{n10(e,t);break}case A.TABLE:{U00(e,t);break}case A.INPUT:{K00(e,t);break}case A.PARAM:case A.TRACK:case A.SOURCE:{j00(e,t);break}case A.IMAGE:{Y00(e,t);break}case A.BUTTON:{P00(e,t);break}case A.APPLET:case A.OBJECT:case A.MARQUEE:{V00(e,t);break}case A.IFRAME:{J00(e,t);break}case A.SELECT:{$00(e,t);break}case A.OPTION:case A.OPTGROUP:{e10(e,t);break}case A.NOEMBED:case A.NOFRAMES:{OO(e,t);break}case A.FRAMESET:{W00(e,t);break}case A.TEXTAREA:{X00(e,t);break}case A.NOSCRIPT:{e.options.scriptingEnabled?OO(e,t):gO(e,t);break}case A.PLAINTEXT:{D00(e,t);break}case A.COL:case A.TH:case A.TD:case A.TR:case A.HEAD:case A.FRAME:case A.TBODY:case A.TFOOT:case A.THEAD:case A.CAPTION:case A.COLGROUP:break;default:gO(e,t)}}function a10(e,t){if(e.openElements.hasInScope(A.BODY)&&(e.insertionMode=Z.AFTER_BODY,e.options.sourceCodeLocationInfo)){const o=e.openElements.tryPeekProperlyNestedBodyElement();o&&e._setEndLocation(o,t)}}function r10(e,t){e.openElements.hasInScope(A.BODY)&&(e.insertionMode=Z.AFTER_BODY,BO(e,t))}function i10(e,t){const o=t.tagID;e.openElements.hasInScope(o)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(o))}function c10(e){const t=e.openElements.tmplCount>0,{formElement:o}=e;t||(e.formElement=null),(o||t)&&e.openElements.hasInScope(A.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(A.FORM):o&&e.openElements.remove(o))}function l10(e){e.openElements.hasInButtonScope(A.P)||e._insertFakeElement(l0.P,A.P),e._closePElement()}function p10(e){e.openElements.hasInListItemScope(A.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(A.LI),e.openElements.popUntilTagNamePopped(A.LI))}function d10(e,t){const o=t.tagID;e.openElements.hasInScope(o)&&(e.openElements.generateImpliedEndTagsWithExclusion(o),e.openElements.popUntilTagNamePopped(o))}function u10(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function b10(e,t){const o=t.tagID;e.openElements.hasInScope(o)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(o),e.activeFormattingElements.clearToLastMarker())}function h10(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(l0.BR,A.BR),e.openElements.pop(),e.framesetOk=!1}function CO(e,t){const o=t.tagName,n=t.tagID;for(let s=e.openElements.stackTop;s>0;s--){const a=e.openElements.items[s],r=e.openElements.tagIDs[s];if(n===r&&(n!==A.UNKNOWN||e.treeAdapter.getTagName(a)===o)){e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.stackTop>=s&&e.openElements.shortenToLength(s);break}if(e._isSpecialElement(a,r))break}}function Fc(e,t){switch(t.tagID){case A.A:case A.B:case A.I:case A.S:case A.U:case A.EM:case A.TT:case A.BIG:case A.CODE:case A.FONT:case A.NOBR:case A.SMALL:case A.STRIKE:case A.STRONG:{ru(e,t);break}case A.P:{l10(e);break}case A.DL:case A.UL:case A.OL:case A.DIR:case A.DIV:case A.NAV:case A.PRE:case A.MAIN:case A.MENU:case A.ASIDE:case A.BUTTON:case A.CENTER:case A.FIGURE:case A.FOOTER:case A.HEADER:case A.HGROUP:case A.DIALOG:case A.ADDRESS:case A.ARTICLE:case A.DETAILS:case A.SEARCH:case A.SECTION:case A.SUMMARY:case A.LISTING:case A.FIELDSET:case A.BLOCKQUOTE:case A.FIGCAPTION:{i10(e,t);break}case A.LI:{p10(e);break}case A.DD:case A.DT:{d10(e,t);break}case A.H1:case A.H2:case A.H3:case A.H4:case A.H5:case A.H6:{u10(e);break}case A.BR:{h10(e);break}case A.BODY:{a10(e,t);break}case A.HTML:{r10(e,t);break}case A.FORM:{c10(e);break}case A.APPLET:case A.OBJECT:case A.MARQUEE:{b10(e,t);break}case A.TEMPLATE:{Jo(e,t);break}default:CO(e,t)}}function kO(e,t){e.tmplInsertionModeStack.length>0?RO(e,t):cu(e,t)}function M10(e,t){var o;t.tagID===A.SCRIPT&&((o=e.scriptHandler)===null||o===void 0||o.call(e,e.openElements.current)),e.openElements.pop(),e.insertionMode=e.originalInsertionMode}function f10(e,t){e._err(t,M0.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function lu(e,t){if(e.openElements.currentTagId!==void 0&&hO.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=Z.IN_TABLE_TEXT,t.type){case p1.CHARACTER:{EO(e,t);break}case p1.WHITESPACE_CHARACTER:{vO(e,t);break}}else er(e,t)}function _10(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,E0.HTML),e.insertionMode=Z.IN_CAPTION}function z10(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,E0.HTML),e.insertionMode=Z.IN_COLUMN_GROUP}function A10(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(l0.COLGROUP,A.COLGROUP),e.insertionMode=Z.IN_COLUMN_GROUP,pu(e,t)}function m10(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,E0.HTML),e.insertionMode=Z.IN_TABLE_BODY}function O10(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(l0.TBODY,A.TBODY),e.insertionMode=Z.IN_TABLE_BODY,Hc(e,t)}function g10(e,t){e.openElements.hasInTableScope(A.TABLE)&&(e.openElements.popUntilTagNamePopped(A.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function C10(e,t){mO(t)?e._appendElement(t,E0.HTML):er(e,t),t.ackSelfClosing=!0}function k10(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,E0.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function ls(e,t){switch(t.tagID){case A.TD:case A.TH:case A.TR:{O10(e,t);break}case A.STYLE:case A.SCRIPT:case A.TEMPLATE:{Te(e,t);break}case A.COL:{A10(e,t);break}case A.FORM:{k10(e,t);break}case A.TABLE:{g10(e,t);break}case A.TBODY:case A.TFOOT:case A.THEAD:{m10(e,t);break}case A.INPUT:{C10(e,t);break}case A.CAPTION:{_10(e,t);break}case A.COLGROUP:{z10(e,t);break}default:er(e,t)}}function $a(e,t){switch(t.tagID){case A.TABLE:{e.openElements.hasInTableScope(A.TABLE)&&(e.openElements.popUntilTagNamePopped(A.TABLE),e._resetInsertionMode());break}case A.TEMPLATE:{Jo(e,t);break}case A.BODY:case A.CAPTION:case A.COL:case A.COLGROUP:case A.HTML:case A.TBODY:case A.TD:case A.TFOOT:case A.TH:case A.THEAD:case A.TR:break;default:er(e,t)}}function er(e,t){const o=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,Pc(e,t),e.fosterParentingEnabled=o}function vO(e,t){e.pendingCharacterTokens.push(t)}function EO(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function tr(e,t){let o=0;if(e.hasNonWhitespacePendingCharacterToken)for(;o<e.pendingCharacterTokens.length;o++)er(e,e.pendingCharacterTokens[o]);else for(;o<e.pendingCharacterTokens.length;o++)e._insertCharacters(e.pendingCharacterTokens[o]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}const wO=new Set([A.CAPTION,A.COL,A.COLGROUP,A.TBODY,A.TD,A.TFOOT,A.TH,A.THEAD,A.TR]);function v10(e,t){const o=t.tagID;wO.has(o)?e.openElements.hasInTableScope(A.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(A.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=Z.IN_TABLE,ls(e,t)):R2(e,t)}function E10(e,t){const o=t.tagID;switch(o){case A.CAPTION:case A.TABLE:{e.openElements.hasInTableScope(A.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(A.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=Z.IN_TABLE,o===A.TABLE&&$a(e,t));break}case A.BODY:case A.COL:case A.COLGROUP:case A.HTML:case A.TBODY:case A.TD:case A.TFOOT:case A.TH:case A.THEAD:case A.TR:break;default:Fc(e,t)}}function pu(e,t){switch(t.tagID){case A.HTML:{R2(e,t);break}case A.COL:{e._appendElement(t,E0.HTML),t.ackSelfClosing=!0;break}case A.TEMPLATE:{Te(e,t);break}default:Qc(e,t)}}function w10(e,t){switch(t.tagID){case A.COLGROUP:{e.openElements.currentTagId===A.COLGROUP&&(e.openElements.pop(),e.insertionMode=Z.IN_TABLE);break}case A.TEMPLATE:{Jo(e,t);break}case A.COL:break;default:Qc(e,t)}}function Qc(e,t){e.openElements.currentTagId===A.COLGROUP&&(e.openElements.pop(),e.insertionMode=Z.IN_TABLE,e._processToken(t))}function Hc(e,t){switch(t.tagID){case A.TR:{e.openElements.clearBackToTableBodyContext(),e._insertElement(t,E0.HTML),e.insertionMode=Z.IN_ROW;break}case A.TH:case A.TD:{e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(l0.TR,A.TR),e.insertionMode=Z.IN_ROW,Vc(e,t);break}case A.CAPTION:case A.COL:case A.COLGROUP:case A.TBODY:case A.TFOOT:case A.THEAD:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=Z.IN_TABLE,ls(e,t));break}default:ls(e,t)}}function du(e,t){const o=t.tagID;switch(t.tagID){case A.TBODY:case A.TFOOT:case A.THEAD:{e.openElements.hasInTableScope(o)&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=Z.IN_TABLE);break}case A.TABLE:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=Z.IN_TABLE,$a(e,t));break}case A.BODY:case A.CAPTION:case A.COL:case A.COLGROUP:case A.HTML:case A.TD:case A.TH:case A.TR:break;default:$a(e,t)}}function Vc(e,t){switch(t.tagID){case A.TH:case A.TD:{e.openElements.clearBackToTableRowContext(),e._insertElement(t,E0.HTML),e.insertionMode=Z.IN_CELL,e.activeFormattingElements.insertMarker();break}case A.CAPTION:case A.COL:case A.COLGROUP:case A.TBODY:case A.TFOOT:case A.THEAD:case A.TR:{e.openElements.hasInTableScope(A.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=Z.IN_TABLE_BODY,Hc(e,t));break}default:ls(e,t)}}function qO(e,t){switch(t.tagID){case A.TR:{e.openElements.hasInTableScope(A.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=Z.IN_TABLE_BODY);break}case A.TABLE:{e.openElements.hasInTableScope(A.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=Z.IN_TABLE_BODY,du(e,t));break}case A.TBODY:case A.TFOOT:case A.THEAD:{(e.openElements.hasInTableScope(t.tagID)||e.openElements.hasInTableScope(A.TR))&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=Z.IN_TABLE_BODY,du(e,t));break}case A.BODY:case A.CAPTION:case A.COL:case A.COLGROUP:case A.HTML:case A.TD:case A.TH:break;default:$a(e,t)}}function q10(e,t){const o=t.tagID;wO.has(o)?(e.openElements.hasInTableScope(A.TD)||e.openElements.hasInTableScope(A.TH))&&(e._closeTableCell(),Vc(e,t)):R2(e,t)}function S10(e,t){const o=t.tagID;switch(o){case A.TD:case A.TH:{e.openElements.hasInTableScope(o)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(o),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=Z.IN_ROW);break}case A.TABLE:case A.TBODY:case A.TFOOT:case A.THEAD:case A.TR:{e.openElements.hasInTableScope(o)&&(e._closeTableCell(),qO(e,t));break}case A.BODY:case A.CAPTION:case A.COL:case A.COLGROUP:case A.HTML:break;default:Fc(e,t)}}function SO(e,t){switch(t.tagID){case A.HTML:{R2(e,t);break}case A.OPTION:{e.openElements.currentTagId===A.OPTION&&e.openElements.pop(),e._insertElement(t,E0.HTML);break}case A.OPTGROUP:{e.openElements.currentTagId===A.OPTION&&e.openElements.pop(),e.openElements.currentTagId===A.OPTGROUP&&e.openElements.pop(),e._insertElement(t,E0.HTML);break}case A.HR:{e.openElements.currentTagId===A.OPTION&&e.openElements.pop(),e.openElements.currentTagId===A.OPTGROUP&&e.openElements.pop(),e._appendElement(t,E0.HTML),t.ackSelfClosing=!0;break}case A.INPUT:case A.KEYGEN:case A.TEXTAREA:case A.SELECT:{e.openElements.hasInSelectScope(A.SELECT)&&(e.openElements.popUntilTagNamePopped(A.SELECT),e._resetInsertionMode(),t.tagID!==A.SELECT&&e._processStartTag(t));break}case A.SCRIPT:case A.TEMPLATE:{Te(e,t);break}}}function yO(e,t){switch(t.tagID){case A.OPTGROUP:{e.openElements.stackTop>0&&e.openElements.currentTagId===A.OPTION&&e.openElements.tagIDs[e.openElements.stackTop-1]===A.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagId===A.OPTGROUP&&e.openElements.pop();break}case A.OPTION:{e.openElements.currentTagId===A.OPTION&&e.openElements.pop();break}case A.SELECT:{e.openElements.hasInSelectScope(A.SELECT)&&(e.openElements.popUntilTagNamePopped(A.SELECT),e._resetInsertionMode());break}case A.TEMPLATE:{Jo(e,t);break}}}function y10(e,t){const o=t.tagID;o===A.CAPTION||o===A.TABLE||o===A.TBODY||o===A.TFOOT||o===A.THEAD||o===A.TR||o===A.TD||o===A.TH?(e.openElements.popUntilTagNamePopped(A.SELECT),e._resetInsertionMode(),e._processStartTag(t)):SO(e,t)}function R10(e,t){const o=t.tagID;o===A.CAPTION||o===A.TABLE||o===A.TBODY||o===A.TFOOT||o===A.THEAD||o===A.TR||o===A.TD||o===A.TH?e.openElements.hasInTableScope(o)&&(e.openElements.popUntilTagNamePopped(A.SELECT),e._resetInsertionMode(),e.onEndTag(t)):yO(e,t)}function B10(e,t){switch(t.tagID){case A.BASE:case A.BASEFONT:case A.BGSOUND:case A.LINK:case A.META:case A.NOFRAMES:case A.SCRIPT:case A.STYLE:case A.TEMPLATE:case A.TITLE:{Te(e,t);break}case A.CAPTION:case A.COLGROUP:case A.TBODY:case A.TFOOT:case A.THEAD:{e.tmplInsertionModeStack[0]=Z.IN_TABLE,e.insertionMode=Z.IN_TABLE,ls(e,t);break}case A.COL:{e.tmplInsertionModeStack[0]=Z.IN_COLUMN_GROUP,e.insertionMode=Z.IN_COLUMN_GROUP,pu(e,t);break}case A.TR:{e.tmplInsertionModeStack[0]=Z.IN_TABLE_BODY,e.insertionMode=Z.IN_TABLE_BODY,Hc(e,t);break}case A.TD:case A.TH:{e.tmplInsertionModeStack[0]=Z.IN_ROW,e.insertionMode=Z.IN_ROW,Vc(e,t);break}default:e.tmplInsertionModeStack[0]=Z.IN_BODY,e.insertionMode=Z.IN_BODY,R2(e,t)}}function W10(e,t){t.tagID===A.TEMPLATE&&Jo(e,t)}function RO(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(A.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):cu(e,t)}function L10(e,t){t.tagID===A.HTML?R2(e,t):Uc(e,t)}function BO(e,t){var o;if(t.tagID===A.HTML){if(e.fragmentContext||(e.insertionMode=Z.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===A.HTML){e._setEndLocation(e.openElements.items[0],t);const n=e.openElements.items[1];n&&!(!((o=e.treeAdapter.getNodeSourceCodeLocation(n))===null||o===void 0)&&o.endTag)&&e._setEndLocation(n,t)}}else Uc(e,t)}function Uc(e,t){e.insertionMode=Z.IN_BODY,Pc(e,t)}function T10(e,t){switch(t.tagID){case A.HTML:{R2(e,t);break}case A.FRAMESET:{e._insertElement(t,E0.HTML);break}case A.FRAME:{e._appendElement(t,E0.HTML),t.ackSelfClosing=!0;break}case A.NOFRAMES:{Te(e,t);break}}}function I10(e,t){t.tagID===A.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==A.FRAMESET&&(e.insertionMode=Z.AFTER_FRAMESET))}function N10(e,t){switch(t.tagID){case A.HTML:{R2(e,t);break}case A.NOFRAMES:{Te(e,t);break}}}function x10(e,t){t.tagID===A.HTML&&(e.insertionMode=Z.AFTER_AFTER_FRAMESET)}function D10(e,t){t.tagID===A.HTML?R2(e,t):Kc(e,t)}function Kc(e,t){e.insertionMode=Z.IN_BODY,Pc(e,t)}function P10(e,t){switch(t.tagID){case A.HTML:{R2(e,t);break}case A.NOFRAMES:{Te(e,t);break}}}function F10(e,t){t.chars=Z1,e._insertCharacters(t)}function Q10(e,t){e._insertCharacters(t),e.framesetOk=!1}function WO(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==E0.HTML&&e.openElements.currentTagId!==void 0&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function H10(e,t){if(s00(t))WO(e),e._startTagOutsideForeignContent(t);else{const o=e._getAdjustedCurrentElement(),n=e.treeAdapter.getNamespaceURI(o);n===E0.MATHML?uO(t):n===E0.SVG&&(a00(t),bO(t)),au(t),t.selfClosing?e._appendElement(t,n):e._insertElement(t,n),t.ackSelfClosing=!0}}function V10(e,t){if(t.tagID===A.P||t.tagID===A.BR){WO(e),e._endTagOutsideForeignContent(t);return}for(let o=e.openElements.stackTop;o>0;o--){const n=e.openElements.items[o];if(e.treeAdapter.getNamespaceURI(n)===E0.HTML){e._endTagOutsideForeignContent(t);break}const s=e.treeAdapter.getTagName(n);if(s.toLowerCase()===t.tagName){t.tagName=s,e.openElements.shortenToLength(o);break}}}l0.AREA,l0.BASE,l0.BASEFONT,l0.BGSOUND,l0.BR,l0.COL,l0.EMBED,l0.FRAME,l0.HR,l0.IMG,l0.INPUT,l0.KEYGEN,l0.LINK,l0.META,l0.PARAM,l0.SOURCE,l0.TRACK,l0.WBR;const U10=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,K10=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),LO={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function TO(e,t){const o=o20(e),n=fm("type",{handlers:{root:j10,element:G10,text:Y10,comment:NO,doctype:X10,raw:J10},unknown:$10}),s={parser:o?new fO(LO):fO.getFragmentParser(void 0,LO),handle(i){n(i,s)},stitches:!1,options:t||{}};n(e,s),ps(s,Xe());const a=o?s.parser.document:s.parser.getFragment(),r=n$(a,{file:s.options.file});return s.stitches&&Wc(r,"comment",function(i,c,l){const p=i;if(p.value.stitch&&l&&c!==void 0){const d=l.children;return d[c]=p.value.stitch,c}}),r.type==="root"&&r.children.length===1&&r.children[0].type===e.type?r.children[0]:r}function IO(e,t){let o=-1;if(e)for(;++o<e.length;)t.handle(e[o])}function j10(e,t){IO(e.children,t)}function G10(e,t){e20(e,t),IO(e.children,t),t20(e,t)}function Y10(e,t){t.parser.tokenizer.state>4&&(t.parser.tokenizer.state=0);const o={type:p1.CHARACTER,chars:e.value,location:or(e)};ps(t,Xe(e)),t.parser.currentToken=o,t.parser._processToken(t.parser.currentToken)}function X10(e,t){const o={type:p1.DOCTYPE,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:or(e)};ps(t,Xe(e)),t.parser.currentToken=o,t.parser._processToken(t.parser.currentToken)}function Z10(e,t){t.stitches=!0;const o=n20(e);if("children"in e&&"children"in o){const n=TO({type:"root",children:e.children},t.options);o.children=n.children}NO({type:"comment",value:{stitch:o}},t)}function NO(e,t){const o=e.value,n={type:p1.COMMENT,data:o,location:or(e)};ps(t,Xe(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function J10(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,xO(t,Xe(e)),t.parser.tokenizer.write(t.options.tagfilter?e.value.replace(U10,"&lt;$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 o=t.parser.tokenizer._consume();t.parser.tokenizer._callState(o)}}function $10(e,t){const o=e;if(t.options.passThrough&&t.options.passThrough.includes(o.type))Z10(o,t);else{let n="";throw K10.has(o.type)&&(n=". 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 `"+o.type+"` node"+n)}}function ps(e,t){xO(e,t);const o=e.parser.tokenizer.currentCharacterToken;o&&o.location&&(o.location.endLine=e.parser.tokenizer.preprocessor.line,o.location.endCol=e.parser.tokenizer.preprocessor.col+1,o.location.endOffset=e.parser.tokenizer.preprocessor.offset+1,e.parser.currentToken=o,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=r2.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 xO(e,t){if(t&&t.offset!==void 0){const o={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=o}}function e20(e,t){const o=e.tagName.toLowerCase();if(t.parser.tokenizer.state===r2.PLAINTEXT)return;ps(t,Xe(e));const n=t.parser.openElements.current;let s="namespaceURI"in n?n.namespaceURI:Xo.html;s===Xo.html&&o==="svg"&&(s=Xo.svg);const a=c$({...e,children:[]},{space:s===Xo.svg?"svg":"html"}),r={type:p1.START_TAG,tagName:o,tagID:cs(o),selfClosing:!1,ackSelfClosing:!1,attrs:"attrs"in a?a.attrs:[],location:or(e)};t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=o}function t20(e,t){const o=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&f$.includes(o)||t.parser.tokenizer.state===r2.PLAINTEXT)return;ps(t,Oc(e));const n={type:p1.END_TAG,tagName:o,tagID:cs(o),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:or(e)};t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken),o===t.parser.tokenizer.lastStartTagName&&(t.parser.tokenizer.state===r2.RCDATA||t.parser.tokenizer.state===r2.RAWTEXT||t.parser.tokenizer.state===r2.SCRIPT_DATA)&&(t.parser.tokenizer.state=r2.DATA)}function o20(e){const t=e.type==="root"?e.children[0]:e;return!!(t&&(t.type==="doctype"||t.type==="element"&&t.tagName.toLowerCase()==="html"))}function or(e){const t=Xe(e)||{line:void 0,column:void 0,offset:void 0},o=Oc(e)||{line:void 0,column:void 0,offset:void 0};return{startLine:t.line,startCol:t.column,startOffset:t.offset,endLine:o.line,endCol:o.column,endOffset:o.offset}}function n20(e){return"children"in e?ss({...e,children:[]}):ss(e)}function s20(e){return function(t,o){return TO(t,{...e,file:o})}}const a20=[KJ],r20=[s20],uu=h.memo(({content:e,components:t,useRehypeRaw:o=!1})=>u0.jsx(WX,{remarkPlugins:a20,rehypePlugins:o?r20:void 0,components:t,children:e}),(e,t)=>e.content===t.content&&e.components===t.components&&e.useRehypeRaw===t.useRehypeRaw),DO=()=>{const e="Working on it",t=["Counting backwards from infinity","Thinking","Thinking even more","Planning my response","Synthesizing the answer","Organizing thoughts","Reviewing the context","Connecting the dots","Dotting i's and crossing t's","Formulating a reply"],[o,n]=h.useState(e);return h.useEffect(()=>{n(e);const s=setInterval(()=>{n(t[Math.floor(Math.random()*t.length)])},8e3);return()=>{clearInterval(s),n(e)}},[]),u0.jsxs("div",{className:"agent-thinking",children:[u0.jsxs("div",{className:"dot-container",children:[u0.jsx("div",{className:"dot first"}),u0.jsx("div",{className:"dot second"}),u0.jsx("div",{className:"dot third"})]}),o]})},i20=h.memo(({streamingResponse:e,isAgentThinking:t,markdownComponents:o})=>u0.jsxs(u0.Fragment,{children:[e&&u0.jsxs(zc,{children:[u0.jsx(uu,{content:e,components:o,useRehypeRaw:!0}),t&&u0.jsx(DO,{}),!t&&u0.jsx("div",{className:"agent-thinking"})]}),!e&&t&&u0.jsx(zc,{children:u0.jsx(DO,{})})]}));var bu,PO;function c20(){return PO||(PO=1,bu=function(e){(function(t,o,n,s,a,r,i){t[n]=t[n]||function(){(t[n].q=t[n].q||[]).push(arguments)},r=o.createElement(s),r.async=1,r.src="https://www.clarity.ms/tag/"+a,i=o.getElementsByTagName(s)[0],i.parentNode.insertBefore(r,i)})(window,document,"clarity","script",e)}),bu}var hu,FO;function l20(){if(FO)return hu;FO=1;var e=c20();function t(){var d=Array.prototype.slice.call(arguments);if(!window.clarity)throw new Error("Clarity is not initialized");window.clarity.apply(void 0,d)}function o(d){e(d)}function n(){return typeof window.clarity=="function"}function s(d,b){t("identify",d,b)}function a(d=!0){t("consent",d)}function r(){t("stop")}function i(){t("start")}function c(d,b){t("set",d,b)}function l(d){t("event",d)}function p(d){t("upgrade",d)}return hu={clarity:{init:o,hasStarted:n,identify:s,consent:a,stop:r,start:i,setTag:c,setEvent:l,upgrade:p}},hu}var $o=l20();const p20=({children:e,token:t,env:o,currentUser:n,flags:s,isInCustomerView:a,agentApiService:r,hideAgentPanelCallback:i,isAgentPanelOpenProp:c,currentApp:l,currentConversationId:p})=>{const[d,b]=W.useState(c??!1),[M,f]=W.useState(p??null),[m,O]=W.useState(""),[g,C]=W.useState("active"),[E,L]=W.useState(!1),[T,I]=W.useState(!1),[Q,z]=W.useState(n??null),[x,q]=W.useState(s),[R,H]=W.useState(r??null),[w,N]=W.useState(a??!1),[v,V]=W.useState(t??null),[F,$]=W.useState(o??""),[t0,B]=W.useState(l);W.useEffect(()=>{p!==void 0&&f(p)},[p]),W.useEffect(()=>{t!==void 0&&V(t)},[t]),W.useEffect(()=>{o!==void 0&&$(o)},[o]),W.useEffect(()=>{n!==void 0&&z(n)},[n]),W.useEffect(()=>{s!==void 0&&q(s)},[s]),W.useEffect(()=>{a!==void 0&&N(a)},[a]),W.useEffect(()=>{r!==void 0&&H(r)},[r]),W.useEffect(()=>{c!==void 0&&b(c)},[c]),W.useEffect(()=>{l!==void 0&&B(l)},[l]);const o0=W.useCallback(()=>{$o.clarity.setEvent("Agent Panel opened"),b(!0)},[]),a0=W.useCallback(()=>{$o.clarity.setEvent("Agent Panel closed"),b(!1),i?.()},[i]),D=W.useCallback(f0=>{f(f0)},[]),Y=W.useCallback(()=>b(f0=>!f0),[]),j=W.useCallback(f0=>{O(f0)},[]),G=W.useCallback(f0=>{C(f0)},[]),s0=W.useCallback(f0=>{L(f0)},[]),p0=W.useCallback(f0=>{I(f0)},[]),C0=W.useMemo(()=>({agentApiService:R,showAgentPanel:o0,hideAgentPanel:a0,toggleAgentPanelVisibility:Y,isAgentPanelOpen:d,currentConversationId:M,updateCurrentConversationId:D,lastSentUserMessage:m,updateLastSentUserMessage:j,usageStatus:g,updateUsageStatus:G,userHasAgentPerms:E,updateUserHasAgentPerms:s0,isInPreprod:T,updateIsInPreprod:p0,currentUser:Q,flags:x,isInCustomerView:w,token:v,env:F,currentApp:t0}),[R,Y,d,o0,a0,M,m,D,j,g,G,E,s0,T,p0,Q,x,w,v,F,t0]);return u0.jsx(hb.Provider,{value:C0,children:e})};function Mu(){return Mu=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)({}).hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e},Mu.apply(null,arguments)}var d20=W.useLayoutEffect,u20=function(t){var o=W.useRef(t);return d20(function(){o.current=t}),o},QO=function(t,o){if(typeof t=="function"){t(o);return}t.current=o},b20=function(t,o){var n=W.useRef();return W.useCallback(function(s){t.current=s,n.current&&QO(n.current,null),n.current=o,o&&QO(o,s)},[o])},HO={"min-height":"0","max-height":"none",height:"0",visibility:"hidden",overflow:"hidden",position:"absolute","z-index":"-1000",top:"0",right:"0",display:"block"},h20=function(t){Object.keys(HO).forEach(function(o){t.style.setProperty(o,HO[o],"important")})},VO=h20,D2=null,UO=function(t,o){var n=t.scrollHeight;return o.sizingStyle.boxSizing==="border-box"?n+o.borderSize:n-o.paddingSize};function M20(e,t,o,n){o===void 0&&(o=1),n===void 0&&(n=1/0),D2||(D2=document.createElement("textarea"),D2.setAttribute("tabindex","-1"),D2.setAttribute("aria-hidden","true"),VO(D2)),D2.parentNode===null&&document.body.appendChild(D2);var s=e.paddingSize,a=e.borderSize,r=e.sizingStyle,i=r.boxSizing;Object.keys(r).forEach(function(b){var M=b;D2.style[M]=r[M]}),VO(D2),D2.value=t;var c=UO(D2,e);D2.value=t,c=UO(D2,e),D2.value="x";var l=D2.scrollHeight-s,p=l*o;i==="border-box"&&(p=p+s+a),c=Math.max(p,c);var d=l*n;return i==="border-box"&&(d=d+s+a),c=Math.min(d,c),[c,l]}var KO=function(){},f20=function(t,o){return t.reduce(function(n,s){return n[s]=o[s],n},{})},_20=["borderBottomWidth","borderLeftWidth","borderRightWidth","borderTopWidth","boxSizing","fontFamily","fontSize","fontStyle","fontWeight","letterSpacing","lineHeight","paddingBottom","paddingLeft","paddingRight","paddingTop","tabSize","textIndent","textRendering","textTransform","width","wordBreak","wordSpacing","scrollbarGutter"],z20=!!document.documentElement.currentStyle,A20=function(t){var o=window.getComputedStyle(t);if(o===null)return null;var n=f20(_20,o),s=n.boxSizing;if(s==="")return null;z20&&s==="border-box"&&(n.width=parseFloat(n.width)+parseFloat(n.borderRightWidth)+parseFloat(n.borderLeftWidth)+parseFloat(n.paddingRight)+parseFloat(n.paddingLeft)+"px");var a=parseFloat(n.paddingBottom)+parseFloat(n.paddingTop),r=parseFloat(n.borderBottomWidth)+parseFloat(n.borderTopWidth);return{sizingStyle:n,paddingSize:a,borderSize:r}},m20=A20;function fu(e,t,o){var n=u20(o);h.useLayoutEffect(function(){var s=function(r){return n.current(r)};if(e)return e.addEventListener(t,s),function(){return e.removeEventListener(t,s)}},[])}var O20=function(t,o){fu(document.body,"reset",function(n){t.current.form===n.target&&o(n)})},g20=function(t){fu(window,"resize",t)},C20=function(t){fu(document.fonts,"loadingdone",t)},k20=["cacheMeasurements","maxRows","minRows","onChange","onHeightChange"],v20=function(t,o){var n=t.cacheMeasurements,s=t.maxRows,a=t.minRows,r=t.onChange,i=r===void 0?KO:r,c=t.onHeightChange,l=c===void 0?KO:c,p=mU(t,k20),d=p.value!==void 0,b=h.useRef(null),M=b20(b,o),f=h.useRef(0),m=h.useRef(),O=function(){var E=b.current,L=n&&m.current?m.current:m20(E);if(L){m.current=L;var T=M20(L,E.value||E.placeholder||"x",a,s),I=T[0],Q=T[1];f.current!==I&&(f.current=I,E.style.setProperty("height",I+"px","important"),l(I,{rowHeight:Q}))}},g=function(E){d||O(),i(E)};return h.useLayoutEffect(O),O20(b,function(){if(!d){var C=b.current.value;requestAnimationFrame(function(){var E=b.current;E&&C!==E.value&&O()})}}),g20(O),C20(O),h.createElement("textarea",Mu({},p,{onChange:g,ref:M}))},E20=h.forwardRef(v20);function w20({onSendMessage:e,setMessage:t,message:o,isMessageLoading:n}){const{usageStatus:s,isInPreprod:a,currentApp:r,isInCustomerView:i}=pn(),{t:c}=Zn(),l=r?.application.name,p=n||i||s==="restricted"||s==="limited"||a,d=h.useCallback(()=>{!o||p||($o.clarity.setEvent("Message sent to Agent"),e(o,!1,l||""),t(""))},[o,e,l,t,s,n,a,i]);return h.useEffect(()=>{const b=f=>{f.key==="Enter"&&!f.shiftKey&&(f.preventDefault(),d())},M=document.getElementById("chat-textarea");return M?.addEventListener("keydown",b),()=>{M?.removeEventListener("keydown",b)}},[d]),u0.jsxs(Ji,{onSubmit:()=>d(),children:[u0.jsxs("div",{className:p?"input-container--disabled":"input-container",children:[u0.jsx("div",{className:"textarea-wrapper",children:u0.jsx(E20,{id:"chat-textarea",maxRows:5,className:"textarea",placeholder:c("textInputPlaceholder",{defaultValue:"What can I help you with?"}),value:o,onChange:b=>t(b.target.value),disabled:p})}),i&&u0.jsx(he,{for:"chat-textarea",children:c("customerViewSendingDisabledTooltip",{defaultValue:"Sending messages is disabled while in Customer View."})}),u0.jsx("div",{className:Y1("send-message-button",O2({padding:"sm"})),children:u0.jsx(U1,{kind:"confirm",icon:"paper-plane",onClick:()=>d(),disabled:o.length<1||p,title:"Send Message","aria-label":"Send Message"})})]}),u0.jsx("p",{className:"sps-input__additional-text",style:{textAlign:"right"},children:c("aiDisclaimer",{defaultValue:"AI-generated guidance only. Please review and verify before acting."})})]})}const q20={COMMERCE_PLATFORM_DOMAINS:{local:"https://localhost:9300",test:"https://test.commerce.spscommerce.com",prod:"https://commerce.spscommerce.com"}};function S20({token:e,currentUser:t,hideAgentPanel:o,isAgentPanelOpen:n,isInCustomerView:s,flags:a,env:r,currentApp:i,context:c,currentConversationId:l="",locale:p="en-US"}){const d=h.useMemo(()=>new gE(r,e),[r]);return h.useEffect(()=>{d.setToken(e)},[e,d]),u0.jsxs(p20,{token:e,env:r,currentUser:t,flags:a,isInCustomerView:s,agentApiService:d,hideAgentPanelCallback:o,isAgentPanelOpenProp:n,currentApp:i,currentConversationId:l,children:[u0.jsx(z7,{}),u0.jsx(y20,{context:c,locale:p})]})}function y20({context:e,locale:t}){const{agentApiService:o,currentUser:n,flags:s,isInCustomerView:a,hideAgentPanel:r,currentConversationId:i,lastSentUserMessage:c,usageStatus:l,userHasAgentPerms:p,isInPreprod:d,updateIsInPreprod:b,showAgentPanel:M,isAgentPanelOpen:f}=pn(),{error:m,loading:O,isAgentThinking:g,messages:C,displayedMessages:E,hasMoreMessages:L,loadOlderMessages:T,isLoadingOlderMessages:I,streamingResponse:Q,sendMessage:z,startNewConversation:x,loadConversation:q,conversationList:R,fetchConversationList:H,sendFeedback:w,fetchMessagePair:N,retrySendMessage:v,messageHasBeenSent:V,fetchUsageStatus:F,doesUserHaveAgentPerms:$}=$k(o,e),{t:t0}=Zn(t),[B,o0]=h.useState(!1),[a0,D]=h.useState(!1),[Y,j]=h.useState(""),G=h.useMemo(()=>({a({children:c0,href:z0,...W0}){if(typeof z0!="string"||!z0.trim())return u0.jsx("span",{children:c0});try{const g0=new URL(z0);return g0.protocol!=="http:"&&g0.protocol!=="https:"?u0.jsx("span",{children:c0}):(Object.values(q20.COMMERCE_PLATFORM_DOMAINS).includes(g0.origin)&&i?.length&&g0.searchParams.set("conversationId",i),u0.jsx("a",{href:g0.toString(),...W0,target:"_blank",rel:"noopener noreferrer",children:c0}))}catch(g0){return console.warn("Failed to parse URL in agent response",z0,g0),u0.jsx("span",{children:c0})}}}),[i]);h.useEffect(()=>{$();const c0=W0=>{M(),x(),z(W0.detail.message,!0)},z0=W0=>{const{detail:g0}=W0;typeof g0=="boolean"&&b(g0)};return window.addEventListener("initiateAgentConversation",c0),window.addEventListener("setPreprod",z0),()=>{window.removeEventListener("initiateAgentConversation",c0),window.removeEventListener("setPreprod",z0)}},[]),h.useEffect(()=>{F(),i&&q(i)},[a0,i,F,q]);const s0=h.useCallback(async c0=>{c0&&await z(c0,!1)},[z]),p0=h.useRef(null),C0=h.useRef(null),f0=h.useRef(!1),d0=h.useRef(0),O0=h.useRef(null),X=h.useRef(T);X.current=T;const b0=h.useCallback(()=>{const c0=p0.current;c0&&(c0.scrollTop=0)},[]);return h.useEffect(()=>{b0()},[C.length,b0]),h.useLayoutEffect(()=>{const c0=p0.current;!c0||!f0.current||I||(O0.current!==null&&(c0.scrollTop=O0.current,O0.current=null),setTimeout(()=>{f0.current=!1},200))},[E.length,I]),h.useEffect(()=>{C.length>d0.current&&(f0.current||b0(),setTimeout(()=>{f0.current=!1},200)),d0.current=C.length},[C.length,b0]),h.useEffect(()=>{const c0=C0.current,z0=p0.current;if(!c0||!z0||!L)return;const W0=new IntersectionObserver(g0=>{g0[0].isIntersecting&&!f0.current&&(f0.current=!0,O0.current=z0.scrollTop,X.current())},{root:z0,threshold:0});return W0.observe(c0),()=>W0.disconnect()},[L]),f&&u0.jsxs("div",{className:Y1("agent-panel",a&&"agent-panel--customer-view",B&&"agent-panel--expanded"),children:[u0.jsxs("div",{className:"title-bar",children:[u0.jsx("div",{children:u0.jsx(U1,{icon:B?"arrow-right":"arrow-left",kind:"icon",onClick:()=>o0(!B),className:O2({mr:"sm"})})}),u0.jsx("div",{className:"title",children:u0.jsxs("p",{children:["MAX ",s?.agentBeta&&u0.jsx("span",{className:"beta-text",children:"(BETA)"})]})}),u0.jsxs("div",{children:[u0.jsx(U1,{className:O2({mr:"md"}),kind:"link",icon:a0?"arrow-left":"conversation",onClick:()=>{$o.clarity.setEvent("View conversation list"),H(),D(c0=>!c0)},children:a0?t0("backToChat",{defaultValue:"Back to Chat"}):t0("conversations",{defaultValue:"Conversations"})}),u0.jsx(U1,{className:O2({mr:"md"}),kind:"link",icon:"plus-sign",onClick:()=>{$o.clarity.setEvent("Start new conversation"),D(!1),x()},children:t0("new",{defaultValue:"New"})}),u0.jsx(R5,{}),u0.jsx(U1,{kind:"icon",icon:"x",onClick:()=>{r(),o0(!1)}})]})]}),u0.jsxs("div",{className:"title-bar-short",children:[u0.jsx("div",{children:u0.jsx(U1,{icon:B?"arrow-right":"arrow-left",kind:"icon",onClick:()=>o0(!B),className:O2({mr:"sm"})})}),u0.jsx("div",{className:"title",children:u0.jsxs("p",{children:["MAX ",s?.agentBeta&&u0.jsx("span",{className:"beta-text",children:"(BETA)"})]})}),u0.jsxs("div",{style:{flex:1,textAlign:"right"},children:[u0.jsx(U1,{className:O2({mr:"md",color:"blue-medium"}),kind:"icon",icon:a0?"arrow-left":"conversation",title:a0?"Back to Chat":"Conversations",onClick:()=>{$o.clarity.setEvent("View conversation list"),H(),D(c0=>!c0)}}),u0.jsx(U1,{className:O2({mr:"md",color:"blue-medium"}),kind:"icon",icon:"plus-sign",title:"New Chat",onClick:()=>{$o.clarity.setEvent("Start new conversation"),D(!1),x()}}),u0.jsx(R5,{}),u0.jsx(U1,{kind:"icon",icon:"x",onClick:()=>{r(),o0(!1)}})]})]}),a0?u0.jsx(JU,{conversations:R,setShowConversationList:D,onLoadConversation:q,onRefreshConversationList:H,onLoading:O,isInCustomerView:a}):u0.jsxs(u0.Fragment,{children:[u0.jsx("div",{ref:p0,className:"conversation-section-wrapper",style:{flex:1},children:O?u0.jsx(_o,{style:{margin:"auto"}}):u0.jsxs(u0.Fragment,{children:[u0.jsxs("div",{className:"conversation-section",children:[p?u0.jsxs(u0.Fragment,{children:[u0.jsx(zc,{children:`${t0("hello",{defaultValue:"Hello"})}${n?.acting_entity?.user_info?.first_name?` ${n.acting_entity.user_info.first_name}`:""}! ${t0("greetingMessage",{defaultValue:"I'm MAX, your AI Assistant. I can help you with questions about retailers, how to use our products, troubleshooting, searching your data, and more. Let me know how I can help."})}`}),u0.jsx(cd,{onClick:()=>z("Show me how you can help",!1),children:t0("showMeHowYouCanHelp",{defaultValue:"Show me how you can help"})}),u0.jsx(cd,{onClick:()=>z("What orders did I receive this week?",!1),children:t0("whatOrdersDidIReceiveThisWeek",{defaultValue:"What orders did I receive this week?"})}),L&&u0.jsx("div",{ref:C0,style:{height:1}}),I&&u0.jsx("div",{style:{textAlign:"center",padding:"8px"},children:u0.jsx(_o,{size:"sm"})}),E.map((c0,z0)=>{const W0=c0.id??`msg-${c0.role}-${z0}`;return c0.role==="user"?u0.jsx(cK,{isObo:c0.obo,children:u0.jsx(uu,{content:c0.content,components:G})},W0):u0.jsx(zc,{message:c0,sendFeedback:w,fetchMessagePair:N,handleSendMessage:s0,children:u0.jsx(uu,{content:c0.content,components:G,useRehypeRaw:!0})},W0)})]}):u0.jsx(id,{artwork:dB,heading:t0("missingPermissionsErrorHeading",{defaultValue:"Almost there"}),subHeading:t0("missingPermissionsErrorSubheading",{defaultValue:"You'll need your admin to grant access before you can use this."})}),m&&u0.jsx(id,{artwork:uB,heading:t0("genericErrorHeading",{defaultValue:"Something went wrong while processing your request."}),subHeading:t0("genericErrorSubheading",{defaultValue:"Please try again in a moment."}),children:c&&u0.jsx(U1,{kind:"link",icon:"redo",onClick:v,children:t0("retry",{defaultValue:"Retry"})})}),u0.jsx(i20,{streamingResponse:Q,isAgentThinking:g,markdownComponents:G})]}),!i&&!V&&p&&u0.jsxs("div",{className:"welcome-graphic",children:[u0.jsx("div",{children:u0.jsx("img",{src:Nu,alt:"AI assistant welcome animation",width:120,height:120,className:O2({mb:"md"})})}),u0.jsx("h1",{children:t0("welcomeMessage",{defaultValue:"What should we get done today?"})})]})]})}),u0.jsxs("div",{className:"message-section",children:[l==="restricted"&&u0.jsx(Ac,{kind:"error",children:t0("restrictedErrorMessage",{defaultValue:"I want to flag that this request isn't something I can help with. Repeated requests like this may affect your account."})}),l==="limited"&&u0.jsx(Ac,{kind:"warning",children:t0("usageLimitErrorMessage",{defaultValue:"You have reached today's usage limit. Please try again tomorrow."})}),d&&u0.jsx(Ac,{kind:"warning",children:t0("preprodErrorMessage",{defaultValue:"MAX is unavailable in the Preprod environment."})}),u0.jsx(w20,{onSendMessage:z,message:Y,setMessage:j,isMessageLoading:g||!!(Q&&Q.length>0)})]})]})]})}Ae.ANIMATED_LOGO=Nu,Ae.BETA_LOGO=Du,Ae.COLOR_LOGO=xu,Ae.MaxPanel=S20,Object.defineProperty(Ae,Symbol.toStringTag,{value:"Module"})}));
13420
+ `,t);return n===-1?o:o===-1||o+1===n?n:o<n?o:n}const Xo={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/"},Um={}.hasOwnProperty,o$=Object.prototype;function n$(e,t){const o=t||{};return eu({file:o.file||void 0,location:!1,schema:o.space==="svg"?ro:Ta,verbose:o.verbose||!1},e)}function eu(e,t){let o;switch(t.nodeName){case"#comment":{const n=t;return o={type:"comment",value:n.data},Nc(e,n,o),o}case"#document":case"#document-fragment":{const n=t,s="mode"in n?n.mode==="quirks"||n.mode==="limited-quirks":!1;if(o={type:"root",children:Km(e,t.childNodes),data:{quirksMode:s}},e.file&&e.location){const a=String(e.file),r=t$(a),i=r.toPoint(0),c=r.toPoint(a.length);o.position={start:i,end:c}}return o}case"#documentType":{const n=t;return o={type:"doctype"},Nc(e,n,o),o}case"#text":{const n=t;return o={type:"text",value:n.value},Nc(e,n,o),o}default:return o=s$(e,t),o}}function Km(e,t){let o=-1;const n=[];for(;++o<t.length;){const s=eu(e,t[o]);n.push(s)}return n}function s$(e,t){const o=e.schema;e.schema=t.namespaceURI===Xo.svg?ro:Ta;let n=-1;const s={};for(;++n<t.attrs.length;){const i=t.attrs[n],c=(i.prefix?i.prefix+":":"")+i.name;Um.call(o$,c)||(s[c]=i.value)}const r=(e.schema.space==="svg"?e$:$J)(t.tagName,s,Km(e,t.childNodes));if(Nc(e,t,r),r.tagName==="template"){const i=t,c=i.sourceCodeLocation,l=c&&c.startTag&&rs(c.startTag),p=c&&c.endTag&&rs(c.endTag),d=eu(e,i.content);l&&p&&e.file&&(d.position={start:l.end,end:p.start}),r.content=d}return e.schema=o,r}function Nc(e,t,o){if("sourceCodeLocation"in t&&t.sourceCodeLocation&&e.file){const n=a$(e,o,t.sourceCodeLocation);n&&(e.location=!0,o.position=n)}}function a$(e,t,o){const n=rs(o);if(t.type==="element"){const s=t.children[t.children.length-1];if(n&&!o.endTag&&s&&s.position&&s.position.end&&(n.end=Object.assign({},s.position.end)),e.verbose){const a={};let r;if(o.attrs)for(r in o.attrs)Um.call(o.attrs,r)&&(a[mc(e.schema,r).property]=rs(o.attrs[r]));o.startTag;const i=rs(o.startTag),c=o.endTag?rs(o.endTag):void 0,l={opening:i};c&&(l.closing=c),l.properties=a,t.data={position:l}}}return n}function rs(e){const t=jm({line:e.startLine,column:e.startCol,offset:e.startOffset}),o=jm({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||o?{start:t,end:o}:void 0}function jm(e){return e.line&&e.column?e:void 0}const r$={},i$={}.hasOwnProperty,Gm=fm("type",{handlers:{root:l$,element:h$,text:u$,comment:b$,doctype:d$}});function c$(e,t){const n=(t||r$).space;return Gm(e,n==="svg"?ro:Ta)}function l$(e,t){const o={nodeName:"#document",mode:(e.data||{}).quirksMode?"quirks":"no-quirks",childNodes:[]};return o.childNodes=tu(e.children,o,t),is(e,o),o}function p$(e,t){const o={nodeName:"#document-fragment",childNodes:[]};return o.childNodes=tu(e.children,o,t),is(e,o),o}function d$(e){const t={nodeName:"#documentType",name:"html",publicId:"",systemId:"",parentNode:null};return is(e,t),t}function u$(e){const t={nodeName:"#text",value:e.value,parentNode:null};return is(e,t),t}function b$(e){const t={nodeName:"#comment",data:e.value,parentNode:null};return is(e,t),t}function h$(e,t){const o=t;let n=o;e.type==="element"&&e.tagName.toLowerCase()==="svg"&&o.space==="html"&&(n=ro);const s=[];let a;if(e.properties){for(a in e.properties)if(a!=="children"&&i$.call(e.properties,a)){const c=M$(n,a,e.properties[a]);c&&s.push(c)}}const r=n.space,i={nodeName:e.tagName,tagName:e.tagName,attrs:s,namespaceURI:Xo[r],childNodes:[],parentNode:null};return i.childNodes=tu(e.children,i,n),is(e,i),e.tagName==="template"&&e.content&&(i.content=p$(e.content,n)),i}function M$(e,t,o){const n=mc(e,t);if(o===!1||o===null||o===void 0||typeof o=="number"&&Number.isNaN(o)||!o&&n.boolean)return;Array.isArray(o)&&(o=n.commaSeparated?V7(o):nA(o));const s={name:n.attribute,value:o===!0?"":String(o)};if(n.space&&n.space!=="html"&&n.space!=="svg"){const a=s.name.indexOf(":");a<0?s.prefix="":(s.name=s.name.slice(a+1),s.prefix=n.attribute.slice(0,a)),s.namespace=Xo[n.space]}return s}function tu(e,t,o){let n=-1;const s=[];if(e)for(;++n<e.length;){const a=Gm(e[n],o);a.parentNode=t,s.push(a)}return s}function is(e,t){const o=e.position;o&&o.start&&o.end&&(o.start.offset,o.end.offset,t.sourceCodeLocation={startLine:o.start.line,startCol:o.start.column,startOffset:o.start.offset,endLine:o.end.line,endCol:o.end.column,endOffset:o.end.offset})}const f$=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"],_$=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]),Z1="�";var U;(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"})(U||(U={}));const G2={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function Ym(e){return e>=55296&&e<=57343}function z$(e){return e>=56320&&e<=57343}function A$(e,t){return(e-55296)*1024+9216+t}function Xm(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function Zm(e){return e>=64976&&e<=65007||_$.has(e)}var M0;(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"})(M0||(M0={}));const m$=65536;class O${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=m$,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,o){const{line:n,col:s,offset:a}=this,r=s+o,i=a+o;return{code:t,startLine:n,endLine:n,startCol:r,endCol:r,startOffset:i,endOffset:i}}_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 o=this.html.charCodeAt(this.pos+1);if(z$(o))return this.pos++,this._addGap(),A$(t,o)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,U.EOF;return this._err(M0.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,o){this.html.length>0?this.html+=t:this.html=t,this.endOfChunkHit=!1,this.lastChunkWritten=o}insertHtmlAtCurrentPos(t){this.html=this.html.substring(0,this.pos+1)+t+this.html.substring(this.pos+1),this.endOfChunkHit=!1}startsWith(t,o){if(this.pos+t.length>this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,!1;if(o)return this.html.startsWith(t,this.pos);for(let n=0;n<t.length;n++)if((this.html.charCodeAt(this.pos+n)|32)!==t.charCodeAt(n))return!1;return!0}peek(t){const o=this.pos+t;if(o>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,U.EOF;const n=this.html.charCodeAt(o);return n===U.CARRIAGE_RETURN?U.LINE_FEED:n}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,U.EOF;let t=this.html.charCodeAt(this.pos);return t===U.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,U.LINE_FEED):t===U.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,Ym(t)&&(t=this._processSurrogate(t)),this.handler.onParseError===null||t>31&&t<127||t===U.LINE_FEED||t===U.CARRIAGE_RETURN||t>159&&t<64976||this._checkForProblematicCharacters(t),t)}_checkForProblematicCharacters(t){Xm(t)?this._err(M0.controlCharacterInInputStream):Zm(t)&&this._err(M0.noncharacterInInputStream)}retreat(t){for(this.pos-=t;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}}var p1;(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"})(p1||(p1={}));function Jm(e,t){for(let o=e.attrs.length-1;o>=0;o--)if(e.attrs[o].name===t)return e.attrs[o].value;return null}const g$=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏ੊ઑඡ๭༉༦჊ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ὾⁠↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms„‹•˜¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲ΂ϏϢϸontourIntegraìȹoɴ͹\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՗՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲ׌y;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱cò׋؀JTabcdfgorstר׬ׯ׺؀ؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d׷׸䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇܎ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ޷޼߂ߐĀiyޱ޵rc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄΀HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶߻dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣ঳সে্਷ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗ࡜ࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४Ānrࢃ࢏gleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpw৔ਖਛgȀLRlr৞৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼੝੠੷੼અઋ઎p;椅y;䐜Ādl੥੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑ඗ඞcy;䐊cute;䅃ƀaey઴હાron;䅇dil;䅅;䐝ƀgswે૰଎ativeƀMTV૓૟૨ediumSpace;怋hiĀcn૦૘ë૙eryThiî૙tedĀGL૸ଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷ଺reak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪୼஡௫ఄ౞಄ದ೘ൡඅ櫬Āou୛୤ngruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊ஛ement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater΀;EFGLSTஶஷ஽௉௓௘௥扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲௽ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ೒拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨೹setĀ;E೰ೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂ෉෕ෛ෠෧෼ขภยา฿ไlig;䅒cute耻Ó䃓Āiy෎ීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲ෶cr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬื฼de耻Õ䃕es;樷ml耻Ö䃖erĀBP๋๠Āar๐๓r;怾acĀek๚๜;揞et;掴arenthesis;揜Ҁacfhilors๿ງຊຏຒດຝະ໼rtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ໠໤檻cedesȀ;EST່້໏໚扺qual;檯lantEqual;扼ilde;找me;怳Ādp໩໮uct;戏ortionĀ;aȥ໹l;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬؀BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁࿫࿳ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL࿜࿝࿡憒ar;懥eftArrow;懄eiling;按oǵ࿹\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»࿝pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄ቉ቕ቞ቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHc቎ቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗Āeiቻ኉Dzኀ\0ኇefore;戴a;䎘Ācn኎ኘkSpace;쀀  Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0᏿ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0጖y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻፿on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtè૙a;䎖r;愨pf;愤cr;쀀𝒵௡ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚΀;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒΀;Eaeiop዁ᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;e዁ᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;e዁ᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰ᜼ᝃᝈ᝸᝽០៦ᠹᡐᜍ᤽᥈ᥰot;櫭Ācrᛶ᜞kȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e᜚᜛戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;t፜᜷brk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓ᝛ᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯ᝱ᝳ;䎲;愶een;扬r;쀀𝔟g΀costuvwឍឝឳេ៕៛៞ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀako៭ᠦᠵĀcn៲ᠣkƀlst៺֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘᠝斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈؀DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬ᣿ᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教΀;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ᣷᣹᣻᣽;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ᤟;敛;敘;攘;攔΀;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģ᥂bar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;e᜚᜜lƀ;bhᥨᥩᥫ䁜;槅sub;柈Ŭᥴ᥾lĀ;e᥹᥺怢t»᥺pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭍᭒\0᯽\0ᰌƀcpr᦭ᦲ᧝ute;䄇̀;abcdsᦿᧀᧄ᧊᧕᧙戩nd;橄rcup;橉Āau᧏᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r΀;Ecefms᩟᩠ᩢᩫ᪤᪪᪮旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖᪚᪟»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇᫔᫺\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ᫙\0\0᫢aĀ;t᫞᫟䀬;䁀ƀ;fl᫨᫩᫫戁îᅠeĀmx᫱᫶ent»᫩eóɍǧ᫾\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯΀delprvw᭠᭬᭷ᮂᮬᯔ᯹arrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;p᭿ᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰸᰻᰿ᱝᱩᱵᲊᲞᲬᲷ᳻᳿ᴍᵻᶑᶫᶻ᷆᷍rò΁ar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂͸᳖᳜᳠mƀ;oș᳊᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄ὎὚ĀDoḆᴴoôᲉĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»Ṻƀaeiἒ἖Ἒls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙ῜ῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao‌⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧‪‬\0‮耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₟₥₰₴⃰⃵⃺⃿℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕ₝ute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽⃉ƀ;qsؾٌ⃄lanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqr׮ⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0↎proø₞r;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢␧␭␱␵␻ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀஀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼rò৆òΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonó྘quigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d྘➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ᠛旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐௏쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop඄⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roø඄urĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓΀;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨í஘istĀ;s஠டr;쀀𝔫ȀEest௅⩦⩹⩼ƀ;qs஼⩭௡ƀ;qs஼௅⩴lanô௢ií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚΀AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs఻⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs఻⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast୻⭕⭚⭟lleì୻l;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖ΀chimpqu⮽⯍⯙⬄୸⯤⯯Ȁ;cerല⯆ഷ⯉uå൅;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭å೸åഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñ೗Ā;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰⳴ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥ⵲ⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;c᪞ⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācr⵩⵭ir;榿;쀀𝔬ͯ⵹\0\0⵼\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕ⶘ⶥⶨrò᪀Āir⶝ⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔ⷗ǒr;榷rp;榹΀;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ⹞\0⹽\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ⹧⹲຅脀¶;l⹭⹮䂶leìЃɩ⹸\0\0⹻m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳⻴ᤈ⻹⻽⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp໬⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t໻⾴ï໻rel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⿚⋢⿟⿥⿫⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei⿾々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔઀ABHabcdefhilmnoprstux぀けさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤΀cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstw࿜ガクシスゼゾダッデナp;極Ā;f࿠ゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes㄂㄄;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ì࿲âヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘㇤㇮rrowĀ;t࿜ㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowó࿪arpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓rò࿪aòՑ;怏oustĀ;a㈞㈟掱che»㈟mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦΀Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼਴t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì⹯耻­䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;q኱ኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫ਩war;椪lig耻ß䃟௡㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rë๟ƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproø዁im»ኬsðኞĀas㚺㚮ð዁rn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈ΀adempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xô᝷headĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜΀eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roð໻tré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚΀cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜ៟tré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map(e=>e.charCodeAt(0))),C$=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 k$(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=C$.get(e))!==null&&t!==void 0?t:e}var _2;(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"})(_2||(_2={}));const v$=32;var lo;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(lo||(lo={}));function ou(e){return e>=_2.ZERO&&e<=_2.NINE}function E$(e){return e>=_2.UPPER_A&&e<=_2.UPPER_F||e>=_2.LOWER_A&&e<=_2.LOWER_F}function w$(e){return e>=_2.UPPER_A&&e<=_2.UPPER_Z||e>=_2.LOWER_A&&e<=_2.LOWER_Z||ou(e)}function q$(e){return e===_2.EQUALS||w$(e)}var z2;(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"})(z2||(z2={}));var wt;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(wt||(wt={}));class S${constructor(t,o,n){this.decodeTree=t,this.emitCodePoint=o,this.errors=n,this.state=z2.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=wt.Strict}startEntity(t){this.decodeMode=t,this.state=z2.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,o){switch(this.state){case z2.EntityStart:return t.charCodeAt(o)===_2.NUM?(this.state=z2.NumericStart,this.consumed+=1,this.stateNumericStart(t,o+1)):(this.state=z2.NamedEntity,this.stateNamedEntity(t,o));case z2.NumericStart:return this.stateNumericStart(t,o);case z2.NumericDecimal:return this.stateNumericDecimal(t,o);case z2.NumericHex:return this.stateNumericHex(t,o);case z2.NamedEntity:return this.stateNamedEntity(t,o)}}stateNumericStart(t,o){return o>=t.length?-1:(t.charCodeAt(o)|v$)===_2.LOWER_X?(this.state=z2.NumericHex,this.consumed+=1,this.stateNumericHex(t,o+1)):(this.state=z2.NumericDecimal,this.stateNumericDecimal(t,o))}addToNumericResult(t,o,n,s){if(o!==n){const a=n-o;this.result=this.result*Math.pow(s,a)+Number.parseInt(t.substr(o,a),s),this.consumed+=a}}stateNumericHex(t,o){const n=o;for(;o<t.length;){const s=t.charCodeAt(o);if(ou(s)||E$(s))o+=1;else return this.addToNumericResult(t,n,o,16),this.emitNumericEntity(s,3)}return this.addToNumericResult(t,n,o,16),-1}stateNumericDecimal(t,o){const n=o;for(;o<t.length;){const s=t.charCodeAt(o);if(ou(s))o+=1;else return this.addToNumericResult(t,n,o,10),this.emitNumericEntity(s,2)}return this.addToNumericResult(t,n,o,10),-1}emitNumericEntity(t,o){var n;if(this.consumed<=o)return(n=this.errors)===null||n===void 0||n.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(t===_2.SEMI)this.consumed+=1;else if(this.decodeMode===wt.Strict)return 0;return this.emitCodePoint(k$(this.result),this.consumed),this.errors&&(t!==_2.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(t,o){const{decodeTree:n}=this;let s=n[this.treeIndex],a=(s&lo.VALUE_LENGTH)>>14;for(;o<t.length;o++,this.excess++){const r=t.charCodeAt(o);if(this.treeIndex=y$(n,s,this.treeIndex+Math.max(1,a),r),this.treeIndex<0)return this.result===0||this.decodeMode===wt.Attribute&&(a===0||q$(r))?0:this.emitNotTerminatedNamedEntity();if(s=n[this.treeIndex],a=(s&lo.VALUE_LENGTH)>>14,a!==0){if(r===_2.SEMI)return this.emitNamedEntityData(this.treeIndex,a,this.consumed+this.excess);this.decodeMode!==wt.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var t;const{result:o,decodeTree:n}=this,s=(n[o]&lo.VALUE_LENGTH)>>14;return this.emitNamedEntityData(o,s,this.consumed),(t=this.errors)===null||t===void 0||t.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(t,o,n){const{decodeTree:s}=this;return this.emitCodePoint(o===1?s[t]&~lo.VALUE_LENGTH:s[t+1],n),o===3&&this.emitCodePoint(s[t+2],n),n}end(){var t;switch(this.state){case z2.NamedEntity:return this.result!==0&&(this.decodeMode!==wt.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case z2.NumericDecimal:return this.emitNumericEntity(0,2);case z2.NumericHex:return this.emitNumericEntity(0,3);case z2.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case z2.EntityStart:return 0}}}function y$(e,t,o,n){const s=(t&lo.BRANCH_LENGTH)>>7,a=t&lo.JUMP_TABLE;if(s===0)return a!==0&&n===a?o:-1;if(a){const c=n-a;return c<0||c>=s?-1:e[o+c]-1}let r=o,i=r+s-1;for(;r<=i;){const c=r+i>>>1,l=e[c];if(l<n)r=c+1;else if(l>n)i=c-1;else return e[c+s]}return-1}var E0;(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/"})(E0||(E0={}));var Zo;(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"})(Zo||(Zo={}));var _e;(function(e){e.NO_QUIRKS="no-quirks",e.QUIRKS="quirks",e.LIMITED_QUIRKS="limited-quirks"})(_e||(_e={}));var l0;(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"})(l0||(l0={}));var A;(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"})(A||(A={}));const R$=new Map([[l0.A,A.A],[l0.ADDRESS,A.ADDRESS],[l0.ANNOTATION_XML,A.ANNOTATION_XML],[l0.APPLET,A.APPLET],[l0.AREA,A.AREA],[l0.ARTICLE,A.ARTICLE],[l0.ASIDE,A.ASIDE],[l0.B,A.B],[l0.BASE,A.BASE],[l0.BASEFONT,A.BASEFONT],[l0.BGSOUND,A.BGSOUND],[l0.BIG,A.BIG],[l0.BLOCKQUOTE,A.BLOCKQUOTE],[l0.BODY,A.BODY],[l0.BR,A.BR],[l0.BUTTON,A.BUTTON],[l0.CAPTION,A.CAPTION],[l0.CENTER,A.CENTER],[l0.CODE,A.CODE],[l0.COL,A.COL],[l0.COLGROUP,A.COLGROUP],[l0.DD,A.DD],[l0.DESC,A.DESC],[l0.DETAILS,A.DETAILS],[l0.DIALOG,A.DIALOG],[l0.DIR,A.DIR],[l0.DIV,A.DIV],[l0.DL,A.DL],[l0.DT,A.DT],[l0.EM,A.EM],[l0.EMBED,A.EMBED],[l0.FIELDSET,A.FIELDSET],[l0.FIGCAPTION,A.FIGCAPTION],[l0.FIGURE,A.FIGURE],[l0.FONT,A.FONT],[l0.FOOTER,A.FOOTER],[l0.FOREIGN_OBJECT,A.FOREIGN_OBJECT],[l0.FORM,A.FORM],[l0.FRAME,A.FRAME],[l0.FRAMESET,A.FRAMESET],[l0.H1,A.H1],[l0.H2,A.H2],[l0.H3,A.H3],[l0.H4,A.H4],[l0.H5,A.H5],[l0.H6,A.H6],[l0.HEAD,A.HEAD],[l0.HEADER,A.HEADER],[l0.HGROUP,A.HGROUP],[l0.HR,A.HR],[l0.HTML,A.HTML],[l0.I,A.I],[l0.IMG,A.IMG],[l0.IMAGE,A.IMAGE],[l0.INPUT,A.INPUT],[l0.IFRAME,A.IFRAME],[l0.KEYGEN,A.KEYGEN],[l0.LABEL,A.LABEL],[l0.LI,A.LI],[l0.LINK,A.LINK],[l0.LISTING,A.LISTING],[l0.MAIN,A.MAIN],[l0.MALIGNMARK,A.MALIGNMARK],[l0.MARQUEE,A.MARQUEE],[l0.MATH,A.MATH],[l0.MENU,A.MENU],[l0.META,A.META],[l0.MGLYPH,A.MGLYPH],[l0.MI,A.MI],[l0.MO,A.MO],[l0.MN,A.MN],[l0.MS,A.MS],[l0.MTEXT,A.MTEXT],[l0.NAV,A.NAV],[l0.NOBR,A.NOBR],[l0.NOFRAMES,A.NOFRAMES],[l0.NOEMBED,A.NOEMBED],[l0.NOSCRIPT,A.NOSCRIPT],[l0.OBJECT,A.OBJECT],[l0.OL,A.OL],[l0.OPTGROUP,A.OPTGROUP],[l0.OPTION,A.OPTION],[l0.P,A.P],[l0.PARAM,A.PARAM],[l0.PLAINTEXT,A.PLAINTEXT],[l0.PRE,A.PRE],[l0.RB,A.RB],[l0.RP,A.RP],[l0.RT,A.RT],[l0.RTC,A.RTC],[l0.RUBY,A.RUBY],[l0.S,A.S],[l0.SCRIPT,A.SCRIPT],[l0.SEARCH,A.SEARCH],[l0.SECTION,A.SECTION],[l0.SELECT,A.SELECT],[l0.SOURCE,A.SOURCE],[l0.SMALL,A.SMALL],[l0.SPAN,A.SPAN],[l0.STRIKE,A.STRIKE],[l0.STRONG,A.STRONG],[l0.STYLE,A.STYLE],[l0.SUB,A.SUB],[l0.SUMMARY,A.SUMMARY],[l0.SUP,A.SUP],[l0.TABLE,A.TABLE],[l0.TBODY,A.TBODY],[l0.TEMPLATE,A.TEMPLATE],[l0.TEXTAREA,A.TEXTAREA],[l0.TFOOT,A.TFOOT],[l0.TD,A.TD],[l0.TH,A.TH],[l0.THEAD,A.THEAD],[l0.TITLE,A.TITLE],[l0.TR,A.TR],[l0.TRACK,A.TRACK],[l0.TT,A.TT],[l0.U,A.U],[l0.UL,A.UL],[l0.SVG,A.SVG],[l0.VAR,A.VAR],[l0.WBR,A.WBR],[l0.XMP,A.XMP]]);function cs(e){var t;return(t=R$.get(e))!==null&&t!==void 0?t:A.UNKNOWN}const w0=A,B$={[E0.HTML]:new Set([w0.ADDRESS,w0.APPLET,w0.AREA,w0.ARTICLE,w0.ASIDE,w0.BASE,w0.BASEFONT,w0.BGSOUND,w0.BLOCKQUOTE,w0.BODY,w0.BR,w0.BUTTON,w0.CAPTION,w0.CENTER,w0.COL,w0.COLGROUP,w0.DD,w0.DETAILS,w0.DIR,w0.DIV,w0.DL,w0.DT,w0.EMBED,w0.FIELDSET,w0.FIGCAPTION,w0.FIGURE,w0.FOOTER,w0.FORM,w0.FRAME,w0.FRAMESET,w0.H1,w0.H2,w0.H3,w0.H4,w0.H5,w0.H6,w0.HEAD,w0.HEADER,w0.HGROUP,w0.HR,w0.HTML,w0.IFRAME,w0.IMG,w0.INPUT,w0.LI,w0.LINK,w0.LISTING,w0.MAIN,w0.MARQUEE,w0.MENU,w0.META,w0.NAV,w0.NOEMBED,w0.NOFRAMES,w0.NOSCRIPT,w0.OBJECT,w0.OL,w0.P,w0.PARAM,w0.PLAINTEXT,w0.PRE,w0.SCRIPT,w0.SECTION,w0.SELECT,w0.SOURCE,w0.STYLE,w0.SUMMARY,w0.TABLE,w0.TBODY,w0.TD,w0.TEMPLATE,w0.TEXTAREA,w0.TFOOT,w0.TH,w0.THEAD,w0.TITLE,w0.TR,w0.TRACK,w0.UL,w0.WBR,w0.XMP]),[E0.MATHML]:new Set([w0.MI,w0.MO,w0.MN,w0.MS,w0.MTEXT,w0.ANNOTATION_XML]),[E0.SVG]:new Set([w0.TITLE,w0.FOREIGN_OBJECT,w0.DESC]),[E0.XLINK]:new Set,[E0.XML]:new Set,[E0.XMLNS]:new Set},nu=new Set([w0.H1,w0.H2,w0.H3,w0.H4,w0.H5,w0.H6]);l0.STYLE,l0.SCRIPT,l0.XMP,l0.IFRAME,l0.NOEMBED,l0.NOFRAMES,l0.PLAINTEXT;var K;(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"})(K||(K={}));const r2={DATA:K.DATA,RCDATA:K.RCDATA,RAWTEXT:K.RAWTEXT,SCRIPT_DATA:K.SCRIPT_DATA,PLAINTEXT:K.PLAINTEXT,CDATA_SECTION:K.CDATA_SECTION};function W$(e){return e>=U.DIGIT_0&&e<=U.DIGIT_9}function Ka(e){return e>=U.LATIN_CAPITAL_A&&e<=U.LATIN_CAPITAL_Z}function L$(e){return e>=U.LATIN_SMALL_A&&e<=U.LATIN_SMALL_Z}function po(e){return L$(e)||Ka(e)}function $m(e){return po(e)||W$(e)}function xc(e){return e+32}function eO(e){return e===U.SPACE||e===U.LINE_FEED||e===U.TABULATION||e===U.FORM_FEED}function tO(e){return eO(e)||e===U.SOLIDUS||e===U.GREATER_THAN_SIGN}function T$(e){return e===U.NULL?M0.nullCharacterReference:e>1114111?M0.characterReferenceOutsideUnicodeRange:Ym(e)?M0.surrogateCharacterReference:Zm(e)?M0.noncharacterCharacterReference:Xm(e)||e===U.CARRIAGE_RETURN?M0.controlCharacterReference:null}class I${constructor(t,o){this.options=t,this.handler=o,this.paused=!1,this.inLoop=!1,this.inForeignNode=!1,this.lastStartTagName="",this.active=!1,this.state=K.DATA,this.returnState=K.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new O$(o),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new S$(g$,(n,s)=>{this.preprocessor.pos=this.entityStartPos+s-1,this._flushCodePointConsumedAsCharacterReference(n)},o.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(M0.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:n=>{this._err(M0.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+n)},validateNumericCharacterReference:n=>{const s=T$(n);s&&this._err(s,1)}}:void 0)}_err(t,o=0){var n,s;(s=(n=this.handler).onParseError)===null||s===void 0||s.call(n,this.preprocessor.getError(t,o))}getCurrentLocation(t){return this.options.sourceCodeLocationInfo?{startLine:this.preprocessor.line,startCol:this.preprocessor.col-t,startOffset:this.preprocessor.offset-t,endLine:-1,endCol:-1,endOffset:-1}:null}_runParsingLoop(){if(!this.inLoop){for(this.inLoop=!0;this.active&&!this.paused;){this.consumedAfterSnapshot=0;const t=this._consume();this._ensureHibernation()||this._callState(t)}this.inLoop=!1}}pause(){this.paused=!0}resume(t){if(!this.paused)throw new Error("Parser was already resumed");this.paused=!1,!this.inLoop&&(this._runParsingLoop(),this.paused||t?.())}write(t,o,n){this.active=!0,this.preprocessor.write(t,o),this._runParsingLoop(),this.paused||n?.()}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 o=0;o<t;o++)this.preprocessor.advance()}_consumeSequenceIfMatch(t,o){return this.preprocessor.startsWith(t,o)?(this._advanceBy(t.length-1),!0):!1}_createStartTagToken(){this.currentToken={type:p1.START_TAG,tagName:"",tagID:A.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:p1.END_TAG,tagName:"",tagID:A.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(t){this.currentToken={type:p1.COMMENT,data:"",location:this.getCurrentLocation(t)}}_createDoctypeToken(t){this.currentToken={type:p1.DOCTYPE,name:t,forceQuirks:!1,publicId:null,systemId:null,location:this.currentLocation}}_createCharacterToken(t,o){this.currentCharacterToken={type:t,chars:o,location:this.currentLocation}}_createAttr(t){this.currentAttr={name:t,value:""},this.currentLocation=this.getCurrentLocation(0)}_leaveAttrName(){var t,o;const n=this.currentToken;if(Jm(n,this.currentAttr.name)===null){if(n.attrs.push(this.currentAttr),n.location&&this.currentLocation){const s=(t=(o=n.location).attrs)!==null&&t!==void 0?t:o.attrs=Object.create(null);s[this.currentAttr.name]=this.currentLocation,this._leaveAttrValue()}}else this._err(M0.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=cs(t.tagName),t.type===p1.START_TAG?(this.lastStartTagName=t.tagName,this.handler.onStartTag(t)):(t.attrs.length>0&&this._err(M0.endTagWithAttributes),t.selfClosing&&this._err(M0.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 p1.CHARACTER:{this.handler.onCharacter(this.currentCharacterToken);break}case p1.NULL_CHARACTER:{this.handler.onNullCharacter(this.currentCharacterToken);break}case p1.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:p1.EOF,location:t}),this.active=!1}_appendCharToCurrentCharacterToken(t,o){if(this.currentCharacterToken)if(this.currentCharacterToken.type===t){this.currentCharacterToken.chars+=o;return}else this.currentLocation=this.getCurrentLocation(0),this._emitCurrentCharacterToken(this.currentLocation),this.preprocessor.dropParsedChunk();this._createCharacterToken(t,o)}_emitCodePoint(t){const o=eO(t)?p1.WHITESPACE_CHARACTER:t===U.NULL?p1.NULL_CHARACTER:p1.CHARACTER;this._appendCharToCurrentCharacterToken(o,String.fromCodePoint(t))}_emitChars(t){this._appendCharToCurrentCharacterToken(p1.CHARACTER,t)}_startCharacterReference(){this.returnState=this.state,this.state=K.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?wt.Attribute:wt.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===K.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===K.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===K.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(t){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(t):this._emitCodePoint(t)}_callState(t){switch(this.state){case K.DATA:{this._stateData(t);break}case K.RCDATA:{this._stateRcdata(t);break}case K.RAWTEXT:{this._stateRawtext(t);break}case K.SCRIPT_DATA:{this._stateScriptData(t);break}case K.PLAINTEXT:{this._statePlaintext(t);break}case K.TAG_OPEN:{this._stateTagOpen(t);break}case K.END_TAG_OPEN:{this._stateEndTagOpen(t);break}case K.TAG_NAME:{this._stateTagName(t);break}case K.RCDATA_LESS_THAN_SIGN:{this._stateRcdataLessThanSign(t);break}case K.RCDATA_END_TAG_OPEN:{this._stateRcdataEndTagOpen(t);break}case K.RCDATA_END_TAG_NAME:{this._stateRcdataEndTagName(t);break}case K.RAWTEXT_LESS_THAN_SIGN:{this._stateRawtextLessThanSign(t);break}case K.RAWTEXT_END_TAG_OPEN:{this._stateRawtextEndTagOpen(t);break}case K.RAWTEXT_END_TAG_NAME:{this._stateRawtextEndTagName(t);break}case K.SCRIPT_DATA_LESS_THAN_SIGN:{this._stateScriptDataLessThanSign(t);break}case K.SCRIPT_DATA_END_TAG_OPEN:{this._stateScriptDataEndTagOpen(t);break}case K.SCRIPT_DATA_END_TAG_NAME:{this._stateScriptDataEndTagName(t);break}case K.SCRIPT_DATA_ESCAPE_START:{this._stateScriptDataEscapeStart(t);break}case K.SCRIPT_DATA_ESCAPE_START_DASH:{this._stateScriptDataEscapeStartDash(t);break}case K.SCRIPT_DATA_ESCAPED:{this._stateScriptDataEscaped(t);break}case K.SCRIPT_DATA_ESCAPED_DASH:{this._stateScriptDataEscapedDash(t);break}case K.SCRIPT_DATA_ESCAPED_DASH_DASH:{this._stateScriptDataEscapedDashDash(t);break}case K.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataEscapedLessThanSign(t);break}case K.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:{this._stateScriptDataEscapedEndTagOpen(t);break}case K.SCRIPT_DATA_ESCAPED_END_TAG_NAME:{this._stateScriptDataEscapedEndTagName(t);break}case K.SCRIPT_DATA_DOUBLE_ESCAPE_START:{this._stateScriptDataDoubleEscapeStart(t);break}case K.SCRIPT_DATA_DOUBLE_ESCAPED:{this._stateScriptDataDoubleEscaped(t);break}case K.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:{this._stateScriptDataDoubleEscapedDash(t);break}case K.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:{this._stateScriptDataDoubleEscapedDashDash(t);break}case K.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataDoubleEscapedLessThanSign(t);break}case K.SCRIPT_DATA_DOUBLE_ESCAPE_END:{this._stateScriptDataDoubleEscapeEnd(t);break}case K.BEFORE_ATTRIBUTE_NAME:{this._stateBeforeAttributeName(t);break}case K.ATTRIBUTE_NAME:{this._stateAttributeName(t);break}case K.AFTER_ATTRIBUTE_NAME:{this._stateAfterAttributeName(t);break}case K.BEFORE_ATTRIBUTE_VALUE:{this._stateBeforeAttributeValue(t);break}case K.ATTRIBUTE_VALUE_DOUBLE_QUOTED:{this._stateAttributeValueDoubleQuoted(t);break}case K.ATTRIBUTE_VALUE_SINGLE_QUOTED:{this._stateAttributeValueSingleQuoted(t);break}case K.ATTRIBUTE_VALUE_UNQUOTED:{this._stateAttributeValueUnquoted(t);break}case K.AFTER_ATTRIBUTE_VALUE_QUOTED:{this._stateAfterAttributeValueQuoted(t);break}case K.SELF_CLOSING_START_TAG:{this._stateSelfClosingStartTag(t);break}case K.BOGUS_COMMENT:{this._stateBogusComment(t);break}case K.MARKUP_DECLARATION_OPEN:{this._stateMarkupDeclarationOpen(t);break}case K.COMMENT_START:{this._stateCommentStart(t);break}case K.COMMENT_START_DASH:{this._stateCommentStartDash(t);break}case K.COMMENT:{this._stateComment(t);break}case K.COMMENT_LESS_THAN_SIGN:{this._stateCommentLessThanSign(t);break}case K.COMMENT_LESS_THAN_SIGN_BANG:{this._stateCommentLessThanSignBang(t);break}case K.COMMENT_LESS_THAN_SIGN_BANG_DASH:{this._stateCommentLessThanSignBangDash(t);break}case K.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:{this._stateCommentLessThanSignBangDashDash(t);break}case K.COMMENT_END_DASH:{this._stateCommentEndDash(t);break}case K.COMMENT_END:{this._stateCommentEnd(t);break}case K.COMMENT_END_BANG:{this._stateCommentEndBang(t);break}case K.DOCTYPE:{this._stateDoctype(t);break}case K.BEFORE_DOCTYPE_NAME:{this._stateBeforeDoctypeName(t);break}case K.DOCTYPE_NAME:{this._stateDoctypeName(t);break}case K.AFTER_DOCTYPE_NAME:{this._stateAfterDoctypeName(t);break}case K.AFTER_DOCTYPE_PUBLIC_KEYWORD:{this._stateAfterDoctypePublicKeyword(t);break}case K.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateBeforeDoctypePublicIdentifier(t);break}case K.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypePublicIdentifierDoubleQuoted(t);break}case K.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypePublicIdentifierSingleQuoted(t);break}case K.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateAfterDoctypePublicIdentifier(t);break}case K.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:{this._stateBetweenDoctypePublicAndSystemIdentifiers(t);break}case K.AFTER_DOCTYPE_SYSTEM_KEYWORD:{this._stateAfterDoctypeSystemKeyword(t);break}case K.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateBeforeDoctypeSystemIdentifier(t);break}case K.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypeSystemIdentifierDoubleQuoted(t);break}case K.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypeSystemIdentifierSingleQuoted(t);break}case K.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateAfterDoctypeSystemIdentifier(t);break}case K.BOGUS_DOCTYPE:{this._stateBogusDoctype(t);break}case K.CDATA_SECTION:{this._stateCdataSection(t);break}case K.CDATA_SECTION_BRACKET:{this._stateCdataSectionBracket(t);break}case K.CDATA_SECTION_END:{this._stateCdataSectionEnd(t);break}case K.CHARACTER_REFERENCE:{this._stateCharacterReference();break}case K.AMBIGUOUS_AMPERSAND:{this._stateAmbiguousAmpersand(t);break}default:throw new Error("Unknown state")}}_stateData(t){switch(t){case U.LESS_THAN_SIGN:{this.state=K.TAG_OPEN;break}case U.AMPERSAND:{this._startCharacterReference();break}case U.NULL:{this._err(M0.unexpectedNullCharacter),this._emitCodePoint(t);break}case U.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRcdata(t){switch(t){case U.AMPERSAND:{this._startCharacterReference();break}case U.LESS_THAN_SIGN:{this.state=K.RCDATA_LESS_THAN_SIGN;break}case U.NULL:{this._err(M0.unexpectedNullCharacter),this._emitChars(Z1);break}case U.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRawtext(t){switch(t){case U.LESS_THAN_SIGN:{this.state=K.RAWTEXT_LESS_THAN_SIGN;break}case U.NULL:{this._err(M0.unexpectedNullCharacter),this._emitChars(Z1);break}case U.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptData(t){switch(t){case U.LESS_THAN_SIGN:{this.state=K.SCRIPT_DATA_LESS_THAN_SIGN;break}case U.NULL:{this._err(M0.unexpectedNullCharacter),this._emitChars(Z1);break}case U.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_statePlaintext(t){switch(t){case U.NULL:{this._err(M0.unexpectedNullCharacter),this._emitChars(Z1);break}case U.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateTagOpen(t){if(po(t))this._createStartTagToken(),this.state=K.TAG_NAME,this._stateTagName(t);else switch(t){case U.EXCLAMATION_MARK:{this.state=K.MARKUP_DECLARATION_OPEN;break}case U.SOLIDUS:{this.state=K.END_TAG_OPEN;break}case U.QUESTION_MARK:{this._err(M0.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=K.BOGUS_COMMENT,this._stateBogusComment(t);break}case U.EOF:{this._err(M0.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break}default:this._err(M0.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=K.DATA,this._stateData(t)}}_stateEndTagOpen(t){if(po(t))this._createEndTagToken(),this.state=K.TAG_NAME,this._stateTagName(t);else switch(t){case U.GREATER_THAN_SIGN:{this._err(M0.missingEndTagName),this.state=K.DATA;break}case U.EOF:{this._err(M0.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break}default:this._err(M0.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=K.BOGUS_COMMENT,this._stateBogusComment(t)}}_stateTagName(t){const o=this.currentToken;switch(t){case U.SPACE:case U.LINE_FEED:case U.TABULATION:case U.FORM_FEED:{this.state=K.BEFORE_ATTRIBUTE_NAME;break}case U.SOLIDUS:{this.state=K.SELF_CLOSING_START_TAG;break}case U.GREATER_THAN_SIGN:{this.state=K.DATA,this.emitCurrentTagToken();break}case U.NULL:{this._err(M0.unexpectedNullCharacter),o.tagName+=Z1;break}case U.EOF:{this._err(M0.eofInTag),this._emitEOFToken();break}default:o.tagName+=String.fromCodePoint(Ka(t)?xc(t):t)}}_stateRcdataLessThanSign(t){t===U.SOLIDUS?this.state=K.RCDATA_END_TAG_OPEN:(this._emitChars("<"),this.state=K.RCDATA,this._stateRcdata(t))}_stateRcdataEndTagOpen(t){po(t)?(this.state=K.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(t)):(this._emitChars("</"),this.state=K.RCDATA,this._stateRcdata(t))}handleSpecialEndTag(t){if(!this.preprocessor.startsWith(this.lastStartTagName,!1))return!this._ensureHibernation();this._createEndTagToken();const o=this.currentToken;switch(o.tagName=this.lastStartTagName,this.preprocessor.peek(this.lastStartTagName.length)){case U.SPACE:case U.LINE_FEED:case U.TABULATION:case U.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=K.BEFORE_ATTRIBUTE_NAME,!1;case U.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=K.SELF_CLOSING_START_TAG,!1;case U.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=K.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=K.RCDATA,this._stateRcdata(t))}_stateRawtextLessThanSign(t){t===U.SOLIDUS?this.state=K.RAWTEXT_END_TAG_OPEN:(this._emitChars("<"),this.state=K.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagOpen(t){po(t)?(this.state=K.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(t)):(this._emitChars("</"),this.state=K.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=K.RAWTEXT,this._stateRawtext(t))}_stateScriptDataLessThanSign(t){switch(t){case U.SOLIDUS:{this.state=K.SCRIPT_DATA_END_TAG_OPEN;break}case U.EXCLAMATION_MARK:{this.state=K.SCRIPT_DATA_ESCAPE_START,this._emitChars("<!");break}default:this._emitChars("<"),this.state=K.SCRIPT_DATA,this._stateScriptData(t)}}_stateScriptDataEndTagOpen(t){po(t)?(this.state=K.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(t)):(this._emitChars("</"),this.state=K.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=K.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStart(t){t===U.HYPHEN_MINUS?(this.state=K.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars("-")):(this.state=K.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStartDash(t){t===U.HYPHEN_MINUS?(this.state=K.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-")):(this.state=K.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscaped(t){switch(t){case U.HYPHEN_MINUS:{this.state=K.SCRIPT_DATA_ESCAPED_DASH,this._emitChars("-");break}case U.LESS_THAN_SIGN:{this.state=K.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case U.NULL:{this._err(M0.unexpectedNullCharacter),this._emitChars(Z1);break}case U.EOF:{this._err(M0.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataEscapedDash(t){switch(t){case U.HYPHEN_MINUS:{this.state=K.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-");break}case U.LESS_THAN_SIGN:{this.state=K.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case U.NULL:{this._err(M0.unexpectedNullCharacter),this.state=K.SCRIPT_DATA_ESCAPED,this._emitChars(Z1);break}case U.EOF:{this._err(M0.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=K.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedDashDash(t){switch(t){case U.HYPHEN_MINUS:{this._emitChars("-");break}case U.LESS_THAN_SIGN:{this.state=K.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case U.GREATER_THAN_SIGN:{this.state=K.SCRIPT_DATA,this._emitChars(">");break}case U.NULL:{this._err(M0.unexpectedNullCharacter),this.state=K.SCRIPT_DATA_ESCAPED,this._emitChars(Z1);break}case U.EOF:{this._err(M0.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=K.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedLessThanSign(t){t===U.SOLIDUS?this.state=K.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:po(t)?(this._emitChars("<"),this.state=K.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(t)):(this._emitChars("<"),this.state=K.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagOpen(t){po(t)?(this.state=K.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(t)):(this._emitChars("</"),this.state=K.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=K.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscapeStart(t){if(this.preprocessor.startsWith(G2.SCRIPT,!1)&&tO(this.preprocessor.peek(G2.SCRIPT.length))){this._emitCodePoint(t);for(let o=0;o<G2.SCRIPT.length;o++)this._emitCodePoint(this._consume());this.state=K.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=K.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscaped(t){switch(t){case U.HYPHEN_MINUS:{this.state=K.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars("-");break}case U.LESS_THAN_SIGN:{this.state=K.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case U.NULL:{this._err(M0.unexpectedNullCharacter),this._emitChars(Z1);break}case U.EOF:{this._err(M0.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDash(t){switch(t){case U.HYPHEN_MINUS:{this.state=K.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars("-");break}case U.LESS_THAN_SIGN:{this.state=K.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case U.NULL:{this._err(M0.unexpectedNullCharacter),this.state=K.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(Z1);break}case U.EOF:{this._err(M0.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=K.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDashDash(t){switch(t){case U.HYPHEN_MINUS:{this._emitChars("-");break}case U.LESS_THAN_SIGN:{this.state=K.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case U.GREATER_THAN_SIGN:{this.state=K.SCRIPT_DATA,this._emitChars(">");break}case U.NULL:{this._err(M0.unexpectedNullCharacter),this.state=K.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(Z1);break}case U.EOF:{this._err(M0.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=K.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedLessThanSign(t){t===U.SOLIDUS?(this.state=K.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=K.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateScriptDataDoubleEscapeEnd(t){if(this.preprocessor.startsWith(G2.SCRIPT,!1)&&tO(this.preprocessor.peek(G2.SCRIPT.length))){this._emitCodePoint(t);for(let o=0;o<G2.SCRIPT.length;o++)this._emitCodePoint(this._consume());this.state=K.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=K.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateBeforeAttributeName(t){switch(t){case U.SPACE:case U.LINE_FEED:case U.TABULATION:case U.FORM_FEED:break;case U.SOLIDUS:case U.GREATER_THAN_SIGN:case U.EOF:{this.state=K.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case U.EQUALS_SIGN:{this._err(M0.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=K.ATTRIBUTE_NAME;break}default:this._createAttr(""),this.state=K.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateAttributeName(t){switch(t){case U.SPACE:case U.LINE_FEED:case U.TABULATION:case U.FORM_FEED:case U.SOLIDUS:case U.GREATER_THAN_SIGN:case U.EOF:{this._leaveAttrName(),this.state=K.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case U.EQUALS_SIGN:{this._leaveAttrName(),this.state=K.BEFORE_ATTRIBUTE_VALUE;break}case U.QUOTATION_MARK:case U.APOSTROPHE:case U.LESS_THAN_SIGN:{this._err(M0.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(t);break}case U.NULL:{this._err(M0.unexpectedNullCharacter),this.currentAttr.name+=Z1;break}default:this.currentAttr.name+=String.fromCodePoint(Ka(t)?xc(t):t)}}_stateAfterAttributeName(t){switch(t){case U.SPACE:case U.LINE_FEED:case U.TABULATION:case U.FORM_FEED:break;case U.SOLIDUS:{this.state=K.SELF_CLOSING_START_TAG;break}case U.EQUALS_SIGN:{this.state=K.BEFORE_ATTRIBUTE_VALUE;break}case U.GREATER_THAN_SIGN:{this.state=K.DATA,this.emitCurrentTagToken();break}case U.EOF:{this._err(M0.eofInTag),this._emitEOFToken();break}default:this._createAttr(""),this.state=K.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateBeforeAttributeValue(t){switch(t){case U.SPACE:case U.LINE_FEED:case U.TABULATION:case U.FORM_FEED:break;case U.QUOTATION_MARK:{this.state=K.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break}case U.APOSTROPHE:{this.state=K.ATTRIBUTE_VALUE_SINGLE_QUOTED;break}case U.GREATER_THAN_SIGN:{this._err(M0.missingAttributeValue),this.state=K.DATA,this.emitCurrentTagToken();break}default:this.state=K.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(t)}}_stateAttributeValueDoubleQuoted(t){switch(t){case U.QUOTATION_MARK:{this.state=K.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case U.AMPERSAND:{this._startCharacterReference();break}case U.NULL:{this._err(M0.unexpectedNullCharacter),this.currentAttr.value+=Z1;break}case U.EOF:{this._err(M0.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueSingleQuoted(t){switch(t){case U.APOSTROPHE:{this.state=K.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case U.AMPERSAND:{this._startCharacterReference();break}case U.NULL:{this._err(M0.unexpectedNullCharacter),this.currentAttr.value+=Z1;break}case U.EOF:{this._err(M0.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueUnquoted(t){switch(t){case U.SPACE:case U.LINE_FEED:case U.TABULATION:case U.FORM_FEED:{this._leaveAttrValue(),this.state=K.BEFORE_ATTRIBUTE_NAME;break}case U.AMPERSAND:{this._startCharacterReference();break}case U.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=K.DATA,this.emitCurrentTagToken();break}case U.NULL:{this._err(M0.unexpectedNullCharacter),this.currentAttr.value+=Z1;break}case U.QUOTATION_MARK:case U.APOSTROPHE:case U.LESS_THAN_SIGN:case U.EQUALS_SIGN:case U.GRAVE_ACCENT:{this._err(M0.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(t);break}case U.EOF:{this._err(M0.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAfterAttributeValueQuoted(t){switch(t){case U.SPACE:case U.LINE_FEED:case U.TABULATION:case U.FORM_FEED:{this._leaveAttrValue(),this.state=K.BEFORE_ATTRIBUTE_NAME;break}case U.SOLIDUS:{this._leaveAttrValue(),this.state=K.SELF_CLOSING_START_TAG;break}case U.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=K.DATA,this.emitCurrentTagToken();break}case U.EOF:{this._err(M0.eofInTag),this._emitEOFToken();break}default:this._err(M0.missingWhitespaceBetweenAttributes),this.state=K.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateSelfClosingStartTag(t){switch(t){case U.GREATER_THAN_SIGN:{const o=this.currentToken;o.selfClosing=!0,this.state=K.DATA,this.emitCurrentTagToken();break}case U.EOF:{this._err(M0.eofInTag),this._emitEOFToken();break}default:this._err(M0.unexpectedSolidusInTag),this.state=K.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateBogusComment(t){const o=this.currentToken;switch(t){case U.GREATER_THAN_SIGN:{this.state=K.DATA,this.emitCurrentComment(o);break}case U.EOF:{this.emitCurrentComment(o),this._emitEOFToken();break}case U.NULL:{this._err(M0.unexpectedNullCharacter),o.data+=Z1;break}default:o.data+=String.fromCodePoint(t)}}_stateMarkupDeclarationOpen(t){this._consumeSequenceIfMatch(G2.DASH_DASH,!0)?(this._createCommentToken(G2.DASH_DASH.length+1),this.state=K.COMMENT_START):this._consumeSequenceIfMatch(G2.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(G2.DOCTYPE.length+1),this.state=K.DOCTYPE):this._consumeSequenceIfMatch(G2.CDATA_START,!0)?this.inForeignNode?this.state=K.CDATA_SECTION:(this._err(M0.cdataInHtmlContent),this._createCommentToken(G2.CDATA_START.length+1),this.currentToken.data="[CDATA[",this.state=K.BOGUS_COMMENT):this._ensureHibernation()||(this._err(M0.incorrectlyOpenedComment),this._createCommentToken(2),this.state=K.BOGUS_COMMENT,this._stateBogusComment(t))}_stateCommentStart(t){switch(t){case U.HYPHEN_MINUS:{this.state=K.COMMENT_START_DASH;break}case U.GREATER_THAN_SIGN:{this._err(M0.abruptClosingOfEmptyComment),this.state=K.DATA;const o=this.currentToken;this.emitCurrentComment(o);break}default:this.state=K.COMMENT,this._stateComment(t)}}_stateCommentStartDash(t){const o=this.currentToken;switch(t){case U.HYPHEN_MINUS:{this.state=K.COMMENT_END;break}case U.GREATER_THAN_SIGN:{this._err(M0.abruptClosingOfEmptyComment),this.state=K.DATA,this.emitCurrentComment(o);break}case U.EOF:{this._err(M0.eofInComment),this.emitCurrentComment(o),this._emitEOFToken();break}default:o.data+="-",this.state=K.COMMENT,this._stateComment(t)}}_stateComment(t){const o=this.currentToken;switch(t){case U.HYPHEN_MINUS:{this.state=K.COMMENT_END_DASH;break}case U.LESS_THAN_SIGN:{o.data+="<",this.state=K.COMMENT_LESS_THAN_SIGN;break}case U.NULL:{this._err(M0.unexpectedNullCharacter),o.data+=Z1;break}case U.EOF:{this._err(M0.eofInComment),this.emitCurrentComment(o),this._emitEOFToken();break}default:o.data+=String.fromCodePoint(t)}}_stateCommentLessThanSign(t){const o=this.currentToken;switch(t){case U.EXCLAMATION_MARK:{o.data+="!",this.state=K.COMMENT_LESS_THAN_SIGN_BANG;break}case U.LESS_THAN_SIGN:{o.data+="<";break}default:this.state=K.COMMENT,this._stateComment(t)}}_stateCommentLessThanSignBang(t){t===U.HYPHEN_MINUS?this.state=K.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=K.COMMENT,this._stateComment(t))}_stateCommentLessThanSignBangDash(t){t===U.HYPHEN_MINUS?this.state=K.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=K.COMMENT_END_DASH,this._stateCommentEndDash(t))}_stateCommentLessThanSignBangDashDash(t){t!==U.GREATER_THAN_SIGN&&t!==U.EOF&&this._err(M0.nestedComment),this.state=K.COMMENT_END,this._stateCommentEnd(t)}_stateCommentEndDash(t){const o=this.currentToken;switch(t){case U.HYPHEN_MINUS:{this.state=K.COMMENT_END;break}case U.EOF:{this._err(M0.eofInComment),this.emitCurrentComment(o),this._emitEOFToken();break}default:o.data+="-",this.state=K.COMMENT,this._stateComment(t)}}_stateCommentEnd(t){const o=this.currentToken;switch(t){case U.GREATER_THAN_SIGN:{this.state=K.DATA,this.emitCurrentComment(o);break}case U.EXCLAMATION_MARK:{this.state=K.COMMENT_END_BANG;break}case U.HYPHEN_MINUS:{o.data+="-";break}case U.EOF:{this._err(M0.eofInComment),this.emitCurrentComment(o),this._emitEOFToken();break}default:o.data+="--",this.state=K.COMMENT,this._stateComment(t)}}_stateCommentEndBang(t){const o=this.currentToken;switch(t){case U.HYPHEN_MINUS:{o.data+="--!",this.state=K.COMMENT_END_DASH;break}case U.GREATER_THAN_SIGN:{this._err(M0.incorrectlyClosedComment),this.state=K.DATA,this.emitCurrentComment(o);break}case U.EOF:{this._err(M0.eofInComment),this.emitCurrentComment(o),this._emitEOFToken();break}default:o.data+="--!",this.state=K.COMMENT,this._stateComment(t)}}_stateDoctype(t){switch(t){case U.SPACE:case U.LINE_FEED:case U.TABULATION:case U.FORM_FEED:{this.state=K.BEFORE_DOCTYPE_NAME;break}case U.GREATER_THAN_SIGN:{this.state=K.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t);break}case U.EOF:{this._err(M0.eofInDoctype),this._createDoctypeToken(null);const o=this.currentToken;o.forceQuirks=!0,this.emitCurrentDoctype(o),this._emitEOFToken();break}default:this._err(M0.missingWhitespaceBeforeDoctypeName),this.state=K.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t)}}_stateBeforeDoctypeName(t){if(Ka(t))this._createDoctypeToken(String.fromCharCode(xc(t))),this.state=K.DOCTYPE_NAME;else switch(t){case U.SPACE:case U.LINE_FEED:case U.TABULATION:case U.FORM_FEED:break;case U.NULL:{this._err(M0.unexpectedNullCharacter),this._createDoctypeToken(Z1),this.state=K.DOCTYPE_NAME;break}case U.GREATER_THAN_SIGN:{this._err(M0.missingDoctypeName),this._createDoctypeToken(null);const o=this.currentToken;o.forceQuirks=!0,this.emitCurrentDoctype(o),this.state=K.DATA;break}case U.EOF:{this._err(M0.eofInDoctype),this._createDoctypeToken(null);const o=this.currentToken;o.forceQuirks=!0,this.emitCurrentDoctype(o),this._emitEOFToken();break}default:this._createDoctypeToken(String.fromCodePoint(t)),this.state=K.DOCTYPE_NAME}}_stateDoctypeName(t){const o=this.currentToken;switch(t){case U.SPACE:case U.LINE_FEED:case U.TABULATION:case U.FORM_FEED:{this.state=K.AFTER_DOCTYPE_NAME;break}case U.GREATER_THAN_SIGN:{this.state=K.DATA,this.emitCurrentDoctype(o);break}case U.NULL:{this._err(M0.unexpectedNullCharacter),o.name+=Z1;break}case U.EOF:{this._err(M0.eofInDoctype),o.forceQuirks=!0,this.emitCurrentDoctype(o),this._emitEOFToken();break}default:o.name+=String.fromCodePoint(Ka(t)?xc(t):t)}}_stateAfterDoctypeName(t){const o=this.currentToken;switch(t){case U.SPACE:case U.LINE_FEED:case U.TABULATION:case U.FORM_FEED:break;case U.GREATER_THAN_SIGN:{this.state=K.DATA,this.emitCurrentDoctype(o);break}case U.EOF:{this._err(M0.eofInDoctype),o.forceQuirks=!0,this.emitCurrentDoctype(o),this._emitEOFToken();break}default:this._consumeSequenceIfMatch(G2.PUBLIC,!1)?this.state=K.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(G2.SYSTEM,!1)?this.state=K.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(M0.invalidCharacterSequenceAfterDoctypeName),o.forceQuirks=!0,this.state=K.BOGUS_DOCTYPE,this._stateBogusDoctype(t))}}_stateAfterDoctypePublicKeyword(t){const o=this.currentToken;switch(t){case U.SPACE:case U.LINE_FEED:case U.TABULATION:case U.FORM_FEED:{this.state=K.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break}case U.QUOTATION_MARK:{this._err(M0.missingWhitespaceAfterDoctypePublicKeyword),o.publicId="",this.state=K.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case U.APOSTROPHE:{this._err(M0.missingWhitespaceAfterDoctypePublicKeyword),o.publicId="",this.state=K.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case U.GREATER_THAN_SIGN:{this._err(M0.missingDoctypePublicIdentifier),o.forceQuirks=!0,this.state=K.DATA,this.emitCurrentDoctype(o);break}case U.EOF:{this._err(M0.eofInDoctype),o.forceQuirks=!0,this.emitCurrentDoctype(o),this._emitEOFToken();break}default:this._err(M0.missingQuoteBeforeDoctypePublicIdentifier),o.forceQuirks=!0,this.state=K.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypePublicIdentifier(t){const o=this.currentToken;switch(t){case U.SPACE:case U.LINE_FEED:case U.TABULATION:case U.FORM_FEED:break;case U.QUOTATION_MARK:{o.publicId="",this.state=K.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case U.APOSTROPHE:{o.publicId="",this.state=K.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case U.GREATER_THAN_SIGN:{this._err(M0.missingDoctypePublicIdentifier),o.forceQuirks=!0,this.state=K.DATA,this.emitCurrentDoctype(o);break}case U.EOF:{this._err(M0.eofInDoctype),o.forceQuirks=!0,this.emitCurrentDoctype(o),this._emitEOFToken();break}default:this._err(M0.missingQuoteBeforeDoctypePublicIdentifier),o.forceQuirks=!0,this.state=K.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypePublicIdentifierDoubleQuoted(t){const o=this.currentToken;switch(t){case U.QUOTATION_MARK:{this.state=K.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case U.NULL:{this._err(M0.unexpectedNullCharacter),o.publicId+=Z1;break}case U.GREATER_THAN_SIGN:{this._err(M0.abruptDoctypePublicIdentifier),o.forceQuirks=!0,this.emitCurrentDoctype(o),this.state=K.DATA;break}case U.EOF:{this._err(M0.eofInDoctype),o.forceQuirks=!0,this.emitCurrentDoctype(o),this._emitEOFToken();break}default:o.publicId+=String.fromCodePoint(t)}}_stateDoctypePublicIdentifierSingleQuoted(t){const o=this.currentToken;switch(t){case U.APOSTROPHE:{this.state=K.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case U.NULL:{this._err(M0.unexpectedNullCharacter),o.publicId+=Z1;break}case U.GREATER_THAN_SIGN:{this._err(M0.abruptDoctypePublicIdentifier),o.forceQuirks=!0,this.emitCurrentDoctype(o),this.state=K.DATA;break}case U.EOF:{this._err(M0.eofInDoctype),o.forceQuirks=!0,this.emitCurrentDoctype(o),this._emitEOFToken();break}default:o.publicId+=String.fromCodePoint(t)}}_stateAfterDoctypePublicIdentifier(t){const o=this.currentToken;switch(t){case U.SPACE:case U.LINE_FEED:case U.TABULATION:case U.FORM_FEED:{this.state=K.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break}case U.GREATER_THAN_SIGN:{this.state=K.DATA,this.emitCurrentDoctype(o);break}case U.QUOTATION_MARK:{this._err(M0.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),o.systemId="",this.state=K.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case U.APOSTROPHE:{this._err(M0.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),o.systemId="",this.state=K.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case U.EOF:{this._err(M0.eofInDoctype),o.forceQuirks=!0,this.emitCurrentDoctype(o),this._emitEOFToken();break}default:this._err(M0.missingQuoteBeforeDoctypeSystemIdentifier),o.forceQuirks=!0,this.state=K.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBetweenDoctypePublicAndSystemIdentifiers(t){const o=this.currentToken;switch(t){case U.SPACE:case U.LINE_FEED:case U.TABULATION:case U.FORM_FEED:break;case U.GREATER_THAN_SIGN:{this.emitCurrentDoctype(o),this.state=K.DATA;break}case U.QUOTATION_MARK:{o.systemId="",this.state=K.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case U.APOSTROPHE:{o.systemId="",this.state=K.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case U.EOF:{this._err(M0.eofInDoctype),o.forceQuirks=!0,this.emitCurrentDoctype(o),this._emitEOFToken();break}default:this._err(M0.missingQuoteBeforeDoctypeSystemIdentifier),o.forceQuirks=!0,this.state=K.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateAfterDoctypeSystemKeyword(t){const o=this.currentToken;switch(t){case U.SPACE:case U.LINE_FEED:case U.TABULATION:case U.FORM_FEED:{this.state=K.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break}case U.QUOTATION_MARK:{this._err(M0.missingWhitespaceAfterDoctypeSystemKeyword),o.systemId="",this.state=K.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case U.APOSTROPHE:{this._err(M0.missingWhitespaceAfterDoctypeSystemKeyword),o.systemId="",this.state=K.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case U.GREATER_THAN_SIGN:{this._err(M0.missingDoctypeSystemIdentifier),o.forceQuirks=!0,this.state=K.DATA,this.emitCurrentDoctype(o);break}case U.EOF:{this._err(M0.eofInDoctype),o.forceQuirks=!0,this.emitCurrentDoctype(o),this._emitEOFToken();break}default:this._err(M0.missingQuoteBeforeDoctypeSystemIdentifier),o.forceQuirks=!0,this.state=K.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypeSystemIdentifier(t){const o=this.currentToken;switch(t){case U.SPACE:case U.LINE_FEED:case U.TABULATION:case U.FORM_FEED:break;case U.QUOTATION_MARK:{o.systemId="",this.state=K.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case U.APOSTROPHE:{o.systemId="",this.state=K.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case U.GREATER_THAN_SIGN:{this._err(M0.missingDoctypeSystemIdentifier),o.forceQuirks=!0,this.state=K.DATA,this.emitCurrentDoctype(o);break}case U.EOF:{this._err(M0.eofInDoctype),o.forceQuirks=!0,this.emitCurrentDoctype(o),this._emitEOFToken();break}default:this._err(M0.missingQuoteBeforeDoctypeSystemIdentifier),o.forceQuirks=!0,this.state=K.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypeSystemIdentifierDoubleQuoted(t){const o=this.currentToken;switch(t){case U.QUOTATION_MARK:{this.state=K.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case U.NULL:{this._err(M0.unexpectedNullCharacter),o.systemId+=Z1;break}case U.GREATER_THAN_SIGN:{this._err(M0.abruptDoctypeSystemIdentifier),o.forceQuirks=!0,this.emitCurrentDoctype(o),this.state=K.DATA;break}case U.EOF:{this._err(M0.eofInDoctype),o.forceQuirks=!0,this.emitCurrentDoctype(o),this._emitEOFToken();break}default:o.systemId+=String.fromCodePoint(t)}}_stateDoctypeSystemIdentifierSingleQuoted(t){const o=this.currentToken;switch(t){case U.APOSTROPHE:{this.state=K.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case U.NULL:{this._err(M0.unexpectedNullCharacter),o.systemId+=Z1;break}case U.GREATER_THAN_SIGN:{this._err(M0.abruptDoctypeSystemIdentifier),o.forceQuirks=!0,this.emitCurrentDoctype(o),this.state=K.DATA;break}case U.EOF:{this._err(M0.eofInDoctype),o.forceQuirks=!0,this.emitCurrentDoctype(o),this._emitEOFToken();break}default:o.systemId+=String.fromCodePoint(t)}}_stateAfterDoctypeSystemIdentifier(t){const o=this.currentToken;switch(t){case U.SPACE:case U.LINE_FEED:case U.TABULATION:case U.FORM_FEED:break;case U.GREATER_THAN_SIGN:{this.emitCurrentDoctype(o),this.state=K.DATA;break}case U.EOF:{this._err(M0.eofInDoctype),o.forceQuirks=!0,this.emitCurrentDoctype(o),this._emitEOFToken();break}default:this._err(M0.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=K.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBogusDoctype(t){const o=this.currentToken;switch(t){case U.GREATER_THAN_SIGN:{this.emitCurrentDoctype(o),this.state=K.DATA;break}case U.NULL:{this._err(M0.unexpectedNullCharacter);break}case U.EOF:{this.emitCurrentDoctype(o),this._emitEOFToken();break}}}_stateCdataSection(t){switch(t){case U.RIGHT_SQUARE_BRACKET:{this.state=K.CDATA_SECTION_BRACKET;break}case U.EOF:{this._err(M0.eofInCdata),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateCdataSectionBracket(t){t===U.RIGHT_SQUARE_BRACKET?this.state=K.CDATA_SECTION_END:(this._emitChars("]"),this.state=K.CDATA_SECTION,this._stateCdataSection(t))}_stateCdataSectionEnd(t){switch(t){case U.GREATER_THAN_SIGN:{this.state=K.DATA;break}case U.RIGHT_SQUARE_BRACKET:{this._emitChars("]");break}default:this._emitChars("]]"),this.state=K.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(U.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&$m(this.preprocessor.peek(1))?K.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(t){$m(t)?this._flushCodePointConsumedAsCharacterReference(t):(t===U.SEMICOLON&&this._err(M0.unknownNamedCharacterReference),this.state=this.returnState,this._callState(t))}}const oO=new Set([A.DD,A.DT,A.LI,A.OPTGROUP,A.OPTION,A.P,A.RB,A.RP,A.RT,A.RTC]),nO=new Set([...oO,A.CAPTION,A.COLGROUP,A.TBODY,A.TD,A.TFOOT,A.TH,A.THEAD,A.TR]),Dc=new Set([A.APPLET,A.CAPTION,A.HTML,A.MARQUEE,A.OBJECT,A.TABLE,A.TD,A.TEMPLATE,A.TH]),N$=new Set([...Dc,A.OL,A.UL]),x$=new Set([...Dc,A.BUTTON]),sO=new Set([A.ANNOTATION_XML,A.MI,A.MN,A.MO,A.MS,A.MTEXT]),aO=new Set([A.DESC,A.FOREIGN_OBJECT,A.TITLE]),D$=new Set([A.TR,A.TEMPLATE,A.HTML]),P$=new Set([A.TBODY,A.TFOOT,A.THEAD,A.TEMPLATE,A.HTML]),F$=new Set([A.TABLE,A.TEMPLATE,A.HTML]),Q$=new Set([A.TD,A.TH]);class H${get currentTmplContentOrNode(){return this._isInTemplate()?this.treeAdapter.getTemplateContent(this.current):this.current}constructor(t,o,n){this.treeAdapter=o,this.handler=n,this.items=[],this.tagIDs=[],this.stackTop=-1,this.tmplCount=0,this.currentTagId=A.UNKNOWN,this.current=t}_indexOf(t){return this.items.lastIndexOf(t,this.stackTop)}_isInTemplate(){return this.currentTagId===A.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===E0.HTML}_updateCurrentElement(){this.current=this.items[this.stackTop],this.currentTagId=this.tagIDs[this.stackTop]}push(t,o){this.stackTop++,this.items[this.stackTop]=t,this.current=t,this.tagIDs[this.stackTop]=o,this.currentTagId=o,this._isInTemplate()&&this.tmplCount++,this.handler.onItemPush(t,o,!0)}pop(){const t=this.current;this.tmplCount>0&&this._isInTemplate()&&this.tmplCount--,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!0)}replace(t,o){const n=this._indexOf(t);this.items[n]=o,n===this.stackTop&&(this.current=o)}insertAfter(t,o,n){const s=this._indexOf(t)+1;this.items.splice(s,0,o),this.tagIDs.splice(s,0,n),this.stackTop++,s===this.stackTop&&this._updateCurrentElement(),this.current&&this.currentTagId!==void 0&&this.handler.onItemPush(this.current,this.currentTagId,s===this.stackTop)}popUntilTagNamePopped(t){let o=this.stackTop+1;do o=this.tagIDs.lastIndexOf(t,o-1);while(o>0&&this.treeAdapter.getNamespaceURI(this.items[o])!==E0.HTML);this.shortenToLength(Math.max(o,0))}shortenToLength(t){for(;this.stackTop>=t;){const o=this.current;this.tmplCount>0&&this._isInTemplate()&&(this.tmplCount-=1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(o,this.stackTop<t)}}popUntilElementPopped(t){const o=this._indexOf(t);this.shortenToLength(Math.max(o,0))}popUntilPopped(t,o){const n=this._indexOfTagNames(t,o);this.shortenToLength(Math.max(n,0))}popUntilNumberedHeaderPopped(){this.popUntilPopped(nu,E0.HTML)}popUntilTableCellPopped(){this.popUntilPopped(Q$,E0.HTML)}popAllUpToHtmlElement(){this.tmplCount=0,this.shortenToLength(1)}_indexOfTagNames(t,o){for(let n=this.stackTop;n>=0;n--)if(t.has(this.tagIDs[n])&&this.treeAdapter.getNamespaceURI(this.items[n])===o)return n;return-1}clearBackTo(t,o){const n=this._indexOfTagNames(t,o);this.shortenToLength(n+1)}clearBackToTableContext(){this.clearBackTo(F$,E0.HTML)}clearBackToTableBodyContext(){this.clearBackTo(P$,E0.HTML)}clearBackToTableRowContext(){this.clearBackTo(D$,E0.HTML)}remove(t){const o=this._indexOf(t);o>=0&&(o===this.stackTop?this.pop():(this.items.splice(o,1),this.tagIDs.splice(o,1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!1)))}tryPeekProperlyNestedBodyElement(){return this.stackTop>=1&&this.tagIDs[1]===A.BODY?this.items[1]:null}contains(t){return this._indexOf(t)>-1}getCommonAncestor(t){const o=this._indexOf(t)-1;return o>=0?this.items[o]:null}isRootHtmlElementCurrent(){return this.stackTop===0&&this.tagIDs[0]===A.HTML}hasInDynamicScope(t,o){for(let n=this.stackTop;n>=0;n--){const s=this.tagIDs[n];switch(this.treeAdapter.getNamespaceURI(this.items[n])){case E0.HTML:{if(s===t)return!0;if(o.has(s))return!1;break}case E0.SVG:{if(aO.has(s))return!1;break}case E0.MATHML:{if(sO.has(s))return!1;break}}}return!0}hasInScope(t){return this.hasInDynamicScope(t,Dc)}hasInListItemScope(t){return this.hasInDynamicScope(t,N$)}hasInButtonScope(t){return this.hasInDynamicScope(t,x$)}hasNumberedHeaderInScope(){for(let t=this.stackTop;t>=0;t--){const o=this.tagIDs[t];switch(this.treeAdapter.getNamespaceURI(this.items[t])){case E0.HTML:{if(nu.has(o))return!0;if(Dc.has(o))return!1;break}case E0.SVG:{if(aO.has(o))return!1;break}case E0.MATHML:{if(sO.has(o))return!1;break}}}return!0}hasInTableScope(t){for(let o=this.stackTop;o>=0;o--)if(this.treeAdapter.getNamespaceURI(this.items[o])===E0.HTML)switch(this.tagIDs[o]){case t:return!0;case A.TABLE:case A.HTML:return!1}return!0}hasTableBodyContextInTableScope(){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===E0.HTML)switch(this.tagIDs[t]){case A.TBODY:case A.THEAD:case A.TFOOT:return!0;case A.TABLE:case A.HTML:return!1}return!0}hasInSelectScope(t){for(let o=this.stackTop;o>=0;o--)if(this.treeAdapter.getNamespaceURI(this.items[o])===E0.HTML)switch(this.tagIDs[o]){case t:return!0;case A.OPTION:case A.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;this.currentTagId!==void 0&&oO.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&nO.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(t){for(;this.currentTagId!==void 0&&this.currentTagId!==t&&nO.has(this.currentTagId);)this.pop()}}const su=3;var $e;(function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"})($e||($e={}));const rO={type:$e.Marker};class V${constructor(t){this.treeAdapter=t,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(t,o){const n=[],s=o.length,a=this.treeAdapter.getTagName(t),r=this.treeAdapter.getNamespaceURI(t);for(let i=0;i<this.entries.length;i++){const c=this.entries[i];if(c.type===$e.Marker)break;const{element:l}=c;if(this.treeAdapter.getTagName(l)===a&&this.treeAdapter.getNamespaceURI(l)===r){const p=this.treeAdapter.getAttrList(l);p.length===s&&n.push({idx:i,attrs:p})}}return n}_ensureNoahArkCondition(t){if(this.entries.length<su)return;const o=this.treeAdapter.getAttrList(t),n=this._getNoahArkConditionCandidates(t,o);if(n.length<su)return;const s=new Map(o.map(r=>[r.name,r.value]));let a=0;for(let r=0;r<n.length;r++){const i=n[r];i.attrs.every(c=>s.get(c.name)===c.value)&&(a+=1,a>=su&&this.entries.splice(i.idx,1))}}insertMarker(){this.entries.unshift(rO)}pushElement(t,o){this._ensureNoahArkCondition(t),this.entries.unshift({type:$e.Element,element:t,token:o})}insertElementAfterBookmark(t,o){const n=this.entries.indexOf(this.bookmark);this.entries.splice(n,0,{type:$e.Element,element:t,token:o})}removeEntry(t){const o=this.entries.indexOf(t);o!==-1&&this.entries.splice(o,1)}clearToLastMarker(){const t=this.entries.indexOf(rO);t===-1?this.entries.length=0:this.entries.splice(0,t+1)}getElementEntryInScopeWithTagName(t){const o=this.entries.find(n=>n.type===$e.Marker||this.treeAdapter.getTagName(n.element)===t);return o&&o.type===$e.Element?o:null}getElementEntry(t){return this.entries.find(o=>o.type===$e.Element&&o.element===t)}}const uo={createDocument(){return{nodeName:"#document",mode:_e.NO_QUIRKS,childNodes:[]}},createDocumentFragment(){return{nodeName:"#document-fragment",childNodes:[]}},createElement(e,t,o){return{nodeName:e,tagName:e,attrs:o,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,o){const n=e.childNodes.indexOf(o);e.childNodes.splice(n,0,t),t.parentNode=e},setTemplateContent(e,t){e.content=t},getTemplateContent(e){return e.content},setDocumentType(e,t,o,n){const s=e.childNodes.find(a=>a.nodeName==="#documentType");if(s)s.name=t,s.publicId=o,s.systemId=n;else{const a={nodeName:"#documentType",name:t,publicId:o,systemId:n,parentNode:null};uo.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 o=e.childNodes[e.childNodes.length-1];if(uo.isTextNode(o)){o.value+=t;return}}uo.appendChild(e,uo.createTextNode(t))},insertTextBefore(e,t,o){const n=e.childNodes[e.childNodes.indexOf(o)-1];n&&uo.isTextNode(n)?n.value+=t:uo.insertBefore(e,uo.createTextNode(t),o)},adoptAttributes(e,t){const o=new Set(e.attrs.map(n=>n.name));for(let n=0;n<t.length;n++)o.has(t[n].name)||e.attrs.push(t[n])},getFirstChild(e){return e.childNodes[0]},getChildNodes(e){return e.childNodes},getParentNode(e){return e.parentNode},getAttrList(e){return e.attrs},getTagName(e){return e.tagName},getNamespaceURI(e){return e.namespaceURI},getTextNodeContent(e){return e.value},getCommentNodeContent(e){return e.data},getDocumentTypeNodeName(e){return e.name},getDocumentTypeNodePublicId(e){return e.publicId},getDocumentTypeNodeSystemId(e){return e.systemId},isTextNode(e){return e.nodeName==="#text"},isCommentNode(e){return e.nodeName==="#comment"},isDocumentTypeNode(e){return e.nodeName==="#documentType"},isElementNode(e){return Object.prototype.hasOwnProperty.call(e,"tagName")},setNodeSourceCodeLocation(e,t){e.sourceCodeLocation=t},getNodeSourceCodeLocation(e){return e.sourceCodeLocation},updateNodeSourceCodeLocation(e,t){e.sourceCodeLocation={...e.sourceCodeLocation,...t}}},iO="html",U$="about:legacy-compat",K$="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",cO=["+//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//"],j$=[...cO,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],G$=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),lO=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],Y$=[...lO,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function pO(e,t){return t.some(o=>e.startsWith(o))}function X$(e){return e.name===iO&&e.publicId===null&&(e.systemId===null||e.systemId===U$)}function Z$(e){if(e.name!==iO)return _e.QUIRKS;const{systemId:t}=e;if(t&&t.toLowerCase()===K$)return _e.QUIRKS;let{publicId:o}=e;if(o!==null){if(o=o.toLowerCase(),G$.has(o))return _e.QUIRKS;let n=t===null?j$:cO;if(pO(o,n))return _e.QUIRKS;if(n=t===null?lO:Y$,pO(o,n))return _e.LIMITED_QUIRKS}return _e.NO_QUIRKS}const dO={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},J$="definitionurl",$$="definitionURL",e00=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])),t00=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:E0.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:E0.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:E0.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:E0.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:E0.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:E0.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:E0.XLINK}],["xml:lang",{prefix:"xml",name:"lang",namespace:E0.XML}],["xml:space",{prefix:"xml",name:"space",namespace:E0.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:E0.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:E0.XMLNS}]]),o00=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])),n00=new Set([A.B,A.BIG,A.BLOCKQUOTE,A.BODY,A.BR,A.CENTER,A.CODE,A.DD,A.DIV,A.DL,A.DT,A.EM,A.EMBED,A.H1,A.H2,A.H3,A.H4,A.H5,A.H6,A.HEAD,A.HR,A.I,A.IMG,A.LI,A.LISTING,A.MENU,A.META,A.NOBR,A.OL,A.P,A.PRE,A.RUBY,A.S,A.SMALL,A.SPAN,A.STRONG,A.STRIKE,A.SUB,A.SUP,A.TABLE,A.TT,A.U,A.UL,A.VAR]);function s00(e){const t=e.tagID;return t===A.FONT&&e.attrs.some(({name:n})=>n===Zo.COLOR||n===Zo.SIZE||n===Zo.FACE)||n00.has(t)}function uO(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===J$){e.attrs[t].name=$$;break}}function bO(e){for(let t=0;t<e.attrs.length;t++){const o=e00.get(e.attrs[t].name);o!=null&&(e.attrs[t].name=o)}}function au(e){for(let t=0;t<e.attrs.length;t++){const o=t00.get(e.attrs[t].name);o&&(e.attrs[t].prefix=o.prefix,e.attrs[t].name=o.name,e.attrs[t].namespace=o.namespace)}}function a00(e){const t=o00.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=cs(e.tagName))}function r00(e,t){return t===E0.MATHML&&(e===A.MI||e===A.MO||e===A.MN||e===A.MS||e===A.MTEXT)}function i00(e,t,o){if(t===E0.MATHML&&e===A.ANNOTATION_XML){for(let n=0;n<o.length;n++)if(o[n].name===Zo.ENCODING){const s=o[n].value.toLowerCase();return s===dO.TEXT_HTML||s===dO.APPLICATION_XML}}return t===E0.SVG&&(e===A.FOREIGN_OBJECT||e===A.DESC||e===A.TITLE)}function c00(e,t,o,n){return(!n||n===E0.HTML)&&i00(e,t,o)||(!n||n===E0.MATHML)&&r00(e,t)}const l00="hidden",p00=8,d00=3;var Z;(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"})(Z||(Z={}));const u00={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},hO=new Set([A.TABLE,A.TBODY,A.TFOOT,A.THEAD,A.TR]),MO={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:uo,onParseError:null};class fO{constructor(t,o,n=null,s=null){this.fragmentContext=n,this.scriptHandler=s,this.currentToken=null,this.stopped=!1,this.insertionMode=Z.INITIAL,this.originalInsertionMode=Z.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={...MO,...t},this.treeAdapter=this.options.treeAdapter,this.onParseError=this.options.onParseError,this.onParseError&&(this.options.sourceCodeLocationInfo=!0),this.document=o??this.treeAdapter.createDocument(),this.tokenizer=new I$(this.options,this),this.activeFormattingElements=new V$(this.treeAdapter),this.fragmentContextID=n?cs(this.treeAdapter.getTagName(n)):A.UNKNOWN,this._setContextModes(n??this.document,this.fragmentContextID),this.openElements=new H$(this.document,this.treeAdapter,this)}static parse(t,o){const n=new this(o);return n.tokenizer.write(t,!0),n.document}static getFragmentParser(t,o){const n={...MO,...o};t??(t=n.treeAdapter.createElement(l0.TEMPLATE,E0.HTML,[]));const s=n.treeAdapter.createElement("documentmock",E0.HTML,[]),a=new this(n,s,t);return a.fragmentContextID===A.TEMPLATE&&a.tmplInsertionModeStack.unshift(Z.IN_TEMPLATE),a._initTokenizerForFragmentParsing(),a._insertFakeRootElement(),a._resetInsertionMode(),a._findFormInFragmentContext(),a}getFragment(){const t=this.treeAdapter.getFirstChild(this.document),o=this.treeAdapter.createDocumentFragment();return this._adoptNodes(t,o),o}_err(t,o,n){var s;if(!this.onParseError)return;const a=(s=t.location)!==null&&s!==void 0?s:u00,r={code:o,startLine:a.startLine,startCol:a.startCol,startOffset:a.startOffset,endLine:n?a.startLine:a.endLine,endCol:n?a.startCol:a.endCol,endOffset:n?a.startOffset:a.endOffset};this.onParseError(r)}onItemPush(t,o,n){var s,a;(a=(s=this.treeAdapter).onItemPush)===null||a===void 0||a.call(s,t),n&&this.openElements.stackTop>0&&this._setContextModes(t,o)}onItemPop(t,o){var n,s;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(t,this.currentToken),(s=(n=this.treeAdapter).onItemPop)===null||s===void 0||s.call(n,t,this.openElements.current),o){let a,r;this.openElements.stackTop===0&&this.fragmentContext?(a=this.fragmentContext,r=this.fragmentContextID):{current:a,currentTagId:r}=this.openElements,this._setContextModes(a,r)}}_setContextModes(t,o){const n=t===this.document||t&&this.treeAdapter.getNamespaceURI(t)===E0.HTML;this.currentNotInHTML=!n,this.tokenizer.inForeignNode=!n&&t!==void 0&&o!==void 0&&!this._isIntegrationPoint(o,t)}_switchToTextParsing(t,o){this._insertElement(t,E0.HTML),this.tokenizer.state=o,this.originalInsertionMode=this.insertionMode,this.insertionMode=Z.TEXT}switchToPlaintextParsing(){this.insertionMode=Z.TEXT,this.originalInsertionMode=Z.IN_BODY,this.tokenizer.state=r2.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)===l0.FORM){this.formElement=t;break}t=this.treeAdapter.getParentNode(t)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==E0.HTML))switch(this.fragmentContextID){case A.TITLE:case A.TEXTAREA:{this.tokenizer.state=r2.RCDATA;break}case A.STYLE:case A.XMP:case A.IFRAME:case A.NOEMBED:case A.NOFRAMES:case A.NOSCRIPT:{this.tokenizer.state=r2.RAWTEXT;break}case A.SCRIPT:{this.tokenizer.state=r2.SCRIPT_DATA;break}case A.PLAINTEXT:{this.tokenizer.state=r2.PLAINTEXT;break}}}_setDocumentType(t){const o=t.name||"",n=t.publicId||"",s=t.systemId||"";if(this.treeAdapter.setDocumentType(this.document,o,n,s),t.location){const r=this.treeAdapter.getChildNodes(this.document).find(i=>this.treeAdapter.isDocumentTypeNode(i));r&&this.treeAdapter.setNodeSourceCodeLocation(r,t.location)}}_attachElementToTree(t,o){if(this.options.sourceCodeLocationInfo){const n=o&&{...o,startTag:o};this.treeAdapter.setNodeSourceCodeLocation(t,n)}if(this._shouldFosterParentOnInsertion())this._fosterParentElement(t);else{const n=this.openElements.currentTmplContentOrNode;this.treeAdapter.appendChild(n??this.document,t)}}_appendElement(t,o){const n=this.treeAdapter.createElement(t.tagName,o,t.attrs);this._attachElementToTree(n,t.location)}_insertElement(t,o){const n=this.treeAdapter.createElement(t.tagName,o,t.attrs);this._attachElementToTree(n,t.location),this.openElements.push(n,t.tagID)}_insertFakeElement(t,o){const n=this.treeAdapter.createElement(t,E0.HTML,[]);this._attachElementToTree(n,null),this.openElements.push(n,o)}_insertTemplate(t){const o=this.treeAdapter.createElement(t.tagName,E0.HTML,t.attrs),n=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(o,n),this._attachElementToTree(o,t.location),this.openElements.push(o,t.tagID),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(n,null)}_insertFakeRootElement(){const t=this.treeAdapter.createElement(l0.HTML,E0.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(t,null),this.treeAdapter.appendChild(this.openElements.current,t),this.openElements.push(t,A.HTML)}_appendCommentNode(t,o){const n=this.treeAdapter.createCommentNode(t.data);this.treeAdapter.appendChild(o,n),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(n,t.location)}_insertCharacters(t){let o,n;if(this._shouldFosterParentOnInsertion()?({parent:o,beforeElement:n}=this._findFosterParentingLocation(),n?this.treeAdapter.insertTextBefore(o,t.chars,n):this.treeAdapter.insertText(o,t.chars)):(o=this.openElements.currentTmplContentOrNode,this.treeAdapter.insertText(o,t.chars)),!t.location)return;const s=this.treeAdapter.getChildNodes(o),a=n?s.lastIndexOf(n):s.length,r=s[a-1];if(this.treeAdapter.getNodeSourceCodeLocation(r)){const{endLine:c,endCol:l,endOffset:p}=t.location;this.treeAdapter.updateNodeSourceCodeLocation(r,{endLine:c,endCol:l,endOffset:p})}else this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(r,t.location)}_adoptNodes(t,o){for(let n=this.treeAdapter.getFirstChild(t);n;n=this.treeAdapter.getFirstChild(t))this.treeAdapter.detachNode(n),this.treeAdapter.appendChild(o,n)}_setEndLocation(t,o){if(this.treeAdapter.getNodeSourceCodeLocation(t)&&o.location){const n=o.location,s=this.treeAdapter.getTagName(t),a=o.type===p1.END_TAG&&s===o.tagName?{endTag:{...n},endLine:n.endLine,endCol:n.endCol,endOffset:n.endOffset}:{endLine:n.startLine,endCol:n.startCol,endOffset:n.startOffset};this.treeAdapter.updateNodeSourceCodeLocation(t,a)}}shouldProcessStartTagTokenInForeignContent(t){if(!this.currentNotInHTML)return!1;let o,n;return this.openElements.stackTop===0&&this.fragmentContext?(o=this.fragmentContext,n=this.fragmentContextID):{current:o,currentTagId:n}=this.openElements,t.tagID===A.SVG&&this.treeAdapter.getTagName(o)===l0.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(o)===E0.MATHML?!1:this.tokenizer.inForeignNode||(t.tagID===A.MGLYPH||t.tagID===A.MALIGNMARK)&&n!==void 0&&!this._isIntegrationPoint(n,o,E0.HTML)}_processToken(t){switch(t.type){case p1.CHARACTER:{this.onCharacter(t);break}case p1.NULL_CHARACTER:{this.onNullCharacter(t);break}case p1.COMMENT:{this.onComment(t);break}case p1.DOCTYPE:{this.onDoctype(t);break}case p1.START_TAG:{this._processStartTag(t);break}case p1.END_TAG:{this.onEndTag(t);break}case p1.EOF:{this.onEof(t);break}case p1.WHITESPACE_CHARACTER:{this.onWhitespaceCharacter(t);break}}}_isIntegrationPoint(t,o,n){const s=this.treeAdapter.getNamespaceURI(o),a=this.treeAdapter.getAttrList(o);return c00(t,s,a,n)}_reconstructActiveFormattingElements(){const t=this.activeFormattingElements.entries.length;if(t){const o=this.activeFormattingElements.entries.findIndex(s=>s.type===$e.Marker||this.openElements.contains(s.element)),n=o===-1?t-1:o-1;for(let s=n;s>=0;s--){const a=this.activeFormattingElements.entries[s];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=Z.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(A.P),this.openElements.popUntilTagNamePopped(A.P)}_resetInsertionMode(){for(let t=this.openElements.stackTop;t>=0;t--)switch(t===0&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[t]){case A.TR:{this.insertionMode=Z.IN_ROW;return}case A.TBODY:case A.THEAD:case A.TFOOT:{this.insertionMode=Z.IN_TABLE_BODY;return}case A.CAPTION:{this.insertionMode=Z.IN_CAPTION;return}case A.COLGROUP:{this.insertionMode=Z.IN_COLUMN_GROUP;return}case A.TABLE:{this.insertionMode=Z.IN_TABLE;return}case A.BODY:{this.insertionMode=Z.IN_BODY;return}case A.FRAMESET:{this.insertionMode=Z.IN_FRAMESET;return}case A.SELECT:{this._resetInsertionModeForSelect(t);return}case A.TEMPLATE:{this.insertionMode=this.tmplInsertionModeStack[0];return}case A.HTML:{this.insertionMode=this.headElement?Z.AFTER_HEAD:Z.BEFORE_HEAD;return}case A.TD:case A.TH:{if(t>0){this.insertionMode=Z.IN_CELL;return}break}case A.HEAD:{if(t>0){this.insertionMode=Z.IN_HEAD;return}break}}this.insertionMode=Z.IN_BODY}_resetInsertionModeForSelect(t){if(t>0)for(let o=t-1;o>0;o--){const n=this.openElements.tagIDs[o];if(n===A.TEMPLATE)break;if(n===A.TABLE){this.insertionMode=Z.IN_SELECT_IN_TABLE;return}}this.insertionMode=Z.IN_SELECT}_isElementCausesFosterParenting(t){return hO.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 o=this.openElements.items[t];switch(this.openElements.tagIDs[t]){case A.TEMPLATE:{if(this.treeAdapter.getNamespaceURI(o)===E0.HTML)return{parent:this.treeAdapter.getTemplateContent(o),beforeElement:null};break}case A.TABLE:{const n=this.treeAdapter.getParentNode(o);return n?{parent:n,beforeElement:o}:{parent:this.openElements.items[t-1],beforeElement:null}}}}return{parent:this.openElements.items[0],beforeElement:null}}_fosterParentElement(t){const o=this._findFosterParentingLocation();o.beforeElement?this.treeAdapter.insertBefore(o.parent,t,o.beforeElement):this.treeAdapter.appendChild(o.parent,t)}_isSpecialElement(t,o){const n=this.treeAdapter.getNamespaceURI(t);return B$[n].has(o)}onCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){Q10(this,t);return}switch(this.insertionMode){case Z.INITIAL:{ja(this,t);break}case Z.BEFORE_HTML:{Ga(this,t);break}case Z.BEFORE_HEAD:{Ya(this,t);break}case Z.IN_HEAD:{Xa(this,t);break}case Z.IN_HEAD_NO_SCRIPT:{Za(this,t);break}case Z.AFTER_HEAD:{Ja(this,t);break}case Z.IN_BODY:case Z.IN_CAPTION:case Z.IN_CELL:case Z.IN_TEMPLATE:{zO(this,t);break}case Z.TEXT:case Z.IN_SELECT:case Z.IN_SELECT_IN_TABLE:{this._insertCharacters(t);break}case Z.IN_TABLE:case Z.IN_TABLE_BODY:case Z.IN_ROW:{lu(this,t);break}case Z.IN_TABLE_TEXT:{EO(this,t);break}case Z.IN_COLUMN_GROUP:{Qc(this,t);break}case Z.AFTER_BODY:{Uc(this,t);break}case Z.AFTER_AFTER_BODY:{Kc(this,t);break}}}onNullCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){F10(this,t);return}switch(this.insertionMode){case Z.INITIAL:{ja(this,t);break}case Z.BEFORE_HTML:{Ga(this,t);break}case Z.BEFORE_HEAD:{Ya(this,t);break}case Z.IN_HEAD:{Xa(this,t);break}case Z.IN_HEAD_NO_SCRIPT:{Za(this,t);break}case Z.AFTER_HEAD:{Ja(this,t);break}case Z.TEXT:{this._insertCharacters(t);break}case Z.IN_TABLE:case Z.IN_TABLE_BODY:case Z.IN_ROW:{lu(this,t);break}case Z.IN_COLUMN_GROUP:{Qc(this,t);break}case Z.AFTER_BODY:{Uc(this,t);break}case Z.AFTER_AFTER_BODY:{Kc(this,t);break}}}onComment(t){if(this.skipNextNewLine=!1,this.currentNotInHTML){iu(this,t);return}switch(this.insertionMode){case Z.INITIAL:case Z.BEFORE_HTML:case Z.BEFORE_HEAD:case Z.IN_HEAD:case Z.IN_HEAD_NO_SCRIPT:case Z.AFTER_HEAD:case Z.IN_BODY:case Z.IN_TABLE:case Z.IN_CAPTION:case Z.IN_COLUMN_GROUP:case Z.IN_TABLE_BODY:case Z.IN_ROW:case Z.IN_CELL:case Z.IN_SELECT:case Z.IN_SELECT_IN_TABLE:case Z.IN_TEMPLATE:case Z.IN_FRAMESET:case Z.AFTER_FRAMESET:{iu(this,t);break}case Z.IN_TABLE_TEXT:{tr(this,t);break}case Z.AFTER_BODY:{A00(this,t);break}case Z.AFTER_AFTER_BODY:case Z.AFTER_AFTER_FRAMESET:{m00(this,t);break}}}onDoctype(t){switch(this.skipNextNewLine=!1,this.insertionMode){case Z.INITIAL:{O00(this,t);break}case Z.BEFORE_HEAD:case Z.IN_HEAD:case Z.IN_HEAD_NO_SCRIPT:case Z.AFTER_HEAD:{this._err(t,M0.misplacedDoctype);break}case Z.IN_TABLE_TEXT:{tr(this,t);break}}}onStartTag(t){this.skipNextNewLine=!1,this.currentToken=t,this._processStartTag(t),t.selfClosing&&!t.ackSelfClosing&&this._err(t,M0.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(t){this.shouldProcessStartTagTokenInForeignContent(t)?H10(this,t):this._startTagOutsideForeignContent(t)}_startTagOutsideForeignContent(t){switch(this.insertionMode){case Z.INITIAL:{ja(this,t);break}case Z.BEFORE_HTML:{g00(this,t);break}case Z.BEFORE_HEAD:{k00(this,t);break}case Z.IN_HEAD:{Te(this,t);break}case Z.IN_HEAD_NO_SCRIPT:{w00(this,t);break}case Z.AFTER_HEAD:{S00(this,t);break}case Z.IN_BODY:{R2(this,t);break}case Z.IN_TABLE:{ls(this,t);break}case Z.IN_TABLE_TEXT:{tr(this,t);break}case Z.IN_CAPTION:{v10(this,t);break}case Z.IN_COLUMN_GROUP:{pu(this,t);break}case Z.IN_TABLE_BODY:{Hc(this,t);break}case Z.IN_ROW:{Vc(this,t);break}case Z.IN_CELL:{q10(this,t);break}case Z.IN_SELECT:{SO(this,t);break}case Z.IN_SELECT_IN_TABLE:{y10(this,t);break}case Z.IN_TEMPLATE:{B10(this,t);break}case Z.AFTER_BODY:{L10(this,t);break}case Z.IN_FRAMESET:{T10(this,t);break}case Z.AFTER_FRAMESET:{N10(this,t);break}case Z.AFTER_AFTER_BODY:{D10(this,t);break}case Z.AFTER_AFTER_FRAMESET:{P10(this,t);break}}}onEndTag(t){this.skipNextNewLine=!1,this.currentToken=t,this.currentNotInHTML?V10(this,t):this._endTagOutsideForeignContent(t)}_endTagOutsideForeignContent(t){switch(this.insertionMode){case Z.INITIAL:{ja(this,t);break}case Z.BEFORE_HTML:{C00(this,t);break}case Z.BEFORE_HEAD:{v00(this,t);break}case Z.IN_HEAD:{E00(this,t);break}case Z.IN_HEAD_NO_SCRIPT:{q00(this,t);break}case Z.AFTER_HEAD:{y00(this,t);break}case Z.IN_BODY:{Fc(this,t);break}case Z.TEXT:{M10(this,t);break}case Z.IN_TABLE:{$a(this,t);break}case Z.IN_TABLE_TEXT:{tr(this,t);break}case Z.IN_CAPTION:{E10(this,t);break}case Z.IN_COLUMN_GROUP:{w10(this,t);break}case Z.IN_TABLE_BODY:{du(this,t);break}case Z.IN_ROW:{qO(this,t);break}case Z.IN_CELL:{S10(this,t);break}case Z.IN_SELECT:{yO(this,t);break}case Z.IN_SELECT_IN_TABLE:{R10(this,t);break}case Z.IN_TEMPLATE:{W10(this,t);break}case Z.AFTER_BODY:{BO(this,t);break}case Z.IN_FRAMESET:{I10(this,t);break}case Z.AFTER_FRAMESET:{x10(this,t);break}case Z.AFTER_AFTER_BODY:{Kc(this,t);break}}}onEof(t){switch(this.insertionMode){case Z.INITIAL:{ja(this,t);break}case Z.BEFORE_HTML:{Ga(this,t);break}case Z.BEFORE_HEAD:{Ya(this,t);break}case Z.IN_HEAD:{Xa(this,t);break}case Z.IN_HEAD_NO_SCRIPT:{Za(this,t);break}case Z.AFTER_HEAD:{Ja(this,t);break}case Z.IN_BODY:case Z.IN_TABLE:case Z.IN_CAPTION:case Z.IN_COLUMN_GROUP:case Z.IN_TABLE_BODY:case Z.IN_ROW:case Z.IN_CELL:case Z.IN_SELECT:case Z.IN_SELECT_IN_TABLE:{kO(this,t);break}case Z.TEXT:{f10(this,t);break}case Z.IN_TABLE_TEXT:{tr(this,t);break}case Z.IN_TEMPLATE:{RO(this,t);break}case Z.AFTER_BODY:case Z.IN_FRAMESET:case Z.AFTER_FRAMESET:case Z.AFTER_AFTER_BODY:case Z.AFTER_AFTER_FRAMESET:{cu(this,t);break}}}onWhitespaceCharacter(t){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,t.chars.charCodeAt(0)===U.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 Z.IN_HEAD:case Z.IN_HEAD_NO_SCRIPT:case Z.AFTER_HEAD:case Z.TEXT:case Z.IN_COLUMN_GROUP:case Z.IN_SELECT:case Z.IN_SELECT_IN_TABLE:case Z.IN_FRAMESET:case Z.AFTER_FRAMESET:{this._insertCharacters(t);break}case Z.IN_BODY:case Z.IN_CAPTION:case Z.IN_CELL:case Z.IN_TEMPLATE:case Z.AFTER_BODY:case Z.AFTER_AFTER_BODY:case Z.AFTER_AFTER_FRAMESET:{_O(this,t);break}case Z.IN_TABLE:case Z.IN_TABLE_BODY:case Z.IN_ROW:{lu(this,t);break}case Z.IN_TABLE_TEXT:{vO(this,t);break}}}}function b00(e,t){let o=e.activeFormattingElements.getElementEntryInScopeWithTagName(t.tagName);return o?e.openElements.contains(o.element)?e.openElements.hasInScope(t.tagID)||(o=null):(e.activeFormattingElements.removeEntry(o),o=null):CO(e,t),o}function h00(e,t){let o=null,n=e.openElements.stackTop;for(;n>=0;n--){const s=e.openElements.items[n];if(s===t.element)break;e._isSpecialElement(s,e.openElements.tagIDs[n])&&(o=s)}return o||(e.openElements.shortenToLength(Math.max(n,0)),e.activeFormattingElements.removeEntry(t)),o}function M00(e,t,o){let n=t,s=e.openElements.getCommonAncestor(t);for(let a=0,r=s;r!==o;a++,r=s){s=e.openElements.getCommonAncestor(r);const i=e.activeFormattingElements.getElementEntry(r),c=i&&a>=d00;!i||c?(c&&e.activeFormattingElements.removeEntry(i),e.openElements.remove(r)):(r=f00(e,i),n===t&&(e.activeFormattingElements.bookmark=i),e.treeAdapter.detachNode(n),e.treeAdapter.appendChild(r,n),n=r)}return n}function f00(e,t){const o=e.treeAdapter.getNamespaceURI(t.element),n=e.treeAdapter.createElement(t.token.tagName,o,t.token.attrs);return e.openElements.replace(t.element,n),t.element=n,n}function _00(e,t,o){const n=e.treeAdapter.getTagName(t),s=cs(n);if(e._isElementCausesFosterParenting(s))e._fosterParentElement(o);else{const a=e.treeAdapter.getNamespaceURI(t);s===A.TEMPLATE&&a===E0.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,o)}}function z00(e,t,o){const n=e.treeAdapter.getNamespaceURI(o.element),{token:s}=o,a=e.treeAdapter.createElement(s.tagName,n,s.attrs);e._adoptNodes(t,a),e.treeAdapter.appendChild(t,a),e.activeFormattingElements.insertElementAfterBookmark(a,s),e.activeFormattingElements.removeEntry(o),e.openElements.remove(o.element),e.openElements.insertAfter(t,a,s.tagID)}function ru(e,t){for(let o=0;o<p00;o++){const n=b00(e,t);if(!n)break;const s=h00(e,n);if(!s)break;e.activeFormattingElements.bookmark=n;const a=M00(e,s,n.element),r=e.openElements.getCommonAncestor(n.element);e.treeAdapter.detachNode(a),r&&_00(e,r,a),z00(e,s,n)}}function iu(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function A00(e,t){e._appendCommentNode(t,e.openElements.items[0])}function m00(e,t){e._appendCommentNode(t,e.document)}function cu(e,t){if(e.stopped=!0,t.location){const o=e.fragmentContext?0:2;for(let n=e.openElements.stackTop;n>=o;n--)e._setEndLocation(e.openElements.items[n],t);if(!e.fragmentContext&&e.openElements.stackTop>=0){const n=e.openElements.items[0],s=e.treeAdapter.getNodeSourceCodeLocation(n);if(s&&!s.endTag&&(e._setEndLocation(n,t),e.openElements.stackTop>=1)){const a=e.openElements.items[1],r=e.treeAdapter.getNodeSourceCodeLocation(a);r&&!r.endTag&&e._setEndLocation(a,t)}}}}function O00(e,t){e._setDocumentType(t);const o=t.forceQuirks?_e.QUIRKS:Z$(t);X$(t)||e._err(t,M0.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,o),e.insertionMode=Z.BEFORE_HTML}function ja(e,t){e._err(t,M0.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,_e.QUIRKS),e.insertionMode=Z.BEFORE_HTML,e._processToken(t)}function g00(e,t){t.tagID===A.HTML?(e._insertElement(t,E0.HTML),e.insertionMode=Z.BEFORE_HEAD):Ga(e,t)}function C00(e,t){const o=t.tagID;(o===A.HTML||o===A.HEAD||o===A.BODY||o===A.BR)&&Ga(e,t)}function Ga(e,t){e._insertFakeRootElement(),e.insertionMode=Z.BEFORE_HEAD,e._processToken(t)}function k00(e,t){switch(t.tagID){case A.HTML:{R2(e,t);break}case A.HEAD:{e._insertElement(t,E0.HTML),e.headElement=e.openElements.current,e.insertionMode=Z.IN_HEAD;break}default:Ya(e,t)}}function v00(e,t){const o=t.tagID;o===A.HEAD||o===A.BODY||o===A.HTML||o===A.BR?Ya(e,t):e._err(t,M0.endTagWithoutMatchingOpenElement)}function Ya(e,t){e._insertFakeElement(l0.HEAD,A.HEAD),e.headElement=e.openElements.current,e.insertionMode=Z.IN_HEAD,e._processToken(t)}function Te(e,t){switch(t.tagID){case A.HTML:{R2(e,t);break}case A.BASE:case A.BASEFONT:case A.BGSOUND:case A.LINK:case A.META:{e._appendElement(t,E0.HTML),t.ackSelfClosing=!0;break}case A.TITLE:{e._switchToTextParsing(t,r2.RCDATA);break}case A.NOSCRIPT:{e.options.scriptingEnabled?e._switchToTextParsing(t,r2.RAWTEXT):(e._insertElement(t,E0.HTML),e.insertionMode=Z.IN_HEAD_NO_SCRIPT);break}case A.NOFRAMES:case A.STYLE:{e._switchToTextParsing(t,r2.RAWTEXT);break}case A.SCRIPT:{e._switchToTextParsing(t,r2.SCRIPT_DATA);break}case A.TEMPLATE:{e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=Z.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(Z.IN_TEMPLATE);break}case A.HEAD:{e._err(t,M0.misplacedStartTagForHeadElement);break}default:Xa(e,t)}}function E00(e,t){switch(t.tagID){case A.HEAD:{e.openElements.pop(),e.insertionMode=Z.AFTER_HEAD;break}case A.BODY:case A.BR:case A.HTML:{Xa(e,t);break}case A.TEMPLATE:{Jo(e,t);break}default:e._err(t,M0.endTagWithoutMatchingOpenElement)}}function Jo(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==A.TEMPLATE&&e._err(t,M0.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(A.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,M0.endTagWithoutMatchingOpenElement)}function Xa(e,t){e.openElements.pop(),e.insertionMode=Z.AFTER_HEAD,e._processToken(t)}function w00(e,t){switch(t.tagID){case A.HTML:{R2(e,t);break}case A.BASEFONT:case A.BGSOUND:case A.HEAD:case A.LINK:case A.META:case A.NOFRAMES:case A.STYLE:{Te(e,t);break}case A.NOSCRIPT:{e._err(t,M0.nestedNoscriptInHead);break}default:Za(e,t)}}function q00(e,t){switch(t.tagID){case A.NOSCRIPT:{e.openElements.pop(),e.insertionMode=Z.IN_HEAD;break}case A.BR:{Za(e,t);break}default:e._err(t,M0.endTagWithoutMatchingOpenElement)}}function Za(e,t){const o=t.type===p1.EOF?M0.openElementsLeftAfterEof:M0.disallowedContentInNoscriptInHead;e._err(t,o),e.openElements.pop(),e.insertionMode=Z.IN_HEAD,e._processToken(t)}function S00(e,t){switch(t.tagID){case A.HTML:{R2(e,t);break}case A.BODY:{e._insertElement(t,E0.HTML),e.framesetOk=!1,e.insertionMode=Z.IN_BODY;break}case A.FRAMESET:{e._insertElement(t,E0.HTML),e.insertionMode=Z.IN_FRAMESET;break}case A.BASE:case A.BASEFONT:case A.BGSOUND:case A.LINK:case A.META:case A.NOFRAMES:case A.SCRIPT:case A.STYLE:case A.TEMPLATE:case A.TITLE:{e._err(t,M0.abandonedHeadElementChild),e.openElements.push(e.headElement,A.HEAD),Te(e,t),e.openElements.remove(e.headElement);break}case A.HEAD:{e._err(t,M0.misplacedStartTagForHeadElement);break}default:Ja(e,t)}}function y00(e,t){switch(t.tagID){case A.BODY:case A.HTML:case A.BR:{Ja(e,t);break}case A.TEMPLATE:{Jo(e,t);break}default:e._err(t,M0.endTagWithoutMatchingOpenElement)}}function Ja(e,t){e._insertFakeElement(l0.BODY,A.BODY),e.insertionMode=Z.IN_BODY,Pc(e,t)}function Pc(e,t){switch(t.type){case p1.CHARACTER:{zO(e,t);break}case p1.WHITESPACE_CHARACTER:{_O(e,t);break}case p1.COMMENT:{iu(e,t);break}case p1.START_TAG:{R2(e,t);break}case p1.END_TAG:{Fc(e,t);break}case p1.EOF:{kO(e,t);break}}}function _O(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function zO(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function R00(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function B00(e,t){const o=e.openElements.tryPeekProperlyNestedBodyElement();o&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(o,t.attrs))}function W00(e,t){const o=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&o&&(e.treeAdapter.detachNode(o),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,E0.HTML),e.insertionMode=Z.IN_FRAMESET)}function L00(e,t){e.openElements.hasInButtonScope(A.P)&&e._closePElement(),e._insertElement(t,E0.HTML)}function T00(e,t){e.openElements.hasInButtonScope(A.P)&&e._closePElement(),e.openElements.currentTagId!==void 0&&nu.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,E0.HTML)}function I00(e,t){e.openElements.hasInButtonScope(A.P)&&e._closePElement(),e._insertElement(t,E0.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function N00(e,t){const o=e.openElements.tmplCount>0;(!e.formElement||o)&&(e.openElements.hasInButtonScope(A.P)&&e._closePElement(),e._insertElement(t,E0.HTML),o||(e.formElement=e.openElements.current))}function x00(e,t){e.framesetOk=!1;const o=t.tagID;for(let n=e.openElements.stackTop;n>=0;n--){const s=e.openElements.tagIDs[n];if(o===A.LI&&s===A.LI||(o===A.DD||o===A.DT)&&(s===A.DD||s===A.DT)){e.openElements.generateImpliedEndTagsWithExclusion(s),e.openElements.popUntilTagNamePopped(s);break}if(s!==A.ADDRESS&&s!==A.DIV&&s!==A.P&&e._isSpecialElement(e.openElements.items[n],s))break}e.openElements.hasInButtonScope(A.P)&&e._closePElement(),e._insertElement(t,E0.HTML)}function D00(e,t){e.openElements.hasInButtonScope(A.P)&&e._closePElement(),e._insertElement(t,E0.HTML),e.tokenizer.state=r2.PLAINTEXT}function P00(e,t){e.openElements.hasInScope(A.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(A.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,E0.HTML),e.framesetOk=!1}function F00(e,t){const o=e.activeFormattingElements.getElementEntryInScopeWithTagName(l0.A);o&&(ru(e,t),e.openElements.remove(o.element),e.activeFormattingElements.removeEntry(o)),e._reconstructActiveFormattingElements(),e._insertElement(t,E0.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function Q00(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,E0.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function H00(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(A.NOBR)&&(ru(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,E0.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function V00(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,E0.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function U00(e,t){e.treeAdapter.getDocumentMode(e.document)!==_e.QUIRKS&&e.openElements.hasInButtonScope(A.P)&&e._closePElement(),e._insertElement(t,E0.HTML),e.framesetOk=!1,e.insertionMode=Z.IN_TABLE}function AO(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,E0.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function mO(e){const t=Jm(e,Zo.TYPE);return t!=null&&t.toLowerCase()===l00}function K00(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,E0.HTML),mO(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function j00(e,t){e._appendElement(t,E0.HTML),t.ackSelfClosing=!0}function G00(e,t){e.openElements.hasInButtonScope(A.P)&&e._closePElement(),e._appendElement(t,E0.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function Y00(e,t){t.tagName=l0.IMG,t.tagID=A.IMG,AO(e,t)}function X00(e,t){e._insertElement(t,E0.HTML),e.skipNextNewLine=!0,e.tokenizer.state=r2.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=Z.TEXT}function Z00(e,t){e.openElements.hasInButtonScope(A.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,r2.RAWTEXT)}function J00(e,t){e.framesetOk=!1,e._switchToTextParsing(t,r2.RAWTEXT)}function OO(e,t){e._switchToTextParsing(t,r2.RAWTEXT)}function $00(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,E0.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===Z.IN_TABLE||e.insertionMode===Z.IN_CAPTION||e.insertionMode===Z.IN_TABLE_BODY||e.insertionMode===Z.IN_ROW||e.insertionMode===Z.IN_CELL?Z.IN_SELECT_IN_TABLE:Z.IN_SELECT}function e10(e,t){e.openElements.currentTagId===A.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,E0.HTML)}function t10(e,t){e.openElements.hasInScope(A.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,E0.HTML)}function o10(e,t){e.openElements.hasInScope(A.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(A.RTC),e._insertElement(t,E0.HTML)}function n10(e,t){e._reconstructActiveFormattingElements(),uO(t),au(t),t.selfClosing?e._appendElement(t,E0.MATHML):e._insertElement(t,E0.MATHML),t.ackSelfClosing=!0}function s10(e,t){e._reconstructActiveFormattingElements(),bO(t),au(t),t.selfClosing?e._appendElement(t,E0.SVG):e._insertElement(t,E0.SVG),t.ackSelfClosing=!0}function gO(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,E0.HTML)}function R2(e,t){switch(t.tagID){case A.I:case A.S:case A.B:case A.U:case A.EM:case A.TT:case A.BIG:case A.CODE:case A.FONT:case A.SMALL:case A.STRIKE:case A.STRONG:{Q00(e,t);break}case A.A:{F00(e,t);break}case A.H1:case A.H2:case A.H3:case A.H4:case A.H5:case A.H6:{T00(e,t);break}case A.P:case A.DL:case A.OL:case A.UL:case A.DIV:case A.DIR:case A.NAV:case A.MAIN:case A.MENU:case A.ASIDE:case A.CENTER:case A.FIGURE:case A.FOOTER:case A.HEADER:case A.HGROUP:case A.DIALOG:case A.DETAILS:case A.ADDRESS:case A.ARTICLE:case A.SEARCH:case A.SECTION:case A.SUMMARY:case A.FIELDSET:case A.BLOCKQUOTE:case A.FIGCAPTION:{L00(e,t);break}case A.LI:case A.DD:case A.DT:{x00(e,t);break}case A.BR:case A.IMG:case A.WBR:case A.AREA:case A.EMBED:case A.KEYGEN:{AO(e,t);break}case A.HR:{G00(e,t);break}case A.RB:case A.RTC:{t10(e,t);break}case A.RT:case A.RP:{o10(e,t);break}case A.PRE:case A.LISTING:{I00(e,t);break}case A.XMP:{Z00(e,t);break}case A.SVG:{s10(e,t);break}case A.HTML:{R00(e,t);break}case A.BASE:case A.LINK:case A.META:case A.STYLE:case A.TITLE:case A.SCRIPT:case A.BGSOUND:case A.BASEFONT:case A.TEMPLATE:{Te(e,t);break}case A.BODY:{B00(e,t);break}case A.FORM:{N00(e,t);break}case A.NOBR:{H00(e,t);break}case A.MATH:{n10(e,t);break}case A.TABLE:{U00(e,t);break}case A.INPUT:{K00(e,t);break}case A.PARAM:case A.TRACK:case A.SOURCE:{j00(e,t);break}case A.IMAGE:{Y00(e,t);break}case A.BUTTON:{P00(e,t);break}case A.APPLET:case A.OBJECT:case A.MARQUEE:{V00(e,t);break}case A.IFRAME:{J00(e,t);break}case A.SELECT:{$00(e,t);break}case A.OPTION:case A.OPTGROUP:{e10(e,t);break}case A.NOEMBED:case A.NOFRAMES:{OO(e,t);break}case A.FRAMESET:{W00(e,t);break}case A.TEXTAREA:{X00(e,t);break}case A.NOSCRIPT:{e.options.scriptingEnabled?OO(e,t):gO(e,t);break}case A.PLAINTEXT:{D00(e,t);break}case A.COL:case A.TH:case A.TD:case A.TR:case A.HEAD:case A.FRAME:case A.TBODY:case A.TFOOT:case A.THEAD:case A.CAPTION:case A.COLGROUP:break;default:gO(e,t)}}function a10(e,t){if(e.openElements.hasInScope(A.BODY)&&(e.insertionMode=Z.AFTER_BODY,e.options.sourceCodeLocationInfo)){const o=e.openElements.tryPeekProperlyNestedBodyElement();o&&e._setEndLocation(o,t)}}function r10(e,t){e.openElements.hasInScope(A.BODY)&&(e.insertionMode=Z.AFTER_BODY,BO(e,t))}function i10(e,t){const o=t.tagID;e.openElements.hasInScope(o)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(o))}function c10(e){const t=e.openElements.tmplCount>0,{formElement:o}=e;t||(e.formElement=null),(o||t)&&e.openElements.hasInScope(A.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(A.FORM):o&&e.openElements.remove(o))}function l10(e){e.openElements.hasInButtonScope(A.P)||e._insertFakeElement(l0.P,A.P),e._closePElement()}function p10(e){e.openElements.hasInListItemScope(A.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(A.LI),e.openElements.popUntilTagNamePopped(A.LI))}function d10(e,t){const o=t.tagID;e.openElements.hasInScope(o)&&(e.openElements.generateImpliedEndTagsWithExclusion(o),e.openElements.popUntilTagNamePopped(o))}function u10(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function b10(e,t){const o=t.tagID;e.openElements.hasInScope(o)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(o),e.activeFormattingElements.clearToLastMarker())}function h10(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(l0.BR,A.BR),e.openElements.pop(),e.framesetOk=!1}function CO(e,t){const o=t.tagName,n=t.tagID;for(let s=e.openElements.stackTop;s>0;s--){const a=e.openElements.items[s],r=e.openElements.tagIDs[s];if(n===r&&(n!==A.UNKNOWN||e.treeAdapter.getTagName(a)===o)){e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.stackTop>=s&&e.openElements.shortenToLength(s);break}if(e._isSpecialElement(a,r))break}}function Fc(e,t){switch(t.tagID){case A.A:case A.B:case A.I:case A.S:case A.U:case A.EM:case A.TT:case A.BIG:case A.CODE:case A.FONT:case A.NOBR:case A.SMALL:case A.STRIKE:case A.STRONG:{ru(e,t);break}case A.P:{l10(e);break}case A.DL:case A.UL:case A.OL:case A.DIR:case A.DIV:case A.NAV:case A.PRE:case A.MAIN:case A.MENU:case A.ASIDE:case A.BUTTON:case A.CENTER:case A.FIGURE:case A.FOOTER:case A.HEADER:case A.HGROUP:case A.DIALOG:case A.ADDRESS:case A.ARTICLE:case A.DETAILS:case A.SEARCH:case A.SECTION:case A.SUMMARY:case A.LISTING:case A.FIELDSET:case A.BLOCKQUOTE:case A.FIGCAPTION:{i10(e,t);break}case A.LI:{p10(e);break}case A.DD:case A.DT:{d10(e,t);break}case A.H1:case A.H2:case A.H3:case A.H4:case A.H5:case A.H6:{u10(e);break}case A.BR:{h10(e);break}case A.BODY:{a10(e,t);break}case A.HTML:{r10(e,t);break}case A.FORM:{c10(e);break}case A.APPLET:case A.OBJECT:case A.MARQUEE:{b10(e,t);break}case A.TEMPLATE:{Jo(e,t);break}default:CO(e,t)}}function kO(e,t){e.tmplInsertionModeStack.length>0?RO(e,t):cu(e,t)}function M10(e,t){var o;t.tagID===A.SCRIPT&&((o=e.scriptHandler)===null||o===void 0||o.call(e,e.openElements.current)),e.openElements.pop(),e.insertionMode=e.originalInsertionMode}function f10(e,t){e._err(t,M0.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function lu(e,t){if(e.openElements.currentTagId!==void 0&&hO.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=Z.IN_TABLE_TEXT,t.type){case p1.CHARACTER:{EO(e,t);break}case p1.WHITESPACE_CHARACTER:{vO(e,t);break}}else er(e,t)}function _10(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,E0.HTML),e.insertionMode=Z.IN_CAPTION}function z10(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,E0.HTML),e.insertionMode=Z.IN_COLUMN_GROUP}function A10(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(l0.COLGROUP,A.COLGROUP),e.insertionMode=Z.IN_COLUMN_GROUP,pu(e,t)}function m10(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,E0.HTML),e.insertionMode=Z.IN_TABLE_BODY}function O10(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(l0.TBODY,A.TBODY),e.insertionMode=Z.IN_TABLE_BODY,Hc(e,t)}function g10(e,t){e.openElements.hasInTableScope(A.TABLE)&&(e.openElements.popUntilTagNamePopped(A.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function C10(e,t){mO(t)?e._appendElement(t,E0.HTML):er(e,t),t.ackSelfClosing=!0}function k10(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,E0.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function ls(e,t){switch(t.tagID){case A.TD:case A.TH:case A.TR:{O10(e,t);break}case A.STYLE:case A.SCRIPT:case A.TEMPLATE:{Te(e,t);break}case A.COL:{A10(e,t);break}case A.FORM:{k10(e,t);break}case A.TABLE:{g10(e,t);break}case A.TBODY:case A.TFOOT:case A.THEAD:{m10(e,t);break}case A.INPUT:{C10(e,t);break}case A.CAPTION:{_10(e,t);break}case A.COLGROUP:{z10(e,t);break}default:er(e,t)}}function $a(e,t){switch(t.tagID){case A.TABLE:{e.openElements.hasInTableScope(A.TABLE)&&(e.openElements.popUntilTagNamePopped(A.TABLE),e._resetInsertionMode());break}case A.TEMPLATE:{Jo(e,t);break}case A.BODY:case A.CAPTION:case A.COL:case A.COLGROUP:case A.HTML:case A.TBODY:case A.TD:case A.TFOOT:case A.TH:case A.THEAD:case A.TR:break;default:er(e,t)}}function er(e,t){const o=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,Pc(e,t),e.fosterParentingEnabled=o}function vO(e,t){e.pendingCharacterTokens.push(t)}function EO(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function tr(e,t){let o=0;if(e.hasNonWhitespacePendingCharacterToken)for(;o<e.pendingCharacterTokens.length;o++)er(e,e.pendingCharacterTokens[o]);else for(;o<e.pendingCharacterTokens.length;o++)e._insertCharacters(e.pendingCharacterTokens[o]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}const wO=new Set([A.CAPTION,A.COL,A.COLGROUP,A.TBODY,A.TD,A.TFOOT,A.TH,A.THEAD,A.TR]);function v10(e,t){const o=t.tagID;wO.has(o)?e.openElements.hasInTableScope(A.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(A.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=Z.IN_TABLE,ls(e,t)):R2(e,t)}function E10(e,t){const o=t.tagID;switch(o){case A.CAPTION:case A.TABLE:{e.openElements.hasInTableScope(A.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(A.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=Z.IN_TABLE,o===A.TABLE&&$a(e,t));break}case A.BODY:case A.COL:case A.COLGROUP:case A.HTML:case A.TBODY:case A.TD:case A.TFOOT:case A.TH:case A.THEAD:case A.TR:break;default:Fc(e,t)}}function pu(e,t){switch(t.tagID){case A.HTML:{R2(e,t);break}case A.COL:{e._appendElement(t,E0.HTML),t.ackSelfClosing=!0;break}case A.TEMPLATE:{Te(e,t);break}default:Qc(e,t)}}function w10(e,t){switch(t.tagID){case A.COLGROUP:{e.openElements.currentTagId===A.COLGROUP&&(e.openElements.pop(),e.insertionMode=Z.IN_TABLE);break}case A.TEMPLATE:{Jo(e,t);break}case A.COL:break;default:Qc(e,t)}}function Qc(e,t){e.openElements.currentTagId===A.COLGROUP&&(e.openElements.pop(),e.insertionMode=Z.IN_TABLE,e._processToken(t))}function Hc(e,t){switch(t.tagID){case A.TR:{e.openElements.clearBackToTableBodyContext(),e._insertElement(t,E0.HTML),e.insertionMode=Z.IN_ROW;break}case A.TH:case A.TD:{e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(l0.TR,A.TR),e.insertionMode=Z.IN_ROW,Vc(e,t);break}case A.CAPTION:case A.COL:case A.COLGROUP:case A.TBODY:case A.TFOOT:case A.THEAD:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=Z.IN_TABLE,ls(e,t));break}default:ls(e,t)}}function du(e,t){const o=t.tagID;switch(t.tagID){case A.TBODY:case A.TFOOT:case A.THEAD:{e.openElements.hasInTableScope(o)&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=Z.IN_TABLE);break}case A.TABLE:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=Z.IN_TABLE,$a(e,t));break}case A.BODY:case A.CAPTION:case A.COL:case A.COLGROUP:case A.HTML:case A.TD:case A.TH:case A.TR:break;default:$a(e,t)}}function Vc(e,t){switch(t.tagID){case A.TH:case A.TD:{e.openElements.clearBackToTableRowContext(),e._insertElement(t,E0.HTML),e.insertionMode=Z.IN_CELL,e.activeFormattingElements.insertMarker();break}case A.CAPTION:case A.COL:case A.COLGROUP:case A.TBODY:case A.TFOOT:case A.THEAD:case A.TR:{e.openElements.hasInTableScope(A.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=Z.IN_TABLE_BODY,Hc(e,t));break}default:ls(e,t)}}function qO(e,t){switch(t.tagID){case A.TR:{e.openElements.hasInTableScope(A.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=Z.IN_TABLE_BODY);break}case A.TABLE:{e.openElements.hasInTableScope(A.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=Z.IN_TABLE_BODY,du(e,t));break}case A.TBODY:case A.TFOOT:case A.THEAD:{(e.openElements.hasInTableScope(t.tagID)||e.openElements.hasInTableScope(A.TR))&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=Z.IN_TABLE_BODY,du(e,t));break}case A.BODY:case A.CAPTION:case A.COL:case A.COLGROUP:case A.HTML:case A.TD:case A.TH:break;default:$a(e,t)}}function q10(e,t){const o=t.tagID;wO.has(o)?(e.openElements.hasInTableScope(A.TD)||e.openElements.hasInTableScope(A.TH))&&(e._closeTableCell(),Vc(e,t)):R2(e,t)}function S10(e,t){const o=t.tagID;switch(o){case A.TD:case A.TH:{e.openElements.hasInTableScope(o)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(o),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=Z.IN_ROW);break}case A.TABLE:case A.TBODY:case A.TFOOT:case A.THEAD:case A.TR:{e.openElements.hasInTableScope(o)&&(e._closeTableCell(),qO(e,t));break}case A.BODY:case A.CAPTION:case A.COL:case A.COLGROUP:case A.HTML:break;default:Fc(e,t)}}function SO(e,t){switch(t.tagID){case A.HTML:{R2(e,t);break}case A.OPTION:{e.openElements.currentTagId===A.OPTION&&e.openElements.pop(),e._insertElement(t,E0.HTML);break}case A.OPTGROUP:{e.openElements.currentTagId===A.OPTION&&e.openElements.pop(),e.openElements.currentTagId===A.OPTGROUP&&e.openElements.pop(),e._insertElement(t,E0.HTML);break}case A.HR:{e.openElements.currentTagId===A.OPTION&&e.openElements.pop(),e.openElements.currentTagId===A.OPTGROUP&&e.openElements.pop(),e._appendElement(t,E0.HTML),t.ackSelfClosing=!0;break}case A.INPUT:case A.KEYGEN:case A.TEXTAREA:case A.SELECT:{e.openElements.hasInSelectScope(A.SELECT)&&(e.openElements.popUntilTagNamePopped(A.SELECT),e._resetInsertionMode(),t.tagID!==A.SELECT&&e._processStartTag(t));break}case A.SCRIPT:case A.TEMPLATE:{Te(e,t);break}}}function yO(e,t){switch(t.tagID){case A.OPTGROUP:{e.openElements.stackTop>0&&e.openElements.currentTagId===A.OPTION&&e.openElements.tagIDs[e.openElements.stackTop-1]===A.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagId===A.OPTGROUP&&e.openElements.pop();break}case A.OPTION:{e.openElements.currentTagId===A.OPTION&&e.openElements.pop();break}case A.SELECT:{e.openElements.hasInSelectScope(A.SELECT)&&(e.openElements.popUntilTagNamePopped(A.SELECT),e._resetInsertionMode());break}case A.TEMPLATE:{Jo(e,t);break}}}function y10(e,t){const o=t.tagID;o===A.CAPTION||o===A.TABLE||o===A.TBODY||o===A.TFOOT||o===A.THEAD||o===A.TR||o===A.TD||o===A.TH?(e.openElements.popUntilTagNamePopped(A.SELECT),e._resetInsertionMode(),e._processStartTag(t)):SO(e,t)}function R10(e,t){const o=t.tagID;o===A.CAPTION||o===A.TABLE||o===A.TBODY||o===A.TFOOT||o===A.THEAD||o===A.TR||o===A.TD||o===A.TH?e.openElements.hasInTableScope(o)&&(e.openElements.popUntilTagNamePopped(A.SELECT),e._resetInsertionMode(),e.onEndTag(t)):yO(e,t)}function B10(e,t){switch(t.tagID){case A.BASE:case A.BASEFONT:case A.BGSOUND:case A.LINK:case A.META:case A.NOFRAMES:case A.SCRIPT:case A.STYLE:case A.TEMPLATE:case A.TITLE:{Te(e,t);break}case A.CAPTION:case A.COLGROUP:case A.TBODY:case A.TFOOT:case A.THEAD:{e.tmplInsertionModeStack[0]=Z.IN_TABLE,e.insertionMode=Z.IN_TABLE,ls(e,t);break}case A.COL:{e.tmplInsertionModeStack[0]=Z.IN_COLUMN_GROUP,e.insertionMode=Z.IN_COLUMN_GROUP,pu(e,t);break}case A.TR:{e.tmplInsertionModeStack[0]=Z.IN_TABLE_BODY,e.insertionMode=Z.IN_TABLE_BODY,Hc(e,t);break}case A.TD:case A.TH:{e.tmplInsertionModeStack[0]=Z.IN_ROW,e.insertionMode=Z.IN_ROW,Vc(e,t);break}default:e.tmplInsertionModeStack[0]=Z.IN_BODY,e.insertionMode=Z.IN_BODY,R2(e,t)}}function W10(e,t){t.tagID===A.TEMPLATE&&Jo(e,t)}function RO(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(A.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):cu(e,t)}function L10(e,t){t.tagID===A.HTML?R2(e,t):Uc(e,t)}function BO(e,t){var o;if(t.tagID===A.HTML){if(e.fragmentContext||(e.insertionMode=Z.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===A.HTML){e._setEndLocation(e.openElements.items[0],t);const n=e.openElements.items[1];n&&!(!((o=e.treeAdapter.getNodeSourceCodeLocation(n))===null||o===void 0)&&o.endTag)&&e._setEndLocation(n,t)}}else Uc(e,t)}function Uc(e,t){e.insertionMode=Z.IN_BODY,Pc(e,t)}function T10(e,t){switch(t.tagID){case A.HTML:{R2(e,t);break}case A.FRAMESET:{e._insertElement(t,E0.HTML);break}case A.FRAME:{e._appendElement(t,E0.HTML),t.ackSelfClosing=!0;break}case A.NOFRAMES:{Te(e,t);break}}}function I10(e,t){t.tagID===A.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==A.FRAMESET&&(e.insertionMode=Z.AFTER_FRAMESET))}function N10(e,t){switch(t.tagID){case A.HTML:{R2(e,t);break}case A.NOFRAMES:{Te(e,t);break}}}function x10(e,t){t.tagID===A.HTML&&(e.insertionMode=Z.AFTER_AFTER_FRAMESET)}function D10(e,t){t.tagID===A.HTML?R2(e,t):Kc(e,t)}function Kc(e,t){e.insertionMode=Z.IN_BODY,Pc(e,t)}function P10(e,t){switch(t.tagID){case A.HTML:{R2(e,t);break}case A.NOFRAMES:{Te(e,t);break}}}function F10(e,t){t.chars=Z1,e._insertCharacters(t)}function Q10(e,t){e._insertCharacters(t),e.framesetOk=!1}function WO(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==E0.HTML&&e.openElements.currentTagId!==void 0&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function H10(e,t){if(s00(t))WO(e),e._startTagOutsideForeignContent(t);else{const o=e._getAdjustedCurrentElement(),n=e.treeAdapter.getNamespaceURI(o);n===E0.MATHML?uO(t):n===E0.SVG&&(a00(t),bO(t)),au(t),t.selfClosing?e._appendElement(t,n):e._insertElement(t,n),t.ackSelfClosing=!0}}function V10(e,t){if(t.tagID===A.P||t.tagID===A.BR){WO(e),e._endTagOutsideForeignContent(t);return}for(let o=e.openElements.stackTop;o>0;o--){const n=e.openElements.items[o];if(e.treeAdapter.getNamespaceURI(n)===E0.HTML){e._endTagOutsideForeignContent(t);break}const s=e.treeAdapter.getTagName(n);if(s.toLowerCase()===t.tagName){t.tagName=s,e.openElements.shortenToLength(o);break}}}l0.AREA,l0.BASE,l0.BASEFONT,l0.BGSOUND,l0.BR,l0.COL,l0.EMBED,l0.FRAME,l0.HR,l0.IMG,l0.INPUT,l0.KEYGEN,l0.LINK,l0.META,l0.PARAM,l0.SOURCE,l0.TRACK,l0.WBR;const U10=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,K10=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),LO={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function TO(e,t){const o=o20(e),n=fm("type",{handlers:{root:j10,element:G10,text:Y10,comment:NO,doctype:X10,raw:J10},unknown:$10}),s={parser:o?new fO(LO):fO.getFragmentParser(void 0,LO),handle(i){n(i,s)},stitches:!1,options:t||{}};n(e,s),ps(s,Xe());const a=o?s.parser.document:s.parser.getFragment(),r=n$(a,{file:s.options.file});return s.stitches&&Wc(r,"comment",function(i,c,l){const p=i;if(p.value.stitch&&l&&c!==void 0){const d=l.children;return d[c]=p.value.stitch,c}}),r.type==="root"&&r.children.length===1&&r.children[0].type===e.type?r.children[0]:r}function IO(e,t){let o=-1;if(e)for(;++o<e.length;)t.handle(e[o])}function j10(e,t){IO(e.children,t)}function G10(e,t){e20(e,t),IO(e.children,t),t20(e,t)}function Y10(e,t){t.parser.tokenizer.state>4&&(t.parser.tokenizer.state=0);const o={type:p1.CHARACTER,chars:e.value,location:or(e)};ps(t,Xe(e)),t.parser.currentToken=o,t.parser._processToken(t.parser.currentToken)}function X10(e,t){const o={type:p1.DOCTYPE,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:or(e)};ps(t,Xe(e)),t.parser.currentToken=o,t.parser._processToken(t.parser.currentToken)}function Z10(e,t){t.stitches=!0;const o=n20(e);if("children"in e&&"children"in o){const n=TO({type:"root",children:e.children},t.options);o.children=n.children}NO({type:"comment",value:{stitch:o}},t)}function NO(e,t){const o=e.value,n={type:p1.COMMENT,data:o,location:or(e)};ps(t,Xe(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function J10(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,xO(t,Xe(e)),t.parser.tokenizer.write(t.options.tagfilter?e.value.replace(U10,"&lt;$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 o=t.parser.tokenizer._consume();t.parser.tokenizer._callState(o)}}function $10(e,t){const o=e;if(t.options.passThrough&&t.options.passThrough.includes(o.type))Z10(o,t);else{let n="";throw K10.has(o.type)&&(n=". 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 `"+o.type+"` node"+n)}}function ps(e,t){xO(e,t);const o=e.parser.tokenizer.currentCharacterToken;o&&o.location&&(o.location.endLine=e.parser.tokenizer.preprocessor.line,o.location.endCol=e.parser.tokenizer.preprocessor.col+1,o.location.endOffset=e.parser.tokenizer.preprocessor.offset+1,e.parser.currentToken=o,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=r2.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 xO(e,t){if(t&&t.offset!==void 0){const o={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=o}}function e20(e,t){const o=e.tagName.toLowerCase();if(t.parser.tokenizer.state===r2.PLAINTEXT)return;ps(t,Xe(e));const n=t.parser.openElements.current;let s="namespaceURI"in n?n.namespaceURI:Xo.html;s===Xo.html&&o==="svg"&&(s=Xo.svg);const a=c$({...e,children:[]},{space:s===Xo.svg?"svg":"html"}),r={type:p1.START_TAG,tagName:o,tagID:cs(o),selfClosing:!1,ackSelfClosing:!1,attrs:"attrs"in a?a.attrs:[],location:or(e)};t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=o}function t20(e,t){const o=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&f$.includes(o)||t.parser.tokenizer.state===r2.PLAINTEXT)return;ps(t,Oc(e));const n={type:p1.END_TAG,tagName:o,tagID:cs(o),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:or(e)};t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken),o===t.parser.tokenizer.lastStartTagName&&(t.parser.tokenizer.state===r2.RCDATA||t.parser.tokenizer.state===r2.RAWTEXT||t.parser.tokenizer.state===r2.SCRIPT_DATA)&&(t.parser.tokenizer.state=r2.DATA)}function o20(e){const t=e.type==="root"?e.children[0]:e;return!!(t&&(t.type==="doctype"||t.type==="element"&&t.tagName.toLowerCase()==="html"))}function or(e){const t=Xe(e)||{line:void 0,column:void 0,offset:void 0},o=Oc(e)||{line:void 0,column:void 0,offset:void 0};return{startLine:t.line,startCol:t.column,startOffset:t.offset,endLine:o.line,endCol:o.column,endOffset:o.offset}}function n20(e){return"children"in e?ss({...e,children:[]}):ss(e)}function s20(e){return function(t,o){return TO(t,{...e,file:o})}}const a20=[KJ],r20=[s20],uu=h.memo(({content:e,components:t,useRehypeRaw:o=!1})=>u0.jsx(WX,{remarkPlugins:a20,rehypePlugins:o?r20:void 0,components:t,children:e}),(e,t)=>e.content===t.content&&e.components===t.components&&e.useRehypeRaw===t.useRehypeRaw),DO=()=>{const e="Working on it",t=["Counting backwards from infinity","Thinking","Thinking even more","Planning my response","Synthesizing the answer","Organizing thoughts","Reviewing the context","Connecting the dots","Dotting i's and crossing t's","Formulating a reply"],[o,n]=h.useState(e);return h.useEffect(()=>{n(e);const s=setInterval(()=>{n(t[Math.floor(Math.random()*t.length)])},8e3);return()=>{clearInterval(s),n(e)}},[]),u0.jsxs("div",{className:"agent-thinking",children:[u0.jsxs("div",{className:"dot-container",children:[u0.jsx("div",{className:"dot first"}),u0.jsx("div",{className:"dot second"}),u0.jsx("div",{className:"dot third"})]}),o]})},i20=h.memo(({streamingResponse:e,isAgentThinking:t,markdownComponents:o})=>u0.jsxs(u0.Fragment,{children:[e&&u0.jsxs(zc,{children:[u0.jsx(uu,{content:e,components:o,useRehypeRaw:!0}),t&&u0.jsx(DO,{}),!t&&u0.jsx("div",{className:"agent-thinking"})]}),!e&&t&&u0.jsx(zc,{children:u0.jsx(DO,{})})]}));var bu,PO;function c20(){return PO||(PO=1,bu=function(e){(function(t,o,n,s,a,r,i){t[n]=t[n]||function(){(t[n].q=t[n].q||[]).push(arguments)},r=o.createElement(s),r.async=1,r.src="https://www.clarity.ms/tag/"+a,i=o.getElementsByTagName(s)[0],i.parentNode.insertBefore(r,i)})(window,document,"clarity","script",e)}),bu}var hu,FO;function l20(){if(FO)return hu;FO=1;var e=c20();function t(){var d=Array.prototype.slice.call(arguments);if(!window.clarity)throw new Error("Clarity is not initialized");window.clarity.apply(void 0,d)}function o(d){e(d)}function n(){return typeof window.clarity=="function"}function s(d,b){t("identify",d,b)}function a(d=!0){t("consent",d)}function r(){t("stop")}function i(){t("start")}function c(d,b){t("set",d,b)}function l(d){t("event",d)}function p(d){t("upgrade",d)}return hu={clarity:{init:o,hasStarted:n,identify:s,consent:a,stop:r,start:i,setTag:c,setEvent:l,upgrade:p}},hu}var $o=l20();const p20=({children:e,token:t,env:o,currentUser:n,flags:s,isInCustomerView:a,agentApiService:r,hideAgentPanelCallback:i,isAgentPanelOpenProp:c,currentApp:l,currentConversationId:p})=>{const[d,b]=W.useState(c??!1),[M,f]=W.useState(p??null),[m,O]=W.useState(""),[g,C]=W.useState("active"),[E,L]=W.useState(!1),[T,I]=W.useState(!1),[Q,z]=W.useState(n??null),[x,q]=W.useState(s),[R,H]=W.useState(r??null),[w,N]=W.useState(a??!1),[v,V]=W.useState(t??null),[F,$]=W.useState(o??""),[t0,B]=W.useState(l);W.useEffect(()=>{p!==void 0&&f(p)},[p]),W.useEffect(()=>{t!==void 0&&V(t)},[t]),W.useEffect(()=>{o!==void 0&&$(o)},[o]),W.useEffect(()=>{n!==void 0&&z(n)},[n]),W.useEffect(()=>{s!==void 0&&q(s)},[s]),W.useEffect(()=>{a!==void 0&&N(a)},[a]),W.useEffect(()=>{r!==void 0&&H(r)},[r]),W.useEffect(()=>{c!==void 0&&b(c)},[c]),W.useEffect(()=>{l!==void 0&&B(l)},[l]);const o0=W.useCallback(()=>{$o.clarity.setEvent("Agent Panel opened"),b(!0)},[]),a0=W.useCallback(()=>{$o.clarity.setEvent("Agent Panel closed"),b(!1),i?.()},[i]),D=W.useCallback(f0=>{f(f0)},[]),Y=W.useCallback(()=>b(f0=>!f0),[]),j=W.useCallback(f0=>{O(f0)},[]),G=W.useCallback(f0=>{C(f0)},[]),s0=W.useCallback(f0=>{L(f0)},[]),p0=W.useCallback(f0=>{I(f0)},[]),C0=W.useMemo(()=>({agentApiService:R,showAgentPanel:o0,hideAgentPanel:a0,toggleAgentPanelVisibility:Y,isAgentPanelOpen:d,currentConversationId:M,updateCurrentConversationId:D,lastSentUserMessage:m,updateLastSentUserMessage:j,usageStatus:g,updateUsageStatus:G,userHasAgentPerms:E,updateUserHasAgentPerms:s0,isInPreprod:T,updateIsInPreprod:p0,currentUser:Q,flags:x,isInCustomerView:w,token:v,env:F,currentApp:t0}),[R,Y,d,o0,a0,M,m,D,j,g,G,E,s0,T,p0,Q,x,w,v,F,t0]);return u0.jsx(hb.Provider,{value:C0,children:e})};function Mu(){return Mu=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)({}).hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e},Mu.apply(null,arguments)}var d20=W.useLayoutEffect,u20=function(t){var o=W.useRef(t);return d20(function(){o.current=t}),o},QO=function(t,o){if(typeof t=="function"){t(o);return}t.current=o},b20=function(t,o){var n=W.useRef();return W.useCallback(function(s){t.current=s,n.current&&QO(n.current,null),n.current=o,o&&QO(o,s)},[o])},HO={"min-height":"0","max-height":"none",height:"0",visibility:"hidden",overflow:"hidden",position:"absolute","z-index":"-1000",top:"0",right:"0",display:"block"},h20=function(t){Object.keys(HO).forEach(function(o){t.style.setProperty(o,HO[o],"important")})},VO=h20,D2=null,UO=function(t,o){var n=t.scrollHeight;return o.sizingStyle.boxSizing==="border-box"?n+o.borderSize:n-o.paddingSize};function M20(e,t,o,n){o===void 0&&(o=1),n===void 0&&(n=1/0),D2||(D2=document.createElement("textarea"),D2.setAttribute("tabindex","-1"),D2.setAttribute("aria-hidden","true"),VO(D2)),D2.parentNode===null&&document.body.appendChild(D2);var s=e.paddingSize,a=e.borderSize,r=e.sizingStyle,i=r.boxSizing;Object.keys(r).forEach(function(b){var M=b;D2.style[M]=r[M]}),VO(D2),D2.value=t;var c=UO(D2,e);D2.value=t,c=UO(D2,e),D2.value="x";var l=D2.scrollHeight-s,p=l*o;i==="border-box"&&(p=p+s+a),c=Math.max(p,c);var d=l*n;return i==="border-box"&&(d=d+s+a),c=Math.min(d,c),[c,l]}var KO=function(){},f20=function(t,o){return t.reduce(function(n,s){return n[s]=o[s],n},{})},_20=["borderBottomWidth","borderLeftWidth","borderRightWidth","borderTopWidth","boxSizing","fontFamily","fontSize","fontStyle","fontWeight","letterSpacing","lineHeight","paddingBottom","paddingLeft","paddingRight","paddingTop","tabSize","textIndent","textRendering","textTransform","width","wordBreak","wordSpacing","scrollbarGutter"],z20=!!document.documentElement.currentStyle,A20=function(t){var o=window.getComputedStyle(t);if(o===null)return null;var n=f20(_20,o),s=n.boxSizing;if(s==="")return null;z20&&s==="border-box"&&(n.width=parseFloat(n.width)+parseFloat(n.borderRightWidth)+parseFloat(n.borderLeftWidth)+parseFloat(n.paddingRight)+parseFloat(n.paddingLeft)+"px");var a=parseFloat(n.paddingBottom)+parseFloat(n.paddingTop),r=parseFloat(n.borderBottomWidth)+parseFloat(n.borderTopWidth);return{sizingStyle:n,paddingSize:a,borderSize:r}},m20=A20;function fu(e,t,o){var n=u20(o);h.useLayoutEffect(function(){var s=function(r){return n.current(r)};if(e)return e.addEventListener(t,s),function(){return e.removeEventListener(t,s)}},[])}var O20=function(t,o){fu(document.body,"reset",function(n){t.current.form===n.target&&o(n)})},g20=function(t){fu(window,"resize",t)},C20=function(t){fu(document.fonts,"loadingdone",t)},k20=["cacheMeasurements","maxRows","minRows","onChange","onHeightChange"],v20=function(t,o){var n=t.cacheMeasurements,s=t.maxRows,a=t.minRows,r=t.onChange,i=r===void 0?KO:r,c=t.onHeightChange,l=c===void 0?KO:c,p=mU(t,k20),d=p.value!==void 0,b=h.useRef(null),M=b20(b,o),f=h.useRef(0),m=h.useRef(),O=function(){var E=b.current,L=n&&m.current?m.current:m20(E);if(L){m.current=L;var T=M20(L,E.value||E.placeholder||"x",a,s),I=T[0],Q=T[1];f.current!==I&&(f.current=I,E.style.setProperty("height",I+"px","important"),l(I,{rowHeight:Q}))}},g=function(E){d||O(),i(E)};return h.useLayoutEffect(O),O20(b,function(){if(!d){var C=b.current.value;requestAnimationFrame(function(){var E=b.current;E&&C!==E.value&&O()})}}),g20(O),C20(O),h.createElement("textarea",Mu({},p,{onChange:g,ref:M}))},E20=h.forwardRef(v20);function w20({onSendMessage:e,setMessage:t,message:o,isMessageLoading:n}){const{usageStatus:s,isInPreprod:a,currentApp:r,isInCustomerView:i}=pn(),{t:c}=Zn(),l=r?.application.name,p=n||i||s==="restricted"||s==="limited"||a,d=h.useCallback(()=>{!o||p||($o.clarity.setEvent("Message sent to Agent"),e(o,!1,l||""),t(""))},[o,e,l,t,s,n,a,i]);return h.useEffect(()=>{const b=f=>{f.key==="Enter"&&!f.shiftKey&&(f.preventDefault(),d())},M=document.getElementById("chat-textarea");return M?.addEventListener("keydown",b),()=>{M?.removeEventListener("keydown",b)}},[d]),u0.jsxs(Ji,{onSubmit:()=>d(),children:[u0.jsxs("div",{className:p?"input-container--disabled":"input-container",children:[u0.jsx("div",{className:"textarea-wrapper",children:u0.jsx(E20,{id:"chat-textarea",maxRows:5,className:"textarea",placeholder:c("textInputPlaceholder",{defaultValue:"What can I help you with?"}),value:o,onChange:b=>t(b.target.value),disabled:p})}),i&&u0.jsx(he,{for:"chat-textarea",children:c("customerViewSendingDisabledTooltip",{defaultValue:"Sending messages is disabled while in Customer View."})}),u0.jsx("div",{className:Y1("send-message-button",O2({padding:"sm"})),children:u0.jsx(U1,{kind:"confirm",icon:"paper-plane",onClick:()=>d(),disabled:o.length<1||p,title:"Send Message","aria-label":"Send Message"})})]}),u0.jsx("p",{className:"sps-input__additional-text",style:{textAlign:"right"},children:c("aiDisclaimer",{defaultValue:"AI-generated guidance only. Please review and verify before acting."})})]})}const q20={COMMERCE_PLATFORM_DOMAINS:{local:"https://localhost:9300",test:"https://test.commerce.spscommerce.com",prod:"https://commerce.spscommerce.com"}};function S20({token:e,currentUser:t,hideAgentPanel:o,isAgentPanelOpen:n,isInCustomerView:s,flags:a,env:r,currentApp:i,context:c,currentConversationId:l="",locale:p="en-US"}){const d=h.useMemo(()=>new gE(r,e),[r]);return h.useEffect(()=>{d.setToken(e)},[e,d]),u0.jsxs(p20,{token:e,env:r,currentUser:t,flags:a,isInCustomerView:s,agentApiService:d,hideAgentPanelCallback:o,isAgentPanelOpenProp:n,currentApp:i,currentConversationId:l,children:[u0.jsx(z7,{}),u0.jsx(y20,{context:c,locale:p})]})}function y20({context:e,locale:t}){const{agentApiService:o,currentUser:n,flags:s,isInCustomerView:a,hideAgentPanel:r,currentConversationId:i,lastSentUserMessage:c,usageStatus:l,userHasAgentPerms:p,isInPreprod:d,updateIsInPreprod:b,showAgentPanel:M,isAgentPanelOpen:f}=pn(),{error:m,loading:O,isAgentThinking:g,messages:C,displayedMessages:E,hasMoreMessages:L,loadOlderMessages:T,isLoadingOlderMessages:I,streamingResponse:Q,sendMessage:z,startNewConversation:x,loadConversation:q,conversationList:R,fetchConversationList:H,sendFeedback:w,fetchMessagePair:N,retrySendMessage:v,messageHasBeenSent:V,fetchUsageStatus:F,doesUserHaveAgentPerms:$}=$k(o,e),{t:t0}=Zn(t),[B,o0]=h.useState(!1),[a0,D]=h.useState(!1),[Y,j]=h.useState(""),G=h.useMemo(()=>({a({children:c0,href:z0,...W0}){if(typeof z0!="string"||!z0.trim())return u0.jsx("span",{children:c0});if(z0.startsWith("mailto:")||z0.startsWith("#"))return u0.jsx("a",{href:z0,...W0,children:c0});try{const g0=new URL(z0);return g0.protocol!=="http:"&&g0.protocol!=="https:"?u0.jsx("span",{children:c0}):(Object.values(q20.COMMERCE_PLATFORM_DOMAINS).includes(g0.origin)&&i?.length&&g0.searchParams.set("conversationId",i),u0.jsx("a",{href:g0.toString(),...W0,target:"_blank",rel:"noopener noreferrer",children:c0}))}catch(g0){return console.warn("Failed to parse URL in agent response",z0,g0),u0.jsx("span",{children:c0})}}}),[i]);h.useEffect(()=>{$();const c0=W0=>{M(),x(),z(W0.detail.message,!0)},z0=W0=>{const{detail:g0}=W0;typeof g0=="boolean"&&b(g0)};return window.addEventListener("initiateAgentConversation",c0),window.addEventListener("setPreprod",z0),()=>{window.removeEventListener("initiateAgentConversation",c0),window.removeEventListener("setPreprod",z0)}},[]),h.useEffect(()=>{F(),i&&q(i)},[a0,i,F,q]);const s0=h.useCallback(async c0=>{c0&&await z(c0,!1)},[z]),p0=h.useRef(null),C0=h.useRef(null),f0=h.useRef(!1),d0=h.useRef(0),O0=h.useRef(null),X=h.useRef(T);X.current=T;const b0=h.useCallback(()=>{const c0=p0.current;c0&&(c0.scrollTop=0)},[]);return h.useEffect(()=>{b0()},[C.length,b0]),h.useLayoutEffect(()=>{const c0=p0.current;!c0||!f0.current||I||(O0.current!==null&&(c0.scrollTop=O0.current,O0.current=null),setTimeout(()=>{f0.current=!1},200))},[E.length,I]),h.useEffect(()=>{C.length>d0.current&&(f0.current||b0(),setTimeout(()=>{f0.current=!1},200)),d0.current=C.length},[C.length,b0]),h.useEffect(()=>{const c0=C0.current,z0=p0.current;if(!c0||!z0||!L)return;const W0=new IntersectionObserver(g0=>{g0[0].isIntersecting&&!f0.current&&(f0.current=!0,O0.current=z0.scrollTop,X.current())},{root:z0,threshold:0});return W0.observe(c0),()=>W0.disconnect()},[L]),f&&u0.jsxs("div",{className:Y1("agent-panel",a&&"agent-panel--customer-view",B&&"agent-panel--expanded"),children:[u0.jsxs("div",{className:"title-bar",children:[u0.jsx("div",{children:u0.jsx(U1,{icon:B?"arrow-right":"arrow-left",kind:"icon",onClick:()=>o0(!B),className:O2({mr:"sm"})})}),u0.jsx("div",{className:"title",children:u0.jsxs("p",{children:["MAX ",s?.["max-beta"]&&u0.jsx("span",{className:"beta-text",children:"(BETA)"})]})}),u0.jsxs("div",{children:[u0.jsx(U1,{className:O2({mr:"md"}),kind:"link",icon:a0?"arrow-left":"conversation",onClick:()=>{$o.clarity.setEvent("View conversation list"),H(),D(c0=>!c0)},children:a0?t0("backToChat",{defaultValue:"Back to Chat"}):t0("conversations",{defaultValue:"Conversations"})}),u0.jsx(U1,{className:O2({mr:"md"}),kind:"link",icon:"plus-sign",onClick:()=>{$o.clarity.setEvent("Start new conversation"),D(!1),x()},children:t0("new",{defaultValue:"New"})}),u0.jsx(R5,{}),u0.jsx(U1,{kind:"icon",icon:"x",onClick:()=>{r(),o0(!1)}})]})]}),u0.jsxs("div",{className:"title-bar-short",children:[u0.jsx("div",{children:u0.jsx(U1,{icon:B?"arrow-right":"arrow-left",kind:"icon",onClick:()=>o0(!B),className:O2({mr:"sm"})})}),u0.jsx("div",{className:"title",children:u0.jsxs("p",{children:["MAX ",s?.["max-beta"]&&u0.jsx("span",{className:"beta-text",children:"(BETA)"})]})}),u0.jsxs("div",{style:{flex:1,textAlign:"right"},children:[u0.jsx(U1,{className:O2({mr:"md",color:"blue-medium"}),kind:"icon",icon:a0?"arrow-left":"conversation",title:a0?"Back to Chat":"Conversations",onClick:()=>{$o.clarity.setEvent("View conversation list"),H(),D(c0=>!c0)}}),u0.jsx(U1,{className:O2({mr:"md",color:"blue-medium"}),kind:"icon",icon:"plus-sign",title:"New Chat",onClick:()=>{$o.clarity.setEvent("Start new conversation"),D(!1),x()}}),u0.jsx(R5,{}),u0.jsx(U1,{kind:"icon",icon:"x",onClick:()=>{r(),o0(!1)}})]})]}),a0?u0.jsx(JU,{conversations:R,setShowConversationList:D,onLoadConversation:q,onRefreshConversationList:H,onLoading:O,isInCustomerView:a}):u0.jsxs(u0.Fragment,{children:[u0.jsx("div",{ref:p0,className:"conversation-section-wrapper",style:{flex:1},children:O?u0.jsx(_o,{style:{margin:"auto"}}):u0.jsxs(u0.Fragment,{children:[u0.jsxs("div",{className:"conversation-section",children:[p?u0.jsxs(u0.Fragment,{children:[u0.jsx(zc,{children:`${t0("hello",{defaultValue:"Hello"})}${n?.acting_entity?.user_info?.first_name?` ${n.acting_entity.user_info.first_name}`:""}! ${t0("greetingMessage",{defaultValue:"I'm MAX, your AI Assistant. I can help you with questions about retailers, how to use our products, troubleshooting, searching your data, and more. Let me know how I can help."})}`}),u0.jsx(cd,{onClick:()=>z("Show me how you can help",!1),children:t0("showMeHowYouCanHelp",{defaultValue:"Show me how you can help"})}),u0.jsx(cd,{onClick:()=>z("What orders did I receive this week?",!1),children:t0("whatOrdersDidIReceiveThisWeek",{defaultValue:"What orders did I receive this week?"})}),L&&u0.jsx("div",{ref:C0,style:{height:1}}),I&&u0.jsx("div",{style:{textAlign:"center",padding:"8px"},children:u0.jsx(_o,{size:"sm"})}),E.map((c0,z0)=>{const W0=c0.id??`msg-${c0.role}-${z0}`;return c0.role==="user"?u0.jsx(cK,{isObo:c0.obo,children:u0.jsx(uu,{content:c0.content,components:G})},W0):u0.jsx(zc,{message:c0,sendFeedback:w,fetchMessagePair:N,handleSendMessage:s0,children:u0.jsx(uu,{content:c0.content,components:G,useRehypeRaw:!0})},W0)})]}):u0.jsx(id,{artwork:dB,heading:t0("missingPermissionsErrorHeading",{defaultValue:"Almost there"}),subHeading:t0("missingPermissionsErrorSubheading",{defaultValue:"You'll need your admin to grant access before you can use this."})}),m&&u0.jsx(id,{artwork:uB,heading:t0("genericErrorHeading",{defaultValue:"Something went wrong while processing your request."}),subHeading:t0("genericErrorSubheading",{defaultValue:"Please try again in a moment."}),children:c&&u0.jsx(U1,{kind:"link",icon:"redo",onClick:v,children:t0("retry",{defaultValue:"Retry"})})}),u0.jsx(i20,{streamingResponse:Q,isAgentThinking:g,markdownComponents:G})]}),!i&&!V&&p&&u0.jsxs("div",{className:"welcome-graphic",children:[u0.jsx("div",{children:u0.jsx("img",{src:Nu,alt:"AI assistant welcome animation",width:120,height:120,className:O2({mb:"md"})})}),u0.jsx("h1",{children:t0("welcomeMessage",{defaultValue:"What should we get done today?"})})]})]})}),u0.jsxs("div",{className:"message-section",children:[l==="restricted"&&u0.jsx(Ac,{kind:"error",children:t0("restrictedErrorMessage",{defaultValue:"I want to flag that this request isn't something I can help with. Repeated requests like this may affect your account."})}),l==="limited"&&u0.jsx(Ac,{kind:"warning",children:t0("usageLimitErrorMessage",{defaultValue:"You have reached today's usage limit. Please try again tomorrow."})}),d&&u0.jsx(Ac,{kind:"warning",children:t0("preprodErrorMessage",{defaultValue:"MAX is unavailable in the Preprod environment."})}),u0.jsx(w20,{onSendMessage:z,message:Y,setMessage:j,isMessageLoading:g||!!(Q&&Q.length>0)})]})]})]})}Ae.ANIMATED_LOGO=Nu,Ae.BETA_LOGO=Du,Ae.COLOR_LOGO=xu,Ae.MaxPanel=S20,Object.defineProperty(Ae,Symbol.toStringTag,{value:"Module"})}));