/*
 * css-line-break 2.1.0 <https://github.com/niklasvh/css-line-break#readme>
 * Copyright (c) 2022 Niklas von Hertzen <https://hertzen.com>
 * Released under MIT License
 */

/*
 * text-segmentation 1.0.3 <https://github.com/niklasvh/text-segmentation>
 * Copyright (c) 2022 Niklas von Hertzen <https://hertzen.com>
 * Released under MIT License
 */

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

/* BACKGROUND_CLIP.BORDER_BOX */

/* BACKGROUND_CLIP.CONTENT_BOX */

/* BACKGROUND_CLIP.PADDING_BOX */

/* BACKGROUND_ORIGIN.BORDER_BOX */

/* BACKGROUND_ORIGIN.CONTENT_BOX */

/* BACKGROUND_ORIGIN.PADDING_BOX */

/* BACKGROUND_REPEAT.NO_REPEAT */

/* BACKGROUND_REPEAT.REPEAT */

/* BACKGROUND_REPEAT.REPEAT_X */

/* BACKGROUND_REPEAT.REPEAT_Y */

/* BORDER_STYLE.DASHED */

/* BORDER_STYLE.DOTTED */

/* BORDER_STYLE.DOUBLE */

/* BORDER_STYLE.NONE */

/* BORDER_STYLE.SOLID */

/* CSSImageType.LINEAR_GRADIENT */

/* CSSImageType.RADIAL_GRADIENT */

/* CSSImageType.URL */

/* CSSRadialExtent.CLOSEST_CORNER */

/* CSSRadialExtent.CLOSEST_SIDE */

/* CSSRadialExtent.FARTHEST_CORNER */

/* CSSRadialExtent.FARTHEST_SIDE */

/* CSSRadialShape.CIRCLE */

/* CSSRadialShape.ELLIPSE */

/* DIRECTION.LTR */

/* DIRECTION.RTL */

/* DISPLAY.BLOCK */

/* DISPLAY.CONTENTS */

/* DISPLAY.FLEX */

/* DISPLAY.FLOW */

/* DISPLAY.FLOW_ROOT */

/* DISPLAY.GRID */

/* DISPLAY.INLINE */

/* DISPLAY.INLINE_BLOCK */

/* DISPLAY.INLINE_FLEX */

/* DISPLAY.INLINE_GRID */

/* DISPLAY.INLINE_LIST_ITEM */

/* DISPLAY.INLINE_TABLE */

/* DISPLAY.LIST_ITEM */

/* DISPLAY.NONE */

/* DISPLAY.RUBY */

/* DISPLAY.RUBY_BASE */

/* DISPLAY.RUBY_BASE_CONTAINER */

/* DISPLAY.RUBY_TEXT */

/* DISPLAY.RUBY_TEXT_CONTAINER */

/* DISPLAY.RUN_IN */

/* DISPLAY.SUBGRID */

/* DISPLAY.TABLE */

/* DISPLAY.TABLE_CAPTION */

/* DISPLAY.TABLE_CELL */

/* DISPLAY.TABLE_COLUMN */

/* DISPLAY.TABLE_COLUMN_GROUP */

/* DISPLAY.TABLE_FOOTER_GROUP */

/* DISPLAY.TABLE_HEADER_GROUP */

/* DISPLAY.TABLE_ROW */

/* DISPLAY.TABLE_ROW_GROUP */

/* DebuggerType.ALL */

/* DebuggerType.CLONE */

/* DebuggerType.NONE */

/* DebuggerType.PARSE */

/* DebuggerType.RENDER */

/* EffectTarget.BACKGROUND_BORDERS */

/* EffectTarget.CONTENT */

/* EffectType.CLIP */

/* EffectType.OPACITY */

/* EffectType.TRANSFORM */

/* FLAGS.CREATES_REAL_STACKING_CONTEXT */

/* FLAGS.CREATES_STACKING_CONTEXT */

/* FLAGS.DEBUG_RENDER */

/* FLAGS.IS_LIST_OWNER */

/* FLOAT.INLINE_END */

/* FLOAT.INLINE_START */

