@ctrl/dom 0.3.2 → 0.3.3
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/README.md +160 -9
- package/dist/dom/_chunks/{src-CImID776.js → src-BdfL12CQ.js} +1 -1
- package/dist/dom/index.js +1 -1
- package/dist/dom/internal.js +1 -1
- package/dist/dom/types/window/clock.d.ts +3 -1
- package/dist/vitest-environment/plugin.js +1 -1
- package/dist/vitest-environment/prewarm.js +1 -0
- package/dist/vitest-environment/types/plugin.d.ts +20 -0
- package/dist/vitest-environment/types/prewarm.d.ts +1 -0
- package/dist/vitest-environment/types/warm-forks.d.ts +60 -0
- package/package.json +5 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{AsyncResource as e}from"node:async_hooks";import{clearTimeout as t,setTimeout as n}from"node:timers";import{availableParallelism as r}from"node:os";var i=Object.defineProperty,__name=(e,t)=>i(e,`name`,{value:t,configurable:!0}),__exportAll=(e,t)=>{let n={};for(var r in e)i(n,r,{get:e[r],enumerable:!0});return t||i(n,Symbol.toStringTag,{value:`Module`}),n};const a=1,o=2,s=3,c=4,l=5,u=6,d=7,m=8,h=9,_=10,v=11,y=12,b=1,x=2,S=4,C=8,w=16,T=32,E=`http://www.w3.org/1999/xhtml`,ee=`http://www.w3.org/2000/svg`,D=`http://www.w3.org/1998/Math/MathML`,te=`http://www.w3.org/1999/xlink`,O=`http://www.w3.org/XML/1998/namespace`,k=`http://www.w3.org/2000/xmlns/`,ne=1,A=2,re=4,ie=8,ae=16,oe=32,se=64,ce=128,le=256,ue=512,de=1024,fe=2048,pe=4096,me=16384,he=32768,ge=65536,_e=8192,ve=1<<17,ye=1<<18,be=1<<19,xe=1<<20,Se=1<<21,Ce=3145728;function exposeMembers(...e){for(let t of e){let e=t.prototype;for(let t of Object.getOwnPropertyNames(e)){if(t===`constructor`||t.charCodeAt(0)===95)continue;let n=Object.getOwnPropertyDescriptor(e,t);!n.enumerable&&n.configurable&&Object.defineProperty(e,t,{enumerable:!0})}}}function defineInterfaceShape(e,t={}){Object.defineProperty(e.prototype,Symbol.toStringTag,{value:e.name,configurable:!0}),setLength(e,Object.hasOwn(t,`constructor`)?t.constructor:0);for(let n of[e.prototype,e])for(let e of Object.getOwnPropertyNames(n)){if(e===`constructor`||e===`prototype`||e===`length`||e===`name`)continue;let r=Object.getOwnPropertyDescriptor(n,e);typeof r.value==`function`&&setLength(r.value,Object.hasOwn(t,e)?t[e]:0)}}function defineConstants(e,t){for(let n of Object.keys(t)){let r={value:t[n],writable:!1,enumerable:!0,configurable:!1};Object.defineProperty(e,n,r),Object.defineProperty(e.prototype,n,r)}}function setLength(e,t){e.length!==t&&Object.defineProperty(e,"length",{value:t,configurable:!0})}function hideInternals(e){for(let t of Reflect.ownKeys(e))(typeof t==`symbol`||t.charCodeAt(0)===95)&&we.call(e,t)&&Object.defineProperty(e,t,{enumerable:!1})}const we=Object.prototype.propertyIsEnumerable;function defineHidden(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0,enumerable:!1})}function argumentsRequired(e,t,n,r){throw TypeError(`Failed to execute '${e}' on '${t}': ${n} argument${n===1?``:`s`} required, but only ${r} present.`)}const Te=globalThis.setTimeout,Ee=globalThis.clearTimeout,De=globalThis.setImmediate,Oe=globalThis.queueMicrotask,ke=process.nextTick,Ae=globalThis.performance,je=Ae.now.bind(Ae),Me=process.getActiveResourcesInfo.bind(process),Ne=Symbol(`ctrl-dom.clock`);var TimerRecord=class{id;due;seq;delay;repeat;callback;args;ref;index;handle;real;realDue;cleared;context;constructor(t,n,r,i,a,o,s){this.id=t,this.due=n,this.seq=r,this.delay=i,this.repeat=a,this.callback=o,this.args=s,this.ref=!0,this.index=-1,this.handle=null,this.real=null,this.realDue=0,this.cleared=!1,this.context=new e(`Timeout`)}},VirtualTimeout=class{#e;#t;constructor(e,t){this.#e=e,this.#t=t}ref(){return this.#e._setRef(this.#t,!0),this}unref(){return this.#e._setRef(this.#t,!1),this}hasRef(){return this.#t.ref}get _destroyed(){return!this.#e.byId.has(this.#t.id)}refresh(){return this.#e._refresh(this.#t),this}close(){return this.#e.clear(this.#t.id),this}[Symbol.toPrimitive](){return this.#t.id}[Symbol.dispose](){this.#e.clear(this.#t.id)}};function before(e,t){return e.due<t.due||e.due===t.due&&e.seq<t.seq}var VirtualClock=class{skipped;epochOffset;skip;heap;byId;nextId;seq;refCount;hostTimer;hostDue;hostRefd;continuation;driverScheduled;driverImmediate;idleTurns;disposed;ioTypes;ioBaseline;ioCounts;constructor(e={}){this.skipped=0,this.epochOffset=Date.now()-je(),this.skip=e.skip===!0,this.heap=[],this.byId=/* @__PURE__ */ new Map,this.nextId=1,this.seq=0,this.refCount=0,this.hostTimer=null,this.hostDue=1/0,this.hostRefd=!0,this.continuation=!1,this.driverScheduled=!1,this.driverImmediate=!1,this.idleTurns=0,this.disposed=!1,this.ioTypes=[],this.ioBaseline=[],this.skip&&(typeof process==`object`&&(process.stdin,process.stdout,process.stderr),countIO(this.ioTypes,this.ioBaseline)),this.ioCounts=Array(this.ioTypes.length).fill(0)}now(){return je()+this.skipped}epochNow(){return Math.floor(this.epochOffset+je()+this.skipped)}schedule(e,t,n,r){let i=Number(t)|0;i<1&&(i=1);let a=new TimerRecord(this.nextId++,this.now()+i,this.seq++,i,r,e,n),o=new VirtualTimeout(this,a);return a.handle=o,this.disposed||(this.byId.set(a.id,a),this.refCount++,this.push(a),this.armHost(),this.kickDriver()),o}clear(e){let t=typeof e==`number`?e:e instanceof VirtualTimeout?Number(e):NaN,n=this.byId.get(t);return n!==void 0&&(this.byId.delete(t),n.cleared=!0,n.ref&&this.refCount--,n.real!==null&&(Ee(n.real),n.real=null),n.index!==-1&&(this.remove(n),this.armHost()),!0)}skipIdle(e){let t=this.heap[0];return t!==void 0&&t.due<=this.now()+e?!1:(this.skipped+=e,!0)}get size(){return this.byId.size}_setRef(e,t){if(e.ref===t)return;e.ref=t;let n=this.byId.has(e.id);n&&(this.refCount+=t?1:-1),n&&this.skip&&(!t&&e.index!==-1?this.toRealTrack(e,Math.max(0,e.due-this.now())):t&&e.real!==null&&this.toVirtualTrack(e)),this.updateHostRef()}toRealTrack(e,t){e.index!==-1&&(this.remove(e),this.armHost()),e.realDue=je()+t;let n=Te(()=>this.fireReal(e),t);n.unref?.(),e.real=n}toVirtualTrack(e){Ee(e.real),e.real=null,e.due=this.now()+Math.max(0,e.realDue-je()),e.seq=this.seq++,this.push(e),this.armHost(),this.kickDriver()}fireReal(e){e.real=null,!this.disposed&&this.byId.has(e.id)&&(e.repeat?this.toRealTrack(e,e.delay):this.byId.delete(e.id),e.context.runInAsyncScope(Reflect.apply,null,e.callback,e.handle,e.args))}_refresh(e){if(!(e.cleared||this.disposed)){if(e.real!==null)Ee(e.real),e.real=null,this.toRealTrack(e,e.delay);else{if(this.byId.has(e.id))e.index!==-1&&this.remove(e);else if(this.byId.set(e.id,e),e.ref)this.refCount++;else if(this.skip){this.toRealTrack(e,e.delay);return}e.due=this.now()+e.delay,e.seq=this.seq++,this.push(e),this.armHost(),this.kickDriver()}}}clearAll(){for(let e of this.byId.values())e.real!==null&&Ee(e.real),e.real=null,e.cleared=!0,e.index=-1;this.hostTimer!==null&&Ee(this.hostTimer),this.hostTimer=null,this.hostDue=1/0,this.heap.length=0,this.byId.clear(),this.refCount=0}dispose(){this.disposed=!0,this.clearAll(),j===this&&(j=null)}armHost(){if(this.disposed||this.continuation)return;let e=this.heap[0];e===void 0?(this.hostTimer!==null&&Ee(this.hostTimer),this.hostTimer=null,this.hostDue=1/0):(this.hostTimer!==null&&this.hostDue===e.due||(this.hostTimer!==null&&Ee(this.hostTimer),this.hostDue=e.due,this.hostTimer=Te(this.onHostTimer,Math.max(0,e.due-this.now())),this.hostRefd=!0),this.updateHostRef())}updateHostRef(){let e=this.hostTimer,t=this.refCount>0;e!==null&&t!==this.hostRefd&&(this.hostRefd=t,t?e.ref?.():e.unref?.())}fireContinuation=()=>{this.fireNext()};onHostTimer=()=>{Fe=je(),this.hostTimer=null,this.hostDue=1/0,this.fireNext()};fireNext(){if(this.continuation=!1,this.disposed)return;let e=this.heap[0];if(e===void 0||e.due>this.now()+1){this.armHost();return}this.skip&&e.due>this.now()&&(this.skipped+=e.due-this.now()),this.pop(),e.repeat?(e.due=this.now()+e.delay,e.seq=this.seq++,this.push(e)):(this.byId.delete(e.id),e.ref&&this.refCount--);let t=this.heap[0];t!==void 0&&t.due<=this.now()+ +!!this.skip?(this.continuation=!0,De(this.fireContinuation)):this.armHost(),e.context.runInAsyncScope(Reflect.apply,null,e.callback,e.handle,e.args)}kickDriver(){!this.skip||this.driverScheduled||this.disposed||(this.driverScheduled=!0,this.driverImmediate=!0,De(this.driverTurn))}get ownImmediates(){return+!!this.driverImmediate+ +!!this.continuation}driverTurn=()=>{if(Fe=je(),this.driverScheduled=!1,this.driverImmediate=!1,this.disposed||this.heap.length===0){this.idleTurns=0;return}let e=this.busy();if(e!==null){this.idleTurns=0,e===`immediate`?this.kickDriver():(this.driverScheduled=!0,Te(()=>{this.driverScheduled=!1,this.kickDriver()},1));return}if(++this.idleTurns<2){this.kickDriver();return}this.idleTurns=0;let t=this.heap[0].due-this.now();t>0&&(this.skipped+=t),this.hostTimer!==null&&Ee(this.hostTimer),this.hostTimer=null,this.hostDue=1/0;try{this.fireNext()}finally{this.kickDriver()}};busy(e=0){let t=Me(),n=this.ioTypes,r=this.ioBaseline,i=this.ioCounts;for(let e=0;e<i.length;e++)i[e]=0;let a=!1,o=0;for(let s=0;s<t.length;s++){let c=t[s];if(c===`Immediate`){if(++o>e)return`immediate`;continue}if(a||c===`Timeout`)continue;let l=0;for(;l<n.length&&n[l]!==c;)l++;(l===n.length||++i[l]>r[l])&&(a=!0)}return a?`io`:null}push(e){let t=this.heap;e.index=t.length,t.push(e),this.up(e.index)}pop(){let e=this.heap,t=e[0],n=e.pop();return t.index=-1,n!==t&&(e[0]=n,n.index=0,this.down(0)),t}remove(e){let t=this.heap,n=e.index,r=t.pop();e.index=-1,r!==e&&(t[n]=r,r.index=n,this.down(n),this.up(r.index))}up(e){let t=this.heap,n=t[e];for(;e>0;){let r=e-1>>1;if(!before(n,t[r]))break;t[e]=t[r],t[e].index=e,e=r}t[e]=n,n.index=e}down(e){let t=this.heap,n=t.length,r=t[e];for(;;){let i=2*e+1;if(i>=n)break;let a=i+1,o=a<n&&before(t[a],t[i])?a:i;if(!before(t[o],r))break;t[e]=t[o],t[e].index=e,e=o}t[e]=r,r.index=e}};function countIO(e,t){for(let n of Me()){if(n===`Timeout`||n===`Immediate`)continue;let r=e.indexOf(n);r===-1?(e.push(n),t.push(1)):t[r]++}}let j=null;function clockNow(){return j===null?je():j.now()}function queueUserAgentTask(e){j===null?n(e,0):j.schedule(e,0,[],!1)}const Pe={setTimeout(e,t){return j===null?n(e,t):j.schedule(e,t,[],!1)},clearTimeout(e){j!==null&&j.clear(e)||t(e)}};function clockSkipping(){return j!==null}function skipIdleTime(e){return j===null||j.skipIdle(e)}function canSkipZeroDelayWait(e){let t=j;if(t===null||!isClockTimer(e.setTimeout))return!1;let n=e.setImmediate;if(typeof n!=`function`||n.clock!==void 0||n._isMockFunction===!0||t.busy(t.ownImmediates)!==null)return!1;let r=t.heap[0];return r===void 0||r.due>t.now()+1}function skipZeroDelayWait(e){return canSkipZeroDelayWait(e)&&j.skipIdle(1)}function isClockTimer(e){return j!==null&&typeof e==`function`&&e[Ne]===j}function foreignImmediatesPending(){let e=Me(),t=0;for(let n=0;n<e.length;n++)e[n]===`Immediate`&&t++;return t>(j===null?0:j.ownImmediates)}let Fe=0;function loopTurn(e){let t=j;t===null||je()-Fe>1?realTurn(e):Oe(()=>ke(settleTurn,t,e))}function settleTurn(e,t){if(j===e&&e.busy(e.ownImmediates)===null){let n=e.heap[0];if(n===void 0||n.due>e.now()){t();return}}realTurn(t)}function realTurn(e){De(()=>{Fe=je(),e()})}function clockSkipped(){return j===null?0:j.skipped}function clearActiveClockTimers(){j?.clearAll()}function clockStats(){return j===null?null:{skippedMs:j.skipped,pendingTimers:j.size}}function virtualDate(e,t){function Date(...n){if(new.target===void 0)return new t(e.epochNow()).toString();let r=n.length===0?new t(e.epochNow()):Reflect.construct(t,n,t);return new.target!==Date&&Object.setPrototypeOf(r,new.target.prototype),r}return Object.defineProperties(Date,{length:{value:7},prototype:{value:t.prototype,writable:!1},now:{value:()=>e.epochNow(),writable:!0,configurable:!0},parse:{value:t.parse,writable:!0,configurable:!0},UTC:{value:t.UTC,writable:!0,configurable:!0}}),Date}function virtualPerformance(e,t){let n=Object.create(Object.getPrototypeOf(t));for(let e=t;e!==null&&e!==Object.prototype;e=Object.getPrototypeOf(e))for(let r of Reflect.ownKeys(e)){if(r===`constructor`||r in n&&Object.hasOwn(n,r))continue;let i=Object.getOwnPropertyDescriptor(e,r);typeof i.value==`function`?Object.defineProperty(n,r,{value:i.value.bind(t),writable:!0,configurable:!0,enumerable:i.enumerable}):i.get!==void 0&&Object.defineProperty(n,r,{get:()=>Reflect.get(t,r),configurable:!0,enumerable:i.enumerable})}Object.defineProperty(n,"now",{value:()=>e.now(),writable:!0,configurable:!0,enumerable:!0});let r=t.mark.bind(t),i=t.measure.bind(t);return Object.defineProperty(n,"mark",{value:(t,n)=>r(t,n?.startTime===void 0?{...n,startTime:e.now()}:n),writable:!0,configurable:!0,enumerable:!0}),Object.defineProperty(n,"measure",{value:(t,n,r)=>{if(typeof n==`object`&&n){let r=n.end===void 0&&n.duration===void 0;return i(t,r?{...n,end:e.now()}:n)}return r===void 0?i(t,n===void 0?{end:e.now()}:{start:n,end:e.now()}):i(t,n,r)},writable:!0,configurable:!0,enumerable:!0}),n}function installClock(e,t){let n=/* @__PURE__ */ new Map,define=(e,r)=>{n.set(e,Object.getOwnPropertyDescriptor(t,e)),Object.defineProperty(t,e,{value:r,writable:!0,enumerable:!0,configurable:!0})},r=globalThis.clearInterval,i={setTimeout(t,n,...r){if(typeof t!=`function`)throw TypeError(`The "callback" argument must be of type function`);return e.disposed?0:e.schedule(t,n,r,!1)},setInterval(t,n,...r){if(typeof t!=`function`)throw TypeError(`The "callback" argument must be of type function`);return e.disposed?0:e.schedule(t,n,r,!0)},clearTimeout(t){t!=null&&(e.clear(t)||Ee(t))},clearInterval(t){t!=null&&(e.clear(t)||r(t))}};Object.defineProperty(i.setTimeout,Symbol.for(`nodejs.util.promisify.custom`),{value:(t,n)=>new Promise(r=>e.schedule(r,t,[n],!1))}),Object.defineProperty(i.setTimeout,Ne,{value:e}),Object.defineProperty(i.setInterval,Ne,{value:e});for(let e of[`setTimeout`,`setInterval`,`clearTimeout`,`clearInterval`])define(e,i[e]);return e.skip&&(define(`Date`,virtualDate(e,typeof t.Date==`function`?t.Date:Date)),define(`performance`,virtualPerformance(e,t.performance??Ae)),j=e),{clock:e,uninstall(){for(let[e,r]of n)r===void 0?delete t[e]:Object.defineProperty(t,e,r);n.clear(),j===e&&(j=null),e.dispose()}}}function toDOMString(e){if(typeof e==`string`)return e;if(typeof e==`symbol`)throw TypeError(`Cannot convert a Symbol value to a string`);return String(e)}function toDouble(e,t){let n=typeof e==`number`?e:Number(e);if(!Number.isFinite(n))throw TypeError(`${t} is not a finite floating-point value.`);return n}function toFloat(e,t){let n=toDouble(e,t),r=Math.fround(n);if(!Number.isFinite(r))throw TypeError(`${t} is outside the range of a float.`);return r}function integerPart(e){let t=typeof e==`number`?e:Number(e);return Number.isFinite(t)?Math.trunc(t):0}function toLong(e){return typeof e==`number`&&(e|0)===e?e:integerPart(e)|0}function toUnsignedLong$1(e){return typeof e==`number`&&e>>>0===e?e:integerPart(e)>>>0}__name(toUnsignedLong$1,`toUnsignedLong`);function toShort(e){return integerPart(e)<<16>>16}function toUnsignedShort(e){return integerPart(e)&65535}const Ie=Symbol.for(`ctrl-dom._proto__`),Le=Symbol.for(`ctrl-dom.aboutBase`),Re=Symbol.for(`ctrl-dom.active`),ze=Symbol.for(`ctrl-dom.assocGen`),Be=Symbol.for(`ctrl-dom.attr`),Ve=Symbol.for(`ctrl-dom.attributes`),He=Symbol.for(`ctrl-dom.availableToElementInternals`),Ue=Symbol.for(`ctrl-dom.baseFor`),We=Symbol.for(`ctrl-dom.baseOverride`),Ge=Symbol.for(`ctrl-dom.baseURL`),Ke=Symbol.for(`ctrl-dom.baseVersion`),qe=Symbol.for(`ctrl-dom.benign`),M=Symbol.for(`ctrl-dom.block`),Je=Symbol.for(`ctrl-dom.blockParsed`),Ye=Symbol.for(`ctrl-dom.blockText`),Xe=Symbol.for(`ctrl-dom.byCtor`),Ze=Symbol.for(`ctrl-dom.byName`),Qe=Symbol.for(`ctrl-dom.cache`),$e=Symbol.for(`ctrl-dom.callback`),et=Symbol.for(`ctrl-dom.childNodes`),tt=Symbol.for(`ctrl-dom.childWindows`),nt=Symbol.for(`ctrl-dom.children`),rt=Symbol.for(`ctrl-dom.classList`),it=Symbol.for(`ctrl-dom.clipboard`),at=Symbol.for(`ctrl-dom.clonable`),ot=Symbol.for(`ctrl-dom.closed`),st=Symbol.for(`ctrl-dom.compiled`),ct=Symbol.for(`ctrl-dom.compiledFor`),lt=Symbol.for(`ctrl-dom.condition`),ut=Symbol.for(`ctrl-dom.constructed`),dt=Symbol.for(`ctrl-dom.constructingEntryList`),ft=Symbol.for(`ctrl-dom.contentType`),pt=Symbol.for(`ctrl-dom.controlsCache`),mt=Symbol.for(`ctrl-dom.controlsDoc`),ht=Symbol.for(`ctrl-dom.coll`),gt=Symbol.for(`ctrl-dom.controlsVersion`),_t=Symbol.for(`ctrl-dom.cookieJar`),vt=Symbol.for(`ctrl-dom.cookies`),yt=Symbol.for(`ctrl-dom.css`),bt=Symbol.for(`ctrl-dom.current`),xt=Symbol.for(`ctrl-dom.customElements`),St=Symbol.for(`ctrl-dom.customValidity`),Ct=Symbol.for(`ctrl-dom.cx`),wt=Symbol.for(`ctrl-dom.data`),Tt=Symbol.for(`ctrl-dom.dataset`),Et=Symbol.for(`ctrl-dom.declarative`),Dt=Symbol.for(`ctrl-dom.defaultNamespace`),Ot=Symbol.for(`ctrl-dom.defaultValueOverride`),kt=Symbol.for(`ctrl-dom.delegatesFocus`),At=Symbol.for(`ctrl-dom.devicePixelRatio`),jt=Symbol.for(`ctrl-dom.dirtiness`),N=Symbol.for(`ctrl-dom.control`),Mt=Symbol.for(`ctrl-dom.disabled`),Nt=Symbol.for(`ctrl-dom.disallowModification`),Pt=Symbol.for(`ctrl-dom.derived`),Ft=Symbol.for(`ctrl-dom.doc`),It=Symbol.for(`ctrl-dom.dropEffect`),P=Symbol.for(`ctrl-dom.ec`),Lt=Symbol.for(`ctrl-dom.effectAllowed`),F=Symbol.for(`ctrl-dom.el`),Rt=Symbol.for(`ctrl-dom.elements`),zt=Symbol.for(`ctrl-dom.entries`),I=Symbol.for(`ctrl-dom.eo`),Bt=Symbol.for(`ctrl-dom.error`),Vt=Symbol.for(`ctrl-dom.file`),Ht=Symbol.for(`ctrl-dom.files`),Ut=Symbol.for(`ctrl-dom.fill`),Wt=Symbol.for(`ctrl-dom.filter`),Gt=Symbol.for(`ctrl-dom.firingSubmissionEvents`),L=Symbol.for(`ctrl-dom.focused`),Kt=Symbol.for(`ctrl-dom.form`),qt=Symbol.for(`ctrl-dom.formAttrSeen`),Jt=Symbol.for(`ctrl-dom.forLabels`),Yt=Symbol.for(`ctrl-dom.forms`),Xt=Symbol.for(`ctrl-dom.frameCallbacks`),Zt=Symbol.for(`ctrl-dom.frameElement`),Qt=Symbol.for(`ctrl-dom.frameId`),$t=Symbol.for(`ctrl-dom.frameTask`),en=Symbol.for(`ctrl-dom.frameTime`),tn=Symbol.for(`ctrl-dom.generation`),nn=Symbol.for(`ctrl-dom.globalObject`),rn=Symbol.for(`ctrl-dom.hasTransients`),an=Symbol.for(`ctrl-dom.height`),sn=Symbol.for(`ctrl-dom.history`),cn=Symbol.for(`ctrl-dom.home`),R=Symbol.for(`ctrl-dom.host`),ln=Symbol.for(`ctrl-dom.href`),un=Symbol.for(`ctrl-dom.id`),dn=Symbol.for(`ctrl-dom.idleCallbacks`),fn=Symbol.for(`ctrl-dom.idleId`),pn=Symbol.for(`ctrl-dom.ids`),z=Symbol.for(`ctrl-dom.impl`),mn=Symbol.for(`ctrl-dom.implementation`),hn=Symbol.for(`ctrl-dom.index`),gn=Symbol.for(`ctrl-dom.indexed`),_n=Symbol.for(`ctrl-dom.inflight`),vn=Symbol.for(`ctrl-dom.info`),yn=Symbol.for(`ctrl-dom.innerHeight`),bn=Symbol.for(`ctrl-dom.innerWidth`),xn=Symbol.for(`ctrl-dom.isHTML`),B=Symbol.for(`ctrl-dom.items`),Sn=Symbol.for(`ctrl-dom.keyText`),Cn=Symbol.for(`ctrl-dom.kind`),wn=Symbol.for(`ctrl-dom.labels`),Tn=Symbol.for(`ctrl-dom.layerName`),En=Symbol.for(`ctrl-dom.list`),Dn=Symbol.for(`ctrl-dom.listeners`),On=Symbol.for(`ctrl-dom.localStorage`),kn=Symbol.for(`ctrl-dom.location`),An=Symbol.for(`ctrl-dom.lockedForReset`),jn=Symbol.for(`ctrl-dom.matches`),V=Symbol.for(`ctrl-dom.media`),Mn=Symbol.for(`ctrl-dom.mediaQueryLists`),Nn=Symbol.for(`ctrl-dom.mode`),Pn=Symbol.for(`ctrl-dom.name`),Fn=Symbol.for(`ctrl-dom.names`),In=Symbol.for(`ctrl-dom.namespaces`),Ln=Symbol.for(`ctrl-dom.navigator`),Rn=Symbol.for(`ctrl-dom.nodes`),zn=Symbol.for(`ctrl-dom.onchange`),H=Symbol.for(`ctrl-dom.options`),Bn=Symbol.for(`ctrl-dom.owner`),Vn=Symbol.for(`ctrl-dom.ownerNode`),Hn=Symbol.for(`ctrl-dom.ownerRule`),U=Symbol.for(`ctrl-dom.parent`),Un=Symbol.for(`ctrl-dom.parentRule`),Wn=Symbol.for(`ctrl-dom.parentWindow`),Gn=Symbol.for(`ctrl-dom.pastNames`),Kn=Symbol.for(`ctrl-dom.pointerBeforeReference`),qn=Symbol.for(`ctrl-dom.prefix`),Jn=Symbol.for(`ctrl-dom.prelude`),Yn=Symbol.for(`ctrl-dom.presentationStyle`),Xn=Symbol.for(`ctrl-dom.pseudo`),Zn=Symbol.for(`ctrl-dom.queries`),Qn=Symbol.for(`ctrl-dom.radios`),$n=Symbol.for(`ctrl-dom.ranges`),er=Symbol.for(`ctrl-dom.readonly`),tr=Symbol.for(`ctrl-dom.readyState`),nr=Symbol.for(`ctrl-dom.rebuildVersion`),rr=Symbol.for(`ctrl-dom.record`),ir=Symbol.for(`ctrl-dom.records`),ar=Symbol.for(`ctrl-dom.reference`),or=Symbol.for(`ctrl-dom.result`),sr=Symbol.for(`ctrl-dom.root`),W=Symbol.for(`ctrl-dom.rules`),cr=Symbol.for(`ctrl-dom.running`),lr=Symbol.for(`ctrl-dom.runningFrame`),G=Symbol.for(`ctrl-dom.sc`),ur=Symbol.for(`ctrl-dom.screen`),dr=Symbol.for(`ctrl-dom.scrollRestoration`),fr=Symbol.for(`ctrl-dom.scrollX`),pr=Symbol.for(`ctrl-dom.scrollY`),mr=Symbol.for(`ctrl-dom.selSet`),hr=Symbol.for(`ctrl-dom.selectedOptions`),gr=Symbol.for(`ctrl-dom.selectedness`),_r=Symbol.for(`ctrl-dom.selection`),vr=Symbol.for(`ctrl-dom.selector`),yr=Symbol.for(`ctrl-dom.serializable`),br=Symbol.for(`ctrl-dom.sessionStorage`),xr=Symbol.for(`ctrl-dom.settled`),Sr=Symbol.for(`ctrl-dom.shadowRoot`),Cr=Symbol.for(`ctrl-dom.shed`),wr=Symbol.for(`ctrl-dom.sheet`),Tr=Symbol.for(`ctrl-dom.sheets`),Er=Symbol.for(`ctrl-dom.slotAssignment`),K=Symbol.for(`ctrl-dom.so`),Dr=Symbol.for(`ctrl-dom.states`),Or=Symbol.for(`ctrl-dom.style`),kr=Symbol.for(`ctrl-dom.styleVersion`),Ar=Symbol.for(`ctrl-dom.supportsText`),jr=Symbol.for(`ctrl-dom.systemId`),Mr=Symbol.for(`ctrl-dom.target`),Nr=Symbol.for(`ctrl-dom.targets`),Pr=Symbol.for(`ctrl-dom.tasks`),Fr=Symbol.for(`ctrl-dom.timers`),Ir=Symbol.for(`ctrl-dom.title`),Lr=Symbol.for(`ctrl-dom.treeVersion`),Rr=Symbol.for(`ctrl-dom.type`),zr=Symbol.for(`ctrl-dom.types`),Br=Symbol.for(`ctrl-dom.updating`),Vr=Symbol.for(`ctrl-dom.updatingSelectedContent`),Hr=Symbol.for(`ctrl-dom.uri`),q=Symbol.for(`ctrl-dom.url`),Ur=Symbol.for(`ctrl-dom.userActivation`),Wr=Symbol.for(`ctrl-dom.userValidity`),Gr=Symbol.for(`ctrl-dom.validity`),Kr=Symbol.for(`ctrl-dom.value`),J=Symbol.for(`ctrl-dom.version`),qr=Symbol.for(`ctrl-dom.visualViewport`),Jr=Symbol.for(`ctrl-dom.w`),Yr=Symbol.for(`ctrl-dom.whatToShow`),Xr=Symbol.for(`ctrl-dom.whenDefined`),Zr=Symbol.for(`ctrl-dom.width`),Y=Symbol.for(`ctrl-dom.window`),Qr=Symbol.for(`ctrl-dom.writeBuffer`),$r=Symbol.for(`ctrl-dom.x`),ei=Symbol.for(`ctrl-dom.xhr`),ti=Symbol.for(`ctrl-dom.y`),ni=Symbol.for(`ctrl-dom.z`);var EventState=class{flags;type;target;relatedTarget;currentTarget;eventPhase;pathStart;pathLength;touchTargets;timeStamp;constructor(e,t){this.flags=t,this.type=e,this.target=null,this.relatedTarget=null,this.currentTarget=null,this.eventPhase=0,this.pathStart=-1,this.pathLength=0,this.touchTargets=null,this.timeStamp=clockNow()}};function exposedPathItem(e){let t=X[e];return X[e+4]&16?exposedWindow(t):t}function exposedWindow(e){return e[nn]??e}const X=[],ri={top:0};let ii=!1;function withInternalConstruct(e){let t=ii;ii=!0;try{return e()}finally{ii=t}}function setInternalConstruct(e){let t=ii;return ii=e,t}function isInternalConstruct(){return ii}var Event=class{static NONE=0;static CAPTURING_PHASE=1;static AT_TARGET=2;static BUBBLING_PHASE=3;#e;isTrusted=!1;get _s(){return this.#e}constructor(e,t){if(arguments.length===0)throw TypeError(`Failed to construct '${new.target.name}': 1 argument required, but only 0 present.`);let n=toDOMString(e),r=32;if(t!=null){if(typeof t!=`object`&&typeof t!=`function`)throw TypeError(`Failed to construct '${new.target.name}': The provided value is not of type '${new.target.name}Init'.`);t.bubbles&&(r|=256),t.cancelable&&(r|=512),t.composed&&(r|=16)}this.#e=new EventState(n,r)}get type(){return this._s.type}get target(){return this._s.target}get srcElement(){return this._s.target}get currentTarget(){return this._s.currentTarget}get eventPhase(){return this._s.eventPhase}get bubbles(){return!!(this._s.flags&256)}get cancelable(){return!!(this._s.flags&512)}get composed(){return!!(this._s.flags&16)}get timeStamp(){return this._s.timeStamp}get defaultPrevented(){return!!(this._s.flags&4)}get returnValue(){return!(this._s.flags&4)}set returnValue(e){e||setCanceledFlag(this._s)}get cancelBubble(){return!!(this._s.flags&1)}set cancelBubble(e){e&&(this._s.flags|=1)}stopPropagation(){this._s.flags|=1}stopImmediatePropagation(){this._s.flags|=3}preventDefault(){setCanceledFlag(this._s)}composedPath(){let e=this._s,t=[],n=e.pathLength;if(n===0||e.pathStart<0)return t;let r=e.pathStart,i=e.currentTarget;if(i===null)return t;let a=0,o=0;for(let e=n-1;e>=0;e--){let t=r+e*5,n=X[t+4];if(n&2&&o++,exposedPathItem(t)===i){a=e;break}n&4&&o--}let s=o,c=o,l=[];for(let e=a-1;e>=0;e--){let t=r+e*5,n=X[t+4];n&2&&s++,s<=c&&l.push(exposedPathItem(t)),n&4&&(s--,s<c&&(c=s))}for(let e=l.length-1;e>=0;e--)t.push(l[e]);t.push(i),s=o,c=o;for(let e=a+1;e<n;e++){let n=r+e*5,i=X[n+4];i&4&&s++,s<=c&&t.push(exposedPathItem(n)),i&2&&(s--,s<c&&(c=s))}return t}initEvent(e,t=!1,n=!1){if(arguments.length===0)throw TypeError(`Failed to execute 'initEvent' on 'Event': 1 argument required, but only 0 present.`);this._s.flags&64||initializeEvent(this,toDOMString(e),!!t,!!n)}};Object.defineProperties(Event.prototype,{NONE:{value:0,enumerable:!0},CAPTURING_PHASE:{value:1,enumerable:!0},AT_TARGET:{value:2,enumerable:!0},BUBBLING_PHASE:{value:3,enumerable:!0},[Symbol.toStringTag]:{value:`Event`,configurable:!0}});function setCanceledFlag(e){(e.flags&520)==512&&(e.flags|=4)}function initializeEvent(e,t,n,r){let i=e._s,a=(i.flags|32)&-904;n&&(a|=256),r&&(a|=512),i.flags=a,e.isTrusted=!1,i.target=null,i.type=t}function setTrusted(e,t=!0){t?e._s.flags|=128:e._s.flags&=-129,e.isTrusted=t}function setToStringTag(e,t){Object.defineProperty(e.prototype,Symbol.toStringTag,{value:e.name,configurable:!0}),t!==void 0&&Object.defineProperty(e,"length",{value:t,configurable:!0})}setToStringTag(Event,1),exposeMembers(Event);var AbortBinding=class{signal;onAbort;constructor(e,t){this.signal=e,this.onAbort=t}};let ai=0;function listenerSeqLimit(){return ai}var Listener=class{callback;flags;next;seq;abort;constructor(e,t){this.callback=e,this.flags=t,this.next=null,this.seq=ai++,this.abort=null}};function isCompact(e){return e.length!==0&&typeof e[0]==`number`}const oi=/* @__PURE__ */ new Map;function idForType(e){let t=oi.get(e);return t===void 0&&(t=oi.size,oi.set(e,t)),t}function typeIdOf(e){let t=oi.get(e);return t===void 0?-1:t}function firstListener(e,t){let n=e.length;if(n!==0&&typeof e[0]==`number`){for(let r=0;r<n;r+=2)if(e[r]===t)return e[r+1]}else return t>>>0<n?e[t]:void 0}function setFirstListener(e,t,n,r){if(!isCompact(t)){t[n]=r;return}let i=t.length;for(let e=0;e<i;e+=2)if(t[e]===n){t[e+1]=r;return}if(r===void 0)return;let a;if(i<8){a=Array(i+2);for(let e=0;e<i;e++)a[e]=t[e];a[i]=n,a[i+1]=r}else{a=[];for(let e=0;e<i;e+=2)a[t[e]]=t[e+1];a[n]=r}e[Dn]=a}function eachHead(e,t){let n=isCompact(e);for(let r=+!!n;r<e.length;r+=n?2:1){let n=e[r];n!==void 0&&t(n)}}const si={capture:!1,once:!1,passive:null,signal:null};function flattenCapture(e){return typeof e==`boolean`?e:e==null?!1:typeof e!=`object`&&typeof e!=`function`?!!e:!!e.capture}function flattenMore(e){if(si.capture=!1,si.once=!1,si.passive=null,si.signal=null,e==null)return si;if(typeof e!=`object`&&typeof e!=`function`)return si.capture=!!e,si;let t=!!e.capture,n=!!e.once,r=e.passive,i=e.signal;if(si.capture=t,si.once=n,si.passive=r===void 0?null:!!r,si.signal=null,i!==void 0){if(typeof i!=`object`||!i||typeof i.aborted!=`boolean`||typeof i.addEventListener!=`function`)throw TypeError(`Failed to execute 'addEventListener' on 'EventTarget': member signal is not of type 'AbortSignal'.`);si.signal=i}return si}function defaultPassiveValue(e,t){if(e!==`touchstart`&&e!==`touchmove`&&e!==`wheel`&&e!==`mousewheel`)return!1;let n=t,r=n[z];if(r===void 0){let e=n.document;return e!=null&&e[Y]===t}if(r.type===9)return!0;let i=r.doc;return i.documentElement===t||i.body===t}function checkCallback(e,t){if(typeof e!=`function`&&(typeof e!=`object`||!e))throw TypeError(`Failed to execute '${t}' on 'EventTarget': parameter 2 is not of type 'Object'.`)}function addEventListener(e,t,n,r){if(typeof r==`boolean`){if(n==null)return;checkCallback(n,`addEventListener`),addFlattened(e,t,n,r,!1,null,null);return}let{capture:i,once:a,passive:o,signal:s}=flattenMore(r);s!==null&&s.aborted||n!=null&&(checkCallback(n,`addEventListener`),addFlattened(e,t,n,i,a,o,s))}function addFlattened(e,t,n,r,i,a,o){let s=+!!r,c=idForType(t),l=e[Dn],u=l==null?void 0:firstListener(l,c);if(u!==void 0)for(;;){if(u.callback===n&&(u.flags&1)===s)return;let e=u.next;if(e===null)break;u=e}let d=new Listener(n,s|(i?2:0)|((a===null?defaultPassiveValue(t,e):a)?4:0));if(u===void 0?l==null?e[Dn]=[c,d]:setFirstListener(e,l,c,d):u.next=d,o!==null){let onAbort=()=>removeListener(e,t,d);d.abort=new AbortBinding(o,onAbort),o.addEventListener(`abort`,onAbort,{once:!0})}}function removeEventListener(e,t,n,r){let i=+!!flattenCapture(r);if(n==null)return;checkCallback(n,`removeEventListener`);let a=e[Dn];if(a==null)return;let o=typeIdOf(t),s=null;for(let t=firstListener(a,o)??null;t!==null;s=t,t=t.next)if(t.callback===n&&(t.flags&1)===i){unlink$1(e,a,o,s,t);return}}function removeListener(e,t,n){if(n.flags&8)return;let r=e[Dn];if(r!=null){let i=typeIdOf(t),a=null;for(let t=firstListener(r,i)??null;t!==null;a=t,t=t.next)if(t===n){unlink$1(e,r,i,a,t);return}}n.flags|=8}function unlink$1(e,t,n,r,i){markRemoved(i),r===null?setFirstListener(e,t,n,i.next??void 0):r.next=i.next}__name(unlink$1,`unlink`);function markRemoved(e){e.flags|=8;let t=e.abort;t!==null&&(t.signal.removeEventListener(`abort`,t.onAbort),e.abort=null)}function removeAllEventListeners(e){let t=e[Dn];t!=null&&(e[Dn]=null,eachHead(t,e=>{for(let t=e;t!==null;t=t.next)markRemoved(t)}))}function hasListeners(e,t){let n=e[Dn];return n!=null&&firstListener(n,typeIdOf(t))!==void 0}function reusableElement(e,t){let n=e[z];return n===void 0||n.parent!==null||n.first!==null||n.attrs!==null||n.flags&2048||e[Sr]!=null?!1:listenerCount(e)===t}function listenerCount(e){let t=e[Dn];if(t==null)return 0;let n=0;return eachHead(t,e=>{for(let t=e;t!==null;t=t.next)n++}),n}function hasAnyListener(e){let t=e[Dn];if(t==null)return!1;let n=!1;return eachHead(t,()=>{n=!0}),n}const ci=/* @__PURE__ */ `.a.abbr.address.area.article.aside.audio.b.base.bdi.bdo.blockquote.body.br.button.canvas.caption.cite.code.col.colgroup.data.datalist.dd.del.details.dfn.dialog.div.dl.dt.em.embed.fieldset.figcaption.figure.footer.form.h1.h2.h3.h4.h5.h6.head.header.hgroup.hr.html.i.iframe.img.input.ins.kbd.label.legend.li.link.main.map.mark.menu.meta.meter.nav.noscript.object.ol.optgroup.option.output.p.picture.pre.progress.q.rp.rt.ruby.s.samp.script.search.section.select.slot.small.source.span.strong.style.sub.summary.sup.table.tbody.td.template.textarea.tfoot.th.thead.time.title.tr.track.u.ul.var.video.wbr.svg.math.frame.frameset.noframes.marquee.font.center.dir.applet.basefont.bgsound.big.blink.keygen.listing.menuitem.nobr.noembed.param.plaintext.rb.rtc.strike.tt.xmp.image.selectedcontent`.split(`.`),li=/* @__PURE__ */ new Map;for(let e=1;e<ci.length;e++)li.set(ci[e],e);function tagId(e){return li.get(e)??0}function tagName(e){return ci[e]??``}const Z=Object.fromEntries(ci.map((e,t)=>[e,t])),ui=/* @__PURE__ */ new Uint8Array(256);for(let e of[Z.a,Z.area,Z.button,Z.input,Z.label,Z.summary])ui[e]=1;function mayHaveActivationBehavior(e){return ui[e]===1}const ifaceName=e=>typeof e==`string`?e:e.name;function requireArgs$1(e,t,n){if(e<t)throw TypeError(`Failed to construct '${ifaceName(n)}': ${t} argument${t>1?`s`:``} required, but only ${e} present.`)}__name(requireArgs$1,`requireArgs`);function dict(e,t){if(e==null)return null;if(typeof e!=`object`&&typeof e!=`function`)throw TypeError(`Failed to construct '${t}': The provided value is not of type '${t}Init'.`);return e}function isWindow(e){if(typeof e!=`object`||!e)return!1;let t=e;return t.window===e||t.document!=null&&t.document[Y]===e}function viewMember(e,t){if(e==null)return null;if(!isWindow(e))throw TypeError(`Failed to construct '${ifaceName(t)}': member view is not of type Window.`);return e}function targetMember(e){return e??null}const di=Object.freeze({}),fi=/* @__PURE__ */ __name((e,t)=>e===void 0?t:toDOMString(e),`str`),pi=/* @__PURE__ */ __name((e,t=0)=>e===void 0?t:toLong(e),`long`),mi=/* @__PURE__ */ __name(e=>e===void 0?0:toUnsignedLong$1(e),`ulong`),double=(e,t,n,r=0)=>e===void 0?r:typeof e==`number`&&Number.isFinite(e)?e:toDouble(e,`Failed to construct '${ifaceName(n)}': member ${t}`),float=(e,t,n,r=0)=>{if(e===void 0)return r;if(typeof e==`number`){let t=Math.fround(e);if(Number.isFinite(t))return t}return toFloat(e,`Failed to construct '${ifaceName(n)}': member ${t}`)},hi=[[`ctrlKey`,1],[`shiftKey`,2],[`altKey`,4],[`metaKey`,8],[`modifierAltGraph`,16],[`modifierCapsLock`,32],[`modifierFn`,64],[`modifierFnLock`,128],[`modifierHyper`,256],[`modifierNumLock`,512],[`modifierScrollLock`,1024],[`modifierSuper`,2048],[`modifierSymbol`,4096],[`modifierSymbolLock`,8192]];function modifiers(e){let t=0;return e.altKey&&(t|=4),e.ctrlKey&&(t|=1),e.metaKey&&(t|=8),e.modifierAltGraph&&(t|=16),e.modifierCapsLock&&(t|=32),e.modifierFn&&(t|=64),e.modifierFnLock&&(t|=128),e.modifierHyper&&(t|=256),e.modifierNumLock&&(t|=512),e.modifierScrollLock&&(t|=1024),e.modifierSuper&&(t|=2048),e.modifierSymbol&&(t|=4096),e.modifierSymbolLock&&(t|=8192),e.shiftKey&&(t|=2),t}function modifierState(e,t){let n;switch(t){case`Control`:n=1;break;case`Shift`:n=2;break;case`Alt`:n=4;break;case`Meta`:n=8;break;default:{let e=hi.find(e=>e[0]===`modifier`+t);if(e===void 0)return!1;n=e[1]}}return(e&n)!==0}function legacyMods(e,t,n,r,i){let a=i&-16;return e&&(a|=1),t&&(a|=4),n&&(a|=2),r&&(a|=8),a}var UIEvent=class extends Event{#e;#t;#n;constructor(e,t){requireArgs$1(arguments.length,1,new.target),super(e,t);let n=t??di;this.#t=pi(n.detail),this.#e=viewMember(n.view,new.target),this.#n=mi(n.which)}get view(){return this.#e}get detail(){return this.#t}get which(){return this.#n}initUIEvent(e,t=!1,n=!1,r=null,i=0){if(arguments.length===0)throw TypeError(`Failed to execute 'initUIEvent' on 'UIEvent': 1 argument required, but only 0 present.`);if(r!=null&&!isWindow(r))throw TypeError(`Failed to execute 'initUIEvent' on '${this.constructor.name}': parameter 4 is not of type 'Window'.`);this._s.flags&64||(initializeEvent(this,toDOMString(e),!!t,!!n),this.#e=r??null,this.#t=toLong(i))}};setToStringTag(UIEvent,1);var FocusEvent=class extends UIEvent{constructor(e,t){requireArgs$1(arguments.length,1,new.target),super(e,t),this._s.relatedTarget=targetMember(t?.relatedTarget)}get relatedTarget(){return this._s.relatedTarget}};setToStringTag(FocusEvent,1);var MouseEvent=class extends UIEvent{#e;#t;#n;#r;#i;#a;#o;#s;#c;constructor(e,t){requireArgs$1(arguments.length,1,new.target),super(e,t);let n=t??di,r=new.target;this.#i=modifiers(n);let i=n.button;this.#a=i===void 0?0:toShort(i);let a=n.buttons;this.#o=a===void 0?0:toUnsignedShort(a),this.#n=double(n.clientX,`clientX`,r),this.#r=double(n.clientY,`clientY`,r),this.#s=double(n.movementX,`movementX`,r),this.#c=double(n.movementY,`movementY`,r);let o=this._s;o.relatedTarget=targetMember(n.relatedTarget),this.#e=double(n.screenX,`screenX`,r),this.#t=double(n.screenY,`screenY`,r),o.flags|=1024}get screenX(){return this.#e}get screenY(){return this.#t}get clientX(){return this.#n}get clientY(){return this.#r}get x(){return this.#n}get y(){return this.#r}get pageX(){return this.#n}get pageY(){return this.#r}get offsetX(){return this.#n}get offsetY(){return this.#r}get movementX(){return this.#s}get movementY(){return this.#c}get ctrlKey(){return!!(this.#i&1)}get shiftKey(){return!!(this.#i&2)}get altKey(){return!!(this.#i&4)}get metaKey(){return!!(this.#i&8)}get button(){return this.#a}get buttons(){return this.#o}get relatedTarget(){return this._s.relatedTarget}getModifierState(e){return modifierState(this.#i,toDOMString(e))}initMouseEvent(e,t=!1,n=!1,r=null,i=0,a=0,o=0,s=0,c=0,l=!1,u=!1,d=!1,m=!1,h=0,_=null){if(arguments.length===0)throw TypeError(`Failed to execute 'initMouseEvent' on 'MouseEvent': 1 argument required, but only 0 present.`);this._s.flags&64||(this.initUIEvent(e,t,n,r,i),this.#e=toLong(a),this.#t=toLong(o),this.#n=toLong(s),this.#r=toLong(c),this.#i=legacyMods(l,u,d,m,this.#i),this.#a=toShort(h),this._s.relatedTarget=targetMember(_))}};setToStringTag(MouseEvent,1);const gi=180/Math.PI,_i=Object.freeze([]);function spherical2tilt(e,t){let n=0,r=0,i=Math.PI;if(e===0)(t===0||t===2*i)&&(n=i/2),t===i/2&&(r=i/2),t===i&&(n=-i/2),t===3*i/2&&(r=-i/2),t>0&&t<i/2&&(n=i/2,r=i/2),t>i/2&&t<i&&(n=-i/2,r=i/2),t>i&&t<3*i/2&&(n=-i/2,r=-i/2),t>3*i/2&&t<2*i&&(n=i/2,r=-i/2);else{let i=Math.tan(e);n=Math.atan(Math.cos(t)/i),r=Math.atan(Math.sin(t)/i)}return[Math.round(n*gi),Math.round(r*gi)]}function tilt2spherical(e,t){let n=e/gi,r=t/gi,i=0;e===0?t>0?i=Math.PI/2:t<0&&(i=3*Math.PI/2):t===0?e<0&&(i=Math.PI):Math.abs(e)===90||Math.abs(t)===90?i=0:(i=Math.atan2(Math.tan(r),Math.tan(n)),i<0&&(i+=2*Math.PI));let a;return a=Math.abs(e)===90||Math.abs(t)===90?0:e===0?Math.PI/2-Math.abs(r):t===0?Math.PI/2-Math.abs(n):Math.atan(1/Math.sqrt(Math.tan(n)**2+Math.tan(r)**2)),[a,i]}var PointerEvent=class extends MouseEvent{#e;#t;#n;#r;#i;#a;#o;#s;#c;#l;#u;#d;#f;#p;#m;constructor(e,t){requireArgs$1(arguments.length,1,new.target),super(e,t);let n=t??di,r=new.target,i=n.altitudeAngle,a=double(i,`altitudeAngle`,r,Math.PI/2),o=n.azimuthAngle,s=double(o,`azimuthAngle`,r,0),c=n.coalescedEvents;this.#p=c==null?_i:Array.from(c),this.#n=double(n.height,`height`,r,1),this.#d=!!n.isPrimary,this.#f=pi(n.persistentDeviceId),this.#e=pi(n.pointerId),this.#u=fi(n.pointerType,``);let l=n.predictedEvents;this.#m=l==null?_i:Array.from(l),this.#r=float(n.pressure,`pressure`,r),this.#i=float(n.tangentialPressure,`tangentialPressure`,r);let u=n.tiltX,d=pi(u),m=n.tiltY,h=pi(m);this.#s=pi(n.twist),this.#t=double(n.width,`width`,r,1);let _=u!==void 0||m!==void 0,v=i!==void 0||o!==void 0;_&&!v?[a,s]=tilt2spherical(d,h):v&&!_&&([d,h]=spherical2tilt(a,s)),this.#a=d,this.#o=h,this.#c=a,this.#l=s}get pointerId(){return this.#e}get width(){return this.#t}get height(){return this.#n}get pressure(){return this.#r}get tangentialPressure(){return this.#i}get tiltX(){return this.#a}get tiltY(){return this.#o}get twist(){return this.#s}get altitudeAngle(){return this.#c}get azimuthAngle(){return this.#l}get pointerType(){return this.#u}get isPrimary(){return this.#d}get persistentDeviceId(){return this.#f}getCoalescedEvents(){return this.#p.slice()}getPredictedEvents(){return this.#m.slice()}};setToStringTag(PointerEvent,1);var WheelEvent=class extends MouseEvent{static DOM_DELTA_PIXEL=0;static DOM_DELTA_LINE=1;static DOM_DELTA_PAGE=2;#e;#t;#n;#r;constructor(e,t){requireArgs$1(arguments.length,1,new.target),super(e,t);let n=t??di,r=new.target;this.#r=mi(n.deltaMode),this.#e=double(n.deltaX,`deltaX`,r),this.#t=double(n.deltaY,`deltaY`,r),this.#n=double(n.deltaZ,`deltaZ`,r)}get deltaX(){return this.#e}get deltaY(){return this.#t}get deltaZ(){return this.#n}get deltaMode(){return this.#r}};setToStringTag(WheelEvent,1),Object.defineProperties(WheelEvent.prototype,{DOM_DELTA_PIXEL:{value:0,enumerable:!0},DOM_DELTA_LINE:{value:1,enumerable:!0},DOM_DELTA_PAGE:{value:2,enumerable:!0}});var DragEvent=class extends MouseEvent{#e;constructor(e,t){requireArgs$1(arguments.length,1,new.target),super(e,t),this.#e=t?.dataTransfer??null}get dataTransfer(){return this.#e}};setToStringTag(DragEvent,1);var KeyboardEvent=class extends UIEvent{static DOM_KEY_LOCATION_STANDARD=0;static DOM_KEY_LOCATION_LEFT=1;static DOM_KEY_LOCATION_RIGHT=2;static DOM_KEY_LOCATION_NUMPAD=3;#e;#t;#n;#r;#i;#a;#o;#s;constructor(e,t){requireArgs$1(arguments.length,1,new.target),super(e,t);let n=t??di;this.#r=modifiers(n),this.#o=mi(n.charCode),this.#t=fi(n.code,``),this.#a=!!n.isComposing,this.#e=fi(n.key,``),this.#s=mi(n.keyCode),this.#n=mi(n.location),this.#i=!!n.repeat}get key(){return this.#e}get code(){return this.#t}get location(){return this.#n}get ctrlKey(){return!!(this.#r&1)}get shiftKey(){return!!(this.#r&2)}get altKey(){return!!(this.#r&4)}get metaKey(){return!!(this.#r&8)}get repeat(){return this.#i}get isComposing(){return this.#a}get charCode(){return this.#o}get keyCode(){return this.#s}getModifierState(e){return modifierState(this.#r,toDOMString(e))}initKeyboardEvent(e,t=!1,n=!1,r=null,i=``,a=0,o=!1,s=!1,c=!1,l=!1){if(arguments.length===0)throw TypeError(`Failed to execute 'initKeyboardEvent' on 'KeyboardEvent': 1 argument required, but only 0 present.`);this._s.flags&64||(this.initUIEvent(e,t,n,r,0),this.#e=toDOMString(i),this.#n=toUnsignedLong$1(a),this.#r=legacyMods(o,s,c,l,this.#r))}};setToStringTag(KeyboardEvent,1),Object.defineProperties(KeyboardEvent.prototype,{DOM_KEY_LOCATION_STANDARD:{value:0,enumerable:!0},DOM_KEY_LOCATION_LEFT:{value:1,enumerable:!0},DOM_KEY_LOCATION_RIGHT:{value:2,enumerable:!0},DOM_KEY_LOCATION_NUMPAD:{value:3,enumerable:!0}});var InputEvent=class extends UIEvent{#e;#t;#n;#r;constructor(e,t){requireArgs$1(arguments.length,1,new.target),super(e,t);let n=t??di,r=n.data;this.#e=r==null?null:toDOMString(r),this.#r=n.dataTransfer??null,this.#n=fi(n.inputType,``),this.#t=!!n.isComposing}get data(){return this.#e}get isComposing(){return this.#t}get inputType(){return this.#n}get dataTransfer(){return this.#r}};setToStringTag(InputEvent,1);var CompositionEvent=class extends UIEvent{#e;constructor(e,t){requireArgs$1(arguments.length,1,new.target),super(e,t),this.#e=fi((t??di).data,``)}get data(){return this.#e}initCompositionEvent(e,t=!1,n=!1,r=null,i=``){if(arguments.length===0)throw TypeError(`Failed to execute 'initCompositionEvent' on 'CompositionEvent': 1 argument required, but only 0 present.`);this._s.flags&64||(this.initUIEvent(e,t,n,r,0),this.#e=toDOMString(i))}};setToStringTag(CompositionEvent,1);var TextEvent=class extends UIEvent{#e;constructor(e,t){if(!isInternalConstruct())throw TypeError(`Illegal constructor`);super(e,t),this.#e=``}get data(){return this.#e}initTextEvent(e,t=!1,n=!1,r=null,i=`undefined`){this._s.flags&64||(this.initUIEvent(e,t,n,r,0),this.#e=toDOMString(i))}};setToStringTag(TextEvent,1);var Touch=class{#e;#t;#n;#r;#i;#a;#o;#s;#c;#l;#u;#d;#f;#p;#m;constructor(e){requireArgs$1(arguments.length,1,`Touch`);let t=dict(e,`Touch`);if(t===null||t.identifier===void 0)throw TypeError(`Failed to construct 'Touch': required member identifier is undefined.`);if(t.target===void 0)throw TypeError(`Failed to construct 'Touch': required member target is undefined.`);let n=`Touch`;this.#f=double(t.altitudeAngle,`altitudeAngle`,n),this.#p=double(t.azimuthAngle,`azimuthAngle`,n),this.#n=double(t.clientX,`clientX`,n),this.#r=double(t.clientY,`clientY`,n),this.#d=float(t.force,`force`,n),this.#e=toLong(t.identifier),this.#o=double(t.pageX,`pageX`,n),this.#s=double(t.pageY,`pageY`,n),this.#c=float(t.radiusX,`radiusX`,n),this.#l=float(t.radiusY,`radiusY`,n),this.#u=float(t.rotationAngle,`rotationAngle`,n),this.#i=double(t.screenX,`screenX`,n),this.#a=double(t.screenY,`screenY`,n),this.#t=t.target,this.#m=fi(t.touchType,`direct`)}get identifier(){return this.#e}get target(){return this.#t}get clientX(){return this.#n}get clientY(){return this.#r}get screenX(){return this.#i}get screenY(){return this.#a}get pageX(){return this.#o}get pageY(){return this.#s}get radiusX(){return this.#c}get radiusY(){return this.#l}get rotationAngle(){return this.#u}get force(){return this.#d}get altitudeAngle(){return this.#f}get azimuthAngle(){return this.#p}get touchType(){return this.#m}};setToStringTag(Touch,1);var vi=class TouchList{#e;constructor(){if(!isInternalConstruct())throw TypeError(`Illegal constructor`);this.#e=[]}static _create(e){let t=isInternalConstruct()?new TouchList:withInternalConstruct(()=>new TouchList);t.#e=e;for(let n=0;n<e.length;n++)Object.defineProperty(t,n,{value:e[n],enumerable:!0,configurable:!0});return t}get length(){return this.#e.length}item(e){return this.#e[toUnsignedLong$1(e)]??null}[Symbol.iterator](){return this.#e[Symbol.iterator]()}};setToStringTag(vi);function touchSequence(e,t){if(e==null)return[];let n=Array.from(e);for(let e of n)if(e===null||typeof e!=`object`&&typeof e!=`function`)throw TypeError(`Failed to construct 'TouchEvent': Failed to read the '${t}' property from 'TouchEventInit': Failed to convert value to 'Touch'.`);return n}var TouchEvent=class extends UIEvent{#e;#t;#n;#r;constructor(e,t){requireArgs$1(arguments.length,1,new.target),super(e,t);let n=t??di;this.#r=modifiers(n),this.#n=vi._create(touchSequence(n.changedTouches,`changedTouches`)),this.#t=vi._create(touchSequence(n.targetTouches,`targetTouches`)),this.#e=vi._create(touchSequence(n.touches,`touches`)),this._s.flags|=2048}get touches(){return this.#e}get targetTouches(){return this.#t}get changedTouches(){return this.#n}get altKey(){return!!(this.#r&4)}get metaKey(){return!!(this.#r&8)}get ctrlKey(){return!!(this.#r&1)}get shiftKey(){return!!(this.#r&2)}getModifierState(e){return modifierState(this.#r,toDOMString(e))}_touchTargetList(){let e=[];for(let t of[this.#e,this.#t,this.#n])for(let n of t){let t=n.target;typeof t==`object`&&t&&e.push(t)}return e}};setToStringTag(TouchEvent,1);var ClipboardEvent=class extends Event{#e;constructor(e,t){requireArgs$1(arguments.length,1,new.target),super(e,t),this.#e=t?.clipboardData??null}get clipboardData(){return this.#e}};setToStringTag(ClipboardEvent,1),exposeMembers(UIEvent,FocusEvent,MouseEvent,PointerEvent,WheelEvent,DragEvent,KeyboardEvent,InputEvent,CompositionEvent,TextEvent,Touch,vi,TouchEvent,ClipboardEvent);const get=(e,t)=>e?.[t],yi=/* @__PURE__ */ __name((e,t,n=``)=>{let r=get(e,t);return r===void 0?n:toDOMString(r)},`str`),bi=/* @__PURE__ */ __name((e,t)=>{let n=get(e,t);return n==null?null:toDOMString(n)},`nullableStr`),dbl=(e,t,n)=>{let r=get(e,t);return r===void 0?0:typeof r==`number`&&Number.isFinite(r)?r:toDouble(r,`Failed to construct '${n.name}': member ${t}`)};function required(e,t,n){let r=get(e,t);if(r===void 0)throw TypeError(`Failed to construct '${n}': required member ${t} is undefined.`);return r}var CustomEvent=class extends Event{#e;constructor(e,t){requireArgs$1(arguments.length,1,new.target),super(e,t);let n=t?.detail;this.#e=n===void 0?null:n}get detail(){return this.#e}initCustomEvent(e,t=!1,n=!1,r=null){if(arguments.length===0)throw TypeError(`Failed to execute 'initCustomEvent' on 'CustomEvent': 1 argument required, but only 0 present.`);this._s.flags&64||(initializeEvent(this,toDOMString(e),!!t,!!n),this.#e=r)}};setToStringTag(CustomEvent,1);var ErrorEvent=class extends Event{#e;#t;#n;#r;#i;constructor(e,t){requireArgs$1(arguments.length,1,new.target),super(e,t);let n=t;this.#e=yi(n,`message`),this.#t=yi(n,`filename`);let r=get(n,`lineno`),i=get(n,`colno`);this.#n=r===void 0?0:toUnsignedLong$1(r),this.#r=i===void 0?0:toUnsignedLong$1(i),this.#i=get(n,`error`)}get message(){return this.#e}get filename(){return this.#t}get lineno(){return this.#n}get colno(){return this.#r}get error(){return this.#i}};setToStringTag(ErrorEvent,1);var PromiseRejectionEvent=class extends Event{#e;#t;constructor(e,t){requireArgs$1(arguments.length,2,new.target);let n=required(t,`promise`,new.target.name);if(n===null||typeof n!=`object`&&typeof n!=`function`)throw TypeError(`Failed to construct '${new.target.name}': member promise is not an object.`);super(e,t),this.#e=n,this.#t=get(t,`reason`)}get promise(){return this.#e}get reason(){return this.#t}};setToStringTag(PromiseRejectionEvent,2);var MessageEvent=class extends Event{#e;#t;#n;#r;#i;constructor(e,t){requireArgs$1(arguments.length,1,new.target),super(e,t);let n=t,r=get(n,`data`);this.#e=r===void 0?null:r,this.#t=yi(n,`origin`),this.#n=yi(n,`lastEventId`),this.#r=get(n,`source`)??null;let i=get(n,`ports`);this.#i=Object.freeze(i==null?[]:Array.from(i))}get data(){return this.#e}get origin(){return this.#t}get lastEventId(){return this.#n}get source(){return this.#r}get ports(){return this.#i}initMessageEvent(e,t=!1,n=!1,r=null,i=``,a=``,o=null,s=[]){this._s.flags&64||(initializeEvent(this,toDOMString(e),!!t,!!n),this.#e=r,this.#t=toDOMString(i),this.#n=toDOMString(a),this.#r=o,this.#i=Object.freeze(Array.from(s)))}};setToStringTag(MessageEvent,1);var ProgressEvent=class extends Event{#e;#t;#n;constructor(e,t){requireArgs$1(arguments.length,1,new.target),super(e,t),this.#e=!!get(t,`lengthComputable`),this.#t=dbl(t,`loaded`,new.target),this.#n=dbl(t,`total`,new.target)}get lengthComputable(){return this.#e}get loaded(){return this.#t}get total(){return this.#n}};setToStringTag(ProgressEvent,1);var AnimationEvent=class extends Event{#e;#t;#n;constructor(e,t){requireArgs$1(arguments.length,1,new.target),super(e,t),this.#e=yi(t,`animationName`),this.#t=dbl(t,`elapsedTime`,new.target),this.#n=yi(t,`pseudoElement`)}get animationName(){return this.#e}get elapsedTime(){return this.#t}get pseudoElement(){return this.#n}};setToStringTag(AnimationEvent,1);var TransitionEvent=class extends Event{#e;#t;#n;constructor(e,t){requireArgs$1(arguments.length,1,new.target),super(e,t),this.#e=yi(t,`propertyName`),this.#t=dbl(t,`elapsedTime`,new.target),this.#n=yi(t,`pseudoElement`)}get propertyName(){return this.#e}get elapsedTime(){return this.#t}get pseudoElement(){return this.#n}};setToStringTag(TransitionEvent,1);var PopStateEvent=class extends Event{#e;#t;constructor(e,t){requireArgs$1(arguments.length,1,new.target),super(e,t);let n=get(t,`state`);this.#e=n===void 0?null:n,this.#t=!!get(t,`hasUAVisualTransition`)}get state(){return this.#e}get hasUAVisualTransition(){return this.#t}};setToStringTag(PopStateEvent,1);var HashChangeEvent=class extends Event{#e;#t;constructor(e,t){requireArgs$1(arguments.length,1,new.target),super(e,t),this.#e=yi(t,`oldURL`),this.#t=yi(t,`newURL`)}get oldURL(){return this.#e}get newURL(){return this.#t}};setToStringTag(HashChangeEvent,1);var PageTransitionEvent=class extends Event{#e;constructor(e,t){requireArgs$1(arguments.length,1,new.target),super(e,t),this.#e=!!get(t,`persisted`)}get persisted(){return this.#e}};setToStringTag(PageTransitionEvent,1);var StorageEvent=class extends Event{#e;#t;#n;#r;#i;constructor(e,t){requireArgs$1(arguments.length,1,new.target),super(e,t),this.#e=bi(t,`key`),this.#t=bi(t,`oldValue`),this.#n=bi(t,`newValue`),this.#r=yi(t,`url`),this.#i=get(t,`storageArea`)??null}get key(){return this.#e}get oldValue(){return this.#t}get newValue(){return this.#n}get url(){return this.#r}get storageArea(){return this.#i}initStorageEvent(e,t=!1,n=!1,r=null,i=null,a=null,o=``,s=null){this._s.flags&64||(initializeEvent(this,toDOMString(e),!!t,!!n),this.#e=r===null?null:toDOMString(r),this.#t=i===null?null:toDOMString(i),this.#n=a===null?null:toDOMString(a),this.#r=toDOMString(o),this.#i=s)}};setToStringTag(StorageEvent,1);var SubmitEvent=class extends Event{#e;constructor(e,t){requireArgs$1(arguments.length,1,new.target),super(e,t),this.#e=get(t,`submitter`)??null}get submitter(){return this.#e}};setToStringTag(SubmitEvent,1);var FormDataEvent=class extends Event{#e;constructor(e,t){requireArgs$1(arguments.length,2,new.target);let n=required(t,`formData`,new.target.name);super(e,t),this.#e=n}get formData(){return this.#e}};setToStringTag(FormDataEvent,2);var ToggleEvent=class extends Event{#e;#t;#n;constructor(e,t){requireArgs$1(arguments.length,1,new.target),super(e,t),this.#e=yi(t,`oldState`),this.#t=yi(t,`newState`),this.#n=get(t,`source`)??null}get oldState(){return this.#e}get newState(){return this.#t}get source(){return this.#n}};setToStringTag(ToggleEvent,1);var BeforeUnloadEvent=class extends Event{#e;constructor(e,t){if(!isInternalConstruct())throw TypeError(`Illegal constructor`);super(e,t),this.#e=``}get returnValue(){return this.#e}set returnValue(e){this.#e=toDOMString(e)}};setToStringTag(BeforeUnloadEvent,1);var CloseEvent=class extends Event{#e;#t;#n;constructor(e,t){requireArgs$1(arguments.length,1,new.target),super(e,t),this.#e=!!get(t,`wasClean`);let n=get(t,`code`);this.#t=n===void 0?0:toUnsignedShort(n),this.#n=yi(t,`reason`)}get wasClean(){return this.#e}get code(){return this.#t}get reason(){return this.#n}};setToStringTag(CloseEvent,1),exposeMembers(CustomEvent,ErrorEvent,PromiseRejectionEvent,MessageEvent,ProgressEvent,AnimationEvent,TransitionEvent,PopStateEvent,HashChangeEvent,PageTransitionEvent,StorageEvent,SubmitEvent,FormDataEvent,ToggleEvent,BeforeUnloadEvent,CloseEvent);let xi=null;function setCurrentWindow(e){xi=e}function currentWindow(){if(xi===null)throw TypeError(`No active @ctrl/dom window. Create one with createWindow().`);return xi}function currentDocument(){return currentWindow().document}function currentWindowOrNull(){return xi}function defaultUncaughtExceptionHandler(e){let t=typeof e==`object`&&e?e.stack:void 0;console.error(typeof t==`string`?t:`Uncaught ${String(e)}`)}let Si=defaultUncaughtExceptionHandler;function setUncaughtExceptionHandler(e){Si=e??defaultUncaughtExceptionHandler}const Ci=/* @__PURE__ */ new WeakSet;function windowFor(e){if(e!==null){let t=e;if(t[z]!==void 0)return t[z].doc[Y];let n=t.document;if(n!=null&&n[Y]===e)return e}try{return currentWindow()}catch{return null}}function parseLocation(e){let t=typeof e==`object`&&e?e.stack:void 0;if(typeof t==`string`){let e=t.split(`
|
|
1
|
+
import{AsyncResource as e}from"node:async_hooks";import{clearTimeout as t,setTimeout as n}from"node:timers";import{availableParallelism as r}from"node:os";var i=Object.defineProperty,__name=(e,t)=>i(e,`name`,{value:t,configurable:!0}),__exportAll=(e,t)=>{let n={};for(var r in e)i(n,r,{get:e[r],enumerable:!0});return t||i(n,Symbol.toStringTag,{value:`Module`}),n};const a=1,o=2,s=3,c=4,l=5,u=6,d=7,m=8,h=9,_=10,v=11,y=12,b=1,x=2,S=4,C=8,w=16,T=32,E=`http://www.w3.org/1999/xhtml`,ee=`http://www.w3.org/2000/svg`,D=`http://www.w3.org/1998/Math/MathML`,te=`http://www.w3.org/1999/xlink`,O=`http://www.w3.org/XML/1998/namespace`,k=`http://www.w3.org/2000/xmlns/`,ne=1,A=2,re=4,ie=8,ae=16,oe=32,se=64,ce=128,le=256,ue=512,de=1024,fe=2048,pe=4096,me=16384,he=32768,ge=65536,_e=8192,ve=1<<17,ye=1<<18,be=1<<19,xe=1<<20,Se=1<<21,Ce=3145728;function exposeMembers(...e){for(let t of e){let e=t.prototype;for(let t of Object.getOwnPropertyNames(e)){if(t===`constructor`||t.charCodeAt(0)===95)continue;let n=Object.getOwnPropertyDescriptor(e,t);!n.enumerable&&n.configurable&&Object.defineProperty(e,t,{enumerable:!0})}}}function defineInterfaceShape(e,t={}){Object.defineProperty(e.prototype,Symbol.toStringTag,{value:e.name,configurable:!0}),setLength(e,Object.hasOwn(t,`constructor`)?t.constructor:0);for(let n of[e.prototype,e])for(let e of Object.getOwnPropertyNames(n)){if(e===`constructor`||e===`prototype`||e===`length`||e===`name`)continue;let r=Object.getOwnPropertyDescriptor(n,e);typeof r.value==`function`&&setLength(r.value,Object.hasOwn(t,e)?t[e]:0)}}function defineConstants(e,t){for(let n of Object.keys(t)){let r={value:t[n],writable:!1,enumerable:!0,configurable:!1};Object.defineProperty(e,n,r),Object.defineProperty(e.prototype,n,r)}}function setLength(e,t){e.length!==t&&Object.defineProperty(e,"length",{value:t,configurable:!0})}function hideInternals(e){for(let t of Reflect.ownKeys(e))(typeof t==`symbol`||t.charCodeAt(0)===95)&&we.call(e,t)&&Object.defineProperty(e,t,{enumerable:!1})}const we=Object.prototype.propertyIsEnumerable;function defineHidden(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0,enumerable:!1})}function argumentsRequired(e,t,n,r){throw TypeError(`Failed to execute '${e}' on '${t}': ${n} argument${n===1?``:`s`} required, but only ${r} present.`)}const Te=globalThis.setTimeout,Ee=globalThis.clearTimeout,De=globalThis.setImmediate,Oe=globalThis.queueMicrotask,ke=process.nextTick,Ae=globalThis.performance,je=Ae.now.bind(Ae),Me=process.getActiveResourcesInfo.bind(process),Ne=Symbol(`ctrl-dom.clock`);var TimerRecord=class{id;due;seq;delay;repeat;callback;args;ref;index;handle;real;realDue;cleared;context;constructor(t,n,r,i,a,o,s){this.id=t,this.due=n,this.seq=r,this.delay=i,this.repeat=a,this.callback=o,this.args=s,this.ref=!0,this.index=-1,this.handle=null,this.real=null,this.realDue=0,this.cleared=!1,this.context=new e(`Timeout`)}},VirtualTimeout=class{#e;#t;constructor(e,t){this.#e=e,this.#t=t}ref(){return this.#e._setRef(this.#t,!0),this}unref(){return this.#e._setRef(this.#t,!1),this}hasRef(){return this.#t.ref}get _destroyed(){return!this.#e.byId.has(this.#t.id)}refresh(){return this.#e._refresh(this.#t),this}close(){return this.#e.clear(this.#t.id),this}[Symbol.toPrimitive](){return this.#t.id}[Symbol.dispose](){this.#e.clear(this.#t.id)}};function before(e,t){return e.due<t.due||e.due===t.due&&e.seq<t.seq}var VirtualClock=class{skipped;epochOffset;skip;heap;byId;nextId;seq;refCount;hostTimer;hostDue;hostRefd;continuation;driverScheduled;driverImmediate;idleTurns;disposed;ioTypes;ioBaseline;ioCounts;constructor(e={}){this.skipped=0,this.epochOffset=Date.now()-je(),this.skip=e.skip===!0,this.heap=[],this.byId=/* @__PURE__ */ new Map,this.nextId=1,this.seq=0,this.refCount=0,this.hostTimer=null,this.hostDue=1/0,this.hostRefd=!0,this.continuation=!1,this.driverScheduled=!1,this.driverImmediate=!1,this.idleTurns=0,this.disposed=!1,this.ioTypes=[],this.ioBaseline=[],this.skip&&(typeof process==`object`&&(process.stdin,process.stdout,process.stderr),countIO(this.ioTypes,this.ioBaseline)),this.ioCounts=Array(this.ioTypes.length).fill(0)}now(){return je()+this.skipped}epochNow(){return Math.floor(this.epochOffset+je()+this.skipped)}schedule(e,t,n,r){let i=Number(t)|0;i<1&&(i=1);let a=new TimerRecord(this.nextId++,this.now()+i,this.seq++,i,r,e,n),o=new VirtualTimeout(this,a);return a.handle=o,this.disposed||(this.byId.set(a.id,a),this.refCount++,this.push(a),this.armHost(),this.kickDriver()),o}clear(e){let t=typeof e==`number`?e:e instanceof VirtualTimeout?Number(e):NaN,n=this.byId.get(t);return n!==void 0&&(this.byId.delete(t),n.cleared=!0,n.ref&&this.refCount--,n.real!==null&&(Ee(n.real),n.real=null),n.index!==-1&&(this.remove(n),this.armHost()),!0)}skipIdle(e){let t=this.heap[0];return t!==void 0&&t.due<=this.now()+e?!1:(this.skipped+=e,!0)}get size(){return this.byId.size}_setRef(e,t){if(e.ref===t)return;e.ref=t;let n=this.byId.has(e.id);n&&(this.refCount+=t?1:-1),n&&this.skip&&(!t&&e.index!==-1?this.toRealTrack(e,Math.max(0,e.due-this.now())):t&&e.real!==null&&this.toVirtualTrack(e)),this.updateHostRef()}toRealTrack(e,t){e.index!==-1&&(this.remove(e),this.armHost()),e.realDue=je()+t;let n=Te(()=>this.fireReal(e),t);n.unref?.(),e.real=n}toVirtualTrack(e){Ee(e.real),e.real=null,e.due=this.now()+Math.max(0,e.realDue-je()),e.seq=this.seq++,this.push(e),this.armHost(),this.kickDriver()}fireReal(e){e.real=null,!this.disposed&&this.byId.has(e.id)&&(e.repeat?this.toRealTrack(e,e.delay):this.byId.delete(e.id),e.context.runInAsyncScope(Reflect.apply,null,e.callback,e.handle,e.args))}_refresh(e){if(!(e.cleared||this.disposed)){if(e.real!==null)Ee(e.real),e.real=null,this.toRealTrack(e,e.delay);else{if(this.byId.has(e.id))e.index!==-1&&this.remove(e);else if(this.byId.set(e.id,e),e.ref)this.refCount++;else if(this.skip){this.toRealTrack(e,e.delay);return}e.due=this.now()+e.delay,e.seq=this.seq++,this.push(e),this.armHost(),this.kickDriver()}}}clearAll(){for(let e of this.byId.values())e.real!==null&&Ee(e.real),e.real=null,e.cleared=!0,e.index=-1;this.hostTimer!==null&&Ee(this.hostTimer),this.hostTimer=null,this.hostDue=1/0,this.heap.length=0,this.byId.clear(),this.refCount=0}dispose(){this.disposed=!0,this.clearAll(),j===this&&(j=null)}armHost(){if(this.disposed||this.continuation)return;let e=this.heap[0];e===void 0?(this.hostTimer!==null&&Ee(this.hostTimer),this.hostTimer=null,this.hostDue=1/0):(this.hostTimer!==null&&this.hostDue===e.due||(this.hostTimer!==null&&Ee(this.hostTimer),this.hostDue=e.due,this.hostTimer=Te(this.onHostTimer,Math.max(0,e.due-this.now())),this.hostRefd=!0),this.updateHostRef())}updateHostRef(){let e=this.hostTimer,t=this.refCount>0;e!==null&&t!==this.hostRefd&&(this.hostRefd=t,t?e.ref?.():e.unref?.())}fireContinuation=()=>{this.fireNext()};onHostTimer=()=>{Fe=je(),this.hostTimer=null,this.hostDue=1/0,this.fireNext()};fireNext(){if(this.continuation=!1,this.disposed)return;let e=this.heap[0];if(e===void 0||e.due>this.now()+1){this.armHost();return}this.skip&&e.due>this.now()&&(this.skipped+=e.due-this.now()),this.pop(),e.repeat?(e.due=this.now()+e.delay,e.seq=this.seq++,this.push(e)):(this.byId.delete(e.id),e.ref&&this.refCount--);let t=this.heap[0];t!==void 0&&t.due<=this.now()+ +!!this.skip?(this.continuation=!0,De(this.fireContinuation)):this.armHost(),e.context.runInAsyncScope(Reflect.apply,null,e.callback,e.handle,e.args)}kickDriver(){!this.skip||this.driverScheduled||this.disposed||(this.driverScheduled=!0,this.driverImmediate=!0,De(this.driverTurn))}get ownImmediates(){return+!!this.driverImmediate+ +!!this.continuation}driverTurn=()=>{if(Fe=je(),this.driverScheduled=!1,this.driverImmediate=!1,this.disposed||this.heap.length===0){this.idleTurns=0;return}let e=this.busy();if(e!==null){this.idleTurns=0,e===`immediate`?this.kickDriver():(this.driverScheduled=!0,Te(()=>{this.driverScheduled=!1,this.kickDriver()},1));return}if(++this.idleTurns<2){this.kickDriver();return}this.idleTurns=0;let t=this.heap[0].due-this.now();t>0&&(this.skipped+=t),this.hostTimer!==null&&Ee(this.hostTimer),this.hostTimer=null,this.hostDue=1/0;try{this.fireNext()}finally{this.kickDriver()}};busy(e=0){let t=Me(),n=this.ioTypes,r=this.ioBaseline,i=this.ioCounts;for(let e=0;e<i.length;e++)i[e]=0;let a=!1,o=0;for(let s=0;s<t.length;s++){let c=t[s];if(c===`Immediate`){if(++o>e)return`immediate`;continue}if(a||c===`Timeout`)continue;let l=0;for(;l<n.length&&n[l]!==c;)l++;(l===n.length||++i[l]>r[l])&&(a=!0)}return a?`io`:null}push(e){let t=this.heap;e.index=t.length,t.push(e),this.up(e.index)}pop(){let e=this.heap,t=e[0],n=e.pop();return t.index=-1,n!==t&&(e[0]=n,n.index=0,this.down(0)),t}remove(e){let t=this.heap,n=e.index,r=t.pop();e.index=-1,r!==e&&(t[n]=r,r.index=n,this.down(n),this.up(r.index))}up(e){let t=this.heap,n=t[e];for(;e>0;){let r=e-1>>1;if(!before(n,t[r]))break;t[e]=t[r],t[e].index=e,e=r}t[e]=n,n.index=e}down(e){let t=this.heap,n=t.length,r=t[e];for(;;){let i=2*e+1;if(i>=n)break;let a=i+1,o=a<n&&before(t[a],t[i])?a:i;if(!before(t[o],r))break;t[e]=t[o],t[e].index=e,e=o}t[e]=r,r.index=e}};function countIO(e,t){for(let n of Me()){if(n===`Timeout`||n===`Immediate`)continue;let r=e.indexOf(n);r===-1?(e.push(n),t.push(1)):t[r]++}}let j=null;function clockNow(){return j===null?je():j.now()}function queueUserAgentTask(e){j===null?n(e,0):j.schedule(e,0,[],!1)}const Pe={setTimeout(e,t){return j===null?n(e,t):j.schedule(e,t,[],!1)},clearTimeout(e){j!==null&&j.clear(e)||t(e)}};function clockSkipping(){return j!==null}function skipIdleTime(e){return j===null||j.skipIdle(e)}function canSkipZeroDelayWait(e){let t=j;if(t===null||!isClockTimer(e.setTimeout))return!1;let n=e.setImmediate;if(typeof n!=`function`||n.clock!==void 0||n._isMockFunction===!0||t.busy(t.ownImmediates)!==null)return!1;let r=t.heap[0];return r===void 0||r.due>t.now()+1}function skipZeroDelayWait(e){return canSkipZeroDelayWait(e)&&j.skipIdle(1)}function isClockTimer(e){return j!==null&&typeof e==`function`&&e[Ne]===j}function foreignImmediatesPending(){let e=Me(),t=0;for(let n=0;n<e.length;n++)e[n]===`Immediate`&&t++;return t>(j===null?0:j.ownImmediates)}let Fe=0;function loopTurn(e){let t=j;t===null?realTurn(e):Oe(()=>ke(settleTurn,t,e))}function settleTurn(e,t){if(j===e&&je()-Fe<=1&&e.busy(e.ownImmediates)===null){let n=e.heap[0];if(n===void 0||n.due>e.now()){t();return}}realTurn(t)}function realTurn(e){De(()=>{Fe=je(),e()})}function clockSkipped(){return j===null?0:j.skipped}function clearActiveClockTimers(){j?.clearAll()}function clockStats(){return j===null?null:{skippedMs:j.skipped,pendingTimers:j.size}}function virtualDate(e,t){function Date(...n){if(new.target===void 0)return new t(e.epochNow()).toString();let r=n.length===0?new t(e.epochNow()):Reflect.construct(t,n,t);return new.target!==Date&&Object.setPrototypeOf(r,new.target.prototype),r}return Object.defineProperties(Date,{length:{value:7},prototype:{value:t.prototype,writable:!1},now:{value:()=>e.epochNow(),writable:!0,configurable:!0},parse:{value:t.parse,writable:!0,configurable:!0},UTC:{value:t.UTC,writable:!0,configurable:!0}}),Date}function virtualPerformance(e,t){let n=Object.create(Object.getPrototypeOf(t));for(let e=t;e!==null&&e!==Object.prototype;e=Object.getPrototypeOf(e))for(let r of Reflect.ownKeys(e)){if(r===`constructor`||r in n&&Object.hasOwn(n,r))continue;let i=Object.getOwnPropertyDescriptor(e,r);typeof i.value==`function`?Object.defineProperty(n,r,{value:i.value.bind(t),writable:!0,configurable:!0,enumerable:i.enumerable}):i.get!==void 0&&Object.defineProperty(n,r,{get:()=>Reflect.get(t,r),configurable:!0,enumerable:i.enumerable})}Object.defineProperty(n,"now",{value:()=>e.now(),writable:!0,configurable:!0,enumerable:!0});let r=t.mark.bind(t),i=t.measure.bind(t);return Object.defineProperty(n,"mark",{value:(t,n)=>r(t,n?.startTime===void 0?{...n,startTime:e.now()}:n),writable:!0,configurable:!0,enumerable:!0}),Object.defineProperty(n,"measure",{value:(t,n,r)=>{if(typeof n==`object`&&n){let r=n.end===void 0&&n.duration===void 0;return i(t,r?{...n,end:e.now()}:n)}return r===void 0?i(t,n===void 0?{end:e.now()}:{start:n,end:e.now()}):i(t,n,r)},writable:!0,configurable:!0,enumerable:!0}),n}function installClock(e,t){let n=/* @__PURE__ */ new Map,define=(e,r)=>{n.set(e,Object.getOwnPropertyDescriptor(t,e)),Object.defineProperty(t,e,{value:r,writable:!0,enumerable:!0,configurable:!0})},r=globalThis.clearInterval,i={setTimeout(t,n,...r){if(typeof t!=`function`)throw TypeError(`The "callback" argument must be of type function`);return e.disposed?0:e.schedule(t,n,r,!1)},setInterval(t,n,...r){if(typeof t!=`function`)throw TypeError(`The "callback" argument must be of type function`);return e.disposed?0:e.schedule(t,n,r,!0)},clearTimeout(t){t!=null&&(e.clear(t)||Ee(t))},clearInterval(t){t!=null&&(e.clear(t)||r(t))}};Object.defineProperty(i.setTimeout,Symbol.for(`nodejs.util.promisify.custom`),{value:(t,n)=>new Promise(r=>e.schedule(r,t,[n],!1))}),Object.defineProperty(i.setTimeout,Ne,{value:e}),Object.defineProperty(i.setInterval,Ne,{value:e});for(let e of[`setTimeout`,`setInterval`,`clearTimeout`,`clearInterval`])define(e,i[e]);return e.skip&&(define(`Date`,virtualDate(e,typeof t.Date==`function`?t.Date:Date)),define(`performance`,virtualPerformance(e,t.performance??Ae)),j=e),{clock:e,uninstall(){for(let[e,r]of n)r===void 0?delete t[e]:Object.defineProperty(t,e,r);n.clear(),j===e&&(j=null),e.dispose()}}}function toDOMString(e){if(typeof e==`string`)return e;if(typeof e==`symbol`)throw TypeError(`Cannot convert a Symbol value to a string`);return String(e)}function toDouble(e,t){let n=typeof e==`number`?e:Number(e);if(!Number.isFinite(n))throw TypeError(`${t} is not a finite floating-point value.`);return n}function toFloat(e,t){let n=toDouble(e,t),r=Math.fround(n);if(!Number.isFinite(r))throw TypeError(`${t} is outside the range of a float.`);return r}function integerPart(e){let t=typeof e==`number`?e:Number(e);return Number.isFinite(t)?Math.trunc(t):0}function toLong(e){return typeof e==`number`&&(e|0)===e?e:integerPart(e)|0}function toUnsignedLong$1(e){return typeof e==`number`&&e>>>0===e?e:integerPart(e)>>>0}__name(toUnsignedLong$1,`toUnsignedLong`);function toShort(e){return integerPart(e)<<16>>16}function toUnsignedShort(e){return integerPart(e)&65535}const Ie=Symbol.for(`ctrl-dom._proto__`),Le=Symbol.for(`ctrl-dom.aboutBase`),Re=Symbol.for(`ctrl-dom.active`),ze=Symbol.for(`ctrl-dom.assocGen`),Be=Symbol.for(`ctrl-dom.attr`),Ve=Symbol.for(`ctrl-dom.attributes`),He=Symbol.for(`ctrl-dom.availableToElementInternals`),Ue=Symbol.for(`ctrl-dom.baseFor`),We=Symbol.for(`ctrl-dom.baseOverride`),Ge=Symbol.for(`ctrl-dom.baseURL`),Ke=Symbol.for(`ctrl-dom.baseVersion`),qe=Symbol.for(`ctrl-dom.benign`),M=Symbol.for(`ctrl-dom.block`),Je=Symbol.for(`ctrl-dom.blockParsed`),Ye=Symbol.for(`ctrl-dom.blockText`),Xe=Symbol.for(`ctrl-dom.byCtor`),Ze=Symbol.for(`ctrl-dom.byName`),Qe=Symbol.for(`ctrl-dom.cache`),$e=Symbol.for(`ctrl-dom.callback`),et=Symbol.for(`ctrl-dom.childNodes`),tt=Symbol.for(`ctrl-dom.childWindows`),nt=Symbol.for(`ctrl-dom.children`),rt=Symbol.for(`ctrl-dom.classList`),it=Symbol.for(`ctrl-dom.clipboard`),at=Symbol.for(`ctrl-dom.clonable`),ot=Symbol.for(`ctrl-dom.closed`),st=Symbol.for(`ctrl-dom.compiled`),ct=Symbol.for(`ctrl-dom.compiledFor`),lt=Symbol.for(`ctrl-dom.condition`),ut=Symbol.for(`ctrl-dom.constructed`),dt=Symbol.for(`ctrl-dom.constructingEntryList`),ft=Symbol.for(`ctrl-dom.contentType`),pt=Symbol.for(`ctrl-dom.controlsCache`),mt=Symbol.for(`ctrl-dom.controlsDoc`),ht=Symbol.for(`ctrl-dom.coll`),gt=Symbol.for(`ctrl-dom.controlsVersion`),_t=Symbol.for(`ctrl-dom.cookieJar`),vt=Symbol.for(`ctrl-dom.cookies`),yt=Symbol.for(`ctrl-dom.css`),bt=Symbol.for(`ctrl-dom.current`),xt=Symbol.for(`ctrl-dom.customElements`),St=Symbol.for(`ctrl-dom.customValidity`),Ct=Symbol.for(`ctrl-dom.cx`),wt=Symbol.for(`ctrl-dom.data`),Tt=Symbol.for(`ctrl-dom.dataset`),Et=Symbol.for(`ctrl-dom.declarative`),Dt=Symbol.for(`ctrl-dom.defaultNamespace`),Ot=Symbol.for(`ctrl-dom.defaultValueOverride`),kt=Symbol.for(`ctrl-dom.delegatesFocus`),At=Symbol.for(`ctrl-dom.devicePixelRatio`),jt=Symbol.for(`ctrl-dom.dirtiness`),N=Symbol.for(`ctrl-dom.control`),Mt=Symbol.for(`ctrl-dom.disabled`),Nt=Symbol.for(`ctrl-dom.disallowModification`),Pt=Symbol.for(`ctrl-dom.derived`),Ft=Symbol.for(`ctrl-dom.doc`),It=Symbol.for(`ctrl-dom.dropEffect`),P=Symbol.for(`ctrl-dom.ec`),Lt=Symbol.for(`ctrl-dom.effectAllowed`),F=Symbol.for(`ctrl-dom.el`),Rt=Symbol.for(`ctrl-dom.elements`),zt=Symbol.for(`ctrl-dom.entries`),I=Symbol.for(`ctrl-dom.eo`),Bt=Symbol.for(`ctrl-dom.error`),Vt=Symbol.for(`ctrl-dom.file`),Ht=Symbol.for(`ctrl-dom.files`),Ut=Symbol.for(`ctrl-dom.fill`),Wt=Symbol.for(`ctrl-dom.filter`),Gt=Symbol.for(`ctrl-dom.firingSubmissionEvents`),L=Symbol.for(`ctrl-dom.focused`),Kt=Symbol.for(`ctrl-dom.form`),qt=Symbol.for(`ctrl-dom.formAttrSeen`),Jt=Symbol.for(`ctrl-dom.forLabels`),Yt=Symbol.for(`ctrl-dom.forms`),Xt=Symbol.for(`ctrl-dom.frameCallbacks`),Zt=Symbol.for(`ctrl-dom.frameElement`),Qt=Symbol.for(`ctrl-dom.frameId`),$t=Symbol.for(`ctrl-dom.frameTask`),en=Symbol.for(`ctrl-dom.frameTime`),tn=Symbol.for(`ctrl-dom.generation`),nn=Symbol.for(`ctrl-dom.globalObject`),rn=Symbol.for(`ctrl-dom.hasTransients`),an=Symbol.for(`ctrl-dom.height`),sn=Symbol.for(`ctrl-dom.history`),cn=Symbol.for(`ctrl-dom.home`),R=Symbol.for(`ctrl-dom.host`),ln=Symbol.for(`ctrl-dom.href`),un=Symbol.for(`ctrl-dom.id`),dn=Symbol.for(`ctrl-dom.idleCallbacks`),fn=Symbol.for(`ctrl-dom.idleId`),pn=Symbol.for(`ctrl-dom.ids`),z=Symbol.for(`ctrl-dom.impl`),mn=Symbol.for(`ctrl-dom.implementation`),hn=Symbol.for(`ctrl-dom.index`),gn=Symbol.for(`ctrl-dom.indexed`),_n=Symbol.for(`ctrl-dom.inflight`),vn=Symbol.for(`ctrl-dom.info`),yn=Symbol.for(`ctrl-dom.innerHeight`),bn=Symbol.for(`ctrl-dom.innerWidth`),xn=Symbol.for(`ctrl-dom.isHTML`),B=Symbol.for(`ctrl-dom.items`),Sn=Symbol.for(`ctrl-dom.keyText`),Cn=Symbol.for(`ctrl-dom.kind`),wn=Symbol.for(`ctrl-dom.labels`),Tn=Symbol.for(`ctrl-dom.layerName`),En=Symbol.for(`ctrl-dom.list`),Dn=Symbol.for(`ctrl-dom.listeners`),On=Symbol.for(`ctrl-dom.localStorage`),kn=Symbol.for(`ctrl-dom.location`),An=Symbol.for(`ctrl-dom.lockedForReset`),jn=Symbol.for(`ctrl-dom.matches`),V=Symbol.for(`ctrl-dom.media`),Mn=Symbol.for(`ctrl-dom.mediaQueryLists`),Nn=Symbol.for(`ctrl-dom.mode`),Pn=Symbol.for(`ctrl-dom.name`),Fn=Symbol.for(`ctrl-dom.names`),In=Symbol.for(`ctrl-dom.namespaces`),Ln=Symbol.for(`ctrl-dom.navigator`),Rn=Symbol.for(`ctrl-dom.nodes`),zn=Symbol.for(`ctrl-dom.onchange`),H=Symbol.for(`ctrl-dom.options`),Bn=Symbol.for(`ctrl-dom.owner`),Vn=Symbol.for(`ctrl-dom.ownerNode`),Hn=Symbol.for(`ctrl-dom.ownerRule`),U=Symbol.for(`ctrl-dom.parent`),Un=Symbol.for(`ctrl-dom.parentRule`),Wn=Symbol.for(`ctrl-dom.parentWindow`),Gn=Symbol.for(`ctrl-dom.pastNames`),Kn=Symbol.for(`ctrl-dom.pointerBeforeReference`),qn=Symbol.for(`ctrl-dom.prefix`),Jn=Symbol.for(`ctrl-dom.prelude`),Yn=Symbol.for(`ctrl-dom.presentationStyle`),Xn=Symbol.for(`ctrl-dom.pseudo`),Zn=Symbol.for(`ctrl-dom.queries`),Qn=Symbol.for(`ctrl-dom.radios`),$n=Symbol.for(`ctrl-dom.ranges`),er=Symbol.for(`ctrl-dom.readonly`),tr=Symbol.for(`ctrl-dom.readyState`),nr=Symbol.for(`ctrl-dom.rebuildVersion`),rr=Symbol.for(`ctrl-dom.record`),ir=Symbol.for(`ctrl-dom.records`),ar=Symbol.for(`ctrl-dom.reference`),or=Symbol.for(`ctrl-dom.result`),sr=Symbol.for(`ctrl-dom.root`),W=Symbol.for(`ctrl-dom.rules`),cr=Symbol.for(`ctrl-dom.running`),lr=Symbol.for(`ctrl-dom.runningFrame`),G=Symbol.for(`ctrl-dom.sc`),ur=Symbol.for(`ctrl-dom.screen`),dr=Symbol.for(`ctrl-dom.scrollRestoration`),fr=Symbol.for(`ctrl-dom.scrollX`),pr=Symbol.for(`ctrl-dom.scrollY`),mr=Symbol.for(`ctrl-dom.selSet`),hr=Symbol.for(`ctrl-dom.selectedOptions`),gr=Symbol.for(`ctrl-dom.selectedness`),_r=Symbol.for(`ctrl-dom.selection`),vr=Symbol.for(`ctrl-dom.selector`),yr=Symbol.for(`ctrl-dom.serializable`),br=Symbol.for(`ctrl-dom.sessionStorage`),xr=Symbol.for(`ctrl-dom.settled`),Sr=Symbol.for(`ctrl-dom.shadowRoot`),Cr=Symbol.for(`ctrl-dom.shed`),wr=Symbol.for(`ctrl-dom.sheet`),Tr=Symbol.for(`ctrl-dom.sheets`),Er=Symbol.for(`ctrl-dom.slotAssignment`),K=Symbol.for(`ctrl-dom.so`),Dr=Symbol.for(`ctrl-dom.states`),Or=Symbol.for(`ctrl-dom.style`),kr=Symbol.for(`ctrl-dom.styleVersion`),Ar=Symbol.for(`ctrl-dom.supportsText`),jr=Symbol.for(`ctrl-dom.systemId`),Mr=Symbol.for(`ctrl-dom.target`),Nr=Symbol.for(`ctrl-dom.targets`),Pr=Symbol.for(`ctrl-dom.tasks`),Fr=Symbol.for(`ctrl-dom.timers`),Ir=Symbol.for(`ctrl-dom.title`),Lr=Symbol.for(`ctrl-dom.treeVersion`),Rr=Symbol.for(`ctrl-dom.type`),zr=Symbol.for(`ctrl-dom.types`),Br=Symbol.for(`ctrl-dom.updating`),Vr=Symbol.for(`ctrl-dom.updatingSelectedContent`),Hr=Symbol.for(`ctrl-dom.uri`),q=Symbol.for(`ctrl-dom.url`),Ur=Symbol.for(`ctrl-dom.userActivation`),Wr=Symbol.for(`ctrl-dom.userValidity`),Gr=Symbol.for(`ctrl-dom.validity`),Kr=Symbol.for(`ctrl-dom.value`),J=Symbol.for(`ctrl-dom.version`),qr=Symbol.for(`ctrl-dom.visualViewport`),Jr=Symbol.for(`ctrl-dom.w`),Yr=Symbol.for(`ctrl-dom.whatToShow`),Xr=Symbol.for(`ctrl-dom.whenDefined`),Zr=Symbol.for(`ctrl-dom.width`),Y=Symbol.for(`ctrl-dom.window`),Qr=Symbol.for(`ctrl-dom.writeBuffer`),$r=Symbol.for(`ctrl-dom.x`),ei=Symbol.for(`ctrl-dom.xhr`),ti=Symbol.for(`ctrl-dom.y`),ni=Symbol.for(`ctrl-dom.z`);var EventState=class{flags;type;target;relatedTarget;currentTarget;eventPhase;pathStart;pathLength;touchTargets;timeStamp;constructor(e,t){this.flags=t,this.type=e,this.target=null,this.relatedTarget=null,this.currentTarget=null,this.eventPhase=0,this.pathStart=-1,this.pathLength=0,this.touchTargets=null,this.timeStamp=clockNow()}};function exposedPathItem(e){let t=X[e];return X[e+4]&16?exposedWindow(t):t}function exposedWindow(e){return e[nn]??e}const X=[],ri={top:0};let ii=!1;function withInternalConstruct(e){let t=ii;ii=!0;try{return e()}finally{ii=t}}function setInternalConstruct(e){let t=ii;return ii=e,t}function isInternalConstruct(){return ii}var Event=class{static NONE=0;static CAPTURING_PHASE=1;static AT_TARGET=2;static BUBBLING_PHASE=3;#e;isTrusted=!1;get _s(){return this.#e}constructor(e,t){if(arguments.length===0)throw TypeError(`Failed to construct '${new.target.name}': 1 argument required, but only 0 present.`);let n=toDOMString(e),r=32;if(t!=null){if(typeof t!=`object`&&typeof t!=`function`)throw TypeError(`Failed to construct '${new.target.name}': The provided value is not of type '${new.target.name}Init'.`);t.bubbles&&(r|=256),t.cancelable&&(r|=512),t.composed&&(r|=16)}this.#e=new EventState(n,r)}get type(){return this._s.type}get target(){return this._s.target}get srcElement(){return this._s.target}get currentTarget(){return this._s.currentTarget}get eventPhase(){return this._s.eventPhase}get bubbles(){return!!(this._s.flags&256)}get cancelable(){return!!(this._s.flags&512)}get composed(){return!!(this._s.flags&16)}get timeStamp(){return this._s.timeStamp}get defaultPrevented(){return!!(this._s.flags&4)}get returnValue(){return!(this._s.flags&4)}set returnValue(e){e||setCanceledFlag(this._s)}get cancelBubble(){return!!(this._s.flags&1)}set cancelBubble(e){e&&(this._s.flags|=1)}stopPropagation(){this._s.flags|=1}stopImmediatePropagation(){this._s.flags|=3}preventDefault(){setCanceledFlag(this._s)}composedPath(){let e=this._s,t=[],n=e.pathLength;if(n===0||e.pathStart<0)return t;let r=e.pathStart,i=e.currentTarget;if(i===null)return t;let a=0,o=0;for(let e=n-1;e>=0;e--){let t=r+e*5,n=X[t+4];if(n&2&&o++,exposedPathItem(t)===i){a=e;break}n&4&&o--}let s=o,c=o,l=[];for(let e=a-1;e>=0;e--){let t=r+e*5,n=X[t+4];n&2&&s++,s<=c&&l.push(exposedPathItem(t)),n&4&&(s--,s<c&&(c=s))}for(let e=l.length-1;e>=0;e--)t.push(l[e]);t.push(i),s=o,c=o;for(let e=a+1;e<n;e++){let n=r+e*5,i=X[n+4];i&4&&s++,s<=c&&t.push(exposedPathItem(n)),i&2&&(s--,s<c&&(c=s))}return t}initEvent(e,t=!1,n=!1){if(arguments.length===0)throw TypeError(`Failed to execute 'initEvent' on 'Event': 1 argument required, but only 0 present.`);this._s.flags&64||initializeEvent(this,toDOMString(e),!!t,!!n)}};Object.defineProperties(Event.prototype,{NONE:{value:0,enumerable:!0},CAPTURING_PHASE:{value:1,enumerable:!0},AT_TARGET:{value:2,enumerable:!0},BUBBLING_PHASE:{value:3,enumerable:!0},[Symbol.toStringTag]:{value:`Event`,configurable:!0}});function setCanceledFlag(e){(e.flags&520)==512&&(e.flags|=4)}function initializeEvent(e,t,n,r){let i=e._s,a=(i.flags|32)&-904;n&&(a|=256),r&&(a|=512),i.flags=a,e.isTrusted=!1,i.target=null,i.type=t}function setTrusted(e,t=!0){t?e._s.flags|=128:e._s.flags&=-129,e.isTrusted=t}function setToStringTag(e,t){Object.defineProperty(e.prototype,Symbol.toStringTag,{value:e.name,configurable:!0}),t!==void 0&&Object.defineProperty(e,"length",{value:t,configurable:!0})}setToStringTag(Event,1),exposeMembers(Event);var AbortBinding=class{signal;onAbort;constructor(e,t){this.signal=e,this.onAbort=t}};let ai=0;function listenerSeqLimit(){return ai}var Listener=class{callback;flags;next;seq;abort;constructor(e,t){this.callback=e,this.flags=t,this.next=null,this.seq=ai++,this.abort=null}};function isCompact(e){return e.length!==0&&typeof e[0]==`number`}const oi=/* @__PURE__ */ new Map;function idForType(e){let t=oi.get(e);return t===void 0&&(t=oi.size,oi.set(e,t)),t}function typeIdOf(e){let t=oi.get(e);return t===void 0?-1:t}function firstListener(e,t){let n=e.length;if(n!==0&&typeof e[0]==`number`){for(let r=0;r<n;r+=2)if(e[r]===t)return e[r+1]}else return t>>>0<n?e[t]:void 0}function setFirstListener(e,t,n,r){if(!isCompact(t)){t[n]=r;return}let i=t.length;for(let e=0;e<i;e+=2)if(t[e]===n){t[e+1]=r;return}if(r===void 0)return;let a;if(i<8){a=Array(i+2);for(let e=0;e<i;e++)a[e]=t[e];a[i]=n,a[i+1]=r}else{a=[];for(let e=0;e<i;e+=2)a[t[e]]=t[e+1];a[n]=r}e[Dn]=a}function eachHead(e,t){let n=isCompact(e);for(let r=+!!n;r<e.length;r+=n?2:1){let n=e[r];n!==void 0&&t(n)}}const si={capture:!1,once:!1,passive:null,signal:null};function flattenCapture(e){return typeof e==`boolean`?e:e==null?!1:typeof e!=`object`&&typeof e!=`function`?!!e:!!e.capture}function flattenMore(e){if(si.capture=!1,si.once=!1,si.passive=null,si.signal=null,e==null)return si;if(typeof e!=`object`&&typeof e!=`function`)return si.capture=!!e,si;let t=!!e.capture,n=!!e.once,r=e.passive,i=e.signal;if(si.capture=t,si.once=n,si.passive=r===void 0?null:!!r,si.signal=null,i!==void 0){if(typeof i!=`object`||!i||typeof i.aborted!=`boolean`||typeof i.addEventListener!=`function`)throw TypeError(`Failed to execute 'addEventListener' on 'EventTarget': member signal is not of type 'AbortSignal'.`);si.signal=i}return si}function defaultPassiveValue(e,t){if(e!==`touchstart`&&e!==`touchmove`&&e!==`wheel`&&e!==`mousewheel`)return!1;let n=t,r=n[z];if(r===void 0){let e=n.document;return e!=null&&e[Y]===t}if(r.type===9)return!0;let i=r.doc;return i.documentElement===t||i.body===t}function checkCallback(e,t){if(typeof e!=`function`&&(typeof e!=`object`||!e))throw TypeError(`Failed to execute '${t}' on 'EventTarget': parameter 2 is not of type 'Object'.`)}function addEventListener(e,t,n,r){if(typeof r==`boolean`){if(n==null)return;checkCallback(n,`addEventListener`),addFlattened(e,t,n,r,!1,null,null);return}let{capture:i,once:a,passive:o,signal:s}=flattenMore(r);s!==null&&s.aborted||n!=null&&(checkCallback(n,`addEventListener`),addFlattened(e,t,n,i,a,o,s))}function addFlattened(e,t,n,r,i,a,o){let s=+!!r,c=idForType(t),l=e[Dn],u=l==null?void 0:firstListener(l,c);if(u!==void 0)for(;;){if(u.callback===n&&(u.flags&1)===s)return;let e=u.next;if(e===null)break;u=e}let d=new Listener(n,s|(i?2:0)|((a===null?defaultPassiveValue(t,e):a)?4:0));if(u===void 0?l==null?e[Dn]=[c,d]:setFirstListener(e,l,c,d):u.next=d,o!==null){let onAbort=()=>removeListener(e,t,d);d.abort=new AbortBinding(o,onAbort),o.addEventListener(`abort`,onAbort,{once:!0})}}function removeEventListener(e,t,n,r){let i=+!!flattenCapture(r);if(n==null)return;checkCallback(n,`removeEventListener`);let a=e[Dn];if(a==null)return;let o=typeIdOf(t),s=null;for(let t=firstListener(a,o)??null;t!==null;s=t,t=t.next)if(t.callback===n&&(t.flags&1)===i){unlink$1(e,a,o,s,t);return}}function removeListener(e,t,n){if(n.flags&8)return;let r=e[Dn];if(r!=null){let i=typeIdOf(t),a=null;for(let t=firstListener(r,i)??null;t!==null;a=t,t=t.next)if(t===n){unlink$1(e,r,i,a,t);return}}n.flags|=8}function unlink$1(e,t,n,r,i){markRemoved(i),r===null?setFirstListener(e,t,n,i.next??void 0):r.next=i.next}__name(unlink$1,`unlink`);function markRemoved(e){e.flags|=8;let t=e.abort;t!==null&&(t.signal.removeEventListener(`abort`,t.onAbort),e.abort=null)}function removeAllEventListeners(e){let t=e[Dn];t!=null&&(e[Dn]=null,eachHead(t,e=>{for(let t=e;t!==null;t=t.next)markRemoved(t)}))}function hasListeners(e,t){let n=e[Dn];return n!=null&&firstListener(n,typeIdOf(t))!==void 0}function reusableElement(e,t){let n=e[z];return n===void 0||n.parent!==null||n.first!==null||n.attrs!==null||n.flags&2048||e[Sr]!=null?!1:listenerCount(e)===t}function listenerCount(e){let t=e[Dn];if(t==null)return 0;let n=0;return eachHead(t,e=>{for(let t=e;t!==null;t=t.next)n++}),n}function hasAnyListener(e){let t=e[Dn];if(t==null)return!1;let n=!1;return eachHead(t,()=>{n=!0}),n}const ci=/* @__PURE__ */ `.a.abbr.address.area.article.aside.audio.b.base.bdi.bdo.blockquote.body.br.button.canvas.caption.cite.code.col.colgroup.data.datalist.dd.del.details.dfn.dialog.div.dl.dt.em.embed.fieldset.figcaption.figure.footer.form.h1.h2.h3.h4.h5.h6.head.header.hgroup.hr.html.i.iframe.img.input.ins.kbd.label.legend.li.link.main.map.mark.menu.meta.meter.nav.noscript.object.ol.optgroup.option.output.p.picture.pre.progress.q.rp.rt.ruby.s.samp.script.search.section.select.slot.small.source.span.strong.style.sub.summary.sup.table.tbody.td.template.textarea.tfoot.th.thead.time.title.tr.track.u.ul.var.video.wbr.svg.math.frame.frameset.noframes.marquee.font.center.dir.applet.basefont.bgsound.big.blink.keygen.listing.menuitem.nobr.noembed.param.plaintext.rb.rtc.strike.tt.xmp.image.selectedcontent`.split(`.`),li=/* @__PURE__ */ new Map;for(let e=1;e<ci.length;e++)li.set(ci[e],e);function tagId(e){return li.get(e)??0}function tagName(e){return ci[e]??``}const Z=Object.fromEntries(ci.map((e,t)=>[e,t])),ui=/* @__PURE__ */ new Uint8Array(256);for(let e of[Z.a,Z.area,Z.button,Z.input,Z.label,Z.summary])ui[e]=1;function mayHaveActivationBehavior(e){return ui[e]===1}const ifaceName=e=>typeof e==`string`?e:e.name;function requireArgs$1(e,t,n){if(e<t)throw TypeError(`Failed to construct '${ifaceName(n)}': ${t} argument${t>1?`s`:``} required, but only ${e} present.`)}__name(requireArgs$1,`requireArgs`);function dict(e,t){if(e==null)return null;if(typeof e!=`object`&&typeof e!=`function`)throw TypeError(`Failed to construct '${t}': The provided value is not of type '${t}Init'.`);return e}function isWindow(e){if(typeof e!=`object`||!e)return!1;let t=e;return t.window===e||t.document!=null&&t.document[Y]===e}function viewMember(e,t){if(e==null)return null;if(!isWindow(e))throw TypeError(`Failed to construct '${ifaceName(t)}': member view is not of type Window.`);return e}function targetMember(e){return e??null}const di=Object.freeze({}),fi=/* @__PURE__ */ __name((e,t)=>e===void 0?t:toDOMString(e),`str`),pi=/* @__PURE__ */ __name((e,t=0)=>e===void 0?t:toLong(e),`long`),mi=/* @__PURE__ */ __name(e=>e===void 0?0:toUnsignedLong$1(e),`ulong`),double=(e,t,n,r=0)=>e===void 0?r:typeof e==`number`&&Number.isFinite(e)?e:toDouble(e,`Failed to construct '${ifaceName(n)}': member ${t}`),float=(e,t,n,r=0)=>{if(e===void 0)return r;if(typeof e==`number`){let t=Math.fround(e);if(Number.isFinite(t))return t}return toFloat(e,`Failed to construct '${ifaceName(n)}': member ${t}`)},hi=[[`ctrlKey`,1],[`shiftKey`,2],[`altKey`,4],[`metaKey`,8],[`modifierAltGraph`,16],[`modifierCapsLock`,32],[`modifierFn`,64],[`modifierFnLock`,128],[`modifierHyper`,256],[`modifierNumLock`,512],[`modifierScrollLock`,1024],[`modifierSuper`,2048],[`modifierSymbol`,4096],[`modifierSymbolLock`,8192]];function modifiers(e){let t=0;return e.altKey&&(t|=4),e.ctrlKey&&(t|=1),e.metaKey&&(t|=8),e.modifierAltGraph&&(t|=16),e.modifierCapsLock&&(t|=32),e.modifierFn&&(t|=64),e.modifierFnLock&&(t|=128),e.modifierHyper&&(t|=256),e.modifierNumLock&&(t|=512),e.modifierScrollLock&&(t|=1024),e.modifierSuper&&(t|=2048),e.modifierSymbol&&(t|=4096),e.modifierSymbolLock&&(t|=8192),e.shiftKey&&(t|=2),t}function modifierState(e,t){let n;switch(t){case`Control`:n=1;break;case`Shift`:n=2;break;case`Alt`:n=4;break;case`Meta`:n=8;break;default:{let e=hi.find(e=>e[0]===`modifier`+t);if(e===void 0)return!1;n=e[1]}}return(e&n)!==0}function legacyMods(e,t,n,r,i){let a=i&-16;return e&&(a|=1),t&&(a|=4),n&&(a|=2),r&&(a|=8),a}var UIEvent=class extends Event{#e;#t;#n;constructor(e,t){requireArgs$1(arguments.length,1,new.target),super(e,t);let n=t??di;this.#t=pi(n.detail),this.#e=viewMember(n.view,new.target),this.#n=mi(n.which)}get view(){return this.#e}get detail(){return this.#t}get which(){return this.#n}initUIEvent(e,t=!1,n=!1,r=null,i=0){if(arguments.length===0)throw TypeError(`Failed to execute 'initUIEvent' on 'UIEvent': 1 argument required, but only 0 present.`);if(r!=null&&!isWindow(r))throw TypeError(`Failed to execute 'initUIEvent' on '${this.constructor.name}': parameter 4 is not of type 'Window'.`);this._s.flags&64||(initializeEvent(this,toDOMString(e),!!t,!!n),this.#e=r??null,this.#t=toLong(i))}};setToStringTag(UIEvent,1);var FocusEvent=class extends UIEvent{constructor(e,t){requireArgs$1(arguments.length,1,new.target),super(e,t),this._s.relatedTarget=targetMember(t?.relatedTarget)}get relatedTarget(){return this._s.relatedTarget}};setToStringTag(FocusEvent,1);var MouseEvent=class extends UIEvent{#e;#t;#n;#r;#i;#a;#o;#s;#c;constructor(e,t){requireArgs$1(arguments.length,1,new.target),super(e,t);let n=t??di,r=new.target;this.#i=modifiers(n);let i=n.button;this.#a=i===void 0?0:toShort(i);let a=n.buttons;this.#o=a===void 0?0:toUnsignedShort(a),this.#n=double(n.clientX,`clientX`,r),this.#r=double(n.clientY,`clientY`,r),this.#s=double(n.movementX,`movementX`,r),this.#c=double(n.movementY,`movementY`,r);let o=this._s;o.relatedTarget=targetMember(n.relatedTarget),this.#e=double(n.screenX,`screenX`,r),this.#t=double(n.screenY,`screenY`,r),o.flags|=1024}get screenX(){return this.#e}get screenY(){return this.#t}get clientX(){return this.#n}get clientY(){return this.#r}get x(){return this.#n}get y(){return this.#r}get pageX(){return this.#n}get pageY(){return this.#r}get offsetX(){return this.#n}get offsetY(){return this.#r}get movementX(){return this.#s}get movementY(){return this.#c}get ctrlKey(){return!!(this.#i&1)}get shiftKey(){return!!(this.#i&2)}get altKey(){return!!(this.#i&4)}get metaKey(){return!!(this.#i&8)}get button(){return this.#a}get buttons(){return this.#o}get relatedTarget(){return this._s.relatedTarget}getModifierState(e){return modifierState(this.#i,toDOMString(e))}initMouseEvent(e,t=!1,n=!1,r=null,i=0,a=0,o=0,s=0,c=0,l=!1,u=!1,d=!1,m=!1,h=0,_=null){if(arguments.length===0)throw TypeError(`Failed to execute 'initMouseEvent' on 'MouseEvent': 1 argument required, but only 0 present.`);this._s.flags&64||(this.initUIEvent(e,t,n,r,i),this.#e=toLong(a),this.#t=toLong(o),this.#n=toLong(s),this.#r=toLong(c),this.#i=legacyMods(l,u,d,m,this.#i),this.#a=toShort(h),this._s.relatedTarget=targetMember(_))}};setToStringTag(MouseEvent,1);const gi=180/Math.PI,_i=Object.freeze([]);function spherical2tilt(e,t){let n=0,r=0,i=Math.PI;if(e===0)(t===0||t===2*i)&&(n=i/2),t===i/2&&(r=i/2),t===i&&(n=-i/2),t===3*i/2&&(r=-i/2),t>0&&t<i/2&&(n=i/2,r=i/2),t>i/2&&t<i&&(n=-i/2,r=i/2),t>i&&t<3*i/2&&(n=-i/2,r=-i/2),t>3*i/2&&t<2*i&&(n=i/2,r=-i/2);else{let i=Math.tan(e);n=Math.atan(Math.cos(t)/i),r=Math.atan(Math.sin(t)/i)}return[Math.round(n*gi),Math.round(r*gi)]}function tilt2spherical(e,t){let n=e/gi,r=t/gi,i=0;e===0?t>0?i=Math.PI/2:t<0&&(i=3*Math.PI/2):t===0?e<0&&(i=Math.PI):Math.abs(e)===90||Math.abs(t)===90?i=0:(i=Math.atan2(Math.tan(r),Math.tan(n)),i<0&&(i+=2*Math.PI));let a;return a=Math.abs(e)===90||Math.abs(t)===90?0:e===0?Math.PI/2-Math.abs(r):t===0?Math.PI/2-Math.abs(n):Math.atan(1/Math.sqrt(Math.tan(n)**2+Math.tan(r)**2)),[a,i]}var PointerEvent=class extends MouseEvent{#e;#t;#n;#r;#i;#a;#o;#s;#c;#l;#u;#d;#f;#p;#m;constructor(e,t){requireArgs$1(arguments.length,1,new.target),super(e,t);let n=t??di,r=new.target,i=n.altitudeAngle,a=double(i,`altitudeAngle`,r,Math.PI/2),o=n.azimuthAngle,s=double(o,`azimuthAngle`,r,0),c=n.coalescedEvents;this.#p=c==null?_i:Array.from(c),this.#n=double(n.height,`height`,r,1),this.#d=!!n.isPrimary,this.#f=pi(n.persistentDeviceId),this.#e=pi(n.pointerId),this.#u=fi(n.pointerType,``);let l=n.predictedEvents;this.#m=l==null?_i:Array.from(l),this.#r=float(n.pressure,`pressure`,r),this.#i=float(n.tangentialPressure,`tangentialPressure`,r);let u=n.tiltX,d=pi(u),m=n.tiltY,h=pi(m);this.#s=pi(n.twist),this.#t=double(n.width,`width`,r,1);let _=u!==void 0||m!==void 0,v=i!==void 0||o!==void 0;_&&!v?[a,s]=tilt2spherical(d,h):v&&!_&&([d,h]=spherical2tilt(a,s)),this.#a=d,this.#o=h,this.#c=a,this.#l=s}get pointerId(){return this.#e}get width(){return this.#t}get height(){return this.#n}get pressure(){return this.#r}get tangentialPressure(){return this.#i}get tiltX(){return this.#a}get tiltY(){return this.#o}get twist(){return this.#s}get altitudeAngle(){return this.#c}get azimuthAngle(){return this.#l}get pointerType(){return this.#u}get isPrimary(){return this.#d}get persistentDeviceId(){return this.#f}getCoalescedEvents(){return this.#p.slice()}getPredictedEvents(){return this.#m.slice()}};setToStringTag(PointerEvent,1);var WheelEvent=class extends MouseEvent{static DOM_DELTA_PIXEL=0;static DOM_DELTA_LINE=1;static DOM_DELTA_PAGE=2;#e;#t;#n;#r;constructor(e,t){requireArgs$1(arguments.length,1,new.target),super(e,t);let n=t??di,r=new.target;this.#r=mi(n.deltaMode),this.#e=double(n.deltaX,`deltaX`,r),this.#t=double(n.deltaY,`deltaY`,r),this.#n=double(n.deltaZ,`deltaZ`,r)}get deltaX(){return this.#e}get deltaY(){return this.#t}get deltaZ(){return this.#n}get deltaMode(){return this.#r}};setToStringTag(WheelEvent,1),Object.defineProperties(WheelEvent.prototype,{DOM_DELTA_PIXEL:{value:0,enumerable:!0},DOM_DELTA_LINE:{value:1,enumerable:!0},DOM_DELTA_PAGE:{value:2,enumerable:!0}});var DragEvent=class extends MouseEvent{#e;constructor(e,t){requireArgs$1(arguments.length,1,new.target),super(e,t),this.#e=t?.dataTransfer??null}get dataTransfer(){return this.#e}};setToStringTag(DragEvent,1);var KeyboardEvent=class extends UIEvent{static DOM_KEY_LOCATION_STANDARD=0;static DOM_KEY_LOCATION_LEFT=1;static DOM_KEY_LOCATION_RIGHT=2;static DOM_KEY_LOCATION_NUMPAD=3;#e;#t;#n;#r;#i;#a;#o;#s;constructor(e,t){requireArgs$1(arguments.length,1,new.target),super(e,t);let n=t??di;this.#r=modifiers(n),this.#o=mi(n.charCode),this.#t=fi(n.code,``),this.#a=!!n.isComposing,this.#e=fi(n.key,``),this.#s=mi(n.keyCode),this.#n=mi(n.location),this.#i=!!n.repeat}get key(){return this.#e}get code(){return this.#t}get location(){return this.#n}get ctrlKey(){return!!(this.#r&1)}get shiftKey(){return!!(this.#r&2)}get altKey(){return!!(this.#r&4)}get metaKey(){return!!(this.#r&8)}get repeat(){return this.#i}get isComposing(){return this.#a}get charCode(){return this.#o}get keyCode(){return this.#s}getModifierState(e){return modifierState(this.#r,toDOMString(e))}initKeyboardEvent(e,t=!1,n=!1,r=null,i=``,a=0,o=!1,s=!1,c=!1,l=!1){if(arguments.length===0)throw TypeError(`Failed to execute 'initKeyboardEvent' on 'KeyboardEvent': 1 argument required, but only 0 present.`);this._s.flags&64||(this.initUIEvent(e,t,n,r,0),this.#e=toDOMString(i),this.#n=toUnsignedLong$1(a),this.#r=legacyMods(o,s,c,l,this.#r))}};setToStringTag(KeyboardEvent,1),Object.defineProperties(KeyboardEvent.prototype,{DOM_KEY_LOCATION_STANDARD:{value:0,enumerable:!0},DOM_KEY_LOCATION_LEFT:{value:1,enumerable:!0},DOM_KEY_LOCATION_RIGHT:{value:2,enumerable:!0},DOM_KEY_LOCATION_NUMPAD:{value:3,enumerable:!0}});var InputEvent=class extends UIEvent{#e;#t;#n;#r;constructor(e,t){requireArgs$1(arguments.length,1,new.target),super(e,t);let n=t??di,r=n.data;this.#e=r==null?null:toDOMString(r),this.#r=n.dataTransfer??null,this.#n=fi(n.inputType,``),this.#t=!!n.isComposing}get data(){return this.#e}get isComposing(){return this.#t}get inputType(){return this.#n}get dataTransfer(){return this.#r}};setToStringTag(InputEvent,1);var CompositionEvent=class extends UIEvent{#e;constructor(e,t){requireArgs$1(arguments.length,1,new.target),super(e,t),this.#e=fi((t??di).data,``)}get data(){return this.#e}initCompositionEvent(e,t=!1,n=!1,r=null,i=``){if(arguments.length===0)throw TypeError(`Failed to execute 'initCompositionEvent' on 'CompositionEvent': 1 argument required, but only 0 present.`);this._s.flags&64||(this.initUIEvent(e,t,n,r,0),this.#e=toDOMString(i))}};setToStringTag(CompositionEvent,1);var TextEvent=class extends UIEvent{#e;constructor(e,t){if(!isInternalConstruct())throw TypeError(`Illegal constructor`);super(e,t),this.#e=``}get data(){return this.#e}initTextEvent(e,t=!1,n=!1,r=null,i=`undefined`){this._s.flags&64||(this.initUIEvent(e,t,n,r,0),this.#e=toDOMString(i))}};setToStringTag(TextEvent,1);var Touch=class{#e;#t;#n;#r;#i;#a;#o;#s;#c;#l;#u;#d;#f;#p;#m;constructor(e){requireArgs$1(arguments.length,1,`Touch`);let t=dict(e,`Touch`);if(t===null||t.identifier===void 0)throw TypeError(`Failed to construct 'Touch': required member identifier is undefined.`);if(t.target===void 0)throw TypeError(`Failed to construct 'Touch': required member target is undefined.`);let n=`Touch`;this.#f=double(t.altitudeAngle,`altitudeAngle`,n),this.#p=double(t.azimuthAngle,`azimuthAngle`,n),this.#n=double(t.clientX,`clientX`,n),this.#r=double(t.clientY,`clientY`,n),this.#d=float(t.force,`force`,n),this.#e=toLong(t.identifier),this.#o=double(t.pageX,`pageX`,n),this.#s=double(t.pageY,`pageY`,n),this.#c=float(t.radiusX,`radiusX`,n),this.#l=float(t.radiusY,`radiusY`,n),this.#u=float(t.rotationAngle,`rotationAngle`,n),this.#i=double(t.screenX,`screenX`,n),this.#a=double(t.screenY,`screenY`,n),this.#t=t.target,this.#m=fi(t.touchType,`direct`)}get identifier(){return this.#e}get target(){return this.#t}get clientX(){return this.#n}get clientY(){return this.#r}get screenX(){return this.#i}get screenY(){return this.#a}get pageX(){return this.#o}get pageY(){return this.#s}get radiusX(){return this.#c}get radiusY(){return this.#l}get rotationAngle(){return this.#u}get force(){return this.#d}get altitudeAngle(){return this.#f}get azimuthAngle(){return this.#p}get touchType(){return this.#m}};setToStringTag(Touch,1);var vi=class TouchList{#e;constructor(){if(!isInternalConstruct())throw TypeError(`Illegal constructor`);this.#e=[]}static _create(e){let t=isInternalConstruct()?new TouchList:withInternalConstruct(()=>new TouchList);t.#e=e;for(let n=0;n<e.length;n++)Object.defineProperty(t,n,{value:e[n],enumerable:!0,configurable:!0});return t}get length(){return this.#e.length}item(e){return this.#e[toUnsignedLong$1(e)]??null}[Symbol.iterator](){return this.#e[Symbol.iterator]()}};setToStringTag(vi);function touchSequence(e,t){if(e==null)return[];let n=Array.from(e);for(let e of n)if(e===null||typeof e!=`object`&&typeof e!=`function`)throw TypeError(`Failed to construct 'TouchEvent': Failed to read the '${t}' property from 'TouchEventInit': Failed to convert value to 'Touch'.`);return n}var TouchEvent=class extends UIEvent{#e;#t;#n;#r;constructor(e,t){requireArgs$1(arguments.length,1,new.target),super(e,t);let n=t??di;this.#r=modifiers(n),this.#n=vi._create(touchSequence(n.changedTouches,`changedTouches`)),this.#t=vi._create(touchSequence(n.targetTouches,`targetTouches`)),this.#e=vi._create(touchSequence(n.touches,`touches`)),this._s.flags|=2048}get touches(){return this.#e}get targetTouches(){return this.#t}get changedTouches(){return this.#n}get altKey(){return!!(this.#r&4)}get metaKey(){return!!(this.#r&8)}get ctrlKey(){return!!(this.#r&1)}get shiftKey(){return!!(this.#r&2)}getModifierState(e){return modifierState(this.#r,toDOMString(e))}_touchTargetList(){let e=[];for(let t of[this.#e,this.#t,this.#n])for(let n of t){let t=n.target;typeof t==`object`&&t&&e.push(t)}return e}};setToStringTag(TouchEvent,1);var ClipboardEvent=class extends Event{#e;constructor(e,t){requireArgs$1(arguments.length,1,new.target),super(e,t),this.#e=t?.clipboardData??null}get clipboardData(){return this.#e}};setToStringTag(ClipboardEvent,1),exposeMembers(UIEvent,FocusEvent,MouseEvent,PointerEvent,WheelEvent,DragEvent,KeyboardEvent,InputEvent,CompositionEvent,TextEvent,Touch,vi,TouchEvent,ClipboardEvent);const get=(e,t)=>e?.[t],yi=/* @__PURE__ */ __name((e,t,n=``)=>{let r=get(e,t);return r===void 0?n:toDOMString(r)},`str`),bi=/* @__PURE__ */ __name((e,t)=>{let n=get(e,t);return n==null?null:toDOMString(n)},`nullableStr`),dbl=(e,t,n)=>{let r=get(e,t);return r===void 0?0:typeof r==`number`&&Number.isFinite(r)?r:toDouble(r,`Failed to construct '${n.name}': member ${t}`)};function required(e,t,n){let r=get(e,t);if(r===void 0)throw TypeError(`Failed to construct '${n}': required member ${t} is undefined.`);return r}var CustomEvent=class extends Event{#e;constructor(e,t){requireArgs$1(arguments.length,1,new.target),super(e,t);let n=t?.detail;this.#e=n===void 0?null:n}get detail(){return this.#e}initCustomEvent(e,t=!1,n=!1,r=null){if(arguments.length===0)throw TypeError(`Failed to execute 'initCustomEvent' on 'CustomEvent': 1 argument required, but only 0 present.`);this._s.flags&64||(initializeEvent(this,toDOMString(e),!!t,!!n),this.#e=r)}};setToStringTag(CustomEvent,1);var ErrorEvent=class extends Event{#e;#t;#n;#r;#i;constructor(e,t){requireArgs$1(arguments.length,1,new.target),super(e,t);let n=t;this.#e=yi(n,`message`),this.#t=yi(n,`filename`);let r=get(n,`lineno`),i=get(n,`colno`);this.#n=r===void 0?0:toUnsignedLong$1(r),this.#r=i===void 0?0:toUnsignedLong$1(i),this.#i=get(n,`error`)}get message(){return this.#e}get filename(){return this.#t}get lineno(){return this.#n}get colno(){return this.#r}get error(){return this.#i}};setToStringTag(ErrorEvent,1);var PromiseRejectionEvent=class extends Event{#e;#t;constructor(e,t){requireArgs$1(arguments.length,2,new.target);let n=required(t,`promise`,new.target.name);if(n===null||typeof n!=`object`&&typeof n!=`function`)throw TypeError(`Failed to construct '${new.target.name}': member promise is not an object.`);super(e,t),this.#e=n,this.#t=get(t,`reason`)}get promise(){return this.#e}get reason(){return this.#t}};setToStringTag(PromiseRejectionEvent,2);var MessageEvent=class extends Event{#e;#t;#n;#r;#i;constructor(e,t){requireArgs$1(arguments.length,1,new.target),super(e,t);let n=t,r=get(n,`data`);this.#e=r===void 0?null:r,this.#t=yi(n,`origin`),this.#n=yi(n,`lastEventId`),this.#r=get(n,`source`)??null;let i=get(n,`ports`);this.#i=Object.freeze(i==null?[]:Array.from(i))}get data(){return this.#e}get origin(){return this.#t}get lastEventId(){return this.#n}get source(){return this.#r}get ports(){return this.#i}initMessageEvent(e,t=!1,n=!1,r=null,i=``,a=``,o=null,s=[]){this._s.flags&64||(initializeEvent(this,toDOMString(e),!!t,!!n),this.#e=r,this.#t=toDOMString(i),this.#n=toDOMString(a),this.#r=o,this.#i=Object.freeze(Array.from(s)))}};setToStringTag(MessageEvent,1);var ProgressEvent=class extends Event{#e;#t;#n;constructor(e,t){requireArgs$1(arguments.length,1,new.target),super(e,t),this.#e=!!get(t,`lengthComputable`),this.#t=dbl(t,`loaded`,new.target),this.#n=dbl(t,`total`,new.target)}get lengthComputable(){return this.#e}get loaded(){return this.#t}get total(){return this.#n}};setToStringTag(ProgressEvent,1);var AnimationEvent=class extends Event{#e;#t;#n;constructor(e,t){requireArgs$1(arguments.length,1,new.target),super(e,t),this.#e=yi(t,`animationName`),this.#t=dbl(t,`elapsedTime`,new.target),this.#n=yi(t,`pseudoElement`)}get animationName(){return this.#e}get elapsedTime(){return this.#t}get pseudoElement(){return this.#n}};setToStringTag(AnimationEvent,1);var TransitionEvent=class extends Event{#e;#t;#n;constructor(e,t){requireArgs$1(arguments.length,1,new.target),super(e,t),this.#e=yi(t,`propertyName`),this.#t=dbl(t,`elapsedTime`,new.target),this.#n=yi(t,`pseudoElement`)}get propertyName(){return this.#e}get elapsedTime(){return this.#t}get pseudoElement(){return this.#n}};setToStringTag(TransitionEvent,1);var PopStateEvent=class extends Event{#e;#t;constructor(e,t){requireArgs$1(arguments.length,1,new.target),super(e,t);let n=get(t,`state`);this.#e=n===void 0?null:n,this.#t=!!get(t,`hasUAVisualTransition`)}get state(){return this.#e}get hasUAVisualTransition(){return this.#t}};setToStringTag(PopStateEvent,1);var HashChangeEvent=class extends Event{#e;#t;constructor(e,t){requireArgs$1(arguments.length,1,new.target),super(e,t),this.#e=yi(t,`oldURL`),this.#t=yi(t,`newURL`)}get oldURL(){return this.#e}get newURL(){return this.#t}};setToStringTag(HashChangeEvent,1);var PageTransitionEvent=class extends Event{#e;constructor(e,t){requireArgs$1(arguments.length,1,new.target),super(e,t),this.#e=!!get(t,`persisted`)}get persisted(){return this.#e}};setToStringTag(PageTransitionEvent,1);var StorageEvent=class extends Event{#e;#t;#n;#r;#i;constructor(e,t){requireArgs$1(arguments.length,1,new.target),super(e,t),this.#e=bi(t,`key`),this.#t=bi(t,`oldValue`),this.#n=bi(t,`newValue`),this.#r=yi(t,`url`),this.#i=get(t,`storageArea`)??null}get key(){return this.#e}get oldValue(){return this.#t}get newValue(){return this.#n}get url(){return this.#r}get storageArea(){return this.#i}initStorageEvent(e,t=!1,n=!1,r=null,i=null,a=null,o=``,s=null){this._s.flags&64||(initializeEvent(this,toDOMString(e),!!t,!!n),this.#e=r===null?null:toDOMString(r),this.#t=i===null?null:toDOMString(i),this.#n=a===null?null:toDOMString(a),this.#r=toDOMString(o),this.#i=s)}};setToStringTag(StorageEvent,1);var SubmitEvent=class extends Event{#e;constructor(e,t){requireArgs$1(arguments.length,1,new.target),super(e,t),this.#e=get(t,`submitter`)??null}get submitter(){return this.#e}};setToStringTag(SubmitEvent,1);var FormDataEvent=class extends Event{#e;constructor(e,t){requireArgs$1(arguments.length,2,new.target);let n=required(t,`formData`,new.target.name);super(e,t),this.#e=n}get formData(){return this.#e}};setToStringTag(FormDataEvent,2);var ToggleEvent=class extends Event{#e;#t;#n;constructor(e,t){requireArgs$1(arguments.length,1,new.target),super(e,t),this.#e=yi(t,`oldState`),this.#t=yi(t,`newState`),this.#n=get(t,`source`)??null}get oldState(){return this.#e}get newState(){return this.#t}get source(){return this.#n}};setToStringTag(ToggleEvent,1);var BeforeUnloadEvent=class extends Event{#e;constructor(e,t){if(!isInternalConstruct())throw TypeError(`Illegal constructor`);super(e,t),this.#e=``}get returnValue(){return this.#e}set returnValue(e){this.#e=toDOMString(e)}};setToStringTag(BeforeUnloadEvent,1);var CloseEvent=class extends Event{#e;#t;#n;constructor(e,t){requireArgs$1(arguments.length,1,new.target),super(e,t),this.#e=!!get(t,`wasClean`);let n=get(t,`code`);this.#t=n===void 0?0:toUnsignedShort(n),this.#n=yi(t,`reason`)}get wasClean(){return this.#e}get code(){return this.#t}get reason(){return this.#n}};setToStringTag(CloseEvent,1),exposeMembers(CustomEvent,ErrorEvent,PromiseRejectionEvent,MessageEvent,ProgressEvent,AnimationEvent,TransitionEvent,PopStateEvent,HashChangeEvent,PageTransitionEvent,StorageEvent,SubmitEvent,FormDataEvent,ToggleEvent,BeforeUnloadEvent,CloseEvent);let xi=null;function setCurrentWindow(e){xi=e}function currentWindow(){if(xi===null)throw TypeError(`No active @ctrl/dom window. Create one with createWindow().`);return xi}function currentDocument(){return currentWindow().document}function currentWindowOrNull(){return xi}function defaultUncaughtExceptionHandler(e){let t=typeof e==`object`&&e?e.stack:void 0;console.error(typeof t==`string`?t:`Uncaught ${String(e)}`)}let Si=defaultUncaughtExceptionHandler;function setUncaughtExceptionHandler(e){Si=e??defaultUncaughtExceptionHandler}const Ci=/* @__PURE__ */ new WeakSet;function windowFor(e){if(e!==null){let t=e;if(t[z]!==void 0)return t[z].doc[Y];let n=t.document;if(n!=null&&n[Y]===e)return e}try{return currentWindow()}catch{return null}}function parseLocation(e){let t=typeof e==`object`&&e?e.stack:void 0;if(typeof t==`string`){let e=t.split(`
|
|
2
2
|
`);for(let t=1;t<e.length;t++){let n=/at (?:.+\s+)?\(?(.+?):(\d+):(\d+)\)?$/.exec(e[t].trim());if(n!==null)return{filename:n[1],lineno:Number(n[2]),colno:Number(n[3])}}}return{filename:``,lineno:0,colno:0}}function reportException$1(e,t){let n=windowFor(t);if(n===null||Ci.has(n)){Si(e,null);return}let{filename:r,lineno:i,colno:a}=parseLocation(e),o=new ErrorEvent(`error`,{cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?e.message:`Uncaught ${String(e)}`,filename:r,lineno:i,colno:a,error:e});setTrusted(o),Ci.add(n);let s=!1;try{s=!dispatch(o,n)}finally{Ci.delete(n)}s||Si(e,o)}__name(reportException$1,`reportException`);function noteChangeDispatch(e){switch(e.tag){case Z.input:case Z.textarea:case Z.select:e.node[Wr]=!0}}function hasUserValidity(e){switch(e.tag){case Z.input:case Z.textarea:case Z.select:return e.node[Wr]===!0}return!1}function setUserValidity(e,t){switch(e.tag){case Z.input:case Z.textarea:case Z.select:(t||hasUserValidity(e))&&(e.node[Wr]=t)}}let wi;function getCurrentEvent(){return wi}let Ti=null;function setPostDispatchHook(e){Ti=e}let Ei=null;function setAssignedSlotLookup(e){Ei=e}const Di=[];function assignedSlot$1(e){if(Ei===null)return null;let t=e.parent;return t===null||!(t.flags&512)||e.type!==1&&e.type!==3?null:Ei(e)}__name(assignedSlot$1,`assignedSlot`);function isAssigned(e){return assignedSlot$1(e)!==null}function treeRoot$1(e){for(;e.parent!==null;)e=e.parent;return e}__name(treeRoot$1,`treeRoot`);let Oi;function nodeParentOf(e,t,n){let r=e.parent;if(r!==null&&r.flags&512){let t=assignedSlot$1(e);if(t!==null)return Oi=t[z],t}if(e.flags&32){let r=n._s;if(!(r.flags&16)&&r.pathLength>0){let t=X[r.pathStart][z];if(t!==void 0&&treeRoot$1(t)===e)return Oi=void 0,null}let i=t[R];return Oi=i===null?void 0:i[z],i}return r===null?(Oi=void 0,null):(Oi=r,r.node)}function nodeGetTheParent(e,t){return nodeParentOf(e[z],e,t)}function isShadowIncludingInclusiveAncestor$4(e,t){let n=t;for(;n!==null;){if(n===e)return!0;if(n.parent!==null)n=n.parent;else if(n.flags&32){let e=n.node[R];n=e===null||e[z]===void 0?null:e[z]}else n=null}return!1}__name(isShadowIncludingInclusiveAncestor$4,`isShadowIncludingInclusiveAncestor`);function inShadowTree(e){if(e===null)return!1;let t=e[z];return t!==void 0&&!!(treeRoot$1(t).flags&32)}function retarget(e,t){for(;;){if(e===null)return null;let n=e[z];if(n===void 0)return e;let r=treeRoot$1(n);if(!(r.flags&32))return e;let i=t[z];if(i!==void 0&&isShadowIncludingInclusiveAncestor$4(r,i))return e;e=r.node[R]}}function retargetList(e,t){let n=[];for(let r=0;r<e.length;r++)n.push(retarget(e[r],t));return n}function isWindowInstance(e){return e[nn]!==void 0}function hasActivationBehavior(e,t){return t!==void 0&&mayHaveActivationBehavior(t.tag)&&e._hasActivationBehavior===!0}function appendToEventPath(e,t,n,r,i,a){let o=ri.top,s=0;a!==null&&a.flags&32&&(s|=1,e[z]===a&&e.mode===`closed`&&(s|=2)),i&&(s|=4),X[o]=e,t===null?X[o+1]=X[o+1-5]:(s|=8,X[o+1]=t),X[o+2]=n,X[o+3]=r,X[o+4]=s,ri.top=o+5}function appendLight(e){let t=ri.top;X.length<t+5&&growPath(t+5),X[t]=e,X[t+1]=X[t+1-5],X[t+4]=0,ri.top=t+5}function growPath(e){for(;X.length<e;)X.push(null)}function dispatch(e,t,n=!1){let r=e._s,i=t;r.flags|=64;let a=n?t.document??t:t,o=null,s=r.relatedTarget,c=inShadowTree(s),l=c?retarget(s,t):s,u=!1,d=ri.top,m=!1;try{if(t!==l||t===s){let n=r.flags&2048?e._touchTargetList():null;m=s===null&&n===null,r.pathStart=d,r.pathLength=0;let i=t[z],h=i===void 0?null:treeRoot$1(i),_=h,v=_!==null&&!!(_.flags&32),y=i===void 0&&isWindowInstance(t);appendToEventPath(t,y?exposedWindow(t):a,l,n===null?null:retargetList(n,t),!1,h),y&&(X[d+4]=X[d+4]|16),r.pathLength=1;let b=d,x=!!(r.flags&1024)&&r.type===`click`,S=!!(r.flags&256);x&&hasActivationBehavior(t,i)&&(o=t);let C=i!==void 0&&isAssigned(i),w=!1;i!==void 0&&r.type===`change`&¬eChangeDispatch(i);let T=t,E=i;for(;;){let r,i,a;if(E===void 0||E.type===9)r=T._getTheParent(e),i=r===null?void 0:r[z],a=!1;else{let t=E.parent;t!==null&&!(t.flags&512)?(r=t.node,i=t,a=!0):(r=nodeParentOf(E,T,e),i=Oi,a=i!==void 0&&i===t)}if(r===null)break;let u=i===void 0?null:a?h:treeRoot$1(i);C&&(C=!1,u!==null&&u.flags&32&&u.node.mode===`closed`&&(w=!0)),i!==void 0&&isAssigned(i)&&(C=!0),l=c?retarget(s,r):s;let d=n===null?null:retargetList(n,r);if(i===void 0||_!==null&&(!v||isShadowIncludingInclusiveAncestor$4(_,i)))x&&S&&o===null&&hasActivationBehavior(r,i)&&(o=r),m&&(u===null||!(u.flags&32))?appendLight(r):appendToEventPath(r,null,l,d,w,u),i===void 0&&isWindowInstance(r)&&(X[ri.top-5+4]=X[ri.top-5+4]|16);else if(r===l)break;else t=r,_=u,v=_!==null&&!!(_.flags&32),x&&o===null&&hasActivationBehavior(t,i)&&(o=t),b=ri.top,appendToEventPath(r,t,l,d,w,u);T=r,E=i,h=u,w=!1}let ee=ri.top;r.pathLength=(ee-d)/5;{let e=b;if(inShadowTree(X[e+1])||inShadowTree(X[e+2]))u=!0;else{let t=X[e+3];if(t!==null)for(let e=0;e<t.length;e++)inShadowTree(t[e])&&(u=!0)}}o!==null&&o._legacyPreActivationBehavior?.();let D=typeIdOf(r.type);if(D!==-1||r.flags&128&&legacyTypeListened(r.type)){let t=listenerSeqLimit(),n=!1;for(let t=ee-5;t>=d;t-=5){let i=X[t][Dn];if(Di[t]=i,i!=null&&(r.eventPhase=X[t+4]&8?2:1,invoke$1(e,r,t,i,1,D),r.flags&1)){n=!0;break}}if(!n)for(let n=d;n<ee;n+=5){let i=X[n+4];if(!(i&8)&&!S)continue;let a=listenerSeqLimit()===t?Di[n]:X[n][Dn];if(a!=null&&(r.eventPhase=i&8?2:3,invoke$1(e,r,n,a,3,D),r.flags&1))break}}let te=S?ee-5:b;r.target=X[te+1],r.relatedTarget=X[te+2],r.touchTargets=X[te+3]}}finally{for(let e=d,t=ri.top;e<t;e+=5)X[e]=null,X[e+1]=null,Di[e]=null,m||(X[e+2]=null,X[e+3]=null);ri.top=d,r.eventPhase=0,r.currentTarget=null,r.pathStart=-1,r.pathLength=0,r.flags&=-76}if(u&&(r.target=null,r.relatedTarget=null,r.touchTargets=null),o!==null){let t=o;r.flags&4?t._legacyCanceledActivationBehavior?.():t._activationBehavior?.(e)}return Ti!==null&&Ti(e,i),!(r.flags&4)}function legacyType(e){switch(e){case`animationend`:return`webkitAnimationEnd`;case`animationiteration`:return`webkitAnimationIteration`;case`animationstart`:return`webkitAnimationStart`;case`transitionend`:return`webkitTransitionEnd`;default:return null}}function legacyTypeListened(e){let t=legacyType(e);return t!==null&&typeIdOf(t)!==-1}function invoke$1(e,t,n,r,i,a){let o=X[n];if(t.target=X[n+1],t.relatedTarget=X[n+2],t.touchTargets=X[n+3],t.flags&1)return;let s=X[n+4],c=s&16?exposedWindow(o):o;t.currentTarget=c;let l=!!(s&1),u=t.type,d=firstListener(r,a);if(!(d!==void 0&&innerInvoke(e,t,o,c,u,d,i,l))&&t.flags&128){let n=legacyType(u);if(n===null)return;let a=firstListener(r,typeIdOf(n));if(a===void 0)return;t.type=n;try{innerInvoke(e,t,o,c,n,a,i,l)}finally{t.type=u}}}__name(invoke$1,`invoke`);function innerInvoke(e,t,n,r,i,a,o,s){let c=!1,l=listenerSeqLimit();for(let u=a;u!==null&&u.seq<l;u=u.next){let a=u.flags;if(a&8||(c=!0,a&1?o!==1:o===1))continue;a&2&&removeListener(n,i,u);let l=wi;s||(wi=e),a&4&&(t.flags|=8);let d=u.callback;try{if(typeof d==`function`)d.call(r,e);else{let t=d.handleEvent;if(typeof t!=`function`)throw TypeError(`The provided callback is not a function and has no callable 'handleEvent' property.`);t.call(d,e)}}catch(e){reportException$1(e,n)}if(t.flags&=-9,wi=l,t.flags&2)break}return c}var EventTarget=class{constructor(){}addEventListener(e,t,n){if(arguments.length<2)throw TypeError(`Failed to execute 'addEventListener' on 'EventTarget': 2 arguments required, but only ${arguments.length} present.`);addEventListener(this,typeof e==`string`?e:toDOMString(e),t,n)}removeEventListener(e,t,n){if(arguments.length<2)throw TypeError(`Failed to execute 'removeEventListener' on 'EventTarget': 2 arguments required, but only ${arguments.length} present.`);removeEventListener(this,typeof e==`string`?e:toDOMString(e),t,n)}dispatchEvent(e){if(!(e instanceof Event))throw TypeError(`Failed to execute 'dispatchEvent' on 'EventTarget': parameter 1 is not of type 'Event'.`);let t=e._s;if(!(t.flags&32))throw new DOMException(`Failed to execute 'dispatchEvent' on 'EventTarget': The event provided is uninitialized.`,`InvalidStateError`);if(t.flags&64||t.eventPhase!==0)throw new DOMException(`Failed to execute 'dispatchEvent' on 'EventTarget': The event is already being dispatched.`,`InvalidStateError`);return setTrusted(e,!1),dispatch(e,this)}_getTheParent(e){return null}};Object.defineProperty(EventTarget.prototype,Symbol.toStringTag,{value:`EventTarget`,configurable:!0}),exposeMembers(EventTarget);var AttrRare=class{name;ns;prefix;attr;constructor(e,t,n){this.name=e,this.ns=t,this.prefix=n,this.attr=null}},AttrRecord=class{localName;value;rare;constructor(e,t,n,r){this.localName=e,this.value=t,this.rare=n===null&&r===null?null:new AttrRare(r===null?e:r+`:`+e,n,r)}get name(){let e=this.rare;return e===null?this.localName:e.name}get ns(){let e=this.rare;return e===null?null:e.ns}get prefix(){let e=this.rare;return e===null?null:e.prefix}get attr(){let e=this.rare;return e===null?null:e.attr}set attr(e){if(this.rare===null){if(e===null)return;this.rare=new AttrRare(this.localName,null,null)}this.rare.attr=e}},NodeImpl=class{node;type;doc;parent;first;last;prev;next;childCount;flags;tag;name;ns;prefix;attrs;data;id;classes;cache;constructor(e,t,n){this.node=e,this.type=t,this.doc=n,this.parent=null,this.first=null,this.last=null,this.prev=null,this.next=null,this.childCount=0,this.flags=0,this.tag=0,this.name=``,this.ns=null,this.prefix=null,this.attrs=null,this.data=``,this.id=``,this.classes=null,this.cache=null}};function nextInTree(e,t){let n=e.first;return n===null?nextSkippingChildren(e,t):n}function nextSkippingChildren(e,t){let n=e;for(;n!==null&&n!==t;){let e=n.next;if(e!==null)return e;n=n.parent}return null}function previousInTree(e,t){if(e===t)return null;let n=e.prev;if(n===null)return e.parent;for(;n.last!==null;)n=n.last;return n}function nextElementInTree(e,t){let n=nextInTree(e,t);for(;n!==null&&n.type!==1;)n=nextInTree(n,t);return n}function firstElementChild(e){let t=e.first;for(;t!==null&&t.type!==1;)t=t.next;return t}function lastElementChild(e){let t=e.last;for(;t!==null&&t.type!==1;)t=t.prev;return t}function nextElementSibling(e){let t=e.next;for(;t!==null&&t.type!==1;)t=t.next;return t}function previousElementSibling(e){let t=e.prev;for(;t!==null&&t.type!==1;)t=t.prev;return t}function treeRoot(e){let t=e;for(;t.parent!==null;)t=t.parent;return t}function isInclusiveAncestor(e,t){let n=t;for(;n!==null;){if(n===e)return!0;n=n.parent}return!1}function indexOf(e){let t=0;for(let n=e.prev;n!==null;n=n.prev)t++;return t}function childAt(e,t){let n=e.childCount;if(t<0||t>=n)return null;if(t<n>>1){let n=e.first;for(let e=0;e<t;e++)n=n.next;return n}let r=e.last;for(let e=n-1;e>t;e--)r=r.prev;return r}function ancestors(e){let t=[];for(let n=e;n!==null;n=n.parent)t.push(n);return t}function compareTreeOrder(e,t){if(e===t)return 0;let n=ancestors(e),r=ancestors(t),i=n.length-1,a=r.length-1;for(;i>=0&&a>=0&&n[i]===r[a];)i--,a--;if(i<0)return-1;if(a<0)return 1;let o=n[i],s=r[a];for(let e=o.next;e!==null;e=e.next)if(e===s)return-1;return 1}function derivedCache(e,t,n){let r=e[Pt];r===null&&(e[Pt]=r=/* @__PURE__ */ new Map);let i=r.get(t);return i===void 0&&r.set(t,i=n()),i}function peekDerivedCache(e,t){let n=e[Pt];return n===null?void 0:n.get(t)}const ki={},newHolders=()=>/* @__PURE__ */ new Set;function holdSnapshot(e,t,n){n.flags&1&&derivedCache(e,ki,newHolders).add(t)}function dropDerivedCaches(e){let t=e[Pt];e[Pt]=null;let n=t.get(ki);if(n!==void 0)for(let e of n)e._dropSnapshot()}let Ai=null;function setElementClassLookup(e){Ai=e}function createElementImpl(e,t,n,r){return new(Ai(t,n))(e,t,n,r)[z]}let ji=!1,Mi=null;function setCEReactionsPending(e){ji=e}function setCEReactionsFlush(e){Mi=e}function flushCEReactions(){Mi!==null&&Mi()}let Ni=null;function setCustomElementCreate(e){Ni=e}function createElementImplSync(e,t,n,r,i){if(Ni!==null){let a=Ni(e,t,n,r,i);if(a!==null)return a}return createElementImpl(e,t,n,r)}let Pi=!1;function setCEActive(){Pi=!0}let Fi=null,Ii=null;function setCustomElementCloneHooks(e,t){Fi=e,Ii=t}function createCloneElementImpl(e,t){return Fi(e,t)}function ceParserCreated(e){Ii(e)}function indexGetterTable(e,t,n=32){let r={proto:e,count:0,item:t};return ensureIndexGetters(r,n),r}function ensureIndexGetters(e,t){if(t<=e.count)return;let n=Math.max(t,e.count*2),r=e.item;for(let t=e.count;t<n;t++)Object.defineProperty(e.proto,t,{get(){return r(this,t)},enumerable:!1,configurable:!0});e.count=n}var CollectionIterator=class extends Iterator{#e;#t;#n;constructor(e,t){super(),this.#e=e,this.#t=0,this.#n=t}next(){let e=this.#e;if(e!==null){let t=this.#t,n=this.#n?e._snapshot():e;if(t<n.length)return this.#t=t+1,{value:n[t],done:!1};this.#e=null}return{value:void 0,done:!0}}};Object.defineProperty(CollectionIterator.prototype,Symbol.toStringTag,{value:`Array Iterator`,configurable:!0});function iterableTarget(e){if(e==null)throw TypeError(`values method called on null or undefined`);return Object(e)}const Li=Array.prototype.forEach,Ri={forEach(e,t){if(this===null||this===void 0)return Li.call(this,e,t);let n=Object(this),r=Math.min(Math.max(Math.trunc(Number(n.length))||0,0),2**53-1);if(typeof e!=`function`)Li.call(n,e,t);else for(let i=0;i<r;i++)i in n&&e.call(t,n[i],i,n)}}.forEach,zi=/* @__PURE__ */ new Map;function lazyItem(e,t){let n=e._snapshot();return t<n.length?n[t]:void 0}var Bi=class NodeList{#e;#t;#n;constructor(e,t){this.#e=e,this.#t=0;let n=new.target!==NodeList;this.#n=n,n&&!zi.has(new.target.prototype)&&zi.set(new.target.prototype,indexGetterTable(new.target.prototype,lazyItem,64))}static _static(e){let t=new NodeList(null),n=e.length;for(let r=0;r<n;r++)t[r]=e[r];return t.#t=n,t}static _staticFromImpls(e){let t=new NodeList(null),n=e.length;for(let r=0;r<n;r++)t[r]=e[r].node;return t.#t=n,t}static _live(e){let t=new NodeList(e);return e.flags|=256,t.#r(),t}#r(){let e=this,t=this.#e,n=0;for(let r=t.first;r!==null;r=r.next)e[n++]=r.node;let r=this.#t;for(let t=n;t<r;t++)delete e[t];this.#t=n}static _appended(e,t){e[e.#t++]=t}static _popped(e){delete e[--e.#t]}static _rebuild(e){e.#e!==null&&e.#r()}_snapshot(){let e=this.#t,t=Array(e);for(let n=0;n<e;n++)t[n]=this[n];return t}get length(){if(this.#n){let e=this._snapshot().length,t=zi.get(Object.getPrototypeOf(this));return e>t.count&&ensureIndexGetters(t,e),e}return this.#t}item(e){let t=Number(e)>>>0;return this.#n?this._snapshot()[t]??null:t<this.#t?this[t]:null}static _values(e){let t=iterableTarget(e);return new CollectionIterator(t,#n in t&&t.#n)}};const Vi={values(){return Bi._values(this)}}.values;Object.defineProperties(Bi.prototype,{forEach:{value:Ri,writable:!0,enumerable:!0,configurable:!0},entries:{value:Array.prototype.entries,writable:!0,enumerable:!0,configurable:!0},keys:{value:Array.prototype.keys,writable:!0,enumerable:!0,configurable:!0},values:{value:Vi,writable:!0,enumerable:!0,configurable:!0},[Symbol.iterator]:{value:Vi,writable:!0,configurable:!0},[Symbol.toStringTag]:{value:`NodeList`,configurable:!0}});const Hi=[];var Ui=class MutationRecord{#e;#t;#n;#r;#i;#a;#o;#s;#c;#l;#u;constructor(e,t,n,r,i,a,o,s,c){if(new.target!==MutationRecord||arguments.length===0)throw TypeError(`Illegal constructor`);this.#e=e,this.#t=t,this.#n=n,this.#r=r,this.#i=i,this.#a=a??Hi,this.#o=o??Hi,this.#s=null,this.#c=null,this.#l=s,this.#u=c}get type(){return this.#e}get target(){return this.#t.node}get addedNodes(){return this.#s??=Bi._staticFromImpls(this.#a)}get removedNodes(){return this.#c??=Bi._staticFromImpls(this.#o)}get previousSibling(){let e=this.#l;return e===null?null:e.node}get nextSibling(){let e=this.#u;return e===null?null:e.node}get attributeName(){return this.#n}get attributeNamespace(){return this.#r}get oldValue(){return this.#i}};Object.defineProperty(Ui.prototype,Symbol.toStringTag,{value:`MutationRecord`,configurable:!0});let Wi=0;function setActiveObservers(e){Wi=e}let Gi=0;function setSubtreeObservers(e){Gi=e}var RegisteredObserver=class{observer;options;source;constructor(e,t,n){this.observer=e,this.options=t,this.source=n}},NormalizedOptions=class{childList;attributes;characterData;subtree;attributeOldValue;characterDataOldValue;attributeFilter;constructor(e,t,n){this.childList=!!e.childList,this.attributes=t,this.characterData=n,this.subtree=!!e.subtree,this.attributeOldValue=!!e.attributeOldValue,this.characterDataOldValue=!!e.characterDataOldValue,this.attributeFilter=e.attributeFilter===void 0?null:Array.from(e.attributeFilter,String)}};const Ki=/* @__PURE__ */ new WeakMap;function registeredObserverList(e){return e.flags&2048?Ki.get(e)??null:null}function addRegistration(e,t){let n=registeredObserverList(e);n===null&&(n=[],Ki.set(e,n),e.flags|=fe),n.push(t)}function removeRegistrations(e,t){let n=registeredObserverList(e);if(n===null)return;let r=0;for(let e=0;e<n.length;e++)t(n[e])||(n[r++]=n[e]);n.length=r,r===0&&(Ki.delete(e),e.flags&=-2049)}let qi=[],Ji=[],Yi=!1;function queueMutationRecord(e,t,n,r,i,a,o,s,c){let l=null,u=null,d=Gi!==0;for(let a=t;a!==null;a=d?a.parent:null){if(!(a.flags&2048))continue;let o=Ki.get(a);if(o!==void 0)for(let s=0;s<o.length;s++){let c=o[s],d=c.options;if(a!==t&&!d.subtree)continue;if(e===0){if(!d.attributes)continue;let e=d.attributeFilter;if(e!==null&&(r!==null||!e.includes(n)))continue}else if(e===1){if(!d.characterData)continue}else if(!d.childList)continue;let m=c.observer;l===null&&(l=[],u=[]);let h=l.indexOf(m);h===-1&&(h=l.length,l.push(m),u.push(null)),(e===0&&d.attributeOldValue||e===1&&d.characterDataOldValue)&&(u[h]=i)}}if(l===null)return;let m=e===0?`attributes`:e===1?`characterData`:`childList`;for(let e=0;e<l.length;e++){let i=l[e],d=new Ui(m,t,n,r,u[e],a,o,s,c),h=i[ir];h.length===0&&!qi.includes(i)&&qi.push(i),h.push(d)}queueMutationObserverMicrotask()}function queueTreeMutationRecord(e,t,n,r,i){queueMutationRecord(2,e,null,null,null,t,n,r,i)}function queueAttributeMutationRecord(e,t,n,r){queueMutationRecord(0,e,t,n,r,null,null,null,null)}function queueCharacterDataMutationRecord(e,t){queueMutationRecord(1,e,null,null,t,null,null,null,null)}function addTransientObservers(e,t){if(Gi!==0)for(let n=e;n!==null;n=n.parent){if(!(n.flags&2048))continue;let e=Ki.get(n);if(e!==void 0)for(let n=0;n<e.length;n++){let r=e[n];if(!r.options.subtree)continue;let i=r.observer,a=r.source??r;hasTransientWithSource(t,a)||(addRegistration(t,new RegisteredObserver(i,a.options,a)),i[Rn].push(t),i[rn]=!0,qi.includes(i)||qi.push(i),queueMutationObserverMicrotask())}}}function hasTransientWithSource(e,t){let n=registeredObserverList(e);if(n===null)return!1;for(let e=0;e<n.length;e++)if(n[e].source===t)return!0;return!1}function signalSlotChange(e){Ji.includes(e)||Ji.push(e),queueMutationObserverMicrotask()}function queueMutationObserverMicrotask(){Yi||(Yi=!0,queueMicrotask(notifyMutationObservers))}function notifyMutationObservers(){Yi=!1;let e=qi;qi=[],e.length>1&&e.sort((e,t)=>e[un]-t[un]);let t=Ji;Ji=[];for(let t=0;t<e.length;t++){let n=e[t],r=n[ir];if(n[ir]=[],removeTransientRegistrations(n),r.length!==0)try{n[$e].call(n,r,n)}catch(e){reportException$1(e,null)}}for(let e=0;e<t.length;e++)t[e].node.dispatchEvent(new Event(`slotchange`,{bubbles:!0}))}function removeTransientRegistrations(e){if(!e[rn])return;e[rn]=!1;let t=[],n=e[Rn];for(let r=0;r<n.length;r++){let i=n[r];removeRegistrations(i,t=>t.observer===e&&t.source!==null);let a=registeredObserverList(i);a!==null&&!t.includes(i)&&a.some(t=>t.observer===e)&&t.push(i)}e[Rn]=t}function dropPending(e){let t=qi.indexOf(e);t!==-1&&qi.splice(t,1)}let Xi=0,Zi=0,Qi=[];function homeOf(e){return e.doc}function file(e,t){let n=e[$n];n===null?n=e[$n]={refs:[],sweepAt:64}:n.refs.length>=n.sweepAt&&(compact(e,n),n.sweepAt=Math.max(64,n.refs.length*2)),n.refs.push(t),Xi++}function markBoundary(e){e.flags&1048576||(e.flags|=xe,e.parent!==null&&markRangeAncestors(e.parent))}function markRangeAncestors(e){for(let t=e;t!==null&&!(t.flags&2097152);t=t.parent)t.flags|=Se}function registerLiveRange(e){markBoundary(e[G]),markBoundary(e[P]);let t=homeOf(e[G]);e[cn]=t,file(t,new WeakRef(e))}function refileRange(e){markBoundary(e[G]),markBoundary(e[P]);let t=homeOf(e[G]);e[cn]!==t&&e[cn]!==null&&(e[cn]=t,file(t,new WeakRef(e)))}let $i=64;function registerNodeIterator(e){if(Qi.length>=$i){let e=0;for(let t=0;t<Qi.length;t++)Qi[t].deref()!==void 0&&(Qi[e++]=Qi[t]);Qi.length=e,$i=Math.max(64,e*2)}Qi.push(new WeakRef(e)),Zi=Qi.length}function compact(e,t){let n=t.refs,r=0;for(let t=0;t<n.length;t++){let i=n[t].deref();i!==void 0&&i[cn]===e&&(n[r++]=n[t])}Xi-=n.length-r,n.length=r}const ea=[];function liveRanges(e){let t=homeOf(e),n=t[$n];if(ea.length=0,n===null)return ea;let r=n.refs,i=0;for(let e=0;e<r.length;e++){let n=r[e].deref();n!==void 0&&n[cn]===t&&(ea.push(n),r[i++]=r[e])}return Xi-=r.length-i,r.length=i,i===0?t[$n]=null:n.sweepAt>64&&i*4<n.sweepAt&&(n.sweepAt=Math.max(64,i*2)),ea}function rangesAdopt(e,t){let n=t,r=homeOf(e),i=n[$n];if(i===null||n===r)return;let a=i.refs,o=0;for(let t=0;t<a.length;t++){let i=a[t].deref();i===void 0||i[cn]!==n?Xi--:isInclusiveAncestor(e,i[G])||isInclusiveAncestor(e,i[P])?(i[cn]=r,Xi--,file(r,a[t])):a[o++]=a[t]}a.length=o,o===0&&(n[$n]=null)}function rangesAfterInsert(e,t,n){let r=liveRanges(e);for(let i=0;i<r.length;i++){let a=r[i];a[G]===e&&a[K]>t&&(a[K]+=n),a[P]===e&&a[I]>t&&(a[I]+=n)}}function rangesBeforeRemove(e,t,n){let r=liveRanges(t);for(let i=0;i<r.length;i++){let a=r[i];isInclusiveAncestor(e,a[G])&&(a[G]=t,a[K]=n,markBoundary(t)),isInclusiveAncestor(e,a[P])&&(a[P]=t,a[I]=n,markBoundary(t)),a[G]===t&&a[K]>n&&a[K]--,a[P]===t&&a[I]>n&&a[I]--}}function rangesReplaceData(e,t,n,r){let i=liveRanges(e),a=t+n;for(let o=0;o<i.length;o++){let s=i[o];s[G]===e&&s[K]>t&&s[K]<=a&&(s[K]=t),s[P]===e&&s[I]>t&&s[I]<=a&&(s[I]=t),s[G]===e&&s[K]>a&&(s[K]+=r-n),s[P]===e&&s[I]>a&&(s[I]+=r-n)}}function rangesSplitText(e,t,n,r){let i=liveRanges(e),a=indexOf(e);for(let o=0;o<i.length;o++){let s=i[o];s[G]===e&&s[K]>n&&(s[G]=t,s[K]-=n,markBoundary(t)),s[P]===e&&s[I]>n&&(s[P]=t,s[I]-=n,markBoundary(t)),s[G]===r&&s[K]===a+1&&s[K]++,s[P]===r&&s[I]===a+1&&s[I]++}}function rangesNormalizeMerge(e,t,n){let r=liveRanges(e);r.length!==0&&markBoundary(e);let i=t.parent,a=indexOf(t);for(let o=0;o<r.length;o++){let s=r[o];s[G]===t&&(s[K]+=n,s[G]=e),s[P]===t&&(s[I]+=n,s[P]=e),s[G]===i&&s[K]===a&&(s[G]=e,s[K]=n),s[P]===i&&s[I]===a&&(s[P]=e,s[I]=n)}}function iteratorsBeforeRemove(e){let t=0,n=e.doc;for(let r=0;r<Qi.length;r++){let i=Qi[r].deref();i!==void 0&&(Qi[t++]=Qi[r],i[sr].doc===n&&(preRemovingSteps(i,i,e),i[_n]!==null&&preRemovingSteps(i,i[_n],e)))}Qi.length=t,Zi=t}function preRemovingSteps(e,t,n){if(!isInclusiveAncestor(n,t[ar])||isInclusiveAncestor(n,e[sr]))return;if(t[Kn]){let r=nextSkippingChildren(n,e[sr]);if(r!==null){t[ar]=r;return}t[Kn]=!1}let r=n.prev;if(r===null)t[ar]=n.parent;else{let e=r;for(;e.last!==null;)e=e.last;t[ar]=e}}const ta=/* @__PURE__ */ new WeakMap;function noteInlineStyle(e,t){ta.set(e,(ta.get(e)??0)+t)}function inlineStyleCount(e){return ta.get(e)??0}const na=/* @__PURE__ */ new Set;let ra=!1;function ariaOrData(e){if(e.length<6||e.charCodeAt(4)!==45)return!1;let t=e.charCodeAt(0);return t===97?e.charCodeAt(1)===114&&e.charCodeAt(2)===105&&e.charCodeAt(3)===97:t===100&&e.charCodeAt(1)===97&&e.charCodeAt(2)===116&&e.charCodeAt(3)===97}let ia=!1;function noteStyleRecordCached(){ia=!0}function noteSelectorAttribute(e){ariaOrData(e)&&(na.add(e),ra=!0)}function styleBlindAttribute(e){return ariaOrData(e)&&(!ra||!na.has(e))}function asciiLowercase$1(e){let t=e.length;for(let n=0;n<t;n++){let t=e.charCodeAt(n);if(t>=65&&t<=90)return asciiLowercaseFrom(e,n)}return e}__name(asciiLowercase$1,`asciiLowercase`);function asciiLowercaseFrom(e,t){let n=!0,r=e.length;for(let i=t;i<r;i++)if(e.charCodeAt(i)>=128){n=!1;break}if(n)return e.toLowerCase();let i=e.slice(0,t);for(let n=t;n<r;n++){let t=e.charCodeAt(n);i+=t>=65&&t<=90?String.fromCharCode(t+32):e[n]}return i}function isValidAttributeLocalName(e){let t=e.length;if(t===0)return!1;for(let n=0;n<t;n++){let t=e.charCodeAt(n);if(t===32||t===9||t===10||t===12||t===13||t===0||t===47||t===61||t===62)return!1}return!0}function findAttributeByName(e,t){let n=e.attrs;if(n===null)return null;for(let e=0;e<n.length;e++){let r=n[e],i=r.rare;if((i===null?r.localName:i.name)===t)return r}return null}function findAttributeByNamespace(e,t,n){let r=e.attrs;if(r===null)return null;for(let e=0;e<r.length;e++){let i=r[e],a=i.rare;if(i.localName===n&&(a===null?t===null:a.ns===t))return i}return null}function getAttribute(e,t){let n=e.attrs;if(n===null)return null;let r=e.flags&2?asciiLowercase$1(t):t;for(let e=0;e<n.length;e++){let t=n[e],i=t.rare;if((i===null?t.localName:i.name)===r)return t.value}return null}function prefixFlag(e){switch(e.length){case 4:if(e===`form`)return be;break;case 5:if(e===`inert`)return ye;break;case 8:if(e===`tabindex`)return _e;break;case 15:if(e===`contenteditable`)return ve}if(e.length<5||e.charCodeAt(4)!==45)return 0;let t=e.charCodeAt(0);return t===97?e.charCodeAt(1)===114&&e.charCodeAt(2)===105&&e.charCodeAt(3)===97?he:0:t===100&&e.charCodeAt(1)===97&&e.charCodeAt(2)===116&&e.charCodeAt(3)===97?ge:0}function attr(e,t){let n=e.attrs;if(n===null)return null;for(let e=0;e<n.length;e++){let r=n[e],i=r.rare;if(i===null?r.localName===t:i.ns===null&&i.name===t)return r.value}return null}function ariaAttr(e,t){return e.flags&32768?attr(e,t):null}function hasAttr(e,t){return attr(e,t)!==null}const aa=/* @__PURE__ */ new Map;function setAttribute(e,t,n){let r=aa.get(t);if(r===void 0){if(!isValidAttributeLocalName(t))throw new DOMException(`"${t}" is not a valid attribute name.`,`InvalidCharacterError`);r=asciiLowercase$1(t),aa.size===1024&&aa.clear(),aa.set(t,r)}let i=e.flags&2?r:t,a=findAttributeByName(e,i);a===null?appendAttribute(e,new AttrRecord(i,n,null,null)):changeAttribute(e,a,n)}function changeAttribute(e,t,n){let r=t.value;t.value=n,handleAttributeChanges(e,t,r,n)}function addRecord(e,t){let n=prefixFlag(t.localName);n!==0&&(e.flags|=n,n===524288&&(e.doc[qt]=!0));let r=e.attrs;if(r===null){let n=[,];n[0]=t,e.attrs=n;return}let i=r.length;if(i>=16){r.push(t);return}let a=Array(i+1);for(let e=0;e<i;e++)a[e]=r[e];a[i]=t,e.attrs=a}function appendAttribute(e,t){addRecord(e,t),handleAttributeChanges(e,t,null,t.value)}function removeAttributeRecord(e,t){let n=e.attrs,r=n.length,i=prefixFlag(t.localName);if(r===1)e.attrs=null,i!==0&&(e.flags&=~i);else{let a=Array(r-1),o=!1;for(let e=0,s=0;e<r;e++){let r=n[e];r!==t&&(a[s++]=r,i!==0&&!o&&prefixFlag(r.localName)===i&&(o=!0))}e.attrs=a,i!==0&&!o&&(e.flags&=~i)}t.attr!==null&&t.attr._detach(),handleAttributeChanges(e,t,t.value,null)}function removeAttribute(e,t){if(e.attrs===null)return null;let n=findAttributeByName(e,e.flags&2?asciiLowercase$1(t):t);return n!==null&&removeAttributeRecord(e,n),n}function findAttributeByLocalName(e,t){let n=e.attrs;if(n===null)return null;for(let e=0;e<n.length;e++){let r=n[e];if(r.localName===t){let e=r.rare;if(e===null||e.ns===null)return r}}return null}function setAttributeValue(e,t,n){let r=findAttributeByLocalName(e,t);r===null?appendAttribute(e,new AttrRecord(t,n,null,null)):changeAttribute(e,r,n)}function removeAttributeByLocalName(e,t){let n=findAttributeByLocalName(e,t);n!==null&&removeAttributeRecord(e,n)}function handleAttributeChanges(e,t,n,r){let i=t.rare,a=i===null?null:i.ns;Wi!==0&&queueAttributeMutationRecord(e,t.localName,a,n),a===null&&(coreAttributeSteps(e,t.localName,r),sa!==0&&slotsAttributeChanged(e,t.localName,n,r)),e.flags&8&&e.node._attributeChangedSteps(t.localName,n,r,a);let o=e.doc;o[J]++,ia&&a===null&&styleBlindAttribute(t.localName)&&o[qe]++,ji&&flushCEReactions()}function coreAttributeSteps(e,t,n){switch(t){case`id`:{let t=!!(e.flags&1);t&&e.id!==``&&e.doc._idRemove(e),e.id=n??``,t&&e.id!==``&&e.doc._idAdd(e);break}case`class`:e.classes=null;break;case`style`:n===null||n===``?(e.flags&64&¬eInlineStyle(e.doc,-1),e.flags&=-65):(e.flags&64||noteInlineStyle(e.doc,1),e.flags|=64),e.node[Or]?._attributeChanged(n)}}function appendAttributeDetached(e,t,n,r,i){addRecord(e,new AttrRecord(t,n,r,i)),r===null&&(t===`id`?e.id=n:t===`style`&&n!==``&&!(e.flags&64)&&(e.flags|=64,noteInlineStyle(e.doc,1)))}const oa=[];function classTokens(e){let t=e.classes;if(t!==null)return t;let n=attr(e,`class`);return t=n===null||n===``?oa:splitOnAsciiWhitespace(n),e.classes=t,t}function splitOnAsciiWhitespace(e){let t=[],n=e.length,r=0;for(;r<n;){for(;r<n&&isAsciiWhitespace(e.charCodeAt(r));)r++;if(r>=n)break;let i=r;for(;r<n&&!isAsciiWhitespace(e.charCodeAt(r));)r++;t.push(i===0&&r===n?e:e.slice(i,r))}return t}function isAsciiWhitespace(e){return e===32||e===9||e===10||e===12||e===13}let sa=0;function _shadowRootAttached(){sa++}const ca=/* @__PURE__ */ new WeakMap,la=/* @__PURE__ */ new WeakMap,ua=/* @__PURE__ */ new WeakMap,da=/* @__PURE__ */ new WeakMap,fa=[];function isSlot(e){return e.type===1&&e.tag===Z.slot&&e.ns===`http://www.w3.org/1999/xhtml`}function isSlottable(e){return e.type===1||e.type===3}function shadowOf(e){return e.flags&512?e.node[Sr]??null:null}function slotName(e){return attr(e,`name`)??``}function slottableName(e){return e.type===1?attr(e,`slot`)??``:``}function findSlot(e,t){let n=e.parent;if(n===null)return null;let r=shadowOf(n);if(r===null||t&&r.mode!==`open`)return null;let i=r[z];if(r.slotAssignment===`manual`){for(let t=i.first;t!==null;t=nextInTree(t,i))if(isSlot(t)&&(ua.get(t)??fa).includes(e))return t;return null}let a=slottableName(e);for(let e=i.first;e!==null;e=nextInTree(e,i))if(isSlot(e)&&slotName(e)===a)return e;return null}function findSlottables(e){let t=[],n=treeRoot(e);if(!(n.flags&32))return t;let r=n.node,i=r[R][z];if(r.slotAssignment===`manual`){let n=ua.get(e);if(n!==void 0)for(let e of n)e.parent===i&&t.push(e);return t}let a=null;for(let n=i.first;n!==null;n=n.next)isSlottable(n)&&(a??=firstSlotsByName(r[z]),a.get(slottableName(n))===e&&t.push(n));return t}function firstSlotsByName(e){let t=/* @__PURE__ */ new Map;for(let n=e.first;n!==null;n=nextInTree(n,e)){if(!isSlot(n))continue;let e=slotName(n);t.has(e)||t.set(e,n)}return t}function findFlattenedSlottables(e){let t=[];if(!(treeRoot(e).flags&32))return t;let n=findSlottables(e);if(n.length===0){n=[];for(let t=e.first;t!==null;t=t.next)isSlottable(t)&&n.push(t)}for(let e of n)if(isSlot(e)&&treeRoot(e).flags&32)for(let n of findFlattenedSlottables(e))t.push(n);else t.push(e);return t}function assignSlottables(e){let t=findSlottables(e),n=ca.get(e)??fa,r=n.length===t.length;if(r){for(let e=0;e<n.length;e++)if(n[e]!==t[e]){r=!1;break}}if(!r&&(signalSlotChange(e),n.length!==0)){let r=new Set(t);for(let t of n)la.get(t)===e&&!r.has(t)&&la.delete(t)}t.length===0?ca.delete(e):ca.set(e,t);for(let n of t)la.set(n,e)}function assignSlottablesForTree(e){for(let t=e;t!==null;t=nextInTree(t,e))isSlot(t)&&assignSlottables(t)}function assignASlot(e){let t=findSlot(e,!1);t!==null&&assignSlottables(t)}function assignAppended(e,t){if(t.slotAssignment===`manual`||la.has(e))return!1;let n=findSlot(e,!1);if(n===null)return!0;let r=ca.get(n);return r===void 0?ca.set(n,[e]):r.push(e),la.set(e,n),signalSlotChange(n),!0}function unassignRemoved(e,t){let n=ca.get(t);n.length===1?ca.delete(t):n.splice(n.indexOf(e),1),la.delete(e),signalSlotChange(t)}function hasSlotDescendant(e){for(let t=e;t!==null;t=nextInTree(t,e))if(isSlot(t))return!0;return!1}function isEmptyShadowSlot(e){return isSlot(e)&&!!(treeRoot(e).flags&32)&&(ca.get(e)??fa).length===0}function slotsAfterInsert(e,t,n){let r=n===null?1:n.length;for(let i=0;i<r;i++){let r=n===null?t:n[i];if(r.parent!==e)continue;let a=shadowOf(e);if(a!==null&&isSlottable(r)&&(r.next!==null||!assignAppended(r,a))&&assignASlot(r),isEmptyShadowSlot(e)&&signalSlotChange(e),hasSlotDescendant(r)){let e=treeRoot(r);e.flags&32&&assignSlottablesForTree(e)}}}function slotsAfterRemove(e,t){let n=la.get(e);if(n!==void 0&&(shadowOf(t)?.slotAssignment===`manual`?assignSlottables(n):unassignRemoved(e,n)),isEmptyShadowSlot(t)&&signalSlotChange(t),hasSlotDescendant(e)){let n=treeRoot(t);n.flags&32&&assignSlottablesForTree(n),assignSlottablesForTree(e)}}function slotsAttributeChanged(e,t,n,r){if(t===`name`&&isSlot(e)){if((n??``)===(r??``))return;let t=treeRoot(e);t.flags&32&&assignSlottablesForTree(t)}else if(t===`slot`){if((n??``)===(r??``))return;let t=la.get(e);t!==void 0&&assignSlottables(t),assignASlot(e)}}function assignedSlot(e){return la.get(e)??null}function assignedNodes(e,t){return t?findFlattenedSlottables(e):(ca.get(e)??fa).slice()}function assignedElements(e,t){return assignedNodes(e,t).filter(e=>e.type===1)}function assignManually(e,t){let n=ua.get(e)??fa;for(let e of n)da.delete(e);let r=[],i=null;for(let n of t){let t=da.get(n);if(t!==void 0&&t!==e){let e=ua.get(t);if(e!==void 0){let t=e.indexOf(n);t!==-1&&e.splice(t,1)}i===null&&(i=[]),i.includes(t)||i.push(t)}r.includes(n)||r.push(n),da.set(n,e)}ua.set(e,r);let a=treeRoot(e);if(a.flags&32&&assignSlottablesForTree(a),i!==null)for(let e of i)treeRoot(e)!==a&&assignSlottables(e)}function assignedSlotForEventPath(e){if(sa===0)return null;let t=e.parent;return t===null||!(t.flags&512)?null:la.get(e)??null}function isShadowRootImpl(e){return e.type===11&&!!(e.flags&32)}function hierarchyError$1(e){return new DOMException(e,`HierarchyRequestError`)}__name(hierarchyError$1,`hierarchyError`);function isCharacterData$1(e){return e===3||e===4||e===8||e===7}__name(isCharacterData$1,`isCharacterData`);function isHostIncludingInclusiveAncestor(e,t){let n=t;for(;n!==null;){if(n===e)return!0;let t=n.parent;if(t===null&&n.type===11){let e=n.node[R];n=e?e[z]:null}else n=t}return!1}function hasElementChild(e){for(let t=e.first;t!==null;t=t.next)if(t.type===1)return!0;return!1}function hasDoctypeChild(e){for(let t=e.first;t!==null;t=t.next)if(t.type===10)return!0;return!1}function doctypeFollows(e){for(let t=e.next;t!==null;t=t.next)if(t.type===10)return!0;return!1}function elementPrecedes(e){for(let t=e.prev;t!==null;t=t.prev)if(t.type===1)return!0;return!1}function ensurePreInsertionValidity(e,t,n){let r=t.type;if(r!==9&&r!==11&&r!==1)throw hierarchyError$1(`The parent is not a Document, DocumentFragment or Element.`);if(isHostIncludingInclusiveAncestor(e,t))throw hierarchyError$1(`The new child is an ancestor of the parent.`);if(n!==null&&n.parent!==t)throw new DOMException(`The reference child is not a child of this node.`,`NotFoundError`);let i=e.type;if(i!==11&&i!==10&&i!==1&&!isCharacterData$1(i))throw hierarchyError$1(`Nodes of this type cannot be inserted.`);if((i===3||i===4)&&r===9||i===10&&r!==9)throw hierarchyError$1(`Nodes of this type cannot be inserted into this parent.`);r===9&&checkDocumentChildConstraints(e,t,n,null)}function checkDocumentChildConstraints(e,t,n,r){let otherElement=()=>{for(let e=t.first;e!==null;e=e.next)if(e.type===1&&e!==r)return!0;return!1},otherDoctype=()=>{for(let e=t.first;e!==null;e=e.next)if(e.type===10&&e!==r)return!0;return!1};switch(e.type){case 11:{let i=0;for(let t=e.first;t!==null;t=t.next)if(t.type===1)i++;else if(t.type===3||t.type===4)throw hierarchyError$1(`A document cannot contain text children.`);if(i>1)throw hierarchyError$1(`A document can have only one document element.`);if(i===1){if(r===null){if(hasElementChild(t)||n!==null&&(n.type===10||doctypeFollows(n)))throw hierarchyError$1(`A document can have only one document element.`)}else if(otherElement()||doctypeFollows(r))throw hierarchyError$1(`A document can have only one document element.`)}break}case 1:if(r===null){if(hasElementChild(t)||n!==null&&(n.type===10||doctypeFollows(n)))throw hierarchyError$1(`A document can have only one document element.`)}else if(otherElement()||doctypeFollows(r))throw hierarchyError$1(`A document can have only one document element.`);break;case 10:if(r===null){if(hasDoctypeChild(t)||n!==null&&elementPrecedes(n)||n===null&&hasElementChild(t))throw hierarchyError$1(`A document can have only one doctype, before the document element.`)}else if(otherDoctype()||elementPrecedes(r))throw hierarchyError$1(`A document can have only one doctype, before the document element.`)}}function ensureReplaceAllValidity(e,t){if(t.type!==9){ensurePreInsertionValidity(e,t,null);return}if(isHostIncludingInclusiveAncestor(e,t))throw hierarchyError$1(`The new child is an ancestor of the parent.`);let n=e.type;if(n!==11&&n!==10&&n!==1&&!isCharacterData$1(n))throw hierarchyError$1(`Nodes of this type cannot be inserted.`);if(n===3||n===4)throw hierarchyError$1(`Nodes of this type cannot be inserted into this parent.`);if(n===11){let t=0;for(let n=e.first;n!==null;n=n.next)if(n.type===1)t++;else if(n.type===3||n.type===4)throw hierarchyError$1(`A document cannot contain text children.`);if(t>1)throw hierarchyError$1(`A document can have only one document element.`)}}function preInsert(e,t,n){ensurePreInsertionValidity(e,t,n);let r=n;return r===e&&(r=e.next),insert(e,t,r,!1),e}function append(e,t){return preInsert(e,t,null)}function link(e,t,n){if(e.parent=t,e.flags&3145728&&markRangeAncestors(t),n===null){let n=t.last;e.prev=n,e.next=null,n===null?t.first=e:n.next=e,t.last=e}else{let r=n.prev;e.prev=r,e.next=n,n.prev=e,r===null?t.first=e:r.next=e}if(t.childCount++,t.flags&256){let r=t.node[et];n===null?Bi._appended(r,e.node):Bi._rebuild(r)}}function unlink(e){let t=e.parent,n=e.prev,r=e.next;if(n===null?t.first=r:n.next=r,r===null?t.last=n:r.prev=n,e.parent=null,e.prev=null,e.next=null,t.childCount--,t.flags&256){let e=t.node[et];r===null?Bi._popped(e):Bi._rebuild(e)}}function suspendChildList(e){let t=e.flags&256;return e.flags&=-257,t}function resumeChildList(e,t){t!==0&&(e.flags|=256,Bi._rebuild(e.node[et]))}function insert(e,t,n,r){let i=e.type===11,a=i?e.childCount:1;if(a===0)return;let o=null;if(i){o=Array(a);let t=0;for(let n=e.first;n!==null;n=n.next)o[t++]=n;let n=suspendChildList(e);for(let e=0;e<o.length;e++)remove(o[e],!0);resumeChildList(e,n),Wi!==0&&queueTreeMutationRecord(e,[],o,null,null)}Xi!==0&&n!==null&&t.flags&1048576&&rangesAfterInsert(t,indexOf(n),a);let s=n===null?t.last:n.prev,c=t.doc,l=!!(t.flags&1);if(o===null)insertOne(e,t,n,c,l);else{let e=a>1&&n!==null?suspendChildList(t):0;for(let e=0;e<o.length;e++)insertOne(o[e],t,n,c,l);resumeChildList(t,e)}sa!==0&&slotsAfterInsert(t,o===null?e:null,o),!r&&Wi!==0&&queueTreeMutationRecord(t,o===null?[e]:o,[],s,n),childrenChanged(t),c[J]++,c[Lr]++,ji&&flushCEReactions()}function insertOne(e,t,n,r,i){(e.parent!==null||e.doc!==r)&&adopt(e,r),link(e,t,n),i&&connectSubtree(e,r)}let pa=null;function connectingRoot(){return pa}function connectSubtree(e,t){let n=pa;pa=e;try{connectNodes(e,t)}finally{pa=n}}function connectNodes(e,t){for(let n=e;n!==null;n=nextInTree(n,e))n.flags|=1,n.type===1&&(n.id!==``&&t._idAdd(n),n.flags&4&&n.node._connectedSteps(),n.flags&512&&connectSubtree(n.node[Sr][z],t))}function connectDetachedChildren(e){let t=e.node;for(let n=e.first;n!==null;n=n.next)connectSubtree(n,t);t[J]++,t[Lr]++}function disconnectSubtree(e,t){for(let n=e;n!==null;n=nextInTree(n,e))n.flags&=-2,n.type===1&&(n.id!==``&&t._idRemove(n),t[L]===n&&(t[L]=null),n.flags&4&&n.node._disconnectedSteps(),n.flags&512&&disconnectSubtree(n.node[Sr][z],t))}function childrenChanged(e){e.flags&16&&e.node._childrenChangedSteps()}function preRemove(e,t){if(e.parent!==t)throw new DOMException(`The node to be removed is not a child of this node.`,`NotFoundError`);return remove(e,!1),e}function remove(e,t){let n=e.parent,r=n.doc;Xi!==0&&(e.flags&3145728||n.flags&1048576)&&rangesBeforeRemove(e,n,indexOf(e)),Zi!==0&&iteratorsBeforeRemove(e);let i=e.prev,a=e.next;unlink(e),sa!==0&&slotsAfterRemove(e,n);let o=!!(e.flags&1);o&&disconnectSubtree(e,r),Wi!==0&&(addTransientObservers(n,e),t||queueTreeMutationRecord(n,[],[e],i,a)),childrenChanged(n),r[J]++,r[Lr]++,r[Pt]!==null&&dropDerivedCaches(r),ji&&o&&flushCEReactions()}function shadowIncludingRoot(e){let t=treeRoot(e);for(;t.flags&32;){let e=t.node[R];if(e===null)break;t=treeRoot(e[z])}return t}function move(e,t,n){if(shadowIncludingRoot(t)!==shadowIncludingRoot(e))throw hierarchyError$1(`The new parent is not in the same shadow-including tree as the node to move.`);if(isHostIncludingInclusiveAncestor(e,t))throw hierarchyError$1(`The node to move is an ancestor of the new parent.`);if(n!==null&&n.parent!==t)throw new DOMException(`The reference child is not a child of this node.`,`NotFoundError`);let r=e.type;if(r!==1&&!isCharacterData$1(r))throw hierarchyError$1(`Only elements and character data nodes can be moved.`);if(t.type===9){if(r===3)throw hierarchyError$1(`Nodes of this type cannot be moved into a document.`);if(r===1&&(hasElementChild(t)||n!==null&&(n.type===10||doctypeFollows(n))))throw hierarchyError$1(`A document can have only one document element.`)}let i=e.parent,a=t.doc;Xi!==0&&(e.flags&3145728||i.flags&1048576)&&rangesBeforeRemove(e,i,indexOf(e)),Zi!==0&&iteratorsBeforeRemove(e);let o=e.prev,s=e.next;unlink(e),sa!==0&&slotsAfterRemove(e,i),Wi!==0&&addTransientObservers(i,e),Xi!==0&&n!==null&&t.flags&1048576&&rangesAfterInsert(t,indexOf(n),1);let c=n===null?t.last:n.prev;link(e,t,n),sa!==0&&slotsAfterInsert(t,e,null);for(let t=e;t!==null;t=nextInTree(t,e))t.type===1&&t.flags&4&&t.node._movingSteps(t===e,i);Wi!==0&&(queueTreeMutationRecord(i,[],[e],o,s),queueTreeMutationRecord(t,[e],[],c,n)),childrenChanged(i),t!==i&&childrenChanged(t),a[J]++,a[Lr]++,ji&&flushCEReactions()}function replace(e,t,n){let r=n.type;if(r!==9&&r!==11&&r!==1)throw hierarchyError$1(`The parent is not a Document, DocumentFragment or Element.`);if(isHostIncludingInclusiveAncestor(t,n))throw hierarchyError$1(`The new child is an ancestor of the parent.`);if(e.parent!==n)throw new DOMException(`The node to be replaced is not a child of this node.`,`NotFoundError`);let i=t.type;if(i!==11&&i!==10&&i!==1&&!isCharacterData$1(i))throw hierarchyError$1(`Nodes of this type cannot be inserted.`);if((i===3||i===4)&&r===9||i===10&&r!==9)throw hierarchyError$1(`Nodes of this type cannot be inserted into this parent.`);r===9&&checkDocumentChildConstraints(t,n,null,e);let a=e.next;a===t&&(a=t.next);let o=e.prev;o===t&&(o=t.prev),(t.parent!==null||t.doc!==n.doc)&&adopt(t,n.doc);let s=[];e.parent!==null&&(s=[e],remove(e,!0));let c;if(t.type===11){c=[];for(let e=t.first;e!==null;e=e.next)c.push(e)}else c=[t];return insert(t,n,a,!0),Wi!==0&&queueTreeMutationRecord(n,c,s,o,a),e}function replaceAll(e,t){let n=t.first;if(n===null){e!==null&&insert(e,t,null,!1);return}let r=[];for(let e=n;e!==null;e=e.next)r.push(e);let i=[];if(e!==null){if(e.type===11)for(let t=e.first;t!==null;t=t.next)i.push(t);else i=[e]}let a=suspendChildList(t);for(let e=0;e<r.length;e++)remove(r[e],!0);e!==null&&insert(e,t,null,!0),resumeChildList(t,a),Wi!==0&&(i.length!==0||r.length!==0)&&queueTreeMutationRecord(t,i,r,null,null)}function adopt(e,t){let n=e.doc;if(e.parent!==null&&remove(e,!1),n!==t){t[J]<=n[J]&&(t[J]=n[J]+1);let r=t[xn];for(let n=e;n!==null;n=nextInTree(n,e))if(n.doc=t,n.type===1){n.ns===`http://www.w3.org/1999/xhtml`&&r?n.flags|=2:n.flags&=-3,n.flags&524288&&(t[qt]=!0);let e=n.attrs;if(e!==null)for(let n=0;n<e.length;n++){let r=e[n].attr;r!==null&&(r[z].doc=t)}n.flags&512&&adoptShadowTree(n.node[Sr][z],t)}Xi!==0&&rangesAdopt(e,n),runAdoptingSteps(e,n)}}function runAdoptingSteps(e,t){for(let n=e;n!==null;n=nextInTree(n,e))n.flags&4096&&n.node._adoptingSteps(t),n.flags&512&&runAdoptingSteps(n.node[Sr][z],t)}function adoptShadowTree(e,t){for(let n=e;n!==null;n=nextInTree(n,e))if(n.doc=t,n.type===1){n.ns===`http://www.w3.org/1999/xhtml`&&t[xn]?n.flags|=2:n.flags&=-3,n.flags&524288&&(t[qt]=!0);let e=n.attrs;if(e!==null)for(let n=0;n<e.length;n++){let r=e[n].attr;r!==null&&(r[z].doc=t)}n.flags&512&&adoptShadowTree(n.node[Sr][z],t)}}function appendDetached(e,t){link(e,t,null)}function insertDetached(e,t,n){link(e,t,n)}function cloneNode(e,t,n){let r=cloneTree(e,t,n);return ji&&flushCEReactions(),r}function cloneTree(e,t,n){let r=cloneOne(e,t,n);if(n){for(let n=e.first;n!==null;n=n.next)appendDetached(cloneTree(n,r.type===9?r.node:t,!0),r);r.type===9&&r.first!==null&&connectDetachedChildren(r)}if(e.flags&512){let n=e.node[Sr];if(n[at]){let e=r.node.attachShadow({mode:n[Nn],clonable:!0,serializable:n[yr],delegatesFocus:n[kt],slotAssignment:n[Er]});e[Et]=n[Et];for(let r=n[z].first;r!==null;r=r.next)appendDetached(cloneTree(r,t,!0),e[z])}}return r}function cloneOne(e,t,n){switch(e.type){case 1:{let r=Pi?createCloneElementImpl(t,e):createElementImpl(t,e.name,e.ns,e.prefix),i=e.attrs;if(i!==null){let t=Array(i.length);for(let e=0;e<i.length;e++){let n=i[e];t[e]=new AttrRecord(n.localName,n.value,n.ns,n.prefix)}r.attrs=t,r.id=e.id,r.flags|=e.flags&1024064,e.flags&524288&&(r.doc[qt]=!0)}return e.node._cloningSteps(r.node,n),r}case 3:return t.createTextNode(e.data)[z];case 4:return new e.node.constructor(e.data,t)[z];case 8:return t.createComment(e.data)[z];case 7:return t.createProcessingInstruction(e.name,e.data)[z];case 11:return t.createDocumentFragment()[z];case 10:{let n=e.node;return t.implementation.createDocumentType(n.name,n.publicId,n.systemId)[z]}case 9:return e.node._cloneDocument()[z];case 2:{let n=t.createAttributeNS(e.ns,e.prefix===null?e.name:e.prefix+`:`+e.name);return n.value=e.data,n[z]}}throw new DOMException(`Cannot clone this node.`,`NotSupportedError`)}function isEqualNode(e,t){if(e===t)return!0;if(e.type!==t.type)return!1;switch(e.type){case 10:{let n=e.node,r=t.node;if(n.name!==r.name||n.publicId!==r.publicId||n.systemId!==r.systemId)return!1;break}case 1:{if(e.ns!==t.ns||e.prefix!==t.prefix||e.name!==t.name)return!1;let n=e.attrs??[],r=t.attrs??[];if(n.length!==r.length)return!1;outer:for(let e=0;e<n.length;e++){let t=n[e];for(let e=0;e<r.length;e++){let n=r[e];if(t.ns===n.ns&&t.localName===n.localName){if(t.value!==n.value)return!1;continue outer}}return!1}break}case 2:if(e.ns!==t.ns||e.name!==t.name||e.data!==t.data)return!1;break;case 7:if(e.name!==t.name||e.data!==t.data)return!1;break;case 3:case 4:case 8:if(e.data!==t.data)return!1}if(e.childCount!==t.childCount)return!1;for(let n=e.first,r=t.first;n!==null&&r!==null;n=n.next,r=r.next)if(!isEqualNode(n,r))return!1;return!0}function replaceData(e,t,n,r){let i=e.data,a=i.length;if(t>a)throw new DOMException(`The offset ${t} is greater than the node's length (${a}).`,`IndexSizeError`);t+n>a&&(n=a-t),Wi!==0&&queueCharacterDataMutationRecord(e,i),e.data=t===0&&n===a?r:i.slice(0,t)+r+i.slice(t+n),Xi!==0&&e.flags&1048576&&rangesReplaceData(e,t,n,r.length);let o=e.parent;o!==null&&o.flags&16&&o.node._childrenChangedSteps();let s=e.doc;s[J]++,i.length!==0&&e.data.length!==0&&s[qe]++}function splitText(e,t){let n=e.data.length;if(t>n)throw new DOMException(`The offset ${t} is larger than the Text node's length.`,`IndexSizeError`);let r=n-t,i=e.data.slice(t),a=e.doc.createTextNode(i)[z],o=e.parent;return o!==null&&(insert(a,o,e.next,!1),Xi!==0&&(e.flags|o.flags)&1048576&&rangesSplitText(e,a,t,o)),replaceData(e,t,r,``),a}function quote(e,t){let n=e.length>t?e.slice(0,t)+`…`:e;return JSON.stringify(n)}function ctorName(e){return e.node.constructor?.name??`Node`}function inspectNode(e,t,n,r){switch(e.type){case 1:{let t=e.prefix===null?e.name:e.prefix+`:`+e.name,n=ctorName(e)+` <`+t,r=e.attrs;if(r!==null)for(let e=0;e<r.length;e++)n+=` `+r[e].name+`=`+quote(r[e].value,40);return n+(e.first===null?` />`:`>`)}case 3:return`#text `+quote(e.data,60);case 4:return`#cdata-section `+quote(e.data,60);case 8:return`#comment `+quote(e.data,60);case 7:return`ProcessingInstruction <?`+e.name+` `+e.data.slice(0,60)+`?>`;case 9:return`#document `+quote(e.node.URL??``,80);case 10:return`<!DOCTYPE `+e.name+`>`;case 11:return e.flags&32?`#shadow-root (`+e.node.mode+`)`:`#document-fragment (`+e.childCount+(e.childCount===1?` child)`:` children)`);case 2:return`Attr `+(e.prefix===null?e.name:e.prefix+`:`+e.name)+`=`+quote(e.node.value,40)}return ctorName(e)}var Node=class extends EventTarget{static ELEMENT_NODE=1;static ATTRIBUTE_NODE=2;static TEXT_NODE=3;static CDATA_SECTION_NODE=4;static ENTITY_REFERENCE_NODE=5;static ENTITY_NODE=6;static PROCESSING_INSTRUCTION_NODE=7;static COMMENT_NODE=8;static DOCUMENT_NODE=9;static DOCUMENT_TYPE_NODE=10;static DOCUMENT_FRAGMENT_NODE=11;static NOTATION_NODE=12;static DOCUMENT_POSITION_DISCONNECTED=1;static DOCUMENT_POSITION_PRECEDING=2;static DOCUMENT_POSITION_FOLLOWING=4;static DOCUMENT_POSITION_CONTAINS=8;static DOCUMENT_POSITION_CONTAINED_BY=16;static DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC=32;[z];constructor(e,t){if(t===void 0)throw TypeError(`Illegal constructor`);super(),this[z]=new NodeImpl(this,e,t??this)}get nodeType(){return this[z].type}get nodeName(){let e=this[z];switch(e.type){case 1:return htmlUppercasedQualifiedName(e);case 3:return`#text`;case 8:return`#comment`;case 2:return e.prefix===null?e.name:e.prefix+`:`+e.name;case 4:return`#cdata-section`;case 9:return`#document`;case 11:return`#document-fragment`;default:return e.name}}get baseURI(){return this[z].doc.baseURI}get isConnected(){return!!(this[z].flags&1)}get ownerDocument(){let e=this[z];return e.type===9?null:e.doc}getRootNode(e){let t=treeRoot(this[z]);if(e?.composed)for(;t.flags&32;){let e=t.node[R];t=treeRoot(e[z])}return t.node}get parentNode(){let e=this[z].parent;return e===null?null:e.node}get parentElement(){let e=this[z].parent;return e!==null&&e.type===1?e.node:null}hasChildNodes(){return this[z].first!==null}get childNodes(){return this[et]??=Bi._live(this[z])}get firstChild(){let e=this[z].first;return e===null?null:e.node}get lastChild(){let e=this[z].last;return e===null?null:e.node}get previousSibling(){let e=this[z].prev;return e===null?null:e.node}get nextSibling(){let e=this[z].next;return e===null?null:e.node}get nodeValue(){let e=this[z];switch(e.type){case 2:return attrValue(this);case 3:case 4:case 7:case 8:return e.data;default:return null}}set nodeValue(e){let t=this[z];switch(t.type){case 2:setAttrValue(this,e==null?``:String(e));return;case 3:case 4:case 7:case 8:replaceData(t,0,t.data.length,e==null?``:String(e));return}}get textContent(){let e=this[z];switch(e.type){case 1:case 11:return descendantTextContent(e);case 3:case 4:case 7:case 8:return e.data;case 2:return attrValue(this);default:return null}}set textContent(e){let t=this[z],n=e==null?``:String(e);switch(t.type){case 1:case 11:replaceAll(n===``?null:t.doc.createTextNode(n)[z],t);return;case 3:case 4:case 7:case 8:replaceData(t,0,t.data.length,n);return;case 2:setAttrValue(this,n);return}}normalize(){let e=this[z],t=e.first;for(;t!==null;){if(t.type!==3){t=nextInTree(t,e);continue}let n=t.data.length;if(n===0){let n=nextSkippingSelf(t,e);remove(t,!1),t=n;continue}let r=t.next;if(r===null||r.type!==3){t=nextInTree(t,e);continue}let i=``;for(let e=r;e!==null&&e.type===3;e=e.next)i+=e.data;replaceData(t,n,0,i);let a=r;for(;a!==null&&a.type===3;)Xi!==0&&(a.flags|a.parent.flags)&1048576&&rangesNormalizeMerge(t,a,n),n+=a.data.length,a=a.next;for(;r!==null&&r.type===3;){let e=r.next;remove(r,!1),r=e}t=nextInTree(t,e)}}cloneNode(e=!1){if(this[z].flags&32)throw new DOMException(`Shadow roots cannot be cloned.`,`NotSupportedError`);return cloneNode(this[z],this[z].doc,e).node}isEqualNode(e){return e!==null&&isEqualNode(this[z],e[z])}isSameNode(e){return this===e}compareDocumentPosition(e){if(this===e)return 0;let t=e[z],n=this[z],r=null,i=null;if(t.type===2&&(r=t,t=ownerElementImpl(t)),n.type===2&&(i=n,n=ownerElementImpl(n),r!==null&&t!==null&&n===t))for(let e of n.attrs??[]){if(e.attr?.[z]===r)return 34;if(e.attr?.[z]===i)return 36}return t===null||n===null||treeRoot(t)!==treeRoot(n)?33|(stableOrder(t??r,n??i)?2:4):r===null&&isAncestor(t,n)||i!==null&&t===n?10:i===null&&isAncestor(n,t)||r!==null&&t===n?20:precedes(t,n)?2:4}contains(e){if(e===null)return!1;let t=this[z];for(let n=e[z];n!==null;n=n.parent)if(n===t)return!0;return!1}lookupPrefix(e){if(e==null||e===``)return null;let t=namespaceContextElement(this[z]);return t===null?null:locatePrefix(t,String(e))}lookupNamespaceURI(e){let t=e==null||e===``?null:String(e);return locateNamespace(this[z],t)}isDefaultNamespace(e){let t=e==null||e===``?null:String(e);return locateNamespace(this[z],null)===t}insertBefore(e,t){return preInsert(e[z],this[z],t===null?null:t[z]),e}appendChild(e){return preInsert(e[z],this[z],null),e}replaceChild(e,t){return replace(t[z],e[z],this[z]),t}removeChild(e){return preRemove(e[z],this[z]),e}_getTheParent(e){return nodeGetTheParent(this,e)}[Symbol.for(`nodejs.util.inspect.custom`)](e,t,n){return inspectNode(this[z],e,t,n)}_replaceAll(e){replaceAll(e===null?null:e[z],this[z])}};for(let e of Object.getOwnPropertyNames(Node))/^[A-Z_]+$/.test(e)&&Object.defineProperty(Node.prototype,e,{value:Node[e],enumerable:!0});function nextSkippingSelf(e,t){let n=e;for(;n!==null&&n!==t;){if(n.next!==null)return n.next;n=n.parent}return null}function namespaceContextElement(e){switch(e.type){case 1:return e;case 9:for(let t=e.first;t!==null;t=t.next)if(t.type===1)return t;return null;case 10:case 11:return null;case 2:return ownerElementImpl(e);default:{let t=e.parent;return t!==null&&t.type===1?t:null}}}function locatePrefix(e,t){for(let n=e;n!==null;){if(n.ns===t&&n.prefix!==null)return n.prefix;let e=n.attrs;if(e!==null)for(let n=0;n<e.length;n++){let r=e[n];if(r.prefix===`xmlns`&&r.value===t)return r.localName}let r=n.parent;n=r!==null&&r.type===1?r:null}return null}function locateNamespace(e,t){let n=namespaceContextElement(e);for(;n!==null;){if(t===`xml`)return O;if(t===`xmlns`)return k;if(n.ns!==null&&n.prefix===t)return n.ns;let e=n.attrs;if(e!==null)for(let n=0;n<e.length;n++){let r=e[n];if(r.ns===`http://www.w3.org/2000/xmlns/`&&(r.prefix===`xmlns`&&r.localName===t||t===null&&r.prefix===null&&r.localName===`xmlns`))return r.value===``?null:r.value}let r=n.parent;n=r!==null&&r.type===1?r:null}return null}function ownerElementImpl(e){let t=e.node.ownerElement;return t===null?null:t[z]}function isAncestor(e,t){for(let n=t.parent;n!==null;n=n.parent)if(n===e)return!0;return!1}function precedes(e,t){let n=[];for(let t=e;t!==null;t=t.parent)n.push(t);let r=[];for(let e=t;e!==null;e=e.parent)r.push(e);let i=n.length-1,a=r.length-1;for(;i>0&&a>0&&n[i-1]===r[a-1];)i--,a--;let o=n[i-1],s=r[a-1];for(let e=o.next;e!==null;e=e.next)if(e===s)return!0;return!1}const ma=/* @__PURE__ */ new WeakMap;let ha=0;function stableOrder(e,t){let n=ma.get(e);n===void 0&&ma.set(e,n=ha++);let r=ma.get(t);return r===void 0&&ma.set(t,r=ha++),n<r}function descendantTextContent(e){let t=``;for(let n=e.first;n!==null;n=nextInTree(n,e))(n.type===3||n.type===4)&&(t+=n.data);return t}function attrValue(e){let t=e[rr];return t===null?e[z].data:t.value}function setAttrValue(e,t){let n=e[rr],r=e[Bn];n===null||r===null?e[z].data=t:changeAttribute(r[z],n,t)}const ga=/* @__PURE__ */ new Map;function htmlUppercasedQualifiedName(e){if(e.prefix===null){if(!(e.flags&2))return e.name;let t=ga.get(e.name);return t===void 0&&(ga.size>=1024&&ga.clear(),ga.set(e.name,t=asciiUppercase(e.name))),t}let t=e.prefix+`:`+e.name;return e.flags&2?asciiUppercase(t):t}function asciiUppercase(e){let t=``;for(let n=0;n<e.length;n++)if(e.charCodeAt(n)>=128){for(let n=0;n<e.length;n++){let r=e.charCodeAt(n);t+=r>=97&&r<=122?String.fromCharCode(r-32):e[n]}return t}return e.toUpperCase()}var Token=class{type;value;num;isInt;flag;start;constructor(e,t,n){this.type=e,this.value=t,this.num=0,this.isInt=!1,this.flag=!1,this.start=n}};function isDigit$1(e){return e>=48&&e<=57}__name(isDigit$1,`isDigit`);function isHexDigit$1(e){return e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102}__name(isHexDigit$1,`isHexDigit`);function hexValue$1(e){return e<=57?e-48:e<=70?e-65+10:e-97+10}__name(hexValue$1,`hexValue`);function isIdentStart$1(e){return e>=97&&e<=122||e>=65&&e<=90||e===95||e>=128||e===0}__name(isIdentStart$1,`isIdentStart`);function isIdentChar$1(e){return isIdentStart$1(e)||isDigit$1(e)||e===45}__name(isIdentChar$1,`isIdentChar`);function isNewline$1(e){return e===10||e===13||e===12}__name(isNewline$1,`isNewline`);function isWhitespace$1(e){return e===32||e===9||isNewline$1(e)}__name(isWhitespace$1,`isWhitespace`);function isNonPrintable$1(e){return e>=0&&e<=8||e===11||e>=14&&e<=31||e===127}__name(isNonPrintable$1,`isNonPrintable`);var Tokenizer$1=class{static{__name(this,`Tokenizer`)}src;pos;len;constructor(e){this.src=e,this.pos=0,this.len=e.length}code(e){return e>=this.len?-1:this.src.charCodeAt(e)}validEscape(e){return this.code(e)===92&&!isNewline$1(this.code(e+1))}startsIdent(e){let t=this.code(e);if(t===45){let t=this.code(e+1);return isIdentStart$1(t)||t===45||this.validEscape(e+1)}return isIdentStart$1(t)?!0:this.validEscape(e)}startsNumber(e){let t=this.code(e);if(t===43||t===45){let t=this.code(e+1);return isDigit$1(t)?!0:t===46&&isDigit$1(this.code(e+2))}return isDigit$1(t===46?this.code(e+1):t)}consumeEscape(){let e=this.code(this.pos);if(e===-1)return`�`;if(isHexDigit$1(e)){let e=0,t=0;for(;t<6&&isHexDigit$1(this.code(this.pos));)e=e*16+hexValue$1(this.code(this.pos)),this.pos++,t++;let n=this.code(this.pos);return n===13&&this.code(this.pos+1)===10?this.pos+=2:isWhitespace$1(n)&&this.pos++,e===0||e>=55296&&e<=57343||e>1114111?`�`:String.fromCodePoint(e)}if(this.pos++,e===0)return`�`;if(e>=55296&&e<=56319){let e=this.code(this.pos);if(e>=56320&&e<=57343)return this.pos++,this.src.slice(this.pos-2,this.pos)}return String.fromCharCode(e)}consumeName(){let e=``,t=this.pos,n=t;for(;;){let t=this.code(this.pos);if(t!==-1&&t!==0&&isIdentChar$1(t))this.pos++;else if(this.validEscape(this.pos))e+=this.src.slice(n,this.pos),this.pos++,e+=this.consumeEscape(),n=this.pos;else if(t===0)e+=this.src.slice(n,this.pos)+`�`,this.pos++,n=this.pos;else break}return n===t?this.src.slice(t,this.pos):e+this.src.slice(n,this.pos)}consumeNumber(e){let t=this.pos,n=!0,r=this.code(this.pos);for((r===43||r===45)&&(e.flag=!0,this.pos++);isDigit$1(this.code(this.pos));)this.pos++;if(this.code(this.pos)===46&&isDigit$1(this.code(this.pos+1)))for(n=!1,this.pos+=2;isDigit$1(this.code(this.pos));)this.pos++;if(r=this.code(this.pos),r===69||r===101){let e=this.code(this.pos+1);if(isDigit$1(e))for(n=!1,this.pos+=2;isDigit$1(this.code(this.pos));)this.pos++;else if((e===43||e===45)&&isDigit$1(this.code(this.pos+2)))for(n=!1,this.pos+=3;isDigit$1(this.code(this.pos));)this.pos++}e.num=Number(this.src.slice(t,this.pos)),e.isInt=n}consumeString(e,t){let n=``,r=this.pos;for(;;){let i=this.code(this.pos);if(i===e||i===-1)return n+=this.src.slice(r,this.pos),i!==-1&&this.pos++,new Token(5,n,t);if(isNewline$1(i))return new Token(6,``,t);if(i===92){n+=this.src.slice(r,this.pos);let e=this.code(this.pos+1);e===-1?this.pos++:isNewline$1(e)?this.pos+=e===13&&this.code(this.pos+2)===10?3:2:(this.pos++,n+=this.consumeEscape()),r=this.pos}else i===0?(n+=this.src.slice(r,this.pos)+`�`,this.pos++,r=this.pos):this.pos++}}consumeBadUrl(e){for(;;){let e=this.code(this.pos);if(e===-1)break;if(e===41){this.pos++;break}this.validEscape(this.pos)?(this.pos++,this.consumeEscape()):this.pos++}return new Token(8,``,e)}consumeUrl(e){for(;isWhitespace$1(this.code(this.pos));)this.pos++;let t=``;for(;;){let n=this.code(this.pos);if(n===41||n===-1)return n!==-1&&this.pos++,new Token(7,t,e);if(isWhitespace$1(n)){for(;isWhitespace$1(this.code(this.pos));)this.pos++;let n=this.code(this.pos);return n===41||n===-1?(n!==-1&&this.pos++,new Token(7,t,e)):this.consumeBadUrl(e)}if(n===34||n===39||n===40||isNonPrintable$1(n))return this.consumeBadUrl(e);if(n===92){if(this.validEscape(this.pos))this.pos++,t+=this.consumeEscape();else return this.consumeBadUrl(e)}else t+=n===0?`�`:this.src[this.pos],this.pos++}}consumeIdentLike(e){let t=this.consumeName();if(this.code(this.pos)===40){if(this.pos++,t.length===3&&asciiLower$1(t)===`url`){let n=this.pos;for(;isWhitespace$1(this.code(n))&&isWhitespace$1(this.code(n+1));)n++;let r=this.code(n),i=isWhitespace$1(r)?this.code(n+1):r;return i===34||i===39?(this.pos=n,new Token(2,t,e)):this.consumeUrl(e)}return new Token(2,t,e)}return new Token(1,t,e)}consumeNumeric(e){let t=new Token(10,``,e);return this.consumeNumber(t),this.startsIdent(this.pos)?(t.type=12,t.value=this.consumeName()):this.code(this.pos)===37&&(this.pos++,t.type=11),t}next(){for(;this.code(this.pos)===47&&this.code(this.pos+1)===42;){let e=this.src.indexOf(`*/`,this.pos+2);this.pos=e===-1?this.len:e+2}let e=this.pos,t=this.code(this.pos);if(t===-1)return new Token(0,``,e);if(isWhitespace$1(t)){for(this.pos++;isWhitespace$1(this.code(this.pos));)this.pos++;return new Token(13,` `,e)}switch(t){case 34:case 39:return this.pos++,this.consumeString(t,e);case 35:{let t=this.code(this.pos+1);if(t!==-1&&isIdentChar$1(t)||t===0||this.validEscape(this.pos+1)){this.pos++;let t=new Token(4,``,e);return t.flag=this.startsIdent(this.pos),t.value=this.consumeName(),t}return this.pos++,new Token(9,`#`,e)}case 40:return this.pos++,new Token(21,`(`,e);case 41:return this.pos++,new Token(22,`)`,e);case 43:return this.startsNumber(this.pos)?this.consumeNumeric(e):(this.pos++,new Token(9,`+`,e));case 44:return this.pos++,new Token(18,`,`,e);case 45:return this.startsNumber(this.pos)?this.consumeNumeric(e):this.code(this.pos+1)===45&&this.code(this.pos+2)===62?(this.pos+=3,new Token(15,`-->`,e)):this.startsIdent(this.pos)?this.consumeIdentLike(e):(this.pos++,new Token(9,`-`,e));case 46:return this.startsNumber(this.pos)?this.consumeNumeric(e):(this.pos++,new Token(9,`.`,e));case 58:return this.pos++,new Token(16,`:`,e);case 59:return this.pos++,new Token(17,`;`,e);case 60:return this.code(this.pos+1)===33&&this.code(this.pos+2)===45&&this.code(this.pos+3)===45?(this.pos+=4,new Token(14,`<!--`,e)):(this.pos++,new Token(9,`<`,e));case 64:return this.startsIdent(this.pos+1)?(this.pos++,new Token(3,this.consumeName(),e)):(this.pos++,new Token(9,`@`,e));case 91:return this.pos++,new Token(19,`[`,e);case 92:return this.validEscape(this.pos)?this.consumeIdentLike(e):(this.pos++,new Token(9,`\\`,e));case 93:return this.pos++,new Token(20,`]`,e);case 123:return this.pos++,new Token(23,`{`,e);case 125:return this.pos++,new Token(24,`}`,e)}if(isDigit$1(t))return this.consumeNumeric(e);if(isIdentStart$1(t)||t===0)return this.consumeIdentLike(e);if(this.pos++,t>=55296&&t<=56319){let t=this.code(this.pos);if(t>=56320&&t<=57343)return this.pos++,new Token(9,this.src.slice(this.pos-2,this.pos),e)}return new Token(9,this.src[e],e)}};function tokenize$1(e){let t=new Tokenizer$1(e),n=[];for(;;){let e=t.next();if(n.push(e),e.type===0)break}return n}__name(tokenize$1,`tokenize`);function asciiLower$1(e){for(let t=0;t<e.length;t++){let n=e.charCodeAt(t);if(n>=65&&n<=90)return e.toLowerCase()}return e}__name(asciiLower$1,`asciiLower`);var Simple=class{kind;name;nsKind;nsPrefix;op;value;caseFlag;pseudo;a;b;list;args;constructor(e,t){this.kind=e,this.name=t,this.nsKind=0,this.nsPrefix=``,this.op=0,this.value=``,this.caseFlag=0,this.pseudo=0,this.a=0,this.b=0,this.list=null,this.args=[]}},Compound=class{simples;pseudoElementIndex;constructor(){this.simples=[],this.pseudoElementIndex=-1}},Complex=class{compounds;combinators;leading;text;invalid;constructor(){this.compounds=[],this.combinators=[],this.leading=0,this.text=``,this.invalid=!1}},SelectorList=class{items;constructor(){this.items=[]}};function allowedAfterPseudoElement(e,t){return e===3?!isStructural(t):e===2?!1:t===37||t===38||t===39||t===41||t===40||t===1||t===2||t===3}function pseudoClassId(e){switch(e){case`first-child`:return 20;case`last-child`:return 21;case`only-child`:return 22;case`first-of-type`:return 23;case`last-of-type`:return 24;case`only-of-type`:return 25;case`empty`:return 26;case`root`:return 27;case`scope`:return 28;case`host`:return 29;case`link`:return 30;case`any-link`:return 31;case`visited`:return 32;case`target`:return 34;case`target-within`:return 35;case`defined`:return 36;case`hover`:return 37;case`active`:return 38;case`focus`:return 39;case`focus-within`:return 40;case`focus-visible`:return 41;case`checked`:return 50;case`indeterminate`:return 51;case`default`:return 52;case`disabled`:return 53;case`enabled`:return 54;case`required`:return 55;case`optional`:return 56;case`read-only`:return 57;case`read-write`:return 58;case`placeholder-shown`:return 59;case`valid`:return 60;case`invalid`:return 61;case`in-range`:return 62;case`out-of-range`:return 63;case`user-valid`:return 64;case`user-invalid`:return 65;case`autofill`:return 66;case`-webkit-autofill`:return 66;case`open`:return 70;case`popover-open`:return 72;case`modal`:return 73;case`fullscreen`:return 74;case`picture-in-picture`:return 75;case`playing`:return 76;case`paused`:return 77;case`muted`:return 78;case`seeking`:return 79;case`buffering`:return 80;case`stalled`:return 81;case`volume-locked`:return 82;case`current`:return 83;case`past`:return 84;case`future`:return 85;case`has-slotted`:return 86;case`target-current`:return 87;case`heading`:return 88}return 0}function functionalPseudoClassId(e){switch(e){case`is`:return 1;case`matches`:return 1;case`-webkit-any`:return 1;case`where`:return 2;case`not`:return 3;case`has`:return 4;case`nth-child`:return 5;case`nth-last-child`:return 6;case`nth-of-type`:return 7;case`nth-last-of-type`:return 8;case`host`:return 9;case`host-context`:return 10;case`lang`:return 11;case`dir`:return 12;case`state`:return 13;case`current`:return 83;case`heading`:return 88}return 0}function isStructural(e){return e>=20&&e<=25||e===26||e===27||e===4||e>=5&&e<=8}function isKnownPseudoElement(e){switch(e){case`before`:case`after`:case`first-line`:case`first-letter`:case`marker`:case`placeholder`:case`selection`:case`backdrop`:case`file-selector-button`:case`target-text`:case`spelling-error`:case`grammar-error`:case`cue`:case`cue-region`:case`details-content`:case`checkmark`:case`picker-icon`:case`scroll-marker`:case`scroll-marker-group`:case`column`:case`view-transition`:return!0}return e.startsWith(`-webkit-`)||e.startsWith(`-moz-`)}function isKnownFunctionalPseudoElement(e){switch(e){case`slotted`:return 2;case`part`:return 3;case`highlight`:case`picker`:case`scroll-button`:case`cue`:case`cue-region`:case`view-transition-group`:case`view-transition-image-pair`:case`view-transition-old`:case`view-transition-new`:return 4}return 0}function isLegacyPseudoElement(e){return e===`before`||e===`after`||e===`first-line`||e===`first-letter`}var SelectorParser=class{src;toks;i;error;constructor(e){this.src=e,this.toks=tokenize$1(e),this.i=0,this.error=``}fail(e){this.error===``&&(this.error=e)}peek(){return this.toks[this.i]}peekType(){return this.toks[this.i].type}isDelim(e){let t=this.toks[this.i];return t.type===9&&t.value===e}isDelimAt(e,t){let n=this.toks[e];return n.type===9&&n.value===t}skipWs(){for(;this.toks[this.i].type===13;)this.i++}expectClose(e){let t=this.toks[this.i].type;return t===e?(this.i++,!0):t===0||(this.fail(`expected closing bracket`),!1)}parseSelectorList(){let e=this.parseComplexList(0,!1);return e===null?null:this.peekType()===0?e:(this.fail(`unexpected token`),null)}parseRelativeSelectorList(){let e=this.parseComplexList(3,!0);return e===null?null:this.peekType()===0?e:(this.fail(`unexpected token`),null)}parseComplexList(e,t){let n=new SelectorList;for(;;){this.skipWs();let r=this.parseComplex(e,t);if(r===null)return null;if(n.items.push(r),this.skipWs(),this.peekType()===18)this.i++;else break}return n}parseForgivingList(e){let t=new SelectorList;for(;;){this.skipWs();let n=this.peekType();if(n===22||n===0){if(t.items.length!==0){let e=new Complex;e.invalid=!0,t.items.push(e)}break}let r=this.i,i=this.error,a=this.parseComplex(e,!1);this.skipWs();let o=this.peekType();if(a!==null&&(o===18||o===22||o===0))t.items.push(a);else{if(this.error=i,this.i=r,!this.skipToTopLevelCommaOrClose())return this.fail(`unterminated block in forgiving selector list`),t;let e=new Complex;e.invalid=!0,e.text=trimWs(this.src.slice(this.toks[r].start,this.peek().start)),t.items.push(e)}if(this.peekType()===18)this.i++;else break}return t}skipToTopLevelCommaOrClose(){let e=[];for(;;){let t=this.peekType();if(t===0)return e.length===0;if(e.length===0&&(t===18||t===22))return!0;t===2||t===21?e.push(22):t===19?e.push(20):t===23?e.push(24):e.length!==0&&t===e[e.length-1]&&e.pop(),this.i++}}parseCombinator(){let e=!1;for(;this.peekType()===13;)this.i++,e=!0;let t=this.peek();if(t.type===9){if(t.value===`>`)return this.i++,this.skipWs(),2;if(t.value===`+`)return this.i++,this.skipWs(),3;if(t.value===`~`)return this.i++,this.skipWs(),4}return+!!e}parseComplex(e,t){let n=new Complex,r=this.peek().start;if(t){let e=this.parseCombinator();n.leading=e===0?1:e}for(;;){let t=this.parseCompound(e);if(t===null)return null;n.compounds.push(t);let r=this.i,i=this.parseCombinator(),a=this.peekType();if(i===0||a===18||a===22||a===0){if(i!==0&&i!==1)return this.fail(`dangling combinator`),null;this.i=r;break}if(t.pseudoElementIndex!==-1)return this.fail(`combinator after pseudo-element`),null;if(e&12)return this.fail(`expected a compound selector`),null;n.combinators.push(i)}let i=this.peek().start;return n.text=trimWs(this.src.slice(r,i)),n}parseTypeSelector(e){let t=this.peek(),n=0,r=``;if(t.type===9&&t.value===`|`){let e=this.toks[this.i+1];if(e.type===1||e.type===9&&e.value===`*`)n=2,this.i++;else return!1}else if((t.type===1||t.type===9&&t.value===`*`)&&this.isDelimAt(this.i+1,`|`)){let e=this.toks[this.i+2];(e.type===1||e.type===9&&e.value===`*`)&&(t.type===1?(n=3,r=t.value):n=1,this.i+=2)}let i=this.peek();if(i.type===1){let t=new Simple(1,i.value);return t.nsKind=n,t.nsPrefix=r,e.simples.push(t),this.i++,!0}if(i.type===9&&i.value===`*`){let t=new Simple(2,`*`);return t.nsKind=n,t.nsPrefix=r,e.simples.push(t),this.i++,!0}return n!==0&&this.fail(`expected a type selector after namespace prefix`),!1}parseCompound(e){let t=new Compound,n=!!(e&8);if(n||this.parseTypeSelector(t),this.error!==``)return null;for(;;){let r=this.peek(),i=t.pseudoElementIndex!==-1;if(n&&r.type!==16)break;if(r.type===4){if(i)break;if(!r.flag)return this.fail(`invalid id selector`),null;t.simples.push(new Simple(3,r.value)),this.i++}else if(r.type===9&&r.value===`.`){if(i)break;let e=this.toks[this.i+1];if(e.type!==1)return this.fail(`invalid class selector`),null;t.simples.push(new Simple(4,e.value)),this.i+=2}else if(r.type===19){if(i)break;this.i++;let e=this.parseAttribute();if(e===null)return null;t.simples.push(e)}else if(r.type===16){if(this.toks[this.i+1].type===16){if(this.i+=2,e&2)return this.fail(`pseudo-element not allowed here`),null;let n=this.parsePseudoElement(e);if(n===null)return null;if(t.pseudoElementIndex===-1)t.pseudoElementIndex=t.simples.length;else if(!this.chainablePseudoElement(t,n))return this.fail(`invalid pseudo-element chain`),null;t.simples.push(n)}else{this.i++;let n=this.parsePseudoClass(i?e|8:e);if(n===null)return null;if(n.kind===7){if(e&2||i)return this.fail(`pseudo-element not allowed here`),null;t.pseudoElementIndex=t.simples.length}else if(i&&!allowedAfterPseudoElement(this.lastPseudoElement(t),n.pseudo))return this.fail(`pseudo-class not allowed after pseudo-element`),null;t.simples.push(n)}}else break}return t.simples.length===0?(this.fail(`expected a selector`),null):t}lastPseudoElement(e){for(let t=e.simples.length-1;t>=0;t--){let n=e.simples[t];if(n.kind===7)return n.pseudo}return 0}chainablePseudoElement(e,t){let n=null;for(let t=e.simples.length-1;t>=0;t--){let r=e.simples[t];if(r.kind===7){n=r;break}}return n===null?!0:n.pseudo===3||n.pseudo===2?t.pseudo===1||t.pseudo===4:!1}parseAttribute(){this.skipWs();let e=new Simple(5,``),t=this.peek();t.type===9&&t.value===`|`&&this.toks[this.i+1].type===1?(e.nsKind=2,this.i++):t.type===9&&t.value===`*`&&this.isDelimAt(this.i+1,`|`)&&this.toks[this.i+2].type===1?(e.nsKind=1,this.i+=2):t.type===1&&this.isDelimAt(this.i+1,`|`)&&this.toks[this.i+2].type===1&&(e.nsKind=3,e.nsPrefix=t.value,this.i+=2);let n=this.peek();if(n.type!==1)return this.fail(`expected attribute name`),null;e.name=n.value,this.i++,this.skipWs();let r=this.peek();if(r.type===20||r.type===0)return r.type===20&&this.i++,e;if(r.type!==9)return this.fail(`expected attribute matcher`),null;let i=-1;if(r.value===`=`)i=1,this.i++;else if(this.isDelimAt(this.i+1,`=`)){switch(r.value){case`~`:i=2;break;case`|`:i=3;break;case`^`:i=4;break;case`$`:i=5;break;case`*`:i=6}i!==-1&&(this.i+=2)}if(i===-1)return this.fail(`invalid attribute matcher`),null;e.op=i,this.skipWs();let a=this.peek();if(a.type!==1&&a.type!==5)return this.fail(`expected attribute value`),null;e.value=a.value,this.i++,this.skipWs();let o=this.peek();if(o.type===1){let t=asciiLower$1(o.value);if(t===`i`)e.caseFlag=1;else if(t===`s`)e.caseFlag=2;else return this.fail(`invalid attribute modifier`),null;this.i++,this.skipWs()}return this.expectClose(20)?e:null}parsePseudoClass(e){let t=this.peek();if(t.type===1){let e=asciiLower$1(t.value);this.i++;let n=pseudoClassId(e);if(n!==0){let t=new Simple(6,e);return t.pseudo=n,t}if(isLegacyPseudoElement(e)){let t=new Simple(7,e);return t.pseudo=1,t}return this.fail(`unknown pseudo-class :`+e),null}if(t.type===2){let n=asciiLower$1(t.value);this.i++;let r=functionalPseudoClassId(n);if(r===0)return this.fail(`unknown pseudo-class :`+n+`()`),null;let i=new Simple(6,n);return i.pseudo=r,this.parsePseudoClassArgs(i,e)?i:null}return this.fail(`expected pseudo-class name`),null}parsePseudoClassArgs(e,t){let n=e.pseudo;if(n===1||n===2)return e.list=this.parseForgivingList(t|2),this.error===``&&this.expectClose(22);if(n===3){if(this.skipWs(),this.peekType()===22)return this.fail(`:not() requires an argument`),!1;let n=this.parseComplexList(t|2,!1);return n!==null&&(e.list=n,this.skipWs(),this.expectClose(22))}if(n===4){if(t&1)return this.fail(`:has() cannot be nested`),!1;if(this.skipWs(),this.peekType()===22)return this.fail(`:has() requires an argument`),!1;let n=this.parseComplexList(t|3,!0);return n!==null&&(e.list=n,this.skipWs(),this.expectClose(22))}if(n===5||n===6||n===7||n===8){if(this.skipWs(),!this.parseAnPlusB(e))return!1;this.clampAnb(e),this.skipWs();let r=this.peek();if((n===5||n===6)&&r.type===1&&asciiLower$1(r.value)===`of`){if(this.i++,this.peekType()!==13)return this.fail(`expected whitespace after 'of'`),!1;this.skipWs();let n=this.parseComplexList(t|2,!1);if(n===null)return!1;e.list=n,this.skipWs()}return this.expectClose(22)}if(n===9||n===10){this.skipWs();let n=this.parseComplexList(t|6,!1);return n===null?!1:n.items.length===1?(e.list=n,this.skipWs(),this.expectClose(22)):(this.fail(`expected a single compound selector`),!1)}if(n===11){for(;;){this.skipWs();let t=this.peek();if(t.type===1||t.type===5)e.args.push(t.value),this.i++;else return this.fail(`expected language range`),!1;if(this.skipWs(),this.peekType()===18)this.i++;else break}return this.expectClose(22)}if(n===12||n===13){this.skipWs();let t=this.peek();return t.type===1?(e.args.push(n===12?asciiLower$1(t.value):t.value),this.i++,this.skipWs(),this.expectClose(22)):(this.fail(`expected identifier`),!1)}if(n===88){for(;;){this.skipWs();let t=this.peek();if(t.type!==10||!t.isInt)return this.fail(`expected heading level`),!1;if(e.args.push(String(t.num)),this.i++,this.skipWs(),this.peekType()===18)this.i++;else break}return this.expectClose(22)}return n===83?(e.list=this.parseForgivingList(t|2),this.expectClose(22)):(this.fail(`unsupported functional pseudo-class`),!1)}parsePseudoElement(e){let t=this.peek();if(t.type===1){let e=asciiLower$1(t.value);if(this.i++,!isKnownPseudoElement(e))return this.fail(`unknown pseudo-element ::`+e),null;let n=new Simple(7,e);return n.pseudo=1,n}if(t.type===2){let n=asciiLower$1(t.value);this.i++;let r=isKnownFunctionalPseudoElement(n);if(r===0)return this.fail(`unknown pseudo-element ::`+n+`()`),null;let i=new Simple(7,n);if(i.pseudo=r,this.skipWs(),r===2){let t=this.parseComplexList(e|6,!1);if(t===null)return null;if(t.items.length!==1)return this.fail(`expected a single compound selector`),null;i.list=t}else{for(;this.peekType()===1;)i.args.push(this.peek().value),this.i++,this.skipWs();if(r===3&&i.args.length===0)return this.fail(`::part() requires an identifier`),null;if(this.peekType()!==22&&this.peekType()!==0){if(r===3)return this.fail(`invalid ::part() argument`),null;this.skipToTopLevelCommaOrClose()}}return this.skipWs(),this.expectClose(22)?i:null}return this.fail(`expected pseudo-element name`),null}parseAnPlusB(e){let t=this.peek();if(t.type===1){let n=asciiLower$1(t.value);if(n===`odd`)return e.a=2,e.b=1,this.i++,!0;if(n===`even`)return e.a=2,e.b=0,this.i++,!0}if(t.type===10)return t.isInt?(e.a=0,e.b=t.num,this.i++,!0):this.anbFail();let n=0,r=``;if(t.type===12){if(!t.isInt)return this.anbFail();let e=asciiLower$1(t.value);if(e.charCodeAt(0)!==110)return this.anbFail();n=t.num,r=e.slice(1),this.i++}else if(t.type===1){let e=asciiLower$1(t.value);if(e.charCodeAt(0)===110)n=1,r=e.slice(1);else if(e.charCodeAt(0)===45&&e.charCodeAt(1)===110)n=-1,r=e.slice(2);else return this.anbFail();this.i++}else if(t.type===9&&t.value===`+`){let e=this.toks[this.i+1];if(e.type!==1)return this.anbFail();let t=asciiLower$1(e.value);if(t.charCodeAt(0)!==110)return this.anbFail();n=1,r=t.slice(1),this.i+=2}else return this.anbFail();if(e.a=n,r===``){let t=this.i;this.skipWs();let n=this.peek();if(n.type===10&&n.isInt&&n.flag)return e.b=n.num,this.i++,!0;if(n.type===9&&(n.value===`+`||n.value===`-`)){this.i++,this.skipWs();let t=this.peek();return t.type===10&&t.isInt&&!t.flag?(e.b=n.value===`-`?-t.num:t.num,this.i++,!0):this.anbFail()}return this.i=t,e.b=0,!0}if(r===`-`){this.skipWs();let t=this.peek();return t.type===10&&t.isInt&&!t.flag?(e.b=-t.num,this.i++,!0):this.anbFail()}if(r.charCodeAt(0)===45&&r.length>1){let t=0;for(let e=1;e<r.length;e++){let n=r.charCodeAt(e);if(!isDigit$1(n))return this.anbFail();t=t*10+(n-48)}return e.b=-t,!0}return this.anbFail()}clampAnb(e){e.a>2147483647?e.a=2147483647:e.a<-2147483648&&(e.a=-2147483648),e.b>2147483647?e.b=2147483647:e.b<-2147483648&&(e.b=-2147483648)}anbFail(){return this.fail(`invalid An+B`),!1}};function trimWs(e){let t=0,n=e.length;for(;t<n&&isWhitespace$1(e.charCodeAt(t));)t++;for(;n>t&&isWhitespace$1(e.charCodeAt(n-1));)n--;return t===0&&n===e.length?e:e.slice(t,n)}function wrapperProp(e,t){return e.node[t]}const _a={hovered:null,active:null};function shadowHost(e){let t=wrapperProp(e,R);return t==null?null:t[z]}function parentOrHost$1(e){let t=e.parent;return t===null?null:t.flags&32?shadowHost(t):t}__name(parentOrHost$1,`parentOrHost`);function isShadowIncludingInclusiveAncestor$3(e,t){for(;t!==null;t=parentOrHost$1(t))if(t===e)return!0;return!1}__name(isShadowIncludingInclusiveAncestor$3,`isShadowIncludingInclusiveAncestor`);function hover(e){let t=_a.hovered;return t!==null&&isShadowIncludingInclusiveAncestor$3(e,t)}function active(e){let t=_a.active;return t!==null&&isShadowIncludingInclusiveAncestor$3(e,t)}function anyLink(e){return e.tag===Z.a||e.tag===Z.area?attr(e,`href`)!==null:e.ns===`http://www.w3.org/2000/svg`&&e.name===`a`&&e.attrs!==null&&(attr(e,`href`)!==null||findAttributeByNamespace(e,`http://www.w3.org/1999/xlink`,`href`)!==null)}function never(e){return!1}function targetElement(e){let t=e.doc[q],n=t.indexOf(`#`);if(n===-1||n===t.length-1)return null;let r=t.slice(n+1);try{r=decodeURIComponent(r)}catch{}let i=e.doc,a=i._idLookup(r);if(a!==null)return a;let o=i[z];for(let e=o.first;e!==null;e=nextInTree(e,o))if(e.type===1&&e.tag===Z.a&&attr(e,`name`)===r)return e;return null}function target(e){return e.doc[q].indexOf(`#`)!==-1&&targetElement(e)===e}function targetWithin(e){if(e.doc[q].indexOf(`#`)===-1)return!1;let t=targetElement(e);return t!==null&&isShadowIncludingInclusiveAncestor$3(e,t)}function inputTypeName(e){let t=attr(e,`type`);if(t===null)return`text`;let n=asciiLowercase$1(t);switch(n){case`hidden`:case`text`:case`search`:case`tel`:case`url`:case`email`:case`password`:case`date`:case`month`:case`week`:case`time`:case`datetime-local`:case`number`:case`range`:case`color`:case`checkbox`:case`radio`:case`file`:case`submit`:case`image`:case`reset`:case`button`:return n}return`text`}function isHTML(e){return e.tag!==0}function controlValue$1(e){let t=wrapperProp(e,`value`);if(typeof t==`string`)return t;if(e.tag===Z.textarea){let t=``;for(let n=e.first;n!==null;n=n.next)n.type===3&&(t+=n.data);return t}return attr(e,`value`)??``}__name(controlValue$1,`controlValue`);function open(e){return(e.tag===Z.details||e.tag===Z.dialog)&&attr(e,`open`)!==null}function isMedia(e){return e.tag===Z.audio||e.tag===Z.video}function paused(e){return isMedia(e)&&wrapperProp(e,`paused`)!==!1}function playing(e){return isMedia(e)&&wrapperProp(e,`paused`)===!1}function muted(e){if(!isMedia(e))return!1;let t=wrapperProp(e,`muted`);return typeof t==`boolean`?t:attr(e,`muted`)!==null}function customState(e,t){let n=va.of(e);return n!==null&&n.has(t)}const va={of:e=>null};function elementLanguage(e){for(let t=e;t!==null;t=parentOrHost$1(t)){if(t.type!==1)continue;let e=t.attrs;if(e===null)continue;let n=null;for(let r=0;r<e.length;r++){let i=e[r];if(i.ns===`http://www.w3.org/XML/1998/namespace`&&i.localName===`lang`)return i.value;(i.ns===null&&i.localName===`lang`&&t.flags&2||i.ns===null&&i.localName===`lang`&&t.tag!==0)&&(n=i.value)}if(n!==null)return n}return null}function extendedFilter(e,t){if(e===``)return t===``;if(t===``)return!1;let n=asciiLowercase$1(e).split(`-`),r=asciiLowercase$1(t).split(`-`);for(let e=0;e<r.length;e++)if(r[e].length>8||r[e].length===0)return!1;if(n[0]!==`*`&&n[0]!==r[0])return!1;let i=1,a=1;for(;i<n.length;)if(n[i]===`*`)i++;else{if(a>=r.length)return!1;if(n[i]===r[a])i++,a++;else{if(r[a].length===1)return!1;a++}}return!0}function matchesLang(e,t){let n=elementLanguage(e);if(n===null)return!1;for(let e=0;e<t.length;e++)if(extendedFilter(t[e],n))return!0;return!1}function strongDirection(e){return e>=65&&e<=90||e>=97&&e<=122?1:e<192?0:e>=1424&&e<=2303||e>=64285&&e<=65023||e>=65136&&e<=65278||e>=67584&&e<=69631||e>=124928&&e<=126975?2:e===215||e===247||e>=8192&&e<=11263||e>=12288&&e<=12351||e>=65024&&e<=65135?0:1}function textDirection(e){for(let t=0;t<e.length;t++){let n=e.codePointAt(t);n>65535&&t++;let r=strongDirection(n);if(r!==0)return r}return 0}function hasValidDir(e){let t=attr(e,`dir`);if(t===null)return!1;let n=asciiLowercase$1(t);return n===`ltr`||n===`rtl`||n===`auto`}function autoDirectionality(e){if(e.tag===Z.textarea||e.tag===Z.input&&usesValueForDirectionality(inputTypeName(e))){let t=textDirection(controlValue$1(e));return t===0?1:t}if(e.tag===Z.input)return 0;for(let t=e.first;t!==null;){if(t.type===1){if(t.tag===Z.bdi||t.tag===Z.script||t.tag===Z.style||t.tag===Z.textarea||hasValidDir(t)){t=nextSkippingChildren(t,e);continue}}else if(t.type===3){let e=textDirection(t.data);if(e!==0)return e}t=nextInTree(t,e)}return 0}function directionality(e){for(let t=e;t!==null&&t.type===1;){let e=isHTML(t)?attr(t,`dir`):null,n=e===null?null:asciiLowercase$1(e);if(n!==null&&n!==`ltr`&&n!==`rtl`&&n!==`auto`&&(n=t.tag===Z.bdi?`auto`:null),n!==null){let e=n;if(e===`ltr`)return 1;if(e===`rtl`)return 2;if(e===`auto`){let e=autoDirectionality(t);if(e!==0)return e;if(t.tag===Z.input||t.tag===Z.textarea)return 1}}else if(t.tag===Z.bdi){let e=autoDirectionality(t);return e===0?1:e}else if(t.tag===Z.input&&inputTypeName(t)===`tel`)return 1;let r=parentOrHost$1(t);if(r===null||r.type===9)break;t=r}return 1}function usesValueForDirectionality(e){switch(e){case`hidden`:case`text`:case`search`:case`tel`:case`url`:case`email`:case`password`:case`submit`:case`reset`:case`button`:return!0}return!1}const ya={hover,active,focus:never,"focus-within":never,"focus-visible":never,link:anyLink,"any-link":anyLink,visited:never,target,"target-within":targetWithin,defined:never,checked:never,indeterminate:never,default:never,disabled:never,enabled:never,required:never,optional:never,"read-only":never,"read-write":never,"placeholder-shown":never,valid:never,invalid:never,"in-range":never,"out-of-range":never,"user-valid":never,"user-invalid":never,autofill:never,"-webkit-autofill":never,open,"popover-open":never,modal:never,fullscreen:never,"picture-in-picture":never,playing,paused,muted,seeking:never,buffering:never,stalled:never,"volume-locked":never,current:never,past:never,future:never,"has-slotted":never,"target-current":never};function hash(e,t){let n=2166136261^t;for(let t=0;t<e.length;t++)n=Math.imul(n^e.charCodeAt(t),16777619);return(n^n>>>16)&4095}function tagHash(e){return hash(e,625341585)}function idHash(e){return hash(e,1821285621)}function classHash(e){return hash(e,461845907)}const ba=[];function elementTagHash(e){if(e.tag!==0&&e.flags&2){let t=ba[e.tag];return t===void 0?ba[e.tag]=tagHash(e.name):t}return tagHash(asciiLowercase$1(e.name))}let xa=/* @__PURE__ */ new Int32Array,Sa=0;const Ca=[];function buildAncestorFilter(e){(++Sa===2147483647||xa.length===0)&&(xa.length===0?xa=/* @__PURE__ */ new Int32Array(4096):xa.fill(0),Sa=1);let t=Sa,n=0;for(let r=e.parent;r!==null&&r.type===1;r=r.parent){let e=elementTagHash(r);if(xa[e]=t,Ca[n++]=e,r.id!==``){let e=idHash(r.id);xa[e]=t,Ca[n++]=e}if(r.attrs!==null){let e=classTokens(r);for(let r=0;r<e.length;r++){let i=classHash(e[r]);xa[i]=t,Ca[n++]=i}}}return Ca.length=n,Ca}function mayMatchAncestors(e,t,n,r){let i=Sa;return e<0?!0:xa[e]===i?t<0?!0:xa[t]===i?n<0?!0:xa[n]===i?r<0||xa[r]===i:!1:!1:!1}const wa=/* @__PURE__ */ new Set(/* @__PURE__ */ `accept.accept-charset.align.alink.axis.bgcolor.charset.checked.clear.codetype.color.compact.declare.defer.dir.direction.disabled.enctype.face.frame.hreflang.http-equiv.lang.language.link.media.method.multiple.nohref.noresize.noshade.nowrap.readonly.rel.rev.rules.scope.scrolling.selected.shape.target.text.type.valign.valuetype.vlink`.split(`.`)),Ta=/* @__PURE__ */ new Set([30,31,32,53,54,55,56,57,58,52,70]);var Test=class{op;name;lower;nsCheck;ns;attrOp;value;valueLower;valueCase;a;b;list;fn;args;memoEl;memoIdx;memoVersion;memoParent;memoCount;memoCountVersion;volatileTest;constructor(e){this.op=e,this.name=``,this.lower=``,this.nsCheck=!1,this.ns=null,this.attrOp=0,this.value=``,this.valueLower=``,this.valueCase=0,this.a=0,this.b=0,this.list=null,this.fn=null,this.args=Ea,this.memoEl=null,this.memoIdx=0,this.memoVersion=-1,this.memoParent=null,this.memoCount=0,this.memoCountVersion=-1,this.volatileTest=!1}};const Ea=[];var CComplex=class{comps;combs;last;leading;hasDomain;pseudoElement;specificity;text;fn;constructor(){this.comps=[],this.combs=[],this.last=0,this.leading=0,this.hasDomain=0,this.pseudoElement=``,this.specificity=0,this.text=``,this.fn=e=>{let t=complexFn(this,0);return this.fn=t,t(e)}}},CList=class{items;fn;constructor(){this.items=[],this.fn=e=>{let t=listFn(this);return this.fn=t,t(e)}}},CompileInfo=class{volatile;usesScope;nthTests;resolve;defaultNs;error;forgivingDropped;constructor(){this.volatile=!1,this.usesScope=!1,this.nthTests=[],this.resolve=null,this.defaultNs=void 0,this.error=``,this.forgivingDropped=!1}};function unpackSpecificity(e){return[Math.floor(e/1048576),Math.floor(e/1024)%1024,e%1024]}function listSpecificity(e){if(e===null)return 0;let t=0;for(let n=0;n<e.items.length;n++){if(e.items[n].invalid)continue;let r=complexSpecificity(e.items[n]);r>t&&(t=r)}return t}function complexSpecificity(e){let t=0;for(let n=0;n<e.compounds.length;n++)t+=compoundSpecificity(e.compounds[n]);return t}const Da=1024;function compoundSpecificity(e){let t=0;for(let n=0;n<e.simples.length;n++){let r=e.simples[n];switch(r.kind){case 3:t+=1048576;break;case 4:case 5:t+=Da;break;case 1:t+=1;break;case 2:break;case 7:t+=1+listSpecificity(r.list);break;case 6:switch(r.pseudo){case 2:break;case 1:case 3:case 4:case 83:t+=listSpecificity(r.list);break;case 5:case 6:case 9:case 10:t+=Da+listSpecificity(r.list);break;default:t+=Da}}}return t}function fail(e,t){e.error===``&&(e.error=t)}function resolvePrefix(e,t){return e.resolve===null?void 0:e.resolve(t)}function compileList(e,t){let n=new CList;for(let r=0;r<e.items.length;r++){let i=e.items[r];i.invalid||n.items.push(compileComplex(i,t))}return n}function compileForgivingList(e,t){let n=new CList;for(let r=0;r<e.items.length;r++){let i=e.items[r];if(i.invalid){t.forgivingDropped=!0;continue}let a=t.error,o=compileComplex(i,t);t.error===a?n.items.push(o):(t.error=a,t.forgivingDropped=!0)}return n}function compileComplex(e,t){let n=new CComplex,r=e.compounds.length;for(let i=r-1;i>=0;i--){let a=e.compounds[i];n.comps.push(compileCompound(a,t,n,i===r-1)),i>0&&n.combs.push(e.combinators[i-1])}return n.last=r-1,n.leading=e.leading,n.specificity=complexSpecificity(e),n.text=e.text,e.leading!==0&&(n.hasDomain=hasDomain(e)),n}function hasDomain(e){let t=!1;for(let n=0;n<e.combinators.length;n++){let r=e.combinators[n];(r===2||r===1)&&(t=!0)}switch(e.leading){case 2:return t?1:2;case 1:return 1;case 3:return t?5:e.combinators.length===0?3:4;default:return t?5:4}}function compileCompound(e,t,n,r){let i=[],a=e.pseudoElementIndex===-1?e.simples.length:e.pseudoElementIndex;for(let o=0;o<e.simples.length;o++){let s=e.simples[o];if(o>=a&&s.kind===7){r&&(n.pseudoElement=n.pseudoElement===``?s.name:n.pseudoElement+`::`+s.name);continue}let c=compileSimple(s,t);c!==null&&i.push(c)}if(t.defaultNs!==void 0&&needsImpliedNamespace(e,a)){let e=new Test(1);e.nsCheck=!0,e.ns=t.defaultNs,i.push(e)}return i}function needsImpliedNamespace(e,t){let n=t>0;for(let r=0;r<t;r++){let t=e.simples[r];if(t.kind===1||t.kind===2)return!1;(t.kind!==6||t.pseudo!==29&&t.pseudo!==9&&t.pseudo!==10)&&(n=!1)}return!n}function compileSimple(e,t){switch(e.kind){case 2:case 1:{let n=!1,r=null;switch(e.nsKind){case 0:t.defaultNs!==void 0&&(n=!0,r=t.defaultNs);break;case 1:break;case 2:n=!0,r=null;break;case 3:{let i=resolvePrefix(t,e.nsPrefix);if(i===void 0)return fail(t,`undeclared namespace prefix `+e.nsPrefix),new Test(0);n=!0,r=i;break}}if(e.kind===2){if(!n)return null;let e=new Test(1);return e.nsCheck=!0,e.ns=r,e}let i=new Test(2);return i.name=e.name,i.lower=asciiLowercase$1(e.name),i.a=tagId(i.lower),i.nsCheck=n,i.ns=r,i}case 3:{let t=new Test(3);return t.name=e.name,t.lower=asciiLowercase$1(e.name),t}case 4:{let t=new Test(4);return t.name=e.name,t.lower=asciiLowercase$1(e.name),t}case 5:return compileAttribute(e,t);case 6:return compilePseudoClass(e,t);case 7:return null}return null}function compileAttribute(e,t){let n=new Test(5);switch(n.name=e.name,n.lower=asciiLowercase$1(e.name),e.nsKind){case 0:case 2:n.nsCheck=!1;break;case 1:n.nsCheck=!0,n.ns=`*`;break;case 3:{let r=resolvePrefix(t,e.nsPrefix);if(r===void 0)return fail(t,`undeclared namespace prefix `+e.nsPrefix),new Test(0);r===null?n.nsCheck=!1:(n.nsCheck=!0,n.ns=r);break}}return n.attrOp=e.op,n.value=e.value,n.valueLower=asciiLowercase$1(e.value),n.valueCase=e.caseFlag===1?1:e.caseFlag===2?0:wa.has(n.lower)?2:0,(e.op===4||e.op===5||e.op===6)&&e.value===``||e.op===2&&(e.value===``||hasWhitespace(e.value))?new Test(0):n}function hasWhitespace(e){for(let t=0;t<e.length;t++){let n=e.charCodeAt(t);if(n===32||n===9||n===10||n===12||n===13)return!0}return!1}function compilePseudoClass(e,t){switch(e.pseudo){case 1:case 2:case 83:{let n=new Test(7);return n.list=compileForgivingList(e.list,t),n}case 3:{let n=new Test(8);return n.list=compileList(e.list,t),n}case 4:{let n=new Test(9);return n.list=compileList(e.list,t),n}case 5:case 6:case 7:case 8:return nthTest(e.pseudo,e.a,e.b,e.list,t);case 20:return nthTest(5,0,1,null,t);case 21:return nthTest(6,0,1,null,t);case 23:return nthTest(7,0,1,null,t);case 24:return nthTest(8,0,1,null,t);case 22:{let e=new Test(7),n=new CList,r=new CComplex;return r.comps.push([nthTest(5,0,1,null,t),nthTest(6,0,1,null,t)]),n.items.push(r),e.list=n,e}case 25:{let e=new Test(7),n=new CList,r=new CComplex;return r.comps.push([nthTest(7,0,1,null,t),nthTest(8,0,1,null,t)]),n.items.push(r),e.list=n,e}case 26:return new Test(14);case 27:return new Test(15);case 28:return t.usesScope=!0,new Test(16);case 29:return new Test(20);case 9:case 10:{let n=new Test(e.pseudo===9?21:22);return n.list=compileList(e.list,t),n}case 11:{let t=new Test(17);return t.args=e.args,t}case 12:{t.volatile=!0;let n=e.args[0];if(n!==`ltr`&&n!==`rtl`)return new Test(0);let r=new Test(18);return r.volatileTest=!0,r.a=n===`rtl`?2:1,r}case 88:{let t=new Test(23);return t.args=e.args,t}case 13:{t.volatile=!0;let n=new Test(19);return n.volatileTest=!0,n.name=e.args[0],n}}let n=ya[e.name];if(n===void 0)return fail(t,`unsupported pseudo-class :`+e.name),new Test(0);let r=new Test(6);return Ta.has(e.pseudo)||(t.volatile=!0,r.volatileTest=!0),r.fn=n,r.name=e.name,r}function nthTest(e,t,n,r,i){let a=new Test(e===5?10:e===6?11:e===7?12:13);return a.a=t,a.b=n,r!==null&&(a.list=compileList(r,i)),i.nthTests.push(a),a}function resetMemos(e){let t=e.nthTests;for(let e=0;e<t.length;e++){let n=t[e];n.memoEl=null,n.memoParent=null,n.memoVersion=-1,n.memoCountVersion=-1}}var StateDeps=class{tests;els;results;constructor(){this.tests=[],this.els=[],this.results=[]}};let Oa=!1,ka=null;function logDep(e,t,n){let r=ka??=new StateDeps;r.tests.push(e),r.els.push(t),r.results.push(n)}function beginStateDeps(){let e=Oa?ka:!1;return Oa=!0,ka=null,e}function endStateDeps(e){let t=ka;if(e===!1)Oa=!1,ka=null;else if(ka=e,t!==null)for(let e=0;e<t.tests.length;e++)logDep(t.tests[e],t.els[e],t.results[e]);return t}function stateDepsHold(e){let t=Oa;Oa=!1;let n=!0,r=e.tests;for(let t=0;t<r.length;t++)if(matchTest(r[t],e.els[t])!==e.results[t]){n=!1;break}return Oa=t,n}let Aa=null,ja=null,Ma=null;function setScope(e){let t=Aa;return Aa=e,t}function setHostContext(e){let t=Ma;return Ma=e,t}function matchList(e,t){return e.fn(t)}function matchComplex(e,t){return e.fn(t)}const NEVER=()=>!1,ALWAYS=()=>!0;function listFn(e){let t=e.items;if(t.length===0)return NEVER;if(t.length===1){let e=t[0];return t=>e.fn(t)}let n=tagDispatch(t);return n===null?e=>{for(let n=0;n<t.length;n++)if(t[n].fn(e))return!0;return!1}:n}function subjectTagTest(e){if(e.leading!==0)return null;let t=e.comps[0];for(let e=0;e<t.length;e++){let n=t[e];if(n.op===2)return!n.nsCheck&&n.a!==0?n:null}return null}function tagDispatch(e){let t=0,n=0;for(let r=0;r<e.length;r++){let i=subjectTagTest(e[r]);i!==null&&(n++,i.a>t&&(t=i.a))}if(n===0)return null;let r=new Uint8Array(t+1),i=Array(t+1).fill(void 0),a=[];for(let t=0;t<e.length;t++){let n=e[t],o=subjectTagTest(n);o===null?a.push(n):n.last===0&&n.comps[0].length===1?r[o.a]=1:(i[o.a]??=[]).push(n)}return n=>{if(!(n.flags&2)){for(let t=0;t<e.length;t++)if(e[t].fn(n))return!0;return!1}let o=n.tag;if(o!==0&&o<=t){if(r[o]===1)return!0;let e=i[o];if(e!==void 0){for(let t=0;t<e.length;t++)if(e[t].fn(n))return!0}}for(let e=0;e<a.length;e++)if(a[e].fn(n))return!0;return!1}}function testFn(e){switch(e.op){case 2:{let t=e.lower,n=e.name;if(!e.nsCheck)return e=>e.flags&2?e.name===t:e.name===n;let r=e.ns;return e=>(e.flags&2?e.name===t:e.name===n)&&e.ns===r}case 4:{let t=e.name;return n=>{let r=classTokens(n);for(let e=0;e<r.length;e++)if(r[e]===t)return!0;return r.length!==0&&isQuirks$1(n.doc)&&quirksClassMatch(r,e.lower)}}case 3:{let t=e.name,n=e.lower;return e=>e.id===t||e.id!==``&&isQuirks$1(e.doc)&&asciiLowercase$1(e.id)===n}case 5:{if(e.nsCheck||e.valueCase!==0||e.attrOp!==0&&e.attrOp!==1)return t=>matchAttribute(e,t);let t=e.lower,n=e.name;if(e.attrOp===0)return e=>{let r=e.attrs;if(r===null)return!1;let i=e.flags&2?t:n;for(let e=0;e<r.length;e++)if(r[e].localName===i&&r[e].ns===null)return!0;return!1};let r=e.value;return e=>{let i=e.attrs;if(i===null)return!1;let a=e.flags&2?t:n;for(let e=0;e<i.length;e++){let t=i[e];if(t.localName===a&&t.ns===null)return t.value===r}return!1}}case 1:{let t=e.ns;return e=>e.ns===t}case 6:return e.volatileTest?t=>matchTest(e,t):e.fn;case 7:{let t=e.list;return e=>t.fn(e)}case 8:{let t=e.list;return e=>!t.fn(e)}case 9:{let t=e.list;return e=>matchHas(t,e)}case 10:case 11:case 12:case 13:return t=>matchNth(e,t);case 16:return e=>e===Aa;case 0:return NEVER}return t=>matchTest(e,t)}function compoundFn(e){switch(e.length){case 0:return ALWAYS;case 1:return testFn(e[0]);case 2:{let t=testFn(e[0]),n=testFn(e[1]);return e=>t(e)&&n(e)}case 3:{let t=testFn(e[0]),n=testFn(e[1]),r=testFn(e[2]);return e=>t(e)&&n(e)&&r(e)}}let t=e.map(testFn);return e=>{for(let n=0;n<t.length;n++)if(!t[n](e))return!1;return!0}}function complexFn(e,t){let n=compoundFn(e.comps[t]);if(t===e.last){if(e.leading===0)return n;let t=e.leading;return e=>n(e)&&relatesToAnchor(t,e)}let r=t+1,i=complexFn(e,r);switch(e.combs[t]){case 1:return t=>{if(!n(t))return!1;for(let n=t.parent;n!==null;n=n.parent){if(n.type!==1)return hostStep(e,r,n);if(i(n))return!0}return!1};case 2:return t=>{if(!n(t))return!1;let a=t.parent;return a===null?!1:a.type===1?i(a):hostStep(e,r,a)};case 3:return e=>{if(!n(e))return!1;let t=e.prev;for(;t!==null&&t.type!==1;)t=t.prev;return t!==null&&i(t)};case 4:return e=>{if(!n(e))return!1;for(let t=e.prev;t!==null;t=t.prev)if(t.type===1&&i(t))return!0;return!1}}return NEVER}function hostStep(e,t,n){if(!(n.flags&32)||t!==e.last)return!1;let r=shadowHost(n);if(r===null)return!1;let i=Ma;Ma=r;let a=matchCompound(e.comps[t],r)&&(e.leading===0||relatesToAnchor(e.leading,r));return Ma=i,a}function relatesToAnchor(e,t){let n=ja;if(n===null)return!1;switch(e){case 2:return t.parent===n;case 1:for(let e=t.parent;e!==null;e=e.parent)if(e===n)return!0;return!1;case 3:{let e=t.prev;for(;e!==null&&e.type!==1;)e=e.prev;return e===n}case 4:for(let e=t.prev;e!==null;e=e.prev)if(e===n)return!0;return!1}return!1}function matchCompound(e,t){if(Ma!==null&&t===Ma)return matchFeatureless(e,t);for(let n=0;n<e.length;n++)if(!matchTest(e[n],t))return!1;return!0}function matchFeatureless(e,t){return featurelessCompound(e,t)===1}function matchFeaturelessHost(e,t){let n=Ma;Ma=t;let r=featurelessComplex(e,t)===1;return Ma=n,r}function featurelessComplex(e,t){return e.last!==0||e.leading!==0?-1:featurelessCompound(e.comps[0],t)}function featurelessList(e,t){let n=-1;for(let r=0;r<e.items.length;r++){let i=featurelessComplex(e.items[r],t);if(i===1)return 1;i===0&&(n=0)}return n}function featurelessCompound(e,t){let n=!1,r=1;for(let i=0;i<e.length;i++){let a=e[i];switch(a.op){case 20:case 21:case 22:n=!0,r===1&&!matchTest(a,t)&&(r=0);break;case 9:{let e=t.node[Sr];r===1&&!matchHas(a.list,e?e[z]:t)&&(r=0);break}case 7:{let e=featurelessList(a.list,t);if(e===-1)return-1;n=!0,e===0&&(r=0);break}case 8:{let e=featurelessList(a.list,t);if(e===-1)return-1;n=!0,e===1&&(r=0);break}default:return-1}}return n?r:-1}function isQuirks$1(e){return e[Nn]===`quirks`}__name(isQuirks$1,`isQuirks`);function quirksClassMatch(e,t){for(let n=0;n<e.length;n++)if(asciiLowercase$1(e[n])===t)return!0;return!1}function matchTest(e,t){switch(e.op){case 2:return(t.flags&2?t.name!==e.lower:t.name!==e.name)?!1:!e.nsCheck||t.ns===e.ns;case 4:{let n=classTokens(t),r=e.name;for(let e=0;e<n.length;e++)if(n[e]===r)return!0;return n.length!==0&&isQuirks$1(t.doc)&&quirksClassMatch(n,e.lower)}case 3:return t.id===e.name||t.id!==``&&isQuirks$1(t.doc)&&asciiLowercase$1(t.id)===e.lower;case 5:return matchAttribute(e,t);case 1:return t.ns===e.ns;case 6:{let n=e.fn(t);return Oa&&e.volatileTest&&logDep(e,t,n),n}case 7:return matchList(e.list,t);case 8:return!matchList(e.list,t);case 9:return matchHas(e.list,t);case 10:case 11:case 12:case 13:return matchNth(e,t);case 14:for(let e=t.first;e!==null;e=e.next)if(e.type===1||(e.type===3||e.type===4)&&e.data.length!==0)return!1;return!0;case 15:{let e=t.parent;return e!==null&&e.type===9}case 16:return t===Aa;case 17:return matchesLang(t,e.args);case 18:{let n=directionality(t)===e.a;return Oa&&logDep(e,t,n),n}case 19:{let n=customState(t,e.name);return Oa&&logDep(e,t,n),n}case 20:return Ma!==null&&t===Ma;case 21:{if(Ma===null||t!==Ma)return!1;let n=Ma;Ma=null;let r=matchList(e.list,t);return Ma=n,r}case 22:{if(Ma===null||t!==Ma)return!1;let n=Ma;Ma=null;let r=!1;for(let n=t;n!==null&&!r;n=parentOrHost$1(n))n.type===1&&matchList(e.list,n)&&(r=!0);return Ma=n,r}case 23:{let n=headingLevel(t);if(n===0)return!1;let r=e.args;if(r.length===0)return!0;for(let e=0;e<r.length;e++)if(Number(r[e])===n)return!0;return!1}case 0:return!1}return!1}function headingLevel(e){if(e.tag===0||e.name.length!==2||e.name.charCodeAt(0)!==104)return 0;let t=e.name.charCodeAt(1)-48;if(t<1||t>6)return 0;let n=t+headingOffset(e);return n>9?9:n}function headingOffset(e){let t=0;for(let n=e;n!==null;n=parentOrHost$1(n)){if(n.type!==1||n.tag===0||n.attrs===null)continue;let e=attr(n,`headingoffset`);if(e!==null){let n=parseNonNegativeInteger$1(e);n>0&&(t+=n)}if(attr(n,`headingreset`)!==null)break}return t}function parseNonNegativeInteger$1(e){let t=0;for(;t<e.length&&isWs$2(e.charCodeAt(t));)t++;t<e.length&&e.charCodeAt(t)===43&&t++;let n=-1;for(;t<e.length;t++){let r=e.charCodeAt(t)-48;if(r<0||r>9)break;n=(n===-1?0:n*10)+r}return n}__name(parseNonNegativeInteger$1,`parseNonNegativeInteger`);function matchAttribute(e,t){let n=t.attrs;if(n===null)return!1;let r=!!(t.flags&2),i=r?e.lower:e.name;for(let t=0;t<n.length;t++){let a=n[t];if(a.localName!==i)continue;if(e.nsCheck){if(e.ns!==`*`&&a.ns!==e.ns)continue}else if(a.ns!==null)continue;if(e.attrOp===0)return!0;let o=e.valueCase===1||e.valueCase===2&&r&&a.ns===null;if(attrValueMatches(e,o?asciiLowercase$1(a.value):a.value,o?e.valueLower:e.value))return!0;if(!e.nsCheck)return!1}return!1}function attrValueMatches(e,t,n){switch(e.attrOp){case 1:return t===n;case 2:{let e=t.length,r=n.length,i=0;for(;i<e;){for(;i<e&&isWs$2(t.charCodeAt(i));)i++;let a=i;for(;i<e&&!isWs$2(t.charCodeAt(i));)i++;if(i-a===r&&t.startsWith(n,a))return!0}return!1}case 3:return t===n||t.length>n.length&&t.charCodeAt(n.length)===45&&t.startsWith(n);case 4:return t.startsWith(n);case 5:return t.endsWith(n);case 6:return t.includes(n)}return!1}function isWs$2(e){return e===32||e===9||e===10||e===12||e===13}__name(isWs$2,`isWs`);function anb(e,t,n){if(e===0)return n===t;let r=n-t;return r/e>=0&&r%e===0}function sameType(e,t){return e.name===t.name&&e.ns===t.ns}function matchNth(e,t){let n=e.list;if(n!==null&&!matchList(n,t))return!1;let r=t.doc[J],i=e.op===12||e.op===13,a=e.op===11||e.op===13,o=1,s=t.prev;for(;s!==null&&!(s.type===1&&(i?sameType(s,t):n===null||matchList(n,s)));)s=s.prev;if(s!==null){if(s===e.memoEl&&e.memoVersion===r)o=e.memoIdx+1;else{o=2;for(let e=s.prev;e!==null;e=e.prev)e.type===1&&(i?sameType(e,t):n===null||matchList(n,e))&&o++}}if(e.memoEl=t,e.memoIdx=o,e.memoVersion=r,!a)return anb(e.a,e.b,o);let c=t.parent,l;if(!i&&n===null&&c!==null&&c===e.memoParent&&e.memoCountVersion===r)l=e.memoCount;else{l=o;for(let e=t.next;e!==null;e=e.next)e.type===1&&(i?sameType(e,t):n===null||matchList(n,e))&&l++;!i&&n===null&&(e.memoParent=c,e.memoCount=l,e.memoCountVersion=r)}return anb(e.a,e.b,l-o+1)}function matchHas(e,t){let n=ja;ja=t;let r=!1,i=e.items;for(let e=0;e<i.length&&!r;e++){let n=i[e];switch(n.hasDomain){case 2:for(let e=t.first;e!==null;e=e.next)if(e.type===1&&n.fn(e)){r=!0;break}break;case 1:for(let e=t.first;e!==null;){if(e.type===1&&n.fn(e)){r=!0;break}e=nextIn(e,t)}break;case 3:{let e=t.next;for(;e!==null&&e.type!==1;)e=e.next;r=e!==null&&n.fn(e);break}case 4:for(let e=t.next;e!==null;e=e.next)if(e.type===1&&n.fn(e)){r=!0;break}break;case 5:for(let e=t.next;e!==null&&!r;e=e.next)if(e.type===1){if(n.fn(e)){r=!0;break}for(let t=e.first;t!==null;){if(t.type===1&&n.fn(t)){r=!0;break}t=nextIn(t,e)}}}}return ja=n,r}function nextIn(e,t){let n=e.first;if(n!==null)return n;let r=e;for(;r!==null&&r!==t;){let e=r.next;if(e!==null)return e;r=r.parent}return null}function subjectKey(e){let t=e.comps[0],n=``,r=``;for(let e=0;e<t.length;e++){let i=t[e];if(i.op===3)return{kind:1,value:i.name};i.op===4&&n===``?n=i.name:i.op===2&&r===``&&(r=i.lower)}return n===``?r===``?{kind:0,value:``}:{kind:3,value:r}:{kind:2,value:n}}function ancestorHashes(e){let t=[];if(e.leading!==0)return t;for(let n=0;n<3&&t.length<4;n++)for(let r=1;r<=e.last&&t.length<4;r++){let i=e.combs[r-1];if(i!==1&&i!==2)continue;let a=e.comps[r];for(let e=0;e<a.length&&t.length<4;e++){let r=a[e],i=-1;n===0&&r.op===3?i=idHash(r.name):n===1&&r.op===4?i=classHash(r.name):n===2&&r.op===2&&(i=tagHash(r.lower)),i!==-1&&t.indexOf(i)===-1&&t.push(i)}}return t}function idRootOf(e){if(e.items.length!==1)return``;let t=e.items[0];if(t.leading!==0)return``;for(let e=1;e<=t.last;e++){let n=t.combs[e-1];if(n!==1&&n!==2)return``;let r=t.comps[e];for(let e=0;e<r.length;e++)if(r[e].op===3)return r[e].name}return``}function attributeNamesIn(e,t){for(let n=0;n<=e.last;n++){let r=e.comps[n];for(let e=0;e<r.length;e++){let n=r[e];n.op===5&&(t(n.name),n.lower!==n.name&&t(n.lower));let i=n.list;if(i!==null)for(let e=0;e<i.items.length;e++)attributeNamesIn(i.items[e],t)}}}function subjectType(e){if(e.items.length!==1)return null;let t=e.items[0].comps[0];for(let e=0;e<t.length;e++){let n=t[e];if(n.op===2&&!n.nsCheck)return n}return null}function fastShape(e){if(e.items.length!==1)return 0;let t=e.items[0];if(t.last!==0)return 0;let n=t.comps[0];if(n.length===0)return 1;if(n.length!==1)return 0;let r=n[0];switch(r.op){case 3:return 2;case 4:return 3;case 2:return r.nsCheck?0:4;case 5:return r.nsCheck?0:r.attrOp===0||r.attrOp===1&&r.valueCase===0?5:0}return 0}function fastTest(e){return e.items[0].comps[0][0]}var Query=class{list;info;fast;fastT;hasMemos;idRoot;subject;indexedId;constructor(e,t){let n=new CList;for(let t=0;t<e.items.length;t++){let r=e.items[t];r.pseudoElement===``&&n.items.push(r)}this.list=n,this.info=t,this.fast=t.usesScope?0:fastShape(n),this.fastT=this.fast===0||this.fast===1?null:fastTest(n),this.hasMemos=t.nthTests.length!==0,this.idRoot=this.fast===0&&!t.usesScope?idRootOf(n):``,this.subject=this.fast===0?subjectType(n):null;let r=this.fastT;this.indexedId=this.fast===2?r.name:this.fast===5&&r.attrOp===1&&r.name===`id`?r.value:``}};const Na=/* @__PURE__ */ new Map;function clearSelectorCaches(){Na.clear()}function compileQuery(e){let t=new SelectorParser(e).parseSelectorList();if(t===null)return null;let n=new CompileInfo,r=compileList(t,n);return n.error===``?new Query(r,n):null}function interfaceName(e){return e.type===9?`Document`:e.type===1?`Element`:`DocumentFragment`}function syntaxError$1(e,t,n){return new DOMException(`Failed to execute '${t}' on '${interfaceName(n)}': '${e}' is not a valid selector.`,`SyntaxError`)}__name(syntaxError$1,`syntaxError`);function getQuery(e,t,n){let r=Na.get(e);if(r===void 0&&(r=compileQuery(e),Na.size>=2048&&Na.clear(),Na.set(e,r)),r===null)throw syntaxError$1(e,t,n);return r}function scopeFor(e){if(e.type===1)return e;if(e.type===9){for(let t=e.first;t!==null;t=t.next)if(t.type===1)return t}return null}function next(e,t){let n=e.first;if(n!==null)return n;let r=e;for(;r!==t;){let e=r.next;if(e!==null)return e;r=r.parent}return null}function hasClass(e,t){let n=classTokens(e);for(let e=0;e<n.length;e++)if(n[e]===t)return!0;return!1}function attrMatch(e,t,n){let r=e.attrs;if(r===null)return!1;let i=e.flags&2?t.lower:t.name;for(let e=0;e<r.length;e++){let a=r[e];if(a.localName===i&&a.ns===null)return n||a.value===t.value}return!1}function isQuirks(e){return e.doc[Nn]===`quirks`}function run$1(e,t,n,r){if(t.indexedId!==``&&(t.fast!==2||!isQuirks(e))){let i=byIdIndex(e,t.indexedId);if(i!==void 0){if(i!==null){if(n)return i;r.push(i)}return null}}switch(t.fast){case 1:for(let t=e.first;t!==null;t=next(t,e))if(t.type===1){if(n)return t;r.push(t)}return null;case 2:{let i=t.fastT.name;if(!isQuirks(e)){for(let t=e.first;t!==null;t=next(t,e))if(t.type===1&&t.id===i){if(n)return t;r.push(t)}return null}break}case 3:{if(isQuirks(e))break;let i=t.fastT.name;for(let t=e.first;t!==null;t=next(t,e))if(t.type===1&&t.attrs!==null&&hasClass(t,i)){if(n)return t;r.push(t)}return null}case 4:{let i=t.fastT,a=i.lower,o=i.name;for(let t=e.first;t!==null;t=next(t,e))if(t.type===1&&(t.flags&2?t.name===a:t.name===o)){if(n)return t;r.push(t)}return null}case 5:{let i=t.fastT,a=i.attrOp===0;for(let t=e.first;t!==null;t=next(t,e))if(t.type===1&&attrMatch(t,i,a)){if(n)return t;r.push(t)}return null}}let i=t.list;if(i.items.length===0)return null;let a=e;if(t.idRoot!==``){let n=idRootFor(e,t.idRoot);if(n===null)return null;a=n}let o=setScope(t.info.usesScope?scopeFor(e):null);try{if(t.subject!==null&&a.type===9){let e=elementsOfType(a,t.subject);for(let t=0;t<e.length;t++){let a=e[t];if(matchList(i,a)){if(n)return a;r.push(a)}}return null}for(let e=a.first;e!==null;e=next(e,a))if(e.type===1&&matchList(i,e)){if(n)return e;r.push(e)}return null}finally{setScope(o),t.hasMemos&&resetMemos(t.info)}}__name(run$1,`run`);function byIdIndex(e,t){if(!(e.flags&1))return;let n=e.doc[pn].get(t);if(n===void 0)return e.type===9?null:void 0;if(!Array.isArray(n)){for(let t=n.parent;t!==null;t=t.parent)if(t===e)return n;return e.type===9?null:void 0}}function idRootFor(e,t){if(!(e.flags&1)||isQuirks(e))return e;if(e.type!==9){let t=e;for(;t.parent!==null;)t=t.parent;if(t.type!==9)return e}let n=e.doc[pn].get(t);if(n===void 0)return null;if(Array.isArray(n)||n===e)return e;for(let t=n.parent;t!==null;t=t.parent)if(t===e)return n;for(let t=e.parent;t!==null;t=t.parent)if(t===n)return e;return null}const Pa=[];var ResultEntry=class{version;doc;all;first;constructor(e,t){this.version=e,this.doc=t,this.all=null,this.first=void 0}},TypeList=class{version;elements;constructor(e,t){this.version=e,this.elements=t}};const Fa={},newTypes=()=>/* @__PURE__ */ new Map;function elementsOfType(e,t){let n=e.doc,r=derivedCache(n,Fa,newTypes),i=t.lower===t.name?t.name:`${t.lower}\n${t.name}`,a=n[Lr],o=r.get(i);if(o!==void 0&&o.version===a)return o.elements;let s=t.lower,c=t.name,l=[];for(let t=e.first;t!==null;t=next(t,e))t.type===1&&(t.flags&2?t.name===s:t.name===c)&&l.push(t);return r.set(i,new TypeList(a,l)),l}const Ia={},newResults=()=>/* @__PURE__ */ new WeakMap;function cacheable(e){return!e.info.volatile&&e.fast!==2}function cachedEntry(e,t,n){let r=e.doc,i=n?derivedCache(r,Ia,newResults):peekDerivedCache(r,Ia);if(i===void 0)return null;let a=i.get(e);if(a===void 0){if(!n)return null;a=/* @__PURE__ */ new Map,i.set(e,a)}let o=r[J],s=a.get(t);return s!==void 0&&s.version===o&&s.doc===r?s:n?(s===void 0?(a.size>=64&&a.clear(),s=new ResultEntry(o,r),a.set(t,s)):(s.version=o,s.doc=r,s.all=null,s.first=void 0),s):null}function querySelector(e,t){let n=getQuery(t,`querySelector`,e);if(!cacheable(n))return run$1(e,n,!0,Pa);let r=cachedEntry(e,n,!1);if(r!==null){if(r.first!==void 0)return r.first;if(r.all!==null)return r.first=r.all.length===0?null:r.all[0]}let i=run$1(e,n,!0,Pa);return cachedEntry(e,n,!0).first=i,i}function querySelectorAll(e,t){return Bi._staticFromImpls(allImpls(e,getQuery(t,`querySelectorAll`,e)))}function allImpls(e,t){if(!cacheable(t)){let n=[];return run$1(e,t,!1,n),n}let n=cachedEntry(e,t,!1);if(n!==null&&n.all!==null)return n.all;let r=[];run$1(e,t,!1,r);let i=cachedEntry(e,t,!0);return i.all=r,i.first=r.length===0?null:r[0],r}function matches(e,t){let n=getQuery(t,`matches`,e),r=n.list;if(!n.info.usesScope&&!n.hasMemos)return r.fn(e);if(r.items.length===0)return!1;let i=setScope(e);try{return matchList(r,e)}finally{setScope(i),n.hasMemos&&resetMemos(n.info)}}function closest(e,t){let n=getQuery(t,`closest`,e),r=n.list;if(r.items.length===0)return null;let i=setScope(e);try{for(let t=e;t!==null&&t.type===1;t=t.parent)if(matchList(r,t))return t;return null}finally{setScope(i),n.hasMemos&&resetMemos(n.info)}}var CollectionState=class{root;childrenOnly;filter;structural;items;doc;version;constructor(e,t,n,r){this.root=e,this.childrenOnly=t,this.filter=n,this.structural=r,this.items=[],this.doc=null,this.version=-1}_dropSnapshot(){this.items=[],this.doc=null,this.version=-1}},La=class HTMLCollection{constructor(e,t=!1,n=null,r=!1){Object.defineProperty(this,ht,{value:new CollectionState(e,t,n,r)}),za===null&&(za=indexGetterTable(HTMLCollection.prototype,tableItem,256))}get _s(){return this[ht]}get _rootImpl(){return this[ht].root}static _childrenOf(e){return new HTMLCollection(e,!0,null,!0)}static _descendants(e,t,n){return new HTMLCollection(e,!1,n,t)}_collect(e){let t=this[ht],n=t.root;if(t.childrenOnly){for(let t=n.first;t!==null;t=t.next)t.type===1&&e.push(t.node);return}let r=t.filter;if(r===null)for(let t=nextElementInTree(n,n);t!==null;t=nextElementInTree(t,n))e.push(t.node);else for(let t=nextElementInTree(n,n);t!==null;t=nextElementInTree(t,n))r(t)&&e.push(t.node)}_snapshot(){let e=this[ht],t=e.root.doc,n=e.structural?t[Lr]:t[J];if(e.version===n&&e.doc===t)return e.items;let r=[];return this._collect(r),e.items=r,e.doc=t,e.version=n,r.length!==0&&holdSnapshot(t,e,e.root),r.length>za.count&&ensureIndexGetters(za,r.length),r}get length(){let e=this._snapshot().length;return e>za.count&&ensureIndexGetters(za,e),e}item(e){let t=this._snapshot(),n=Number(e)>>>0;return n<t.length?t[n]:null}namedItem(e){let t=String(e);if(t===``)return null;let n=this._snapshot();for(let e=0;e<n.length;e++){let r=n[e][z];if(r.id===t||r.ns===`http://www.w3.org/1999/xhtml`&&attr(r,`name`)===t)return n[e]}return null}_supportedPropertyNames(){let e=[],t=this._snapshot();for(let n=0;n<t.length;n++){let r=t[n][z];if(r.id!==``&&!e.includes(r.id)&&e.push(r.id),r.ns===`http://www.w3.org/1999/xhtml`){let t=attr(r,`name`);t!==null&&t!==``&&!e.includes(t)&&e.push(t)}}return e}};const Ra={values(){let e=iterableTarget(this);return new CollectionIterator(e,e instanceof La)}}.values;Object.defineProperties(La.prototype,{[Symbol.iterator]:{value:Ra,writable:!0,configurable:!0},[Symbol.toStringTag]:{value:`HTMLCollection`,configurable:!0}});let za=null;function tableItem(e,t){let n=e._snapshot();return t<n.length?n[t]:void 0}function ensureCollectionIndexGetters(e){za!==null&&ensureIndexGetters(za,e)}function isArrayIndex$1(e){let t=e.charCodeAt(0);if(t<48||t>57)return!1;let n=Number(e);return Number.isInteger(n)&&n>=0&&n<4294967295&&String(n)===e}__name(isArrayIndex$1,`isArrayIndex`);function withNamedProperties(e){return new Proxy(e,{get(e,t,n){let r=Reflect.get(e,t,e);return r!==void 0||typeof t==`symbol`||t in e?r:e.namedItem(t)??void 0},has(e,t){return typeof t==`string`&&!(t in e)?isArrayIndex$1(t)?Number(t)<e.length:e.namedItem(t)!==null:typeof t==`string`&&isArrayIndex$1(t)?Number(t)<e.length:Reflect.has(e,t)},ownKeys(e){let t=[],n=e.length;for(let e=0;e<n;e++)t.push(String(e));for(let n of e._supportedPropertyNames())n in e||t.push(n);for(let n of Reflect.ownKeys(e))t.push(n);return t},getOwnPropertyDescriptor(e,t){if(typeof t==`string`){if(isArrayIndex$1(t)){let n=e.item(Number(t));return n===null?void 0:{value:n,writable:!1,enumerable:!0,configurable:!0}}if(!(t in e)){let n=e.namedItem(t);if(n!==null)return{value:n,writable:!1,enumerable:!1,configurable:!0}}}return Reflect.getOwnPropertyDescriptor(e,t)},set(e,t,n){return typeof t==`string`&&(isArrayIndex$1(t)||e.namedItem(t)!==null)?!1:Reflect.set(e,t,n,e)},defineProperty(e,t,n){return typeof t==`string`&&(isArrayIndex$1(t)||e.namedItem(t)!==null)?!1:Reflect.defineProperty(e,t,n)},deleteProperty(e,t){return typeof t==`string`&&isArrayIndex$1(t)?Number(t)>=e.length:typeof t==`string`&&!(t in e)&&e.namedItem(t)!==null?!1:Reflect.deleteProperty(e,t)}})}function define(e,t){for(let n of Reflect.ownKeys(t))Object.defineProperty(e.prototype,n,Object.getOwnPropertyDescriptor(t,n))}function convertNodesIntoNode(e,t){if(e.length===1)return toNode(e[0],t)[z];let n=t.createDocumentFragment();for(let r of e)n.appendChild(toNode(r,t));return n[z]}function toNode(e,t){return typeof e==`object`&&e&&z in e?e:t.createTextNode(String(e))}function nodeArg(e,t,n,r){if(typeof e==`object`&&e&&z in e)return e[z];throw TypeError(`Failed to execute '${t}' on '${parentNodeInterface(r)}': parameter ${n} is not of type 'Node'.`)}function parentNodeInterface(e){return e.type===1?`Element`:e.type===11?`DocumentFragment`:`Document`}function wrap(e){return e===null?null:e.node}const Ba={get children(){let e=this;return e[nt]??=La._childrenOf(e[z])},get firstElementChild(){return wrap(firstElementChild(this[z]))},get lastElementChild(){return wrap(lastElementChild(this[z]))},get childElementCount(){let e=0;for(let t=this[z].first;t!==null;t=t.next)t.type===1&&e++;return e},prepend(...e){let t=this[z];preInsert(convertNodesIntoNode(e,t.doc),t,t.first)},append(...e){let t=this[z];preInsert(convertNodesIntoNode(e,t.doc),t,null)},replaceChildren(...e){let t=this[z],n=convertNodesIntoNode(e,t.doc);ensureReplaceAllValidity(n,t),replaceAll(n,t)},moveBefore(e,t){arguments.length<2&&argumentsRequired(`moveBefore`,parentNodeInterface(this[z]),2,arguments.length);let n=nodeArg(e,`moveBefore`,1,this[z]),r=t===null?null:nodeArg(t,`moveBefore`,2,this[z]);r===n&&(r=n.next),move(n,this[z],r)},querySelector(e){return arguments.length===0&&argumentsRequired(`querySelector`,parentNodeInterface(this[z]),1,0),wrap(querySelector(this[z],String(e)))},querySelectorAll(e){return arguments.length===0&&argumentsRequired(`querySelectorAll`,parentNodeInterface(this[z]),1,0),querySelectorAll(this[z],String(e))}},Va={before(...e){let t=this[z],n=t.parent;if(n===null)return;let r=t.prev;for(;r!==null&&e.includes(r.node);)r=r.prev;preInsert(convertNodesIntoNode(e,t.doc),n,r===null?n.first:r.next)},after(...e){let t=this[z],n=t.parent;if(n===null)return;let r=t.next;for(;r!==null&&e.includes(r.node);)r=r.next;preInsert(convertNodesIntoNode(e,t.doc),n,r)},replaceWith(...e){let t=this[z],n=t.parent;if(n===null)return;let r=t.next;for(;r!==null&&e.includes(r.node);)r=r.next;let i=convertNodesIntoNode(e,t.doc);t.parent===n?replace(t,i,n):preInsert(i,n,r)},remove(){let e=this[z];e.parent!==null&&remove(e,!1)}},Ha={get previousElementSibling(){return wrap(previousElementSibling(this[z]))},get nextElementSibling(){return wrap(nextElementSibling(this[z]))}},Ua={getElementById(e){let t=this[z],n=String(e);if(n===``)return null;if(t.type!==11)return wrap(this._idLookup(n));for(let e=nextElementInTree(t,t);e!==null;e=nextElementInTree(e,t))if(e.id===n)return e.node;return null}};function installParentNode(e){define(e,Ba),addUnscopables(e,[`prepend`,`append`,`replaceChildren`])}function installChildNode(e){define(e,Va),addUnscopables(e,[`before`,`after`,`replaceWith`,`remove`])}function addUnscopables(e,t){let n=e.prototype,r=Object.getOwnPropertyDescriptor(n,Symbol.unscopables)?.value;r===void 0&&(r=Object.create(null),Object.defineProperty(n,Symbol.unscopables,{value:r,configurable:!0}));for(let e of t)r[e]=!0}function installNonDocumentTypeChildNode(e){define(e,Ha)}function installNonElementParentNode(e){define(e,Ua)}function arity$1(e,t,n){throw TypeError(`Failed to execute '${e}' on 'CharacterData': ${t} argument${t===1?``:`s`} required, but only ${n} present.`)}__name(arity$1,`arity`);function nodeDocumentFor(e){return typeof e==`object`&&e&&e[z]?.type===9?e:currentDocument()}var CharacterData=class extends Node{get data(){return this[z].data}set data(e){let t=this[z];replaceData(t,0,t.data.length,e===null?``:String(e))}get length(){return this[z].data.length}substringData(e,t){arguments.length<2&&arity$1(`substringData`,2,arguments.length);let n=this[z].data;if(e>>>=0,t>>>=0,e>n.length)throw new DOMException(`Offset is greater than the node's length.`,`IndexSizeError`);return n.substring(e,e+t)}appendData(e){arguments.length<1&&arity$1(`appendData`,1,0);let t=this[z];replaceData(t,t.data.length,0,String(e))}insertData(e,t){arguments.length<2&&arity$1(`insertData`,2,arguments.length),replaceData(this[z],e>>>0,0,String(t))}deleteData(e,t){arguments.length<2&&arity$1(`deleteData`,2,arguments.length),replaceData(this[z],e>>>0,t>>>0,``)}replaceData(e,t,n){arguments.length<3&&arity$1(`replaceData`,3,arguments.length),replaceData(this[z],e>>>0,t>>>0,String(n))}};installChildNode(CharacterData),installNonDocumentTypeChildNode(CharacterData);var Text=class extends CharacterData{constructor(e=``,t){super(3,nodeDocumentFor(t)),this[z].data=String(e)}splitText(e){return splitText(this[z],Number(e)>>>0).node}get wholeText(){let e=this[z];for(;e.prev!==null&&(e.prev.type===3||e.prev.type===4);)e=e.prev;let t=``;for(let n=e;n!==null&&(n.type===3||n.type===4);n=n.next)t+=n.data;return t}get assignedSlot(){if(sa===0)return null;let e=assignedSlot(this[z]);if(e===null)return null;let t=this[z].parent,n=t===null?null:t.node[Sr];return n!=null&&n.mode===`open`?e.node:null}},CDATASection=class extends Text{constructor(e=``,t=currentDocument()){super(e,t),this[z].type=4}},Comment=class extends CharacterData{constructor(e=``,t){super(8,nodeDocumentFor(t)),this[z].data=String(e)}},ProcessingInstruction=class extends CharacterData{constructor(e,t,n=currentDocument()){super(7,n),this[z].name=e,this[z].data=t}get target(){return this[z].name}},DocumentFragment=class extends Node{[R];constructor(e=currentDocument()){super(11,e),this[R]=null}};installParentNode(DocumentFragment),installNonElementParentNode(DocumentFragment);var DocumentType=class extends Node{[jr];constructor(e,t,n,r){super(10,e);let i=this[z];i.name=t,i.data=n,this[jr]=r}get name(){return this[z].name}get publicId(){return this[z].data}get systemId(){return this[jr]}};installChildNode(DocumentType);const Wa=`AElig,AElig;,AMP,AMP;,Aacute,Aacute;,Abreve;,Acirc,Acirc;,Acy;,Afr;,Agrave,Agrave;,Alpha;,Amacr;,And;,Aogon;,Aopf;,ApplyFunction;,Aring,Aring;,Ascr;,Assign;,Atilde,Atilde;,Auml,Auml;,Backslash;,Barv;,Barwed;,Bcy;,Because;,Bernoullis;,Beta;,Bfr;,Bopf;,Breve;,Bscr;,Bumpeq;,CHcy;,COPY,COPY;,Cacute;,Cap;,CapitalDifferentialD;,Cayleys;,Ccaron;,Ccedil,Ccedil;,Ccirc;,Cconint;,Cdot;,Cedilla;,CenterDot;,Cfr;,Chi;,CircleDot;,CircleMinus;,CirclePlus;,CircleTimes;,ClockwiseContourIntegral;,CloseCurlyDoubleQuote;,CloseCurlyQuote;,Colon;,Colone;,Congruent;,Conint;,ContourIntegral;,Copf;,Coproduct;,CounterClockwiseContourIntegral;,Cross;,Cscr;,Cup;,CupCap;,DD;,DDotrahd;,DJcy;,DScy;,DZcy;,Dagger;,Darr;,Dashv;,Dcaron;,Dcy;,Del;,Delta;,Dfr;,DiacriticalAcute;,DiacriticalDot;,DiacriticalDoubleAcute;,DiacriticalGrave;,DiacriticalTilde;,Diamond;,DifferentialD;,Dopf;,Dot;,DotDot;,DotEqual;,DoubleContourIntegral;,DoubleDot;,DoubleDownArrow;,DoubleLeftArrow;,DoubleLeftRightArrow;,DoubleLeftTee;,DoubleLongLeftArrow;,DoubleLongLeftRightArrow;,DoubleLongRightArrow;,DoubleRightArrow;,DoubleRightTee;,DoubleUpArrow;,DoubleUpDownArrow;,DoubleVerticalBar;,DownArrow;,DownArrowBar;,DownArrowUpArrow;,DownBreve;,DownLeftRightVector;,DownLeftTeeVector;,DownLeftVector;,DownLeftVectorBar;,DownRightTeeVector;,DownRightVector;,DownRightVectorBar;,DownTee;,DownTeeArrow;,Downarrow;,Dscr;,Dstrok;,ENG;,ETH,ETH;,Eacute,Eacute;,Ecaron;,Ecirc,Ecirc;,Ecy;,Edot;,Efr;,Egrave,Egrave;,Element;,Emacr;,EmptySmallSquare;,EmptyVerySmallSquare;,Eogon;,Eopf;,Epsilon;,Equal;,EqualTilde;,Equilibrium;,Escr;,Esim;,Eta;,Euml,Euml;,Exists;,ExponentialE;,Fcy;,Ffr;,FilledSmallSquare;,FilledVerySmallSquare;,Fopf;,ForAll;,Fouriertrf;,Fscr;,GJcy;,GT,GT;,Gamma;,Gammad;,Gbreve;,Gcedil;,Gcirc;,Gcy;,Gdot;,Gfr;,Gg;,Gopf;,GreaterEqual;,GreaterEqualLess;,GreaterFullEqual;,GreaterGreater;,GreaterLess;,GreaterSlantEqual;,GreaterTilde;,Gscr;,Gt;,HARDcy;,Hacek;,Hat;,Hcirc;,Hfr;,HilbertSpace;,Hopf;,HorizontalLine;,Hscr;,Hstrok;,HumpDownHump;,HumpEqual;,IEcy;,IJlig;,IOcy;,Iacute,Iacute;,Icirc,Icirc;,Icy;,Idot;,Ifr;,Igrave,Igrave;,Im;,Imacr;,ImaginaryI;,Implies;,Int;,Integral;,Intersection;,InvisibleComma;,InvisibleTimes;,Iogon;,Iopf;,Iota;,Iscr;,Itilde;,Iukcy;,Iuml,Iuml;,Jcirc;,Jcy;,Jfr;,Jopf;,Jscr;,Jsercy;,Jukcy;,KHcy;,KJcy;,Kappa;,Kcedil;,Kcy;,Kfr;,Kopf;,Kscr;,LJcy;,LT,LT;,Lacute;,Lambda;,Lang;,Laplacetrf;,Larr;,Lcaron;,Lcedil;,Lcy;,LeftAngleBracket;,LeftArrow;,LeftArrowBar;,LeftArrowRightArrow;,LeftCeiling;,LeftDoubleBracket;,LeftDownTeeVector;,LeftDownVector;,LeftDownVectorBar;,LeftFloor;,LeftRightArrow;,LeftRightVector;,LeftTee;,LeftTeeArrow;,LeftTeeVector;,LeftTriangle;,LeftTriangleBar;,LeftTriangleEqual;,LeftUpDownVector;,LeftUpTeeVector;,LeftUpVector;,LeftUpVectorBar;,LeftVector;,LeftVectorBar;,Leftarrow;,Leftrightarrow;,LessEqualGreater;,LessFullEqual;,LessGreater;,LessLess;,LessSlantEqual;,LessTilde;,Lfr;,Ll;,Lleftarrow;,Lmidot;,LongLeftArrow;,LongLeftRightArrow;,LongRightArrow;,Longleftarrow;,Longleftrightarrow;,Longrightarrow;,Lopf;,LowerLeftArrow;,LowerRightArrow;,Lscr;,Lsh;,Lstrok;,Lt;,Map;,Mcy;,MediumSpace;,Mellintrf;,Mfr;,MinusPlus;,Mopf;,Mscr;,Mu;,NJcy;,Nacute;,Ncaron;,Ncedil;,Ncy;,NegativeMediumSpace;,NegativeThickSpace;,NegativeThinSpace;,NegativeVeryThinSpace;,NestedGreaterGreater;,NestedLessLess;,NewLine;,Nfr;,NoBreak;,NonBreakingSpace;,Nopf;,Not;,NotCongruent;,NotCupCap;,NotDoubleVerticalBar;,NotElement;,NotEqual;,NotEqualTilde;,NotExists;,NotGreater;,NotGreaterEqual;,NotGreaterFullEqual;,NotGreaterGreater;,NotGreaterLess;,NotGreaterSlantEqual;,NotGreaterTilde;,NotHumpDownHump;,NotHumpEqual;,NotLeftTriangle;,NotLeftTriangleBar;,NotLeftTriangleEqual;,NotLess;,NotLessEqual;,NotLessGreater;,NotLessLess;,NotLessSlantEqual;,NotLessTilde;,NotNestedGreaterGreater;,NotNestedLessLess;,NotPrecedes;,NotPrecedesEqual;,NotPrecedesSlantEqual;,NotReverseElement;,NotRightTriangle;,NotRightTriangleBar;,NotRightTriangleEqual;,NotSquareSubset;,NotSquareSubsetEqual;,NotSquareSuperset;,NotSquareSupersetEqual;,NotSubset;,NotSubsetEqual;,NotSucceeds;,NotSucceedsEqual;,NotSucceedsSlantEqual;,NotSucceedsTilde;,NotSuperset;,NotSupersetEqual;,NotTilde;,NotTildeEqual;,NotTildeFullEqual;,NotTildeTilde;,NotVerticalBar;,Nscr;,Ntilde,Ntilde;,Nu;,OElig;,Oacute,Oacute;,Ocirc,Ocirc;,Ocy;,Odblac;,Ofr;,Ograve,Ograve;,Omacr;,Omega;,Omicron;,Oopf;,OpenCurlyDoubleQuote;,OpenCurlyQuote;,Or;,Oscr;,Oslash,Oslash;,Otilde,Otilde;,Otimes;,Ouml,Ouml;,OverBar;,OverBrace;,OverBracket;,OverParenthesis;,PartialD;,Pcy;,Pfr;,Phi;,Pi;,PlusMinus;,Poincareplane;,Popf;,Pr;,Precedes;,PrecedesEqual;,PrecedesSlantEqual;,PrecedesTilde;,Prime;,Product;,Proportion;,Proportional;,Pscr;,Psi;,QUOT,QUOT;,Qfr;,Qopf;,Qscr;,RBarr;,REG,REG;,Racute;,Rang;,Rarr;,Rarrtl;,Rcaron;,Rcedil;,Rcy;,Re;,ReverseElement;,ReverseEquilibrium;,ReverseUpEquilibrium;,Rfr;,Rho;,RightAngleBracket;,RightArrow;,RightArrowBar;,RightArrowLeftArrow;,RightCeiling;,RightDoubleBracket;,RightDownTeeVector;,RightDownVector;,RightDownVectorBar;,RightFloor;,RightTee;,RightTeeArrow;,RightTeeVector;,RightTriangle;,RightTriangleBar;,RightTriangleEqual;,RightUpDownVector;,RightUpTeeVector;,RightUpVector;,RightUpVectorBar;,RightVector;,RightVectorBar;,Rightarrow;,Ropf;,RoundImplies;,Rrightarrow;,Rscr;,Rsh;,RuleDelayed;,SHCHcy;,SHcy;,SOFTcy;,Sacute;,Sc;,Scaron;,Scedil;,Scirc;,Scy;,Sfr;,ShortDownArrow;,ShortLeftArrow;,ShortRightArrow;,ShortUpArrow;,Sigma;,SmallCircle;,Sopf;,Sqrt;,Square;,SquareIntersection;,SquareSubset;,SquareSubsetEqual;,SquareSuperset;,SquareSupersetEqual;,SquareUnion;,Sscr;,Star;,Sub;,Subset;,SubsetEqual;,Succeeds;,SucceedsEqual;,SucceedsSlantEqual;,SucceedsTilde;,SuchThat;,Sum;,Sup;,Superset;,SupersetEqual;,Supset;,THORN,THORN;,TRADE;,TSHcy;,TScy;,Tab;,Tau;,Tcaron;,Tcedil;,Tcy;,Tfr;,Therefore;,Theta;,ThickSpace;,ThinSpace;,Tilde;,TildeEqual;,TildeFullEqual;,TildeTilde;,Topf;,TripleDot;,Tscr;,Tstrok;,Uacute,Uacute;,Uarr;,Uarrocir;,Ubrcy;,Ubreve;,Ucirc,Ucirc;,Ucy;,Udblac;,Ufr;,Ugrave,Ugrave;,Umacr;,UnderBar;,UnderBrace;,UnderBracket;,UnderParenthesis;,Union;,UnionPlus;,Uogon;,Uopf;,UpArrow;,UpArrowBar;,UpArrowDownArrow;,UpDownArrow;,UpEquilibrium;,UpTee;,UpTeeArrow;,Uparrow;,Updownarrow;,UpperLeftArrow;,UpperRightArrow;,Upsi;,Upsilon;,Uring;,Uscr;,Utilde;,Uuml,Uuml;,VDash;,Vbar;,Vcy;,Vdash;,Vdashl;,Vee;,Verbar;,Vert;,VerticalBar;,VerticalLine;,VerticalSeparator;,VerticalTilde;,VeryThinSpace;,Vfr;,Vopf;,Vscr;,Vvdash;,Wcirc;,Wedge;,Wfr;,Wopf;,Wscr;,Xfr;,Xi;,Xopf;,Xscr;,YAcy;,YIcy;,YUcy;,Yacute,Yacute;,Ycirc;,Ycy;,Yfr;,Yopf;,Yscr;,Yuml;,ZHcy;,Zacute;,Zcaron;,Zcy;,Zdot;,ZeroWidthSpace;,Zeta;,Zfr;,Zopf;,Zscr;,aacute,aacute;,abreve;,ac;,acE;,acd;,acirc,acirc;,acute,acute;,acy;,aelig,aelig;,af;,afr;,agrave,agrave;,alefsym;,aleph;,alpha;,amacr;,amalg;,amp,amp;,and;,andand;,andd;,andslope;,andv;,ang;,ange;,angle;,angmsd;,angmsdaa;,angmsdab;,angmsdac;,angmsdad;,angmsdae;,angmsdaf;,angmsdag;,angmsdah;,angrt;,angrtvb;,angrtvbd;,angsph;,angst;,angzarr;,aogon;,aopf;,ap;,apE;,apacir;,ape;,apid;,apos;,approx;,approxeq;,aring,aring;,ascr;,ast;,asymp;,asympeq;,atilde,atilde;,auml,auml;,awconint;,awint;,bNot;,backcong;,backepsilon;,backprime;,backsim;,backsimeq;,barvee;,barwed;,barwedge;,bbrk;,bbrktbrk;,bcong;,bcy;,bdquo;,becaus;,because;,bemptyv;,bepsi;,bernou;,beta;,beth;,between;,bfr;,bigcap;,bigcirc;,bigcup;,bigodot;,bigoplus;,bigotimes;,bigsqcup;,bigstar;,bigtriangledown;,bigtriangleup;,biguplus;,bigvee;,bigwedge;,bkarow;,blacklozenge;,blacksquare;,blacktriangle;,blacktriangledown;,blacktriangleleft;,blacktriangleright;,blank;,blk12;,blk14;,blk34;,block;,bne;,bnequiv;,bnot;,bopf;,bot;,bottom;,bowtie;,boxDL;,boxDR;,boxDl;,boxDr;,boxH;,boxHD;,boxHU;,boxHd;,boxHu;,boxUL;,boxUR;,boxUl;,boxUr;,boxV;,boxVH;,boxVL;,boxVR;,boxVh;,boxVl;,boxVr;,boxbox;,boxdL;,boxdR;,boxdl;,boxdr;,boxh;,boxhD;,boxhU;,boxhd;,boxhu;,boxminus;,boxplus;,boxtimes;,boxuL;,boxuR;,boxul;,boxur;,boxv;,boxvH;,boxvL;,boxvR;,boxvh;,boxvl;,boxvr;,bprime;,breve;,brvbar,brvbar;,bscr;,bsemi;,bsim;,bsime;,bsol;,bsolb;,bsolhsub;,bull;,bullet;,bump;,bumpE;,bumpe;,bumpeq;,cacute;,cap;,capand;,capbrcup;,capcap;,capcup;,capdot;,caps;,caret;,caron;,ccaps;,ccaron;,ccedil,ccedil;,ccirc;,ccups;,ccupssm;,cdot;,cedil,cedil;,cemptyv;,cent,cent;,centerdot;,cfr;,chcy;,check;,checkmark;,chi;,cir;,cirE;,circ;,circeq;,circlearrowleft;,circlearrowright;,circledR;,circledS;,circledast;,circledcirc;,circleddash;,cire;,cirfnint;,cirmid;,cirscir;,clubs;,clubsuit;,colon;,colone;,coloneq;,comma;,commat;,comp;,compfn;,complement;,complexes;,cong;,congdot;,conint;,copf;,coprod;,copy,copy;,copysr;,crarr;,cross;,cscr;,csub;,csube;,csup;,csupe;,ctdot;,cudarrl;,cudarrr;,cuepr;,cuesc;,cularr;,cularrp;,cup;,cupbrcap;,cupcap;,cupcup;,cupdot;,cupor;,cups;,curarr;,curarrm;,curlyeqprec;,curlyeqsucc;,curlyvee;,curlywedge;,curren,curren;,curvearrowleft;,curvearrowright;,cuvee;,cuwed;,cwconint;,cwint;,cylcty;,dArr;,dHar;,dagger;,daleth;,darr;,dash;,dashv;,dbkarow;,dblac;,dcaron;,dcy;,dd;,ddagger;,ddarr;,ddotseq;,deg,deg;,delta;,demptyv;,dfisht;,dfr;,dharl;,dharr;,diam;,diamond;,diamondsuit;,diams;,die;,digamma;,disin;,div;,divide,divide;,divideontimes;,divonx;,djcy;,dlcorn;,dlcrop;,dollar;,dopf;,dot;,doteq;,doteqdot;,dotminus;,dotplus;,dotsquare;,doublebarwedge;,downarrow;,downdownarrows;,downharpoonleft;,downharpoonright;,drbkarow;,drcorn;,drcrop;,dscr;,dscy;,dsol;,dstrok;,dtdot;,dtri;,dtrif;,duarr;,duhar;,dwangle;,dzcy;,dzigrarr;,eDDot;,eDot;,eacute,eacute;,easter;,ecaron;,ecir;,ecirc,ecirc;,ecolon;,ecy;,edot;,ee;,efDot;,efr;,eg;,egrave,egrave;,egs;,egsdot;,el;,elinters;,ell;,els;,elsdot;,emacr;,empty;,emptyset;,emptyv;,emsp13;,emsp14;,emsp;,eng;,ensp;,eogon;,eopf;,epar;,eparsl;,eplus;,epsi;,epsilon;,epsiv;,eqcirc;,eqcolon;,eqsim;,eqslantgtr;,eqslantless;,equals;,equest;,equiv;,equivDD;,eqvparsl;,erDot;,erarr;,escr;,esdot;,esim;,eta;,eth,eth;,euml,euml;,euro;,excl;,exist;,expectation;,exponentiale;,fallingdotseq;,fcy;,female;,ffilig;,fflig;,ffllig;,ffr;,filig;,fjlig;,flat;,fllig;,fltns;,fnof;,fopf;,forall;,fork;,forkv;,fpartint;,frac12,frac12;,frac13;,frac14,frac14;,frac15;,frac16;,frac18;,frac23;,frac25;,frac34,frac34;,frac35;,frac38;,frac45;,frac56;,frac58;,frac78;,frasl;,frown;,fscr;,gE;,gEl;,gacute;,gamma;,gammad;,gap;,gbreve;,gcirc;,gcy;,gdot;,ge;,gel;,geq;,geqq;,geqslant;,ges;,gescc;,gesdot;,gesdoto;,gesdotol;,gesl;,gesles;,gfr;,gg;,ggg;,gimel;,gjcy;,gl;,glE;,gla;,glj;,gnE;,gnap;,gnapprox;,gne;,gneq;,gneqq;,gnsim;,gopf;,grave;,gscr;,gsim;,gsime;,gsiml;,gt,gt;,gtcc;,gtcir;,gtdot;,gtlPar;,gtquest;,gtrapprox;,gtrarr;,gtrdot;,gtreqless;,gtreqqless;,gtrless;,gtrsim;,gvertneqq;,gvnE;,hArr;,hairsp;,half;,hamilt;,hardcy;,harr;,harrcir;,harrw;,hbar;,hcirc;,hearts;,heartsuit;,hellip;,hercon;,hfr;,hksearow;,hkswarow;,hoarr;,homtht;,hookleftarrow;,hookrightarrow;,hopf;,horbar;,hscr;,hslash;,hstrok;,hybull;,hyphen;,iacute,iacute;,ic;,icirc,icirc;,icy;,iecy;,iexcl,iexcl;,iff;,ifr;,igrave,igrave;,ii;,iiiint;,iiint;,iinfin;,iiota;,ijlig;,imacr;,image;,imagline;,imagpart;,imath;,imof;,imped;,in;,incare;,infin;,infintie;,inodot;,int;,intcal;,integers;,intercal;,intlarhk;,intprod;,iocy;,iogon;,iopf;,iota;,iprod;,iquest,iquest;,iscr;,isin;,isinE;,isindot;,isins;,isinsv;,isinv;,it;,itilde;,iukcy;,iuml,iuml;,jcirc;,jcy;,jfr;,jmath;,jopf;,jscr;,jsercy;,jukcy;,kappa;,kappav;,kcedil;,kcy;,kfr;,kgreen;,khcy;,kjcy;,kopf;,kscr;,lAarr;,lArr;,lAtail;,lBarr;,lE;,lEg;,lHar;,lacute;,laemptyv;,lagran;,lambda;,lang;,langd;,langle;,lap;,laquo,laquo;,larr;,larrb;,larrbfs;,larrfs;,larrhk;,larrlp;,larrpl;,larrsim;,larrtl;,lat;,latail;,late;,lates;,lbarr;,lbbrk;,lbrace;,lbrack;,lbrke;,lbrksld;,lbrkslu;,lcaron;,lcedil;,lceil;,lcub;,lcy;,ldca;,ldquo;,ldquor;,ldrdhar;,ldrushar;,ldsh;,le;,leftarrow;,leftarrowtail;,leftharpoondown;,leftharpoonup;,leftleftarrows;,leftrightarrow;,leftrightarrows;,leftrightharpoons;,leftrightsquigarrow;,leftthreetimes;,leg;,leq;,leqq;,leqslant;,les;,lescc;,lesdot;,lesdoto;,lesdotor;,lesg;,lesges;,lessapprox;,lessdot;,lesseqgtr;,lesseqqgtr;,lessgtr;,lesssim;,lfisht;,lfloor;,lfr;,lg;,lgE;,lhard;,lharu;,lharul;,lhblk;,ljcy;,ll;,llarr;,llcorner;,llhard;,lltri;,lmidot;,lmoust;,lmoustache;,lnE;,lnap;,lnapprox;,lne;,lneq;,lneqq;,lnsim;,loang;,loarr;,lobrk;,longleftarrow;,longleftrightarrow;,longmapsto;,longrightarrow;,looparrowleft;,looparrowright;,lopar;,lopf;,loplus;,lotimes;,lowast;,lowbar;,loz;,lozenge;,lozf;,lpar;,lparlt;,lrarr;,lrcorner;,lrhar;,lrhard;,lrm;,lrtri;,lsaquo;,lscr;,lsh;,lsim;,lsime;,lsimg;,lsqb;,lsquo;,lsquor;,lstrok;,lt,lt;,ltcc;,ltcir;,ltdot;,lthree;,ltimes;,ltlarr;,ltquest;,ltrPar;,ltri;,ltrie;,ltrif;,lurdshar;,luruhar;,lvertneqq;,lvnE;,mDDot;,macr,macr;,male;,malt;,maltese;,map;,mapsto;,mapstodown;,mapstoleft;,mapstoup;,marker;,mcomma;,mcy;,mdash;,measuredangle;,mfr;,mho;,micro,micro;,mid;,midast;,midcir;,middot,middot;,minus;,minusb;,minusd;,minusdu;,mlcp;,mldr;,mnplus;,models;,mopf;,mp;,mscr;,mstpos;,mu;,multimap;,mumap;,nGg;,nGt;,nGtv;,nLeftarrow;,nLeftrightarrow;,nLl;,nLt;,nLtv;,nRightarrow;,nVDash;,nVdash;,nabla;,nacute;,nang;,nap;,napE;,napid;,napos;,napprox;,natur;,natural;,naturals;,nbsp,nbsp;,nbump;,nbumpe;,ncap;,ncaron;,ncedil;,ncong;,ncongdot;,ncup;,ncy;,ndash;,ne;,neArr;,nearhk;,nearr;,nearrow;,nedot;,nequiv;,nesear;,nesim;,nexist;,nexists;,nfr;,ngE;,nge;,ngeq;,ngeqq;,ngeqslant;,nges;,ngsim;,ngt;,ngtr;,nhArr;,nharr;,nhpar;,ni;,nis;,nisd;,niv;,njcy;,nlArr;,nlE;,nlarr;,nldr;,nle;,nleftarrow;,nleftrightarrow;,nleq;,nleqq;,nleqslant;,nles;,nless;,nlsim;,nlt;,nltri;,nltrie;,nmid;,nopf;,not,not;,notin;,notinE;,notindot;,notinva;,notinvb;,notinvc;,notni;,notniva;,notnivb;,notnivc;,npar;,nparallel;,nparsl;,npart;,npolint;,npr;,nprcue;,npre;,nprec;,npreceq;,nrArr;,nrarr;,nrarrc;,nrarrw;,nrightarrow;,nrtri;,nrtrie;,nsc;,nsccue;,nsce;,nscr;,nshortmid;,nshortparallel;,nsim;,nsime;,nsimeq;,nsmid;,nspar;,nsqsube;,nsqsupe;,nsub;,nsubE;,nsube;,nsubset;,nsubseteq;,nsubseteqq;,nsucc;,nsucceq;,nsup;,nsupE;,nsupe;,nsupset;,nsupseteq;,nsupseteqq;,ntgl;,ntilde,ntilde;,ntlg;,ntriangleleft;,ntrianglelefteq;,ntriangleright;,ntrianglerighteq;,nu;,num;,numero;,numsp;,nvDash;,nvHarr;,nvap;,nvdash;,nvge;,nvgt;,nvinfin;,nvlArr;,nvle;,nvlt;,nvltrie;,nvrArr;,nvrtrie;,nvsim;,nwArr;,nwarhk;,nwarr;,nwarrow;,nwnear;,oS;,oacute,oacute;,oast;,ocir;,ocirc,ocirc;,ocy;,odash;,odblac;,odiv;,odot;,odsold;,oelig;,ofcir;,ofr;,ogon;,ograve,ograve;,ogt;,ohbar;,ohm;,oint;,olarr;,olcir;,olcross;,oline;,olt;,omacr;,omega;,omicron;,omid;,ominus;,oopf;,opar;,operp;,oplus;,or;,orarr;,ord;,order;,orderof;,ordf,ordf;,ordm,ordm;,origof;,oror;,orslope;,orv;,oscr;,oslash,oslash;,osol;,otilde,otilde;,otimes;,otimesas;,ouml,ouml;,ovbar;,par;,para,para;,parallel;,parsim;,parsl;,part;,pcy;,percnt;,period;,permil;,perp;,pertenk;,pfr;,phi;,phiv;,phmmat;,phone;,pi;,pitchfork;,piv;,planck;,planckh;,plankv;,plus;,plusacir;,plusb;,pluscir;,plusdo;,plusdu;,pluse;,plusmn,plusmn;,plussim;,plustwo;,pm;,pointint;,popf;,pound,pound;,pr;,prE;,prap;,prcue;,pre;,prec;,precapprox;,preccurlyeq;,preceq;,precnapprox;,precneqq;,precnsim;,precsim;,prime;,primes;,prnE;,prnap;,prnsim;,prod;,profalar;,profline;,profsurf;,prop;,propto;,prsim;,prurel;,pscr;,psi;,puncsp;,qfr;,qint;,qopf;,qprime;,qscr;,quaternions;,quatint;,quest;,questeq;,quot,quot;,rAarr;,rArr;,rAtail;,rBarr;,rHar;,race;,racute;,radic;,raemptyv;,rang;,rangd;,range;,rangle;,raquo,raquo;,rarr;,rarrap;,rarrb;,rarrbfs;,rarrc;,rarrfs;,rarrhk;,rarrlp;,rarrpl;,rarrsim;,rarrtl;,rarrw;,ratail;,ratio;,rationals;,rbarr;,rbbrk;,rbrace;,rbrack;,rbrke;,rbrksld;,rbrkslu;,rcaron;,rcedil;,rceil;,rcub;,rcy;,rdca;,rdldhar;,rdquo;,rdquor;,rdsh;,real;,realine;,realpart;,reals;,rect;,reg,reg;,rfisht;,rfloor;,rfr;,rhard;,rharu;,rharul;,rho;,rhov;,rightarrow;,rightarrowtail;,rightharpoondown;,rightharpoonup;,rightleftarrows;,rightleftharpoons;,rightrightarrows;,rightsquigarrow;,rightthreetimes;,ring;,risingdotseq;,rlarr;,rlhar;,rlm;,rmoust;,rmoustache;,rnmid;,roang;,roarr;,robrk;,ropar;,ropf;,roplus;,rotimes;,rpar;,rpargt;,rppolint;,rrarr;,rsaquo;,rscr;,rsh;,rsqb;,rsquo;,rsquor;,rthree;,rtimes;,rtri;,rtrie;,rtrif;,rtriltri;,ruluhar;,rx;,sacute;,sbquo;,sc;,scE;,scap;,scaron;,sccue;,sce;,scedil;,scirc;,scnE;,scnap;,scnsim;,scpolint;,scsim;,scy;,sdot;,sdotb;,sdote;,seArr;,searhk;,searr;,searrow;,sect,sect;,semi;,seswar;,setminus;,setmn;,sext;,sfr;,sfrown;,sharp;,shchcy;,shcy;,shortmid;,shortparallel;,shy,shy;,sigma;,sigmaf;,sigmav;,sim;,simdot;,sime;,simeq;,simg;,simgE;,siml;,simlE;,simne;,simplus;,simrarr;,slarr;,smallsetminus;,smashp;,smeparsl;,smid;,smile;,smt;,smte;,smtes;,softcy;,sol;,solb;,solbar;,sopf;,spades;,spadesuit;,spar;,sqcap;,sqcaps;,sqcup;,sqcups;,sqsub;,sqsube;,sqsubset;,sqsubseteq;,sqsup;,sqsupe;,sqsupset;,sqsupseteq;,squ;,square;,squarf;,squf;,srarr;,sscr;,ssetmn;,ssmile;,sstarf;,star;,starf;,straightepsilon;,straightphi;,strns;,sub;,subE;,subdot;,sube;,subedot;,submult;,subnE;,subne;,subplus;,subrarr;,subset;,subseteq;,subseteqq;,subsetneq;,subsetneqq;,subsim;,subsub;,subsup;,succ;,succapprox;,succcurlyeq;,succeq;,succnapprox;,succneqq;,succnsim;,succsim;,sum;,sung;,sup1,sup1;,sup2,sup2;,sup3,sup3;,sup;,supE;,supdot;,supdsub;,supe;,supedot;,suphsol;,suphsub;,suplarr;,supmult;,supnE;,supne;,supplus;,supset;,supseteq;,supseteqq;,supsetneq;,supsetneqq;,supsim;,supsub;,supsup;,swArr;,swarhk;,swarr;,swarrow;,swnwar;,szlig,szlig;,target;,tau;,tbrk;,tcaron;,tcedil;,tcy;,tdot;,telrec;,tfr;,there4;,therefore;,theta;,thetasym;,thetav;,thickapprox;,thicksim;,thinsp;,thkap;,thksim;,thorn,thorn;,tilde;,times,times;,timesb;,timesbar;,timesd;,tint;,toea;,top;,topbot;,topcir;,topf;,topfork;,tosa;,tprime;,trade;,triangle;,triangledown;,triangleleft;,trianglelefteq;,triangleq;,triangleright;,trianglerighteq;,tridot;,trie;,triminus;,triplus;,trisb;,tritime;,trpezium;,tscr;,tscy;,tshcy;,tstrok;,twixt;,twoheadleftarrow;,twoheadrightarrow;,uArr;,uHar;,uacute,uacute;,uarr;,ubrcy;,ubreve;,ucirc,ucirc;,ucy;,udarr;,udblac;,udhar;,ufisht;,ufr;,ugrave,ugrave;,uharl;,uharr;,uhblk;,ulcorn;,ulcorner;,ulcrop;,ultri;,umacr;,uml,uml;,uogon;,uopf;,uparrow;,updownarrow;,upharpoonleft;,upharpoonright;,uplus;,upsi;,upsih;,upsilon;,upuparrows;,urcorn;,urcorner;,urcrop;,uring;,urtri;,uscr;,utdot;,utilde;,utri;,utrif;,uuarr;,uuml,uuml;,uwangle;,vArr;,vBar;,vBarv;,vDash;,vangrt;,varepsilon;,varkappa;,varnothing;,varphi;,varpi;,varpropto;,varr;,varrho;,varsigma;,varsubsetneq;,varsubsetneqq;,varsupsetneq;,varsupsetneqq;,vartheta;,vartriangleleft;,vartriangleright;,vcy;,vdash;,vee;,veebar;,veeeq;,vellip;,verbar;,vert;,vfr;,vltri;,vnsub;,vnsup;,vopf;,vprop;,vrtri;,vscr;,vsubnE;,vsubne;,vsupnE;,vsupne;,vzigzag;,wcirc;,wedbar;,wedge;,wedgeq;,weierp;,wfr;,wopf;,wp;,wr;,wreath;,wscr;,xcap;,xcirc;,xcup;,xdtri;,xfr;,xhArr;,xharr;,xi;,xlArr;,xlarr;,xmap;,xnis;,xodot;,xopf;,xoplus;,xotime;,xrArr;,xrarr;,xscr;,xsqcup;,xuplus;,xutri;,xvee;,xwedge;,yacute,yacute;,yacy;,ycirc;,ycy;,yen,yen;,yfr;,yicy;,yopf;,yscr;,yucy;,yuml,yuml;,zacute;,zcaron;,zcy;,zdot;,zeetrf;,zeta;,zfr;,zhcy;,zigrarr;,zopf;,zscr;,zwj;,zwnj;`,Ga=`1Æ1Æ1&1&1Á1Á1Ă1Â1Â1А2𝔄1À1À1Α1Ā1⩓1Ą2𝔸11Å1Å2𝒜1≔1Ã1Ã1Ä1Ä1∖1⫧1⌆1Б1∵1ℬ1Β2𝔅2𝔹1˘1ℬ1≎1Ч1©1©1Ć1⋒1ⅅ1ℭ1Č1Ç1Ç1Ĉ1∰1Ċ1¸1·1ℭ1Χ1⊙1⊖1⊕1⊗1∲1”1’1∷1⩴1≡1∯1∮1ℂ1∐1∳1⨯2𝒞1⋓1≍1ⅅ1⤑1Ђ1Ѕ1Џ1‡1↡1⫤1Ď1Д1∇1Δ2𝔇1´1˙1˝1\`1˜1⋄1ⅆ2𝔻1¨1⃜1≐1∯1¨1⇓1⇐1⇔1⫤1⟸1⟺1⟹1⇒1⊨1⇑1⇕1∥1↓1⤓1⇵1̑1⥐1⥞1↽1⥖1⥟1⇁1⥗1⊤1↧1⇓2𝒟1Đ1Ŋ1Ð1Ð1É1É1Ě1Ê1Ê1Э1Ė2𝔈1È1È1∈1Ē1◻1▫1Ę2𝔼1Ε1⩵1≂1⇌1ℰ1⩳1Η1Ë1Ë1∃1ⅇ1Ф2𝔉1◼1▪2𝔽1∀1ℱ1ℱ1Ѓ1>1>1Γ1Ϝ1Ğ1Ģ1Ĝ1Г1Ġ2𝔊1⋙2𝔾1≥1⋛1≧1⪢1≷1⩾1≳2𝒢1≫1Ъ1ˇ1^1Ĥ1ℌ1ℋ1ℍ1─1ℋ1Ħ1≎1≏1Е1IJ1Ё1Í1Í1Î1Î1И1İ1ℑ1Ì1Ì1ℑ1Ī1ⅈ1⇒1∬1∫1⋂111Į2𝕀1Ι1ℐ1Ĩ1І1Ï1Ï1Ĵ1Й2𝔍2𝕁2𝒥1Ј1Є1Х1Ќ1Κ1Ķ1К2𝔎2𝕂2𝒦1Љ1<1<1Ĺ1Λ1⟪1ℒ1↞1Ľ1Ļ1Л1⟨1←1⇤1⇆1⌈1⟦1⥡1⇃1⥙1⌊1↔1⥎1⊣1↤1⥚1⊲1⧏1⊴1⥑1⥠1↿1⥘1↼1⥒1⇐1⇔1⋚1≦1≶1⪡1⩽1≲2𝔏1⋘1⇚1Ŀ1⟵1⟷1⟶1⟸1⟺1⟹2𝕃1↙1↘1ℒ1↰1Ł1≪1⤅1М1 1ℳ2𝔐1∓2𝕄1ℳ1Μ1Њ1Ń1Ň1Ņ1Н11111≫1≪1
|
|
3
3
|
2𝔑11\xA01ℕ1⫬1≢1≭1∦1∉1≠2≂̸1∄1≯1≱2≧̸2≫̸1≹2⩾̸1≵2≎̸2≏̸1⋪2⧏̸1⋬1≮1≰1≸2≪̸2⩽̸1≴2⪢̸2⪡̸1⊀2⪯̸1⋠1∌1⋫2⧐̸1⋭2⊏̸1⋢2⊐̸1⋣2⊂⃒1⊈1⊁2⪰̸1⋡2≿̸2⊃⃒1⊉1≁1≄1≇1≉1∤2𝒩1Ñ1Ñ1Ν1Œ1Ó1Ó1Ô1Ô1О1Ő2𝔒1Ò1Ò1Ō1Ω1Ο2𝕆1“1‘1⩔2𝒪1Ø1Ø1Õ1Õ1⨷1Ö1Ö1‾1⏞1⎴1⏜1∂1П2𝔓1Φ1Π1±1ℌ1ℙ1⪻1≺1⪯1≼1≾1″1∏1∷1∝2𝒫1Ψ1"1"2𝔔1ℚ2𝒬1⤐1®1®1Ŕ1⟫1↠1⤖1Ř1Ŗ1Р1ℜ1∋1⇋1⥯1ℜ1Ρ1⟩1→1⇥1⇄1⌉1⟧1⥝1⇂1⥕1⌋1⊢1↦1⥛1⊳1⧐1⊵1⥏1⥜1↾1⥔1⇀1⥓1⇒1ℝ1⥰1⇛1ℛ1↱1⧴1Щ1Ш1Ь1Ś1⪼1Š1Ş1Ŝ1С2𝔖1↓1←1→1↑1Σ1∘2𝕊1√1□1⊓1⊏1⊑1⊐1⊒1⊔2𝒮1⋆1⋐1⋐1⊆1≻1⪰1≽1≿1∋1∑1⋑1⊃1⊇1⋑1Þ1Þ1™1Ћ1Ц1 1Τ1Ť1Ţ1Т2𝔗1∴1Θ2 1 1∼1≃1≅1≈2𝕋1⃛2𝒯1Ŧ1Ú1Ú1↟1⥉1Ў1Ŭ1Û1Û1У1Ű2𝔘1Ù1Ù1Ū1_1⏟1⎵1⏝1⋃1⊎1Ų2𝕌1↑1⤒1⇅1↕1⥮1⊥1↥1⇑1⇕1↖1↗1ϒ1Υ1Ů2𝒰1Ũ1Ü1Ü1⊫1⫫1В1⊩1⫦1⋁1‖1‖1∣1|1❘1≀1 2𝔙2𝕍2𝒱1⊪1Ŵ1⋀2𝔚2𝕎2𝒲2𝔛1Ξ2𝕏2𝒳1Я1Ї1Ю1Ý1Ý1Ŷ1Ы2𝔜2𝕐2𝒴1Ÿ1Ж1Ź1Ž1З1Ż11Ζ1ℨ1ℤ2𝒵1á1á1ă1∾2∾̳1∿1â1â1´1´1а1æ1æ12𝔞1à1à1ℵ1ℵ1α1ā1⨿1&1&1∧1⩕1⩜1⩘1⩚1∠1⦤1∠1∡1⦨1⦩1⦪1⦫1⦬1⦭1⦮1⦯1∟1⊾1⦝1∢1Å1⍼1ą2𝕒1≈1⩰1⩯1≊1≋1'1≈1≊1å1å2𝒶1*1≈1≍1ã1ã1ä1ä1∳1⨑1⫭1≌1϶1‵1∽1⋍1⊽1⌅1⌅1⎵1⎶1≌1б1„1∵1∵1⦰1϶1ℬ1β1ℶ1≬2𝔟1⋂1◯1⋃1⨀1⨁1⨂1⨆1★1▽1△1⨄1⋁1⋀1⤍1⧫1▪1▴1▾1◂1▸1␣1▒1░1▓1█2=⃥2≡⃥1⌐2𝕓1⊥1⊥1⋈1╗1╔1╖1╓1═1╦1╩1╤1╧1╝1╚1╜1╙1║1╬1╣1╠1╫1╢1╟1⧉1╕1╒1┐1┌1─1╥1╨1┬1┴1⊟1⊞1⊠1╛1╘1┘1└1│1╪1╡1╞1┼1┤1├1‵1˘1¦1¦2𝒷1⁏1∽1⋍1\\1⧅1⟈1•1•1≎1⪮1≏1≏1ć1∩1⩄1⩉1⩋1⩇1⩀2∩︀1⁁1ˇ1⩍1č1ç1ç1ĉ1⩌1⩐1ċ1¸1¸1⦲1¢1¢1·2𝔠1ч1✓1✓1χ1○1⧃1ˆ1≗1↺1↻1®1Ⓢ1⊛1⊚1⊝1≗1⨐1⫯1⧂1♣1♣1:1≔1≔1,1@1∁1∘1∁1ℂ1≅1⩭1∮2𝕔1∐1©1©1℗1↵1✗2𝒸1⫏1⫑1⫐1⫒1⋯1⤸1⤵1⋞1⋟1↶1⤽1∪1⩈1⩆1⩊1⊍1⩅2∪︀1↷1⤼1⋞1⋟1⋎1⋏1¤1¤1↶1↷1⋎1⋏1∲1∱1⌭1⇓1⥥1†1ℸ1↓1‐1⊣1⤏1˝1ď1д1ⅆ1‡1⇊1⩷1°1°1δ1⦱1⥿2𝔡1⇃1⇂1⋄1⋄1♦1♦1¨1ϝ1⋲1÷1÷1÷1⋇1⋇1ђ1⌞1⌍1$2𝕕1˙1≐1≑1∸1∔1⊡1⌆1↓1⇊1⇃1⇂1⤐1⌟1⌌2𝒹1ѕ1⧶1đ1⋱1▿1▾1⇵1⥯1⦦1џ1⟿1⩷1≑1é1é1⩮1ě1≖1ê1ê1≕1э1ė1ⅇ1≒2𝔢1⪚1è1è1⪖1⪘1⪙1⏧1ℓ1⪕1⪗1ē1∅1∅1∅1 1 1 1ŋ1 1ę2𝕖1⋕1⧣1⩱1ε1ε1ϵ1≖1≕1≂1⪖1⪕1=1≟1≡1⩸1⧥1≓1⥱1ℯ1≐1≂1η1ð1ð1ë1ë1€1!1∃1ℰ1ⅇ1≒1ф1♀1ffi1ff1ffl2𝔣1fi2fj1♭1fl1▱1ƒ2𝕗1∀1⋔1⫙1⨍1½1½1⅓1¼1¼1⅕1⅙1⅛1⅔1⅖1¾1¾1⅗1⅜1⅘1⅚1⅝1⅞1⁄1⌢2𝒻1≧1⪌1ǵ1γ1ϝ1⪆1ğ1ĝ1г1ġ1≥1⋛1≥1≧1⩾1⩾1⪩1⪀1⪂1⪄2⋛︀1⪔2𝔤1≫1⋙1ℷ1ѓ1≷1⪒1⪥1⪤1≩1⪊1⪊1⪈1⪈1≩1⋧2𝕘1\`1ℊ1≳1⪎1⪐1>1>1⪧1⩺1⋗1⦕1⩼1⪆1⥸1⋗1⋛1⪌1≷1≳2≩︀2≩︀1⇔1 1½1ℋ1ъ1↔1⥈1↭1ℏ1ĥ1♥1♥1…1⊹2𝔥1⤥1⤦1⇿1∻1↩1↪2𝕙1―2𝒽1ℏ1ħ1⁃1‐1í1í11î1î1и1е1¡1¡1⇔2𝔦1ì1ì1ⅈ1⨌1∭1⧜1℩1ij1ī1ℑ1ℐ1ℑ1ı1⊷1Ƶ1∈1℅1∞1⧝1ı1∫1⊺1ℤ1⊺1⨗1⨼1ё1į2𝕚1ι1⨼1¿1¿2𝒾1∈1⋹1⋵1⋴1⋳1∈11ĩ1і1ï1ï1ĵ1й2𝔧1ȷ2𝕛2𝒿1ј1є1κ1ϰ1ķ1к2𝔨1ĸ1х1ќ2𝕜2𝓀1⇚1⇐1⤛1⤎1≦1⪋1⥢1ĺ1⦴1ℒ1λ1⟨1⦑1⟨1⪅1«1«1←1⇤1⤟1⤝1↩1↫1⤹1⥳1↢1⪫1⤙1⪭2⪭︀1⤌1❲1{1[1⦋1⦏1⦍1ľ1ļ1⌈1{1л1⤶1“1„1⥧1⥋1↲1≤1←1↢1↽1↼1⇇1↔1⇆1⇋1↭1⋋1⋚1≤1≦1⩽1⩽1⪨1⩿1⪁1⪃2⋚︀1⪓1⪅1⋖1⋚1⪋1≶1≲1⥼1⌊2𝔩1≶1⪑1↽1↼1⥪1▄1љ1≪1⇇1⌞1⥫1◺1ŀ1⎰1⎰1≨1⪉1⪉1⪇1⪇1≨1⋦1⟬1⇽1⟦1⟵1⟷1⟼1⟶1↫1↬1⦅2𝕝1⨭1⨴1∗1_1◊1◊1⧫1(1⦓1⇆1⌟1⇋1⥭11⊿1‹2𝓁1↰1≲1⪍1⪏1[1‘1‚1ł1<1<1⪦1⩹1⋖1⋋1⋉1⥶1⩻1⦖1◃1⊴1◂1⥊1⥦2≨︀2≨︀1∺1¯1¯1♂1✠1✠1↦1↦1↧1↤1↥1▮1⨩1м1—1∡2𝔪1℧1µ1µ1∣1*1⫰1·1·1−1⊟1∸1⨪1⫛1…1∓1⊧2𝕞1∓2𝓂1∾1μ1⊸1⊸2⋙̸2≫⃒2≫̸1⇍1⇎2⋘̸2≪⃒2≪̸1⇏1⊯1⊮1∇1ń2∠⃒1≉2⩰̸2≋̸1ʼn1≉1♮1♮1ℕ1\xA01\xA02≎̸2≏̸1⩃1ň1ņ1≇2⩭̸1⩂1н1–1≠1⇗1⤤1↗1↗2≐̸1≢1⤨2≂̸1∄1∄2𝔫2≧̸1≱1≱2≧̸2⩾̸2⩾̸1≵1≯1≯1⇎1↮1⫲1∋1⋼1⋺1∋1њ1⇍2≦̸1↚1‥1≰1↚1↮1≰2≦̸2⩽̸2⩽̸1≮1≴1≮1⋪1⋬1∤2𝕟1¬1¬1∉2⋹̸2⋵̸1∉1⋷1⋶1∌1∌1⋾1⋽1∦1∦2⫽⃥2∂̸1⨔1⊀1⋠2⪯̸1⊀2⪯̸1⇏1↛2⤳̸2↝̸1↛1⋫1⋭1⊁1⋡2⪰̸2𝓃1∤1∦1≁1≄1≄1∤1∦1⋢1⋣1⊄2⫅̸1⊈2⊂⃒1⊈2⫅̸1⊁2⪰̸1⊅2⫆̸1⊉2⊃⃒1⊉2⫆̸1≹1ñ1ñ1≸1⋪1⋬1⋫1⋭1ν1#1№1 1⊭1⤄2≍⃒1⊬2≥⃒2>⃒1⧞1⤂2≤⃒2<⃒2⊴⃒1⤃2⊵⃒2∼⃒1⇖1⤣1↖1↖1⤧1Ⓢ1ó1ó1⊛1⊚1ô1ô1о1⊝1ő1⨸1⊙1⦼1œ1⦿2𝔬1˛1ò1ò1⧁1⦵1Ω1∮1↺1⦾1⦻1‾1⧀1ō1ω1ο1⦶1⊖2𝕠1⦷1⦹1⊕1∨1↻1⩝1ℴ1ℴ1ª1ª1º1º1⊶1⩖1⩗1⩛1ℴ1ø1ø1⊘1õ1õ1⊗1⨶1ö1ö1⌽1∥1¶1¶1∥1⫳1⫽1∂1п1%1.1‰1⊥1‱2𝔭1φ1ϕ1ℳ1☎1π1⋔1ϖ1ℏ1ℎ1ℏ1+1⨣1⊞1⨢1∔1⨥1⩲1±1±1⨦1⨧1±1⨕2𝕡1£1£1≺1⪳1⪷1≼1⪯1≺1⪷1≼1⪯1⪹1⪵1⋨1≾1′1ℙ1⪵1⪹1⋨1∏1⌮1⌒1⌓1∝1∝1≾1⊰2𝓅1ψ1 2𝔮1⨌2𝕢1⁗2𝓆1ℍ1⨖1?1≟1"1"1⇛1⇒1⤜1⤏1⥤2∽̱1ŕ1√1⦳1⟩1⦒1⦥1⟩1»1»1→1⥵1⇥1⤠1⤳1⤞1↪1↬1⥅1⥴1↣1↝1⤚1∶1ℚ1⤍1❳1}1]1⦌1⦎1⦐1ř1ŗ1⌉1}1р1⤷1⥩1”1”1↳1ℜ1ℛ1ℜ1ℝ1▭1®1®1⥽1⌋2𝔯1⇁1⇀1⥬1ρ1ϱ1→1↣1⇁1⇀1⇄1⇌1⇉1↝1⋌1˚1≓1⇄1⇌11⎱1⎱1⫮1⟭1⇾1⟧1⦆2𝕣1⨮1⨵1)1⦔1⨒1⇉1›2𝓇1↱1]1’1’1⋌1⋊1▹1⊵1▸1⧎1⥨1℞1ś1‚1≻1⪴1⪸1š1≽1⪰1ş1ŝ1⪶1⪺1⋩1⨓1≿1с1⋅1⊡1⩦1⇘1⤥1↘1↘1§1§1;1⤩1∖1∖1✶2𝔰1⌢1♯1щ1ш1∣1∥111σ1ς1ς1∼1⩪1≃1≃1⪞1⪠1⪝1⪟1≆1⨤1⥲1←1∖1⨳1⧤1∣1⌣1⪪1⪬2⪬︀1ь1/1⧄1⌿2𝕤1♠1♠1∥1⊓2⊓︀1⊔2⊔︀1⊏1⊑1⊏1⊑1⊐1⊒1⊐1⊒1□1□1▪1▪1→2𝓈1∖1⌣1⋆1☆1★1ϵ1ϕ1¯1⊂1⫅1⪽1⊆1⫃1⫁1⫋1⊊1⪿1⥹1⊂1⊆1⫅1⊊1⫋1⫇1⫕1⫓1≻1⪸1≽1⪰1⪺1⪶1⋩1≿1∑1♪1¹1¹1²1²1³1³1⊃1⫆1⪾1⫘1⊇1⫄1⟉1⫗1⥻1⫂1⫌1⊋1⫀1⊃1⊇1⫆1⊋1⫌1⫈1⫔1⫖1⇙1⤦1↙1↙1⤪1ß1ß1⌖1τ1⎴1ť1ţ1т1⃛1⌕2𝔱1∴1∴1θ1ϑ1ϑ1≈1∼1 1≈1∼1þ1þ1˜1×1×1⊠1⨱1⨰1∭1⤨1⊤1⌶1⫱2𝕥1⫚1⤩1‴1™1▵1▿1◃1⊴1≜1▹1⊵1◬1≜1⨺1⨹1⧍1⨻1⏢2𝓉1ц1ћ1ŧ1≬1↞1↠1⇑1⥣1ú1ú1↑1ў1ŭ1û1û1у1⇅1ű1⥮1⥾2𝔲1ù1ù1↿1↾1▀1⌜1⌜1⌏1◸1ū1¨1¨1ų2𝕦1↑1↕1↿1↾1⊎1υ1ϒ1υ1⇈1⌝1⌝1⌎1ů1◹2𝓊1⋰1ũ1▵1▴1⇈1ü1ü1⦧1⇕1⫨1⫩1⊨1⦜1ϵ1ϰ1∅1ϕ1ϖ1∝1↕1ϱ1ς2⊊︀2⫋︀2⊋︀2⫌︀1ϑ1⊲1⊳1в1⊢1∨1⊻1≚1⋮1|1|2𝔳1⊲2⊂⃒2⊃⃒2𝕧1∝1⊳2𝓋2⫋︀2⊊︀2⫌︀2⊋︀1⦚1ŵ1⩟1∧1≙1℘2𝔴2𝕨1℘1≀1≀2𝓌1⋂1◯1⋃1▽2𝔵1⟺1⟷1ξ1⟸1⟵1⟼1⋻1⨀2𝕩1⨁1⨂1⟹1⟶2𝓍1⨆1⨄1△1⋁1⋀1ý1ý1я1ŷ1ы1¥1¥2𝔶1ї2𝕪2𝓎1ю1ÿ1ÿ1ź1ž1з1ż1ℨ1ζ2𝔷1ж1⇝2𝕫2𝓏11`;let Ka=!1,qa=/* @__PURE__ */ new Int32Array,Ja=/* @__PURE__ */ new Int32Array,Ya=/* @__PURE__ */ new Uint8Array,Xa=/* @__PURE__ */ new Int32Array;const Za=/* @__PURE__ */ new Int32Array(128);let Qa=/* @__PURE__ */ new Int32Array;const $a=[];let eo=0,to=0;function newNode(e){let t=eo++;return qa[t]=-1,Ja[t]=-1,Ya[t]=e,Xa[t]=-1,t}function build(){Ka=!0;let e=18872;qa=new Int32Array(e),Ja=new Int32Array(e),Ya=new Uint8Array(e),Xa=new Int32Array(e),Za.fill(-1);let t=0;for(let e=0;e<2231;e++){let e=Ga.charCodeAt(t)-48;$a.push(Ga.slice(t+1,t+1+e)),t+=1+e}let n=0,r=0,i=18871;for(;n<i;){let e=Wa.charCodeAt(n),t=Za[e];for(t<0&&(t=newNode(e),Za[e]=t),n++;n<i;){let e=Wa.charCodeAt(n);if(e===44)break;let r=qa[t],i=-1,a=-1;for(;r>=0;){if(Ya[r]===e){i=r;break}a=r,r=Ja[r]}i<0&&(i=newNode(e),a<0?qa[t]=i:Ja[a]=i),t=i,n++}Xa[t]=r++,n++}Qa=(/* @__PURE__ */ new Int32Array(16384)).fill(-1);for(let e=0;e<128;e++){let t=Za[e];if(!(t<0))for(let n=qa[t];n>=0;n=Ja[n])Qa[e*128+Ya[n]]=n}}function matchNamedReference(e,t){Ka||build(),to=0;let n=e.length;if(t>=n)return-1;let r=e.charCodeAt(t);if(r>=128)return-1;let i=Za[r];if(i<0)return-1;let a=-1,o=0,s=t+1;if(Xa[i]>=0&&(a=Xa[i],o=1),s<n){let t=e.charCodeAt(s),n=t<128?Qa[r*128+t]:-1;if(n<0)return to=o,a;i=n,s++,Xa[i]>=0&&(a=Xa[i],o=2)}for(;s<n;){let n=e.charCodeAt(s),r=qa[i];for(;r>=0&&Ya[r]!==n;)r=Ja[r];if(r<0)break;i=r,s++,Xa[i]>=0&&(a=Xa[i],o=s-t)}return to=o,a}function matchedLength(){return to}function entityValue(e){return $a[e]}const no=new Int32Array([8364,129,8218,402,8222,8230,8224,8225,710,8240,352,8249,338,141,381,143,144,8216,8217,8220,8221,8226,8211,8212,732,8482,353,8250,339,157,382,376]);function numericReferenceValue(e){return e===0||e>1114111||e>=55296&&e<=57343?`�`:e>=128&&e<=159?String.fromCharCode(no[e-128]):String.fromCodePoint(e)}const ro=/* @__PURE__ */ `.a.abbr.address.applet.area.article.aside.audio.b.base.basefont.bgsound.big.blockquote.body.br.button.canvas.caption.center.cite.code.col.colgroup.data.datalist.dd.del.details.dfn.dialog.dir.div.dl.dt.em.embed.fieldset.figcaption.figure.font.footer.form.frame.frameset.h1.h2.h3.h4.h5.h6.head.header.hgroup.hr.html.i.iframe.image.img.input.ins.kbd.keygen.label.legend.li.link.listing.main.map.mark.marquee.math.menu.menuitem.meta.meter.nav.nobr.noembed.noframes.noscript.object.ol.optgroup.option.output.p.param.picture.plaintext.pre.progress.q.rb.rp.rt.rtc.ruby.s.samp.script.search.section.select.selectedcontent.slot.small.source.span.strike.strong.style.sub.summary.sup.svg.table.tbody.td.template.textarea.tfoot.th.thead.time.title.tr.track.tt.u.ul.var.video.wbr.xmp.path.g.circle.rect.line.polyline.polygon.ellipse.defs.use.symbol.clippath.lineargradient.radialgradient.stop.mask.pattern.text.tspan.textpath.foreignobject.desc.mi.mo.mn.ms.mtext.mrow.annotation-xml.mglyph.malignmark`.split(`.`),io=/* @__PURE__ */ `.id.class.style.type.name.value.href.src.alt.title.role.for.placeholder.disabled.checked.selected.readonly.required.multiple.hidden.tabindex.lang.dir.width.height.action.method.target.rel.content.charset.colspan.rowspan.data-testid.aria-label.aria-labelledby.aria-describedby.aria-hidden.aria-expanded.aria-selected.aria-checked.aria-pressed.aria-disabled.aria-controls.aria-live.aria-current.aria-haspopup.aria-invalid.aria-required.aria-valuenow.aria-valuemin.aria-valuemax.aria-level.aria-modal.aria-owns.aria-busy.aria-orientation.aria-roledescription.autocomplete.autofocus.min.max.step.pattern.maxlength.minlength.size.accept.label.open.draggable.contenteditable.xmlns.viewbox.d.fill.stroke.x.y.cx.cy.r.points.transform.xlink:href.focusable.form.list.datetime.headers.scope.span.start.reversed.download.enctype.novalidate.inputmode.spellcheck.translate.inert.popover.slot.is.part.loading.decoding.srcset.sizes.media.async.defer.nonce.integrity.crossorigin.referrerpolicy.sandbox.allow.poster.controls.autoplay.loop.muted.kind.srclang.default.wrap.rows.cols.high.low.optimum.shape.coords.usemap.ismap.accesskey.enterkeyhint.itemprop.itemscope.itemtype.http-equiv.property.stroke-width.stroke-linecap.stroke-linejoin.fill-rule.clip-rule.xmlns:xlink.version.preserveaspectratio.encoding.definitionurl.color.face.shadowrootmode`.split(`.`),ao=1023,oo=/* @__PURE__ */ new Int32Array(1024),so=/* @__PURE__ */ new Int32Array(1024);function hashName(e){let t=0;for(let n=0;n<e.length;n++)t=Math.imul(t,31)+e.charCodeAt(n)|0;return t}function fillTable(e,t){for(let n=1;n<t.length;n++){let r=hashName(t[n])&ao;for(;e[r]!==0;)r=r+1&ao;e[r]=n}}fillTable(oo,ro),fillTable(so,io);function fixName(e){let t=``;for(let n=0;n<e.length;n++){let r=e.charCodeAt(n);t+=r>=65&&r<=90?String.fromCharCode(r+32):r===0?`�`:e[n]}return t}function isAsciiAlpha(e){return e>=97&&e<=122||e>=65&&e<=90}function isAsciiAlnum(e){return e>=97&&e<=122||e>=65&&e<=90||e>=48&&e<=57}function isWs$1(e){return e===32||e===10||e===9||e===12}__name(isWs$1,`isWs`);function lower$1(e){return e>=65&&e<=90?e+32:e}__name(lower$1,`lower`);function normalizeNewlines$1(e){let t=e.indexOf(`\r`);if(t<0)return e;let n=``,r=0,i=e.length;for(;t>=0;)n+=e.slice(r,t)+`
|
|
4
4
|
`,r=t+1,r<i&&e.charCodeAt(r)===10&&r++,t=e.indexOf(`\r`,r);return n+e.slice(r)}__name(normalizeNewlines$1,`normalizeNewlines`);function ciMatch(e,t,n){if(t+n.length>e.length)return!1;for(let r=0;r<n.length;r++)if(lower$1(e.charCodeAt(t+r))!==n.charCodeAt(r))return!1;return!0}var Tokenizer=class{src;pos;len;state;allowCDATA;processingInstructions;lastStartTag;type;pendingType;text;textHasNull;name;tagId;selfClosing;attrNames;attrValues;attrCount;data;hasName;publicId;hasPublicId;systemId;hasSystemId;forceQuirks;textStart;textBuf;tagStart;nameStart;nameHash;nameFix;isEndTag;valueStart;valueBuf;dropAttr;tempBuf;constructor(){this.src=``,this.pos=0,this.len=0,this.state=0,this.allowCDATA=!1,this.processingInstructions=!1,this.lastStartTag=``,this.type=0,this.pendingType=0,this.text=``,this.textHasNull=!1,this.name=``,this.tagId=0,this.selfClosing=!1,this.attrNames=[],this.attrValues=[],this.attrCount=0,this.data=``,this.hasName=!1,this.publicId=``,this.hasPublicId=!1,this.systemId=``,this.hasSystemId=!1,this.forceQuirks=!1,this.textStart=-1,this.textBuf=``,this.tagStart=0,this.nameStart=0,this.nameHash=0,this.nameFix=!1,this.isEndTag=!1,this.valueStart=-1,this.valueBuf=``,this.dropAttr=!1,this.tempBuf=``}reset(e){this.src=normalizeNewlines$1(e),this.pos=0,this.len=this.src.length,this.state=0,this.allowCDATA=!1,this.lastStartTag=``,this.type=0,this.pendingType=0,this.text=``,this.textHasNull=!1,this.textStart=-1,this.textBuf=``,this.attrCount=0}release(){this.src=``,this.text=``,this.data=``,this.textBuf=``,this.valueBuf=``,this.attrNames.length=0,this.attrValues.length=0,this.attrCount=0}flushRaw(e){let t=this.textStart;t>=0&&(e>t&&(this.textBuf+=this.src.slice(t,e)),this.textStart=-1)}appendText(e,t){this.flushRaw(t),this.textBuf+=e}startRun(e){this.textStart<0&&(this.textStart=e)}emit(e,t){this.flushRaw(t),this.textBuf.length===0?this.type=e:(this.text=this.textBuf,this.textBuf=``,this.type=1,this.pendingType=e)}emitTextNow(e){return this.flushRaw(e),this.textBuf.length!==0&&(this.text=this.textBuf,this.textBuf=``,this.type=1,!0)}finishTagName(e){let t=this.nameStart,n=e-t,r=this.nameHash&ao;if(!this.nameFix){for(;;){let e=oo[r];if(e===0)break;let i=ro[e];if(i.length===n&&this.src.startsWith(i,t)){this.name=i,this.tagId=e;return}r=r+1&ao}this.name=this.src.slice(t,e),this.tagId=0;return}let i=fixName(this.src.slice(t,e));for(;;){let e=oo[r];if(e===0)break;if(ro[e]===i){this.name=ro[e],this.tagId=e;return}r=r+1&ao}this.name=i,this.tagId=0}finishAttrName(e){let t=this.nameStart,n=e-t,r=``,i=this.nameHash&ao,a=!1;if(this.nameFix)r=fixName(this.src.slice(t,e));else{for(;;){let e=so[i];if(e===0)break;let o=io[e];if(o.length===n&&this.src.startsWith(o,t)){r=o,a=!0;break}i=i+1&ao}a||(r=this.src.slice(t,e))}let o=this.attrNames,s=this.attrCount;for(let e=0;e<s;e++)if(o[e]===r){this.dropAttr=!0;return}this.dropAttr=!1,s<o.length?(o[s]=r,this.attrValues[s]=``):(o.push(r),this.attrValues.push(``)),this.attrCount=s+1}startValue(){this.valueStart=this.pos,this.valueBuf=``}flushValue(e){this.valueStart>=0&&(e>this.valueStart&&(this.valueBuf+=this.src.slice(this.valueStart,e)),this.valueStart=-1)}finishValue(e){let t=``;this.valueBuf.length===0?t=this.valueStart>=0&&e>this.valueStart?this.src.slice(this.valueStart,e):``:(this.flushValue(e),t=this.valueBuf),this.valueStart=-1,this.valueBuf=``,this.dropAttr||(this.attrValues[this.attrCount-1]=t)}appendValue(e,t){this.flushValue(t),this.valueBuf+=e,this.valueStart=this.pos}newTag(e){this.isEndTag=e,this.selfClosing=!1,this.attrCount=0,this.nameStart=this.pos,this.nameHash=0,this.nameFix=!1}emitTag(){this.isEndTag?this.emit(3,this.tagStart):(this.lastStartTag=this.name,this.emit(2,this.tagStart)),this.state=0}eofInTag(){this.flushRaw(this.tagStart),this.state=0}isAppropriateEndTag(){let e=this.lastStartTag,t=this.nameStart;if(e.length===0||this.pos-t!==e.length)return!1;for(let n=0;n<e.length;n++)if(lower$1(this.src.charCodeAt(t+n))!==e.charCodeAt(n))return!1;return!0}endTagNameStep(){let e=this.pos<this.len?this.src.charCodeAt(this.pos):-1;return isAsciiAlpha(e)?(this.pos++,-2):(isWs$1(e)||e===47||e===62)&&this.isAppropriateEndTag()?(this.name=this.lastStartTag,this.tagId=0,this.isEndTag=!0,this.selfClosing=!1,this.attrCount=0,this.pos++,e===62?(this.finishEndTagId(),this.emitTag(),0):(this.finishEndTagId(),isWs$1(e)?31:39)):-1}finishEndTagId(){let e=this.name,t=hashName(e)&ao;for(;;){let n=oo[t];if(n===0)break;if(ro[n]===e){this.tagId=n;return}t=t+1&ao}this.tagId=0}charRef(e){let t=this.src,n=this.pos,r=this.len;if(n>=r)return null;let i=t.charCodeAt(n);if(isAsciiAlnum(i)){if(i===108&&t.charCodeAt(n+1)===116&&t.charCodeAt(n+2)===59)return this.pos=n+3,`<`;if(i===103&&t.charCodeAt(n+1)===116&&t.charCodeAt(n+2)===59)return this.pos=n+3,`>`;if(i===97&&t.startsWith(`mp;`,n+1))return this.pos=n+4,`&`;if(i===113&&t.startsWith(`uot;`,n+1))return this.pos=n+5,`"`;if(i===110&&t.startsWith(`bsp;`,n+1))return this.pos=n+5,`\xA0`;let a=matchNamedReference(t,n);if(a<0)return null;let o=n+matchedLength(),s=t.charCodeAt(o-1);if(e&&s!==59&&o<r){let e=t.charCodeAt(o);if(e===61||isAsciiAlnum(e))return null}return this.pos=o,entityValue(a)}if(i!==35)return null;let a=n+1,o=!1;if(a<r){let e=t.charCodeAt(a);(e===120||e===88)&&(o=!0,a++)}let s=0,c=a;for(;a<r;){let e=t.charCodeAt(a),n=-1;if(e>=48&&e<=57?n=e-48:o&&e>=97&&e<=102?n=e-87:o&&e>=65&&e<=70&&(n=e-55),n<0)break;s=s*(o?16:10)+n,s>1114111&&(s=1114112),a++}return a===c?null:(a<r&&t.charCodeAt(a)===59&&a++,this.pos=a,numericReferenceValue(s))}next(){if(this.pendingType!==0)return this.type=this.pendingType,this.pendingType=0,this.textHasNull=!1,this.type;if(this.type===6)return 6;for(this.textHasNull=!1,this.type=0;this.type===0;)this.step();return this.type}step(){let e=this.src,t=this.len;switch(this.state){case 0:{let n=this.pos;for(;;){if(n>=t){this.pos=n,this.emit(6,t);return}let r=e.charCodeAt(n);if(r===60){this.textStart<0&&(this.textStart=n),this.tagStart=n,this.pos=n+1,this.state=5;return}if(r===38){this.pos=n+1;let e=this.charRef(!1);e===null?(this.textStart<0&&(this.textStart=n),n++):(this.appendText(e,n),n=this.pos)}else for(this.textStart<0&&(this.textStart=n),r===0&&(this.textHasNull=!0),n++;n<t;){let t=e.charCodeAt(n);if(t===60||t===38||t===0)break;n++}}}case 1:{let n=this.pos;for(;;){if(n>=t){this.pos=n,this.emit(6,t);return}let r=e.charCodeAt(n);if(r===60){this.textStart<0&&(this.textStart=n),this.tagStart=n,this.pos=n+1,this.state=8;return}if(r===38){this.pos=n+1;let e=this.charRef(!1);e===null?(this.textStart<0&&(this.textStart=n),n++):(this.appendText(e,n),n=this.pos)}else r===0?(this.appendText(`�`,n),n++):(this.textStart<0&&(this.textStart=n),n++)}}case 2:case 3:case 4:{let n=this.state,r=this.pos;for(;;){if(r>=t){this.pos=r,this.emit(6,t);return}let i=e.charCodeAt(r);if(i===60&&n!==4){this.textStart<0&&(this.textStart=r),this.tagStart=r,this.pos=r+1,this.state=n===2?11:14;return}i===0?(this.appendText(`�`,r),r++):(this.textStart<0&&(this.textStart=r),r++)}}case 5:{let n=this.pos<t?e.charCodeAt(this.pos):-1;n===33?(this.pos++,this.state=41):n===47?(this.pos++,this.state=6):isAsciiAlpha(n)?(this.newTag(!1),this.state=7):n===63?this.processingInstructions?(this.tempBuf=``,this.pos++,this.state=69):(this.data=``,this.state=40):this.state=0;return}case 6:{let n=this.pos<t?e.charCodeAt(this.pos):-1;isAsciiAlpha(n)?(this.newTag(!0),this.state=7):n===62?(this.flushRaw(this.tagStart),this.pos++,this.state=0):n===-1?this.state=0:(this.data=``,this.state=40);return}case 7:{let n=this.pos,r=this.nameHash;for(;;){if(n>=t){this.pos=n,this.eofInTag();return}let i=e.charCodeAt(n);if(i===62||i===47||isWs$1(i)){this.nameHash=r,this.finishTagName(n),this.pos=n+1,i===62?this.emitTag():this.state=i===47?39:31;return}i>=65&&i<=90||i===0?(this.nameFix=!0,r=Math.imul(r,31)+(i===0?65533:i+32)|0):r=Math.imul(r,31)+i|0,n++}}case 8:case 11:(this.pos<t?e.charCodeAt(this.pos):-1)===47?(this.pos++,this.state=this.state===8?9:12):this.state=this.state===8?1:2;return;case 9:case 12:case 15:case 23:{let n=this.pos<t?e.charCodeAt(this.pos):-1,r=this.state;isAsciiAlpha(n)?(this.nameStart=this.pos,this.state=r===9?10:r===12?13:r===15?16:24):this.state=r===9?1:r===12?2:r===15?3:19;return}case 10:case 13:case 16:case 24:{let e=this.state;for(;;){let t=this.endTagNameStep();if(t!==-2){t===-1?this.state=e===10?1:e===13?2:e===16?3:19:t!==0&&(this.state=t);return}}}case 14:{let n=this.pos<t?e.charCodeAt(this.pos):-1;n===47?(this.pos++,this.state=15):n===33?(this.pos++,this.state=17):this.state=3;return}case 17:case 18:(this.pos<t?e.charCodeAt(this.pos):-1)===45?(this.startRun(this.pos),this.pos++,this.state=this.state===17?18:21):this.state=3;return;case 19:case 20:case 21:case 26:case 27:case 28:{let n=this.state,r=n>=26,i=r?26:19,a=this.pos;if(a>=t){this.emit(6,t);return}let o=e.charCodeAt(a);o===45?(this.startRun(a),this.pos++,this.state=n===i?i+1:i+2):o===60?(this.startRun(a),this.tagStart=a,this.pos++,this.state=r?29:22):o===62&&n===i+2?(this.startRun(a),this.pos++,this.state=3):o===0?(this.appendText(`�`,a),this.pos++,this.state=i):(this.startRun(a),this.pos++,this.state=i);return}case 22:{let n=this.pos<t?e.charCodeAt(this.pos):-1;n===47?(this.pos++,this.state=23):isAsciiAlpha(n)?(this.tempBuf=``,this.state=25):this.state=19;return}case 25:case 30:{let n=this.state===25,r=this.pos<t?e.charCodeAt(this.pos):-1;if(isWs$1(r)||r===47||r===62){this.startRun(this.pos),this.pos++;let e=this.tempBuf===`script`;this.state=n?e?26:19:e?19:26}else isAsciiAlpha(r)?(this.startRun(this.pos),this.tempBuf+=String.fromCharCode(lower$1(r)),this.pos++):this.state=n?19:26;return}case 29:(this.pos<t?e.charCodeAt(this.pos):-1)===47?(this.startRun(this.pos),this.pos++,this.tempBuf=``,this.state=30):this.state=26;return;case 31:{let n=this.pos;for(;n<t&&isWs$1(e.charCodeAt(n));)n++;this.pos=n;let r=n<t?e.charCodeAt(n):-1;if(r===47||r===62||r===-1){this.state=33;return}this.nameStart=n,this.nameHash=0+r|0,this.nameFix=r===0||r>=65&&r<=90,this.nameFix&&(this.nameHash=r===0?65533:r+32),this.pos=n+1,this.state=32;return}case 32:{let n=this.pos,r=this.nameHash;for(;;){let i=n<t?e.charCodeAt(n):-1;if(i===-1||isWs$1(i)||i===47||i===62){this.nameHash=r,this.finishAttrName(n),this.pos=n,this.state=33;return}if(i===61){this.nameHash=r,this.finishAttrName(n),this.pos=n+1,this.state=34;return}i>=65&&i<=90||i===0?(this.nameFix=!0,r=Math.imul(r,31)+(i===0?65533:i+32)|0):r=Math.imul(r,31)+i|0,n++}}case 33:{let n=this.pos;for(;n<t&&isWs$1(e.charCodeAt(n));)n++;if(this.pos=n,n>=t){this.eofInTag();return}let r=e.charCodeAt(n);r===47?(this.pos++,this.state=39):r===61?(this.pos++,this.state=34):r===62?(this.pos++,this.emitTag()):this.state=31;return}case 34:{let n=this.pos;for(;n<t&&isWs$1(e.charCodeAt(n));)n++;this.pos=n;let r=n<t?e.charCodeAt(n):-1;r===34?(this.pos++,this.startValue(),this.state=35):r===39?(this.pos++,this.startValue(),this.state=36):r===62?(this.pos++,this.emitTag()):(this.startValue(),this.state=37);return}case 35:case 36:{let n=this.state===35?34:39,r=this.pos;for(;;){if(r>=t){this.pos=r,this.eofInTag();return}let i=e.charCodeAt(r);if(i===n){this.finishValue(r),this.pos=r+1,this.state=38;return}if(i===38){this.pos=r+1;let e=this.charRef(!0);e===null?r++:(this.appendValue(e,r),r=this.pos)}else i===0&&(this.pos=r+1,this.appendValue(`�`,r)),r++}}case 37:{let n=this.pos;for(;;){if(n>=t){this.pos=n,this.eofInTag();return}let r=e.charCodeAt(n);if(isWs$1(r)){this.finishValue(n),this.pos=n+1,this.state=31;return}if(r===62){this.finishValue(n),this.pos=n+1,this.emitTag();return}if(r===38){this.pos=n+1;let e=this.charRef(!0);e===null?n++:(this.appendValue(e,n),n=this.pos)}else r===0&&(this.pos=n+1,this.appendValue(`�`,n)),n++}}case 38:{let n=this.pos<t?e.charCodeAt(this.pos):-1;isWs$1(n)?(this.pos++,this.state=31):n===47?(this.pos++,this.state=39):n===62?(this.pos++,this.emitTag()):n===-1?this.eofInTag():this.state=31;return}case 39:{let n=this.pos<t?e.charCodeAt(this.pos):-1;n===62?(this.pos++,this.selfClosing=!0,this.emitTag()):n===-1?this.eofInTag():this.state=31;return}case 40:{let n=this.pos,r=e.indexOf(`>`,n);r<0&&(r=t);let i=e.slice(n,r);i.indexOf(`\0`)>=0&&(i=i.replaceAll(`\0`,`�`)),this.data+=i,this.pos=r<t?r+1:t,this.emit(4,this.tagStart),this.state=0;return}case 41:{if(this.emitTextNow(this.tagStart))return;let n=this.pos;n+1<t&&e.charCodeAt(n)===45&&e.charCodeAt(n+1)===45?(this.pos=n+2,this.data=``,this.state=42):ciMatch(e,n,`doctype`)?(this.pos=n+7,this.state=52):e.startsWith(`[CDATA[`,n)?(this.pos=n+7,this.allowCDATA?this.state=68:(this.data=`[CDATA[`,this.state=40)):(this.data=``,this.state=40);return}case 42:{let n=this.pos<t?e.charCodeAt(this.pos):-1;n===45?(this.pos++,this.state=43):n===62?(this.pos++,this.emitComment()):this.state=44;return}case 43:{let n=this.pos<t?e.charCodeAt(this.pos):-1;n===45?(this.pos++,this.state=50):n===62?(this.pos++,this.emitComment()):n===-1?this.emitComment():(this.data+=`-`,this.state=44);return}case 44:{let n=this.pos,r=n;for(;n<t;){let t=e.charCodeAt(n);if(t===60||t===45||t===0)break;n++}if(n>r&&(this.data+=e.slice(r,n)),this.pos=n,n>=t){this.emitComment();return}let i=e.charCodeAt(n);this.pos++,i===60?(this.data+=`<`,this.state=45):i===45?this.state=49:this.data+=`�`;return}case 45:{let n=this.pos<t?e.charCodeAt(this.pos):-1;n===33?(this.pos++,this.data+=`!`,this.state=46):n===60?(this.pos++,this.data+=`<`):this.state=44;return}case 46:(this.pos<t?e.charCodeAt(this.pos):-1)===45?(this.pos++,this.state=47):this.state=44;return;case 47:(this.pos<t?e.charCodeAt(this.pos):-1)===45?(this.pos++,this.state=48):this.state=49;return;case 48:this.state=50;return;case 49:{let n=this.pos<t?e.charCodeAt(this.pos):-1;n===45?(this.pos++,this.state=50):n===-1?this.emitComment():(this.data+=`-`,this.state=44);return}case 50:{let n=this.pos<t?e.charCodeAt(this.pos):-1;n===62?(this.pos++,this.emitComment()):n===33?(this.pos++,this.state=51):n===45?(this.pos++,this.data+=`-`):n===-1?this.emitComment():(this.data+=`--`,this.state=44);return}case 51:{let n=this.pos<t?e.charCodeAt(this.pos):-1;n===45?(this.pos++,this.data+=`--!`,this.state=49):n===62?(this.pos++,this.emitComment()):n===-1?this.emitComment():(this.data+=`--!`,this.state=44);return}case 52:{this.name=``,this.hasName=!1,this.publicId=``,this.hasPublicId=!1,this.systemId=``,this.hasSystemId=!1,this.forceQuirks=!1;let n=this.pos<t?e.charCodeAt(this.pos):-1;isWs$1(n)?(this.pos++,this.state=53):n===-1?(this.forceQuirks=!0,this.emitDoctype()):this.state=53;return}case 53:{let n=this.pos;for(;n<t&&isWs$1(e.charCodeAt(n));)n++;this.pos=n;let r=n<t?e.charCodeAt(n):-1;r===-1?(this.forceQuirks=!0,this.emitDoctype()):r===62?(this.pos++,this.forceQuirks=!0,this.emitDoctype()):(this.hasName=!0,this.name=``,this.state=54);return}case 54:{let n=this.pos;for(;;){if(n>=t){this.pos=n,this.forceQuirks=!0,this.emitDoctype();return}let r=e.charCodeAt(n);if(isWs$1(r)){this.pos=n+1,this.state=55;return}if(r===62){this.pos=n+1,this.emitDoctype();return}r>=65&&r<=90?this.name+=String.fromCharCode(r+32):r===0?this.name+=`�`:this.name+=e[n],n++}}case 55:{let n=this.pos;for(;n<t&&isWs$1(e.charCodeAt(n));)n++;this.pos=n;let r=n<t?e.charCodeAt(n):-1;r===-1?(this.forceQuirks=!0,this.emitDoctype()):r===62?(this.pos++,this.emitDoctype()):ciMatch(e,n,`public`)?(this.pos+=6,this.state=56):ciMatch(e,n,`system`)?(this.pos+=6,this.state=62):(this.forceQuirks=!0,this.state=67);return}case 56:case 62:{let n=this.state===56,r=this.pos<t?e.charCodeAt(this.pos):-1;isWs$1(r)?(this.pos++,this.state=n?57:63):r===34||r===39?(this.pos++,this.startDoctypeId(n,r)):r===62?(this.pos++,this.forceQuirks=!0,this.emitDoctype()):r===-1?(this.forceQuirks=!0,this.emitDoctype()):(this.forceQuirks=!0,this.state=67);return}case 57:case 63:{let n=this.state===57,r=this.pos;for(;r<t&&isWs$1(e.charCodeAt(r));)r++;this.pos=r;let i=r<t?e.charCodeAt(r):-1;i===34||i===39?(this.pos++,this.startDoctypeId(n,i)):i===62?(this.pos++,this.forceQuirks=!0,this.emitDoctype()):i===-1?(this.forceQuirks=!0,this.emitDoctype()):(this.forceQuirks=!0,this.state=67);return}case 58:case 59:case 64:case 65:{let n=this.state,r=n===58||n===59,i=n===58||n===64?34:39,a=this.pos,o=``;for(;;){if(a>=t){this.pos=a,this.appendDoctypeId(r,o),this.forceQuirks=!0,this.emitDoctype();return}let n=e.charCodeAt(a);if(n===i){this.pos=a+1,this.appendDoctypeId(r,o),this.state=r?60:66;return}if(n===62){this.pos=a+1,this.appendDoctypeId(r,o),this.forceQuirks=!0,this.emitDoctype();return}o+=n===0?`�`:e[a],a++}}case 60:case 61:{let n=this.state===61,r=this.pos;if(n){for(;r<t&&isWs$1(e.charCodeAt(r));)r++;this.pos=r}let i=r<t?e.charCodeAt(r):-1;!n&&isWs$1(i)?(this.pos++,this.state=61):i===62?(this.pos++,this.emitDoctype()):i===34||i===39?(this.pos++,this.startDoctypeId(!1,i)):i===-1?(this.forceQuirks=!0,this.emitDoctype()):(this.forceQuirks=!0,this.state=67);return}case 66:{let n=this.pos;for(;n<t&&isWs$1(e.charCodeAt(n));)n++;this.pos=n;let r=n<t?e.charCodeAt(n):-1;r===62?(this.pos++,this.emitDoctype()):r===-1?(this.forceQuirks=!0,this.emitDoctype()):this.state=67;return}case 67:{let n=e.indexOf(`>`,this.pos);this.pos=n<0?t:n+1,this.emitDoctype();return}case 68:{let n=this.pos,r=e.indexOf(`]]>`,n);if(r<0&&(r=t),r>n&&(this.startRun(n),e.indexOf(`\0`,n)>=0&&e.indexOf(`\0`,n)<r&&(this.textHasNull=!0),this.flushRaw(r)),r>=t){this.pos=t,this.emit(6,t);return}this.pos=r+3,this.state=0;return}case 69:{let n=this.pos<t?e.charCodeAt(this.pos):-1;isAsciiAlpha(n)||n===95?this.state=70:n===-1?(this.flushRaw(this.tagStart),this.state=0):(this.data=`?`+this.tempBuf,this.state=40);return}case 70:{let n=this.pos<t?e.charCodeAt(this.pos):-1;if(isWs$1(n)||n===63||n===62){let e=this.tempBuf,t=fixName(e);t===`xml`||t===`xml-stylesheet`?(this.data=`?`+e,this.state=40):(this.name=e,this.data=``,this.state=71)}else isAsciiAlnum(n)||n===45||n===95?(this.tempBuf+=e[this.pos],this.pos++):n===-1?(this.flushRaw(this.tagStart),this.state=0):(this.data=`?`+this.tempBuf,this.state=40);return}case 71:{let n=this.pos;for(;n<t&&isWs$1(e.charCodeAt(n));)n++;this.pos=n,this.state=72;return}case 72:case 73:{let n=this.pos<t?e.charCodeAt(this.pos):-1;if(n===-1){this.flushRaw(this.tagStart),this.state=0;return}if(this.state===73){if(n===62){this.pos++,this.emit(7,this.tagStart),this.state=0;return}this.data+=`?`,this.state=72;return}this.pos++,n===63?this.state=73:n===62?(this.emit(7,this.tagStart),this.state=0):this.data+=e[this.pos-1];return}default:throw Error(`unknown tokenizer state `+String(this.state))}}emitComment(){this.emit(4,this.tagStart),this.state=0}emitDoctype(){this.emit(5,this.tagStart),this.state=0}startDoctypeId(e,t){e?(this.publicId=``,this.hasPublicId=!0,this.state=t===34?58:59):(this.systemId=``,this.hasSystemId=!0,this.state=t===34?64:65)}appendDoctypeId(e,t){e?this.publicId+=t:this.systemId+=t}};const co=1024,lo=/* @__PURE__ */ new Int32Array(178);function mark(e,t){for(let n=0;n<t.length;n++)lo[t[n]]|=e}mark(1,[4,19,56,119,121,125,73,84,106,122,169,170,171,172,173,174,175,176,177]),mark(2,[85,133]),mark(4,[17]),mark(8,[56,119,122]),mark(16,[3,4,5,6,7,10,11,12,14,15,16,17,19,20,23,24,27,29,32,33,34,35,37,38,39,40,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,58,60,61,64,67,68,69,70,73,75,77,79,81,82,83,84,85,89,90,92,93,103,104,105,106,110,114,116,119,120,121,122,123,124,125,126,128,129,130,133,136,137,169,170,171,172,173,174,175,176,177]),mark(32,[27,35,67,86,87,89,96,97,98,99]),mark(64,[19,24,27,35,67,86,87,89,96,97,98,99,120,121,124,125,126,129]),mark(128,[1,9,13,22,36,41,57,80,101,109,112,113,131,132]),mark(256,[9,13,14,15,16,20,22,27,33,34,35,36,37,46,47,48,49,50,51,52,55,57,60,67,69,75,77,80,85,89,93,100,101,109,111,113,112,115,117,119,131,132,133,134]),mark(512,[17,38,61,84,88,106,123,60]),mark(co,[17,38,61,84,88,106,123]);const uo=/* @__PURE__ */ new Map;for(let e=1;e<ro.length;e++)uo.set(ro[e],e);function parserTagId(e){let t=uo.get(e);return t===void 0?0:t}const fo=/* @__PURE__ */ `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`.split(`.`),po=/* @__PURE__ */ `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.textPath`.split(`.`),mo=/* @__PURE__ */ new Map;for(let e=0;e<fo.length;e++)mo.set(fo[e].toLowerCase(),fo[e]);const ho=/* @__PURE__ */ new Map;for(let e=0;e<po.length;e++)ho.set(po[e].toLowerCase(),po[e]);const _o=/* @__PURE__ */ `+//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//`.split(`,`);function asciiLower(e){for(let t=0;t<e.length;t++){let n=e.charCodeAt(t);if(n>=65&&n<=90){let n=e.slice(0,t);for(let r=t;r<e.length;r++){let t=e.charCodeAt(r);n+=t>=65&&t<=90?String.fromCharCode(t+32):e[r]}return n}}return e}function isWsCode(e){return e===32||e===10||e===9||e===12||e===13}function isAllWs(e){for(let t=0;t<e.length;t++)if(!isWsCode(e.charCodeAt(t)))return!1;return!0}function hasNonWsNonNull(e){for(let t=0;t<e.length;t++){let n=e.charCodeAt(t);if(!isWsCode(n)&&n!==0)return!0}return!1}function removeNulls(e){return e.indexOf(`\0`)<0?e:e.replaceAll(`\0`,``)}var TreeSink=class{createElement(e,t,n,r,i,a,o,s,c){return-1}insert(e,t,n){}insertText(e,t,n){}insertComment(e,t,n){}insertProcessingInstruction(e,t,n,r){}insertDoctype(e,t,n,r){}remove(e){}hasParent(e){return!1}reparentChildren(e,t){}addMissingAttributes(e,t,n,r){}templateContents(e){return e}attachDeclarativeShadowRoot(e,t,n,r,i,a){return-1}associateForm(e,t){}setDocumentMode(e){}},ParseOptions=class{scripting;allowDeclarativeShadowRoots;processingInstructions;iframeSrcdoc;constructor(){this.scripting=!1,this.allowDeclarativeShadowRoots=!1,this.processingInstructions=!1,this.iframeSrcdoc=!1}},TreeBuilder=class{sink;tok;hNs;hTag;hName;hIP;hContents;stack;afe;afeTok;ptName;ptId;ptAttrStart;ptAttrCount;poolNames;poolValues;templateModes;mode;originalMode;docHandle;headElement;formElement;fragmentContext;framesetOk;fosterParenting;documentMode;scripting;allowDSD;iframeSrcdoc;stopped;skipNewline;reprocess;ttype;chars;cpos;charsHasNull;pendingTableText;pendingTableNonWs;locParent;locRef;fNames;fValues;fNs;emptyStrings;emptyNumbers;constructor(e){this.sink=e,this.tok=new Tokenizer,this.hNs=[],this.hTag=[],this.hName=[],this.hIP=[],this.hContents=[],this.stack=[],this.afe=[],this.afeTok=[],this.ptName=[],this.ptId=[],this.ptAttrStart=[],this.ptAttrCount=[],this.poolNames=[],this.poolValues=[],this.templateModes=[],this.mode=0,this.originalMode=0,this.docHandle=-1,this.headElement=-1,this.formElement=-1,this.fragmentContext=-1,this.framesetOk=!0,this.fosterParenting=!1,this.documentMode=0,this.scripting=!1,this.allowDSD=!1,this.iframeSrcdoc=!1,this.stopped=!1,this.skipNewline=!1,this.reprocess=!1,this.ttype=0,this.chars=``,this.cpos=0,this.charsHasNull=!1,this.pendingTableText=``,this.pendingTableNonWs=!1,this.locParent=-1,this.locRef=-1,this.fNames=[],this.fValues=[],this.fNs=[],this.emptyStrings=[],this.emptyNumbers=[]}resetState(e){this.hNs.length=0,this.hTag.length=0,this.hName.length=0,this.hIP.length=0,this.hContents.length=0,this.stack.length=0,this.afe.length=0,this.afeTok.length=0,this.ptName.length=0,this.ptId.length=0,this.ptAttrStart.length=0,this.ptAttrCount.length=0,this.poolNames.length=0,this.poolValues.length=0,this.templateModes.length=0,this.mode=0,this.originalMode=0,this.docHandle=-1,this.headElement=-1,this.formElement=-1,this.fragmentContext=-1,this.framesetOk=!0,this.fosterParenting=!1,this.documentMode=0,this.scripting=e.scripting,this.allowDSD=e.allowDeclarativeShadowRoots,this.iframeSrcdoc=e.iframeSrcdoc,this.stopped=!1,this.skipNewline=!1,this.pendingTableText=``,this.pendingTableNonWs=!1,this.tok.processingInstructions=e.processingInstructions}setMeta(e,t,n,r,i){for(;this.hNs.length<=e;)this.hNs.push(0),this.hTag.push(0),this.hName.push(``),this.hIP.push(!1),this.hContents.push(-1);this.hNs[e]=t,this.hTag[e]=n,this.hName[e]=r,this.hIP[e]=i,this.hContents[e]=-1}parseDocument(e,t,n){this.resetState(n),this.docHandle=t,this.setMeta(t,0,0,`#document`,!1),this.tok.reset(e),this.run()}parseFragment(e,t,n,r,i,a,o,s,c){if(this.resetState(c),this.documentMode=s,this.setMeta(t,0,56,`html`,!1),this.setContextMeta(n,r,i,a),this.fragmentContext=n,this.tok.reset(e),i===0){let e=this.hTag[n];e===128||e===123?this.tok.state=1:e===114||e===137||e===58||e===81||e===82?this.tok.state=2:e===103?this.tok.state=3:e===83?this.scripting&&(this.tok.state=2):e===92&&(this.tok.state=4)}this.stack.push(t),i===0&&this.hTag[n]===122&&this.templateModes.push(15),this.resetInsertionMode(),this.formElement=o,this.tok.allowCDATA=this.hNs[this.adjustedCurrentNode()]!==0,this.run()}setContextMeta(e,t,n,r){n===0?this.setMeta(e,n,parserTagId(t),t,!1):(this.setMeta(e,n,0,t,!1),this.setForeignFacts(e,n,t,r))}setForeignFacts(e,t,n,r){let i=0,a=!1;if(t===2){if(n===`mi`)i=169;else if(n===`mo`)i=170;else if(n===`mn`)i=171;else if(n===`ms`)i=172;else if(n===`mtext`)i=173;else if(n===`annotation-xml`){i=174;let e=asciiLower(r);a=e===`text/html`||e===`application/xhtml+xml`}}else t===1&&(n===`foreignObject`?i=175:n===`desc`?i=176:n===`title`&&(i=177),a=i!==0);this.hTag[e]=i,this.hIP[e]=a}run(){let e=this.tok;for(;!this.stopped;){let t=e.next();if(this.ttype=t,t===1){if(this.chars=e.text,this.cpos=0,this.charsHasNull=e.textHasNull,this.skipNewline&&(this.skipNewline=!1,this.chars.charCodeAt(0)===10)){if(this.chars.length===1)continue;this.cpos=1}}else this.skipNewline=!1;if(this.processToken(),t===6)break;e.allowCDATA=this.stack.length!==0&&this.hNs[this.adjustedCurrentNode()]!==0}this.stack.length=0,e.release(),this.chars=``,this.pendingTableText=``}processToken(){do this.reprocess=!1,this.useHtmlRules()?this.dispatchMode(this.mode):this.foreignContent();while(this.reprocess&&!this.stopped)}useHtmlRules(){if(this.stack.length===0)return!0;let e=this.adjustedCurrentNode();if(this.hNs[e]===0)return!0;let t=this.ttype;if(t===6)return!0;let n=this.hTag[e];return!!(n>=169&&n<=173&&(t===1||t===2&&this.tok.tagId!==167&&this.tok.tagId!==168)||n===174&&t===2&&this.tok.tagId===118||this.hIP[e]&&(t===2||t===1))}dispatchMode(e){switch(e){case 0:return this.initial();case 1:return this.beforeHtml();case 2:return this.beforeHead();case 3:return this.inHead();case 4:return this.inHeadNoscript();case 5:return this.afterHead();case 6:return this.inBody();case 7:return this.text();case 8:return this.inTable();case 9:return this.inTableText();case 10:return this.inCaption();case 11:return this.inColumnGroup();case 12:return this.inTableBody();case 13:return this.inRow();case 14:return this.inCell();case 15:return this.inTemplate();case 16:return this.afterBody();case 17:return this.inFrameset();case 18:return this.afterFrameset();case 19:return this.afterAfterBody();case 20:return this.afterAfterFrameset()}}currentNode(){return this.stack[this.stack.length-1]}adjustedCurrentNode(){let e=this.stack;return this.fragmentContext>=0&&e.length===1?this.fragmentContext:e[e.length-1]}isHtml(e,t){return this.hTag[e]===t&&this.hNs[e]===0}isHtmlNamedAsToken(e){if(this.hNs[e]!==0)return!1;let t=this.tok.tagId;return t===0?this.hName[e]===this.tok.name:this.hTag[e]===t}currentIs(e){return this.isHtml(this.currentNode(),e)}pop(){this.stack.pop()}popUntil(e){let t=this.stack;for(;t.length!==0;){let n=t.pop();if(this.hTag[n]===e&&this.hNs[n]===0)return}}popUntilNode(e){let t=this.stack;for(;t.length!==0;)if(t.pop()===e)return}popUntilNamedAsToken(){let e=this.stack;for(;e.length!==0;){let t=e.pop();if(this.isHtmlNamedAsToken(t))return}}stackIndexOf(e){let t=this.stack;for(let n=t.length-1;n>=0;n--)if(t[n]===e)return n;return-1}inScope(e,t){let n=this.stack;for(let r=n.length-1;r>=0;r--){let i=n[r],a=this.hTag[i];if(a===e&&this.hNs[i]===0)return!0;let o=lo[a];if(t===8){if(o&8&&this.hNs[i]===0)return!1}else if(o&(1|t)&&(o&1||this.hNs[i]===0))return!1}return!1}tokenNameInScope(e){let t=this.tok.tagId;if(t!==0)return this.inScope(t,e);let n=this.stack,r=this.tok.name;for(let t=n.length-1;t>=0;t--){let i=n[t];if(this.hNs[i]===0&&this.hTag[i]===0&&this.hName[i]===r)return!0;let a=lo[this.hTag[i]];if(e===8){if(a&8&&this.hNs[i]===0)return!1}else if(a&(1|e)&&(a&1||this.hNs[i]===0))return!1}return!1}nodeInScope(e){let t=this.stack;for(let n=t.length-1;n>=0;n--){let r=t[n];if(r===e)return!0;if(lo[this.hTag[r]]&1)return!1}return!1}isSpecial(e){return!!(lo[this.hTag[e]]&16)&&(this.hNs[e]===0||this.hTag[e]>=169)}templateInStack(){let e=this.stack;for(let t=e.length-1;t>=0;t--)if(this.isHtml(e[t],122))return!0;return!1}parsingTemplateContents(){if(this.templateInStack())return!0;let e=this.fragmentContext;return e>=0&&this.isHtml(e,122)}generateImpliedEndTags(e){let t=this.stack;for(;;){let n=t[t.length-1],r=this.hTag[n];if(this.hNs[n]!==0||!(lo[r]&32)||r===e)return;t.pop()}}generateImpliedEndTagsThoroughly(){let e=this.stack;for(;;){let t=e[e.length-1];if(this.hNs[t]!==0||!(lo[this.hTag[t]]&64))return;e.pop()}}closePElement(){this.generateImpliedEndTags(89),this.popUntil(89)}closePIfInButtonScope(){this.inScope(89,4)&&this.closePElement()}resetInsertionMode(){let e=this.stack;for(let t=e.length-1;t>=0;t--){let n=e[t],r=t===0;if(r&&this.fragmentContext>=0&&(n=this.fragmentContext),this.hNs[n]===0)switch(this.hTag[n]){case 121:case 125:if(!r){this.mode=14;return}break;case 129:this.mode=13;return;case 120:case 126:case 124:this.mode=12;return;case 19:this.mode=10;return;case 24:this.mode=11;return;case 119:this.mode=8;return;case 122:this.mode=this.templateModes[this.templateModes.length-1];return;case 52:if(!r){this.mode=3;return}break;case 15:this.mode=6;return;case 45:this.mode=17;return;case 56:this.mode=this.headElement<0?2:5;return}if(r){this.mode=6;return}}this.mode=6}appropriatePlace(e){let t=e>=0?e:this.currentNode();if(this.locRef=-1,this.fosterParenting&&this.hNs[t]===0){let e=this.hTag[t];if(e===119||e===120||e===124||e===126||e===129){let e=this.stack,n=-1,r=-1;for(let t=e.length-1;t>=0;t--){let i=e[t];if(this.hNs[i]===0&&(n<0&&this.hTag[i]===122&&(n=t),r<0&&this.hTag[i]===119&&(r=t),n>=0&&r>=0))break}if(n>=0&&(r<0||n>r))t=e[n];else if(r<0){this.locParent=e[0];return}else if(this.sink.hasParent(e[r])){this.locParent=-1,this.locRef=e[r];return}else t=e[r-1]}}if(this.hNs[t]===0&&this.hTag[t]===122){let e=this.hContents[t];e>=0&&(t=e)}this.locParent=t}insertChars(e){e.length!==0&&(this.appropriatePlace(-1),this.locParent!==this.docHandle&&this.sink.insertText(this.locParent,this.locRef,e))}insertComment(e){e>=0?this.sink.insertComment(e,-1,this.tok.data):(this.appropriatePlace(-1),this.sink.insertComment(this.locParent,this.locRef,this.tok.data))}insertPI(e){e>=0?this.sink.insertProcessingInstruction(e,-1,this.tok.name,this.tok.data):(this.appropriatePlace(-1),this.sink.insertProcessingInstruction(this.locParent,this.locRef,this.tok.name,this.tok.data))}recordElement(e,t,n,r){e===this.hNs.length?(this.hNs.push(t),this.hTag.push(n),this.hName.push(r),this.hIP.push(!1),this.hContents.push(-1)):this.setMeta(e,t,n,r,!1)}createHtmlElement(e,t,n){let r=this.tok,i=this.sink.createElement(e,0,this.locParent,this.locRef,n?r.attrNames:this.emptyStrings,n?r.attrValues:this.emptyStrings,this.emptyNumbers,n?r.attrCount:0,!1);this.recordElement(i,0,t,e),t===122&&(this.hContents[i]=this.sink.templateContents(i));let a=this.formElement;return a>=0&&lo[t]&512&&this.fragmentContext<0&&!this.parsingTemplateContents()&&(lo[t]&co&&n&&this.tokenHasAttr(`form`)||this.sink.associateForm(i,a)),i}tokenHasAttr(e){let t=this.tok;for(let n=0;n<t.attrCount;n++)if(t.attrNames[n]===e)return!0;return!1}tokenAttr(e){let t=this.tok;for(let n=0;n<t.attrCount;n++)if(t.attrNames[n]===e)return t.attrValues[n];return null}insertHtmlElement(){this.appropriatePlace(-1);let e=this.tok,t=this.createHtmlElement(e.name,e.tagId,!0);return this.sink.insert(this.locParent,this.locRef,t),this.stack.push(t),t}insertHtmlElementNamed(e,t){this.appropriatePlace(-1);let n=this.createHtmlElement(e,t,!1);return this.sink.insert(this.locParent,this.locRef,n),this.stack.push(n),n}insertVoidHtmlElement(){this.insertHtmlElement(),this.stack.pop()}insertForeignElement(e,t){let n=this.tok,r=n.name;if(e===1&&t){let e=ho.get(r);e!==void 0&&(r=e)}let i=this.fNames,a=this.fValues,o=this.fNs;i.length=0,a.length=0,o.length=0;let s=``;for(let t=0;t<n.attrCount;t++){let r=n.attrNames[t],c=n.attrValues[t],l=0;if(e===2)r===`definitionurl`?r=`definitionURL`:r===`encoding`&&(s=c);else if(e===1){let e=mo.get(r);e!==void 0&&(r=e)}r.charCodeAt(0)===120&&(r===`xlink:actuate`||r===`xlink:arcrole`||r===`xlink:href`||r===`xlink:role`||r===`xlink:show`||r===`xlink:title`||r===`xlink:type`?(l=1,r=r.slice(6)):r===`xml:lang`||r===`xml:space`?(l=2,r=r.slice(4)):r===`xmlns`?l=3:r===`xmlns:xlink`&&(l=3,r=`xlink`)),i.push(r),a.push(c),o.push(l)}this.appropriatePlace(-1);let c=this.sink.createElement(r,e,this.locParent,this.locRef,i,a,o,i.length,!0);return this.recordElement(c,e,0,r),this.setForeignFacts(c,e,r,s),this.sink.insert(this.locParent,this.locRef,c),this.stack.push(c),c}storeToken(){let e=this.tok,t=this.ptName.length;this.ptName.push(e.name),this.ptId.push(e.tagId),this.ptAttrStart.push(this.poolNames.length),this.ptAttrCount.push(e.attrCount);for(let t=0;t<e.attrCount;t++)this.poolNames.push(e.attrNames[t]),this.poolValues.push(e.attrValues[t]);return t}sameAsToken(e){let t=this.tok;if(this.ptName[e]!==t.name)return!1;let n=this.ptAttrCount[e];if(n!==t.attrCount)return!1;let r=this.ptAttrStart[e];for(let e=0;e<n;e++){let i=this.poolNames[r+e],a=!1;for(let o=0;o<n;o++)if(t.attrNames[o]===i){a=t.attrValues[o]===this.poolValues[r+e];break}if(!a)return!1}return!0}pushFormatting(e){let t=this.afe,n=0,r=-1;for(let e=t.length-1;e>=0&&t[e]!==-1;e--)this.sameAsToken(this.afeTok[e])&&(n++,r=e);n>=3&&(t.splice(r,1),this.afeTok.splice(r,1)),t.push(e),this.afeTok.push(this.storeToken())}insertMarker(){this.afe.push(-1),this.afeTok.push(-1)}clearToLastMarker(){let e=this.afe;for(;e.length!==0;)if(this.afeTok.pop(),e.pop()===-1)return}afeIndexOf(e){let t=this.afe;for(let n=t.length-1;n>=0;n--)if(t[n]===e)return n;return-1}createFromStored(e){let t=this.ptAttrStart[e],n=this.ptAttrCount[e],r=this.emptyStrings,i=this.emptyStrings;n!==0&&(r=this.poolNames.slice(t,t+n),i=this.poolValues.slice(t,t+n));let a=this.ptName[e],o=this.ptId[e],s=this.sink.createElement(a,0,this.locParent,this.locRef,r,i,this.emptyNumbers,n,!1);return this.recordElement(s,0,o,a),s}reconstructFormatting(){let e=this.afe,t=e.length;if(t===0)return;let n=e[t-1];if(n===-1||this.stackIndexOf(n)>=0)return;let r=t-1;for(;r>0;)if(r--,n=e[r],n===-1||this.stackIndexOf(n)>=0){r++;break}for(;r<e.length;r++){this.appropriatePlace(-1);let t=this.createFromStored(this.afeTok[r]);this.sink.insert(this.locParent,this.locRef,t),this.stack.push(t),e[r]=t}}adoptionAgency(){let e=this.stack,t=this.afe,n=this.currentNode();if(this.isHtmlNamedAsToken(n)&&this.afeIndexOf(n)<0)e.pop();else for(let n=0;n<8;n++){let n=-1;for(let e=t.length-1;e>=0;e--){let r=t[e];if(r===-1)break;if(this.isHtmlNamedAsToken(r)){n=e;break}}if(n<0){this.anyOtherEndTagInBody();return}let r=t[n],i=this.stackIndexOf(r);if(i<0){t.splice(n,1),this.afeTok.splice(n,1);return}if(!this.nodeInScope(r))return;let a=-1;for(let t=i+1;t<e.length;t++)if(this.isSpecial(e[t])){a=t;break}if(a<0){e.length=i,t.splice(n,1),this.afeTok.splice(n,1);return}let o=e[a],s=e[i-1],c=n,l=o,u=o,d=a,m=0;for(;m++,d--,l=e[d],l!==r;){let n=this.afeIndexOf(l);if(m>3&&n>=0&&(t.splice(n,1),this.afeTok.splice(n,1),n<c&&c--,n=-1),n<0){e.splice(d,1);continue}this.locParent=s,this.locRef=-1;let r=this.createFromStored(this.afeTok[n]);t[n]=r,e[d]=r,l=r,u===o&&(c=n+1),this.sink.insert(l,-1,u),u=l}this.appropriatePlace(s),this.sink.insert(this.locParent,this.locRef,u),n=this.afeIndexOf(r),this.locParent=o,this.locRef=-1;let h=this.afeTok[n],_=this.createFromStored(h);this.sink.reparentChildren(o,_),this.sink.insert(o,-1,_),t.splice(n,1),this.afeTok.splice(n,1),n<c&&c--,t.splice(c,0,_),this.afeTok.splice(c,0,h),e.splice(this.stackIndexOf(r),1),e.splice(this.stackIndexOf(o)+1,0,_)}}skipWs(){let e=this.chars,t=this.cpos;for(;t<e.length&&isWsCode(e.charCodeAt(t));)t++;return this.cpos=t,t<e.length}insertLeadingWs(){let e=this.chars,t=this.cpos,n=t;for(;n<e.length&&isWsCode(e.charCodeAt(n));)n++;return n>t&&this.insertChars(t===0&&n===e.length?e:e.slice(t,n)),this.cpos=n,n<e.length}restChars(){return this.cpos===0?this.chars:this.chars.slice(this.cpos)}bodyChars(e){this.charsHasNull&&(e=removeNulls(e)),e.length!==0&&(this.reconstructFormatting(),this.insertChars(e),this.framesetOk&&!isAllWs(e)&&(this.framesetOk=!1))}initial(){let e=this.tok;switch(this.ttype){case 1:if(!this.skipWs())return;break;case 4:this.insertComment(this.docHandle);return;case 7:this.insertPI(this.docHandle);return;case 5:if(this.sink.insertDoctype(this.docHandle,e.hasName?e.name:``,e.publicId,e.systemId),!this.iframeSrcdoc){let e=this.doctypeMode();e!==0&&this.setDocumentMode(e)}this.mode=1;return}this.iframeSrcdoc||this.setDocumentMode(1),this.mode=1,this.reprocess=!0}setDocumentMode(e){this.documentMode=e,this.sink.setDocumentMode(e)}doctypeMode(){let e=this.tok;if(e.forceQuirks||!e.hasName||e.name!==`html`)return 1;let t=e.hasPublicId?asciiLower(e.publicId):``,n=e.hasSystemId?asciiLower(e.systemId):``;if(e.hasPublicId){if(t===`-//w3o//dtd w3 html strict 3.0//en//`||t===`-/w3c/dtd html 4.0 transitional/en`||t===`html`)return 1;for(let e=0;e<_o.length;e++)if(t.startsWith(_o[e]))return 1}if(e.hasSystemId&&n===`http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd`)return 1;if(e.hasPublicId){let r=t.startsWith(`-//w3c//dtd html 4.01 frameset//`)||t.startsWith(`-//w3c//dtd html 4.01 transitional//`),i=!e.hasSystemId||n===``;if(i&&r)return 1;if(t.startsWith(`-//w3c//dtd xhtml 1.0 frameset//`)||t.startsWith(`-//w3c//dtd xhtml 1.0 transitional//`)||!i&&r)return 2}return 0}beforeHtml(){let e=this.tok;switch(this.ttype){case 5:return;case 4:this.insertComment(this.docHandle);return;case 7:this.insertPI(this.docHandle);return;case 1:if(!this.skipWs())return;break;case 2:if(e.tagId===56){this.locParent=this.docHandle,this.locRef=-1;let e=this.createHtmlElement(`html`,56,!0);this.sink.insert(this.docHandle,-1,e),this.stack.push(e),this.mode=2;return}break;case 3:{let t=e.tagId;if(t!==52&&t!==15&&t!==56&&t!==16)return;break}}this.locParent=this.docHandle,this.locRef=-1;let t=this.createHtmlElement(`html`,56,!1);this.sink.insert(this.docHandle,-1,t),this.stack.push(t),this.mode=2,this.reprocess=!0}beforeHead(){let e=this.tok;switch(this.ttype){case 1:if(!this.skipWs())return;break;case 4:this.insertComment(-1);return;case 7:this.insertPI(-1);return;case 5:return;case 2:if(e.tagId===56){this.inBody();return}if(e.tagId===52){this.headElement=this.insertHtmlElement(),this.mode=3;return}break;case 3:{let t=e.tagId;if(t!==52&&t!==15&&t!==56&&t!==16)return;break}}this.headElement=this.insertHtmlElementNamed(`head`,52),this.mode=3,this.reprocess=!0}genericTextElement(e){this.insertHtmlElement(),this.tok.state=e,this.originalMode=this.mode,this.mode=7}inHead(){let e=this.tok;switch(this.ttype){case 1:if(!this.insertLeadingWs())return;break;case 4:this.insertComment(-1);return;case 7:this.insertPI(-1);return;case 5:return;case 2:switch(e.tagId){case 56:this.inBody();return;case 10:case 11:case 12:case 68:case 77:this.insertVoidHtmlElement();return;case 128:this.genericTextElement(1);return;case 83:this.scripting?this.genericTextElement(2):(this.insertHtmlElement(),this.mode=4);return;case 82:case 114:this.genericTextElement(2);return;case 103:this.genericTextElement(3);return;case 122:this.templateStartTag();return;case 52:return}break;case 3:switch(e.tagId){case 52:this.pop(),this.mode=5;return;case 15:case 56:case 16:break;case 122:this.templateEndTag();return;default:return}}this.pop(),this.mode=5,this.reprocess=!0}templateStartTag(){this.insertMarker(),this.framesetOk=!1,this.mode=15,this.templateModes.push(15);let e=this.currentNode(),t=e===this.stack[0],n=this.allowDSD&&!t?this.tokenAttr(`shadowrootmode`):null,r=n===null?``:asciiLower(n);if(r===`open`||r===`closed`){this.appropriatePlace(-1);let t=this.sink.attachDeclarativeShadowRoot(e,r,this.tokenHasAttr(`shadowrootdelegatesfocus`),this.tokenHasAttr(`shadowrootserializable`),asciiLower(this.tokenAttr(`shadowrootslotassignment`)??``)===`manual`?`manual`:`named`,this.tokenHasAttr(`shadowrootclonable`));if(t>=0){let e=this.createHtmlElement(this.tok.name,122,!0);this.recordElement(t,0,0,`#shadow-root`),this.hContents[e]=t,this.stack.push(e);return}}this.insertHtmlElement()}templateEndTag(){this.templateInStack()&&(this.generateImpliedEndTagsThoroughly(),this.popUntil(122),this.clearToLastMarker(),this.templateModes.pop(),this.resetInsertionMode())}inHeadNoscript(){let e=this.tok;switch(this.ttype){case 5:return;case 2:switch(e.tagId){case 56:this.inBody();return;case 11:case 12:case 68:case 77:case 82:case 114:this.inHead();return;case 52:case 83:return}break;case 3:if(e.tagId===83){this.pop(),this.mode=3;return}if(e.tagId!==16)return;break;case 1:if(!this.insertLeadingWs())return;break;case 4:case 7:this.inHead();return}this.pop(),this.mode=3,this.reprocess=!0}afterHead(){let e=this.tok;switch(this.ttype){case 1:if(!this.insertLeadingWs())return;break;case 4:this.insertComment(-1);return;case 7:this.insertPI(-1);return;case 5:return;case 2:switch(e.tagId){case 56:this.inBody();return;case 15:this.insertHtmlElement(),this.framesetOk=!1,this.mode=6;return;case 45:this.insertHtmlElement(),this.mode=17;return;case 10:case 11:case 12:case 68:case 77:case 82:case 103:case 114:case 122:case 128:{let e=this.headElement;this.stack.push(e),this.inHead();let t=this.stackIndexOf(e);t>=0&&this.stack.splice(t,1);return}case 52:return}break;case 3:switch(e.tagId){case 122:this.inHead();return;case 15:case 56:case 16:break;default:return}}this.insertHtmlElementNamed(`body`,15),this.framesetOk=!0,this.mode=6,this.reprocess=!0}inBody(){switch(this.ttype){case 1:this.bodyChars(this.restChars());return;case 4:this.insertComment(-1);return;case 7:this.insertPI(-1);return;case 5:return;case 6:if(this.templateModes.length!==0){this.inTemplate();return}this.stopped=!0;return;case 2:this.inBodyStartTag();return;case 3:this.inBodyEndTag();return}}inBodyStartTag(){let e=this.tok,t=this.stack;switch(e.tagId){case 56:if(this.templateInStack())return;this.sink.addMissingAttributes(t[0],e.attrNames,e.attrValues,e.attrCount);return;case 10:case 11:case 12:case 68:case 77:case 82:case 103:case 114:case 122:case 128:this.inHead();return;case 15:if(t.length===1||!this.isHtml(t[1],15)||this.templateInStack())return;this.framesetOk=!1,this.sink.addMissingAttributes(t[1],e.attrNames,e.attrValues,e.attrCount);return;case 45:if(t.length===1||!this.isHtml(t[1],15)||!this.framesetOk)return;this.sink.remove(t[1]),t.length=1,this.insertHtmlElement(),this.mode=17;return;case 3:case 6:case 7:case 14:case 20:case 29:case 31:case 32:case 33:case 34:case 38:case 39:case 40:case 42:case 53:case 54:case 70:case 75:case 79:case 85:case 89:case 104:case 105:case 116:case 133:this.closePIfInButtonScope(),this.insertHtmlElement();return;case 46:case 47:case 48:case 49:case 50:case 51:{this.closePIfInButtonScope();let e=this.currentNode(),t=this.hTag[e];this.hNs[e]===0&&t>=46&&t<=51&&this.pop(),this.insertHtmlElement();return}case 93:case 69:this.closePIfInButtonScope(),this.insertHtmlElement(),this.skipNewline=!0,this.framesetOk=!1;return;case 43:{let e=this.parsingTemplateContents();if(this.formElement>=0&&!e)return;this.closePIfInButtonScope();let t=this.insertHtmlElement();e||(this.formElement=t);return}case 67:case 27:case 35:{this.framesetOk=!1;let n=e.tagId===67;for(let e=t.length-1;e>=0;e--){let r=t[e],i=this.hNs[r]===0?this.hTag[r]:-1;if(n?i===67:i===27||i===35){this.generateImpliedEndTags(i),this.popUntil(i);break}if(this.isSpecial(r)&&i!==3&&i!==33&&i!==89)break}this.closePIfInButtonScope(),this.insertHtmlElement();return}case 92:this.closePIfInButtonScope(),this.insertHtmlElement(),e.state=4;return;case 17:this.inScope(17,0)&&(this.generateImpliedEndTags(0),this.popUntil(17)),this.reconstructFormatting(),this.insertHtmlElement(),this.framesetOk=!1;return;case 1:{let e=this.afe;for(let n=e.length-1;n>=0;n--){let r=e[n];if(r===-1)break;if(this.isHtml(r,1)){this.adoptionAgency();let n=this.afeIndexOf(r);n>=0&&(e.splice(n,1),this.afeTok.splice(n,1));let i=this.stackIndexOf(r);i>=0&&t.splice(i,1);break}}this.reconstructFormatting(),this.pushFormatting(this.insertHtmlElement());return}case 9:case 13:case 22:case 36:case 41:case 57:case 101:case 109:case 112:case 113:case 131:case 132:this.reconstructFormatting(),this.pushFormatting(this.insertHtmlElement());return;case 80:this.reconstructFormatting(),this.inScope(80,0)&&(this.adoptionAgency(),this.reconstructFormatting()),this.pushFormatting(this.insertHtmlElement());return;case 4:case 73:case 84:this.reconstructFormatting(),this.insertHtmlElement(),this.insertMarker(),this.framesetOk=!1;return;case 119:this.documentMode!==1&&this.closePIfInButtonScope(),this.insertHtmlElement(),this.framesetOk=!1,this.mode=8;return;case 5:case 16:case 37:case 60:case 64:case 136:this.reconstructFormatting(),this.insertVoidHtmlElement(),this.framesetOk=!1;return;case 61:{let e=this.fragmentContext;if(e>=0&&this.isHtml(e,106))return;this.inScope(106,0)&&this.popUntil(106),this.reconstructFormatting(),this.insertVoidHtmlElement();let t=this.tokenAttr(`type`);(t===null||asciiLower(t)!==`hidden`)&&(this.framesetOk=!1);return}case 90:case 110:case 130:this.insertVoidHtmlElement();return;case 55:this.closePIfInButtonScope(),this.inScope(106,0)&&this.generateImpliedEndTags(0),this.insertVoidHtmlElement(),this.framesetOk=!1;return;case 59:e.name=`img`,e.tagId=60,this.reprocess=!0;return;case 123:this.insertHtmlElement(),this.skipNewline=!0,e.state=1,this.originalMode=this.mode,this.framesetOk=!1,this.mode=7;return;case 137:this.closePIfInButtonScope(),this.reconstructFormatting(),this.framesetOk=!1,this.genericTextElement(2);return;case 58:this.framesetOk=!1,this.genericTextElement(2);return;case 81:this.genericTextElement(2);return;case 83:if(this.scripting){this.genericTextElement(2);return}break;case 106:{let e=this.fragmentContext;if(e>=0&&this.isHtml(e,106))return;if(this.inScope(106,0)){this.popUntil(106);return}this.reconstructFormatting(),this.insertHtmlElement(),this.framesetOk=!1;return}case 87:this.inScope(106,0)?this.generateImpliedEndTags(86):this.currentIs(87)&&this.pop(),this.reconstructFormatting(),this.insertHtmlElement();return;case 86:this.inScope(106,0)?this.generateImpliedEndTags(0):this.currentIs(87)&&this.pop(),this.reconstructFormatting(),this.insertHtmlElement();return;case 96:case 99:this.inScope(100,0)&&this.generateImpliedEndTags(0),this.insertHtmlElement();return;case 97:case 98:this.inScope(100,0)&&this.generateImpliedEndTags(99),this.insertHtmlElement();return;case 74:this.reconstructFormatting(),this.insertForeignElement(2,!1),e.selfClosing&&this.pop();return;case 118:this.reconstructFormatting(),this.insertForeignElement(1,!1),e.selfClosing&&this.pop();return;case 19:case 23:case 24:case 44:case 52:case 120:case 121:case 124:case 125:case 126:case 129:return}this.reconstructFormatting(),this.insertHtmlElement()}inBodyEndTag(){let e=this.tok;switch(e.tagId){case 122:this.inHead();return;case 15:if(!this.inScope(15,0))return;this.mode=16;return;case 56:if(!this.inScope(15,0))return;this.mode=16,this.reprocess=!0;return;case 3:case 6:case 7:case 14:case 17:case 20:case 29:case 31:case 32:case 33:case 34:case 38:case 39:case 40:case 42:case 53:case 54:case 69:case 70:case 75:case 79:case 85:case 93:case 104:case 105:case 106:case 116:case 133:{let t=e.tagId;if(!this.inScope(t,0))return;this.generateImpliedEndTags(0),this.popUntil(t);return}case 43:if(this.parsingTemplateContents()){if(!this.inScope(43,0))return;this.generateImpliedEndTags(0),this.popUntil(43)}else{let e=this.formElement;if(this.formElement=-1,e<0||!this.nodeInScope(e))return;this.generateImpliedEndTags(0);let t=this.stackIndexOf(e);t>=0&&this.stack.splice(t,1)}return;case 89:this.inScope(89,4)||this.insertHtmlElementNamed(`p`,89),this.closePElement();return;case 67:if(!this.inScope(67,2))return;this.generateImpliedEndTags(67),this.popUntil(67);return;case 27:case 35:{let t=e.tagId;if(!this.inScope(t,0))return;this.generateImpliedEndTags(t),this.popUntil(t);return}case 46:case 47:case 48:case 49:case 50:case 51:{if(!this.inScope(46,0)&&!this.inScope(47,0)&&!this.inScope(48,0)&&!this.inScope(49,0)&&!this.inScope(50,0)&&!this.inScope(51,0))return;this.generateImpliedEndTags(0);let e=this.stack;for(;e.length!==0;){let t=e.pop(),n=this.hTag[t];if(this.hNs[t]===0&&n>=46&&n<=51)break}return}case 1:case 9:case 13:case 22:case 36:case 41:case 57:case 80:case 101:case 109:case 112:case 113:case 131:case 132:this.adoptionAgency();return;case 4:case 73:case 84:{let t=e.tagId;if(!this.inScope(t,0))return;this.generateImpliedEndTags(0),this.popUntil(t),this.clearToLastMarker();return}case 16:e.attrCount=0,this.ttype=2,this.reconstructFormatting(),this.insertVoidHtmlElement(),this.framesetOk=!1;return}this.anyOtherEndTagInBody()}anyOtherEndTagInBody(){let e=this.stack;for(let t=e.length-1;t>=0;t--){let n=e[t];if(this.isHtmlNamedAsToken(n)){let n=this.tok.tagId;this.generateImpliedEndTags(n===0?-1:n),e.length=t;return}if(this.isSpecial(n))return}}text(){switch(this.ttype){case 1:this.insertChars(this.restChars());return;case 6:this.pop(),this.mode=this.originalMode,this.reprocess=!0;return;case 3:this.pop(),this.mode=this.originalMode;return}}clearStackBackTo(e,t,n){let r=this.stack;for(;;){let i=r[r.length-1];if(this.hNs[i]===0){let r=this.hTag[i];if(r===e||r===t||r===n||r===122||r===56)return}r.pop()}}inTable(){let e=this.tok;switch(this.ttype){case 1:{let e=this.currentNode();if(this.hNs[e]===0){let t=this.hTag[e];if(t===119||t===120||t===122||t===124||t===126||t===129){this.pendingTableText=``,this.pendingTableNonWs=!1,this.originalMode=this.mode,this.mode=9,this.reprocess=!0;return}}break}case 4:this.insertComment(-1);return;case 7:this.insertPI(-1);return;case 5:return;case 2:switch(e.tagId){case 19:this.clearStackBackTo(119,119,119),this.insertMarker(),this.insertHtmlElement(),this.mode=10;return;case 24:this.clearStackBackTo(119,119,119),this.insertHtmlElement(),this.mode=11;return;case 23:this.clearStackBackTo(119,119,119),this.insertHtmlElementNamed(`colgroup`,24),this.mode=11,this.reprocess=!0;return;case 120:case 124:case 126:this.clearStackBackTo(119,119,119),this.insertHtmlElement(),this.mode=12;return;case 121:case 125:case 129:this.clearStackBackTo(119,119,119),this.insertHtmlElementNamed(`tbody`,120),this.mode=12,this.reprocess=!0;return;case 119:if(!this.inScope(119,8))return;this.popUntil(119),this.resetInsertionMode(),this.reprocess=!0;return;case 114:case 103:case 122:this.inHead();return;case 61:{let e=this.tokenAttr(`type`);if(e===null||asciiLower(e)!==`hidden`)break;this.insertVoidHtmlElement();return}case 43:{let e=this.parsingTemplateContents();if(this.formElement>=0&&!e)return;let t=this.insertHtmlElement();e||(this.formElement=t),this.pop();return}}break;case 3:switch(e.tagId){case 119:if(!this.inScope(119,8))return;this.popUntil(119),this.resetInsertionMode();return;case 15:case 19:case 23:case 24:case 56:case 120:case 121:case 124:case 125:case 126:case 129:return;case 122:this.inHead();return}break;case 6:this.inBody();return}this.fosterParenting=!0,this.inBody(),this.fosterParenting=!1}inTableText(){if(this.ttype===1){let e=this.restChars();if(this.charsHasNull&&(e=removeNulls(e)),e.length===0)return;this.pendingTableText+=e,!this.pendingTableNonWs&&!isAllWs(e)&&(this.pendingTableNonWs=!0);return}let e=this.pendingTableText;if(this.pendingTableText=``,e.length!==0){if(this.pendingTableNonWs){let t=this.charsHasNull;this.charsHasNull=!1,this.fosterParenting=!0,this.bodyChars(e),this.fosterParenting=!1,this.charsHasNull=t}else this.insertChars(e)}this.mode=this.originalMode,this.reprocess=!0}inCaption(){let e=this.tok,t=this.ttype;if(t===3&&e.tagId===19){if(!this.inScope(19,8))return;this.generateImpliedEndTags(0),this.popUntil(19),this.clearToLastMarker(),this.mode=8;return}let n=e.tagId;if(t===2&&(n===19||n===23||n===24||n===120||n===121||n===124||n===125||n===126||n===129)||t===3&&n===119){if(!this.inScope(19,8))return;this.generateImpliedEndTags(0),this.popUntil(19),this.clearToLastMarker(),this.mode=8,this.reprocess=!0}else(t!==3||n!==15&&n!==23&&n!==24&&n!==56&&n!==120&&n!==121&&n!==124&&n!==125&&n!==126&&n!==129)&&this.inBody()}inColumnGroup(){let e=this.tok;switch(this.ttype){case 1:if(!this.insertLeadingWs())return;break;case 4:this.insertComment(-1);return;case 7:this.insertPI(-1);return;case 5:return;case 2:if(e.tagId===56){this.inBody();return}if(e.tagId===23){this.insertVoidHtmlElement();return}if(e.tagId===122){this.inHead();return}break;case 3:if(e.tagId===24){if(!this.currentIs(24))return;this.pop(),this.mode=8;return}if(e.tagId===23)return;if(e.tagId===122){this.inHead();return}break;case 6:this.inBody();return}this.currentIs(24)&&(this.pop(),this.mode=8,this.reprocess=!0)}inTableBody(){let e=this.tok,t=this.ttype,n=e.tagId;if(t===2){if(n===129){this.clearStackBackTo(120,124,126),this.insertHtmlElement(),this.mode=13;return}if(n===125||n===121){this.clearStackBackTo(120,124,126),this.insertHtmlElementNamed(`tr`,129),this.mode=13,this.reprocess=!0;return}if(n===19||n===23||n===24||n===120||n===124||n===126){if(!this.inScope(120,8)&&!this.inScope(126,8)&&!this.inScope(124,8))return;this.clearStackBackTo(120,124,126),this.pop(),this.mode=8,this.reprocess=!0;return}}else if(t===3){if(n===120||n===124||n===126){if(!this.inScope(n,8))return;this.clearStackBackTo(120,124,126),this.pop(),this.mode=8;return}if(n===119){if(!this.inScope(120,8)&&!this.inScope(126,8)&&!this.inScope(124,8))return;this.clearStackBackTo(120,124,126),this.pop(),this.mode=8,this.reprocess=!0;return}if(n===15||n===19||n===23||n===24||n===56||n===121||n===125||n===129)return}this.inTable()}inRow(){let e=this.tok,t=this.ttype,n=e.tagId;if(t===2){if(n===125||n===121){this.clearStackBackTo(129,129,129),this.insertHtmlElement(),this.mode=14,this.insertMarker();return}if(n===19||n===23||n===24||n===120||n===124||n===126||n===129){if(!this.inScope(129,8))return;this.clearStackBackTo(129,129,129),this.pop(),this.mode=12,this.reprocess=!0;return}}else if(t===3){if(n===129){if(!this.inScope(129,8))return;this.clearStackBackTo(129,129,129),this.pop(),this.mode=12;return}if(n===119){if(!this.inScope(129,8))return;this.clearStackBackTo(129,129,129),this.pop(),this.mode=12,this.reprocess=!0;return}if(n===120||n===124||n===126){if(!this.inScope(n,8)||!this.inScope(129,8))return;this.clearStackBackTo(129,129,129),this.pop(),this.mode=12,this.reprocess=!0;return}if(n===15||n===19||n===23||n===24||n===56||n===121||n===125)return}this.inTable()}closeCell(){this.generateImpliedEndTags(0);let e=this.stack;for(;e.length!==0;){let t=e.pop();if(this.hNs[t]===0&&(this.hTag[t]===121||this.hTag[t]===125))break}this.clearToLastMarker(),this.mode=13}inCell(){let e=this.tok,t=this.ttype,n=e.tagId;if(t===3){if(n===121||n===125){if(!this.inScope(n,8))return;this.generateImpliedEndTags(0),this.popUntil(n),this.clearToLastMarker(),this.mode=13;return}if(n===15||n===19||n===23||n===24||n===56)return;if(n===119||n===120||n===124||n===126||n===129){if(!this.inScope(n,8))return;this.closeCell(),this.reprocess=!0;return}}else if(t===2&&(n===19||n===23||n===24||n===120||n===121||n===124||n===125||n===126||n===129)){if(!this.inScope(121,8)&&!this.inScope(125,8))return;this.closeCell(),this.reprocess=!0;return}this.inBody()}inTemplate(){let e=this.tok;switch(this.ttype){case 1:case 4:case 7:case 5:this.inBody();return;case 2:switch(e.tagId){case 10:case 11:case 12:case 68:case 77:case 82:case 103:case 114:case 122:case 128:this.inHead();return;case 19:case 24:case 120:case 124:case 126:this.switchTemplateMode(8);return;case 23:this.switchTemplateMode(11);return;case 129:this.switchTemplateMode(12);return;case 121:case 125:this.switchTemplateMode(13);return}this.switchTemplateMode(6);return;case 3:e.tagId===122&&this.inHead();return;case 6:if(!this.templateInStack()){this.stopped=!0;return}this.popUntil(122),this.clearToLastMarker(),this.templateModes.pop(),this.resetInsertionMode(),this.reprocess=!0;return}}switchTemplateMode(e){this.templateModes.pop(),this.templateModes.push(e),this.mode=e,this.reprocess=!0}afterBody(){let e=this.tok;switch(this.ttype){case 1:if(!this.skipWsViaBody())return;break;case 4:this.insertComment(this.stack[0]);return;case 7:this.insertPI(this.stack[0]);return;case 5:return;case 2:if(e.tagId===56){this.inBody();return}break;case 3:if(e.tagId===56){if(this.fragmentContext>=0)return;this.mode=19;return}break;case 6:this.stopped=!0;return}this.mode=6,this.reprocess=!0}skipWsViaBody(){let e=this.chars,t=this.cpos,n=t;for(;n<e.length&&isWsCode(e.charCodeAt(n));)n++;return n>t&&this.bodyChars(e.slice(t,n)),this.cpos=n,n<e.length}inFrameset(){let e=this.tok;switch(this.ttype){case 1:this.insertWsOnly();return;case 4:this.insertComment(-1);return;case 7:this.insertPI(-1);return;case 2:switch(e.tagId){case 56:this.inBody();return;case 45:this.insertHtmlElement();return;case 44:this.insertVoidHtmlElement();return;case 82:this.inHead();return}return;case 3:if(e.tagId===45){if(this.currentNode()===this.stack[0])return;this.pop(),this.fragmentContext<0&&!this.currentIs(45)&&(this.mode=18)}return;case 6:this.stopped=!0;return}}insertWsOnly(){let e=this.restChars(),t=``,n=!0;for(let t=0;t<e.length;t++)if(!isWsCode(e.charCodeAt(t))){n=!1;break}if(n)t=e;else for(let n=0;n<e.length;n++)isWsCode(e.charCodeAt(n))&&(t+=e[n]);this.insertChars(t)}afterFrameset(){let e=this.tok;switch(this.ttype){case 1:this.insertWsOnly();return;case 4:this.insertComment(-1);return;case 7:this.insertPI(-1);return;case 2:e.tagId===56?this.inBody():e.tagId===82&&this.inHead();return;case 3:e.tagId===56&&(this.mode=20);return;case 6:this.stopped=!0;return}}afterAfterBody(){let e=this.tok;switch(this.ttype){case 4:this.insertComment(this.docHandle);return;case 7:this.insertPI(this.docHandle);return;case 5:this.inBody();return;case 1:if(!this.skipWsViaBody())return;break;case 2:if(e.tagId===56){this.inBody();return}break;case 6:this.stopped=!0;return}this.mode=6,this.reprocess=!0}afterAfterFrameset(){let e=this.tok;switch(this.ttype){case 4:this.insertComment(this.docHandle);return;case 7:this.insertPI(this.docHandle);return;case 5:this.inBody();return;case 1:{let e=this.restChars(),t=``;for(let n=0;n<e.length;n++)isWsCode(e.charCodeAt(n))&&(t+=e[n]);t.length!==0&&this.bodyChars(t);return}case 2:e.tagId===56?this.inBody():e.tagId===82&&this.inHead();return;case 6:this.stopped=!0;return}}foreignContent(){let e=this.tok;switch(this.ttype){case 1:{let e=this.restChars();this.charsHasNull&&(e=e.replaceAll(`\0`,`�`)),this.insertChars(e),this.framesetOk&&hasNonWsNonNull(this.restChars())&&(this.framesetOk=!1);return}case 4:this.insertComment(-1);return;case 7:this.insertPI(-1);return;case 5:return;case 2:{let t=e.tagId,n=!!(lo[t]&256);if(!n&&t===41&&(n=this.tokenHasAttr(`color`)||this.tokenHasAttr(`face`)||this.tokenHasAttr(`size`)),n){this.popToHtmlOrIntegrationPoint(),this.dispatchMode(this.mode);return}let r=this.adjustedCurrentNode(),i=this.hNs[r];this.insertForeignElement(i,!0),e.selfClosing&&this.pop();return}case 3:{let t=e.tagId;if(t===16||t===89){this.popToHtmlOrIntegrationPoint(),this.dispatchMode(this.mode);return}let n=this.stack,r=n.length-1,i=n[r];if(t===103&&this.hNs[i]===1&&this.hName[i]===`script`){this.pop();return}for(;;){if(r===0)return;if(asciiLower(this.hName[i])===e.name){n.length=r;return}if(r--,i=n[r],this.hNs[i]===0){this.dispatchMode(this.mode);return}}}}}popToHtmlOrIntegrationPoint(){let e=this.stack;for(;;){let t=e[e.length-1],n=this.hTag[t];if(this.hNs[t]===0||this.hIP[t]||n>=169&&n<=173)return;e.pop()}}},XMLParseError=class extends Error{};const vo={lt:`<`,gt:`>`,amp:`&`,quot:`"`,apos:`'`};function isNameStartCode(e){return e>=97&&e<=122||e>=65&&e<=90||e===58||e===95||e>=192&&e<=214||e>=216&&e<=246||e>=248&&e<=767||e>=880&&e<=893||e>=895&&e<=8191||e>=8204&&e<=8205||e>=8304&&e<=8591||e>=11264&&e<=12271||e>=12289&&e<=55295||e>=63744&&e<=64975||e>=65008&&e<=65533||e>=55296&&e<=56319}function isNameCode(e){return isNameStartCode(e)||e>=48&&e<=57||e===45||e===46||e===183||e>=768&&e<=879||e>=8255&&e<=8256||e>=56320&&e<=57343}function isWs(e){return e===32||e===9||e===10||e===13}function checkChars(e,t){for(let n=0;n<e.length;n++){let r=e.charCodeAt(n);r<32&&r!==9&&r!==10&&r!==13&&t.fail(`invalid character`),(r===65534||r===65535)&&t.fail(`invalid character`)}}var XMLParser=class{src;pos;doc;entities;constructor(e,t){this.src=e.replace(/\r\n?/g,`
|