From c62ceb76c7a5df77b0364a9aa8f77160aaf24d0f Mon Sep 17 00:00:00 2001
From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com>
Date: Thu, 5 Mar 2026 12:18:30 +0000
Subject: [PATCH 1/3] Initial plan
From 150b2c9ed1e3fce85d9a16c545e78c32e5785180 Mon Sep 17 00:00:00 2001
From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com>
Date: Thu, 5 Mar 2026 12:46:41 +0000
Subject: [PATCH 2/3] Initial plan for fixing marked v16 test failures
Co-authored-by: marcoscaceres <870154+marcoscaceres@users.noreply.github.com>
---
builds/respec-w3c.js | 724 +++++++++++++++++++--------------------
builds/respec-w3c.js.map | 2 +-
2 files changed, 363 insertions(+), 363 deletions(-)
diff --git a/builds/respec-w3c.js b/builds/respec-w3c.js
index 1d3678c46e..267b83048e 100644
--- a/builds/respec-w3c.js
+++ b/builds/respec-w3c.js
@@ -1,6 +1,6 @@
-window.respecVersion="35.8.0",function(){"use strict";var e="undefined"!=typeof document?document.currentScript:null;const t=!!window.require;if(!t){const e=function(e,t){const n=e.map((e=>{if(!(e in window.require.modules))throw new Error(`Unsupported dependency name: ${e}`);return window.require.modules[e]}));Promise.all(n).then((e=>t(...e)))};e.modules={},window.require=e}function n(e,n){t||(window.require.modules[e]=n)}const r=document.documentElement;r?.hasAttribute("lang")||(r.lang="en",r.hasAttribute("dir")||(r.dir="ltr"));const o={},s=r?.lang??"en";var i=Object.freeze({__proto__:null,l10n:o,lang:s,name:"core/l10n",run:function(e){e.l10n=o[s]||o.en}});const a=(e,t)=>t.some((t=>e instanceof t));let c,l;const u=new WeakMap,d=new WeakMap,p=new WeakMap;let f={get(e,t,n){if(e instanceof IDBTransaction){if("done"===t)return u.get(e);if("store"===t)return n.objectStoreNames[1]?void 0:n.objectStore(n.objectStoreNames[0])}return b(e[t])},set:(e,t,n)=>(e[t]=n,!0),has:(e,t)=>e instanceof IDBTransaction&&("done"===t||"store"===t)||t in e};function h(e){f=e(f)}function m(e){return(l||(l=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])).includes(e)?function(...t){return e.apply(y(this),t),b(this.request)}:function(...t){return b(e.apply(y(this),t))}}function g(e){return"function"==typeof e?m(e):(e instanceof IDBTransaction&&function(e){if(u.has(e))return;const t=new Promise(((t,n)=>{const r=()=>{e.removeEventListener("complete",o),e.removeEventListener("error",s),e.removeEventListener("abort",s)},o=()=>{t(),r()},s=()=>{n(e.error||new DOMException("AbortError","AbortError")),r()};e.addEventListener("complete",o),e.addEventListener("error",s),e.addEventListener("abort",s)}));u.set(e,t)}(e),a(e,c||(c=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction]))?new Proxy(e,f):e)}function b(e){if(e instanceof IDBRequest)return function(e){const t=new Promise(((t,n)=>{const r=()=>{e.removeEventListener("success",o),e.removeEventListener("error",s)},o=()=>{t(b(e.result)),r()},s=()=>{n(e.error),r()};e.addEventListener("success",o),e.addEventListener("error",s)}));return p.set(t,e),t}(e);if(d.has(e))return d.get(e);const t=g(e);return t!==e&&(d.set(e,t),p.set(t,e)),t}const y=e=>p.get(e);const w=["get","getKey","getAll","getAllKeys","count"],v=["put","add","delete","clear"],k=new Map;function $(e,t){if(!(e instanceof IDBDatabase)||t in e||"string"!=typeof t)return;if(k.get(t))return k.get(t);const n=t.replace(/FromIndex$/,""),r=t!==n,o=v.includes(n);if(!(n in(r?IDBIndex:IDBObjectStore).prototype)||!o&&!w.includes(n))return;const s=async function(e,...t){const s=this.transaction(e,o?"readwrite":"readonly");let i=s.store;return r&&(i=i.index(t.shift())),(await Promise.all([i[n](...t),o&&s.done]))[0]};return k.set(t,s),s}h((e=>({...e,get:(t,n,r)=>$(t,n)||e.get(t,n,r),has:(t,n)=>!!$(t,n)||e.has(t,n)})));const x=["continue","continuePrimaryKey","advance"],_={},C=new WeakMap,S=new WeakMap,R={get(e,t){if(!x.includes(t))return e[t];let n=_[t];return n||(n=_[t]=function(...e){C.set(this,S.get(this)[t](...e))}),n}};async function*E(...e){let t=this;if(t instanceof IDBCursor||(t=await t.openCursor(...e)),!t)return;const n=new Proxy(t,R);for(S.set(n,t),p.set(n,y(t));t;)yield n,t=await(C.get(n)||t.continue()),C.delete(n)}function A(e,t){return t===Symbol.asyncIterator&&a(e,[IDBIndex,IDBObjectStore,IDBCursor])||"iterate"===t&&a(e,[IDBIndex,IDBObjectStore])}h((e=>({...e,get:(t,n,r)=>A(t,n)?E:e.get(t,n,r),has:(t,n)=>A(t,n)||e.has(t,n)})));var L=Object.freeze({__proto__:null,deleteDB:function(e,{blocked:t}={}){const n=indexedDB.deleteDatabase(e);return t&&n.addEventListener("blocked",(e=>t(e.oldVersion,e))),b(n).then((()=>{}))},openDB:function(e,t,{blocked:n,upgrade:r,blocking:o,terminated:s}={}){const i=indexedDB.open(e,t),a=b(i);return r&&i.addEventListener("upgradeneeded",(e=>{r(b(i.result),e.oldVersion,e.newVersion,b(i.transaction),e)})),n&&i.addEventListener("blocked",(e=>n(e.oldVersion,e.newVersion,e))),a.then((e=>{s&&e.addEventListener("close",(()=>s())),o&&e.addEventListener("versionchange",(e=>o(e.oldVersion,e.newVersion,e)))})).catch((()=>{})),a},unwrap:y,wrap:b});function T(e,t,n,r,o,{level:s="error",autofix:i,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 o=n.map((e=>e.trivia+e.value)).join(""),s=e[t];return"eof"===s.type?o:r?o+s.trivia:o.slice(s.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),f=l(p),h=d+f.split("\n")[0]+"\n"+(" ".repeat(d.length)+"^"),m="Syntax"===o?"since":"inside",g=`${o} 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${h}`;return{message:`${g} ${r}`,bareMessage:r,context:g,line:u,sourceName:e.name,level:s,ruleName:a,autofix:i,input:f,tokens:p}}function P(e,t,n,r){return T(e,t,n,r,"Syntax")}function I(e,t,n,r,o={}){return o.ruleName=n,T(t.source,e.index,t,r,"Validation",o)}class D{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 o=N(r.idlType,t);if(t.cache.typedefIncludesDictionary.set(r,o),o)return{reference:e,dictionary:o.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 j(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?j(r,t)&&(n=!0):n=!0}return t.cache.dictionaryIncludesRequiredField.set(e,n),n}class O extends Array{constructor({source:e,tokens:t}){super(),Object.defineProperties(this,{source:{value:e},tokens:{value:t},parent:{value:null,writable:!0}})}}class z extends D{static parser(e,t){return()=>{const n=e.consumeKind(t);if(n)return new z({source:e.source,tokens:{value:n}})}}get value(){return ne(this.tokens.value.value)}write(e){return e.ts.wrap([e.token(this.tokens.value),e.token(this.tokens.separator)])}}class q extends z{static parse(e){const t=e.consumeKind("eof");if(t)return new q({source:e.source,tokens:{value:t}})}get type(){return"eof"}}function M(e,t){return re(e,{parser:z.parser(e,t),listName:t+" list"})}const U=["identifier","decimal","integer","string"],W=new Map([...["NoInterfaceObject","LenientSetter","LenientThis","TreatNonObjectAsNull","Unforgeable"].map((e=>[e,`Legacy${e}`])),["NamedConstructor","LegacyFactoryFunction"],["OverrideBuiltins","LegacyOverrideBuiltIns"],["TreatNullAs","LegacyNullToEmptyString"]]);function F(e){for(const t of U){const n=M(e,t);if(n.length)return n}e.error("Expected identifiers, strings, decimals, or integers but none found")}class B extends D{static parse(e){const t={assign:e.consume("=")},n=he(new B({source:e.source,tokens:t}));if(n.list=[],t.assign){if(t.asterisk=e.consume("*"),t.asterisk)return n.this;t.secondaryName=e.consumeKind(...U)}return t.open=e.consume("("),t.open?(n.list=n.rhsIsList?F(e):ae(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 H extends D{static parse(e){const t=e.consumeKind("identifier");if(t)return new H({source:e.source,tokens:{name:t},params:B.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?ne(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 I(this.tokens.name,this,"no-nointerfaceobject",e,{level:"warning"})}else if(W.has(t)){const e=`\`[${t}]\` extended attribute is a legacy feature that is now renamed to \`[${W.get(t)}]\`. Refer to the [relevant upstream PR](https://github.com/whatwg/webidl/pull/870) for more information.`;yield I(this.tokens.name,this,"renamed-legacy",e,{level:"warning",autofix:(n=this,()=>{const{name:e}=n;n.tokens.name.value=W.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 V extends O{static parse(e){const t={};t.open=e.consume("[");const n=new V({source:e.source,tokens:t});return t.open?(n.push(...re(e,{parser:H.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 G(e,t){const n=e.consume("?");n&&(t.tokens.nullable=n),e.probe("?")&&e.error("Can't nullable more than once")}function Y(e,t){let n=function(e,t){const n=e.consume("FrozenArray","ObservableArray","Promise","async_sequence","sequence","record");if(!n)return;const r=he(new K({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=le(e,t)||e.error("Missing Promise subtype");r.subtype.push(n);break}case"async_sequence":case"sequence":case"FrozenArray":case"ObservableArray":{const o=ce(e,t)||e.error(`Missing ${n.value} subtype`);r.subtype.push(o);break}case"record":{e.probe("[")&&e.error("Record key cannot have extended attribute");const n=e.consume(...be)||e.error(`Record key must be one of: ${be.join(", ")}`),o=new K({source:e.source,tokens:{base:n}});o.tokens.separator=e.consume(",")||e.error("Missing comma after record key type"),o.type=t;const s=ce(e,t)||e.error("Error parsing generic type record");r.subtype.push(o,s);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)||ie(e);if(!n){const t=e.consumeKind("identifier")||e.consume(...be,...ge);if(!t)return;n=new K({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,G(e,n),n.nullable&&"any"===n.idlType&&e.error("Type `any` cannot be made nullable"),n}class K extends D{static parse(e,t){return Y(e,t)||function(e,t){const n={};if(n.open=e.consume("("),!n.open)return;const r=he(new K({source:e.source,tokens:n}));for(r.type=t||null;;){const n=ce(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 o=e.consume("or");if(!o)break;n.tokens.separator=o}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"),G(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 V({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 ne([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 I(this.tokens.base,this,"migrate-allowshared",n,{autofix:Z(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 I(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 I(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 Z(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 J extends D{static parse(e){const t=e.consume("=");if(!t)return null;const n=oe(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 J({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 se(this.expression[0]).type}get value(){return se(this.expression[0]).value}get negative(){return se(this.expression[0]).negative}write(e){return e.ts.wrap([e.token(this.tokens.assign),...this.expression.map((t=>e.token(t)))])}}class Q extends D{static parse(e){const t=e.position,n={},r=he(new Q({source:e.source,tokens:n}));return r.extAttrs=V.parse(e),n.optional=e.consume("optional"),r.idlType=ce(e,"argument-type"),r.idlType?(n.optional||(n.variadic=e.consume("...")),n.name=e.consumeKind("identifier")||e.consume(...ye),n.name?(r.default=n.optional?J.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 ne(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 I(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 I(this.tokens.name,this,"dict-arg-default",e,{autofix:X(this)})}}else if(this.parent&&!j(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 I(this.tokens.name,this,"dict-arg-optional",e,{autofix:(n=this,()=>{const e=fe(n.idlType);n.tokens.optional={...e,type:"optional",value:"optional"},e.trivia=" ",X(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 X(e){return()=>{e.default=J.parse(new $e(" = {}"))}}class ee extends D{static parse(e,{special:t,regular:n}={}){const r={special:t},o=he(new ee({source:e.source,tokens:r}));return t&&"stringifier"===t.value&&(r.termination=e.consume(";"),r.termination)?(o.arguments=[],o):(t||n||(r.special=e.consume("getter","setter","deleter")),o.idlType=le(e)||e.error("Missing return type"),r.name=e.consumeKind("identifier")||e.consume("includes"),r.open=e.consume("(")||e.error("Invalid operation"),o.arguments=ae(e),r.close=e.consume(")")||e.error("Unterminated operation"),r.termination=e.consume(";")||e.error("Unterminated operation, expected `;`"),o.this)}get type(){return"operation"}get name(){const{name:e}=this.tokens;return e?ne(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 I(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 I(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 te extends D{static parse(e,{special:t,noInherit:n=!1,readonly:r=!1}={}){const o=e.position,s={special:t},i=he(new te({source:e.source,tokens:s}));if(t||n||(s.special=e.consume("inherit")),"inherit"===i.special&&e.probe("readonly")&&e.error("Inherited attributes cannot be read-only"),s.readonly=e.consume("readonly"),r&&!s.readonly&&e.probe("attribute")&&e.error("Attributes must be readonly in this context"),s.base=e.consume("attribute"),s.base)return i.idlType=ce(e,"attribute-type")||e.error("Attribute lacks a type"),s.name=e.consumeKind("identifier")||e.consume("async","required")||e.error("Attribute lacks a name"),s.termination=e.consume(";")||e.error("Unterminated attribute, expected `;`"),i.this;e.unconsume(o)}get type(){return"attribute"}get special(){return this.tokens.special?this.tokens.special.value:""}get readonly(){return!!this.tokens.readonly}get name(){return ne(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 I(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 I(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 I(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 ne(e){return e.startsWith("_")?e.slice(1):e}function re(e,{parser:t,allowDangler:n,listName:r="list"}){const o=t(e);if(!o)return[];o.tokens.separator=e.consume(",");const s=[o];for(;o.tokens.separator;){const o=t(e);if(!o){n||e.error(`Trailing comma in ${r}`);break}if(o.tokens.separator=e.consume(","),s.push(o),!o.tokens.separator)break}return s}function oe(e){return e.consumeKind("decimal","integer")||e.consume("true","false","Infinity","-Infinity","NaN")}function se({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 ie(e){const{source:t}=e,n=function(){const n=e.consume("unsigned"),r=e.consume("short","long");if(r){const o=e.consume("long");return new K({source:t,tokens:{prefix:n,base:r,postfix:o}})}n&&e.error("Failed to parse integer type")}()||function(){const n=e.consume("unrestricted"),r=e.consume("float","double");if(r)return new K({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 K({source:t,tokens:{base:r}}):void 0}function ae(e){return re(e,{parser:Q.parse,listName:"arguments list"})}function ce(e,t){const n=V.parse(e),r=K.parse(e,t);return r&&(he(r).extAttrs=n),r}function le(e,t){const n=K.parse(e,t||"return-type");if(n)return n;const r=e.consume("void");if(r){const t=new K({source:e.source,tokens:{base:r}});return t.type="return-type",t}}function ue(e){const t=e.consume("stringifier");if(!t)return;return te.parse(e,{special:t})||ee.parse(e,{special:t})||e.error("Unterminated stringifier")}function de(e){const t=e.split("\n");if(t.length){const e=t[t.length-1].match(/^\s+/);if(e)return e[0]}return""}function pe(e){return()=>{if(e.extAttrs.length){const t=new $e("Exposed=Window,"),n=H.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{he(e).extAttrs=V.parse(new $e("[Exposed=Window]"));const t=e.tokens.base.trivia;e.extAttrs.tokens.open.trivia=t,e.tokens.base.trivia=`\n${de(t)}`}}}function fe(e){if(e.extAttrs.length)return e.extAttrs.tokens.open;if("operation"===e.type&&!e.special)return fe(e.idlType);return Object.values(e.tokens).sort(((e,t)=>e.index-t.index))[0]}function he(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?he(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 me={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},ge=["ArrayBuffer","SharedArrayBuffer","DataView","Int8Array","Int16Array","Int32Array","Uint8Array","Uint16Array","Uint32Array","Uint8ClampedArray","BigInt64Array","BigUint64Array","Float16Array","Float32Array","Float64Array","any","object","symbol"],be=["ByteString","DOMString","USVString"],ye=["async","attribute","callback","const","constructor","deleter","dictionary","enum","getter","includes","inherit","interface","iterable","maplike","namespace","partial","required","setlike","setter","static","stringifier","typedef","unrestricted"],we=["-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(ye,be,ge),ve=["(",")",",","...",":",";","<","=",">","?","*","[","]","{","}"],ke=["_constructor","toString","_toString"];class $e{constructor(e){this.source=function(e){const t=[];let n=0,r="",o=1,s=0;for(;nthis.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 xe extends Error{constructor({message:e,bareMessage:t,context:n,line:r,sourceName:o,input:s,tokens:i}){super(e),this.name="WebIDLParseError",this.bareMessage=t,this.context=n,this.line=r,this.sourceName=o,this.input=s,this.tokens=i}}class _e extends z{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 Ce extends D{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=he(new Ce({source:e.source,tokens:t}));return e.current=n.this,t.open=e.consume("{")||e.error("Bodyless enum"),n.values=re(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 ne(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 Se extends D{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 Se({source:e.source,tokens:n});e.unconsume(t.index)}get type(){return"includes"}get target(){return ne(this.tokens.target.value)}get includes(){return ne(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 Re extends D{static parse(e){const t={},n=he(new Re({source:e.source,tokens:t}));if(t.base=e.consume("typedef"),t.base)return n.idlType=ce(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 ne(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 Ee extends D{static parse(e,t){const n={base:t},r=he(new Ee({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=le(e)||e.error("Callback lacks a return type"),n.open=e.consume("(")||e.error("Callback lacks parentheses for arguments"),r.arguments=ae(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 ne(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 I(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 Ae extends D{static parse(e,t,{inheritable:n,allowedMembers:r}){const{tokens:o,type:s}=t;for(o.name=e.consumeKind("identifier")||e.error(`Missing name in ${s}`),e.current=t,t=he(t),n&&Object.assign(o,function(e){const t=e.consume(":");return t?{colon:t,inheritance:e.consumeKind("identifier")||e.error("Inheritance lacks a type")}:{}}(e)),o.open=e.consume("{")||e.error(`Bodyless ${s}`),t.members=[];;){if(o.close=e.consume("}"),o.close)return o.termination=e.consume(";")||e.error(`Missing semicolon after ${s}`),t.this;const n=V.parse(e);let i;for(const[t,...n]of r)if(i=he(t(e,...n)),i)break;i||e.error("Unknown member"),i.extAttrs=n,t.members.push(i.this)}}get partial(){return!!this.tokens.partial}get name(){return ne(this.tokens.name.value)}get inheritance(){return this.tokens.inheritance?ne(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 Le extends D{static parse(e){const t={};if(t.base=e.consume("const"),!t.base)return;let n=ie(e);if(!n){const t=e.consumeKind("identifier")||e.error("Const lacks a type");n=new K({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=oe(e)||e.error("Const lacks a value"),t.termination=e.consume(";")||e.error("Unterminated const, expected `;`");const r=new Le({source:e.source,tokens:t});return he(r).idlType=n,r}get type(){return"const"}get name(){return ne(this.tokens.name.value)}get value(){return se(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 Te extends D{static parse(e){const t=e.position,n=he(new Te({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:o}=n,s="maplike"===o,i=s||"iterable"===o||"async_iterable"===o,a="async_iterable"===o||n.async&&"iterable"===o;r.open=e.consume("<")||e.error(`Missing less-than sign \`<\` in ${o} declaration`);const c=ce(e)||e.error(`Missing a type argument in ${o} declaration`);return n.idlType=[c],n.arguments=[],i&&(c.tokens.separator=e.consume(","),c.tokens.separator?n.idlType.push(ce(e)):s&&e.error(`Missing second type argument in ${o} declaration`)),r.close=e.consume(">")||e.error(`Missing greater-than sign \`>\` in ${o} declaration`),e.probe("(")&&(a?(r.argsOpen=e.consume("("),n.arguments.push(...ae(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 ${o} 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 I(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 Pe extends D{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=ae(e);n.close=e.consume(")")||e.error("Unterminated constructor"),n.termination=e.consume(";")||e.error("No semicolon after constructor");const o=new Pe({source:e.source,tokens:n});return he(o).arguments=r,o}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 Ie(e){const t=e.consume("static");if(!t)return;return te.parse(e,{special:t})||ee.parse(e,{special:t})||e.error("No body in static member")}class De extends Ae{static parse(e,t,{extMembers:n=[],partial:r=null}={}){const o={partial:r,base:t};return Ae.parse(e,new De({source:e.source,tokens:o}),{inheritable:!r,allowedMembers:[...n,[Le.parse],[Pe.parse],[Ie],[ue],[Te.parse],[te.parse],[ee.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 I(this.tokens.name,this,"require-exposed",e,{autofix:pe(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 I(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 I(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 I(e.tokens.base,this,"no-constructible-global",t)}}yield*super.validate(e),this.partial||(yield*function*(e,t){const n=function(e){const t=i(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)||[],o=e.mixinMap.get(t.name)||[];for(const e of[...r,...o]){const r=i(e),o=r.filter((e=>"static"===e.special)),a=r.filter((e=>"static"!==e.special));yield*s(o,n.statics,e,t),yield*s(a,n.nonstatics,e,t),o.forEach((e=>n.statics.add(e.name))),a.forEach((e=>n.nonstatics.add(e.name)))}function*s(e,t,n,r){for(const o of e){const{name:e}=o;if(e&&t.has(e)){const t=`The ${"static"===o.special?"static ":""}operation "${e}" has already been defined for the base interface "${r.name}" either in itself or in a mixin`;yield I(o.tokens.name,n,"no-cross-overload",t)}}}function i(e){return e.members.filter((({type:e})=>"operation"===e))}}(e,this))}}function Ne(e,t){return e=he(e),()=>{const n=de(e.extAttrs.tokens.open.trivia),r=e.members.length?de(fe(e.members[0]).trivia):function(e){const t=de(e),n=t.includes("\t")?"\t":" ";return t+n}(n),o=Pe.parse(new $e(`\n${r}constructor();`));o.extAttrs=new V({source:e.source,tokens:{}}),he(o).arguments=t.arguments;const s=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(s+1,0,o);const{close:i}=e.tokens;i.trivia.includes("\n")||(i.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 je extends Ae{static parse(e,t,{extMembers:n=[],partial:r}={}){const o={partial:r,base:t};if(o.mixin=e.consume("mixin"),o.mixin)return Ae.parse(e,new je({source:e.source,tokens:o}),{allowedMembers:[...n,[Le.parse],[ue],[te.parse,{noInherit:!0}],[ee.parse,{regular:!0}]]})}get type(){return"interface mixin"}}class Oe extends D{static parse(e){const t={},n=he(new Oe({source:e.source,tokens:t}));return n.extAttrs=V.parse(e),t.required=e.consume("required"),n.idlType=ce(e,"dictionary-type")||e.error("Dictionary member lacks a type"),t.name=e.consumeKind("identifier")||e.error("Dictionary member lacks a name"),n.default=J.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 ne(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 ze extends Ae{static parse(e,{extMembers:t=[],partial:n}={}){const r={partial:n};if(r.base=e.consume("dictionary"),r.base)return Ae.parse(e,new ze({source:e.source,tokens:r}),{inheritable:!n,allowedMembers:[...t,[Oe.parse]]})}get type(){return"dictionary"}}class qe extends Ae{static parse(e,{extMembers:t=[],partial:n}={}){const r={partial:n};if(r.base=e.consume("namespace"),r.base)return Ae.parse(e,new qe({source:e.source,tokens:r}),{allowedMembers:[...t,[te.parse,{noInherit:!0,readonly:!0}],[Le.parse],[ee.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 I(this.tokens.name,this,"require-exposed",e,{autofix:pe(this)})}yield*super.validate(e)}}class Me extends Ae{static parse(e,t,{extMembers:n=[]}={}){const r={callback:t};if(r.base=e.consume("interface"),r.base)return Ae.parse(e,new Me({source:e.source,tokens:r}),{allowedMembers:[...n,[Le.parse],[ee.parse,{regular:!0}]]})}get type(){return"callback interface"}}function Ue(e,t){const n=e.source;function r(t){e.error(t)}function o(...t){return e.consume(...t)}function s(n){const s=o("interface");if(s)return je.parse(e,s,{...n,...t?.extensions?.mixin})||De.parse(e,s,{...n,...t?.extensions?.interface})||r("Interface has no proper body")}function i(){if(t.productions)for(const n of t.productions){const t=n(e);if(t)return t}return function(){const n=o("callback");if(n)return e.probe("interface")?Me.parse(e,n,{...t?.extensions?.callbackInterface}):Ee.parse(e,n)}()||s()||function(){const n=o("partial");if(n)return ze.parse(e,{partial:n,...t?.extensions?.dictionary})||s({partial:n})||qe.parse(e,{partial:n,...t?.extensions?.namespace})||r("Partial doesn't apply to anything")}()||ze.parse(e,t?.extensions?.dictionary)||Ce.parse(e)||Re.parse(e)||Se.parse(e)||qe.parse(e,t?.extensions?.namespace)}const a=function(){if(!n.length)return[];const o=[];for(;;){const t=V.parse(e),n=i();if(!n){t.length&&r("Stray extended attributes");break}he(n).extAttrs=t,o.push(n)}const s=q.parse(e);return t.concrete&&o.push(s),o}();return e.positione.join(""),trivia:We,name:We,reference:We,type:We,generic:We,nameless:We,inheritance:We,definition:We,extendedAttribute:We,extendedAttributeReference:We};class Be{constructor(e){this.ts=Object.assign({},Fe,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=We,...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 He(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 o=n.get(e.target);o?o.push(r):n.set(e.target,[r])}return n}function*Ve(e){const t=function(e){const t=new Map,n=new Set,r=new Map;for(const o of e)if(o.partial){const e=r.get(o.name);e?e.push(o):r.set(o.name,[o])}else o.name&&(t.has(o.name)?n.add(o):t.set(o.name,o));return{all:e,unique:t,partials:r,duplicates:n,mixinMap:He(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 I(n.tokens.name,n,"no-duplicate",r)}}(t)}var Ge=Object.freeze({__proto__:null,WebIDLParseError:xe,parse:function(e,t={}){const n=new $e(e);return void 0!==t.sourceName&&(n.source.name=t.sourceName),Ue(n,t)},validate:function(e){return[...Ve((t=e,t.flat?t.flat():[].concat(...t)))];var t},write:function(e,{templates:t=Fe}={}){t=Object.assign({},Fe,t);const n=new Be(t);return t.wrap(e.map((e=>e.write(n))))}});const Ye=/^[!#$%&'*+-.^`|~\w]+$/,Ke=/[\u000A\u000D\u0009\u0020]/u,Ze=/^[\u0009\u{0020}-\{u0073}\u{0080}-\u{00FF}]+$/u;function Je(e,t,n){(t&&""!==t&&!e.has(t)&&Ze.test(n)||null===n)&&e.set(t.toLowerCase(),n)}function Qe(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}let Xe={async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null};function et(e){Xe=e}const tt=/[&<>"']/,nt=new RegExp(tt.source,"g"),rt=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,ot=new RegExp(rt.source,"g"),st={"&":"&","<":"<",">":">",'"':""","'":"'"},it=e=>st[e];function at(e,t){if(t){if(tt.test(e))return e.replace(nt,it)}else if(rt.test(e))return e.replace(ot,it);return e}const ct=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi;function lt(e){return e.replace(ct,((e,t)=>"colon"===(t=t.toLowerCase())?":":"#"===t.charAt(0)?"x"===t.charAt(1)?String.fromCharCode(parseInt(t.substring(2),16)):String.fromCharCode(+t.substring(1)):""))}const ut=/(^|[^\[])\^/g;function dt(e,t){let n="string"==typeof e?e:e.source;t=t||"";const r={replace:(e,t)=>{let o="string"==typeof t?t:t.source;return o=o.replace(ut,"$1"),n=n.replace(e,o),r},getRegex:()=>new RegExp(n,t)};return r}function pt(e){try{e=encodeURI(e).replace(/%25/g,"%")}catch(e){return null}return e}const ft={exec:()=>null};function ht(e,t){const n=e.replace(/\|/g,((e,t,n)=>{let r=!1,o=t;for(;--o>=0&&"\\"===n[o];)r=!r;return r?"|":" |"})).split(/ \|/);let r=0;if(n[0].trim()||n.shift(),n.length>0&&!n[n.length-1].trim()&&n.pop(),t)if(n.length>t)n.splice(t);else for(;n.length0)return{type:"space",raw:t[0]}}code(e){const t=this.rules.block.code.exec(e);if(t){const e=t[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?e:mt(e,"\n")}}}fences(e){const t=this.rules.block.fences.exec(e);if(t){const e=t[0],n=function(e,t){const n=e.match(/^(\s+)(?:```)/);if(null===n)return t;const r=n[1];return t.split("\n").map((e=>{const t=e.match(/^\s+/);if(null===t)return e;const[n]=t;return n.length>=r.length?e.slice(r.length):e})).join("\n")}(e,t[3]||"");return{type:"code",raw:e,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):t[2],text:n}}}heading(e){const t=this.rules.block.heading.exec(e);if(t){let e=t[2].trim();if(/#$/.test(e)){const t=mt(e,"#");this.options.pedantic?e=t.trim():t&&!/ $/.test(t)||(e=t.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:e,tokens:this.lexer.inline(e)}}}hr(e){const t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:t[0]}}blockquote(e){const t=this.rules.block.blockquote.exec(e);if(t){let e=t[0].replace(/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,"\n $1");e=mt(e.replace(/^ *>[ \t]?/gm,""),"\n");const n=this.lexer.state.top;this.lexer.state.top=!0;const r=this.lexer.blockTokens(e);return this.lexer.state.top=n,{type:"blockquote",raw:t[0],tokens:r,text:e}}}list(e){let t=this.rules.block.list.exec(e);if(t){let n=t[1].trim();const r=n.length>1,o={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:"[*+-]");const s=new RegExp(`^( {0,3}${n})((?:[\t ][^\\n]*)?(?:\\n|$))`);let i="",a="",c=!1;for(;e;){let n=!1;if(!(t=s.exec(e)))break;if(this.rules.block.hr.test(e))break;i=t[0],e=e.substring(i.length);let r=t[2].split("\n",1)[0].replace(/^\t+/,(e=>" ".repeat(3*e.length))),l=e.split("\n",1)[0],u=0;this.options.pedantic?(u=2,a=r.trimStart()):(u=t[2].search(/[^ ]/),u=u>4?1:u,a=r.slice(u),u+=t[1].length);let d=!1;if(!r&&/^ *$/.test(l)&&(i+=l+"\n",e=e.substring(l.length+1),n=!0),!n){const t=new RegExp(`^ {0,${Math.min(3,u-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ \t][^\\n]*)?(?:\\n|$))`),n=new RegExp(`^ {0,${Math.min(3,u-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),o=new RegExp(`^ {0,${Math.min(3,u-1)}}(?:\`\`\`|~~~)`),s=new RegExp(`^ {0,${Math.min(3,u-1)}}#`);for(;e;){const c=e.split("\n",1)[0];if(l=c,this.options.pedantic&&(l=l.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),o.test(l))break;if(s.test(l))break;if(t.test(l))break;if(n.test(e))break;if(l.search(/[^ ]/)>=u||!l.trim())a+="\n"+l.slice(u);else{if(d)break;if(r.search(/[^ ]/)>=4)break;if(o.test(r))break;if(s.test(r))break;if(n.test(r))break;a+="\n"+l}d||l.trim()||(d=!0),i+=c+"\n",e=e.substring(c.length+1),r=l.slice(u)}}o.loose||(c?o.loose=!0:/\n *\n *$/.test(i)&&(c=!0));let p,f=null;this.options.gfm&&(f=/^\[[ xX]\] /.exec(a),f&&(p="[ ] "!==f[0],a=a.replace(/^\[[ xX]\] +/,""))),o.items.push({type:"list_item",raw:i,task:!!f,checked:p,loose:!1,text:a,tokens:[]}),o.raw+=i}o.items[o.items.length-1].raw=i.trimEnd(),o.items[o.items.length-1].text=a.trimEnd(),o.raw=o.raw.trimEnd();for(let e=0;e"space"===e.type)),n=t.length>0&&t.some((e=>/\n.*\n/.test(e.raw)));o.loose=n}if(o.loose)for(let e=0;e$/,"$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:t[0],href:n,title:r}}}table(e){const t=this.rules.block.table.exec(e);if(!t)return;if(!/[:|]/.test(t[2]))return;const n=ht(t[1]),r=t[2].replace(/^\||\| *$/g,"").split("|"),o=t[3]&&t[3].trim()?t[3].replace(/\n[ \t]*$/,"").split("\n"):[],s={type:"table",raw:t[0],header:[],align:[],rows:[]};if(n.length===r.length){for(const e of r)/^ *-+: *$/.test(e)?s.align.push("right"):/^ *:-+: *$/.test(e)?s.align.push("center"):/^ *:-+ *$/.test(e)?s.align.push("left"):s.align.push(null);for(const e of n)s.header.push({text:e,tokens:this.lexer.inline(e)});for(const e of o)s.rows.push(ht(e,s.header.length).map((e=>({text:e,tokens:this.lexer.inline(e)}))));return s}}lheading(e){const t=this.rules.block.lheading.exec(e);if(t)return{type:"heading",raw:t[0],depth:"="===t[2].charAt(0)?1:2,text:t[1],tokens:this.lexer.inline(t[1])}}paragraph(e){const t=this.rules.block.paragraph.exec(e);if(t){const 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){const 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){const t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:at(t[1])}}tag(e){const t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&/^/i.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.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){const t=this.rules.inline.link.exec(e);if(t){const e=t[2].trim();if(!this.options.pedantic&&/^$/.test(e))return;const t=mt(e.slice(0,-1),"\\");if((e.length-t.length)%2==0)return}else{const e=function(e,t){if(-1===e.indexOf(t[1]))return-1;let n=0;for(let r=0;r-1){const 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){const e=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(n);e&&(n=e[1],r=e[3])}else r=t[3]?t[3].slice(1,-1):"";return n=n.trim(),/^$/.test(e)?n.slice(1):n.slice(1,-1)),gt(t,{href:n?n.replace(this.rules.inline.anyPunctuation,"$1"):n,title:r?r.replace(this.rules.inline.anyPunctuation,"$1"):r},t[0],this.lexer)}}reflink(e,t){let n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){const e=t[(n[2]||n[1]).replace(/\s+/g," ").toLowerCase()];if(!e){const e=n[0].charAt(0);return{type:"text",raw:e,text:e}}return gt(n,e,n[0],this.lexer)}}emStrong(e,t,n=""){let r=this.rules.inline.emStrongLDelim.exec(e);if(!r)return;if(r[3]&&n.match(/[\p{L}\p{N}]/u))return;if(!(r[1]||r[2]||"")||!n||this.rules.inline.punctuation.exec(n)){const n=[...r[0]].length-1;let o,s,i=n,a=0;const c="*"===r[0][0]?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(c.lastIndex=0,t=t.slice(-1*e.length+n);null!=(r=c.exec(t));){if(o=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!o)continue;if(s=[...o].length,r[3]||r[4]){i+=s;continue}if((r[5]||r[6])&&n%3&&!((n+s)%3)){a+=s;continue}if(i-=s,i>0)continue;s=Math.min(s,s+i+a);const t=[...r[0]][0].length,c=e.slice(0,n+r.index+t+s);if(Math.min(n,s)%2){const e=c.slice(1,-1);return{type:"em",raw:c,text:e,tokens:this.lexer.inlineTokens(e)}}const l=c.slice(2,-2);return{type:"strong",raw:c,text:l,tokens:this.lexer.inlineTokens(l)}}}}codespan(e){const t=this.rules.inline.code.exec(e);if(t){let e=t[2].replace(/\n/g," ");const n=/[^ ]/.test(e),r=/^ /.test(e)&&/ $/.test(e);return n&&r&&(e=e.substring(1,e.length-1)),e=at(e,!0),{type:"codespan",raw:t[0],text:e}}}br(e){const t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e){const t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2])}}autolink(e){const t=this.rules.inline.autolink.exec(e);if(t){let e,n;return"@"===t[2]?(e=at(t[1]),n="mailto:"+e):(e=at(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=at(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=at(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){const t=this.rules.inline.text.exec(e);if(t){let e;return e=this.lexer.state.inRawBlock?t[0]:at(t[0]),{type:"text",raw:t[0],text:e}}}}const yt=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,wt=/(?:[*+-]|\d{1,9}[.)])/,vt=dt(/^(?!bull |blockCode|fences|blockquote|heading|html)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html))+?)\n {0,3}(=+|-+) *(?:\n+|$)/).replace(/bull/g,wt).replace(/blockCode/g,/ {4}/).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/).getRegex(),kt=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,$t=/(?!\s*\])(?:\\.|[^\[\]\\])+/,xt=dt(/^ {0,3}\[(label)\]: *(?:\n *)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/).replace("label",$t).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),_t=dt(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,wt).getRegex(),Ct="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",St=/|$))/,Rt=dt("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))","i").replace("comment",St).replace("tag",Ct).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Et=dt(kt).replace("hr",yt).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[.)]) ").replace("html","?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Ct).getRegex(),At={blockquote:dt(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Et).getRegex(),code:/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,def:xt,fences:/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,hr:yt,html:Rt,lheading:vt,list:_t,newline:/^(?: *(?:\n|$))+/,paragraph:Et,table:ft,text:/^[^\n]+/},Lt=dt("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",yt).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Ct).getRegex(),Tt={...At,table:Lt,paragraph:dt(kt).replace("hr",yt).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Lt).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Ct).getRegex()},Pt={...At,html:dt("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?\\1> *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",St).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:ft,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:dt(kt).replace("hr",yt).replace("heading"," *#{1,6} *[^\n]").replace("lheading",vt).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},It=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Dt=/^( {2,}|\\)\n(?!\s*$)/,Nt="\\p{P}\\p{S}",jt=dt(/^((?![*_])[\spunctuation])/,"u").replace(/punctuation/g,Nt).getRegex(),Ot=dt(/^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/,"u").replace(/punct/g,Nt).getRegex(),zt=dt("^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)[punct](\\*+)(?=[\\s]|$)|[^punct\\s](\\*+)(?!\\*)(?=[punct\\s]|$)|(?!\\*)[punct\\s](\\*+)(?=[^punct\\s])|[\\s](\\*+)(?!\\*)(?=[punct])|(?!\\*)[punct](\\*+)(?!\\*)(?=[punct])|[^punct\\s](\\*+)(?=[^punct\\s])","gu").replace(/punct/g,Nt).getRegex(),qt=dt("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\\s]|$)|[^punct\\s](_+)(?!_)(?=[punct\\s]|$)|(?!_)[punct\\s](_+)(?=[^punct\\s])|[\\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])","gu").replace(/punct/g,Nt).getRegex(),Mt=dt(/\\([punct])/,"gu").replace(/punct/g,Nt).getRegex(),Ut=dt(/^<(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(),Wt=dt(St).replace("(?:--\x3e|$)","--\x3e").getRegex(),Ft=dt("^comment|^[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^").replace("comment",Wt).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Bt=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,Ht=dt(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label",Bt).replace("href",/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Vt=dt(/^!?\[(label)\]\[(ref)\]/).replace("label",Bt).replace("ref",$t).getRegex(),Gt=dt(/^!?\[(ref)\](?:\[\])?/).replace("ref",$t).getRegex(),Yt={_backpedal:ft,anyPunctuation:Mt,autolink:Ut,blockSkip:/\[[^[\]]*?\]\([^\(\)]*?\)|`[^`]*?`|<[^<>]*?>/g,br:Dt,code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,del:ft,emStrongLDelim:Ot,emStrongRDelimAst:zt,emStrongRDelimUnd:qt,escape:It,link:Ht,nolink:Gt,punctuation:jt,reflink:Vt,reflinkSearch:dt("reflink|nolink(?!\\()","g").replace("reflink",Vt).replace("nolink",Gt).getRegex(),tag:Ft,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\t+" ".repeat(n.length)));e;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some((r=>!!(n=r.call({lexer:this},e,t))&&(e=e.substring(n.raw.length),t.push(n),!0)))))if(n=this.tokenizer.space(e))e=e.substring(n.raw.length),1===n.raw.length&&t.length>0?t[t.length-1].raw+="\n":t.push(n);else if(n=this.tokenizer.code(e))e=e.substring(n.raw.length),r=t[t.length-1],!r||"paragraph"!==r.type&&"text"!==r.type?t.push(n):(r.raw+="\n"+n.raw,r.text+="\n"+n.text,this.inlineQueue[this.inlineQueue.length-1].src=r.text);else if(n=this.tokenizer.fences(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.heading(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.hr(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.blockquote(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.list(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.html(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.def(e))e=e.substring(n.raw.length),r=t[t.length-1],!r||"paragraph"!==r.type&&"text"!==r.type?this.tokens.links[n.tag]||(this.tokens.links[n.tag]={href:n.href,title:n.title}):(r.raw+="\n"+n.raw,r.text+="\n"+n.raw,this.inlineQueue[this.inlineQueue.length-1].src=r.text);else if(n=this.tokenizer.table(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.lheading(e))e=e.substring(n.raw.length),t.push(n);else{if(o=e,this.options.extensions&&this.options.extensions.startBlock){let t=1/0;const n=e.slice(1);let r;this.options.extensions.startBlock.forEach((e=>{r=e.call({lexer:this},n),"number"==typeof r&&r>=0&&(t=Math.min(t,r))})),t<1/0&&t>=0&&(o=e.substring(0,t+1))}if(this.state.top&&(n=this.tokenizer.paragraph(o)))r=t[t.length-1],s&&"paragraph"===r.type?(r.raw+="\n"+n.raw,r.text+="\n"+n.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=r.text):t.push(n),s=o.length!==e.length,e=e.substring(n.raw.length);else if(n=this.tokenizer.text(e))e=e.substring(n.raw.length),r=t[t.length-1],r&&"text"===r.type?(r.raw+="\n"+n.raw,r.text+="\n"+n.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=r.text):t.push(n);else if(e){const t="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(t);break}throw new Error(t)}}return this.state.top=!0,t}inline(e,t=[]){return this.inlineQueue.push({src:e,tokens:t}),t}inlineTokens(e,t=[]){let n,r,o,s,i,a,c=e;if(this.tokens.links){const e=Object.keys(this.tokens.links);if(e.length>0)for(;null!=(s=this.tokenizer.rules.inline.reflinkSearch.exec(c));)e.includes(s[0].slice(s[0].lastIndexOf("[")+1,-1))&&(c=c.slice(0,s.index)+"["+"a".repeat(s[0].length-2)+"]"+c.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(s=this.tokenizer.rules.inline.blockSkip.exec(c));)c=c.slice(0,s.index)+"["+"a".repeat(s[0].length-2)+"]"+c.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;null!=(s=this.tokenizer.rules.inline.anyPunctuation.exec(c));)c=c.slice(0,s.index)+"++"+c.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;e;)if(i||(a=""),i=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some((r=>!!(n=r.call({lexer:this},e,t))&&(e=e.substring(n.raw.length),t.push(n),!0)))))if(n=this.tokenizer.escape(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.tag(e))e=e.substring(n.raw.length),r=t[t.length-1],r&&"text"===n.type&&"text"===r.type?(r.raw+=n.raw,r.text+=n.text):t.push(n);else if(n=this.tokenizer.link(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.reflink(e,this.tokens.links))e=e.substring(n.raw.length),r=t[t.length-1],r&&"text"===n.type&&"text"===r.type?(r.raw+=n.raw,r.text+=n.text):t.push(n);else if(n=this.tokenizer.emStrong(e,c,a))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.codespan(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.br(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.del(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.autolink(e))e=e.substring(n.raw.length),t.push(n);else if(this.state.inLink||!(n=this.tokenizer.url(e))){if(o=e,this.options.extensions&&this.options.extensions.startInline){let t=1/0;const n=e.slice(1);let r;this.options.extensions.startInline.forEach((e=>{r=e.call({lexer:this},n),"number"==typeof r&&r>=0&&(t=Math.min(t,r))})),t<1/0&&t>=0&&(o=e.substring(0,t+1))}if(n=this.tokenizer.inlineText(o))e=e.substring(n.raw.length),"_"!==n.raw.slice(-1)&&(a=n.raw.slice(-1)),i=!0,r=t[t.length-1],r&&"text"===r.type?(r.raw+=n.raw,r.text+=n.text):t.push(n);else if(e){const t="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(t);break}throw new Error(t)}}else e=e.substring(n.raw.length),t.push(n);return t}}class tn{options;constructor(e){this.options=e||Xe}code(e,t,n){const r=(t||"").match(/^\S*/)?.[0];return e=e.replace(/\n$/,"")+"\n",r?'
\n`}tablecell(e,t){const n=t.header?"th":"td";return(t.align?`<${n} align="${t.align}">`:`<${n}>`)+e+`${n}>\n`}strong(e){return`${e}`}em(e){return`${e}`}codespan(e){return`${e}`}br(){return" "}del(e){return`${e}`}link(e,t,n){const r=pt(e);if(null===r)return n;let o='"+n+"",o}image(e,t,n){const r=pt(e);if(null===r)return n;let o=`",o}text(e){return e}}class nn{strong(e){return e}em(e){return e}codespan(e){return e}del(e){return e}html(e){return e}text(e){return e}link(e,t,n){return""+n}image(e,t,n){return""+n}br(){return""}}class rn{options;renderer;textRenderer;constructor(e){this.options=e||Xe,this.options.renderer=this.options.renderer||new tn,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new nn}static parse(e,t){return new rn(t).parse(e)}static parseInline(e,t){return new rn(t).parseInline(e)}parse(e,t=!0){let n="";for(let r=0;r0&&"paragraph"===n.tokens[0].type?(n.tokens[0].text=e+" "+n.tokens[0].text,n.tokens[0].tokens&&n.tokens[0].tokens.length>0&&"text"===n.tokens[0].tokens[0].type&&(n.tokens[0].tokens[0].text=e+" "+n.tokens[0].tokens[0].text)):n.tokens.unshift({type:"text",text:e+" "}):a+=e+" "}a+=this.parse(n.tokens,s),i+=this.renderer.listitem(a,o,!!r)}n+=this.renderer.list(i,t,r);continue}case"html":{const e=o;n+=this.renderer.html(e.text,e.block);continue}case"paragraph":{const e=o;n+=this.renderer.paragraph(this.parseInline(e.tokens));continue}case"text":{let s=o,i=s.tokens?this.parseInline(s.tokens):s.text;for(;r+1{const o=e[r].flat(1/0);n=n.concat(this.walkTokens(o,t))})):e.tokens&&(n=n.concat(this.walkTokens(e.tokens,t)))}}return n}use(...e){const t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach((e=>{const 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){const 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'");const 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){const t=this.defaults.renderer||new tn(this.defaults);for(const n in e.renderer){if(!(n in t))throw new Error(`renderer '${n}' does not exist`);if("options"===n)continue;const r=n,o=e.renderer[r],s=t[r];t[r]=(...e)=>{let n=o.apply(t,e);return!1===n&&(n=s.apply(t,e)),n||""}}n.renderer=t}if(e.tokenizer){const t=this.defaults.tokenizer||new bt(this.defaults);for(const n in e.tokenizer){if(!(n in t))throw new Error(`tokenizer '${n}' does not exist`);if(["options","rules","lexer"].includes(n))continue;const r=n,o=e.tokenizer[r],s=t[r];t[r]=(...e)=>{let n=o.apply(t,e);return!1===n&&(n=s.apply(t,e)),n}}n.tokenizer=t}if(e.hooks){const t=this.defaults.hooks||new on;for(const n in e.hooks){if(!(n in t))throw new Error(`hook '${n}' does not exist`);if("options"===n)continue;const r=n,o=e.hooks[r],s=t[r];on.passThroughHooks.has(n)?t[r]=e=>{if(this.defaults.async)return Promise.resolve(o.call(t,e)).then((e=>s.call(t,e)));const n=o.call(t,e);return s.call(t,n)}:t[r]=(...e)=>{let n=o.apply(t,e);return!1===n&&(n=s.apply(t,e)),n}}n.hooks=t}if(e.walkTokens){const 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 en.lex(e,t??this.defaults)}parser(e,t){return rn.parse(e,t??this.defaults)}#e(e,t){return(n,r)=>{const o={...r},s={...this.defaults,...o};!0===this.defaults.async&&!1===o.async&&(s.silent||console.warn("marked(): The async option was set to true by an extension. The async: false option sent to parse will be ignored."),s.async=!0);const i=this.#t(!!s.silent,!!s.async);if(null==n)return i(new Error("marked(): input parameter is undefined or null"));if("string"!=typeof n)return i(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(n)+", string expected"));if(s.hooks&&(s.hooks.options=s),s.async)return Promise.resolve(s.hooks?s.hooks.preprocess(n):n).then((t=>e(t,s))).then((e=>s.hooks?s.hooks.processAllTokens(e):e)).then((e=>s.walkTokens?Promise.all(this.walkTokens(e,s.walkTokens)).then((()=>e)):e)).then((e=>t(e,s))).then((e=>s.hooks?s.hooks.postprocess(e):e)).catch(i);try{s.hooks&&(n=s.hooks.preprocess(n));let r=e(n,s);s.hooks&&(r=s.hooks.processAllTokens(r)),s.walkTokens&&this.walkTokens(r,s.walkTokens);let o=t(r,s);return s.hooks&&(o=s.hooks.postprocess(o)),o}catch(e){return i(e)}}}#t(e,t){return n=>{if(n.message+="\nPlease report this to https://github.com/markedjs/marked.",e){const e="
\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`${this.parser.parseInline(e)}`}em({tokens:e}){return`${this.parser.parseInline(e)}`}codespan({text:e}){return`${Jt(e,!0)}`}br(e){return" "}del({tokens:e}){return`${this.parser.parseInline(e)}`}link({href:e,title:t,tokens:n}){let r=this.parser.parseInline(n),s=Xt(e);if(null===s)return r;let o='"+r+"",o}image({href:e,title:t,text:n,tokens:r}){r&&(n=this.parser.parseInline(r,this.parser.textRenderer));let s=Xt(e);if(null===s)return Jt(n);let o=`",o}text(e){return"tokens"in e&&e.tokens?this.parser.parseInline(e.tokens):"escaped"in e&&e.escaped?e.text:Jt(e.text)}},on=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""}},an=class e{options;renderer;textRenderer;constructor(e){this.options=e||Qe,this.options.renderer=this.options.renderer||new sn,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new on}static parse(t,n){return new e(n).parse(t)}static parseInline(t,n){return new e(n).parseInline(t)}parse(e,t=!0){let n="";for(let r=0;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 sn(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],o=t[r];t[r]=(...e)=>{let n=s.apply(t,e);return!1===n&&(n=o.apply(t,e)),n||""}}n.renderer=t}if(e.tokenizer){let t=this.defaults.tokenizer||new nn(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],o=t[r];t[r]=(...e)=>{let n=s.apply(t,e);return!1===n&&(n=o.apply(t,e)),n}}n.tokenizer=t}if(e.hooks){let t=this.defaults.hooks||new cn;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],o=t[r];cn.passThroughHooks.has(n)?t[r]=e=>{if(this.defaults.async&&cn.passThroughHooksRespectAsync.has(n))return(async()=>{let n=await s.call(t,e);return o.call(t,n)})();let r=s.call(t,e);return o.call(t,r)}:t[r]=(...e)=>{if(this.defaults.async)return(async()=>{let n=await s.apply(t,e);return!1===n&&(n=await o.apply(t,e)),n})();let n=s.apply(t,e);return!1===n&&(n=o.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 rn.lex(e,t??this.defaults)}parser(e,t){return an.parse(e,t??this.defaults)}parseMarkdown(e){return(t,n)=>{let r={...n},s={...this.defaults,...r},o=this.onError(!!s.silent,!!s.async);if(!0===this.defaults.async&&!1===r.async)return o(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 o(new Error("marked(): input parameter is undefined or null"));if("string"!=typeof t)return o(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?rn.lex:rn.lexInline)(n,s),o=s.hooks?await s.hooks.processAllTokens(r):r;s.walkTokens&&await Promise.all(this.walkTokens(o,s.walkTokens));let i=await(s.hooks?await s.hooks.provideParser():e?an.parse:an.parseInline)(o,s);return s.hooks?await s.hooks.postprocess(i):i})().catch(o);try{s.hooks&&(t=s.hooks.preprocess(t));let n=(s.hooks?s.hooks.provideLexer():e?rn.lex:rn.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?an.parse:an.parseInline)(n,s);return s.hooks&&(r=s.hooks.postprocess(r)),r}catch(e){return o(e)}}}onError(e,t){return n=>{if(n.message+="\nPlease report this to https://github.com/markedjs/marked.",e){let e="
An error occurred:
"+Jt(n.message+"",!0)+"
";return t?Promise.resolve(e):e}if(t)return Promise.reject(n);throw n}}};function un(e,t){return ln.parse(e,t)}function dn(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}un.options=un.setOptions=function(e){return ln.setOptions(e),un.defaults=ln.defaults,et(un.defaults),un},un.getDefaults=Xe,un.defaults=Qe,un.use=function(...e){return ln.use(...e),un.defaults=ln.defaults,et(un.defaults),un},un.walkTokens=function(e,t){return ln.walkTokens(e,t)},un.parseInline=ln.parseInline,un.Parser=an,un.parser=an.parse,un.Renderer=sn,un.TextRenderer=on,un.Lexer=rn,un.lexer=rn.lex,un.Tokenizer=nn,un.Hooks=cn,un.parse=un,un.options,un.setOptions,un.use,un.walkTokens,un.parseInline,an.parse,rn.lex;var pn,hn={exports:{}};var fn,mn=(pn||(pn=1,fn=hn,function(e,t){fn.exports=t()}(0,(function(){var e=[],t=[],n={},r={},s={};function o(e){return"string"==typeof e?new RegExp("^"+e+"$","i"):e}function i(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,o,a=(s=t[1],o=arguments,s.replace(/\$(\d{1,2})/g,(function(e,t){return o[t]||""})));return i(""===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 o=r[s];if(o[0].test(t))return a(t,o)}return t}function l(e,t,n){return function(r){var s=r.toLowerCase();return t.hasOwnProperty(s)?i(r,s):e.hasOwnProperty(s)?i(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([o(t),n])},d.addSingularRule=function(e,n){t.push([o(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}))),hn.exports),gn=dn(mn),bn=function(e){var t={};try{t.WeakMap=WeakMap}catch(u){t.WeakMap=function(e,t){var n=t.defineProperty,r=t.hasOwnProperty,s=o.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},o;function o(t){n(this,"_",{value:"_@ungap/weakmap"+e++}),t&&t.forEach(i,this)}function i(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,o){for(var i=("selectedIndex"in t),a=i;r>>0;ni;)--c;l=a+r-c;var y=Array(l),w=u[c];for(--n;w;){for(var v=w.newi,k=w.oldi;v"+e+"",r.querySelectorAll(t)):(r.innerHTML=e,r.childNodes)),n},function(e,t){return("svg"===t?function(e){var t=z(C),n=z("div");return n.innerHTML='",O(t,n.firstChild.childNodes),t}:E)(e)});function O(e,t){for(var n=t.length;n--;)e.appendChild(t[0])}function z(e){return e===C?S.createDocumentFragment():S.createElementNS("http://www.w3.org/1999/xhtml",e)}var q,M,U,W,F,B,H,G,V,Y=(M="appendChild",U="cloneNode",W="createTextNode",B=(F="importNode")in(q=e),(H=q.createDocumentFragment())[M](q[W]("g")),H[M](q[W]("")),(B?q[F](H,!0):H[U](!0)).childNodes.length<2?function e(t,n){for(var r=t[U](),s=t.childNodes||[],o=s.length,i=0;n&&i',G.content.childNodes[0].getAttribute(V)==Z)||(Z="_dt: "+Z.slice(1,-1)+";",J=!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",oe="[^"+se+"\\/>\"'=]+",ie="["+se+"]+"+oe,ae="<([A-Za-z]+[A-Za-z0-9:._-]*)((?:",ce="(?:\\s*=\\s*(?:'[^']*?'|\"[^\"]*?\"|<[^>]*?>|"+oe.replace("\\/","")+"))?)",le=new RegExp(ae+ie+ce+"+)(["+se+"]*/?>)","g"),ue=new RegExp(ae+ie+ce+"*)(["+se+"]*/>)","g"),de=new RegExp("("+ie+"\\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=J?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 o=t.childNodes,i=o.length,a=0;a{e.remove()}))}function On(e,t="long"){const n=new Intl.ListFormat(o,{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 zn=On("conjunction"),qn=On("disjunction");function Mn(e,t){return zn(e,t).join("")}function Un(e,t){return qn(e,t).join("")}function Wn(e){return e.replace(/&/g,"&").replace(/>/g,">").replace(/"/g,""").replace(/new Date)return o}catch(e){console.error("Failed to use Cache API.",e)}const i=await fetch(n);if(!i.ok&&o)return console.warn(`Returning a stale cached response for ${r}`),o;if(s&&i.ok){const e=i.clone(),r=new Headers(i.headers),o=new Date(Date.now()+t);r.set("Expires",o.toISOString());const a=new Response(await e.blob(),{headers:r});await s.put(n,a).catch(console.error)}return i}function Kn(e,t=(e=>e)){const n=e.map(t),r=n.slice(0,-1).map((e=>_n`${e}, `));return _n`${r}${n[n.length-1]}`}function Zn(e,t){return[].concat(zn(e,t)).map((e=>"string"==typeof e?_n`${e}`:e))}function Jn(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)}(Fn(e.textContent));return Xn(e,t,n)}function Xn(e,t="",n="",r=!1){if(e.id)return e.id;n||(n=(e.title?e.title:e.textContent).trim());let s=r?n:n.toLowerCase();if(s=s.trim().normalize("NFD").replace(/[\u0300-\u036f]/g,"").replace(/\W+/gim,"-").replace(/^-+/,"").replace(/-+$/,""),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 Qn(e){const t=new Set,n="ltNodefault"in e.dataset?"":Fn(e.textContent),r=e.children[0];if(e.dataset.lt?e.dataset.lt.split("|").map((e=>Fn(e))).forEach((e=>t.add(e))):1===e.childNodes.length&&1===e.getElementsByTagName("abbr").length&&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(Fn(e))))}return[...t]}function er(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 tr(e,t){const n=t.closest(Dn);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 nr(e,t){return t.append(...e.childNodes),e.appendChild(t),e}function rr(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 sr(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}function or(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 ir 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))}getCanonicalKey(e){return super.has(e)?e:[...this.keys()].find((t=>t.toLowerCase()===e.toLowerCase()))}}function ar(e){const t=e.cloneNode(!0);return t.querySelectorAll("[id]").forEach((e=>e.removeAttribute("id"))),t.querySelectorAll("dfn").forEach((e=>{er(e,"span",{copyAttributes:!1})})),t.hasAttribute("id")&&t.removeAttribute("id"),cr(t),t}function cr(e){const t=document.createTreeWalker(e,NodeFilter.SHOW_COMMENT);for(const e of[...lr(t)])e.remove()}function*lr(e){for(;e.nextNode();)yield e.currentNode}class ur 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 dr 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||Xn(e,"respec-offender")}(t,e,n.title)))}toJSON(){const{message:e,name:t,stack:n}=this,{plugin:r,hint:s,elements:o,title:i,details:a}=this;return{message:e,name:t,plugin:r,hint:s,elements:o,title:i,details:a,stack:n,...this.cause instanceof Error&&{cause:{name:this.cause.name,message:this.cause.message,stack:this.cause.stack}}}}}function pr(e,t,n={}){const r={...n,isWarning:!1};$r("error",new dr(e,t,r))}function hr(e,t,n={}){const r={...n,isWarning:!0};$r("warn",new dr(e,t,r))}function fr(e){return{showError:(t,n)=>pr(t,e,n),showWarning:(t,n)=>hr(t,e,n)}}function mr(e){return e?`\`${e}\``:""}function gr(e,{quotes:t}={quotes:!1}){return Un(e,t?e=>mr(yr(e)):mr)}function br(e,{quotes:t}={quotes:!1}){return Mn(e,t?e=>mr(yr(e)):mr)}function yr(e){return String(e)?`"${e}"`:""}function wr(e,...t){return vr(e.map(((e,n)=>{const r=t[n];if(!r)return e;if(!r.startsWith("[")&&!r.endsWith("]"))return e+r;const[s,o]=r.slice(1,-1).split("|");if(o){return`${e}[${s}](${new URL(o,"https://respec.org/docs/")})`}return`${e}[\`${s}\`](https://respec.org/docs/#${s})`})).join(""))}function vr(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 kr=new EventTarget;function $r(e,t){if(kr.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 xr(e,t,n={once:!1}){kr.addEventListener(e,(async n=>{try{await t(n.detail)}catch(t){pr(`Error in handler for topic "${e}": ${t.message}`,`sub:${e}`,{cause:t})}}),n)}n("core/pubsubhub",{sub:xr});const _r=["githubToken","githubUser"];const Sr=new Map([["text/html","html"],["application/xml","xml"]]);function Cr(e,t=document){const n=Sr.get(e);if(!n){const t=[...Sr.values()].join(", ");throw new TypeError(`Invalid format: ${e}. Expected one of: ${t}.`)}const r=Rr(n,t);return`data:${e};charset=utf-8,${encodeURIComponent(r)}`}function Rr(e,t){const n=t.cloneNode(!0);!function(e){const{head:t,body:n,documentElement:r}=e;cr(e),e.querySelectorAll(".removeOnSave, #toc-nav").forEach((e=>e.remove())),n.classList.remove("toc-sidebar"),jn(r);const s=e.createDocumentFragment(),o=e.querySelector("meta[name='viewport']");o&&t.firstChild!==o&&s.appendChild(o);let i=e.querySelector("meta[charset], meta[content*='charset=']");i||(i=_n``);s.appendChild(i);const a=`ReSpec ${window.respecVersion||"Developer Channel"}`,c=_n`
- `;o.appendChild(c),t.prepend(o),wr("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}n("core/exporter",{rsDocToDataURL:xr});class Cr{constructor(){this._respecDonePromise=new Promise((e=>{vr("end-all",(()=>e()),{once:!0})})),this.errors=[],this.warnings=[],vr("error",(e=>{console.error(e,e.toJSON()),this.errors.push(e)})),vr("warn",(e=>{console.warn(e,e.toJSON()),this.warnings.push(e)}))}get version(){return window.respecVersion}get ready(){return this._respecDonePromise}async toHTML(){return _r("html",document)}}const Sr="core/post-process";const Rr="core/pre-process";const Er="core/base-runner";async function Ar(e){!function(){const e=new Cr;Object.defineProperty(document,"respec",{value:e})}(),wr("start-all",respecConfig),function(e){const t={},n=e=>Object.assign(t,e);n(e),vr("amend-user-config",n),vr("end-all",(()=>{const e=document.createElement("script");e.id="initialUserConfig",e.type="application/json";for(const e of kr)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 o;try{o=JSON.parse(r)}catch{o=r}return[n,o]})),r=Object.fromEntries(n);Object.assign(e,r),wr("amend-user-config",r)}(respecConfig),performance.mark(`${Er}-start`),await async function(e){if(Array.isArray(e.preProcess)){const t=e.preProcess.filter((e=>{const t="function"==typeof e;return t||lr("Every item in `preProcess` must be a JS function.",Rr),t}));for(const[n,r]of t.entries()){const t=`${Rr}/${r.name||`[${n}]`}`,o=dr(t);try{await r(e,document,o)}catch(e){lr(`Function ${t} threw an error during \`preProcess\`.`,Rr,{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,o)=>{const s=setTimeout((()=>{const t=`Plugin ${e} took too long.`;console.error(t,n),o(new Error(t))}),15e3);performance.mark(`${e}-start`);try{n.Plugin?(await new n.Plugin(t).run(),r()):n.run&&(await n.run(t),r())}catch(e){o(e)}finally{clearTimeout(s),performance.mark(`${e}-end`),performance.measure(e,`${e}-start`,`${e}-end`)}}))}catch(e){console.error(e)}}}(t,respecConfig),wr("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||lr("Every item in `postProcess` must be a JS function.",Sr),t}));for(const[n,r]of t.entries()){const t=`${Sr}/${r.name||`[${n}]`}`,o=dr(t);try{await r(e,document,o)}catch(e){lr(`Function ${t} threw an error during \`postProcess\`.`,Sr,{hint:"See developer console.",cause:e})}}}"function"==typeof e.afterEnd&&await e.afterEnd(e,document)}(respecConfig),wr("end-all"),In(document),performance.mark(`${Er}-end`),performance.measure(Er,`${Er}-start`,`${Er}-end`)}var Lr=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}
+ `;s.appendChild(c),t.prepend(s),$r("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}n("core/exporter",{rsDocToDataURL:Cr});class Er{constructor(){this._respecDonePromise=new Promise((e=>{xr("end-all",(()=>e()),{once:!0})})),this.errors=[],this.warnings=[],xr("error",(e=>{console.error(e,e.toJSON()),this.errors.push(e)})),xr("warn",(e=>{console.warn(e,e.toJSON()),this.warnings.push(e)}))}get version(){return window.respecVersion}get ready(){return this._respecDonePromise}async toHTML(){return Rr("html",document)}}const Ar="core/post-process";const Lr="core/pre-process";const Tr="core/base-runner";async function Pr(e){!function(){const e=new Er;Object.defineProperty(document,"respec",{value:e})}(),$r("start-all",respecConfig),function(e){const t={},n=e=>Object.assign(t,e);n(e),xr("amend-user-config",n),xr("end-all",(()=>{const e=document.createElement("script");e.id="initialUserConfig",e.type="application/json";for(const e of _r)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),$r("amend-user-config",r)}(respecConfig),performance.mark(`${Tr}-start`),await async function(e){if(Array.isArray(e.preProcess)){const t=e.preProcess.filter((e=>{const t="function"==typeof e;return t||pr("Every item in `preProcess` must be a JS function.",Lr),t}));for(const[n,r]of t.entries()){const t=`${Lr}/${r.name||`[${n}]`}`,s=fr(t);try{await r(e,document,s)}catch(e){pr(`Function ${t} threw an error during \`preProcess\`.`,Lr,{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 o=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()):n.run&&(await n.run(t),r())}catch(e){s(e)}finally{clearTimeout(o),performance.mark(`${e}-end`),performance.measure(e,`${e}-start`,`${e}-end`)}}))}catch(e){console.error(e)}}}(t,respecConfig),$r("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||pr("Every item in `postProcess` must be a JS function.",Ar),t}));for(const[n,r]of t.entries()){const t=`${Ar}/${r.name||`[${n}]`}`,s=fr(t);try{await r(e,document,s)}catch(e){pr(`Function ${t} threw an error during \`postProcess\`.`,Ar,{hint:"See developer console.",cause:e})}}}"function"==typeof e.afterEnd&&await e.afterEnd(e,document)}(respecConfig),$r("end-all"),jn(document),performance.mark(`${Tr}-end`),performance.measure(Tr,`${Tr}-start`,`${Tr}-end`)}var Ir=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}
#respec-ui{position:fixed;display:flex;flex-direction:row-reverse;top:20px;right:20px;width:202px;text-align:right;z-index:9000}
#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}
.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
.respec-iframe:not(.ready){background:url(https://respec.org/xref/loader.gif) no-repeat center}
.respec-iframe+a[href]{font-size:.9rem;float:right;margin:0 .5em .5em;border-bottom-width:1px}
p:is(.respec-hint,.respec-occurrences){display:block;margin-top:.5em}
-.respec-plugin{text-align:right;color:rgb(120,120,120,.5);font-size:.6em}`;const Tr=/>/gm,Pr=/&/gm;class Ir extends xn.Renderer{code(e,t,n){const{language:r,...o}=Ir.parseInfoString(t);if(/(^webidl$)/i.test(r))return`
${e}`}return super.heading({tokens:e,depth:t})}}const Or={gfm:!0,renderer:new jr};function zr(e,t={inline:!1}){const n=vr(e).replace(Dr,">").replace(Nr,"&");return t.inline?Cn.parseInline(n,Or):Cn.parse(n,Or)}function qr(e){for(const t of e.getElementsByTagName("pre"))t.prepend("\n");e.innerHTML=zr(e.innerHTML)}const Mr=(Ur="[data-format='markdown']:not(body)",e=>{const t=e.querySelectorAll(Ur);return t.forEach(qr),Array.from(t)});var Ur;var Wr=Object.freeze({__proto__:null,markdownToHtml:zr,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 Mr(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=or(e);e.append(`\n\n${t}`)}}}(s,"[data-format=markdown], section, div, address, article, aside, figure, header, main"),qr(s),function(e){Array.from(e).forEach((e=>{e.replaceWith(e.textContent)}))}(s.querySelectorAll(".nolinks a[href]")),s.append(r),document.body.replaceWith(s)}});function Fr(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=Ir,e.classList.add("removeOnSave"),document.head.appendChild(e)}();const Br=_n``,Hr=_n`
`,Fr=kn`
`,Gr=_n``;let Br,Hr;window.addEventListener("load",(()=>Jr(Wr)));const Vr=[],Gr=[],Yr={};vr("start-all",(()=>document.body.prepend(Ur)),{once:!0}),vr("end-all",(()=>document.body.prepend(Ur)),{once:!0});const Kr=kn``;function Zr(){Wr.classList.toggle("respec-hidden"),Wr.classList.toggle("respec-visible"),Wr.hidden=!Wr.hidden}function Jr(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=>{"Tab"===e.key&&(e.shiftKey?document.activeElement===n&&(r.focus(),e.preventDefault()):document.activeElement===r&&(n.focus(),e.preventDefault()))}))}Ur.appendChild(Kr),Kr.addEventListener("click",(e=>{e.stopPropagation(),Kr.setAttribute("aria-expanded",String(Wr.hidden)),Zr(),Wr.querySelector("li:first-child button").focus()})),document.documentElement.addEventListener("click",(()=>{Wr.hidden||Zr()})),Ur.appendChild(Wr),Wr.addEventListener("keydown",(e=>{"Escape"!==e.key||Wr.hidden||(Kr.setAttribute("aria-expanded",String(Wr.hidden)),Zr(),Kr.focus())}));const Qr=new Map([["controls","respec-menu"],["expanded","false"],["haspopup","true"],["label","ReSpec Menu"]]);function Xr(e,t,n,r){t.push(e),Yr.hasOwnProperty(n)||(Yr[n]=function(e,t,n){const r=`respec-pill-${e}`,o=kn`.
`}(e):""}
- `}(e,t):kn`
+ `}(e,t):_n`
${e.sotdAfterWGinfo?"":t.additionalContent}
- ${e.overrideStatus?"":kn` ${function(e){if(!e.wg)return;let t=null;const n=document.querySelector(".proposed-addition"),r=document.querySelector(".proposed-correction"),o=document.querySelector(".addition"),s=document.querySelector(".correction"),i=n||r||o||s;e.isRec&&i&&(n&&r||o&&s?t=kn`It includes
- ${n?kn`
+ ${e.overrideStatus?"":_n` ${function(e){if(!e.wg)return;let t=null;const n=document.querySelector(".proposed-addition"),r=document.querySelector(".proposed-correction"),s=document.querySelector(".addition"),o=document.querySelector(".correction"),i=n||r||s||o;e.isRec&&i&&(n&&r||s&&o?t=_n`It includes
+ ${n?_n`
proposed amendments`:kn`
+ >`:_n`
candidate amendments`},
introducing substantive changes and new features since the previous
- Recommendation.`:n||o?t=kn`It includes
- ${n?kn`
+ Recommendation.`:n||s?t=_n`It includes
+ ${n?_n`
proposed additions`:kn`
+ >`:_n`
candidate additions`},
- introducing new features since the previous Recommendation.`:(r||s)&&(t=kn`It includes
- ${r?kn`
+ introducing new features since the previous Recommendation.`:(r||o)&&(t=_n`It includes
+ ${r?_n`
proposed corrections`:kn`
+ >`:_n`
candidate corrections`}.`));const a=Oo[e.specStatus]?kn` using the
- ${Oo[e.specStatus]} track`:"";return kn`
- This document was published by ${Lo(e)} as
- ${Ro(e.longStatus)}${a}. ${t}
+ >`}.`));const a=qs[e.specStatus]?_n` using the
+ ${qs[e.specStatus]} track`:"";return _n`
+ This document was published by ${Ps(e)} as
+ ${As(e.longStatus)}${a}. ${t}
W3C recommends the wide deployment of this specification as a standard for
the Web.
@@ -478,59 +478,59 @@ p:is(.respec-hint,.respec-occurrences){display:block;margin-top:.5em}
>royalty-free licensing
for implementations.
- ${n?kn`Future updates to this Recommendation may incorporate
- new features.`:""}
+ ${n?_n`Future updates to this Recommendation may incorporate
+ new features.`:""}
The W3C Membership and other interested parties are invited to review
the proposed ${r} and send comments through
- ${Ln.format(t)}. Advisory Committee Representatives
+ ${In.format(t)}. Advisory Committee Representatives
should consult their
WBS questionnaires.
`:""}
- `}(e):function(e){const t=document.querySelector("#sotd.updateable-rec");let n=null,r=null,o=kn`Publication as ${Ro(e.textStatus)} does not
- imply endorsement by W3C and its Members.`,s=kn`
+ `}(e):function(e){const t=document.querySelector("#sotd.updateable-rec");let n=null,r=null,s=_n`Publication as ${As(e.textStatus)} does not
+ imply endorsement by W3C and its Members.`,o=_n`
This is a draft document and may be updated, replaced, or obsoleted by other
documents at any time. It is inappropriate to cite this document as other
than a work in progress.
- ${t?kn`Future updates to this upcoming Recommendation may incorporate
- new features.`:""}
-
`;"DISC"===e.specStatus&&(s=kn`
+ ${t?_n`Future updates to this upcoming Recommendation may incorporate
+ new features.`:""}
+
`;"DISC"===e.specStatus&&(o=_n`
Publication as a Discontinued Draft implies that this document is no
longer intended to advance or to be maintained. It is inappropriate to
cite this document as other than abandoned work.
-
`);const i=kn`
+
`);const i=_n`
This document is maintained and updated at any time. Some parts of this
document are work in progress.
-
`;switch(e.specStatus){case"STMT":o=kn`
+
`;switch(e.specStatus){case"STMT":s=_n`
A W3C Statement is a specification that, after extensive
consensus-building, is endorsed by
W3C and its Members.
-
`;break;case"RY":o=kn`
W3C recommends the wide usage of this registry.
+ `;break;case"RY":s=_n`
W3C recommends the wide usage of this registry.
A W3C Registry is a specification that, after extensive
consensus-building, is endorsed by
W3C and its Members.
-
`;break;case"CRD":n=kn`A Candidate Recommendation Draft integrates
+ `;break;case"CRD":n=_n`A Candidate Recommendation Draft integrates
changes from the previous Candidate Recommendation that the Working Group
- intends to include in a subsequent Candidate Recommendation Snapshot.`,"LS"===e.pubMode&&(s=i);break;case"CRYD":n=kn`A Candidate Registry Draft integrates changes
+ intends to include in a subsequent Candidate Recommendation Snapshot.`,"LS"===e.pubMode&&(o=i);break;case"CRYD":n=_n`A Candidate Registry Draft integrates changes
from the previous Candidate Registry Snapshot that the Working Group
- intends to include in a subsequent Candidate Registry Snapshot.`,"LS"===e.pubMode&&(s=i);break;case"CRY":n=kn`A Candidate Registry Snapshot has received
- wide review.`,r=kn`
+ intends to include in a subsequent Candidate Registry Snapshot.`,"LS"===e.pubMode&&(o=i);break;case"CRY":n=_n`A Candidate Registry Snapshot has received
+ wide review.`,r=_n`
The W3C Membership and other interested parties are invited to review
the document and send comments through ${e.humanPREnd}. Advisory
Committee Representatives should consult their
@@ -538,37 +538,37 @@ p:is(.respec-hint,.respec-occurrences){display:block;margin-top:.5em}
>WBS questionnaires. Note that substantive technical comments were expected during the
Candidate Recommendation review period that ended ${e.humanCREnd}.
-
`;break;case"CR":n=kn`A Candidate Recommendation Snapshot has received
- wide review, is intended to
+ `;break;case"CR":n=_n`A Candidate Recommendation Snapshot has received
+ wide review, is intended to
gather
implementation experience,
and has commitments from Working Group members to
royalty-free licensing
- for implementations.`,s=kn`${t?kn`Future updates to this upcoming Recommendation may incorporate
- new features.`:""}`,r="LS"===e.pubMode?kn`
+ for implementations.`,o=_n`${t?_n`Future updates to this upcoming Recommendation may incorporate
+ new features.`:""}`,r="LS"===e.pubMode?_n`
Comments are welcome at any time but most especially before
- ${Ln.format(e.crEnd)}.
-
`:kn`
+ ${In.format(e.crEnd)}.
+
`:_n`
This Candidate Recommendation is not expected to advance to
- Recommendation any earlier than ${Ln.format(e.crEnd)}.
-
`;break;case"PR":r=kn`
+ Recommendation any earlier than ${In.format(e.crEnd)}.
+
`;break;case"PR":r=_n`
The W3C Membership and other interested parties are invited to review
- the document and send comments through ${Ln.format(e.prEnd)}.
+ the document and send comments through ${In.format(e.prEnd)}.
Advisory Committee Representatives should consult their
WBS questionnaires. Note that substantive technical comments were expected during the
Candidate Recommendation review period that ended
- ${Ln.format(e.crEnd)}.
-
`;break;case"DNOTE":o=kn`${e.textStatus}s are not endorsed by
- W3C nor its Members.`;break;case"NOTE":o=kn`This ${e.textStatus} is endorsed by
- ${Lo(e)}, but is not endorsed by
+ ${In.format(e.crEnd)}.
+ `;break;case"DNOTE":s=_n`${e.textStatus}s are not endorsed by
+ W3C nor its Members.`;break;case"NOTE":s=_n`This ${e.textStatus} is endorsed by
+ ${Ps(e)}, but is not endorsed by
W3C itself nor its
- Members.`,s=""}return kn`
${l}
- ${t||n?"":kn`
- ${o?kn` W3C maintains ${s} `:kn`
+ ${t||n?"":_n`
+ ${s?_n` W3C maintains ${o} `:_n`
W3C maintains a
public list of any patent disclosures
`}
made in connection with the deliverables of
- ${o?"each group; these pages also include":"the group; that page also includes"}
+ ${s?"each group; these pages also include":"the group; that page also includes"}
instructions for disclosing a patent. An individual who has actual
knowledge of a patent that the individual believes contains
Essential Claim(s)
@@ -605,17 +605,17 @@ p:is(.respec-hint,.respec-occurrences){display:block;margin-top:.5em}
`}
`}
${t.additionalSections}
- `;function Ao(e){const{prUrl:t,prNumber:n,edDraftURI:r}=e;return kn`
+ `;function Ts(e){const{prUrl:t,prNumber:n,edDraftURI:r}=e;return _n`
This is a
- preview${t&&n?kn`
+ preview${t&&n?_n`
of pull request
#${n}
`:""}
@@ -623,25 +623,25 @@ p:is(.respec-hint,.respec-occurrences){display:block;margin-top:.5em}
Do not attempt to implement this version of the specification. Do not
reference this version as authoritative in any way.
- ${r?kn`
+ ${r?_n`
Instead, see
${r} for the Editor's draft.
`:""}
If you wish to make comments regarding this document, please send them to
- ${o}@w3.org
+ ${s}@w3.org
(subscribe,
- archives)${s?kn` with ${s} at the start of your email's
+ archives)${o?_n` with ${o} at the start of your email's
subject`:""}.
+ ${e.github?_n`
GitHub Issues are preferred for
discussion of this specification.
`:""}
- ${e.wgPublicList?kn`
+ ${e.wgPublicList?_n`
${e.github&&e.wgPublicList?"Alternatively, you can send comments to our mailing list.":"Comments regarding this document are welcome."}
Please send them to
archives)${e.subjectPrefix?kn` with ${e.subjectPrefix} at the start of your
+ >)${e.subjectPrefix?_n` with ${e.subjectPrefix} at the start of your
email's subject`:""}.
`:""}
` in the 'sotd' section that reflects the status of this specification."})}s.id=s.id||"sotd",s.classList.add("introductory");const i=[e.wg,e.wgURI,e.wgPatentURI];if(i.some((e=>Array.isArray(e)))&&!i.every((e=>Array.isArray(e)))){const e=gr`Use the ${"[group]"} option with an array instead.`;lr(gr`If one of ${"[wg]"}, ${"[wgURI]"}, or ${"[wgPatentURI]"} is an array, they all have to be.`,Po,{hint:e})}if(Array.isArray(e.wg)?(e.multipleWGs=e.wg.length>1,e.wgPatentHTML=Gn(e.wg,((t,n)=>kn`a
+ >`}))}},s=(e.isCGBG?Cs:_s)(e,r);document.body.prepend(s),document.body.classList.add("h-entry");const o=document.getElementById("sotd")||document.createElement("section");if((e.isCGBG||!e.isNoTrack||e.isTagFinding)&&!o.id){pr("A Status of This Document must include at least on custom paragraph.",Ds,{elements:[o],hint:"Add a `
` in the 'sotd' section that reflects the status of this specification."})}o.id=o.id||"sotd",o.classList.add("introductory");const i=[e.wg,e.wgURI,e.wgPatentURI];if(i.some((e=>Array.isArray(e)))&&!i.every((e=>Array.isArray(e)))){const e=wr`Use the ${"[group]"} option with an array instead.`;pr(wr`If one of ${"[wg]"}, ${"[wgURI]"}, or ${"[wgPatentURI]"} is an array, they all have to be.`,Ds,{hint:e})}if(Array.isArray(e.wg)?(e.multipleWGs=e.wg.length>1,e.wgPatentHTML=Zn(e.wg,((t,n)=>_n`a
public list of any patent disclosures (${t})`))):e.multipleWGs=!1,e.isPR&&!e.crEnd){lr(gr`${"[specStatus]"} is "PR" but no ${"[crEnd]"} is specified in the ${"[respecConfig]"} (needed to indicate end of previous CR).`,Po)}if(e.isCR&&!e.crEnd){lr(gr`${"[specStatus]"} is "CR", but no ${"[crEnd]"} is specified in the ${"[respecConfig]"}.`,Po)}if(e.crEnd=Ko(e,"crEnd"),e.isPr&&!e.prEnd){lr(gr`${"[specStatus]"} is "PR" but no ${"[prEnd]"} is specified in the ${"[respecConfig]"}.`,Po)}e.prEnd=Ko(e,"prEnd");const a=s.classList.contains("updateable-rec"),c=null!==document.querySelector(".correction"),l=null!==document.querySelector(".proposed-correction"),u=null!==document.querySelector(".addition"),d=null!==document.querySelector(".proposed-addition"),p=c||u||d||l;if(e.isRec&&!e.errata&&!p){const e=gr`Add an ${"[errata]"} URL to your ${"[respecConfig]"}.`;lr("Recommendations must have an errata link.",Po,{hint:e})}if(!a&&(u||c)){lr(gr`${"[specStatus]"} is "REC" with proposed additions but the Recommendation is not marked as allowing new features.`,Po)}if(e.isRec&&a&&(d||l)&&!e.revisedRecEnd){lr(gr`${"[specStatus]"} is "REC" with proposed corrections or additions but no ${"[revisedRecEnd]"} is specified in the ${"[respecConfig]"}.`,Po)}if(e.revisedRecEnd=Ko(e,"revisedRecEnd"),e.noRecTrack&&qo.includes(e.specStatus)){const t=gr`Document configured as ${"[noRecTrack]"}, but its status ("${e.specStatus}") puts it on the W3C Rec Track.`,n=fr(qo,{quotes:!0});lr(t,Po,{hint:`Status **can't** be any of: ${n}.`})}if(s.classList.contains("override")||kn.bind(s)`${function(e,t){const n={...Zo(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?To:Eo;return r(e,n)}(e,s)}`,!e.implementationReportURI&&e.isCR){const e=gr`CR documents must have an ${"[implementationReportURI]"} that describes the [implementation experience](https://www.w3.org/policies/process/#implementation-experience).`;lr(gr`Missing ${"[implementationReportURI]"} configuration option in ${"[respecConfig]"}.`,Po,{hint:e})}if(!e.implementationReportURI&&e.isPR){ur(gr`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).`,Po)}wr("amend-user-config",{publishISODate:e.publishISODate,generatedSubtitle:Mn(document.getElementById("w3c-state")?.textContent??"")})},status2text:No,status2track:Oo,tagStatus:Uo,trStatus:Ho});const Qo={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},pluralize:!0,specStatus:"base",highlightVars:!0,addSectionLinks:!0},Xo="w3c/defaults",es={src:"https://www.w3.org/StyleSheets/TR/2021/logos/W3C",alt:"W3C",height:48,width:72,url:"https://www.w3.org/"},ts={alt:"W3C Member Submission",href:"https://www.w3.org/Submission/",src:"https://www.w3.org/Icons/member_subm-v.svg",width:"211",height:"48"},ns={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 rs=Object.freeze({__proto__:null,name:Xo,run:function(e){const t=!1!==e.lint&&{...Qo.lint,...ns.lint,...e.lint};Object.assign(e,{...Qo,...ns,...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=gr`Select an appropriate status from ${"[specStatus]"} based on your W3C group. If in doubt, use \`"unofficial"\`.`;return lr(gr`The ${"[specStatus]"} configuration option is required.`,Xo,{hint:t}),void(e.specStatus="base")}if(void 0===No[t]){const n=gr`The ${"[specStatus]"} "\`${t}\`" is not supported at for this type of document.`,r=gr`set ${"[specStatus]"} to one of: ${fr(Object.keys(No),{quotes:!0})}.`;return lr(n,Xo,{hint:r}),void(e.specStatus="base")}switch(n){case"cg":if(![...Wo,"unofficial","UD"].includes(t)){const n=gr`W3C Community Group documents can't use \`"${t}"\` for the ${"[specStatus]"} configuration option.`,r=fr(Wo,{quotes:!0});lr(n,Xo,{hint:`Please use one of: ${r}. Automatically falling back to \`"CG-DRAFT"\`.`}),e.specStatus="CG-DRAFT"}break;case"bg":if(![...Fo,"unofficial","UD"].includes(t)){const n=gr`W3C Business Group documents can't use \`"${t}"\` for the ${"[specStatus]"} configuration option.`,r=fr(Fo,{quotes:!0});lr(n,Xo,{hint:`Please use one of: ${r}. Automatically falling back to \`"BG-DRAFT"\`.`}),e.specStatus="BG-DRAFT"}break;case"wg":if(![...Ho,"unofficial","UD","ED"].includes(t)){const e=gr`Pleas see ${"[specStatus]"} for appropriate status for W3C Working Group documents.`;lr(gr`W3C Working Group documents can't use \`"${t}"\` for the ${"[specStatus]"} configuration option.`,Xo,{hint:e})}break;case"other":if("tag"===r&&!["ED",...Ho,...Uo].includes(t)){const n=gr`The W3C Technical Architecture Group's documents can't use \`"${t}"\` for the ${"[specStatus]"} configuration option.`,r=fr(["ED",...Ho,...Uo],{quotes:!0});lr(n,Xo,{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(e.specStatus)){const t="Document is not associated with a [W3C group](https://respec.org/w3c/groups/). Defaulting to 'base' status.",n=gr`Use the ${"[group]"} configuration option to associated this document with a W3C group.`;e.specStatus="base",lr(t,Xo,{hint:n})}}}(e),function(e){const{specStatus:t,wg:n}=e,r=[...qo,...Mo,...zo,...Uo,"ED"].includes(t),o=n&&n.length&&r,s=["Member-SUBM"].includes(t);(o||s)&&(e.logos.unshift(es),"Member-SUBM"===t&&e.logos.push(ts))}(e)}});var os=String.raw`@keyframes pop{
+ >`))):e.multipleWGs=!1,e.isPR&&!e.crEnd){pr(wr`${"[specStatus]"} is "PR" but no ${"[crEnd]"} is specified in the ${"[respecConfig]"} (needed to indicate end of previous CR).`,Ds)}if(e.isCR&&!e.crEnd){pr(wr`${"[specStatus]"} is "CR", but no ${"[crEnd]"} is specified in the ${"[respecConfig]"}.`,Ds)}if(e.crEnd=Js(e,"crEnd"),e.isPr&&!e.prEnd){pr(wr`${"[specStatus]"} is "PR" but no ${"[prEnd]"} is specified in the ${"[respecConfig]"}.`,Ds)}e.prEnd=Js(e,"prEnd");const a=o.classList.contains("updateable-rec"),c=null!==document.querySelector(".correction"),l=null!==document.querySelector(".proposed-correction"),u=null!==document.querySelector(".addition"),d=null!==document.querySelector(".proposed-addition"),p=c||u||d||l;if(e.isRec&&!e.errata&&!p){const e=wr`Add an ${"[errata]"} URL to your ${"[respecConfig]"}.`;pr("Recommendations must have an errata link.",Ds,{hint:e})}if(!a&&(u||c)){pr(wr`${"[specStatus]"} is "REC" with proposed additions but the Recommendation is not marked as allowing new features.`,Ds)}if(e.isRec&&a&&(d||l)&&!e.revisedRecEnd){pr(wr`${"[specStatus]"} is "REC" with proposed corrections or additions but no ${"[revisedRecEnd]"} is specified in the ${"[respecConfig]"}.`,Ds)}if(e.revisedRecEnd=Js(e,"revisedRecEnd"),e.noRecTrack&&Us.includes(e.specStatus)){const t=wr`Document configured as ${"[noRecTrack]"}, but its status ("${e.specStatus}") puts it on the W3C Rec Track.`,n=gr(Us,{quotes:!0});pr(t,Ds,{hint:`Status **can't** be any of: ${n}.`})}if(o.classList.contains("override")||_n.bind(o)`${function(e,t){const n={...Xs(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?Is:Ls;return r(e,n)}(e,o)}`,!e.implementationReportURI&&e.isCR){const e=wr`CR documents must have an ${"[implementationReportURI]"} that describes the [implementation experience](https://www.w3.org/policies/process/#implementation-experience).`;pr(wr`Missing ${"[implementationReportURI]"} configuration option in ${"[respecConfig]"}.`,Ds,{hint:e})}if(!e.implementationReportURI&&e.isPR){hr(wr`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).`,Ds)}$r("amend-user-config",{publishISODate:e.publishISODate,generatedSubtitle:Fn(document.getElementById("w3c-state")?.textContent??"")})},status2text:Os,status2track:qs,tagStatus:Fs,trStatus:Vs});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},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 oo=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=wr`Select an appropriate status from ${"[specStatus]"} based on your W3C group. If in doubt, use \`"unofficial"\`.`;return pr(wr`The ${"[specStatus]"} configuration option is required.`,to,{hint:t}),void(e.specStatus="base")}if(void 0===Os[t]){const n=wr`The ${"[specStatus]"} "\`${t}\`" is not supported at for this type of document.`,r=wr`set ${"[specStatus]"} to one of: ${gr(Object.keys(Os),{quotes:!0})}.`;return pr(n,to,{hint:r}),void(e.specStatus="base")}switch(n){case"cg":if(![...Bs,"unofficial","UD"].includes(t)){const n=wr`W3C Community Group documents can't use \`"${t}"\` for the ${"[specStatus]"} configuration option.`,r=gr(Bs,{quotes:!0});pr(n,to,{hint:`Please use one of: ${r}. Automatically falling back to \`"CG-DRAFT"\`.`}),e.specStatus="CG-DRAFT"}break;case"bg":if(![...Hs,"unofficial","UD"].includes(t)){const n=wr`W3C Business Group documents can't use \`"${t}"\` for the ${"[specStatus]"} configuration option.`,r=gr(Hs,{quotes:!0});pr(n,to,{hint:`Please use one of: ${r}. Automatically falling back to \`"BG-DRAFT"\`.`}),e.specStatus="BG-DRAFT"}break;case"wg":if(![...Vs,"unofficial","UD","ED"].includes(t)){const e=wr`Pleas see ${"[specStatus]"} for appropriate status for W3C Working Group documents.`;pr(wr`W3C Working Group documents can't use \`"${t}"\` for the ${"[specStatus]"} configuration option.`,to,{hint:e})}break;case"other":if("tag"===r&&!["ED",...Vs,...Fs].includes(t)){const n=wr`The W3C Technical Architecture Group's documents can't use \`"${t}"\` for the ${"[specStatus]"} configuration option.`,r=gr(["ED",...Vs,...Fs],{quotes:!0});pr(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(e.specStatus)){const t="Document is not associated with a [W3C group](https://respec.org/w3c/groups/). Defaulting to 'base' status.",n=wr`Use the ${"[group]"} configuration option to associated this document with a W3C group.`;e.specStatus="base",pr(t,to,{hint:n})}}}(e),function(e){const{specStatus:t,wg:n}=e,r=[...Us,...Ws,...Ms,...Fs,"ED"].includes(t),s=n&&n.length&&r,o=["Member-SUBM"].includes(t);(s||o)&&(e.logos.unshift(no),"Member-SUBM"===t&&e.logos.push(ro))}(e)}});var io=String.raw`@keyframes pop{
0%{transform:scale(1,1)}
25%{transform:scale(1.25,1.25);opacity:.75}
100%{transform:scale(1,1)}
@@ -733,122 +733,122 @@ dd{margin-left:0}
}
@media print{
.removeOnSave{display:none}
-}`;const ss=function(){const e=document.createElement("style");return e.id="respec-mainstyle",e.textContent=os,document.head.appendChild(e),e}();var is=Object.freeze({__proto__:null,name:"core/style",run:function(e){e.noReSpecCSS&&ss.remove()}});function as(){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 cs=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:us("base.css").href,as:"style"},{hint:"preload",href:us("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(Pn))t.appendChild(n);return t}();function ls(e){return t=>{const n=t.querySelector(`head link[href="${e}"]`);t.querySelector("head").append(n)}}function us(e="base.css"){return new URL(`/StyleSheets/TR/2021/${e}`,"https://www.w3.org/")}cs.appendChild(kn`{window.location.href=location.hash}),{once:!0}),document.body.appendChild(e)}const uo=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:ho("base.css").href,as:"style"},{hint:"preload",href:ho("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(Nn))t.appendChild(n);return t}();function po(e){return t=>{const n=t.querySelector(`head link[href="${e}"]`);t.querySelector("head").append(n)}}function ho(e="base.css"){return new URL(`/StyleSheets/TR/2021/${e}`,"https://www.w3.org/")}uo.appendChild(_n``),document.head.querySelector("meta[name=viewport]")||cs.prepend(kn``),document.head.querySelector("meta[name=viewport]")||uo.prepend(_n``),document.head.prepend(cs);var ds=Object.freeze({__proto__:null,name:"w3c/style",run:function(e){e.noToc||vr("end-all",as,{once:!0});const t=us(function(e){const t=e.specStatus?.toUpperCase()??"";let n="";const r=[...qo,...Mo,...zo,"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(kn``),vr("beforesave",ls(t));let n=document.querySelector("head meta[name=color-scheme]");if(n||(n=kn``,document.head.appendChild(n)),n.content.includes("dark")){const e=us("dark.css");document.head.appendChild(kn``),document.head.prepend(uo);var fo=Object.freeze({__proto__:null,name:"w3c/style",run:function(e){e.noToc||xr("end-all",lo,{once:!0});const t=ho(function(e){const t=e.specStatus?.toUpperCase()??"";let n="";const r=[...Us,...Ws,...Ms,"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(_n``),xr("beforesave",po(t));let n=document.querySelector("head meta[name=color-scheme]");if(n||(n=_n``,document.head.appendChild(n)),n.content.includes("dark")){const e=ho("dark.css");document.head.appendChild(_n``),vr("beforesave",ls(e))}}});const ps="core/github";let fs,hs;const ms=new Promise(((e,t)=>{fs=e,hs=e=>{lr(e,ps),t(new Error(e))}})),gs=Un({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 bs=Object.freeze({__proto__:null,github:ms,name:ps,run:async function(e){if(!e.hasOwnProperty("github")||!e.github)return void fs(null);if("object"==typeof e.github&&!e.github.hasOwnProperty("repoURL")){const e=gr`Config option ${"[github]"} is missing property \`repoURL\`.`;return void hs(e)}let t,n=e.github.repoURL||e.github;n.endsWith("/")||(n+="/");try{t=new URL(n,"https://github.com")}catch{const e=gr`${"[github]"} configuration option is not a valid URL? (${n}).`;return void hs(e)}if("https://github.com"!==t.origin){const e=gr`${"[github]"} configuration option must be HTTPS and pointing to GitHub. (${t.href}).`;return void hs(e)}const[r,o]=t.pathname.split("/").filter((e=>e));if(!r||!o){const e=gr`${"[github]"} URL needs a path. For example, "w3c/my-spec".`;return void hs(e)}const s=e.github.branch||"gh-pages",i=new URL("./issues/",t).href;let a,c;if(a="object"==typeof e.github&&e.github.hasOwnProperty("pullsURL")?e.github.pullsURL:new URL("./pulls/",t).href,a)try{const e=new URL(a);if("https://github.com"!==e.origin){const e=gr`${"[github.pullsURL]"} must be HTTPS and pointing to GitHub. (${a}).`;return void hs(e)}if(!e.pathname.includes("/pulls")){const e=gr`${"[github.pullsURL]"} must point to pull requests. (${a}).`;return void hs(e)}}catch{const e=gr`${"[github.pullsURL]"} is not a valid URL. (${a}).`;return void hs(e)}if(c="object"==typeof e.github&&e.github.hasOwnProperty("commitHistoryURL")?e.github.commitHistoryURL:new URL(`./commits/${e.github.branch??""}`,t.href).href,c)try{const e=new URL(c);if("https://github.com"!==e.origin){const e=gr`${"[github.commitHistoryURL]"} must be HTTPS and pointing to GitHub. (${c}).`;return void hs(e)}if(!e.pathname.includes("/commits")){const e=gr`${"[github.commitHistoryURL]"} must point to commits. (${c}).`;return void hs(e)}}catch{const e=gr`${"[github.commitHistoryURL]"} is not a valid URL. (${c}).`;return void hs(e)}const l={edDraftURI:`https://${r.toLowerCase()}.github.io/${o}/`,githubToken:void 0,githubUser:void 0,issueBase:i,atRiskBase:i,otherLinks:[],pullBase:a,shortName:o};let u="https://respec.org/github";if(e.githubAPI)if(new URL(e.githubAPI).hostname===window.parent.location.hostname)u=e.githubAPI;else{ur("The `githubAPI` configuration option is private and should not be added manually.",ps)}if(!e.excludeGithubLinks){const n={key:gs.participate,data:[{value:`GitHub ${r}/${o}`,href:t},{value:gs.file_a_bug,href:l.issueBase},{value:gs.commit_history,href:c},{value:"Pull requests",href:a}]};e.otherLinks||(e.otherLinks=[]),e.otherLinks.unshift(n)}const d={branch:s,repoURL:t.href,apiBase:u,fullName:`${r}/${o}`,issuesURL:i,pullsURL:a,newIssuesURL:new URL("./new/choose",i).href,commitHistoryURL:c};fs(d);const p={...l,...e,github:d,githubAPI:u};Object.assign(e,p)}});class ys{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){ys.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(ws(e)),t&&e.prepend(t),r.appendChild(e),this.current=r}addElement(e){this.current.appendChild(e)}}function ws(e){const t=new ys(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 vs(e){const t=ws(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 ks=Object.freeze({__proto__:null,name:"core/sections",restructure:vs,run:function(){vs(document.body)}});const $s="core/data-include";function xs(e,t,n){const r=document.querySelector(`[data-include-id=${t}]`),o=Bn(e,r.dataset.oninclude,n),s="string"==typeof r.dataset.includeReplace;!function(e,t,{replace:n}){const{includeFormat:r}=e.dataset;let o=t;"markdown"===r&&(o=Nr(o)),"text"===r?e.textContent=o:e.innerHTML=o,"markdown"===r&&vs(e),n&&e.replaceWith(...e.childNodes)}(r,o,{replace:s}),s||function(e){["data-include","data-include-format","data-include-replace","data-include-id","oninclude"].forEach((t=>e.removeAttribute(t)))}(r)}async function _s(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 o=await fetch(n);xs(await o.text(),r,n),t<3&&await _s(e,t+1)}catch(t){lr(`\`data-include\` failed: \`${n}\` (${t.message}).`,$s,{elements:[e],cause:t})}}));await Promise.all(r)}var Cs=Object.freeze({__proto__:null,name:$s,run:async function(){await _s(document,1)}});var Ss=Object.freeze({__proto__:null,name:"core/reindent",run:function(){for(const e of document.getElementsByTagName("pre"))e.innerHTML=br(e.innerHTML)}});const Rs="core/title",Es=Un({en:{default_title:"No Title"},de:{default_title:"Kein Titel"},zh:{default_title:"无标题"},cs:{default_title:"Bez názvu"}});var As=Object.freeze({__proto__:null,name:Rs,run:function(e){const t=document.querySelector("h1#title")||kn`
`;if(t.isConnected&&""===t.textContent.trim()){lr('The document is missing a title, so using a default title. To fix this, please give your document a ``. If you need special markup in the document\'s title, please use a `
`.',Rs,{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||`${Es.default_title}`);const n=document.createElement("h1");n.innerHTML=t.innerHTML.replace(/: /g,": ").replace(/ /g," - ");let r=Mn(n.textContent);if(e.isPreview&&e.prNumber){const n=e.prUrl||`${e.github.repoURL}pull/${e.prNumber}`,{childNodes:o}=kn`
+ />`),xr("beforesave",po(e))}}});const mo="core/github";let go,bo;const yo=new Promise(((e,t)=>{go=e,bo=e=>{pr(e,mo),t(new Error(e))}})),wo=Bn({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 vo=Object.freeze({__proto__:null,github:yo,name:mo,run:async function(e){if(!e.hasOwnProperty("github")||!e.github)return void go(null);if("object"==typeof e.github&&!e.github.hasOwnProperty("repoURL")){const e=wr`Config option ${"[github]"} is missing property \`repoURL\`.`;return void bo(e)}let t,n=e.github.repoURL||e.github;n.endsWith("/")||(n+="/");try{t=new URL(n,"https://github.com")}catch{const e=wr`${"[github]"} configuration option is not a valid URL? (${n}).`;return void bo(e)}if("https://github.com"!==t.origin){const e=wr`${"[github]"} configuration option must be HTTPS and pointing to GitHub. (${t.href}).`;return void bo(e)}const[r,s]=t.pathname.split("/").filter((e=>e));if(!r||!s){const e=wr`${"[github]"} URL needs a path. For example, "w3c/my-spec".`;return void bo(e)}const o=e.github.branch||"gh-pages",i=new URL("./issues/",t).href;let a,c;if(a="object"==typeof e.github&&e.github.hasOwnProperty("pullsURL")?e.github.pullsURL:new URL("./pulls/",t).href,a)try{const e=new URL(a);if("https://github.com"!==e.origin){const e=wr`${"[github.pullsURL]"} must be HTTPS and pointing to GitHub. (${a}).`;return void bo(e)}if(!e.pathname.includes("/pulls")){const e=wr`${"[github.pullsURL]"} must point to pull requests. (${a}).`;return void bo(e)}}catch{const e=wr`${"[github.pullsURL]"} is not a valid URL. (${a}).`;return void bo(e)}if(c="object"==typeof e.github&&e.github.hasOwnProperty("commitHistoryURL")?e.github.commitHistoryURL:new URL(`./commits/${e.github.branch??""}`,t.href).href,c)try{const e=new URL(c);if("https://github.com"!==e.origin){const e=wr`${"[github.commitHistoryURL]"} must be HTTPS and pointing to GitHub. (${c}).`;return void bo(e)}if(!e.pathname.includes("/commits")){const e=wr`${"[github.commitHistoryURL]"} must point to commits. (${c}).`;return void bo(e)}}catch{const e=wr`${"[github.commitHistoryURL]"} is not a valid URL. (${c}).`;return void bo(e)}const l={edDraftURI:`https://${r.toLowerCase()}.github.io/${s}/`,githubToken:void 0,githubUser:void 0,issueBase:i,atRiskBase:i,otherLinks:[],pullBase:a,shortName:s};let u="https://respec.org/github";if(e.githubAPI)if(new URL(e.githubAPI).hostname===window.parent.location.hostname)u=e.githubAPI;else{hr("The `githubAPI` configuration option is private and should not be added manually.",mo)}if(!e.excludeGithubLinks){const n={key:wo.participate,data:[{value:`GitHub ${r}/${s}`,href:t},{value:wo.file_a_bug,href:l.issueBase},{value:wo.commit_history,href:c},{value:"Pull requests",href:a}]};e.otherLinks||(e.otherLinks=[]),e.otherLinks.unshift(n)}const d={branch:o,repoURL:t.href,apiBase:u,fullName:`${r}/${s}`,issuesURL:i,pullsURL:a,newIssuesURL:new URL("./new/choose",i).href,commitHistoryURL:c};go(d);const p={...l,...e,github:d,githubAPI:u};Object.assign(e,p)}});class ko{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){ko.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($o(e)),t&&e.prepend(t),r.appendChild(e),this.current=r}addElement(e){this.current.appendChild(e)}}function $o(e){const t=new ko(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 xo(e){const t=$o(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:xo,run:function(){xo(document.body)}});const So="core/data-include";function Co(e,t,n){const r=document.querySelector(`[data-include-id=${t}]`),s=Vn(e,r.dataset.oninclude,n),o="string"==typeof r.dataset.includeReplace;!function(e,t,{replace:n}){const{includeFormat:r}=e.dataset;let s=t;"markdown"===r&&(s=zr(s)),"text"===r?e.textContent=s:e.innerHTML=s,"markdown"===r&&xo(e),n&&e.replaceWith(...e.childNodes)}(r,s,{replace:o}),o||function(e){["data-include","data-include-format","data-include-replace","data-include-id","oninclude"].forEach((t=>e.removeAttribute(t)))}(r)}async function Ro(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);Co(await s.text(),r,n),t<3&&await Ro(e,t+1)}catch(t){pr(`\`data-include\` failed: \`${n}\` (${t.message}).`,So,{elements:[e],cause:t})}}));await Promise.all(r)}var Eo=Object.freeze({__proto__:null,name:So,run:async function(){await Ro(document,1)}});var Ao=Object.freeze({__proto__:null,name:"core/reindent",run:function(){for(const e of document.getElementsByTagName("pre"))e.innerHTML=vr(e.innerHTML)}});const Lo="core/title",To=Bn({en:{default_title:"No Title"},de:{default_title:"Kein Titel"},zh:{default_title:"无标题"},cs:{default_title:"Bez názvu"}});var Po=Object.freeze({__proto__:null,name:Lo,run:function(e){const t=document.querySelector("h1#title")||_n``;if(t.isConnected&&""===t.textContent.trim()){pr('The document is missing a title, so using a default title. To fix this, please give your document a ``. If you need special markup in the document\'s title, please use a `
`.',Lo,{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||`${To.default_title}`);const n=document.createElement("h1");n.innerHTML=t.innerHTML.replace(/: /g,": ").replace(/ /g," - ");let r=Fn(n.textContent);if(e.isPreview&&e.prNumber){const n=e.prUrl||`${e.github.repoURL}pull/${e.prNumber}`,{childNodes:s}=_n`
Preview of PR #${e.prNumber}:
- `;t.prepend(...o),r=`Preview of PR #${e.prNumber}: ${r}`}document.title=r,e.title=r}(e,t),document.body.prepend(t)}});const Ls="w3c/level",Ts=Un({en:{level:"Level"},ja:{level:"レベル"},nl:{level:"Niveau"},de:{level:"Stufe"},zh:{level:"级别"}});var Ps=Object.freeze({__proto__:null,name:Ls,run:function(e){if(!e.hasOwnProperty("level"))return;const t=document.querySelector("h1#title"),n=parseInt(e.level);if(!Number.isInteger(n)||n<0){lr(`The \`level\` configuration option must be a number greater or equal to 0. It is currently set to \`${n}\``,Ls,{title:"Invalid level config.",elements:[t]})}else t.append(` ${Ts.level} ${n}`),document.title=`${document.title} ${Ts.level} ${n}`,e.shortName=`${e.shortName}-${n}`,e.level=n}});const Is="w3c/abstract",Ds=Un({en:{abstract:"Abstract"},ko:{abstract:"요약"},zh:{abstract:"摘要"},ja:{abstract:"要約"},nl:{abstract:"Samenvatting"},es:{abstract:"Resumen"},de:{abstract:"Zusammenfassung"},cs:{abstract:"Abstrakt"}});var Ns=Object.freeze({__proto__:null,name:Is,run:async function(){const e=function(){const e=document.getElementById("abstract");if(e)switch(e.localName){case"section":return e;case"div":return Jn(e,"section");default:return lr("The abstract should be a `` element.",Is,{elements:[e]}),e}const t=Ds.abstract.toLocaleLowerCase(s);for(const e of document.querySelectorAll("h2, h3, h4, h5, h6"))if(Mn(e.textContent).toLocaleLowerCase(s)===t)return e.closest("section");return e}();e?(e.classList.add("introductory"),e.id="abstract",e.querySelector("h2")||e.prepend(kn`
${Ds.abstract}
`)):lr('Document must have one ``.',Is)}});var js=Object.freeze({__proto__:null,name:"core/data-transform",run:function(){document.querySelectorAll("[data-transform]").forEach((e=>{e.innerHTML=Bn(e.innerHTML,e.dataset.transform),e.removeAttribute("data-transform")}))}});const Os="core/dfn-abbr";function zs(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();e.insertAdjacentHTML("afterend",` (${t})`);const o=e.dataset.lt||"";e.dataset.lt=o.split("|").filter((e=>e.trim())).concat(t).join("|")}var qs=Object.freeze({__proto__:null,name:Os,run:function(){const e=document.querySelectorAll("[data-abbr]");for(const t of e){const{localName:e}=t;if("dfn"===e)zs(t);else{lr(`\`data-abbr\` attribute not supported on \`${e}\` elements.`,Os,{elements:[t],title:"Error: unsupported."})}}}});const Ms=/^[a-z]+(\s+[a-z]+)+\??$/,Us=/\B"([^"]*)"\B/,Ws=/^(\w+)\(([^\\)]*)\)(?:\|(\w+)(?:\((?:([^\\)]*))\))?)?$/,Fs=/\[\[(\w+(?: +\w+)*)\]\](\([^)]*\))?$/,Bs=/^((?:\[\[)?(?:\w+(?: +\w+)*)(?:\]\])?)$/,Hs=/^(?:\w+)\??$/,Vs=/^(\w+)\["([\w- ]*)"\]$/,Gs=/\.?(\w+\(.*\)$)/,Ys=/\/(.+)/,Ks=/\[\[.+\]\]/;function Zs(e){const{identifier:t,renderParent:n,nullable:r}=e;if(n)return kn`` element.",jo,{elements:[e]}),e}const t=Oo.abstract.toLocaleLowerCase(o);for(const e of document.querySelectorAll("h2, h3, h4, h5, h6"))if(Fn(e.textContent).toLocaleLowerCase(o)===t)return e.closest("section");return e}();e?(e.classList.add("introductory"),e.id="abstract",e.querySelector("h2")||e.prepend(_n`
`)):pr('Document must have one ``.',jo)}});var qo=Object.freeze({__proto__:null,name:"core/data-transform",run:function(){document.querySelectorAll("[data-transform]").forEach((e=>{e.innerHTML=Vn(e.innerHTML,e.dataset.transform),e.removeAttribute("data-transform")}))}});const Mo="core/dfn-abbr";function Uo(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();e.insertAdjacentHTML("afterend",` (${t})`);const s=e.dataset.lt||"";e.dataset.lt=s.split("|").filter((e=>e.trim())).concat(t).join("|")}var Wo=Object.freeze({__proto__:null,name:Mo,run:function(){const e=document.querySelectorAll("[data-abbr]");for(const t of e){const{localName:e}=t;if("dfn"===e)Uo(t);else{pr(`\`data-abbr\` attribute not supported on \`${e}\` elements.`,Mo,{elements:[t],title:"Error: unsupported."})}}}});const Fo=/^[a-z]+(\s+[a-z]+)+\??$/,Bo=/\B"([^"]*)"\B/,Ho=/^(\w+)\(([^\\)]*)\)(?:\|(\w+)(?:\((?:([^\\)]*))\))?)?$/,Go=/\[\[(\w+(?: +\w+)*)\]\](\([^)]*\))?$/,Vo=/^((?:\[\[)?(?:\w+(?: +\w+)*)(?:\]\])?)$/,Yo=/^(?:\w+)\??$/,Ko=/^(\w+)\["([\w- ]*)"\]$/,Zo=/\.?(\w+\(.*\)$)/,Jo=/\/(.+)/,Xo=/\[\[.+\]\]/;function Qo(e){const{identifier:t,renderParent:n,nullable:r}=e;if(n)return _n`${t+(r?"?":"")}`}function Js(e){const{identifier:t,parent:n,slotType:r,renderParent:o,args:s}=e,{identifier:i}=n||{},a="method"===r,c=a?kn`(${Vn(s,Qs)})`:null,l=a?`(${s.join(", ")})`:"";return kn`${n&&o?".":""}`}function ei(e){const{identifier:t,parent:n,slotType:r,renderParent:s,args:o}=e,{identifier:i}=n||{},a="method"===r,c=a?_n`(${Kn(o,ti)})`:null,l=a?`(${o.join(", ")})`:"";return _n`${n&&s?".":""}[[${t}]]${c}`}function Qs(e,t,n){if(t${e}`;const r=e.split(/(^\.{3})(.+)/),o=r.length>1,s=o?r[2]:r[0];return kn`${o?"...":null}${s}`}function Xs(e){const{parent:t,identifier:n,renderParent:r}=e,{identifier:o}=t||{};return kn`${r?".":""}`}function ti(e,t,n){if(t${e}`;const r=e.split(/(^\.{3})(.+)/),s=r.length>1,o=s?r[2]:r[0];return _n`${s?"...":null}${o}`}function ni(e){const{parent:t,identifier:n,renderParent:r}=e,{identifier:s}=t||{};return _n`${r?".":""}${n}`}function ei(e){const{args:t,identifier:n,type:r,parent:o,renderParent:s}=e,{renderText:i,renderArgs:a}=e,{identifier:c}=o||{},l=Vn(a||t,Qs),u=`${n}(${t.join(", ")})`;return kn`${o&&s?".":""}`}function ri(e){const{args:t,identifier:n,type:r,parent:s,renderParent:o}=e,{renderText:i,renderArgs:a}=e,{identifier:c}=s||{},l=Kn(a||t,ti),u=`${n}(${t.join(", ")})`;return _n`${s&&o?".":""}${i||n}${!i||a?kn`(${l})`:""}`}function ti(e){const{identifier:t,enumValue:n,parent:r}=e,o=r?r.identifier:t;return kn`"${!i||a?_n`(${l})`:""}`}function si(e){const{identifier:t,enumValue:n,parent:r}=e,s=r?r.identifier:t;return _n`"${n}"`}function ni(e){const{identifier:t}=e;return kn`""`}function oi(e){const{identifier:t}=e;return _n`"${t}"`}function ri(e){const{identifier:t,nullable:n}=e;return kn`"`}function ii(e){const{identifier:t,nullable:n}=e;return _n`${t+(n?"?":"")}`}function oi(e){let t;try{t=function(e){const t=Ks.test(e),n=t?Ys:Gs,[r,o]=e.split(n);if(t&&r&&!o)throw new SyntaxError(`Internal slot missing "for" part. Expected \`{{ InterfaceName/${r}}}\` }.`);const s=r.split(/[./]/).concat(o).filter((e=>e&&e.trim())).map((e=>e.trim())),i=!e.includes("/"),a=[];for(;s.length;){const t=s.pop();if(Ws.test(t)){const[,e,n,r,o]=t.match(Ws),s=n.split(/,\s*/).filter((e=>e)),c=r?.trim(),l=o?.split(/,\s*/).filter((e=>e));a.push({type:"method",identifier:e,args:s,renderParent:i,renderText:c,renderArgs:l})}else if(Vs.test(t)){const[,e,n]=t.match(Vs);a.push({type:"enum",identifier:e,enumValue:n,renderParent:i})}else if(Us.test(t)){const[,e]=t.match(Us);i?a.push({type:"exception",identifier:e}):a.push({type:"enum",enumValue:e,renderParent:i})}else if(Fs.test(t)){const[,e,n]=t.match(Fs),r=n?"method":"attribute",o=n?.slice(1,-1).split(/,\s*/).filter((e=>e));a.push({type:"internal-slot",slotType:r,identifier:e,args:o,renderParent:i})}else if(Bs.test(t)&&s.length){const[,e]=t.match(Bs);a.push({type:"attribute",identifier:e,renderParent:i})}else if(Ms.test(t)){const e=t.endsWith("?"),n=e?t.slice(0,-1):t;a.push({type:"idl-primitive",identifier:n,renderParent:i,nullable:e})}else{if(!Hs.test(t)||0!==s.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:i,nullable:e})}}}return a.forEach(((e,t,n)=>{e.parent=n[t+1]||null})),a.reverse()}(e)}catch(t){const n=kn`{{ ${e} }}`,r="Error: Invalid inline IDL string.";return lr(t.message,"core/inlines",{title:r,elements:[n]}),n}const n=kn(document.createDocumentFragment()),r=[];for(const e of t)switch(e.type){case"base":{const t=Zs(e);t&&r.push(t);break}case"attribute":r.push(Xs(e));break;case"internal-slot":r.push(Js(e));break;case"method":r.push(ei(e));break;case"enum":r.push(ti(e));break;case"exception":r.push(ni(e));break;case"idl-primitive":r.push(ri(e));break;default:throw new Error("Unknown type.")}return n`${r}`}const si=new Set(["alias","reference"]),ii=async function(){const e=await $n.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[...si]){const r=e.transaction(n,"readwrite").store,o=IDBKeyRange.lowerBound(t);let s=await r.openCursor(o);for(;s?.value;){const e=s.value;(void 0===e.expires||e.expiresn[e].map((t=>this.add(e,t)))));await Promise.all(r)},async add(e,t){if(!si.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 o=await this.get(e,t.id);if(o?.expiresn.objectStore(e).clear()));await Promise.all(r)}},ci={},li=new URL("https://api.specref.org/bibrefs?refs="),ui=Pn({hint:"dns-prefetch",href:li.origin});let di;document.head.appendChild(ui);const pi=new Promise((e=>{di=e}));async function fi(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(li.href+n.join(","))}catch(e){return console.error(e),null}if(!t.forceUpdate&&!r.ok||200!==r.status)return null;const o=await r.json(),s=Date.now()+36e5;try{const e=r.headers.has("Expires")?Math.min(Date.parse(r.headers.get("Expires")),s):s;await ai.addAll(o,e)}catch(e){console.error(e)}return o}async function hi(e){const t=await pi;if(!t.hasOwnProperty(e))return null;const n=t[e];return n.aliasOf?await hi(n.aliasOf):n}var mi=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=ci;const e=Object.keys(this.conf.localBiblio).filter((e=>this.conf.localBiblio[e].hasOwnProperty("aliasOf"))).map((e=>this.conf.localBiblio[e].aliasOf)).filter((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).sort())),r=n.length?await async function(e){const t=[];try{await ai.ready;const n=e.map((async e=>({id:e,data:await ai.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):[],o={hasData:[],noData:[]};r.forEach((e=>{(e.data?o.hasData:o.noData).push(e)})),o.hasData.forEach((e=>{ci[e.id]=e.data}));const s=o.noData.map((e=>e.id));if(s.length){const e=await fi(s,{forceUpdate:!0});Object.assign(ci,e)}Object.assign(ci,this.conf.localBiblio),(()=>{di(this.conf.biblio)})()}},biblio:ci,name:"core/biblio",resolveRef:hi,updateFromNetwork:fi});const gi="core/render-biblio",bi=Un({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."}}),yi=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"]]),wi=(vi=".",e=>{const t=e.trim();return!t||t.endsWith(vi)?t:t+vi});var vi;function ki(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($i)),o=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),s=o.concat(r).sort(((e,t)=>e.ref.toLocaleLowerCase().localeCompare(t.ref.toLocaleLowerCase()))),i=kn`
+ >`}function ai(e){let t;try{t=function(e){const t=Xo.test(e),n=t?Jo:Zo,[r,s]=e.split(n);if(t&&r&&!s)throw new SyntaxError(`Internal slot missing "for" part. Expected \`{{ InterfaceName/${r}}}\` }.`);const o=r.split(/[./]/).concat(s).filter((e=>e&&e.trim())).map((e=>e.trim())),i=!e.includes("/"),a=[];for(;o.length;){const t=o.pop();if(Ho.test(t)){const[,e,n,r,s]=t.match(Ho),o=n.split(/,\s*/).filter((e=>e)),c=r?.trim(),l=s?.split(/,\s*/).filter((e=>e));a.push({type:"method",identifier:e,args:o,renderParent:i,renderText:c,renderArgs:l})}else if(Ko.test(t)){const[,e,n]=t.match(Ko);a.push({type:"enum",identifier:e,enumValue:n,renderParent:i})}else if(Bo.test(t)){const[,e]=t.match(Bo);i?a.push({type:"exception",identifier:e}):a.push({type:"enum",enumValue:e,renderParent:i})}else if(Go.test(t)){const[,e,n]=t.match(Go),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:i})}else if(Vo.test(t)&&o.length){const[,e]=t.match(Vo);a.push({type:"attribute",identifier:e,renderParent:i})}else if(Fo.test(t)){const e=t.endsWith("?"),n=e?t.slice(0,-1):t;a.push({type:"idl-primitive",identifier:n,renderParent:i,nullable:e})}else{if(!Yo.test(t)||0!==o.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:i,nullable:e})}}}return a.forEach(((e,t,n)=>{e.parent=n[t+1]||null})),a.reverse()}(e)}catch(t){const n=_n`{{ ${e} }}`,r="Error: Invalid inline IDL string.";return pr(t.message,"core/inlines",{title:r,elements:[n]}),n}const n=_n(document.createDocumentFragment()),r=[];for(const e of t)switch(e.type){case"base":{const t=Qo(e);t&&r.push(t);break}case"attribute":r.push(ni(e));break;case"internal-slot":r.push(ei(e));break;case"method":r.push(ri(e));break;case"enum":r.push(si(e));break;case"exception":r.push(oi(e));break;case"idl-primitive":r.push(ii(e));break;default:throw new Error("Unknown type.")}return n`${r}`}const ci=new Set(["alias","reference"]),li=async function(){const e=await Sn.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[...ci]){const r=e.transaction(n,"readwrite").store,s=IDBKeyRange.lowerBound(t);let o=await r.openCursor(s);for(;o?.value;){const e=o.value;(void 0===e.expires||e.expiresn[e].map((t=>this.add(e,t)))));await Promise.all(r)},async add(e,t){if(!ci.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?.expiresn.objectStore(e).clear()));await Promise.all(r)}},di={},pi=new URL("https://api.specref.org/bibrefs?refs="),hi=Nn({hint:"dns-prefetch",href:pi.origin});let fi;document.head.appendChild(hi);const mi=new Promise((e=>{fi=e}));async function gi(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(pi.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(),o=Date.now()+36e5;try{const e=r.headers.has("Expires")?Math.min(Date.parse(r.headers.get("Expires")),o):o;await ui.addAll(s,e)}catch(e){console.error(e)}return s}async function bi(e){const t=await mi;if(!t.hasOwnProperty(e))return null;const n=t[e];return n.aliasOf?await bi(n.aliasOf):n}var yi=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=di;const e=Object.keys(this.conf.localBiblio).filter((e=>this.conf.localBiblio[e].hasOwnProperty("aliasOf"))).map((e=>this.conf.localBiblio[e].aliasOf)).filter((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).sort())),r=n.length?await async function(e){const t=[];try{await ui.ready;const n=e.map((async e=>({id:e,data:await ui.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=>{di[e.id]=e.data}));const o=s.noData.map((e=>e.id));if(o.length){const e=await gi(o,{forceUpdate:!0});Object.assign(di,e)}Object.assign(di,this.conf.localBiblio),(()=>{fi(this.conf.biblio)})()}},biblio:di,name:"core/biblio",resolveRef:bi,updateFromNetwork:gi});const wi="core/render-biblio",vi=Bn({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."}}),ki=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"]]),$i=(xi=".",e=>{const t=e.trim();return!t||t.endsWith(xi)?t:t+xi});var xi;function _i(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(Si)),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),o=s.concat(r).sort(((e,t)=>e.ref.toLocaleLowerCase().localeCompare(t.ref.toLocaleLowerCase()))),i=_n`
${t}
-
${s.map(_i)}
- `;Kn(i,"",t);const a=function(e){return e.reduce(((e,t)=>{const n=t.refcontent.id;return(e.has(n)?e.get(n):e.set(n,[]).get(n)).push(t.ref),e}),new Map)}(n);return function(e,t){e.map((({ref:e,refcontent:n})=>{const r=`#bib-${e.toLowerCase()}`,o=t.get(n.id).map((e=>`a.bibref[href="#bib-${e.toLowerCase()}"]`)).join(",");return{refUrl:r,elems:document.querySelectorAll(o),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"}))}))}(o,a),function(e){for(const{ref:t}of e){const e=[...document.querySelectorAll(`a.bibref[href="#bib-${t.toLowerCase()}"]`)].filter((({textContent:e})=>e.toLowerCase()===t.toLowerCase()));lr(`Reference "[${t}]" not found.`,gi,{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),i}function $i(e){let t=ci[e],n=e;const r=new Set([n]);for(;t&&t.aliasOf;)if(r.has(t.aliasOf)){t=null;lr(`Circular reference in biblio DB between [\`${e}\`] and [\`${n}\`].`,gi)}else n=t.aliasOf,t=ci[n],r.add(n);return t&&!t.id&&(t.id=e.toLowerCase()),{ref:e,refcontent:t}}function xi(e,t){const n=e.replace(/^(!|\?)/,""),r=`#bib-${n.toLowerCase()}`,o=kn`${o.map(Ri)}
+ `;Xn(i,"",t);const a=function(e){return e.reduce(((e,t)=>{const n=t.refcontent.id;return(e.has(n)?e.get(n):e.set(n,[]).get(n)).push(t.ref),e}),new Map)}(n);return function(e,t){e.map((({ref:e,refcontent:n})=>{const r=`#bib-${e.toLowerCase()}`,s=t.get(n.id).map((e=>`a.bibref[href="#bib-${e.toLowerCase()}"]`)).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="#bib-${t.toLowerCase()}"]`)].filter((({textContent:e})=>e.toLowerCase()===t.toLowerCase()));pr(`Reference "[${t}]" not found.`,wi,{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),i}function Si(e){let t=di[e],n=e;const r=new Set([n]);for(;t&&t.aliasOf;)if(r.has(t.aliasOf)){t=null;pr(`Circular reference in biblio DB between [\`${e}\`] and [\`${n}\`].`,wi)}else n=t.aliasOf,t=di[n],r.add(n);return t&&!t.id&&(t.id=e.toLowerCase()),{ref:e,refcontent:t}}function Ci(e,t){const n=e.replace(/^(!|\?)/,""),r=`#bib-${n.toLowerCase()}`,s=_n`${t||n}`;return t?o:kn`[${o}]`}function _i(e){const{ref:t,refcontent:n}=e,r=`bib-${t.toLowerCase()}`;return kn`
+ >`;return t?s:_n`[${s}]`}function Ri(e){const{ref:t,refcontent:n}=e,r=`bib-${t.toLowerCase()}`;return _n`
`),r.classList.add("appendix"),n.length){const e=_i(n,vi.norm_references);r.appendChild(e)}if(t.length){const e=_i(t,vi.info_references);r.appendChild(e)}document.body.appendChild(r)}});const Li="core/inlines",Ti={},Pi=e=>new RegExp(e.map((e=>e.source)).join("|")),Ii=Bn({en:{rfc2119Keywords:()=>Pi([/\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:()=>Pi([/\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/])}}),Di=/(?:`[^`]+`)(?!`)/,Ni=/(?:{{[^}]+\?*}})/,ji=/\B\|\w[\w\s]*(?:\s*:[\w\s&;"?<>]+\??)?\|\B/,Oi=/(?:\[\[(?:!|\\|\?)?[\w.-]+(?:|[^\]]+)?\]\])/,zi=/(?:\[\[\[(?:!|\\|\?)?#?[\w-.]+\]\]\])/,qi=/(?:\[=[^=]+=\])/,Mi=/(?:\[\^[^^]+\^\])/;function Ui(e){const t=e.slice(2,-2).trim(),[n,r,s]=t.split("/",3).map((e=>e&&e.trim())).filter((e=>!!e)),[o,i,a]=t.startsWith("/")?["element-attr",null,n]:s?["attr-value",`${n}/${r}`,s]:r?["element-attr",n,r]:["element",null,n];return _n`${a}`}function qi(e){const t=Mn(e),n=kn`${t}`;return Ei[t]=!0,n}function Mi(e){const t=e.slice(3,-3).trim();return t.startsWith("#")?kn``:kn``}function Ui(e,t){const n=Mn(e.slice(2,-2));if(n.startsWith("\\"))return e.replace("\\","");const r=oi(n);return!!t.parentElement.closest("dfn,a")?Vi(`\`${r.textContent}\``):r}function Wi(e,t,n){const r=e.slice(2,-2);if(r.startsWith("\\"))return[`[[${r.slice(1)}]]`];const[o,s]=r.split("|").map(Mn),{type:i,illegal:a}=Qn(o,t.parentElement),c=xi(o,s),l=o.replace(/^(!|\?)/,"");if(a&&!n.normativeReferences.has(l)){const e=c.childNodes[1]||c;ur("Normative references in informative sections are not allowed. ",Ri,{elements:[e],hint:`Remove '!' from the start of the reference \`[[${r}]]\``})}return"informative"!==i||a?n.normativeReferences.add(l):n.informativeReferences.add(l),c.childNodes[1]?c.childNodes:[c]}function Fi(e,t,n){return"ABBR"===t.parentElement.tagName?e:kn`${e}`}function Bi(e){const t=e.slice(1,-1).split(":",2),[n,r]=t.map((e=>e.trim()));return kn`${n}`}function Hi(e){const t=function(e){const t=e=>e.replace("%%","/").split("/").map(Mn).join("/"),n=e.replace("\\/","%%"),r=n.lastIndexOf("/");if(-1===r)return[t(n)];const o=n.substring(0,r),s=n.substring(r+1,n.length);return[t(o),t(s)]}(e=e.slice(2,-2)),[n,r]=2===t.length?t:[null,t[0]],[o,s]=r.includes("|")?r.split("|",2).map((e=>e.trim())):[null,r],i=Gi(s),a=n?Mn(n):null;return kn``}function Wi(e){const t=Fn(e),n=_n`${t}`;return Ti[t]=!0,n}function Fi(e){const t=e.slice(3,-3).trim();return t.startsWith("#")?_n``:_n``}function Bi(e,t){const n=Fn(e.slice(2,-2));if(n.startsWith("\\"))return e.replace("\\","");const r=ai(n);return!!t.parentElement.closest("dfn,a")?Ki(`\`${r.textContent}\``):r}function Hi(e,t,n){const r=e.slice(2,-2);if(r.startsWith("\\"))return[`[[${r.slice(1)}]]`];const[s,o]=r.split("|").map(Fn),{type:i,illegal:a}=tr(s,t.parentElement),c=Ci(s,o),l=s.replace(/^(!|\?)/,"");if(a&&!n.normativeReferences.has(l)){const e=c.childNodes[1]||c;hr("Normative references in informative sections are not allowed. ",Li,{elements:[e],hint:`Remove '!' from the start of the reference \`[[${r}]]\``})}return"informative"!==i||a?n.normativeReferences.add(l):n.informativeReferences.add(l),c.childNodes[1]?c.childNodes:[c]}function Gi(e,t,n){return"ABBR"===t.parentElement.tagName?e:_n`${e}`}function Vi(e){const t=e.slice(1,-1).split(":",2),[n,r]=t.map((e=>e.trim()));return _n`${n}`}function Yi(e){const t=function(e){const t=e=>e.replace("%%","/").split("/").map(Fn).join("/"),n=e.replace("\\/","%%"),r=n.lastIndexOf("/");if(-1===r)return[t(n)];const s=n.substring(0,r),o=n.substring(r+1,n.length);return[t(s),t(o)]}(e=e.slice(2,-2)),[n,r]=2===t.length?t:[null,t[0]],[s,o]=r.includes("|")?r.split("|",2).map((e=>e.trim())):[null,r],i=Zi(o),a=n?Fn(n):null;return _n`${i}`}function Vi(e){const t=e.slice(1,-1);return kn`${t}`}function Gi(e){return Ti.test(e)?e.split(/(`[^`]+`)(?!`)/).map((e=>e.startsWith("`")?Vi(e):Gi(e))):document.createTextNode(e)}var Yi=Object.freeze({__proto__:null,name:Ri,rfc2119Usage:Ei,run:function(e){const t=new Map;document.normalize(),document.querySelector("section#conformance")||document.body.classList.add("informative"),e.normativeReferences=new rr,e.informativeReferences=new rr,e.respecRFC2119||(e.respecRFC2119=Ei);const n=document.querySelectorAll("abbr[title]:not(.exclude)");for(const{textContent:e,title:r}of n){const n=Mn(e),o=Mn(r);t.set(n,o)}const r=t.size?new RegExp(`(?:\\b${[...t.keys()].join("\\b)|(?:\\b")}\\b)`):null,o=function(e,t=[],n={wsNodes:!0}){const r=t.join(", "),o=document.createNodeIterator(e,NodeFilter.SHOW_TEXT,(e=>n.wsNodes||e.data.trim()?r&&e.parentElement.closest(r)?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_REJECT)),s=[];let i;for(;i=o.nextNode();)s.push(i);return s}(document.body,["#respec-ui",".head","pre","svg","script","style"],{wsNodes:!1}),s=Li.rfc2119Keywords(),i=new RegExp(`(${Ai([s,Pi,Ii,Di,Ni,ji,Ti,Oi,...r?[r]:[]]).source})`);for(const n of o){const r=n.data.split(i);if(1===r.length)continue;const o=document.createDocumentFragment();let a=!0;for(const i of r)if(a=!a,a)switch(!0){case i.startsWith("{{"):o.append(Ui(i,n));break;case i.startsWith("[[["):o.append(Mi(i));break;case i.startsWith("[["):o.append(...Wi(i,n,e));break;case i.startsWith("|"):o.append(Bi(i));break;case i.startsWith("[="):o.append(Hi(i));break;case i.startsWith("`"):o.append(Vi(i));break;case i.startsWith("[^"):o.append(zi(i));break;case t.has(i):o.append(Fi(i,n,t));break;case s.test(i):o.append(qi(i))}else o.append(i);n.replaceWith(o)}}});const Ki="w3c/conformance",Zi=Un({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)=>kn`
+ >`}function Ki(e){const t=e.slice(1,-1);return _n`${t}`}function Zi(e){return Di.test(e)?e.split(/(`[^`]+`)(?!`)/).map((e=>e.startsWith("`")?Ki(e):Zi(e))):document.createTextNode(e)}var Ji=Object.freeze({__proto__:null,name:Li,rfc2119Usage:Ti,run:function(e){const t=new Map;document.normalize(),document.querySelector("section#conformance")||document.body.classList.add("informative"),e.normativeReferences=new ir,e.informativeReferences=new ir,e.respecRFC2119||(e.respecRFC2119=Ti);const n=document.querySelectorAll("abbr[title]:not(.exclude)");for(const{textContent:e,title:r}of n){const n=Fn(e),s=Fn(r);t.set(n,s)}const r=t.size?new RegExp(`(?:\\b${[...t.keys()].join("\\b)|(?:\\b")}\\b)`):null,s=function(e,t=[],n={wsNodes:!0}){const r=t.join(", "),s=document.createNodeIterator(e,NodeFilter.SHOW_TEXT,(e=>n.wsNodes||e.data.trim()?r&&e.parentElement.closest(r)?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_REJECT)),o=[];let i;for(;i=s.nextNode();)o.push(i);return o}(document.body,["#respec-ui",".head","pre","svg","script","style"],{wsNodes:!1}),o=Ii.rfc2119Keywords(),i=new RegExp(`(${Pi([o,Ni,ji,Oi,zi,qi,Di,Mi,...r?[r]:[]]).source})`);for(const n of s){const r=n.data.split(i);if(1===r.length)continue;const s=document.createDocumentFragment();let a=!0;for(const i of r)if(a=!a,a)switch(!0){case i.startsWith("{{"):s.append(Bi(i,n));break;case i.startsWith("[[["):s.append(Fi(i));break;case i.startsWith("[["):s.append(...Hi(i,n,e));break;case i.startsWith("|"):s.append(Vi(i));break;case i.startsWith("[="):s.append(Yi(i));break;case i.startsWith("`"):s.append(Ki(i));break;case i.startsWith("[^"):s.append(Ui(i));break;case t.has(i):s.append(Gi(i,n,t));break;case o.test(i):s.append(Wi(i))}else s.append(i);n.replaceWith(s)}}});const Xi="w3c/conformance",Qi=Bn({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)=>_n`
The key word${t?"s":""} ${e} in this document
${t?"are":"is"} to be interpreted as described in
BCP 14
- ${xi("RFC2119")} ${xi("RFC8174")}
+ ${Ci("RFC2119")} ${Ci("RFC8174")}
when, and only when, ${t?"they appear":"it appears"} in all
capitals, as shown here.
-
`},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)=>kn`
+
`},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)=>_n`
${t?"Die Schlüsselwörter":"Das Schlüsselwort"} ${e} in
diesem Dokument ${t?"sind":"ist"} gemäß
BCP 14
- ${xi("RFC2119")} ${xi("RFC8174")}
+ ${Ci("RFC2119")} ${Ci("RFC8174")}
und unter Berücksichtigung von
2119de
zu interpretieren, wenn und nur wenn ${t?"sie":"es"} wie hier
gezeigt durchgehend groß geschrieben wurde${t?"n":""}.
-
- ${n.length?Zi.keywordInterpretation(r,o):null}
- `;e.prepend(...s.childNodes)}(t,e),!t&&Object.keys(Ei).length){ur("Document uses RFC2119 keywords but lacks a conformance section.",Ki,{hint:'Please add a ``.'})}}});function Qi(e,t,n,r){try{switch(t){case"element-attr":return document.createAttribute(e),!0;case"element":return document.createElement(e),!0}}catch(o){lr(`Invalid ${t} name "${e}": ${o.message}`,r,{hint:`Check that the ${t} name is allowed per the XML's Name production for ${t}.`,elements:[n]})}return!1}function Xi(e,t,n,r){if(/^[a-z]+(-[a-z]+)*$/i.test(e))return!0;return lr(`Invalid ${t} name "${e}".`,r,{hint:`Check that the ${t} name is allowed per the naming rules for this type.`,elements:[n]}),!1}const ea=new ar;function ta(e,t){for(const n of t)ea.has(n)||ea.set(n,new Set),ea.get(n).add(e)}const na="core/dfn",ra=new Map([["abstract-op",{requiresFor:!1}],["attr-value",{requiresFor:!0,associateWith:"a markup attribute",validator:Xi}],["element",{requiresFor:!1,validator:Qi}],["element-attr",{requiresFor:!1,validator:Qi}],["element-state",{requiresFor:!0,associateWith:"a markup attribute",validator:Xi}],["event",{requiresFor:!1,validator:Xi}],["http-header",{requiresFor:!1}],["media-type",{requiresFor:!1,validator:function(e,t,n,r){try{const t=new _n(e);if(t.toString()!==e)throw new Error(`Input doesn't match its canonical form: "${t}".`)}catch(o){return lr(`Invalid ${t} "${e}": ${o.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:Xi}],["permission",{requiresFor:!1,validator:function(e,t,n,r){return e.startsWith('"')&&e.endsWith('"')?Xi(e.slice(1,-1),t,n,r):(lr(`Invalid ${t} "${e}".`,r,{hint:`Check that the ${t} is quoted with double quotes.`,elements:[n]}),!1)}}]]),oa=[...ra.keys()];function sa(e,t){let n="";switch(!0){case oa.some((t=>e.classList.contains(t))):n=[...e.classList].find((e=>ra.has(e))),function(e,t,n){const r=ra.get(t);if(r.requiresFor&&!n.dataset.dfnFor){const e=gr`Definition of type "\`${t}\`" requires a ${"[data-dfn-for]"} attribute.`,{associateWith:o}=r,s=gr`Use a ${"[data-dfn-for]"} attribute to associate this with ${o}.`;lr(e,na,{hint:s,elements:[n]})}r.validator&&r.validator(e,t,n,na)}(t,n,e);break;case Fs.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=gr`Use a ${"[data-dfn-for]"} attribute to associate this dfn with a WebIDL interface.`;lr(`Internal slot "${e}" must be associated with a WebIDL interface.`,na,{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 o=["attribute","method"],{dfnType:s}=t.dataset;if(!o.includes(s)||r!==s){const n=gr`Invalid ${"[data-dfn-type]"} attribute on internal slot.`,s=`The only allowed types are: ${fr(o,{quotes:!0})}. The slot "${e}" seems to be a "${pr(r)}"?`;return lr(n,na,{hint:s,elements:[t]}),"dfn"}return s}(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 ia(e){switch(!0){case e.matches(".export.no-export"):lr(gr`Declares both "${"[no-export]"}" and "${"[export]"}" CSS class.`,na,{elements:[e],hint:"Please use only one."});break;case e.matches(".no-export, [data-noexport]"):if(e.matches("[data-export]")){lr(gr`Declares ${"[no-export]"} CSS class, but also has a "${"[data-export]"}" attribute.`,na,{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=""}}var aa=Object.freeze({__proto__:null,name:na,run:function(){for(const e of document.querySelectorAll("dfn")){const t=Zn(e);if(ta(e,t),e.dataset.cite&&/\b#\b/.test(e.dataset.cite))continue;const[n]=t;sa(e,n),ia(e);const r=(e.dataset.localLt||"").split("|").map(Mn),o=t.filter((e=>!r.includes(e)));(o.length>1||n!==Mn(e.textContent))&&(e.dataset.lt=o.join("|"))}}});var ca=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=Mn(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=Mn(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=Mn(n).toLowerCase(),o=Cn.isSingular(r)?Cn.plural(r):Cn.singular(r);return e.has(o)&&!t.has(o)?o:""}}();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("|"),ta(e,n)}}))}});var la=String.raw`span.example-title{text-transform:none}
+ `}});var ea=Object.freeze({__proto__:null,name:Xi,run:function(e){const t=document.querySelector("section#conformance");if(t&&!t.classList.contains("override")&&function(e,t){const n=[...Object.keys(Ti)];n.length&&(t.normativeReferences.add("RFC2119"),t.normativeReferences.add("RFC8174"));const r=Zn(n.sort(),(e=>_n`${e}`)),s=n.length>1,o=_n`
+
${Qi.conformance}
+
${Qi.normativity}
+ ${n.length?Qi.keywordInterpretation(r,s):null}
+ `;e.prepend(...o.childNodes)}(t,e),!t&&Object.keys(Ti).length){hr("Document uses RFC2119 keywords but lacks a conformance section.",Xi,{hint:'Please add a ``.'})}}});function ta(e,t,n,r){try{switch(t){case"element-attr":return document.createAttribute(e),!0;case"element":return document.createElement(e),!0}}catch(s){pr(`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 na(e,t,n,r){if(/^[a-z]+(-[a-z]+)*$/i.test(e))return!0;return pr(`Invalid ${t} name "${e}".`,r,{hint:`Check that the ${t} name is allowed per the naming rules for this type.`,elements:[n]}),!1}const ra=new ur;function sa(e,t){for(const n of t)ra.has(n)||ra.set(n,new Set),ra.get(n).add(e)}const oa="core/dfn",ia=new Map([["abstract-op",{requiresFor:!1}],["attr-value",{requiresFor:!0,associateWith:"a markup attribute",validator:na}],["element",{requiresFor:!1,validator:ta}],["element-attr",{requiresFor:!1,validator:ta}],["element-state",{requiresFor:!0,associateWith:"a markup attribute",validator:na}],["event",{requiresFor:!1,validator:na}],["http-header",{requiresFor:!1}],["media-type",{requiresFor:!1,validator:function(e,t,n,r){try{const t=new Rn(e);if(t.toString()!==e)throw new Error(`Input doesn't match its canonical form: "${t}".`)}catch(s){return pr(`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:na}],["permission",{requiresFor:!1,validator:function(e,t,n,r){return e.startsWith('"')&&e.endsWith('"')?na(e.slice(1,-1),t,n,r):(pr(`Invalid ${t} "${e}".`,r,{hint:`Check that the ${t} is quoted with double quotes.`,elements:[n]}),!1)}}]]),aa=[...ia.keys()];function ca(e,t){let n="";switch(!0){case aa.some((t=>e.classList.contains(t))):n=[...e.classList].find((e=>ia.has(e))),function(e,t,n){const r=ia.get(t);if(r.requiresFor&&!n.dataset.dfnFor){const e=wr`Definition of type "\`${t}\`" requires a ${"[data-dfn-for]"} attribute.`,{associateWith:s}=r,o=wr`Use a ${"[data-dfn-for]"} attribute to associate this with ${s}.`;pr(e,oa,{hint:o,elements:[n]})}r.validator&&r.validator(e,t,n,oa)}(t,n,e);break;case Go.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=wr`Use a ${"[data-dfn-for]"} attribute to associate this dfn with a WebIDL interface.`;pr(`Internal slot "${e}" must be associated with a WebIDL interface.`,oa,{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:o}=t.dataset;if(!s.includes(o)||r!==o){const n=wr`Invalid ${"[data-dfn-type]"} attribute on internal slot.`,o=`The only allowed types are: ${gr(s,{quotes:!0})}. The slot "${e}" seems to be a "${mr(r)}"?`;return pr(n,oa,{hint:o,elements:[t]}),"dfn"}return o}(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 la(e){switch(!0){case e.matches(".export.no-export"):pr(wr`Declares both "${"[no-export]"}" and "${"[export]"}" CSS class.`,oa,{elements:[e],hint:"Please use only one."});break;case e.matches(".no-export, [data-noexport]"):if(e.matches("[data-export]")){pr(wr`Declares ${"[no-export]"} CSS class, but also has a "${"[data-export]"}" attribute.`,oa,{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=""}}var ua=Object.freeze({__proto__:null,name:oa,run:function(){for(const e of document.querySelectorAll("dfn")){const t=Qn(e);if(sa(e,t),e.dataset.cite&&/\b#\b/.test(e.dataset.cite))continue;const[n]=t;ca(e,n),la(e);const r=(e.dataset.localLt||"").split("|").map(Fn),s=t.filter((e=>!r.includes(e)));(s.length>1||n!==Fn(e.textContent))&&(e.dataset.lt=s.join("|"))}}});var da=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=Fn(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=Fn(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=Fn(n).toLowerCase(),s=En.isSingular(r)?En.plural(r):En.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("|"),sa(e,n)}}))}});var pa=String.raw`span.example-title{text-transform:none}
:is(aside,div).example,div.illegal-example{padding:.5em;margin:1em 0;position:relative;clear:both}
div.illegal-example{color:red}
div.illegal-example p{color:#000}
-aside.example div.example{border-left-width:.1em;border-color:#999;background:#fff}`;const ua=Un({en:{example:"Example"},nl:{example:"Voorbeeld"},es:{example:"Ejemplo"},ko:{example:"예시"},ja:{example:"例"},de:{example:"Beispiel"},zh:{example:"例"},cs:{example:"Příklad"}});function da(e,t,n){n.title=e.title,n.title&&e.removeAttribute("title");const r=t>0?` ${t}`:"",o=n.title?kn`: ${n.title}`:"";return kn`
`;Xn(a,"example",r||String(t));a.querySelector("a.self-link").href=`#${a.id}`,e.replaceWith(a)}}))}});var ga=String.raw`.issue-label{text-transform:initial}
.warning>p:first-child{margin-top:0}
.warning{padding:.5em;border-left-width:.5em;border-left-style:solid}
span.warning{padding:.1em .5em .15em}
@@ -858,31 +858,31 @@ span.warning{padding:.1em .5em .15em}
.warning-title:before{content:"⚠";font-size:1.3em;float:left;padding-right:.3em;margin-top:-.3em}
li.task-list-item{list-style:none}
input.task-list-item-checkbox{margin:0 .35em .25em -1.6em;vertical-align:middle}
-.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 ha="core/issues-notes",ma=Un({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í"}});function ga(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}}(),o=document.createElement("ul");e.forEach((e=>{const{type:s,displayType:i,isFeatureAtRisk:a}=function(e){const t=e.classList.contains("issue"),n=e.classList.contains("warning"),r=e.classList.contains("ednote"),o=e.classList.contains("atrisk"),s=t?"issue":n?"warning":r?"ednote":"note",i=t?o?ma.feature_at_risk:ma.issue:n?ma.warning:r?ma.editors_note:ma.note;return{type:s,displayType:i,isFeatureAtRisk:o}}(e),c="issue"===s,l="span"===e.localName,{number:u}=e.dataset,d={title:e.title,number:r(e)};if(!l){const r=kn``,l=document.createElement("span"),p=kn`
${l}
`;Kn(p,"h",s);let f,h=i;if(e.id?(r.id=e.id,e.removeAttribute("id")):Kn(r,"issue-container",d.number?`number-${d.number}`:""),c){if(void 0!==d.number&&(h+=` ${d.number}`),e.dataset.hasOwnProperty("number")){const e=function(e,t,{isFeatureAtRisk:n=!1}={}){if(!n&&t.issueBase)return kn``;if(n&&t.atRiskBase)return kn``}(u,n,{isFeatureAtRisk:a});if(e&&(l.before(e),e.append(l)),l.classList.add("issue-number"),f=t.get(u),!f){ur(`Failed to fetch issue number ${u}.`,ha)}f&&!d.title&&(d.title=f.title)}o.append(function(e,t,n){const r=`${e}${t.number?` ${t.number}`:""}`,o=t.title?kn`: ${t.title}`:"";return kn`
`),t.appendChild(n));else if(t){ur("Using best practices summary (#bp-summary) but no best practices found.",ya),t.remove()}}});const xa="core/figures",_a=Un({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"},zh:{fig:"图 ",list_of_figures:"规范中包含的图"},de:{fig:"Abbildung",list_of_figures:"Abbildungsverzeichnis"}});var Ca=Object.freeze({__proto__:null,name:xa,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;Kn(e,"fig",r),Xn(t,kn``),t.prepend(kn`${_a.fig}${n+1}`," ")}(t,r,n),e.push(function(e,t){const n=t.cloneNode(!0);return n.querySelectorAll("a").forEach((e=>{Jn(e,"span").removeAttribute("href")})),kn`
`),t.appendChild(n));else if(t){hr("Using best practices summary (#bp-summary) but no best practices found.",ka),t.remove()}}});const Ca="core/figures",Ra=Bn({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"},zh:{fig:"图 ",list_of_figures:"规范中包含的图"},de:{fig:"Abbildung",list_of_figures:"Abbildungsverzeichnis"}});var Ea=Object.freeze({__proto__:null,name:Ca,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;Xn(e,"fig",r),nr(t,_n``),t.prepend(_n`${Ra.fig}${n+1}`," ")}(t,r,n),e.push(function(e,t){const n=t.cloneNode(!0);return n.querySelectorAll("a").forEach((e=>{er(e,"span").removeAttribute("href")})),_n`
` without a ``.",xa,{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=er(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(kn`
${_a.list_of_figures}
`,kn`
+ `}(t.id,r));else{hr("Found a `` without a ``.",Ca,{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=rr(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(_n`
${Ra.list_of_figures}
`,_n`
${e}
-
`))}});const Sa=Un({en:{list_of_tables:"List of Tables",table:"Table "}});var Ra=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");!function(e,t,n){const r=t.textContent;Kn(e,"table",r),Xn(t,kn``),t.prepend(kn`${Sa.table}${n+1}`," ")}(t,r,n),e.push(function(e,t){const n=t.cloneNode(!0);for(const e of n.querySelectorAll("a"))Jn(e,"span",{copyAttributes:!1});return kn`
+
`))}});const Aa=Bn({en:{list_of_tables:"List of Tables",table:"Table "}});var La=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");!function(e,t,n){const r=t.textContent;Xn(e,"table",r),nr(t,_n``),t.prepend(_n`${Aa.table}${n+1}`," ")}(t,r,n),e.push(function(e,t){const n=t.cloneNode(!0);for(const e of n.querySelectorAll("a"))er(e,"span",{copyAttributes:!1});return _n`
`}()}
- `;e.append(r);for(const e of r.querySelectorAll(".index-term"))Kn(e,"index-term");vr("toc",Oc,{once:!0}),vr("beforesave",Wc)}});const Bc="core/contrib";var Hc=Object.freeze({__proto__:null,name:Bc,run:async function(e){if(!document.getElementById("gh-contributors"))return;if(!e.github){return void lr(gr`Requested list of contributors from GitHub, but ${"[github]"} configuration option is not set.`,Bc)}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 o();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 kn(t)`${n.map((({name:e,login:t})=>`
`))}`;const r=n.map((e=>e.name||e.login));t.textContent=On(r)}(r,n):n.textContent="Failed to fetch contributors.";async function o(){const{href:n}=new URL("contributors",t);try{const t=await Hn(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 lr("Error loading contributors from GitHub.",Bc,{cause:e}),null}}}(t,n)}});var Vc=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=>e)).forEach((e=>{const t=Math.min(function(e,t){const n=[];for(;e!=e.ownerDocument.body;)e.matches(t)&&n.push(e),e=e.parentElement;return n}(e,"section").length+1,6);Jn(e,`h${t}`)}))}});var Gc=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(Tn)));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),Xn(r,document.createElement("code")),Ya(r)}});const Yc=["h2","h3","h4","h5","h6"],Kc="core/structure",Zc=Un({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"},de:{toc:"Inhaltsverzeichnis",back_to_top:"Zurück nach oben"},cs:{toc:"Obsah",back_to_top:"Zpět na začátek"}});function Jc(e,t,{prefix:n=""}={}){let r=!1,o=0,s=1;if(n.length&&!n.endsWith(".")&&(n+="."),0===e.length)return null;const i=kn``;for(const a of e){!a.isAppendix||n||r||(o=s,r=!0);let e=a.isIntro?"":r?Qc(s-o+1):n+s;const c=e.split(".").length;if(1===c&&(e+=".",a.header.before(document.createComment("OddPage"))),a.isIntro||(s+=1,a.header.prepend(kn`${e} `)),c<=t){const n=a.header.id||a.element.id,r=el(a.header,n),o=Jc(a.subsections,t,{prefix:e});o&&r.append(o),i.append(r)}}return i}function Qc(e){let t="";for(;e>0;)e-=1,t=String.fromCharCode(65+e%26)+t,e=Math.floor(e/26);return t}function Xc(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(!Yc.includes(r.localName))continue;const o=r.textContent;Kn(e,null,o),n.push({element:e,header:r,title:o,isIntro:Boolean(e.closest(".introductory")),isAppendix:e.classList.contains("appendix"),subsections:Xc(e)})}return n}function el(e,t){const n=kn``;var r;return n.append(...e.cloneNode(!0).childNodes),(r=n).querySelectorAll("a").forEach((e=>{const t=Jn(e,"span");t.className="formerLink",t.removeAttribute("href")})),r.querySelectorAll("dfn").forEach((e=>{Jn(e,"span").removeAttribute("id")})),kn`
${n}
`}var tl=Object.freeze({__proto__:null,name:Kc,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=`h${Math.min(tr(e,"section").length+1,6)}`;e.localName!==t&&Jn(e,t)}))}(),!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)){lr("`data-max-toc` must have a value between 0-6 (inclusive).",Kc,{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=Jc(Xc(document.body),e.maxTocLevel);t&&function(e){if(!e)return;const t=kn``,n=kn`
`;document.body.append(o)}(t)}wr("toc")}});const nl=Un({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í."}});var rl=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=>e)).forEach((e=>{e.after(kn`
`))}`;const r=n.map((e=>e.name||e.login));t.textContent=Mn(r)}(r,n):n.textContent="Failed to fetch contributors.";async function s(){const{href:n}=new URL("contributors",t);try{const t=await Yn(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 pr("Error loading contributors from GitHub.",Vc,{cause:e}),null}}}(t,n)}});var Kc=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=>e)).forEach((e=>{const t=Math.min(function(e,t){const n=[];for(;e!=e.ownerDocument.body;)e.matches(t)&&n.push(e),e=e.parentElement;return n}(e,"section").length+1,6);er(e,`h${t}`)}))}});var Zc=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(Dn)));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),nr(r,document.createElement("code")),Ja(r)}});const Jc=["h2","h3","h4","h5","h6"],Xc="core/structure",Qc=Bn({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"},de:{toc:"Inhaltsverzeichnis",back_to_top:"Zurück nach oben"},cs:{toc:"Obsah",back_to_top:"Zpět na začátek"}});function el(e,t,{prefix:n=""}={}){let r=!1,s=0,o=1;if(n.length&&!n.endsWith(".")&&(n+="."),0===e.length)return null;const i=_n``;for(const a of e){!a.isAppendix||n||r||(s=o,r=!0);let e=a.isIntro?"":r?tl(o-s+1):n+o;const c=e.split(".").length;if(1===c&&(e+=".",a.header.before(document.createComment("OddPage"))),a.isIntro||(o+=1,a.header.prepend(_n`${e} `)),c<=t){const n=a.header.id||a.element.id,r=rl(a.header,n),s=el(a.subsections,t,{prefix:e});s&&r.append(s),i.append(r)}}return i}function tl(e){let t="";for(;e>0;)e-=1,t=String.fromCharCode(65+e%26)+t,e=Math.floor(e/26);return t}function nl(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(!Jc.includes(r.localName))continue;const s=r.textContent;Xn(e,null,s),n.push({element:e,header:r,title:s,isIntro:Boolean(e.closest(".introductory")),isAppendix:e.classList.contains("appendix"),subsections:nl(e)})}return n}function rl(e,t){const n=_n``;var r;return n.append(...e.cloneNode(!0).childNodes),(r=n).querySelectorAll("a").forEach((e=>{const t=er(e,"span");t.className="formerLink",t.removeAttribute("href")})),r.querySelectorAll("dfn").forEach((e=>{er(e,"span").removeAttribute("id")})),_n`
${n}
`}var sl=Object.freeze({__proto__:null,name:Xc,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=`h${Math.min(sr(e,"section").length+1,6)}`;e.localName!==t&&er(e,t)}))}(),!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)){pr("`data-max-toc` must have a value between 0-6 (inclusive).",Xc,{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=el(nl(document.body),e.maxTocLevel);t&&function(e){if(!e)return;const t=_n``,n=_n`
`;document.body.append(s)}(t)}$r("toc")}});const ol=Bn({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í."}});var il=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=>e)).forEach((e=>{e.after(_n`
`));return s.push(kn``));return o.push(_n`More info`),s}(e,t))).catch((e=>function(e,t,n){const r=`Failed to retrieve feature "${t.feature}".`,o=gr`Please check the feature key on [caniuse.com](https://caniuse.com) and update ${"[caniuse]"}.`;return lr(r,al,{hint:o,cause:e}),kn`caniuse.com`}(e,t,n))),s=kn`
Browser support:
+ >`),o}(e,t))).catch((e=>function(e,t,n){const r=`Failed to retrieve feature "${t.feature}".`,s=wr`Please check the feature key on [caniuse.com](https://caniuse.com) and update ${"[caniuse]"}.`;return pr(r,ul,{hint:s,cause:e}),_n`caniuse.com`}(e,t,n))),o=_n`
Browser support:
- ${{any:o,placeholder:"Fetching data from caniuse.com..."}}
-
`;r.append(...s.childNodes),await o,wr("amend-user-config",{caniuse:t.feature}),t.removeOnSave&&(r.querySelectorAll(".caniuse-browser").forEach((e=>e.classList.add("removeOnSave"))),vr("beforesave",(e=>{kn.bind(e.querySelector(".caniuse-stats"))`
- caniuse.com`})))}});var pl=String.raw`.mdn{font-size:.75em;position:absolute;right:.3em;min-width:0;margin-top:3rem}
+ ${{any:s,placeholder:"Fetching data from caniuse.com..."}}
+ `;r.append(...o.childNodes),await s,$r("amend-user-config",{caniuse:t.feature}),t.removeOnSave&&(r.querySelectorAll(".caniuse-browser").forEach((e=>e.classList.add("removeOnSave"))),xr("beforesave",(e=>{_n.bind(e.querySelector(".caniuse-stats"))`
+ caniuse.com`})))}});var ml=String.raw`.mdn{font-size:.75em;position:absolute;right:.3em;min-width:0;margin-top:3rem}
.mdn details{width:100%;margin:1px 0;position:relative;z-index:10;box-sizing:border-box;padding:.4em;padding-top:0}
.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}
.mdn summary{text-align:right;cursor:default;margin-right:-.4em}
@@ -1040,33 +1040,33 @@ img.caniuse-browser{filter:drop-shadow(0 0 .1cm #666);background:0 0}
.mdn .safari::before{background-image:url(https://www.w3.org/assets/logos/browser-logos/safari/safari.svg)}
.mdn .safari_ios::before{background-image:url(https://www.w3.org/assets/logos/browser-logos/safari-ios/safari-ios.svg)}
.mdn .samsunginternet_android::before{background-image:url(https://www.w3.org/assets/logos/browser-logos/samsung-internet/samsung-internet.svg)}
-.mdn .webview_android::before{background-image:url(https://www.w3.org/assets/logos/browser-logos/android-webview/android-webview.png)}`;const fl="core/mdn-annotation",hl="https://w3c.github.io/mdn-spec-links/",ml="https://developer.mozilla.org/en-US/docs/Web/",gl={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"},bl=Un({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 yl(e){const t=e.closest("section");if(!t)return;const{previousElementSibling:n}=t;if(n&&n.classList.contains("mdn"))return n;const r=kn``;return t.before(r),r}function wl(e){const{name:t,slug:n,summary:r,support:o,engines:s}=e,i=n.slice(n.indexOf("/")+1),a=`${ml}${n}`,c=`Expand MDN details for ${t}`,l=function(e){if(3===e.length)return kn`✅`;if(e.length<2)return kn`🚫`;return kn``}(s);return kn`
+.mdn .webview_android::before{background-image:url(https://www.w3.org/assets/logos/browser-logos/android-webview/android-webview.png)}`;const gl="core/mdn-annotation",bl="https://w3c.github.io/mdn-spec-links/",yl="https://developer.mozilla.org/en-US/docs/Web/",wl={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"},vl=Bn({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 kl(e){const t=e.closest("section");if(!t)return;const{previousElementSibling:n}=t;if(n&&n.classList.contains("mdn"))return n;const r=_n``;return t.before(r),r}function $l(e){const{name:t,slug:n,summary:r,support:s,engines:o}=e,i=n.slice(n.indexOf("/")+1),a=`${yl}${n}`,c=`Expand MDN details for ${t}`,l=function(e){if(3===e.length)return _n`✅`;if(e.length<2)return _n`🚫`;return _n``}(o);return _n`MDN${l}${i}
- ${function(e){if(3===e.length)return kn`
`}
- `}var vl=Object.freeze({__proto__:null,name:fl,run:async function(e){const t=function(e){const{shortName:t,mdn:n}=e;if(!n)return;return"string"==typeof n?n:n.key||t}(e);if(!t)return;const n=await async function(e,t){const{baseJsonPath:n=hl,maxAge:r=864e5}=t,o=new URL(`${e}.json`,n).href,s=await Hn(o,r);if(404===s.status){return void lr(`Could not find MDN data associated with key "${e}".`,fl,{hint:"Please add a valid key to `respecConfig.mdn`"})}return await s.json()}(t,e.mdn);if(!n)return;const r=document.createElement("style");r.textContent=pl,document.head.append(r);for(const e of function(e){return[...document.body.querySelectorAll("[id]:not(script)")].filter((({id:t})=>Array.isArray(e[t])))}(n)){const t=n[e.id],r=yl(e);if(r)for(const e of t)r.append(wl(e))}}});const kl="ui/save-html",$l=Un({en:{save_snapshot:"Export"},nl:{save_snapshot:"Bewaar Snapshot"},ja:{save_snapshot:"保存する"},de:{save_snapshot:"Exportieren"},zh:{save_snapshot:"导出"}}),xl=[{id:"respec-save-as-html",ext:"html",title:"HTML",type:"text/html",get href(){return xr(this.type)}},{id:"respec-save-as-xml",ext:"xhtml",title:"XML",type:"application/xml",get href(){return xr(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 _l=Object.freeze({__proto__:null,exportDocument:function(e,t){return ur("Exporting via ui/save-html module's `exportDocument()` is deprecated and will be removed.",kl,{hint:"Use core/exporter `rsDocToDataURL()` instead."}),xr(t)},name:kl,run:function(e){const t={async show(t){await document.respec.ready;const n=kn`
`}
+ `}var xl=Object.freeze({__proto__:null,name:gl,run:async function(e){const t=function(e){const{shortName:t,mdn:n}=e;if(!n)return;return"string"==typeof n?n:n.key||t}(e);if(!t)return;const n=await async function(e,t){const{baseJsonPath:n=bl,maxAge:r=864e5}=t,s=new URL(`${e}.json`,n).href,o=await Yn(s,r);if(404===o.status){return void pr(`Could not find MDN data associated with key "${e}".`,gl,{hint:"Please add a valid key to `respecConfig.mdn`"})}return await o.json()}(t,e.mdn);if(!n)return;const r=document.createElement("style");r.textContent=ml,document.head.append(r);for(const e of function(e){return[...document.body.querySelectorAll("[id]:not(script)")].filter((({id:t})=>Array.isArray(e[t])))}(n)){const t=n[e.id],r=kl(e);if(r)for(const e of t)r.append($l(e))}}});const _l="ui/save-html",Sl=Bn({en:{save_snapshot:"Export"},nl:{save_snapshot:"Bewaar Snapshot"},ja:{save_snapshot:"保存する"},de:{save_snapshot:"Exportieren"},zh:{save_snapshot:"导出"}}),Cl=[{id:"respec-save-as-html",ext:"html",title:"HTML",type:"text/html",get href(){return Cr(this.type)}},{id:"respec-save-as-xml",ext:"xhtml",title:"XML",type:"application/xml",get href(){return Cr(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 Rl=Object.freeze({__proto__:null,exportDocument:function(e,t){return hr("Exporting via ui/save-html module's `exportDocument()` is deprecated and will be removed.",_l,{hint:"Use core/exporter `rsDocToDataURL()` instead."}),Cr(t)},name:_l,run:function(e){const t={async show(t){await document.respec.ready;const n=_n`
- `}var zl=Object.freeze({__proto__:null});var ql=Object.freeze({__proto__:null,name:"core/seo",run:function(e){if(e.gitRevision){const t=kn``;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 Ml="w3c/seo",Ul={NOTE:"w3p:NOTE",WD:"w3p:WD",LC:"w3p:LastCall",CR:"w3p:CR",CRD:"w3p:CRD",PR:"w3p:PR",REC:"w3p:REC",RSCND:"w3p:RSCND"},Wl=new Set([...zo,...qo,...Mo,"BG-FINAL","CG-FINAL","CRY","DRY","draft-finding","finding"]);function Fl({name:e,url:t,mailto:n,company:r,companyURL:o}){const s={type:"Person",name:e,url:t,"foaf:mbox":n};return(r||o)&&(s.worksFor={name:r,url:o}),s}function Bl(e){const{href:t,title:n,href:r}=e,o={id:t,type:"TechArticle",name:n,url:r};return e.authors&&(o.creator=e.authors.map((e=>({name:e})))),e.rawDate&&(o.publishedDate=e.rawDate),e.isbn&&(o.identifier=e.isbn),e.publisher&&(o.publisher={name:e.publisher}),o}var Hl=Object.freeze({__proto__:null,name:Ml,requiresCanonicalLink:Wl,run:async function(e){if((e.canonicalURI||Wl.has(e.specStatus))&&e.shortName){switch(e.canonicalURI){case"edDraft":if(e.edDraftURI)e.canonicalURI=new URL(e.edDraftURI,document.location.href).href;else{ur("Canonical URI set to edDraft, but no edDraftURI is set in configuration",Ml),e.canonicalURI=null}break;case"TR":if(e.latestVersion)e.canonicalURI=e.latestVersion;else{ur("Canonical URI set to TR, but no shortName is set in configuration",Ml),e.canonicalURI=null}break;default:e.latestVersion&&!e.canonicalURI&&(e.canonicalURI=e.latestVersion)}if(e.canonicalURI){const t=kn``;document.head.appendChild(t)}e.doJsonLd&&await async function(e,t){const n=Ul[e.specStatus],r=["TechArticle"];n&&r.push(n);const o={"@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];o.copyrightHolder=[o.copyrightHolder,...t.map((e=>({name:e})))]}const s=t.head.querySelector("meta[name=description]");s&&(o.description=s.content);e.editors&&(o.editor=e.editors.map(Fl));e.authors&&(o.contributor=e.authors.map(Fl));const i=[...e.normativeReferences,...e.informativeReferences],a=await Promise.all(i.map((e=>hi(e))));o.citation=a.filter((e=>"object"==typeof e)).map(Bl);const c=t.createElement("script");c.type="application/ld+json",c.textContent=JSON.stringify(o,null,2),t.head.appendChild(c)}(e,document)}}});var Vl=String.raw`.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}
+ />`;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 Fl="w3c/seo",Bl={NOTE:"w3p:NOTE",WD:"w3p:WD",LC:"w3p:LastCall",CR:"w3p:CR",CRD:"w3p:CRD",PR:"w3p:PR",REC:"w3p:REC",RSCND:"w3p:RSCND"},Hl=new Set([...Ms,...Us,...Ws,"BG-FINAL","CG-FINAL","CRY","DRY","draft-finding","finding"]);function Gl({name:e,url:t,mailto:n,company:r,companyURL:s}){const o={type:"Person",name:e,url:t,"foaf:mbox":n};return(r||s)&&(o.worksFor={name:r,url:s}),o}function Vl(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 Yl=Object.freeze({__proto__:null,name:Fl,requiresCanonicalLink:Hl,run:async function(e){if((e.canonicalURI||Hl.has(e.specStatus))&&e.shortName){switch(e.canonicalURI){case"edDraft":if(e.edDraftURI)e.canonicalURI=new URL(e.edDraftURI,document.location.href).href;else{hr("Canonical URI set to edDraft, but no edDraftURI is set in configuration",Fl),e.canonicalURI=null}break;case"TR":if(e.latestVersion)e.canonicalURI=e.latestVersion;else{hr("Canonical URI set to TR, but no shortName is set in configuration",Fl),e.canonicalURI=null}break;default:e.latestVersion&&!e.canonicalURI&&(e.canonicalURI=e.latestVersion)}if(e.canonicalURI){const t=_n``;document.head.appendChild(t)}e.doJsonLd&&await async function(e,t){const n=Bl[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 o=t.head.querySelector("meta[name=description]");o&&(s.description=o.content);e.editors&&(s.editor=e.editors.map(Gl));e.authors&&(s.contributor=e.authors.map(Gl));const i=[...e.normativeReferences,...e.informativeReferences],a=await Promise.all(i.map((e=>bi(e))));s.citation=a.filter((e=>"object"==typeof e)).map(Vl);const c=t.createElement("script");c.type="application/ld+json",c.textContent=JSON.stringify(s,null,2),t.head.appendChild(c)}(e,document)}}});var Kl=String.raw`.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}
@media (prefers-color-scheme:dark){
.hljs{--base:#282c34;--mono-1:#abb2bf;--mono-2:#818896;--mono-3:#5c6370;--hue-1:#56b6c2;--hue-2:#61aeee;--hue-3:#c678dd;--hue-4:#98c379;--hue-5:#e06c75;--hue-5-2:#be5046;--hue-6:#d19a66;--hue-6-2:#e6c07b}
}
@@ -1113,21 +1113,21 @@ img.caniuse-browser{filter:drop-shadow(0 0 .1cm #666);background:0 0}
.hljs-bullet,.hljs-link,.hljs-meta,.hljs-selector-id,.hljs-symbol,.hljs-title{color:#336ae3;color:var(--hue-2,#336ae3)}
.hljs-emphasis{font-style:italic}
.hljs-strong{font-weight:700}
-.hljs-link{text-decoration:underline}`;async function Gl(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 Yl=Pn({hint:"preload",href:"https://www.w3.org/Tools/respec/respec-highlight",as:"script"});document.head.appendChild(Yl);const Kl=async function(){const e=await async function(){try{return(await Promise.resolve().then((function(){return Pd}))).default}catch{return Gl("worker/respec-worker.js")}}(),t=URL.createObjectURL(new Blob([e],{type:"application/javascript"}));return new Worker(t)}();n("core/worker",Kl.then((e=>({worker:e}))));const Zl=function(e,t=0){const n=function*(e,t){for(;;)yield`${e}:${t}`,t++}(e,t);return()=>n.next().value}("highlight");async function Jl(e){e.setAttribute("aria-busy","true");const t=(n=e.classList,Array.from(n).filter((e=>"highlight"!==e&&"nolinks"!==e)).map((e=>e.toLowerCase())));var n;let r;try{r=await async function(e,t){const n={action:"highlight",code:e,id:Zl(),languages:t},r=await Kl;return r.postMessage(n),new Promise(((e,t)=>{const o=setTimeout((()=>{t(new Error("Timed out waiting for highlight."))}),4e3);r.addEventListener("message",(function t(s){const{data:{id:i,language:a,value:c}}=s;i===n.id&&(r.removeEventListener("message",t),clearTimeout(o),e({language:a,value:c}))}))}))}(e.innerText,t)}catch(e){return void console.error(e)}const{language:o,value:s}=r;switch(e.localName){case"pre":e.classList.remove(o),e.innerHTML=`${s}`,e.classList.length||e.removeAttribute("class");break;case"code":e.innerHTML=s,e.classList.add("hljs"),o&&e.classList.add(o)}e.setAttribute("aria-busy","false")}var Ql=Object.freeze({__proto__:null,name:"core/highlight",run:async function(e){if(e.noHighlightCSS)return;const t=[...document.querySelectorAll("\n pre:not(.idl):not(.nohighlight) > code:not(.nohighlight),\n pre:not(.idl):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(Jl);document.head.appendChild(kn``),await Promise.all(n)}});const Xl=Un({en:{missing_test_suite_uri:gr`Found tests in your spec, but missing ${"[testSuiteURI]"} in your ReSpec config.`,tests:"tests",test:"test"},ja:{missing_test_suite_uri:gr`この仕様内にテストの項目を検出しましたが,ReSpec の設定に ${"[testSuiteURI]"} が見つかりません.`,tests:"テスト",test:"テスト"},de:{missing_test_suite_uri:gr`Die Spezifikation enthält Tests, aber in der ReSpec-Konfiguration ist keine ${"[testSuiteURI]"} angegeben.`,tests:"Tests",test:"Test"},zh:{missing_test_suite_uri:gr`本规范中包含测试,但在 ReSpec 配置中缺少 ${"[testSuiteURI]"}。`,tests:"测试",test:"测试"}}),eu="core/data-tests";function tu(e){const t=[],[n]=new URL(e).pathname.split("/").reverse(),r=n.split(".");let[o]=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"),o=o.replace(".https",""),t.push(e)}if(o.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"),o=o.replace("-manual",""),t.push(e)}return kn`
+.hljs-link{text-decoration:underline}`;async function Zl(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 Jl=Nn({hint:"preload",href:"https://www.w3.org/Tools/respec/respec-highlight",as:"script"});document.head.appendChild(Jl);const Xl=async function(){const e=await async function(){try{return(await Promise.resolve().then((function(){return Nd}))).default}catch{return Zl("worker/respec-worker.js")}}(),t=URL.createObjectURL(new Blob([e],{type:"application/javascript"}));return new Worker(t)}();n("core/worker",Xl.then((e=>({worker:e}))));const Ql=function(e,t=0){const n=function*(e,t){for(;;)yield`${e}:${t}`,t++}(e,t);return()=>n.next().value}("highlight");async function eu(e){e.setAttribute("aria-busy","true");const t=(n=e.classList,Array.from(n).filter((e=>"highlight"!==e&&"nolinks"!==e)).map((e=>e.toLowerCase())));var n;let r;try{r=await async function(e,t){const n={action:"highlight",code:e,id:Ql(),languages:t},r=await Xl;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(o){const{data:{id:i,language:a,value:c}}=o;i===n.id&&(r.removeEventListener("message",t),clearTimeout(s),e({language:a,value:c}))}))}))}(e.innerText,t)}catch(e){return void console.error(e)}const{language:s,value:o}=r;switch(e.localName){case"pre":e.classList.remove(s),e.innerHTML=`${o}`,e.classList.length||e.removeAttribute("class");break;case"code":e.innerHTML=o,e.classList.add("hljs"),s&&e.classList.add(s)}e.setAttribute("aria-busy","false")}var tu=Object.freeze({__proto__:null,name:"core/highlight",run:async function(e){if(e.noHighlightCSS)return;const t=[...document.querySelectorAll("\n pre:not(.idl):not(.nohighlight) > code:not(.nohighlight),\n pre:not(.idl):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(eu);document.head.appendChild(_n``),await Promise.all(n)}});const nu=Bn({en:{missing_test_suite_uri:wr`Found tests in your spec, but missing ${"[testSuiteURI]"} in your ReSpec config.`,tests:"tests",test:"test"},ja:{missing_test_suite_uri:wr`この仕様内にテストの項目を検出しましたが,ReSpec の設定に ${"[testSuiteURI]"} が見つかりません.`,tests:"テスト",test:"テスト"},de:{missing_test_suite_uri:wr`Die Spezifikation enthält Tests, aber in der ReSpec-Konfiguration ist keine ${"[testSuiteURI]"} angegeben.`,tests:"Tests",test:"Test"},zh:{missing_test_suite_uri:wr`本规范中包含测试,但在 ReSpec 配置中缺少 ${"[testSuiteURI]"}。`,tests:"测试",test:"测试"}}),ru="core/data-tests";function su(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 _n`
- `}function nu(e,t,n){return e.map((e=>{try{return new URL(e,t).href}catch{ur(gr`Invalid URL in ${"[data-tests]"} attribute: ${e}.`,eu,{elements:[n]})}})).filter((e=>e))}function ru(e,t){const n=e.filter(((e,t,n)=>n.indexOf(e)!==t));if(n.length){const e=gr`Duplicate tests found in the ${"[data-tests]"} attribute.`,r=gr`To fix, remove duplicates from ${"[data-tests]"}: ${hr(n,{quotes:!0})}.`;ur(e,eu,{hint:r,elements:[t]})}}function ou(e){const t=[...new Set(e)];return kn`
+ `}function ou(e,t,n){return e.map((e=>{try{return new URL(e,t).href}catch{hr(wr`Invalid URL in ${"[data-tests]"} attribute: ${e}.`,ru,{elements:[n]})}})).filter((e=>e))}function iu(e,t){const n=e.filter(((e,t,n)=>n.indexOf(e)!==t));if(n.length){const e=wr`Duplicate tests found in the ${"[data-tests]"} attribute.`,r=wr`To fix, remove duplicates from ${"[data-tests]"}: ${br(n,{quotes:!0})}.`;hr(e,ru,{hint:r,elements:[t]})}}function au(e){const t=[...new Set(e)];return _n`
tests: ${t.length}
- ${t.map(tu)}
+ ${t.map(su)}
- `}var su=Object.freeze({__proto__:null,name:eu,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=nu(n.dataset.tests.split(/,/gm).map((e=>e.trim())),e.testSuiteURI,n);ru(t,n);const r=ou(t);n.append(r)}else lr(Xl.missing_test_suite_uri,eu)}});const iu="core/list-sorter";function au(e){const t="ascending"===e?1:-1;return({textContent:e},{textContent:n})=>t*e.trim().localeCompare(n.trim())}function cu(e,t){return[...e.querySelectorAll(":scope > li")].sort(au(t)).reduce(((e,t)=>(e.appendChild(t),e)),document.createDocumentFragment())}function lu(e,t){return[...e.querySelectorAll(":scope > dt")].sort(au(t)).reduce(((e,t)=>{const{nodeType:n,nodeName:r}=t,o=document.createDocumentFragment();let{nextSibling:s}=t;for(;s&&s.nextSibling;){o.appendChild(s.cloneNode(!0));const{nodeType:e,nodeName:t}=s.nextSibling;if(e===n&&t===r)break;s=s.nextSibling}return o.prepend(t.cloneNode(!0)),e.appendChild(o),e}),document.createDocumentFragment())}var uu=Object.freeze({__proto__:null,name:iu,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=lu(t,n);break;case"ol":case"ul":e=cu(t,n);break;default:ur(`ReSpec can't sort ${t.localName} elements.`,iu,{elements:[t]})}if(e){const n=document.createRange();n.selectNodeContents(t),n.deleteContents(),t.appendChild(e)}}},sortDefinitionTerms:lu,sortListItems:cu});var du=String.raw`var:hover{text-decoration:underline;cursor:pointer}
+ `}var cu=Object.freeze({__proto__:null,name:ru,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=ou(n.dataset.tests.split(/,/gm).map((e=>e.trim())),e.testSuiteURI,n);iu(t,n);const r=au(t);n.append(r)}else pr(nu.missing_test_suite_uri,ru)}});const lu="core/list-sorter";function uu(e){const t="ascending"===e?1:-1;return({textContent:e},{textContent:n})=>t*e.trim().localeCompare(n.trim())}function du(e,t){return[...e.querySelectorAll(":scope > li")].sort(uu(t)).reduce(((e,t)=>(e.appendChild(t),e)),document.createDocumentFragment())}function pu(e,t){return[...e.querySelectorAll(":scope > dt")].sort(uu(t)).reduce(((e,t)=>{const{nodeType:n,nodeName:r}=t,s=document.createDocumentFragment();let{nextSibling:o}=t;for(;o&&o.nextSibling;){s.appendChild(o.cloneNode(!0));const{nodeType:e,nodeName:t}=o.nextSibling;if(e===n&&t===r)break;o=o.nextSibling}return s.prepend(t.cloneNode(!0)),e.appendChild(s),e}),document.createDocumentFragment())}var hu=Object.freeze({__proto__:null,name:lu,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=pu(t,n);break;case"ol":case"ul":e=du(t,n);break;default:hr(`ReSpec can't sort ${t.localName} elements.`,lu,{elements:[t]})}if(e){const n=document.createRange();n.selectNodeContents(t),n.deleteContents(),t.appendChild(e)}}},sortDefinitionTerms:pu,sortListItems:du});var fu=String.raw`var:hover{text-decoration:underline;cursor:pointer}
var.respec-hl{color:var(--color,#000);background-color:var(--bg-color);box-shadow:0 0 0 2px var(--bg-color)}
@media (prefers-color-scheme:dark){
var.respec-hl{filter:saturate(.9) brightness(.9)}
@@ -1141,15 +1141,15 @@ var.respec-hl-c6{--bg-color:#82ddff}
var.respec-hl-c7{--bg-color:#ffbcf2}
@media print{
var.respec-hl{background:0 0;color:#000;box-shadow:unset}
-}`;var pu=Object.freeze({__proto__:null,name:"core/highlight-vars",run:async function(e){if(!e.highlightVars)return;const t=document.createElement("style");t.textContent=du,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 Id}))).default}catch{return Gl("./src/core/highlight-vars.runtime.js")}}(),document.body.append(n),vr("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 fu=String.raw`var{position:relative;cursor:pointer}
+}`;var mu=Object.freeze({__proto__:null,name:"core/highlight-vars",run:async function(e){if(!e.highlightVars)return;const t=document.createElement("style");t.textContent=fu,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 jd}))).default}catch{return Zl("./src/core/highlight-vars.runtime.js")}}(),document.body.append(n),xr("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 gu=String.raw`var{position:relative;cursor:pointer}
var[data-type]::after,var[data-type]::before{position:absolute;left:50%;top:-6px;opacity:0;transition:opacity .4s;pointer-events:none}
var[data-type]::before{content:"";transform:translateX(-50%);border-width:4px 6px 0 6px;border-style:solid;border-color:transparent;border-top-color:#222}
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}
-var[data-type]:hover::after,var[data-type]:hover::before{opacity:1}`;var hu=Object.freeze({__proto__:null,name:"core/data-type",run:function(e){if(!e.highlightVars)return;const t=document.createElement("style");t.textContent=fu,document.head.appendChild(t);let n=null;const r=new Map,o=document.querySelectorAll("section var");for(const e of o){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 o=r.get(e.textContent.trim());o&&(e.dataset.type=o)}}});var mu=String.raw`:root{--assertion-border:#aaa;--assertion-bg:#eee;--assertion-text:black}
+var[data-type]:hover::after,var[data-type]:hover::before{opacity:1}`;var bu=Object.freeze({__proto__:null,name:"core/data-type",run:function(e){if(!e.highlightVars)return;const t=document.createElement("style");t.textContent=gu,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)}}});var yu=String.raw`:root{--assertion-border:#aaa;--assertion-bg:#eee;--assertion-text:black}
.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)}
@media (prefers-color-scheme:dark){
:root{--assertion-border:#444;--assertion-bg:var(--borderedblock-bg);--assertion-text:var(--text)}
-}`;var gu=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(kn`Assert`,": "))}const t=document.createElement("style");t.textContent=mu,document.head.appendChild(t)}});const bu="core/anchor-expander";function yu(e,t,n){const r=e.querySelector(".marker .self-link");if(!r){n.textContent=n.getAttribute("href");return void lr(`Found matching element "${t}", but it has no title or marker.`,bu,{title:"Missing title.",elements:[n]})}const o=or(r);n.append(...o.childNodes),n.classList.add("box-ref")}function wu(e,t,n){const r=e.querySelector("figcaption");if(!r){n.textContent=n.getAttribute("href");return void lr(`Found matching figure "${t}", but figure is lacking a \`\`.`,bu,{title:"Missing figcaption in referenced figure.",elements:[n]})}const o=[...or(r.querySelector(".self-link")).childNodes].map((e=>(e.classList?.remove("figno"),e)));n.append(...o),n.classList.add("fig-ref");const s=r.querySelector(".fig-title");!n.hasAttribute("title")&&s&&(n.title=Mn(s.textContent))}function vu(e,t,n){if(!e.classList.contains("numbered"))return;const r=e.querySelector("caption");if(!r){n.textContent=n.getAttribute("href");return void lr(`Found matching table "${t}", but table is lacking a \`
\`.`,bu,{title:"Missing caption in referenced table.",elements:[n]})}const o=[...or(r.querySelector(".self-link")).childNodes].map((e=>(e.classList?.remove("tableno"),e)));n.append(...o),n.classList.add("table-ref");const s=r.querySelector(".table-title");!n.hasAttribute("title")&&s&&(n.title=Mn(s.textContent))}function ku(e,t,n){const r=e.querySelector("h6, h5, h4, h3, h2");if(r)$u(r,n),xu(r,n);else{n.textContent=n.getAttribute("href");lr("Found matching section, but the section was lacking a heading element.",bu,{title:`No matching id in document: "${t}".`,elements:[n]})}}function $u(e,t){const n=e.querySelector(".self-link"),r=[...or(e).childNodes].filter((e=>!e.classList||!e.classList.contains("self-link")));t.append(...r),n&&t.prepend("§ "),t.classList.add("sec-ref"),t.lastChild.nodeType===Node.TEXT_NODE&&(t.lastChild.textContent=t.lastChild.textContent.trimEnd()),t.querySelectorAll("a").forEach((e=>{const t=Jn(e,"span");for(const e of[...t.attributes])t.removeAttributeNode(e)}))}function xu(e,t){for(const n of["dir","lang"]){if(t.hasAttribute(n))continue;const r=e.closest(`[${n}]`);if(!r)continue;const o=t.closest(`[${n}]`);o&&o.getAttribute(n)===r.getAttribute(n)||t.setAttribute(n,r.getAttribute(n))}}var _u=Object.freeze({__proto__:null,name:bu,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":$u(n,t);break;case"section":ku(n,e,t);break;case"figure":wu(n,e,t);break;case"table":vu(n,e,t);break;case"aside":case"div":yu(n,e,t);break;default:t.textContent=t.getAttribute("href");lr("ReSpec doesn't support expanding this kind of reference.",bu,{title:`Can't expand "#${e}".`,elements:[t]})}xu(n,t),t.normalize()}else{t.textContent=t.getAttribute("href");lr(`Couldn't expand inline reference. The id "${e}" is not in the document.`,bu,{title:`No matching id in document: ${e}.`,elements:[t]})}}}});var Cu=String.raw`dfn{cursor:pointer}
+}`;var wu=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(_n`Assert`,": "))}const t=document.createElement("style");t.textContent=yu,document.head.appendChild(t)}});const vu="core/anchor-expander";function ku(e,t,n){const r=e.querySelector(".marker .self-link");if(!r){n.textContent=n.getAttribute("href");return void pr(`Found matching element "${t}", but it has no title or marker.`,vu,{title:"Missing title.",elements:[n]})}const s=ar(r);n.append(...s.childNodes),n.classList.add("box-ref")}function $u(e,t,n){const r=e.querySelector("figcaption");if(!r){n.textContent=n.getAttribute("href");return void pr(`Found matching figure "${t}", but figure is lacking a \`\`.`,vu,{title:"Missing figcaption in referenced figure.",elements:[n]})}const s=[...ar(r.querySelector(".self-link")).childNodes].map((e=>(e.classList?.remove("figno"),e)));n.append(...s),n.classList.add("fig-ref");const o=r.querySelector(".fig-title");!n.hasAttribute("title")&&o&&(n.title=Fn(o.textContent))}function xu(e,t,n){if(!e.classList.contains("numbered"))return;const r=e.querySelector("caption");if(!r){n.textContent=n.getAttribute("href");return void pr(`Found matching table "${t}", but table is lacking a \`
\`.`,vu,{title:"Missing caption in referenced table.",elements:[n]})}const s=[...ar(r.querySelector(".self-link")).childNodes].map((e=>(e.classList?.remove("tableno"),e)));n.append(...s),n.classList.add("table-ref");const o=r.querySelector(".table-title");!n.hasAttribute("title")&&o&&(n.title=Fn(o.textContent))}function _u(e,t,n){const r=e.querySelector("h6, h5, h4, h3, h2");if(r)Su(r,n),Cu(r,n);else{n.textContent=n.getAttribute("href");pr("Found matching section, but the section was lacking a heading element.",vu,{title:`No matching id in document: "${t}".`,elements:[n]})}}function Su(e,t){const n=e.querySelector(".self-link"),r=[...ar(e).childNodes].filter((e=>!e.classList||!e.classList.contains("self-link")));t.append(...r),n&&t.prepend("§ "),t.classList.add("sec-ref"),t.lastChild.nodeType===Node.TEXT_NODE&&(t.lastChild.textContent=t.lastChild.textContent.trimEnd()),t.querySelectorAll("a").forEach((e=>{const t=er(e,"span");for(const e of[...t.attributes])t.removeAttributeNode(e)}))}function Cu(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 Ru=Object.freeze({__proto__:null,name:vu,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":Su(n,t);break;case"section":_u(n,e,t);break;case"figure":$u(n,e,t);break;case"table":xu(n,e,t);break;case"aside":case"div":ku(n,e,t);break;default:t.textContent=t.getAttribute("href");pr("ReSpec doesn't support expanding this kind of reference.",vu,{title:`Can't expand "#${e}".`,elements:[t]})}Cu(n,t),t.normalize()}else{t.textContent=t.getAttribute("href");pr(`Couldn't expand inline reference. The id "${e}" is not in the document.`,vu,{title:`No matching id in document: ${e}.`,elements:[t]})}}}});var Eu=String.raw`dfn{cursor:pointer}
.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}
.dfn-panel:not(.docked)>.caret{position:absolute;top:-9px}
.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}
@@ -1166,28 +1166,28 @@ var[data-type]:hover::after,var[data-type]:hover::before{opacity:1}`;var hu=Obje
.dfn-panel a[href]:hover{border-bottom-width:1px}
.dfn-panel ul{padding:0}
.dfn-panel li{margin-left:1em}
-.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 Su(e){const{id:t}=e,n=e.dataset.href||`#${t}`,r=document.querySelectorAll(`a[href="${n}"]:not(.index-term)`),o=`dfn-panel-for-${e.id}`,s=e.getAttribute("aria-label")||Mn(e.textContent),i=kn`
+.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 Au(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}`,o=e.getAttribute("aria-label")||Fn(e.textContent),i=_n`
`}))}(e,r))).catch((e=>pr(e.message,Tu,{elements:[this],cause:e}))).finally((()=>{this.dispatchEvent(new CustomEvent("done"))})),placeholder:"Loading list of commits..."}}
- `}};async function Lu(e,t,n,r,o){let s;try{const i=await ms;if(!i)throw new Error("`respecConfig.github` is not set");const a=r||i.fullName,c=new URL("commits",`${i.apiBase}/${a}/`);c.searchParams.set("from",e),c.searchParams.set("to",t),o&&c.searchParams.set("path",o);const l=await fetch(c.href);if(!l.ok)throw new Error(`Request to ${c} failed with status code ${l.status}`);if(s=await l.json(),!s.length)throw new Error(`No commits between ${e}..${t}.`);s=s.filter(n)}catch(e){const t=`Error loading commits from GitHub. ${e.message}`;throw new Error(t,{cause:e})}return s}const Tu=[Object.freeze({__proto__:null,element:Au,name:Eu})];var Pu=Object.freeze({__proto__:null,name:"core/custom-elements/index",run:async function(){Tu.forEach((e=>{customElements.define(e.name,e.element)}));const e=Tu.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 Iu=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),o=n?"removeOnSave":null;document.head.append(kn`{customElements.define(e.name,e.element)}));const e=Du.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 ju=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(_n``)}});var Du=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 Nu="core/before-save";var ju=Object.freeze({__proto__:null,name:Nu,run:function(e){if(e.beforeSave)if(Array.isArray(e.beforeSave)&&!e.beforeSave.some((e=>"function"!=typeof e||"AsyncFunction"===e.constructor.name)))vr("beforesave",(t=>{!function(e,t){let n=0;for(const r of e)try{r(t)}catch(e){lr(gr`Function ${`\`${r.name}\``||`at position ${n}`}\` threw an error during processing of ${"[beforeSave]"}.`,Nu,{hint:"See developer console.",cause:e})}finally{n++}}(e.beforeSave,t.ownerDocument)}),{once:!0});else{lr(gr`${"[beforeSave]"} configuration option must be an array of synchronous JS functions.`,Nu)}}});const Ou="core/linter-rules/check-charset",zu=Un({en:{msg:"Document must only contain one `` tag with charset set to 'utf-8'",hint:'Add this line in your document `` section - `` or set charset to "utf-8" if not set already.'},zh:{msg:"文档只能包含一个 charset 属性为 utf-8 的 `` 标签",hint:'将此行添加到文档的 `` 部分—— `` 或将 charset 设置为 utf-8(如果尚未设置)。'},cs:{msg:"Dokument smí obsahovat pouze jeden tag `` s charset nastaveným na 'utf-8'",hint:'Přidejte tento řádek do sekce `` vašeho dokumentu - `` nebo nastavte charset na "utf-8", pokud ještě není nastaven.'}});var qu=Object.freeze({__proto__:null,name:Ou,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||ur(zu.msg,Ou,{hint:zu.hint,elements:[...t]})}});const Mu="core/linter-rules/check-punctuation",Uu=[".",":","!","?"],Wu=Uu.map((e=>`"${e}"`)).join(", "),Fu=Un({en:{msg:"`p` elements should end with a punctuation mark.",hint:`Please make sure \`p\` elements end with one of: ${Wu}.`},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ů: ${Wu}.`}});var Bu=Object.freeze({__proto__:null,name:Mu,run:function(e){if(!e.lint?.["check-punctuation"])return;const t=new RegExp(`[${Uu.join("")}\\]]$|^ *$`,"m"),n=[...document.querySelectorAll("p:not(#back-to-top,#w3c-state)")].filter((e=>!t.test(e.textContent.trim())));n.length&&ur(Fu.msg,Mu,{hint:Fu.hint,elements:n})}});const Hu="core/linter-rules/check-internal-slots",Vu=Un({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 Gu=Object.freeze({__proto__:null,name:Hu,run:function(e){if(!e.lint?.["check-internal-slots"])return;const t=[...document.querySelectorAll("var+a")].filter((({previousSibling:{nodeName:e}})=>e&&"VAR"===e));t.length&&ur(Vu.msg,Hu,{hint:Vu.hint,elements:t})}});const Yu="core/linter-rules/local-refs-exist",Ku=Un({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 Zu(e){const t=e.getAttribute("href").substring(1),n=e.ownerDocument;return!n.getElementById(t)&&!n.getElementsByName(t).length}var Ju=Object.freeze({__proto__:null,name:Yu,run:function(e){if(!e.lint?.["local-refs-exist"])return;const t=[...document.querySelectorAll("a[href^='#']")].filter(Zu);t.length&&ur(Ku.msg,Yu,{hint:Ku.hint,elements:t})}});const Qu="core/linter-rules/no-captionless-tables",Xu=Un({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 ed=Object.freeze({__proto__:null,name:Qu,run:function(e){if(!e.lint?.["no-captionless-tables"])return;const t=[...document.querySelectorAll("table.numbered")].filter((e=>!(e.firstElementChild instanceof HTMLTableCaptionElement)));t.length&&ur(Xu.msg,Qu,{hint:Xu.hint,elements:t})}});const td="no-unused-dfns",nd="core/linter-rules/no-unused-dfns",rd=Un({en:{msg:e=>`Found definition for "${e}", but nothing links to it. This is usually a spec bug!`,get hint(){return gr`
+ class="${s}"
+ />`)}});var Ou=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 zu="core/before-save";var qu=Object.freeze({__proto__:null,name:zu,run:function(e){if(e.beforeSave)if(Array.isArray(e.beforeSave)&&!e.beforeSave.some((e=>"function"!=typeof e||"AsyncFunction"===e.constructor.name)))xr("beforesave",(t=>{!function(e,t){let n=0;for(const r of e)try{r(t)}catch(e){pr(wr`Function ${`\`${r.name}\``||`at position ${n}`}\` threw an error during processing of ${"[beforeSave]"}.`,zu,{hint:"See developer console.",cause:e})}finally{n++}}(e.beforeSave,t.ownerDocument)}),{once:!0});else{pr(wr`${"[beforeSave]"} configuration option must be an array of synchronous JS functions.`,zu)}}});const Mu="core/linter-rules/check-charset",Uu=Bn({en:{msg:"Document must only contain one `` tag with charset set to 'utf-8'",hint:'Add this line in your document `` section - `` or set charset to "utf-8" if not set already.'},zh:{msg:"文档只能包含一个 charset 属性为 utf-8 的 `` 标签",hint:'将此行添加到文档的 `` 部分—— `` 或将 charset 设置为 utf-8(如果尚未设置)。'},cs:{msg:"Dokument smí obsahovat pouze jeden tag `` s charset nastaveným na 'utf-8'",hint:'Přidejte tento řádek do sekce `` vašeho dokumentu - `` nebo nastavte charset na "utf-8", pokud ještě není nastaven.'}});var Wu=Object.freeze({__proto__:null,name:Mu,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||hr(Uu.msg,Mu,{hint:Uu.hint,elements:[...t]})}});const Fu="core/linter-rules/check-punctuation",Bu=[".",":","!","?"],Hu=Bu.map((e=>`"${e}"`)).join(", "),Gu=Bn({en:{msg:"`p` elements should end with a punctuation mark.",hint:`Please make sure \`p\` elements end with one of: ${Hu}.`},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ů: ${Hu}.`}});var Vu=Object.freeze({__proto__:null,name:Fu,run:function(e){if(!e.lint?.["check-punctuation"])return;const t=new RegExp(`[${Bu.join("")}\\]]$|^ *$`,"m"),n=[...document.querySelectorAll("p:not(#back-to-top,#w3c-state)")].filter((e=>!t.test(e.textContent.trim())));n.length&&hr(Gu.msg,Fu,{hint:Gu.hint,elements:n})}});const Yu="core/linter-rules/check-internal-slots",Ku=Bn({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 Zu=Object.freeze({__proto__:null,name:Yu,run:function(e){if(!e.lint?.["check-internal-slots"])return;const t=[...document.querySelectorAll("var+a")].filter((({previousSibling:{nodeName:e}})=>e&&"VAR"===e));t.length&&hr(Ku.msg,Yu,{hint:Ku.hint,elements:t})}});const Ju="core/linter-rules/local-refs-exist",Xu=Bn({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 Qu(e){const t=e.getAttribute("href").substring(1),n=e.ownerDocument;return!n.getElementById(t)&&!n.getElementsByName(t).length}var ed=Object.freeze({__proto__:null,name:Ju,run:function(e){if(!e.lint?.["local-refs-exist"])return;const t=[...document.querySelectorAll("a[href^='#']")].filter(Qu);t.length&&hr(Xu.msg,Ju,{hint:Xu.hint,elements:t})}});const td="core/linter-rules/no-captionless-tables",nd=Bn({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 rd=Object.freeze({__proto__:null,name:td,run:function(e){if(!e.lint?.["no-captionless-tables"])return;const t=[...document.querySelectorAll("table.numbered")].filter((e=>!(e.firstElementChild instanceof HTMLTableCaptionElement)));t.length&&hr(nd.msg,td,{hint:nd.hint,elements:t})}});const sd="no-unused-dfns",od="core/linter-rules/no-unused-dfns",id=Bn({en:{msg:e=>`Found definition for "${e}", but nothing links to it. This is usually a spec bug!`,get hint(){return wr`
You can do one of the following...
* Add a \`class="lint-ignore"\` attribute the definition.
* Either remove the definition or change \`\` to another type of HTML element.
* If you meant to ${"[export|#data-export]"} the definition, add \`class="export"\` to the definition.
- 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 gr`
+ 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 wr`
Můžete udělat jedno z následujícího...
* Přidejte k definici atribut \`class="lint-ignore"\`.
* Definici buď odstraňte, nebo změňte \`\` na jiný typ HTML elementu.
* Pokud jste chtěli ${"[export|#data-export]"} tuto definici, přidejte k ní \`class="export"\`.
- Pro úplné potlačení tohoto varování nastavte \`lint: { "no-unused-dfns": false }\` ve vaší \`respecConfig\`.`}}});function od(e){return!document.querySelector(`a[href="#${e.id}"]:not(.index-term, .self-link)`)}var sd=Object.freeze({__proto__:null,name:nd,run:function(e){if(!e.lint?.[td])return;const t="error"===e.lint[td]?lr:ur;[...document.querySelectorAll("dfn:not(.lint-ignore, [data-export], [data-cite])")].filter(od).forEach((e=>{const n=[e],r=Mn(e.textContent);t(rd.msg(r),nd,{elements:n,hint:rd.hint})}))}});const id="core/linter-rules/no-headingless-sections",ad=Un({en:{msg:"All sections must start with a `h2-6` element.",hint:"Add a `h2-6` to the offending section or use a `
`."},nl:{msg:"Alle secties moeten beginnen met een `h2-6` element.",hint:"Voeg een `h2-6` toe aan de conflicterende sectie of gebruik een `
`。"},cs:{msg:"Všechny sekce musí začínat elementem `h2-6`.",hint:"Přidejte do problematické sekce `h2-6` nebo použijte `
`."}});var cd=Object.freeze({__proto__:null,name:id,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&&ur(ad.msg,id,{hint:ad.hint,elements:t})}});const ld="core/linter-rules/no-unused-vars",ud=Un({en:{msg:"Variable was defined, but never used.",hint:"Add a `data-ignore-unused` attribute to the ``."},cs:{msg:"Proměnná byla definována, ale nikdy nebyla použita.",hint:"Přidejte atribut `data-ignore-unused` k elementu ``."}});var dd=Object.freeze({__proto__:null,name:ld,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 o=new Map;for(const e of r){const t=Mn(e.textContent);(o.get(t)||o.set(t,[]).get(t)).push(e)}for(const e of o.values())1!==e.length||e[0].hasAttribute("data-ignore-unused")||t.push(e[0])}t.length&&ur(ud.msg,ld,{hint:ud.hint,elements:t})}});const pd="required-sections",fd="w3c/linter-rules/required-sections",hd={en:{msg:e=>`W3C Recommendation track documents require a separate "${e}" section.`,hint:e=>gr`Add a \`\` with a "${e}" header. See the [Horizontal review guidelines](https://www.w3.org/Guide/documentreview/#how_to_get_horizontal_review).
+ Pro úplné potlačení tohoto varování nastavte \`lint: { "no-unused-dfns": false }\` ve vaší \`respecConfig\`.`}}});function ad(e){return!document.querySelector(`a[href="#${e.id}"]:not(.index-term, .self-link)`)}var cd=Object.freeze({__proto__:null,name:od,run:function(e){if(!e.lint?.[sd])return;const t="error"===e.lint[sd]?pr:hr;[...document.querySelectorAll("dfn:not(.lint-ignore, [data-export], [data-cite])")].filter(ad).forEach((e=>{const n=[e],r=Fn(e.textContent);t(id.msg(r),od,{elements:n,hint:id.hint})}))}});const ld="core/linter-rules/no-headingless-sections",ud=Bn({en:{msg:"All sections must start with a `h2-6` element.",hint:"Add a `h2-6` to the offending section or use a `
`."},nl:{msg:"Alle secties moeten beginnen met een `h2-6` element.",hint:"Voeg een `h2-6` toe aan de conflicterende sectie of gebruik een `
`。"},cs:{msg:"Všechny sekce musí začínat elementem `h2-6`.",hint:"Přidejte do problematické sekce `h2-6` nebo použijte `
`."}});var dd=Object.freeze({__proto__:null,name:ld,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&&hr(ud.msg,ld,{hint:ud.hint,elements:t})}});const pd="core/linter-rules/no-unused-vars",hd=Bn({en:{msg:"Variable was defined, but never used.",hint:"Add a `data-ignore-unused` attribute to the ``."},cs:{msg:"Proměnná byla definována, ale nikdy nebyla použita.",hint:"Přidejte atribut `data-ignore-unused` k elementu ``."}});var fd=Object.freeze({__proto__:null,name:pd,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=Fn(e.textContent);(s.get(t)||s.set(t,[]).get(t)).push(e)}for(const e of s.values())1!==e.length||e[0].hasAttribute("data-ignore-unused")||t.push(e[0])}t.length&&hr(hd.msg,pd,{hint:hd.hint,elements:t})}});const md="required-sections",gd="w3c/linter-rules/required-sections",bd={en:{msg:e=>`W3C Recommendation track documents require a separate "${e}" section.`,hint:e=>wr`Add a \`\` with a "${e}" header. See the [Horizontal review guidelines](https://www.w3.org/Guide/documentreview/#how_to_get_horizontal_review).
If the document is not intended for the W3C Recommendation track, set ${"[noRecTrack]"} to \`true\`
- or turn off the ${`[${pd}]`} 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=>gr`Agrega una \`\` con título "${e}". Ver los [Horizontal review guidelines](https://www.w3.org/Guide/documentreview/#how_to_get_horizontal_review).
+ or turn off the ${`[${md}]`} 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=>wr`Agrega una \`\` con título "${e}". Ver los [Horizontal review guidelines](https://www.w3.org/Guide/documentreview/#how_to_get_horizontal_review).
Si el documento no está destinado a ser un W3C Recommendation, puedes poner ${"[noRecTrack]"} a \`true\`
- o apaga la regla de linter ${`[${pd}]`}.`,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=>gr`Přidejte \`\` s nadpisem "${e}". Viz [Horizontal review guidelines](https://www.w3.org/Guide/documentreview/#how_to_get_horizontal_review).
+ o apaga la regla de linter ${`[${md}]`}.`,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=>wr`Přidejte \`\` s nadpisem "${e}". Viz [Horizontal review guidelines](https://www.w3.org/Guide/documentreview/#how_to_get_horizontal_review).
Pokud dokument není určen pro "W3C Recommendation track", nastavte ${"[noRecTrack]"} na \`true\`
- nebo vypněte linter pravidlo ${`[${pd}]`}.
- `,privacy_considerations:"Zásady ochrany soukromí",security_considerations:"Zásady bezpečnosti"}},md=Un(hd),gd=new Set([...qo]);gd.delete("DISC"),zo.forEach((e=>gd.delete(e)));var bd=Object.freeze({__proto__:null,name:fd,requiresSomeSectionStatus:gd,run:function(e){if(!e.lint?.[pd])return;if(!Wn(hd,"privacy_considerations")){return void ur("Cannot check for required sections as translations are not available.",fd,{hint:"File an issue to add translations or use a supported language."})}if(e.noRecTrack||!gd.has(e.specStatus))return;const t="error"===e.lint[pd]?lr:ur,n=new rr([md.privacy_considerations,md.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=Mn(t.textContent);if(n.has(r)&&(n.delete(r),0===n.size))return}for(const e of n)t(md.msg(e),fd,{hint:md.hint(e)})}});const yd="core/linter-rules/wpt-tests-exist",wd=Un({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 vd=Object.freeze({__proto__:null,name:yd,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 ur("Failed to parse WPT directory from testSuiteURI",`linter/${yd}`),console.error(e),null}const r=new URL("web-platform-tests/wpt/files",`${t}/`);r.searchParams.set("path",n);const o=await fetch(r);if(!o.ok){return ur(`Failed to fetch files from WPT repository. Request failed with error: ${await o.text()} (${o.status})`,`linter/${yd}`),null}const{entries:s}=await o.json(),i=s.filter((e=>!e.endsWith("/")));return new Set(i)}(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=>{ur(`${wd.msg} \`${t}\`.`,yd,{hint:wd.hint,elements:[e]})}))}});const kd="core/linter-rules/no-http-props",$d=Un({en:{msg:gr`Insecure URLs are not allowed in ${"[respecConfig]"}.`,hint:"Please change the following properties to 'https://': "},zh:{msg:gr`${"[respecConfig]"} 中不允许使用不安全的URL.`,hint:"请将以下属性更改为 https://:"},cs:{msg:gr`V ${"[respecConfig]"} nejsou povoleny nezabezpečené URL adresy.`,hint:"Změňte prosím následující vlastnosti na 'https://': "}});var xd=Object.freeze({__proto__:null,name:kd,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=On(t,(e=>gr`${`[${e}]`}`));ur($d.msg,kd,{hint:$d.hint+e})}}});const _d="core/linter-rules/a11y",Cd=["color-contrast","landmark-one-main","landmark-unique","region"];function Sd(e){const t=[];for(const n of e.split("\n\n")){const[e,...r]=n.split(/^\s{2}/m),o=r.map((e=>`- ${e.trimEnd()}`)).join("\n");t.push(`${e}${o}`)}return t.join("\n\n")}var Rd=Object.freeze({__proto__:null,name:_d,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(Cd.map((e=>[e,{enabled:!1}]))),...t},...n,elementRef:!0,resultTypes:["violations"],reporter:"v1"};let o;try{o=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 lr("Failed to load a11y linter.",_d),console.error(e),[]}try{return(await o.run(document,r)).violations}catch(e){return lr("Error while looking for a11y issues.",_d),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;(t.get(e)||t.set(e,[]).get(e)).push(r)}const{id:n,help:r,description:o,helpUrl:s}=e,i=`a11y/${n}: ${r}.`;for(const[e,n]of t){const t=Sd(e);ur(i,_d,{details:`\n\n${o}.\n\n${t}. ([Learn more](${s}))`,elements:n})}}}});const Ed="informative-dfn",Ad="core/linter-rules/informative-dfn",Ld=Un({en:{msg:(e,t)=>`Normative reference to "${e}" found but term is defined "informatively" in "${t}".`,get hint(){return gr`
+ nebo vypněte linter pravidlo ${`[${md}]`}.
+ `,privacy_considerations:"Zásady ochrany soukromí",security_considerations:"Zásady bezpečnosti"}},yd=Bn(bd),wd=new Set([...Us]);wd.delete("DISC"),Ms.forEach((e=>wd.delete(e)));var vd=Object.freeze({__proto__:null,name:gd,requiresSomeSectionStatus:wd,run:function(e){if(!e.lint?.[md])return;if(!Hn(bd,"privacy_considerations")){return void hr("Cannot check for required sections as translations are not available.",gd,{hint:"File an issue to add translations or use a supported language."})}if(e.noRecTrack||!wd.has(e.specStatus))return;const t="error"===e.lint[md]?pr:hr,n=new ir([yd.privacy_considerations,yd.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=Fn(t.textContent);if(n.has(r)&&(n.delete(r),0===n.size))return}for(const e of n)t(yd.msg(e),gd,{hint:yd.hint(e)})}});const kd="core/linter-rules/wpt-tests-exist",$d=Bn({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 xd=Object.freeze({__proto__:null,name:kd,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 hr("Failed to parse WPT directory from testSuiteURI",`linter/${kd}`),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 hr(`Failed to fetch files from WPT repository. Request failed with error: ${await s.text()} (${s.status})`,`linter/${kd}`),null}const{entries:o}=await s.json(),i=o.filter((e=>!e.endsWith("/")));return new Set(i)}(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=>{hr(`${$d.msg} \`${t}\`.`,kd,{hint:$d.hint,elements:[e]})}))}});const _d="core/linter-rules/no-http-props",Sd=Bn({en:{msg:wr`Insecure URLs are not allowed in ${"[respecConfig]"}.`,hint:"Please change the following properties to 'https://': "},zh:{msg:wr`${"[respecConfig]"} 中不允许使用不安全的URL.`,hint:"请将以下属性更改为 https://:"},cs:{msg:wr`V ${"[respecConfig]"} nejsou povoleny nezabezpečené URL adresy.`,hint:"Změňte prosím následující vlastnosti na 'https://': "}});var Cd=Object.freeze({__proto__:null,name:_d,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=Mn(t,(e=>wr`${`[${e}]`}`));hr(Sd.msg,_d,{hint:Sd.hint+e})}}});const Rd="core/linter-rules/a11y",Ed=["color-contrast","landmark-one-main","landmark-unique","region"];function Ad(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 Ld=Object.freeze({__proto__:null,name:Rd,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(Ed.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 pr("Failed to load a11y linter.",Rd),console.error(e),[]}try{return(await s.run(document,r)).violations}catch(e){return pr("Error while looking for a11y issues.",Rd),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;(t.get(e)||t.set(e,[]).get(e)).push(r)}const{id:n,help:r,description:s,helpUrl:o}=e,i=`a11y/${n}: ${r}.`;for(const[e,n]of t){const t=Ad(e);hr(i,Rd,{details:`\n\n${s}.\n\n${t}. ([Learn more](${o}))`,elements:n})}}}});const Td="informative-dfn",Pd="core/linter-rules/informative-dfn",Id=Bn({en:{msg:(e,t)=>`Normative reference to "${e}" found but term is defined "informatively" in "${t}".`,get hint(){return wr`
You can do one of the following...
* Get the source definition to be made normative
* Add a \`class="lint-ignore"\` attribute to the link.
* Use a local normative proxy for the definition à la \`term\`
- To silence this warning entirely, set \`lint: { "${Ed}": 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 gr`
+ To silence this warning entirely, set \`lint: { "${Td}": 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 wr`
Můžete udělat jedno z následujícího...
* Požádejte o to, aby zdrojová definice byla normativní
* Přidejte atribut \`class=\"lint-ignore\"\` k odkazu.
* Použijte lokální normativní proxy pro definici, např. \`term\`
- Pro úplné potlačení tohoto varování nastavte \`lint: { \"${Ed}\": false }\` ve vaší \`respecConfig\`.`}}});var Td=Object.freeze({__proto__:null,name:Ad,run:function(e){if(!e.lint?.[Ed])return;const t="error"===e.lint[Ed]?lr:ur;xc.forEach((({term:e,spec:n,element:r})=>{r.classList.contains("lint-ignore")||t(Ld.msg(e,n),Ad,{title:"Normative reference to non-normative term.",elements:[r],hint:Ld.hint})}))}}),Pd=Object.freeze({__proto__:null,default:'// ReSpec Worker v1.0.0\n"use strict";\ntry {\n importScripts("https://www.w3.org/Tools/respec/respec-highlight");\n} catch (err) {\n console.error("Network error loading highlighter", err);\n}\n\nself.addEventListener("message", ({ data: originalData }) => {\n const data = Object.assign({}, originalData);\n switch (data.action) {\n case "highlight-load-lang": {\n const { langURL, propName, lang } = data;\n importScripts(langURL);\n self.hljs.registerLanguage(lang, self[propName]);\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 // Post back the original code\n Object.assign(data, { value: code, language: "" });\n }\n break;\n }\n }\n self.postMessage(data);\n});\n'}),Id=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\nfunction highlightListener(ev) {\n ev.stopPropagation();\n const { target: varElem } = ev;\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\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\nfunction highlightVars(varElem) {\n const textContent = norm(varElem.textContent);\n const parent = varElem.closest(".algorithm, section");\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\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\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})()'}),Dd=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} */\n let panel = null;\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 (type === "keydown" && event.key !== "Enter") return;\n\n const action = deriveAction(event);\n\n switch (action) {\n case "show": {\n hidePanel(panel);\n /** @type {HTMLElement} */\n const dfn = target.closest("dfn, .index-term");\n panel = document.getElementById(`dfn-panel-for-${dfn.id}`);\n const coords = deriveCoordinates(event);\n displayPanel(dfn, panel, coords);\n break;\n }\n case "dock": {\n panel.style.left = null;\n panel.style.top = null;\n panel.classList.add("docked");\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 const panel = 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} */\n const caret = panel.querySelector(".caret");\n caret.style.left = `${newCaretOffset}px`;\n }\n\n // As it\'s a dialog, we trap focus.\n // TODO: when