/*
     * utrie 1.0.2 <https://github.com/niklasvh/utrie>
     * Copyright (c) 2022 Niklas von Hertzen <https://hertzen.com>
     * Released under MIT License
     */

/* ABSOLUTE */

/* ALL */

/* ARABIC_INDIC */

/* ARMENIAN */

/* AT_KEYWORD_TOKEN */

/* AUTO */

/* BACKGROUND_BORDERS */

/* BAD_STRING_TOKEN */

/* BAD_URL_TOKEN */

/* BENGALI */

/* BEZIER_CURVE */

/* BLINK */

/* BLOCK */

/* BORDER_BOX */

/* BREAK_WORD */

/* CAMBODIAN */

/* CAPITALIZE */

/* CDC_TOKEN */

/* CDO_TOKEN */

/* CENTER */

/* CIRCLE */

/* CJK_DECIMAL */

/* CJK_EARTHLY_BRANCH */

/* CJK_HEAVENLY_STEM */

/* CJK_IDEOGRAPHIC */

/* CLIP */

/* CLONE */

/* CLOSEST_CORNER */

/* CLOSEST_SIDE */

/* COLLAPSE */

/* COLON_TOKEN */

/* COLUMN_TOKEN */

/* COMMA_TOKEN */

/* CONTENT */

/* CONTENTS */

/* CONTENT_BOX */

/* CREATES_REAL_STACKING_CONTEXT */

/* CREATES_STACKING_CONTEXT */

/* DASHED */

/* DASH_MATCH_TOKEN */

/* DEBUG_RENDER */

/* DECIMAL */

/* DECIMAL_LEADING_ZERO */

/* DELIM_TOKEN */

/* DEVANAGARI */

/* DIMENSION_TOKEN */

/* DISC */

/* DISCLOSURE_CLOSED */

/* DISCLOSURE_OPEN */

/* DOTTED */

/* DOUBLE */

/* ELLIPSE */

/* EOF_TOKEN */

/* ETHIOPIC_NUMERIC */

/* FARTHEST_CORNER */

/* FARTHEST_SIDE */

/* FILL */

/* FIXED */

/* FLEX */

/* FLOW */

/* FLOW_ROOT */

/* FUNCTION */

/* FUNCTION_TOKEN */

/* GEORGIAN */

/* GRID */

/* GUJARATI */

/* GURMUKHI */

/* HASH_TOKEN */

/* HEBREW */

/* HIDDEN */

/* HIRAGANA */

/* HIRAGANA_IROHA */

/* IDENT_TOKEN */

/* IDENT_VALUE */

/* INCLUDE_MATCH_TOKEN */

/* INLINE */

/* INLINE_BLOCK */

/* INLINE_END */

/* INLINE_FLEX */

/* INLINE_GRID */

/* INLINE_LIST_ITEM */

/* INLINE_START */

/* INLINE_TABLE */

/* INSIDE */

/* IS_LIST_OWNER */

/* ITALIC */

/* JAPANESE_FORMAL */

/* JAPANESE_INFORMAL */

/* KANNADA */

/* KATAKANA */

/* KATAKANA_IROHA */

/* KHMER */

/* KOREAN_HANGUL_FORMAL */

/* KOREAN_HANJA_FORMAL */

/* KOREAN_HANJA_INFORMAL */

/* LAO */

/* LEFT */

/* LEFT_CURLY_BRACKET_TOKEN */

/* LEFT_PARENTHESIS_TOKEN */

/* LEFT_SQUARE_BRACKET_TOKEN */

/* LINEAR_GRADIENT */

/* LINE_THROUGH */

/* LIST */

/* LIST_ITEM */

/* LOWERCASE */

/* LOWER_ALPHA */

/* LOWER_ARMENIAN */

/* LOWER_GREEK */

/* LOWER_ROMAN */

/* LTR */

/* MALAYALAM */

/* MARKERS */

/* MONGOLIAN */

/* MYANMAR */

/* NONE */

/* NORMAL */

/* NO_REPEAT */

/* NUMBER_TOKEN */

/* OBLIQUE */

/* OPACITY */

/* ORIYA */

/* OUTSIDE */

/* OVERLINE */

/* PADDING_BOX */

/* PARSE */

/* PERCENTAGE_TOKEN */

/* PERSIAN */

/* PREFIX_MATCH_TOKEN */

/* RADIAL_GRADIENT */

/* RELATIVE */

/* RENDER */

/* REPEAT */

/* REPEAT_X */

/* REPEAT_Y */

/* RIGHT */

/* RIGHT_CURLY_BRACKET_TOKEN */

/* RIGHT_PARENTHESIS_TOKEN */

/* RIGHT_SQUARE_BRACKET_TOKEN */

