From 953ddd82e48dd206cef5ac94456549aed13b3ad5 Mon Sep 17 00:00:00 2001 From: RaindropsSys Date: Fri, 17 Nov 2023 23:25:29 +0100 Subject: Updated 30 files and deleted 2976 files (automated) --- .../dist/cjs/parser/formatting-element-list.d.ts | 37 - .../dist/cjs/parser/formatting-element-list.js | 115 - .../node_modules/parse5/dist/cjs/parser/index.d.ts | 157 - .../node_modules/parse5/dist/cjs/parser/index.js | 3163 -------------------- .../parse5/dist/cjs/parser/open-element-stack.d.ts | 53 - .../parse5/dist/cjs/parser/open-element-stack.js | 316 -- 6 files changed, 3841 deletions(-) delete mode 100644 includes/external/addressbook/node_modules/parse5/dist/cjs/parser/formatting-element-list.d.ts delete mode 100644 includes/external/addressbook/node_modules/parse5/dist/cjs/parser/formatting-element-list.js delete mode 100644 includes/external/addressbook/node_modules/parse5/dist/cjs/parser/index.d.ts delete mode 100644 includes/external/addressbook/node_modules/parse5/dist/cjs/parser/index.js delete mode 100644 includes/external/addressbook/node_modules/parse5/dist/cjs/parser/open-element-stack.d.ts delete mode 100644 includes/external/addressbook/node_modules/parse5/dist/cjs/parser/open-element-stack.js (limited to 'includes/external/addressbook/node_modules/parse5/dist/cjs/parser') diff --git a/includes/external/addressbook/node_modules/parse5/dist/cjs/parser/formatting-element-list.d.ts b/includes/external/addressbook/node_modules/parse5/dist/cjs/parser/formatting-element-list.d.ts deleted file mode 100644 index d6c9dcd..0000000 --- a/includes/external/addressbook/node_modules/parse5/dist/cjs/parser/formatting-element-list.d.ts +++ /dev/null @@ -1,37 +0,0 @@ -import type { TagToken } from '../common/token.js'; -import type { TreeAdapter, TreeAdapterTypeMap } from '../tree-adapters/interface.js'; -export declare enum EntryType { - Marker = 0, - Element = 1 -} -interface MarkerEntry { - type: EntryType.Marker; -} -export interface ElementEntry { - type: EntryType.Element; - element: T['element']; - token: TagToken; -} -export type Entry = MarkerEntry | ElementEntry; -export declare class FormattingElementList { - private treeAdapter; - entries: Entry[]; - bookmark: Entry | null; - constructor(treeAdapter: TreeAdapter); - private _getNoahArkConditionCandidates; - private _ensureNoahArkCondition; - insertMarker(): void; - pushElement(element: T['element'], token: TagToken): void; - insertElementAfterBookmark(element: T['element'], token: TagToken): void; - removeEntry(entry: Entry): void; - /** - * Clears the list of formatting elements up to the last marker. - * - * @see https://html.spec.whatwg.org/multipage/parsing.html#clear-the-list-of-active-formatting-elements-up-to-the-last-marker - */ - clearToLastMarker(): void; - getElementEntryInScopeWithTagName(tagName: string): ElementEntry | null; - getElementEntry(element: T['element']): ElementEntry | undefined; -} -export {}; -//# sourceMappingURL=formatting-element-list.d.ts.map \ No newline at end of file diff --git a/includes/external/addressbook/node_modules/parse5/dist/cjs/parser/formatting-element-list.js b/includes/external/addressbook/node_modules/parse5/dist/cjs/parser/formatting-element-list.js deleted file mode 100644 index 7354fd4..0000000 --- a/includes/external/addressbook/node_modules/parse5/dist/cjs/parser/formatting-element-list.js +++ /dev/null @@ -1,115 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.FormattingElementList = exports.EntryType = void 0; -//Const -const NOAH_ARK_CAPACITY = 3; -var EntryType; -(function (EntryType) { - EntryType[EntryType["Marker"] = 0] = "Marker"; - EntryType[EntryType["Element"] = 1] = "Element"; -})(EntryType = exports.EntryType || (exports.EntryType = {})); -const MARKER = { type: EntryType.Marker }; -//List of formatting elements -class FormattingElementList { - constructor(treeAdapter) { - this.treeAdapter = treeAdapter; - this.entries = []; - this.bookmark = null; - } - //Noah Ark's condition - //OPTIMIZATION: at first we try to find possible candidates for exclusion using - //lightweight heuristics without thorough attributes check. - _getNoahArkConditionCandidates(newElement, neAttrs) { - const candidates = []; - const neAttrsLength = neAttrs.length; - const neTagName = this.treeAdapter.getTagName(newElement); - const neNamespaceURI = this.treeAdapter.getNamespaceURI(newElement); - for (let i = 0; i < this.entries.length; i++) { - const entry = this.entries[i]; - if (entry.type === EntryType.Marker) { - break; - } - const { element } = entry; - if (this.treeAdapter.getTagName(element) === neTagName && - this.treeAdapter.getNamespaceURI(element) === neNamespaceURI) { - const elementAttrs = this.treeAdapter.getAttrList(element); - if (elementAttrs.length === neAttrsLength) { - candidates.push({ idx: i, attrs: elementAttrs }); - } - } - } - return candidates; - } - _ensureNoahArkCondition(newElement) { - if (this.entries.length < NOAH_ARK_CAPACITY) - return; - const neAttrs = this.treeAdapter.getAttrList(newElement); - const candidates = this._getNoahArkConditionCandidates(newElement, neAttrs); - if (candidates.length < NOAH_ARK_CAPACITY) - return; - //NOTE: build attrs map for the new element, so we can perform fast lookups - const neAttrsMap = new Map(neAttrs.map((neAttr) => [neAttr.name, neAttr.value])); - let validCandidates = 0; - //NOTE: remove bottommost candidates, until Noah's Ark condition will not be met - for (let i = 0; i < candidates.length; i++) { - const candidate = candidates[i]; - // We know that `candidate.attrs.length === neAttrs.length` - if (candidate.attrs.every((cAttr) => neAttrsMap.get(cAttr.name) === cAttr.value)) { - validCandidates += 1; - if (validCandidates >= NOAH_ARK_CAPACITY) { - this.entries.splice(candidate.idx, 1); - } - } - } - } - //Mutations - insertMarker() { - this.entries.unshift(MARKER); - } - pushElement(element, token) { - this._ensureNoahArkCondition(element); - this.entries.unshift({ - type: EntryType.Element, - element, - token, - }); - } - insertElementAfterBookmark(element, token) { - const bookmarkIdx = this.entries.indexOf(this.bookmark); - this.entries.splice(bookmarkIdx, 0, { - type: EntryType.Element, - element, - token, - }); - } - removeEntry(entry) { - const entryIndex = this.entries.indexOf(entry); - if (entryIndex >= 0) { - this.entries.splice(entryIndex, 1); - } - } - /** - * Clears the list of formatting elements up to the last marker. - * - * @see https://html.spec.whatwg.org/multipage/parsing.html#clear-the-list-of-active-formatting-elements-up-to-the-last-marker - */ - clearToLastMarker() { - const markerIdx = this.entries.indexOf(MARKER); - if (markerIdx >= 0) { - this.entries.splice(0, markerIdx + 1); - } - else { - this.entries.length = 0; - } - } - //Search - getElementEntryInScopeWithTagName(tagName) { - const entry = this.entries.find((entry) => entry.type === EntryType.Marker || this.treeAdapter.getTagName(entry.element) === tagName); - return entry && entry.type === EntryType.Element ? entry : null; - } - getElementEntry(element) { - return this.entries.find((entry) => entry.type === EntryType.Element && entry.element === element); - } -} -exports.FormattingElementList = FormattingElementList; -//# sourceMappingURL=formatting-element-list.js.map \ No newline at end of file diff --git a/includes/external/addressbook/node_modules/parse5/dist/cjs/parser/index.d.ts b/includes/external/addressbook/node_modules/parse5/dist/cjs/parser/index.d.ts deleted file mode 100644 index 50a9bd0..0000000 --- a/includes/external/addressbook/node_modules/parse5/dist/cjs/parser/index.d.ts +++ /dev/null @@ -1,157 +0,0 @@ -import { Tokenizer, TokenizerMode, type TokenHandler } from '../tokenizer/index.js'; -import { OpenElementStack, type StackHandler } from './open-element-stack.js'; -import { FormattingElementList } from './formatting-element-list.js'; -import { ERR, type ParserErrorHandler } from '../common/error-codes.js'; -import { TAG_ID as $, NS } from '../common/html.js'; -import type { TreeAdapter, TreeAdapterTypeMap } from '../tree-adapters/interface.js'; -import { type Token, type CommentToken, type CharacterToken, type TagToken, type DoctypeToken, type EOFToken, type LocationWithAttributes } from '../common/token.js'; -declare enum InsertionMode { - INITIAL = 0, - BEFORE_HTML = 1, - BEFORE_HEAD = 2, - IN_HEAD = 3, - IN_HEAD_NO_SCRIPT = 4, - AFTER_HEAD = 5, - IN_BODY = 6, - TEXT = 7, - IN_TABLE = 8, - IN_TABLE_TEXT = 9, - IN_CAPTION = 10, - IN_COLUMN_GROUP = 11, - IN_TABLE_BODY = 12, - IN_ROW = 13, - IN_CELL = 14, - IN_SELECT = 15, - IN_SELECT_IN_TABLE = 16, - IN_TEMPLATE = 17, - AFTER_BODY = 18, - IN_FRAMESET = 19, - AFTER_FRAMESET = 20, - AFTER_AFTER_BODY = 21, - AFTER_AFTER_FRAMESET = 22 -} -export interface ParserOptions { - /** - * The [scripting flag](https://html.spec.whatwg.org/multipage/parsing.html#scripting-flag). If set - * to `true`, `noscript` element content will be parsed as text. - * - * @default `true` - */ - scriptingEnabled?: boolean; - /** - * Enables source code location information. When enabled, each node (except the root node) - * will have a `sourceCodeLocation` property. If the node is not an empty element, `sourceCodeLocation` will - * be a {@link ElementLocation} object, otherwise it will be {@link Location}. - * If the element was implicitly created by the parser (as part of - * [tree correction](https://html.spec.whatwg.org/multipage/syntax.html#an-introduction-to-error-handling-and-strange-cases-in-the-parser)), - * its `sourceCodeLocation` property will be `undefined`. - * - * @default `false` - */ - sourceCodeLocationInfo?: boolean; - /** - * Specifies the resulting tree format. - * - * @default `treeAdapters.default` - */ - treeAdapter?: TreeAdapter; - /** - * Callback for parse errors. - * - * @default `null` - */ - onParseError?: ParserErrorHandler | null; -} -export declare class Parser implements TokenHandler, StackHandler { - fragmentContext: T['element'] | null; - scriptHandler: null | ((pendingScript: T['element']) => void); - treeAdapter: TreeAdapter; - onParseError: ParserErrorHandler | null; - private currentToken; - options: Required>; - document: T['document']; - constructor(options?: ParserOptions, document?: T['document'], fragmentContext?: T['element'] | null, scriptHandler?: null | ((pendingScript: T['element']) => void)); - static parse(html: string, options?: ParserOptions): T['document']; - static getFragmentParser(fragmentContext?: T['parentNode'] | null, options?: ParserOptions): Parser; - getFragment(): T['documentFragment']; - tokenizer: Tokenizer; - stopped: boolean; - insertionMode: InsertionMode; - originalInsertionMode: InsertionMode; - fragmentContextID: $; - headElement: null | T['element']; - formElement: null | T['element']; - openElements: OpenElementStack; - activeFormattingElements: FormattingElementList; - /** Indicates that the current node is not an element in the HTML namespace */ - private currentNotInHTML; - /** - * The template insertion mode stack is maintained from the left. - * Ie. the topmost element will always have index 0. - */ - tmplInsertionModeStack: InsertionMode[]; - pendingCharacterTokens: CharacterToken[]; - hasNonWhitespacePendingCharacterToken: boolean; - framesetOk: boolean; - skipNextNewLine: boolean; - fosterParentingEnabled: boolean; - _err(token: Token, code: ERR, beforeToken?: boolean): void; - onItemPush(node: T['parentNode'], tid: number, isTop: boolean): void; - onItemPop(node: T['parentNode'], isTop: boolean): void; - private _setContextModes; - _switchToTextParsing(currentToken: TagToken, nextTokenizerState: typeof TokenizerMode[keyof typeof TokenizerMode]): void; - switchToPlaintextParsing(): void; - _getAdjustedCurrentElement(): T['element']; - _findFormInFragmentContext(): void; - private _initTokenizerForFragmentParsing; - _setDocumentType(token: DoctypeToken): void; - _attachElementToTree(element: T['element'], location: LocationWithAttributes | null): void; - _appendElement(token: TagToken, namespaceURI: NS): void; - _insertElement(token: TagToken, namespaceURI: NS): void; - _insertFakeElement(tagName: string, tagID: $): void; - _insertTemplate(token: TagToken): void; - _insertFakeRootElement(): void; - _appendCommentNode(token: CommentToken, parent: T['parentNode']): void; - _insertCharacters(token: CharacterToken): void; - _adoptNodes(donor: T['parentNode'], recipient: T['parentNode']): void; - _setEndLocation(element: T['element'], closingToken: Token): void; - private shouldProcessStartTagTokenInForeignContent; - _processToken(token: Token): void; - _isIntegrationPoint(tid: $, element: T['element'], foreignNS?: NS): boolean; - _reconstructActiveFormattingElements(): void; - _closeTableCell(): void; - _closePElement(): void; - _resetInsertionMode(): void; - _resetInsertionModeForSelect(selectIdx: number): void; - _isElementCausesFosterParenting(tn: $): boolean; - _shouldFosterParentOnInsertion(): boolean; - _findFosterParentingLocation(): { - parent: T['parentNode']; - beforeElement: T['element'] | null; - }; - _fosterParentElement(element: T['element']): void; - _isSpecialElement(element: T['element'], id: $): boolean; - onCharacter(token: CharacterToken): void; - onNullCharacter(token: CharacterToken): void; - onComment(token: CommentToken): void; - onDoctype(token: DoctypeToken): void; - onStartTag(token: TagToken): void; - /** - * Processes a given start tag. - * - * `onStartTag` checks if a self-closing tag was recognized. When a token - * is moved inbetween multiple insertion modes, this check for self-closing - * could lead to false positives. To avoid this, `_processStartTag` is used - * for nested calls. - * - * @param token The token to process. - */ - _processStartTag(token: TagToken): void; - _startTagOutsideForeignContent(token: TagToken): void; - onEndTag(token: TagToken): void; - _endTagOutsideForeignContent(token: TagToken): void; - onEof(token: EOFToken): void; - onWhitespaceCharacter(token: CharacterToken): void; -} -export {}; -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/includes/external/addressbook/node_modules/parse5/dist/cjs/parser/index.js b/includes/external/addressbook/node_modules/parse5/dist/cjs/parser/index.js deleted file mode 100644 index 4dbf9d5..0000000 --- a/includes/external/addressbook/node_modules/parse5/dist/cjs/parser/index.js +++ /dev/null @@ -1,3163 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.Parser = void 0; -const index_js_1 = require("../tokenizer/index.js"); -const open_element_stack_js_1 = require("./open-element-stack.js"); -const formatting_element_list_js_1 = require("./formatting-element-list.js"); -const default_js_1 = require("../tree-adapters/default.js"); -const doctype = require("../common/doctype.js"); -const foreignContent = require("../common/foreign-content.js"); -const error_codes_js_1 = require("../common/error-codes.js"); -const unicode = require("../common/unicode.js"); -const html_js_1 = require("../common/html.js"); -const token_js_1 = require("../common/token.js"); -//Misc constants -const HIDDEN_INPUT_TYPE = 'hidden'; -//Adoption agency loops iteration count -const AA_OUTER_LOOP_ITER = 8; -const AA_INNER_LOOP_ITER = 3; -//Insertion modes -var InsertionMode; -(function (InsertionMode) { - InsertionMode[InsertionMode["INITIAL"] = 0] = "INITIAL"; - InsertionMode[InsertionMode["BEFORE_HTML"] = 1] = "BEFORE_HTML"; - InsertionMode[InsertionMode["BEFORE_HEAD"] = 2] = "BEFORE_HEAD"; - InsertionMode[InsertionMode["IN_HEAD"] = 3] = "IN_HEAD"; - InsertionMode[InsertionMode["IN_HEAD_NO_SCRIPT"] = 4] = "IN_HEAD_NO_SCRIPT"; - InsertionMode[InsertionMode["AFTER_HEAD"] = 5] = "AFTER_HEAD"; - InsertionMode[InsertionMode["IN_BODY"] = 6] = "IN_BODY"; - InsertionMode[InsertionMode["TEXT"] = 7] = "TEXT"; - InsertionMode[InsertionMode["IN_TABLE"] = 8] = "IN_TABLE"; - InsertionMode[InsertionMode["IN_TABLE_TEXT"] = 9] = "IN_TABLE_TEXT"; - InsertionMode[InsertionMode["IN_CAPTION"] = 10] = "IN_CAPTION"; - InsertionMode[InsertionMode["IN_COLUMN_GROUP"] = 11] = "IN_COLUMN_GROUP"; - InsertionMode[InsertionMode["IN_TABLE_BODY"] = 12] = "IN_TABLE_BODY"; - InsertionMode[InsertionMode["IN_ROW"] = 13] = "IN_ROW"; - InsertionMode[InsertionMode["IN_CELL"] = 14] = "IN_CELL"; - InsertionMode[InsertionMode["IN_SELECT"] = 15] = "IN_SELECT"; - InsertionMode[InsertionMode["IN_SELECT_IN_TABLE"] = 16] = "IN_SELECT_IN_TABLE"; - InsertionMode[InsertionMode["IN_TEMPLATE"] = 17] = "IN_TEMPLATE"; - InsertionMode[InsertionMode["AFTER_BODY"] = 18] = "AFTER_BODY"; - InsertionMode[InsertionMode["IN_FRAMESET"] = 19] = "IN_FRAMESET"; - InsertionMode[InsertionMode["AFTER_FRAMESET"] = 20] = "AFTER_FRAMESET"; - InsertionMode[InsertionMode["AFTER_AFTER_BODY"] = 21] = "AFTER_AFTER_BODY"; - InsertionMode[InsertionMode["AFTER_AFTER_FRAMESET"] = 22] = "AFTER_AFTER_FRAMESET"; -})(InsertionMode || (InsertionMode = {})); -const BASE_LOC = { - startLine: -1, - startCol: -1, - startOffset: -1, - endLine: -1, - endCol: -1, - endOffset: -1, -}; -const TABLE_STRUCTURE_TAGS = new Set([html_js_1.TAG_ID.TABLE, html_js_1.TAG_ID.TBODY, html_js_1.TAG_ID.TFOOT, html_js_1.TAG_ID.THEAD, html_js_1.TAG_ID.TR]); -const defaultParserOptions = { - scriptingEnabled: true, - sourceCodeLocationInfo: false, - treeAdapter: default_js_1.defaultTreeAdapter, - onParseError: null, -}; -//Parser -class Parser { - constructor(options, document, fragmentContext = null, scriptHandler = null) { - this.fragmentContext = fragmentContext; - this.scriptHandler = scriptHandler; - this.currentToken = null; - this.stopped = false; - this.insertionMode = InsertionMode.INITIAL; - this.originalInsertionMode = InsertionMode.INITIAL; - this.headElement = null; - this.formElement = null; - /** Indicates that the current node is not an element in the HTML namespace */ - this.currentNotInHTML = false; - /** - * The template insertion mode stack is maintained from the left. - * Ie. the topmost element will always have index 0. - */ - this.tmplInsertionModeStack = []; - this.pendingCharacterTokens = []; - this.hasNonWhitespacePendingCharacterToken = false; - this.framesetOk = true; - this.skipNextNewLine = false; - this.fosterParentingEnabled = false; - this.options = Object.assign(Object.assign({}, defaultParserOptions), options); - this.treeAdapter = this.options.treeAdapter; - this.onParseError = this.options.onParseError; - // Always enable location info if we report parse errors. - if (this.onParseError) { - this.options.sourceCodeLocationInfo = true; - } - this.document = document !== null && document !== void 0 ? document : this.treeAdapter.createDocument(); - this.tokenizer = new index_js_1.Tokenizer(this.options, this); - this.activeFormattingElements = new formatting_element_list_js_1.FormattingElementList(this.treeAdapter); - this.fragmentContextID = fragmentContext ? (0, html_js_1.getTagID)(this.treeAdapter.getTagName(fragmentContext)) : html_js_1.TAG_ID.UNKNOWN; - this._setContextModes(fragmentContext !== null && fragmentContext !== void 0 ? fragmentContext : this.document, this.fragmentContextID); - this.openElements = new open_element_stack_js_1.OpenElementStack(this.document, this.treeAdapter, this); - } - // API - static parse(html, options) { - const parser = new this(options); - parser.tokenizer.write(html, true); - return parser.document; - } - static getFragmentParser(fragmentContext, options) { - const opts = Object.assign(Object.assign({}, defaultParserOptions), options); - //NOTE: use a