From 3ada87b510e0883f84f45973ac094b41f3280586 Mon Sep 17 00:00:00 2001 From: Katherine Thornton Date: Sat, 18 Feb 2023 06:16:39 -0800 Subject: [PATCH 01/21] + Iovka's mail of 14 Feb, 2023 --- index.html | 154 ++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 153 insertions(+), 1 deletion(-) diff --git a/index.html b/index.html index 6be5376..9adfac3 100644 --- a/index.html +++ b/index.html @@ -621,9 +621,138 @@

JSON Syntax

In this ShapeOr's shapeExprs, "http://schema.example/#IssueShape" is a reference to the shape expression with the id "http://schema.example/#IssueShape".

- + +
+	  #### Preliminary defintions
+
+Consider a fixed schema `Sch`.
+
+A schema MUST NOT contain any shapeExprLabel that has a negated reference to itself, either directly or transitively. This is formalized by the requirement that the dependency graph of a schema MUST NOT have a cycle that traverses some negated reference. 
+
+We construct a graph which nodes are the shapeExprLabels that appear in `Sch`.
+We say that a label `L` *has a reference to* a label `L'` if there exists a TripleConstraint `tc` in `tcs(def(L))` s.t. a shapeExprRef `L'` appears in `tc.valueExpr` either directly or by traversing any ShapeAnd, ShapeOr, ShapeNot, tripleExprRef, tripleContr.valueExpr, but w/o traversing shapeExprRefs.
+Such reference is called *negated reference* if:
+
+- an odd number of ShapeNot is traversed before reaching `tc`, or
+- an odd number of ShapeNot after `tc.valueExpr`, or
+- **[TODO : something about extra]**
+
+The dependency graph ... as before, using negated reference.
+	

Semantics

+

+ For a shape expression `se` we define its set of shapes `shapes(se)` recursively on the structure of `se`: +

+ +

For a tripleExpr `te` we define its set of TripleConstraints `tcs(te)` recursively on the structure of `te`:

+ +

+ For a Shape `s`, we define `tcs(s) = tcs(s.expression)`. +

+

+ For a shapeExpr `se`, we define `tcs(se)` as the union of the sets `tcs(s)` for all Shape `s` in `shapes(se)`. +

+

+Finally, for a triple expression or a shape expression `e` we define `predicates(e)` as the set that contains exactly the `tc.predicate` for all the TripleConstraints `tc` in `tcs(e)`. +

+
Definition of extension hierarchy graph
+

+ A shape expression label is called abstract if its definition is marked with `ABSTRACT`. + For shape expression labels `L_1`, `L_2`, we say that `L_2` directly extends `L_1` if `shapes(def(L_2))` contains a Shape `s` s.t. `s.extends` contains `L_2`. +The extension hierarchy graph of a shapes schema is a directed graph which nodes are the shape expression labels of the schema and that has an edge from `L_2` to `L_1` whenever `L_2` directly extends `L_1`. + + +

+

+ **Schema requirement**: the extension hierarchy graph must be acyclic. +

+

+ For a shape label `L`, we define +

+ +

+ Note that because an empty path is allowed in the above definitions, every label belongs to its set of supertypes and every non abstract label belongs to its set of base subtypes. +

+
+	### Definition of *extendable shape expression*
+
+
+
+A shapeExpr is called *extendable* if:
+
+- it is named, say with label `L`,  
+- it is of the form either `s` or `s AND se`, where `s` is a Shape and `se` is a shapeExpr. In this case we denote `s` as `mainShape(L)` and `se` as `constraint(L)`:
+- `se` does not contain an EXTENDS, that is, `s'.extends` is empty for every `s'` in `shapes(se)`,
+- `def(L')` is an extendable shape expression for every `L'` in `s.extends` (note that this condition is trivially met when `s.extends` is empty),
+- the set `predicates(se)` is included the union of the sets `predicates(mainShape(L'))` for all shape expression names `L'` that belong to `supertypes(L)`. 
+
+Note that a named Shape is always an extendable shape expression.
+
+For an extendable shape expression with label `L` we define:
+
+- `superTcs(L)` as the union of the sets `tcs(mainShape(L'))` for all shape expression names `L'` that belong to `supertypes(L)`,
+- `superPredicates(L)` as the union of the sets `predicates(mainShape(L'))` for all shape expression names `L'` that belong to `supertypes(L)`.
+
+
+**Schema requirement** EXTENDS appears only in extendable shape expressions. That is, for every Shape `s` that appears in the schema, if `s.extends` is non empty and for every shapeExpr `se` in the schema, if `s` belongs to `shapes(se)`, then `se` is an extendable shape expression.
+
+### Stratified schema
+
+**[TODO precise definition + how negation and stratification are to be adapted]**
+
+Briefly: stratification is defined on shape expression labels (and not on Shapes as it used to be).
+
+# Semantics
+
+### Definitions
+
+Consider a ShEx schema `Sch` and a graph `G`, and let `U` be the set of shape expression labels of `Sch` and `N` be the set of nodes of `G`.(TODO : which labels to consider ? Only the top level ones, or any label ?)
+Then a *typing* over `G` and `Sch` is a subset of `N x U`.
+
+The satisfaction of the schema is defined w.r.t. a so called maximal typing, which is guaranteed to exist.
+The maximal typing is such that whenever `(n,L)` belongs to it, it holds that the neighborhood of the node `n` *satisfies* `def(L)` w.r.t. the maximal typing. Formally, `satisfies(G, Sch, maximalTyping, n, def(L), _)` holds, where `satisfies` is the function defined below and the underscore indicates that no value is given for the corresponding optional parameter.
+
+### The satisfies function
+
+It takes six parameters: the graph `G`, the schema `Sch`, a typing `typing` over `G` and `Sch`, a node `n` in `G`, a shapeExpr `se` from `Sch`, and an optional neighborhood set of triples `npart` : `satisfies(n, se, typing, npart, G, Sch)`. The value of the function is a Boolean. The function is defined recursively on the structure of the shape expression:
+
+**[TODO : fix the order of the parameters in the satisfies function as it is not always the same]**
+
+- `se` is node constraint and `satisfies2(n, se)` ... as before
+- `se` is ShapeOr and `satisfies(n, se', typing, npart, G, Sch)` holds for some `se'` in `se.shapeExprs`
+- `se` is a ShapeNot and `satisfies(n, npart, se, typing, G, Sch)` does not hold
+- `se` is a ShapeExternal and implementation-specific mechanisms not defined in this specification indicate success
+- `se` is a shapeExprRef with label `L` and `satisfies(n, npart, def(L), typing, G, Sch)` **[Note : here we unfold the definition of L and do not look for base subtypes. Base subtypes are considered only for the whole neighborhood, that is in TripleConstr]**
+- `se` is an extendible shape expression, let `L` be the label of `se`. Let `neigh = npart` if `npart` is given, or `neigh` be the neighbourhood of the node `n` is `npart = _`. Then
+    - there exist sets of triples `matchables`, `unmatchables` and `remainder` s.t.
+        - `matchables`, `unmatchables` and `remainder` are pairwise dijoint and their union is equal to `neigh`,
+        - `remainder` is the set of triples from the neighborhood of `n` whose predicates do not appear neither in `superPredicates(L)` nor in `mainShape(L).extra`
+        - if `mainShape(s).closed`, then `remainder` is empty 
+        - `matchables` contains all the triples `t` s.t. `matches(n, {t}, tc, typing, G, Sch)` holds for some `tc` in `superTcs(L)`,
+        - (therefore, `unmatchables` contains all the triples `t` whose predicate is in `superPredicates(L)` or in `mainShape(L).extra`, and such that `matches(n, {t}, tc, typing)` does not hold for no `tc` in `superTcs(L)`),
+        - all predicates in `unmatchables` appear in `mainShape(L).extra`,
+    - there exists a partition of `matchables` that with every `L'` in `supertypes(L)` associates a set of triples denoted `npart(L')` s.t.
+        - `matchables` is the union of the sets `npart(L')` for all the `L'`s in `supertypes(L)` and these sets are mutually disjoint,
+        - `matches(n, npart(L'), mainShape(L').tripleExpr, typing, G, Sch)` holds for every `L'` in `supertypes(L)`,
+        - `satisfies(n, supernpart(L'), constraint(L'), typing, G, Sch)` holds for every `L'` in `supertypes(L)` whenever `constraint(L')` exists, where `supernparts(L')` is the union of the `npart(L'')` for all the shape expression labels `L''` in `supertypes(L')`
+- `se` is a ShapeAnd without EXTENDS and `satisfies(n, se', typing, npart, G, Sch)` holds for every `se'` in `se`.shapeExprs
+	

satisfies: The expression satisfies(n, se, G, Sch, t) indicates that a node n and a graph G satisfy a shape expression se with typing t for schema Sch.
notSatisfies: Conversely, notSatisfies(n, se, G, Sch, t) indicates that n and G do not satisfy se with the given typing t. @@ -1263,6 +1392,29 @@