/* FLOAT.LEFT */

/* FLOAT.NONE */

/* FLOAT.RIGHT */

/* FONT_STYLE.ITALIC */

/* FONT_STYLE.NORMAL */

/* FONT_STYLE.OBLIQUE */

/* LIST_STYLE_POSITION.INSIDE */

/* LIST_STYLE_POSITION.OUTSIDE */

/* LIST_STYLE_TYPE.ARABIC_INDIC */

/* LIST_STYLE_TYPE.ARMENIAN */

/* LIST_STYLE_TYPE.BENGALI */

/* LIST_STYLE_TYPE.CAMBODIAN */

/* LIST_STYLE_TYPE.CIRCLE */

/* LIST_STYLE_TYPE.CJK_DECIMAL */

/* LIST_STYLE_TYPE.CJK_EARTHLY_BRANCH */

/* LIST_STYLE_TYPE.CJK_HEAVENLY_STEM */

/* LIST_STYLE_TYPE.CJK_IDEOGRAPHIC */

/* LIST_STYLE_TYPE.DECIMAL */

/* LIST_STYLE_TYPE.DECIMAL_LEADING_ZERO */

/* LIST_STYLE_TYPE.DEVANAGARI */

/* LIST_STYLE_TYPE.DISC */

/* LIST_STYLE_TYPE.DISCLOSURE_CLOSED */

/* LIST_STYLE_TYPE.DISCLOSURE_OPEN */

/* LIST_STYLE_TYPE.ETHIOPIC_NUMERIC */

/* LIST_STYLE_TYPE.GEORGIAN */

/* LIST_STYLE_TYPE.GUJARATI */

/* LIST_STYLE_TYPE.GURMUKHI */

/* LIST_STYLE_TYPE.HEBREW */

/* LIST_STYLE_TYPE.HIRAGANA */

/* LIST_STYLE_TYPE.HIRAGANA_IROHA */

/* LIST_STYLE_TYPE.JAPANESE_FORMAL */

/* LIST_STYLE_TYPE.JAPANESE_INFORMAL */

/* LIST_STYLE_TYPE.KANNADA */

/* LIST_STYLE_TYPE.KATAKANA */

/* LIST_STYLE_TYPE.KATAKANA_IROHA */

/* LIST_STYLE_TYPE.KHMER */

/* LIST_STYLE_TYPE.KOREAN_HANGUL_FORMAL */

/* LIST_STYLE_TYPE.KOREAN_HANJA_FORMAL */

/* LIST_STYLE_TYPE.KOREAN_HANJA_INFORMAL */

/* LIST_STYLE_TYPE.LAO */

/* LIST_STYLE_TYPE.LOWER_ALPHA */

/* LIST_STYLE_TYPE.LOWER_ARMENIAN */

/* LIST_STYLE_TYPE.LOWER_GREEK */

/* LIST_STYLE_TYPE.LOWER_ROMAN */

/* LIST_STYLE_TYPE.MALAYALAM */

/* LIST_STYLE_TYPE.MONGOLIAN */

/* LIST_STYLE_TYPE.MYANMAR */

/* LIST_STYLE_TYPE.NONE */

/* LIST_STYLE_TYPE.ORIYA */

/* LIST_STYLE_TYPE.PERSIAN */

/* LIST_STYLE_TYPE.SIMP_CHINESE_FORMAL */

/* LIST_STYLE_TYPE.SIMP_CHINESE_INFORMAL */

/* LIST_STYLE_TYPE.SQUARE */

/* LIST_STYLE_TYPE.TAMIL */

/* LIST_STYLE_TYPE.TELUGU */

/* LIST_STYLE_TYPE.THAI */

/* LIST_STYLE_TYPE.TIBETAN */

/* LIST_STYLE_TYPE.TRAD_CHINESE_FORMAL */

/* LIST_STYLE_TYPE.TRAD_CHINESE_INFORMAL */

/* LIST_STYLE_TYPE.UPPER_ALPHA */

/* LIST_STYLE_TYPE.UPPER_ARMENIAN */

/* LIST_STYLE_TYPE.UPPER_ROMAN */

