{"version":3,"sources":["node_modules/@angular/material/fesm2022/radio.mjs","node_modules/@angular/material/fesm2022/autocomplete.mjs","node_modules/marked/lib/marked.esm.js","node_modules/ngx-markdown/fesm2022/ngx-markdown.mjs","libs/galaxy/pipes/src/sentence-case/sentence-case.pipe.ts","libs/galaxy/pipes/src/address/address.pipe.ts","libs/galaxy/pipes/src/async-status/async-status.pipe.ts","node_modules/currency-symbol-map/map.js","node_modules/currency-symbol-map/currency-symbol-map.js","node_modules/locale-currency/map.js","node_modules/locale-currency/index.js","node_modules/date-fns/esm/locale/cs/_lib/formatDistance/index.js","node_modules/date-fns/esm/locale/cs/_lib/formatLong/index.js","node_modules/date-fns/esm/locale/cs/_lib/formatRelative/index.js","node_modules/date-fns/esm/locale/cs/_lib/localize/index.js","node_modules/date-fns/esm/locale/cs/_lib/match/index.js","node_modules/date-fns/esm/locale/cs/index.js","node_modules/date-fns/esm/locale/de/_lib/formatDistance/index.js","node_modules/date-fns/esm/locale/de/_lib/formatLong/index.js","node_modules/date-fns/esm/locale/de/_lib/formatRelative/index.js","node_modules/date-fns/esm/locale/de/_lib/localize/index.js","node_modules/date-fns/esm/locale/de/_lib/match/index.js","node_modules/date-fns/esm/locale/de/index.js","node_modules/date-fns/esm/locale/en-CA/_lib/formatDistance/index.js","node_modules/date-fns/esm/locale/en-CA/_lib/formatLong/index.js","node_modules/date-fns/esm/locale/en-CA/index.js","node_modules/date-fns/esm/locale/es/_lib/formatDistance/index.js","node_modules/date-fns/esm/locale/es/_lib/formatLong/index.js","node_modules/date-fns/esm/locale/es/_lib/formatRelative/index.js","node_modules/date-fns/esm/locale/es/_lib/localize/index.js","node_modules/date-fns/esm/locale/es/_lib/match/index.js","node_modules/date-fns/esm/locale/es/index.js","node_modules/date-fns/esm/locale/fr/_lib/formatDistance/index.js","node_modules/date-fns/esm/locale/fr/_lib/formatLong/index.js","node_modules/date-fns/esm/locale/fr/_lib/formatRelative/index.js","node_modules/date-fns/esm/locale/fr/_lib/localize/index.js","node_modules/date-fns/esm/locale/fr/_lib/match/index.js","node_modules/date-fns/esm/locale/fr/index.js","node_modules/date-fns/esm/locale/fr-CA/_lib/formatLong/index.js","node_modules/date-fns/esm/locale/fr-CA/index.js","node_modules/date-fns/esm/locale/nl/_lib/formatDistance/index.js","node_modules/date-fns/esm/locale/nl/_lib/formatLong/index.js","node_modules/date-fns/esm/locale/nl/_lib/formatRelative/index.js","node_modules/date-fns/esm/locale/nl/_lib/localize/index.js","node_modules/date-fns/esm/locale/nl/_lib/match/index.js","node_modules/date-fns/esm/locale/nl/index.js","node_modules/date-fns/esm/locale/index.js","libs/galaxy/utility/locale/src/locale-utils.ts","libs/galaxy/utility/locale/public_api.ts","libs/galaxy/utility/locale/index.ts","libs/galaxy/utility/currency-utils/src/currency-utils.ts","libs/galaxy/utility/currency-utils/public_api.ts","libs/galaxy/utility/currency-utils/index.ts","libs/galaxy/pipes/src/currency/currency.pipe.ts","libs/galaxy/utility/date-utils/src/interface.ts","libs/galaxy/utility/date-utils/src/date-utils.ts","libs/galaxy/utility/date-utils/public_api.ts","libs/galaxy/utility/date-utils/index.ts","libs/galaxy/pipes/src/date/date.pipe.ts","libs/galaxy/utility/ordinal-utils/src/ordinal-utils.ts","libs/galaxy/utility/ordinal-utils/public_api.ts","libs/galaxy/utility/ordinal-utils/index.ts","libs/galaxy/pipes/src/ordinal/ordinal.pipe.ts","libs/galaxy/pipes/src/i-trust-this-html/i-trust-this-html.pipe.ts","node_modules/autolinker/dist/es2015/version.js","node_modules/autolinker/dist/es2015/utils.js","node_modules/autolinker/dist/es2015/regex-lib.js","node_modules/autolinker/dist/es2015/html-tag.js","node_modules/autolinker/dist/es2015/truncate/truncate-smart.js","node_modules/autolinker/dist/es2015/truncate/truncate-middle.js","node_modules/autolinker/dist/es2015/truncate/truncate-end.js","node_modules/autolinker/dist/es2015/anchor-tag-builder.js","node_modules/autolinker/dist/es2015/match/abstract-match.js","node_modules/autolinker/dist/es2015/parser/tld-regex.js","node_modules/autolinker/dist/es2015/parser/uri-utils.js","node_modules/autolinker/dist/es2015/match/url-match.js","node_modules/autolinker/dist/es2015/parser/email-utils.js","node_modules/autolinker/dist/es2015/match/email-match.js","node_modules/autolinker/dist/es2015/parser/hashtag-utils.js","node_modules/autolinker/dist/es2015/match/hashtag-match.js","node_modules/autolinker/dist/es2015/parser/mention-utils.js","node_modules/autolinker/dist/es2015/match/mention-match.js","node_modules/autolinker/dist/es2015/parser/phone-number-utils.js","node_modules/autolinker/dist/es2015/match/phone-match.js","node_modules/autolinker/dist/es2015/parser/parse-matches.js","node_modules/autolinker/dist/es2015/htmlParser/parse-html.js","node_modules/autolinker/dist/es2015/autolinker.js","node_modules/autolinker/dist/es2015/match/match.js","node_modules/autolinker/dist/es2015/match/index.js","node_modules/autolinker/dist/es2015/parser/index.js","node_modules/autolinker/dist/es2015/index.js","libs/galaxy/pipes/src/linky/linky.pipe.ts","libs/galaxy/pipes/src/format-stat/format-stat.pipe.ts","libs/galaxy/pipes/src/truncate-url/truncate-url.pipe.ts","libs/galaxy/pipes/src/markdown/markdown.pipe.ts","libs/galaxy/pipes/src/pipes.module.ts","libs/galaxy/pipes/public_api.ts","libs/galaxy/pipes/index.ts","node_modules/libphonenumber-js/metadata.min.json.js","node_modules/libphonenumber-js/min/exports/withMetadataArgument.js","node_modules/libphonenumber-js/es6/constants.js","node_modules/libphonenumber-js/es6/ParseError.js","node_modules/libphonenumber-js/es6/tools/semver-compare.js","node_modules/libphonenumber-js/es6/helpers/isObject.js","node_modules/libphonenumber-js/es6/metadata.js","node_modules/libphonenumber-js/es6/helpers/extension/createExtensionPattern.js","node_modules/libphonenumber-js/es6/helpers/isViablePhoneNumber.js","node_modules/libphonenumber-js/es6/helpers/extension/extractExtension.js","node_modules/libphonenumber-js/es6/helpers/parseDigits.js","node_modules/libphonenumber-js/es6/parseIncompletePhoneNumber.js","node_modules/libphonenumber-js/es6/getCountryCallingCode.js","node_modules/libphonenumber-js/es6/helpers/mergeArrays.js","node_modules/libphonenumber-js/es6/helpers/checkNumberLength.js","node_modules/libphonenumber-js/es6/isPossible.js","node_modules/libphonenumber-js/es6/helpers/matchesEntirely.js","node_modules/libphonenumber-js/es6/helpers/getNumberType.js","node_modules/libphonenumber-js/es6/isValid.js","node_modules/libphonenumber-js/es6/helpers/getPossibleCountriesForNumber.js","node_modules/libphonenumber-js/es6/helpers/applyInternationalSeparatorStyle.js","node_modules/libphonenumber-js/es6/helpers/formatNationalNumberUsingFormat.js","node_modules/libphonenumber-js/es6/helpers/getIddPrefix.js","node_modules/libphonenumber-js/es6/helpers/RFC3966.js","node_modules/libphonenumber-js/es6/format.js","node_modules/libphonenumber-js/es6/PhoneNumber.js","node_modules/libphonenumber-js/es6/helpers/stripIddPrefix.js","node_modules/libphonenumber-js/es6/helpers/extractNationalNumberFromPossiblyIncompleteNumber.js","node_modules/libphonenumber-js/es6/helpers/extractNationalNumber.js","node_modules/libphonenumber-js/es6/helpers/extractCountryCallingCodeFromInternationalNumberWithoutPlusSign.js","node_modules/libphonenumber-js/es6/helpers/extractCountryCallingCode.js","node_modules/libphonenumber-js/es6/helpers/getCountryByNationalNumber.js","node_modules/libphonenumber-js/es6/helpers/getCountryByCallingCode.js","node_modules/libphonenumber-js/es6/helpers/extractPhoneContext.js","node_modules/libphonenumber-js/es6/helpers/extractFormattedPhoneNumberFromPossibleRfc3966NumberUri.js","node_modules/libphonenumber-js/es6/parse.js","node_modules/libphonenumber-js/es6/normalizeArguments.js","node_modules/libphonenumber-js/es6/legacy/parse.js","node_modules/libphonenumber-js/index.es6.exports/parse.js","node_modules/libphonenumber-js/es6/legacy/format.js","node_modules/libphonenumber-js/index.es6.exports/format.js","node_modules/libphonenumber-js/es6/parsePhoneNumberWithError_.js","node_modules/libphonenumber-js/es6/parsePhoneNumberWithError.js","node_modules/libphonenumber-js/es6/parsePhoneNumber_.js","node_modules/libphonenumber-js/es6/parsePhoneNumber.js","node_modules/libphonenumber-js/es6/getCountries.js","node_modules/libphonenumber-js/core/index.js","node_modules/libphonenumber-js/min/exports/parsePhoneNumberWithError.js","node_modules/libphonenumber-js/min/exports/parsePhoneNumber.js","node_modules/libphonenumber-js/min/exports/getCountries.js","node_modules/libphonenumber-js/min/exports/getCountryCallingCode.js","node_modules/libphonenumber-js/es6/legacy/getNumberType.js","node_modules/libphonenumber-js/es6/legacy/isValidNumber.js","node_modules/libphonenumber-js/index.es6.exports/isValidNumber.js","node_modules/libphonenumber-js/index.js"],"sourcesContent":["import { _IdGenerator, FocusMonitor } from '@angular/cdk/a11y';\nimport { UniqueSelectionDispatcher } from '@angular/cdk/collections';\nimport * as i0 from '@angular/core';\nimport { forwardRef, InjectionToken, inject, ChangeDetectorRef, EventEmitter, booleanAttribute, Directive, Output, ContentChildren, Input, ElementRef, NgZone, Renderer2, Injector, ANIMATION_MODULE_TYPE, HostAttributeToken, numberAttribute, afterNextRender, Component, ViewEncapsulation, ChangeDetectionStrategy, ViewChild, NgModule } from '@angular/core';\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { _StructuralStylesLoader, MatRipple, _MatInternalFormField, MatCommonModule, MatRippleModule } from '@angular/material/core';\nimport { _CdkPrivateStyleLoader } from '@angular/cdk/private';\n\n/** Change event object emitted by radio button and radio group. */\nconst _c0 = [\"input\"];\nconst _c1 = [\"formField\"];\nconst _c2 = [\"*\"];\nclass MatRadioChange {\n source;\n value;\n constructor(/** The radio button that emits the change event. */\n source, /** The value of the radio button. */\n value) {\n this.source = source;\n this.value = value;\n }\n}\n/**\n * Provider Expression that allows mat-radio-group to register as a ControlValueAccessor. This\n * allows it to support [(ngModel)] and ngControl.\n * @docs-private\n */\nconst MAT_RADIO_GROUP_CONTROL_VALUE_ACCESSOR = {\n provide: NG_VALUE_ACCESSOR,\n useExisting: /*#__PURE__*/forwardRef(() => MatRadioGroup),\n multi: true\n};\n/**\n * Injection token that can be used to inject instances of `MatRadioGroup`. It serves as\n * alternative token to the actual `MatRadioGroup` class which could cause unnecessary\n * retention of the class and its component metadata.\n */\nconst MAT_RADIO_GROUP = /*#__PURE__*/new InjectionToken('MatRadioGroup');\nconst MAT_RADIO_DEFAULT_OPTIONS = /*#__PURE__*/new InjectionToken('mat-radio-default-options', {\n providedIn: 'root',\n factory: MAT_RADIO_DEFAULT_OPTIONS_FACTORY\n});\nfunction MAT_RADIO_DEFAULT_OPTIONS_FACTORY() {\n return {\n color: 'accent',\n disabledInteractive: false\n };\n}\n/**\n * A group of radio buttons. May contain one or more `` elements.\n */\nlet MatRadioGroup = /*#__PURE__*/(() => {\n class MatRadioGroup {\n _changeDetector = inject(ChangeDetectorRef);\n /** Selected value for the radio group. */\n _value = null;\n /** The HTML name attribute applied to radio buttons in this group. */\n _name = inject(_IdGenerator).getId('mat-radio-group-');\n /** The currently selected radio button. Should match value. */\n _selected = null;\n /** Whether the `value` has been set to its initial value. */\n _isInitialized = false;\n /** Whether the labels should appear after or before the radio-buttons. Defaults to 'after' */\n _labelPosition = 'after';\n /** Whether the radio group is disabled. */\n _disabled = false;\n /** Whether the radio group is required. */\n _required = false;\n /** Subscription to changes in amount of radio buttons. */\n _buttonChanges;\n /** The method to be called in order to update ngModel */\n _controlValueAccessorChangeFn = () => {};\n /**\n * onTouch function registered via registerOnTouch (ControlValueAccessor).\n * @docs-private\n */\n onTouched = () => {};\n /**\n * Event emitted when the group value changes.\n * Change events are only emitted when the value changes due to user interaction with\n * a radio button (the same behavior as ``).\n */\n change = new EventEmitter();\n /** Child radio buttons. */\n _radios;\n /**\n * Theme color of the radio buttons in the group. This API is supported in M2\n * themes only, it has no effect in M3 themes. For color customization in M3, see https://material.angular.io/components/radio/styling.\n *\n * For information on applying color variants in M3, see\n * https://material.angular.io/guide/material-2-theming#optional-add-backwards-compatibility-styles-for-color-variants\n */\n color;\n /** Name of the radio button group. All radio buttons inside this group will use this name. */\n get name() {\n return this._name;\n }\n set name(value) {\n this._name = value;\n this._updateRadioButtonNames();\n }\n /** Whether the labels should appear after or before the radio-buttons. Defaults to 'after' */\n get labelPosition() {\n return this._labelPosition;\n }\n set labelPosition(v) {\n this._labelPosition = v === 'before' ? 'before' : 'after';\n this._markRadiosForCheck();\n }\n /**\n * Value for the radio-group. Should equal the value of the selected radio button if there is\n * a corresponding radio button with a matching value. If there is not such a corresponding\n * radio button, this value persists to be applied in case a new radio button is added with a\n * matching value.\n */\n get value() {\n return this._value;\n }\n set value(newValue) {\n if (this._value !== newValue) {\n // Set this before proceeding to ensure no circular loop occurs with selection.\n this._value = newValue;\n this._updateSelectedRadioFromValue();\n this._checkSelectedRadioButton();\n }\n }\n _checkSelectedRadioButton() {\n if (this._selected && !this._selected.checked) {\n this._selected.checked = true;\n }\n }\n /**\n * The currently selected radio button. If set to a new radio button, the radio group value\n * will be updated to match the new selected button.\n */\n get selected() {\n return this._selected;\n }\n set selected(selected) {\n this._selected = selected;\n this.value = selected ? selected.value : null;\n this._checkSelectedRadioButton();\n }\n /** Whether the radio group is disabled */\n get disabled() {\n return this._disabled;\n }\n set disabled(value) {\n this._disabled = value;\n this._markRadiosForCheck();\n }\n /** Whether the radio group is required */\n get required() {\n return this._required;\n }\n set required(value) {\n this._required = value;\n this._markRadiosForCheck();\n }\n /** Whether buttons in the group should be interactive while they're disabled. */\n get disabledInteractive() {\n return this._disabledInteractive;\n }\n set disabledInteractive(value) {\n this._disabledInteractive = value;\n this._markRadiosForCheck();\n }\n _disabledInteractive = false;\n constructor() {}\n /**\n * Initialize properties once content children are available.\n * This allows us to propagate relevant attributes to associated buttons.\n */\n ngAfterContentInit() {\n // Mark this component as initialized in AfterContentInit because the initial value can\n // possibly be set by NgModel on MatRadioGroup, and it is possible that the OnInit of the\n // NgModel occurs *after* the OnInit of the MatRadioGroup.\n this._isInitialized = true;\n // Clear the `selected` button when it's destroyed since the tabindex of the rest of the\n // buttons depends on it. Note that we don't clear the `value`, because the radio button\n // may be swapped out with a similar one and there are some internal apps that depend on\n // that behavior.\n this._buttonChanges = this._radios.changes.subscribe(() => {\n if (this.selected && !this._radios.find(radio => radio === this.selected)) {\n this._selected = null;\n }\n });\n }\n ngOnDestroy() {\n this._buttonChanges?.unsubscribe();\n }\n /**\n * Mark this group as being \"touched\" (for ngModel). Meant to be called by the contained\n * radio buttons upon their blur.\n */\n _touch() {\n if (this.onTouched) {\n this.onTouched();\n }\n }\n _updateRadioButtonNames() {\n if (this._radios) {\n this._radios.forEach(radio => {\n radio.name = this.name;\n radio._markForCheck();\n });\n }\n }\n /** Updates the `selected` radio button from the internal _value state. */\n _updateSelectedRadioFromValue() {\n // If the value already matches the selected radio, do nothing.\n const isAlreadySelected = this._selected !== null && this._selected.value === this._value;\n if (this._radios && !isAlreadySelected) {\n this._selected = null;\n this._radios.forEach(radio => {\n radio.checked = this.value === radio.value;\n if (radio.checked) {\n this._selected = radio;\n }\n });\n }\n }\n /** Dispatch change event with current selection and group value. */\n _emitChangeEvent() {\n if (this._isInitialized) {\n this.change.emit(new MatRadioChange(this._selected, this._value));\n }\n }\n _markRadiosForCheck() {\n if (this._radios) {\n this._radios.forEach(radio => radio._markForCheck());\n }\n }\n /**\n * Sets the model value. Implemented as part of ControlValueAccessor.\n * @param value\n */\n writeValue(value) {\n this.value = value;\n this._changeDetector.markForCheck();\n }\n /**\n * Registers a callback to be triggered when the model value changes.\n * Implemented as part of ControlValueAccessor.\n * @param fn Callback to be registered.\n */\n registerOnChange(fn) {\n this._controlValueAccessorChangeFn = fn;\n }\n /**\n * Registers a callback to be triggered when the control is touched.\n * Implemented as part of ControlValueAccessor.\n * @param fn Callback to be registered.\n */\n registerOnTouched(fn) {\n this.onTouched = fn;\n }\n /**\n * Sets the disabled state of the control. Implemented as a part of ControlValueAccessor.\n * @param isDisabled Whether the control should be disabled.\n */\n setDisabledState(isDisabled) {\n this.disabled = isDisabled;\n this._changeDetector.markForCheck();\n }\n static ɵfac = function MatRadioGroup_Factory(__ngFactoryType__) {\n return new (__ngFactoryType__ || MatRadioGroup)();\n };\n static ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: MatRadioGroup,\n selectors: [[\"mat-radio-group\"]],\n contentQueries: function MatRadioGroup_ContentQueries(rf, ctx, dirIndex) {\n if (rf & 1) {\n i0.ɵɵcontentQuery(dirIndex, MatRadioButton, 5);\n }\n if (rf & 2) {\n let _t;\n i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx._radios = _t);\n }\n },\n hostAttrs: [\"role\", \"radiogroup\", 1, \"mat-mdc-radio-group\"],\n inputs: {\n color: \"color\",\n name: \"name\",\n labelPosition: \"labelPosition\",\n value: \"value\",\n selected: \"selected\",\n disabled: [2, \"disabled\", \"disabled\", booleanAttribute],\n required: [2, \"required\", \"required\", booleanAttribute],\n disabledInteractive: [2, \"disabledInteractive\", \"disabledInteractive\", booleanAttribute]\n },\n outputs: {\n change: \"change\"\n },\n exportAs: [\"matRadioGroup\"],\n features: [i0.ɵɵProvidersFeature([MAT_RADIO_GROUP_CONTROL_VALUE_ACCESSOR, {\n provide: MAT_RADIO_GROUP,\n useExisting: MatRadioGroup\n }]), i0.ɵɵInputTransformsFeature]\n });\n }\n return MatRadioGroup;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet MatRadioButton = /*#__PURE__*/(() => {\n class MatRadioButton {\n _elementRef = inject(ElementRef);\n _changeDetector = inject(ChangeDetectorRef);\n _focusMonitor = inject(FocusMonitor);\n _radioDispatcher = inject(UniqueSelectionDispatcher);\n _defaultOptions = inject(MAT_RADIO_DEFAULT_OPTIONS, {\n optional: true\n });\n _ngZone = inject(NgZone);\n _renderer = inject(Renderer2);\n _uniqueId = inject(_IdGenerator).getId('mat-radio-');\n _cleanupClick;\n /** The unique ID for the radio button. */\n id = this._uniqueId;\n /** Analog to HTML 'name' attribute used to group radios for unique selection. */\n name;\n /** Used to set the 'aria-label' attribute on the underlying input element. */\n ariaLabel;\n /** The 'aria-labelledby' attribute takes precedence as the element's text alternative. */\n ariaLabelledby;\n /** The 'aria-describedby' attribute is read after the element's label and field type. */\n ariaDescribedby;\n /** Whether ripples are disabled inside the radio button */\n disableRipple = false;\n /** Tabindex of the radio button. */\n tabIndex = 0;\n /** Whether this radio button is checked. */\n get checked() {\n return this._checked;\n }\n set checked(value) {\n if (this._checked !== value) {\n this._checked = value;\n if (value && this.radioGroup && this.radioGroup.value !== this.value) {\n this.radioGroup.selected = this;\n } else if (!value && this.radioGroup && this.radioGroup.value === this.value) {\n // When unchecking the selected radio button, update the selected radio\n // property on the group.\n this.radioGroup.selected = null;\n }\n if (value) {\n // Notify all radio buttons with the same name to un-check.\n this._radioDispatcher.notify(this.id, this.name);\n }\n this._changeDetector.markForCheck();\n }\n }\n /** The value of this radio button. */\n get value() {\n return this._value;\n }\n set value(value) {\n if (this._value !== value) {\n this._value = value;\n if (this.radioGroup !== null) {\n if (!this.checked) {\n // Update checked when the value changed to match the radio group's value\n this.checked = this.radioGroup.value === value;\n }\n if (this.checked) {\n this.radioGroup.selected = this;\n }\n }\n }\n }\n /** Whether the label should appear after or before the radio button. Defaults to 'after' */\n get labelPosition() {\n return this._labelPosition || this.radioGroup && this.radioGroup.labelPosition || 'after';\n }\n set labelPosition(value) {\n this._labelPosition = value;\n }\n _labelPosition;\n /** Whether the radio button is disabled. */\n get disabled() {\n return this._disabled || this.radioGroup !== null && this.radioGroup.disabled;\n }\n set disabled(value) {\n this._setDisabled(value);\n }\n /** Whether the radio button is required. */\n get required() {\n return this._required || this.radioGroup && this.radioGroup.required;\n }\n set required(value) {\n this._required = value;\n }\n /**\n * Theme color of the radio button. This API is supported in M2 themes only, it\n * has no effect in M3 themes. For color customization in M3, see https://material.angular.io/components/radio/styling.\n *\n * For information on applying color variants in M3, see\n * https://material.angular.io/guide/material-2-theming#optional-add-backwards-compatibility-styles-for-color-variants\n */\n get color() {\n // As per M2 design specifications the selection control radio should use the accent color\n // palette by default. https://m2.material.io/components/radio-buttons#specs\n return this._color || this.radioGroup && this.radioGroup.color || this._defaultOptions && this._defaultOptions.color || 'accent';\n }\n set color(newValue) {\n this._color = newValue;\n }\n _color;\n /** Whether the radio button should remain interactive when it is disabled. */\n get disabledInteractive() {\n return this._disabledInteractive || this.radioGroup !== null && this.radioGroup.disabledInteractive;\n }\n set disabledInteractive(value) {\n this._disabledInteractive = value;\n }\n _disabledInteractive;\n /**\n * Event emitted when the checked state of this radio button changes.\n * Change events are only emitted when the value changes due to user interaction with\n * the radio button (the same behavior as ``).\n */\n change = new EventEmitter();\n /** The parent radio group. May or may not be present. */\n radioGroup;\n /** ID of the native input element inside `` */\n get inputId() {\n return `${this.id || this._uniqueId}-input`;\n }\n /** Whether this radio is checked. */\n _checked = false;\n /** Whether this radio is disabled. */\n _disabled;\n /** Whether this radio is required. */\n _required;\n /** Value assigned to this radio. */\n _value = null;\n /** Unregister function for _radioDispatcher */\n _removeUniqueSelectionListener = () => {};\n /** Previous value of the input's tabindex. */\n _previousTabIndex;\n /** The native `` element */\n _inputElement;\n /** Trigger elements for the ripple events. */\n _rippleTrigger;\n /** Whether animations are disabled. */\n _noopAnimations;\n _injector = inject(Injector);\n constructor() {\n inject(_CdkPrivateStyleLoader).load(_StructuralStylesLoader);\n const radioGroup = inject(MAT_RADIO_GROUP, {\n optional: true\n });\n const animationMode = inject(ANIMATION_MODULE_TYPE, {\n optional: true\n });\n const tabIndex = inject(new HostAttributeToken('tabindex'), {\n optional: true\n });\n // Assertions. Ideally these should be stripped out by the compiler.\n // TODO(jelbourn): Assert that there's no name binding AND a parent radio group.\n this.radioGroup = radioGroup;\n this._noopAnimations = animationMode === 'NoopAnimations';\n this._disabledInteractive = this._defaultOptions?.disabledInteractive ?? false;\n if (tabIndex) {\n this.tabIndex = numberAttribute(tabIndex, 0);\n }\n }\n /** Focuses the radio button. */\n focus(options, origin) {\n if (origin) {\n this._focusMonitor.focusVia(this._inputElement, origin, options);\n } else {\n this._inputElement.nativeElement.focus(options);\n }\n }\n /**\n * Marks the radio button as needing checking for change detection.\n * This method is exposed because the parent radio group will directly\n * update bound properties of the radio button.\n */\n _markForCheck() {\n // When group value changes, the button will not be notified. Use `markForCheck` to explicit\n // update radio button's status\n this._changeDetector.markForCheck();\n }\n ngOnInit() {\n if (this.radioGroup) {\n // If the radio is inside a radio group, determine if it should be checked\n this.checked = this.radioGroup.value === this._value;\n if (this.checked) {\n this.radioGroup.selected = this;\n }\n // Copy name from parent radio group\n this.name = this.radioGroup.name;\n }\n this._removeUniqueSelectionListener = this._radioDispatcher.listen((id, name) => {\n if (id !== this.id && name === this.name) {\n this.checked = false;\n }\n });\n }\n ngDoCheck() {\n this._updateTabIndex();\n }\n ngAfterViewInit() {\n this._updateTabIndex();\n this._focusMonitor.monitor(this._elementRef, true).subscribe(focusOrigin => {\n if (!focusOrigin && this.radioGroup) {\n this.radioGroup._touch();\n }\n });\n // We bind this outside of the zone, because:\n // 1. Its logic is completely DOM-related so we can avoid some change detections.\n // 2. There appear to be some internal tests that break when this triggers a change detection.\n this._ngZone.runOutsideAngular(() => {\n this._cleanupClick = this._renderer.listen(this._inputElement.nativeElement, 'click', this._onInputClick);\n });\n }\n ngOnDestroy() {\n this._cleanupClick?.();\n this._focusMonitor.stopMonitoring(this._elementRef);\n this._removeUniqueSelectionListener();\n }\n /** Dispatch change event with current value. */\n _emitChangeEvent() {\n this.change.emit(new MatRadioChange(this, this._value));\n }\n _isRippleDisabled() {\n return this.disableRipple || this.disabled;\n }\n /** Triggered when the radio button receives an interaction from the user. */\n _onInputInteraction(event) {\n // We always have to stop propagation on the change event.\n // Otherwise the change event, from the input element, will bubble up and\n // emit its event object to the `change` output.\n event.stopPropagation();\n if (!this.checked && !this.disabled) {\n const groupValueChanged = this.radioGroup && this.value !== this.radioGroup.value;\n this.checked = true;\n this._emitChangeEvent();\n if (this.radioGroup) {\n this.radioGroup._controlValueAccessorChangeFn(this.value);\n if (groupValueChanged) {\n this.radioGroup._emitChangeEvent();\n }\n }\n }\n }\n /** Triggered when the user clicks on the touch target. */\n _onTouchTargetClick(event) {\n this._onInputInteraction(event);\n if (!this.disabled || this.disabledInteractive) {\n // Normally the input should be focused already, but if the click\n // comes from the touch target, then we might have to focus it ourselves.\n this._inputElement?.nativeElement.focus();\n }\n }\n /** Sets the disabled state and marks for check if a change occurred. */\n _setDisabled(value) {\n if (this._disabled !== value) {\n this._disabled = value;\n this._changeDetector.markForCheck();\n }\n }\n /** Called when the input is clicked. */\n _onInputClick = event => {\n // If the input is disabled while interactive, we need to prevent the\n // selection from happening in this event handler. Note that even though\n // this happens on `click` events, the logic applies when the user is\n // navigating with the keyboard as well. An alternative way of doing\n // this is by resetting the `checked` state in the `change` callback but\n // it isn't optimal, because it can allow a pre-checked disabled button\n // to be un-checked. This approach seems to cover everything.\n if (this.disabled && this.disabledInteractive) {\n event.preventDefault();\n }\n };\n /** Gets the tabindex for the underlying input element. */\n _updateTabIndex() {\n const group = this.radioGroup;\n let value;\n // Implement a roving tabindex if the button is inside a group. For most cases this isn't\n // necessary, because the browser handles the tab order for inputs inside a group automatically,\n // but we need an explicitly higher tabindex for the selected button in order for things like\n // the focus trap to pick it up correctly.\n if (!group || !group.selected || this.disabled) {\n value = this.tabIndex;\n } else {\n value = group.selected === this ? this.tabIndex : -1;\n }\n if (value !== this._previousTabIndex) {\n // We have to set the tabindex directly on the DOM node, because it depends on\n // the selected state which is prone to \"changed after checked errors\".\n const input = this._inputElement?.nativeElement;\n if (input) {\n input.setAttribute('tabindex', value + '');\n this._previousTabIndex = value;\n // Wait for any pending tabindex changes to be applied\n afterNextRender(() => {\n queueMicrotask(() => {\n // The radio group uses a \"selection follows focus\" pattern for tab management, so if this\n // radio button is currently focused and another radio button in the group becomes\n // selected, we should move focus to the newly selected radio button to maintain\n // consistency between the focused and selected states.\n if (group && group.selected && group.selected !== this && document.activeElement === input) {\n group.selected?._inputElement.nativeElement.focus();\n // If this radio button still has focus, the selected one must be disabled. In this\n // case the radio group as a whole should lose focus.\n if (document.activeElement === input) {\n this._inputElement.nativeElement.blur();\n }\n }\n });\n }, {\n injector: this._injector\n });\n }\n }\n }\n static ɵfac = function MatRadioButton_Factory(__ngFactoryType__) {\n return new (__ngFactoryType__ || MatRadioButton)();\n };\n static ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: MatRadioButton,\n selectors: [[\"mat-radio-button\"]],\n viewQuery: function MatRadioButton_Query(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵviewQuery(_c0, 5);\n i0.ɵɵviewQuery(_c1, 7, ElementRef);\n }\n if (rf & 2) {\n let _t;\n i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx._inputElement = _t.first);\n i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx._rippleTrigger = _t.first);\n }\n },\n hostAttrs: [1, \"mat-mdc-radio-button\"],\n hostVars: 19,\n hostBindings: function MatRadioButton_HostBindings(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵlistener(\"focus\", function MatRadioButton_focus_HostBindingHandler() {\n return ctx._inputElement.nativeElement.focus();\n });\n }\n if (rf & 2) {\n i0.ɵɵattribute(\"id\", ctx.id)(\"tabindex\", null)(\"aria-label\", null)(\"aria-labelledby\", null)(\"aria-describedby\", null);\n i0.ɵɵclassProp(\"mat-primary\", ctx.color === \"primary\")(\"mat-accent\", ctx.color === \"accent\")(\"mat-warn\", ctx.color === \"warn\")(\"mat-mdc-radio-checked\", ctx.checked)(\"mat-mdc-radio-disabled\", ctx.disabled)(\"mat-mdc-radio-disabled-interactive\", ctx.disabledInteractive)(\"_mat-animation-noopable\", ctx._noopAnimations);\n }\n },\n inputs: {\n id: \"id\",\n name: \"name\",\n ariaLabel: [0, \"aria-label\", \"ariaLabel\"],\n ariaLabelledby: [0, \"aria-labelledby\", \"ariaLabelledby\"],\n ariaDescribedby: [0, \"aria-describedby\", \"ariaDescribedby\"],\n disableRipple: [2, \"disableRipple\", \"disableRipple\", booleanAttribute],\n tabIndex: [2, \"tabIndex\", \"tabIndex\", value => value == null ? 0 : numberAttribute(value)],\n checked: [2, \"checked\", \"checked\", booleanAttribute],\n value: \"value\",\n labelPosition: \"labelPosition\",\n disabled: [2, \"disabled\", \"disabled\", booleanAttribute],\n required: [2, \"required\", \"required\", booleanAttribute],\n color: \"color\",\n disabledInteractive: [2, \"disabledInteractive\", \"disabledInteractive\", booleanAttribute]\n },\n outputs: {\n change: \"change\"\n },\n exportAs: [\"matRadioButton\"],\n features: [i0.ɵɵInputTransformsFeature],\n ngContentSelectors: _c2,\n decls: 13,\n vars: 17,\n consts: [[\"formField\", \"\"], [\"input\", \"\"], [\"mat-internal-form-field\", \"\", 3, \"labelPosition\"], [1, \"mdc-radio\"], [1, \"mat-mdc-radio-touch-target\", 3, \"click\"], [\"type\", \"radio\", 1, \"mdc-radio__native-control\", 3, \"change\", \"id\", \"checked\", \"disabled\", \"required\"], [1, \"mdc-radio__background\"], [1, \"mdc-radio__outer-circle\"], [1, \"mdc-radio__inner-circle\"], [\"mat-ripple\", \"\", 1, \"mat-radio-ripple\", \"mat-focus-indicator\", 3, \"matRippleTrigger\", \"matRippleDisabled\", \"matRippleCentered\"], [1, \"mat-ripple-element\", \"mat-radio-persistent-ripple\"], [1, \"mdc-label\", 3, \"for\"]],\n template: function MatRadioButton_Template(rf, ctx) {\n if (rf & 1) {\n const _r1 = i0.ɵɵgetCurrentView();\n i0.ɵɵprojectionDef();\n i0.ɵɵelementStart(0, \"div\", 2, 0)(2, \"div\", 3)(3, \"div\", 4);\n i0.ɵɵlistener(\"click\", function MatRadioButton_Template_div_click_3_listener($event) {\n i0.ɵɵrestoreView(_r1);\n return i0.ɵɵresetView(ctx._onTouchTargetClick($event));\n });\n i0.ɵɵelementEnd();\n i0.ɵɵelementStart(4, \"input\", 5, 1);\n i0.ɵɵlistener(\"change\", function MatRadioButton_Template_input_change_4_listener($event) {\n i0.ɵɵrestoreView(_r1);\n return i0.ɵɵresetView(ctx._onInputInteraction($event));\n });\n i0.ɵɵelementEnd();\n i0.ɵɵelementStart(6, \"div\", 6);\n i0.ɵɵelement(7, \"div\", 7)(8, \"div\", 8);\n i0.ɵɵelementEnd();\n i0.ɵɵelementStart(9, \"div\", 9);\n i0.ɵɵelement(10, \"div\", 10);\n i0.ɵɵelementEnd()();\n i0.ɵɵelementStart(11, \"label\", 11);\n i0.ɵɵprojection(12);\n i0.ɵɵelementEnd()();\n }\n if (rf & 2) {\n i0.ɵɵproperty(\"labelPosition\", ctx.labelPosition);\n i0.ɵɵadvance(2);\n i0.ɵɵclassProp(\"mdc-radio--disabled\", ctx.disabled);\n i0.ɵɵadvance(2);\n i0.ɵɵproperty(\"id\", ctx.inputId)(\"checked\", ctx.checked)(\"disabled\", ctx.disabled && !ctx.disabledInteractive)(\"required\", ctx.required);\n i0.ɵɵattribute(\"name\", ctx.name)(\"value\", ctx.value)(\"aria-label\", ctx.ariaLabel)(\"aria-labelledby\", ctx.ariaLabelledby)(\"aria-describedby\", ctx.ariaDescribedby)(\"aria-disabled\", ctx.disabled && ctx.disabledInteractive ? \"true\" : null);\n i0.ɵɵadvance(5);\n i0.ɵɵproperty(\"matRippleTrigger\", ctx._rippleTrigger.nativeElement)(\"matRippleDisabled\", ctx._isRippleDisabled())(\"matRippleCentered\", true);\n i0.ɵɵadvance(2);\n i0.ɵɵproperty(\"for\", ctx.inputId);\n }\n },\n dependencies: [MatRipple, _MatInternalFormField],\n styles: [\".mat-mdc-radio-button{-webkit-tap-highlight-color:rgba(0,0,0,0)}.mat-mdc-radio-button .mdc-radio{display:inline-block;position:relative;flex:0 0 auto;box-sizing:content-box;width:20px;height:20px;cursor:pointer;will-change:opacity,transform,border-color,color;padding:calc((var(--mdc-radio-state-layer-size, 40px) - 20px)/2)}.mat-mdc-radio-button .mdc-radio:hover .mdc-radio__native-control:not([disabled]):not(:focus)~.mdc-radio__background::before{opacity:.04;transform:scale(1)}.mat-mdc-radio-button .mdc-radio:hover .mdc-radio__native-control:not([disabled])~.mdc-radio__background .mdc-radio__outer-circle{border-color:var(--mdc-radio-unselected-hover-icon-color, var(--mat-sys-on-surface))}.mat-mdc-radio-button .mdc-radio:hover .mdc-radio__native-control:enabled:checked+.mdc-radio__background .mdc-radio__outer-circle,.mat-mdc-radio-button .mdc-radio:hover .mdc-radio__native-control:enabled:checked+.mdc-radio__background .mdc-radio__inner-circle{border-color:var(--mdc-radio-selected-hover-icon-color, var(--mat-sys-primary))}.mat-mdc-radio-button .mdc-radio:active .mdc-radio__native-control:enabled:not(:checked)+.mdc-radio__background .mdc-radio__outer-circle{border-color:var(--mdc-radio-unselected-pressed-icon-color, var(--mat-sys-on-surface))}.mat-mdc-radio-button .mdc-radio:active .mdc-radio__native-control:enabled:checked+.mdc-radio__background .mdc-radio__outer-circle,.mat-mdc-radio-button .mdc-radio:active .mdc-radio__native-control:enabled:checked+.mdc-radio__background .mdc-radio__inner-circle{border-color:var(--mdc-radio-selected-pressed-icon-color, var(--mat-sys-primary))}.mat-mdc-radio-button .mdc-radio__background{display:inline-block;position:relative;box-sizing:border-box;width:20px;height:20px}.mat-mdc-radio-button .mdc-radio__background::before{position:absolute;transform:scale(0, 0);border-radius:50%;opacity:0;pointer-events:none;content:\\\"\\\";transition:opacity 90ms cubic-bezier(0.4, 0, 0.6, 1),transform 90ms cubic-bezier(0.4, 0, 0.6, 1);width:var(--mdc-radio-state-layer-size, 40px);height:var(--mdc-radio-state-layer-size, 40px);top:calc(-1*(var(--mdc-radio-state-layer-size, 40px) - 20px)/2);left:calc(-1*(var(--mdc-radio-state-layer-size, 40px) - 20px)/2)}.mat-mdc-radio-button .mdc-radio__outer-circle{position:absolute;top:0;left:0;box-sizing:border-box;width:100%;height:100%;border-width:2px;border-style:solid;border-radius:50%;transition:border-color 90ms cubic-bezier(0.4, 0, 0.6, 1)}.mat-mdc-radio-button .mdc-radio__inner-circle{position:absolute;top:0;left:0;box-sizing:border-box;width:100%;height:100%;transform:scale(0, 0);border-width:10px;border-style:solid;border-radius:50%;transition:transform 90ms cubic-bezier(0.4, 0, 0.6, 1),border-color 90ms cubic-bezier(0.4, 0, 0.6, 1)}.mat-mdc-radio-button .mdc-radio__native-control{position:absolute;margin:0;padding:0;opacity:0;top:0;right:0;left:0;cursor:inherit;z-index:1;width:var(--mdc-radio-state-layer-size, 40px);height:var(--mdc-radio-state-layer-size, 40px)}.mat-mdc-radio-button .mdc-radio__native-control:checked+.mdc-radio__background,.mat-mdc-radio-button .mdc-radio__native-control:disabled+.mdc-radio__background{transition:opacity 90ms cubic-bezier(0, 0, 0.2, 1),transform 90ms cubic-bezier(0, 0, 0.2, 1)}.mat-mdc-radio-button .mdc-radio__native-control:checked+.mdc-radio__background .mdc-radio__outer-circle,.mat-mdc-radio-button .mdc-radio__native-control:disabled+.mdc-radio__background .mdc-radio__outer-circle{transition:border-color 90ms cubic-bezier(0, 0, 0.2, 1)}.mat-mdc-radio-button .mdc-radio__native-control:checked+.mdc-radio__background .mdc-radio__inner-circle,.mat-mdc-radio-button .mdc-radio__native-control:disabled+.mdc-radio__background .mdc-radio__inner-circle{transition:transform 90ms cubic-bezier(0, 0, 0.2, 1),border-color 90ms cubic-bezier(0, 0, 0.2, 1)}.mat-mdc-radio-button .mdc-radio__native-control:focus+.mdc-radio__background::before{transform:scale(1);opacity:.12;transition:opacity 90ms cubic-bezier(0, 0, 0.2, 1),transform 90ms cubic-bezier(0, 0, 0.2, 1)}.mat-mdc-radio-button .mdc-radio__native-control:disabled:not(:checked)+.mdc-radio__background .mdc-radio__outer-circle{border-color:var(--mdc-radio-disabled-unselected-icon-color, var(--mat-sys-on-surface));opacity:var(--mdc-radio-disabled-unselected-icon-opacity, 0.38)}.mat-mdc-radio-button .mdc-radio__native-control:disabled+.mdc-radio__background{cursor:default}.mat-mdc-radio-button .mdc-radio__native-control:disabled+.mdc-radio__background .mdc-radio__inner-circle,.mat-mdc-radio-button .mdc-radio__native-control:disabled+.mdc-radio__background .mdc-radio__outer-circle{border-color:var(--mdc-radio-disabled-selected-icon-color, var(--mat-sys-on-surface));opacity:var(--mdc-radio-disabled-selected-icon-opacity, 0.38)}.mat-mdc-radio-button .mdc-radio__native-control:enabled:not(:checked)+.mdc-radio__background .mdc-radio__outer-circle{border-color:var(--mdc-radio-unselected-icon-color, var(--mat-sys-on-surface-variant))}.mat-mdc-radio-button .mdc-radio__native-control:enabled:checked+.mdc-radio__background .mdc-radio__outer-circle,.mat-mdc-radio-button .mdc-radio__native-control:enabled:checked+.mdc-radio__background .mdc-radio__inner-circle{border-color:var(--mdc-radio-selected-icon-color, var(--mat-sys-primary))}.mat-mdc-radio-button .mdc-radio__native-control:enabled:focus:checked+.mdc-radio__background .mdc-radio__inner-circle,.mat-mdc-radio-button .mdc-radio__native-control:enabled:focus:checked+.mdc-radio__background .mdc-radio__outer-circle{border-color:var(--mdc-radio-selected-focus-icon-color, var(--mat-sys-primary))}.mat-mdc-radio-button .mdc-radio__native-control:checked+.mdc-radio__background .mdc-radio__inner-circle{transform:scale(0.5);transition:transform 90ms cubic-bezier(0, 0, 0.2, 1),border-color 90ms cubic-bezier(0, 0, 0.2, 1)}.mat-mdc-radio-button.mat-mdc-radio-disabled-interactive .mdc-radio--disabled{pointer-events:auto}.mat-mdc-radio-button.mat-mdc-radio-disabled-interactive .mdc-radio--disabled .mdc-radio__native-control:not(:checked)+.mdc-radio__background .mdc-radio__outer-circle{border-color:var(--mdc-radio-disabled-unselected-icon-color, var(--mat-sys-on-surface));opacity:var(--mdc-radio-disabled-unselected-icon-opacity, 0.38)}.mat-mdc-radio-button.mat-mdc-radio-disabled-interactive .mdc-radio--disabled:hover .mdc-radio__native-control:checked+.mdc-radio__background .mdc-radio__inner-circle,.mat-mdc-radio-button.mat-mdc-radio-disabled-interactive .mdc-radio--disabled:hover .mdc-radio__native-control:checked+.mdc-radio__background .mdc-radio__outer-circle,.mat-mdc-radio-button.mat-mdc-radio-disabled-interactive .mdc-radio--disabled .mdc-radio__native-control:checked:focus+.mdc-radio__background .mdc-radio__inner-circle,.mat-mdc-radio-button.mat-mdc-radio-disabled-interactive .mdc-radio--disabled .mdc-radio__native-control:checked:focus+.mdc-radio__background .mdc-radio__outer-circle,.mat-mdc-radio-button.mat-mdc-radio-disabled-interactive .mdc-radio--disabled .mdc-radio__native-control+.mdc-radio__background .mdc-radio__inner-circle,.mat-mdc-radio-button.mat-mdc-radio-disabled-interactive .mdc-radio--disabled .mdc-radio__native-control+.mdc-radio__background .mdc-radio__outer-circle{border-color:var(--mdc-radio-disabled-selected-icon-color, var(--mat-sys-on-surface));opacity:var(--mdc-radio-disabled-selected-icon-opacity, 0.38)}.mat-mdc-radio-button._mat-animation-noopable .mdc-radio__background::before,.mat-mdc-radio-button._mat-animation-noopable .mdc-radio__outer-circle,.mat-mdc-radio-button._mat-animation-noopable .mdc-radio__inner-circle{transition:none !important}.mat-mdc-radio-button .mdc-radio__background::before{background-color:var(--mat-radio-ripple-color, var(--mat-sys-on-surface))}.mat-mdc-radio-button.mat-mdc-radio-checked .mat-ripple-element,.mat-mdc-radio-button.mat-mdc-radio-checked .mdc-radio__background::before{background-color:var(--mat-radio-checked-ripple-color, var(--mat-sys-primary))}.mat-mdc-radio-button.mat-mdc-radio-disabled-interactive .mdc-radio--disabled .mat-ripple-element,.mat-mdc-radio-button.mat-mdc-radio-disabled-interactive .mdc-radio--disabled .mdc-radio__background::before{background-color:var(--mat-radio-ripple-color, var(--mat-sys-on-surface))}.mat-mdc-radio-button .mat-internal-form-field{color:var(--mat-radio-label-text-color, var(--mat-sys-on-surface));font-family:var(--mat-radio-label-text-font, var(--mat-sys-body-medium-font));line-height:var(--mat-radio-label-text-line-height, var(--mat-sys-body-medium-line-height));font-size:var(--mat-radio-label-text-size, var(--mat-sys-body-medium-size));letter-spacing:var(--mat-radio-label-text-tracking, var(--mat-sys-body-medium-tracking));font-weight:var(--mat-radio-label-text-weight, var(--mat-sys-body-medium-weight))}.mat-mdc-radio-button .mdc-radio--disabled+label{color:var(--mat-radio-disabled-label-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-mdc-radio-button .mat-radio-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none;border-radius:50%}.mat-mdc-radio-button .mat-radio-ripple .mat-ripple-element{opacity:.14}.mat-mdc-radio-button .mat-radio-ripple::before{border-radius:50%}.mat-mdc-radio-button .mdc-radio .mdc-radio__native-control:focus:enabled:not(:checked)~.mdc-radio__background .mdc-radio__outer-circle{border-color:var(--mdc-radio-unselected-focus-icon-color, var(--mat-sys-on-surface))}.mat-mdc-radio-button.cdk-focused .mat-focus-indicator::before{content:\\\"\\\"}.mat-mdc-radio-disabled{cursor:default;pointer-events:none}.mat-mdc-radio-disabled.mat-mdc-radio-disabled-interactive{pointer-events:auto}.mat-mdc-radio-touch-target{position:absolute;top:50%;left:50%;height:48px;width:48px;transform:translate(-50%, -50%);display:var(--mat-radio-touch-target-display, block)}[dir=rtl] .mat-mdc-radio-touch-target{left:auto;right:50%;transform:translate(50%, -50%)}\"],\n encapsulation: 2,\n changeDetection: 0\n });\n }\n return MatRadioButton;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet MatRadioModule = /*#__PURE__*/(() => {\n class MatRadioModule {\n static ɵfac = function MatRadioModule_Factory(__ngFactoryType__) {\n return new (__ngFactoryType__ || MatRadioModule)();\n };\n static ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: MatRadioModule\n });\n static ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({\n imports: [MatCommonModule, MatRippleModule, MatRadioButton, MatCommonModule]\n });\n }\n return MatRadioModule;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { MAT_RADIO_DEFAULT_OPTIONS, MAT_RADIO_DEFAULT_OPTIONS_FACTORY, MAT_RADIO_GROUP, MAT_RADIO_GROUP_CONTROL_VALUE_ACCESSOR, MatRadioButton, MatRadioChange, MatRadioGroup, MatRadioModule };\n","import * as i0 from '@angular/core';\nimport { InjectionToken, inject, ChangeDetectorRef, ElementRef, EventEmitter, booleanAttribute, TemplateRef, Component, ViewEncapsulation, ChangeDetectionStrategy, ViewChild, ContentChildren, Input, Output, Directive, forwardRef, EnvironmentInjector, ViewContainerRef, NgZone, Renderer2, afterNextRender, NgModule } from '@angular/core';\nimport { MAT_OPTION_PARENT_COMPONENT, MatOption, MAT_OPTGROUP, MatOptionSelectionChange, _countGroupLabelsBeforeOption, _getOptionScrollPosition, MatOptionModule, MatCommonModule } from '@angular/material/core';\nconst _c0 = [\"panel\"];\nconst _c1 = [\"*\"];\nfunction MatAutocomplete_ng_template_0_Template(rf, ctx) {\n if (rf & 1) {\n const _r1 = i0.ɵɵgetCurrentView();\n i0.ɵɵelementStart(0, \"div\", 1, 0);\n i0.ɵɵlistener(\"@panelAnimation.done\", function MatAutocomplete_ng_template_0_Template_div_animation_panelAnimation_done_0_listener($event) {\n i0.ɵɵrestoreView(_r1);\n const ctx_r1 = i0.ɵɵnextContext();\n return i0.ɵɵresetView(ctx_r1._animationDone.next($event));\n });\n i0.ɵɵprojection(2);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const formFieldId_r3 = ctx.id;\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵclassMap(ctx_r1._classList);\n i0.ɵɵclassProp(\"mat-mdc-autocomplete-visible\", ctx_r1.showPanel)(\"mat-mdc-autocomplete-hidden\", !ctx_r1.showPanel)(\"mat-primary\", ctx_r1._color === \"primary\")(\"mat-accent\", ctx_r1._color === \"accent\")(\"mat-warn\", ctx_r1._color === \"warn\");\n i0.ɵɵproperty(\"id\", ctx_r1.id)(\"@panelAnimation\", ctx_r1.isOpen ? \"visible\" : \"hidden\");\n i0.ɵɵattribute(\"aria-label\", ctx_r1.ariaLabel || null)(\"aria-labelledby\", ctx_r1._getPanelAriaLabelledby(formFieldId_r3));\n }\n}\nexport { MatOptgroup, MatOption } from '@angular/material/core';\nimport { ViewportRuler, CdkScrollableModule } from '@angular/cdk/scrolling';\nimport { Overlay, OverlayConfig, OverlayModule } from '@angular/cdk/overlay';\nimport { _IdGenerator, ActiveDescendantKeyManager, removeAriaReferencedId, addAriaReferencedId } from '@angular/cdk/a11y';\nimport { Platform, _getEventTarget } from '@angular/cdk/platform';\nimport { trigger, state, style, transition, group, animate } from '@angular/animations';\nimport { Subscription, Subject, merge, of, defer, Observable } from 'rxjs';\nimport { Directionality } from '@angular/cdk/bidi';\nimport { hasModifierKey, ESCAPE, ENTER, UP_ARROW, DOWN_ARROW, TAB } from '@angular/cdk/keycodes';\nimport { BreakpointObserver, Breakpoints } from '@angular/cdk/layout';\nimport { TemplatePortal } from '@angular/cdk/portal';\nimport { DOCUMENT } from '@angular/common';\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { MAT_FORM_FIELD } from '@angular/material/form-field';\nimport { filter, map, startWith, switchMap, tap, delay, take } from 'rxjs/operators';\n\n// Animation values come from\n// TODO(mmalerba): Ideally find a way to import the values from MDC's code.\nconst panelAnimation = /*#__PURE__*/trigger('panelAnimation', [/*#__PURE__*/state('void, hidden', /*#__PURE__*/style({\n opacity: 0,\n transform: 'scaleY(0.8)'\n})), /*#__PURE__*/transition(':enter, hidden => visible', [/*#__PURE__*/group([/*#__PURE__*/animate('0.03s linear', /*#__PURE__*/style({\n opacity: 1\n})), /*#__PURE__*/animate('0.12s cubic-bezier(0, 0, 0.2, 1)', /*#__PURE__*/style({\n transform: 'scaleY(1)'\n}))])]), /*#__PURE__*/transition(':leave, visible => hidden', [/*#__PURE__*/animate('0.075s linear', /*#__PURE__*/style({\n opacity: 0\n}))])]);\n\n/** Event object that is emitted when an autocomplete option is selected. */\nclass MatAutocompleteSelectedEvent {\n source;\n option;\n constructor(/** Reference to the autocomplete panel that emitted the event. */\n source, /** Option that was selected. */\n option) {\n this.source = source;\n this.option = option;\n }\n}\n/** Injection token to be used to override the default options for `mat-autocomplete`. */\nconst MAT_AUTOCOMPLETE_DEFAULT_OPTIONS = /*#__PURE__*/new InjectionToken('mat-autocomplete-default-options', {\n providedIn: 'root',\n factory: MAT_AUTOCOMPLETE_DEFAULT_OPTIONS_FACTORY\n});\n/** @docs-private */\nfunction MAT_AUTOCOMPLETE_DEFAULT_OPTIONS_FACTORY() {\n return {\n autoActiveFirstOption: false,\n autoSelectActiveOption: false,\n hideSingleSelectionIndicator: false,\n requireSelection: false\n };\n}\n/** Autocomplete component. */\nlet MatAutocomplete = /*#__PURE__*/(() => {\n class MatAutocomplete {\n _changeDetectorRef = inject(ChangeDetectorRef);\n _elementRef = inject(ElementRef);\n _defaults = inject(MAT_AUTOCOMPLETE_DEFAULT_OPTIONS);\n _activeOptionChanges = Subscription.EMPTY;\n /** Emits when the panel animation is done. Null if the panel doesn't animate. */\n _animationDone = new EventEmitter();\n /** Manages active item in option list based on key events. */\n _keyManager;\n /** Whether the autocomplete panel should be visible, depending on option length. */\n showPanel = false;\n /** Whether the autocomplete panel is open. */\n get isOpen() {\n return this._isOpen && this.showPanel;\n }\n _isOpen = false;\n /** Latest trigger that opened the autocomplete. */\n _latestOpeningTrigger;\n /** @docs-private Sets the theme color of the panel. */\n _setColor(value) {\n this._color = value;\n this._changeDetectorRef.markForCheck();\n }\n /** @docs-private theme color of the panel */\n _color;\n // The @ViewChild query for TemplateRef here needs to be static because some code paths\n // lead to the overlay being created before change detection has finished for this component.\n // Notably, another component may trigger `focus` on the autocomplete-trigger.\n /** @docs-private */\n template;\n /** Element for the panel containing the autocomplete options. */\n panel;\n /** Reference to all options within the autocomplete. */\n options;\n /** Reference to all option groups within the autocomplete. */\n optionGroups;\n /** Aria label of the autocomplete. */\n ariaLabel;\n /** Input that can be used to specify the `aria-labelledby` attribute. */\n ariaLabelledby;\n /** Function that maps an option's control value to its display value in the trigger. */\n displayWith = null;\n /**\n * Whether the first option should be highlighted when the autocomplete panel is opened.\n * Can be configured globally through the `MAT_AUTOCOMPLETE_DEFAULT_OPTIONS` token.\n */\n autoActiveFirstOption;\n /** Whether the active option should be selected as the user is navigating. */\n autoSelectActiveOption;\n /**\n * Whether the user is required to make a selection when they're interacting with the\n * autocomplete. If the user moves away from the autocomplete without selecting an option from\n * the list, the value will be reset. If the user opens the panel and closes it without\n * interacting or selecting a value, the initial value will be kept.\n */\n requireSelection;\n /**\n * Specify the width of the autocomplete panel. Can be any CSS sizing value, otherwise it will\n * match the width of its host.\n */\n panelWidth;\n /** Whether ripples are disabled within the autocomplete panel. */\n disableRipple;\n /** Event that is emitted whenever an option from the list is selected. */\n optionSelected = new EventEmitter();\n /** Event that is emitted when the autocomplete panel is opened. */\n opened = new EventEmitter();\n /** Event that is emitted when the autocomplete panel is closed. */\n closed = new EventEmitter();\n /** Emits whenever an option is activated. */\n optionActivated = new EventEmitter();\n /**\n * Takes classes set on the host mat-autocomplete element and applies them to the panel\n * inside the overlay container to allow for easy styling.\n */\n set classList(value) {\n this._classList = value;\n this._elementRef.nativeElement.className = '';\n }\n _classList;\n /** Whether checkmark indicator for single-selection options is hidden. */\n get hideSingleSelectionIndicator() {\n return this._hideSingleSelectionIndicator;\n }\n set hideSingleSelectionIndicator(value) {\n this._hideSingleSelectionIndicator = value;\n this._syncParentProperties();\n }\n _hideSingleSelectionIndicator;\n /** Syncs the parent state with the individual options. */\n _syncParentProperties() {\n if (this.options) {\n for (const option of this.options) {\n option._changeDetectorRef.markForCheck();\n }\n }\n }\n /** Unique ID to be used by autocomplete trigger's \"aria-owns\" property. */\n id = inject(_IdGenerator).getId('mat-autocomplete-');\n /**\n * Tells any descendant `mat-optgroup` to use the inert a11y pattern.\n * @docs-private\n */\n inertGroups;\n constructor() {\n const platform = inject(Platform);\n // TODO(crisbeto): the problem that the `inertGroups` option resolves is only present on\n // Safari using VoiceOver. We should occasionally check back to see whether the bug\n // wasn't resolved in VoiceOver, and if it has, we can remove this and the `inertGroups`\n // option altogether.\n this.inertGroups = platform?.SAFARI || false;\n this.autoActiveFirstOption = !!this._defaults.autoActiveFirstOption;\n this.autoSelectActiveOption = !!this._defaults.autoSelectActiveOption;\n this.requireSelection = !!this._defaults.requireSelection;\n this._hideSingleSelectionIndicator = this._defaults.hideSingleSelectionIndicator ?? false;\n }\n ngAfterContentInit() {\n this._keyManager = new ActiveDescendantKeyManager(this.options).withWrap().skipPredicate(this._skipPredicate);\n this._activeOptionChanges = this._keyManager.change.subscribe(index => {\n if (this.isOpen) {\n this.optionActivated.emit({\n source: this,\n option: this.options.toArray()[index] || null\n });\n }\n });\n // Set the initial visibility state.\n this._setVisibility();\n }\n ngOnDestroy() {\n this._keyManager?.destroy();\n this._activeOptionChanges.unsubscribe();\n this._animationDone.complete();\n }\n /**\n * Sets the panel scrollTop. This allows us to manually scroll to display options\n * above or below the fold, as they are not actually being focused when active.\n */\n _setScrollTop(scrollTop) {\n if (this.panel) {\n this.panel.nativeElement.scrollTop = scrollTop;\n }\n }\n /** Returns the panel's scrollTop. */\n _getScrollTop() {\n return this.panel ? this.panel.nativeElement.scrollTop : 0;\n }\n /** Panel should hide itself when the option list is empty. */\n _setVisibility() {\n this.showPanel = !!this.options.length;\n this._changeDetectorRef.markForCheck();\n }\n /** Emits the `select` event. */\n _emitSelectEvent(option) {\n const event = new MatAutocompleteSelectedEvent(this, option);\n this.optionSelected.emit(event);\n }\n /** Gets the aria-labelledby for the autocomplete panel. */\n _getPanelAriaLabelledby(labelId) {\n if (this.ariaLabel) {\n return null;\n }\n const labelExpression = labelId ? labelId + ' ' : '';\n return this.ariaLabelledby ? labelExpression + this.ariaLabelledby : labelId;\n }\n // `skipPredicate` determines if key manager should avoid putting a given option in the tab\n // order. Allow disabled list items to receive focus via keyboard to align with WAI ARIA\n // recommendation.\n //\n // Normally WAI ARIA's instructions are to exclude disabled items from the tab order, but it\n // makes a few exceptions for compound widgets.\n //\n // From [Developing a Keyboard Interface](\n // https://www.w3.org/WAI/ARIA/apg/practices/keyboard-interface/):\n // \"For the following composite widget elements, keep them focusable when disabled: Options in a\n // Listbox...\"\n //\n // The user can focus disabled options using the keyboard, but the user cannot click disabled\n // options.\n _skipPredicate() {\n return false;\n }\n static ɵfac = function MatAutocomplete_Factory(__ngFactoryType__) {\n return new (__ngFactoryType__ || MatAutocomplete)();\n };\n static ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: MatAutocomplete,\n selectors: [[\"mat-autocomplete\"]],\n contentQueries: function MatAutocomplete_ContentQueries(rf, ctx, dirIndex) {\n if (rf & 1) {\n i0.ɵɵcontentQuery(dirIndex, MatOption, 5);\n i0.ɵɵcontentQuery(dirIndex, MAT_OPTGROUP, 5);\n }\n if (rf & 2) {\n let _t;\n i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.options = _t);\n i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.optionGroups = _t);\n }\n },\n viewQuery: function MatAutocomplete_Query(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵviewQuery(TemplateRef, 7);\n i0.ɵɵviewQuery(_c0, 5);\n }\n if (rf & 2) {\n let _t;\n i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.template = _t.first);\n i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.panel = _t.first);\n }\n },\n hostAttrs: [1, \"mat-mdc-autocomplete\"],\n inputs: {\n ariaLabel: [0, \"aria-label\", \"ariaLabel\"],\n ariaLabelledby: [0, \"aria-labelledby\", \"ariaLabelledby\"],\n displayWith: \"displayWith\",\n autoActiveFirstOption: [2, \"autoActiveFirstOption\", \"autoActiveFirstOption\", booleanAttribute],\n autoSelectActiveOption: [2, \"autoSelectActiveOption\", \"autoSelectActiveOption\", booleanAttribute],\n requireSelection: [2, \"requireSelection\", \"requireSelection\", booleanAttribute],\n panelWidth: \"panelWidth\",\n disableRipple: [2, \"disableRipple\", \"disableRipple\", booleanAttribute],\n classList: [0, \"class\", \"classList\"],\n hideSingleSelectionIndicator: [2, \"hideSingleSelectionIndicator\", \"hideSingleSelectionIndicator\", booleanAttribute]\n },\n outputs: {\n optionSelected: \"optionSelected\",\n opened: \"opened\",\n closed: \"closed\",\n optionActivated: \"optionActivated\"\n },\n exportAs: [\"matAutocomplete\"],\n features: [i0.ɵɵProvidersFeature([{\n provide: MAT_OPTION_PARENT_COMPONENT,\n useExisting: MatAutocomplete\n }]), i0.ɵɵInputTransformsFeature],\n ngContentSelectors: _c1,\n decls: 1,\n vars: 0,\n consts: [[\"panel\", \"\"], [\"role\", \"listbox\", 1, \"mat-mdc-autocomplete-panel\", \"mdc-menu-surface\", \"mdc-menu-surface--open\", 3, \"id\"]],\n template: function MatAutocomplete_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵprojectionDef();\n i0.ɵɵtemplate(0, MatAutocomplete_ng_template_0_Template, 3, 16, \"ng-template\");\n }\n },\n styles: [\"div.mat-mdc-autocomplete-panel{width:100%;max-height:256px;visibility:hidden;transform-origin:center top;overflow:auto;padding:8px 0;box-sizing:border-box;position:static;border-radius:var(--mat-autocomplete-container-shape, var(--mat-sys-corner-extra-small));box-shadow:var(--mat-autocomplete-container-elevation-shadow, 0px 3px 1px -2px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 1px 5px 0px rgba(0, 0, 0, 0.12));background-color:var(--mat-autocomplete-background-color, var(--mat-sys-surface-container))}@media(forced-colors: active){div.mat-mdc-autocomplete-panel{outline:solid 1px}}.cdk-overlay-pane:not(.mat-mdc-autocomplete-panel-above) div.mat-mdc-autocomplete-panel{border-top-left-radius:0;border-top-right-radius:0}.mat-mdc-autocomplete-panel-above div.mat-mdc-autocomplete-panel{border-bottom-left-radius:0;border-bottom-right-radius:0;transform-origin:center bottom}div.mat-mdc-autocomplete-panel.mat-mdc-autocomplete-visible{visibility:visible}div.mat-mdc-autocomplete-panel.mat-mdc-autocomplete-hidden{visibility:hidden;pointer-events:none}mat-autocomplete{display:none}\"],\n encapsulation: 2,\n data: {\n animation: [panelAnimation]\n },\n changeDetection: 0\n });\n }\n return MatAutocomplete;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Directive applied to an element to make it usable\n * as a connection point for an autocomplete panel.\n */\nlet MatAutocompleteOrigin = /*#__PURE__*/(() => {\n class MatAutocompleteOrigin {\n elementRef = inject(ElementRef);\n constructor() {}\n static ɵfac = function MatAutocompleteOrigin_Factory(__ngFactoryType__) {\n return new (__ngFactoryType__ || MatAutocompleteOrigin)();\n };\n static ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: MatAutocompleteOrigin,\n selectors: [[\"\", \"matAutocompleteOrigin\", \"\"]],\n exportAs: [\"matAutocompleteOrigin\"]\n });\n }\n return MatAutocompleteOrigin;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Provider that allows the autocomplete to register as a ControlValueAccessor.\n * @docs-private\n */\nconst MAT_AUTOCOMPLETE_VALUE_ACCESSOR = {\n provide: NG_VALUE_ACCESSOR,\n useExisting: /*#__PURE__*/forwardRef(() => MatAutocompleteTrigger),\n multi: true\n};\n/**\n * Creates an error to be thrown when attempting to use an autocomplete trigger without a panel.\n * @docs-private\n */\nfunction getMatAutocompleteMissingPanelError() {\n return Error('Attempting to open an undefined instance of `mat-autocomplete`. ' + 'Make sure that the id passed to the `matAutocomplete` is correct and that ' + \"you're attempting to open it after the ngAfterContentInit hook.\");\n}\n/** Injection token that determines the scroll handling while the autocomplete panel is open. */\nconst MAT_AUTOCOMPLETE_SCROLL_STRATEGY = /*#__PURE__*/new InjectionToken('mat-autocomplete-scroll-strategy', {\n providedIn: 'root',\n factory: () => {\n const overlay = inject(Overlay);\n return () => overlay.scrollStrategies.reposition();\n }\n});\n/** @docs-private */\nfunction MAT_AUTOCOMPLETE_SCROLL_STRATEGY_FACTORY(overlay) {\n return () => overlay.scrollStrategies.reposition();\n}\n/** @docs-private */\nconst MAT_AUTOCOMPLETE_SCROLL_STRATEGY_FACTORY_PROVIDER = {\n provide: MAT_AUTOCOMPLETE_SCROLL_STRATEGY,\n deps: [Overlay],\n useFactory: MAT_AUTOCOMPLETE_SCROLL_STRATEGY_FACTORY\n};\n/** Base class with all of the `MatAutocompleteTrigger` functionality. */\nlet MatAutocompleteTrigger = /*#__PURE__*/(() => {\n class MatAutocompleteTrigger {\n _environmentInjector = inject(EnvironmentInjector);\n _element = inject(ElementRef);\n _overlay = inject(Overlay);\n _viewContainerRef = inject(ViewContainerRef);\n _zone = inject(NgZone);\n _changeDetectorRef = inject(ChangeDetectorRef);\n _dir = inject(Directionality, {\n optional: true\n });\n _formField = inject(MAT_FORM_FIELD, {\n optional: true,\n host: true\n });\n _document = inject(DOCUMENT);\n _viewportRuler = inject(ViewportRuler);\n _scrollStrategy = inject(MAT_AUTOCOMPLETE_SCROLL_STRATEGY);\n _renderer = inject(Renderer2);\n _defaults = inject(MAT_AUTOCOMPLETE_DEFAULT_OPTIONS, {\n optional: true\n });\n _overlayRef;\n _portal;\n _componentDestroyed = false;\n _initialized = new Subject();\n _keydownSubscription;\n _outsideClickSubscription;\n _cleanupWindowBlur;\n /** Old value of the native input. Used to work around issues with the `input` event on IE. */\n _previousValue;\n /** Value of the input element when the panel was attached (even if there are no options). */\n _valueOnAttach;\n /** Value on the previous keydown event. */\n _valueOnLastKeydown;\n /** Strategy that is used to position the panel. */\n _positionStrategy;\n /** Whether or not the label state is being overridden. */\n _manuallyFloatingLabel = false;\n /** The subscription for closing actions (some are bound to document). */\n _closingActionsSubscription;\n /** Subscription to viewport size changes. */\n _viewportSubscription = Subscription.EMPTY;\n /** Implements BreakpointObserver to be used to detect handset landscape */\n _breakpointObserver = inject(BreakpointObserver);\n _handsetLandscapeSubscription = Subscription.EMPTY;\n /**\n * Whether the autocomplete can open the next time it is focused. Used to prevent a focused,\n * closed autocomplete from being reopened if the user switches to another browser tab and then\n * comes back.\n */\n _canOpenOnNextFocus = true;\n /** Value inside the input before we auto-selected an option. */\n _valueBeforeAutoSelection;\n /**\n * Current option that we have auto-selected as the user is navigating,\n * but which hasn't been propagated to the model value yet.\n */\n _pendingAutoselectedOption;\n /** Stream of keyboard events that can close the panel. */\n _closeKeyEventStream = new Subject();\n /**\n * Event handler for when the window is blurred. Needs to be an\n * arrow function in order to preserve the context.\n */\n _windowBlurHandler = () => {\n // If the user blurred the window while the autocomplete is focused, it means that it'll be\n // refocused when they come back. In this case we want to skip the first focus event, if the\n // pane was closed, in order to avoid reopening it unintentionally.\n this._canOpenOnNextFocus = this._document.activeElement !== this._element.nativeElement || this.panelOpen;\n };\n /** `View -> model callback called when value changes` */\n _onChange = () => {};\n /** `View -> model callback called when autocomplete has been touched` */\n _onTouched = () => {};\n /** The autocomplete panel to be attached to this trigger. */\n autocomplete;\n /**\n * Position of the autocomplete panel relative to the trigger element. A position of `auto`\n * will render the panel underneath the trigger if there is enough space for it to fit in\n * the viewport, otherwise the panel will be shown above it. If the position is set to\n * `above` or `below`, the panel will always be shown above or below the trigger. no matter\n * whether it fits completely in the viewport.\n */\n position = 'auto';\n /**\n * Reference relative to which to position the autocomplete panel.\n * Defaults to the autocomplete trigger element.\n */\n connectedTo;\n /**\n * `autocomplete` attribute to be set on the input element.\n * @docs-private\n */\n autocompleteAttribute = 'off';\n /**\n * Whether the autocomplete is disabled. When disabled, the element will\n * act as a regular input and the user won't be able to open the panel.\n */\n autocompleteDisabled;\n constructor() {}\n /** Class to apply to the panel when it's above the input. */\n _aboveClass = 'mat-mdc-autocomplete-panel-above';\n ngAfterViewInit() {\n this._initialized.next();\n this._initialized.complete();\n this._cleanupWindowBlur = this._renderer.listen('window', 'blur', this._windowBlurHandler);\n }\n ngOnChanges(changes) {\n if (changes['position'] && this._positionStrategy) {\n this._setStrategyPositions(this._positionStrategy);\n if (this.panelOpen) {\n this._overlayRef.updatePosition();\n }\n }\n }\n ngOnDestroy() {\n this._cleanupWindowBlur?.();\n this._handsetLandscapeSubscription.unsubscribe();\n this._viewportSubscription.unsubscribe();\n this._componentDestroyed = true;\n this._destroyPanel();\n this._closeKeyEventStream.complete();\n this._clearFromModal();\n }\n /** Whether or not the autocomplete panel is open. */\n get panelOpen() {\n return this._overlayAttached && this.autocomplete.showPanel;\n }\n _overlayAttached = false;\n /** Opens the autocomplete suggestion panel. */\n openPanel() {\n this._openPanelInternal();\n }\n /** Closes the autocomplete suggestion panel. */\n closePanel() {\n this._resetLabel();\n if (!this._overlayAttached) {\n return;\n }\n if (this.panelOpen) {\n // Only emit if the panel was visible.\n // `afterNextRender` always runs outside of the Angular zone, so all the subscriptions from\n // `_subscribeToClosingActions()` are also outside of the Angular zone.\n // We should manually run in Angular zone to update UI after panel closing.\n this._zone.run(() => {\n this.autocomplete.closed.emit();\n });\n }\n // Only reset if this trigger is the latest one that opened the\n // autocomplete since another may have taken it over.\n if (this.autocomplete._latestOpeningTrigger === this) {\n this.autocomplete._isOpen = false;\n this.autocomplete._latestOpeningTrigger = null;\n }\n this._overlayAttached = false;\n this._pendingAutoselectedOption = null;\n if (this._overlayRef && this._overlayRef.hasAttached()) {\n this._overlayRef.detach();\n this._closingActionsSubscription.unsubscribe();\n }\n this._updatePanelState();\n // Note that in some cases this can end up being called after the component is destroyed.\n // Add a check to ensure that we don't try to run change detection on a destroyed view.\n if (!this._componentDestroyed) {\n // We need to trigger change detection manually, because\n // `fromEvent` doesn't seem to do it at the proper time.\n // This ensures that the label is reset when the\n // user clicks outside.\n this._changeDetectorRef.detectChanges();\n }\n // Remove aria-owns attribute when the autocomplete is no longer visible.\n if (this._trackedModal) {\n removeAriaReferencedId(this._trackedModal, 'aria-owns', this.autocomplete.id);\n }\n }\n /**\n * Updates the position of the autocomplete suggestion panel to ensure that it fits all options\n * within the viewport.\n */\n updatePosition() {\n if (this._overlayAttached) {\n this._overlayRef.updatePosition();\n }\n }\n /**\n * A stream of actions that should close the autocomplete panel, including\n * when an option is selected, on blur, and when TAB is pressed.\n */\n get panelClosingActions() {\n return merge(this.optionSelections, this.autocomplete._keyManager.tabOut.pipe(filter(() => this._overlayAttached)), this._closeKeyEventStream, this._getOutsideClickStream(), this._overlayRef ? this._overlayRef.detachments().pipe(filter(() => this._overlayAttached)) : of()).pipe(\n // Normalize the output so we return a consistent type.\n map(event => event instanceof MatOptionSelectionChange ? event : null));\n }\n /** Stream of changes to the selection state of the autocomplete options. */\n optionSelections = defer(() => {\n const options = this.autocomplete ? this.autocomplete.options : null;\n if (options) {\n return options.changes.pipe(startWith(options), switchMap(() => merge(...options.map(option => option.onSelectionChange))));\n }\n // If there are any subscribers before `ngAfterViewInit`, the `autocomplete` will be undefined.\n // Return a stream that we'll replace with the real one once everything is in place.\n return this._initialized.pipe(switchMap(() => this.optionSelections));\n });\n /** The currently active option, coerced to MatOption type. */\n get activeOption() {\n if (this.autocomplete && this.autocomplete._keyManager) {\n return this.autocomplete._keyManager.activeItem;\n }\n return null;\n }\n /** Stream of clicks outside of the autocomplete panel. */\n _getOutsideClickStream() {\n return new Observable(observer => {\n const listener = event => {\n // If we're in the Shadow DOM, the event target will be the shadow root, so we have to\n // fall back to check the first element in the path of the click event.\n const clickTarget = _getEventTarget(event);\n const formField = this._formField ? this._formField.getConnectedOverlayOrigin().nativeElement : null;\n const customOrigin = this.connectedTo ? this.connectedTo.elementRef.nativeElement : null;\n if (this._overlayAttached && clickTarget !== this._element.nativeElement &&\n // Normally focus moves inside `mousedown` so this condition will almost always be\n // true. Its main purpose is to handle the case where the input is focused from an\n // outside click which propagates up to the `body` listener within the same sequence\n // and causes the panel to close immediately (see #3106).\n this._document.activeElement !== this._element.nativeElement && (!formField || !formField.contains(clickTarget)) && (!customOrigin || !customOrigin.contains(clickTarget)) && !!this._overlayRef && !this._overlayRef.overlayElement.contains(clickTarget)) {\n observer.next(event);\n }\n };\n const cleanups = [this._renderer.listen('document', 'click', listener), this._renderer.listen('document', 'auxclick', listener), this._renderer.listen('document', 'touchend', listener)];\n return () => {\n cleanups.forEach(current => current());\n };\n });\n }\n // Implemented as part of ControlValueAccessor.\n writeValue(value) {\n Promise.resolve(null).then(() => this._assignOptionValue(value));\n }\n // Implemented as part of ControlValueAccessor.\n registerOnChange(fn) {\n this._onChange = fn;\n }\n // Implemented as part of ControlValueAccessor.\n registerOnTouched(fn) {\n this._onTouched = fn;\n }\n // Implemented as part of ControlValueAccessor.\n setDisabledState(isDisabled) {\n this._element.nativeElement.disabled = isDisabled;\n }\n _handleKeydown(event) {\n const keyCode = event.keyCode;\n const hasModifier = hasModifierKey(event);\n // Prevent the default action on all escape key presses. This is here primarily to bring IE\n // in line with other browsers. By default, pressing escape on IE will cause it to revert\n // the input value to the one that it had on focus, however it won't dispatch any events\n // which means that the model value will be out of sync with the view.\n if (keyCode === ESCAPE && !hasModifier) {\n event.preventDefault();\n }\n this._valueOnLastKeydown = this._element.nativeElement.value;\n if (this.activeOption && keyCode === ENTER && this.panelOpen && !hasModifier) {\n this.activeOption._selectViaInteraction();\n this._resetActiveItem();\n event.preventDefault();\n } else if (this.autocomplete) {\n const prevActiveItem = this.autocomplete._keyManager.activeItem;\n const isArrowKey = keyCode === UP_ARROW || keyCode === DOWN_ARROW;\n if (keyCode === TAB || isArrowKey && !hasModifier && this.panelOpen) {\n this.autocomplete._keyManager.onKeydown(event);\n } else if (isArrowKey && this._canOpen()) {\n this._openPanelInternal(this._valueOnLastKeydown);\n }\n if (isArrowKey || this.autocomplete._keyManager.activeItem !== prevActiveItem) {\n this._scrollToOption(this.autocomplete._keyManager.activeItemIndex || 0);\n if (this.autocomplete.autoSelectActiveOption && this.activeOption) {\n if (!this._pendingAutoselectedOption) {\n this._valueBeforeAutoSelection = this._valueOnLastKeydown;\n }\n this._pendingAutoselectedOption = this.activeOption;\n this._assignOptionValue(this.activeOption.value);\n }\n }\n }\n }\n _handleInput(event) {\n let target = event.target;\n let value = target.value;\n // Based on `NumberValueAccessor` from forms.\n if (target.type === 'number') {\n value = value == '' ? null : parseFloat(value);\n }\n // If the input has a placeholder, IE will fire the `input` event on page load,\n // focus and blur, in addition to when the user actually changed the value. To\n // filter out all of the extra events, we save the value on focus and between\n // `input` events, and we check whether it changed.\n // See: https://connect.microsoft.com/IE/feedback/details/885747/\n if (this._previousValue !== value) {\n this._previousValue = value;\n this._pendingAutoselectedOption = null;\n // If selection is required we don't write to the CVA while the user is typing.\n // At the end of the selection either the user will have picked something\n // or we'll reset the value back to null.\n if (!this.autocomplete || !this.autocomplete.requireSelection) {\n this._onChange(value);\n }\n if (!value) {\n this._clearPreviousSelectedOption(null, false);\n } else if (this.panelOpen && !this.autocomplete.requireSelection) {\n // Note that we don't reset this when `requireSelection` is enabled,\n // because the option will be reset when the panel is closed.\n const selectedOption = this.autocomplete.options?.find(option => option.selected);\n if (selectedOption) {\n const display = this._getDisplayValue(selectedOption.value);\n if (value !== display) {\n selectedOption.deselect(false);\n }\n }\n }\n if (this._canOpen() && this._document.activeElement === event.target) {\n // When the `input` event fires, the input's value will have already changed. This means\n // that if we take the `this._element.nativeElement.value` directly, it'll be one keystroke\n // behind. This can be a problem when the user selects a value, changes a character while\n // the input still has focus and then clicks away (see #28432). To work around it, we\n // capture the value in `keydown` so we can use it here.\n const valueOnAttach = this._valueOnLastKeydown ?? this._element.nativeElement.value;\n this._valueOnLastKeydown = null;\n this._openPanelInternal(valueOnAttach);\n }\n }\n }\n _handleFocus() {\n if (!this._canOpenOnNextFocus) {\n this._canOpenOnNextFocus = true;\n } else if (this._canOpen()) {\n this._previousValue = this._element.nativeElement.value;\n this._attachOverlay(this._previousValue);\n this._floatLabel(true);\n }\n }\n _handleClick() {\n if (this._canOpen() && !this.panelOpen) {\n this._openPanelInternal();\n }\n }\n /**\n * In \"auto\" mode, the label will animate down as soon as focus is lost.\n * This causes the value to jump when selecting an option with the mouse.\n * This method manually floats the label until the panel can be closed.\n * @param shouldAnimate Whether the label should be animated when it is floated.\n */\n _floatLabel(shouldAnimate = false) {\n if (this._formField && this._formField.floatLabel === 'auto') {\n if (shouldAnimate) {\n this._formField._animateAndLockLabel();\n } else {\n this._formField.floatLabel = 'always';\n }\n this._manuallyFloatingLabel = true;\n }\n }\n /** If the label has been manually elevated, return it to its normal state. */\n _resetLabel() {\n if (this._manuallyFloatingLabel) {\n if (this._formField) {\n this._formField.floatLabel = 'auto';\n }\n this._manuallyFloatingLabel = false;\n }\n }\n /**\n * This method listens to a stream of panel closing actions and resets the\n * stream every time the option list changes.\n */\n _subscribeToClosingActions() {\n const initialRender = new Observable(subscriber => {\n afterNextRender(() => {\n subscriber.next();\n }, {\n injector: this._environmentInjector\n });\n });\n const optionChanges = this.autocomplete.options.changes.pipe(tap(() => this._positionStrategy.reapplyLastPosition()),\n // Defer emitting to the stream until the next tick, because changing\n // bindings in here will cause \"changed after checked\" errors.\n delay(0));\n // When the options are initially rendered, and when the option list changes...\n return merge(initialRender, optionChanges).pipe(\n // create a new stream of panelClosingActions, replacing any previous streams\n // that were created, and flatten it so our stream only emits closing events...\n switchMap(() => this._zone.run(() => {\n // `afterNextRender` always runs outside of the Angular zone, thus we have to re-enter\n // the Angular zone. This will lead to change detection being called outside of the Angular\n // zone and the `autocomplete.opened` will also emit outside of the Angular.\n const wasOpen = this.panelOpen;\n this._resetActiveItem();\n this._updatePanelState();\n this._changeDetectorRef.detectChanges();\n if (this.panelOpen) {\n this._overlayRef.updatePosition();\n }\n if (wasOpen !== this.panelOpen) {\n // If the `panelOpen` state changed, we need to make sure to emit the `opened` or\n // `closed` event, because we may not have emitted it. This can happen\n // - if the users opens the panel and there are no options, but the\n // options come in slightly later or as a result of the value changing,\n // - if the panel is closed after the user entered a string that did not match any\n // of the available options,\n // - if a valid string is entered after an invalid one.\n if (this.panelOpen) {\n this._emitOpened();\n } else {\n this.autocomplete.closed.emit();\n }\n }\n return this.panelClosingActions;\n })),\n // when the first closing event occurs...\n take(1))\n // set the value, close the panel, and complete.\n .subscribe(event => this._setValueAndClose(event));\n }\n /**\n * Emits the opened event once it's known that the panel will be shown and stores\n * the state of the trigger right before the opening sequence was finished.\n */\n _emitOpened() {\n this.autocomplete.opened.emit();\n }\n /** Destroys the autocomplete suggestion panel. */\n _destroyPanel() {\n if (this._overlayRef) {\n this.closePanel();\n this._overlayRef.dispose();\n this._overlayRef = null;\n }\n }\n /** Given a value, returns the string that should be shown within the input. */\n _getDisplayValue(value) {\n const autocomplete = this.autocomplete;\n return autocomplete && autocomplete.displayWith ? autocomplete.displayWith(value) : value;\n }\n _assignOptionValue(value) {\n const toDisplay = this._getDisplayValue(value);\n if (value == null) {\n this._clearPreviousSelectedOption(null, false);\n }\n // Simply falling back to an empty string if the display value is falsy does not work properly.\n // The display value can also be the number zero and shouldn't fall back to an empty string.\n this._updateNativeInputValue(toDisplay != null ? toDisplay : '');\n }\n _updateNativeInputValue(value) {\n // If it's used within a `MatFormField`, we should set it through the property so it can go\n // through change detection.\n if (this._formField) {\n this._formField._control.value = value;\n } else {\n this._element.nativeElement.value = value;\n }\n this._previousValue = value;\n }\n /**\n * This method closes the panel, and if a value is specified, also sets the associated\n * control to that value. It will also mark the control as dirty if this interaction\n * stemmed from the user.\n */\n _setValueAndClose(event) {\n const panel = this.autocomplete;\n const toSelect = event ? event.source : this._pendingAutoselectedOption;\n if (toSelect) {\n this._clearPreviousSelectedOption(toSelect);\n this._assignOptionValue(toSelect.value);\n // TODO(crisbeto): this should wait until the animation is done, otherwise the value\n // gets reset while the panel is still animating which looks glitchy. It'll likely break\n // some tests to change it at this point.\n this._onChange(toSelect.value);\n panel._emitSelectEvent(toSelect);\n this._element.nativeElement.focus();\n } else if (panel.requireSelection && this._element.nativeElement.value !== this._valueOnAttach) {\n this._clearPreviousSelectedOption(null);\n this._assignOptionValue(null);\n // Wait for the animation to finish before clearing the form control value, otherwise\n // the options might change while the animation is running which looks glitchy.\n if (panel._animationDone) {\n panel._animationDone.pipe(take(1)).subscribe(() => this._onChange(null));\n } else {\n this._onChange(null);\n }\n }\n this.closePanel();\n }\n /**\n * Clear any previous selected option and emit a selection change event for this option\n */\n _clearPreviousSelectedOption(skip, emitEvent) {\n // Null checks are necessary here, because the autocomplete\n // or its options may not have been assigned yet.\n this.autocomplete?.options?.forEach(option => {\n if (option !== skip && option.selected) {\n option.deselect(emitEvent);\n }\n });\n }\n _openPanelInternal(valueOnAttach = this._element.nativeElement.value) {\n this._attachOverlay(valueOnAttach);\n this._floatLabel();\n // Add aria-owns attribute when the autocomplete becomes visible.\n if (this._trackedModal) {\n const panelId = this.autocomplete.id;\n addAriaReferencedId(this._trackedModal, 'aria-owns', panelId);\n }\n }\n _attachOverlay(valueOnAttach) {\n if (!this.autocomplete && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throw getMatAutocompleteMissingPanelError();\n }\n let overlayRef = this._overlayRef;\n if (!overlayRef) {\n this._portal = new TemplatePortal(this.autocomplete.template, this._viewContainerRef, {\n id: this._formField?.getLabelId()\n });\n overlayRef = this._overlay.create(this._getOverlayConfig());\n this._overlayRef = overlayRef;\n this._viewportSubscription = this._viewportRuler.change().subscribe(() => {\n if (this.panelOpen && overlayRef) {\n overlayRef.updateSize({\n width: this._getPanelWidth()\n });\n }\n });\n // Subscribe to the breakpoint events stream to detect when screen is in\n // handsetLandscape.\n this._handsetLandscapeSubscription = this._breakpointObserver.observe(Breakpoints.HandsetLandscape).subscribe(result => {\n const isHandsetLandscape = result.matches;\n // Check if result.matches Breakpoints.HandsetLandscape. Apply HandsetLandscape\n // settings to prevent overlay cutoff in that breakpoint. Fixes b/284148377\n if (isHandsetLandscape) {\n this._positionStrategy.withFlexibleDimensions(true).withGrowAfterOpen(true).withViewportMargin(8);\n } else {\n this._positionStrategy.withFlexibleDimensions(false).withGrowAfterOpen(false).withViewportMargin(0);\n }\n });\n } else {\n // Update the trigger, panel width and direction, in case anything has changed.\n this._positionStrategy.setOrigin(this._getConnectedElement());\n overlayRef.updateSize({\n width: this._getPanelWidth()\n });\n }\n if (overlayRef && !overlayRef.hasAttached()) {\n overlayRef.attach(this._portal);\n this._valueOnAttach = valueOnAttach;\n this._valueOnLastKeydown = null;\n this._closingActionsSubscription = this._subscribeToClosingActions();\n }\n const wasOpen = this.panelOpen;\n this.autocomplete._isOpen = this._overlayAttached = true;\n this.autocomplete._latestOpeningTrigger = this;\n this.autocomplete._setColor(this._formField?.color);\n this._updatePanelState();\n this._applyModalPanelOwnership();\n // We need to do an extra `panelOpen` check in here, because the\n // autocomplete won't be shown if there are no options.\n if (this.panelOpen && wasOpen !== this.panelOpen) {\n this._emitOpened();\n }\n }\n /** Handles keyboard events coming from the overlay panel. */\n _handlePanelKeydown = event => {\n // Close when pressing ESCAPE or ALT + UP_ARROW, based on the a11y guidelines.\n // See: https://www.w3.org/TR/wai-aria-practices-1.1/#textbox-keyboard-interaction\n if (event.keyCode === ESCAPE && !hasModifierKey(event) || event.keyCode === UP_ARROW && hasModifierKey(event, 'altKey')) {\n // If the user had typed something in before we autoselected an option, and they decided\n // to cancel the selection, restore the input value to the one they had typed in.\n if (this._pendingAutoselectedOption) {\n this._updateNativeInputValue(this._valueBeforeAutoSelection ?? '');\n this._pendingAutoselectedOption = null;\n }\n this._closeKeyEventStream.next();\n this._resetActiveItem();\n // We need to stop propagation, otherwise the event will eventually\n // reach the input itself and cause the overlay to be reopened.\n event.stopPropagation();\n event.preventDefault();\n }\n };\n /** Updates the panel's visibility state and any trigger state tied to id. */\n _updatePanelState() {\n this.autocomplete._setVisibility();\n // Note that here we subscribe and unsubscribe based on the panel's visiblity state,\n // because the act of subscribing will prevent events from reaching other overlays and\n // we don't want to block the events if there are no options.\n if (this.panelOpen) {\n const overlayRef = this._overlayRef;\n if (!this._keydownSubscription) {\n // Use the `keydownEvents` in order to take advantage of\n // the overlay event targeting provided by the CDK overlay.\n this._keydownSubscription = overlayRef.keydownEvents().subscribe(this._handlePanelKeydown);\n }\n if (!this._outsideClickSubscription) {\n // Subscribe to the pointer events stream so that it doesn't get picked up by other overlays.\n // TODO(crisbeto): we should switch `_getOutsideClickStream` eventually to use this stream,\n // but the behvior isn't exactly the same and it ends up breaking some internal tests.\n this._outsideClickSubscription = overlayRef.outsidePointerEvents().subscribe();\n }\n } else {\n this._keydownSubscription?.unsubscribe();\n this._outsideClickSubscription?.unsubscribe();\n this._keydownSubscription = this._outsideClickSubscription = null;\n }\n }\n _getOverlayConfig() {\n return new OverlayConfig({\n positionStrategy: this._getOverlayPosition(),\n scrollStrategy: this._scrollStrategy(),\n width: this._getPanelWidth(),\n direction: this._dir ?? undefined,\n panelClass: this._defaults?.overlayPanelClass\n });\n }\n _getOverlayPosition() {\n // Set default Overlay Position\n const strategy = this._overlay.position().flexibleConnectedTo(this._getConnectedElement()).withFlexibleDimensions(false).withPush(false);\n this._setStrategyPositions(strategy);\n this._positionStrategy = strategy;\n return strategy;\n }\n /** Sets the positions on a position strategy based on the directive's input state. */\n _setStrategyPositions(positionStrategy) {\n // Note that we provide horizontal fallback positions, even though by default the dropdown\n // width matches the input, because consumers can override the width. See #18854.\n const belowPositions = [{\n originX: 'start',\n originY: 'bottom',\n overlayX: 'start',\n overlayY: 'top'\n }, {\n originX: 'end',\n originY: 'bottom',\n overlayX: 'end',\n overlayY: 'top'\n }];\n // The overlay edge connected to the trigger should have squared corners, while\n // the opposite end has rounded corners. We apply a CSS class to swap the\n // border-radius based on the overlay position.\n const panelClass = this._aboveClass;\n const abovePositions = [{\n originX: 'start',\n originY: 'top',\n overlayX: 'start',\n overlayY: 'bottom',\n panelClass\n }, {\n originX: 'end',\n originY: 'top',\n overlayX: 'end',\n overlayY: 'bottom',\n panelClass\n }];\n let positions;\n if (this.position === 'above') {\n positions = abovePositions;\n } else if (this.position === 'below') {\n positions = belowPositions;\n } else {\n positions = [...belowPositions, ...abovePositions];\n }\n positionStrategy.withPositions(positions);\n }\n _getConnectedElement() {\n if (this.connectedTo) {\n return this.connectedTo.elementRef;\n }\n return this._formField ? this._formField.getConnectedOverlayOrigin() : this._element;\n }\n _getPanelWidth() {\n return this.autocomplete.panelWidth || this._getHostWidth();\n }\n /** Returns the width of the input element, so the panel width can match it. */\n _getHostWidth() {\n return this._getConnectedElement().nativeElement.getBoundingClientRect().width;\n }\n /**\n * Reset the active item to -1. This is so that pressing arrow keys will activate the correct\n * option.\n *\n * If the consumer opted-in to automatically activatating the first option, activate the first\n * *enabled* option.\n */\n _resetActiveItem() {\n const autocomplete = this.autocomplete;\n if (autocomplete.autoActiveFirstOption) {\n // Find the index of the first *enabled* option. Avoid calling `_keyManager.setActiveItem`\n // because it activates the first option that passes the skip predicate, rather than the\n // first *enabled* option.\n let firstEnabledOptionIndex = -1;\n for (let index = 0; index < autocomplete.options.length; index++) {\n const option = autocomplete.options.get(index);\n if (!option.disabled) {\n firstEnabledOptionIndex = index;\n break;\n }\n }\n autocomplete._keyManager.setActiveItem(firstEnabledOptionIndex);\n } else {\n autocomplete._keyManager.setActiveItem(-1);\n }\n }\n /** Determines whether the panel can be opened. */\n _canOpen() {\n const element = this._element.nativeElement;\n return !element.readOnly && !element.disabled && !this.autocompleteDisabled;\n }\n /** Scrolls to a particular option in the list. */\n _scrollToOption(index) {\n // Given that we are not actually focusing active options, we must manually adjust scroll\n // to reveal options below the fold. First, we find the offset of the option from the top\n // of the panel. If that offset is below the fold, the new scrollTop will be the offset -\n // the panel height + the option height, so the active option will be just visible at the\n // bottom of the panel. If that offset is above the top of the visible panel, the new scrollTop\n // will become the offset. If that offset is visible within the panel already, the scrollTop is\n // not adjusted.\n const autocomplete = this.autocomplete;\n const labelCount = _countGroupLabelsBeforeOption(index, autocomplete.options, autocomplete.optionGroups);\n if (index === 0 && labelCount === 1) {\n // If we've got one group label before the option and we're at the top option,\n // scroll the list to the top. This is better UX than scrolling the list to the\n // top of the option, because it allows the user to read the top group's label.\n autocomplete._setScrollTop(0);\n } else if (autocomplete.panel) {\n const option = autocomplete.options.toArray()[index];\n if (option) {\n const element = option._getHostElement();\n const newScrollPosition = _getOptionScrollPosition(element.offsetTop, element.offsetHeight, autocomplete._getScrollTop(), autocomplete.panel.nativeElement.offsetHeight);\n autocomplete._setScrollTop(newScrollPosition);\n }\n }\n }\n /**\n * Track which modal we have modified the `aria-owns` attribute of. When the combobox trigger is\n * inside an aria-modal, we apply aria-owns to the parent modal with the `id` of the options\n * panel. Track the modal we have changed so we can undo the changes on destroy.\n */\n _trackedModal = null;\n /**\n * If the autocomplete trigger is inside of an `aria-modal` element, connect\n * that modal to the options panel with `aria-owns`.\n *\n * For some browser + screen reader combinations, when navigation is inside\n * of an `aria-modal` element, the screen reader treats everything outside\n * of that modal as hidden or invisible.\n *\n * This causes a problem when the combobox trigger is _inside_ of a modal, because the\n * options panel is rendered _outside_ of that modal, preventing screen reader navigation\n * from reaching the panel.\n *\n * We can work around this issue by applying `aria-owns` to the modal with the `id` of\n * the options panel. This effectively communicates to assistive technology that the\n * options panel is part of the same interaction as the modal.\n *\n * At time of this writing, this issue is present in VoiceOver.\n * See https://github.com/angular/components/issues/20694\n */\n _applyModalPanelOwnership() {\n // TODO(http://github.com/angular/components/issues/26853): consider de-duplicating this with\n // the `LiveAnnouncer` and any other usages.\n //\n // Note that the selector here is limited to CDK overlays at the moment in order to reduce the\n // section of the DOM we need to look through. This should cover all the cases we support, but\n // the selector can be expanded if it turns out to be too narrow.\n const modal = this._element.nativeElement.closest('body > .cdk-overlay-container [aria-modal=\"true\"]');\n if (!modal) {\n // Most commonly, the autocomplete trigger is not inside a modal.\n return;\n }\n const panelId = this.autocomplete.id;\n if (this._trackedModal) {\n removeAriaReferencedId(this._trackedModal, 'aria-owns', panelId);\n }\n addAriaReferencedId(modal, 'aria-owns', panelId);\n this._trackedModal = modal;\n }\n /** Clears the references to the listbox overlay element from the modal it was added to. */\n _clearFromModal() {\n if (this._trackedModal) {\n const panelId = this.autocomplete.id;\n removeAriaReferencedId(this._trackedModal, 'aria-owns', panelId);\n this._trackedModal = null;\n }\n }\n static ɵfac = function MatAutocompleteTrigger_Factory(__ngFactoryType__) {\n return new (__ngFactoryType__ || MatAutocompleteTrigger)();\n };\n static ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: MatAutocompleteTrigger,\n selectors: [[\"input\", \"matAutocomplete\", \"\"], [\"textarea\", \"matAutocomplete\", \"\"]],\n hostAttrs: [1, \"mat-mdc-autocomplete-trigger\"],\n hostVars: 7,\n hostBindings: function MatAutocompleteTrigger_HostBindings(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵlistener(\"focusin\", function MatAutocompleteTrigger_focusin_HostBindingHandler() {\n return ctx._handleFocus();\n })(\"blur\", function MatAutocompleteTrigger_blur_HostBindingHandler() {\n return ctx._onTouched();\n })(\"input\", function MatAutocompleteTrigger_input_HostBindingHandler($event) {\n return ctx._handleInput($event);\n })(\"keydown\", function MatAutocompleteTrigger_keydown_HostBindingHandler($event) {\n return ctx._handleKeydown($event);\n })(\"click\", function MatAutocompleteTrigger_click_HostBindingHandler() {\n return ctx._handleClick();\n });\n }\n if (rf & 2) {\n i0.ɵɵattribute(\"autocomplete\", ctx.autocompleteAttribute)(\"role\", ctx.autocompleteDisabled ? null : \"combobox\")(\"aria-autocomplete\", ctx.autocompleteDisabled ? null : \"list\")(\"aria-activedescendant\", ctx.panelOpen && ctx.activeOption ? ctx.activeOption.id : null)(\"aria-expanded\", ctx.autocompleteDisabled ? null : ctx.panelOpen.toString())(\"aria-controls\", ctx.autocompleteDisabled || !ctx.panelOpen ? null : ctx.autocomplete == null ? null : ctx.autocomplete.id)(\"aria-haspopup\", ctx.autocompleteDisabled ? null : \"listbox\");\n }\n },\n inputs: {\n autocomplete: [0, \"matAutocomplete\", \"autocomplete\"],\n position: [0, \"matAutocompletePosition\", \"position\"],\n connectedTo: [0, \"matAutocompleteConnectedTo\", \"connectedTo\"],\n autocompleteAttribute: [0, \"autocomplete\", \"autocompleteAttribute\"],\n autocompleteDisabled: [2, \"matAutocompleteDisabled\", \"autocompleteDisabled\", booleanAttribute]\n },\n exportAs: [\"matAutocompleteTrigger\"],\n features: [i0.ɵɵProvidersFeature([MAT_AUTOCOMPLETE_VALUE_ACCESSOR]), i0.ɵɵInputTransformsFeature, i0.ɵɵNgOnChangesFeature]\n });\n }\n return MatAutocompleteTrigger;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet MatAutocompleteModule = /*#__PURE__*/(() => {\n class MatAutocompleteModule {\n static ɵfac = function MatAutocompleteModule_Factory(__ngFactoryType__) {\n return new (__ngFactoryType__ || MatAutocompleteModule)();\n };\n static ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: MatAutocompleteModule\n });\n static ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({\n providers: [MAT_AUTOCOMPLETE_SCROLL_STRATEGY_FACTORY_PROVIDER],\n imports: [OverlayModule, MatOptionModule, MatCommonModule, CdkScrollableModule, MatOptionModule, MatCommonModule]\n });\n }\n return MatAutocompleteModule;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { MAT_AUTOCOMPLETE_DEFAULT_OPTIONS, MAT_AUTOCOMPLETE_DEFAULT_OPTIONS_FACTORY, MAT_AUTOCOMPLETE_SCROLL_STRATEGY, MAT_AUTOCOMPLETE_SCROLL_STRATEGY_FACTORY, MAT_AUTOCOMPLETE_SCROLL_STRATEGY_FACTORY_PROVIDER, MAT_AUTOCOMPLETE_VALUE_ACCESSOR, MatAutocomplete, MatAutocompleteModule, MatAutocompleteOrigin, MatAutocompleteSelectedEvent, MatAutocompleteTrigger, getMatAutocompleteMissingPanelError };\n","/**\n * marked v12.0.2 - a markdown parser\n * Copyright (c) 2011-2024, Christopher Jeffrey. (MIT Licensed)\n * https://github.com/markedjs/marked\n */\n\n/**\n * DO NOT EDIT THIS FILE\n * The code in this file is generated from files in ./src/\n */\n\n/**\n * Gets the original marked default options.\n */\nfunction _getDefaults() {\n return {\n async: false,\n breaks: false,\n extensions: null,\n gfm: true,\n hooks: null,\n pedantic: false,\n renderer: null,\n silent: false,\n tokenizer: null,\n walkTokens: null\n };\n}\nlet _defaults = _getDefaults();\nfunction changeDefaults(newDefaults) {\n _defaults = newDefaults;\n}\n\n/**\n * Helpers\n */\nconst escapeTest = /[&<>\"']/;\nconst escapeReplace = new RegExp(escapeTest.source, 'g');\nconst escapeTestNoEncode = /[<>\"']|&(?!(#\\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\\w+);)/;\nconst escapeReplaceNoEncode = new RegExp(escapeTestNoEncode.source, 'g');\nconst escapeReplacements = {\n '&': '&',\n '<': '<',\n '>': '>',\n '\"': '"',\n \"'\": '''\n};\nconst getEscapeReplacement = ch => escapeReplacements[ch];\nfunction escape$1(html, encode) {\n if (encode) {\n if (escapeTest.test(html)) {\n return html.replace(escapeReplace, getEscapeReplacement);\n }\n } else {\n if (escapeTestNoEncode.test(html)) {\n return html.replace(escapeReplaceNoEncode, getEscapeReplacement);\n }\n }\n return html;\n}\nconst unescapeTest = /&(#(?:\\d+)|(?:#x[0-9A-Fa-f]+)|(?:\\w+));?/ig;\nfunction unescape(html) {\n // explicitly match decimal, hex, and named HTML entities\n return html.replace(unescapeTest, (_, n) => {\n n = n.toLowerCase();\n if (n === 'colon') return ':';\n if (n.charAt(0) === '#') {\n return n.charAt(1) === 'x' ? String.fromCharCode(parseInt(n.substring(2), 16)) : String.fromCharCode(+n.substring(1));\n }\n return '';\n });\n}\nconst caret = /(^|[^\\[])\\^/g;\nfunction edit(regex, opt) {\n let source = typeof regex === 'string' ? regex : regex.source;\n opt = opt || '';\n const obj = {\n replace: (name, val) => {\n let valSource = typeof val === 'string' ? val : val.source;\n valSource = valSource.replace(caret, '$1');\n source = source.replace(name, valSource);\n return obj;\n },\n getRegex: () => {\n return new RegExp(source, opt);\n }\n };\n return obj;\n}\nfunction cleanUrl(href) {\n try {\n href = encodeURI(href).replace(/%25/g, '%');\n } catch (e) {\n return null;\n }\n return href;\n}\nconst noopTest = {\n exec: () => null\n};\nfunction splitCells(tableRow, count) {\n // ensure that every cell-delimiting pipe has a space\n // before it to distinguish it from an escaped pipe\n const row = tableRow.replace(/\\|/g, (match, offset, str) => {\n let escaped = false;\n let curr = offset;\n while (--curr >= 0 && str[curr] === '\\\\') escaped = !escaped;\n if (escaped) {\n // odd number of slashes means | is escaped\n // so we leave it alone\n return '|';\n } else {\n // add space before unescaped |\n return ' |';\n }\n }),\n cells = row.split(/ \\|/);\n let i = 0;\n // First/last cell in a row cannot be empty if it has no leading/trailing pipe\n if (!cells[0].trim()) {\n cells.shift();\n }\n if (cells.length > 0 && !cells[cells.length - 1].trim()) {\n cells.pop();\n }\n if (count) {\n if (cells.length > count) {\n cells.splice(count);\n } else {\n while (cells.length < count) cells.push('');\n }\n }\n for (; i < cells.length; i++) {\n // leading or trailing whitespace is ignored per the gfm spec\n cells[i] = cells[i].trim().replace(/\\\\\\|/g, '|');\n }\n return cells;\n}\n/**\n * Remove trailing 'c's. Equivalent to str.replace(/c*$/, '').\n * /c*$/ is vulnerable to REDOS.\n *\n * @param str\n * @param c\n * @param invert Remove suffix of non-c chars instead. Default falsey.\n */\nfunction rtrim(str, c, invert) {\n const l = str.length;\n if (l === 0) {\n return '';\n }\n // Length of suffix matching the invert condition.\n let suffLen = 0;\n // Step left until we fail to match the invert condition.\n while (suffLen < l) {\n const currChar = str.charAt(l - suffLen - 1);\n if (currChar === c && !invert) {\n suffLen++;\n } else if (currChar !== c && invert) {\n suffLen++;\n } else {\n break;\n }\n }\n return str.slice(0, l - suffLen);\n}\nfunction findClosingBracket(str, b) {\n if (str.indexOf(b[1]) === -1) {\n return -1;\n }\n let level = 0;\n for (let i = 0; i < str.length; i++) {\n if (str[i] === '\\\\') {\n i++;\n } else if (str[i] === b[0]) {\n level++;\n } else if (str[i] === b[1]) {\n level--;\n if (level < 0) {\n return i;\n }\n }\n }\n return -1;\n}\nfunction outputLink(cap, link, raw, lexer) {\n const href = link.href;\n const title = link.title ? escape$1(link.title) : null;\n const text = cap[1].replace(/\\\\([\\[\\]])/g, '$1');\n if (cap[0].charAt(0) !== '!') {\n lexer.state.inLink = true;\n const token = {\n type: 'link',\n raw,\n href,\n title,\n text,\n tokens: lexer.inlineTokens(text)\n };\n lexer.state.inLink = false;\n return token;\n }\n return {\n type: 'image',\n raw,\n href,\n title,\n text: escape$1(text)\n };\n}\nfunction indentCodeCompensation(raw, text) {\n const matchIndentToCode = raw.match(/^(\\s+)(?:```)/);\n if (matchIndentToCode === null) {\n return text;\n }\n const indentToCode = matchIndentToCode[1];\n return text.split('\\n').map(node => {\n const matchIndentInNode = node.match(/^\\s+/);\n if (matchIndentInNode === null) {\n return node;\n }\n const [indentInNode] = matchIndentInNode;\n if (indentInNode.length >= indentToCode.length) {\n return node.slice(indentToCode.length);\n }\n return node;\n }).join('\\n');\n}\n/**\n * Tokenizer\n */\nclass _Tokenizer {\n options;\n rules; // set by the lexer\n lexer; // set by the lexer\n constructor(options) {\n this.options = options || _defaults;\n }\n space(src) {\n const cap = this.rules.block.newline.exec(src);\n if (cap && cap[0].length > 0) {\n return {\n type: 'space',\n raw: cap[0]\n };\n }\n }\n code(src) {\n const cap = this.rules.block.code.exec(src);\n if (cap) {\n const text = cap[0].replace(/^ {1,4}/gm, '');\n return {\n type: 'code',\n raw: cap[0],\n codeBlockStyle: 'indented',\n text: !this.options.pedantic ? rtrim(text, '\\n') : text\n };\n }\n }\n fences(src) {\n const cap = this.rules.block.fences.exec(src);\n if (cap) {\n const raw = cap[0];\n const text = indentCodeCompensation(raw, cap[3] || '');\n return {\n type: 'code',\n raw,\n lang: cap[2] ? cap[2].trim().replace(this.rules.inline.anyPunctuation, '$1') : cap[2],\n text\n };\n }\n }\n heading(src) {\n const cap = this.rules.block.heading.exec(src);\n if (cap) {\n let text = cap[2].trim();\n // remove trailing #s\n if (/#$/.test(text)) {\n const trimmed = rtrim(text, '#');\n if (this.options.pedantic) {\n text = trimmed.trim();\n } else if (!trimmed || / $/.test(trimmed)) {\n // CommonMark requires space before trailing #s\n text = trimmed.trim();\n }\n }\n return {\n type: 'heading',\n raw: cap[0],\n depth: cap[1].length,\n text,\n tokens: this.lexer.inline(text)\n };\n }\n }\n hr(src) {\n const cap = this.rules.block.hr.exec(src);\n if (cap) {\n return {\n type: 'hr',\n raw: cap[0]\n };\n }\n }\n blockquote(src) {\n const cap = this.rules.block.blockquote.exec(src);\n if (cap) {\n // precede setext continuation with 4 spaces so it isn't a setext\n let text = cap[0].replace(/\\n {0,3}((?:=+|-+) *)(?=\\n|$)/g, '\\n $1');\n text = rtrim(text.replace(/^ *>[ \\t]?/gm, ''), '\\n');\n const top = this.lexer.state.top;\n this.lexer.state.top = true;\n const tokens = this.lexer.blockTokens(text);\n this.lexer.state.top = top;\n return {\n type: 'blockquote',\n raw: cap[0],\n tokens,\n text\n };\n }\n }\n list(src) {\n let cap = this.rules.block.list.exec(src);\n if (cap) {\n let bull = cap[1].trim();\n const isordered = bull.length > 1;\n const list = {\n type: 'list',\n raw: '',\n ordered: isordered,\n start: isordered ? +bull.slice(0, -1) : '',\n loose: false,\n items: []\n };\n bull = isordered ? `\\\\d{1,9}\\\\${bull.slice(-1)}` : `\\\\${bull}`;\n if (this.options.pedantic) {\n bull = isordered ? bull : '[*+-]';\n }\n // Get next list item\n const itemRegex = new RegExp(`^( {0,3}${bull})((?:[\\t ][^\\\\n]*)?(?:\\\\n|$))`);\n let raw = '';\n let itemContents = '';\n let endsWithBlankLine = false;\n // Check if current bullet point can start a new List Item\n while (src) {\n let endEarly = false;\n if (!(cap = itemRegex.exec(src))) {\n break;\n }\n if (this.rules.block.hr.test(src)) {\n // End list if bullet was actually HR (possibly move into itemRegex?)\n break;\n }\n raw = cap[0];\n src = src.substring(raw.length);\n let line = cap[2].split('\\n', 1)[0].replace(/^\\t+/, t => ' '.repeat(3 * t.length));\n let nextLine = src.split('\\n', 1)[0];\n let indent = 0;\n if (this.options.pedantic) {\n indent = 2;\n itemContents = line.trimStart();\n } else {\n indent = cap[2].search(/[^ ]/); // Find first non-space char\n indent = indent > 4 ? 1 : indent; // Treat indented code blocks (> 4 spaces) as having only 1 indent\n itemContents = line.slice(indent);\n indent += cap[1].length;\n }\n let blankLine = false;\n if (!line && /^ *$/.test(nextLine)) {\n // Items begin with at most one blank line\n raw += nextLine + '\\n';\n src = src.substring(nextLine.length + 1);\n endEarly = true;\n }\n if (!endEarly) {\n const nextBulletRegex = new RegExp(`^ {0,${Math.min(3, indent - 1)}}(?:[*+-]|\\\\d{1,9}[.)])((?:[ \\t][^\\\\n]*)?(?:\\\\n|$))`);\n const hrRegex = new RegExp(`^ {0,${Math.min(3, indent - 1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\\\* *){3,})(?:\\\\n+|$)`);\n const fencesBeginRegex = new RegExp(`^ {0,${Math.min(3, indent - 1)}}(?:\\`\\`\\`|~~~)`);\n const headingBeginRegex = new RegExp(`^ {0,${Math.min(3, indent - 1)}}#`);\n // Check if following lines should be included in List Item\n while (src) {\n const rawLine = src.split('\\n', 1)[0];\n nextLine = rawLine;\n // Re-align to follow commonmark nesting rules\n if (this.options.pedantic) {\n nextLine = nextLine.replace(/^ {1,4}(?=( {4})*[^ ])/g, ' ');\n }\n // End list item if found code fences\n if (fencesBeginRegex.test(nextLine)) {\n break;\n }\n // End list item if found start of new heading\n if (headingBeginRegex.test(nextLine)) {\n break;\n }\n // End list item if found start of new bullet\n if (nextBulletRegex.test(nextLine)) {\n break;\n }\n // Horizontal rule found\n if (hrRegex.test(src)) {\n break;\n }\n if (nextLine.search(/[^ ]/) >= indent || !nextLine.trim()) {\n // Dedent if possible\n itemContents += '\\n' + nextLine.slice(indent);\n } else {\n // not enough indentation\n if (blankLine) {\n break;\n }\n // paragraph continuation unless last line was a different block level element\n if (line.search(/[^ ]/) >= 4) {\n // indented code block\n break;\n }\n if (fencesBeginRegex.test(line)) {\n break;\n }\n if (headingBeginRegex.test(line)) {\n break;\n }\n if (hrRegex.test(line)) {\n break;\n }\n itemContents += '\\n' + nextLine;\n }\n if (!blankLine && !nextLine.trim()) {\n // Check if current line is blank\n blankLine = true;\n }\n raw += rawLine + '\\n';\n src = src.substring(rawLine.length + 1);\n line = nextLine.slice(indent);\n }\n }\n if (!list.loose) {\n // If the previous item ended with a blank line, the list is loose\n if (endsWithBlankLine) {\n list.loose = true;\n } else if (/\\n *\\n *$/.test(raw)) {\n endsWithBlankLine = true;\n }\n }\n let istask = null;\n let ischecked;\n // Check for task list items\n if (this.options.gfm) {\n istask = /^\\[[ xX]\\] /.exec(itemContents);\n if (istask) {\n ischecked = istask[0] !== '[ ] ';\n itemContents = itemContents.replace(/^\\[[ xX]\\] +/, '');\n }\n }\n list.items.push({\n type: 'list_item',\n raw,\n task: !!istask,\n checked: ischecked,\n loose: false,\n text: itemContents,\n tokens: []\n });\n list.raw += raw;\n }\n // Do not consume newlines at end of final item. Alternatively, make itemRegex *start* with any newlines to simplify/speed up endsWithBlankLine logic\n list.items[list.items.length - 1].raw = raw.trimEnd();\n list.items[list.items.length - 1].text = itemContents.trimEnd();\n list.raw = list.raw.trimEnd();\n // Item child tokens handled here at end because we needed to have the final item to trim it first\n for (let i = 0; i < list.items.length; i++) {\n this.lexer.state.top = false;\n list.items[i].tokens = this.lexer.blockTokens(list.items[i].text, []);\n if (!list.loose) {\n // Check if list should be loose\n const spacers = list.items[i].tokens.filter(t => t.type === 'space');\n const hasMultipleLineBreaks = spacers.length > 0 && spacers.some(t => /\\n.*\\n/.test(t.raw));\n list.loose = hasMultipleLineBreaks;\n }\n }\n // Set all items to loose if list is loose\n if (list.loose) {\n for (let i = 0; i < list.items.length; i++) {\n list.items[i].loose = true;\n }\n }\n return list;\n }\n }\n html(src) {\n const cap = this.rules.block.html.exec(src);\n if (cap) {\n const token = {\n type: 'html',\n block: true,\n raw: cap[0],\n pre: cap[1] === 'pre' || cap[1] === 'script' || cap[1] === 'style',\n text: cap[0]\n };\n return token;\n }\n }\n def(src) {\n const cap = this.rules.block.def.exec(src);\n if (cap) {\n const tag = cap[1].toLowerCase().replace(/\\s+/g, ' ');\n const href = cap[2] ? cap[2].replace(/^<(.*)>$/, '$1').replace(this.rules.inline.anyPunctuation, '$1') : '';\n const title = cap[3] ? cap[3].substring(1, cap[3].length - 1).replace(this.rules.inline.anyPunctuation, '$1') : cap[3];\n return {\n type: 'def',\n tag,\n raw: cap[0],\n href,\n title\n };\n }\n }\n table(src) {\n const cap = this.rules.block.table.exec(src);\n if (!cap) {\n return;\n }\n if (!/[:|]/.test(cap[2])) {\n // delimiter row must have a pipe (|) or colon (:) otherwise it is a setext heading\n return;\n }\n const headers = splitCells(cap[1]);\n const aligns = cap[2].replace(/^\\||\\| *$/g, '').split('|');\n const rows = cap[3] && cap[3].trim() ? cap[3].replace(/\\n[ \\t]*$/, '').split('\\n') : [];\n const item = {\n type: 'table',\n raw: cap[0],\n header: [],\n align: [],\n rows: []\n };\n if (headers.length !== aligns.length) {\n // header and align columns must be equal, rows can be different.\n return;\n }\n for (const align of aligns) {\n if (/^ *-+: *$/.test(align)) {\n item.align.push('right');\n } else if (/^ *:-+: *$/.test(align)) {\n item.align.push('center');\n } else if (/^ *:-+ *$/.test(align)) {\n item.align.push('left');\n } else {\n item.align.push(null);\n }\n }\n for (const header of headers) {\n item.header.push({\n text: header,\n tokens: this.lexer.inline(header)\n });\n }\n for (const row of rows) {\n item.rows.push(splitCells(row, item.header.length).map(cell => {\n return {\n text: cell,\n tokens: this.lexer.inline(cell)\n };\n }));\n }\n return item;\n }\n lheading(src) {\n const cap = this.rules.block.lheading.exec(src);\n if (cap) {\n return {\n type: 'heading',\n raw: cap[0],\n depth: cap[2].charAt(0) === '=' ? 1 : 2,\n text: cap[1],\n tokens: this.lexer.inline(cap[1])\n };\n }\n }\n paragraph(src) {\n const cap = this.rules.block.paragraph.exec(src);\n if (cap) {\n const text = cap[1].charAt(cap[1].length - 1) === '\\n' ? cap[1].slice(0, -1) : cap[1];\n return {\n type: 'paragraph',\n raw: cap[0],\n text,\n tokens: this.lexer.inline(text)\n };\n }\n }\n text(src) {\n const cap = this.rules.block.text.exec(src);\n if (cap) {\n return {\n type: 'text',\n raw: cap[0],\n text: cap[0],\n tokens: this.lexer.inline(cap[0])\n };\n }\n }\n escape(src) {\n const cap = this.rules.inline.escape.exec(src);\n if (cap) {\n return {\n type: 'escape',\n raw: cap[0],\n text: escape$1(cap[1])\n };\n }\n }\n tag(src) {\n const cap = this.rules.inline.tag.exec(src);\n if (cap) {\n if (!this.lexer.state.inLink && /^/i.test(cap[0])) {\n this.lexer.state.inLink = false;\n }\n if (!this.lexer.state.inRawBlock && /^<(pre|code|kbd|script)(\\s|>)/i.test(cap[0])) {\n this.lexer.state.inRawBlock = true;\n } else if (this.lexer.state.inRawBlock && /^<\\/(pre|code|kbd|script)(\\s|>)/i.test(cap[0])) {\n this.lexer.state.inRawBlock = false;\n }\n return {\n type: 'html',\n raw: cap[0],\n inLink: this.lexer.state.inLink,\n inRawBlock: this.lexer.state.inRawBlock,\n block: false,\n text: cap[0]\n };\n }\n }\n link(src) {\n const cap = this.rules.inline.link.exec(src);\n if (cap) {\n const trimmedUrl = cap[2].trim();\n if (!this.options.pedantic && /^$/.test(trimmedUrl)) {\n return;\n }\n // ending angle bracket cannot be escaped\n const rtrimSlash = rtrim(trimmedUrl.slice(0, -1), '\\\\');\n if ((trimmedUrl.length - rtrimSlash.length) % 2 === 0) {\n return;\n }\n } else {\n // find closing parenthesis\n const lastParenIndex = findClosingBracket(cap[2], '()');\n if (lastParenIndex > -1) {\n const start = cap[0].indexOf('!') === 0 ? 5 : 4;\n const linkLen = start + cap[1].length + lastParenIndex;\n cap[2] = cap[2].substring(0, lastParenIndex);\n cap[0] = cap[0].substring(0, linkLen).trim();\n cap[3] = '';\n }\n }\n let href = cap[2];\n let title = '';\n if (this.options.pedantic) {\n // split pedantic href and title\n const link = /^([^'\"]*[^\\s])\\s+(['\"])(.*)\\2/.exec(href);\n if (link) {\n href = link[1];\n title = link[3];\n }\n } else {\n title = cap[3] ? cap[3].slice(1, -1) : '';\n }\n href = href.trim();\n if (/^$/.test(trimmedUrl)) {\n // pedantic allows starting angle bracket without ending angle bracket\n href = href.slice(1);\n } else {\n href = href.slice(1, -1);\n }\n }\n return outputLink(cap, {\n href: href ? href.replace(this.rules.inline.anyPunctuation, '$1') : href,\n title: title ? title.replace(this.rules.inline.anyPunctuation, '$1') : title\n }, cap[0], this.lexer);\n }\n }\n reflink(src, links) {\n let cap;\n if ((cap = this.rules.inline.reflink.exec(src)) || (cap = this.rules.inline.nolink.exec(src))) {\n const linkString = (cap[2] || cap[1]).replace(/\\s+/g, ' ');\n const link = links[linkString.toLowerCase()];\n if (!link) {\n const text = cap[0].charAt(0);\n return {\n type: 'text',\n raw: text,\n text\n };\n }\n return outputLink(cap, link, cap[0], this.lexer);\n }\n }\n emStrong(src, maskedSrc, prevChar = '') {\n let match = this.rules.inline.emStrongLDelim.exec(src);\n if (!match) return;\n // _ can't be between two alphanumerics. \\p{L}\\p{N} includes non-english alphabet/numbers as well\n if (match[3] && prevChar.match(/[\\p{L}\\p{N}]/u)) return;\n const nextChar = match[1] || match[2] || '';\n if (!nextChar || !prevChar || this.rules.inline.punctuation.exec(prevChar)) {\n // unicode Regex counts emoji as 1 char; spread into array for proper count (used multiple times below)\n const lLength = [...match[0]].length - 1;\n let rDelim,\n rLength,\n delimTotal = lLength,\n midDelimTotal = 0;\n const endReg = match[0][0] === '*' ? this.rules.inline.emStrongRDelimAst : this.rules.inline.emStrongRDelimUnd;\n endReg.lastIndex = 0;\n // Clip maskedSrc to same section of string as src (move to lexer?)\n maskedSrc = maskedSrc.slice(-1 * src.length + lLength);\n while ((match = endReg.exec(maskedSrc)) != null) {\n rDelim = match[1] || match[2] || match[3] || match[4] || match[5] || match[6];\n if (!rDelim) continue; // skip single * in __abc*abc__\n rLength = [...rDelim].length;\n if (match[3] || match[4]) {\n // found another Left Delim\n delimTotal += rLength;\n continue;\n } else if (match[5] || match[6]) {\n // either Left or Right Delim\n if (lLength % 3 && !((lLength + rLength) % 3)) {\n midDelimTotal += rLength;\n continue; // CommonMark Emphasis Rules 9-10\n }\n }\n delimTotal -= rLength;\n if (delimTotal > 0) continue; // Haven't found enough closing delimiters\n // Remove extra characters. *a*** -> *a*\n rLength = Math.min(rLength, rLength + delimTotal + midDelimTotal);\n // char length can be >1 for unicode characters;\n const lastCharLength = [...match[0]][0].length;\n const raw = src.slice(0, lLength + match.index + lastCharLength + rLength);\n // Create `em` if smallest delimiter has odd char count. *a***\n if (Math.min(lLength, rLength) % 2) {\n const text = raw.slice(1, -1);\n return {\n type: 'em',\n raw,\n text,\n tokens: this.lexer.inlineTokens(text)\n };\n }\n // Create 'strong' if smallest delimiter has even char count. **a***\n const text = raw.slice(2, -2);\n return {\n type: 'strong',\n raw,\n text,\n tokens: this.lexer.inlineTokens(text)\n };\n }\n }\n }\n codespan(src) {\n const cap = this.rules.inline.code.exec(src);\n if (cap) {\n let text = cap[2].replace(/\\n/g, ' ');\n const hasNonSpaceChars = /[^ ]/.test(text);\n const hasSpaceCharsOnBothEnds = /^ /.test(text) && / $/.test(text);\n if (hasNonSpaceChars && hasSpaceCharsOnBothEnds) {\n text = text.substring(1, text.length - 1);\n }\n text = escape$1(text, true);\n return {\n type: 'codespan',\n raw: cap[0],\n text\n };\n }\n }\n br(src) {\n const cap = this.rules.inline.br.exec(src);\n if (cap) {\n return {\n type: 'br',\n raw: cap[0]\n };\n }\n }\n del(src) {\n const cap = this.rules.inline.del.exec(src);\n if (cap) {\n return {\n type: 'del',\n raw: cap[0],\n text: cap[2],\n tokens: this.lexer.inlineTokens(cap[2])\n };\n }\n }\n autolink(src) {\n const cap = this.rules.inline.autolink.exec(src);\n if (cap) {\n let text, href;\n if (cap[2] === '@') {\n text = escape$1(cap[1]);\n href = 'mailto:' + text;\n } else {\n text = escape$1(cap[1]);\n href = text;\n }\n return {\n type: 'link',\n raw: cap[0],\n text,\n href,\n tokens: [{\n type: 'text',\n raw: text,\n text\n }]\n };\n }\n }\n url(src) {\n let cap;\n if (cap = this.rules.inline.url.exec(src)) {\n let text, href;\n if (cap[2] === '@') {\n text = escape$1(cap[0]);\n href = 'mailto:' + text;\n } else {\n // do extended autolink path validation\n let prevCapZero;\n do {\n prevCapZero = cap[0];\n cap[0] = this.rules.inline._backpedal.exec(cap[0])?.[0] ?? '';\n } while (prevCapZero !== cap[0]);\n text = escape$1(cap[0]);\n if (cap[1] === 'www.') {\n href = 'http://' + cap[0];\n } else {\n href = cap[0];\n }\n }\n return {\n type: 'link',\n raw: cap[0],\n text,\n href,\n tokens: [{\n type: 'text',\n raw: text,\n text\n }]\n };\n }\n }\n inlineText(src) {\n const cap = this.rules.inline.text.exec(src);\n if (cap) {\n let text;\n if (this.lexer.state.inRawBlock) {\n text = cap[0];\n } else {\n text = escape$1(cap[0]);\n }\n return {\n type: 'text',\n raw: cap[0],\n text\n };\n }\n }\n}\n\n/**\n * Block-Level Grammar\n */\nconst newline = /^(?: *(?:\\n|$))+/;\nconst blockCode = /^( {4}[^\\n]+(?:\\n(?: *(?:\\n|$))*)?)+/;\nconst fences = /^ {0,3}(`{3,}(?=[^`\\n]*(?:\\n|$))|~{3,})([^\\n]*)(?:\\n|$)(?:|([\\s\\S]*?)(?:\\n|$))(?: {0,3}\\1[~`]* *(?=\\n|$)|$)/;\nconst hr = /^ {0,3}((?:-[\\t ]*){3,}|(?:_[ \\t]*){3,}|(?:\\*[ \\t]*){3,})(?:\\n+|$)/;\nconst heading = /^ {0,3}(#{1,6})(?=\\s|$)(.*)(?:\\n+|$)/;\nconst bullet = /(?:[*+-]|\\d{1,9}[.)])/;\nconst lheading = edit(/^(?!bull |blockCode|fences|blockquote|heading|html)((?:.|\\n(?!\\s*?\\n|bull |blockCode|fences|blockquote|heading|html))+?)\\n {0,3}(=+|-+) *(?:\\n+|$)/).replace(/bull/g, bullet) // lists can interrupt\n.replace(/blockCode/g, / {4}/) // indented code blocks can interrupt\n.replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/) // fenced code blocks can interrupt\n.replace(/blockquote/g, / {0,3}>/) // blockquote can interrupt\n.replace(/heading/g, / {0,3}#{1,6}/) // ATX heading can interrupt\n.replace(/html/g, / {0,3}<[^\\n>]+>\\n/) // block html can interrupt\n.getRegex();\nconst _paragraph = /^([^\\n]+(?:\\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\\n)[^\\n]+)*)/;\nconst blockText = /^[^\\n]+/;\nconst _blockLabel = /(?!\\s*\\])(?:\\\\.|[^\\[\\]\\\\])+/;\nconst def = edit(/^ {0,3}\\[(label)\\]: *(?:\\n *)?([^<\\s][^\\s]*|<.*?>)(?:(?: +(?:\\n *)?| *\\n *)(title))? *(?:\\n+|$)/).replace('label', _blockLabel).replace('title', /(?:\"(?:\\\\\"?|[^\"\\\\])*\"|'[^'\\n]*(?:\\n[^'\\n]+)*\\n?'|\\([^()]*\\))/).getRegex();\nconst list = edit(/^( {0,3}bull)([ \\t][^\\n]+?)?(?:\\n|$)/).replace(/bull/g, bullet).getRegex();\nconst _tag = 'address|article|aside|base|basefont|blockquote|body|caption' + '|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption' + '|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe' + '|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option' + '|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title' + '|tr|track|ul';\nconst _comment = /|$))/;\nconst html = edit('^ {0,3}(?:' // optional indentation\n+ '<(script|pre|style|textarea)[\\\\s>][\\\\s\\\\S]*?(?:[^\\\\n]*\\\\n+|$)' // (1)\n+ '|comment[^\\\\n]*(\\\\n+|$)' // (2)\n+ '|<\\\\?[\\\\s\\\\S]*?(?:\\\\?>\\\\n*|$)' // (3)\n+ '|\\\\n*|$)' // (4)\n+ '|\\\\n*|$)' // (5)\n+ '|)[\\\\s\\\\S]*?(?:(?:\\\\n *)+\\\\n|$)' // (6)\n+ '|<(?!script|pre|style|textarea)([a-z][\\\\w-]*)(?:attribute)*? */?>(?=[ \\\\t]*(?:\\\\n|$))[\\\\s\\\\S]*?(?:(?:\\\\n *)+\\\\n|$)' // (7) open tag\n+ '|(?=[ \\\\t]*(?:\\\\n|$))[\\\\s\\\\S]*?(?:(?:\\\\n *)+\\\\n|$)' // (7) closing tag\n+ ')', 'i').replace('comment', _comment).replace('tag', _tag).replace('attribute', / +[a-zA-Z:_][\\w.:-]*(?: *= *\"[^\"\\n]*\"| *= *'[^'\\n]*'| *= *[^\\s\"'=<>`]+)?/).getRegex();\nconst paragraph = edit(_paragraph).replace('hr', hr).replace('heading', ' {0,3}#{1,6}(?:\\\\s|$)').replace('|lheading', '') // setext headings don't interrupt commonmark paragraphs\n.replace('|table', '').replace('blockquote', ' {0,3}>').replace('fences', ' {0,3}(?:`{3,}(?=[^`\\\\n]*\\\\n)|~{3,})[^\\\\n]*\\\\n').replace('list', ' {0,3}(?:[*+-]|1[.)]) ') // only lists starting from 1 can interrupt\n.replace('html', ')|<(?:script|pre|style|textarea|!--)').replace('tag', _tag) // pars can be interrupted by type (6) html blocks\n.getRegex();\nconst blockquote = edit(/^( {0,3}> ?(paragraph|[^\\n]*)(?:\\n|$))+/).replace('paragraph', paragraph).getRegex();\n/**\n * Normal Block Grammar\n */\nconst blockNormal = {\n blockquote,\n code: blockCode,\n def,\n fences,\n heading,\n hr,\n html,\n lheading,\n list,\n newline,\n paragraph,\n table: noopTest,\n text: blockText\n};\n/**\n * GFM Block Grammar\n */\nconst gfmTable = edit('^ *([^\\\\n ].*)\\\\n' // Header\n+ ' {0,3}((?:\\\\| *)?:?-+:? *(?:\\\\| *:?-+:? *)*(?:\\\\| *)?)' // Align\n+ '(?:\\\\n((?:(?! *\\\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\\\n|$))*)\\\\n*|$)') // Cells\n.replace('hr', hr).replace('heading', ' {0,3}#{1,6}(?:\\\\s|$)').replace('blockquote', ' {0,3}>').replace('code', ' {4}[^\\\\n]').replace('fences', ' {0,3}(?:`{3,}(?=[^`\\\\n]*\\\\n)|~{3,})[^\\\\n]*\\\\n').replace('list', ' {0,3}(?:[*+-]|1[.)]) ') // only lists starting from 1 can interrupt\n.replace('html', ')|<(?:script|pre|style|textarea|!--)').replace('tag', _tag) // tables can be interrupted by type (6) html blocks\n.getRegex();\nconst blockGfm = {\n ...blockNormal,\n table: gfmTable,\n paragraph: edit(_paragraph).replace('hr', hr).replace('heading', ' {0,3}#{1,6}(?:\\\\s|$)').replace('|lheading', '') // setext headings don't interrupt commonmark paragraphs\n .replace('table', gfmTable) // interrupt paragraphs with table\n .replace('blockquote', ' {0,3}>').replace('fences', ' {0,3}(?:`{3,}(?=[^`\\\\n]*\\\\n)|~{3,})[^\\\\n]*\\\\n').replace('list', ' {0,3}(?:[*+-]|1[.)]) ') // only lists starting from 1 can interrupt\n .replace('html', ')|<(?:script|pre|style|textarea|!--)').replace('tag', _tag) // pars can be interrupted by type (6) html blocks\n .getRegex()\n};\n/**\n * Pedantic grammar (original John Gruber's loose markdown specification)\n */\nconst blockPedantic = {\n ...blockNormal,\n html: edit('^ *(?:comment *(?:\\\\n|\\\\s*$)' + '|<(tag)[\\\\s\\\\S]+? *(?:\\\\n{2,}|\\\\s*$)' // closed tag\n + '|\\\\s]*)*?/?> *(?:\\\\n{2,}|\\\\s*$))').replace('comment', _comment).replace(/tag/g, '(?!(?:' + 'a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub' + '|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)' + '\\\\b)\\\\w+(?!:|[^\\\\w\\\\s@]*@)\\\\b').getRegex(),\n def: /^ *\\[([^\\]]+)\\]: *]+)>?(?: +([\"(][^\\n]+[\")]))? *(?:\\n+|$)/,\n heading: /^(#{1,6})(.*)(?:\\n+|$)/,\n fences: noopTest,\n // fences not supported\n lheading: /^(.+?)\\n {0,3}(=+|-+) *(?:\\n+|$)/,\n paragraph: edit(_paragraph).replace('hr', hr).replace('heading', ' *#{1,6} *[^\\n]').replace('lheading', lheading).replace('|table', '').replace('blockquote', ' {0,3}>').replace('|fences', '').replace('|list', '').replace('|html', '').replace('|tag', '').getRegex()\n};\n/**\n * Inline-Level Grammar\n */\nconst escape = /^\\\\([!\"#$%&'()*+,\\-./:;<=>?@\\[\\]\\\\^_`{|}~])/;\nconst inlineCode = /^(`+)([^`]|[^`][\\s\\S]*?[^`])\\1(?!`)/;\nconst br = /^( {2,}|\\\\)\\n(?!\\s*$)/;\nconst inlineText = /^(`+|[^`])(?:(?= {2,}\\n)|[\\s\\S]*?(?:(?=[\\\\\nconst blockSkip = /\\[[^[\\]]*?\\]\\([^\\(\\)]*?\\)|`[^`]*?`|<[^<>]*?>/g;\nconst emStrongLDelim = edit(/^(?:\\*+(?:((?!\\*)[punct])|[^\\s*]))|^_+(?:((?!_)[punct])|([^\\s_]))/, 'u').replace(/punct/g, _punctuation).getRegex();\nconst emStrongRDelimAst = edit('^[^_*]*?__[^_*]*?\\\\*[^_*]*?(?=__)' // Skip orphan inside strong\n+ '|[^*]+(?=[^*])' // Consume to delim\n+ '|(?!\\\\*)[punct](\\\\*+)(?=[\\\\s]|$)' // (1) #*** can only be a Right Delimiter\n+ '|[^punct\\\\s](\\\\*+)(?!\\\\*)(?=[punct\\\\s]|$)' // (2) a***#, a*** can only be a Right Delimiter\n+ '|(?!\\\\*)[punct\\\\s](\\\\*+)(?=[^punct\\\\s])' // (3) #***a, ***a can only be Left Delimiter\n+ '|[\\\\s](\\\\*+)(?!\\\\*)(?=[punct])' // (4) ***# can only be Left Delimiter\n+ '|(?!\\\\*)[punct](\\\\*+)(?!\\\\*)(?=[punct])' // (5) #***# can be either Left or Right Delimiter\n+ '|[^punct\\\\s](\\\\*+)(?=[^punct\\\\s])', 'gu') // (6) a***a can be either Left or Right Delimiter\n.replace(/punct/g, _punctuation).getRegex();\n// (6) Not allowed for _\nconst emStrongRDelimUnd = edit('^[^_*]*?\\\\*\\\\*[^_*]*?_[^_*]*?(?=\\\\*\\\\*)' // Skip orphan inside strong\n+ '|[^_]+(?=[^_])' // Consume to delim\n+ '|(?!_)[punct](_+)(?=[\\\\s]|$)' // (1) #___ can only be a Right Delimiter\n+ '|[^punct\\\\s](_+)(?!_)(?=[punct\\\\s]|$)' // (2) a___#, a___ can only be a Right Delimiter\n+ '|(?!_)[punct\\\\s](_+)(?=[^punct\\\\s])' // (3) #___a, ___a can only be Left Delimiter\n+ '|[\\\\s](_+)(?!_)(?=[punct])' // (4) ___# can only be Left Delimiter\n+ '|(?!_)[punct](_+)(?!_)(?=[punct])', 'gu') // (5) #___# can be either Left or Right Delimiter\n.replace(/punct/g, _punctuation).getRegex();\nconst anyPunctuation = edit(/\\\\([punct])/, 'gu').replace(/punct/g, _punctuation).getRegex();\nconst autolink = edit(/^<(scheme:[^\\s\\x00-\\x1f<>]*|email)>/).replace('scheme', /[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace('email', /[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex();\nconst _inlineComment = edit(_comment).replace('(?:-->|$)', '-->').getRegex();\nconst tag = edit('^comment' + '|^' // self-closing tag\n+ '|^<[a-zA-Z][\\\\w-]*(?:attribute)*?\\\\s*/?>' // open tag\n+ '|^<\\\\?[\\\\s\\\\S]*?\\\\?>' // processing instruction, e.g. \n+ '|^' // declaration, e.g. \n+ '|^') // CDATA section\n.replace('comment', _inlineComment).replace('attribute', /\\s+[a-zA-Z:_][\\w.:-]*(?:\\s*=\\s*\"[^\"]*\"|\\s*=\\s*'[^']*'|\\s*=\\s*[^\\s\"'=<>`]+)?/).getRegex();\nconst _inlineLabel = /(?:\\[(?:\\\\.|[^\\[\\]\\\\])*\\]|\\\\.|`[^`]*`|[^\\[\\]\\\\`])*?/;\nconst link = edit(/^!?\\[(label)\\]\\(\\s*(href)(?:\\s+(title))?\\s*\\)/).replace('label', _inlineLabel).replace('href', /<(?:\\\\.|[^\\n<>\\\\])+>|[^\\s\\x00-\\x1f]*/).replace('title', /\"(?:\\\\\"?|[^\"\\\\])*\"|'(?:\\\\'?|[^'\\\\])*'|\\((?:\\\\\\)?|[^)\\\\])*\\)/).getRegex();\nconst reflink = edit(/^!?\\[(label)\\]\\[(ref)\\]/).replace('label', _inlineLabel).replace('ref', _blockLabel).getRegex();\nconst nolink = edit(/^!?\\[(ref)\\](?:\\[\\])?/).replace('ref', _blockLabel).getRegex();\nconst reflinkSearch = edit('reflink|nolink(?!\\\\()', 'g').replace('reflink', reflink).replace('nolink', nolink).getRegex();\n/**\n * Normal Inline Grammar\n */\nconst inlineNormal = {\n _backpedal: noopTest,\n // only used for GFM url\n anyPunctuation,\n autolink,\n blockSkip,\n br,\n code: inlineCode,\n del: noopTest,\n emStrongLDelim,\n emStrongRDelimAst,\n emStrongRDelimUnd,\n escape,\n link,\n nolink,\n punctuation,\n reflink,\n reflinkSearch,\n tag,\n text: inlineText,\n url: noopTest\n};\n/**\n * Pedantic Inline Grammar\n */\nconst inlinePedantic = {\n ...inlineNormal,\n link: edit(/^!?\\[(label)\\]\\((.*?)\\)/).replace('label', _inlineLabel).getRegex(),\n reflink: edit(/^!?\\[(label)\\]\\s*\\[([^\\]]*)\\]/).replace('label', _inlineLabel).getRegex()\n};\n/**\n * GFM Inline Grammar\n */\nconst inlineGfm = {\n ...inlineNormal,\n escape: edit(escape).replace('])', '~|])').getRegex(),\n url: edit(/^((?:ftp|https?):\\/\\/|www\\.)(?:[a-zA-Z0-9\\-]+\\.?)+[^\\s<]*|^email/, 'i').replace('email', /[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),\n _backpedal: /(?:[^?!.,:;*_'\"~()&]+|\\([^)]*\\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'\"~)]+(?!$))+/,\n del: /^(~~?)(?=[^\\s~])([\\s\\S]*?[^\\s~])\\1(?=[^~]|$)/,\n text: /^([`~]+|[^`~])(?:(?= {2,}\\n)|(?=[a-zA-Z0-9.!#$%&'*+\\/=?_`{\\|}~-]+@)|[\\s\\S]*?(?:(?=[\\\\ {\n return leading + ' '.repeat(tabs.length);\n });\n }\n let token;\n let lastToken;\n let cutSrc;\n let lastParagraphClipped;\n while (src) {\n if (this.options.extensions && this.options.extensions.block && this.options.extensions.block.some(extTokenizer => {\n if (token = extTokenizer.call({\n lexer: this\n }, src, tokens)) {\n src = src.substring(token.raw.length);\n tokens.push(token);\n return true;\n }\n return false;\n })) {\n continue;\n }\n // newline\n if (token = this.tokenizer.space(src)) {\n src = src.substring(token.raw.length);\n if (token.raw.length === 1 && tokens.length > 0) {\n // if there's a single \\n as a spacer, it's terminating the last line,\n // so move it there so that we don't get unnecessary paragraph tags\n tokens[tokens.length - 1].raw += '\\n';\n } else {\n tokens.push(token);\n }\n continue;\n }\n // code\n if (token = this.tokenizer.code(src)) {\n src = src.substring(token.raw.length);\n lastToken = tokens[tokens.length - 1];\n // An indented code block cannot interrupt a paragraph.\n if (lastToken && (lastToken.type === 'paragraph' || lastToken.type === 'text')) {\n lastToken.raw += '\\n' + token.raw;\n lastToken.text += '\\n' + token.text;\n this.inlineQueue[this.inlineQueue.length - 1].src = lastToken.text;\n } else {\n tokens.push(token);\n }\n continue;\n }\n // fences\n if (token = this.tokenizer.fences(src)) {\n src = src.substring(token.raw.length);\n tokens.push(token);\n continue;\n }\n // heading\n if (token = this.tokenizer.heading(src)) {\n src = src.substring(token.raw.length);\n tokens.push(token);\n continue;\n }\n // hr\n if (token = this.tokenizer.hr(src)) {\n src = src.substring(token.raw.length);\n tokens.push(token);\n continue;\n }\n // blockquote\n if (token = this.tokenizer.blockquote(src)) {\n src = src.substring(token.raw.length);\n tokens.push(token);\n continue;\n }\n // list\n if (token = this.tokenizer.list(src)) {\n src = src.substring(token.raw.length);\n tokens.push(token);\n continue;\n }\n // html\n if (token = this.tokenizer.html(src)) {\n src = src.substring(token.raw.length);\n tokens.push(token);\n continue;\n }\n // def\n if (token = this.tokenizer.def(src)) {\n src = src.substring(token.raw.length);\n lastToken = tokens[tokens.length - 1];\n if (lastToken && (lastToken.type === 'paragraph' || lastToken.type === 'text')) {\n lastToken.raw += '\\n' + token.raw;\n lastToken.text += '\\n' + token.raw;\n this.inlineQueue[this.inlineQueue.length - 1].src = lastToken.text;\n } else if (!this.tokens.links[token.tag]) {\n this.tokens.links[token.tag] = {\n href: token.href,\n title: token.title\n };\n }\n continue;\n }\n // table (gfm)\n if (token = this.tokenizer.table(src)) {\n src = src.substring(token.raw.length);\n tokens.push(token);\n continue;\n }\n // lheading\n if (token = this.tokenizer.lheading(src)) {\n src = src.substring(token.raw.length);\n tokens.push(token);\n continue;\n }\n // top-level paragraph\n // prevent paragraph consuming extensions by clipping 'src' to extension start\n cutSrc = src;\n if (this.options.extensions && this.options.extensions.startBlock) {\n let startIndex = Infinity;\n const tempSrc = src.slice(1);\n let tempStart;\n this.options.extensions.startBlock.forEach(getStartIndex => {\n tempStart = getStartIndex.call({\n lexer: this\n }, tempSrc);\n if (typeof tempStart === 'number' && tempStart >= 0) {\n startIndex = Math.min(startIndex, tempStart);\n }\n });\n if (startIndex < Infinity && startIndex >= 0) {\n cutSrc = src.substring(0, startIndex + 1);\n }\n }\n if (this.state.top && (token = this.tokenizer.paragraph(cutSrc))) {\n lastToken = tokens[tokens.length - 1];\n if (lastParagraphClipped && lastToken.type === 'paragraph') {\n lastToken.raw += '\\n' + token.raw;\n lastToken.text += '\\n' + token.text;\n this.inlineQueue.pop();\n this.inlineQueue[this.inlineQueue.length - 1].src = lastToken.text;\n } else {\n tokens.push(token);\n }\n lastParagraphClipped = cutSrc.length !== src.length;\n src = src.substring(token.raw.length);\n continue;\n }\n // text\n if (token = this.tokenizer.text(src)) {\n src = src.substring(token.raw.length);\n lastToken = tokens[tokens.length - 1];\n if (lastToken && lastToken.type === 'text') {\n lastToken.raw += '\\n' + token.raw;\n lastToken.text += '\\n' + token.text;\n this.inlineQueue.pop();\n this.inlineQueue[this.inlineQueue.length - 1].src = lastToken.text;\n } else {\n tokens.push(token);\n }\n continue;\n }\n if (src) {\n const errMsg = 'Infinite loop on byte: ' + src.charCodeAt(0);\n if (this.options.silent) {\n console.error(errMsg);\n break;\n } else {\n throw new Error(errMsg);\n }\n }\n }\n this.state.top = true;\n return tokens;\n }\n inline(src, tokens = []) {\n this.inlineQueue.push({\n src,\n tokens\n });\n return tokens;\n }\n /**\n * Lexing/Compiling\n */\n inlineTokens(src, tokens = []) {\n let token, lastToken, cutSrc;\n // String with links masked to avoid interference with em and strong\n let maskedSrc = src;\n let match;\n let keepPrevChar, prevChar;\n // Mask out reflinks\n if (this.tokens.links) {\n const links = Object.keys(this.tokens.links);\n if (links.length > 0) {\n while ((match = this.tokenizer.rules.inline.reflinkSearch.exec(maskedSrc)) != null) {\n if (links.includes(match[0].slice(match[0].lastIndexOf('[') + 1, -1))) {\n maskedSrc = maskedSrc.slice(0, match.index) + '[' + 'a'.repeat(match[0].length - 2) + ']' + maskedSrc.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex);\n }\n }\n }\n }\n // Mask out other blocks\n while ((match = this.tokenizer.rules.inline.blockSkip.exec(maskedSrc)) != null) {\n maskedSrc = maskedSrc.slice(0, match.index) + '[' + 'a'.repeat(match[0].length - 2) + ']' + maskedSrc.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);\n }\n // Mask out escaped characters\n while ((match = this.tokenizer.rules.inline.anyPunctuation.exec(maskedSrc)) != null) {\n maskedSrc = maskedSrc.slice(0, match.index) + '++' + maskedSrc.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);\n }\n while (src) {\n if (!keepPrevChar) {\n prevChar = '';\n }\n keepPrevChar = false;\n // extensions\n if (this.options.extensions && this.options.extensions.inline && this.options.extensions.inline.some(extTokenizer => {\n if (token = extTokenizer.call({\n lexer: this\n }, src, tokens)) {\n src = src.substring(token.raw.length);\n tokens.push(token);\n return true;\n }\n return false;\n })) {\n continue;\n }\n // escape\n if (token = this.tokenizer.escape(src)) {\n src = src.substring(token.raw.length);\n tokens.push(token);\n continue;\n }\n // tag\n if (token = this.tokenizer.tag(src)) {\n src = src.substring(token.raw.length);\n lastToken = tokens[tokens.length - 1];\n if (lastToken && token.type === 'text' && lastToken.type === 'text') {\n lastToken.raw += token.raw;\n lastToken.text += token.text;\n } else {\n tokens.push(token);\n }\n continue;\n }\n // link\n if (token = this.tokenizer.link(src)) {\n src = src.substring(token.raw.length);\n tokens.push(token);\n continue;\n }\n // reflink, nolink\n if (token = this.tokenizer.reflink(src, this.tokens.links)) {\n src = src.substring(token.raw.length);\n lastToken = tokens[tokens.length - 1];\n if (lastToken && token.type === 'text' && lastToken.type === 'text') {\n lastToken.raw += token.raw;\n lastToken.text += token.text;\n } else {\n tokens.push(token);\n }\n continue;\n }\n // em & strong\n if (token = this.tokenizer.emStrong(src, maskedSrc, prevChar)) {\n src = src.substring(token.raw.length);\n tokens.push(token);\n continue;\n }\n // code\n if (token = this.tokenizer.codespan(src)) {\n src = src.substring(token.raw.length);\n tokens.push(token);\n continue;\n }\n // br\n if (token = this.tokenizer.br(src)) {\n src = src.substring(token.raw.length);\n tokens.push(token);\n continue;\n }\n // del (gfm)\n if (token = this.tokenizer.del(src)) {\n src = src.substring(token.raw.length);\n tokens.push(token);\n continue;\n }\n // autolink\n if (token = this.tokenizer.autolink(src)) {\n src = src.substring(token.raw.length);\n tokens.push(token);\n continue;\n }\n // url (gfm)\n if (!this.state.inLink && (token = this.tokenizer.url(src))) {\n src = src.substring(token.raw.length);\n tokens.push(token);\n continue;\n }\n // text\n // prevent inlineText consuming extensions by clipping 'src' to extension start\n cutSrc = src;\n if (this.options.extensions && this.options.extensions.startInline) {\n let startIndex = Infinity;\n const tempSrc = src.slice(1);\n let tempStart;\n this.options.extensions.startInline.forEach(getStartIndex => {\n tempStart = getStartIndex.call({\n lexer: this\n }, tempSrc);\n if (typeof tempStart === 'number' && tempStart >= 0) {\n startIndex = Math.min(startIndex, tempStart);\n }\n });\n if (startIndex < Infinity && startIndex >= 0) {\n cutSrc = src.substring(0, startIndex + 1);\n }\n }\n if (token = this.tokenizer.inlineText(cutSrc)) {\n src = src.substring(token.raw.length);\n if (token.raw.slice(-1) !== '_') {\n // Track prevChar before string of ____ started\n prevChar = token.raw.slice(-1);\n }\n keepPrevChar = true;\n lastToken = tokens[tokens.length - 1];\n if (lastToken && lastToken.type === 'text') {\n lastToken.raw += token.raw;\n lastToken.text += token.text;\n } else {\n tokens.push(token);\n }\n continue;\n }\n if (src) {\n const errMsg = 'Infinite loop on byte: ' + src.charCodeAt(0);\n if (this.options.silent) {\n console.error(errMsg);\n break;\n } else {\n throw new Error(errMsg);\n }\n }\n }\n return tokens;\n }\n}\n\n/**\n * Renderer\n */\nclass _Renderer {\n options;\n constructor(options) {\n this.options = options || _defaults;\n }\n code(code, infostring, escaped) {\n const lang = (infostring || '').match(/^\\S*/)?.[0];\n code = code.replace(/\\n$/, '') + '\\n';\n if (!lang) {\n return '
' + (escaped ? code : escape$1(code, true)) + '
\\n';\n }\n return '
' + (escaped ? code : escape$1(code, true)) + '
\\n';\n }\n blockquote(quote) {\n return `
\\n${quote}
\\n`;\n }\n html(html, block) {\n return html;\n }\n heading(text, level, raw) {\n // ignore IDs\n return `${text}\\n`;\n }\n hr() {\n return '
\\n';\n }\n list(body, ordered, start) {\n const type = ordered ? 'ol' : 'ul';\n const startatt = ordered && start !== 1 ? ' start=\"' + start + '\"' : '';\n return '<' + type + startatt + '>\\n' + body + '\\n';\n }\n listitem(text, task, checked) {\n return `
  • ${text}
  • \\n`;\n }\n checkbox(checked) {\n return '';\n }\n paragraph(text) {\n return `

    ${text}

    \\n`;\n }\n table(header, body) {\n if (body) body = `${body}`;\n return '\\n' + '\\n' + header + '\\n' + body + '
    \\n';\n }\n tablerow(content) {\n return `\\n${content}\\n`;\n }\n tablecell(content, flags) {\n const type = flags.header ? 'th' : 'td';\n const tag = flags.align ? `<${type} align=\"${flags.align}\">` : `<${type}>`;\n return tag + content + `\\n`;\n }\n /**\n * span level renderer\n */\n strong(text) {\n return `${text}`;\n }\n em(text) {\n return `${text}`;\n }\n codespan(text) {\n return `${text}`;\n }\n br() {\n return '
    ';\n }\n del(text) {\n return `${text}`;\n }\n link(href, title, text) {\n const cleanHref = cleanUrl(href);\n if (cleanHref === null) {\n return text;\n }\n href = cleanHref;\n let out = '
    ';\n return out;\n }\n image(href, title, text) {\n const cleanHref = cleanUrl(href);\n if (cleanHref === null) {\n return text;\n }\n href = cleanHref;\n let out = `\"${text}\"`;\n 0 && item.tokens[0].type === 'paragraph') {\n item.tokens[0].text = checkbox + ' ' + item.tokens[0].text;\n if (item.tokens[0].tokens && item.tokens[0].tokens.length > 0 && item.tokens[0].tokens[0].type === 'text') {\n item.tokens[0].tokens[0].text = checkbox + ' ' + item.tokens[0].tokens[0].text;\n }\n } else {\n item.tokens.unshift({\n type: 'text',\n text: checkbox + ' '\n });\n }\n } else {\n itemBody += checkbox + ' ';\n }\n }\n itemBody += this.parse(item.tokens, loose);\n body += this.renderer.listitem(itemBody, task, !!checked);\n }\n out += this.renderer.list(body, ordered, start);\n continue;\n }\n case 'html':\n {\n const htmlToken = token;\n out += this.renderer.html(htmlToken.text, htmlToken.block);\n continue;\n }\n case 'paragraph':\n {\n const paragraphToken = token;\n out += this.renderer.paragraph(this.parseInline(paragraphToken.tokens));\n continue;\n }\n case 'text':\n {\n let textToken = token;\n let body = textToken.tokens ? this.parseInline(textToken.tokens) : textToken.text;\n while (i + 1 < tokens.length && tokens[i + 1].type === 'text') {\n textToken = tokens[++i];\n body += '\\n' + (textToken.tokens ? this.parseInline(textToken.tokens) : textToken.text);\n }\n out += top ? this.renderer.paragraph(body) : body;\n continue;\n }\n default:\n {\n const errMsg = 'Token with \"' + token.type + '\" type was not found.';\n if (this.options.silent) {\n console.error(errMsg);\n return '';\n } else {\n throw new Error(errMsg);\n }\n }\n }\n }\n return out;\n }\n /**\n * Parse Inline Tokens\n */\n parseInline(tokens, renderer) {\n renderer = renderer || this.renderer;\n let out = '';\n for (let i = 0; i < tokens.length; i++) {\n const token = tokens[i];\n // Run any renderer extensions\n if (this.options.extensions && this.options.extensions.renderers && this.options.extensions.renderers[token.type]) {\n const ret = this.options.extensions.renderers[token.type].call({\n parser: this\n }, token);\n if (ret !== false || !['escape', 'html', 'link', 'image', 'strong', 'em', 'codespan', 'br', 'del', 'text'].includes(token.type)) {\n out += ret || '';\n continue;\n }\n }\n switch (token.type) {\n case 'escape':\n {\n const escapeToken = token;\n out += renderer.text(escapeToken.text);\n break;\n }\n case 'html':\n {\n const tagToken = token;\n out += renderer.html(tagToken.text);\n break;\n }\n case 'link':\n {\n const linkToken = token;\n out += renderer.link(linkToken.href, linkToken.title, this.parseInline(linkToken.tokens, renderer));\n break;\n }\n case 'image':\n {\n const imageToken = token;\n out += renderer.image(imageToken.href, imageToken.title, imageToken.text);\n break;\n }\n case 'strong':\n {\n const strongToken = token;\n out += renderer.strong(this.parseInline(strongToken.tokens, renderer));\n break;\n }\n case 'em':\n {\n const emToken = token;\n out += renderer.em(this.parseInline(emToken.tokens, renderer));\n break;\n }\n case 'codespan':\n {\n const codespanToken = token;\n out += renderer.codespan(codespanToken.text);\n break;\n }\n case 'br':\n {\n out += renderer.br();\n break;\n }\n case 'del':\n {\n const delToken = token;\n out += renderer.del(this.parseInline(delToken.tokens, renderer));\n break;\n }\n case 'text':\n {\n const textToken = token;\n out += renderer.text(textToken.text);\n break;\n }\n default:\n {\n const errMsg = 'Token with \"' + token.type + '\" type was not found.';\n if (this.options.silent) {\n console.error(errMsg);\n return '';\n } else {\n throw new Error(errMsg);\n }\n }\n }\n }\n return out;\n }\n}\nclass _Hooks {\n options;\n constructor(options) {\n this.options = options || _defaults;\n }\n static passThroughHooks = new Set(['preprocess', 'postprocess', 'processAllTokens']);\n /**\n * Process markdown before marked\n */\n preprocess(markdown) {\n return markdown;\n }\n /**\n * Process HTML after marked is finished\n */\n postprocess(html) {\n return html;\n }\n /**\n * Process all tokens before walk tokens\n */\n processAllTokens(tokens) {\n return tokens;\n }\n}\nclass Marked {\n defaults = _getDefaults();\n options = this.setOptions;\n parse = this.#parseMarkdown(_Lexer.lex, _Parser.parse);\n parseInline = this.#parseMarkdown(_Lexer.lexInline, _Parser.parseInline);\n Parser = _Parser;\n Renderer = _Renderer;\n TextRenderer = _TextRenderer;\n Lexer = _Lexer;\n Tokenizer = _Tokenizer;\n Hooks = _Hooks;\n constructor(...args) {\n this.use(...args);\n }\n /**\n * Run callback for every token\n */\n walkTokens(tokens, callback) {\n let values = [];\n for (const token of tokens) {\n values = values.concat(callback.call(this, token));\n switch (token.type) {\n case 'table':\n {\n const tableToken = token;\n for (const cell of tableToken.header) {\n values = values.concat(this.walkTokens(cell.tokens, callback));\n }\n for (const row of tableToken.rows) {\n for (const cell of row) {\n values = values.concat(this.walkTokens(cell.tokens, callback));\n }\n }\n break;\n }\n case 'list':\n {\n const listToken = token;\n values = values.concat(this.walkTokens(listToken.items, callback));\n break;\n }\n default:\n {\n const genericToken = token;\n if (this.defaults.extensions?.childTokens?.[genericToken.type]) {\n this.defaults.extensions.childTokens[genericToken.type].forEach(childTokens => {\n const tokens = genericToken[childTokens].flat(Infinity);\n values = values.concat(this.walkTokens(tokens, callback));\n });\n } else if (genericToken.tokens) {\n values = values.concat(this.walkTokens(genericToken.tokens, callback));\n }\n }\n }\n }\n return values;\n }\n use(...args) {\n const extensions = this.defaults.extensions || {\n renderers: {},\n childTokens: {}\n };\n args.forEach(pack => {\n // copy options to new object\n const opts = {\n ...pack\n };\n // set async to true if it was set to true before\n opts.async = this.defaults.async || opts.async || false;\n // ==-- Parse \"addon\" extensions --== //\n if (pack.extensions) {\n pack.extensions.forEach(ext => {\n if (!ext.name) {\n throw new Error('extension name required');\n }\n if ('renderer' in ext) {\n // Renderer extensions\n const prevRenderer = extensions.renderers[ext.name];\n if (prevRenderer) {\n // Replace extension with func to run new extension but fall back if false\n extensions.renderers[ext.name] = function (...args) {\n let ret = ext.renderer.apply(this, args);\n if (ret === false) {\n ret = prevRenderer.apply(this, args);\n }\n return ret;\n };\n } else {\n extensions.renderers[ext.name] = ext.renderer;\n }\n }\n if ('tokenizer' in ext) {\n // Tokenizer Extensions\n if (!ext.level || ext.level !== 'block' && ext.level !== 'inline') {\n throw new Error(\"extension level must be 'block' or 'inline'\");\n }\n const extLevel = extensions[ext.level];\n if (extLevel) {\n extLevel.unshift(ext.tokenizer);\n } else {\n extensions[ext.level] = [ext.tokenizer];\n }\n if (ext.start) {\n // Function to check for start of token\n if (ext.level === 'block') {\n if (extensions.startBlock) {\n extensions.startBlock.push(ext.start);\n } else {\n extensions.startBlock = [ext.start];\n }\n } else if (ext.level === 'inline') {\n if (extensions.startInline) {\n extensions.startInline.push(ext.start);\n } else {\n extensions.startInline = [ext.start];\n }\n }\n }\n }\n if ('childTokens' in ext && ext.childTokens) {\n // Child tokens to be visited by walkTokens\n extensions.childTokens[ext.name] = ext.childTokens;\n }\n });\n opts.extensions = extensions;\n }\n // ==-- Parse \"overwrite\" extensions --== //\n if (pack.renderer) {\n const renderer = this.defaults.renderer || new _Renderer(this.defaults);\n for (const prop in pack.renderer) {\n if (!(prop in renderer)) {\n throw new Error(`renderer '${prop}' does not exist`);\n }\n if (prop === 'options') {\n // ignore options property\n continue;\n }\n const rendererProp = prop;\n const rendererFunc = pack.renderer[rendererProp];\n const prevRenderer = renderer[rendererProp];\n // Replace renderer with func to run extension, but fall back if false\n renderer[rendererProp] = (...args) => {\n let ret = rendererFunc.apply(renderer, args);\n if (ret === false) {\n ret = prevRenderer.apply(renderer, args);\n }\n return ret || '';\n };\n }\n opts.renderer = renderer;\n }\n if (pack.tokenizer) {\n const tokenizer = this.defaults.tokenizer || new _Tokenizer(this.defaults);\n for (const prop in pack.tokenizer) {\n if (!(prop in tokenizer)) {\n throw new Error(`tokenizer '${prop}' does not exist`);\n }\n if (['options', 'rules', 'lexer'].includes(prop)) {\n // ignore options, rules, and lexer properties\n continue;\n }\n const tokenizerProp = prop;\n const tokenizerFunc = pack.tokenizer[tokenizerProp];\n const prevTokenizer = tokenizer[tokenizerProp];\n // Replace tokenizer with func to run extension, but fall back if false\n // @ts-expect-error cannot type tokenizer function dynamically\n tokenizer[tokenizerProp] = (...args) => {\n let ret = tokenizerFunc.apply(tokenizer, args);\n if (ret === false) {\n ret = prevTokenizer.apply(tokenizer, args);\n }\n return ret;\n };\n }\n opts.tokenizer = tokenizer;\n }\n // ==-- Parse Hooks extensions --== //\n if (pack.hooks) {\n const hooks = this.defaults.hooks || new _Hooks();\n for (const prop in pack.hooks) {\n if (!(prop in hooks)) {\n throw new Error(`hook '${prop}' does not exist`);\n }\n if (prop === 'options') {\n // ignore options property\n continue;\n }\n const hooksProp = prop;\n const hooksFunc = pack.hooks[hooksProp];\n const prevHook = hooks[hooksProp];\n if (_Hooks.passThroughHooks.has(prop)) {\n // @ts-expect-error cannot type hook function dynamically\n hooks[hooksProp] = arg => {\n if (this.defaults.async) {\n return Promise.resolve(hooksFunc.call(hooks, arg)).then(ret => {\n return prevHook.call(hooks, ret);\n });\n }\n const ret = hooksFunc.call(hooks, arg);\n return prevHook.call(hooks, ret);\n };\n } else {\n // @ts-expect-error cannot type hook function dynamically\n hooks[hooksProp] = (...args) => {\n let ret = hooksFunc.apply(hooks, args);\n if (ret === false) {\n ret = prevHook.apply(hooks, args);\n }\n return ret;\n };\n }\n }\n opts.hooks = hooks;\n }\n // ==-- Parse WalkTokens extensions --== //\n if (pack.walkTokens) {\n const walkTokens = this.defaults.walkTokens;\n const packWalktokens = pack.walkTokens;\n opts.walkTokens = function (token) {\n let values = [];\n values.push(packWalktokens.call(this, token));\n if (walkTokens) {\n values = values.concat(walkTokens.call(this, token));\n }\n return values;\n };\n }\n this.defaults = {\n ...this.defaults,\n ...opts\n };\n });\n return this;\n }\n setOptions(opt) {\n this.defaults = {\n ...this.defaults,\n ...opt\n };\n return this;\n }\n lexer(src, options) {\n return _Lexer.lex(src, options ?? this.defaults);\n }\n parser(tokens, options) {\n return _Parser.parse(tokens, options ?? this.defaults);\n }\n #parseMarkdown(lexer, parser) {\n return (src, options) => {\n const origOpt = {\n ...options\n };\n const opt = {\n ...this.defaults,\n ...origOpt\n };\n // Show warning if an extension set async to true but the parse was called with async: false\n if (this.defaults.async === true && origOpt.async === false) {\n if (!opt.silent) {\n console.warn('marked(): The async option was set to true by an extension. The async: false option sent to parse will be ignored.');\n }\n opt.async = true;\n }\n const throwError = this.#onError(!!opt.silent, !!opt.async);\n // throw error in case of non string input\n if (typeof src === 'undefined' || src === null) {\n return throwError(new Error('marked(): input parameter is undefined or null'));\n }\n if (typeof src !== 'string') {\n return throwError(new Error('marked(): input parameter is of type ' + Object.prototype.toString.call(src) + ', string expected'));\n }\n if (opt.hooks) {\n opt.hooks.options = opt;\n }\n if (opt.async) {\n return Promise.resolve(opt.hooks ? opt.hooks.preprocess(src) : src).then(src => lexer(src, opt)).then(tokens => opt.hooks ? opt.hooks.processAllTokens(tokens) : tokens).then(tokens => opt.walkTokens ? Promise.all(this.walkTokens(tokens, opt.walkTokens)).then(() => tokens) : tokens).then(tokens => parser(tokens, opt)).then(html => opt.hooks ? opt.hooks.postprocess(html) : html).catch(throwError);\n }\n try {\n if (opt.hooks) {\n src = opt.hooks.preprocess(src);\n }\n let tokens = lexer(src, opt);\n if (opt.hooks) {\n tokens = opt.hooks.processAllTokens(tokens);\n }\n if (opt.walkTokens) {\n this.walkTokens(tokens, opt.walkTokens);\n }\n let html = parser(tokens, opt);\n if (opt.hooks) {\n html = opt.hooks.postprocess(html);\n }\n return html;\n } catch (e) {\n return throwError(e);\n }\n };\n }\n #onError(silent, async) {\n return e => {\n e.message += '\\nPlease report this to https://github.com/markedjs/marked.';\n if (silent) {\n const msg = '

    An error occurred:

    ' + escape$1(e.message + '', true) + '
    ';\n if (async) {\n return Promise.resolve(msg);\n }\n return msg;\n }\n if (async) {\n return Promise.reject(e);\n }\n throw e;\n };\n }\n}\nconst markedInstance = new Marked();\nfunction marked(src, opt) {\n return markedInstance.parse(src, opt);\n}\n/**\n * Sets the default options.\n *\n * @param options Hash of options\n */\nmarked.options = marked.setOptions = function (options) {\n markedInstance.setOptions(options);\n marked.defaults = markedInstance.defaults;\n changeDefaults(marked.defaults);\n return marked;\n};\n/**\n * Gets the original marked default options.\n */\nmarked.getDefaults = _getDefaults;\nmarked.defaults = _defaults;\n/**\n * Use Extension\n */\nmarked.use = function (...args) {\n markedInstance.use(...args);\n marked.defaults = markedInstance.defaults;\n changeDefaults(marked.defaults);\n return marked;\n};\n/**\n * Run callback for every token\n */\nmarked.walkTokens = function (tokens, callback) {\n return markedInstance.walkTokens(tokens, callback);\n};\n/**\n * Compiles markdown to HTML without enclosing `p` tag.\n *\n * @param src String of markdown source to be compiled\n * @param options Hash of options\n * @return String of compiled HTML\n */\nmarked.parseInline = markedInstance.parseInline;\n/**\n * Expose\n */\nmarked.Parser = _Parser;\nmarked.parser = _Parser.parse;\nmarked.Renderer = _Renderer;\nmarked.TextRenderer = _TextRenderer;\nmarked.Lexer = _Lexer;\nmarked.lexer = _Lexer.lex;\nmarked.Tokenizer = _Tokenizer;\nmarked.Hooks = _Hooks;\nmarked.parse = marked;\nconst options = marked.options;\nconst setOptions = marked.setOptions;\nconst use = marked.use;\nconst walkTokens = marked.walkTokens;\nconst parseInline = marked.parseInline;\nconst parse = marked;\nconst parser = _Parser.parse;\nconst lexer = _Lexer.lex;\nexport { _Hooks as Hooks, _Lexer as Lexer, Marked, _Parser as Parser, _Renderer as Renderer, _TextRenderer as TextRenderer, _Tokenizer as Tokenizer, _defaults as defaults, _getDefaults as getDefaults, lexer, marked, options, parse, parseInline, parser, setOptions, use, walkTokens };\n","import { AsyncPipe, isPlatformBrowser, CommonModule } from '@angular/common';\nimport * as i0 from '@angular/core';\nimport { Component, ChangeDetectionStrategy, InjectionToken, Pipe, PLATFORM_ID, Injectable, Inject, Optional, EventEmitter, Input, Output, SecurityContext, NgModule } from '@angular/core';\nimport { Subject, of, timer, merge } from 'rxjs';\nimport { mapTo, switchMap, distinctUntilChanged, shareReplay, startWith, map, takeUntil, first } from 'rxjs/operators';\nimport { Renderer, marked } from 'marked';\nconst _c0 = [\"*\"];\nexport { Renderer as MarkedRenderer } from 'marked';\nimport * as i1 from '@angular/common/http';\nimport * as i2 from '@angular/platform-browser';\nconst BUTTON_TEXT_COPY = 'Copy';\nconst BUTTON_TEXT_COPIED = 'Copied';\nlet ClipboardButtonComponent = /*#__PURE__*/(() => {\n class ClipboardButtonComponent {\n constructor() {\n this._buttonClick$ = new Subject();\n this.copied$ = this._buttonClick$.pipe(switchMap(() => merge(of(true), timer(3000).pipe(mapTo(false)))), distinctUntilChanged(), shareReplay(1));\n this.copiedText$ = this.copied$.pipe(startWith(false), map(copied => copied ? BUTTON_TEXT_COPIED : BUTTON_TEXT_COPY));\n }\n onCopyToClipboardClick() {\n this._buttonClick$.next();\n }\n static {\n this.ɵfac = function ClipboardButtonComponent_Factory(__ngFactoryType__) {\n return new (__ngFactoryType__ || ClipboardButtonComponent)();\n };\n }\n static {\n this.ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: ClipboardButtonComponent,\n selectors: [[\"markdown-clipboard\"]],\n decls: 4,\n vars: 7,\n consts: [[1, \"markdown-clipboard-button\", 3, \"click\"]],\n template: function ClipboardButtonComponent_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"button\", 0);\n i0.ɵɵpipe(1, \"async\");\n i0.ɵɵlistener(\"click\", function ClipboardButtonComponent_Template_button_click_0_listener() {\n return ctx.onCopyToClipboardClick();\n });\n i0.ɵɵtext(2);\n i0.ɵɵpipe(3, \"async\");\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n i0.ɵɵclassProp(\"copied\", i0.ɵɵpipeBind1(1, 3, ctx.copied$));\n i0.ɵɵadvance(2);\n i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(3, 5, ctx.copiedText$));\n }\n },\n dependencies: [AsyncPipe],\n encapsulation: 2,\n changeDetection: 0\n });\n }\n }\n return ClipboardButtonComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nconst CLIPBOARD_OPTIONS = new InjectionToken('CLIPBOARD_OPTIONS');\n\n/* eslint-disable */\nclass KatexSpecificOptions {}\nlet LanguagePipe = /*#__PURE__*/(() => {\n class LanguagePipe {\n transform(value, language) {\n if (value == null) {\n value = '';\n }\n if (language == null) {\n language = '';\n }\n if (typeof value !== 'string') {\n console.error(`LanguagePipe has been invoked with an invalid value type [${typeof value}]`);\n return value;\n }\n if (typeof language !== 'string') {\n console.error(`LanguagePipe has been invoked with an invalid parameter [${typeof language}]`);\n return value;\n }\n return '```' + language + '\\n' + value + '\\n```';\n }\n static {\n this.ɵfac = function LanguagePipe_Factory(__ngFactoryType__) {\n return new (__ngFactoryType__ || LanguagePipe)();\n };\n }\n static {\n this.ɵpipe = /* @__PURE__ */i0.ɵɵdefinePipe({\n name: \"language\",\n type: LanguagePipe,\n pure: true\n });\n }\n }\n return LanguagePipe;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nvar PrismPlugin = /*#__PURE__*/function (PrismPlugin) {\n PrismPlugin[\"CommandLine\"] = \"command-line\";\n PrismPlugin[\"LineHighlight\"] = \"line-highlight\";\n PrismPlugin[\"LineNumbers\"] = \"line-numbers\";\n return PrismPlugin;\n}(PrismPlugin || {});\nconst MARKED_EXTENSIONS = new InjectionToken('MARKED_EXTENSIONS');\nconst MARKED_OPTIONS = new InjectionToken('MARKED_OPTIONS');\n\n/* eslint-disable max-len */\nconst errorJoyPixelsNotLoaded = '[ngx-markdown] When using the `emoji` attribute you *have to* include Emoji-Toolkit files to `angular.json` or use imports. See README for more information';\nconst errorKatexNotLoaded = '[ngx-markdown] When using the `katex` attribute you *have to* include KaTeX files to `angular.json` or use imports. See README for more information';\nconst errorMermaidNotLoaded = '[ngx-markdown] When using the `mermaid` attribute you *have to* include Mermaid files to `angular.json` or use imports. See README for more information';\nconst errorClipboardNotLoaded = '[ngx-markdown] When using the `clipboard` attribute you *have to* include Clipboard files to `angular.json` or use imports. See README for more information';\nconst errorClipboardViewContainerRequired = '[ngx-markdown] When using the `clipboard` attribute you *have to* provide the `viewContainerRef` parameter to `MarkdownService.render()` function';\nconst errorSrcWithoutHttpClient = '[ngx-markdown] When using the `src` attribute you *have to* pass the `HttpClient` as a parameter of the `forRoot` method. See README for more information';\n/* eslint-enable max-len */\nconst SECURITY_CONTEXT = new InjectionToken('SECURITY_CONTEXT');\nclass ExtendedRenderer extends Renderer {\n constructor() {\n super(...arguments);\n this.ɵNgxMarkdownRendererExtendedForExtensions = false;\n this.ɵNgxMarkdownRendererExtendedForMermaid = false;\n }\n}\nlet MarkdownService = /*#__PURE__*/(() => {\n class MarkdownService {\n get options() {\n return this._options;\n }\n set options(value) {\n this._options = {\n ...this.DEFAULT_MARKED_OPTIONS,\n ...value\n };\n }\n get renderer() {\n return this.options.renderer;\n }\n set renderer(value) {\n this.options.renderer = value;\n }\n constructor(clipboardOptions, extensions, options, platform, securityContext, http, sanitizer) {\n this.clipboardOptions = clipboardOptions;\n this.extensions = extensions;\n this.platform = platform;\n this.securityContext = securityContext;\n this.http = http;\n this.sanitizer = sanitizer;\n this.DEFAULT_MARKED_OPTIONS = {\n renderer: new Renderer()\n };\n this.DEFAULT_KATEX_OPTIONS = {\n delimiters: [{\n left: '$$',\n right: '$$',\n display: true\n }, {\n left: '$',\n right: '$',\n display: false\n }, {\n left: '\\\\(',\n right: '\\\\)',\n display: false\n }, {\n left: '\\\\begin{equation}',\n right: '\\\\end{equation}',\n display: true\n }, {\n left: '\\\\begin{align}',\n right: '\\\\end{align}',\n display: true\n }, {\n left: '\\\\begin{alignat}',\n right: '\\\\end{alignat}',\n display: true\n }, {\n left: '\\\\begin{gather}',\n right: '\\\\end{gather}',\n display: true\n }, {\n left: '\\\\begin{CD}',\n right: '\\\\end{CD}',\n display: true\n }, {\n left: '\\\\[',\n right: '\\\\]',\n display: true\n }]\n };\n this.DEFAULT_MERMAID_OPTIONS = {\n startOnLoad: false\n };\n this.DEFAULT_CLIPBOARD_OPTIONS = {\n buttonComponent: undefined\n };\n this.DEFAULT_PARSE_OPTIONS = {\n decodeHtml: false,\n inline: false,\n emoji: false,\n mermaid: false,\n markedOptions: undefined,\n disableSanitizer: false\n };\n this.DEFAULT_RENDER_OPTIONS = {\n clipboard: false,\n clipboardOptions: undefined,\n katex: false,\n katexOptions: undefined,\n mermaid: false,\n mermaidOptions: undefined\n };\n this._reload$ = new Subject();\n this.reload$ = this._reload$.asObservable();\n this.options = options;\n }\n parse(markdown, parseOptions = this.DEFAULT_PARSE_OPTIONS) {\n const {\n decodeHtml,\n inline,\n emoji,\n mermaid,\n disableSanitizer\n } = parseOptions;\n const markedOptions = {\n ...this.options,\n ...parseOptions.markedOptions\n };\n const renderer = markedOptions.renderer || this.renderer || new Renderer();\n if (this.extensions) {\n this.renderer = this.extendsRendererForExtensions(renderer);\n }\n if (mermaid) {\n this.renderer = this.extendsRendererForMermaid(renderer);\n }\n const trimmed = this.trimIndentation(markdown);\n const decoded = decodeHtml ? this.decodeHtml(trimmed) : trimmed;\n const emojified = emoji ? this.parseEmoji(decoded) : decoded;\n const marked = this.parseMarked(emojified, markedOptions, inline);\n const sanitized = disableSanitizer ? marked : this.sanitizer.sanitize(this.securityContext, marked);\n return sanitized || '';\n }\n render(element, options = this.DEFAULT_RENDER_OPTIONS, viewContainerRef) {\n const {\n clipboard,\n clipboardOptions,\n katex,\n katexOptions,\n mermaid,\n mermaidOptions\n } = options;\n if (katex) {\n this.renderKatex(element, {\n ...this.DEFAULT_KATEX_OPTIONS,\n ...katexOptions\n });\n }\n if (mermaid) {\n this.renderMermaid(element, {\n ...this.DEFAULT_MERMAID_OPTIONS,\n ...mermaidOptions\n });\n }\n if (clipboard) {\n this.renderClipboard(element, viewContainerRef, {\n ...this.DEFAULT_CLIPBOARD_OPTIONS,\n ...this.clipboardOptions,\n ...clipboardOptions\n });\n }\n this.highlight(element);\n }\n reload() {\n this._reload$.next();\n }\n getSource(src) {\n if (!this.http) {\n throw new Error(errorSrcWithoutHttpClient);\n }\n return this.http.get(src, {\n responseType: 'text'\n }).pipe(map(markdown => this.handleExtension(src, markdown)));\n }\n highlight(element) {\n if (!isPlatformBrowser(this.platform)) {\n return;\n }\n if (typeof Prism === 'undefined' || typeof Prism.highlightAllUnder === 'undefined') {\n return;\n }\n if (!element) {\n element = document;\n }\n const noLanguageElements = element.querySelectorAll('pre code:not([class*=\"language-\"])');\n Array.prototype.forEach.call(noLanguageElements, x => x.classList.add('language-none'));\n Prism.highlightAllUnder(element);\n }\n decodeHtml(html) {\n if (!isPlatformBrowser(this.platform)) {\n return html;\n }\n const textarea = document.createElement('textarea');\n textarea.innerHTML = html;\n return textarea.value;\n }\n extendsRendererForExtensions(renderer) {\n const extendedRenderer = renderer;\n if (extendedRenderer.ɵNgxMarkdownRendererExtendedForExtensions === true) {\n return renderer;\n }\n if (this.extensions?.length > 0) {\n marked.use(...this.extensions);\n }\n extendedRenderer.ɵNgxMarkdownRendererExtendedForExtensions = true;\n return renderer;\n }\n extendsRendererForMermaid(renderer) {\n const extendedRenderer = renderer;\n if (extendedRenderer.ɵNgxMarkdownRendererExtendedForMermaid === true) {\n return renderer;\n }\n // eslint-disable-next-line @typescript-eslint/unbound-method\n const defaultCode = renderer.code;\n renderer.code = function (code, language, isEscaped) {\n return language === 'mermaid' ? `
    ${code}
    ` : defaultCode.call(this, code, language, isEscaped);\n };\n extendedRenderer.ɵNgxMarkdownRendererExtendedForMermaid = true;\n return renderer;\n }\n handleExtension(src, markdown) {\n const urlProtocolIndex = src.lastIndexOf('://');\n const urlWithoutProtocol = urlProtocolIndex > -1 ? src.substring(urlProtocolIndex + 4) : src;\n const lastSlashIndex = urlWithoutProtocol.lastIndexOf('/');\n const lastUrlSegment = lastSlashIndex > -1 ? urlWithoutProtocol.substring(lastSlashIndex + 1).split('?')[0] : '';\n const lastDotIndex = lastUrlSegment.lastIndexOf('.');\n const extension = lastDotIndex > -1 ? lastUrlSegment.substring(lastDotIndex + 1) : '';\n return !!extension && extension !== 'md' ? '```' + extension + '\\n' + markdown + '\\n```' : markdown;\n }\n parseMarked(html, markedOptions, inline = false) {\n if (markedOptions.renderer) {\n // clone renderer and remove extended flags otherwise\n // marked throws an error thinking it is a renderer prop\n const renderer = {\n ...markedOptions.renderer\n };\n delete renderer.ɵNgxMarkdownRendererExtendedForExtensions;\n delete renderer.ɵNgxMarkdownRendererExtendedForMermaid;\n // remove renderer from markedOptions because if renderer is\n // passed to marked.parse method, it will ignore all extensions\n delete markedOptions.renderer;\n marked.use({\n renderer\n });\n }\n return inline ? marked.parseInline(html, markedOptions) : marked.parse(html, markedOptions);\n }\n parseEmoji(html) {\n if (!isPlatformBrowser(this.platform)) {\n return html;\n }\n if (typeof joypixels === 'undefined' || typeof joypixels.shortnameToUnicode === 'undefined') {\n throw new Error(errorJoyPixelsNotLoaded);\n }\n return joypixels.shortnameToUnicode(html);\n }\n renderKatex(element, options) {\n if (!isPlatformBrowser(this.platform)) {\n return;\n }\n if (typeof katex === 'undefined' || typeof renderMathInElement === 'undefined') {\n throw new Error(errorKatexNotLoaded);\n }\n renderMathInElement(element, options);\n }\n renderClipboard(element, viewContainerRef, options) {\n if (!isPlatformBrowser(this.platform)) {\n return;\n }\n if (typeof ClipboardJS === 'undefined') {\n throw new Error(errorClipboardNotLoaded);\n }\n if (!viewContainerRef) {\n throw new Error(errorClipboardViewContainerRequired);\n }\n const {\n buttonComponent,\n buttonTemplate\n } = options;\n // target every
     elements\n      const preElements = element.querySelectorAll('pre');\n      for (let i = 0; i < preElements.length; i++) {\n        const preElement = preElements.item(i);\n        // create 
     wrapper element\n        const preWrapperElement = document.createElement('div');\n        preWrapperElement.style.position = 'relative';\n        preElement.parentNode.insertBefore(preWrapperElement, preElement);\n        preWrapperElement.appendChild(preElement);\n        // create toolbar element\n        const toolbarWrapperElement = document.createElement('div');\n        toolbarWrapperElement.style.position = 'absolute';\n        toolbarWrapperElement.style.top = '.5em';\n        toolbarWrapperElement.style.right = '.5em';\n        toolbarWrapperElement.style.opacity = '0';\n        toolbarWrapperElement.style.transition = 'opacity 250ms ease-out';\n        toolbarWrapperElement.style.zIndex = '1';\n        preWrapperElement.insertAdjacentElement('beforeend', toolbarWrapperElement);\n        // register listener to show/hide toolbar\n        preElement.onmouseover = () => toolbarWrapperElement.style.opacity = '1';\n        preElement.onmouseout = () => toolbarWrapperElement.style.opacity = '0';\n        // declare embeddedViewRef holding variable\n        let embeddedViewRef;\n        // use provided component via input property\n        // or provided via ClipboardOptions provider\n        if (buttonComponent) {\n          const componentRef = viewContainerRef.createComponent(buttonComponent);\n          embeddedViewRef = componentRef.hostView;\n          componentRef.changeDetectorRef.markForCheck();\n        }\n        // use provided template via input property\n        else if (buttonTemplate) {\n          embeddedViewRef = viewContainerRef.createEmbeddedView(buttonTemplate);\n        }\n        // use default component\n        else {\n          const componentRef = viewContainerRef.createComponent(ClipboardButtonComponent);\n          embeddedViewRef = componentRef.hostView;\n          componentRef.changeDetectorRef.markForCheck();\n        }\n        // declare clipboard instance variable\n        let clipboardInstance;\n        // attach clipboard.js to root node\n        embeddedViewRef.rootNodes.forEach(node => {\n          node.onmouseover = () => toolbarWrapperElement.style.opacity = '1';\n          toolbarWrapperElement.appendChild(node);\n          clipboardInstance = new ClipboardJS(node, {\n            text: () => preElement.innerText\n          });\n        });\n        // destroy clipboard instance when view is destroyed\n        embeddedViewRef.onDestroy(() => clipboardInstance.destroy());\n      }\n    }\n    renderMermaid(element, options = this.DEFAULT_MERMAID_OPTIONS) {\n      if (!isPlatformBrowser(this.platform)) {\n        return;\n      }\n      if (typeof mermaid === 'undefined' || typeof mermaid.initialize === 'undefined') {\n        throw new Error(errorMermaidNotLoaded);\n      }\n      const mermaidElements = element.querySelectorAll('.mermaid');\n      if (mermaidElements.length === 0) {\n        return;\n      }\n      mermaid.initialize(options);\n      mermaid.run({\n        nodes: mermaidElements\n      });\n    }\n    trimIndentation(markdown) {\n      if (!markdown) {\n        return '';\n      }\n      let indentStart;\n      return markdown.split('\\n').map(line => {\n        let lineIdentStart = indentStart;\n        if (line.length > 0) {\n          lineIdentStart = isNaN(lineIdentStart) ? line.search(/\\S|$/) : Math.min(line.search(/\\S|$/), lineIdentStart);\n        }\n        if (isNaN(indentStart)) {\n          indentStart = lineIdentStart;\n        }\n        return lineIdentStart ? line.substring(lineIdentStart) : line;\n      }).join('\\n');\n    }\n    static {\n      this.ɵfac = function MarkdownService_Factory(__ngFactoryType__) {\n        return new (__ngFactoryType__ || MarkdownService)(i0.ɵɵinject(CLIPBOARD_OPTIONS, 8), i0.ɵɵinject(MARKED_EXTENSIONS, 8), i0.ɵɵinject(MARKED_OPTIONS, 8), i0.ɵɵinject(PLATFORM_ID), i0.ɵɵinject(SECURITY_CONTEXT), i0.ɵɵinject(i1.HttpClient, 8), i0.ɵɵinject(i2.DomSanitizer));\n      };\n    }\n    static {\n      this.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n        token: MarkdownService,\n        factory: MarkdownService.ɵfac\n      });\n    }\n  }\n  return MarkdownService;\n})();\n(() => {\n  (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet MarkdownComponent = /*#__PURE__*/(() => {\n  class MarkdownComponent {\n    get disableSanitizer() {\n      return this._disableSanitizer;\n    }\n    set disableSanitizer(value) {\n      this._disableSanitizer = this.coerceBooleanProperty(value);\n    }\n    get inline() {\n      return this._inline;\n    }\n    set inline(value) {\n      this._inline = this.coerceBooleanProperty(value);\n    }\n    // Plugin - clipboard\n    get clipboard() {\n      return this._clipboard;\n    }\n    set clipboard(value) {\n      this._clipboard = this.coerceBooleanProperty(value);\n    }\n    // Plugin - emoji\n    get emoji() {\n      return this._emoji;\n    }\n    set emoji(value) {\n      this._emoji = this.coerceBooleanProperty(value);\n    }\n    // Plugin - katex\n    get katex() {\n      return this._katex;\n    }\n    set katex(value) {\n      this._katex = this.coerceBooleanProperty(value);\n    }\n    // Plugin - mermaid\n    get mermaid() {\n      return this._mermaid;\n    }\n    set mermaid(value) {\n      this._mermaid = this.coerceBooleanProperty(value);\n    }\n    // Plugin - lineHighlight\n    get lineHighlight() {\n      return this._lineHighlight;\n    }\n    set lineHighlight(value) {\n      this._lineHighlight = this.coerceBooleanProperty(value);\n    }\n    // Plugin - lineNumbers\n    get lineNumbers() {\n      return this._lineNumbers;\n    }\n    set lineNumbers(value) {\n      this._lineNumbers = this.coerceBooleanProperty(value);\n    }\n    // Plugin - commandLine\n    get commandLine() {\n      return this._commandLine;\n    }\n    set commandLine(value) {\n      this._commandLine = this.coerceBooleanProperty(value);\n    }\n    constructor(element, markdownService, viewContainerRef) {\n      this.element = element;\n      this.markdownService = markdownService;\n      this.viewContainerRef = viewContainerRef;\n      // Event emitters\n      this.error = new EventEmitter();\n      this.load = new EventEmitter();\n      this.ready = new EventEmitter();\n      this._clipboard = false;\n      this._commandLine = false;\n      this._disableSanitizer = false;\n      this._emoji = false;\n      this._inline = false;\n      this._katex = false;\n      this._lineHighlight = false;\n      this._lineNumbers = false;\n      this._mermaid = false;\n      this.destroyed$ = new Subject();\n    }\n    ngOnChanges() {\n      this.loadContent();\n    }\n    loadContent() {\n      if (this.data != null) {\n        this.handleData();\n        return;\n      }\n      if (this.src != null) {\n        this.handleSrc();\n        return;\n      }\n    }\n    ngAfterViewInit() {\n      if (!this.data && !this.src) {\n        this.handleTransclusion();\n      }\n      this.markdownService.reload$.pipe(takeUntil(this.destroyed$)).subscribe(() => this.loadContent());\n    }\n    ngOnDestroy() {\n      this.destroyed$.next();\n      this.destroyed$.complete();\n    }\n    async render(markdown, decodeHtml = false) {\n      const parsedOptions = {\n        decodeHtml,\n        inline: this.inline,\n        emoji: this.emoji,\n        mermaid: this.mermaid,\n        disableSanitizer: this.disableSanitizer\n      };\n      const renderOptions = {\n        clipboard: this.clipboard,\n        clipboardOptions: {\n          buttonComponent: this.clipboardButtonComponent,\n          buttonTemplate: this.clipboardButtonTemplate\n        },\n        katex: this.katex,\n        katexOptions: this.katexOptions,\n        mermaid: this.mermaid,\n        mermaidOptions: this.mermaidOptions\n      };\n      const parsed = await this.markdownService.parse(markdown, parsedOptions);\n      this.element.nativeElement.innerHTML = parsed;\n      this.handlePlugins();\n      this.markdownService.render(this.element.nativeElement, renderOptions, this.viewContainerRef);\n      this.ready.emit();\n    }\n    coerceBooleanProperty(value) {\n      return value != null && `${String(value)}` !== 'false';\n    }\n    handleData() {\n      this.render(this.data);\n    }\n    handleSrc() {\n      this.markdownService.getSource(this.src).subscribe({\n        next: markdown => {\n          this.render(markdown).then(() => {\n            this.load.emit(markdown);\n          });\n        },\n        error: error => this.error.emit(error)\n      });\n    }\n    handleTransclusion() {\n      this.render(this.element.nativeElement.innerHTML, true);\n    }\n    handlePlugins() {\n      if (this.commandLine) {\n        this.setPluginClass(this.element.nativeElement, PrismPlugin.CommandLine);\n        this.setPluginOptions(this.element.nativeElement, {\n          dataFilterOutput: this.filterOutput,\n          dataHost: this.host,\n          dataPrompt: this.prompt,\n          dataOutput: this.output,\n          dataUser: this.user\n        });\n      }\n      if (this.lineHighlight) {\n        this.setPluginOptions(this.element.nativeElement, {\n          dataLine: this.line,\n          dataLineOffset: this.lineOffset\n        });\n      }\n      if (this.lineNumbers) {\n        this.setPluginClass(this.element.nativeElement, PrismPlugin.LineNumbers);\n        this.setPluginOptions(this.element.nativeElement, {\n          dataStart: this.start\n        });\n      }\n    }\n    setPluginClass(element, plugin) {\n      const preElements = element.querySelectorAll('pre');\n      for (let i = 0; i < preElements.length; i++) {\n        const classes = plugin instanceof Array ? plugin : [plugin];\n        preElements.item(i).classList.add(...classes);\n      }\n    }\n    setPluginOptions(element, options) {\n      const preElements = element.querySelectorAll('pre');\n      for (let i = 0; i < preElements.length; i++) {\n        Object.keys(options).forEach(option => {\n          const attributeValue = options[option];\n          if (attributeValue) {\n            const attributeName = this.toLispCase(option);\n            preElements.item(i).setAttribute(attributeName, attributeValue.toString());\n          }\n        });\n      }\n    }\n    toLispCase(value) {\n      const upperChars = value.match(/([A-Z])/g);\n      if (!upperChars) {\n        return value;\n      }\n      let str = value.toString();\n      for (let i = 0, n = upperChars.length; i < n; i++) {\n        str = str.replace(new RegExp(upperChars[i]), '-' + upperChars[i].toLowerCase());\n      }\n      if (str.slice(0, 1) === '-') {\n        str = str.slice(1);\n      }\n      return str;\n    }\n    static {\n      this.ɵfac = function MarkdownComponent_Factory(__ngFactoryType__) {\n        return new (__ngFactoryType__ || MarkdownComponent)(i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(MarkdownService), i0.ɵɵdirectiveInject(i0.ViewContainerRef));\n      };\n    }\n    static {\n      this.ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n        type: MarkdownComponent,\n        selectors: [[\"markdown\"], [\"\", \"markdown\", \"\"]],\n        inputs: {\n          data: \"data\",\n          src: \"src\",\n          disableSanitizer: \"disableSanitizer\",\n          inline: \"inline\",\n          clipboard: \"clipboard\",\n          clipboardButtonComponent: \"clipboardButtonComponent\",\n          clipboardButtonTemplate: \"clipboardButtonTemplate\",\n          emoji: \"emoji\",\n          katex: \"katex\",\n          katexOptions: \"katexOptions\",\n          mermaid: \"mermaid\",\n          mermaidOptions: \"mermaidOptions\",\n          lineHighlight: \"lineHighlight\",\n          line: \"line\",\n          lineOffset: \"lineOffset\",\n          lineNumbers: \"lineNumbers\",\n          start: \"start\",\n          commandLine: \"commandLine\",\n          filterOutput: \"filterOutput\",\n          host: \"host\",\n          prompt: \"prompt\",\n          output: \"output\",\n          user: \"user\"\n        },\n        outputs: {\n          error: \"error\",\n          load: \"load\",\n          ready: \"ready\"\n        },\n        features: [i0.ɵɵNgOnChangesFeature],\n        ngContentSelectors: _c0,\n        decls: 1,\n        vars: 0,\n        template: function MarkdownComponent_Template(rf, ctx) {\n          if (rf & 1) {\n            i0.ɵɵprojectionDef();\n            i0.ɵɵprojection(0);\n          }\n        },\n        encapsulation: 2\n      });\n    }\n  }\n  return MarkdownComponent;\n})();\n(() => {\n  (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet MarkdownPipe = /*#__PURE__*/(() => {\n  class MarkdownPipe {\n    constructor(domSanitizer, elementRef, markdownService, viewContainerRef, zone) {\n      this.domSanitizer = domSanitizer;\n      this.elementRef = elementRef;\n      this.markdownService = markdownService;\n      this.viewContainerRef = viewContainerRef;\n      this.zone = zone;\n    }\n    async transform(value, options) {\n      if (value == null) {\n        return '';\n      }\n      if (typeof value !== 'string') {\n        console.error(`MarkdownPipe has been invoked with an invalid value type [${typeof value}]`);\n        return value;\n      }\n      const markdown = await this.markdownService.parse(value, options);\n      this.zone.onStable.pipe(first()).subscribe(() => this.markdownService.render(this.elementRef.nativeElement, options, this.viewContainerRef));\n      return this.domSanitizer.bypassSecurityTrustHtml(markdown);\n    }\n    static {\n      this.ɵfac = function MarkdownPipe_Factory(__ngFactoryType__) {\n        return new (__ngFactoryType__ || MarkdownPipe)(i0.ɵɵdirectiveInject(i2.DomSanitizer, 16), i0.ɵɵdirectiveInject(i0.ElementRef, 16), i0.ɵɵdirectiveInject(MarkdownService, 16), i0.ɵɵdirectiveInject(i0.ViewContainerRef, 16), i0.ɵɵdirectiveInject(i0.NgZone, 16));\n      };\n    }\n    static {\n      this.ɵpipe = /* @__PURE__ */i0.ɵɵdefinePipe({\n        name: \"markdown\",\n        type: MarkdownPipe,\n        pure: true\n      });\n    }\n  }\n  return MarkdownPipe;\n})();\n(() => {\n  (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nfunction provideMarkdown(markdownModuleConfig) {\n  return [MarkdownService, markdownModuleConfig?.loader ?? [], markdownModuleConfig?.clipboardOptions ?? [], markdownModuleConfig?.markedOptions ?? [], {\n    provide: MARKED_EXTENSIONS,\n    useValue: markdownModuleConfig?.markedExtensions ?? []\n  }, {\n    provide: SECURITY_CONTEXT,\n    useValue: markdownModuleConfig?.sanitize ?? SecurityContext.HTML\n  }];\n}\nconst sharedDeclarations = [ClipboardButtonComponent, LanguagePipe, MarkdownComponent, MarkdownPipe];\nlet MarkdownModule = /*#__PURE__*/(() => {\n  class MarkdownModule {\n    static forRoot(markdownModuleConfig) {\n      return {\n        ngModule: MarkdownModule,\n        providers: [provideMarkdown(markdownModuleConfig)]\n      };\n    }\n    static forChild() {\n      return {\n        ngModule: MarkdownModule\n      };\n    }\n    static {\n      this.ɵfac = function MarkdownModule_Factory(__ngFactoryType__) {\n        return new (__ngFactoryType__ || MarkdownModule)();\n      };\n    }\n    static {\n      this.ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n        type: MarkdownModule\n      });\n    }\n    static {\n      this.ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({\n        imports: [CommonModule]\n      });\n    }\n  }\n  return MarkdownModule;\n})();\n(() => {\n  (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/* eslint-disable */\nvar MermaidAPI;\n(function (MermaidAPI) {\n  let SecurityLevel;\n  (function (SecurityLevel) {\n    /**\n     * (default) tags in text are encoded, click functionality is disabled\n     */\n    SecurityLevel[\"Strict\"] = \"strict\";\n    /**\n     * tags in text are allowed, click functionality is enabled\n     */\n    SecurityLevel[\"Loose\"] = \"loose\";\n    /**\n     * html tags in text are allowed, (only script element is removed), click functionality is enabled\n     */\n    SecurityLevel[\"Antiscript\"] = \"antiscript\";\n    /**\n     * with this security level all rendering takes place in a sandboxed iframe.\n     * This prevent any javascript running in the context.\n     * This may hinder interactive functionality of the diagram like scripts,\n     * popups in sequence diagram or links to other tabs/targets etc.\n     */\n    SecurityLevel[\"Sandbox\"] = \"sandbox\";\n  })(SecurityLevel = MermaidAPI.SecurityLevel || (MermaidAPI.SecurityLevel = {}));\n  let Theme;\n  (function (Theme) {\n    /**\n     * Designed to modified, as the name implies it is supposed to be used as the base for making custom themes.\n     */\n    Theme[\"Base\"] = \"base\";\n    /**\n     * A theme full of light greens that is easy on the eyes.\n     */\n    Theme[\"Forest\"] = \"forest\";\n    /**\n     * A theme that would go well with other dark colored elements.\n     */\n    Theme[\"Dark\"] = \"dark\";\n    /**\n     *  The default theme for all diagrams.\n     */\n    Theme[\"Default\"] = \"default\";\n    /**\n     * The theme to be used for black and white printing\n     */\n    Theme[\"Neutral\"] = \"neutral\";\n  })(Theme = MermaidAPI.Theme || (MermaidAPI.Theme = {}));\n  let LogLevel;\n  (function (LogLevel) {\n    LogLevel[LogLevel[\"Debug\"] = 1] = \"Debug\";\n    LogLevel[LogLevel[\"Info\"] = 2] = \"Info\";\n    LogLevel[LogLevel[\"Warn\"] = 3] = \"Warn\";\n    LogLevel[LogLevel[\"Error\"] = 4] = \"Error\";\n    LogLevel[LogLevel[\"Fatal\"] = 5] = \"Fatal\";\n  })(LogLevel = MermaidAPI.LogLevel || (MermaidAPI.LogLevel = {}));\n})(MermaidAPI || (MermaidAPI = {}));\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { CLIPBOARD_OPTIONS, ClipboardButtonComponent, ExtendedRenderer, KatexSpecificOptions, LanguagePipe, MARKED_EXTENSIONS, MARKED_OPTIONS, MarkdownComponent, MarkdownModule, MarkdownPipe, MarkdownService, MermaidAPI, PrismPlugin, SECURITY_CONTEXT, errorClipboardNotLoaded, errorClipboardViewContainerRequired, errorJoyPixelsNotLoaded, errorKatexNotLoaded, errorMermaidNotLoaded, errorSrcWithoutHttpClient, provideMarkdown };\n","import { Pipe, PipeTransform } from '@angular/core';\nimport { TitleCasePipe } from '@angular/common';\n\n/*\nsentenceCase pipe will put all words in lowercase except the first word and any exceptions provided\nOnly use when the i18n translations (en_devel) file, or the source of the strings cannot be directly edited.\nExample usage: if display names are fetched from vstore.\n */\n@Pipe({\n  name: 'sentenceCase',\n  standalone: true,\n})\nexport class SentenceCasePipe implements PipeTransform {\n  constructor(private readonly titleCase: TitleCasePipe) {}\n  transform(sentence: string, ignoredWords?: string[]): string {\n    if (!sentence) return sentence;\n    let words = sentence.split(' ');\n    words = words.map((word, index) => {\n      if (ignoredWords?.includes(word.replace(/[^\\w]/g, ''))) {\n        return word;\n      }\n      if (index === 0) {\n        return this.titleCase.transform(word);\n      }\n      return word.toLocaleLowerCase();\n    });\n    return words.join(' ');\n  }\n}\n","import { Pipe, PipeTransform } from '@angular/core';\n\ninterface Address {\n  address?: string;\n  address2?: string;\n  city?: string;\n  state?: string;\n  country?: string;\n  zip?: string;\n}\n// glxyAddress formats address information into a comma separate string\n@Pipe({\n  name: 'glxyAddress',\n  standalone: false,\n})\nexport class GalaxyAddressPipe implements PipeTransform {\n  transform(address: Address): string {\n    if (!address) {\n      return '';\n    }\n    return [\n      address.address?.trim(),\n      address.address2?.trim(),\n      address.city?.trim(),\n      address.state?.trim(),\n      address.country?.trim(),\n      address.zip?.trim(),\n    ]\n      .filter((v) => !!v)\n      .join(', ');\n  }\n}\n","import { Pipe, PipeTransform } from '@angular/core';\nimport { Observable, catchError, defaultIfEmpty, map, of, startWith } from 'rxjs';\n\n// Based on https://medium.com/angular-in-depth/9d8e5497dd8\n// Thanks Alexey Zuev!\n\nexport enum Status {\n  loading = 'loading',\n  loaded = 'loaded',\n  error = 'error',\n  empty = 'empty',\n}\n\nexport type GlxyAsyncStatus =\n  | {\n      status: Status.loading;\n    }\n  | {\n      status: Status.error;\n      error?: string | Error;\n    }\n  | {\n      status: Status.loaded;\n      value: T;\n      $implicit?: T;\n    }\n  | {\n      status: Status.empty;\n    };\n\nexport function isGalaxyAsyncStatus(value: unknown): value is GlxyAsyncStatus {\n  // must have a status entry to be a valid GlxyAsyncStatus\n  const statusKey = 'status';\n  if (value === null || typeof value !== 'object') return false;\n  if (!(statusKey in value)) return false;\n  if (typeof value[statusKey] !== 'string') return false;\n  if (!Object.values(Status).includes(value[statusKey] as Status)) return false;\n\n  // if there is an error key, make sure it is the correct type\n  if (value.status === Status.error) {\n    const errorKey = 'error';\n    if (errorKey in value && typeof value[errorKey] !== 'string' && !(value[errorKey] instanceof Error)) return false;\n  }\n\n  // if loaded status, make sure there is a value key, and that it is not undefined\n  const valueKey = 'value';\n  const implicitKey = '$implicit';\n  if (value.status === Status.loaded) {\n    if (!(valueKey in value)) return false;\n    if (typeof value[valueKey] === 'undefined') return false;\n  } else {\n    if (valueKey in value && typeof value[valueKey] !== 'undefined') return false;\n    if (implicitKey in value && typeof value[implicitKey] !== 'undefined') return false;\n  }\n\n  return true;\n}\n\nconst defaultError = 'Something went wrong';\n\n@Pipe({\n  name: 'glxyAsyncStatus',\n  standalone: false,\n})\nexport class GalaxyAsyncStatusPipe implements PipeTransform {\n  transform(val: Observable | T>): Observable> {\n    return val.pipe(\n      map((value) => {\n        if (\n          value === null ||\n          typeof value === 'undefined' ||\n          (typeof value === 'object' && Object.keys(value).length == 0) ||\n          (Array.isArray(value) && value.length === 0)\n        ) {\n          return {\n            status: Status.empty,\n          } as GlxyAsyncStatus;\n        }\n\n        if (isGalaxyAsyncStatus(value)) {\n          if (value.status === Status.error && !value.error) {\n            return {\n              status: Status.error,\n              error: defaultError,\n            } as GlxyAsyncStatus;\n          }\n\n          if (value.status === Status.loaded && !value.$implicit) {\n            return {\n              status: Status.loaded,\n              value: value.value,\n              $implicit: value.value,\n            } as GlxyAsyncStatus;\n          }\n\n          return value;\n        }\n\n        return {\n          status: Status.loaded,\n          value,\n          $implicit: value,\n        } as GlxyAsyncStatus;\n      }),\n      defaultIfEmpty({ status: Status.empty } as GlxyAsyncStatus),\n      startWith({ status: Status.loading } as GlxyAsyncStatus),\n      catchError((error) => {\n        let errorText = defaultError;\n        if (typeof error === 'string') {\n          errorText = error;\n        } else if (error instanceof Error) {\n          errorText = error.message;\n        }\n\n        console.log('glxyAsyncStatus Error - ' + error.name + ': ' + errorText);\n        return of({\n          status: Status.error,\n          error: errorText,\n        } as GlxyAsyncStatus);\n      }),\n    );\n  }\n}\n","module.exports = {\n  AED: 'د.إ',\n  AFN: '؋',\n  ALL: 'L',\n  AMD: '֏',\n  ANG: 'ƒ',\n  AOA: 'Kz',\n  ARS: '$',\n  AUD: '$',\n  AWG: 'ƒ',\n  AZN: '₼',\n  BAM: 'KM',\n  BBD: '$',\n  BDT: '৳',\n  BGN: 'лв',\n  BHD: '.د.ب',\n  BIF: 'FBu',\n  BMD: '$',\n  BND: '$',\n  BOB: '$b',\n  BOV: 'BOV',\n  BRL: 'R$',\n  BSD: '$',\n  BTC: '₿',\n  BTN: 'Nu.',\n  BWP: 'P',\n  BYN: 'Br',\n  BYR: 'Br',\n  BZD: 'BZ$',\n  CAD: '$',\n  CDF: 'FC',\n  CHE: 'CHE',\n  CHF: 'CHF',\n  CHW: 'CHW',\n  CLF: 'CLF',\n  CLP: '$',\n  CNH: '¥',\n  CNY: '¥',\n  COP: '$',\n  COU: 'COU',\n  CRC: '₡',\n  CUC: '$',\n  CUP: '₱',\n  CVE: '$',\n  CZK: 'Kč',\n  DJF: 'Fdj',\n  DKK: 'kr',\n  DOP: 'RD$',\n  DZD: 'دج',\n  EEK: 'kr',\n  EGP: '£',\n  ERN: 'Nfk',\n  ETB: 'Br',\n  ETH: 'Ξ',\n  EUR: '€',\n  FJD: '$',\n  FKP: '£',\n  GBP: '£',\n  GEL: '₾',\n  GGP: '£',\n  GHC: '₵',\n  GHS: 'GH₵',\n  GIP: '£',\n  GMD: 'D',\n  GNF: 'FG',\n  GTQ: 'Q',\n  GYD: '$',\n  HKD: '$',\n  HNL: 'L',\n  HRK: 'kn',\n  HTG: 'G',\n  HUF: 'Ft',\n  IDR: 'Rp',\n  ILS: '₪',\n  IMP: '£',\n  INR: '₹',\n  IQD: 'ع.د',\n  IRR: '﷼',\n  ISK: 'kr',\n  JEP: '£',\n  JMD: 'J$',\n  JOD: 'JD',\n  JPY: '¥',\n  KES: 'KSh',\n  KGS: 'лв',\n  KHR: '៛',\n  KMF: 'CF',\n  KPW: '₩',\n  KRW: '₩',\n  KWD: 'KD',\n  KYD: '$',\n  KZT: '₸',\n  LAK: '₭',\n  LBP: '£',\n  LKR: '₨',\n  LRD: '$',\n  LSL: 'M',\n  LTC: 'Ł',\n  LTL: 'Lt',\n  LVL: 'Ls',\n  LYD: 'LD',\n  MAD: 'MAD',\n  MDL: 'lei',\n  MGA: 'Ar',\n  MKD: 'ден',\n  MMK: 'K',\n  MNT: '₮',\n  MOP: 'MOP$',\n  MRO: 'UM',\n  MRU: 'UM',\n  MUR: '₨',\n  MVR: 'Rf',\n  MWK: 'MK',\n  MXN: '$',\n  MXV: 'MXV',\n  MYR: 'RM',\n  MZN: 'MT',\n  NAD: '$',\n  NGN: '₦',\n  NIO: 'C$',\n  NOK: 'kr',\n  NPR: '₨',\n  NZD: '$',\n  OMR: '﷼',\n  PAB: 'B/.',\n  PEN: 'S/.',\n  PGK: 'K',\n  PHP: '₱',\n  PKR: '₨',\n  PLN: 'zł',\n  PYG: 'Gs',\n  QAR: '﷼',\n  RMB: '¥',\n  RON: 'lei',\n  RSD: 'Дин.',\n  RUB: '₽',\n  RWF: 'R₣',\n  SAR: '﷼',\n  SBD: '$',\n  SCR: '₨',\n  SDG: 'ج.س.',\n  SEK: 'kr',\n  SGD: 'S$',\n  SHP: '£',\n  SLL: 'Le',\n  SOS: 'S',\n  SRD: '$',\n  SSP: '£',\n  STD: 'Db',\n  STN: 'Db',\n  SVC: '$',\n  SYP: '£',\n  SZL: 'E',\n  THB: '฿',\n  TJS: 'SM',\n  TMT: 'T',\n  TND: 'د.ت',\n  TOP: 'T$',\n  TRL: '₤',\n  TRY: '₺',\n  TTD: 'TT$',\n  TVD: '$',\n  TWD: 'NT$',\n  TZS: 'TSh',\n  UAH: '₴',\n  UGX: 'USh',\n  USD: '$',\n  UYI: 'UYI',\n  UYU: '$U',\n  UYW: 'UYW',\n  UZS: 'лв',\n  VEF: 'Bs',\n  VES: 'Bs.S',\n  VND: '₫',\n  VUV: 'VT',\n  WST: 'WS$',\n  XAF: 'FCFA',\n  XBT: 'Ƀ',\n  XCD: '$',\n  XOF: 'CFA',\n  XPF: '₣',\n  XSU: 'Sucre',\n  XUA: 'XUA',\n  YER: '﷼',\n  ZAR: 'R',\n  ZMW: 'ZK',\n  ZWD: 'Z$',\n  ZWL: '$'\n};","const currencySymbolMap = require('./map');\nmodule.exports = function getSymbolFromCurrency(currencyCode) {\n  if (typeof currencyCode !== 'string') {\n    return undefined;\n  }\n  const code = currencyCode.toUpperCase();\n  if (!Object.prototype.hasOwnProperty.call(currencySymbolMap, code)) {\n    return undefined;\n  }\n  return currencySymbolMap[code];\n};\nmodule.exports.currencySymbolMap = currencySymbolMap;","// Generated using ShowCurrencies.java\nvar map = {\n  AD: 'EUR',\n  AE: 'AED',\n  AF: 'AFN',\n  AG: 'XCD',\n  AI: 'XCD',\n  AL: 'ALL',\n  AM: 'AMD',\n  AN: 'ANG',\n  AO: 'AOA',\n  AR: 'ARS',\n  AS: 'USD',\n  AT: 'EUR',\n  AU: 'AUD',\n  AW: 'AWG',\n  AX: 'EUR',\n  AZ: 'AZN',\n  BA: 'BAM',\n  BB: 'BBD',\n  BD: 'BDT',\n  BE: 'EUR',\n  BF: 'XOF',\n  BG: 'BGN',\n  BH: 'BHD',\n  BI: 'BIF',\n  BJ: 'XOF',\n  BL: 'EUR',\n  BM: 'BMD',\n  BN: 'BND',\n  BO: 'BOB',\n  BQ: 'USD',\n  BR: 'BRL',\n  BS: 'BSD',\n  BT: 'BTN',\n  BV: 'NOK',\n  BW: 'BWP',\n  BY: 'BYR',\n  BZ: 'BZD',\n  CA: 'CAD',\n  CC: 'AUD',\n  CD: 'CDF',\n  CF: 'XAF',\n  CG: 'XAF',\n  CH: 'CHF',\n  CI: 'XOF',\n  CK: 'NZD',\n  CL: 'CLP',\n  CM: 'XAF',\n  CN: 'CNY',\n  CO: 'COP',\n  CR: 'CRC',\n  CU: 'CUP',\n  CV: 'CVE',\n  CW: 'ANG',\n  CX: 'AUD',\n  CY: 'EUR',\n  CZ: 'CZK',\n  DE: 'EUR',\n  DJ: 'DJF',\n  DK: 'DKK',\n  DM: 'XCD',\n  DO: 'DOP',\n  DZ: 'DZD',\n  EC: 'USD',\n  EE: 'EUR',\n  EG: 'EGP',\n  EH: 'MAD',\n  ER: 'ERN',\n  ES: 'EUR',\n  ET: 'ETB',\n  FI: 'EUR',\n  FJ: 'FJD',\n  FK: 'FKP',\n  FM: 'USD',\n  FO: 'DKK',\n  FR: 'EUR',\n  GA: 'XAF',\n  GB: 'GBP',\n  GD: 'XCD',\n  GE: 'GEL',\n  GF: 'EUR',\n  GG: 'GBP',\n  GH: 'GHS',\n  GI: 'GIP',\n  GL: 'DKK',\n  GM: 'GMD',\n  GN: 'GNF',\n  GP: 'EUR',\n  GQ: 'XAF',\n  GR: 'EUR',\n  GS: 'GBP',\n  GT: 'GTQ',\n  GU: 'USD',\n  GW: 'XOF',\n  GY: 'GYD',\n  HK: 'HKD',\n  HM: 'AUD',\n  HN: 'HNL',\n  HR: 'HRK',\n  HT: 'HTG',\n  HU: 'HUF',\n  ID: 'IDR',\n  IE: 'EUR',\n  IL: 'ILS',\n  IM: 'GBP',\n  IN: 'INR',\n  IO: 'USD',\n  IQ: 'IQD',\n  IR: 'IRR',\n  IS: 'ISK',\n  IT: 'EUR',\n  JE: 'GBP',\n  JM: 'JMD',\n  JO: 'JOD',\n  JP: 'JPY',\n  KE: 'KES',\n  KG: 'KGS',\n  KH: 'KHR',\n  KI: 'AUD',\n  KM: 'KMF',\n  KN: 'XCD',\n  KP: 'KPW',\n  KR: 'KRW',\n  KW: 'KWD',\n  KY: 'KYD',\n  KZ: 'KZT',\n  LA: 'LAK',\n  LB: 'LBP',\n  LC: 'XCD',\n  LI: 'CHF',\n  LK: 'LKR',\n  LR: 'LRD',\n  LS: 'LSL',\n  LT: 'LTL',\n  LU: 'EUR',\n  LV: 'LVL',\n  LY: 'LYD',\n  MA: 'MAD',\n  MC: 'EUR',\n  MD: 'MDL',\n  ME: 'EUR',\n  MF: 'EUR',\n  MG: 'MGA',\n  MH: 'USD',\n  MK: 'MKD',\n  ML: 'XOF',\n  MM: 'MMK',\n  MN: 'MNT',\n  MO: 'MOP',\n  MP: 'USD',\n  MQ: 'EUR',\n  MR: 'MRO',\n  MS: 'XCD',\n  MT: 'EUR',\n  MU: 'MUR',\n  MV: 'MVR',\n  MW: 'MWK',\n  MX: 'MXN',\n  MY: 'MYR',\n  MZ: 'MZN',\n  NA: 'NAD',\n  NC: 'XPF',\n  NE: 'XOF',\n  NF: 'AUD',\n  NG: 'NGN',\n  NI: 'NIO',\n  NL: 'EUR',\n  NO: 'NOK',\n  NP: 'NPR',\n  NR: 'AUD',\n  NU: 'NZD',\n  NZ: 'NZD',\n  OM: 'OMR',\n  PA: 'PAB',\n  PE: 'PEN',\n  PF: 'XPF',\n  PG: 'PGK',\n  PH: 'PHP',\n  PK: 'PKR',\n  PL: 'PLN',\n  PM: 'EUR',\n  PN: 'NZD',\n  PR: 'USD',\n  PS: 'ILS',\n  PT: 'EUR',\n  PW: 'USD',\n  PY: 'PYG',\n  QA: 'QAR',\n  RE: 'EUR',\n  RO: 'RON',\n  RS: 'RSD',\n  RU: 'RUB',\n  RW: 'RWF',\n  SA: 'SAR',\n  SB: 'SBD',\n  SC: 'SCR',\n  SD: 'SDG',\n  SE: 'SEK',\n  SG: 'SGD',\n  SH: 'SHP',\n  SI: 'EUR',\n  SJ: 'NOK',\n  SK: 'EUR',\n  SL: 'SLL',\n  SM: 'EUR',\n  SN: 'XOF',\n  SO: 'SOS',\n  SR: 'SRD',\n  ST: 'STD',\n  SV: 'SVC',\n  SX: 'ANG',\n  SY: 'SYP',\n  SZ: 'SZL',\n  TC: 'USD',\n  TD: 'XAF',\n  TF: 'EUR',\n  TG: 'XOF',\n  TH: 'THB',\n  TJ: 'TJS',\n  TK: 'NZD',\n  TL: 'USD',\n  TM: 'TMT',\n  TN: 'TND',\n  TO: 'TOP',\n  TR: 'TRY',\n  TT: 'TTD',\n  TV: 'AUD',\n  TW: 'TWD',\n  TZ: 'TZS',\n  UA: 'UAH',\n  UG: 'UGX',\n  UM: 'USD',\n  US: 'USD',\n  UY: 'UYU',\n  UZ: 'UZS',\n  VA: 'EUR',\n  VC: 'XCD',\n  VE: 'VEF',\n  VG: 'USD',\n  VI: 'USD',\n  VN: 'VND',\n  VU: 'VUV',\n  WF: 'XPF',\n  WS: 'WST',\n  YE: 'YER',\n  YT: 'EUR',\n  ZA: 'ZAR',\n  ZM: 'ZMK',\n  ZW: 'ZWL'\n};\nmodule.exports = map;","var map = require(\"./map\");\nvar getCountryCode = function (localeString) {\n  var components = localeString.split(\"_\");\n  if (components.length == 2) {\n    return components.pop();\n  }\n  components = localeString.split(\"-\");\n  if (components.length == 2) {\n    return components.pop();\n  }\n  return localeString;\n};\nexports.getCurrency = function (locale) {\n  var countryCode = getCountryCode(locale).toUpperCase();\n  if (countryCode in map) {\n    return map[countryCode];\n  }\n  return null;\n};\nexports.getLocales = function (currencyCode) {\n  currencyCode = currencyCode.toUpperCase();\n  var locales = [];\n  for (countryCode in map) {\n    if (map[countryCode] === currencyCode) {\n      locales.push(countryCode);\n    }\n  }\n  return locales;\n};","var formatDistanceLocale = {\n  lessThanXSeconds: {\n    one: {\n      regular: 'méně než sekunda',\n      past: 'před méně než sekundou',\n      future: 'za méně než sekundu'\n    },\n    few: {\n      regular: 'méně než {{count}} sekundy',\n      past: 'před méně než {{count}} sekundami',\n      future: 'za méně než {{count}} sekundy'\n    },\n    many: {\n      regular: 'méně než {{count}} sekund',\n      past: 'před méně než {{count}} sekundami',\n      future: 'za méně než {{count}} sekund'\n    }\n  },\n  xSeconds: {\n    one: {\n      regular: 'sekunda',\n      past: 'před sekundou',\n      future: 'za sekundu'\n    },\n    few: {\n      regular: '{{count}} sekundy',\n      past: 'před {{count}} sekundami',\n      future: 'za {{count}} sekundy'\n    },\n    many: {\n      regular: '{{count}} sekund',\n      past: 'před {{count}} sekundami',\n      future: 'za {{count}} sekund'\n    }\n  },\n  halfAMinute: {\n    type: 'other',\n    other: {\n      regular: 'půl minuty',\n      past: 'před půl minutou',\n      future: 'za půl minuty'\n    }\n  },\n  lessThanXMinutes: {\n    one: {\n      regular: 'méně než minuta',\n      past: 'před méně než minutou',\n      future: 'za méně než minutu'\n    },\n    few: {\n      regular: 'méně než {{count}} minuty',\n      past: 'před méně než {{count}} minutami',\n      future: 'za méně než {{count}} minuty'\n    },\n    many: {\n      regular: 'méně než {{count}} minut',\n      past: 'před méně než {{count}} minutami',\n      future: 'za méně než {{count}} minut'\n    }\n  },\n  xMinutes: {\n    one: {\n      regular: 'minuta',\n      past: 'před minutou',\n      future: 'za minutu'\n    },\n    few: {\n      regular: '{{count}} minuty',\n      past: 'před {{count}} minutami',\n      future: 'za {{count}} minuty'\n    },\n    many: {\n      regular: '{{count}} minut',\n      past: 'před {{count}} minutami',\n      future: 'za {{count}} minut'\n    }\n  },\n  aboutXHours: {\n    one: {\n      regular: 'přibližně hodina',\n      past: 'přibližně před hodinou',\n      future: 'přibližně za hodinu'\n    },\n    few: {\n      regular: 'přibližně {{count}} hodiny',\n      past: 'přibližně před {{count}} hodinami',\n      future: 'přibližně za {{count}} hodiny'\n    },\n    many: {\n      regular: 'přibližně {{count}} hodin',\n      past: 'přibližně před {{count}} hodinami',\n      future: 'přibližně za {{count}} hodin'\n    }\n  },\n  xHours: {\n    one: {\n      regular: 'hodina',\n      past: 'před hodinou',\n      future: 'za hodinu'\n    },\n    few: {\n      regular: '{{count}} hodiny',\n      past: 'před {{count}} hodinami',\n      future: 'za {{count}} hodiny'\n    },\n    many: {\n      regular: '{{count}} hodin',\n      past: 'před {{count}} hodinami',\n      future: 'za {{count}} hodin'\n    }\n  },\n  xDays: {\n    one: {\n      regular: 'den',\n      past: 'před dnem',\n      future: 'za den'\n    },\n    few: {\n      regular: '{{count}} dny',\n      past: 'před {{count}} dny',\n      future: 'za {{count}} dny'\n    },\n    many: {\n      regular: '{{count}} dní',\n      past: 'před {{count}} dny',\n      future: 'za {{count}} dní'\n    }\n  },\n  aboutXWeeks: {\n    one: {\n      regular: 'přibližně týden',\n      past: 'přibližně před týdnem',\n      future: 'přibližně za týden'\n    },\n    few: {\n      regular: 'přibližně {{count}} týdny',\n      past: 'přibližně před {{count}} týdny',\n      future: 'přibližně za {{count}} týdny'\n    },\n    many: {\n      regular: 'přibližně {{count}} týdnů',\n      past: 'přibližně před {{count}} týdny',\n      future: 'přibližně za {{count}} týdnů'\n    }\n  },\n  xWeeks: {\n    one: {\n      regular: 'týden',\n      past: 'před týdnem',\n      future: 'za týden'\n    },\n    few: {\n      regular: '{{count}} týdny',\n      past: 'před {{count}} týdny',\n      future: 'za {{count}} týdny'\n    },\n    many: {\n      regular: '{{count}} týdnů',\n      past: 'před {{count}} týdny',\n      future: 'za {{count}} týdnů'\n    }\n  },\n  aboutXMonths: {\n    one: {\n      regular: 'přibližně měsíc',\n      past: 'přibližně před měsícem',\n      future: 'přibližně za měsíc'\n    },\n    few: {\n      regular: 'přibližně {{count}} měsíce',\n      past: 'přibližně před {{count}} měsíci',\n      future: 'přibližně za {{count}} měsíce'\n    },\n    many: {\n      regular: 'přibližně {{count}} měsíců',\n      past: 'přibližně před {{count}} měsíci',\n      future: 'přibližně za {{count}} měsíců'\n    }\n  },\n  xMonths: {\n    one: {\n      regular: 'měsíc',\n      past: 'před měsícem',\n      future: 'za měsíc'\n    },\n    few: {\n      regular: '{{count}} měsíce',\n      past: 'před {{count}} měsíci',\n      future: 'za {{count}} měsíce'\n    },\n    many: {\n      regular: '{{count}} měsíců',\n      past: 'před {{count}} měsíci',\n      future: 'za {{count}} měsíců'\n    }\n  },\n  aboutXYears: {\n    one: {\n      regular: 'přibližně rok',\n      past: 'přibližně před rokem',\n      future: 'přibližně za rok'\n    },\n    few: {\n      regular: 'přibližně {{count}} roky',\n      past: 'přibližně před {{count}} roky',\n      future: 'přibližně za {{count}} roky'\n    },\n    many: {\n      regular: 'přibližně {{count}} roků',\n      past: 'přibližně před {{count}} roky',\n      future: 'přibližně za {{count}} roků'\n    }\n  },\n  xYears: {\n    one: {\n      regular: 'rok',\n      past: 'před rokem',\n      future: 'za rok'\n    },\n    few: {\n      regular: '{{count}} roky',\n      past: 'před {{count}} roky',\n      future: 'za {{count}} roky'\n    },\n    many: {\n      regular: '{{count}} roků',\n      past: 'před {{count}} roky',\n      future: 'za {{count}} roků'\n    }\n  },\n  overXYears: {\n    one: {\n      regular: 'více než rok',\n      past: 'před více než rokem',\n      future: 'za více než rok'\n    },\n    few: {\n      regular: 'více než {{count}} roky',\n      past: 'před více než {{count}} roky',\n      future: 'za více než {{count}} roky'\n    },\n    many: {\n      regular: 'více než {{count}} roků',\n      past: 'před více než {{count}} roky',\n      future: 'za více než {{count}} roků'\n    }\n  },\n  almostXYears: {\n    one: {\n      regular: 'skoro rok',\n      past: 'skoro před rokem',\n      future: 'skoro za rok'\n    },\n    few: {\n      regular: 'skoro {{count}} roky',\n      past: 'skoro před {{count}} roky',\n      future: 'skoro za {{count}} roky'\n    },\n    many: {\n      regular: 'skoro {{count}} roků',\n      past: 'skoro před {{count}} roky',\n      future: 'skoro za {{count}} roků'\n    }\n  }\n};\nvar formatDistance = function formatDistance(token, count, options) {\n  var pluralResult;\n  var tokenValue = formatDistanceLocale[token];\n\n  // cs pluralization\n  if (tokenValue.type === 'other') {\n    pluralResult = tokenValue.other;\n  } else if (count === 1) {\n    pluralResult = tokenValue.one;\n  } else if (count > 1 && count < 5) {\n    pluralResult = tokenValue.few;\n  } else {\n    pluralResult = tokenValue.many;\n  }\n\n  // times\n  var suffixExist = (options === null || options === void 0 ? void 0 : options.addSuffix) === true;\n  var comparison = options === null || options === void 0 ? void 0 : options.comparison;\n  var timeResult;\n  if (suffixExist && comparison === -1) {\n    timeResult = pluralResult.past;\n  } else if (suffixExist && comparison === 1) {\n    timeResult = pluralResult.future;\n  } else {\n    timeResult = pluralResult.regular;\n  }\n  return timeResult.replace('{{count}}', String(count));\n};\nexport default formatDistance;","import buildFormatLongFn from \"../../../_lib/buildFormatLongFn/index.js\";\nvar dateFormats = {\n  full: 'EEEE, d. MMMM yyyy',\n  long: 'd. MMMM yyyy',\n  medium: 'd. M. yyyy',\n  short: 'dd.MM.yyyy'\n};\nvar timeFormats = {\n  full: 'H:mm:ss zzzz',\n  long: 'H:mm:ss z',\n  medium: 'H:mm:ss',\n  short: 'H:mm'\n};\nvar dateTimeFormats = {\n  full: \"{{date}} 'v' {{time}}\",\n  long: \"{{date}} 'v' {{time}}\",\n  medium: '{{date}}, {{time}}',\n  short: '{{date}}, {{time}}'\n};\nvar formatLong = {\n  date: buildFormatLongFn({\n    formats: dateFormats,\n    defaultWidth: 'full'\n  }),\n  time: buildFormatLongFn({\n    formats: timeFormats,\n    defaultWidth: 'full'\n  }),\n  dateTime: buildFormatLongFn({\n    formats: dateTimeFormats,\n    defaultWidth: 'full'\n  })\n};\nexport default formatLong;","var accusativeWeekdays = ['neděli', 'pondělí', 'úterý', 'středu', 'čtvrtek', 'pátek', 'sobotu'];\nvar formatRelativeLocale = {\n  lastWeek: \"'poslední' eeee 've' p\",\n  yesterday: \"'včera v' p\",\n  today: \"'dnes v' p\",\n  tomorrow: \"'zítra v' p\",\n  nextWeek: function nextWeek(date) {\n    var day = date.getUTCDay();\n    return \"'v \" + accusativeWeekdays[day] + \" o' p\";\n  },\n  other: 'P'\n};\nvar formatRelative = function formatRelative(token, date) {\n  var format = formatRelativeLocale[token];\n  if (typeof format === 'function') {\n    return format(date);\n  }\n  return format;\n};\nexport default formatRelative;","import buildLocalizeFn from \"../../../_lib/buildLocalizeFn/index.js\";\nvar eraValues = {\n  narrow: ['př. n. l.', 'n. l.'],\n  abbreviated: ['př. n. l.', 'n. l.'],\n  wide: ['před naším letopočtem', 'našeho letopočtu']\n};\nvar quarterValues = {\n  narrow: ['1', '2', '3', '4'],\n  abbreviated: ['1. čtvrtletí', '2. čtvrtletí', '3. čtvrtletí', '4. čtvrtletí'],\n  wide: ['1. čtvrtletí', '2. čtvrtletí', '3. čtvrtletí', '4. čtvrtletí']\n};\nvar monthValues = {\n  narrow: ['L', 'Ú', 'B', 'D', 'K', 'Č', 'Č', 'S', 'Z', 'Ř', 'L', 'P'],\n  abbreviated: ['led', 'úno', 'bře', 'dub', 'kvě', 'čvn', 'čvc', 'srp', 'zář', 'říj', 'lis', 'pro'],\n  wide: ['leden', 'únor', 'březen', 'duben', 'květen', 'červen', 'červenec', 'srpen', 'září', 'říjen', 'listopad', 'prosinec']\n};\nvar formattingMonthValues = {\n  narrow: ['L', 'Ú', 'B', 'D', 'K', 'Č', 'Č', 'S', 'Z', 'Ř', 'L', 'P'],\n  abbreviated: ['led', 'úno', 'bře', 'dub', 'kvě', 'čvn', 'čvc', 'srp', 'zář', 'říj', 'lis', 'pro'],\n  wide: ['ledna', 'února', 'března', 'dubna', 'května', 'června', 'července', 'srpna', 'září', 'října', 'listopadu', 'prosince']\n};\nvar dayValues = {\n  narrow: ['ne', 'po', 'út', 'st', 'čt', 'pá', 'so'],\n  short: ['ne', 'po', 'út', 'st', 'čt', 'pá', 'so'],\n  abbreviated: ['ned', 'pon', 'úte', 'stř', 'čtv', 'pát', 'sob'],\n  wide: ['neděle', 'pondělí', 'úterý', 'středa', 'čtvrtek', 'pátek', 'sobota']\n};\nvar dayPeriodValues = {\n  narrow: {\n    am: 'dop.',\n    pm: 'odp.',\n    midnight: 'půlnoc',\n    noon: 'poledne',\n    morning: 'ráno',\n    afternoon: 'odpoledne',\n    evening: 'večer',\n    night: 'noc'\n  },\n  abbreviated: {\n    am: 'dop.',\n    pm: 'odp.',\n    midnight: 'půlnoc',\n    noon: 'poledne',\n    morning: 'ráno',\n    afternoon: 'odpoledne',\n    evening: 'večer',\n    night: 'noc'\n  },\n  wide: {\n    am: 'dopoledne',\n    pm: 'odpoledne',\n    midnight: 'půlnoc',\n    noon: 'poledne',\n    morning: 'ráno',\n    afternoon: 'odpoledne',\n    evening: 'večer',\n    night: 'noc'\n  }\n};\nvar formattingDayPeriodValues = {\n  narrow: {\n    am: 'dop.',\n    pm: 'odp.',\n    midnight: 'půlnoc',\n    noon: 'poledne',\n    morning: 'ráno',\n    afternoon: 'odpoledne',\n    evening: 'večer',\n    night: 'noc'\n  },\n  abbreviated: {\n    am: 'dop.',\n    pm: 'odp.',\n    midnight: 'půlnoc',\n    noon: 'poledne',\n    morning: 'ráno',\n    afternoon: 'odpoledne',\n    evening: 'večer',\n    night: 'noc'\n  },\n  wide: {\n    am: 'dopoledne',\n    pm: 'odpoledne',\n    midnight: 'půlnoc',\n    noon: 'poledne',\n    morning: 'ráno',\n    afternoon: 'odpoledne',\n    evening: 'večer',\n    night: 'noc'\n  }\n};\nvar ordinalNumber = function ordinalNumber(dirtyNumber, _options) {\n  var number = Number(dirtyNumber);\n  return number + '.';\n};\nvar localize = {\n  ordinalNumber: ordinalNumber,\n  era: buildLocalizeFn({\n    values: eraValues,\n    defaultWidth: 'wide'\n  }),\n  quarter: buildLocalizeFn({\n    values: quarterValues,\n    defaultWidth: 'wide',\n    argumentCallback: function argumentCallback(quarter) {\n      return quarter - 1;\n    }\n  }),\n  month: buildLocalizeFn({\n    values: monthValues,\n    defaultWidth: 'wide',\n    formattingValues: formattingMonthValues,\n    defaultFormattingWidth: 'wide'\n  }),\n  day: buildLocalizeFn({\n    values: dayValues,\n    defaultWidth: 'wide'\n  }),\n  dayPeriod: buildLocalizeFn({\n    values: dayPeriodValues,\n    defaultWidth: 'wide',\n    formattingValues: formattingDayPeriodValues,\n    defaultFormattingWidth: 'wide'\n  })\n};\nexport default localize;","import buildMatchFn from \"../../../_lib/buildMatchFn/index.js\";\nimport buildMatchPatternFn from \"../../../_lib/buildMatchPatternFn/index.js\";\nvar matchOrdinalNumberPattern = /^(\\d+)\\.?/i;\nvar parseOrdinalNumberPattern = /\\d+/i;\nvar matchEraPatterns = {\n  narrow: /^(p[řr](\\.|ed) Kr\\.|p[řr](\\.|ed) n\\. l\\.|po Kr\\.|n\\. l\\.)/i,\n  abbreviated: /^(p[řr](\\.|ed) Kr\\.|p[řr](\\.|ed) n\\. l\\.|po Kr\\.|n\\. l\\.)/i,\n  wide: /^(p[řr](\\.|ed) Kristem|p[řr](\\.|ed) na[šs][íi]m letopo[čc]tem|po Kristu|na[šs]eho letopo[čc]tu)/i\n};\nvar parseEraPatterns = {\n  any: [/^p[řr]/i, /^(po|n)/i]\n};\nvar matchQuarterPatterns = {\n  narrow: /^[1234]/i,\n  abbreviated: /^[1234]\\. [čc]tvrtlet[íi]/i,\n  wide: /^[1234]\\. [čc]tvrtlet[íi]/i\n};\nvar parseQuarterPatterns = {\n  any: [/1/i, /2/i, /3/i, /4/i]\n};\nvar matchMonthPatterns = {\n  narrow: /^[lúubdkčcszřrlp]/i,\n  abbreviated: /^(led|[úu]no|b[řr]e|dub|kv[ěe]|[čc]vn|[čc]vc|srp|z[áa][řr]|[řr][íi]j|lis|pro)/i,\n  wide: /^(leden|ledna|[úu]nora?|b[řr]ezen|b[řr]ezna|duben|dubna|kv[ěe]ten|kv[ěe]tna|[čc]erven(ec|ce)?|[čc]ervna|srpen|srpna|z[áa][řr][íi]|[řr][íi]jen|[řr][íi]jna|listopad(a|u)?|prosinec|prosince)/i\n};\nvar parseMonthPatterns = {\n  narrow: [/^l/i, /^[úu]/i, /^b/i, /^d/i, /^k/i, /^[čc]/i, /^[čc]/i, /^s/i, /^z/i, /^[řr]/i, /^l/i, /^p/i],\n  any: [/^led/i, /^[úu]n/i, /^b[řr]e/i, /^dub/i, /^kv[ěe]/i, /^[čc]vn|[čc]erven(?!\\w)|[čc]ervna/i, /^[čc]vc|[čc]erven(ec|ce)/i, /^srp/i, /^z[áa][řr]/i, /^[řr][íi]j/i, /^lis/i, /^pro/i]\n};\nvar matchDayPatterns = {\n  narrow: /^[npuúsčps]/i,\n  short: /^(ne|po|[úu]t|st|[čc]t|p[áa]|so)/i,\n  abbreviated: /^(ned|pon|[úu]te|st[rř]|[čc]tv|p[áa]t|sob)/i,\n  wide: /^(ned[ěe]le|pond[ěe]l[íi]|[úu]ter[ýy]|st[řr]eda|[čc]tvrtek|p[áa]tek|sobota)/i\n};\nvar parseDayPatterns = {\n  narrow: [/^n/i, /^p/i, /^[úu]/i, /^s/i, /^[čc]/i, /^p/i, /^s/i],\n  any: [/^ne/i, /^po/i, /^[úu]t/i, /^st/i, /^[čc]t/i, /^p[áa]/i, /^so/i]\n};\nvar matchDayPeriodPatterns = {\n  any: /^dopoledne|dop\\.?|odpoledne|odp\\.?|p[ůu]lnoc|poledne|r[áa]no|odpoledne|ve[čc]er|(v )?noci?/i\n};\nvar parseDayPeriodPatterns = {\n  any: {\n    am: /^dop/i,\n    pm: /^odp/i,\n    midnight: /^p[ůu]lnoc/i,\n    noon: /^poledne/i,\n    morning: /r[áa]no/i,\n    afternoon: /odpoledne/i,\n    evening: /ve[čc]er/i,\n    night: /noc/i\n  }\n};\nvar match = {\n  ordinalNumber: buildMatchPatternFn({\n    matchPattern: matchOrdinalNumberPattern,\n    parsePattern: parseOrdinalNumberPattern,\n    valueCallback: function valueCallback(value) {\n      return parseInt(value, 10);\n    }\n  }),\n  era: buildMatchFn({\n    matchPatterns: matchEraPatterns,\n    defaultMatchWidth: 'wide',\n    parsePatterns: parseEraPatterns,\n    defaultParseWidth: 'any'\n  }),\n  quarter: buildMatchFn({\n    matchPatterns: matchQuarterPatterns,\n    defaultMatchWidth: 'wide',\n    parsePatterns: parseQuarterPatterns,\n    defaultParseWidth: 'any',\n    valueCallback: function valueCallback(index) {\n      return index + 1;\n    }\n  }),\n  month: buildMatchFn({\n    matchPatterns: matchMonthPatterns,\n    defaultMatchWidth: 'wide',\n    parsePatterns: parseMonthPatterns,\n    defaultParseWidth: 'any'\n  }),\n  day: buildMatchFn({\n    matchPatterns: matchDayPatterns,\n    defaultMatchWidth: 'wide',\n    parsePatterns: parseDayPatterns,\n    defaultParseWidth: 'any'\n  }),\n  dayPeriod: buildMatchFn({\n    matchPatterns: matchDayPeriodPatterns,\n    defaultMatchWidth: 'any',\n    parsePatterns: parseDayPeriodPatterns,\n    defaultParseWidth: 'any'\n  })\n};\nexport default match;","import formatDistance from \"./_lib/formatDistance/index.js\";\nimport formatLong from \"./_lib/formatLong/index.js\";\nimport formatRelative from \"./_lib/formatRelative/index.js\";\nimport localize from \"./_lib/localize/index.js\";\nimport match from \"./_lib/match/index.js\";\n/**\n * @type {Locale}\n * @category Locales\n * @summary Czech locale.\n * @language Czech\n * @iso-639-2 ces\n * @author David Rus [@davidrus]{@link https://github.com/davidrus}\n * @author Pavel Hrách [@SilenY]{@link https://github.com/SilenY}\n * @author Jozef Bíroš [@JozefBiros]{@link https://github.com/JozefBiros}\n */\nvar locale = {\n  code: 'cs',\n  formatDistance: formatDistance,\n  formatLong: formatLong,\n  formatRelative: formatRelative,\n  localize: localize,\n  match: match,\n  options: {\n    weekStartsOn: 1 /* Monday */,\n    firstWeekContainsDate: 4\n  }\n};\nexport default locale;","var formatDistanceLocale = {\n  lessThanXSeconds: {\n    standalone: {\n      one: 'weniger als 1 Sekunde',\n      other: 'weniger als {{count}} Sekunden'\n    },\n    withPreposition: {\n      one: 'weniger als 1 Sekunde',\n      other: 'weniger als {{count}} Sekunden'\n    }\n  },\n  xSeconds: {\n    standalone: {\n      one: '1 Sekunde',\n      other: '{{count}} Sekunden'\n    },\n    withPreposition: {\n      one: '1 Sekunde',\n      other: '{{count}} Sekunden'\n    }\n  },\n  halfAMinute: {\n    standalone: 'halbe Minute',\n    withPreposition: 'halben Minute'\n  },\n  lessThanXMinutes: {\n    standalone: {\n      one: 'weniger als 1 Minute',\n      other: 'weniger als {{count}} Minuten'\n    },\n    withPreposition: {\n      one: 'weniger als 1 Minute',\n      other: 'weniger als {{count}} Minuten'\n    }\n  },\n  xMinutes: {\n    standalone: {\n      one: '1 Minute',\n      other: '{{count}} Minuten'\n    },\n    withPreposition: {\n      one: '1 Minute',\n      other: '{{count}} Minuten'\n    }\n  },\n  aboutXHours: {\n    standalone: {\n      one: 'etwa 1 Stunde',\n      other: 'etwa {{count}} Stunden'\n    },\n    withPreposition: {\n      one: 'etwa 1 Stunde',\n      other: 'etwa {{count}} Stunden'\n    }\n  },\n  xHours: {\n    standalone: {\n      one: '1 Stunde',\n      other: '{{count}} Stunden'\n    },\n    withPreposition: {\n      one: '1 Stunde',\n      other: '{{count}} Stunden'\n    }\n  },\n  xDays: {\n    standalone: {\n      one: '1 Tag',\n      other: '{{count}} Tage'\n    },\n    withPreposition: {\n      one: '1 Tag',\n      other: '{{count}} Tagen'\n    }\n  },\n  aboutXWeeks: {\n    standalone: {\n      one: 'etwa 1 Woche',\n      other: 'etwa {{count}} Wochen'\n    },\n    withPreposition: {\n      one: 'etwa 1 Woche',\n      other: 'etwa {{count}} Wochen'\n    }\n  },\n  xWeeks: {\n    standalone: {\n      one: '1 Woche',\n      other: '{{count}} Wochen'\n    },\n    withPreposition: {\n      one: '1 Woche',\n      other: '{{count}} Wochen'\n    }\n  },\n  aboutXMonths: {\n    standalone: {\n      one: 'etwa 1 Monat',\n      other: 'etwa {{count}} Monate'\n    },\n    withPreposition: {\n      one: 'etwa 1 Monat',\n      other: 'etwa {{count}} Monaten'\n    }\n  },\n  xMonths: {\n    standalone: {\n      one: '1 Monat',\n      other: '{{count}} Monate'\n    },\n    withPreposition: {\n      one: '1 Monat',\n      other: '{{count}} Monaten'\n    }\n  },\n  aboutXYears: {\n    standalone: {\n      one: 'etwa 1 Jahr',\n      other: 'etwa {{count}} Jahre'\n    },\n    withPreposition: {\n      one: 'etwa 1 Jahr',\n      other: 'etwa {{count}} Jahren'\n    }\n  },\n  xYears: {\n    standalone: {\n      one: '1 Jahr',\n      other: '{{count}} Jahre'\n    },\n    withPreposition: {\n      one: '1 Jahr',\n      other: '{{count}} Jahren'\n    }\n  },\n  overXYears: {\n    standalone: {\n      one: 'mehr als 1 Jahr',\n      other: 'mehr als {{count}} Jahre'\n    },\n    withPreposition: {\n      one: 'mehr als 1 Jahr',\n      other: 'mehr als {{count}} Jahren'\n    }\n  },\n  almostXYears: {\n    standalone: {\n      one: 'fast 1 Jahr',\n      other: 'fast {{count}} Jahre'\n    },\n    withPreposition: {\n      one: 'fast 1 Jahr',\n      other: 'fast {{count}} Jahren'\n    }\n  }\n};\nvar formatDistance = function formatDistance(token, count, options) {\n  var result;\n  var tokenValue = options !== null && options !== void 0 && options.addSuffix ? formatDistanceLocale[token].withPreposition : formatDistanceLocale[token].standalone;\n  if (typeof tokenValue === 'string') {\n    result = tokenValue;\n  } else if (count === 1) {\n    result = tokenValue.one;\n  } else {\n    result = tokenValue.other.replace('{{count}}', String(count));\n  }\n  if (options !== null && options !== void 0 && options.addSuffix) {\n    if (options.comparison && options.comparison > 0) {\n      return 'in ' + result;\n    } else {\n      return 'vor ' + result;\n    }\n  }\n  return result;\n};\nexport default formatDistance;","import buildFormatLongFn from \"../../../_lib/buildFormatLongFn/index.js\";\n// DIN 5008: https://de.wikipedia.org/wiki/Datumsformat#DIN_5008\nvar dateFormats = {\n  full: 'EEEE, do MMMM y',\n  // Montag, 7. Januar 2018\n  long: 'do MMMM y',\n  // 7. Januar 2018\n  medium: 'do MMM y',\n  // 7. Jan. 2018\n  short: 'dd.MM.y' // 07.01.2018\n};\nvar timeFormats = {\n  full: 'HH:mm:ss zzzz',\n  long: 'HH:mm:ss z',\n  medium: 'HH:mm:ss',\n  short: 'HH:mm'\n};\nvar dateTimeFormats = {\n  full: \"{{date}} 'um' {{time}}\",\n  long: \"{{date}} 'um' {{time}}\",\n  medium: '{{date}} {{time}}',\n  short: '{{date}} {{time}}'\n};\nvar formatLong = {\n  date: buildFormatLongFn({\n    formats: dateFormats,\n    defaultWidth: 'full'\n  }),\n  time: buildFormatLongFn({\n    formats: timeFormats,\n    defaultWidth: 'full'\n  }),\n  dateTime: buildFormatLongFn({\n    formats: dateTimeFormats,\n    defaultWidth: 'full'\n  })\n};\nexport default formatLong;","var formatRelativeLocale = {\n  lastWeek: \"'letzten' eeee 'um' p\",\n  yesterday: \"'gestern um' p\",\n  today: \"'heute um' p\",\n  tomorrow: \"'morgen um' p\",\n  nextWeek: \"eeee 'um' p\",\n  other: 'P'\n};\nvar formatRelative = function formatRelative(token, _date, _baseDate, _options) {\n  return formatRelativeLocale[token];\n};\nexport default formatRelative;","import buildLocalizeFn from \"../../../_lib/buildLocalizeFn/index.js\";\nvar eraValues = {\n  narrow: ['v.Chr.', 'n.Chr.'],\n  abbreviated: ['v.Chr.', 'n.Chr.'],\n  wide: ['vor Christus', 'nach Christus']\n};\nvar quarterValues = {\n  narrow: ['1', '2', '3', '4'],\n  abbreviated: ['Q1', 'Q2', 'Q3', 'Q4'],\n  wide: ['1. Quartal', '2. Quartal', '3. Quartal', '4. Quartal']\n};\n\n// Note: in German, the names of days of the week and months are capitalized.\n// If you are making a new locale based on this one, check if the same is true for the language you're working on.\n// Generally, formatted dates should look like they are in the middle of a sentence,\n// e.g. in Spanish language the weekdays and months should be in the lowercase.\nvar monthValues = {\n  narrow: ['J', 'F', 'M', 'A', 'M', 'J', 'J', 'A', 'S', 'O', 'N', 'D'],\n  abbreviated: ['Jan', 'Feb', 'Mär', 'Apr', 'Mai', 'Jun', 'Jul', 'Aug', 'Sep', 'Okt', 'Nov', 'Dez'],\n  wide: ['Januar', 'Februar', 'März', 'April', 'Mai', 'Juni', 'Juli', 'August', 'September', 'Oktober', 'November', 'Dezember']\n};\n\n// https://st.unicode.org/cldr-apps/v#/de/Gregorian/\nvar formattingMonthValues = {\n  narrow: monthValues.narrow,\n  abbreviated: ['Jan.', 'Feb.', 'März', 'Apr.', 'Mai', 'Juni', 'Juli', 'Aug.', 'Sep.', 'Okt.', 'Nov.', 'Dez.'],\n  wide: monthValues.wide\n};\nvar dayValues = {\n  narrow: ['S', 'M', 'D', 'M', 'D', 'F', 'S'],\n  short: ['So', 'Mo', 'Di', 'Mi', 'Do', 'Fr', 'Sa'],\n  abbreviated: ['So.', 'Mo.', 'Di.', 'Mi.', 'Do.', 'Fr.', 'Sa.'],\n  wide: ['Sonntag', 'Montag', 'Dienstag', 'Mittwoch', 'Donnerstag', 'Freitag', 'Samstag']\n};\n\n// https://www.unicode.org/cldr/charts/32/summary/de.html#1881\nvar dayPeriodValues = {\n  narrow: {\n    am: 'vm.',\n    pm: 'nm.',\n    midnight: 'Mitternacht',\n    noon: 'Mittag',\n    morning: 'Morgen',\n    afternoon: 'Nachm.',\n    evening: 'Abend',\n    night: 'Nacht'\n  },\n  abbreviated: {\n    am: 'vorm.',\n    pm: 'nachm.',\n    midnight: 'Mitternacht',\n    noon: 'Mittag',\n    morning: 'Morgen',\n    afternoon: 'Nachmittag',\n    evening: 'Abend',\n    night: 'Nacht'\n  },\n  wide: {\n    am: 'vormittags',\n    pm: 'nachmittags',\n    midnight: 'Mitternacht',\n    noon: 'Mittag',\n    morning: 'Morgen',\n    afternoon: 'Nachmittag',\n    evening: 'Abend',\n    night: 'Nacht'\n  }\n};\nvar formattingDayPeriodValues = {\n  narrow: {\n    am: 'vm.',\n    pm: 'nm.',\n    midnight: 'Mitternacht',\n    noon: 'Mittag',\n    morning: 'morgens',\n    afternoon: 'nachm.',\n    evening: 'abends',\n    night: 'nachts'\n  },\n  abbreviated: {\n    am: 'vorm.',\n    pm: 'nachm.',\n    midnight: 'Mitternacht',\n    noon: 'Mittag',\n    morning: 'morgens',\n    afternoon: 'nachmittags',\n    evening: 'abends',\n    night: 'nachts'\n  },\n  wide: {\n    am: 'vormittags',\n    pm: 'nachmittags',\n    midnight: 'Mitternacht',\n    noon: 'Mittag',\n    morning: 'morgens',\n    afternoon: 'nachmittags',\n    evening: 'abends',\n    night: 'nachts'\n  }\n};\nvar ordinalNumber = function ordinalNumber(dirtyNumber) {\n  var number = Number(dirtyNumber);\n  return number + '.';\n};\nvar localize = {\n  ordinalNumber: ordinalNumber,\n  era: buildLocalizeFn({\n    values: eraValues,\n    defaultWidth: 'wide'\n  }),\n  quarter: buildLocalizeFn({\n    values: quarterValues,\n    defaultWidth: 'wide',\n    argumentCallback: function argumentCallback(quarter) {\n      return quarter - 1;\n    }\n  }),\n  month: buildLocalizeFn({\n    values: monthValues,\n    formattingValues: formattingMonthValues,\n    defaultWidth: 'wide'\n  }),\n  day: buildLocalizeFn({\n    values: dayValues,\n    defaultWidth: 'wide'\n  }),\n  dayPeriod: buildLocalizeFn({\n    values: dayPeriodValues,\n    defaultWidth: 'wide',\n    formattingValues: formattingDayPeriodValues,\n    defaultFormattingWidth: 'wide'\n  })\n};\nexport default localize;","import buildMatchFn from \"../../../_lib/buildMatchFn/index.js\";\nimport buildMatchPatternFn from \"../../../_lib/buildMatchPatternFn/index.js\";\nvar matchOrdinalNumberPattern = /^(\\d+)(\\.)?/i;\nvar parseOrdinalNumberPattern = /\\d+/i;\nvar matchEraPatterns = {\n  narrow: /^(v\\.? ?Chr\\.?|n\\.? ?Chr\\.?)/i,\n  abbreviated: /^(v\\.? ?Chr\\.?|n\\.? ?Chr\\.?)/i,\n  wide: /^(vor Christus|vor unserer Zeitrechnung|nach Christus|unserer Zeitrechnung)/i\n};\nvar parseEraPatterns = {\n  any: [/^v/i, /^n/i]\n};\nvar matchQuarterPatterns = {\n  narrow: /^[1234]/i,\n  abbreviated: /^q[1234]/i,\n  wide: /^[1234](\\.)? Quartal/i\n};\nvar parseQuarterPatterns = {\n  any: [/1/i, /2/i, /3/i, /4/i]\n};\nvar matchMonthPatterns = {\n  narrow: /^[jfmasond]/i,\n  abbreviated: /^(j[aä]n|feb|mär[z]?|apr|mai|jun[i]?|jul[i]?|aug|sep|okt|nov|dez)\\.?/i,\n  wide: /^(januar|februar|märz|april|mai|juni|juli|august|september|oktober|november|dezember)/i\n};\nvar parseMonthPatterns = {\n  narrow: [/^j/i, /^f/i, /^m/i, /^a/i, /^m/i, /^j/i, /^j/i, /^a/i, /^s/i, /^o/i, /^n/i, /^d/i],\n  any: [/^j[aä]/i, /^f/i, /^mär/i, /^ap/i, /^mai/i, /^jun/i, /^jul/i, /^au/i, /^s/i, /^o/i, /^n/i, /^d/i]\n};\nvar matchDayPatterns = {\n  narrow: /^[smdmf]/i,\n  short: /^(so|mo|di|mi|do|fr|sa)/i,\n  abbreviated: /^(son?|mon?|die?|mit?|don?|fre?|sam?)\\.?/i,\n  wide: /^(sonntag|montag|dienstag|mittwoch|donnerstag|freitag|samstag)/i\n};\nvar parseDayPatterns = {\n  any: [/^so/i, /^mo/i, /^di/i, /^mi/i, /^do/i, /^f/i, /^sa/i]\n};\nvar matchDayPeriodPatterns = {\n  narrow: /^(vm\\.?|nm\\.?|Mitternacht|Mittag|morgens|nachm\\.?|abends|nachts)/i,\n  abbreviated: /^(vorm\\.?|nachm\\.?|Mitternacht|Mittag|morgens|nachm\\.?|abends|nachts)/i,\n  wide: /^(vormittags|nachmittags|Mitternacht|Mittag|morgens|nachmittags|abends|nachts)/i\n};\nvar parseDayPeriodPatterns = {\n  any: {\n    am: /^v/i,\n    pm: /^n/i,\n    midnight: /^Mitte/i,\n    noon: /^Mitta/i,\n    morning: /morgens/i,\n    afternoon: /nachmittags/i,\n    // will never be matched. Afternoon is matched by `pm`\n    evening: /abends/i,\n    night: /nachts/i // will never be matched. Night is matched by `pm`\n  }\n};\nvar match = {\n  ordinalNumber: buildMatchPatternFn({\n    matchPattern: matchOrdinalNumberPattern,\n    parsePattern: parseOrdinalNumberPattern,\n    valueCallback: function valueCallback(value) {\n      return parseInt(value);\n    }\n  }),\n  era: buildMatchFn({\n    matchPatterns: matchEraPatterns,\n    defaultMatchWidth: 'wide',\n    parsePatterns: parseEraPatterns,\n    defaultParseWidth: 'any'\n  }),\n  quarter: buildMatchFn({\n    matchPatterns: matchQuarterPatterns,\n    defaultMatchWidth: 'wide',\n    parsePatterns: parseQuarterPatterns,\n    defaultParseWidth: 'any',\n    valueCallback: function valueCallback(index) {\n      return index + 1;\n    }\n  }),\n  month: buildMatchFn({\n    matchPatterns: matchMonthPatterns,\n    defaultMatchWidth: 'wide',\n    parsePatterns: parseMonthPatterns,\n    defaultParseWidth: 'any'\n  }),\n  day: buildMatchFn({\n    matchPatterns: matchDayPatterns,\n    defaultMatchWidth: 'wide',\n    parsePatterns: parseDayPatterns,\n    defaultParseWidth: 'any'\n  }),\n  dayPeriod: buildMatchFn({\n    matchPatterns: matchDayPeriodPatterns,\n    defaultMatchWidth: 'wide',\n    parsePatterns: parseDayPeriodPatterns,\n    defaultParseWidth: 'any'\n  })\n};\nexport default match;","import formatDistance from \"./_lib/formatDistance/index.js\";\nimport formatLong from \"./_lib/formatLong/index.js\";\nimport formatRelative from \"./_lib/formatRelative/index.js\";\nimport localize from \"./_lib/localize/index.js\";\nimport match from \"./_lib/match/index.js\";\n/**\n * @type {Locale}\n * @category Locales\n * @summary German locale.\n * @language German\n * @iso-639-2 deu\n * @author Thomas Eilmsteiner [@DeMuu]{@link https://github.com/DeMuu}\n * @author Asia [@asia-t]{@link https://github.com/asia-t}\n * @author Van Vuong Ngo [@vanvuongngo]{@link https://github.com/vanvuongngo}\n * @author RomanErnst [@pex]{@link https://github.com/pex}\n * @author Philipp Keck [@Philipp91]{@link https://github.com/Philipp91}\n */\nvar locale = {\n  code: 'de',\n  formatDistance: formatDistance,\n  formatLong: formatLong,\n  formatRelative: formatRelative,\n  localize: localize,\n  match: match,\n  options: {\n    weekStartsOn: 1 /* Monday */,\n    firstWeekContainsDate: 4\n  }\n};\nexport default locale;","var formatDistanceLocale = {\n  lessThanXSeconds: {\n    one: 'less than a second',\n    other: 'less than {{count}} seconds'\n  },\n  xSeconds: {\n    one: 'a second',\n    other: '{{count}} seconds'\n  },\n  halfAMinute: 'half a minute',\n  lessThanXMinutes: {\n    one: 'less than a minute',\n    other: 'less than {{count}} minutes'\n  },\n  xMinutes: {\n    one: 'a minute',\n    other: '{{count}} minutes'\n  },\n  aboutXHours: {\n    one: 'about an hour',\n    other: 'about {{count}} hours'\n  },\n  xHours: {\n    one: 'an hour',\n    other: '{{count}} hours'\n  },\n  xDays: {\n    one: 'a day',\n    other: '{{count}} days'\n  },\n  aboutXWeeks: {\n    one: 'about a week',\n    other: 'about {{count}} weeks'\n  },\n  xWeeks: {\n    one: 'a week',\n    other: '{{count}} weeks'\n  },\n  aboutXMonths: {\n    one: 'about a month',\n    other: 'about {{count}} months'\n  },\n  xMonths: {\n    one: 'a month',\n    other: '{{count}} months'\n  },\n  aboutXYears: {\n    one: 'about a year',\n    other: 'about {{count}} years'\n  },\n  xYears: {\n    one: 'a year',\n    other: '{{count}} years'\n  },\n  overXYears: {\n    one: 'over a year',\n    other: 'over {{count}} years'\n  },\n  almostXYears: {\n    one: 'almost a year',\n    other: 'almost {{count}} years'\n  }\n};\nvar formatDistance = function formatDistance(token, count, options) {\n  var result;\n  var tokenValue = formatDistanceLocale[token];\n  if (typeof tokenValue === 'string') {\n    result = tokenValue;\n  } else if (count === 1) {\n    result = tokenValue.one;\n  } else {\n    result = tokenValue.other.replace('{{count}}', count.toString());\n  }\n  if (options !== null && options !== void 0 && options.addSuffix) {\n    if (options.comparison && options.comparison > 0) {\n      return 'in ' + result;\n    } else {\n      return result + ' ago';\n    }\n  }\n  return result;\n};\nexport default formatDistance;","import buildFormatLongFn from \"../../../_lib/buildFormatLongFn/index.js\";\nvar dateFormats = {\n  full: 'EEEE, MMMM do, yyyy',\n  long: 'MMMM do, yyyy',\n  medium: 'MMM d, yyyy',\n  short: 'yyyy-MM-dd'\n};\nvar timeFormats = {\n  full: 'h:mm:ss a zzzz',\n  long: 'h:mm:ss a z',\n  medium: 'h:mm:ss a',\n  short: 'h:mm a'\n};\nvar dateTimeFormats = {\n  full: \"{{date}} 'at' {{time}}\",\n  long: \"{{date}} 'at' {{time}}\",\n  medium: '{{date}}, {{time}}',\n  short: '{{date}}, {{time}}'\n};\nvar formatLong = {\n  date: buildFormatLongFn({\n    formats: dateFormats,\n    defaultWidth: 'full'\n  }),\n  time: buildFormatLongFn({\n    formats: timeFormats,\n    defaultWidth: 'full'\n  }),\n  dateTime: buildFormatLongFn({\n    formats: dateTimeFormats,\n    defaultWidth: 'full'\n  })\n};\nexport default formatLong;","import formatRelative from \"../en-US/_lib/formatRelative/index.js\";\nimport localize from \"../en-US/_lib/localize/index.js\";\nimport match from \"../en-US/_lib/match/index.js\";\nimport formatDistance from \"./_lib/formatDistance/index.js\";\nimport formatLong from \"./_lib/formatLong/index.js\";\n/**\n * @type {Locale}\n * @category Locales\n * @summary English locale (Canada).\n * @language English\n * @iso-639-2 eng\n * @author Mark Owsiak [@markowsiak]{@link https://github.com/markowsiak}\n * @author Marco Imperatore [@mimperatore]{@link https://github.com/mimperatore}\n */\nvar locale = {\n  code: 'en-CA',\n  formatDistance: formatDistance,\n  formatLong: formatLong,\n  formatRelative: formatRelative,\n  localize: localize,\n  match: match,\n  options: {\n    weekStartsOn: 0 /* Sunday */,\n    firstWeekContainsDate: 1\n  }\n};\nexport default locale;","var formatDistanceLocale = {\n  lessThanXSeconds: {\n    one: 'menos de un segundo',\n    other: 'menos de {{count}} segundos'\n  },\n  xSeconds: {\n    one: '1 segundo',\n    other: '{{count}} segundos'\n  },\n  halfAMinute: 'medio minuto',\n  lessThanXMinutes: {\n    one: 'menos de un minuto',\n    other: 'menos de {{count}} minutos'\n  },\n  xMinutes: {\n    one: '1 minuto',\n    other: '{{count}} minutos'\n  },\n  aboutXHours: {\n    one: 'alrededor de 1 hora',\n    other: 'alrededor de {{count}} horas'\n  },\n  xHours: {\n    one: '1 hora',\n    other: '{{count}} horas'\n  },\n  xDays: {\n    one: '1 día',\n    other: '{{count}} días'\n  },\n  aboutXWeeks: {\n    one: 'alrededor de 1 semana',\n    other: 'alrededor de {{count}} semanas'\n  },\n  xWeeks: {\n    one: '1 semana',\n    other: '{{count}} semanas'\n  },\n  aboutXMonths: {\n    one: 'alrededor de 1 mes',\n    other: 'alrededor de {{count}} meses'\n  },\n  xMonths: {\n    one: '1 mes',\n    other: '{{count}} meses'\n  },\n  aboutXYears: {\n    one: 'alrededor de 1 año',\n    other: 'alrededor de {{count}} años'\n  },\n  xYears: {\n    one: '1 año',\n    other: '{{count}} años'\n  },\n  overXYears: {\n    one: 'más de 1 año',\n    other: 'más de {{count}} años'\n  },\n  almostXYears: {\n    one: 'casi 1 año',\n    other: 'casi {{count}} años'\n  }\n};\nvar formatDistance = function formatDistance(token, count, options) {\n  var result;\n  var tokenValue = formatDistanceLocale[token];\n  if (typeof tokenValue === 'string') {\n    result = tokenValue;\n  } else if (count === 1) {\n    result = tokenValue.one;\n  } else {\n    result = tokenValue.other.replace('{{count}}', count.toString());\n  }\n  if (options !== null && options !== void 0 && options.addSuffix) {\n    if (options.comparison && options.comparison > 0) {\n      return 'en ' + result;\n    } else {\n      return 'hace ' + result;\n    }\n  }\n  return result;\n};\nexport default formatDistance;","import buildFormatLongFn from \"../../../_lib/buildFormatLongFn/index.js\";\nvar dateFormats = {\n  full: \"EEEE, d 'de' MMMM 'de' y\",\n  long: \"d 'de' MMMM 'de' y\",\n  medium: 'd MMM y',\n  short: 'dd/MM/y'\n};\nvar timeFormats = {\n  full: 'HH:mm:ss zzzz',\n  long: 'HH:mm:ss z',\n  medium: 'HH:mm:ss',\n  short: 'HH:mm'\n};\nvar dateTimeFormats = {\n  full: \"{{date}} 'a las' {{time}}\",\n  long: \"{{date}} 'a las' {{time}}\",\n  medium: '{{date}}, {{time}}',\n  short: '{{date}}, {{time}}'\n};\nvar formatLong = {\n  date: buildFormatLongFn({\n    formats: dateFormats,\n    defaultWidth: 'full'\n  }),\n  time: buildFormatLongFn({\n    formats: timeFormats,\n    defaultWidth: 'full'\n  }),\n  dateTime: buildFormatLongFn({\n    formats: dateTimeFormats,\n    defaultWidth: 'full'\n  })\n};\nexport default formatLong;","var formatRelativeLocale = {\n  lastWeek: \"'el' eeee 'pasado a la' p\",\n  yesterday: \"'ayer a la' p\",\n  today: \"'hoy a la' p\",\n  tomorrow: \"'mañana a la' p\",\n  nextWeek: \"eeee 'a la' p\",\n  other: 'P'\n};\nvar formatRelativeLocalePlural = {\n  lastWeek: \"'el' eeee 'pasado a las' p\",\n  yesterday: \"'ayer a las' p\",\n  today: \"'hoy a las' p\",\n  tomorrow: \"'mañana a las' p\",\n  nextWeek: \"eeee 'a las' p\",\n  other: 'P'\n};\nvar formatRelative = function formatRelative(token, date, _baseDate, _options) {\n  if (date.getUTCHours() !== 1) {\n    return formatRelativeLocalePlural[token];\n  } else {\n    return formatRelativeLocale[token];\n  }\n};\nexport default formatRelative;","import buildLocalizeFn from \"../../../_lib/buildLocalizeFn/index.js\";\nvar eraValues = {\n  narrow: ['AC', 'DC'],\n  abbreviated: ['AC', 'DC'],\n  wide: ['antes de cristo', 'después de cristo']\n};\nvar quarterValues = {\n  narrow: ['1', '2', '3', '4'],\n  abbreviated: ['T1', 'T2', 'T3', 'T4'],\n  wide: ['1º trimestre', '2º trimestre', '3º trimestre', '4º trimestre']\n};\nvar monthValues = {\n  narrow: ['e', 'f', 'm', 'a', 'm', 'j', 'j', 'a', 's', 'o', 'n', 'd'],\n  abbreviated: ['ene', 'feb', 'mar', 'abr', 'may', 'jun', 'jul', 'ago', 'sep', 'oct', 'nov', 'dic'],\n  wide: ['enero', 'febrero', 'marzo', 'abril', 'mayo', 'junio', 'julio', 'agosto', 'septiembre', 'octubre', 'noviembre', 'diciembre']\n};\nvar dayValues = {\n  narrow: ['d', 'l', 'm', 'm', 'j', 'v', 's'],\n  short: ['do', 'lu', 'ma', 'mi', 'ju', 'vi', 'sá'],\n  abbreviated: ['dom', 'lun', 'mar', 'mié', 'jue', 'vie', 'sáb'],\n  wide: ['domingo', 'lunes', 'martes', 'miércoles', 'jueves', 'viernes', 'sábado']\n};\nvar dayPeriodValues = {\n  narrow: {\n    am: 'a',\n    pm: 'p',\n    midnight: 'mn',\n    noon: 'md',\n    morning: 'mañana',\n    afternoon: 'tarde',\n    evening: 'tarde',\n    night: 'noche'\n  },\n  abbreviated: {\n    am: 'AM',\n    pm: 'PM',\n    midnight: 'medianoche',\n    noon: 'mediodia',\n    morning: 'mañana',\n    afternoon: 'tarde',\n    evening: 'tarde',\n    night: 'noche'\n  },\n  wide: {\n    am: 'a.m.',\n    pm: 'p.m.',\n    midnight: 'medianoche',\n    noon: 'mediodia',\n    morning: 'mañana',\n    afternoon: 'tarde',\n    evening: 'tarde',\n    night: 'noche'\n  }\n};\nvar formattingDayPeriodValues = {\n  narrow: {\n    am: 'a',\n    pm: 'p',\n    midnight: 'mn',\n    noon: 'md',\n    morning: 'de la mañana',\n    afternoon: 'de la tarde',\n    evening: 'de la tarde',\n    night: 'de la noche'\n  },\n  abbreviated: {\n    am: 'AM',\n    pm: 'PM',\n    midnight: 'medianoche',\n    noon: 'mediodia',\n    morning: 'de la mañana',\n    afternoon: 'de la tarde',\n    evening: 'de la tarde',\n    night: 'de la noche'\n  },\n  wide: {\n    am: 'a.m.',\n    pm: 'p.m.',\n    midnight: 'medianoche',\n    noon: 'mediodia',\n    morning: 'de la mañana',\n    afternoon: 'de la tarde',\n    evening: 'de la tarde',\n    night: 'de la noche'\n  }\n};\nvar ordinalNumber = function ordinalNumber(dirtyNumber, _options) {\n  var number = Number(dirtyNumber);\n  return number + 'º';\n};\nvar localize = {\n  ordinalNumber: ordinalNumber,\n  era: buildLocalizeFn({\n    values: eraValues,\n    defaultWidth: 'wide'\n  }),\n  quarter: buildLocalizeFn({\n    values: quarterValues,\n    defaultWidth: 'wide',\n    argumentCallback: function argumentCallback(quarter) {\n      return Number(quarter) - 1;\n    }\n  }),\n  month: buildLocalizeFn({\n    values: monthValues,\n    defaultWidth: 'wide'\n  }),\n  day: buildLocalizeFn({\n    values: dayValues,\n    defaultWidth: 'wide'\n  }),\n  dayPeriod: buildLocalizeFn({\n    values: dayPeriodValues,\n    defaultWidth: 'wide',\n    formattingValues: formattingDayPeriodValues,\n    defaultFormattingWidth: 'wide'\n  })\n};\nexport default localize;","import buildMatchPatternFn from \"../../../_lib/buildMatchPatternFn/index.js\";\nimport buildMatchFn from \"../../../_lib/buildMatchFn/index.js\";\nvar matchOrdinalNumberPattern = /^(\\d+)(º)?/i;\nvar parseOrdinalNumberPattern = /\\d+/i;\nvar matchEraPatterns = {\n  narrow: /^(ac|dc|a|d)/i,\n  abbreviated: /^(a\\.?\\s?c\\.?|a\\.?\\s?e\\.?\\s?c\\.?|d\\.?\\s?c\\.?|e\\.?\\s?c\\.?)/i,\n  wide: /^(antes de cristo|antes de la era com[uú]n|despu[eé]s de cristo|era com[uú]n)/i\n};\nvar parseEraPatterns = {\n  any: [/^ac/i, /^dc/i],\n  wide: [/^(antes de cristo|antes de la era com[uú]n)/i, /^(despu[eé]s de cristo|era com[uú]n)/i]\n};\nvar matchQuarterPatterns = {\n  narrow: /^[1234]/i,\n  abbreviated: /^T[1234]/i,\n  wide: /^[1234](º)? trimestre/i\n};\nvar parseQuarterPatterns = {\n  any: [/1/i, /2/i, /3/i, /4/i]\n};\nvar matchMonthPatterns = {\n  narrow: /^[efmajsond]/i,\n  abbreviated: /^(ene|feb|mar|abr|may|jun|jul|ago|sep|oct|nov|dic)/i,\n  wide: /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i\n};\nvar parseMonthPatterns = {\n  narrow: [/^e/i, /^f/i, /^m/i, /^a/i, /^m/i, /^j/i, /^j/i, /^a/i, /^s/i, /^o/i, /^n/i, /^d/i],\n  any: [/^en/i, /^feb/i, /^mar/i, /^abr/i, /^may/i, /^jun/i, /^jul/i, /^ago/i, /^sep/i, /^oct/i, /^nov/i, /^dic/i]\n};\nvar matchDayPatterns = {\n  narrow: /^[dlmjvs]/i,\n  short: /^(do|lu|ma|mi|ju|vi|s[áa])/i,\n  abbreviated: /^(dom|lun|mar|mi[ée]|jue|vie|s[áa]b)/i,\n  wide: /^(domingo|lunes|martes|mi[ée]rcoles|jueves|viernes|s[áa]bado)/i\n};\nvar parseDayPatterns = {\n  narrow: [/^d/i, /^l/i, /^m/i, /^m/i, /^j/i, /^v/i, /^s/i],\n  any: [/^do/i, /^lu/i, /^ma/i, /^mi/i, /^ju/i, /^vi/i, /^sa/i]\n};\nvar matchDayPeriodPatterns = {\n  narrow: /^(a|p|mn|md|(de la|a las) (mañana|tarde|noche))/i,\n  any: /^([ap]\\.?\\s?m\\.?|medianoche|mediodia|(de la|a las) (mañana|tarde|noche))/i\n};\nvar parseDayPeriodPatterns = {\n  any: {\n    am: /^a/i,\n    pm: /^p/i,\n    midnight: /^mn/i,\n    noon: /^md/i,\n    morning: /mañana/i,\n    afternoon: /tarde/i,\n    evening: /tarde/i,\n    night: /noche/i\n  }\n};\nvar match = {\n  ordinalNumber: buildMatchPatternFn({\n    matchPattern: matchOrdinalNumberPattern,\n    parsePattern: parseOrdinalNumberPattern,\n    valueCallback: function valueCallback(value) {\n      return parseInt(value, 10);\n    }\n  }),\n  era: buildMatchFn({\n    matchPatterns: matchEraPatterns,\n    defaultMatchWidth: 'wide',\n    parsePatterns: parseEraPatterns,\n    defaultParseWidth: 'any'\n  }),\n  quarter: buildMatchFn({\n    matchPatterns: matchQuarterPatterns,\n    defaultMatchWidth: 'wide',\n    parsePatterns: parseQuarterPatterns,\n    defaultParseWidth: 'any',\n    valueCallback: function valueCallback(index) {\n      return index + 1;\n    }\n  }),\n  month: buildMatchFn({\n    matchPatterns: matchMonthPatterns,\n    defaultMatchWidth: 'wide',\n    parsePatterns: parseMonthPatterns,\n    defaultParseWidth: 'any'\n  }),\n  day: buildMatchFn({\n    matchPatterns: matchDayPatterns,\n    defaultMatchWidth: 'wide',\n    parsePatterns: parseDayPatterns,\n    defaultParseWidth: 'any'\n  }),\n  dayPeriod: buildMatchFn({\n    matchPatterns: matchDayPeriodPatterns,\n    defaultMatchWidth: 'any',\n    parsePatterns: parseDayPeriodPatterns,\n    defaultParseWidth: 'any'\n  })\n};\nexport default match;","import formatDistance from \"./_lib/formatDistance/index.js\";\nimport formatLong from \"./_lib/formatLong/index.js\";\nimport formatRelative from \"./_lib/formatRelative/index.js\";\nimport localize from \"./_lib/localize/index.js\";\nimport match from \"./_lib/match/index.js\";\n/**\n * @type {Locale}\n * @category Locales\n * @summary Spanish locale.\n * @language Spanish\n * @iso-639-2 spa\n * @author Juan Angosto [@juanangosto]{@link https://github.com/juanangosto}\n * @author Guillermo Grau [@guigrpa]{@link https://github.com/guigrpa}\n * @author Fernando Agüero [@fjaguero]{@link https://github.com/fjaguero}\n * @author Gastón Haro [@harogaston]{@link https://github.com/harogaston}\n * @author Yago Carballo [@YagoCarballo]{@link https://github.com/YagoCarballo}\n */\nvar locale = {\n  code: 'es',\n  formatDistance: formatDistance,\n  formatLong: formatLong,\n  formatRelative: formatRelative,\n  localize: localize,\n  match: match,\n  options: {\n    weekStartsOn: 1 /* Monday */,\n    firstWeekContainsDate: 1\n  }\n};\nexport default locale;","var formatDistanceLocale = {\n  lessThanXSeconds: {\n    one: 'moins d’une seconde',\n    other: 'moins de {{count}} secondes'\n  },\n  xSeconds: {\n    one: '1 seconde',\n    other: '{{count}} secondes'\n  },\n  halfAMinute: '30 secondes',\n  lessThanXMinutes: {\n    one: 'moins d’une minute',\n    other: 'moins de {{count}} minutes'\n  },\n  xMinutes: {\n    one: '1 minute',\n    other: '{{count}} minutes'\n  },\n  aboutXHours: {\n    one: 'environ 1 heure',\n    other: 'environ {{count}} heures'\n  },\n  xHours: {\n    one: '1 heure',\n    other: '{{count}} heures'\n  },\n  xDays: {\n    one: '1 jour',\n    other: '{{count}} jours'\n  },\n  aboutXWeeks: {\n    one: 'environ 1 semaine',\n    other: 'environ {{count}} semaines'\n  },\n  xWeeks: {\n    one: '1 semaine',\n    other: '{{count}} semaines'\n  },\n  aboutXMonths: {\n    one: 'environ 1 mois',\n    other: 'environ {{count}} mois'\n  },\n  xMonths: {\n    one: '1 mois',\n    other: '{{count}} mois'\n  },\n  aboutXYears: {\n    one: 'environ 1 an',\n    other: 'environ {{count}} ans'\n  },\n  xYears: {\n    one: '1 an',\n    other: '{{count}} ans'\n  },\n  overXYears: {\n    one: 'plus d’un an',\n    other: 'plus de {{count}} ans'\n  },\n  almostXYears: {\n    one: 'presqu’un an',\n    other: 'presque {{count}} ans'\n  }\n};\nvar formatDistance = function formatDistance(token, count, options) {\n  var result;\n  var form = formatDistanceLocale[token];\n  if (typeof form === 'string') {\n    result = form;\n  } else if (count === 1) {\n    result = form.one;\n  } else {\n    result = form.other.replace('{{count}}', String(count));\n  }\n  if (options !== null && options !== void 0 && options.addSuffix) {\n    if (options.comparison && options.comparison > 0) {\n      return 'dans ' + result;\n    } else {\n      return 'il y a ' + result;\n    }\n  }\n  return result;\n};\nexport default formatDistance;","import buildFormatLongFn from \"../../../_lib/buildFormatLongFn/index.js\";\nvar dateFormats = {\n  full: 'EEEE d MMMM y',\n  long: 'd MMMM y',\n  medium: 'd MMM y',\n  short: 'dd/MM/y'\n};\nvar timeFormats = {\n  full: 'HH:mm:ss zzzz',\n  long: 'HH:mm:ss z',\n  medium: 'HH:mm:ss',\n  short: 'HH:mm'\n};\nvar dateTimeFormats = {\n  full: \"{{date}} 'à' {{time}}\",\n  long: \"{{date}} 'à' {{time}}\",\n  medium: '{{date}}, {{time}}',\n  short: '{{date}}, {{time}}'\n};\nvar formatLong = {\n  date: buildFormatLongFn({\n    formats: dateFormats,\n    defaultWidth: 'full'\n  }),\n  time: buildFormatLongFn({\n    formats: timeFormats,\n    defaultWidth: 'full'\n  }),\n  dateTime: buildFormatLongFn({\n    formats: dateTimeFormats,\n    defaultWidth: 'full'\n  })\n};\nexport default formatLong;","var formatRelativeLocale = {\n  lastWeek: \"eeee 'dernier à' p\",\n  yesterday: \"'hier à' p\",\n  today: \"'aujourd’hui à' p\",\n  tomorrow: \"'demain à' p'\",\n  nextWeek: \"eeee 'prochain à' p\",\n  other: 'P'\n};\nvar formatRelative = function formatRelative(token, _date, _baseDate, _options) {\n  return formatRelativeLocale[token];\n};\nexport default formatRelative;","import buildLocalizeFn from \"../../../_lib/buildLocalizeFn/index.js\";\nvar eraValues = {\n  narrow: ['av. J.-C', 'ap. J.-C'],\n  abbreviated: ['av. J.-C', 'ap. J.-C'],\n  wide: ['avant Jésus-Christ', 'après Jésus-Christ']\n};\nvar quarterValues = {\n  narrow: ['T1', 'T2', 'T3', 'T4'],\n  abbreviated: ['1er trim.', '2ème trim.', '3ème trim.', '4ème trim.'],\n  wide: ['1er trimestre', '2ème trimestre', '3ème trimestre', '4ème trimestre']\n};\nvar monthValues = {\n  narrow: ['J', 'F', 'M', 'A', 'M', 'J', 'J', 'A', 'S', 'O', 'N', 'D'],\n  abbreviated: ['janv.', 'févr.', 'mars', 'avr.', 'mai', 'juin', 'juil.', 'août', 'sept.', 'oct.', 'nov.', 'déc.'],\n  wide: ['janvier', 'février', 'mars', 'avril', 'mai', 'juin', 'juillet', 'août', 'septembre', 'octobre', 'novembre', 'décembre']\n};\nvar dayValues = {\n  narrow: ['D', 'L', 'M', 'M', 'J', 'V', 'S'],\n  short: ['di', 'lu', 'ma', 'me', 'je', 've', 'sa'],\n  abbreviated: ['dim.', 'lun.', 'mar.', 'mer.', 'jeu.', 'ven.', 'sam.'],\n  wide: ['dimanche', 'lundi', 'mardi', 'mercredi', 'jeudi', 'vendredi', 'samedi']\n};\nvar dayPeriodValues = {\n  narrow: {\n    am: 'AM',\n    pm: 'PM',\n    midnight: 'minuit',\n    noon: 'midi',\n    morning: 'mat.',\n    afternoon: 'ap.m.',\n    evening: 'soir',\n    night: 'mat.'\n  },\n  abbreviated: {\n    am: 'AM',\n    pm: 'PM',\n    midnight: 'minuit',\n    noon: 'midi',\n    morning: 'matin',\n    afternoon: 'après-midi',\n    evening: 'soir',\n    night: 'matin'\n  },\n  wide: {\n    am: 'AM',\n    pm: 'PM',\n    midnight: 'minuit',\n    noon: 'midi',\n    morning: 'du matin',\n    afternoon: 'de l’après-midi',\n    evening: 'du soir',\n    night: 'du matin'\n  }\n};\nvar ordinalNumber = function ordinalNumber(dirtyNumber, options) {\n  var number = Number(dirtyNumber);\n  var unit = options === null || options === void 0 ? void 0 : options.unit;\n  if (number === 0) return '0';\n  var feminineUnits = ['year', 'week', 'hour', 'minute', 'second'];\n  var suffix;\n  if (number === 1) {\n    suffix = unit && feminineUnits.includes(unit) ? 'ère' : 'er';\n  } else {\n    suffix = 'ème';\n  }\n  return number + suffix;\n};\nvar localize = {\n  ordinalNumber: ordinalNumber,\n  era: buildLocalizeFn({\n    values: eraValues,\n    defaultWidth: 'wide'\n  }),\n  quarter: buildLocalizeFn({\n    values: quarterValues,\n    defaultWidth: 'wide',\n    argumentCallback: function argumentCallback(quarter) {\n      return quarter - 1;\n    }\n  }),\n  month: buildLocalizeFn({\n    values: monthValues,\n    defaultWidth: 'wide'\n  }),\n  day: buildLocalizeFn({\n    values: dayValues,\n    defaultWidth: 'wide'\n  }),\n  dayPeriod: buildLocalizeFn({\n    values: dayPeriodValues,\n    defaultWidth: 'wide'\n  })\n};\nexport default localize;","import buildMatchFn from \"../../../_lib/buildMatchFn/index.js\";\nimport buildMatchPatternFn from \"../../../_lib/buildMatchPatternFn/index.js\";\nvar matchOrdinalNumberPattern = /^(\\d+)(ième|ère|ème|er|e)?/i;\nvar parseOrdinalNumberPattern = /\\d+/i;\nvar matchEraPatterns = {\n  narrow: /^(av\\.J\\.C|ap\\.J\\.C|ap\\.J\\.-C)/i,\n  abbreviated: /^(av\\.J\\.-C|av\\.J-C|apr\\.J\\.-C|apr\\.J-C|ap\\.J-C)/i,\n  wide: /^(avant Jésus-Christ|après Jésus-Christ)/i\n};\nvar parseEraPatterns = {\n  any: [/^av/i, /^ap/i]\n};\nvar matchQuarterPatterns = {\n  narrow: /^T?[1234]/i,\n  abbreviated: /^[1234](er|ème|e)? trim\\.?/i,\n  wide: /^[1234](er|ème|e)? trimestre/i\n};\nvar parseQuarterPatterns = {\n  any: [/1/i, /2/i, /3/i, /4/i]\n};\nvar matchMonthPatterns = {\n  narrow: /^[jfmasond]/i,\n  abbreviated: /^(janv|févr|mars|avr|mai|juin|juill|juil|août|sept|oct|nov|déc)\\.?/i,\n  wide: /^(janvier|février|mars|avril|mai|juin|juillet|août|septembre|octobre|novembre|décembre)/i\n};\nvar parseMonthPatterns = {\n  narrow: [/^j/i, /^f/i, /^m/i, /^a/i, /^m/i, /^j/i, /^j/i, /^a/i, /^s/i, /^o/i, /^n/i, /^d/i],\n  any: [/^ja/i, /^f/i, /^mar/i, /^av/i, /^ma/i, /^juin/i, /^juil/i, /^ao/i, /^s/i, /^o/i, /^n/i, /^d/i]\n};\nvar matchDayPatterns = {\n  narrow: /^[lmjvsd]/i,\n  short: /^(di|lu|ma|me|je|ve|sa)/i,\n  abbreviated: /^(dim|lun|mar|mer|jeu|ven|sam)\\.?/i,\n  wide: /^(dimanche|lundi|mardi|mercredi|jeudi|vendredi|samedi)/i\n};\nvar parseDayPatterns = {\n  narrow: [/^d/i, /^l/i, /^m/i, /^m/i, /^j/i, /^v/i, /^s/i],\n  any: [/^di/i, /^lu/i, /^ma/i, /^me/i, /^je/i, /^ve/i, /^sa/i]\n};\nvar matchDayPeriodPatterns = {\n  narrow: /^(a|p|minuit|midi|mat\\.?|ap\\.?m\\.?|soir|nuit)/i,\n  any: /^([ap]\\.?\\s?m\\.?|du matin|de l'après[-\\s]midi|du soir|de la nuit)/i\n};\nvar parseDayPeriodPatterns = {\n  any: {\n    am: /^a/i,\n    pm: /^p/i,\n    midnight: /^min/i,\n    noon: /^mid/i,\n    morning: /mat/i,\n    afternoon: /ap/i,\n    evening: /soir/i,\n    night: /nuit/i\n  }\n};\nvar match = {\n  ordinalNumber: buildMatchPatternFn({\n    matchPattern: matchOrdinalNumberPattern,\n    parsePattern: parseOrdinalNumberPattern,\n    valueCallback: function valueCallback(value) {\n      return parseInt(value);\n    }\n  }),\n  era: buildMatchFn({\n    matchPatterns: matchEraPatterns,\n    defaultMatchWidth: 'wide',\n    parsePatterns: parseEraPatterns,\n    defaultParseWidth: 'any'\n  }),\n  quarter: buildMatchFn({\n    matchPatterns: matchQuarterPatterns,\n    defaultMatchWidth: 'wide',\n    parsePatterns: parseQuarterPatterns,\n    defaultParseWidth: 'any',\n    valueCallback: function valueCallback(index) {\n      return index + 1;\n    }\n  }),\n  month: buildMatchFn({\n    matchPatterns: matchMonthPatterns,\n    defaultMatchWidth: 'wide',\n    parsePatterns: parseMonthPatterns,\n    defaultParseWidth: 'any'\n  }),\n  day: buildMatchFn({\n    matchPatterns: matchDayPatterns,\n    defaultMatchWidth: 'wide',\n    parsePatterns: parseDayPatterns,\n    defaultParseWidth: 'any'\n  }),\n  dayPeriod: buildMatchFn({\n    matchPatterns: matchDayPeriodPatterns,\n    defaultMatchWidth: 'any',\n    parsePatterns: parseDayPeriodPatterns,\n    defaultParseWidth: 'any'\n  })\n};\nexport default match;","import formatDistance from \"./_lib/formatDistance/index.js\";\nimport formatLong from \"./_lib/formatLong/index.js\";\nimport formatRelative from \"./_lib/formatRelative/index.js\";\nimport localize from \"./_lib/localize/index.js\";\nimport match from \"./_lib/match/index.js\";\n/**\n * @type {Locale}\n * @category Locales\n * @summary French locale.\n * @language French\n * @iso-639-2 fra\n * @author Jean Dupouy [@izeau]{@link https://github.com/izeau}\n * @author François B [@fbonzon]{@link https://github.com/fbonzon}\n */\nvar locale = {\n  code: 'fr',\n  formatDistance: formatDistance,\n  formatLong: formatLong,\n  formatRelative: formatRelative,\n  localize: localize,\n  match: match,\n  options: {\n    weekStartsOn: 1 /* Monday */,\n    firstWeekContainsDate: 4\n  }\n};\nexport default locale;","import buildFormatLongFn from \"../../../_lib/buildFormatLongFn/index.js\";\nvar dateFormats = {\n  full: 'EEEE d MMMM y',\n  long: 'd MMMM y',\n  medium: 'd MMM y',\n  short: 'yy-MM-dd'\n};\nvar timeFormats = {\n  full: 'HH:mm:ss zzzz',\n  long: 'HH:mm:ss z',\n  medium: 'HH:mm:ss',\n  short: 'HH:mm'\n};\nvar dateTimeFormats = {\n  full: \"{{date}} 'à' {{time}}\",\n  long: \"{{date}} 'à' {{time}}\",\n  medium: '{{date}}, {{time}}',\n  short: '{{date}}, {{time}}'\n};\nvar formatLong = {\n  date: buildFormatLongFn({\n    formats: dateFormats,\n    defaultWidth: 'full'\n  }),\n  time: buildFormatLongFn({\n    formats: timeFormats,\n    defaultWidth: 'full'\n  }),\n  dateTime: buildFormatLongFn({\n    formats: dateTimeFormats,\n    defaultWidth: 'full'\n  })\n};\nexport default formatLong;","// Same as fr\nimport formatDistance from \"../fr/_lib/formatDistance/index.js\";\nimport formatRelative from \"../fr/_lib/formatRelative/index.js\";\nimport localize from \"../fr/_lib/localize/index.js\";\nimport match from \"../fr/_lib/match/index.js\";\n// Unique for fr-CA\nimport formatLong from \"./_lib/formatLong/index.js\";\n/**\n * @type {Locale}\n * @category Locales\n * @summary French locale (Canada).\n * @language French\n * @iso-639-2 fra\n * @author Jean Dupouy [@izeau]{@link https://github.com/izeau}\n * @author François B [@fbonzon]{@link https://github.com/fbonzon}\n * @author Gabriele Petrioli [@gpetrioli]{@link https://github.com/gpetrioli}\n */\nvar locale = {\n  code: 'fr-CA',\n  formatDistance: formatDistance,\n  formatLong: formatLong,\n  formatRelative: formatRelative,\n  localize: localize,\n  match: match,\n  // Unique for fr-CA\n  options: {\n    weekStartsOn: 0 /* Sunday */,\n    firstWeekContainsDate: 1\n  }\n};\nexport default locale;","var formatDistanceLocale = {\n  lessThanXSeconds: {\n    one: 'minder dan een seconde',\n    other: 'minder dan {{count}} seconden'\n  },\n  xSeconds: {\n    one: '1 seconde',\n    other: '{{count}} seconden'\n  },\n  halfAMinute: 'een halve minuut',\n  lessThanXMinutes: {\n    one: 'minder dan een minuut',\n    other: 'minder dan {{count}} minuten'\n  },\n  xMinutes: {\n    one: 'een minuut',\n    other: '{{count}} minuten'\n  },\n  aboutXHours: {\n    one: 'ongeveer 1 uur',\n    other: 'ongeveer {{count}} uur'\n  },\n  xHours: {\n    one: '1 uur',\n    other: '{{count}} uur'\n  },\n  xDays: {\n    one: '1 dag',\n    other: '{{count}} dagen'\n  },\n  aboutXWeeks: {\n    one: 'ongeveer 1 week',\n    other: 'ongeveer {{count}} weken'\n  },\n  xWeeks: {\n    one: '1 week',\n    other: '{{count}} weken'\n  },\n  aboutXMonths: {\n    one: 'ongeveer 1 maand',\n    other: 'ongeveer {{count}} maanden'\n  },\n  xMonths: {\n    one: '1 maand',\n    other: '{{count}} maanden'\n  },\n  aboutXYears: {\n    one: 'ongeveer 1 jaar',\n    other: 'ongeveer {{count}} jaar'\n  },\n  xYears: {\n    one: '1 jaar',\n    other: '{{count}} jaar'\n  },\n  overXYears: {\n    one: 'meer dan 1 jaar',\n    other: 'meer dan {{count}} jaar'\n  },\n  almostXYears: {\n    one: 'bijna 1 jaar',\n    other: 'bijna {{count}} jaar'\n  }\n};\nvar formatDistance = function formatDistance(token, count, options) {\n  var result;\n  var tokenValue = formatDistanceLocale[token];\n  if (typeof tokenValue === 'string') {\n    result = tokenValue;\n  } else if (count === 1) {\n    result = tokenValue.one;\n  } else {\n    result = tokenValue.other.replace('{{count}}', String(count));\n  }\n  if (options !== null && options !== void 0 && options.addSuffix) {\n    if (options.comparison && options.comparison > 0) {\n      return 'over ' + result;\n    } else {\n      return result + ' geleden';\n    }\n  }\n  return result;\n};\nexport default formatDistance;","import buildFormatLongFn from \"../../../_lib/buildFormatLongFn/index.js\";\nvar dateFormats = {\n  full: 'EEEE d MMMM y',\n  long: 'd MMMM y',\n  medium: 'd MMM y',\n  short: 'dd-MM-y'\n};\nvar timeFormats = {\n  full: 'HH:mm:ss zzzz',\n  long: 'HH:mm:ss z',\n  medium: 'HH:mm:ss',\n  short: 'HH:mm'\n};\nvar dateTimeFormats = {\n  full: \"{{date}} 'om' {{time}}\",\n  long: \"{{date}} 'om' {{time}}\",\n  medium: '{{date}}, {{time}}',\n  short: '{{date}}, {{time}}'\n};\nvar formatLong = {\n  date: buildFormatLongFn({\n    formats: dateFormats,\n    defaultWidth: 'full'\n  }),\n  time: buildFormatLongFn({\n    formats: timeFormats,\n    defaultWidth: 'full'\n  }),\n  dateTime: buildFormatLongFn({\n    formats: dateTimeFormats,\n    defaultWidth: 'full'\n  })\n};\nexport default formatLong;","var formatRelativeLocale = {\n  lastWeek: \"'afgelopen' eeee 'om' p\",\n  yesterday: \"'gisteren om' p\",\n  today: \"'vandaag om' p\",\n  tomorrow: \"'morgen om' p\",\n  nextWeek: \"eeee 'om' p\",\n  other: 'P'\n};\nvar formatRelative = function formatRelative(token, _date, _baseDate, _options) {\n  return formatRelativeLocale[token];\n};\nexport default formatRelative;","import buildLocalizeFn from \"../../../_lib/buildLocalizeFn/index.js\";\nvar eraValues = {\n  narrow: ['v.C.', 'n.C.'],\n  abbreviated: ['v.Chr.', 'n.Chr.'],\n  wide: ['voor Christus', 'na Christus']\n};\nvar quarterValues = {\n  narrow: ['1', '2', '3', '4'],\n  abbreviated: ['K1', 'K2', 'K3', 'K4'],\n  wide: ['1e kwartaal', '2e kwartaal', '3e kwartaal', '4e kwartaal']\n};\nvar monthValues = {\n  narrow: ['J', 'F', 'M', 'A', 'M', 'J', 'J', 'A', 'S', 'O', 'N', 'D'],\n  abbreviated: ['jan.', 'feb.', 'mrt.', 'apr.', 'mei', 'jun.', 'jul.', 'aug.', 'sep.', 'okt.', 'nov.', 'dec.'],\n  wide: ['januari', 'februari', 'maart', 'april', 'mei', 'juni', 'juli', 'augustus', 'september', 'oktober', 'november', 'december']\n};\nvar dayValues = {\n  narrow: ['Z', 'M', 'D', 'W', 'D', 'V', 'Z'],\n  short: ['zo', 'ma', 'di', 'wo', 'do', 'vr', 'za'],\n  abbreviated: ['zon', 'maa', 'din', 'woe', 'don', 'vri', 'zat'],\n  wide: ['zondag', 'maandag', 'dinsdag', 'woensdag', 'donderdag', 'vrijdag', 'zaterdag']\n};\nvar dayPeriodValues = {\n  narrow: {\n    am: 'AM',\n    pm: 'PM',\n    midnight: 'middernacht',\n    noon: 'het middaguur',\n    morning: \"'s ochtends\",\n    afternoon: \"'s middags\",\n    evening: \"'s avonds\",\n    night: \"'s nachts\"\n  },\n  abbreviated: {\n    am: 'AM',\n    pm: 'PM',\n    midnight: 'middernacht',\n    noon: 'het middaguur',\n    morning: \"'s ochtends\",\n    afternoon: \"'s middags\",\n    evening: \"'s avonds\",\n    night: \"'s nachts\"\n  },\n  wide: {\n    am: 'AM',\n    pm: 'PM',\n    midnight: 'middernacht',\n    noon: 'het middaguur',\n    morning: \"'s ochtends\",\n    afternoon: \"'s middags\",\n    evening: \"'s avonds\",\n    night: \"'s nachts\"\n  }\n};\nvar ordinalNumber = function ordinalNumber(dirtyNumber, _options) {\n  var number = Number(dirtyNumber);\n  return number + 'e';\n};\nvar localize = {\n  ordinalNumber: ordinalNumber,\n  era: buildLocalizeFn({\n    values: eraValues,\n    defaultWidth: 'wide'\n  }),\n  quarter: buildLocalizeFn({\n    values: quarterValues,\n    defaultWidth: 'wide',\n    argumentCallback: function argumentCallback(quarter) {\n      return quarter - 1;\n    }\n  }),\n  month: buildLocalizeFn({\n    values: monthValues,\n    defaultWidth: 'wide'\n  }),\n  day: buildLocalizeFn({\n    values: dayValues,\n    defaultWidth: 'wide'\n  }),\n  dayPeriod: buildLocalizeFn({\n    values: dayPeriodValues,\n    defaultWidth: 'wide'\n  })\n};\nexport default localize;","import buildMatchFn from \"../../../_lib/buildMatchFn/index.js\";\nimport buildMatchPatternFn from \"../../../_lib/buildMatchPatternFn/index.js\";\nvar matchOrdinalNumberPattern = /^(\\d+)e?/i;\nvar parseOrdinalNumberPattern = /\\d+/i;\nvar matchEraPatterns = {\n  narrow: /^([vn]\\.? ?C\\.?)/,\n  abbreviated: /^([vn]\\. ?Chr\\.?)/,\n  wide: /^((voor|na) Christus)/\n};\nvar parseEraPatterns = {\n  any: [/^v/, /^n/]\n};\nvar matchQuarterPatterns = {\n  narrow: /^[1234]/i,\n  abbreviated: /^K[1234]/i,\n  wide: /^[1234]e kwartaal/i\n};\nvar parseQuarterPatterns = {\n  any: [/1/i, /2/i, /3/i, /4/i]\n};\nvar matchMonthPatterns = {\n  narrow: /^[jfmasond]/i,\n  abbreviated: /^(jan.|feb.|mrt.|apr.|mei|jun.|jul.|aug.|sep.|okt.|nov.|dec.)/i,\n  wide: /^(januari|februari|maart|april|mei|juni|juli|augustus|september|oktober|november|december)/i\n};\nvar parseMonthPatterns = {\n  narrow: [/^j/i, /^f/i, /^m/i, /^a/i, /^m/i, /^j/i, /^j/i, /^a/i, /^s/i, /^o/i, /^n/i, /^d/i],\n  any: [/^jan/i, /^feb/i, /^m(r|a)/i, /^apr/i, /^mei/i, /^jun/i, /^jul/i, /^aug/i, /^sep/i, /^okt/i, /^nov/i, /^dec/i]\n};\nvar matchDayPatterns = {\n  narrow: /^[zmdwv]/i,\n  short: /^(zo|ma|di|wo|do|vr|za)/i,\n  abbreviated: /^(zon|maa|din|woe|don|vri|zat)/i,\n  wide: /^(zondag|maandag|dinsdag|woensdag|donderdag|vrijdag|zaterdag)/i\n};\nvar parseDayPatterns = {\n  narrow: [/^z/i, /^m/i, /^d/i, /^w/i, /^d/i, /^v/i, /^z/i],\n  any: [/^zo/i, /^ma/i, /^di/i, /^wo/i, /^do/i, /^vr/i, /^za/i]\n};\nvar matchDayPeriodPatterns = {\n  any: /^(am|pm|middernacht|het middaguur|'s (ochtends|middags|avonds|nachts))/i\n};\nvar parseDayPeriodPatterns = {\n  any: {\n    am: /^am/i,\n    pm: /^pm/i,\n    midnight: /^middernacht/i,\n    noon: /^het middaguur/i,\n    morning: /ochtend/i,\n    afternoon: /middag/i,\n    evening: /avond/i,\n    night: /nacht/i\n  }\n};\nvar match = {\n  ordinalNumber: buildMatchPatternFn({\n    matchPattern: matchOrdinalNumberPattern,\n    parsePattern: parseOrdinalNumberPattern,\n    valueCallback: function valueCallback(value) {\n      return parseInt(value, 10);\n    }\n  }),\n  era: buildMatchFn({\n    matchPatterns: matchEraPatterns,\n    defaultMatchWidth: 'wide',\n    parsePatterns: parseEraPatterns,\n    defaultParseWidth: 'any'\n  }),\n  quarter: buildMatchFn({\n    matchPatterns: matchQuarterPatterns,\n    defaultMatchWidth: 'wide',\n    parsePatterns: parseQuarterPatterns,\n    defaultParseWidth: 'any',\n    valueCallback: function valueCallback(index) {\n      return index + 1;\n    }\n  }),\n  month: buildMatchFn({\n    matchPatterns: matchMonthPatterns,\n    defaultMatchWidth: 'wide',\n    parsePatterns: parseMonthPatterns,\n    defaultParseWidth: 'any'\n  }),\n  day: buildMatchFn({\n    matchPatterns: matchDayPatterns,\n    defaultMatchWidth: 'wide',\n    parsePatterns: parseDayPatterns,\n    defaultParseWidth: 'any'\n  }),\n  dayPeriod: buildMatchFn({\n    matchPatterns: matchDayPeriodPatterns,\n    defaultMatchWidth: 'any',\n    parsePatterns: parseDayPeriodPatterns,\n    defaultParseWidth: 'any'\n  })\n};\nexport default match;","import formatDistance from \"./_lib/formatDistance/index.js\";\nimport formatLong from \"./_lib/formatLong/index.js\";\nimport formatRelative from \"./_lib/formatRelative/index.js\";\nimport localize from \"./_lib/localize/index.js\";\nimport match from \"./_lib/match/index.js\";\n/**\n * @type {Locale}\n * @category Locales\n * @summary Dutch locale.\n * @language Dutch\n * @iso-639-2 nld\n * @author Jorik Tangelder [@jtangelder]{@link https://github.com/jtangelder}\n * @author Ruben Stolk [@rubenstolk]{@link https://github.com/rubenstolk}\n * @author Lode Vanhove [@bitcrumb]{@link https://github.com/bitcrumb}\n * @author Edo Rivai [@edorivai]{@link https://github.com/edorivai}\n * @author Niels Keurentjes [@curry684]{@link https://github.com/curry684}\n * @author Stefan Vermaas [@stefanvermaas]{@link https://github.com/stefanvermaas}\n */\nvar locale = {\n  code: 'nl',\n  formatDistance: formatDistance,\n  formatLong: formatLong,\n  formatRelative: formatRelative,\n  localize: localize,\n  match: match,\n  options: {\n    weekStartsOn: 1 /* Monday */,\n    firstWeekContainsDate: 4\n  }\n};\nexport default locale;","// This file is generated automatically by `scripts/build/indices.ts`. Please, don't change it.\nexport { default as af } from \"./af/index.js\";\nexport { default as ar } from \"./ar/index.js\";\nexport { default as arDZ } from \"./ar-DZ/index.js\";\nexport { default as arEG } from \"./ar-EG/index.js\";\nexport { default as arMA } from \"./ar-MA/index.js\";\nexport { default as arSA } from \"./ar-SA/index.js\";\nexport { default as arTN } from \"./ar-TN/index.js\";\nexport { default as az } from \"./az/index.js\";\nexport { default as be } from \"./be/index.js\";\nexport { default as beTarask } from \"./be-tarask/index.js\";\nexport { default as bg } from \"./bg/index.js\";\nexport { default as bn } from \"./bn/index.js\";\nexport { default as bs } from \"./bs/index.js\";\nexport { default as ca } from \"./ca/index.js\";\nexport { default as cs } from \"./cs/index.js\";\nexport { default as cy } from \"./cy/index.js\";\nexport { default as da } from \"./da/index.js\";\nexport { default as de } from \"./de/index.js\";\nexport { default as deAT } from \"./de-AT/index.js\";\nexport { default as el } from \"./el/index.js\";\nexport { default as enAU } from \"./en-AU/index.js\";\nexport { default as enCA } from \"./en-CA/index.js\";\nexport { default as enGB } from \"./en-GB/index.js\";\nexport { default as enIE } from \"./en-IE/index.js\";\nexport { default as enIN } from \"./en-IN/index.js\";\nexport { default as enNZ } from \"./en-NZ/index.js\";\nexport { default as enUS } from \"./en-US/index.js\";\nexport { default as enZA } from \"./en-ZA/index.js\";\nexport { default as eo } from \"./eo/index.js\";\nexport { default as es } from \"./es/index.js\";\nexport { default as et } from \"./et/index.js\";\nexport { default as eu } from \"./eu/index.js\";\nexport { default as faIR } from \"./fa-IR/index.js\";\nexport { default as fi } from \"./fi/index.js\";\nexport { default as fr } from \"./fr/index.js\";\nexport { default as frCA } from \"./fr-CA/index.js\";\nexport { default as frCH } from \"./fr-CH/index.js\";\nexport { default as fy } from \"./fy/index.js\";\nexport { default as gd } from \"./gd/index.js\";\nexport { default as gl } from \"./gl/index.js\";\nexport { default as gu } from \"./gu/index.js\";\nexport { default as he } from \"./he/index.js\";\nexport { default as hi } from \"./hi/index.js\";\nexport { default as hr } from \"./hr/index.js\";\nexport { default as ht } from \"./ht/index.js\";\nexport { default as hu } from \"./hu/index.js\";\nexport { default as hy } from \"./hy/index.js\";\nexport { default as id } from \"./id/index.js\";\nexport { default as is } from \"./is/index.js\";\nexport { default as it } from \"./it/index.js\";\nexport { default as itCH } from \"./it-CH/index.js\";\nexport { default as ja } from \"./ja/index.js\";\nexport { default as jaHira } from \"./ja-Hira/index.js\";\nexport { default as ka } from \"./ka/index.js\";\nexport { default as kk } from \"./kk/index.js\";\nexport { default as km } from \"./km/index.js\";\nexport { default as kn } from \"./kn/index.js\";\nexport { default as ko } from \"./ko/index.js\";\nexport { default as lb } from \"./lb/index.js\";\nexport { default as lt } from \"./lt/index.js\";\nexport { default as lv } from \"./lv/index.js\";\nexport { default as mk } from \"./mk/index.js\";\nexport { default as mn } from \"./mn/index.js\";\nexport { default as ms } from \"./ms/index.js\";\nexport { default as mt } from \"./mt/index.js\";\nexport { default as nb } from \"./nb/index.js\";\nexport { default as nl } from \"./nl/index.js\";\nexport { default as nlBE } from \"./nl-BE/index.js\";\nexport { default as nn } from \"./nn/index.js\";\nexport { default as oc } from \"./oc/index.js\";\nexport { default as pl } from \"./pl/index.js\";\nexport { default as pt } from \"./pt/index.js\";\nexport { default as ptBR } from \"./pt-BR/index.js\";\nexport { default as ro } from \"./ro/index.js\";\nexport { default as ru } from \"./ru/index.js\";\nexport { default as sk } from \"./sk/index.js\";\nexport { default as sl } from \"./sl/index.js\";\nexport { default as sq } from \"./sq/index.js\";\nexport { default as sr } from \"./sr/index.js\";\nexport { default as srLatn } from \"./sr-Latn/index.js\";\nexport { default as sv } from \"./sv/index.js\";\nexport { default as ta } from \"./ta/index.js\";\nexport { default as te } from \"./te/index.js\";\nexport { default as th } from \"./th/index.js\";\nexport { default as tr } from \"./tr/index.js\";\nexport { default as ug } from \"./ug/index.js\";\nexport { default as uk } from \"./uk/index.js\";\nexport { default as uz } from \"./uz/index.js\";\nexport { default as uzCyrl } from \"./uz-Cyrl/index.js\";\nexport { default as vi } from \"./vi/index.js\";\nexport { default as zhCN } from \"./zh-CN/index.js\";\nexport { default as zhHK } from \"./zh-HK/index.js\";\nexport { default as zhTW } from \"./zh-TW/index.js\";","import { enUS, enCA, cs, frCA, nl, fr, de, es } from 'date-fns/locale';\nimport {\n  getBrowserCultureLang,\n  getLanguageFromLocalStorage,\n} from '@vendasta/galaxy/i18n/src/browser-locale/browser-locale';\n\nexport const supportedLocales = [enUS, enCA, cs, frCA, nl, fr, de, es];\n/**\n * Based the user's preferred language from the navigator and finds the best locale match.\n * @returns {Locale} Returns a Locale that is the best match, enUs as the fallback.\n */\nexport function getLocale(): Locale {\n  const languageFromLocalStorage = getLanguageFromLocalStorage();\n  const locale = languageFromLocalStorage ? languageFromLocalStorage : getBrowserCultureLang();\n  if (locale === 'fr-FR' || locale === 'fr') {\n    return fr;\n  } else if (locale === 'fr-CA') {\n    return frCA;\n  } else if (locale === 'en-CA') {\n    return enCA;\n  } else if (locale === 'cs') {\n    return cs;\n  } else if (locale === 'nl') {\n    return nl;\n  } else if (locale === 'de') {\n    return de;\n  } else if (locale === 'es-419') {\n    return es;\n  }\n  return enUS;\n}\n\n/**\n * @param locale {string} A locale code for the locale format, typically from navigator.language (BCP-47)\n * @return { string } A locale code that is ISO 639-1 to deal missing matching locale codes between BCP-47 and ISO 639-1\n * (ISO 639-1 w/ optional two character region subtag) ex) en, en-US, en-CA, fr-CA, fr\n */\nexport const getLocaleCode = (locale?: string): string | undefined => {\n  if (!locale) {\n    return getLocale().code;\n  }\n  return locale;\n};\n","export * from './src/locale-utils';\n","// Export things like public API, and interfaces from here.\nexport * from './public_api';\n","import getSymbolFromCurrency from 'currency-symbol-map';\nimport { getCurrency } from 'locale-currency';\nimport { getLocaleCode } from '../../locale';\n\n/**\n * @param locale { string } A code for the locale format. (either BCP-47 or ISO 639-1)\n * @return { string } A locale code. (ISO 639-1 w/ optional two character region subtag) ex) en, en-US, en-CA, fr-CA, fr\n */\nexport const getCurrencyCode = (locale: string): string => {\n  if (getLocaleCode(locale) == 'cs') {\n    return getCurrency('cz');\n  }\n  return getCurrency(getLocaleCode(locale) || 'en');\n};\n\n/**\n * @param code {string } Three character currency code. (ISO 4217) ex) USD, CAD, AUS\n * @return {string} The currency symbol for the given currency code.\n */\nexport const getCurrencySymbol = (code: string): string | undefined => {\n  return getSymbolFromCurrency(code);\n};\n","export * from './src/currency-utils';\n","// Export things like public API, and interfaces from here.\nexport * from './public_api';\n","import { getCurrencySymbol } from '@vendasta/galaxy/utility/currency-utils';\nimport { getLocaleCode } from '@vendasta/galaxy/utility/locale';\nimport { Pipe, PipeTransform } from '@angular/core';\n\n@Pipe({\n  name: 'glxyCurrency',\n  standalone: false,\n})\nexport class GalaxyCurrencyPipe implements PipeTransform {\n  /**\n   * @param value {string} the numerical value that is being converted to a currency string\n   * @param currencyCode {string} Three character code to represent the currency (ISO 4217) ex) USD, CAD, AUS\n   * @param locale {string} A locale code for the locale format rules to use. (ISO 639-1 w/ optional two character region subtag) ex) en, en-US, en-CA, fr-CA, fr\n   * @returns {string} Returns a string of the localized currency value with the currency symbol for the given currency code. Includes currency code at the end if currency symbol is \"$\"\n   */\n  transform(value: number, currencyCode = 'USD', locale?: string): string {\n    if (!value && value !== 0) {\n      return '';\n    }\n\n    if (!locale) {\n      locale = getLocaleCode();\n    }\n\n    let currencyString;\n    try {\n      currencyString = new Intl.NumberFormat(locale, {\n        style: 'currency',\n        currency: currencyCode,\n        currencyDisplay: 'narrowSymbol',\n      }).format(value);\n    } catch (err) {\n      currencyString = new Intl.NumberFormat(locale, {\n        style: 'currency',\n        currency: currencyCode,\n        currencyDisplay: 'symbol',\n      }).format(value);\n    }\n\n    const currencySymbol = getCurrencySymbol(currencyCode) || '$';\n\n    // sometimes the Number format doesn't return a string with a currency symbol. Instead, it returns the currency code.\n    // if that's the case we'll get currency symbol and replace the currency code with the symbol.\n    // ex) currency is \"CZK\", number format returns \"CZK 3\", so we swap out the currency code for the symbol (Kč)\n    if (currencyString.includes(currencyCode)) {\n      currencyString = currencyString.replace(currencyCode, currencySymbol);\n    }\n\n    // we want to the currency code to the end of the string if the currency symbol is \"$\"\n    // this is b/c most countries that use the \"$\" as their currency symbol hold different monetary values and each refer to a different currency code. ex) CAD vs USD\n    // in contrast, the currency symbol of the Euro (€) has the same value across all countries that use the \"€\" symbol b/c they are all refering to the same currency code (EUR).\n    if (currencySymbol === '$') {\n      currencyString += ` ${currencyCode}`;\n    }\n\n    return currencyString;\n  }\n}\n","export interface DateRange {\n  start?: Date;\n  end?: Date;\n}\n\nexport enum DateDuration {\n  days = 'days',\n  months = 'months',\n}\n\nexport enum DateFormat { // Wed Apr 01 2020 16:20:00 GMT-600\n  mediumDay = 'LLL d', // MMM d (Apr 1)\n  shortDate = 'L/d/yy', // M/d/yy (4/1/20)\n  mediumDate = 'LLL d, y', // 'MMM d, y' (Apr 1, 2020)\n  longDate = 'LLLL d, y', // 'MMMM d, y' (April 1, 2020)\n  longMonth = 'LLLL y', // 'MMMM y' (April 2020)\n  shortTime = 'h:mm a', // (4:20 PM)\n  short = 'M/d/yy, h:mm a', // (4/1/20, 4:20 PM)\n  medium = 'LLL d, y, h:mm a', // 'MMM d, y, h:mm:ss a' (removed the seconds) (Apr 1, 2020, 4:20 PM)\n  long = 'LLLL d, y, h:mm a', // 'MMMM d, y, h:mm:ss a z' (removed the seconds and timezone) (April 1, 2020, 4:20 PM)\n  mediumDateShortTime = 'LLL d, h:mm a', // 'MMM d, h:mm:ss a' (removed the seconds) (Apr 1, 4:20 PM)\n  longLocalDate = 'PPP', // April 29, 1453 (changes order of day and month based on locale)\n  mediumLocalDate = 'PP', // Apr 29, 1453 (changes order of day and month based on locale)\n}\n","import {\n  addDays as add,\n  addMinutes,\n  isBefore as before,\n  differenceInMonths as diffInMonths,\n  differenceInCalendarDays,\n  endOfDay,\n  endOfMonth,\n  format,\n  formatDistance,\n  parseISO,\n  isSameDay as sameDay,\n  startOfDay,\n  startOfMonth,\n  startOfWeek,\n  subDays,\n  subMonths,\n  subYears,\n} from 'date-fns';\nimport { getLocale } from '../../locale';\nimport { DateDuration, DateFormat, DateRange } from './interface';\n\nconst MS_PER_MINUTE = 60 * 1000;\n\n/**\n * @param {Date} value What you wish to normalize\n * @param {(value: Date | number) => Date} dateFn A date function that takes in a date and applies some logic and returns a date\n * @returns {Date} normalized Date\n */\nexport function normalizeDateFunc(\n  value: Date,\n  dateFn: (value: Date | number, ...args: any[]) => Date,\n  ...args: any[]\n): Date {\n  const date = new Date(value);\n  return addMinutes(dateFn(getUTCTime(date), ...args), -date.getTimezoneOffset());\n}\n\n/**\n * @param {Date} date - a given date\n * @param {number} amount - number of days to add to the date\n * @returns {Date} Returns a date that is \"amount\" of days in the future from the provided date.\n */\nexport function addDays(date: Date, amount: number): Date {\n  return add(date, amount);\n}\n\n/**\n * @param {Date} date - a given date\n * @param {number} amount - number of days to subtract from the date\n * @returns {Date} Returns a date that is \"amount\" of days in the past from the provided date.\n */\nexport function subtractDays(date: Date, amount: number): Date {\n  return subDays(date, amount);\n}\n\n/**\n * @param {Date} date - a given date\n * @param {number} amount - number of months to subtract from the date\n * @returns {Date} Returns a date that is \"amount\" of months in the past from the provided date.\n */\nexport function subtractMonths(date: Date, amount: number): Date {\n  return subMonths(date, amount);\n}\n\n/**\n * @param {Date} date - a given date\n * @param {number} amount - number of years to subtract from the date\n * @returns {Date} Returns a date that is \"amount\" of years in the past from the provided date.\n */\nexport function subtractYears(date: Date, amount: number): Date {\n  return subYears(date, amount);\n}\n\n/**\n * Given a date, a number, and either days or months we return a date that is that amount of days in the past to find the start date.\n * @example\n * // returns Tue Nov 14 2020\n * calculateStartDate(Tue Nov 17 2020, 3, 'days')\n * @example\n * // returns Thu Sept 17 2020\n * calculateStartDate(Thu Sept 17 2020, 2, 'months')\n * @param {Date} endDate - the end date of date range\n * @param {number} dur - the number of date units the date range is\n * @parm {DateDuration} unit - specifies whether we to \"dur\" days or \"dur\" months into the past for the start date\n * @returns {Date} Returns the date that is either \"dur\" days or \"dur\" months in the past in relation to the provided end date\n */\nexport function calculateStartDate(endDate: Date, dur: number, unit: DateDuration): Date {\n  return unit === DateDuration.days ? subtractDays(endDate, dur) : subtractMonths(endDate, dur);\n}\n\n/**\n * @param {Date} value - a given date\n * @returns {string} Returns a localized string representation of the given date\n */\nexport function formatDate(\n  value: Date,\n  dateFormat: DateFormat | string = DateFormat.mediumLocalDate,\n  locale?: Locale,\n): string {\n  if (!locale) {\n    locale = getLocale();\n  }\n  const date = new Date(value);\n  return format(date, dateFormat, {\n    locale,\n  });\n}\n\n/**\n * @param {Date} date - a given date\n * @returns {string} Returns a string representation of the given date in UTC\n */\nexport function formatUTCDate(\n  date: Date,\n  dateFormat: DateFormat | string = DateFormat.mediumLocalDate,\n  locale?: Locale,\n): string {\n  return formatDate(getUTCTime(date), dateFormat, locale);\n}\n\n/**\n * @param {DateRange} dateRange - An object with start and end properties, both properties are of type Date\n * @returns {string} Returns a localized string representation of the start and end date, separated by a \"-\"\n */\nexport function formatDateRange(dateRange: DateRange): string {\n  if (!dateRange || !dateRange.start || !dateRange.end) return '';\n  return `${formatDate(dateRange.start)} - ${formatDate(dateRange.end)}`;\n}\n\nexport function formatUTCDateRange(dateRange: DateRange): string {\n  if (!dateRange || !dateRange.start || !dateRange.end) return '';\n  return `${formatUTCDate(dateRange.start)} - ${formatUTCDate(dateRange.end)}`;\n}\n\n/**\n * @returns {number} Returns the number of milliseconds that represent the timezone offset\n */\nexport function getTimezoneOffsetInMilliseconds(): number {\n  return new Date().getTimezoneOffset() * MS_PER_MINUTE;\n}\n\n/**\n * @param {Date} date A date object\n * @returns {Date} returns the UTC time based off of the timezone of the client\n */\nexport function getUTCTime(date: Date): Date {\n  return parseISO(date.toISOString().slice(0, -1));\n}\n\n/**\n * @param {Date} date - a given date\n * @returns {Date} Returns the given date at the start of the day (midnight)\n */\nexport function getStartOfDay(date: Date): Date {\n  return startOfDay(date);\n}\n\n/**\n * @param {Date} date - a given date\n * @returns {Date} Returns the given date at the start of the day (midnight) in UTC\n *  The start date of the UTC date from the given date\n *  e.g. date: Wed Aug 31 2022 23:59:59 GMT-0600 (Central Standard Time) => Sept 1st in UTC\n *       return: Thur Sept 01 2022 00:00:00 UTC\n */\nexport function getUTCStartOfDay(date: Date): Date {\n  return normalizeDateFunc(date, startOfDay);\n}\n\n/**\n * @param {Date} date - a given date\n * @returns {Date} Returns the given date at the end of the day (minute before midnight)\n */\nexport function getEndOfDay(date: Date): Date {\n  return endOfDay(date);\n}\n\n/**\n * @param {Date} date - a given date\n * @returns {Date} Returns the given date at the end of the day (minute before midnight) in UTC\n */\nexport function getUTCEndOfDay(date: Date): Date {\n  return normalizeDateFunc(date, endOfDay);\n}\n\n/**\n * @param {Date} date - a given date\n * @returns {Date} Returns the given date at the start of the week (midnight)\n */\nexport function getStartOfWeek(date: Date): Date {\n  return startOfWeek(date);\n}\n\n/**\n * @param {Date} date - a given date\n * @param {string} unit - unit of time\n * @returns {Date} Returns the start of a unit for the given date.\n */\nexport function getStartOf(\n  date: Date,\n  unit: 'month' | 'week' | 'day',\n  options?: {\n    locale?: Locale;\n    weekStartsOn?: 0 | 1 | 2 | 3 | 4 | 5 | 6;\n  },\n): Date {\n  switch (unit) {\n    case 'month':\n      return startOfMonth(date);\n    case 'week':\n      return startOfWeek(date, options);\n    case 'day':\n      return startOfDay(date);\n  }\n}\n\n/**\n * @param {Date} date - a given date\n * @returns {Date} Returns the given date at the start of the month (midnight)\n */\nexport function getStartOfMonth(date: Date): Date {\n  return startOfMonth(date);\n}\n\n/**\n * @param {Date} date - a given date\n * @returns {Date} Returns the given date at the start of the month (midnight) in UTC\n */\nexport function getUTCStartOfMonth(date: Date): Date {\n  return normalizeDateFunc(date, startOfMonth);\n}\n\n/**\n * @param {Date} date - a given date\n * @returns {Date} Returns the given date at the end of the month (minute before midnight)\n */\nexport function getEndOfMonth(date: Date): Date {\n  return endOfMonth(date);\n}\n\n/**\n * @param {Date} date - a given date\n * @returns {Date} Returns the given date at the end of the month (minute before midnight) in UTC\n *  The end of date of the UTC date from the given date\n *  e.g. date: Thur Sept 01 2022 00:00:00 GMT-0600 (Central Standard Time) => Aug 31st in UTC\n *       return: Wed Aug 31 2022 23:59:59 UTC\n */\nexport function getUTCEndOfMonth(date: Date): Date {\n  return normalizeDateFunc(date, endOfMonth);\n}\n\n/**\n * @param {Date} endDate - a given date\n * @param {Date} startDate - a givend date, either on the same day as endDate, or in the past.\n * @returns {number} Returns the number of days in between the startDate and endDate.\n */\nexport function differenceInDays(endDate: Date, startDate: Date): number {\n  return differenceInCalendarDays(endDate, startDate);\n}\n\n/**\n * @param {Date} endDate - a given date\n * @param {Date} startDate - a givend date, either on the same day as endDate, or in the past.\n * @returns {number} Returns the number of months in between the startDate and endDate.\n */\nexport function differenceInMonths(endDate: Date, startDate: Date): number {\n  return diffInMonths(endDate, startDate);\n}\n\n/**\n * @param {Date} dateOne - a date object you want to compare from\n * @param {Date} dateTwo - a date object you want to compare against\n * @returns {boolean} Returns true if dateOne and dateTwo are dates with the same day\n */\nexport function isSameDay(dateOne: Date, dateTwo: Date): boolean {\n  return sameDay(dateOne, dateTwo);\n}\n\n/**\n * @param {Date} dateOne - a date object you want to compare with\n * @param {Date} dateTwo - a date object you want to compare against\n * @returns {boolean} Returns true if dateOne is before dateTwo\n */\nexport function isBefore(dateOne: Date, dateTwo: Date): boolean {\n  return before(dateOne, dateTwo);\n}\n\n/**\n * @param {Date} date - a given date\n * @param {Date} comparisonDate - a given date as the base for the relative comparison\n * @returns {string} Returns a localized string representation of the given date relative to the given base date\n */\nexport function formatTimeBetween(\n  date: Date,\n  comparisonDate: Date,\n  includeSeconds = false,\n  addSuffix = false,\n  locale?: Locale,\n): string {\n  if (!locale) {\n    locale = getLocale();\n  }\n  return formatDistance(date, comparisonDate, { includeSeconds, addSuffix, locale });\n}\n\n/**\n * @param {Date} date - a given date\n * @returns {string} Returns a localized string representation of the given date relative to now (ex: \"3 days ago\")\n */\nexport function fromNow(date: Date, locale?: Locale): string {\n  return formatTimeBetween(date, new Date(), false, true, locale);\n}\n\n/**\n * In North America, weeks start on Sundays, but other locales start the week on Monday or Saturday.\n * This function returns the days of the week in order for a locale.\n * @returns {string[]} week in localized order (indexed to north american week order)\n */\nexport function localizedWeekOrder(locale?: Locale): number[] {\n  if (!locale) {\n    locale = getLocale();\n  }\n  const weekStart = localizedWeekStart(locale);\n  return [0, 1, 2, 3, 4, 5, 6].map((index) => {\n    switch (weekStart) {\n      case 'sat':\n        return (index + 6) % 7;\n      case 'sun':\n        return index;\n      case 'mon':\n        return (index + 1) % 7;\n      default:\n        return index;\n    }\n  });\n}\n\n/**\n * In North America, weeks start on Sundays, but other locales start the week on Monday or Saturday.\n * This function maps a given index to the day of the week at the current locale.\n * Ex. The 0th weekday in Canada is Sunday (0 -> 0), the 0th weekday in Germany is Monday (0 -> 1)\n * @param {number} index - the requested index\n * @returns {number} day of the week for a weekday (indexed to north american week order)\n */\nexport function localizedWeekday(index: number, locale?: Locale): number {\n  if (!locale) {\n    locale = getLocale();\n  }\n  const weekStart = localizedWeekStart(locale);\n  switch (weekStart) {\n    case 'sat':\n      return (index + 6) % 7;\n    case 'sun':\n    default:\n      return index;\n    case 'mon':\n      return (index + 1) % 7;\n  }\n}\n\n/**\n * In North America, weeks start on Sundays, but other locales start the week on Monday or Saturday.\n * This function compares the locale against known values for the first day of the week.\n * @returns {string} first three letters of a day of the week\n */\nexport function localizedWeekStart(locale?: Locale): string {\n  if (!locale) {\n    locale = getLocale();\n  }\n  const parts = locale.code?.match(\n    /^([a-z]{2,3})(?:-([a-z]{3})(?=$|-))?(?:-([a-z]{4})(?=$|-))?(?:-([a-z]{2}|\\d{3})(?=$|-))?/i,\n  );\n  if (!parts) return 'sun';\n  const [region, language] = [parts[4], parts[1]];\n\n  const regionSat = 'AEAFBHDJDZEGIQIRJOKWLYOMQASDSY'.match(/../g);\n  const regionSun =\n    'AGARASAUBDBRBSBTBWBZCACNCODMDOETGTGUHKHNIDILINJMJPKEKHKRLAMHMMMOMTMXMZNINPPAPEPHPKPRPTPYSASGSVTHTTTWUMUSVEVIWSYEZAZW'.match(\n      /../g,\n    );\n  const languageSat = ['ar', 'arq', 'arz', 'fa'];\n  const languageSun = 'amasbndzengnguhehiidjajvkmknkolomhmlmrmtmyneomorpapssdsmsnsutatethtnurzhzu'.match(/../g);\n\n  return region\n    ? regionSun?.includes(region)\n      ? 'sun'\n      : regionSat?.includes(region)\n        ? 'sat'\n        : 'mon'\n    : languageSun?.includes(language)\n      ? 'sun'\n      : languageSat.includes(language)\n        ? 'sat'\n        : 'mon';\n}\n","export { DateRange, DateDuration, DateFormat } from './src/interface';\nexport * from './src/date-utils';\n","// Export things like public API, and interfaces from here.\nexport * from './public_api';\n","import { Pipe, PipeTransform } from '@angular/core';\nimport { Locale } from 'date-fns';\nimport { formatDate, DateFormat } from '@vendasta/galaxy/utility/date-utils';\n\n@Pipe({\n  name: 'glxyDate',\n  standalone: false,\n})\nexport class GalaxyDatePipe implements PipeTransform {\n  transform(value: string | number | Date, dateFormat?: DateFormat, locale?: Locale): any {\n    try {\n      const date = new Date(value);\n      return formatDate(date, dateFormat, locale);\n    } catch (err) {\n      return 'Not a valid date';\n    }\n  }\n}\n","/**\n * @param {string | number} value the value to get the ordinal suffix (e.g. st, nd, rd, th, etc.) for\n * @returns {string} the ordinal suffix\n */\nexport function ordinal(value: string | number): string {\n  const num = Number(value);\n  if (isNaN(num)) return '';\n\n  if (num > 3 && num < 21) return 'th';\n\n  const lastDigit = num % 10;\n  return lastDigit === 1 ? 'st' : lastDigit === 2 ? 'nd' : lastDigit === 3 ? 'rd' : 'th';\n}\n","export * from './src/ordinal-utils';\n","// Export things like public API, and interfaces from here.\nexport * from './public_api';\n","import { Pipe, PipeTransform } from '@angular/core';\nimport { ordinal } from '@vendasta/galaxy/utility/ordinal-utils';\n\n@Pipe({\n  name: 'glxyOrdinal',\n  standalone: false,\n})\nexport class GalaxyOrdinalPipe implements PipeTransform {\n  transform(value: string | number, excludeValueInResponse?: boolean): string {\n    return excludeValueInResponse ? ordinal(value) : `${value}${ordinal(value)}`;\n  }\n}\n","import { Pipe, PipeTransform } from '@angular/core';\nimport { DomSanitizer, SafeHtml } from '@angular/platform-browser';\n\n// if we want to bypass sanitizer for more data types\n// https://medium.com/@swarnakishore/angular-safe-pipe-implementation-to-bypass-domsanitizer-stripping-out-content-c1bf0f1cc36b\n\n/**\n * A pipe to bypass Angular's dom sanitizer. Use when the html you wish to inject is safe, or will be used in a secure manner\n */\n@Pipe({\n  name: 'iTrustThisHtml',\n  standalone: false,\n})\nexport class GalaxyITrustThisHtmlPipe implements PipeTransform {\n  constructor(private sanitizer: DomSanitizer) {}\n\n  transform(html: string): SafeHtml {\n    return this.sanitizer.bypassSecurityTrustHtml(html);\n  }\n}\n","// Important: this file is generated from the 'build' script and should not be\n// edited directly\nexport var version = '4.0.0';\n","/**\n * Simpler helper method to check for undefined simply for the benefit of\n * gaining better compression when minified by not needing to have multiple\n * comparisons to the `undefined` keyword in the codebase.\n */\nexport function isUndefined(value) {\n  return value === undefined;\n}\n/**\n * Simpler helper method to check for a boolean type simply for the benefit of\n * gaining better compression when minified by not needing to have multiple\n * `typeof` comparisons in the codebase.\n */\nexport function isBoolean(value) {\n  return typeof value === 'boolean';\n}\n/**\n * Assigns (shallow copies) the properties of `src` onto `dest`, if the\n * corresponding property on `dest` === `undefined`.\n *\n * @param {Object} dest The destination object.\n * @param {Object} src The source object.\n * @return {Object} The destination object (`dest`)\n */\nexport function defaults(dest, src) {\n  for (var prop in src) {\n    if (src.hasOwnProperty(prop) && isUndefined(dest[prop])) {\n      dest[prop] = src[prop];\n    }\n  }\n  return dest;\n}\n/**\n * Truncates the `str` at `len - ellipsisChars.length`, and adds the `ellipsisChars` to the\n * end of the string (by default, two periods: '..'). If the `str` length does not exceed\n * `len`, the string will be returned unchanged.\n *\n * @param {String} str The string to truncate and add an ellipsis to.\n * @param {Number} truncateLen The length to truncate the string at.\n * @param {String} [ellipsisChars=...] The ellipsis character(s) to add to the end of `str`\n *   when truncated. Defaults to '...'\n */\nexport function ellipsis(str, truncateLen, ellipsisChars) {\n  var ellipsisLength;\n  if (str.length > truncateLen) {\n    if (ellipsisChars == null) {\n      ellipsisChars = '…';\n      ellipsisLength = 3;\n    } else {\n      ellipsisLength = ellipsisChars.length;\n    }\n    str = str.substring(0, truncateLen - ellipsisLength) + ellipsisChars;\n  }\n  return str;\n}\n/**\n * Removes array elements by value. Mutates the input array.\n *\n * Using this instead of the ES5 Array.prototype.filter() function to prevent\n * creating many new arrays in memory for removing an element.\n *\n * @param arr The array to remove elements from. This array is mutated.\n * @param fn The element to remove.\n */\nexport function remove(arr, item) {\n  for (var i = arr.length - 1; i >= 0; i--) {\n    if (arr[i] === item) {\n      arr.splice(i, 1);\n    }\n  }\n}\n/**\n * Removes array elements based on a filtering function. Mutates the input\n * array.\n *\n * Using this instead of the ES5 Array.prototype.filter() function to prevent\n * creating many new arrays in memory for filtering.\n *\n * @param arr The array to remove elements from. This array is mutated.\n * @param fn The predicate function which should return `true` to remove an\n *   element.\n */\nexport function removeWithPredicate(arr, fn) {\n  for (var i = arr.length - 1; i >= 0; i--) {\n    if (fn(arr[i]) === true) {\n      arr.splice(i, 1);\n    }\n  }\n}\n/**\n * Function that should never be called but is used to check that every\n * enum value is handled using TypeScript's 'never' type.\n */\nexport function assertNever(theValue) {\n  throw new Error(\"Unhandled case for value: '\".concat(theValue, \"'\"));\n}\n","/*\n * This file builds and stores a library of the common regular expressions used\n * by the Autolinker utility.\n *\n * Other regular expressions may exist ad-hoc, but these are generally the\n * regular expressions that are shared between source files.\n */\n/**\n * Regular expression to match upper and lowercase ASCII letters\n */\nexport var letterRe = /[A-Za-z]/;\n/**\n * Regular expression to match ASCII digits\n */\nexport var digitRe = /[\\d]/;\n/**\n * Regular expression to match everything *except* ASCII digits\n */\nexport var nonDigitRe = /[\\D]/;\n/**\n * Regular expression to match whitespace\n */\nexport var whitespaceRe = /\\s/;\n/**\n * Regular expression to match quote characters\n */\nexport var quoteRe = /['\"]/;\n/**\n * Regular expression to match the range of ASCII control characters (0-31), and\n * the backspace char (127)\n */\nexport var controlCharsRe = /[\\x00-\\x1F\\x7F]/;\n/**\n * The string form of a regular expression that would match all of the\n * alphabetic (\"letter\") chars in the unicode character set when placed in a\n * RegExp character class (`[]`). This includes all international alphabetic\n * characters.\n *\n * These would be the characters matched by unicode regex engines `\\p{L}`\n * escape (\"all letters\").\n *\n * Taken from the XRegExp library: http://xregexp.com/ (thanks @https://github.com/slevithan)\n * Specifically: http://xregexp.com/v/3.2.0/xregexp-all.js, the 'Letter'\n *   regex's bmp\n *\n * VERY IMPORTANT: This set of characters is defined inside of a Regular\n *   Expression literal rather than a string literal to prevent UglifyJS from\n *   compressing the unicode escape sequences into their actual unicode\n *   characters. If Uglify compresses these into the unicode characters\n *   themselves, this results in the error \"Range out of order in character\n *   class\" when these characters are used inside of a Regular Expression\n *   character class (`[]`). See usages of this const. Alternatively, we can set\n *   the UglifyJS option `ascii_only` to true for the build, but that doesn't\n *   help others who are pulling in Autolinker into their own build and running\n *   UglifyJS themselves.\n */\n// prettier-ignore\nexport var alphaCharsStr = /A-Za-z\\xAA\\xB5\\xBA\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\u02C1\\u02C6-\\u02D1\\u02E0-\\u02E4\\u02EC\\u02EE\\u0370-\\u0374\\u0376\\u0377\\u037A-\\u037D\\u037F\\u0386\\u0388-\\u038A\\u038C\\u038E-\\u03A1\\u03A3-\\u03F5\\u03F7-\\u0481\\u048A-\\u052F\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u05D0-\\u05EA\\u05F0-\\u05F2\\u0620-\\u064A\\u066E\\u066F\\u0671-\\u06D3\\u06D5\\u06E5\\u06E6\\u06EE\\u06EF\\u06FA-\\u06FC\\u06FF\\u0710\\u0712-\\u072F\\u074D-\\u07A5\\u07B1\\u07CA-\\u07EA\\u07F4\\u07F5\\u07FA\\u0800-\\u0815\\u081A\\u0824\\u0828\\u0840-\\u0858\\u08A0-\\u08B4\\u08B6-\\u08BD\\u0904-\\u0939\\u093D\\u0950\\u0958-\\u0961\\u0971-\\u0980\\u0985-\\u098C\\u098F\\u0990\\u0993-\\u09A8\\u09AA-\\u09B0\\u09B2\\u09B6-\\u09B9\\u09BD\\u09CE\\u09DC\\u09DD\\u09DF-\\u09E1\\u09F0\\u09F1\\u0A05-\\u0A0A\\u0A0F\\u0A10\\u0A13-\\u0A28\\u0A2A-\\u0A30\\u0A32\\u0A33\\u0A35\\u0A36\\u0A38\\u0A39\\u0A59-\\u0A5C\\u0A5E\\u0A72-\\u0A74\\u0A85-\\u0A8D\\u0A8F-\\u0A91\\u0A93-\\u0AA8\\u0AAA-\\u0AB0\\u0AB2\\u0AB3\\u0AB5-\\u0AB9\\u0ABD\\u0AD0\\u0AE0\\u0AE1\\u0AF9\\u0B05-\\u0B0C\\u0B0F\\u0B10\\u0B13-\\u0B28\\u0B2A-\\u0B30\\u0B32\\u0B33\\u0B35-\\u0B39\\u0B3D\\u0B5C\\u0B5D\\u0B5F-\\u0B61\\u0B71\\u0B83\\u0B85-\\u0B8A\\u0B8E-\\u0B90\\u0B92-\\u0B95\\u0B99\\u0B9A\\u0B9C\\u0B9E\\u0B9F\\u0BA3\\u0BA4\\u0BA8-\\u0BAA\\u0BAE-\\u0BB9\\u0BD0\\u0C05-\\u0C0C\\u0C0E-\\u0C10\\u0C12-\\u0C28\\u0C2A-\\u0C39\\u0C3D\\u0C58-\\u0C5A\\u0C60\\u0C61\\u0C80\\u0C85-\\u0C8C\\u0C8E-\\u0C90\\u0C92-\\u0CA8\\u0CAA-\\u0CB3\\u0CB5-\\u0CB9\\u0CBD\\u0CDE\\u0CE0\\u0CE1\\u0CF1\\u0CF2\\u0D05-\\u0D0C\\u0D0E-\\u0D10\\u0D12-\\u0D3A\\u0D3D\\u0D4E\\u0D54-\\u0D56\\u0D5F-\\u0D61\\u0D7A-\\u0D7F\\u0D85-\\u0D96\\u0D9A-\\u0DB1\\u0DB3-\\u0DBB\\u0DBD\\u0DC0-\\u0DC6\\u0E01-\\u0E30\\u0E32\\u0E33\\u0E40-\\u0E46\\u0E81\\u0E82\\u0E84\\u0E87\\u0E88\\u0E8A\\u0E8D\\u0E94-\\u0E97\\u0E99-\\u0E9F\\u0EA1-\\u0EA3\\u0EA5\\u0EA7\\u0EAA\\u0EAB\\u0EAD-\\u0EB0\\u0EB2\\u0EB3\\u0EBD\\u0EC0-\\u0EC4\\u0EC6\\u0EDC-\\u0EDF\\u0F00\\u0F40-\\u0F47\\u0F49-\\u0F6C\\u0F88-\\u0F8C\\u1000-\\u102A\\u103F\\u1050-\\u1055\\u105A-\\u105D\\u1061\\u1065\\u1066\\u106E-\\u1070\\u1075-\\u1081\\u108E\\u10A0-\\u10C5\\u10C7\\u10CD\\u10D0-\\u10FA\\u10FC-\\u1248\\u124A-\\u124D\\u1250-\\u1256\\u1258\\u125A-\\u125D\\u1260-\\u1288\\u128A-\\u128D\\u1290-\\u12B0\\u12B2-\\u12B5\\u12B8-\\u12BE\\u12C0\\u12C2-\\u12C5\\u12C8-\\u12D6\\u12D8-\\u1310\\u1312-\\u1315\\u1318-\\u135A\\u1380-\\u138F\\u13A0-\\u13F5\\u13F8-\\u13FD\\u1401-\\u166C\\u166F-\\u167F\\u1681-\\u169A\\u16A0-\\u16EA\\u16F1-\\u16F8\\u1700-\\u170C\\u170E-\\u1711\\u1720-\\u1731\\u1740-\\u1751\\u1760-\\u176C\\u176E-\\u1770\\u1780-\\u17B3\\u17D7\\u17DC\\u1820-\\u1877\\u1880-\\u1884\\u1887-\\u18A8\\u18AA\\u18B0-\\u18F5\\u1900-\\u191E\\u1950-\\u196D\\u1970-\\u1974\\u1980-\\u19AB\\u19B0-\\u19C9\\u1A00-\\u1A16\\u1A20-\\u1A54\\u1AA7\\u1B05-\\u1B33\\u1B45-\\u1B4B\\u1B83-\\u1BA0\\u1BAE\\u1BAF\\u1BBA-\\u1BE5\\u1C00-\\u1C23\\u1C4D-\\u1C4F\\u1C5A-\\u1C7D\\u1C80-\\u1C88\\u1CE9-\\u1CEC\\u1CEE-\\u1CF1\\u1CF5\\u1CF6\\u1D00-\\u1DBF\\u1E00-\\u1F15\\u1F18-\\u1F1D\\u1F20-\\u1F45\\u1F48-\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F-\\u1F7D\\u1F80-\\u1FB4\\u1FB6-\\u1FBC\\u1FBE\\u1FC2-\\u1FC4\\u1FC6-\\u1FCC\\u1FD0-\\u1FD3\\u1FD6-\\u1FDB\\u1FE0-\\u1FEC\\u1FF2-\\u1FF4\\u1FF6-\\u1FFC\\u2071\\u207F\\u2090-\\u209C\\u2102\\u2107\\u210A-\\u2113\\u2115\\u2119-\\u211D\\u2124\\u2126\\u2128\\u212A-\\u212D\\u212F-\\u2139\\u213C-\\u213F\\u2145-\\u2149\\u214E\\u2183\\u2184\\u2C00-\\u2C2E\\u2C30-\\u2C5E\\u2C60-\\u2CE4\\u2CEB-\\u2CEE\\u2CF2\\u2CF3\\u2D00-\\u2D25\\u2D27\\u2D2D\\u2D30-\\u2D67\\u2D6F\\u2D80-\\u2D96\\u2DA0-\\u2DA6\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-\\u2DBE\\u2DC0-\\u2DC6\\u2DC8-\\u2DCE\\u2DD0-\\u2DD6\\u2DD8-\\u2DDE\\u2E2F\\u3005\\u3006\\u3031-\\u3035\\u303B\\u303C\\u3041-\\u3096\\u309D-\\u309F\\u30A1-\\u30FA\\u30FC-\\u30FF\\u3105-\\u312D\\u3131-\\u318E\\u31A0-\\u31BA\\u31F0-\\u31FF\\u3400-\\u4DB5\\u4E00-\\u9FD5\\uA000-\\uA48C\\uA4D0-\\uA4FD\\uA500-\\uA60C\\uA610-\\uA61F\\uA62A\\uA62B\\uA640-\\uA66E\\uA67F-\\uA69D\\uA6A0-\\uA6E5\\uA717-\\uA71F\\uA722-\\uA788\\uA78B-\\uA7AE\\uA7B0-\\uA7B7\\uA7F7-\\uA801\\uA803-\\uA805\\uA807-\\uA80A\\uA80C-\\uA822\\uA840-\\uA873\\uA882-\\uA8B3\\uA8F2-\\uA8F7\\uA8FB\\uA8FD\\uA90A-\\uA925\\uA930-\\uA946\\uA960-\\uA97C\\uA984-\\uA9B2\\uA9CF\\uA9E0-\\uA9E4\\uA9E6-\\uA9EF\\uA9FA-\\uA9FE\\uAA00-\\uAA28\\uAA40-\\uAA42\\uAA44-\\uAA4B\\uAA60-\\uAA76\\uAA7A\\uAA7E-\\uAAAF\\uAAB1\\uAAB5\\uAAB6\\uAAB9-\\uAABD\\uAAC0\\uAAC2\\uAADB-\\uAADD\\uAAE0-\\uAAEA\\uAAF2-\\uAAF4\\uAB01-\\uAB06\\uAB09-\\uAB0E\\uAB11-\\uAB16\\uAB20-\\uAB26\\uAB28-\\uAB2E\\uAB30-\\uAB5A\\uAB5C-\\uAB65\\uAB70-\\uABE2\\uAC00-\\uD7A3\\uD7B0-\\uD7C6\\uD7CB-\\uD7FB\\uF900-\\uFA6D\\uFA70-\\uFAD9\\uFB00-\\uFB06\\uFB13-\\uFB17\\uFB1D\\uFB1F-\\uFB28\\uFB2A-\\uFB36\\uFB38-\\uFB3C\\uFB3E\\uFB40\\uFB41\\uFB43\\uFB44\\uFB46-\\uFBB1\\uFBD3-\\uFD3D\\uFD50-\\uFD8F\\uFD92-\\uFDC7\\uFDF0-\\uFDFB\\uFE70-\\uFE74\\uFE76-\\uFEFC\\uFF21-\\uFF3A\\uFF41-\\uFF5A\\uFF66-\\uFFBE\\uFFC2-\\uFFC7\\uFFCA-\\uFFCF\\uFFD2-\\uFFD7\\uFFDA-\\uFFDC/.source; // see note in above variable description\n/**\n * The string form of a regular expression that would match all emoji characters\n * Based on the emoji regex defined in this article: https://thekevinscott.com/emojis-in-javascript/\n */\nexport var emojiStr = /\\u2700-\\u27bf\\udde6-\\uddff\\ud800-\\udbff\\udc00-\\udfff\\ufe0e\\ufe0f\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0\\ud83c\\udffb-\\udfff\\u200d\\u3299\\u3297\\u303d\\u3030\\u24c2\\ud83c\\udd70-\\udd71\\udd7e-\\udd7f\\udd8e\\udd91-\\udd9a\\udde6-\\uddff\\ude01-\\ude02\\ude1a\\ude2f\\ude32-\\ude3a\\ude50-\\ude51\\u203c\\u2049\\u25aa-\\u25ab\\u25b6\\u25c0\\u25fb-\\u25fe\\u00a9\\u00ae\\u2122\\u2139\\udc04\\u2600-\\u26FF\\u2b05\\u2b06\\u2b07\\u2b1b\\u2b1c\\u2b50\\u2b55\\u231a\\u231b\\u2328\\u23cf\\u23e9-\\u23f3\\u23f8-\\u23fa\\udccf\\u2935\\u2934\\u2190-\\u21ff/.source;\n/**\n * The string form of a regular expression that would match all of the\n * combining mark characters in the unicode character set when placed in a\n * RegExp character class (`[]`).\n *\n * These would be the characters matched by unicode regex engines `\\p{M}`\n * escape (\"all marks\").\n *\n * Taken from the XRegExp library: http://xregexp.com/ (thanks @https://github.com/slevithan)\n * Specifically: http://xregexp.com/v/3.2.0/xregexp-all.js, the 'Mark'\n *   regex's bmp\n *\n * VERY IMPORTANT: This set of characters is defined inside of a Regular\n *   Expression literal rather than a string literal to prevent UglifyJS from\n *   compressing the unicode escape sequences into their actual unicode\n *   characters. If Uglify compresses these into the unicode characters\n *   themselves, this results in the error \"Range out of order in character\n *   class\" when these characters are used inside of a Regular Expression\n *   character class (`[]`). See usages of this const. Alternatively, we can set\n *   the UglifyJS option `ascii_only` to true for the build, but that doesn't\n *   help others who are pulling in Autolinker into their own build and running\n *   UglifyJS themselves.\n */\n// prettier-ignore\nexport var marksStr = /\\u0300-\\u036F\\u0483-\\u0489\\u0591-\\u05BD\\u05BF\\u05C1\\u05C2\\u05C4\\u05C5\\u05C7\\u0610-\\u061A\\u064B-\\u065F\\u0670\\u06D6-\\u06DC\\u06DF-\\u06E4\\u06E7\\u06E8\\u06EA-\\u06ED\\u0711\\u0730-\\u074A\\u07A6-\\u07B0\\u07EB-\\u07F3\\u0816-\\u0819\\u081B-\\u0823\\u0825-\\u0827\\u0829-\\u082D\\u0859-\\u085B\\u08D4-\\u08E1\\u08E3-\\u0903\\u093A-\\u093C\\u093E-\\u094F\\u0951-\\u0957\\u0962\\u0963\\u0981-\\u0983\\u09BC\\u09BE-\\u09C4\\u09C7\\u09C8\\u09CB-\\u09CD\\u09D7\\u09E2\\u09E3\\u0A01-\\u0A03\\u0A3C\\u0A3E-\\u0A42\\u0A47\\u0A48\\u0A4B-\\u0A4D\\u0A51\\u0A70\\u0A71\\u0A75\\u0A81-\\u0A83\\u0ABC\\u0ABE-\\u0AC5\\u0AC7-\\u0AC9\\u0ACB-\\u0ACD\\u0AE2\\u0AE3\\u0B01-\\u0B03\\u0B3C\\u0B3E-\\u0B44\\u0B47\\u0B48\\u0B4B-\\u0B4D\\u0B56\\u0B57\\u0B62\\u0B63\\u0B82\\u0BBE-\\u0BC2\\u0BC6-\\u0BC8\\u0BCA-\\u0BCD\\u0BD7\\u0C00-\\u0C03\\u0C3E-\\u0C44\\u0C46-\\u0C48\\u0C4A-\\u0C4D\\u0C55\\u0C56\\u0C62\\u0C63\\u0C81-\\u0C83\\u0CBC\\u0CBE-\\u0CC4\\u0CC6-\\u0CC8\\u0CCA-\\u0CCD\\u0CD5\\u0CD6\\u0CE2\\u0CE3\\u0D01-\\u0D03\\u0D3E-\\u0D44\\u0D46-\\u0D48\\u0D4A-\\u0D4D\\u0D57\\u0D62\\u0D63\\u0D82\\u0D83\\u0DCA\\u0DCF-\\u0DD4\\u0DD6\\u0DD8-\\u0DDF\\u0DF2\\u0DF3\\u0E31\\u0E34-\\u0E3A\\u0E47-\\u0E4E\\u0EB1\\u0EB4-\\u0EB9\\u0EBB\\u0EBC\\u0EC8-\\u0ECD\\u0F18\\u0F19\\u0F35\\u0F37\\u0F39\\u0F3E\\u0F3F\\u0F71-\\u0F84\\u0F86\\u0F87\\u0F8D-\\u0F97\\u0F99-\\u0FBC\\u0FC6\\u102B-\\u103E\\u1056-\\u1059\\u105E-\\u1060\\u1062-\\u1064\\u1067-\\u106D\\u1071-\\u1074\\u1082-\\u108D\\u108F\\u109A-\\u109D\\u135D-\\u135F\\u1712-\\u1714\\u1732-\\u1734\\u1752\\u1753\\u1772\\u1773\\u17B4-\\u17D3\\u17DD\\u180B-\\u180D\\u1885\\u1886\\u18A9\\u1920-\\u192B\\u1930-\\u193B\\u1A17-\\u1A1B\\u1A55-\\u1A5E\\u1A60-\\u1A7C\\u1A7F\\u1AB0-\\u1ABE\\u1B00-\\u1B04\\u1B34-\\u1B44\\u1B6B-\\u1B73\\u1B80-\\u1B82\\u1BA1-\\u1BAD\\u1BE6-\\u1BF3\\u1C24-\\u1C37\\u1CD0-\\u1CD2\\u1CD4-\\u1CE8\\u1CED\\u1CF2-\\u1CF4\\u1CF8\\u1CF9\\u1DC0-\\u1DF5\\u1DFB-\\u1DFF\\u20D0-\\u20F0\\u2CEF-\\u2CF1\\u2D7F\\u2DE0-\\u2DFF\\u302A-\\u302F\\u3099\\u309A\\uA66F-\\uA672\\uA674-\\uA67D\\uA69E\\uA69F\\uA6F0\\uA6F1\\uA802\\uA806\\uA80B\\uA823-\\uA827\\uA880\\uA881\\uA8B4-\\uA8C5\\uA8E0-\\uA8F1\\uA926-\\uA92D\\uA947-\\uA953\\uA980-\\uA983\\uA9B3-\\uA9C0\\uA9E5\\uAA29-\\uAA36\\uAA43\\uAA4C\\uAA4D\\uAA7B-\\uAA7D\\uAAB0\\uAAB2-\\uAAB4\\uAAB7\\uAAB8\\uAABE\\uAABF\\uAAC1\\uAAEB-\\uAAEF\\uAAF5\\uAAF6\\uABE3-\\uABEA\\uABEC\\uABED\\uFB1E\\uFE00-\\uFE0F\\uFE20-\\uFE2F/.source; // see note in above variable description\n/**\n * The string form of a regular expression that would match all of the\n * alphabetic (\"letter\") chars, emoji, and combining marks in the unicode character set\n * when placed in a RegExp character class (`[]`). This includes all\n * international alphabetic characters.\n *\n * These would be the characters matched by unicode regex engines `\\p{L}\\p{M}`\n * escapes and emoji characters.\n */\nexport var alphaCharsAndMarksStr = alphaCharsStr + emojiStr + marksStr;\n/**\n * The string form of a regular expression that would match all of the\n * decimal number chars in the unicode character set when placed in a RegExp\n * character class (`[]`).\n *\n * These would be the characters matched by unicode regex engines `\\p{Nd}`\n * escape (\"all decimal numbers\")\n *\n * Taken from the XRegExp library: http://xregexp.com/ (thanks @https://github.com/slevithan)\n * Specifically: http://xregexp.com/v/3.2.0/xregexp-all.js, the 'Decimal_Number'\n *   regex's bmp\n *\n * VERY IMPORTANT: This set of characters is defined inside of a Regular\n *   Expression literal rather than a string literal to prevent UglifyJS from\n *   compressing the unicode escape sequences into their actual unicode\n *   characters. If Uglify compresses these into the unicode characters\n *   themselves, this results in the error \"Range out of order in character\n *   class\" when these characters are used inside of a Regular Expression\n *   character class (`[]`). See usages of this const. Alternatively, we can set\n *   the UglifyJS option `ascii_only` to true for the build, but that doesn't\n *   help others who are pulling in Autolinker into their own build and running\n *   UglifyJS themselves.\n */\n// prettier-ignore\nexport var decimalNumbersStr = /0-9\\u0660-\\u0669\\u06F0-\\u06F9\\u07C0-\\u07C9\\u0966-\\u096F\\u09E6-\\u09EF\\u0A66-\\u0A6F\\u0AE6-\\u0AEF\\u0B66-\\u0B6F\\u0BE6-\\u0BEF\\u0C66-\\u0C6F\\u0CE6-\\u0CEF\\u0D66-\\u0D6F\\u0DE6-\\u0DEF\\u0E50-\\u0E59\\u0ED0-\\u0ED9\\u0F20-\\u0F29\\u1040-\\u1049\\u1090-\\u1099\\u17E0-\\u17E9\\u1810-\\u1819\\u1946-\\u194F\\u19D0-\\u19D9\\u1A80-\\u1A89\\u1A90-\\u1A99\\u1B50-\\u1B59\\u1BB0-\\u1BB9\\u1C40-\\u1C49\\u1C50-\\u1C59\\uA620-\\uA629\\uA8D0-\\uA8D9\\uA900-\\uA909\\uA9D0-\\uA9D9\\uA9F0-\\uA9F9\\uAA50-\\uAA59\\uABF0-\\uABF9\\uFF10-\\uFF19/.source; // see note in above variable description\n/**\n * The regular expression that will match all of the letters and decimal number\n * chars in the unicode character set when placed in a RegExp character class\n * (`[]`).\n *\n * These would be the characters matched by unicode regex engines\n * `[\\p{L}\\p{Nd}]` escape (\"all letters and decimal numbers\")\n */\nexport var alphaNumericCharsRe = new RegExp(\"[\".concat(alphaCharsStr + decimalNumbersStr, \"]\"));\n/**\n * The string form of a regular expression that would match all of the\n * letters, combining marks, and decimal number chars in the unicode character\n * set when placed in a RegExp character class (`[]`).\n *\n * These would be the characters matched by unicode regex engines\n * `[\\p{L}\\p{M}\\p{Nd}]` escape (\"all letters, combining marks, and decimal\n * numbers\")\n */\nexport var alphaNumericAndMarksCharsStr = alphaCharsAndMarksStr + decimalNumbersStr;\n/**\n * The regular expression that will match a single letter of the\n * {@link #alphaNumericAndMarksCharsStr}.\n */\nexport var alphaNumericAndMarksRe = new RegExp(\"[\".concat(alphaNumericAndMarksCharsStr, \"]\"));\n","import { whitespaceRe } from './regex-lib';\n/**\n * @class Autolinker.HtmlTag\n * @extends Object\n *\n * Represents an HTML tag, which can be used to easily build/modify HTML tags programmatically.\n *\n * Autolinker uses this abstraction to create HTML tags, and then write them out as strings. You may also use\n * this class in your code, especially within a {@link Autolinker#replaceFn replaceFn}.\n *\n * ## Examples\n *\n * Example instantiation:\n *\n *     var tag = new Autolinker.HtmlTag( {\n *         tagName : 'a',\n *         attrs   : { 'href': 'http://google.com', 'class': 'external-link' },\n *         innerHtml : 'Google'\n *     } );\n *\n *     tag.toAnchorString();  // Google\n *\n *     // Individual accessor methods\n *     tag.getTagName();                 // 'a'\n *     tag.getAttr( 'href' );            // 'http://google.com'\n *     tag.hasClass( 'external-link' );  // true\n *\n *\n * Using mutator methods (which may be used in combination with instantiation config properties):\n *\n *     var tag = new Autolinker.HtmlTag();\n *     tag.setTagName( 'a' );\n *     tag.setAttr( 'href', 'http://google.com' );\n *     tag.addClass( 'external-link' );\n *     tag.setInnerHtml( 'Google' );\n *\n *     tag.getTagName();                 // 'a'\n *     tag.getAttr( 'href' );            // 'http://google.com'\n *     tag.hasClass( 'external-link' );  // true\n *\n *     tag.toAnchorString();  // Google\n *\n *\n * ## Example use within a {@link Autolinker#replaceFn replaceFn}\n *\n *     var html = Autolinker.link( \"Test google.com\", {\n *         replaceFn : function( match ) {\n *             var tag = match.buildTag();  // returns an {@link Autolinker.HtmlTag} instance, configured with the Match's href and anchor text\n *             tag.setAttr( 'rel', 'nofollow' );\n *\n *             return tag;\n *         }\n *     } );\n *\n *     // generated html:\n *     //   Test google.com\n *\n *\n * ## Example use with a new tag for the replacement\n *\n *     var html = Autolinker.link( \"Test google.com\", {\n *         replaceFn : function( match ) {\n *             var tag = new Autolinker.HtmlTag( {\n *                 tagName : 'button',\n *                 attrs   : { 'title': 'Load URL: ' + match.getAnchorHref() },\n *                 innerHtml : 'Load URL: ' + match.getAnchorText()\n *             } );\n *\n *             return tag;\n *         }\n *     } );\n *\n *     // generated html:\n *     //   Test \n */\nvar HtmlTag = /** @class */function () {\n  /**\n   * @method constructor\n   * @param {Object} [cfg] The configuration properties for this class, in an Object (map)\n   */\n  function HtmlTag(cfg) {\n    if (cfg === void 0) {\n      cfg = {};\n    }\n    /**\n     * @cfg {String} tagName\n     *\n     * The tag name. Ex: 'a', 'button', etc.\n     *\n     * Not required at instantiation time, but should be set using {@link #setTagName} before {@link #toAnchorString}\n     * is executed.\n     */\n    this.tagName = ''; // default value just to get the above doc comment in the ES5 output and documentation generator\n    /**\n     * @cfg {Object.} attrs\n     *\n     * An key/value Object (map) of attributes to create the tag with. The keys are the attribute names, and the\n     * values are the attribute values.\n     */\n    this.attrs = {}; // default value just to get the above doc comment in the ES5 output and documentation generator\n    /**\n     * @cfg {String} innerHTML\n     *\n     * The inner HTML for the tag.\n     */\n    this.innerHTML = ''; // default value just to get the above doc comment in the ES5 output and documentation generator\n    this.tagName = cfg.tagName || '';\n    this.attrs = cfg.attrs || {};\n    this.innerHTML = cfg.innerHtml || cfg.innerHTML || ''; // accept either the camelCased form or the fully capitalized acronym as in the DOM\n  }\n  /**\n   * Sets the tag name that will be used to generate the tag with.\n   *\n   * @param {String} tagName\n   * @return {Autolinker.HtmlTag} This HtmlTag instance, so that method calls may be chained.\n   */\n  HtmlTag.prototype.setTagName = function (tagName) {\n    this.tagName = tagName;\n    return this;\n  };\n  /**\n   * Retrieves the tag name.\n   *\n   * @return {String}\n   */\n  HtmlTag.prototype.getTagName = function () {\n    return this.tagName || '';\n  };\n  /**\n   * Sets an attribute on the HtmlTag.\n   *\n   * @param {String} attrName The attribute name to set.\n   * @param {String} attrValue The attribute value to set.\n   * @return {Autolinker.HtmlTag} This HtmlTag instance, so that method calls may be chained.\n   */\n  HtmlTag.prototype.setAttr = function (attrName, attrValue) {\n    var tagAttrs = this.getAttrs();\n    tagAttrs[attrName] = attrValue;\n    return this;\n  };\n  /**\n   * Retrieves an attribute from the HtmlTag. If the attribute does not exist, returns `undefined`.\n   *\n   * @param {String} attrName The attribute name to retrieve.\n   * @return {String} The attribute's value, or `undefined` if it does not exist on the HtmlTag.\n   */\n  HtmlTag.prototype.getAttr = function (attrName) {\n    return this.getAttrs()[attrName];\n  };\n  /**\n   * Sets one or more attributes on the HtmlTag.\n   *\n   * @param {Object.} attrs A key/value Object (map) of the attributes to set.\n   * @return {Autolinker.HtmlTag} This HtmlTag instance, so that method calls may be chained.\n   */\n  HtmlTag.prototype.setAttrs = function (attrs) {\n    Object.assign(this.getAttrs(), attrs);\n    return this;\n  };\n  /**\n   * Retrieves the attributes Object (map) for the HtmlTag.\n   *\n   * @return {Object.} A key/value object of the attributes for the HtmlTag.\n   */\n  HtmlTag.prototype.getAttrs = function () {\n    return this.attrs || (this.attrs = {});\n  };\n  /**\n   * Sets the provided `cssClass`, overwriting any current CSS classes on the HtmlTag.\n   *\n   * @param {String} cssClass One or more space-separated CSS classes to set (overwrite).\n   * @return {Autolinker.HtmlTag} This HtmlTag instance, so that method calls may be chained.\n   */\n  HtmlTag.prototype.setClass = function (cssClass) {\n    return this.setAttr('class', cssClass);\n  };\n  /**\n   * Convenience method to add one or more CSS classes to the HtmlTag. Will not add duplicate CSS classes.\n   *\n   * @param {String} cssClass One or more space-separated CSS classes to add.\n   * @return {Autolinker.HtmlTag} This HtmlTag instance, so that method calls may be chained.\n   */\n  HtmlTag.prototype.addClass = function (cssClass) {\n    var classAttr = this.getClass(),\n      classes = !classAttr ? [] : classAttr.split(whitespaceRe),\n      newClasses = cssClass.split(whitespaceRe),\n      newClass;\n    while (newClass = newClasses.shift()) {\n      if (classes.indexOf(newClass) === -1) {\n        classes.push(newClass);\n      }\n    }\n    this.getAttrs()['class'] = classes.join(' ');\n    return this;\n  };\n  /**\n   * Convenience method to remove one or more CSS classes from the HtmlTag.\n   *\n   * @param {String} cssClass One or more space-separated CSS classes to remove.\n   * @return {Autolinker.HtmlTag} This HtmlTag instance, so that method calls may be chained.\n   */\n  HtmlTag.prototype.removeClass = function (cssClass) {\n    var classAttr = this.getClass(),\n      classes = !classAttr ? [] : classAttr.split(whitespaceRe),\n      removeClasses = cssClass.split(whitespaceRe),\n      removeClass;\n    while (classes.length && (removeClass = removeClasses.shift())) {\n      var idx = classes.indexOf(removeClass);\n      if (idx !== -1) {\n        classes.splice(idx, 1);\n      }\n    }\n    this.getAttrs()['class'] = classes.join(' ');\n    return this;\n  };\n  /**\n   * Convenience method to retrieve the CSS class(es) for the HtmlTag, which will each be separated by spaces when\n   * there are multiple.\n   *\n   * @return {String}\n   */\n  HtmlTag.prototype.getClass = function () {\n    return this.getAttrs()['class'] || '';\n  };\n  /**\n   * Convenience method to check if the tag has a CSS class or not.\n   *\n   * @param {String} cssClass The CSS class to check for.\n   * @return {Boolean} `true` if the HtmlTag has the CSS class, `false` otherwise.\n   */\n  HtmlTag.prototype.hasClass = function (cssClass) {\n    return (' ' + this.getClass() + ' ').indexOf(' ' + cssClass + ' ') !== -1;\n  };\n  /**\n   * Sets the inner HTML for the tag.\n   *\n   * @param {String} html The inner HTML to set.\n   * @return {Autolinker.HtmlTag} This HtmlTag instance, so that method calls may be chained.\n   */\n  HtmlTag.prototype.setInnerHTML = function (html) {\n    this.innerHTML = html;\n    return this;\n  };\n  /**\n   * Backwards compatibility method name.\n   *\n   * @param {String} html The inner HTML to set.\n   * @return {Autolinker.HtmlTag} This HtmlTag instance, so that method calls may be chained.\n   */\n  HtmlTag.prototype.setInnerHtml = function (html) {\n    return this.setInnerHTML(html);\n  };\n  /**\n   * Retrieves the inner HTML for the tag.\n   *\n   * @return {String}\n   */\n  HtmlTag.prototype.getInnerHTML = function () {\n    return this.innerHTML || '';\n  };\n  /**\n   * Backward compatibility method name.\n   *\n   * @return {String}\n   */\n  HtmlTag.prototype.getInnerHtml = function () {\n    return this.getInnerHTML();\n  };\n  /**\n   * Generates the HTML string for the tag.\n   *\n   * @return {String}\n   */\n  HtmlTag.prototype.toAnchorString = function () {\n    var tagName = this.getTagName(),\n      attrsStr = this.buildAttrsStr();\n    attrsStr = attrsStr ? ' ' + attrsStr : ''; // prepend a space if there are actually attributes\n    return ['<', tagName, attrsStr, '>', this.getInnerHtml(), ''].join('');\n  };\n  /**\n   * Support method for {@link #toAnchorString}, returns the string space-separated key=\"value\" pairs, used to populate\n   * the stringified HtmlTag.\n   *\n   * @protected\n   * @return {String} Example return: `attr1=\"value1\" attr2=\"value2\"`\n   */\n  HtmlTag.prototype.buildAttrsStr = function () {\n    if (!this.attrs) return ''; // no `attrs` Object (map) has been set, return empty string\n    var attrs = this.getAttrs(),\n      attrsArr = [];\n    for (var prop in attrs) {\n      if (attrs.hasOwnProperty(prop)) {\n        attrsArr.push(prop + '=\"' + attrs[prop] + '\"');\n      }\n    }\n    return attrsArr.join(' ');\n  };\n  return HtmlTag;\n}();\nexport { HtmlTag };\n","/**\n * Date: 2015-10-05\n * Author: Kasper Søfren  (https://github.com/kafoso)\n *\n * A truncation feature, where the ellipsis will be placed at a section within\n * the URL making it still somewhat human readable.\n *\n * @param {String} url\t\t\t\t\t\t A URL.\n * @param {Number} truncateLen\t\t The maximum length of the truncated output URL string.\n * @param {String} ellipsisChars\t The characters to place within the url, e.g. \"...\".\n * @return {String} The truncated URL.\n */\nexport function truncateSmart(url, truncateLen, ellipsisChars) {\n  var ellipsisLengthBeforeParsing;\n  var ellipsisLength;\n  if (ellipsisChars == null) {\n    ellipsisChars = '…';\n    ellipsisLength = 3;\n    ellipsisLengthBeforeParsing = 8;\n  } else {\n    ellipsisLength = ellipsisChars.length;\n    ellipsisLengthBeforeParsing = ellipsisChars.length;\n  }\n  var parse_url = function (url) {\n    // Functionality inspired by PHP function of same name\n    var urlObj = {};\n    var urlSub = url;\n    var match = urlSub.match(/^([a-z]+):\\/\\//i);\n    if (match) {\n      urlObj.scheme = match[1];\n      urlSub = urlSub.substr(match[0].length);\n    }\n    match = urlSub.match(/^(.*?)(?=(\\?|#|\\/|$))/i);\n    if (match) {\n      urlObj.host = match[1];\n      urlSub = urlSub.substr(match[0].length);\n    }\n    match = urlSub.match(/^\\/(.*?)(?=(\\?|#|$))/i);\n    if (match) {\n      urlObj.path = match[1];\n      urlSub = urlSub.substr(match[0].length);\n    }\n    match = urlSub.match(/^\\?(.*?)(?=(#|$))/i);\n    if (match) {\n      urlObj.query = match[1];\n      urlSub = urlSub.substr(match[0].length);\n    }\n    match = urlSub.match(/^#(.*?)$/i);\n    if (match) {\n      urlObj.fragment = match[1];\n      //urlSub = urlSub.substr(match[0].length);  -- not used. Uncomment if adding another block.\n    }\n    return urlObj;\n  };\n  var buildUrl = function (urlObj) {\n    var url = '';\n    if (urlObj.scheme && urlObj.host) {\n      url += urlObj.scheme + '://';\n    }\n    if (urlObj.host) {\n      url += urlObj.host;\n    }\n    if (urlObj.path) {\n      url += '/' + urlObj.path;\n    }\n    if (urlObj.query) {\n      url += '?' + urlObj.query;\n    }\n    if (urlObj.fragment) {\n      url += '#' + urlObj.fragment;\n    }\n    return url;\n  };\n  var buildSegment = function (segment, remainingAvailableLength) {\n    var remainingAvailableLengthHalf = remainingAvailableLength / 2,\n      startOffset = Math.ceil(remainingAvailableLengthHalf),\n      endOffset = -1 * Math.floor(remainingAvailableLengthHalf),\n      end = '';\n    if (endOffset < 0) {\n      end = segment.substr(endOffset);\n    }\n    return segment.substr(0, startOffset) + ellipsisChars + end;\n  };\n  if (url.length <= truncateLen) {\n    return url;\n  }\n  var availableLength = truncateLen - ellipsisLength;\n  var urlObj = parse_url(url);\n  // Clean up the URL\n  if (urlObj.query) {\n    var matchQuery = urlObj.query.match(/^(.*?)(?=(\\?|\\#))(.*?)$/i);\n    if (matchQuery) {\n      // Malformed URL; two or more \"?\". Removed any content behind the 2nd.\n      urlObj.query = urlObj.query.substr(0, matchQuery[1].length);\n      url = buildUrl(urlObj);\n    }\n  }\n  if (url.length <= truncateLen) {\n    return url;\n  }\n  if (urlObj.host) {\n    urlObj.host = urlObj.host.replace(/^www\\./, '');\n    url = buildUrl(urlObj);\n  }\n  if (url.length <= truncateLen) {\n    return url;\n  }\n  // Process and build the URL\n  var str = '';\n  if (urlObj.host) {\n    str += urlObj.host;\n  }\n  if (str.length >= availableLength) {\n    if (urlObj.host.length == truncateLen) {\n      return (urlObj.host.substr(0, truncateLen - ellipsisLength) + ellipsisChars).substr(0, availableLength + ellipsisLengthBeforeParsing);\n    }\n    return buildSegment(str, availableLength).substr(0, availableLength + ellipsisLengthBeforeParsing);\n  }\n  var pathAndQuery = '';\n  if (urlObj.path) {\n    pathAndQuery += '/' + urlObj.path;\n  }\n  if (urlObj.query) {\n    pathAndQuery += '?' + urlObj.query;\n  }\n  if (pathAndQuery) {\n    if ((str + pathAndQuery).length >= availableLength) {\n      if ((str + pathAndQuery).length == truncateLen) {\n        return (str + pathAndQuery).substr(0, truncateLen);\n      }\n      var remainingAvailableLength = availableLength - str.length;\n      return (str + buildSegment(pathAndQuery, remainingAvailableLength)).substr(0, availableLength + ellipsisLengthBeforeParsing);\n    } else {\n      str += pathAndQuery;\n    }\n  }\n  if (urlObj.fragment) {\n    var fragment = '#' + urlObj.fragment;\n    if ((str + fragment).length >= availableLength) {\n      if ((str + fragment).length == truncateLen) {\n        return (str + fragment).substr(0, truncateLen);\n      }\n      var remainingAvailableLength2 = availableLength - str.length;\n      return (str + buildSegment(fragment, remainingAvailableLength2)).substr(0, availableLength + ellipsisLengthBeforeParsing);\n    } else {\n      str += fragment;\n    }\n  }\n  if (urlObj.scheme && urlObj.host) {\n    var scheme = urlObj.scheme + '://';\n    if ((str + scheme).length < availableLength) {\n      return (scheme + str).substr(0, truncateLen);\n    }\n  }\n  if (str.length <= truncateLen) {\n    return str;\n  }\n  var end = '';\n  if (availableLength > 0) {\n    end = str.substr(-1 * Math.floor(availableLength / 2));\n  }\n  return (str.substr(0, Math.ceil(availableLength / 2)) + ellipsisChars + end).substr(0, availableLength + ellipsisLengthBeforeParsing);\n}\n","/**\n * Date: 2015-10-05\n * Author: Kasper Søfren  (https://github.com/kafoso)\n *\n * A truncation feature, where the ellipsis will be placed in the dead-center of the URL.\n *\n * @param {String} url             A URL.\n * @param {Number} truncateLen     The maximum length of the truncated output URL string.\n * @param {String} ellipsisChars   The characters to place within the url, e.g. \"..\".\n * @return {String} The truncated URL.\n */\nexport function truncateMiddle(url, truncateLen, ellipsisChars) {\n  if (url.length <= truncateLen) {\n    return url;\n  }\n  var ellipsisLengthBeforeParsing;\n  var ellipsisLength;\n  if (ellipsisChars == null) {\n    ellipsisChars = '…';\n    ellipsisLengthBeforeParsing = 8;\n    ellipsisLength = 3;\n  } else {\n    ellipsisLengthBeforeParsing = ellipsisChars.length;\n    ellipsisLength = ellipsisChars.length;\n  }\n  var availableLength = truncateLen - ellipsisLength;\n  var end = '';\n  if (availableLength > 0) {\n    end = url.substr(-1 * Math.floor(availableLength / 2));\n  }\n  return (url.substr(0, Math.ceil(availableLength / 2)) + ellipsisChars + end).substr(0, availableLength + ellipsisLengthBeforeParsing);\n}\n","import { ellipsis } from '../utils';\n/**\n * A truncation feature where the ellipsis will be placed at the end of the URL.\n *\n * @param {String} anchorText\n * @param {Number} truncateLen The maximum length of the truncated output URL string.\n * @param {String} ellipsisChars The characters to place within the url, e.g. \"..\".\n * @return {String} The truncated URL.\n */\nexport function truncateEnd(anchorText, truncateLen, ellipsisChars) {\n  return ellipsis(anchorText, truncateLen, ellipsisChars);\n}\n","import { HtmlTag } from './html-tag';\nimport { truncateSmart } from './truncate/truncate-smart';\nimport { truncateMiddle } from './truncate/truncate-middle';\nimport { truncateEnd } from './truncate/truncate-end';\n/**\n * @protected\n * @class Autolinker.AnchorTagBuilder\n * @extends Object\n *\n * Builds anchor (<a>) tags for the Autolinker utility when a match is\n * found.\n *\n * Normally this class is instantiated, configured, and used internally by an\n * {@link Autolinker} instance, but may actually be used indirectly in a\n * {@link Autolinker#replaceFn replaceFn} to create {@link Autolinker.HtmlTag HtmlTag}\n * instances which may be modified before returning from the\n * {@link Autolinker#replaceFn replaceFn}. For example:\n *\n *     var html = Autolinker.link( \"Test google.com\", {\n *         replaceFn : function( match ) {\n *             var tag = match.buildTag();  // returns an {@link Autolinker.HtmlTag} instance\n *             tag.setAttr( 'rel', 'nofollow' );\n *\n *             return tag;\n *         }\n *     } );\n *\n *     // generated html:\n *     //   Test google.com\n */\nvar AnchorTagBuilder = /** @class */function () {\n  /**\n   * @method constructor\n   * @param {Object} [cfg] The configuration options for the AnchorTagBuilder instance, specified in an Object (map).\n   */\n  function AnchorTagBuilder(cfg) {\n    if (cfg === void 0) {\n      cfg = {};\n    }\n    /**\n     * @cfg {Boolean} newWindow\n     * @inheritdoc Autolinker#newWindow\n     */\n    this.newWindow = false; // default value just to get the above doc comment in the ES5 output and documentation generator\n    /**\n     * @cfg {Object} truncate\n     * @inheritdoc Autolinker#truncate\n     */\n    this.truncate = {}; // default value just to get the above doc comment in the ES5 output and documentation generator\n    /**\n     * @cfg {String} className\n     * @inheritdoc Autolinker#className\n     */\n    this.className = ''; // default value just to get the above doc comment in the ES5 output and documentation generator\n    this.newWindow = cfg.newWindow || false;\n    this.truncate = cfg.truncate || {};\n    this.className = cfg.className || '';\n  }\n  /**\n   * Generates the actual anchor (<a>) tag to use in place of the\n   * matched text, via its `match` object.\n   *\n   * @param match The Match instance to generate an anchor tag from.\n   * @return The HtmlTag instance for the anchor tag.\n   */\n  AnchorTagBuilder.prototype.build = function (match) {\n    return new HtmlTag({\n      tagName: 'a',\n      attrs: this.createAttrs(match),\n      innerHtml: this.processAnchorText(match.getAnchorText())\n    });\n  };\n  /**\n   * Creates the Object (map) of the HTML attributes for the anchor (<a>)\n   *   tag being generated.\n   *\n   * @protected\n   * @param match The Match instance to generate an anchor tag from.\n   * @return A key/value Object (map) of the anchor tag's attributes.\n   */\n  AnchorTagBuilder.prototype.createAttrs = function (match) {\n    var attrs = {\n      href: match.getAnchorHref() // we'll always have the `href` attribute\n    };\n    var cssClass = this.createCssClass(match);\n    if (cssClass) {\n      attrs['class'] = cssClass;\n    }\n    if (this.newWindow) {\n      attrs['target'] = '_blank';\n      attrs['rel'] = 'noopener noreferrer'; // Issue #149. See https://mathiasbynens.github.io/rel-noopener/\n    }\n    if (this.truncate) {\n      if (this.truncate.length && this.truncate.length < match.getAnchorText().length) {\n        attrs['title'] = match.getAnchorHref();\n      }\n    }\n    return attrs;\n  };\n  /**\n   * Creates the CSS class that will be used for a given anchor tag, based on\n   * the `matchType` and the {@link #className} config.\n   *\n   * Example returns:\n   *\n   * - \"\"                                      // no {@link #className}\n   * - \"myLink myLink-url\"                     // url match\n   * - \"myLink myLink-email\"                   // email match\n   * - \"myLink myLink-phone\"                   // phone match\n   * - \"myLink myLink-hashtag\"                 // hashtag match\n   * - \"myLink myLink-mention myLink-twitter\"  // mention match with Twitter service\n   *\n   * @protected\n   * @param match The Match instance to generate an\n   *   anchor tag from.\n   * @return The CSS class string for the link. Example return:\n   *   \"myLink myLink-url\". If no {@link #className} was configured, returns\n   *   an empty string.\n   */\n  AnchorTagBuilder.prototype.createCssClass = function (match) {\n    var className = this.className;\n    if (!className) {\n      return '';\n    } else {\n      var returnClasses = [className],\n        cssClassSuffixes = match.getCssClassSuffixes();\n      for (var i = 0, len = cssClassSuffixes.length; i < len; i++) {\n        returnClasses.push(className + '-' + cssClassSuffixes[i]);\n      }\n      return returnClasses.join(' ');\n    }\n  };\n  /**\n   * Processes the `anchorText` by truncating the text according to the\n   * {@link #truncate} config.\n   *\n   * @private\n   * @param anchorText The anchor tag's text (i.e. what will be\n   *   displayed).\n   * @return The processed `anchorText`.\n   */\n  AnchorTagBuilder.prototype.processAnchorText = function (anchorText) {\n    anchorText = this.doTruncate(anchorText);\n    return anchorText;\n  };\n  /**\n   * Performs the truncation of the `anchorText` based on the {@link #truncate}\n   * option. If the `anchorText` is longer than the length specified by the\n   * {@link #truncate} option, the truncation is performed based on the\n   * `location` property. See {@link #truncate} for details.\n   *\n   * @private\n   * @param anchorText The anchor tag's text (i.e. what will be\n   *   displayed).\n   * @return The truncated anchor text.\n   */\n  AnchorTagBuilder.prototype.doTruncate = function (anchorText) {\n    var truncate = this.truncate;\n    if (!truncate || !truncate.length) return anchorText;\n    var truncateLength = truncate.length,\n      truncateLocation = truncate.location;\n    if (truncateLocation === 'smart') {\n      return truncateSmart(anchorText, truncateLength);\n    } else if (truncateLocation === 'middle') {\n      return truncateMiddle(anchorText, truncateLength);\n    } else {\n      return truncateEnd(anchorText, truncateLength);\n    }\n  };\n  return AnchorTagBuilder;\n}();\nexport { AnchorTagBuilder };\n","/**\n * @abstract\n * @class Autolinker.match.AbstractMatch\n *\n * Represents a match found in an input string which should be Autolinked. A Match object is what is provided in a\n * {@link Autolinker#replaceFn replaceFn}, and may be used to query for details about the match.\n *\n * For example:\n *\n *     var input = \"...\";  // string with URLs, Email Addresses, and Mentions (Twitter, Instagram, Soundcloud)\n *\n *     var linkedText = Autolinker.link( input, {\n *         replaceFn : function( match ) {\n *             console.log( \"href = \", match.getAnchorHref() );\n *             console.log( \"text = \", match.getAnchorText() );\n *\n *             switch( match.getType() ) {\n *                 case 'url' :\n *                     console.log( \"url: \", match.getUrl() );\n *\n *                 case 'email' :\n *                     console.log( \"email: \", match.getEmail() );\n *\n *                 case 'mention' :\n *                     console.log( \"mention: \", match.getMention() );\n *             }\n *         }\n *     } );\n *\n * See the {@link Autolinker} class for more details on using the {@link Autolinker#replaceFn replaceFn}.\n */\nvar AbstractMatch = /** @class */function () {\n  /**\n   * @member Autolinker.match.Match\n   * @method constructor\n   * @param {Object} cfg The configuration properties for the Match\n   *   instance, specified in an Object (map).\n   */\n  function AbstractMatch(cfg) {\n    /**\n     * @cfg {Autolinker.AnchorTagBuilder} tagBuilder (required)\n     *\n     * Reference to the AnchorTagBuilder instance to use to generate an anchor\n     * tag for the Match.\n     */\n    // @ts-ignore\n    this._ = null; // property used just to get the above doc comment into the ES5 output and documentation generator\n    /**\n     * @cfg {String} matchedText (required)\n     *\n     * The original text that was matched by the {@link Autolinker.matcher.Matcher}.\n     */\n    this.matchedText = ''; // default value just to get the above doc comment in the ES5 output and documentation generator\n    /**\n     * @cfg {Number} offset (required)\n     *\n     * The offset of where the match was made in the input string.\n     */\n    this.offset = 0; // default value just to get the above doc comment in the ES5 output and documentation generator\n    this.tagBuilder = cfg.tagBuilder;\n    this.matchedText = cfg.matchedText;\n    this.offset = cfg.offset;\n  }\n  /**\n   * Returns the original text that was matched.\n   *\n   * @return {String}\n   */\n  AbstractMatch.prototype.getMatchedText = function () {\n    return this.matchedText;\n  };\n  /**\n   * Sets the {@link #offset} of where the match was made in the input string.\n   *\n   * A {@link Autolinker.matcher.Matcher} will be fed only HTML text nodes,\n   * and will therefore set an original offset that is relative to the HTML\n   * text node itself. However, we want this offset to be relative to the full\n   * HTML input string, and thus if using {@link Autolinker#parse} (rather\n   * than calling a {@link Autolinker.matcher.Matcher} directly), then this\n   * offset is corrected after the Matcher itself has done its job.\n   *\n   * @private\n   * @param {Number} offset\n   */\n  AbstractMatch.prototype.setOffset = function (offset) {\n    this.offset = offset;\n  };\n  /**\n   * Returns the offset of where the match was made in the input string. This\n   * is the 0-based index of the match.\n   *\n   * @return {Number}\n   */\n  AbstractMatch.prototype.getOffset = function () {\n    return this.offset;\n  };\n  /**\n   * Returns the CSS class suffix(es) for this match.\n   *\n   * A CSS class suffix is appended to the {@link Autolinker#className} in\n   * the {@link Autolinker.AnchorTagBuilder} when a match is translated into\n   * an anchor tag.\n   *\n   * For example, if {@link Autolinker#className} was configured as 'myLink',\n   * and this method returns `[ 'url' ]`, the final class name of the element\n   * will become: 'myLink myLink-url'.\n   *\n   * The match may provide multiple CSS class suffixes to be appended to the\n   * {@link Autolinker#className} in order to facilitate better styling\n   * options for different match criteria. See {@link Autolinker.match.Mention}\n   * for an example.\n   *\n   * By default, this method returns a single array with the match's\n   * {@link #getType type} name, but may be overridden by subclasses.\n   *\n   * @return {String[]}\n   */\n  AbstractMatch.prototype.getCssClassSuffixes = function () {\n    return [this.type];\n  };\n  /**\n   * Builds and returns an {@link Autolinker.HtmlTag} instance based on the\n   * Match.\n   *\n   * This can be used to easily generate anchor tags from matches, and either\n   * return their HTML string, or modify them before doing so.\n   *\n   * Example Usage:\n   *\n   *     var tag = match.buildTag();\n   *     tag.addClass( 'cordova-link' );\n   *     tag.setAttr( 'target', '_system' );\n   *\n   *     tag.toAnchorString();  // Google\n   *\n   * Example Usage in {@link Autolinker#replaceFn}:\n   *\n   *     var html = Autolinker.link( \"Test google.com\", {\n   *         replaceFn : function( match ) {\n   *             var tag = match.buildTag();  // returns an {@link Autolinker.HtmlTag} instance\n   *             tag.setAttr( 'rel', 'nofollow' );\n   *\n   *             return tag;\n   *         }\n   *     } );\n   *\n   *     // generated html:\n   *     //   Test google.com\n   */\n  AbstractMatch.prototype.buildTag = function () {\n    return this.tagBuilder.build(this);\n  };\n  return AbstractMatch;\n}();\nexport { AbstractMatch };\n","// NOTE: THIS IS A GENERATED FILE\n// To update with the latest TLD list, run `npm run update-tld-regex`\nexport var tldRegexStr = '(?:xn--vermgensberatung-pwb|xn--vermgensberater-ctb|xn--clchc0ea0b2g2a9gcd|xn--w4r85el8fhu5dnra|northwesternmutual|travelersinsurance|vermögensberatung|xn--5su34j936bgsg|xn--bck1b9a5dre4c|xn--mgbah1a3hjkrd|xn--mgbai9azgqp6j|xn--mgberp4a5d4ar|xn--xkc2dl3a5ee0h|vermögensberater|xn--fzys8d69uvgm|xn--mgba7c0bbn0a|xn--mgbcpq6gpa1a|xn--xkc2al3hye2a|americanexpress|kerryproperties|sandvikcoromant|xn--i1b6b1a6a2e|xn--kcrx77d1x4a|xn--lgbbat1ad8j|xn--mgba3a4f16a|xn--mgbaakc7dvf|xn--mgbc0a9azcg|xn--nqv7fs00ema|americanfamily|bananarepublic|cancerresearch|cookingchannel|kerrylogistics|weatherchannel|xn--54b7fta0cc|xn--6qq986b3xl|xn--80aqecdr1a|xn--b4w605ferd|xn--fiq228c5hs|xn--h2breg3eve|xn--jlq480n2rg|xn--jlq61u9w7b|xn--mgba3a3ejt|xn--mgbaam7a8h|xn--mgbayh7gpa|xn--mgbbh1a71e|xn--mgbca7dzdo|xn--mgbi4ecexp|xn--mgbx4cd0ab|xn--rvc1e0am3e|international|lifeinsurance|travelchannel|wolterskluwer|xn--cckwcxetd|xn--eckvdtc9d|xn--fpcrj9c3d|xn--fzc2c9e2c|xn--h2brj9c8c|xn--tiq49xqyj|xn--yfro4i67o|xn--ygbi2ammx|construction|lplfinancial|scholarships|versicherung|xn--3e0b707e|xn--45br5cyl|xn--4dbrk0ce|xn--80adxhks|xn--80asehdb|xn--8y0a063a|xn--gckr3f0f|xn--mgb9awbf|xn--mgbab2bd|xn--mgbgu82a|xn--mgbpl2fh|xn--mgbt3dhd|xn--mk1bu44c|xn--ngbc5azd|xn--ngbe9e0a|xn--ogbpf8fl|xn--qcka1pmc|accountants|barclaycard|blackfriday|blockbuster|bridgestone|calvinklein|contractors|creditunion|engineering|enterprises|foodnetwork|investments|kerryhotels|lamborghini|motorcycles|olayangroup|photography|playstation|productions|progressive|redumbrella|williamhill|xn--11b4c3d|xn--1ck2e1b|xn--1qqw23a|xn--2scrj9c|xn--3bst00m|xn--3ds443g|xn--3hcrj9c|xn--42c2d9a|xn--45brj9c|xn--55qw42g|xn--6frz82g|xn--80ao21a|xn--9krt00a|xn--cck2b3b|xn--czr694b|xn--d1acj3b|xn--efvy88h|xn--fct429k|xn--fjq720a|xn--flw351e|xn--g2xx48c|xn--gecrj9c|xn--gk3at1e|xn--h2brj9c|xn--hxt814e|xn--imr513n|xn--j6w193g|xn--jvr189m|xn--kprw13d|xn--kpry57d|xn--mgbbh1a|xn--mgbtx2b|xn--mix891f|xn--nyqy26a|xn--otu796d|xn--pgbs0dh|xn--q9jyb4c|xn--rhqv96g|xn--rovu88b|xn--s9brj9c|xn--ses554g|xn--t60b56a|xn--vuq861b|xn--w4rs40l|xn--xhq521b|xn--zfr164b|சிங்கப்பூர்|accountant|apartments|associates|basketball|bnpparibas|boehringer|capitalone|consulting|creditcard|cuisinella|eurovision|extraspace|foundation|healthcare|immobilien|industries|management|mitsubishi|nextdirect|properties|protection|prudential|realestate|republican|restaurant|schaeffler|tatamotors|technology|university|vlaanderen|volkswagen|xn--30rr7y|xn--3pxu8k|xn--45q11c|xn--4gbrim|xn--55qx5d|xn--5tzm5g|xn--80aswg|xn--90a3ac|xn--9dbq2a|xn--9et52u|xn--c2br7g|xn--cg4bki|xn--czrs0t|xn--czru2d|xn--fiq64b|xn--fiqs8s|xn--fiqz9s|xn--io0a7i|xn--kput3i|xn--mxtq1m|xn--o3cw4h|xn--pssy2u|xn--q7ce6a|xn--unup4y|xn--wgbh1c|xn--wgbl6a|xn--y9a3aq|accenture|alfaromeo|allfinanz|amsterdam|analytics|aquarelle|barcelona|bloomberg|christmas|community|directory|education|equipment|fairwinds|financial|firestone|fresenius|frontdoor|furniture|goldpoint|hisamitsu|homedepot|homegoods|homesense|institute|insurance|kuokgroup|lancaster|landrover|lifestyle|marketing|marshalls|melbourne|microsoft|panasonic|passagens|pramerica|richardli|shangrila|solutions|statebank|statefarm|stockholm|travelers|vacations|xn--90ais|xn--c1avg|xn--d1alf|xn--e1a4c|xn--fhbei|xn--j1aef|xn--j1amh|xn--l1acc|xn--ngbrx|xn--nqv7f|xn--p1acf|xn--qxa6a|xn--tckwe|xn--vhquv|yodobashi|موريتانيا|abudhabi|airforce|allstate|attorney|barclays|barefoot|bargains|baseball|boutique|bradesco|broadway|brussels|builders|business|capetown|catering|catholic|cipriani|cityeats|cleaning|clinique|clothing|commbank|computer|delivery|deloitte|democrat|diamonds|discount|discover|download|engineer|ericsson|etisalat|exchange|feedback|fidelity|firmdale|football|frontier|goodyear|grainger|graphics|guardian|hdfcbank|helsinki|holdings|hospital|infiniti|ipiranga|istanbul|jpmorgan|lighting|lundbeck|marriott|maserati|mckinsey|memorial|merckmsd|mortgage|observer|partners|pharmacy|pictures|plumbing|property|redstone|reliance|saarland|samsclub|security|services|shopping|showtime|softbank|software|stcgroup|supplies|training|vanguard|ventures|verisign|woodside|xn--90ae|xn--node|xn--p1ai|xn--qxam|yokohama|السعودية|abogado|academy|agakhan|alibaba|android|athleta|auction|audible|auspost|avianca|banamex|bauhaus|bentley|bestbuy|booking|brother|bugatti|capital|caravan|careers|channel|charity|chintai|citadel|clubmed|college|cologne|comcast|company|compare|contact|cooking|corsica|country|coupons|courses|cricket|cruises|dentist|digital|domains|exposed|express|farmers|fashion|ferrari|ferrero|finance|fishing|fitness|flights|florist|flowers|forsale|frogans|fujitsu|gallery|genting|godaddy|grocery|guitars|hamburg|hangout|hitachi|holiday|hosting|hoteles|hotmail|hyundai|ismaili|jewelry|juniper|kitchen|komatsu|lacaixa|lanxess|lasalle|latrobe|leclerc|limited|lincoln|markets|monster|netbank|netflix|network|neustar|okinawa|oldnavy|organic|origins|philips|pioneer|politie|realtor|recipes|rentals|reviews|rexroth|samsung|sandvik|schmidt|schwarz|science|shiksha|singles|staples|storage|support|surgery|systems|temasek|theater|theatre|tickets|tiffany|toshiba|trading|walmart|wanggou|watches|weather|website|wedding|whoswho|windows|winners|xfinity|yamaxun|youtube|zuerich|католик|اتصالات|البحرين|الجزائر|العليان|پاکستان|كاثوليك|இந்தியா|abarth|abbott|abbvie|africa|agency|airbus|airtel|alipay|alsace|alstom|amazon|anquan|aramco|author|bayern|beauty|berlin|bharti|bostik|boston|broker|camera|career|casino|center|chanel|chrome|church|circle|claims|clinic|coffee|comsec|condos|coupon|credit|cruise|dating|datsun|dealer|degree|dental|design|direct|doctor|dunlop|dupont|durban|emerck|energy|estate|events|expert|family|flickr|futbol|gallup|garden|george|giving|global|google|gratis|health|hermes|hiphop|hockey|hotels|hughes|imamat|insure|intuit|jaguar|joburg|juegos|kaufen|kinder|kindle|kosher|lancia|latino|lawyer|lefrak|living|locker|london|luxury|madrid|maison|makeup|market|mattel|mobile|monash|mormon|moscow|museum|mutual|nagoya|natura|nissan|nissay|norton|nowruz|office|olayan|online|oracle|orange|otsuka|pfizer|photos|physio|pictet|quebec|racing|realty|reisen|repair|report|review|rocher|rogers|ryukyu|safety|sakura|sanofi|school|schule|search|secure|select|shouji|soccer|social|stream|studio|supply|suzuki|swatch|sydney|taipei|taobao|target|tattoo|tennis|tienda|tjmaxx|tkmaxx|toyota|travel|unicom|viajes|viking|villas|virgin|vision|voting|voyage|vuelos|walter|webcam|xihuan|yachts|yandex|zappos|москва|онлайн|ابوظبي|ارامكو|الاردن|المغرب|امارات|فلسطين|مليسيا|भारतम्|இலங்கை|ファッション|actor|adult|aetna|amfam|amica|apple|archi|audio|autos|azure|baidu|beats|bible|bingo|black|boats|bosch|build|canon|cards|chase|cheap|cisco|citic|click|cloud|coach|codes|crown|cymru|dabur|dance|deals|delta|drive|dubai|earth|edeka|email|epson|faith|fedex|final|forex|forum|gallo|games|gifts|gives|glass|globo|gmail|green|gripe|group|gucci|guide|homes|honda|horse|house|hyatt|ikano|irish|jetzt|koeln|kyoto|lamer|lease|legal|lexus|lilly|linde|lipsy|loans|locus|lotte|lotto|macys|mango|media|miami|money|movie|music|nexus|nikon|ninja|nokia|nowtv|omega|osaka|paris|parts|party|phone|photo|pizza|place|poker|praxi|press|prime|promo|quest|radio|rehab|reise|ricoh|rocks|rodeo|rugby|salon|sener|seven|sharp|shell|shoes|skype|sling|smart|smile|solar|space|sport|stada|store|study|style|sucks|swiss|tatar|tires|tirol|tmall|today|tokyo|tools|toray|total|tours|trade|trust|tunes|tushu|ubank|vegas|video|vodka|volvo|wales|watch|weber|weibo|works|world|xerox|yahoo|ישראל|ایران|بازار|بھارت|سودان|سورية|همراه|भारोत|संगठन|বাংলা|భారత్|ഭാരതം|嘉里大酒店|aarp|able|adac|aero|akdn|ally|amex|arab|army|arpa|arte|asda|asia|audi|auto|baby|band|bank|bbva|beer|best|bike|bing|blog|blue|bofa|bond|book|buzz|cafe|call|camp|care|cars|casa|case|cash|cbre|cern|chat|citi|city|club|cool|coop|cyou|data|date|dclk|deal|dell|desi|diet|dish|docs|dvag|erni|fage|fail|fans|farm|fast|fiat|fido|film|fire|fish|flir|food|ford|free|fund|game|gbiz|gent|ggee|gift|gmbh|gold|golf|goog|guge|guru|hair|haus|hdfc|help|here|hgtv|host|hsbc|icbc|ieee|imdb|immo|info|itau|java|jeep|jobs|jprs|kddi|kids|kiwi|kpmg|kred|land|lego|lgbt|lidl|life|like|limo|link|live|loan|loft|love|ltda|luxe|maif|meet|meme|menu|mini|mint|mobi|moda|moto|name|navy|news|next|nico|nike|ollo|open|page|pars|pccw|pics|ping|pink|play|plus|pohl|porn|post|prod|prof|qpon|read|reit|rent|rest|rich|room|rsvp|ruhr|safe|sale|sarl|save|saxo|scot|seat|seek|sexy|shaw|shia|shop|show|silk|sina|site|skin|sncf|sohu|song|sony|spot|star|surf|talk|taxi|team|tech|teva|tiaa|tips|town|toys|tube|vana|visa|viva|vivo|vote|voto|wang|weir|wien|wiki|wine|work|xbox|yoga|zara|zero|zone|дети|сайт|بارت|بيتك|ڀارت|تونس|شبكة|عراق|عمان|موقع|भारत|ভারত|ভাৰত|ਭਾਰਤ|ભારત|ଭାରତ|ಭಾರತ|ලංකා|アマゾン|グーグル|クラウド|ポイント|组织机构|電訊盈科|香格里拉|aaa|abb|abc|aco|ads|aeg|afl|aig|anz|aol|app|art|aws|axa|bar|bbc|bbt|bcg|bcn|bet|bid|bio|biz|bms|bmw|bom|boo|bot|box|buy|bzh|cab|cal|cam|car|cat|cba|cbn|cbs|ceo|cfa|cfd|com|cpa|crs|dad|day|dds|dev|dhl|diy|dnp|dog|dot|dtv|dvr|eat|eco|edu|esq|eus|fan|fit|fly|foo|fox|frl|ftr|fun|fyi|gal|gap|gay|gdn|gea|gle|gmo|gmx|goo|gop|got|gov|hbo|hiv|hkt|hot|how|ibm|ice|icu|ifm|inc|ing|ink|int|ist|itv|jcb|jio|jll|jmp|jnj|jot|joy|kfh|kia|kim|kpn|krd|lat|law|lds|llc|llp|lol|lpl|ltd|man|map|mba|med|men|mil|mit|mlb|mls|mma|moe|moi|mom|mov|msd|mtn|mtr|nab|nba|nec|net|new|nfl|ngo|nhk|now|nra|nrw|ntt|nyc|obi|one|ong|onl|ooo|org|ott|ovh|pay|pet|phd|pid|pin|pnc|pro|pru|pub|pwc|red|ren|ril|rio|rip|run|rwe|sap|sas|sbi|sbs|sca|scb|ses|sew|sex|sfr|ski|sky|soy|spa|srl|stc|tab|tax|tci|tdk|tel|thd|tjx|top|trv|tui|tvs|ubs|uno|uol|ups|vet|vig|vin|vip|wed|win|wme|wow|wtc|wtf|xin|xxx|xyz|you|yun|zip|бел|ком|қаз|мкд|мон|орг|рус|срб|укр|հայ|קום|عرب|قطر|كوم|مصر|कॉम|नेट|คอม|ไทย|ລາວ|ストア|セール|みんな|中文网|亚马逊|天主教|我爱你|新加坡|淡马锡|诺基亚|飞利浦|ac|ad|ae|af|ag|ai|al|am|ao|aq|ar|as|at|au|aw|ax|az|ba|bb|bd|be|bf|bg|bh|bi|bj|bm|bn|bo|br|bs|bt|bv|bw|by|bz|ca|cc|cd|cf|cg|ch|ci|ck|cl|cm|cn|co|cr|cu|cv|cw|cx|cy|cz|de|dj|dk|dm|do|dz|ec|ee|eg|er|es|et|eu|fi|fj|fk|fm|fo|fr|ga|gb|gd|ge|gf|gg|gh|gi|gl|gm|gn|gp|gq|gr|gs|gt|gu|gw|gy|hk|hm|hn|hr|ht|hu|id|ie|il|im|in|io|iq|ir|is|it|je|jm|jo|jp|ke|kg|kh|ki|km|kn|kp|kr|kw|ky|kz|la|lb|lc|li|lk|lr|ls|lt|lu|lv|ly|ma|mc|md|me|mg|mh|mk|ml|mm|mn|mo|mp|mq|mr|ms|mt|mu|mv|mw|mx|my|mz|na|nc|ne|nf|ng|ni|nl|no|np|nr|nu|nz|om|pa|pe|pf|pg|ph|pk|pl|pm|pn|pr|ps|pt|pw|py|qa|re|ro|rs|ru|rw|sa|sb|sc|sd|se|sg|sh|si|sj|sk|sl|sm|sn|so|sr|ss|st|su|sv|sx|sy|sz|tc|td|tf|tg|th|tj|tk|tl|tm|tn|to|tr|tt|tv|tw|tz|ua|ug|uk|us|uy|uz|va|vc|ve|vg|vi|vn|vu|wf|ws|ye|yt|za|zm|zw|ελ|ευ|бг|ею|рф|გე|닷넷|닷컴|삼성|한국|コム|世界|中信|中国|中國|企业|佛山|信息|健康|八卦|公司|公益|台湾|台灣|商城|商店|商标|嘉里|在线|大拿|娱乐|家電|广东|微博|慈善|手机|招聘|政务|政府|新闻|时尚|書籍|机构|游戏|澳門|点看|移动|网址|网店|网站|网络|联通|谷歌|购物|通販|集团|食品|餐厅|香港)';\nexport var tldRegex = new RegExp('^' + tldRegexStr + '$');\n","import { alphaNumericAndMarksRe, letterRe, digitRe } from '../regex-lib';\nimport { tldRegex } from './tld-regex';\n/**\n * A regular expression that is simply the character class of the characters\n * that may be used in a domain name, minus the '-' or '.'\n */\nexport var domainNameCharRegex = alphaNumericAndMarksRe;\n/**\n * The set of characters that will start a URL suffix (i.e. the path, query, and\n * hash part of the URL)\n */\nexport var urlSuffixStartCharsRe = /[\\/?#]/;\n/**\n * The set of characters that are allowed in the URL suffix (i.e. the path,\n * query, and hash part of the URL) which may also form the ending character of\n * the URL.\n *\n * The {@link #urlSuffixNotAllowedAsLastCharRe} are additional allowed URL\n * suffix characters, but (generally) should not be the last character of a URL.\n */\nexport var urlSuffixAllowedSpecialCharsRe = /[-+&@#/%=~_()|'$*\\[\\]{}\\u2713]/;\n/**\n * URL suffix characters (i.e. path, query, and has part of the URL) that are\n * not allowed as the *last character* in the URL suffix as they would normally\n * form the end of a sentence.\n *\n * The {@link #urlSuffixAllowedSpecialCharsRe} contains additional allowed URL\n * suffix characters which are allowed as the last character.\n */\nexport var urlSuffixNotAllowedAsLastCharRe = /[?!:,.;^]/;\n/**\n * Regular expression to match an http:// or https:// scheme.\n */\nexport var httpSchemeRe = /https?:\\/\\//i;\n/**\n * Regular expression to match an http:// or https:// scheme as the prefix of\n * a string.\n */\nexport var httpSchemePrefixRe = new RegExp('^' + httpSchemeRe.source, 'i');\nexport var urlSuffixedCharsNotAllowedAtEndRe = new RegExp(urlSuffixNotAllowedAsLastCharRe.source + '$');\n/**\n * A regular expression used to determine the schemes we should not autolink\n */\nexport var invalidSchemeRe = /^(javascript|vbscript):/i;\n// A regular expression used to determine if the URL is a scheme match (such as\n// 'http://google.com', and as opposed to a \"TLD match\"). This regular\n// expression is used to parse out the host along with if the URL has an\n// authority component (i.e. '//')\n//\n// Capturing groups:\n//    1. '//' if the URL has an authority component, empty string otherwise\n//    2. The host (if one exists). Ex: 'google.com'\n//\n// See https://www.rfc-editor.org/rfc/rfc3986#appendix-A for terminology\nexport var schemeUrlRe = /^[A-Za-z][-.+A-Za-z0-9]*:(\\/\\/)?([^:/]*)/;\n// A regular expression used to determine if the URL is a TLD match (such as\n// 'google.com', and as opposed to a \"scheme match\"). This regular\n// expression is used to help parse out the TLD (top-level domain) of the host.\n//\n// See https://www.rfc-editor.org/rfc/rfc3986#appendix-A for terminology\nexport var tldUrlHostRe = /^(?:\\/\\/)?([^/#?:]+)/; // optionally prefixed with protocol-relative '//' chars\n/**\n * Determines if the given character may start a scheme (ex: 'http').\n */\nexport function isSchemeStartChar(char) {\n  return letterRe.test(char);\n}\n/**\n * Determines if the given character is a valid character in a scheme (such as\n * 'http' or 'ssh+git'), but only after the start char (which is handled by\n * {@link isSchemeStartChar}.\n */\nexport function isSchemeChar(char) {\n  return letterRe.test(char) || digitRe.test(char) || char === '+' || char === '-' || char === '.';\n}\n/**\n * Determines if the character can begin a domain label, which must be an\n * alphanumeric character and not an underscore or dash.\n *\n * A domain label is a segment of a hostname such as subdomain.google.com.\n */\nexport function isDomainLabelStartChar(char) {\n  return alphaNumericAndMarksRe.test(char);\n}\n/**\n * Determines if the character is part of a domain label (but not a domain label\n * start character).\n *\n * A domain label is a segment of a hostname such as subdomain.google.com.\n */\nexport function isDomainLabelChar(char) {\n  return char === '_' || isDomainLabelStartChar(char);\n}\n/**\n * Determines if the character is a path character (\"pchar\") as defined by\n * https://tools.ietf.org/html/rfc3986#appendix-A\n *\n *     pchar         = unreserved / pct-encoded / sub-delims / \":\" / \"@\"\n *\n *     unreserved    = ALPHA / DIGIT / \"-\" / \".\" / \"_\" / \"~\"\n *     pct-encoded   = \"%\" HEXDIG HEXDIG\n *     sub-delims    = \"!\" / \"$\" / \"&\" / \"'\" / \"(\" / \")\"\n *                   / \"*\" / \"+\" / \",\" / \";\" / \"=\"\n *\n * Note that this implementation doesn't follow the spec exactly, but rather\n * follows URL path characters found out in the wild (spec might be out of date?)\n */\nexport function isPathChar(char) {\n  return alphaNumericAndMarksRe.test(char) || urlSuffixAllowedSpecialCharsRe.test(char) || urlSuffixNotAllowedAsLastCharRe.test(char);\n}\n/**\n * Determines if the character given may begin the \"URL Suffix\" section of a\n * URI (i.e. the path, query, or hash section). These are the '/', '?' and '#'\n * characters.\n *\n * See https://tools.ietf.org/html/rfc3986#appendix-A\n */\nexport function isUrlSuffixStartChar(char) {\n  return urlSuffixStartCharsRe.test(char);\n}\n/**\n * Determines if the TLD read in the host is a known TLD (Top-Level Domain).\n *\n * Example: 'com' would be a known TLD (for a host of 'google.com'), but\n * 'local' would not (for a domain name of 'my-computer.local').\n */\nexport function isKnownTld(tld) {\n  return tldRegex.test(tld.toLowerCase()); // make sure the tld is lowercase for the regex\n}\n/**\n * Determines if the given `url` is a valid scheme-prefixed URL.\n */\nexport function isValidSchemeUrl(url) {\n  // If the scheme is 'javascript:' or 'vbscript:', these link\n  // types can be dangerous. Don't link them.\n  if (invalidSchemeRe.test(url)) {\n    return false;\n  }\n  var schemeMatch = url.match(schemeUrlRe);\n  if (!schemeMatch) {\n    return false;\n  }\n  var isAuthorityMatch = !!schemeMatch[1];\n  var host = schemeMatch[2];\n  if (isAuthorityMatch) {\n    // Any match that has an authority ('//' chars) after the scheme is\n    // valid, such as 'http://anything'\n    return true;\n  }\n  // If there's no authority ('//' chars), check that we have a hostname\n  // that looks valid.\n  //\n  // The host must contain at least one '.' char and have a domain label\n  // with at least one letter to be considered valid.\n  //\n  // Accept:\n  //   - git:domain.com (scheme followed by a host\n  // Do not accept:\n  //   - git:something ('something' doesn't look like a host)\n  //   - version:1.0   ('1.0' doesn't look like a host)\n  if (host.indexOf('.') === -1 || !letterRe.test(host)) {\n    return false;\n  }\n  return true;\n}\n/**\n * Determines if the given `url` is a match with a valid TLD.\n */\nexport function isValidTldMatch(url) {\n  // TLD URL such as 'google.com', we need to confirm that we have a valid\n  // top-level domain\n  var tldUrlHostMatch = url.match(tldUrlHostRe);\n  if (!tldUrlHostMatch) {\n    // At this point, if the URL didn't match our TLD re, it must be invalid\n    // (highly unlikely to happen, but just in case)\n    return false;\n  }\n  var host = tldUrlHostMatch[0];\n  var hostLabels = host.split('.');\n  if (hostLabels.length < 2) {\n    // 0 or 1 host label, there's no TLD. Ex: 'localhost'\n    return false;\n  }\n  var tld = hostLabels[hostLabels.length - 1];\n  if (!isKnownTld(tld)) {\n    return false;\n  }\n  // TODO: Implement these conditions for TLD matcher:\n  // (\n  //     this.longestDomainLabelLength <= 63 &&\n  //     this.domainNameLength <= 255\n  // );\n  return true;\n}\n// Regular expression to confirm a valid IPv4 address (ex: '192.168.0.1')\nvar ipV4Re = /^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/;\n// Regular expression used to split the IPv4 address itself from any port/path/query/hash\nvar ipV4PartRe = /[:/?#]/;\n/**\n * Determines if the given URL is a valid IPv4-prefixed URL.\n */\nexport function isValidIpV4Address(url) {\n  // Grab just the IP address\n  var ipV4Part = url.split(ipV4PartRe, 1)[0]; // only 1 result needed\n  return ipV4Re.test(ipV4Part);\n}\n","import { __extends } from \"tslib\";\nimport { AbstractMatch } from './abstract-match';\nimport { httpSchemePrefixRe } from '../parser/uri-utils';\n/**\n * A regular expression used to remove the 'www.' from URLs.\n */\nvar wwwPrefixRegex = /^(https?:\\/\\/)?(www\\.)?/i;\n/**\n * The regular expression used to remove the protocol-relative '//' from a URL\n * string, for purposes of formatting the anchor text. A protocol-relative URL\n * is, for example, \"//yahoo.com\"\n */\nvar protocolRelativeRegex = /^\\/\\//;\n/**\n * @class Autolinker.match.Url\n * @extends Autolinker.match.AbstractMatch\n *\n * Represents a Url match found in an input string which should be Autolinked.\n *\n * See this class's superclass ({@link Autolinker.match.Match}) for more details.\n */\nvar UrlMatch = /** @class */function (_super) {\n  __extends(UrlMatch, _super);\n  /**\n   * @method constructor\n   * @param {Object} cfg The configuration properties for the Match\n   *   instance, specified in an Object (map).\n   */\n  function UrlMatch(cfg) {\n    var _this = _super.call(this, cfg) || this;\n    /**\n     * @public\n     * @property {'url'} type\n     *\n     * A string name for the type of match that this class represents. Can be\n     * used in a TypeScript discriminating union to type-narrow from the\n     * `Match` type.\n     */\n    _this.type = 'url';\n    /**\n     * @cfg {String} url (required)\n     *\n     * The url that was matched.\n     */\n    _this.url = ''; // default value just to get the above doc comment in the ES5 output and documentation generator\n    /**\n     * @cfg {\"scheme\"/\"www\"/\"tld\"} urlMatchType (required)\n     *\n     * The type of URL match that this class represents. This helps to determine\n     * if the match was made in the original text with a prefixed scheme (ex:\n     * 'http://www.google.com'), a prefixed 'www' (ex: 'www.google.com'), or\n     * was matched by a known top-level domain (ex: 'google.com').\n     */\n    _this.urlMatchType = 'scheme'; // default value just to get the above doc comment in the ES5 output and documentation generator\n    /**\n     * @cfg {Boolean} protocolRelativeMatch (required)\n     *\n     * `true` if the URL is a protocol-relative match. A protocol-relative match\n     * is a URL that starts with '//', and will be either http:// or https://\n     * based on the protocol that the site is loaded under.\n     */\n    _this.protocolRelativeMatch = false; // default value just to get the above doc comment in the ES5 output and documentation generator\n    /**\n     * @cfg {Object} stripPrefix (required)\n     *\n     * The Object form of {@link Autolinker#cfg-stripPrefix}.\n     */\n    _this.stripPrefix = {\n      scheme: true,\n      www: true\n    }; // default value just to get the above doc comment in the ES5 output and documentation generator\n    /**\n     * @cfg {Boolean} stripTrailingSlash (required)\n     * @inheritdoc Autolinker#cfg-stripTrailingSlash\n     */\n    _this.stripTrailingSlash = true; // default value just to get the above doc comment in the ES5 output and documentation generator\n    /**\n     * @cfg {Boolean} decodePercentEncoding (required)\n     * @inheritdoc Autolinker#cfg-decodePercentEncoding\n     */\n    _this.decodePercentEncoding = true; // default value just to get the above doc comment in the ES5 output and documentation generator\n    /**\n     * @private\n     * @property {Boolean} protocolPrepended\n     *\n     * Will be set to `true` if the 'http://' protocol has been prepended to the {@link #url} (because the\n     * {@link #url} did not have a protocol)\n     */\n    _this.protocolPrepended = false;\n    _this.urlMatchType = cfg.urlMatchType;\n    _this.url = cfg.url;\n    _this.protocolRelativeMatch = cfg.protocolRelativeMatch;\n    _this.stripPrefix = cfg.stripPrefix;\n    _this.stripTrailingSlash = cfg.stripTrailingSlash;\n    _this.decodePercentEncoding = cfg.decodePercentEncoding;\n    return _this;\n  }\n  /**\n   * Returns a string name for the type of match that this class represents.\n   * For the case of UrlMatch, returns 'url'.\n   *\n   * @return {String}\n   */\n  UrlMatch.prototype.getType = function () {\n    return 'url';\n  };\n  /**\n   * Returns a string name for the type of URL match that this class\n   * represents.\n   *\n   * This helps to determine if the match was made in the original text with a\n   * prefixed scheme (ex: 'http://www.google.com'), a prefixed 'www' (ex:\n   * 'www.google.com'), or was matched by a known top-level domain (ex:\n   * 'google.com').\n   *\n   * @return {\"scheme\"/\"www\"/\"tld\"}\n   */\n  UrlMatch.prototype.getUrlMatchType = function () {\n    return this.urlMatchType;\n  };\n  /**\n   * Returns the url that was matched, assuming the protocol to be 'http://' if the original\n   * match was missing a protocol.\n   *\n   * @return {String}\n   */\n  UrlMatch.prototype.getUrl = function () {\n    var url = this.url;\n    // if the url string doesn't begin with a scheme, assume 'http://'\n    if (!this.protocolRelativeMatch && this.urlMatchType !== 'scheme' && !this.protocolPrepended) {\n      url = this.url = 'http://' + url;\n      this.protocolPrepended = true;\n    }\n    return url;\n  };\n  /**\n   * Returns the anchor href that should be generated for the match.\n   *\n   * @return {String}\n   */\n  UrlMatch.prototype.getAnchorHref = function () {\n    var url = this.getUrl();\n    return url.replace(/&/g, '&'); // any &'s in the URL should be converted back to '&' if they were displayed as & in the source html\n  };\n  /**\n   * Returns the anchor text that should be generated for the match.\n   *\n   * @return {String}\n   */\n  UrlMatch.prototype.getAnchorText = function () {\n    var anchorText = this.getMatchedText();\n    if (this.protocolRelativeMatch) {\n      // Strip off any protocol-relative '//' from the anchor text\n      anchorText = stripProtocolRelativePrefix(anchorText);\n    }\n    if (this.stripPrefix.scheme) {\n      anchorText = stripSchemePrefix(anchorText);\n    }\n    if (this.stripPrefix.www) {\n      anchorText = stripWwwPrefix(anchorText);\n    }\n    if (this.stripTrailingSlash) {\n      anchorText = removeTrailingSlash(anchorText); // remove trailing slash, if there is one\n    }\n    if (this.decodePercentEncoding) {\n      anchorText = removePercentEncoding(anchorText);\n    }\n    return anchorText;\n  };\n  return UrlMatch;\n}(AbstractMatch);\nexport { UrlMatch };\n// Utility Functionality\n/**\n * Strips the scheme prefix (such as \"http://\" or \"https://\") from the given\n * `url`.\n *\n * @private\n * @param {String} url The text of the anchor that is being generated, for\n *   which to strip off the url scheme.\n * @return {String} The `url`, with the scheme stripped.\n */\nfunction stripSchemePrefix(url) {\n  return url.replace(httpSchemePrefixRe, '');\n}\n/**\n * Strips the 'www' prefix from the given `url`.\n *\n * @private\n * @param {String} url The text of the anchor that is being generated, for\n *   which to strip off the 'www' if it exists.\n * @return {String} The `url`, with the 'www' stripped.\n */\nfunction stripWwwPrefix(url) {\n  return url.replace(wwwPrefixRegex, '$1'); // leave any scheme ($1), it one exists\n}\n/**\n * Strips any protocol-relative '//' from the anchor text.\n *\n * @private\n * @param {String} text The text of the anchor that is being generated, for which to strip off the\n *   protocol-relative prefix (such as stripping off \"//\")\n * @return {String} The `anchorText`, with the protocol-relative prefix stripped.\n */\nfunction stripProtocolRelativePrefix(text) {\n  return text.replace(protocolRelativeRegex, '');\n}\n/**\n * Removes any trailing slash from the given `anchorText`, in preparation for the text to be displayed.\n *\n * @private\n * @param {String} anchorText The text of the anchor that is being generated, for which to remove any trailing\n *   slash ('/') that may exist.\n * @return {String} The `anchorText`, with the trailing slash removed.\n */\nfunction removeTrailingSlash(anchorText) {\n  if (anchorText.charAt(anchorText.length - 1) === '/') {\n    anchorText = anchorText.slice(0, -1);\n  }\n  return anchorText;\n}\n/**\n * Decodes percent-encoded characters from the given `anchorText`, in\n * preparation for the text to be displayed.\n *\n * @private\n * @param {String} anchorText The text of the anchor that is being\n *   generated, for which to decode any percent-encoded characters.\n * @return {String} The `anchorText`, with the percent-encoded characters\n *   decoded.\n */\nfunction removePercentEncoding(anchorText) {\n  // First, convert a few of the known % encodings to the corresponding\n  // HTML entities that could accidentally be interpretted as special\n  // HTML characters\n  var preProcessedEntityAnchorText = anchorText.replace(/%22/gi, '"') // \" char\n  .replace(/%26/gi, '&') // & char\n  .replace(/%27/gi, ''') // ' char\n  .replace(/%3C/gi, '<') // < char\n  .replace(/%3E/gi, '>'); // > char\n  try {\n    // Now attempt to decode the rest of the anchor text\n    return decodeURIComponent(preProcessedEntityAnchorText);\n  } catch (e) {\n    // Invalid % escape sequence in the anchor text\n    return preProcessedEntityAnchorText;\n  }\n}\n","import { alphaNumericAndMarksCharsStr, alphaNumericAndMarksRe } from '../regex-lib';\nimport { isKnownTld } from './uri-utils';\n/**\n * A regular expression to match a 'mailto:' prefix on an email address.\n */\nexport var mailtoSchemePrefixRe = /^mailto:/i;\n/**\n * Regular expression for all of the valid characters of the local part of an\n * email address.\n */\nvar emailLocalPartCharRegex = new RegExp(\"[\".concat(alphaNumericAndMarksCharsStr, \"!#$%&'*+/=?^_`{|}~-]\"));\n/**\n * Determines if the given character may start the \"local part\" of an email\n * address. The local part is the part to the left of the '@' sign.\n *\n * Technically according to the email spec, any of the characters in the\n * {@link emailLocalPartCharRegex} can start an email address (including any of\n * the special characters), but this is so rare in the wild and the\n * implementation is much simpler by only starting an email address with a word\n * character. This is especially important when matching the '{' character which\n * generally starts a brace that isn't part of the email address.\n */\nexport function isEmailLocalPartStartChar(char) {\n  return alphaNumericAndMarksRe.test(char);\n}\n/**\n * Determines if the given character can be part of the \"local part\" of an email\n * address. The local part is the part to the left of the '@' sign.\n */\nexport function isEmailLocalPartChar(char) {\n  return emailLocalPartCharRegex.test(char);\n}\n/**\n * Determines if the given email address is valid. We consider it valid if it\n * has a valid TLD in its host.\n *\n * @param emailAddress email address\n * @return true is email have valid TLD, false otherwise\n */\nexport function isValidEmail(emailAddress) {\n  var emailAddressTld = emailAddress.split('.').pop() || '';\n  return isKnownTld(emailAddressTld);\n}\n","import { __extends } from \"tslib\";\nimport { AbstractMatch } from './abstract-match';\n/**\n * @class Autolinker.match.Email\n * @extends Autolinker.match.AbstractMatch\n *\n * Represents a Email match found in an input string which should be Autolinked.\n *\n * See this class's superclass ({@link Autolinker.match.Match}) for more details.\n */\nvar EmailMatch = /** @class */function (_super) {\n  __extends(EmailMatch, _super);\n  /**\n   * @method constructor\n   * @param {Object} cfg The configuration properties for the Match\n   *   instance, specified in an Object (map).\n   */\n  function EmailMatch(cfg) {\n    var _this = _super.call(this, cfg) || this;\n    /**\n     * @public\n     * @property {'email'} type\n     *\n     * A string name for the type of match that this class represents. Can be\n     * used in a TypeScript discriminating union to type-narrow from the\n     * `Match` type.\n     */\n    _this.type = 'email';\n    /**\n     * @cfg {String} email (required)\n     *\n     * The email address that was matched.\n     */\n    _this.email = ''; // default value just to get the above doc comment in the ES5 output and documentation generator\n    _this.email = cfg.email;\n    return _this;\n  }\n  /**\n   * Returns a string name for the type of match that this class represents.\n   * For the case of EmailMatch, returns 'email'.\n   *\n   * @return {String}\n   */\n  EmailMatch.prototype.getType = function () {\n    return 'email';\n  };\n  /**\n   * Returns the email address that was matched.\n   *\n   * @return {String}\n   */\n  EmailMatch.prototype.getEmail = function () {\n    return this.email;\n  };\n  /**\n   * Returns the anchor href that should be generated for the match.\n   *\n   * @return {String}\n   */\n  EmailMatch.prototype.getAnchorHref = function () {\n    return 'mailto:' + this.email;\n  };\n  /**\n   * Returns the anchor text that should be generated for the match.\n   *\n   * @return {String}\n   */\n  EmailMatch.prototype.getAnchorText = function () {\n    return this.email;\n  };\n  return EmailMatch;\n}(AbstractMatch);\nexport { EmailMatch };\n","import { alphaNumericAndMarksRe } from '../regex-lib';\n/**\n * Determines if the given `char` is a an allowed character in a hashtag. These\n * are underscores or any alphanumeric char.\n */\nexport function isHashtagTextChar(char) {\n  return char === '_' || alphaNumericAndMarksRe.test(char);\n}\n/**\n * Determines if a hashtag match is valid.\n */\nexport function isValidHashtag(hashtag) {\n  // Max length of 140 for a hashtag ('#' char + 139 word chars)\n  return hashtag.length <= 140;\n}\nexport var hashtagServices = ['twitter', 'facebook', 'instagram', 'tiktok'];\n","import { __extends } from \"tslib\";\nimport { assertNever } from '../utils';\nimport { AbstractMatch } from './abstract-match';\n/**\n * @class Autolinker.match.Hashtag\n * @extends Autolinker.match.AbstractMatch\n *\n * Represents a Hashtag match found in an input string which should be\n * Autolinked.\n *\n * See this class's superclass ({@link Autolinker.match.Match}) for more\n * details.\n */\nvar HashtagMatch = /** @class */function (_super) {\n  __extends(HashtagMatch, _super);\n  /**\n   * @method constructor\n   * @param {Object} cfg The configuration properties for the Match\n   *   instance, specified in an Object (map).\n   */\n  function HashtagMatch(cfg) {\n    var _this = _super.call(this, cfg) || this;\n    /**\n     * @public\n     * @property {'hashtag'} type\n     *\n     * A string name for the type of match that this class represents. Can be\n     * used in a TypeScript discriminating union to type-narrow from the\n     * `Match` type.\n     */\n    _this.type = 'hashtag';\n    /**\n     * @cfg {String} serviceName\n     *\n     * The service to point hashtag matches to. See {@link Autolinker#hashtag}\n     * for available values.\n     */\n    _this.serviceName = 'twitter'; // default value just to get the above doc comment in the ES5 output and documentation generator\n    /**\n     * @cfg {String} hashtag (required)\n     *\n     * The HashtagMatch that was matched, without the '#'.\n     */\n    _this.hashtag = ''; // default value just to get the above doc comment in the ES5 output and documentation generator\n    _this.serviceName = cfg.serviceName;\n    _this.hashtag = cfg.hashtag;\n    return _this;\n  }\n  /**\n   * Returns a string name for the type of match that this class represents.\n   * For the case of HashtagMatch, returns 'hashtag'.\n   *\n   * @return {String}\n   */\n  HashtagMatch.prototype.getType = function () {\n    return 'hashtag';\n  };\n  /**\n   * Returns the configured {@link #serviceName} to point the HashtagMatch to.\n   * Ex: 'facebook', 'twitter'.\n   *\n   * @return {String}\n   */\n  HashtagMatch.prototype.getServiceName = function () {\n    return this.serviceName;\n  };\n  /**\n   * Returns the matched hashtag, without the '#' character.\n   *\n   * @return {String}\n   */\n  HashtagMatch.prototype.getHashtag = function () {\n    return this.hashtag;\n  };\n  /**\n   * Returns the anchor href that should be generated for the match.\n   *\n   * @return {String}\n   */\n  HashtagMatch.prototype.getAnchorHref = function () {\n    var serviceName = this.serviceName,\n      hashtag = this.hashtag;\n    switch (serviceName) {\n      case 'twitter':\n        return 'https://twitter.com/hashtag/' + hashtag;\n      case 'facebook':\n        return 'https://www.facebook.com/hashtag/' + hashtag;\n      case 'instagram':\n        return 'https://instagram.com/explore/tags/' + hashtag;\n      case 'tiktok':\n        return 'https://www.tiktok.com/tag/' + hashtag;\n      default:\n        // Shouldn't happen because Autolinker's constructor should block any invalid values, but just in case\n        assertNever(serviceName);\n        throw new Error(\"Invalid hashtag service: \".concat(serviceName));\n    }\n  };\n  /**\n   * Returns the anchor text that should be generated for the match.\n   *\n   * @return {String}\n   */\n  HashtagMatch.prototype.getAnchorText = function () {\n    return '#' + this.hashtag;\n  };\n  /**\n   * Returns the CSS class suffixes that should be used on a tag built with\n   * the match. See {@link Autolinker.match.Match#getCssClassSuffixes} for\n   * details.\n   *\n   * @return {String[]}\n   */\n  HashtagMatch.prototype.getCssClassSuffixes = function () {\n    var cssClassSuffixes = _super.prototype.getCssClassSuffixes.call(this),\n      serviceName = this.getServiceName();\n    if (serviceName) {\n      cssClassSuffixes.push(serviceName);\n    }\n    return cssClassSuffixes;\n  };\n  return HashtagMatch;\n}(AbstractMatch);\nexport { HashtagMatch };\n","var mentionRegexes = {\n  twitter: /^@\\w{1,15}$/,\n  instagram: /^@[_\\w]{1,30}$/,\n  soundcloud: /^@[-a-z0-9_]{3,25}$/,\n  // TikTok usernames are 1-24 characters containing letters, numbers, underscores\n  // and periods, but cannot end in a period: https://support.tiktok.com/en/getting-started/setting-up-your-profile/changing-your-username\n  tiktok: /^@[.\\w]{1,23}[\\w]$/\n};\n// Regex that allows for all possible mention characters for any service. We'll\n// confirm the match based on the user-configured service name after a match is\n// found.\nvar mentionTextCharRe = /[-\\w.]/;\n/**\n * Determines if the given character can be part of a mention's text characters.\n */\nexport function isMentionTextChar(char) {\n  return mentionTextCharRe.test(char);\n}\n/**\n * Determines if the given `mention` text is valid.\n */\nexport function isValidMention(mention, serviceName) {\n  var re = mentionRegexes[serviceName];\n  return re.test(mention);\n}\nexport var mentionServices = ['twitter', 'instagram', 'soundcloud', 'tiktok'];\n","import { __extends } from \"tslib\";\nimport { AbstractMatch } from './abstract-match';\n/**\n * @class Autolinker.match.Mention\n * @extends Autolinker.match.AbstractMatch\n *\n * Represents a Mention match found in an input string which should be Autolinked.\n *\n * See this class's superclass ({@link Autolinker.match.Match}) for more details.\n */\nvar MentionMatch = /** @class */function (_super) {\n  __extends(MentionMatch, _super);\n  /**\n   * @method constructor\n   * @param {Object} cfg The configuration properties for the Match\n   *   instance, specified in an Object (map).\n   */\n  function MentionMatch(cfg) {\n    var _this = _super.call(this, cfg) || this;\n    /**\n     * @public\n     * @property {'mention'} type\n     *\n     * A string name for the type of match that this class represents. Can be\n     * used in a TypeScript discriminating union to type-narrow from the\n     * `Match` type.\n     */\n    _this.type = 'mention';\n    /**\n     * @cfg {String} serviceName\n     *\n     * The service to point mention matches to. See {@link Autolinker#mention}\n     * for available values.\n     */\n    _this.serviceName = 'twitter'; // default value just to get the above doc comment in the ES5 output and documentation generator\n    /**\n     * @cfg {String} mention (required)\n     *\n     * The Mention that was matched, without the '@' character.\n     */\n    _this.mention = ''; // default value just to get the above doc comment in the ES5 output and documentation generator\n    _this.mention = cfg.mention;\n    _this.serviceName = cfg.serviceName;\n    return _this;\n  }\n  /**\n   * Returns a string name for the type of match that this class represents.\n   * For the case of MentionMatch, returns 'mention'.\n   *\n   * @return {String}\n   */\n  MentionMatch.prototype.getType = function () {\n    return 'mention';\n  };\n  /**\n   * Returns the mention, without the '@' character.\n   *\n   * @return {String}\n   */\n  MentionMatch.prototype.getMention = function () {\n    return this.mention;\n  };\n  /**\n   * Returns the configured {@link #serviceName} to point the mention to.\n   * Ex: 'instagram', 'twitter', 'soundcloud'.\n   *\n   * @return {String}\n   */\n  MentionMatch.prototype.getServiceName = function () {\n    return this.serviceName;\n  };\n  /**\n   * Returns the anchor href that should be generated for the match.\n   *\n   * @return {String}\n   */\n  MentionMatch.prototype.getAnchorHref = function () {\n    switch (this.serviceName) {\n      case 'twitter':\n        return 'https://twitter.com/' + this.mention;\n      case 'instagram':\n        return 'https://instagram.com/' + this.mention;\n      case 'soundcloud':\n        return 'https://soundcloud.com/' + this.mention;\n      case 'tiktok':\n        return 'https://www.tiktok.com/@' + this.mention;\n      default:\n        // Shouldn't happen because Autolinker's constructor should block any invalid values, but just in case.\n        throw new Error('Unknown service name to point mention to: ' + this.serviceName);\n    }\n  };\n  /**\n   * Returns the anchor text that should be generated for the match.\n   *\n   * @return {String}\n   */\n  MentionMatch.prototype.getAnchorText = function () {\n    return '@' + this.mention;\n  };\n  /**\n   * Returns the CSS class suffixes that should be used on a tag built with\n   * the match. See {@link Autolinker.match.Match#getCssClassSuffixes} for\n   * details.\n   *\n   * @return {String[]}\n   */\n  MentionMatch.prototype.getCssClassSuffixes = function () {\n    var cssClassSuffixes = _super.prototype.getCssClassSuffixes.call(this),\n      serviceName = this.getServiceName();\n    if (serviceName) {\n      cssClassSuffixes.push(serviceName);\n    }\n    return cssClassSuffixes;\n  };\n  return MentionMatch;\n}(AbstractMatch);\nexport { MentionMatch };\n","// Regex that holds the characters used to separate segments of a phone number\nvar separatorCharRe = /[-. ]/;\n// Regex that specifies any delimiter char that allows us to treat the number as\n// a phone number rather than just any other number that could appear in text.\nvar hasDelimCharsRe = /[-. ()]/;\n// \"Pause\" and \"Wait\" control chars\nvar controlCharRe = /[,;]/;\n// Over the years, many people have added to this regex, but it should have been\n// split up by country. Maybe one day we can break this down.\nvar mostPhoneNumbers = /(?:(?:(?:(\\+)?\\d{1,3}[-. ]?)?\\(?\\d{3}\\)?[-. ]?\\d{3}[-. ]?\\d{4})|(?:(\\+)(?:9[976]\\d|8[987530]\\d|6[987]\\d|5[90]\\d|42\\d|3[875]\\d|2[98654321]\\d|9[8543210]|8[6421]|6[6543210]|5[87654321]|4[987654310]|3[9643210]|2[70]|7|1)[-. ]?(?:\\d[-. ]?){6,12}\\d+))([,;]+[0-9]+#?)*/;\n// Regex for Japanese phone numbers\nvar japanesePhoneRe = /(0([1-9]-?[1-9]\\d{3}|[1-9]{2}-?\\d{3}|[1-9]{2}\\d{1}-?\\d{2}|[1-9]{2}\\d{2}-?\\d{1})-?\\d{4}|0[789]0-?\\d{4}-?\\d{4}|050-?\\d{4}-?\\d{4})/;\n// Combined regex\nvar validPhoneNumberRe = new RegExp(\"^\".concat(mostPhoneNumbers.source, \"|\").concat(japanesePhoneRe.source, \"$\"));\n/**\n * Determines if the character is a phone number separator character (i.e.\n * '-', '.', or ' ' (space))\n */\nexport function isPhoneNumberSeparatorChar(char) {\n  return separatorCharRe.test(char);\n}\n/**\n * Determines if the character is a control character in a phone number. Control\n * characters are as follows:\n *\n * - ',': A 1 second pause. Useful for dialing extensions once the main phone number has been reached\n * - ';': A \"wait\" that waits for the user to take action (tap something, for instance on a smart phone)\n */\nexport function isPhoneNumberControlChar(char) {\n  return controlCharRe.test(char);\n}\n/**\n * Determines if the given phone number text found in a string is a valid phone\n * number.\n *\n * Our state machine parser is simplified to grab anything that looks like a\n * phone number, and this function confirms the match.\n */\nexport function isValidPhoneNumber(phoneNumberText) {\n  // We'll only consider the match as a phone number if there is some kind of\n  // delimiter character (a prefixed '+' sign, or separator chars).\n  //\n  // Accepts:\n  //     (123) 456-7890\n  //     +38755233976\n  // Does not accept:\n  //     1234567890  (no delimiter chars - may just be a random number that's not a phone number)\n  var hasDelimiters = phoneNumberText.charAt(0) === '+' || hasDelimCharsRe.test(phoneNumberText);\n  return hasDelimiters && validPhoneNumberRe.test(phoneNumberText);\n}\n","import { __extends } from \"tslib\";\nimport { AbstractMatch } from './abstract-match';\n/**\n * @class Autolinker.match.Phone\n * @extends Autolinker.match.AbstractMatch\n *\n * Represents a Phone number match found in an input string which should be\n * Autolinked.\n *\n * See this class's superclass ({@link Autolinker.match.Match}) for more\n * details.\n */\nvar PhoneMatch = /** @class */function (_super) {\n  __extends(PhoneMatch, _super);\n  /**\n   * @method constructor\n   * @param {Object} cfg The configuration properties for the Match\n   *   instance, specified in an Object (map).\n   */\n  function PhoneMatch(cfg) {\n    var _this = _super.call(this, cfg) || this;\n    /**\n     * @public\n     * @property {'phone'} type\n     *\n     * A string name for the type of match that this class represents. Can be\n     * used in a TypeScript discriminating union to type-narrow from the\n     * `Match` type.\n     */\n    _this.type = 'phone';\n    /**\n     * @protected\n     * @property {String} number (required)\n     *\n     * The phone number that was matched, without any delimiter characters.\n     *\n     * Note: This is a string to allow for prefixed 0's.\n     */\n    _this.number = ''; // default value just to get the above doc comment in the ES5 output and documentation generator\n    /**\n     * @protected\n     * @property  {Boolean} plusSign (required)\n     *\n     * `true` if the matched phone number started with a '+' sign. We'll include\n     * it in the `tel:` URL if so, as this is needed for international numbers.\n     *\n     * Ex: '+1 (123) 456 7879'\n     */\n    _this.plusSign = false; // default value just to get the above doc comment in the ES5 output and documentation generator\n    _this.number = cfg.number;\n    _this.plusSign = cfg.plusSign;\n    return _this;\n  }\n  /**\n   * Returns a string name for the type of match that this class represents.\n   * For the case of PhoneMatch, returns 'phone'.\n   *\n   * @return {String}\n   */\n  PhoneMatch.prototype.getType = function () {\n    return 'phone';\n  };\n  /**\n   * Returns the phone number that was matched as a string, without any\n   * delimiter characters.\n   *\n   * Note: This is a string to allow for prefixed 0's.\n   *\n   * @return {String}\n   */\n  PhoneMatch.prototype.getPhoneNumber = function () {\n    return this.number;\n  };\n  /**\n   * Alias of {@link #getPhoneNumber}, returns the phone number that was\n   * matched as a string, without any delimiter characters.\n   *\n   * Note: This is a string to allow for prefixed 0's.\n   *\n   * @return {String}\n   */\n  PhoneMatch.prototype.getNumber = function () {\n    return this.getPhoneNumber();\n  };\n  /**\n   * Returns the anchor href that should be generated for the match.\n   *\n   * @return {String}\n   */\n  PhoneMatch.prototype.getAnchorHref = function () {\n    return 'tel:' + (this.plusSign ? '+' : '') + this.number;\n  };\n  /**\n   * Returns the anchor text that should be generated for the match.\n   *\n   * @return {String}\n   */\n  PhoneMatch.prototype.getAnchorText = function () {\n    return this.matchedText;\n  };\n  return PhoneMatch;\n}(AbstractMatch);\nexport { PhoneMatch };\n","import { alphaNumericAndMarksRe, digitRe } from '../regex-lib';\nimport { UrlMatch } from '../match/url-match';\nimport { remove, assertNever } from '../utils';\nimport { httpSchemeRe, isDomainLabelChar, isDomainLabelStartChar, isPathChar, isSchemeChar, isSchemeStartChar, isUrlSuffixStartChar, isValidIpV4Address, isValidSchemeUrl, isValidTldMatch, urlSuffixedCharsNotAllowedAtEndRe } from './uri-utils';\nimport { isEmailLocalPartChar, isEmailLocalPartStartChar, isValidEmail, mailtoSchemePrefixRe } from './email-utils';\nimport { EmailMatch } from '../match/email-match';\nimport { isHashtagTextChar, isValidHashtag } from './hashtag-utils';\nimport { HashtagMatch } from '../match/hashtag-match';\nimport { isMentionTextChar, isValidMention } from './mention-utils';\nimport { MentionMatch } from '../match/mention-match';\nimport { isPhoneNumberSeparatorChar, isPhoneNumberControlChar, isValidPhoneNumber } from './phone-number-utils';\nimport { PhoneMatch } from '../match/phone-match';\n// For debugging: search for and uncomment other \"For debugging\" lines\n// import CliTable from 'cli-table';\n/**\n * Parses URL, email, twitter, mention, and hashtag matches from the given\n * `text`.\n */\nexport function parseMatches(text, args) {\n  var tagBuilder = args.tagBuilder;\n  var stripPrefix = args.stripPrefix;\n  var stripTrailingSlash = args.stripTrailingSlash;\n  var decodePercentEncoding = args.decodePercentEncoding;\n  var hashtagServiceName = args.hashtagServiceName;\n  var mentionServiceName = args.mentionServiceName;\n  var matches = [];\n  var textLen = text.length;\n  // An array of all active state machines. Empty array means we're in the\n  // \"no url\" state\n  var stateMachines = [];\n  // For debugging: search for and uncomment other \"For debugging\" lines\n  // const table = new CliTable({\n  //     head: ['charIdx', 'char', 'states', 'charIdx', 'startIdx', 'reached accept state'],\n  // });\n  var charIdx = 0;\n  for (; charIdx < textLen; charIdx++) {\n    var char = text.charAt(charIdx);\n    if (stateMachines.length === 0) {\n      stateNoMatch(char);\n    } else {\n      // Must loop through the state machines backwards for when one\n      // is removed\n      for (var stateIdx = stateMachines.length - 1; stateIdx >= 0; stateIdx--) {\n        var stateMachine = stateMachines[stateIdx];\n        switch (stateMachine.state) {\n          // Protocol-relative URL states\n          case 11 /* ProtocolRelativeSlash1 */:\n            stateProtocolRelativeSlash1(stateMachine, char);\n            break;\n          case 12 /* ProtocolRelativeSlash2 */:\n            stateProtocolRelativeSlash2(stateMachine, char);\n            break;\n          case 0 /* SchemeChar */:\n            stateSchemeChar(stateMachine, char);\n            break;\n          case 1 /* SchemeHyphen */:\n            stateSchemeHyphen(stateMachine, char);\n            break;\n          case 2 /* SchemeColon */:\n            stateSchemeColon(stateMachine, char);\n            break;\n          case 3 /* SchemeSlash1 */:\n            stateSchemeSlash1(stateMachine, char);\n            break;\n          case 4 /* SchemeSlash2 */:\n            stateSchemeSlash2(stateMachine, char);\n            break;\n          case 5 /* DomainLabelChar */:\n            stateDomainLabelChar(stateMachine, char);\n            break;\n          case 6 /* DomainHyphen */:\n            stateDomainHyphen(stateMachine, char);\n            break;\n          case 7 /* DomainDot */:\n            stateDomainDot(stateMachine, char);\n            break;\n          case 13 /* IpV4Digit */:\n            stateIpV4Digit(stateMachine, char);\n            break;\n          case 14 /* IpV4Dot */:\n            stateIPv4Dot(stateMachine, char);\n            break;\n          case 8 /* PortColon */:\n            statePortColon(stateMachine, char);\n            break;\n          case 9 /* PortNumber */:\n            statePortNumber(stateMachine, char);\n            break;\n          case 10 /* Path */:\n            statePath(stateMachine, char);\n            break;\n          // Email States\n          case 15 /* EmailMailto_M */:\n            stateEmailMailto_M(stateMachine, char);\n            break;\n          case 16 /* EmailMailto_A */:\n            stateEmailMailto_A(stateMachine, char);\n            break;\n          case 17 /* EmailMailto_I */:\n            stateEmailMailto_I(stateMachine, char);\n            break;\n          case 18 /* EmailMailto_L */:\n            stateEmailMailto_L(stateMachine, char);\n            break;\n          case 19 /* EmailMailto_T */:\n            stateEmailMailto_T(stateMachine, char);\n            break;\n          case 20 /* EmailMailto_O */:\n            stateEmailMailto_O(stateMachine, char);\n            break;\n          case 21 /* EmailMailto_Colon */:\n            stateEmailMailtoColon(stateMachine, char);\n            break;\n          case 22 /* EmailLocalPart */:\n            stateEmailLocalPart(stateMachine, char);\n            break;\n          case 23 /* EmailLocalPartDot */:\n            stateEmailLocalPartDot(stateMachine, char);\n            break;\n          case 24 /* EmailAtSign */:\n            stateEmailAtSign(stateMachine, char);\n            break;\n          case 25 /* EmailDomainChar */:\n            stateEmailDomainChar(stateMachine, char);\n            break;\n          case 26 /* EmailDomainHyphen */:\n            stateEmailDomainHyphen(stateMachine, char);\n            break;\n          case 27 /* EmailDomainDot */:\n            stateEmailDomainDot(stateMachine, char);\n            break;\n          // Hashtag states\n          case 28 /* HashtagHashChar */:\n            stateHashtagHashChar(stateMachine, char);\n            break;\n          case 29 /* HashtagTextChar */:\n            stateHashtagTextChar(stateMachine, char);\n            break;\n          // Mention states\n          case 30 /* MentionAtChar */:\n            stateMentionAtChar(stateMachine, char);\n            break;\n          case 31 /* MentionTextChar */:\n            stateMentionTextChar(stateMachine, char);\n            break;\n          // Phone number states\n          case 32 /* PhoneNumberOpenParen */:\n            statePhoneNumberOpenParen(stateMachine, char);\n            break;\n          case 33 /* PhoneNumberAreaCodeDigit1 */:\n            statePhoneNumberAreaCodeDigit1(stateMachine, char);\n            break;\n          case 34 /* PhoneNumberAreaCodeDigit2 */:\n            statePhoneNumberAreaCodeDigit2(stateMachine, char);\n            break;\n          case 35 /* PhoneNumberAreaCodeDigit3 */:\n            statePhoneNumberAreaCodeDigit3(stateMachine, char);\n            break;\n          case 36 /* PhoneNumberCloseParen */:\n            statePhoneNumberCloseParen(stateMachine, char);\n            break;\n          case 37 /* PhoneNumberPlus */:\n            statePhoneNumberPlus(stateMachine, char);\n            break;\n          case 38 /* PhoneNumberDigit */:\n            statePhoneNumberDigit(stateMachine, char);\n            break;\n          case 39 /* PhoneNumberSeparator */:\n            statePhoneNumberSeparator(stateMachine, char);\n            break;\n          case 40 /* PhoneNumberControlChar */:\n            statePhoneNumberControlChar(stateMachine, char);\n            break;\n          case 41 /* PhoneNumberPoundChar */:\n            statePhoneNumberPoundChar(stateMachine, char);\n            break;\n          default:\n            assertNever(stateMachine.state);\n        }\n      }\n    }\n    // For debugging: search for and uncomment other \"For debugging\" lines\n    // table.push([\n    //     charIdx,\n    //     char,\n    //     stateMachines.map(machine => State[machine.state]).join('\\n') || '(none)',\n    //     charIdx,\n    //     stateMachines.map(m => m.startIdx).join('\\n'),\n    //     stateMachines.map(m => m.acceptStateReached).join('\\n'),\n    // ]);\n  }\n  // Capture any valid match at the end of the string\n  // Note: this loop must happen in reverse because\n  // captureMatchIfValidAndRemove() removes state machines from the array\n  // and we'll end up skipping every other one if we remove while looping\n  // forward\n  for (var i = stateMachines.length - 1; i >= 0; i--) {\n    stateMachines.forEach(function (stateMachine) {\n      return captureMatchIfValidAndRemove(stateMachine);\n    });\n  }\n  // For debugging: search for and uncomment other \"For debugging\" lines\n  // console.log(`\\nRead string:\\n  ${text}`);\n  // console.log(table.toString());\n  return matches;\n  // Handles the state when we're not in a URL/email/etc. (i.e. when no state machines exist)\n  function stateNoMatch(char) {\n    if (char === '#') {\n      // Hash char, start a Hashtag match\n      stateMachines.push(createHashtagStateMachine(charIdx, 28 /* HashtagHashChar */));\n    } else if (char === '@') {\n      // '@' char, start a Mention match\n      stateMachines.push(createMentionStateMachine(charIdx, 30 /* MentionAtChar */));\n    } else if (char === '/') {\n      // A slash could begin a protocol-relative URL\n      stateMachines.push(createTldUrlStateMachine(charIdx, 11 /* ProtocolRelativeSlash1 */));\n    } else if (char === '+') {\n      // A '+' char can start a Phone number\n      stateMachines.push(createPhoneNumberStateMachine(charIdx, 37 /* PhoneNumberPlus */));\n    } else if (char === '(') {\n      stateMachines.push(createPhoneNumberStateMachine(charIdx, 32 /* PhoneNumberOpenParen */));\n    } else {\n      if (digitRe.test(char)) {\n        // A digit could start a phone number\n        stateMachines.push(createPhoneNumberStateMachine(charIdx, 38 /* PhoneNumberDigit */));\n        // A digit could start an IP address\n        stateMachines.push(createIpV4UrlStateMachine(charIdx, 13 /* IpV4Digit */));\n      }\n      if (isEmailLocalPartStartChar(char)) {\n        // Any email local part. An 'm' character in particular could\n        // start a 'mailto:' match\n        var startState = char.toLowerCase() === 'm' ? 15 /* EmailMailto_M */ : 22 /* EmailLocalPart */;\n        stateMachines.push(createEmailStateMachine(charIdx, startState));\n      }\n      if (isSchemeStartChar(char)) {\n        // An uppercase or lowercase letter may start a scheme match\n        stateMachines.push(createSchemeUrlStateMachine(charIdx, 0 /* SchemeChar */));\n      }\n      if (alphaNumericAndMarksRe.test(char)) {\n        // A unicode alpha character or digit could start a domain name\n        // label for a TLD match\n        stateMachines.push(createTldUrlStateMachine(charIdx, 5 /* DomainLabelChar */));\n      }\n    }\n    // Anything else, remain in the \"non-url\" state by not creating any\n    // state machines\n  }\n  // Implements ABNF: ALPHA *( ALPHA / DIGIT / \"+\" / \"-\" / \".\" )\n  function stateSchemeChar(stateMachine, char) {\n    if (char === ':') {\n      stateMachine.state = 2 /* SchemeColon */;\n    } else if (char === '-') {\n      stateMachine.state = 1 /* SchemeHyphen */;\n    } else if (isSchemeChar(char)) {\n      // Stay in SchemeChar state\n    } else {\n      // Any other character, not a scheme\n      remove(stateMachines, stateMachine);\n    }\n  }\n  function stateSchemeHyphen(stateMachine, char) {\n    if (char === '-') {\n      // Stay in SchemeHyphen state\n      // TODO: Should a colon following a dash be counted as the end of the scheme?\n      // } else if (char === ':') {\n      //     stateMachine.state = State.SchemeColon;\n    } else if (char === '/') {\n      // Not a valid scheme match, but may be the start of a\n      // protocol-relative match (such as //google.com)\n      remove(stateMachines, stateMachine);\n      stateMachines.push(createTldUrlStateMachine(charIdx, 11 /* ProtocolRelativeSlash1 */));\n    } else if (isSchemeChar(char)) {\n      stateMachine.state = 0 /* SchemeChar */;\n    } else {\n      // Any other character, not a scheme\n      remove(stateMachines, stateMachine);\n    }\n  }\n  function stateSchemeColon(stateMachine, char) {\n    if (char === '/') {\n      stateMachine.state = 3 /* SchemeSlash1 */;\n    } else if (char === '.') {\n      // We've read something like 'hello:.' - don't capture\n      remove(stateMachines, stateMachine);\n    } else if (isDomainLabelStartChar(char)) {\n      stateMachine.state = 5 /* DomainLabelChar */;\n      // It's possible that we read an \"introduction\" piece of text,\n      // and the character after the current colon actually starts an\n      // actual scheme. An example of this is:\n      //     \"The link:http://google.com\"\n      // Hence, start a new machine to capture this match if so\n      if (isSchemeStartChar(char)) {\n        stateMachines.push(createSchemeUrlStateMachine(charIdx, 0 /* SchemeChar */));\n      }\n    } else {\n      remove(stateMachines, stateMachine);\n    }\n  }\n  function stateSchemeSlash1(stateMachine, char) {\n    if (char === '/') {\n      stateMachine.state = 4 /* SchemeSlash2 */;\n    } else if (isPathChar(char)) {\n      stateMachine.state = 10 /* Path */;\n      stateMachine.acceptStateReached = true;\n    } else {\n      captureMatchIfValidAndRemove(stateMachine);\n    }\n  }\n  function stateSchemeSlash2(stateMachine, char) {\n    if (char === '/') {\n      // 3rd slash, must be an absolute path (path-absolute in the\n      // ABNF), such as in a file:///c:/windows/etc. See\n      // https://tools.ietf.org/html/rfc3986#appendix-A\n      stateMachine.state = 10 /* Path */;\n    } else if (isDomainLabelStartChar(char)) {\n      // start of \"authority\" section - see https://tools.ietf.org/html/rfc3986#appendix-A\n      stateMachine.state = 5 /* DomainLabelChar */;\n      stateMachine.acceptStateReached = true;\n    } else {\n      // not valid\n      remove(stateMachines, stateMachine);\n    }\n  }\n  // Handles reading a '/' from the NonUrl state\n  function stateProtocolRelativeSlash1(stateMachine, char) {\n    if (char === '/') {\n      stateMachine.state = 12 /* ProtocolRelativeSlash2 */;\n    } else {\n      // Anything else, cannot be the start of a protocol-relative\n      // URL.\n      remove(stateMachines, stateMachine);\n    }\n  }\n  // Handles reading a second '/', which could start a protocol-relative URL\n  function stateProtocolRelativeSlash2(stateMachine, char) {\n    if (isDomainLabelStartChar(char)) {\n      stateMachine.state = 5 /* DomainLabelChar */;\n    } else {\n      // Anything else, not a URL\n      remove(stateMachines, stateMachine);\n    }\n  }\n  // Handles when we have read a domain label character\n  function stateDomainLabelChar(stateMachine, char) {\n    if (char === '.') {\n      stateMachine.state = 7 /* DomainDot */;\n    } else if (char === '-') {\n      stateMachine.state = 6 /* DomainHyphen */;\n    } else if (char === ':') {\n      // Beginning of a port number, end the domain name\n      stateMachine.state = 8 /* PortColon */;\n    } else if (isUrlSuffixStartChar(char)) {\n      // '/', '?', or '#'\n      stateMachine.state = 10 /* Path */;\n    } else if (isDomainLabelChar(char)) {\n      // Stay in the DomainLabelChar state\n    } else {\n      // Anything else, end the domain name\n      captureMatchIfValidAndRemove(stateMachine);\n    }\n  }\n  function stateDomainHyphen(stateMachine, char) {\n    if (char === '-') {\n      // Remain in the DomainHyphen state\n    } else if (char === '.') {\n      // Not valid to have a '-.' in a domain label\n      captureMatchIfValidAndRemove(stateMachine);\n    } else if (isDomainLabelStartChar(char)) {\n      stateMachine.state = 5 /* DomainLabelChar */;\n    } else {\n      captureMatchIfValidAndRemove(stateMachine);\n    }\n  }\n  function stateDomainDot(stateMachine, char) {\n    if (char === '.') {\n      // domain names cannot have multiple '.'s next to each other.\n      // It's possible we've already read a valid domain name though,\n      // and that the '..' sequence just forms an ellipsis at the end\n      // of a sentence\n      captureMatchIfValidAndRemove(stateMachine);\n    } else if (isDomainLabelStartChar(char)) {\n      stateMachine.state = 5 /* DomainLabelChar */;\n      stateMachine.acceptStateReached = true; // after hitting a dot, and then another domain label, we've reached an accept state\n    } else {\n      // Anything else, end the domain name\n      captureMatchIfValidAndRemove(stateMachine);\n    }\n  }\n  function stateIpV4Digit(stateMachine, char) {\n    if (char === '.') {\n      stateMachine.state = 14 /* IpV4Dot */;\n    } else if (char === ':') {\n      // Beginning of a port number\n      stateMachine.state = 8 /* PortColon */;\n    } else if (digitRe.test(char)) {\n      // stay in the IPv4 digit state\n    } else if (isUrlSuffixStartChar(char)) {\n      stateMachine.state = 10 /* Path */;\n    } else if (alphaNumericAndMarksRe.test(char)) {\n      // If we hit an alpha character, must not be an IPv4\n      // Example of this: 1.2.3.4abc\n      remove(stateMachines, stateMachine);\n    } else {\n      captureMatchIfValidAndRemove(stateMachine);\n    }\n  }\n  function stateIPv4Dot(stateMachine, char) {\n    if (digitRe.test(char)) {\n      stateMachine.octetsEncountered++;\n      // Once we have encountered 4 octets, it's *potentially* a valid\n      // IPv4 address. Our IPv4 regex will confirm the match later\n      // though to make sure each octet is in the 0-255 range, and\n      // there's exactly 4 octets (not 5 or more)\n      if (stateMachine.octetsEncountered === 4) {\n        stateMachine.acceptStateReached = true;\n      }\n      stateMachine.state = 13 /* IpV4Digit */;\n    } else {\n      captureMatchIfValidAndRemove(stateMachine);\n    }\n  }\n  function statePortColon(stateMachine, char) {\n    if (digitRe.test(char)) {\n      stateMachine.state = 9 /* PortNumber */;\n    } else {\n      captureMatchIfValidAndRemove(stateMachine);\n    }\n  }\n  function statePortNumber(stateMachine, char) {\n    if (digitRe.test(char)) {\n      // Stay in port number state\n    } else if (isUrlSuffixStartChar(char)) {\n      // '/', '?', or '#'\n      stateMachine.state = 10 /* Path */;\n    } else {\n      captureMatchIfValidAndRemove(stateMachine);\n    }\n  }\n  function statePath(stateMachine, char) {\n    if (isPathChar(char)) {\n      // Stay in the path state\n    } else {\n      captureMatchIfValidAndRemove(stateMachine);\n    }\n  }\n  // Handles if we're reading a 'mailto:' prefix on the string\n  function stateEmailMailto_M(stateMachine, char) {\n    if (char.toLowerCase() === 'a') {\n      stateMachine.state = 16 /* EmailMailto_A */;\n    } else {\n      stateEmailLocalPart(stateMachine, char);\n    }\n  }\n  function stateEmailMailto_A(stateMachine, char) {\n    if (char.toLowerCase() === 'i') {\n      stateMachine.state = 17 /* EmailMailto_I */;\n    } else {\n      stateEmailLocalPart(stateMachine, char);\n    }\n  }\n  function stateEmailMailto_I(stateMachine, char) {\n    if (char.toLowerCase() === 'l') {\n      stateMachine.state = 18 /* EmailMailto_L */;\n    } else {\n      stateEmailLocalPart(stateMachine, char);\n    }\n  }\n  function stateEmailMailto_L(stateMachine, char) {\n    if (char.toLowerCase() === 't') {\n      stateMachine.state = 19 /* EmailMailto_T */;\n    } else {\n      stateEmailLocalPart(stateMachine, char);\n    }\n  }\n  function stateEmailMailto_T(stateMachine, char) {\n    if (char.toLowerCase() === 'o') {\n      stateMachine.state = 20 /* EmailMailto_O */;\n    } else {\n      stateEmailLocalPart(stateMachine, char);\n    }\n  }\n  function stateEmailMailto_O(stateMachine, char) {\n    if (char.toLowerCase() === ':') {\n      stateMachine.state = 21 /* EmailMailto_Colon */;\n    } else {\n      stateEmailLocalPart(stateMachine, char);\n    }\n  }\n  function stateEmailMailtoColon(stateMachine, char) {\n    if (isEmailLocalPartChar(char)) {\n      stateMachine.state = 22 /* EmailLocalPart */;\n    } else {\n      remove(stateMachines, stateMachine);\n    }\n  }\n  // Handles the state when we're currently in the \"local part\" of an\n  // email address (as opposed to the \"domain part\")\n  function stateEmailLocalPart(stateMachine, char) {\n    if (char === '.') {\n      stateMachine.state = 23 /* EmailLocalPartDot */;\n    } else if (char === '@') {\n      stateMachine.state = 24 /* EmailAtSign */;\n    } else if (isEmailLocalPartChar(char)) {\n      // stay in the \"local part\" of the email address\n      // Note: because stateEmailLocalPart() is called from the\n      // 'mailto' states (when the 'mailto' prefix itself has been\n      // broken), make sure to set the state to EmailLocalPart\n      stateMachine.state = 22 /* EmailLocalPart */;\n    } else {\n      // not an email address character\n      remove(stateMachines, stateMachine);\n    }\n  }\n  // Handles the state where we've read\n  function stateEmailLocalPartDot(stateMachine, char) {\n    if (char === '.') {\n      // We read a second '.' in a row, not a valid email address\n      // local part\n      remove(stateMachines, stateMachine);\n    } else if (char === '@') {\n      // We read the '@' character immediately after a dot ('.'), not\n      // an email address\n      remove(stateMachines, stateMachine);\n    } else if (isEmailLocalPartChar(char)) {\n      stateMachine.state = 22 /* EmailLocalPart */;\n    } else {\n      // Anything else, not an email address\n      remove(stateMachines, stateMachine);\n    }\n  }\n  function stateEmailAtSign(stateMachine, char) {\n    if (isDomainLabelStartChar(char)) {\n      stateMachine.state = 25 /* EmailDomainChar */;\n    } else {\n      // Anything else, not an email address\n      remove(stateMachines, stateMachine);\n    }\n  }\n  function stateEmailDomainChar(stateMachine, char) {\n    if (char === '.') {\n      stateMachine.state = 27 /* EmailDomainDot */;\n    } else if (char === '-') {\n      stateMachine.state = 26 /* EmailDomainHyphen */;\n    } else if (isDomainLabelChar(char)) {\n      // Stay in the DomainChar state\n    } else {\n      // Anything else, we potentially matched if the criteria has\n      // been met\n      captureMatchIfValidAndRemove(stateMachine);\n    }\n  }\n  function stateEmailDomainHyphen(stateMachine, char) {\n    if (char === '-' || char === '.') {\n      // Not valid to have two hyphens (\"--\") or hypen+dot (\"-.\")\n      captureMatchIfValidAndRemove(stateMachine);\n    } else if (isDomainLabelChar(char)) {\n      stateMachine.state = 25 /* EmailDomainChar */;\n    } else {\n      // Anything else\n      captureMatchIfValidAndRemove(stateMachine);\n    }\n  }\n  function stateEmailDomainDot(stateMachine, char) {\n    if (char === '.' || char === '-') {\n      // not valid to have two dots (\"..\") or dot+hypen (\".-\")\n      captureMatchIfValidAndRemove(stateMachine);\n    } else if (isDomainLabelStartChar(char)) {\n      stateMachine.state = 25 /* EmailDomainChar */;\n      // After having read a '.' and then a valid domain character,\n      // we now know that the domain part of the email is valid, and\n      // we have found at least a partial EmailMatch (however, the\n      // email address may have additional characters from this point)\n      stateMachine.acceptStateReached = true;\n    } else {\n      // Anything else\n      captureMatchIfValidAndRemove(stateMachine);\n    }\n  }\n  // Handles the state when we've just encountered a '#' character\n  function stateHashtagHashChar(stateMachine, char) {\n    if (isHashtagTextChar(char)) {\n      // '#' char with valid hash text char following\n      stateMachine.state = 29 /* HashtagTextChar */;\n      stateMachine.acceptStateReached = true;\n    } else {\n      remove(stateMachines, stateMachine);\n    }\n  }\n  // Handles the state when we're currently in the hash tag's text chars\n  function stateHashtagTextChar(stateMachine, char) {\n    if (isHashtagTextChar(char)) {\n      // Continue reading characters in the HashtagText state\n    } else {\n      captureMatchIfValidAndRemove(stateMachine);\n    }\n  }\n  // Handles the state when we've just encountered a '@' character\n  function stateMentionAtChar(stateMachine, char) {\n    if (isMentionTextChar(char)) {\n      // '@' char with valid mention text char following\n      stateMachine.state = 31 /* MentionTextChar */;\n      stateMachine.acceptStateReached = true;\n    } else {\n      remove(stateMachines, stateMachine);\n    }\n  }\n  // Handles the state when we're currently in the mention's text chars\n  function stateMentionTextChar(stateMachine, char) {\n    if (isMentionTextChar(char)) {\n      // Continue reading characters in the HashtagText state\n    } else if (alphaNumericAndMarksRe.test(char)) {\n      // Char is invalid for a mention text char, not a valid match.\n      // Note that ascii alphanumeric chars are okay (which are tested\n      // in the previous 'if' statement, but others are not)\n      remove(stateMachines, stateMachine);\n    } else {\n      captureMatchIfValidAndRemove(stateMachine);\n    }\n  }\n  function statePhoneNumberPlus(stateMachine, char) {\n    if (digitRe.test(char)) {\n      stateMachine.state = 38 /* PhoneNumberDigit */;\n    } else {\n      remove(stateMachines, stateMachine);\n      // This character may start a new match. Add states for it\n      stateNoMatch(char);\n    }\n  }\n  function statePhoneNumberOpenParen(stateMachine, char) {\n    if (digitRe.test(char)) {\n      stateMachine.state = 33 /* PhoneNumberAreaCodeDigit1 */;\n    } else {\n      remove(stateMachines, stateMachine);\n    }\n    // It's also possible that the paren was just an open brace for\n    // a piece of text. Start other machines\n    stateNoMatch(char);\n  }\n  function statePhoneNumberAreaCodeDigit1(stateMachine, char) {\n    if (digitRe.test(char)) {\n      stateMachine.state = 34 /* PhoneNumberAreaCodeDigit2 */;\n    } else {\n      remove(stateMachines, stateMachine);\n    }\n  }\n  function statePhoneNumberAreaCodeDigit2(stateMachine, char) {\n    if (digitRe.test(char)) {\n      stateMachine.state = 35 /* PhoneNumberAreaCodeDigit3 */;\n    } else {\n      remove(stateMachines, stateMachine);\n    }\n  }\n  function statePhoneNumberAreaCodeDigit3(stateMachine, char) {\n    if (char === ')') {\n      stateMachine.state = 36 /* PhoneNumberCloseParen */;\n    } else {\n      remove(stateMachines, stateMachine);\n    }\n  }\n  function statePhoneNumberCloseParen(stateMachine, char) {\n    if (digitRe.test(char)) {\n      stateMachine.state = 38 /* PhoneNumberDigit */;\n    } else if (isPhoneNumberSeparatorChar(char)) {\n      stateMachine.state = 39 /* PhoneNumberSeparator */;\n    } else {\n      remove(stateMachines, stateMachine);\n    }\n  }\n  function statePhoneNumberDigit(stateMachine, char) {\n    // For now, if we've reached any digits, we'll say that the machine\n    // has reached its accept state. The phone regex will confirm the\n    // match later.\n    // Alternatively, we could count the number of digits to avoid\n    // invoking the phone number regex\n    stateMachine.acceptStateReached = true;\n    if (isPhoneNumberControlChar(char)) {\n      stateMachine.state = 40 /* PhoneNumberControlChar */;\n    } else if (char === '#') {\n      stateMachine.state = 41 /* PhoneNumberPoundChar */;\n    } else if (digitRe.test(char)) {\n      // Stay in the phone number digit state\n    } else if (char === '(') {\n      stateMachine.state = 32 /* PhoneNumberOpenParen */;\n    } else if (isPhoneNumberSeparatorChar(char)) {\n      stateMachine.state = 39 /* PhoneNumberSeparator */;\n    } else {\n      captureMatchIfValidAndRemove(stateMachine);\n      // The transition from a digit character to a letter can be the\n      // start of a new scheme URL match\n      if (isSchemeStartChar(char)) {\n        stateMachines.push(createSchemeUrlStateMachine(charIdx, 0 /* SchemeChar */));\n      }\n    }\n  }\n  function statePhoneNumberSeparator(stateMachine, char) {\n    if (digitRe.test(char)) {\n      stateMachine.state = 38 /* PhoneNumberDigit */;\n    } else if (char === '(') {\n      stateMachine.state = 32 /* PhoneNumberOpenParen */;\n    } else {\n      captureMatchIfValidAndRemove(stateMachine);\n      // This character may start a new match. Add states for it\n      stateNoMatch(char);\n    }\n  }\n  // The \";\" characters is \"wait\" in a phone number\n  // The \",\" characters is \"pause\" in a phone number\n  function statePhoneNumberControlChar(stateMachine, char) {\n    if (isPhoneNumberControlChar(char)) {\n      // Stay in the \"control char\" state\n    } else if (char === '#') {\n      stateMachine.state = 41 /* PhoneNumberPoundChar */;\n    } else if (digitRe.test(char)) {\n      stateMachine.state = 38 /* PhoneNumberDigit */;\n    } else {\n      captureMatchIfValidAndRemove(stateMachine);\n    }\n  }\n  // The \"#\" characters is \"pound\" in a phone number\n  function statePhoneNumberPoundChar(stateMachine, char) {\n    if (isPhoneNumberControlChar(char)) {\n      stateMachine.state = 40 /* PhoneNumberControlChar */;\n    } else if (digitRe.test(char)) {\n      // According to some of the older tests, if there's a digit\n      // after a '#' sign, the match is invalid. TODO: Revisit if this is true\n      remove(stateMachines, stateMachine);\n    } else {\n      captureMatchIfValidAndRemove(stateMachine);\n    }\n  }\n  /*\n   * Captures a match if it is valid (i.e. has a full domain name for a\n   * TLD match). If a match is not valid, it is possible that we want to\n   * keep reading characters in order to make a full match.\n   */\n  function captureMatchIfValidAndRemove(stateMachine) {\n    // Remove the state machine first. There are a number of code paths\n    // which return out of this function early, so make sure we have\n    // this done\n    remove(stateMachines, stateMachine);\n    // Make sure the state machine being checked has actually reached an\n    // \"accept\" state. If it hasn't reach one, it can't be a match\n    if (!stateMachine.acceptStateReached) {\n      return;\n    }\n    var startIdx = stateMachine.startIdx;\n    var matchedText = text.slice(stateMachine.startIdx, charIdx);\n    // Handle any unbalanced braces (parens, square brackets, or curly\n    // brackets) inside the URL. This handles situations like:\n    //     The link (google.com)\n    // and\n    //     Check out this link here (en.wikipedia.org/wiki/IANA_(disambiguation))\n    //\n    // And also remove any punctuation chars at the end such as:\n    //     '?', ',', ':', '.', etc.\n    matchedText = excludeUnbalancedTrailingBracesAndPunctuation(matchedText);\n    if (stateMachine.type === 'url') {\n      // We don't want to accidentally match a URL that is preceded by an\n      // '@' character, which would be an email address\n      var charBeforeUrlMatch = text.charAt(stateMachine.startIdx - 1);\n      if (charBeforeUrlMatch === '@') {\n        return;\n      }\n      // For the purpose of this parser, we've generalized 'www'\n      // matches as part of 'tld' matches. However, for backward\n      // compatibility, we distinguish beween TLD matches and matches\n      // that begin with 'www.' so that users may turn off 'www'\n      // matches. As such, we need to correct for that now if the\n      // URL begins with 'www.'\n      var urlMatchType = stateMachine.matchType;\n      if (urlMatchType === 'scheme') {\n        // Autolinker accepts many characters in a url's scheme (like `fake://test.com`).\n        // However, in cases where a URL is missing whitespace before an obvious link,\n        // (for example: `nowhitespacehttp://www.test.com`), we only want the match to start\n        // at the http:// part. We will check if the match contains a common scheme and then\n        // shift the match to start from there.\n        var httpSchemeMatch = httpSchemeRe.exec(matchedText);\n        if (httpSchemeMatch) {\n          // If we found an overmatched URL, we want to find the index\n          // of where the match should start and shift the match to\n          // start from the beginning of the common scheme\n          startIdx = startIdx + httpSchemeMatch.index;\n          matchedText = matchedText.slice(httpSchemeMatch.index);\n        }\n        if (!isValidSchemeUrl(matchedText)) {\n          return; // not a valid match\n        }\n      } else if (urlMatchType === 'tld') {\n        if (!isValidTldMatch(matchedText)) {\n          return; // not a valid match\n        }\n      } else if (urlMatchType === 'ipV4') {\n        if (!isValidIpV4Address(matchedText)) {\n          return; // not a valid match\n        }\n      } else {\n        assertNever(urlMatchType);\n      }\n      matches.push(new UrlMatch({\n        tagBuilder: tagBuilder,\n        matchedText: matchedText,\n        offset: startIdx,\n        urlMatchType: urlMatchType,\n        url: matchedText,\n        protocolRelativeMatch: matchedText.slice(0, 2) === '//',\n        // TODO: Do these settings need to be passed to the match,\n        // or should we handle them here in UrlMatcher?\n        stripPrefix: stripPrefix,\n        stripTrailingSlash: stripTrailingSlash,\n        decodePercentEncoding: decodePercentEncoding\n      }));\n    } else if (stateMachine.type === 'email') {\n      // if the email address has a valid TLD, add it to the list of matches\n      if (isValidEmail(matchedText)) {\n        matches.push(new EmailMatch({\n          tagBuilder: tagBuilder,\n          matchedText: matchedText,\n          offset: startIdx,\n          email: matchedText.replace(mailtoSchemePrefixRe, '')\n        }));\n      }\n    } else if (stateMachine.type === 'hashtag') {\n      if (isValidHashtag(matchedText)) {\n        matches.push(new HashtagMatch({\n          tagBuilder: tagBuilder,\n          matchedText: matchedText,\n          offset: startIdx,\n          serviceName: hashtagServiceName,\n          hashtag: matchedText.slice(1)\n        }));\n      }\n    } else if (stateMachine.type === 'mention') {\n      if (isValidMention(matchedText, mentionServiceName)) {\n        matches.push(new MentionMatch({\n          tagBuilder: tagBuilder,\n          matchedText: matchedText,\n          offset: startIdx,\n          serviceName: mentionServiceName,\n          mention: matchedText.slice(1) // strip off the '@' character at the beginning\n        }));\n      }\n    } else if (stateMachine.type === 'phone') {\n      // remove any trailing spaces that were considered as \"separator\"\n      // chars by the state machine\n      matchedText = matchedText.replace(/ +$/g, '');\n      if (isValidPhoneNumber(matchedText)) {\n        var cleanNumber = matchedText.replace(/[^0-9,;#]/g, ''); // strip out non-digit characters exclude comma semicolon and #\n        matches.push(new PhoneMatch({\n          tagBuilder: tagBuilder,\n          matchedText: matchedText,\n          offset: startIdx,\n          number: cleanNumber,\n          plusSign: matchedText.charAt(0) === '+'\n        }));\n      }\n    } else {\n      assertNever(stateMachine);\n    }\n  }\n}\nvar openBraceRe = /[\\(\\{\\[]/;\nvar closeBraceRe = /[\\)\\}\\]]/;\nvar oppositeBrace = {\n  ')': '(',\n  '}': '{',\n  ']': '['\n};\n/**\n * Determines if a match found has unmatched closing parenthesis,\n * square brackets or curly brackets. If so, these unbalanced symbol(s) will be\n * removed from the URL match itself.\n *\n * A match may have an extra closing parenthesis/square brackets/curly brackets\n * at the end of the match because these are valid URL path characters. For\n * example, \"wikipedia.com/something_(disambiguation)\" should be auto-linked.\n *\n * However, an extra parenthesis *will* be included when the URL itself is\n * wrapped in parenthesis, such as in the case of:\n *\n *     \"(wikipedia.com/something_(disambiguation))\"\n *\n * In this case, the last closing parenthesis should *not* be part of the\n * URL itself, and this method will exclude it from the returned URL.\n *\n * For square brackets in URLs such as in PHP arrays, the same behavior as\n * parenthesis discussed above should happen:\n *\n *     \"[http://www.example.com/foo.php?bar[]=1&bar[]=2&bar[]=3]\"\n *\n * The very last closing square bracket should not be part of the URL itself,\n * and therefore this method will remove it.\n *\n * @param matchedText The full matched URL/email/hashtag/etc. from the state\n *   machine parser.\n * @return The updated matched text with extraneous suffix characters removed.\n */\nexport function excludeUnbalancedTrailingBracesAndPunctuation(matchedText) {\n  var braceCounts = {\n    '(': 0,\n    '{': 0,\n    '[': 0\n  };\n  for (var i = 0; i < matchedText.length; i++) {\n    var char_1 = matchedText.charAt(i);\n    if (openBraceRe.test(char_1)) {\n      braceCounts[char_1]++;\n    } else if (closeBraceRe.test(char_1)) {\n      braceCounts[oppositeBrace[char_1]]--;\n    }\n  }\n  var endIdx = matchedText.length - 1;\n  var char;\n  while (endIdx >= 0) {\n    char = matchedText.charAt(endIdx);\n    if (closeBraceRe.test(char)) {\n      var oppositeBraceChar = oppositeBrace[char];\n      if (braceCounts[oppositeBraceChar] < 0) {\n        braceCounts[oppositeBraceChar]++;\n        endIdx--;\n      } else {\n        break;\n      }\n    } else if (urlSuffixedCharsNotAllowedAtEndRe.test(char)) {\n      // Walk back a punctuation char like '?', ',', ':', '.', etc.\n      endIdx--;\n    } else {\n      break;\n    }\n  }\n  return matchedText.slice(0, endIdx + 1);\n}\nfunction createSchemeUrlStateMachine(startIdx, state) {\n  return {\n    type: 'url',\n    startIdx: startIdx,\n    state: state,\n    acceptStateReached: false,\n    matchType: 'scheme'\n  };\n}\nfunction createTldUrlStateMachine(startIdx, state) {\n  return {\n    type: 'url',\n    startIdx: startIdx,\n    state: state,\n    acceptStateReached: false,\n    matchType: 'tld'\n  };\n}\nfunction createIpV4UrlStateMachine(startIdx, state) {\n  return {\n    type: 'url',\n    startIdx: startIdx,\n    state: state,\n    acceptStateReached: false,\n    matchType: 'ipV4',\n    octetsEncountered: 1 // starts at 1 because we create this machine when encountering the first octet\n  };\n}\nfunction createEmailStateMachine(startIdx, state) {\n  return {\n    type: 'email',\n    startIdx: startIdx,\n    state: state,\n    acceptStateReached: false\n  };\n}\nfunction createHashtagStateMachine(startIdx, state) {\n  return {\n    type: 'hashtag',\n    startIdx: startIdx,\n    state: state,\n    acceptStateReached: false\n  };\n}\nfunction createMentionStateMachine(startIdx, state) {\n  return {\n    type: 'mention',\n    startIdx: startIdx,\n    state: state,\n    acceptStateReached: false\n  };\n}\nfunction createPhoneNumberStateMachine(startIdx, state) {\n  return {\n    type: 'phone',\n    startIdx: startIdx,\n    state: state,\n    acceptStateReached: false\n  };\n}\n","import { __assign } from \"tslib\";\nimport { letterRe, digitRe, whitespaceRe, quoteRe, controlCharsRe } from '../regex-lib';\nimport { assertNever } from '../utils';\n// For debugging: search for other \"For debugging\" lines\n// import CliTable from 'cli-table';\n/**\n * Parses an HTML string, calling the callbacks to notify of tags and text.\n *\n * ## History\n *\n * This file previously used a regular expression to find html tags in the input\n * text. Unfortunately, we ran into a bunch of catastrophic backtracking issues\n * with certain input text, causing Autolinker to either hang or just take a\n * really long time to parse the string.\n *\n * The current code is intended to be a O(n) algorithm that walks through\n * the string in one pass, and tries to be as cheap as possible. We don't need\n * to implement the full HTML spec, but rather simply determine where the string\n * looks like an HTML tag, and where it looks like text (so that we can autolink\n * that).\n *\n * This state machine parser is intended just to be a simple but performant\n * parser of HTML for the subset of requirements we have. We simply need to:\n *\n * 1. Determine where HTML tags are\n * 2. Determine the tag name (Autolinker specifically only cares about ,\n *