Semantics

  • closed is false or unmatchables is empty.
  • +
    +	  ### The matches function
    +
    +It takes six parameters: the graph `G`, the schema `Sch`, a typing `t` over `G` and `Sch`, a node `n` in `G`, a tripleExpr `te` from `Sch`, and a (non optional) neighborhood set of triples `npart` : `matches(n, te, typing, npart, G, Sch)`. The value of the function is a Boolean. The function is defined recursively on the structure of the triple expression:
    +
    +- `te` is a TripleConstraint and `npart` is a singleton set with unique triple `t` and the predicate of `t` is the same as the predicate of `te` and ... TODO define inverse or not as before ... and:
    +    - `te` does not have a `valueExpr`, or
    +    - `te` has a valueExpr that is a shapeExprRef with label `L` and **there exists a label `L'` in `baseSubtypes(L)` s.t. `(n', L')` belongs to `typing` (note: this is the unique place in the recursive definition of the semantics where substitutability is considered. Substitution is also considered when validating a shape map)**, or 
    +    - `te` has a valueExpr that is not a shapeExprRef, then `satisfies(n', te.valueExpr, typing, _, G, Sch)` holds, where `n'` is the object ( ... TODO ... or the subject if inverse ) of `t`
    +- `te` is tripleExprRef with label `L`, and `matches(n, def(L), typing, npart, G, Sch)` holds
    +- `te` has a cardinality `[min, max]` and `npart` can be partitioned into `k` pairwise disjoint sets `npart_1` ... `npart_k` for some `min <= k <= max` and `matches(n, te, typing, npart_i, G, Sch)` for every `i` in `1..k`
    +- `te` is a OneOf and `matches(n, te', typing, npart, G, Sch)` for some `te'` in `te`.tripleExprs
    +																		   - `te` is a EachOf and `matches(n, te', typing, npart, G, Sch)` for every `te'` in `te`.tripleExprs
    +
    +### Validating a shape map
    +
    +A shape map is ... TODO precise definition ... a kind of a typing, i.e. a set of pairs `(n, L)` where `n` is a node and `L` is a shape expression label. 
    +A shape map is satisfied if for every `(n, L)` in the map, there exists a label `L'` in `baseSubtypes(L)` s.t. `(n', L')` belongs to the maximal typing
    +
    +### Definition of the maximal typing
    +
    +*Similar to before, through stratification, but now the elements of the typing are pairs (node, label) where label is a **shapeExprLabel**. Before we had pairs (node, Shape) in the typing. With this new definition of typing the stratification is easier to define. What we lose is that some schemas that would have been considered stratified with the old definition won't be considered stratified with the new one. This breaks backwards compatibility, provided that there exists somewhere a schema with negations that has non trivial stratification structure, ... which would surprise me a lot*.																		   
    +	

    matches: asserts that a triple expression is matched by a set of triples that come from the neighbourhood of a node in an RDF graph. The expression matches(T, expr, m) indicates that a set of triples T can satisfy these rules: From 044bdb0020fe1045fdf253bd0da5c1b0a73869fc Mon Sep 17 00:00:00 2001 From: Katherine Thornton Date: Mon, 20 Feb 2023 04:02:18 -0800 Subject: [PATCH 02/21] fix formatting in 5.5.2.1 --- index.html | 49 +++++++++++++++++++++++++++++-------------------- 1 file changed, 29 insertions(+), 20 deletions(-) diff --git a/index.html b/index.html index 9adfac3..8a27265 100644 --- a/index.html +++ b/index.html @@ -1392,29 +1392,38 @@

    Semantics

  • closed is false or unmatchables is empty.
  • -
    -	  ### The matches function
    -
    +	
    +
    The matches function
    +

    It takes six parameters: the graph `G`, the schema `Sch`, a typing `t` over `G` and `Sch`, a node `n` in `G`, a tripleExpr `te` from `Sch`, and a (non optional) neighborhood set of triples `npart` : `matches(n, te, typing, npart, G, Sch)`. The value of the function is a Boolean. The function is defined recursively on the structure of the triple expression: - -- `te` is a TripleConstraint and `npart` is a singleton set with unique triple `t` and the predicate of `t` is the same as the predicate of `te` and ... TODO define inverse or not as before ... and: - - `te` does not have a `valueExpr`, or - - `te` has a valueExpr that is a shapeExprRef with label `L` and **there exists a label `L'` in `baseSubtypes(L)` s.t. `(n', L')` belongs to `typing` (note: this is the unique place in the recursive definition of the semantics where substitutability is considered. Substitution is also considered when validating a shape map)**, or - - `te` has a valueExpr that is not a shapeExprRef, then `satisfies(n', te.valueExpr, typing, _, G, Sch)` holds, where `n'` is the object ( ... TODO ... or the subject if inverse ) of `t` -- `te` is tripleExprRef with label `L`, and `matches(n, def(L), typing, npart, G, Sch)` holds -- `te` has a cardinality `[min, max]` and `npart` can be partitioned into `k` pairwise disjoint sets `npart_1` ... `npart_k` for some `min <= k <= max` and `matches(n, te, typing, npart_i, G, Sch)` for every `i` in `1..k` -- `te` is a OneOf and `matches(n, te', typing, npart, G, Sch)` for some `te'` in `te`.tripleExprs - - `te` is a EachOf and `matches(n, te', typing, npart, G, Sch)` for every `te'` in `te`.tripleExprs - -### Validating a shape map - +

    +
      +
    • `te` is a TripleConstraint and `npart` is a singleton set with unique triple `t` and the predicate of `t` is the same as the predicate of `te` and ... TODO define inverse or not as before ... and: +
        +
      • `te` does not have a `valueExpr`, or
      • +
      • `te` has a valueExpr that is a shapeExprRef with label `L` and **there exists a label `L'` in `baseSubtypes(L)` s.t. `(n', L')` belongs to `typing` (note: this is the unique place in the recursive definition of the semantics where substitutability is considered. Substitution is also considered when validating a shape map)**, or
      • +
      • `te` has a valueExpr that is not a shapeExprRef, then `satisfies(n', te.valueExpr, typing, _, G, Sch)` holds, where `n'` is the object ( ... TODO ... or the subject if inverse ) of `t`
      • +
      +
    • + +
    • `te` is tripleExprRef with label `L`, and `matches(n, def(L), typing, npart, G, Sch)` holds
    • +
    • `te` has a cardinality `[min, max]` and `npart` can be partitioned into `k` pairwise disjoint sets `npart_1` ... `npart_k` for some `min <= k <= max` and `matches(n, te, typing, npart_i, G, Sch)` for every `i` in `1..k`
    • +
    • `te` is a OneOf and `matches(n, te', typing, npart, G, Sch)` for some `te'` in `te`.tripleExprs
    • +
    • `te` is EachOf and `matches(n, te', typing, npart, G, Sch)` for every `te'` in `te`.tripleExprs
    • +
    +
    +
    +
    Validating a shape map
    +

    A shape map is ... TODO precise definition ... a kind of a typing, i.e. a set of pairs `(n, L)` where `n` is a node and `L` is a shape expression label. A shape map is satisfied if for every `(n, L)` in the map, there exists a label `L'` in `baseSubtypes(L)` s.t. `(n', L')` belongs to the maximal typing - -### Definition of the maximal typing - -*Similar to before, through stratification, but now the elements of the typing are pairs (node, label) where label is a **shapeExprLabel**. Before we had pairs (node, Shape) in the typing. With this new definition of typing the stratification is easier to define. What we lose is that some schemas that would have been considered stratified with the old definition won't be considered stratified with the new one. This breaks backwards compatibility, provided that there exists somewhere a schema with negations that has non trivial stratification structure, ... which would surprise me a lot*. -

    +

    +
    +
    +
    Definition of the maximal typing
    +

    + *Similar to before, through stratification, but now the elements of the typing are pairs (node, label) where label is a **shapeExprLabel**. Before we had pairs (node, Shape) in the typing. With this new definition of typing the stratification is easier to define. What we lose is that some schemas that would have been considered stratified with the old definition won't be considered stratified with the new one. This breaks backwards compatibility, provided that there exists somewhere a schema with negations that has non trivial stratification structure, ... which would surprise me a lot*.

    +

    matches: asserts that a triple expression is matched by a set of triples that come from the neighbourhood of a node in an RDF graph. The expression matches(T, expr, m) indicates that a set of triples T can satisfy these rules: From b3835bc47432227b7669e36efbc865664dfe0c73 Mon Sep 17 00:00:00 2001 From: Katherine Thornton Date: Tue, 21 Feb 2023 05:13:26 -0800 Subject: [PATCH 03/21] fix formatting in 5.3.2.1 --- index.html | 127 ++++++++++++++++++++++++++++++----------------------- 1 file changed, 71 insertions(+), 56 deletions(-) diff --git a/index.html b/index.html index 8a27265..761951b 100644 --- a/index.html +++ b/index.html @@ -677,7 +677,7 @@

    Definition of extension hierarchy graph

    - **Schema requirement**: the extension hierarchy graph must be acyclic. + Schema requirement: the extension hierarchy graph must be acyclic.

    For a shape label `L`, we define @@ -689,70 +689,85 @@

    Definition of extension hierarchy graph

    Note that because an empty path is allowed in the above definitions, every label belongs to its set of supertypes and every non abstract label belongs to its set of base subtypes.

    -
    -	### Definition of *extendable shape expression*
    -
    -
    -
    +      
    +
    Definition of *extendable shape expression*
    +

    A shapeExpr is called *extendable* if: - -- it is named, say with label `L`, -- it is of the form either `s` or `s AND se`, where `s` is a Shape and `se` is a shapeExpr. In this case we denote `s` as `mainShape(L)` and `se` as `constraint(L)`: -- `se` does not contain an EXTENDS, that is, `s'.extends` is empty for every `s'` in `shapes(se)`, -- `def(L')` is an extendable shape expression for every `L'` in `s.extends` (note that this condition is trivially met when `s.extends` is empty), -- the set `predicates(se)` is included the union of the sets `predicates(mainShape(L'))` for all shape expression names `L'` that belong to `supertypes(L)`. - +

    +
      +
    • it is named, say with label `L`,
    • +
    • it is of the form either `s` or `s AND se`, where `s` is a Shape and `se` is a shapeExpr. In this case we denote `s` as `mainShape(L)` and `se` as `constraint(L)`:
    • +
    • `se` does not contain an EXTENDS, that is, `s'.extends` is empty for every `s'` in `shapes(se)`,
    • +
    • `def(L')` is an extendable shape expression for every `L'` in `s.extends` (note that this condition is trivially met when `s.extends` is empty),
    • +
    • the set `predicates(se)` is included the union of the sets `predicates(mainShape(L'))` for all shape expression names `L'` that belong to `supertypes(L)`.
    • +
    +

    Note that a named Shape is always an extendable shape expression. - +

    +

    For an extendable shape expression with label `L` we define: - -- `superTcs(L)` as the union of the sets `tcs(mainShape(L'))` for all shape expression names `L'` that belong to `supertypes(L)`, -- `superPredicates(L)` as the union of the sets `predicates(mainShape(L'))` for all shape expression names `L'` that belong to `supertypes(L)`. - - -**Schema requirement** EXTENDS appears only in extendable shape expressions. That is, for every Shape `s` that appears in the schema, if `s.extends` is non empty and for every shapeExpr `se` in the schema, if `s` belongs to `shapes(se)`, then `se` is an extendable shape expression. - -### Stratified schema - -**[TODO precise definition + how negation and stratification are to be adapted]** - +

    +
      +
    • `superTcs(L)` as the union of the sets `tcs(mainShape(L'))` for all shape expression names `L'` that belong to `supertypes(L)`,
    • +
    • `superPredicates(L)` as the union of the sets `predicates(mainShape(L'))` for all shape expression names `L'` that belong to `supertypes(L)`.
    • +
    +

    + Schema requirement EXTENDS appears only in extendable shape expressions. That is, for every Shape `s` that appears in the schema, if `s.extends` is non empty and for every shapeExpr `se` in the schema, if `s` belongs to `shapes(se)`, then `se` is an extendable shape expression. +

    +
    +
    +
    Stratified schema
    +

    + [TODO precise definition + how negation and stratification are to be adapted] +

    +

    Briefly: stratification is defined on shape expression labels (and not on Shapes as it used to be). - -# Semantics - -### Definitions - +

    +

    +# Semantics
    +@@Indicates this should be moved? +

    +
    +
    +
    Definitions
    +

    Consider a ShEx schema `Sch` and a graph `G`, and let `U` be the set of shape expression labels of `Sch` and `N` be the set of nodes of `G`.(TODO : which labels to consider ? Only the top level ones, or any label ?) Then a *typing* over `G` and `Sch` is a subset of `N x U`. - +

    +

    The satisfaction of the schema is defined w.r.t. a so called maximal typing, which is guaranteed to exist. The maximal typing is such that whenever `(n,L)` belongs to it, it holds that the neighborhood of the node `n` *satisfies* `def(L)` w.r.t. the maximal typing. Formally, `satisfies(G, Sch, maximalTyping, n, def(L), _)` holds, where `satisfies` is the function defined below and the underscore indicates that no value is given for the corresponding optional parameter. - -### The satisfies function - +

    +
    +
    +
    The satisfies function
    +

    It takes six parameters: the graph `G`, the schema `Sch`, a typing `typing` over `G` and `Sch`, a node `n` in `G`, a shapeExpr `se` from `Sch`, and an optional neighborhood set of triples `npart` : `satisfies(n, se, typing, npart, G, Sch)`. The value of the function is a Boolean. The function is defined recursively on the structure of the shape expression: - -**[TODO : fix the order of the parameters in the satisfies function as it is not always the same]** - -- `se` is node constraint and `satisfies2(n, se)` ... as before -- `se` is ShapeOr and `satisfies(n, se', typing, npart, G, Sch)` holds for some `se'` in `se.shapeExprs` -- `se` is a ShapeNot and `satisfies(n, npart, se, typing, G, Sch)` does not hold -- `se` is a ShapeExternal and implementation-specific mechanisms not defined in this specification indicate success -- `se` is a shapeExprRef with label `L` and `satisfies(n, npart, def(L), typing, G, Sch)` **[Note : here we unfold the definition of L and do not look for base subtypes. Base subtypes are considered only for the whole neighborhood, that is in TripleConstr]** -- `se` is an extendible shape expression, let `L` be the label of `se`. Let `neigh = npart` if `npart` is given, or `neigh` be the neighbourhood of the node `n` is `npart = _`. Then - - there exist sets of triples `matchables`, `unmatchables` and `remainder` s.t. - - `matchables`, `unmatchables` and `remainder` are pairwise dijoint and their union is equal to `neigh`, - - `remainder` is the set of triples from the neighborhood of `n` whose predicates do not appear neither in `superPredicates(L)` nor in `mainShape(L).extra` - - if `mainShape(s).closed`, then `remainder` is empty - - `matchables` contains all the triples `t` s.t. `matches(n, {t}, tc, typing, G, Sch)` holds for some `tc` in `superTcs(L)`, - - (therefore, `unmatchables` contains all the triples `t` whose predicate is in `superPredicates(L)` or in `mainShape(L).extra`, and such that `matches(n, {t}, tc, typing)` does not hold for no `tc` in `superTcs(L)`), - - all predicates in `unmatchables` appear in `mainShape(L).extra`, - - there exists a partition of `matchables` that with every `L'` in `supertypes(L)` associates a set of triples denoted `npart(L')` s.t. - - `matchables` is the union of the sets `npart(L')` for all the `L'`s in `supertypes(L)` and these sets are mutually disjoint, - - `matches(n, npart(L'), mainShape(L').tripleExpr, typing, G, Sch)` holds for every `L'` in `supertypes(L)`, - - `satisfies(n, supernpart(L'), constraint(L'), typing, G, Sch)` holds for every `L'` in `supertypes(L)` whenever `constraint(L')` exists, where `supernparts(L')` is the union of the `npart(L'')` for all the shape expression labels `L''` in `supertypes(L')` -- `se` is a ShapeAnd without EXTENDS and `satisfies(n, se', typing, npart, G, Sch)` holds for every `se'` in `se`.shapeExprs -

    +

    +

    +[TODO : fix the order of the parameters in the satisfies function as it is not always the same] +

    + +

    satisfies: The expression satisfies(n, se, G, Sch, t) indicates that a node n and a graph G satisfy a shape expression se with typing t for schema Sch.
    notSatisfies: Conversely, notSatisfies(n, se, G, Sch, t) indicates that n and G do not satisfy se with the given typing t. From 02b449d77fe93fe96a8731c3282c44add43dc40b Mon Sep 17 00:00:00 2001 From: Eric Prud'hommeaux Date: Wed, 8 Mar 2023 18:43:15 +0100 Subject: [PATCH 04/21] ~ un-pre'd Preliminary definitions --- index.html | 35 +++++++++++++++++++++++------------ 1 file changed, 23 insertions(+), 12 deletions(-) diff --git a/index.html b/index.html index 761951b..7a56ee8 100644 --- a/index.html +++ b/index.html @@ -622,23 +622,34 @@

    JSON Syntax

    -
    -	  #### Preliminary defintions
    +        
    +

    Preliminary defintions

    -Consider a fixed schema `Sch`. +

    + Consider a fixed schema `Sch`. +

    -A schema MUST NOT contain any shapeExprLabel that has a negated reference to itself, either directly or transitively. This is formalized by the requirement that the dependency graph of a schema MUST NOT have a cycle that traverses some negated reference. +

    + A schema MUST NOT contain any shapeExprLabel that has a negated reference to itself, either directly or transitively. + This is formalized by the requirement that the dependency graph of a schema MUST NOT have a cycle that traverses some negated reference. +

    -We construct a graph which nodes are the shapeExprLabels that appear in `Sch`. -We say that a label `L` *has a reference to* a label `L'` if there exists a TripleConstraint `tc` in `tcs(def(L))` s.t. a shapeExprRef `L'` appears in `tc.valueExpr` either directly or by traversing any ShapeAnd, ShapeOr, ShapeNot, tripleExprRef, tripleContr.valueExpr, but w/o traversing shapeExprRefs. -Such reference is called *negated reference* if: +

    + We construct a graph which nodes are the shapeExprLabels that appear in `Sch`. + We say that a label `L` *has a reference to* a label `L'` if there exists a TripleConstraint `tc` in `tcs(def(L))` such that a shapeExprRef `L'` appears in `tc.valueExpr` either directly or by traversing any ShapeAnd, ShapeOr, ShapeNot, tripleExprRef, tripleContr.valueExpr, but w/o traversing shapeExprRefs. + Such reference is called *negated reference* if: +

    -- an odd number of ShapeNot is traversed before reaching `tc`, or -- an odd number of ShapeNot after `tc.valueExpr`, or -- **[TODO : something about extra]** +
      +
    • an odd number of ShapeNot is traversed before reaching `tc`, or
    • +
    • an odd number of ShapeNot after `tc.valueExpr`, or
    • +
    • **[TODO : something about extra]**
    • +
    -The dependency graph ... as before, using negated reference. -
    +

    + The dependency graph ... as before, using negated reference. +

    +

    Semantics

    From 6f185de3c7c194cc6f840e00d1bd024c8387b136 Mon Sep 17 00:00:00 2001 From: Eric Prud'hommeaux Date: Wed, 8 Mar 2023 19:05:10 +0100 Subject: [PATCH 05/21] + .iovka-added class --- index.html | 40 +++++++++++++++++++++++----------------- local.css | 4 ++++ 2 files changed, 27 insertions(+), 17 deletions(-) diff --git a/index.html b/index.html index 7a56ee8..6769ce9 100644 --- a/index.html +++ b/index.html @@ -622,7 +622,7 @@

    JSON Syntax

    -
    +

    Preliminary defintions

    @@ -651,7 +651,8 @@

    Preliminary defintions

    -

    Semantics

    +

    Semantics

    +

    For a shape expression `se` we define its set of shapes `shapes(se)` recursively on the structure of `se`:

    @@ -679,7 +680,9 @@

    Semantics

    Finally, for a triple expression or a shape expression `e` we define `predicates(e)` as the set that contains exactly the `tc.predicate` for all the TripleConstraints `tc` in `tcs(e)`.

    +
    Definition of extension hierarchy graph
    +

    A shape expression label is called abstract if its definition is marked with `ABSTRACT`. For shape expression labels `L_1`, `L_2`, we say that `L_2` directly extends `L_1` if `shapes(def(L_2))` contains a Shape `s` s.t. `s.extends` contains `L_2`. @@ -700,7 +703,8 @@

    Definition of extension hierarchy graph

    Note that because an empty path is allowed in the above definitions, every label belongs to its set of supertypes and every non abstract label belongs to its set of base subtypes.

    -
    +
    +
    Definition of *extendable shape expression*

    A shapeExpr is called *extendable* if: @@ -726,7 +730,7 @@

    Definition of *extendable shape expression*
    Schema requirement EXTENDS appears only in extendable shape expressions. That is, for every Shape `s` that appears in the schema, if `s.extends` is non empty and for every shapeExpr `se` in the schema, if `s` belongs to `shapes(se)`, then `se` is an extendable shape expression.

    -
    +
    Stratified schema

    [TODO precise definition + how negation and stratification are to be adapted] @@ -739,7 +743,7 @@

    Stratified schema
    @@Indicates this should be moved?

    -
    +
    Definitions

    Consider a ShEx schema `Sch` and a graph `G`, and let `U` be the set of shape expression labels of `Sch` and `N` be the set of nodes of `G`.(TODO : which labels to consider ? Only the top level ones, or any label ?) @@ -750,7 +754,7 @@

    Definitions
    The maximal typing is such that whenever `(n,L)` belongs to it, it holds that the neighborhood of the node `n` *satisfies* `def(L)` w.r.t. the maximal typing. Formally, `satisfies(G, Sch, maximalTyping, n, def(L), _)` holds, where `satisfies` is the function defined below and the underscore indicates that no value is given for the corresponding optional parameter.

    -
    +
    The satisfies function

    It takes six parameters: the graph `G`, the schema `Sch`, a typing `typing` over `G` and `Sch`, a node `n` in `G`, a shapeExpr `se` from `Sch`, and an optional neighborhood set of triples `npart` : `satisfies(n, se, typing, npart, G, Sch)`. The value of the function is a Boolean. The function is defined recursively on the structure of the shape expression: @@ -1418,34 +1422,36 @@

    Semantics

  • closed is false or unmatchables is empty.
  • -
    +
    The matches function

    -It takes six parameters: the graph `G`, the schema `Sch`, a typing `t` over `G` and `Sch`, a node `n` in `G`, a tripleExpr `te` from `Sch`, and a (non optional) neighborhood set of triples `npart` : `matches(n, te, typing, npart, G, Sch)`. The value of the function is a Boolean. The function is defined recursively on the structure of the triple expression: + It takes six parameters: the graph `G`, the schema `Sch`, a typing `t` over `G` and `Sch`, a node `n` in `G`, a tripleExpr `te` from `Sch`, and a (non optional) neighborhood set of triples `npart` : `matches(n, te, typing, npart, G, Sch)`. + The value of the function is a Boolean. The function is defined recursively on the structure of the triple expression:

    • `te` is a TripleConstraint and `npart` is a singleton set with unique triple `t` and the predicate of `t` is the same as the predicate of `te` and ... TODO define inverse or not as before ... and:
      • `te` does not have a `valueExpr`, or
      • -
      • `te` has a valueExpr that is a shapeExprRef with label `L` and **there exists a label `L'` in `baseSubtypes(L)` s.t. `(n', L')` belongs to `typing` (note: this is the unique place in the recursive definition of the semantics where substitutability is considered. Substitution is also considered when validating a shape map)**, or
      • +
      • `te` has a valueExpr that is a shapeExprRef with label `L` and **there exists a label `L'` in `baseSubtypes(L)` such that `(n', L')` belongs to `typing` (note: this is the unique place in the recursive definition of the semantics where substitutability is considered. + Substitution is also considered when validating a shape map)**, or
      • `te` has a valueExpr that is not a shapeExprRef, then `satisfies(n', te.valueExpr, typing, _, G, Sch)` holds, where `n'` is the object ( ... TODO ... or the subject if inverse ) of `t`
    • - +
    • `te` is tripleExprRef with label `L`, and `matches(n, def(L), typing, npart, G, Sch)` holds
    • -
    • `te` has a cardinality `[min, max]` and `npart` can be partitioned into `k` pairwise disjoint sets `npart_1` ... `npart_k` for some `min <= k <= max` and `matches(n, te, typing, npart_i, G, Sch)` for every `i` in `1..k`
    • -
    • `te` is a OneOf and `matches(n, te', typing, npart, G, Sch)` for some `te'` in `te`.tripleExprs
    • -
    • `te` is EachOf and `matches(n, te', typing, npart, G, Sch)` for every `te'` in `te`.tripleExprs
    • +
    • `te` has a cardinality `[min, max]` and `npart` can be partitioned into `k` pairwise disjoint sets `npart_1` ... `npart_k` for some `min <= k <= max` and `matches(n, te, typing, npart_i, G, Sch)` for every `i` in `1..k`
    • +
    • `te` is a OneOf and `matches(n, te', typing, npart, G, Sch)` for some `te'` in `te`.tripleExprs
    • +
    • `te` is EachOf and `matches(n, te', typing, npart, G, Sch)` for every `te'` in `te`.tripleExprs
    -
    +
    Validating a shape map

    -A shape map is ... TODO precise definition ... a kind of a typing, i.e. a set of pairs `(n, L)` where `n` is a node and `L` is a shape expression label. -A shape map is satisfied if for every `(n, L)` in the map, there exists a label `L'` in `baseSubtypes(L)` s.t. `(n', L')` belongs to the maximal typing + A shape map is ... TODO precise definition ... a kind of a typing, i.e. a set of pairs `(n, L)` where `n` is a node and `L` is a shape expression label. + A shape map is satisfied if for every `(n, L)` in the map, there exists a label `L'` in `baseSubtypes(L)` s.t. `(n', L')` belongs to the maximal typing

    -
    +
    Definition of the maximal typing

    *Similar to before, through stratification, but now the elements of the typing are pairs (node, label) where label is a **shapeExprLabel**. Before we had pairs (node, Shape) in the typing. With this new definition of typing the stratification is easier to define. What we lose is that some schemas that would have been considered stratified with the old definition won't be considered stratified with the new one. This breaks backwards compatibility, provided that there exists somewhere a schema with negations that has non trivial stratification structure, ... which would surprise me a lot*.

    diff --git a/local.css b/local.css index 72b6d9f..2ba7161 100644 --- a/local.css +++ b/local.css @@ -456,3 +456,7 @@ dd > dl { border-left: 2em solid #f7f7f7; Margin-top: 0; } + +.iovka-added { + background-color: #afeeee; +} From 359279913f709597f860b69327f089185eb593dc Mon Sep 17 00:00:00 2001 From: Eric Prud'hommeaux Date: Thu, 16 Mar 2023 15:34:47 +0100 Subject: [PATCH 06/21] ~ ericP tweaks 5.2 --- index.html | 2 +- local.css | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/index.html b/index.html index 6769ce9..b4ac893 100644 --- a/index.html +++ b/index.html @@ -469,7 +469,7 @@

    Validation Definition

    isValid: For a graph G, a schema Sch and a fixed ShapeMap ism, isValid(G, Sch, ism) indicates that for every RDFnode/shapeLabel pair (n, sl) in ism, the node n satisfies the shape expression identified by sl. - The latter is captured by the expression satisfies(n, s, G, Sch, completeTyping(G, Sch)). + The latterThis is captured by the expression satisfies(n, s, G, Sch, completeTyping(G, Sch)) where `s` is the shape expression identified by `sl`. The function satisfies is defined for every kind of shape expression.

    diff --git a/local.css b/local.css index 2ba7161..da93316 100644 --- a/local.css +++ b/local.css @@ -460,3 +460,10 @@ dd > dl { .iovka-added { background-color: #afeeee; } + +.cut { + font-style: strike-through; +} +.ericP { + background-color: #eeeeaf; +} From ba82692f91931ff0807816772c43045b1ba4bf74 Mon Sep 17 00:00:00 2001 From: Eric Prud'hommeaux Date: Thu, 16 Mar 2023 15:46:41 +0100 Subject: [PATCH 07/21] ~ s/``/span.math/ --- index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.html b/index.html index b4ac893..f90c316 100644 --- a/index.html +++ b/index.html @@ -469,7 +469,7 @@

    Validation Definition

    isValid: For a graph G, a schema Sch and a fixed ShapeMap ism, isValid(G, Sch, ism) indicates that for every RDFnode/shapeLabel pair (n, sl) in ism, the node n satisfies the shape expression identified by sl. - The latterThis is captured by the expression satisfies(n, s, G, Sch, completeTyping(G, Sch)) where `s` is the shape expression identified by `sl`. + The latterThis is captured by the expression satisfies(n, s, G, Sch, completeTyping(G, Sch)) where s is the shape expression identified by sl. The function satisfies is defined for every kind of shape expression.

    From 2903107b44923e4414f36a9117401d7d89b65ea5 Mon Sep 17 00:00:00 2001 From: Eric Prud'hommeaux Date: Thu, 16 Mar 2023 15:57:28 +0100 Subject: [PATCH 08/21] ~ s/the y mapping of x/x.y/ --- index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.html b/index.html index f90c316..7f93888 100644 --- a/index.html +++ b/index.html @@ -476,7 +476,7 @@

    Validation Definition

    The validation of an RDF graph G against a ShEx schema Sch is based on the existence of completeTyping(G, Sch). - For an RDF graph G and a shapes schema Sch, a typing is a set of pairs of the form (n, s) where n is a node in G and s is a Shape that appears in some shape expression in the shapes mapping of Sch. + For an RDF graph G and a shapes schema Sch, a typing is a set of pairs of the form (n, s) where n is a node in G and s is a Shape that appears in some shape expression in Sch.shapes. A correct typing is a typing such that for every RDFnode/shape pair (n,s) in typing, matchesShape(n, s, G, Sch, typing) holds. completeTyping(G, Sch) is a unique correct typing that exists for every graph and every ShEx schema that satisfies the schema requirements.

    From ef1b14b5b0ca98065ab94910256c7f3866ca7fa3 Mon Sep 17 00:00:00 2001 From: Eric Prud'hommeaux Date: Thu, 16 Mar 2023 16:04:44 +0100 Subject: [PATCH 09/21] ~ strike in typing --- index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.html b/index.html index 7f93888..73665ba 100644 --- a/index.html +++ b/index.html @@ -477,7 +477,7 @@

    Validation Definition

    The validation of an RDF graph G against a ShEx schema Sch is based on the existence of completeTyping(G, Sch). For an RDF graph G and a shapes schema Sch, a typing is a set of pairs of the form (n, s) where n is a node in G and s is a Shape that appears in some shape expression in Sch.shapes. - A correct typing is a typing such that for every RDFnode/shape pair (n,s) in typing, matchesShape(n, s, G, Sch, typing) holds. + A correct typing is a typing such that for every RDF node/shape pair (n,s) in typing, matchesShape(n, s, G, Sch, typing) holds. completeTyping(G, Sch) is a unique correct typing that exists for every graph and every ShEx schema that satisfies the schema requirements.

    From b9b3ae5267f87117c31e476a8df3ae9548271b6c Mon Sep 17 00:00:00 2001 From: Eric Prud'hommeaux Date: Thu, 16 Mar 2023 16:09:31 +0100 Subject: [PATCH 10/21] ~ 5.2 P1 completeTyping as a function --- index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.html b/index.html index 73665ba..7888f82 100644 --- a/index.html +++ b/index.html @@ -469,7 +469,7 @@

    Validation Definition

    isValid: For a graph G, a schema Sch and a fixed ShapeMap ism, isValid(G, Sch, ism) indicates that for every RDFnode/shapeLabel pair (n, sl) in ism, the node n satisfies the shape expression identified by sl. - The latterThis is captured by the expression satisfies(n, s, G, Sch, completeTyping(G, Sch)) where s is the shape expression identified by sl. + The latterThis is captured by the expression satisfies(n, s, G, Sch, completeTyping(G, Sch)) where s is the shape expression identified by sl. The function satisfies is defined for every kind of shape expression.

    From c33505c7c4409030dcdbc6f6d2f17b1b6cf424dd Mon Sep 17 00:00:00 2001 From: Eric Prud'hommeaux Date: Thu, 16 Mar 2023 16:11:19 +0100 Subject: [PATCH 11/21] ~ fix strike on in typing --- index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.html b/index.html index 7888f82..c32aa3d 100644 --- a/index.html +++ b/index.html @@ -477,7 +477,7 @@

    Validation Definition

    The validation of an RDF graph G against a ShEx schema Sch is based on the existence of completeTyping(G, Sch). For an RDF graph G and a shapes schema Sch, a typing is a set of pairs of the form (n, s) where n is a node in G and s is a Shape that appears in some shape expression in Sch.shapes. - A correct typing is a typing such that for every RDF node/shape pair (n,s) in typing, matchesShape(n, s, G, Sch, typing) holds. + A correct typing is a typing such that for every RDF node/shape pair (n,s) in typing, matchesShape(n, s, G, Sch, typing) holds. completeTyping(G, Sch) is a unique correct typing that exists for every graph and every ShEx schema that satisfies the schema requirements.

    From f3433610302392b1c8953bd979bc763524f4d7bb Mon Sep 17 00:00:00 2001 From: Eric Prud'hommeaux Date: Thu, 16 Mar 2023 16:26:51 +0100 Subject: [PATCH 12/21] ~ fix RDFnodes --- index.html | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/index.html b/index.html index c32aa3d..4aa0a77 100644 --- a/index.html +++ b/index.html @@ -468,7 +468,7 @@

    Shapes Schema

    Validation Definition

    - isValid: For a graph G, a schema Sch and a fixed ShapeMap ism, isValid(G, Sch, ism) indicates that for every RDFnode/shapeLabel pair (n, sl) in ism, the node n satisfies the shape expression identified by sl. + isValid: For a graph G, a schema Sch and a fixed ShapeMap ism, isValid(G, Sch, ism) indicates that for every RDF node/shapeLabel pair (n, sl) in ism, the node n satisfies the shape expression identified by sl. The latterThis is captured by the expression satisfies(n, s, G, Sch, completeTyping(G, Sch)) where s is the shape expression identified by sl. The function satisfies is defined for every kind of shape expression.

    @@ -506,14 +506,14 @@

    Validation Definition

    • - completeTypingOn(1, G, Sch) is the union of all correct typings that contain only RDFnode/shape pairs (n,s) with stratum(s) = 1; + completeTypingOn(1, G, Sch) is the union of all correct typings that contain only RDF node/shape pairs (n,s) with stratum(s) = 1;
    • for every i between 2 and k, completeTypingOn(i, G, Sch) is the union of all correct typings that:
        -
      • contain only RDFnode/shape pairs (n,s) with stratum(s)i +
      • contain only RDF node/shape pairs (n,s) with stratum(s)i
      • -
      • are equal to completeTypingOn(i-1, G, Sch) when restricted to their RDFnode/shape pairs (n1,s1) for which stratum(s1) < i. +
      • are equal to completeTypingOn(i-1, G, Sch) when restricted to their RDF node/shape pairs (n1,s1) for which stratum(s1) < i.
    • @@ -2451,7 +2451,7 @@

      Negation Requirement

    - The dependency graph of the schema Sch is the graph which vertices are all the Shapes that appear in some shape expression in the shapes of Sch, and that has two kinds of edges: negative and positive. + The dependency graph of the schema Sch is the graph whose vertices are all the Shapes that appear in some shape expression in the shapes of Sch, and that has two kinds of edges: negative and positive. There is a negative edge from s1 to s2 if s1 has a negated reference to s2. There is a positive edge from s1 to s2 if s1 has a reference but not a negated reference to s2.

    From e64368b3a0e8a746f742d78d598f53ea51a6b681 Mon Sep 17 00:00:00 2001 From: Eric Prud'hommeaux Date: Thu, 16 Mar 2023 16:32:08 +0100 Subject: [PATCH 13/21] ~ more RDFnodes and note in 5.2 --- index.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/index.html b/index.html index 4aa0a77..00443e7 100644 --- a/index.html +++ b/index.html @@ -523,7 +523,7 @@

    Validation Definition

    - The definition on strogly connected component and maximal strongly connected component of a graph can be found on Wikipedia https://en.wikipedia.org/wiki/Strongly_connected_component. + The definition of strongly connected component and maximal strongly connected component of a graph can be found at Wikipedia https://en.wikipedia.org/wiki/Strongly_connected_component.
    @@ -532,12 +532,12 @@

    Validation Definition

    This property is reminiscent of the use of stratified negation in Datalog.

    - In order to decide isValid(Sch, G, m), it is sufficient to compute only a portion of completeTyping using an appropriate algorithm. + In order to decide isValid(Sch, G, m), it is sufficient to compute only a portion of the complete typing using an appropriate algorithm.

    - Popular methods for constructing the input fixed ShapeMaps can be found on https://www.w3.org/2001/sw/wiki/ShEx/ShapeMap. + Popular methods for constructing the input fixed ShapeMaps can be found at https://www.w3.org/2001/sw/wiki/ShEx/ShapeMap.

    From ea28dfa4336ac84da90927d4d20447d8dcd5d7dc Mon Sep 17 00:00:00 2001 From: Eric Prud'hommeaux Date: Thu, 16 Mar 2023 17:12:50 +0100 Subject: [PATCH 14/21] + ShapeDecls --- index.html | 39 ++++++++++++++++++++++----------------- 1 file changed, 22 insertions(+), 17 deletions(-) diff --git a/index.html b/index.html index 00443e7..b7e55f6 100644 --- a/index.html +++ b/index.html @@ -441,11 +441,12 @@

    The Shape Expressions Language

    Shapes Schema

    - A shapes schema is captured in a Schema object: + A shapes schema is captured in a Schema object with a list of Shape Declarationss:

    - + +
    Schema{imports:[IRIREF+]? startActs:[SemAct+]? start:shapeExpr? shapes:[shapeExpr+]? }
    Schema{imports:[IRIREF+]? startActs:[SemAct+]? start:shapeExpr? shapes:[ShapeDecl+]? }
    ShapeDecl{ id:shapeExprLabel shapeExpr:shapeExpr }

    @@ -523,7 +524,7 @@

    Validation Definition

    - The definition of strongly connected component and maximal strongly connected component of a graph can be found at Wikipedia https://en.wikipedia.org/wiki/Strongly_connected_component. + The definition of strongly connected component and maximal strongly connected component of a graph can be found at Wikipedia: https://en.wikipedia.org/wiki/Strongly_connected_component.
    @@ -532,7 +533,7 @@

    Validation Definition

    This property is reminiscent of the use of stratified negation in Datalog.

    - In order to decide isValid(Sch, G, m), it is sufficient to compute only a portion of the complete typing using an appropriate algorithm. + In order to decide isValid(Sch, G, m), it is sufficient to compute only a portion of the complete typing using an appropriate algorithm.

    @@ -584,11 +585,11 @@

    JSON Syntax

    - - - - - + + + + +
    shapeExpr = ShapeOr | ShapeAnd | ShapeNot | NodeConstraint | Shape | ShapeExternal | shapeExprRef ;
    ShapeOr { id:shapeExprLabel? shapeExprs:[shapeExpr{2,}] }
    ShapeAnd { id:shapeExprLabel? shapeExprs:[shapeExpr{2,}] }
    ShapeNot { id:shapeExprLabel? shapeExpr:shapeExpr }
    ShapeExternal { id:shapeExprLabel? }
    shapeExpr = ShapeOr | ShapeAnd | ShapeNot | NodeConstraint | Shape | ShapeExternal | shapeExprRef ;
    ShapeOr { shapeExprs:[shapeExpr{2,}] }
    ShapeAnd { shapeExprs:[shapeExpr{2,}] }
    ShapeNot { shapeExpr:shapeExpr }
    ShapeExternal { }
    shapeExprRef = shapeExprLabel ;
    shapeExprLabel = IRIREF | BNODE ;
    @@ -842,7 +843,7 @@
    The satisfies function

    Node Constraints

    - + @@ -1371,7 +1372,7 @@

    JSON Syntax

    NodeConstraint {id:shapeExprLabel? nodeKind:("iri" | "bnode" | "nonliteral" | "literal")? datatype:IRIREF? xsFacet* values:[valueSetValue+]? }
    NodeConstraint {nodeKind:("iri" | "bnode" | "nonliteral" | "literal")? datatype:IRIREF? xsFacet* values:[valueSetValue+]? }
    xsFacet =stringFacet | numericFacet ;
    stringFacet =(length|minlength|maxlength):INTEGER | pattern:STRING flags:STRING? ;
    numericFacet =(mininclusive|minexclusive|maxinclusive|maxexclusive):numericLiteral
    - + @@ -4186,6 +4187,9 @@

    ShEx Compact syntax (ShExC)

    Semantic actions before the first shape expression declaration are startActs. After the first shape expression declaration, semantic actions are associated with the previous declaration.

    +

    + As with Turtle and SPARQL, ShExC offers URL resolution relative to a base per [[RFC3986]] and prefixes map to provide shorthand ways to write IRI identifiers. +

    @@ -4286,9 +4290,9 @@

    ShEx Compact syntax (ShExC)

    - - - + + + @@ -5087,7 +5091,7 @@

    Terminals

    - + @@ -5488,8 +5492,9 @@

    ShEx JSON Syntax (ShExJ)

    --> - - + + + From 53e6e38daad5c30fb4f40cbcb25e526c392d356f Mon Sep 17 00:00:00 2001 From: Eric Prud'hommeaux Date: Thu, 16 Mar 2023 17:17:01 +0100 Subject: [PATCH 15/21] - thats and whiches --- index.html | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/index.html b/index.html index b7e55f6..82fc7cd 100644 --- a/index.html +++ b/index.html @@ -562,21 +562,21 @@

    Validation Definition

    Shape Expressions

    - A shape expression is composed of four kinds of objects combined with the algebraic operators And, Or and Not: + A shape expression is composed of four kinds of objects combined with the algebraic operators `And`, `Or` and `Not`:

    • - a node constraint (NodeConstraint) that defines the set of allowed values of a node. + A node constraint (NodeConstraint) defines the set of allowed values of a node. These include specification of RDF node kind, literal datatype, XML String and numeric facets and enumeration of value sets.
    • - a shape constraint (Shape) that defines a constraint on the allowed neighbourhood of a node, that is, the allowed triples that contain this node as subject or object. + A shape constraint (Shape) defines a constraint on the allowed neighbourhood of a node, that is, the allowed triples that contain this node as subject or object.
    • - an external shape (ShapeExternal) which is an extension mechanism to externally define e.g. functional shapes or prohibitively large value sets. + An external shape (ShapeExternal) is an extension mechanism to externally define e.g. functional shapes or prohibitively large value sets.
    • - a shape reference (shapeExprLabel) identifies another shape in the schema or an imported schema. + A shape reference (shapeExprLabel) identifies another shape in the schema or an imported schema.
    From 86e6a923bc11b5c61319739d45b2417da6a0c707 Mon Sep 17 00:00:00 2001 From: Eric Prud'hommeaux Date: Thu, 16 Mar 2023 17:21:27 +0100 Subject: [PATCH 16/21] + stratification issue --- index.html | 1 + 1 file changed, 1 insertion(+) diff --git a/index.html b/index.html index 82fc7cd..a4793a5 100644 --- a/index.html +++ b/index.html @@ -633,6 +633,7 @@

    Preliminary defintions

    A schema MUST NOT contain any shapeExprLabel that has a negated reference to itself, either directly or transitively. This is formalized by the requirement that the dependency graph of a schema MUST NOT have a cycle that traverses some negated reference. + Is this (partially) redundant against the stratification?

    From 1994e9e2b70ffac03bcd74fb1f6e74b0ee64a597 Mon Sep 17 00:00:00 2001 From: Eric Prud'hommeaux Date: Thu, 16 Mar 2023 17:28:15 +0100 Subject: [PATCH 17/21] ~ start on preliminary defns --- index.html | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/index.html b/index.html index a4793a5..fb5a2f3 100644 --- a/index.html +++ b/index.html @@ -638,18 +638,18 @@

    Preliminary defintions

    We construct a graph which nodes are the shapeExprLabels that appear in `Sch`. - We say that a label `L` *has a reference to* a label `L'` if there exists a TripleConstraint `tc` in `tcs(def(L))` such that a shapeExprRef `L'` appears in `tc.valueExpr` either directly or by traversing any ShapeAnd, ShapeOr, ShapeNot, tripleExprRef, tripleContr.valueExpr, but w/o traversing shapeExprRefs. - Such reference is called *negated reference* if: + We say that a label `L` has a reference to a label `L'` if there exists a TripleConstraint `tc` in `tcs(def(L))` such that a shapeExprRef `L'` appears in tc.valueExpr either directly or by traversing any ShapeAnd, ShapeOr, ShapeNot, tripleExprRef, in te TripleContraint's valueExpr, but without traversing shapeExprRefs. + Such reference is called negated reference if:

    • an odd number of ShapeNot is traversed before reaching `tc`, or
    • -
    • an odd number of ShapeNot after `tc.valueExpr`, or
    • -
    • **[TODO : something about extra]**
    • +
    • an odd number of ShapeNot after tc.valueExpr, or
    • +
    • [TODO : something about extra]

    - The dependency graph ... as before, using negated reference. + The dependency graph ... as before, using negated reference.

    From 6d3ce808f54951d973901a129b81cd894e5f066c Mon Sep 17 00:00:00 2001 From: Eric Prud'hommeaux Date: Thu, 16 Mar 2023 17:30:41 +0100 Subject: [PATCH 18/21] + link to negated reference --- index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.html b/index.html index fb5a2f3..abc5a5b 100644 --- a/index.html +++ b/index.html @@ -639,7 +639,7 @@

    Preliminary defintions

    We construct a graph which nodes are the shapeExprLabels that appear in `Sch`. We say that a label `L` has a reference to a label `L'` if there exists a TripleConstraint `tc` in `tcs(def(L))` such that a shapeExprRef `L'` appears in tc.valueExpr either directly or by traversing any ShapeAnd, ShapeOr, ShapeNot, tripleExprRef, in te TripleContraint's valueExpr, but without traversing shapeExprRefs. - Such reference is called negated reference if: + A reference is a negated reference if:

      From 08246450f27d948b62b77dd675b6c11b4dda11f3 Mon Sep 17 00:00:00 2001 From: Eric Prud'hommeaux Date: Tue, 21 Mar 2023 07:50:50 +0100 Subject: [PATCH 19/21] ~ shapes: [ShapeDecl] --- index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.html b/index.html index abc5a5b..4725d4a 100644 --- a/index.html +++ b/index.html @@ -5493,7 +5493,7 @@

      ShEx JSON Syntax (ShExJ)

    --> - + From 03d7a71adffa37c7be477026dc90fef948b37c2e Mon Sep 17 00:00:00 2001 From: Eric Prud'hommeaux Date: Mon, 25 Sep 2023 23:02:42 +0200 Subject: [PATCH 20/21] + IEEE look --- index.html | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/index.html b/index.html index 4725d4a..e8ab98d 100644 --- a/index.html +++ b/index.html @@ -6,8 +6,18 @@ Shape Expressions Language 2.next + - From 55293b9d86a91d11b741d0732618ab459bfb0666 Mon Sep 17 00:00:00 2001 From: Eric Prud'hommeaux Date: Mon, 25 Sep 2023 23:08:07 +0200 Subject: [PATCH 21/21] + ieee template --- respec-ieee.js | 685 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 685 insertions(+) create mode 100644 respec-ieee.js diff --git a/respec-ieee.js b/respec-ieee.js new file mode 100644 index 0000000..5a50e2b --- /dev/null +++ b/respec-ieee.js @@ -0,0 +1,685 @@ +window.respecVersion="34.1.4",function(){"use strict";const e=!!window.require;if(!e){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 t(t,n){e||(window.require.modules[t]=n)}const n=new EventTarget;function r(e,t){if(n.dispatchEvent(new CustomEvent(e,{detail:t})),window.parent===window.self)return;const r=String(JSON.stringify(t?.stack||t));window.parent.postMessage({topic:e,args:r},window.parent.location.origin)}function s(e,t,r={once:!1}){n.addEventListener(e,(e=>t(e.detail)),r)}t("core/pubsubhub",{sub:s});const o=["githubToken","githubUser"];const i=document.documentElement;i&&!i.hasAttribute("lang")&&(i.lang="en",i.hasAttribute("dir")||(i.dir="ltr"));const a={},c=i.lang;var l=Object.freeze({__proto__:null,l10n:a,lang:c,name:"core/l10n",run:function(e){e.l10n=a[c]||a.en}});let u,d;const p=new WeakMap,f=new WeakMap,h=new WeakMap,m=new WeakMap,g=new WeakMap;let b={get(e,t,n){if(e instanceof IDBTransaction){if("done"===t)return f.get(e);if("objectStoreNames"===t)return e.objectStoreNames||h.get(e);if("store"===t)return n.objectStoreNames[1]?void 0:n.objectStore(n.objectStoreNames[0])}return v(e[t])},set:(e,t,n)=>(e[t]=n,!0),has:(e,t)=>e instanceof IDBTransaction&&("done"===t||"store"===t)||t in e};function y(e){return e!==IDBDatabase.prototype.transaction||"objectStoreNames"in IDBTransaction.prototype?(d||(d=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])).includes(e)?function(...t){return e.apply(k(this),t),v(p.get(this))}:function(...t){return v(e.apply(k(this),t))}:function(t,...n){const r=e.call(k(this),t,...n);return h.set(r,t.sort?t.sort():[t]),v(r)}}function w(e){return"function"==typeof e?y(e):(e instanceof IDBTransaction&&function(e){if(f.has(e))return;const t=new Promise(((t,n)=>{const r=()=>{e.removeEventListener("complete",s),e.removeEventListener("error",o),e.removeEventListener("abort",o)},s=()=>{t(),r()},o=()=>{n(e.error||new DOMException("AbortError","AbortError")),r()};e.addEventListener("complete",s),e.addEventListener("error",o),e.addEventListener("abort",o)}));f.set(e,t)}(e),t=e,(u||(u=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])).some((e=>t instanceof e))?new Proxy(e,b):e);var t}function v(e){if(e instanceof IDBRequest)return function(e){const t=new Promise(((t,n)=>{const r=()=>{e.removeEventListener("success",s),e.removeEventListener("error",o)},s=()=>{t(v(e.result)),r()},o=()=>{n(e.error),r()};e.addEventListener("success",s),e.addEventListener("error",o)}));return t.then((t=>{t instanceof IDBCursor&&p.set(t,e)})).catch((()=>{})),g.set(t,e),t}(e);if(m.has(e))return m.get(e);const t=w(e);return t!==e&&(m.set(e,t),g.set(t,e)),t}const k=e=>g.get(e);const x=["get","getKey","getAll","getAllKeys","count"],$=["put","add","delete","clear"],_=new Map;function S(e,t){if(!(e instanceof IDBDatabase)||t in e||"string"!=typeof t)return;if(_.get(t))return _.get(t);const n=t.replace(/FromIndex$/,""),r=t!==n,s=$.includes(n);if(!(n in(r?IDBIndex:IDBObjectStore).prototype)||!s&&!x.includes(n))return;const o=async function(e,...t){const o=this.transaction(e,s?"readwrite":"readonly");let i=o.store;return r&&(i=i.index(t.shift())),(await Promise.all([i[n](...t),s&&o.done]))[0]};return _.set(t,o),o}b=(e=>({...e,get:(t,n,r)=>S(t,n)||e.get(t,n,r),has:(t,n)=>!!S(t,n)||e.has(t,n)}))(b);var C=Object.freeze({__proto__:null,deleteDB:function(e,{blocked:t}={}){const n=indexedDB.deleteDatabase(e);return t&&n.addEventListener("blocked",(e=>t(e.oldVersion,e))),v(n).then((()=>{}))},openDB:function(e,t,{blocked:n,upgrade:r,blocking:s,terminated:o}={}){const i=indexedDB.open(e,t),a=v(i);return r&&i.addEventListener("upgradeneeded",(e=>{r(v(i.result),e.oldVersion,e.newVersion,v(i.transaction),e)})),n&&i.addEventListener("blocked",(e=>n(e.oldVersion,e.newVersion,e))),a.then((e=>{o&&e.addEventListener("close",(()=>o())),s&&e.addEventListener("versionchange",(e=>s(e.oldVersion,e.newVersion,e)))})).catch((()=>{})),a},unwrap:k,wrap:v});function E(e,t,n,r,s,{level:o="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 s=n.map((e=>e.trivia+e.value)).join(""),o=e[t];return"eof"===o.type?s:r?s+o.trivia:s.slice(o.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"===s?"since":"inside",g=`${s} error at line ${u}${e.name?` in ${e.name}`:""}${n&&n.name?`, ${m} \`${n.partial?"partial ":""}${function(e){const t=[e];for(;e&&e.parent;){const{parent:n}=e;t.unshift(n),e=n}return t.map((e=>function(e,t){let n=e;return t&&(n+=` ${t}`),n}(e.type,e.name))).join(" -> ")}(n)}\``:""}:\n${h}`;return{message:`${g} ${r}`,bareMessage:r,context:g,line:u,sourceName:e.name,level:o,ruleName:a,autofix:i,input:f,tokens:p}}function A(e,t,n,r){return E(e,t,n,r,"Syntax")}function L(e,t,n,r,s={}){return s.ruleName=n,E(t.source,e.index,t,r,"Validation",s)}class R{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 T(e,t,{useNullableInner:n}={}){if(!e.union){const r=t.unique.get(e.idlType);if(!r)return;if("typedef"===r.type){const{typedefIncludesDictionary:n}=t.cache;if(n.has(r))return n.get(r);t.cache.typedefIncludesDictionary.set(r,void 0);const s=T(r.idlType,t);if(t.cache.typedefIncludesDictionary.set(r,s),s)return{reference:e,dictionary:s.dictionary}}if("dictionary"===r.type&&(n||!e.nullable))return{reference:e,dictionary:r}}for(const n of e.subtype){const e=T(n,t);if(e)return n.union?e:{reference:n,dictionary:e.dictionary}}}function D(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?D(r,t)&&(n=!0):n=!0}return t.cache.dictionaryIncludesRequiredField.set(e,n),n}class I extends Array{constructor({source:e,tokens:t}){super(),Object.defineProperties(this,{source:{value:e},tokens:{value:t},parent:{value:null,writable:!0}})}}class N extends R{static parser(e,t){return()=>{const n=e.consumeKind(t);if(n)return new N({source:e.source,tokens:{value:n}})}}get value(){return J(this.tokens.value.value)}write(e){return e.ts.wrap([e.token(this.tokens.value),e.token(this.tokens.separator)])}}class P extends N{static parse(e){const t=e.consumeKind("eof");if(t)return new P({source:e.source,tokens:{value:t}})}get type(){return"eof"}}function j(e,t){return X(e,{parser:N.parser(e,t),listName:t+" list"})}const O=["identifier","decimal","integer","string"],z=new Map([...["NoInterfaceObject","LenientSetter","LenientThis","TreatNonObjectAsNull","Unforgeable"].map((e=>[e,`Legacy${e}`])),["NamedConstructor","LegacyFactoryFunction"],["OverrideBuiltins","LegacyOverrideBuiltIns"],["TreatNullAs","LegacyNullToEmptyString"]]);function M(e){for(const t of O){const n=j(e,t);if(n.length)return n}e.error("Expected identifiers, strings, decimals, or integers but none found")}class q extends R{static parse(e){const t={assign:e.consume("=")},n=le(new q({source:e.source,tokens:t}));if(n.list=[],t.assign){if(t.asterisk=e.consume("*"),t.asterisk)return n.this;t.secondaryName=e.consumeKind(...O)}return t.open=e.consume("("),t.open?(n.list=n.rhsIsList?M(e):ne(e),t.close=e.consume(")")||e.error("Unexpected token in extended attribute argument list")):t.assign&&!t.secondaryName&&e.error("No right hand side to extended attribute assignment"),n.this}get rhsIsList(){return this.tokens.assign&&!this.tokens.asterisk&&!this.tokens.secondaryName}get rhsType(){return this.rhsIsList?this.list[0].tokens.value.type+"-list":this.tokens.asterisk?"*":this.tokens.secondaryName?this.tokens.secondaryName.type:null}write(e){const{rhsType:t}=this;return e.ts.wrap([e.token(this.tokens.assign),e.token(this.tokens.asterisk),e.reference_token(this.tokens.secondaryName,this.parent),e.token(this.tokens.open),...this.list.map((n=>"identifier-list"===t?e.identifier(n,this.parent):n.write(e))),e.token(this.tokens.close)])}}class F extends R{static parse(e){const t=e.consumeKind("identifier");if(t)return new F({source:e.source,tokens:{name:t},params:q.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?J(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 L(this.tokens.name,this,"no-nointerfaceobject",e,{level:"warning"})}else if(z.has(t)){const e=`\`[${t}]\` extended attribute is a legacy feature that is now renamed to \`[${z.get(t)}]\`. Refer to the [relevant upstream PR](https://github.com/whatwg/webidl/pull/870) for more information.`;yield L(this.tokens.name,this,"renamed-legacy",e,{level:"warning",autofix:(n=this,()=>{const{name:e}=n;n.tokens.name.value=z.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 U extends I{static parse(e){const t={};t.open=e.consume("[");const n=new U({source:e.source,tokens:t});return t.open?(n.push(...X(e,{parser:F.parse,listName:"extended attribute"})),t.close=e.consume("]")||e.error("Expected a closing token for the extended attribute list"),n.length||(e.unconsume(t.close.index),e.error("An extended attribute list must not be empty")),e.probe("[")&&e.error("Illegal double extended attribute lists, consider merging them"),n):n}*validate(e){for(const t of this)yield*t.validate(e)}write(e){return this.length?e.ts.wrap([e.token(this.tokens.open),...this.map((t=>t.write(e))),e.token(this.tokens.close)]):""}}function W(e,t){const n=e.consume("?");n&&(t.tokens.nullable=n),e.probe("?")&&e.error("Can't nullable more than once")}function B(e,t){let n=function(e,t){const n=e.consume("FrozenArray","ObservableArray","Promise","sequence","record");if(!n)return;const r=le(new H({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=se(e,t)||e.error("Missing Promise subtype");r.subtype.push(n);break}case"sequence":case"FrozenArray":case"ObservableArray":{const s=re(e,t)||e.error(`Missing ${n.value} subtype`);r.subtype.push(s);break}case"record":{e.probe("[")&&e.error("Record key cannot have extended attribute");const n=e.consume(...pe)||e.error(`Record key must be one of: ${pe.join(", ")}`),s=new H({source:e.source,tokens:{base:n}});s.tokens.separator=e.consume(",")||e.error("Missing comma after record key type"),s.type=t;const o=re(e,t)||e.error("Error parsing generic type record");r.subtype.push(s,o);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)||te(e);if(!n){const t=e.consumeKind("identifier")||e.consume(...pe,...de);if(!t)return;n=new H({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,W(e,n),n.nullable&&"any"===n.idlType&&e.error("Type `any` cannot be made nullable"),n}class H extends R{static parse(e,t){return B(e,t)||function(e,t){const n={};if(n.open=e.consume("("),!n.open)return;const r=le(new H({source:e.source,tokens:n}));for(r.type=t||null;;){const t=re(e)||e.error("No type after open parenthesis or 'or' in union type");"any"===t.idlType&&e.error("Type `any` cannot be included in a union type"),"Promise"===t.generic&&e.error("Type `Promise` cannot be included in a union type"),r.subtype.push(t);const n=e.consume("or");if(!n)break;t.tokens.separator=n}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"),W(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 U({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 J([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),"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 L(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}=T(r,e)||{};if(t){const e=(this.union?t:this).tokens.base,n="Nullable union cannot include a dictionary type.";yield L(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)])}}class V extends R{static parse(e){const t=e.consume("=");if(!t)return null;const n=Q(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 V({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 ee(this.expression[0]).type}get value(){return ee(this.expression[0]).value}get negative(){return ee(this.expression[0]).negative}write(e){return e.ts.wrap([e.token(this.tokens.assign),...this.expression.map((t=>e.token(t)))])}}class G extends R{static parse(e){const t=e.position,n={},r=le(new G({source:e.source,tokens:n}));return r.extAttrs=U.parse(e),n.optional=e.consume("optional"),r.idlType=re(e,"argument-type"),r.idlType?(n.optional||(n.variadic=e.consume("...")),n.name=e.consumeKind("identifier")||e.consume(...fe),n.name?(r.default=n.optional?V.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 J(this.tokens.name.value)}*validate(e){yield*this.extAttrs.validate(e),yield*this.idlType.validate(e);const t=T(this.idlType,e,{useNullableInner:!0});if(t)if(this.idlType.nullable){const e="Dictionary arguments cannot be nullable.";yield L(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 L(this.tokens.name,this,"dict-arg-default",e,{autofix:K(this)})}}else if(this.parent&&!D(t.dictionary,e)&&function(e){const t=e.parent.arguments||e.parent.list,n=t.indexOf(e);return!t.slice(n+1).some((e=>!e.optional))}(this)){const e="Dictionary argument must be optional if it has no required fields";yield L(this.tokens.name,this,"dict-arg-optional",e,{autofix:(n=this,()=>{const e=ce(n.idlType);n.tokens.optional={...e,type:"optional",value:"optional"},e.trivia=" ",K(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 K(e){return()=>{e.default=V.parse(new be(" = {}"))}}class Y extends R{static parse(e,{special:t,regular:n}={}){const r={special:t},s=le(new Y({source:e.source,tokens:r}));return t&&"stringifier"===t.value&&(r.termination=e.consume(";"),r.termination)?(s.arguments=[],s):(t||n||(r.special=e.consume("getter","setter","deleter")),s.idlType=se(e)||e.error("Missing return type"),r.name=e.consumeKind("identifier")||e.consume("includes"),r.open=e.consume("(")||e.error("Invalid operation"),s.arguments=ne(e),r.close=e.consume(")")||e.error("Unterminated operation"),r.termination=e.consume(";")||e.error("Unterminated operation, expected `;`"),s.this)}get type(){return"operation"}get name(){const{name:e}=this.tokens;return e?J(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 L(this.tokens.open,this,"incomplete-op",e)}this.idlType&&(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 Z extends R{static parse(e,{special:t,noInherit:n=!1,readonly:r=!1}={}){const s=e.position,o={special:t},i=le(new Z({source:e.source,tokens:o}));if(t||n||(o.special=e.consume("inherit")),"inherit"===i.special&&e.probe("readonly")&&e.error("Inherited attributes cannot be read-only"),o.readonly=e.consume("readonly"),r&&!o.readonly&&e.probe("attribute")&&e.error("Attributes must be readonly in this context"),o.base=e.consume("attribute"),o.base)return i.idlType=re(e,"attribute-type")||e.error("Attribute lacks a type"),o.name=e.consumeKind("identifier")||e.consume("async","required")||e.error("Attribute lacks a name"),o.termination=e.consume(";")||e.error("Unterminated attribute, expected `;`"),i.this;e.unconsume(s)}get type(){return"attribute"}get special(){return this.tokens.special?this.tokens.special.value:""}get readonly(){return!!this.tokens.readonly}get name(){return J(this.tokens.name.value)}*validate(e){if(yield*this.extAttrs.validate(e),yield*this.idlType.validate(e),["sequence","record"].includes(this.idlType.generic)){const e=`Attributes cannot accept ${this.idlType.generic} types.`;yield L(this.tokens.name,this,"attr-invalid-type",e)}{const{reference:t}=T(this.idlType,e)||{};if(t){const e=(this.idlType.union?t:this.idlType).tokens.base,n="Attributes cannot accept dictionary types.";yield L(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 L(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 J(e){return e.startsWith("_")?e.slice(1):e}function X(e,{parser:t,allowDangler:n,listName:r="list"}){const s=t(e);if(!s)return[];s.tokens.separator=e.consume(",");const o=[s];for(;s.tokens.separator;){const s=t(e);if(!s){n||e.error(`Trailing comma in ${r}`);break}if(s.tokens.separator=e.consume(","),o.push(s),!s.tokens.separator)break}return o}function Q(e){return e.consumeKind("decimal","integer")||e.consume("true","false","Infinity","-Infinity","NaN")}function ee({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 te(e){const{source:t}=e,n=function(){const n=e.consume("unsigned"),r=e.consume("short","long");if(r){const s=e.consume("long");return new H({source:t,tokens:{prefix:n,base:r,postfix:s}})}n&&e.error("Failed to parse integer type")}()||function(){const n=e.consume("unrestricted"),r=e.consume("float","double");if(r)return new H({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 H({source:t,tokens:{base:r}}):void 0}function ne(e){return X(e,{parser:G.parse,listName:"arguments list"})}function re(e,t){const n=U.parse(e),r=H.parse(e,t);return r&&(le(r).extAttrs=n),r}function se(e,t){const n=H.parse(e,t||"return-type");if(n)return n;const r=e.consume("void");if(r){const t=new H({source:e.source,tokens:{base:r}});return t.type="return-type",t}}function oe(e){const t=e.consume("stringifier");if(!t)return;return Z.parse(e,{special:t})||Y.parse(e,{special:t})||e.error("Unterminated stringifier")}function ie(e){const t=e.split("\n");if(t.length){const e=t[t.length-1].match(/^\s+/);if(e)return e[0]}return""}function ae(e){return()=>{if(e.extAttrs.length){const t=new be("Exposed=Window,"),n=F.parse(t);n.tokens.separator=t.consume(",");const r=e.extAttrs[0];/^\s/.test(r.tokens.name.trivia)||(r.tokens.name.trivia=` ${r.tokens.name.trivia}`),e.extAttrs.unshift(n)}else{le(e).extAttrs=U.parse(new be("[Exposed=Window]"));const t=e.tokens.base.trivia;e.extAttrs.tokens.open.trivia=t,e.tokens.base.trivia=`\n${ie(t)}`}}}function ce(e){if(e.extAttrs.length)return e.extAttrs.tokens.open;if("operation"===e.type&&!e.special)return ce(e.idlType);return Object.values(e.tokens).sort(((e,t)=>e.index-t.index))[0]}function le(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?le(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 ue={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},de=["ArrayBuffer","DataView","Int8Array","Int16Array","Int32Array","Uint8Array","Uint16Array","Uint32Array","Uint8ClampedArray","BigInt64Array","BigUint64Array","Float32Array","Float64Array","any","object","symbol"],pe=["ByteString","DOMString","USVString"],fe=["async","attribute","callback","const","constructor","deleter","dictionary","enum","getter","includes","inherit","interface","iterable","maplike","namespace","partial","required","setlike","setter","static","stringifier","typedef","unrestricted"],he=["-Infinity","FrozenArray","Infinity","NaN","ObservableArray","Promise","bigint","boolean","byte","double","false","float","long","mixin","null","octet","optional","or","readonly","record","sequence","short","true","undefined","unsigned","void"].concat(fe,pe,de),me=["(",")",",","...",":",";","<","=",">","?","*","[","]","{","}"],ge=["_constructor","toString","_toString"];class be{constructor(e){this.source=function(e){const t=[];let n=0,r="",s=1,o=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 ye extends Error{constructor({message:e,bareMessage:t,context:n,line:r,sourceName:s,input:o,tokens:i}){super(e),this.name="WebIDLParseError",this.bareMessage=t,this.context=n,this.line=r,this.sourceName=s,this.input=o,this.tokens=i}}class we extends N{static parse(e){const t=e.consumeKind("string");if(t)return new we({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 ve extends R{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=le(new ve({source:e.source,tokens:t}));return e.current=n.this,t.open=e.consume("{")||e.error("Bodyless enum"),n.values=X(e,{parser:we.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 J(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 ke extends R{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 ke({source:e.source,tokens:n});e.unconsume(t.index)}get type(){return"includes"}get target(){return J(this.tokens.target.value)}get includes(){return J(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 xe extends R{static parse(e){const t={},n=le(new xe({source:e.source,tokens:t}));if(t.base=e.consume("typedef"),t.base)return n.idlType=re(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 J(this.tokens.name.value)}*validate(e){yield*this.idlType.validate(e)}write(e){return e.ts.definition(e.ts.wrap([this.extAttrs.write(e),e.token(this.tokens.base),e.ts.type(this.idlType.write(e)),e.name_token(this.tokens.name,{data:this}),e.token(this.tokens.termination)]),{data:this})}}class $e extends R{static parse(e,t){const n={base:t},r=le(new $e({source:e.source,tokens:n}));return n.name=e.consumeKind("identifier")||e.error("Callback lacks a name"),e.current=r.this,n.assign=e.consume("=")||e.error("Callback lacks an assignment"),r.idlType=se(e)||e.error("Callback lacks a return type"),n.open=e.consume("(")||e.error("Callback lacks parentheses for arguments"),r.arguments=ne(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 J(this.tokens.name.value)}*validate(e){yield*this.extAttrs.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.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 _e extends R{static parse(e,t,{inheritable:n,allowedMembers:r}){const{tokens:s,type:o}=t;for(s.name=e.consumeKind("identifier")||e.error(`Missing name in ${o}`),e.current=t,t=le(t),n&&Object.assign(s,function(e){const t=e.consume(":");return t?{colon:t,inheritance:e.consumeKind("identifier")||e.error("Inheritance lacks a type")}:{}}(e)),s.open=e.consume("{")||e.error(`Bodyless ${o}`),t.members=[];;){if(s.close=e.consume("}"),s.close)return s.termination=e.consume(";")||e.error(`Missing semicolon after ${o}`),t.this;const n=U.parse(e);let i;for(const[t,...n]of r)if(i=le(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 J(this.tokens.name.value)}get inheritance(){return this.tokens.inheritance?J(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 Se extends R{static parse(e){const t={};if(t.base=e.consume("const"),!t.base)return;let n=te(e);if(!n){const t=e.consumeKind("identifier")||e.error("Const lacks a type");n=new H({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=Q(e)||e.error("Const lacks a value"),t.termination=e.consume(";")||e.error("Unterminated const, expected `;`");const r=new Se({source:e.source,tokens:t});return le(r).idlType=n,r}get type(){return"const"}get name(){return J(this.tokens.name.value)}get value(){return ee(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 Ce extends R{static parse(e){const t=e.position,n=le(new Ce({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","maplike","setlike"),!r.base)return void e.unconsume(t);const{type:s}=n,o="maplike"===s,i=o||"iterable"===s,a=n.async&&"iterable"===s;r.open=e.consume("<")||e.error(`Missing less-than sign \`<\` in ${s} declaration`);const c=re(e)||e.error(`Missing a type argument in ${s} declaration`);return n.idlType=[c],n.arguments=[],i&&(c.tokens.separator=e.consume(","),c.tokens.separator?n.idlType.push(re(e)):o&&e.error(`Missing second type argument in ${s} declaration`)),r.close=e.consume(">")||e.error(`Missing greater-than sign \`>\` in ${s} declaration`),e.probe("(")&&(a?(r.argsOpen=e.consume("("),n.arguments.push(...ne(e)),r.argsClose=e.consume(")")||e.error("Unterminated async iterable argument list")):e.error("Arguments are only allowed for `async iterable`")),r.termination=e.consume(";")||e.error(`Missing semicolon after ${s} declaration`),n.this}get type(){return this.tokens.base.value}get readonly(){return!!this.tokens.readonly}get async(){return!!this.tokens.async}*validate(e){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 Ee extends R{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=ne(e);n.close=e.consume(")")||e.error("Unterminated constructor"),n.termination=e.consume(";")||e.error("No semicolon after constructor");const s=new Ee({source:e.source,tokens:n});return le(s).arguments=r,s}get type(){return"constructor"}*validate(e){for(const t of this.arguments)yield*t.validate(e)}write(e){const{parent:t}=this;return e.ts.definition(e.ts.wrap([this.extAttrs.write(e),e.token(this.tokens.base,e.ts.nameless,{data:this,parent:t}),e.token(this.tokens.open),e.ts.wrap(this.arguments.map((t=>t.write(e)))),e.token(this.tokens.close),e.token(this.tokens.termination)]),{data:this,parent:t})}}function Ae(e){const t=e.consume("static");if(!t)return;return Z.parse(e,{special:t})||Y.parse(e,{special:t})||e.error("No body in static member")}class Le extends _e{static parse(e,t,{partial:n=null}={}){const r={partial:n,base:t};return _e.parse(e,new Le({source:e.source,tokens:r}),{inheritable:!n,allowedMembers:[[Se.parse],[Ee.parse],[Ae],[oe],[Ce.parse],[Z.parse],[Y.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 L(this.tokens.name,this,"require-exposed",e,{autofix:ae(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 L(e.tokens.name,this,"constructor-member",t,{autofix:Re(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 L(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 L(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)||[],s=e.mixinMap.get(t.name)||[];for(const e of[...r,...s]){const r=i(e),s=r.filter((e=>"static"===e.special)),a=r.filter((e=>"static"!==e.special));yield*o(s,n.statics,e,t),yield*o(a,n.nonstatics,e,t),s.forEach((e=>n.statics.add(e.name))),a.forEach((e=>n.nonstatics.add(e.name)))}function*o(e,t,n,r){for(const s of e){const{name:e}=s;if(e&&t.has(e)){const t=`The ${"static"===s.special?"static ":""}operation "${e}" has already been defined for the base interface "${r.name}" either in itself or in a mixin`;yield L(s.tokens.name,n,"no-cross-overload",t)}}}function i(e){return e.members.filter((({type:e})=>"operation"===e))}}(e,this))}}function Re(e,t){return e=le(e),()=>{const n=ie(e.extAttrs.tokens.open.trivia),r=e.members.length?ie(ce(e.members[0]).trivia):function(e){const t=ie(e),n=t.includes("\t")?"\t":" ";return t+n}(n),s=Ee.parse(new be(`\n${r}constructor();`));s.extAttrs=new U({source:e.source,tokens:{}}),le(s).arguments=t.arguments;const o=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(o+1,0,s);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 Te extends _e{static parse(e,t,{partial:n}={}){const r={partial:n,base:t};if(r.mixin=e.consume("mixin"),r.mixin)return _e.parse(e,new Te({source:e.source,tokens:r}),{allowedMembers:[[Se.parse],[oe],[Z.parse,{noInherit:!0}],[Y.parse,{regular:!0}]]})}get type(){return"interface mixin"}}class De extends R{static parse(e){const t={},n=le(new De({source:e.source,tokens:t}));return n.extAttrs=U.parse(e),t.required=e.consume("required"),n.idlType=re(e,"dictionary-type")||e.error("Dictionary member lacks a type"),t.name=e.consumeKind("identifier")||e.error("Dictionary member lacks a name"),n.default=V.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 J(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 Ie extends _e{static parse(e,{partial:t}={}){const n={partial:t};if(n.base=e.consume("dictionary"),n.base)return _e.parse(e,new Ie({source:e.source,tokens:n}),{inheritable:!t,allowedMembers:[[De.parse]]})}get type(){return"dictionary"}}class Ne extends _e{static parse(e,{partial:t}={}){const n={partial:t};if(n.base=e.consume("namespace"),n.base)return _e.parse(e,new Ne({source:e.source,tokens:n}),{allowedMembers:[[Z.parse,{noInherit:!0,readonly:!0}],[Se.parse],[Y.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 L(this.tokens.name,this,"require-exposed",e,{autofix:ae(this)})}yield*super.validate(e)}}class Pe extends _e{static parse(e,t,{partial:n=null}={}){const r={callback:t};if(r.base=e.consume("interface"),r.base)return _e.parse(e,new Pe({source:e.source,tokens:r}),{inheritable:!n,allowedMembers:[[Se.parse],[Y.parse,{regular:!0}]]})}get type(){return"callback interface"}}function je(e,t){const n=e.source;function r(t){e.error(t)}function s(...t){return e.consume(...t)}function o(t){const n=s("interface");if(!n)return;return Te.parse(e,n,t)||Le.parse(e,n,t)||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 t=s("callback");if(t)return e.probe("interface")?Pe.parse(e,t):$e.parse(e,t)}()||o()||function(){const t=s("partial");if(t)return Ie.parse(e,{partial:t})||o({partial:t})||Ne.parse(e,{partial:t})||r("Partial doesn't apply to anything")}()||Ie.parse(e)||ve.parse(e)||xe.parse(e)||ke.parse(e)||Ne.parse(e)}const a=function(){if(!n.length)return[];const s=[];for(;;){const t=U.parse(e),n=i();if(!n){t.length&&r("Stray extended attributes");break}le(n).extAttrs=t,s.push(n)}const o=P.parse(e);return t.concrete&&s.push(o),s}();return e.positione.join(""),trivia:Oe,name:Oe,reference:Oe,type:Oe,generic:Oe,nameless:Oe,inheritance:Oe,definition:Oe,extendedAttribute:Oe,extendedAttributeReference:Oe};class Me{constructor(e){this.ts=Object.assign({},ze,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=Oe,...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 qe(e,t){const n=new Map,r=e.filter((e=>"includes"===e.type));for(const e of r){const r=t.get(e.includes);if(!r)continue;const s=n.get(e.target);s?s.push(r):n.set(e.target,[r])}return n}function*Fe(e){const t=function(e){const t=new Map,n=new Set,r=new Map;for(const s of e)if(s.partial){const e=r.get(s.name);e?e.push(s):r.set(s.name,[s])}else s.name&&(t.has(s.name)?n.add(s):t.set(s.name,s));return{all:e,unique:t,partials:r,duplicates:n,mixinMap:qe(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 L(n.tokens.name,n,"no-duplicate",r)}}(t)}var Ue=Object.freeze({__proto__:null,WebIDLParseError:ye,parse:function(e,t={}){const n=new be(e);return void 0!==t.sourceName&&(n.source.name=t.sourceName),je(n,t)},validate:function(e){return[...Fe((t=e,t.flat?t.flat():[].concat(...t)))];var t},write:function(e,{templates:t=ze}={}){t=Object.assign({},ze,t);const n=new Me(t);return t.wrap(e.map((e=>e.write(n))))}});const We=/^[!#$%&'*+-.^`|~\w]+$/,Be=/[\u000A\u000D\u0009\u0020]/u,He=/^[\u0009\u{0020}-\{u0073}\u{0080}-\u{00FF}]+$/u;function Ve(e,t,n){(t&&""!==t&&!e.has(t)&&He.test(n)||null===n)&&e.set(t.toLowerCase(),n)}function Ge(){return{async:!1,baseUrl:null,breaks:!1,extensions:null,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,hooks:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}}let Ke={async:!1,baseUrl:null,breaks:!1,extensions:null,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,hooks:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1};const Ye=/[&<>"']/,Ze=new RegExp(Ye.source,"g"),Je=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,Xe=new RegExp(Je.source,"g"),Qe={"&":"&","<":"<",">":">",'"':""","'":"'"},et=e=>Qe[e];function tt(e,t){if(t){if(Ye.test(e))return e.replace(Ze,et)}else if(Je.test(e))return e.replace(Xe,et);return e}const nt=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi;function rt(e){return e.replace(nt,((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 st=/(^|[^\[])\^/g;function ot(e,t){e="string"==typeof e?e:e.source,t=t||"";const n={replace:(t,r)=>(r=(r=r.source||r).replace(st,"$1"),e=e.replace(t,r),n),getRegex:()=>new RegExp(e,t)};return n}const it=/[^\w:]/g,at=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function ct(e,t,n){if(e){let e;try{e=decodeURIComponent(rt(n)).replace(it,"").toLowerCase()}catch(e){return null}if(0===e.indexOf("javascript:")||0===e.indexOf("vbscript:")||0===e.indexOf("data:"))return null}t&&!at.test(n)&&(n=function(e,t){lt[" "+e]||(ut.test(e)?lt[" "+e]=e+"/":lt[" "+e]=mt(e,"/",!0));const n=-1===(e=lt[" "+e]).indexOf(":");return"//"===t.substring(0,2)?n?t:e.replace(dt,"$1")+t:"/"===t.charAt(0)?n?t:e.replace(pt,"$1")+t:e+t}(t,n));try{n=encodeURI(n).replace(/%25/g,"%")}catch(e){return null}return n}const lt={},ut=/^[^:]+:\/*[^/]*$/,dt=/^([^:]+:)[\s\S]*$/,pt=/^([^:]+:\/*[^/]*)[\s\S]*$/;const ft={exec:function(){}};function ht(e,t){const n=e.replace(/\|/g,((e,t,n)=>{let r=!1,s=t;for(;--s>=0&&"\\"===n[s];)r=!r;return r?"|":" |"})).split(/ \|/);let r=0;if(n[0].trim()||n.shift(),n.length>0&&!n[n.length-1].trim()&&n.pop(),n.length>t)n.splice(t);else for(;n.length1;)1&t&&(n+=e),t>>=1,e+=e;return n+e}function bt(e,t,n,r){const s=t.href,o=t.title?tt(t.title):null,i=e[1].replace(/\\([\[\]])/g,"$1");if("!"!==e[0].charAt(0)){r.state.inLink=!0;const e={type:"link",raw:n,href:s,title:o,text:i,tokens:r.inlineTokens(i)};return r.state.inLink=!1,e}return{type:"image",raw:n,href:s,title:o,text:tt(i)}}class yt{constructor(e){this.options=e||Ke}space(e){const t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)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._escapes,"$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){const e=t[0].replace(/^ *>[ \t]?/gm,""),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,r,s,o,i,a,c,l,u,d,p,f,h=t[1].trim();const m=h.length>1,g={type:"list",raw:"",ordered:m,start:m?+h.slice(0,-1):"",loose:!1,items:[]};h=m?`\\d{1,9}\\${h.slice(-1)}`:`\\${h}`,this.options.pedantic&&(h=m?h:"[*+-]");const b=new RegExp(`^( {0,3}${h})((?:[\t ][^\\n]*)?(?:\\n|$))`);for(;e&&(f=!1,t=b.exec(e))&&!this.rules.block.hr.test(e);){if(n=t[0],e=e.substring(n.length),l=t[2].split("\n",1)[0].replace(/^\t+/,(e=>" ".repeat(3*e.length))),u=e.split("\n",1)[0],this.options.pedantic?(o=2,p=l.trimLeft()):(o=t[2].search(/[^ ]/),o=o>4?1:o,p=l.slice(o),o+=t[1].length),a=!1,!l&&/^ *$/.test(u)&&(n+=u+"\n",e=e.substring(u.length+1),f=!0),!f){const t=new RegExp(`^ {0,${Math.min(3,o-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ \t][^\\n]*)?(?:\\n|$))`),r=new RegExp(`^ {0,${Math.min(3,o-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),s=new RegExp(`^ {0,${Math.min(3,o-1)}}(?:\`\`\`|~~~)`),i=new RegExp(`^ {0,${Math.min(3,o-1)}}#`);for(;e&&(d=e.split("\n",1)[0],u=d,this.options.pedantic&&(u=u.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),!s.test(u))&&!i.test(u)&&!t.test(u)&&!r.test(e);){if(u.search(/[^ ]/)>=o||!u.trim())p+="\n"+u.slice(o);else{if(a)break;if(l.search(/[^ ]/)>=4)break;if(s.test(l))break;if(i.test(l))break;if(r.test(l))break;p+="\n"+u}a||u.trim()||(a=!0),n+=d+"\n",e=e.substring(d.length+1),l=u.slice(o)}}g.loose||(c?g.loose=!0:/\n *\n *$/.test(n)&&(c=!0)),this.options.gfm&&(r=/^\[[ xX]\] /.exec(p),r&&(s="[ ] "!==r[0],p=p.replace(/^\[[ xX]\] +/,""))),g.items.push({type:"list_item",raw:n,task:!!r,checked:s,loose:!1,text:p}),g.raw+=n}g.items[g.items.length-1].raw=n.trimRight(),g.items[g.items.length-1].text=p.trimRight(),g.raw=g.raw.trimRight();const y=g.items.length;for(i=0;i"space"===e.type)),t=e.length>0&&e.some((e=>/\n.*\n/.test(e.raw)));g.loose=t}if(g.loose)for(i=0;i$/,"$1").replace(this.rules.inline._escapes,"$1"):"",r=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline._escapes,"$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){const e={type:"table",header:ht(t[1]).map((e=>({text:e}))),align:t[2].replace(/^ *|\| *$/g,"").split(/ *\| */),rows:t[3]&&t[3].trim()?t[3].replace(/\n[ \t]*$/,"").split("\n"):[]};if(e.header.length===e.align.length){e.raw=t[0];let n,r,s,o,i=e.align.length;for(n=0;n({text:e})));for(i=e.header.length,r=0;r/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:this.options.sanitize?"text":"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(t[0]):tt(t[0]):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;const n=e.length;let r=0,s=0;for(;s-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)),bt(t,{href:n?n.replace(this.rules.inline._escapes,"$1"):n,title:r?r.replace(this.rules.inline._escapes,"$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))){let e=(n[2]||n[1]).replace(/\s+/g," ");if(e=t[e.toLowerCase()],!e){const e=n[0].charAt(0);return{type:"text",raw:e,text:e}}return bt(n,e,n[0],this.lexer)}}emStrong(e,t,n=""){let r=this.rules.inline.emStrong.lDelim.exec(e);if(!r)return;if(r[3]&&n.match(/[\p{L}\p{N}]/u))return;const s=r[1]||r[2]||"";if(!s||s&&(""===n||this.rules.inline.punctuation.exec(n))){const n=r[0].length-1;let s,o,i=n,a=0;const c="*"===r[0][0]?this.rules.inline.emStrong.rDelimAst:this.rules.inline.emStrong.rDelimUnd;for(c.lastIndex=0,t=t.slice(-1*e.length+n);null!=(r=c.exec(t));){if(s=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!s)continue;if(o=s.length,r[3]||r[4]){i+=o;continue}if((r[5]||r[6])&&n%3&&!((n+o)%3)){a+=o;continue}if(i-=o,i>0)continue;o=Math.min(o,o+i+a);const t=e.slice(0,n+r.index+(r[0].length-s.length)+o);if(Math.min(n,o)%2){const e=t.slice(1,-1);return{type:"em",raw:t,text:e,tokens:this.lexer.inlineTokens(e)}}const c=t.slice(2,-2);return{type:"strong",raw:t,text:c,tokens:this.lexer.inlineTokens(c)}}}}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=tt(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,t){const n=this.rules.inline.autolink.exec(e);if(n){let e,r;return"@"===n[2]?(e=tt(this.options.mangle?t(n[1]):n[1]),r="mailto:"+e):(e=tt(n[1]),r=e),{type:"link",raw:n[0],text:e,href:r,tokens:[{type:"text",raw:e,text:e}]}}}url(e,t){let n;if(n=this.rules.inline.url.exec(e)){let e,r;if("@"===n[2])e=tt(this.options.mangle?t(n[0]):n[0]),r="mailto:"+e;else{let t;do{t=n[0],n[0]=this.rules.inline._backpedal.exec(n[0])[0]}while(t!==n[0]);e=tt(n[0]),r="www."===n[1]?"http://"+n[0]:n[0]}return{type:"link",raw:n[0],text:e,href:r,tokens:[{type:"text",raw:e,text:e}]}}}inlineText(e,t){const n=this.rules.inline.text.exec(e);if(n){let e;return e=this.lexer.state.inRawBlock?this.options.sanitize?this.options.sanitizer?this.options.sanitizer(n[0]):tt(n[0]):n[0]:tt(this.options.smartypants?t(n[0]):n[0]),{type:"text",raw:n[0],text:e}}}}const wt={newline:/^(?: *(?:\n|$))+/,code:/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,hr:/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/,html:"^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))",def:/^ {0,3}\[(label)\]: *(?:\n *)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/,table:ft,lheading:/^((?:.|\n(?!\n))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,text:/^[^\n]+/,_label:/(?!\s*\])(?:\\.|[^\[\]\\])+/,_title:/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/};wt.def=ot(wt.def).replace("label",wt._label).replace("title",wt._title).getRegex(),wt.bullet=/(?:[*+-]|\d{1,9}[.)])/,wt.listItemStart=ot(/^( *)(bull) */).replace("bull",wt.bullet).getRegex(),wt.list=ot(wt.list).replace(/bull/g,wt.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+wt.def.source+")").getRegex(),wt._tag="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|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",wt._comment=/|$)/,wt.html=ot(wt.html,"i").replace("comment",wt._comment).replace("tag",wt._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),wt.paragraph=ot(wt._paragraph).replace("hr",wt.hr).replace("heading"," {0,3}#{1,6} ").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",")|<(?:script|pre|style|textarea|!--)").replace("tag",wt._tag).getRegex(),wt.blockquote=ot(wt.blockquote).replace("paragraph",wt.paragraph).getRegex(),wt.normal={...wt},wt.gfm={...wt.normal,table:"^ *([^\\n ].*\\|.*)\\n {0,3}(?:\\| *)?(:?-+:? *(?:\\| *:?-+:? *)*)(?:\\| *)?(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"},wt.gfm.table=ot(wt.gfm.table).replace("hr",wt.hr).replace("heading"," {0,3}#{1,6} ").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",")|<(?:script|pre|style|textarea|!--)").replace("tag",wt._tag).getRegex(),wt.gfm.paragraph=ot(wt._paragraph).replace("hr",wt.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("table",wt.gfm.table).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",wt._tag).getRegex(),wt.pedantic={...wt.normal,html:ot("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",wt._comment).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:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:ft,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:ot(wt.normal._paragraph).replace("hr",wt.hr).replace("heading"," *#{1,6} *[^\n]").replace("lheading",wt.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()};const vt={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:ft,tag:"^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(ref)\]/,nolink:/^!?\[(ref)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",emStrong:{lDelim:/^(?:\*+(?:([punct_])|[^\s*]))|^_+(?:([punct*])|([^\s_]))/,rDelimAst:/^(?:[^_*\\]|\\.)*?\_\_(?:[^_*\\]|\\.)*?\*(?:[^_*\\]|\\.)*?(?=\_\_)|(?:[^*\\]|\\.)+(?=[^*])|[punct_](\*+)(?=[\s]|$)|(?:[^punct*_\s\\]|\\.)(\*+)(?=[punct_\s]|$)|[punct_\s](\*+)(?=[^punct*_\s])|[\s](\*+)(?=[punct_])|[punct_](\*+)(?=[punct_])|(?:[^punct*_\s\\]|\\.)(\*+)(?=[^punct*_\s])/,rDelimUnd:/^(?:[^_*\\]|\\.)*?\*\*(?:[^_*\\]|\\.)*?\_(?:[^_*\\]|\\.)*?(?=\*\*)|(?:[^_\\]|\\.)+(?=[^_])|[punct*](\_+)(?=[\s]|$)|(?:[^punct*_\s\\]|\\.)(\_+)(?=[punct*\s]|$)|[punct*\s](\_+)(?=[^punct*_\s])|[\s](\_+)(?=[punct*])|[punct*](\_+)(?=[punct*])/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:ft,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\.5&&(n="x"+n.toString(16)),r+="&#"+n+";";return r}vt._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~",vt.punctuation=ot(vt.punctuation).replace(/punctuation/g,vt._punctuation).getRegex(),vt.blockSkip=/\[[^\]]*?\]\([^\)]*?\)|`[^`]*?`|<[^>]*?>/g,vt.escapedEmSt=/(?:^|[^\\])(?:\\\\)*\\[*_]/g,vt._comment=ot(wt._comment).replace("(?:--\x3e|$)","--\x3e").getRegex(),vt.emStrong.lDelim=ot(vt.emStrong.lDelim).replace(/punct/g,vt._punctuation).getRegex(),vt.emStrong.rDelimAst=ot(vt.emStrong.rDelimAst,"g").replace(/punct/g,vt._punctuation).getRegex(),vt.emStrong.rDelimUnd=ot(vt.emStrong.rDelimUnd,"g").replace(/punct/g,vt._punctuation).getRegex(),vt._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,vt._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,vt._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])?)+(?![-_])/,vt.autolink=ot(vt.autolink).replace("scheme",vt._scheme).replace("email",vt._email).getRegex(),vt._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,vt.tag=ot(vt.tag).replace("comment",vt._comment).replace("attribute",vt._attribute).getRegex(),vt._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,vt._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/,vt._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,vt.link=ot(vt.link).replace("label",vt._label).replace("href",vt._href).replace("title",vt._title).getRegex(),vt.reflink=ot(vt.reflink).replace("label",vt._label).replace("ref",wt._label).getRegex(),vt.nolink=ot(vt.nolink).replace("ref",wt._label).getRegex(),vt.reflinkSearch=ot(vt.reflinkSearch,"g").replace("reflink",vt.reflink).replace("nolink",vt.nolink).getRegex(),vt.normal={...vt},vt.pedantic={...vt.normal,strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:ot(/^!?\[(label)\]\((.*?)\)/).replace("label",vt._label).getRegex(),reflink:ot(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",vt._label).getRegex()},vt.gfm={...vt.normal,escape:ot(vt.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\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(s=e,this.options.extensions&&this.options.extensions.startBlock){let t=1/0;const n=e.slice(1);let r;this.options.extensions.startBlock.forEach((function(e){r=e.call({lexer:this},n),"number"==typeof r&&r>=0&&(t=Math.min(t,r))})),t<1/0&&t>=0&&(s=e.substring(0,t+1))}if(this.state.top&&(n=this.tokenizer.paragraph(s)))r=t[t.length-1],o&&"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),o=s.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,s,o,i,a,c=e;if(this.tokens.links){const e=Object.keys(this.tokens.links);if(e.length>0)for(;null!=(o=this.tokenizer.rules.inline.reflinkSearch.exec(c));)e.includes(o[0].slice(o[0].lastIndexOf("[")+1,-1))&&(c=c.slice(0,o.index)+"["+gt("a",o[0].length-2)+"]"+c.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(o=this.tokenizer.rules.inline.blockSkip.exec(c));)c=c.slice(0,o.index)+"["+gt("a",o[0].length-2)+"]"+c.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;null!=(o=this.tokenizer.rules.inline.escapedEmSt.exec(c));)c=c.slice(0,o.index+o[0].length-2)+"++"+c.slice(this.tokenizer.rules.inline.escapedEmSt.lastIndex),this.tokenizer.rules.inline.escapedEmSt.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,xt))e=e.substring(n.raw.length),t.push(n);else if(this.state.inLink||!(n=this.tokenizer.url(e,xt))){if(s=e,this.options.extensions&&this.options.extensions.startInline){let t=1/0;const n=e.slice(1);let r;this.options.extensions.startInline.forEach((function(e){r=e.call({lexer:this},n),"number"==typeof r&&r>=0&&(t=Math.min(t,r))})),t<1/0&&t>=0&&(s=e.substring(0,t+1))}if(n=this.tokenizer.inlineText(s,kt))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}}let _t=class{constructor(e){this.options=e||Ke}code(e,t,n){const r=(t||"").match(/\S*/)[0];if(this.options.highlight){const t=this.options.highlight(e,r);null!=t&&t!==e&&(n=!0,e=t)}return e=e.replace(/\n$/,"")+"\n",r?'
    '+(n?e:tt(e,!0))+"
    \n":"
    "+(n?e:tt(e,!0))+"
    \n"}blockquote(e){return`
    \n${e}
    \n`}html(e){return e}heading(e,t,n,r){if(this.options.headerIds){return`${e}\n`}return`${e}\n`}hr(){return this.options.xhtml?"
    \n":"
    \n"}list(e,t,n){const r=t?"ol":"ul";return"<"+r+(t&&1!==n?' start="'+n+'"':"")+">\n"+e+"\n"}listitem(e){return`
  • ${e}
  • \n`}checkbox(e){return" "}paragraph(e){return`

    ${e}

    \n`}table(e,t){return t&&(t=`
    ${t}`),"
    Shape {id:shapeExprLabel? closed:BOOL? extra:[IRIREF+]? expression:tripleExpr? semActs:[SemAct+]? annotations:[Annotation+]? }
    Shape {closed:BOOL? extra:[IRIREF+]? expression:tripleExpr? semActs:[SemAct+]? annotations:[Annotation+]? }
    tripleExpr =EachOf | OneOf | TripleConstraint | tripleExprRef ;
    EachOf {id:tripleExprLabel? expressions:[tripleExpr{2,}] min:INTEGER? max:INTEGER? semActs:[SemAct+]? annotations:[Annotation+]? }
    OneOf {id:tripleExprLabel? expressions:[tripleExpr{2,}] min:INTEGER? max:INTEGER? semActs:[SemAct+]? annotations:[Annotation+]? }
       ::=    shapeExprLabel (shapeExpression | "EXTERNAL")
    If the "EXTERNAL" keyword is present, shapeExprDecl returns a ShapeExternal object:
    ShapeExternal{id:shapeExprLabel? }
    otherwise shapeExprDecl returns shapeExpression.
    If the "EXTERNAL" keyword is present, shapeExprDecl returns a ShapeDecl object whose shapeExpr is a ShapeExternal:
    ShapeDecl{id:shapeExprLabel, shapeExpr: { type: "ShapeExternal" } }
    otherwise shapeExprDecl returns a ShapeDecl object whose shapeExpr is a shapeExpression.
       ::=    PN_PREFIX? ":"
    returns: PREFIX When used in a prefixDecl production, the prefix is a potentially empty unicode string matching the first argument of the rule and serves as a key into the prefixes map.
    returns: PREFIX When used in a prefixDecl production, the prefix is a potentially empty unicode string matching the first argument of the rule and serves as a key into the prefixes map.
    returns: IRI When used elsewhere, the iri is the value in the prefixes map corresponding to the first argument of the rule.
    numericLiteral=INTEGER | DECIMAL | DOUBLE ;
    ObjectLiteral{value:STRING language:STRING? type:STRING? }
    Schema{"@context":"http://www.w3.org/ns/shex.jsonld"?
    imports:[IRIREF+]? startActs:[SemAct+]? start:shapeExpr? shapes:[shapeExpr+]? }
    shapeExpr = ShapeOr | ShapeAnd | ShapeNot | NodeConstraint | Shape | ShapeExternal | shapeExprRef ;
    Schema{"@context":"http://www.w3.org/ns/shex.jsonld"?
    imports:[IRIREF+]? startActs:[SemAct+]? start:shapeExpr? shapes:[shapeExpr+]? }
    ShapeDecl{ id:shapeExprLabel shapeExpr:shapeExpr }
    shapeExpr = ShapeOr | ShapeAnd | ShapeNot | NodeConstraint | Shape | ShapeExternal | shapeExprRef ;
    ShapeOr { id:shapeExprLabel? shapeExprs:[shapeExpr{2,}] }
    ShapeAnd { id:shapeExprLabel? shapeExprs:[shapeExpr{2,}] }
    ShapeNot { id:shapeExprLabel? shapeExpr:shapeExpr }
    numericLiteral=INTEGER | DECIMAL | DOUBLE ;
    ObjectLiteral{value:STRING language:STRING? type:STRING? }
    Schema{"@context":"http://www.w3.org/ns/shex.jsonld"?
    imports:[IRIREF+]? startActs:[SemAct+]? start:shapeExpr? shapes:[shapeExpr+]? }
    Schema{"@context":"http://www.w3.org/ns/shex.jsonld"?
    imports:[IRIREF+]? startActs:[SemAct+]? start:shapeExpr? shapes:[ShapeDecl+]? }
    ShapeDecl{ id:shapeExprLabel shapeExpr:shapeExpr }
    shapeExpr = ShapeOr | ShapeAnd | ShapeNot | NodeConstraint | Shape | ShapeExternal | shapeExprRef ;
    ShapeOr { id:shapeExprLabel? shapeExprs:[shapeExpr{2,}] }
    \n\n"+e+"\n"+t+"
    \n"}tablerow(e){return`\n${e}\n`}tablecell(e,t){const n=t.header?"th":"td";return(t.align?`<${n} align="${t.align}">`:`<${n}>`)+e+`\n`}strong(e){return`${e}`}em(e){return`${e}`}codespan(e){return`${e}`}br(){return this.options.xhtml?"
    ":"
    "}del(e){return`${e}`}link(e,t,n){if(null===(e=ct(this.options.sanitize,this.options.baseUrl,e)))return n;let r='",r}image(e,t,n){if(null===(e=ct(this.options.sanitize,this.options.baseUrl,e)))return n;let r=`${n}":">",r}text(e){return e}};class St{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 Ct{constructor(){this.seen={}}serialize(e){return e.toLowerCase().trim().replace(/<[!\/a-z].*?>/gi,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-")}getNextSafeSlug(e,t){let n=e,r=0;if(this.seen.hasOwnProperty(n)){r=this.seen[e];do{r++,n=e+"-"+r}while(this.seen.hasOwnProperty(n))}return t||(this.seen[e]=r,this.seen[n]=0),n}slug(e,t={}){const n=this.serialize(e);return this.getNextSafeSlug(n,t.dryrun)}}class Et{constructor(e){this.options=e||Ke,this.options.renderer=this.options.renderer||new _t,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new St,this.slugger=new Ct}static parse(e,t){return new Et(t).parse(e)}static parseInline(e,t){return new Et(t).parseInline(e)}parse(e,t=!0){let n,r,s,o,i,a,c,l,u,d,p,f,h,m,g,b,y,w,v,k="";const x=e.length;for(n=0;n0&&"paragraph"===g.tokens[0].type?(g.tokens[0].text=w+" "+g.tokens[0].text,g.tokens[0].tokens&&g.tokens[0].tokens.length>0&&"text"===g.tokens[0].tokens[0].type&&(g.tokens[0].tokens[0].text=w+" "+g.tokens[0].tokens[0].text)):g.tokens.unshift({type:"text",text:w}):m+=w),m+=this.parse(g.tokens,h),u+=this.renderer.listitem(m,y,b);k+=this.renderer.list(u,p,f);continue;case"html":k+=this.renderer.html(d.text);continue;case"paragraph":k+=this.renderer.paragraph(this.parseInline(d.tokens));continue;case"text":for(u=d.tokens?this.parseInline(d.tokens):d.text;n+1{"function"==typeof r&&(s=r,r=null);const o={...r},i=function(e,t,n){return r=>{if(r.message+="\nPlease report this to https://github.com/markedjs/marked.",e){const e="

    An error occurred:

    "+tt(r.message+"",!0)+"
    ";return t?Promise.resolve(e):n?void n(null,e):e}if(t)return Promise.reject(r);if(!n)throw r;n(r)}}((r={...Rt.defaults,...o}).silent,r.async,s);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(function(e){e&&e.sanitize&&!e.silent&&console.warn("marked(): sanitize and sanitizer parameters are deprecated since version 0.7.0, should not be used and will be removed in the future. Read more here: https://marked.js.org/#/USING_ADVANCED.md#options")}(r),r.hooks&&(r.hooks.options=r),s){const o=r.highlight;let a;try{r.hooks&&(n=r.hooks.preprocess(n)),a=e(n,r)}catch(e){return i(e)}const c=function(e){let n;if(!e)try{r.walkTokens&&Rt.walkTokens(a,r.walkTokens),n=t(a,r),r.hooks&&(n=r.hooks.postprocess(n))}catch(t){e=t}return r.highlight=o,e?i(e):s(null,n)};if(!o||o.length<3)return c();if(delete r.highlight,!a.length)return c();let l=0;return Rt.walkTokens(a,(function(e){"code"===e.type&&(l++,setTimeout((()=>{o(e.text,e.lang,(function(t,n){if(t)return c(t);null!=n&&n!==e.text&&(e.text=n,e.escaped=!0),l--,0===l&&c()}))}),0))})),void(0===l&&c())}if(r.async)return Promise.resolve(r.hooks?r.hooks.preprocess(n):n).then((t=>e(t,r))).then((e=>r.walkTokens?Promise.all(Rt.walkTokens(e,r.walkTokens)).then((()=>e)):e)).then((e=>t(e,r))).then((e=>r.hooks?r.hooks.postprocess(e):e)).catch(i);try{r.hooks&&(n=r.hooks.preprocess(n));const s=e(n,r);r.walkTokens&&Rt.walkTokens(s,r.walkTokens);let o=t(s,r);return r.hooks&&(o=r.hooks.postprocess(o)),o}catch(e){return i(e)}}}function Rt(e,t,n){return Lt($t.lex,Et.parse)(e,t,n)}Rt.options=Rt.setOptions=function(e){var t;return Rt.defaults={...Rt.defaults,...e},t=Rt.defaults,Ke=t,Rt},Rt.getDefaults=Ge,Rt.defaults=Ke,Rt.use=function(...e){const t=Rt.defaults.extensions||{renderers:{},childTokens:{}};e.forEach((e=>{const n={...e};if(n.async=Rt.defaults.async||n.async||!1,e.extensions&&(e.extensions.forEach((e=>{if(!e.name)throw new Error("extension name required");if(e.renderer){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(e.tokenizer){if(!e.level||"block"!==e.level&&"inline"!==e.level)throw new Error("extension level must be 'block' or 'inline'");t[e.level]?t[e.level].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]))}e.childTokens&&(t.childTokens[e.name]=e.childTokens)})),n.extensions=t),e.renderer){const t=Rt.defaults.renderer||new _t;for(const n in e.renderer){const r=t[n];t[n]=(...s)=>{let o=e.renderer[n].apply(t,s);return!1===o&&(o=r.apply(t,s)),o}}n.renderer=t}if(e.tokenizer){const t=Rt.defaults.tokenizer||new yt;for(const n in e.tokenizer){const r=t[n];t[n]=(...s)=>{let o=e.tokenizer[n].apply(t,s);return!1===o&&(o=r.apply(t,s)),o}}n.tokenizer=t}if(e.hooks){const t=Rt.defaults.hooks||new At;for(const n in e.hooks){const r=t[n];At.passThroughHooks.has(n)?t[n]=s=>{if(Rt.defaults.async)return Promise.resolve(e.hooks[n].call(t,s)).then((e=>r.call(t,e)));const o=e.hooks[n].call(t,s);return r.call(t,o)}:t[n]=(...s)=>{let o=e.hooks[n].apply(t,s);return!1===o&&(o=r.apply(t,s)),o}}n.hooks=t}if(e.walkTokens){const t=Rt.defaults.walkTokens;n.walkTokens=function(n){let r=[];return r.push(e.walkTokens.call(this,n)),t&&(r=r.concat(t.call(this,n))),r}}Rt.setOptions(n)}))},Rt.walkTokens=function(e,t){let n=[];for(const r of e)switch(n=n.concat(t.call(Rt,r)),r.type){case"table":for(const e of r.header)n=n.concat(Rt.walkTokens(e.tokens,t));for(const e of r.rows)for(const r of e)n=n.concat(Rt.walkTokens(r.tokens,t));break;case"list":n=n.concat(Rt.walkTokens(r.items,t));break;default:Rt.defaults.extensions&&Rt.defaults.extensions.childTokens&&Rt.defaults.extensions.childTokens[r.type]?Rt.defaults.extensions.childTokens[r.type].forEach((function(e){n=n.concat(Rt.walkTokens(r[e],t))})):r.tokens&&(n=n.concat(Rt.walkTokens(r.tokens,t)))}return n},Rt.parseInline=Lt($t.lexInline,Et.parseInline),Rt.Parser=Et,Rt.parser=Et.parse,Rt.Renderer=_t,Rt.TextRenderer=St,Rt.Lexer=$t,Rt.lexer=$t.lex,Rt.Tokenizer=yt,Rt.Slugger=Ct,Rt.Hooks=At,Rt.parse=Rt,Rt.options,Rt.setOptions,Rt.use,Rt.walkTokens,Rt.parseInline;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;function Tt(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Dt,It={exports:{}};Dt=It,function(e,t){Dt.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(/\$(\d{1,2})/g,(function(e,n){return t[n]||""}))}function c(e,t){return e.replace(t[0],(function(n,r){var s=a(t[1],arguments);return i(""===n?e[r-1]:n,s)}))}function l(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 c(t,o)}return t}function u(e,t,n){return function(r){var s=r.toLowerCase();return t.hasOwnProperty(s)?i(r,s):e.hasOwnProperty(s)?i(r,e[s]):l(s,r,n)}}function d(e,t,n,r){return function(r){var s=r.toLowerCase();return!!t.hasOwnProperty(s)||!e.hasOwnProperty(s)&&l(s,s,n)===s}}function p(e,t,n){return(n?t+" ":"")+(1===t?p.singular(e):p.plural(e))}return p.plural=u(s,r,e),p.isPlural=d(s,r,e),p.singular=u(r,s,t),p.isSingular=d(r,s,t),p.addPluralRule=function(t,n){e.push([o(t),n])},p.addSingularRule=function(e,n){t.push([o(e),n])},p.addUncountableRule=function(e){"string"!=typeof e?(p.addPluralRule(e,"$0"),p.addSingularRule(e,"$0")):n[e.toLowerCase()]=!0},p.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 p.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 p.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 p.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(p.addUncountableRule),p}));var Nt=Tt(It.exports),Pt=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=''+e+"",O(t,n.firstChild.childNodes),t}:A)(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 M,q,F,U,W,B,H,V,G,K=(q="appendChild",F="cloneNode",U="createTextNode",B=(W="importNode")in(M=e),(H=M.createDocumentFragment())[q](M[U]("g")),H[q](M[U]("")),(B?M[W](H,!0):H[F](!0)).childNodes.length<2?function e(t,n){for(var r=t[F](),s=t.childNodes||[],o=s.length,i=0;n&&i

    ',V.content.childNodes[0].getAttribute(G)==Z)||(Z="_dt: "+Z.slice(1,-1)+";",J=!0)}catch(u){}var X="\x3c!--"+Z+"--\x3e",Q=/^(?:style|textarea)$/i,ee=/^(?:area|base|br|col|embed|hr|img|input|keygen|link|menuitem|meta|param|source|track|wbr)$/i,te=" \\f\\n\\r\\t",ne="[^"+te+"\\/>\"'=]+",re="["+te+"]+"+ne,se="<([A-Za-z]+[A-Za-z0-9:._-]*)((?:",oe="(?:\\s*=\\s*(?:'[^']*?'|\"[^\"]*?\"|<[^>]*?>|"+ne.replace("\\/","")+"))?)",ie=new RegExp(se+re+oe+"+)(["+te+"]*/?>)","g"),ae=new RegExp(se+re+oe+"*)(["+te+"]*/>)","g"),ce=new RegExp("("+re+"\\s*=\\s*)(['\"]?)"+X+"\\2","gi");function le(e,t,n,r){return"<"+t+n.replace(ce,ue)+r}function ue(e,t,n){return t+(n||'"')+Z+(n||'"')}function de(e,t,n){return ee.test(t)?e:"<"+t+n+">"}var pe=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 fe(t,n,r,s){for(var o=t.childNodes,i=o.length,a=0;ae.trim())).map((e=>e.search(/[^\s]/))),r=Math.min(...n);return t.map((e=>e.slice(r))).join("\n")}var Wt=Object.freeze({__proto__:null,name:"core/reindent",reindent:Ut,run:function(){for(const e of document.getElementsByTagName("pre"))e.innerHTML=Ut(e.innerHTML)}});const Bt=/-/g;const Ht=new Intl.DateTimeFormat(["sv-SE"],{timeZone:"UTC",year:"numeric",month:"2-digit",day:"2-digit"}),Vt="en"===c||c.startsWith("en-")?"en-AU":c,Gt=new Intl.DateTimeFormat(Vt,{timeZone:"UTC",year:"numeric",month:"long",day:"en-AU"===Vt?"2-digit":"numeric"}),Kt=".informative, .note, .issue, .example, .ednote, .practice, .introductory";function Yt(e){const t=new URL(e.href,document.baseURI),n=document.createElement("link");let{href:r}=t;switch(n.rel=e.hint,n.rel){case"dns-prefetch":case"preconnect":r=t.origin,(e.corsMode||t.origin!==document.location.origin)&&(n.crossOrigin=e.corsMode||"anonymous");break;case"preload":"as"in e&&n.setAttribute("as",e.as),e.corsMode&&(n.crossOrigin=e.corsMode)}return n.href=r,e.dontRemove||n.classList.add("removeOnSave"),n}function Zt(e){e.querySelectorAll(".remove, script[data-requiremodule]").forEach((e=>{e.remove()}))}function Jt(e,t="long"){const n=new Intl.ListFormat(c,{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 Xt=Jt("conjunction"),Qt=Jt("disjunction");function en(e,t){return Xt(e,t).join("")}function tn(e,t){return Qt(e,t).join("")}function nn(e){return e.replace(/&/g,"&").replace(/>/g,">").replace(/"/g,""").replace(/e)){const n=e.map(t),r=n.slice(0,-1).map((e=>jt`${e}, `));return jt`${r}${n[n.length-1]}`}function ln(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)}(rn(e.textContent));return un(e,t,n)}function un(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 dn(e){const t=new Set,n="ltNodefault"in e.dataset?"":rn(e.textContent),r=e.children[0];if(e.dataset.lt?e.dataset.lt.split("|").map((e=>rn(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(rn(e))))}return[...t]}function pn(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 fn(e,t){const n=t.closest(Kt);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 hn(e,t){return t.append(...e.childNodes),e.appendChild(t),e}function mn(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 gn(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 bn(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 yn 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 wn(e){const t=e.cloneNode(!0);return t.querySelectorAll("[id]").forEach((e=>e.removeAttribute("id"))),t.querySelectorAll("dfn").forEach((e=>{pn(e,"span",{copyAttributes:!1})})),t.hasAttribute("id")&&t.removeAttribute("id"),vn(t),t}function vn(e){const t=document.createTreeWalker(e,NodeFilter.SHOW_COMMENT);for(const e of[...kn(t)])e.remove()}function*kn(e){for(;e.nextNode();)yield e.currentNode}class xn 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 $n extends Error{constructor(e,t,n){super(e);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||un(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}}}function _n(e,t,n={}){const s={...n,isWarning:!1};r("error",new $n(e,t,s))}function Sn(e,t,n={}){const s={...n,isWarning:!0};r("warn",new $n(e,t,s))}function Cn(e){return e?`\`${e}\``:""}function En(e,{quotes:t}={quotes:!1}){return tn(e,t?e=>{return Cn((t=e,String(t)?`"${t}"`:""));var t}:Cn)}function An(e,...t){return Ut(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(""))}const Ln=new Map([["text/html","html"],["application/xml","xml"]]);function Rn(e,t=document){const n=Ln.get(e);if(!n){const t=[...Ln.values()].join(", ");throw new TypeError(`Invalid format: ${e}. Expected one of: ${t}.`)}const r=Tn(n,t);return`data:${e};charset=utf-8,${encodeURIComponent(r)}`}function Tn(e,t){const n=t.cloneNode(!0);!function(e){const{head:t,body:n,documentElement:s}=e;vn(e),e.querySelectorAll(".removeOnSave, #toc-nav").forEach((e=>e.remove())),n.classList.remove("toc-sidebar"),Zt(s);const o=e.createDocumentFragment(),i=e.querySelector("meta[name='viewport']");i&&t.firstChild!==i&&o.appendChild(i);let a=e.querySelector("meta[charset], meta[content*='charset=']");a||(a=jt``);o.appendChild(a);const c=`ReSpec ${window.respecVersion||"Developer Channel"}`,l=jt` + + `;o.appendChild(l),t.prepend(o),r("beforesave",s)}(n);let s="";if("xml"===e)s=(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&&(s+=(new XMLSerializer).serializeToString(n.doctype)),s+=n.documentElement.outerHTML;return s}t("core/exporter",{rsDocToDataURL:Rn});class Dn{constructor(){this._respecDonePromise=new Promise((e=>{s("end-all",(()=>e()),{once:!0})})),this.errors=[],this.warnings=[],s("error",(e=>{console.error(e,e.toJSON()),this.errors.push(e)})),s("warn",(e=>{console.warn(e,e.toJSON()),this.warnings.push(e)}))}get version(){return window.respecVersion}get ready(){return this._respecDonePromise}async toHTML(){return Tn("html",document)}}const In="core/post-process";const Nn="core/pre-process";const Pn="core/base-runner";async function jn(e){!function(){const e=new Dn;Object.defineProperty(document,"respec",{value:e})}(),r("start-all",respecConfig),function(e){const t={},n=e=>Object.assign(t,e);n(e),s("amend-user-config",n),s("end-all",(()=>{const e=document.createElement("script");e.id="initialUserConfig",e.type="application/json";for(const e of o)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]})),s=Object.fromEntries(n);Object.assign(e,s),r("amend-user-config",s)}(respecConfig),performance.mark(`${Pn}-start`),await async function(e){if(Array.isArray(e.preProcess)){const t=e.preProcess.filter((e=>{const t="function"==typeof e;return t||_n("Every item in `preProcess` must be a JS function.",Nn),t})).map((async t=>{try{return await t(e,document)}catch(e){_n(`Function ${t.name} threw an error during \`preProcess\`.`,Nn,{hint:"See developer console."}),console.error(e)}}));await Promise.all(t)}}(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))),respecConfig.state={},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),respecConfig.state={},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||_n("Every item in `postProcess` must be a JS function.",In),t})).map((async t=>{try{return await t(e,document)}catch(e){_n(`Function ${t.name} threw an error during \`postProcess\`.`,In,{hint:"See developer console."}),console.error(e)}}));await Promise.all(t)}"function"==typeof e.afterEnd&&await e.afterEnd(e,document)}(respecConfig),r("end-all"),Zt(document),performance.mark(`${Pn}-end`),performance.measure(Pn,`${Pn}-start`,`${Pn}-end`)}var On=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;color:#787878;border:1px solid #ccc;box-shadow:1px 1px 8px 0 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} +.respec-info-button:focus,.respec-info-button:hover{opacity:1;transition:opacity .2s} +#respec-pill{width:4.8em} +#respec-pill:not(:disabled){animation:respec-fadein .6s ease-in-out} +@keyframes respec-fadein{ +from{margin-top:-1.2em;border-radius:50%;border:.2em solid rgba(100,100,100,.5);box-shadow:none;height:4.8em} +to{margin-top:0;border:1px solid #ccc;border-radius:0;box-shadow:1px 1px 8px 0 rgba(100,100,100,.5);height:2.4em} +} +#respec-pill:disabled{margin-top:-1.2em;position:relative;border:none;box-shadow:none;border-radius:50%;width:4.8em;height:4.8em;padding:0} +#respec-pill:disabled::after{position:absolute;content:'';inset:-.2em;border-radius:50%;border:.2em solid rgba(100,100,100,.5);border-left:.2em solid transparent;animation:respec-spin .5s infinite linear} +@media (prefers-reduced-motion){ +#respec-pill:not(:disabled){animation:none} +#respec-pill:disabled::after{animation:none;border-left:.2em solid rgba(100,100,100,.5)} +} +@keyframes respec-spin{ +0%{transform:rotate(0)} +100%{transform:rotate(360deg)} +} +.respec-hidden{visibility:hidden;opacity:0;transition:visibility 0s .2s,opacity .2s linear} +.respec-visible{visibility:visible;opacity:1;transition:opacity .2s linear} +#respec-pill:focus,#respec-pill:hover{color:#000;background-color:#f5f5f5;transition:color .2s} +#respec-menu{position:absolute;margin:0;padding:0;font-family:sans-serif;background:#fff;box-shadow:1px 1px 8px 0 rgba(100,100,100,.5);width:200px;display:none;text-align:left;margin-top:32px;font-size:.8em} +#respec-menu:not([hidden]){display:block} +#respec-menu li{list-style-type:none;margin:0;padding:0} +.respec-save-buttons{display:grid;grid-template-columns:repeat(auto-fill,minmax(47%,2fr));grid-gap:.5cm;padding:.5cm} +.respec-save-button:link{padding-top:16px;color:#f0f0f0;background:#2a5aa8;justify-self:stretch;height:1cm;text-decoration:none;text-align:center;font-size:inherit;border:none;border-radius:.2cm} +.respec-save-button:link:hover{color:#fff;background:#2a5aa8;padding:0;margin:0;border:0;padding-top:16px} +.respec-save-button:link:focus{background:#193766} +#respec-pill:focus,#respec-ui button:focus,.respec-option:focus{outline:0;outline-style:none} +#respec-pill-error{background-color:red;color:#fff} +#respec-pill-warning{background-color:orange;color:#fff} +.respec-error-list,.respec-warning-list{margin:0;padding:0;font-family:sans-serif;font-size:.85em} +.respec-warning-list{background-color:#fffbe6} +:is(.respec-warning-list,.respec-error-list)>li{list-style-type:none;margin:0;padding:.5em 0;padding-left:2em;padding-right:.5em} +:is(.respec-warning-list,.respec-error-list)>li+li{margin-top:.5rem} +:is(.respec-warning-list,.respec-error-list)>li:before{position:absolute;left:.4em} +:is(.respec-warning-list,.respec-error-list) p{padding:0;margin:0} +.respec-warning-list>li{color:#5c3b00;border-bottom:thin solid #fff5c2} +.respec-error-list,.respec-error-list li{background-color:#fff0f0} +.respec-warning-list>li::before{content:"⚠️"} +.respec-error-list>li::before{content:"💥"} +.respec-error-list>li{color:#5c3b00;border-bottom:thin solid #ffd7d7} +:is(.respec-warning-list,.respec-error-list)>li li{list-style:disc} +#respec-overlay{display:block;position:fixed;z-index:10000;top:0;left:0;height:100%;width:100%;background:#000} +.respec-show-overlay{transition:opacity .2s linear;opacity:.5} +.respec-hide-overlay{transition:opacity .2s linear;opacity:0} +.respec-modal{display:block;position:fixed;z-index:11000;top:10%;background:#fff;border:5px solid #666;min-width:20%;padding:0;max-height:80%;overflow-y:auto;margin:0 -.5cm;left:20%;max-width:75%;min-width:60%} +.respec-modal h3{margin:0;padding:.2em;text-align:center;color:#000;background:linear-gradient(to bottom,#eee 0,#eee 50%,#ccc 100%);font-size:1em} +#respec-menu button.respec-option{background:#fff;border:none;width:100%;text-align:left;font-size:inherit;padding:1.2em 1.2em} +#respec-menu button.respec-option:hover{background-color:#eee} +.respec-cmd-icon{padding-right:.5em} +#respec-ui button.respec-option:first-child{margin-top:0} +#respec-ui button.respec-option:last-child{border:none;border-radius:inherit;margin-bottom:0} +.respec-button-copy-paste{position:absolute;height:28px;width:40px;cursor:pointer;background-image:linear-gradient(#fcfcfc,#eee);border:1px solid #90b8de;border-left:0;border-radius:0 0 3px 0;-webkit-user-select:none;user-select:none;-webkit-appearance:none;top:0;left:127px} +@media print{ +#respec-ui{display:none} +} +.respec-iframe{width:100%;min-height:550px;height:100%;overflow:hidden;padding:0;margin:0;border:0} +.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 zn=/>/gm,Mn=/&/gm;class qn extends zt.Renderer{code(e,t,n){const{language:r,...s}=qn.parseInfoString(t);if(/(^webidl$)/i.test(r))return`
    ${e}
    `;const o=super.code(e,r,n),{example:i,illegalExample:a}=s;if(!i&&!a)return o;const c=i||a,l=`${r} ${i?"example":"illegal-example"}`;return o.replace("
    ",`
    `)}image(e,t,n){if(!t)return super.image(e,t,n);return String.raw`
    +      
    + ${n} +
    ${t}
    +
    + `}static parseInfoString(e){const t=e.search(/\s/);if(-1===t)return{language:e};const n=e.slice(0,t),r=e.slice(t+1);let s;if(r)try{s=JSON.parse(`{ ${r} }`)}catch(e){console.error(e)}return{language:n,...s}}heading(e,t,n,r){const s=/(.+)\s+{#([\w-]+)}$/;if(s.test(e)){const[,n,r]=e.match(s);return`${n}`}return super.heading(e,t,n,r)}}const Fn={sanitize:!1,gfm:!0,headerIds:!1,langPrefix:"",renderer:new qn};function Un(e,t={inline:!1}){const n=Ut(e).replace(zn,">").replace(Mn,"&");return t.inline?zt.parseInline(n,Fn):zt.parse(n,Fn)}function Wn(e){for(const t of e.getElementsByTagName("pre"))t.prepend("\n");e.innerHTML=Un(e.innerHTML)}const Bn=(Hn="[data-format='markdown']:not(body)",e=>{const t=e.querySelectorAll(Hn);return t.forEach(Wn),Array.from(t)});var Hn;var Vn=Object.freeze({__proto__:null,markdownToHtml:Un,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 Bn(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=bn(e);e.append(`\n\n${t}`)}}}(s,"[data-format=markdown], section, div, address, article, aside, figure, header, main"),Wn(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 Gn(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=On,e.classList.add("removeOnSave"),document.head.appendChild(e)}();const Kn=jt``,Yn=jt``,Zn=jt``;let Jn,Xn;window.addEventListener("load",(()=>sr(Yn)));const Qn=[],er=[],tr={};s("start-all",(()=>document.body.prepend(Kn)),{once:!0}),s("end-all",(()=>document.body.prepend(Kn)),{once:!0});const nr=jt``;function rr(){Yn.classList.toggle("respec-hidden"),Yn.classList.toggle("respec-visible"),Yn.hidden=!Yn.hidden}function sr(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()))}))}Kn.appendChild(nr),nr.addEventListener("click",(e=>{e.stopPropagation(),nr.setAttribute("aria-expanded",String(Yn.hidden)),rr(),Yn.querySelector("li:first-child button").focus()})),document.documentElement.addEventListener("click",(()=>{Yn.hidden||rr()})),Kn.appendChild(Yn),Yn.addEventListener("keydown",(e=>{"Escape"!==e.key||Yn.hidden||(nr.setAttribute("aria-expanded",String(Yn.hidden)),rr(),nr.focus())}));const or=new Map([["controls","respec-menu"],["expanded","false"],["haspopup","true"],["label","ReSpec Menu"]]);function ir(e,t,n,r){t.push(e),tr.hasOwnProperty(n)||(tr[n]=function(e,t,n){const r=jt``;r.addEventListener("click",(()=>{r.setAttribute("aria-expanded","true");const s=jt`
      `;for(const e of t){const t=document.createRange().createContextualFragment(cr(e)),n=document.createElement("li");t.firstElementChild===t.lastElementChild?n.append(...t.firstElementChild.childNodes):n.appendChild(t),s.appendChild(n)}ar.freshModal(n,s,r)}));const s=new Map([["expanded","false"],["haspopup","true"],["controls",`respec-pill-${e}-modal`]]);return Gn(r,s),r}(n,t,r),Kn.appendChild(tr[n]));const s=tr[n];s.textContent=t.length;const o=1===t.length?qt.singular(r):r;Gn(s,new Map([["label",`${t.length} ${o}`]]))}Gn(nr,or);const ar={show(){try{Kn.hidden=!1}catch(e){console.error(e)}},hide(){Kn.hidden=!0},enable(){nr.removeAttribute("disabled")},addCommand(e,t,n,r){r=r||"";const s=`respec-button-${e.toLowerCase().replace(/\s+/,"-")}`,o=jt``,i=jt`
    1. ${o}
    2. `;return i.addEventListener("click",t),Yn.appendChild(i),o},error(e){ir(e,Qn,"error","ReSpec Errors")},warning(e){ir(e,er,"warning","ReSpec Warnings")},closeModal(e){Xn&&(Xn.classList.remove("respec-show-overlay"),Xn.classList.add("respec-hide-overlay"),Xn.addEventListener("transitionend",(()=>{Xn.remove(),Xn=null}))),e&&e.setAttribute("aria-expanded","false"),Jn&&(Jn.remove(),Jn=null,nr.focus())},freshModal(e,t,n){Jn&&Jn.remove(),Xn&&Xn.remove(),Xn=jt`
      `;const r=`${n.id}-modal`,s=`${r}-heading`;Jn=jt``;const o=new Map([["labelledby",s]]);Gn(Jn,o),document.body.append(Xn,Jn),Xn.addEventListener("click",(()=>this.closeModal(n))),Xn.classList.toggle("respec-show-overlay"),Jn.hidden=!1,sr(Jn)}};function cr(e){if("string"==typeof e)return e;const t=e.plugin?`

      (plugin: "${e.plugin}")

      `:"",n=e.hint?`\n${Un(`

      How to fix: ${Ut(e.hint)}`,{inline:!e.hint.includes("\n")})}\n`:"",r=Array.isArray(e.elements)?`

      Occurred ${e.elements.length} times at:

      \n ${Un(e.elements.map(lr).join("\n"))}`:"",s=e.details?`\n\n
      \n${e.details}\n
      \n`:"";return`${Un(`**${e.message}**`,{inline:!0})}${n}${r}${s}${t}`}function lr(e){return`* [\`<${e.localName}>\`](#${e.id}) element`}async function ur(e){try{ar.show(),await async function(){"loading"===document.readyState&&await new Promise((e=>document.addEventListener("DOMContentLoaded",e)))}(),await jn(e)}finally{ar.enable()}}document.addEventListener("keydown",(e=>{"Escape"===e.key&&ar.closeModal()})),window.respecUI=ar,s("error",(e=>ar.error(e))),s("warn",(e=>ar.warning(e))),window.addEventListener("error",(e=>{console.error(e.error,e.message,e)}));const dr=[Promise.resolve().then((function(){return pr})),Promise.resolve().then((function(){return l})),Promise.resolve().then((function(){return gr})),Promise.resolve().then((function(){return wr})),Promise.resolve().then((function(){return xr})),Promise.resolve().then((function(){return Ar})),Promise.resolve().then((function(){return jr})),Promise.resolve().then((function(){return Vn})),Promise.resolve().then((function(){return Wt})),Promise.resolve().then((function(){return Mr})),Promise.resolve().then((function(){return ls})),Promise.resolve().then((function(){return ps})),Promise.resolve().then((function(){return fs})),Promise.resolve().then((function(){return gs})),Promise.resolve().then((function(){return Co})),Promise.resolve().then((function(){return Oo})),Promise.resolve().then((function(){return zo})),Promise.resolve().then((function(){return Uo})),Promise.resolve().then((function(){return Go})),Promise.resolve().then((function(){return Xo})),Promise.resolve().then((function(){return ti})),Promise.resolve().then((function(){return ri})),Promise.resolve().then((function(){return Si})),Promise.resolve().then((function(){return Vs})),Promise.resolve().then((function(){return Hi})),Promise.resolve().then((function(){return ia})),Promise.resolve().then((function(){return Pi})),Promise.resolve().then((function(){return ro})),Promise.resolve().then((function(){return wa})),Promise.resolve().then((function(){return ka})),Promise.resolve().then((function(){return Dr})),Promise.resolve().then((function(){return xa})),Promise.resolve().then((function(){return $a})),Promise.resolve().then((function(){return Ta})),Promise.resolve().then((function(){return Ia})),Promise.resolve().then((function(){return Pa})),Promise.resolve().then((function(){return Ma})),Promise.resolve().then((function(){return Ha})),Promise.resolve().then((function(){return Va})),Promise.resolve().then((function(){return Qa})),Promise.resolve().then((function(){return pi})),Promise.resolve().then((function(){return sc})),Promise.resolve().then((function(){return uc})),Promise.resolve().then((function(){return pc})),Promise.resolve().then((function(){return hc})),Promise.resolve().then((function(){return xc})),Promise.resolve().then((function(){return Sc})),Promise.resolve().then((function(){return Rc})),Promise.resolve().then((function(){return Dc})),Promise.resolve().then((function(){return Pc})),Promise.resolve().then((function(){return Mc})),Promise.resolve().then((function(){return Uc})),Promise.resolve().then((function(){return Vc})),Promise.resolve().then((function(){return Yc})),Promise.resolve().then((function(){return el})),Promise.resolve().then((function(){return rl})),Promise.resolve().then((function(){return il})),Promise.resolve().then((function(){return ll})),Promise.resolve().then((function(){return pl})),Promise.resolve().then((function(){return gl})),Promise.resolve().then((function(){return vl}))];Promise.all(dr).then((e=>ur(e))).catch((e=>console.error(e)));var pr=Object.freeze({__proto__:null,name:"core/location-hash",run:function(){location.hash&&document.respec.ready.then((()=>{let e=decodeURIComponent(location.hash).substr(1);const t=document.getElementById(e),n=/\W/.test(e);if(!t&&n){const t=e.replace(/[\W]+/gim,"-").replace(/^-+/,"").replace(/-+$/,"");document.getElementById(t)&&(e=t)}location.hash=`#${e}`}))}});const fr={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},hr=new Map([["ieee",{name:"Apache2 License",url:"https://www.apache.org/licenses/LICENSE-2.0"}]]),mr={format:"markdown",logos:[{src:"https://upload.wikimedia.org/wikipedia/commons/2/21/IEEE_logo.svg",alt:"IEEE",id:"IEEE",height:170,width:170,url:"https://www.ieee.org/"}],license:"ieee"};var gr=Object.freeze({__proto__:null,name:"ieee/defaults",run:function(e){const t=!1!==e.lint&&{...fr.lint,...mr.lint,...e.lint};Object.assign(e,{...fr,...mr,...e,lint:t}),Object.assign(e,function(e){return{licenseInfo:hr.get(e.license)}}(e))}});var br=String.raw`@keyframes pop{ +0%{transform:scale(1,1)} +25%{transform:scale(1.25,1.25);opacity:.75} +100%{transform:scale(1,1)} +} +:is(h1,h2,h3,h4,h5,h6,a) abbr{border:none} +dfn{font-weight:700} +a.internalDFN{color:inherit;border-bottom:1px solid #99c;text-decoration:none} +a.externalDFN{color:inherit;border-bottom:1px dotted #ccc;text-decoration:none} +a.bibref{text-decoration:none} +.respec-offending-element:target{animation:pop .25s ease-in-out 0s 1} +.respec-offending-element,a[href].respec-offending-element{text-decoration:red wavy underline} +@supports not (text-decoration:red wavy underline){ +.respec-offending-element:not(pre){display:inline-block} +.respec-offending-element{background:url(data:image/gif;base64,R0lGODdhBAADAPEAANv///8AAP///wAAACwAAAAABAADAEACBZQjmIAFADs=) bottom repeat-x} +} +#references :target{background:#eaf3ff;animation:pop .4s ease-in-out 0s 1} +cite .bibref{font-style:normal} +a[href].orcid{padding-left:4px;padding-right:4px} +a[href].orcid>svg{margin-bottom:-2px} +.toc a,.tof a{text-decoration:none} +a .figno,a .secno{color:#000} +ol.tof,ul.tof{list-style:none outside none} +.caption{margin-top:.5em;font-style:italic} +table.simple{border-spacing:0;border-collapse:collapse;border-bottom:3px solid #005a9c} +.simple th{background:#005a9c;color:#fff;padding:3px 5px;text-align:left} +.simple th a{color:#fff;padding:3px 5px;text-align:left} +.simple th[scope=row]{background:inherit;color:inherit;border-top:1px solid #ddd} +.simple td{padding:3px 10px;border-top:1px solid #ddd} +.simple tr:nth-child(even){background:#f0f6ff} +.section dd>p:first-child{margin-top:0} +.section dd>p:last-child{margin-bottom:0} +.section dd{margin-bottom:1em} +.section dl.attrs dd,.section dl.eldef dd{margin-bottom:0} +#issue-summary>ul{column-count:2} +#issue-summary li{list-style:none;display:inline-block} +details.respec-tests-details{margin-left:1em;display:inline-block;vertical-align:top} +details.respec-tests-details>*{padding-right:2em} +details.respec-tests-details[open]{z-index:999999;position:absolute;border:thin solid #cad3e2;border-radius:.3em;background-color:#fff;padding-bottom:.5em} +details.respec-tests-details[open]>summary{border-bottom:thin solid #cad3e2;padding-left:1em;margin-bottom:1em;line-height:2em} +details.respec-tests-details>ul{width:100%;margin-top:-.3em} +details.respec-tests-details>li{padding-left:1em} +.self-link:hover{opacity:1;text-decoration:none;background-color:transparent} +aside.example .marker>a.self-link{color:inherit} +.header-wrapper{display:flex;align-items:baseline} +:is(h2,h3,h4,h5,h6):not(#toc>h2,#abstract>h2,#sotd>h2,.head>h2){position:relative;left:-.5em} +:is(h2,h3,h4,h5,h6):not(#toch2)+a.self-link{color:inherit;order:-1;position:relative;left:-1.1em;font-size:1rem;opacity:.5} +:is(h2,h3,h4,h5,h6)+a.self-link::before{content:"§";text-decoration:none;color:var(--heading-text)} +:is(h2,h3)+a.self-link{top:-.2em} +:is(h4,h5,h6)+a.self-link::before{color:#000} +@media (max-width:767px){ +dd{margin-left:0} +} +@media print{ +.removeOnSave{display:none} +}`;const yr=function(){const e=document.createElement("style");return e.id="respec-mainstyle",e.textContent=br,document.head.appendChild(e),e}();var wr=Object.freeze({__proto__:null,name:"core/style",run:function(e){e.noReSpecCSS&&yr.remove()}});function vr(){const e=jt`