respec 37.1.0 → 37.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
- window.respecVersion="37.1.0",function(){"use strict";var e="undefined"!=typeof document?document.currentScript:null;const t=document.documentElement;t?.hasAttribute("lang")||(t.lang="en",t.hasAttribute("dir")||(t.dir="ltr"));const n={},r=t?.lang??"en";var s=Object.freeze({__proto__:null,l10n:n,lang:r,name:"core/l10n",run:function(e){e.l10n=n[r]||n.en}});const i=(e,t)=>t.some((t=>e instanceof t));let o,a;const c=new WeakMap,l=new WeakMap,u=new WeakMap;let d={get(e,t,n){if(e instanceof IDBTransaction){if("done"===t)return c.get(e);if("store"===t)return n.objectStoreNames[1]?void 0:n.objectStore(n.objectStoreNames[0])}return m(e[t])},set:(e,t,n)=>(e[t]=n,!0),has:(e,t)=>e instanceof IDBTransaction&&("done"===t||"store"===t)||t in e};function p(e){d=e(d)}function h(e){return(a||(a=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])).includes(e)?function(...t){return e.apply(g(this),t),m(this.request)}:function(...t){return m(e.apply(g(this),t))}}function f(e){return"function"==typeof e?h(e):(e instanceof IDBTransaction&&function(e){if(c.has(e))return;const t=new Promise(((t,n)=>{const r=()=>{e.removeEventListener("complete",s),e.removeEventListener("error",i),e.removeEventListener("abort",i)},s=()=>{t(),r()},i=()=>{n(e.error||new DOMException("AbortError","AbortError")),r()};e.addEventListener("complete",s),e.addEventListener("error",i),e.addEventListener("abort",i)}));c.set(e,t)}(e),i(e,o||(o=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction]))?new Proxy(e,d):e)}function m(e){if(e instanceof IDBRequest)return function(e){const t=new Promise(((t,n)=>{const r=()=>{e.removeEventListener("success",s),e.removeEventListener("error",i)},s=()=>{t(m(e.result)),r()},i=()=>{n(e.error),r()};e.addEventListener("success",s),e.addEventListener("error",i)}));return u.set(t,e),t}(e);if(l.has(e))return l.get(e);const t=f(e);return t!==e&&(l.set(e,t),u.set(t,e)),t}const g=e=>u.get(e);const b=["get","getKey","getAll","getAllKeys","count"],y=["put","add","delete","clear"],w=new Map;function v(e,t){if(!(e instanceof IDBDatabase)||t in e||"string"!=typeof t)return;if(w.get(t))return w.get(t);const n=t.replace(/FromIndex$/,""),r=t!==n,s=y.includes(n);if(!(n in(r?IDBIndex:IDBObjectStore).prototype)||!s&&!b.includes(n))return;const i=async function(e,...t){const i=this.transaction(e,s?"readwrite":"readonly");let o=i.store;return r&&(o=o.index(t.shift())),(await Promise.all([o[n](...t),s&&i.done]))[0]};return w.set(t,i),i}p((e=>({...e,get:(t,n,r)=>v(t,n)||e.get(t,n,r),has:(t,n)=>!!v(t,n)||e.has(t,n)})));const k=["continue","continuePrimaryKey","advance"],$={},x=new WeakMap,C=new WeakMap,S={get(e,t){if(!k.includes(t))return e[t];let n=$[t];return n||(n=$[t]=function(...e){x.set(this,C.get(this)[t](...e))}),n}};async function*_(...e){let t=this;if(t instanceof IDBCursor||(t=await t.openCursor(...e)),!t)return;const n=new Proxy(t,S);for(C.set(n,t),u.set(n,g(t));t;)yield n,t=await(x.get(n)||t.continue()),x.delete(n)}function T(e,t){return t===Symbol.asyncIterator&&i(e,[IDBIndex,IDBObjectStore,IDBCursor])||"iterate"===t&&i(e,[IDBIndex,IDBObjectStore])}p((e=>({...e,get:(t,n,r)=>T(t,n)?_:e.get(t,n,r),has:(t,n)=>T(t,n)||e.has(t,n)})));var R=Object.freeze({__proto__:null,deleteDB:function(e,{blocked:t}={}){const n=indexedDB.deleteDatabase(e);return t&&n.addEventListener("blocked",(e=>t(e.oldVersion,e))),m(n).then((()=>{}))},openDB:function(e,t,{blocked:n,upgrade:r,blocking:s,terminated:i}={}){const o=indexedDB.open(e,t),a=m(o);return r&&o.addEventListener("upgradeneeded",(e=>{r(m(o.result),e.oldVersion,e.newVersion,m(o.transaction),e)})),n&&o.addEventListener("blocked",(e=>n(e.oldVersion,e.newVersion,e))),a.then((e=>{i&&e.addEventListener("close",(()=>i())),s&&e.addEventListener("versionchange",(e=>s(e.oldVersion,e.newVersion,e)))})).catch((()=>{})),a},unwrap:g,wrap:m});function E(e,t,n,r,s,{level:i="error",autofix:o,ruleName:a}={}){function c(n){return n>0?e.slice(t,t+n):e.slice(Math.max(t+n,0),t)}function l(n,{precedes:r}={}){const s=n.map((e=>e.trivia+e.value)).join(""),i=e[t];return"eof"===i.type?s:r?s+i.trivia:s.slice(i.trivia.length)}const u="eof"!==e[t].type?e[t].line:e.length>1?e[t-1].line:1,d=function(e){const t=e.split("\n");return t[t.length-1]}(l(c(-5),{precedes:!0})),p=c(5),h=l(p),f=d+h.split("\n")[0]+"\n"+(" ".repeat(d.length)+"^"),m="Syntax"===s?"since":"inside",g=`${s} error at line ${u}${e.name?` in ${e.name}`:""}${n&&n.name?`, ${m} \`${n.partial?"partial ":""}${function(e){const t=[e];for(;e&&e.parent;){const{parent:n}=e;t.unshift(n),e=n}return t.map((e=>function(e,t){let n=e;return t&&(n+=` ${t}`),n}(e.type,e.name))).join(" -> ")}(n)}\``:""}:\n${f}`;return{message:`${g} ${r}`,bareMessage:r,context:g,line:u,sourceName:e.name,level:i,ruleName:a,autofix:o,input:h,tokens:p}}function L(e,t,n,r){return E(e,t,n,r,"Syntax")}function A(e,t,n,r,s={}){return s.ruleName=n,E(t.source,e.index,t,r,"Validation",s)}class P{constructor({source:e,tokens:t}){Object.defineProperties(this,{source:{value:e},tokens:{value:t,writable:!0},parent:{value:null,writable:!0},this:{value:this}})}toJSON(){const e={type:void 0,name:void 0,inheritance:void 0};let t=this;for(;t!==Object.prototype;){const n=Object.getOwnPropertyDescriptors(t);for(const[t,r]of Object.entries(n))(r.enumerable||r.get)&&(e[t]=this[t]);t=Object.getPrototypeOf(t)}return e}}function N(e,t,{useNullableInner:n}={}){if(!e.union){const r=t.unique.get(e.idlType);if(!r)return;if("typedef"===r.type){const{typedefIncludesDictionary:n}=t.cache;if(n.has(r))return n.get(r);t.cache.typedefIncludesDictionary.set(r,void 0);const s=N(r.idlType,t);if(t.cache.typedefIncludesDictionary.set(r,s),s)return{reference:e,dictionary:s.dictionary}}if("dictionary"===r.type&&(n||!e.nullable))return{reference:e,dictionary:r}}for(const n of e.subtype){const e=N(n,t);if(e)return n.union?e:{reference:n,dictionary:e.dictionary}}}function I(e,t){if(t.cache.dictionaryIncludesRequiredField.has(e))return t.cache.dictionaryIncludesRequiredField.get(e);t.cache.dictionaryIncludesRequiredField.set(e,void 0);let n=e.members.some((e=>e.required));if(!n&&e.inheritance){const r=t.unique.get(e.inheritance);r?I(r,t)&&(n=!0):n=!0}return t.cache.dictionaryIncludesRequiredField.set(e,n),n}class D extends Array{constructor({source:e,tokens:t}){super(),Object.defineProperties(this,{source:{value:e},tokens:{value:t},parent:{value:null,writable:!0}})}}class O extends P{static parser(e,t){return()=>{const n=e.consumeKind(t);if(n)return new O({source:e.source,tokens:{value:n}})}}get value(){return ee(this.tokens.value.value)}write(e){return e.ts.wrap([e.token(this.tokens.value),e.token(this.tokens.separator)])}}class j extends O{static parse(e){const t=e.consumeKind("eof");if(t)return new j({source:e.source,tokens:{value:t}})}get type(){return"eof"}}function z(e,t){return te(e,{parser:O.parser(e,t),listName:t+" list"})}const M=["identifier","decimal","integer","string"],U=new Map([...["NoInterfaceObject","LenientSetter","LenientThis","TreatNonObjectAsNull","Unforgeable"].map((e=>[e,`Legacy${e}`])),["NamedConstructor","LegacyFactoryFunction"],["OverrideBuiltins","LegacyOverrideBuiltIns"],["TreatNullAs","LegacyNullToEmptyString"]]);function q(e){for(const t of M){const n=z(e,t);if(n.length)return n}e.error("Expected identifiers, strings, decimals, or integers but none found")}class W extends P{static parse(e){const t={assign:e.consume("=")},n=pe(new W({source:e.source,tokens:t}));if(n.list=[],t.assign){if(t.asterisk=e.consume("*"),t.asterisk)return n.this;t.secondaryName=e.consumeKind(...M)}return t.open=e.consume("("),t.open?(n.list=n.rhsIsList?q(e):ie(e),t.close=e.consume(")")||e.error("Unexpected token in extended attribute argument list")):t.assign&&!t.secondaryName&&e.error("No right hand side to extended attribute assignment"),n.this}get rhsIsList(){return this.tokens.assign&&!this.tokens.asterisk&&!this.tokens.secondaryName}get rhsType(){return this.rhsIsList?this.list[0].tokens.value.type+"-list":this.tokens.asterisk?"*":this.tokens.secondaryName?this.tokens.secondaryName.type:null}write(e){const{rhsType:t}=this;return e.ts.wrap([e.token(this.tokens.assign),e.token(this.tokens.asterisk),e.reference_token(this.tokens.secondaryName,this.parent),e.token(this.tokens.open),...this.list.map((n=>"identifier-list"===t?e.identifier(n,this.parent):n.write(e))),e.token(this.tokens.close)])}}class F extends P{static parse(e){const t=e.consumeKind("identifier");if(t)return new F({source:e.source,tokens:{name:t},params:W.parse(e)})}constructor({source:e,tokens:t,params:n}){super({source:e,tokens:t}),n.parent=this,Object.defineProperty(this,"params",{value:n})}get type(){return"extended-attribute"}get name(){return this.tokens.name.value}get rhs(){const{rhsType:e,tokens:t,list:n}=this.params;if(!e)return null;return{type:e,value:this.params.rhsIsList?n:this.params.tokens.secondaryName?ee(t.secondaryName.value):null}}get arguments(){const{rhsIsList:e,list:t}=this.params;return!t||e?[]:t}*validate(e){const{name:t}=this;if("LegacyNoInterfaceObject"===t){const e="`[LegacyNoInterfaceObject]` extended attribute is an undesirable feature that may be removed from Web IDL in the future. Refer to the [relevant upstream PR](https://github.com/whatwg/webidl/pull/609) for more information.";yield A(this.tokens.name,this,"no-nointerfaceobject",e,{level:"warning"})}else if(U.has(t)){const e=`\`[${t}]\` extended attribute is a legacy feature that is now renamed to \`[${U.get(t)}]\`. Refer to the [relevant upstream PR](https://github.com/whatwg/webidl/pull/870) for more information.`;yield A(this.tokens.name,this,"renamed-legacy",e,{level:"warning",autofix:(n=this,()=>{const{name:e}=n;n.tokens.name.value=U.get(e),"TreatNullAs"===e&&(n.params.tokens={})})})}var n;for(const t of this.arguments)yield*t.validate(e)}write(e){return e.ts.wrap([e.ts.trivia(this.tokens.name.trivia),e.ts.extendedAttribute(e.ts.wrap([e.ts.extendedAttributeReference(this.name),this.params.write(e)])),e.token(this.tokens.separator)])}}class B extends D{static parse(e){const t={};t.open=e.consume("[");const n=new B({source:e.source,tokens:t});return t.open?(n.push(...te(e,{parser:F.parse,listName:"extended attribute"})),t.close=e.consume("]")||e.error("Expected a closing token for the extended attribute list"),n.length||(e.unconsume(t.close.index),e.error("An extended attribute list must not be empty")),e.probe("[")&&e.error("Illegal double extended attribute lists, consider merging them"),n):n}*validate(e){for(const t of this)yield*t.validate(e)}write(e){return this.length?e.ts.wrap([e.token(this.tokens.open),...this.map((t=>t.write(e))),e.token(this.tokens.close)]):""}}function H(e,t){const n=e.consume("?");n&&(t.tokens.nullable=n),e.probe("?")&&e.error("Can't nullable more than once")}function G(e,t){let n=function(e,t){const n=e.consume("FrozenArray","ObservableArray","Promise","async_sequence","sequence","record");if(!n)return;const r=pe(new V({source:e.source,tokens:{base:n}}));switch(r.tokens.open=e.consume("<")||e.error(`No opening bracket after ${n.value}`),n.value){case"Promise":{e.probe("[")&&e.error("Promise type cannot have extended attribute");const n=ae(e,t)||e.error("Missing Promise subtype");r.subtype.push(n);break}case"async_sequence":case"sequence":case"FrozenArray":case"ObservableArray":{const s=oe(e,t)||e.error(`Missing ${n.value} subtype`);r.subtype.push(s);break}case"record":{e.probe("[")&&e.error("Record key cannot have extended attribute");const n=e.consume(...me)||e.error(`Record key must be one of: ${me.join(", ")}`),s=new V({source:e.source,tokens:{base:n}});s.tokens.separator=e.consume(",")||e.error("Missing comma after record key type"),s.type=t;const i=oe(e,t)||e.error("Error parsing generic type record");r.subtype.push(s,i);break}}return r.idlType||e.error(`Error parsing generic type ${n.value}`),r.tokens.close=e.consume(">")||e.error(`Missing closing bracket after ${n.value}`),r.this}(e,t)||se(e);if(!n){const t=e.consumeKind("identifier")||e.consume(...me,...fe);if(!t)return;n=new V({source:e.source,tokens:{base:t}}),e.probe("<")&&e.error(`Unsupported generic type ${t.value}`)}return"Promise"===n.generic&&e.probe("?")&&e.error("Promise type cannot be nullable"),n.type=t||null,H(e,n),n.nullable&&"any"===n.idlType&&e.error("Type `any` cannot be made nullable"),n}let V=class extends P{static parse(e,t){return G(e,t)||function(e,t){const n={};if(n.open=e.consume("("),!n.open)return;const r=pe(new V({source:e.source,tokens:n}));for(r.type=t||null;;){const n=oe(e,t)||e.error("No type after open parenthesis or 'or' in union type");"any"===n.idlType&&e.error("Type `any` cannot be included in a union type"),"Promise"===n.generic&&e.error("Type `Promise` cannot be included in a union type"),r.subtype.push(n);const s=e.consume("or");if(!s)break;n.tokens.separator=s}return r.idlType.length<2&&e.error("At least two types are expected in a union type but found less"),n.close=e.consume(")")||e.error("Unterminated union type"),H(e,r),r.this}(e,t)}constructor({source:e,tokens:t}){super({source:e,tokens:t}),Object.defineProperty(this,"subtype",{value:[],writable:!0}),this.extAttrs=new B({source:e,tokens:{}})}get generic(){return this.subtype.length&&this.tokens.base?this.tokens.base.value:""}get nullable(){return Boolean(this.tokens.nullable)}get union(){return Boolean(this.subtype.length)&&!this.tokens.base}get idlType(){if(this.subtype.length)return this.subtype;return ee([this.tokens.prefix,this.tokens.base,this.tokens.postfix].filter((e=>e)).map((e=>e.value)).join(" "))}*validate(e){if(yield*this.extAttrs.validate(e),"BufferSource"===this.idlType)for(const e of[this.extAttrs,this.parent?.extAttrs])for(const t of e){if("AllowShared"!==t.name)continue;const n="`[AllowShared] BufferSource` is now replaced with AllowSharedBufferSource.";yield A(this.tokens.base,this,"migrate-allowshared",n,{autofix:J(this,t,e)})}if("void"===this.idlType){const e="`void` is now replaced by `undefined`. Refer to the [relevant GitHub issue](https://github.com/whatwg/webidl/issues/60) for more information.";yield A(this.tokens.base,this,"replace-void",e,{autofix:(t=this,()=>{t.tokens.base.value="undefined"})})}var t;const n=!this.union&&e.unique.get(this.idlType),r=this.union?this:n&&"typedef"===n.type?n.idlType:void 0;if(r&&this.nullable){const{reference:t}=N(r,e)||{};if(t){const e=(this.union?t:this).tokens.base,n="Nullable union cannot include a dictionary type.";yield A(e,this,"no-nullable-union-dict",n)}}else for(const t of this.subtype)yield*t.validate(e)}write(e){return e.ts.wrap([this.extAttrs.write(e),(()=>{if(this.union||this.generic)return e.ts.wrap([e.token(this.tokens.base,e.ts.generic),e.token(this.tokens.open),...this.subtype.map((t=>t.write(e))),e.token(this.tokens.close)]);const t=this.tokens.prefix||this.tokens.base,n=this.tokens.prefix?[this.tokens.prefix.value,e.ts.trivia(this.tokens.base.trivia)]:[],r=e.reference(e.ts.wrap([...n,this.tokens.base.value,e.token(this.tokens.postfix)]),{unescaped:this.idlType,context:this});return e.ts.wrap([e.ts.trivia(t.trivia),r])})(),e.token(this.tokens.nullable),e.token(this.tokens.separator)])}};function J(e,t,n){return()=>{const r=n.indexOf(t);n.splice(r,1),!n.length&&e.tokens.base.trivia.match(/^\s$/)&&(e.tokens.base.trivia=""),e.tokens.base.value="AllowSharedBufferSource"}}class K extends P{static parse(e){const t=e.consume("=");if(!t)return null;const n=ne(e)||e.consumeKind("string")||e.consume("null","[","{")||e.error("No value for default"),r=[n];if("["===n.value){const t=e.consume("]")||e.error("Default sequence value must be empty");r.push(t)}else if("{"===n.value){const t=e.consume("}")||e.error("Default dictionary value must be empty");r.push(t)}return new K({source:e.source,tokens:{assign:t},expression:r})}constructor({source:e,tokens:t,expression:n}){super({source:e,tokens:t}),n.parent=this,Object.defineProperty(this,"expression",{value:n})}get type(){return re(this.expression[0]).type}get value(){return re(this.expression[0]).value}get negative(){return re(this.expression[0]).negative}write(e){return e.ts.wrap([e.token(this.tokens.assign),...this.expression.map((t=>e.token(t)))])}}class Z extends P{static parse(e){const t=e.position,n={},r=pe(new Z({source:e.source,tokens:n}));return r.extAttrs=B.parse(e),n.optional=e.consume("optional"),r.idlType=oe(e,"argument-type"),r.idlType?(n.optional||(n.variadic=e.consume("...")),n.name=e.consumeKind("identifier")||e.consume(...ge),n.name?(r.default=n.optional?K.parse(e):null,r.this):e.unconsume(t)):e.unconsume(t)}get type(){return"argument"}get optional(){return!!this.tokens.optional}get variadic(){return!!this.tokens.variadic}get name(){return ee(this.tokens.name.value)}*validate(e){yield*this.extAttrs.validate(e),yield*this.idlType.validate(e);const t=N(this.idlType,e,{useNullableInner:!0});if(t)if(this.idlType.nullable){const e="Dictionary arguments cannot be nullable.";yield A(this.tokens.name,this,"no-nullable-dict-arg",e)}else if(this.optional){if(!this.default){const e="Optional dictionary arguments must have a default value of `{}`.";yield A(this.tokens.name,this,"dict-arg-default",e,{autofix:Y(this)})}}else if(this.parent&&!I(t.dictionary,e)&&function(e){const t=e.parent.arguments||e.parent.list,n=t.indexOf(e),r=t.slice(n+1).some((e=>!e.optional));return!r}(this)){const e="Dictionary argument must be optional if it has no required fields";yield A(this.tokens.name,this,"dict-arg-optional",e,{autofix:(n=this,()=>{const e=de(n.idlType);n.tokens.optional={...e,type:"optional",value:"optional"},e.trivia=" ",Y(n)()})})}var n}write(e){return e.ts.wrap([this.extAttrs.write(e),e.token(this.tokens.optional),e.ts.type(this.idlType.write(e)),e.token(this.tokens.variadic),e.name_token(this.tokens.name,{data:this}),this.default?this.default.write(e):"",e.token(this.tokens.separator)])}}function Y(e){return()=>{e.default=K.parse(new ve(" = {}"))}}class X extends P{static parse(e,{special:t,regular:n}={}){const r={special:t},s=pe(new X({source:e.source,tokens:r}));return t&&"stringifier"===t.value&&(r.termination=e.consume(";"),r.termination)?(s.arguments=[],s):(t||n||(r.special=e.consume("getter","setter","deleter")),s.idlType=ae(e)||e.error("Missing return type"),r.name=e.consumeKind("identifier")||e.consume("includes"),r.open=e.consume("(")||e.error("Invalid operation"),s.arguments=ie(e),r.close=e.consume(")")||e.error("Unterminated operation"),r.termination=e.consume(";")||e.error("Unterminated operation, expected `;`"),s.this)}get type(){return"operation"}get name(){const{name:e}=this.tokens;return e?ee(e.value):""}get special(){return this.tokens.special?this.tokens.special.value:""}*validate(e){if(yield*this.extAttrs.validate(e),!this.name&&["","static"].includes(this.special)){const e="Regular or static operations must have both a return type and an identifier.";yield A(this.tokens.open,this,"incomplete-op",e)}if(this.idlType){if("async_sequence"===this.idlType.generic){const e="async_sequence types cannot be returned by an operation.";yield A(this.idlType.tokens.base,this,"async-sequence-idl-to-js",e)}yield*this.idlType.validate(e)}for(const t of this.arguments)yield*t.validate(e)}write(e){const{parent:t}=this,n=this.idlType?[e.ts.type(this.idlType.write(e)),e.name_token(this.tokens.name,{data:this,parent:t}),e.token(this.tokens.open),e.ts.wrap(this.arguments.map((t=>t.write(e)))),e.token(this.tokens.close)]:[];return e.ts.definition(e.ts.wrap([this.extAttrs.write(e),this.tokens.name?e.token(this.tokens.special):e.token(this.tokens.special,e.ts.nameless,{data:this,parent:t}),...n,e.token(this.tokens.termination)]),{data:this,parent:t})}}class Q extends P{static parse(e,{special:t,noInherit:n=!1,readonly:r=!1}={}){const s=e.position,i={special:t},o=pe(new Q({source:e.source,tokens:i}));if(t||n||(i.special=e.consume("inherit")),"inherit"===o.special&&e.probe("readonly")&&e.error("Inherited attributes cannot be read-only"),i.readonly=e.consume("readonly"),r&&!i.readonly&&e.probe("attribute")&&e.error("Attributes must be readonly in this context"),i.base=e.consume("attribute"),i.base)return o.idlType=oe(e,"attribute-type")||e.error("Attribute lacks a type"),i.name=e.consumeKind("identifier")||e.consume("async","required")||e.error("Attribute lacks a name"),i.termination=e.consume(";")||e.error("Unterminated attribute, expected `;`"),o.this;e.unconsume(s)}get type(){return"attribute"}get special(){return this.tokens.special?this.tokens.special.value:""}get readonly(){return!!this.tokens.readonly}get name(){return ee(this.tokens.name.value)}*validate(e){if(yield*this.extAttrs.validate(e),yield*this.idlType.validate(e),["async_sequence","sequence","record"].includes(this.idlType.generic)){const e=`Attributes cannot accept ${this.idlType.generic} types.`;yield A(this.tokens.name,this,"attr-invalid-type",e)}{const{reference:t}=N(this.idlType,e)||{};if(t){const e=(this.idlType.union?t:this.idlType).tokens.base,n="Attributes cannot accept dictionary types.";yield A(e,this,"attr-invalid-type",n)}}if(this.readonly&&function(e,t){if(e.union)return!1;if(e.extAttrs.some((e=>"EnforceRange"===e.name)))return!0;const n=t.unique.get(e.idlType);return"typedef"===n?.type&&n.idlType.extAttrs.some((e=>"EnforceRange"===e.name))}(this.idlType,e)){const e=this.idlType.tokens.base,t="Readonly attributes cannot accept [EnforceRange] extended attribute.";yield A(e,this,"attr-invalid-type",t)}}write(e){const{parent:t}=this;return e.ts.definition(e.ts.wrap([this.extAttrs.write(e),e.token(this.tokens.special),e.token(this.tokens.readonly),e.token(this.tokens.base),e.ts.type(this.idlType.write(e)),e.name_token(this.tokens.name,{data:this,parent:t}),e.token(this.tokens.termination)]),{data:this,parent:t})}}function ee(e){return e.startsWith("_")?e.slice(1):e}function te(e,{parser:t,allowDangler:n,listName:r="list"}){const s=t(e);if(!s)return[];s.tokens.separator=e.consume(",");const i=[s];for(;s.tokens.separator;){const s=t(e);if(!s){n||e.error(`Trailing comma in ${r}`);break}if(s.tokens.separator=e.consume(","),i.push(s),!s.tokens.separator)break}return i}function ne(e){return e.consumeKind("decimal","integer")||e.consume("true","false","Infinity","-Infinity","NaN")}function re({type:e,value:t}){switch(e){case"decimal":case"integer":return{type:"number",value:t};case"string":return{type:"string",value:t.slice(1,-1)}}switch(t){case"true":case"false":return{type:"boolean",value:"true"===t};case"Infinity":case"-Infinity":return{type:"Infinity",negative:t.startsWith("-")};case"[":return{type:"sequence",value:[]};case"{":return{type:"dictionary"};default:return{type:t}}}function se(e){const{source:t}=e,n=function(){const n=e.consume("unsigned"),r=e.consume("short","long");if(r){const s=e.consume("long");return new V({source:t,tokens:{prefix:n,base:r,postfix:s}})}n&&e.error("Failed to parse integer type")}()||function(){const n=e.consume("unrestricted"),r=e.consume("float","double");if(r)return new V({source:t,tokens:{prefix:n,base:r}});n&&e.error("Failed to parse float type")}();if(n)return n;const r=e.consume("bigint","boolean","byte","octet","undefined");return r?new V({source:t,tokens:{base:r}}):void 0}function ie(e){return te(e,{parser:Z.parse,listName:"arguments list"})}function oe(e,t){const n=B.parse(e),r=V.parse(e,t);return r&&(pe(r).extAttrs=n),r}function ae(e,t){const n=V.parse(e,t||"return-type");if(n)return n;const r=e.consume("void");if(r){const t=new V({source:e.source,tokens:{base:r}});return t.type="return-type",t}}function ce(e){const t=e.consume("stringifier");if(!t)return;return Q.parse(e,{special:t})||X.parse(e,{special:t})||e.error("Unterminated stringifier")}function le(e){const t=e.split("\n");if(t.length){const e=t[t.length-1].match(/^\s+/);if(e)return e[0]}return""}function ue(e){return()=>{if(e.extAttrs.length){const t=new ve("Exposed=Window,"),n=F.parse(t);n.tokens.separator=t.consume(",");const r=e.extAttrs[0];/^\s/.test(r.tokens.name.trivia)||(r.tokens.name.trivia=` ${r.tokens.name.trivia}`),e.extAttrs.unshift(n)}else{pe(e).extAttrs=B.parse(new ve("[Exposed=Window]"));const t=e.tokens.base.trivia;e.extAttrs.tokens.open.trivia=t,e.tokens.base.trivia=`\n${le(t)}`}}}function de(e){if(e.extAttrs.length)return e.extAttrs.tokens.open;if("operation"===e.type&&!e.special)return de(e.idlType);const t=Object.values(e.tokens).sort(((e,t)=>e.index-t.index));return t[0]}function pe(e,t){if(t||(t=e),!e)return e;return new Proxy(e,{get(e,t){const n=e[t];return Array.isArray(n)&&"source"!==t?pe(n,e):n},set(e,n,r){if(e[n]=r,!r)return!0;if(Array.isArray(r))for(const e of r)void 0!==e.parent&&(e.parent=t);else void 0!==r.parent&&(r.parent=t);return!0}})}const he={decimal:/-?(?=[0-9]*\.|[0-9]+[eE])(([0-9]+\.[0-9]*|[0-9]*\.[0-9]+)([Ee][-+]?[0-9]+)?|[0-9]+[Ee][-+]?[0-9]+)/y,integer:/-?(0([Xx][0-9A-Fa-f]+|[0-7]*)|[1-9][0-9]*)/y,identifier:/[_-]?[A-Za-z][0-9A-Z_a-z-]*/y,string:/"[^"]*"/y,whitespace:/[\t\n\r ]+/y,comment:/\/\/.*|\/\*[\s\S]*?\*\//y,other:/[^\t\n\r 0-9A-Za-z]/y},fe=["ArrayBuffer","SharedArrayBuffer","DataView","Int8Array","Int16Array","Int32Array","Uint8Array","Uint16Array","Uint32Array","Uint8ClampedArray","BigInt64Array","BigUint64Array","Float16Array","Float32Array","Float64Array","any","object","symbol"],me=["ByteString","DOMString","USVString"],ge=["async","attribute","callback","const","constructor","deleter","dictionary","enum","getter","includes","inherit","interface","iterable","maplike","namespace","partial","required","setlike","setter","static","stringifier","typedef","unrestricted"],be=["-Infinity","FrozenArray","Infinity","NaN","ObservableArray","Promise","async_iterable","async_sequence","bigint","boolean","byte","double","false","float","long","mixin","null","octet","optional","or","readonly","record","sequence","short","true","undefined","unsigned","void"].concat(ge,me,fe),ye=["(",")",",","...",":",";","<","=",">","?","*","[","]","{","}"],we=["_constructor","toString","_toString"];class ve{constructor(e){this.source=function(e){const t=[];let n=0,r="",s=1,i=0;for(;n<e.length;){const a=e.charAt(n);let c=-1;if(/[\t\n\r ]/.test(a)?c=o("whitespace",{noFlushTrivia:!0}):"/"===a&&(c=o("comment",{noFlushTrivia:!0})),-1!==c){const e=t.pop().value;s+=(e.match(/\n/g)||[]).length,r+=e,i-=1}else if(/[-0-9.A-Z_a-z]/.test(a)){if(c=o("decimal"),-1===c&&(c=o("integer")),-1===c){c=o("identifier");const e=t.length-1,n=t[e];if(-1!==c){if(we.includes(n.value)){const r=`${ee(n.value)} is a reserved identifier and must not be used.`;throw new ke(L(t,e,null,r))}be.includes(n.value)&&(n.type="inline")}}}else'"'===a&&(c=o("string"));for(const o of ye)if(e.startsWith(o,n)){t.push({type:"inline",value:o,trivia:r,line:s,index:i}),r="",n+=o.length,c=n;break}if(-1===c&&(c=o("other")),-1===c)throw new Error("Token stream not progressing");n=c,i+=1}return t.push({type:"eof",value:"",trivia:r,line:s,index:i}),t;function o(o,{noFlushTrivia:a}={}){const c=he[o];c.lastIndex=n;const l=c.exec(e);return l?(t.push({type:o,value:l[0],trivia:r,line:s,index:i}),a||(r=""),c.lastIndex):-1}}(e),this.position=0}error(e){throw new ke(L(this.source,this.position,this.current,e))}probeKind(e){return this.source.length>this.position&&this.source[this.position].type===e}probe(e){return this.probeKind("inline")&&this.source[this.position].value===e}consumeKind(...e){for(const t of e){if(!this.probeKind(t))continue;const e=this.source[this.position];return this.position++,e}}consume(...e){if(!this.probeKind("inline"))return;const t=this.source[this.position];for(const n of e)if(t.value===n)return this.position++,t}consumeIdentifier(e){if(this.probeKind("identifier")&&this.source[this.position].value===e)return this.consumeKind("identifier")}unconsume(e){this.position=e}}class ke extends Error{constructor({message:e,bareMessage:t,context:n,line:r,sourceName:s,input:i,tokens:o}){super(e),this.name="WebIDLParseError",this.bareMessage=t,this.context=n,this.line=r,this.sourceName=s,this.input=i,this.tokens=o}}class $e extends O{static parse(e){const t=e.consumeKind("string");if(t)return new $e({source:e.source,tokens:{value:t}})}get type(){return"enum-value"}get value(){return super.value.slice(1,-1)}write(e){const{parent:t}=this;return e.ts.wrap([e.ts.trivia(this.tokens.value.trivia),e.ts.definition(e.ts.wrap(['"',e.ts.name(this.value,{data:this,parent:t}),'"']),{data:this,parent:t}),e.token(this.tokens.separator)])}}class xe extends P{static parse(e){const t={};if(t.base=e.consume("enum"),!t.base)return;t.name=e.consumeKind("identifier")||e.error("No name for enum");const n=pe(new xe({source:e.source,tokens:t}));return e.current=n.this,t.open=e.consume("{")||e.error("Bodyless enum"),n.values=te(e,{parser:$e.parse,allowDangler:!0,listName:"enumeration"}),e.probeKind("string")&&e.error("No comma between enum values"),t.close=e.consume("}")||e.error("Unexpected value in enum"),n.values.length||e.error("No value in enum"),t.termination=e.consume(";")||e.error("No semicolon after enum"),n.this}get type(){return"enum"}get name(){return ee(this.tokens.name.value)}write(e){return e.ts.definition(e.ts.wrap([this.extAttrs.write(e),e.token(this.tokens.base),e.name_token(this.tokens.name,{data:this}),e.token(this.tokens.open),e.ts.wrap(this.values.map((t=>t.write(e)))),e.token(this.tokens.close),e.token(this.tokens.termination)]),{data:this})}}class Ce extends P{static parse(e){const t=e.consumeKind("identifier");if(!t)return;const n={target:t};if(n.includes=e.consume("includes"),n.includes)return n.mixin=e.consumeKind("identifier")||e.error("Incomplete includes statement"),n.termination=e.consume(";")||e.error("No terminating ; for includes statement"),new Ce({source:e.source,tokens:n});e.unconsume(t.index)}get type(){return"includes"}get target(){return ee(this.tokens.target.value)}get includes(){return ee(this.tokens.mixin.value)}write(e){return e.ts.definition(e.ts.wrap([this.extAttrs.write(e),e.reference_token(this.tokens.target,this),e.token(this.tokens.includes),e.reference_token(this.tokens.mixin,this),e.token(this.tokens.termination)]),{data:this})}}class Se extends P{static parse(e){const t={},n=pe(new Se({source:e.source,tokens:t}));if(t.base=e.consume("typedef"),t.base)return n.idlType=oe(e,"typedef-type")||e.error("Typedef lacks a type"),t.name=e.consumeKind("identifier")||e.error("Typedef lacks a name"),e.current=n.this,t.termination=e.consume(";")||e.error("Unterminated typedef, expected `;`"),n.this}get type(){return"typedef"}get name(){return ee(this.tokens.name.value)}*validate(e){yield*this.idlType.validate(e)}write(e){return e.ts.definition(e.ts.wrap([this.extAttrs.write(e),e.token(this.tokens.base),e.ts.type(this.idlType.write(e)),e.name_token(this.tokens.name,{data:this}),e.token(this.tokens.termination)]),{data:this})}}class _e extends P{static parse(e,t){const n={base:t},r=pe(new _e({source:e.source,tokens:n}));return n.name=e.consumeKind("identifier")||e.error("Callback lacks a name"),e.current=r.this,n.assign=e.consume("=")||e.error("Callback lacks an assignment"),r.idlType=ae(e)||e.error("Callback lacks a return type"),n.open=e.consume("(")||e.error("Callback lacks parentheses for arguments"),r.arguments=ie(e),n.close=e.consume(")")||e.error("Unterminated callback"),n.termination=e.consume(";")||e.error("Unterminated callback, expected `;`"),r.this}get type(){return"callback"}get name(){return ee(this.tokens.name.value)}*validate(e){yield*this.extAttrs.validate(e);for(const t of this.arguments)if(yield*t.validate(e),"async_sequence"===t.idlType.generic){const e="async_sequence types cannot be returned as a callback argument.";yield A(t.tokens.name,t,"async-sequence-idl-to-js",e)}yield*this.idlType.validate(e)}write(e){return e.ts.definition(e.ts.wrap([this.extAttrs.write(e),e.token(this.tokens.base),e.name_token(this.tokens.name,{data:this}),e.token(this.tokens.assign),e.ts.type(this.idlType.write(e)),e.token(this.tokens.open),...this.arguments.map((t=>t.write(e))),e.token(this.tokens.close),e.token(this.tokens.termination)]),{data:this})}}class Te extends P{static parse(e,t,{inheritable:n,allowedMembers:r}){const{tokens:s,type:i}=t;for(s.name=e.consumeKind("identifier")||e.error(`Missing name in ${i}`),e.current=t,t=pe(t),n&&Object.assign(s,function(e){const t=e.consume(":");return t?{colon:t,inheritance:e.consumeKind("identifier")||e.error("Inheritance lacks a type")}:{}}(e)),s.open=e.consume("{")||e.error(`Bodyless ${i}`),t.members=[];;){if(s.close=e.consume("}"),s.close)return s.termination=e.consume(";")||e.error(`Missing semicolon after ${i}`),t.this;const n=B.parse(e);let o;for(const[t,...n]of r)if(o=pe(t(e,...n)),o)break;o||e.error("Unknown member"),o.extAttrs=n,t.members.push(o.this)}}get partial(){return!!this.tokens.partial}get name(){return ee(this.tokens.name.value)}get inheritance(){return this.tokens.inheritance?ee(this.tokens.inheritance.value):null}*validate(e){for(const t of this.members)t.validate&&(yield*t.validate(e))}write(e){return e.ts.definition(e.ts.wrap([this.extAttrs.write(e),e.token(this.tokens.callback),e.token(this.tokens.partial),e.token(this.tokens.base),e.token(this.tokens.mixin),e.name_token(this.tokens.name,{data:this}),(()=>this.tokens.inheritance?e.ts.wrap([e.token(this.tokens.colon),e.ts.trivia(this.tokens.inheritance.trivia),e.ts.inheritance(e.reference(this.tokens.inheritance.value,{context:this}))]):"")(),e.token(this.tokens.open),e.ts.wrap(this.members.map((t=>t.write(e)))),e.token(this.tokens.close),e.token(this.tokens.termination)]),{data:this})}}class Re extends P{static parse(e){const t={};if(t.base=e.consume("const"),!t.base)return;let n=se(e);if(!n){const t=e.consumeKind("identifier")||e.error("Const lacks a type");n=new V({source:e.source,tokens:{base:t}})}e.probe("?")&&e.error("Unexpected nullable constant type"),n.type="const-type",t.name=e.consumeKind("identifier")||e.error("Const lacks a name"),t.assign=e.consume("=")||e.error("Const lacks value assignment"),t.value=ne(e)||e.error("Const lacks a value"),t.termination=e.consume(";")||e.error("Unterminated const, expected `;`");const r=new Re({source:e.source,tokens:t});return pe(r).idlType=n,r}get type(){return"const"}get name(){return ee(this.tokens.name.value)}get value(){return re(this.tokens.value)}write(e){const{parent:t}=this;return e.ts.definition(e.ts.wrap([this.extAttrs.write(e),e.token(this.tokens.base),e.ts.type(this.idlType.write(e)),e.name_token(this.tokens.name,{data:this,parent:t}),e.token(this.tokens.assign),e.token(this.tokens.value),e.token(this.tokens.termination)]),{data:this,parent:t})}}class Ee extends P{static parse(e){const t=e.position,n=pe(new Ee({source:e.source,tokens:{}})),{tokens:r}=n;if(r.readonly=e.consume("readonly"),r.readonly||(r.async=e.consume("async")),r.base=r.readonly?e.consume("maplike","setlike"):r.async?e.consume("iterable"):e.consume("iterable","async_iterable","maplike","setlike"),!r.base)return void e.unconsume(t);const{type:s}=n,i="maplike"===s,o=i||"iterable"===s||"async_iterable"===s,a="async_iterable"===s||n.async&&"iterable"===s;r.open=e.consume("<")||e.error(`Missing less-than sign \`<\` in ${s} declaration`);const c=oe(e)||e.error(`Missing a type argument in ${s} declaration`);return n.idlType=[c],n.arguments=[],o&&(c.tokens.separator=e.consume(","),c.tokens.separator?n.idlType.push(oe(e)):i&&e.error(`Missing second type argument in ${s} declaration`)),r.close=e.consume(">")||e.error(`Missing greater-than sign \`>\` in ${s} declaration`),e.probe("(")&&(a?(r.argsOpen=e.consume("("),n.arguments.push(...ie(e)),r.argsClose=e.consume(")")||e.error("Unterminated async iterable argument list")):e.error("Arguments are only allowed for `async iterable`")),r.termination=e.consume(";")||e.error(`Missing semicolon after ${s} declaration`),n.this}get type(){return this.tokens.base.value}get readonly(){return!!this.tokens.readonly}get async(){return!!this.tokens.async}*validate(e){if(this.async&&"iterable"===this.type){const e="`async iterable` is now changed to `async_iterable`.";yield A(this.tokens.async,this,"obsolete-async-iterable-syntax",e,{autofix:(t=this,()=>{const e=t.tokens.async;t.tokens.base={...e,type:"async_iterable",value:"async_iterable"},delete t.tokens.async})})}var t;for(const t of this.idlType)yield*t.validate(e);for(const t of this.arguments)yield*t.validate(e)}write(e){return e.ts.definition(e.ts.wrap([this.extAttrs.write(e),e.token(this.tokens.readonly),e.token(this.tokens.async),e.token(this.tokens.base,e.ts.generic),e.token(this.tokens.open),e.ts.wrap(this.idlType.map((t=>t.write(e)))),e.token(this.tokens.close),e.token(this.tokens.argsOpen),e.ts.wrap(this.arguments.map((t=>t.write(e)))),e.token(this.tokens.argsClose),e.token(this.tokens.termination)]),{data:this,parent:this.parent})}}class Le extends P{static parse(e){const t=e.consume("constructor");if(!t)return;const n={base:t};n.open=e.consume("(")||e.error("No argument list in constructor");const r=ie(e);n.close=e.consume(")")||e.error("Unterminated constructor"),n.termination=e.consume(";")||e.error("No semicolon after constructor");const s=new Le({source:e.source,tokens:n});return pe(s).arguments=r,s}get type(){return"constructor"}*validate(e){for(const t of this.arguments)yield*t.validate(e)}write(e){const{parent:t}=this;return e.ts.definition(e.ts.wrap([this.extAttrs.write(e),e.token(this.tokens.base,e.ts.nameless,{data:this,parent:t}),e.token(this.tokens.open),e.ts.wrap(this.arguments.map((t=>t.write(e)))),e.token(this.tokens.close),e.token(this.tokens.termination)]),{data:this,parent:t})}}function Ae(e){const t=e.consume("static");if(!t)return;return Q.parse(e,{special:t})||X.parse(e,{special:t})||e.error("No body in static member")}class Pe extends Te{static parse(e,t,{extMembers:n=[],partial:r=null}={}){const s={partial:r,base:t};return Te.parse(e,new Pe({source:e.source,tokens:s}),{inheritable:!r,allowedMembers:[...n,[Re.parse],[Le.parse],[Ae],[ce],[Ee.parse],[Q.parse],[X.parse]]})}get type(){return"interface"}*validate(e){if(yield*this.extAttrs.validate(e),!this.partial&&this.extAttrs.every((e=>"Exposed"!==e.name))){const e="Interfaces must have `[Exposed]` extended attribute. To fix, add, for example, `[Exposed=Window]`. Please also consider carefully if your interface should also be exposed in a Worker scope. Refer to the [WebIDL spec section on Exposed](https://heycam.github.io/webidl/#Exposed) for more information.";yield A(this.tokens.name,this,"require-exposed",e,{autofix:ue(this)})}const t=this.extAttrs.filter((e=>"Constructor"===e.name));for(const e of t){const t="Constructors should now be represented as a `constructor()` operation on the interface instead of `[Constructor]` extended attribute. Refer to the [WebIDL spec section on constructor operations](https://heycam.github.io/webidl/#idl-constructors) for more information.";yield A(e.tokens.name,this,"constructor-member",t,{autofix:Ne(this,e)})}if(this.extAttrs.some((e=>"Global"===e.name))){const e=this.extAttrs.filter((e=>"LegacyFactoryFunction"===e.name));for(const t of e){const e="Interfaces marked as `[Global]` cannot have factory functions.";yield A(t.tokens.name,this,"no-constructible-global",e)}const t=this.members.filter((e=>"constructor"===e.type));for(const e of t){const t="Interfaces marked as `[Global]` cannot have constructors.";yield A(e.tokens.base,this,"no-constructible-global",t)}}yield*super.validate(e),this.partial||(yield*function*(e,t){const n=function(e){const t=o(e);return{statics:new Set(t.filter((e=>"static"===e.special)).map((e=>e.name))),nonstatics:new Set(t.filter((e=>"static"!==e.special)).map((e=>e.name)))}}(t),r=e.partials.get(t.name)||[],s=e.mixinMap.get(t.name)||[];for(const e of[...r,...s]){const r=o(e),s=r.filter((e=>"static"===e.special)),a=r.filter((e=>"static"!==e.special));yield*i(s,n.statics,e,t),yield*i(a,n.nonstatics,e,t),s.forEach((e=>n.statics.add(e.name))),a.forEach((e=>n.nonstatics.add(e.name)))}function*i(e,t,n,r){for(const s of e){const{name:e}=s;if(e&&t.has(e)){const t=`The ${"static"===s.special?"static ":""}operation "${e}" has already been defined for the base interface "${r.name}" either in itself or in a mixin`;yield A(s.tokens.name,n,"no-cross-overload",t)}}}function o(e){return e.members.filter((({type:e})=>"operation"===e))}}(e,this))}}function Ne(e,t){return e=pe(e),()=>{const n=le(e.extAttrs.tokens.open.trivia),r=e.members.length?le(de(e.members[0]).trivia):function(e){const t=le(e),n=t.includes("\t")?"\t":" ";return t+n}(n),s=Le.parse(new ve(`\n${r}constructor();`));s.extAttrs=new B({source:e.source,tokens:{}}),pe(s).arguments=t.arguments;const i=function(e,t){const n=e.slice().reverse().findIndex(t);return-1===n?n:e.length-n-1}(e.members,(e=>"constructor"===e.type));e.members.splice(i+1,0,s);const{close:o}=e.tokens;o.trivia.includes("\n")||(o.trivia+=`\n${n}`);const{extAttrs:a}=e,c=a.indexOf(t),l=a.splice(c,1);a.length?a.length===c?a[c-1].tokens.separator=void 0:a[c].tokens.name.trivia.trim()||(a[c].tokens.name.trivia=l[0].tokens.name.trivia):a.tokens.open=a.tokens.close=void 0}}class Ie extends Te{static parse(e,t,{extMembers:n=[],partial:r}={}){const s={partial:r,base:t};if(s.mixin=e.consume("mixin"),s.mixin)return Te.parse(e,new Ie({source:e.source,tokens:s}),{allowedMembers:[...n,[Re.parse],[ce],[Q.parse,{noInherit:!0}],[X.parse,{regular:!0}]]})}get type(){return"interface mixin"}}class De extends P{static parse(e){const t={},n=pe(new De({source:e.source,tokens:t}));return n.extAttrs=B.parse(e),t.required=e.consume("required"),n.idlType=oe(e,"dictionary-type")||e.error("Dictionary member lacks a type"),t.name=e.consumeKind("identifier")||e.error("Dictionary member lacks a name"),n.default=K.parse(e),t.required&&n.default&&e.error("Required member must not have a default"),t.termination=e.consume(";")||e.error("Unterminated dictionary member, expected `;`"),n.this}get type(){return"field"}get name(){return ee(this.tokens.name.value)}get required(){return!!this.tokens.required}*validate(e){yield*this.idlType.validate(e)}write(e){const{parent:t}=this;return e.ts.definition(e.ts.wrap([this.extAttrs.write(e),e.token(this.tokens.required),e.ts.type(this.idlType.write(e)),e.name_token(this.tokens.name,{data:this,parent:t}),this.default?this.default.write(e):"",e.token(this.tokens.termination)]),{data:this,parent:t})}}class Oe extends Te{static parse(e,{extMembers:t=[],partial:n}={}){const r={partial:n};if(r.base=e.consume("dictionary"),r.base)return Te.parse(e,new Oe({source:e.source,tokens:r}),{inheritable:!n,allowedMembers:[...t,[De.parse]]})}get type(){return"dictionary"}}class je extends Te{static parse(e,{extMembers:t=[],partial:n}={}){const r={partial:n};if(r.base=e.consume("namespace"),r.base)return Te.parse(e,new je({source:e.source,tokens:r}),{allowedMembers:[...t,[Q.parse,{noInherit:!0,readonly:!0}],[Re.parse],[X.parse,{regular:!0}]]})}get type(){return"namespace"}*validate(e){if(!this.partial&&this.extAttrs.every((e=>"Exposed"!==e.name))){const e="Namespaces must have [Exposed] extended attribute. To fix, add, for example, [Exposed=Window]. Please also consider carefully if your namespace should also be exposed in a Worker scope. Refer to the [WebIDL spec section on Exposed](https://heycam.github.io/webidl/#Exposed) for more information.";yield A(this.tokens.name,this,"require-exposed",e,{autofix:ue(this)})}yield*super.validate(e)}}class ze extends Te{static parse(e,t,{extMembers:n=[]}={}){const r={callback:t};if(r.base=e.consume("interface"),r.base)return Te.parse(e,new ze({source:e.source,tokens:r}),{allowedMembers:[...n,[Re.parse],[X.parse,{regular:!0}]]})}get type(){return"callback interface"}}function Me(e,t){const n=e.source;function r(t){e.error(t)}function s(...t){return e.consume(...t)}function i(n){const i=s("interface");if(i)return Ie.parse(e,i,{...n,...t?.extensions?.mixin})||Pe.parse(e,i,{...n,...t?.extensions?.interface})||r("Interface has no proper body")}function o(){if(t.productions)for(const n of t.productions){const t=n(e);if(t)return t}return function(){const n=s("callback");if(n)return e.probe("interface")?ze.parse(e,n,{...t?.extensions?.callbackInterface}):_e.parse(e,n)}()||i()||function(){const n=s("partial");if(n)return Oe.parse(e,{partial:n,...t?.extensions?.dictionary})||i({partial:n})||je.parse(e,{partial:n,...t?.extensions?.namespace})||r("Partial doesn't apply to anything")}()||Oe.parse(e,t?.extensions?.dictionary)||xe.parse(e)||Se.parse(e)||Ce.parse(e)||je.parse(e,t?.extensions?.namespace)}const a=function(){if(!n.length)return[];const s=[];for(;;){const t=B.parse(e),n=o();if(!n){t.length&&r("Stray extended attributes");break}pe(n).extAttrs=t,s.push(n)}const i=j.parse(e);return t.concrete&&s.push(i),s}();return e.position<n.length&&r("Unrecognised tokens"),a}function Ue(e){return e}const qe={wrap:e=>e.join(""),trivia:Ue,name:Ue,reference:Ue,type:Ue,generic:Ue,nameless:Ue,inheritance:Ue,definition:Ue,extendedAttribute:Ue,extendedAttributeReference:Ue};class We{constructor(e){this.ts=Object.assign({},qe,e)}reference(e,{unescaped:t,context:n}){return t||(t=e.startsWith("_")?e.slice(1):e),this.ts.reference(e,t,n)}token(e,t=Ue,...n){if(!e)return"";const r=t(e.value,...n);return this.ts.wrap([this.ts.trivia(e.trivia),r])}reference_token(e,t){return this.token(e,this.reference.bind(this),{context:t})}name_token(e,t){return this.token(e,this.ts.name,t)}identifier(e,t){return this.ts.wrap([this.reference_token(e.tokens.value,t),this.token(e.tokens.separator)])}}function Fe(e,t){const n=new Map,r=e.filter((e=>"includes"===e.type));for(const e of r){const r=t.get(e.includes);if(!r)continue;const s=n.get(e.target);s?s.push(r):n.set(e.target,[r])}return n}function*Be(e){const t=function(e){const t=new Map,n=new Set,r=new Map;for(const s of e)if(s.partial){const e=r.get(s.name);e?e.push(s):r.set(s.name,[s])}else s.name&&(t.has(s.name)?n.add(s):t.set(s.name,s));return{all:e,unique:t,partials:r,duplicates:n,mixinMap:Fe(e,t),cache:{typedefIncludesDictionary:new WeakMap,dictionaryIncludesRequiredField:new WeakMap}}}(e);for(const e of t.all)e.validate&&(yield*e.validate(t));yield*function*({unique:e,duplicates:t}){for(const n of t){const{name:t}=n,r=`The name "${t}" of type "${e.get(t).type}" was already seen`;yield A(n.tokens.name,n,"no-duplicate",r)}}(t)}var He,Ge=Object.freeze({__proto__:null,WebIDLParseError:ke,parse:function(e,t={}){const n=new ve(e);return void 0!==t.sourceName&&(n.source.name=t.sourceName),Me(n,t)},validate:function(e){return[...Be((t=e,t.flat?t.flat():[].concat(...t)))];var t},write:function(e,{templates:t=qe}={}){t=Object.assign({},qe,t);const n=new We(t);return t.wrap(e.map((e=>e.write(n))))}});!function(e){e.ILLEGAL="ILLEGAL",e.EOF="EOF",e.NL="\n",e.SPACE=" ",e.UNDERSCORE="_",e.DOLLAR="$",e.ATSIGN="@",e.CARET="^",e.HASH="#",e.TILDE="~",e.AMPERSAND="&",e.IDENT="IDENT",e.COMMENT="COMMENT",e.STRING="STRING",e.NUMBER="NUMBER",e.FLOAT="FLOAT",e.CTLOP="CTLOP",e.BYTES="BYTES",e.HEX="HEX",e.BASE64="BASE64",e.ASSIGN="=",e.ARROWMAP="=>",e.TCHOICE="/",e.GCHOICE="//",e.TCHOICEALT="/=",e.GCHOICEALT="//=",e.PLUS="+",e.MINUS="-",e.QUEST="?",e.ASTERISK="*",e.INCLRANGE="..",e.EXCLRANGE="...",e.COMMA=",",e.DOT=".",e.COLON=":",e.SEMICOLON=";",e.LPAREN="(",e.RPAREN=")",e.LBRACE="{",e.RBRACE="}",e.LBRACK="[",e.RBRACK="]",e.LT="<",e.GT=">",e.QUOT='"'}(He||(He={}));const Ve=Object.entries(He).reduce(((e,[t,n])=>(e[n]=t,e)),{});class Je{type;literal;comments;whitespace;constructor(e,t,n=[],r=""){this.type=e,this.literal=t,this.comments=n,this.whitespace=r}serialize(){let e="";for(const t of this.comments)e+=t.serialize();switch(e+=this.whitespace,this.type){case He.IDENT:case He.COMMENT:case He.NUMBER:case He.FLOAT:e+=this.literal;break;case He.STRING:e+='"'+this.literal+'"';break;case He.CTLOP:e+="."+this.literal;break;case He.BYTES:e+="'"+this.literal+"'";break;case He.HEX:e+="h'"+this.literal+"'";break;case He.BASE64:e+="b64'"+this.literal+"'";break;case He.EOF:break;default:e+=this.type.valueOf()}return e}startWithSpaces(){return""!==this.whitespace||this.comments.length>0}toString(e=0){const t=[`${" ".repeat(e)}${this.constructor.name}: ${Ve[this.type]} (${this.type})`];""!==this.whitespace&&t.push(" ".repeat(e+1)+`whitespaces: ${this.whitespace.length}`),""!==this.literal&&t.push(" ".repeat(e+1)+`literal: ${this.literal}`);for(const n of this.comments)t.push(n.toString(e+1));return t.join("\n")}toJSON(){return{type:this.type,literal:this.literal,comments:this.comments?.map((e=>e.toJSON())),whitespace:this.whitespace}}}class Ke{parentNode=null;serialize(e){if(this.setChildrenParent(),e){const t=e.markupFor(this);let n=null!==t[0]?t[0]:"";return n+=this._serialize(e),n+=null!==t[1]?t[1]:"",n}return this._serialize()}setChildrenParent(){for(const e of this.getChildren())e.parentNode=this,e.setChildrenParent()}getChildren(){return[]}_serializeToken(e,t){return e?t?t.serializeToken(e,this):e.serialize():""}toString(e=0){return" ".repeat(e)+this.constructor.name}toJSON(){return{}}}class Ze extends Ke{openToken=null;closeToken=null;serialize(e){let t="";if(e){const n=e.markupFor(this);t+=null!==n[0]?n[0]:""}if(t+=this._serializeToken(this.openToken,e),t+=this._serialize(e),t+=this._serializeToken(this.closeToken,e),e){const n=e.markupFor(this);t+=null!==n[1]?n[1]:""}return t}toString(e=0){const t=[super.toString(e)];return this.openToken&&t.push(this.openToken.toString(e+1)),this.closeToken&&t.push(this.closeToken.toString(e+1)),t.join("\n")}toJSON(){return Object.assign(super.toJSON(),{openToken:this.openToken?.toJSON(),closeToken:this.closeToken?.toJSON()})}}class Ye extends Ze{comments=[];whitespace="";separator=null;_prestr(e){return""}serialize(e){let t=this._prestr(e);for(const n of this.comments)t+=this._serializeToken(n,e);return t+=this.whitespace,t+=super.serialize(e),t+=this._serializeToken(this.separator,e),t}setComments(e){this.comments=e.comments,this.whitespace=e.whitespace}toString(e=0){const t=[super.toString(e)];for(const n of this.comments)t.push(n.toString(e+1));return""!==this.whitespace&&t.push(" ".repeat(e+1)+`whitespaces: ${this.whitespace.length}`),this.separator&&t.push(this.separator.toString(e+1)),t.join("\n")}toJSON(){return Object.assign(super.toJSON(),{comments:this.comments.map((e=>e.toJSON())),whitespace:this.whitespace,separator:this.separator?.toJSON()})}}class Xe extends Ye{rules;constructor(e){super(),this.rules=e}getChildren(){return this.rules}_serialize(e){return this.rules.map((t=>t.serialize(e))).join("")}toString(e=0){const t=[super.toString(e)];for(const n of this.rules)t.push(n.toString(e+1));return t.join("\n")}toJSON(){return Object.assign(super.toJSON(),{rules:this.rules.map((e=>e.toJSON()))})}}class Qe extends Ke{name;assign;type;constructor(e,t,n){super(),this.name=e,this.assign=t,this.type=n}getChildren(){return[this.name,this.type]}_serialize(e){let t=this.name.serialize(e);return t+=this._serializeToken(this.assign,e),t+=this.type.serialize(e),t}toString(e=0){return[super.toString(e),this.name.toString(e+1),this.assign.toString(e+1),this.type.toString(e+1)].join("\n")}toJSON(){return Object.assign(super.toJSON(),{name:this.name.toJSON(),assign:this.assign.toJSON(),type:this.type.toJSON()})}}class et extends Ye{occurrence;key;type;constructor(e,t,n){super(),this.occurrence=e,this.key=t,this.type=n}getChildren(){const e=[];return this.occurrence&&e.push(this.occurrence),this.key&&e.push(this.key),e.push(this.type),e}_serialize(e){let t="";return this.occurrence&&(t+=this.occurrence.serialize(e)),this.key&&(t+=this.key.serialize(e)),t+=this.type.serialize(e),t}isConvertibleToType(){return null===this.occurrence&&null===this.key&&(!(this.type instanceof tt)||this.type instanceof rt||this.type instanceof nt)}toString(e=0){const t=[super.toString(e)];return this.occurrence&&t.push(this.occurrence.toString(e+1)),this.key&&t.push(this.key.toString(e+1)),t.push(this.type.toString(e+1)),t.join("\n")}toJSON(){return Object.assign(super.toJSON(),{occurrence:this.occurrence?.toJSON(),key:this.key?.toJSON(),type:this.type.toJSON()})}}class tt extends Ye{groupChoices;constructor(e){super(),this.groupChoices=e}getChildren(){return this.groupChoices}_serialize(e){return this.groupChoices.map((t=>t.serialize(e))).join("")}toString(e=0){const t=[super.toString(e)];for(const n of this.groupChoices)t.push(n.toString(e+1));return t.join("\n")}toJSON(){return Object.assign(super.toJSON(),{groupChoices:this.groupChoices.map((e=>e.toJSON()))})}}let nt=class extends tt{},rt=class extends tt{};class st extends Ye{groupEntries;constructor(e){super(),this.groupEntries=e}getChildren(){return this.groupEntries}_serialize(e){return this.groupEntries.map((t=>t.serialize(e))).join("")}toString(e=0){const t=[super.toString(e)];for(const n of this.groupEntries)t.push(n.toString(e+1));return t.join("\n")}toJSON(){return Object.assign(super.toJSON(),{groupEntries:this.groupEntries.map((e=>e.toJSON()))})}}class it extends Ye{numericPart;typePart;constructor(e=null,t=null){super(),this.numericPart=e,this.typePart=t}getChildren(){return this.typePart?[this.typePart]:[]}_serialize(e){let t=this._serializeToken(new Je(He.HASH,""),e);return t+=this._serializeToken(this.numericPart,e),t+=this.typePart?this.typePart.serialize(e):"",t}toString(e=0){const t=[super.toString(e)+" (#)"];return this.numericPart&&t.push(this.numericPart.toString(e+1)),this.typePart&&t.push(this.typePart.toString(e+1)),t.join("\n")}toJSON(){return Object.assign(super.toJSON(),{numericPart:this.numericPart?.toJSON(),typePart:this.typePart?.toJSON()})}}class ot extends Ye{n;m;tokens;constructor(e,t,n=[]){super(),this.n=e,this.m=t,this.tokens=n}_serialize(e){return this.tokens.map((t=>this._serializeToken(t,e))).join("")}toString(e=0){const t=[super.toString(e)];for(const n of this.tokens)t.push(n.toString(e+1));return t.join("\n")}toJSON(){return Object.assign(super.toJSON(),{n:this.n,m:this.m,tokens:this.tokens.map((e=>e.toJSON()))})}}class at extends Ye{value;type;constructor(e,t){super(),this.value=e,this.type=t}_serialize(e){let t="",n="";return"text"===this.type?(t='"',n='"'):"bytes"===this.type?(t="'",n="'"):"hex"===this.type?(t="h'",n="'"):"base64"===this.type&&(t="b64'",n="'"),e?e.serializeValue(t,this.value,n,this):t+this.value+n}toString(e=0){return" ".repeat(e)+`${this.constructor.name} (${this.type}): ${this.value}`}toJSON(){return Object.assign(super.toJSON(),{value:this.value,type:this.type})}}class ct extends Ye{name;unwrapped;parameters;constructor(e,t,n=null){super(),this.name=e,this.unwrapped=t,this.parameters=n}getChildren(){return this.parameters?[this.parameters]:[]}_prestr(e){return this._serializeToken(this.unwrapped,e)}_serialize(e){let t="";return e?t+=e.serializeName(this.name,this):t=this.name,this.parameters&&(t+=this.parameters.serialize(e)),t}toString(e=0){const t=[super.toString(e)," ".repeat(e+1)+this.name];return this.unwrapped&&t.push(this.unwrapped.toString(e+1)),this.parameters&&t.push(this.parameters.toString(e+1)),t.join("\n")}toJSON(){return Object.assign(super.toJSON(),{name:this.name,unwrapped:this.unwrapped?.toJSON(),parameters:this.parameters?.toJSON()})}}class lt extends Ye{target;constructor(e){super(),this.target=e}getChildren(){return[this.target]}_serialize(e){let t=this._serializeToken(new Je(He.AMPERSAND,""),e);return t+=this.target.serialize(e),t}toString(e=0){return[super.toString(e)+" (&)",this.target.toString(e+1)].join("\n")}toJSON(){return Object.assign(super.toJSON(),{target:this.target.toJSON()})}}class ut extends Ye{min;max;rangeop;constructor(e,t,n){super(),this.min=e,this.max=t,this.rangeop=n}getChildren(){return[this.min,this.max]}_serialize(e){let t=this.min.serialize(e);return t+=this._serializeToken(this.rangeop,e),t+=this.max.serialize(e),t}toString(e=0){return[super.toString(e),this.min.toString(e+1),this.rangeop.toString(e+1),this.max.toString(e+1)].join("\n")}toJSON(){return Object.assign(super.toJSON(),{min:this.min.toJSON(),max:this.max.toJSON(),rangeop:this.rangeop.toJSON()})}}class dt extends Ye{type;name;controller;constructor(e,t,n){super(),this.type=e,this.name=t,this.controller=n}getChildren(){return[this.type,this.controller]}_serialize(e){let t=this.type.serialize(e);return t+=this._serializeToken(this.name,e),t+=this.controller.serialize(e),t}toString(e=0){return[super.toString(e),this.type.toString(e+1),this.name.toString(e+1),this.controller.toString(e+1)].join("\n")}toJSON(){return Object.assign(super.toJSON(),{type:this.type.toJSON(),name:this.name.toJSON(),controller:this.controller.toJSON()})}}class pt extends Ke{type;hasCut;hasColon;tokens;constructor(e,t,n,r=[]){super(),this.type=e,this.hasCut=t,this.hasColon=n,this.tokens=r}getChildren(){return[this.type]}_serialize(e){let t=this.type.serialize(e);return t+=this.tokens.map((t=>this._serializeToken(t,e))).join(""),t}toString(e=0){const t=[super.toString(e),this.type.toString(e+1)];for(const n of this.tokens)t.push(n.toString(e+1));return t.join("\n")}toJSON(){return Object.assign(super.toJSON(),{type:this.type.toJSON(),hasCut:this.hasCut,hasColon:this.hasColon,tokens:this.tokens.map((e=>e.toJSON()))})}}class ht extends Ye{types;constructor(e){super(),this.types=e}getChildren(){return this.types}_serialize(e){return this.types.map((t=>t.serialize(e))).join("")}toString(e=0){const t=[super.toString(e)];for(const n of this.types)t.push(n.toString(e+1));return t.join("\n")}toJSON(){return Object.assign(super.toJSON(),{types:this.types.map((e=>e.toJSON()))})}}class ft extends Ze{parameters;constructor(e){super(),this.parameters=e}getChildren(){return this.parameters}_serialize(e){return this.parameters.map((t=>t.serialize(e))).join("")}toString(e=0){const t=[super.toString(e)];for(const n of this.parameters)t.push(n.toString(e+1));return t.join("\n")}toJSON(){return Object.assign(super.toJSON(),{parameters:this.parameters.map((e=>e.toJSON()))})}}class mt extends Ze{parameters;constructor(e){super(),this.parameters=e}getChildren(){return this.parameters}_serialize(e){return this.parameters.map((t=>t.serialize(e))).join("")}toString(e=0){const t=[super.toString(e)];for(const n of this.parameters)t.push(n.toString(e+1));return t.join("\n")}toJSON(){return Object.assign(super.toJSON(),{parameters:this.parameters.map((e=>e.toJSON()))})}}class gt extends Error{constructor(e="A parsing error occurred"){super(e),this.name="ParserError"}}function bt(e){return function(e){return"a"<=e&&e<="z"||"A"<=e&&e<="Z"}(e)||"@_$".includes(e)}function yt(e){return e.length>0&&"123456789".includes(e[0])&&[...e].every((e=>"0123456789".includes(e)))}class wt{line;position;constructor(e=-1,t=-1){this.line=e,this.position=t}}class vt{input;position=0;readPosition=0;ch=0;constructor(e){this.input=e,this.readChar()}readChar(){this.readPosition>=this.input.length?this.ch=0:this.ch=this.input.charCodeAt(this.readPosition),this.position=this.readPosition,this.readPosition+=1}_peekAtNextChar(){return this.readPosition>=this.input.length?"":this.input[this.readPosition]}getLocation(){const e=this.position-2,t=this.input.split("\n");let n=0;for(let r=0;r<t.length;r++){const s=t[r].length;if(n+=s+1,n>e){return new wt(r,e-(n-s)+1)}}return new wt(0,0)}getLine(e){return this.input.split("\n")[e]}getLocationInfo(){const e=this.getLocation();let t=(e.line>=0?this.getLine(e.line):"")+"\n";return t+=" ".repeat(e.position>=0?e.position:0)+"^\n",t+=" ".repeat(e.position>=0?e.position:0)+"|\n",t}nextToken(){const e=this._readComments();let t="";e.length>0&&""===e[e.length-1].literal&&(t=e[e.length-1].whitespace,e.pop());let n=new Je(He.ILLEGAL,"");const r=String.fromCharCode(this.ch);let s=!1;if("="===r)">"===this._peekAtNextChar()?(this.readChar(),n=new Je(He.ARROWMAP,"",e,t)):n=new Je(He.ASSIGN,"",e,t);else if("("===r)n=new Je(He.LPAREN,"",e,t);else if(")"===r)n=new Je(He.RPAREN,"",e,t);else if("{"===r)n=new Je(He.LBRACE,"",e,t);else if("}"===r)n=new Je(He.RBRACE,"",e,t);else if("["===r)n=new Je(He.LBRACK,"",e,t);else if("]"===r)n=new Je(He.RBRACK,"",e,t);else if("<"===r)n=new Je(He.LT,"",e,t);else if(">"===r)n=new Je(He.GT,"",e,t);else if("+"===r)n=new Je(He.PLUS,"",e,t);else if(","===r)n=new Je(He.COMMA,"",e,t);else if("."===r)"."===this._peekAtNextChar()?(this.readChar(),n=new Je(He.INCLRANGE,"",e,t),"."===this._peekAtNextChar()&&(this.readChar(),n=new Je(He.EXCLRANGE,"",e,t))):bt(this._peekAtNextChar())&&(this.readChar(),n=new Je(He.CTLOP,this._readIdentifier(),e,t),s=!0);else if(":"===r)n=new Je(He.COLON,"",e,t);else if("?"===r)n=new Je(He.QUEST,"",e,t);else if("/"===r)"/"===this._peekAtNextChar()?(this.readChar(),n=new Je(He.GCHOICE,"",e,t),"="===this._peekAtNextChar()&&(this.readChar(),n=new Je(He.GCHOICEALT,"",e,t))):"="===this._peekAtNextChar()?(this.readChar(),n=new Je(He.TCHOICEALT,"",e,t)):n=new Je(He.TCHOICE,"",e,t);else if("*"===r)n=new Je(He.ASTERISK,"",e,t);else if("^"===r)n=new Je(He.CARET,"",e,t);else if("#"===r)n=new Je(He.HASH,"",e,t);else if("~"===r)n=new Je(He.TILDE,"",e,t);else if('"'===r)n=new Je(He.STRING,this._readString(),e,t);else if("'"===r)n=new Je(He.BYTES,this._readBytesString(),e,t);else if(";"===r)n=new Je(He.COMMENT,this._readComment(),e,t),s=!0;else if("&"===r)n=new Je(He.AMPERSAND,"",e,t);else if(0===this.ch)n=new Je(He.EOF,"",e,t);else if(bt(r))"b"===r&&"6"===this._peekAtNextChar()?(this.readChar(),this.readChar(),"4"===String.fromCharCode(this.ch)&&"'"===this._peekAtNextChar()?(this.readChar(),n=new Je(He.BASE64,this._readBytesString(),e,t)):(n=new Je(He.IDENT,this._readIdentifier("b6"),e,t),s=!0)):"h"===r&&"'"===this._peekAtNextChar()?(this.readChar(),n=new Je(He.HEX,this._readBytesString(),e,t)):(n=new Je(He.IDENT,this._readIdentifier(),e,t),s=!0);else if(this._isDigit(r)||"-"===r){const r=this._readNumberOrFloat();n=new Je(r.includes(".")?He.FLOAT:He.NUMBER,r,e,t),s=!0}return s||this.readChar(),n}_isDigit(e){return e>="0"&&e<="9"}_readIdentifier(e=""){const t=this.position;if(""===e&&!bt(String.fromCharCode(this.ch)))throw this._tokenError("expected identifier, got nothing");for(;bt(String.fromCharCode(this.ch))||this._isDigit(String.fromCharCode(this.ch))||"-. ".includes(String.fromCharCode(this.ch));){if(" "===String.fromCharCode(this.ch))break;this.readChar()}const n=e+this.input.substring(t,this.position);if(n.endsWith("-")||n.endsWith("."))throw this._tokenError(`identifier cannot end with \`-\` or \`.\`, got \`${n}\``);return n}_readComment(){const e=this.position;for(;this.ch&&"\n"!==String.fromCharCode(this.ch);)this.readChar();return this.input.substring(e,this.position)}_readString(){const e=this.position;for(this.readChar();'"'!==String.fromCharCode(this.ch);)if(this.ch>=32&&this.ch<=33||this.ch>=35&&this.ch<=91||this.ch>=93&&this.ch<=126||this.ch>=128&&this.ch<=1114109)this.readChar();else if("\\"===String.fromCharCode(this.ch)){if(this.readChar(),!(this.ch>=32&&this.ch<=126||this.ch>=128&&this.ch<=1114109))throw this._tokenError(`invalid escape character in text string \`${this.input.substring(e+1,this.position)}\``);this.readChar()}else if(10===this.ch)this.readChar();else{if(13!==this.ch||10!==this._peekAtNextChar().charCodeAt(0))throw this._tokenError(`invalid text string \`${this.input.substring(e+1,this.position)}\``);this.readChar(),this.readChar()}return this.input.substring(e+1,this.position)}_readBytesString(){const e=this.position;for(this.readChar();"'"!==String.fromCharCode(this.ch);)if(this.ch>=32&&this.ch<=38||this.ch>=40&&this.ch<=91||this.ch>=93&&this.ch<=1114109)this.readChar();else if("\\"===String.fromCharCode(this.ch)){if(this.readChar(),!(this.ch>=32&&this.ch<=126||this.ch>=128&&this.ch<=1114109))throw this._tokenError(`invalid escape character in byte string \`${this.input.substring(e+1,this.position)}\``);this.readChar()}else if(10===this.ch)this.readChar();else{if(13!==this.ch||10!==this._peekAtNextChar().charCodeAt(0))throw this._tokenError(`invalid byte string \`${this.input.substring(e+1,this.position)}\``);this.readChar(),this.readChar()}return this.input.substring(e+1,this.position)}_readNumberOrFloat(){const e=this.position;let t=!1;if("-"===String.fromCharCode(this.ch)&&this.readChar(),"0"===String.fromCharCode(this.ch)){if(this.readChar(),"x"===String.fromCharCode(this.ch)){if(this.readChar(),!"0123456789ABCDEF".includes(String.fromCharCode(this.ch).toUpperCase()))throw this._tokenError(`expected hex number to contain hex digits, got \`${this.input.substring(e,this.position)}\``);for(;"0123456789ABCDEF".includes(String.fromCharCode(this.ch).toUpperCase());)this.readChar();if("."===String.fromCharCode(this.ch)){if(t=!0,"."===this._peekAtNextChar())return this.input.substring(e,this.position);for(this.readChar();"0123456789ABCDEF".includes(String.fromCharCode(this.ch).toUpperCase());)this.readChar()}if(t&&"p"!==String.fromCharCode(this.ch))throw this._tokenError(`expected hex number with fraction to have an exponent, got \`${this.input.substring(e,this.position)}\``);if("p"===String.fromCharCode(this.ch)){if(this.readChar(),"+-".includes(String.fromCharCode(this.ch))&&this.readChar(),!this._isDigit(String.fromCharCode(this.ch)))throw this._tokenError(`expected hex number with exponent to have a digit in exponent, got \`${this.input.substring(e,this.position)}\``);for(;this._isDigit(String.fromCharCode(this.ch));)this.readChar()}}else if("b"===String.fromCharCode(this.ch)){if(this.readChar(),!"01".includes(String.fromCharCode(this.ch)))throw this._tokenError(`expected binary number to have binary digits, got \`${this.input.substring(e,this.position)}\``);for(;"01".includes(String.fromCharCode(this.ch));)this.readChar()}else if("."===String.fromCharCode(this.ch)){if("."===this._peekAtNextChar())return this.input.substring(e,this.position);if(this.readChar(),!this._isDigit(String.fromCharCode(this.ch)))throw this._tokenError(`expected number with fraction to have digits in fraction part, got \`${this.input.substring(e,this.position)}\``);for(;this._isDigit(String.fromCharCode(this.ch));)this.readChar();if("e"===String.fromCharCode(this.ch)){if(this.readChar(),"+-".includes(String.fromCharCode(this.ch))&&this.readChar(),!this._isDigit(String.fromCharCode(this.ch)))throw this._tokenError(`expected number with exponent to have digits in exponent, got \`${this.input.substring(e,this.position)}\``);for(;this._isDigit(String.fromCharCode(this.ch));)this.readChar()}}}else{for(;this._isDigit(String.fromCharCode(this.ch));)this.readChar();if("."===String.fromCharCode(this.ch)){if("."===this._peekAtNextChar())return this.input.substring(e,this.position);if(this.readChar(),!this._isDigit(String.fromCharCode(this.ch)))throw this._tokenError(`expected number with fraction to have digits in fraction part, got \`${this.input.substring(e,this.position)}\``);for(;this._isDigit(String.fromCharCode(this.ch));)this.readChar()}if("e"===String.fromCharCode(this.ch)){if(this.readChar(),"+-".includes(String.fromCharCode(this.ch))&&this.readChar(),!this._isDigit(String.fromCharCode(this.ch)))throw this._tokenError(`expected number with exponent to have digits in exponent, got \`${this.input.substring(e,this.position)}\``);for(;this._isDigit(String.fromCharCode(this.ch));)this.readChar()}}return this.input.substring(e,this.position)}_readWhitespace(){const e=this.position;for(;" \t\n\r".includes(String.fromCharCode(this.ch));)this.readChar();return this.input.substring(e,this.position)}_readComments(){const e=[];for(;;){const t=this._readWhitespace();if(";"!==String.fromCharCode(this.ch)){if(""!==t){const n=new Je(He.COMMENT,"",[],t);e.push(n)}break}const n=new Je(He.COMMENT,this._readComment(),[],t);e.push(n)}return e}_tokenError(e){const t=this.getLocation();return new gt(`CDDL token error - line ${t.line+1}: ${e}`)}}const kt=new Je(He.ILLEGAL,"");const $t=/^[!#$%&'*+-.^`|~\w]+$/,xt=/[\u000A\u000D\u0009\u0020]/u,Ct=/^[\u0009\u{0020}-\{u0073}\u{0080}-\u{00FF}]+$/u;function St(e,t,n){(t&&""!==t&&!e.has(t)&&Ct.test(n)||null===n)&&e.set(t.toLowerCase(),n)}function _t(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Tt={async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null};function Rt(e){Tt=e}var Et={exec:()=>null};function Lt(e,t=""){let n="string"==typeof e?e:e.source,r={replace:(e,t)=>{let s="string"==typeof t?t:t.source;return s=s.replace(Pt.caret,"$1"),n=n.replace(e,s),r},getRegex:()=>new RegExp(n,t)};return r}var At=((e="")=>{try{return!!new RegExp("(?<=1)(?<!1)"+e)}catch{return!1}})(),Pt={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>new RegExp(`^( {0,3}${e})((?:[\t ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ \t][^\\n]*)?(?:\\n|$))`),hrRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,"i"),blockquoteBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}>`)},Nt=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,It=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,Dt=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Ot=Lt(Dt).replace(/bull/g,It).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),jt=Lt(Dt).replace(/bull/g,It).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),zt=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,Mt=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,Ut=Lt(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Mt).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),qt=Lt(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,It).getRegex(),Wt="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",Ft=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Bt=Lt("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$))","i").replace("comment",Ft).replace("tag",Wt).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Ht=Lt(zt).replace("hr",Nt).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Wt).getRegex(),Gt={blockquote:Lt(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Ht).getRegex(),code:/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,def:Ut,fences:/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,hr:Nt,html:Bt,lheading:Ot,list:qt,newline:/^(?:[ \t]*(?:\n|$))+/,paragraph:Ht,table:Et,text:/^[^\n]+/},Vt=Lt("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Nt).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3}\t)[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Wt).getRegex(),Jt={...Gt,lheading:jt,table:Vt,paragraph:Lt(zt).replace("hr",Nt).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Vt).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Wt).getRegex()},Kt={...Gt,html:Lt("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:\"[^\"]*\"|'[^']*'|\\s[^'\"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",Ft).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:Et,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:Lt(zt).replace("hr",Nt).replace("heading"," *#{1,6} *[^\n]").replace("lheading",Ot).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},Zt=/^( {2,}|\\)\n(?!\s*$)/,Yt=/[\p{P}\p{S}]/u,Xt=/[\s\p{P}\p{S}]/u,Qt=/[^\s\p{P}\p{S}]/u,en=Lt(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Xt).getRegex(),tn=/(?!~)[\p{P}\p{S}]/u,nn=Lt(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",At?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),rn=/^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/,sn=Lt(rn,"u").replace(/punct/g,Yt).getRegex(),on=Lt(rn,"u").replace(/punct/g,tn).getRegex(),an="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",cn=Lt(an,"gu").replace(/notPunctSpace/g,Qt).replace(/punctSpace/g,Xt).replace(/punct/g,Yt).getRegex(),ln=Lt(an,"gu").replace(/notPunctSpace/g,/(?:[^\s\p{P}\p{S}]|~)/u).replace(/punctSpace/g,/(?!~)[\s\p{P}\p{S}]/u).replace(/punct/g,tn).getRegex(),un=Lt("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,Qt).replace(/punctSpace/g,Xt).replace(/punct/g,Yt).getRegex(),dn=Lt(/^~~?(?:((?!~)punct)|[^\s~])/,"u").replace(/punct/g,Yt).getRegex(),pn=Lt("^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)","gu").replace(/notPunctSpace/g,Qt).replace(/punctSpace/g,Xt).replace(/punct/g,Yt).getRegex(),hn=Lt(/\\(punct)/,"gu").replace(/punct/g,Yt).getRegex(),fn=Lt(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),mn=Lt(Ft).replace("(?:--\x3e|$)","--\x3e").getRegex(),gn=Lt("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",mn).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),bn=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/,yn=Lt(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label",bn).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),wn=Lt(/^!?\[(label)\]\[(ref)\]/).replace("label",bn).replace("ref",Mt).getRegex(),vn=Lt(/^!?\[(ref)\](?:\[\])?/).replace("ref",Mt).getRegex(),kn=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,$n={_backpedal:Et,anyPunctuation:hn,autolink:fn,blockSkip:nn,br:Zt,code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,del:Et,delLDelim:Et,delRDelim:Et,emStrongLDelim:sn,emStrongRDelimAst:cn,emStrongRDelimUnd:un,escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,link:yn,nolink:vn,punctuation:en,reflink:wn,reflinkSearch:Lt("reflink|nolink(?!\\()","g").replace("reflink",wn).replace("nolink",vn).getRegex(),tag:gn,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,url:Et},xn={...$n,link:Lt(/^!?\[(label)\]\((.*?)\)/).replace("label",bn).getRegex(),reflink:Lt(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",bn).getRegex()},Cn={...$n,emStrongRDelimAst:ln,emStrongLDelim:on,delLDelim:dn,delRDelim:pn,url:Lt(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",kn).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:Lt(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",kn).getRegex()},Sn={...Cn,br:Lt(Zt).replace("{2,}","*").getRegex(),text:Lt(Cn.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},_n={normal:Gt,gfm:Jt,pedantic:Kt},Tn={normal:$n,gfm:Cn,breaks:Sn,pedantic:xn},Rn={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},En=e=>Rn[e];function Ln(e,t){if(t){if(Pt.escapeTest.test(e))return e.replace(Pt.escapeReplace,En)}else if(Pt.escapeTestNoEncode.test(e))return e.replace(Pt.escapeReplaceNoEncode,En);return e}function An(e){try{e=encodeURI(e).replace(Pt.percentDecode,"%")}catch{return null}return e}function Pn(e,t){let n=e.replace(Pt.findPipe,((e,t,n)=>{let r=!1,s=t;for(;--s>=0&&"\\"===n[s];)r=!r;return r?"|":" |"})).split(Pt.splitPipe),r=0;if(n[0].trim()||n.shift(),n.length>0&&!n.at(-1)?.trim()&&n.pop(),t)if(n.length>t)n.splice(t);else for(;n.length<t;)n.push("");for(;r<n.length;r++)n[r]=n[r].trim().replace(Pt.slashPipe,"|");return n}function Nn(e,t,n){let r=e.length;if(0===r)return"";let s=0;for(;s<r;){if(e.charAt(r-s-1)!==t)break;s++}return e.slice(0,r-s)}function In(e){let t=e.split("\n"),n=t.length-1;for(;n>=0&&Pt.blankLine.test(t[n]);)n--;return t.length-n<=2?e:t.slice(0,n+1).join("\n")}function Dn(e,t=0){let n=t,r="";for(let t of e)if("\t"===t){let e=4-n%4;r+=" ".repeat(e),n+=e}else r+=t,n++;return r}function On(e,t,n,r,s){let i=t.href,o=t.title||null,a=e[1].replace(s.other.outputLinkReplace,"$1");r.state.inLink=!0;let c={type:"!"===e[0].charAt(0)?"image":"link",raw:n,href:i,title:o,text:a,tokens:r.inlineTokens(a)};return r.state.inLink=!1,c}var jn=class{options;rules;lexer;constructor(e){this.options=e||Tt}space(e){let t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(e){let t=this.rules.block.code.exec(e);if(t){let e=this.options.pedantic?t[0]:In(t[0]),n=e.replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:e,codeBlockStyle:"indented",text:n}}}fences(e){let t=this.rules.block.fences.exec(e);if(t){let e=t[0],n=function(e,t,n){let r=e.match(n.other.indentCodeCompensation);if(null===r)return t;let s=r[1];return t.split("\n").map((e=>{let t=e.match(n.other.beginningSpace);if(null===t)return e;let[r]=t;return r.length>=s.length?e.slice(s.length):e})).join("\n")}(e,t[3]||"",this.rules);return{type:"code",raw:e,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):t[2],text:n}}}heading(e){let t=this.rules.block.heading.exec(e);if(t){let e=t[2].trim();if(this.rules.other.endingHash.test(e)){let t=Nn(e,"#");(this.options.pedantic||!t||this.rules.other.endingSpaceChar.test(t))&&(e=t.trim())}return{type:"heading",raw:Nn(t[0],"\n"),depth:t[1].length,text:e,tokens:this.lexer.inline(e)}}}hr(e){let t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:Nn(t[0],"\n")}}blockquote(e){let t=this.rules.block.blockquote.exec(e);if(t){let e=Nn(t[0],"\n").split("\n"),n="",r="",s=[];for(;e.length>0;){let t,i=!1,o=[];for(t=0;t<e.length;t++)if(this.rules.other.blockquoteStart.test(e[t]))o.push(e[t]),i=!0;else{if(i)break;o.push(e[t])}e=e.slice(t);let a=o.join("\n"),c=a.replace(this.rules.other.blockquoteSetextReplace,"\n $1").replace(this.rules.other.blockquoteSetextReplace2,"");n=n?`${n}\n${a}`:a,r=r?`${r}\n${c}`:c;let l=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(c,s,!0),this.lexer.state.top=l,0===e.length)break;let u=s.at(-1);if("code"===u?.type)break;if("blockquote"===u?.type){let t=u,i=t.raw+"\n"+e.join("\n"),o=this.blockquote(i);s[s.length-1]=o,n=n.substring(0,n.length-t.raw.length)+o.raw,r=r.substring(0,r.length-t.text.length)+o.text;break}if("list"!==u?.type);else{let t=u,i=t.raw+"\n"+e.join("\n"),o=this.list(i);s[s.length-1]=o,n=n.substring(0,n.length-u.raw.length)+o.raw,r=r.substring(0,r.length-t.raw.length)+o.raw,e=i.substring(s.at(-1).raw.length).split("\n")}}return{type:"blockquote",raw:n,tokens:s,text:r}}}list(e){let t=this.rules.block.list.exec(e);if(t){let n=t[1].trim(),r=n.length>1,s={type:"list",raw:"",ordered:r,start:r?+n.slice(0,-1):"",loose:!1,items:[]};n=r?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=r?n:"[*+-]");let i=this.rules.other.listItemRegex(n),o=!1;for(;e;){let n=!1,r="",a="";if(!(t=i.exec(e))||this.rules.block.hr.test(e))break;r=t[0],e=e.substring(r.length);let c=Dn(t[2].split("\n",1)[0],t[1].length),l=e.split("\n",1)[0],u=!c.trim(),d=0;if(this.options.pedantic?(d=2,a=c.trimStart()):u?d=t[1].length+1:(d=c.search(this.rules.other.nonSpaceChar),d=d>4?1:d,a=c.slice(d),d+=t[1].length),u&&this.rules.other.blankLine.test(l)&&(r+=l+"\n",e=e.substring(l.length+1),n=!0),!n){let t=this.rules.other.nextBulletRegex(d),n=this.rules.other.hrRegex(d),s=this.rules.other.fencesBeginRegex(d),i=this.rules.other.headingBeginRegex(d),o=this.rules.other.htmlBeginRegex(d),p=this.rules.other.blockquoteBeginRegex(d);for(;e;){let h,f=e.split("\n",1)[0];if(l=f,this.options.pedantic?(l=l.replace(this.rules.other.listReplaceNesting," "),h=l):h=l.replace(this.rules.other.tabCharGlobal," "),s.test(l)||i.test(l)||o.test(l)||p.test(l)||t.test(l)||n.test(l))break;if(h.search(this.rules.other.nonSpaceChar)>=d||!l.trim())a+="\n"+h.slice(d);else{if(u||c.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||s.test(c)||i.test(c)||n.test(c))break;a+="\n"+l}u=!l.trim(),r+=f+"\n",e=e.substring(f.length+1),c=h.slice(d)}}s.loose||(o?s.loose=!0:this.rules.other.doubleBlankLine.test(r)&&(o=!0)),s.items.push({type:"list_item",raw:r,task:!!this.options.gfm&&this.rules.other.listIsTask.test(a),loose:!1,text:a,tokens:[]}),s.raw+=r}let a=s.items.at(-1);if(!a)return;a.raw=a.raw.trimEnd(),a.text=a.text.trimEnd(),s.raw=s.raw.trimEnd();for(let e of s.items){this.lexer.state.top=!1,e.tokens=this.lexer.blockTokens(e.text,[]);let t=e.tokens[0];if(!e.task||"text"!==t?.type&&"paragraph"!==t?.type)e.task&&(e.task=!1);else{e.text=e.text.replace(this.rules.other.listReplaceTask,""),t.raw=t.raw.replace(this.rules.other.listReplaceTask,""),t.text=t.text.replace(this.rules.other.listReplaceTask,"");for(let e=this.lexer.inlineQueue.length-1;e>=0;e--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[e].src)){this.lexer.inlineQueue[e].src=this.lexer.inlineQueue[e].src.replace(this.rules.other.listReplaceTask,"");break}let n=this.rules.other.listTaskCheckbox.exec(e.raw);if(n){let t={type:"checkbox",raw:n[0]+" ",checked:"[ ]"!==n[0]};e.checked=t.checked,s.loose?e.tokens[0]&&["paragraph","text"].includes(e.tokens[0].type)&&"tokens"in e.tokens[0]&&e.tokens[0].tokens?(e.tokens[0].raw=t.raw+e.tokens[0].raw,e.tokens[0].text=t.raw+e.tokens[0].text,e.tokens[0].tokens.unshift(t)):e.tokens.unshift({type:"paragraph",raw:t.raw,text:t.raw,tokens:[t]}):e.tokens.unshift(t)}}if(!s.loose){let t=e.tokens.filter((e=>"space"===e.type)),n=t.length>0&&t.some((e=>this.rules.other.anyLine.test(e.raw)));s.loose=n}}if(s.loose)for(let e of s.items){e.loose=!0;for(let t of e.tokens)"text"===t.type&&(t.type="paragraph")}return s}}html(e){let t=this.rules.block.html.exec(e);if(t){let e=In(t[0]);return{type:"html",block:!0,raw:e,pre:"pre"===t[1]||"script"===t[1]||"style"===t[1],text:e}}}def(e){let t=this.rules.block.def.exec(e);if(t){let e=t[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),n=t[2]?t[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",r=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):t[3];return{type:"def",tag:e,raw:Nn(t[0],"\n"),href:n,title:r}}}table(e){let t=this.rules.block.table.exec(e);if(!t||!this.rules.other.tableDelimiter.test(t[2]))return;let n=Pn(t[1]),r=t[2].replace(this.rules.other.tableAlignChars,"").split("|"),s=t[3]?.trim()?t[3].replace(this.rules.other.tableRowBlankLine,"").split("\n"):[],i={type:"table",raw:Nn(t[0],"\n"),header:[],align:[],rows:[]};if(n.length===r.length){for(let e of r)this.rules.other.tableAlignRight.test(e)?i.align.push("right"):this.rules.other.tableAlignCenter.test(e)?i.align.push("center"):this.rules.other.tableAlignLeft.test(e)?i.align.push("left"):i.align.push(null);for(let e=0;e<n.length;e++)i.header.push({text:n[e],tokens:this.lexer.inline(n[e]),header:!0,align:i.align[e]});for(let e of s)i.rows.push(Pn(e,i.header.length).map(((e,t)=>({text:e,tokens:this.lexer.inline(e),header:!1,align:i.align[t]}))));return i}}lheading(e){let t=this.rules.block.lheading.exec(e);if(t){let e=t[1].trim();return{type:"heading",raw:Nn(t[0],"\n"),depth:"="===t[2].charAt(0)?1:2,text:e,tokens:this.lexer.inline(e)}}}paragraph(e){let t=this.rules.block.paragraph.exec(e);if(t){let e="\n"===t[1].charAt(t[1].length-1)?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:e,tokens:this.lexer.inline(e)}}}text(e){let t=this.rules.block.text.exec(e);if(t)return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){let t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:t[1]}}tag(e){let t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&this.rules.other.startATag.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){let t=this.rules.inline.link.exec(e);if(t){let e=t[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(e)){if(!this.rules.other.endAngleBracket.test(e))return;let t=Nn(e.slice(0,-1),"\\");if((e.length-t.length)%2==0)return}else{let e=function(e,t){if(-1===e.indexOf(t[1]))return-1;let n=0;for(let r=0;r<e.length;r++)if("\\"===e[r])r++;else if(e[r]===t[0])n++;else if(e[r]===t[1]&&(n--,n<0))return r;return n>0?-2:-1}(t[2],"()");if(-2===e)return;if(e>-1){let n=(0===t[0].indexOf("!")?5:4)+t[1].length+e;t[2]=t[2].substring(0,e),t[0]=t[0].substring(0,n).trim(),t[3]=""}}let n=t[2],r="";if(this.options.pedantic){let e=this.rules.other.pedanticHrefTitle.exec(n);e&&(n=e[1],r=e[3])}else r=t[3]?t[3].slice(1,-1):"";return n=n.trim(),this.rules.other.startAngleBracket.test(n)&&(n=this.options.pedantic&&!this.rules.other.endAngleBracket.test(e)?n.slice(1):n.slice(1,-1)),On(t,{href:n&&n.replace(this.rules.inline.anyPunctuation,"$1"),title:r&&r.replace(this.rules.inline.anyPunctuation,"$1")},t[0],this.lexer,this.rules)}}reflink(e,t){let n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){let e=t[(n[2]||n[1]).replace(this.rules.other.multipleSpaceGlobal," ").toLowerCase()];if(!e){let e=n[0].charAt(0);return{type:"text",raw:e,text:e}}return On(n,e,n[0],this.lexer,this.rules)}}emStrong(e,t,n=""){let r=this.rules.inline.emStrongLDelim.exec(e);if(r&&(r[1]||r[2]||r[3]||r[4])&&(!r[4]||!n.match(this.rules.other.unicodeAlphaNumeric))&&(!r[1]&&!r[3]||!n||this.rules.inline.punctuation.exec(n))){let n,s,i=[...r[0]].length-1,o=i,a=0,c="*"===r[0][0]?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(c.lastIndex=0,t=t.slice(-1*e.length+i);null!==(r=c.exec(t));){if(n=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!n)continue;if(s=[...n].length,r[3]||r[4]){o+=s;continue}if((r[5]||r[6])&&i%3&&!((i+s)%3)){a+=s;continue}if(o-=s,o>0)continue;s=Math.min(s,s+o+a);let t=[...r[0]][0].length,c=e.slice(0,i+r.index+t+s);if(Math.min(i,s)%2){let e=c.slice(1,-1);return{type:"em",raw:c,text:e,tokens:this.lexer.inlineTokens(e)}}let l=c.slice(2,-2);return{type:"strong",raw:c,text:l,tokens:this.lexer.inlineTokens(l)}}}}codespan(e){let t=this.rules.inline.code.exec(e);if(t){let e=t[2].replace(this.rules.other.newLineCharGlobal," "),n=this.rules.other.nonSpaceChar.test(e),r=this.rules.other.startingSpaceChar.test(e)&&this.rules.other.endingSpaceChar.test(e);return n&&r&&(e=e.substring(1,e.length-1)),{type:"codespan",raw:t[0],text:e}}}br(e){let t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e,t,n=""){let r=this.rules.inline.delLDelim.exec(e);if(r&&(!r[1]||!n||this.rules.inline.punctuation.exec(n))){let n,s,i=[...r[0]].length-1,o=i,a=this.rules.inline.delRDelim;for(a.lastIndex=0,t=t.slice(-1*e.length+i);null!==(r=a.exec(t));){if(n=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!n||(s=[...n].length,s!==i))continue;if(r[3]||r[4]){o+=s;continue}if(o-=s,o>0)continue;s=Math.min(s,s+o);let t=[...r[0]][0].length,a=e.slice(0,i+r.index+t+s),c=a.slice(i,-i);return{type:"del",raw:a,text:c,tokens:this.lexer.inlineTokens(c)}}}}autolink(e){let t=this.rules.inline.autolink.exec(e);if(t){let e,n;return"@"===t[2]?(e=t[1],n="mailto:"+e):(e=t[1],n=e),{type:"link",raw:t[0],text:e,href:n,tokens:[{type:"text",raw:e,text:e}]}}}url(e){let t;if(t=this.rules.inline.url.exec(e)){let e,n;if("@"===t[2])e=t[0],n="mailto:"+e;else{let r;do{r=t[0],t[0]=this.rules.inline._backpedal.exec(t[0])?.[0]??""}while(r!==t[0]);e=t[0],n="www."===t[1]?"http://"+t[0]:t[0]}return{type:"link",raw:t[0],text:e,href:n,tokens:[{type:"text",raw:e,text:e}]}}}inlineText(e){let t=this.rules.inline.text.exec(e);if(t){let e=this.lexer.state.inRawBlock;return{type:"text",raw:t[0],text:t[0],escaped:e}}}},zn=class e{tokens;options;state;inlineQueue;tokenizer;constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||Tt,this.options.tokenizer=this.options.tokenizer||new jn,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let t={other:Pt,block:_n.normal,inline:Tn.normal};this.options.pedantic?(t.block=_n.pedantic,t.inline=Tn.pedantic):this.options.gfm&&(t.block=_n.gfm,this.options.breaks?t.inline=Tn.breaks:t.inline=Tn.gfm),this.tokenizer.rules=t}static get rules(){return{block:_n,inline:Tn}}static lex(t,n){return new e(n).lex(t)}static lexInline(t,n){return new e(n).inlineTokens(t)}lex(e){e=e.replace(Pt.carriageReturn,"\n"),this.blockTokens(e,this.tokens);for(let e=0;e<this.inlineQueue.length;e++){let t=this.inlineQueue[e];this.inlineTokens(t.src,t.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,t=[],n=!1){this.tokenizer.lexer=this,this.options.pedantic&&(e=e.replace(Pt.tabCharGlobal," ").replace(Pt.spaceLine,""));let r=1/0;for(;e;){if(!(e.length<r)){this.infiniteLoopError(e.charCodeAt(0));break}let s;if(r=e.length,this.options.extensions?.block?.some((n=>!!(s=n.call({lexer:this},e,t))&&(e=e.substring(s.raw.length),t.push(s),!0))))continue;if(s=this.tokenizer.space(e)){e=e.substring(s.raw.length);let n=t.at(-1);1===s.raw.length&&void 0!==n?n.raw+="\n":t.push(s);continue}if(s=this.tokenizer.code(e)){e=e.substring(s.raw.length);let n=t.at(-1);"paragraph"===n?.type||"text"===n?.type?(n.raw+=(n.raw.endsWith("\n")?"":"\n")+s.raw,n.text+="\n"+s.text,this.inlineQueue.at(-1).src=n.text):t.push(s);continue}if(s=this.tokenizer.fences(e)){e=e.substring(s.raw.length),t.push(s);continue}if(s=this.tokenizer.heading(e)){e=e.substring(s.raw.length),t.push(s);continue}if(s=this.tokenizer.hr(e)){e=e.substring(s.raw.length),t.push(s);continue}if(s=this.tokenizer.blockquote(e)){e=e.substring(s.raw.length),t.push(s);continue}if(s=this.tokenizer.list(e)){e=e.substring(s.raw.length),t.push(s);continue}if(s=this.tokenizer.html(e)){e=e.substring(s.raw.length),t.push(s);continue}if(s=this.tokenizer.def(e)){e=e.substring(s.raw.length);let n=t.at(-1);"paragraph"===n?.type||"text"===n?.type?(n.raw+=(n.raw.endsWith("\n")?"":"\n")+s.raw,n.text+="\n"+s.raw,this.inlineQueue.at(-1).src=n.text):this.tokens.links[s.tag]||(this.tokens.links[s.tag]={href:s.href,title:s.title},t.push(s));continue}if(s=this.tokenizer.table(e)){e=e.substring(s.raw.length),t.push(s);continue}if(s=this.tokenizer.lheading(e)){e=e.substring(s.raw.length),t.push(s);continue}let i=e;if(this.options.extensions?.startBlock){let t,n=1/0,r=e.slice(1);this.options.extensions.startBlock.forEach((e=>{t=e.call({lexer:this},r),"number"==typeof t&&t>=0&&(n=Math.min(n,t))})),n<1/0&&n>=0&&(i=e.substring(0,n+1))}if(this.state.top&&(s=this.tokenizer.paragraph(i))){let r=t.at(-1);n&&"paragraph"===r?.type?(r.raw+=(r.raw.endsWith("\n")?"":"\n")+s.raw,r.text+="\n"+s.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=r.text):t.push(s),n=i.length!==e.length,e=e.substring(s.raw.length)}else if(s=this.tokenizer.text(e)){e=e.substring(s.raw.length);let n=t.at(-1);"text"===n?.type?(n.raw+=(n.raw.endsWith("\n")?"":"\n")+s.raw,n.text+="\n"+s.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=n.text):t.push(s)}else if(e){this.infiniteLoopError(e.charCodeAt(0));break}}return this.state.top=!0,t}inline(e,t=[]){return this.inlineQueue.push({src:e,tokens:t}),t}inlineTokens(e,t=[]){this.tokenizer.lexer=this;let n,r=e,s=null;if(this.tokens.links){let e=Object.keys(this.tokens.links);if(e.length>0)for(;null!==(s=this.tokenizer.rules.inline.reflinkSearch.exec(r));)e.includes(s[0].slice(s[0].lastIndexOf("[")+1,-1))&&(r=r.slice(0,s.index)+"["+"a".repeat(s[0].length-2)+"]"+r.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!==(s=this.tokenizer.rules.inline.anyPunctuation.exec(r));)r=r.slice(0,s.index)+"++"+r.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;null!==(s=this.tokenizer.rules.inline.blockSkip.exec(r));)n=s[2]?s[2].length:0,r=r.slice(0,s.index+n)+"["+"a".repeat(s[0].length-n-2)+"]"+r.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);r=this.options.hooks?.emStrongMask?.call({lexer:this},r)??r;let i=!1,o="",a=1/0;for(;e;){if(!(e.length<a)){this.infiniteLoopError(e.charCodeAt(0));break}let n;if(a=e.length,i||(o=""),i=!1,this.options.extensions?.inline?.some((r=>!!(n=r.call({lexer:this},e,t))&&(e=e.substring(n.raw.length),t.push(n),!0))))continue;if(n=this.tokenizer.escape(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.tag(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.link(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(n.raw.length);let r=t.at(-1);"text"===n.type&&"text"===r?.type?(r.raw+=n.raw,r.text+=n.text):t.push(n);continue}if(n=this.tokenizer.emStrong(e,r,o)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.codespan(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.br(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.del(e,r,o)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.autolink(e)){e=e.substring(n.raw.length),t.push(n);continue}if(!this.state.inLink&&(n=this.tokenizer.url(e))){e=e.substring(n.raw.length),t.push(n);continue}let s=e;if(this.options.extensions?.startInline){let t,n=1/0,r=e.slice(1);this.options.extensions.startInline.forEach((e=>{t=e.call({lexer:this},r),"number"==typeof t&&t>=0&&(n=Math.min(n,t))})),n<1/0&&n>=0&&(s=e.substring(0,n+1))}if(n=this.tokenizer.inlineText(s)){e=e.substring(n.raw.length),"_"!==n.raw.slice(-1)&&(o=n.raw.slice(-1)),i=!0;let r=t.at(-1);"text"===r?.type?(r.raw+=n.raw,r.text+=n.text):t.push(n)}else if(e){this.infiniteLoopError(e.charCodeAt(0));break}}return t}infiniteLoopError(e){let t="Infinite loop on byte: "+e;if(!this.options.silent)throw new Error(t);console.error(t)}},Mn=class{options;parser;constructor(e){this.options=e||Tt}space(e){return""}code({text:e,lang:t,escaped:n}){let r=(t||"").match(Pt.notSpaceStart)?.[0],s=e.replace(Pt.endingNewline,"")+"\n";return r?'<pre><code class="language-'+Ln(r)+'">'+(n?s:Ln(s,!0))+"</code></pre>\n":"<pre><code>"+(n?s:Ln(s,!0))+"</code></pre>\n"}blockquote({tokens:e}){return`<blockquote>\n${this.parser.parse(e)}</blockquote>\n`}html({text:e}){return e}def(e){return""}heading({tokens:e,depth:t}){return`<h${t}>${this.parser.parseInline(e)}</h${t}>\n`}hr(e){return"<hr>\n"}list(e){let t=e.ordered,n=e.start,r="";for(let t=0;t<e.items.length;t++){let n=e.items[t];r+=this.listitem(n)}let s=t?"ol":"ul";return"<"+s+(t&&1!==n?' start="'+n+'"':"")+">\n"+r+"</"+s+">\n"}listitem(e){return`<li>${this.parser.parse(e.tokens)}</li>\n`}checkbox({checked:e}){return"<input "+(e?'checked="" ':"")+'disabled="" type="checkbox"> '}paragraph({tokens:e}){return`<p>${this.parser.parseInline(e)}</p>\n`}table(e){let t="",n="";for(let t=0;t<e.header.length;t++)n+=this.tablecell(e.header[t]);t+=this.tablerow({text:n});let r="";for(let t=0;t<e.rows.length;t++){let s=e.rows[t];n="";for(let e=0;e<s.length;e++)n+=this.tablecell(s[e]);r+=this.tablerow({text:n})}return r&&(r=`<tbody>${r}</tbody>`),"<table>\n<thead>\n"+t+"</thead>\n"+r+"</table>\n"}tablerow({text:e}){return`<tr>\n${e}</tr>\n`}tablecell(e){let t=this.parser.parseInline(e.tokens),n=e.header?"th":"td";return(e.align?`<${n} align="${e.align}">`:`<${n}>`)+t+`</${n}>\n`}strong({tokens:e}){return`<strong>${this.parser.parseInline(e)}</strong>`}em({tokens:e}){return`<em>${this.parser.parseInline(e)}</em>`}codespan({text:e}){return`<code>${Ln(e,!0)}</code>`}br(e){return"<br>"}del({tokens:e}){return`<del>${this.parser.parseInline(e)}</del>`}link({href:e,title:t,tokens:n}){let r=this.parser.parseInline(n),s=An(e);if(null===s)return r;let i='<a href="'+(e=s)+'"';return t&&(i+=' title="'+Ln(t)+'"'),i+=">"+r+"</a>",i}image({href:e,title:t,text:n,tokens:r}){r&&(n=this.parser.parseInline(r,this.parser.textRenderer));let s=An(e);if(null===s)return Ln(n);let i=`<img src="${e=s}" alt="${Ln(n)}"`;return t&&(i+=` title="${Ln(t)}"`),i+=">",i}text(e){return"tokens"in e&&e.tokens?this.parser.parseInline(e.tokens):"escaped"in e&&e.escaped?e.text:Ln(e.text)}},Un=class{strong({text:e}){return e}em({text:e}){return e}codespan({text:e}){return e}del({text:e}){return e}html({text:e}){return e}text({text:e}){return e}link({text:e}){return""+e}image({text:e}){return""+e}br(){return""}checkbox({raw:e}){return e}},qn=class e{options;renderer;textRenderer;constructor(e){this.options=e||Tt,this.options.renderer=this.options.renderer||new Mn,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Un}static parse(t,n){return new e(n).parse(t)}static parseInline(t,n){return new e(n).parseInline(t)}parse(e){this.renderer.parser=this;let t="";for(let n=0;n<e.length;n++){let r=e[n];if(this.options.extensions?.renderers?.[r.type]){let e=r,n=this.options.extensions.renderers[e.type].call({parser:this},e);if(!1!==n||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(e.type)){t+=n||"";continue}}let s=r;switch(s.type){case"space":t+=this.renderer.space(s);break;case"hr":t+=this.renderer.hr(s);break;case"heading":t+=this.renderer.heading(s);break;case"code":t+=this.renderer.code(s);break;case"table":t+=this.renderer.table(s);break;case"blockquote":t+=this.renderer.blockquote(s);break;case"list":t+=this.renderer.list(s);break;case"checkbox":t+=this.renderer.checkbox(s);break;case"html":t+=this.renderer.html(s);break;case"def":t+=this.renderer.def(s);break;case"paragraph":t+=this.renderer.paragraph(s);break;case"text":t+=this.renderer.text(s);break;default:{let e='Token with "'+s.type+'" type was not found.';if(this.options.silent)return console.error(e),"";throw new Error(e)}}}return t}parseInline(e,t=this.renderer){this.renderer.parser=this;let n="";for(let r=0;r<e.length;r++){let s=e[r];if(this.options.extensions?.renderers?.[s.type]){let e=this.options.extensions.renderers[s.type].call({parser:this},s);if(!1!==e||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(s.type)){n+=e||"";continue}}let i=s;switch(i.type){case"escape":case"text":n+=t.text(i);break;case"html":n+=t.html(i);break;case"link":n+=t.link(i);break;case"image":n+=t.image(i);break;case"checkbox":n+=t.checkbox(i);break;case"strong":n+=t.strong(i);break;case"em":n+=t.em(i);break;case"codespan":n+=t.codespan(i);break;case"br":n+=t.br(i);break;case"del":n+=t.del(i);break;default:{let e='Token with "'+i.type+'" type was not found.';if(this.options.silent)return console.error(e),"";throw new Error(e)}}}return n}},Wn=class{options;block;constructor(e){this.options=e||Tt}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens","emStrongMask"]);static passThroughHooksRespectAsync=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}emStrongMask(e){return e}provideLexer(e=this.block){return e?zn.lex:zn.lexInline}provideParser(e=this.block){return e?qn.parse:qn.parseInline}},Fn=new class{defaults={async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null};options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=qn;Renderer=Mn;TextRenderer=Un;Lexer=zn;Tokenizer=jn;Hooks=Wn;constructor(...e){this.use(...e)}walkTokens(e,t){let n=[];for(let r of e)switch(n=n.concat(t.call(this,r)),r.type){case"table":{let e=r;for(let r of e.header)n=n.concat(this.walkTokens(r.tokens,t));for(let r of e.rows)for(let e of r)n=n.concat(this.walkTokens(e.tokens,t));break}case"list":{let e=r;n=n.concat(this.walkTokens(e.items,t));break}default:{let e=r;this.defaults.extensions?.childTokens?.[e.type]?this.defaults.extensions.childTokens[e.type].forEach((r=>{let s=e[r].flat(1/0);n=n.concat(this.walkTokens(s,t))})):e.tokens&&(n=n.concat(this.walkTokens(e.tokens,t)))}}return n}use(...e){let t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach((e=>{let n={...e};if(n.async=this.defaults.async||n.async||!1,e.extensions&&(e.extensions.forEach((e=>{if(!e.name)throw new Error("extension name required");if("renderer"in e){let n=t.renderers[e.name];t.renderers[e.name]=n?function(...t){let r=e.renderer.apply(this,t);return!1===r&&(r=n.apply(this,t)),r}:e.renderer}if("tokenizer"in e){if(!e.level||"block"!==e.level&&"inline"!==e.level)throw new Error("extension level must be 'block' or 'inline'");let n=t[e.level];n?n.unshift(e.tokenizer):t[e.level]=[e.tokenizer],e.start&&("block"===e.level?t.startBlock?t.startBlock.push(e.start):t.startBlock=[e.start]:"inline"===e.level&&(t.startInline?t.startInline.push(e.start):t.startInline=[e.start]))}"childTokens"in e&&e.childTokens&&(t.childTokens[e.name]=e.childTokens)})),n.extensions=t),e.renderer){let t=this.defaults.renderer||new Mn(this.defaults);for(let n in e.renderer){if(!(n in t))throw new Error(`renderer '${n}' does not exist`);if(["options","parser"].includes(n))continue;let r=n,s=e.renderer[r],i=t[r];t[r]=(...e)=>{let n=s.apply(t,e);return!1===n&&(n=i.apply(t,e)),n||""}}n.renderer=t}if(e.tokenizer){let t=this.defaults.tokenizer||new jn(this.defaults);for(let n in e.tokenizer){if(!(n in t))throw new Error(`tokenizer '${n}' does not exist`);if(["options","rules","lexer"].includes(n))continue;let r=n,s=e.tokenizer[r],i=t[r];t[r]=(...e)=>{let n=s.apply(t,e);return!1===n&&(n=i.apply(t,e)),n}}n.tokenizer=t}if(e.hooks){let t=this.defaults.hooks||new Wn;for(let n in e.hooks){if(!(n in t))throw new Error(`hook '${n}' does not exist`);if(["options","block"].includes(n))continue;let r=n,s=e.hooks[r],i=t[r];Wn.passThroughHooks.has(n)?t[r]=e=>{if(this.defaults.async&&Wn.passThroughHooksRespectAsync.has(n))return(async()=>{let n=await s.call(t,e);return i.call(t,n)})();let r=s.call(t,e);return i.call(t,r)}:t[r]=(...e)=>{if(this.defaults.async)return(async()=>{let n=await s.apply(t,e);return!1===n&&(n=await i.apply(t,e)),n})();let n=s.apply(t,e);return!1===n&&(n=i.apply(t,e)),n}}n.hooks=t}if(e.walkTokens){let t=this.defaults.walkTokens,r=e.walkTokens;n.walkTokens=function(e){let n=[];return n.push(r.call(this,e)),t&&(n=n.concat(t.call(this,e))),n}}this.defaults={...this.defaults,...n}})),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return zn.lex(e,t??this.defaults)}parser(e,t){return qn.parse(e,t??this.defaults)}parseMarkdown(e){return(t,n)=>{let r={...n},s={...this.defaults,...r},i=this.onError(!!s.silent,!!s.async);if(!0===this.defaults.async&&!1===r.async)return i(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof t>"u"||null===t)return i(new Error("marked(): input parameter is undefined or null"));if("string"!=typeof t)return i(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(t)+", string expected"));if(s.hooks&&(s.hooks.options=s,s.hooks.block=e),s.async)return(async()=>{let n=s.hooks?await s.hooks.preprocess(t):t,r=await(s.hooks?await s.hooks.provideLexer(e):e?zn.lex:zn.lexInline)(n,s),i=s.hooks?await s.hooks.processAllTokens(r):r;s.walkTokens&&await Promise.all(this.walkTokens(i,s.walkTokens));let o=await(s.hooks?await s.hooks.provideParser(e):e?qn.parse:qn.parseInline)(i,s);return s.hooks?await s.hooks.postprocess(o):o})().catch(i);try{s.hooks&&(t=s.hooks.preprocess(t));let n=(s.hooks?s.hooks.provideLexer(e):e?zn.lex:zn.lexInline)(t,s);s.hooks&&(n=s.hooks.processAllTokens(n)),s.walkTokens&&this.walkTokens(n,s.walkTokens);let r=(s.hooks?s.hooks.provideParser(e):e?qn.parse:qn.parseInline)(n,s);return s.hooks&&(r=s.hooks.postprocess(r)),r}catch(e){return i(e)}}}onError(e,t){return n=>{if(n.message+="\nPlease report this to https://github.com/markedjs/marked.",e){let e="<p>An error occurred:</p><pre>"+Ln(n.message+"",!0)+"</pre>";return t?Promise.resolve(e):e}if(t)return Promise.reject(n);throw n}}};function Bn(e,t){return Fn.parse(e,t)}function Hn(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}Bn.options=Bn.setOptions=function(e){return Fn.setOptions(e),Bn.defaults=Fn.defaults,Rt(Bn.defaults),Bn},Bn.getDefaults=_t,Bn.defaults=Tt,Bn.use=function(...e){return Fn.use(...e),Bn.defaults=Fn.defaults,Rt(Bn.defaults),Bn},Bn.walkTokens=function(e,t){return Fn.walkTokens(e,t)},Bn.parseInline=Fn.parseInline,Bn.Parser=qn,Bn.parser=qn.parse,Bn.Renderer=Mn,Bn.TextRenderer=Un,Bn.Lexer=zn,Bn.lexer=zn.lex,Bn.Tokenizer=jn,Bn.Hooks=Wn,Bn.parse=Bn,Bn.options,Bn.setOptions,Bn.use,Bn.walkTokens,Bn.parseInline,qn.parse,zn.lex;var Gn,Vn={exports:{}};var Jn,Kn=(Gn||(Gn=1,Jn=Vn,function(e,t){Jn.exports=t()}(0,(function(){var e=[],t=[],n={},r={},s={};function i(e){return"string"==typeof e?new RegExp("^"+e+"$","i"):e}function o(e,t){return e===t?t:e===e.toLowerCase()?t.toLowerCase():e===e.toUpperCase()?t.toUpperCase():e[0]===e[0].toUpperCase()?t.charAt(0).toUpperCase()+t.substr(1).toLowerCase():t.toLowerCase()}function a(e,t){return e.replace(t[0],(function(n,r){var s,i,a=(s=t[1],i=arguments,s.replace(/\$(\d{1,2})/g,(function(e,t){return i[t]||""})));return o(""===n?e[r-1]:n,a)}))}function c(e,t,r){if(!e.length||n.hasOwnProperty(e))return t;for(var s=r.length;s--;){var i=r[s];if(i[0].test(t))return a(t,i)}return t}function l(e,t,n){return function(r){var s=r.toLowerCase();return t.hasOwnProperty(s)?o(r,s):e.hasOwnProperty(s)?o(r,e[s]):c(s,r,n)}}function u(e,t,n,r){return function(r){var s=r.toLowerCase();return!!t.hasOwnProperty(s)||!e.hasOwnProperty(s)&&c(s,s,n)===s}}function d(e,t,n){return(n?t+" ":"")+(1===t?d.singular(e):d.plural(e))}return d.plural=l(s,r,e),d.isPlural=u(s,r,e),d.singular=l(r,s,t),d.isSingular=u(r,s,t),d.addPluralRule=function(t,n){e.push([i(t),n])},d.addSingularRule=function(e,n){t.push([i(e),n])},d.addUncountableRule=function(e){"string"!=typeof e?(d.addPluralRule(e,"$0"),d.addSingularRule(e,"$0")):n[e.toLowerCase()]=!0},d.addIrregularRule=function(e,t){t=t.toLowerCase(),e=e.toLowerCase(),s[e]=t,r[t]=e},[["I","we"],["me","us"],["he","they"],["she","they"],["them","them"],["myself","ourselves"],["yourself","yourselves"],["itself","themselves"],["herself","themselves"],["himself","themselves"],["themself","themselves"],["is","are"],["was","were"],["has","have"],["this","these"],["that","those"],["echo","echoes"],["dingo","dingoes"],["volcano","volcanoes"],["tornado","tornadoes"],["torpedo","torpedoes"],["genus","genera"],["viscus","viscera"],["stigma","stigmata"],["stoma","stomata"],["dogma","dogmata"],["lemma","lemmata"],["schema","schemata"],["anathema","anathemata"],["ox","oxen"],["axe","axes"],["die","dice"],["yes","yeses"],["foot","feet"],["eave","eaves"],["goose","geese"],["tooth","teeth"],["quiz","quizzes"],["human","humans"],["proof","proofs"],["carve","carves"],["valve","valves"],["looey","looies"],["thief","thieves"],["groove","grooves"],["pickaxe","pickaxes"],["passerby","passersby"]].forEach((function(e){return d.addIrregularRule(e[0],e[1])})),[[/s?$/i,"s"],[/[^\u0000-\u007F]$/i,"$0"],[/([^aeiou]ese)$/i,"$1"],[/(ax|test)is$/i,"$1es"],[/(alias|[^aou]us|t[lm]as|gas|ris)$/i,"$1es"],[/(e[mn]u)s?$/i,"$1s"],[/([^l]ias|[aeiou]las|[ejzr]as|[iu]am)$/i,"$1"],[/(alumn|syllab|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i,"$1i"],[/(alumn|alg|vertebr)(?:a|ae)$/i,"$1ae"],[/(seraph|cherub)(?:im)?$/i,"$1im"],[/(her|at|gr)o$/i,"$1oes"],[/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|automat|quor)(?:a|um)$/i,"$1a"],[/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)(?:a|on)$/i,"$1a"],[/sis$/i,"ses"],[/(?:(kni|wi|li)fe|(ar|l|ea|eo|oa|hoo)f)$/i,"$1$2ves"],[/([^aeiouy]|qu)y$/i,"$1ies"],[/([^ch][ieo][ln])ey$/i,"$1ies"],[/(x|ch|ss|sh|zz)$/i,"$1es"],[/(matr|cod|mur|sil|vert|ind|append)(?:ix|ex)$/i,"$1ices"],[/\b((?:tit)?m|l)(?:ice|ouse)$/i,"$1ice"],[/(pe)(?:rson|ople)$/i,"$1ople"],[/(child)(?:ren)?$/i,"$1ren"],[/eaux$/i,"$0"],[/m[ae]n$/i,"men"],["thou","you"]].forEach((function(e){return d.addPluralRule(e[0],e[1])})),[[/s$/i,""],[/(ss)$/i,"$1"],[/(wi|kni|(?:after|half|high|low|mid|non|night|[^\w]|^)li)ves$/i,"$1fe"],[/(ar|(?:wo|[ae])l|[eo][ao])ves$/i,"$1f"],[/ies$/i,"y"],[/\b([pl]|zomb|(?:neck|cross)?t|coll|faer|food|gen|goon|group|lass|talk|goal|cut)ies$/i,"$1ie"],[/\b(mon|smil)ies$/i,"$1ey"],[/\b((?:tit)?m|l)ice$/i,"$1ouse"],[/(seraph|cherub)im$/i,"$1"],[/(x|ch|ss|sh|zz|tto|go|cho|alias|[^aou]us|t[lm]as|gas|(?:her|at|gr)o|[aeiou]ris)(?:es)?$/i,"$1"],[/(analy|diagno|parenthe|progno|synop|the|empha|cri|ne)(?:sis|ses)$/i,"$1sis"],[/(movie|twelve|abuse|e[mn]u)s$/i,"$1"],[/(test)(?:is|es)$/i,"$1is"],[/(alumn|syllab|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i,"$1us"],[/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|quor)a$/i,"$1um"],[/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)a$/i,"$1on"],[/(alumn|alg|vertebr)ae$/i,"$1a"],[/(cod|mur|sil|vert|ind)ices$/i,"$1ex"],[/(matr|append)ices$/i,"$1ix"],[/(pe)(rson|ople)$/i,"$1rson"],[/(child)ren$/i,"$1"],[/(eau)x?$/i,"$1"],[/men$/i,"man"]].forEach((function(e){return d.addSingularRule(e[0],e[1])})),["adulthood","advice","agenda","aid","aircraft","alcohol","ammo","analytics","anime","athletics","audio","bison","blood","bream","buffalo","butter","carp","cash","chassis","chess","clothing","cod","commerce","cooperation","corps","debris","diabetes","digestion","elk","energy","equipment","excretion","expertise","firmware","flounder","fun","gallows","garbage","graffiti","hardware","headquarters","health","herpes","highjinks","homework","housework","information","jeans","justice","kudos","labour","literature","machinery","mackerel","mail","media","mews","moose","music","mud","manga","news","only","personnel","pike","plankton","pliers","police","pollution","premises","rain","research","rice","salmon","scissors","series","sewage","shambles","shrimp","software","species","staff","swine","tennis","traffic","transportation","trout","tuna","wealth","welfare","whiting","wildebeest","wildlife","you",/pok[eé]mon$/i,/[^aeiou]ese$/i,/deer$/i,/fish$/i,/measles$/i,/o[iu]s$/i,/pox$/i,/sheep$/i].forEach(d.addUncountableRule),d}))),Vn.exports),Zn=Hn(Kn),Yn=function(e){var t={};try{t.WeakMap=WeakMap}catch(u){t.WeakMap=function(e,t){var n=t.defineProperty,r=t.hasOwnProperty,s=i.prototype;return s.delete=function(e){return this.has(e)&&delete e[this._]},s.get=function(e){return this.has(e)?e[this._]:void 0},s.has=function(e){return r.call(e,this._)},s.set=function(e,t){return n(e,this._,{configurable:!0,value:t}),this},i;function i(t){n(this,"_",{value:"_@ungap/weakmap"+e++}),t&&t.forEach(o,this)}function o(e){this.set(e[0],e[1])}}(Math.random(),Object)}var n=t.WeakMap,r={};try{r.WeakSet=WeakSet}catch(u){!function(e,t){var n=s.prototype;function s(){t(this,"_",{value:"_@ungap/weakmap"+e++})}n.add=function(e){return this.has(e)||t(e,this._,{value:!0,configurable:!0}),this},n.has=function(e){return this.hasOwnProperty.call(e,this._)},n.delete=function(e){return this.has(e)&&delete e[this._]},r.WeakSet=s}(Math.random(),Object.defineProperty)}function s(e,t,n,r,s,i){for(var o=("selectedIndex"in t),a=o;r<s;){var c,l=e(n[r],1);t.insertBefore(l,i),o&&a&&l.selected&&(a=!a,c=t.selectedIndex,t.selectedIndex=c<0?r:d.call(t.querySelectorAll("option"),l)),r++}}function i(e,t){return e==t}function o(e){return e}function a(e,t,n,r,s,i,o){var a=i-s;if(a<1)return-1;for(;a<=n-t;){for(var c=t,l=s;c<n&&l<i&&o(e[c],r[l]);)c++,l++;if(l===i)return t;t=c+1}return-1}function c(e,t,n,r,s){return n<r?e(t[n],0):0<n?e(t[n-1],-0).nextSibling:s}function l(e,t,n,r){for(;n<r;)h(e(t[n++],-1))}var u=r.WeakSet,d=[].indexOf,p=function(e,t,n){for(var r=1,s=t;r<s;){var i=(r+s)/2>>>0;n<e[i]?s=i:r=1+i}return r},h=function(e){return(e.remove||function(){var e=this.parentNode;e&&e.removeChild(this)}).call(e)};function f(e,t,n,r){for(var u=(r=r||{}).compare||i,d=r.node||o,h=null==r.before?null:d(r.before,0),f=t.length,m=f,g=0,b=n.length,y=0;g<m&&y<b&&u(t[g],n[y]);)g++,y++;for(;g<m&&y<b&&u(t[m-1],n[b-1]);)m--,b--;var w=g===m,v=y===b;if(w&&v)return n;if(w&&y<b)return s(d,e,n,y,b,c(d,t,g,f,h)),n;if(v&&g<m)return l(d,t,g,m),n;var k=m-g,$=b-y,x=-1;if(k<$){if(-1<(x=a(n,y,b,t,g,m,u)))return s(d,e,n,y,x,d(t[g],0)),s(d,e,n,x+k,b,c(d,t,m,f,h)),n}else if($<k&&-1<(x=a(t,g,m,n,y,b,u)))return l(d,t,g,x),l(d,t,x+$,m),n;return k<2||$<2?(s(d,e,n,y,b,d(t[g],0)),l(d,t,g,m)):k==$&&function(e,t,n,r,s,i){for(;r<s&&i(n[r],e[t-1]);)r++,t--;return 0===t}(n,b,t,g,m,u)?s(d,e,n,y,b,c(d,t,m,f,h)):function(e,t,n,r,i,o,a,c,u,d,h,f,m){!function(e,t,n,r,i,o,a,c,u){for(var d=[],p=e.length,h=a,f=0;f<p;)switch(e[f++]){case 0:i++,h++;break;case 1:d.push(r[i]),s(t,n,r,i++,i,h<c?t(o[h],0):u);break;case-1:h++}for(f=0;f<p;)switch(e[f++]){case 0:a++;break;case-1:-1<d.indexOf(o[a])?a++:l(t,o,a++,a)}}(function(e,t,n,r,s,i,o){var a,c,l,u,d,p,h=n+i,f=[];e:for(b=0;b<=h;b++){if(50<b)return null;for(p=b-1,u=b?f[b-1]:[0,0],d=f[b]=[],a=-b;a<=b;a+=2){for(c=(l=a===-b||a!==b&&u[p+a-1]<u[p+a+1]?u[p+a+1]:u[p+a-1]+1)-a;l<i&&c<n&&o(r[s+l],e[t+c]);)l++,c++;if(l===i&&c===n)break e;d[b+a]=l}}for(var m=Array(b/2+h/2),g=m.length-1,b=f.length-1;0<=b;b--){for(;0<l&&0<c&&o(r[s+l-1],e[t+c-1]);)m[g--]=0,l--,c--;if(!b)break;p=b-1,u=b?f[b-1]:[0,0],(a=l-c)==-b||a!==b&&u[p+a-1]<u[p+a+1]?(c--,m[g--]=1):(l--,m[g--]=-1)}return m}(n,r,o,a,c,d,f)||function(e,t,n,r,s,i,o,a){var c=0,l=r<a?r:a,u=Array(l++),d=Array(l);d[0]=-1;for(var h=1;h<l;h++)d[h]=o;for(var f=s.slice(i,o),m=t;m<n;m++){var g,b=f.indexOf(e[m]);-1<b&&-1<(c=p(d,l,g=b+i))&&(d[c]=g,u[c]={newi:m,oldi:g,prev:u[c-1]})}for(c=--l,--o;d[c]>o;)--c;l=a+r-c;var y=Array(l),w=u[c];for(--n;w;){for(var v=w.newi,k=w.oldi;v<n;)y[--l]=1,--n;for(;k<o;)y[--l]=-1,--o;y[--l]=0,--n,--o,w=w.prev}for(;t<=n;)y[--l]=1,--n;for(;i<=o;)y[--l]=-1,--o;return y}(n,r,i,o,a,c,u,d),e,t,n,r,a,c,h,m)}(d,e,n,y,b,$,t,g,m,k,f,u,h),n}var m={};function g(t,n){n=n||{};var r=e.createEvent("CustomEvent");return r.initCustomEvent(t,!!n.bubbles,!!n.cancelable,n.detail),r}m.CustomEvent="function"==typeof CustomEvent?CustomEvent:(g["prototype"]=new g("").constructor.prototype,g);var b=m.CustomEvent,y={};try{y.Map=Map}catch(u){y.Map=function(){var e=0,t=[],n=[];return{delete:function(s){var i=r(s);return i&&(t.splice(e,1),n.splice(e,1)),i},forEach:function(e,r){t.forEach((function(t,s){e.call(r,n[s],t,this)}),this)},get:function(t){return r(t)?n[e]:void 0},has:r,set:function(s,i){return n[r(s)?e:t.push(s)-1]=i,this}};function r(n){return-1<(e=t.indexOf(n))}}}var w=y.Map;function v(){return this}function k(e,t){var n="_"+e+"$";return{get:function(){return this[n]||$(this,n,t.call(this,e))},set:function(e){$(this,n,e)}}}var $=function(e,t,n){return Object.defineProperty(e,t,{configurable:!0,value:"function"==typeof n?function(){return e._wire$=n.apply(this,arguments)}:n})[t]};Object.defineProperties(v.prototype,{ELEMENT_NODE:{value:1},nodeType:{value:-1}});var x,C,S,_,T,R,E={},L={},A=[],P=L.hasOwnProperty,N=0,I={attributes:E,define:function(e,t){e.indexOf("-")<0?(e in L||(N=A.push(e)),L[e]=t):E[e]=t},invoke:function(e,t){for(var n=0;n<N;n++){var r=A[n];if(P.call(e,r))return L[r](e[r],t)}}},D=Array.isArray||(C=(x={}.toString).call([]),function(e){return x.call(e)===C}),O=(S=e,_="fragment",R="content"in z(T="template")?function(e){var t=z(T);return t.innerHTML=e,t.content}:function(e){var t,n=z(_),r=z(T);return j(n,/^[^\S]*?<(col(?:group)?|t(?:head|body|foot|r|d|h))/i.test(e)?(t=RegExp.$1,r.innerHTML="<table>"+e+"</table>",r.querySelectorAll(t)):(r.innerHTML=e,r.childNodes)),n},function(e,t){return("svg"===t?function(e){var t=z(_),n=z("div");return n.innerHTML='<svg xmlns="http://www.w3.org/2000/svg">'+e+"</svg>",j(t,n.firstChild.childNodes),t}:R)(e)});function j(e,t){for(var n=t.length;n--;)e.appendChild(t[0])}function z(e){return e===_?S.createDocumentFragment():S.createElementNS("http://www.w3.org/1999/xhtml",e)}var M,U,q,W,F,B,H,G,V,J=(U="appendChild",q="cloneNode",W="createTextNode",B=(F="importNode")in(M=e),(H=M.createDocumentFragment())[U](M[W]("g")),H[U](M[W]("")),(B?M[F](H,!0):H[q](!0)).childNodes.length<2?function e(t,n){for(var r=t[q](),s=t.childNodes||[],i=s.length,o=0;n&&o<i;o++)r[U](e(s[o],n));return r}:B?M[F]:function(e,t){return e[q](!!t)}),K="".trim||function(){return String(this).replace(/^\s+|\s+/g,"")},Z="-"+Math.random().toFixed(6)+"%",Y=!1;try{G=e.createElement("template"),V="tabindex","content"in G&&(G.innerHTML="<p "+V+'="'+Z+'"></p>',G.content.childNodes[0].getAttribute(V)==Z)||(Z="_dt: "+Z.slice(1,-1)+";",Y=!0)}catch(u){}var X="\x3c!--"+Z+"--\x3e",Q=8,ee=1,te=3,ne=/^(?:style|textarea)$/i,re=/^(?:area|base|br|col|embed|hr|img|input|keygen|link|menuitem|meta|param|source|track|wbr)$/i,se=" \\f\\n\\r\\t",ie="[^"+se+"\\/>\"'=]+",oe="["+se+"]+"+ie,ae="<([A-Za-z]+[A-Za-z0-9:._-]*)((?:",ce="(?:\\s*=\\s*(?:'[^']*?'|\"[^\"]*?\"|<[^>]*?>|"+ie.replace("\\/","")+"))?)",le=new RegExp(ae+oe+ce+"+)(["+se+"]*/?>)","g"),ue=new RegExp(ae+oe+ce+"*)(["+se+"]*/>)","g"),de=new RegExp("("+oe+"\\s*=\\s*)(['\"]?)"+X+"\\2","gi");function pe(e,t,n,r){return"<"+t+n.replace(de,he)+r}function he(e,t,n){return t+(n||'"')+Z+(n||'"')}function fe(e,t,n){return re.test(t)?e:"<"+t+n+"></"+t+">"}var me=Y?function(e,t){var n=t.join(" ");return t.slice.call(e,0).sort((function(e,t){return n.indexOf(e.name)<=n.indexOf(t.name)?-1:1}))}:function(e,t){return t.slice.call(e,0)};function ge(t,n,r,s){for(var i=t.childNodes,o=i.length,a=0;a<o;){var c=i[a];switch(c.nodeType){case ee:var l=s.concat(a);!function(t,n,r,s){for(var i,o=t.attributes,a=[],c=[],l=me(o,r),u=l.length,d=0;d<u;){var p=l[d++],h=p.value===Z;if(h||1<(i=p.value.split(X)).length){var f=p.name;if(a.indexOf(f)<0){a.push(f);var m=r.shift().replace(h?/^(?:|[\S\s]*?\s)(\S+?)\s*=\s*('|")?$/:new RegExp("^(?:|[\\S\\s]*?\\s)("+f+")\\s*=\\s*('|\")[\\S\\s]*","i"),"$1"),g=o[m]||o[m.toLowerCase()];if(h)n.push(be(g,s,m,null));else{for(var b=i.length-2;b--;)r.shift();n.push(be(g,s,m,i))}}c.push(p)}}for(var y=((d=0)<(u=c.length)&&Y&&!("ownerSVGElement"in t));d<u;){var w=c[d++];y&&(w.value=""),t.removeAttribute(w.name)}var v=t.nodeName;if(/^script$/i.test(v)){var k=e.createElement(v);for(u=o.length,d=0;d<u;)k.setAttributeNode(o[d++].cloneNode(!0));k.textContent=t.textContent,t.parentNode.replaceChild(k,t)}}(c,n,r,l),ge(c,n,r,l);break;case Q:var u=c.textContent;if(u===Z)r.shift(),n.push(ne.test(t.nodeName)?ye(t,s):{type:"any",node:c,path:s.concat(a)});else switch(u.slice(0,2)){case"/*":if("*/"!==u.slice(-2))break;case"👻":t.removeChild(c),a--,o--}break;case te:ne.test(t.nodeName)&&K.call(c.textContent)===X&&(r.shift(),n.push(ye(t,s)))}a++}}function be(e,t,n,r){return{type:"attr",node:e,path:t,name:n,sparse:r}}function ye(e,t){return{type:"text",node:e,path:t}}var we,ve=(we=new n,{get:function(e){return we.get(e)},set:function(e,t){return we.set(e,t),t}});function ke(e,t){var n=(e.convert||function(e){return e.join(X).replace(ue,fe).replace(le,pe)})(t),r=e.transform;r&&(n=r(n));var s=O(n,e.type);xe(s);var i=[];return ge(s,i,t.slice(0),[]),{content:s,updates:function(n){for(var r=[],s=i.length,o=0,a=0;o<s;){var c=i[o++],l=function(e,t){for(var n=t.length,r=0;r<n;)e=e.childNodes[t[r++]];return e}(n,c.path);switch(c.type){case"any":r.push({fn:e.any(l,[]),sparse:!1});break;case"attr":var u=c.sparse,d=e.attribute(l,c.name,c.node);null===u?r.push({fn:d,sparse:!1}):(a+=u.length-2,r.push({fn:d,sparse:!0,values:u}));break;case"text":r.push({fn:e.text(l),sparse:!1}),l.textContent=""}}return s+=a,function(){var e=arguments.length;if(s!==e-1)throw new Error(e-1+" values instead of "+s+"\n"+t.join("${value}"));for(var i=1,o=1;i<e;){var a=r[i-o];if(a.sparse){var c=a.values,l=c[0],u=1,d=c.length;for(o+=d-2;u<d;)l+=arguments[i++]+c[u++];a.fn(l)}else a.fn(arguments[i++])}return n}}}}var $e=[];function xe(e){for(var t=e.childNodes,n=t.length;n--;){var r=t[n];1!==r.nodeType&&0===K.call(r.textContent).length&&e.removeChild(r)}}var Ce,Se,_e=(Ce=/acit|ex(?:s|g|n|p|$)|rph|ows|mnc|ntw|ine[ch]|zoo|^ord/i,Se=/([^A-Z])([A-Z]+)/g,function(e,t){return"ownerSVGElement"in e?function(e,t){var n;return(n=t?t.cloneNode(!0):(e.setAttribute("style","--hyper:style;"),e.getAttributeNode("style"))).value="",e.setAttributeNode(n),Re(n,!0)}(e,t):Re(e.style,!1)});function Te(e,t,n){return t+"-"+n.toLowerCase()}function Re(e,t){var n,r;return function(s){var i,o,a,c;switch(typeof s){case"object":if(s){if("object"===n){if(!t&&r!==s)for(o in r)o in s||(e[o]="")}else t?e.value="":e.cssText="";for(o in i=t?{}:e,s)a="number"!=typeof(c=s[o])||Ce.test(o)?c:c+"px",!t&&/^--/.test(o)?i.setProperty(o,a):i[o]=a;n="object",t?e.value=function(e){var t,n=[];for(t in e)n.push(t.replace(Se,Te),":",e[t],";");return n.join("")}(r=i):r=s;break}default:r!=s&&(n="string",r=s,t?e.value=s||"":e.cssText=s||"")}}}var Ee,Le,Ae=(Ee=[].slice,(Le=Pe.prototype).ELEMENT_NODE=1,Le.nodeType=111,Le.remove=function(e){var t,n=this.childNodes,r=this.firstChild,s=this.lastChild;return this._=null,e&&2===n.length?s.parentNode.removeChild(s):((t=this.ownerDocument.createRange()).setStartBefore(e?n[1]:r),t.setEndAfter(s),t.deleteContents()),r},Le.valueOf=function(e){var t=this._,n=null==t;if(n&&(t=this._=this.ownerDocument.createDocumentFragment()),n||e)for(var r=this.childNodes,s=0,i=r.length;s<i;s++)t.appendChild(r[s]);return t},Pe);function Pe(e){var t=this.childNodes=Ee.call(e,0);this.firstChild=t[0],this.lastChild=t[t.length-1],this.ownerDocument=t[0].ownerDocument,this._=null}function Ne(e){return{html:e}}function Ie(e,t){switch(e.nodeType){case Be:return 1/t<0?t?e.remove(!0):e.lastChild:t?e.valueOf(!0):e.firstChild;case Fe:return Ie(e.render(),t);default:return e}}function De(e,t){t(e.placeholder),"text"in e?Promise.resolve(e.text).then(String).then(t):"any"in e?Promise.resolve(e.any).then(t):"html"in e?Promise.resolve(e.html).then(Ne).then(t):Promise.resolve(I.invoke(e,t)).then(t)}function Oe(e){return null!=e&&"then"in e}var je,ze,Me,Ue,qe,We="ownerSVGElement",Fe=v.prototype.nodeType,Be=Ae.prototype.nodeType,He=(ze=(je={Event:b,WeakSet:u}).Event,Me=je.WeakSet,Ue=!0,qe=null,function(e){return Ue&&(Ue=!Ue,qe=new Me,function(e){var t=new Me,n=new Me;try{new MutationObserver(o).observe(e,{subtree:!0,childList:!0})}catch(t){var r=0,s=[],i=function(e){s.push(e),clearTimeout(r),r=setTimeout((function(){o(s.splice(r=0,s.length))}),0)};e.addEventListener("DOMNodeRemoved",(function(e){i({addedNodes:[],removedNodes:[e.target]})}),!0),e.addEventListener("DOMNodeInserted",(function(e){i({addedNodes:[e.target],removedNodes:[]})}),!0)}function o(e){for(var r,s=e.length,i=0;i<s;i++)a((r=e[i]).removedNodes,"disconnected",n,t),a(r.addedNodes,"connected",t,n)}function a(e,t,n,r){for(var s,i=new ze(t),o=e.length,a=0;a<o;1===(s=e[a++]).nodeType&&function e(t,n,r,s,i){qe.has(t)&&!s.has(t)&&(i.delete(t),s.add(t),t.dispatchEvent(n));for(var o=t.children||[],a=o.length,c=0;c<a;e(o[c++],n,r,s,i));}(s,i,t,n,r));}}(e.ownerDocument)),qe.add(e),e}),Ge=/^(?:form|list)$/i,Ve=[].slice;function Je(t){return this.type=t,function(t){var n=$e,r=xe;return function(s){var i,o,a;return n!==s&&(i=t,o=n=s,a=ve.get(o)||ve.set(o,ke(i,o)),r=a.updates(J.call(e,a.content,!0))),r.apply(null,arguments)}}(this)}var Ke=!(Je.prototype={attribute:function(e,t,n){var r,s=We in e;if("style"===t)return _e(e,n,s);if("."===t.slice(0,1))return l=e,u=t.slice(1),s?function(e){try{l[u]=e}catch(t){l.setAttribute(u,e)}}:function(e){l[u]=e};if("?"===t.slice(0,1))return o=e,a=t.slice(1),function(e){c!==!!e&&((c=!!e)?o.setAttribute(a,""):o.removeAttribute(a))};if(/^on/.test(t)){var i=t.slice(2);return"connected"===i||"disconnected"===i?He(e):t.toLowerCase()in e&&(i=i.toLowerCase()),function(t){r!==t&&(r&&e.removeEventListener(i,r,!1),(r=t)&&e.addEventListener(i,t,!1))}}if("data"===t||!s&&t in e&&!Ge.test(t))return function(n){r!==n&&(r=n,e[t]!==n&&null==n?(e[t]="",e.removeAttribute(t)):e[t]=n)};if(t in I.attributes)return function(n){var s=I.attributes[t](e,n);r!==s&&(null==(r=s)?e.removeAttribute(t):e.setAttribute(t,s))};var o,a,c,l,u,d=!1,p=n.cloneNode(!0);return function(t){r!==t&&(r=t,p.value!==t&&(null==t?(d&&(d=!1,e.removeAttributeNode(p)),p.value=t):(p.value=t,d||(d=!0,e.setAttributeNode(p)))))}},any:function(e,t){var n,r={node:Ie,before:e},s=We in e?"svg":"html",i=!1;return function o(a){switch(typeof a){case"string":case"number":case"boolean":i?n!==a&&(n=a,t[0].textContent=a):(i=!0,n=a,t=f(e.parentNode,t,[(c=a,e.ownerDocument.createTextNode(c))],r));break;case"function":o(a(e));break;case"object":case"undefined":if(null==a){i=!1,t=f(e.parentNode,t,[],r);break}default:if(i=!1,D(n=a))if(0===a.length)t.length&&(t=f(e.parentNode,t,[],r));else switch(typeof a[0]){case"string":case"number":case"boolean":o({html:a});break;case"object":if(D(a[0])&&(a=a.concat.apply([],a)),Oe(a[0])){Promise.all(a).then(o);break}default:t=f(e.parentNode,t,a,r)}else"ELEMENT_NODE"in a?t=f(e.parentNode,t,11===a.nodeType?Ve.call(a.childNodes):[a],r):Oe(a)?a.then(o):"placeholder"in a?De(a,o):"text"in a?o(String(a.text)):"any"in a?o(a.any):"html"in a?t=f(e.parentNode,t,Ve.call(O([].concat(a.html).join(""),s).childNodes),r):o("length"in a?Ve.call(a):I.invoke(a,o))}var c}},text:function(e){var t;return function n(r){var s;t!==r&&("object"==(s=typeof(t=r))&&r?Oe(r)?r.then(n):"placeholder"in r?De(r,n):n("text"in r?String(r.text):"any"in r?r.any:"html"in r?[].concat(r.html).join(""):"length"in r?Ve.call(r).join(""):I.invoke(r,n)):"function"==s?n(r(e)):e.textContent=null==r?"":r)}}}),Ze=function(t){var r,s,i,o,a=(r=(e.defaultView.navigator||{}).userAgent,/(Firefox|Safari)\/(\d+)/.test(r)&&!/(Chrom[eium]+|Android)\/(\d+)/.test(r)),c=!("raw"in t)||t.propertyIsEnumerable("raw")||!Object.isFrozen(t.raw);return a||c?(s={},i=function(e){for(var t=".",n=0;n<e.length;n++)t+=e[n].length+"."+e[n];return s[t]||(s[t]=e)},Ze=c?i:(o=new n,function(e){return o.get(e)||(n=i(t=e),o.set(t,n),n);var t,n})):Ke=!0,Ye(t)};function Ye(e){return Ke?e:Ze(e)}function Xe(e){for(var t=arguments.length,n=[Ye(e)],r=1;r<t;)n.push(arguments[r++]);return n}var Qe=new n,et=function(e){var t,n,r;return function(){var s=Xe.apply(null,arguments);return r!==s[0]?(r=s[0],n=new Je(e),t=nt(n.apply(n,s))):n.apply(n,s),t}},tt=function(e,t){var n=t.indexOf(":"),r=Qe.get(e),s=t;return-1<n&&(s=t.slice(n+1),t=t.slice(0,n)||"html"),r||Qe.set(e,r={}),r[s]||(r[s]=et(t))},nt=function(e){var t=e.childNodes,n=t.length;return 1===n?t[0]:n?new Ae(t):e},rt=new n;function st(){var e=rt.get(this),t=Xe.apply(null,arguments);return e&&e.template===t[0]?e.tagger.apply(null,t):function(e){var t=new Je(We in this?"svg":"html");rt.set(this,{tagger:t,template:e}),this.textContent="",this.appendChild(t.apply(null,arguments))}.apply(this,t),this}var it,ot,at,ct,lt=I.define,ut=Je.prototype;function dt(e){return arguments.length<2?null==e?et("html"):"string"==typeof e?dt.wire(null,e):"raw"in e?et("html")(e):"nodeType"in e?dt.bind(e):tt(e,"html"):("raw"in e?et("html"):dt.wire).apply(null,arguments)}return dt.Component=v,dt.bind=function(e){return st.bind(e)},dt.define=lt,dt.diff=f,(dt.hyper=dt).observe=He,dt.tagger=ut,dt.wire=function(e,t){return null==e?et(t||"html"):tt(e,t||"html")},dt._={WeakMap:n,WeakSet:u},it=et,ot=new n,at=Object.create,ct=function(e,t){var n={w:null,p:null};return t.set(e,n),n},Object.defineProperties(v,{for:{configurable:!0,value:function(e,t){return function(e,t,r,s){var i,o,a,c=t.get(e)||ct(e,t);switch(typeof s){case"object":case"function":var l=c.w||(c.w=new n);return l.get(s)||(i=l,o=s,a=new e(r),i.set(o,a),a);default:var u=c.p||(c.p=at(null));return u[s]||(u[s]=new e(r))}}(this,ot.get(e)||(r=e,s=new w,ot.set(r,s),s),e,null==t?"default":t);var r,s}}}),Object.defineProperties(v.prototype,{handleEvent:{value:function(e){var t=e.currentTarget;this["getAttribute"in t&&t.getAttribute("data-call")||"on"+e.type](e)}},html:k("html",it),svg:k("svg",it),state:k("state",(function(){return this.defaultState})),defaultState:{get:function(){return{}}},dispatch:{value:function(e,t){var n=this._wire$;if(n){var r=new b(e,{bubbles:!0,cancelable:!0,detail:t});return r.component=this,(n.dispatchEvent?n:n.firstChild).dispatchEvent(r)}return!1}},setState:{value:function(e,t){var n=this.state,r="function"==typeof e?e.call(this,n):e;for(var s in r)n[s]=r[s];return!1!==t&&this.render(),this}}}),dt}(document);const{Component:Xn,bind:Qn,define:er,diff:tr,hyper:nr,wire:rr}=Yn,sr=Yn,ir=R,or=Bn,ar=class{constructor(e){const{type:t,subtype:n,params:r}=function(e){if(e=e.trim(),!e)throw new TypeError("Invalid input.");let t="",n="",r="",s=null,i=new Map,o="type",a=Array.from(e);for(let e=0;e<a.length;e++){const c=a[e];switch(o){case"type":if("/"===c){o="subtype";continue}t+=c;break;case"subtype":if(";"===c){o="param-start";continue}n+=c;break;case"param-start":if(xt.test(c)||";"===c)continue;r+=c,o="param-name";break;case"param-name":if("="===c||";"===c){if("="===c){o="param-value",s=null;continue}i.set(r.toLowerCase(),null),r="";continue}r+=c;break;case"param-value":if('"'==c){o="collect-quoted-string";continue}if(";"===c){s=s.trimEnd(),o="param-start",St(i,r,s),r="";continue}s="string"==typeof s?s+c:c;break;case"collect-quoted-string":if('"'===c){St(i,r,s),o="ignore-input-until-next-param",r="",s=null;continue}if("\\"===c)continue;s="string"==typeof s?s+c:c;break;case"ignore-input-until-next-param":if(";"!==c)continue;o="param-start";break;default:throw new Error(`State machine error - unknown parser mode: ${o} `)}}r&&St(i,r,s);if(""===t.trim()||!$t.test(t))throw new TypeError("Invalid type");if(""===n.trim()||!$t.test(n))throw new TypeError("Invalid subtype");return{type:t,subtype:n,params:Object.fromEntries(i.entries())}}(e);this.type=t.trim().toLowerCase(),this.subtype=n.trimEnd().toLowerCase(),this.parameters=new Map(Object.entries(r))}get essence(){return`${this.type}/${this.subtype}`}toString(){return function(e){const{parameters:t,essence:n}=e;if(!t.size)return n;let r=";";for(const[e,n]of t.entries())r+=e,null!==n?$t.test(n)?r+=`=${n}`:r+=`="${n}"`:r+='=""',r+=";";return e.essence+r.slice(0,-1)}(this)}},cr=Zn,lr=Ge,ur=class{lexer;curToken=kt;peekToken=kt;getCurToken(){return this.curToken}getPeekToken(){return this.peekToken}constructor(e){this.lexer=new vt(e),this._nextToken(),this._nextToken()}parse(){const e=[];for(;this.getCurToken().type!==He.EOF;){const t=this._parseRule();e.push(t)}const t=new Xe(e);return t.separator=this._nextToken(),t.setChildrenParent(),this._convertGroupDefinitions(t),t}_parseRule(){const e=this._parseTypename(!0,null),t=this._nextToken();let n;if(t.type===He.ASSIGN||t.type===He.GCHOICEALT){const r=this._parseGroupEntry();n=new Qe(e,t,r)}else{if(t.type!==He.TCHOICEALT)throw this._parserError(`expected assignment (\`=\`, \`/=\`, \`//=\`) after \`${e.serialize().trim()}\`, got \`${t.serialize().trim()}\``);{const r=this._parseType();if(!(r instanceof ht))throw new Error("Expected Type instance");n=new Qe(e,t,r)}}return n}_parseGroupEntry(){const e=this._parseOccurrence(),t=this._parseType(!0);let n;if(t instanceof pt){const r=this._parseType(!1);if(!(r instanceof ht))throw new Error("Expected Type instance");n=new et(e,t,r)}else n=new et(e,null,t);return n}_parseType(e=!1){const t=[];let n=this._parseType1(e);if(t.push(n),e&&this.getCurToken().type===He.CARET){const e=[];if(e.push(this._nextToken()),this.getCurToken().type!==He.ARROWMAP)throw this._parserError("expected arrow map (`=>`), got `#{(this.getCurToken().serialize() + this.getPeekToken().serialize()).trim()}`");e.push(this._nextToken());return new pt(n,!0,!1,e)}if(e&&this.getCurToken().type===He.ARROWMAP){return new pt(n,!1,!1,[this._nextToken()])}if(e&&this.getCurToken().type===He.COLON){return new pt(n,!0,!0,[this._nextToken()])}for(;this.getCurToken().type===He.TCHOICE;)n.separator=this._nextToken(),n=this._parseType1(),t.push(n);return new ht(t)}_parseType1(e=!1){const t=this._parseType2(e);let n;if(this.getCurToken().type===He.INCLRANGE||this.getCurToken().type===He.EXCLRANGE){const e=this._nextToken(),r=this._parseType2();if(!(t instanceof at||t instanceof ct))throw this._parserError(`expected range min to be a value or a typename, got \`${t.serialize().trim()}\``);if(!(r instanceof at||r instanceof ct))throw this._parserError(`expected range max to be a value or a typename, got \`${r.serialize().trim()}\``);n=new ut(t,r,e)}else if(this.getCurToken().type===He.CTLOP){const e=this._nextToken(),r=this._parseType2();n=new dt(t,e,r)}else n=t;return n}_parseType2(e=!1){let t;if(this.getCurToken().type===He.LPAREN){const n=this._nextToken();if(e)t=this._parseGroup(!1);else{const e=this._parseType();if(!(e instanceof ht))throw new Error("Expected Type instance");t=e}if(t.openToken=n,this.getCurToken().type!==He.RPAREN)throw this._parserError(`expected right parenthesis, got \`${this.getCurToken().serialize().trim()}\``);t.closeToken=this._nextToken()}else if(this.getCurToken().type===He.LBRACE){const e=this._nextToken();if(t=this._parseGroup(!0),t.openToken=e,this.getCurToken().type!==He.RBRACE)throw this._parserError(`expected right brace, got \`${this.getCurToken().serialize()}\``);t.closeToken=this._nextToken()}else if(this.getCurToken().type===He.LBRACK){const e=this._nextToken(),n=this._parseGroup(!1);if(t=new rt(n.groupChoices),t.openToken=e,this.getCurToken().type!==He.RBRACK)throw this._parserError(`expected right bracket, got \`${this.getCurToken().serialize().trim()}\``);t.closeToken=this._nextToken()}else if(this.getCurToken().type===He.TILDE){const e=this._nextToken();t=this._parseTypename(!1,e)}else if(this.getCurToken().type===He.AMPERSAND){const e=this._nextToken();if(this.getCurToken().type===He.LPAREN){const e=this._nextToken(),n=this._parseGroup(!1);if(n.openToken=e,this.getCurToken().type!==He.RPAREN)throw this._parserError(`expected right parenthesis, got \`${this.getCurToken().serialize().trim()}\``);n.closeToken=this._nextToken(),t=new lt(n)}else{const e=this._parseTypename(!1,null);t=new lt(e)}t.setComments(e)}else if(this.getCurToken().type===He.HASH){const e=this._nextToken();if(this.getCurToken().type!==He.NUMBER&&this.getCurToken().type!==He.FLOAT||this.getCurToken().startWithSpaces())t=new it;else{const e=this._nextToken();if(e.literal.length>1&&("."!==e.literal[1]||e.literal.includes("e")))throw this._parserError(`expected data item after "#" to match \`DIGIT ["." uint]\`, got \`${this.getCurToken().serialize().trim()}\``);if("6"!==e.literal[0]||this.getCurToken().type!==He.LPAREN||this.getCurToken().startWithSpaces())t=new it(e);else{const n=this._parseType2();if(!(n instanceof ht))throw new Error("Expected Type instance");t=new it(e,n)}}t.setComments(e)}else if(this.getCurToken().type===He.IDENT)t=this._parseTypename(!1,null);else if(this.getCurToken().type===He.STRING){const e=this._nextToken();t=new at(e.literal,"text"),t.setComments(e)}else if(this.getCurToken().type===He.BYTES){const e=this._nextToken();t=new at(e.literal,"bytes"),t.setComments(e)}else if(this.getCurToken().type===He.HEX){const e=this._nextToken();t=new at(e.literal,"hex"),t.setComments(e)}else if(this.getCurToken().type===He.BASE64){const e=this._nextToken();t=new at(e.literal,"base64"),t.setComments(e)}else if(this.getCurToken().type===He.NUMBER){const e=this._nextToken();t=new at(e.literal,"number"),t.setComments(e)}else{if(this.getCurToken().type!==He.FLOAT)throw this._parserError(`invalid type2 production, got \`${this.getCurToken().serialize().trim()}\``);{const e=this._nextToken();t=new at(e.literal,"number"),t.setComments(e)}}return t}_parseGroup(e=!1){const t=[];for(;this.getCurToken().type!==He.RPAREN&&this.getCurToken().type!==He.RBRACE&&this.getCurToken().type!==He.RBRACK;){const e=[];for(;this.getCurToken().type!==He.GCHOICE;){const t=this._parseGroupEntry();if(e.push(t),this.getCurToken().type===He.COMMA&&(t.separator=this._nextToken()),this.getCurToken().type===He.RPAREN||this.getCurToken().type===He.RBRACE||this.getCurToken().type===He.RBRACK)break}const n=new st(e);if(t.push(n),this.getCurToken().type===He.RPAREN||this.getCurToken().type===He.RBRACE||this.getCurToken().type===He.RBRACK)break;n.separator=this._nextToken()}let n;return n=e?new nt(t):new tt(t),n}_parseOccurrence(){const e=[];let t=null;if(this.getCurToken().type===He.QUEST||this.getCurToken().type===He.ASTERISK||this.getCurToken().type===He.PLUS){const n=this.getCurToken().type===He.PLUS?1:0;let r=1/0;this.getCurToken().type===He.ASTERISK&&this.getPeekToken().type===He.NUMBER&&yt(this.getPeekToken().literal)&&!this.getPeekToken().startWithSpaces()&&(e.push(this._nextToken()),r=parseInt(this.getCurToken().literal)),e.push(this._nextToken()),t=new ot(n,r,e)}else if(this.getCurToken().type===He.NUMBER&&yt(this.getCurToken().literal)&&this.getPeekToken().type===He.ASTERISK&&!this.getPeekToken().startWithSpaces()){const n=parseInt(this.getCurToken().literal);let r=1/0;e.push(this._nextToken()),e.push(this._nextToken()),this.getCurToken().type===He.NUMBER&&yt(this.getCurToken().literal)&&!this.getCurToken().startWithSpaces()&&(r=parseInt(this.getCurToken().literal),e.push(this._nextToken())),t=new ot(n,r,e)}return t}_parseTypename(e=!1,t=null){if(this.getCurToken().type!==He.IDENT)throw this._parserError(`expected group identifier, got \`${this.getCurToken().serialize().trim()}\``);const n=this._nextToken();let r;r=e?this._parseGenericParameters():this._parseGenericArguments();const s=new ct(n.literal,t,r);return s.setComments(n),s}_parseGenericParameters(){if(this.getCurToken().type!==He.LT||this.getCurToken().startWithSpaces())return null;const e=this._nextToken(),t=[];let n=this._parseTypename();for(t.push(n);this.getCurToken().type===He.COMMA;)n.separator=this._nextToken(),n=this._parseTypename(),t.push(n);const r=new ft(t);if(r.openToken=e,this.getCurToken().type!==He.GT)throw this._parserError(`expected \`>\` character to end generic production, got \`${this.getCurToken().serialize().trim()}\``);return r.closeToken=this._nextToken(),r}_parseGenericArguments(){if(this.getCurToken().type!==He.LT||this.getCurToken().startWithSpaces())return null;const e=this._nextToken(),t=[];let n=this._parseType1();for(t.push(n);this.getCurToken().type===He.COMMA;)n.separator=this._nextToken(),n=this._parseType1(),t.push(n);const r=new mt(t);if(r.openToken=e,this.getCurToken().type!==He.GT)throw this._parserError(`expected \`>\` character to end generic production, got \`${this.getCurToken().serialize().trim()}\``);return r.closeToken=this._nextToken(),r}_convertGroupDefinitions(e){const t=new Set,n=new Set,r=new Set,s=e=>{if(e instanceof at||e instanceof nt||e instanceof rt||e instanceof lt||e instanceof it)return"type";if(e instanceof ut)return s(e.min);if(e instanceof dt)return s(e.type);if(e instanceof ct){const t=e.name;if(n.has(t)||this._isPreludeType(t))return"type";if(r.has(t))return"group"}return"unknown"};for(const s of e.rules)t.add(s.name.name),0===n.size&&n.add(s.name.name),s.type instanceof ht?n.add(s.name.name):(s.assign.type===He.TCHOICEALT&&n.add(s.name.name),s.assign.type===He.GCHOICEALT&&r.add(s.name.name),s.type.type.types.length>1&&null===s.type.type.openToken&&n.add(s.name.name),null!==s.type.occurrence&&r.add(s.name.name),null!==s.type.key&&r.add(s.name.name));const i=e=>{e instanceof et&&null!==e.key&&e.key.type instanceof ct&&!e.key.hasColon&&t.has(e.key.type.name)&&n.add(e.key.type.name);for(const t of e.getChildren())i(t)};i(e);let o=!0;for(;o;){o=!1;for(const i of e.rules)if(i.type instanceof ht)for(const e of i.type.types)e instanceof ct&&t.has(e.name)&&(n.has(e.name)||(o=!0,n.add(e.name)));else{if(n.has(i.name.name))for(const e of i.type.type.types)e instanceof ct&&t.has(e.name)&&(n.has(e.name)||(o=!0,n.add(e.name)));if(r.has(i.name.name))for(const e of i.type.type.types)e instanceof ct&&t.has(e.name)&&(r.has(e.name)||(o=!0,r.add(e.name)));if(i.assign.type===He.ASSIGN){const e=new Set(i.type.type.types.map((e=>s(e))));if(e.has("type")&&e.has("group"))throw new gt(`CDDL semantic error - rule \`${i.name.name}\` targets a mix of type and group rules`);e.has("type")?n.has(i.name.name)||(o=!0,n.add(i.name.name)):e.has("group")&&(r.has(i.name.name)||(o=!0,r.add(i.name.name)))}}}const a=[...n].filter((e=>r.has(e)));if(a.length>0){const e=a.join(", ");throw new gt(`CDDL semantic error - mix of type and group definitions for ${e}`)}for(const t of e.rules)if(!(t.type instanceof ht)&&n.has(t.name.name)){if(!t.type.isConvertibleToType())throw new gt(`CDDL semantic error - rule \`${t.name.name}\` is a type definition but uses a group entry`);t.type=t.type.type}}_isPreludeType(e){return["any","uint","nint","int","bstr","bytes","tstr","text","tdate","time","number","biguint","bignint","bigint","integer","unsigned","decfrac","bigfloat","eb64url","eb64legacy","eb16","encoded-cbor","uri","b64url","b64legacy","regexp","mime-message","cbor-any","float16","float32","float64","float16-32","float32-64","float","false","true","bool","nil","null","undefined"].includes(e)}_nextToken(){const e=this.curToken;return this.curToken=this.peekToken,this.peekToken=this.lexer.nextToken(),e}_parserError(e){const t=this.lexer.getLocation();return new gt(`CDDL syntax error - line ${t.line+1}: ${e}`)}},dr=class{serializeToken(e,t){return e.serialize()}serializeValue(e,t,n,r){return e+t+n}serializeName(e,t){return e}markupFor(e){return[null,null]}},pr=Qe,hr=pt,fr=ft,mr=mt,gr=ht,br=ot,yr=/['\u2019]s$/,wr=/-/g,vr=RegExp.escape??(e=>e.replace(/[\\^$.*+?()[\]{}|]/g,"\\$&"));const kr=new Intl.DateTimeFormat(["sv-SE"],{timeZone:"UTC",year:"numeric",month:"2-digit",day:"2-digit"}),$r="en"===r||r.startsWith("en-")?"en-AU":r,xr=new Intl.DateTimeFormat($r,{timeZone:"UTC",year:"numeric",month:"long",day:"en-AU"===$r?"2-digit":"numeric"}),Cr=".informative, .note, .issue, .example, .ednote, .practice, .introductory";function Sr(e){const t=new URL(e.href,document.baseURI),n=document.createElement("link");let{href:r}=t;switch(n.rel=e.hint,n.rel){case"dns-prefetch":case"preconnect":r=t.origin,(e.corsMode||t.origin!==document.location.origin)&&(n.crossOrigin=e.corsMode||"anonymous");break;case"preload":"as"in e&&n.setAttribute("as",e.as||""),e.corsMode&&(n.crossOrigin=e.corsMode)}return n.href=r,e.dontRemove||n.classList.add("removeOnSave"),n}function _r(e){e.querySelectorAll(".remove, script[data-requiremodule]").forEach((e=>{e.remove()}))}function Tr(e,t="long"){const n=new Intl.ListFormat(r,{style:t,type:e});return(e,t)=>{let r=0;return n.formatToParts(e).map((({type:n,value:s})=>"element"===n&&t?t(s,r++,e):s))}}const Rr=Tr("conjunction"),Er=Tr("disjunction");function Lr(e,t){return Rr(e,t).join("")}function Ar(e,t){return Er(e,t).join("")}function Pr(e){return e.replace(/&/g,"&amp;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/</g,"&lt;")}function Nr(e){return e.trim().replace(/\s+/g," ")}function Ir(e,t=r){return t=t.toLowerCase(),new Proxy(e,{get(e,n){const r=Dr(e,n,t)||e.en[n];if(!r)throw new Error(`No l10n data for key: "${n}"`);return r}})}function Dr(e,t,n=r){n=n.toLowerCase();const s=n.match(/^(\w{2,3})-.+$/)?.[1]??"";return e[n]?.[t]||e[s]?.[t]}function Or(e,t=""){return kr.format(e).replace(wr,t)}function jr(e,t,...n){const r=[this,e,...n];if(t){const n=t.split(/\s+/);for(const t of n){const n=window[t];if(n)try{e=n.apply(this,r)}catch(e){rs(`call to \`${t}()\` failed with: ${e}.`,"utils/runTransforms",{hint:"See developer console for stack trace.",cause:e})}}}return e}async function zr(e,t=864e5){const n=new Request(e),r=new URL(n.url);let s,i;if("caches"in window)try{if(s=await caches.open(r.origin),i=await s.match(n),i&&new Date(i.headers.get("Expires")??"")>new Date)return i}catch(e){console.error("Failed to use Cache API.",e)}const o=await fetch(n);if(!o.ok&&i)return console.warn(`Returning a stale cached response for ${r}`),i;if(s&&o.ok){const e=o.clone(),r=new Headers(o.headers),i=new Date(Date.now()+t);r.set("Expires",i.toISOString());const a=new Response(await e.blob(),{headers:r});await s.put(n,a).catch(console.error)}return o}function Mr(e,t=(e=>e)){const n=e.map(t),r=n.slice(0,-1).map((e=>sr`${e}, `));return sr`${r}${n[n.length-1]}`}function Ur(e,t){return[].concat(Rr(e,t)).map((e=>"string"==typeof e?sr`${e}`:e))}function qr(e,t=""){const n=function(e){let t=0;for(const n of e)t=Math.imul(31,t)+n.charCodeAt(0)|0;return String(t)}(Nr(e.textContent));return Fr(e,t,n)}function Wr(e,t=!1){return(t?e:e.toLowerCase()).trim().normalize("NFD").replace(/[\u0300-\u036f]/g,"").replace(/\W+/gim,"-").replace(/^-+/,"").replace(/-+$/,"")}function Fr(e,t="",n="",r=!1){if(e.id)return e.id;n||(n=(e.title?e.title:e.textContent).trim());let s=Wr(n,r);if(s?!/\.$/.test(s)&&/^[a-z]/i.test(t||s)||(s=`x${s}`):s="generatedID",t&&(s=`${t}-${s}`),e.ownerDocument.getElementById(s)){let t=0,n=`${s}-${t}`;for(;e.ownerDocument.getElementById(n);)t+=1,n=`${s}-${t}`;s=n}return e.id=s,s}function Br(e){const t=new Set,n="ltNodefault"in e.dataset?"":Nr(e.textContent),r=e.children[0];if(e.dataset.lt?e.dataset.lt.split("|").map((e=>Nr(e))).forEach((e=>t.add(e))):1===e.childNodes.length&&1===e.getElementsByTagName("abbr").length&&r&&r.title?t.add(r.title):'""'===e.textContent&&t.add("the-empty-string"),t.add(n),t.delete(""),e.dataset.localLt){e.dataset.localLt.split("|").forEach((e=>t.add(Nr(e))))}return[...t]}function Hr(e,t,n={copyAttributes:!0}){if(e.localName===t)return e;const r=e.ownerDocument.createElement(t);if(n.copyAttributes)for(const{name:t,value:n}of e.attributes)r.setAttribute(t,n);return r.append(...e.childNodes),e.replaceWith(r),r}function Gr(e,t){const n=t.closest(Cr);let r=!1;if(n&&(r=!t.closest(".normative")||!n.querySelector(".normative")),e.startsWith("!")){if(r)return{type:"informative",illegal:!0};r=!1}else e.startsWith("?")&&(r=!0);return{type:r?"informative":"normative",illegal:!1}}function Vr(e,t){return t.append(...e.childNodes),e.appendChild(t),e}function Jr(e){const t=[];for(const n of function*(e){let t=e;for(;t.previousElementSibling;)t=t.previousElementSibling,yield t}(e))"section"===n.localName&&t.push(n);return t}function Kr(e){const{previousSibling:t}=e;if(!t||t.nodeType!==Node.TEXT_NODE)return"";const n=(t.textContent??"").lastIndexOf("\n");if(-1===n)return"";const r=(t.textContent??"").slice(n+1);return/\S/.test(r)?"":r}class Zr extends Set{constructor(e=[]){super();for(const t of e)this.add(t)}add(e){return this.has(e)||this.getCanonicalKey(e)?this:super.add(e)}has(e){return super.has(e)||[...this.keys()].some((t=>t.toLowerCase()===e.toLowerCase()))}delete(e){return super.has(e)?super.delete(e):super.delete(this.getCanonicalKey(e)??e)}getCanonicalKey(e){return super.has(e)?e:[...this.keys()].find((t=>t.toLowerCase()===e.toLowerCase()))}}function Yr(e){const t=e.cloneNode(!0);return t.querySelectorAll("[id]").forEach((e=>e.removeAttribute("id"))),t.querySelectorAll("dfn").forEach((e=>{Hr(e,"span",{copyAttributes:!1})})),t.hasAttribute("id")&&t.removeAttribute("id"),Xr(t),t}function Xr(e){const t=document.createTreeWalker(e,NodeFilter.SHOW_COMMENT);for(const e of[...Qr(t)])e.remove()}function*Qr(e){for(;e.nextNode();)yield e.currentNode}class es extends Map{constructor(e=[]){return super(),e.forEach((([e,t])=>{this.set(e,t)})),this}set(e,t){return super.set(e.toLowerCase(),t),this}get(e){return super.get(e.toLowerCase())}has(e){return super.has(e.toLowerCase())}delete(e){return super.delete(e.toLowerCase())}}class ts extends Error{constructor(e,t,n){super(e,{...n.cause&&{cause:n.cause}});const r=n.isWarning?"ReSpecWarning":"ReSpecError";Object.assign(this,{message:e,plugin:t,name:r,...n}),n.elements&&n.elements.forEach((t=>function(e,t,n){e.classList.add("respec-offending-element"),e.hasAttribute("title")||e.setAttribute("title",n||t),e.id||Fr(e,"respec-offender")}(t,e,n.title)))}toJSON(){const{message:e,name:t,stack:n}=this,{plugin:r,hint:s,elements:i,title:o,details:a}=this;return{message:e,name:t,plugin:r,hint:s,elements:i,title:o,details:a,stack:n,...this.cause instanceof Error&&{cause:{name:this.cause.name,message:this.cause.message,stack:this.cause.stack}}}}}function ns(e,t,n={}){const r={...n,isWarning:!1};ps("error",new ts(e,t,r))}function rs(e,t,n={}){const r={...n,isWarning:!0};ps("warn",new ts(e,t,r))}function ss(e){return{amendConfiguration:e=>ps("amend-user-config",e),showError:(t,n)=>ns(t,e,n),showWarning:(t,n)=>rs(t,e,n)}}function is(e){return e?`\`${e}\``:""}function os(e,{quotes:t}={quotes:!1}){return Ar(e,t?e=>is(cs(e)):is)}function as(e,{quotes:t}={quotes:!1}){return Lr(e,t?e=>is(cs(e)):is)}function cs(e){return String(e)?`"${e}"`:""}function ls(e,...t){return us(e.map(((e,n)=>{const r=t[n];if(!r)return e;if(!r.startsWith("[")&&!r.endsWith("]"))return e+r;const[s,i]=r.slice(1,-1).split("|");if(i){return`${e}[${s}](${new URL(i,"https://respec.org/docs/")})`}return`${e}[\`${s}\`](https://respec.org/docs/#${s})`})).join(""))}function us(e){if(!e)return e;const t=e.trimEnd().split("\n");for(;t.length&&!t[0].trim();)t.shift();const n=t.filter((e=>e.trim())).map((e=>e.search(/[^\s]/))),r=Math.min(...n);return t.map((e=>e.slice(r))).join("\n")}const ds=new EventTarget;function ps(e,t){if(ds.dispatchEvent(new CustomEvent(e,{detail:t})),window.parent===window.self)return;const n=String(JSON.stringify(t?.stack||t));window.parent.postMessage({topic:e,args:n},window.parent.location.origin)}function hs(e,t,n={once:!1}){ds.addEventListener(e,(async n=>{try{await t(n.detail)}catch(t){const n=t;ns(`Error in handler for topic "${e}": ${n.message}`,`sub:${e}`,{cause:n})}}),n)}const fs=["githubToken","githubUser"];const ms=new Map([["text/html","html"],["application/xml","xml"]]);function gs(e,t=document){const n=ms.get(e);if(!n){const t=[...ms.values()].join(", ");throw new TypeError(`Invalid format: ${e}. Expected one of: ${t}.`)}const r=bs(n,t);return`data:${e};charset=utf-8,${encodeURIComponent(r)}`}function bs(e,t){const n=t.cloneNode(!0);!function(e){const{head:t,body:n,documentElement:r}=e;Xr(e),e.querySelectorAll(".removeOnSave, #toc-nav").forEach((e=>e.remove())),n.classList.remove("toc-sidebar","toc-inline"),_r(r);const s=e.createDocumentFragment(),i=e.querySelector("meta[name='viewport']");i&&t.firstChild!==i&&s.appendChild(i);const o=e.querySelector("meta[charset], meta[content*='charset=']")||sr`<meta charset="utf-8" />`;s.appendChild(o);const a=`ReSpec ${window.respecVersion||"Developer Channel"}`,c=sr`
1
+ window.respecVersion="37.3.0",function(){"use strict";var e="undefined"!=typeof document?document.currentScript:null;const t=document.documentElement;t?.hasAttribute("lang")||(t.lang="en",t.hasAttribute("dir")||(t.dir="ltr"));const n={},r=t?.lang??"en";var s=Object.freeze({__proto__:null,l10n:n,lang:r,name:"core/l10n",run:function(e){e.l10n=n[r]||n.en}});const i=(e,t)=>t.some((t=>e instanceof t));let o,a;const c=new WeakMap,l=new WeakMap,u=new WeakMap;let d={get(e,t,n){if(e instanceof IDBTransaction){if("done"===t)return c.get(e);if("store"===t)return n.objectStoreNames[1]?void 0:n.objectStore(n.objectStoreNames[0])}return m(e[t])},set:(e,t,n)=>(e[t]=n,!0),has:(e,t)=>e instanceof IDBTransaction&&("done"===t||"store"===t)||t in e};function p(e){d=e(d)}function h(e){return(a||(a=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])).includes(e)?function(...t){return e.apply(g(this),t),m(this.request)}:function(...t){return m(e.apply(g(this),t))}}function f(e){return"function"==typeof e?h(e):(e instanceof IDBTransaction&&function(e){if(c.has(e))return;const t=new Promise(((t,n)=>{const r=()=>{e.removeEventListener("complete",s),e.removeEventListener("error",i),e.removeEventListener("abort",i)},s=()=>{t(),r()},i=()=>{n(e.error||new DOMException("AbortError","AbortError")),r()};e.addEventListener("complete",s),e.addEventListener("error",i),e.addEventListener("abort",i)}));c.set(e,t)}(e),i(e,o||(o=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction]))?new Proxy(e,d):e)}function m(e){if(e instanceof IDBRequest)return function(e){const t=new Promise(((t,n)=>{const r=()=>{e.removeEventListener("success",s),e.removeEventListener("error",i)},s=()=>{t(m(e.result)),r()},i=()=>{n(e.error),r()};e.addEventListener("success",s),e.addEventListener("error",i)}));return u.set(t,e),t}(e);if(l.has(e))return l.get(e);const t=f(e);return t!==e&&(l.set(e,t),u.set(t,e)),t}const g=e=>u.get(e);const b=["get","getKey","getAll","getAllKeys","count"],y=["put","add","delete","clear"],w=new Map;function v(e,t){if(!(e instanceof IDBDatabase)||t in e||"string"!=typeof t)return;if(w.get(t))return w.get(t);const n=t.replace(/FromIndex$/,""),r=t!==n,s=y.includes(n);if(!(n in(r?IDBIndex:IDBObjectStore).prototype)||!s&&!b.includes(n))return;const i=async function(e,...t){const i=this.transaction(e,s?"readwrite":"readonly");let o=i.store;return r&&(o=o.index(t.shift())),(await Promise.all([o[n](...t),s&&i.done]))[0]};return w.set(t,i),i}p((e=>({...e,get:(t,n,r)=>v(t,n)||e.get(t,n,r),has:(t,n)=>!!v(t,n)||e.has(t,n)})));const k=["continue","continuePrimaryKey","advance"],$={},x=new WeakMap,C=new WeakMap,S={get(e,t){if(!k.includes(t))return e[t];let n=$[t];return n||(n=$[t]=function(...e){x.set(this,C.get(this)[t](...e))}),n}};async function*_(...e){let t=this;if(t instanceof IDBCursor||(t=await t.openCursor(...e)),!t)return;const n=new Proxy(t,S);for(C.set(n,t),u.set(n,g(t));t;)yield n,t=await(x.get(n)||t.continue()),x.delete(n)}function T(e,t){return t===Symbol.asyncIterator&&i(e,[IDBIndex,IDBObjectStore,IDBCursor])||"iterate"===t&&i(e,[IDBIndex,IDBObjectStore])}p((e=>({...e,get:(t,n,r)=>T(t,n)?_:e.get(t,n,r),has:(t,n)=>T(t,n)||e.has(t,n)})));var R=Object.freeze({__proto__:null,deleteDB:function(e,{blocked:t}={}){const n=indexedDB.deleteDatabase(e);return t&&n.addEventListener("blocked",(e=>t(e.oldVersion,e))),m(n).then((()=>{}))},openDB:function(e,t,{blocked:n,upgrade:r,blocking:s,terminated:i}={}){const o=indexedDB.open(e,t),a=m(o);return r&&o.addEventListener("upgradeneeded",(e=>{r(m(o.result),e.oldVersion,e.newVersion,m(o.transaction),e)})),n&&o.addEventListener("blocked",(e=>n(e.oldVersion,e.newVersion,e))),a.then((e=>{i&&e.addEventListener("close",(()=>i())),s&&e.addEventListener("versionchange",(e=>s(e.oldVersion,e.newVersion,e)))})).catch((()=>{})),a},unwrap:g,wrap:m});function E(e,t,n,r,s,{level:i="error",autofix:o,ruleName:a}={}){function c(n){return n>0?e.slice(t,t+n):e.slice(Math.max(t+n,0),t)}function l(n,{precedes:r}={}){const s=n.map((e=>e.trivia+e.value)).join(""),i=e[t];return"eof"===i.type?s:r?s+i.trivia:s.slice(i.trivia.length)}const u="eof"!==e[t].type?e[t].line:e.length>1?e[t-1].line:1,d=function(e){const t=e.split("\n");return t[t.length-1]}(l(c(-5),{precedes:!0})),p=c(5),h=l(p),f=d+h.split("\n")[0]+"\n"+(" ".repeat(d.length)+"^"),m="Syntax"===s?"since":"inside",g=`${s} error at line ${u}${e.name?` in ${e.name}`:""}${n&&n.name?`, ${m} \`${n.partial?"partial ":""}${function(e){const t=[e];for(;e&&e.parent;){const{parent:n}=e;t.unshift(n),e=n}return t.map((e=>function(e,t){let n=e;return t&&(n+=` ${t}`),n}(e.type,e.name))).join(" -> ")}(n)}\``:""}:\n${f}`;return{message:`${g} ${r}`,bareMessage:r,context:g,line:u,sourceName:e.name,level:i,ruleName:a,autofix:o,input:h,tokens:p}}function L(e,t,n,r){return E(e,t,n,r,"Syntax")}function A(e,t,n,r,s={}){return s.ruleName=n,E(t.source,e.index,t,r,"Validation",s)}class P{constructor({source:e,tokens:t}){Object.defineProperties(this,{source:{value:e},tokens:{value:t,writable:!0},parent:{value:null,writable:!0},this:{value:this}})}toJSON(){const e={type:void 0,name:void 0,inheritance:void 0};let t=this;for(;t!==Object.prototype;){const n=Object.getOwnPropertyDescriptors(t);for(const[t,r]of Object.entries(n))(r.enumerable||r.get)&&(e[t]=this[t]);t=Object.getPrototypeOf(t)}return e}}function N(e,t,{useNullableInner:n}={}){if(!e.union){const r=t.unique.get(e.idlType);if(!r)return;if("typedef"===r.type){const{typedefIncludesDictionary:n}=t.cache;if(n.has(r))return n.get(r);t.cache.typedefIncludesDictionary.set(r,void 0);const s=N(r.idlType,t);if(t.cache.typedefIncludesDictionary.set(r,s),s)return{reference:e,dictionary:s.dictionary}}if("dictionary"===r.type&&(n||!e.nullable))return{reference:e,dictionary:r}}for(const n of e.subtype){const e=N(n,t);if(e)return n.union?e:{reference:n,dictionary:e.dictionary}}}function I(e,t){if(t.cache.dictionaryIncludesRequiredField.has(e))return t.cache.dictionaryIncludesRequiredField.get(e);t.cache.dictionaryIncludesRequiredField.set(e,void 0);let n=e.members.some((e=>e.required));if(!n&&e.inheritance){const r=t.unique.get(e.inheritance);r?I(r,t)&&(n=!0):n=!0}return t.cache.dictionaryIncludesRequiredField.set(e,n),n}class D extends Array{constructor({source:e,tokens:t}){super(),Object.defineProperties(this,{source:{value:e},tokens:{value:t},parent:{value:null,writable:!0}})}}class O extends P{static parser(e,t){return()=>{const n=e.consumeKind(t);if(n)return new O({source:e.source,tokens:{value:n}})}}get value(){return ee(this.tokens.value.value)}write(e){return e.ts.wrap([e.token(this.tokens.value),e.token(this.tokens.separator)])}}class j extends O{static parse(e){const t=e.consumeKind("eof");if(t)return new j({source:e.source,tokens:{value:t}})}get type(){return"eof"}}function z(e,t){return te(e,{parser:O.parser(e,t),listName:t+" list"})}const M=["identifier","decimal","integer","string"],U=new Map([...["NoInterfaceObject","LenientSetter","LenientThis","TreatNonObjectAsNull","Unforgeable"].map((e=>[e,`Legacy${e}`])),["NamedConstructor","LegacyFactoryFunction"],["OverrideBuiltins","LegacyOverrideBuiltIns"],["TreatNullAs","LegacyNullToEmptyString"]]);function q(e){for(const t of M){const n=z(e,t);if(n.length)return n}e.error("Expected identifiers, strings, decimals, or integers but none found")}class W extends P{static parse(e){const t={assign:e.consume("=")},n=pe(new W({source:e.source,tokens:t}));if(n.list=[],t.assign){if(t.asterisk=e.consume("*"),t.asterisk)return n.this;t.secondaryName=e.consumeKind(...M)}return t.open=e.consume("("),t.open?(n.list=n.rhsIsList?q(e):ie(e),t.close=e.consume(")")||e.error("Unexpected token in extended attribute argument list")):t.assign&&!t.secondaryName&&e.error("No right hand side to extended attribute assignment"),n.this}get rhsIsList(){return this.tokens.assign&&!this.tokens.asterisk&&!this.tokens.secondaryName}get rhsType(){return this.rhsIsList?this.list[0].tokens.value.type+"-list":this.tokens.asterisk?"*":this.tokens.secondaryName?this.tokens.secondaryName.type:null}write(e){const{rhsType:t}=this;return e.ts.wrap([e.token(this.tokens.assign),e.token(this.tokens.asterisk),e.reference_token(this.tokens.secondaryName,this.parent),e.token(this.tokens.open),...this.list.map((n=>"identifier-list"===t?e.identifier(n,this.parent):n.write(e))),e.token(this.tokens.close)])}}class F extends P{static parse(e){const t=e.consumeKind("identifier");if(t)return new F({source:e.source,tokens:{name:t},params:W.parse(e)})}constructor({source:e,tokens:t,params:n}){super({source:e,tokens:t}),n.parent=this,Object.defineProperty(this,"params",{value:n})}get type(){return"extended-attribute"}get name(){return this.tokens.name.value}get rhs(){const{rhsType:e,tokens:t,list:n}=this.params;if(!e)return null;return{type:e,value:this.params.rhsIsList?n:this.params.tokens.secondaryName?ee(t.secondaryName.value):null}}get arguments(){const{rhsIsList:e,list:t}=this.params;return!t||e?[]:t}*validate(e){const{name:t}=this;if("LegacyNoInterfaceObject"===t){const e="`[LegacyNoInterfaceObject]` extended attribute is an undesirable feature that may be removed from Web IDL in the future. Refer to the [relevant upstream PR](https://github.com/whatwg/webidl/pull/609) for more information.";yield A(this.tokens.name,this,"no-nointerfaceobject",e,{level:"warning"})}else if(U.has(t)){const e=`\`[${t}]\` extended attribute is a legacy feature that is now renamed to \`[${U.get(t)}]\`. Refer to the [relevant upstream PR](https://github.com/whatwg/webidl/pull/870) for more information.`;yield A(this.tokens.name,this,"renamed-legacy",e,{level:"warning",autofix:(n=this,()=>{const{name:e}=n;n.tokens.name.value=U.get(e),"TreatNullAs"===e&&(n.params.tokens={})})})}var n;for(const t of this.arguments)yield*t.validate(e)}write(e){return e.ts.wrap([e.ts.trivia(this.tokens.name.trivia),e.ts.extendedAttribute(e.ts.wrap([e.ts.extendedAttributeReference(this.name),this.params.write(e)])),e.token(this.tokens.separator)])}}class B extends D{static parse(e){const t={};t.open=e.consume("[");const n=new B({source:e.source,tokens:t});return t.open?(n.push(...te(e,{parser:F.parse,listName:"extended attribute"})),t.close=e.consume("]")||e.error("Expected a closing token for the extended attribute list"),n.length||(e.unconsume(t.close.index),e.error("An extended attribute list must not be empty")),e.probe("[")&&e.error("Illegal double extended attribute lists, consider merging them"),n):n}*validate(e){for(const t of this)yield*t.validate(e)}write(e){return this.length?e.ts.wrap([e.token(this.tokens.open),...this.map((t=>t.write(e))),e.token(this.tokens.close)]):""}}function H(e,t){const n=e.consume("?");n&&(t.tokens.nullable=n),e.probe("?")&&e.error("Can't nullable more than once")}function G(e,t){let n=function(e,t){const n=e.consume("FrozenArray","ObservableArray","Promise","async_sequence","sequence","record");if(!n)return;const r=pe(new V({source:e.source,tokens:{base:n}}));switch(r.tokens.open=e.consume("<")||e.error(`No opening bracket after ${n.value}`),n.value){case"Promise":{e.probe("[")&&e.error("Promise type cannot have extended attribute");const n=ae(e,t)||e.error("Missing Promise subtype");r.subtype.push(n);break}case"async_sequence":case"sequence":case"FrozenArray":case"ObservableArray":{const s=oe(e,t)||e.error(`Missing ${n.value} subtype`);r.subtype.push(s);break}case"record":{e.probe("[")&&e.error("Record key cannot have extended attribute");const n=e.consume(...me)||e.error(`Record key must be one of: ${me.join(", ")}`),s=new V({source:e.source,tokens:{base:n}});s.tokens.separator=e.consume(",")||e.error("Missing comma after record key type"),s.type=t;const i=oe(e,t)||e.error("Error parsing generic type record");r.subtype.push(s,i);break}}return r.idlType||e.error(`Error parsing generic type ${n.value}`),r.tokens.close=e.consume(">")||e.error(`Missing closing bracket after ${n.value}`),r.this}(e,t)||se(e);if(!n){const t=e.consumeKind("identifier")||e.consume(...me,...fe);if(!t)return;n=new V({source:e.source,tokens:{base:t}}),e.probe("<")&&e.error(`Unsupported generic type ${t.value}`)}return"Promise"===n.generic&&e.probe("?")&&e.error("Promise type cannot be nullable"),n.type=t||null,H(e,n),n.nullable&&"any"===n.idlType&&e.error("Type `any` cannot be made nullable"),n}let V=class extends P{static parse(e,t){return G(e,t)||function(e,t){const n={};if(n.open=e.consume("("),!n.open)return;const r=pe(new V({source:e.source,tokens:n}));for(r.type=t||null;;){const n=oe(e,t)||e.error("No type after open parenthesis or 'or' in union type");"any"===n.idlType&&e.error("Type `any` cannot be included in a union type"),"Promise"===n.generic&&e.error("Type `Promise` cannot be included in a union type"),r.subtype.push(n);const s=e.consume("or");if(!s)break;n.tokens.separator=s}return r.idlType.length<2&&e.error("At least two types are expected in a union type but found less"),n.close=e.consume(")")||e.error("Unterminated union type"),H(e,r),r.this}(e,t)}constructor({source:e,tokens:t}){super({source:e,tokens:t}),Object.defineProperty(this,"subtype",{value:[],writable:!0}),this.extAttrs=new B({source:e,tokens:{}})}get generic(){return this.subtype.length&&this.tokens.base?this.tokens.base.value:""}get nullable(){return Boolean(this.tokens.nullable)}get union(){return Boolean(this.subtype.length)&&!this.tokens.base}get idlType(){if(this.subtype.length)return this.subtype;return ee([this.tokens.prefix,this.tokens.base,this.tokens.postfix].filter((e=>e)).map((e=>e.value)).join(" "))}*validate(e){if(yield*this.extAttrs.validate(e),"BufferSource"===this.idlType)for(const e of[this.extAttrs,this.parent?.extAttrs])for(const t of e){if("AllowShared"!==t.name)continue;const n="`[AllowShared] BufferSource` is now replaced with AllowSharedBufferSource.";yield A(this.tokens.base,this,"migrate-allowshared",n,{autofix:J(this,t,e)})}if("void"===this.idlType){const e="`void` is now replaced by `undefined`. Refer to the [relevant GitHub issue](https://github.com/whatwg/webidl/issues/60) for more information.";yield A(this.tokens.base,this,"replace-void",e,{autofix:(t=this,()=>{t.tokens.base.value="undefined"})})}var t;const n=!this.union&&e.unique.get(this.idlType),r=this.union?this:n&&"typedef"===n.type?n.idlType:void 0;if(r&&this.nullable){const{reference:t}=N(r,e)||{};if(t){const e=(this.union?t:this).tokens.base,n="Nullable union cannot include a dictionary type.";yield A(e,this,"no-nullable-union-dict",n)}}else for(const t of this.subtype)yield*t.validate(e)}write(e){return e.ts.wrap([this.extAttrs.write(e),(()=>{if(this.union||this.generic)return e.ts.wrap([e.token(this.tokens.base,e.ts.generic),e.token(this.tokens.open),...this.subtype.map((t=>t.write(e))),e.token(this.tokens.close)]);const t=this.tokens.prefix||this.tokens.base,n=this.tokens.prefix?[this.tokens.prefix.value,e.ts.trivia(this.tokens.base.trivia)]:[],r=e.reference(e.ts.wrap([...n,this.tokens.base.value,e.token(this.tokens.postfix)]),{unescaped:this.idlType,context:this});return e.ts.wrap([e.ts.trivia(t.trivia),r])})(),e.token(this.tokens.nullable),e.token(this.tokens.separator)])}};function J(e,t,n){return()=>{const r=n.indexOf(t);n.splice(r,1),!n.length&&e.tokens.base.trivia.match(/^\s$/)&&(e.tokens.base.trivia=""),e.tokens.base.value="AllowSharedBufferSource"}}class K extends P{static parse(e){const t=e.consume("=");if(!t)return null;const n=ne(e)||e.consumeKind("string")||e.consume("null","[","{")||e.error("No value for default"),r=[n];if("["===n.value){const t=e.consume("]")||e.error("Default sequence value must be empty");r.push(t)}else if("{"===n.value){const t=e.consume("}")||e.error("Default dictionary value must be empty");r.push(t)}return new K({source:e.source,tokens:{assign:t},expression:r})}constructor({source:e,tokens:t,expression:n}){super({source:e,tokens:t}),n.parent=this,Object.defineProperty(this,"expression",{value:n})}get type(){return re(this.expression[0]).type}get value(){return re(this.expression[0]).value}get negative(){return re(this.expression[0]).negative}write(e){return e.ts.wrap([e.token(this.tokens.assign),...this.expression.map((t=>e.token(t)))])}}class Z extends P{static parse(e){const t=e.position,n={},r=pe(new Z({source:e.source,tokens:n}));return r.extAttrs=B.parse(e),n.optional=e.consume("optional"),r.idlType=oe(e,"argument-type"),r.idlType?(n.optional||(n.variadic=e.consume("...")),n.name=e.consumeKind("identifier")||e.consume(...ge),n.name?(r.default=n.optional?K.parse(e):null,r.this):e.unconsume(t)):e.unconsume(t)}get type(){return"argument"}get optional(){return!!this.tokens.optional}get variadic(){return!!this.tokens.variadic}get name(){return ee(this.tokens.name.value)}*validate(e){yield*this.extAttrs.validate(e),yield*this.idlType.validate(e);const t=N(this.idlType,e,{useNullableInner:!0});if(t)if(this.idlType.nullable){const e="Dictionary arguments cannot be nullable.";yield A(this.tokens.name,this,"no-nullable-dict-arg",e)}else if(this.optional){if(!this.default){const e="Optional dictionary arguments must have a default value of `{}`.";yield A(this.tokens.name,this,"dict-arg-default",e,{autofix:Y(this)})}}else if(this.parent&&!I(t.dictionary,e)&&function(e){const t=e.parent.arguments||e.parent.list,n=t.indexOf(e),r=t.slice(n+1).some((e=>!e.optional));return!r}(this)){const e="Dictionary argument must be optional if it has no required fields";yield A(this.tokens.name,this,"dict-arg-optional",e,{autofix:(n=this,()=>{const e=de(n.idlType);n.tokens.optional={...e,type:"optional",value:"optional"},e.trivia=" ",Y(n)()})})}var n}write(e){return e.ts.wrap([this.extAttrs.write(e),e.token(this.tokens.optional),e.ts.type(this.idlType.write(e)),e.token(this.tokens.variadic),e.name_token(this.tokens.name,{data:this}),this.default?this.default.write(e):"",e.token(this.tokens.separator)])}}function Y(e){return()=>{e.default=K.parse(new ve(" = {}"))}}class X extends P{static parse(e,{special:t,regular:n}={}){const r={special:t},s=pe(new X({source:e.source,tokens:r}));return t&&"stringifier"===t.value&&(r.termination=e.consume(";"),r.termination)?(s.arguments=[],s):(t||n||(r.special=e.consume("getter","setter","deleter")),s.idlType=ae(e)||e.error("Missing return type"),r.name=e.consumeKind("identifier")||e.consume("includes"),r.open=e.consume("(")||e.error("Invalid operation"),s.arguments=ie(e),r.close=e.consume(")")||e.error("Unterminated operation"),r.termination=e.consume(";")||e.error("Unterminated operation, expected `;`"),s.this)}get type(){return"operation"}get name(){const{name:e}=this.tokens;return e?ee(e.value):""}get special(){return this.tokens.special?this.tokens.special.value:""}*validate(e){if(yield*this.extAttrs.validate(e),!this.name&&["","static"].includes(this.special)){const e="Regular or static operations must have both a return type and an identifier.";yield A(this.tokens.open,this,"incomplete-op",e)}if(this.idlType){if("async_sequence"===this.idlType.generic){const e="async_sequence types cannot be returned by an operation.";yield A(this.idlType.tokens.base,this,"async-sequence-idl-to-js",e)}yield*this.idlType.validate(e)}for(const t of this.arguments)yield*t.validate(e)}write(e){const{parent:t}=this,n=this.idlType?[e.ts.type(this.idlType.write(e)),e.name_token(this.tokens.name,{data:this,parent:t}),e.token(this.tokens.open),e.ts.wrap(this.arguments.map((t=>t.write(e)))),e.token(this.tokens.close)]:[];return e.ts.definition(e.ts.wrap([this.extAttrs.write(e),this.tokens.name?e.token(this.tokens.special):e.token(this.tokens.special,e.ts.nameless,{data:this,parent:t}),...n,e.token(this.tokens.termination)]),{data:this,parent:t})}}class Q extends P{static parse(e,{special:t,noInherit:n=!1,readonly:r=!1}={}){const s=e.position,i={special:t},o=pe(new Q({source:e.source,tokens:i}));if(t||n||(i.special=e.consume("inherit")),"inherit"===o.special&&e.probe("readonly")&&e.error("Inherited attributes cannot be read-only"),i.readonly=e.consume("readonly"),r&&!i.readonly&&e.probe("attribute")&&e.error("Attributes must be readonly in this context"),i.base=e.consume("attribute"),i.base)return o.idlType=oe(e,"attribute-type")||e.error("Attribute lacks a type"),i.name=e.consumeKind("identifier")||e.consume("async","required")||e.error("Attribute lacks a name"),i.termination=e.consume(";")||e.error("Unterminated attribute, expected `;`"),o.this;e.unconsume(s)}get type(){return"attribute"}get special(){return this.tokens.special?this.tokens.special.value:""}get readonly(){return!!this.tokens.readonly}get name(){return ee(this.tokens.name.value)}*validate(e){if(yield*this.extAttrs.validate(e),yield*this.idlType.validate(e),["async_sequence","sequence","record"].includes(this.idlType.generic)){const e=`Attributes cannot accept ${this.idlType.generic} types.`;yield A(this.tokens.name,this,"attr-invalid-type",e)}{const{reference:t}=N(this.idlType,e)||{};if(t){const e=(this.idlType.union?t:this.idlType).tokens.base,n="Attributes cannot accept dictionary types.";yield A(e,this,"attr-invalid-type",n)}}if(this.readonly&&function(e,t){if(e.union)return!1;if(e.extAttrs.some((e=>"EnforceRange"===e.name)))return!0;const n=t.unique.get(e.idlType);return"typedef"===n?.type&&n.idlType.extAttrs.some((e=>"EnforceRange"===e.name))}(this.idlType,e)){const e=this.idlType.tokens.base,t="Readonly attributes cannot accept [EnforceRange] extended attribute.";yield A(e,this,"attr-invalid-type",t)}}write(e){const{parent:t}=this;return e.ts.definition(e.ts.wrap([this.extAttrs.write(e),e.token(this.tokens.special),e.token(this.tokens.readonly),e.token(this.tokens.base),e.ts.type(this.idlType.write(e)),e.name_token(this.tokens.name,{data:this,parent:t}),e.token(this.tokens.termination)]),{data:this,parent:t})}}function ee(e){return e.startsWith("_")?e.slice(1):e}function te(e,{parser:t,allowDangler:n,listName:r="list"}){const s=t(e);if(!s)return[];s.tokens.separator=e.consume(",");const i=[s];for(;s.tokens.separator;){const s=t(e);if(!s){n||e.error(`Trailing comma in ${r}`);break}if(s.tokens.separator=e.consume(","),i.push(s),!s.tokens.separator)break}return i}function ne(e){return e.consumeKind("decimal","integer")||e.consume("true","false","Infinity","-Infinity","NaN")}function re({type:e,value:t}){switch(e){case"decimal":case"integer":return{type:"number",value:t};case"string":return{type:"string",value:t.slice(1,-1)}}switch(t){case"true":case"false":return{type:"boolean",value:"true"===t};case"Infinity":case"-Infinity":return{type:"Infinity",negative:t.startsWith("-")};case"[":return{type:"sequence",value:[]};case"{":return{type:"dictionary"};default:return{type:t}}}function se(e){const{source:t}=e,n=function(){const n=e.consume("unsigned"),r=e.consume("short","long");if(r){const s=e.consume("long");return new V({source:t,tokens:{prefix:n,base:r,postfix:s}})}n&&e.error("Failed to parse integer type")}()||function(){const n=e.consume("unrestricted"),r=e.consume("float","double");if(r)return new V({source:t,tokens:{prefix:n,base:r}});n&&e.error("Failed to parse float type")}();if(n)return n;const r=e.consume("bigint","boolean","byte","octet","undefined");return r?new V({source:t,tokens:{base:r}}):void 0}function ie(e){return te(e,{parser:Z.parse,listName:"arguments list"})}function oe(e,t){const n=B.parse(e),r=V.parse(e,t);return r&&(pe(r).extAttrs=n),r}function ae(e,t){const n=V.parse(e,t||"return-type");if(n)return n;const r=e.consume("void");if(r){const t=new V({source:e.source,tokens:{base:r}});return t.type="return-type",t}}function ce(e){const t=e.consume("stringifier");if(!t)return;return Q.parse(e,{special:t})||X.parse(e,{special:t})||e.error("Unterminated stringifier")}function le(e){const t=e.split("\n");if(t.length){const e=t[t.length-1].match(/^\s+/);if(e)return e[0]}return""}function ue(e){return()=>{if(e.extAttrs.length){const t=new ve("Exposed=Window,"),n=F.parse(t);n.tokens.separator=t.consume(",");const r=e.extAttrs[0];/^\s/.test(r.tokens.name.trivia)||(r.tokens.name.trivia=` ${r.tokens.name.trivia}`),e.extAttrs.unshift(n)}else{pe(e).extAttrs=B.parse(new ve("[Exposed=Window]"));const t=e.tokens.base.trivia;e.extAttrs.tokens.open.trivia=t,e.tokens.base.trivia=`\n${le(t)}`}}}function de(e){if(e.extAttrs.length)return e.extAttrs.tokens.open;if("operation"===e.type&&!e.special)return de(e.idlType);const t=Object.values(e.tokens).sort(((e,t)=>e.index-t.index));return t[0]}function pe(e,t){if(t||(t=e),!e)return e;return new Proxy(e,{get(e,t){const n=e[t];return Array.isArray(n)&&"source"!==t?pe(n,e):n},set(e,n,r){if(e[n]=r,!r)return!0;if(Array.isArray(r))for(const e of r)void 0!==e.parent&&(e.parent=t);else void 0!==r.parent&&(r.parent=t);return!0}})}const he={decimal:/-?(?=[0-9]*\.|[0-9]+[eE])(([0-9]+\.[0-9]*|[0-9]*\.[0-9]+)([Ee][-+]?[0-9]+)?|[0-9]+[Ee][-+]?[0-9]+)/y,integer:/-?(0([Xx][0-9A-Fa-f]+|[0-7]*)|[1-9][0-9]*)/y,identifier:/[_-]?[A-Za-z][0-9A-Z_a-z-]*/y,string:/"[^"]*"/y,whitespace:/[\t\n\r ]+/y,comment:/\/\/.*|\/\*[\s\S]*?\*\//y,other:/[^\t\n\r 0-9A-Za-z]/y},fe=["ArrayBuffer","SharedArrayBuffer","DataView","Int8Array","Int16Array","Int32Array","Uint8Array","Uint16Array","Uint32Array","Uint8ClampedArray","BigInt64Array","BigUint64Array","Float16Array","Float32Array","Float64Array","any","object","symbol"],me=["ByteString","DOMString","USVString"],ge=["async","attribute","callback","const","constructor","deleter","dictionary","enum","getter","includes","inherit","interface","iterable","maplike","namespace","partial","required","setlike","setter","static","stringifier","typedef","unrestricted"],be=["-Infinity","FrozenArray","Infinity","NaN","ObservableArray","Promise","async_iterable","async_sequence","bigint","boolean","byte","double","false","float","long","mixin","null","octet","optional","or","readonly","record","sequence","short","true","undefined","unsigned","void"].concat(ge,me,fe),ye=["(",")",",","...",":",";","<","=",">","?","*","[","]","{","}"],we=["_constructor","toString","_toString"];class ve{constructor(e){this.source=function(e){const t=[];let n=0,r="",s=1,i=0;for(;n<e.length;){const a=e.charAt(n);let c=-1;if(/[\t\n\r ]/.test(a)?c=o("whitespace",{noFlushTrivia:!0}):"/"===a&&(c=o("comment",{noFlushTrivia:!0})),-1!==c){const e=t.pop().value;s+=(e.match(/\n/g)||[]).length,r+=e,i-=1}else if(/[-0-9.A-Z_a-z]/.test(a)){if(c=o("decimal"),-1===c&&(c=o("integer")),-1===c){c=o("identifier");const e=t.length-1,n=t[e];if(-1!==c){if(we.includes(n.value)){const r=`${ee(n.value)} is a reserved identifier and must not be used.`;throw new ke(L(t,e,null,r))}be.includes(n.value)&&(n.type="inline")}}}else'"'===a&&(c=o("string"));for(const o of ye)if(e.startsWith(o,n)){t.push({type:"inline",value:o,trivia:r,line:s,index:i}),r="",n+=o.length,c=n;break}if(-1===c&&(c=o("other")),-1===c)throw new Error("Token stream not progressing");n=c,i+=1}return t.push({type:"eof",value:"",trivia:r,line:s,index:i}),t;function o(o,{noFlushTrivia:a}={}){const c=he[o];c.lastIndex=n;const l=c.exec(e);return l?(t.push({type:o,value:l[0],trivia:r,line:s,index:i}),a||(r=""),c.lastIndex):-1}}(e),this.position=0}error(e){throw new ke(L(this.source,this.position,this.current,e))}probeKind(e){return this.source.length>this.position&&this.source[this.position].type===e}probe(e){return this.probeKind("inline")&&this.source[this.position].value===e}consumeKind(...e){for(const t of e){if(!this.probeKind(t))continue;const e=this.source[this.position];return this.position++,e}}consume(...e){if(!this.probeKind("inline"))return;const t=this.source[this.position];for(const n of e)if(t.value===n)return this.position++,t}consumeIdentifier(e){if(this.probeKind("identifier")&&this.source[this.position].value===e)return this.consumeKind("identifier")}unconsume(e){this.position=e}}class ke extends Error{constructor({message:e,bareMessage:t,context:n,line:r,sourceName:s,input:i,tokens:o}){super(e),this.name="WebIDLParseError",this.bareMessage=t,this.context=n,this.line=r,this.sourceName=s,this.input=i,this.tokens=o}}class $e extends O{static parse(e){const t=e.consumeKind("string");if(t)return new $e({source:e.source,tokens:{value:t}})}get type(){return"enum-value"}get value(){return super.value.slice(1,-1)}write(e){const{parent:t}=this;return e.ts.wrap([e.ts.trivia(this.tokens.value.trivia),e.ts.definition(e.ts.wrap(['"',e.ts.name(this.value,{data:this,parent:t}),'"']),{data:this,parent:t}),e.token(this.tokens.separator)])}}class xe extends P{static parse(e){const t={};if(t.base=e.consume("enum"),!t.base)return;t.name=e.consumeKind("identifier")||e.error("No name for enum");const n=pe(new xe({source:e.source,tokens:t}));return e.current=n.this,t.open=e.consume("{")||e.error("Bodyless enum"),n.values=te(e,{parser:$e.parse,allowDangler:!0,listName:"enumeration"}),e.probeKind("string")&&e.error("No comma between enum values"),t.close=e.consume("}")||e.error("Unexpected value in enum"),n.values.length||e.error("No value in enum"),t.termination=e.consume(";")||e.error("No semicolon after enum"),n.this}get type(){return"enum"}get name(){return ee(this.tokens.name.value)}write(e){return e.ts.definition(e.ts.wrap([this.extAttrs.write(e),e.token(this.tokens.base),e.name_token(this.tokens.name,{data:this}),e.token(this.tokens.open),e.ts.wrap(this.values.map((t=>t.write(e)))),e.token(this.tokens.close),e.token(this.tokens.termination)]),{data:this})}}class Ce extends P{static parse(e){const t=e.consumeKind("identifier");if(!t)return;const n={target:t};if(n.includes=e.consume("includes"),n.includes)return n.mixin=e.consumeKind("identifier")||e.error("Incomplete includes statement"),n.termination=e.consume(";")||e.error("No terminating ; for includes statement"),new Ce({source:e.source,tokens:n});e.unconsume(t.index)}get type(){return"includes"}get target(){return ee(this.tokens.target.value)}get includes(){return ee(this.tokens.mixin.value)}write(e){return e.ts.definition(e.ts.wrap([this.extAttrs.write(e),e.reference_token(this.tokens.target,this),e.token(this.tokens.includes),e.reference_token(this.tokens.mixin,this),e.token(this.tokens.termination)]),{data:this})}}class Se extends P{static parse(e){const t={},n=pe(new Se({source:e.source,tokens:t}));if(t.base=e.consume("typedef"),t.base)return n.idlType=oe(e,"typedef-type")||e.error("Typedef lacks a type"),t.name=e.consumeKind("identifier")||e.error("Typedef lacks a name"),e.current=n.this,t.termination=e.consume(";")||e.error("Unterminated typedef, expected `;`"),n.this}get type(){return"typedef"}get name(){return ee(this.tokens.name.value)}*validate(e){yield*this.idlType.validate(e)}write(e){return e.ts.definition(e.ts.wrap([this.extAttrs.write(e),e.token(this.tokens.base),e.ts.type(this.idlType.write(e)),e.name_token(this.tokens.name,{data:this}),e.token(this.tokens.termination)]),{data:this})}}class _e extends P{static parse(e,t){const n={base:t},r=pe(new _e({source:e.source,tokens:n}));return n.name=e.consumeKind("identifier")||e.error("Callback lacks a name"),e.current=r.this,n.assign=e.consume("=")||e.error("Callback lacks an assignment"),r.idlType=ae(e)||e.error("Callback lacks a return type"),n.open=e.consume("(")||e.error("Callback lacks parentheses for arguments"),r.arguments=ie(e),n.close=e.consume(")")||e.error("Unterminated callback"),n.termination=e.consume(";")||e.error("Unterminated callback, expected `;`"),r.this}get type(){return"callback"}get name(){return ee(this.tokens.name.value)}*validate(e){yield*this.extAttrs.validate(e);for(const t of this.arguments)if(yield*t.validate(e),"async_sequence"===t.idlType.generic){const e="async_sequence types cannot be returned as a callback argument.";yield A(t.tokens.name,t,"async-sequence-idl-to-js",e)}yield*this.idlType.validate(e)}write(e){return e.ts.definition(e.ts.wrap([this.extAttrs.write(e),e.token(this.tokens.base),e.name_token(this.tokens.name,{data:this}),e.token(this.tokens.assign),e.ts.type(this.idlType.write(e)),e.token(this.tokens.open),...this.arguments.map((t=>t.write(e))),e.token(this.tokens.close),e.token(this.tokens.termination)]),{data:this})}}class Te extends P{static parse(e,t,{inheritable:n,allowedMembers:r}){const{tokens:s,type:i}=t;for(s.name=e.consumeKind("identifier")||e.error(`Missing name in ${i}`),e.current=t,t=pe(t),n&&Object.assign(s,function(e){const t=e.consume(":");return t?{colon:t,inheritance:e.consumeKind("identifier")||e.error("Inheritance lacks a type")}:{}}(e)),s.open=e.consume("{")||e.error(`Bodyless ${i}`),t.members=[];;){if(s.close=e.consume("}"),s.close)return s.termination=e.consume(";")||e.error(`Missing semicolon after ${i}`),t.this;const n=B.parse(e);let o;for(const[t,...n]of r)if(o=pe(t(e,...n)),o)break;o||e.error("Unknown member"),o.extAttrs=n,t.members.push(o.this)}}get partial(){return!!this.tokens.partial}get name(){return ee(this.tokens.name.value)}get inheritance(){return this.tokens.inheritance?ee(this.tokens.inheritance.value):null}*validate(e){for(const t of this.members)t.validate&&(yield*t.validate(e))}write(e){return e.ts.definition(e.ts.wrap([this.extAttrs.write(e),e.token(this.tokens.callback),e.token(this.tokens.partial),e.token(this.tokens.base),e.token(this.tokens.mixin),e.name_token(this.tokens.name,{data:this}),(()=>this.tokens.inheritance?e.ts.wrap([e.token(this.tokens.colon),e.ts.trivia(this.tokens.inheritance.trivia),e.ts.inheritance(e.reference(this.tokens.inheritance.value,{context:this}))]):"")(),e.token(this.tokens.open),e.ts.wrap(this.members.map((t=>t.write(e)))),e.token(this.tokens.close),e.token(this.tokens.termination)]),{data:this})}}class Re extends P{static parse(e){const t={};if(t.base=e.consume("const"),!t.base)return;let n=se(e);if(!n){const t=e.consumeKind("identifier")||e.error("Const lacks a type");n=new V({source:e.source,tokens:{base:t}})}e.probe("?")&&e.error("Unexpected nullable constant type"),n.type="const-type",t.name=e.consumeKind("identifier")||e.error("Const lacks a name"),t.assign=e.consume("=")||e.error("Const lacks value assignment"),t.value=ne(e)||e.error("Const lacks a value"),t.termination=e.consume(";")||e.error("Unterminated const, expected `;`");const r=new Re({source:e.source,tokens:t});return pe(r).idlType=n,r}get type(){return"const"}get name(){return ee(this.tokens.name.value)}get value(){return re(this.tokens.value)}write(e){const{parent:t}=this;return e.ts.definition(e.ts.wrap([this.extAttrs.write(e),e.token(this.tokens.base),e.ts.type(this.idlType.write(e)),e.name_token(this.tokens.name,{data:this,parent:t}),e.token(this.tokens.assign),e.token(this.tokens.value),e.token(this.tokens.termination)]),{data:this,parent:t})}}class Ee extends P{static parse(e){const t=e.position,n=pe(new Ee({source:e.source,tokens:{}})),{tokens:r}=n;if(r.readonly=e.consume("readonly"),r.readonly||(r.async=e.consume("async")),r.base=r.readonly?e.consume("maplike","setlike"):r.async?e.consume("iterable"):e.consume("iterable","async_iterable","maplike","setlike"),!r.base)return void e.unconsume(t);const{type:s}=n,i="maplike"===s,o=i||"iterable"===s||"async_iterable"===s,a="async_iterable"===s||n.async&&"iterable"===s;r.open=e.consume("<")||e.error(`Missing less-than sign \`<\` in ${s} declaration`);const c=oe(e)||e.error(`Missing a type argument in ${s} declaration`);return n.idlType=[c],n.arguments=[],o&&(c.tokens.separator=e.consume(","),c.tokens.separator?n.idlType.push(oe(e)):i&&e.error(`Missing second type argument in ${s} declaration`)),r.close=e.consume(">")||e.error(`Missing greater-than sign \`>\` in ${s} declaration`),e.probe("(")&&(a?(r.argsOpen=e.consume("("),n.arguments.push(...ie(e)),r.argsClose=e.consume(")")||e.error("Unterminated async iterable argument list")):e.error("Arguments are only allowed for `async iterable`")),r.termination=e.consume(";")||e.error(`Missing semicolon after ${s} declaration`),n.this}get type(){return this.tokens.base.value}get readonly(){return!!this.tokens.readonly}get async(){return!!this.tokens.async}*validate(e){if(this.async&&"iterable"===this.type){const e="`async iterable` is now changed to `async_iterable`.";yield A(this.tokens.async,this,"obsolete-async-iterable-syntax",e,{autofix:(t=this,()=>{const e=t.tokens.async;t.tokens.base={...e,type:"async_iterable",value:"async_iterable"},delete t.tokens.async})})}var t;for(const t of this.idlType)yield*t.validate(e);for(const t of this.arguments)yield*t.validate(e)}write(e){return e.ts.definition(e.ts.wrap([this.extAttrs.write(e),e.token(this.tokens.readonly),e.token(this.tokens.async),e.token(this.tokens.base,e.ts.generic),e.token(this.tokens.open),e.ts.wrap(this.idlType.map((t=>t.write(e)))),e.token(this.tokens.close),e.token(this.tokens.argsOpen),e.ts.wrap(this.arguments.map((t=>t.write(e)))),e.token(this.tokens.argsClose),e.token(this.tokens.termination)]),{data:this,parent:this.parent})}}class Le extends P{static parse(e){const t=e.consume("constructor");if(!t)return;const n={base:t};n.open=e.consume("(")||e.error("No argument list in constructor");const r=ie(e);n.close=e.consume(")")||e.error("Unterminated constructor"),n.termination=e.consume(";")||e.error("No semicolon after constructor");const s=new Le({source:e.source,tokens:n});return pe(s).arguments=r,s}get type(){return"constructor"}*validate(e){for(const t of this.arguments)yield*t.validate(e)}write(e){const{parent:t}=this;return e.ts.definition(e.ts.wrap([this.extAttrs.write(e),e.token(this.tokens.base,e.ts.nameless,{data:this,parent:t}),e.token(this.tokens.open),e.ts.wrap(this.arguments.map((t=>t.write(e)))),e.token(this.tokens.close),e.token(this.tokens.termination)]),{data:this,parent:t})}}function Ae(e){const t=e.consume("static");if(!t)return;return Q.parse(e,{special:t})||X.parse(e,{special:t})||e.error("No body in static member")}class Pe extends Te{static parse(e,t,{extMembers:n=[],partial:r=null}={}){const s={partial:r,base:t};return Te.parse(e,new Pe({source:e.source,tokens:s}),{inheritable:!r,allowedMembers:[...n,[Re.parse],[Le.parse],[Ae],[ce],[Ee.parse],[Q.parse],[X.parse]]})}get type(){return"interface"}*validate(e){if(yield*this.extAttrs.validate(e),!this.partial&&this.extAttrs.every((e=>"Exposed"!==e.name))){const e="Interfaces must have `[Exposed]` extended attribute. To fix, add, for example, `[Exposed=Window]`. Please also consider carefully if your interface should also be exposed in a Worker scope. Refer to the [WebIDL spec section on Exposed](https://heycam.github.io/webidl/#Exposed) for more information.";yield A(this.tokens.name,this,"require-exposed",e,{autofix:ue(this)})}const t=this.extAttrs.filter((e=>"Constructor"===e.name));for(const e of t){const t="Constructors should now be represented as a `constructor()` operation on the interface instead of `[Constructor]` extended attribute. Refer to the [WebIDL spec section on constructor operations](https://heycam.github.io/webidl/#idl-constructors) for more information.";yield A(e.tokens.name,this,"constructor-member",t,{autofix:Ne(this,e)})}if(this.extAttrs.some((e=>"Global"===e.name))){const e=this.extAttrs.filter((e=>"LegacyFactoryFunction"===e.name));for(const t of e){const e="Interfaces marked as `[Global]` cannot have factory functions.";yield A(t.tokens.name,this,"no-constructible-global",e)}const t=this.members.filter((e=>"constructor"===e.type));for(const e of t){const t="Interfaces marked as `[Global]` cannot have constructors.";yield A(e.tokens.base,this,"no-constructible-global",t)}}yield*super.validate(e),this.partial||(yield*function*(e,t){const n=function(e){const t=o(e);return{statics:new Set(t.filter((e=>"static"===e.special)).map((e=>e.name))),nonstatics:new Set(t.filter((e=>"static"!==e.special)).map((e=>e.name)))}}(t),r=e.partials.get(t.name)||[],s=e.mixinMap.get(t.name)||[];for(const e of[...r,...s]){const r=o(e),s=r.filter((e=>"static"===e.special)),a=r.filter((e=>"static"!==e.special));yield*i(s,n.statics,e,t),yield*i(a,n.nonstatics,e,t),s.forEach((e=>n.statics.add(e.name))),a.forEach((e=>n.nonstatics.add(e.name)))}function*i(e,t,n,r){for(const s of e){const{name:e}=s;if(e&&t.has(e)){const t=`The ${"static"===s.special?"static ":""}operation "${e}" has already been defined for the base interface "${r.name}" either in itself or in a mixin`;yield A(s.tokens.name,n,"no-cross-overload",t)}}}function o(e){return e.members.filter((({type:e})=>"operation"===e))}}(e,this))}}function Ne(e,t){return e=pe(e),()=>{const n=le(e.extAttrs.tokens.open.trivia),r=e.members.length?le(de(e.members[0]).trivia):function(e){const t=le(e),n=t.includes("\t")?"\t":" ";return t+n}(n),s=Le.parse(new ve(`\n${r}constructor();`));s.extAttrs=new B({source:e.source,tokens:{}}),pe(s).arguments=t.arguments;const i=function(e,t){const n=e.slice().reverse().findIndex(t);return-1===n?n:e.length-n-1}(e.members,(e=>"constructor"===e.type));e.members.splice(i+1,0,s);const{close:o}=e.tokens;o.trivia.includes("\n")||(o.trivia+=`\n${n}`);const{extAttrs:a}=e,c=a.indexOf(t),l=a.splice(c,1);a.length?a.length===c?a[c-1].tokens.separator=void 0:a[c].tokens.name.trivia.trim()||(a[c].tokens.name.trivia=l[0].tokens.name.trivia):a.tokens.open=a.tokens.close=void 0}}class Ie extends Te{static parse(e,t,{extMembers:n=[],partial:r}={}){const s={partial:r,base:t};if(s.mixin=e.consume("mixin"),s.mixin)return Te.parse(e,new Ie({source:e.source,tokens:s}),{allowedMembers:[...n,[Re.parse],[ce],[Q.parse,{noInherit:!0}],[X.parse,{regular:!0}]]})}get type(){return"interface mixin"}}class De extends P{static parse(e){const t={},n=pe(new De({source:e.source,tokens:t}));return n.extAttrs=B.parse(e),t.required=e.consume("required"),n.idlType=oe(e,"dictionary-type")||e.error("Dictionary member lacks a type"),t.name=e.consumeKind("identifier")||e.error("Dictionary member lacks a name"),n.default=K.parse(e),t.required&&n.default&&e.error("Required member must not have a default"),t.termination=e.consume(";")||e.error("Unterminated dictionary member, expected `;`"),n.this}get type(){return"field"}get name(){return ee(this.tokens.name.value)}get required(){return!!this.tokens.required}*validate(e){yield*this.idlType.validate(e)}write(e){const{parent:t}=this;return e.ts.definition(e.ts.wrap([this.extAttrs.write(e),e.token(this.tokens.required),e.ts.type(this.idlType.write(e)),e.name_token(this.tokens.name,{data:this,parent:t}),this.default?this.default.write(e):"",e.token(this.tokens.termination)]),{data:this,parent:t})}}class Oe extends Te{static parse(e,{extMembers:t=[],partial:n}={}){const r={partial:n};if(r.base=e.consume("dictionary"),r.base)return Te.parse(e,new Oe({source:e.source,tokens:r}),{inheritable:!n,allowedMembers:[...t,[De.parse]]})}get type(){return"dictionary"}}class je extends Te{static parse(e,{extMembers:t=[],partial:n}={}){const r={partial:n};if(r.base=e.consume("namespace"),r.base)return Te.parse(e,new je({source:e.source,tokens:r}),{allowedMembers:[...t,[Q.parse,{noInherit:!0,readonly:!0}],[Re.parse],[X.parse,{regular:!0}]]})}get type(){return"namespace"}*validate(e){if(!this.partial&&this.extAttrs.every((e=>"Exposed"!==e.name))){const e="Namespaces must have [Exposed] extended attribute. To fix, add, for example, [Exposed=Window]. Please also consider carefully if your namespace should also be exposed in a Worker scope. Refer to the [WebIDL spec section on Exposed](https://heycam.github.io/webidl/#Exposed) for more information.";yield A(this.tokens.name,this,"require-exposed",e,{autofix:ue(this)})}yield*super.validate(e)}}class ze extends Te{static parse(e,t,{extMembers:n=[]}={}){const r={callback:t};if(r.base=e.consume("interface"),r.base)return Te.parse(e,new ze({source:e.source,tokens:r}),{allowedMembers:[...n,[Re.parse],[X.parse,{regular:!0}]]})}get type(){return"callback interface"}}function Me(e,t){const n=e.source;function r(t){e.error(t)}function s(...t){return e.consume(...t)}function i(n){const i=s("interface");if(i)return Ie.parse(e,i,{...n,...t?.extensions?.mixin})||Pe.parse(e,i,{...n,...t?.extensions?.interface})||r("Interface has no proper body")}function o(){if(t.productions)for(const n of t.productions){const t=n(e);if(t)return t}return function(){const n=s("callback");if(n)return e.probe("interface")?ze.parse(e,n,{...t?.extensions?.callbackInterface}):_e.parse(e,n)}()||i()||function(){const n=s("partial");if(n)return Oe.parse(e,{partial:n,...t?.extensions?.dictionary})||i({partial:n})||je.parse(e,{partial:n,...t?.extensions?.namespace})||r("Partial doesn't apply to anything")}()||Oe.parse(e,t?.extensions?.dictionary)||xe.parse(e)||Se.parse(e)||Ce.parse(e)||je.parse(e,t?.extensions?.namespace)}const a=function(){if(!n.length)return[];const s=[];for(;;){const t=B.parse(e),n=o();if(!n){t.length&&r("Stray extended attributes");break}pe(n).extAttrs=t,s.push(n)}const i=j.parse(e);return t.concrete&&s.push(i),s}();return e.position<n.length&&r("Unrecognised tokens"),a}function Ue(e){return e}const qe={wrap:e=>e.join(""),trivia:Ue,name:Ue,reference:Ue,type:Ue,generic:Ue,nameless:Ue,inheritance:Ue,definition:Ue,extendedAttribute:Ue,extendedAttributeReference:Ue};class We{constructor(e){this.ts=Object.assign({},qe,e)}reference(e,{unescaped:t,context:n}){return t||(t=e.startsWith("_")?e.slice(1):e),this.ts.reference(e,t,n)}token(e,t=Ue,...n){if(!e)return"";const r=t(e.value,...n);return this.ts.wrap([this.ts.trivia(e.trivia),r])}reference_token(e,t){return this.token(e,this.reference.bind(this),{context:t})}name_token(e,t){return this.token(e,this.ts.name,t)}identifier(e,t){return this.ts.wrap([this.reference_token(e.tokens.value,t),this.token(e.tokens.separator)])}}function Fe(e,t){const n=new Map,r=e.filter((e=>"includes"===e.type));for(const e of r){const r=t.get(e.includes);if(!r)continue;const s=n.get(e.target);s?s.push(r):n.set(e.target,[r])}return n}function*Be(e){const t=function(e){const t=new Map,n=new Set,r=new Map;for(const s of e)if(s.partial){const e=r.get(s.name);e?e.push(s):r.set(s.name,[s])}else s.name&&(t.has(s.name)?n.add(s):t.set(s.name,s));return{all:e,unique:t,partials:r,duplicates:n,mixinMap:Fe(e,t),cache:{typedefIncludesDictionary:new WeakMap,dictionaryIncludesRequiredField:new WeakMap}}}(e);for(const e of t.all)e.validate&&(yield*e.validate(t));yield*function*({unique:e,duplicates:t}){for(const n of t){const{name:t}=n,r=`The name "${t}" of type "${e.get(t).type}" was already seen`;yield A(n.tokens.name,n,"no-duplicate",r)}}(t)}var He,Ge=Object.freeze({__proto__:null,WebIDLParseError:ke,parse:function(e,t={}){const n=new ve(e);return void 0!==t.sourceName&&(n.source.name=t.sourceName),Me(n,t)},validate:function(e){return[...Be((t=e,t.flat?t.flat():[].concat(...t)))];var t},write:function(e,{templates:t=qe}={}){t=Object.assign({},qe,t);const n=new We(t);return t.wrap(e.map((e=>e.write(n))))}});!function(e){e.ILLEGAL="ILLEGAL",e.EOF="EOF",e.NL="\n",e.SPACE=" ",e.UNDERSCORE="_",e.DOLLAR="$",e.ATSIGN="@",e.CARET="^",e.HASH="#",e.TILDE="~",e.AMPERSAND="&",e.IDENT="IDENT",e.COMMENT="COMMENT",e.STRING="STRING",e.NUMBER="NUMBER",e.FLOAT="FLOAT",e.CTLOP="CTLOP",e.BYTES="BYTES",e.HEX="HEX",e.BASE64="BASE64",e.ASSIGN="=",e.ARROWMAP="=>",e.TCHOICE="/",e.GCHOICE="//",e.TCHOICEALT="/=",e.GCHOICEALT="//=",e.PLUS="+",e.MINUS="-",e.QUEST="?",e.ASTERISK="*",e.INCLRANGE="..",e.EXCLRANGE="...",e.COMMA=",",e.DOT=".",e.COLON=":",e.SEMICOLON=";",e.LPAREN="(",e.RPAREN=")",e.LBRACE="{",e.RBRACE="}",e.LBRACK="[",e.RBRACK="]",e.LT="<",e.GT=">",e.QUOT='"'}(He||(He={}));const Ve=Object.entries(He).reduce(((e,[t,n])=>(e[n]=t,e)),{});class Je{type;literal;comments;whitespace;constructor(e,t,n=[],r=""){this.type=e,this.literal=t,this.comments=n,this.whitespace=r}serialize(){let e="";for(const t of this.comments)e+=t.serialize();switch(e+=this.whitespace,this.type){case He.IDENT:case He.COMMENT:case He.NUMBER:case He.FLOAT:e+=this.literal;break;case He.STRING:e+='"'+this.literal+'"';break;case He.CTLOP:e+="."+this.literal;break;case He.BYTES:e+="'"+this.literal+"'";break;case He.HEX:e+="h'"+this.literal+"'";break;case He.BASE64:e+="b64'"+this.literal+"'";break;case He.EOF:break;default:e+=this.type.valueOf()}return e}startWithSpaces(){return""!==this.whitespace||this.comments.length>0}toString(e=0){const t=[`${" ".repeat(e)}${this.constructor.name}: ${Ve[this.type]} (${this.type})`];""!==this.whitespace&&t.push(" ".repeat(e+1)+`whitespaces: ${this.whitespace.length}`),""!==this.literal&&t.push(" ".repeat(e+1)+`literal: ${this.literal}`);for(const n of this.comments)t.push(n.toString(e+1));return t.join("\n")}toJSON(){return{type:this.type,literal:this.literal,comments:this.comments?.map((e=>e.toJSON())),whitespace:this.whitespace}}}class Ke{parentNode=null;serialize(e){if(this.setChildrenParent(),e){const t=e.markupFor(this);let n=null!==t[0]?t[0]:"";return n+=this._serialize(e),n+=null!==t[1]?t[1]:"",n}return this._serialize()}setChildrenParent(){for(const e of this.getChildren())e.parentNode=this,e.setChildrenParent()}getChildren(){return[]}_serializeToken(e,t){return e?t?t.serializeToken(e,this):e.serialize():""}toString(e=0){return" ".repeat(e)+this.constructor.name}toJSON(){return{}}}class Ze extends Ke{openToken=null;closeToken=null;serialize(e){let t="";if(e){const n=e.markupFor(this);t+=null!==n[0]?n[0]:""}if(t+=this._serializeToken(this.openToken,e),t+=this._serialize(e),t+=this._serializeToken(this.closeToken,e),e){const n=e.markupFor(this);t+=null!==n[1]?n[1]:""}return t}toString(e=0){const t=[super.toString(e)];return this.openToken&&t.push(this.openToken.toString(e+1)),this.closeToken&&t.push(this.closeToken.toString(e+1)),t.join("\n")}toJSON(){return Object.assign(super.toJSON(),{openToken:this.openToken?.toJSON(),closeToken:this.closeToken?.toJSON()})}}class Ye extends Ze{comments=[];whitespace="";separator=null;_prestr(e){return""}serialize(e){let t=this._prestr(e);for(const n of this.comments)t+=this._serializeToken(n,e);return t+=this.whitespace,t+=super.serialize(e),t+=this._serializeToken(this.separator,e),t}setComments(e){this.comments=e.comments,this.whitespace=e.whitespace}toString(e=0){const t=[super.toString(e)];for(const n of this.comments)t.push(n.toString(e+1));return""!==this.whitespace&&t.push(" ".repeat(e+1)+`whitespaces: ${this.whitespace.length}`),this.separator&&t.push(this.separator.toString(e+1)),t.join("\n")}toJSON(){return Object.assign(super.toJSON(),{comments:this.comments.map((e=>e.toJSON())),whitespace:this.whitespace,separator:this.separator?.toJSON()})}}class Xe extends Ye{rules;constructor(e){super(),this.rules=e}getChildren(){return this.rules}_serialize(e){return this.rules.map((t=>t.serialize(e))).join("")}toString(e=0){const t=[super.toString(e)];for(const n of this.rules)t.push(n.toString(e+1));return t.join("\n")}toJSON(){return Object.assign(super.toJSON(),{rules:this.rules.map((e=>e.toJSON()))})}}class Qe extends Ke{name;assign;type;constructor(e,t,n){super(),this.name=e,this.assign=t,this.type=n}getChildren(){return[this.name,this.type]}_serialize(e){let t=this.name.serialize(e);return t+=this._serializeToken(this.assign,e),t+=this.type.serialize(e),t}toString(e=0){return[super.toString(e),this.name.toString(e+1),this.assign.toString(e+1),this.type.toString(e+1)].join("\n")}toJSON(){return Object.assign(super.toJSON(),{name:this.name.toJSON(),assign:this.assign.toJSON(),type:this.type.toJSON()})}}class et extends Ye{occurrence;key;type;constructor(e,t,n){super(),this.occurrence=e,this.key=t,this.type=n}getChildren(){const e=[];return this.occurrence&&e.push(this.occurrence),this.key&&e.push(this.key),e.push(this.type),e}_serialize(e){let t="";return this.occurrence&&(t+=this.occurrence.serialize(e)),this.key&&(t+=this.key.serialize(e)),t+=this.type.serialize(e),t}isConvertibleToType(){return null===this.occurrence&&null===this.key&&(!(this.type instanceof tt)||this.type instanceof rt||this.type instanceof nt)}toString(e=0){const t=[super.toString(e)];return this.occurrence&&t.push(this.occurrence.toString(e+1)),this.key&&t.push(this.key.toString(e+1)),t.push(this.type.toString(e+1)),t.join("\n")}toJSON(){return Object.assign(super.toJSON(),{occurrence:this.occurrence?.toJSON(),key:this.key?.toJSON(),type:this.type.toJSON()})}}class tt extends Ye{groupChoices;constructor(e){super(),this.groupChoices=e}getChildren(){return this.groupChoices}_serialize(e){return this.groupChoices.map((t=>t.serialize(e))).join("")}toString(e=0){const t=[super.toString(e)];for(const n of this.groupChoices)t.push(n.toString(e+1));return t.join("\n")}toJSON(){return Object.assign(super.toJSON(),{groupChoices:this.groupChoices.map((e=>e.toJSON()))})}}let nt=class extends tt{},rt=class extends tt{};class st extends Ye{groupEntries;constructor(e){super(),this.groupEntries=e}getChildren(){return this.groupEntries}_serialize(e){return this.groupEntries.map((t=>t.serialize(e))).join("")}toString(e=0){const t=[super.toString(e)];for(const n of this.groupEntries)t.push(n.toString(e+1));return t.join("\n")}toJSON(){return Object.assign(super.toJSON(),{groupEntries:this.groupEntries.map((e=>e.toJSON()))})}}class it extends Ye{numericPart;typePart;constructor(e=null,t=null){super(),this.numericPart=e,this.typePart=t}getChildren(){return this.typePart?[this.typePart]:[]}_serialize(e){let t=this._serializeToken(new Je(He.HASH,""),e);return t+=this._serializeToken(this.numericPart,e),t+=this.typePart?this.typePart.serialize(e):"",t}toString(e=0){const t=[super.toString(e)+" (#)"];return this.numericPart&&t.push(this.numericPart.toString(e+1)),this.typePart&&t.push(this.typePart.toString(e+1)),t.join("\n")}toJSON(){return Object.assign(super.toJSON(),{numericPart:this.numericPart?.toJSON(),typePart:this.typePart?.toJSON()})}}class ot extends Ye{n;m;tokens;constructor(e,t,n=[]){super(),this.n=e,this.m=t,this.tokens=n}_serialize(e){return this.tokens.map((t=>this._serializeToken(t,e))).join("")}toString(e=0){const t=[super.toString(e)];for(const n of this.tokens)t.push(n.toString(e+1));return t.join("\n")}toJSON(){return Object.assign(super.toJSON(),{n:this.n,m:this.m,tokens:this.tokens.map((e=>e.toJSON()))})}}class at extends Ye{value;type;constructor(e,t){super(),this.value=e,this.type=t}_serialize(e){let t="",n="";return"text"===this.type?(t='"',n='"'):"bytes"===this.type?(t="'",n="'"):"hex"===this.type?(t="h'",n="'"):"base64"===this.type&&(t="b64'",n="'"),e?e.serializeValue(t,this.value,n,this):t+this.value+n}toString(e=0){return" ".repeat(e)+`${this.constructor.name} (${this.type}): ${this.value}`}toJSON(){return Object.assign(super.toJSON(),{value:this.value,type:this.type})}}class ct extends Ye{name;unwrapped;parameters;constructor(e,t,n=null){super(),this.name=e,this.unwrapped=t,this.parameters=n}getChildren(){return this.parameters?[this.parameters]:[]}_prestr(e){return this._serializeToken(this.unwrapped,e)}_serialize(e){let t="";return e?t+=e.serializeName(this.name,this):t=this.name,this.parameters&&(t+=this.parameters.serialize(e)),t}toString(e=0){const t=[super.toString(e)," ".repeat(e+1)+this.name];return this.unwrapped&&t.push(this.unwrapped.toString(e+1)),this.parameters&&t.push(this.parameters.toString(e+1)),t.join("\n")}toJSON(){return Object.assign(super.toJSON(),{name:this.name,unwrapped:this.unwrapped?.toJSON(),parameters:this.parameters?.toJSON()})}}class lt extends Ye{target;constructor(e){super(),this.target=e}getChildren(){return[this.target]}_serialize(e){let t=this._serializeToken(new Je(He.AMPERSAND,""),e);return t+=this.target.serialize(e),t}toString(e=0){return[super.toString(e)+" (&)",this.target.toString(e+1)].join("\n")}toJSON(){return Object.assign(super.toJSON(),{target:this.target.toJSON()})}}class ut extends Ye{min;max;rangeop;constructor(e,t,n){super(),this.min=e,this.max=t,this.rangeop=n}getChildren(){return[this.min,this.max]}_serialize(e){let t=this.min.serialize(e);return t+=this._serializeToken(this.rangeop,e),t+=this.max.serialize(e),t}toString(e=0){return[super.toString(e),this.min.toString(e+1),this.rangeop.toString(e+1),this.max.toString(e+1)].join("\n")}toJSON(){return Object.assign(super.toJSON(),{min:this.min.toJSON(),max:this.max.toJSON(),rangeop:this.rangeop.toJSON()})}}class dt extends Ye{type;name;controller;constructor(e,t,n){super(),this.type=e,this.name=t,this.controller=n}getChildren(){return[this.type,this.controller]}_serialize(e){let t=this.type.serialize(e);return t+=this._serializeToken(this.name,e),t+=this.controller.serialize(e),t}toString(e=0){return[super.toString(e),this.type.toString(e+1),this.name.toString(e+1),this.controller.toString(e+1)].join("\n")}toJSON(){return Object.assign(super.toJSON(),{type:this.type.toJSON(),name:this.name.toJSON(),controller:this.controller.toJSON()})}}class pt extends Ke{type;hasCut;hasColon;tokens;constructor(e,t,n,r=[]){super(),this.type=e,this.hasCut=t,this.hasColon=n,this.tokens=r}getChildren(){return[this.type]}_serialize(e){let t=this.type.serialize(e);return t+=this.tokens.map((t=>this._serializeToken(t,e))).join(""),t}toString(e=0){const t=[super.toString(e),this.type.toString(e+1)];for(const n of this.tokens)t.push(n.toString(e+1));return t.join("\n")}toJSON(){return Object.assign(super.toJSON(),{type:this.type.toJSON(),hasCut:this.hasCut,hasColon:this.hasColon,tokens:this.tokens.map((e=>e.toJSON()))})}}class ht extends Ye{types;constructor(e){super(),this.types=e}getChildren(){return this.types}_serialize(e){return this.types.map((t=>t.serialize(e))).join("")}toString(e=0){const t=[super.toString(e)];for(const n of this.types)t.push(n.toString(e+1));return t.join("\n")}toJSON(){return Object.assign(super.toJSON(),{types:this.types.map((e=>e.toJSON()))})}}class ft extends Ze{parameters;constructor(e){super(),this.parameters=e}getChildren(){return this.parameters}_serialize(e){return this.parameters.map((t=>t.serialize(e))).join("")}toString(e=0){const t=[super.toString(e)];for(const n of this.parameters)t.push(n.toString(e+1));return t.join("\n")}toJSON(){return Object.assign(super.toJSON(),{parameters:this.parameters.map((e=>e.toJSON()))})}}class mt extends Ze{parameters;constructor(e){super(),this.parameters=e}getChildren(){return this.parameters}_serialize(e){return this.parameters.map((t=>t.serialize(e))).join("")}toString(e=0){const t=[super.toString(e)];for(const n of this.parameters)t.push(n.toString(e+1));return t.join("\n")}toJSON(){return Object.assign(super.toJSON(),{parameters:this.parameters.map((e=>e.toJSON()))})}}class gt extends Error{constructor(e="A parsing error occurred"){super(e),this.name="ParserError"}}function bt(e){return function(e){return"a"<=e&&e<="z"||"A"<=e&&e<="Z"}(e)||"@_$".includes(e)}function yt(e){return e.length>0&&"123456789".includes(e[0])&&[...e].every((e=>"0123456789".includes(e)))}class wt{line;position;constructor(e=-1,t=-1){this.line=e,this.position=t}}class vt{input;position=0;readPosition=0;ch=0;constructor(e){this.input=e,this.readChar()}readChar(){this.readPosition>=this.input.length?this.ch=0:this.ch=this.input.charCodeAt(this.readPosition),this.position=this.readPosition,this.readPosition+=1}_peekAtNextChar(){return this.readPosition>=this.input.length?"":this.input[this.readPosition]}getLocation(){const e=this.position-2,t=this.input.split("\n");let n=0;for(let r=0;r<t.length;r++){const s=t[r].length;if(n+=s+1,n>e){return new wt(r,e-(n-s)+1)}}return new wt(0,0)}getLine(e){return this.input.split("\n")[e]}getLocationInfo(){const e=this.getLocation();let t=(e.line>=0?this.getLine(e.line):"")+"\n";return t+=" ".repeat(e.position>=0?e.position:0)+"^\n",t+=" ".repeat(e.position>=0?e.position:0)+"|\n",t}nextToken(){const e=this._readComments();let t="";e.length>0&&""===e[e.length-1].literal&&(t=e[e.length-1].whitespace,e.pop());let n=new Je(He.ILLEGAL,"");const r=String.fromCharCode(this.ch);let s=!1;if("="===r)">"===this._peekAtNextChar()?(this.readChar(),n=new Je(He.ARROWMAP,"",e,t)):n=new Je(He.ASSIGN,"",e,t);else if("("===r)n=new Je(He.LPAREN,"",e,t);else if(")"===r)n=new Je(He.RPAREN,"",e,t);else if("{"===r)n=new Je(He.LBRACE,"",e,t);else if("}"===r)n=new Je(He.RBRACE,"",e,t);else if("["===r)n=new Je(He.LBRACK,"",e,t);else if("]"===r)n=new Je(He.RBRACK,"",e,t);else if("<"===r)n=new Je(He.LT,"",e,t);else if(">"===r)n=new Je(He.GT,"",e,t);else if("+"===r)n=new Je(He.PLUS,"",e,t);else if(","===r)n=new Je(He.COMMA,"",e,t);else if("."===r)"."===this._peekAtNextChar()?(this.readChar(),n=new Je(He.INCLRANGE,"",e,t),"."===this._peekAtNextChar()&&(this.readChar(),n=new Je(He.EXCLRANGE,"",e,t))):bt(this._peekAtNextChar())&&(this.readChar(),n=new Je(He.CTLOP,this._readIdentifier(),e,t),s=!0);else if(":"===r)n=new Je(He.COLON,"",e,t);else if("?"===r)n=new Je(He.QUEST,"",e,t);else if("/"===r)"/"===this._peekAtNextChar()?(this.readChar(),n=new Je(He.GCHOICE,"",e,t),"="===this._peekAtNextChar()&&(this.readChar(),n=new Je(He.GCHOICEALT,"",e,t))):"="===this._peekAtNextChar()?(this.readChar(),n=new Je(He.TCHOICEALT,"",e,t)):n=new Je(He.TCHOICE,"",e,t);else if("*"===r)n=new Je(He.ASTERISK,"",e,t);else if("^"===r)n=new Je(He.CARET,"",e,t);else if("#"===r)n=new Je(He.HASH,"",e,t);else if("~"===r)n=new Je(He.TILDE,"",e,t);else if('"'===r)n=new Je(He.STRING,this._readString(),e,t);else if("'"===r)n=new Je(He.BYTES,this._readBytesString(),e,t);else if(";"===r)n=new Je(He.COMMENT,this._readComment(),e,t),s=!0;else if("&"===r)n=new Je(He.AMPERSAND,"",e,t);else if(0===this.ch)n=new Je(He.EOF,"",e,t);else if(bt(r))"b"===r&&"6"===this._peekAtNextChar()?(this.readChar(),this.readChar(),"4"===String.fromCharCode(this.ch)&&"'"===this._peekAtNextChar()?(this.readChar(),n=new Je(He.BASE64,this._readBytesString(),e,t)):(n=new Je(He.IDENT,this._readIdentifier("b6"),e,t),s=!0)):"h"===r&&"'"===this._peekAtNextChar()?(this.readChar(),n=new Je(He.HEX,this._readBytesString(),e,t)):(n=new Je(He.IDENT,this._readIdentifier(),e,t),s=!0);else if(this._isDigit(r)||"-"===r){const r=this._readNumberOrFloat();n=new Je(r.includes(".")?He.FLOAT:He.NUMBER,r,e,t),s=!0}return s||this.readChar(),n}_isDigit(e){return e>="0"&&e<="9"}_readIdentifier(e=""){const t=this.position;if(""===e&&!bt(String.fromCharCode(this.ch)))throw this._tokenError("expected identifier, got nothing");for(;bt(String.fromCharCode(this.ch))||this._isDigit(String.fromCharCode(this.ch))||"-. ".includes(String.fromCharCode(this.ch));){if(" "===String.fromCharCode(this.ch))break;this.readChar()}const n=e+this.input.substring(t,this.position);if(n.endsWith("-")||n.endsWith("."))throw this._tokenError(`identifier cannot end with \`-\` or \`.\`, got \`${n}\``);return n}_readComment(){const e=this.position;for(;this.ch&&"\n"!==String.fromCharCode(this.ch);)this.readChar();return this.input.substring(e,this.position)}_readString(){const e=this.position;for(this.readChar();'"'!==String.fromCharCode(this.ch);)if(this.ch>=32&&this.ch<=33||this.ch>=35&&this.ch<=91||this.ch>=93&&this.ch<=126||this.ch>=128&&this.ch<=1114109)this.readChar();else if("\\"===String.fromCharCode(this.ch)){if(this.readChar(),!(this.ch>=32&&this.ch<=126||this.ch>=128&&this.ch<=1114109))throw this._tokenError(`invalid escape character in text string \`${this.input.substring(e+1,this.position)}\``);this.readChar()}else if(10===this.ch)this.readChar();else{if(13!==this.ch||10!==this._peekAtNextChar().charCodeAt(0))throw this._tokenError(`invalid text string \`${this.input.substring(e+1,this.position)}\``);this.readChar(),this.readChar()}return this.input.substring(e+1,this.position)}_readBytesString(){const e=this.position;for(this.readChar();"'"!==String.fromCharCode(this.ch);)if(this.ch>=32&&this.ch<=38||this.ch>=40&&this.ch<=91||this.ch>=93&&this.ch<=1114109)this.readChar();else if("\\"===String.fromCharCode(this.ch)){if(this.readChar(),!(this.ch>=32&&this.ch<=126||this.ch>=128&&this.ch<=1114109))throw this._tokenError(`invalid escape character in byte string \`${this.input.substring(e+1,this.position)}\``);this.readChar()}else if(10===this.ch)this.readChar();else{if(13!==this.ch||10!==this._peekAtNextChar().charCodeAt(0))throw this._tokenError(`invalid byte string \`${this.input.substring(e+1,this.position)}\``);this.readChar(),this.readChar()}return this.input.substring(e+1,this.position)}_readNumberOrFloat(){const e=this.position;let t=!1;if("-"===String.fromCharCode(this.ch)&&this.readChar(),"0"===String.fromCharCode(this.ch)){if(this.readChar(),"x"===String.fromCharCode(this.ch)){if(this.readChar(),!"0123456789ABCDEF".includes(String.fromCharCode(this.ch).toUpperCase()))throw this._tokenError(`expected hex number to contain hex digits, got \`${this.input.substring(e,this.position)}\``);for(;"0123456789ABCDEF".includes(String.fromCharCode(this.ch).toUpperCase());)this.readChar();if("."===String.fromCharCode(this.ch)){if(t=!0,"."===this._peekAtNextChar())return this.input.substring(e,this.position);for(this.readChar();"0123456789ABCDEF".includes(String.fromCharCode(this.ch).toUpperCase());)this.readChar()}if(t&&"p"!==String.fromCharCode(this.ch))throw this._tokenError(`expected hex number with fraction to have an exponent, got \`${this.input.substring(e,this.position)}\``);if("p"===String.fromCharCode(this.ch)){if(this.readChar(),"+-".includes(String.fromCharCode(this.ch))&&this.readChar(),!this._isDigit(String.fromCharCode(this.ch)))throw this._tokenError(`expected hex number with exponent to have a digit in exponent, got \`${this.input.substring(e,this.position)}\``);for(;this._isDigit(String.fromCharCode(this.ch));)this.readChar()}}else if("b"===String.fromCharCode(this.ch)){if(this.readChar(),!"01".includes(String.fromCharCode(this.ch)))throw this._tokenError(`expected binary number to have binary digits, got \`${this.input.substring(e,this.position)}\``);for(;"01".includes(String.fromCharCode(this.ch));)this.readChar()}else if("."===String.fromCharCode(this.ch)){if("."===this._peekAtNextChar())return this.input.substring(e,this.position);if(this.readChar(),!this._isDigit(String.fromCharCode(this.ch)))throw this._tokenError(`expected number with fraction to have digits in fraction part, got \`${this.input.substring(e,this.position)}\``);for(;this._isDigit(String.fromCharCode(this.ch));)this.readChar();if("e"===String.fromCharCode(this.ch)){if(this.readChar(),"+-".includes(String.fromCharCode(this.ch))&&this.readChar(),!this._isDigit(String.fromCharCode(this.ch)))throw this._tokenError(`expected number with exponent to have digits in exponent, got \`${this.input.substring(e,this.position)}\``);for(;this._isDigit(String.fromCharCode(this.ch));)this.readChar()}}}else{for(;this._isDigit(String.fromCharCode(this.ch));)this.readChar();if("."===String.fromCharCode(this.ch)){if("."===this._peekAtNextChar())return this.input.substring(e,this.position);if(this.readChar(),!this._isDigit(String.fromCharCode(this.ch)))throw this._tokenError(`expected number with fraction to have digits in fraction part, got \`${this.input.substring(e,this.position)}\``);for(;this._isDigit(String.fromCharCode(this.ch));)this.readChar()}if("e"===String.fromCharCode(this.ch)){if(this.readChar(),"+-".includes(String.fromCharCode(this.ch))&&this.readChar(),!this._isDigit(String.fromCharCode(this.ch)))throw this._tokenError(`expected number with exponent to have digits in exponent, got \`${this.input.substring(e,this.position)}\``);for(;this._isDigit(String.fromCharCode(this.ch));)this.readChar()}}return this.input.substring(e,this.position)}_readWhitespace(){const e=this.position;for(;" \t\n\r".includes(String.fromCharCode(this.ch));)this.readChar();return this.input.substring(e,this.position)}_readComments(){const e=[];for(;;){const t=this._readWhitespace();if(";"!==String.fromCharCode(this.ch)){if(""!==t){const n=new Je(He.COMMENT,"",[],t);e.push(n)}break}const n=new Je(He.COMMENT,this._readComment(),[],t);e.push(n)}return e}_tokenError(e){const t=this.getLocation();return new gt(`CDDL token error - line ${t.line+1}: ${e}`)}}const kt=new Je(He.ILLEGAL,"");const $t=/^[!#$%&'*+-.^`|~\w]+$/,xt=/[\u000A\u000D\u0009\u0020]/u,Ct=/^[\u0009\u{0020}-\{u0073}\u{0080}-\u{00FF}]+$/u;function St(e,t,n){(t&&""!==t&&!e.has(t)&&Ct.test(n)||null===n)&&e.set(t.toLowerCase(),n)}function _t(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Tt={async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null};function Rt(e){Tt=e}var Et={exec:()=>null};function Lt(e){let t=[];return n=>{let r=Math.max(0,Math.min(3,n-1)),s=t[r];return s||(s=e(r),t[r]=s),s}}function At(e,t=""){let n="string"==typeof e?e:e.source,r={replace:(e,t)=>{let s="string"==typeof t?t:t.source;return s=s.replace(Nt.caret,"$1"),n=n.replace(e,s),r},getRegex:()=>new RegExp(n,t)};return r}var Pt=((e="")=>{try{return!!new RegExp("(?<=1)(?<!1)"+e)}catch{return!1}})(),Nt={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>new RegExp(`^( {0,3}${e})((?:[\t ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:Lt((e=>new RegExp(`^ {0,${e}}(?:[*+-]|\\d{1,9}[.)])((?:[ \t][^\\n]*)?(?:\\n|$))`))),hrRegex:Lt((e=>new RegExp(`^ {0,${e}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`))),fencesBeginRegex:Lt((e=>new RegExp(`^ {0,${e}}(?:\`\`\`|~~~)`))),headingBeginRegex:Lt((e=>new RegExp(`^ {0,${e}}#`))),htmlBeginRegex:Lt((e=>new RegExp(`^ {0,${e}}<(?:[a-z].*>|!--)`,"i"))),blockquoteBeginRegex:Lt((e=>new RegExp(`^ {0,${e}}>`)))},It=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Dt=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,Ot=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,jt=At(Ot).replace(/bull/g,Dt).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}(?:\s|$)/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),zt=At(Ot).replace(/bull/g,Dt).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}(?:\s|$)/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),Mt=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table|[ \t]+\n)[^\n]+)*)/,Ut=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,qt=At(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Ut).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Wt=At(/^(bull)([ \t][^\n]*?)?(?:\n|$)/).replace(/bull/g,Dt).getRegex(),Ft="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",Bt=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Ht=At("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n*|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>[^\\n]*\\n*|$)|<![A-Z][\\s\\S]*?(?:>[^\\n]*\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>[^\\n]*\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$))","i").replace("comment",Bt).replace("tag",Ft).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Gt=e=>At(Mt).replace("hr",It).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~~~)[^\\n]*\\n").replace("list",e).replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Ft).getRegex(),Vt=Gt(/ {0,3}(?:[*+-]|1[.)])[ \t]+[^ \t\n]/),Jt=Gt(/ {0,3}(?:[*+-]|\d{1,9}[.)])(?:[ \t]|\n|$)/),Kt={blockquote:At(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Jt).getRegex(),code:/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,def:qt,fences:/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,hr:It,html:Ht,lheading:jt,list:Wt,newline:/^(?:[ \t]*(?:\n|$))+/,paragraph:Vt,table:Et,text:/^[^\n]+/},Zt=At("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",It).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3}\t)[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~~~)[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Ft).getRegex(),Yt={...Kt,lheading:zt,table:Zt,paragraph:At(Mt).replace("hr",It).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Zt).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~~~)[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]+[^ \\t\\n]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Ft).getRegex()},Xt={...Kt,html:At("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:\"[^\"]*\"|'[^']*'|\\s[^'\"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",Bt).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:Et,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:At(Mt).replace("hr",It).replace("heading"," *#{1,6} *[^\n]").replace("lheading",jt).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},Qt=/^( {2,}|\\)\n(?!\s*$)/,en=/[\p{P}\p{S}]/u,tn=/[\s\p{P}\p{S}]/u,nn=/[^\s\p{P}\p{S}]/u,rn=At(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,tn).getRegex(),sn=/(?!~)[\p{P}\p{S}]/u,on=At(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",Pt?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),an=/^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/,cn=At(an,"u").replace(/punct/g,en).getRegex(),ln=At(an,"u").replace(/punct/g,sn).getRegex(),un=At(/^(?:\*+(?:((?!\*)(?!openQuote)punct)|([^\s*]))?)|^_+(?:((?!_)(?!openQuote)punct)|([^\s_]))?/,"u").replace(/openQuote/g,/[\p{Pi}\p{Ps}"']/u).replace(/punct/g,en).getRegex(),dn="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",pn=At(dn,"gu").replace(/notPunctSpace/g,nn).replace(/punctSpace/g,tn).replace(/punct/g,en).getRegex(),hn=At(dn,"gu").replace(/notPunctSpace/g,/(?:[^\s\p{P}\p{S}]|~)/u).replace(/punctSpace/g,/(?!~)[\s\p{P}\p{S}]/u).replace(/punct/g,sn).getRegex(),fn=At("^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)[\\s](\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|(?:(?!\\*)punct|notPunctSpace)(\\*+)(?!\\*)(?=notPunctSpace)","gu").replace(/notPunctSpace/g,nn).replace(/punctSpace/g,tn).replace(/punct/g,en).getRegex(),mn=At("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,nn).replace(/punctSpace/g,tn).replace(/punct/g,en).getRegex(),gn=At("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)[\\s](_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)|(?:(?!_)punct|notPunctSpace)(_+)(?!_)(?=notPunctSpace)","gu").replace(/notPunctSpace/g,nn).replace(/punctSpace/g,tn).replace(/punct/g,en).getRegex(),bn=At(/^~~?(?:((?!~)punct)|[^\s~])/,"u").replace(/punct/g,en).getRegex(),yn=At("^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)","gu").replace(/notPunctSpace/g,nn).replace(/punctSpace/g,tn).replace(/punct/g,en).getRegex(),wn=At(/\\(punct)/,"gu").replace(/punct/g,en).getRegex(),vn=At(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),kn=At(Bt).replace("(?:--\x3e|$)","--\x3e").getRegex(),$n=At("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",kn).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),xn=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/,Cn=At(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label",xn).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]+|(?=\))/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Sn=At(/^!?\[(label)\]\[(ref)\]/).replace("label",xn).replace("ref",Ut).getRegex(),_n=At(/^!?\[(ref)\](?:\[\])?/).replace("ref",Ut).getRegex(),Tn=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,Rn={_backpedal:Et,anyPunctuation:wn,autolink:vn,blockSkip:on,br:Qt,code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,del:Et,delLDelim:Et,delRDelim:Et,emStrongLDelim:cn,emStrongRDelimAst:pn,emStrongRDelimUnd:mn,escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,link:Cn,nolink:_n,punctuation:rn,reflink:Sn,reflinkSearch:At("reflink|nolink(?!\\()","g").replace("reflink",Sn).replace("nolink",_n).getRegex(),tag:$n,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,url:Et},En={...Rn,emStrongLDelim:un,emStrongRDelimAst:fn,emStrongRDelimUnd:gn,link:At(/^!?\[(label)\]\((.*?)\)/).replace("label",xn).getRegex(),reflink:At(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",xn).getRegex()},Ln={...Rn,emStrongRDelimAst:hn,emStrongLDelim:ln,delLDelim:bn,delRDelim:yn,url:At(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",Tn).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:At(/^(`+|~+|[^`~])(?:(?=[`~])|(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",Tn).getRegex()},An={...Ln,br:At(Qt).replace("{2,}","*").getRegex(),text:At(Ln.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},Pn={normal:Kt,gfm:Yt,pedantic:Xt},Nn={normal:Rn,gfm:Ln,breaks:An,pedantic:En},In={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Dn=e=>In[e];function On(e,t){if(t){if(Nt.escapeTest.test(e))return e.replace(Nt.escapeReplace,Dn)}else if(Nt.escapeTestNoEncode.test(e))return e.replace(Nt.escapeReplaceNoEncode,Dn);return e}function jn(e){try{e=encodeURI(e).replace(Nt.percentDecode,"%")}catch{return null}return e}function zn(e,t){let n=e.replace(Nt.findPipe,((e,t,n)=>{let r=!1,s=t;for(;--s>=0&&"\\"===n[s];)r=!r;return r?"|":" |"})).split(Nt.splitPipe),r=0;if(n[0].trim()||n.shift(),n.length>0&&!n.at(-1)?.trim()&&n.pop(),t)if(n.length>t)n.splice(t);else for(;n.length<t;)n.push("");for(;r<n.length;r++)n[r]=n[r].trim().replace(Nt.slashPipe,"|");return n}function Mn(e,t,n){let r=e.length;if(0===r)return"";let s=0;for(;s<r;){if(e.charAt(r-s-1)!==t)break;s++}return e.slice(0,r-s)}function Un(e){let t=e.split("\n"),n=t.length-1;for(;n>=0&&Nt.blankLine.test(t[n]);)n--;return t.length-n<=2?e:t.slice(0,n+1).join("\n")}function qn(e,t=0){let n=t,r="";for(let t of e)if("\t"===t){let e=4-n%4;r+=" ".repeat(e),n+=e}else r+=t,n++;return r}function Wn(e,t,n,r,s){let i=t.href,o=t.title||null,a=e[1].replace(s.other.outputLinkReplace,"$1");r.state.inLink=!0;let c={type:"!"===e[0].charAt(0)?"image":"link",raw:n,href:i,title:o,text:a,tokens:r.inlineTokens(a)};return r.state.inLink=!1,c}var Fn=class{options;rules;lexer;constructor(e){this.options=e||Tt}space(e){let t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(e){let t=this.rules.block.code.exec(e);if(t){let e=this.options.pedantic?t[0]:Un(t[0]),n=e.replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:e,codeBlockStyle:"indented",text:n}}}fences(e){let t=this.rules.block.fences.exec(e);if(t){let e=t[0],n=function(e,t,n){let r=e.match(n.other.indentCodeCompensation);if(null===r)return t;let s=r[1];return t.split("\n").map((e=>{let t=e.match(n.other.beginningSpace);if(null===t)return e;let[r]=t;return r.length>=s.length?e.slice(s.length):e})).join("\n")}(e,t[3]||"",this.rules);return{type:"code",raw:e,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):t[2],text:n}}}heading(e){let t=this.rules.block.heading.exec(e);if(t){let e=t[2].trim();if(this.rules.other.endingHash.test(e)){let t=Mn(e,"#");(this.options.pedantic||!t||this.rules.other.endingSpaceChar.test(t))&&(e=t.trim())}return{type:"heading",raw:Mn(t[0],"\n"),depth:t[1].length,text:e,tokens:this.lexer.inline(e)}}}hr(e){let t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:Mn(t[0],"\n")}}blockquote(e){let t=this.rules.block.blockquote.exec(e);if(t){let e=Mn(t[0],"\n").split("\n"),n="",r="",s=[];for(;e.length>0;){let t,i=!1,o=[];for(t=0;t<e.length;t++)if(this.rules.other.blockquoteStart.test(e[t]))o.push(e[t]),i=!0;else{if(i)break;o.push(e[t])}e=e.slice(t);let a=o.join("\n"),c=a.replace(this.rules.other.blockquoteSetextReplace,"\n $1").replace(this.rules.other.blockquoteSetextReplace2,"");n=n?`${n}\n${a}`:a,r=r?`${r}\n${c}`:c;let l=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(c,s,!0),this.lexer.state.top=l,0===e.length)break;let u=s.at(-1);if("code"===u?.type)break;if("blockquote"===u?.type){let t=u,i=e.join("\n"),o=t.raw+"\n"+i.replace(this.rules.other.blockquoteSetextReplace2,""),a=this.blockquote(o);s[s.length-1]=a,n=`${n}\n${i}`,r=r.substring(0,r.length-t.text.length)+a.text;break}if("list"!==u?.type);else{let t=u,i=t.raw+"\n"+e.join("\n"),o=this.list(i);s[s.length-1]=o,n=n.substring(0,n.length-u.raw.length)+o.raw,r=r.substring(0,r.length-t.raw.length)+o.raw,e=i.substring(s.at(-1).raw.length).split("\n")}}return{type:"blockquote",raw:n,tokens:s,text:r}}}list(e){let t=this.rules.block.list.exec(e);if(t){let n=t[1].trim(),r=n.length>1,s={type:"list",raw:"",ordered:r,start:r?+n.slice(0,-1):"",loose:!1,items:[]};n=r?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=r?n:"[*+-]");let i=this.rules.other.listItemRegex(n),o=!1;for(;e;){let n=!1,r="",a="";if(!(t=i.exec(e))||this.rules.block.hr.test(e))break;r=t[0],e=e.substring(r.length);let c=qn(t[2].split("\n",1)[0],t[1].length),l=e.split("\n",1)[0],u=!c.trim(),d=0;if(this.options.pedantic?(d=2,a=c.trimStart()):u?d=t[1].length+1:(d=c.search(this.rules.other.nonSpaceChar),d=d>4?1:d,a=c.slice(d),d+=t[1].length),u&&this.rules.other.blankLine.test(l)&&(r+=l+"\n",e=e.substring(l.length+1),n=!0),!n){let t=this.rules.other.nextBulletRegex(d),n=this.rules.other.hrRegex(d),s=this.rules.other.fencesBeginRegex(d),i=this.rules.other.headingBeginRegex(d),o=this.rules.other.htmlBeginRegex(d),p=this.rules.other.blockquoteBeginRegex(d);for(;e;){let h,f=e.split("\n",1)[0];if(l=f,this.options.pedantic?(l=l.replace(this.rules.other.listReplaceNesting," "),h=l):h=l.replace(this.rules.other.tabCharGlobal," "),s.test(l)||i.test(l)||o.test(l)||p.test(l)||t.test(l)||n.test(l))break;if(h.search(this.rules.other.nonSpaceChar)>=d||!l.trim())a+="\n"+h.slice(d);else{if(u||c.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||s.test(c)||i.test(c)||n.test(c))break;a+="\n"+l}u=!l.trim(),r+=f+"\n",e=e.substring(f.length+1),c=h.slice(d)}}s.loose||(o?s.loose=!0:this.rules.other.doubleBlankLine.test(r)&&(o=!0)),s.items.push({type:"list_item",raw:r,task:!!this.options.gfm&&this.rules.other.listIsTask.test(a),loose:!1,text:a,tokens:[]}),s.raw+=r}let a=s.items.at(-1);if(!a)return;a.raw=a.raw.trimEnd(),a.text=a.text.trimEnd(),s.raw=s.raw.trimEnd();for(let e of s.items){this.lexer.state.top=!1,e.tokens=this.lexer.blockTokens(e.text,[]);let t=e.tokens[0];if(!e.task||"text"!==t?.type&&"paragraph"!==t?.type)e.task&&(e.task=!1);else{e.text=e.text.replace(this.rules.other.listReplaceTask,""),t.raw=t.raw.replace(this.rules.other.listReplaceTask,""),t.text=t.text.replace(this.rules.other.listReplaceTask,"");for(let e=this.lexer.inlineQueue.length-1;e>=0;e--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[e].src)){this.lexer.inlineQueue[e].src=this.lexer.inlineQueue[e].src.replace(this.rules.other.listReplaceTask,"");break}let n=this.rules.other.listTaskCheckbox.exec(e.raw);if(n){let t={type:"checkbox",raw:n[0]+" ",checked:"[ ]"!==n[0]};e.checked=t.checked,s.loose?e.tokens[0]&&["paragraph","text"].includes(e.tokens[0].type)&&"tokens"in e.tokens[0]&&e.tokens[0].tokens?(e.tokens[0].raw=t.raw+e.tokens[0].raw,e.tokens[0].text=t.raw+e.tokens[0].text,e.tokens[0].tokens.unshift(t)):e.tokens.unshift({type:"paragraph",raw:t.raw,text:t.raw,tokens:[t]}):e.tokens.unshift(t)}}if(!s.loose){let t=e.tokens.filter((e=>"space"===e.type)),n=t.length>0&&t.some((e=>this.rules.other.anyLine.test(e.raw)));s.loose=n}}if(s.loose)for(let e of s.items){e.loose=!0;for(let t of e.tokens)"text"===t.type&&(t.type="paragraph")}return s}}html(e){let t=this.rules.block.html.exec(e);if(t){let e=Un(t[0]);return{type:"html",block:!0,raw:e,pre:"pre"===t[1]||"script"===t[1]||"style"===t[1],text:e}}}def(e){let t=this.rules.block.def.exec(e);if(t){let e=t[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),n=t[2]?t[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",r=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):t[3];return{type:"def",tag:e,raw:Mn(t[0],"\n"),href:n,title:r}}}table(e){let t=this.rules.block.table.exec(e);if(!t||!this.rules.other.tableDelimiter.test(t[2]))return;let n=zn(t[1]),r=t[2].replace(this.rules.other.tableAlignChars,"").split("|"),s=t[3]?.trim()?t[3].replace(this.rules.other.tableRowBlankLine,"").split("\n"):[],i={type:"table",raw:Mn(t[0],"\n"),header:[],align:[],rows:[]};if(n.length===r.length){for(let e of r)this.rules.other.tableAlignRight.test(e)?i.align.push("right"):this.rules.other.tableAlignCenter.test(e)?i.align.push("center"):this.rules.other.tableAlignLeft.test(e)?i.align.push("left"):i.align.push(null);for(let e=0;e<n.length;e++)i.header.push({text:n[e],tokens:this.lexer.inline(n[e]),header:!0,align:i.align[e]});for(let e of s)i.rows.push(zn(e,i.header.length).map(((e,t)=>({text:e,tokens:this.lexer.inline(e),header:!1,align:i.align[t]}))));return i}}lheading(e){let t=this.rules.block.lheading.exec(e);if(t){let e=t[1].trim();return{type:"heading",raw:Mn(t[0],"\n"),depth:"="===t[2].charAt(0)?1:2,text:e,tokens:this.lexer.inline(e)}}}paragraph(e){let t=this.rules.block.paragraph.exec(e);if(t){let e="\n"===t[1].charAt(t[1].length-1)?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:e,tokens:this.lexer.inline(e)}}}text(e){let t=this.rules.block.text.exec(e);if(t)return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){let t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:t[1]}}tag(e){let t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&this.rules.other.startATag.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){let t=this.rules.inline.link.exec(e);if(t){let e=t[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(e)){if(!this.rules.other.endAngleBracket.test(e))return;let t=Mn(e.slice(0,-1),"\\");if((e.length-t.length)%2==0)return}else{let e=function(e,t){if(-1===e.indexOf(t[1]))return-1;let n=0;for(let r=0;r<e.length;r++)if("\\"===e[r])r++;else if(e[r]===t[0])n++;else if(e[r]===t[1]&&(n--,n<0))return r;return n>0?-2:-1}(t[2],"()");if(-2===e)return;if(e>-1){let n=(0===t[0].indexOf("!")?5:4)+t[1].length+e;t[2]=t[2].substring(0,e),t[0]=t[0].substring(0,n).trim(),t[3]=""}}let n=t[2],r="";if(this.options.pedantic){let e=this.rules.other.pedanticHrefTitle.exec(n);e&&(n=e[1],r=e[3])}else r=t[3]?t[3].slice(1,-1):"";return n=n.trim(),this.rules.other.startAngleBracket.test(n)&&(n=this.options.pedantic&&!this.rules.other.endAngleBracket.test(e)?n.slice(1):n.slice(1,-1)),Wn(t,{href:n&&n.replace(this.rules.inline.anyPunctuation,"$1"),title:r&&r.replace(this.rules.inline.anyPunctuation,"$1")},t[0],this.lexer,this.rules)}}reflink(e,t){let n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){let e=t[(n[2]||n[1]).replace(this.rules.other.multipleSpaceGlobal," ").toLowerCase()];if(!e){let e=n[0].charAt(0);return{type:"text",raw:e,text:e}}return Wn(n,e,n[0],this.lexer,this.rules)}}emStrong(e,t,n=""){let r=this.rules.inline.emStrongLDelim.exec(e);if(r&&(r[1]||r[2]||r[3]||r[4])&&(!r[4]||!n.match(this.rules.other.unicodeAlphaNumeric))&&(!r[1]&&!r[3]||!n||this.rules.inline.punctuation.exec(n))){let s,i,o=[...r[0]].length-1,a=o,c=0,l=r[0][0],u=n===l,d="*"===l?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(d.lastIndex=0,t=t.slice(-1*e.length+o);null!==(r=d.exec(t));){if(s=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!s)continue;if(i=[...s].length,r[3]||r[4]){a+=i;continue}if(r[5]||r[6]){if(o%3&&!((o+i)%3)){c+=i;continue}if(u)break}if(a-=i,a>0)continue;i=Math.min(i,i+a+c);let t=[...r[0]][0].length,n=e.slice(0,o+r.index+t+i);if(Math.min(o,i)%2){let e=n.slice(1,-1);return{type:"em",raw:n,text:e,tokens:this.lexer.inlineTokens(e)}}let l=n.slice(2,-2);return{type:"strong",raw:n,text:l,tokens:this.lexer.inlineTokens(l)}}}}codespan(e){let t=this.rules.inline.code.exec(e);if(t){let e=t[2].replace(this.rules.other.newLineCharGlobal," "),n=this.rules.other.nonSpaceChar.test(e),r=this.rules.other.startingSpaceChar.test(e)&&this.rules.other.endingSpaceChar.test(e);return n&&r&&(e=e.substring(1,e.length-1)),{type:"codespan",raw:t[0],text:e}}}br(e){let t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e,t,n=""){let r=this.rules.inline.delLDelim.exec(e);if(r&&(!r[1]||!n||this.rules.inline.punctuation.exec(n))){let n,s,i=[...r[0]].length-1,o=i,a=this.rules.inline.delRDelim;for(a.lastIndex=0,t=t.slice(-1*e.length+i);null!==(r=a.exec(t));){if(n=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!n||(s=[...n].length,s!==i))continue;if(r[3]||r[4]){o+=s;continue}if(o-=s,o>0)continue;s=Math.min(s,s+o);let t=[...r[0]][0].length,a=e.slice(0,i+r.index+t+s),c=a.slice(i,-i);return{type:"del",raw:a,text:c,tokens:this.lexer.inlineTokens(c)}}}}autolink(e){let t=this.rules.inline.autolink.exec(e);if(t){let e,n;return"@"===t[2]?(e=t[1],n="mailto:"+e):(e=t[1],n=e),{type:"link",raw:t[0],text:e,href:n,tokens:[{type:"text",raw:e,text:e}]}}}url(e){let t;if(t=this.rules.inline.url.exec(e)){let e,n;if("@"===t[2])e=t[0],n="mailto:"+e;else{let r;do{r=t[0],t[0]=this.rules.inline._backpedal.exec(t[0])?.[0]??""}while(r!==t[0]);e=t[0],n="www."===t[1]?"http://"+t[0]:t[0]}return{type:"link",raw:t[0],text:e,href:n,tokens:[{type:"text",raw:e,text:e}]}}}inlineText(e){let t=this.rules.inline.text.exec(e);if(t){let e=this.lexer.state.inRawBlock;return{type:"text",raw:t[0],text:t[0],escaped:e}}}},Bn=class e{tokens;options;state;inlineQueue;tokenizer;constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||Tt,this.options.tokenizer=this.options.tokenizer||new Fn,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let t={other:Nt,block:Pn.normal,inline:Nn.normal};this.options.pedantic?(t.block=Pn.pedantic,t.inline=Nn.pedantic):this.options.gfm&&(t.block=Pn.gfm,this.options.breaks?t.inline=Nn.breaks:t.inline=Nn.gfm),this.tokenizer.rules=t}static get rules(){return{block:Pn,inline:Nn}}static lex(t,n){return new e(n).lex(t)}static lexInline(t,n){return new e(n).inlineTokens(t)}lex(e){e=e.replace(Nt.carriageReturn,"\n"),this.blockTokens(e,this.tokens);for(let e=0;e<this.inlineQueue.length;e++){let t=this.inlineQueue[e];this.inlineTokens(t.src,t.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,t=[],n=!1){this.tokenizer.lexer=this,this.options.pedantic&&(e=e.replace(Nt.tabCharGlobal," ").replace(Nt.spaceLine,""));let r=1/0;for(;e;){if(!(e.length<r)){this.infiniteLoopError(e.charCodeAt(0));break}let s;if(r=e.length,this.options.extensions?.block?.some((n=>!!(s=n.call({lexer:this},e,t))&&(e=e.substring(s.raw.length),t.push(s),!0))))continue;if(s=this.tokenizer.space(e)){e=e.substring(s.raw.length);let n=t.at(-1);1===s.raw.length&&void 0!==n?n.raw+="\n":t.push(s);continue}if(s=this.tokenizer.code(e)){e=e.substring(s.raw.length);let n=t.at(-1);"paragraph"===n?.type||"text"===n?.type?(n.raw+=(n.raw.endsWith("\n")?"":"\n")+s.raw,n.text+="\n"+s.text,this.inlineQueue.at(-1).src=n.text):t.push(s);continue}if(s=this.tokenizer.fences(e)){e=e.substring(s.raw.length),t.push(s);continue}if(s=this.tokenizer.heading(e)){e=e.substring(s.raw.length),t.push(s);continue}if(s=this.tokenizer.hr(e)){e=e.substring(s.raw.length),t.push(s);continue}if(s=this.tokenizer.blockquote(e)){e=e.substring(s.raw.length),t.push(s);continue}if(s=this.tokenizer.list(e)){e=e.substring(s.raw.length),t.push(s);continue}if(s=this.tokenizer.html(e)){e=e.substring(s.raw.length),t.push(s);continue}if(s=this.tokenizer.def(e)){e=e.substring(s.raw.length);let n=t.at(-1);"paragraph"===n?.type||"text"===n?.type?(n.raw+=(n.raw.endsWith("\n")?"":"\n")+s.raw,n.text+="\n"+s.raw,this.inlineQueue.at(-1).src=n.text):this.tokens.links[s.tag]||(this.tokens.links[s.tag]={href:s.href,title:s.title},t.push(s));continue}if(s=this.tokenizer.table(e)){e=e.substring(s.raw.length),t.push(s);continue}if(s=this.tokenizer.lheading(e)){e=e.substring(s.raw.length),t.push(s);continue}let i=e;if(this.options.extensions?.startBlock){let t,n=1/0,r=e.slice(1);this.options.extensions.startBlock.forEach((e=>{t=e.call({lexer:this},r),"number"==typeof t&&t>=0&&(n=Math.min(n,t))})),n<1/0&&n>=0&&(i=e.substring(0,n+1))}if(this.state.top&&(s=this.tokenizer.paragraph(i))){let r=t.at(-1);n&&"paragraph"===r?.type?(r.raw+=(r.raw.endsWith("\n")?"":"\n")+s.raw,r.text+="\n"+s.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=r.text):t.push(s),n=i.length!==e.length,e=e.substring(s.raw.length)}else if(s=this.tokenizer.text(e)){e=e.substring(s.raw.length);let n=t.at(-1);"text"===n?.type?(n.raw+=(n.raw.endsWith("\n")?"":"\n")+s.raw,n.text+="\n"+s.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=n.text):t.push(s)}else if(e){this.infiniteLoopError(e.charCodeAt(0));break}}return this.state.top=!0,t}inline(e,t=[]){return this.inlineQueue.push({src:e,tokens:t}),t}inlineTokens(e,t=[]){this.tokenizer.lexer=this;let n=e;if(this.tokens.links){let e=Object.keys(this.tokens.links);e.length>0&&(n=n.replace(this.tokenizer.rules.inline.reflinkSearch,(t=>e.includes(t.slice(t.lastIndexOf("[")+1,-1))?"["+"a".repeat(t.length-2)+"]":t)))}n=n.replace(this.tokenizer.rules.inline.anyPunctuation,"++"),n=n.replace(this.tokenizer.rules.inline.blockSkip,((e,t,n)=>{let r=n?n.length:0;return e.slice(0,r)+"["+"a".repeat(e.length-r-2)+"]"})),n=this.options.hooks?.emStrongMask?.call({lexer:this},n)??n;let r=!1,s="",i=1/0;for(;e;){if(!(e.length<i)){this.infiniteLoopError(e.charCodeAt(0));break}let o;if(i=e.length,r||(s=""),r=!1,this.options.extensions?.inline?.some((n=>!!(o=n.call({lexer:this},e,t))&&(e=e.substring(o.raw.length),t.push(o),!0))))continue;if(o=this.tokenizer.escape(e)){e=e.substring(o.raw.length),t.push(o);continue}if(o=this.tokenizer.tag(e)){e=e.substring(o.raw.length),t.push(o);continue}if(o=this.tokenizer.link(e)){e=e.substring(o.raw.length),t.push(o);continue}if(o=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(o.raw.length);let n=t.at(-1);"text"===o.type&&"text"===n?.type?(n.raw+=o.raw,n.text+=o.text):t.push(o);continue}if(o=this.tokenizer.emStrong(e,n,s)){e=e.substring(o.raw.length),t.push(o);continue}if(o=this.tokenizer.codespan(e)){e=e.substring(o.raw.length),t.push(o);continue}if(o=this.tokenizer.br(e)){e=e.substring(o.raw.length),t.push(o);continue}if(o=this.tokenizer.del(e,n,s)){e=e.substring(o.raw.length),t.push(o);continue}if(o=this.tokenizer.autolink(e)){e=e.substring(o.raw.length),t.push(o);continue}if(!this.state.inLink&&(o=this.tokenizer.url(e))){e=e.substring(o.raw.length),t.push(o);continue}let a=e;if(this.options.extensions?.startInline){let t,n=1/0,r=e.slice(1);this.options.extensions.startInline.forEach((e=>{t=e.call({lexer:this},r),"number"==typeof t&&t>=0&&(n=Math.min(n,t))})),n<1/0&&n>=0&&(a=e.substring(0,n+1))}if(o=this.tokenizer.inlineText(a)){e=e.substring(o.raw.length),"_"!==o.raw.slice(-1)&&(s=o.raw.slice(-1)),r=!0;let n=t.at(-1);"text"===n?.type?(n.raw+=o.raw,n.text+=o.text):t.push(o)}else if(e){this.infiniteLoopError(e.charCodeAt(0));break}}return t}infiniteLoopError(e){let t="Infinite loop on byte: "+e;if(!this.options.silent)throw new Error(t);console.error(t)}},Hn=class{options;parser;constructor(e){this.options=e||Tt}space(e){return""}code({text:e,lang:t,escaped:n}){let r=(t||"").match(Nt.notSpaceStart)?.[0],s=e.replace(Nt.endingNewline,"")+"\n";return r?'<pre><code class="language-'+On(r)+'">'+(n?s:On(s,!0))+"</code></pre>\n":"<pre><code>"+(n?s:On(s,!0))+"</code></pre>\n"}blockquote({tokens:e}){return`<blockquote>\n${this.parser.parse(e)}</blockquote>\n`}html({text:e}){return e}def(e){return""}heading({tokens:e,depth:t}){return`<h${t}>${this.parser.parseInline(e)}</h${t}>\n`}hr(e){return"<hr>\n"}list(e){let t=e.ordered,n=e.start,r="";for(let t=0;t<e.items.length;t++){let n=e.items[t];r+=this.listitem(n)}let s=t?"ol":"ul";return"<"+s+(t&&1!==n?' start="'+n+'"':"")+">\n"+r+"</"+s+">\n"}listitem(e){return`<li>${this.parser.parse(e.tokens)}</li>\n`}checkbox({checked:e}){return"<input "+(e?'checked="" ':"")+'disabled="" type="checkbox"> '}paragraph({tokens:e}){return`<p>${this.parser.parseInline(e)}</p>\n`}table(e){let t="",n="";for(let t=0;t<e.header.length;t++)n+=this.tablecell(e.header[t]);t+=this.tablerow({text:n});let r="";for(let t=0;t<e.rows.length;t++){let s=e.rows[t];n="";for(let e=0;e<s.length;e++)n+=this.tablecell(s[e]);r+=this.tablerow({text:n})}return r&&(r=`<tbody>${r}</tbody>`),"<table>\n<thead>\n"+t+"</thead>\n"+r+"</table>\n"}tablerow({text:e}){return`<tr>\n${e}</tr>\n`}tablecell(e){let t=this.parser.parseInline(e.tokens),n=e.header?"th":"td";return(e.align?`<${n} align="${e.align}">`:`<${n}>`)+t+`</${n}>\n`}strong({tokens:e}){return`<strong>${this.parser.parseInline(e)}</strong>`}em({tokens:e}){return`<em>${this.parser.parseInline(e)}</em>`}codespan({text:e}){return`<code>${On(e,!0)}</code>`}br(e){return"<br>"}del({tokens:e}){return`<del>${this.parser.parseInline(e)}</del>`}link({href:e,title:t,tokens:n}){let r=this.parser.parseInline(n),s=jn(e);if(null===s)return r;let i='<a href="'+(e=s)+'"';return t&&(i+=' title="'+On(t)+'"'),i+=">"+r+"</a>",i}image({href:e,title:t,text:n,tokens:r}){r&&(n=this.parser.parseInline(r,this.parser.textRenderer));let s=jn(e);if(null===s)return On(n);let i=`<img src="${e=s}" alt="${On(n)}"`;return t&&(i+=` title="${On(t)}"`),i+=">",i}text(e){return"tokens"in e&&e.tokens?this.parser.parseInline(e.tokens):"escaped"in e&&e.escaped?e.text:On(e.text)}},Gn=class{strong({text:e}){return e}em({text:e}){return e}codespan({text:e}){return e}del({text:e}){return e}html({text:e}){return e}text({text:e}){return e}link({text:e}){return""+e}image({text:e}){return""+e}br(){return""}checkbox({raw:e}){return e}},Vn=class e{options;renderer;textRenderer;constructor(e){this.options=e||Tt,this.options.renderer=this.options.renderer||new Hn,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Gn}static parse(t,n){return new e(n).parse(t)}static parseInline(t,n){return new e(n).parseInline(t)}parse(e){this.renderer.parser=this;let t="";for(let n=0;n<e.length;n++){let r=e[n];if(this.options.extensions?.renderers?.[r.type]){let e=r,n=this.options.extensions.renderers[e.type].call({parser:this},e);if(!1!==n||!["space","hr","heading","code","table","blockquote","list","checkbox","html","def","paragraph","text"].includes(e.type)){t+=n||"";continue}}let s=r;switch(s.type){case"space":t+=this.renderer.space(s);break;case"hr":t+=this.renderer.hr(s);break;case"heading":t+=this.renderer.heading(s);break;case"code":t+=this.renderer.code(s);break;case"table":t+=this.renderer.table(s);break;case"blockquote":t+=this.renderer.blockquote(s);break;case"list":t+=this.renderer.list(s);break;case"checkbox":t+=this.renderer.checkbox(s);break;case"html":t+=this.renderer.html(s);break;case"def":t+=this.renderer.def(s);break;case"paragraph":t+=this.renderer.paragraph(s);break;case"text":t+=this.renderer.text(s);break;default:{let e='Token with "'+s.type+'" type was not found.';if(this.options.silent)return console.error(e),"";throw new Error(e)}}}return t}parseInline(e,t=this.renderer){this.renderer.parser=this;let n="";for(let r=0;r<e.length;r++){let s=e[r];if(this.options.extensions?.renderers?.[s.type]){let e=this.options.extensions.renderers[s.type].call({parser:this},s);if(!1!==e||!["escape","html","link","image","checkbox","strong","em","codespan","br","del","text"].includes(s.type)){n+=e||"";continue}}let i=s;switch(i.type){case"escape":case"text":n+=t.text(i);break;case"html":n+=t.html(i);break;case"link":n+=t.link(i);break;case"image":n+=t.image(i);break;case"checkbox":n+=t.checkbox(i);break;case"strong":n+=t.strong(i);break;case"em":n+=t.em(i);break;case"codespan":n+=t.codespan(i);break;case"br":n+=t.br(i);break;case"del":n+=t.del(i);break;default:{let e='Token with "'+i.type+'" type was not found.';if(this.options.silent)return console.error(e),"";throw new Error(e)}}}return n}},Jn=class{options;block;constructor(e){this.options=e||Tt}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens","emStrongMask"]);static passThroughHooksRespectAsync=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}emStrongMask(e){return e}provideLexer(e=this.block){return e?Bn.lex:Bn.lexInline}provideParser(e=this.block){return e?Vn.parse:Vn.parseInline}},Kn=new class{defaults={async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null};options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=Vn;Renderer=Hn;TextRenderer=Gn;Lexer=Bn;Tokenizer=Fn;Hooks=Jn;constructor(...e){this.use(...e)}walkTokens(e,t){let n=[];for(let r of e)switch(n=n.concat(t.call(this,r)),r.type){case"table":{let e=r;for(let r of e.header)n=n.concat(this.walkTokens(r.tokens,t));for(let r of e.rows)for(let e of r)n=n.concat(this.walkTokens(e.tokens,t));break}case"list":{let e=r;n=n.concat(this.walkTokens(e.items,t));break}default:{let e=r;this.defaults.extensions?.childTokens?.[e.type]?this.defaults.extensions.childTokens[e.type].forEach((r=>{let s=e[r].flat(1/0);n=n.concat(this.walkTokens(s,t))})):e.tokens&&(n=n.concat(this.walkTokens(e.tokens,t)))}}return n}use(...e){let t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach((e=>{let n={...e};if(n.async=this.defaults.async||n.async||!1,e.extensions&&(e.extensions.forEach((e=>{if(!e.name)throw new Error("extension name required");if("renderer"in e){let n=t.renderers[e.name];t.renderers[e.name]=n?function(...t){let r=e.renderer.apply(this,t);return!1===r&&(r=n.apply(this,t)),r}:e.renderer}if("tokenizer"in e){if(!e.level||"block"!==e.level&&"inline"!==e.level)throw new Error("extension level must be 'block' or 'inline'");let n=t[e.level];n?n.unshift(e.tokenizer):t[e.level]=[e.tokenizer],e.start&&("block"===e.level?t.startBlock?t.startBlock.push(e.start):t.startBlock=[e.start]:"inline"===e.level&&(t.startInline?t.startInline.push(e.start):t.startInline=[e.start]))}"childTokens"in e&&e.childTokens&&(t.childTokens[e.name]=e.childTokens)})),n.extensions=t),e.renderer){let t=this.defaults.renderer||new Hn(this.defaults);for(let n in e.renderer){if(!(n in t))throw new Error(`renderer '${n}' does not exist`);if(["options","parser"].includes(n))continue;let r=n,s=e.renderer[r],i=t[r];t[r]=(...e)=>{let n=s.apply(t,e);return!1===n&&(n=i.apply(t,e)),n||""}}n.renderer=t}if(e.tokenizer){let t=this.defaults.tokenizer||new Fn(this.defaults);for(let n in e.tokenizer){if(!(n in t))throw new Error(`tokenizer '${n}' does not exist`);if(["options","rules","lexer"].includes(n))continue;let r=n,s=e.tokenizer[r],i=t[r];t[r]=(...e)=>{let n=s.apply(t,e);return!1===n&&(n=i.apply(t,e)),n}}n.tokenizer=t}if(e.hooks){let t=this.defaults.hooks||new Jn;for(let n in e.hooks){if(!(n in t))throw new Error(`hook '${n}' does not exist`);if(["options","block"].includes(n))continue;let r=n,s=e.hooks[r],i=t[r];Jn.passThroughHooks.has(n)?t[r]=e=>{if(this.defaults.async&&Jn.passThroughHooksRespectAsync.has(n))return(async()=>{let n=await s.call(t,e);return i.call(t,n)})();let r=s.call(t,e);return i.call(t,r)}:t[r]=(...e)=>{if(this.defaults.async)return(async()=>{let n=await s.apply(t,e);return!1===n&&(n=await i.apply(t,e)),n})();let n=s.apply(t,e);return!1===n&&(n=i.apply(t,e)),n}}n.hooks=t}if(e.walkTokens){let t=this.defaults.walkTokens,r=e.walkTokens;n.walkTokens=function(e){let n=[];return n.push(r.call(this,e)),t&&(n=n.concat(t.call(this,e))),n}}this.defaults={...this.defaults,...n}})),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return Bn.lex(e,t??this.defaults)}parser(e,t){return Vn.parse(e,t??this.defaults)}parseMarkdown(e){return(t,n)=>{let r={...n},s={...this.defaults,...r},i=this.onError(!!s.silent,!!s.async);if(!0===this.defaults.async&&!1===r.async)return i(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof t>"u"||null===t)return i(new Error("marked(): input parameter is undefined or null"));if("string"!=typeof t)return i(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(t)+", string expected"));if(s.hooks&&(s.hooks.options=s,s.hooks.block=e),s.async)return(async()=>{let n=s.hooks?await s.hooks.preprocess(t):t,r=await(s.hooks?await s.hooks.provideLexer(e):e?Bn.lex:Bn.lexInline)(n,s),i=s.hooks?await s.hooks.processAllTokens(r):r;s.walkTokens&&await Promise.all(this.walkTokens(i,s.walkTokens));let o=await(s.hooks?await s.hooks.provideParser(e):e?Vn.parse:Vn.parseInline)(i,s);return s.hooks?await s.hooks.postprocess(o):o})().catch(i);try{s.hooks&&(t=s.hooks.preprocess(t));let n=(s.hooks?s.hooks.provideLexer(e):e?Bn.lex:Bn.lexInline)(t,s);s.hooks&&(n=s.hooks.processAllTokens(n)),s.walkTokens&&this.walkTokens(n,s.walkTokens);let r=(s.hooks?s.hooks.provideParser(e):e?Vn.parse:Vn.parseInline)(n,s);return s.hooks&&(r=s.hooks.postprocess(r)),r}catch(e){return i(e)}}}onError(e,t){return n=>{if(n.message+="\nPlease report this to https://github.com/markedjs/marked.",e){let e="<p>An error occurred:</p><pre>"+On(n.message+"",!0)+"</pre>";return t?Promise.resolve(e):e}if(t)return Promise.reject(n);throw n}}};function Zn(e,t){return Kn.parse(e,t)}function Yn(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}Zn.options=Zn.setOptions=function(e){return Kn.setOptions(e),Zn.defaults=Kn.defaults,Rt(Zn.defaults),Zn},Zn.getDefaults=_t,Zn.defaults=Tt,Zn.use=function(...e){return Kn.use(...e),Zn.defaults=Kn.defaults,Rt(Zn.defaults),Zn},Zn.walkTokens=function(e,t){return Kn.walkTokens(e,t)},Zn.parseInline=Kn.parseInline,Zn.Parser=Vn,Zn.parser=Vn.parse,Zn.Renderer=Hn,Zn.TextRenderer=Gn,Zn.Lexer=Bn,Zn.lexer=Bn.lex,Zn.Tokenizer=Fn,Zn.Hooks=Jn,Zn.parse=Zn,Zn.options,Zn.setOptions,Zn.walkTokens,Zn.parseInline,Vn.parse,Bn.lex;var Xn,Qn={exports:{}};var er,tr=(Xn||(Xn=1,er=Qn,function(e,t){er.exports=t()}(0,(function(){var e=[],t=[],n={},r={},s={};function i(e){return"string"==typeof e?new RegExp("^"+e+"$","i"):e}function o(e,t){return e===t?t:e===e.toLowerCase()?t.toLowerCase():e===e.toUpperCase()?t.toUpperCase():e[0]===e[0].toUpperCase()?t.charAt(0).toUpperCase()+t.substr(1).toLowerCase():t.toLowerCase()}function a(e,t){return e.replace(t[0],(function(n,r){var s,i,a=(s=t[1],i=arguments,s.replace(/\$(\d{1,2})/g,(function(e,t){return i[t]||""})));return o(""===n?e[r-1]:n,a)}))}function c(e,t,r){if(!e.length||n.hasOwnProperty(e))return t;for(var s=r.length;s--;){var i=r[s];if(i[0].test(t))return a(t,i)}return t}function l(e,t,n){return function(r){var s=r.toLowerCase();return t.hasOwnProperty(s)?o(r,s):e.hasOwnProperty(s)?o(r,e[s]):c(s,r,n)}}function u(e,t,n,r){return function(r){var s=r.toLowerCase();return!!t.hasOwnProperty(s)||!e.hasOwnProperty(s)&&c(s,s,n)===s}}function d(e,t,n){return(n?t+" ":"")+(1===t?d.singular(e):d.plural(e))}return d.plural=l(s,r,e),d.isPlural=u(s,r,e),d.singular=l(r,s,t),d.isSingular=u(r,s,t),d.addPluralRule=function(t,n){e.push([i(t),n])},d.addSingularRule=function(e,n){t.push([i(e),n])},d.addUncountableRule=function(e){"string"!=typeof e?(d.addPluralRule(e,"$0"),d.addSingularRule(e,"$0")):n[e.toLowerCase()]=!0},d.addIrregularRule=function(e,t){t=t.toLowerCase(),e=e.toLowerCase(),s[e]=t,r[t]=e},[["I","we"],["me","us"],["he","they"],["she","they"],["them","them"],["myself","ourselves"],["yourself","yourselves"],["itself","themselves"],["herself","themselves"],["himself","themselves"],["themself","themselves"],["is","are"],["was","were"],["has","have"],["this","these"],["that","those"],["echo","echoes"],["dingo","dingoes"],["volcano","volcanoes"],["tornado","tornadoes"],["torpedo","torpedoes"],["genus","genera"],["viscus","viscera"],["stigma","stigmata"],["stoma","stomata"],["dogma","dogmata"],["lemma","lemmata"],["schema","schemata"],["anathema","anathemata"],["ox","oxen"],["axe","axes"],["die","dice"],["yes","yeses"],["foot","feet"],["eave","eaves"],["goose","geese"],["tooth","teeth"],["quiz","quizzes"],["human","humans"],["proof","proofs"],["carve","carves"],["valve","valves"],["looey","looies"],["thief","thieves"],["groove","grooves"],["pickaxe","pickaxes"],["passerby","passersby"]].forEach((function(e){return d.addIrregularRule(e[0],e[1])})),[[/s?$/i,"s"],[/[^\u0000-\u007F]$/i,"$0"],[/([^aeiou]ese)$/i,"$1"],[/(ax|test)is$/i,"$1es"],[/(alias|[^aou]us|t[lm]as|gas|ris)$/i,"$1es"],[/(e[mn]u)s?$/i,"$1s"],[/([^l]ias|[aeiou]las|[ejzr]as|[iu]am)$/i,"$1"],[/(alumn|syllab|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i,"$1i"],[/(alumn|alg|vertebr)(?:a|ae)$/i,"$1ae"],[/(seraph|cherub)(?:im)?$/i,"$1im"],[/(her|at|gr)o$/i,"$1oes"],[/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|automat|quor)(?:a|um)$/i,"$1a"],[/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)(?:a|on)$/i,"$1a"],[/sis$/i,"ses"],[/(?:(kni|wi|li)fe|(ar|l|ea|eo|oa|hoo)f)$/i,"$1$2ves"],[/([^aeiouy]|qu)y$/i,"$1ies"],[/([^ch][ieo][ln])ey$/i,"$1ies"],[/(x|ch|ss|sh|zz)$/i,"$1es"],[/(matr|cod|mur|sil|vert|ind|append)(?:ix|ex)$/i,"$1ices"],[/\b((?:tit)?m|l)(?:ice|ouse)$/i,"$1ice"],[/(pe)(?:rson|ople)$/i,"$1ople"],[/(child)(?:ren)?$/i,"$1ren"],[/eaux$/i,"$0"],[/m[ae]n$/i,"men"],["thou","you"]].forEach((function(e){return d.addPluralRule(e[0],e[1])})),[[/s$/i,""],[/(ss)$/i,"$1"],[/(wi|kni|(?:after|half|high|low|mid|non|night|[^\w]|^)li)ves$/i,"$1fe"],[/(ar|(?:wo|[ae])l|[eo][ao])ves$/i,"$1f"],[/ies$/i,"y"],[/\b([pl]|zomb|(?:neck|cross)?t|coll|faer|food|gen|goon|group|lass|talk|goal|cut)ies$/i,"$1ie"],[/\b(mon|smil)ies$/i,"$1ey"],[/\b((?:tit)?m|l)ice$/i,"$1ouse"],[/(seraph|cherub)im$/i,"$1"],[/(x|ch|ss|sh|zz|tto|go|cho|alias|[^aou]us|t[lm]as|gas|(?:her|at|gr)o|[aeiou]ris)(?:es)?$/i,"$1"],[/(analy|diagno|parenthe|progno|synop|the|empha|cri|ne)(?:sis|ses)$/i,"$1sis"],[/(movie|twelve|abuse|e[mn]u)s$/i,"$1"],[/(test)(?:is|es)$/i,"$1is"],[/(alumn|syllab|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i,"$1us"],[/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|quor)a$/i,"$1um"],[/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)a$/i,"$1on"],[/(alumn|alg|vertebr)ae$/i,"$1a"],[/(cod|mur|sil|vert|ind)ices$/i,"$1ex"],[/(matr|append)ices$/i,"$1ix"],[/(pe)(rson|ople)$/i,"$1rson"],[/(child)ren$/i,"$1"],[/(eau)x?$/i,"$1"],[/men$/i,"man"]].forEach((function(e){return d.addSingularRule(e[0],e[1])})),["adulthood","advice","agenda","aid","aircraft","alcohol","ammo","analytics","anime","athletics","audio","bison","blood","bream","buffalo","butter","carp","cash","chassis","chess","clothing","cod","commerce","cooperation","corps","debris","diabetes","digestion","elk","energy","equipment","excretion","expertise","firmware","flounder","fun","gallows","garbage","graffiti","hardware","headquarters","health","herpes","highjinks","homework","housework","information","jeans","justice","kudos","labour","literature","machinery","mackerel","mail","media","mews","moose","music","mud","manga","news","only","personnel","pike","plankton","pliers","police","pollution","premises","rain","research","rice","salmon","scissors","series","sewage","shambles","shrimp","software","species","staff","swine","tennis","traffic","transportation","trout","tuna","wealth","welfare","whiting","wildebeest","wildlife","you",/pok[eé]mon$/i,/[^aeiou]ese$/i,/deer$/i,/fish$/i,/measles$/i,/o[iu]s$/i,/pox$/i,/sheep$/i].forEach(d.addUncountableRule),d}))),Qn.exports),nr=Yn(tr),rr=function(e){var t={};try{t.WeakMap=WeakMap}catch(u){t.WeakMap=function(e,t){var n=t.defineProperty,r=t.hasOwnProperty,s=i.prototype;return s.delete=function(e){return this.has(e)&&delete e[this._]},s.get=function(e){return this.has(e)?e[this._]:void 0},s.has=function(e){return r.call(e,this._)},s.set=function(e,t){return n(e,this._,{configurable:!0,value:t}),this},i;function i(t){n(this,"_",{value:"_@ungap/weakmap"+e++}),t&&t.forEach(o,this)}function o(e){this.set(e[0],e[1])}}(Math.random(),Object)}var n=t.WeakMap,r={};try{r.WeakSet=WeakSet}catch(u){!function(e,t){var n=s.prototype;function s(){t(this,"_",{value:"_@ungap/weakmap"+e++})}n.add=function(e){return this.has(e)||t(e,this._,{value:!0,configurable:!0}),this},n.has=function(e){return this.hasOwnProperty.call(e,this._)},n.delete=function(e){return this.has(e)&&delete e[this._]},r.WeakSet=s}(Math.random(),Object.defineProperty)}function s(e,t,n,r,s,i){for(var o=("selectedIndex"in t),a=o;r<s;){var c,l=e(n[r],1);t.insertBefore(l,i),o&&a&&l.selected&&(a=!a,c=t.selectedIndex,t.selectedIndex=c<0?r:d.call(t.querySelectorAll("option"),l)),r++}}function i(e,t){return e==t}function o(e){return e}function a(e,t,n,r,s,i,o){var a=i-s;if(a<1)return-1;for(;a<=n-t;){for(var c=t,l=s;c<n&&l<i&&o(e[c],r[l]);)c++,l++;if(l===i)return t;t=c+1}return-1}function c(e,t,n,r,s){return n<r?e(t[n],0):0<n?e(t[n-1],-0).nextSibling:s}function l(e,t,n,r){for(;n<r;)h(e(t[n++],-1))}var u=r.WeakSet,d=[].indexOf,p=function(e,t,n){for(var r=1,s=t;r<s;){var i=(r+s)/2>>>0;n<e[i]?s=i:r=1+i}return r},h=function(e){return(e.remove||function(){var e=this.parentNode;e&&e.removeChild(this)}).call(e)};function f(e,t,n,r){for(var u=(r=r||{}).compare||i,d=r.node||o,h=null==r.before?null:d(r.before,0),f=t.length,m=f,g=0,b=n.length,y=0;g<m&&y<b&&u(t[g],n[y]);)g++,y++;for(;g<m&&y<b&&u(t[m-1],n[b-1]);)m--,b--;var w=g===m,v=y===b;if(w&&v)return n;if(w&&y<b)return s(d,e,n,y,b,c(d,t,g,f,h)),n;if(v&&g<m)return l(d,t,g,m),n;var k=m-g,$=b-y,x=-1;if(k<$){if(-1<(x=a(n,y,b,t,g,m,u)))return s(d,e,n,y,x,d(t[g],0)),s(d,e,n,x+k,b,c(d,t,m,f,h)),n}else if($<k&&-1<(x=a(t,g,m,n,y,b,u)))return l(d,t,g,x),l(d,t,x+$,m),n;return k<2||$<2?(s(d,e,n,y,b,d(t[g],0)),l(d,t,g,m)):k==$&&function(e,t,n,r,s,i){for(;r<s&&i(n[r],e[t-1]);)r++,t--;return 0===t}(n,b,t,g,m,u)?s(d,e,n,y,b,c(d,t,m,f,h)):function(e,t,n,r,i,o,a,c,u,d,h,f,m){!function(e,t,n,r,i,o,a,c,u){for(var d=[],p=e.length,h=a,f=0;f<p;)switch(e[f++]){case 0:i++,h++;break;case 1:d.push(r[i]),s(t,n,r,i++,i,h<c?t(o[h],0):u);break;case-1:h++}for(f=0;f<p;)switch(e[f++]){case 0:a++;break;case-1:-1<d.indexOf(o[a])?a++:l(t,o,a++,a)}}(function(e,t,n,r,s,i,o){var a,c,l,u,d,p,h=n+i,f=[];e:for(b=0;b<=h;b++){if(50<b)return null;for(p=b-1,u=b?f[b-1]:[0,0],d=f[b]=[],a=-b;a<=b;a+=2){for(c=(l=a===-b||a!==b&&u[p+a-1]<u[p+a+1]?u[p+a+1]:u[p+a-1]+1)-a;l<i&&c<n&&o(r[s+l],e[t+c]);)l++,c++;if(l===i&&c===n)break e;d[b+a]=l}}for(var m=Array(b/2+h/2),g=m.length-1,b=f.length-1;0<=b;b--){for(;0<l&&0<c&&o(r[s+l-1],e[t+c-1]);)m[g--]=0,l--,c--;if(!b)break;p=b-1,u=b?f[b-1]:[0,0],(a=l-c)==-b||a!==b&&u[p+a-1]<u[p+a+1]?(c--,m[g--]=1):(l--,m[g--]=-1)}return m}(n,r,o,a,c,d,f)||function(e,t,n,r,s,i,o,a){var c=0,l=r<a?r:a,u=Array(l++),d=Array(l);d[0]=-1;for(var h=1;h<l;h++)d[h]=o;for(var f=s.slice(i,o),m=t;m<n;m++){var g,b=f.indexOf(e[m]);-1<b&&-1<(c=p(d,l,g=b+i))&&(d[c]=g,u[c]={newi:m,oldi:g,prev:u[c-1]})}for(c=--l,--o;d[c]>o;)--c;l=a+r-c;var y=Array(l),w=u[c];for(--n;w;){for(var v=w.newi,k=w.oldi;v<n;)y[--l]=1,--n;for(;k<o;)y[--l]=-1,--o;y[--l]=0,--n,--o,w=w.prev}for(;t<=n;)y[--l]=1,--n;for(;i<=o;)y[--l]=-1,--o;return y}(n,r,i,o,a,c,u,d),e,t,n,r,a,c,h,m)}(d,e,n,y,b,$,t,g,m,k,f,u,h),n}var m={};function g(t,n){n=n||{};var r=e.createEvent("CustomEvent");return r.initCustomEvent(t,!!n.bubbles,!!n.cancelable,n.detail),r}m.CustomEvent="function"==typeof CustomEvent?CustomEvent:(g["prototype"]=new g("").constructor.prototype,g);var b=m.CustomEvent,y={};try{y.Map=Map}catch(u){y.Map=function(){var e=0,t=[],n=[];return{delete:function(s){var i=r(s);return i&&(t.splice(e,1),n.splice(e,1)),i},forEach:function(e,r){t.forEach((function(t,s){e.call(r,n[s],t,this)}),this)},get:function(t){return r(t)?n[e]:void 0},has:r,set:function(s,i){return n[r(s)?e:t.push(s)-1]=i,this}};function r(n){return-1<(e=t.indexOf(n))}}}var w=y.Map;function v(){return this}function k(e,t){var n="_"+e+"$";return{get:function(){return this[n]||$(this,n,t.call(this,e))},set:function(e){$(this,n,e)}}}var $=function(e,t,n){return Object.defineProperty(e,t,{configurable:!0,value:"function"==typeof n?function(){return e._wire$=n.apply(this,arguments)}:n})[t]};Object.defineProperties(v.prototype,{ELEMENT_NODE:{value:1},nodeType:{value:-1}});var x,C,S,_,T,R,E={},L={},A=[],P=L.hasOwnProperty,N=0,I={attributes:E,define:function(e,t){e.indexOf("-")<0?(e in L||(N=A.push(e)),L[e]=t):E[e]=t},invoke:function(e,t){for(var n=0;n<N;n++){var r=A[n];if(P.call(e,r))return L[r](e[r],t)}}},D=Array.isArray||(C=(x={}.toString).call([]),function(e){return x.call(e)===C}),O=(S=e,_="fragment",R="content"in z(T="template")?function(e){var t=z(T);return t.innerHTML=e,t.content}:function(e){var t,n=z(_),r=z(T);return j(n,/^[^\S]*?<(col(?:group)?|t(?:head|body|foot|r|d|h))/i.test(e)?(t=RegExp.$1,r.innerHTML="<table>"+e+"</table>",r.querySelectorAll(t)):(r.innerHTML=e,r.childNodes)),n},function(e,t){return("svg"===t?function(e){var t=z(_),n=z("div");return n.innerHTML='<svg xmlns="http://www.w3.org/2000/svg">'+e+"</svg>",j(t,n.firstChild.childNodes),t}:R)(e)});function j(e,t){for(var n=t.length;n--;)e.appendChild(t[0])}function z(e){return e===_?S.createDocumentFragment():S.createElementNS("http://www.w3.org/1999/xhtml",e)}var M,U,q,W,F,B,H,G,V,J=(U="appendChild",q="cloneNode",W="createTextNode",B=(F="importNode")in(M=e),(H=M.createDocumentFragment())[U](M[W]("g")),H[U](M[W]("")),(B?M[F](H,!0):H[q](!0)).childNodes.length<2?function e(t,n){for(var r=t[q](),s=t.childNodes||[],i=s.length,o=0;n&&o<i;o++)r[U](e(s[o],n));return r}:B?M[F]:function(e,t){return e[q](!!t)}),K="".trim||function(){return String(this).replace(/^\s+|\s+/g,"")},Z="-"+Math.random().toFixed(6)+"%",Y=!1;try{G=e.createElement("template"),V="tabindex","content"in G&&(G.innerHTML="<p "+V+'="'+Z+'"></p>',G.content.childNodes[0].getAttribute(V)==Z)||(Z="_dt: "+Z.slice(1,-1)+";",Y=!0)}catch(u){}var X="\x3c!--"+Z+"--\x3e",Q=8,ee=1,te=3,ne=/^(?:style|textarea)$/i,re=/^(?:area|base|br|col|embed|hr|img|input|keygen|link|menuitem|meta|param|source|track|wbr)$/i,se=" \\f\\n\\r\\t",ie="[^"+se+"\\/>\"'=]+",oe="["+se+"]+"+ie,ae="<([A-Za-z]+[A-Za-z0-9:._-]*)((?:",ce="(?:\\s*=\\s*(?:'[^']*?'|\"[^\"]*?\"|<[^>]*?>|"+ie.replace("\\/","")+"))?)",le=new RegExp(ae+oe+ce+"+)(["+se+"]*/?>)","g"),ue=new RegExp(ae+oe+ce+"*)(["+se+"]*/>)","g"),de=new RegExp("("+oe+"\\s*=\\s*)(['\"]?)"+X+"\\2","gi");function pe(e,t,n,r){return"<"+t+n.replace(de,he)+r}function he(e,t,n){return t+(n||'"')+Z+(n||'"')}function fe(e,t,n){return re.test(t)?e:"<"+t+n+"></"+t+">"}var me=Y?function(e,t){var n=t.join(" ");return t.slice.call(e,0).sort((function(e,t){return n.indexOf(e.name)<=n.indexOf(t.name)?-1:1}))}:function(e,t){return t.slice.call(e,0)};function ge(t,n,r,s){for(var i=t.childNodes,o=i.length,a=0;a<o;){var c=i[a];switch(c.nodeType){case ee:var l=s.concat(a);!function(t,n,r,s){for(var i,o=t.attributes,a=[],c=[],l=me(o,r),u=l.length,d=0;d<u;){var p=l[d++],h=p.value===Z;if(h||1<(i=p.value.split(X)).length){var f=p.name;if(a.indexOf(f)<0){a.push(f);var m=r.shift().replace(h?/^(?:|[\S\s]*?\s)(\S+?)\s*=\s*('|")?$/:new RegExp("^(?:|[\\S\\s]*?\\s)("+f+")\\s*=\\s*('|\")[\\S\\s]*","i"),"$1"),g=o[m]||o[m.toLowerCase()];if(h)n.push(be(g,s,m,null));else{for(var b=i.length-2;b--;)r.shift();n.push(be(g,s,m,i))}}c.push(p)}}for(var y=((d=0)<(u=c.length)&&Y&&!("ownerSVGElement"in t));d<u;){var w=c[d++];y&&(w.value=""),t.removeAttribute(w.name)}var v=t.nodeName;if(/^script$/i.test(v)){var k=e.createElement(v);for(u=o.length,d=0;d<u;)k.setAttributeNode(o[d++].cloneNode(!0));k.textContent=t.textContent,t.parentNode.replaceChild(k,t)}}(c,n,r,l),ge(c,n,r,l);break;case Q:var u=c.textContent;if(u===Z)r.shift(),n.push(ne.test(t.nodeName)?ye(t,s):{type:"any",node:c,path:s.concat(a)});else switch(u.slice(0,2)){case"/*":if("*/"!==u.slice(-2))break;case"👻":t.removeChild(c),a--,o--}break;case te:ne.test(t.nodeName)&&K.call(c.textContent)===X&&(r.shift(),n.push(ye(t,s)))}a++}}function be(e,t,n,r){return{type:"attr",node:e,path:t,name:n,sparse:r}}function ye(e,t){return{type:"text",node:e,path:t}}var we,ve=(we=new n,{get:function(e){return we.get(e)},set:function(e,t){return we.set(e,t),t}});function ke(e,t){var n=(e.convert||function(e){return e.join(X).replace(ue,fe).replace(le,pe)})(t),r=e.transform;r&&(n=r(n));var s=O(n,e.type);xe(s);var i=[];return ge(s,i,t.slice(0),[]),{content:s,updates:function(n){for(var r=[],s=i.length,o=0,a=0;o<s;){var c=i[o++],l=function(e,t){for(var n=t.length,r=0;r<n;)e=e.childNodes[t[r++]];return e}(n,c.path);switch(c.type){case"any":r.push({fn:e.any(l,[]),sparse:!1});break;case"attr":var u=c.sparse,d=e.attribute(l,c.name,c.node);null===u?r.push({fn:d,sparse:!1}):(a+=u.length-2,r.push({fn:d,sparse:!0,values:u}));break;case"text":r.push({fn:e.text(l),sparse:!1}),l.textContent=""}}return s+=a,function(){var e=arguments.length;if(s!==e-1)throw new Error(e-1+" values instead of "+s+"\n"+t.join("${value}"));for(var i=1,o=1;i<e;){var a=r[i-o];if(a.sparse){var c=a.values,l=c[0],u=1,d=c.length;for(o+=d-2;u<d;)l+=arguments[i++]+c[u++];a.fn(l)}else a.fn(arguments[i++])}return n}}}}var $e=[];function xe(e){for(var t=e.childNodes,n=t.length;n--;){var r=t[n];1!==r.nodeType&&0===K.call(r.textContent).length&&e.removeChild(r)}}var Ce,Se,_e=(Ce=/acit|ex(?:s|g|n|p|$)|rph|ows|mnc|ntw|ine[ch]|zoo|^ord/i,Se=/([^A-Z])([A-Z]+)/g,function(e,t){return"ownerSVGElement"in e?function(e,t){var n;return(n=t?t.cloneNode(!0):(e.setAttribute("style","--hyper:style;"),e.getAttributeNode("style"))).value="",e.setAttributeNode(n),Re(n,!0)}(e,t):Re(e.style,!1)});function Te(e,t,n){return t+"-"+n.toLowerCase()}function Re(e,t){var n,r;return function(s){var i,o,a,c;switch(typeof s){case"object":if(s){if("object"===n){if(!t&&r!==s)for(o in r)o in s||(e[o]="")}else t?e.value="":e.cssText="";for(o in i=t?{}:e,s)a="number"!=typeof(c=s[o])||Ce.test(o)?c:c+"px",!t&&/^--/.test(o)?i.setProperty(o,a):i[o]=a;n="object",t?e.value=function(e){var t,n=[];for(t in e)n.push(t.replace(Se,Te),":",e[t],";");return n.join("")}(r=i):r=s;break}default:r!=s&&(n="string",r=s,t?e.value=s||"":e.cssText=s||"")}}}var Ee,Le,Ae=(Ee=[].slice,(Le=Pe.prototype).ELEMENT_NODE=1,Le.nodeType=111,Le.remove=function(e){var t,n=this.childNodes,r=this.firstChild,s=this.lastChild;return this._=null,e&&2===n.length?s.parentNode.removeChild(s):((t=this.ownerDocument.createRange()).setStartBefore(e?n[1]:r),t.setEndAfter(s),t.deleteContents()),r},Le.valueOf=function(e){var t=this._,n=null==t;if(n&&(t=this._=this.ownerDocument.createDocumentFragment()),n||e)for(var r=this.childNodes,s=0,i=r.length;s<i;s++)t.appendChild(r[s]);return t},Pe);function Pe(e){var t=this.childNodes=Ee.call(e,0);this.firstChild=t[0],this.lastChild=t[t.length-1],this.ownerDocument=t[0].ownerDocument,this._=null}function Ne(e){return{html:e}}function Ie(e,t){switch(e.nodeType){case Be:return 1/t<0?t?e.remove(!0):e.lastChild:t?e.valueOf(!0):e.firstChild;case Fe:return Ie(e.render(),t);default:return e}}function De(e,t){t(e.placeholder),"text"in e?Promise.resolve(e.text).then(String).then(t):"any"in e?Promise.resolve(e.any).then(t):"html"in e?Promise.resolve(e.html).then(Ne).then(t):Promise.resolve(I.invoke(e,t)).then(t)}function Oe(e){return null!=e&&"then"in e}var je,ze,Me,Ue,qe,We="ownerSVGElement",Fe=v.prototype.nodeType,Be=Ae.prototype.nodeType,He=(ze=(je={Event:b,WeakSet:u}).Event,Me=je.WeakSet,Ue=!0,qe=null,function(e){return Ue&&(Ue=!Ue,qe=new Me,function(e){var t=new Me,n=new Me;try{new MutationObserver(o).observe(e,{subtree:!0,childList:!0})}catch(t){var r=0,s=[],i=function(e){s.push(e),clearTimeout(r),r=setTimeout((function(){o(s.splice(r=0,s.length))}),0)};e.addEventListener("DOMNodeRemoved",(function(e){i({addedNodes:[],removedNodes:[e.target]})}),!0),e.addEventListener("DOMNodeInserted",(function(e){i({addedNodes:[e.target],removedNodes:[]})}),!0)}function o(e){for(var r,s=e.length,i=0;i<s;i++)a((r=e[i]).removedNodes,"disconnected",n,t),a(r.addedNodes,"connected",t,n)}function a(e,t,n,r){for(var s,i=new ze(t),o=e.length,a=0;a<o;1===(s=e[a++]).nodeType&&function e(t,n,r,s,i){qe.has(t)&&!s.has(t)&&(i.delete(t),s.add(t),t.dispatchEvent(n));for(var o=t.children||[],a=o.length,c=0;c<a;e(o[c++],n,r,s,i));}(s,i,t,n,r));}}(e.ownerDocument)),qe.add(e),e}),Ge=/^(?:form|list)$/i,Ve=[].slice;function Je(t){return this.type=t,function(t){var n=$e,r=xe;return function(s){var i,o,a;return n!==s&&(i=t,o=n=s,a=ve.get(o)||ve.set(o,ke(i,o)),r=a.updates(J.call(e,a.content,!0))),r.apply(null,arguments)}}(this)}var Ke=!(Je.prototype={attribute:function(e,t,n){var r,s=We in e;if("style"===t)return _e(e,n,s);if("."===t.slice(0,1))return l=e,u=t.slice(1),s?function(e){try{l[u]=e}catch(t){l.setAttribute(u,e)}}:function(e){l[u]=e};if("?"===t.slice(0,1))return o=e,a=t.slice(1),function(e){c!==!!e&&((c=!!e)?o.setAttribute(a,""):o.removeAttribute(a))};if(/^on/.test(t)){var i=t.slice(2);return"connected"===i||"disconnected"===i?He(e):t.toLowerCase()in e&&(i=i.toLowerCase()),function(t){r!==t&&(r&&e.removeEventListener(i,r,!1),(r=t)&&e.addEventListener(i,t,!1))}}if("data"===t||!s&&t in e&&!Ge.test(t))return function(n){r!==n&&(r=n,e[t]!==n&&null==n?(e[t]="",e.removeAttribute(t)):e[t]=n)};if(t in I.attributes)return function(n){var s=I.attributes[t](e,n);r!==s&&(null==(r=s)?e.removeAttribute(t):e.setAttribute(t,s))};var o,a,c,l,u,d=!1,p=n.cloneNode(!0);return function(t){r!==t&&(r=t,p.value!==t&&(null==t?(d&&(d=!1,e.removeAttributeNode(p)),p.value=t):(p.value=t,d||(d=!0,e.setAttributeNode(p)))))}},any:function(e,t){var n,r={node:Ie,before:e},s=We in e?"svg":"html",i=!1;return function o(a){switch(typeof a){case"string":case"number":case"boolean":i?n!==a&&(n=a,t[0].textContent=a):(i=!0,n=a,t=f(e.parentNode,t,[(c=a,e.ownerDocument.createTextNode(c))],r));break;case"function":o(a(e));break;case"object":case"undefined":if(null==a){i=!1,t=f(e.parentNode,t,[],r);break}default:if(i=!1,D(n=a))if(0===a.length)t.length&&(t=f(e.parentNode,t,[],r));else switch(typeof a[0]){case"string":case"number":case"boolean":o({html:a});break;case"object":if(D(a[0])&&(a=a.concat.apply([],a)),Oe(a[0])){Promise.all(a).then(o);break}default:t=f(e.parentNode,t,a,r)}else"ELEMENT_NODE"in a?t=f(e.parentNode,t,11===a.nodeType?Ve.call(a.childNodes):[a],r):Oe(a)?a.then(o):"placeholder"in a?De(a,o):"text"in a?o(String(a.text)):"any"in a?o(a.any):"html"in a?t=f(e.parentNode,t,Ve.call(O([].concat(a.html).join(""),s).childNodes),r):o("length"in a?Ve.call(a):I.invoke(a,o))}var c}},text:function(e){var t;return function n(r){var s;t!==r&&("object"==(s=typeof(t=r))&&r?Oe(r)?r.then(n):"placeholder"in r?De(r,n):n("text"in r?String(r.text):"any"in r?r.any:"html"in r?[].concat(r.html).join(""):"length"in r?Ve.call(r).join(""):I.invoke(r,n)):"function"==s?n(r(e)):e.textContent=null==r?"":r)}}}),Ze=function(t){var r,s,i,o,a=(r=(e.defaultView.navigator||{}).userAgent,/(Firefox|Safari)\/(\d+)/.test(r)&&!/(Chrom[eium]+|Android)\/(\d+)/.test(r)),c=!("raw"in t)||t.propertyIsEnumerable("raw")||!Object.isFrozen(t.raw);return a||c?(s={},i=function(e){for(var t=".",n=0;n<e.length;n++)t+=e[n].length+"."+e[n];return s[t]||(s[t]=e)},Ze=c?i:(o=new n,function(e){return o.get(e)||(n=i(t=e),o.set(t,n),n);var t,n})):Ke=!0,Ye(t)};function Ye(e){return Ke?e:Ze(e)}function Xe(e){for(var t=arguments.length,n=[Ye(e)],r=1;r<t;)n.push(arguments[r++]);return n}var Qe=new n,et=function(e){var t,n,r;return function(){var s=Xe.apply(null,arguments);return r!==s[0]?(r=s[0],n=new Je(e),t=nt(n.apply(n,s))):n.apply(n,s),t}},tt=function(e,t){var n=t.indexOf(":"),r=Qe.get(e),s=t;return-1<n&&(s=t.slice(n+1),t=t.slice(0,n)||"html"),r||Qe.set(e,r={}),r[s]||(r[s]=et(t))},nt=function(e){var t=e.childNodes,n=t.length;return 1===n?t[0]:n?new Ae(t):e},rt=new n;function st(){var e=rt.get(this),t=Xe.apply(null,arguments);return e&&e.template===t[0]?e.tagger.apply(null,t):function(e){var t=new Je(We in this?"svg":"html");rt.set(this,{tagger:t,template:e}),this.textContent="",this.appendChild(t.apply(null,arguments))}.apply(this,t),this}var it,ot,at,ct,lt=I.define,ut=Je.prototype;function dt(e){return arguments.length<2?null==e?et("html"):"string"==typeof e?dt.wire(null,e):"raw"in e?et("html")(e):"nodeType"in e?dt.bind(e):tt(e,"html"):("raw"in e?et("html"):dt.wire).apply(null,arguments)}return dt.Component=v,dt.bind=function(e){return st.bind(e)},dt.define=lt,dt.diff=f,(dt.hyper=dt).observe=He,dt.tagger=ut,dt.wire=function(e,t){return null==e?et(t||"html"):tt(e,t||"html")},dt._={WeakMap:n,WeakSet:u},it=et,ot=new n,at=Object.create,ct=function(e,t){var n={w:null,p:null};return t.set(e,n),n},Object.defineProperties(v,{for:{configurable:!0,value:function(e,t){return function(e,t,r,s){var i,o,a,c=t.get(e)||ct(e,t);switch(typeof s){case"object":case"function":var l=c.w||(c.w=new n);return l.get(s)||(i=l,o=s,a=new e(r),i.set(o,a),a);default:var u=c.p||(c.p=at(null));return u[s]||(u[s]=new e(r))}}(this,ot.get(e)||(r=e,s=new w,ot.set(r,s),s),e,null==t?"default":t);var r,s}}}),Object.defineProperties(v.prototype,{handleEvent:{value:function(e){var t=e.currentTarget;this["getAttribute"in t&&t.getAttribute("data-call")||"on"+e.type](e)}},html:k("html",it),svg:k("svg",it),state:k("state",(function(){return this.defaultState})),defaultState:{get:function(){return{}}},dispatch:{value:function(e,t){var n=this._wire$;if(n){var r=new b(e,{bubbles:!0,cancelable:!0,detail:t});return r.component=this,(n.dispatchEvent?n:n.firstChild).dispatchEvent(r)}return!1}},setState:{value:function(e,t){var n=this.state,r="function"==typeof e?e.call(this,n):e;for(var s in r)n[s]=r[s];return!1!==t&&this.render(),this}}}),dt}(document);const{Component:sr,bind:ir,define:or,diff:ar,hyper:cr,wire:lr}=rr,ur=rr,dr=R,pr=Zn,hr=class{constructor(e){const{type:t,subtype:n,params:r}=function(e){if(e=e.trim(),!e)throw new TypeError("Invalid input.");let t="",n="",r="",s=null,i=new Map,o="type",a=Array.from(e);for(let e=0;e<a.length;e++){const c=a[e];switch(o){case"type":if("/"===c){o="subtype";continue}t+=c;break;case"subtype":if(";"===c){o="param-start";continue}n+=c;break;case"param-start":if(xt.test(c)||";"===c)continue;r+=c,o="param-name";break;case"param-name":if("="===c||";"===c){if("="===c){o="param-value",s=null;continue}i.set(r.toLowerCase(),null),r="";continue}r+=c;break;case"param-value":if('"'==c){o="collect-quoted-string";continue}if(";"===c){s=s.trimEnd(),o="param-start",St(i,r,s),r="";continue}s="string"==typeof s?s+c:c;break;case"collect-quoted-string":if('"'===c){St(i,r,s),o="ignore-input-until-next-param",r="",s=null;continue}if("\\"===c)continue;s="string"==typeof s?s+c:c;break;case"ignore-input-until-next-param":if(";"!==c)continue;o="param-start";break;default:throw new Error(`State machine error - unknown parser mode: ${o} `)}}r&&St(i,r,s);if(""===t.trim()||!$t.test(t))throw new TypeError("Invalid type");if(""===n.trim()||!$t.test(n))throw new TypeError("Invalid subtype");return{type:t,subtype:n,params:Object.fromEntries(i.entries())}}(e);this.type=t.trim().toLowerCase(),this.subtype=n.trimEnd().toLowerCase(),this.parameters=new Map(Object.entries(r))}get essence(){return`${this.type}/${this.subtype}`}toString(){return function(e){const{parameters:t,essence:n}=e;if(!t.size)return n;let r=";";for(const[e,n]of t.entries())r+=e,null!==n?$t.test(n)?r+=`=${n}`:r+=`="${n}"`:r+='=""',r+=";";return e.essence+r.slice(0,-1)}(this)}},fr=nr,mr=Ge,gr=class{lexer;curToken=kt;peekToken=kt;getCurToken(){return this.curToken}getPeekToken(){return this.peekToken}constructor(e){this.lexer=new vt(e),this._nextToken(),this._nextToken()}parse(){const e=[];for(;this.getCurToken().type!==He.EOF;){const t=this._parseRule();e.push(t)}const t=new Xe(e);return t.separator=this._nextToken(),t.setChildrenParent(),this._convertGroupDefinitions(t),t}_parseRule(){const e=this._parseTypename(!0,null),t=this._nextToken();let n;if(t.type===He.ASSIGN||t.type===He.GCHOICEALT){const r=this._parseGroupEntry();n=new Qe(e,t,r)}else{if(t.type!==He.TCHOICEALT)throw this._parserError(`expected assignment (\`=\`, \`/=\`, \`//=\`) after \`${e.serialize().trim()}\`, got \`${t.serialize().trim()}\``);{const r=this._parseType();if(!(r instanceof ht))throw new Error("Expected Type instance");n=new Qe(e,t,r)}}return n}_parseGroupEntry(){const e=this._parseOccurrence(),t=this._parseType(!0);let n;if(t instanceof pt){const r=this._parseType(!1);if(!(r instanceof ht))throw new Error("Expected Type instance");n=new et(e,t,r)}else n=new et(e,null,t);return n}_parseType(e=!1){const t=[];let n=this._parseType1(e);if(t.push(n),e&&this.getCurToken().type===He.CARET){const e=[];if(e.push(this._nextToken()),this.getCurToken().type!==He.ARROWMAP)throw this._parserError("expected arrow map (`=>`), got `#{(this.getCurToken().serialize() + this.getPeekToken().serialize()).trim()}`");e.push(this._nextToken());return new pt(n,!0,!1,e)}if(e&&this.getCurToken().type===He.ARROWMAP){return new pt(n,!1,!1,[this._nextToken()])}if(e&&this.getCurToken().type===He.COLON){return new pt(n,!0,!0,[this._nextToken()])}for(;this.getCurToken().type===He.TCHOICE;)n.separator=this._nextToken(),n=this._parseType1(),t.push(n);return new ht(t)}_parseType1(e=!1){const t=this._parseType2(e);let n;if(this.getCurToken().type===He.INCLRANGE||this.getCurToken().type===He.EXCLRANGE){const e=this._nextToken(),r=this._parseType2();if(!(t instanceof at||t instanceof ct))throw this._parserError(`expected range min to be a value or a typename, got \`${t.serialize().trim()}\``);if(!(r instanceof at||r instanceof ct))throw this._parserError(`expected range max to be a value or a typename, got \`${r.serialize().trim()}\``);n=new ut(t,r,e)}else if(this.getCurToken().type===He.CTLOP){const e=this._nextToken(),r=this._parseType2();n=new dt(t,e,r)}else n=t;return n}_parseType2(e=!1){let t;if(this.getCurToken().type===He.LPAREN){const n=this._nextToken();if(e)t=this._parseGroup(!1);else{const e=this._parseType();if(!(e instanceof ht))throw new Error("Expected Type instance");t=e}if(t.openToken=n,this.getCurToken().type!==He.RPAREN)throw this._parserError(`expected right parenthesis, got \`${this.getCurToken().serialize().trim()}\``);t.closeToken=this._nextToken()}else if(this.getCurToken().type===He.LBRACE){const e=this._nextToken();if(t=this._parseGroup(!0),t.openToken=e,this.getCurToken().type!==He.RBRACE)throw this._parserError(`expected right brace, got \`${this.getCurToken().serialize()}\``);t.closeToken=this._nextToken()}else if(this.getCurToken().type===He.LBRACK){const e=this._nextToken(),n=this._parseGroup(!1);if(t=new rt(n.groupChoices),t.openToken=e,this.getCurToken().type!==He.RBRACK)throw this._parserError(`expected right bracket, got \`${this.getCurToken().serialize().trim()}\``);t.closeToken=this._nextToken()}else if(this.getCurToken().type===He.TILDE){const e=this._nextToken();t=this._parseTypename(!1,e)}else if(this.getCurToken().type===He.AMPERSAND){const e=this._nextToken();if(this.getCurToken().type===He.LPAREN){const e=this._nextToken(),n=this._parseGroup(!1);if(n.openToken=e,this.getCurToken().type!==He.RPAREN)throw this._parserError(`expected right parenthesis, got \`${this.getCurToken().serialize().trim()}\``);n.closeToken=this._nextToken(),t=new lt(n)}else{const e=this._parseTypename(!1,null);t=new lt(e)}t.setComments(e)}else if(this.getCurToken().type===He.HASH){const e=this._nextToken();if(this.getCurToken().type!==He.NUMBER&&this.getCurToken().type!==He.FLOAT||this.getCurToken().startWithSpaces())t=new it;else{const e=this._nextToken();if(e.literal.length>1&&("."!==e.literal[1]||e.literal.includes("e")))throw this._parserError(`expected data item after "#" to match \`DIGIT ["." uint]\`, got \`${this.getCurToken().serialize().trim()}\``);if("6"!==e.literal[0]||this.getCurToken().type!==He.LPAREN||this.getCurToken().startWithSpaces())t=new it(e);else{const n=this._parseType2();if(!(n instanceof ht))throw new Error("Expected Type instance");t=new it(e,n)}}t.setComments(e)}else if(this.getCurToken().type===He.IDENT)t=this._parseTypename(!1,null);else if(this.getCurToken().type===He.STRING){const e=this._nextToken();t=new at(e.literal,"text"),t.setComments(e)}else if(this.getCurToken().type===He.BYTES){const e=this._nextToken();t=new at(e.literal,"bytes"),t.setComments(e)}else if(this.getCurToken().type===He.HEX){const e=this._nextToken();t=new at(e.literal,"hex"),t.setComments(e)}else if(this.getCurToken().type===He.BASE64){const e=this._nextToken();t=new at(e.literal,"base64"),t.setComments(e)}else if(this.getCurToken().type===He.NUMBER){const e=this._nextToken();t=new at(e.literal,"number"),t.setComments(e)}else{if(this.getCurToken().type!==He.FLOAT)throw this._parserError(`invalid type2 production, got \`${this.getCurToken().serialize().trim()}\``);{const e=this._nextToken();t=new at(e.literal,"number"),t.setComments(e)}}return t}_parseGroup(e=!1){const t=[];for(;this.getCurToken().type!==He.RPAREN&&this.getCurToken().type!==He.RBRACE&&this.getCurToken().type!==He.RBRACK;){const e=[];for(;this.getCurToken().type!==He.GCHOICE;){const t=this._parseGroupEntry();if(e.push(t),this.getCurToken().type===He.COMMA&&(t.separator=this._nextToken()),this.getCurToken().type===He.RPAREN||this.getCurToken().type===He.RBRACE||this.getCurToken().type===He.RBRACK)break}const n=new st(e);if(t.push(n),this.getCurToken().type===He.RPAREN||this.getCurToken().type===He.RBRACE||this.getCurToken().type===He.RBRACK)break;n.separator=this._nextToken()}let n;return n=e?new nt(t):new tt(t),n}_parseOccurrence(){const e=[];let t=null;if(this.getCurToken().type===He.QUEST||this.getCurToken().type===He.ASTERISK||this.getCurToken().type===He.PLUS){const n=this.getCurToken().type===He.PLUS?1:0;let r=1/0;this.getCurToken().type===He.ASTERISK&&this.getPeekToken().type===He.NUMBER&&yt(this.getPeekToken().literal)&&!this.getPeekToken().startWithSpaces()&&(e.push(this._nextToken()),r=parseInt(this.getCurToken().literal)),e.push(this._nextToken()),t=new ot(n,r,e)}else if(this.getCurToken().type===He.NUMBER&&yt(this.getCurToken().literal)&&this.getPeekToken().type===He.ASTERISK&&!this.getPeekToken().startWithSpaces()){const n=parseInt(this.getCurToken().literal);let r=1/0;e.push(this._nextToken()),e.push(this._nextToken()),this.getCurToken().type===He.NUMBER&&yt(this.getCurToken().literal)&&!this.getCurToken().startWithSpaces()&&(r=parseInt(this.getCurToken().literal),e.push(this._nextToken())),t=new ot(n,r,e)}return t}_parseTypename(e=!1,t=null){if(this.getCurToken().type!==He.IDENT)throw this._parserError(`expected group identifier, got \`${this.getCurToken().serialize().trim()}\``);const n=this._nextToken();let r;r=e?this._parseGenericParameters():this._parseGenericArguments();const s=new ct(n.literal,t,r);return s.setComments(n),s}_parseGenericParameters(){if(this.getCurToken().type!==He.LT||this.getCurToken().startWithSpaces())return null;const e=this._nextToken(),t=[];let n=this._parseTypename();for(t.push(n);this.getCurToken().type===He.COMMA;)n.separator=this._nextToken(),n=this._parseTypename(),t.push(n);const r=new ft(t);if(r.openToken=e,this.getCurToken().type!==He.GT)throw this._parserError(`expected \`>\` character to end generic production, got \`${this.getCurToken().serialize().trim()}\``);return r.closeToken=this._nextToken(),r}_parseGenericArguments(){if(this.getCurToken().type!==He.LT||this.getCurToken().startWithSpaces())return null;const e=this._nextToken(),t=[];let n=this._parseType1();for(t.push(n);this.getCurToken().type===He.COMMA;)n.separator=this._nextToken(),n=this._parseType1(),t.push(n);const r=new mt(t);if(r.openToken=e,this.getCurToken().type!==He.GT)throw this._parserError(`expected \`>\` character to end generic production, got \`${this.getCurToken().serialize().trim()}\``);return r.closeToken=this._nextToken(),r}_convertGroupDefinitions(e){const t=new Set,n=new Set,r=new Set,s=e=>{if(e instanceof at||e instanceof nt||e instanceof rt||e instanceof lt||e instanceof it)return"type";if(e instanceof ut)return s(e.min);if(e instanceof dt)return s(e.type);if(e instanceof ct){const t=e.name;if(n.has(t)||this._isPreludeType(t))return"type";if(r.has(t))return"group"}return"unknown"};for(const s of e.rules)t.add(s.name.name),0===n.size&&n.add(s.name.name),s.type instanceof ht?n.add(s.name.name):(s.assign.type===He.TCHOICEALT&&n.add(s.name.name),s.assign.type===He.GCHOICEALT&&r.add(s.name.name),s.type.type.types.length>1&&null===s.type.type.openToken&&n.add(s.name.name),null!==s.type.occurrence&&r.add(s.name.name),null!==s.type.key&&r.add(s.name.name));const i=e=>{e instanceof et&&null!==e.key&&e.key.type instanceof ct&&!e.key.hasColon&&t.has(e.key.type.name)&&n.add(e.key.type.name);for(const t of e.getChildren())i(t)};i(e);let o=!0;for(;o;){o=!1;for(const i of e.rules)if(i.type instanceof ht)for(const e of i.type.types)e instanceof ct&&t.has(e.name)&&(n.has(e.name)||(o=!0,n.add(e.name)));else{if(n.has(i.name.name))for(const e of i.type.type.types)e instanceof ct&&t.has(e.name)&&(n.has(e.name)||(o=!0,n.add(e.name)));if(r.has(i.name.name))for(const e of i.type.type.types)e instanceof ct&&t.has(e.name)&&(r.has(e.name)||(o=!0,r.add(e.name)));if(i.assign.type===He.ASSIGN){const e=new Set(i.type.type.types.map((e=>s(e))));if(e.has("type")&&e.has("group"))throw new gt(`CDDL semantic error - rule \`${i.name.name}\` targets a mix of type and group rules`);e.has("type")?n.has(i.name.name)||(o=!0,n.add(i.name.name)):e.has("group")&&(r.has(i.name.name)||(o=!0,r.add(i.name.name)))}}}const a=[...n].filter((e=>r.has(e)));if(a.length>0){const e=a.join(", ");throw new gt(`CDDL semantic error - mix of type and group definitions for ${e}`)}for(const t of e.rules)if(!(t.type instanceof ht)&&n.has(t.name.name)){if(!t.type.isConvertibleToType())throw new gt(`CDDL semantic error - rule \`${t.name.name}\` is a type definition but uses a group entry`);t.type=t.type.type}}_isPreludeType(e){return["any","uint","nint","int","bstr","bytes","tstr","text","tdate","time","number","biguint","bignint","bigint","integer","unsigned","decfrac","bigfloat","eb64url","eb64legacy","eb16","encoded-cbor","uri","b64url","b64legacy","regexp","mime-message","cbor-any","float16","float32","float64","float16-32","float32-64","float","false","true","bool","nil","null","undefined"].includes(e)}_nextToken(){const e=this.curToken;return this.curToken=this.peekToken,this.peekToken=this.lexer.nextToken(),e}_parserError(e){const t=this.lexer.getLocation();return new gt(`CDDL syntax error - line ${t.line+1}: ${e}`)}},br=class{serializeToken(e,t){return e.serialize()}serializeValue(e,t,n,r){return e+t+n}serializeName(e,t){return e}markupFor(e){return[null,null]}},yr=Qe,wr=pt,vr=ft,kr=mt,$r=ht,xr=ot,Cr=/['\u2019]s$/,Sr=/-/g,_r=RegExp.escape??(e=>e.replace(/[\\^$.*+?()[\]{}|]/g,"\\$&"));const Tr=new Intl.DateTimeFormat(["sv-SE"],{timeZone:"UTC",year:"numeric",month:"2-digit",day:"2-digit"}),Rr="en"===r||r.startsWith("en-")?"en-AU":r,Er=new Intl.DateTimeFormat(Rr,{timeZone:"UTC",year:"numeric",month:"long",day:"en-AU"===Rr?"2-digit":"numeric"}),Lr=".informative, .note, .issue, .example, .ednote, .practice, .introductory";function Ar(e){const t=new URL(e.href,document.baseURI),n=document.createElement("link");let{href:r}=t;switch(n.rel=e.hint,n.rel){case"dns-prefetch":case"preconnect":r=t.origin,(e.corsMode||t.origin!==document.location.origin)&&(n.crossOrigin=e.corsMode||"anonymous");break;case"preload":"as"in e&&n.setAttribute("as",e.as||""),e.corsMode&&(n.crossOrigin=e.corsMode)}return n.href=r,e.dontRemove||n.classList.add("removeOnSave"),n}function Pr(e){e.querySelectorAll(".remove, script[data-requiremodule]").forEach((e=>{e.remove()}))}function Nr(e,t="long"){const n=new Intl.ListFormat(r,{style:t,type:e});return(e,t)=>{let r=0;return n.formatToParts(e).map((({type:n,value:s})=>"element"===n&&t?t(s,r++,e):s))}}const Ir=Nr("conjunction"),Dr=Nr("disjunction");function Or(e,t){return Ir(e,t).join("")}function jr(e,t){return Dr(e,t).join("")}function zr(e){return e.replace(/&/g,"&amp;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/</g,"&lt;")}function Mr(e){return e.trim().replace(/\s+/g," ")}function Ur(e,t=r){return t=t.toLowerCase(),new Proxy(e,{get(e,n){const r=qr(e,n,t)||e.en[n];if(!r)throw new Error(`No l10n data for key: "${n}"`);return r}})}function qr(e,t,n=r){n=n.toLowerCase();const s=n.match(/^(\w{2,3})-.+$/)?.[1]??"";return e[n]?.[t]||e[s]?.[t]}function Wr(e,t=""){return Tr.format(e).replace(Sr,t)}function Fr(e,t,...n){const r=[this,e,...n];if(t){const n=t.split(/\s+/);for(const t of n){const n=window[t];if(n)try{e=n.apply(this,r)}catch(e){ls(`call to \`${t}()\` failed with: ${e}.`,"utils/runTransforms",{hint:"See developer console for stack trace.",cause:e})}}}return e}async function Br(e,t=864e5){const n=new Request(e),r=new URL(n.url);let s,i;if("caches"in window)try{if(s=await caches.open(r.origin),i=await s.match(n),i&&new Date(i.headers.get("Expires")??"")>new Date)return i}catch(e){console.error("Failed to use Cache API.",e)}const o=await fetch(n);if(!o.ok&&i)return console.warn(`Returning a stale cached response for ${r}`),i;if(s&&o.ok){const e=o.clone(),r=new Headers(o.headers),i=new Date(Date.now()+t);r.set("Expires",i.toISOString());const a=new Response(await e.blob(),{headers:r});await s.put(n,a).catch(console.error)}return o}function Hr(e,t=(e=>e)){const n=e.map(t),r=n.slice(0,-1).map((e=>ur`${e}, `));return ur`${r}${n[n.length-1]}`}function Gr(e,t){return[].concat(Ir(e,t)).map((e=>"string"==typeof e?ur`${e}`:e))}function Vr(e,t=""){const n=function(e){let t=0;for(const n of e)t=Math.imul(31,t)+n.charCodeAt(0)|0;return String(t)}(Mr(e.textContent));return Kr(e,t,n)}function Jr(e,t=!1){return(t?e:e.toLowerCase()).trim().normalize("NFD").replace(/[\u0300-\u036f]/g,"").replace(/\W+/gim,"-").replace(/^-+/,"").replace(/-+$/,"")}function Kr(e,t="",n="",r=!1){if(e.id)return e.id;n||(n=(e.title?e.title:e.textContent).trim());let s=Jr(n,r);if(s?!/\.$/.test(s)&&/^[a-z]/i.test(t||s)||(s=`x${s}`):s="generatedID",t&&(s=`${t}-${s}`),e.ownerDocument.getElementById(s)){let t=0,n=`${s}-${t}`;for(;e.ownerDocument.getElementById(n);)t+=1,n=`${s}-${t}`;s=n}return e.id=s,s}function Zr(e){const t=new Set,n="ltNodefault"in e.dataset?"":Mr(e.textContent),r=e.children[0];if(e.dataset.lt?e.dataset.lt.split("|").map((e=>Mr(e))).forEach((e=>t.add(e))):1===e.childNodes.length&&1===e.getElementsByTagName("abbr").length&&r&&r.title?t.add(r.title):'""'===e.textContent&&t.add("the-empty-string"),t.add(n),t.delete(""),e.dataset.localLt){e.dataset.localLt.split("|").forEach((e=>t.add(Mr(e))))}return[...t]}function Yr(e,t,n={copyAttributes:!0}){if(e.localName===t)return e;const r=e.ownerDocument.createElement(t);if(n.copyAttributes)for(const{name:t,value:n}of e.attributes)r.setAttribute(t,n);return r.append(...e.childNodes),e.replaceWith(r),r}function Xr(e,t){const n=t.closest(Lr);let r=!1;if(n&&(r=!t.closest(".normative")||!n.querySelector(".normative")),e.startsWith("!")){if(r)return{type:"informative",illegal:!0};r=!1}else e.startsWith("?")&&(r=!0);return{type:r?"informative":"normative",illegal:!1}}function Qr(e,t){return t.append(...e.childNodes),e.appendChild(t),e}function es(e){const t=[];for(const n of function*(e){let t=e;for(;t.previousElementSibling;)t=t.previousElementSibling,yield t}(e))"section"===n.localName&&t.push(n);return t}function ts(e){const{previousSibling:t}=e;if(!t||t.nodeType!==Node.TEXT_NODE)return"";const n=(t.textContent??"").lastIndexOf("\n");if(-1===n)return"";const r=(t.textContent??"").slice(n+1);return/\S/.test(r)?"":r}class ns extends Set{constructor(e=[]){super();for(const t of e)this.add(t)}add(e){return this.has(e)||this.getCanonicalKey(e)?this:super.add(e)}has(e){return super.has(e)||[...this.keys()].some((t=>t.toLowerCase()===e.toLowerCase()))}delete(e){return super.has(e)?super.delete(e):super.delete(this.getCanonicalKey(e)??e)}getCanonicalKey(e){return super.has(e)?e:[...this.keys()].find((t=>t.toLowerCase()===e.toLowerCase()))}}function rs(e){const t=e.cloneNode(!0);return t.querySelectorAll("[id]").forEach((e=>e.removeAttribute("id"))),t.querySelectorAll("dfn").forEach((e=>{Yr(e,"span",{copyAttributes:!1})})),t.hasAttribute("id")&&t.removeAttribute("id"),ss(t),t}function ss(e){const t=document.createTreeWalker(e,NodeFilter.SHOW_COMMENT);for(const e of[...is(t)])e.remove()}function*is(e){for(;e.nextNode();)yield e.currentNode}class os extends Map{constructor(e=[]){return super(),e.forEach((([e,t])=>{this.set(e,t)})),this}set(e,t){return super.set(e.toLowerCase(),t),this}get(e){return super.get(e.toLowerCase())}has(e){return super.has(e.toLowerCase())}delete(e){return super.delete(e.toLowerCase())}}class as extends Error{constructor(e,t,n){super(e,{...n.cause&&{cause:n.cause}});const r=n.isWarning?"ReSpecWarning":"ReSpecError";Object.assign(this,{message:e,plugin:t,name:r,...n}),n.elements&&n.elements.forEach((t=>function(e,t,n){e.classList.add("respec-offending-element"),e.hasAttribute("title")||e.setAttribute("title",n||t),e.id||Kr(e,"respec-offender")}(t,e,n.title)))}toJSON(){const{message:e,name:t,stack:n}=this,{plugin:r,hint:s,elements:i,title:o,details:a}=this;return{message:e,name:t,plugin:r,hint:s,elements:i,title:o,details:a,stack:n,...this.cause instanceof Error&&{cause:{name:this.cause.name,message:this.cause.message,stack:this.cause.stack}}}}}function cs(e,t,n={}){const r={...n,isWarning:!1};ys("error",new as(e,t,r))}function ls(e,t,n={}){const r={...n,isWarning:!0};ys("warn",new as(e,t,r))}function us(e){return{amendConfiguration:e=>ys("amend-user-config",e),showError:(t,n)=>cs(t,e,n),showWarning:(t,n)=>ls(t,e,n)}}function ds(e){return e?`\`${e}\``:""}function ps(e,{quotes:t}={quotes:!1}){return jr(e,t?e=>ds(fs(e)):ds)}function hs(e,{quotes:t}={quotes:!1}){return Or(e,t?e=>ds(fs(e)):ds)}function fs(e){return String(e)?`"${e}"`:""}function ms(e,...t){return gs(e.map(((e,n)=>{const r=t[n];if(!r)return e;if(!r.startsWith("[")&&!r.endsWith("]"))return e+r;const[s,i]=r.slice(1,-1).split("|");if(i){return`${e}[${s}](${new URL(i,"https://respec.org/docs/")})`}return`${e}[\`${s}\`](https://respec.org/docs/#${s})`})).join(""))}function gs(e){if(!e)return e;const t=e.trimEnd().split("\n");for(;t.length&&!t[0].trim();)t.shift();const n=t.filter((e=>e.trim())).map((e=>e.search(/[^\s]/))),r=Math.min(...n);return t.map((e=>e.slice(r))).join("\n")}const bs=new EventTarget;function ys(e,t){if(bs.dispatchEvent(new CustomEvent(e,{detail:t})),window.parent===window.self)return;const n=String(JSON.stringify(t?.stack||t));window.parent.postMessage({topic:e,args:n},window.parent.location.origin)}function ws(e,t,n={once:!1}){bs.addEventListener(e,(async n=>{try{await t(n.detail)}catch(t){const n=t;cs(`Error in handler for topic "${e}": ${n.message}`,`sub:${e}`,{cause:n})}}),n)}const vs=["githubToken","githubUser"];const ks=new Map([["text/html","html"],["application/xml","xml"]]);function $s(e,t=document){const n=ks.get(e);if(!n){const t=[...ks.values()].join(", ");throw new TypeError(`Invalid format: ${e}. Expected one of: ${t}.`)}const r=xs(n,t);return`data:${e};charset=utf-8,${encodeURIComponent(r)}`}function xs(e,t){const n=t.cloneNode(!0);!function(e){const{head:t,body:n,documentElement:r}=e;ss(e),e.querySelectorAll(".removeOnSave, #toc-nav").forEach((e=>e.remove())),n.classList.remove("toc-sidebar","toc-inline"),Pr(r);const s=e.createDocumentFragment(),i=e.querySelector("meta[name='viewport']");i&&t.firstChild!==i&&s.appendChild(i);const o=e.querySelector("meta[charset], meta[content*='charset=']")||ur`<meta charset="utf-8" />`;s.appendChild(o);const a=`ReSpec ${window.respecVersion||"Developer Channel"}`,c=ur`
2
2
  <meta name="generator" content="${a}" />
3
- `;s.appendChild(c),t.prepend(s),ps("beforesave",r)}(n);let r="";if("xml"===e)r=(new XMLSerializer).serializeToString(n);else!function(e){e.querySelectorAll("style").forEach((e=>{e.innerHTML=`\n${e.innerHTML}\n`})),e.querySelectorAll("head > *").forEach((e=>{e.outerHTML=`\n${e.outerHTML}`}))}(n),n.doctype&&(r+=(new XMLSerializer).serializeToString(n.doctype)),r+=n.documentElement.outerHTML;return r}async function ys(t){const n=await fetch(new URL(`../../${t}`,e&&"SCRIPT"===e.tagName.toUpperCase()&&e.src||new URL("respec-w3c.js",document.baseURI).href));return await n.text()}const ws=new URL("respec-highlight.js",e&&"SCRIPT"===e.tagName.toUpperCase()&&e.src||new URL("respec-w3c.js",document.baseURI).href).href,vs=Sr({hint:"preload",href:ws,as:"script"});async function ks(){try{return(await Promise.resolve().then((function(){return ai}))).default}catch{return ys("worker/respec-worker.js")}}async function $s(){try{const e=await fetch(ws);if(e.ok)return await e.text()}catch{}return null}document.head.appendChild(vs);const xs=async function(){const[e,t]=await Promise.all([ks(),$s()]),n=new Blob([null!==t?`${t}\n`:'self.RESPEC_HIGHLIGHT_URL = "https://www.w3.org/Tools/respec/respec-highlight";\n',e],{type:"application/javascript"});return new Worker(URL.createObjectURL(n))}();class Cs{constructor(){this._respecDonePromise=new Promise((e=>{hs("end-all",(()=>e()),{once:!0})})),this.errors=[],this.warnings=[],hs("error",(e=>{console.error(e,e.toJSON()),this.errors.push(e)})),hs("warn",(e=>{console.warn(e,e.toJSON()),this.warnings.push(e)}))}get version(){return window.respecVersion}get ready(){return this._respecDonePromise}get worker(){return xs}async toHTML(){return bs("html",document)}}const Ss="core/post-process",_s=15e3;function Ts(e,t){return new Promise(((n,r)=>{const s=setTimeout((()=>{r(new Error(`${t} timed out.`))}),_s);Promise.resolve(e).then(n,r).finally((()=>{clearTimeout(s)}))}))}const Rs="core/pre-process",Es=15e3;const Ls="core/base-runner";async function As(e){!function(){const e=new Cs;Object.defineProperty(document,"respec",{value:e})}(),ps("start-all",respecConfig),function(e){const t={},n=e=>Object.assign(t,e);n(e),hs("amend-user-config",n),hs("end-all",(()=>{const e=document.createElement("script");e.id="initialUserConfig",e.type="application/json";for(const e of fs)e in t&&delete t[e];e.innerHTML=JSON.stringify(t,null,2),document.head.appendChild(e)}))}(respecConfig),function(e){const t=new URLSearchParams(document.location.search),n=Array.from(t).filter((([e,t])=>!!e&&!!t)).map((([e,t])=>{const n=decodeURIComponent(e),r=decodeURIComponent(t.replace(/%3D/g,"="));let s;try{s=JSON.parse(r)}catch{s=r}return[n,s]})),r=Object.fromEntries(n);Object.assign(e,r),ps("amend-user-config",r)}(respecConfig),performance.mark(`${Ls}-start`),await async function(e){if(Array.isArray(e.preProcess)){const t=e.preProcess.filter((e=>{const t="function"==typeof e;return t||ns("Every item in `preProcess` must be a JS function.",Rs),t}));for(const[n,r]of t.entries()){const t=`${Rs}/${r.name||`[${n}]`}`,s=ss(t);try{await new Promise(((n,i)=>{const o=setTimeout((()=>{i(new Error(`preProcess function "${t}" timed out.`))}),Es);Promise.resolve().then((()=>r(e,document,s))).then(n,i).finally((()=>{clearTimeout(o)}))}))}catch(e){ns(`Function ${t} threw an error during \`preProcess\`.`,Rs,{hint:"See developer console.",cause:e})}}}}(respecConfig);const t=e.filter((e=>{return(t=e)&&(t.run||t.Plugin);var t}));t.forEach((e=>!e.name&&console.warn("Plugin lacks name:",e))),await async function(e,t){for(const n of e.filter((e=>e.prepare)))try{await(n.prepare?.(t))}catch(e){console.error(e)}}(t,respecConfig),await async function(e,t){for(const n of e){const e=n.name||"";try{await new Promise((async(r,s)=>{const i=setTimeout((()=>{const t=`Plugin ${e} took too long.`;console.error(t,n),s(new Error(t))}),15e3);performance.mark(`${e}-start`);try{n.Plugin?(await new n.Plugin(t).run(),r(void 0)):n.run&&(await n.run(t),r(void 0))}catch(e){s(e)}finally{clearTimeout(i),performance.mark(`${e}-end`),performance.measure(e,`${e}-start`,`${e}-end`)}}))}catch(e){console.error(e)}}}(t,respecConfig),ps("plugins-done",respecConfig),await async function(e){if(Array.isArray(e.postProcess)){const t=e.postProcess.filter((e=>{const t="function"==typeof e;return t||ns("Every item in `postProcess` must be a JS function.",Ss),t}));for(const[n,r]of t.entries()){const t=`${Ss}/${r.name||`[${n}]`}`,s=ss(t);try{await Ts(r(e,document,s),`postProcess function "${t}"`)}catch(e){ns(`Function ${t} threw an error during \`postProcess\`.`,Ss,{hint:"See developer console.",cause:e})}}}if("function"==typeof e.afterEnd)try{await Ts(e.afterEnd(e,document),"config.afterEnd")}catch(e){ns("Function afterEnd threw an error.",Ss,{hint:"See developer console.",cause:e})}}(respecConfig),ps("end-all",void 0),_r(document),performance.mark(`${Ls}-end`),performance.measure(Ls,`${Ls}-start`,`${Ls}-end`)}var Ps=String.raw`.respec-modal .close-button{position:absolute;z-index:inherit;padding:.2em;font-weight:700;cursor:pointer;margin-left:5px;border:none;background:0 0}
3
+ `;s.appendChild(c),t.prepend(s),ys("beforesave",r)}(n);let r="";if("xml"===e)r=(new XMLSerializer).serializeToString(n);else!function(e){e.querySelectorAll("style").forEach((e=>{e.innerHTML=`\n${e.innerHTML}\n`})),e.querySelectorAll("head > *").forEach((e=>{e.outerHTML=`\n${e.outerHTML}`}))}(n),n.doctype&&(r+=(new XMLSerializer).serializeToString(n.doctype)),r+=n.documentElement.outerHTML;return r}async function Cs(t){const n=await fetch(new URL(`../../${t}`,e&&"SCRIPT"===e.tagName.toUpperCase()&&e.src||new URL("respec-w3c.js",document.baseURI).href));return await n.text()}const Ss=new URL("respec-highlight.js",e&&"SCRIPT"===e.tagName.toUpperCase()&&e.src||new URL("respec-w3c.js",document.baseURI).href).href,_s=Ar({hint:"preload",href:Ss,as:"script"});async function Ts(){try{return(await Promise.resolve().then((function(){return hi}))).default}catch{return Cs("worker/respec-worker.js")}}async function Rs(){try{const e=await fetch(Ss);if(e.ok)return await e.text()}catch{}return null}document.head.appendChild(_s);const Es=async function(){const[e,t]=await Promise.all([Ts(),Rs()]),n=new Blob([null!==t?`${t}\n`:'self.RESPEC_HIGHLIGHT_URL = "https://www.w3.org/Tools/respec/respec-highlight";\n',e],{type:"application/javascript"});return new Worker(URL.createObjectURL(n))}();class Ls{constructor(){this._respecDonePromise=new Promise((e=>{ws("end-all",(()=>e()),{once:!0})})),this.errors=[],this.warnings=[],ws("error",(e=>{console.error(e,e.toJSON()),this.errors.push(e)})),ws("warn",(e=>{console.warn(e,e.toJSON()),this.warnings.push(e)}))}get version(){return window.respecVersion}get ready(){return this._respecDonePromise}get worker(){return Es}async toHTML(){return xs("html",document)}}const As="core/post-process",Ps=15e3;function Ns(e,t){return new Promise(((n,r)=>{const s=setTimeout((()=>{r(new Error(`${t} timed out.`))}),Ps);Promise.resolve(e).then(n,r).finally((()=>{clearTimeout(s)}))}))}const Is="core/pre-process",Ds=15e3;const Os="core/base-runner";async function js(e){!function(){const e=new Ls;Object.defineProperty(document,"respec",{value:e})}(),ys("start-all",respecConfig),function(e){const t={},n=e=>Object.assign(t,e);n(e),ws("amend-user-config",n),ws("end-all",(()=>{const e=document.createElement("script");e.id="initialUserConfig",e.type="application/json";for(const e of vs)e in t&&delete t[e];e.innerHTML=JSON.stringify(t,null,2),document.head.appendChild(e)}))}(respecConfig),function(e){const t=new URLSearchParams(document.location.search),n=Array.from(t).filter((([e,t])=>!!e&&!!t)).map((([e,t])=>{const n=decodeURIComponent(e),r=decodeURIComponent(t.replace(/%3D/g,"="));let s;try{s=JSON.parse(r)}catch{s=r}return[n,s]})),r=Object.fromEntries(n);Object.assign(e,r),ys("amend-user-config",r)}(respecConfig),performance.mark(`${Os}-start`),await async function(e){if(Array.isArray(e.preProcess)){const t=e.preProcess.filter((e=>{const t="function"==typeof e;return t||cs("Every item in `preProcess` must be a JS function.",Is),t}));for(const[n,r]of t.entries()){const t=`${Is}/${r.name||`[${n}]`}`,s=us(t);try{await new Promise(((n,i)=>{const o=setTimeout((()=>{i(new Error(`preProcess function "${t}" timed out.`))}),Ds);Promise.resolve().then((()=>r(e,document,s))).then(n,i).finally((()=>{clearTimeout(o)}))}))}catch(e){cs(`Function ${t} threw an error during \`preProcess\`.`,Is,{hint:"See developer console.",cause:e})}}}}(respecConfig);const t=e.filter((e=>{return(t=e)&&(t.run||t.Plugin);var t}));t.forEach((e=>!e.name&&console.warn("Plugin lacks name:",e))),await async function(e,t){for(const n of e.filter((e=>e.prepare)))try{await(n.prepare?.(t))}catch(e){console.error(e)}}(t,respecConfig),await async function(e,t){for(const n of e){const e=n.name||"";try{await new Promise((async(r,s)=>{const i=setTimeout((()=>{const t=`Plugin ${e} took too long.`;console.error(t,n),s(new Error(t))}),15e3);performance.mark(`${e}-start`);try{n.Plugin?(await new n.Plugin(t).run(),r(void 0)):n.run&&(await n.run(t),r(void 0))}catch(e){s(e)}finally{clearTimeout(i),performance.mark(`${e}-end`),performance.measure(e,`${e}-start`,`${e}-end`)}}))}catch(e){console.error(e)}}}(t,respecConfig),ys("plugins-done",respecConfig),await async function(e){if(Array.isArray(e.postProcess)){const t=e.postProcess.filter((e=>{const t="function"==typeof e;return t||cs("Every item in `postProcess` must be a JS function.",As),t}));for(const[n,r]of t.entries()){const t=`${As}/${r.name||`[${n}]`}`,s=us(t);try{await Ns(r(e,document,s),`postProcess function "${t}"`)}catch(e){cs(`Function ${t} threw an error during \`postProcess\`.`,As,{hint:"See developer console.",cause:e})}}}if("function"==typeof e.afterEnd)try{await Ns(e.afterEnd(e,document),"config.afterEnd")}catch(e){cs("Function afterEnd threw an error.",As,{hint:"See developer console.",cause:e})}}(respecConfig),ys("end-all",void 0),Pr(document),performance.mark(`${Os}-end`),performance.measure(Os,`${Os}-start`,`${Os}-end`)}var zs=String.raw`.respec-modal .close-button{position:absolute;z-index:inherit;padding:.2em;font-weight:700;cursor:pointer;margin-left:5px;border:none;background:0 0}
4
4
  #respec-ui{position:fixed;display:flex;flex-direction:row-reverse;top:20px;right:20px;width:202px;text-align:right;z-index:9000}
5
5
  #respec-pill,.respec-info-button{height:2.4em;background:#fff;background:var(--bg,#fff);color:#787878;color:var(--tocnav-normal-text,#787878);border:1px solid #ccc;box-shadow:1px 1px 8px 0 rgba(100,100,100,.5);box-shadow:1px 1px 8px 0 var(--tocsidebar-shadow,rgba(100,100,100,.5));padding:.2em 0}
6
6
  .respec-info-button{border:none;opacity:.75;border-radius:2em;margin-right:1em;min-width:3.5em;will-change:opacity}
@@ -64,42 +64,42 @@ to{margin-top:0;border:1px solid #ccc;border-radius:0;box-shadow:1px 1px 8px 0 r
64
64
  .respec-iframe:not(.ready){background:url(https://respec.org/xref/loader.gif) no-repeat center}
65
65
  .respec-iframe+a[href]{font-size:.9rem;float:right;margin:0 .5em .5em;border-bottom-width:1px}
66
66
  p:is(.respec-hint,.respec-occurrences){display:block;margin-top:.5em}
67
- .respec-plugin{text-align:right;color:rgb(120,120,120,.5);font-size:.6em}`;const Ns=/&gt;/gm,Is=/&amp;/gm;class Ds extends or.Renderer{code(e){const{text:t,lang:n=""}=e,{language:r,...s}=Ds.parseInfoString(n);if(/(^webidl$)/i.test(r))return`<pre class="idl">${t}</pre>`;const i=super.code({...e,lang:r}).replace('class="language-','class="'),{example:o,illegalExample:a}=s;if(!o&&!a)return i;const c=o||a,l=`${r} ${o?"example":"illegal-example"}`;return i.replace("<pre>",`<pre title="${c}" class="${l}">`)}image(e){const{href:t,title:n,text:r}=e;if(!n)return super.image(e);return String.raw`
67
+ .respec-plugin{text-align:right;color:rgb(120,120,120,.5);font-size:.6em}`;const Ms=/&gt;/gm,Us=/&amp;/gm;class qs extends pr.Renderer{code(e){const{text:t,lang:n=""}=e,{language:r,...s}=qs.parseInfoString(n);if(/(^webidl$)/i.test(r))return`<pre class="idl">${t}</pre>`;const i=super.code({...e,lang:r}).replace('class="language-','class="'),{example:o,illegalExample:a}=s;if(!o&&!a)return i;const c=o||a,l=`${r} ${o?"example":"illegal-example"}`;return i.replace("<pre>",`<pre title="${c}" class="${l}">`)}image(e){const{href:t,title:n,text:r}=e;if(!n)return super.image(e);return String.raw`
68
68
  <figure>
69
69
  <img src="${t}" alt="${r}" />
70
70
  <figcaption>${n}</figcaption>
71
71
  </figure>
72
- `}static parseInfoString(e){const t=e.search(/\s/);if(-1===t)return{language:e};const n=e.slice(0,t),r=e.slice(t+1);let s;if(r)try{s=JSON.parse(`{ ${r} }`)}catch(e){console.error(e)}return{language:n,...s}}heading(e){const t=this.parser.parseInline(e.tokens),n=e.depth,r=t.match(/(.+)\s+{#([\w-]+)}$/);if(r){const[,e,t]=r;return`<h${n} id="${t}">${e}</h${n}>`}return super.heading(e)}}const Os={gfm:!0,renderer:new Ds};function js(e,t={inline:!1}){const n=function(e){if(!e)return e;const t=e.trimEnd().split("\n"),n=t.findIndex((e=>e.trim()));if(-1===n)return"";const r=t.slice(n),s=r[0].search(/[^\s]/);if(s<1)return r.join("\n");const i=" ".repeat(s);return r.map((e=>e.startsWith(i)?e.slice(s):e)).join("\n")}(e),r=n.replace(Ns,">").replace(Is,"&");return t.inline?or.parseInline(r,Os):or.parse(r,Os)}function zs(e){for(const t of e.getElementsByTagName("pre"))t.prepend("\n");e.innerHTML=js(e.innerHTML)}const Ms=(Us="[data-format='markdown']:not(body)",e=>{const t=e.querySelectorAll(Us);return t.forEach(zs),Array.from(t)});var Us;var qs=Object.freeze({__proto__:null,markdownToHtml:js,name:"core/markdown",run:function(e){const t=!!document.querySelector("[data-format=markdown]:not(body)"),n="markdown"===e.format;if(!n&&!t)return;if(!n)return void Ms(document.body);const r=document.getElementById("respec-ui");r?.remove();const s=document.body.cloneNode(!0);!function(e,t){const n=e.querySelectorAll(t);for(const e of n){const{innerHTML:t}=e;if(/^<\w/.test(t.trimStart()))continue;const n=t.split("\n"),r=n.slice(0,2).join("\n"),s=n.slice(-2).join("\n");if(r.trim()&&e.prepend("\n\n"),s.trim()){const t=Kr(e);e.append(`\n\n${t}`)}}}(s,"[data-format=markdown], section, div, address, article, aside, figure, header, main"),zs(s),function(e){Array.from(e).forEach((e=>{e.replaceWith(e.textContent)}))}(s.querySelectorAll(".nolinks a[href]")),r&&s.append(r),document.body.replaceWith(s)}});function Ws(e,t){e&&Array.from(t).forEach((([t,n])=>{e.setAttribute(`aria-${t}`,n)}))}!function(){const e=document.createElement("style");e.id="respec-ui-styles",e.textContent=Ps,e.classList.add("removeOnSave"),document.head.appendChild(e)}();const Fs=sr`<div id="respec-ui" class="removeOnSave" hidden></div>`,Bs=sr`<ul
72
+ `}static parseInfoString(e){const t=e.search(/\s/);if(-1===t)return{language:e};const n=e.slice(0,t),r=e.slice(t+1);let s;if(r)try{s=JSON.parse(`{ ${r} }`)}catch(e){console.error(e)}return{language:n,...s}}heading(e){const t=this.parser.parseInline(e.tokens),n=e.depth,r=t.match(/(.+)\s+{#([\w-]+)}$/);if(r){const[,e,t]=r;return`<h${n} id="${t}">${e}</h${n}>`}return super.heading(e)}}const Ws={gfm:!0,renderer:new qs};function Fs(e,t={inline:!1}){const n=function(e){if(!e)return e;const t=e.trimEnd().split("\n"),n=t.findIndex((e=>e.trim()));if(-1===n)return"";const r=t.slice(n),s=r[0].search(/[^\s]/);if(s<1)return r.join("\n");const i=" ".repeat(s);return r.map((e=>e.startsWith(i)?e.slice(s):e)).join("\n")}(e),r=n.replace(Ms,">").replace(Us,"&");return t.inline?pr.parseInline(r,Ws):pr.parse(r,Ws)}function Bs(e){for(const t of e.getElementsByTagName("pre"))t.prepend("\n");e.innerHTML=Fs(e.innerHTML)}const Hs=(Gs="[data-format='markdown']:not(body)",e=>{const t=e.querySelectorAll(Gs);return t.forEach(Bs),Array.from(t)});var Gs;var Vs=Object.freeze({__proto__:null,markdownToHtml:Fs,name:"core/markdown",run:function(e){const t=!!document.querySelector("[data-format=markdown]:not(body)"),n="markdown"===e.format;if(!n&&!t)return;if(!n)return void Hs(document.body);const r=document.getElementById("respec-ui");r?.remove();const s=document.body.cloneNode(!0);!function(e,t){const n=e.querySelectorAll(t);for(const e of n){const{innerHTML:t}=e;if(/^<\w/.test(t.trimStart()))continue;const n=t.split("\n"),r=n.slice(0,2).join("\n"),s=n.slice(-2).join("\n");if(r.trim()&&e.prepend("\n\n"),s.trim()){const t=ts(e);e.append(`\n\n${t}`)}}}(s,"[data-format=markdown], section, div, address, article, aside, figure, header, main"),Bs(s),function(e){Array.from(e).forEach((e=>{e.replaceWith(e.textContent)}))}(s.querySelectorAll(".nolinks a[href]")),r&&s.append(r),document.body.replaceWith(s)}});function Js(e,t){e&&Array.from(t).forEach((([t,n])=>{e.setAttribute(`aria-${t}`,n)}))}!function(){const e=document.createElement("style");e.id="respec-ui-styles",e.textContent=zs,e.classList.add("removeOnSave"),document.head.appendChild(e)}();const Ks=ur`<div id="respec-ui" class="removeOnSave" hidden></div>`,Zs=ur`<ul
73
73
  id="respec-menu"
74
74
  role="menu"
75
75
  aria-labelledby="respec-pill"
76
76
  hidden
77
- ></ul>`,Hs=sr`<button
77
+ ></ul>`,Ys=ur`<button
78
78
  class="close-button"
79
- onclick=${()=>ni.closeModal()}
79
+ onclick=${()=>ci.closeModal()}
80
80
  title="Close"
81
81
  >
82
82
  ❌
83
- </button>`;let Gs,Vs;window.addEventListener("load",(()=>Qs(Bs)));const Js=[],Ks=[],Zs={};hs("start-all",(()=>document.body.prepend(Fs)),{once:!0}),hs("end-all",(()=>document.body.prepend(Fs)),{once:!0});const Ys=sr`<button id="respec-pill" disabled>ReSpec</button>`;function Xs(){Bs.classList.toggle("respec-hidden"),Bs.classList.toggle("respec-visible"),Bs.hidden=!Bs.hidden}function Qs(e){const t=e.querySelectorAll("a[href]:not([disabled]), button:not([disabled]), textarea:not([disabled]), input:not([disabled]), select:not([disabled])"),n=t[0],r=t[t.length-1];n&&n.focus(),e.addEventListener("keydown",(e=>{const t=e;"Tab"===t.key&&(t.shiftKey?document.activeElement===n&&(r.focus(),t.preventDefault()):document.activeElement===r&&(n.focus(),t.preventDefault()))}))}Fs.appendChild(Ys),Ys.addEventListener("click",(e=>{e.stopPropagation(),Ys.setAttribute("aria-expanded",String(Bs.hidden)),Xs(),Bs.querySelector("li:first-child button").focus()})),document.documentElement.addEventListener("click",(()=>{Bs.hidden||Xs()})),Fs.appendChild(Bs),Bs.addEventListener("keydown",(e=>{"Escape"!==e.key||Bs.hidden||(Ys.setAttribute("aria-expanded",String(Bs.hidden)),Xs(),Ys.focus())}));const ei=new Map([["controls","respec-menu"],["expanded","false"],["haspopup","true"],["label","ReSpec Menu"]]);function ti(e,t,n,r){t.push(e),Zs.hasOwnProperty(n)||(Zs[n]=function(e,t,n){const r=`respec-pill-${e}`,s=sr`<button
83
+ </button>`;let Xs,Qs;window.addEventListener("load",(()=>ii(Zs)));const ei=[],ti=[],ni={};ws("start-all",(()=>document.body.prepend(Ks)),{once:!0}),ws("end-all",(()=>document.body.prepend(Ks)),{once:!0});const ri=ur`<button id="respec-pill" disabled>ReSpec</button>`;function si(){Zs.classList.toggle("respec-hidden"),Zs.classList.toggle("respec-visible"),Zs.hidden=!Zs.hidden}function ii(e){const t=e.querySelectorAll("a[href]:not([disabled]), button:not([disabled]), textarea:not([disabled]), input:not([disabled]), select:not([disabled])"),n=t[0],r=t[t.length-1];n&&n.focus(),e.addEventListener("keydown",(e=>{const t=e;"Tab"===t.key&&(t.shiftKey?document.activeElement===n&&(r.focus(),t.preventDefault()):document.activeElement===r&&(n.focus(),t.preventDefault()))}))}Ks.appendChild(ri),ri.addEventListener("click",(e=>{e.stopPropagation(),ri.setAttribute("aria-expanded",String(Zs.hidden)),si(),Zs.querySelector("li:first-child button").focus()})),document.documentElement.addEventListener("click",(()=>{Zs.hidden||si()})),Ks.appendChild(Zs),Zs.addEventListener("keydown",(e=>{"Escape"!==e.key||Zs.hidden||(ri.setAttribute("aria-expanded",String(Zs.hidden)),si(),ri.focus())}));const oi=new Map([["controls","respec-menu"],["expanded","false"],["haspopup","true"],["label","ReSpec Menu"]]);function ai(e,t,n,r){t.push(e),ni.hasOwnProperty(n)||(ni[n]=function(e,t,n){const r=`respec-pill-${e}`,s=ur`<button
84
84
  id="${r}"
85
85
  class="respec-info-button"
86
- ></button>`;s.addEventListener("click",(()=>{s.setAttribute("aria-expanded","true");const r=sr`<ol class="${`respec-${e}-list`}"></ol>`;for(const e of t){const t=document.createRange().createContextualFragment(ri(e)),n=document.createElement("li");t.firstElementChild===t.lastElementChild?n.append(...t.firstElementChild.childNodes):n.appendChild(t),r.appendChild(n)}ni.freshModal(n,r,s)}));const i=new Map([["expanded","false"],["haspopup","true"],["controls",`respec-pill-${e}-modal`]]);return Ws(s,i),s}(n,t,r),Fs.appendChild(Zs[n]));const s=Zs[n];s.textContent=String(t.length);const i=1===t.length?cr.singular(r):r;Ws(s,new Map([["label",`${t.length} ${i}`]]))}Ws(Ys,ei);const ni={show(){try{Fs.hidden=!1}catch(e){console.error(e)}},hide(){Fs.hidden=!0},enable(){Ys.removeAttribute("disabled")},addCommand(e,t,n,r){r=r||"";const s=`respec-button-${e.toLowerCase().replace(/\s+/,"-")}`,i=sr`<button id="${s}" class="respec-option">
86
+ ></button>`;s.addEventListener("click",(()=>{s.setAttribute("aria-expanded","true");const r=ur`<ol class="${`respec-${e}-list`}"></ol>`;for(const e of t){const t=document.createRange().createContextualFragment(li(e)),n=document.createElement("li");t.firstElementChild===t.lastElementChild?n.append(...t.firstElementChild.childNodes):n.appendChild(t),r.appendChild(n)}ci.freshModal(n,r,s)}));const i=new Map([["expanded","false"],["haspopup","true"],["controls",`respec-pill-${e}-modal`]]);return Js(s,i),s}(n,t,r),Ks.appendChild(ni[n]));const s=ni[n];s.textContent=String(t.length);const i=1===t.length?fr.singular(r):r;Js(s,new Map([["label",`${t.length} ${i}`]]))}Js(ri,oi);const ci={show(){try{Ks.hidden=!1}catch(e){console.error(e)}},hide(){Ks.hidden=!0},enable(){ri.removeAttribute("disabled")},addCommand(e,t,n,r){r=r||"";const s=`respec-button-${e.toLowerCase().replace(/\s+/,"-")}`,i=ur`<button id="${s}" class="respec-option">
87
87
  <span class="respec-cmd-icon" aria-hidden="true">${r}</span> ${e}…
88
- </button>`,o=sr`<li role="menuitem">${i}</li>`;return o.addEventListener("click",t),Bs.appendChild(o),i},error(e){ti(e,Js,"error","ReSpec Errors")},warning(e){ti(e,Ks,"warning","ReSpec Warnings")},closeModal(e){if(Vs){const e=Vs;e.classList.remove("respec-show-overlay"),e.classList.add("respec-hide-overlay"),e.addEventListener("transitionend",(()=>{e.remove(),Vs=null}))}e&&e.setAttribute("aria-expanded","false"),Gs&&(Gs.remove(),Gs=null,Ys.focus())},freshModal(e,t,n){Gs&&Gs.remove(),Vs&&Vs.remove(),Vs=sr`<div id="respec-overlay" class="removeOnSave"></div>`;const r=`${n.id}-modal`,s=`${r}-heading`;Gs=sr`<div
88
+ </button>`,o=ur`<li role="menuitem">${i}</li>`;return o.addEventListener("click",t),Zs.appendChild(o),i},error(e){ai(e,ei,"error","ReSpec Errors")},warning(e){ai(e,ti,"warning","ReSpec Warnings")},closeModal(e){if(Qs){const e=Qs;e.classList.remove("respec-show-overlay"),e.classList.add("respec-hide-overlay"),e.addEventListener("transitionend",(()=>{e.remove(),Qs=null}))}e&&e.setAttribute("aria-expanded","false"),Xs&&(Xs.remove(),Xs=null,ri.focus())},freshModal(e,t,n){Xs&&Xs.remove(),Qs&&Qs.remove(),Qs=ur`<div id="respec-overlay" class="removeOnSave"></div>`;const r=`${n.id}-modal`,s=`${r}-heading`;Xs=ur`<div
89
89
  id="${r}"
90
90
  class="respec-modal removeOnSave"
91
91
  role="dialog"
92
92
  aria-labelledby="${s}"
93
93
  >
94
- ${Hs}
94
+ ${Ys}
95
95
  <h3 id="${s}">${e}</h3>
96
96
  <div class="inside">${t}</div>
97
- </div>`;const i=new Map([["labelledby",s]]);Ws(Gs,i),document.body.append(Vs,Gs),Vs.addEventListener("click",(()=>this.closeModal(n))),Vs.classList.toggle("respec-show-overlay"),Gs.hidden=!1,Qs(Gs)}};function ri(e){if("string"==typeof e)return e;const t=e.plugin?`<p class="respec-plugin">(plugin: "${e.plugin}")</p>`:"",n=e.hint?`\n${js(`<p class="respec-hint"><strong>How to fix:</strong> ${us(e.hint)}`,{inline:!e.hint.includes("\n")})}\n`:"",r=Array.isArray(e.elements)?`<p class="respec-occurrences">Occurred <strong>${e.elements.length}</strong> times at:</p>\n ${js(e.elements.map(si).join("\n"))}`:"",s=e.details?`\n\n<details>\n${e.details}\n</details>\n`:"";return`${js(`**${Pr(e.message)}**`,{inline:!0})}${n}${r}${s}${t}`}function si(e){return`* [\`<${e.localName}>\`](#${e.id}) element`}async function ii(e){try{ni.show(),await async function(){"loading"===document.readyState&&await new Promise((e=>document.addEventListener("DOMContentLoaded",e)))}(),await As(e)}finally{ni.enable()}}document.addEventListener("keydown",(e=>{"Escape"===e.key&&ni.closeModal()})),window.respecUI=ni,hs("error",(e=>ni.error(e))),hs("warn",(e=>ni.warning(e))),window.addEventListener("error",(e=>{console.error(e.error,e.message,e)}));const oi=[Promise.resolve().then((function(){return ci})),Promise.resolve().then((function(){return s})),Promise.resolve().then((function(){return pi})),Promise.resolve().then((function(){return io})),Promise.resolve().then((function(){return uo})),Promise.resolve().then((function(){return go})),Promise.resolve().then((function(){return $o})),Promise.resolve().then((function(){return Lo})),Promise.resolve().then((function(){return qs})),Promise.resolve().then((function(){return Ao})),Promise.resolve().then((function(){return Io})),Promise.resolve().then((function(){return jo})),Promise.resolve().then((function(){return Qi})),Promise.resolve().then((function(){return Uo})),Promise.resolve().then((function(){return qo})),Promise.resolve().then((function(){return Bo})),Promise.resolve().then((function(){return Go})),Promise.resolve().then((function(){return ic})),Promise.resolve().then((function(){return cc})),Promise.resolve().then((function(){return yc})),Promise.resolve().then((function(){return wc})),Promise.resolve().then((function(){return xc})),Promise.resolve().then((function(){return Rc})),Promise.resolve().then((function(){return Nc})),Promise.resolve().then((function(){return Oc})),Promise.resolve().then((function(){return zc})),Promise.resolve().then((function(){return cl})),Promise.resolve().then((function(){return gl})),Promise.resolve().then((function(){return $a})),Promise.resolve().then((function(){return Ol})),Promise.resolve().then((function(){return Ql})),Promise.resolve().then((function(){return _l})),Promise.resolve().then((function(){return cu})),Promise.resolve().then((function(){return Ia})),Promise.resolve().then((function(){return ku})),Promise.resolve().then((function(){return xu})),Promise.resolve().then((function(){return _o})),Promise.resolve().then((function(){return Cu})),Promise.resolve().then((function(){return Su})),Promise.resolve().then((function(){return Tu})),Promise.resolve().then((function(){return Du})),Promise.resolve().then((function(){return ju})),Promise.resolve().then((function(){return Mu})),Promise.resolve().then((function(){return Hu})),Promise.resolve().then((function(){return ld})),Promise.resolve().then((function(){return yd})),Promise.resolve().then((function(){return $d})),Promise.resolve().then((function(){return _d})),Promise.resolve().then((function(){return Ld})),Promise.resolve().then((function(){return Od})),Promise.resolve().then((function(){return jd})),Promise.resolve().then((function(){return Fd})),Promise.resolve().then((function(){return Jd})),Promise.resolve().then((function(){return Kc})),Promise.resolve().then((function(){return tp})),Promise.resolve().then((function(){return op})),Promise.resolve().then((function(){return cp})),Promise.resolve().then((function(){return up})),Promise.resolve().then((function(){return yp})),Promise.resolve().then((function(){return kp})),Promise.resolve().then((function(){return _p})),Promise.resolve().then((function(){return Tp})),Promise.resolve().then((function(){return Rp})),Promise.resolve().then((function(){return Lp})),Promise.resolve().then((function(){return Np})),Promise.resolve().then((function(){return zp})),Promise.resolve().then((function(){return qp})),Promise.resolve().then((function(){return Hp})),Promise.resolve().then((function(){return Jp})),Promise.resolve().then((function(){return Qp})),Promise.resolve().then((function(){return nh})),Promise.resolve().then((function(){return ih})),Promise.resolve().then((function(){return uh})),Promise.resolve().then((function(){return gh})),Promise.resolve().then((function(){return wh})),Promise.resolve().then((function(){return $h})),Promise.resolve().then((function(){return _h})),Promise.resolve().then((function(){return Lh}))];Promise.all(oi).then((e=>ii(e))).catch((e=>console.error(e)));var ai=Object.freeze({__proto__:null,default:'// ReSpec Worker\n"use strict";\n// hljs is either inlined by core/worker.js (preferred) or loaded below via\n// importScripts as a fallback when the inline fetch was not possible.\nif (typeof self.hljs === "undefined" && self.RESPEC_HIGHLIGHT_URL) {\n try {\n importScripts(self.RESPEC_HIGHLIGHT_URL);\n } catch (err) {\n console.error("Network error loading highlighter", err);\n }\n}\n\nself.addEventListener("message", ({ data }) => {\n switch (data.action) {\n case "highlight-load-lang": {\n const { langURL, langScript, propName, lang } = data;\n console.warn(\n `[ReSpec] The "highlight-load-lang" worker action is deprecated ` +\n `and will be removed in a future version. ` +\n `To migrate, fetch your language script in the main thread and ` +\n `send the text as "langScript" instead of "langURL". ` +\n `The "langURL" path may fail in Firefox. ` +\n `See https://github.com/speced/respec/issues/5228`\n );\n try {\n if (langScript) {\n const blob = new Blob([langScript], {\n type: "application/javascript",\n });\n const objectURL = URL.createObjectURL(blob);\n try {\n importScripts(objectURL);\n } finally {\n URL.revokeObjectURL(objectURL);\n }\n } else if (langURL) {\n const { protocol, hostname } = new URL(langURL);\n const isSecure =\n protocol === "https:" ||\n (protocol === "http:" &&\n (hostname === "localhost" ||\n hostname === "127.0.0.1" ||\n hostname === "[::1]"));\n if (!isSecure) {\n throw new Error(\n `langURL must be https: or http: on localhost, got "${langURL}"`\n );\n }\n importScripts(langURL);\n } else {\n throw new Error(\n `No langScript or langURL provided for language "${lang}"`\n );\n }\n if (typeof self[propName] === "function") {\n self.hljs.registerLanguage(lang, self[propName]);\n } else {\n throw new Error(\n `Language definer "${propName}" is not a function on self`\n );\n }\n } catch (err) {\n console.error("Failed to load or register language", lang, err);\n }\n delete data.langScript;\n delete data.langURL;\n break;\n }\n case "highlight": {\n const { code } = data;\n const langs = data.languages?.length ? data.languages : undefined;\n try {\n const { value, language } = self.hljs.highlightAuto(code, langs);\n Object.assign(data, { value, language });\n } catch (err) {\n console.error("Could not transform some code?", err);\n Object.assign(data, { value: code, language: "" });\n }\n break;\n }\n }\n self.postMessage(data);\n});\n'});var ci=Object.freeze({__proto__:null,name:"core/location-hash",run:function(){window.location.hash&&document.respec.ready.then((()=>{let e=decodeURIComponent(window.location.hash).slice(1);const t=document.getElementById(e),n=/\W/.test(e);if(!t&&n){const t=e.replace(/[\W]+/gim,"-").replace(/^-+/,"").replace(/-+$/,"");document.getElementById(t)&&(e=t)}window.location.hash=`#${e}`}))}});const li="w3c/group",ui="https://respec.org/w3c/groups/";async function di(e){let t="",n=e;e.includes("/")&&([t,n]=e.split("/",2));const r=new URL(`${n}/${t}`,ui),s=await zr(r.href);if(s.ok){const e=await s.json(),{id:t,name:n,patentURI:r,patentPolicy:i,type:o,wgURI:a}=e;return{wg:n,wgId:t,wgURI:a,wgPatentURI:r,wgPatentPolicy:i,groupType:o}}const i=await s.text();let o,a=`Failed to fetch group details (HTTP: ${s.status}).`;409===s.status?[a,o]=i.split("\n",2):404===s.status&&(o=ls`See the list of [supported group names](https://respec.org/w3c/groups/) to use with the ${"[group]"} configuration option.`),ns(a,li,{hint:o})}var pi=Object.freeze({__proto__:null,name:li,run:async function(e){if(!e.group)return;const{group:t}=e,n=Array.isArray(t)?await async function(e){const t=await Promise.all(e.map(di)),n={wg:[],wgId:[],wgURI:[],wgPatentURI:[],wgPatentPolicy:[],groupType:[]};for(const e of t.filter(Boolean))for(const t of Object.keys(n))n[t].push(e[t]);return n}(t):await di(t);Object.assign(e,n)}});function hi(e){if(!e.key){const t="Found a link without `key` attribute in the configuration. See dev console.";return rs(t,"core/templates/show-link"),void console.warn(t,e)}return sr`
97
+ </div>`;const i=new Map([["labelledby",s]]);Js(Xs,i),document.body.append(Qs,Xs),Qs.addEventListener("click",(()=>this.closeModal(n))),Qs.classList.toggle("respec-show-overlay"),Xs.hidden=!1,ii(Xs)}};function li(e){if("string"==typeof e)return e;const t=e.plugin?`<p class="respec-plugin">(plugin: "${e.plugin}")</p>`:"",n=e.hint?`\n${Fs(`<p class="respec-hint"><strong>How to fix:</strong> ${gs(e.hint)}`,{inline:!e.hint.includes("\n")})}\n`:"",r=Array.isArray(e.elements)?`<p class="respec-occurrences">Occurred <strong>${e.elements.length}</strong> times at:</p>\n ${Fs(e.elements.map(ui).join("\n"))}`:"",s=e.details?`\n\n<details>\n${e.details}\n</details>\n`:"";return`${Fs(`**${zr(e.message)}**`,{inline:!0})}${n}${r}${s}${t}`}function ui(e){return`* [\`<${e.localName}>\`](#${e.id}) element`}async function di(e){try{ci.show(),await async function(){"loading"===document.readyState&&await new Promise((e=>document.addEventListener("DOMContentLoaded",e)))}(),await js(e)}finally{ci.enable()}}document.addEventListener("keydown",(e=>{"Escape"===e.key&&ci.closeModal()})),window.respecUI=ci,ws("error",(e=>ci.error(e))),ws("warn",(e=>ci.warning(e))),window.addEventListener("error",(e=>{console.error(e.error,e.message,e)}));const pi=[Promise.resolve().then((function(){return fi})),Promise.resolve().then((function(){return s})),Promise.resolve().then((function(){return yi})),Promise.resolve().then((function(){return po})),Promise.resolve().then((function(){return bo})),Promise.resolve().then((function(){return $o})),Promise.resolve().then((function(){return Ro})),Promise.resolve().then((function(){return Oo})),Promise.resolve().then((function(){return Vs})),Promise.resolve().then((function(){return jo})),Promise.resolve().then((function(){return Uo})),Promise.resolve().then((function(){return Fo})),Promise.resolve().then((function(){return io})),Promise.resolve().then((function(){return Go})),Promise.resolve().then((function(){return Vo})),Promise.resolve().then((function(){return Zo})),Promise.resolve().then((function(){return Xo})),Promise.resolve().then((function(){return uc})),Promise.resolve().then((function(){return hc})),Promise.resolve().then((function(){return xc})),Promise.resolve().then((function(){return Cc})),Promise.resolve().then((function(){return Rc})),Promise.resolve().then((function(){return Nc})),Promise.resolve().then((function(){return zc})),Promise.resolve().then((function(){return qc})),Promise.resolve().then((function(){return Fc})),Promise.resolve().then((function(){return hl})),Promise.resolve().then((function(){return kl})),Promise.resolve().then((function(){return Ra})),Promise.resolve().then((function(){return ql})),Promise.resolve().then((function(){return su})),Promise.resolve().then((function(){return Al})),Promise.resolve().then((function(){return hu})),Promise.resolve().then((function(){return za})),Promise.resolve().then((function(){return _u})),Promise.resolve().then((function(){return Ru})),Promise.resolve().then((function(){return Po})),Promise.resolve().then((function(){return Eu})),Promise.resolve().then((function(){return Lu})),Promise.resolve().then((function(){return Pu})),Promise.resolve().then((function(){return Uu})),Promise.resolve().then((function(){return Wu})),Promise.resolve().then((function(){return Bu})),Promise.resolve().then((function(){return Zu})),Promise.resolve().then((function(){return fd})),Promise.resolve().then((function(){return xd})),Promise.resolve().then((function(){return Td})),Promise.resolve().then((function(){return Ad})),Promise.resolve().then((function(){return Dd})),Promise.resolve().then((function(){return qd})),Promise.resolve().then((function(){return Wd})),Promise.resolve().then((function(){return Jd})),Promise.resolve().then((function(){return Qd})),Promise.resolve().then((function(){return el})),Promise.resolve().then((function(){return op})),Promise.resolve().then((function(){return dp})),Promise.resolve().then((function(){return hp})),Promise.resolve().then((function(){return mp})),Promise.resolve().then((function(){return xp})),Promise.resolve().then((function(){return _p})),Promise.resolve().then((function(){return Ap})),Promise.resolve().then((function(){return Pp})),Promise.resolve().then((function(){return Np})),Promise.resolve().then((function(){return Dp})),Promise.resolve().then((function(){return zp})),Promise.resolve().then((function(){return Fp})),Promise.resolve().then((function(){return Gp})),Promise.resolve().then((function(){return Zp})),Promise.resolve().then((function(){return Qp})),Promise.resolve().then((function(){return sh})),Promise.resolve().then((function(){return ah})),Promise.resolve().then((function(){return uh})),Promise.resolve().then((function(){return mh})),Promise.resolve().then((function(){return kh})),Promise.resolve().then((function(){return Ch})),Promise.resolve().then((function(){return Th})),Promise.resolve().then((function(){return Ah})),Promise.resolve().then((function(){return Dh}))];Promise.all(pi).then((e=>di(e))).catch((e=>console.error(e)));var hi=Object.freeze({__proto__:null,default:'// ReSpec Worker\n"use strict";\n// hljs is either inlined by core/worker.js (preferred) or loaded below via\n// importScripts as a fallback when the inline fetch was not possible.\nif (typeof self.hljs === "undefined" && self.RESPEC_HIGHLIGHT_URL) {\n try {\n importScripts(self.RESPEC_HIGHLIGHT_URL);\n } catch (err) {\n console.error("Network error loading highlighter", err);\n }\n}\n\nself.addEventListener("message", ({ data }) => {\n switch (data.action) {\n case "highlight-load-lang": {\n const { langURL, langScript, propName, lang } = data;\n console.warn(\n `[ReSpec] The "highlight-load-lang" worker action is deprecated ` +\n `and will be removed in a future version. ` +\n `To migrate, fetch your language script in the main thread and ` +\n `send the text as "langScript" instead of "langURL". ` +\n `The "langURL" path may fail in Firefox. ` +\n `See https://github.com/speced/respec/issues/5228`\n );\n try {\n if (langScript) {\n const blob = new Blob([langScript], {\n type: "application/javascript",\n });\n const objectURL = URL.createObjectURL(blob);\n try {\n importScripts(objectURL);\n } finally {\n URL.revokeObjectURL(objectURL);\n }\n } else if (langURL) {\n const { protocol, hostname } = new URL(langURL);\n const isSecure =\n protocol === "https:" ||\n (protocol === "http:" &&\n (hostname === "localhost" ||\n hostname === "127.0.0.1" ||\n hostname === "[::1]"));\n if (!isSecure) {\n throw new Error(\n `langURL must be https: or http: on localhost, got "${langURL}"`\n );\n }\n importScripts(langURL);\n } else {\n throw new Error(\n `No langScript or langURL provided for language "${lang}"`\n );\n }\n if (typeof self[propName] === "function") {\n self.hljs.registerLanguage(lang, self[propName]);\n } else {\n throw new Error(\n `Language definer "${propName}" is not a function on self`\n );\n }\n } catch (err) {\n console.error("Failed to load or register language", lang, err);\n }\n delete data.langScript;\n delete data.langURL;\n break;\n }\n case "highlight": {\n const { code } = data;\n const langs = data.languages?.length ? data.languages : undefined;\n try {\n const { value, language } = self.hljs.highlightAuto(code, langs);\n Object.assign(data, { value, language });\n } catch (err) {\n console.error("Could not transform some code?", err);\n Object.assign(data, { value: code, language: "" });\n }\n break;\n }\n }\n self.postMessage(data);\n});\n'});var fi=Object.freeze({__proto__:null,name:"core/location-hash",run:function(){window.location.hash&&document.respec.ready.then((()=>{let e=decodeURIComponent(window.location.hash).slice(1);const t=document.getElementById(e),n=/\W/.test(e);if(!t&&n){const t=e.replace(/[\W]+/gim,"-").replace(/^-+/,"").replace(/-+$/,"");document.getElementById(t)&&(e=t)}window.location.hash=`#${e}`}))}});const mi="w3c/group",gi="https://respec.org/w3c/groups/";async function bi(e){let t="",n=e;e.includes("/")&&([t,n]=e.split("/",2));const r=new URL(`${n}/${t}`,gi),s=await Br(r.href);if(s.ok){const e=await s.json(),{id:t,name:n,patentURI:r,patentPolicy:i,type:o,wgURI:a}=e;return{wg:n,wgId:t,wgURI:a,wgPatentURI:r,wgPatentPolicy:i,groupType:o}}const i=await s.text();let o,a=`Failed to fetch group details (HTTP: ${s.status}).`;409===s.status?[a,o]=i.split("\n",2):404===s.status&&(o=ms`See the list of [supported group names](https://respec.org/w3c/groups/) to use with the ${"[group]"} configuration option.`),cs(a,mi,{hint:o})}var yi=Object.freeze({__proto__:null,name:mi,run:async function(e){if(!e.group)return;const{group:t}=e,n=Array.isArray(t)?await async function(e){const t=await Promise.all(e.map(bi)),n={wg:[],wgId:[],wgURI:[],wgPatentURI:[],wgPatentPolicy:[],groupType:[]};for(const e of t.filter(Boolean))for(const t of Object.keys(n))n[t].push(e[t]);return n}(t):await bi(t);Object.assign(e,n)}});function wi(e){if(!e.key){const t="Found a link without `key` attribute in the configuration. See dev console.";return ls(t,"core/templates/show-link"),void console.warn(t,e)}return ur`
98
98
  <dt class="${e.class?e.class:null}">${e.key}</dt>
99
- ${e.data?e.data.map(fi):fi(e)}
100
- `}function fi(e){return sr`<dd class="${e.class?e.class:null}">
101
- ${e.href?sr`<a href="${e.href}">${e.value||e.href}</a>`:e.value}
102
- </dd>`}const mi="core/templates/show-logo";function gi(e,t){const n=sr`<a href="${e.url||null}" class="logo"
99
+ ${e.data?e.data.map(vi):vi(e)}
100
+ `}function vi(e){return ur`<dd class="${e.class?e.class:null}">
101
+ ${e.href?ur`<a href="${e.href}">${e.value||e.href}</a>`:e.value}
102
+ </dd>`}const ki="core/templates/show-logo";function $i(e,t){const n=ur`<a href="${e.url||null}" class="logo"
103
103
  ><img
104
104
  alt="${e.alt||null}"
105
105
  crossorigin
@@ -108,7 +108,7 @@ p:is(.respec-hint,.respec-occurrences){display:block;margin-top:.5em}
108
108
  src="${e.src||null}"
109
109
  width="${e.width||null}"
110
110
  />
111
- </a>`;if(!e.alt){const r=ls`Add the missing "\`alt\`" property describing the logo. See ${"[logos]"} for more information.`;ns(`Logo at index ${t}${e.src?`, with \`src\` ${e.src}, `:""} is missing required "\`alt\`" property.`,mi,{hint:r,elements:[n]})}if(!e.src){const e=ls`The \`src\` property is required on every logo. See ${"[logos]"} for more information.`;ns(`Logo at index ${t} is missing "\`src\`" property.`,mi,{hint:e,elements:[n]})}return n}const bi="core/templates/show-people",yi=Ir({en:{until:e=>sr` Until ${e} `},es:{until:e=>sr` Hasta ${e} `},ko:{until:e=>sr` ${e} 이전 `},ja:{until:e=>sr` ${e} 以前 `},de:{until:e=>sr` bis ${e} `},zh:{until:e=>sr` 直到 ${e} `}}),wi=()=>sr`<svg
111
+ </a>`;if(!e.alt){const r=ms`Add the missing "\`alt\`" property describing the logo. See ${"[logos]"} for more information.`;cs(`Logo at index ${t}${e.src?`, with \`src\` ${e.src}, `:""} is missing required "\`alt\`" property.`,ki,{hint:r,elements:[n]})}if(!e.src){const e=ms`The \`src\` property is required on every logo. See ${"[logos]"} for more information.`;cs(`Logo at index ${t} is missing "\`src\`" property.`,ki,{hint:e,elements:[n]})}return n}const xi="core/templates/show-people",Ci=Ur({en:{until:e=>ur` Until ${e} `},es:{until:e=>ur` Hasta ${e} `},ko:{until:e=>ur` ${e} 이전 `},ja:{until:e=>ur` ${e} 以前 `},de:{until:e=>ur` bis ${e} `},zh:{until:e=>ur` 直到 ${e} `}}),Si=()=>ur`<svg
112
112
  width="16"
113
113
  height="16"
114
114
  xmlns="http://www.w3.org/2000/svg"
@@ -127,302 +127,302 @@ p:is(.respec-hint,.respec-occurrences){display:block;margin-top:.5em}
127
127
  class="st1"
128
128
  d="M86.3 186.2H70.9V79.1h15.4v107.1zM108.9 79.1h41.6c39.6 0 57 28.3 57 53.6 0 27.5-21.5 53.6-56.8 53.6h-41.8V79.1zm15.4 93.3h24.5c34.9 0 42.9-26.5 42.9-39.7C191.7 111.2 178 93 148 93h-23.7v79.4zM88.7 56.8c0 5.5-4.5 10.1-10.1 10.1s-10.1-4.6-10.1-10.1c0-5.6 4.5-10.1 10.1-10.1s10.1 4.6 10.1 10.1z"
129
129
  />
130
- </svg>`;function vi(e,t){const n=e[t];if(!Array.isArray(n)||!n.length)return;const r=(s=t,function(e,t){const n="https://respec.org/docs/",r=`See [person](${n}#person) configuration for available options.`,i=`Error processing the [person object](${n}#person) at index ${t} of the "[\`${s}\`](${n}#${s})" configuration option.`;if(!e.name)return ns(`${i} Missing required property \`"name"\`.`,bi,{hint:r}),!1;if(e.orcid){const{orcid:n}=e,r=new URL(n,"https://orcid.org/");if("https://orcid.org"!==r.origin){const n=`${i} ORCID "${e.orcid}" at index ${t} is invalid.`,s=`The origin should be "https://orcid.org", not "${r.origin}".`;return ns(n,bi,{hint:s}),!1}const s=r.pathname.slice(1).replace(/\/$/,"");if(!/^\d{4}-\d{4}-\d{4}-\d{3}(\d|X)$/.test(s))return ns(`${i} ORCID "${s}" has wrong format.`,bi,{hint:'ORCIDs have the format "1234-1234-1234-1234."'}),!1;if(!function(e){const t=e[e.length-1],n=e.split("").slice(0,-1).filter((e=>/\d/.test(e))).map(Number).reduce(((e,t)=>2*(e+t)),0),r=(12-n%11)%11,s=10===r?"X":String(r);return t===s}(n))return ns(`${i} ORCID "${n}" failed checksum check.`,bi,{hint:"Please check that the ORCID is valid."}),!1;e.orcid=r.href}return e.retiredDate&&(o=e.retiredDate,"Invalid Date"===(/\d{4}-\d{2}-\d{2}/.test(o)?new Date(o):"Invalid Date").toString())?(ns(`${i} The property "\`retiredDate\`" is not a valid date.`,bi,{hint:`The expected format is YYYY-MM-DD. ${r}`}),!1):!(e.hasOwnProperty("extras")&&!function(e,t,n){return Array.isArray(e)?e.every(((e,r)=>{switch(!0){case"object"!=typeof e:return ns(`${n}. Member "extra" at index ${r} is not an object.`,bi,{hint:t}),!1;case!e.hasOwnProperty("name"):return ns(`${n} \`PersonExtra\` object at index ${r} is missing required "name" member.`,bi,{hint:t}),!1;case"string"==typeof e.name&&""===e.name.trim():return ns(`${n} \`PersonExtra\` object at index ${r} "name" can't be empty.`,bi,{hint:t}),!1}return!0})):(ns(`${n}. A person's "extras" member must be an array.`,bi,{hint:t}),!1)}(e.extras??[],r,i))&&(e.url&&e.mailto&&rs(`${i} Has both "url" and "mailto" property.`,bi,{hint:`Please choose either "url" or "mailto" ("url" is preferred). ${r}`}),e.companyURL&&!e.company&&rs(`${i} Has a "\`companyURL\`" property but no "\`company\`" property.`,bi,{hint:`Please add a "\`company\`" property. ${r}.`}),!0);var o});var s;return n.filter(r).map(ki)}function ki(e){const t=[e.name],n=[e.company],r=e.w3cid||null,s=[];if(e.mailto&&(e.url=`mailto:${e.mailto}`),e.url){const n="mailto:"===new URL(e.url,document.location.href).protocol?"ed_mailto u-email email p-name":"u-url url p-name fn";s.push(sr`<a class="${n}" href="${e.url}">${t}</a>`)}else s.push(sr`<span class="p-name fn">${t}</span>`);if(e.orcid&&s.push(sr`<a class="p-name orcid" href="${e.orcid}">${wi()}</a>`),e.company){const t="p-org org h-org",r=e.companyURL?sr`<a class="${t}" href="${e.companyURL}">${n}</a>`:sr`<span class="${t}">${n}</span>`;s.push(sr` (${r})`)}e.note&&s.push(document.createTextNode(` (${e.note})`)),e.extras&&s.push(...e.extras.map((e=>sr`, ${function(e){const t=e.class||null,{name:n,href:r}=e;return r?sr`<a href="${r}" class="${t}">${n}</a>`:sr`<span class="${t}">${n}</span>`}(e)}`)));const{retiredDate:i}=e;if(e.retiredDate){const e=sr`<time datetime="${i}"
131
- >${xr.format(new Date(i??""))}</time
132
- >`;s.push(sr` - ${yi.until(e)} `)}return sr`<dd
130
+ </svg>`;function _i(e,t){const n=e[t];if(!Array.isArray(n)||!n.length)return;const r=(s=t,function(e,t){const n="https://respec.org/docs/",r=`See [person](${n}#person) configuration for available options.`,i=`Error processing the [person object](${n}#person) at index ${t} of the "[\`${s}\`](${n}#${s})" configuration option.`;if(!e.name)return cs(`${i} Missing required property \`"name"\`.`,xi,{hint:r}),!1;if(e.orcid){const{orcid:n}=e,r=new URL(n,"https://orcid.org/");if("https://orcid.org"!==r.origin){const n=`${i} ORCID "${e.orcid}" at index ${t} is invalid.`,s=`The origin should be "https://orcid.org", not "${r.origin}".`;return cs(n,xi,{hint:s}),!1}const s=r.pathname.slice(1).replace(/\/$/,"");if(!/^\d{4}-\d{4}-\d{4}-\d{3}(\d|X)$/.test(s))return cs(`${i} ORCID "${s}" has wrong format.`,xi,{hint:'ORCIDs have the format "1234-1234-1234-1234."'}),!1;if(!function(e){const t=e[e.length-1],n=e.split("").slice(0,-1).filter((e=>/\d/.test(e))).map(Number).reduce(((e,t)=>2*(e+t)),0),r=(12-n%11)%11,s=10===r?"X":String(r);return t===s}(n))return cs(`${i} ORCID "${n}" failed checksum check.`,xi,{hint:"Please check that the ORCID is valid."}),!1;e.orcid=r.href}return e.retiredDate&&(o=e.retiredDate,"Invalid Date"===(/\d{4}-\d{2}-\d{2}/.test(o)?new Date(o):"Invalid Date").toString())?(cs(`${i} The property "\`retiredDate\`" is not a valid date.`,xi,{hint:`The expected format is YYYY-MM-DD. ${r}`}),!1):!(e.hasOwnProperty("extras")&&!function(e,t,n){return Array.isArray(e)?e.every(((e,r)=>{switch(!0){case"object"!=typeof e:return cs(`${n}. Member "extra" at index ${r} is not an object.`,xi,{hint:t}),!1;case!e.hasOwnProperty("name"):return cs(`${n} \`PersonExtra\` object at index ${r} is missing required "name" member.`,xi,{hint:t}),!1;case"string"==typeof e.name&&""===e.name.trim():return cs(`${n} \`PersonExtra\` object at index ${r} "name" can't be empty.`,xi,{hint:t}),!1}return!0})):(cs(`${n}. A person's "extras" member must be an array.`,xi,{hint:t}),!1)}(e.extras??[],r,i))&&(e.url&&e.mailto&&ls(`${i} Has both "url" and "mailto" property.`,xi,{hint:`Please choose either "url" or "mailto" ("url" is preferred). ${r}`}),e.companyURL&&!e.company&&ls(`${i} Has a "\`companyURL\`" property but no "\`company\`" property.`,xi,{hint:`Please add a "\`company\`" property. ${r}.`}),!0);var o});var s;return n.filter(r).map(Ti)}function Ti(e){const t=[e.name],n=[e.company],r=e.w3cid||null,s=[];if(e.mailto&&(e.url=`mailto:${e.mailto}`),e.url){const n="mailto:"===new URL(e.url,document.location.href).protocol?"ed_mailto u-email email p-name":"u-url url p-name fn";s.push(ur`<a class="${n}" href="${e.url}">${t}</a>`)}else s.push(ur`<span class="p-name fn">${t}</span>`);if(e.orcid&&s.push(ur`<a class="p-name orcid" href="${e.orcid}">${Si()}</a>`),e.company){const t="p-org org h-org",r=e.companyURL?ur`<a class="${t}" href="${e.companyURL}">${n}</a>`:ur`<span class="${t}">${n}</span>`;s.push(ur` (${r})`)}e.note&&s.push(document.createTextNode(` (${e.note})`)),e.extras&&s.push(...e.extras.map((e=>ur`, ${function(e){const t=e.class||null,{name:n,href:r}=e;return r?ur`<a href="${r}" class="${t}">${n}</a>`:ur`<span class="${t}">${n}</span>`}(e)}`)));const{retiredDate:i}=e;if(e.retiredDate){const e=ur`<time datetime="${i}"
131
+ >${Er.format(new Date(i??""))}</time
132
+ >`;s.push(ur` - ${Ci.until(e)} `)}return ur`<dd
133
133
  class="editor p-author h-card vcard"
134
134
  data-editor-id="${r}"
135
135
  >
136
136
  ${s}
137
- </dd>`}const $i=Ir({en:{archives:"archives",author:"Author:",authors:"Authors:",commit_history:"Commit history",edited_in_place:"edited in place",editor:"Editor:",editors:"Editors:",feedback:"Feedback:",former_editor:"Former editor:",former_editors:"Former editors:",history:"History:",implementation_report:"Implementation report:",latest_editors_draft:"Latest editor's draft:",latest_published_version:"Latest published version:",latest_recommendation:"Latest Recommendation:",message_topic:"… message topic …",more_details_about_this_doc:"More details about this document",multiple_alternates:e=>`This document is also available in ${e?"these non-normative formats":"this non-normative format"}:`,prev_editor_draft:"Previous editor's draft:",prev_recommendation:"Previous Recommendation:",prev_version:"Previous version:",publication_history:"Publication history",test_suite:"Test suite:",this_version:"This version:",with_subject_line:"with subject line",your_topic_here:"YOUR TOPIC HERE"},ko:{author:"저자:",authors:"저자:",editor:"편집자:",editors:"편집자:",former_editor:"이전 편집자:",former_editors:"이전 편집자:",latest_editors_draft:"최신 편집 초안:",latest_published_version:"최신 버전:",this_version:"현재 버전:"},zh:{author:"作者:",authors:"作者:",commit_history:"Git提交历史",editor:"编辑:",editors:"编辑:",feedback:"反馈:",former_editor:"原编辑:",former_editors:"原编辑:",history:"历史:",implementation_report:"实现报告:",latest_editors_draft:"最新编辑草稿:",latest_published_version:"最新发布版本:",latest_recommendation:"最新发布的正式推荐标准:",message_topic:"… 邮件主题 …",prev_editor_draft:"上一版编辑草稿:",prev_recommendation:"上一版正式推荐标准:",prev_version:"上一版:",test_suite:"测试套件:",this_version:"本版本:"},ja:{archives:"アーカイブ",author:"著者:",authors:"著者:",commit_history:"更新履歴",edited_in_place:"改版なく更新",editor:"編者:",editors:"編者:",feedback:"フィードバック:",former_editor:"以前の版の編者:",former_editors:"以前の版の編者:",history:"履歴:",implementation_report:"実装レポート:",latest_editors_draft:"最新の編集用草案:",latest_published_version:"最新バージョン:",latest_recommendation:"最新の勧告版:",message_topic:"… メール件名 …",more_details_about_this_doc:"この文書についてのより詳細",prev_editor_draft:"前回の編集用草案:",prev_recommendation:"前回の勧告版:",prev_version:"前回のバージョン:",publication_history:"公表履歴",test_suite:"テストスイート:",this_version:"このバージョン:",with_subject_line:"次の件名で"},nl:{author:"Auteur:",authors:"Auteurs:",editor:"Redacteur:",editors:"Redacteurs:",latest_editors_draft:"Laatste werkversie:",latest_published_version:"Laatst gepubliceerde versie:",this_version:"Deze versie:"},es:{archives:"archivos",author:"Autor:",authors:"Autores:",commit_history:"Historial de cambios",edited_in_place:"editado en lugar",editor:"Editor:",editors:"Editores:",feedback:"Comentarios:",former_editor:"Antiguo editor:",former_editors:"Antiguos editores:",history:"Historia:",implementation_report:"Informe de implementación:",latest_editors_draft:"Última versión del editor:",latest_published_version:"Última versión publicada:",latest_recommendation:"Recomendación más reciente:",message_topic:"… detalles de mensaje …",more_details_about_this_doc:"Más detalles sobre este documento:",publication_history:"Historial de publicación",prev_editor_draft:"Última versión del editor:",prev_recommendation:"Última Recomendación:",prev_version:"Última versión:",test_suite:"Suite de pruebas:",this_version:"Esta versión:",with_subject_line:"con línea de asunto",your_topic_here:"TU SUJETO AQUÍ"},de:{archives:"Archiv",author:"Autor/in:",authors:"Autor/innen:",commit_history:"Commit-Historie",edited_in_place:"zuletzt geändert am",editor:"Redaktion:",editors:"Redaktion:",feedback:"Feedback:",former_editor:"Frühere Mitwirkende:",former_editors:"Frühere Mitwirkende:",history:"Verlauf:",implementation_report:"Umsetzungsbericht:",latest_editors_draft:"Letzter Entwurf:",latest_published_version:"Letzte publizierte Fassung:",latest_recommendation:"Aktuellste Empfehlung:",more_details_about_this_doc:"Mehr Informationen über dieses Dokument",multiple_alternates:e=>`Dieses Dokument ist ebenfalls in ${e?"diesen nicht-normativen Formaten verfügbar":"diesem nicht-normativen Format verfügbar"}:`,prev_editor_draft:"Vorheriger Entwurf:",prev_recommendation:"Vorherige Empfehlung:",prev_version:"Vorherige Version:",publication_history:"Veröffentlichungsverlauf",test_suite:"Testumgebung:",this_version:"Diese Fassung:"},cs:{archives:"archivy",author:"Autor:",authors:"Autoři:",commit_history:"Historie změn",edited_in_place:"upraveno přímo",editor:"Editor:",editors:"Editoři:",feedback:"Zpětná vazba:",former_editor:"Bývalý editor:",former_editors:"Bývalí editoři:",history:"Historie:",implementation_report:"Implementační zpráva:",latest_editors_draft:"Nejnovější pracovní verze:",latest_published_version:"Nejnovější publikovaná verze:",latest_recommendation:"Nejnovější doporučení:",message_topic:"… předmět zprávy …",more_details_about_this_doc:"Více informací o tomto dokumentu",multiple_alternates:e=>`Tento dokument je také dostupný v ${e?"těchto ne-normativních formátech":"tomto ne-normativním formátu"}:`,prev_editor_draft:"Předchozí pracovní verze:",prev_recommendation:"Předchozí doporučení:",prev_version:"Předchozí verze:",publication_history:"Historie publikací",test_suite:"Testovací sada:",this_version:"Tato verze:",with_subject_line:"s předmětem",your_topic_here:"VÁŠ PŘEDMĚT ZDE"}});function xi(e){let t=document.querySelector("h2#subtitle");return t&&t.parentElement?(t.remove(),e.subtitle=t.textContent.trim()):e.subtitle&&(t=document.createElement("h2"),t.textContent=e.subtitle,t.id="subtitle"),t&&t.classList.add("subtitle"),t}var Ci=(e,t)=>(hs("beforesave",(e=>{const t=e.querySelector(".head details");t&&(t.open=!0)})),sr`<div class="head">
138
- ${(e.logos??[]).length?sr`<p class="logos">${(e.logos??[]).map(gi)}</p>`:""}
139
- ${document.querySelector("h1#title")} ${xi(e)}
140
- <p id="w3c-state">${function(e){const t=e.isCR||e.isCRY?e.longStatus:e.textStatus,n=e.prependW3C?sr`<a href="https://www.w3.org/standards/types#${e.specStatus}"
137
+ </dd>`}const Ri=Ur({en:{archives:"archives",author:"Author:",authors:"Authors:",commit_history:"Commit history",edited_in_place:"edited in place",editor:"Editor:",editors:"Editors:",feedback:"Feedback:",former_editor:"Former editor:",former_editors:"Former editors:",history:"History:",implementation_report:"Implementation report:",latest_editors_draft:"Latest editor's draft:",latest_published_version:"Latest published version:",latest_recommendation:"Latest Recommendation:",message_topic:"… message topic …",more_details_about_this_doc:"More details about this document",multiple_alternates:e=>`This document is also available in ${e?"these non-normative formats":"this non-normative format"}:`,prev_editor_draft:"Previous editor's draft:",prev_recommendation:"Previous Recommendation:",prev_version:"Previous version:",publication_history:"Publication history",test_suite:"Test suite:",this_version:"This version:",with_subject_line:"with subject line",your_topic_here:"YOUR TOPIC HERE"},ko:{author:"저자:",authors:"저자:",editor:"편집자:",editors:"편집자:",former_editor:"이전 편집자:",former_editors:"이전 편집자:",latest_editors_draft:"최신 편집 초안:",latest_published_version:"최신 버전:",this_version:"현재 버전:"},zh:{author:"作者:",authors:"作者:",commit_history:"Git提交历史",editor:"编辑:",editors:"编辑:",feedback:"反馈:",former_editor:"原编辑:",former_editors:"原编辑:",history:"历史:",implementation_report:"实现报告:",latest_editors_draft:"最新编辑草稿:",latest_published_version:"最新发布版本:",latest_recommendation:"最新发布的正式推荐标准:",message_topic:"… 邮件主题 …",prev_editor_draft:"上一版编辑草稿:",prev_recommendation:"上一版正式推荐标准:",prev_version:"上一版:",test_suite:"测试套件:",this_version:"本版本:"},ja:{archives:"アーカイブ",author:"著者:",authors:"著者:",commit_history:"更新履歴",edited_in_place:"改版なく更新",editor:"編者:",editors:"編者:",feedback:"フィードバック:",former_editor:"以前の版の編者:",former_editors:"以前の版の編者:",history:"履歴:",implementation_report:"実装レポート:",latest_editors_draft:"最新の編集用草案:",latest_published_version:"最新バージョン:",latest_recommendation:"最新の勧告版:",message_topic:"… メール件名 …",more_details_about_this_doc:"この文書についてのより詳細",prev_editor_draft:"前回の編集用草案:",prev_recommendation:"前回の勧告版:",prev_version:"前回のバージョン:",publication_history:"公表履歴",test_suite:"テストスイート:",this_version:"このバージョン:",with_subject_line:"次の件名で"},nl:{author:"Auteur:",authors:"Auteurs:",editor:"Redacteur:",editors:"Redacteurs:",latest_editors_draft:"Laatste werkversie:",latest_published_version:"Laatst gepubliceerde versie:",this_version:"Deze versie:"},es:{archives:"archivos",author:"Autor:",authors:"Autores:",commit_history:"Historial de cambios",edited_in_place:"editado en lugar",editor:"Editor:",editors:"Editores:",feedback:"Comentarios:",former_editor:"Antiguo editor:",former_editors:"Antiguos editores:",history:"Historia:",implementation_report:"Informe de implementación:",latest_editors_draft:"Última versión del editor:",latest_published_version:"Última versión publicada:",latest_recommendation:"Recomendación más reciente:",message_topic:"… detalles de mensaje …",more_details_about_this_doc:"Más detalles sobre este documento:",publication_history:"Historial de publicación",prev_editor_draft:"Última versión del editor:",prev_recommendation:"Última Recomendación:",prev_version:"Última versión:",test_suite:"Suite de pruebas:",this_version:"Esta versión:",with_subject_line:"con línea de asunto",your_topic_here:"TU SUJETO AQUÍ"},de:{archives:"Archiv",author:"Autor/in:",authors:"Autor/innen:",commit_history:"Commit-Historie",edited_in_place:"zuletzt geändert am",editor:"Redaktion:",editors:"Redaktion:",feedback:"Feedback:",former_editor:"Frühere Mitwirkende:",former_editors:"Frühere Mitwirkende:",history:"Verlauf:",implementation_report:"Umsetzungsbericht:",latest_editors_draft:"Letzter Entwurf:",latest_published_version:"Letzte publizierte Fassung:",latest_recommendation:"Aktuellste Empfehlung:",more_details_about_this_doc:"Mehr Informationen über dieses Dokument",multiple_alternates:e=>`Dieses Dokument ist ebenfalls in ${e?"diesen nicht-normativen Formaten verfügbar":"diesem nicht-normativen Format verfügbar"}:`,prev_editor_draft:"Vorheriger Entwurf:",prev_recommendation:"Vorherige Empfehlung:",prev_version:"Vorherige Version:",publication_history:"Veröffentlichungsverlauf",test_suite:"Testumgebung:",this_version:"Diese Fassung:"},cs:{archives:"archivy",author:"Autor:",authors:"Autoři:",commit_history:"Historie změn",edited_in_place:"upraveno přímo",editor:"Editor:",editors:"Editoři:",feedback:"Zpětná vazba:",former_editor:"Bývalý editor:",former_editors:"Bývalí editoři:",history:"Historie:",implementation_report:"Implementační zpráva:",latest_editors_draft:"Nejnovější pracovní verze:",latest_published_version:"Nejnovější publikovaná verze:",latest_recommendation:"Nejnovější doporučení:",message_topic:"… předmět zprávy …",more_details_about_this_doc:"Více informací o tomto dokumentu",multiple_alternates:e=>`Tento dokument je také dostupný v ${e?"těchto ne-normativních formátech":"tomto ne-normativním formátu"}:`,prev_editor_draft:"Předchozí pracovní verze:",prev_recommendation:"Předchozí doporučení:",prev_version:"Předchozí verze:",publication_history:"Historie publikací",test_suite:"Testovací sada:",this_version:"Tato verze:",with_subject_line:"s předmětem",your_topic_here:"VÁŠ PŘEDMĚT ZDE"}});function Ei(e){let t=document.querySelector("h2#subtitle");return t&&t.parentElement?(t.remove(),e.subtitle=t.textContent.trim()):e.subtitle&&(t=document.createElement("h2"),t.textContent=e.subtitle,t.id="subtitle"),t&&t.classList.add("subtitle"),t}var Li=(e,t)=>(ws("beforesave",(e=>{const t=e.querySelector(".head details");t&&(t.open=!0)})),ur`<div class="head">
138
+ ${(e.logos??[]).length?ur`<p class="logos">${(e.logos??[]).map($i)}</p>`:""}
139
+ ${document.querySelector("h1#title")} ${Ei(e)}
140
+ <p id="w3c-state">${function(e){const t=e.isCR||e.isCRY?e.longStatus:e.textStatus,n=e.prependW3C?ur`<a href="https://www.w3.org/standards/types#${e.specStatus}"
141
141
  >W3C ${t}</a
142
- >`:sr`${t}`;return sr`${n}${" "}
142
+ >`:ur`${t}`;return ur`${n}${" "}
143
143
  <time class="dt-published" datetime="${e.dashDate}"
144
- >${xr.format(e.publishDate)}</time
145
- >${e.modificationDate?sr`, ${$i.edited_in_place}${" "}
146
- <time
147
- class="dt-modified"
148
- datetime="${kr.format(e.modificationDate)}"
149
- >${xr.format(e.modificationDate)}</time
150
- >`:""}`}(e)}</p>
144
+ >${Er.format(e.publishDate)}</time
145
+ >${e.modificationDate?ur`, ${Ri.edited_in_place}${" "}
146
+ <time
147
+ class="dt-modified"
148
+ datetime="${Tr.format(e.modificationDate)}"
149
+ >${Er.format(e.modificationDate)}</time
150
+ >`:""}`}(e)}</p>
151
151
  <details open="${localStorage.getItem("tr-metadata")||"true"}">
152
- <summary>${$i.more_details_about_this_doc}</summary>
152
+ <summary>${Ri.more_details_about_this_doc}</summary>
153
153
  <dl>
154
- ${e.thisVersion?sr`<dt>${$i.this_version}</dt>
155
- <dd>
156
- <a class="u-url" href="${e.thisVersion}"
157
- >${e.thisVersion}</a
158
- >
159
- </dd>`:""}
160
- ${"latestVersion"in e?sr`<dt>${$i.latest_published_version}</dt>
161
- <dd>
162
- ${e.latestVersion?sr`<a href="${e.latestVersion}"
163
- >${e.latestVersion}</a
164
- >`:"none"}
165
- </dd>`:""}
166
- ${e.edDraftURI?sr`
167
- <dt>${$i.latest_editors_draft}</dt>
168
- <dd><a href="${e.edDraftURI}">${e.edDraftURI}</a></dd>
169
- `:""}
170
- ${e.historyURI||e.github?sr`<dt>${$i.history}</dt>
171
- ${e.historyURI?sr`<dd>
172
- <a href="${e.historyURI}">${e.historyURI}</a>
173
- </dd>`:""}
174
- ${e.github?sr`<dd>
175
- <a
176
- href="${e.github.commitHistoryURL}"
177
- >${$i.commit_history}</a
178
- >
179
- </dd>`:""}`:""}
180
- ${e.testSuiteURI?sr`
181
- <dt>${$i.test_suite}</dt>
182
- <dd><a href="${e.testSuiteURI}">${e.testSuiteURI}</a></dd>
183
- `:""}
184
- ${e.implementationReportURI?sr`
185
- <dt>${$i.implementation_report}</dt>
186
- <dd>
187
- <a href="${e.implementationReportURI}"
188
- >${e.implementationReportURI}</a
189
- >
190
- </dd>
191
- `:""}
192
- ${e.prevED?sr`
193
- <dt>${$i.prev_editor_draft}</dt>
194
- <dd><a href="${e.prevED}">${e.prevED}</a></dd>
195
- `:""}
196
- ${e.showPreviousVersion?sr`
197
- <dt>${$i.prev_version}</dt>
198
- <dd><a href="${e.prevVersion}">${e.prevVersion}</a></dd>
199
- `:""}
200
- ${e.prevRecURI?e.isRec?sr`
201
- <dt>${$i.prev_recommendation}</dt>
202
- <dd><a href="${e.prevRecURI}">${e.prevRecURI}</a></dd>
203
- `:sr`
204
- <dt>${$i.latest_recommendation}</dt>
205
- <dd><a href="${e.prevRecURI}">${e.prevRecURI}</a></dd>
154
+ ${e.thisVersion?ur`<dt>${Ri.this_version}</dt>
155
+ <dd>
156
+ <a class="u-url" href="${e.thisVersion}"
157
+ >${e.thisVersion}</a
158
+ >
159
+ </dd>`:""}
160
+ ${"latestVersion"in e?ur`<dt>${Ri.latest_published_version}</dt>
161
+ <dd>
162
+ ${e.latestVersion?ur`<a href="${e.latestVersion}"
163
+ >${e.latestVersion}</a
164
+ >`:"none"}
165
+ </dd>`:""}
166
+ ${e.edDraftURI?ur`
167
+ <dt>${Ri.latest_editors_draft}</dt>
168
+ <dd><a href="${e.edDraftURI}">${e.edDraftURI}</a></dd>
206
169
  `:""}
207
- ${(e.editors??[]).length?sr`
208
- <dt>
209
- ${(e.editors??[]).length>1?$i.editors:$i.editor}
210
- </dt>
211
- ${vi(e,"editors")}
212
- `:""}
213
- ${(e.formerEditors??[]).length?sr`
214
- <dt>
215
- ${(e.formerEditors??[]).length>1?$i.former_editors:$i.former_editor}
216
- </dt>
217
- ${vi(e,"formerEditors")}
218
- `:""}
219
- ${(e.authors??[]).length?sr`
220
- <dt>
221
- ${(e.authors??[]).length>1?$i.authors:$i.author}
222
- </dt>
223
- ${vi(e,"authors")}
224
- `:""}
225
- ${e.github||e.wgPublicList?sr`<dt>${$i.feedback}</dt>
226
- ${Si(e)}`:""}
227
- ${e.errata?sr`<dt>Errata:</dt>
228
- <dd><a href="${e.errata}">Errata exists</a>.</dd>`:""}
229
- ${e.otherLinks?e.otherLinks.map(hi):""}
170
+ ${e.historyURI||e.github?ur`<dt>${Ri.history}</dt>
171
+ ${e.historyURI?ur`<dd>
172
+ <a href="${e.historyURI}">${e.historyURI}</a>
173
+ </dd>`:""}
174
+ ${e.github?ur`<dd>
175
+ <a
176
+ href="${e.github.commitHistoryURL}"
177
+ >${Ri.commit_history}</a
178
+ >
179
+ </dd>`:""}`:""}
180
+ ${e.testSuiteURI?ur`
181
+ <dt>${Ri.test_suite}</dt>
182
+ <dd><a href="${e.testSuiteURI}">${e.testSuiteURI}</a></dd>
183
+ `:""}
184
+ ${e.implementationReportURI?ur`
185
+ <dt>${Ri.implementation_report}</dt>
186
+ <dd>
187
+ <a href="${e.implementationReportURI}"
188
+ >${e.implementationReportURI}</a
189
+ >
190
+ </dd>
191
+ `:""}
192
+ ${e.prevED?ur`
193
+ <dt>${Ri.prev_editor_draft}</dt>
194
+ <dd><a href="${e.prevED}">${e.prevED}</a></dd>
195
+ `:""}
196
+ ${e.showPreviousVersion?ur`
197
+ <dt>${Ri.prev_version}</dt>
198
+ <dd><a href="${e.prevVersion}">${e.prevVersion}</a></dd>
199
+ `:""}
200
+ ${e.prevRecURI?e.isRec?ur`
201
+ <dt>${Ri.prev_recommendation}</dt>
202
+ <dd><a href="${e.prevRecURI}">${e.prevRecURI}</a></dd>
203
+ `:ur`
204
+ <dt>${Ri.latest_recommendation}</dt>
205
+ <dd><a href="${e.prevRecURI}">${e.prevRecURI}</a></dd>
206
+ `:""}
207
+ ${(e.editors??[]).length?ur`
208
+ <dt>
209
+ ${(e.editors??[]).length>1?Ri.editors:Ri.editor}
210
+ </dt>
211
+ ${_i(e,"editors")}
212
+ `:""}
213
+ ${(e.formerEditors??[]).length?ur`
214
+ <dt>
215
+ ${(e.formerEditors??[]).length>1?Ri.former_editors:Ri.former_editor}
216
+ </dt>
217
+ ${_i(e,"formerEditors")}
218
+ `:""}
219
+ ${(e.authors??[]).length?ur`
220
+ <dt>
221
+ ${(e.authors??[]).length>1?Ri.authors:Ri.author}
222
+ </dt>
223
+ ${_i(e,"authors")}
224
+ `:""}
225
+ ${e.github||e.wgPublicList?ur`<dt>${Ri.feedback}</dt>
226
+ ${Ai(e)}`:""}
227
+ ${e.errata?ur`<dt>Errata:</dt>
228
+ <dd><a href="${e.errata}">Errata exists</a>.</dd>`:""}
229
+ ${e.otherLinks?e.otherLinks.map(wi):""}
230
230
  </dl>
231
231
  </details>
232
- ${e.isRec?sr`<p>
233
- See also
234
- <a
235
- href="${`https://www.w3.org/Translations/?technology=${e.shortName}`}"
236
- >
237
- <strong>translations</strong></a
238
- >.
239
- </p>`:""}
240
- ${e.alternateFormats?sr`<p>
241
- ${$i.multiple_alternates(t.multipleAlternates)}
242
- ${t.alternatesHTML}
243
- </p>`:""}
244
- ${function(e){const t=document.querySelector(".copyright");if(t)return t.remove(),t;if(e.isUnofficial&&e.licenseInfo)return sr`<p class="copyright">
232
+ ${e.isRec?ur`<p>
233
+ See also
234
+ <a
235
+ href="${`https://www.w3.org/Translations/?technology=${e.shortName}`}"
236
+ >
237
+ <strong>translations</strong></a
238
+ >.
239
+ </p>`:""}
240
+ ${e.alternateFormats?ur`<p>
241
+ ${Ri.multiple_alternates(t.multipleAlternates)}
242
+ ${t.alternatesHTML}
243
+ </p>`:""}
244
+ ${function(e){const t=document.querySelector(".copyright");if(t)return t.remove(),t;if(e.isUnofficial&&e.licenseInfo)return ur`<p class="copyright">
245
245
  Copyright &copy;
246
246
  ${e.copyrightStart?`${e.copyrightStart}-`:""}${e.publishYear}
247
247
  the document editors/authors.
248
- ${"unlicensed"!==e.licenseInfo.name?sr`Text is available under the
249
- <a rel="license" href="${e.licenseInfo.url}"
250
- >${e.licenseInfo.name}</a
251
- >; additional terms may apply.`:""}
252
- </p>`;return function(e){return sr`<p class="copyright">
248
+ ${"unlicensed"!==e.licenseInfo.name?ur`Text is available under the
249
+ <a rel="license" href="${e.licenseInfo.url}"
250
+ >${e.licenseInfo.name}</a
251
+ >; additional terms may apply.`:""}
252
+ </p>`;return function(e){return ur`<p class="copyright">
253
253
  <a href="https://www.w3.org/policies/#copyright">Copyright</a>
254
254
  &copy;
255
255
  ${e.copyrightStart?`${e.copyrightStart}-`:""}${e.publishYear}
256
- ${e.additionalCopyrightHolders?sr` ${[e.additionalCopyrightHolders]} &amp; `:""}
256
+ ${e.additionalCopyrightHolders?ur` ${[e.additionalCopyrightHolders]} &amp; `:""}
257
257
  <a href="https://www.w3.org/">World Wide Web Consortium</a>.
258
258
  <abbr title="World Wide Web Consortium">W3C</abbr><sup>&reg;</sup>
259
259
  <a href="https://www.w3.org/policies/#Legal_Disclaimer">liability</a>,
260
260
  <a href="https://www.w3.org/policies/#W3C_Trademarks">trademark</a
261
- >${function(e){const{url:t,short:n,name:r}=e;if("unlicensed"===r)return sr`. <span class="issue">THIS DOCUMENT IS UNLICENSED</span>.`;return sr` and
261
+ >${function(e){const{url:t,short:n,name:r}=e;if("unlicensed"===r)return ur`. <span class="issue">THIS DOCUMENT IS UNLICENSED</span>.`;return ur` and
262
262
  <a rel="license" href="${t}" title="${r}">${n}</a> rules apply.`}(e.licenseInfo)}
263
263
  </p>`}(e)}(e)}
264
264
  <hr title="Separator for header" />
265
- </div>`);function Si(e){const t=[];if(e.github){const{repoURL:n,issuesURL:r,newIssuesURL:s,pullsURL:i,fullName:o}=e.github;t.push(sr`<dd>
265
+ </div>`);function Ai(e){const t=[];if(e.github){const{repoURL:n,issuesURL:r,newIssuesURL:s,pullsURL:i,fullName:o}=e.github;t.push(ur`<dd>
266
266
  <a href="${n}">GitHub ${o}</a>
267
267
  (<a href="${i}">pull requests</a>,
268
268
  <a href="${s}">new issue</a>,
269
269
  <a href="${r}">open issues</a>)
270
- </dd>`)}if(e.wgPublicList){const n=new URL(`mailto:${e.wgPublicList}@w3.org`),r=e.subjectPrefix??`[${e.shortName}] ${$i.your_topic_here}`,s=sr`<a
270
+ </dd>`)}if(e.wgPublicList){const n=new URL(`mailto:${e.wgPublicList}@w3.org`),r=e.subjectPrefix??`[${e.shortName}] ${Ri.your_topic_here}`,s=ur`<a
271
271
  href="${n.href}?subject=${encodeURIComponent(r)}"
272
272
  >${n.pathname}</a
273
- >`,i=e.subjectPrefix||sr`[${e.shortName}] <em>${$i.message_topic}</em>`,o=sr`${$i.with_subject_line}${" "}
274
- <kbd>${i}</kbd>`,a=new URL(e.wgPublicList,"https://lists.w3.org/Archives/Public/"),c=sr`(<a href="${a}" rel="discussion"
275
- >${$i.archives}</a
276
- >)`;t.push(sr`<dd>${s} ${o} ${c}</dd>`)}return t}var _i=(e,t)=>{const n=document.querySelector(".copyright");n&&n.remove();const r=document.querySelector("h1#title"),s=r?.cloneNode(!0);return sr`<div class="head">
277
- ${(e.logos??[]).length?sr`<p class="logos">${(e.logos??[]).map(gi)}</p>`:""}
278
- ${r} ${xi(e)}
273
+ >`,i=e.subjectPrefix||ur`[${e.shortName}] <em>${Ri.message_topic}</em>`,o=ur`${Ri.with_subject_line}${" "}
274
+ <kbd>${i}</kbd>`,a=new URL(e.wgPublicList,"https://lists.w3.org/Archives/Public/"),c=ur`(<a href="${a}" rel="discussion"
275
+ >${Ri.archives}</a
276
+ >)`;t.push(ur`<dd>${s} ${o} ${c}</dd>`)}return t}var Pi=(e,t)=>{const n=document.querySelector(".copyright");n&&n.remove();const r=document.querySelector("h1#title"),s=r?.cloneNode(!0);return ur`<div class="head">
277
+ ${(e.logos??[]).length?ur`<p class="logos">${(e.logos??[]).map($i)}</p>`:""}
278
+ ${r} ${Ei(e)}
279
279
  <p id="w3c-state">
280
280
  <a href="https://www.w3.org/standards/types#reports"
281
281
  >${e.longStatus}</a
282
282
  >
283
283
  <time class="dt-published" datetime="${e.dashDate}"
284
- >${xr.format(e.publishDate)}</time
284
+ >${Er.format(e.publishDate)}</time
285
285
  >
286
286
  </p>
287
287
  <dl>
288
- ${e.thisVersion?sr`<dt>${$i.this_version}</dt>
289
- <dd>
290
- <a class="u-url" href="${e.thisVersion}"
291
- >${e.thisVersion}</a
292
- >
293
- </dd>`:""}
294
- ${"latestVersion"in e?sr`<dt>${$i.latest_published_version}</dt>
295
- <dd>
296
- ${e.latestVersion?sr`<a href="${e.latestVersion}"
297
- >${e.latestVersion}</a
298
- >`:"none"}
299
- </dd>`:""}
300
- ${e.edDraftURI?sr`
301
- <dt>${$i.latest_editors_draft}</dt>
302
- <dd><a href="${e.edDraftURI}">${e.edDraftURI}</a></dd>
303
- `:""}
304
- ${e.testSuiteURI?sr`
305
- <dt>Test suite:</dt>
306
- <dd><a href="${e.testSuiteURI}">${e.testSuiteURI}</a></dd>
307
- `:""}
308
- ${e.implementationReportURI?sr`
309
- <dt>Implementation report:</dt>
310
- <dd>
311
- <a href="${e.implementationReportURI}"
312
- >${e.implementationReportURI}</a
313
- >
314
- </dd>
315
- `:""}
316
- ${e.prevVersion?sr`
317
- <dt>Previous version:</dt>
318
- <dd><a href="${e.prevVersion}">${e.prevVersion}</a></dd>
319
- `:""}
320
- ${e.isCGFinal?"":sr`
321
- ${e.prevED?sr`
322
- <dt>Previous editor's draft:</dt>
323
- <dd><a href="${e.prevED}">${e.prevED}</a></dd>
324
- `:""}
325
- `}
326
- ${(e.editors??[]).length?sr`
327
- <dt>
328
- ${(e.editors??[]).length>1?$i.editors:$i.editor}
329
- </dt>
330
- ${vi(e,"editors")}
331
- `:""}
332
- ${(e.formerEditors??[]).length?sr`
333
- <dt>
334
- ${(e.formerEditors??[]).length>1?$i.former_editors:$i.former_editor}
335
- </dt>
336
- ${vi(e,"formerEditors")}
337
- `:""}
338
- ${(e.authors??[]).length?sr`
339
- <dt>
340
- ${(e.authors??[]).length>1?$i.authors:$i.author}
341
- </dt>
342
- ${vi(e,"authors")}
343
- `:""}
344
- ${e.github||e.wgPublicList?sr`<dt>${$i.feedback}</dt>
345
- ${Si(e)}`:""}
346
- ${e.otherLinks?e.otherLinks.map(hi):""}
347
- </dl>
348
- ${e.alternateFormats?sr`<p>
349
- ${t.multipleAlternates?"This document is also available in these non-normative formats:":"This document is also available in this non-normative format:"}
350
- ${t.alternatesHTML}
351
- </p>`:""}
352
- ${n||sr`<p class="copyright">
353
- <a href="https://www.w3.org/policies/#copyright">Copyright</a>
354
- &copy;
355
- ${e.copyrightStart?`${e.copyrightStart}-`:""}${e.publishYear}
356
- ${e.additionalCopyrightHolders?sr` ${[e.additionalCopyrightHolders]} &amp; `:""}
357
- the Contributors to the ${s?.childNodes}
358
- Specification, published by the
359
- <a href="${e.wgURI}">${e.wg}</a> under the
360
- ${e.isCGFinal?sr`
361
- <a href="https://www.w3.org/community/about/agreements/fsa/"
362
- >W3C Community Final Specification Agreement (FSA)</a
363
- >. A human-readable
364
- <a
365
- href="https://www.w3.org/community/about/agreements/fsa-deed/"
366
- >summary</a
288
+ ${e.thisVersion?ur`<dt>${Ri.this_version}</dt>
289
+ <dd>
290
+ <a class="u-url" href="${e.thisVersion}"
291
+ >${e.thisVersion}</a
367
292
  >
368
- is available.
369
- `:sr`
370
- <a href="https://www.w3.org/community/about/agreements/cla/"
371
- >W3C Community Contributor License Agreement (CLA)</a
372
- >. A human-readable
373
- <a
374
- href="https://www.w3.org/community/about/agreements/cla-deed/"
375
- >summary</a
293
+ </dd>`:""}
294
+ ${"latestVersion"in e?ur`<dt>${Ri.latest_published_version}</dt>
295
+ <dd>
296
+ ${e.latestVersion?ur`<a href="${e.latestVersion}"
297
+ >${e.latestVersion}</a
298
+ >`:"none"}
299
+ </dd>`:""}
300
+ ${e.edDraftURI?ur`
301
+ <dt>${Ri.latest_editors_draft}</dt>
302
+ <dd><a href="${e.edDraftURI}">${e.edDraftURI}</a></dd>
303
+ `:""}
304
+ ${e.testSuiteURI?ur`
305
+ <dt>Test suite:</dt>
306
+ <dd><a href="${e.testSuiteURI}">${e.testSuiteURI}</a></dd>
307
+ `:""}
308
+ ${e.implementationReportURI?ur`
309
+ <dt>Implementation report:</dt>
310
+ <dd>
311
+ <a href="${e.implementationReportURI}"
312
+ >${e.implementationReportURI}</a
376
313
  >
377
- is available.
378
- `}
379
- </p>`}
314
+ </dd>
315
+ `:""}
316
+ ${e.prevVersion?ur`
317
+ <dt>Previous version:</dt>
318
+ <dd><a href="${e.prevVersion}">${e.prevVersion}</a></dd>
319
+ `:""}
320
+ ${e.isCGFinal?"":ur`
321
+ ${e.prevED?ur`
322
+ <dt>Previous editor's draft:</dt>
323
+ <dd><a href="${e.prevED}">${e.prevED}</a></dd>
324
+ `:""}
325
+ `}
326
+ ${(e.editors??[]).length?ur`
327
+ <dt>
328
+ ${(e.editors??[]).length>1?Ri.editors:Ri.editor}
329
+ </dt>
330
+ ${_i(e,"editors")}
331
+ `:""}
332
+ ${(e.formerEditors??[]).length?ur`
333
+ <dt>
334
+ ${(e.formerEditors??[]).length>1?Ri.former_editors:Ri.former_editor}
335
+ </dt>
336
+ ${_i(e,"formerEditors")}
337
+ `:""}
338
+ ${(e.authors??[]).length?ur`
339
+ <dt>
340
+ ${(e.authors??[]).length>1?Ri.authors:Ri.author}
341
+ </dt>
342
+ ${_i(e,"authors")}
343
+ `:""}
344
+ ${e.github||e.wgPublicList?ur`<dt>${Ri.feedback}</dt>
345
+ ${Ai(e)}`:""}
346
+ ${e.otherLinks?e.otherLinks.map(wi):""}
347
+ </dl>
348
+ ${e.alternateFormats?ur`<p>
349
+ ${t.multipleAlternates?"This document is also available in these non-normative formats:":"This document is also available in this non-normative format:"}
350
+ ${t.alternatesHTML}
351
+ </p>`:""}
352
+ ${n||ur`<p class="copyright">
353
+ <a href="https://www.w3.org/policies/#copyright">Copyright</a>
354
+ &copy;
355
+ ${e.copyrightStart?`${e.copyrightStart}-`:""}${e.publishYear}
356
+ ${e.additionalCopyrightHolders?ur` ${[e.additionalCopyrightHolders]} &amp; `:""}
357
+ the Contributors to the ${s?.childNodes}
358
+ Specification, published by the
359
+ <a href="${e.wgURI}">${e.wg}</a> under the
360
+ ${e.isCGFinal?ur`
361
+ <a href="https://www.w3.org/community/about/agreements/fsa/"
362
+ >W3C Community Final Specification Agreement (FSA)</a
363
+ >. A human-readable
364
+ <a
365
+ href="https://www.w3.org/community/about/agreements/fsa-deed/"
366
+ >summary</a
367
+ >
368
+ is available.
369
+ `:ur`
370
+ <a href="https://www.w3.org/community/about/agreements/cla/"
371
+ >W3C Community Contributor License Agreement (CLA)</a
372
+ >. A human-readable
373
+ <a
374
+ href="https://www.w3.org/community/about/agreements/cla-deed/"
375
+ >summary</a
376
+ >
377
+ is available.
378
+ `}
379
+ </p>`}
380
380
  <hr title="Separator for header" />
381
- </div>`};const Ti=Ir({en:{sotd:"Status of This Document",status_at_publication:sr`This section describes the status of this
381
+ </div>`};const Ni=Ur({en:{sotd:"Status of This Document",status_at_publication:ur`This section describes the status of this
382
382
  document at the time of its publication. A list of current W3C
383
383
  publications and the latest revision of this technical report can be found
384
384
  in the
385
- <a href="https://www.w3.org/TR/">W3C standards and drafts index</a>.`},ko:{sotd:"현재 문서의 상태",status_at_publication:sr`이 부분은 현재 문서의 발행 당시 상태에 대해
385
+ <a href="https://www.w3.org/TR/">W3C standards and drafts index</a>.`},ko:{sotd:"현재 문서의 상태",status_at_publication:ur`이 부분은 현재 문서의 발행 당시 상태에 대해
386
386
  기술합니다. W3C 발행 문서의 최신 목록 및 테크니컬 리포트 최신판의
387
387
  <a href="https://www.w3.org/TR/">W3C standards and drafts index</a> 에서
388
- 열람할 수 있습니다.`},zh:{sotd:"关于本文档",status_at_publication:sr`本章节描述了本文档的发布状态。W3C的文档列表和最新版本可通过<a
388
+ 열람할 수 있습니다.`},zh:{sotd:"关于本文档",status_at_publication:ur`本章节描述了本文档的发布状态。W3C的文档列表和最新版本可通过<a
389
389
  href="https://www.w3.org/TR/"
390
390
  >W3C技术报告</a
391
- >索引访问。`},ja:{sotd:"この文書の位置付け",status_at_publication:sr`この節には、公開時点でのこの文書の位置づけが記されている。現時点でのW3Cの発行文書とこのテクニカルレポートの最新版は、下記から参照できる。
392
- <a href="https://www.w3.org/TR/">W3C standards and drafts index</a>`},nl:{sotd:"Status van dit document"},es:{sotd:"Estado de este Document",status_at_publication:sr`Esta sección describe el estado del presente
391
+ >索引访问。`},ja:{sotd:"この文書の位置付け",status_at_publication:ur`この節には、公開時点でのこの文書の位置づけが記されている。現時点でのW3Cの発行文書とこのテクニカルレポートの最新版は、下記から参照できる。
392
+ <a href="https://www.w3.org/TR/">W3C standards and drafts index</a>`},nl:{sotd:"Status van dit document"},es:{sotd:"Estado de este Document",status_at_publication:ur`Esta sección describe el estado del presente
393
393
  documento al momento de su publicación. Una lista de las publicaciones
394
394
  actuales del W3C y la última revisión del presente informe técnico puede
395
395
  hallarse en
396
396
  <a href="https://www.w3.org/TR/">el índice de normas y borradores</a> del
397
- W3C.`},fr:{sotd:"État du présent document"},de:{sotd:"Status dieses Dokuments",status_at_publication:sr`Dieser Abschnitt beschreibt den Status des
397
+ W3C.`},fr:{sotd:"État du présent document"},de:{sotd:"Status dieses Dokuments",status_at_publication:ur`Dieser Abschnitt beschreibt den Status des
398
398
  Dokuments zum Zeitpunkt der Publikation. Eine Liste der aktuellen
399
399
  Publikatinen des W3C und die aktuellste Fassung dieser Spezifikation kann
400
- im <a href="https://www.w3.org/TR/">W3C standards and drafts index</a>.`},cs:{sotd:"Stav tohoto dokumentu",status_at_publication:sr`Tato sekce popisuje stav tohoto dokumentu v době
400
+ im <a href="https://www.w3.org/TR/">W3C standards and drafts index</a>.`},cs:{sotd:"Stav tohoto dokumentu",status_at_publication:ur`Tato sekce popisuje stav tohoto dokumentu v době
401
401
  jeho zveřejnění. Seznam aktuálních publikací W3C a nejnovější verzi této
402
402
  technické zprávy najdete v
403
403
  <a href="https://www.w3.org/TR/">indexu standardů a návrhů W3C</a>
404
- na https://www.w3.org/TR/.`}}),Ri="https://www.w3.org/policies/process/20250818/";function Ei(e){return/^[aeiou]/i.test(e)?`an ${e}`:`a ${e}`}var Li=(e,t)=>sr`
405
- <h2>${Ti.sotd}</h2>
406
- ${e.isPreview?Ai(e):""}
407
- ${e.isUnofficial?function(e){const{additionalContent:t}=e;return sr`
404
+ na https://www.w3.org/TR/.`}}),Ii="https://www.w3.org/policies/process/20250818/";function Di(e){return/^[aeiou]/i.test(e)?`an ${e}`:`a ${e}`}var Oi=(e,t)=>ur`
405
+ <h2>${Ni.sotd}</h2>
406
+ ${e.isPreview?ji(e):""}
407
+ ${e.isUnofficial?function(e){const{additionalContent:t}=e;return ur`
408
408
  <p>
409
409
  This document is a draft of a potential specification. It has no official
410
410
  standing of any kind and does not represent the support or consensus of
411
411
  any standards organization.
412
412
  </p>
413
413
  ${t}
414
- `}(t):e.isTagFinding?t.additionalContent:e.isNoTrack?function(e,t){const{isMO:n}=e,{additionalContent:r}=t;return sr`
414
+ `}(t):e.isTagFinding?t.additionalContent:e.isNoTrack?function(e,t){const{isMO:n}=e,{additionalContent:r}=t;return ur`
415
415
  <p>
416
416
  This document is merely a W3C-internal
417
417
  ${n?"member-confidential":""} document. It has no official standing
418
418
  of any kind and does not represent consensus of the W3C Membership.
419
419
  </p>
420
420
  ${r}
421
- `}(e,t):sr`
422
- <p><em>${Ti.status_at_publication}</em></p>
423
- ${e.isMemberSubmission?function(e,t){return sr`
421
+ `}(e,t):ur`
422
+ <p><em>${Ni.status_at_publication}</em></p>
423
+ ${e.isMemberSubmission?function(e,t){return ur`
424
424
  ${t.additionalContent}
425
- ${e.isMemberSubmission?function(e){const t=`https://www.w3.org/Submission/${e.publishDate.getUTCFullYear()}/${e.submissionCommentNumber}/Comment/`,n="PP2017"===e.wgPatentPolicy?"https://www.w3.org/Consortium/Patent-Policy-20170801/":"https://www.w3.org/policies/patent-policy/";return sr`<p>
425
+ ${e.isMemberSubmission?function(e){const t=`https://www.w3.org/Submission/${e.publishDate.getUTCFullYear()}/${e.submissionCommentNumber}/Comment/`,n="PP2017"===e.wgPatentPolicy?"https://www.w3.org/Consortium/Patent-Policy-20170801/":"https://www.w3.org/policies/patent-policy/";return ur`<p>
426
426
  By publishing this document, W3C acknowledges that the
427
427
  <a href="${e.thisVersion}">Submitting Members</a> have made a formal
428
428
  Submission request to W3C for discussion. Publication of this document by
@@ -444,36 +444,36 @@ p:is(.respec-hint,.respec-occurrences){display:block;margin-top:.5em}
444
444
  >list of acknowledged W3C Member Submissions</a
445
445
  >.
446
446
  </p>`}(e):""}
447
- `}(e,t):sr`
448
- ${e.sotdAfterWGinfo?"":t.additionalContent}
449
- ${e.overrideStatus?"":sr` ${function(e){if(!e.wg)return;let t=null;const n=document.querySelector(".addition.proposed"),r=document.querySelector(".correction.proposed"),s=document.querySelector(".addition:not(.proposed)"),i=document.querySelector(".correction:not(.proposed)"),o=n||r||s||i;e.isRec&&o&&(n&&r||s&&i?t=sr`It includes
450
- ${n?sr`<a href="${Ri}#proposed-amendments">
451
- proposed amendments</a
452
- >`:sr`<a href="${Ri}#candidate-amendments">
453
- candidate amendments</a
454
- >`},
447
+ `}(e,t):ur`
448
+ ${e.sotdAfterWGinfo?"":t.additionalContent}
449
+ ${e.overrideStatus?"":ur` ${function(e){if(!e.wg)return;let t=null;const n=document.querySelector(".addition.proposed"),r=document.querySelector(".correction.proposed"),s=document.querySelector(".addition:not(.proposed)"),i=document.querySelector(".correction:not(.proposed)"),o=n||r||s||i;e.isRec&&o&&(n&&r||s&&i?t=ur`It includes
450
+ ${n?ur`<a href="${Ii}#proposed-amendments">
451
+ proposed amendments</a
452
+ >`:ur`<a href="${Ii}#candidate-amendments">
453
+ candidate amendments</a
454
+ >`},
455
455
  introducing substantive changes and new features since the previous
456
- Recommendation.`:n||s?t=sr`It includes
457
- ${n?sr`<a href="${Ri}#proposed-addition">
458
- proposed additions</a
459
- >`:sr`<a href="${Ri}#candidate-addition">
460
- candidate additions</a
461
- >`},
462
- introducing new features since the previous Recommendation.`:(r||i)&&(t=sr`It includes
463
- ${r?sr`<a href="${Ri}#proposed-corrections">
464
- proposed corrections</a
465
- >`:sr`<a href="${Ri}#candidate-correction">
466
- candidate corrections</a
467
- >`}.`));const a=Mi[e.specStatus]?sr` using the
468
- <a href="${Ri}#recs-and-notes"
469
- >${Mi[e.specStatus]}
456
+ Recommendation.`:n||s?t=ur`It includes
457
+ ${n?ur`<a href="${Ii}#proposed-addition">
458
+ proposed additions</a
459
+ >`:ur`<a href="${Ii}#candidate-addition">
460
+ candidate additions</a
461
+ >`},
462
+ introducing new features since the previous Recommendation.`:(r||i)&&(t=ur`It includes
463
+ ${r?ur`<a href="${Ii}#proposed-corrections">
464
+ proposed corrections</a
465
+ >`:ur`<a href="${Ii}#candidate-correction">
466
+ candidate corrections</a
467
+ >`}.`));const a=Hi[e.specStatus]?ur` using the
468
+ <a href="${Ii}#recs-and-notes"
469
+ >${Hi[e.specStatus]}
470
470
  track</a
471
- >`:"";return sr`<p>
472
- This document was published by ${Pi(e)} as
473
- ${Ei(e.longStatus)}${a}. ${t}
471
+ >`:"";return ur`<p>
472
+ This document was published by ${zi(e)} as
473
+ ${Di(e.longStatus)}${a}. ${t}
474
474
  </p>`}(e)} `}
475
- ${e.sotdAfterWGinfo?t.additionalContent:""}
476
- ${e.isRec?function(e){const{revisedRecEnd:t}=e,n=document.querySelector("#sotd.updateable-rec");let r="";document.querySelector(".addition.proposed")?r="additions":document.querySelector(".correction.proposed")&&(r="corrections");return sr`
475
+ ${e.sotdAfterWGinfo?t.additionalContent:""}
476
+ ${e.isRec?function(e){const{revisedRecEnd:t}=e,n=document.querySelector("#sotd.updateable-rec");let r="";document.querySelector(".addition.proposed")?r="additions":document.querySelector(".correction.proposed")&&(r="corrections");return ur`
477
477
  <p>
478
478
  W3C recommends the wide deployment of this specification as a standard for
479
479
  the Web.
@@ -488,62 +488,62 @@ p:is(.respec-hint,.respec-occurrences){display:block;margin-top:.5em}
488
488
  >royalty-free licensing</a
489
489
  >
490
490
  for implementations.
491
- ${n?sr`Future updates to this Recommendation may incorporate
492
- <a href="${Ri}#allow-new-features">new features</a>.`:""}
491
+ ${n?ur`Future updates to this Recommendation may incorporate
492
+ <a href="${Ii}#allow-new-features">new features</a>.`:""}
493
493
  </p>
494
- ${document.querySelector(".addition:not(.proposed)")?sr`<p class="addition">
495
- Candidate additions are marked in the document.
496
- </p>`:""}
497
- ${document.querySelector(".correction:not(.proposed)")?sr`<p class="correction">
498
- Candidate corrections are marked in the document.
499
- </p>`:""}
500
- ${document.querySelector(".addition.proposed")?sr`<p class="addition proposed">
501
- Proposed additions are marked in the document.
502
- </p>`:""}
503
- ${document.querySelector(".correction.proposed")?sr`<p class="correction proposed">
504
- Proposed corrections are marked in the document.
505
- </p>`:""}
506
- ${r?sr`<p>
507
- The W3C Membership and other interested parties are invited to review
508
- the proposed ${r} and send comments through
509
- ${xr.format(t)}. Advisory
510
- Committee Representatives should consult their
511
- <a href="https://www.w3.org/2002/09/wbs/myQuestionnaires"
512
- >WBS questionnaires</a
513
- >.
514
- </p>`:""}
515
- `}(e):function(e){const t=document.querySelector("#sotd.updateable-rec");let n=null,r=null,s=sr`Publication as
516
- ${Ei(e.textStatus)} does not imply endorsement
517
- by W3C and its Members.`,i=sr`<p>
494
+ ${document.querySelector(".addition:not(.proposed)")?ur`<p class="addition">
495
+ Candidate additions are marked in the document.
496
+ </p>`:""}
497
+ ${document.querySelector(".correction:not(.proposed)")?ur`<p class="correction">
498
+ Candidate corrections are marked in the document.
499
+ </p>`:""}
500
+ ${document.querySelector(".addition.proposed")?ur`<p class="addition proposed">
501
+ Proposed additions are marked in the document.
502
+ </p>`:""}
503
+ ${document.querySelector(".correction.proposed")?ur`<p class="correction proposed">
504
+ Proposed corrections are marked in the document.
505
+ </p>`:""}
506
+ ${r?ur`<p>
507
+ The W3C Membership and other interested parties are invited to
508
+ review the proposed ${r} and send comments through
509
+ ${Er.format(t)}. Advisory
510
+ Committee Representatives should consult their
511
+ <a href="https://www.w3.org/2002/09/wbs/myQuestionnaires"
512
+ >WBS questionnaires</a
513
+ >.
514
+ </p>`:""}
515
+ `}(e):function(e){const t=document.querySelector("#sotd.updateable-rec");let n=null,r=null,s=ur`Publication as
516
+ ${Di(e.textStatus)} does not imply endorsement
517
+ by W3C and its Members.`,i=ur`<p>
518
518
  This is a draft document and may be updated, replaced, or obsoleted by other
519
519
  documents at any time. It is inappropriate to cite this document as other
520
520
  than a work in progress.
521
- ${t?sr`Future updates to this upcoming Recommendation may incorporate
522
- <a href="${Ri}#allow-new-features">new features</a>.`:""}
523
- </p>`;"DISC"===e.specStatus&&(i=sr`<p>
521
+ ${t?ur`Future updates to this upcoming Recommendation may incorporate
522
+ <a href="${Ii}#allow-new-features">new features</a>.`:""}
523
+ </p>`;"DISC"===e.specStatus&&(i=ur`<p>
524
524
  Publication as a Discontinued Draft implies that this document is no
525
525
  longer intended to advance or to be maintained. It is inappropriate to
526
526
  cite this document as other than abandoned work.
527
- </p>`);const o=sr`<p>
527
+ </p>`);const o=ur`<p>
528
528
  This document is maintained and updated at any time. Some parts of this
529
529
  document are work in progress.
530
- </p>`;switch(e.specStatus){case"STMT":s=sr`<p>
530
+ </p>`;switch(e.specStatus){case"STMT":s=ur`<p>
531
531
  A W3C Statement is a specification that, after extensive
532
532
  consensus-building, is endorsed by
533
533
  <abbr title="World Wide Web Consortium">W3C</abbr> and its Members.
534
- </p>`;break;case"RY":s=sr`<p>W3C recommends the wide usage of this registry.</p>
534
+ </p>`;break;case"RY":s=ur`<p>W3C recommends the wide usage of this registry.</p>
535
535
  <p>
536
536
  A W3C Registry is a specification that, after extensive
537
537
  consensus-building, is endorsed by
538
538
  <abbr title="World Wide Web Consortium">W3C</abbr> and its Members.
539
- </p>`;break;case"CRD":n=sr`A Candidate Recommendation Draft integrates
539
+ </p>`;break;case"CRD":n=ur`A Candidate Recommendation Draft integrates
540
540
  changes from the previous Candidate Recommendation that the Working
541
541
  Group${e.multipleWGs?"s intend":" intends"} to include in a
542
- subsequent Candidate Recommendation Snapshot.`,"LS"===e.pubMode&&(i=o);break;case"CRYD":n=sr`A Candidate Registry Draft integrates changes
542
+ subsequent Candidate Recommendation Snapshot.`,"LS"===e.pubMode&&(i=o);break;case"CRYD":n=ur`A Candidate Registry Draft integrates changes
543
543
  from the previous Candidate Registry Snapshot that the Working
544
544
  Group${e.multipleWGs?"s intend":" intends"} to include in a
545
- subsequent Candidate Registry Snapshot.`,"LS"===e.pubMode&&(i=o);break;case"CRY":n=sr`A Candidate Registry Snapshot has received
546
- <a href="${Ri}#dfn-wide-review">wide review</a>.`,r=sr`<p>
545
+ subsequent Candidate Registry Snapshot.`,"LS"===e.pubMode&&(i=o);break;case"CRY":n=ur`A Candidate Registry Snapshot has received
546
+ <a href="${Ii}#dfn-wide-review">wide review</a>.`,r=ur`<p>
547
547
  The W3C Membership and other interested parties are invited to review
548
548
  the document and send comments through ${e.humanPREnd}. Advisory
549
549
  Committee Representatives should consult their
@@ -551,39 +551,39 @@ p:is(.respec-hint,.respec-occurrences){display:block;margin-top:.5em}
551
551
  >WBS questionnaires</a
552
552
  >. Note that substantive technical comments were expected during the
553
553
  Candidate Recommendation review period that ended ${e.humanCREnd}.
554
- </p>`;break;case"CR":n=sr`A Candidate Recommendation Snapshot has received
555
- <a href="${Ri}#dfn-wide-review">wide review</a>, is intended to
554
+ </p>`;break;case"CR":n=ur`A Candidate Recommendation Snapshot has received
555
+ <a href="${Ii}#dfn-wide-review">wide review</a>, is intended to
556
556
  gather
557
557
  <a href="${e.implementationReportURI}">implementation experience</a>,
558
558
  and has commitments from Working Group members to
559
559
  <a href="https://www.w3.org/policies/patent-policy/#sec-Requirements"
560
560
  >royalty-free licensing</a
561
561
  >
562
- for implementations.`,i=sr`${t?sr`Future updates to this upcoming Recommendation may incorporate
563
- <a href="${Ri}#allow-new-features">new features</a>.`:""}`,r="LS"===e.pubMode?sr`<p>
562
+ for implementations.`,i=ur`${t?ur`Future updates to this upcoming Recommendation may incorporate
563
+ <a href="${Ii}#allow-new-features">new features</a>.`:""}`,r="LS"===e.pubMode?ur`<p>
564
564
  Comments are welcome at any time but most especially before
565
- ${xr.format(e.crEnd)}.
566
- </p>`:sr`<p>
565
+ ${Er.format(e.crEnd)}.
566
+ </p>`:ur`<p>
567
567
  This Candidate Recommendation is not expected to advance to
568
568
  Recommendation any earlier than
569
- ${xr.format(e.crEnd)}.
570
- </p>`;break;case"PR":r=sr`<p>
569
+ ${Er.format(e.crEnd)}.
570
+ </p>`;break;case"PR":r=ur`<p>
571
571
  The W3C Membership and other interested parties are invited to review
572
572
  the document and send comments through
573
- ${xr.format(e.prEnd)}. Advisory Committee
573
+ ${Er.format(e.prEnd)}. Advisory Committee
574
574
  Representatives should consult their
575
575
  <a href="https://www.w3.org/2002/09/wbs/myQuestionnaires"
576
576
  >WBS questionnaires</a
577
577
  >. Note that substantive technical comments were expected during the
578
578
  Candidate Recommendation review period that ended
579
- ${xr.format(e.crEnd)}.
580
- </p>`;break;case"DNOTE":s=sr`${e.textStatus}s are not endorsed by
581
- <abbr title="World Wide Web Consortium">W3C</abbr> nor its Members.`;break;case"NOTE":s=sr`This ${e.textStatus} is endorsed by
582
- ${Pi(e)}, but is not endorsed by
579
+ ${Er.format(e.crEnd)}.
580
+ </p>`;break;case"DNOTE":s=ur`${e.textStatus}s are not endorsed by
581
+ <abbr title="World Wide Web Consortium">W3C</abbr> nor its Members.`;break;case"NOTE":s=ur`This ${e.textStatus} is endorsed by
582
+ ${zi(e)}, but is not endorsed by
583
583
  <abbr title="World Wide Web Consortium">W3C</abbr> itself nor its
584
- Members.`,i=""}return sr`<p>${s} ${n}</p>
584
+ Members.`,i=""}return ur`<p>${s} ${n}</p>
585
585
  ${i} ${r}`}(e)}
586
- ${function(e){const{isNote:t,isRegistry:n,wgId:r,multipleWGs:s,wgPatentHTML:i,wgPatentURI:o,wgPatentPolicy:a}=e,c="PP2017"===a?"https://www.w3.org/Consortium/Patent-Policy-20170801/":"https://www.w3.org/policies/patent-policy/",l=t||n?sr`
586
+ ${function(e){const{isNote:t,isRegistry:n,wgId:r,multipleWGs:s,wgPatentHTML:i,wgPatentURI:o,wgPatentPolicy:a}=e,c="PP2017"===a?"https://www.w3.org/Consortium/Patent-Policy-20170801/":"https://www.w3.org/policies/patent-policy/",l=t||n?ur`
587
587
  The
588
588
  <a href="${c}"
589
589
  >${"PP2017"===a?"1 August 2017 ":""}W3C Patent
@@ -591,123 +591,123 @@ p:is(.respec-hint,.respec-occurrences){display:block;margin-top:.5em}
591
591
  >
592
592
  does not carry any licensing requirements or commitments on this
593
593
  document.
594
- `:sr`
594
+ `:ur`
595
595
  This document was produced by ${s?"groups":"a group"}
596
596
  operating under the
597
597
  <a href="${c}"
598
598
  >${"PP2017"===a?"1 August 2017 ":""}W3C Patent
599
599
  Policy</a
600
600
  >.
601
- `;return sr`<p data-deliverer="${t||n?r:null}">
601
+ `;return ur`<p data-deliverer="${t||n?r:null}">
602
602
  ${l}
603
- ${t||n?"":sr`
604
- ${s?sr` W3C maintains ${i} `:sr`
605
- W3C maintains a
606
- ${o?sr`<a href="${o}" rel="disclosure"
607
- >public list of any patent disclosures</a
608
- >`:"public list of any patent disclosures"}
609
- `}
610
- made in connection with the deliverables of
611
- ${s?"each group; these pages also include":"the group; that page also includes"}
612
- instructions for disclosing a patent. An individual who has actual
613
- knowledge of a patent that the individual believes contains
614
- <a href="${c}#def-essential">Essential Claim(s)</a>
615
- must disclose the information in accordance with
616
- <a href="${c}#sec-Disclosure"
617
- >section 6 of the W3C Patent Policy</a
618
- >.
619
- `}
620
- </p>`}(e)}
621
- <p>
622
- This document is governed by the
623
- <a id="w3c_process_revision" href="${Ri}"
624
- >18 August 2025 W3C Process Document</a
625
- >.
626
- </p>
603
+ ${t||n?"":ur`
604
+ ${s?ur` W3C maintains ${i} `:ur`
605
+ W3C maintains a
606
+ ${o?ur`<a href="${o}" rel="disclosure"
607
+ >public list of any patent disclosures</a
608
+ >`:"public list of any patent disclosures"}
627
609
  `}
628
- `}
610
+ made in connection with the deliverables of
611
+ ${s?"each group; these pages also include":"the group; that page also includes"}
612
+ instructions for disclosing a patent. An individual who has actual
613
+ knowledge of a patent that the individual believes contains
614
+ <a href="${c}#def-essential">Essential Claim(s)</a>
615
+ must disclose the information in accordance with
616
+ <a href="${c}#sec-Disclosure"
617
+ >section 6 of the W3C Patent Policy</a
618
+ >.
619
+ `}
620
+ </p>`}(e)}
621
+ <p>
622
+ This document is governed by the
623
+ <a id="w3c_process_revision" href="${Ii}"
624
+ >18 August 2025 W3C Process Document</a
625
+ >.
626
+ </p>
627
+ `}
628
+ `}
629
629
  ${t.additionalSections}
630
- `;function Ai(e){const{prUrl:t,prNumber:n,edDraftURI:r}=e;return sr`<details class="annoying-warning" open="">
630
+ `;function ji(e){const{prUrl:t,prNumber:n,edDraftURI:r}=e;return ur`<details class="annoying-warning" open="">
631
631
  <summary>
632
632
  This is a
633
- preview${t&&n?sr`
634
- of pull request
635
- <a href="${t}">#${n}</a>
636
- `:""}
633
+ preview${t&&n?ur`
634
+ of pull request
635
+ <a href="${t}">#${n}</a>
636
+ `:""}
637
637
  </summary>
638
638
  <p>
639
639
  Do not attempt to implement this version of the specification. Do not
640
640
  reference this version as authoritative in any way.
641
- ${r?sr`
642
- Instead, see
643
- <a href="${r}">${r}</a> for the Editor's draft.
644
- `:""}
641
+ ${r?ur`
642
+ Instead, see
643
+ <a href="${r}">${r}</a> for the Editor's draft.
644
+ `:""}
645
645
  </p>
646
- </details>`}function Pi(e){return Array.isArray(e.wg)?Ur(e.wg,((t,n)=>sr`the <a href="${e.wgURI[n]}">${t}</a>`)):e.wg?sr`the <a href="${e.wgURI}">${e.wg}</a>`:void 0}var Ni=(e,t)=>sr`
647
- <h2>${Ti.sotd}</h2>
648
- ${e.isPreview?Ai(e):""}
646
+ </details>`}function zi(e){return Array.isArray(e.wg)?Gr(e.wg,((t,n)=>ur`the <a href="${e.wgURI[n]}">${t}</a>`)):e.wg?ur`the <a href="${e.wgURI}">${e.wg}</a>`:void 0}var Mi=(e,t)=>ur`
647
+ <h2>${Ni.sotd}</h2>
648
+ ${e.isPreview?ji(e):""}
649
649
  <p>
650
650
  This specification was published by the
651
651
  <a href="${e.wgURI}">${e.wg}</a>. It is not a W3C Standard nor is it
652
652
  on the W3C Standards Track.
653
- ${e.isCGFinal?sr`
654
- Please note that under the
655
- <a href="https://www.w3.org/community/about/agreements/final/"
656
- >W3C Community Final Specification Agreement (FSA)</a
657
- >
658
- other conditions apply.
659
- `:sr`
660
- Please note that under the
661
- <a href="https://www.w3.org/community/about/agreements/cla/"
662
- >W3C Community Contributor License Agreement (CLA)</a
663
- >
664
- there is a limited opt-out and other conditions apply.
665
- `}
653
+ ${e.isCGFinal?ur`
654
+ Please note that under the
655
+ <a href="https://www.w3.org/community/about/agreements/final/"
656
+ >W3C Community Final Specification Agreement (FSA)</a
657
+ >
658
+ other conditions apply.
659
+ `:ur`
660
+ Please note that under the
661
+ <a href="https://www.w3.org/community/about/agreements/cla/"
662
+ >W3C Community Contributor License Agreement (CLA)</a
663
+ >
664
+ there is a limited opt-out and other conditions apply.
665
+ `}
666
666
  Learn more about
667
667
  <a href="https://www.w3.org/community/"
668
668
  >W3C Community and Business Groups</a
669
669
  >.
670
670
  </p>
671
671
  ${e.sotdAfterWGinfo?"":t.additionalContent}
672
- ${!e.github&&e.wgPublicList?function(e,t){const{mailToWGPublicListWithSubject:n,mailToWGPublicListSubscription:r}=t,{wgPublicList:s,subjectPrefix:i}=e;return sr`<p>
672
+ ${!e.github&&e.wgPublicList?function(e,t){const{mailToWGPublicListWithSubject:n,mailToWGPublicListSubscription:r}=t,{wgPublicList:s,subjectPrefix:i}=e;return ur`<p>
673
673
  If you wish to make comments regarding this document, please send them to
674
674
  <a href="${n}">${s}@w3.org</a>
675
675
  (<a href="${r}">subscribe</a>,
676
- <a href="${`https://lists.w3.org/Archives/Public/${s}/`}">archives</a>)${i?sr` with <code>${i}</code> at the start of your email's
677
- subject`:""}.
676
+ <a href="${`https://lists.w3.org/Archives/Public/${s}/`}">archives</a>)${i?ur` with <code>${i}</code> at the start of your email's
677
+ subject`:""}.
678
678
  </p>`}(e,t):""}
679
- ${e.github?function(e,t){if(e.github||e.wgPublicList)return sr`<p>
680
- ${e.github?sr`
681
- <a href="${e.issueBase}">GitHub Issues</a> are preferred for
682
- discussion of this specification.
683
- `:""}
684
- ${e.wgPublicList?sr`
685
- ${e.github&&e.wgPublicList?"Alternatively, you can send comments to our mailing list.":"Comments regarding this document are welcome."}
686
- Please send them to
687
- <a href="${t.mailToWGPublicListWithSubject}"
688
- >${e.wgPublicList}@w3.org</a
689
- >
690
- (<a href="${t.mailToWGPublicListSubscription}">subscribe</a>,
691
- <a
692
- href="${`https://lists.w3.org/Archives/Public/${e.wgPublicList}/`}"
693
- >archives</a
694
- >)${e.subjectPrefix?sr` with <code>${e.subjectPrefix}</code> at the start of your
695
- email's subject`:""}.
696
- `:""}
679
+ ${e.github?function(e,t){if(e.github||e.wgPublicList)return ur`<p>
680
+ ${e.github?ur`
681
+ <a href="${e.issueBase}">GitHub Issues</a> are preferred for
682
+ discussion of this specification.
683
+ `:""}
684
+ ${e.wgPublicList?ur`
685
+ ${e.github&&e.wgPublicList?"Alternatively, you can send comments to our mailing list.":"Comments regarding this document are welcome."}
686
+ Please send them to
687
+ <a href="${t.mailToWGPublicListWithSubject}"
688
+ >${e.wgPublicList}@w3.org</a
689
+ >
690
+ (<a href="${t.mailToWGPublicListSubscription}">subscribe</a>,
691
+ <a
692
+ href="${`https://lists.w3.org/Archives/Public/${e.wgPublicList}/`}"
693
+ >archives</a
694
+ >)${e.subjectPrefix?ur` with <code>${e.subjectPrefix}</code> at the start of
695
+ your email's subject`:""}.
696
+ `:""}
697
697
  </p>`}(e,t):""}
698
698
  ${e.sotdAfterWGinfo?t.additionalContent:""}
699
699
  ${t.additionalSections}
700
- `;const Ii="w3c/headers";function Di(e){return new URL(e,"https://www.w3.org/").href}const Oi={LS:"WD",LD:"WD",FPWD:"WD","Member-SUBM":"SUBM"},ji={DNOTE:"Group Note Draft",NOTE:"Group Note",STMT:"Statement","Member-SUBM":"Member Submission",MO:"Member-Only Document",ED:"Editor's Draft",LS:"Living Standard",LD:"Living Document",FPWD:"First Public Working Draft",WD:"Working Draft",CR:"Candidate Recommendation",CRD:"Candidate Recommendation",PR:"Proposed Recommendation",REC:"Recommendation",DISC:"Discontinued Draft",RSCND:"Rescinded Recommendation",DRY:"Registry Draft",CRYD:"Candidate Registry",CRY:"Candidate Registry",RY:"Registry",unofficial:"Unofficial Draft",UD:"Unofficial Draft",base:"",finding:"TAG Finding","draft-finding":"Draft TAG Finding","editor-draft-finding":"Draft TAG Finding","CG-DRAFT":"Draft Community Group Report","CG-FINAL":"Final Community Group Report","BG-DRAFT":"Draft Business Group Report","BG-FINAL":"Final Business Group Report"},zi={...ji,CR:"Candidate Recommendation Snapshot",CRD:"Candidate Recommendation Draft",CRY:"Candidate Registry Snapshot",CRYD:"Candidate Registry Draft"},Mi={DNOTE:"Note",NOTE:"Note",STMT:"Note","WG-NOTE":"Note","IG-NOTE":"Note",FPWD:"Recommendation",WD:"Recommendation",CR:"Recommendation",CRD:"Recommendation",PR:"Recommendation",REC:"Recommendation",DISC:"Recommendation",RSCND:"Recommendation",DRY:"Registry",CRYD:"Registry",CRY:"Registry",RY:"Registry"},Ui=["DNOTE","NOTE","STMT"],qi=["CR","CRD","DISC","FPWD","PR","REC","RSCND","WD"],Wi=["DRY","CRY","CRYD","RY"],Fi=["draft-finding","finding","editor-draft-finding"],Bi=["CG-DRAFT","CG-FINAL"],Hi=["BG-DRAFT","BG-FINAL"],Gi=[...Bi,...Hi],Vi=[...Ui,...qi,...Wi],Ji=["base",...Bi,...Hi,"editor-draft-finding","draft-finding","finding","MO","unofficial"],Ki=new Map([["cc0",{name:"Creative Commons 0 Public Domain Dedication",short:"CC0",url:"https://creativecommons.org/publicdomain/zero/1.0/"}],["w3c-software",{name:"W3C Software Notice and License",short:"W3C Software",url:"https://www.w3.org/copyright/software-license-2002/"}],["w3c-software-doc",{name:"W3C Software and Document Notice and License",short:"permissive document license",url:"https://www.w3.org/copyright/software-license-2023/"}],["cc-by",{name:"Creative Commons Attribution 4.0 International Public License",short:"CC-BY",url:"https://creativecommons.org/licenses/by/4.0/legalcode"}],["document",{name:"W3C Document License",short:"document use",url:"https://www.w3.org/copyright/document-license/"}],["dual",{name:"W3C Dual License",short:"dual license",url:"https://www.w3.org/Consortium/Legal/2013/copyright-documents-dual.html"}]]),Zi=["PP2017","PP2020"];function Yi(e,t,n=new Date){const r=e[t]?new Date(e[t]):new Date(n);if(Number.isFinite(r.valueOf())){const e=kr.format(r);return new Date(e)}return ns(ls`${t} is not a valid date: "${e[t]}". Expected format 'YYYY-MM-DD'.`,Ii),new Date(kr.format(new Date))}function Xi(e,{isTagFinding:t=!1}){const n=e.cloneNode(!0),r=document.createDocumentFragment();for(;n.hasChildNodes()&&(n.nodeType!==Node.ELEMENT_NODE||"section"!==n.firstChild.localName);)r.appendChild(n.firstChild);if(t&&!r.hasChildNodes()){rs(ls`ReSpec does not support automated SotD generation for TAG findings.`,Ii,{hint:"Please add the prerequisite content in the 'sotd' section."})}return{additionalContent:r,additionalSections:n.childNodes}}var Qi=Object.freeze({__proto__:null,W3CNotes:Ui,bgStatus:Hi,cgStatus:Bi,cgbgStatus:Gi,licenses:Ki,name:Ii,noTrackStatus:Ji,recTrackStatus:qi,registryTrackStatus:Wi,run:async function(e){const t=e.specStatus??"";if(e.isBasic="base"===t,e.isCGBG=Gi.includes(t),e.isCGFinal=e.isCGBG&&t.endsWith("G-FINAL"),e.isCR="CR"===t||"CRD"===t,e.isCRDraft="CRD"===t,e.isCRY="CRY"===t||"CRYD"===t,e.isEd="ED"===t,e.isMemberSubmission="Member-SUBM"===t,e.isMO="MO"===t,e.isNote=Ui.includes(t),e.isNoTrack=Ji.includes(t),e.isPR="PR"===t,e.isRecTrack=qi.includes(t),e.isRec=e.isRecTrack&&"REC"===t,e.isRegistry=Wi.includes(t),e.isRegular=!e.isCGBG&&!e.isBasic,e.isTagEditorFinding="editor-draft-finding"===t,e.isTagFinding=Fi.includes(t),e.isUnofficial="unofficial"===t,e.licenseInfo=function(e){let t;if("string"==typeof e.license){const n=e.license.toLowerCase();if(Ki.has(n))t=n;else{const t=`The license "\`${e.license}\`" is not supported.`,n=ls`Please set
701
- ${"[license]"} to one of: ${os([...Ki.keys()].filter((e=>e)),{quotes:!0})}. If in doubt, remove \`license\` and let ReSpec pick one for you.`;ns(t,Ii,{hint:n})}}if(e.isUnofficial&&!t&&(t="cc-by"),!e.isUnofficial&&["cc-by","cc0"].includes(t)){const t=ls`Please set ${"[license]"} to \`"w3c-software-doc"\` instead.`;ns(ls`License "\`${e.license}\`" is not allowed for W3C Specifications.`,Ii,{hint:t})}return void 0===t?{name:"unlicensed",url:null,short:"UNLICENSED"}:Ki.get(t)}(e),e.prependW3C=!e.isBasic&&!e.isUnofficial,e.longStatus=zi[t],e.textStatus=ji[t],e.showPreviousVersion=!1,e.isRegular&&!e.shortName){const e=ls`Please set ${"[shortName]"} to a short name for the specification.`;ns(ls`The ${"[shortName]"} configuration option is required for this kind of document.`,Ii,{hint:e})}if(e.publishDate=Yi(e,"publishDate",document.lastModified),e.publishYear=e.publishDate.getUTCFullYear(),e.modificationDate&&(e.modificationDate=Yi(e,"modificationDate",document.lastModified)),e.isRecTrack&&!e.github&&!e.wgPublicList){const e=ls`Use the ${"[github]"} configuration option to add a link to a repository. Alternatively use ${"[wgPublicList]"} to link to a mailing list.`;ns("W3C Process requires a either a link to a public repository or mailing list.",Ii,{hint:e})}if(e.isEd&&!e.edDraftURI){const e=ls`Please set ${"[edDraftURI]"} to the URL of the Editor's Draft. Alternatively, use the set ${"[github]"} option, which automatically sets it for you.`;rs(ls`Editor's Drafts should set ${"[edDraftURI]"} configuration option.`,Ii,{hint:e})}const n=function(e){const{specStatus:t,group:n}=e;if(e.isNoTrack&&!e.isCGBG&&!e.isTagFinding)return"";const r=e.groupType,s="wg"===r||Array.isArray(r)&&r.includes("wg");if(Vi.includes(t??"")||s)return"/TR";switch(t){case"CG-FINAL":case"BG-FINAL":return`/community/reports/${n}`;case"finding":case"draft-finding":return"/2001/tag/doc";case"Member-SUBM":return"/Submission"}if(("tag"===e.group||"ab"===e.group)&&"TR"===e.canonicalURI)return"/TR";return""}(e);if(n&&!e.thisVersion){const r=Oi[t]||t,{shortName:s,publishDate:i}=e,o=`${r}-${s}-${Or(i)}`,a=[...Vi,"Member-SUBM"].includes(t)?`${i.getUTCFullYear()}/`:"";e.thisVersion=Di(`${n}/${a}${o}/`)}e.isEd&&(e.thisVersion=e.edDraftURI),e.isCGBG&&function(e){const t=ji[e.specStatus],n=e.latestVersion?new URL(Di(e.latestVersion)):null;if(!e.wg){return void ns(ls`The ${"[group]"} configuration option is required for this kind of document (${t}).`,Ii)}if(e.isCGFinal){if(!1===("https://www.w3.org"===n?.origin||"https://w3.org/"===n?.origin)){ns(ls`For ${t}, the ${"[latestVersion]"} URL must point to somewhere at https://www.w3.org/.`,Ii,{hint:"Ask a W3C Team Member for a W3C URL where the report can be published."})}}}(e),null!==e.latestVersion&&(e.latestVersion=e.latestVersion?Di(e.latestVersion):n?Di(`${n}/${e.shortName}/`):""),e.latestVersion&&function(e){const t=new URL(e.latestVersion);if(("https://www.w3.org"===t.origin||"https://w3.org/"===t.origin)&&t.pathname.startsWith("/TR/")&&!1===["ED",...Vi].includes(e.specStatus)){const t=ls`Ask a W3C Team Member for a W3C URL where the report can be published and change ${"[latestVersion]"} to something else.`;ns(ls`Documents with a status of \`"${e.specStatus}"\` can't be published on the W3C's /TR/ (Technical Report) space.`,Ii,{hint:t})}}(e);const r=`${n}/${e.shortName}`;if(e.previousPublishDate){if(!e.previousMaturity&&!e.isTagFinding){ns(ls`${"[`previousPublishDate`]"} is set, but missing ${"[`previousMaturity`]"}.`,Ii)}e.previousPublishDate=Yi(e,"previousPublishDate");const t=Oi[e.previousMaturity]??e.previousMaturity;if(e.isTagFinding&&e.latestVersion){const t=kr.format(e.publishDate);e.thisVersion=Di(`${r}-${t}`);const n=kr.format(e.previousPublishDate);e.prevVersion=Di(`${r}-${n}}`)}else if(e.isCGBG||e.isBasic)e.prevVersion=e.prevVersion||"";else{const r=e.previousPublishDate.getUTCFullYear(),{shortName:s}=e,i=Or(e.previousPublishDate);e.prevVersion=Di(`${n}/${r}/${t}-${s}-${i}/`)}}e.prevRecShortname&&!e.prevRecURI&&(e.prevRecURI=Di(`${n}/${e.prevRecShortname}`));const s=e.editors??[],i=e.formerEditors??[];for(let e=0;e<s.length;e++){const t=s[e];"retiredDate"in t&&(i.push(t),s.splice(e--,1))}if(e.editors=s,e.formerEditors=i,0===s.length){const e=ls`Add one or more editors using the ${"[editors]"} configuration option.`;ns("At least one editor is required.",Ii,{hint:e})}else s.length&&e.isRecTrack&&s.forEach(((e,t)=>{if(e.w3cid)return;const n=ls`See ${"[w3cid]"} for instructions for how to retrieve it and add it.`;ns(ls`Editor ${e.name?`"${e.name}"`:`number ${t+1}`} is missing their ${"[w3cid]"}.`,Ii,{hint:n})}));if(e.alternateFormats?.some((({uri:e,label:t})=>!e||!t))){ns(ls`Every ${"[`alternateFormats`]"} entry must have a \`uri\` and a \`label\`.`,Ii)}e.copyrightStart==e.publishYear&&(e.copyrightStart=""),e.dashDate=kr.format(e.publishDate),e.publishISODate=e.publishDate.toISOString(),e.shortISODate=kr.format(e.publishDate),function(e){if(!e.wgPatentPolicy)return;const t=new Set([].concat(e.wgPatentPolicy));if(t.size&&![...t].every((e=>Zi.includes(e)))){const e=ls`Invalid ${"[wgPatentPolicy]"} value(s): ${as([...t].filter((e=>!Zi.includes(e))))}.`,n=`Please use one of: ${os(Zi)}.`;ns(e,Ii,{hint:n})}if(1!==t.size){const e="When collaborating across multiple groups, they must use the same patent policy.",n=ls`For ${"[wgPatentPolicy]"}, please check the patent policies of each group. The patent policies were: ${[...t].join(", ")}.`;ns(e,Ii,{hint:n})}e.wgPatentPolicy=[...t][0]}(e),await async function(e){if(!e.shortName||null===e.historyURI||!e.latestVersion)return;const t=e.isEd||Vi.includes(e.specStatus);if(e.historyURI&&!t){const t=ls`Please remove ${"[historyURI]"}.`;return ns(ls`The ${"[historyURI]"} can't be used with non /TR/ documents.`,Ii,{hint:t}),void(e.historyURI=null)}const n=new URL(e.historyURI??`${e.shortName}/`,"https://www.w3.org/standards/history/");if(e.historyURI&&t||["FPWD","DNOTE","NOTE","DRY"].includes(e.specStatus))return void(e.historyURI=n.href);try{const t=await fetch(n,{method:"HEAD"});t.ok&&(e.historyURI=t.url)}catch{}}(e),e.isTagEditorFinding&&(delete e.thisVersion,delete e.latestVersion),e.isTagFinding&&(e.showPreviousVersion=!!e.previousPublishDate);const o={get multipleAlternates(){return!!(e.alternateFormats&&e.alternateFormats.length>1)},get alternatesHTML(){return e.alternateFormats&&Ur(e.alternateFormats.map((({label:e})=>e)),((t,n)=>{const r=e.alternateFormats[n];return sr`<a
700
+ `;const Ui="w3c/headers";function qi(e){return new URL(e,"https://www.w3.org/").href}const Wi={LS:"WD",LD:"WD",FPWD:"WD","Member-SUBM":"SUBM"},Fi={DNOTE:"Group Note Draft",NOTE:"Group Note",STMT:"Statement","Member-SUBM":"Member Submission",MO:"Member-Only Document",ED:"Editor's Draft",LS:"Living Standard",LD:"Living Document",FPWD:"First Public Working Draft",WD:"Working Draft",CR:"Candidate Recommendation",CRD:"Candidate Recommendation",PR:"Proposed Recommendation",REC:"Recommendation",DISC:"Discontinued Draft",RSCND:"Rescinded Recommendation",DRY:"Registry Draft",CRYD:"Candidate Registry",CRY:"Candidate Registry",RY:"Registry",unofficial:"Unofficial Draft",UD:"Unofficial Draft",base:"",finding:"TAG Finding","draft-finding":"Draft TAG Finding","editor-draft-finding":"Draft TAG Finding","CG-DRAFT":"Draft Community Group Report","CG-FINAL":"Final Community Group Report","BG-DRAFT":"Draft Business Group Report","BG-FINAL":"Final Business Group Report"},Bi={...Fi,CR:"Candidate Recommendation Snapshot",CRD:"Candidate Recommendation Draft",CRY:"Candidate Registry Snapshot",CRYD:"Candidate Registry Draft"},Hi={DNOTE:"Note",NOTE:"Note",STMT:"Note","WG-NOTE":"Note","IG-NOTE":"Note",FPWD:"Recommendation",WD:"Recommendation",CR:"Recommendation",CRD:"Recommendation",PR:"Recommendation",REC:"Recommendation",DISC:"Recommendation",RSCND:"Recommendation",DRY:"Registry",CRYD:"Registry",CRY:"Registry",RY:"Registry"},Gi=["DNOTE","NOTE","STMT"],Vi=["CR","CRD","DISC","FPWD","PR","REC","RSCND","WD"],Ji=["DRY","CRY","CRYD","RY"],Ki=["draft-finding","finding","editor-draft-finding"],Zi=["CG-DRAFT","CG-FINAL"],Yi=["BG-DRAFT","BG-FINAL"],Xi=[...Zi,...Yi],Qi=[...Gi,...Vi,...Ji],eo=["base",...Zi,...Yi,"editor-draft-finding","draft-finding","finding","MO","unofficial"],to=new Map([["cc0",{name:"Creative Commons 0 Public Domain Dedication",short:"CC0",url:"https://creativecommons.org/publicdomain/zero/1.0/"}],["w3c-software",{name:"W3C Software Notice and License",short:"W3C Software",url:"https://www.w3.org/copyright/software-license-2002/"}],["w3c-software-doc",{name:"W3C Software and Document Notice and License",short:"permissive document license",url:"https://www.w3.org/copyright/software-license-2023/"}],["cc-by",{name:"Creative Commons Attribution 4.0 International Public License",short:"CC-BY",url:"https://creativecommons.org/licenses/by/4.0/legalcode"}],["document",{name:"W3C Document License",short:"document use",url:"https://www.w3.org/copyright/document-license/"}],["dual",{name:"W3C Dual License",short:"dual license",url:"https://www.w3.org/Consortium/Legal/2013/copyright-documents-dual.html"}]]),no=["PP2017","PP2020"];function ro(e,t,n=new Date){const r=e[t]?new Date(e[t]):new Date(n);if(Number.isFinite(r.valueOf())){const e=Tr.format(r);return new Date(e)}return cs(ms`${t} is not a valid date: "${e[t]}". Expected format 'YYYY-MM-DD'.`,Ui),new Date(Tr.format(new Date))}function so(e,{isTagFinding:t=!1}){const n=e.cloneNode(!0),r=document.createDocumentFragment();for(;n.hasChildNodes()&&(n.nodeType!==Node.ELEMENT_NODE||"section"!==n.firstChild.localName);)r.appendChild(n.firstChild);if(t&&!r.hasChildNodes()){ls(ms`ReSpec does not support automated SotD generation for TAG findings.`,Ui,{hint:"Please add the prerequisite content in the 'sotd' section."})}return{additionalContent:r,additionalSections:n.childNodes}}var io=Object.freeze({__proto__:null,W3CNotes:Gi,bgStatus:Yi,cgStatus:Zi,cgbgStatus:Xi,licenses:to,name:Ui,noTrackStatus:eo,recTrackStatus:Vi,registryTrackStatus:Ji,run:async function(e){const t=e.specStatus??"";if(e.isBasic="base"===t,e.isCGBG=Xi.includes(t),e.isCGFinal=e.isCGBG&&t.endsWith("G-FINAL"),e.isCR="CR"===t||"CRD"===t,e.isCRDraft="CRD"===t,e.isCRY="CRY"===t||"CRYD"===t,e.isEd="ED"===t,e.isMemberSubmission="Member-SUBM"===t,e.isMO="MO"===t,e.isNote=Gi.includes(t),e.isNoTrack=eo.includes(t),e.isPR="PR"===t,e.isRecTrack=Vi.includes(t),e.isRec=e.isRecTrack&&"REC"===t,e.isRegistry=Ji.includes(t),e.isRegular=!e.isCGBG&&!e.isBasic,e.isTagEditorFinding="editor-draft-finding"===t,e.isTagFinding=Ki.includes(t),e.isUnofficial="unofficial"===t,e.licenseInfo=function(e){let t;if("string"==typeof e.license){const n=e.license.toLowerCase();if(to.has(n))t=n;else{const t=`The license "\`${e.license}\`" is not supported.`,n=ps([...to.keys()].filter((e=>e)),{quotes:!0}),r=ms`Please set
701
+ ${"[license]"} to one of: ${n}. If in doubt, remove \`license\` and let ReSpec pick one for you.`;cs(t,Ui,{hint:r})}}if(e.isUnofficial&&!t&&(t="cc-by"),!e.isUnofficial&&["cc-by","cc0"].includes(t)){const t=ms`Please set ${"[license]"} to \`"w3c-software-doc"\` instead.`;cs(ms`License "\`${e.license}\`" is not allowed for W3C Specifications.`,Ui,{hint:t})}return void 0===t?{name:"unlicensed",url:null,short:"UNLICENSED"}:to.get(t)}(e),e.prependW3C=!e.isBasic&&!e.isUnofficial,e.longStatus=Bi[t],e.textStatus=Fi[t],e.showPreviousVersion=!1,e.isRegular&&!e.shortName){const e=ms`Please set ${"[shortName]"} to a short name for the specification.`;cs(ms`The ${"[shortName]"} configuration option is required for this kind of document.`,Ui,{hint:e})}if(e.publishDate=ro(e,"publishDate",document.lastModified),e.publishYear=e.publishDate.getUTCFullYear(),e.modificationDate&&(e.modificationDate=ro(e,"modificationDate",document.lastModified)),e.isRecTrack&&!e.github&&!e.wgPublicList){const e=ms`Use the ${"[github]"} configuration option to add a link to a repository. Alternatively use ${"[wgPublicList]"} to link to a mailing list.`;cs("W3C Process requires a either a link to a public repository or mailing list.",Ui,{hint:e})}if(e.isEd&&!e.edDraftURI){const e=ms`Please set ${"[edDraftURI]"} to the URL of the Editor's Draft. Alternatively, use the set ${"[github]"} option, which automatically sets it for you.`;ls(ms`Editor's Drafts should set ${"[edDraftURI]"} configuration option.`,Ui,{hint:e})}const n=function(e){const{specStatus:t,group:n}=e;if(e.isNoTrack&&!e.isCGBG&&!e.isTagFinding)return"";const r=e.groupType,s="wg"===r||Array.isArray(r)&&r.includes("wg");if(Qi.includes(t??"")||s)return"/TR";switch(t){case"CG-FINAL":case"BG-FINAL":return`/community/reports/${n}`;case"finding":case"draft-finding":return"/2001/tag/doc";case"Member-SUBM":return"/Submission"}if(("tag"===e.group||"ab"===e.group)&&"TR"===e.canonicalURI)return"/TR";return""}(e);if(n&&!e.thisVersion){const r=Wi[t]||t,{shortName:s,publishDate:i}=e,o=`${r}-${s}-${Wr(i)}`,a=[...Qi,"Member-SUBM"].includes(t)?`${i.getUTCFullYear()}/`:"";e.thisVersion=qi(`${n}/${a}${o}/`)}e.isEd&&(e.thisVersion=e.edDraftURI),e.isCGBG&&function(e){const t=Fi[e.specStatus],n=e.latestVersion?new URL(qi(e.latestVersion)):null;if(!e.wg){return void cs(ms`The ${"[group]"} configuration option is required for this kind of document (${t}).`,Ui)}if(e.isCGFinal){if(!1===("https://www.w3.org"===n?.origin||"https://w3.org/"===n?.origin)){cs(ms`For ${t}, the ${"[latestVersion]"} URL must point to somewhere at https://www.w3.org/.`,Ui,{hint:"Ask a W3C Team Member for a W3C URL where the report can be published."})}}}(e),null!==e.latestVersion&&(e.latestVersion=e.latestVersion?qi(e.latestVersion):n?qi(`${n}/${e.shortName}/`):""),e.latestVersion&&function(e){const t=new URL(e.latestVersion);if(("https://www.w3.org"===t.origin||"https://w3.org/"===t.origin)&&t.pathname.startsWith("/TR/")&&!1===["ED",...Qi].includes(e.specStatus)){const t=ms`Ask a W3C Team Member for a W3C URL where the report can be published and change ${"[latestVersion]"} to something else.`;cs(ms`Documents with a status of \`"${e.specStatus}"\` can't be published on the W3C's /TR/ (Technical Report) space.`,Ui,{hint:t})}}(e);const r=`${n}/${e.shortName}`;if(e.previousPublishDate){if(!e.previousMaturity&&!e.isTagFinding){cs(ms`${"[`previousPublishDate`]"} is set, but missing ${"[`previousMaturity`]"}.`,Ui)}e.previousPublishDate=ro(e,"previousPublishDate");const t=Wi[e.previousMaturity]??e.previousMaturity;if(e.isTagFinding&&e.latestVersion){const t=Tr.format(e.publishDate);e.thisVersion=qi(`${r}-${t}`);const n=Tr.format(e.previousPublishDate);e.prevVersion=qi(`${r}-${n}`)}else if(e.isCGBG||e.isBasic)e.prevVersion=e.prevVersion||"";else{const r=e.previousPublishDate.getUTCFullYear(),{shortName:s}=e,i=Wr(e.previousPublishDate);e.prevVersion=qi(`${n}/${r}/${t}-${s}-${i}/`)}}e.prevRecShortname&&!e.prevRecURI&&(e.prevRecURI=qi(`${n}/${e.prevRecShortname}`));const s=e.editors??[],i=e.formerEditors??[];for(let e=0;e<s.length;e++){const t=s[e];"retiredDate"in t&&(i.push(t),s.splice(e--,1))}if(e.editors=s,e.formerEditors=i,0===s.length){const e=ms`Add one or more editors using the ${"[editors]"} configuration option.`;cs("At least one editor is required.",Ui,{hint:e})}else s.length&&e.isRecTrack&&s.forEach(((e,t)=>{if(e.w3cid)return;const n=ms`See ${"[w3cid]"} for instructions for how to retrieve it and add it.`;cs(ms`Editor ${e.name?`"${e.name}"`:`number ${t+1}`} is missing their ${"[w3cid]"}.`,Ui,{hint:n})}));if(e.alternateFormats?.some((({uri:e,label:t})=>!e||!t))){cs(ms`Every ${"[`alternateFormats`]"} entry must have a \`uri\` and a \`label\`.`,Ui)}e.copyrightStart==e.publishYear&&(e.copyrightStart=""),e.dashDate=Tr.format(e.publishDate),e.publishISODate=e.publishDate.toISOString(),e.shortISODate=Tr.format(e.publishDate),function(e){if(!e.wgPatentPolicy)return;const t=new Set([].concat(e.wgPatentPolicy));if(t.size&&![...t].every((e=>no.includes(e)))){const e=ms`Invalid ${"[wgPatentPolicy]"} value(s): ${hs([...t].filter((e=>!no.includes(e))))}.`,n=`Please use one of: ${ps(no)}.`;cs(e,Ui,{hint:n})}if(1!==t.size){const e="When collaborating across multiple groups, they must use the same patent policy.",n=ms`For ${"[wgPatentPolicy]"}, please check the patent policies of each group. The patent policies were: ${[...t].join(", ")}.`;cs(e,Ui,{hint:n})}e.wgPatentPolicy=[...t][0]}(e),await async function(e){if(!e.shortName||null===e.historyURI||!e.latestVersion)return;const t=e.isEd||Qi.includes(e.specStatus);if(e.historyURI&&!t){const t=ms`Please remove ${"[historyURI]"}.`;return cs(ms`The ${"[historyURI]"} can't be used with non /TR/ documents.`,Ui,{hint:t}),void(e.historyURI=null)}const n=new URL(e.historyURI??`${e.shortName}/`,"https://www.w3.org/standards/history/");if(e.historyURI&&t||["FPWD","DNOTE","NOTE","DRY"].includes(e.specStatus))return void(e.historyURI=n.href);try{const t=await fetch(n,{method:"HEAD"});t.ok&&(e.historyURI=t.url)}catch{}}(e),e.isTagEditorFinding&&(delete e.thisVersion,delete e.latestVersion),e.isTagFinding&&(e.showPreviousVersion=!!e.previousPublishDate);const o={get multipleAlternates(){return!!(e.alternateFormats&&e.alternateFormats.length>1)},get alternatesHTML(){return e.alternateFormats&&Gr(e.alternateFormats.map((({label:e})=>e)),((t,n)=>{const r=e.alternateFormats[n];return ur`<a
702
702
  rel="alternate"
703
703
  href="${r.uri}"
704
704
  hreflang="${r?.lang??null}"
705
705
  type="${r?.type??null}"
706
706
  >${r.label}</a
707
- >`}))}},a=(e.isCGBG?_i:Ci)(e,o);document.body.prepend(a),document.body.classList.add("h-entry");const c=document.getElementById("sotd")||document.createElement("section");if((e.isCGBG||!e.isNoTrack||e.isTagFinding)&&!c.id){ns("A Status of This Document must include at least on custom paragraph.",Ii,{elements:[c],hint:"Add a `<p>` in the 'sotd' section that reflects the status of this specification."})}c.id=c.id||"sotd",c.classList.add("introductory");const l=[e.wg,e.wgURI,e.wgPatentURI];if(l.some((e=>Array.isArray(e)))&&!l.every((e=>Array.isArray(e)))){const e=ls`Use the ${"[group]"} option with an array instead.`;ns(ls`If one of ${"[wg]"}, ${"[wgURI]"}, or ${"[wgPatentURI]"} is an array, they all have to be.`,Ii,{hint:e})}if(Array.isArray(e.wg)?(e.multipleWGs=e.wg.length>1,e.wgPatentHTML=Ur(e.wg,((t,n)=>sr`a
707
+ >`}))}},a=(e.isCGBG?Pi:Li)(e,o);document.body.prepend(a),document.body.classList.add("h-entry");const c=document.getElementById("sotd")||document.createElement("section");if((e.isCGBG||!e.isNoTrack||e.isTagFinding)&&!c.id){cs("A Status of This Document must include at least on custom paragraph.",Ui,{elements:[c],hint:"Add a `<p>` in the 'sotd' section that reflects the status of this specification."})}c.id=c.id||"sotd",c.classList.add("introductory");const l=[e.wg,e.wgURI,e.wgPatentURI];if(l.some((e=>Array.isArray(e)))&&!l.every((e=>Array.isArray(e)))){const e=ms`Use the ${"[group]"} option with an array instead.`;cs(ms`If one of ${"[wg]"}, ${"[wgURI]"}, or ${"[wgPatentURI]"} is an array, they all have to be.`,Ui,{hint:e})}if(Array.isArray(e.wg)?(e.multipleWGs=e.wg.length>1,e.wgPatentHTML=Gr(e.wg,((t,n)=>ur`a
708
708
  <a href="${e.wgPatentURI[n]}" rel="disclosure"
709
709
  >public list of any patent disclosures (${t})</a
710
- >`))):e.multipleWGs=!1,e.isPR&&!e.crEnd){ns(ls`${"[specStatus]"} is "PR" but no ${"[crEnd]"} is specified in the ${"[respecConfig]"} (needed to indicate end of previous CR).`,Ii)}if(e.isCR&&!e.isCRDraft&&!e.crEnd){ns(ls`${"[specStatus]"} is "CR", but no ${"[crEnd]"} is specified in the ${"[respecConfig]"}.`,Ii)}if(e.crEnd=Yi(e,"crEnd"),e.isPR&&!e.prEnd){ns(ls`${"[specStatus]"} is "PR" but no ${"[prEnd]"} is specified in the ${"[respecConfig]"}.`,Ii)}e.prEnd=Yi(e,"prEnd");const u=c.classList.contains("updateable-rec"),d=null!==document.querySelector(".correction:not(.proposed)"),p=null!==document.querySelector(".correction.proposed"),h=null!==document.querySelector(".addition:not(.proposed)"),f=null!==document.querySelector(".addition.proposed"),m=d||h||f||p;if(e.isRec&&!e.errata&&!m){const e=ls`Add an ${"[errata]"} URL to your ${"[respecConfig]"}.`;ns("Recommendations must have an errata link.",Ii,{hint:e})}if(e.isRec&&!u&&(h||d||f||p)){ns(ls`${"[specStatus]"} is "REC" with amendments, but the Recommendation is not marked as allowing revisions.`,Ii)}if(e.isRec&&u&&(f||p)&&!e.revisedRecEnd){ns(ls`${"[specStatus]"} is "REC" with proposed corrections or additions but no ${"[revisedRecEnd]"} is specified in the ${"[respecConfig]"}.`,Ii)}if(e.revisedRecEnd=Yi(e,"revisedRecEnd"),e.noRecTrack&&qi.includes(t)){const e=ls`Document configured as ${"[noRecTrack]"}, but its status ("${t}") puts it on the W3C Rec Track.`,n=os(qi,{quotes:!0});ns(e,Ii,{hint:`Status **can't** be any of: ${n}.`})}if(c.classList.contains("override")||sr.bind(c)`${function(e,t){const n={...Xi(t,e),get mailToWGPublicList(){return`mailto:${e.wgPublicList}@w3.org`},get mailToWGPublicListWithSubject(){const t=e.subjectPrefix?`?subject=${encodeURIComponent(e.subjectPrefix)}`:"";return this.mailToWGPublicList+t},get mailToWGPublicListSubscription(){return`mailto:${e.wgPublicList}-request@w3.org?subject=subscribe`}},r=e.isCGBG?Ni:Li;return r(e,n)}(e,c)}`,!e.implementationReportURI&&e.isCR){const e=ls`CR documents must have an ${"[implementationReportURI]"} that describes the [implementation experience](https://www.w3.org/policies/process/#implementation-experience).`;ns(ls`Missing ${"[implementationReportURI]"} configuration option in ${"[respecConfig]"}.`,Ii,{hint:e})}if(!e.implementationReportURI&&e.isPR){rs(ls`PR documents should include an ${"[implementationReportURI]"}, which needs to link to a document that describes the [implementation experience](https://www.w3.org/policies/process-20190301/#implementation-experience).`,Ii)}ps("amend-user-config",{publishISODate:e.publishISODate,generatedSubtitle:Nr(document.getElementById("w3c-state")?.textContent??"")})},status2text:ji,status2track:Mi,tagStatus:Fi,trStatus:Vi});const eo={lint:{"no-headingless-sections":!0,"no-http-props":!0,"no-unused-vars":!1,"check-punctuation":!1,"local-refs-exist":!0,"check-internal-slots":!1,"check-charset":!1,"privsec-section":!1,"no-dfn-in-abstract":!1},pluralize:!0,specStatus:"base",highlightVars:!0,addSectionLinks:!0},to="w3c/defaults",no={src:"https://www.w3.org/StyleSheets/TR/2021/logos/W3C",alt:"W3C",height:48,width:72,url:"https://www.w3.org/"},ro={alt:"W3C Member Submission",href:"https://www.w3.org/Submission/",src:"https://www.w3.org/Icons/member_subm-v.svg",width:"211",height:"48"},so={lint:{"privsec-section":!1,"required-sections":!0,"wpt-tests-exist":!1,"informative-dfn":"warn","no-unused-dfns":"warn",a11y:!1},doJsonLd:!1,logos:[],xref:!0,wgId:"",otherLinks:[],excludeGithubLinks:!0,subtitle:"",prevVersion:"",formerEditors:[],editors:[],authors:[]};var io=Object.freeze({__proto__:null,name:to,run:function(e){const t=!1!==e.lint&&{...eo.lint,...so.lint,...e.lint};Object.assign(e,{...eo,...so,...e,lint:t}),"unofficial"===e.specStatus||e.hasOwnProperty("license")||(e.license="w3c-software-doc"),function(e){const{specStatus:t,groupType:n,group:r}=e;if(!t){const t=ls`Select an appropriate status from ${"[specStatus]"} based on your W3C group. If in doubt, use \`"unofficial"\`.`;return ns(ls`The ${"[specStatus]"} configuration option is required.`,to,{hint:t}),void(e.specStatus="base")}if(void 0===ji[t]){const n=ls`The ${"[specStatus]"} "\`${t}\`" is not supported at for this type of document.`,r=ls`set ${"[specStatus]"} to one of: ${os(Object.keys(ji),{quotes:!0})}.`;return ns(n,to,{hint:r}),void(e.specStatus="base")}switch(n){case"cg":if(![...Bi,"unofficial","UD"].includes(t)){const n=ls`W3C Community Group documents can't use \`"${t}"\` for the ${"[specStatus]"} configuration option.`,r=os(Bi,{quotes:!0});ns(n,to,{hint:`Please use one of: ${r}. Automatically falling back to \`"CG-DRAFT"\`.`}),e.specStatus="CG-DRAFT"}break;case"bg":if(![...Hi,"unofficial","UD"].includes(t)){const n=ls`W3C Business Group documents can't use \`"${t}"\` for the ${"[specStatus]"} configuration option.`,r=os(Hi,{quotes:!0});ns(n,to,{hint:`Please use one of: ${r}. Automatically falling back to \`"BG-DRAFT"\`.`}),e.specStatus="BG-DRAFT"}break;case"wg":if(![...Vi,"unofficial","UD","ED"].includes(t)){const e=ls`Pleas see ${"[specStatus]"} for appropriate status for W3C Working Group documents.`;ns(ls`W3C Working Group documents can't use \`"${t}"\` for the ${"[specStatus]"} configuration option.`,to,{hint:e})}break;case"other":if("tag"===r&&!["ED",...Vi,...Fi].includes(t)){const n=ls`The W3C Technical Architecture Group's documents can't use \`"${t}"\` for the ${"[specStatus]"} configuration option.`,r=os(["ED",...Vi,...Fi],{quotes:!0});ns(n,to,{hint:`Please use one of: ${r}. Automatically falling back to \`"unofficial"\`.`}),e.specStatus="unofficial"}break;default:if(!e.wgId&&!["unofficial","base","UD","Member-SUBM"].includes(t)){const t="Document is not associated with a [W3C group](https://respec.org/w3c/groups/). Defaulting to 'base' status.",n=ls`Use the ${"[group]"} configuration option to associated this document with a W3C group.`;e.specStatus="base",ns(t,to,{hint:n})}}}(e),function(e){const{specStatus:t,wg:n}=e,r=[...qi,...Wi,...Ui,...Fi,"ED"].includes(t),s=n&&n.length&&r,i=["Member-SUBM"].includes(t);(s||i)&&(e.logos.unshift(no),"Member-SUBM"===t&&e.logos.push(ro))}(e)}});const oo=String.raw,ao=String.raw`color-mix(in srgb, #eaf3ff 15%, transparent)`;var co=oo`@keyframes pop{
710
+ >`))):e.multipleWGs=!1,e.isPR&&!e.crEnd){cs(ms`${"[specStatus]"} is "PR" but no ${"[crEnd]"} is specified in the ${"[respecConfig]"} (needed to indicate end of previous CR).`,Ui)}if(e.isCR&&!e.isCRDraft&&!e.crEnd){cs(ms`${"[specStatus]"} is "CR", but no ${"[crEnd]"} is specified in the ${"[respecConfig]"}.`,Ui)}if(e.crEnd=ro(e,"crEnd"),e.isPR&&!e.prEnd){cs(ms`${"[specStatus]"} is "PR" but no ${"[prEnd]"} is specified in the ${"[respecConfig]"}.`,Ui)}e.prEnd=ro(e,"prEnd");const u=c.classList.contains("updateable-rec"),d=null!==document.querySelector(".correction:not(.proposed)"),p=null!==document.querySelector(".correction.proposed"),h=null!==document.querySelector(".addition:not(.proposed)"),f=null!==document.querySelector(".addition.proposed"),m=d||h||f||p;if(e.isRec&&!e.errata&&!m){const e=ms`Add an ${"[errata]"} URL to your ${"[respecConfig]"}.`;cs("Recommendations must have an errata link.",Ui,{hint:e})}if(e.isRec&&!u&&(h||d||f||p)){cs(ms`${"[specStatus]"} is "REC" with amendments, but the Recommendation is not marked as allowing revisions.`,Ui)}if(e.isRec&&u&&(f||p)&&!e.revisedRecEnd){cs(ms`${"[specStatus]"} is "REC" with proposed corrections or additions but no ${"[revisedRecEnd]"} is specified in the ${"[respecConfig]"}.`,Ui)}if(e.revisedRecEnd=ro(e,"revisedRecEnd"),e.noRecTrack&&Vi.includes(t)){const e=ms`Document configured as ${"[noRecTrack]"}, but its status ("${t}") puts it on the W3C Rec Track.`,n=ps(Vi,{quotes:!0});cs(e,Ui,{hint:`Status **can't** be any of: ${n}.`})}if(c.classList.contains("override")||ur.bind(c)`${function(e,t){const n={...so(t,e),get mailToWGPublicList(){return`mailto:${e.wgPublicList}@w3.org`},get mailToWGPublicListWithSubject(){const t=e.subjectPrefix?`?subject=${encodeURIComponent(e.subjectPrefix)}`:"";return this.mailToWGPublicList+t},get mailToWGPublicListSubscription(){return`mailto:${e.wgPublicList}-request@w3.org?subject=subscribe`}},r=e.isCGBG?Mi:Oi;return r(e,n)}(e,c)}`,!e.implementationReportURI&&e.isCR){const e=ms`CR documents must have an ${"[implementationReportURI]"} that describes the [implementation experience](https://www.w3.org/policies/process/#implementation-experience).`;cs(ms`Missing ${"[implementationReportURI]"} configuration option in ${"[respecConfig]"}.`,Ui,{hint:e})}if(!e.implementationReportURI&&e.isPR){ls(ms`PR documents should include an ${"[implementationReportURI]"}, which needs to link to a document that describes the [implementation experience](https://www.w3.org/policies/process-20190301/#implementation-experience).`,Ui)}ys("amend-user-config",{publishISODate:e.publishISODate,generatedSubtitle:Mr(document.getElementById("w3c-state")?.textContent??"")})},status2text:Fi,status2track:Hi,tagStatus:Ki,trStatus:Qi});const oo={lint:{"no-headingless-sections":!0,"no-http-props":!0,"no-unused-vars":!1,"check-punctuation":!1,"local-refs-exist":!0,"check-internal-slots":!1,"check-charset":!1,"privsec-section":!1,"no-dfn-in-abstract":!1},pluralize:!0,specStatus:"base",highlightVars:!0,addSectionLinks:!0},ao="w3c/defaults",co={src:"https://www.w3.org/StyleSheets/TR/2021/logos/W3C",alt:"W3C",height:48,width:72,url:"https://www.w3.org/"},lo={alt:"W3C Member Submission",href:"https://www.w3.org/Submission/",src:"https://www.w3.org/Icons/member_subm-v.svg",width:"211",height:"48"},uo={lint:{"privsec-section":!1,"required-sections":!0,"wpt-tests-exist":!1,"informative-dfn":"warn","no-unused-dfns":"warn",a11y:!1},doJsonLd:!1,logos:[],xref:!0,wgId:"",otherLinks:[],excludeGithubLinks:!0,subtitle:"",prevVersion:"",formerEditors:[],editors:[],authors:[]};var po=Object.freeze({__proto__:null,name:ao,run:function(e){const t=!1!==e.lint&&{...oo.lint,...uo.lint,...e.lint};Object.assign(e,{...oo,...uo,...e,lint:t}),"unofficial"===e.specStatus||e.hasOwnProperty("license")||(e.license="w3c-software-doc"),function(e){const{specStatus:t,groupType:n,group:r}=e;if(!t){const t=ms`Select an appropriate status from ${"[specStatus]"} based on your W3C group. If in doubt, use \`"unofficial"\`.`;return cs(ms`The ${"[specStatus]"} configuration option is required.`,ao,{hint:t}),void(e.specStatus="base")}if(void 0===Fi[t]){const n=ms`The ${"[specStatus]"} "\`${t}\`" is not supported at for this type of document.`,r=ms`set ${"[specStatus]"} to one of: ${ps(Object.keys(Fi),{quotes:!0})}.`;return cs(n,ao,{hint:r}),void(e.specStatus="base")}switch(n){case"cg":if(![...Zi,"unofficial","UD"].includes(t)){const n=ms`W3C Community Group documents can't use \`"${t}"\` for the ${"[specStatus]"} configuration option.`,r=ps(Zi,{quotes:!0});cs(n,ao,{hint:`Please use one of: ${r}. Automatically falling back to \`"CG-DRAFT"\`.`}),e.specStatus="CG-DRAFT"}break;case"bg":if(![...Yi,"unofficial","UD"].includes(t)){const n=ms`W3C Business Group documents can't use \`"${t}"\` for the ${"[specStatus]"} configuration option.`,r=ps(Yi,{quotes:!0});cs(n,ao,{hint:`Please use one of: ${r}. Automatically falling back to \`"BG-DRAFT"\`.`}),e.specStatus="BG-DRAFT"}break;case"wg":if(![...Qi,"unofficial","UD","ED"].includes(t)){const e=ms`Pleas see ${"[specStatus]"} for appropriate status for W3C Working Group documents.`;cs(ms`W3C Working Group documents can't use \`"${t}"\` for the ${"[specStatus]"} configuration option.`,ao,{hint:e})}break;case"other":if("tag"===r&&!["ED",...Qi,...Ki].includes(t)){const n=ms`The W3C Technical Architecture Group's documents can't use \`"${t}"\` for the ${"[specStatus]"} configuration option.`,r=ps(["ED",...Qi,...Ki],{quotes:!0});cs(n,ao,{hint:`Please use one of: ${r}. Automatically falling back to \`"unofficial"\`.`}),e.specStatus="unofficial"}break;default:if(!e.wgId&&!["unofficial","base","UD","Member-SUBM"].includes(t)){const t="Document is not associated with a [W3C group](https://respec.org/w3c/groups/). Defaulting to 'base' status.",n=ms`Use the ${"[group]"} configuration option to associated this document with a W3C group.`;e.specStatus="base",cs(t,ao,{hint:n})}}}(e),function(e){const{specStatus:t,wg:n}=e,r=[...Vi,...Ji,...Gi,...Ki,"ED"].includes(t),s=n&&n.length&&r,i=["Member-SUBM"].includes(t);(s||i)&&(e.logos.unshift(co),"Member-SUBM"===t&&e.logos.push(lo))}(e)}});const ho=String.raw,fo=String.raw`color-mix(in srgb, #eaf3ff 15%, transparent)`;var mo=ho`@keyframes pop{
711
711
  0%{transform:scale(1,1)}
712
712
  25%{transform:scale(1.25,1.25);opacity:.75}
713
713
  100%{transform:scale(1,1)}
@@ -723,9 +723,9 @@ a.bibref{text-decoration:none}
723
723
  }
724
724
  #references :target{background:#eaf3ff;animation:pop .4s ease-in-out 0s 1}
725
725
  @media (prefers-color-scheme:dark){
726
- #references :target{background:${ao}}
726
+ #references :target{background:${fo}}
727
727
  }
728
- body:has(input[name=color-scheme][value=dark]:checked) #references :target{background:${ao}}
728
+ body:has(input[name=color-scheme][value=dark]:checked) #references :target{background:${fo}}
729
729
  cite .bibref{font-style:italic}
730
730
  a[href].orcid{padding-left:4px;padding-right:4px}
731
731
  a[href].orcid>svg{margin-bottom:-2px}
@@ -754,79 +754,79 @@ dd{margin-left:0}
754
754
  .removeOnSave{display:none}
755
755
  }
756
756
  body:has(input[name=color-scheme][value=light]:checked),head:not(:has(meta[name=color-scheme][content~=dark]))+body{color-scheme:light}
757
- body:has(input[name=color-scheme][value=dark]:checked){color-scheme:dark}`;const lo=function(){const e=document.createElement("style");return e.id="respec-mainstyle",e.textContent=co,document.head.appendChild(e),e}();var uo=Object.freeze({__proto__:null,name:"core/style",run:function(e){e.noReSpecCSS&&lo.remove()}});function po(){const e=document.createElement("script");e.src="https://www.w3.org/scripts/TR/2021/fixup.js",location.hash&&e.addEventListener("load",(()=>{window.location.href=location.hash}),{once:!0}),document.body.appendChild(e)}const ho=function(){const e=[{hint:"preconnect",href:"https://www.w3.org"},{hint:"preload",href:"https://www.w3.org/scripts/TR/2021/fixup.js",as:"script"},{hint:"preload",href:mo("base.css").href,as:"style"},{hint:"preload",href:mo("dark.css").href,as:"style"},{hint:"preload",href:"https://www.w3.org/StyleSheets/TR/2021/logos/W3C",as:"image",corsMode:"anonymous"}],t=document.createDocumentFragment();for(const n of e.map(Sr))t.appendChild(n);return t}();function fo(e){return t=>{const n=t.querySelector(`head link[href="${e}"]`);n&&t.querySelector("head")?.append(n)}}function mo(e="base.css"){return new URL(`/StyleSheets/TR/2021/${e}`,"https://www.w3.org/")}ho.appendChild(sr`<link
757
+ body:has(input[name=color-scheme][value=dark]:checked){color-scheme:dark}`;const go=function(){const e=document.createElement("style");return e.id="respec-mainstyle",e.textContent=mo,document.head.appendChild(e),e}();var bo=Object.freeze({__proto__:null,name:"core/style",run:function(e){e.noReSpecCSS&&go.remove()}});function yo(){const e=document.createElement("script");e.src="https://www.w3.org/scripts/TR/2021/fixup.js",location.hash&&e.addEventListener("load",(()=>{window.location.href=location.hash}),{once:!0}),document.body.appendChild(e)}const wo=function(){const e=[{hint:"preconnect",href:"https://www.w3.org"},{hint:"preload",href:"https://www.w3.org/scripts/TR/2021/fixup.js",as:"script"},{hint:"preload",href:ko("base.css").href,as:"style"},{hint:"preload",href:ko("dark.css").href,as:"style"},{hint:"preload",href:"https://www.w3.org/StyleSheets/TR/2021/logos/W3C",as:"image",corsMode:"anonymous"}],t=document.createDocumentFragment();for(const n of e.map(Ar))t.appendChild(n);return t}();function vo(e){return t=>{const n=t.querySelector(`head link[href="${e}"]`);n&&t.querySelector("head")?.append(n)}}function ko(e="base.css"){return new URL(`/StyleSheets/TR/2021/${e}`,"https://www.w3.org/")}wo.appendChild(ur`<link
758
758
  rel="stylesheet"
759
759
  href="https://www.w3.org/StyleSheets/TR/2021/base.css"
760
760
  class="removeOnSave"
761
- />`),document.head.querySelector("meta[name=viewport]")||ho.prepend(sr`<meta
761
+ />`),document.head.querySelector("meta[name=viewport]")||wo.prepend(ur`<meta
762
762
  name="viewport"
763
763
  content="width=device-width, initial-scale=1, shrink-to-fit=no"
764
- />`),document.head.prepend(ho);var go=Object.freeze({__proto__:null,name:"w3c/style",run:function(e){e.noToc||hs("end-all",po,{once:!0});const t=mo(function(e){const t=e.specStatus?.toUpperCase()??"";let n="";const r=[...qi,...Wi,...Ui,"ED","MEMBER-SUBM"].includes(t)&&e.wgId;switch(t){case"WD":case"FPWD":n=r?"W3C-WD":"base.css";break;case"CG-DRAFT":case"CG-FINAL":case"BG-DRAFT":case"BG-FINAL":n=t.toLowerCase();break;case"UD":case"UNOFFICIAL":n="W3C-UD";break;case"FINDING":case"DRAFT-FINDING":case"EDITOR-DRAFT-FINDING":case"BASE":n="base.css";break;case"MEMBER-SUBM":n="W3C-Member-SUBM";break;default:n=r?`W3C-${e.specStatus}`:"base.css"}return n}(e));document.head.appendChild(sr`<link rel="stylesheet" href="${t.href}" />`),hs("beforesave",fo(t));let n=document.querySelector("head meta[name=color-scheme]");if(n||(n=sr`<meta name="color-scheme" content="light" />`,document.head.appendChild(n)),n?.content.includes("dark")){const e=mo("dark.css");document.head.appendChild(sr`<link
764
+ />`),document.head.prepend(wo);var $o=Object.freeze({__proto__:null,name:"w3c/style",run:function(e){e.noToc||ws("end-all",yo,{once:!0});const t=ko(function(e){const t=e.specStatus?.toUpperCase()??"";let n;const r=[...Vi,...Ji,...Gi,"ED","MEMBER-SUBM"].includes(t)&&e.wgId;switch(t){case"WD":case"FPWD":n=r?"W3C-WD":"base.css";break;case"CG-DRAFT":case"CG-FINAL":case"BG-DRAFT":case"BG-FINAL":n=t.toLowerCase();break;case"UD":case"UNOFFICIAL":n="W3C-UD";break;case"FINDING":case"DRAFT-FINDING":case"EDITOR-DRAFT-FINDING":case"BASE":n="base.css";break;case"MEMBER-SUBM":n="W3C-Member-SUBM";break;default:n=r?`W3C-${e.specStatus}`:"base.css"}return n}(e));document.head.appendChild(ur`<link rel="stylesheet" href="${t.href}" />`),ws("beforesave",vo(t));let n=document.querySelector("head meta[name=color-scheme]");if(n||(n=ur`<meta name="color-scheme" content="light" />`,document.head.appendChild(n)),n?.content.includes("dark")){const e=ko("dark.css");document.head.appendChild(ur`<link
765
765
  rel="stylesheet"
766
766
  href="${e.href}"
767
767
  media="(prefers-color-scheme: dark)"
768
- />`),hs("beforesave",fo(e))}}});const bo="core/github";let yo,wo;const vo=new Promise(((e,t)=>{yo=e,wo=e=>{ns(e,bo),t(new Error(e))}})),ko=Ir({en:{file_a_bug:"File an issue",participate:"Participate:",commit_history:"Commit history"},ko:{participate:"참여"},zh:{file_a_bug:"反馈错误",participate:"参与:"},ja:{commit_history:"変更履歴",file_a_bug:"問題報告",participate:"参加方法:"},nl:{commit_history:"Revisiehistorie",file_a_bug:"Dien een melding in",participate:"Doe mee:"},es:{commit_history:"Historia de cambios",file_a_bug:"Nota un bug",participate:"Participe:"},de:{commit_history:"Revisionen",file_a_bug:"Fehler melden",participate:"Mitmachen:"}});var $o=Object.freeze({__proto__:null,github:vo,name:bo,run:async function(e){if(!e.hasOwnProperty("github")||!e.github)return void yo(null);if("object"==typeof e.github&&!e.github.hasOwnProperty("repoURL")){const e=ls`Config option ${"[github]"} is missing property \`repoURL\`.`;return void wo(e)}const t="string"==typeof e.github?{}:e.github;let n,r=t.repoURL||String(e.github);r.endsWith("/")||(r+="/");try{n=new URL(r,"https://github.com")}catch{const e=ls`${"[github]"} configuration option is not a valid URL? (${r}).`;return void wo(e)}if("https://github.com"!==n.origin){const e=ls`${"[github]"} configuration option must be HTTPS and pointing to GitHub. (${n.href}).`;return void wo(e)}const[s,i]=n.pathname.split("/").filter((e=>e));if(!s||!i){const e=ls`${"[github]"} URL needs a path. For example, "w3c/my-spec".`;return void wo(e)}const o=t.branch||"gh-pages",a=new URL("./issues/",n).href,c=new URL("./new/choose",a).href;let l,u;if(l="object"==typeof e.github&&e.github.hasOwnProperty("pullsURL")?e.github.pullsURL:new URL("./pulls/",n).href,l)try{const e=new URL(l);if("https://github.com"!==e.origin){const e=ls`${"[github.pullsURL]"} must be HTTPS and pointing to GitHub. (${l}).`;return void wo(e)}if(!e.pathname.includes("/pulls")){const e=ls`${"[github.pullsURL]"} must point to pull requests. (${l}).`;return void wo(e)}}catch{const e=ls`${"[github.pullsURL]"} is not a valid URL. (${l}).`;return void wo(e)}if(u="object"==typeof e.github&&e.github.hasOwnProperty("commitHistoryURL")?e.github.commitHistoryURL:new URL(`./commits/${t.branch??""}`,n.href).href,u)try{const e=new URL(u);if("https://github.com"!==e.origin){const e=ls`${"[github.commitHistoryURL]"} must be HTTPS and pointing to GitHub. (${u}).`;return void wo(e)}if(!e.pathname.includes("/commits")){const e=ls`${"[github.commitHistoryURL]"} must point to commits. (${u}).`;return void wo(e)}}catch{const e=ls`${"[github.commitHistoryURL]"} is not a valid URL. (${u}).`;return void wo(e)}const d={edDraftURI:`https://${s.toLowerCase()}.github.io/${i}/`,githubToken:void 0,githubUser:void 0,issueBase:a,atRiskBase:a,otherLinks:[],pullBase:l,shortName:i};let p="https://respec.org/github";if(e.githubAPI)if(new URL(e.githubAPI).hostname===window.parent.location.hostname)p=e.githubAPI;else{rs("The `githubAPI` configuration option is private and should not be added manually.",bo)}if(!e.excludeGithubLinks){const t={key:ko.participate,data:[{value:`GitHub ${s}/${i}`,href:n},{value:"All issues",href:a},{value:ko.file_a_bug,href:c},{value:ko.commit_history,href:u},{value:"Pull requests",href:l}]};e.otherLinks||(e.otherLinks=[]),e.otherLinks.unshift(t)}const h={branch:o,repoURL:n.href,apiBase:p,fullName:`${s}/${i}`,issuesURL:a,pullsURL:l,newIssuesURL:c,commitHistoryURL:u};yo(h);const f={...d,...e,github:h,githubAPI:p};Object.assign(e,f)}});class xo{constructor(e){this.doc=e,this.root=e.createDocumentFragment(),this.stack=[this.root],this.current=this.root}static sectionClasses=new Set(["appendix","informative","notoc"]);findPosition(e){return parseInt(e.tagName.charAt(1),10)}findParent(e){let t;for(;e>0;)if(e--,t=this.stack[e],t)return t}findHeader({firstChild:e}){for(;e;){if(/H[1-6]/.test(e.tagName))return e;e=e.nextSibling}return null}addHeader(e){const t=this.doc.createElement("section"),n=this.findPosition(e);t.appendChild(e),this.findParent(n).appendChild(t),this.stack[n]=t,this.stack.length=n+1,this.current=t,this.processHeader(e,t)}processHeader(e,t){xo.sectionClasses.intersection(new Set(e.classList)).forEach((e=>{t.classList.add(e)}))}addSection(e){const t=this.findHeader(e),n=t?this.findPosition(t):1,r=this.findParent(n);t&&e.removeChild(t),e.appendChild(Co(e)),t&&e.prepend(t),r.appendChild(e),this.current=r}addElement(e){this.current.appendChild(e)}}function Co(e){const t=new xo(e.ownerDocument);for(;e.firstChild;){const n=e.firstChild;switch(n.localName){case"h1":case"h2":case"h3":case"h4":case"h5":case"h6":t.addHeader(n);break;case"section":t.addSection(n);break;default:t.addElement(n)}}return t.root}function So(e){const t=Co(e);if("section"===t.firstElementChild.localName&&"section"===e.localName){const n=t.firstElementChild;n.remove(),e.append(...n.childNodes)}else e.textContent="";e.appendChild(t)}var _o=Object.freeze({__proto__:null,name:"core/sections",restructure:So,run:function(){So(document.body)}});const To="core/data-include";function Ro(e,t,n){const r=document.querySelector(`[data-include-id=${t}]`);if(!r)return;const s=jr(e,r.dataset.oninclude,n),i="string"==typeof r.dataset.includeReplace;!function(e,t,{replace:n}){const{includeFormat:r}=e.dataset;let s=t;"markdown"===r&&(s=js(s)),"text"===r?e.textContent=s:e.innerHTML=s,"markdown"===r&&So(e),n&&e.replaceWith(...e.childNodes)}(r,s,{replace:i}),i||function(e){["data-include","data-include-format","data-include-replace","data-include-id","data-oninclude"].forEach((t=>e.removeAttribute(t)))}(r)}async function Eo(e,t){const n=e.querySelectorAll("[data-include]"),r=Array.from(n).map((async e=>{const n=e.dataset.include;if(!n)return;const r=`include-${String(Math.random()).slice(2)}`;e.dataset.includeId=r;try{const s=await fetch(n);Ro(await s.text(),r,n),t<3&&await Eo(e,t+1)}catch(t){const r=t;ns(`\`data-include\` failed: \`${n}\` (${r.message}).`,To,{elements:[e],cause:r})}}));await Promise.all(r)}var Lo=Object.freeze({__proto__:null,name:To,run:async function(){await Eo(document,1)}});var Ao=Object.freeze({__proto__:null,name:"core/reindent",run:function(){for(const e of document.getElementsByTagName("pre"))e.innerHTML=us(e.innerHTML)}});const Po="core/title",No=Ir({en:{default_title:"No Title"},de:{default_title:"Kein Titel"},zh:{default_title:"无标题"},cs:{default_title:"Bez názvu"},fr:{default_title:"Sans titre"}});var Io=Object.freeze({__proto__:null,name:Po,run:function(e){const t=document.querySelector("h1#title")||sr`<h1 id="title"></h1>`;if(t.isConnected&&""===t.textContent.trim()){ns('The document is missing a title, so using a default title. To fix this, please give your document a `<title>`. If you need special markup in the document\'s title, please use a `<h1 id="title">`.',Po,{title:"Document is missing a title",elements:[t]})}t.id||(t.id="title"),t.classList.add("title"),function(e,t){t.isConnected||(t.textContent=document.title||`${No.default_title}`);const n=document.createElement("h1");n.innerHTML=t.innerHTML.replace(/:<br>/g,": ").replace(/<br>/g," - ");let r=Nr(n.textContent);if(e.isPreview&&e.prNumber){const n=e.prUrl||`${e.github.repoURL}pull/${e.prNumber}`,{childNodes:s}=sr`
768
+ />`),ws("beforesave",vo(e))}}});const xo="core/github";let Co,So;const _o=new Promise(((e,t)=>{Co=e,So=e=>{cs(e,xo),t(new Error(e))}})),To=Ur({en:{file_a_bug:"File an issue",participate:"Participate:",commit_history:"Commit history"},ko:{participate:"참여"},zh:{file_a_bug:"反馈错误",participate:"参与:"},ja:{commit_history:"変更履歴",file_a_bug:"問題報告",participate:"参加方法:"},nl:{commit_history:"Revisiehistorie",file_a_bug:"Dien een melding in",participate:"Doe mee:"},es:{commit_history:"Historia de cambios",file_a_bug:"Nota un bug",participate:"Participe:"},de:{commit_history:"Revisionen",file_a_bug:"Fehler melden",participate:"Mitmachen:"}});var Ro=Object.freeze({__proto__:null,github:_o,name:xo,run:async function(e){if(!e.hasOwnProperty("github")||!e.github)return void Co(null);if("object"==typeof e.github&&!e.github.hasOwnProperty("repoURL")){const e=ms`Config option ${"[github]"} is missing property \`repoURL\`.`;return void So(e)}const t="string"==typeof e.github?{}:e.github;let n,r=t.repoURL||String(e.github);r.endsWith("/")||(r+="/");try{n=new URL(r,"https://github.com")}catch{const e=ms`${"[github]"} configuration option is not a valid URL? (${r}).`;return void So(e)}if("https://github.com"!==n.origin){const e=ms`${"[github]"} configuration option must be HTTPS and pointing to GitHub. (${n.href}).`;return void So(e)}const[s,i]=n.pathname.split("/").filter((e=>e));if(!s||!i){const e=ms`${"[github]"} URL needs a path. For example, "w3c/my-spec".`;return void So(e)}const o=t.branch||"gh-pages",a=new URL("./issues/",n).href,c=new URL("./new/choose",a).href;let l,u;if(l="object"==typeof e.github&&e.github.hasOwnProperty("pullsURL")?e.github.pullsURL:new URL("./pulls/",n).href,l)try{const e=new URL(l);if("https://github.com"!==e.origin){const e=ms`${"[github.pullsURL]"} must be HTTPS and pointing to GitHub. (${l}).`;return void So(e)}if(!e.pathname.includes("/pulls")){const e=ms`${"[github.pullsURL]"} must point to pull requests. (${l}).`;return void So(e)}}catch{const e=ms`${"[github.pullsURL]"} is not a valid URL. (${l}).`;return void So(e)}if(u="object"==typeof e.github&&e.github.hasOwnProperty("commitHistoryURL")?e.github.commitHistoryURL:new URL(`./commits/${t.branch??""}`,n.href).href,u)try{const e=new URL(u);if("https://github.com"!==e.origin){const e=ms`${"[github.commitHistoryURL]"} must be HTTPS and pointing to GitHub. (${u}).`;return void So(e)}if(!e.pathname.includes("/commits")){const e=ms`${"[github.commitHistoryURL]"} must point to commits. (${u}).`;return void So(e)}}catch{const e=ms`${"[github.commitHistoryURL]"} is not a valid URL. (${u}).`;return void So(e)}const d={edDraftURI:`https://${s.toLowerCase()}.github.io/${i}/`,githubToken:void 0,githubUser:void 0,issueBase:a,atRiskBase:a,otherLinks:[],pullBase:l,shortName:i};let p="https://respec.org/github";if(e.githubAPI)if(new URL(e.githubAPI).hostname===window.parent.location.hostname)p=e.githubAPI;else{ls("The `githubAPI` configuration option is private and should not be added manually.",xo)}if(!e.excludeGithubLinks){const t={key:To.participate,data:[{value:`GitHub ${s}/${i}`,href:n},{value:"All issues",href:a},{value:To.file_a_bug,href:c},{value:To.commit_history,href:u},{value:"Pull requests",href:l}]};e.otherLinks||(e.otherLinks=[]),e.otherLinks.unshift(t)}const h={branch:o,repoURL:n.href,apiBase:p,fullName:`${s}/${i}`,issuesURL:a,pullsURL:l,newIssuesURL:c,commitHistoryURL:u};Co(h);const f={...d,...e,github:h,githubAPI:p};Object.assign(e,f)}});class Eo{constructor(e){this.doc=e,this.root=e.createDocumentFragment(),this.stack=[this.root],this.current=this.root}static sectionClasses=new Set(["appendix","informative","notoc"]);findPosition(e){return parseInt(e.tagName.charAt(1),10)}findParent(e){let t;for(;e>0;)if(e--,t=this.stack[e],t)return t}findHeader({firstChild:e}){for(;e;){if(/H[1-6]/.test(e.tagName))return e;e=e.nextSibling}return null}addHeader(e){const t=this.doc.createElement("section"),n=this.findPosition(e);t.appendChild(e),this.findParent(n).appendChild(t),this.stack[n]=t,this.stack.length=n+1,this.current=t,this.processHeader(e,t)}processHeader(e,t){Eo.sectionClasses.intersection(new Set(e.classList)).forEach((e=>{t.classList.add(e)}))}addSection(e){const t=this.findHeader(e),n=t?this.findPosition(t):1,r=this.findParent(n);t&&e.removeChild(t),e.appendChild(Lo(e)),t&&e.prepend(t),r.appendChild(e),this.current=r}addElement(e){this.current.appendChild(e)}}function Lo(e){const t=new Eo(e.ownerDocument);for(;e.firstChild;){const n=e.firstChild;switch(n.localName){case"h1":case"h2":case"h3":case"h4":case"h5":case"h6":t.addHeader(n);break;case"section":t.addSection(n);break;default:t.addElement(n)}}return t.root}function Ao(e){const t=Lo(e);if("section"===t.firstElementChild.localName&&"section"===e.localName){const n=t.firstElementChild;n.remove(),e.append(...n.childNodes)}else e.textContent="";e.appendChild(t)}var Po=Object.freeze({__proto__:null,name:"core/sections",restructure:Ao,run:function(){Ao(document.body)}});const No="core/data-include";function Io(e,t,n){const r=document.querySelector(`[data-include-id=${t}]`);if(!r)return;const s=Fr(e,r.dataset.oninclude,n),i="string"==typeof r.dataset.includeReplace;!function(e,t,{replace:n}){const{includeFormat:r}=e.dataset;let s=t;"markdown"===r&&(s=Fs(s)),"text"===r?e.textContent=s:e.innerHTML=s,"markdown"===r&&Ao(e),n&&e.replaceWith(...e.childNodes)}(r,s,{replace:i}),i||function(e){["data-include","data-include-format","data-include-replace","data-include-id","data-oninclude"].forEach((t=>e.removeAttribute(t)))}(r)}async function Do(e,t){const n=e.querySelectorAll("[data-include]"),r=Array.from(n).map((async e=>{const n=e.dataset.include;if(!n)return;const r=`include-${String(Math.random()).slice(2)}`;e.dataset.includeId=r;try{const s=await fetch(n);Io(await s.text(),r,n),t<3&&await Do(e,t+1)}catch(t){const r=t;cs(`\`data-include\` failed: \`${n}\` (${r.message}).`,No,{elements:[e],cause:r})}}));await Promise.all(r)}var Oo=Object.freeze({__proto__:null,name:No,run:async function(){await Do(document,1)}});var jo=Object.freeze({__proto__:null,name:"core/reindent",run:function(){for(const e of document.getElementsByTagName("pre"))e.innerHTML=gs(e.innerHTML)}});const zo="core/title",Mo=Ur({en:{default_title:"No Title"},de:{default_title:"Kein Titel"},zh:{default_title:"无标题"},cs:{default_title:"Bez názvu"},fr:{default_title:"Sans titre"}});var Uo=Object.freeze({__proto__:null,name:zo,run:function(e){const t=document.querySelector("h1#title")||ur`<h1 id="title"></h1>`;if(t.isConnected&&""===t.textContent.trim()){cs('The document is missing a title, so using a default title. To fix this, please give your document a `<title>`. If you need special markup in the document\'s title, please use a `<h1 id="title">`.',zo,{title:"Document is missing a title",elements:[t]})}t.id||(t.id="title"),t.classList.add("title"),function(e,t){t.isConnected||(t.textContent=document.title||`${Mo.default_title}`);const n=document.createElement("h1");n.innerHTML=t.innerHTML.replace(/:<br>/g,": ").replace(/<br>/g," - ");let r=Mr(n.textContent);if(e.isPreview&&e.prNumber){const n=e.prUrl||`${e.github.repoURL}pull/${e.prNumber}`,{childNodes:s}=ur`
769
769
  Preview of PR <a href="${n}">#${e.prNumber}</a>:
770
- `;t.prepend(...s),r=`Preview of PR #${e.prNumber}: ${r}`}document.title=r,e.title=r}(e,t),document.body.prepend(t)}});const Do="w3c/level",Oo=Ir({en:{level:"Level"},ja:{level:"レベル"},nl:{level:"Niveau"},de:{level:"Stufe"},zh:{level:"级别"}});var jo=Object.freeze({__proto__:null,name:Do,run:function(e){if(!e.hasOwnProperty("level"))return;const t=document.querySelector("h1#title"),n=parseInt(e.level);if(!Number.isInteger(n)||n<0){ns(`The \`level\` configuration option must be a number greater or equal to 0. It is currently set to \`${n}\``,Do,{title:"Invalid level config.",elements:[t]})}else t.append(` ${Oo.level} ${n}`),document.title=`${document.title} ${Oo.level} ${n}`,e.shortName=`${e.shortName}-${n}`,e.level=n}});const zo="w3c/abstract",Mo=Ir({en:{abstract:"Abstract"},ko:{abstract:"요약"},zh:{abstract:"摘要"},ja:{abstract:"要約"},nl:{abstract:"Samenvatting"},es:{abstract:"Resumen"},fr:{abstract:"Résumé"},de:{abstract:"Zusammenfassung"},cs:{abstract:"Abstrakt"}});var Uo=Object.freeze({__proto__:null,name:zo,run:async function(){const e=function(){const e=document.getElementById("abstract");if(e)switch(e.localName){case"section":return e;case"div":return Hr(e,"section");default:return ns("The abstract should be a `<section>` element.",zo,{elements:[e]}),e}const t=Mo.abstract.toLocaleLowerCase(r);for(const e of document.querySelectorAll("h2, h3, h4, h5, h6"))if(Nr(e.textContent).toLocaleLowerCase(r)===t)return e.closest("section");return e}();e?(e.classList.add("introductory"),e.id="abstract",e.querySelector("h2")||e.prepend(sr`<h2>${Mo.abstract}</h2>`)):ns('Document must have one `<section id="abstract">`.',zo)}});var qo=Object.freeze({__proto__:null,name:"core/data-transform",run:function(){document.querySelectorAll("[data-transform]").forEach((e=>{e.innerHTML=jr(e.innerHTML,e.dataset.transform),e.removeAttribute("data-transform")}))}});const Wo="core/dfn-abbr";function Fo(e){const t=(n=e).dataset.abbr?n.dataset.abbr:n.textContent?.match(/\b([a-z])/gi)?.join("").toUpperCase()??"";var n;const r=e.textContent.replace(/\s\s+/g," ").trim(),s=document.createElement("abbr");s.title=r,s.textContent=t,e.after(" (",s,")");const i=e.dataset.lt||"";e.dataset.lt=i.split("|").filter((e=>e.trim())).concat(t).join("|")}var Bo=Object.freeze({__proto__:null,name:Wo,run:function(){const e=document.querySelectorAll("[data-abbr]");for(const t of e){const{localName:e}=t;if("dfn"===e)Fo(t);else{ns(`\`data-abbr\` attribute not supported on \`${e}\` elements.`,Wo,{elements:[t],title:"Error: unsupported."})}}}});var Ho=String.raw`:root{--assertion-border:#aaa;--assertion-bg:#eee;--assertion-text:black}
770
+ `;t.prepend(...s),r=`Preview of PR #${e.prNumber}: ${r}`}document.title=r,e.title=r}(e,t),document.body.prepend(t)}});const qo="w3c/level",Wo=Ur({en:{level:"Level"},ja:{level:"レベル"},nl:{level:"Niveau"},de:{level:"Stufe"},zh:{level:"级别"}});var Fo=Object.freeze({__proto__:null,name:qo,run:function(e){if(!e.hasOwnProperty("level"))return;const t=document.querySelector("h1#title"),n=parseInt(e.level);if(!Number.isInteger(n)||n<0){cs(`The \`level\` configuration option must be a number greater or equal to 0. It is currently set to \`${n}\``,qo,{title:"Invalid level config.",elements:[t]})}else t.append(` ${Wo.level} ${n}`),document.title=`${document.title} ${Wo.level} ${n}`,e.shortName=`${e.shortName}-${n}`,e.level=n}});const Bo="w3c/abstract",Ho=Ur({en:{abstract:"Abstract"},ko:{abstract:"요약"},zh:{abstract:"摘要"},ja:{abstract:"要約"},nl:{abstract:"Samenvatting"},es:{abstract:"Resumen"},fr:{abstract:"Résumé"},de:{abstract:"Zusammenfassung"},cs:{abstract:"Abstrakt"}});var Go=Object.freeze({__proto__:null,name:Bo,run:async function(){const e=function(){const e=document.getElementById("abstract");if(e)switch(e.localName){case"section":return e;case"div":return Yr(e,"section");default:return cs("The abstract should be a `<section>` element.",Bo,{elements:[e]}),e}const t=Ho.abstract.toLocaleLowerCase(r);for(const e of document.querySelectorAll("h2, h3, h4, h5, h6"))if(Mr(e.textContent).toLocaleLowerCase(r)===t)return e.closest("section");return e}();e?(e.classList.add("introductory"),e.id="abstract",e.querySelector("h2")||e.prepend(ur`<h2>${Ho.abstract}</h2>`)):cs('Document must have one `<section id="abstract">`.',Bo)}});var Vo=Object.freeze({__proto__:null,name:"core/data-transform",run:function(){document.querySelectorAll("[data-transform]").forEach((e=>{e.innerHTML=Fr(e.innerHTML,e.dataset.transform),e.removeAttribute("data-transform")}))}});const Jo="core/dfn-abbr";function Ko(e){const t=(n=e).dataset.abbr?n.dataset.abbr:n.textContent?.match(/\b([a-z])/gi)?.join("").toUpperCase()??"";var n;const r=e.textContent.replace(/\s\s+/g," ").trim(),s=document.createElement("abbr");s.title=r,s.textContent=t,e.after(" (",s,")");const i=e.dataset.lt||"";e.dataset.lt=i.split("|").filter((e=>e.trim())).concat(t).join("|")}var Zo=Object.freeze({__proto__:null,name:Jo,run:function(){const e=document.querySelectorAll("[data-abbr]");for(const t of e){const{localName:e}=t;if("dfn"===e)Ko(t);else{cs(`\`data-abbr\` attribute not supported on \`${e}\` elements.`,Jo,{elements:[t],title:"Error: unsupported."})}}}});var Yo=String.raw`:root{--assertion-border:#aaa;--assertion-bg:#eee;--assertion-text:black}
771
771
  .assert{border-left:.5em solid #aaa;padding:.3em;border-color:#aaa;border-color:var(--assertion-border);background:#eee;background:var(--assertion-bg);color:#000;color:var(--assertion-text)}
772
772
  @media (prefers-color-scheme:dark){
773
773
  :root{--assertion-border:#444;--assertion-bg:var(--borderedblock-bg);--assertion-text:var(--text)}
774
- }`;var Go=Object.freeze({__proto__:null,name:"core/algorithms",run:function(){const e=Array.from(document.querySelectorAll("ol.algorithm li")).filter((e=>e.textContent.trim().startsWith("Assert: ")));if(!e.length)return;for(const t of e){t.classList.add("assert");const e=t.firstChild;e instanceof Text&&e.textContent.startsWith("Assert: ")&&(e.textContent=e.textContent.replace("Assert: ",""),t.prepend(sr`<a data-cite="INFRA#assert">Assert</a>`,": "))}const t=document.createElement("style");t.textContent=Ho,document.head.appendChild(t)}});const Vo=/^[a-z]+(\s+[a-z]+)+\??$/,Jo=/\B"([^"]*)"\B/,Ko=/^(\w+)\(([^\\)]*)\)(?:\|(\w+)(?:\((?:([^\\)]*))\))?)?$/,Zo=/\[\[(\w+(?: +\w+)*)\]\](\([^)]*\))?$/,Yo=/^((?:\[\[)?(?:\w+(?: +\w+)*)(?:\]\])?)$/,Xo=/^(?:\w+)\??$/,Qo=/^(\w+)\["([\w- ]*)"\]$/,ea=/\.?(\w+\(.*\)$)/,ta=/\/(.+)/,na=/\[\[.+\]\]/;function ra(e){const{identifier:t,renderParent:n,nullable:r}=e;if(n)return sr`<a
774
+ }`;var Xo=Object.freeze({__proto__:null,name:"core/algorithms",run:function(){const e=Array.from(document.querySelectorAll("ol.algorithm li")).filter((e=>e.textContent.trim().startsWith("Assert: ")));if(!e.length)return;for(const t of e){t.classList.add("assert");const e=t.firstChild;e instanceof Text&&e.textContent.startsWith("Assert: ")&&(e.textContent=e.textContent.replace("Assert: ",""),t.prepend(ur`<a data-cite="INFRA#assert">Assert</a>`,": "))}const t=document.createElement("style");t.textContent=Yo,document.head.appendChild(t)}});const Qo=/^[a-z]+(\s+[a-z]+)+\??$/,ea=/\B"([^"]*)"\B/,ta=/^(\w+)\(([^\\)]*)\)(?:\|(\w+)(?:\((?:([^\\)]*))\))?)?$/,na=/\[\[(\w+(?: +\w+)*)\]\](\([^)]*\))?$/,ra=/^((?:\[\[)?(?:\w+(?: +\w+)*)(?:\]\])?)$/,sa=/^(?:\w+)\??$/,ia=/^(\w+)\["([\w- ]*)"\]$/,oa=/\.?(\w+\(.*\)$)/,aa=/\/(.+)/,ca=/\[\[.+\]\]/;function la(e){const{identifier:t,renderParent:n,nullable:r}=e;if(n)return ur`<a
775
775
  data-xref-type="_IDL_"
776
776
  data-link-type="idl"
777
777
  data-lt="${t}"
778
778
  ><code>${t+(r?"?":"")}</code></a
779
- >`}function sa(e){const{identifier:t,parent:n,slotType:r,renderParent:s,args:i}=e,{identifier:o}=n||{},a="method"===r,c=i??[],l=a?sr`(${Mr(c,ia)})`:null,u=a?`(${c.join(", ")})`:"";return sr`${n&&s?".":""}<a
779
+ >`}function ua(e){const{identifier:t,parent:n,slotType:r,renderParent:s,args:i}=e,{identifier:o}=n||{},a="method"===r,c=i??[],l=a?ur`(${Hr(c,da)})`:null,u=a?`(${c.join(", ")})`:"";return ur`${n&&s?".":""}<a
780
780
  data-xref-type="${r}"
781
781
  data-link-type="${r}"
782
782
  data-link-for="${o}"
783
783
  data-xref-for="${o}"
784
784
  data-lt="${`[[${t}]]${u}`}"
785
785
  ><code>[[${t}]]${l}</code></a
786
- >`}function ia(e,t,n){if(t<n.length-1)return sr`<var>${e}</var>`;const r=e.split(/(^\.{3})(.+)/),s=r.length>1,i=s?r[2]:r[0];return sr`${s?"...":null}<var>${i}</var>`}function oa(e){const{parent:t,identifier:n,renderParent:r}=e,{identifier:s}=t||{};return sr`${r?".":""}<a
786
+ >`}function da(e,t,n){if(t<n.length-1)return ur`<var>${e}</var>`;const r=e.split(/(^\.{3})(.+)/),s=r.length>1,i=s?r[2]:r[0];return ur`${s?"...":null}<var>${i}</var>`}function pa(e){const{parent:t,identifier:n,renderParent:r}=e,{identifier:s}=t||{};return ur`${r?".":""}<a
787
787
  data-link-type="idl"
788
788
  data-xref-type="attribute|dict-member|const"
789
789
  data-link-for="${s}"
790
790
  data-xref-for="${s}"
791
791
  ><code>${n}</code></a
792
- >`}function aa(e){const{args:t,identifier:n,type:r,parent:s,renderParent:i}=e,{renderText:o,renderArgs:a}=e,{identifier:c}=s||{},l=Mr(a||t,ia),u=`${n}(${t.join(", ")})`;return sr`${s&&i?".":""}<a
792
+ >`}function ha(e){const{args:t,identifier:n,type:r,parent:s,renderParent:i}=e,{renderText:o,renderArgs:a}=e,{identifier:c}=s||{},l=Hr(a||t,da),u=`${n}(${t.join(", ")})`;return ur`${s&&i?".":""}<a
793
793
  data-link-type="idl"
794
794
  data-xref-type="${r}"
795
795
  data-link-for="${c}"
796
796
  data-xref-for="${c}"
797
797
  data-lt="${u}"
798
798
  ><code>${o||n}</code></a
799
- >${!o||a?sr`<code>(${l})</code>`:""}`}function ca(e){const{identifier:t,enumValue:n,parent:r}=e,s=r?r.identifier:t;return sr`"<a
799
+ >${!o||a?ur`<code>(${l})</code>`:""}`}function fa(e){const{identifier:t,enumValue:n,parent:r}=e,s=r?r.identifier:t;return ur`"<a
800
800
  data-link-type="idl"
801
801
  data-xref-type="enum-value"
802
802
  data-link-for="${s}"
803
803
  data-xref-for="${s}"
804
804
  data-lt="${n?null:"the-empty-string"}"
805
805
  ><code>${n}</code></a
806
- >"`}function la(e){const{identifier:t}=e;return sr`"<a
806
+ >"`}function ma(e){const{identifier:t}=e;return ur`"<a
807
807
  data-link-type="idl"
808
808
  data-cite="webidl"
809
809
  data-xref-type="exception"
810
810
  ><code>${t}</code></a
811
- >"`}function ua(e){const{identifier:t,nullable:n}=e;return sr`<a
811
+ >"`}function ga(e){const{identifier:t,nullable:n}=e;return ur`<a
812
812
  data-link-type="idl"
813
813
  data-cite="webidl"
814
814
  data-xref-type="interface"
815
815
  data-lt="${t}"
816
816
  ><code>${t+(n?"?":"")}</code></a
817
- >`}function da(e){let t;try{t=function(e){const t=na.test(e),n=t?ta:ea,[r,s]=e.split(n);if(t&&r&&!s)throw new SyntaxError(`Internal slot missing "for" part. Expected \`{{ InterfaceName/${r}}}\` }.`);const i=r.split(/[./]/).concat(s).filter((e=>e&&e.trim())).map((e=>e.trim())),o=!e.includes("/"),a=[];for(;i.length;){const t=i.pop()??"";if(Ko.test(t)){const[,e,n,r,s]=t.match(Ko),i=(n??"").split(/,\s*/).filter((e=>e)),c=r?.trim(),l=s?.split(/,\s*/).filter((e=>e));a.push({type:"method",identifier:e??"",args:i,renderParent:o,renderText:c,renderArgs:l})}else if(Qo.test(t)){const[,e,n]=t.match(Qo);a.push({type:"enum",identifier:e??"",enumValue:n??"",renderParent:o})}else if(Jo.test(t)){const[,e]=t.match(Jo);o?a.push({type:"exception",identifier:e??""}):a.push({type:"enum",enumValue:e??"",renderParent:o})}else if(Zo.test(t)){const[,e,n]=t.match(Zo),r=n?"method":"attribute",s=n?.slice(1,-1).split(/,\s*/).filter((e=>e))??[];a.push({type:"internal-slot",slotType:r,identifier:e??"",args:s,renderParent:o})}else if(Yo.test(t)&&i.length){const[,e]=t.match(Yo);a.push({type:"attribute",identifier:e??"",renderParent:o})}else if(Vo.test(t)){const e=t.endsWith("?"),n=e?t.slice(0,-1):t;a.push({type:"idl-primitive",identifier:n,renderParent:o,nullable:e})}else{if(!Xo.test(t)||0!==i.length)throw new SyntaxError(`IDL micro-syntax parsing error in \`{{ ${e} }}\``);{const e=t.endsWith("?"),n=e?t.slice(0,-1):t;a.push({type:"base",identifier:n,renderParent:o,nullable:e})}}}return a.forEach(((e,t,n)=>{e.parent=n[t+1]||null})),a.reverse()}(e)}catch(t){const n=sr`<span>{{ ${e} }}</span>`,r="Error: Invalid inline IDL string.";return ns(t.message,"core/inlines",{title:r,elements:[n]}),n}const n=sr(document.createDocumentFragment()),r=[];for(const e of t)switch(e.type){case"base":{const t=ra(e);t&&r.push(t);break}case"attribute":r.push(oa(e));break;case"internal-slot":r.push(sa(e));break;case"method":r.push(aa(e));break;case"enum":r.push(ca(e));break;case"exception":r.push(la(e));break;case"idl-primitive":r.push(ua(e));break;default:throw new Error("Unknown type.")}return n`${r}`}const pa=new Set(["alias","reference"]),ha=async function(){const e=await ir.openDB("respec-biblio2",12,{upgrade(e){Array.from(e.objectStoreNames).map((t=>e.deleteObjectStore(t)));e.createObjectStore("alias",{keyPath:"id"}).createIndex("aliasOf","aliasOf",{unique:!1}),e.createObjectStore("reference",{keyPath:"id"})}}),t=Date.now();for(const n of[...pa]){const r=e.transaction(n,"readwrite").store,s=IDBKeyRange.lowerBound(t);let i=await r.openCursor(s);for(;i?.value;){const e=i.value;(void 0===e.expires||e.expires<t)&&await r.delete(e.id),i=await i.continue()}}return e}();const fa={get ready(){return ha},async find(e){return await this.isAlias(e)&&(e=await this.resolveAlias(e)??e),await this.get("reference",e)},async has(e,t){if(!pa.has(e))throw new TypeError(`Invalid type: ${e}`);if(!t)throw new TypeError("id is required");const n=(await this.ready).transaction(e,"readonly").store,r=IDBKeyRange.only(t);return!!await n.openCursor(r)},async isAlias(e){return await this.has("alias",e)},async resolveAlias(e){if(!e)throw new TypeError("id is required");const t=(await this.ready).transaction("alias","readonly").store,n=IDBKeyRange.only(e),r=await t.openCursor(n);return r?r.value.aliasOf:null},async get(e,t){if(!pa.has(e))throw new TypeError(`Invalid type: ${e}`);if(!t)throw new TypeError("id is required");const n=(await this.ready).transaction(e,"readonly").store,r=IDBKeyRange.only(t),s=await n.openCursor(r);return s?s.value:null},async addAll(e,t){if(!e)return;const n={alias:[],reference:[]};for(const r of Object.keys(e)){const s={id:r,...e[r],expires:t};s.aliasOf?n.alias.push(s):n.reference.push(s)}const r=[...pa].flatMap((e=>n[e].map((t=>this.add(e,t)))));await Promise.all(r)},async add(e,t){if(!pa.has(e))throw new TypeError(`Invalid type: ${e}`);if("object"!=typeof t)throw new TypeError("details should be an object");if("alias"===e&&!t.hasOwnProperty("aliasOf"))throw new TypeError("Invalid alias object.");const n=await this.ready;let r=await this.has(e,t.id);if(r){const s=await this.get(e,t.id);if(s&&void 0!==s.expires&&s.expires<Date.now()){const{store:s}=n.transaction(e,"readwrite");await s.delete(t.id),r=!1}}const{store:s}=n.transaction(e,"readwrite");return r?await s.put(t):await s.add(t)},async close(){(await this.ready).close()},async clear(){const e=await this.ready,t=[...pa],n=e.transaction(t,"readwrite"),r=t.map((e=>n.objectStore(e).clear()));await Promise.all(r)}},ma={},ga=new URL("https://api.specref.org/bibrefs?refs="),ba=Sr({hint:"dns-prefetch",href:ga.origin});let ya;document.head.appendChild(ba);const wa=new Promise((e=>{ya=e}));async function va(e,t={forceUpdate:!1}){const n=[...new Set(e)].filter((e=>e.trim()));if(!n.length||!1===navigator.onLine)return null;let r;try{r=await fetch(ga.href+n.join(","))}catch(e){return console.error(e),null}if(!t.forceUpdate&&!r.ok||200!==r.status)return null;const s=await r.json(),i=Date.now()+36e5;try{const e=Date.parse(r.headers.get("Expires")||""),t=Number.isNaN(e)?i:Math.min(e,i);await fa.addAll(s,t)}catch(e){console.error(e)}return s}async function ka(e){const t=await wa;if(!t.hasOwnProperty(e))return null;const n=t[e];return n.aliasOf?await ka(n.aliasOf):n}var $a=Object.freeze({__proto__:null,Plugin:class{constructor(e){this.conf=e}normalizeReferences(){const e=new Set([...this.conf.normativeReferences].map((e=>e.toLowerCase())));Array.from(this.conf.informativeReferences).filter((t=>e.has(t.toLowerCase()))).forEach((e=>this.conf.informativeReferences.delete(e)))}getRefKeys(){return{informativeReferences:Array.from(this.conf.informativeReferences),normativeReferences:Array.from(this.conf.normativeReferences)}}async run(){this.conf.localBiblio||(this.conf.localBiblio={}),this.conf.biblio=ma;const e=Object.keys(this.conf.localBiblio).filter((e=>this.conf.localBiblio?.[e]?.hasOwnProperty("aliasOf"))).map((e=>this.conf.localBiblio?.[e]?.aliasOf)).filter((e=>e&&!this.conf.localBiblio?.hasOwnProperty(e)));this.normalizeReferences();const t=this.getRefKeys(),n=Array.from(new Set(t.normativeReferences.concat(t.informativeReferences).filter((e=>!this.conf.localBiblio?.hasOwnProperty(e))).concat(e.filter(Boolean)).sort())),r=n.length?await async function(e){const t=[];try{await fa.ready;const n=e.map((async e=>({id:e,data:await fa.find(e)})));t.push(...await Promise.all(n))}catch(n){t.push(...e.map((e=>({id:e,data:null})))),console.warn(n)}return t}(n):[],s={hasData:[],noData:[]};r.forEach((e=>{(e.data?s.hasData:s.noData).push(e)})),s.hasData.forEach((e=>{e.data&&(ma[e.id]=e.data)}));const i=s.noData.map((e=>e.id));if(i.length){const e=await va(i,{forceUpdate:!0});Object.assign(ma,e)}Object.assign(ma,this.conf.localBiblio),(()=>{ya(this.conf.biblio)})()}},biblio:ma,name:"core/biblio",resolveRef:ka,updateFromNetwork:va});const xa="core/render-biblio";function Ca(e){return`bib-${Wr(e)}`}const Sa=Ir({en:{info_references:"Informative references",norm_references:"Normative references",references:"References",reference_not_found:"Reference not found."},ko:{references:"참조"},nl:{info_references:"Informatieve referenties",norm_references:"Normatieve referenties",references:"Referenties"},es:{info_references:"Referencias informativas",norm_references:"Referencias normativas",references:"Referencias",reference_not_found:"Referencia no encontrada."},ja:{info_references:"参照用参考文献",norm_references:"規範的参考文献",references:"参考文献"},de:{info_references:"Weiterführende Informationen",norm_references:"Normen und Spezifikationen",references:"Referenzen"},zh:{info_references:"非规范性引用",norm_references:"规范性引用",references:"参考文献"},cs:{info_references:"Informativní odkazy",norm_references:"Normativní odkazy",references:"Odkazy",reference_not_found:"Odkaz nebyl nalezen."}}),_a=new Map([["CR","W3C Candidate Recommendation"],["ED","W3C Editor's Draft"],["LCWD","W3C Last Call Working Draft"],["NOTE","W3C Working Group Note"],["PR","W3C Proposed Recommendation"],["REC","W3C Recommendation"],["WD","W3C Working Draft"]]),Ta=(Ra=".",e=>{const t=e.trim();return!t||t.endsWith(Ra)?t:t+Ra});var Ra;function Ea(e,t){const{goodRefs:n,badRefs:r}=function(e){const t=[],n=[];for(const r of e)r.refcontent?t.push(r):n.push(r);return{goodRefs:t,badRefs:n}}(e.map(La)),s=function(e){const t=new Map;for(const n of e)t.has(n.refcontent?.id??"")||t.set(n.refcontent?.id??"",n);return[...t.values()]}(n),i=s.concat(r).sort(((e,t)=>e.ref.toLocaleLowerCase().localeCompare(t.ref.toLocaleLowerCase()))),o=sr`<section>
817
+ >`}function ba(e){let t;try{t=function(e){const t=ca.test(e),n=t?aa:oa,[r,s]=e.split(n);if(t&&r&&!s)throw new SyntaxError(`Internal slot missing "for" part. Expected \`{{ InterfaceName/${r}}}\` }.`);const i=r.split(/[./]/).concat(s).filter((e=>e&&e.trim())).map((e=>e.trim())),o=!e.includes("/"),a=[];for(;i.length;){const t=i.pop()??"";if(ta.test(t)){const[,e,n,r,s]=t.match(ta),i=(n??"").split(/,\s*/).filter((e=>e)),c=r?.trim(),l=s?.split(/,\s*/).filter((e=>e));a.push({type:"method",identifier:e??"",args:i,renderParent:o,renderText:c,renderArgs:l})}else if(ia.test(t)){const[,e,n]=t.match(ia);a.push({type:"enum",identifier:e??"",enumValue:n??"",renderParent:o})}else if(ea.test(t)){const[,e]=t.match(ea);o?a.push({type:"exception",identifier:e??""}):a.push({type:"enum",enumValue:e??"",renderParent:o})}else if(na.test(t)){const[,e,n]=t.match(na),r=n?"method":"attribute",s=n?.slice(1,-1).split(/,\s*/).filter((e=>e))??[];a.push({type:"internal-slot",slotType:r,identifier:e??"",args:s,renderParent:o})}else if(ra.test(t)&&i.length){const[,e]=t.match(ra);a.push({type:"attribute",identifier:e??"",renderParent:o})}else if(Qo.test(t)){const e=t.endsWith("?"),n=e?t.slice(0,-1):t;a.push({type:"idl-primitive",identifier:n,renderParent:o,nullable:e})}else{if(!sa.test(t)||0!==i.length)throw new SyntaxError(`IDL micro-syntax parsing error in \`{{ ${e} }}\``);{const e=t.endsWith("?"),n=e?t.slice(0,-1):t;a.push({type:"base",identifier:n,renderParent:o,nullable:e})}}}return a.forEach(((e,t,n)=>{e.parent=n[t+1]||null})),a.reverse()}(e)}catch(t){const n=ur`<span>{{ ${e} }}</span>`,r="Error: Invalid inline IDL string.";return cs(t.message,"core/inlines",{title:r,elements:[n]}),n}const n=ur(document.createDocumentFragment()),r=[];for(const e of t)switch(e.type){case"base":{const t=la(e);t&&r.push(t);break}case"attribute":r.push(pa(e));break;case"internal-slot":r.push(ua(e));break;case"method":r.push(ha(e));break;case"enum":r.push(fa(e));break;case"exception":r.push(ma(e));break;case"idl-primitive":r.push(ga(e));break;default:throw new Error("Unknown type.")}return n`${r}`}const ya=new Set(["alias","reference"]),wa=async function(){const e=await dr.openDB("respec-biblio2",12,{upgrade(e){Array.from(e.objectStoreNames).map((t=>e.deleteObjectStore(t)));e.createObjectStore("alias",{keyPath:"id"}).createIndex("aliasOf","aliasOf",{unique:!1}),e.createObjectStore("reference",{keyPath:"id"})}}),t=Date.now();for(const n of[...ya]){const r=e.transaction(n,"readwrite").store,s=IDBKeyRange.lowerBound(t);let i=await r.openCursor(s);for(;i?.value;){const e=i.value;(void 0===e.expires||e.expires<t)&&await r.delete(e.id),i=await i.continue()}}return e}();const va={get ready(){return wa},async find(e){return await this.isAlias(e)&&(e=await this.resolveAlias(e)??e),await this.get("reference",e)},async has(e,t){if(!ya.has(e))throw new TypeError(`Invalid type: ${e}`);if(!t)throw new TypeError("id is required");const n=(await this.ready).transaction(e,"readonly").store,r=IDBKeyRange.only(t);return!!await n.openCursor(r)},async isAlias(e){return await this.has("alias",e)},async resolveAlias(e){if(!e)throw new TypeError("id is required");const t=(await this.ready).transaction("alias","readonly").store,n=IDBKeyRange.only(e),r=await t.openCursor(n);return r?r.value.aliasOf:null},async get(e,t){if(!ya.has(e))throw new TypeError(`Invalid type: ${e}`);if(!t)throw new TypeError("id is required");const n=(await this.ready).transaction(e,"readonly").store,r=IDBKeyRange.only(t),s=await n.openCursor(r);return s?s.value:null},async addAll(e,t){if(!e)return;const n={alias:[],reference:[]};for(const r of Object.keys(e)){const s={id:r,...e[r],expires:t};s.aliasOf?n.alias.push(s):n.reference.push(s)}const r=[...ya].flatMap((e=>n[e].map((t=>this.add(e,t)))));await Promise.all(r)},async add(e,t){if(!ya.has(e))throw new TypeError(`Invalid type: ${e}`);if("object"!=typeof t)throw new TypeError("details should be an object");if("alias"===e&&!t.hasOwnProperty("aliasOf"))throw new TypeError("Invalid alias object.");const n=await this.ready;let r=await this.has(e,t.id);if(r){const s=await this.get(e,t.id);if(s&&void 0!==s.expires&&s.expires<Date.now()){const{store:s}=n.transaction(e,"readwrite");await s.delete(t.id),r=!1}}const{store:s}=n.transaction(e,"readwrite");return r?await s.put(t):await s.add(t)},async close(){(await this.ready).close()},async clear(){const e=await this.ready,t=[...ya],n=e.transaction(t,"readwrite"),r=t.map((e=>n.objectStore(e).clear()));await Promise.all(r)}},ka={},$a=new URL("https://api.specref.org/bibrefs?refs="),xa=Ar({hint:"dns-prefetch",href:$a.origin});let Ca;document.head.appendChild(xa);const Sa=new Promise((e=>{Ca=e}));async function _a(e,t={forceUpdate:!1}){const n=[...new Set(e)].filter((e=>e.trim()));if(!n.length||!1===navigator.onLine)return null;let r;try{r=await fetch($a.href+n.join(","))}catch(e){return console.error(e),null}if(!t.forceUpdate&&!r.ok||200!==r.status)return null;const s=await r.json(),i=Date.now()+36e5;try{const e=Date.parse(r.headers.get("Expires")||""),t=Number.isNaN(e)?i:Math.min(e,i);await va.addAll(s,t)}catch(e){console.error(e)}return s}async function Ta(e){const t=await Sa;if(!t.hasOwnProperty(e))return null;const n=t[e];return n.aliasOf?await Ta(n.aliasOf):n}var Ra=Object.freeze({__proto__:null,Plugin:class{constructor(e){this.conf=e}normalizeReferences(){const e=new Set([...this.conf.normativeReferences].map((e=>e.toLowerCase())));Array.from(this.conf.informativeReferences).filter((t=>e.has(t.toLowerCase()))).forEach((e=>this.conf.informativeReferences.delete(e)))}getRefKeys(){return{informativeReferences:Array.from(this.conf.informativeReferences),normativeReferences:Array.from(this.conf.normativeReferences)}}async run(){this.conf.localBiblio||(this.conf.localBiblio={}),this.conf.biblio=ka;const e=Object.keys(this.conf.localBiblio).filter((e=>this.conf.localBiblio?.[e]?.hasOwnProperty("aliasOf"))).map((e=>this.conf.localBiblio?.[e]?.aliasOf)).filter((e=>e&&!this.conf.localBiblio?.hasOwnProperty(e)));this.normalizeReferences();const t=this.getRefKeys(),n=Array.from(new Set(t.normativeReferences.concat(t.informativeReferences).filter((e=>!this.conf.localBiblio?.hasOwnProperty(e))).concat(e.filter(Boolean)).sort())),r=n.length?await async function(e){const t=[];try{await va.ready;const n=e.map((async e=>({id:e,data:await va.find(e)})));t.push(...await Promise.all(n))}catch(n){t.push(...e.map((e=>({id:e,data:null})))),console.warn(n)}return t}(n):[],s={hasData:[],noData:[]};r.forEach((e=>{(e.data?s.hasData:s.noData).push(e)})),s.hasData.forEach((e=>{e.data&&(ka[e.id]=e.data)}));const i=s.noData.map((e=>e.id));if(i.length){const e=await _a(i,{forceUpdate:!0});Object.assign(ka,e)}Object.assign(ka,this.conf.localBiblio),(()=>{Ca(this.conf.biblio)})()}},biblio:ka,name:"core/biblio",resolveRef:Ta,updateFromNetwork:_a});const Ea="core/render-biblio";function La(e){return`bib-${Jr(e)}`}const Aa=Ur({en:{info_references:"Informative references",norm_references:"Normative references",references:"References",reference_not_found:"Reference not found."},ko:{references:"참조"},nl:{info_references:"Informatieve referenties",norm_references:"Normatieve referenties",references:"Referenties"},es:{info_references:"Referencias informativas",norm_references:"Referencias normativas",references:"Referencias",reference_not_found:"Referencia no encontrada."},fr:{info_references:"Références informatives",norm_references:"Références normatives",references:"Références",reference_not_found:"Référence non trouvée."},ja:{info_references:"参照用参考文献",norm_references:"規範的参考文献",references:"参考文献"},de:{info_references:"Weiterführende Informationen",norm_references:"Normen und Spezifikationen",references:"Referenzen"},zh:{info_references:"非规范性引用",norm_references:"规范性引用",references:"参考文献"},cs:{info_references:"Informativní odkazy",norm_references:"Normativní odkazy",references:"Odkazy",reference_not_found:"Odkaz nebyl nalezen."}}),Pa=new Map([["CR","W3C Candidate Recommendation"],["ED","W3C Editor's Draft"],["LCWD","W3C Last Call Working Draft"],["NOTE","W3C Working Group Note"],["PR","W3C Proposed Recommendation"],["REC","W3C Recommendation"],["WD","W3C Working Draft"]]);function Na(e,t){const{goodRefs:n,badRefs:r}=function(e){const t=[],n=[];for(const r of e)r.refcontent?t.push(r):n.push(r);return{goodRefs:t,badRefs:n}}(e.map(Ia)),s=function(e){const t=new Map;for(const n of e)t.has(n.refcontent?.id??"")||t.set(n.refcontent?.id??"",n);return[...t.values()]}(n),i=s.concat(r).sort(((e,t)=>e.ref.toLocaleLowerCase().localeCompare(t.ref.toLocaleLowerCase()))),o=ur`<section>
818
818
  <h3>${t}</h3>
819
- <dl class="bibliography">${i.map(Pa)}</dl>
820
- </section>`;Fr(o,"",t);const a=function(e){const t=new Map;for(const n of e){const e=n.refcontent?.id??"",r=t.has(e)?t.get(e):t.set(e,[]).get(e);r?.push(n.ref)}return t}(n);return function(e,t){e.map((({ref:e,refcontent:n})=>{const r=`#${Ca(e)}`,s=(t.get(n.id??"")??[]).map((e=>`a.bibref[href="#${Ca(e)}"]`)).join(",");return{refUrl:r,elems:document.querySelectorAll(s),refcontent:n}})).forEach((({refUrl:e,elems:t,refcontent:n})=>{t.forEach((t=>{t.setAttribute("href",e),t.setAttribute("title",n.title),t.dataset.linkType="biblio"}))}))}(s,a),function(e){for(const{ref:t}of e){const e=[...document.querySelectorAll(`a.bibref[href="#${Ca(t)}"]`)].filter((({textContent:e})=>e.toLowerCase()===t.toLowerCase()));ns(`Reference "[${t}]" not found.`,xa,{hint:`Search for ["${t}"](https://www.specref.org?q=${t}) on Specref to see if it exists or if it's misspelled.`,elements:e})}}(r),o}function La(e){let t=ma[e],n=e;const r=new Set([n]);for(;t&&t.aliasOf;)if(r.has(t.aliasOf)){t=null;ns(`Circular reference in biblio DB between [\`${e}\`] and [\`${n}\`].`,xa)}else n=t.aliasOf,t=ma[n],r.add(n);return t&&!t.id&&(t.id=e.toLowerCase()),{ref:e,refcontent:t}}function Aa(e,t){const n=e.replace(/^(!|\?)/,""),r=`#${Ca(n)}`,s=sr`<cite
819
+ <dl class="bibliography">${i.map(Oa)}</dl>
820
+ </section>`;Kr(o,"",t);const a=function(e){const t=new Map;for(const n of e){const e=n.refcontent?.id??"",r=t.has(e)?t.get(e):t.set(e,[]).get(e);r?.push(n.ref)}return t}(n);return function(e,t){e.map((({ref:e,refcontent:n})=>{const r=`#${La(e)}`,s=(t.get(n.id??"")??[]).map((e=>`a.bibref[href="#${La(e)}"]`)).join(",");return{refUrl:r,elems:document.querySelectorAll(s),refcontent:n}})).forEach((({refUrl:e,elems:t,refcontent:n})=>{t.forEach((t=>{t.setAttribute("href",e),t.setAttribute("title",n.title),t.dataset.linkType="biblio"}))}))}(s,a),function(e){for(const{ref:t}of e){const e=[...document.querySelectorAll(`a.bibref[href="#${La(t)}"]`)].filter((({textContent:e})=>e.toLowerCase()===t.toLowerCase()));cs(`Reference "[${t}]" not found.`,Ea,{hint:`Search for ["${t}"](https://www.specref.org?q=${t}) on Specref to see if it exists or if it's misspelled.`,elements:e})}}(r),o}function Ia(e){let t=ka[e],n=e;const r=new Set([n]);for(;t&&t.aliasOf;)if(r.has(t.aliasOf)){t=null;cs(`Circular reference in biblio DB between [\`${e}\`] and [\`${n}\`].`,Ea)}else n=t.aliasOf,t=ka[n],r.add(n);return t&&!t.id&&(t.id=e.toLowerCase()),{ref:e,refcontent:t}}function Da(e,t){const n=e.replace(/^(!|\?)/,""),r=`#${La(n)}`,s=ur`<cite
821
821
  ><a class="bibref" href="${r}" data-link-type="biblio">${t||n}</a></cite
822
- >`;return t?s:sr`[${s}]`}function Pa(e){const{ref:t,refcontent:n}=e,r=Ca(t);return sr`
822
+ >`;return t?s:ur`[${s}]`}function Oa(e){const{ref:t,refcontent:n}=e,r=La(t);return ur`
823
823
  <dt id="${r}">[${t}]</dt>
824
824
  <dd>
825
- ${n?{html:Na(n)}:sr`<em class="respec-offending-element"
826
- >${Sa.reference_not_found}</em
827
- >`}
825
+ ${n?{html:ja(n)}:ur`<em class="respec-offending-element"
826
+ >${Aa.reference_not_found}</em
827
+ >`}
828
828
  </dd>
829
- `}function Na(e){if("string"==typeof e)return e;let t=`<cite>${e.title}</cite>`;if(t=e.href?`<a href="${e.href}">${t}</a>. `:`${t}. `,e.authors){if(!Array.isArray(e.authors)){const t=`The "authors" field in reference "${e.id||e.title}" must be an array.`,n=`Use \`authors: [${JSON.stringify(e.authors)}]\` instead of \`authors: ${JSON.stringify(e.authors)}\`.`;ns(t,xa,{hint:n}),e.authors=[e.authors]}e.authors.length&&(t+=e.authors.join("; "),e.etAl&&(t+=" et al"),t.endsWith(".")||(t+=". "))}return e.publisher&&(t=`${t} ${Ta(e.publisher)} `),e.date&&(t+=`${e.date}. `),e.status&&(t+=`${_a.get(e.status)||e.status}. `),e.href&&(t+=`URL: <a href="${e.href}">${e.href}</a>`),t}var Ia=Object.freeze({__proto__:null,name:xa,renderInlineCitation:Aa,run:function(e){const t=Array.from(e.informativeReferences),n=Array.from(e.normativeReferences);if(!t.length&&!n.length)return;const r=document.querySelector("section#references")||sr`<section id="references"></section>`;if(document.querySelector("section#references > :is(h2, h1)")||r.prepend(sr`<h1>${Sa.references}</h1>`),r.classList.add("appendix"),n.length){const e=Ea(n,Sa.norm_references);r.appendChild(e)}if(t.length){const e=Ea(t,Sa.info_references);r.appendChild(e)}document.body.appendChild(r)}});const Da="core/inlines",Oa={},ja=e=>new RegExp(e.map((e=>e.source)).join("|")),za=Ir({en:{rfc2119Keywords:()=>ja([/\bMUST(?:\s+NOT)?\b/,/\bSHOULD(?:\s+NOT)?\b/,/\bSHALL(?:\s+NOT)?\b/,/\bMAY\b/,/\b(?:NOT\s+)?REQUIRED\b/,/\b(?:NOT\s+)?RECOMMENDED\b/,/\bOPTIONAL\b/])},de:{rfc2119Keywords:()=>ja([/\bMUSS\b/,/\bMÜSSEN\b/,/\bERFORDERLICH\b/,/\b(?:NICHT\s+)?NÖTIG\b/,/\bDARF(?:\s+NICHT)?\b/,/\bDÜRFEN(?:\s+NICHT)?\b/,/\bVERBOTEN\b/,/\bSOLL(?:\s+NICHT)?\b/,/\bSOLLEN(?:\s+NICHT)?\b/,/\b(?:NICHT\s+)?EMPFOHLEN\b/,/\bKANN\b/,/\bKÖNNEN\b/,/\bOPTIONAL\b/])}}),Ma=/(?:`[^`]+`)(?!`)/,Ua=/(?:{{[^}]+\?*}})/,qa=/\B\|\w[\w\s]*(?:\s*:[\w\s&;"?<>]+\??)?\|\B/,Wa=/(?:\[\[(?:!|\\|\?)?[\w.-]+(?:|[^\]]+)?\]\])/,Fa=/(?:\[\[\[[^\]]+\]\]\])/,Ba=/(?:\[=[^=]+=\])/,Ha=/(?:\[\^[^^]+\^\])/,Ga=/(?:\{\^[^}^]+\^\})/;function Va(e){const t=e.slice(2,-2).trim(),[n,r,s]=t.split("/",3).map((e=>e&&e.trim())).filter((e=>!!e)),[i,o,a]=t.startsWith("/")?["element-attr",null,n]:s?["attr-value",`${n}/${r}`,s]:r?["element-attr",n,r]:["element",null,n];return sr`<code
829
+ `}function ja(e){if("string"==typeof e)return e;let t=`<cite>${e.title}</cite>`;if(t=e.href?`<a href="${e.href}">${t}</a>. `:`${t}. `,e.authors){if(!Array.isArray(e.authors)){const t=`The "authors" field in reference "${e.id||e.title}" must be an array.`,n=`Use \`authors: [${JSON.stringify(e.authors)}]\` instead of \`authors: ${JSON.stringify(e.authors)}\`.`;cs(t,Ea,{hint:n}),e.authors=[e.authors]}e.authors.length&&(t+=e.authors.join("; "),e.etAl&&(t+=" et al"),t.endsWith(".")||(t+=". "))}if(e.publisher){const n=e.pages?",":".",r=e.publisher.trim();t=`${t} ${r.endsWith(".")?r.slice(0,-1):r}${n} `}return e.pages&&(t+=`pp. ${zr(e.pages)}. `),e.date&&(t+=`${e.date}. `),e.status&&(t+=`${Pa.get(e.status)||e.status}. `),e.href&&(t+=`URL: <a href="${e.href}">${e.href}</a>`),t}var za=Object.freeze({__proto__:null,name:Ea,renderInlineCitation:Da,run:function(e){const t=Array.from(e.informativeReferences),n=Array.from(e.normativeReferences);if(!t.length&&!n.length)return;const r=document.querySelector("section#references")||ur`<section id="references"></section>`;if(document.querySelector("section#references > :is(h2, h1)")||r.prepend(ur`<h1>${Aa.references}</h1>`),r.classList.add("appendix"),n.length){const e=Na(n,Aa.norm_references);r.appendChild(e)}if(t.length){const e=Na(t,Aa.info_references);r.appendChild(e)}document.body.appendChild(r)}});const Ma="core/inlines",Ua={},qa=e=>new RegExp(e.map((e=>e.source)).join("|")),Wa=Ur({en:{rfc2119Keywords:()=>qa([/\bMUST(?:\s+NOT)?\b/,/\bSHOULD(?:\s+NOT)?\b/,/\bSHALL(?:\s+NOT)?\b/,/\bMAY\b/,/\b(?:NOT\s+)?REQUIRED\b/,/\b(?:NOT\s+)?RECOMMENDED\b/,/\bOPTIONAL\b/])},de:{rfc2119Keywords:()=>qa([/\bMUSS\b/,/\bMÜSSEN\b/,/\bERFORDERLICH\b/,/\b(?:NICHT\s+)?NÖTIG\b/,/\bDARF(?:\s+NICHT)?\b/,/\bDÜRFEN(?:\s+NICHT)?\b/,/\bVERBOTEN\b/,/\bSOLL(?:\s+NICHT)?\b/,/\bSOLLEN(?:\s+NICHT)?\b/,/\b(?:NICHT\s+)?EMPFOHLEN\b/,/\bKANN\b/,/\bKÖNNEN\b/,/\bOPTIONAL\b/])}}),Fa=/(?:`[^`]+`)(?!`)/,Ba=/(?:{{[^}]+\?*}})/,Ha=/\B\|\w[\w\s]*(?:\s*:[\w\s&;"?<>]+\??)?\|\B/,Ga=/(?:\[\[(?:!|\\|\?)?[\w.-]+(?:|[^\]]+)?\]\])/,Va=/(?:\[\[\[[^\]]+\]\]\])/,Ja=/(?:\[=[^=]+=\])/,Ka=/(?:\[\^[^^]+\^\])/,Za=/(?:\{\^[^}^]+\^\})/;function Ya(e){const t=e.slice(2,-2).trim(),[n,r,s]=t.split("/",3).map((e=>e&&e.trim())).filter((e=>!!e)),[i,o,a]=t.startsWith("/")?["element-attr",null,n]:s?["attr-value",`${n}/${r}`,s]:r?["element-attr",n,r]:["element",null,n];return ur`<code
830
830
  ><a
831
831
  data-xref-type="${i}"
832
832
  data-xref-for="${o}"
@@ -834,11 +834,11 @@ body:has(input[name=color-scheme][value=dark]:checked){color-scheme:dark}`;const
834
834
  data-link-for="${o}"
835
835
  >${a}</a
836
836
  ></code
837
- >`}function Ja(e){const t=(e.slice(2,-2).trim().match(/"([^"]*)"|([^/]+)/g)||[]).map((e=>e.trim()));if(1===t.length){const e=t[0];return sr`<code
837
+ >`}function Xa(e){const t=(e.slice(2,-2).trim().match(/"([^"]*)"|([^/]+)/g)||[]).map((e=>e.trim()));if(1===t.length){const e=t[0];return ur`<code
838
838
  ><a data-link-type="cddl-type" data-xref-type="cddl-type"
839
839
  >${e}</a
840
840
  ></code
841
- >`}const n=t[0],r=t[1],s=r.startsWith('"')&&r.endsWith('"')?"cddl-value":"cddl-key";return sr`<code
841
+ >`}const n=t[0],r=t[1],s=r.startsWith('"')&&r.endsWith('"')?"cddl-value":"cddl-key";return ur`<code
842
842
  ><a
843
843
  data-link-type="${s}"
844
844
  data-xref-type="${s}"
@@ -846,66 +846,66 @@ body:has(input[name=color-scheme][value=dark]:checked){color-scheme:dark}`;const
846
846
  data-link-for="${n}"
847
847
  >${r}</a
848
848
  ></code
849
- >`}function Ka(e){const t=Nr(e),n=sr`<em class="rfc2119">${t}</em>`;return Oa[t]=!0,n}const Za=/^(?:!|\\|\?)?(?:#[\w-.]+|[\w-.]+(?:#[\w-.]+)?)(?:\|[^\]]+)?$/;function Ya(e){const t=e.slice(3,-3).trim();if(!Za.test(t)){return rs(`Bad syntax: \`${e}\` is not a valid inline expansion.`,Da,{hint:"See https://github.com/speced/respec/wiki/inlines for valid syntax."}),e}const n=t.indexOf("|"),r=-1!==n?t.slice(n+1).trim():null,s=-1!==n?t.slice(0,n).trim():t,i=s.replace(/^[!?\\]/,"");if(s.startsWith("\\"))return`[[[${i}]]]`;if(i.startsWith("#"))return r?sr`<a href="${i}" data-matched-text="${e}"
850
- >${r}</a
851
- >`:sr`<a href="${i}" data-matched-text="${e}"></a>`;if(i.includes("#")){const[t,n]=i.split("#"),o=s.slice(0,s.length-i.length)+t;return sr`<a
849
+ >`}function Qa(e){const t=Mr(e),n=ur`<em class="rfc2119">${t}</em>`;return Ua[t]=!0,n}const ec=/^(?:!|\\|\?)?(?:#[\w-.]+|[\w-.]+(?:#[\w-.]+)?)(?:\|[^\]]+)?$/;function tc(e){const t=e.slice(3,-3).trim();if(!ec.test(t)){return ls(`Bad syntax: \`${e}\` is not a valid inline expansion.`,Ma,{hint:"See https://github.com/speced/respec/wiki/inlines for valid syntax."}),e}const n=t.indexOf("|"),r=-1!==n?t.slice(n+1).trim():null,s=-1!==n?t.slice(0,n).trim():t,i=s.replace(/^[!?\\]/,"");if(s.startsWith("\\"))return`[[[${i}]]]`;if(i.startsWith("#"))return r?ur`<a href="${i}" data-matched-text="${e}"
850
+ >${cc(r)}</a
851
+ >`:ur`<a href="${i}" data-matched-text="${e}"></a>`;if(i.includes("#")){const[t,n]=i.split("#"),o=s.slice(0,s.length-i.length)+t;return ur`<a
852
852
  data-cite="${o}"
853
853
  data-cite-frag="${n}"
854
854
  data-matched-text="${e}"
855
855
  data-lt="${r||null}"
856
- ></a>`}return sr`<a
856
+ ></a>`}return ur`<a
857
857
  data-cite="${s}"
858
858
  data-matched-text="${e}"
859
859
  data-lt="${r||null}"
860
- ></a>`}function Xa(e,t){const n=Nr(e.slice(2,-2));if(n.startsWith("\\"))return e.replace(/^(\{\{\s*)\\/,"$1");const r=da(n);return!!t.parentElement?.closest("dfn,a")?rc(`\`${r.textContent}\``):r}function Qa(e,t,n){const r=e.slice(2,-2);if(r.startsWith("\\"))return[`[[${r.slice(1)}]]`];const[s,i]=r.split("|").map(Nr),{type:o,illegal:a}=Gr(s,t.parentElement),c=Aa(s,i),l=s.replace(/^(!|\?)/,"");if(a&&!n.normativeReferences.has(l)){const e=c.childNodes[1]||c;rs("Normative references in informative sections are not allowed. ",Da,{elements:[e],hint:`Remove '!' from the start of the reference \`[[${r}]]\``})}return"informative"!==o||a?n.normativeReferences.add(l):n.informativeReferences.add(l),c.childNodes[1]?c.childNodes:[c]}function ec(e,t,n){return"ABBR"===t.parentElement?.tagName?e:sr`<abbr title="${n.get(e)}">${e}</abbr>`}function tc(e){const t=e.slice(1,-1).split(":",2),[n,r]=t.map((e=>e.trim()));return sr`<var data-type="${r}">${n}</var>`}function nc(e){const t=function(e){const t=e=>e.replace("%%","/").split("/").map(Nr).join("/"),n=e.replace("\\/","%%"),r=n.lastIndexOf("/");if(-1===r)return[t(n)];const s=n.substring(0,r),i=n.substring(r+1,n.length);return[t(s),t(i)]}(e=e.slice(2,-2)),[n,r]=2===t.length?t:[null,t[0]],[s,i]=r.includes("|")?r.split("|",2).map((e=>e.trim())):[null,r],o=sc(i),a=n?Nr(n):null;return sr`<a
860
+ ></a>`}function nc(e,t){const n=Mr(e.slice(2,-2));if(n.startsWith("\\"))return e.replace(/^(\{\{\s*)\\/,"$1");const r=ba(n);return!!t.parentElement?.closest("dfn,a")?ac(`\`${r.textContent}\``):r}function rc(e,t,n){const r=e.slice(2,-2);if(r.startsWith("\\"))return[`[[${r.slice(1)}]]`];const[s,i]=r.split("|").map(Mr),{type:o,illegal:a}=Xr(s,t.parentElement),c=Da(s,i),l=s.replace(/^(!|\?)/,"");if(a&&!n.normativeReferences.has(l)){const e=c.childNodes[1]||c;ls("Normative references in informative sections are not allowed. ",Ma,{elements:[e],hint:`Remove '!' from the start of the reference \`[[${r}]]\``})}return"informative"!==o||a?n.normativeReferences.add(l):n.informativeReferences.add(l),c.childNodes[1]?c.childNodes:[c]}function sc(e,t,n){return"ABBR"===t.parentElement?.tagName?e:ur`<abbr title="${n.get(e)}">${e}</abbr>`}function ic(e){const t=e.slice(1,-1).split(":",2),[n,r]=t.map((e=>e.trim()));return ur`<var data-type="${r}">${n}</var>`}function oc(e){const t=function(e){const t=e=>e.replace("%%","/").split("/").map(Mr).join("/"),n=e.replace("\\/","%%"),r=n.lastIndexOf("/");if(-1===r)return[t(n)];const s=n.substring(0,r),i=n.substring(r+1,n.length);return[t(s),t(i)]}(e=e.slice(2,-2)),[n,r]=2===t.length?t:[null,t[0]],[s,i]=r.includes("|")?r.split("|",2).map((e=>e.trim())):[null,r],o=cc(i),a=n?Mr(n):null;return ur`<a
861
861
  data-link-type="dfn|abstract-op"
862
862
  data-link-for="${a}"
863
863
  data-xref-for="${a}"
864
864
  data-lt="${s}"
865
865
  >${o}</a
866
- >`}function rc(e){const t=e.slice(1,-1);return sr`<code>${t}</code>`}function sc(e){return Ma.test(e)?e.split(/(`[^`]+`)(?!`)/).map((e=>e.startsWith("`")?rc(e):sc(e))):document.createTextNode(e)}var ic=Object.freeze({__proto__:null,name:Da,rfc2119Usage:Oa,run:function(e){const t=new Map;document.normalize(),document.querySelector("section#conformance")||document.body.classList.add("informative"),e.normativeReferences=new Zr,e.informativeReferences=new Zr,e.respecRFC2119||(e.respecRFC2119=Oa);const n=document.querySelectorAll("abbr[title]:not(.exclude)");for(const{textContent:e,title:r}of n){const n=Nr(e),s=Nr(r);t.set(n,s)}const r=t.size?new RegExp(`(?:\\b${[...t.keys()].map((e=>vr(e))).join("\\b)|(?:\\b")}\\b)`):null,s=function(e,t=[],n={wsNodes:!0}){const r=t.join(", "),s=document.createNodeIterator(e,NodeFilter.SHOW_TEXT,{acceptNode:e=>n.wsNodes||e.data.trim()?r&&e.parentElement?.closest(r)?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_REJECT}),i=[];let o;for(;o=s.nextNode();)i.push(o);return i}(document.body,["#respec-ui",".head","pre","svg","script","style"],{wsNodes:!1}),i=za.rfc2119Keywords(),o=new RegExp(`(${ja([i,Ua,Ga,qa,Wa,Fa,Ba,Ma,Ha,...r?[r]:[]]).source})`);for(const n of s){const r=n.data.split(o);if(1===r.length)continue;const s=document.createDocumentFragment();let a=!0;for(const o of r)if(a=!a,a)switch(!0){case o.startsWith("{{"):s.append(Xa(o,n));break;case o.startsWith("{^"):s.append(Ja(o));break;case o.startsWith("[[["):s.append(Ya(o));break;case o.startsWith("[["):s.append(...Qa(o,n,e));break;case o.startsWith("|"):s.append(tc(o));break;case o.startsWith("[="):s.append(nc(o));break;case o.startsWith("`"):s.append(rc(o));break;case o.startsWith("[^"):s.append(Va(o));break;case t.has(o):s.append(ec(o,n,t));break;case i.test(o):s.append(Ka(o))}else s.append(o);n.replaceWith(s)}}});const oc="w3c/conformance",ac=Ir({en:{conformance:"Conformance",normativity:"As well as sections marked as non-normative, all authoring guidelines, diagrams, examples, and notes in this specification are non-normative. Everything else in this specification is normative.",keywordInterpretation:(e,t)=>sr`<p>
866
+ >`}function ac(e){const t=e.slice(1,-1);return ur`<code>${t}</code>`}function cc(e){return Fa.test(e)?e.split(/(`[^`]+`)(?!`)/).map((e=>e.startsWith("`")?ac(e):cc(e))):document.createTextNode(e)}function lc(e,t){e.textContent="";const n=cc(t);e.append(...Array.isArray(n)?n:[n])}var uc=Object.freeze({__proto__:null,name:Ma,rfc2119Usage:Ua,run:function(e){const t=new Map;document.normalize(),document.querySelector("section#conformance")||document.body.classList.add("informative"),e.normativeReferences=new ns,e.informativeReferences=new ns,e.respecRFC2119||(e.respecRFC2119=Ua);const n=document.querySelectorAll("abbr[title]:not(.exclude)");for(const{textContent:e,title:r}of n){const n=Mr(e),s=Mr(r);t.set(n,s)}const r=t.size?new RegExp(`(?:\\b${[...t.keys()].map((e=>_r(e))).join("\\b)|(?:\\b")}\\b)`):null,s=function(e,t=[],n={wsNodes:!0}){const r=t.join(", "),s=document.createNodeIterator(e,NodeFilter.SHOW_TEXT,{acceptNode:e=>n.wsNodes||e.data.trim()?r&&e.parentElement?.closest(r)?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_REJECT}),i=[];let o;for(;o=s.nextNode();)i.push(o);return i}(document.body,["#respec-ui",".head","pre","svg","script","style"],{wsNodes:!1}),i=Wa.rfc2119Keywords(),o=new RegExp(`(${qa([i,Ba,Za,Ha,Ga,Va,Ja,Fa,Ka,...r?[r]:[]]).source})`);for(const n of s){const r=n.data.split(o);if(1===r.length)continue;const s=document.createDocumentFragment();let a=!0;for(const o of r)if(a=!a,a)switch(!0){case o.startsWith("{{"):s.append(nc(o,n));break;case o.startsWith("{^"):s.append(Xa(o));break;case o.startsWith("[[["):s.append(tc(o));break;case o.startsWith("[["):s.append(...rc(o,n,e));break;case o.startsWith("|"):s.append(ic(o));break;case o.startsWith("[="):s.append(oc(o));break;case o.startsWith("`"):s.append(ac(o));break;case o.startsWith("[^"):s.append(Ya(o));break;case t.has(o):s.append(sc(o,n,t));break;case i.test(o):s.append(Qa(o))}else s.append(o);n.replaceWith(s)}},setInlineContent:lc});const dc="w3c/conformance",pc=Ur({en:{conformance:"Conformance",normativity:"As well as sections marked as non-normative, all authoring guidelines, diagrams, examples, and notes in this specification are non-normative. Everything else in this specification is normative.",keywordInterpretation:(e,t)=>ur`<p>
867
867
  The key word${t?"s":""} ${e} in this document
868
868
  ${t?"are":"is"} to be interpreted as described in
869
869
  <a href="https://www.rfc-editor.org/info/bcp14">BCP 14</a>
870
- ${Aa("RFC2119")} ${Aa("RFC8174")}
870
+ ${Da("RFC2119")} ${Da("RFC8174")}
871
871
  when, and only when, ${t?"they appear":"it appears"} in all
872
872
  capitals, as shown here.
873
- </p>`},de:{conformance:"Anforderungen",normativity:"Neben den explizit als nicht-normativ gekennzeichneten Abschnitten sind auch alle Diagramme, Beispiele und Hinweise in diesem Dokument nicht normativ. Alle anderen Angaben sind normativ.",keywordInterpretation:(e,t)=>sr`<p>
873
+ </p>`},de:{conformance:"Anforderungen",normativity:"Neben den explizit als nicht-normativ gekennzeichneten Abschnitten sind auch alle Diagramme, Beispiele und Hinweise in diesem Dokument nicht normativ. Alle anderen Angaben sind normativ.",keywordInterpretation:(e,t)=>ur`<p>
874
874
  ${t?"Die Schlüsselwörter":"Das Schlüsselwort"} ${e} in
875
875
  diesem Dokument ${t?"sind":"ist"} gemäß
876
876
  <a href="https://www.rfc-editor.org/info/bcp14">BCP 14</a>
877
- ${Aa("RFC2119")} ${Aa("RFC8174")}
877
+ ${Da("RFC2119")} ${Da("RFC8174")}
878
878
  und unter Berücksichtigung von
879
879
  <a href="https://github.com/adfinis-sygroup/2119/blob/master/2119de.rst"
880
880
  >2119de</a
881
881
  >
882
882
  zu interpretieren, wenn und nur wenn ${t?"sie":"es"} wie hier
883
883
  gezeigt durchgehend groß geschrieben wurde${t?"n":""}.
884
- </p>`},fr:{conformance:"Conformité",normativity:"Tout comme les sections marquées comme non normatives, toutes les recommandations d'édition, diagrammes, exemples et notes dans cette spécification sont non normatifs. Tout le reste dans cette spécification est normatif.",keywordInterpretation:(e,t)=>sr`<p>
884
+ </p>`},fr:{conformance:"Conformité",normativity:"Tout comme les sections marquées comme non normatives, toutes les recommandations d'édition, diagrammes, exemples et notes dans cette spécification sont non normatifs. Tout le reste dans cette spécification est normatif.",keywordInterpretation:(e,t)=>ur`<p>
885
885
  ${t?"Les mots-clés":"Le mot-clé"} ${e} dans ce document
886
886
  ${t?"doivent":"doit"} être interprété${t?"s":""} comme
887
887
  décrit dans
888
888
  <a href="https://www.rfc-editor.org/info/bcp14">BCP 14</a>
889
- ${Aa("RFC2119")} ${Aa("RFC8174")}
889
+ ${Da("RFC2119")} ${Da("RFC8174")}
890
890
  lorsque, et seulement lorsque,
891
891
  ${t?"ils apparaissent":"il apparaît"} en majuscules, comme
892
892
  indiqué ici.
893
- </p>`}});var cc=Object.freeze({__proto__:null,name:oc,run:function(e){const t=document.querySelector("section#conformance");if(t){if(t.classList.contains("informative")){t.classList.remove("informative");rs("Conformance sections are normative by definition. The `informative` class has been removed.",oc,{hint:'Remove `class="informative"` from `<section id="conformance">` to avoid this warning.',elements:[t]})}t.classList.contains("override")||function(e,t){const n=[...Object.keys(Oa)];n.length&&(t.normativeReferences.add("RFC2119"),t.normativeReferences.add("RFC8174"));const r=Ur(n.sort(),(e=>sr`<em class="rfc2119">${e}</em>`)),s=n.length>1,i=sr`
894
- <h1>${ac.conformance}</h1>
895
- <p>${ac.normativity}</p>
896
- ${n.length?ac.keywordInterpretation(r,s):null}
897
- `;e.prepend(...i.childNodes)}(t,e)}if(!t&&Object.keys(Oa).length){rs("Document uses RFC2119 keywords but lacks a conformance section.",oc,{hint:'Please add a `<section id="conformance">`.'})}}});function lc(e,t,n,r){try{switch(t){case"element-attr":return document.createAttribute(e),!0;case"element":return document.createElement(e),!0}}catch(s){ns(`Invalid ${t} name "${e}": ${s.message}`,r,{hint:`Check that the ${t} name is allowed per the XML's Name production for ${t}.`,elements:[n]})}return!1}function uc(e,t,n,r){if(/^[a-z]+(-[a-z]+)*$/i.test(e))return!0;return ns(`Invalid ${t} name "${e}".`,r,{hint:`Check that the ${t} name is allowed per the naming rules for this type.`,elements:[n]}),!1}const dc=new es;function pc(e,t){for(const n of t)dc.has(n)||dc.set(n,new Set),dc.get(n)?.add(e)}const hc="core/dfn",fc=new Map([["abstract-op",{requiresFor:!1}],["attr-value",{requiresFor:!0,associateWith:"a markup attribute",validator:uc}],["element",{requiresFor:!1,validator:lc}],["element-attr",{requiresFor:!1,validator:lc}],["element-state",{requiresFor:!0,associateWith:"a markup attribute",validator:uc}],["event",{requiresFor:!1,validator:uc}],["http-header",{requiresFor:!1}],["media-type",{requiresFor:!1,validator:function(e,t,n,r){try{const t=new ar(e);if(t.toString()!==e)throw new Error(`Input doesn't match its canonical form: "${t}".`)}catch(s){return ns(`Invalid ${t} "${e}": ${s.message}.`,r,{hint:"Check that the MIME type has both a type and a sub-type, and that it's in a canonical form (e.g., `text/plain`).",elements:[n]}),!1}return!0}}],["scheme",{requiresFor:!1,validator:uc}],["permission",{requiresFor:!1,validator:function(e,t,n,r){return e.startsWith('"')&&e.endsWith('"')?uc(e.slice(1,-1),t,n,r):(ns(`Invalid ${t} "${e}".`,r,{hint:`Check that the ${t} is quoted with double quotes.`,elements:[n]}),!1)}}]]),mc=[...fc.keys()];function gc(e,t){let n="";switch(!0){case mc.some((t=>e.classList.contains(t))):n=[...e.classList].find((e=>fc.has(e)))??"",function(e,t,n){const r=fc.get(t);if(r?.requiresFor&&!n.dataset.dfnFor){const e=ls`Definition of type "\`${t}\`" requires a ${"[data-dfn-for]"} attribute.`,{associateWith:s}=r,i=ls`Use a ${"[data-dfn-for]"} attribute to associate this with ${s??""}.`;ns(e,hc,{hint:i,elements:[n]})}r?.validator&&r.validator(e,t,n,hc)}(t,n,e);break;case Zo.test(t):n=function(e,t){t.dataset.hasOwnProperty("idl")||(t.dataset.idl="");const n=t.closest("[data-dfn-for]");t!==n&&n?.dataset.dfnFor&&(t.dataset.dfnFor=n.dataset.dfnFor);if(!t.dataset.dfnFor){const n=ls`Use a ${"[data-dfn-for]"} attribute to associate this dfn with a WebIDL interface.`;ns(`Internal slot "${e}" must be associated with a WebIDL interface.`,hc,{hint:n,elements:[t]})}t.matches(".export, [data-export]")||(t.dataset.noexport="");const r=e.endsWith(")")?"method":"attribute";if(!t.dataset.dfnType)return r;const s=["attribute","method"],{dfnType:i}=t.dataset;if(!s.includes(i)||r!==i){const n=ls`Invalid ${"[data-dfn-type]"} attribute on internal slot.`,i=`The only allowed types are: ${os(s,{quotes:!0})}. The slot "${e}" seems to be a "${is(r)}"?`;return ns(n,hc,{hint:i,elements:[t]}),"dfn"}return i}(t,e)}if(!n&&!e.matches("[data-dfn-type]")){const t=e.closest("[data-dfn-type]");n=t?.dataset.dfnType??""}n&&!e.dataset.dfnType&&(e.dataset.dfnType=n)}function bc(e){switch(!0){case e.matches(".export.no-export"):ns(ls`Declares both "${"[no-export]"}" and "${"[export]"}" CSS class.`,hc,{elements:[e],hint:"Please use only one."});break;case e.matches(".no-export, [data-noexport]"):if(e.matches("[data-export]")){ns(ls`Declares ${"[no-export]"} CSS class, but also has a "${"[data-export]"}" attribute.`,hc,{elements:[e],hint:"Please chose only one."}),delete e.dataset.export}e.dataset.noexport="";break;case e.matches(":is(.export):not([data-noexport], .no-export)"):e.dataset.export="";break;case function(e){return!e.matches(".export, [data-export]")&&e.closest("section.informative, section.normative")?.classList.contains("informative")}(e):e.dataset.noexport=""}}var yc=Object.freeze({__proto__:null,name:hc,run:function(){for(const e of document.querySelectorAll("dfn")){const t=Br(e);if(pc(e,t),e.dataset.cite&&/\b#\b/.test(e.dataset.cite))continue;const[n]=t;gc(e,n),bc(e);const r=(e.dataset.localLt||"").split("|").map(Nr),s=t.filter((e=>!r.includes(e)));(s.length>1||n!==Nr(e.textContent))&&(e.dataset.lt=s.join("|"))}}});var wc=Object.freeze({__proto__:null,name:"core/pluralize",run:function(e){if(!e.pluralize)return;const t=function(){const e=new Set;document.querySelectorAll("a:not([href])").forEach((t=>{const n=Nr(t.textContent).toLowerCase();e.add(n),t.dataset.lt&&e.add(t.dataset.lt)}));const t=new Set,n=document.querySelectorAll("dfn:not([data-lt-noDefault])");return n.forEach((e=>{const n=Nr(e.textContent).toLowerCase();t.add(n),e.dataset.lt&&e.dataset.lt.split("|").forEach((e=>t.add(e))),e.dataset.localLt&&e.dataset.localLt.split("|").forEach((e=>t.add(e)))})),function(n){const r=Nr(n).toLowerCase(),s=cr.isSingular(r)?cr.plural(r):cr.singular(r);return e.has(s)&&!t.has(s)?s:""}}();document.querySelectorAll("dfn:not([data-lt-no-plural]):not([data-lt-noDefault])").forEach((e=>{const n=[e.textContent];e.dataset.lt&&n.push(...e.dataset.lt.split("|")),e.dataset.localLt&&n.push(...e.dataset.localLt.split("|"));const r=new Set(n.map(t).filter((e=>e)));if(r.size){const t=e.dataset.plurals?e.dataset.plurals.split("|"):[],n=[...new Set([...t,...r])];e.dataset.plurals=n.join("|"),pc(e,n)}}))}});var vc=String.raw`span.example-title{text-transform:none}
893
+ </p>`}});var hc=Object.freeze({__proto__:null,name:dc,run:function(e){const t=document.querySelector("section#conformance");if(t){if(t.classList.contains("informative")){t.classList.remove("informative");ls("Conformance sections are normative by definition. The `informative` class has been removed.",dc,{hint:'Remove `class="informative"` from `<section id="conformance">` to avoid this warning.',elements:[t]})}t.classList.contains("override")||function(e,t){const n=[...Object.keys(Ua)];n.length&&(t.normativeReferences.add("RFC2119"),t.normativeReferences.add("RFC8174"));const r=Gr(n.sort(),(e=>ur`<em class="rfc2119">${e}</em>`)),s=n.length>1,i=ur`
894
+ <h1>${pc.conformance}</h1>
895
+ <p>${pc.normativity}</p>
896
+ ${n.length?pc.keywordInterpretation(r,s):null}
897
+ `;e.prepend(...i.childNodes)}(t,e)}if(!t&&Object.keys(Ua).length){ls("Document uses RFC2119 keywords but lacks a conformance section.",dc,{hint:'Please add a `<section id="conformance">`.'})}}});function fc(e,t,n,r){try{switch(t){case"element-attr":return document.createAttribute(e),!0;case"element":return document.createElement(e),!0}}catch(s){cs(`Invalid ${t} name "${e}": ${s.message}`,r,{hint:`Check that the ${t} name is allowed per the XML's Name production for ${t}.`,elements:[n]})}return!1}function mc(e,t,n,r){if(/^[a-z]+(-[a-z]+)*$/i.test(e))return!0;return cs(`Invalid ${t} name "${e}".`,r,{hint:`Check that the ${t} name is allowed per the naming rules for this type.`,elements:[n]}),!1}const gc=new os;function bc(e,t){for(const n of t)gc.has(n)||gc.set(n,new Set),gc.get(n)?.add(e)}const yc="core/dfn",wc=new Map([["abstract-op",{requiresFor:!1}],["attr-value",{requiresFor:!0,associateWith:"a markup attribute",validator:mc}],["element",{requiresFor:!1,validator:fc}],["element-attr",{requiresFor:!1,validator:fc}],["element-state",{requiresFor:!0,associateWith:"a markup attribute",validator:mc}],["event",{requiresFor:!1,validator:mc}],["http-header",{requiresFor:!1}],["media-type",{requiresFor:!1,validator:function(e,t,n,r){try{const t=new hr(e);if(t.toString()!==e)throw new Error(`Input doesn't match its canonical form: "${t}".`)}catch(s){return cs(`Invalid ${t} "${e}": ${s.message}.`,r,{hint:"Check that the MIME type has both a type and a sub-type, and that it's in a canonical form (e.g., `text/plain`).",elements:[n]}),!1}return!0}}],["scheme",{requiresFor:!1,validator:mc}],["permission",{requiresFor:!1,validator:function(e,t,n,r){return e.startsWith('"')&&e.endsWith('"')?mc(e.slice(1,-1),t,n,r):(cs(`Invalid ${t} "${e}".`,r,{hint:`Check that the ${t} is quoted with double quotes.`,elements:[n]}),!1)}}]]),vc=[...wc.keys()];function kc(e,t){let n="";switch(!0){case vc.some((t=>e.classList.contains(t))):n=[...e.classList].find((e=>wc.has(e)))??"",function(e,t,n){const r=wc.get(t);if(r?.requiresFor&&!n.dataset.dfnFor){const e=ms`Definition of type "\`${t}\`" requires a ${"[data-dfn-for]"} attribute.`,{associateWith:s}=r,i=ms`Use a ${"[data-dfn-for]"} attribute to associate this with ${s??""}.`;cs(e,yc,{hint:i,elements:[n]})}r?.validator&&r.validator(e,t,n,yc)}(t,n,e);break;case na.test(t):n=function(e,t){t.dataset.hasOwnProperty("idl")||(t.dataset.idl="");const n=t.closest("[data-dfn-for]");t!==n&&n?.dataset.dfnFor&&(t.dataset.dfnFor=n.dataset.dfnFor);if(!t.dataset.dfnFor){const n=ms`Use a ${"[data-dfn-for]"} attribute to associate this dfn with a WebIDL interface.`;cs(`Internal slot "${e}" must be associated with a WebIDL interface.`,yc,{hint:n,elements:[t]})}t.matches(".export, [data-export]")||(t.dataset.noexport="");const r=e.endsWith(")")?"method":"attribute";if(!t.dataset.dfnType)return r;const s=["attribute","method"],{dfnType:i}=t.dataset;if(!s.includes(i)||r!==i){const n=ms`Invalid ${"[data-dfn-type]"} attribute on internal slot.`,i=`The only allowed types are: ${ps(s,{quotes:!0})}. The slot "${e}" seems to be a "${ds(r)}"?`;return cs(n,yc,{hint:i,elements:[t]}),"dfn"}return i}(t,e)}if(!n&&!e.matches("[data-dfn-type]")){const t=e.closest("[data-dfn-type]");n=t?.dataset.dfnType??""}n&&!e.dataset.dfnType&&(e.dataset.dfnType=n)}function $c(e){switch(!0){case e.matches(".export.no-export"):cs(ms`Declares both "${"[no-export]"}" and "${"[export]"}" CSS class.`,yc,{elements:[e],hint:"Please use only one."});break;case e.matches(".no-export, [data-noexport]"):if(e.matches("[data-export]")){cs(ms`Declares ${"[no-export]"} CSS class, but also has a "${"[data-export]"}" attribute.`,yc,{elements:[e],hint:"Please chose only one."}),delete e.dataset.export}e.dataset.noexport="";break;case e.matches(":is(.export):not([data-noexport], .no-export)"):e.dataset.export="";break;case function(e){return!e.matches(".export, [data-export]")&&e.closest("section.informative, section.normative")?.classList.contains("informative")}(e):e.dataset.noexport=""}}var xc=Object.freeze({__proto__:null,name:yc,run:function(){for(const e of document.querySelectorAll("dfn")){const t=Zr(e);if(bc(e,t),e.dataset.cite&&/\b#\b/.test(e.dataset.cite))continue;const[n]=t;kc(e,n),$c(e);const r=(e.dataset.localLt||"").split("|").map(Mr),s=t.filter((e=>!r.includes(e)));(s.length>1||n!==Mr(e.textContent))&&(e.dataset.lt=s.join("|"))}}});var Cc=Object.freeze({__proto__:null,name:"core/pluralize",run:function(e){if(!e.pluralize)return;const t=function(){const e=new Set;document.querySelectorAll("a:not([href])").forEach((t=>{const n=Mr(t.textContent).toLowerCase();e.add(n),t.dataset.lt&&e.add(t.dataset.lt)}));const t=new Set,n=document.querySelectorAll("dfn:not([data-lt-noDefault])");return n.forEach((e=>{const n=Mr(e.textContent).toLowerCase();t.add(n),e.dataset.lt&&e.dataset.lt.split("|").forEach((e=>t.add(e))),e.dataset.localLt&&e.dataset.localLt.split("|").forEach((e=>t.add(e)))})),function(n){const r=Mr(n).toLowerCase(),s=fr.isSingular(r)?fr.plural(r):fr.singular(r);return e.has(s)&&!t.has(s)?s:""}}();document.querySelectorAll("dfn:not([data-lt-no-plural]):not([data-lt-noDefault])").forEach((e=>{const n=[e.textContent];e.dataset.lt&&n.push(...e.dataset.lt.split("|")),e.dataset.localLt&&n.push(...e.dataset.localLt.split("|"));const r=new Set(n.map(t).filter((e=>e)));if(r.size){const t=e.dataset.plurals?e.dataset.plurals.split("|"):[],n=[...new Set([...t,...r])];e.dataset.plurals=n.join("|"),bc(e,n)}}))}});var Sc=String.raw`span.example-title{text-transform:none}
898
898
  :is(aside,div).example,div.illegal-example{padding:.5em;margin:1em 0;position:relative;clear:both}
899
899
  div.illegal-example{color:red}
900
900
  div.illegal-example p{color:#000}
901
- aside.example div.example{border-left-width:.1em;border-color:#999;background:#fff}`;const kc=Ir({en:{example:"Example"},nl:{example:"Voorbeeld"},es:{example:"Ejemplo"},fr:{example:"Exemple"},ko:{example:"예시"},ja:{example:"例"},de:{example:"Beispiel"},zh:{example:"例"},cs:{example:"Příklad"}});function $c(e,t,n){n.title=e.title,n.title&&e.removeAttribute("title");const r=t>0?` ${t}`:"",s=n.title?sr`<span class="example-title">: ${n.title}</span>`:"";return sr`<div class="marker">
902
- <a class="self-link">${kc.example}<bdi>${r}</bdi></a
901
+ aside.example div.example{border-left-width:.1em;border-color:#999;background:#fff}`;const _c=Ur({en:{example:"Example"},nl:{example:"Voorbeeld"},es:{example:"Ejemplo"},fr:{example:"Exemple"},ko:{example:"예시"},ja:{example:"例"},de:{example:"Beispiel"},zh:{example:"例"},cs:{example:"Příklad"}});function Tc(e,t,n){n.title=e.title,n.title&&e.removeAttribute("title");const r=t>0?` ${t}`:"",s=n.title?ur`<span class="example-title">: ${n.title}</span>`:"";return ur`<div class="marker">
902
+ <a class="self-link">${_c.example}<bdi>${r}</bdi></a
903
903
  >${s}
904
- </div>`}var xc=Object.freeze({__proto__:null,name:"core/examples",run:function(){const e=document.querySelectorAll("pre.example, pre.illegal-example, aside.example");if(!e.length)return;document.head.insertBefore(sr`<style>
905
- ${vc}
906
- </style>`,document.querySelector("link"));let t=0;e.forEach((e=>{e.classList.contains("illegal-example");const n={},{title:r}=e;if("aside"===e.localName){++t;const s=$c(e,t,n);e.prepend(s);const i=Fr(e,"example",r||String(t));s.querySelector("a.self-link").href=`#${i}`}else{const s=!!e.closest("aside");s||++t,n.content=e.innerHTML,e.classList.remove("example","illegal-example");const i=e.id?e.id:null;i&&e.removeAttribute("id");const o=$c(e,s?0:t,n),a=sr`<div class="example" id="${i}">
904
+ </div>`}var Rc=Object.freeze({__proto__:null,name:"core/examples",run:function(){const e=document.querySelectorAll("pre.example, pre.illegal-example, aside.example");if(!e.length)return;document.head.insertBefore(ur`<style>
905
+ ${Sc}
906
+ </style>`,document.querySelector("link"));let t=0;e.forEach((e=>{e.classList.contains("illegal-example");const n={},{title:r}=e;if("aside"===e.localName){++t;const s=Tc(e,t,n);e.prepend(s);const i=Kr(e,"example",r||String(t));s.querySelector("a.self-link").href=`#${i}`}else{const s=!!e.closest("aside");s||++t,n.content=e.innerHTML,e.classList.remove("example","illegal-example");const i=e.id?e.id:null;i&&e.removeAttribute("id");const o=Tc(e,s?0:t,n),a=ur`<div class="example" id="${i}">
907
907
  ${o} ${e.cloneNode(!0)}
908
- </div>`;Fr(a,"example",r||String(t));a.querySelector("a.self-link").href=`#${a.id}`,e.replaceWith(a)}}))}});var Cc=String.raw`.issue-label{text-transform:initial}
908
+ </div>`;Kr(a,"example",r||String(t));a.querySelector("a.self-link").href=`#${a.id}`,e.replaceWith(a)}}))}});var Ec=String.raw`.issue-label{text-transform:initial}
909
909
  .warning>p:first-child{margin-top:0}
910
910
  .warning{padding:.5em;border-left-width:.5em;border-left-style:solid}
911
911
  span.warning{padding:.1em .5em .15em}
@@ -915,31 +915,31 @@ span.warning{padding:.1em .5em .15em}
915
915
  .warning-title:before{content:"⚠";font-size:1.3em;float:left;padding-right:.3em;margin-top:-.3em}
916
916
  li.task-list-item{list-style:none}
917
917
  input.task-list-item-checkbox{margin:0 .35em .25em -1.6em;vertical-align:middle}
918
- .issue a.respec-gh-label{padding:5px;margin:0 2px 0 2px;font-size:10px;text-transform:none;text-decoration:none;font-weight:700;border-radius:4px;position:relative;bottom:2px;border:none;display:inline-block}`;const Sc="core/issues-notes",_c=Ir({en:{editors_note:"Editor's note",feature_at_risk:"(Feature at Risk) Issue",issue:"Issue",issue_summary:"Issue summary",no_issues_in_spec:"There are no issues listed in this specification.",note:"Note",warning:"Warning"},ja:{note:"注",editors_note:"編者注",feature_at_risk:"(変更の可能性のある機能) Issue",issue:"Issue",issue_summary:"Issue の要約",no_issues_in_spec:"この仕様には未解決の issues は含まれていません.",warning:"警告"},nl:{editors_note:"Redactionele noot",issue_summary:"Lijst met issues",no_issues_in_spec:"Er zijn geen problemen vermeld in deze specificatie.",note:"Noot",warning:"Waarschuwing"},es:{editors_note:"Nota de editor",issue:"Cuestión",issue_summary:"Resumen de la cuestión",note:"Nota",no_issues_in_spec:"No hay problemas enumerados en esta especificación.",warning:"Aviso"},de:{editors_note:"Redaktioneller Hinweis",issue:"Frage",issue_summary:"Offene Fragen",no_issues_in_spec:"Diese Spezifikation enthält keine offenen Fragen.",note:"Hinweis",warning:"Warnung"},zh:{editors_note:"编者注",feature_at_risk:"(有可能变动的特性)Issue",issue:"Issue",issue_summary:"Issue 总结",no_issues_in_spec:"本规范中未列出任何 issue。",note:"注",warning:"警告"},cs:{editors_note:"Poznámka editora",feature_at_risk:"(Funkce v ohrožení) Problém",issue:"Problém",issue_summary:"Souhrn problémů",no_issues_in_spec:"V této specifikaci nejsou uvedeny žádné problémy.",note:"Poznámka",warning:"Varování"},fr:{editors_note:"Note de l'éditeur",issue:"Problème",issue_summary:"Résumé des problèmes",no_issues_in_spec:"Il n'y a aucun problème répertorié dans cette spécification.",note:"Note",warning:"Avertissement"}});function Tc(e,t,n){const r=function(){if(document.querySelector(".issue[data-number]"))return e=>{if(e.dataset.number)return Number(e.dataset.number)};let e=0;return t=>{if(t.classList.contains("issue")&&"span"!==t.localName)return++e}}(),s=document.createElement("ul");e.forEach((e=>{const{type:i,displayType:o,isFeatureAtRisk:a}=function(e){const t=e.classList.contains("issue"),n=e.classList.contains("warning"),r=e.classList.contains("ednote"),s=e.classList.contains("atrisk"),i=t?"issue":n?"warning":r?"ednote":"note",o=t?s?_c.feature_at_risk:_c.issue:n?_c.warning:r?_c.editors_note:_c.note;return{type:i,displayType:o,isFeatureAtRisk:s}}(e),c="issue"===i,l="span"===e.localName,{number:u}=e.dataset,d={title:e.title,number:r(e)};if(!l){const r=sr`<div class="${a?`${i} atrisk`:i}" role="${"note"===i?"note":null}"></div>`,l=document.createElement("span"),p=sr`<div class="${`${i}-title marker`}">${l}</div>`;Fr(p,"h",i);let h,f=o;if(e.id?(r.id=e.id,e.removeAttribute("id")):Fr(r,"issue-container",d.number?`number-${d.number}`:""),c){if(void 0!==d.number&&(f+=` ${d.number}`),e.dataset.hasOwnProperty("number")){const e=function(e,t,{isFeatureAtRisk:n=!1}={}){if(!n&&t.issueBase)return sr`<a href="${t.issueBase+e}" />`;if(n&&t.atRiskBase)return sr`<a href="${t.atRiskBase+e}" />`}(u??"",n,{isFeatureAtRisk:a});if(e&&(l.before(e),e.append(l)),l.classList.add("issue-number"),h=t.get(u??""),!h){rs(`Failed to fetch issue number ${u}.`,Sc)}h&&!d.title&&(d.title=h.title)}s.append(function(e,t,n){const r=`${e}${t.number?` ${t.number}`:""}`,s=t.title?sr`<span style="text-transform: none">: ${t.title}</span>`:"";return sr`<li><a href="${`#${n}`}">${r}</a>${s}</li>`}(_c.issue,d,r.id))}if(l.textContent=f,d.title){e.removeAttribute("title");const{repoURL:t=""}=n.github||{},s=h?h.labels:[];h&&"CLOSED"===h.state&&r.classList.add("closed"),p.append(function(e,t,n){const r=e.map((e=>function(e,t){const{color:n,name:r}=e,s=/^[0-9a-f]{6}$/i.test(n)?n:"f6f8fa",i=new URL("./issues/",t);i.searchParams.set("q",`is:issue is:open label:"${r}"`);const o=function(e){const[t,n,r]=[e.slice(0,2),e.slice(2,4),e.slice(4,6)],[s,i,o]=[t,n,r].map((e=>parseInt(e,16)/255)).map((e=>e<=.04045?e/12.92:((e+.055)/1.055)**2.4)),a=.2126*s+.7152*i+.0722*o;return a>.179?"#000":"#fff"}(s),a=`background-color: #${s}; color: ${o}`,c=`GitHub label: ${r}`;return sr` <a
918
+ .issue a.respec-gh-label{padding:5px;margin:0 2px 0 2px;font-size:10px;text-transform:none;text-decoration:none;font-weight:700;border-radius:4px;position:relative;bottom:2px;border:none;display:inline-block}`;const Lc="core/issues-notes",Ac=Ur({en:{editors_note:"Editor's note",feature_at_risk:"(Feature at Risk) Issue",issue:"Issue",issue_summary:"Issue summary",no_issues_in_spec:"There are no issues listed in this specification.",note:"Note",warning:"Warning"},ja:{note:"注",editors_note:"編者注",feature_at_risk:"(変更の可能性のある機能) Issue",issue:"Issue",issue_summary:"Issue の要約",no_issues_in_spec:"この仕様には未解決の issues は含まれていません.",warning:"警告"},nl:{editors_note:"Redactionele noot",issue_summary:"Lijst met issues",no_issues_in_spec:"Er zijn geen problemen vermeld in deze specificatie.",note:"Noot",warning:"Waarschuwing"},es:{editors_note:"Nota de editor",issue:"Cuestión",issue_summary:"Resumen de la cuestión",note:"Nota",no_issues_in_spec:"No hay problemas enumerados en esta especificación.",warning:"Aviso"},de:{editors_note:"Redaktioneller Hinweis",issue:"Frage",issue_summary:"Offene Fragen",no_issues_in_spec:"Diese Spezifikation enthält keine offenen Fragen.",note:"Hinweis",warning:"Warnung"},zh:{editors_note:"编者注",feature_at_risk:"(有可能变动的特性)Issue",issue:"Issue",issue_summary:"Issue 总结",no_issues_in_spec:"本规范中未列出任何 issue。",note:"注",warning:"警告"},cs:{editors_note:"Poznámka editora",feature_at_risk:"(Funkce v ohrožení) Problém",issue:"Problém",issue_summary:"Souhrn problémů",no_issues_in_spec:"V této specifikaci nejsou uvedeny žádné problémy.",note:"Poznámka",warning:"Varování"},fr:{editors_note:"Note de l'éditeur",issue:"Problème",issue_summary:"Résumé des problèmes",no_issues_in_spec:"Il n'y a aucun problème répertorié dans cette spécification.",note:"Note",warning:"Avertissement"}});function Pc(e,t,n){const r=function(){if(document.querySelector(".issue[data-number]"))return e=>{if(e.dataset.number)return Number(e.dataset.number)};let e=0;return t=>{if(t.classList.contains("issue")&&"span"!==t.localName)return++e}}(),s=document.createElement("ul");e.forEach((e=>{const{type:i,displayType:o,isFeatureAtRisk:a}=function(e){const t=e.classList.contains("issue"),n=e.classList.contains("warning"),r=e.classList.contains("ednote"),s=e.classList.contains("atrisk"),i=t?"issue":n?"warning":r?"ednote":"note",o=t?s?Ac.feature_at_risk:Ac.issue:n?Ac.warning:r?Ac.editors_note:Ac.note;return{type:i,displayType:o,isFeatureAtRisk:s}}(e),c="issue"===i,l="span"===e.localName,{number:u}=e.dataset,d={title:e.title,number:r(e)};if(!l){const r=ur`<div class="${a?`${i} atrisk`:i}" role="${"note"===i?"note":null}"></div>`,l=document.createElement("span"),p=ur`<div class="${`${i}-title marker`}">${l}</div>`;Kr(p,"h",i);let h,f=o;if(e.id?(r.id=e.id,e.removeAttribute("id")):Kr(r,"issue-container",d.number?`number-${d.number}`:""),c){if(void 0!==d.number&&(f+=` ${d.number}`),e.dataset.hasOwnProperty("number")){const e=function(e,t,{isFeatureAtRisk:n=!1}={}){if(!n&&t.issueBase)return ur`<a href="${t.issueBase+e}" />`;if(n&&t.atRiskBase)return ur`<a href="${t.atRiskBase+e}" />`}(u??"",n,{isFeatureAtRisk:a});if(e&&(l.before(e),e.append(l)),l.classList.add("issue-number"),h=t.get(u??""),!h){ls(`Failed to fetch issue number ${u}.`,Lc)}h&&!d.title&&(d.title=h.title)}s.append(function(e,t,n){const r=`${e}${t.number?` ${t.number}`:""}`,s=t.title?ur`<span style="text-transform: none">: ${t.title}</span>`:"";return ur`<li><a href="${`#${n}`}">${r}</a>${s}</li>`}(Ac.issue,d,r.id))}if(l.textContent=f,d.title){e.removeAttribute("title");const{repoURL:t=""}=n.github||{},s=h?h.labels:[];h&&"CLOSED"===h.state&&r.classList.add("closed"),p.append(function(e,t,n){const r=e.map((e=>function(e,t){const{color:n,name:r}=e,s=/^[0-9a-f]{6}$/i.test(n)?n:"f6f8fa",i=new URL("./issues/",t);i.searchParams.set("q",`is:issue is:open label:"${r}"`);const o=function(e){const[t,n,r]=[e.slice(0,2),e.slice(2,4),e.slice(4,6)],[s,i,o]=[t,n,r].map((e=>parseInt(e,16)/255)).map((e=>e<=.04045?e/12.92:((e+.055)/1.055)**2.4)),a=.2126*s+.7152*i+.0722*o;return a>.179?"#000":"#fff"}(s),a=`background-color: #${s}; color: ${o}`,c=`GitHub label: ${r}`;return ur` <a
919
919
  class="respec-gh-label"
920
920
  style="${a}"
921
921
  href="${i.href}"
922
922
  aria-label="${c}"
923
923
  >${r}</a
924
- >`}(e,n)));r.length&&r.unshift(document.createTextNode(" "));return sr`<span class="issue-label">: ${t}${r}</span>`}(s,d.title,t))}let m=e;e.replaceWith(r),m.classList.remove(i),m.removeAttribute("data-number"),h&&!m.innerHTML.trim()&&(m=document.createRange().createContextualFragment(h.bodyHTML)),r.append(p,m)}})),function(e){const t=document.getElementById("issue-summary");if(!t)return;const n=t.querySelector("h2, h3, h4, h5, h6");e.hasChildNodes()?t.append(e):t.append(sr`<p>${_c.no_issues_in_spec}</p>`),(!n||n&&n!==t.firstElementChild)&&t.prepend(sr`<h1>${_c.issue_summary}</h1>`)}(s)}var Rc=Object.freeze({__proto__:null,name:Sc,run:async function(e){const t=document.querySelectorAll(".issue, .note, .warning, .ednote"),n=Array.from(t).filter((e=>e instanceof HTMLElement));if(!n.length)return;const r=await async function(e){if(!e||!e.apiBase)return new Map;const t=[...document.querySelectorAll(".issue[data-number]")].map((e=>Number.parseInt(e.dataset.number??"",10))).filter((e=>e));if(!t.length)return new Map;const n=new URL("issues",`${e.apiBase}/${e.fullName}/`);n.searchParams.set("issues",t.join(","));const r=await fetch(n.href);if(!r.ok)return ns(`Error fetching issues from GitHub. (HTTP Status ${r.status}).`,Sc),new Map;const s=await r.json();return new Map(Object.entries(s))}(e.github??null),{head:s}=document;s.insertBefore(sr`<style>
925
- ${Cc}
926
- </style>`,s.querySelector("link")),Tc(n,r,e),document.querySelectorAll(".ednote").forEach((e=>{e.classList.remove("ednote"),e.classList.add("note")}))}});const Ec="core/best-practices",Lc={en:{best_practice:"Best Practice "},ja:{best_practice:"最良実施例 "},de:{best_practice:"Musterbeispiel "},zh:{best_practice:"最佳实践 "}},Ac=Ir(Lc),Pc=r in Lc?r:"en";var Nc=Object.freeze({__proto__:null,name:Ec,run:function(){const e=document.querySelectorAll(".practicelab"),t=document.getElementById("bp-summary"),n=t?document.createElement("ul"):null;if([...e].forEach(((e,t)=>{const r=Fr(e,"bp"),s=sr`<a class="marker self-link" href="${`#${r}`}"
927
- ><bdi lang="${Pc}">${Ac.best_practice}${t+1}</bdi></a
928
- >`;if(n){const t=sr`<li>${s}: ${Yr(e)}</li>`;n.appendChild(t)}const i=e.closest("div");if(!i)return void e.classList.add("advisement");i.classList.add("advisement");const o=sr`${s.cloneNode(!0)}: ${e}`;i.prepend(...o.childNodes)})),e.length)t&&(t.appendChild(sr`<h1>Best Practices Summary</h1>`),n&&t.appendChild(n));else if(t){rs("Using best practices summary (#bp-summary) but no best practices found.",Ec),t.remove()}}});const Ic="core/figures",Dc=Ir({en:{list_of_figures:"List of Figures",fig:"Figure "},ja:{fig:"図 ",list_of_figures:"図のリスト"},ko:{fig:"그림 ",list_of_figures:"그림 목록"},nl:{fig:"Figuur ",list_of_figures:"Lijst met figuren"},es:{fig:"Figura ",list_of_figures:"Lista de Figuras"},fr:{list_of_figures:"Liste des figures",fig:"Figure "},zh:{fig:"图 ",list_of_figures:"规范中包含的图"},de:{fig:"Abbildung",list_of_figures:"Abbildungsverzeichnis"}});var Oc=Object.freeze({__proto__:null,name:Ic,run:function(){const e=function(){const e=[];return document.querySelectorAll("figure").forEach(((t,n)=>{const r=t.querySelector("figcaption");if(r)!function(e,t,n){const r=t.textContent;Fr(e,"fig",r),Vr(t,sr`<span class="fig-title"></span>`),t.prepend(sr`<a class="self-link" href="#${e.id}"
929
- >${Dc.fig}<bdi class="figno">${n+1}</bdi></a
930
- >`," ")}(t,r,n),e.push(function(e,t){const n=t.cloneNode(!0);return n.querySelectorAll("a").forEach((e=>{Hr(e,"span").removeAttribute("href")})),sr`<li class="tofline">
924
+ >`}(e,n)));r.length&&r.unshift(document.createTextNode(" "));return ur`<span class="issue-label">: ${t}${r}</span>`}(s,d.title,t))}let m=e;e.replaceWith(r),m.classList.remove(i),m.removeAttribute("data-number"),h&&!m.innerHTML.trim()&&(m=document.createRange().createContextualFragment(h.bodyHTML)),r.append(p,m)}})),function(e){const t=document.getElementById("issue-summary");if(!t)return;const n=t.querySelector("h2, h3, h4, h5, h6");e.hasChildNodes()?t.append(e):t.append(ur`<p>${Ac.no_issues_in_spec}</p>`),(!n||n&&n!==t.firstElementChild)&&t.prepend(ur`<h1>${Ac.issue_summary}</h1>`)}(s)}var Nc=Object.freeze({__proto__:null,name:Lc,run:async function(e){const t=document.querySelectorAll(".issue, .note, .warning, .ednote"),n=Array.from(t).filter((e=>e instanceof HTMLElement));if(!n.length)return;const r=await async function(e){if(!e||!e.apiBase)return new Map;const t=[...document.querySelectorAll(".issue[data-number]")].map((e=>Number.parseInt(e.dataset.number??"",10))).filter((e=>e));if(!t.length)return new Map;const n=new URL("issues",`${e.apiBase}/${e.fullName}/`);n.searchParams.set("issues",t.join(","));const r=await fetch(n.href);if(!r.ok)return cs(`Error fetching issues from GitHub. (HTTP Status ${r.status}).`,Lc),new Map;const s=await r.json();return new Map(Object.entries(s))}(e.github??null),{head:s}=document;s.insertBefore(ur`<style>
925
+ ${Ec}
926
+ </style>`,s.querySelector("link")),Pc(n,r,e),document.querySelectorAll(".ednote").forEach((e=>{e.classList.remove("ednote"),e.classList.add("note")}))}});const Ic="core/best-practices",Dc={en:{best_practice:"Best Practice "},ja:{best_practice:"最良実施例 "},de:{best_practice:"Musterbeispiel "},zh:{best_practice:"最佳实践 "}},Oc=Ur(Dc),jc=r in Dc?r:"en";var zc=Object.freeze({__proto__:null,name:Ic,run:function(){const e=document.querySelectorAll(".practicelab"),t=document.getElementById("bp-summary"),n=t?document.createElement("ul"):null;if([...e].forEach(((e,t)=>{const r=Kr(e,"bp"),s=ur`<a class="marker self-link" href="${`#${r}`}"
927
+ ><bdi lang="${jc}">${Oc.best_practice}${t+1}</bdi></a
928
+ >`;if(n){const t=ur`<li>${s}: ${rs(e)}</li>`;n.appendChild(t)}const i=e.closest("div");if(!i)return void e.classList.add("advisement");i.classList.add("advisement");const o=ur`${s.cloneNode(!0)}: ${e}`;i.prepend(...o.childNodes)})),e.length)t&&(t.appendChild(ur`<h1>Best Practices Summary</h1>`),n&&t.appendChild(n));else if(t){ls("Using best practices summary (#bp-summary) but no best practices found.",Ic),t.remove()}}});const Mc="core/figures",Uc=Ur({en:{list_of_figures:"List of Figures",fig:"Figure "},ja:{fig:"図 ",list_of_figures:"図のリスト"},ko:{fig:"그림 ",list_of_figures:"그림 목록"},nl:{fig:"Figuur ",list_of_figures:"Lijst met figuren"},es:{fig:"Figura ",list_of_figures:"Lista de Figuras"},fr:{list_of_figures:"Liste des figures",fig:"Figure "},zh:{fig:"图 ",list_of_figures:"规范中包含的图"},de:{fig:"Abbildung",list_of_figures:"Abbildungsverzeichnis"}});var qc=Object.freeze({__proto__:null,name:Mc,run:function(){const e=function(){const e=[];return document.querySelectorAll("figure").forEach(((t,n)=>{const r=t.querySelector("figcaption");if(r)!function(e,t,n){const r=t.textContent;Kr(e,"fig",r),Qr(t,ur`<span class="fig-title"></span>`),t.prepend(ur`<a class="self-link" href="#${e.id}"
929
+ >${Uc.fig}<bdi class="figno">${n+1}</bdi></a
930
+ >`," ")}(t,r,n),e.push(function(e,t){const n=t.cloneNode(!0);return n.querySelectorAll("a").forEach((e=>{Yr(e,"span").removeAttribute("href")})),ur`<li class="tofline">
931
931
  <a class="tocxref" href="${`#${e}`}">${n.childNodes}</a>
932
- </li>`}(t.id,r));else{rs("Found a `<figure>` without a `<figcaption>`.",Ic,{elements:[t]})}})),e}(),t=document.getElementById("tof");e.length&&t&&(!function(e){if(e.classList.contains("appendix")||e.classList.contains("introductory")||e.closest("section"))return;const t=Jr(e);t.every((e=>e.classList.contains("introductory")))?e.classList.add("introductory"):t.some((e=>e.classList.contains("appendix")))&&e.classList.add("appendix")}(t),t.append(sr`<h1>${Dc.list_of_figures}</h1>`,sr`<ul class="tof">
932
+ </li>`}(t.id,r));else{ls("Found a `<figure>` without a `<figcaption>`.",Mc,{elements:[t]})}})),e}(),t=document.getElementById("tof");e.length&&t&&(!function(e){if(e.classList.contains("appendix")||e.classList.contains("introductory")||e.closest("section"))return;const t=es(e);t.every((e=>e.classList.contains("introductory")))?e.classList.add("introductory"):t.some((e=>e.classList.contains("appendix")))&&e.classList.add("appendix")}(t),t.append(ur`<h1>${Uc.list_of_figures}</h1>`,ur`<ul class="tof">
933
933
  ${e}
934
- </ul>`))}});const jc=Ir({en:{list_of_tables:"List of Tables",table:"Table "},fr:{list_of_tables:"Liste des tables",table:"Table "}});var zc=Object.freeze({__proto__:null,name:"core/tables",run:function(){const e=function(){const e=[],t=document.querySelectorAll("table.numbered");return[...t].filter((e=>!!e.querySelector("caption"))).forEach(((t,n)=>{const r=t.querySelector("caption");r&&(!function(e,t,n){const r=t.textContent;Fr(e,"table",r),Vr(t,sr`<span class="table-title"></span>`),t.prepend(sr`<a class="self-link" href="#${e.id}"
935
- >${jc.table}<bdi class="tableno">${n+1}</bdi></a
936
- >`," ")}(t,r,n),e.push(function(e,t){const n=t.cloneNode(!0);for(const e of n.querySelectorAll("a"))Hr(e,"span",{copyAttributes:!1});return sr`<li>
934
+ </ul>`))}});const Wc=Ur({en:{list_of_tables:"List of Tables",table:"Table "},fr:{list_of_tables:"Liste des tables",table:"Table "}});var Fc=Object.freeze({__proto__:null,name:"core/tables",run:function(){const e=function(){const e=[],t=document.querySelectorAll("table.numbered");return[...t].filter((e=>!!e.querySelector("caption"))).forEach(((t,n)=>{const r=t.querySelector("caption");r&&(!function(e,t,n){const r=t.textContent;Kr(e,"table",r),Qr(t,ur`<span class="table-title"></span>`),t.prepend(ur`<a class="self-link" href="#${e.id}"
935
+ >${Wc.table}<bdi class="tableno">${n+1}</bdi></a
936
+ >`," ")}(t,r,n),e.push(function(e,t){const n=t.cloneNode(!0);for(const e of n.querySelectorAll("a"))Yr(e,"span",{copyAttributes:!1});return ur`<li>
937
937
  <a class="tocxref" href="${`#${e}`}"
938
938
  >${n.childNodes}</a
939
939
  >
940
- </li>`}(t.id,r)))})),e}(),t=document.querySelector("section#list-of-tables");e.length&&t&&(!function(e){if(e.matches(".appendix, .introductory")||e.closest("section"))return;const t=Jr(e);t.every((e=>e.classList.contains("introductory")))?e.classList.add("introductory"):t.some((e=>e.classList.contains("appendix")))&&e.classList.add("appendix")}(t),t.append(sr`<h1>${jc.list_of_tables}</h1>`,sr`<ul class="list-of-tables">
940
+ </li>`}(t.id,r)))})),e}(),t=document.querySelector("section#list-of-tables");e.length&&t&&(!function(e){if(e.matches(".appendix, .introductory")||e.closest("section"))return;const t=es(e);t.every((e=>e.classList.contains("introductory")))?e.classList.add("introductory"):t.some((e=>e.classList.contains("appendix")))&&e.classList.add("appendix")}(t),t.append(ur`<h1>${Wc.list_of_tables}</h1>`,ur`<ul class="list-of-tables">
941
941
  ${e}
942
- </ul>`))}});const Mc=new Set(["callback interface","callback","dictionary","enum","interface mixin","interface","typedef"]);function Uc(e,t,{parent:n=""}={}){switch(e.type){case"constructor":case"operation":return function(e,t,n){if(n.includes("!overload"))return qc(e,t,n);const r=`${n}()`;return qc(e,t,r,n)}(e,n,t);default:return qc(e,n,t)}}function qc(e,t,...n){const{type:r}=e;for(const e of n){let n="enum-value"===r&&""===e?"the-empty-string":e,s=Fc(n,t,e,r);if(0===s.length&&""!==t){n=`${t}.${n}`;const e=dc.get(n);e&&1===e.size&&(s=[...e],pc(s[0],[n]))}else n=e;if(s.length>1){ns(`WebIDL identifier \`${e}\` ${t?`for \`${t}\``:""} is defined multiple times`,e,{title:"Duplicate definition.",elements:s})}if(s.length)return s[0]}}function Wc(e,t,n,r){if(!e.id){const t=n.toLowerCase(),s=t?`${t}-`:"";let i=r.toLowerCase().replace(/[()]/g,"").replace(/\s/g,"-");""===i&&(i="the-empty-string",e.setAttribute("aria-label","the empty string")),e.id=`dom-${s}${i}`}switch(e.dataset.idl=t.type,e.dataset.title=e.textContent,e.dataset.dfnFor=n,t.type){case"operation":case"attribute":case"field":e.dataset.type=Bc(t)}switch(e.querySelector("code")||e.closest("code")||!e.children||Vr(e,e.ownerDocument.createElement("code")),t.type){case"attribute":case"constructor":case"operation":{const s=function(e,t,n){const{type:r}=e,s=`${t}.${n}`;switch(r){case"constructor":case"operation":{const t=`${n}()`,r=`${s}()`,i=function(e,t){const n=[];if(0===t.length)return n;const r=[],s=[];for(const{name:e,optional:n,variadic:i}of t)n||i?s.push(e):r.push(e);const i=r.join(", "),o=`${e}(${i})`;n.push(o);const a=s.map(((t,n)=>{const i=[...r,...s.slice(0,n+1)].join(", ");return`${e}(${i})`}));return n.push(...a),n}(n,e.arguments);return{local:[s,r,n],exportable:[t,...i]}}case"attribute":return{local:[s],exportable:[n]}}}(t,n,r);s&&function(e,t){const{local:n,exportable:r}=t,s=e.dataset.lt?new Set(e.dataset.lt.split("|")):new Set;for(const e of r)s.add(e);n.filter((e=>s.has(e))).forEach((e=>s.delete(e))),e.dataset.lt=[...s].join("|"),e.dataset.localLt=n.join("|"),pc(e,[...n,...r])}(e,s);break}}return e}function Fc(e,t,n,r){const s=dc.get(e);if(!s||0===s.size)return[];const i=[...s],o=i.filter((e=>{if("dfn"===e.dataset.dfnType)return!1;const n=e.closest("[data-dfn-for]");return n&&n.dataset.dfnFor===t}));if(0===o.length&&""===t&&1===i.length)return i[0].textContent===n?i:[];if(Mc.has(r)&&i.length){const e=i.find((e=>e.textContent.trim()===n));if(e)return[e]}return o}function Bc(e={}){const{idlType:t,generic:n,union:r}=e;return void 0===t?"":"string"==typeof t?t:n||(r?t.map(Bc).join("|"):Bc(t))}const Hc='<svg height="16" viewBox="0 0 14 16" width="14"><path fill-rule="evenodd" d="M2 13h4v1H2v-1zm5-6H2v1h5V7zm2 3V8l-3 3 3 3v-2h5v-2H9zM4.5 9H2v1h2.5V9zM2 12h2.5v-1H2v1zm9 1h1v2c-.02.28-.11.52-.3.7-.19.18-.42.28-.7.3H1c-.55 0-1-.45-1-1V4c0-.55.45-1 1-1h3c0-1.11.89-2 2-2 1.11 0 2 .89 2 2h3c.55 0 1 .45 1 1v5h-1V6H1v9h10v-2zM2 5h8c0-.55-.45-1-1-1H8c-.55 0-1-.45-1-1s-.45-1-1-1-1 .45-1 1-.45 1-1 1H3c-.55 0-1 .45-1 1z"/></svg>';function Gc(e,t="Copy to clipboard"){const n=document.createElement("button");return n.innerHTML=Hc,n.title=t,n.setAttribute("aria-label",t),n.classList.add("respec-button-copy-paste","removeOnSave"),n.dataset.copyHeader=e,n.addEventListener("click",(()=>{const t=n.closest("pre");if(!t)return;const r=t.cloneNode(!0);r.querySelector(e)?.remove(),navigator.clipboard.writeText(r.textContent??"")})),n}function Vc(){if(document.getElementById("respec-copy-paste"))return;const e=document.createElement("script");e.id="respec-copy-paste",e.textContent='\n document.querySelectorAll(".respec-button-copy-paste").forEach(function(btn) {\n btn.addEventListener("click", function() {\n var pre = this.closest("pre");\n if (!pre) return;\n var sel = this.dataset.copyHeader;\n var clone = pre.cloneNode(true);\n if (sel) { var h = clone.querySelector(sel); if (h) h.remove(); }\n navigator.clipboard.writeText(clone.textContent);\n });\n });\n ',document.body.append(e)}function Jc(e){e.append(Gc(".idlHeader","Copy IDL to clipboard")),Vc()}var Kc=Object.freeze({__proto__:null,addCopyIDLButton:Jc,name:"core/webidl-clipboard"});var Zc=String.raw`pre.idl{padding:1em;position:relative}
942
+ </ul>`))}});const Bc=new Set(["callback interface","callback","dictionary","enum","interface mixin","interface","typedef"]);function Hc(e,t,{parent:n=""}={}){switch(e.type){case"constructor":case"operation":return function(e,t,n){if(n.includes("!overload"))return Gc(e,t,n);const r=`${n}()`;return Gc(e,t,r,n)}(e,n,t);default:return Gc(e,n,t)}}function Gc(e,t,...n){const{type:r}=e;for(const e of n){let n="enum-value"===r&&""===e?"the-empty-string":e,s=Jc(n,t,e,r);if(0===s.length&&""!==t){n=`${t}.${n}`;const e=gc.get(n);e&&1===e.size&&(s=[...e],bc(s[0],[n]))}if(s.length>1){cs(`WebIDL identifier \`${e}\` ${t?`for \`${t}\``:""} is defined multiple times`,e,{title:"Duplicate definition.",elements:s})}if(s.length)return s[0]}}function Vc(e,t,n,r){if(!e.id){const t=n.toLowerCase(),s=t?`${t}-`:"";let i=r.toLowerCase().replace(/[()]/g,"").replace(/\s/g,"-");""===i&&(i="the-empty-string",e.setAttribute("aria-label","the empty string")),e.id=`dom-${s}${i}`}switch(e.dataset.idl=t.type,e.dataset.title=e.textContent,e.dataset.dfnFor=n,t.type){case"operation":case"attribute":case"field":e.dataset.type=Kc(t)}switch(e.querySelector("code")||e.closest("code")||!e.children||Qr(e,e.ownerDocument.createElement("code")),t.type){case"attribute":case"constructor":case"operation":{const s=function(e,t,n){const{type:r}=e,s=`${t}.${n}`;switch(r){case"constructor":case"operation":{const t=`${n}()`,r=`${s}()`,i=function(e,t){const n=[];if(0===t.length)return n;const r=[],s=[];for(const{name:e,optional:n,variadic:i}of t)n||i?s.push(e):r.push(e);const i=r.join(", "),o=`${e}(${i})`;n.push(o);const a=s.map(((t,n)=>{const i=[...r,...s.slice(0,n+1)].join(", ");return`${e}(${i})`}));return n.push(...a),n}(n,e.arguments);return{local:[s,r,n],exportable:[t,...i]}}case"attribute":return{local:[s],exportable:[n]}}}(t,n,r);s&&function(e,t){const{local:n,exportable:r}=t,s=e.dataset.lt?new Set(e.dataset.lt.split("|")):new Set;for(const e of r)s.add(e);n.filter((e=>s.has(e))).forEach((e=>s.delete(e))),e.dataset.lt=[...s].join("|"),e.dataset.localLt=n.join("|"),bc(e,[...n,...r])}(e,s);break}}return e}function Jc(e,t,n,r){const s=gc.get(e);if(!s||0===s.size)return[];const i=[...s],o=i.filter((e=>{if("dfn"===e.dataset.dfnType)return!1;const n=e.closest("[data-dfn-for]");return n&&n.dataset.dfnFor===t}));if(0===o.length&&""===t&&1===i.length)return i[0].textContent===n?i:[];if(Bc.has(r)&&i.length){const e=i.find((e=>e.textContent.trim()===n));if(e)return[e]}return o}function Kc(e={}){const{idlType:t,generic:n,union:r}=e;return void 0===t?"":"string"==typeof t?t:n||(r?t.map(Kc).join("|"):Kc(t))}const Zc='<svg height="16" viewBox="0 0 14 16" width="14"><path fill-rule="evenodd" d="M2 13h4v1H2v-1zm5-6H2v1h5V7zm2 3V8l-3 3 3 3v-2h5v-2H9zM4.5 9H2v1h2.5V9zM2 12h2.5v-1H2v1zm9 1h1v2c-.02.28-.11.52-.3.7-.19.18-.42.28-.7.3H1c-.55 0-1-.45-1-1V4c0-.55.45-1 1-1h3c0-1.11.89-2 2-2 1.11 0 2 .89 2 2h3c.55 0 1 .45 1 1v5h-1V6H1v9h10v-2zM2 5h8c0-.55-.45-1-1-1H8c-.55 0-1-.45-1-1s-.45-1-1-1-1 .45-1 1-.45 1-1 1H3c-.55 0-1 .45-1 1z"/></svg>';function Yc(e,t="Copy to clipboard"){const n=document.createElement("button");return n.innerHTML=Zc,n.title=t,n.setAttribute("aria-label",t),n.classList.add("respec-button-copy-paste","removeOnSave"),n.dataset.copyHeader=e,n.addEventListener("click",(()=>{const t=n.closest("pre");if(!t)return;const r=t.cloneNode(!0);r.querySelector(e)?.remove(),navigator.clipboard.writeText(r.textContent??"")})),n}function Xc(){if(document.getElementById("respec-copy-paste"))return;const e=document.createElement("script");e.id="respec-copy-paste",e.textContent='\n document.querySelectorAll(".respec-button-copy-paste").forEach(function(btn) {\n btn.addEventListener("click", function() {\n var pre = this.closest("pre");\n if (!pre) return;\n var sel = this.dataset.copyHeader;\n var clone = pre.cloneNode(true);\n if (sel) { var h = clone.querySelector(sel); if (h) h.remove(); }\n navigator.clipboard.writeText(clone.textContent);\n });\n });\n ',document.body.append(e)}function Qc(e){e.append(Yc(".idlHeader","Copy IDL to clipboard")),Xc()}var el=Object.freeze({__proto__:null,addCopyIDLButton:Qc,name:"core/webidl-clipboard"});var tl=String.raw`pre.idl{padding:1em;position:relative}
943
943
  pre.idl>code{color:#000;color:var(--text,#000)}
944
944
  @media print{
945
945
  pre.idl{white-space:pre-wrap}
@@ -964,37 +964,36 @@ a.idlEnumItem{color:#000;border-bottom:1px dotted #ccc;text-decoration:none}
964
964
  .respec-button-copy-paste:is(:disabled,:disabled:hover,.disabled,.disabled:hover){color:rgba(102,102,102,.5);cursor:default;background-color:rgba(229,229,229,.5);background-image:none;border-color:rgba(197,197,197,.5);box-shadow:none}
965
965
  @media print{
966
966
  .respec-button-copy-paste{visibility:hidden}
967
- }`;const Yc="core/webidl",Xc=Yc,Qc={},el={},tl={wrap:e=>e.flat().filter((e=>""!==e)).map((e=>"string"==typeof e?new Text(e):e)),trivia:e=>e.trim()?sr`<span class="idlSectionComment">${e}</span>`:e,generic:e=>/^[A-Z]/.test(e)?sr`<a data-xref-type="interface" data-cite="WEBIDL">${e}</a>`:sr`<a data-xref-type="dfn" data-cite="WEBIDL">${e}</a>`,reference(e,t,n){if("extended-attribute"===n.type)return e;let r="_IDL_",s=null;if("object"===t)r="interface",s="WEBIDL";return sr`<a
967
+ }`;const nl="core/webidl",rl=nl,sl={},il={},ol={wrap:e=>e.flat().filter((e=>""!==e)).map((e=>"string"==typeof e?new Text(e):e)),trivia:e=>e.trim()?ur`<span class="idlSectionComment">${e}</span>`:e,generic:e=>/^[A-Z]/.test(e)?ur`<a data-xref-type="interface" data-cite="WEBIDL">${e}</a>`:ur`<a data-xref-type="dfn" data-cite="WEBIDL">${e}</a>`,reference(e,t,n){if("extended-attribute"===n.type)return e;let r="_IDL_",s=null;if("object"===t)r="interface",s="WEBIDL";return ur`<a
968
968
  data-link-type="${"_IDL_"===r?"idl":r}"
969
969
  data-xref-type="${r}"
970
970
  data-cite="${s}"
971
- data-lt="${undefined}"
972
971
  >${e}</a
973
- >`},name(e,{data:t,parent:n}){if(t.idlType&&"argument-type"===t.idlType.type)return sr`<span class="idlParamName">${e}</span>`;const r=nl(e,t,n);if("enum-value"!==t.type){const e=n?"idlName":"idlID";r.classList.add(e)}return r},nameless(e,{data:t,parent:n}){switch(t.type){case"operation":case"constructor":return nl(e,t,n);default:return e}},type:e=>sr`<span class="idlType">${e}</span>`,inheritance:e=>sr`<span class="idlSuperclass">${e}</span>`,definition(e,{data:t,parent:n}){const r=function(e){switch(e.type){case"callback interface":return"idlInterface";case"operation":return"idlMethod";case"field":return"idlMember";case"enum-value":return"idlEnumItem";case"callback function":return"idlCallback"}return`idl${e.type[0].toUpperCase()}${e.type.slice(1)}`}(t);switch(t.type){case"includes":case"enum-value":return sr`<span class="${r}">${e}</span>`}const s=n?n.name:"",{name:i,idlId:o}=sl(t,s);return sr`<span
972
+ >`},name(e,{data:t,parent:n}){if(t.idlType&&"argument-type"===t.idlType.type)return ur`<span class="idlParamName">${e}</span>`;const r=al(e,t,n);if("enum-value"!==t.type){const e=n?"idlName":"idlID";r.classList.add(e)}return r},nameless(e,{data:t,parent:n}){switch(t.type){case"operation":case"constructor":return al(e,t,n);default:return e}},type:e=>ur`<span class="idlType">${e}</span>`,inheritance:e=>ur`<span class="idlSuperclass">${e}</span>`,definition(e,{data:t,parent:n}){const r=function(e){switch(e.type){case"callback interface":return"idlInterface";case"operation":return"idlMethod";case"field":return"idlMember";case"enum-value":return"idlEnumItem";case"callback function":return"idlCallback"}return`idl${e.type[0].toUpperCase()}${e.type.slice(1)}`}(t);switch(t.type){case"includes":case"enum-value":return ur`<span class="${r}">${e}</span>`}const s=n?n.name:"",{name:i,idlId:o}=ll(t,s);return ur`<span
974
973
  class="${r}"
975
974
  id="${o}"
976
975
  data-idl
977
976
  data-title="${i}"
978
977
  >${e}</span
979
- >`},extendedAttribute:e=>sr`<span class="extAttr">${e}</span>`,extendedAttributeReference:e=>sr`<a data-xref-type="extended-attribute">${e}</a>`};function nl(e,t,n){const r=n?n.name:"",{name:s}=sl(t,r),i=Uc(t,s,{parent:r}),o=function(e){switch(e){case"operation":return"method";case"field":return"dict-member";case"callback interface":case"interface mixin":return"interface";default:return e}}(t.type);if(i){t.partial||(i.matches("[data-noexport]")||(i.dataset.export=""),i.dataset.dfnType=o),Wc(i,t,r,s);const n=`#${i.id}`;return sr`<a
978
+ >`},extendedAttribute:e=>ur`<span class="extAttr">${e}</span>`,extendedAttributeReference:e=>ur`<a data-xref-type="extended-attribute">${e}</a>`};function al(e,t,n){const r=n?n.name:"",{name:s}=ll(t,r),i=Hc(t,s,{parent:r}),o=function(e){switch(e){case"operation":return"method";case"field":return"dict-member";case"callback interface":case"interface mixin":return"interface";default:return e}}(t.type);if(i){t.partial||(i.matches("[data-noexport]")||(i.dataset.export=""),i.dataset.dfnType=o),Vc(i,t,r,s);const n=`#${i.id}`;return ur`<a
980
979
  data-link-for="${r}"
981
980
  data-link-type="${o}"
982
981
  href="${n}"
983
982
  class="internalDFN"
984
983
  ><code>${e}</code></a
985
- >`}const a="operation"===t.type&&"toJSON"===t.name&&t.extAttrs.some((({name:e})=>"Default"===e));if(a)return sr`<a data-link-type="dfn" data-lt="default toJSON steps"
984
+ >`}const a="operation"===t.type&&"toJSON"===t.name&&t.extAttrs.some((({name:e})=>"Default"===e));if(a)return ur`<a data-link-type="dfn" data-lt="default toJSON steps"
986
985
  >${e}</a
987
- >`;if(!t.partial){const n=sr`<dfn data-export data-dfn-type="${o}"
986
+ >`;if(!t.partial){const n=ur`<dfn data-export data-dfn-type="${o}"
988
987
  >${e}</dfn
989
- >`;return pc(n,[s]),Wc(n,t,r,s),n}const c=sr`<a
988
+ >`;return bc(n,[s]),Vc(n,t,r,s),n}const c=ur`<a
990
989
  data-idl="${t.partial?"partial":null}"
991
990
  data-link-type="${o}"
992
991
  data-title="${t.name}"
993
992
  data-xref-type="${o}"
994
993
  >${e}</a
995
- >`;if(s&&"typedef"!==t.type&&!(t.partial&&!i)){const e=ls`See ${"using `data-dfn-for`|#data-dfn-for"} in ReSpec's documentation.`;rs(`Missing \`<dfn>\` for${r?` \`${r}\`'s`:""} \`${"operation"===t.type?`${s}()`:s}\` ${t.type}.`,Xc,{elements:[c],hint:e})}return c}const rl=new WeakMap;function sl(e,t=""){if(rl.has(e))return rl.get(e);const n=function(e,t){let n=function(e){switch(e.type){case"enum-value":return e.value;case"operation":return e.name||e.special;default:return e.name||e.type}}(e);const r=e.special&&""===e.name?"anonymous-":"";let s=function(e,t){if(!t)return`idl-def-${e.toLowerCase()}`;return`idl-def-${t.toLowerCase()}-${e.toLowerCase()}`}(r+n,t);switch(e.type){case"callback interface":case"dictionary":case"interface":case"interface mixin":case"namespace":s+=function(e){if(!e.partial)return"";el[e.name]||(el[e.name]=0);return el[e.name]+=1,`-partial-${el[e.name]}`}(e);break;case"constructor":case"operation":{const r=function(e,t){const n=`${t}.${e}`,r=`${n}()`;let s;Qc[r]||(Qc[r]=0);Qc[n]?s=`!overload-${Qc[n]}`:Qc[n]=0;return Qc[r]+=1,Qc[n]+=1,s||""}(n,t);r?(n+=r,s+=r):e.arguments.length&&(s+=e.arguments.map((e=>`-${e.name.toLowerCase()}`)).join(""));break}}return{name:n,idlId:s}}(e,t);return rl.set(e,n),n}const il=["interface","interface mixin","dictionary","namespace","enum","typedef","callback"];function ol(e,t){let n;try{n=lr.parse(e.textContent,{sourceName:String(t)})}catch(t){return ns(`Failed to parse WebIDL: ${t.bareMessage}.`,Xc,{title:t.bareMessage,details:`<pre>${t.context}</pre>`,elements:[e]}),[]}e.classList.add("def","idl");const r=lr.write(n,{templates:tl});sr.bind(e)`${r}`,Vr(e,document.createElement("code")),e.querySelectorAll("[data-idl]").forEach((e=>{if(e.dataset.dfnFor)return;const t=e.dataset.title,n=e.dataset.dfnType,r=e.parentElement.closest("[data-idl][data-title]");r&&!il.includes(n)&&(e.dataset.dfnFor=r.dataset.title),"dfn"===e.localName&&pc(e,[t])}));const s=e.closest("[data-cite], body"),{dataset:i}=s;if(i.cite||(i.cite="WEBIDL"),!/\bwebidl\b/i.test(i.cite)){const e=i.cite.trim().split(/\s+/);i.cite=["WEBIDL",...e].join(" ")}return al(e),n}function al(e){qr(e,"webidl");const t=sr`<span class="idlHeader"
994
+ >`;if(s&&"typedef"!==t.type&&!(t.partial&&!i)){const e=ms`See ${"using `data-dfn-for`|#data-dfn-for"} in ReSpec's documentation.`;ls(`Missing \`<dfn>\` for${r?` \`${r}\`'s`:""} \`${"operation"===t.type?`${s}()`:s}\` ${t.type}.`,rl,{elements:[c],hint:e})}return c}const cl=new WeakMap;function ll(e,t=""){if(cl.has(e))return cl.get(e);const n=function(e,t){let n=function(e){switch(e.type){case"enum-value":return e.value;case"operation":return e.name||e.special;default:return e.name||e.type}}(e);const r=e.special&&""===e.name?"anonymous-":"";let s=function(e,t){if(!t)return`idl-def-${e.toLowerCase()}`;return`idl-def-${t.toLowerCase()}-${e.toLowerCase()}`}(r+n,t);switch(e.type){case"callback interface":case"dictionary":case"interface":case"interface mixin":case"namespace":s+=function(e){if(!e.partial)return"";il[e.name]||(il[e.name]=0);return il[e.name]+=1,`-partial-${il[e.name]}`}(e);break;case"constructor":case"operation":{const r=function(e,t){const n=`${t}.${e}`,r=`${n}()`;let s;sl[r]||(sl[r]=0);sl[n]?s=`!overload-${sl[n]}`:sl[n]=0;return sl[r]+=1,sl[n]+=1,s||""}(n,t);r?(n+=r,s+=r):e.arguments.length&&(s+=e.arguments.map((e=>`-${e.name.toLowerCase()}`)).join(""));break}}return{name:n,idlId:s}}(e,t);return cl.set(e,n),n}const ul=["interface","interface mixin","dictionary","namespace","enum","typedef","callback"];function dl(e,t){let n;try{n=mr.parse(e.textContent,{sourceName:String(t)})}catch(t){return cs(`Failed to parse WebIDL: ${t.bareMessage}.`,rl,{title:t.bareMessage,details:`<pre>${t.context}</pre>`,elements:[e]}),[]}e.classList.add("def","idl");const r=mr.write(n,{templates:ol});ur.bind(e)`${r}`,Qr(e,document.createElement("code")),e.querySelectorAll("[data-idl]").forEach((e=>{if(e.dataset.dfnFor)return;const t=e.dataset.title,n=e.dataset.dfnType,r=e.parentElement.closest("[data-idl][data-title]");r&&!ul.includes(n)&&(e.dataset.dfnFor=r.dataset.title),"dfn"===e.localName&&bc(e,[t])}));const s=e.closest("[data-cite], body"),{dataset:i}=s;if(i.cite||(i.cite="WEBIDL"),!/\bwebidl\b/i.test(i.cite)){const e=i.cite.trim().split(/\s+/);i.cite=["WEBIDL",...e].join(" ")}return pl(e),n}function pl(e){Vr(e,"webidl");const t=ur`<span class="idlHeader"
996
995
  ><a class="self-link" href="${`#${e.id}`}">WebIDL</a></span
997
- >`;e.prepend(t),Jc(t)}var cl=Object.freeze({__proto__:null,addIDLHeader:al,name:Yc,run:async function(){const e=document.querySelectorAll("pre.idl, pre.webidl");if(!e.length)return;const t=document.createElement("style");t.textContent=Zc,document.querySelector("head link, head > *:last-child").before(t);const n=[...e].map(ol),r=lr.validate(n);for(const t of r){let r=`<pre>${Pr(t.context)}</pre>`;if(t.autofix){t.autofix();r+=`Try fixing as:\n <pre>${Pr(lr.write(n[t.sourceName]))}</pre>`}ns(`WebIDL validation error: ${t.bareMessage}`,Xc,{details:r,elements:[e[t.sourceName]],title:t.bareMessage})}document.normalize()}});var ll=String.raw`:root{--cddl-comment:#6a737d;--cddl-kw:#005a9c;--cddl-str:#032f62;--cddl-num:#005cc5;--cddl-op:#6f42c1;--cddl-ctrl:#d73a49;--cddl-occ:#e36209;--cddl-bytes:#22863a;--cddl-param:#e36209;--cddl-type-dfn:#c43a31;--cddl-key-dfn:#005a9c;--cddl-header-bg:var(--def-border, #8ccbf2);--cddl-header-color:#005a9c;--cddl-focus:#51a7e8}
996
+ >`;e.prepend(t),Qc(t)}var hl=Object.freeze({__proto__:null,addIDLHeader:pl,name:nl,run:async function(){const e=document.querySelectorAll("pre.idl, pre.webidl");if(!e.length)return;const t=document.createElement("style");t.textContent=tl,document.querySelector("head link, head > *:last-child").before(t);const n=[...e].map(dl),r=mr.validate(n);for(const t of r){let r=`<pre>${zr(t.context)}</pre>`;if(t.autofix){t.autofix();r+=`Try fixing as:\n <pre>${zr(mr.write(n[t.sourceName]))}</pre>`}cs(`WebIDL validation error: ${t.bareMessage}`,rl,{details:r,elements:[e[t.sourceName]],title:t.bareMessage})}document.normalize()}});var fl=String.raw`:root{--cddl-comment:#6a737d;--cddl-kw:#005a9c;--cddl-str:#032f62;--cddl-num:#005cc5;--cddl-op:#6f42c1;--cddl-ctrl:#d73a49;--cddl-occ:#e36209;--cddl-bytes:#22863a;--cddl-param:#e36209;--cddl-type-dfn:#c43a31;--cddl-key-dfn:#005a9c;--cddl-header-bg:var(--def-border, #8ccbf2);--cddl-header-color:#005a9c;--cddl-focus:#51a7e8}
998
997
  @media (prefers-color-scheme:dark){
999
998
  :root{--cddl-comment:#8b949e;--cddl-kw:#79c0ff;--cddl-str:#a5d6ff;--cddl-num:#79c0ff;--cddl-op:#d2a8ff;--cddl-ctrl:#ff7b72;--cddl-occ:#ffa657;--cddl-bytes:#7ee787;--cddl-param:#ffa657;--cddl-type-dfn:#ffa198;--cddl-key-dfn:#79c0ff;--cddl-header-bg:#3a6da0;--cddl-header-color:#fff;--cddl-focus:#51a7e8}
1000
999
  }
@@ -1021,62 +1020,62 @@ pre.cddl dfn{font-style:normal;font-weight:700}
1021
1020
  .cddlHeader a.self-link:focus-visible,pre.cddl a:focus-visible,pre.cddl dfn:focus-visible{outline:2px solid var(--cddl-focus);outline-offset:2px}
1022
1021
  .respec-button-copy-paste:focus-visible{outline:2px solid var(--cddl-focus);outline-offset:2px}
1023
1022
  pre.cddl dfn[data-dfn-type=cddl-type]{color:var(--cddl-type-dfn)}
1024
- pre.cddl dfn[data-dfn-type=cddl-key]{color:var(--cddl-key-dfn)}`;const ul="core/cddl",dl=new Set(["any","uint","nint","int","bstr","bytes","tstr","text","tdate","time","number","biguint","bignint","bigint","integer","unsigned","decfrac","bigfloat","eb64url","eb64legacy","eb16","encoded-cbor","uri","b64url","b64legacy","regexp","mime-message","cbor-any","float16","float32","float64","float16-32","float32-64","float","false","true","bool","nil","null","undefined"]);function pl(e){return e.toLowerCase().replace(/^"(.*)"$/,"$1").replace(/[^a-z0-9]+/g,"-").replace(/^-|-$/g,"")}function hl(e){let t=e.parentNode;for(;t;){if(t instanceof pr)return t.name?.name||null;t=t.parentNode}return null}const fl=String.raw;class ml extends dr{#e=null;#t;constructor(e){super(),this.#t=e}serializeName(e,t){const n=this.#t;if(function(e){let t=e.parentNode;for(;t;){if(t instanceof fr)return!0;if(t instanceof pr)return!1;t=t.parentNode}return!1}(t)){const r=hl(t);return r&&(n.genericParams.has(r)||n.genericParams.set(r,new Set),n.genericParams.get(r)?.add(e)),fl`<span class="cddl-param">${Pr(e)}</span>`}if(function(e){let t=e.parentNode;for(;t;){if(t instanceof mr)return!0;if(t instanceof pr)return!1;t=t.parentNode}return!1}(t))return this.#n(e);if(function(e){return e.parentNode instanceof pr}(t))return this.#e=e,this.#r(e);if(function(e){return e.parentNode instanceof hr}(t))return this.#s(e);const r=hl(t)||this.#e;return r&&n.genericParams.has(r)&&n.genericParams.get(r)?.has(e)?fl`<span class="cddl-param">${Pr(e)}</span>`:this.#n(e)}#r(e){const t=this.#t,n=`cddl-type-${pl(e)}`,r=`cddl-type:${e}`;return t.definitions.has(r)?fl`<a href="#${n}" class="cddl-name" data-link-type="cddl-type"
1025
- >${Pr(e)}</a
1026
- >`:t.proseDfns.has(n)?(t.definitions.set(r,{type:"cddl-type",for:null,id:n}),fl`<a href="#${n}" class="cddl-name" data-link-type="cddl-type"
1027
- >${Pr(e)}</a
1028
- >`):(t.definitions.set(r,{type:"cddl-type",for:null,id:n}),fl`<dfn data-dfn-type="cddl-type" id="${n}" data-export
1029
- >${Pr(e)}</dfn
1030
- >`)}#s(e){const t=this.#t,n=this.#e;if(!n)return fl`<span class="cddl-name">${Pr(e)}</span>`;const r=`cddl-key-${pl(n)}-${pl(e)}`,s=`cddl-key:${n}/${e}`;return t.definitions.has(s)?fl`<a
1023
+ pre.cddl dfn[data-dfn-type=cddl-key]{color:var(--cddl-key-dfn)}`;const ml="core/cddl",gl=new Set(["any","uint","nint","int","bstr","bytes","tstr","text","tdate","time","number","biguint","bignint","bigint","integer","unsigned","decfrac","bigfloat","eb64url","eb64legacy","eb16","encoded-cbor","uri","b64url","b64legacy","regexp","mime-message","cbor-any","float16","float32","float64","float16-32","float32-64","float","false","true","bool","nil","null","undefined"]);function bl(e){return e.toLowerCase().replace(/^"(.*)"$/,"$1").replace(/[^a-z0-9]+/g,"-").replace(/^-|-$/g,"")}function yl(e){let t=e.parentNode;for(;t;){if(t instanceof yr)return t.name?.name||null;t=t.parentNode}return null}const wl=String.raw;class vl extends br{#e=null;#t;constructor(e){super(),this.#t=e}serializeName(e,t){const n=this.#t;if(function(e){let t=e.parentNode;for(;t;){if(t instanceof vr)return!0;if(t instanceof yr)return!1;t=t.parentNode}return!1}(t)){const r=yl(t);return r&&(n.genericParams.has(r)||n.genericParams.set(r,new Set),n.genericParams.get(r)?.add(e)),wl`<span class="cddl-param">${zr(e)}</span>`}if(function(e){let t=e.parentNode;for(;t;){if(t instanceof kr)return!0;if(t instanceof yr)return!1;t=t.parentNode}return!1}(t))return this.#n(e);if(function(e){return e.parentNode instanceof yr}(t))return this.#e=e,this.#r(e);if(function(e){return e.parentNode instanceof wr}(t))return this.#s(e);const r=yl(t)||this.#e;return r&&n.genericParams.has(r)&&n.genericParams.get(r)?.has(e)?wl`<span class="cddl-param">${zr(e)}</span>`:this.#n(e)}#r(e){const t=this.#t,n=`cddl-type-${bl(e)}`,r=`cddl-type:${e}`;return t.definitions.has(r)?wl`<a href="#${n}" class="cddl-name" data-link-type="cddl-type"
1024
+ >${zr(e)}</a
1025
+ >`:t.proseDfns.has(n)?(t.definitions.set(r,{type:"cddl-type",for:null,id:n}),wl`<a href="#${n}" class="cddl-name" data-link-type="cddl-type"
1026
+ >${zr(e)}</a
1027
+ >`):(t.definitions.set(r,{type:"cddl-type",for:null,id:n}),wl`<dfn data-dfn-type="cddl-type" id="${n}" data-export
1028
+ >${zr(e)}</dfn
1029
+ >`)}#s(e){const t=this.#t,n=this.#e;if(!n)return wl`<span class="cddl-name">${zr(e)}</span>`;const r=`cddl-key-${bl(n)}-${bl(e)}`,s=`cddl-key:${n}/${e}`;return t.definitions.has(s)?wl`<a
1031
1030
  href="#${r}"
1032
1031
  class="cddl-name"
1033
1032
  data-link-type="cddl-key"
1034
- data-xref-for="${Pr(n)}"
1035
- >${Pr(e)}</a
1036
- >`:t.proseDfns.has(r)?(t.definitions.set(s,{type:"cddl-key",for:n,id:r}),fl`<a
1033
+ data-xref-for="${zr(n)}"
1034
+ >${zr(e)}</a
1035
+ >`:t.proseDfns.has(r)?(t.definitions.set(s,{type:"cddl-key",for:n,id:r}),wl`<a
1037
1036
  href="#${r}"
1038
1037
  class="cddl-name"
1039
1038
  data-link-type="cddl-key"
1040
- data-xref-for="${Pr(n)}"
1041
- >${Pr(e)}</a
1042
- >`):(t.definitions.set(s,{type:"cddl-key",for:n,id:r}),fl`<dfn
1039
+ data-xref-for="${zr(n)}"
1040
+ >${zr(e)}</a
1041
+ >`):(t.definitions.set(s,{type:"cddl-key",for:n,id:r}),wl`<dfn
1043
1042
  data-dfn-type="cddl-key"
1044
- data-dfn-for="${Pr(n)}"
1043
+ data-dfn-for="${zr(n)}"
1045
1044
  id="${r}"
1046
1045
  data-export
1047
- >${Pr(e)}</dfn
1048
- >`)}#n(e){const t=this.#t;if(dl.has(e))return fl`<a
1046
+ >${zr(e)}</dfn
1047
+ >`)}#n(e){const t=this.#t;if(gl.has(e))return wl`<a
1049
1048
  class="cddl-kw"
1050
1049
  data-link-type="cddl-type"
1051
1050
  data-link-spec="rfc8610"
1052
1051
  href="${"https://www.rfc-editor.org/rfc/rfc8610#appendix-D"}"
1053
- >${Pr(e)}</a
1054
- >`;const n=`cddl-type:${e}`;if(t.definitions.has(n)){const r=t.definitions.get(n);return r?fl`<a
1052
+ >${zr(e)}</a
1053
+ >`;const n=`cddl-type:${e}`;if(t.definitions.has(n)){const r=t.definitions.get(n);return r?wl`<a
1055
1054
  href="#${r.id}"
1056
1055
  class="cddl-name"
1057
1056
  data-link-type="cddl-type"
1058
- >${Pr(e)}</a
1059
- >`:fl`<span class="cddl-name">${Pr(e)}</span>`}return fl`<span class="cddl-name" data-cddl-pending="${Pr(e)}"
1060
- >${Pr(e)}</span
1061
- >`}serializeValue(e,t,n,r){const s=this.#t,i=e+t+n;if("text"===r.type&&this.#i(r)){const e=this.#e;if(e){const n=`cddl-value-${pl(e)}-${pl(t)}`,r=`cddl-value:${e}/"${t}"`;if(s.definitions.has(r)){const t=s.definitions.get(r);return t?fl`<a
1057
+ >${zr(e)}</a
1058
+ >`:wl`<span class="cddl-name">${zr(e)}</span>`}return wl`<span class="cddl-name" data-cddl-pending="${zr(e)}"
1059
+ >${zr(e)}</span
1060
+ >`}serializeValue(e,t,n,r){const s=this.#t,i=e+t+n;if("text"===r.type&&this.#i(r)){const e=this.#e;if(e){const n=`cddl-value-${bl(e)}-${bl(t)}`,r=`cddl-value:${e}/"${t}"`;if(s.definitions.has(r)){const t=s.definitions.get(r);return t?wl`<a
1062
1061
  href="#${t.id}"
1063
1062
  class="cddl-str"
1064
1063
  data-link-type="cddl-value"
1065
- data-xref-for="${Pr(e)}"
1066
- >${Pr(i)}</a
1067
- >`:fl`<span class="cddl-str">${Pr(i)}</span>`}if(s.proseDfns.has(n))return s.definitions.set(r,{type:"cddl-value",for:e,id:n}),fl`<a
1064
+ data-xref-for="${zr(e)}"
1065
+ >${zr(i)}</a
1066
+ >`:wl`<span class="cddl-str">${zr(i)}</span>`}if(s.proseDfns.has(n))return s.definitions.set(r,{type:"cddl-value",for:e,id:n}),wl`<a
1068
1067
  href="#${n}"
1069
1068
  class="cddl-str"
1070
1069
  data-link-type="cddl-value"
1071
- data-xref-for="${Pr(e)}"
1072
- >${Pr(i)}</a
1073
- >`;if(!s.definitions.has(r))return s.definitions.set(r,{type:"cddl-value",for:e,id:n}),fl`<dfn
1070
+ data-xref-for="${zr(e)}"
1071
+ >${zr(i)}</a
1072
+ >`;if(!s.definitions.has(r))return s.definitions.set(r,{type:"cddl-value",for:e,id:n}),wl`<dfn
1074
1073
  data-dfn-type="cddl-value"
1075
- data-dfn-for="${Pr(e)}"
1074
+ data-dfn-for="${zr(e)}"
1076
1075
  id="${n}"
1077
1076
  data-export
1078
- >${Pr(i)}</dfn
1079
- >`}}switch(r.type){case"text":return fl`<span class="cddl-str">${Pr(i)}</span>`;case"number":case"float":return fl`<span class="cddl-num">${Pr(i)}</span>`;case"bytes":case"hex":case"base64":return fl`<span class="cddl-bytes">${Pr(i)}</span>`;default:return Pr(i)}}#i(e){const t=e.parentNode;return!!t&&t instanceof gr}serializeToken(e,t){const n=e.type,r=e.serialize();switch(n){case"COMMENT":return this.#o(r);case"CTLOP":return this.#a(r);case"=":case"/=":case"//=":case"/":case"//":case"=>":case"..":case"...":return this.#c(r);case"?":case"*":case"+":return t instanceof br?this.#l(r):r;default:return r}}#o(e){return e.replace(/(;[^\n]*)/g,'<span class="cddl-comment">$1</span>')}#a(e){return e.replace(/(\.\w+)/g,'<span class="cddl-ctrl">$1</span>')}#c(e){const t=e.match(/^(\s*)(.*?)(\s*)$/s);return t?`${t[1]}<span class="cddl-op">${t[2]}</span>${t[3]}`:fl`<span class="cddl-op">${e}</span>`}#l(e){const t=e.match(/^(\s*)(.*?)(\s*)$/s);return t?`${t[1]}<span class="cddl-occ">${t[2]}</span>${t[3]}`:fl`<span class="cddl-occ">${e}</span>`}}var gl=Object.freeze({__proto__:null,name:ul,run:async function(){const e=document.querySelectorAll("pre.cddl:not([data-no-cddl])");if(!e.length)return;const t=document.createElement("style");t.textContent=ll;const n=document.querySelector("head link, head > *:last-child");n?n.before(t):document.head.append(t);const r=e=>new ur(e).parse(),s={definitions:new Map,proseDfns:new Set,genericParams:new Map};var i,o,a,c;i=document,o=s.proseDfns,i.querySelectorAll("dfn[cddl-type], dfn[cddl-key], dfn[cddl-value]").forEach((e=>{const t=["cddl-type","cddl-key","cddl-value"].find((t=>e.hasAttribute(t)));e.dataset.dfnType=t,e.removeAttribute(t);const n=e.getAttribute("for");n&&(e.dataset.dfnFor=n,e.removeAttribute("for"));const r=e.textContent.trim(),s=n?`${pl(n)}-`:"",i=`cddl-${t.replace("cddl-","")}-${s}${pl(r)}`;e.id||=i,o.add(e.id),pc(e,[r])})),e.forEach((e=>function(e,t,n){const r=e.textContent;if(r.trim())try{const s=t(r),i=new ml(n),o=s.serialize(i),a=document.createElement("code");a.innerHTML=o,e.textContent="",e.append(a),e.classList.add("def","highlight"),qr(e,"cddl-block");const c=document.createElement("span");c.className="cddlHeader",c.innerHTML=`<a class="self-link" href="#${e.id}">CDDL</a>`;const l=Gc(".cddlHeader");c.append(l),e.prepend(c)}catch(t){ns(`CDDL processing error: ${t instanceof Error?t.message:String(t)}`,ul,{elements:[e],hint:'Check the CDDL syntax in the `<pre class="cddl">` block.'})}}(e,r,s))),a=document.body,c=s.definitions,a.querySelectorAll("[data-cddl-pending]").forEach((e=>{const t=`cddl-type:${e.dataset.cddlPending}`;if(c.has(t)){const n=c.get(t);if(!n)return;const r=a.ownerDocument.createElement("a");r.href=`#${n.id}`,r.className="cddl-name",r.dataset.linkType="cddl-type",r.textContent=e.textContent,e.replaceWith(r)}})),document.querySelectorAll("[data-cddl-pending]").forEach((e=>{rs(`No CDDL definition found for \`${e.getAttribute("data-cddl-pending")}\`.`,ul,{elements:[e],hint:"Check for typos in the type name."})})),function(e,t){e.querySelectorAll('a[data-link-type^="cddl-"]:not([href]):not([data-cite])').forEach((e=>{const n=e.getAttribute("data-link-type"),r=e.getAttribute("data-xref-for")||e.getAttribute("data-link-for")||"",s=e.textContent.trim();if("cddl-type"!==n&&"cddl-key"!==n&&"cddl-value"!==n)return;const i={"cddl-type":`cddl-type:${s}`,"cddl-key":`cddl-key:${r}/${s}`,"cddl-value":`cddl-value:${r}/${s}`}[n];if(t.has(i)){const n=t.get(i);if(!n)return;e.setAttribute("href",`#${n.id}`),e.classList.add("internalDFN")}else rs(`CDDL ${n}: no definition found for \`${s}\`${r?`, for \`${r}\`,`:""} in any \`<pre class="cddl">\` block.`,ul,{elements:[e]}),e.setAttribute("data-no-link-to-dfn","")}))}(document,s.definitions),function(e,t){t.forEach((t=>{const n=e.getElementById(t.id);"dfn"===n?.localName&&pc(n,[n.textContent.trim()])}))}(document,s.definitions),Vc(),hs("beforesave",(e=>{e.querySelectorAll("[data-cddl-pending]").forEach((e=>e.removeAttribute("data-cddl-pending")))}))}});const bl="core/data-cite",yl="__SPEC__";async function wl(e){const{key:t,frag:n,path:r,href:s}=e;let i="",o="";if(t===yl)i=document.location.href;else{const e=await ka(t);if(!e)return null;i=e.href??"",o=e.title}if(s)i=s;else{if(r){const e=r.startsWith("/")?`.${r}`:r;i=new URL(e,i).href}n&&(i=new URL(n,i).href)}return{href:i,title:o}}function vl(e,t,n){const{href:r,title:s}=t,i=!n.path&&!n.frag;switch(e.localName){case"a":{const t=e;if(""===t.textContent&&"the-empty-string"!==t.dataset.lt&&(t.textContent=s),t.href=r,i){const e=document.createElement("cite");t.replaceWith(e),e.append(t)}break}case"dfn":{const t=document.createElement("a");if(t.href=r,t.dataset.cite=n.key,t.dataset.citePath=n.path,t.dataset.citeFrag=n.frag,e.textContent?Vr(e,t):(t.textContent=s,e.append(t)),i){const n=document.createElement("cite");n.append(t),e.append(n)}if("export"in e.dataset){ns("Exporting a linked external definition is not allowed.",bl,{hint:"Please remove the `data-export` attribute.",elements:[e]}),delete e.dataset.export}e.classList.add("externalDFN"),e.dataset.noExport="";break}}}function kl(e){return t=>{const n=t.search(e);return-1!==n?t.substring(n):""}}const $l=kl("#"),xl=kl("/");function Cl(e){const{dataset:t}=e,{cite:n,citeFrag:r,citePath:s,citeHref:i}=t;if((n??"").startsWith("#")&&!r){const r=e.parentElement?.closest('[data-cite]:not([data-cite^="#"])')??null,{key:s,isNormative:i}=r?Cl(r):{key:yl,isNormative:!1};return t.cite=i?s:`?${s}`,t.citeFrag=(n??"").replace("#",""),Cl(e)}const o=r?`#${r}`:$l(n??""),a=s||xl(n??"").split("#")[0],{type:c}=Gr(n??"",e),l="normative"===c,u=/^[?|!]/.test(n??"");return{key:(n??"").split(/[/|#]/)[0].substring(Number(u)),isNormative:l,frag:o,path:a,href:i}}function Sl(e){const t=["data-cite","data-cite-frag","data-cite-path"];e.querySelectorAll("a[data-cite], dfn[data-cite]").forEach((e=>t.forEach((t=>e.removeAttribute(t)))))}var _l=Object.freeze({__proto__:null,THIS_SPEC:yl,name:bl,run:async function(){const e=document.querySelectorAll("dfn[data-cite]:not([data-cite='']), a[data-cite]:not([data-cite=''])");await async function(e){const t=e.map(Cl).map((async e=>({entry:e,result:await ka(e.key)}))),n=(await Promise.all(t)).filter((({result:e})=>null===e)).map((({entry:{key:e}})=>e)),r=await va(n);r&&Object.assign(ma,r)}([...e]);const t=new Map,n=new Map;for(const r of e){t.set(r,r.dataset.cite);const e=Cl(r);n.set(r,e)}for(const r of e){const e=t.get(r),s=n.get(r),i=await wl(s);if(i)r.dataset.citeFrag&&r.dataset.matchedText||!r.dataset.lt||"the-empty-string"===r.dataset.lt||""!==r.textContent||(r.textContent=r.dataset.lt,delete r.dataset.lt),vl(r,i,s);else{const t=`Couldn't find a match for "${e}"`;r.dataset.matchedText&&(r.textContent=r.dataset.matchedText),rs(t,bl,{elements:[r]})}}hs("beforesave",Sl)},toCiteDetails:Cl});const Tl="core/link-to-dfn",Rl=[],El={en:{duplicateMsg:e=>`Duplicate definition(s) of '${e}'`,duplicateTitle:"This is defined more than once in the document."},ja:{duplicateMsg:e=>`'${e}' の重複定義`,duplicateTitle:"この文書内で複数回定義されています."},de:{duplicateMsg:e=>`Mehrfache Definition von '${e}'`,duplicateTitle:"Das Dokument enthält mehrere Definitionen dieses Eintrags."},zh:{duplicateMsg:e=>`'${e}' 的重复定义`,duplicateTitle:"在文档中有重复的定义。"},cs:{duplicateMsg:e=>`Duplicitní definice '${e}'`,duplicateTitle:"Toto je v dokumentu definováno vícekrát."}},Ll=Ir(El);function Al(e){const t=new Map,n=[];for(const r of dc.get(e)??[]){const{dfnType:s="dfn"}=r.dataset,i=r.dataset.dfnFor?.split(",").map((e=>e.trim()))??[""];for(const o of i){if(t.has(o)&&t.get(o)?.has(s)){const e=t.get(o)?.get(s),i="dfn"===e?.localName,a="dfn"===r.localName,c=s===(e?.dataset.dfnType||"dfn"),l=!o&&!e?.dataset.dfnFor||e?.dataset.dfnFor?.split(",").map((e=>e.trim())).includes(o);if(i&&a&&c&&l){n.push(r);continue}}t.has(o)||t.set(o,new Map),t.get(o)?.set(s,r),("idl"in r.dataset||"dfn"!==s)&&t.get(o)?.set("idl",r),Fr(r,"dfn",e)}}return{result:t,duplicates:n}}function Pl(e,t){const n=function(e){const t=e.closest("[data-link-for]"),n=t?t.dataset.linkFor??"":"",r=Br(e).reduce(((e,r)=>{const s=r.split(".");2===s.length&&e.push({for:s[0],title:s[1]}),e.push({for:n,title:r}),t||e.push({for:r,title:r}),""!==n&&e.push({for:"",title:r});const i=r.replace(yr,"");return i!==r&&""!==i&&(e.push({for:n,title:i}),t||e.push({for:i,title:i}),""!==n&&e.push({for:"",title:i})),e}),[]);return r}(e),r=n.find((e=>t.has(e.title)&&t.get(e.title)?.has(e.for)));if(!r)return;const s=t.get(r.title)?.get(r.for),{linkType:i}=e.dataset;if(i){for(const e of i.split("|"))if(s?.get(e))return s.get(e);return s?.get("dfn")}{const e=r.for?"idl":"dfn";return s?.get(e)||s?.get("idl")}}function Nl(e,t,n){let r=!1;const{linkFor:s}=e.dataset,{dfnFor:i}=t.dataset;if(t.dataset.cite)e.dataset.cite=t.dataset.cite;else if(s&&!n.get(s)&&i&&!i.split(",").map((e=>e.trim())).includes(s))r=!0;else if(t.classList.contains("externalDFN")){const n=t.dataset.lt?t.dataset.lt.split("|"):[];e.dataset.lt=n[0]||t.textContent,r=!0}else"partial"!==e.dataset.idl?(e.href=`#${t.id}`,e.classList.add("internalDFN")):r=!0;return e.hasAttribute("data-link-type")||(e.dataset.linkType="idl"in t.dataset?"idl":"dfn"),function(e){if(e.closest("code,pre"))return!0;if(1!==e.childNodes.length)return!1;const[t]=e.childNodes;return"code"===t.localName}(t)&&function(e,t){const n=e.textContent.trim(),r=t.dataset.hasOwnProperty("idl"),s=Il(e)&&Il(t,n);r&&!s||Vr(e,document.createElement("code"))}(e,t),!r}function Il(e,t=""){if("a"===e.localName){if(!e.querySelector("code"))return!0}else{const{dataset:n}=e;if(e.textContent.trim()===t)return!0;if(n.title===t)return!0;if(n.lt||n.localLt){const e=[];return n.lt&&e.push(...n.lt.split("|")),n.localLt&&e.push(...n.localLt.split("|")),e.includes(t)}}return!1}function Dl(e){e.forEach((e=>{const t=`Found linkless \`<a>\` element with text "${e.textContent}" but no matching \`<dfn>\``,n=e.closest("[data-link-for]"),r=`Add a matching \`<dfn>\` element, ${ls`use ${"[data-cite]"} to link to an external definition, or enable ${"[xref]"} for automatic cross-spec linking.`}${n?` This link is inside a \`data-link-for="${n.dataset.linkFor}"\` section — \`[=term=]\` links are scoped to that context. To link to a global concept instead, either add \`data-link-for=""\` on this \`<a>\` or move it outside the scoped section.`:""}`;rs(t,Tl,{title:"Linking error: no matching `<dfn>`",hint:r,elements:[e]})}))}var Ol=Object.freeze({__proto__:null,name:Tl,possibleExternalLinks:Rl,run:async function(e){const t=function(){const e=new es;for(const t of dc.keys()){const{result:n,duplicates:r}=Al(t);e.set(t,n),r.length>0&&ns(Ll.duplicateMsg(t),Tl,{title:Ll.duplicateTitle,elements:r})}return e}(),n=[],r=document.querySelectorAll("a[data-cite='']:not([data-no-link-to-dfn]), a:not([href]):not([data-cite]):not([data-no-link-to-dfn]):not(.logo):not(.externalDFN)");for(const e of r){if(!e.dataset?.linkType&&e.dataset?.xrefType){Rl.push(e);continue}const r=Pl(e,t);if(r){Nl(e,r,t)||Rl.push(e)}else""===e.dataset.cite?n.push(e):Rl.push(e)}Dl(n),function(e){const{shortName:t=""}=e,n=t?new RegExp(String.raw`^([?!])?${vr(t)}\b([^-])`,"i"):null,r=document.querySelectorAll("dfn[data-cite]:not([data-cite='']), a[data-cite]:not([data-cite=''])");for(const t of r){n&&(t.dataset.cite=(t.dataset.cite??"").replace(n,`$1${yl}$2`));const{key:r,isNormative:s}=Cl(t);r!==yl&&(s||e.normativeReferences.has(r)?(e.normativeReferences.add(r),e.informativeReferences.delete(r)):e.informativeReferences.add(r))}}(e),e.xref||Dl(Rl)}});const jl="xrefs",zl=3e5;async function Ml(){return await ir.openDB("xref",2,{upgrade(e){[...e.objectStoreNames].forEach((t=>e.deleteObjectStore(t)));e.createObjectStore(jl,{keyPath:"query.id"}).createIndex("byTerm","query.term",{unique:!1})}})}async function Ul(e){const t=new Map;if(await async function(){const e="XREF:LAST_VERSION_CHECK",t=parseInt(localStorage.getItem(e)??"",10),n=Date.now();if(!t)return localStorage.setItem(e,n.toString()),!1;if(n-t<zl)return!1;const r=new URL("meta/version",Fl).href,s=await fetch(r);if(!s.ok)return!1;const i=await s.text();return localStorage.setItem(e,n.toString()),parseInt(i,10)>t}())return await async function(){try{await Ml().then((e=>e.clear(jl)))}catch(e){console.error(e)}}(),t;const n=new Set(e.map((e=>e.id)));try{const e=await Ml();let r=await e.transaction(jl).store.openCursor();for(;r;)n.has(r.key)&&t.set(r.key,r.value.result),r=await r.continue()}catch(e){console.error(e)}return t}const ql="core/xref",Wl={"web-platform":["HTML","INFRA","URL","WEBIDL","DOM","FETCH"]},Fl="https://respec.org/xref/",Bl=[];if(!document.querySelector("link[rel='preconnect'][href='https://respec.org']")){const e=Sr({hint:"preconnect",href:"https://respec.org"});document.head.appendChild(e)}function Hl(e){const t="xrefType"in e.dataset;let n=Gl(e,{isIDL:t});t||(n=n.toLowerCase());const r=function(e){const t=[];let n=e.closest("[data-cite]");for(;n;){const r=(n.dataset.cite??"").toLowerCase().replace(/[!?]/g,"").split(/\s+/).filter((e=>e));if(r.length){t.push(r);const e=Jl(r);e.length&&t.push(e)}if(n===e)break;n=n.parentElement?.closest("[data-cite]")??null}if(n!==e){const n=e.closest("section"),r=n?n.querySelectorAll("a.bibref"):[],s=[...new Set([...r].map((e=>e.textContent.toLowerCase())))];if(s.length){t.push(s);const e=Jl(s);e.length&&t.push(e)}}const r=function(e){const t=[],n=new Set;for(const r of e){const e=[...new Set(r).values().filter((e=>!n.has(e)))];e.forEach((e=>n.add(e))),t.push(e.sort())}return t}(t);return r}(e),s=function(e,t){if(t)return e.dataset.xrefType?e.dataset.xrefType.split("|"):["_IDL_"];return["_CONCEPT_"]}(e,t),i=function(e,t){if(e.dataset.xrefFor)return Nr(e.dataset.xrefFor);if(t){const t=e.closest("[data-xref-for]");if(t)return Nr(t.dataset.xrefFor??"")}return null}(e,t);return{id:"",term:n,types:s,...r.length&&{specs:r},..."string"==typeof i&&{for:i}}}function Gl(e,{isIDL:t=!1}={}){const{lt:n}=e.dataset;let r=n?n.split("|",1)[0]:e.textContent;return r=Nr(r),"the-empty-string"===r?"":(t||n||(r=r.replace(yr,"")),r)}function Vl(e){return e.replace(/-\d+$/,"")}function Jl(e){return[...new Set(e.map(Vl)).difference(new Set(e))]}function Kl(e,t,n,r){const{term:s,specs:i=[]}=t,{uri:o,shortname:a,spec:c,normative:l,type:u,for:d}=n,p=i.flat().includes(c)?c:a,h=new URL(o,"https://partial");let{pathname:f}=h;"/"===f&&(f="");const m={cite:p,citePath:f,citeFrag:h.hash.slice(1),linkType:u};d&&(m.linkFor=d[0]),h.origin&&"https://partial"!==h.origin&&(m.citeHref=h.href),Object.assign(e.dataset,m),function(e,t,n,r,s){const i=function(e){const t=e.closest(".normative"),n=e.closest(Cr);return!n||e===t||t&&n&&n.contains(t)}(e);if(!i)return void(s.normativeReferences.has(t)||s.informativeReferences.add(t));if(n){const e=s.informativeReferences.has(t)?s.informativeReferences.getCanonicalKey(t)??t:t;return s.normativeReferences.add(e),void s.informativeReferences.delete(e)}Bl.push({term:r,spec:t,element:e})}(e,p,l,s,r)}function Zl(e){const t=JSON.stringify(e,Object.keys(e).sort()),n=(new TextEncoder).encode(t);return crypto.subtle.digest("SHA-1",n).then(Yl)}function Yl(e){const t=new Uint8Array(e);return t.toHex?.()??[...t].map((e=>e.toString(16).padStart(2,"0"))).join("")}function Xl(e){const t=e.querySelectorAll("a[data-xref-for], a[data-xref-type], a[data-link-for]"),n=["data-xref-for","data-xref-type","data-link-for"];t.forEach((e=>{n.forEach((t=>e.removeAttribute(t)))}))}var Ql=Object.freeze({__proto__:null,API_URL:Fl,getTermFromElement:Gl,informativeRefsInNormative:Bl,name:ql,run:async function(e){if(!e.xref)return;const t=function(e){const t={url:new URL("search/",Fl).href,specs:null},n=Object.assign({},t);switch(Array.isArray(e)?"array":typeof e){case"boolean":break;case"string":{const t=e;t.toLowerCase()in Wl?Object.assign(n,{specs:Wl[t.toLowerCase()]}):r(t);break}case"array":Object.assign(n,{specs:e});break;case"object":{const t=e;if(Object.assign(n,t),t.profile){const e=t.profile.toLowerCase();if(e in Wl){const r=(t.specs??[]).concat(Wl[e]);Object.assign(n,{specs:r})}else r(t.profile)}break}default:{const t=ls`Expected: \`true\`, a profile name (e.g. \`"web-platform"\`), an array of spec shortnames (e.g. \`["FETCH", "DOM"]\`), or an object with \`url\`, \`specs\`, or \`profile\` properties. See ${"[xref]"}.`;ns(`Invalid value for \`xref\` configuration option. Received: "${e}".`,ql,{hint:t})}}return n;function r(e){ns(`Invalid profile "${e}" in \`respecConfig.xref\`. Please use one of the supported profiles: ${Ar(Object.keys(Wl),(e=>`"${e}"`))}.`,ql)}}(e.xref);if(t.specs){const e=document.body.dataset.cite?document.body.dataset.cite.split(/\s+/):[];document.body.dataset.cite=e.concat(t.specs).join(" ")}const n=Rl.concat(function(){const e=document.querySelectorAll(":is(a,dfn)[data-cite]:not([data-cite=''],[data-cite*='#'])"),t=document.querySelectorAll("dfn.externalDFN");return[...e].filter((e=>{if(""===e.textContent.trim())return!1;const t=e.closest("[data-cite]");return!t||""!==t.dataset.cite})).concat(...t)}());if(!n.length)return;const r=[];for(const e of n){const t=Hl(e);t.id=await Zl(t),r.push(t)}const s=await async function(e,t){const n=new Set,r=e.filter((e=>!n.has(e.id)&&(n.add(e.id)&&!0))),s=await Ul(r),i=r.filter((e=>!s.get(e.id))),o=await async function(e,t){if(!e.length)return new Map;const n={method:"POST",body:JSON.stringify({queries:e}),headers:{"Content-Type":"application/json"}},r=await fetch(t,n),s=await r.json();return new Map(s.results.map((({id:e,result:t})=>[e,t])))}(i,t);o.size&&await async function(e,t){try{const n=(await Ml()).transaction(jl,"readwrite");for(const r of e){const e=t.get(r.id);e?.length&&n.objectStore(jl).add({query:r,result:e})}await n.done}catch(e){console.error(e)}}(r,o);return new Map([...s,...o])}(r,t.url);!function(e,t,n,r){const s={ambiguous:new Map,notFound:new Map};for(let i=0,o=e.length;i<o;i++){if(e[i].closest("[data-no-xref]"))continue;const o=e[i],a=t[i],{id:c}=a,l=n.get(c)??[];if(1===l.length)Kl(o,a,l[0],r);else{const e=s[0===l.length?"notFound":"ambiguous"];e.has(c)||e.set(c,{elems:[],results:l,query:a}),e.get(c)?.elems.push(o)}}!function({ambiguous:e,notFound:t}){const n=(e,t,n=[])=>{const r=new URL(Fl);return r.searchParams.set("term",e),t.for&&r.searchParams.set("for",t.for),r.searchParams.set("types",t.types.join(",")),n.length&&r.searchParams.set("specs",n.join(",")),r.href},r=(e,t)=>ls`[See search matches for "${t}"](${e}) or ${"[Learn about this error|#error-term-not-found]"}.`;for(const{query:e,elems:s}of t.values()){const t=e.specs?[...new Set(e.specs.flat())].sort():[],i=Gl(s[0]),o=n(i,e),a=Lr(t,(e=>`**[${e}]**`));let c=r(o,i);const l=s[0].parentElement?.closest("[data-cite]")??null,u=l?.dataset.cite?.replace(/`/g,"")??"";l&&l!==document.body&&u&&(c+=` A parent element has \`data-cite="${u}"\` — check that the spec shortname is correct.`);ns(`Couldn't find "**${i}**"${e.for?`, for **"${e.for}"**, `:""} in this document or other cited documents: ${a}.`,ql,{title:"No matching definition found.",elements:s,hint:c})}for(const{query:t,elems:s,results:i}of e.values()){const e=[...new Set(i.map((e=>e.shortname)))].sort(),o=Lr(e,(e=>`**[${e}]**`)),a=Gl(s[0]),c=n(a,t,e),l=t.for?`, for **"${t.for}"**, `:"",u=r(c,a),d=ls`To fix, use the ${"[data-cite]"} attribute to pick the one you mean from the appropriate specification.`+String.raw` ${u}`;ns(`The term "**${a}**"${l} is ambiguous because it's defined in ${o}.`,ql,{title:"Definition is ambiguous.",elements:s,hint:d})}}(s)}(n,r,s,e),hs("beforesave",Xl)}});const eu="headings",tu=864e5;async function nu(){return await ir.openDB("respec-headings",1,{upgrade(e){[...e.objectStoreNames].forEach((t=>e.deleteObjectStore(t))),e.createObjectStore(eu)}})}async function ru(e){const t=new Map;if(function(){const e=parseInt(localStorage.getItem("HEADINGS:LAST_CACHED")??"",10);return!isNaN(e)&&Date.now()-e>tu}())return await async function(){try{const e=await nu();await e.clear(eu),localStorage.removeItem("HEADINGS:LAST_CACHED")}catch(e){console.error(e)}}(),t;try{const n=(await nu()).transaction(eu);for(const r of e){const e=`${r.spec}#${r.id}`,s=await n.store.get(e);s&&t.set(e,s.result)}}catch(e){console.error(e)}return t}const su="core/xref-headings",iu="https://respec.org/xref/search/headings";async function ou(e,t=iu){if(!e.length)return new Map;const n=await ru(e),r=e.filter((e=>!n.has(`${e.spec}#${e.id}`)));if(!r.length)return n;try{const e=await fetch(t,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({queries:r})});if(!e.ok){const t=`Failed to fetch heading texts (HTTP ${e.status}).`;return rs(t,su,{hint:"Cross-spec section links will fall back to spec titles."}),n}const{result:s=[]}=await e.json(),i=new Map(s.filter((e=>!e.error)).map((e=>[`${e.spec}#${e.id}`,{title:e.title,number:e.number||null}])));return await async function(e,t){try{const n=(await nu()).transaction(eu,"readwrite");for(const r of e){const e=`${r.spec}#${r.id}`,s=t.get(e);s&&n.objectStore(eu).put({query:r,result:s},e)}await n.done,localStorage.setItem("HEADINGS:LAST_CACHED",Date.now().toString())}catch(e){console.error(e)}}(r,i),new Map([...n,...i])}catch{return rs("Failed to fetch heading texts from respec.org.",su,{hint:"Cross-spec section links will fall back to spec titles."}),n}}function au(e,{title:t,number:n}){n?e.append(sr`<bdi class="secno">${n} </bdi>`,t):e.textContent=t}var cu=Object.freeze({__proto__:null,HEADINGS_API_URL:iu,fetchHeadingTexts:ou,name:su,run:async function(e){const t=document.querySelectorAll("a[data-cite-frag][data-matched-text]");if(!t.length)return;const n=function(e){const t="object"!=typeof e.xref||null===e.xref||Array.isArray(e.xref)?{}:e.xref;return"string"==typeof t.headingApiUrl?t.headingApiUrl:iu}(e),r=new Map,s=[];if(t.forEach((e=>{if(e.dataset.lt)e.textContent=e.dataset.lt,delete e.dataset.lt;else{const t=(e.dataset.cite??"").replace(/^[!?]/,""),n=e.dataset.citeFrag??"",i=`${t}#${n}`;s.push({elem:e,key:i}),r.has(i)||r.set(i,{spec:t,id:n})}})),!s.length)return;const i=await ou([...r.values()],n);s.forEach((({elem:e,key:t})=>{const n=i.get(t);n?.title&&(e.textContent="",au(e,n))}))},setHeadingContent:au});var lu=String.raw`ul.index{columns:30ch;column-gap:1.5em}
1077
+ >${zr(i)}</dfn
1078
+ >`}}switch(r.type){case"text":return wl`<span class="cddl-str">${zr(i)}</span>`;case"number":case"float":return wl`<span class="cddl-num">${zr(i)}</span>`;case"bytes":case"hex":case"base64":return wl`<span class="cddl-bytes">${zr(i)}</span>`;default:return zr(i)}}#i(e){const t=e.parentNode;return!!t&&t instanceof $r}serializeToken(e,t){const n=e.type,r=e.serialize();switch(n){case"COMMENT":return this.#o(r);case"CTLOP":return this.#a(r);case"=":case"/=":case"//=":case"/":case"//":case"=>":case"..":case"...":return this.#c(r);case"?":case"*":case"+":return t instanceof xr?this.#l(r):r;default:return r}}#o(e){return e.replace(/(;[^\n]*)/g,'<span class="cddl-comment">$1</span>')}#a(e){return e.replace(/(\.\w+)/g,'<span class="cddl-ctrl">$1</span>')}#c(e){const t=e.match(/^(\s*)(.*?)(\s*)$/s);return t?`${t[1]}<span class="cddl-op">${t[2]}</span>${t[3]}`:wl`<span class="cddl-op">${e}</span>`}#l(e){const t=e.match(/^(\s*)(.*?)(\s*)$/s);return t?`${t[1]}<span class="cddl-occ">${t[2]}</span>${t[3]}`:wl`<span class="cddl-occ">${e}</span>`}}var kl=Object.freeze({__proto__:null,name:ml,run:async function(){const e=document.querySelectorAll("pre.cddl:not([data-no-cddl])");if(!e.length)return;const t=document.createElement("style");t.textContent=fl;const n=document.querySelector("head link, head > *:last-child");n?n.before(t):document.head.append(t);const r=e=>new gr(e).parse(),s={definitions:new Map,proseDfns:new Set,genericParams:new Map};var i,o,a,c;i=document,o=s.proseDfns,i.querySelectorAll("dfn[cddl-type], dfn[cddl-key], dfn[cddl-value]").forEach((e=>{const t=["cddl-type","cddl-key","cddl-value"].find((t=>e.hasAttribute(t)));e.dataset.dfnType=t,e.removeAttribute(t);const n=e.getAttribute("for");n&&(e.dataset.dfnFor=n,e.removeAttribute("for"));const r=e.textContent.trim(),s=n?`${bl(n)}-`:"",i=`cddl-${t.replace("cddl-","")}-${s}${bl(r)}`;e.id||=i,o.add(e.id),bc(e,[r])})),e.forEach((e=>function(e,t,n){const r=e.textContent;if(r.trim())try{const s=t(r),i=new vl(n),o=s.serialize(i),a=document.createElement("code");a.innerHTML=o,e.textContent="",e.append(a),e.classList.add("def","highlight"),Vr(e,"cddl-block");const c=document.createElement("span");c.className="cddlHeader",c.innerHTML=`<a class="self-link" href="#${e.id}">CDDL</a>`;const l=Yc(".cddlHeader");c.append(l),e.prepend(c)}catch(t){cs(`CDDL processing error: ${t instanceof Error?t.message:String(t)}`,ml,{elements:[e],hint:'Check the CDDL syntax in the `<pre class="cddl">` block.'})}}(e,r,s))),a=document.body,c=s.definitions,a.querySelectorAll("[data-cddl-pending]").forEach((e=>{const t=`cddl-type:${e.dataset.cddlPending}`;if(c.has(t)){const n=c.get(t);if(!n)return;const r=a.ownerDocument.createElement("a");r.href=`#${n.id}`,r.className="cddl-name",r.dataset.linkType="cddl-type",r.textContent=e.textContent,e.replaceWith(r)}})),document.querySelectorAll("[data-cddl-pending]").forEach((e=>{ls(`No CDDL definition found for \`${e.getAttribute("data-cddl-pending")}\`.`,ml,{elements:[e],hint:"Check for typos in the type name."})})),function(e,t){e.querySelectorAll('a[data-link-type^="cddl-"]:not([href]):not([data-cite])').forEach((e=>{const n=e.getAttribute("data-link-type"),r=e.getAttribute("data-xref-for")||e.getAttribute("data-link-for")||"",s=e.textContent.trim();if("cddl-type"!==n&&"cddl-key"!==n&&"cddl-value"!==n)return;const i={"cddl-type":`cddl-type:${s}`,"cddl-key":`cddl-key:${r}/${s}`,"cddl-value":`cddl-value:${r}/${s}`}[n];if(t.has(i)){const n=t.get(i);if(!n)return;e.setAttribute("href",`#${n.id}`),e.classList.add("internalDFN")}else ls(`CDDL ${n}: no definition found for \`${s}\`${r?`, for \`${r}\`,`:""} in any \`<pre class="cddl">\` block.`,ml,{elements:[e]}),e.setAttribute("data-no-link-to-dfn","")}))}(document,s.definitions),function(e,t){t.forEach((t=>{const n=e.getElementById(t.id);"dfn"===n?.localName&&bc(n,[n.textContent.trim()])}))}(document,s.definitions),Xc(),ws("beforesave",(e=>{e.querySelectorAll("[data-cddl-pending]").forEach((e=>e.removeAttribute("data-cddl-pending")))}))}});const $l="core/data-cite",xl="__SPEC__";async function Cl(e){const{key:t,frag:n,path:r,href:s}=e;let i,o="";if(t===xl)i=document.location.href;else{const e=await Ta(t);if(!e)return null;i=e.href??"",o=e.title}if(s)i=s;else{if(r){const e=r.startsWith("/")?`.${r}`:r;i=new URL(e,i).href}n&&(i=new URL(n,i).href)}return{href:i,title:o}}function Sl(e,t,n){const{href:r,title:s}=t,i=!n.path&&!n.frag;switch(e.localName){case"a":{const t=e;if(""===t.textContent&&"the-empty-string"!==t.dataset.lt&&(t.textContent=s),t.href=r,i){const e=document.createElement("cite");t.replaceWith(e),e.append(t)}break}case"dfn":{const t=document.createElement("a");if(t.href=r,t.dataset.cite=n.key,t.dataset.citePath=n.path,t.dataset.citeFrag=n.frag,e.textContent?Qr(e,t):(t.textContent=s,e.append(t)),i){const n=document.createElement("cite");n.append(t),e.append(n)}if("export"in e.dataset){cs("Exporting a linked external definition is not allowed.",$l,{hint:"Please remove the `data-export` attribute.",elements:[e]}),delete e.dataset.export}e.classList.add("externalDFN"),e.dataset.noExport="";break}}}function _l(e){return t=>{const n=t.search(e);return-1!==n?t.substring(n):""}}const Tl=_l("#"),Rl=_l("/");function El(e){const{dataset:t}=e,{cite:n,citeFrag:r,citePath:s,citeHref:i}=t;if((n??"").startsWith("#")&&!r){const r=e.parentElement?.closest('[data-cite]:not([data-cite^="#"])')??null,{key:s,isNormative:i}=r?El(r):{key:xl,isNormative:!1};return t.cite=i?s:`?${s}`,t.citeFrag=(n??"").replace("#",""),El(e)}const o=r?`#${r}`:Tl(n??""),a=s||Rl(n??"").split("#")[0],{type:c}=Xr(n??"",e),l="normative"===c,u=/^[?|!]/.test(n??"");return{key:(n??"").split(/[/|#]/)[0].substring(Number(u)),isNormative:l,frag:o,path:a,href:i}}function Ll(e){const t=["data-cite","data-cite-frag","data-cite-path"];e.querySelectorAll("a[data-cite], dfn[data-cite]").forEach((e=>t.forEach((t=>e.removeAttribute(t)))))}var Al=Object.freeze({__proto__:null,THIS_SPEC:xl,name:$l,run:async function(){const e=document.querySelectorAll("dfn[data-cite]:not([data-cite='']), a[data-cite]:not([data-cite=''])");await async function(e){const t=e.map(El).map((async e=>({entry:e,result:await Ta(e.key)}))),n=(await Promise.all(t)).filter((({result:e})=>null===e)).map((({entry:{key:e}})=>e)),r=await _a(n);r&&Object.assign(ka,r)}([...e]);const t=new Map,n=new Map;for(const r of e){t.set(r,r.dataset.cite);const e=El(r);n.set(r,e)}for(const r of e){const e=t.get(r),s=n.get(r),i=await Cl(s);if(i)r.dataset.citeFrag&&r.dataset.matchedText||!r.dataset.lt||"the-empty-string"===r.dataset.lt||""!==r.textContent||(lc(r,r.dataset.lt),delete r.dataset.lt),Sl(r,i,s);else{const t=`Couldn't find a match for "${e}"`;r.dataset.matchedText&&(r.textContent=r.dataset.matchedText),ls(t,$l,{elements:[r]})}}ws("beforesave",Ll)},toCiteDetails:El});const Pl="core/link-to-dfn",Nl=[],Il={en:{duplicateMsg:e=>`Duplicate definition(s) of '${e}'`,duplicateTitle:"This is defined more than once in the document."},ja:{duplicateMsg:e=>`'${e}' の重複定義`,duplicateTitle:"この文書内で複数回定義されています."},de:{duplicateMsg:e=>`Mehrfache Definition von '${e}'`,duplicateTitle:"Das Dokument enthält mehrere Definitionen dieses Eintrags."},zh:{duplicateMsg:e=>`'${e}' 的重复定义`,duplicateTitle:"在文档中有重复的定义。"},cs:{duplicateMsg:e=>`Duplicitní definice '${e}'`,duplicateTitle:"Toto je v dokumentu definováno vícekrát."}},Dl=Ur(Il);function Ol(e){const t=new Map,n=[];for(const r of gc.get(e)??[]){const{dfnType:s="dfn"}=r.dataset,i=r.dataset.dfnFor?.split(",").map((e=>e.trim()))??[""];for(const o of i){if(t.has(o)&&t.get(o)?.has(s)){const e=t.get(o)?.get(s),i="dfn"===e?.localName,a="dfn"===r.localName,c=s===(e?.dataset.dfnType||"dfn"),l=!o&&!e?.dataset.dfnFor||e?.dataset.dfnFor?.split(",").map((e=>e.trim())).includes(o);if(i&&a&&c&&l){n.push(r);continue}}t.has(o)||t.set(o,new Map),t.get(o)?.set(s,r),("idl"in r.dataset||"dfn"!==s)&&t.get(o)?.set("idl",r),Kr(r,"dfn",e)}}return{result:t,duplicates:n}}function jl(e,t){const n=function(e){const t=e.closest("[data-link-for]"),n=t?t.dataset.linkFor??"":"",r=Zr(e).reduce(((e,r)=>{const s=r.split(".");2===s.length&&e.push({for:s[0],title:s[1]}),e.push({for:n,title:r}),t||e.push({for:r,title:r}),""!==n&&e.push({for:"",title:r});const i=r.replace(Cr,"");return i!==r&&""!==i&&(e.push({for:n,title:i}),t||e.push({for:i,title:i}),""!==n&&e.push({for:"",title:i})),e}),[]);return r}(e),r=n.find((e=>t.has(e.title)&&t.get(e.title)?.has(e.for)));if(!r)return;const s=t.get(r.title)?.get(r.for),{linkType:i}=e.dataset;if(i){for(const e of i.split("|"))if(s?.get(e))return s.get(e);return s?.get("dfn")}{const e=r.for?"idl":"dfn";return s?.get(e)||s?.get("idl")}}function zl(e,t,n){let r=!1;const{linkFor:s}=e.dataset,{dfnFor:i}=t.dataset;if(t.dataset.cite)e.dataset.cite=t.dataset.cite;else if(s&&!n.get(s)&&i&&!i.split(",").map((e=>e.trim())).includes(s))r=!0;else if(t.classList.contains("externalDFN")){const n=t.dataset.lt?t.dataset.lt.split("|"):[];e.dataset.lt=n[0]||t.textContent,r=!0}else"partial"!==e.dataset.idl?(e.href=`#${t.id}`,e.classList.add("internalDFN")):r=!0;return e.hasAttribute("data-link-type")||(e.dataset.linkType="idl"in t.dataset?"idl":"dfn"),function(e){if(e.closest("code,pre"))return!0;if(1!==e.childNodes.length)return!1;const[t]=e.childNodes;return"code"===t.localName}(t)&&function(e,t){const n=e.textContent.trim(),r=t.dataset.hasOwnProperty("idl"),s=Ml(e)&&Ml(t,n);r&&!s||Qr(e,document.createElement("code"))}(e,t),!r}function Ml(e,t=""){if("a"===e.localName){if(!e.querySelector("code"))return!0}else{const{dataset:n}=e;if(e.textContent.trim()===t)return!0;if(n.title===t)return!0;if(n.lt||n.localLt){const e=[];return n.lt&&e.push(...n.lt.split("|")),n.localLt&&e.push(...n.localLt.split("|")),e.includes(t)}}return!1}function Ul(e){e.forEach((e=>{const t=`Found linkless \`<a>\` element with text "${e.textContent}" but no matching \`<dfn>\``,n=e.closest("[data-link-for]"),r=`Add a matching \`<dfn>\` element, ${ms`use ${"[data-cite]"} to link to an external definition, or enable ${"[xref]"} for automatic cross-spec linking.`}${n?` This link is inside a \`data-link-for="${n.dataset.linkFor}"\` section — \`[=term=]\` links are scoped to that context. To link to a global concept instead, either add \`data-link-for=""\` on this \`<a>\` or move it outside the scoped section.`:""}`;ls(t,Pl,{title:"Linking error: no matching `<dfn>`",hint:r,elements:[e]})}))}var ql=Object.freeze({__proto__:null,name:Pl,possibleExternalLinks:Nl,run:async function(e){const t=function(){const e=new os;for(const t of gc.keys()){const{result:n,duplicates:r}=Ol(t);e.set(t,n),r.length>0&&cs(Dl.duplicateMsg(t),Pl,{title:Dl.duplicateTitle,elements:r})}return e}(),n=[],r=document.querySelectorAll("a[data-cite='']:not([data-no-link-to-dfn]), a:not([href]):not([data-cite]):not([data-no-link-to-dfn]):not(.logo):not(.externalDFN)");for(const e of r){if(!e.dataset?.linkType&&e.dataset?.xrefType){Nl.push(e);continue}const r=jl(e,t);if(r){zl(e,r,t)||Nl.push(e)}else""===e.dataset.cite?n.push(e):Nl.push(e)}Ul(n),function(e){const{shortName:t=""}=e,n=t?new RegExp(String.raw`^([?!])?${_r(t)}\b([^-])`,"i"):null,r=document.querySelectorAll("dfn[data-cite]:not([data-cite='']), a[data-cite]:not([data-cite=''])");for(const t of r){n&&(t.dataset.cite=(t.dataset.cite??"").replace(n,`$1${xl}$2`));const{key:r,isNormative:s}=El(t);r!==xl&&(s||e.normativeReferences.has(r)?(e.normativeReferences.add(r),e.informativeReferences.delete(r)):e.informativeReferences.add(r))}}(e),e.xref||Ul(Nl)}});const Wl="xrefs",Fl=3e5;async function Bl(){return await dr.openDB("xref",2,{upgrade(e){[...e.objectStoreNames].forEach((t=>e.deleteObjectStore(t)));e.createObjectStore(Wl,{keyPath:"query.id"}).createIndex("byTerm","query.term",{unique:!1})}})}async function Hl(e){const t=new Map;if(await async function(){const e="XREF:LAST_VERSION_CHECK",t=parseInt(localStorage.getItem(e)??"",10),n=Date.now();if(!t)return localStorage.setItem(e,n.toString()),!1;if(n-t<Fl)return!1;const r=new URL("meta/version",Jl).href,s=await fetch(r);if(!s.ok)return!1;const i=await s.text();return localStorage.setItem(e,n.toString()),parseInt(i,10)>t}())return await async function(){try{await Bl().then((e=>e.clear(Wl)))}catch(e){console.error(e)}}(),t;const n=new Set(e.map((e=>e.id)));try{const e=await Bl();let r=await e.transaction(Wl).store.openCursor();for(;r;)n.has(r.key)&&t.set(r.key,r.value.result),r=await r.continue()}catch(e){console.error(e)}return t}const Gl="core/xref",Vl={"web-platform":["HTML","INFRA","URL","WEBIDL","DOM","FETCH"]},Jl="https://respec.org/xref/",Kl=[];if(!document.querySelector("link[rel='preconnect'][href='https://respec.org']")){const e=Ar({hint:"preconnect",href:"https://respec.org"});document.head.appendChild(e)}function Zl(e){const t="xrefType"in e.dataset;let n=Yl(e,{isIDL:t});t||(n=n.toLowerCase());const r=function(e){const t=[];let n=e.closest("[data-cite]");for(;n;){const r=(n.dataset.cite??"").toLowerCase().replace(/[!?]/g,"").split(/\s+/).filter((e=>e));if(r.length){t.push(r);const e=Ql(r);e.length&&t.push(e)}if(n===e)break;n=n.parentElement?.closest("[data-cite]")??null}if(n!==e){const n=e.closest("section"),r=n?n.querySelectorAll("a.bibref"):[],s=[...new Set([...r].map((e=>e.textContent.toLowerCase())))];if(s.length){t.push(s);const e=Ql(s);e.length&&t.push(e)}}const r=function(e){const t=[],n=new Set;for(const r of e){const e=[...new Set(r).values().filter((e=>!n.has(e)))];e.forEach((e=>n.add(e))),t.push(e.sort())}return t}(t);return r}(e),s=function(e,t){if(t)return e.dataset.xrefType?e.dataset.xrefType.split("|"):["_IDL_"];return["_CONCEPT_"]}(e,t),i=function(e,t){if(e.dataset.xrefFor)return Mr(e.dataset.xrefFor);if(t){const t=e.closest("[data-xref-for]");if(t)return Mr(t.dataset.xrefFor??"")}return null}(e,t);return{id:"",term:n,types:s,...r.length&&{specs:r},..."string"==typeof i&&{for:i}}}function Yl(e,{isIDL:t=!1}={}){const{lt:n}=e.dataset;let r=n?n.split("|",1)[0]:e.textContent;return r=Mr(r),"the-empty-string"===r?"":(t||n||(r=r.replace(Cr,"")),r)}function Xl(e){return e.replace(/-\d+$/,"")}function Ql(e){return[...new Set(e.map(Xl)).difference(new Set(e))]}function eu(e,t,n,r){const{term:s,specs:i=[]}=t,{uri:o,shortname:a,spec:c,normative:l,type:u,for:d}=n,p=i.flat().includes(c)?c:a,h=new URL(o,"https://partial");let{pathname:f}=h;"/"===f&&(f="");const m={cite:p,citePath:f,citeFrag:h.hash.slice(1),linkType:u};d&&(m.linkFor=d[0]),h.origin&&"https://partial"!==h.origin&&(m.citeHref=h.href),Object.assign(e.dataset,m),function(e,t,n,r,s){const i=function(e){const t=e.closest(".normative"),n=e.closest(Lr);return!n||e===t||t&&n&&n.contains(t)}(e);if(!i)return void(s.normativeReferences.has(t)||s.informativeReferences.add(t));if(n){const e=s.informativeReferences.has(t)?s.informativeReferences.getCanonicalKey(t)??t:t;return s.normativeReferences.add(e),void s.informativeReferences.delete(e)}Kl.push({term:r,spec:t,element:e})}(e,p,l,s,r)}function tu(e){const t=JSON.stringify(e,Object.keys(e).sort()),n=(new TextEncoder).encode(t);return crypto.subtle.digest("SHA-1",n).then(nu)}function nu(e){const t=new Uint8Array(e);return t.toHex?.()??[...t].map((e=>e.toString(16).padStart(2,"0"))).join("")}function ru(e){const t=e.querySelectorAll("a[data-xref-for], a[data-xref-type], a[data-link-for]"),n=["data-xref-for","data-xref-type","data-link-for"];t.forEach((e=>{n.forEach((t=>e.removeAttribute(t)))}))}var su=Object.freeze({__proto__:null,API_URL:Jl,getTermFromElement:Yl,informativeRefsInNormative:Kl,name:Gl,run:async function(e){if(!e.xref)return;const t=function(e){const t={url:new URL("search/",Jl).href,specs:null},n=Object.assign({},t);switch(Array.isArray(e)?"array":typeof e){case"boolean":break;case"string":{const t=e;t.toLowerCase()in Vl?Object.assign(n,{specs:Vl[t.toLowerCase()]}):r(t);break}case"array":Object.assign(n,{specs:e});break;case"object":{const t=e;if(Object.assign(n,t),t.profile){const e=t.profile.toLowerCase();if(e in Vl){const r=(t.specs??[]).concat(Vl[e]);Object.assign(n,{specs:r})}else r(t.profile)}break}default:{const t=ms`Expected: \`true\`, a profile name (e.g. \`"web-platform"\`), an array of spec shortnames (e.g. \`["FETCH", "DOM"]\`), or an object with \`url\`, \`specs\`, or \`profile\` properties. See ${"[xref]"}.`;cs(`Invalid value for \`xref\` configuration option. Received: "${e}".`,Gl,{hint:t})}}return n;function r(e){cs(`Invalid profile "${e}" in \`respecConfig.xref\`. Please use one of the supported profiles: ${jr(Object.keys(Vl),(e=>`"${e}"`))}.`,Gl)}}(e.xref);if(t.specs){const e=document.body.dataset.cite?document.body.dataset.cite.split(/\s+/):[];document.body.dataset.cite=e.concat(t.specs).join(" ")}const n=Nl.concat(function(){const e=document.querySelectorAll(":is(a,dfn)[data-cite]:not([data-cite=''],[data-cite*='#'])"),t=document.querySelectorAll("dfn.externalDFN");return[...e].filter((e=>{if(""===e.textContent.trim())return!1;const t=e.closest("[data-cite]");return!t||""!==t.dataset.cite})).concat(...t)}());if(!n.length)return;const r=[];for(const e of n){const t=Zl(e);t.id=await tu(t),r.push(t)}const s=await async function(e,t){const n=new Set,r=e.filter((e=>!n.has(e.id)&&(n.add(e.id)&&!0))),s=await Hl(r),i=r.filter((e=>!s.get(e.id))),o=await async function(e,t){if(!e.length)return new Map;const n={method:"POST",body:JSON.stringify({queries:e}),headers:{"Content-Type":"application/json"}},r=await fetch(t,n),s=await r.json();return new Map(s.results.map((({id:e,result:t})=>[e,t])))}(i,t);o.size&&await async function(e,t){try{const n=(await Bl()).transaction(Wl,"readwrite");for(const r of e){const e=t.get(r.id);e?.length&&n.objectStore(Wl).add({query:r,result:e})}await n.done}catch(e){console.error(e)}}(r,o);return new Map([...s,...o])}(r,t.url);!function(e,t,n,r){const s={ambiguous:new Map,notFound:new Map};for(let i=0,o=e.length;i<o;i++){if(e[i].closest("[data-no-xref]"))continue;const o=e[i],a=t[i],{id:c}=a,l=n.get(c)??[];if(1===l.length)eu(o,a,l[0],r);else{const e=s[0===l.length?"notFound":"ambiguous"];e.has(c)||e.set(c,{elems:[],results:l,query:a}),e.get(c)?.elems.push(o)}}!function({ambiguous:e,notFound:t}){const n=(e,t,n=[])=>{const r=new URL(Jl);return r.searchParams.set("term",e),t.for&&r.searchParams.set("for",t.for),r.searchParams.set("types",t.types.join(",")),n.length&&r.searchParams.set("specs",n.join(",")),r.href},r=(e,t)=>ms`[See search matches for "${t}"](${e}) or ${"[Learn about this error|#error-term-not-found]"}.`;for(const{query:e,elems:s}of t.values()){const t=e.specs?[...new Set(e.specs.flat())].sort():[],i=Yl(s[0]),o=n(i,e),a=Or(t,(e=>`**[${e}]**`));let c=r(o,i);const l=s[0].parentElement?.closest("[data-cite]")??null,u=l?.dataset.cite?.replace(/`/g,"")??"";l&&l!==document.body&&u&&(c+=` A parent element has \`data-cite="${u}"\` — check that the spec shortname is correct.`);cs(`Couldn't find "**${i}**"${e.for?`, for **"${e.for}"**, `:""} in this document or other cited documents: ${a}.`,Gl,{title:"No matching definition found.",elements:s,hint:c})}for(const{query:t,elems:s,results:i}of e.values()){const e=[...new Set(i.map((e=>e.shortname)))].sort(),o=Or(e,(e=>`**[${e}]**`)),a=Yl(s[0]),c=n(a,t,e),l=t.for?`, for **"${t.for}"**, `:"",u=r(c,a),d=ms`To fix, use the ${"[data-cite]"} attribute to pick the one you mean from the appropriate specification.`+String.raw` ${u}`;cs(`The term "**${a}**"${l} is ambiguous because it's defined in ${o}.`,Gl,{title:"Definition is ambiguous.",elements:s,hint:d})}}(s)}(n,r,s,e),ws("beforesave",ru)}});const iu="headings",ou=864e5;async function au(){return await dr.openDB("respec-headings",1,{upgrade(e){[...e.objectStoreNames].forEach((t=>e.deleteObjectStore(t))),e.createObjectStore(iu)}})}async function cu(e){const t=new Map;if(function(){const e=parseInt(localStorage.getItem("HEADINGS:LAST_CACHED")??"",10);return!isNaN(e)&&Date.now()-e>ou}())return await async function(){try{const e=await au();await e.clear(iu),localStorage.removeItem("HEADINGS:LAST_CACHED")}catch(e){console.error(e)}}(),t;try{const n=(await au()).transaction(iu);for(const r of e){const e=`${r.spec}#${r.id}`,s=await n.store.get(e);s&&t.set(e,s.result)}}catch(e){console.error(e)}return t}const lu="core/xref-headings",uu="https://respec.org/xref/search/headings";async function du(e,t=uu){if(!e.length)return new Map;const n=await cu(e),r=e.filter((e=>!n.has(`${e.spec}#${e.id}`)));if(!r.length)return n;try{const e=await fetch(t,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({queries:r})});if(!e.ok){const t=`Failed to fetch heading texts (HTTP ${e.status}).`;return ls(t,lu,{hint:"Cross-spec section links will fall back to spec titles."}),n}const{result:s=[]}=await e.json(),i=new Map(s.filter((e=>!e.error)).map((e=>[`${e.spec}#${e.id}`,{title:e.title,number:e.number||null}])));return await async function(e,t){try{const n=(await au()).transaction(iu,"readwrite");for(const r of e){const e=`${r.spec}#${r.id}`,s=t.get(e);s&&n.objectStore(iu).put({query:r,result:s},e)}await n.done,localStorage.setItem("HEADINGS:LAST_CACHED",Date.now().toString())}catch(e){console.error(e)}}(r,i),new Map([...n,...i])}catch{return ls("Failed to fetch heading texts from respec.org.",lu,{hint:"Cross-spec section links will fall back to spec titles."}),n}}function pu(e,{title:t,number:n}){e.classList.add("sec-ref"),e.textContent="",e.append("§ "),n?e.append(ur`<bdi class="secno">${n} </bdi>`,t):e.append(t)}var hu=Object.freeze({__proto__:null,HEADINGS_API_URL:uu,fetchHeadingTexts:du,name:lu,run:async function(e){const t=document.querySelectorAll("a[data-cite-frag][data-matched-text]");if(!t.length)return;const n=function(e){const t="object"!=typeof e.xref||null===e.xref||Array.isArray(e.xref)?{}:e.xref;return"string"==typeof t.headingApiUrl?t.headingApiUrl:uu}(e),r=new Map,s=[];if(t.forEach((e=>{if(e.dataset.lt)lc(e,e.dataset.lt),delete e.dataset.lt;else{const t=(e.dataset.cite??"").replace(/^[!?]/,""),n=e.dataset.citeFrag??"",i=`${t}#${n}`;s.push({elem:e,key:i}),r.has(i)||r.set(i,{spec:t,id:n})}})),!s.length)return;const i=await du([...r.values()],n);s.forEach((({elem:e,key:t})=>{const n=i.get(t);n?.title&&pu(e,n)}))},setHeadingContent:pu});var fu=String.raw`ul.index{columns:30ch;column-gap:1.5em}
1080
1079
  ul.index li{list-style:inherit}
1081
1080
  ul.index li span{color:inherit;cursor:pointer;white-space:normal}
1082
1081
  #index-defined-here ul.index li{font-size:.9rem}
@@ -1084,37 +1083,37 @@ ul.index code{color:inherit}
1084
1083
  #index-defined-here .print-only{display:none}
1085
1084
  @media print{
1086
1085
  #index-defined-here .print-only{display:initial}
1087
- }`;const uu=Ir({en:{heading:"Index",headingExternal:"Terms defined by reference",headingLocal:"Terms defined by this specification",dfnOf:"definition of",definesFollowing:"defines the following:"},cs:{heading:"Glosář",headingExternal:"Termíny definované odkazem",headingLocal:"Termíny definované touto specifikací",dfnOf:"definice",definesFollowing:"definuje následující:"},de:{heading:"Index",headingExternal:"Begriffe, die durch Verweis definiert sind",headingLocal:"Begriffe, die in dieser Spezifikation definiert sind",dfnOf:"Definition von",definesFollowing:"definiert Folgendes:"},es:{heading:"Índice",headingExternal:"Términos definidos por referencia",headingLocal:"Términos definidos por esta especificación",dfnOf:"definición de",definesFollowing:"define lo siguiente:"},ja:{heading:"索引",headingExternal:"参照によって定義された用語",headingLocal:"この仕様で定義された用語",dfnOf:"の定義",definesFollowing:"以下を定義します:"},ko:{heading:"색인",headingExternal:"참조로 정의된 용어",headingLocal:"이 명세서에서 정의된 용어",dfnOf:"정의",definesFollowing:"다음을 정의합니다:"},nl:{heading:"Index",headingExternal:"Termen gedefinieerd door verwijzing",headingLocal:"Termen gedefinieerd door deze specificatie",dfnOf:"definitie van",definesFollowing:"definieert het volgende:"},zh:{heading:"索引",headingExternal:"通过引用定义的术语",headingLocal:"由本规范定义的术语",dfnOf:"的定义",definesFollowing:"定义以下内容:"}}),du=new Set(["attribute","callback","dict-member","dictionary","element-attr","element","enum-value","enum","exception","extended-attribute","interface","method","typedef"]);function pu(e){const t=e.dataset,n=t.dfnType||t.idl||t.linkType||"";switch(n){case"":case"dfn":return"";default:return n}}function hu(e){const t=e.closest("[data-dfn-for]:not([data-dfn-for=''])");return t?.dataset.dfnFor||""}function fu(e,t,n=""){if(n.startsWith("[[")){return`internal slot for <code>${hu(e)}</code>`}switch(t){case"dict-member":case"method":case"attribute":case"enum-value":return`${"dict-member"===t?"member":t.replace("-"," ")} for <code>${hu(e)}</code>`;case"interface":case"dictionary":case"enum":return t;case"constructor":return`for <code>${hu(e)}</code>`;default:return""}}function mu(){document.querySelectorAll("#index-defined-here li[data-id]").forEach((e=>{const t=(e=>{const t=document.getElementById(e),n=t?.closest("section:not(.notoc)")?.querySelector(".secno");if(!n)return null;const r=`§${n.textContent.trim()}`;return sr`<span class="print-only">${r}</span>`})(e.dataset.id??"");t&&e.append(t)}))}function gu(){const e=new Set,t=new Map,n=document.querySelectorAll("a[data-cite]");for(const r of n){if(!r.dataset.cite)continue;const{cite:n,citeFrag:s,xrefType:i,linkType:o,matchedText:a}=r.dataset;if(s&&a)continue;if(!(i||o||n.includes("#")||s))continue;const c=r.href;if(e.has(c))continue;const{linkType:l,linkFor:u}=r.dataset,d=Gl(r);if(!d)continue;const p=Cl(r).key.toUpperCase(),h=t.get(p)||t.set(p,[]).get(p);h?.push({term:d,type:l,linkFor:u,elem:r}),e.add(c)}return t}function bu(e){const{elem:t}=e,n=function(e){const{term:t,type:n,linkFor:r}=e;let s=Pr(t);du.has(n??"")&&("extended-attribute"===n&&(s=`[${s}]`),s=`<code>${s}</code>`);const i=wu.has(t)?"type":yu.get(n??"");i&&(s+=` ${i}`);if(r){let e=r;/\s/.test(r)||(e=`<code>${e}</code>`),"element-attr"===n&&(e+=" element"),s+=` (for ${e})`}return s}(e);return sr`<li>
1086
+ }`;const mu=Ur({en:{heading:"Index",headingExternal:"Terms defined by reference",headingLocal:"Terms defined by this specification",dfnOf:"definition of",definesFollowing:"defines the following:"},cs:{heading:"Glosář",headingExternal:"Termíny definované odkazem",headingLocal:"Termíny definované touto specifikací",dfnOf:"definice",definesFollowing:"definuje následující:"},de:{heading:"Index",headingExternal:"Begriffe, die durch Verweis definiert sind",headingLocal:"Begriffe, die in dieser Spezifikation definiert sind",dfnOf:"Definition von",definesFollowing:"definiert Folgendes:"},es:{heading:"Índice",headingExternal:"Términos definidos por referencia",headingLocal:"Términos definidos por esta especificación",dfnOf:"definición de",definesFollowing:"define lo siguiente:"},ja:{heading:"索引",headingExternal:"参照によって定義された用語",headingLocal:"この仕様で定義された用語",dfnOf:"の定義",definesFollowing:"以下を定義します:"},ko:{heading:"색인",headingExternal:"참조로 정의된 용어",headingLocal:"이 명세서에서 정의된 용어",dfnOf:"정의",definesFollowing:"다음을 정의합니다:"},nl:{heading:"Index",headingExternal:"Termen gedefinieerd door verwijzing",headingLocal:"Termen gedefinieerd door deze specificatie",dfnOf:"definitie van",definesFollowing:"definieert het volgende:"},zh:{heading:"索引",headingExternal:"通过引用定义的术语",headingLocal:"由本规范定义的术语",dfnOf:"的定义",definesFollowing:"定义以下内容:"}}),gu=new Set(["attribute","callback","dict-member","dictionary","element-attr","element","enum-value","enum","exception","extended-attribute","interface","method","typedef"]);function bu(e){const t=e.dataset,n=t.dfnType||t.idl||t.linkType||"";switch(n){case"":case"dfn":return"";default:return n}}function yu(e){const t=e.closest("[data-dfn-for]:not([data-dfn-for=''])");return t?.dataset.dfnFor||""}function wu(e,t,n=""){if(n.startsWith("[[")){return`internal slot for <code>${yu(e)}</code>`}switch(t){case"dict-member":case"method":case"attribute":case"enum-value":return`${"dict-member"===t?"member":t.replace("-"," ")} for <code>${yu(e)}</code>`;case"interface":case"dictionary":case"enum":return t;case"constructor":return`for <code>${yu(e)}</code>`;default:return""}}function vu(){document.querySelectorAll("#index-defined-here li[data-id]").forEach((e=>{const t=(e=>{const t=document.getElementById(e),n=t?.closest("section:not(.notoc)")?.querySelector(".secno");if(!n)return null;const r=`§${n.textContent.trim()}`;return ur`<span class="print-only">${r}</span>`})(e.dataset.id??"");t&&e.append(t)}))}function ku(){const e=new Set,t=new Map,n=document.querySelectorAll("a[data-cite]");for(const r of n){if(!r.dataset.cite)continue;const{cite:n,citeFrag:s,xrefType:i,linkType:o,matchedText:a}=r.dataset;if(s&&a)continue;if(!(i||o||n.includes("#")||s))continue;const c=r.href;if(e.has(c))continue;const{linkType:l,linkFor:u}=r.dataset,d=Yl(r);if(!d)continue;const p=El(r).key.toUpperCase(),h=t.get(p)||t.set(p,[]).get(p);h?.push({term:d,type:l,linkFor:u,elem:r}),e.add(c)}return t}function $u(e){const{elem:t}=e,n=function(e){const{term:t,type:n,linkFor:r}=e;let s=zr(t);gu.has(n??"")&&("extended-attribute"===n&&(s=`[${s}]`),s=`<code>${s}</code>`);const i=Cu.has(t)?"type":xu.get(n??"");i&&(s+=` ${i}`);if(r){let e=r;/\s/.test(r)||(e=`<code>${e}</code>`),"element-attr"===n&&(e+=" element"),s+=` (for ${e})`}return s}(e);return ur`<li>
1088
1087
  <span class="index-term" data-href="${t.href}">${{html:n}}</span>
1089
- </li>`}const yu=new Map([["attribute","attribute"],["element-attr","attribute"],["element","element"],["enum","enum"],["exception","exception"],["extended-attribute","extended attribute"],["interface","interface"]]),wu=new Set(["boolean","byte","octet","short","unsigned short","long","unsigned long","long long","unsigned long long","float","unrestricted float","double","unrestricted double","undefined","any","object","symbol"]);function vu(e){e.querySelectorAll("#index-defined-elsewhere li[data-spec]").forEach((e=>e.removeAttribute("data-spec"))),e.querySelectorAll("#index-defined-here li[data-id]").forEach((e=>e.removeAttribute("data-id")))}var ku=Object.freeze({__proto__:null,name:"core/dfn-index",run:function(){const e=document.querySelector("section#index");if(!e)return void hs("toc",(()=>{}),{once:!0});const t=document.createElement("style");t.textContent=lu,document.head.appendChild(t),e.classList.add("appendix"),e.querySelector("h2, h1")||e.prepend(sr`<h1>${uu.heading}</h1>`);const n=sr`<section id="index-defined-here">
1090
- <h3>${uu.headingLocal}</h3>
1091
- ${function(){const e=function(){const e=new Map,t=document.querySelectorAll("dfn:not([data-cite])");for(const n of t){if(!n.id)continue;const t=Nr(n.textContent),r=e.get(t)||e.set(t,[]).get(t);r?.push(n)}const n=[...e].sort((([e],[t])=>e.slice(e.search(/\w/)).localeCompare(t.slice(t.search(/\w/)))));return n}();return sr`<ul class="index">
1092
- ${e.map((([e,t])=>function(e,t){const n=(e,t,n="")=>{const r=`#${e.id}`;return sr`<li data-id=${e.id}>
1088
+ </li>`}const xu=new Map([["attribute","attribute"],["element-attr","attribute"],["element","element"],["enum","enum"],["exception","exception"],["extended-attribute","extended attribute"],["interface","interface"]]),Cu=new Set(["boolean","byte","octet","short","unsigned short","long","unsigned long","long long","unsigned long long","float","unrestricted float","double","unrestricted double","undefined","any","object","symbol"]);function Su(e){e.querySelectorAll("#index-defined-elsewhere li[data-spec]").forEach((e=>e.removeAttribute("data-spec"))),e.querySelectorAll("#index-defined-here li[data-id]").forEach((e=>e.removeAttribute("data-id")))}var _u=Object.freeze({__proto__:null,name:"core/dfn-index",run:function(){const e=document.querySelector("section#index");if(!e)return void ws("toc",(()=>{}),{once:!0});const t=document.createElement("style");t.textContent=fu,document.head.appendChild(t),e.classList.add("appendix"),e.querySelector("h2, h1")||e.prepend(ur`<h1>${mu.heading}</h1>`);const n=ur`<section id="index-defined-here">
1089
+ <h3>${mu.headingLocal}</h3>
1090
+ ${function(){const e=function(){const e=new Map,t=document.querySelectorAll("dfn:not([data-cite])");for(const n of t){if(!n.id)continue;const t=Mr(n.textContent),r=e.get(t)||e.set(t,[]).get(t);r?.push(n)}const n=[...e].sort((([e],[t])=>e.slice(e.search(/\w/)).localeCompare(t.slice(t.search(/\w/)))));return n}();return ur`<ul class="index">
1091
+ ${e.map((([e,t])=>function(e,t){const n=(e,t,n="")=>{const r=`#${e.id}`;return ur`<li data-id=${e.id}>
1093
1092
  <a class="index-term" href="${r}">${{html:t}}</a> ${n?{html:n}:""}
1094
- </li>`};if(1===t.length){const r=t[0],s=pu(r),i=function(e,t,n){let r=n;"enum-value"===t&&(r=`"${r}"`);(du.has(t)||e.dataset.idl||e.closest("code"))&&(r=`<code>${r}</code>`);return r}(r,s,e),o=fu(r,s,e);return n(r,i,o)}return sr`<li>
1093
+ </li>`};if(1===t.length){const r=t[0],s=bu(r),i=function(e,t,n){let r=n;"enum-value"===t&&(r=`"${r}"`);(gu.has(t)||e.dataset.idl||e.closest("code"))&&(r=`<code>${r}</code>`);return r}(r,s,e),o=wu(r,s,e);return n(r,i,o)}return ur`<li>
1095
1094
  ${e}
1096
1095
  <ul>
1097
- ${t.map((t=>{const r=fu(t,pu(t),e)||uu.dfnOf;return n(t,r)}))}
1096
+ ${t.map((t=>{const r=wu(t,bu(t),e)||mu.dfnOf;return n(t,r)}))}
1098
1097
  </ul>
1099
1098
  </li>`}(e,t)))}
1100
1099
  </ul>`}()}
1101
- </section>`;e.append(n);const r=sr`<section id="index-defined-elsewhere">
1102
- <h3>${uu.headingExternal}</h3>
1103
- ${function(){const e=[...gu().entries()].sort((([e],[t])=>e.localeCompare(t))),t=document.querySelector("section#index"),n=!!t?.classList.contains("prefer-full-spec-title");return sr`<ul class="index">
1104
- ${e.map((([e,t])=>{let r;return r=n&&ma[e]?.title?Aa(e,ma[e].title):Aa(e),sr`<li data-spec="${e}">
1105
- ${r} ${uu.definesFollowing}
1100
+ </section>`;e.append(n);const r=ur`<section id="index-defined-elsewhere">
1101
+ <h3>${mu.headingExternal}</h3>
1102
+ ${function(){const e=[...ku().entries()].sort((([e],[t])=>e.localeCompare(t))),t=document.querySelector("section#index"),n=!!t?.classList.contains("prefer-full-spec-title");return ur`<ul class="index">
1103
+ ${e.map((([e,t])=>{let r;return r=n&&ka[e]?.title?Da(e,ka[e].title):Da(e),ur`<li data-spec="${e}">
1104
+ ${r} ${mu.definesFollowing}
1106
1105
  <ul>
1107
- ${t.sort(((e,t)=>e.term.localeCompare(t.term))).map(bu)}
1106
+ ${t.sort(((e,t)=>e.term.localeCompare(t.term))).map($u)}
1108
1107
  </ul>
1109
1108
  </li>`}))}
1110
1109
  </ul>`}()}
1111
- </section>`;e.append(r);for(const e of r.querySelectorAll(".index-term"))Fr(e,"index-term");hs("toc",mu,{once:!0}),hs("beforesave",vu)}});const $u="core/contrib";var xu=Object.freeze({__proto__:null,name:$u,run:async function(e){if(!document.getElementById("gh-contributors"))return;if(!e.github){return void ns(ls`Requested list of contributors from GitHub, but ${"[github]"} configuration option is not set.`,$u)}const t=(e.editors??[]).map((e=>e.name)),n=`${e.github.apiBase}/${e.github.fullName}/`;await async function(e,t){const n=document.getElementById("gh-contributors");if(!n)return;n.textContent="Fetching list of contributors...";const r=await s();null!==r?function(e,t){const n=e.sort(((e,t)=>{const n=e.name||e.login,r=t.name||t.login;return n.toLowerCase().localeCompare(r.toLowerCase())}));if("UL"===t.tagName)return void sr(t)`${n.map((({name:e,login:t})=>`<li><a href="https://github.com/${t}">${e||t}</a></li>`))}`;const r=n.map((e=>e.name||e.login));t.textContent=Lr(r)}(r,n):n.textContent="Failed to fetch contributors.";async function s(){const{href:n}=new URL("contributors",t);try{const t=await zr(n);if(!t.ok)throw new Error(`Request to ${n} failed with status code ${t.status}`);return(await t.json()).filter((t=>!e.includes(t.name||t.login)&&!t.login.includes("[bot]")))}catch(e){return ns("Error loading contributors from GitHub.",$u,{cause:e}),null}}}(t,n)}});var Cu=Object.freeze({__proto__:null,name:"core/fix-headers",run:function(){[...document.querySelectorAll("section:not(.introductory)")].map((e=>e.querySelector("h1, h2, h3, h4, h5, h6"))).filter((e=>null!==e)).forEach((e=>{const t=Math.min(function(e,t){const n=[];for(;e&&e!=e.ownerDocument.body;)e.matches(t)&&n.push(e),e=e.parentElement;return n}(e,"section").length+1,6);Hr(e,`h${t}`)}))}});var Su=Object.freeze({__proto__:null,name:"core/webidl-index",run:function(){const e=document.querySelector("section#idl-index");if(!e)return;const t=[2,3,4,5,6].map((e=>`h${e}:first-child`)).join(",");if(!e.querySelector(t)){const t=document.createElement("h2");e.title?(t.textContent=e.title,e.removeAttribute("title")):t.textContent="IDL Index",e.prepend(t)}const n=Array.from(document.querySelectorAll("pre.idl:not(.exclude) > code")).filter((e=>!e.closest(Cr)));if(0===n.length){const t="This specification doesn't normatively declare any Web IDL.";return void e.append(t)}const r=document.createElement("pre");r.classList.add("idl","def"),r.id="actual-idl-index",n.map((e=>{const t=document.createDocumentFragment();for(const n of e.children)t.appendChild(n.cloneNode(!0));return t})).forEach((e=>{r.lastChild&&r.append("\n\n"),r.appendChild(e)})),r.querySelectorAll("*[id]").forEach((e=>e.removeAttribute("id"))),e.appendChild(r),Vr(r,document.createElement("code")),al(r)}});function _u(e,t){const n=document.createElement("pre");n.classList.add("cddl","def","highlight"),t&&(n.id=t);const r=document.createElement("code");return e.map((e=>{const t=document.createDocumentFragment();return e.childNodes.forEach((e=>t.appendChild(e.cloneNode(!0)))),t})).forEach((e=>{r.lastChild&&r.append("\n\n"),r.appendChild(e)})),r.querySelectorAll("*[id]").forEach((e=>e.removeAttribute("id"))),r.querySelectorAll("dfn").forEach((e=>{const t=Hr(e,"span");t.removeAttribute("data-export");for(const e of[...t.attributes])e.name.startsWith("data-dfn")&&t.removeAttribute(e.name)})),n.append(r),n}var Tu=Object.freeze({__proto__:null,name:"core/cddl-index",run:function(){const e=document.querySelector("section#cddl-index");if(!e)return;if(!e.querySelector(":scope > :is(h2, h3, h4, h5, h6):first-child")){const t=document.createElement("h2");e.title?(t.textContent=e.title,e.removeAttribute("title")):t.textContent="CDDL Index",e.prepend(t)}const t=Array.from(document.querySelectorAll("pre.cddl:not(.exclude) > code")).filter((e=>!e.closest(Cr)));if(0===t.length){const t="This specification doesn't normatively declare any CDDL.";return void e.append(t)}const n=new Map;for(const e of t){const t=e.closest("pre"),r=t?.dataset.cddlModule||"";let s=n.get(r);s||(s=[],n.set(r,s)),s.push(e)}n.size>1||1===n.size&&!n.has("")?n.forEach(((t,n)=>{const r=document.createElement("section"),s=document.createElement("h3"),i=n||"Default";s.textContent=`Module: ${i}`,n&&(s.id=`cddl-index-module-${n.toLowerCase().replace(/[^a-z0-9]+/g,"-")}`),r.append(s),r.append(_u(t)),e.append(r)})):e.append(_u(t,"actual-cddl-index"))}});const Ru=["h2","h3","h4","h5","h6"],Eu="core/structure",Lu=Ir({en:{toc:"Table of Contents",back_to_top:"Back to Top"},zh:{toc:"内容大纲",back_to_top:"返回顶部"},ko:{toc:"목차",back_to_top:"맨 위로"},ja:{toc:"目次",back_to_top:"先頭に戻る"},nl:{toc:"Inhoudsopgave",back_to_top:"Terug naar boven"},es:{toc:"Tabla de Contenidos",back_to_top:"Volver arriba"},fr:{toc:"Table des matières",back_to_top:"Retourner en haut"},de:{toc:"Inhaltsverzeichnis",back_to_top:"Zurück nach oben"},cs:{toc:"Obsah",back_to_top:"Zpět na začátek"}});function Au(e,t,{prefix:n=""}={}){let r=!1,s=0,i=1;if(n.length&&!n.endsWith(".")&&(n+="."),0===e.length)return null;const o=sr`<ol class="toc"></ol>`;for(const a of e){!a.isAppendix||n||r||(s=i,r=!0);let e=a.isIntro?"":r?Pu(i-s+1):n+i;const c=e.split(".").length;if(1===c&&(e+=".",a.header.before(document.createComment("OddPage"))),a.isIntro||(i+=1,a.header.prepend(sr`<bdi class="secno">${e} </bdi>`)),c<=t){const n=a.header.id||a.element.id,r=Iu(a.header,n),s=Au(a.subsections,t,{prefix:e});s&&r.append(s),o.append(r)}}return o}function Pu(e){let t="";for(;e>0;)e-=1,t=String.fromCharCode(65+e%26)+t,e=Math.floor(e/26);return t}function Nu(e){const t=e.querySelectorAll(":scope > section"),n=[];for(const e of t){const t=e.classList.contains("notoc");if(!e.children.length||t)continue;const r=e.children[0];if(!Ru.includes(r.localName))continue;const s=r.textContent;Fr(e,void 0,s),n.push({element:e,header:r,title:s,isIntro:Boolean(e.closest(".introductory")),isAppendix:e.classList.contains("appendix"),subsections:Nu(e)})}return n}function Iu(e,t){const n=sr`<a href="${`#${t}`}" class="tocxref" />`;var r;return n.append(...e.cloneNode(!0).childNodes),(r=n).querySelectorAll("a").forEach((e=>{const t=Hr(e,"span");t.className="formerLink",t.removeAttribute("href")})),r.querySelectorAll("dfn").forEach((e=>{Hr(e,"span").removeAttribute("id")})),sr`<li class="tocline">${n}</li>`}var Du=Object.freeze({__proto__:null,name:Eu,run:function(e){if("maxTocLevel"in e==!1&&(e.maxTocLevel=1/0),function(){const e=[...document.querySelectorAll("section:not(.introductory) :is(h1,h2,h3,h4,h5,h6):first-child")].filter((e=>!e.closest("section.introductory")));if(!e.length)return;e.forEach((e=>{const t=Math.min(function(e,t){const n=[];let r=e.parentElement;for(;r;){const e=r.closest(t);if(!e)break;n.push(e),r=e.parentElement}return n}(e,"section").length+1,6),n=`h${t}`;e.localName!==n&&Hr(e,n)}))}(),!e.noTOC){!function(){const e=document.querySelectorAll("section[data-max-toc]");for(const t of e){const e=parseInt(t.dataset.maxToc??"",10);if(e<0||e>6||Number.isNaN(e)){ns("`data-max-toc` must have a value between 0-6 (inclusive).",Eu,{elements:[t]});continue}if(0===e){t.classList.add("notoc");continue}const n=t.querySelectorAll(`:scope > ${Array.from({length:e},(()=>"section")).join(" > ")}`);for(const e of n)e.classList.add("notoc")}}();const t=Au(Nu(document.body),e.maxTocLevel);t&&function(e){if(!e)return;const t=sr`<nav id="toc"></nav>`,n=sr`<h2 class="introductory">${Lu.toc}</h2>`;Fr(n),t.append(n,e);const r=document.getElementById("toc")||document.getElementById("sotd")||document.getElementById("abstract");r&&("toc"===r.id?r.replaceWith(t):r.after(t));const s=sr`<p role="navigation" id="back-to-top">
1112
- <a href="#title"><abbr title="${Lu.back_to_top}">&uarr;</abbr></a>
1113
- </p>`;document.body.append(s)}(t)}ps("toc",void 0)}});const Ou=Ir({en:{informative:"This section is non-normative."},nl:{informative:"Dit onderdeel is niet-normatief."},ko:{informative:"이 부분은 비규범적입니다."},ja:{informative:"この節は仕様には含まれません."},de:{informative:"Dieser Abschnitt ist nicht normativ."},zh:{informative:"本章节不包含规范性内容。"},cs:{informative:"Tato sekce není normativní."},fr:{informative:"Cette section est non normative."}});var ju=Object.freeze({__proto__:null,name:"core/informative",run:function(){Array.from(document.querySelectorAll("section.informative")).map((e=>e.querySelector("h2, h3, h4, h5, h6"))).filter((e=>null!==e)).forEach((e=>{e.after(sr`<p><em>${Ou.informative}</em></p>`)}))}});const zu=Ir({en:{permalinkLabel(e,t){let n=`Permalink for${t?"":" this"} ${e}`;return t&&(n+=` ${Nr(t.textContent)}`),n}}});var Mu=Object.freeze({__proto__:null,name:"core/id-headers",run:function(e){const t=document.querySelectorAll("section:not(.head,#abstract,#sotd) h2, h3, h4, h5, h6");for(const n of t){let t=n.id;if(t||(Fr(n),t=n.parentElement?.id||n.id),!e.addSectionLinks)continue;const r=zu.permalinkLabel(n.closest(".appendix")?"Appendix":"Section",n.querySelector(":scope > bdi.secno")),s=sr`<div class="header-wrapper"></div>`;n.replaceWith(s);const i=sr`<a
1110
+ </section>`;e.append(r);for(const e of r.querySelectorAll(".index-term"))Kr(e,"index-term");ws("toc",vu,{once:!0}),ws("beforesave",Su)}});const Tu="core/contrib";var Ru=Object.freeze({__proto__:null,name:Tu,run:async function(e){if(!document.getElementById("gh-contributors"))return;if(!e.github){return void cs(ms`Requested list of contributors from GitHub, but ${"[github]"} configuration option is not set.`,Tu)}const t=(e.editors??[]).map((e=>e.name)),n=`${e.github.apiBase}/${e.github.fullName}/`;await async function(e,t){const n=document.getElementById("gh-contributors");if(!n)return;n.textContent="Fetching list of contributors...";const r=await s();null!==r?function(e,t){const n=e.sort(((e,t)=>{const n=e.name||e.login,r=t.name||t.login;return n.toLowerCase().localeCompare(r.toLowerCase())}));if("UL"===t.tagName)return void ur(t)`${n.map((({name:e,login:t})=>`<li><a href="https://github.com/${t}">${e||t}</a></li>`))}`;const r=n.map((e=>e.name||e.login));t.textContent=Or(r)}(r,n):n.textContent="Failed to fetch contributors.";async function s(){const{href:n}=new URL("contributors",t);try{const t=await Br(n);if(!t.ok)throw new Error(`Request to ${n} failed with status code ${t.status}`);return(await t.json()).filter((t=>!e.includes(t.name||t.login)&&!t.login.includes("[bot]")))}catch(e){return cs("Error loading contributors from GitHub.",Tu,{cause:e}),null}}}(t,n)}});var Eu=Object.freeze({__proto__:null,name:"core/fix-headers",run:function(){[...document.querySelectorAll("section:not(.introductory)")].map((e=>e.querySelector("h1, h2, h3, h4, h5, h6"))).filter((e=>null!==e)).forEach((e=>{const t=Math.min(function(e,t){const n=[];for(;e&&e!=e.ownerDocument.body;)e.matches(t)&&n.push(e),e=e.parentElement;return n}(e,"section").length+1,6);Yr(e,`h${t}`)}))}});var Lu=Object.freeze({__proto__:null,name:"core/webidl-index",run:function(){const e=document.querySelector("section#idl-index");if(!e)return;const t=[2,3,4,5,6].map((e=>`h${e}:first-child`)).join(",");if(!e.querySelector(t)){const t=document.createElement("h2");e.title?(t.textContent=e.title,e.removeAttribute("title")):t.textContent="IDL Index",e.prepend(t)}const n=Array.from(document.querySelectorAll("pre.idl:not(.exclude) > code")).filter((e=>!e.closest(Lr)));if(0===n.length){const t="This specification doesn't normatively declare any Web IDL.";return void e.append(t)}const r=document.createElement("pre");r.classList.add("idl","def"),r.id="actual-idl-index",n.map((e=>{const t=document.createDocumentFragment();for(const n of e.children)t.appendChild(n.cloneNode(!0));return t})).forEach((e=>{r.lastChild&&r.append("\n\n"),r.appendChild(e)})),r.querySelectorAll("*[id]").forEach((e=>e.removeAttribute("id"))),e.appendChild(r),Qr(r,document.createElement("code")),pl(r)}});function Au(e,t){const n=document.createElement("pre");n.classList.add("cddl","def","highlight"),t&&(n.id=t);const r=document.createElement("code");return e.map((e=>{const t=document.createDocumentFragment();return e.childNodes.forEach((e=>t.appendChild(e.cloneNode(!0)))),t})).forEach((e=>{r.lastChild&&r.append("\n\n"),r.appendChild(e)})),r.querySelectorAll("*[id]").forEach((e=>e.removeAttribute("id"))),r.querySelectorAll("dfn").forEach((e=>{const t=Yr(e,"span");t.removeAttribute("data-export");for(const e of[...t.attributes])e.name.startsWith("data-dfn")&&t.removeAttribute(e.name)})),n.append(r),n}var Pu=Object.freeze({__proto__:null,name:"core/cddl-index",run:function(){const e=document.querySelector("section#cddl-index");if(!e)return;if(!e.querySelector(":scope > :is(h2, h3, h4, h5, h6):first-child")){const t=document.createElement("h2");e.title?(t.textContent=e.title,e.removeAttribute("title")):t.textContent="CDDL Index",e.prepend(t)}const t=Array.from(document.querySelectorAll("pre.cddl:not(.exclude) > code")).filter((e=>!e.closest(Lr)));if(0===t.length){const t="This specification doesn't normatively declare any CDDL.";return void e.append(t)}const n=new Map;for(const e of t){const t=e.closest("pre"),r=t?.dataset.cddlModule||"";let s=n.get(r);s||(s=[],n.set(r,s)),s.push(e)}n.size>1||1===n.size&&!n.has("")?n.forEach(((t,n)=>{const r=document.createElement("section"),s=document.createElement("h3"),i=n||"Default";s.textContent=`Module: ${i}`,n&&(s.id=`cddl-index-module-${n.toLowerCase().replace(/[^a-z0-9]+/g,"-")}`),r.append(s),r.append(Au(t)),e.append(r)})):e.append(Au(t,"actual-cddl-index"))}});const Nu=["h2","h3","h4","h5","h6"],Iu="core/structure",Du=Ur({en:{toc:"Table of Contents",back_to_top:"Back to Top"},zh:{toc:"内容大纲",back_to_top:"返回顶部"},ko:{toc:"목차",back_to_top:"맨 위로"},ja:{toc:"目次",back_to_top:"先頭に戻る"},nl:{toc:"Inhoudsopgave",back_to_top:"Terug naar boven"},es:{toc:"Tabla de Contenidos",back_to_top:"Volver arriba"},fr:{toc:"Table des matières",back_to_top:"Retourner en haut"},de:{toc:"Inhaltsverzeichnis",back_to_top:"Zurück nach oben"},cs:{toc:"Obsah",back_to_top:"Zpět na začátek"}});function Ou(e,t,{prefix:n=""}={}){let r=!1,s=0,i=1;if(n.length&&!n.endsWith(".")&&(n+="."),0===e.length)return null;const o=ur`<ol class="toc"></ol>`;for(const a of e){!a.isAppendix||n||r||(s=i,r=!0);let e=a.isIntro?"":r?ju(i-s+1):n+i;const c=e.split(".").length;if(1===c&&(e+=".",a.header.before(document.createComment("OddPage"))),a.isIntro||(i+=1,a.header.prepend(ur`<bdi class="secno">${e} </bdi>`)),c<=t){const n=a.header.id||a.element.id,r=Mu(a.header,n),s=Ou(a.subsections,t,{prefix:e});s&&r.append(s),o.append(r)}}return o}function ju(e){let t="";for(;e>0;)e-=1,t=String.fromCharCode(65+e%26)+t,e=Math.floor(e/26);return t}function zu(e){const t=e.querySelectorAll(":scope > section"),n=[];for(const e of t){const t=e.classList.contains("notoc");if(!e.children.length||t)continue;const r=e.children[0];if(!Nu.includes(r.localName))continue;const s=r.textContent;Kr(e,void 0,s),n.push({element:e,header:r,title:s,isIntro:Boolean(e.closest(".introductory")),isAppendix:e.classList.contains("appendix"),subsections:zu(e)})}return n}function Mu(e,t){const n=ur`<a href="${`#${t}`}" class="tocxref" />`;var r;return n.append(...e.cloneNode(!0).childNodes),(r=n).querySelectorAll("a").forEach((e=>{const t=Yr(e,"span");t.className="formerLink",t.removeAttribute("href")})),r.querySelectorAll("dfn").forEach((e=>{Yr(e,"span").removeAttribute("id")})),ur`<li class="tocline">${n}</li>`}var Uu=Object.freeze({__proto__:null,name:Iu,run:function(e){if("maxTocLevel"in e==!1&&(e.maxTocLevel=1/0),function(){const e=[...document.querySelectorAll("section:not(.introductory) :is(h1,h2,h3,h4,h5,h6):first-child")].filter((e=>!e.closest("section.introductory")));if(!e.length)return;e.forEach((e=>{const t=Math.min(function(e,t){const n=[];let r=e.parentElement;for(;r;){const e=r.closest(t);if(!e)break;n.push(e),r=e.parentElement}return n}(e,"section").length+1,6),n=`h${t}`;e.localName!==n&&Yr(e,n)}))}(),!e.noTOC){!function(){const e=document.querySelectorAll("section[data-max-toc]");for(const t of e){const e=parseInt(t.dataset.maxToc??"",10);if(e<0||e>6||Number.isNaN(e)){cs("`data-max-toc` must have a value between 0-6 (inclusive).",Iu,{elements:[t]});continue}if(0===e){t.classList.add("notoc");continue}const n=t.querySelectorAll(`:scope > ${Array.from({length:e},(()=>"section")).join(" > ")}`);for(const e of n)e.classList.add("notoc")}}();const t=Ou(zu(document.body),e.maxTocLevel);t&&function(e){if(!e)return;const t=ur`<nav id="toc"></nav>`,n=ur`<h2 class="introductory">${Du.toc}</h2>`;Kr(n),t.append(n,e);const r=document.getElementById("toc")||document.getElementById("sotd")||document.getElementById("abstract");r&&("toc"===r.id?r.replaceWith(t):r.after(t));const s=ur`<p role="navigation" id="back-to-top">
1111
+ <a href="#title"><abbr title="${Du.back_to_top}">&uarr;</abbr></a>
1112
+ </p>`;document.body.append(s)}(t)}ys("toc",void 0)}});const qu=Ur({en:{informative:"This section is non-normative."},nl:{informative:"Dit onderdeel is niet-normatief."},ko:{informative:"이 부분은 비규범적입니다."},ja:{informative:"この節は仕様には含まれません."},de:{informative:"Dieser Abschnitt ist nicht normativ."},zh:{informative:"本章节不包含规范性内容。"},cs:{informative:"Tato sekce není normativní."},fr:{informative:"Cette section est non normative."}});var Wu=Object.freeze({__proto__:null,name:"core/informative",run:function(){Array.from(document.querySelectorAll("section.informative")).map((e=>e.querySelector("h2, h3, h4, h5, h6"))).filter((e=>null!==e)).forEach((e=>{e.after(ur`<p><em>${qu.informative}</em></p>`)}))}});const Fu=Ur({en:{permalinkLabel(e,t){let n=`Permalink for${t?"":" this"} ${e}`;return t&&(n+=` ${Mr(t.textContent)}`),n}}});var Bu=Object.freeze({__proto__:null,name:"core/id-headers",run:function(e){const t=document.querySelectorAll("section:not(.head,#abstract,#sotd) h2, h3, h4, h5, h6");for(const n of t){let t=n.id;if(t||(Kr(n),t=n.parentElement?.id||n.id),!e.addSectionLinks)continue;const r=Fu.permalinkLabel(n.closest(".appendix")?"Appendix":"Section",n.querySelector(":scope > bdi.secno")),s=ur`<div class="header-wrapper"></div>`;n.replaceWith(s);const i=ur`<a
1114
1113
  href="#${t}"
1115
1114
  class="self-link"
1116
1115
  aria-label="${r}"
1117
- ></a>`;s.append(n,i)}}});var Uu=String.raw`.caniuse-stats{display:flex;column-gap:2em}
1116
+ ></a>`;s.append(n,i)}}});var Hu=String.raw`.caniuse-stats{display:flex;column-gap:2em}
1118
1117
  .caniuse-group{display:flex;flex:1;flex-direction:column;justify-content:flex-end;flex-basis:auto}
1119
1118
  .caniuse-browsers{display:flex;align-items:baseline;justify-content:space-between;flex-wrap:wrap;margin-top:.2em;column-gap:.4em;border-bottom:1px solid #ccc;row-gap:.4em;padding-bottom:.4cm}
1120
1119
  .caniuse-type{align-self:center;border-top:none;text-transform:capitalize;font-size:.8em;margin-top:-.8em;font-weight:700}
@@ -1132,12 +1131,12 @@ img.caniuse-browser{filter:drop-shadow(0 0 .1cm #666);background:0 0}
1132
1131
  .caniuse-cell.y::before{content:"✔️";padding:.5em}
1133
1132
  .caniuse-cell.n::before{content:"❌";padding:.5em}
1134
1133
  .caniuse-cell:is(.a,.d,.p,.x,.u)::before{content:"⚠️";padding:.5em}
1135
- }`;const qu="core/caniuse",Wu="https://respec.org/caniuse/",Fu=new Map([["and_chr",{name:"Android Chrome",path:"chrome",type:"mobile"}],["and_ff",{name:"Android Firefox",path:"firefox",type:"mobile"}],["and_uc",{name:"Android UC",path:"uc",type:"mobile"}],["chrome",{name:"Chrome",type:"desktop"}],["edge",{name:"Edge",type:"desktop"}],["firefox",{name:"Firefox",type:"desktop"}],["ios_saf",{name:"iOS Safari",path:"safari-ios",type:"mobile"}],["op_mob",{name:"Opera Mobile",path:"opera",type:"mobile"}],["opera",{name:"Opera",type:"desktop"}],["safari",{name:"Safari",type:"desktop"}],["samsung",{name:"Samsung Internet",path:"samsung-internet",type:"mobile"}]]),Bu=new Map([["a","almost supported (aka Partial support)"],["d","disabled by default"],["n","no support, or disabled by default"],["p","no support, but has Polyfill"],["u","unknown support"],["x","requires prefix to work"],["y","supported by default"]]);var Hu=Object.freeze({__proto__:null,BROWSERS:Fu,name:qu,prepare:function(e){if(!e.caniuse)return;!function(e){const t=new Set(Fu.keys());t.delete("op_mob"),t.delete("opera");const n={removeOnSave:!0,browsers:[...t]};if("string"==typeof e.caniuse)return void(e.caniuse={feature:e.caniuse,...n});e.caniuse={...n,...e.caniuse}}(e),function({caniuse:e}){const{browsers:t}=e,n=t.filter((e=>!Fu.has(e)));if(n.length){rs(ls`Invalid browser(s): (${as(n,{quotes:!0})}) in the \`browser\` property of ${"[caniuse]"}.`,qu)}}(e);const t=e.caniuse;t.feature&&document.head.appendChild(sr`<style
1134
+ }`;const Gu="core/caniuse",Vu="https://respec.org/caniuse/",Ju=new Map([["and_chr",{name:"Android Chrome",path:"chrome",type:"mobile"}],["and_ff",{name:"Android Firefox",path:"firefox",type:"mobile"}],["and_uc",{name:"Android UC",path:"uc",type:"mobile"}],["chrome",{name:"Chrome",type:"desktop"}],["edge",{name:"Edge",type:"desktop"}],["firefox",{name:"Firefox",type:"desktop"}],["ios_saf",{name:"iOS Safari",path:"safari-ios",type:"mobile"}],["op_mob",{name:"Opera Mobile",path:"opera",type:"mobile"}],["opera",{name:"Opera",type:"desktop"}],["safari",{name:"Safari",type:"desktop"}],["samsung",{name:"Samsung Internet",path:"samsung-internet",type:"mobile"}]]),Ku=new Map([["a","almost supported (aka Partial support)"],["d","disabled by default"],["n","no support, or disabled by default"],["p","no support, but has Polyfill"],["u","unknown support"],["x","requires prefix to work"],["y","supported by default"]]);var Zu=Object.freeze({__proto__:null,BROWSERS:Ju,name:Gu,prepare:function(e){if(!e.caniuse)return;!function(e){const t=new Set(Ju.keys());t.delete("op_mob"),t.delete("opera");const n={removeOnSave:!0,browsers:[...t]};if("string"==typeof e.caniuse)return void(e.caniuse={feature:e.caniuse,...n});e.caniuse={...n,...e.caniuse}}(e),function({caniuse:e}){const{browsers:t}=e,n=t.filter((e=>!Ju.has(e)));if(n.length){ls(ms`Invalid browser(s): (${hs(n,{quotes:!0})}) in the \`browser\` property of ${"[caniuse]"}.`,Gu)}}(e);const t=e.caniuse;t.feature&&document.head.appendChild(ur`<style
1136
1135
  id="caniuse-stylesheet"
1137
1136
  class="${t.removeOnSave?"removeOnSave":""}"
1138
1137
  >
1139
- ${Uu}
1140
- </style>`)},run:async function(e){const t=e.caniuse;if(!t?.feature)return;const n=new URL(t.feature,"https://caniuse.com/").href,r=document.querySelector(".head dl"),s=async function(e){const{feature:t,browsers:n,apiURL:r}=e,s=new URL(r||`./${t}`,Wu);n.forEach((e=>s.searchParams.append("browsers",e)));const i=await fetch(s);if(!i.ok){const{status:e,statusText:t}=i;throw new Error(`Failed to get caniuse data: (${e}) ${t}`)}return i.json()}(e.caniuse).then((e=>async function(e,{feature:t}){const n=e.result,r=new Map([["desktop",[]],["mobile",[]]]),s=function(e){return(t,{browser:n,version:r,caniuse:s})=>{const i=Fu.get(n),{name:o,type:a}=i??{name:n,type:"desktop"},c=Bu.get(s),l=r||"—",u=r?` version ${r}`:" (version unknown)",d=`${e} is ${c} since ${o}${u} on ${a}.`,p=`caniuse-cell ${s}`,h=(f=`${c} since ${o}${u}.`).charAt(0).toUpperCase()+f.slice(1);var f;const m=function(e){const t=Fu.get(e)?.path??e;return`https://www.w3.org/assets/logos/browser-logos/${t}/${t}.svg`}(n),g=sr`
1138
+ ${Hu}
1139
+ </style>`)},run:async function(e){const t=e.caniuse;if(!t?.feature)return;const n=new URL(t.feature,"https://caniuse.com/").href,r=document.querySelector(".head dl"),s=async function(e){const{feature:t,browsers:n,apiURL:r}=e,s=new URL(r||`./${t}`,Vu);n.forEach((e=>s.searchParams.append("browsers",e)));const i=await fetch(s);if(!i.ok){const{status:e,statusText:t}=i;throw new Error(`Failed to get caniuse data: (${e}) ${t}`)}return i.json()}(e.caniuse).then((e=>async function(e,{feature:t}){const n=e.result,r=new Map([["desktop",[]],["mobile",[]]]),s=function(e){return(t,{browser:n,version:r,caniuse:s})=>{const i=Ju.get(n),{name:o,type:a}=i??{name:n,type:"desktop"},c=Ku.get(s),l=r||"—",u=r?` version ${r}`:" (version unknown)",d=`${e} is ${c} since ${o}${u} on ${a}.`,p=`caniuse-cell ${s}`,h=(f=`${c} since ${o}${u}.`).charAt(0).toUpperCase()+f.slice(1);var f;const m=function(e){const t=Ju.get(e)?.path??e;return`https://www.w3.org/assets/logos/browser-logos/${t}/${t}.svg`}(n),g=ur`
1141
1140
  <div
1142
1141
  class="${p}"
1143
1142
  role="img"
@@ -1152,16 +1151,16 @@ img.caniuse-browser{filter:drop-shadow(0 0 .1cm #666);background:0 0}
1152
1151
  alt=""
1153
1152
  /><span class="browser-version">${l}</span>
1154
1153
  </div>
1155
- `;return t.get(a)?.push(g),t}}(t);n.reduce(s,r);const i=[...r].filter((([,e])=>e.length)).map((([e,t])=>sr`<div class="caniuse-group">
1154
+ `;return t.get(a)?.push(g),t}}(t);n.reduce(s,r);const i=[...r].filter((([,e])=>e.length)).map((([e,t])=>ur`<div class="caniuse-group">
1156
1155
  <div class="caniuse-browsers">${t}</div>
1157
1156
  <div class="caniuse-type"><span>${e}</div>
1158
- </div>`));return i.push(sr`<a class="caniuse-cell" href="https://caniuse.com/${t}"
1157
+ </div>`));return i.push(ur`<a class="caniuse-cell" href="https://caniuse.com/${t}"
1159
1158
  >More info</a
1160
- >`),i}(e,t))).catch((e=>function(e,t,n){const r=`Failed to retrieve feature "${t.feature}".`,s=ls`Please check the feature key on [caniuse.com](https://caniuse.com) and update ${"[caniuse]"}.`;return ns(r,qu,{hint:s,cause:e}),sr`<a href="${n}">caniuse.com</a>`}(e,t,n))),i=sr`<dt class="caniuse-title">Browser support:</dt>
1159
+ >`),i}(e,t))).catch((e=>function(e,t,n){const r=`Failed to retrieve feature "${t.feature}".`,s=ms`Please check the feature key on [caniuse.com](https://caniuse.com) and update ${"[caniuse]"}.`;return cs(r,Gu,{hint:s,cause:e}),ur`<a href="${n}">caniuse.com</a>`}(e,t,n))),i=ur`<dt class="caniuse-title">Browser support:</dt>
1161
1160
  <dd class="caniuse-stats">
1162
1161
  ${{any:s,placeholder:"Fetching data from caniuse.com..."}}
1163
- </dd>`;r?.append(...i.childNodes),await s,ps("amend-user-config",{caniuse:t.feature}),t.removeOnSave&&(r?.querySelectorAll(".caniuse-browser").forEach((e=>e.classList.add("removeOnSave"))),hs("beforesave",(e=>{sr.bind(e.querySelector(".caniuse-stats"))`
1164
- <a href="${n}">caniuse.com</a>`})))}});var Gu=String.raw`.baseline-title{display:flex;align-items:center;gap:.4em}
1162
+ </dd>`;r?.append(...i.childNodes),await s,ys("amend-user-config",{caniuse:t.feature}),t.removeOnSave&&(r?.querySelectorAll(".caniuse-browser").forEach((e=>e.classList.add("removeOnSave"))),ws("beforesave",(e=>{const t=e.querySelector(".caniuse-stats");if(t)ur.bind(t)`
1163
+ <a href="${n}">caniuse.com</a>`;else{ls("Couldn't add the caniuse.com link to the saved document.",Gu,{hint:"The support table is appended to the document header's definition list (`.head dl`), so it was never inserted if that list is absent. The browser support cells are removed on save, so the exported document will have no caniuse.com attribution."})}})))}});var Yu=String.raw`.baseline-title{display:flex;align-items:center;gap:.4em}
1165
1164
  .baseline-icon{width:auto;height:.9em;vertical-align:baseline}
1166
1165
  .baseline-status{display:flex;align-items:center;gap:1em}
1167
1166
  .baseline-browsers{display:flex;gap:.5em;align-items:center}
@@ -1183,13 +1182,13 @@ img.caniuse-browser{filter:drop-shadow(0 0 .1cm #666);background:0 0}
1183
1182
  @media print{
1184
1183
  .baseline-pill{background:0 0!important;border:1px solid #ccc}
1185
1184
  .baseline-support-icon{color:#333!important}
1186
- }`;const Vu="core/implementation-status",Ju="https://respec.org/api/baseline",Ku="https://respec.org/api/baseline/search",Zu="https://www.w3.org/assets/logos/browser-logos",Yu=new Map([["chrome",{name:"Chrome",engine:"chromium"}],["edge",{name:"Edge",engine:"chromium"}],["firefox",{name:"Firefox",engine:"gecko"}],["safari",{name:"Safari",engine:"webkit"}]]),Xu=new Map([["high","Widely available"],["low","Newly available"],["","Limited availability"]]),Qu=new Map([["",()=>sr`<svg class="baseline-icon" viewBox="0 0 36 20">
1185
+ }`;const Xu="core/implementation-status",Qu="https://respec.org/api/baseline",ed="https://respec.org/api/baseline/search",td="https://www.w3.org/assets/logos/browser-logos",nd=new Map([["chrome",{name:"Chrome",engine:"chromium"}],["edge",{name:"Edge",engine:"chromium"}],["firefox",{name:"Firefox",engine:"gecko"}],["safari",{name:"Safari",engine:"webkit"}]]),rd=new Map([["high","Widely available"],["low","Newly available"],["","Limited availability"]]),sd=new Map([["",()=>ur`<svg class="baseline-icon" viewBox="0 0 36 20">
1187
1186
  <path fill="#f09409" d="M10 0L16 6L14 8L8 2L10 0Z" />
1188
1187
  <path fill="#f09409" d="M22 12L20 14L26 20L28 18L22 12Z" />
1189
1188
  <path fill="#f09409" d="M26 0L28 2L10 20L8 18L26 0Z" />
1190
1189
  <path fill="#c6c6c6" d="M8 2L10 4L4 10L10 16L8 18L0 10L8 2Z" />
1191
1190
  <path fill="#c6c6c6" d="M28 2L36 10L28 18L26 16L32 10L26 4L28 2Z" />
1192
- </svg>`],["high",()=>sr`<svg class="baseline-icon" viewBox="0 0 36 20">
1191
+ </svg>`],["high",()=>ur`<svg class="baseline-icon" viewBox="0 0 36 20">
1193
1192
  <path fill="#1ea446" d="M18 8L20 10L18 12L16 10L18 8Z" />
1194
1193
  <path fill="#1ea446" d="M26 0L28 2L10 20L0 10L2 8L10 16L26 0Z" />
1195
1194
  <path
@@ -1197,13 +1196,13 @@ img.caniuse-browser{filter:drop-shadow(0 0 .1cm #666);background:0 0}
1197
1196
  d="M28 2L26 4L32 10L26 16L22 12L20 14L26 20L36 10L28 2Z"
1198
1197
  />
1199
1198
  <path fill="#c4eed0" d="M10 0L2 8L4 10L10 4L14 8L16 6L10 0Z" />
1200
- </svg>`],["low",()=>sr`<svg class="baseline-icon" viewBox="0 0 36 20">
1199
+ </svg>`],["low",()=>ur`<svg class="baseline-icon" viewBox="0 0 36 20">
1201
1200
  <path
1202
1201
  fill="#a8c7fa"
1203
1202
  d="m10 0 2 2-2 2-2-2 2-2Zm4 4 2 2-2 2-2-2 2-2Zm16 0 2 2-2 2-2-2 2-2Zm4 4 2 2-2 2-2-2 2-2Zm-4 4 2 2-2 2-2-2 2-2Zm-4 4 2 2-2 2-2-2 2-2Zm-4-4 2 2-2 2-2-2 2-2ZM6 4l2 2-2 2-2-2 2-2Z"
1204
1203
  />
1205
1204
  <path fill="#1b6ef3" d="m26 0 2 2-18 18L0 10l2-2 8 8L26 0Z" />
1206
- </svg>`]]),ed={available:()=>sr`<svg
1205
+ </svg>`]]),id={available:()=>ur`<svg
1207
1206
  class="baseline-support-icon"
1208
1207
  xmlns="http://www.w3.org/2000/svg"
1209
1208
  width="17"
@@ -1219,7 +1218,7 @@ img.caniuse-browser{filter:drop-shadow(0 0 .1cm #666);background:0 0}
1219
1218
  fill="currentColor"
1220
1219
  d="M11.348 8.125 6.34 13.056l-3.006-2.954 1.002-.985 1.999 1.965 4.012-3.942 1.002.985Z"
1221
1220
  />
1222
- </svg>`,unavailable:()=>sr`<svg
1221
+ </svg>`,unavailable:()=>ur`<svg
1223
1222
  class="baseline-support-icon"
1224
1223
  xmlns="http://www.w3.org/2000/svg"
1225
1224
  width="17"
@@ -1235,12 +1234,12 @@ img.caniuse-browser{filter:drop-shadow(0 0 .1cm #666);background:0 0}
1235
1234
  fill="currentColor"
1236
1235
  d="m10.321 8.126-1.987 1.972 1.987 1.972-.993.986-1.987-1.972-1.987 1.972-.993-.986 1.986-1.972-1.986-1.972.993-.986 1.987 1.972L9.328 7.14l.993.986Z"
1237
1236
  />
1238
- </svg>`},td=Map.groupBy(Yu.keys(),(e=>Yu.get(e).engine));function nd(){return{dt:sr`Implementation status:`,dd:sr`<a href="https://webstatus.dev/">Web Platform Status</a>`,moreInfoUrl:"https://webstatus.dev/"}}function rd(e){const t=ls`Check the ${"[implementationStatus]"} configuration.`;return rs("Failed to retrieve implementation status data.",Vu,{hint:t,cause:e instanceof Error?e:void 0}),nd()}async function sd(e){const t=e.apiURL||Ju,n=await zr(t);if(!n.ok)throw new Error(`HTTP ${n.status}: ${n.statusText}`);return n.json()}function id(e){return!e.kind||"feature"===e.kind}function od(e,t,n){const r=e.features||e;if(n.feature){const e=r[n.feature];return e&&id(e)?[{id:n.feature,...e}]:[]}const s=ad(t);return s.length?Object.entries(r).filter((([,e])=>{if(!id(e))return!1;return[e.spec].flat().filter(Boolean).some((e=>{const t=cd(e);return s.some((e=>t.startsWith(e)))}))})).map((([e,t])=>({id:e,...t}))):[]}function ad(e){const t=new Set;return e.edDraftURI&&t.add(cd(e.edDraftURI)),e.shortName&&(t.add(cd(`https://www.w3.org/TR/${e.shortName}/`)),t.add(cd(`https://w3c.github.io/${e.shortName}/`))),e.thisVersion&&t.add(cd(e.thisVersion)),[...t]}function cd(e){try{const t=new URL(e);return t.hash="",t.pathname.endsWith("/")||t.pathname.includes(".")||(t.pathname+="/"),t.href}catch{return e}}var ld=Object.freeze({__proto__:null,name:Vu,prepare:function(e){if(!e.implementationStatus)return;!function(e){const t={removeOnSave:!1};if("boolean"==typeof e.implementationStatus)return void(e.implementationStatus={feature:null,...t});if("string"==typeof e.implementationStatus)return void(e.implementationStatus={feature:e.implementationStatus,...t});e.implementationStatus={...t,...e.implementationStatus}}(e);const t=e.implementationStatus;document.head.appendChild(sr`<style
1237
+ </svg>`},od=Map.groupBy(nd.keys(),(e=>nd.get(e).engine));function ad(){return{dt:ur`Implementation status:`,dd:ur`<a href="https://webstatus.dev/">Web Platform Status</a>`,moreInfoUrl:"https://webstatus.dev/"}}function cd(e){const t=ms`Check the ${"[implementationStatus]"} configuration.`;return ls("Failed to retrieve implementation status data.",Xu,{hint:t,cause:e instanceof Error?e:void 0}),ad()}async function ld(e){const t=e.apiURL||Qu,n=await Br(t);if(!n.ok)throw new Error(`HTTP ${n.status}: ${n.statusText}`);return n.json()}function ud(e){return!e.kind||"feature"===e.kind}function dd(e,t,n){const r=e.features||e;if(n.feature){const e=r[n.feature];return e&&ud(e)?[{id:n.feature,...e}]:[]}const s=pd(t);return s.length?Object.entries(r).filter((([,e])=>{if(!ud(e))return!1;return[e.spec].flat().filter(Boolean).some((e=>{const t=hd(e);return s.some((e=>t.startsWith(e)))}))})).map((([e,t])=>({id:e,...t}))):[]}function pd(e){const t=new Set;return e.edDraftURI&&t.add(hd(e.edDraftURI)),e.shortName&&(t.add(hd(`https://www.w3.org/TR/${e.shortName}/`)),t.add(hd(`https://w3c.github.io/${e.shortName}/`))),e.thisVersion&&t.add(hd(e.thisVersion)),[...t]}function hd(e){try{const t=new URL(e);return t.hash="",t.pathname.endsWith("/")||t.pathname.includes(".")||(t.pathname+="/"),t.href}catch{return e}}var fd=Object.freeze({__proto__:null,name:Xu,prepare:function(e){if(!e.implementationStatus)return;!function(e){const t={removeOnSave:!1};if("boolean"==typeof e.implementationStatus)return void(e.implementationStatus={feature:null,...t});if("string"==typeof e.implementationStatus)return void(e.implementationStatus={feature:e.implementationStatus,...t});e.implementationStatus={...t,...e.implementationStatus}}(e);const t=e.implementationStatus;document.head.appendChild(ur`<style
1239
1238
  id="baseline-stylesheet"
1240
1239
  class="${t.removeOnSave?"removeOnSave":""}"
1241
1240
  >
1242
- ${Gu}
1243
- </style>`)},run:async function(e){if(!e.implementationStatus)return;const t=e.implementationStatus,n=document.querySelector(".head dl");if(!n)return;const r=async function(e,t){const n=await async function(e,t){if(t.apiURL){return od(await sd(t),e,t)}if(t.feature){const e=`${Ju}/${encodeURIComponent(t.feature)}`,n=await zr(e);if(!n.ok){if(404===n.status)return[];throw new Error(`Failed to fetch Baseline data for feature "${t.feature}": HTTP ${n.status}`)}const r=await n.json();return r.split_into?.length?r.split_into.filter(id):[{id:t.feature,...r}]}const n=ad(e);if(!n.length)return[];try{const e=await fetch(Ku,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({specs:n})});if(!e.ok)throw new Error(`HTTP ${e.status}`);const{result:t}=await e.json();return t||[]}catch(n){console.warn(`[${Vu}] Search endpoint failed, falling back to full dataset`,n);return od(await sd(t),e,t)}}(e,t);if(!n.length){const e=t.feature?`No Baseline data found for feature "${t.feature}".`:"No Baseline data found for this specification.",n=t.feature?"Find feature IDs in [web-features data](https://github.com/web-platform-dx/web-features/blob/main/data.json).":void 0;return rs(e,Vu,{hint:n}),nd()}const r=function(e){const t=e.map((e=>e.status?.baseline));return t.every((e=>"high"===e))?"high":t.every((e=>"low"===e||"high"===e))?"low":""}(n),s=Xu.get(r),i=function(e){const t=new Map;for(const n of Yu.keys()){const r=e.every((e=>null!=e.status?.support?.[n]));t.set(n,r)}return t}(n);return ps("amend-user-config",{implementationStatus:t.feature||!0}),function(e,t,n,r){const s=(Qu.get(e)??Qu.get("")??(()=>sr`<span></span>`))();s.setAttribute("aria-hidden","true");const i=[...td.values()].map((e=>{const t=e.map((e=>{const t=Yu.get(e)?.name||e,r=n.get(e),s=r?`${t}: Supported`:`${t}: Not supported`,i=r?ed.available():ed.unavailable();return sr`<span
1241
+ ${Yu}
1242
+ </style>`)},run:async function(e){if(!e.implementationStatus)return;const t=e.implementationStatus,n=document.querySelector(".head dl");if(!n)return;const r=async function(e,t){const n=await async function(e,t){if(t.apiURL){return dd(await ld(t),e,t)}if(t.feature){const e=`${Qu}/${encodeURIComponent(t.feature)}`,n=await Br(e);if(!n.ok){if(404===n.status)return[];throw new Error(`Failed to fetch Baseline data for feature "${t.feature}": HTTP ${n.status}`)}const r=await n.json();return r.split_into?.length?r.split_into.filter(ud):[{id:t.feature,...r}]}const n=pd(e);if(!n.length)return[];try{const e=await fetch(ed,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({specs:n})});if(!e.ok)throw new Error(`HTTP ${e.status}`);const{result:t}=await e.json();return t||[]}catch(n){console.warn(`[${Xu}] Search endpoint failed, falling back to full dataset`,n);return dd(await ld(t),e,t)}}(e,t);if(!n.length){const e=t.feature?`No Baseline data found for feature "${t.feature}".`:"No Baseline data found for this specification.",n=t.feature?"Find feature IDs in [web-features data](https://github.com/web-platform-dx/web-features/blob/main/data.json).":void 0;return ls(e,Xu,{hint:n}),ad()}const r=function(e){const t=e.map((e=>e.status?.baseline));return t.every((e=>"high"===e))?"high":t.every((e=>"low"===e||"high"===e))?"low":""}(n),s=rd.get(r),i=function(e){const t=new Map;for(const n of nd.keys()){const r=e.every((e=>null!=e.status?.support?.[n]));t.set(n,r)}return t}(n);return ys("amend-user-config",{implementationStatus:t.feature||!0}),function(e,t,n,r){const s=(sd.get(e)??sd.get("")??(()=>ur`<span></span>`))();s.setAttribute("aria-hidden","true");const i=[...od.values()].map((e=>{const t=e.map((e=>{const t=nd.get(e)?.name||e,r=n.get(e),s=r?`${t}: Supported`:`${t}: Not supported`,i=r?id.available():id.unavailable();return ur`<span
1244
1243
  class="baseline-browser ${r?"support-available":"support-unavailable"}"
1245
1244
  role="img"
1246
1245
  title="${s}"
@@ -1250,21 +1249,21 @@ img.caniuse-browser{filter:drop-shadow(0 0 .1cm #666);background:0 0}
1250
1249
  class="baseline-browser-logo"
1251
1250
  width="24"
1252
1251
  height="24"
1253
- src="${function(e){return`${Zu}/${e}/${e}.svg`}(e)}"
1252
+ src="${function(e){return`${td}/${e}/${e}.svg`}(e)}"
1254
1253
  alt=""
1255
1254
  />${i}
1256
- </span>`})),r=e.every((e=>n.get(e)));return sr`<span class="${r?"baseline-pill supported":"baseline-pill unsupported"}">${t}</span>`})),o=sr`<span class="baseline-browsers">${i}</span>`,a=1===r.length?r[0]:null,c=a?`https://webstatus.dev/features/${encodeURIComponent(a.id)}`:"https://webstatus.dev/",l=a?.name?`More info about ${a.name} support`:"More info about browser support",u=sr`${t}:${s}`,d=sr`${o}
1255
+ </span>`})),r=e.every((e=>n.get(e)));return ur`<span class="${r?"baseline-pill supported":"baseline-pill unsupported"}">${t}</span>`})),o=ur`<span class="baseline-browsers">${i}</span>`,a=1===r.length?r[0]:null,c=a?`https://webstatus.dev/features/${encodeURIComponent(a.id)}`:"https://webstatus.dev/",l=a?.name?`More info about ${a.name} support`:"More info about browser support",u=ur`${t}:${s}`,d=ur`${o}
1257
1256
  <a
1258
1257
  class="baseline-more-info"
1259
1258
  href="${c}"
1260
1259
  aria-label="${l}"
1261
1260
  >More info</a
1262
- >`;return{dt:u,dd:d,moreInfoUrl:c}}(r,s,i,n)}(e,t).catch(rd),s=r.then((e=>e.dt)),i=r.then((e=>e.dd)),o=sr`<dt class="baseline-title">
1261
+ >`;return{dt:u,dd:d,moreInfoUrl:c}}(r,s,i,n)}(e,t).catch(cd),s=r.then((e=>e.dt)),i=r.then((e=>e.dd)),o=ur`<dt class="baseline-title">
1263
1262
  ${{any:s,placeholder:"Implementation status:"}}
1264
1263
  </dt>
1265
1264
  <dd class="baseline-status">
1266
1265
  ${{any:i,placeholder:"Checking availability..."}}
1267
- </dd>`;n.append(...o.childNodes);const a=await r;if(t.removeOnSave){const e=a.moreInfoUrl||"https://webstatus.dev/";hs("beforesave",(t=>{const n=t.querySelector(".baseline-status");n&&sr.bind(n)`<a href="${e}">Web Platform Status</a>`}))}}});var ud=String.raw`.mdn{font-size:.75em;position:absolute;right:.3em;min-width:0;margin-top:3rem}
1266
+ </dd>`;n.append(...o.childNodes);const a=await r;if(t.removeOnSave){const e=a.moreInfoUrl||"https://webstatus.dev/";ws("beforesave",(t=>{const n=t.querySelector(".baseline-status");n&&ur.bind(n)`<a href="${e}">Web Platform Status</a>`}))}}});var md=String.raw`.mdn{font-size:.75em;position:absolute;right:.3em;min-width:0;margin-top:3rem}
1268
1267
  .mdn details{width:100%;margin:1px 0;position:relative;z-index:10;box-sizing:border-box;padding:.4em;padding-top:0}
1269
1268
  .mdn details[open]{min-width:25ch;max-width:32ch;background:#fff;background:var(--indextable-hover-bg,#fff);color:#000;color:var(--indextable-hover-text,#000);box-shadow:0 1em 3em -.4em rgba(0,0,0,.3),0 0 1px 1px rgba(0,0,0,.05);box-shadow:0 1em 3em -.4em var(--tocsidebar-shadow,rgba(0,0,0,.3)),0 0 1px 1px var(--tocsidebar-shadow,rgba(0,0,0,.05));border-radius:2px;z-index:11;margin-bottom:.4em}
1270
1269
  .mdn summary{text-align:right;cursor:default;margin-right:-.4em}
@@ -1287,33 +1286,33 @@ img.caniuse-browser{filter:drop-shadow(0 0 .1cm #666);background:0 0}
1287
1286
  .mdn .safari::before{background-image:url(https://www.w3.org/assets/logos/browser-logos/safari/safari.svg)}
1288
1287
  .mdn .safari_ios::before{background-image:url(https://www.w3.org/assets/logos/browser-logos/safari-ios/safari-ios.svg)}
1289
1288
  .mdn .samsunginternet_android::before{background-image:url(https://www.w3.org/assets/logos/browser-logos/samsung-internet/samsung-internet.svg)}
1290
- .mdn .webview_android::before{background-image:url(https://www.w3.org/assets/logos/browser-logos/android-webview/android-webview.png)}`;const dd="core/mdn-annotation",pd="https://w3c.github.io/mdn-spec-links/",hd="https://developer.mozilla.org/en-US/docs/Web/",fd={chrome:"Chrome",chrome_android:"Chrome Android",edge:"Edge",edge_mobile:"Edge Mobile",firefox:"Firefox",firefox_android:"Firefox Android",opera:"Opera",opera_android:"Opera Android",safari:"Safari",safari_ios:"Safari iOS",samsunginternet_android:"Samsung Internet",webview_android:"WebView Android"},md=Ir({en:{inAllEngines:"This feature is in all major engines.",inSomeEngines:"This feature has limited support."},zh:{inAllEngines:"所有主要引擎均支持此特性。",inSomeEngines:"此功能支持有限。"},cs:{inAllEngines:"Tato funkce je podporována ve všech hlavních prohlížečích.",inSomeEngines:"Tato funkce má omezenou podporu."}});function gd(e){const t=e.closest("section");if(!t)return;const{previousElementSibling:n}=t;if(n&&n.classList.contains("mdn"))return n;const r=sr`<aside class="mdn"></aside>`;return t.before(r),r}function bd(e){const{name:t,slug:n,summary:r,support:s,engines:i}=e,o=n.slice(n.indexOf("/")+1),a=`${hd}${n}`,c=`Expand MDN details for ${t}`,l=function(e){if(3===e.length)return sr`<span title="${md.inAllEngines}">✅</span>`;if(e.length<2)return sr`<span title="${md.inSomeEngines}">🚫</span>`;return sr`<span>&emsp;</span>`}(i);return sr`<details>
1289
+ .mdn .webview_android::before{background-image:url(https://www.w3.org/assets/logos/browser-logos/android-webview/android-webview.png)}`;const gd="core/mdn-annotation",bd="https://w3c.github.io/mdn-spec-links/",yd="https://developer.mozilla.org/en-US/docs/Web/",wd={chrome:"Chrome",chrome_android:"Chrome Android",edge:"Edge",edge_mobile:"Edge Mobile",firefox:"Firefox",firefox_android:"Firefox Android",opera:"Opera",opera_android:"Opera Android",safari:"Safari",safari_ios:"Safari iOS",samsunginternet_android:"Samsung Internet",webview_android:"WebView Android"},vd=Ur({en:{inAllEngines:"This feature is in all major engines.",inSomeEngines:"This feature has limited support."},zh:{inAllEngines:"所有主要引擎均支持此特性。",inSomeEngines:"此功能支持有限。"},cs:{inAllEngines:"Tato funkce je podporována ve všech hlavních prohlížečích.",inSomeEngines:"Tato funkce má omezenou podporu."}});function kd(e){const t=e.closest("section");if(!t)return;const{previousElementSibling:n}=t;if(n&&n.classList.contains("mdn"))return n;const r=ur`<aside class="mdn"></aside>`;return t.before(r),r}function $d(e){const{name:t,slug:n,summary:r,support:s,engines:i}=e,o=n.slice(n.indexOf("/")+1),a=`${yd}${n}`,c=`Expand MDN details for ${t}`,l=function(e){if(3===e.length)return ur`<span title="${vd.inAllEngines}">✅</span>`;if(e.length<2)return ur`<span title="${vd.inSomeEngines}">🚫</span>`;return ur`<span>&emsp;</span>`}(i);return ur`<details>
1291
1290
  <summary aria-label="${c}"><span>MDN</span>${l}</summary>
1292
1291
  <a title="${r}" href="${a}">${o}</a>
1293
- ${function(e){if(3===e.length)return sr`<p class="engines-all">${md.inAllEngines}</p>`;if(e.length<2)return sr`<p class="engines-some">${md.inSomeEngines}</p>`}(i)}
1294
- ${s?function(e){function t(e,t,n){const r="Unknown"===t?"?":t,s=`${e} ${t.toLowerCase()}`;return sr`<tr class="${s}">
1295
- <td>${fd[e]}</td>
1292
+ ${function(e){if(3===e.length)return ur`<p class="engines-all">${vd.inAllEngines}</p>`;if(e.length<2)return ur`<p class="engines-some">${vd.inSomeEngines}</p>`}(i)}
1293
+ ${s?function(e){function t(e,t,n){const r="Unknown"===t?"?":t,s=`${e} ${t.toLowerCase()}`;return ur`<tr class="${s}">
1294
+ <td>${wd[e]}</td>
1296
1295
  <td>${n||r}</td>
1297
- </tr>`}function n(e,n){if(n.version_removed)return t(e,"No","");const r=n.version_added;return"boolean"==typeof r?t(e,r?"Yes":"No",""):r?t(e,"Yes",`${r}+`):t(e,"Unknown","")}const r=Object.keys(fd);return sr`<table>
1296
+ </tr>`}function n(e,n){if(n.version_removed)return t(e,"No","");const r=n.version_added;return"boolean"==typeof r?t(e,r?"Yes":"No",""):r?t(e,"Yes",`${r}+`):t(e,"Unknown","")}const r=Object.keys(wd);return ur`<table>
1298
1297
  ${r.map((r=>e[r]?n(r,e[r]):t(r,"Unknown","")))}
1299
- </table>`}(s):sr`<p class="nosupportdata">No support data.</p>`}
1300
- </details>`}var yd=Object.freeze({__proto__:null,name:dd,run:async function(e){const t=function(e){const{shortName:t,mdn:n}=e;if(!n)return;return!0===n?t:"string"==typeof n?n:n.key||t}(e);if(!t)return;const n="object"==typeof e.mdn?e.mdn:{},r=await async function(e,t){const{baseJsonPath:n=pd,maxAge:r=864e5}=t,s=new URL(`${e}.json`,n).href,i=await zr(s,r);return 404===i.status?null:await i.json()}(t,n);if(!r){const n=`Could not find MDN data associated with key "${t}".`,r=!0===e.mdn?ls`When using \`mdn: true\`, the key defaults to ${"[shortName]"} ("${t}"). Check that your shortName matches an entry in the [MDN spec links map](https://github.com/w3c/mdn-spec-links/blob/main/SPECMAP.json), or set ${"[mdn]"} to the correct key.`:ls`Search for your spec's URL in the [MDN spec links map](https://github.com/w3c/mdn-spec-links/blob/main/SPECMAP.json) to find the correct key, then set ${"[mdn]"} to it.`;return void ns(n,dd,{hint:r})}const s=document.createElement("style");s.textContent=ud,document.head.append(s);for(const e of function(e){return[...document.body.querySelectorAll("[id]:not(script)")].filter((({id:t})=>Array.isArray(e[t])))}(r)){const t=r[e.id],n=gd(e);if(n)for(const e of t)n.append(bd(e))}}});const wd="ui/save-html",vd=Ir({en:{save_snapshot:"Export"},nl:{save_snapshot:"Bewaar Snapshot"},ja:{save_snapshot:"保存する"},de:{save_snapshot:"Exportieren"},zh:{save_snapshot:"导出"}}),kd=[{id:"respec-save-as-html",ext:"html",title:"HTML",type:"text/html",get href(){return gs(this.type)}},{id:"respec-save-as-xml",ext:"xhtml",title:"XML",type:"application/xml",get href(){return gs(this.type)}},{id:"respec-save-as-epub",ext:"epub",title:"EPUB 3",type:"application/epub+zip",get href(){const e=new URL("https://labs.w3.org/r2epub/");return e.searchParams.append("respec","true"),e.searchParams.append("url",document.location.href),e.href}}];var $d=Object.freeze({__proto__:null,exportDocument:function(e,t){return rs("Exporting via ui/save-html module's `exportDocument()` is deprecated and will be removed.",wd,{hint:"Use core/exporter `rsDocToDataURL()` instead."}),gs(t)},name:wd,run:function(e){const t={async show(t){await document.respec.ready;const n=sr`<div class="respec-save-buttons">
1301
- ${kd.map((t=>function(e,t){const{id:n,href:r,ext:s,title:i,type:o}=e,a=Or(t.publishDate||new Date),c=[t.specStatus,t.shortName||"spec",a].join("-");return sr`<a
1298
+ </table>`}(s):ur`<p class="nosupportdata">No support data.</p>`}
1299
+ </details>`}var xd=Object.freeze({__proto__:null,name:gd,run:async function(e){const t=function(e){const{shortName:t,mdn:n}=e;if(!n)return;return!0===n?t:"string"==typeof n?n:n.key||t}(e);if(!t)return;const n="object"==typeof e.mdn?e.mdn:{},r=await async function(e,t){const{baseJsonPath:n=bd,maxAge:r=864e5}=t,s=new URL(`${e}.json`,n).href,i=await Br(s,r);return 404===i.status?null:await i.json()}(t,n);if(!r){const n=`Could not find MDN data associated with key "${t}".`,r=!0===e.mdn?ms`When using \`mdn: true\`, the key defaults to ${"[shortName]"} ("${t}"). Check that your shortName matches an entry in the [MDN spec links map](https://github.com/w3c/mdn-spec-links/blob/main/SPECMAP.json), or set ${"[mdn]"} to the correct key.`:ms`Search for your spec's URL in the [MDN spec links map](https://github.com/w3c/mdn-spec-links/blob/main/SPECMAP.json) to find the correct key, then set ${"[mdn]"} to it.`;return void cs(n,gd,{hint:r})}const s=document.createElement("style");s.textContent=md,document.head.append(s);for(const e of function(e){return[...document.body.querySelectorAll("[id]:not(script)")].filter((({id:t})=>Array.isArray(e[t])))}(r)){const t=r[e.id],n=kd(e);if(n)for(const e of t)n.append($d(e))}}});const Cd="ui/save-html",Sd=Ur({en:{save_snapshot:"Export"},nl:{save_snapshot:"Bewaar Snapshot"},ja:{save_snapshot:"保存する"},de:{save_snapshot:"Exportieren"},zh:{save_snapshot:"导出"}}),_d=[{id:"respec-save-as-html",ext:"html",title:"HTML",type:"text/html",get href(){return $s(this.type)}},{id:"respec-save-as-xml",ext:"xhtml",title:"XML",type:"application/xml",get href(){return $s(this.type)}},{id:"respec-save-as-epub",ext:"epub",title:"EPUB 3",type:"application/epub+zip",get href(){const e=new URL("https://labs.w3.org/r2epub/");return e.searchParams.append("respec","true"),e.searchParams.append("url",document.location.href),e.href}}];var Td=Object.freeze({__proto__:null,exportDocument:function(e,t){return ls("Exporting via ui/save-html module's `exportDocument()` is deprecated and will be removed.",Cd,{hint:"Use core/exporter `rsDocToDataURL()` instead."}),$s(t)},name:Cd,run:function(e){const t={async show(t){await document.respec.ready;const n=ur`<div class="respec-save-buttons">
1300
+ ${_d.map((t=>function(e,t){const{id:n,href:r,ext:s,title:i,type:o}=e,a=Wr(t.publishDate||new Date),c=[t.specStatus,t.shortName||"spec",a].join("-");return ur`<a
1302
1301
  href="${r}"
1303
1302
  id="${n}"
1304
1303
  download="${c}.${s}"
1305
1304
  type="${o}"
1306
1305
  class="respec-save-button"
1307
- onclick=${()=>ni.closeModal()}
1306
+ onclick=${()=>ci.closeModal()}
1308
1307
  >${i}</a
1309
1308
  >`}(t,e)))}
1310
- </div>`;ni.freshModal(vd.save_snapshot,n,t)}},n="download"in HTMLAnchorElement.prototype;let r;n&&(r=ni.addCommand(vd.save_snapshot,(function(){if(!n)return;t.show(r)}),"Ctrl+Shift+Alt+S","💾"))}});const xd="https://respec.org/specref/",Cd=Ir({en:{search_specref:"Search Specref"},nl:{search_specref:"Doorzoek Specref"},ja:{search_specref:"仕様検索"},de:{search_specref:"Spezifikationen durchsuchen"},zh:{search_specref:"搜索 Specref"},cs:{search_specref:"Hledat ve Specref"}}),Sd=ni.addCommand(Cd.search_specref,(function(){const e=sr`
1311
- <iframe class="respec-iframe" src="${xd}" onload=${e=>e.target.classList.add("ready")}></iframe>
1312
- <a href="${xd}" target="_blank">Open Search UI in a new tab</a>
1313
- `;ni.freshModal(Cd.search_specref,e,Sd)}),"Ctrl+Shift+Alt+space","🔎");var _d=Object.freeze({__proto__:null});const Td="https://respec.org/xref/",Rd=Ir({en:{title:"Search definitions"},ja:{title:"定義検索"},de:{title:"Definitionen durchsuchen"},zh:{title:"搜索定义"},cs:{title:"Hledat definice"}}),Ed=ni.addCommand(Rd.title,(function(){const e=sr`
1314
- <iframe class="respec-iframe" src="${Td}" onload="${e=>e.target.classList.add("ready")}"></iframe>
1315
- <a href="${Td}" target="_blank">Open Search UI in a new tab</a>
1316
- `;ni.freshModal(Rd.title,e,Ed)}),"Ctrl+Shift+Alt+x","📚");var Ld=Object.freeze({__proto__:null});const Ad=Ir({en:{about_respec:"About"},zh:{about_respec:"关于"},nl:{about_respec:"Over"},ja:{about_respec:"これについて"},de:{about_respec:"Über"},cs:{about_respec:"O aplikaci"}});window.respecVersion=window.respecVersion||"Developer Edition";const Pd=document.createElement("div"),Nd=sr.bind(Pd),Id=ni.addCommand(`${Ad.about_respec} ${window.respecVersion}`,(function(){const e=[];"getEntriesByType"in performance&&performance.getEntriesByType("measure").sort(((e,t)=>t.duration-e.duration)).map((({name:e,duration:t})=>({name:e,duration:t>1e3?`${Math.round(t/1e3)} second(s)`:`${t.toFixed(2)} milliseconds`}))).map(Dd).forEach((t=>{e.push(t)}));Nd`
1309
+ </div>`;ci.freshModal(Sd.save_snapshot,n,t)}},n="download"in HTMLAnchorElement.prototype;let r;n&&(r=ci.addCommand(Sd.save_snapshot,(function(){if(!n)return;t.show(r)}),"Ctrl+Shift+Alt+S","💾"))}});const Rd="https://respec.org/specref/",Ed=Ur({en:{search_specref:"Search Specref"},nl:{search_specref:"Doorzoek Specref"},ja:{search_specref:"仕様検索"},de:{search_specref:"Spezifikationen durchsuchen"},zh:{search_specref:"搜索 Specref"},cs:{search_specref:"Hledat ve Specref"}}),Ld=ci.addCommand(Ed.search_specref,(function(){const e=ur`
1310
+ <iframe class="respec-iframe" src="${Rd}" onload=${e=>e.target.classList.add("ready")}></iframe>
1311
+ <a href="${Rd}" target="_blank">Open Search UI in a new tab</a>
1312
+ `;ci.freshModal(Ed.search_specref,e,Ld)}),"Ctrl+Shift+Alt+space","🔎");var Ad=Object.freeze({__proto__:null});const Pd="https://respec.org/xref/",Nd=Ur({en:{title:"Search definitions"},ja:{title:"定義検索"},de:{title:"Definitionen durchsuchen"},zh:{title:"搜索定义"},cs:{title:"Hledat definice"}}),Id=ci.addCommand(Nd.title,(function(){const e=ur`
1313
+ <iframe class="respec-iframe" src="${Pd}" onload="${e=>e.target.classList.add("ready")}"></iframe>
1314
+ <a href="${Pd}" target="_blank">Open Search UI in a new tab</a>
1315
+ `;ci.freshModal(Nd.title,e,Id)}),"Ctrl+Shift+Alt+x","📚");var Dd=Object.freeze({__proto__:null});const Od=Ur({en:{about_respec:"About"},zh:{about_respec:"关于"},nl:{about_respec:"Over"},ja:{about_respec:"これについて"},de:{about_respec:"Über"},cs:{about_respec:"O aplikaci"}});window.respecVersion=window.respecVersion||"Developer Edition";const jd=document.createElement("div"),zd=ur.bind(jd),Md=ci.addCommand(`${Od.about_respec} ${window.respecVersion}`,(function(){const e=[];"getEntriesByType"in performance&&performance.getEntriesByType("measure").sort(((e,t)=>t.duration-e.duration)).map((({name:e,duration:t})=>({name:e,duration:t>1e3?`${Math.round(t/1e3)} second(s)`:`${t.toFixed(2)} milliseconds`}))).map(Ud).forEach((t=>{e.push(t)}));zd`
1317
1316
  <p>
1318
1317
  ReSpec is a document production toolchain, with a notable focus on W3C specifications.
1319
1318
  </p>
@@ -1337,19 +1336,19 @@ img.caniuse-browser{filter:drop-shadow(0 0 .1cm #666);background:0 0}
1337
1336
  </thead>
1338
1337
  <tbody>${e}</tbody>
1339
1338
  </table>
1340
- `,ni.freshModal(`${Ad.about_respec} - ${window.respecVersion}`,Pd,Id)}),"Ctrl+Shift+Alt+A","ℹ️");function Dd({name:e,duration:t}){return sr`
1339
+ `,ci.freshModal(`${Od.about_respec} - ${window.respecVersion}`,jd,Md)}),"Ctrl+Shift+Alt+A","ℹ️");function Ud({name:e,duration:t}){return ur`
1341
1340
  <tr>
1342
1341
  <td><a href="${`https://github.com/speced/respec/blob/develop/src/${e}.js`}">${e}</a></td>
1343
1342
  <td>${t}</td>
1344
1343
  </tr>
1345
- `}var Od=Object.freeze({__proto__:null});var jd=Object.freeze({__proto__:null,name:"core/seo",run:function(e){if(e.gitRevision){const t=sr`<meta
1344
+ `}var qd=Object.freeze({__proto__:null});var Wd=Object.freeze({__proto__:null,name:"core/seo",run:function(e){if(e.gitRevision){const t=ur`<meta
1346
1345
  name="revision"
1347
1346
  content="${e.gitRevision}"
1348
- />`;document.head.appendChild(t)}const t=document.querySelector("#abstract p:first-of-type");if(!t)return;const n=t.textContent.replace(/\s+/," ").trim(),r=document.createElement("meta");r.name="description",r.content=n,document.head.appendChild(r)}});const zd="w3c/seo",Md={NOTE:"w3p:NOTE",WD:"w3p:WD",LC:"w3p:LastCall",CR:"w3p:CR",CRD:"w3p:CRD",PR:"w3p:PR",REC:"w3p:REC",RSCND:"w3p:RSCND"},Ud=new Set([...Ui,...qi,...Wi,"BG-FINAL","CG-FINAL","CRY","DRY","draft-finding","finding"]);function qd({name:e,url:t,mailto:n,company:r,companyURL:s}){const i={type:"Person",name:e,url:t,"foaf:mbox":n};return(r||s)&&(i.worksFor={name:r,url:s}),i}function Wd(e){const{href:t,title:n,href:r}=e,s={id:t,type:"TechArticle",name:n,url:r};return e.authors&&(s.creator=e.authors.map((e=>({name:e})))),e.rawDate&&(s.publishedDate=e.rawDate),e.isbn&&(s.identifier=e.isbn),e.publisher&&(s.publisher={name:e.publisher}),s}var Fd=Object.freeze({__proto__:null,name:zd,requiresCanonicalLink:Ud,run:async function(e){if((e.canonicalURI||Ud.has(e.specStatus))&&e.shortName){switch(e.canonicalURI){case"edDraft":if(e.edDraftURI)e.canonicalURI=new URL(e.edDraftURI,document.location.href).href;else{rs("Canonical URI set to edDraft, but no edDraftURI is set in configuration",zd),e.canonicalURI=null}break;case"TR":if(e.latestVersion)e.canonicalURI=e.latestVersion;else{rs("Canonical URI set to TR, but no shortName is set in configuration",zd),e.canonicalURI=null}break;default:e.latestVersion&&!e.canonicalURI&&(e.canonicalURI=e.latestVersion)}if(e.canonicalURI){const t=sr`<link rel="canonical" href="${e.canonicalURI}" />`;document.head.appendChild(t)}e.doJsonLd&&await async function(e,t){const n=Md[e.specStatus],r=["TechArticle"];n&&r.push(n);const s={"@context":["http://schema.org",{"@vocab":"http://schema.org/","@language":t.documentElement.lang||"en",w3p:"http://www.w3.org/2001/02pd/rec54#",foaf:"http://xmlns.com/foaf/0.1/",datePublished:{"@type":"http://www.w3.org/2001/XMLSchema#date"},inLanguage:{"@language":null},isBasedOn:{"@type":"@id"},license:{"@type":"@id"}}],id:e.canonicalURI||e.thisVersion,type:r,name:document.title,inLanguage:t.documentElement.lang||"en",license:e.licenseInfo?.url,datePublished:e.dashDate,copyrightHolder:{name:"World Wide Web Consortium",url:"https://www.w3.org/"},discussionUrl:e.issueBase,alternativeHeadline:e.subtitle,isBasedOn:e.prevVersion};if(e.additionalCopyrightHolders){const t=Array.isArray(e.additionalCopyrightHolders)?e.additionalCopyrightHolders:[e.additionalCopyrightHolders];s.copyrightHolder=[s.copyrightHolder,...t.map((e=>({name:e})))]}const i=t.head.querySelector("meta[name=description]");i&&(s.description=i.content);e.editors&&(s.editor=e.editors.map(qd));e.authors&&(s.contributor=e.authors.map(qd));const o=[...e.normativeReferences,...e.informativeReferences],a=await Promise.all(o.map((e=>ka(e))));s.citation=a.filter((e=>null!==e&&"object"==typeof e)).map(Wd);const c=t.createElement("script");c.type="application/ld+json",c.textContent=JSON.stringify(s,null,2),t.head.appendChild(c)}(e,document)}}});const Bd="\n --base: #282c34;\n --mono-1: #abb2bf;\n --mono-2: #818896;\n --mono-3: #5c6370;\n --hue-1: #56b6c2;\n --hue-2: #61aeee;\n --hue-3: #c678dd;\n --hue-4: #98c379;\n --hue-5: #e06c75;\n --hue-5-2: #be5046;\n --hue-6: #d19a66;\n --hue-6-2: #e6c07b;\n";var Hd=String.raw`.hljs,body:has(input[name=color-scheme][value=light]:checked) .hljs,head:not(:has(meta[name=color-scheme][content~=dark]))+body .hljs{--base:#fafafa;--mono-1:#383a42;--mono-2:#686b77;--mono-3:#717277;--hue-1:#0b76c5;--hue-2:#336ae3;--hue-3:#a626a4;--hue-4:#42803c;--hue-5:#ca4706;--hue-5-2:#c91243;--hue-6:#986801;--hue-6-2:#9a6a01}
1347
+ />`;document.head.appendChild(t)}const t=document.querySelector("#abstract p:first-of-type");if(!t)return;const n=t.textContent.replace(/\s+/," ").trim(),r=document.createElement("meta");r.name="description",r.content=n,document.head.appendChild(r)}});const Fd="w3c/seo",Bd={NOTE:"w3p:NOTE",WD:"w3p:WD",LC:"w3p:LastCall",CR:"w3p:CR",CRD:"w3p:CRD",PR:"w3p:PR",REC:"w3p:REC",RSCND:"w3p:RSCND"},Hd=new Set([...Gi,...Vi,...Ji,"BG-FINAL","CG-FINAL","CRY","DRY","draft-finding","finding"]);function Gd({name:e,url:t,mailto:n,company:r,companyURL:s}){const i={type:"Person",name:e,url:t,"foaf:mbox":n};return(r||s)&&(i.worksFor={name:r,url:s}),i}function Vd(e){const{href:t,title:n,href:r}=e,s={id:t,type:"TechArticle",name:n,url:r};return e.authors&&(s.creator=e.authors.map((e=>({name:e})))),e.rawDate&&(s.datePublished=e.rawDate),e.isbn&&(s.identifier=e.isbn),e.publisher&&(s.publisher={name:e.publisher}),s}var Jd=Object.freeze({__proto__:null,name:Fd,requiresCanonicalLink:Hd,run:async function(e){if((e.canonicalURI||Hd.has(e.specStatus))&&e.shortName){switch(e.canonicalURI){case"edDraft":if(e.edDraftURI)e.canonicalURI=new URL(e.edDraftURI,document.location.href).href;else{ls("Canonical URI set to edDraft, but no edDraftURI is set in configuration",Fd),e.canonicalURI=null}break;case"TR":if(e.latestVersion)e.canonicalURI=e.latestVersion;else{ls("Canonical URI set to TR, but no shortName is set in configuration",Fd),e.canonicalURI=null}break;default:e.latestVersion&&!e.canonicalURI&&(e.canonicalURI=e.latestVersion)}if(e.canonicalURI){const t=ur`<link rel="canonical" href="${e.canonicalURI}" />`;document.head.appendChild(t)}e.doJsonLd&&await async function(e,t){const n=Bd[e.specStatus],r=["TechArticle"];n&&r.push(n);const s={"@context":["https://schema.org",{"@vocab":"https://schema.org/","@language":t.documentElement.lang||"en",w3p:"http://www.w3.org/2001/02pd/rec54#",foaf:"http://xmlns.com/foaf/0.1/",datePublished:{"@type":"http://www.w3.org/2001/XMLSchema#date"},inLanguage:{"@language":null},isBasedOn:{"@type":"@id"},license:{"@type":"@id"}}],id:e.canonicalURI||e.thisVersion,type:r,name:document.title,inLanguage:t.documentElement.lang||"en",license:e.licenseInfo?.url,datePublished:e.dashDate,copyrightHolder:{name:"World Wide Web Consortium",url:"https://www.w3.org/"},discussionUrl:e.issueBase,alternativeHeadline:e.subtitle,isBasedOn:e.prevVersion};if(e.additionalCopyrightHolders){const t=Array.isArray(e.additionalCopyrightHolders)?e.additionalCopyrightHolders:[e.additionalCopyrightHolders];s.copyrightHolder=[s.copyrightHolder,...t.map((e=>({name:e})))]}const i=t.head.querySelector("meta[name=description]");i&&(s.description=i.content);e.editors&&(s.editor=e.editors.map(Gd));e.authors&&(s.contributor=e.authors.map(Gd));const o=[...e.normativeReferences,...e.informativeReferences],a=await Promise.all(o.map((e=>Ta(e))));s.citation=a.filter((e=>null!==e&&"object"==typeof e)).map(Vd);const c=t.createElement("script");c.type="application/ld+json",c.textContent=JSON.stringify(s,null,2),t.head.appendChild(c)}(e,document)}}});const Kd="\n --base: #282c34;\n --mono-1: #abb2bf;\n --mono-2: #818896;\n --mono-3: #5c6370;\n --hue-1: #56b6c2;\n --hue-2: #61aeee;\n --hue-3: #c678dd;\n --hue-4: #98c379;\n --hue-5: #e06c75;\n --hue-5-2: #be5046;\n --hue-6: #d19a66;\n --hue-6-2: #e6c07b;\n";var Zd=String.raw`.hljs,body:has(input[name=color-scheme][value=light]:checked) .hljs,head:not(:has(meta[name=color-scheme][content~=dark]))+body .hljs{--base:#fafafa;--mono-1:#383a42;--mono-2:#686b77;--mono-3:#717277;--hue-1:#0b76c5;--hue-2:#336ae3;--hue-3:#a626a4;--hue-4:#42803c;--hue-5:#ca4706;--hue-5-2:#c91243;--hue-6:#986801;--hue-6-2:#9a6a01}
1349
1348
  @media (prefers-color-scheme:dark){
1350
- .hljs{${Bd}}
1349
+ .hljs{${Kd}}
1351
1350
  }
1352
- body:has(input[name=color-scheme][value=dark]:checked) .hljs{${Bd}}
1351
+ body:has(input[name=color-scheme][value=dark]:checked) .hljs{${Kd}}
1353
1352
  .hljs{display:block;overflow-x:auto;padding:.5em;color:#383a42;color:var(--mono-1,#383a42);background:#fafafa;background:var(--base,#fafafa)}
1354
1353
  .hljs-comment,.hljs-quote{color:#717277;color:var(--mono-3,#717277);font-style:italic}
1355
1354
  .hljs-doctag,.hljs-formula,.hljs-keyword{color:#a626a4;color:var(--hue-3,#a626a4)}
@@ -1361,21 +1360,21 @@ body:has(input[name=color-scheme][value=dark]:checked) .hljs{${Bd}}
1361
1360
  .hljs-bullet,.hljs-link,.hljs-meta,.hljs-selector-id,.hljs-symbol,.hljs-title{color:#336ae3;color:var(--hue-2,#336ae3)}
1362
1361
  .hljs-emphasis{font-style:italic}
1363
1362
  .hljs-strong{font-weight:700}
1364
- .hljs-link{text-decoration:underline}`;const Gd=function(e,t=0){const n=function*(e,t){for(;;)yield`${e}:${t}`,t++}(e,t);return()=>n.next().value}("highlight");async function Vd(e){const t=e;t.setAttribute("aria-busy","true");const n=(r=t.classList,Array.from(r).filter((e=>"highlight"!==e&&"nolinks"!==e)).map((e=>e.toLowerCase())));var r;let s;try{s=await async function(e,t){const n={action:"highlight",code:e,id:Gd(),languages:t},r=await xs;return r.postMessage(n),new Promise(((e,t)=>{const s=setTimeout((()=>{t(new Error("Timed out waiting for highlight."))}),4e3);r.addEventListener("message",(function t(i){const{data:{id:o,language:a,value:c}}=i;o===n.id&&(r.removeEventListener("message",t),clearTimeout(s),e({language:a,value:c}))}))}))}(t.innerText,n)}catch(e){return void console.error(e)}const{language:i,value:o}=s;switch(t.localName){case"pre":t.classList.remove(i),t.innerHTML=`<code class="hljs${i?` ${i}`:""}">${o}</code>`,t.classList.length||t.removeAttribute("class");break;case"code":t.innerHTML=o,t.classList.add("hljs"),i&&t.classList.add(i)}t.setAttribute("aria-busy","false")}var Jd=Object.freeze({__proto__:null,name:"core/highlight",run:async function(e){if(e.noHighlightCSS)return;const t=[...document.querySelectorAll("\n pre:not(.idl):not(.cddl):not(.nohighlight) > code:not(.nohighlight),\n pre:not(.idl):not(.cddl):not(.nohighlight),\n code.highlight\n ")].filter((e=>"pre"!==e.localName||!e.querySelector("code")));if(!t.length)return;const n=t.filter((e=>e.textContent.trim())).map(Vd);document.head.appendChild(sr`<style>
1365
- ${Hd}
1366
- </style>`),await Promise.all(n)}});const Kd=Ir({en:{missing_test_suite_uri:ls`Found tests in your spec, but missing ${"[testSuiteURI]"} in your ReSpec config.`,tests:"tests",test:"test"},ja:{missing_test_suite_uri:ls`この仕様内にテストの項目を検出しましたが,ReSpec の設定に ${"[testSuiteURI]"} が見つかりません.`,tests:"テスト",test:"テスト"},de:{missing_test_suite_uri:ls`Die Spezifikation enthält Tests, aber in der ReSpec-Konfiguration ist keine ${"[testSuiteURI]"} angegeben.`,tests:"Tests",test:"Test"},zh:{missing_test_suite_uri:ls`本规范中包含测试,但在 ReSpec 配置中缺少 ${"[testSuiteURI]"}。`,tests:"测试",test:"测试"}}),Zd="core/data-tests";function Yd(e){const t=[],[n]=new URL(e).pathname.split("/").reverse(),r=n.split(".");let[s]=r;if(r.find((e=>"https"===e))){const e=document.createElement("span");e.textContent="🔒",e.setAttribute("aria-label","requires a secure connection"),e.setAttribute("title","Test requires HTTPS"),s=s.replace(".https",""),t.push(e)}if(s.split(".").join("-").split("-").find((e=>"manual"===e))){const e=document.createElement("span");e.textContent="💪",e.setAttribute("aria-label","the test must be run manually"),e.setAttribute("title","Manual test"),s=s.replace("-manual",""),t.push(e)}return sr`
1363
+ .hljs-link{text-decoration:underline}`;const Yd=function(e,t=0){const n=function*(e,t){for(;;)yield`${e}:${t}`,t++}(e,t);return()=>n.next().value}("highlight");async function Xd(e){const t=e;t.setAttribute("aria-busy","true");const n=(r=t.classList,Array.from(r).filter((e=>"highlight"!==e&&"nolinks"!==e)).map((e=>e.toLowerCase())));var r;let s;try{s=await async function(e,t){const n={action:"highlight",code:e,id:Yd(),languages:t},r=await Es;return r.postMessage(n),new Promise(((e,t)=>{const s=setTimeout((()=>{t(new Error("Timed out waiting for highlight."))}),4e3);r.addEventListener("message",(function t(i){const{data:{id:o,language:a,value:c}}=i;o===n.id&&(r.removeEventListener("message",t),clearTimeout(s),e({language:a,value:c}))}))}))}(t.textContent,n)}catch(e){return void console.error(e)}const{language:i,value:o}=s;switch(t.localName){case"pre":t.classList.remove(i),t.innerHTML=`<code class="hljs${i?` ${i}`:""}">${o}</code>`,t.classList.length||t.removeAttribute("class");break;case"code":t.innerHTML=o,t.classList.add("hljs"),i&&t.classList.add(i)}t.setAttribute("aria-busy","false")}var Qd=Object.freeze({__proto__:null,name:"core/highlight",run:async function(e){if(e.noHighlightCSS)return;const t=[...document.querySelectorAll("\n pre:not(.idl):not(.cddl):not(.nohighlight) > code:not(.nohighlight),\n pre:not(.idl):not(.cddl):not(.nohighlight),\n code.highlight\n ")].filter((e=>"pre"!==e.localName||!e.querySelector("code")));if(!t.length)return;const n=t.filter((e=>e.textContent.trim())).map(Xd);document.head.appendChild(ur`<style>
1364
+ ${Zd}
1365
+ </style>`),await Promise.all(n)}});const ep=Ur({en:{missing_test_suite_uri:ms`Found tests in your spec, but missing ${"[testSuiteURI]"} in your ReSpec config.`,tests:"tests",test:"test"},ja:{missing_test_suite_uri:ms`この仕様内にテストの項目を検出しましたが,ReSpec の設定に ${"[testSuiteURI]"} が見つかりません.`,tests:"テスト",test:"テスト"},de:{missing_test_suite_uri:ms`Die Spezifikation enthält Tests, aber in der ReSpec-Konfiguration ist keine ${"[testSuiteURI]"} angegeben.`,tests:"Tests",test:"Test"},zh:{missing_test_suite_uri:ms`本规范中包含测试,但在 ReSpec 配置中缺少 ${"[testSuiteURI]"}。`,tests:"测试",test:"测试"}}),tp="core/data-tests";function np(e){const t=[],[n]=new URL(e).pathname.split("/").reverse(),r=n.split(".");let[s]=r;if(r.find((e=>"https"===e))){const e=document.createElement("span");e.textContent="🔒",e.setAttribute("aria-label","requires a secure connection"),e.setAttribute("title","Test requires HTTPS"),s=s.replace(".https",""),t.push(e)}if(s.split(".").join("-").split("-").find((e=>"manual"===e))){const e=document.createElement("span");e.textContent="💪",e.setAttribute("aria-label","the test must be run manually"),e.setAttribute("title","Manual test"),s=s.replace("-manual",""),t.push(e)}return ur`
1367
1366
  <li>
1368
1367
  <a href="${e}">${s}</a>
1369
1368
  ${t}
1370
1369
  </li>
1371
- `}function Xd(e,t,n){return e.map((e=>{try{return new URL(e,t).href}catch{rs(ls`Invalid URL in ${"[data-tests]"} attribute: ${e}.`,Zd,{elements:[n]})}})).filter((e=>e))}function Qd(e,t){const n=e.filter(((e,t,n)=>n.indexOf(e)!==t));if(n.length){const e=ls`Duplicate tests found in the ${"[data-tests]"} attribute.`,r=ls`To fix, remove duplicates from ${"[data-tests]"}: ${as(n,{quotes:!0})}.`;rs(e,Zd,{hint:r,elements:[t]})}}function ep(e){const t=[...new Set(e)];return sr`
1370
+ `}function rp(e,t,n){return e.map((e=>{try{return new URL(e,t).href}catch{ls(ms`Invalid URL in ${"[data-tests]"} attribute: ${e}.`,tp,{elements:[n]})}})).filter((e=>e))}function sp(e,t){const n=e.filter(((e,t,n)=>n.indexOf(e)!==t));if(n.length){const e=ms`Duplicate tests found in the ${"[data-tests]"} attribute.`,r=ms`To fix, remove duplicates from ${"[data-tests]"}: ${hs(n,{quotes:!0})}.`;ls(e,tp,{hint:r,elements:[t]})}}function ip(e){const t=[...new Set(e)];return ur`
1372
1371
  <details class="respec-tests-details removeOnSave">
1373
1372
  <summary>tests: ${t.length}</summary>
1374
1373
  <ul>
1375
- ${t.map(Yd)}
1374
+ ${t.map(np)}
1376
1375
  </ul>
1377
1376
  </details>
1378
- `}var tp=Object.freeze({__proto__:null,name:Zd,run:function(e){const t=[...document.querySelectorAll("[data-tests]")].filter((e=>e.dataset.tests));if(t.length)if(e.testSuiteURI)for(const n of t){const t=Xd((n.dataset.tests??"").split(/,/gm).map((e=>e.trim())),e.testSuiteURI,n).filter((e=>void 0!==e));Qd(t,n);const r=ep(t);n.append(r)}else ns(Kd.missing_test_suite_uri,Zd)}});const np="core/list-sorter";function rp(e){const t="ascending"===e?1:-1;return(e,n)=>{const r=e.textContent??"",s=n.textContent??"";return t*r.trim().localeCompare(s.trim())}}function sp(e,t){return[...e.querySelectorAll(":scope > li")].sort(rp(t)).reduce(((e,t)=>(e.appendChild(t),e)),document.createDocumentFragment())}function ip(e,t){return[...e.querySelectorAll(":scope > dt")].sort(rp(t)).reduce(((e,t)=>{const{nodeType:n,nodeName:r}=t,s=document.createDocumentFragment();let{nextSibling:i}=t;for(;i&&i.nextSibling;){s.appendChild(i.cloneNode(!0));const{nodeType:e,nodeName:t}=i.nextSibling;if(e===n&&t===r)break;i=i.nextSibling}return s.prepend(t.cloneNode(!0)),e.appendChild(s),e}),document.createDocumentFragment())}var op=Object.freeze({__proto__:null,name:np,run:function(){const e=document.querySelectorAll("[data-sort]");for(const t of e){let e;const n=t.dataset.sort||"ascending";switch(t.localName){case"dl":e=ip(t,n);break;case"ol":case"ul":e=sp(t,n);break;default:rs(`ReSpec can't sort ${t.localName} elements.`,np,{elements:[t]})}if(e){const n=document.createRange();n.selectNodeContents(t),n.deleteContents(),t.appendChild(e)}}},sortDefinitionTerms:ip,sortListItems:sp});var ap=String.raw`var:hover{text-decoration:underline;cursor:pointer}
1377
+ `}var op=Object.freeze({__proto__:null,name:tp,run:function(e){const t=[...document.querySelectorAll("[data-tests]")].filter((e=>e.dataset.tests));if(t.length)if(e.testSuiteURI)for(const n of t){const t=rp((n.dataset.tests??"").split(/,/gm).map((e=>e.trim())),e.testSuiteURI,n).filter((e=>void 0!==e));sp(t,n);const r=ip(t);n.append(r)}else cs(ep.missing_test_suite_uri,tp)}});const ap="core/list-sorter";function cp(e){const t="ascending"===e?1:-1;return(e,n)=>{const r=e.textContent??"",s=n.textContent??"";return t*r.trim().localeCompare(s.trim())}}function lp(e,t){return[...e.querySelectorAll(":scope > li")].sort(cp(t)).reduce(((e,t)=>(e.appendChild(t),e)),document.createDocumentFragment())}function up(e,t){return[...e.querySelectorAll(":scope > dt")].sort(cp(t)).reduce(((e,t)=>{const{nodeType:n,nodeName:r}=t,s=document.createDocumentFragment();let{nextSibling:i}=t;for(;i&&i.nextSibling;){s.appendChild(i.cloneNode(!0));const{nodeType:e,nodeName:t}=i.nextSibling;if(e===n&&t===r)break;i=i.nextSibling}return s.prepend(t.cloneNode(!0)),e.appendChild(s),e}),document.createDocumentFragment())}var dp=Object.freeze({__proto__:null,name:ap,run:function(){const e=document.querySelectorAll("[data-sort]");for(const t of e){let e;const n=t.dataset.sort||"ascending";switch(t.localName){case"dl":e=up(t,n);break;case"ol":case"ul":e=lp(t,n);break;default:ls(`ReSpec can't sort ${t.localName} elements.`,ap,{elements:[t]})}if(e){const n=document.createRange();n.selectNodeContents(t),n.deleteContents(),t.appendChild(e)}}},sortDefinitionTerms:up,sortListItems:lp});var pp=String.raw`var:hover{text-decoration:underline;cursor:pointer}
1379
1378
  var.respec-hl{color:var(--color,#000);background-color:var(--bg-color);box-shadow:0 0 0 2px var(--bg-color)}
1380
1379
  @media (prefers-color-scheme:dark){
1381
1380
  var.respec-hl{filter:saturate(.9) brightness(.9)}
@@ -1389,11 +1388,11 @@ var.respec-hl-c6{--bg-color:#82ddff}
1389
1388
  var.respec-hl-c7{--bg-color:#ffbcf2}
1390
1389
  @media print{
1391
1390
  var.respec-hl{background:0 0;color:#000;box-shadow:unset}
1392
- }`;var cp=Object.freeze({__proto__:null,name:"core/highlight-vars",run:async function(e){if(!e.highlightVars)return;const t=document.createElement("style");t.textContent=ap,document.head.appendChild(t);const n=document.createElement("script");n.id="respec-highlight-vars",n.textContent=await async function(){try{return(await Promise.resolve().then((function(){return Ah}))).default}catch{return ys("./src/core/highlight-vars.runtime.js")}}(),document.body.append(n),hs("beforesave",(e=>{e.querySelectorAll("var.respec-hl").forEach((e=>{const t=[...e.classList.values()].filter((e=>e.startsWith("respec-hl")));e.classList.remove(...t),e.classList.length||e.removeAttribute("class")}))}))}});var lp=String.raw`var[data-type]{position:relative}
1391
+ }`;var hp=Object.freeze({__proto__:null,name:"core/highlight-vars",run:async function(e){if(!e.highlightVars)return;const t=document.createElement("style");t.textContent=pp,document.head.appendChild(t);const n=document.createElement("script");n.id="respec-highlight-vars",n.textContent=await async function(){try{return(await Promise.resolve().then((function(){return Oh}))).default}catch{return Cs("./src/core/highlight-vars.runtime.js")}}(),document.body.append(n),ws("beforesave",(e=>{e.querySelectorAll("var.respec-hl").forEach((e=>{const t=[...e.classList.values()].filter((e=>e.startsWith("respec-hl")));e.classList.remove(...t),e.classList.length||e.removeAttribute("class")}))}))}});var fp=String.raw`var[data-type]{position:relative}
1393
1392
  var[data-type]::after,var[data-type]::before{position:absolute;left:50%;top:-6px;opacity:0;transition:opacity .4s;pointer-events:none}
1394
1393
  var[data-type]::before{content:"";transform:translateX(-50%);border-width:4px 6px 0 6px;border-style:solid;border-color:transparent;border-top-color:#222}
1395
1394
  var[data-type]::after{content:attr(data-type);transform:translateX(-50%) translateY(-100%);background:#222;text-align:center;font-family:"Dank Mono","Fira Code",monospace;font-style:normal;padding:6px;border-radius:3px;color:#daca88;text-indent:0;font-weight:400}
1396
- var[data-type]:hover::after,var[data-type]:hover::before{opacity:1}`;var up=Object.freeze({__proto__:null,name:"core/data-type",run:function(e){if(!e.highlightVars)return;const t=document.createElement("style");t.textContent=lp,document.head.appendChild(t);let n=null;const r=new Map,s=document.querySelectorAll("section var");for(const e of s){const t=e.closest("section");if(n!==t&&(n=t,r.clear()),e.dataset.type){r.set(e.textContent.trim(),e.dataset.type);continue}const s=r.get(e.textContent.trim());s&&(e.dataset.type=s)}}});const dp="core/anchor-expander";function pp(e,t,n){const r=e.querySelector(".marker .self-link");if(!r){n.textContent=n.getAttribute("href");return void ns(`Found matching element "${t}", but it has no title or marker.`,dp,{title:"Missing title.",elements:[n]})}const s=Yr(r);n.append(...s.childNodes),n.classList.add("box-ref")}function hp(e,t,n){const r=e.querySelector("figcaption");if(!r){n.textContent=n.getAttribute("href");return void ns(`Found matching figure "${t}", but figure is lacking a \`<figcaption>\`.`,dp,{title:"Missing figcaption in referenced figure.",elements:[n]})}const s=[...Yr(r.querySelector(".self-link")).childNodes].map((e=>(e.classList?.remove("figno"),e)));n.append(...s),n.classList.add("fig-ref");const i=r.querySelector(".fig-title");!n.hasAttribute("title")&&i&&(n.title=Nr(i.textContent))}function fp(e,t,n){if(!e.classList.contains("numbered"))return;const r=e.querySelector("caption");if(!r){n.textContent=n.getAttribute("href");return void ns(`Found matching table "${t}", but table is lacking a \`<caption>\`.`,dp,{title:"Missing caption in referenced table.",elements:[n]})}const s=[...Yr(r.querySelector(".self-link")).childNodes].map((e=>(e.classList?.remove("tableno"),e)));n.append(...s),n.classList.add("table-ref");const i=r.querySelector(".table-title");!n.hasAttribute("title")&&i&&(n.title=Nr(i.textContent))}function mp(e,t,n){const r=e.querySelector("h6, h5, h4, h3, h2");if(r)gp(r,n),bp(r,n);else{n.textContent=n.getAttribute("href");ns("Found matching section, but the section was lacking a heading element.",dp,{title:`No matching id in document: "${t}".`,elements:[n]})}}function gp(e,t){const n=e.querySelector(".self-link"),r=[...Yr(e).childNodes].filter((e=>!e.classList||!e.classList.contains("self-link")));t.append(...r),n&&t.prepend("§ "),t.classList.add("sec-ref"),t.lastChild&&t.lastChild.nodeType===Node.TEXT_NODE&&(t.lastChild.textContent=(t.lastChild.textContent??"").trimEnd()),t.querySelectorAll("a").forEach((e=>{const t=Hr(e,"span");for(const e of[...t.attributes])t.removeAttributeNode(e)}))}function bp(e,t){for(const n of["dir","lang"]){if(t.hasAttribute(n))continue;const r=e.closest(`[${n}]`);if(!r)continue;const s=t.closest(`[${n}]`);s&&s.getAttribute(n)===r.getAttribute(n)||t.setAttribute(n,r.getAttribute(n)??"")}}var yp=Object.freeze({__proto__:null,name:dp,run:function(){const e=[...document.querySelectorAll("a[href^='#']:not(.self-link):not([href$='the-empty-string'])")].filter((e=>""===e.textContent.trim()));for(const t of e){const e=(t.getAttribute("href")??"").slice(1),n=document.getElementById(e);if(n){switch(n.localName){case"h6":case"h5":case"h4":case"h3":case"h2":gp(n,t);break;case"section":mp(n,e,t);break;case"figure":hp(n,e,t);break;case"table":fp(n,e,t);break;case"aside":case"div":pp(n,e,t);break;case"dfn":{const e=Yr(n);t.append(...e.childNodes),t.classList.add("dfn-ref");break}default:t.textContent=t.getAttribute("href");ns("ReSpec doesn't support expanding this kind of reference.",dp,{title:`Can't expand "#${e}".`,elements:[t]})}bp(n,t),t.normalize()}else{t.textContent=t.getAttribute("href");ns(`Couldn't expand inline reference. The id "${e}" is not in the document.`,dp,{title:`No matching id in document: ${e}.`,elements:[t]})}}}});var wp=String.raw`dfn{cursor:pointer}
1395
+ var[data-type]:hover::after,var[data-type]:hover::before{opacity:1}`;var mp=Object.freeze({__proto__:null,name:"core/data-type",run:function(e){if(!e.highlightVars)return;const t=document.createElement("style");t.textContent=fp,document.head.appendChild(t);let n=null;const r=new Map,s=document.querySelectorAll("section var");for(const e of s){const t=e.closest("section");if(n!==t&&(n=t,r.clear()),e.dataset.type){r.set(e.textContent.trim(),e.dataset.type);continue}const s=r.get(e.textContent.trim());s&&(e.dataset.type=s)}}});const gp="core/anchor-expander";function bp(e,t,n){const r=e.querySelector(".marker .self-link");if(!r){n.textContent=n.getAttribute("href");return void cs(`Found matching element "${t}", but it has no title or marker.`,gp,{title:"Missing title.",elements:[n]})}const s=rs(r);n.append(...s.childNodes),n.classList.add("box-ref")}function yp(e,t,n){const r=e.querySelector("figcaption");if(!r){n.textContent=n.getAttribute("href");return void cs(`Found matching figure "${t}", but figure is lacking a \`<figcaption>\`.`,gp,{title:"Missing figcaption in referenced figure.",elements:[n]})}const s=[...rs(r.querySelector(".self-link")).childNodes].map((e=>(e.classList?.remove("figno"),e)));n.append(...s),n.classList.add("fig-ref");const i=r.querySelector(".fig-title");!n.hasAttribute("title")&&i&&(n.title=Mr(i.textContent))}function wp(e,t,n){if(!e.classList.contains("numbered"))return;const r=e.querySelector("caption");if(!r){n.textContent=n.getAttribute("href");return void cs(`Found matching table "${t}", but table is lacking a \`<caption>\`.`,gp,{title:"Missing caption in referenced table.",elements:[n]})}const s=[...rs(r.querySelector(".self-link")).childNodes].map((e=>(e.classList?.remove("tableno"),e)));n.append(...s),n.classList.add("table-ref");const i=r.querySelector(".table-title");!n.hasAttribute("title")&&i&&(n.title=Mr(i.textContent))}function vp(e,t,n){const r=e.querySelector("h6, h5, h4, h3, h2");if(r)kp(r,n),$p(r,n);else{n.textContent=n.getAttribute("href");cs("Found matching section, but the section was lacking a heading element.",gp,{title:`No matching id in document: "${t}".`,elements:[n]})}}function kp(e,t){const n=e.querySelector(".self-link"),r=[...rs(e).childNodes].filter((e=>!e.classList||!e.classList.contains("self-link")));t.append(...r),n&&t.prepend("§ "),t.classList.add("sec-ref"),t.lastChild&&t.lastChild.nodeType===Node.TEXT_NODE&&(t.lastChild.textContent=(t.lastChild.textContent??"").trimEnd()),t.querySelectorAll("a").forEach((e=>{const t=Yr(e,"span");for(const e of[...t.attributes])t.removeAttributeNode(e)}))}function $p(e,t){for(const n of["dir","lang"]){if(t.hasAttribute(n))continue;const r=e.closest(`[${n}]`);if(!r)continue;const s=t.closest(`[${n}]`);s&&s.getAttribute(n)===r.getAttribute(n)||t.setAttribute(n,r.getAttribute(n)??"")}}var xp=Object.freeze({__proto__:null,name:gp,run:function(){const e=[...document.querySelectorAll("a[href^='#']:not(.self-link):not([href$='the-empty-string'])")].filter((e=>""===e.textContent.trim()));for(const t of e){const e=(t.getAttribute("href")??"").slice(1),n=document.getElementById(e);if(n){switch(n.localName){case"h6":case"h5":case"h4":case"h3":case"h2":kp(n,t);break;case"section":vp(n,e,t);break;case"figure":yp(n,e,t);break;case"table":wp(n,e,t);break;case"aside":case"div":bp(n,e,t);break;case"dfn":{const e=rs(n);t.append(...e.childNodes),t.classList.add("dfn-ref");break}default:t.textContent=t.getAttribute("href");cs("ReSpec doesn't support expanding this kind of reference.",gp,{title:`Can't expand "#${e}".`,elements:[t]})}$p(n,t),t.normalize()}else{t.textContent=t.getAttribute("href");cs(`Couldn't expand inline reference. The id "${e}" is not in the document.`,gp,{title:`No matching id in document: ${e}.`,elements:[t]})}}}});var Cp=String.raw`dfn{cursor:pointer}
1397
1396
  .dfn-panel{position:absolute;z-index:35;min-width:300px;max-width:500px;padding:.5em .75em;margin-top:.6em;font-family:"Helvetica Neue",sans-serif;font-size:small;background:#fff;background:var(--indextable-hover-bg,#fff);color:#000;color:var(--text,#000);box-shadow:0 1em 3em -.4em rgba(0,0,0,.3),0 0 1px 1px rgba(0,0,0,.05);box-shadow:0 1em 3em -.4em var(--tocsidebar-shadow,rgba(0,0,0,.3)),0 0 1px 1px var(--tocsidebar-shadow,rgba(0,0,0,.05));border-radius:2px}
1398
1397
  .dfn-panel:not(.docked)>.caret{position:absolute;top:-9px}
1399
1398
  .dfn-panel:not(.docked)>.caret::after,.dfn-panel:not(.docked)>.caret::before{content:"";position:absolute;border:10px solid transparent;border-top:0;border-bottom:10px solid #fff;border-bottom-color:var(--indextable-hover-bg,#fff);top:0}
@@ -1411,7 +1410,7 @@ var[data-type]:hover::after,var[data-type]:hover::before{opacity:1}`;var up=Obje
1411
1410
  .dfn-panel a[href]:hover{border-bottom-width:1px}
1412
1411
  .dfn-panel ul{padding:0}
1413
1412
  .dfn-panel li{margin-left:1em}
1414
- .dfn-panel.docked{position:fixed;left:.5em;top:unset;bottom:2em;margin:0 auto;max-width:calc(100vw - .75em * 2 - .5em - .2em * 2);max-height:30vh;overflow:auto}`;function vp(e){const{id:t}=e,n=e.dataset.href||`#${t}`,r=document.querySelectorAll(`a[href="${n}"]:not(.index-term)`),s=`dfn-panel-for-${e.id}`,i=e.getAttribute("aria-label")||Nr(e.textContent),o=sr`
1413
+ .dfn-panel.docked{position:fixed;left:.5em;top:unset;bottom:2em;margin:0 auto;max-width:calc(100vw - .75em * 2 - .5em - .2em * 2);max-height:30vh;overflow:auto}`;function Sp(e){const{id:t}=e,n=e.dataset.href||`#${t}`,r=document.querySelectorAll(`a[href="${n}"]:not(.index-term)`),s=`dfn-panel-for-${e.id}`,i=e.getAttribute("aria-label")||Mr(e.textContent),o=ur`
1415
1414
  <div
1416
1415
  class="dfn-panel"
1417
1416
  id="${s}"
@@ -1428,17 +1427,17 @@ var[data-type]:hover::after,var[data-type]:hover::before{opacity:1}`;var up=Obje
1428
1427
  aria-label="Permalink for definition: ${i}. Activate to close this dialog."
1429
1428
  >Permalink</a
1430
1429
  >
1431
- ${function(e){return e.matches("dfn[data-export]")?sr`<span
1430
+ ${function(e){return e.matches("dfn[data-export]")?ur`<span
1432
1431
  class="marker dfn-exported"
1433
1432
  title="Definition can be referenced by other specifications"
1434
1433
  >exported</span
1435
- >`:null}(e)} ${function(e,t){if(!e.hasAttribute("data-idl"))return null;for(const n of t){if(n.dataset.linkType!==e.dataset.dfnType)continue;const t=n.closest("pre.idl");if(t&&t.id){const e=`#${t.id}`;return sr`<a
1434
+ >`:null}(e)} ${function(e,t){if(!e.hasAttribute("data-idl"))return null;for(const n of t){if(n.dataset.linkType!==e.dataset.dfnType)continue;const t=n.closest("pre.idl");if(t&&t.id){const e=`#${t.id}`;return ur`<a
1436
1435
  href="${e}"
1437
1436
  class="marker idl-block"
1438
1437
  title="Jump to IDL declaration"
1439
1438
  >IDL</a
1440
1439
  >`}}return null}(e,r)}
1441
- ${function(e,t){const{dfnType:n}=e.dataset;if(!n?.startsWith("cddl-"))return null;const r=[...t].map((e=>e.closest("pre.cddl"))).find((e=>e?.id));return r?sr`<a
1440
+ ${function(e,t){const{dfnType:n}=e.dataset;if(!n?.startsWith("cddl-"))return null;const r=[...t].map((e=>e.closest("pre.cddl"))).find((e=>e?.id));return r?ur`<a
1442
1441
  href="#${r.id}"
1443
1442
  class="marker cddl-block"
1444
1443
  title="Jump to CDDL declaration"
@@ -1446,59 +1445,59 @@ var[data-type]:hover::after,var[data-type]:hover::before{opacity:1}`;var up=Obje
1446
1445
  >`:null}(e,r)}
1447
1446
  </div>
1448
1447
  <p><b>Referenced in:</b></p>
1449
- ${function(e,t){if(!t.length)return sr`<ul>
1448
+ ${function(e,t){if(!t.length)return ur`<ul>
1450
1449
  <li>Not referenced in this document.</li>
1451
- </ul>`;const n=new Map;t.forEach(((t,r)=>{const s=t.id||`ref-for-${e}-${r+1}`;t.id||(t.id=s);const i=function(e){const t=e.closest("section");if(!t)return null;const n=t.querySelector("h1, h2, h3, h4, h5, h6");return n?`§ ${Nr(n.textContent)}`:null}(t)??"";(n.get(i)??n.set(i,[]).get(i)??[]).push(s)}));const r=([e,t])=>[{title:e,id:t[0],text:e}].concat(t.slice(1).map(((e,t)=>({title:`Reference ${t+2}`,text:`(${t+2})`,id:e})))),s=e=>sr`<li>
1452
- ${r(e).map((e=>sr`<a href="#${e.id}" title="${e.title}">${e.text}</a
1450
+ </ul>`;const n=new Map;t.forEach(((t,r)=>{const s=t.id||`ref-for-${e}-${r+1}`;t.id||(t.id=s);const i=function(e){const t=e.closest("section");if(!t)return null;const n=t.querySelector("h1, h2, h3, h4, h5, h6");return n?`§ ${Mr(n.textContent)}`:null}(t)??"";(n.get(i)??n.set(i,[]).get(i)??[]).push(s)}));const r=([e,t])=>[{title:e,id:t[0],text:e}].concat(t.slice(1).map(((e,t)=>({title:`Reference ${t+2}`,text:`(${t+2})`,id:e})))),s=e=>ur`<li>
1451
+ ${r(e).map((e=>ur`<a href="#${e.id}" title="${e.title}">${e.text}</a
1453
1452
  >${" "}`))}
1454
- </li>`;return sr`<ul>
1453
+ </li>`;return ur`<ul>
1455
1454
  ${[...n].map(s)}
1456
1455
  </ul>`}(t,r)}
1457
1456
  </div>
1458
- `;return o}var kp=Object.freeze({__proto__:null,name:"core/dfn-panel",run:async function(){document.head.insertBefore(sr`<style>
1459
- ${wp}
1460
- </style>`,document.querySelector("link"));const e=document.querySelectorAll("dfn[id]:not([data-cite]), #index-defined-elsewhere .index-term"),t=document.createDocumentFragment();for(const n of e)t.append(vp(n)),n.tabIndex=0,n.setAttribute("aria-haspopup","dialog");const n=document.body.querySelector("script");n?n.before(t):document.body.append(t);const r=document.createElement("script");r.id="respec-dfn-panel",r.textContent=await async function(){try{return(await Promise.resolve().then((function(){return Ph}))).default}catch{return ys("./src/core/dfn-panel.runtime.js")}}(),document.body.append(r)}});const $p="rs-changelog",xp=class extends HTMLElement{constructor(){super();const e=this.getAttribute("filter"),t=e&&"function"==typeof window[e]?window[e]:()=>!0;this.props={from:this.getAttribute("from"),to:this.getAttribute("to")||"HEAD",repo:this.getAttribute("repo"),path:this.getAttribute("path"),filter:t}}connectedCallback(){const{from:e,to:t,filter:n,repo:r,path:s}=this.props;sr.bind(this)`
1457
+ `;return o}var _p=Object.freeze({__proto__:null,name:"core/dfn-panel",run:async function(){document.head.insertBefore(ur`<style>
1458
+ ${Cp}
1459
+ </style>`,document.querySelector("link"));const e=document.querySelectorAll("dfn[id]:not([data-cite]), #index-defined-elsewhere .index-term"),t=document.createDocumentFragment();for(const n of e)t.append(Sp(n)),n.tabIndex=0,n.setAttribute("aria-haspopup","dialog");const n=document.body.querySelector("script");n?n.before(t):document.body.append(t);const r=document.createElement("script");r.id="respec-dfn-panel",r.textContent=await async function(){try{return(await Promise.resolve().then((function(){return jh}))).default}catch{return Cs("./src/core/dfn-panel.runtime.js")}}(),document.body.append(r)}});const Tp="rs-changelog",Rp=class extends HTMLElement{constructor(){super();const e=this.getAttribute("filter"),t=e&&"function"==typeof window[e]?window[e]:()=>!0;this.props={from:this.getAttribute("from"),to:this.getAttribute("to")||"HEAD",repo:this.getAttribute("repo"),path:this.getAttribute("path"),filter:t}}connectedCallback(){const{from:e,to:t,filter:n,repo:r,path:s}=this.props;ur.bind(this)`
1461
1460
  <ul>
1462
- ${{any:Cp(e,t,n,r,s).then((e=>async function(e,t){const n=await vo,r=t?`https://github.com/${t}/`:n?.repoURL;return e.map((e=>{const[t,n=null]=e.message.split(/\(#(\d+)\)/,2),s=`${r}commit/${e.hash}`,i=n&&sr` (<a href="${n?`${r}pull/${n}`:null}">#${n}</a>)`;return sr`<li><a href="${s}">${t.trim()}</a>${i}</li>`}))}(e,r))).catch((e=>ns(e.message,$p,{elements:[this],cause:e}))).finally((()=>{this.dispatchEvent(new CustomEvent("done"))})),placeholder:"Loading list of commits..."}}
1461
+ ${{any:Ep(e,t,n,r,s).then((e=>async function(e,t){const n=await _o,r=t?`https://github.com/${t}/`:n?.repoURL;return e.map((e=>{const[t,n=null]=e.message.split(/\(#(\d+)\)/,2),s=`${r}commit/${e.hash}`,i=n&&ur` (<a href="${n?`${r}pull/${n}`:null}">#${n}</a>)`;return ur`<li><a href="${s}">${t.trim()}</a>${i}</li>`}))}(e,r))).catch((e=>cs(e.message,Tp,{elements:[this],cause:e}))).finally((()=>{this.dispatchEvent(new CustomEvent("done"))})),placeholder:"Loading list of commits..."}}
1463
1462
  </ul>
1464
- `}};async function Cp(e,t,n,r,s){let i;try{const o=await vo;if(!o)throw new Error("`respecConfig.github` is not set");const a=r||o.fullName,c=new URL("commits",`${o.apiBase}/${a}/`);e&&c.searchParams.set("from",e),c.searchParams.set("to",t),s&&c.searchParams.set("path",s);const l=await fetch(c.href);if(!l.ok)throw new Error(`Request to ${c} failed with status code ${l.status}`);if(i=await l.json(),!i.length)throw new Error(`No commits between ${e}..${t}.`);i=i.filter(n)}catch(e){const t=`Error loading commits from GitHub. ${e.message}`;throw new Error(t,{cause:e})}return i}const Sp=[Object.freeze({__proto__:null,element:xp,name:$p})];var _p=Object.freeze({__proto__:null,name:"core/custom-elements/index",run:async function(){Sp.forEach((e=>{customElements.define(e.name,e.element)}));const e=Sp.map((e=>e.name)).join(", "),t=[...document.querySelectorAll(e)].map((e=>new Promise((t=>e.addEventListener("done",t,{once:!0})))));await Promise.all(t)}});var Tp=Object.freeze({__proto__:null,name:"core/web-monetization",run:function(e){if(!1===e.monetization)return;const{monetization:t}=e,{removeOnSave:n,paymentPointer:r}=function(e){const t={paymentPointer:"$respec.org",removeOnSave:!0};switch(typeof e){case"string":t.paymentPointer=e;break;case"object":e.paymentPointer&&(t.paymentPointer=String(e.paymentPointer)),!1===e.removeOnSave&&(t.removeOnSave=!1)}return t}(t),s=n?"removeOnSave":null;document.head.append(sr`<meta
1463
+ `}};async function Ep(e,t,n,r,s){let i;try{const o=await _o;if(!o)throw new Error("`respecConfig.github` is not set");const a=r||o.fullName,c=new URL("commits",`${o.apiBase}/${a}/`);e&&c.searchParams.set("from",e),c.searchParams.set("to",t),s&&c.searchParams.set("path",s);const l=await fetch(c.href);if(!l.ok)throw new Error(`Request to ${c} failed with status code ${l.status}`);if(i=await l.json(),!i.length)throw new Error(`No commits between ${e}..${t}.`);i=i.filter(n)}catch(e){const t=`Error loading commits from GitHub. ${e.message}`;throw new Error(t,{cause:e})}return i}const Lp=[Object.freeze({__proto__:null,element:Rp,name:Tp})];var Ap=Object.freeze({__proto__:null,name:"core/custom-elements/index",run:async function(){Lp.forEach((e=>{customElements.define(e.name,e.element)}));const e=Lp.map((e=>e.name)).join(", "),t=[...document.querySelectorAll(e)].map((e=>new Promise((t=>e.addEventListener("done",t,{once:!0})))));await Promise.all(t)}});var Pp=Object.freeze({__proto__:null,name:"core/web-monetization",run:function(e){if(!1===e.monetization)return;const{monetization:t}=e,{removeOnSave:n,paymentPointer:r}=function(e){const t={paymentPointer:"$respec.org",removeOnSave:!0};switch(typeof e){case"string":t.paymentPointer=e;break;case"object":e.paymentPointer&&(t.paymentPointer=String(e.paymentPointer)),!1===e.removeOnSave&&(t.removeOnSave=!1)}return t}(t),s=n?"removeOnSave":null;document.head.append(ur`<meta
1465
1464
  name="monetization"
1466
1465
  content="${r}"
1467
1466
  class="${s}"
1468
- />`)}});var Rp=Object.freeze({__proto__:null,name:"core/dfn-contract",run:function(){!function(){const e=document.querySelectorAll("dfn:is([data-dfn-type=''],:not([data-dfn-type]))");for(const t of e)t.dataset.dfnType="dfn";const t=document.querySelectorAll("dfn:not([data-noexport], [data-export], [data-dfn-type='dfn'], [data-cite])");for(const e of t)e.dataset.export=""}(),function(){const e=document.querySelectorAll("dl.definitions dt:has(dfn[data-dfn-type])");for(const t of e){const e=t.querySelector("dfn[data-dfn-type]").id,n=t.nextElementSibling;n&&!n.dataset.defines&&e&&(n.dataset.defines=`#${e}`)}const t=document.querySelectorAll(".definition:has(dfn[data-dfn-type])");for(const e of t){const t=e.querySelector("dfn[data-dfn-type]");t.id&&!e.dataset.defines&&(e.dataset.defines=`#${t.id}`)}}()}});const Ep="core/before-save";var Lp=Object.freeze({__proto__:null,name:Ep,run:function(e){if(e.beforeSave)if(Array.isArray(e.beforeSave)&&!e.beforeSave.some((e=>"function"!=typeof e||"AsyncFunction"===e.constructor.name)))hs("beforesave",(t=>{!function(e,t){let n=0;for(const r of e)try{r(t)}catch(e){ns(ls`Function ${r.name?`\`${r.name}\``:`at position ${n}`}\` threw an error during processing of ${"[beforeSave]"}.`,Ep,{hint:"See developer console.",cause:e})}finally{n++}}(e.beforeSave,t.ownerDocument)}),{once:!0});else{ns(ls`${"[beforeSave]"} configuration option must be an array of synchronous JS functions.`,Ep)}}});const Ap="core/linter-rules/check-charset",Pp=Ir({en:{msg:"Document must only contain one `<meta>` tag with charset set to 'utf-8'",hint:'Add this line in your document `<head>` section - `<meta charset="utf-8">` or set charset to "utf-8" if not set already.'},zh:{msg:"文档只能包含一个 charset 属性为 utf-8 的 `<meta>` 标签",hint:'将此行添加到文档的 `<head>` 部分—— `<meta charset="utf-8">` 或将 charset 设置为 utf-8(如果尚未设置)。'},cs:{msg:"Dokument smí obsahovat pouze jeden tag `<meta>` s charset nastaveným na 'utf-8'",hint:'Přidejte tento řádek do sekce `<head>` vašeho dokumentu - `<meta charset="utf-8">` nebo nastavte charset na "utf-8", pokud ještě není nastaven.'}});var Np=Object.freeze({__proto__:null,name:Ap,run:function(e){if(!e.lint?.["check-charset"])return;const t=document.querySelectorAll("meta[charset]"),n=[];for(const e of t)n.push((e.getAttribute("charset")??"").trim().toLowerCase());n.includes("utf-8")&&1===t.length||rs(Pp.msg,Ap,{hint:Pp.hint,elements:[...t]})}});const Ip="core/linter-rules/check-punctuation",Dp=[".",":","!","?"],Op=Dp.map((e=>`"${e}"`)).join(", "),jp=Ir({en:{msg:"`p` elements should end with a punctuation mark.",hint:`Please make sure \`p\` elements end with one of: ${Op}.`},cs:{msg:"Elementy `p` by měly končit interpunkčním znaménkem.",hint:`Ujistěte se, že elementy \`p\` končí jedním z těchto znaků: ${Op}.`}});var zp=Object.freeze({__proto__:null,name:Ip,run:function(e){if(!e.lint?.["check-punctuation"])return;const t=new RegExp(`[${Dp.join("")}\\]]$|^ *$`,"m"),n=[...document.querySelectorAll("p:not(#back-to-top,#w3c-state)")].filter((e=>!t.test(e.textContent.trim())));n.length&&rs(jp.msg,Ip,{hint:jp.hint,elements:n})}});const Mp="core/linter-rules/check-internal-slots",Up=Ir({en:{msg:"Internal slots should be preceded by a '.'",hint:"Add a '.' between the elements mentioned."},cs:{msg:"Interní sloty by měly být uvedeny s tečkou '.' před názvem",hint:"Přidejte tečku '.' mezi uvedené prvky."}});var qp=Object.freeze({__proto__:null,name:Mp,run:function(e){if(!e.lint?.["check-internal-slots"])return;const t=[...document.querySelectorAll("var+a")].filter((e=>{const t=e.previousSibling?.nodeName;return"VAR"===t}));t.length&&rs(Up.msg,Mp,{hint:Up.hint,elements:t})}});const Wp="core/linter-rules/local-refs-exist",Fp=Ir({en:{msg:"Broken local reference found in document.",hint:"Please fix the links mentioned."},cs:{msg:"V dokumentu byla nalezena nefunkční lokální reference.",hint:"Opravte prosím uvedené odkazy."}});function Bp(e){const t=e.getAttribute("href")?.substring(1);if(!t)return;const n=e.ownerDocument;return!n.getElementById(t)&&!n.getElementsByName(t).length}var Hp=Object.freeze({__proto__:null,name:Wp,run:function(e){if(!e.lint?.["local-refs-exist"])return;const t=[...document.querySelectorAll("a[href^='#']")].filter(Bp);t.length&&rs(Fp.msg,Wp,{hint:Fp.hint,elements:t})}});const Gp="core/linter-rules/no-captionless-tables",Vp=Ir({en:{msg:"All tables marked with class='numbered' must start with a caption element.",hint:"Add a `caption` to the offending table."},cs:{msg:"Všechny tabulky označené class='numbered' musí začínat elementem caption.",hint:"Přidejte k dané tabulce element `caption`."}});var Jp=Object.freeze({__proto__:null,name:Gp,run:function(e){if(!e.lint?.["no-captionless-tables"])return;const t=[...document.querySelectorAll("table.numbered")].filter((e=>!(e.firstElementChild instanceof HTMLTableCaptionElement)));t.length&&rs(Vp.msg,Gp,{hint:Vp.hint,elements:t})}});const Kp="no-unused-dfns",Zp="core/linter-rules/no-unused-dfns",Yp=Ir({en:{msg:e=>`Found definition for "${e}", but nothing links to it. This is usually a spec bug!`,get hint(){return ls`
1467
+ />`)}});var Np=Object.freeze({__proto__:null,name:"core/dfn-contract",run:function(){!function(){const e=document.querySelectorAll("dfn:is([data-dfn-type=''],:not([data-dfn-type]))");for(const t of e)t.dataset.dfnType="dfn";const t=document.querySelectorAll("dfn:not([data-noexport], [data-export], [data-dfn-type='dfn'], [data-cite])");for(const e of t)e.dataset.export=""}(),function(){const e=document.querySelectorAll("dl.definitions dt:has(dfn[data-dfn-type])");for(const t of e){const e=t.querySelector("dfn[data-dfn-type]").id,n=t.nextElementSibling;n&&!n.dataset.defines&&e&&(n.dataset.defines=`#${e}`)}const t=document.querySelectorAll(".definition:has(dfn[data-dfn-type])");for(const e of t){const t=e.querySelector("dfn[data-dfn-type]");t.id&&!e.dataset.defines&&(e.dataset.defines=`#${t.id}`)}}()}});const Ip="core/before-save";var Dp=Object.freeze({__proto__:null,name:Ip,run:function(e){if(e.beforeSave)if(Array.isArray(e.beforeSave)&&!e.beforeSave.some((e=>"function"!=typeof e||"AsyncFunction"===e.constructor.name)))ws("beforesave",(t=>{!function(e,t){let n=0;for(const r of e)try{r(t)}catch(e){cs(ms`Function ${r.name?`\`${r.name}\``:`at position ${n}`}\` threw an error during processing of ${"[beforeSave]"}.`,Ip,{hint:"See developer console.",cause:e})}finally{n++}}(e.beforeSave,t.ownerDocument)}),{once:!0});else{cs(ms`${"[beforeSave]"} configuration option must be an array of synchronous JS functions.`,Ip)}}});const Op="core/linter-rules/check-charset",jp=Ur({en:{msg:"Document must only contain one `<meta>` tag with charset set to 'utf-8'",hint:'Add this line in your document `<head>` section - `<meta charset="utf-8">` or set charset to "utf-8" if not set already.'},zh:{msg:"文档只能包含一个 charset 属性为 utf-8 的 `<meta>` 标签",hint:'将此行添加到文档的 `<head>` 部分—— `<meta charset="utf-8">` 或将 charset 设置为 utf-8(如果尚未设置)。'},cs:{msg:"Dokument smí obsahovat pouze jeden tag `<meta>` s charset nastaveným na 'utf-8'",hint:'Přidejte tento řádek do sekce `<head>` vašeho dokumentu - `<meta charset="utf-8">` nebo nastavte charset na "utf-8", pokud ještě není nastaven.'}});var zp=Object.freeze({__proto__:null,name:Op,run:function(e){if(!e.lint?.["check-charset"])return;const t=document.querySelectorAll("meta[charset]"),n=[];for(const e of t)n.push((e.getAttribute("charset")??"").trim().toLowerCase());n.includes("utf-8")&&1===t.length||ls(jp.msg,Op,{hint:jp.hint,elements:[...t]})}});const Mp="core/linter-rules/check-punctuation",Up=[".",":","!","?"],qp=Up.map((e=>`"${e}"`)).join(", "),Wp=Ur({en:{msg:"`p` elements should end with a punctuation mark.",hint:`Please make sure \`p\` elements end with one of: ${qp}.`},cs:{msg:"Elementy `p` by měly končit interpunkčním znaménkem.",hint:`Ujistěte se, že elementy \`p\` končí jedním z těchto znaků: ${qp}.`}});var Fp=Object.freeze({__proto__:null,name:Mp,run:function(e){if(!e.lint?.["check-punctuation"])return;const t=new RegExp(`[${Up.join("")}\\]]$|^ *$`,"m"),n=[...document.querySelectorAll("p:not(#back-to-top,#w3c-state)")].filter((e=>!t.test(e.textContent.trim())));n.length&&ls(Wp.msg,Mp,{hint:Wp.hint,elements:n})}});const Bp="core/linter-rules/check-internal-slots",Hp=Ur({en:{msg:"Internal slots should be preceded by a '.'",hint:"Add a '.' between the elements mentioned."},cs:{msg:"Interní sloty by měly být uvedeny s tečkou '.' před názvem",hint:"Přidejte tečku '.' mezi uvedené prvky."}});var Gp=Object.freeze({__proto__:null,name:Bp,run:function(e){if(!e.lint?.["check-internal-slots"])return;const t=[...document.querySelectorAll("var+a")].filter((e=>{const t=e.previousSibling?.nodeName;return"VAR"===t}));t.length&&ls(Hp.msg,Bp,{hint:Hp.hint,elements:t})}});const Vp="core/linter-rules/local-refs-exist",Jp=Ur({en:{msg:"Broken local reference found in document.",hint:"Please fix the links mentioned."},cs:{msg:"V dokumentu byla nalezena nefunkční lokální reference.",hint:"Opravte prosím uvedené odkazy."}});function Kp(e){const t=e.getAttribute("href")?.substring(1);if(!t)return;const n=e.ownerDocument;return!n.getElementById(t)&&!n.getElementsByName(t).length}var Zp=Object.freeze({__proto__:null,name:Vp,run:function(e){if(!e.lint?.["local-refs-exist"])return;const t=[...document.querySelectorAll("a[href^='#']")].filter(Kp);t.length&&ls(Jp.msg,Vp,{hint:Jp.hint,elements:t})}});const Yp="core/linter-rules/no-captionless-tables",Xp=Ur({en:{msg:"All tables marked with class='numbered' must start with a caption element.",hint:"Add a `caption` to the offending table."},cs:{msg:"Všechny tabulky označené class='numbered' musí začínat elementem caption.",hint:"Přidejte k dané tabulce element `caption`."}});var Qp=Object.freeze({__proto__:null,name:Yp,run:function(e){if(!e.lint?.["no-captionless-tables"])return;const t=[...document.querySelectorAll("table.numbered")].filter((e=>!(e.firstElementChild instanceof HTMLTableCaptionElement)));t.length&&ls(Xp.msg,Yp,{hint:Xp.hint,elements:t})}});const eh="no-unused-dfns",th="core/linter-rules/no-unused-dfns",nh=Ur({en:{msg:e=>`Found definition for "${e}", but nothing links to it. This is usually a spec bug!`,get hint(){return ms`
1469
1468
  You can do one of the following...
1470
1469
 
1471
1470
  * Add a \`class="lint-ignore"\` attribute the definition.
1472
1471
  * Either remove the definition or change \`<dfn>\` to another type of HTML element.
1473
1472
  * If you meant to ${"[export|#data-export]"} the definition, add \`class="export"\` to the definition.
1474
1473
 
1475
- To silence this warning entirely, set \`lint: { "no-unused-dfns": false }\` in your \`respecConfig\`.`}},cs:{msg:e=>`Nalezena definice pro "${e}", ale nic na ni neodkazuje. Toto je obvykle chyba ve specifikaci!`,get hint(){return ls`
1474
+ To silence this warning entirely, set \`lint: { "no-unused-dfns": false }\` in your \`respecConfig\`.`}},cs:{msg:e=>`Nalezena definice pro "${e}", ale nic na ni neodkazuje. Toto je obvykle chyba ve specifikaci!`,get hint(){return ms`
1476
1475
  Můžete udělat jedno z následujícího...
1477
1476
 
1478
1477
  * Přidejte k definici atribut \`class="lint-ignore"\`.
1479
1478
  * Definici buď odstraňte, nebo změňte \`<dfn>\` na jiný typ HTML elementu.
1480
1479
  * Pokud jste chtěli ${"[export|#data-export]"} tuto definici, přidejte k ní \`class="export"\`.
1481
1480
 
1482
- Pro úplné potlačení tohoto varování nastavte \`lint: { "no-unused-dfns": false }\` ve vaší \`respecConfig\`.`}}});function Xp(e){return!document.querySelector(`a[href="#${e.id}"]:not(.index-term, .self-link)`)}var Qp=Object.freeze({__proto__:null,name:Zp,run:function(e){if(!e.lint?.[Kp])return;const t="error"===e.lint[Kp]?ns:rs;[...document.querySelectorAll("dfn:not(.lint-ignore, [data-export], [data-cite])")].filter(Xp).forEach((e=>{const n=[e],r=Nr(e.textContent);t(Yp.msg(r),Zp,{elements:n,hint:Yp.hint})}))}});const eh="core/linter-rules/no-headingless-sections",th=Ir({en:{msg:"All sections must start with a `h2-6` element.",hint:"Add a `h2-6` to the offending section or use a `<div>`."},nl:{msg:"Alle secties moeten beginnen met een `h2-6` element.",hint:"Voeg een `h2-6` toe aan de conflicterende sectie of gebruik een `<div>`."},zh:{msg:"所有章节(section)都必须以 `h2-6` 元素开头。",hint:"将 `h2-6` 添加到有问题的章节或使用 `<div>`。"},cs:{msg:"Všechny sekce musí začínat elementem `h2-6`.",hint:"Přidejte do problematické sekce `h2-6` nebo použijte `<div>`."}});var nh=Object.freeze({__proto__:null,name:eh,run:function(e){if(!e.lint?.["no-headingless-sections"])return;const t=[...document.querySelectorAll("section:not(.head,#abstract,#sotd)")].filter((({firstElementChild:e})=>!e||!(e.matches(".header-wrapper")||e instanceof HTMLHeadingElement)));t.length&&rs(th.msg,eh,{hint:th.hint,elements:t})}});const rh="core/linter-rules/no-unused-vars",sh=Ir({en:{msg:"Variable was defined, but never used.",hint:"Add a `data-ignore-unused` attribute to the `<var>`."},cs:{msg:"Proměnná byla definována, ale nikdy nebyla použita.",hint:"Přidejte atribut `data-ignore-unused` k elementu `<var>`."}});var ih=Object.freeze({__proto__:null,name:rh,run:function(e){if(!e.lint?.["no-unused-vars"])return;const t=[],n=e=>!!e.querySelector(":scope > :not(section) ~ .algorithm, :scope > :not(section) .algorithm");for(const e of document.querySelectorAll("section")){if(!n(e))continue;const r=e.querySelectorAll(":scope > :not(section) var");if(!r.length)continue;const s=new Map;for(const e of r){const t=Nr(e.textContent),n=s.get(t)||s.set(t,[]).get(t);n?.push(e)}for(const e of s.values())1!==e.length||e[0].hasAttribute("data-ignore-unused")||t.push(e[0])}t.length&&rs(sh.msg,rh,{hint:sh.hint,elements:t})}});const oh="no-dfn-in-abstract",ah=`core/linter-rules/${oh}`,ch=Ir({en:{msg:e=>`Definition \`${e}\` is in an unnumbered section (e.g. abstract or SotD).`,get hint(){return ls`Definitions in unnumbered sections (abstract, SotD) are semantically out of place and appear in the terms index without a section number. Move this definition to a numbered section such as "Terminology". See ${"[export|#data-export]"}.`}}}),lh=["section#abstract","section#sotd","section.introductory"].join(", ");var uh=Object.freeze({__proto__:null,name:ah,run:function(e){if(!e.lint?.[oh])return;const t=[...document.querySelectorAll("dfn")].filter((e=>e.closest(lh)));t.forEach((e=>{const t=Nr(e.textContent);rs(ch.msg(t),ah,{hint:ch.hint,elements:[e]})}))}});const dh="required-sections",ph="w3c/linter-rules/required-sections",hh={en:{msg:e=>`W3C Recommendation track documents require a separate "${e}" section.`,hint:e=>ls`Add a \`<section>\` with a "${e}" header. See the [Horizontal review guidelines](https://www.w3.org/Guide/documentreview/#how_to_get_horizontal_review).
1481
+ Pro úplné potlačení tohoto varování nastavte \`lint: { "no-unused-dfns": false }\` ve vaší \`respecConfig\`.`}}});function rh(e){return!document.querySelector(`a[href="#${e.id}"]:not(.index-term, .self-link)`)}var sh=Object.freeze({__proto__:null,name:th,run:function(e){if(!e.lint?.[eh])return;const t="error"===e.lint[eh]?cs:ls;[...document.querySelectorAll("dfn:not(.lint-ignore, [data-export], [data-cite])")].filter(rh).forEach((e=>{const n=[e],r=Mr(e.textContent);t(nh.msg(r),th,{elements:n,hint:nh.hint})}))}});const ih="core/linter-rules/no-headingless-sections",oh=Ur({en:{msg:"All sections must start with a `h2-6` element.",hint:"Add a `h2-6` to the offending section or use a `<div>`."},nl:{msg:"Alle secties moeten beginnen met een `h2-6` element.",hint:"Voeg een `h2-6` toe aan de conflicterende sectie of gebruik een `<div>`."},zh:{msg:"所有章节(section)都必须以 `h2-6` 元素开头。",hint:"将 `h2-6` 添加到有问题的章节或使用 `<div>`。"},cs:{msg:"Všechny sekce musí začínat elementem `h2-6`.",hint:"Přidejte do problematické sekce `h2-6` nebo použijte `<div>`."}});var ah=Object.freeze({__proto__:null,name:ih,run:function(e){if(!e.lint?.["no-headingless-sections"])return;const t=[...document.querySelectorAll("section:not(.head,#abstract,#sotd)")].filter((({firstElementChild:e})=>!e||!(e.matches(".header-wrapper")||e instanceof HTMLHeadingElement)));t.length&&ls(oh.msg,ih,{hint:oh.hint,elements:t})}});const ch="core/linter-rules/no-unused-vars",lh=Ur({en:{msg:"Variable was defined, but never used.",hint:"Add a `data-ignore-unused` attribute to the `<var>`."},cs:{msg:"Proměnná byla definována, ale nikdy nebyla použita.",hint:"Přidejte atribut `data-ignore-unused` k elementu `<var>`."}});var uh=Object.freeze({__proto__:null,name:ch,run:function(e){if(!e.lint?.["no-unused-vars"])return;const t=[],n=e=>!!e.querySelector(":scope > :not(section) ~ .algorithm, :scope > :not(section) .algorithm");for(const e of document.querySelectorAll("section")){if(!n(e))continue;const r=e.querySelectorAll(":scope > :not(section) var");if(!r.length)continue;const s=new Map;for(const e of r){const t=Mr(e.textContent),n=s.get(t)||s.set(t,[]).get(t);n?.push(e)}for(const e of s.values())1!==e.length||e[0].hasAttribute("data-ignore-unused")||t.push(e[0])}t.length&&ls(lh.msg,ch,{hint:lh.hint,elements:t})}});const dh="no-dfn-in-abstract",ph=`core/linter-rules/${dh}`,hh=Ur({en:{msg:e=>`Definition \`${e}\` is in an unnumbered section (e.g. abstract or SotD).`,get hint(){return ms`Definitions in unnumbered sections (abstract, SotD) are semantically out of place and appear in the terms index without a section number. Move this definition to a numbered section such as "Terminology". See ${"[export|#data-export]"}.`}}}),fh=["section#abstract","section#sotd","section.introductory"].join(", ");var mh=Object.freeze({__proto__:null,name:ph,run:function(e){if(!e.lint?.[dh])return;const t=[...document.querySelectorAll("dfn")].filter((e=>e.closest(fh)));t.forEach((e=>{const t=Mr(e.textContent);ls(hh.msg(t),ph,{hint:hh.hint,elements:[e]})}))}});const gh="required-sections",bh="w3c/linter-rules/required-sections",yh={en:{msg:e=>`W3C Recommendation track documents require a separate "${e}" section.`,hint:e=>ms`Add a \`<section>\` with a "${e}" header. See the [Horizontal review guidelines](https://www.w3.org/Guide/documentreview/#how_to_get_horizontal_review).
1483
1482
  If the document is not intended for the W3C Recommendation track, set ${"[noRecTrack]"} to \`true\`
1484
- or turn off the ${`[${dh}]`} linter rule.`,privacy_considerations:"Privacy Considerations",security_considerations:"Security Considerations"},es:{msg:e=>`Documentos que van a ser "W3C Recommendation" requieren una sección "${e}" separada.`,hint:e=>ls`Agrega una \`<section>\` con título "${e}". Ver los [Horizontal review guidelines](https://www.w3.org/Guide/documentreview/#how_to_get_horizontal_review).
1483
+ or turn off the ${`[${gh}]`} linter rule.`,privacy_considerations:"Privacy Considerations",security_considerations:"Security Considerations"},es:{msg:e=>`Documentos que van a ser "W3C Recommendation" requieren una sección "${e}" separada.`,hint:e=>ms`Agrega una \`<section>\` con título "${e}". Ver los [Horizontal review guidelines](https://www.w3.org/Guide/documentreview/#how_to_get_horizontal_review).
1485
1484
  Si el documento no está destinado a ser un W3C Recommendation, puedes poner ${"[noRecTrack]"} a \`true\`
1486
- o apaga la regla de linter ${`[${dh}]`}.`,privacy_considerations:"Consideraciones de privacidad",security_considerations:"Consideraciones de Seguridad"},cs:{msg:e=>`Dokumenty na "W3C Recommendation track" vyžadují samostatnou sekci "${e}".`,hint:e=>ls`Přidejte \`<section>\` s nadpisem "${e}". Viz [Horizontal review guidelines](https://www.w3.org/Guide/documentreview/#how_to_get_horizontal_review).
1485
+ o apaga la regla de linter ${`[${gh}]`}.`,privacy_considerations:"Consideraciones de privacidad",security_considerations:"Consideraciones de Seguridad"},cs:{msg:e=>`Dokumenty na "W3C Recommendation track" vyžadují samostatnou sekci "${e}".`,hint:e=>ms`Přidejte \`<section>\` s nadpisem "${e}". Viz [Horizontal review guidelines](https://www.w3.org/Guide/documentreview/#how_to_get_horizontal_review).
1487
1486
  Pokud dokument není určen pro "W3C Recommendation track", nastavte ${"[noRecTrack]"} na \`true\`
1488
- nebo vypněte linter pravidlo ${`[${dh}]`}.
1489
- `,privacy_considerations:"Zásady ochrany soukromí",security_considerations:"Zásady bezpečnosti"}},fh=Ir(hh),mh=new Set([...qi]);mh.delete("DISC"),Ui.forEach((e=>mh.delete(e)));var gh=Object.freeze({__proto__:null,name:ph,requiresSomeSectionStatus:mh,run:function(e){if(!e.lint?.[dh])return;if(!Dr(hh,"privacy_considerations")){return void rs("Cannot check for required sections as translations are not available.",ph,{hint:"File an issue to add translations or use a supported language."})}if(e.noRecTrack||!mh.has(e.specStatus))return;const t="error"===e.lint[dh]?ns:rs,n=new Zr([fh.privacy_considerations,fh.security_considerations]),r=document.querySelectorAll("h2, h3, h4, h5, h6");for(const e of r){const t=e.cloneNode(!0);t.querySelectorAll("bdi")?.forEach((e=>e.remove()));const r=Nr(t.textContent);if(n.has(r)&&(n.delete(r),0===n.size))return}for(const e of n)t(fh.msg(e),ph,{hint:fh.hint(e)})}});const bh="core/linter-rules/wpt-tests-exist",yh=Ir({en:{msg:"The following test could not be found in Web Platform Tests:",hint:"Check [wpt.live](https://wpt.live) to see if it was deleted or renamed."},cs:{msg:"Následující test nebyl nalezen ve Web Platform Tests:",hint:"Zkontrolujte [wpt.live](https://wpt.live), zda nebyl smazán nebo přejmenován."}});var wh=Object.freeze({__proto__:null,name:bh,run:async function(e){if(!e.lint?.["wpt-tests-exist"])return;const t=await async function(e,t){let n;try{const t=new URL(e);if(t.pathname.startsWith("/web-platform-tests/wpt/tree/master/")){const e=/web-platform-tests\/wpt\/tree\/master\/(.+)/;n=(t.pathname.match(e)?.[1]??"").replace(/\//g,"")}else n=t.pathname.replace(/\//g,"")}catch(e){return rs("Failed to parse WPT directory from testSuiteURI",`linter/${bh}`),console.error(e),null}const r=new URL("web-platform-tests/wpt/files",`${t}/`);r.searchParams.set("path",n);const s=await fetch(r);if(!s.ok){return rs(`Failed to fetch files from WPT repository. Request failed with error: ${await s.text()} (${s.status})`,`linter/${bh}`),null}const{entries:i}=await s.json(),o=i.filter((e=>!e.endsWith("/")));return new Set(o)}(e.testSuiteURI,e.githubAPI);if(!t)return;const n=[...document.querySelectorAll("[data-tests]")].filter((e=>e.dataset.tests));for(const e of n)e.dataset.tests?.split(/,/gm).map((e=>e.trim().split(/\?|#/)[0])).filter((e=>e&&!t.has(e))).map((t=>{rs(`${yh.msg} \`${t}\`.`,bh,{hint:yh.hint,elements:[e]})}))}});const vh="core/linter-rules/no-http-props",kh=Ir({en:{msg:ls`Insecure URLs are not allowed in ${"[respecConfig]"}.`,hint:"Please change the following properties to 'https://': "},zh:{msg:ls`${"[respecConfig]"} 中不允许使用不安全的URL.`,hint:"请将以下属性更改为 https://:"},cs:{msg:ls`V ${"[respecConfig]"} nejsou povoleny nezabezpečené URL adresy.`,hint:"Změňte prosím následující vlastnosti na 'https://': "}});var $h=Object.freeze({__proto__:null,name:vh,run:function(e){if(!e.lint?.["no-http-props"])return;if(!parent.location.href.startsWith("http"))return;const t=Object.getOwnPropertyNames(e).filter((t=>t.endsWith("URI")&&e[t]||"prevED"===t)).filter((t=>new URL(e[t],parent.location.href).href.startsWith("http://")));if(t.length){const e=Lr(t,(e=>ls`${`[${e}]`}`));rs(kh.msg,vh,{hint:kh.hint+e})}}});const xh="core/linter-rules/a11y",Ch=["color-contrast","landmark-one-main","landmark-unique","region"];function Sh(e){const t=[];for(const n of e.split("\n\n")){const[e,...r]=n.split(/^\s{2}/m),s=r.map((e=>`- ${e.trimEnd()}`)).join("\n");t.push(`${e}${s}`)}return t.join("\n\n")}var _h=Object.freeze({__proto__:null,name:xh,run:async function(e){if(!e.lint?.a11y&&!e.a11y)return;const t=e.lint?.a11y||e.a11y,n=!0===t?{}:t,r=await async function(e){const{rules:t,...n}=e,r={rules:{...Object.fromEntries(Ch.map((e=>[e,{enabled:!1}]))),...t},...n,elementRef:!0,resultTypes:["violations"],reporter:"v1"};let s;try{s=await function(){const e=document.createElement("script");return e.classList.add("remove"),e.src="https://cdn.jsdelivr.net/npm/axe-core@4/axe.min.js",document.head.appendChild(e),new Promise(((t,n)=>{e.onload=()=>t(window.axe),e.onerror=n}))}()}catch(e){return ns("Failed to load a11y linter.",xh),console.error(e),[]}try{const e=await(s?.run(document,r));return e?.violations??[]}catch(e){return ns("Error while looking for a11y issues.",xh),console.error(e),[]}}(n);for(const e of r){const t=new Map;for(const n of e.nodes){const{failureSummary:e,element:r}=n,s=t.get(e)||t.set(e,[]).get(e);s?.push(r)}const{id:n,help:r,description:s,helpUrl:i}=e,o=`a11y/${n}: ${r}.`;for(const[e,n]of t){const t=Sh(e);rs(o,xh,{details:`\n\n${s}.\n\n${t}. ([Learn more](${i}))`,elements:n})}}}});const Th="informative-dfn",Rh="core/linter-rules/informative-dfn",Eh=Ir({en:{msg:(e,t)=>`Normative reference to "${e}" found but term is defined "informatively" in "${t}".`,get hint(){return ls`
1487
+ nebo vypněte linter pravidlo ${`[${gh}]`}.
1488
+ `,privacy_considerations:"Zásady ochrany soukromí",security_considerations:"Zásady bezpečnosti"}},wh=Ur(yh),vh=new Set([...Vi]);vh.delete("DISC"),Gi.forEach((e=>vh.delete(e)));var kh=Object.freeze({__proto__:null,name:bh,requiresSomeSectionStatus:vh,run:function(e){if(!e.lint?.[gh])return;if(!qr(yh,"privacy_considerations")){return void ls("Cannot check for required sections as translations are not available.",bh,{hint:"File an issue to add translations or use a supported language."})}if(e.noRecTrack||!vh.has(e.specStatus))return;const t="error"===e.lint[gh]?cs:ls,n=new ns([wh.privacy_considerations,wh.security_considerations]),r=document.querySelectorAll("h2, h3, h4, h5, h6");for(const e of r){const t=e.cloneNode(!0);t.querySelectorAll("bdi")?.forEach((e=>e.remove()));const r=Mr(t.textContent);if(n.has(r)&&(n.delete(r),0===n.size))return}for(const e of n)t(wh.msg(e),bh,{hint:wh.hint(e)})}});const $h="core/linter-rules/wpt-tests-exist",xh=Ur({en:{msg:"The following test could not be found in Web Platform Tests:",hint:"Check [wpt.live](https://wpt.live) to see if it was deleted or renamed."},cs:{msg:"Následující test nebyl nalezen ve Web Platform Tests:",hint:"Zkontrolujte [wpt.live](https://wpt.live), zda nebyl smazán nebo přejmenován."}});var Ch=Object.freeze({__proto__:null,name:$h,run:async function(e){if(!e.lint?.["wpt-tests-exist"])return;const t=await async function(e,t){let n;try{const t=new URL(e);if(t.pathname.startsWith("/web-platform-tests/wpt/tree/master/")){const e=/web-platform-tests\/wpt\/tree\/master\/(.+)/;n=(t.pathname.match(e)?.[1]??"").replace(/\//g,"")}else n=t.pathname.replace(/\//g,"")}catch(e){return ls("Failed to parse WPT directory from testSuiteURI",`linter/${$h}`),console.error(e),null}const r=new URL("web-platform-tests/wpt/files",`${t}/`);r.searchParams.set("path",n);const s=await fetch(r);if(!s.ok){return ls(`Failed to fetch files from WPT repository. Request failed with error: ${await s.text()} (${s.status})`,`linter/${$h}`),null}const{entries:i}=await s.json(),o=i.filter((e=>!e.endsWith("/")));return new Set(o)}(e.testSuiteURI,e.githubAPI);if(!t)return;const n=[...document.querySelectorAll("[data-tests]")].filter((e=>e.dataset.tests));for(const e of n)e.dataset.tests?.split(/,/gm).map((e=>e.trim().split(/\?|#/)[0])).filter((e=>e&&!t.has(e))).map((t=>{ls(`${xh.msg} \`${t}\`.`,$h,{hint:xh.hint,elements:[e]})}))}});const Sh="core/linter-rules/no-http-props",_h=Ur({en:{msg:ms`Insecure URLs are not allowed in ${"[respecConfig]"}.`,hint:"Please change the following properties to 'https://': "},zh:{msg:ms`${"[respecConfig]"} 中不允许使用不安全的URL.`,hint:"请将以下属性更改为 https://:"},cs:{msg:ms`V ${"[respecConfig]"} nejsou povoleny nezabezpečené URL adresy.`,hint:"Změňte prosím následující vlastnosti na 'https://': "}});var Th=Object.freeze({__proto__:null,name:Sh,run:function(e){if(!e.lint?.["no-http-props"])return;if(!parent.location.href.startsWith("http"))return;const t=Object.getOwnPropertyNames(e).filter((t=>t.endsWith("URI")&&e[t]||"prevED"===t)).filter((t=>new URL(e[t],parent.location.href).href.startsWith("http://")));if(t.length){const e=Or(t,(e=>ms`${`[${e}]`}`));ls(_h.msg,Sh,{hint:_h.hint+e})}}});const Rh="core/linter-rules/a11y",Eh=["color-contrast","landmark-one-main","landmark-unique","region"];function Lh(e){const t=[];for(const n of e.split("\n\n")){const[e,...r]=n.split(/^\s{2}/m),s=r.map((e=>`- ${e.trimEnd()}`)).join("\n");t.push(`${e}${s}`)}return t.join("\n\n")}var Ah=Object.freeze({__proto__:null,name:Rh,run:async function(e){if(!e.lint?.a11y&&!e.a11y)return;const t=e.lint?.a11y||e.a11y,n=!0===t?{}:t,r=await async function(e){const{rules:t,...n}=e,r={rules:{...Object.fromEntries(Eh.map((e=>[e,{enabled:!1}]))),...t},...n,elementRef:!0,resultTypes:["violations"],reporter:"v1"};let s;try{s=await function(){const e=document.createElement("script");return e.classList.add("remove"),e.src="https://cdn.jsdelivr.net/npm/axe-core@4/axe.min.js",document.head.appendChild(e),new Promise(((t,n)=>{e.onload=()=>t(window.axe),e.onerror=n}))}()}catch(e){return cs("Failed to load a11y linter.",Rh),console.error(e),[]}try{const e=await(s?.run(document,r));return e?.violations??[]}catch(e){return cs("Error while looking for a11y issues.",Rh),console.error(e),[]}}(n);for(const e of r){const t=new Map;for(const n of e.nodes){const{failureSummary:e,element:r}=n,s=t.get(e)||t.set(e,[]).get(e);s?.push(r)}const{id:n,help:r,description:s,helpUrl:i}=e,o=`a11y/${n}: ${r}.`;for(const[e,n]of t){const t=Lh(e);ls(o,Rh,{details:`\n\n${s}.\n\n${t}. ([Learn more](${i}))`,elements:n})}}}});const Ph="informative-dfn",Nh="core/linter-rules/informative-dfn",Ih=Ur({en:{msg:(e,t)=>`Normative reference to "${e}" found but term is defined "informatively" in "${t}".`,get hint(){return ms`
1490
1489
  You can do one of the following...
1491
1490
 
1492
1491
  * Get the source definition to be made normative
1493
1492
  * Add a \`class="lint-ignore"\` attribute to the link.
1494
1493
  * Use a local normative proxy for the definition à la \`<dfn data-cite="spec">term</dfn>\`
1495
1494
 
1496
- To silence this warning entirely, set \`lint: { "${Th}": false }\` in your \`respecConfig\`.`}},cs:{msg:(e,t)=>`Nalezen normativní odkaz na "${e}", ale pojem je definován pouze informativně v "${t}".`,get hint(){return ls`
1495
+ To silence this warning entirely, set \`lint: { "${Ph}": false }\` in your \`respecConfig\`.`}},cs:{msg:(e,t)=>`Nalezen normativní odkaz na "${e}", ale pojem je definován pouze informativně v "${t}".`,get hint(){return ms`
1497
1496
  Můžete udělat jedno z následujícího...
1498
1497
 
1499
1498
  * Požádejte o to, aby zdrojová definice byla normativní
1500
1499
  * Přidejte atribut \`class=\"lint-ignore\"\` k odkazu.
1501
1500
  * Použijte lokální normativní proxy pro definici, např. \`<dfn data-cite=\"spec\">term</dfn>\`
1502
1501
 
1503
- Pro úplné potlačení tohoto varování nastavte \`lint: { \"${Th}\": false }\` ve vaší \`respecConfig\`.`}}});var Lh=Object.freeze({__proto__:null,name:Rh,run:function(e){if(!e.lint?.[Th])return;const t="error"===e.lint[Th]?ns:rs;Bl.forEach((({term:e,spec:n,element:r})=>{r.classList.contains("lint-ignore")||t(Eh.msg(e,n),Rh,{title:"Normative reference to non-normative term.",elements:[r],hint:Eh.hint})}))}}),Ah=Object.freeze({__proto__:null,default:'(() => {\n// @ts-check\n\nif (document.respec) {\n document.respec.ready.then(setupVarHighlighter);\n} else {\n setupVarHighlighter();\n}\n\nfunction setupVarHighlighter() {\n document\n .querySelectorAll("var")\n .forEach(varElem => varElem.addEventListener("click", highlightListener));\n}\n\n/**\n * @param {MouseEvent} ev\n */\nfunction highlightListener(ev) {\n ev.stopPropagation();\n const varElem = /** @type {HTMLElement} */ (ev.target);\n const hightligtedElems = highlightVars(varElem);\n const resetListener = () => {\n const hlColor = getHighlightColor(varElem);\n hightligtedElems.forEach(el => removeHighlight(el, hlColor));\n [...HL_COLORS.keys()].forEach(key => HL_COLORS.set(key, true));\n };\n if (hightligtedElems.length) {\n document.body.addEventListener("click", resetListener, { once: true });\n }\n}\n\n// availability of highlight colors. colors from var.css\nconst HL_COLORS = new Map([\n ["respec-hl-c1", true],\n ["respec-hl-c2", true],\n ["respec-hl-c3", true],\n ["respec-hl-c4", true],\n ["respec-hl-c5", true],\n ["respec-hl-c6", true],\n ["respec-hl-c7", true],\n]);\n\n/**\n * @param {HTMLElement} target\n */\nfunction getHighlightColor(target) {\n // return current colors if applicable\n const { value } = target.classList;\n const re = /respec-hl-\\w+/;\n const activeClass = re.test(value) && value.match(re);\n if (activeClass) return activeClass[0];\n\n // first color preference\n if (HL_COLORS.get("respec-hl-c1") === true) return "respec-hl-c1";\n\n // otherwise get some other available color\n return [...HL_COLORS.keys()].find(c => HL_COLORS.get(c)) || "respec-hl-c1";\n}\n\n/**\n * @param {HTMLElement} varElem\n */\nfunction highlightVars(varElem) {\n const textContent = norm(varElem.textContent);\n const parent = /** @type {HTMLElement} */ (\n varElem.closest(".algorithm, section")\n );\n if (!parent) return [];\n const highlightColor = getHighlightColor(varElem);\n\n const varsToHighlight = [...parent.querySelectorAll("var")].filter(\n el =>\n norm(el.textContent) === textContent &&\n el.closest(".algorithm, section") === parent\n );\n\n // update availability of highlight color\n const colorStatus = varsToHighlight[0].classList.contains("respec-hl");\n HL_COLORS.set(highlightColor, colorStatus);\n\n // highlight vars\n if (colorStatus) {\n varsToHighlight.forEach(el => removeHighlight(el, highlightColor));\n return [];\n } else {\n varsToHighlight.forEach(el => addHighlight(el, highlightColor));\n }\n return varsToHighlight;\n}\n\n/**\n * @param {HTMLElement} el\n * @param {string} highlightColor\n */\nfunction removeHighlight(el, highlightColor) {\n el.classList.remove("respec-hl", highlightColor);\n // clean up empty class attributes so they don\'t come in export\n if (!el.classList.length) el.removeAttribute("class");\n}\n\n/**\n * @param {HTMLElement} elem\n * @param {string} highlightColor\n */\nfunction addHighlight(elem, highlightColor) {\n elem.classList.add("respec-hl", highlightColor);\n}\n\n/**\n * Same as `norm` from src/core/utils, but our build process doesn\'t allow\n * imports in runtime scripts, so duplicated here.\n * @param {string} str\n */\nfunction norm(str) {\n return str.trim().replace(/\\s+/g, " ");\n}\n})()'}),Ph=Object.freeze({__proto__:null,default:'(() => {\n// @ts-check\nif (document.respec) {\n document.respec.ready.then(setupPanel);\n} else {\n setupPanel();\n}\n\nfunction setupPanel() {\n const listener = panelListener();\n document.body.addEventListener("keydown", listener);\n document.body.addEventListener("click", listener);\n}\n\nfunction panelListener() {\n /** @type {HTMLElement | null} */\n let panel = null;\n /**\n * @param {KeyboardEvent|MouseEvent} event\n */\n return event => {\n const { target, type } = event;\n\n if (!(target instanceof HTMLElement)) return;\n\n // For keys, we only care about Enter key to activate the panel\n // otherwise it\'s activated via a click.\n if (\n type === "keydown" &&\n /** @type {KeyboardEvent} */ (event).key !== "Enter"\n )\n return;\n\n const action = deriveAction(event);\n\n switch (action) {\n case "show": {\n hidePanel(panel);\n /** @type {HTMLElement | null} */\n const dfn = target.closest("dfn, .index-term");\n if (!dfn?.id) break;\n panel = document.getElementById(`dfn-panel-for-${dfn.id}`);\n if (!panel) break;\n const coords = deriveCoordinates(\n /** @type {MouseEvent|KeyboardEvent} */ (event)\n );\n displayPanel(dfn, panel, coords);\n break;\n }\n case "dock": {\n if (panel) {\n panel.style.left = "";\n panel.style.top = "";\n panel.classList.add("docked");\n }\n break;\n }\n case "hide": {\n hidePanel(panel);\n panel = null;\n break;\n }\n }\n };\n}\n\n/**\n * @param {MouseEvent|KeyboardEvent} event\n */\nfunction deriveCoordinates(event) {\n const target = /** @type HTMLElement */ (event.target);\n\n // We prevent synthetic AT clicks from putting\n // the dialog in a weird place. The AT events sometimes\n // lack coordinates, so they have clientX/Y = 0\n const rect = target.getBoundingClientRect();\n if (\n event instanceof MouseEvent &&\n event.clientX >= rect.left &&\n event.clientY >= rect.top\n ) {\n // The event probably happened inside the bounding rect...\n return { x: event.clientX, y: event.clientY };\n }\n\n // Offset to the middle of the element\n const x = rect.x + rect.width / 2;\n // Placed at the bottom of the element\n const y = rect.y + rect.height;\n return { x, y };\n}\n\n/**\n * @param {Event} event\n */\nfunction deriveAction(event) {\n const target = /** @type {HTMLElement} */ (event.target);\n const hitALink = !!target.closest("a");\n if (target.closest("dfn:not([data-cite]), .index-term")) {\n return hitALink ? "none" : "show";\n }\n if (target.closest(".dfn-panel")) {\n if (hitALink) {\n return target.classList.contains("self-link") ? "hide" : "dock";\n }\n\n const panel = /** @type {HTMLElement} */ (target.closest(".dfn-panel"));\n return panel.classList.contains("docked") ? "hide" : "none";\n }\n if (document.querySelector(".dfn-panel:not([hidden])")) {\n return "hide";\n }\n return "none";\n}\n\n/**\n * @param {HTMLElement} dfn\n * @param {HTMLElement} panel\n * @param {{ x: number, y: number }} clickPosition\n */\nfunction displayPanel(dfn, panel, { x, y }) {\n panel.hidden = false;\n // distance (px) between edge of panel and the pointing triangle (caret)\n const MARGIN = 20;\n\n const dfnRects = dfn.getClientRects();\n // Find the `top` offset when the `dfn` can be spread across multiple lines\n let closestTop = 0;\n let minDiff = Infinity;\n for (const rect of dfnRects) {\n const { top, bottom } = rect;\n const diffFromClickY = Math.abs((top + bottom) / 2 - y);\n if (diffFromClickY < minDiff) {\n minDiff = diffFromClickY;\n closestTop = top;\n }\n }\n\n const top = window.scrollY + closestTop + dfnRects[0].height;\n const left = x - MARGIN;\n panel.style.left = `${left}px`;\n panel.style.top = `${top}px`;\n\n // Find if the panel is flowing out of the window\n const panelRect = panel.getBoundingClientRect();\n const SCREEN_WIDTH = Math.min(window.innerWidth, window.screen.width);\n if (panelRect.right > SCREEN_WIDTH) {\n const newLeft = Math.max(MARGIN, x + MARGIN - panelRect.width);\n const newCaretOffset = left - newLeft;\n panel.style.left = `${newLeft}px`;\n /** @type {HTMLElement | null} */\n const caret = panel.querySelector(".caret");\n if (caret) caret.style.left = `${newCaretOffset}px`;\n }\n\n // As it\'s a dialog, we trap focus.\n // TODO: when <dialog> becomes a implemented, we should really\n // use that.\n trapFocus(panel, dfn);\n}\n\n/**\n * @param {HTMLElement} panel\n * @param {HTMLElement} dfn\n * @returns\n */\nfunction trapFocus(panel, dfn) {\n /** @type NodeListOf<HTMLAnchorElement> elements */\n const anchors = panel.querySelectorAll("a[href]");\n // No need to trap focus\n if (!anchors.length) return;\n\n // Move focus to first anchor element\n const first = anchors.item(0);\n first.focus();\n\n const trapListener = createTrapListener(anchors, panel, dfn);\n panel.addEventListener("keydown", trapListener);\n\n // Hiding the panel releases the trap\n const mo = new MutationObserver(records => {\n const [record] = records;\n const target = /** @type HTMLElement */ (record.target);\n if (target.hidden) {\n panel.removeEventListener("keydown", trapListener);\n mo.disconnect();\n }\n });\n mo.observe(panel, { attributes: true, attributeFilter: ["hidden"] });\n}\n\n/**\n *\n * @param {NodeListOf<HTMLAnchorElement>} anchors\n * @param {HTMLElement} panel\n * @param {HTMLElement} dfn\n * @returns\n */\nfunction createTrapListener(anchors, panel, dfn) {\n const lastIndex = anchors.length - 1;\n let currentIndex = 0;\n /**\n * @param {KeyboardEvent} event\n */\n return event => {\n switch (event.key) {\n // Hitting "Tab" traps us in a nice loop around elements.\n case "Tab": {\n event.preventDefault();\n currentIndex += event.shiftKey ? -1 : +1;\n if (currentIndex < 0) {\n currentIndex = lastIndex;\n } else if (currentIndex > lastIndex) {\n currentIndex = 0;\n }\n anchors.item(currentIndex).focus();\n break;\n }\n\n // Hitting "Enter" on an anchor releases the trap.\n case "Enter":\n hidePanel(panel);\n break;\n\n // Hitting "Escape" returns focus to dfn.\n case "Escape":\n hidePanel(panel);\n dfn.focus();\n return;\n }\n };\n}\n\n/** @param {HTMLElement | null} panel */\nfunction hidePanel(panel) {\n if (!panel) return;\n panel.hidden = true;\n panel.classList.remove("docked");\n}\n})()'})}();
1502
+ Pro úplné potlačení tohoto varování nastavte \`lint: { \"${Ph}\": false }\` ve vaší \`respecConfig\`.`}}});var Dh=Object.freeze({__proto__:null,name:Nh,run:function(e){if(!e.lint?.[Ph])return;const t="error"===e.lint[Ph]?cs:ls;Kl.forEach((({term:e,spec:n,element:r})=>{r.classList.contains("lint-ignore")||t(Ih.msg(e,n),Nh,{title:"Normative reference to non-normative term.",elements:[r],hint:Ih.hint})}))}}),Oh=Object.freeze({__proto__:null,default:'(() => {\n// @ts-check\n\nif (document.respec) {\n document.respec.ready.then(setupVarHighlighter);\n} else {\n setupVarHighlighter();\n}\n\nfunction setupVarHighlighter() {\n document\n .querySelectorAll("var")\n .forEach(varElem => varElem.addEventListener("click", highlightListener));\n}\n\n/**\n * @param {MouseEvent} ev\n */\nfunction highlightListener(ev) {\n ev.stopPropagation();\n const varElem = /** @type {HTMLElement} */ (ev.target);\n const hightligtedElems = highlightVars(varElem);\n const resetListener = () => {\n const hlColor = getHighlightColor(varElem);\n hightligtedElems.forEach(el => removeHighlight(el, hlColor));\n [...HL_COLORS.keys()].forEach(key => HL_COLORS.set(key, true));\n };\n if (hightligtedElems.length) {\n document.body.addEventListener("click", resetListener, { once: true });\n }\n}\n\n// availability of highlight colors. colors from var.css\nconst HL_COLORS = new Map([\n ["respec-hl-c1", true],\n ["respec-hl-c2", true],\n ["respec-hl-c3", true],\n ["respec-hl-c4", true],\n ["respec-hl-c5", true],\n ["respec-hl-c6", true],\n ["respec-hl-c7", true],\n]);\n\n/**\n * @param {HTMLElement} target\n */\nfunction getHighlightColor(target) {\n // return current colors if applicable\n const { value } = target.classList;\n const re = /respec-hl-\\w+/;\n const activeClass = re.test(value) && value.match(re);\n if (activeClass) return activeClass[0];\n\n // first color preference\n if (HL_COLORS.get("respec-hl-c1") === true) return "respec-hl-c1";\n\n // otherwise get some other available color\n return [...HL_COLORS.keys()].find(c => HL_COLORS.get(c)) || "respec-hl-c1";\n}\n\n/**\n * @param {HTMLElement} varElem\n */\nfunction highlightVars(varElem) {\n const textContent = norm(varElem.textContent);\n const parent = /** @type {HTMLElement} */ (\n varElem.closest(".algorithm, section")\n );\n if (!parent) return [];\n const highlightColor = getHighlightColor(varElem);\n\n const varsToHighlight = [...parent.querySelectorAll("var")].filter(\n el =>\n norm(el.textContent) === textContent &&\n el.closest(".algorithm, section") === parent\n );\n\n // update availability of highlight color\n const colorStatus = varsToHighlight[0].classList.contains("respec-hl");\n HL_COLORS.set(highlightColor, colorStatus);\n\n // highlight vars\n if (colorStatus) {\n varsToHighlight.forEach(el => removeHighlight(el, highlightColor));\n return [];\n } else {\n varsToHighlight.forEach(el => addHighlight(el, highlightColor));\n }\n return varsToHighlight;\n}\n\n/**\n * @param {HTMLElement} el\n * @param {string} highlightColor\n */\nfunction removeHighlight(el, highlightColor) {\n el.classList.remove("respec-hl", highlightColor);\n // clean up empty class attributes so they don\'t come in export\n if (!el.classList.length) el.removeAttribute("class");\n}\n\n/**\n * @param {HTMLElement} elem\n * @param {string} highlightColor\n */\nfunction addHighlight(elem, highlightColor) {\n elem.classList.add("respec-hl", highlightColor);\n}\n\n/**\n * Same as `norm` from src/core/utils, but our build process doesn\'t allow\n * imports in runtime scripts, so duplicated here.\n * @param {string} str\n */\nfunction norm(str) {\n return str.trim().replace(/\\s+/g, " ");\n}\n})()'}),jh=Object.freeze({__proto__:null,default:'(() => {\n// @ts-check\nif (document.respec) {\n document.respec.ready.then(setupPanel);\n} else {\n setupPanel();\n}\n\nfunction setupPanel() {\n const listener = panelListener();\n document.body.addEventListener("keydown", listener);\n document.body.addEventListener("click", listener);\n}\n\nfunction panelListener() {\n /** @type {HTMLElement | null} */\n let panel = null;\n /**\n * @param {KeyboardEvent|MouseEvent} event\n */\n return event => {\n const { target, type } = event;\n\n if (!(target instanceof HTMLElement)) return;\n\n // For keys, we only care about Enter key to activate the panel\n // otherwise it\'s activated via a click.\n if (\n type === "keydown" &&\n /** @type {KeyboardEvent} */ (event).key !== "Enter"\n )\n return;\n\n const action = deriveAction(event);\n\n switch (action) {\n case "show": {\n hidePanel(panel);\n /** @type {HTMLElement | null} */\n const dfn = target.closest("dfn, .index-term");\n if (!dfn?.id) break;\n panel = document.getElementById(`dfn-panel-for-${dfn.id}`);\n if (!panel) break;\n const coords = deriveCoordinates(\n /** @type {MouseEvent|KeyboardEvent} */ (event)\n );\n displayPanel(dfn, panel, coords);\n break;\n }\n case "dock": {\n if (panel) {\n panel.style.left = "";\n panel.style.top = "";\n panel.classList.add("docked");\n }\n break;\n }\n case "hide": {\n hidePanel(panel);\n panel = null;\n break;\n }\n }\n };\n}\n\n/**\n * @param {MouseEvent|KeyboardEvent} event\n */\nfunction deriveCoordinates(event) {\n const target = /** @type HTMLElement */ (event.target);\n\n // We prevent synthetic AT clicks from putting\n // the dialog in a weird place. The AT events sometimes\n // lack coordinates, so they have clientX/Y = 0\n const rect = target.getBoundingClientRect();\n if (\n event instanceof MouseEvent &&\n event.clientX >= rect.left &&\n event.clientY >= rect.top\n ) {\n // The event probably happened inside the bounding rect...\n return { x: event.clientX, y: event.clientY };\n }\n\n // Offset to the middle of the element\n const x = rect.x + rect.width / 2;\n // Placed at the bottom of the element\n const y = rect.y + rect.height;\n return { x, y };\n}\n\n/**\n * @param {Event} event\n */\nfunction deriveAction(event) {\n const target = /** @type {HTMLElement} */ (event.target);\n const hitALink = !!target.closest("a");\n if (target.closest("dfn:not([data-cite]), .index-term")) {\n return hitALink ? "none" : "show";\n }\n if (target.closest(".dfn-panel")) {\n if (hitALink) {\n return target.classList.contains("self-link") ? "hide" : "dock";\n }\n\n const panel = /** @type {HTMLElement} */ (target.closest(".dfn-panel"));\n return panel.classList.contains("docked") ? "hide" : "none";\n }\n if (document.querySelector(".dfn-panel:not([hidden])")) {\n return "hide";\n }\n return "none";\n}\n\n/**\n * @param {HTMLElement} dfn\n * @param {HTMLElement} panel\n * @param {{ x: number, y: number }} clickPosition\n */\nfunction displayPanel(dfn, panel, { x, y }) {\n panel.hidden = false;\n // distance (px) between edge of panel and the pointing triangle (caret)\n const MARGIN = 20;\n\n const dfnRects = dfn.getClientRects();\n // Find the `top` offset when the `dfn` can be spread across multiple lines\n let closestTop = 0;\n let minDiff = Infinity;\n for (const rect of dfnRects) {\n const { top, bottom } = rect;\n const diffFromClickY = Math.abs((top + bottom) / 2 - y);\n if (diffFromClickY < minDiff) {\n minDiff = diffFromClickY;\n closestTop = top;\n }\n }\n\n const top = window.scrollY + closestTop + dfnRects[0].height;\n const left = x - MARGIN;\n panel.style.left = `${left}px`;\n panel.style.top = `${top}px`;\n\n // Find if the panel is flowing out of the window\n const panelRect = panel.getBoundingClientRect();\n const SCREEN_WIDTH = Math.min(window.innerWidth, window.screen.width);\n if (panelRect.right > SCREEN_WIDTH) {\n const newLeft = Math.max(MARGIN, x + MARGIN - panelRect.width);\n const newCaretOffset = left - newLeft;\n panel.style.left = `${newLeft}px`;\n /** @type {HTMLElement | null} */\n const caret = panel.querySelector(".caret");\n if (caret) caret.style.left = `${newCaretOffset}px`;\n }\n\n // As it\'s a dialog, we trap focus.\n // TODO: when <dialog> becomes a implemented, we should really\n // use that.\n trapFocus(panel, dfn);\n}\n\n/**\n * @param {HTMLElement} panel\n * @param {HTMLElement} dfn\n * @returns\n */\nfunction trapFocus(panel, dfn) {\n /** @type NodeListOf<HTMLAnchorElement> elements */\n const anchors = panel.querySelectorAll("a[href]");\n // No need to trap focus\n if (!anchors.length) return;\n\n // Move focus to first anchor element\n const first = anchors.item(0);\n first.focus();\n\n const trapListener = createTrapListener(anchors, panel, dfn);\n panel.addEventListener("keydown", trapListener);\n\n // Hiding the panel releases the trap\n const mo = new MutationObserver(records => {\n const [record] = records;\n const target = /** @type HTMLElement */ (record.target);\n if (target.hidden) {\n panel.removeEventListener("keydown", trapListener);\n mo.disconnect();\n }\n });\n mo.observe(panel, { attributes: true, attributeFilter: ["hidden"] });\n}\n\n/**\n *\n * @param {NodeListOf<HTMLAnchorElement>} anchors\n * @param {HTMLElement} panel\n * @param {HTMLElement} dfn\n * @returns\n */\nfunction createTrapListener(anchors, panel, dfn) {\n const lastIndex = anchors.length - 1;\n let currentIndex = 0;\n /**\n * @param {KeyboardEvent} event\n */\n return event => {\n switch (event.key) {\n // Hitting "Tab" traps us in a nice loop around elements.\n case "Tab": {\n event.preventDefault();\n currentIndex += event.shiftKey ? -1 : +1;\n if (currentIndex < 0) {\n currentIndex = lastIndex;\n } else if (currentIndex > lastIndex) {\n currentIndex = 0;\n }\n anchors.item(currentIndex).focus();\n break;\n }\n\n // Hitting "Enter" on an anchor releases the trap.\n case "Enter":\n hidePanel(panel);\n break;\n\n // Hitting "Escape" returns focus to dfn.\n case "Escape":\n hidePanel(panel);\n dfn.focus();\n return;\n }\n };\n}\n\n/** @param {HTMLElement | null} panel */\nfunction hidePanel(panel) {\n if (!panel) return;\n panel.hidden = true;\n panel.classList.remove("docked");\n}\n})()'})}();
1504
1503
  //# sourceMappingURL=respec-w3c.js.map