/* OVERFLOW.AUTO */

/* OVERFLOW.CLIP */

/* OVERFLOW.HIDDEN */

/* OVERFLOW.SCROLL */

/* OVERFLOW.VISIBLE */

/* OVERFLOW_WRAP.BREAK_WORD */

/* OVERFLOW_WRAP.NORMAL */

/* PAINT_ORDER_LAYER.FILL */

/* PAINT_ORDER_LAYER.MARKERS */

/* PAINT_ORDER_LAYER.STROKE */

/* POSITION.ABSOLUTE */

/* POSITION.FIXED */

/* POSITION.RELATIVE */

/* POSITION.STATIC */

/* POSITION.STICKY */

/* PathType.BEZIER_CURVE */

/* PathType.VECTOR */

/* PropertyDescriptorParsingType.IDENT_VALUE */

/* PropertyDescriptorParsingType.LIST */

/* PropertyDescriptorParsingType.TOKEN_VALUE */

/* PropertyDescriptorParsingType.TYPE_VALUE */

/* PropertyDescriptorParsingType.VALUE */

/* TEXT_ALIGN.CENTER */

/* TEXT_ALIGN.LEFT */

/* TEXT_ALIGN.RIGHT */

/* TEXT_DECORATION_LINE.BLINK */

/* TEXT_DECORATION_LINE.LINE_THROUGH */

/* TEXT_DECORATION_LINE.NONE */

/* TEXT_DECORATION_LINE.OVERLINE */

/* TEXT_DECORATION_LINE.UNDERLINE */

/* TEXT_TRANSFORM.CAPITALIZE */

/* TEXT_TRANSFORM.LOWERCASE */

/* TEXT_TRANSFORM.NONE */

/* TEXT_TRANSFORM.UPPERCASE */

/* TokenType.AT_KEYWORD_TOKEN */

/* TokenType.BAD_STRING_TOKEN */

/* TokenType.BAD_URL_TOKEN */

/* TokenType.CDC_TOKEN */

/* TokenType.CDO_TOKEN */

/* TokenType.COLON_TOKEN */

/* TokenType.COLUMN_TOKEN */

/* TokenType.COMMA_TOKEN */

/* TokenType.DASH_MATCH_TOKEN */

/* TokenType.DELIM_TOKEN */

/* TokenType.DIMENSION_TOKEN */

/* TokenType.EOF_TOKEN */

/* TokenType.FUNCTION */

/* TokenType.FUNCTION_TOKEN */

/* TokenType.HASH_TOKEN */

/* TokenType.IDENT_TOKEN */

/* TokenType.INCLUDE_MATCH_TOKEN */

/* TokenType.LEFT_CURLY_BRACKET_TOKEN */

/* TokenType.LEFT_PARENTHESIS_TOKEN */

/* TokenType.LEFT_SQUARE_BRACKET_TOKEN */

/* TokenType.NUMBER_TOKEN */

/* TokenType.PERCENTAGE_TOKEN */

/* TokenType.PREFIX_MATCH_TOKEN */

/* TokenType.RIGHT_CURLY_BRACKET_TOKEN */

/* TokenType.RIGHT_PARENTHESIS_TOKEN */

/* TokenType.RIGHT_SQUARE_BRACKET_TOKEN */

/* TokenType.SEMICOLON_TOKEN */

/* TokenType.STRING_TOKEN */

/* TokenType.SUBSTRING_MATCH_TOKEN */

/* TokenType.SUFFIX_MATCH_TOKEN */

/* TokenType.UNICODE_RANGE_TOKEN */

/* TokenType.URL_TOKEN */

/* TokenType.WHITESPACE_TOKEN */

/* VISIBILITY.COLLAPSE */

/* VISIBILITY.HIDDEN */

/* VISIBILITY.VISIBLE */

/* binding */

/* harmony export */

/**
     * 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

// doesn't support 3D transforms at the moment

// 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

// https://www.w3.org/TR/css-syntax-3

// 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=css-line-break.es5.js.map

//# sourceMappingURL=text-segmentation.es5.js.map

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