/* RTL */

/* RUBY */

/* RUBY_BASE */

/* RUBY_BASE_CONTAINER */

/* RUBY_TEXT */

/* RUBY_TEXT_CONTAINER */

/* RUN_IN */

/* SCROLL */

/* SEMICOLON_TOKEN */

/* SIMP_CHINESE_FORMAL */

/* SIMP_CHINESE_INFORMAL */

/* SOLID */

/* SQUARE */

/* STATIC */

/* STICKY */

/* STRING_TOKEN */

/* STROKE */

/* SUBGRID */

/* SUBSTRING_MATCH_TOKEN */

/* SUFFIX_MATCH_TOKEN */

/* TABLE */

/* TABLE_CAPTION */

/* TABLE_CELL */

/* TABLE_COLUMN */

/* TABLE_COLUMN_GROUP */

/* TABLE_FOOTER_GROUP */

/* TABLE_HEADER_GROUP */

/* TABLE_ROW */

/* TABLE_ROW_GROUP */

/* TAMIL */

/* TELUGU */

/* THAI */

/* TIBETAN */

/* TOKEN_VALUE */

/* TRAD_CHINESE_FORMAL */

/* TRAD_CHINESE_INFORMAL */

/* TRANSFORM */

/* TYPE_VALUE */

/* UNDERLINE */

/* UNICODE_RANGE_TOKEN */

/* UPPERCASE */

/* UPPER_ALPHA */

/* UPPER_ARMENIAN */

/* UPPER_ROMAN */

/* URL */

/* URL_TOKEN */

/* VALUE */

/* VECTOR */

/* VISIBLE */

/* WHITESPACE_TOKEN */

/* global Reflect, Promise */

/*!
 * html2canvas 1.4.1 <https://html2canvas.hertzen.com>
 * Copyright (c) 2022 Niklas von Hertzen <https://hertzen.com>
 * Released under MIT License
 */

/*! *****************************************************************************
    Copyright (c) Microsoft Corporation.

    Permission to use, copy, modify, and/or distribute this software for any
    purpose with or without fee is hereby granted.

    THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
    REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
    AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
    INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
    LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
    OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
    PERFORMANCE OF THIS SOFTWARE.
    ***************************************************************************** */

/**
         * Get the value for a code point as stored in the Trie.
         *
         * @param codePoint the code point
         * @return the value
         */

/** @class */

/***/

/*break*/

/*return*/

/*yield**/

/*yield*/

//       surrogate code points will be so rare in practice that it's not worth it.

//   For this function, we need the code point data.

//   The main index has the code unit data.

// ( OP | HY ) × NU

// (PR | PO) × ( OP | HY )? NU

// 1. the background and borders of the element forming the stacking context.

// 16 bit data is stored in the index array itself.

// 3. For all its in-flow, non-positioned, block-level descendants in tree order:

// BMP uses a single level lookup.  BMP index starts at offset 0 in the Trie2 index.

// Chrome scrolls the parent document for some reason after the write to the cloned window???

// Compute the ratio ry/rx (which is to be the same as for "closest-side")

// Compute the ratio ry/rx (which is to be the same as for "farthest-side")

// Do not break Hangul syllable sequences.

// Do not break before SpacingMarks, or after Prepend characters.

// Draws a line at the baseline of the font

// Edge does not provide value for cssText

// Edge does not render background-images

// Fall through.  The code point is outside of the legal range of 0..0x10ffff.

// Firefox 55 does not render inline <img /> tags

// For supplementary characters, a useful default is to treat characters in the range 10000..1FFFD as AL

// GB11 Do not break within emoji modifier sequences or emoji zwj sequences.

// GB12 Do not break within emoji flag sequences.

// GB3 Do not break between a CR and LF

// GB4 Otherwise, break before and after controls.

// GB5

// GB6

// GB7

// GB8

// GB9 Do not break before extending characters or ZWJ.

// GB9a

// If the background-size is auto or auto auto:

// If the image has both horizontal and vertical intrinsic dimensions, it's rendered at that size.

// If the image has intrinsic proportions, it's stretched to the specified dimension.

// If the image has no intrinsic dimensions and has no intrinsic proportions,

// If the image has no intrinsic proportions, it's stretched to the specified dimension.

// If the image has only one intrinsic dimension and has intrinsic proportions, it's rendered at the size corresponding to that one dimension.

// If the shape is an ellipse, it exactly meets the closest side in each dimension.

// If the shape is an ellipse, the ending shape is given the same aspect ratio it would have if farthest-side were specified.

// If the shape is an ellipse, the ending shape is given the same aspect-ratio it would have if closest-side were specified.

// Inline XML images may fail to parse, throwing an Error later on

