sheetom 0.1.0-rc.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":["#codec","#reportDiagnostic","#records","#shorthand","#commitRecord","#children","#setParentage","#parentStyleSheet","#describe","CSSStyleDeclarationOracle","encoder","decoder","#type","#rules","#mediaText","#conditionText","#rawHref","#cssText","#block","#style","#selectorText","#keyText","#name","#descriptors","#get","#set","#values","#fontFamily","#diagnostics","#constructedBaseURL","#reportDiagnostic"],"sources":["../src/internal/declaration-block.ts","../src/internal/css-rule-scanner.ts","../src/internal/rule-tree.ts","../src/internal/serializer.ts","../src/chromium-properties.ts","../src/internal/shorthand-registry.ts","../src/internal/value-gate.ts","../src/internal/webidl-construction.ts","../src/index.ts"],"sourcesContent":["export interface ParsedPropertyValue {\n observableValue: string;\n safeValue: string;\n pendingSubstitution: boolean;\n}\n\nexport interface PendingSubstitutionGroup {\n shorthand: string;\n observableValue: string;\n safeValue: string;\n}\n\nexport interface DeclarationRecord extends ParsedPropertyValue {\n name: string;\n important: boolean;\n pendingGroup: PendingSubstitutionGroup | null;\n}\n\nexport interface ParsedDeclaration {\n name: string;\n value: string;\n important: boolean;\n}\n\nexport interface DeclarationBlockCodec {\n parseValue(name: string, value: string): ParsedPropertyValue | null;\n shorthandLonghands(name: string): readonly string[] | null;\n expandFourSide(\n name: string,\n parsed: ParsedPropertyValue,\n important: boolean,\n ): DeclarationRecord[] | null;\n expandShorthand(\n name: string,\n parsed: ParsedPropertyValue,\n important: boolean,\n ): DeclarationRecord[] | null;\n serializeIdentifier(value: string): string;\n normalizeIndex(value: unknown): number;\n isFourSideShorthand(name: string): boolean;\n}\n\nexport type DeclarationDiagnosticCode =\n | \"INVALID_PRIORITY\"\n | \"INVALID_PROPERTY_VALUE\";\n\nexport type ReportDeclarationDiagnostic = (\n code: DeclarationDiagnosticCode,\n property: string,\n input: string,\n) => void;\n\n/** Owns ordered declaration records and all atomic mutation decisions. */\nexport class DeclarationBlock {\n readonly #codec: DeclarationBlockCodec;\n readonly #reportDiagnostic: ReportDeclarationDiagnostic;\n readonly #records: DeclarationRecord[] = [];\n\n constructor(\n codec: DeclarationBlockCodec,\n reportDiagnostic: ReportDeclarationDiagnostic,\n ) {\n this.#codec = codec;\n this.#reportDiagnostic = reportDiagnostic;\n }\n\n replace(declarations: ParsedDeclaration[] | null): void {\n if (!declarations) {\n this.#records.splice(0);\n return;\n }\n\n const winners = new Map<\n string,\n DeclarationRecord & { sourceIndex: number; subIndex: number }\n >();\n let sourceIndex = 0;\n\n const consider = (record: DeclarationRecord, subIndex: number): void => {\n const existing = winners.get(record.name);\n if (existing?.important && !record.important) return;\n winners.set(record.name, { ...record, sourceIndex, subIndex });\n };\n\n for (const declaration of declarations) {\n const name = declaration.name.startsWith(\"--\")\n ? declaration.name\n : declaration.name.toLowerCase();\n const propertyValue = this.#codec.parseValue(name, declaration.value);\n if (!propertyValue) {\n sourceIndex += 1;\n continue;\n }\n\n const longhands = this.#codec.shorthandLonghands(name);\n if (propertyValue.pendingSubstitution && longhands) {\n const pendingGroup: PendingSubstitutionGroup = {\n shorthand: name,\n observableValue: propertyValue.observableValue,\n safeValue: propertyValue.safeValue,\n };\n for (let index = 0; index < longhands.length; index += 1) {\n const longhand = longhands[index];\n if (!longhand) continue;\n consider({\n name: longhand,\n observableValue: \"\",\n safeValue: \"\",\n pendingSubstitution: true,\n important: declaration.important,\n pendingGroup,\n }, index);\n }\n sourceIndex += 1;\n continue;\n }\n\n const expansion = this.#codec.expandFourSide(\n name,\n propertyValue,\n declaration.important,\n ) ?? this.#codec.expandShorthand(\n name,\n propertyValue,\n declaration.important,\n );\n if (expansion) {\n for (let index = 0; index < expansion.length; index += 1) {\n const record = expansion[index];\n if (record) consider(record, index);\n }\n sourceIndex += 1;\n continue;\n }\n\n consider({\n name,\n ...propertyValue,\n important: declaration.important,\n pendingGroup: null,\n }, 0);\n sourceIndex += 1;\n }\n\n const records = [...winners.values()].sort((left, right) => {\n if (left.important !== right.important) return left.important ? 1 : -1;\n return left.sourceIndex - right.sourceIndex || left.subIndex - right.subIndex;\n });\n this.#records.splice(0, this.#records.length, ...records);\n }\n\n get length(): number {\n return this.#records.length;\n }\n\n item(index: unknown): string {\n return this.#records[this.#codec.normalizeIndex(index)]?.name ?? \"\";\n }\n\n getPropertyValue(name: string): string {\n const normalizedName = name.startsWith(\"--\") ? name : name.toLowerCase();\n const shorthand = this.#shorthand(normalizedName, false);\n if (shorthand) return shorthand.value;\n return this.#records.find(record => record.name === normalizedName)?.observableValue ?? \"\";\n }\n\n getPropertyPriority(name: string): string {\n const normalizedName = name.startsWith(\"--\") ? name : name.toLowerCase();\n const shorthand = this.#shorthand(normalizedName, false);\n if (shorthand) return shorthand.important ? \"important\" : \"\";\n return this.#records.find(record => record.name === normalizedName)?.important\n ? \"important\"\n : \"\";\n }\n\n setProperty(name: string, value: string, priority: string): void {\n const normalizedName = name.startsWith(\"--\") ? name : name.toLowerCase();\n const normalizedPriority = priority.toLowerCase();\n if (normalizedPriority !== \"\" && normalizedPriority !== \"important\") {\n this.#reportDiagnostic(\"INVALID_PRIORITY\", normalizedName, priority);\n return;\n }\n\n if (value === \"\") {\n this.removeProperty(normalizedName);\n return;\n }\n\n const parsed = this.#codec.parseValue(normalizedName, value);\n if (!parsed) {\n this.#reportDiagnostic(\"INVALID_PROPERTY_VALUE\", normalizedName, value);\n return;\n }\n\n const important = normalizedPriority === \"important\";\n const longhands = this.#codec.shorthandLonghands(normalizedName);\n if (parsed.pendingSubstitution && longhands) {\n const pendingGroup: PendingSubstitutionGroup = {\n shorthand: normalizedName,\n observableValue: parsed.observableValue,\n safeValue: parsed.safeValue,\n };\n for (const longhand of longhands) {\n this.#commitRecord(\n longhand,\n { observableValue: \"\", safeValue: \"\", pendingSubstitution: true },\n important,\n pendingGroup,\n );\n }\n return;\n }\n\n const expansion = this.#codec.expandFourSide(normalizedName, parsed, important) ??\n this.#codec.expandShorthand(normalizedName, parsed, important);\n if (expansion) {\n for (const record of expansion) {\n this.#commitRecord(\n record.name,\n record,\n record.important,\n record.pendingGroup,\n );\n }\n return;\n }\n\n this.#commitRecord(normalizedName, parsed, important);\n }\n\n removeProperty(name: string): string {\n const normalizedName = name.startsWith(\"--\") ? name : name.toLowerCase();\n const longhands = this.#codec.shorthandLonghands(normalizedName);\n if (longhands) {\n const previousValue = this.getPropertyValue(normalizedName);\n const names = new Set([normalizedName, ...longhands]);\n for (let index = this.#records.length - 1; index >= 0; index -= 1) {\n const record = this.#records[index];\n if (record && names.has(record.name)) this.#records.splice(index, 1);\n }\n return previousValue;\n }\n\n const index = this.#records.findIndex(record => record.name === normalizedName);\n if (index === -1) return \"\";\n const [removed] = this.#records.splice(index, 1);\n return removed?.observableValue ?? \"\";\n }\n\n serialize(safe: boolean, indent: string, separator: string): string {\n const declarations: string[] = [];\n const writtenPendingGroups = new Set<PendingSubstitutionGroup>();\n const writtenStaticShorthands = new Set<string>();\n const staticShorthands = new Map<string, { value: string; important: boolean }>();\n for (const name of [\n \"padding\",\n \"margin\",\n \"inset\",\n \"border-width\",\n \"border-style\",\n \"border-color\",\n \"scroll-margin\",\n \"scroll-padding\",\n ]) {\n const shorthand = this.#shorthand(name, safe);\n if (shorthand) staticShorthands.set(name, shorthand);\n }\n\n for (const record of this.#records) {\n const pendingGroup = record.pendingGroup;\n if (pendingGroup) {\n const shorthand = this.#shorthand(pendingGroup.shorthand, safe);\n if (shorthand) {\n if (writtenPendingGroups.has(pendingGroup)) continue;\n declarations.push(\n `${indent}${pendingGroup.shorthand}: ${shorthand.value}${shorthand.important ? \" !important\" : \"\"};`,\n );\n writtenPendingGroups.add(pendingGroup);\n continue;\n }\n }\n\n let staticShorthandWritten = false;\n for (const [name, shorthand] of staticShorthands) {\n const longhands = this.#codec.shorthandLonghands(name);\n if (!longhands?.includes(record.name)) continue;\n if (!writtenStaticShorthands.has(name)) {\n declarations.push(\n `${indent}${name}: ${shorthand.value}${shorthand.important ? \" !important\" : \"\"};`,\n );\n writtenStaticShorthands.add(name);\n }\n staticShorthandWritten = true;\n break;\n }\n if (staticShorthandWritten) continue;\n\n const name = record.name.startsWith(\"--\")\n ? this.#codec.serializeIdentifier(record.name)\n : record.name;\n const value = safe ? record.safeValue : record.observableValue;\n declarations.push(\n `${indent}${name}: ${value}${record.important ? \" !important\" : \"\"};`,\n );\n }\n\n return declarations.join(separator);\n }\n\n #commitRecord(\n name: string,\n parsed: ParsedPropertyValue,\n important: boolean,\n pendingGroup: PendingSubstitutionGroup | null = null,\n ): void {\n const existing = this.#records.find(record => record.name === name);\n if (existing) {\n existing.observableValue = parsed.observableValue;\n existing.safeValue = parsed.safeValue;\n existing.pendingSubstitution = parsed.pendingSubstitution;\n existing.important = important;\n existing.pendingGroup = pendingGroup;\n return;\n }\n this.#records.push({ name, ...parsed, important, pendingGroup });\n }\n\n #shorthand(name: string, safe: boolean): { value: string; important: boolean } | null {\n const longhands = this.#codec.shorthandLonghands(name);\n if (!longhands) return null;\n const records = longhands.map(longhand =>\n this.#records.find(record => record.name === longhand),\n );\n if (records.some(record => record === undefined)) return null;\n\n const first = records[0];\n if (!first || records.some(record => record?.important !== first.important)) return null;\n const pendingGroup = first.pendingGroup;\n if (\n pendingGroup?.shorthand === name &&\n records.every(record => record?.pendingGroup === pendingGroup)\n ) {\n return {\n value: safe ? pendingGroup.safeValue : pendingGroup.observableValue,\n important: first.important,\n };\n }\n if (records.some(record => record?.pendingGroup)) return null;\n if (!this.#codec.isFourSideShorthand(name) || records.length !== 4) return null;\n\n const [top, right, bottom, left] = records;\n if (!top || !right || !bottom || !left) return null;\n const values: [string, string, string, string] = [top, right, bottom, left]\n .map(record => safe ? record.safeValue : record.observableValue) as [\n string,\n string,\n string,\n string,\n ];\n return { value: compressFourSides(values), important: first.important };\n }\n}\n\nfunction compressFourSides([top, right, bottom, left]: [string, string, string, string]): string {\n if (top === right && top === bottom && top === left) return top;\n if (top === bottom && right === left) return `${top} ${right}`;\n if (right === left) return `${top} ${right} ${bottom}`;\n return [top, right, bottom, left].join(\" \");\n}\n","import {\n TokenType,\n tokenize,\n type CSSToken,\n} from \"@csstools/css-tokenizer\";\n\nconst trivia = new Set<string>([\n TokenType.Whitespace,\n TokenType.Comment,\n TokenType.CDO,\n TokenType.CDC,\n]);\n\nconst closingFor = new Map<string, string>([\n [TokenType.Function, TokenType.CloseParen],\n [TokenType.OpenParen, TokenType.CloseParen],\n [TokenType.OpenSquare, TokenType.CloseSquare],\n [TokenType.OpenCurly, TokenType.CloseCurly],\n]);\n\n/** Consumes top-level CSS Syntax rules and retains their exact UTF-16 spans. */\nexport function scanTopLevelRules(css: string): string[] {\n const tokens = tokenize({ css });\n const rules: string[] = [];\n let index = 0;\n\n while (index < tokens.length) {\n const token = tokens[index];\n if (!token || token[0] === TokenType.EOF) break;\n if (trivia.has(token[0]) || token[0] === TokenType.Semicolon) {\n index += 1;\n continue;\n }\n if (token[0] === TokenType.CloseCurly) {\n index += 1;\n continue;\n }\n\n const start = token[2];\n const stack: string[] = [];\n let end = token[3];\n let foundBoundary = false;\n\n for (; index < tokens.length; index += 1) {\n const current = tokens[index];\n if (!current || current[0] === TokenType.EOF) break;\n end = current[3];\n\n const closing = closingFor.get(current[0]);\n if (closing) {\n stack.push(closing);\n continue;\n }\n\n const expected = stack.at(-1);\n if (expected && current[0] === expected) {\n stack.pop();\n if (current[0] === TokenType.CloseCurly && stack.length === 0) {\n index += 1;\n foundBoundary = true;\n break;\n }\n continue;\n }\n\n if (current[0] === TokenType.Semicolon && stack.length === 0) {\n index += 1;\n foundBoundary = true;\n break;\n }\n }\n\n const sourceEnd = foundBoundary ? end + 1 : css.length;\n const rule = css.slice(start, sourceEnd).trim();\n if (rule !== \"\") rules.push(rule);\n }\n\n return rules;\n}\n","/** Owns child-list identity and parent propagation for every live rule node. */\nexport class RuleTree<Node extends object, Sheet> {\n readonly #children = new WeakMap<Node, Node[]>();\n readonly #setParentage: (\n node: Node,\n parentRule: Node | null,\n parentStyleSheet: Sheet | null,\n ) => void;\n readonly #parentStyleSheet: (node: Node) => Sheet | null;\n\n constructor(\n setParentage: (\n node: Node,\n parentRule: Node | null,\n parentStyleSheet: Sheet | null,\n ) => void,\n parentStyleSheet: (node: Node) => Sheet | null,\n ) {\n this.#setParentage = setParentage;\n this.#parentStyleSheet = parentStyleSheet;\n }\n\n createChildren(owner: Node): Node[] {\n const children: Node[] = [];\n this.#children.set(owner, children);\n return children;\n }\n\n children(owner: Node): Node[] {\n return this.#children.get(owner) ?? [];\n }\n\n replace(owner: Node, children: Node[]): void {\n const current = this.#children.get(owner);\n if (!current) return;\n\n for (const child of current) {\n this.attach(child, null, null);\n }\n current.splice(0, current.length, ...children);\n for (const child of children) {\n this.attach(child, owner, this.#parentStyleSheet(owner));\n }\n }\n\n attach(node: Node, parentRule: Node | null, parentStyleSheet: Sheet | null): void {\n this.#setParentage(node, parentRule, parentStyleSheet);\n for (const child of this.#children.get(node) ?? []) {\n this.attach(child, node, parentStyleSheet);\n }\n }\n}\n","export type RuleSerializationPlan<Node> =\n | { kind: \"raw\"; cssText: string }\n | { kind: \"declarations\"; declarations: string }\n | {\n kind: \"block\";\n header: string;\n declarations?: string;\n children?: readonly Node[];\n };\n\n/** Formats reparsable CSS from immutable descriptions of live rule state. */\nexport class Serializer<Node> {\n readonly #describe: (node: Node) => RuleSerializationPlan<Node>;\n\n constructor(describe: (node: Node) => RuleSerializationPlan<Node>) {\n this.#describe = describe;\n }\n\n serialize(node: Node): string {\n const plan = this.#describe(node);\n if (plan.kind === \"raw\") return `${plan.cssText}\\n`;\n if (plan.kind === \"declarations\") {\n return `${plan.declarations}${plan.declarations === \"\" ? \"\" : \"\\n\"}`;\n }\n\n const contents: string[] = [];\n if (plan.declarations) contents.push(plan.declarations);\n for (const child of plan.children ?? []) {\n contents.push(indent(this.serialize(child).trimEnd()));\n }\n if (contents.length === 0) return `${plan.header} {\\n}\\n`;\n return `${plan.header} {\\n${contents.join(\"\\n\")}\\n}\\n`;\n }\n}\n\nfunction indent(value: string): string {\n return value.split(\"\\n\").map(line => ` ${line}`).join(\"\\n\");\n}\n","// Generated by npm run generate:properties. Do not edit manually.\nexport const chromiumPropertyBaseline = \"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/151.0.7922.34 Safari/537.36\";\n\nexport const chromiumSupportedProperties = new Set([\n \"-webkit-align-content\",\n \"-webkit-align-items\",\n \"-webkit-align-self\",\n \"-webkit-animation\",\n \"-webkit-animation-delay\",\n \"-webkit-animation-direction\",\n \"-webkit-animation-duration\",\n \"-webkit-animation-fill-mode\",\n \"-webkit-animation-iteration-count\",\n \"-webkit-animation-name\",\n \"-webkit-animation-play-state\",\n \"-webkit-animation-timing-function\",\n \"-webkit-app-region\",\n \"-webkit-appearance\",\n \"-webkit-backface-visibility\",\n \"-webkit-background-clip\",\n \"-webkit-background-origin\",\n \"-webkit-background-size\",\n \"-webkit-border-after\",\n \"-webkit-border-after-color\",\n \"-webkit-border-after-style\",\n \"-webkit-border-after-width\",\n \"-webkit-border-before\",\n \"-webkit-border-before-color\",\n \"-webkit-border-before-style\",\n \"-webkit-border-before-width\",\n \"-webkit-border-bottom-left-radius\",\n \"-webkit-border-bottom-right-radius\",\n \"-webkit-border-end\",\n \"-webkit-border-end-color\",\n \"-webkit-border-end-style\",\n \"-webkit-border-end-width\",\n \"-webkit-border-horizontal-spacing\",\n \"-webkit-border-image\",\n \"-webkit-border-radius\",\n \"-webkit-border-start\",\n \"-webkit-border-start-color\",\n \"-webkit-border-start-style\",\n \"-webkit-border-start-width\",\n \"-webkit-border-top-left-radius\",\n \"-webkit-border-top-right-radius\",\n \"-webkit-border-vertical-spacing\",\n \"-webkit-box-align\",\n \"-webkit-box-decoration-break\",\n \"-webkit-box-direction\",\n \"-webkit-box-flex\",\n \"-webkit-box-ordinal-group\",\n \"-webkit-box-orient\",\n \"-webkit-box-pack\",\n \"-webkit-box-reflect\",\n \"-webkit-box-shadow\",\n \"-webkit-box-sizing\",\n \"-webkit-clip-path\",\n \"-webkit-column-break-after\",\n \"-webkit-column-break-before\",\n \"-webkit-column-break-inside\",\n \"-webkit-column-count\",\n \"-webkit-column-gap\",\n \"-webkit-column-rule\",\n \"-webkit-column-rule-color\",\n \"-webkit-column-rule-style\",\n \"-webkit-column-rule-width\",\n \"-webkit-column-span\",\n \"-webkit-column-width\",\n \"-webkit-columns\",\n \"-webkit-filter\",\n \"-webkit-flex\",\n \"-webkit-flex-basis\",\n \"-webkit-flex-direction\",\n \"-webkit-flex-flow\",\n \"-webkit-flex-grow\",\n \"-webkit-flex-shrink\",\n \"-webkit-flex-wrap\",\n \"-webkit-font-feature-settings\",\n \"-webkit-font-smoothing\",\n \"-webkit-hyphenate-character\",\n \"-webkit-justify-content\",\n \"-webkit-line-break\",\n \"-webkit-line-clamp\",\n \"-webkit-locale\",\n \"-webkit-logical-height\",\n \"-webkit-logical-width\",\n \"-webkit-margin-after\",\n \"-webkit-margin-before\",\n \"-webkit-margin-end\",\n \"-webkit-margin-start\",\n \"-webkit-mask\",\n \"-webkit-mask-box-image\",\n \"-webkit-mask-box-image-outset\",\n \"-webkit-mask-box-image-repeat\",\n \"-webkit-mask-box-image-slice\",\n \"-webkit-mask-box-image-source\",\n \"-webkit-mask-box-image-width\",\n \"-webkit-mask-clip\",\n \"-webkit-mask-composite\",\n \"-webkit-mask-image\",\n \"-webkit-mask-origin\",\n \"-webkit-mask-position\",\n \"-webkit-mask-position-x\",\n \"-webkit-mask-position-y\",\n \"-webkit-mask-repeat\",\n \"-webkit-mask-size\",\n \"-webkit-max-logical-height\",\n \"-webkit-max-logical-width\",\n \"-webkit-min-logical-height\",\n \"-webkit-min-logical-width\",\n \"-webkit-opacity\",\n \"-webkit-order\",\n \"-webkit-padding-after\",\n \"-webkit-padding-before\",\n \"-webkit-padding-end\",\n \"-webkit-padding-start\",\n \"-webkit-perspective\",\n \"-webkit-perspective-origin\",\n \"-webkit-perspective-origin-x\",\n \"-webkit-perspective-origin-y\",\n \"-webkit-print-color-adjust\",\n \"-webkit-rtl-ordering\",\n \"-webkit-ruby-position\",\n \"-webkit-shape-image-threshold\",\n \"-webkit-shape-margin\",\n \"-webkit-shape-outside\",\n \"-webkit-tap-highlight-color\",\n \"-webkit-text-combine\",\n \"-webkit-text-decorations-in-effect\",\n \"-webkit-text-emphasis\",\n \"-webkit-text-emphasis-color\",\n \"-webkit-text-emphasis-position\",\n \"-webkit-text-emphasis-style\",\n \"-webkit-text-fill-color\",\n \"-webkit-text-orientation\",\n \"-webkit-text-security\",\n \"-webkit-text-size-adjust\",\n \"-webkit-text-stroke\",\n \"-webkit-text-stroke-color\",\n \"-webkit-text-stroke-width\",\n \"-webkit-transform\",\n \"-webkit-transform-origin\",\n \"-webkit-transform-origin-x\",\n \"-webkit-transform-origin-y\",\n \"-webkit-transform-origin-z\",\n \"-webkit-transform-style\",\n \"-webkit-transition\",\n \"-webkit-transition-delay\",\n \"-webkit-transition-duration\",\n \"-webkit-transition-property\",\n \"-webkit-transition-timing-function\",\n \"-webkit-user-drag\",\n \"-webkit-user-modify\",\n \"-webkit-user-select\",\n \"-webkit-writing-mode\",\n \"accent-color\",\n \"align-content\",\n \"align-items\",\n \"align-self\",\n \"alignment-baseline\",\n \"all\",\n \"anchor-name\",\n \"anchor-scope\",\n \"animation\",\n \"animation-composition\",\n \"animation-delay\",\n \"animation-direction\",\n \"animation-duration\",\n \"animation-fill-mode\",\n \"animation-iteration-count\",\n \"animation-name\",\n \"animation-play-state\",\n \"animation-range\",\n \"animation-range-end\",\n \"animation-range-start\",\n \"animation-timeline\",\n \"animation-timing-function\",\n \"animation-trigger\",\n \"app-region\",\n \"appearance\",\n \"aspect-ratio\",\n \"backdrop-filter\",\n \"backface-visibility\",\n \"background\",\n \"background-attachment\",\n \"background-blend-mode\",\n \"background-clip\",\n \"background-color\",\n \"background-image\",\n \"background-origin\",\n \"background-position\",\n \"background-position-x\",\n \"background-position-y\",\n \"background-repeat\",\n \"background-size\",\n \"baseline-shift\",\n \"baseline-source\",\n \"block-size\",\n \"border\",\n \"border-block\",\n \"border-block-color\",\n \"border-block-end\",\n \"border-block-end-color\",\n \"border-block-end-style\",\n \"border-block-end-width\",\n \"border-block-start\",\n \"border-block-start-color\",\n \"border-block-start-style\",\n \"border-block-start-width\",\n \"border-block-style\",\n \"border-block-width\",\n \"border-bottom\",\n \"border-bottom-color\",\n \"border-bottom-left-radius\",\n \"border-bottom-right-radius\",\n \"border-bottom-style\",\n \"border-bottom-width\",\n \"border-collapse\",\n \"border-color\",\n \"border-end-end-radius\",\n \"border-end-start-radius\",\n \"border-image\",\n \"border-image-outset\",\n \"border-image-repeat\",\n \"border-image-slice\",\n \"border-image-source\",\n \"border-image-width\",\n \"border-inline\",\n \"border-inline-color\",\n \"border-inline-end\",\n \"border-inline-end-color\",\n \"border-inline-end-style\",\n \"border-inline-end-width\",\n \"border-inline-start\",\n \"border-inline-start-color\",\n \"border-inline-start-style\",\n \"border-inline-start-width\",\n \"border-inline-style\",\n \"border-inline-width\",\n \"border-left\",\n \"border-left-color\",\n \"border-left-style\",\n \"border-left-width\",\n \"border-radius\",\n \"border-right\",\n \"border-right-color\",\n \"border-right-style\",\n \"border-right-width\",\n \"border-shape\",\n \"border-spacing\",\n \"border-start-end-radius\",\n \"border-start-start-radius\",\n \"border-style\",\n \"border-top\",\n \"border-top-color\",\n \"border-top-left-radius\",\n \"border-top-right-radius\",\n \"border-top-style\",\n \"border-top-width\",\n \"border-width\",\n \"bottom\",\n \"box-decoration-break\",\n \"box-shadow\",\n \"box-sizing\",\n \"break-after\",\n \"break-before\",\n \"break-inside\",\n \"buffered-rendering\",\n \"caption-side\",\n \"caret-animation\",\n \"caret-color\",\n \"caret-shape\",\n \"clear\",\n \"clip\",\n \"clip-path\",\n \"clip-rule\",\n \"color\",\n \"color-interpolation\",\n \"color-interpolation-filters\",\n \"color-rendering\",\n \"color-scheme\",\n \"column-count\",\n \"column-fill\",\n \"column-gap\",\n \"column-height\",\n \"column-rule\",\n \"column-rule-break\",\n \"column-rule-color\",\n \"column-rule-inset\",\n \"column-rule-inset-cap\",\n \"column-rule-inset-cap-end\",\n \"column-rule-inset-cap-start\",\n \"column-rule-inset-end\",\n \"column-rule-inset-junction\",\n \"column-rule-inset-junction-end\",\n \"column-rule-inset-junction-start\",\n \"column-rule-inset-start\",\n \"column-rule-style\",\n \"column-rule-visibility-items\",\n \"column-rule-width\",\n \"column-span\",\n \"column-width\",\n \"column-wrap\",\n \"columns\",\n \"contain\",\n \"contain-intrinsic-block-size\",\n \"contain-intrinsic-height\",\n \"contain-intrinsic-inline-size\",\n \"contain-intrinsic-size\",\n \"contain-intrinsic-width\",\n \"container\",\n \"container-name\",\n \"container-type\",\n \"content\",\n \"content-visibility\",\n \"corner-block-end-shape\",\n \"corner-block-start-shape\",\n \"corner-bottom-left-shape\",\n \"corner-bottom-right-shape\",\n \"corner-bottom-shape\",\n \"corner-end-end-shape\",\n \"corner-end-start-shape\",\n \"corner-inline-end-shape\",\n \"corner-inline-start-shape\",\n \"corner-left-shape\",\n \"corner-right-shape\",\n \"corner-shape\",\n \"corner-start-end-shape\",\n \"corner-start-start-shape\",\n \"corner-top-left-shape\",\n \"corner-top-right-shape\",\n \"corner-top-shape\",\n \"counter-increment\",\n \"counter-reset\",\n \"counter-set\",\n \"cursor\",\n \"cx\",\n \"cy\",\n \"d\",\n \"direction\",\n \"display\",\n \"dominant-baseline\",\n \"dynamic-range-limit\",\n \"empty-cells\",\n \"field-sizing\",\n \"fill\",\n \"fill-opacity\",\n \"fill-rule\",\n \"filter\",\n \"flex\",\n \"flex-basis\",\n \"flex-direction\",\n \"flex-flow\",\n \"flex-grow\",\n \"flex-line-count\",\n \"flex-shrink\",\n \"flex-wrap\",\n \"float\",\n \"flood-color\",\n \"flood-opacity\",\n \"font\",\n \"font-family\",\n \"font-feature-settings\",\n \"font-kerning\",\n \"font-language-override\",\n \"font-optical-sizing\",\n \"font-palette\",\n \"font-size\",\n \"font-size-adjust\",\n \"font-stretch\",\n \"font-style\",\n \"font-synthesis\",\n \"font-synthesis-small-caps\",\n \"font-synthesis-style\",\n \"font-synthesis-weight\",\n \"font-variant\",\n \"font-variant-alternates\",\n \"font-variant-caps\",\n \"font-variant-east-asian\",\n \"font-variant-emoji\",\n \"font-variant-ligatures\",\n \"font-variant-numeric\",\n \"font-variant-position\",\n \"font-variation-settings\",\n \"font-weight\",\n \"forced-color-adjust\",\n \"gap\",\n \"grid\",\n \"grid-area\",\n \"grid-auto-columns\",\n \"grid-auto-flow\",\n \"grid-auto-rows\",\n \"grid-column\",\n \"grid-column-end\",\n \"grid-column-gap\",\n \"grid-column-start\",\n \"grid-gap\",\n \"grid-row\",\n \"grid-row-end\",\n \"grid-row-gap\",\n \"grid-row-start\",\n \"grid-template\",\n \"grid-template-areas\",\n \"grid-template-columns\",\n \"grid-template-rows\",\n \"height\",\n \"hyphenate-character\",\n \"hyphenate-limit-chars\",\n \"hyphens\",\n \"image-orientation\",\n \"image-rendering\",\n \"initial-letter\",\n \"inline-size\",\n \"inset\",\n \"inset-block\",\n \"inset-block-end\",\n \"inset-block-start\",\n \"inset-inline\",\n \"inset-inline-end\",\n \"inset-inline-start\",\n \"interactivity\",\n \"interest-delay\",\n \"interest-delay-end\",\n \"interest-delay-start\",\n \"interpolate-size\",\n \"isolation\",\n \"justify-content\",\n \"justify-items\",\n \"justify-self\",\n \"left\",\n \"letter-spacing\",\n \"lighting-color\",\n \"line-break\",\n \"line-height\",\n \"list-style\",\n \"list-style-image\",\n \"list-style-position\",\n \"list-style-type\",\n \"margin\",\n \"margin-block\",\n \"margin-block-end\",\n \"margin-block-start\",\n \"margin-bottom\",\n \"margin-inline\",\n \"margin-inline-end\",\n \"margin-inline-start\",\n \"margin-left\",\n \"margin-right\",\n \"margin-top\",\n \"marker\",\n \"marker-end\",\n \"marker-mid\",\n \"marker-start\",\n \"mask\",\n \"mask-clip\",\n \"mask-composite\",\n \"mask-image\",\n \"mask-mode\",\n \"mask-origin\",\n \"mask-position\",\n \"mask-repeat\",\n \"mask-size\",\n \"mask-type\",\n \"math-depth\",\n \"math-shift\",\n \"math-style\",\n \"max-block-size\",\n \"max-height\",\n \"max-inline-size\",\n \"max-width\",\n \"min-block-size\",\n \"min-height\",\n \"min-inline-size\",\n \"min-width\",\n \"mix-blend-mode\",\n \"object-fit\",\n \"object-position\",\n \"object-view-box\",\n \"offset\",\n \"offset-anchor\",\n \"offset-distance\",\n \"offset-path\",\n \"offset-position\",\n \"offset-rotate\",\n \"opacity\",\n \"order\",\n \"orphans\",\n \"outline\",\n \"outline-color\",\n \"outline-offset\",\n \"outline-style\",\n \"outline-width\",\n \"overflow\",\n \"overflow-anchor\",\n \"overflow-block\",\n \"overflow-clip-margin\",\n \"overflow-inline\",\n \"overflow-wrap\",\n \"overflow-x\",\n \"overflow-y\",\n \"overlay\",\n \"overscroll-behavior\",\n \"overscroll-behavior-block\",\n \"overscroll-behavior-inline\",\n \"overscroll-behavior-x\",\n \"overscroll-behavior-y\",\n \"padding\",\n \"padding-block\",\n \"padding-block-end\",\n \"padding-block-start\",\n \"padding-bottom\",\n \"padding-inline\",\n \"padding-inline-end\",\n \"padding-inline-start\",\n \"padding-left\",\n \"padding-right\",\n \"padding-top\",\n \"page\",\n \"page-break-after\",\n \"page-break-before\",\n \"page-break-inside\",\n \"page-margin-safety\",\n \"page-orientation\",\n \"paint-order\",\n \"perspective\",\n \"perspective-origin\",\n \"place-content\",\n \"place-items\",\n \"place-self\",\n \"pointer-events\",\n \"position\",\n \"position-anchor\",\n \"position-area\",\n \"position-try\",\n \"position-try-fallbacks\",\n \"position-try-order\",\n \"position-visibility\",\n \"print-color-adjust\",\n \"quotes\",\n \"r\",\n \"reading-flow\",\n \"reading-order\",\n \"resize\",\n \"right\",\n \"rotate\",\n \"row-gap\",\n \"row-rule\",\n \"row-rule-break\",\n \"row-rule-color\",\n \"row-rule-inset\",\n \"row-rule-inset-cap\",\n \"row-rule-inset-cap-end\",\n \"row-rule-inset-cap-start\",\n \"row-rule-inset-end\",\n \"row-rule-inset-junction\",\n \"row-rule-inset-junction-end\",\n \"row-rule-inset-junction-start\",\n \"row-rule-inset-start\",\n \"row-rule-style\",\n \"row-rule-visibility-items\",\n \"row-rule-width\",\n \"ruby-align\",\n \"ruby-overhang\",\n \"ruby-position\",\n \"rule\",\n \"rule-break\",\n \"rule-color\",\n \"rule-inset\",\n \"rule-inset-cap\",\n \"rule-inset-end\",\n \"rule-inset-junction\",\n \"rule-inset-start\",\n \"rule-overlap\",\n \"rule-style\",\n \"rule-visibility-items\",\n \"rule-width\",\n \"rx\",\n \"ry\",\n \"scale\",\n \"scroll-behavior\",\n \"scroll-initial-target\",\n \"scroll-margin\",\n \"scroll-margin-block\",\n \"scroll-margin-block-end\",\n \"scroll-margin-block-start\",\n \"scroll-margin-bottom\",\n \"scroll-margin-inline\",\n \"scroll-margin-inline-end\",\n \"scroll-margin-inline-start\",\n \"scroll-margin-left\",\n \"scroll-margin-right\",\n \"scroll-margin-top\",\n \"scroll-marker-group\",\n \"scroll-padding\",\n \"scroll-padding-block\",\n \"scroll-padding-block-end\",\n \"scroll-padding-block-start\",\n \"scroll-padding-bottom\",\n \"scroll-padding-inline\",\n \"scroll-padding-inline-end\",\n \"scroll-padding-inline-start\",\n \"scroll-padding-left\",\n \"scroll-padding-right\",\n \"scroll-padding-top\",\n \"scroll-snap-align\",\n \"scroll-snap-stop\",\n \"scroll-snap-type\",\n \"scroll-target-group\",\n \"scroll-timeline\",\n \"scroll-timeline-axis\",\n \"scroll-timeline-name\",\n \"scrollbar-color\",\n \"scrollbar-gutter\",\n \"scrollbar-width\",\n \"shape-image-threshold\",\n \"shape-margin\",\n \"shape-outside\",\n \"shape-rendering\",\n \"size\",\n \"speak\",\n \"stop-color\",\n \"stop-opacity\",\n \"stroke\",\n \"stroke-dasharray\",\n \"stroke-dashoffset\",\n \"stroke-linecap\",\n \"stroke-linejoin\",\n \"stroke-miterlimit\",\n \"stroke-opacity\",\n \"stroke-width\",\n \"tab-size\",\n \"table-layout\",\n \"text-align\",\n \"text-align-last\",\n \"text-anchor\",\n \"text-autospace\",\n \"text-box\",\n \"text-box-edge\",\n \"text-box-trim\",\n \"text-combine-upright\",\n \"text-decoration\",\n \"text-decoration-color\",\n \"text-decoration-line\",\n \"text-decoration-skip-ink\",\n \"text-decoration-style\",\n \"text-decoration-thickness\",\n \"text-emphasis\",\n \"text-emphasis-color\",\n \"text-emphasis-position\",\n \"text-emphasis-style\",\n \"text-fit\",\n \"text-indent\",\n \"text-justify\",\n \"text-orientation\",\n \"text-overflow\",\n \"text-rendering\",\n \"text-shadow\",\n \"text-size-adjust\",\n \"text-spacing-trim\",\n \"text-transform\",\n \"text-underline-offset\",\n \"text-underline-position\",\n \"text-wrap\",\n \"text-wrap-mode\",\n \"text-wrap-style\",\n \"timeline-scope\",\n \"timeline-trigger\",\n \"timeline-trigger-activation-range\",\n \"timeline-trigger-activation-range-end\",\n \"timeline-trigger-activation-range-start\",\n \"timeline-trigger-active-range\",\n \"timeline-trigger-active-range-end\",\n \"timeline-trigger-active-range-start\",\n \"timeline-trigger-name\",\n \"timeline-trigger-source\",\n \"top\",\n \"touch-action\",\n \"transform\",\n \"transform-box\",\n \"transform-origin\",\n \"transform-style\",\n \"transition\",\n \"transition-behavior\",\n \"transition-delay\",\n \"transition-duration\",\n \"transition-property\",\n \"transition-timing-function\",\n \"translate\",\n \"trigger-scope\",\n \"unicode-bidi\",\n \"user-select\",\n \"vector-effect\",\n \"vertical-align\",\n \"view-timeline\",\n \"view-timeline-axis\",\n \"view-timeline-inset\",\n \"view-timeline-name\",\n \"view-transition-class\",\n \"view-transition-group\",\n \"view-transition-name\",\n \"view-transition-scope\",\n \"visibility\",\n \"white-space\",\n \"white-space-collapse\",\n \"widows\",\n \"width\",\n \"will-change\",\n \"word-break\",\n \"word-spacing\",\n \"word-wrap\",\n \"writing-mode\",\n \"x\",\n \"y\",\n \"z-index\",\n \"zoom\"\n]);\n\nexport const chromiumShorthandLonghands: Readonly<Record<string, readonly string[]>> = {\n \"-webkit-align-content\": [\n \"align-content\"\n ],\n \"-webkit-align-items\": [\n \"align-items\"\n ],\n \"-webkit-align-self\": [\n \"align-self\"\n ],\n \"-webkit-animation\": [\n \"animation-duration\",\n \"animation-timing-function\",\n \"animation-delay\",\n \"animation-iteration-count\",\n \"animation-direction\",\n \"animation-fill-mode\",\n \"animation-play-state\",\n \"animation-name\",\n \"animation-timeline\",\n \"animation-range-start\",\n \"animation-range-end\"\n ],\n \"-webkit-animation-delay\": [\n \"animation-delay\"\n ],\n \"-webkit-animation-direction\": [\n \"animation-direction\"\n ],\n \"-webkit-animation-duration\": [\n \"animation-duration\"\n ],\n \"-webkit-animation-fill-mode\": [\n \"animation-fill-mode\"\n ],\n \"-webkit-animation-iteration-count\": [\n \"animation-iteration-count\"\n ],\n \"-webkit-animation-name\": [\n \"animation-name\"\n ],\n \"-webkit-animation-play-state\": [\n \"animation-play-state\"\n ],\n \"-webkit-animation-timing-function\": [\n \"animation-timing-function\"\n ],\n \"-webkit-app-region\": [\n \"app-region\"\n ],\n \"-webkit-appearance\": [\n \"appearance\"\n ],\n \"-webkit-backface-visibility\": [\n \"backface-visibility\"\n ],\n \"-webkit-background-clip\": [\n \"background-clip\"\n ],\n \"-webkit-background-origin\": [\n \"background-origin\"\n ],\n \"-webkit-background-size\": [\n \"background-size\"\n ],\n \"-webkit-border-after\": [\n \"border-block-end-width\",\n \"border-block-end-style\",\n \"border-block-end-color\"\n ],\n \"-webkit-border-after-color\": [\n \"border-block-end-color\"\n ],\n \"-webkit-border-after-style\": [\n \"border-block-end-style\"\n ],\n \"-webkit-border-after-width\": [\n \"border-block-end-width\"\n ],\n \"-webkit-border-before\": [\n \"border-block-start-width\",\n \"border-block-start-style\",\n \"border-block-start-color\"\n ],\n \"-webkit-border-before-color\": [\n \"border-block-start-color\"\n ],\n \"-webkit-border-before-style\": [\n \"border-block-start-style\"\n ],\n \"-webkit-border-before-width\": [\n \"border-block-start-width\"\n ],\n \"-webkit-border-bottom-left-radius\": [\n \"border-bottom-left-radius\"\n ],\n \"-webkit-border-bottom-right-radius\": [\n \"border-bottom-right-radius\"\n ],\n \"-webkit-border-end\": [\n \"border-inline-end-width\",\n \"border-inline-end-style\",\n \"border-inline-end-color\"\n ],\n \"-webkit-border-end-color\": [\n \"border-inline-end-color\"\n ],\n \"-webkit-border-end-style\": [\n \"border-inline-end-style\"\n ],\n \"-webkit-border-end-width\": [\n \"border-inline-end-width\"\n ],\n \"-webkit-border-radius\": [\n \"border-top-left-radius\",\n \"border-top-right-radius\",\n \"border-bottom-right-radius\",\n \"border-bottom-left-radius\"\n ],\n \"-webkit-border-start\": [\n \"border-inline-start-width\",\n \"border-inline-start-style\",\n \"border-inline-start-color\"\n ],\n \"-webkit-border-start-color\": [\n \"border-inline-start-color\"\n ],\n \"-webkit-border-start-style\": [\n \"border-inline-start-style\"\n ],\n \"-webkit-border-start-width\": [\n \"border-inline-start-width\"\n ],\n \"-webkit-border-top-left-radius\": [\n \"border-top-left-radius\"\n ],\n \"-webkit-border-top-right-radius\": [\n \"border-top-right-radius\"\n ],\n \"-webkit-box-shadow\": [\n \"box-shadow\"\n ],\n \"-webkit-box-sizing\": [\n \"box-sizing\"\n ],\n \"-webkit-clip-path\": [\n \"clip-path\"\n ],\n \"-webkit-column-break-after\": [\n \"break-after\"\n ],\n \"-webkit-column-break-before\": [\n \"break-before\"\n ],\n \"-webkit-column-break-inside\": [\n \"break-inside\"\n ],\n \"-webkit-column-count\": [\n \"column-count\"\n ],\n \"-webkit-column-gap\": [\n \"column-gap\"\n ],\n \"-webkit-column-rule\": [\n \"column-rule-width\",\n \"column-rule-style\",\n \"column-rule-color\"\n ],\n \"-webkit-column-rule-color\": [\n \"column-rule-color\"\n ],\n \"-webkit-column-rule-style\": [\n \"column-rule-style\"\n ],\n \"-webkit-column-rule-width\": [\n \"column-rule-width\"\n ],\n \"-webkit-column-span\": [\n \"column-span\"\n ],\n \"-webkit-column-width\": [\n \"column-width\"\n ],\n \"-webkit-columns\": [\n \"column-width\",\n \"column-count\",\n \"column-height\",\n \"column-wrap\"\n ],\n \"-webkit-filter\": [\n \"filter\"\n ],\n \"-webkit-flex\": [\n \"flex-grow\",\n \"flex-shrink\",\n \"flex-basis\"\n ],\n \"-webkit-flex-basis\": [\n \"flex-basis\"\n ],\n \"-webkit-flex-direction\": [\n \"flex-direction\"\n ],\n \"-webkit-flex-flow\": [\n \"flex-direction\",\n \"flex-wrap\"\n ],\n \"-webkit-flex-grow\": [\n \"flex-grow\"\n ],\n \"-webkit-flex-shrink\": [\n \"flex-shrink\"\n ],\n \"-webkit-flex-wrap\": [\n \"flex-wrap\"\n ],\n \"-webkit-font-feature-settings\": [\n \"font-feature-settings\"\n ],\n \"-webkit-hyphenate-character\": [\n \"hyphenate-character\"\n ],\n \"-webkit-justify-content\": [\n \"justify-content\"\n ],\n \"-webkit-logical-height\": [\n \"block-size\"\n ],\n \"-webkit-logical-width\": [\n \"inline-size\"\n ],\n \"-webkit-margin-after\": [\n \"margin-block-end\"\n ],\n \"-webkit-margin-before\": [\n \"margin-block-start\"\n ],\n \"-webkit-margin-end\": [\n \"margin-inline-end\"\n ],\n \"-webkit-margin-start\": [\n \"margin-inline-start\"\n ],\n \"-webkit-mask\": [\n \"mask-image\",\n \"-webkit-mask-position-x\",\n \"-webkit-mask-position-y\",\n \"mask-size\",\n \"mask-repeat\",\n \"mask-origin\",\n \"mask-clip\",\n \"mask-composite\",\n \"mask-mode\"\n ],\n \"-webkit-mask-box-image\": [\n \"-webkit-mask-box-image-source\",\n \"-webkit-mask-box-image-slice\",\n \"-webkit-mask-box-image-width\",\n \"-webkit-mask-box-image-outset\",\n \"-webkit-mask-box-image-repeat\"\n ],\n \"-webkit-mask-clip\": [\n \"mask-clip\"\n ],\n \"-webkit-mask-composite\": [\n \"mask-composite\"\n ],\n \"-webkit-mask-image\": [\n \"mask-image\"\n ],\n \"-webkit-mask-origin\": [\n \"mask-origin\"\n ],\n \"-webkit-mask-position\": [\n \"-webkit-mask-position-x\",\n \"-webkit-mask-position-y\"\n ],\n \"-webkit-mask-repeat\": [\n \"mask-repeat\"\n ],\n \"-webkit-mask-size\": [\n \"mask-size\"\n ],\n \"-webkit-max-logical-height\": [\n \"max-block-size\"\n ],\n \"-webkit-max-logical-width\": [\n \"max-inline-size\"\n ],\n \"-webkit-min-logical-height\": [\n \"min-block-size\"\n ],\n \"-webkit-min-logical-width\": [\n \"min-inline-size\"\n ],\n \"-webkit-opacity\": [\n \"opacity\"\n ],\n \"-webkit-order\": [\n \"order\"\n ],\n \"-webkit-padding-after\": [\n \"padding-block-end\"\n ],\n \"-webkit-padding-before\": [\n \"padding-block-start\"\n ],\n \"-webkit-padding-end\": [\n \"padding-inline-end\"\n ],\n \"-webkit-padding-start\": [\n \"padding-inline-start\"\n ],\n \"-webkit-perspective\": [\n \"perspective\"\n ],\n \"-webkit-perspective-origin\": [\n \"perspective-origin\"\n ],\n \"-webkit-print-color-adjust\": [\n \"print-color-adjust\"\n ],\n \"-webkit-shape-image-threshold\": [\n \"shape-image-threshold\"\n ],\n \"-webkit-shape-margin\": [\n \"shape-margin\"\n ],\n \"-webkit-shape-outside\": [\n \"shape-outside\"\n ],\n \"-webkit-text-emphasis\": [\n \"text-emphasis-style\",\n \"text-emphasis-color\"\n ],\n \"-webkit-text-emphasis-color\": [\n \"text-emphasis-color\"\n ],\n \"-webkit-text-emphasis-position\": [\n \"text-emphasis-position\"\n ],\n \"-webkit-text-emphasis-style\": [\n \"text-emphasis-style\"\n ],\n \"-webkit-text-size-adjust\": [\n \"text-size-adjust\"\n ],\n \"-webkit-text-stroke\": [\n \"-webkit-text-stroke-width\",\n \"-webkit-text-stroke-color\"\n ],\n \"-webkit-transform\": [\n \"transform\"\n ],\n \"-webkit-transform-origin\": [\n \"transform-origin\"\n ],\n \"-webkit-transform-style\": [\n \"transform-style\"\n ],\n \"-webkit-transition\": [\n \"transition-property\",\n \"transition-duration\",\n \"transition-timing-function\",\n \"transition-delay\",\n \"transition-behavior\"\n ],\n \"-webkit-transition-delay\": [\n \"transition-delay\"\n ],\n \"-webkit-transition-duration\": [\n \"transition-duration\"\n ],\n \"-webkit-transition-property\": [\n \"transition-property\"\n ],\n \"-webkit-transition-timing-function\": [\n \"transition-timing-function\"\n ],\n \"-webkit-user-select\": [\n \"user-select\"\n ],\n \"animation\": [\n \"animation-duration\",\n \"animation-timing-function\",\n \"animation-delay\",\n \"animation-iteration-count\",\n \"animation-direction\",\n \"animation-fill-mode\",\n \"animation-play-state\",\n \"animation-name\",\n \"animation-timeline\",\n \"animation-range-start\",\n \"animation-range-end\"\n ],\n \"animation-range\": [\n \"animation-range-start\",\n \"animation-range-end\"\n ],\n \"background\": [\n \"background-image\",\n \"background-position-x\",\n \"background-position-y\",\n \"background-size\",\n \"background-repeat\",\n \"background-attachment\",\n \"background-origin\",\n \"background-clip\",\n \"background-color\"\n ],\n \"background-position\": [\n \"background-position-x\",\n \"background-position-y\"\n ],\n \"border\": [\n \"border-top-color\",\n \"border-top-style\",\n \"border-top-width\",\n \"border-right-color\",\n \"border-right-style\",\n \"border-right-width\",\n \"border-bottom-color\",\n \"border-bottom-style\",\n \"border-bottom-width\",\n \"border-left-color\",\n \"border-left-style\",\n \"border-left-width\",\n \"border-image-source\",\n \"border-image-slice\",\n \"border-image-width\",\n \"border-image-outset\",\n \"border-image-repeat\"\n ],\n \"border-block\": [\n \"border-block-start-color\",\n \"border-block-start-style\",\n \"border-block-start-width\",\n \"border-block-end-color\",\n \"border-block-end-style\",\n \"border-block-end-width\"\n ],\n \"border-block-color\": [\n \"border-block-start-color\",\n \"border-block-end-color\"\n ],\n \"border-block-end\": [\n \"border-block-end-width\",\n \"border-block-end-style\",\n \"border-block-end-color\"\n ],\n \"border-block-start\": [\n \"border-block-start-width\",\n \"border-block-start-style\",\n \"border-block-start-color\"\n ],\n \"border-block-style\": [\n \"border-block-start-style\",\n \"border-block-end-style\"\n ],\n \"border-block-width\": [\n \"border-block-start-width\",\n \"border-block-end-width\"\n ],\n \"border-bottom\": [\n \"border-bottom-width\",\n \"border-bottom-style\",\n \"border-bottom-color\"\n ],\n \"border-color\": [\n \"border-top-color\",\n \"border-right-color\",\n \"border-bottom-color\",\n \"border-left-color\"\n ],\n \"border-image\": [\n \"border-image-source\",\n \"border-image-slice\",\n \"border-image-width\",\n \"border-image-outset\",\n \"border-image-repeat\"\n ],\n \"border-inline\": [\n \"border-inline-start-color\",\n \"border-inline-start-style\",\n \"border-inline-start-width\",\n \"border-inline-end-color\",\n \"border-inline-end-style\",\n \"border-inline-end-width\"\n ],\n \"border-inline-color\": [\n \"border-inline-start-color\",\n \"border-inline-end-color\"\n ],\n \"border-inline-end\": [\n \"border-inline-end-width\",\n \"border-inline-end-style\",\n \"border-inline-end-color\"\n ],\n \"border-inline-start\": [\n \"border-inline-start-width\",\n \"border-inline-start-style\",\n \"border-inline-start-color\"\n ],\n \"border-inline-style\": [\n \"border-inline-start-style\",\n \"border-inline-end-style\"\n ],\n \"border-inline-width\": [\n \"border-inline-start-width\",\n \"border-inline-end-width\"\n ],\n \"border-left\": [\n \"border-left-width\",\n \"border-left-style\",\n \"border-left-color\"\n ],\n \"border-radius\": [\n \"border-top-left-radius\",\n \"border-top-right-radius\",\n \"border-bottom-right-radius\",\n \"border-bottom-left-radius\"\n ],\n \"border-right\": [\n \"border-right-width\",\n \"border-right-style\",\n \"border-right-color\"\n ],\n \"border-spacing\": [\n \"-webkit-border-horizontal-spacing\",\n \"-webkit-border-vertical-spacing\"\n ],\n \"border-style\": [\n \"border-top-style\",\n \"border-right-style\",\n \"border-bottom-style\",\n \"border-left-style\"\n ],\n \"border-top\": [\n \"border-top-width\",\n \"border-top-style\",\n \"border-top-color\"\n ],\n \"border-width\": [\n \"border-top-width\",\n \"border-right-width\",\n \"border-bottom-width\",\n \"border-left-width\"\n ],\n \"column-rule\": [\n \"column-rule-width\",\n \"column-rule-style\",\n \"column-rule-color\"\n ],\n \"column-rule-inset\": [\n \"column-rule-inset-cap-start\",\n \"column-rule-inset-cap-end\",\n \"column-rule-inset-junction-start\",\n \"column-rule-inset-junction-end\"\n ],\n \"column-rule-inset-cap\": [\n \"column-rule-inset-cap-start\",\n \"column-rule-inset-cap-end\"\n ],\n \"column-rule-inset-end\": [\n \"column-rule-inset-cap-end\",\n \"column-rule-inset-junction-end\"\n ],\n \"column-rule-inset-junction\": [\n \"column-rule-inset-junction-start\",\n \"column-rule-inset-junction-end\"\n ],\n \"column-rule-inset-start\": [\n \"column-rule-inset-cap-start\",\n \"column-rule-inset-junction-start\"\n ],\n \"columns\": [\n \"column-width\",\n \"column-count\",\n \"column-height\",\n \"column-wrap\"\n ],\n \"contain-intrinsic-size\": [\n \"contain-intrinsic-width\",\n \"contain-intrinsic-height\"\n ],\n \"container\": [\n \"container-name\",\n \"container-type\"\n ],\n \"corner-block-end-shape\": [\n \"corner-end-start-shape\",\n \"corner-end-end-shape\"\n ],\n \"corner-block-start-shape\": [\n \"corner-start-start-shape\",\n \"corner-start-end-shape\"\n ],\n \"corner-bottom-shape\": [\n \"corner-bottom-left-shape\",\n \"corner-bottom-right-shape\"\n ],\n \"corner-inline-end-shape\": [\n \"corner-start-end-shape\",\n \"corner-end-end-shape\"\n ],\n \"corner-inline-start-shape\": [\n \"corner-start-start-shape\",\n \"corner-end-start-shape\"\n ],\n \"corner-left-shape\": [\n \"corner-top-left-shape\",\n \"corner-bottom-left-shape\"\n ],\n \"corner-right-shape\": [\n \"corner-top-right-shape\",\n \"corner-bottom-right-shape\"\n ],\n \"corner-shape\": [\n \"corner-top-left-shape\",\n \"corner-top-right-shape\",\n \"corner-bottom-right-shape\",\n \"corner-bottom-left-shape\"\n ],\n \"corner-top-shape\": [\n \"corner-top-left-shape\",\n \"corner-top-right-shape\"\n ],\n \"flex\": [\n \"flex-grow\",\n \"flex-shrink\",\n \"flex-basis\"\n ],\n \"flex-flow\": [\n \"flex-direction\",\n \"flex-wrap\"\n ],\n \"font\": [\n \"font-style\",\n \"font-variant-ligatures\",\n \"font-variant-caps\",\n \"font-variant-numeric\",\n \"font-variant-east-asian\",\n \"font-variant-alternates\",\n \"font-variant-position\",\n \"font-variant-emoji\",\n \"font-weight\",\n \"font-stretch\",\n \"font-size\",\n \"line-height\",\n \"font-family\",\n \"font-optical-sizing\",\n \"font-size-adjust\",\n \"font-kerning\",\n \"font-feature-settings\",\n \"font-variation-settings\",\n \"font-language-override\"\n ],\n \"font-synthesis\": [\n \"font-synthesis-weight\",\n \"font-synthesis-style\",\n \"font-synthesis-small-caps\"\n ],\n \"font-variant\": [\n \"font-variant-ligatures\",\n \"font-variant-caps\",\n \"font-variant-alternates\",\n \"font-variant-numeric\",\n \"font-variant-east-asian\",\n \"font-variant-position\",\n \"font-variant-emoji\"\n ],\n \"gap\": [\n \"row-gap\",\n \"column-gap\"\n ],\n \"grid\": [\n \"grid-template-rows\",\n \"grid-template-columns\",\n \"grid-template-areas\",\n \"grid-auto-flow\",\n \"grid-auto-rows\",\n \"grid-auto-columns\"\n ],\n \"grid-area\": [\n \"grid-row-start\",\n \"grid-column-start\",\n \"grid-row-end\",\n \"grid-column-end\"\n ],\n \"grid-column\": [\n \"grid-column-start\",\n \"grid-column-end\"\n ],\n \"grid-column-gap\": [\n \"column-gap\"\n ],\n \"grid-gap\": [\n \"row-gap\",\n \"column-gap\"\n ],\n \"grid-row\": [\n \"grid-row-start\",\n \"grid-row-end\"\n ],\n \"grid-row-gap\": [\n \"row-gap\"\n ],\n \"grid-template\": [\n \"grid-template-rows\",\n \"grid-template-columns\",\n \"grid-template-areas\"\n ],\n \"inset\": [\n \"top\",\n \"right\",\n \"bottom\",\n \"left\"\n ],\n \"inset-block\": [\n \"inset-block-start\",\n \"inset-block-end\"\n ],\n \"inset-inline\": [\n \"inset-inline-start\",\n \"inset-inline-end\"\n ],\n \"interest-delay\": [\n \"interest-delay-start\",\n \"interest-delay-end\"\n ],\n \"list-style\": [\n \"list-style-position\",\n \"list-style-image\",\n \"list-style-type\"\n ],\n \"margin\": [\n \"margin-top\",\n \"margin-right\",\n \"margin-bottom\",\n \"margin-left\"\n ],\n \"margin-block\": [\n \"margin-block-start\",\n \"margin-block-end\"\n ],\n \"margin-inline\": [\n \"margin-inline-start\",\n \"margin-inline-end\"\n ],\n \"marker\": [\n \"marker-start\",\n \"marker-mid\",\n \"marker-end\"\n ],\n \"mask\": [\n \"mask-image\",\n \"-webkit-mask-position-x\",\n \"-webkit-mask-position-y\",\n \"mask-size\",\n \"mask-repeat\",\n \"mask-origin\",\n \"mask-clip\",\n \"mask-composite\",\n \"mask-mode\"\n ],\n \"mask-position\": [\n \"-webkit-mask-position-x\",\n \"-webkit-mask-position-y\"\n ],\n \"offset\": [\n \"offset-position\",\n \"offset-path\",\n \"offset-distance\",\n \"offset-rotate\",\n \"offset-anchor\"\n ],\n \"outline\": [\n \"outline-color\",\n \"outline-style\",\n \"outline-width\"\n ],\n \"overflow\": [\n \"overflow-x\",\n \"overflow-y\"\n ],\n \"overscroll-behavior\": [\n \"overscroll-behavior-x\",\n \"overscroll-behavior-y\"\n ],\n \"padding\": [\n \"padding-top\",\n \"padding-right\",\n \"padding-bottom\",\n \"padding-left\"\n ],\n \"padding-block\": [\n \"padding-block-start\",\n \"padding-block-end\"\n ],\n \"padding-inline\": [\n \"padding-inline-start\",\n \"padding-inline-end\"\n ],\n \"page-break-after\": [\n \"break-after\"\n ],\n \"page-break-before\": [\n \"break-before\"\n ],\n \"page-break-inside\": [\n \"break-inside\"\n ],\n \"place-content\": [\n \"align-content\",\n \"justify-content\"\n ],\n \"place-items\": [\n \"align-items\",\n \"justify-items\"\n ],\n \"place-self\": [\n \"align-self\",\n \"justify-self\"\n ],\n \"position-try\": [\n \"position-try-order\",\n \"position-try-fallbacks\"\n ],\n \"row-rule\": [\n \"row-rule-width\",\n \"row-rule-style\",\n \"row-rule-color\"\n ],\n \"row-rule-inset\": [\n \"row-rule-inset-cap-start\",\n \"row-rule-inset-cap-end\",\n \"row-rule-inset-junction-start\",\n \"row-rule-inset-junction-end\"\n ],\n \"row-rule-inset-cap\": [\n \"row-rule-inset-cap-start\",\n \"row-rule-inset-cap-end\"\n ],\n \"row-rule-inset-end\": [\n \"row-rule-inset-cap-end\",\n \"row-rule-inset-junction-end\"\n ],\n \"row-rule-inset-junction\": [\n \"row-rule-inset-junction-start\",\n \"row-rule-inset-junction-end\"\n ],\n \"row-rule-inset-start\": [\n \"row-rule-inset-cap-start\",\n \"row-rule-inset-junction-start\"\n ],\n \"rule\": [\n \"column-rule-width\",\n \"column-rule-style\",\n \"column-rule-color\",\n \"row-rule-width\",\n \"row-rule-style\",\n \"row-rule-color\"\n ],\n \"rule-break\": [\n \"row-rule-break\",\n \"column-rule-break\"\n ],\n \"rule-color\": [\n \"column-rule-color\",\n \"row-rule-color\"\n ],\n \"rule-inset\": [\n \"row-rule-inset-cap-start\",\n \"row-rule-inset-cap-end\",\n \"row-rule-inset-junction-start\",\n \"row-rule-inset-junction-end\",\n \"column-rule-inset-cap-start\",\n \"column-rule-inset-cap-end\",\n \"column-rule-inset-junction-start\",\n \"column-rule-inset-junction-end\"\n ],\n \"rule-inset-cap\": [\n \"row-rule-inset-cap-start\",\n \"row-rule-inset-cap-end\",\n \"column-rule-inset-cap-start\",\n \"column-rule-inset-cap-end\"\n ],\n \"rule-inset-end\": [\n \"column-rule-inset-cap-end\",\n \"column-rule-inset-junction-end\",\n \"row-rule-inset-cap-end\",\n \"row-rule-inset-junction-end\"\n ],\n \"rule-inset-junction\": [\n \"row-rule-inset-junction-start\",\n \"row-rule-inset-junction-end\",\n \"column-rule-inset-junction-start\",\n \"column-rule-inset-junction-end\"\n ],\n \"rule-inset-start\": [\n \"column-rule-inset-cap-start\",\n \"column-rule-inset-junction-start\",\n \"row-rule-inset-cap-start\",\n \"row-rule-inset-junction-start\"\n ],\n \"rule-style\": [\n \"column-rule-style\",\n \"row-rule-style\"\n ],\n \"rule-visibility-items\": [\n \"column-rule-visibility-items\",\n \"row-rule-visibility-items\"\n ],\n \"rule-width\": [\n \"column-rule-width\",\n \"row-rule-width\"\n ],\n \"scroll-margin\": [\n \"scroll-margin-top\",\n \"scroll-margin-right\",\n \"scroll-margin-bottom\",\n \"scroll-margin-left\"\n ],\n \"scroll-margin-block\": [\n \"scroll-margin-block-start\",\n \"scroll-margin-block-end\"\n ],\n \"scroll-margin-inline\": [\n \"scroll-margin-inline-start\",\n \"scroll-margin-inline-end\"\n ],\n \"scroll-padding\": [\n \"scroll-padding-top\",\n \"scroll-padding-right\",\n \"scroll-padding-bottom\",\n \"scroll-padding-left\"\n ],\n \"scroll-padding-block\": [\n \"scroll-padding-block-start\",\n \"scroll-padding-block-end\"\n ],\n \"scroll-padding-inline\": [\n \"scroll-padding-inline-start\",\n \"scroll-padding-inline-end\"\n ],\n \"scroll-timeline\": [\n \"scroll-timeline-name\",\n \"scroll-timeline-axis\"\n ],\n \"text-box\": [\n \"text-box-trim\",\n \"text-box-edge\"\n ],\n \"text-decoration\": [\n \"text-decoration-line\",\n \"text-decoration-thickness\",\n \"text-decoration-style\",\n \"text-decoration-color\"\n ],\n \"text-emphasis\": [\n \"text-emphasis-style\",\n \"text-emphasis-color\"\n ],\n \"text-wrap\": [\n \"text-wrap-mode\",\n \"text-wrap-style\"\n ],\n \"timeline-trigger\": [\n \"timeline-trigger-name\",\n \"timeline-trigger-source\",\n \"timeline-trigger-activation-range-start\",\n \"timeline-trigger-activation-range-end\",\n \"timeline-trigger-active-range-start\",\n \"timeline-trigger-active-range-end\"\n ],\n \"timeline-trigger-activation-range\": [\n \"timeline-trigger-activation-range-start\",\n \"timeline-trigger-activation-range-end\"\n ],\n \"timeline-trigger-active-range\": [\n \"timeline-trigger-active-range-start\",\n \"timeline-trigger-active-range-end\"\n ],\n \"transition\": [\n \"transition-property\",\n \"transition-duration\",\n \"transition-timing-function\",\n \"transition-delay\",\n \"transition-behavior\"\n ],\n \"view-timeline\": [\n \"view-timeline-name\",\n \"view-timeline-axis\",\n \"view-timeline-inset\"\n ],\n \"white-space\": [\n \"white-space-collapse\",\n \"text-wrap-mode\"\n ],\n \"word-wrap\": [\n \"overflow-wrap\"\n ]\n};\n","import { CSSStyleDeclaration as CSSStyleDeclarationOracle } from \"cssstyle\";\n\nimport { chromiumShorthandLonghands } from \"../chromium-properties.js\";\nimport type {\n DeclarationRecord,\n ParsedPropertyValue,\n PendingSubstitutionGroup,\n} from \"./declaration-block.js\";\n\nconst fourSideShorthandNames = new Set([\n \"padding\",\n \"margin\",\n \"inset\",\n \"border-width\",\n \"border-style\",\n \"border-color\",\n \"scroll-margin\",\n \"scroll-padding\",\n]);\n\nexport function isFourSideShorthand(name: string): boolean {\n return fourSideShorthandNames.has(name);\n}\n\nexport function getShorthandLonghands(name: string): readonly string[] | null {\n if (!Object.hasOwn(chromiumShorthandLonghands, name)) return null;\n return chromiumShorthandLonghands[name] ?? null;\n}\n\nfunction splitTopLevelWhitespace(value: string): string[] {\n const components: string[] = [];\n let current = \"\";\n let depth = 0;\n let quote = \"\";\n let escaped = false;\n\n for (const character of value) {\n if (escaped) {\n current += character;\n escaped = false;\n continue;\n }\n\n if (character === \"\\\\\") {\n current += character;\n escaped = true;\n continue;\n }\n\n if (quote !== \"\") {\n current += character;\n if (character === quote) quote = \"\";\n continue;\n }\n\n if (character === '\"' || character === \"'\") {\n current += character;\n quote = character;\n continue;\n }\n\n if (character === \"(\" || character === \"[\" || character === \"{\") {\n current += character;\n depth += 1;\n continue;\n }\n\n if (character === \")\" || character === \"]\" || character === \"}\") {\n current += character;\n if (depth > 0) depth -= 1;\n continue;\n }\n\n if (/\\s/.test(character) && depth === 0) {\n if (current !== \"\") components.push(current);\n current = \"\";\n continue;\n }\n\n current += character;\n }\n\n if (current !== \"\") components.push(current);\n return components;\n}\n\nfunction expandFourSides(value: string): [string, string, string, string] | null {\n const components = splitTopLevelWhitespace(value);\n if (components.length < 1 || components.length > 4) return null;\n\n const top = components[0];\n if (top === undefined) return null;\n\n const right = components[1] ?? top;\n const bottom = components[2] ?? top;\n const left = components[3] ?? right;\n return [top, right, bottom, left];\n}\n\nexport function expandStaticFourSide(\n name: string,\n parsed: ParsedPropertyValue,\n important: boolean,\n): DeclarationRecord[] | null {\n if (!fourSideShorthandNames.has(name)) return null;\n const longhands = getShorthandLonghands(name);\n if (!longhands || longhands.length !== 4) return null;\n\n const observableSides = expandFourSides(parsed.observableValue);\n const safeSides = expandFourSides(parsed.safeValue);\n if (!observableSides || !safeSides) return null;\n\n const records: DeclarationRecord[] = [];\n for (let index = 0; index < longhands.length; index += 1) {\n const longhand = longhands[index];\n const observableValue = observableSides[index];\n const safeValue = safeSides[index];\n if (!longhand || observableValue === undefined || safeValue === undefined) {\n return null;\n }\n records.push({\n name: longhand,\n observableValue,\n safeValue,\n pendingSubstitution: false,\n important,\n pendingGroup: null,\n });\n }\n return records;\n}\nexport function expandStaticShorthand(\n name: string,\n parsed: ParsedPropertyValue,\n important: boolean,\n): DeclarationRecord[] | null {\n const longhands = getShorthandLonghands(name);\n if (!longhands || longhands.length === 0 || parsed.pendingSubstitution) return null;\n\n const observableStyle = new CSSStyleDeclarationOracle();\n const safeStyle = new CSSStyleDeclarationOracle();\n observableStyle.setProperty(name, parsed.observableValue);\n safeStyle.setProperty(name, parsed.safeValue);\n\n const fallbackValues: Readonly<Record<string, string>> = name === \"border\"\n ? {\n \"border-image-source\": \"none\",\n \"border-image-slice\": \"100%\",\n \"border-image-width\": \"1\",\n \"border-image-outset\": \"0\",\n \"border-image-repeat\": \"stretch\",\n }\n : {};\n const orderedLonghands = name === \"border\"\n ? [\n \"border-top-width\",\n \"border-right-width\",\n \"border-bottom-width\",\n \"border-left-width\",\n \"border-top-style\",\n \"border-right-style\",\n \"border-bottom-style\",\n \"border-left-style\",\n \"border-top-color\",\n \"border-right-color\",\n \"border-bottom-color\",\n \"border-left-color\",\n \"border-image-source\",\n \"border-image-slice\",\n \"border-image-width\",\n \"border-image-outset\",\n \"border-image-repeat\",\n ]\n : longhands;\n\n const pendingGroup: PendingSubstitutionGroup = {\n shorthand: name,\n observableValue: parsed.observableValue,\n safeValue: parsed.safeValue,\n };\n const records: DeclarationRecord[] = [];\n for (const longhand of orderedLonghands) {\n if (!longhands.includes(longhand)) return null;\n const observableValue = observableStyle.getPropertyValue(longhand) || fallbackValues[longhand] || \"\";\n const safeValue = safeStyle.getPropertyValue(longhand) || fallbackValues[longhand] || \"\";\n if (observableValue === \"\" || safeValue === \"\") return null;\n records.push({\n name: longhand,\n observableValue,\n safeValue,\n pendingSubstitution: false,\n important,\n pendingGroup,\n });\n }\n return records;\n}\n","import { transform, transformStyleAttribute } from \"lightningcss\";\nimport * as csstree from \"css-tree\";\n\nimport {\n chromiumShorthandLonghands,\n chromiumSupportedProperties,\n} from \"../chromium-properties.js\";\nimport type { ParsedPropertyValue } from \"./declaration-block.js\";\n\nconst encoder = new TextEncoder();\nconst decoder = new TextDecoder();\nconst paddingLonghands = [\n \"padding-top\",\n \"padding-right\",\n \"padding-bottom\",\n \"padding-left\",\n] as const;\nconst zeroLengthProperties = new Set([\n \"width\",\n \"height\",\n \"min-width\",\n \"min-height\",\n \"max-width\",\n \"max-height\",\n \"padding\",\n ...paddingLonghands,\n]);\n\nfor (const shorthand of [\n \"padding\",\n \"margin\",\n \"inset\",\n \"border-width\",\n \"scroll-margin\",\n \"scroll-padding\",\n]) {\n zeroLengthProperties.add(shorthand);\n for (const longhand of chromiumShorthandLonghands[shorthand] ?? []) {\n zeroLengthProperties.add(longhand);\n }\n}\n\nfunction isUnknownRecord(value: unknown): value is Record<string, unknown> {\n return typeof value === \"object\" && value !== null;\n}\n\nfunction isToken(value: unknown, type: string, tokenValue?: string): boolean {\n if (!isUnknownRecord(value) || value.type !== \"token\") return false;\n const token = value.value;\n if (!isUnknownRecord(token) || token.type !== type) return false;\n return tokenValue === undefined || token.value === tokenValue;\n}\n\nfunction isWhitespaceToken(value: unknown): boolean {\n return isToken(value, \"white-space\");\n}\n\nfunction significantTokens(values: unknown[]): unknown[] {\n return values.filter(value => !isWhitespaceToken(value));\n}\n\nfunction functionValue(\n value: unknown,\n): { name: string; arguments: unknown[] } | null {\n if (!isUnknownRecord(value) || value.type !== \"function\") return null;\n const details = value.value;\n if (!isUnknownRecord(details) || typeof details.name !== \"string\") return null;\n if (!Array.isArray(details.arguments)) return null;\n return { name: details.name.toLowerCase(), arguments: details.arguments };\n}\n\nfunction isValidAttrType(value: unknown): boolean {\n const typeFunction = functionValue(value);\n if (!typeFunction || typeFunction.name !== \"type\") return false;\n\n const tokens = significantTokens(typeFunction.arguments);\n if (tokens.length === 1 && isToken(tokens[0], \"delim\", \"*\")) return true;\n if (tokens.length < 3) return false;\n if (!isToken(tokens[0], \"delim\", \"<\")) return false;\n if (!isToken(tokens[tokens.length - 1], \"delim\", \">\")) return false;\n\n let depth = 0;\n for (const token of tokens) {\n if (isToken(token, \"delim\", \"<\")) depth += 1;\n if (!isToken(token, \"delim\", \">\")) continue;\n depth -= 1;\n if (depth < 0) return false;\n }\n return depth === 0;\n}\n\nfunction isValidAttrFunction(argumentsList: unknown[]): boolean {\n const tokens = significantTokens(argumentsList);\n if (!isToken(tokens[0], \"ident\")) return false;\n if (tokens.length === 1) return true;\n\n let index = 1;\n const second = tokens[index];\n if (isToken(second, \"comma\")) return true;\n\n if (isValidAttrType(second)) {\n index += 1;\n } else if (\n isToken(second, \"ident\") ||\n isToken(second, \"delim\", \"%\")\n ) {\n index += 1;\n } else {\n return false;\n }\n\n if (index === tokens.length) return true;\n return isToken(tokens[index], \"comma\");\n}\n\nfunction isConditionFunction(value: unknown): boolean {\n const condition = functionValue(value);\n if (!condition || ![\"media\", \"style\", \"supports\"].includes(condition.name)) {\n return false;\n }\n return significantTokens(condition.arguments).length > 0;\n}\n\nfunction isElseToken(value: unknown): boolean {\n return isToken(value, \"ident\", \"else\");\n}\n\nfunction isValidIfFunction(argumentsList: unknown[]): boolean {\n const tokens = significantTokens(argumentsList);\n const branches: unknown[][] = [[]];\n for (const token of tokens) {\n if (isToken(token, \"semicolon\")) {\n branches.push([]);\n continue;\n }\n branches[branches.length - 1]?.push(token);\n }\n\n if (branches.length === 0 || branches.some(branch => branch.length === 0)) {\n return false;\n }\n\n let hasCondition = false;\n for (let index = 0; index < branches.length; index += 1) {\n const branch = branches[index];\n if (!branch) return false;\n\n const colonIndex = branch.findIndex(token => isToken(token, \"colon\"));\n if (colonIndex <= 0 || colonIndex === branch.length - 1) return false;\n\n const condition = branch.slice(0, colonIndex);\n const isElse = condition.length === 1 && isElseToken(condition[0]);\n if (isElse) {\n if (index !== branches.length - 1) return false;\n continue;\n }\n\n if (!condition.some(isConditionFunction)) return false;\n hasCondition = true;\n }\n\n return hasCondition;\n}\n\ninterface SubstitutionAnalysis {\n found: boolean;\n valid: boolean;\n}\n\nfunction analyzeSubstitutions(value: unknown): SubstitutionAnalysis {\n if (Array.isArray(value)) {\n let found = false;\n for (const item of value) {\n const result = analyzeSubstitutions(item);\n found ||= result.found;\n if (!result.valid) return { found, valid: false };\n }\n return { found, valid: true };\n }\n\n if (!isUnknownRecord(value)) return { found: false, valid: true };\n\n let found = value.type === \"var\" || value.type === \"env\";\n const cssFunction = functionValue(value);\n if (cssFunction?.name === \"attr\") {\n found = true;\n if (!isValidAttrFunction(cssFunction.arguments)) {\n return { found, valid: false };\n }\n }\n if (cssFunction?.name === \"if\") {\n found = true;\n if (!isValidIfFunction(cssFunction.arguments)) {\n return { found, valid: false };\n }\n }\n\n for (const key in value) {\n if (!Object.hasOwn(value, key)) continue;\n const result = analyzeSubstitutions(value[key]);\n found ||= result.found;\n if (!result.valid) return { found, valid: false };\n }\n\n return { found, valid: true };\n}\n\nexport function serializeIdentifier(value: string): string {\n const characters = [...value];\n let result = \"\";\n\n for (let index = 0; index < characters.length; index += 1) {\n const character = characters[index];\n if (character === undefined) continue;\n const codePoint = character.codePointAt(0) ?? 0;\n\n if (codePoint === 0) {\n result += \"�\";\n continue;\n }\n if ((codePoint >= 1 && codePoint <= 31) || codePoint === 127) {\n result += `\\\\${codePoint.toString(16)} `;\n continue;\n }\n if (\n codePoint >= 48 &&\n codePoint <= 57 &&\n (index === 0 || (index === 1 && characters[0] === \"-\"))\n ) {\n result += `\\\\${codePoint.toString(16)} `;\n continue;\n }\n if (index === 0 && character === \"-\" && characters.length === 1) {\n result += \"\\\\-\";\n continue;\n }\n if (\n codePoint >= 128 ||\n character === \"-\" ||\n character === \"_\" ||\n (codePoint >= 48 && codePoint <= 57) ||\n (codePoint >= 65 && codePoint <= 90) ||\n (codePoint >= 97 && codePoint <= 122)\n ) {\n result += character;\n continue;\n }\n result += `\\\\${character}`;\n }\n\n return result;\n}\n\nfunction containsPriorityDelimiter(value: string): boolean {\n let found = false;\n csstree.tokenize(value, (type, start, end) => {\n if (csstree.tokenNames[type] !== \"delim-token\") return;\n if (value.slice(start, end) === \"!\") found = true;\n });\n return found;\n}\n\nfunction canonicalizeLeadingDecimal(value: string): string {\n const replacements: Array<{ start: number; end: number; value: string }> = [];\n csstree.tokenize(value, (type, start, end) => {\n const tokenName = csstree.tokenNames[type];\n if (tokenName === undefined || ![\n \"number-token\",\n \"percentage-token\",\n \"dimension-token\",\n ].includes(tokenName)) return;\n const token = value.slice(start, end);\n const normalized = token.replace(/^([+-]?)\\.(\\d)/, \"$10.$2\");\n if (normalized !== token) replacements.push({ start, end, value: normalized });\n });\n\n let result = value;\n for (let index = replacements.length - 1; index >= 0; index -= 1) {\n const replacement = replacements[index];\n if (!replacement) continue;\n result = `${result.slice(0, replacement.start)}${replacement.value}${result.slice(replacement.end)}`;\n }\n return result;\n}\n\nexport function parsePropertyValue(\n name: string,\n observableValue: string,\n): ParsedPropertyValue | null {\n if (name === \"--\") return null;\n if (!name.startsWith(\"--\") && !chromiumSupportedProperties.has(name)) {\n return null;\n }\n if (containsPriorityDelimiter(observableValue)) return null;\n\n let declaration: unknown;\n\n try {\n const result = transformStyleAttribute({\n code: encoder.encode(\n `${name.startsWith(\"--\") ? serializeIdentifier(name) : name}: ${observableValue}`,\n ),\n visitor: {\n Declaration(candidate) {\n declaration = candidate;\n },\n },\n });\n\n if (!isUnknownRecord(declaration)) return null;\n if (!Object.hasOwn(declaration, \"property\")) return null;\n\n const pendingSubstitution = declaration.property === \"unparsed\";\n if (pendingSubstitution) {\n const analysis = analyzeSubstitutions(declaration);\n if (!analysis.found || !analysis.valid) return null;\n }\n\n const serialized = decoder.decode(result.code);\n const colonIndex = serialized.indexOf(\":\");\n if (colonIndex === -1) return null;\n\n const trimmedObservableValue = canonicalizeLeadingDecimal(observableValue.trim());\n return {\n observableValue:\n trimmedObservableValue === \"0\" && zeroLengthProperties.has(name)\n ? \"0px\"\n : trimmedObservableValue,\n safeValue: serialized.slice(colonIndex + 1).trim(),\n pendingSubstitution,\n };\n } catch {\n return null;\n }\n}\nexport function parseAtruleDescriptorValue(\n atrule: string,\n name: string,\n observableValue: string,\n): ParsedPropertyValue | null {\n if (containsPriorityDelimiter(observableValue)) return null;\n\n try {\n const match = csstree.lexer.matchAtruleDescriptor(\n atrule,\n name,\n observableValue,\n );\n if (match.error) return null;\n\n const prelude = atrule === \"counter-style\" ? \" sheetom\" : \"\";\n const result = transform({\n filename: \"sheetom-descriptor.css\",\n code: encoder.encode(`@${atrule}${prelude} { ${name}: ${observableValue}; }`),\n });\n const serializedSheet = decoder.decode(result.code);\n const parsed = csstree.parse(serializedSheet, { positions: true });\n if (parsed.type !== \"StyleSheet\") return null;\n const rule = parsed.children.first;\n if (rule?.type !== \"Atrule\" || !rule.block) return null;\n const declaration = rule.block.children.first;\n if (declaration?.type !== \"Declaration\") return null;\n const valueLocation = declaration.value.loc;\n const serializedValue = valueLocation\n ? serializedSheet.slice(valueLocation.start.offset, valueLocation.end.offset)\n : csstree.generate(declaration.value);\n return {\n observableValue: serializedValue,\n safeValue: serializedValue,\n pendingSubstitution: false,\n };\n } catch {\n return null;\n }\n}\n","let internalConstructionDepth = 0;\n\nexport function constructInternally<T>(factory: () => T): T {\n internalConstructionDepth += 1;\n try {\n return factory();\n } finally {\n internalConstructionDepth -= 1;\n }\n}\n\nexport function assertInternalConstructor(name: string): void {\n if (internalConstructionDepth > 0) return;\n throw new TypeError(`Failed to construct '${name}': Illegal constructor`);\n}\n","import { transform } from \"lightningcss\";\nimport * as csstree from \"css-tree\";\nimport {\n DeclarationBlock,\n type ParsedDeclaration,\n type ParsedPropertyValue,\n} from \"./internal/declaration-block.js\";\nimport { scanTopLevelRules } from \"./internal/css-rule-scanner.js\";\nimport { RuleTree } from \"./internal/rule-tree.js\";\nimport {\n Serializer,\n type RuleSerializationPlan,\n} from \"./internal/serializer.js\";\nimport {\n expandStaticFourSide,\n expandStaticShorthand,\n getShorthandLonghands,\n isFourSideShorthand,\n} from \"./internal/shorthand-registry.js\";\nimport {\n parseAtruleDescriptorValue,\n parsePropertyValue,\n serializeIdentifier,\n} from \"./internal/value-gate.js\";\nimport {\n assertInternalConstructor,\n constructInternally,\n} from \"./internal/webidl-construction.js\";\n\nimport {\n chromiumSupportedProperties,\n} from \"./chromium-properties.js\";\n\nconst encoder = new TextEncoder();\nconst decoder = new TextDecoder();\nconst arrayIndexPattern = /^(0|[1-9]\\d*)$/;\nconst regularSheetMetadata = new WeakMap<\n object,\n { href: string | null; baseURL: string }\n>();\nconst ruleParentage = new WeakMap<\n object,\n { parentRule: CSSRule | null; parentStyleSheet: CSSStyleSheet | null }\n>();\nconst unsignedLongRange = 2 ** 32;\nconst pageMarginRuleNames = new Set([\n \"top-left-corner\",\n \"top-left\",\n \"top-center\",\n \"top-right\",\n \"top-right-corner\",\n \"right-top\",\n \"right-middle\",\n \"right-bottom\",\n \"bottom-right-corner\",\n \"bottom-right\",\n \"bottom-center\",\n \"bottom-left\",\n \"bottom-left-corner\",\n \"left-bottom\",\n \"left-middle\",\n \"left-top\",\n]);\n\n/** A structured explanation for an ignored or recovered mutation. */\nexport interface SheetOMDiagnostic {\n code: string;\n severity: \"warning\";\n operation: \"setProperty\";\n message: string;\n property: string;\n input: string;\n location: null;\n}\n\n/** Options for a constructed SheetOM stylesheet. */\nexport interface CSSStyleSheetOptions {\n baseURL?: string;\n media?: string;\n disabled?: boolean;\n diagnostics?: boolean;\n}\n\n/** Options for forgiving parsing of an existing regular stylesheet. */\nexport interface ParseStyleSheetOptions extends CSSStyleSheetOptions {\n href?: string;\n}\n\ntype ReportDiagnostic = (diagnostic: SheetOMDiagnostic) => void;\n\nconst ignoreDiagnostic: ReportDiagnostic = () => {};\nconst ruleDiagnostics = new WeakMap<CSSRule, ReportDiagnostic>();\nconst ruleTree = new RuleTree<CSSRule, CSSStyleSheet>(\n (rule, parentRule, parentStyleSheet) => {\n ruleParentage.set(rule, { parentRule, parentStyleSheet });\n },\n rule => rule.parentStyleSheet,\n);\nconst safeSerializer = new Serializer<CSSRule>(describeRuleSafe);\n\nfunction parseDeclarationValue(\n declaration: CSSStyleDeclaration,\n name: string,\n observableValue: string,\n): ParsedPropertyValue | null {\n const atrule = declaration.parentRule instanceof CSSFontFaceRule\n ? \"font-face\"\n : null;\n if (atrule) return parseAtruleDescriptorValue(atrule, name, observableValue);\n return parsePropertyValue(name, observableValue);\n}\n\nfunction namedPropertyToCSS(property: string): string {\n if (property === \"cssFloat\") return \"float\";\n\n let cssName = property.replace(/[A-Z]/g, character => `-${character.toLowerCase()}`);\n if (/^(webkit|moz|ms|o)-/.test(cssName)) cssName = `-${cssName}`;\n return cssName;\n}\n\nfunction normalizeSelectorText(value: string): string | null {\n let parsed: csstree.CssNode;\n try {\n parsed = csstree.parse(value, { context: \"selectorList\" });\n } catch {\n return null;\n }\n if (parsed.type !== \"SelectorList\" || parsed.children.isEmpty) return null;\n\n try {\n const generated = csstree.generate(parsed);\n const result = transform({\n filename: \"sheetom-selector.css\",\n code: encoder.encode(`${generated} { --sheetom-probe: 0; }`),\n });\n const serialized = decoder.decode(result.code);\n const blockIndex = serialized.indexOf(\" {\");\n if (blockIndex === -1) return null;\n return serialized.slice(0, blockIndex);\n } catch {\n return null;\n }\n}\n\nfunction toUnsignedLong(value: unknown): number {\n const number = Number(value);\n if (!Number.isFinite(number) || number === 0) return 0;\n\n const integer = Math.trunc(number);\n return ((integer % unsignedLongRange) + unsignedLongRange) % unsignedLongRange;\n}\n\nfunction requireArguments(\n actual: number,\n required: number,\n interfaceName: string,\n operation: string,\n): void {\n if (actual >= required) return;\n const noun = required === 1 ? \"argument\" : \"arguments\";\n throw new TypeError(\n `Failed to execute '${operation}' on '${interfaceName}': ${required} ${noun} required, but only ${actual} present.`,\n );\n}\n\nfunction lockOwnProperties(target: object, ...properties: string[]): void {\n for (const property of properties) {\n const descriptor = Object.getOwnPropertyDescriptor(target, property);\n if (!descriptor || !(\"value\" in descriptor)) continue;\n Object.defineProperty(target, property, { ...descriptor, writable: false });\n }\n}\n\n/** Base class for live stylesheet rules. */\nexport class CSSRule {\n static readonly STYLE_RULE = 1;\n static readonly CHARSET_RULE = 2;\n static readonly IMPORT_RULE = 3;\n static readonly MEDIA_RULE = 4;\n static readonly FONT_FACE_RULE = 5;\n static readonly PAGE_RULE = 6;\n static readonly KEYFRAMES_RULE = 7;\n static readonly KEYFRAME_RULE = 8;\n static readonly MARGIN_RULE = 9;\n static readonly NAMESPACE_RULE = 10;\n static readonly COUNTER_STYLE_RULE = 11;\n static readonly SUPPORTS_RULE = 12;\n static readonly FONT_FEATURE_VALUES_RULE = 14;\n\n declare readonly STYLE_RULE: 1;\n declare readonly CHARSET_RULE: 2;\n declare readonly IMPORT_RULE: 3;\n declare readonly MEDIA_RULE: 4;\n declare readonly FONT_FACE_RULE: 5;\n declare readonly PAGE_RULE: 6;\n declare readonly KEYFRAMES_RULE: 7;\n declare readonly KEYFRAME_RULE: 8;\n declare readonly MARGIN_RULE: 9;\n declare readonly NAMESPACE_RULE: 10;\n declare readonly COUNTER_STYLE_RULE: 11;\n declare readonly SUPPORTS_RULE: 12;\n declare readonly FONT_FEATURE_VALUES_RULE: 14;\n\n readonly #type: number;\n\n protected constructor(type: number) {\n assertInternalConstructor(new.target.name);\n this.#type = type;\n ruleParentage.set(this, { parentRule: null, parentStyleSheet: null });\n }\n\n get parentRule(): CSSRule | null {\n return ruleParentage.get(this)?.parentRule ?? null;\n }\n\n get type(): number {\n return this.#type;\n }\n\n get parentStyleSheet(): CSSStyleSheet | null {\n return ruleParentage.get(this)?.parentStyleSheet ?? null;\n }\n\n get cssText(): string {\n return \"\";\n }\n\n set cssText(_value: string) {}\n}\n\nfor (const [name, value] of Object.entries({\n STYLE_RULE: CSSRule.STYLE_RULE,\n CHARSET_RULE: CSSRule.CHARSET_RULE,\n IMPORT_RULE: CSSRule.IMPORT_RULE,\n MEDIA_RULE: CSSRule.MEDIA_RULE,\n FONT_FACE_RULE: CSSRule.FONT_FACE_RULE,\n PAGE_RULE: CSSRule.PAGE_RULE,\n KEYFRAMES_RULE: CSSRule.KEYFRAMES_RULE,\n KEYFRAME_RULE: CSSRule.KEYFRAME_RULE,\n MARGIN_RULE: CSSRule.MARGIN_RULE,\n NAMESPACE_RULE: CSSRule.NAMESPACE_RULE,\n COUNTER_STYLE_RULE: CSSRule.COUNTER_STYLE_RULE,\n SUPPORTS_RULE: CSSRule.SUPPORTS_RULE,\n FONT_FEATURE_VALUES_RULE: CSSRule.FONT_FEATURE_VALUES_RULE,\n})) {\n Object.defineProperty(CSSRule.prototype, name, {\n value,\n writable: false,\n enumerable: true,\n configurable: false,\n });\n}\n\n/** A stable, live, indexed collection of rules. */\nexport class CSSRuleList {\n readonly [index: number]: CSSRule | undefined;\n\n readonly #rules: CSSRule[];\n\n /** @internal */\n constructor(rules: CSSRule[]) {\n assertInternalConstructor(\"CSSRuleList\");\n this.#rules = rules;\n\n return new Proxy(this, {\n get(target, property) {\n if (typeof property !== \"string\" || !arrayIndexPattern.test(property)) {\n const result = Reflect.get(target, property, target);\n return typeof result === \"function\" ? result.bind(target) : result;\n }\n\n return target.#rules[Number(property)];\n },\n set(target, property, value) {\n if (typeof property === \"string\" && arrayIndexPattern.test(property)) return false;\n return Reflect.set(target, property, value, target);\n },\n });\n }\n\n get length(): number {\n return this.#rules.length;\n }\n\n item(index: number): CSSRule | null {\n requireArguments(arguments.length, 1, \"CSSRuleList\", \"item\");\n return this.#rules[toUnsignedLong(index)] ?? null;\n }\n}\n\nfunction normalizeMediaText(value: string): string | null {\n try {\n const result = transform({\n filename: \"sheetom-media.css\",\n code: encoder.encode(`@media ${value} { .sheetom-probe { --sheetom: 0; } }`),\n });\n const serialized = decoder.decode(result.code);\n const blockIndex = serialized.indexOf(\"{\");\n if (!serialized.startsWith(\"@media \") || blockIndex === -1) return null;\n return serialized.slice(\"@media \".length, blockIndex).trim();\n } catch {\n return null;\n }\n}\n\nfunction normalizeConditionalPrelude(name: \"supports\" | \"container\", value: string): string {\n try {\n const result = transform({\n filename: `sheetom-${name}.css`,\n code: encoder.encode(`@${name} ${value} { .sheetom-probe { --sheetom: 0; } }`),\n });\n const serialized = decoder.decode(result.code);\n const blockIndex = serialized.indexOf(\"{\");\n const prefix = `@${name} `;\n if (!serialized.startsWith(prefix) || blockIndex === -1) return value;\n return serialized.slice(prefix.length, blockIndex).trim();\n } catch {\n return value;\n }\n}\n\nfunction splitMediaQueries(value: string): string[] {\n const queries: string[] = [];\n let start = 0;\n let depth = 0;\n for (let index = 0; index < value.length; index += 1) {\n const character = value[index];\n if (character === \"(\") depth += 1;\n if (character === \")\" && depth > 0) depth -= 1;\n if (character !== \",\" || depth !== 0) continue;\n queries.push(value.slice(start, index).trim());\n start = index + 1;\n }\n queries.push(value.slice(start).trim());\n return queries.filter(query => query !== \"\");\n}\n\n/** A live serialized list of media queries. */\nexport class MediaList {\n readonly [index: number]: string | undefined;\n\n #mediaText: string;\n\n constructor(mediaText = \"\") {\n assertInternalConstructor(\"MediaList\");\n const input = `${mediaText}`.trim();\n this.#mediaText = input === \"\" ? \"\" : normalizeMediaText(input) ?? \"not all\";\n\n return new Proxy(this, {\n get(target, property) {\n if (typeof property !== \"string\" || !arrayIndexPattern.test(property)) {\n const result = Reflect.get(target, property, target);\n return typeof result === \"function\" ? result.bind(target) : result;\n }\n return target.item(Number(property)) || undefined;\n },\n set(target, property, value) {\n if (typeof property === \"string\" && arrayIndexPattern.test(property)) return false;\n return Reflect.set(target, property, value, target);\n },\n });\n }\n\n get mediaText(): string {\n return this.#mediaText;\n }\n\n set mediaText(value: string) {\n const input = `${value}`.trim();\n if (input === \"\") {\n this.#mediaText = \"\";\n return;\n }\n const normalized = normalizeMediaText(input);\n this.#mediaText = normalized ?? \"not all\";\n }\n\n get length(): number {\n return splitMediaQueries(this.#mediaText).length;\n }\n\n item(index: number): string | null {\n requireArguments(arguments.length, 1, \"MediaList\", \"item\");\n return splitMediaQueries(this.#mediaText)[toUnsignedLong(index)] ?? null;\n }\n\n appendMedium(medium: string): void {\n requireArguments(arguments.length, 1, \"MediaList\", \"appendMedium\");\n const normalized = normalizeMediaText(`${medium}`);\n if (!normalized) return;\n const existing = splitMediaQueries(this.#mediaText);\n if (existing.includes(normalized)) return;\n this.#mediaText = [...existing, normalized].join(\", \");\n }\n\n deleteMedium(medium: string): void {\n requireArguments(arguments.length, 1, \"MediaList\", \"deleteMedium\");\n const normalized = normalizeMediaText(`${medium}`);\n const existing = splitMediaQueries(this.#mediaText);\n const index = normalized ? existing.indexOf(normalized) : -1;\n if (index === -1) {\n throw new DOMException(\"The medium was not found.\", \"NotFoundError\");\n }\n existing.splice(index, 1);\n this.#mediaText = existing.join(\", \");\n }\n}\n\nfunction indentRuleText(value: string): string {\n return value.split(\"\\n\").map(line => ` ${line}`).join(\"\\n\");\n}\n\n/** A rule containing a live nested rule list. */\nexport class CSSGroupingRule extends CSSRule {\n readonly cssRules: CSSRuleList;\n\n protected constructor(type: number) {\n super(type);\n const rules = ruleTree.createChildren(this);\n this.cssRules = new CSSRuleList(rules);\n lockOwnProperties(this, \"cssRules\");\n }\n\n insertRule(ruleText: string, index = 0): number {\n requireArguments(arguments.length, 1, this.constructor.name, \"insertRule\");\n const rules = ruleTree.children(this);\n const normalizedIndex = toUnsignedLong(index);\n if (normalizedIndex > rules.length) {\n throw new DOMException(\"The index is outside the allowed range.\", \"IndexSizeError\");\n }\n\n const input = `${ruleText}`;\n if (!(this instanceof CSSPageRule) && parsedAtRuleName(input) === \"import\") {\n throw new DOMException(\n \"@import rules cannot be inserted inside a group rule.\",\n \"HierarchyRequestError\",\n );\n }\n\n const rule = parseStrictRule(\n input,\n ruleDiagnostics.get(this) ?? ignoreDiagnostic,\n false,\n this,\n );\n if (!rule) throw new DOMException(\"The rule could not be parsed.\", \"SyntaxError\");\n\n if (\n this instanceof CSSStyleRule &&\n rule instanceof CSSStyleRule &&\n !rule.selectorText.trimStart().startsWith(\"&\")\n ) {\n rule.selectorText = `& ${rule.selectorText}`;\n }\n\n rules.splice(normalizedIndex, 0, rule);\n attachRuleTree(rule, this, this.parentStyleSheet);\n return normalizedIndex;\n }\n\n deleteRule(index: number): void {\n requireArguments(arguments.length, 1, this.constructor.name, \"deleteRule\");\n const rules = ruleTree.children(this);\n const normalizedIndex = toUnsignedLong(index);\n if (normalizedIndex >= rules.length) {\n throw new DOMException(\"The index is outside the allowed range.\", \"IndexSizeError\");\n }\n const [removed] = rules.splice(normalizedIndex, 1);\n if (removed) attachRuleTree(removed, null, null);\n }\n\n protected serializeGroup(header: string): string {\n const rules = ruleTree.children(this);\n if (rules.length === 0) return `${header} { }`;\n return `${header} {\\n${rules.map(rule => indentRuleText(rule.cssText)).join(\"\\n\")}\\n}`;\n }\n}\n\n/** A grouping rule controlled by a serialized condition. */\nexport class CSSConditionRule extends CSSGroupingRule {\n readonly #conditionText: string;\n\n protected constructor(type: number, conditionText: string) {\n super(type);\n this.#conditionText = conditionText;\n }\n\n get conditionText(): string {\n return this.#conditionText;\n }\n}\n\n/** A live `@media` rule. */\nexport class CSSMediaRule extends CSSConditionRule {\n readonly media: MediaList;\n\n constructor(conditionText: string) {\n const media = new MediaList(conditionText);\n super(CSSRule.MEDIA_RULE, media.mediaText);\n this.media = media;\n lockOwnProperties(this, \"media\");\n }\n\n override get conditionText(): string {\n return this.media.mediaText;\n }\n\n override get cssText(): string {\n return this.serializeGroup(`@media ${this.media.mediaText}`);\n }\n\n set cssText(_value: string) {}\n}\n\n/** A live `@supports` rule. */\nexport class CSSSupportsRule extends CSSConditionRule {\n constructor(conditionText: string) {\n super(CSSRule.SUPPORTS_RULE, normalizeConditionalPrelude(\"supports\", conditionText));\n }\n\n override get cssText(): string {\n return this.serializeGroup(`@supports ${this.conditionText}`);\n }\n\n set cssText(_value: string) {}\n}\n\n/** A live `@container` rule. */\nexport class CSSContainerRule extends CSSConditionRule {\n readonly containerName: string;\n readonly containerQuery: string;\n\n constructor(conditionText: string) {\n const normalizedCondition = normalizeConditionalPrelude(\"container\", conditionText);\n super(0, normalizedCondition);\n const openingParenthesis = normalizedCondition.indexOf(\"(\");\n this.containerName = openingParenthesis === -1\n ? \"\"\n : normalizedCondition.slice(0, openingParenthesis).trim();\n this.containerQuery = openingParenthesis === -1\n ? normalizedCondition\n : normalizedCondition.slice(openingParenthesis).trim();\n lockOwnProperties(this, \"containerName\", \"containerQuery\");\n }\n\n override get cssText(): string {\n return this.serializeGroup(`@container ${this.conditionText}`);\n }\n\n set cssText(_value: string) {}\n}\n\n/** A live block-form `@layer` rule. */\nexport class CSSLayerBlockRule extends CSSGroupingRule {\n readonly name: string;\n\n constructor(name: string) {\n super(0);\n this.name = name;\n lockOwnProperties(this, \"name\");\n }\n\n override get cssText(): string {\n return this.serializeGroup(`@layer${this.name === \"\" ? \"\" : ` ${this.name}`}`);\n }\n\n set cssText(_value: string) {}\n}\n\n/** A live `@scope` rule. */\nexport class CSSScopeRule extends CSSGroupingRule {\n readonly start: string | null;\n readonly end: string | null;\n\n constructor(start: string | null, end: string | null) {\n super(0);\n this.start = start;\n this.end = end;\n lockOwnProperties(this, \"start\", \"end\");\n }\n\n override get cssText(): string {\n const start = this.start === null ? \"\" : ` (${this.start})`;\n const end = this.end === null ? \"\" : ` to (${this.end})`;\n return this.serializeGroup(`@scope${start}${end}`);\n }\n\n set cssText(_value: string) {}\n}\n\n/** A live `@starting-style` rule. */\nexport class CSSStartingStyleRule extends CSSGroupingRule {\n constructor() {\n super(0);\n }\n\n override get cssText(): string {\n return this.serializeGroup(\"@starting-style\");\n }\n\n set cssText(_value: string) {}\n}\n\n/** A non-loading `@import` rule with mutable media. */\nexport class CSSImportRule extends CSSRule {\n readonly media: MediaList;\n readonly styleSheet: null = null;\n readonly layerName: string | null;\n readonly supportsText: string | null;\n readonly #rawHref: string;\n\n constructor(\n href: string,\n mediaText = \"\",\n layerName: string | null = null,\n supportsText: string | null = null,\n ) {\n super(CSSRule.IMPORT_RULE);\n this.#rawHref = href;\n this.media = new MediaList(mediaText);\n this.layerName = layerName;\n this.supportsText = supportsText;\n lockOwnProperties(this, \"media\", \"styleSheet\", \"layerName\", \"supportsText\");\n }\n\n get href(): string {\n const baseURL = this.parentStyleSheet?.baseURL;\n if (!baseURL || baseURL === \"about:blank\") return this.#rawHref;\n try {\n return new URL(this.#rawHref, baseURL).href;\n } catch {\n return this.#rawHref;\n }\n }\n\n override get cssText(): string {\n const href = this.#rawHref.replace(/[\"\\\\]/g, character => `\\\\${character}`);\n const layer = this.layerName === null\n ? \"\"\n : this.layerName === \"\"\n ? \" layer\"\n : ` layer(${this.layerName})`;\n const supports = this.supportsText === null\n ? \"\"\n : ` supports(${this.supportsText})`;\n const media = this.media.mediaText === \"\" ? \"\" : ` ${this.media.mediaText}`;\n return `@import url(\"${href}\")${layer}${supports}${media};`;\n }\n\n set cssText(_value: string) {}\n}\n\nclass CSSGenericRule extends CSSRule {\n readonly #cssText: string;\n\n constructor(type: number, cssText: string) {\n super(type);\n this.#cssText = cssText;\n }\n\n override get cssText(): string {\n return this.#cssText;\n }\n\n set cssText(_value: string) {}\n}\n\nclass CSSOpaqueRule extends CSSGenericRule {}\n\n/** A live declaration block with indexed, named, and method-based access. */\nexport class CSSStyleDeclaration {\n readonly [index: number]: string | undefined;\n\n readonly parentRule: CSSRule;\n readonly #block: DeclarationBlock;\n\n constructor(parentRule: CSSRule) {\n assertInternalConstructor(\"CSSStyleDeclaration\");\n this.parentRule = parentRule;\n lockOwnProperties(this, \"parentRule\");\n this.#block = new DeclarationBlock(\n {\n parseValue: (name, value) => parseDeclarationValue(this, name, value),\n shorthandLonghands: getShorthandLonghands,\n expandFourSide: expandStaticFourSide,\n expandShorthand: expandStaticShorthand,\n serializeIdentifier,\n normalizeIndex: toUnsignedLong,\n isFourSideShorthand,\n },\n (code, property, input) => {\n const priority = code === \"INVALID_PRIORITY\";\n (ruleDiagnostics.get(this.parentRule) ?? ignoreDiagnostic)({\n code,\n severity: \"warning\",\n operation: \"setProperty\",\n message: priority\n ? `The mutation was ignored because ${input} is not a valid priority.`\n : `The value was ignored because it is invalid for ${property}.`,\n property,\n input,\n location: null,\n });\n },\n );\n\n return new Proxy(this, {\n get(target, property) {\n if (typeof property === \"string\" && arrayIndexPattern.test(property)) {\n return target.item(Number(property)) || undefined;\n }\n\n if (typeof property === \"string\" && !Reflect.has(target, property)) {\n return target.getPropertyValue(namedPropertyToCSS(property));\n }\n\n const result = Reflect.get(target, property, target);\n return typeof result === \"function\" ? result.bind(target) : result;\n },\n set(target, property, value) {\n if (typeof property === \"string\" && !Reflect.has(target, property)) {\n Reflect.apply(target.setProperty, target, [namedPropertyToCSS(property), value]);\n return true;\n }\n\n return Reflect.set(target, property, value, target);\n },\n });\n }\n\n get cssText(): string {\n return this.#block.serialize(false, \"\", \" \");\n }\n\n set cssText(value: string) {\n let parsed: csstree.CssNode;\n try {\n parsed = csstree.parse(`${value}`, { context: \"declarationList\" });\n } catch {\n this.#block.replace(null);\n return;\n }\n\n if (parsed.type !== \"DeclarationList\") {\n this.#block.replace(null);\n return;\n }\n\n const declarations: ParsedDeclaration[] = [];\n for (const child of parsed.children) {\n if (child.type !== \"Declaration\") continue;\n declarations.push({\n name: child.property,\n value: csstree.generate(child.value),\n important: child.important === true || child.important === \"important\",\n });\n }\n this.#block.replace(declarations);\n }\n\n get length(): number {\n return this.#block.length;\n }\n\n item(index: number): string {\n requireArguments(arguments.length, 1, \"CSSStyleDeclaration\", \"item\");\n return this.#block.item(index);\n }\n\n getPropertyValue(name: string): string {\n requireArguments(arguments.length, 1, \"CSSStyleDeclaration\", \"getPropertyValue\");\n return this.#block.getPropertyValue(`${name}`);\n }\n\n getPropertyPriority(name: string): string {\n requireArguments(arguments.length, 1, \"CSSStyleDeclaration\", \"getPropertyPriority\");\n return this.#block.getPropertyPriority(`${name}`);\n }\n\n setProperty(name: string, value: string | null, priority = \"\"): void {\n requireArguments(arguments.length, 2, \"CSSStyleDeclaration\", \"setProperty\");\n const stringName = `${name}`;\n const stringValue = value === null ? \"\" : `${value}`;\n const stringPriority = priority === null ? \"\" : `${priority}`;\n this.#block.setProperty(stringName, stringValue, stringPriority);\n }\n\n removeProperty(name: string): string {\n requireArguments(arguments.length, 1, \"CSSStyleDeclaration\", \"removeProperty\");\n return this.#block.removeProperty(`${name}`);\n }\n\n /** @internal */\n serializeSafe(indent: string): string {\n return this.#block.serialize(true, indent, \"\\n\");\n }\n}\n\n/** A live `@font-face` descriptor rule. */\nexport class CSSFontFaceRule extends CSSRule {\n readonly style: CSSStyleDeclaration;\n\n constructor() {\n super(CSSRule.FONT_FACE_RULE);\n this.style = new CSSStyleDeclaration(this);\n lockOwnProperties(this, \"style\");\n }\n\n override get cssText(): string {\n return `@font-face {${this.style.cssText === \"\" ? \"\" : ` ${this.style.cssText}`} }`;\n }\n\n set cssText(_value: string) {}\n}\n\n/** Declarations ordered after a nested style rule. */\nexport class CSSNestedDeclarations extends CSSRule {\n readonly #style: CSSStyleDeclaration;\n\n constructor() {\n super(0);\n this.#style = new CSSStyleDeclaration(this);\n }\n\n get style(): CSSStyleDeclaration {\n return this.#style;\n }\n\n set style(cssText: string) {\n this.#style.cssText = `${cssText}`;\n }\n\n override get cssText(): string {\n return this.style.cssText;\n }\n\n set cssText(_value: string) {}\n}\n\n/** A page-margin rule nested inside `CSSPageRule`. */\nexport class CSSMarginRule extends CSSRule {\n readonly name: string;\n readonly style: CSSStyleDeclaration;\n\n constructor(name: string) {\n super(CSSRule.MARGIN_RULE);\n this.name = name;\n this.style = new CSSStyleDeclaration(this);\n lockOwnProperties(this, \"name\", \"style\");\n }\n\n override get cssText(): string {\n return `@${this.name} {${this.style.cssText === \"\" ? \"\" : ` ${this.style.cssText}`} }`;\n }\n\n set cssText(_value: string) {}\n}\n\n/** A live `@page` rule with declarations and margin rules. */\nexport class CSSPageRule extends CSSGroupingRule {\n readonly style: CSSStyleDeclaration;\n #selectorText: string;\n\n constructor(selectorText: string) {\n super(CSSRule.PAGE_RULE);\n this.#selectorText = selectorText;\n this.style = new CSSStyleDeclaration(this);\n lockOwnProperties(this, \"style\");\n }\n\n get selectorText(): string {\n return this.#selectorText;\n }\n\n set selectorText(value: string) {\n this.#selectorText = `${value}`.trim();\n }\n\n override get cssText(): string {\n const contents: string[] = [];\n if (this.style.cssText !== \"\") contents.push(this.style.cssText);\n for (const child of ruleTree.children(this)) contents.push(child.cssText);\n const selector = this.selectorText === \"\" ? \"\" : ` ${this.selectorText}`;\n return `@page${selector} {${contents.length === 0 ? \"\" : ` ${contents.join(\" \")}`} }`;\n }\n\n set cssText(_value: string) {}\n}\n\n/** A live `@position-try` declaration rule. */\nexport class CSSPositionTryRule extends CSSRule {\n readonly name: string;\n readonly style: CSSStyleDeclaration;\n\n constructor(name: string) {\n super(0);\n this.name = name;\n this.style = new CSSStyleDeclaration(this);\n lockOwnProperties(this, \"name\", \"style\");\n }\n\n override get cssText(): string {\n return `@position-try ${this.name} {${this.style.cssText === \"\" ? \"\" : ` ${this.style.cssText}`} }`;\n }\n\n set cssText(_value: string) {}\n}\n\nfunction normalizeKeyText(value: string): string | null {\n const parts = value.split(\",\").map(part => part.trim());\n if (parts.length === 0 || parts.some(part => part === \"\")) return null;\n const normalized: string[] = [];\n for (const part of parts) {\n const lower = part.toLowerCase();\n if (lower === \"from\") {\n normalized.push(\"0%\");\n continue;\n }\n if (lower === \"to\") {\n normalized.push(\"100%\");\n continue;\n }\n const match = lower.match(/^([+-]?(?:\\d+(?:\\.\\d*)?|\\.\\d+))%$/);\n if (!match) return null;\n const percentage = Number(match[1]);\n if (percentage < 0 || percentage > 100) return null;\n normalized.push(`${percentage}%`);\n }\n return normalized.join(\", \");\n}\n\n/** One mutable keyframe selector and declaration block. */\nexport class CSSKeyframeRule extends CSSRule {\n readonly style: CSSStyleDeclaration;\n #keyText: string;\n\n constructor(keyText: string) {\n super(CSSRule.KEYFRAME_RULE);\n this.#keyText = normalizeKeyText(keyText) ?? keyText;\n this.style = new CSSStyleDeclaration(this);\n lockOwnProperties(this, \"style\");\n }\n\n get keyText(): string {\n return this.#keyText;\n }\n\n set keyText(value: string) {\n const normalized = normalizeKeyText(`${value}`);\n if (normalized !== null) this.#keyText = normalized;\n }\n\n override get cssText(): string {\n return `${this.keyText} {${this.style.cssText === \"\" ? \"\" : ` ${this.style.cssText}`} }`;\n }\n\n set cssText(_value: string) {}\n}\n\n/** A mutable `@keyframes` rule. */\nexport class CSSKeyframesRule extends CSSRule {\n readonly cssRules: CSSRuleList;\n #name: string;\n\n constructor(name: string) {\n super(CSSRule.KEYFRAMES_RULE);\n this.#name = name;\n const rules = ruleTree.createChildren(this);\n this.cssRules = new CSSRuleList(rules);\n lockOwnProperties(this, \"cssRules\");\n }\n\n get name(): string {\n return this.#name;\n }\n\n set name(value: string) {\n this.#name = `${value}`;\n }\n\n get length(): number {\n return this.cssRules.length;\n }\n\n appendRule(ruleText: string): void {\n requireArguments(arguments.length, 1, \"CSSKeyframesRule\", \"appendRule\");\n const parsed = parseKeyframeRule(`${ruleText}`, ruleDiagnostics.get(this) ?? ignoreDiagnostic);\n if (!parsed) return;\n const rules = ruleTree.children(this);\n rules.push(parsed);\n attachRuleTree(parsed, this, this.parentStyleSheet);\n }\n\n deleteRule(select: string): void {\n requireArguments(arguments.length, 1, \"CSSKeyframesRule\", \"deleteRule\");\n const normalized = normalizeKeyText(`${select}`);\n if (normalized === null) return;\n const rules = ruleTree.children(this);\n let index = -1;\n for (let candidate = rules.length - 1; candidate >= 0; candidate -= 1) {\n const rule = rules[candidate];\n if (!(rule instanceof CSSKeyframeRule) || rule.keyText !== normalized) continue;\n index = candidate;\n break;\n }\n if (index === -1) return;\n const [removed] = rules.splice(index, 1);\n if (removed) attachRuleTree(removed, null, null);\n }\n\n findRule(select: string): CSSKeyframeRule | null {\n requireArguments(arguments.length, 1, \"CSSKeyframesRule\", \"findRule\");\n const normalized = normalizeKeyText(`${select}`);\n if (normalized === null) return null;\n const rules = ruleTree.children(this);\n for (let index = rules.length - 1; index >= 0; index -= 1) {\n const rule = rules[index];\n if (rule instanceof CSSKeyframeRule && rule.keyText === normalized) return rule;\n }\n return null;\n }\n\n override get cssText(): string {\n const rules = ruleTree.children(this);\n if (rules.length === 0) return `@keyframes ${this.name} { }`;\n return `@keyframes ${this.name} { \\n${rules.map(rule => indentRuleText(rule.cssText)).join(\"\\n\")}\\n}`;\n }\n\n set cssText(_value: string) {}\n}\n\nconst counterDescriptorNames = [\n \"system\",\n \"symbols\",\n \"additive-symbols\",\n \"negative\",\n \"prefix\",\n \"suffix\",\n \"range\",\n \"pad\",\n \"speak-as\",\n \"fallback\",\n] as const;\n\n/** A mutable `@counter-style` descriptor rule. */\nexport class CSSCounterStyleRule extends CSSRule {\n readonly #descriptors = new Map<string, string>();\n #name: string;\n\n constructor(name: string) {\n super(CSSRule.COUNTER_STYLE_RULE);\n this.#name = name;\n }\n\n get name(): string { return this.#name; }\n set name(value: string) { this.#name = `${value}`; }\n\n get system(): string { return this.#get(\"system\"); }\n set system(value: string) { this.#set(\"system\", value); }\n get symbols(): string { return this.#get(\"symbols\"); }\n set symbols(value: string) { this.#set(\"symbols\", value); }\n get additiveSymbols(): string { return this.#get(\"additive-symbols\"); }\n set additiveSymbols(value: string) { this.#set(\"additive-symbols\", value); }\n get negative(): string { return this.#get(\"negative\"); }\n set negative(value: string) { this.#set(\"negative\", value); }\n get prefix(): string { return this.#get(\"prefix\"); }\n set prefix(value: string) { this.#set(\"prefix\", value); }\n get suffix(): string { return this.#get(\"suffix\"); }\n set suffix(value: string) { this.#set(\"suffix\", value); }\n get range(): string { return this.#get(\"range\"); }\n set range(value: string) { this.#set(\"range\", value); }\n get pad(): string { return this.#get(\"pad\"); }\n set pad(value: string) { this.#set(\"pad\", value); }\n get speakAs(): string { return this.#get(\"speak-as\"); }\n set speakAs(value: string) { this.#set(\"speak-as\", value); }\n get fallback(): string { return this.#get(\"fallback\"); }\n set fallback(value: string) { this.#set(\"fallback\", value); }\n\n #get(name: string): string {\n return this.#descriptors.get(name) ?? \"\";\n }\n\n #set(name: string, value: string): void {\n const text = `${value}`;\n if (text === \"\") {\n this.#descriptors.delete(name);\n return;\n }\n const parsed = parseAtruleDescriptorValue(\"counter-style\", name, text);\n if (!parsed) return;\n this.#descriptors.set(name, parsed.observableValue);\n }\n\n /** @internal */\n setParsedDescriptor(name: string, value: string): void {\n if (!(counterDescriptorNames as readonly string[]).includes(name)) return;\n this.#set(name, value);\n }\n\n override get cssText(): string {\n const declarations: string[] = [];\n for (const name of counterDescriptorNames) {\n const value = this.#descriptors.get(name);\n if (value !== undefined) declarations.push(`${name}: ${value};`);\n }\n return `@counter-style ${this.name} {${declarations.length === 0 ? \"\" : ` ${declarations.join(\" \")}`} }`;\n }\n\n set cssText(_value: string) {}\n}\n\n/** A live map exposed by one font-feature-values category. */\nexport class CSSFontFeatureValuesMap implements Iterable<[string, number[]]> {\n readonly #values = new Map<string, number[]>();\n\n constructor() {\n assertInternalConstructor(\"CSSFontFeatureValuesMap\");\n }\n\n get size(): number {\n return this.#values.size;\n }\n\n set(featureValueName: string, values: number[]): this {\n const name = `${featureValueName}`;\n if (!/^[-_a-zA-Z][-_a-zA-Z0-9]*$/.test(name)) {\n throw new DOMException(\"The feature value name is invalid.\", \"SyntaxError\");\n }\n const normalized = Array.from(values, value => Math.trunc(Number(value)));\n if (normalized.some(value => !Number.isFinite(value) || value < 0)) {\n throw new TypeError(\"Feature values must be non-negative integers.\");\n }\n this.#values.set(name, normalized);\n return this;\n }\n\n clear(): void { this.#values.clear(); }\n delete(name: string): boolean { return this.#values.delete(`${name}`); }\n get(name: string): number[] | undefined {\n const value = this.#values.get(`${name}`);\n return value ? [...value] : undefined;\n }\n has(name: string): boolean { return this.#values.has(`${name}`); }\n entries(): MapIterator<[string, number[]]> {\n return new Map(\n [...this.#values].map(([name, values]) => [name, [...values]]),\n ).entries();\n }\n keys(): MapIterator<string> { return this.#values.keys(); }\n values(): MapIterator<number[]> {\n return new Map(\n [...this.#values].map(([name, values]) => [name, [...values]]),\n ).values();\n }\n forEach(\n callback: (value: number[], key: string, map: CSSFontFeatureValuesMap) => void,\n thisArg?: unknown,\n ): void {\n for (const [name, values] of this.#values) {\n callback.call(thisArg, [...values], name, this);\n }\n }\n [Symbol.iterator](): MapIterator<[string, number[]]> { return this.entries(); }\n}\n\nconst fontFeatureMapNames = [\n \"annotation\",\n \"ornaments\",\n \"stylistic\",\n \"swash\",\n \"character-variant\",\n \"styleset\",\n] as const;\n\n/** A mutable `@font-feature-values` rule. */\nexport class CSSFontFeatureValuesRule extends CSSRule {\n readonly annotation = new CSSFontFeatureValuesMap();\n readonly ornaments = new CSSFontFeatureValuesMap();\n readonly stylistic = new CSSFontFeatureValuesMap();\n readonly swash = new CSSFontFeatureValuesMap();\n readonly characterVariant = new CSSFontFeatureValuesMap();\n readonly styleset = new CSSFontFeatureValuesMap();\n #fontFamily: string;\n\n constructor(fontFamily: string) {\n super(CSSRule.FONT_FEATURE_VALUES_RULE);\n this.#fontFamily = fontFamily;\n lockOwnProperties(\n this,\n \"annotation\",\n \"ornaments\",\n \"stylistic\",\n \"swash\",\n \"characterVariant\",\n \"styleset\",\n );\n }\n\n get fontFamily(): string { return this.#fontFamily; }\n set fontFamily(value: string) { this.#fontFamily = `${value}`.trim(); }\n\n /** @internal */\n featureMap(name: string): CSSFontFeatureValuesMap | null {\n switch (name) {\n case \"annotation\": return this.annotation;\n case \"ornaments\": return this.ornaments;\n case \"stylistic\": return this.stylistic;\n case \"swash\": return this.swash;\n case \"character-variant\": return this.characterVariant;\n case \"styleset\": return this.styleset;\n default: return null;\n }\n }\n\n override get cssText(): string {\n const blocks: string[] = [];\n for (const name of fontFeatureMapNames) {\n const map = this.featureMap(name);\n if (!map || map.size === 0) continue;\n const declarations = [...map]\n .map(([key, values]) => `${key}: ${values.join(\" \")};`)\n .join(\" \");\n blocks.push(`@${name} { ${declarations} }`);\n }\n return `@font-feature-values ${this.fontFamily} {${blocks.length === 0 ? \"\" : ` ${blocks.join(\" \")}`} }`;\n }\n\n set cssText(_value: string) {}\n}\n\n/** A live style rule with declarations and nested rules. */\nexport class CSSStyleRule extends CSSGroupingRule {\n readonly style: CSSStyleDeclaration;\n #selectorText: string;\n\n constructor(selectorText: string) {\n super(CSSRule.STYLE_RULE);\n this.#selectorText = normalizeSelectorText(`${selectorText}`) ?? `${selectorText}`;\n this.style = new CSSStyleDeclaration(this);\n lockOwnProperties(this, \"style\");\n }\n\n get selectorText(): string {\n return this.#selectorText;\n }\n\n set selectorText(value: string) {\n const normalized = normalizeSelectorText(`${value}`);\n if (normalized === null) return;\n this.#selectorText = normalized;\n }\n\n override get cssText(): string {\n const declarations = this.style.cssText;\n const children = ruleTree.children(this);\n if (children.length === 0) {\n return declarations === \"\"\n ? `${this.selectorText} { }`\n : `${this.selectorText} { ${declarations} }`;\n }\n\n const contents: string[] = [];\n if (declarations !== \"\") contents.push(indentRuleText(declarations));\n for (const child of children) contents.push(indentRuleText(child.cssText));\n return `${this.selectorText} {\\n${contents.join(\"\\n\")}\\n}`;\n }\n\n set cssText(_value: string) {}\n\n}\n\nfunction createStyleRule(\n node: csstree.Rule,\n reportDiagnostic: ReportDiagnostic,\n): CSSStyleRule | null {\n const selectorText = normalizeSelectorText(csstree.generate(node.prelude));\n if (selectorText === null) return null;\n const rule = new CSSStyleRule(selectorText);\n ruleDiagnostics.set(rule, reportDiagnostic);\n let declarationNodes: csstree.Declaration[] = [];\n const childRules: CSSRule[] = [];\n let foundNestedRule = false;\n\n const flushDeclarations = (): void => {\n if (declarationNodes.length === 0) return;\n const declarationText = declarationNodes\n .map(child => csstree.generate(child))\n .join(\";\");\n if (!foundNestedRule) {\n rule.style.cssText = declarationText;\n declarationNodes = [];\n return;\n }\n\n const nestedDeclarations = new CSSNestedDeclarations();\n ruleDiagnostics.set(nestedDeclarations, reportDiagnostic);\n nestedDeclarations.style.cssText = declarationText;\n childRules.push(nestedDeclarations);\n declarationNodes = [];\n };\n\n for (const child of node.block.children) {\n if (child.type === \"Declaration\") {\n declarationNodes.push(child);\n continue;\n }\n if (child.type !== \"Rule\" && child.type !== \"Atrule\") continue;\n flushDeclarations();\n foundNestedRule = true;\n const parsedChild = createRuleFromNode(child, reportDiagnostic, true);\n if (parsedChild) childRules.push(parsedChild);\n }\n flushDeclarations();\n replaceGroupingRules(rule, childRules);\n return rule;\n}\n\nfunction declarationTextFromBlock(block: csstree.Block): string {\n const declarations: string[] = [];\n for (const child of block.children) {\n if (child.type === \"Declaration\") declarations.push(csstree.generate(child));\n }\n return declarations.join(\";\");\n}\n\nfunction generateDescriptorInput(value: csstree.Value | csstree.Raw): string {\n if (value.type === \"Raw\") return value.value;\n return value.children.toArray().map(child => csstree.generate(child)).join(\" \");\n}\n\nfunction createKeyframeRuleFromNode(\n node: csstree.Rule,\n reportDiagnostic: ReportDiagnostic,\n): CSSKeyframeRule {\n return constructInternally(() => {\n const rule = new CSSKeyframeRule(csstree.generate(node.prelude));\n ruleDiagnostics.set(rule, reportDiagnostic);\n rule.style.cssText = declarationTextFromBlock(node.block);\n return rule;\n });\n}\n\nfunction parseKeyframeRule(\n ruleText: string,\n reportDiagnostic: ReportDiagnostic,\n): CSSKeyframeRule | null {\n try {\n const parsed = csstree.parse(`@keyframes sheetom { ${ruleText} }`);\n if (parsed.type !== \"StyleSheet\") return null;\n const keyframes = parsed.children.first;\n if (keyframes?.type !== \"Atrule\" || !keyframes.block) return null;\n const node = keyframes.block.children.first;\n if (node?.type !== \"Rule\" || keyframes.block.children.size !== 1) return null;\n return createKeyframeRuleFromNode(node, reportDiagnostic);\n } catch {\n return null;\n }\n}\n\nfunction replaceKeyframeRules(rule: CSSKeyframesRule, rules: CSSKeyframeRule[]): void {\n ruleTree.replace(rule, rules);\n}\n\nfunction replaceGroupingRules(group: CSSGroupingRule, rules: CSSRule[]): void {\n ruleTree.replace(group, rules);\n}\n\nfunction attachRuleTree(\n rule: CSSRule,\n parentRule: CSSRule | null,\n parentStyleSheet: CSSStyleSheet | null,\n): void {\n ruleTree.attach(rule, parentRule, parentStyleSheet);\n}\n\nfunction serializeRuleSafe(rule: CSSRule): string {\n return safeSerializer.serialize(rule);\n}\n\nfunction describeRuleSafe(rule: CSSRule): RuleSerializationPlan<CSSRule> {\n if (rule instanceof CSSStyleRule) {\n return {\n kind: \"block\",\n header: rule.selectorText,\n declarations: rule.style.serializeSafe(\" \"),\n children: ruleTree.children(rule),\n };\n }\n if (rule instanceof CSSNestedDeclarations) {\n return { kind: \"declarations\", declarations: rule.style.serializeSafe(\"\") };\n }\n if (\n rule instanceof CSSFontFaceRule ||\n rule instanceof CSSMarginRule ||\n rule instanceof CSSPositionTryRule ||\n rule instanceof CSSKeyframeRule\n ) {\n const blockIndex = rule.cssText.indexOf(\"{\");\n const header = rule.cssText.slice(0, blockIndex).trimEnd();\n return {\n kind: \"block\",\n header,\n declarations: rule.style.serializeSafe(\" \"),\n };\n }\n if (rule instanceof CSSKeyframesRule) {\n return {\n kind: \"block\",\n header: `@keyframes ${rule.name}`,\n children: ruleTree.children(rule),\n };\n }\n if (rule instanceof CSSPageRule) {\n const selector = rule.selectorText === \"\" ? \"\" : ` ${rule.selectorText}`;\n return {\n kind: \"block\",\n header: `@page${selector}`,\n declarations: rule.style.serializeSafe(\" \"),\n children: ruleTree.children(rule),\n };\n }\n if (!(rule instanceof CSSGroupingRule)) {\n return { kind: \"raw\", cssText: rule.cssText };\n }\n\n const blockIndex = rule.cssText.indexOf(\"{\");\n const header = blockIndex === -1 ? rule.cssText : rule.cssText.slice(0, blockIndex).trimEnd();\n return { kind: \"block\", header, children: ruleTree.children(rule) };\n}\n\nfunction parseScopePrelude(prelude: string): [string | null, string | null] {\n const text = prelude.trim();\n if (text === \"\") return [null, null];\n\n const consumeGroup = (value: string): [string | null, string] => {\n if (!value.startsWith(\"(\")) return [null, value];\n let depth = 0;\n for (let index = 0; index < value.length; index += 1) {\n const character = value[index];\n if (character === \"(\") depth += 1;\n if (character !== \")\") continue;\n depth -= 1;\n if (depth !== 0) continue;\n return [value.slice(1, index).trim(), value.slice(index + 1).trim()];\n }\n return [null, value];\n };\n\n const [start, remainder] = consumeGroup(text);\n if (!remainder.startsWith(\"to\")) return [start, null];\n const [end] = consumeGroup(remainder.slice(2).trim());\n return [start, end];\n}\n\nfunction parseImportPrelude(\n prelude: string,\n): { href: string; media: string; layer: string | null; supports: string | null } | null {\n const hrefMatch = prelude.match(\n /^(?:url\\(\\s*(?:\"([^\"]*)\"|'([^']*)'|([^)]*))\\s*\\)|\"([^\"]*)\"|'([^']*)')\\s*(.*)$/,\n );\n if (!hrefMatch) return null;\n const href = hrefMatch[1] ?? hrefMatch[2] ?? hrefMatch[3]?.trim() ?? hrefMatch[4] ?? hrefMatch[5];\n if (href === undefined) return null;\n let remainder = hrefMatch[6]?.trim() ?? \"\";\n let layer: string | null = null;\n let supports: string | null = null;\n\n const layerMatch = remainder.match(/^layer(?:\\(([^)]*)\\))?(?:\\s+|$)(.*)$/);\n if (layerMatch) {\n layer = layerMatch[1]?.trim() ?? \"\";\n remainder = layerMatch[2]?.trim() ?? \"\";\n }\n\n if (remainder.startsWith(\"supports(\")) {\n let depth = 0;\n let end = -1;\n for (let index = \"supports\".length; index < remainder.length; index += 1) {\n const character = remainder[index];\n if (character === \"(\") depth += 1;\n if (character !== \")\") continue;\n depth -= 1;\n if (depth !== 0) continue;\n end = index;\n break;\n }\n if (end !== -1) {\n supports = remainder.slice(\"supports(\".length, end).trim();\n remainder = remainder.slice(end + 1).trim();\n }\n }\n\n return { href, media: remainder, layer, supports };\n}\n\nfunction createRuleFromNode(\n node: csstree.Rule | csstree.Atrule,\n reportDiagnostic: ReportDiagnostic,\n preserveImports: boolean,\n): CSSRule | null {\n return constructInternally(() =>\n createRuleFromNodeInternal(node, reportDiagnostic, preserveImports),\n );\n}\n\nfunction createRuleFromNodeInternal(\n node: csstree.Rule | csstree.Atrule,\n reportDiagnostic: ReportDiagnostic,\n preserveImports: boolean,\n): CSSRule | null {\n if (node.type === \"Rule\") return createStyleRule(node, reportDiagnostic);\n\n const name = node.name.toLowerCase();\n if (name === \"import\" && !preserveImports) return null;\n const prelude = node.prelude ? csstree.generate(node.prelude) : \"\";\n let rule: CSSRule;\n\n switch (name) {\n case \"import\": {\n const parsedImport = parseImportPrelude(prelude);\n if (!parsedImport) return null;\n rule = new CSSImportRule(\n parsedImport.href,\n parsedImport.media,\n parsedImport.layer,\n parsedImport.supports,\n );\n break;\n }\n case \"font-face\": {\n const fontFace = new CSSFontFaceRule();\n if (node.block) fontFace.style.cssText = declarationTextFromBlock(node.block);\n rule = fontFace;\n break;\n }\n case \"page\": {\n const page = new CSSPageRule(prelude);\n if (node.block) {\n page.style.cssText = declarationTextFromBlock(node.block);\n const margins: CSSMarginRule[] = [];\n for (const child of node.block.children) {\n if (child.type !== \"Atrule\" || !child.block) continue;\n const margin = new CSSMarginRule(child.name.toLowerCase());\n margin.style.cssText = declarationTextFromBlock(child.block);\n ruleDiagnostics.set(margin, reportDiagnostic);\n margins.push(margin);\n }\n replaceGroupingRules(page, margins);\n }\n rule = page;\n break;\n }\n case \"position-try\": {\n if (!prelude.startsWith(\"--\")) return null;\n const positionTry = new CSSPositionTryRule(prelude);\n if (node.block) positionTry.style.cssText = declarationTextFromBlock(node.block);\n rule = positionTry;\n break;\n }\n case \"keyframes\":\n case \"-webkit-keyframes\": {\n if (prelude === \"\") return null;\n const keyframes = new CSSKeyframesRule(prelude);\n if (node.block) {\n const frames: CSSKeyframeRule[] = [];\n for (const child of node.block.children) {\n if (child.type === \"Rule\") {\n frames.push(createKeyframeRuleFromNode(child, reportDiagnostic));\n }\n }\n replaceKeyframeRules(keyframes, frames);\n }\n rule = keyframes;\n break;\n }\n case \"counter-style\": {\n if (prelude === \"\") return null;\n const counterStyle = new CSSCounterStyleRule(prelude);\n if (node.block) {\n for (const child of node.block.children) {\n if (child.type !== \"Declaration\") continue;\n counterStyle.setParsedDescriptor(\n child.property.toLowerCase(),\n generateDescriptorInput(child.value),\n );\n }\n }\n rule = counterStyle;\n break;\n }\n case \"font-feature-values\": {\n if (prelude === \"\") return null;\n const featureValues = new CSSFontFeatureValuesRule(prelude);\n if (node.block) {\n for (const child of node.block.children) {\n if (child.type !== \"Atrule\" || !child.block) continue;\n const map = featureValues.featureMap(child.name.toLowerCase());\n if (!map) continue;\n for (const declaration of child.block.children) {\n if (declaration.type !== \"Declaration\") continue;\n const values = csstree.generate(declaration.value)\n .trim()\n .split(/\\s+/)\n .map(value => Number(value));\n if (values.some(value => !Number.isFinite(value))) continue;\n map.set(declaration.property, values);\n }\n }\n }\n rule = featureValues;\n break;\n }\n case \"media\":\n if (prelude === \"\") return null;\n rule = new CSSMediaRule(prelude);\n break;\n case \"supports\":\n if (prelude === \"\") return null;\n rule = new CSSSupportsRule(prelude);\n break;\n case \"container\":\n if (prelude === \"\") return null;\n rule = new CSSContainerRule(prelude);\n break;\n case \"layer\":\n if (!node.block) return new CSSGenericRule(0, csstree.generate(node));\n rule = new CSSLayerBlockRule(prelude);\n break;\n case \"scope\": {\n const [start, end] = parseScopePrelude(prelude);\n rule = new CSSScopeRule(start, end);\n break;\n }\n case \"starting-style\":\n rule = new CSSStartingStyleRule();\n break;\n default:\n return new CSSGenericRule(genericRuleType(name), csstree.generate(node));\n }\n\n ruleDiagnostics.set(rule, reportDiagnostic);\n if (\n !(rule instanceof CSSGroupingRule) ||\n rule instanceof CSSPageRule ||\n !node.block\n ) return rule;\n\n const children: CSSRule[] = [];\n for (const child of node.block.children) {\n if (child.type !== \"Rule\" && child.type !== \"Atrule\") continue;\n const parsedChild = createRuleFromNode(child, reportDiagnostic, true);\n if (parsedChild) children.push(parsedChild);\n }\n replaceGroupingRules(rule, children);\n return rule;\n}\n\nfunction parseStrictRule(\n ruleText: string,\n reportDiagnostic: ReportDiagnostic,\n preserveImports = false,\n parentRule: CSSGroupingRule | null = null,\n): CSSRule | null {\n let parsed: csstree.CssNode;\n try {\n parsed = csstree.parse(ruleText);\n } catch {\n return null;\n }\n\n if (parsed.type !== \"StyleSheet\" || parsed.children.size !== 1) return null;\n const node = parsed.children.first;\n if (!node) return null;\n if (node.type !== \"Rule\" && node.type !== \"Atrule\") return null;\n if (parentRule instanceof CSSPageRule) {\n if (\n node.type !== \"Atrule\" ||\n !node.block ||\n !pageMarginRuleNames.has(node.name.toLowerCase())\n ) return null;\n return constructInternally(() => {\n const margin = new CSSMarginRule(node.name.toLowerCase());\n margin.style.cssText = declarationTextFromBlock(node.block as csstree.Block);\n ruleDiagnostics.set(margin, reportDiagnostic);\n return margin;\n });\n }\n if (node.type === \"Atrule\" && node.name.toLowerCase() === \"import\" && !preserveImports) {\n return null;\n }\n return createRuleFromNode(node, reportDiagnostic, preserveImports);\n}\n\nfunction parsedAtRuleName(ruleText: string): string | null {\n try {\n const parsed = csstree.parse(ruleText);\n if (parsed.type !== \"StyleSheet\" || parsed.children.size !== 1) return null;\n const node = parsed.children.first;\n return node?.type === \"Atrule\" ? node.name.toLowerCase() : null;\n } catch {\n return null;\n }\n}\n\nfunction genericRuleType(name: string): number {\n switch (name.toLowerCase()) {\n case \"import\":\n return CSSRule.IMPORT_RULE;\n case \"media\":\n return CSSRule.MEDIA_RULE;\n case \"font-face\":\n return CSSRule.FONT_FACE_RULE;\n case \"page\":\n return CSSRule.PAGE_RULE;\n case \"keyframes\":\n case \"-webkit-keyframes\":\n return CSSRule.KEYFRAMES_RULE;\n case \"namespace\":\n return CSSRule.NAMESPACE_RULE;\n case \"supports\":\n return CSSRule.SUPPORTS_RULE;\n default:\n return 0;\n }\n}\n\nfunction parseStyleSheetRules(\n cssText: string,\n reportDiagnostic: ReportDiagnostic,\n preserveImports: boolean,\n): CSSRule[] {\n const rules: CSSRule[] = [];\n for (const rawRule of scanTopLevelRules(cssText)) {\n const rule = parseStrictRule(rawRule, reportDiagnostic, preserveImports);\n if (rule) {\n rules.push(rule);\n continue;\n }\n if (!preserveImports) continue;\n rules.push(constructInternally(() => new CSSOpaqueRule(0, rawRule)));\n }\n\n return rules;\n}\n\n/** A mutable, browser-shaped authoring stylesheet. */\nexport class CSSStyleSheet {\n readonly cssRules: CSSRuleList;\n readonly media: MediaList;\n readonly ownerNode: null = null;\n readonly parentStyleSheet: null = null;\n readonly ownerRule: null = null;\n readonly title: null = null;\n readonly type = \"text/css\";\n disabled: boolean;\n\n readonly #rules: CSSRule[] = [];\n readonly #diagnostics: SheetOMDiagnostic[] | null;\n readonly #constructedBaseURL: string;\n\n constructor(options: CSSStyleSheetOptions | null = {}) {\n const normalizedOptions = options ?? {};\n this.#diagnostics = Boolean(normalizedOptions.diagnostics) ? [] : null;\n this.#constructedBaseURL = normalizedOptions.baseURL === undefined\n ? \"about:blank\"\n : `${normalizedOptions.baseURL}`;\n const media = normalizedOptions.media === undefined\n ? \"\"\n : `${normalizedOptions.media}`;\n this.media = constructInternally(() => new MediaList(media));\n this.disabled = Boolean(normalizedOptions.disabled);\n this.cssRules = constructInternally(() => new CSSRuleList(this.#rules));\n lockOwnProperties(\n this,\n \"cssRules\",\n \"media\",\n \"ownerNode\",\n \"parentStyleSheet\",\n \"ownerRule\",\n \"title\",\n \"type\",\n );\n }\n\n get href(): string | null {\n return regularSheetMetadata.get(this)?.href ?? null;\n }\n\n get baseURL(): string {\n return regularSheetMetadata.get(this)?.baseURL ?? this.#constructedBaseURL;\n }\n\n readonly #reportDiagnostic: ReportDiagnostic = diagnostic => {\n this.#diagnostics?.push(diagnostic);\n };\n\n insertRule(ruleText: string, index = 0): number {\n requireArguments(arguments.length, 1, \"CSSStyleSheet\", \"insertRule\");\n const normalizedIndex = toUnsignedLong(index);\n if (normalizedIndex > this.#rules.length) {\n throw new DOMException(\"The index is outside the allowed range.\", \"IndexSizeError\");\n }\n\n const regular = regularSheetMetadata.has(this);\n const rule = parseStrictRule(`${ruleText}`, this.#reportDiagnostic, regular);\n if (!rule) throw new DOMException(\"The rule could not be parsed.\", \"SyntaxError\");\n\n const precedingRules = this.#rules.slice(0, normalizedIndex);\n const followingRules = this.#rules.slice(normalizedIndex);\n const invalidImportOrder = rule instanceof CSSImportRule\n ? precedingRules.some(candidate => !(candidate instanceof CSSImportRule))\n : followingRules.some(candidate => candidate instanceof CSSImportRule);\n if (invalidImportOrder) {\n throw new DOMException(\"The rule violates stylesheet ordering.\", \"HierarchyRequestError\");\n }\n\n attachRuleTree(rule, null, this);\n this.#rules.splice(normalizedIndex, 0, rule);\n return normalizedIndex;\n }\n\n deleteRule(index: number): void {\n requireArguments(arguments.length, 1, \"CSSStyleSheet\", \"deleteRule\");\n const normalizedIndex = toUnsignedLong(index);\n if (normalizedIndex >= this.#rules.length) {\n throw new DOMException(\"The index is outside the allowed range.\", \"IndexSizeError\");\n }\n\n const [removed] = this.#rules.splice(normalizedIndex, 1);\n if (!removed) return;\n attachRuleTree(removed, null, null);\n }\n\n replaceSync(cssText: string): void {\n requireArguments(arguments.length, 1, \"CSSStyleSheet\", \"replaceSync\");\n const replacement = parseStyleSheetRules(\n `${cssText}`,\n this.#reportDiagnostic,\n regularSheetMetadata.has(this),\n );\n\n for (const rule of this.#rules) {\n attachRuleTree(rule, null, null);\n }\n for (const rule of replacement) attachRuleTree(rule, null, this);\n\n this.#rules.splice(0, this.#rules.length, ...replacement);\n }\n\n async replace(cssText: string): Promise<CSSStyleSheet> {\n requireArguments(arguments.length, 1, \"CSSStyleSheet\", \"replace\");\n this.replaceSync(cssText);\n return this;\n }\n\n /** Serialize current state as reparsable CSS without mutating live objects. */\n serialize(): string {\n return this.#rules.map(serializeRuleSafe).join(\"\");\n }\n\n /** Drain opt-in mutation diagnostics without affecting CSSOM behavior. */\n takeDiagnostics(): SheetOMDiagnostic[] {\n if (!this.#diagnostics) return [];\n return this.#diagnostics.splice(0);\n }\n}\n\n/** Forgivingly parse an existing regular stylesheet without loading imports. */\nexport function parseStyleSheet(\n cssText: string,\n options: ParseStyleSheetOptions = {},\n): CSSStyleSheet {\n const sheet = new CSSStyleSheet(options);\n const href = options.href ?? null;\n regularSheetMetadata.set(sheet, {\n href,\n baseURL: options.baseURL ?? href ?? \"about:blank\",\n });\n sheet.replaceSync(`${cssText}`);\n return sheet;\n}\n"],"mappings":";;;;;;AAqDA,IAAa,mBAAb,MAA8B;CAC5B;CACA;CACA,WAAyC,CAAC;CAE1C,YACE,OACA,kBACA;EACA,KAAKA,SAAS;EACd,KAAKC,oBAAoB;CAC3B;CAEA,QAAQ,cAAgD;EACtD,IAAI,CAAC,cAAc;GACjB,KAAKC,SAAS,OAAO,CAAC;GACtB;EACF;EAEA,MAAM,0BAAU,IAAI,IAGlB;EACF,IAAI,cAAc;EAElB,MAAM,YAAY,QAA2B,aAA2B;GAEtE,IADiB,QAAQ,IAAI,OAAO,IACzB,CAAC,EAAE,aAAa,CAAC,OAAO,WAAW;GAC9C,QAAQ,IAAI,OAAO,MAAM;IAAE,GAAG;IAAQ;IAAa;GAAS,CAAC;EAC/D;EAEA,KAAK,MAAM,eAAe,cAAc;GACtC,MAAM,OAAO,YAAY,KAAK,WAAW,IAAI,IACzC,YAAY,OACZ,YAAY,KAAK,YAAY;GACjC,MAAM,gBAAgB,KAAKF,OAAO,WAAW,MAAM,YAAY,KAAK;GACpE,IAAI,CAAC,eAAe;IAClB,eAAe;IACf;GACF;GAEA,MAAM,YAAY,KAAKA,OAAO,mBAAmB,IAAI;GACrD,IAAI,cAAc,uBAAuB,WAAW;IAClD,MAAM,eAAyC;KAC7C,WAAW;KACX,iBAAiB,cAAc;KAC/B,WAAW,cAAc;IAC3B;IACA,KAAK,IAAI,QAAQ,GAAG,QAAQ,UAAU,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AK,CAAC,CAAC,QAAQ,CAAC,CAAC;EAEvD,IAAI,SAAS,WAAW,GAAG,OAAO,GAAG,KAAK,OAAO;EACjD,OAAO,GAAG,KAAK,OAAO,MAAM,SAAS,KAAK,IAAI,EAAE;CAClD;AACF;AAEA,SAAS,OAAO,OAAuB;CACrC,OAAO,MAAM,MAAM,IAAI,CAAC,CAAC,KAAI,SAAQ,KAAK,MAAM,CAAC,CAAC,KAAK,IAAI;AAC7D;;;AClCA,MAAa,8CAA8B,IAAI,IAAI;CACjD;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF,CAAC;AAED,MAAa,6BAA0E;CACrF,yBAAyB,CACvB,eACF;CACA,uBAAuB,CACrB,aACF;CACA,sBAAsB,CACpB,YACF;CACA,qBAAqB;EACnB;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF;CACA,2BAA2B,CACzB,iBACF;CACA,+BAA+B,CAC7B,qBACF;CACA,8BAA8B,CAC5B,oBACF;CACA,+BAA+B,CAC7B,qBACF;CACA,qCAAqC,CACnC,2BACF;CACA,0BAA0B,CACxB,gBACF;CACA,gCAAgC,CAC9B,sBACF;CACA,qCAAqC,CACnC,2BACF;CACA,sBAAsB,CACpB,YACF;CACA,sBAAsB,CACpB,YACF;CACA,+BAA+B,CAC7B,qBACF;CACA,2BAA2B,CACzB,iBACF;CACA,6BAA6B,CAC3B,mBACF;CACA,2BAA2B,CACzB,iBACF;CACA,wBAAwB;EACtB;EACA;EACA;CACF;CACA,8BAA8B,CAC5B,wBACF;CACA,8BAA8B,CAC5B,wBACF;CACA,8BAA8B,CAC5B,wBACF;CACA,yBAAyB;EACvB;EACA;EACA;CACF;CACA,+BAA+B,CAC7B,0BACF;CACA,+BAA+B,CAC7B,0BACF;CACA,+BAA+B,CAC7B,0BACF;CACA,qCAAqC,CACnC,2BACF;CACA,sCAAsC,CACpC,4BACF;CACA,sBAAsB;EACpB;EACA;EACA;CACF;CACA,4BAA4B,CAC1B,yBACF;CACA,4BAA4B,CAC1B,yBACF;CACA,4BAA4B,CAC1B,yBACF;CACA,yBAAyB;EACvB;EACA;EACA;EACA;CACF;CACA,wBAAwB;EACtB;EACA;EACA;CACF;CACA,8BAA8B,CAC5B,2BACF;CACA,8BAA8B,CAC5B,2BACF;CACA,8BAA8B,CAC5B,2BACF;CACA,kCAAkC,CAChC,wBACF;CACA,mCAAmC,CACjC,yBACF;CACA,sBAAsB,CACpB,YACF;CACA,sBAAsB,CACpB,YACF;CACA,qBAAqB,CACnB,WACF;CACA,8BAA8B,CAC5B,aACF;CACA,+BAA+B,CAC7B,cACF;CACA,+BAA+B,CAC7B,cACF;CACA,wBAAwB,CACtB,cACF;CACA,sBAAsB,CACpB,YACF;CACA,uBAAuB;EACrB;EACA;EACA;CACF;CACA,6BAA6B,CAC3B,mBACF;CACA,6BAA6B,CAC3B,mBACF;CACA,6BAA6B,CAC3B,mBACF;CACA,uBAAuB,CACrB,aACF;CACA,wBAAwB,CACtB,cACF;CACA,mBAAmB;EACjB;EACA;EACA;EACA;CACF;CACA,kBAAkB,CAChB,QACF;CACA,gBAAgB;EACd;EACA;EACA;CACF;CACA,sBAAsB,CACpB,YACF;CACA,0BAA0B,CACxB,gBACF;CACA,qBAAqB,CACnB,kBACA,WACF;CACA,qBAAqB,CACnB,WACF;CACA,uBAAuB,CACrB,aACF;CACA,qBAAqB,CACnB,WACF;CACA,iCAAiC,CAC/B,uBACF;CACA,+BAA+B,CAC7B,qBACF;CACA,2BAA2B,CACzB,iBACF;CACA,0BAA0B,CACxB,YACF;CACA,yBAAyB,CACvB,aACF;CACA,wBAAwB,CACtB,kBACF;CACA,yBAAyB,CACvB,oBACF;CACA,sBAAsB,CACpB,mBACF;CACA,wBAAwB,CACtB,qBACF;CACA,gBAAgB;EACd;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF;CACA,0BAA0B;EACxB;EACA;EACA;EACA;EACA;CACF;CACA,qBAAqB,CACnB,WACF;CACA,0BAA0B,CACxB,gBACF;CACA,sBAAsB,CACpB,YACF;CACA,uBAAuB,CACrB,aACF;CACA,yBAAyB,CACvB,2BACA,yBACF;CACA,uBAAuB,CACrB,aACF;CACA,qBAAqB,CACnB,WACF;CACA,8BAA8B,CAC5B,gBACF;CACA,6BAA6B,CAC3B,iBACF;CACA,8BAA8B,CAC5B,gBACF;CACA,6BAA6B,CAC3B,iBACF;CACA,mBAAmB,CACjB,SACF;CACA,iBAAiB,CACf,OACF;CACA,yBAAyB,CACvB,mBACF;CACA,0BAA0B,CACxB,qBACF;CACA,uBAAuB,CACrB,oBACF;CACA,yBAAyB,CACvB,sBACF;CACA,uBAAuB,CACrB,aACF;CACA,8BAA8B,CAC5B,oBACF;CACA,8BAA8B,CAC5B,oBACF;CACA,iCAAiC,CAC/B,uBACF;CACA,wBAAwB,CACtB,cACF;CACA,yBAAyB,CACvB,eACF;CACA,yBAAyB,CACvB,uBACA,qBACF;CACA,+BAA+B,CAC7B,qBACF;CACA,kCAAkC,CAChC,wBACF;CACA,+BAA+B,CAC7B,qBACF;CACA,4BAA4B,CAC1B,kBACF;CACA,uBAAuB,CACrB,6BACA,2BACF;CACA,qBAAqB,CACnB,WACF;CACA,4BAA4B,CAC1B,kBACF;CACA,2BAA2B,CACzB,iBACF;CACA,sBAAsB;EACpB;EACA;EACA;EACA;EACA;CACF;CACA,4BAA4B,CAC1B,kBACF;CACA,+BAA+B,CAC7B,qBACF;CACA,+BAA+B,CAC7B,qBACF;CACA,sCAAsC,CACpC,4BACF;CACA,uBAAuB,CACrB,aACF;CACA,aAAa;EACX;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF;CACA,mBAAmB,CACjB,yBACA,qBACF;CACA,cAAc;EACZ;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF;CACA,uBAAuB,CACrB,yBACA,uBACF;CACA,UAAU;EACR;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF;CACA,gBAAgB;EACd;EACA;EACA;EACA;EACA;EACA;CACF;CACA,sBAAsB,CACpB,4BACA,wBACF;CACA,oBAAoB;EAClB;EACA;EACA;CACF;CACA,sBAAsB;EACpB;EACA;EACA;CACF;CACA,sBAAsB,CACpB,4BACA,wBACF;CACA,sBAAsB,CACpB,4BACA,wBACF;CACA,iBAAiB;EACf;EACA;EACA;CACF;CACA,gBAAgB;EACd;EACA;EACA;EACA;CACF;CACA,gBAAgB;EACd;EACA;EACA;EACA;EACA;CACF;CACA,iBAAiB;EACf;EACA;EACA;EACA;EACA;EACA;CACF;CACA,uBAAuB,CACrB,6BACA,yBACF;CACA,qBAAqB;EACnB;EACA;EACA;CACF;CACA,uBAAuB;EACrB;EACA;EACA;CACF;CACA,uBAAuB,CACrB,6BACA,yBACF;CACA,uBAAuB,CACrB,6BACA,yBACF;CACA,eAAe;EACb;EACA;EACA;CACF;CACA,iBAAiB;EACf;EACA;EACA;EACA;CACF;CACA,gBAAgB;EACd;EACA;EACA;CACF;CACA,kBAAkB,CAChB,qCACA,iCACF;CACA,gBAAgB;EACd;EACA;EACA;EACA;CACF;CACA,cAAc;EACZ;EACA;EACA;CACF;CACA,gBAAgB;EACd;EACA;EACA;EACA;CACF;CACA,eAAe;EACb;EACA;EACA;CACF;CACA,qBAAqB;EACnB;EACA;EACA;EACA;CACF;CACA,yBAAyB,CACvB,+BACA,2BACF;CACA,yBAAyB,CACvB,6BACA,gCACF;CACA,8BAA8B,CAC5B,oCACA,gCACF;CACA,2BAA2B,CACzB,+BACA,kCACF;CACA,WAAW;EACT;EACA;EACA;EACA;CACF;CACA,0BAA0B,CACxB,2BACA,0BACF;CACA,aAAa,CACX,kBACA,gBACF;CACA,0BAA0B,CACxB,0BACA,sBACF;CACA,4BAA4B,CAC1B,4BACA,wBACF;CACA,uBAAuB,CACrB,4BACA,2BACF;CACA,2BAA2B,CACzB,0BACA,sBACF;CACA,6BAA6B,CAC3B,4BACA,wBACF;CACA,qBAAqB,CACnB,yBACA,0BACF;CACA,sBAAsB,CACpB,0BACA,2BACF;CACA,gBAAgB;EACd;EACA;EACA;EACA;CACF;CACA,oBAAoB,CAClB,yBACA,wBACF;CACA,QAAQ;EACN;EACA;EACA;CACF;CACA,aAAa,CACX,kBACA,WACF;CACA,QAAQ;EACN;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF;CACA,kBAAkB;EAChB;EACA;EACA;CACF;CACA,gBAAgB;EACd;EACA;EACA;EACA;EACA;EACA;EACA;CACF;CACA,OAAO,CACL,WACA,YACF;CACA,QAAQ;EACN;EACA;EACA;EACA;EACA;EACA;CACF;CACA,aAAa;EACX;EACA;EACA;EACA;CACF;CACA,eAAe,CACb,qBACA,iBACF;CACA,mBAAmB,CACjB,YACF;CACA,YAAY,CACV,WACA,YACF;CACA,YAAY,CACV,kBACA,cACF;CACA,gBAAgB,CACd,SACF;CACA,iBAAiB;EACf;EACA;EACA;CACF;CACA,SAAS;EACP;EACA;EACA;EACA;CACF;CACA,eAAe,CACb,qBACA,iBACF;CACA,gBAAgB,CACd,sBACA,kBACF;CACA,kBAAkB,CAChB,wBACA,oBACF;CACA,cAAc;EACZ;EACA;EACA;CACF;CACA,UAAU;EACR;EACA;EACA;EACA;CACF;CACA,gBAAgB,CACd,sBACA,kBACF;CACA,iBAAiB,CACf,uBACA,mBACF;CACA,UAAU;EACR;EACA;EACA;CACF;CACA,QAAQ;EACN;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF;CACA,iBAAiB,CACf,2BACA,yBACF;CACA,UAAU;EACR;EACA;EACA;EACA;EACA;CACF;CACA,WAAW;EACT;EACA;EACA;CACF;CACA,YAAY,CACV,cACA,YACF;CACA,uBAAuB,CACrB,yBACA,uBACF;CACA,WAAW;EACT;EACA;EACA;EACA;CACF;CACA,iBAAiB,CACf,uBACA,mBACF;CACA,kBAAkB,CAChB,wBACA,oBACF;CACA,oBAAoB,CAClB,aACF;CACA,qBAAqB,CACnB,cACF;CACA,qBAAqB,CACnB,cACF;CACA,iBAAiB,CACf,iBACA,iBACF;CACA,eAAe,CACb,eACA,eACF;CACA,cAAc,CACZ,cACA,cACF;CACA,gBAAgB,CACd,sBACA,wBACF;CACA,YAAY;EACV;EACA;EACA;CACF;CACA,kBAAkB;EAChB;EACA;EACA;EACA;CACF;CACA,sBAAsB,CACpB,4BACA,wBACF;CACA,sBAAsB,CACpB,0BACA,6BACF;CACA,2BAA2B,CACzB,iCACA,6BACF;CACA,wBAAwB,CACtB,4BACA,+BACF;CACA,QAAQ;EACN;EACA;EACA;EACA;EACA;EACA;CACF;CACA,cAAc,CACZ,kBACA,mBACF;CACA,cAAc,CACZ,qBACA,gBACF;CACA,cAAc;EACZ;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF;CACA,kBAAkB;EAChB;EACA;EACA;EACA;CACF;CACA,kBAAkB;EAChB;EACA;EACA;EACA;CACF;CACA,uBAAuB;EACrB;EACA;EACA;EACA;CACF;CACA,oBAAoB;EAClB;EACA;EACA;EACA;CACF;CACA,cAAc,CACZ,qBACA,gBACF;CACA,yBAAyB,CACvB,gCACA,2BACF;CACA,cAAc,CACZ,qBACA,gBACF;CACA,iBAAiB;EACf;EACA;EACA;EACA;CACF;CACA,uBAAuB,CACrB,6BACA,yBACF;CACA,wBAAwB,CACtB,8BACA,0BACF;CACA,kBAAkB;EAChB;EACA;EACA;EACA;CACF;CACA,wBAAwB,CACtB,8BACA,0BACF;CACA,yBAAyB,CACvB,+BACA,2BACF;CACA,mBAAmB,CACjB,wBACA,sBACF;CACA,YAAY,CACV,iBACA,eACF;CACA,mBAAmB;EACjB;EACA;EACA;EACA;CACF;CACA,iBAAiB,CACf,uBACA,qBACF;CACA,aAAa,CACX,kBACA,iBACF;CACA,oBAAoB;EAClB;EACA;EACA;EACA;EACA;EACA;CACF;CACA,qCAAqC,CACnC,2CACA,uCACF;CACA,iCAAiC,CAC/B,uCACA,mCACF;CACA,cAAc;EACZ;EACA;EACA;EACA;EACA;CACF;CACA,iBAAiB;EACf;EACA;EACA;CACF;CACA,eAAe,CACb,wBACA,gBACF;CACA,aAAa,CACX,eACF;AACF;;;AC9qDA,MAAM,yCAAyB,IAAI,IAAI;CACrC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF,CAAC;AAED,SAAgB,oBAAoB,MAAuB;CACzD,OAAO,uBAAuB,IAAI,IAAI;AACxC;AAEA,SAAgB,sBA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,IAAI,cAAc,OAAO;CACvC,MAAM,OAAO,QAAQ,QAAQ;CAC7B,qBAAqB,IAAI,OAAO;EAC9B;EACA,SAAS,QAAQ,WAAW,QAAQ;CACtC,CAAC;CACD,MAAM,YAAY,GAAG,SAAS;CAC9B,OAAO;AACT"}
package/docs/api.md ADDED
@@ -0,0 +1,80 @@
1
+ # API reference
2
+
3
+ The generated declaration reference is the exhaustive signature source. Run
4
+ `npm run docs:build` to render it under `site/api`. This page records the
5
+ behavioral contract that TypeScript declarations cannot express.
6
+
7
+ ## Construction
8
+
9
+ `new CSSStyleSheet(options?)` is the only standards-defined constructible CSSOM
10
+ class. `options` accepts `baseURL`, `media`, `disabled`, and the SheetOM-only
11
+ `diagnostics` flag. `parseStyleSheet(cssText, options?)` is a SheetOM extension
12
+ for existing regular sheets; it preserves valid `@import` rules without loading
13
+ them and accepts `href` as source metadata.
14
+
15
+ All exported rule, rule-list, declaration, media-list, and feature-map classes
16
+ exist for `instanceof` and typing. Direct construction throws `TypeError`, as it
17
+ does in browsers. Obtain their objects from a sheet or parent rule.
18
+
19
+ ## Stylesheets and identity
20
+
21
+ `CSSStyleSheet.cssRules` is stable and live. `insertRule` and `deleteRule` use
22
+ WebIDL unsigned-long conversion and throw `IndexSizeError`, `SyntaxError`, or
23
+ `HierarchyRequestError` before mutating. `replaceSync` replaces atomically and
24
+ strips imports on constructed sheets; `replace` resolves to the same sheet.
25
+
26
+ Rules and nested lists keep stable identity while attached. Removing or
27
+ replacing a rule detaches the old object recursively by setting `parentRule`
28
+ and `parentStyleSheet` to `null`; the detached object remains independently
29
+ readable and mutable. Assigning any `CSSRule.cssText` is a successful no-op.
30
+
31
+ `serialize()` is the SheetOM extension that emits reparsable CSS from current
32
+ state. This can differ deliberately from browser-facing `cssText` when CSS
33
+ Syntax end-of-input recovery preserved malformed source text.
34
+
35
+ ## Declarations
36
+
37
+ `CSSStyleDeclaration` exposes live indexed names, named JavaScript properties,
38
+ `cssText`, `item`, `getPropertyValue`, `getPropertyPriority`, `setProperty`, and
39
+ `removeProperty`. Ordinary names are ASCII-case-insensitive; custom-property
40
+ names retain case and logical text.
41
+
42
+ `setProperty` performs WebIDL conversion first. `null` values remove, explicit
43
+ `undefined` becomes the string `"undefined"`, and a missing required argument
44
+ throws `TypeError`. Invalid priorities, unsupported names, invalid grammars,
45
+ and embedded priority tokens are atomic no-ops. Diagnostics are optional and
46
+ never change those return values or mutations.
47
+
48
+ Shorthands expose their expanded longhands through indexing. SheetOM retains
49
+ pending-substitution provenance so recovered values such as
50
+ `72px var(--space, var(--space,` remain observable exactly as Chromium exposes
51
+ them. Mutating one longhand breaks shorthand reconstruction.
52
+
53
+ ## Rules
54
+
55
+ - `CSSStyleRule` combines `style`, nested `cssRules`, and selector mutation.
56
+ - `CSSMediaRule`, `CSSSupportsRule`, `CSSContainerRule`, `CSSLayerBlockRule`,
57
+ `CSSScopeRule`, and `CSSStartingStyleRule` expose live grouping lists.
58
+ - `CSSImportRule` never fetches; `media` is live and `href` resolves against the
59
+ sheet base URL.
60
+ - `CSSFontFaceRule`, `CSSPageRule`/`CSSMarginRule`, `CSSPositionTryRule`, and
61
+ `CSSNestedDeclarations` expose declaration blocks.
62
+ - `CSSKeyframesRule` provides `appendRule`, `deleteRule`, and last-match
63
+ `findRule`; each `CSSKeyframeRule` exposes mutable `keyText` and `style`.
64
+ - `CSSCounterStyleRule` validates mutable descriptors.
65
+ - `CSSFontFeatureValuesRule` exposes six live map-like categories.
66
+
67
+ Unknown metadata and future rules can be retained and serialized, but are
68
+ read-only until a standards-defined mutable interface is implemented.
69
+
70
+ ## Errors, diagnostics, and scope
71
+
72
+ Required WebIDL arguments throw `TypeError`. Parse and hierarchy failures use
73
+ `DOMException` names matching browser APIs. `takeDiagnostics()` drains
74
+ SheetOM-only warnings when diagnostics were enabled; otherwise it returns an
75
+ empty array.
76
+
77
+ SheetOM does not implement DOM association, style-sheet collections, cascade,
78
+ selector matching, resolved/computed values, layout, fetching, or sanitizing.
79
+ See the release Compatibility Report for measured engine versions, WPT source,
80
+ known divergences, and explicit exclusions.