// LB10 Treat any remaining combining mark or ZWJ as AL.

// LB11 Do not break before or after Word joiner and related characters.

// LB12 Do not break after NBSP and related characters.

// LB12a Do not break before NBSP and related characters, except after spaces and hyphens.

// LB13 Do not break before ‘]’ or ‘!’ or ‘;’ or ‘/’, even after spaces.

// LB14 Do not break after ‘[’, even after spaces.

// LB15 Do not break within ‘”[’, even with intervening spaces.

// LB16 Do not break between closing punctuation and a nonstarter (lb=NS), even with intervening spaces.

// LB17 Do not break within ‘——’, even with intervening spaces.

// LB18 Break after spaces.

// LB19 Do not break before or after quotation marks, such as ‘ ” ’.

// LB20 Break before and after unresolved CB.

// LB21 Do not break before hyphen-minus, other hyphens, fixed-width spaces, small kana, and other non-starters, or after acute accents.

// LB21a Don't break after Hebrew + Hyphen.

// LB21b Don’t break between Solidus and Hebrew letters.

// LB22 Do not break before ellipsis.

// LB23 Do not break between digits and letters.

// LB23a Do not break between numeric prefixes and ideographs, or between ideographs and numeric postfixes.

// LB24 Do not break between numeric prefix/postfix and letters, or between letters and prefix/postfix.

// LB25 Do not break between the following pairs of classes relevant to numbers:

// LB26 Do not break a Korean syllable.

// LB27 Treat a Korean Syllable Block the same as ID.

// LB28 Do not break between alphabetics (“at”).

// LB29 Do not break between numeric punctuation and alphabetics (“e.g.”).

// LB30 Do not break between letters, numbers, or ordinary symbols and opening or closing parentheses.

// LB30a Break between two regional indicator symbols if and only if there are an even number of regional

// LB30b Do not break between an emoji base and an emoji modifier.

// LB6 Do not break before hard line breaks.

// LB7 Do not break before spaces or zero width space.

// LB8 Break before any character following a zero-width space, even if one or more spaces intervene.

// LB8a Do not break after a zero width joiner.

// LB9 Do not break a combining character sequence; treat it as if it has the line breaking class of

// Lead Surrogate Code Point.  A Separate index section is stored for

// NU (NU | SY | IS)* (CL | CP)? × (PO | PR))

// NU (NU | SY | IS)* × (NU | SY | IS | CL | CP)

// NU ×	(NU | SY | IS)

// Note: this expression could be refactored for slightly improved efficiency, but

// Ordinary BMP code point, excluding leading surrogates.

// Same as closest-corner, except the ending shape is sized based on the farthest corner.

// Same as closest-side, except the ending shape is sized based on the farthest side(s)

// Supplemental code point, use two-level lookup.

// TODO As some browsers display the line as more than 1px if the font-size is big,

// TODO If the image has no intrinsic dimensions but has intrinsic proportions, it's rendered as if contain had been specified instead.

// TODO try and find exact position for line-through

// TODO use correct font-size

// That is, do not break between regional indicator (RI) symbols

// The ending shape is sized so that that it exactly meets the side of the gradient box closest to the gradient’s center.

// The ending shape is sized so that that it passes through the corner of the gradient box closest to the gradient’s center.

// The other dimension is computed using the specified dimension and the intrinsic proportions.

// The unspecified dimension is computed using the image's corresponding intrinsic dimension,

// The unspecified dimension is computed using the specified dimension and the intrinsic proportions.

// Use a lookup table to find the index.

// accessing node.sheet.cssRules throws a DOMException

// and characters in the ranges 20000..2FFFD and 30000..3FFFD as ID, until the implementation can be revised

// dashed round edge gap

// eslint-disable-next-line @typescript-eslint/no-explicit-any

// eslint-disable-next-line no-console

// getBoundingClientRect takes transforms into account

// http://www.w3.org/TR/css3-background/#special-backgrounds

// https://www.w3.org/TR/css-position-3/#painting-order

// if there is an odd number of RI characters before the break point.

// if there is one. If there is no such intrinsic dimension,

// indicators preceding the position of the break.

// ios won't scroll without it

// it becomes the corresponding dimension of the background positioning area.

// it's rendered at the size of the background positioning area.

// lead surrogate code units and code points.

// need to take that into account both in position and size

// prevent unhandled rejection

// safari doesn't parse string tokens correctly because of lack of quotes

// the base character in all of the following rules. Treat ZWJ as if it were CM.

// to take into account the actual line breaking properties for these characters.

// y-middle

// zwj emojis

//# sourceMappingURL=html2canvas.js.map

//ios safari 10.3 taints canvas with data urls unless crossOrigin is set to anonymous
