rotion 1.13.1 → 1.13.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.ja.md +117 -0
- package/README.md +101 -11
- package/dist/ui/cjs/index.js +1 -1
- package/dist/ui/cjs/index.js.map +1 -1
- package/dist/ui/cjs/types/exporter/api.d.ts +19 -0
- package/dist/ui/cjs/types/exporter/blocks.d.ts +13 -0
- package/dist/ui/cjs/types/exporter/breadcrumbs.d.ts +7 -0
- package/dist/ui/cjs/types/exporter/database.d.ts +12 -0
- package/dist/ui/cjs/types/exporter/files.d.ts +27 -0
- package/dist/ui/cjs/types/exporter/github.d.ts +241 -0
- package/dist/ui/cjs/types/exporter/index.d.ts +5 -0
- package/dist/ui/cjs/types/exporter/page.d.ts +15 -0
- package/dist/ui/cjs/types/exporter/types.d.ts +748 -0
- package/dist/ui/cjs/types/exporter/variables.d.ts +22 -0
- package/dist/ui/cjs/types/ui/components/Checkbox/Checkbox.d.ts +6 -0
- package/dist/ui/cjs/types/ui/components/Checkbox/index.d.ts +2 -0
- package/dist/ui/cjs/types/ui/components/Gallery/Gallery.d.ts +6 -0
- package/dist/ui/cjs/types/ui/components/Gallery/Gallery.types.d.ts +23 -0
- package/dist/ui/cjs/types/ui/components/Gallery/GalleryCard/GalleryCard.d.ts +5 -0
- package/dist/ui/cjs/types/ui/components/Gallery/GalleryCard/GalleryCard.types.d.ts +7 -0
- package/dist/ui/cjs/types/ui/components/Gallery/GalleryCard/GalleryHandler.d.ts +4 -0
- package/dist/ui/cjs/types/ui/components/Gallery/GalleryCard/GalleryHandler.types.d.ts +14 -0
- package/dist/ui/cjs/types/ui/components/Gallery/GalleryCard/GalleryLinkedCard.d.ts +4 -0
- package/dist/ui/cjs/types/ui/components/Gallery/GalleryCard/GalleryLinkedCard.types.d.ts +9 -0
- package/dist/ui/cjs/types/ui/components/Gallery/GalleryCard/index.d.ts +2 -0
- package/dist/ui/cjs/types/ui/components/Gallery/GalleryCheckboxField/GalleryCheckboxField.d.ts +5 -0
- package/dist/ui/cjs/types/ui/components/Gallery/GalleryCheckboxField/GalleryCheckboxField.types.d.ts +5 -0
- package/dist/ui/cjs/types/ui/components/Gallery/GalleryCheckboxField/index.d.ts +2 -0
- package/dist/ui/cjs/types/ui/components/Gallery/GalleryDateField/GalleryDateField.d.ts +5 -0
- package/dist/ui/cjs/types/ui/components/Gallery/GalleryDateField/GalleryDateField.types.d.ts +4 -0
- package/dist/ui/cjs/types/ui/components/Gallery/GalleryDateField/index.d.ts +2 -0
- package/dist/ui/cjs/types/ui/components/Gallery/GalleryFormulaField/GalleryFormulaField.d.ts +5 -0
- package/dist/ui/cjs/types/ui/components/Gallery/GalleryFormulaField/GalleryFormulaField.types.d.ts +5 -0
- package/dist/ui/cjs/types/ui/components/Gallery/GalleryFormulaField/index.d.ts +2 -0
- package/dist/ui/cjs/types/ui/components/Gallery/GalleryMultiSelectField/GalleryMultiSelectField.d.ts +5 -0
- package/dist/ui/cjs/types/ui/components/Gallery/GalleryMultiSelectField/GalleryMultiSelectField.types.d.ts +6 -0
- package/dist/ui/cjs/types/ui/components/Gallery/GalleryMultiSelectField/LinkedTag.d.ts +5 -0
- package/dist/ui/cjs/types/ui/components/Gallery/GalleryMultiSelectField/LinkedTag.types.d.ts +9 -0
- package/dist/ui/cjs/types/ui/components/Gallery/GalleryMultiSelectField/index.d.ts +2 -0
- package/dist/ui/cjs/types/ui/components/Gallery/GalleryNumberField/GalleryNumberField.d.ts +5 -0
- package/dist/ui/cjs/types/ui/components/Gallery/GalleryNumberField/GalleryNumberField.types.d.ts +5 -0
- package/dist/ui/cjs/types/ui/components/Gallery/GalleryNumberField/index.d.ts +2 -0
- package/dist/ui/cjs/types/ui/components/Gallery/GalleryPreview/GalleryPreview.d.ts +5 -0
- package/dist/ui/cjs/types/ui/components/Gallery/GalleryPreview/GalleryPreview.types.d.ts +14 -0
- package/dist/ui/cjs/types/ui/components/Gallery/GalleryPreview/index.d.ts +2 -0
- package/dist/ui/cjs/types/ui/components/Gallery/GalleryRichTextField/GalleryRichTextField.d.ts +5 -0
- package/dist/ui/cjs/types/ui/components/Gallery/GalleryRichTextField/GalleryRichTextField.types.d.ts +5 -0
- package/dist/ui/cjs/types/ui/components/Gallery/GalleryRichTextField/index.d.ts +2 -0
- package/dist/ui/cjs/types/ui/components/Gallery/GallerySelectField/GallerySelectField.d.ts +5 -0
- package/dist/ui/cjs/types/ui/components/Gallery/GallerySelectField/GallerySelectField.types.d.ts +6 -0
- package/dist/ui/cjs/types/ui/components/Gallery/GallerySelectField/LinkedTag.d.ts +5 -0
- package/dist/ui/cjs/types/ui/components/Gallery/GallerySelectField/LinkedTag.types.d.ts +9 -0
- package/dist/ui/cjs/types/ui/components/Gallery/GallerySelectField/index.d.ts +2 -0
- package/dist/ui/cjs/types/ui/components/Gallery/GalleryTitleField/GalleryTitleField.d.ts +5 -0
- package/dist/ui/cjs/types/ui/components/Gallery/GalleryTitleField/GalleryTitleField.types.d.ts +4 -0
- package/dist/ui/cjs/types/ui/components/Gallery/GalleryTitleField/index.d.ts +2 -0
- package/dist/ui/cjs/types/ui/components/Gallery/GalleryUrlField/GalleryUrlField.d.ts +5 -0
- package/dist/ui/cjs/types/ui/components/Gallery/GalleryUrlField/GalleryUrlField.types.d.ts +3 -0
- package/dist/ui/cjs/types/ui/components/Gallery/GalleryUrlField/index.d.ts +2 -0
- package/dist/ui/cjs/types/ui/components/Gallery/index.d.ts +2 -0
- package/dist/ui/cjs/types/ui/components/Icon/Icon.d.ts +10 -0
- package/dist/ui/cjs/types/ui/components/Icon/index.d.ts +2 -0
- package/dist/ui/cjs/types/ui/components/List/Column.d.ts +4 -0
- package/dist/ui/cjs/types/ui/components/List/Column.types.d.ts +7 -0
- package/dist/ui/cjs/types/ui/components/List/List.d.ts +9 -0
- package/dist/ui/cjs/types/ui/components/List/List.types.d.ts +23 -0
- package/dist/ui/cjs/types/ui/components/List/ListCheckboxField/ListCheckboxField.d.ts +5 -0
- package/dist/ui/cjs/types/ui/components/List/ListCheckboxField/ListCheckboxField.types.d.ts +5 -0
- package/dist/ui/cjs/types/ui/components/List/ListCheckboxField/index.d.ts +2 -0
- package/dist/ui/cjs/types/ui/components/List/ListDateField/ListDateField.d.ts +5 -0
- package/dist/ui/cjs/types/ui/components/List/ListDateField/ListDateField.types.d.ts +4 -0
- package/dist/ui/cjs/types/ui/components/List/ListDateField/index.d.ts +2 -0
- package/dist/ui/cjs/types/ui/components/List/ListFormulaField/ListFormulaField.d.ts +5 -0
- package/dist/ui/cjs/types/ui/components/List/ListFormulaField/ListFormulaField.types.d.ts +5 -0
- package/dist/ui/cjs/types/ui/components/List/ListFormulaField/index.d.ts +2 -0
- package/dist/ui/cjs/types/ui/components/List/ListHandler.d.ts +4 -0
- package/dist/ui/cjs/types/ui/components/List/ListHandler.types.d.ts +14 -0
- package/dist/ui/cjs/types/ui/components/List/ListMultiSelectField/LinkedTagIfLinked.d.ts +5 -0
- package/dist/ui/cjs/types/ui/components/List/ListMultiSelectField/LinkedTagIfLinked.types.d.ts +10 -0
- package/dist/ui/cjs/types/ui/components/List/ListMultiSelectField/ListMultiSelectField.d.ts +5 -0
- package/dist/ui/cjs/types/ui/components/List/ListMultiSelectField/ListMultiSelectField.types.d.ts +6 -0
- package/dist/ui/cjs/types/ui/components/List/ListMultiSelectField/index.d.ts +2 -0
- package/dist/ui/cjs/types/ui/components/List/ListNumberField/ListNumberField.d.ts +5 -0
- package/dist/ui/cjs/types/ui/components/List/ListNumberField/ListNumberField.types.d.ts +5 -0
- package/dist/ui/cjs/types/ui/components/List/ListNumberField/index.d.ts +2 -0
- package/dist/ui/cjs/types/ui/components/List/ListRichTextField/ListRichTextField.d.ts +5 -0
- package/dist/ui/cjs/types/ui/components/List/ListRichTextField/ListRichTextField.types.d.ts +4 -0
- package/dist/ui/cjs/types/ui/components/List/ListRichTextField/index.d.ts +2 -0
- package/dist/ui/cjs/types/ui/components/List/ListSelectField/LinkedTagIfLinked.d.ts +5 -0
- package/dist/ui/cjs/types/ui/components/List/ListSelectField/LinkedTagIfLinked.types.d.ts +10 -0
- package/dist/ui/cjs/types/ui/components/List/ListSelectField/ListSelectField.d.ts +5 -0
- package/dist/ui/cjs/types/ui/components/List/ListSelectField/ListSelectField.types.d.ts +6 -0
- package/dist/ui/cjs/types/ui/components/List/ListSelectField/index.d.ts +2 -0
- package/dist/ui/cjs/types/ui/components/List/ListTitleField/LinkedTitle.d.ts +5 -0
- package/dist/ui/cjs/types/ui/components/List/ListTitleField/LinkedTitle.types.d.ts +6 -0
- package/dist/ui/cjs/types/ui/components/List/ListTitleField/ListTitleField.d.ts +5 -0
- package/dist/ui/cjs/types/ui/components/List/ListTitleField/ListTitleField.types.d.ts +6 -0
- package/dist/ui/cjs/types/ui/components/List/ListTitleField/index.d.ts +2 -0
- package/dist/ui/cjs/types/ui/components/List/ListUrlField/ListUrlField.d.ts +5 -0
- package/dist/ui/cjs/types/ui/components/List/ListUrlField/ListUrlField.types.d.ts +3 -0
- package/dist/ui/cjs/types/ui/components/List/ListUrlField/index.d.ts +2 -0
- package/dist/ui/cjs/types/ui/components/List/index.d.ts +2 -0
- package/dist/ui/cjs/types/ui/components/Page/BookmarkBlock/BookmarkBlock.d.ts +6 -0
- package/dist/ui/cjs/types/ui/components/Page/BookmarkBlock/BookmarkBlock.types.d.ts +4 -0
- package/dist/ui/cjs/types/ui/components/Page/BookmarkBlock/index.d.ts +2 -0
- package/dist/ui/cjs/types/ui/components/Page/BreadcrumbBlock/BreadcrumbBlock.d.ts +6 -0
- package/dist/ui/cjs/types/ui/components/Page/BreadcrumbBlock/BreadcrumbBlock.types.d.ts +9 -0
- package/dist/ui/cjs/types/ui/components/Page/BreadcrumbBlock/Breadcrumbs.d.ts +4 -0
- package/dist/ui/cjs/types/ui/components/Page/BreadcrumbBlock/Breadcrumbs.types.d.ts +9 -0
- package/dist/ui/cjs/types/ui/components/Page/BreadcrumbBlock/LinkedBreadcrumbIfLinked.d.ts +5 -0
- package/dist/ui/cjs/types/ui/components/Page/BreadcrumbBlock/LinkedBreadcrumbIfLinked.types.d.ts +11 -0
- package/dist/ui/cjs/types/ui/components/Page/BreadcrumbBlock/index.d.ts +3 -0
- package/dist/ui/cjs/types/ui/components/Page/BulletedListBlock/BulletedListBlock.d.ts +6 -0
- package/dist/ui/cjs/types/ui/components/Page/BulletedListBlock/BulletedListBlock.types.d.ts +9 -0
- package/dist/ui/cjs/types/ui/components/Page/BulletedListBlock/index.d.ts +2 -0
- package/dist/ui/cjs/types/ui/components/Page/CalloutBlock/CalloutBlock.d.ts +6 -0
- package/dist/ui/cjs/types/ui/components/Page/CalloutBlock/CalloutBlock.types.d.ts +9 -0
- package/dist/ui/cjs/types/ui/components/Page/CalloutBlock/index.d.ts +2 -0
- package/dist/ui/cjs/types/ui/components/Page/ChildDatabaseBlock/ChildDatabaseBlock.d.ts +6 -0
- package/dist/ui/cjs/types/ui/components/Page/ChildDatabaseBlock/ChildDatabaseBlock.types.d.ts +12 -0
- package/dist/ui/cjs/types/ui/components/Page/ChildDatabaseBlock/index.d.ts +2 -0
- package/dist/ui/cjs/types/ui/components/Page/ChildPageBlock/ChildPageBlock.d.ts +6 -0
- package/dist/ui/cjs/types/ui/components/Page/ChildPageBlock/ChildPageBlock.types.d.ts +12 -0
- package/dist/ui/cjs/types/ui/components/Page/ChildPageBlock/index.d.ts +2 -0
- package/dist/ui/cjs/types/ui/components/Page/CodeBlock/Code/Code.d.ts +6 -0
- package/dist/ui/cjs/types/ui/components/Page/CodeBlock/Code/Code.types.d.ts +5 -0
- package/dist/ui/cjs/types/ui/components/Page/CodeBlock/Code/index.d.ts +2 -0
- package/dist/ui/cjs/types/ui/components/Page/CodeBlock/CodeBlock.d.ts +6 -0
- package/dist/ui/cjs/types/ui/components/Page/CodeBlock/CodeBlock.types.d.ts +4 -0
- package/dist/ui/cjs/types/ui/components/Page/CodeBlock/index.d.ts +2 -0
- package/dist/ui/cjs/types/ui/components/Page/ColumnListBlock/ColumnListBlock.d.ts +6 -0
- package/dist/ui/cjs/types/ui/components/Page/ColumnListBlock/ColumnListBlock.types.d.ts +9 -0
- package/dist/ui/cjs/types/ui/components/Page/ColumnListBlock/index.d.ts +2 -0
- package/dist/ui/cjs/types/ui/components/Page/EmbedBlock/EmbedBlock.d.ts +6 -0
- package/dist/ui/cjs/types/ui/components/Page/EmbedBlock/EmbedBlock.types.d.ts +13 -0
- package/dist/ui/cjs/types/ui/components/Page/EmbedBlock/index.d.ts +2 -0
- package/dist/ui/cjs/types/ui/components/Page/EquationBlock/EquationBlock.d.ts +6 -0
- package/dist/ui/cjs/types/ui/components/Page/EquationBlock/EquationBlock.types.d.ts +4 -0
- package/dist/ui/cjs/types/ui/components/Page/EquationBlock/index.d.ts +2 -0
- package/dist/ui/cjs/types/ui/components/Page/FileBlock/FileBlock.d.ts +7 -0
- package/dist/ui/cjs/types/ui/components/Page/FileBlock/FileBlock.types.d.ts +4 -0
- package/dist/ui/cjs/types/ui/components/Page/FileBlock/index.d.ts +2 -0
- package/dist/ui/cjs/types/ui/components/Page/ImageBlock/ImageBlock.d.ts +6 -0
- package/dist/ui/cjs/types/ui/components/Page/ImageBlock/ImageBlock.types.d.ts +4 -0
- package/dist/ui/cjs/types/ui/components/Page/ImageBlock/index.d.ts +2 -0
- package/dist/ui/cjs/types/ui/components/Page/LinkPreviewBlock/LinkPreviewBlock.d.ts +7 -0
- package/dist/ui/cjs/types/ui/components/Page/LinkPreviewBlock/LinkPreviewBlock.types.d.ts +4 -0
- package/dist/ui/cjs/types/ui/components/Page/LinkPreviewBlock/index.d.ts +2 -0
- package/dist/ui/cjs/types/ui/components/Page/ListBlocks/ListBlocks.d.ts +6 -0
- package/dist/ui/cjs/types/ui/components/Page/ListBlocks/ListBlocks.types.d.ts +11 -0
- package/dist/ui/cjs/types/ui/components/Page/ListBlocks/index.d.ts +2 -0
- package/dist/ui/cjs/types/ui/components/Page/NumberedListBlock/NumberedListBlock.d.ts +6 -0
- package/dist/ui/cjs/types/ui/components/Page/NumberedListBlock/NumberedListBlock.types.d.ts +9 -0
- package/dist/ui/cjs/types/ui/components/Page/NumberedListBlock/index.d.ts +2 -0
- package/dist/ui/cjs/types/ui/components/Page/Page.d.ts +4 -0
- package/dist/ui/cjs/types/ui/components/Page/Page.types.d.ts +14 -0
- package/dist/ui/cjs/types/ui/components/Page/PageHandler.d.ts +15 -0
- package/dist/ui/cjs/types/ui/components/Page/PageHandler.types.d.ts +10 -0
- package/dist/ui/cjs/types/ui/components/Page/PdfBlock/Pdf.d.ts +24 -0
- package/dist/ui/cjs/types/ui/components/Page/PdfBlock/PdfBlock.d.ts +6 -0
- package/dist/ui/cjs/types/ui/components/Page/PdfBlock/PdfBlock.types.d.ts +4 -0
- package/dist/ui/cjs/types/ui/components/Page/PdfBlock/index.d.ts +2 -0
- package/dist/ui/cjs/types/ui/components/Page/SyncedBlock/SyncedBlock.d.ts +6 -0
- package/dist/ui/cjs/types/ui/components/Page/SyncedBlock/SyncedBlock.types.d.ts +4 -0
- package/dist/ui/cjs/types/ui/components/Page/SyncedBlock/index.d.ts +2 -0
- package/dist/ui/cjs/types/ui/components/Page/TableBlock/TableBlock.d.ts +6 -0
- package/dist/ui/cjs/types/ui/components/Page/TableBlock/TableBlock.types.d.ts +13 -0
- package/dist/ui/cjs/types/ui/components/Page/TableBlock/index.d.ts +2 -0
- package/dist/ui/cjs/types/ui/components/Page/TableOfContentsBlock/TableOfContentsBlock.d.ts +4 -0
- package/dist/ui/cjs/types/ui/components/Page/TableOfContentsBlock/TableOfContentsBlock.types.d.ts +4 -0
- package/dist/ui/cjs/types/ui/components/Page/TableOfContentsBlock/index.d.ts +2 -0
- package/dist/ui/cjs/types/ui/components/Page/TextBlock/TextBlock.d.ts +6 -0
- package/dist/ui/cjs/types/ui/components/Page/TextBlock/TextBlock.types.d.ts +6 -0
- package/dist/ui/cjs/types/ui/components/Page/TextBlock/index.d.ts +2 -0
- package/dist/ui/cjs/types/ui/components/Page/ToDoBlock/ToDoBlock.d.ts +6 -0
- package/dist/ui/cjs/types/ui/components/Page/ToDoBlock/ToDoBlock.types.d.ts +4 -0
- package/dist/ui/cjs/types/ui/components/Page/ToDoBlock/index.d.ts +2 -0
- package/dist/ui/cjs/types/ui/components/Page/ToggleBlock/ToggleBlock.d.ts +6 -0
- package/dist/ui/cjs/types/ui/components/Page/ToggleBlock/ToggleBlock.types.d.ts +4 -0
- package/dist/ui/cjs/types/ui/components/Page/ToggleBlock/index.d.ts +2 -0
- package/dist/ui/cjs/types/ui/components/Page/VideoBlock/VideoBlock.d.ts +6 -0
- package/dist/ui/cjs/types/ui/components/Page/VideoBlock/VideoBlock.types.d.ts +10 -0
- package/dist/ui/cjs/types/ui/components/Page/VideoBlock/index.d.ts +2 -0
- package/dist/ui/cjs/types/ui/components/Page/index.d.ts +2 -0
- package/dist/ui/cjs/types/ui/components/PrefixSuffix/PrefixSuffix.d.ts +5 -0
- package/dist/ui/cjs/types/ui/components/PrefixSuffix/PrefixSuffix.types.d.ts +6 -0
- package/dist/ui/cjs/types/ui/components/PrefixSuffix/index.d.ts +2 -0
- package/dist/ui/cjs/types/ui/components/RichText/Annotation/Annotation.d.ts +6 -0
- package/dist/ui/cjs/types/ui/components/RichText/Annotation/index.d.ts +2 -0
- package/dist/ui/cjs/types/ui/components/RichText/Caption.d.ts +4 -0
- package/dist/ui/cjs/types/ui/components/RichText/Equation/Equation.d.ts +6 -0
- package/dist/ui/cjs/types/ui/components/RichText/Equation/Equation.types.d.ts +6 -0
- package/dist/ui/cjs/types/ui/components/RichText/Equation/index.d.ts +2 -0
- package/dist/ui/cjs/types/ui/components/RichText/LinkIfLinked/LinkIfLinked.d.ts +7 -0
- package/dist/ui/cjs/types/ui/components/RichText/LinkIfLinked/LinkIfLinked.types.d.ts +12 -0
- package/dist/ui/cjs/types/ui/components/RichText/LinkIfLinked/index.d.ts +2 -0
- package/dist/ui/cjs/types/ui/components/RichText/Mention/DateMention/DateMention.d.ts +5 -0
- package/dist/ui/cjs/types/ui/components/RichText/Mention/DateMention/DateMention.types.d.ts +4 -0
- package/dist/ui/cjs/types/ui/components/RichText/Mention/DateMention/index.d.ts +2 -0
- package/dist/ui/cjs/types/ui/components/RichText/Mention/LinkPreviewMention/LinkPreviewMention.d.ts +5 -0
- package/dist/ui/cjs/types/ui/components/RichText/Mention/LinkPreviewMention/LinkPreviewMention.types.d.ts +6 -0
- package/dist/ui/cjs/types/ui/components/RichText/Mention/LinkPreviewMention/index.d.ts +2 -0
- package/dist/ui/cjs/types/ui/components/RichText/Mention/Mention.d.ts +5 -0
- package/dist/ui/cjs/types/ui/components/RichText/Mention/Mention.types.d.ts +6 -0
- package/dist/ui/cjs/types/ui/components/RichText/Mention/PageOrDatabaseMention/PageOrDatabaseMention.d.ts +5 -0
- package/dist/ui/cjs/types/ui/components/RichText/Mention/PageOrDatabaseMention/PageOrDatabaseMention.types.d.ts +4 -0
- package/dist/ui/cjs/types/ui/components/RichText/Mention/PageOrDatabaseMention/index.d.ts +2 -0
- package/dist/ui/cjs/types/ui/components/RichText/Mention/TemplateMention/TemplateMention.d.ts +4 -0
- package/dist/ui/cjs/types/ui/components/RichText/Mention/TemplateMention/TemplateMention.types.d.ts +5 -0
- package/dist/ui/cjs/types/ui/components/RichText/Mention/TemplateMention/index.d.ts +2 -0
- package/dist/ui/cjs/types/ui/components/RichText/Mention/UserMention/UserMention.d.ts +5 -0
- package/dist/ui/cjs/types/ui/components/RichText/Mention/UserMention/UserMention.types.d.ts +4 -0
- package/dist/ui/cjs/types/ui/components/RichText/Mention/UserMention/index.d.ts +2 -0
- package/dist/ui/cjs/types/ui/components/RichText/Mention/index.d.ts +2 -0
- package/dist/ui/cjs/types/ui/components/RichText/RichText.d.ts +4 -0
- package/dist/ui/cjs/types/ui/components/RichText/RichText.types.d.ts +11 -0
- package/dist/ui/cjs/types/ui/components/RichText/Text/Text.d.ts +4 -0
- package/dist/ui/cjs/types/ui/components/RichText/Text/Text.types.d.ts +6 -0
- package/dist/ui/cjs/types/ui/components/RichText/Text/index.d.ts +2 -0
- package/dist/ui/cjs/types/ui/components/RichText/index.d.ts +2 -0
- package/dist/ui/cjs/types/ui/components/Table/Column.d.ts +4 -0
- package/dist/ui/cjs/types/ui/components/Table/Column.types.d.ts +7 -0
- package/dist/ui/cjs/types/ui/components/Table/Table.d.ts +6 -0
- package/dist/ui/cjs/types/ui/components/Table/Table.types.d.ts +24 -0
- package/dist/ui/cjs/types/ui/components/Table/TableCheckboxField/TableCheckboxField.d.ts +5 -0
- package/dist/ui/cjs/types/ui/components/Table/TableCheckboxField/TableCheckboxField.types.d.ts +5 -0
- package/dist/ui/cjs/types/ui/components/Table/TableCheckboxField/index.d.ts +2 -0
- package/dist/ui/cjs/types/ui/components/Table/TableDateField/TableDateField.d.ts +5 -0
- package/dist/ui/cjs/types/ui/components/Table/TableDateField/TableDateField.types.d.ts +4 -0
- package/dist/ui/cjs/types/ui/components/Table/TableDateField/index.d.ts +2 -0
- package/dist/ui/cjs/types/ui/components/Table/TableFormulaField/TableFormulaField.d.ts +5 -0
- package/dist/ui/cjs/types/ui/components/Table/TableFormulaField/TableFormulaField.types.d.ts +5 -0
- package/dist/ui/cjs/types/ui/components/Table/TableFormulaField/index.d.ts +2 -0
- package/dist/ui/cjs/types/ui/components/Table/TableHandler.d.ts +4 -0
- package/dist/ui/cjs/types/ui/components/Table/TableHandler.types.d.ts +14 -0
- package/dist/ui/cjs/types/ui/components/Table/TableIcon/TableIcon.d.ts +4 -0
- package/dist/ui/cjs/types/ui/components/Table/TableIcon/TableIcon.types.d.ts +4 -0
- package/dist/ui/cjs/types/ui/components/Table/TableIcon/index.d.ts +2 -0
- package/dist/ui/cjs/types/ui/components/Table/TableMultiSelectField/LinkedTagIfLinked.d.ts +5 -0
- package/dist/ui/cjs/types/ui/components/Table/TableMultiSelectField/LinkedTagIfLinked.types.d.ts +10 -0
- package/dist/ui/cjs/types/ui/components/Table/TableMultiSelectField/TableMultiSelectField.d.ts +5 -0
- package/dist/ui/cjs/types/ui/components/Table/TableMultiSelectField/TableMultiSelectField.types.d.ts +6 -0
- package/dist/ui/cjs/types/ui/components/Table/TableMultiSelectField/index.d.ts +2 -0
- package/dist/ui/cjs/types/ui/components/Table/TableNumberField/TableNumberField.d.ts +5 -0
- package/dist/ui/cjs/types/ui/components/Table/TableNumberField/TableNumberField.types.d.ts +5 -0
- package/dist/ui/cjs/types/ui/components/Table/TableNumberField/index.d.ts +2 -0
- package/dist/ui/cjs/types/ui/components/Table/TableRichTextField/TableRichTextField.d.ts +5 -0
- package/dist/ui/cjs/types/ui/components/Table/TableRichTextField/TableRichTextField.types.d.ts +4 -0
- package/dist/ui/cjs/types/ui/components/Table/TableRichTextField/index.d.ts +2 -0
- package/dist/ui/cjs/types/ui/components/Table/TableSelectField/LinkedTagIfLinked.d.ts +5 -0
- package/dist/ui/cjs/types/ui/components/Table/TableSelectField/LinkedTagIfLinked.types.d.ts +10 -0
- package/dist/ui/cjs/types/ui/components/Table/TableSelectField/TableSelectField.d.ts +5 -0
- package/dist/ui/cjs/types/ui/components/Table/TableSelectField/TableSelectField.types.d.ts +6 -0
- package/dist/ui/cjs/types/ui/components/Table/TableSelectField/index.d.ts +2 -0
- package/dist/ui/cjs/types/ui/components/Table/TableTitleField/LinkedTitleIfLinked.d.ts +5 -0
- package/dist/ui/cjs/types/ui/components/Table/TableTitleField/LinkedTitleIfLinked.types.d.ts +6 -0
- package/dist/ui/cjs/types/ui/components/Table/TableTitleField/TableTitleField.d.ts +5 -0
- package/dist/ui/cjs/types/ui/components/Table/TableTitleField/TableTitleField.types.d.ts +6 -0
- package/dist/ui/cjs/types/ui/components/Table/TableTitleField/index.d.ts +2 -0
- package/dist/ui/cjs/types/ui/components/Table/TableUrlField/TableUrlField.d.ts +5 -0
- package/dist/ui/cjs/types/ui/components/Table/TableUrlField/TableUrlField.types.d.ts +3 -0
- package/dist/ui/cjs/types/ui/components/Table/TableUrlField/index.d.ts +2 -0
- package/dist/ui/cjs/types/ui/components/Table/index.d.ts +2 -0
- package/dist/ui/cjs/types/ui/components/index.d.ts +61 -0
- package/dist/ui/cjs/types/ui/components/lib.d.ts +21 -0
- package/dist/ui/cjs/types/ui/components/types.d.ts +8 -0
- package/dist/ui/cjs/types/ui/index.d.ts +1 -0
- package/dist/ui/esm/index.js +1 -1
- package/dist/ui/esm/index.js.map +1 -1
- package/dist/ui/esm/types/exporter/api.d.ts +19 -0
- package/dist/ui/esm/types/exporter/blocks.d.ts +13 -0
- package/dist/ui/esm/types/exporter/breadcrumbs.d.ts +7 -0
- package/dist/ui/esm/types/exporter/database.d.ts +12 -0
- package/dist/ui/esm/types/exporter/files.d.ts +27 -0
- package/dist/ui/esm/types/exporter/github.d.ts +241 -0
- package/dist/ui/esm/types/exporter/index.d.ts +5 -0
- package/dist/ui/esm/types/exporter/page.d.ts +15 -0
- package/dist/ui/esm/types/exporter/types.d.ts +748 -0
- package/dist/ui/esm/types/exporter/variables.d.ts +22 -0
- package/dist/ui/esm/types/ui/components/Checkbox/Checkbox.d.ts +6 -0
- package/dist/ui/esm/types/ui/components/Checkbox/index.d.ts +2 -0
- package/dist/ui/esm/types/ui/components/Gallery/Gallery.d.ts +6 -0
- package/dist/ui/esm/types/ui/components/Gallery/Gallery.types.d.ts +23 -0
- package/dist/ui/esm/types/ui/components/Gallery/GalleryCard/GalleryCard.d.ts +5 -0
- package/dist/ui/esm/types/ui/components/Gallery/GalleryCard/GalleryCard.types.d.ts +7 -0
- package/dist/ui/esm/types/ui/components/Gallery/GalleryCard/GalleryHandler.d.ts +4 -0
- package/dist/ui/esm/types/ui/components/Gallery/GalleryCard/GalleryHandler.types.d.ts +14 -0
- package/dist/ui/esm/types/ui/components/Gallery/GalleryCard/GalleryLinkedCard.d.ts +4 -0
- package/dist/ui/esm/types/ui/components/Gallery/GalleryCard/GalleryLinkedCard.types.d.ts +9 -0
- package/dist/ui/esm/types/ui/components/Gallery/GalleryCard/index.d.ts +2 -0
- package/dist/ui/esm/types/ui/components/Gallery/GalleryCheckboxField/GalleryCheckboxField.d.ts +5 -0
- package/dist/ui/esm/types/ui/components/Gallery/GalleryCheckboxField/GalleryCheckboxField.types.d.ts +5 -0
- package/dist/ui/esm/types/ui/components/Gallery/GalleryCheckboxField/index.d.ts +2 -0
- package/dist/ui/esm/types/ui/components/Gallery/GalleryDateField/GalleryDateField.d.ts +5 -0
- package/dist/ui/esm/types/ui/components/Gallery/GalleryDateField/GalleryDateField.types.d.ts +4 -0
- package/dist/ui/esm/types/ui/components/Gallery/GalleryDateField/index.d.ts +2 -0
- package/dist/ui/esm/types/ui/components/Gallery/GalleryFormulaField/GalleryFormulaField.d.ts +5 -0
- package/dist/ui/esm/types/ui/components/Gallery/GalleryFormulaField/GalleryFormulaField.types.d.ts +5 -0
- package/dist/ui/esm/types/ui/components/Gallery/GalleryFormulaField/index.d.ts +2 -0
- package/dist/ui/esm/types/ui/components/Gallery/GalleryMultiSelectField/GalleryMultiSelectField.d.ts +5 -0
- package/dist/ui/esm/types/ui/components/Gallery/GalleryMultiSelectField/GalleryMultiSelectField.types.d.ts +6 -0
- package/dist/ui/esm/types/ui/components/Gallery/GalleryMultiSelectField/LinkedTag.d.ts +5 -0
- package/dist/ui/esm/types/ui/components/Gallery/GalleryMultiSelectField/LinkedTag.types.d.ts +9 -0
- package/dist/ui/esm/types/ui/components/Gallery/GalleryMultiSelectField/index.d.ts +2 -0
- package/dist/ui/esm/types/ui/components/Gallery/GalleryNumberField/GalleryNumberField.d.ts +5 -0
- package/dist/ui/esm/types/ui/components/Gallery/GalleryNumberField/GalleryNumberField.types.d.ts +5 -0
- package/dist/ui/esm/types/ui/components/Gallery/GalleryNumberField/index.d.ts +2 -0
- package/dist/ui/esm/types/ui/components/Gallery/GalleryPreview/GalleryPreview.d.ts +5 -0
- package/dist/ui/esm/types/ui/components/Gallery/GalleryPreview/GalleryPreview.types.d.ts +14 -0
- package/dist/ui/esm/types/ui/components/Gallery/GalleryPreview/index.d.ts +2 -0
- package/dist/ui/esm/types/ui/components/Gallery/GalleryRichTextField/GalleryRichTextField.d.ts +5 -0
- package/dist/ui/esm/types/ui/components/Gallery/GalleryRichTextField/GalleryRichTextField.types.d.ts +5 -0
- package/dist/ui/esm/types/ui/components/Gallery/GalleryRichTextField/index.d.ts +2 -0
- package/dist/ui/esm/types/ui/components/Gallery/GallerySelectField/GallerySelectField.d.ts +5 -0
- package/dist/ui/esm/types/ui/components/Gallery/GallerySelectField/GallerySelectField.types.d.ts +6 -0
- package/dist/ui/esm/types/ui/components/Gallery/GallerySelectField/LinkedTag.d.ts +5 -0
- package/dist/ui/esm/types/ui/components/Gallery/GallerySelectField/LinkedTag.types.d.ts +9 -0
- package/dist/ui/esm/types/ui/components/Gallery/GallerySelectField/index.d.ts +2 -0
- package/dist/ui/esm/types/ui/components/Gallery/GalleryTitleField/GalleryTitleField.d.ts +5 -0
- package/dist/ui/esm/types/ui/components/Gallery/GalleryTitleField/GalleryTitleField.types.d.ts +4 -0
- package/dist/ui/esm/types/ui/components/Gallery/GalleryTitleField/index.d.ts +2 -0
- package/dist/ui/esm/types/ui/components/Gallery/GalleryUrlField/GalleryUrlField.d.ts +5 -0
- package/dist/ui/esm/types/ui/components/Gallery/GalleryUrlField/GalleryUrlField.types.d.ts +3 -0
- package/dist/ui/esm/types/ui/components/Gallery/GalleryUrlField/index.d.ts +2 -0
- package/dist/ui/esm/types/ui/components/Gallery/index.d.ts +2 -0
- package/dist/ui/esm/types/ui/components/Icon/Icon.d.ts +10 -0
- package/dist/ui/esm/types/ui/components/Icon/index.d.ts +2 -0
- package/dist/ui/esm/types/ui/components/List/Column.d.ts +4 -0
- package/dist/ui/esm/types/ui/components/List/Column.types.d.ts +7 -0
- package/dist/ui/esm/types/ui/components/List/List.d.ts +9 -0
- package/dist/ui/esm/types/ui/components/List/List.types.d.ts +23 -0
- package/dist/ui/esm/types/ui/components/List/ListCheckboxField/ListCheckboxField.d.ts +5 -0
- package/dist/ui/esm/types/ui/components/List/ListCheckboxField/ListCheckboxField.types.d.ts +5 -0
- package/dist/ui/esm/types/ui/components/List/ListCheckboxField/index.d.ts +2 -0
- package/dist/ui/esm/types/ui/components/List/ListDateField/ListDateField.d.ts +5 -0
- package/dist/ui/esm/types/ui/components/List/ListDateField/ListDateField.types.d.ts +4 -0
- package/dist/ui/esm/types/ui/components/List/ListDateField/index.d.ts +2 -0
- package/dist/ui/esm/types/ui/components/List/ListFormulaField/ListFormulaField.d.ts +5 -0
- package/dist/ui/esm/types/ui/components/List/ListFormulaField/ListFormulaField.types.d.ts +5 -0
- package/dist/ui/esm/types/ui/components/List/ListFormulaField/index.d.ts +2 -0
- package/dist/ui/esm/types/ui/components/List/ListHandler.d.ts +4 -0
- package/dist/ui/esm/types/ui/components/List/ListHandler.types.d.ts +14 -0
- package/dist/ui/esm/types/ui/components/List/ListMultiSelectField/LinkedTagIfLinked.d.ts +5 -0
- package/dist/ui/esm/types/ui/components/List/ListMultiSelectField/LinkedTagIfLinked.types.d.ts +10 -0
- package/dist/ui/esm/types/ui/components/List/ListMultiSelectField/ListMultiSelectField.d.ts +5 -0
- package/dist/ui/esm/types/ui/components/List/ListMultiSelectField/ListMultiSelectField.types.d.ts +6 -0
- package/dist/ui/esm/types/ui/components/List/ListMultiSelectField/index.d.ts +2 -0
- package/dist/ui/esm/types/ui/components/List/ListNumberField/ListNumberField.d.ts +5 -0
- package/dist/ui/esm/types/ui/components/List/ListNumberField/ListNumberField.types.d.ts +5 -0
- package/dist/ui/esm/types/ui/components/List/ListNumberField/index.d.ts +2 -0
- package/dist/ui/esm/types/ui/components/List/ListRichTextField/ListRichTextField.d.ts +5 -0
- package/dist/ui/esm/types/ui/components/List/ListRichTextField/ListRichTextField.types.d.ts +4 -0
- package/dist/ui/esm/types/ui/components/List/ListRichTextField/index.d.ts +2 -0
- package/dist/ui/esm/types/ui/components/List/ListSelectField/LinkedTagIfLinked.d.ts +5 -0
- package/dist/ui/esm/types/ui/components/List/ListSelectField/LinkedTagIfLinked.types.d.ts +10 -0
- package/dist/ui/esm/types/ui/components/List/ListSelectField/ListSelectField.d.ts +5 -0
- package/dist/ui/esm/types/ui/components/List/ListSelectField/ListSelectField.types.d.ts +6 -0
- package/dist/ui/esm/types/ui/components/List/ListSelectField/index.d.ts +2 -0
- package/dist/ui/esm/types/ui/components/List/ListTitleField/LinkedTitle.d.ts +5 -0
- package/dist/ui/esm/types/ui/components/List/ListTitleField/LinkedTitle.types.d.ts +6 -0
- package/dist/ui/esm/types/ui/components/List/ListTitleField/ListTitleField.d.ts +5 -0
- package/dist/ui/esm/types/ui/components/List/ListTitleField/ListTitleField.types.d.ts +6 -0
- package/dist/ui/esm/types/ui/components/List/ListTitleField/index.d.ts +2 -0
- package/dist/ui/esm/types/ui/components/List/ListUrlField/ListUrlField.d.ts +5 -0
- package/dist/ui/esm/types/ui/components/List/ListUrlField/ListUrlField.types.d.ts +3 -0
- package/dist/ui/esm/types/ui/components/List/ListUrlField/index.d.ts +2 -0
- package/dist/ui/esm/types/ui/components/List/index.d.ts +2 -0
- package/dist/ui/esm/types/ui/components/Page/BookmarkBlock/BookmarkBlock.d.ts +6 -0
- package/dist/ui/esm/types/ui/components/Page/BookmarkBlock/BookmarkBlock.types.d.ts +4 -0
- package/dist/ui/esm/types/ui/components/Page/BookmarkBlock/index.d.ts +2 -0
- package/dist/ui/esm/types/ui/components/Page/BreadcrumbBlock/BreadcrumbBlock.d.ts +6 -0
- package/dist/ui/esm/types/ui/components/Page/BreadcrumbBlock/BreadcrumbBlock.types.d.ts +9 -0
- package/dist/ui/esm/types/ui/components/Page/BreadcrumbBlock/Breadcrumbs.d.ts +4 -0
- package/dist/ui/esm/types/ui/components/Page/BreadcrumbBlock/Breadcrumbs.types.d.ts +9 -0
- package/dist/ui/esm/types/ui/components/Page/BreadcrumbBlock/LinkedBreadcrumbIfLinked.d.ts +5 -0
- package/dist/ui/esm/types/ui/components/Page/BreadcrumbBlock/LinkedBreadcrumbIfLinked.types.d.ts +11 -0
- package/dist/ui/esm/types/ui/components/Page/BreadcrumbBlock/index.d.ts +3 -0
- package/dist/ui/esm/types/ui/components/Page/BulletedListBlock/BulletedListBlock.d.ts +6 -0
- package/dist/ui/esm/types/ui/components/Page/BulletedListBlock/BulletedListBlock.types.d.ts +9 -0
- package/dist/ui/esm/types/ui/components/Page/BulletedListBlock/index.d.ts +2 -0
- package/dist/ui/esm/types/ui/components/Page/CalloutBlock/CalloutBlock.d.ts +6 -0
- package/dist/ui/esm/types/ui/components/Page/CalloutBlock/CalloutBlock.types.d.ts +9 -0
- package/dist/ui/esm/types/ui/components/Page/CalloutBlock/index.d.ts +2 -0
- package/dist/ui/esm/types/ui/components/Page/ChildDatabaseBlock/ChildDatabaseBlock.d.ts +6 -0
- package/dist/ui/esm/types/ui/components/Page/ChildDatabaseBlock/ChildDatabaseBlock.types.d.ts +12 -0
- package/dist/ui/esm/types/ui/components/Page/ChildDatabaseBlock/index.d.ts +2 -0
- package/dist/ui/esm/types/ui/components/Page/ChildPageBlock/ChildPageBlock.d.ts +6 -0
- package/dist/ui/esm/types/ui/components/Page/ChildPageBlock/ChildPageBlock.types.d.ts +12 -0
- package/dist/ui/esm/types/ui/components/Page/ChildPageBlock/index.d.ts +2 -0
- package/dist/ui/esm/types/ui/components/Page/CodeBlock/Code/Code.d.ts +6 -0
- package/dist/ui/esm/types/ui/components/Page/CodeBlock/Code/Code.types.d.ts +5 -0
- package/dist/ui/esm/types/ui/components/Page/CodeBlock/Code/index.d.ts +2 -0
- package/dist/ui/esm/types/ui/components/Page/CodeBlock/CodeBlock.d.ts +6 -0
- package/dist/ui/esm/types/ui/components/Page/CodeBlock/CodeBlock.types.d.ts +4 -0
- package/dist/ui/esm/types/ui/components/Page/CodeBlock/index.d.ts +2 -0
- package/dist/ui/esm/types/ui/components/Page/ColumnListBlock/ColumnListBlock.d.ts +6 -0
- package/dist/ui/esm/types/ui/components/Page/ColumnListBlock/ColumnListBlock.types.d.ts +9 -0
- package/dist/ui/esm/types/ui/components/Page/ColumnListBlock/index.d.ts +2 -0
- package/dist/ui/esm/types/ui/components/Page/EmbedBlock/EmbedBlock.d.ts +6 -0
- package/dist/ui/esm/types/ui/components/Page/EmbedBlock/EmbedBlock.types.d.ts +13 -0
- package/dist/ui/esm/types/ui/components/Page/EmbedBlock/index.d.ts +2 -0
- package/dist/ui/esm/types/ui/components/Page/EquationBlock/EquationBlock.d.ts +6 -0
- package/dist/ui/esm/types/ui/components/Page/EquationBlock/EquationBlock.types.d.ts +4 -0
- package/dist/ui/esm/types/ui/components/Page/EquationBlock/index.d.ts +2 -0
- package/dist/ui/esm/types/ui/components/Page/FileBlock/FileBlock.d.ts +7 -0
- package/dist/ui/esm/types/ui/components/Page/FileBlock/FileBlock.types.d.ts +4 -0
- package/dist/ui/esm/types/ui/components/Page/FileBlock/index.d.ts +2 -0
- package/dist/ui/esm/types/ui/components/Page/ImageBlock/ImageBlock.d.ts +6 -0
- package/dist/ui/esm/types/ui/components/Page/ImageBlock/ImageBlock.types.d.ts +4 -0
- package/dist/ui/esm/types/ui/components/Page/ImageBlock/index.d.ts +2 -0
- package/dist/ui/esm/types/ui/components/Page/LinkPreviewBlock/LinkPreviewBlock.d.ts +7 -0
- package/dist/ui/esm/types/ui/components/Page/LinkPreviewBlock/LinkPreviewBlock.types.d.ts +4 -0
- package/dist/ui/esm/types/ui/components/Page/LinkPreviewBlock/index.d.ts +2 -0
- package/dist/ui/esm/types/ui/components/Page/ListBlocks/ListBlocks.d.ts +6 -0
- package/dist/ui/esm/types/ui/components/Page/ListBlocks/ListBlocks.types.d.ts +11 -0
- package/dist/ui/esm/types/ui/components/Page/ListBlocks/index.d.ts +2 -0
- package/dist/ui/esm/types/ui/components/Page/NumberedListBlock/NumberedListBlock.d.ts +6 -0
- package/dist/ui/esm/types/ui/components/Page/NumberedListBlock/NumberedListBlock.types.d.ts +9 -0
- package/dist/ui/esm/types/ui/components/Page/NumberedListBlock/index.d.ts +2 -0
- package/dist/ui/esm/types/ui/components/Page/Page.d.ts +4 -0
- package/dist/ui/esm/types/ui/components/Page/Page.types.d.ts +14 -0
- package/dist/ui/esm/types/ui/components/Page/PageHandler.d.ts +15 -0
- package/dist/ui/esm/types/ui/components/Page/PageHandler.types.d.ts +10 -0
- package/dist/ui/esm/types/ui/components/Page/PdfBlock/Pdf.d.ts +24 -0
- package/dist/ui/esm/types/ui/components/Page/PdfBlock/PdfBlock.d.ts +6 -0
- package/dist/ui/esm/types/ui/components/Page/PdfBlock/PdfBlock.types.d.ts +4 -0
- package/dist/ui/esm/types/ui/components/Page/PdfBlock/index.d.ts +2 -0
- package/dist/ui/esm/types/ui/components/Page/SyncedBlock/SyncedBlock.d.ts +6 -0
- package/dist/ui/esm/types/ui/components/Page/SyncedBlock/SyncedBlock.types.d.ts +4 -0
- package/dist/ui/esm/types/ui/components/Page/SyncedBlock/index.d.ts +2 -0
- package/dist/ui/esm/types/ui/components/Page/TableBlock/TableBlock.d.ts +6 -0
- package/dist/ui/esm/types/ui/components/Page/TableBlock/TableBlock.types.d.ts +13 -0
- package/dist/ui/esm/types/ui/components/Page/TableBlock/index.d.ts +2 -0
- package/dist/ui/esm/types/ui/components/Page/TableOfContentsBlock/TableOfContentsBlock.d.ts +4 -0
- package/dist/ui/esm/types/ui/components/Page/TableOfContentsBlock/TableOfContentsBlock.types.d.ts +4 -0
- package/dist/ui/esm/types/ui/components/Page/TableOfContentsBlock/index.d.ts +2 -0
- package/dist/ui/esm/types/ui/components/Page/TextBlock/TextBlock.d.ts +6 -0
- package/dist/ui/esm/types/ui/components/Page/TextBlock/TextBlock.types.d.ts +6 -0
- package/dist/ui/esm/types/ui/components/Page/TextBlock/index.d.ts +2 -0
- package/dist/ui/esm/types/ui/components/Page/ToDoBlock/ToDoBlock.d.ts +6 -0
- package/dist/ui/esm/types/ui/components/Page/ToDoBlock/ToDoBlock.types.d.ts +4 -0
- package/dist/ui/esm/types/ui/components/Page/ToDoBlock/index.d.ts +2 -0
- package/dist/ui/esm/types/ui/components/Page/ToggleBlock/ToggleBlock.d.ts +6 -0
- package/dist/ui/esm/types/ui/components/Page/ToggleBlock/ToggleBlock.types.d.ts +4 -0
- package/dist/ui/esm/types/ui/components/Page/ToggleBlock/index.d.ts +2 -0
- package/dist/ui/esm/types/ui/components/Page/VideoBlock/VideoBlock.d.ts +6 -0
- package/dist/ui/esm/types/ui/components/Page/VideoBlock/VideoBlock.types.d.ts +10 -0
- package/dist/ui/esm/types/ui/components/Page/VideoBlock/index.d.ts +2 -0
- package/dist/ui/esm/types/ui/components/Page/index.d.ts +2 -0
- package/dist/ui/esm/types/ui/components/PrefixSuffix/PrefixSuffix.d.ts +5 -0
- package/dist/ui/esm/types/ui/components/PrefixSuffix/PrefixSuffix.types.d.ts +6 -0
- package/dist/ui/esm/types/ui/components/PrefixSuffix/index.d.ts +2 -0
- package/dist/ui/esm/types/ui/components/RichText/Annotation/Annotation.d.ts +6 -0
- package/dist/ui/esm/types/ui/components/RichText/Annotation/index.d.ts +2 -0
- package/dist/ui/esm/types/ui/components/RichText/Caption.d.ts +4 -0
- package/dist/ui/esm/types/ui/components/RichText/Equation/Equation.d.ts +6 -0
- package/dist/ui/esm/types/ui/components/RichText/Equation/Equation.types.d.ts +6 -0
- package/dist/ui/esm/types/ui/components/RichText/Equation/index.d.ts +2 -0
- package/dist/ui/esm/types/ui/components/RichText/LinkIfLinked/LinkIfLinked.d.ts +7 -0
- package/dist/ui/esm/types/ui/components/RichText/LinkIfLinked/LinkIfLinked.types.d.ts +12 -0
- package/dist/ui/esm/types/ui/components/RichText/LinkIfLinked/index.d.ts +2 -0
- package/dist/ui/esm/types/ui/components/RichText/Mention/DateMention/DateMention.d.ts +5 -0
- package/dist/ui/esm/types/ui/components/RichText/Mention/DateMention/DateMention.types.d.ts +4 -0
- package/dist/ui/esm/types/ui/components/RichText/Mention/DateMention/index.d.ts +2 -0
- package/dist/ui/esm/types/ui/components/RichText/Mention/LinkPreviewMention/LinkPreviewMention.d.ts +5 -0
- package/dist/ui/esm/types/ui/components/RichText/Mention/LinkPreviewMention/LinkPreviewMention.types.d.ts +6 -0
- package/dist/ui/esm/types/ui/components/RichText/Mention/LinkPreviewMention/index.d.ts +2 -0
- package/dist/ui/esm/types/ui/components/RichText/Mention/Mention.d.ts +5 -0
- package/dist/ui/esm/types/ui/components/RichText/Mention/Mention.types.d.ts +6 -0
- package/dist/ui/esm/types/ui/components/RichText/Mention/PageOrDatabaseMention/PageOrDatabaseMention.d.ts +5 -0
- package/dist/ui/esm/types/ui/components/RichText/Mention/PageOrDatabaseMention/PageOrDatabaseMention.types.d.ts +4 -0
- package/dist/ui/esm/types/ui/components/RichText/Mention/PageOrDatabaseMention/index.d.ts +2 -0
- package/dist/ui/esm/types/ui/components/RichText/Mention/TemplateMention/TemplateMention.d.ts +4 -0
- package/dist/ui/esm/types/ui/components/RichText/Mention/TemplateMention/TemplateMention.types.d.ts +5 -0
- package/dist/ui/esm/types/ui/components/RichText/Mention/TemplateMention/index.d.ts +2 -0
- package/dist/ui/esm/types/ui/components/RichText/Mention/UserMention/UserMention.d.ts +5 -0
- package/dist/ui/esm/types/ui/components/RichText/Mention/UserMention/UserMention.types.d.ts +4 -0
- package/dist/ui/esm/types/ui/components/RichText/Mention/UserMention/index.d.ts +2 -0
- package/dist/ui/esm/types/ui/components/RichText/Mention/index.d.ts +2 -0
- package/dist/ui/esm/types/ui/components/RichText/RichText.d.ts +4 -0
- package/dist/ui/esm/types/ui/components/RichText/RichText.types.d.ts +11 -0
- package/dist/ui/esm/types/ui/components/RichText/Text/Text.d.ts +4 -0
- package/dist/ui/esm/types/ui/components/RichText/Text/Text.types.d.ts +6 -0
- package/dist/ui/esm/types/ui/components/RichText/Text/index.d.ts +2 -0
- package/dist/ui/esm/types/ui/components/RichText/index.d.ts +2 -0
- package/dist/ui/esm/types/ui/components/Table/Column.d.ts +4 -0
- package/dist/ui/esm/types/ui/components/Table/Column.types.d.ts +7 -0
- package/dist/ui/esm/types/ui/components/Table/Table.d.ts +6 -0
- package/dist/ui/esm/types/ui/components/Table/Table.types.d.ts +24 -0
- package/dist/ui/esm/types/ui/components/Table/TableCheckboxField/TableCheckboxField.d.ts +5 -0
- package/dist/ui/esm/types/ui/components/Table/TableCheckboxField/TableCheckboxField.types.d.ts +5 -0
- package/dist/ui/esm/types/ui/components/Table/TableCheckboxField/index.d.ts +2 -0
- package/dist/ui/esm/types/ui/components/Table/TableDateField/TableDateField.d.ts +5 -0
- package/dist/ui/esm/types/ui/components/Table/TableDateField/TableDateField.types.d.ts +4 -0
- package/dist/ui/esm/types/ui/components/Table/TableDateField/index.d.ts +2 -0
- package/dist/ui/esm/types/ui/components/Table/TableFormulaField/TableFormulaField.d.ts +5 -0
- package/dist/ui/esm/types/ui/components/Table/TableFormulaField/TableFormulaField.types.d.ts +5 -0
- package/dist/ui/esm/types/ui/components/Table/TableFormulaField/index.d.ts +2 -0
- package/dist/ui/esm/types/ui/components/Table/TableHandler.d.ts +4 -0
- package/dist/ui/esm/types/ui/components/Table/TableHandler.types.d.ts +14 -0
- package/dist/ui/esm/types/ui/components/Table/TableIcon/TableIcon.d.ts +4 -0
- package/dist/ui/esm/types/ui/components/Table/TableIcon/TableIcon.types.d.ts +4 -0
- package/dist/ui/esm/types/ui/components/Table/TableIcon/index.d.ts +2 -0
- package/dist/ui/esm/types/ui/components/Table/TableMultiSelectField/LinkedTagIfLinked.d.ts +5 -0
- package/dist/ui/esm/types/ui/components/Table/TableMultiSelectField/LinkedTagIfLinked.types.d.ts +10 -0
- package/dist/ui/esm/types/ui/components/Table/TableMultiSelectField/TableMultiSelectField.d.ts +5 -0
- package/dist/ui/esm/types/ui/components/Table/TableMultiSelectField/TableMultiSelectField.types.d.ts +6 -0
- package/dist/ui/esm/types/ui/components/Table/TableMultiSelectField/index.d.ts +2 -0
- package/dist/ui/esm/types/ui/components/Table/TableNumberField/TableNumberField.d.ts +5 -0
- package/dist/ui/esm/types/ui/components/Table/TableNumberField/TableNumberField.types.d.ts +5 -0
- package/dist/ui/esm/types/ui/components/Table/TableNumberField/index.d.ts +2 -0
- package/dist/ui/esm/types/ui/components/Table/TableRichTextField/TableRichTextField.d.ts +5 -0
- package/dist/ui/esm/types/ui/components/Table/TableRichTextField/TableRichTextField.types.d.ts +4 -0
- package/dist/ui/esm/types/ui/components/Table/TableRichTextField/index.d.ts +2 -0
- package/dist/ui/esm/types/ui/components/Table/TableSelectField/LinkedTagIfLinked.d.ts +5 -0
- package/dist/ui/esm/types/ui/components/Table/TableSelectField/LinkedTagIfLinked.types.d.ts +10 -0
- package/dist/ui/esm/types/ui/components/Table/TableSelectField/TableSelectField.d.ts +5 -0
- package/dist/ui/esm/types/ui/components/Table/TableSelectField/TableSelectField.types.d.ts +6 -0
- package/dist/ui/esm/types/ui/components/Table/TableSelectField/index.d.ts +2 -0
- package/dist/ui/esm/types/ui/components/Table/TableTitleField/LinkedTitleIfLinked.d.ts +5 -0
- package/dist/ui/esm/types/ui/components/Table/TableTitleField/LinkedTitleIfLinked.types.d.ts +6 -0
- package/dist/ui/esm/types/ui/components/Table/TableTitleField/TableTitleField.d.ts +5 -0
- package/dist/ui/esm/types/ui/components/Table/TableTitleField/TableTitleField.types.d.ts +6 -0
- package/dist/ui/esm/types/ui/components/Table/TableTitleField/index.d.ts +2 -0
- package/dist/ui/esm/types/ui/components/Table/TableUrlField/TableUrlField.d.ts +5 -0
- package/dist/ui/esm/types/ui/components/Table/TableUrlField/TableUrlField.types.d.ts +3 -0
- package/dist/ui/esm/types/ui/components/Table/TableUrlField/index.d.ts +2 -0
- package/dist/ui/esm/types/ui/components/Table/index.d.ts +2 -0
- package/dist/ui/esm/types/ui/components/index.d.ts +61 -0
- package/dist/ui/esm/types/ui/components/lib.d.ts +21 -0
- package/dist/ui/esm/types/ui/components/types.d.ts +8 -0
- package/dist/ui/esm/types/ui/index.d.ts +1 -0
- package/dist/ui/umd/index.js +1 -1
- package/dist/ui/umd/index.js.map +1 -1
- package/dist/ui/umd/types/exporter/api.d.ts +19 -0
- package/dist/ui/umd/types/exporter/blocks.d.ts +13 -0
- package/dist/ui/umd/types/exporter/breadcrumbs.d.ts +7 -0
- package/dist/ui/umd/types/exporter/database.d.ts +12 -0
- package/dist/ui/umd/types/exporter/files.d.ts +27 -0
- package/dist/ui/umd/types/exporter/github.d.ts +241 -0
- package/dist/ui/umd/types/exporter/index.d.ts +5 -0
- package/dist/ui/umd/types/exporter/page.d.ts +15 -0
- package/dist/ui/umd/types/exporter/types.d.ts +748 -0
- package/dist/ui/umd/types/exporter/variables.d.ts +22 -0
- package/dist/ui/umd/types/ui/components/Checkbox/Checkbox.d.ts +6 -0
- package/dist/ui/umd/types/ui/components/Checkbox/index.d.ts +2 -0
- package/dist/ui/umd/types/ui/components/Gallery/Gallery.d.ts +6 -0
- package/dist/ui/umd/types/ui/components/Gallery/Gallery.types.d.ts +23 -0
- package/dist/ui/umd/types/ui/components/Gallery/GalleryCard/GalleryCard.d.ts +5 -0
- package/dist/ui/umd/types/ui/components/Gallery/GalleryCard/GalleryCard.types.d.ts +7 -0
- package/dist/ui/umd/types/ui/components/Gallery/GalleryCard/GalleryHandler.d.ts +4 -0
- package/dist/ui/umd/types/ui/components/Gallery/GalleryCard/GalleryHandler.types.d.ts +14 -0
- package/dist/ui/umd/types/ui/components/Gallery/GalleryCard/GalleryLinkedCard.d.ts +4 -0
- package/dist/ui/umd/types/ui/components/Gallery/GalleryCard/GalleryLinkedCard.types.d.ts +9 -0
- package/dist/ui/umd/types/ui/components/Gallery/GalleryCard/index.d.ts +2 -0
- package/dist/ui/umd/types/ui/components/Gallery/GalleryCheckboxField/GalleryCheckboxField.d.ts +5 -0
- package/dist/ui/umd/types/ui/components/Gallery/GalleryCheckboxField/GalleryCheckboxField.types.d.ts +5 -0
- package/dist/ui/umd/types/ui/components/Gallery/GalleryCheckboxField/index.d.ts +2 -0
- package/dist/ui/umd/types/ui/components/Gallery/GalleryDateField/GalleryDateField.d.ts +5 -0
- package/dist/ui/umd/types/ui/components/Gallery/GalleryDateField/GalleryDateField.types.d.ts +4 -0
- package/dist/ui/umd/types/ui/components/Gallery/GalleryDateField/index.d.ts +2 -0
- package/dist/ui/umd/types/ui/components/Gallery/GalleryFormulaField/GalleryFormulaField.d.ts +5 -0
- package/dist/ui/umd/types/ui/components/Gallery/GalleryFormulaField/GalleryFormulaField.types.d.ts +5 -0
- package/dist/ui/umd/types/ui/components/Gallery/GalleryFormulaField/index.d.ts +2 -0
- package/dist/ui/umd/types/ui/components/Gallery/GalleryMultiSelectField/GalleryMultiSelectField.d.ts +5 -0
- package/dist/ui/umd/types/ui/components/Gallery/GalleryMultiSelectField/GalleryMultiSelectField.types.d.ts +6 -0
- package/dist/ui/umd/types/ui/components/Gallery/GalleryMultiSelectField/LinkedTag.d.ts +5 -0
- package/dist/ui/umd/types/ui/components/Gallery/GalleryMultiSelectField/LinkedTag.types.d.ts +9 -0
- package/dist/ui/umd/types/ui/components/Gallery/GalleryMultiSelectField/index.d.ts +2 -0
- package/dist/ui/umd/types/ui/components/Gallery/GalleryNumberField/GalleryNumberField.d.ts +5 -0
- package/dist/ui/umd/types/ui/components/Gallery/GalleryNumberField/GalleryNumberField.types.d.ts +5 -0
- package/dist/ui/umd/types/ui/components/Gallery/GalleryNumberField/index.d.ts +2 -0
- package/dist/ui/umd/types/ui/components/Gallery/GalleryPreview/GalleryPreview.d.ts +5 -0
- package/dist/ui/umd/types/ui/components/Gallery/GalleryPreview/GalleryPreview.types.d.ts +14 -0
- package/dist/ui/umd/types/ui/components/Gallery/GalleryPreview/index.d.ts +2 -0
- package/dist/ui/umd/types/ui/components/Gallery/GalleryRichTextField/GalleryRichTextField.d.ts +5 -0
- package/dist/ui/umd/types/ui/components/Gallery/GalleryRichTextField/GalleryRichTextField.types.d.ts +5 -0
- package/dist/ui/umd/types/ui/components/Gallery/GalleryRichTextField/index.d.ts +2 -0
- package/dist/ui/umd/types/ui/components/Gallery/GallerySelectField/GallerySelectField.d.ts +5 -0
- package/dist/ui/umd/types/ui/components/Gallery/GallerySelectField/GallerySelectField.types.d.ts +6 -0
- package/dist/ui/umd/types/ui/components/Gallery/GallerySelectField/LinkedTag.d.ts +5 -0
- package/dist/ui/umd/types/ui/components/Gallery/GallerySelectField/LinkedTag.types.d.ts +9 -0
- package/dist/ui/umd/types/ui/components/Gallery/GallerySelectField/index.d.ts +2 -0
- package/dist/ui/umd/types/ui/components/Gallery/GalleryTitleField/GalleryTitleField.d.ts +5 -0
- package/dist/ui/umd/types/ui/components/Gallery/GalleryTitleField/GalleryTitleField.types.d.ts +4 -0
- package/dist/ui/umd/types/ui/components/Gallery/GalleryTitleField/index.d.ts +2 -0
- package/dist/ui/umd/types/ui/components/Gallery/GalleryUrlField/GalleryUrlField.d.ts +5 -0
- package/dist/ui/umd/types/ui/components/Gallery/GalleryUrlField/GalleryUrlField.types.d.ts +3 -0
- package/dist/ui/umd/types/ui/components/Gallery/GalleryUrlField/index.d.ts +2 -0
- package/dist/ui/umd/types/ui/components/Gallery/index.d.ts +2 -0
- package/dist/ui/umd/types/ui/components/Icon/Icon.d.ts +10 -0
- package/dist/ui/umd/types/ui/components/Icon/index.d.ts +2 -0
- package/dist/ui/umd/types/ui/components/List/Column.d.ts +4 -0
- package/dist/ui/umd/types/ui/components/List/Column.types.d.ts +7 -0
- package/dist/ui/umd/types/ui/components/List/List.d.ts +9 -0
- package/dist/ui/umd/types/ui/components/List/List.types.d.ts +23 -0
- package/dist/ui/umd/types/ui/components/List/ListCheckboxField/ListCheckboxField.d.ts +5 -0
- package/dist/ui/umd/types/ui/components/List/ListCheckboxField/ListCheckboxField.types.d.ts +5 -0
- package/dist/ui/umd/types/ui/components/List/ListCheckboxField/index.d.ts +2 -0
- package/dist/ui/umd/types/ui/components/List/ListDateField/ListDateField.d.ts +5 -0
- package/dist/ui/umd/types/ui/components/List/ListDateField/ListDateField.types.d.ts +4 -0
- package/dist/ui/umd/types/ui/components/List/ListDateField/index.d.ts +2 -0
- package/dist/ui/umd/types/ui/components/List/ListFormulaField/ListFormulaField.d.ts +5 -0
- package/dist/ui/umd/types/ui/components/List/ListFormulaField/ListFormulaField.types.d.ts +5 -0
- package/dist/ui/umd/types/ui/components/List/ListFormulaField/index.d.ts +2 -0
- package/dist/ui/umd/types/ui/components/List/ListHandler.d.ts +4 -0
- package/dist/ui/umd/types/ui/components/List/ListHandler.types.d.ts +14 -0
- package/dist/ui/umd/types/ui/components/List/ListMultiSelectField/LinkedTagIfLinked.d.ts +5 -0
- package/dist/ui/umd/types/ui/components/List/ListMultiSelectField/LinkedTagIfLinked.types.d.ts +10 -0
- package/dist/ui/umd/types/ui/components/List/ListMultiSelectField/ListMultiSelectField.d.ts +5 -0
- package/dist/ui/umd/types/ui/components/List/ListMultiSelectField/ListMultiSelectField.types.d.ts +6 -0
- package/dist/ui/umd/types/ui/components/List/ListMultiSelectField/index.d.ts +2 -0
- package/dist/ui/umd/types/ui/components/List/ListNumberField/ListNumberField.d.ts +5 -0
- package/dist/ui/umd/types/ui/components/List/ListNumberField/ListNumberField.types.d.ts +5 -0
- package/dist/ui/umd/types/ui/components/List/ListNumberField/index.d.ts +2 -0
- package/dist/ui/umd/types/ui/components/List/ListRichTextField/ListRichTextField.d.ts +5 -0
- package/dist/ui/umd/types/ui/components/List/ListRichTextField/ListRichTextField.types.d.ts +4 -0
- package/dist/ui/umd/types/ui/components/List/ListRichTextField/index.d.ts +2 -0
- package/dist/ui/umd/types/ui/components/List/ListSelectField/LinkedTagIfLinked.d.ts +5 -0
- package/dist/ui/umd/types/ui/components/List/ListSelectField/LinkedTagIfLinked.types.d.ts +10 -0
- package/dist/ui/umd/types/ui/components/List/ListSelectField/ListSelectField.d.ts +5 -0
- package/dist/ui/umd/types/ui/components/List/ListSelectField/ListSelectField.types.d.ts +6 -0
- package/dist/ui/umd/types/ui/components/List/ListSelectField/index.d.ts +2 -0
- package/dist/ui/umd/types/ui/components/List/ListTitleField/LinkedTitle.d.ts +5 -0
- package/dist/ui/umd/types/ui/components/List/ListTitleField/LinkedTitle.types.d.ts +6 -0
- package/dist/ui/umd/types/ui/components/List/ListTitleField/ListTitleField.d.ts +5 -0
- package/dist/ui/umd/types/ui/components/List/ListTitleField/ListTitleField.types.d.ts +6 -0
- package/dist/ui/umd/types/ui/components/List/ListTitleField/index.d.ts +2 -0
- package/dist/ui/umd/types/ui/components/List/ListUrlField/ListUrlField.d.ts +5 -0
- package/dist/ui/umd/types/ui/components/List/ListUrlField/ListUrlField.types.d.ts +3 -0
- package/dist/ui/umd/types/ui/components/List/ListUrlField/index.d.ts +2 -0
- package/dist/ui/umd/types/ui/components/List/index.d.ts +2 -0
- package/dist/ui/umd/types/ui/components/Page/BookmarkBlock/BookmarkBlock.d.ts +6 -0
- package/dist/ui/umd/types/ui/components/Page/BookmarkBlock/BookmarkBlock.types.d.ts +4 -0
- package/dist/ui/umd/types/ui/components/Page/BookmarkBlock/index.d.ts +2 -0
- package/dist/ui/umd/types/ui/components/Page/BreadcrumbBlock/BreadcrumbBlock.d.ts +6 -0
- package/dist/ui/umd/types/ui/components/Page/BreadcrumbBlock/BreadcrumbBlock.types.d.ts +9 -0
- package/dist/ui/umd/types/ui/components/Page/BreadcrumbBlock/Breadcrumbs.d.ts +4 -0
- package/dist/ui/umd/types/ui/components/Page/BreadcrumbBlock/Breadcrumbs.types.d.ts +9 -0
- package/dist/ui/umd/types/ui/components/Page/BreadcrumbBlock/LinkedBreadcrumbIfLinked.d.ts +5 -0
- package/dist/ui/umd/types/ui/components/Page/BreadcrumbBlock/LinkedBreadcrumbIfLinked.types.d.ts +11 -0
- package/dist/ui/umd/types/ui/components/Page/BreadcrumbBlock/index.d.ts +3 -0
- package/dist/ui/umd/types/ui/components/Page/BulletedListBlock/BulletedListBlock.d.ts +6 -0
- package/dist/ui/umd/types/ui/components/Page/BulletedListBlock/BulletedListBlock.types.d.ts +9 -0
- package/dist/ui/umd/types/ui/components/Page/BulletedListBlock/index.d.ts +2 -0
- package/dist/ui/umd/types/ui/components/Page/CalloutBlock/CalloutBlock.d.ts +6 -0
- package/dist/ui/umd/types/ui/components/Page/CalloutBlock/CalloutBlock.types.d.ts +9 -0
- package/dist/ui/umd/types/ui/components/Page/CalloutBlock/index.d.ts +2 -0
- package/dist/ui/umd/types/ui/components/Page/ChildDatabaseBlock/ChildDatabaseBlock.d.ts +6 -0
- package/dist/ui/umd/types/ui/components/Page/ChildDatabaseBlock/ChildDatabaseBlock.types.d.ts +12 -0
- package/dist/ui/umd/types/ui/components/Page/ChildDatabaseBlock/index.d.ts +2 -0
- package/dist/ui/umd/types/ui/components/Page/ChildPageBlock/ChildPageBlock.d.ts +6 -0
- package/dist/ui/umd/types/ui/components/Page/ChildPageBlock/ChildPageBlock.types.d.ts +12 -0
- package/dist/ui/umd/types/ui/components/Page/ChildPageBlock/index.d.ts +2 -0
- package/dist/ui/umd/types/ui/components/Page/CodeBlock/Code/Code.d.ts +6 -0
- package/dist/ui/umd/types/ui/components/Page/CodeBlock/Code/Code.types.d.ts +5 -0
- package/dist/ui/umd/types/ui/components/Page/CodeBlock/Code/index.d.ts +2 -0
- package/dist/ui/umd/types/ui/components/Page/CodeBlock/CodeBlock.d.ts +6 -0
- package/dist/ui/umd/types/ui/components/Page/CodeBlock/CodeBlock.types.d.ts +4 -0
- package/dist/ui/umd/types/ui/components/Page/CodeBlock/index.d.ts +2 -0
- package/dist/ui/umd/types/ui/components/Page/ColumnListBlock/ColumnListBlock.d.ts +6 -0
- package/dist/ui/umd/types/ui/components/Page/ColumnListBlock/ColumnListBlock.types.d.ts +9 -0
- package/dist/ui/umd/types/ui/components/Page/ColumnListBlock/index.d.ts +2 -0
- package/dist/ui/umd/types/ui/components/Page/EmbedBlock/EmbedBlock.d.ts +6 -0
- package/dist/ui/umd/types/ui/components/Page/EmbedBlock/EmbedBlock.types.d.ts +13 -0
- package/dist/ui/umd/types/ui/components/Page/EmbedBlock/index.d.ts +2 -0
- package/dist/ui/umd/types/ui/components/Page/EquationBlock/EquationBlock.d.ts +6 -0
- package/dist/ui/umd/types/ui/components/Page/EquationBlock/EquationBlock.types.d.ts +4 -0
- package/dist/ui/umd/types/ui/components/Page/EquationBlock/index.d.ts +2 -0
- package/dist/ui/umd/types/ui/components/Page/FileBlock/FileBlock.d.ts +7 -0
- package/dist/ui/umd/types/ui/components/Page/FileBlock/FileBlock.types.d.ts +4 -0
- package/dist/ui/umd/types/ui/components/Page/FileBlock/index.d.ts +2 -0
- package/dist/ui/umd/types/ui/components/Page/ImageBlock/ImageBlock.d.ts +6 -0
- package/dist/ui/umd/types/ui/components/Page/ImageBlock/ImageBlock.types.d.ts +4 -0
- package/dist/ui/umd/types/ui/components/Page/ImageBlock/index.d.ts +2 -0
- package/dist/ui/umd/types/ui/components/Page/LinkPreviewBlock/LinkPreviewBlock.d.ts +7 -0
- package/dist/ui/umd/types/ui/components/Page/LinkPreviewBlock/LinkPreviewBlock.types.d.ts +4 -0
- package/dist/ui/umd/types/ui/components/Page/LinkPreviewBlock/index.d.ts +2 -0
- package/dist/ui/umd/types/ui/components/Page/ListBlocks/ListBlocks.d.ts +6 -0
- package/dist/ui/umd/types/ui/components/Page/ListBlocks/ListBlocks.types.d.ts +11 -0
- package/dist/ui/umd/types/ui/components/Page/ListBlocks/index.d.ts +2 -0
- package/dist/ui/umd/types/ui/components/Page/NumberedListBlock/NumberedListBlock.d.ts +6 -0
- package/dist/ui/umd/types/ui/components/Page/NumberedListBlock/NumberedListBlock.types.d.ts +9 -0
- package/dist/ui/umd/types/ui/components/Page/NumberedListBlock/index.d.ts +2 -0
- package/dist/ui/umd/types/ui/components/Page/Page.d.ts +4 -0
- package/dist/ui/umd/types/ui/components/Page/Page.types.d.ts +14 -0
- package/dist/ui/umd/types/ui/components/Page/PageHandler.d.ts +15 -0
- package/dist/ui/umd/types/ui/components/Page/PageHandler.types.d.ts +10 -0
- package/dist/ui/umd/types/ui/components/Page/PdfBlock/Pdf.d.ts +24 -0
- package/dist/ui/umd/types/ui/components/Page/PdfBlock/PdfBlock.d.ts +6 -0
- package/dist/ui/umd/types/ui/components/Page/PdfBlock/PdfBlock.types.d.ts +4 -0
- package/dist/ui/umd/types/ui/components/Page/PdfBlock/index.d.ts +2 -0
- package/dist/ui/umd/types/ui/components/Page/SyncedBlock/SyncedBlock.d.ts +6 -0
- package/dist/ui/umd/types/ui/components/Page/SyncedBlock/SyncedBlock.types.d.ts +4 -0
- package/dist/ui/umd/types/ui/components/Page/SyncedBlock/index.d.ts +2 -0
- package/dist/ui/umd/types/ui/components/Page/TableBlock/TableBlock.d.ts +6 -0
- package/dist/ui/umd/types/ui/components/Page/TableBlock/TableBlock.types.d.ts +13 -0
- package/dist/ui/umd/types/ui/components/Page/TableBlock/index.d.ts +2 -0
- package/dist/ui/umd/types/ui/components/Page/TableOfContentsBlock/TableOfContentsBlock.d.ts +4 -0
- package/dist/ui/umd/types/ui/components/Page/TableOfContentsBlock/TableOfContentsBlock.types.d.ts +4 -0
- package/dist/ui/umd/types/ui/components/Page/TableOfContentsBlock/index.d.ts +2 -0
- package/dist/ui/umd/types/ui/components/Page/TextBlock/TextBlock.d.ts +6 -0
- package/dist/ui/umd/types/ui/components/Page/TextBlock/TextBlock.types.d.ts +6 -0
- package/dist/ui/umd/types/ui/components/Page/TextBlock/index.d.ts +2 -0
- package/dist/ui/umd/types/ui/components/Page/ToDoBlock/ToDoBlock.d.ts +6 -0
- package/dist/ui/umd/types/ui/components/Page/ToDoBlock/ToDoBlock.types.d.ts +4 -0
- package/dist/ui/umd/types/ui/components/Page/ToDoBlock/index.d.ts +2 -0
- package/dist/ui/umd/types/ui/components/Page/ToggleBlock/ToggleBlock.d.ts +6 -0
- package/dist/ui/umd/types/ui/components/Page/ToggleBlock/ToggleBlock.types.d.ts +4 -0
- package/dist/ui/umd/types/ui/components/Page/ToggleBlock/index.d.ts +2 -0
- package/dist/ui/umd/types/ui/components/Page/VideoBlock/VideoBlock.d.ts +6 -0
- package/dist/ui/umd/types/ui/components/Page/VideoBlock/VideoBlock.types.d.ts +10 -0
- package/dist/ui/umd/types/ui/components/Page/VideoBlock/index.d.ts +2 -0
- package/dist/ui/umd/types/ui/components/Page/index.d.ts +2 -0
- package/dist/ui/umd/types/ui/components/PrefixSuffix/PrefixSuffix.d.ts +5 -0
- package/dist/ui/umd/types/ui/components/PrefixSuffix/PrefixSuffix.types.d.ts +6 -0
- package/dist/ui/umd/types/ui/components/PrefixSuffix/index.d.ts +2 -0
- package/dist/ui/umd/types/ui/components/RichText/Annotation/Annotation.d.ts +6 -0
- package/dist/ui/umd/types/ui/components/RichText/Annotation/index.d.ts +2 -0
- package/dist/ui/umd/types/ui/components/RichText/Caption.d.ts +4 -0
- package/dist/ui/umd/types/ui/components/RichText/Equation/Equation.d.ts +6 -0
- package/dist/ui/umd/types/ui/components/RichText/Equation/Equation.types.d.ts +6 -0
- package/dist/ui/umd/types/ui/components/RichText/Equation/index.d.ts +2 -0
- package/dist/ui/umd/types/ui/components/RichText/LinkIfLinked/LinkIfLinked.d.ts +7 -0
- package/dist/ui/umd/types/ui/components/RichText/LinkIfLinked/LinkIfLinked.types.d.ts +12 -0
- package/dist/ui/umd/types/ui/components/RichText/LinkIfLinked/index.d.ts +2 -0
- package/dist/ui/umd/types/ui/components/RichText/Mention/DateMention/DateMention.d.ts +5 -0
- package/dist/ui/umd/types/ui/components/RichText/Mention/DateMention/DateMention.types.d.ts +4 -0
- package/dist/ui/umd/types/ui/components/RichText/Mention/DateMention/index.d.ts +2 -0
- package/dist/ui/umd/types/ui/components/RichText/Mention/LinkPreviewMention/LinkPreviewMention.d.ts +5 -0
- package/dist/ui/umd/types/ui/components/RichText/Mention/LinkPreviewMention/LinkPreviewMention.types.d.ts +6 -0
- package/dist/ui/umd/types/ui/components/RichText/Mention/LinkPreviewMention/index.d.ts +2 -0
- package/dist/ui/umd/types/ui/components/RichText/Mention/Mention.d.ts +5 -0
- package/dist/ui/umd/types/ui/components/RichText/Mention/Mention.types.d.ts +6 -0
- package/dist/ui/umd/types/ui/components/RichText/Mention/PageOrDatabaseMention/PageOrDatabaseMention.d.ts +5 -0
- package/dist/ui/umd/types/ui/components/RichText/Mention/PageOrDatabaseMention/PageOrDatabaseMention.types.d.ts +4 -0
- package/dist/ui/umd/types/ui/components/RichText/Mention/PageOrDatabaseMention/index.d.ts +2 -0
- package/dist/ui/umd/types/ui/components/RichText/Mention/TemplateMention/TemplateMention.d.ts +4 -0
- package/dist/ui/umd/types/ui/components/RichText/Mention/TemplateMention/TemplateMention.types.d.ts +5 -0
- package/dist/ui/umd/types/ui/components/RichText/Mention/TemplateMention/index.d.ts +2 -0
- package/dist/ui/umd/types/ui/components/RichText/Mention/UserMention/UserMention.d.ts +5 -0
- package/dist/ui/umd/types/ui/components/RichText/Mention/UserMention/UserMention.types.d.ts +4 -0
- package/dist/ui/umd/types/ui/components/RichText/Mention/UserMention/index.d.ts +2 -0
- package/dist/ui/umd/types/ui/components/RichText/Mention/index.d.ts +2 -0
- package/dist/ui/umd/types/ui/components/RichText/RichText.d.ts +4 -0
- package/dist/ui/umd/types/ui/components/RichText/RichText.types.d.ts +11 -0
- package/dist/ui/umd/types/ui/components/RichText/Text/Text.d.ts +4 -0
- package/dist/ui/umd/types/ui/components/RichText/Text/Text.types.d.ts +6 -0
- package/dist/ui/umd/types/ui/components/RichText/Text/index.d.ts +2 -0
- package/dist/ui/umd/types/ui/components/RichText/index.d.ts +2 -0
- package/dist/ui/umd/types/ui/components/Table/Column.d.ts +4 -0
- package/dist/ui/umd/types/ui/components/Table/Column.types.d.ts +7 -0
- package/dist/ui/umd/types/ui/components/Table/Table.d.ts +6 -0
- package/dist/ui/umd/types/ui/components/Table/Table.types.d.ts +24 -0
- package/dist/ui/umd/types/ui/components/Table/TableCheckboxField/TableCheckboxField.d.ts +5 -0
- package/dist/ui/umd/types/ui/components/Table/TableCheckboxField/TableCheckboxField.types.d.ts +5 -0
- package/dist/ui/umd/types/ui/components/Table/TableCheckboxField/index.d.ts +2 -0
- package/dist/ui/umd/types/ui/components/Table/TableDateField/TableDateField.d.ts +5 -0
- package/dist/ui/umd/types/ui/components/Table/TableDateField/TableDateField.types.d.ts +4 -0
- package/dist/ui/umd/types/ui/components/Table/TableDateField/index.d.ts +2 -0
- package/dist/ui/umd/types/ui/components/Table/TableFormulaField/TableFormulaField.d.ts +5 -0
- package/dist/ui/umd/types/ui/components/Table/TableFormulaField/TableFormulaField.types.d.ts +5 -0
- package/dist/ui/umd/types/ui/components/Table/TableFormulaField/index.d.ts +2 -0
- package/dist/ui/umd/types/ui/components/Table/TableHandler.d.ts +4 -0
- package/dist/ui/umd/types/ui/components/Table/TableHandler.types.d.ts +14 -0
- package/dist/ui/umd/types/ui/components/Table/TableIcon/TableIcon.d.ts +4 -0
- package/dist/ui/umd/types/ui/components/Table/TableIcon/TableIcon.types.d.ts +4 -0
- package/dist/ui/umd/types/ui/components/Table/TableIcon/index.d.ts +2 -0
- package/dist/ui/umd/types/ui/components/Table/TableMultiSelectField/LinkedTagIfLinked.d.ts +5 -0
- package/dist/ui/umd/types/ui/components/Table/TableMultiSelectField/LinkedTagIfLinked.types.d.ts +10 -0
- package/dist/ui/umd/types/ui/components/Table/TableMultiSelectField/TableMultiSelectField.d.ts +5 -0
- package/dist/ui/umd/types/ui/components/Table/TableMultiSelectField/TableMultiSelectField.types.d.ts +6 -0
- package/dist/ui/umd/types/ui/components/Table/TableMultiSelectField/index.d.ts +2 -0
- package/dist/ui/umd/types/ui/components/Table/TableNumberField/TableNumberField.d.ts +5 -0
- package/dist/ui/umd/types/ui/components/Table/TableNumberField/TableNumberField.types.d.ts +5 -0
- package/dist/ui/umd/types/ui/components/Table/TableNumberField/index.d.ts +2 -0
- package/dist/ui/umd/types/ui/components/Table/TableRichTextField/TableRichTextField.d.ts +5 -0
- package/dist/ui/umd/types/ui/components/Table/TableRichTextField/TableRichTextField.types.d.ts +4 -0
- package/dist/ui/umd/types/ui/components/Table/TableRichTextField/index.d.ts +2 -0
- package/dist/ui/umd/types/ui/components/Table/TableSelectField/LinkedTagIfLinked.d.ts +5 -0
- package/dist/ui/umd/types/ui/components/Table/TableSelectField/LinkedTagIfLinked.types.d.ts +10 -0
- package/dist/ui/umd/types/ui/components/Table/TableSelectField/TableSelectField.d.ts +5 -0
- package/dist/ui/umd/types/ui/components/Table/TableSelectField/TableSelectField.types.d.ts +6 -0
- package/dist/ui/umd/types/ui/components/Table/TableSelectField/index.d.ts +2 -0
- package/dist/ui/umd/types/ui/components/Table/TableTitleField/LinkedTitleIfLinked.d.ts +5 -0
- package/dist/ui/umd/types/ui/components/Table/TableTitleField/LinkedTitleIfLinked.types.d.ts +6 -0
- package/dist/ui/umd/types/ui/components/Table/TableTitleField/TableTitleField.d.ts +5 -0
- package/dist/ui/umd/types/ui/components/Table/TableTitleField/TableTitleField.types.d.ts +6 -0
- package/dist/ui/umd/types/ui/components/Table/TableTitleField/index.d.ts +2 -0
- package/dist/ui/umd/types/ui/components/Table/TableUrlField/TableUrlField.d.ts +5 -0
- package/dist/ui/umd/types/ui/components/Table/TableUrlField/TableUrlField.types.d.ts +3 -0
- package/dist/ui/umd/types/ui/components/Table/TableUrlField/index.d.ts +2 -0
- package/dist/ui/umd/types/ui/components/Table/index.d.ts +2 -0
- package/dist/ui/umd/types/ui/components/index.d.ts +61 -0
- package/dist/ui/umd/types/ui/components/lib.d.ts +21 -0
- package/dist/ui/umd/types/ui/components/types.d.ts +8 -0
- package/dist/ui/umd/types/ui/index.d.ts +1 -0
- package/package.json +3 -3
package/dist/ui/esm/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import e,{useState as t,useMemo as i,useEffect as r,useRef as n}from"react";import s from"mermaid";import a from"prismjs";var o=function(t){var i=t.payload;if("user"!==i.mention.type)return e.createElement(e.Fragment,null);var r=i.mention.user;return"type"in r?e.createElement("span",{className:"rotion-richtext-user"},e.createElement("span",{className:"rotion-richtext-user-atsign"},"@"),r.name):e.createElement("span",{className:"rotion-richtext-user"},e.createElement("span",{className:"rotion-richtext-user-atsign"},"@"),i.plain_text.replace("@",""))},l=function(t){var i=t.name,r=t.width,n=t.height,s=t.className;switch(i){case"figma":return e.createElement("svg",{className:"rotion-icon-figma ".concat(s),version:"1.0",xmlns:"http://www.w3.org/2000/svg",width:r||"12px",height:n||"18px",viewBox:"0 0 200 300"},e.createElement("path",{d:"M50 300c27.6 0 50-22.4 50-50v-50H50c-27.6 0-50 22.4-50 50s22.4 50 50 50z",fill:"#0acf83"}),e.createElement("path",{d:"M0 150c0-27.6 22.4-50 50-50h50v100H50c-27.6 0-50-22.4-50-50z",fill:"#a259ff"}),e.createElement("path",{d:"M0 50C0 22.4 22.4 0 50 0h50v100H50C22.4 100 0 77.6 0 50z",fill:"#f24e1e"}),e.createElement("path",{d:"M100 0h50c27.6 0 50 22.4 50 50s-22.4 50-50 50h-50V0z",fill:"#ff7262"}),e.createElement("path",{d:"M200 150c0 27.6-22.4 50-50 50s-50-22.4-50-50 22.4-50 50-50 50 22.4 50 50z",fill:"#1abcfe"}));case"slack":return e.createElement("svg",{className:"rotion-icon-slack ".concat(s),version:"1.0",xmlns:"http://www.w3.org/2000/svg",width:r||"20px",height:n||"20px",viewBox:"0 0 140 140"},e.createElement("path",{d:"M27.2 80c0 7.3-5.9 13.2-13.2 13.2C6.7 93.2.8 87.3.8 80c0-7.3 5.9-13.2 13.2-13.2h13.2V80zm6.6 0c0-7.3 5.9-13.2 13.2-13.2 7.3 0 13.2 5.9 13.2 13.2v33c0 7.3-5.9 13.2-13.2 13.2-7.3 0-13.2-5.9-13.2-13.2V80z",fill:"#E01E5A"}),e.createElement("path",{d:"M47 27c-7.3 0-13.2-5.9-13.2-13.2C33.8 6.5 39.7.6 47 .6c7.3 0 13.2 5.9 13.2 13.2V27H47zm0 6.7c7.3 0 13.2 5.9 13.2 13.2 0 7.3-5.9 13.2-13.2 13.2H13.9C6.6 60.1.7 54.2.7 46.9c0-7.3 5.9-13.2 13.2-13.2H47z",fill:"#36C5F0"}),e.createElement("path",{d:"M99.9 46.9c0-7.3 5.9-13.2 13.2-13.2 7.3 0 13.2 5.9 13.2 13.2 0 7.3-5.9 13.2-13.2 13.2H99.9V46.9zm-6.6 0c0 7.3-5.9 13.2-13.2 13.2-7.3 0-13.2-5.9-13.2-13.2V13.8C66.9 6.5 72.8.6 80.1.6c7.3 0 13.2 5.9 13.2 13.2v33.1z",fill:"#2EB67D"}),e.createElement("path",{d:"M80.1 99.8c7.3 0 13.2 5.9 13.2 13.2 0 7.3-5.9 13.2-13.2 13.2-7.3 0-13.2-5.9-13.2-13.2V99.8h13.2zm0-6.6c-7.3 0-13.2-5.9-13.2-13.2 0-7.3 5.9-13.2 13.2-13.2h33.1c7.3 0 13.2 5.9 13.2 13.2 0 7.3-5.9 13.2-13.2 13.2H80.1z",fill:"#ECB22E"}));case"github":return e.createElement("svg",{className:"rotion-icon-github ".concat(s),version:"1.0",xmlns:"http://www.w3.org/2000/svg",width:r||"20px",height:n||"20px",viewBox:"0 0 200 200",preserveAspectRatio:"xMidYMid meet"},e.createElement("g",{transform:"translate(0.000000,200.000000) scale(0.100000,-0.100000)",stroke:"none"},e.createElement("path",{d:"M899 1910 c-314 -38 -586 -232 -720 -515 -63 -133 -80 -205 -86 -356 -6 -144 10 -245 57 -367 88 -226 287 -429 503 -512 110 -43 117 -38 117 88 l0 97 -98 0 c-89 0 -102 2 -138 26 -27 18 -49 46 -72 90 -37 74 -54 96 -99 127 -39 28 -42 49 -9 58 43 10 110 -28 155 -90 46 -61 71 -82 122 -96 45 -13 138 5 145 28 3 10 15 38 28 63 l22 46 -76 17 c-220 47 -330 188 -330 425 0 81 19 150 59 213 29 45 30 51 21 100 -10 52 -7 95 12 157 10 33 11 33 56 28 25 -3 82 -24 128 -47 l82 -42 59 13 c79 16 232 17 324 0 76 -13 76 -13 116 13 50 34 148 68 182 64 20 -2 28 -11 37 -43 15 -49 17 -135 4 -169 -8 -21 -4 -34 25 -76 45 -67 57 -116 57 -225 -2 -235 -118 -376 -344 -416 -64 -12 -67 -13 -52 -30 34 -38 43 -91 44 -256 0 -133 3 -164 16 -177 21 -22 25 -21 115 18 147 64 292 181 385 311 50 70 109 196 136 290 19 68 23 104 23 235 0 188 -13 248 -90 405 -92 185 -230 325 -411 415 -144 72 -349 108 -505 90z"})));case"file":return e.createElement("svg",{className:"rotion-icon-file ".concat(s),width:r||"20px",height:n||"20px",viewBox:"0 0 16 16"},e.createElement("path",{d:"M4.35645 15.4678H11.6367C13.0996 15.4678 13.8584 14.6953 13.8584 13.2256V7.02539C13.8584 6.0752 13.7354 5.6377 13.1406 5.03613L9.55176 1.38574C8.97754 0.804688 8.50586 0.667969 7.65137 0.667969H4.35645C2.89355 0.667969 2.13477 1.44043 2.13477 2.91016V13.2256C2.13477 14.7021 2.89355 15.4678 4.35645 15.4678ZM4.46582 14.1279C3.80273 14.1279 3.47461 13.7793 3.47461 13.1436V2.99219C3.47461 2.36328 3.80273 2.00781 4.46582 2.00781H7.37793V5.75391C7.37793 6.73145 7.86328 7.20312 8.83398 7.20312H12.5186V13.1436C12.5186 13.7793 12.1836 14.1279 11.5205 14.1279H4.46582ZM8.95703 6.02734C8.67676 6.02734 8.56055 5.9043 8.56055 5.62402V2.19238L12.334 6.02734H8.95703ZM8.59473 12.7266V10.6279L8.54004 9.56152L9.06641 10.1152L9.59277 10.6484C9.68848 10.7646 9.8457 10.833 9.98926 10.833C10.2969 10.833 10.5293 10.6143 10.5293 10.3066C10.5293 10.1357 10.4678 10.0127 10.3379 9.90332L8.45117 8.16699C8.29395 8.02344 8.16406 7.96191 7.99316 7.96191C7.8291 7.96191 7.69922 8.02344 7.54199 8.16699L5.65527 9.90332C5.52539 10.0127 5.46387 10.1357 5.46387 10.3066C5.46387 10.6143 5.68945 10.833 6.00391 10.833C6.14746 10.833 6.29785 10.7646 6.40039 10.6484L6.92676 10.1152L7.45312 9.56152L7.39844 10.6279V12.7266C7.39844 13.0547 7.67188 13.3008 7.99316 13.3008C8.32129 13.3008 8.59473 13.0547 8.59473 12.7266Z"}));case"link":return e.createElement("svg",{className:"rotion-icon-link ".concat(s),version:"1.0",xmlns:"http://www.w3.org/2000/svg",width:"13px",height:"13px",viewBox:"0 0 13 13",role:"graphics-symbol"},e.createElement("path",{d:"M6.30826 4.43292L1.76184 8.98454C1.76176 8.98462 1.76169 8.9847 1.76161 8.98477C1.76158 8.9848 1.76156 8.98482 1.76154 8.98484C1.46068 9.28584 1.25 9.6914 1.25 10.1565C1.25 10.6117 1.45865 11.0119 1.73417 11.2886C2.01014 11.5658 2.41107 11.7773 2.87078 11.7773C3.34169 11.7773 3.73758 11.5617 4.03477 11.2733L4.03482 11.2734L4.04244 11.2657L8.58864 6.72474V8.667C8.58864 9.51956 9.22729 10.2935 10.1521 10.2935C11.0528 10.2935 11.75 9.54534 11.75 8.66127V2.92671C11.75 2.48722 11.5981 2.06381 11.2838 1.74808C10.9689 1.43182 10.5446 1.27728 10.1006 1.27728H4.36028C3.46161 1.27728 2.72804 1.97749 2.72804 2.86942C2.72804 3.79734 3.51104 4.43292 4.35455 4.43292H6.30826Z",fill:"#3E3C38",stroke:"white",strokeWidth:"1.5"}));case"circledot":return e.createElement("svg",{className:"rotion-icon-circledot ".concat(s),xmlns:"http://www.w3.org/2000/svg",width:r||"15px",height:n||"15px",viewBox:"0 0 512 512"},e.createElement("path",{d:"M464 256A208 208 0 1 0 48 256a208 208 0 1 0 416 0zM0 256a256 256 0 1 1 512 0A256 256 0 1 1 0 256zm256-96a96 96 0 1 1 0 192 96 96 0 1 1 0-192z"}));case"circlecheck":return e.createElement("svg",{className:"rotion-icon-circlecheck ".concat(s),xmlns:"http://www.w3.org/2000/svg",width:r||"15px",height:n||"15px",viewBox:"0 0 512 512"},e.createElement("path",{d:"M256 48a208 208 0 1 1 0 416 208 208 0 1 1 0-416zm0 464A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM369 209c9.4-9.4 9.4-24.6 0-33.9s-24.6-9.4-33.9 0l-111 111-47-47c-9.4-9.4-24.6-9.4-33.9 0s-9.4 24.6 0 33.9l64 64c9.4 9.4 24.6 9.4 33.9 0L369 209z"}));case"codemerge":return e.createElement("svg",{className:"rotion-icon-codemerge ".concat(s),version:"1.0",xmlns:"http://www.w3.org/2000/svg",width:r||"15px",height:n||"15px",viewBox:"0 0 448 512"},e.createElement("path",{d:"M80 56a24 24 0 1 1 0 48 24 24 0 1 1 0-48zm32.4 97.2c28-12.4 47.6-40.5 47.6-73.2c0-44.2-35.8-80-80-80S0 35.8 0 80c0 32.8 19.7 61 48 73.3V358.7C19.7 371 0 399.2 0 432c0 44.2 35.8 80 80 80s80-35.8 80-80c0-32.8-19.7-61-48-73.3V272c26.7 20.1 60 32 96 32h86.7c12.3 28.3 40.5 48 73.3 48c44.2 0 80-35.8 80-80s-35.8-80-80-80c-32.8 0-61 19.7-73.3 48H208c-49.9 0-91-38.1-95.6-86.8zM80 408a24 24 0 1 1 0 48 24 24 0 1 1 0-48zM344 272a24 24 0 1 1 48 0 24 24 0 1 1 -48 0z"}));case"downloadfile":return e.createElement("svg",{className:"rotion-icon-downloadfile ".concat(s),xmlns:"http://www.w3.org/2000/svg",width:r||"15px",height:n||"15px",viewBox:"0 0 512 512"},e.createElement("path",{d:"M256 464a208 208 0 1 1 0-416 208 208 0 1 1 0 416zM256 0a256 256 0 1 0 0 512A256 256 0 1 0 256 0zM376.9 294.6c4.5-4.2 7.1-10.1 7.1-16.3c0-12.3-10-22.3-22.3-22.3H304V160c0-17.7-14.3-32-32-32l-32 0c-17.7 0-32 14.3-32 32v96H150.3C138 256 128 266 128 278.3c0 6.2 2.6 12.1 7.1 16.3l107.1 99.9c3.8 3.5 8.7 5.5 13.8 5.5s10.1-2 13.8-5.5l107.1-99.9z"}))}},h=function(t){var i=t.mention;return e.createElement("span",{className:"rotion-richtext-pageordb"},e.createElement("span",{className:"rotion-richtext-pageordb-icon"},"emoji"===i.icon.type&&i.icon.emoji,"emoji"!==i.icon.type&&e.createElement("img",{src:i.icon.src,className:"rotion-richtext-pageordb-img",alt:"icon"}),e.createElement(l,{name:"link",className:"rotion-richtext-pageordb-arrow"})),e.createElement("span",{className:"rotion-richtext-pageordb-title"},i.name))};function c(e){if(void 0===e)return"";var t=Object.entries(e).map((function(e){return"".concat(e[0],"=").concat(encodeURIComponent("".concat(e[1])))})).join("&");return"?".concat(t)}var d=function(e){var t=e.split("[");return""===e?["/",""]:t.length<2?[e,""]:[t[0],t[1].split("]")[0]]};function u(e,t){if(!("properties"in t))return"not-found-properties";if("id"===e)return t.id;if(!(e in t.properties))return"not-found-key-in-page-properties";var i=t.properties[e];return"rich_text"in i?i.rich_text.map((function(e){return e.text.content})).join(","):"not-found-richtext-in-key"}function p(e,i){var r=t(1),n=r[0],s=r[1],a=Math.ceil(e.length/i);return{next:function(){s((function(e){return Math.min(e+1,a)}))},currentData:function(){var t=(n-1)*i+i;return e.slice(void 0,t)},currentPage:n,maxPage:a}}function m(e){return e.results.map((function(e){return"type"in e&&"paragraph"===e.type?e.paragraph.rich_text:[]})).map((function(e){return e.map((function(e){return e.plain_text}))})).flat().join("")}function g(e){var t=e.replace(/\/$/,""),i=t.substring(t.lastIndexOf("/")+1);return i.lastIndexOf("?")>0?i.substring(0,i.lastIndexOf("?")):i}function f(e){var t="MMMM D, YYYY",i="h:mm A";return e?(e.includes("ja")&&(t="YYYY年M月D日",i="H:mm"),{dateF:t,timeF:i}):{dateF:t,timeF:i}}function b(e){var t=e.replace(/https?:\/\//,"").split("/"),i="".concat(t.shift()),r=t.join("/");return{domain:i,omittedPath:"/".concat(r.length>12?"".concat(r.substring(0,3),"...").concat(r.substring(r.length-6)):r)}}var v=function(t){var i=t.url,r=t.text;return i.includes("slack.com")?e.createElement("a",{className:"rotion-richtext-linkpreview",href:i,rel:"noreferrer",target:"_blank"},e.createElement(l,{name:"slack",className:"rotion-richtext-linkpreview-icon",width:"17px",height:"17px"}),e.createElement("span",{className:"rotion-richtext-linkprevew-text"},"Message in Slack")):i.includes("figma.com")?e.createElement("a",{className:"rotion-richtext-linkpreview",href:i,rel:"noreferrer",target:"_blank"},e.createElement(l,{name:"figma",className:"rotion-richtext-linkpreview-icon",width:"10px",height:"16px"}),e.createElement("span",{className:"rotion-richtext-linkprevew-text"},g(r).replace(/-/g," "))):e.createElement("a",{className:"rotion-richtext-linkpreview",href:i,rel:"noreferrer",target:"_blank"},i.includes("github.com")&&e.createElement(l,{name:"github",className:"rotion-richtext-linkpreview-icon",width:"17px",height:"17px"}),e.createElement("span",{className:"rotion-richtext-linkprevew-text"},g(r)))};const y=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],w=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],x=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],A=["January","February","March","April","May","June","July","August","September","October","November","December"],k={"%a":e=>y[e.getDay()],"%A":e=>w[e.getDay()],"%b":e=>x[e.getMonth()],"%B":e=>A[e.getMonth()],"%p":e=>e.getHours()<12?"AM":"PM","%r":"%-I:%M:%S %p","%x":"%-m/%-d/%y","%X":"%-I:%M:%S %p"},E={year:"y",month:"M",week:"w",date:"D",day:"d",hour:"h",minute:"m",second:"s",millisecond:"ms"};Object.keys(E).forEach((e=>{const t=e+"s",i=E[e];i&&(E[t]=E[i]=i)}));const S=e=>E[e||"ms"]||E[String(e).toLowerCase()],C={h:36e5,m:6e4,s:1e3,ms:1},M={y:e=>e.getFullYear(),M:e=>e.getMonth(),D:e=>e.getDate(),d:e=>e.getDay(),h:e=>e.getHours(),m:e=>e.getMinutes(),s:e=>e.getSeconds(),ms:e=>e.getMilliseconds(),TZO:e=>e.getTimezoneOffset(),T:e=>e.getTime()},_=M.d,T=["Su","Mo","Tu","We","Th","Fr","Sa"],N=["th","st","nd","rd"],I={YY:"%y",YYYY:"%Y",M:"%-m",MM:"%m",MMM:"%b",MMMM:"%B",D:"%-d",Do:e=>{return(t=e.getDate())+(N[t]||t>20&&N[t%10]||N[0]);var t},DD:"%d",d:"%w",dd:e=>T[_(e)],ddd:"%a",dddd:"%A",H:"%-H",HH:"%H",h:"%-I",hh:"%I",m:"%-M",mm:"%M",s:"%-S",ss:"%S",SSS:"%L",Z:"%:z",ZZ:"%z",A:"%p",a:"%P",X:"%s",x:M.T},L=e=>{let t={};return i=>t[i]||(t[i]=e(i))},P=(()=>{const e="2-digit",t="medium",i="numeric",r="short",n="long",s={a:{weekday:r},A:{weekday:n},b:{month:r},B:{month:n},c:{weekday:r,year:i,month:r,day:i,hour:e,minute:e,second:e},p:{hour:i,hour12:!0},r:{timeStyle:t,hour12:!0},x:{dateStyle:r},X:{timeStyle:t}};return Object.keys(s).forEach((e=>s[e].timeZone="UTC")),s})(),R=L((e=>{const t=(t,i,r)=>{let n;const s=i=>{const s=i.getTimezoneOffset(),a=new Date(+i-6e4*s);if(n||(n=new Intl.DateTimeFormat(e,t)),r){const e=n.formatToParts(a).find((e=>e.type===r));return e&&e.value}const o=n.format(a);if(o)return o.replace(/\s+UTC$/,"")};if(!i)return s;const a={};return e=>{const t=i(e);return a[t]||(a[t]=s(e))}},i=e=>e.getDay(),r=e=>e.getMonth();return{"%a":t(P.a,i),"%A":t(P.A,i),"%b":t(P.b,r),"%B":t(P.B,r),"%c":t(P.c),"%p":t(P.p,(e=>e.getHours()),"dayPeriod"),"%r":t(P.r),"%x":t(P.x),"%X":t(P.X)}})),D=/%(?:[EO]\w|[0_#^-]?[1-9]?\w|::?z|[%+])/g,z=(()=>{let e=["\\[(.*?)\\]","[A-Za-z]o"];const t=e=>String.fromCharCode(e+65)+"+";for(let i=0;i<26;i++)e.push(t(i),t(i+32));return new RegExp(e.join("|"),"g")})(),F={ISO:"%Y-%m-%dT%H:%M:%S.%L%:z",undef:"YYYY-MM-DDTHH:mm:ssZ",NaN:new Date(NaN)+""},O=e=>{const t=(t,i)=>{let n=e(t);if("string"==typeof n){const t=e(n);null!=t&&(n=t)}return"function"==typeof n?n(i):null==n?t:r(n,i)},i={},r=(e,i)=>e.replace(D,(e=>t(e,i)));return i.strftime=(e,i)=>isNaN(+i)?t("NaN",i):null==e?t("ISO",i):r(e,i),i.format=(i,r)=>isNaN(+r)?t("NaN",r):(null==i&&(i=String(e("undef"))),i.replace(z,((e,i)=>i||t(e,r)))),i.handler=t=>{return O((r=e,(i=(n=t)&&(e=>n[e]))&&r?e=>i(e)||r(e):i||r));var i,r,n},i},B=O().handler(F).handler(k).handler(I).handler((()=>{const e=e=>t=>("0"+e(t)).substr(-2),t=e=>t=>(" "+e(t)).substr(-2),i=e=>t=>("00"+e(t)).substr(-3),r=M.y,n=M.M,s=M.D,a=M.d,o=M.h,l=M.m,h=M.s,c=M.ms,d=M.T,u=M.TZO,p=e=>Math.floor(r(e)/100),m=e=>(o(e)+11)%12+1,g=e=>n(e)+1,f=e=>r(e)%100,b=e=>e<10?"0"+e:e,v=(e,t)=>i=>{let r=-u(i);const n=r<0;n&&(r=-r);const s=Math.floor(r/60),a=Math.floor(r%60),o=t?e+b(Math.floor(r%1*60)):"";return(n?"-":"+")+b(s)+e+b(a)+o},y={"%c":"%a %b %e %T %Y","%-C":p,"%C":e(p),"%-d":s,"%d":e(s),"%D":"%m/%d/%y","%e":t(s),"%F":"%Y-%m-%d","%-H":o,"%H":e(o),"%-I":m,"%I":e(m),"%k":t(o),"%l":t(m),"%-L":i(c),"%L":i(c),"%-m":g,"%m":e(g),"%-M":l,"%M":e(l),"%P":e=>o(e)<12?"am":"pm","%R":"%H:%M","%s":e=>Math.floor(d(e)/1e3),"%-S":h,"%S":e(h),"%T":"%H:%M:%S","%-y":f,"%y":e(f),"%-Y":r,"%Y":(w=r,e=>{let t=w(e);if(0<=t&&t<=9999)return("000"+t).substr(-4);let i="+";return t<0&&(i="-",t=-t),i+("00000"+t).substr(-6)}),"%u":e=>(a(e)+6)%7+1,"%v":"%e-%b-%Y","%w":a,"%::z":v(":",!0),"%:z":v(":"),"%z":v(""),"%%":()=>"%","%n":()=>"\n","%t":()=>"\t"};var w;const x=(e,t)=>{t.split("").forEach((t=>y[e+t]=y["%"+t]))};return x("%E","cCxXyY"),x("%O","deHImMSuUVwWy"),y})());B.strftime;const H=e=>e&&e.tx||B,q=(e,t)=>{const i=e.getFullYear(),r=e.getMonth(),n=e.getDate(),s=new Date(i,r,1),a=+s,o=12*i+r+t;s.setFullYear(Math.floor(o/12));const l=o%12;s.setMonth(l);const h=Math.round((+s-a)/864e5);j(e,h);const c=e.getDate();l!==e.getMonth()&&n>c&&j(e,-c)},j=(e,t)=>{const i=e.getTimezoneOffset();e.setTime(+e+864e5*t);const r=e.getTimezoneOffset();i!==r&&e.setTime(+e+6e4*(r-i))},V=(e,t,i)=>{if(!t)return;const r=S(i),n=C[r];if(n)e.setTime(+e+t*n);else switch(r){case"y":return q(e,12*t);case"M":return q(e,t);case"w":return j(e,7*t);case"D":case"d":return j(e,t)}},U=e=>{G(e),V(e,1-e.getDate(),"day")},G=e=>{const t=e.getTimezoneOffset();$(e,864e5);const i=e.getTimezoneOffset();t!==i&&e.setTime(+e+6e4*(i-t))},$=(e,t)=>{const i=6e4*e.getTimezoneOffset();e.setTime(Math.floor((+e-i)/t)*t+i)},W=(e,t)=>{const i=S(t),r=C[i];if(r)return $(e,r);switch(i){case"y":return U(e),V(e,-e.getMonth(),"M");case"M":return U(e);case"w":return G(e),V(e,-e.getDay(),"d");case"D":case"d":return G(e)}},X={su:0,mo:1,tu:2,we:3,th:4,fr:5,sa:6},Y=(e,t)=>{const i=e.formatToParts(t),r={};i.forEach((e=>r[e.type]=e.value));const n=X[(s=r.weekday,String(s).toLowerCase().substr(0,2))];var s;let a=(7+t.getUTCDay()-n)%7;a>3&&(a-=7);return-(60*(24*a+(t.getUTCHours()-r.hour%24))+(t.getUTCMinutes()-r.minute)+(t.getUTCSeconds()-r.second)/60)},K=L((e=>{let t,i={},r=0;return n=>{const s=Math.floor(n/9e5);let a=i&&i[s];if(null!=a)return a;r++>96&&(i={},r=0);const o=new Date(n);if(!t){const i="numeric";t=new Intl.DateTimeFormat("en-US",{timeZone:e,hour12:!1,weekday:"short",hour:i,minute:i,second:i})}return a=Y(t,o),null==a&&(a=-o.getTimezoneOffset()),i[s]=a,a}}));class Z{constructor(e){this.dt=new Date(e)}valueOf(){return+this.dt}setTime(e){return this.dt.setTime(e)}getTimezoneOffset(){return 0}getMilliseconds(){return this.dt.getUTCMilliseconds()}getSeconds(){return this.dt.getUTCSeconds()}getMinutes(){return this.dt.getUTCMinutes()}getHours(){return this.dt.getUTCHours()}getDay(){return this.dt.getUTCDay()}getDate(){return this.dt.getUTCDate()}getMonth(){return this.dt.getUTCMonth()}getFullYear(){return this.dt.getUTCFullYear()}getTime(){return+this}}class J extends Z{constructor(e,t){const i=t(e);super(e+6e4*i),this.t=e,this.tzf=t,this.tzo=i}valueOf(){return this.t}setTime(e){const t=this.tzo=this.tzf(e);return this.dt.setTime(+e+6e4*t),this.t=e}getTimezoneOffset(){return-this.tzo}}const Q=(e,t,i)=>{const r=e.ro(),n=t.rw();return ee(r,n,i),t.create(n)},ee=(e,t,i)=>{const r=te(e),n=te(t);if(r===n)return;if(V(t,n-r,"m"),!i)return;const s=te(t);n!==s&&V(t,s-n,"m")},te=M.TZO,ie=L((e=>{if("number"==typeof e)-16<e&&e<16&&(e*=60);else{const t=String(e).match(/(?:^|GMT)?(?:([+-])([01]?\d):?(\d[05])|$)|(UTC|Z)$/);if(!t)return;e=60*+t[2]+ +t[3]|0,"-"===t[1]&&(e=0-e)}return t=>e}));const re=e=>t=>(null==t?t=new Date:"string"==typeof t&&(t=+ne(t,e.x.rw)),e.create(+t)),ne=(e,t)=>{const i=e.match(/^(\d{4}|[-+]\d{4,6})(?:(-)(\d{2})(?:-(\d{2})(?:T((\d{2}):(\d{2})(?::(\d{2})(\.\d+)?)?))?)?)?$/)||e.match(/^(\d{4}|[-+]\d{4,6})(?:([-/])(\d+)(?:\2(\d+)(?:\s+((\d+):(\d+)(?::(\d+)(\.\d+)?)?))?)?)?$/);if(!i)return new Date(e);const r=+i[1]||0,n=+i[3]-1||0,s=+i[4]||1,a=+i[6]||0,o=+i[7]||0,l=+i[8]||0,h=1e3*+i[9]||0,c=0<=r&&r<100?100:0;if(t){const e=new Date(Date.UTC(r+c,n,s,a,o,l,h));c&&e.setUTCFullYear(r);const i=new Z(+e),d=t(+e);return ee(i,d,!0),d}{const e=new Date(r+c,n,s,a,o,l,h);return c&&e.setFullYear(r),e}},se=new class{constructor(e,t){this.t=e,"number"!=typeof e&&(this.d=e),this.x=t||Object.create({cdate:{}})}cdateFn(){return re(this)}rw(){const e=+this.t,t=this.x.rw;return t?t(e):new Date(e)}ro(){return this.d||(this.d=this.rw())}valueOf(){return+this.ro()}toDate(){return new Date(+this)}toJSON(){return this.toDate().toJSON()}plugin(e){const t=this.constructor;return new(e(t)||t)(this.t,this.x)}create(e){return new this.constructor(e,this.x)}inherit(){const e=this.create(+this);return e.x=Object.create(e.x),e}}(0,null).plugin((e=>class extends e{handler(e){const t=this.inherit(),{x:i}=t;return i.tx=H(i).handler(e),t}format(e){return H(this.x).format(e,this.ro())}text(e){return H(this.x).strftime(e,this.ro())}locale(e){return this.handler(R(e))}})).plugin((e=>class extends e{get(e){const t=M[S(e)];if(t)return t(this.ro())}set(e,t){e=S(e);const i=M[e];if(!i)return this;const r=this.rw();return V(r,t-i(r),e),this.create(r)}startOf(e){if(!(e=S(e)))return this;const t=this.rw();return W(t,e),this.create(t)}endOf(e){if(!(e=S(e)))return this;const t=this.rw();return W(t,e),V(t,1,e),V(t,-1),this.create(t)}add(e,t){if(!(t=S(t)))return this;const i=this.rw();return V(i,e,t),this.create(i)}next(e){return this.add(1,e)}prev(e){return this.add(-1,e)}})).plugin((e=>class extends e{utc(e){const t=this.inherit();return t.x.rw=e=>new Z(+e),e?Q(this,t):t}utcOffset(e,t){if(null==e)return 0-te(this.ro());const i=this.inherit();return i.x.rw=t=>new J(+t,ie(e)),t?Q(this,i):i}tz(e,t){const i=this.inherit();return i.x.rw=t=>new J(+t,K(e)),t?Q(this,i,!0):i}})).cdateFn(),ae={labels:{yesterday:"Yesterday",today:"Today",tomorrow:"Tomorrow",next:"Next",last:"Last",week:"dddd",others:"MMMM D, YYYY",past:"%s ago",future:"in %s",seconds:"seconds",minutes:"minutes",hours:"hours",days:"days",months:"months",years:"years"}};const oe={R:e=>function(e,t=ae){const i="X",r=e.toString(),{specificNow:n,labels:s}={specificNow:t.specificNow,labels:{...ae.labels,...t.labels}},a=n||new Date(Date.now()),o=se(a),l=o.format(s.others),h=o.add(-1,"day").format(s.others),c=o.add(1,"day").format(s.others),d=-a.getTimezoneOffset(),u=se(r).utcOffset(d),p=u.format(i);switch(u.format(s.others)){case l:return s.today;case h:return s.yesterday;case c:return s.tomorrow}const m=u.format(s.week),g=u.format(s.others),f=o.add(-1,"week").startOf("week"),b=o.add(-1,"week").endOf("week"),v=f.format(i),y=b.format(i);if(v<=p&&p<=y)return`${s.last} ${m}`;const w=o.startOf("week"),x=o.endOf("week"),A=w.format(i),k=x.format(i);if(A<=p&&p<=k)return m;const E=o.add(1,"week").startOf("week"),S=o.add(1,"week").endOf("week"),C=E.format(i),M=S.format(i);return C<=p&&p<=M?`${s.next} ${m}`:g}(e,{labels:le}),F:e=>function(e,t=ae){const i=e.toString(),{specificNow:r,labels:n}={specificNow:t.specificNow,labels:{...ae.labels,...t.labels}},s=3600,a=86400,o=2592e3,l=31536e3,h=r||new Date(Date.now()),c=+se(h).format("X"),d=+se(i).format("X"),u=c<d?d-c:c-d;let p="";switch(!0){case u<60:p=`${u} ${n.seconds}`;break;case u<s:p=`${Math.floor(u/60)} ${n.minutes}`;break;case u<a:p=`${Math.floor(u/s)} ${n.hours}`;break;case u<o:p=`${Math.floor(u/a)} ${n.days}`;break;case u<l:p=`${Math.floor(u/o)} ${n.months}`;break;default:p=`${Math.floor(u/l)} ${n.years}`}return(c<d?n.future:n.past).replace("%s",p)}(e,{labels:le})};var le,he=function(t){var i=t.dateOrDateTime,r=t.prefix;if(!i)return e.createElement(e.Fragment,null);var n=se().handler(oe).cdateFn();return e.createElement("span",null,r,e.createElement("span",{title:n(i).format()},n(i).format(i.length>10?"R HH:mm A":"R")))},ce=function(t){var i=t.date,r=i.start,n=i.end,s=i.time_zone;return e.createElement("span",{className:"rotion-richtext-date"},e.createElement("span",{className:"rotion-richtext-atsign"},"@"),e.createElement(he,{dateOrDateTime:r}),null!==n&&e.createElement(he,{dateOrDateTime:n,prefix:" → "}),null!==s&&"(".concat(s,")"))},de=function(t){var i=t.text,r=t.children;return e.createElement("span",{className:"rotion-mention-template"},i,r)},ue=function(t){var i=t.textObject,r=t.children;if(!i)return e.createElement(e.Fragment,null);switch(i.mention.type){case"user":return e.createElement(o,{payload:i});case"date":return e.createElement(ce,{date:i.mention.date});case"link_preview":return e.createElement(v,{url:i.mention.link_preview.url,text:i.plain_text});case"page":return e.createElement(h,{mention:i.mention.page});case"database":return e.createElement(h,{mention:i.mention.database});case"template_mention":return e.createElement(de,{text:i.plain_text},r);default:return console.log("unsupport mention: ".concat(i.mention)),e.createElement(e.Fragment,null)}},pe=function(t){var i=t.condition,r=t.textObject,n=t.children;return i?function(t){var i=t.textObject,r=t.children;return e.createElement("a",{className:"rotion-richtext-link",href:i.href,rel:"noreferrer",target:"_blank"},r)}({textObject:r,children:n}):function(t){var i=t.children;return e.createElement(e.Fragment,null,i)}({children:n})},me=function(t){var i=t.textObject,r=t.children;if(!i)return e.createElement(e.Fragment,null);var n=i.annotations,s=n.color,a=["rotion-richtext-annot"];if(a.push(n.code&&"default"===s?"":"rotion-richtext-".concat(s.replace("_background","-bg"))),n.bold&&a.push("rotion-richtext-bold"),n.italic&&a.push("rotion-richtext-italic"),n.strikethrough&&a.push("rotion-richtext-strikethrough"),n.underline&&a.push("rotion-richtext-underline"),n.code&&a.push("rotion-richtext-code ".concat("default"===s||s.includes("background")?"rotion-richtext-code-color":"")),!n.code&&s.includes("background")&&a.push("rotion-richtext-nocode-bg"),r)return e.createElement("span",{className:a.join(" ")},r);var o=i.plain_text.replace(/\n/g,"<br />");return e.createElement("span",{className:a.join(" "),dangerouslySetInnerHTML:{__html:o}})},ge=function(t){var i=t.textObject,r=i.href;return e.createElement(pe,{condition:null!==r,textObject:i},e.createElement(me,{textObject:i}))};class fe{constructor(e,t,i){this.lexer=void 0,this.start=void 0,this.end=void 0,this.lexer=e,this.start=t,this.end=i}static range(e,t){return t?e&&e.loc&&t.loc&&e.loc.lexer===t.loc.lexer?new fe(e.loc.lexer,e.loc.start,t.loc.end):null:e&&e.loc}}class be{constructor(e,t){this.text=void 0,this.loc=void 0,this.noexpand=void 0,this.treatAsRelax=void 0,this.text=e,this.loc=t}range(e,t){return new be(t,fe.range(this,e))}}class ve{constructor(e,t){this.name=void 0,this.position=void 0,this.length=void 0,this.rawMessage=void 0;var i,r,n="KaTeX parse error: "+e,s=t&&t.loc;if(s&&s.start<=s.end){var a=s.lexer.input;i=s.start,r=s.end,i===a.length?n+=" at end of input: ":n+=" at position "+(i+1)+": ";var o=a.slice(i,r).replace(/[^]/g,"$&̲");n+=(i>15?"…"+a.slice(i-15,i):a.slice(0,i))+o+(r+15<a.length?a.slice(r,r+15)+"…":a.slice(r))}var l=new Error(n);return l.name="ParseError",l.__proto__=ve.prototype,l.position=i,null!=i&&null!=r&&(l.length=r-i),l.rawMessage=e,l}}ve.prototype.__proto__=Error.prototype;var ye=/([A-Z])/g,we={"&":"&",">":">","<":"<",'"':""","'":"'"},xe=/[&><"']/g;var Ae=function e(t){return"ordgroup"===t.type||"color"===t.type?1===t.body.length?e(t.body[0]):t:"font"===t.type?e(t.body):t},ke={contains:function(e,t){return-1!==e.indexOf(t)},deflt:function(e,t){return void 0===e?t:e},escape:function(e){return String(e).replace(xe,(e=>we[e]))},hyphenate:function(e){return e.replace(ye,"-$1").toLowerCase()},getBaseElem:Ae,isCharacterBox:function(e){var t=Ae(e);return"mathord"===t.type||"textord"===t.type||"atom"===t.type},protocolFromUrl:function(e){var t=/^[\x00-\x20]*([^\\/#?]*?)(:|�*58|�*3a|&colon)/i.exec(e);return t?":"!==t[2]?null:/^[a-zA-Z][a-zA-Z0-9+\-.]*$/.test(t[1])?t[1].toLowerCase():null:"_relative"}},Ee={displayMode:{type:"boolean",description:"Render math in display mode, which puts the math in display style (so \\int and \\sum are large, for example), and centers the math on the page on its own line.",cli:"-d, --display-mode"},output:{type:{enum:["htmlAndMathml","html","mathml"]},description:"Determines the markup language of the output.",cli:"-F, --format <type>"},leqno:{type:"boolean",description:"Render display math in leqno style (left-justified tags)."},fleqn:{type:"boolean",description:"Render display math flush left."},throwOnError:{type:"boolean",default:!0,cli:"-t, --no-throw-on-error",cliDescription:"Render errors (in the color given by --error-color) instead of throwing a ParseError exception when encountering an error."},errorColor:{type:"string",default:"#cc0000",cli:"-c, --error-color <color>",cliDescription:"A color string given in the format 'rgb' or 'rrggbb' (no #). This option determines the color of errors rendered by the -t option.",cliProcessor:e=>"#"+e},macros:{type:"object",cli:"-m, --macro <def>",cliDescription:"Define custom macro of the form '\\foo:expansion' (use multiple -m arguments for multiple macros).",cliDefault:[],cliProcessor:(e,t)=>(t.push(e),t)},minRuleThickness:{type:"number",description:"Specifies a minimum thickness, in ems, for fraction lines, `\\sqrt` top lines, `{array}` vertical lines, `\\hline`, `\\hdashline`, `\\underline`, `\\overline`, and the borders of `\\fbox`, `\\boxed`, and `\\fcolorbox`.",processor:e=>Math.max(0,e),cli:"--min-rule-thickness <size>",cliProcessor:parseFloat},colorIsTextColor:{type:"boolean",description:"Makes \\color behave like LaTeX's 2-argument \\textcolor, instead of LaTeX's one-argument \\color mode change.",cli:"-b, --color-is-text-color"},strict:{type:[{enum:["warn","ignore","error"]},"boolean","function"],description:"Turn on strict / LaTeX faithfulness mode, which throws an error if the input uses features that are not supported by LaTeX.",cli:"-S, --strict",cliDefault:!1},trust:{type:["boolean","function"],description:"Trust the input, enabling all HTML features such as \\url.",cli:"-T, --trust"},maxSize:{type:"number",default:1/0,description:"If non-zero, all user-specified sizes, e.g. in \\rule{500em}{500em}, will be capped to maxSize ems. Otherwise, elements and spaces can be arbitrarily large",processor:e=>Math.max(0,e),cli:"-s, --max-size <n>",cliProcessor:parseInt},maxExpand:{type:"number",default:1e3,description:"Limit the number of macro expansions to the specified number, to prevent e.g. infinite macro loops. If set to Infinity, the macro expander will try to fully expand as in LaTeX.",processor:e=>Math.max(0,e),cli:"-e, --max-expand <n>",cliProcessor:e=>"Infinity"===e?1/0:parseInt(e)},globalGroup:{type:"boolean",cli:!1}};function Se(e){if(e.default)return e.default;var t=e.type,i=Array.isArray(t)?t[0]:t;if("string"!=typeof i)return i.enum[0];switch(i){case"boolean":return!1;case"string":return"";case"number":return 0;case"object":return{}}}class Ce{constructor(e){for(var t in this.displayMode=void 0,this.output=void 0,this.leqno=void 0,this.fleqn=void 0,this.throwOnError=void 0,this.errorColor=void 0,this.macros=void 0,this.minRuleThickness=void 0,this.colorIsTextColor=void 0,this.strict=void 0,this.trust=void 0,this.maxSize=void 0,this.maxExpand=void 0,this.globalGroup=void 0,e=e||{},Ee)if(Ee.hasOwnProperty(t)){var i=Ee[t];this[t]=void 0!==e[t]?i.processor?i.processor(e[t]):e[t]:Se(i)}}reportNonstrict(e,t,i){var r=this.strict;if("function"==typeof r&&(r=r(e,t,i)),r&&"ignore"!==r){if(!0===r||"error"===r)throw new ve("LaTeX-incompatible input and strict mode is set to 'error': "+t+" ["+e+"]",i);"warn"===r?"undefined"!=typeof console&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+t+" ["+e+"]"):"undefined"!=typeof console&&console.warn("LaTeX-incompatible input and strict mode is set to unrecognized '"+r+"': "+t+" ["+e+"]")}}useStrictBehavior(e,t,i){var r=this.strict;if("function"==typeof r)try{r=r(e,t,i)}catch(e){r="error"}return!(!r||"ignore"===r)&&(!0===r||"error"===r||("warn"===r?("undefined"!=typeof console&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+t+" ["+e+"]"),!1):("undefined"!=typeof console&&console.warn("LaTeX-incompatible input and strict mode is set to unrecognized '"+r+"': "+t+" ["+e+"]"),!1)))}isTrusted(e){if(e.url&&!e.protocol){var t=ke.protocolFromUrl(e.url);if(null==t)return!1;e.protocol=t}var i="function"==typeof this.trust?this.trust(e):this.trust;return Boolean(i)}}class Me{constructor(e,t,i){this.id=void 0,this.size=void 0,this.cramped=void 0,this.id=e,this.size=t,this.cramped=i}sup(){return _e[Te[this.id]]}sub(){return _e[Ne[this.id]]}fracNum(){return _e[Ie[this.id]]}fracDen(){return _e[Le[this.id]]}cramp(){return _e[Pe[this.id]]}text(){return _e[Re[this.id]]}isTight(){return this.size>=2}}var _e=[new Me(0,0,!1),new Me(1,0,!0),new Me(2,1,!1),new Me(3,1,!0),new Me(4,2,!1),new Me(5,2,!0),new Me(6,3,!1),new Me(7,3,!0)],Te=[4,5,4,5,6,7,6,7],Ne=[5,5,5,5,7,7,7,7],Ie=[2,3,4,5,6,7,6,7],Le=[3,3,5,5,7,7,7,7],Pe=[1,1,3,3,5,5,7,7],Re=[0,1,2,3,2,3,2,3],De={DISPLAY:_e[0],TEXT:_e[2],SCRIPT:_e[4],SCRIPTSCRIPT:_e[6]},ze=[{name:"latin",blocks:[[256,591],[768,879]]},{name:"cyrillic",blocks:[[1024,1279]]},{name:"armenian",blocks:[[1328,1423]]},{name:"brahmic",blocks:[[2304,4255]]},{name:"georgian",blocks:[[4256,4351]]},{name:"cjk",blocks:[[12288,12543],[19968,40879],[65280,65376]]},{name:"hangul",blocks:[[44032,55215]]}];var Fe=[];function Oe(e){for(var t=0;t<Fe.length;t+=2)if(e>=Fe[t]&&e<=Fe[t+1])return!0;return!1}ze.forEach((e=>e.blocks.forEach((e=>Fe.push(...e)))));var Be=80,He={doubleleftarrow:"M262 157\nl10-10c34-36 62.7-77 86-123 3.3-8 5-13.3 5-16 0-5.3-6.7-8-20-8-7.3\n 0-12.2.5-14.5 1.5-2.3 1-4.8 4.5-7.5 10.5-49.3 97.3-121.7 169.3-217 216-28\n 14-57.3 25-88 33-6.7 2-11 3.8-13 5.5-2 1.7-3 4.2-3 7.5s1 5.8 3 7.5\nc2 1.7 6.3 3.5 13 5.5 68 17.3 128.2 47.8 180.5 91.5 52.3 43.7 93.8 96.2 124.5\n 157.5 9.3 8 15.3 12.3 18 13h6c12-.7 18-4 18-10 0-2-1.7-7-5-15-23.3-46-52-87\n-86-123l-10-10h399738v-40H218c328 0 0 0 0 0l-10-8c-26.7-20-65.7-43-117-69 2.7\n-2 6-3.7 10-5 36.7-16 72.3-37.3 107-64l10-8h399782v-40z\nm8 0v40h399730v-40zm0 194v40h399730v-40z",doublerightarrow:"M399738 392l\n-10 10c-34 36-62.7 77-86 123-3.3 8-5 13.3-5 16 0 5.3 6.7 8 20 8 7.3 0 12.2-.5\n 14.5-1.5 2.3-1 4.8-4.5 7.5-10.5 49.3-97.3 121.7-169.3 217-216 28-14 57.3-25 88\n-33 6.7-2 11-3.8 13-5.5 2-1.7 3-4.2 3-7.5s-1-5.8-3-7.5c-2-1.7-6.3-3.5-13-5.5-68\n-17.3-128.2-47.8-180.5-91.5-52.3-43.7-93.8-96.2-124.5-157.5-9.3-8-15.3-12.3-18\n-13h-6c-12 .7-18 4-18 10 0 2 1.7 7 5 15 23.3 46 52 87 86 123l10 10H0v40h399782\nc-328 0 0 0 0 0l10 8c26.7 20 65.7 43 117 69-2.7 2-6 3.7-10 5-36.7 16-72.3 37.3\n-107 64l-10 8H0v40zM0 157v40h399730v-40zm0 194v40h399730v-40z",leftarrow:"M400000 241H110l3-3c68.7-52.7 113.7-120\n 135-202 4-14.7 6-23 6-25 0-7.3-7-11-21-11-8 0-13.2.8-15.5 2.5-2.3 1.7-4.2 5.8\n-5.5 12.5-1.3 4.7-2.7 10.3-4 17-12 48.7-34.8 92-68.5 130S65.3 228.3 18 247\nc-10 4-16 7.7-18 11 0 8.7 6 14.3 18 17 47.3 18.7 87.8 47 121.5 85S196 441.3 208\n 490c.7 2 1.3 5 2 9s1.2 6.7 1.5 8c.3 1.3 1 3.3 2 6s2.2 4.5 3.5 5.5c1.3 1 3.3\n 1.8 6 2.5s6 1 10 1c14 0 21-3.7 21-11 0-2-2-10.3-6-25-20-79.3-65-146.7-135-202\n l-3-3h399890zM100 241v40h399900v-40z",leftbrace:"M6 548l-6-6v-35l6-11c56-104 135.3-181.3 238-232 57.3-28.7 117\n-45 179-50h399577v120H403c-43.3 7-81 15-113 26-100.7 33-179.7 91-237 174-2.7\n 5-6 9-10 13-.7 1-7.3 1-20 1H6z",leftbraceunder:"M0 6l6-6h17c12.688 0 19.313.3 20 1 4 4 7.313 8.3 10 13\n 35.313 51.3 80.813 93.8 136.5 127.5 55.688 33.7 117.188 55.8 184.5 66.5.688\n 0 2 .3 4 1 18.688 2.7 76 4.3 172 5h399450v120H429l-6-1c-124.688-8-235-61.7\n-331-161C60.687 138.7 32.312 99.3 7 54L0 41V6z",leftgroup:"M400000 80\nH435C64 80 168.3 229.4 21 260c-5.9 1.2-18 0-18 0-2 0-3-1-3-3v-38C76 61 257 0\n 435 0h399565z",leftgroupunder:"M400000 262\nH435C64 262 168.3 112.6 21 82c-5.9-1.2-18 0-18 0-2 0-3 1-3 3v38c76 158 257 219\n 435 219h399565z",leftharpoon:"M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3\n-3.3 10.2-9.5 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5\n-18.3 3-21-1.3-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7\n-196 228-6.7 4.7-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40z",leftharpoonplus:"M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3-3.3 10.2-9.5\n 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5-18.3 3-21-1.3\n-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7-196 228-6.7 4.7\n-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40zM0 435v40h400000v-40z\nm0 0v40h400000v-40z",leftharpoondown:"M7 241c-4 4-6.333 8.667-7 14 0 5.333.667 9 2 11s5.333\n 5.333 12 10c90.667 54 156 130 196 228 3.333 10.667 6.333 16.333 9 17 2 .667 5\n 1 9 1h5c10.667 0 16.667-2 18-6 2-2.667 1-9.667-3-21-32-87.333-82.667-157.667\n-152-211l-3-3h399907v-40zM93 281 H400000 v-40L7 241z",leftharpoondownplus:"M7 435c-4 4-6.3 8.7-7 14 0 5.3.7 9 2 11s5.3 5.3 12\n 10c90.7 54 156 130 196 228 3.3 10.7 6.3 16.3 9 17 2 .7 5 1 9 1h5c10.7 0 16.7\n-2 18-6 2-2.7 1-9.7-3-21-32-87.3-82.7-157.7-152-211l-3-3h399907v-40H7zm93 0\nv40h399900v-40zM0 241v40h399900v-40zm0 0v40h399900v-40z",lefthook:"M400000 281 H103s-33-11.2-61-33.5S0 197.3 0 164s14.2-61.2 42.5\n-83.5C70.8 58.2 104 47 142 47 c16.7 0 25 6.7 25 20 0 12-8.7 18.7-26 20-40 3.3\n-68.7 15.7-86 37-10 12-15 25.3-15 40 0 22.7 9.8 40.7 29.5 54 19.7 13.3 43.5 21\n 71.5 23h399859zM103 281v-40h399897v40z",leftlinesegment:"M40 281 V428 H0 V94 H40 V241 H400000 v40z\nM40 281 V428 H0 V94 H40 V241 H400000 v40z",leftmapsto:"M40 281 V448H0V74H40V241H400000v40z\nM40 281 V448H0V74H40V241H400000v40z",leftToFrom:"M0 147h400000v40H0zm0 214c68 40 115.7 95.7 143 167h22c15.3 0 23\n-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69-70-101l-7-8h399905v-40H95l7-8\nc28.7-32 52-65.7 70-101 10.7-23.3 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 265.3\n 68 321 0 361zm0-174v-40h399900v40zm100 154v40h399900v-40z",longequal:"M0 50 h400000 v40H0z m0 194h40000v40H0z\nM0 50 h400000 v40H0z m0 194h40000v40H0z",midbrace:"M200428 334\nc-100.7-8.3-195.3-44-280-108-55.3-42-101.7-93-139-153l-9-14c-2.7 4-5.7 8.7-9 14\n-53.3 86.7-123.7 153-211 199-66.7 36-137.3 56.3-212 62H0V214h199568c178.3-11.7\n 311.7-78.3 403-201 6-8 9.7-12 11-12 .7-.7 6.7-1 18-1s17.3.3 18 1c1.3 0 5 4 11\n 12 44.7 59.3 101.3 106.3 170 141s145.3 54.3 229 60h199572v120z",midbraceunder:"M199572 214\nc100.7 8.3 195.3 44 280 108 55.3 42 101.7 93 139 153l9 14c2.7-4 5.7-8.7 9-14\n 53.3-86.7 123.7-153 211-199 66.7-36 137.3-56.3 212-62h199568v120H200432c-178.3\n 11.7-311.7 78.3-403 201-6 8-9.7 12-11 12-.7.7-6.7 1-18 1s-17.3-.3-18-1c-1.3 0\n-5-4-11-12-44.7-59.3-101.3-106.3-170-141s-145.3-54.3-229-60H0V214z",oiintSize1:"M512.6 71.6c272.6 0 320.3 106.8 320.3 178.2 0 70.8-47.7 177.6\n-320.3 177.6S193.1 320.6 193.1 249.8c0-71.4 46.9-178.2 319.5-178.2z\nm368.1 178.2c0-86.4-60.9-215.4-368.1-215.4-306.4 0-367.3 129-367.3 215.4 0 85.8\n60.9 214.8 367.3 214.8 307.2 0 368.1-129 368.1-214.8z",oiintSize2:"M757.8 100.1c384.7 0 451.1 137.6 451.1 230 0 91.3-66.4 228.8\n-451.1 228.8-386.3 0-452.7-137.5-452.7-228.8 0-92.4 66.4-230 452.7-230z\nm502.4 230c0-111.2-82.4-277.2-502.4-277.2s-504 166-504 277.2\nc0 110 84 276 504 276s502.4-166 502.4-276z",oiiintSize1:"M681.4 71.6c408.9 0 480.5 106.8 480.5 178.2 0 70.8-71.6 177.6\n-480.5 177.6S202.1 320.6 202.1 249.8c0-71.4 70.5-178.2 479.3-178.2z\nm525.8 178.2c0-86.4-86.8-215.4-525.7-215.4-437.9 0-524.7 129-524.7 215.4 0\n85.8 86.8 214.8 524.7 214.8 438.9 0 525.7-129 525.7-214.8z",oiiintSize2:"M1021.2 53c603.6 0 707.8 165.8 707.8 277.2 0 110-104.2 275.8\n-707.8 275.8-606 0-710.2-165.8-710.2-275.8C311 218.8 415.2 53 1021.2 53z\nm770.4 277.1c0-131.2-126.4-327.6-770.5-327.6S248.4 198.9 248.4 330.1\nc0 130 128.8 326.4 772.7 326.4s770.5-196.4 770.5-326.4z",rightarrow:"M0 241v40h399891c-47.3 35.3-84 78-110 128\n-16.7 32-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20\n 11 8 0 13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7\n 39-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85\n-40.5-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5\n-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67\n 151.7 139 205zm0 0v40h399900v-40z",rightbrace:"M400000 542l\n-6 6h-17c-12.7 0-19.3-.3-20-1-4-4-7.3-8.3-10-13-35.3-51.3-80.8-93.8-136.5-127.5\ns-117.2-55.8-184.5-66.5c-.7 0-2-.3-4-1-18.7-2.7-76-4.3-172-5H0V214h399571l6 1\nc124.7 8 235 61.7 331 161 31.3 33.3 59.7 72.7 85 118l7 13v35z",rightbraceunder:"M399994 0l6 6v35l-6 11c-56 104-135.3 181.3-238 232-57.3\n 28.7-117 45-179 50H-300V214h399897c43.3-7 81-15 113-26 100.7-33 179.7-91 237\n-174 2.7-5 6-9 10-13 .7-1 7.3-1 20-1h17z",rightgroup:"M0 80h399565c371 0 266.7 149.4 414 180 5.9 1.2 18 0 18 0 2 0\n 3-1 3-3v-38c-76-158-257-219-435-219H0z",rightgroupunder:"M0 262h399565c371 0 266.7-149.4 414-180 5.9-1.2 18 0 18\n 0 2 0 3 1 3 3v38c-76 158-257 219-435 219H0z",rightharpoon:"M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3\n-3.7-15.3-11-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2\n-10.7 0-16.7 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58\n 69.2 92 94.5zm0 0v40h399900v-40z",rightharpoonplus:"M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3-3.7-15.3-11\n-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2-10.7 0-16.7\n 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58 69.2 92 94.5z\nm0 0v40h399900v-40z m100 194v40h399900v-40zm0 0v40h399900v-40z",rightharpoondown:"M399747 511c0 7.3 6.7 11 20 11 8 0 13-.8 15-2.5s4.7-6.8\n 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3 8.5-5.8 9.5\n-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3-64.7 57-92 95\n-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 241v40h399900v-40z",rightharpoondownplus:"M399747 705c0 7.3 6.7 11 20 11 8 0 13-.8\n 15-2.5s4.7-6.8 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3\n 8.5-5.8 9.5-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3\n-64.7 57-92 95-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 435v40h399900v-40z\nm0-194v40h400000v-40zm0 0v40h400000v-40z",righthook:"M399859 241c-764 0 0 0 0 0 40-3.3 68.7-15.7 86-37 10-12 15-25.3\n 15-40 0-22.7-9.8-40.7-29.5-54-19.7-13.3-43.5-21-71.5-23-17.3-1.3-26-8-26-20 0\n-13.3 8.7-20 26-20 38 0 71 11.2 99 33.5 0 0 7 5.6 21 16.7 14 11.2 21 33.5 21\n 66.8s-14 61.2-42 83.5c-28 22.3-61 33.5-99 33.5L0 241z M0 281v-40h399859v40z",rightlinesegment:"M399960 241 V94 h40 V428 h-40 V281 H0 v-40z\nM399960 241 V94 h40 V428 h-40 V281 H0 v-40z",rightToFrom:"M400000 167c-70.7-42-118-97.7-142-167h-23c-15.3 0-23 .3-23\n 1 0 1.3 5.3 13.7 16 37 18 35.3 41.3 69 70 101l7 8H0v40h399905l-7 8c-28.7 32\n-52 65.7-70 101-10.7 23.3-16 35.7-16 37 0 .7 7.7 1 23 1h23c24-69.3 71.3-125 142\n-167z M100 147v40h399900v-40zM0 341v40h399900v-40z",twoheadleftarrow:"M0 167c68 40\n 115.7 95.7 143 167h22c15.3 0 23-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69\n-70-101l-7-8h125l9 7c50.7 39.3 85 86 103 140h46c0-4.7-6.3-18.7-19-42-18-35.3\n-40-67.3-66-96l-9-9h399716v-40H284l9-9c26-28.7 48-60.7 66-96 12.7-23.333 19\n-37.333 19-42h-46c-18 54-52.3 100.7-103 140l-9 7H95l7-8c28.7-32 52-65.7 70-101\n 10.7-23.333 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 71.3 68 127 0 167z",twoheadrightarrow:"M400000 167\nc-68-40-115.7-95.7-143-167h-22c-15.3 0-23 .3-23 1 0 1.3 5.3 13.7 16 37 18 35.3\n 41.3 69 70 101l7 8h-125l-9-7c-50.7-39.3-85-86-103-140h-46c0 4.7 6.3 18.7 19 42\n 18 35.3 40 67.3 66 96l9 9H0v40h399716l-9 9c-26 28.7-48 60.7-66 96-12.7 23.333\n-19 37.333-19 42h46c18-54 52.3-100.7 103-140l9-7h125l-7 8c-28.7 32-52 65.7-70\n 101-10.7 23.333-16 35.7-16 37 0 .7 7.7 1 23 1h22c27.3-71.3 75-127 143-167z",tilde1:"M200 55.538c-77 0-168 73.953-177 73.953-3 0-7\n-2.175-9-5.437L2 97c-1-2-2-4-2-6 0-4 2-7 5-9l20-12C116 12 171 0 207 0c86 0\n 114 68 191 68 78 0 168-68 177-68 4 0 7 2 9 5l12 19c1 2.175 2 4.35 2 6.525 0\n 4.35-2 7.613-5 9.788l-19 13.05c-92 63.077-116.937 75.308-183 76.128\n-68.267.847-113-73.952-191-73.952z",tilde2:"M344 55.266c-142 0-300.638 81.316-311.5 86.418\n-8.01 3.762-22.5 10.91-23.5 5.562L1 120c-1-2-1-3-1-4 0-5 3-9 8-10l18.4-9C160.9\n 31.9 283 0 358 0c148 0 188 122 331 122s314-97 326-97c4 0 8 2 10 7l7 21.114\nc1 2.14 1 3.21 1 4.28 0 5.347-3 9.626-7 10.696l-22.3 12.622C852.6 158.372 751\n 181.476 676 181.476c-149 0-189-126.21-332-126.21z",tilde3:"M786 59C457 59 32 175.242 13 175.242c-6 0-10-3.457\n-11-10.37L.15 138c-1-7 3-12 10-13l19.2-6.4C378.4 40.7 634.3 0 804.3 0c337 0\n 411.8 157 746.8 157 328 0 754-112 773-112 5 0 10 3 11 9l1 14.075c1 8.066-.697\n 16.595-6.697 17.492l-21.052 7.31c-367.9 98.146-609.15 122.696-778.15 122.696\n -338 0-409-156.573-744-156.573z",tilde4:"M786 58C457 58 32 177.487 13 177.487c-6 0-10-3.345\n-11-10.035L.15 143c-1-7 3-12 10-13l22-6.7C381.2 35 637.15 0 807.15 0c337 0 409\n 177 744 177 328 0 754-127 773-127 5 0 10 3 11 9l1 14.794c1 7.805-3 13.38-9\n 14.495l-20.7 5.574c-366.85 99.79-607.3 139.372-776.3 139.372-338 0-409\n -175.236-744-175.236z",vec:"M377 20c0-5.333 1.833-10 5.5-14S391 0 397 0c4.667 0 8.667 1.667 12 5\n3.333 2.667 6.667 9 10 19 6.667 24.667 20.333 43.667 41 57 7.333 4.667 11\n10.667 11 18 0 6-1 10-3 12s-6.667 5-14 9c-28.667 14.667-53.667 35.667-75 63\n-1.333 1.333-3.167 3.5-5.5 6.5s-4 4.833-5 5.5c-1 .667-2.5 1.333-4.5 2s-4.333 1\n-7 1c-4.667 0-9.167-1.833-13.5-5.5S337 184 337 178c0-12.667 15.667-32.333 47-59\nH213l-171-1c-8.667-6-13-12.333-13-19 0-4.667 4.333-11.333 13-20h359\nc-16-25.333-24-45-24-59z",widehat1:"M529 0h5l519 115c5 1 9 5 9 10 0 1-1 2-1 3l-4 22\nc-1 5-5 9-11 9h-2L532 67 19 159h-2c-5 0-9-4-11-9l-5-22c-1-6 2-12 8-13z",widehat2:"M1181 0h2l1171 176c6 0 10 5 10 11l-2 23c-1 6-5 10\n-11 10h-1L1182 67 15 220h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z",widehat3:"M1181 0h2l1171 236c6 0 10 5 10 11l-2 23c-1 6-5 10\n-11 10h-1L1182 67 15 280h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z",widehat4:"M1181 0h2l1171 296c6 0 10 5 10 11l-2 23c-1 6-5 10\n-11 10h-1L1182 67 15 340h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z",widecheck1:"M529,159h5l519,-115c5,-1,9,-5,9,-10c0,-1,-1,-2,-1,-3l-4,-22c-1,\n-5,-5,-9,-11,-9h-2l-512,92l-513,-92h-2c-5,0,-9,4,-11,9l-5,22c-1,6,2,12,8,13z",widecheck2:"M1181,220h2l1171,-176c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,\n-11,-10h-1l-1168,153l-1167,-153h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z",widecheck3:"M1181,280h2l1171,-236c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,\n-11,-10h-1l-1168,213l-1167,-213h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z",widecheck4:"M1181,340h2l1171,-296c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,\n-11,-10h-1l-1168,273l-1167,-273h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z",baraboveleftarrow:"M400000 620h-399890l3 -3c68.7 -52.7 113.7 -120 135 -202\nc4 -14.7 6 -23 6 -25c0 -7.3 -7 -11 -21 -11c-8 0 -13.2 0.8 -15.5 2.5\nc-2.3 1.7 -4.2 5.8 -5.5 12.5c-1.3 4.7 -2.7 10.3 -4 17c-12 48.7 -34.8 92 -68.5 130\ns-74.2 66.3 -121.5 85c-10 4 -16 7.7 -18 11c0 8.7 6 14.3 18 17c47.3 18.7 87.8 47\n121.5 85s56.5 81.3 68.5 130c0.7 2 1.3 5 2 9s1.2 6.7 1.5 8c0.3 1.3 1 3.3 2 6\ns2.2 4.5 3.5 5.5c1.3 1 3.3 1.8 6 2.5s6 1 10 1c14 0 21 -3.7 21 -11\nc0 -2 -2 -10.3 -6 -25c-20 -79.3 -65 -146.7 -135 -202l-3 -3h399890z\nM100 620v40h399900v-40z M0 241v40h399900v-40zM0 241v40h399900v-40z",rightarrowabovebar:"M0 241v40h399891c-47.3 35.3-84 78-110 128-16.7 32\n-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20 11 8 0\n13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7 39\n-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85-40.5\n-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5\n-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67\n151.7 139 205zm96 379h399894v40H0zm0 0h399904v40H0z",baraboveshortleftharpoon:"M507,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11\nc1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17\nc2,0.7,5,1,9,1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21\nc-32,-87.3,-82.7,-157.7,-152,-211c0,0,-3,-3,-3,-3l399351,0l0,-40\nc-398570,0,-399437,0,-399437,0z M593 435 v40 H399500 v-40z\nM0 281 v-40 H399908 v40z M0 281 v-40 H399908 v40z",rightharpoonaboveshortbar:"M0,241 l0,40c399126,0,399993,0,399993,0\nc4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,\n-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6\nc-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z\nM0 241 v40 H399908 v-40z M0 475 v-40 H399500 v40z M0 475 v-40 H399500 v40z",shortbaraboveleftharpoon:"M7,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11\nc1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17c2,0.7,5,1,9,\n1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21c-32,-87.3,-82.7,-157.7,\n-152,-211c0,0,-3,-3,-3,-3l399907,0l0,-40c-399126,0,-399993,0,-399993,0z\nM93 435 v40 H400000 v-40z M500 241 v40 H400000 v-40z M500 241 v40 H400000 v-40z",shortrightharpoonabovebar:"M53,241l0,40c398570,0,399437,0,399437,0\nc4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,\n-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6\nc-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z\nM500 241 v40 H399408 v-40z M500 435 v40 H400000 v-40z"};class qe{constructor(e){this.children=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.children=e,this.classes=[],this.height=0,this.depth=0,this.maxFontSize=0,this.style={}}hasClass(e){return ke.contains(this.classes,e)}toNode(){for(var e=document.createDocumentFragment(),t=0;t<this.children.length;t++)e.appendChild(this.children[t].toNode());return e}toMarkup(){for(var e="",t=0;t<this.children.length;t++)e+=this.children[t].toMarkup();return e}toText(){return this.children.map((e=>e.toText())).join("")}}var je={"AMS-Regular":{32:[0,0,0,0,.25],65:[0,.68889,0,0,.72222],66:[0,.68889,0,0,.66667],67:[0,.68889,0,0,.72222],68:[0,.68889,0,0,.72222],69:[0,.68889,0,0,.66667],70:[0,.68889,0,0,.61111],71:[0,.68889,0,0,.77778],72:[0,.68889,0,0,.77778],73:[0,.68889,0,0,.38889],74:[.16667,.68889,0,0,.5],75:[0,.68889,0,0,.77778],76:[0,.68889,0,0,.66667],77:[0,.68889,0,0,.94445],78:[0,.68889,0,0,.72222],79:[.16667,.68889,0,0,.77778],80:[0,.68889,0,0,.61111],81:[.16667,.68889,0,0,.77778],82:[0,.68889,0,0,.72222],83:[0,.68889,0,0,.55556],84:[0,.68889,0,0,.66667],85:[0,.68889,0,0,.72222],86:[0,.68889,0,0,.72222],87:[0,.68889,0,0,1],88:[0,.68889,0,0,.72222],89:[0,.68889,0,0,.72222],90:[0,.68889,0,0,.66667],107:[0,.68889,0,0,.55556],160:[0,0,0,0,.25],165:[0,.675,.025,0,.75],174:[.15559,.69224,0,0,.94666],240:[0,.68889,0,0,.55556],295:[0,.68889,0,0,.54028],710:[0,.825,0,0,2.33334],732:[0,.9,0,0,2.33334],770:[0,.825,0,0,2.33334],771:[0,.9,0,0,2.33334],989:[.08167,.58167,0,0,.77778],1008:[0,.43056,.04028,0,.66667],8245:[0,.54986,0,0,.275],8463:[0,.68889,0,0,.54028],8487:[0,.68889,0,0,.72222],8498:[0,.68889,0,0,.55556],8502:[0,.68889,0,0,.66667],8503:[0,.68889,0,0,.44445],8504:[0,.68889,0,0,.66667],8513:[0,.68889,0,0,.63889],8592:[-.03598,.46402,0,0,.5],8594:[-.03598,.46402,0,0,.5],8602:[-.13313,.36687,0,0,1],8603:[-.13313,.36687,0,0,1],8606:[.01354,.52239,0,0,1],8608:[.01354,.52239,0,0,1],8610:[.01354,.52239,0,0,1.11111],8611:[.01354,.52239,0,0,1.11111],8619:[0,.54986,0,0,1],8620:[0,.54986,0,0,1],8621:[-.13313,.37788,0,0,1.38889],8622:[-.13313,.36687,0,0,1],8624:[0,.69224,0,0,.5],8625:[0,.69224,0,0,.5],8630:[0,.43056,0,0,1],8631:[0,.43056,0,0,1],8634:[.08198,.58198,0,0,.77778],8635:[.08198,.58198,0,0,.77778],8638:[.19444,.69224,0,0,.41667],8639:[.19444,.69224,0,0,.41667],8642:[.19444,.69224,0,0,.41667],8643:[.19444,.69224,0,0,.41667],8644:[.1808,.675,0,0,1],8646:[.1808,.675,0,0,1],8647:[.1808,.675,0,0,1],8648:[.19444,.69224,0,0,.83334],8649:[.1808,.675,0,0,1],8650:[.19444,.69224,0,0,.83334],8651:[.01354,.52239,0,0,1],8652:[.01354,.52239,0,0,1],8653:[-.13313,.36687,0,0,1],8654:[-.13313,.36687,0,0,1],8655:[-.13313,.36687,0,0,1],8666:[.13667,.63667,0,0,1],8667:[.13667,.63667,0,0,1],8669:[-.13313,.37788,0,0,1],8672:[-.064,.437,0,0,1.334],8674:[-.064,.437,0,0,1.334],8705:[0,.825,0,0,.5],8708:[0,.68889,0,0,.55556],8709:[.08167,.58167,0,0,.77778],8717:[0,.43056,0,0,.42917],8722:[-.03598,.46402,0,0,.5],8724:[.08198,.69224,0,0,.77778],8726:[.08167,.58167,0,0,.77778],8733:[0,.69224,0,0,.77778],8736:[0,.69224,0,0,.72222],8737:[0,.69224,0,0,.72222],8738:[.03517,.52239,0,0,.72222],8739:[.08167,.58167,0,0,.22222],8740:[.25142,.74111,0,0,.27778],8741:[.08167,.58167,0,0,.38889],8742:[.25142,.74111,0,0,.5],8756:[0,.69224,0,0,.66667],8757:[0,.69224,0,0,.66667],8764:[-.13313,.36687,0,0,.77778],8765:[-.13313,.37788,0,0,.77778],8769:[-.13313,.36687,0,0,.77778],8770:[-.03625,.46375,0,0,.77778],8774:[.30274,.79383,0,0,.77778],8776:[-.01688,.48312,0,0,.77778],8778:[.08167,.58167,0,0,.77778],8782:[.06062,.54986,0,0,.77778],8783:[.06062,.54986,0,0,.77778],8785:[.08198,.58198,0,0,.77778],8786:[.08198,.58198,0,0,.77778],8787:[.08198,.58198,0,0,.77778],8790:[0,.69224,0,0,.77778],8791:[.22958,.72958,0,0,.77778],8796:[.08198,.91667,0,0,.77778],8806:[.25583,.75583,0,0,.77778],8807:[.25583,.75583,0,0,.77778],8808:[.25142,.75726,0,0,.77778],8809:[.25142,.75726,0,0,.77778],8812:[.25583,.75583,0,0,.5],8814:[.20576,.70576,0,0,.77778],8815:[.20576,.70576,0,0,.77778],8816:[.30274,.79383,0,0,.77778],8817:[.30274,.79383,0,0,.77778],8818:[.22958,.72958,0,0,.77778],8819:[.22958,.72958,0,0,.77778],8822:[.1808,.675,0,0,.77778],8823:[.1808,.675,0,0,.77778],8828:[.13667,.63667,0,0,.77778],8829:[.13667,.63667,0,0,.77778],8830:[.22958,.72958,0,0,.77778],8831:[.22958,.72958,0,0,.77778],8832:[.20576,.70576,0,0,.77778],8833:[.20576,.70576,0,0,.77778],8840:[.30274,.79383,0,0,.77778],8841:[.30274,.79383,0,0,.77778],8842:[.13597,.63597,0,0,.77778],8843:[.13597,.63597,0,0,.77778],8847:[.03517,.54986,0,0,.77778],8848:[.03517,.54986,0,0,.77778],8858:[.08198,.58198,0,0,.77778],8859:[.08198,.58198,0,0,.77778],8861:[.08198,.58198,0,0,.77778],8862:[0,.675,0,0,.77778],8863:[0,.675,0,0,.77778],8864:[0,.675,0,0,.77778],8865:[0,.675,0,0,.77778],8872:[0,.69224,0,0,.61111],8873:[0,.69224,0,0,.72222],8874:[0,.69224,0,0,.88889],8876:[0,.68889,0,0,.61111],8877:[0,.68889,0,0,.61111],8878:[0,.68889,0,0,.72222],8879:[0,.68889,0,0,.72222],8882:[.03517,.54986,0,0,.77778],8883:[.03517,.54986,0,0,.77778],8884:[.13667,.63667,0,0,.77778],8885:[.13667,.63667,0,0,.77778],8888:[0,.54986,0,0,1.11111],8890:[.19444,.43056,0,0,.55556],8891:[.19444,.69224,0,0,.61111],8892:[.19444,.69224,0,0,.61111],8901:[0,.54986,0,0,.27778],8903:[.08167,.58167,0,0,.77778],8905:[.08167,.58167,0,0,.77778],8906:[.08167,.58167,0,0,.77778],8907:[0,.69224,0,0,.77778],8908:[0,.69224,0,0,.77778],8909:[-.03598,.46402,0,0,.77778],8910:[0,.54986,0,0,.76042],8911:[0,.54986,0,0,.76042],8912:[.03517,.54986,0,0,.77778],8913:[.03517,.54986,0,0,.77778],8914:[0,.54986,0,0,.66667],8915:[0,.54986,0,0,.66667],8916:[0,.69224,0,0,.66667],8918:[.0391,.5391,0,0,.77778],8919:[.0391,.5391,0,0,.77778],8920:[.03517,.54986,0,0,1.33334],8921:[.03517,.54986,0,0,1.33334],8922:[.38569,.88569,0,0,.77778],8923:[.38569,.88569,0,0,.77778],8926:[.13667,.63667,0,0,.77778],8927:[.13667,.63667,0,0,.77778],8928:[.30274,.79383,0,0,.77778],8929:[.30274,.79383,0,0,.77778],8934:[.23222,.74111,0,0,.77778],8935:[.23222,.74111,0,0,.77778],8936:[.23222,.74111,0,0,.77778],8937:[.23222,.74111,0,0,.77778],8938:[.20576,.70576,0,0,.77778],8939:[.20576,.70576,0,0,.77778],8940:[.30274,.79383,0,0,.77778],8941:[.30274,.79383,0,0,.77778],8994:[.19444,.69224,0,0,.77778],8995:[.19444,.69224,0,0,.77778],9416:[.15559,.69224,0,0,.90222],9484:[0,.69224,0,0,.5],9488:[0,.69224,0,0,.5],9492:[0,.37788,0,0,.5],9496:[0,.37788,0,0,.5],9585:[.19444,.68889,0,0,.88889],9586:[.19444,.74111,0,0,.88889],9632:[0,.675,0,0,.77778],9633:[0,.675,0,0,.77778],9650:[0,.54986,0,0,.72222],9651:[0,.54986,0,0,.72222],9654:[.03517,.54986,0,0,.77778],9660:[0,.54986,0,0,.72222],9661:[0,.54986,0,0,.72222],9664:[.03517,.54986,0,0,.77778],9674:[.11111,.69224,0,0,.66667],9733:[.19444,.69224,0,0,.94445],10003:[0,.69224,0,0,.83334],10016:[0,.69224,0,0,.83334],10731:[.11111,.69224,0,0,.66667],10846:[.19444,.75583,0,0,.61111],10877:[.13667,.63667,0,0,.77778],10878:[.13667,.63667,0,0,.77778],10885:[.25583,.75583,0,0,.77778],10886:[.25583,.75583,0,0,.77778],10887:[.13597,.63597,0,0,.77778],10888:[.13597,.63597,0,0,.77778],10889:[.26167,.75726,0,0,.77778],10890:[.26167,.75726,0,0,.77778],10891:[.48256,.98256,0,0,.77778],10892:[.48256,.98256,0,0,.77778],10901:[.13667,.63667,0,0,.77778],10902:[.13667,.63667,0,0,.77778],10933:[.25142,.75726,0,0,.77778],10934:[.25142,.75726,0,0,.77778],10935:[.26167,.75726,0,0,.77778],10936:[.26167,.75726,0,0,.77778],10937:[.26167,.75726,0,0,.77778],10938:[.26167,.75726,0,0,.77778],10949:[.25583,.75583,0,0,.77778],10950:[.25583,.75583,0,0,.77778],10955:[.28481,.79383,0,0,.77778],10956:[.28481,.79383,0,0,.77778],57350:[.08167,.58167,0,0,.22222],57351:[.08167,.58167,0,0,.38889],57352:[.08167,.58167,0,0,.77778],57353:[0,.43056,.04028,0,.66667],57356:[.25142,.75726,0,0,.77778],57357:[.25142,.75726,0,0,.77778],57358:[.41951,.91951,0,0,.77778],57359:[.30274,.79383,0,0,.77778],57360:[.30274,.79383,0,0,.77778],57361:[.41951,.91951,0,0,.77778],57366:[.25142,.75726,0,0,.77778],57367:[.25142,.75726,0,0,.77778],57368:[.25142,.75726,0,0,.77778],57369:[.25142,.75726,0,0,.77778],57370:[.13597,.63597,0,0,.77778],57371:[.13597,.63597,0,0,.77778]},"Caligraphic-Regular":{32:[0,0,0,0,.25],65:[0,.68333,0,.19445,.79847],66:[0,.68333,.03041,.13889,.65681],67:[0,.68333,.05834,.13889,.52653],68:[0,.68333,.02778,.08334,.77139],69:[0,.68333,.08944,.11111,.52778],70:[0,.68333,.09931,.11111,.71875],71:[.09722,.68333,.0593,.11111,.59487],72:[0,.68333,.00965,.11111,.84452],73:[0,.68333,.07382,0,.54452],74:[.09722,.68333,.18472,.16667,.67778],75:[0,.68333,.01445,.05556,.76195],76:[0,.68333,0,.13889,.68972],77:[0,.68333,0,.13889,1.2009],78:[0,.68333,.14736,.08334,.82049],79:[0,.68333,.02778,.11111,.79611],80:[0,.68333,.08222,.08334,.69556],81:[.09722,.68333,0,.11111,.81667],82:[0,.68333,0,.08334,.8475],83:[0,.68333,.075,.13889,.60556],84:[0,.68333,.25417,0,.54464],85:[0,.68333,.09931,.08334,.62583],86:[0,.68333,.08222,0,.61278],87:[0,.68333,.08222,.08334,.98778],88:[0,.68333,.14643,.13889,.7133],89:[.09722,.68333,.08222,.08334,.66834],90:[0,.68333,.07944,.13889,.72473],160:[0,0,0,0,.25]},"Fraktur-Regular":{32:[0,0,0,0,.25],33:[0,.69141,0,0,.29574],34:[0,.69141,0,0,.21471],38:[0,.69141,0,0,.73786],39:[0,.69141,0,0,.21201],40:[.24982,.74947,0,0,.38865],41:[.24982,.74947,0,0,.38865],42:[0,.62119,0,0,.27764],43:[.08319,.58283,0,0,.75623],44:[0,.10803,0,0,.27764],45:[.08319,.58283,0,0,.75623],46:[0,.10803,0,0,.27764],47:[.24982,.74947,0,0,.50181],48:[0,.47534,0,0,.50181],49:[0,.47534,0,0,.50181],50:[0,.47534,0,0,.50181],51:[.18906,.47534,0,0,.50181],52:[.18906,.47534,0,0,.50181],53:[.18906,.47534,0,0,.50181],54:[0,.69141,0,0,.50181],55:[.18906,.47534,0,0,.50181],56:[0,.69141,0,0,.50181],57:[.18906,.47534,0,0,.50181],58:[0,.47534,0,0,.21606],59:[.12604,.47534,0,0,.21606],61:[-.13099,.36866,0,0,.75623],63:[0,.69141,0,0,.36245],65:[0,.69141,0,0,.7176],66:[0,.69141,0,0,.88397],67:[0,.69141,0,0,.61254],68:[0,.69141,0,0,.83158],69:[0,.69141,0,0,.66278],70:[.12604,.69141,0,0,.61119],71:[0,.69141,0,0,.78539],72:[.06302,.69141,0,0,.7203],73:[0,.69141,0,0,.55448],74:[.12604,.69141,0,0,.55231],75:[0,.69141,0,0,.66845],76:[0,.69141,0,0,.66602],77:[0,.69141,0,0,1.04953],78:[0,.69141,0,0,.83212],79:[0,.69141,0,0,.82699],80:[.18906,.69141,0,0,.82753],81:[.03781,.69141,0,0,.82699],82:[0,.69141,0,0,.82807],83:[0,.69141,0,0,.82861],84:[0,.69141,0,0,.66899],85:[0,.69141,0,0,.64576],86:[0,.69141,0,0,.83131],87:[0,.69141,0,0,1.04602],88:[0,.69141,0,0,.71922],89:[.18906,.69141,0,0,.83293],90:[.12604,.69141,0,0,.60201],91:[.24982,.74947,0,0,.27764],93:[.24982,.74947,0,0,.27764],94:[0,.69141,0,0,.49965],97:[0,.47534,0,0,.50046],98:[0,.69141,0,0,.51315],99:[0,.47534,0,0,.38946],100:[0,.62119,0,0,.49857],101:[0,.47534,0,0,.40053],102:[.18906,.69141,0,0,.32626],103:[.18906,.47534,0,0,.5037],104:[.18906,.69141,0,0,.52126],105:[0,.69141,0,0,.27899],106:[0,.69141,0,0,.28088],107:[0,.69141,0,0,.38946],108:[0,.69141,0,0,.27953],109:[0,.47534,0,0,.76676],110:[0,.47534,0,0,.52666],111:[0,.47534,0,0,.48885],112:[.18906,.52396,0,0,.50046],113:[.18906,.47534,0,0,.48912],114:[0,.47534,0,0,.38919],115:[0,.47534,0,0,.44266],116:[0,.62119,0,0,.33301],117:[0,.47534,0,0,.5172],118:[0,.52396,0,0,.5118],119:[0,.52396,0,0,.77351],120:[.18906,.47534,0,0,.38865],121:[.18906,.47534,0,0,.49884],122:[.18906,.47534,0,0,.39054],160:[0,0,0,0,.25],8216:[0,.69141,0,0,.21471],8217:[0,.69141,0,0,.21471],58112:[0,.62119,0,0,.49749],58113:[0,.62119,0,0,.4983],58114:[.18906,.69141,0,0,.33328],58115:[.18906,.69141,0,0,.32923],58116:[.18906,.47534,0,0,.50343],58117:[0,.69141,0,0,.33301],58118:[0,.62119,0,0,.33409],58119:[0,.47534,0,0,.50073]},"Main-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.35],34:[0,.69444,0,0,.60278],35:[.19444,.69444,0,0,.95833],36:[.05556,.75,0,0,.575],37:[.05556,.75,0,0,.95833],38:[0,.69444,0,0,.89444],39:[0,.69444,0,0,.31944],40:[.25,.75,0,0,.44722],41:[.25,.75,0,0,.44722],42:[0,.75,0,0,.575],43:[.13333,.63333,0,0,.89444],44:[.19444,.15556,0,0,.31944],45:[0,.44444,0,0,.38333],46:[0,.15556,0,0,.31944],47:[.25,.75,0,0,.575],48:[0,.64444,0,0,.575],49:[0,.64444,0,0,.575],50:[0,.64444,0,0,.575],51:[0,.64444,0,0,.575],52:[0,.64444,0,0,.575],53:[0,.64444,0,0,.575],54:[0,.64444,0,0,.575],55:[0,.64444,0,0,.575],56:[0,.64444,0,0,.575],57:[0,.64444,0,0,.575],58:[0,.44444,0,0,.31944],59:[.19444,.44444,0,0,.31944],60:[.08556,.58556,0,0,.89444],61:[-.10889,.39111,0,0,.89444],62:[.08556,.58556,0,0,.89444],63:[0,.69444,0,0,.54305],64:[0,.69444,0,0,.89444],65:[0,.68611,0,0,.86944],66:[0,.68611,0,0,.81805],67:[0,.68611,0,0,.83055],68:[0,.68611,0,0,.88194],69:[0,.68611,0,0,.75555],70:[0,.68611,0,0,.72361],71:[0,.68611,0,0,.90416],72:[0,.68611,0,0,.9],73:[0,.68611,0,0,.43611],74:[0,.68611,0,0,.59444],75:[0,.68611,0,0,.90138],76:[0,.68611,0,0,.69166],77:[0,.68611,0,0,1.09166],78:[0,.68611,0,0,.9],79:[0,.68611,0,0,.86388],80:[0,.68611,0,0,.78611],81:[.19444,.68611,0,0,.86388],82:[0,.68611,0,0,.8625],83:[0,.68611,0,0,.63889],84:[0,.68611,0,0,.8],85:[0,.68611,0,0,.88472],86:[0,.68611,.01597,0,.86944],87:[0,.68611,.01597,0,1.18888],88:[0,.68611,0,0,.86944],89:[0,.68611,.02875,0,.86944],90:[0,.68611,0,0,.70277],91:[.25,.75,0,0,.31944],92:[.25,.75,0,0,.575],93:[.25,.75,0,0,.31944],94:[0,.69444,0,0,.575],95:[.31,.13444,.03194,0,.575],97:[0,.44444,0,0,.55902],98:[0,.69444,0,0,.63889],99:[0,.44444,0,0,.51111],100:[0,.69444,0,0,.63889],101:[0,.44444,0,0,.52708],102:[0,.69444,.10903,0,.35139],103:[.19444,.44444,.01597,0,.575],104:[0,.69444,0,0,.63889],105:[0,.69444,0,0,.31944],106:[.19444,.69444,0,0,.35139],107:[0,.69444,0,0,.60694],108:[0,.69444,0,0,.31944],109:[0,.44444,0,0,.95833],110:[0,.44444,0,0,.63889],111:[0,.44444,0,0,.575],112:[.19444,.44444,0,0,.63889],113:[.19444,.44444,0,0,.60694],114:[0,.44444,0,0,.47361],115:[0,.44444,0,0,.45361],116:[0,.63492,0,0,.44722],117:[0,.44444,0,0,.63889],118:[0,.44444,.01597,0,.60694],119:[0,.44444,.01597,0,.83055],120:[0,.44444,0,0,.60694],121:[.19444,.44444,.01597,0,.60694],122:[0,.44444,0,0,.51111],123:[.25,.75,0,0,.575],124:[.25,.75,0,0,.31944],125:[.25,.75,0,0,.575],126:[.35,.34444,0,0,.575],160:[0,0,0,0,.25],163:[0,.69444,0,0,.86853],168:[0,.69444,0,0,.575],172:[0,.44444,0,0,.76666],176:[0,.69444,0,0,.86944],177:[.13333,.63333,0,0,.89444],184:[.17014,0,0,0,.51111],198:[0,.68611,0,0,1.04166],215:[.13333,.63333,0,0,.89444],216:[.04861,.73472,0,0,.89444],223:[0,.69444,0,0,.59722],230:[0,.44444,0,0,.83055],247:[.13333,.63333,0,0,.89444],248:[.09722,.54167,0,0,.575],305:[0,.44444,0,0,.31944],338:[0,.68611,0,0,1.16944],339:[0,.44444,0,0,.89444],567:[.19444,.44444,0,0,.35139],710:[0,.69444,0,0,.575],711:[0,.63194,0,0,.575],713:[0,.59611,0,0,.575],714:[0,.69444,0,0,.575],715:[0,.69444,0,0,.575],728:[0,.69444,0,0,.575],729:[0,.69444,0,0,.31944],730:[0,.69444,0,0,.86944],732:[0,.69444,0,0,.575],733:[0,.69444,0,0,.575],915:[0,.68611,0,0,.69166],916:[0,.68611,0,0,.95833],920:[0,.68611,0,0,.89444],923:[0,.68611,0,0,.80555],926:[0,.68611,0,0,.76666],928:[0,.68611,0,0,.9],931:[0,.68611,0,0,.83055],933:[0,.68611,0,0,.89444],934:[0,.68611,0,0,.83055],936:[0,.68611,0,0,.89444],937:[0,.68611,0,0,.83055],8211:[0,.44444,.03194,0,.575],8212:[0,.44444,.03194,0,1.14999],8216:[0,.69444,0,0,.31944],8217:[0,.69444,0,0,.31944],8220:[0,.69444,0,0,.60278],8221:[0,.69444,0,0,.60278],8224:[.19444,.69444,0,0,.51111],8225:[.19444,.69444,0,0,.51111],8242:[0,.55556,0,0,.34444],8407:[0,.72444,.15486,0,.575],8463:[0,.69444,0,0,.66759],8465:[0,.69444,0,0,.83055],8467:[0,.69444,0,0,.47361],8472:[.19444,.44444,0,0,.74027],8476:[0,.69444,0,0,.83055],8501:[0,.69444,0,0,.70277],8592:[-.10889,.39111,0,0,1.14999],8593:[.19444,.69444,0,0,.575],8594:[-.10889,.39111,0,0,1.14999],8595:[.19444,.69444,0,0,.575],8596:[-.10889,.39111,0,0,1.14999],8597:[.25,.75,0,0,.575],8598:[.19444,.69444,0,0,1.14999],8599:[.19444,.69444,0,0,1.14999],8600:[.19444,.69444,0,0,1.14999],8601:[.19444,.69444,0,0,1.14999],8636:[-.10889,.39111,0,0,1.14999],8637:[-.10889,.39111,0,0,1.14999],8640:[-.10889,.39111,0,0,1.14999],8641:[-.10889,.39111,0,0,1.14999],8656:[-.10889,.39111,0,0,1.14999],8657:[.19444,.69444,0,0,.70277],8658:[-.10889,.39111,0,0,1.14999],8659:[.19444,.69444,0,0,.70277],8660:[-.10889,.39111,0,0,1.14999],8661:[.25,.75,0,0,.70277],8704:[0,.69444,0,0,.63889],8706:[0,.69444,.06389,0,.62847],8707:[0,.69444,0,0,.63889],8709:[.05556,.75,0,0,.575],8711:[0,.68611,0,0,.95833],8712:[.08556,.58556,0,0,.76666],8715:[.08556,.58556,0,0,.76666],8722:[.13333,.63333,0,0,.89444],8723:[.13333,.63333,0,0,.89444],8725:[.25,.75,0,0,.575],8726:[.25,.75,0,0,.575],8727:[-.02778,.47222,0,0,.575],8728:[-.02639,.47361,0,0,.575],8729:[-.02639,.47361,0,0,.575],8730:[.18,.82,0,0,.95833],8733:[0,.44444,0,0,.89444],8734:[0,.44444,0,0,1.14999],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.31944],8741:[.25,.75,0,0,.575],8743:[0,.55556,0,0,.76666],8744:[0,.55556,0,0,.76666],8745:[0,.55556,0,0,.76666],8746:[0,.55556,0,0,.76666],8747:[.19444,.69444,.12778,0,.56875],8764:[-.10889,.39111,0,0,.89444],8768:[.19444,.69444,0,0,.31944],8771:[.00222,.50222,0,0,.89444],8773:[.027,.638,0,0,.894],8776:[.02444,.52444,0,0,.89444],8781:[.00222,.50222,0,0,.89444],8801:[.00222,.50222,0,0,.89444],8804:[.19667,.69667,0,0,.89444],8805:[.19667,.69667,0,0,.89444],8810:[.08556,.58556,0,0,1.14999],8811:[.08556,.58556,0,0,1.14999],8826:[.08556,.58556,0,0,.89444],8827:[.08556,.58556,0,0,.89444],8834:[.08556,.58556,0,0,.89444],8835:[.08556,.58556,0,0,.89444],8838:[.19667,.69667,0,0,.89444],8839:[.19667,.69667,0,0,.89444],8846:[0,.55556,0,0,.76666],8849:[.19667,.69667,0,0,.89444],8850:[.19667,.69667,0,0,.89444],8851:[0,.55556,0,0,.76666],8852:[0,.55556,0,0,.76666],8853:[.13333,.63333,0,0,.89444],8854:[.13333,.63333,0,0,.89444],8855:[.13333,.63333,0,0,.89444],8856:[.13333,.63333,0,0,.89444],8857:[.13333,.63333,0,0,.89444],8866:[0,.69444,0,0,.70277],8867:[0,.69444,0,0,.70277],8868:[0,.69444,0,0,.89444],8869:[0,.69444,0,0,.89444],8900:[-.02639,.47361,0,0,.575],8901:[-.02639,.47361,0,0,.31944],8902:[-.02778,.47222,0,0,.575],8968:[.25,.75,0,0,.51111],8969:[.25,.75,0,0,.51111],8970:[.25,.75,0,0,.51111],8971:[.25,.75,0,0,.51111],8994:[-.13889,.36111,0,0,1.14999],8995:[-.13889,.36111,0,0,1.14999],9651:[.19444,.69444,0,0,1.02222],9657:[-.02778,.47222,0,0,.575],9661:[.19444,.69444,0,0,1.02222],9667:[-.02778,.47222,0,0,.575],9711:[.19444,.69444,0,0,1.14999],9824:[.12963,.69444,0,0,.89444],9825:[.12963,.69444,0,0,.89444],9826:[.12963,.69444,0,0,.89444],9827:[.12963,.69444,0,0,.89444],9837:[0,.75,0,0,.44722],9838:[.19444,.69444,0,0,.44722],9839:[.19444,.69444,0,0,.44722],10216:[.25,.75,0,0,.44722],10217:[.25,.75,0,0,.44722],10815:[0,.68611,0,0,.9],10927:[.19667,.69667,0,0,.89444],10928:[.19667,.69667,0,0,.89444],57376:[.19444,.69444,0,0,0]},"Main-BoldItalic":{32:[0,0,0,0,.25],33:[0,.69444,.11417,0,.38611],34:[0,.69444,.07939,0,.62055],35:[.19444,.69444,.06833,0,.94444],37:[.05556,.75,.12861,0,.94444],38:[0,.69444,.08528,0,.88555],39:[0,.69444,.12945,0,.35555],40:[.25,.75,.15806,0,.47333],41:[.25,.75,.03306,0,.47333],42:[0,.75,.14333,0,.59111],43:[.10333,.60333,.03306,0,.88555],44:[.19444,.14722,0,0,.35555],45:[0,.44444,.02611,0,.41444],46:[0,.14722,0,0,.35555],47:[.25,.75,.15806,0,.59111],48:[0,.64444,.13167,0,.59111],49:[0,.64444,.13167,0,.59111],50:[0,.64444,.13167,0,.59111],51:[0,.64444,.13167,0,.59111],52:[.19444,.64444,.13167,0,.59111],53:[0,.64444,.13167,0,.59111],54:[0,.64444,.13167,0,.59111],55:[.19444,.64444,.13167,0,.59111],56:[0,.64444,.13167,0,.59111],57:[0,.64444,.13167,0,.59111],58:[0,.44444,.06695,0,.35555],59:[.19444,.44444,.06695,0,.35555],61:[-.10889,.39111,.06833,0,.88555],63:[0,.69444,.11472,0,.59111],64:[0,.69444,.09208,0,.88555],65:[0,.68611,0,0,.86555],66:[0,.68611,.0992,0,.81666],67:[0,.68611,.14208,0,.82666],68:[0,.68611,.09062,0,.87555],69:[0,.68611,.11431,0,.75666],70:[0,.68611,.12903,0,.72722],71:[0,.68611,.07347,0,.89527],72:[0,.68611,.17208,0,.8961],73:[0,.68611,.15681,0,.47166],74:[0,.68611,.145,0,.61055],75:[0,.68611,.14208,0,.89499],76:[0,.68611,0,0,.69777],77:[0,.68611,.17208,0,1.07277],78:[0,.68611,.17208,0,.8961],79:[0,.68611,.09062,0,.85499],80:[0,.68611,.0992,0,.78721],81:[.19444,.68611,.09062,0,.85499],82:[0,.68611,.02559,0,.85944],83:[0,.68611,.11264,0,.64999],84:[0,.68611,.12903,0,.7961],85:[0,.68611,.17208,0,.88083],86:[0,.68611,.18625,0,.86555],87:[0,.68611,.18625,0,1.15999],88:[0,.68611,.15681,0,.86555],89:[0,.68611,.19803,0,.86555],90:[0,.68611,.14208,0,.70888],91:[.25,.75,.1875,0,.35611],93:[.25,.75,.09972,0,.35611],94:[0,.69444,.06709,0,.59111],95:[.31,.13444,.09811,0,.59111],97:[0,.44444,.09426,0,.59111],98:[0,.69444,.07861,0,.53222],99:[0,.44444,.05222,0,.53222],100:[0,.69444,.10861,0,.59111],101:[0,.44444,.085,0,.53222],102:[.19444,.69444,.21778,0,.4],103:[.19444,.44444,.105,0,.53222],104:[0,.69444,.09426,0,.59111],105:[0,.69326,.11387,0,.35555],106:[.19444,.69326,.1672,0,.35555],107:[0,.69444,.11111,0,.53222],108:[0,.69444,.10861,0,.29666],109:[0,.44444,.09426,0,.94444],110:[0,.44444,.09426,0,.64999],111:[0,.44444,.07861,0,.59111],112:[.19444,.44444,.07861,0,.59111],113:[.19444,.44444,.105,0,.53222],114:[0,.44444,.11111,0,.50167],115:[0,.44444,.08167,0,.48694],116:[0,.63492,.09639,0,.385],117:[0,.44444,.09426,0,.62055],118:[0,.44444,.11111,0,.53222],119:[0,.44444,.11111,0,.76777],120:[0,.44444,.12583,0,.56055],121:[.19444,.44444,.105,0,.56166],122:[0,.44444,.13889,0,.49055],126:[.35,.34444,.11472,0,.59111],160:[0,0,0,0,.25],168:[0,.69444,.11473,0,.59111],176:[0,.69444,0,0,.94888],184:[.17014,0,0,0,.53222],198:[0,.68611,.11431,0,1.02277],216:[.04861,.73472,.09062,0,.88555],223:[.19444,.69444,.09736,0,.665],230:[0,.44444,.085,0,.82666],248:[.09722,.54167,.09458,0,.59111],305:[0,.44444,.09426,0,.35555],338:[0,.68611,.11431,0,1.14054],339:[0,.44444,.085,0,.82666],567:[.19444,.44444,.04611,0,.385],710:[0,.69444,.06709,0,.59111],711:[0,.63194,.08271,0,.59111],713:[0,.59444,.10444,0,.59111],714:[0,.69444,.08528,0,.59111],715:[0,.69444,0,0,.59111],728:[0,.69444,.10333,0,.59111],729:[0,.69444,.12945,0,.35555],730:[0,.69444,0,0,.94888],732:[0,.69444,.11472,0,.59111],733:[0,.69444,.11472,0,.59111],915:[0,.68611,.12903,0,.69777],916:[0,.68611,0,0,.94444],920:[0,.68611,.09062,0,.88555],923:[0,.68611,0,0,.80666],926:[0,.68611,.15092,0,.76777],928:[0,.68611,.17208,0,.8961],931:[0,.68611,.11431,0,.82666],933:[0,.68611,.10778,0,.88555],934:[0,.68611,.05632,0,.82666],936:[0,.68611,.10778,0,.88555],937:[0,.68611,.0992,0,.82666],8211:[0,.44444,.09811,0,.59111],8212:[0,.44444,.09811,0,1.18221],8216:[0,.69444,.12945,0,.35555],8217:[0,.69444,.12945,0,.35555],8220:[0,.69444,.16772,0,.62055],8221:[0,.69444,.07939,0,.62055]},"Main-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.12417,0,.30667],34:[0,.69444,.06961,0,.51444],35:[.19444,.69444,.06616,0,.81777],37:[.05556,.75,.13639,0,.81777],38:[0,.69444,.09694,0,.76666],39:[0,.69444,.12417,0,.30667],40:[.25,.75,.16194,0,.40889],41:[.25,.75,.03694,0,.40889],42:[0,.75,.14917,0,.51111],43:[.05667,.56167,.03694,0,.76666],44:[.19444,.10556,0,0,.30667],45:[0,.43056,.02826,0,.35778],46:[0,.10556,0,0,.30667],47:[.25,.75,.16194,0,.51111],48:[0,.64444,.13556,0,.51111],49:[0,.64444,.13556,0,.51111],50:[0,.64444,.13556,0,.51111],51:[0,.64444,.13556,0,.51111],52:[.19444,.64444,.13556,0,.51111],53:[0,.64444,.13556,0,.51111],54:[0,.64444,.13556,0,.51111],55:[.19444,.64444,.13556,0,.51111],56:[0,.64444,.13556,0,.51111],57:[0,.64444,.13556,0,.51111],58:[0,.43056,.0582,0,.30667],59:[.19444,.43056,.0582,0,.30667],61:[-.13313,.36687,.06616,0,.76666],63:[0,.69444,.1225,0,.51111],64:[0,.69444,.09597,0,.76666],65:[0,.68333,0,0,.74333],66:[0,.68333,.10257,0,.70389],67:[0,.68333,.14528,0,.71555],68:[0,.68333,.09403,0,.755],69:[0,.68333,.12028,0,.67833],70:[0,.68333,.13305,0,.65277],71:[0,.68333,.08722,0,.77361],72:[0,.68333,.16389,0,.74333],73:[0,.68333,.15806,0,.38555],74:[0,.68333,.14028,0,.525],75:[0,.68333,.14528,0,.76888],76:[0,.68333,0,0,.62722],77:[0,.68333,.16389,0,.89666],78:[0,.68333,.16389,0,.74333],79:[0,.68333,.09403,0,.76666],80:[0,.68333,.10257,0,.67833],81:[.19444,.68333,.09403,0,.76666],82:[0,.68333,.03868,0,.72944],83:[0,.68333,.11972,0,.56222],84:[0,.68333,.13305,0,.71555],85:[0,.68333,.16389,0,.74333],86:[0,.68333,.18361,0,.74333],87:[0,.68333,.18361,0,.99888],88:[0,.68333,.15806,0,.74333],89:[0,.68333,.19383,0,.74333],90:[0,.68333,.14528,0,.61333],91:[.25,.75,.1875,0,.30667],93:[.25,.75,.10528,0,.30667],94:[0,.69444,.06646,0,.51111],95:[.31,.12056,.09208,0,.51111],97:[0,.43056,.07671,0,.51111],98:[0,.69444,.06312,0,.46],99:[0,.43056,.05653,0,.46],100:[0,.69444,.10333,0,.51111],101:[0,.43056,.07514,0,.46],102:[.19444,.69444,.21194,0,.30667],103:[.19444,.43056,.08847,0,.46],104:[0,.69444,.07671,0,.51111],105:[0,.65536,.1019,0,.30667],106:[.19444,.65536,.14467,0,.30667],107:[0,.69444,.10764,0,.46],108:[0,.69444,.10333,0,.25555],109:[0,.43056,.07671,0,.81777],110:[0,.43056,.07671,0,.56222],111:[0,.43056,.06312,0,.51111],112:[.19444,.43056,.06312,0,.51111],113:[.19444,.43056,.08847,0,.46],114:[0,.43056,.10764,0,.42166],115:[0,.43056,.08208,0,.40889],116:[0,.61508,.09486,0,.33222],117:[0,.43056,.07671,0,.53666],118:[0,.43056,.10764,0,.46],119:[0,.43056,.10764,0,.66444],120:[0,.43056,.12042,0,.46389],121:[.19444,.43056,.08847,0,.48555],122:[0,.43056,.12292,0,.40889],126:[.35,.31786,.11585,0,.51111],160:[0,0,0,0,.25],168:[0,.66786,.10474,0,.51111],176:[0,.69444,0,0,.83129],184:[.17014,0,0,0,.46],198:[0,.68333,.12028,0,.88277],216:[.04861,.73194,.09403,0,.76666],223:[.19444,.69444,.10514,0,.53666],230:[0,.43056,.07514,0,.71555],248:[.09722,.52778,.09194,0,.51111],338:[0,.68333,.12028,0,.98499],339:[0,.43056,.07514,0,.71555],710:[0,.69444,.06646,0,.51111],711:[0,.62847,.08295,0,.51111],713:[0,.56167,.10333,0,.51111],714:[0,.69444,.09694,0,.51111],715:[0,.69444,0,0,.51111],728:[0,.69444,.10806,0,.51111],729:[0,.66786,.11752,0,.30667],730:[0,.69444,0,0,.83129],732:[0,.66786,.11585,0,.51111],733:[0,.69444,.1225,0,.51111],915:[0,.68333,.13305,0,.62722],916:[0,.68333,0,0,.81777],920:[0,.68333,.09403,0,.76666],923:[0,.68333,0,0,.69222],926:[0,.68333,.15294,0,.66444],928:[0,.68333,.16389,0,.74333],931:[0,.68333,.12028,0,.71555],933:[0,.68333,.11111,0,.76666],934:[0,.68333,.05986,0,.71555],936:[0,.68333,.11111,0,.76666],937:[0,.68333,.10257,0,.71555],8211:[0,.43056,.09208,0,.51111],8212:[0,.43056,.09208,0,1.02222],8216:[0,.69444,.12417,0,.30667],8217:[0,.69444,.12417,0,.30667],8220:[0,.69444,.1685,0,.51444],8221:[0,.69444,.06961,0,.51444],8463:[0,.68889,0,0,.54028]},"Main-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.27778],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.77778],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.19444,.10556,0,0,.27778],45:[0,.43056,0,0,.33333],46:[0,.10556,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.64444,0,0,.5],49:[0,.64444,0,0,.5],50:[0,.64444,0,0,.5],51:[0,.64444,0,0,.5],52:[0,.64444,0,0,.5],53:[0,.64444,0,0,.5],54:[0,.64444,0,0,.5],55:[0,.64444,0,0,.5],56:[0,.64444,0,0,.5],57:[0,.64444,0,0,.5],58:[0,.43056,0,0,.27778],59:[.19444,.43056,0,0,.27778],60:[.0391,.5391,0,0,.77778],61:[-.13313,.36687,0,0,.77778],62:[.0391,.5391,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.77778],65:[0,.68333,0,0,.75],66:[0,.68333,0,0,.70834],67:[0,.68333,0,0,.72222],68:[0,.68333,0,0,.76389],69:[0,.68333,0,0,.68056],70:[0,.68333,0,0,.65278],71:[0,.68333,0,0,.78472],72:[0,.68333,0,0,.75],73:[0,.68333,0,0,.36111],74:[0,.68333,0,0,.51389],75:[0,.68333,0,0,.77778],76:[0,.68333,0,0,.625],77:[0,.68333,0,0,.91667],78:[0,.68333,0,0,.75],79:[0,.68333,0,0,.77778],80:[0,.68333,0,0,.68056],81:[.19444,.68333,0,0,.77778],82:[0,.68333,0,0,.73611],83:[0,.68333,0,0,.55556],84:[0,.68333,0,0,.72222],85:[0,.68333,0,0,.75],86:[0,.68333,.01389,0,.75],87:[0,.68333,.01389,0,1.02778],88:[0,.68333,0,0,.75],89:[0,.68333,.025,0,.75],90:[0,.68333,0,0,.61111],91:[.25,.75,0,0,.27778],92:[.25,.75,0,0,.5],93:[.25,.75,0,0,.27778],94:[0,.69444,0,0,.5],95:[.31,.12056,.02778,0,.5],97:[0,.43056,0,0,.5],98:[0,.69444,0,0,.55556],99:[0,.43056,0,0,.44445],100:[0,.69444,0,0,.55556],101:[0,.43056,0,0,.44445],102:[0,.69444,.07778,0,.30556],103:[.19444,.43056,.01389,0,.5],104:[0,.69444,0,0,.55556],105:[0,.66786,0,0,.27778],106:[.19444,.66786,0,0,.30556],107:[0,.69444,0,0,.52778],108:[0,.69444,0,0,.27778],109:[0,.43056,0,0,.83334],110:[0,.43056,0,0,.55556],111:[0,.43056,0,0,.5],112:[.19444,.43056,0,0,.55556],113:[.19444,.43056,0,0,.52778],114:[0,.43056,0,0,.39167],115:[0,.43056,0,0,.39445],116:[0,.61508,0,0,.38889],117:[0,.43056,0,0,.55556],118:[0,.43056,.01389,0,.52778],119:[0,.43056,.01389,0,.72222],120:[0,.43056,0,0,.52778],121:[.19444,.43056,.01389,0,.52778],122:[0,.43056,0,0,.44445],123:[.25,.75,0,0,.5],124:[.25,.75,0,0,.27778],125:[.25,.75,0,0,.5],126:[.35,.31786,0,0,.5],160:[0,0,0,0,.25],163:[0,.69444,0,0,.76909],167:[.19444,.69444,0,0,.44445],168:[0,.66786,0,0,.5],172:[0,.43056,0,0,.66667],176:[0,.69444,0,0,.75],177:[.08333,.58333,0,0,.77778],182:[.19444,.69444,0,0,.61111],184:[.17014,0,0,0,.44445],198:[0,.68333,0,0,.90278],215:[.08333,.58333,0,0,.77778],216:[.04861,.73194,0,0,.77778],223:[0,.69444,0,0,.5],230:[0,.43056,0,0,.72222],247:[.08333,.58333,0,0,.77778],248:[.09722,.52778,0,0,.5],305:[0,.43056,0,0,.27778],338:[0,.68333,0,0,1.01389],339:[0,.43056,0,0,.77778],567:[.19444,.43056,0,0,.30556],710:[0,.69444,0,0,.5],711:[0,.62847,0,0,.5],713:[0,.56778,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.66786,0,0,.27778],730:[0,.69444,0,0,.75],732:[0,.66786,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.68333,0,0,.625],916:[0,.68333,0,0,.83334],920:[0,.68333,0,0,.77778],923:[0,.68333,0,0,.69445],926:[0,.68333,0,0,.66667],928:[0,.68333,0,0,.75],931:[0,.68333,0,0,.72222],933:[0,.68333,0,0,.77778],934:[0,.68333,0,0,.72222],936:[0,.68333,0,0,.77778],937:[0,.68333,0,0,.72222],8211:[0,.43056,.02778,0,.5],8212:[0,.43056,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5],8224:[.19444,.69444,0,0,.44445],8225:[.19444,.69444,0,0,.44445],8230:[0,.123,0,0,1.172],8242:[0,.55556,0,0,.275],8407:[0,.71444,.15382,0,.5],8463:[0,.68889,0,0,.54028],8465:[0,.69444,0,0,.72222],8467:[0,.69444,0,.11111,.41667],8472:[.19444,.43056,0,.11111,.63646],8476:[0,.69444,0,0,.72222],8501:[0,.69444,0,0,.61111],8592:[-.13313,.36687,0,0,1],8593:[.19444,.69444,0,0,.5],8594:[-.13313,.36687,0,0,1],8595:[.19444,.69444,0,0,.5],8596:[-.13313,.36687,0,0,1],8597:[.25,.75,0,0,.5],8598:[.19444,.69444,0,0,1],8599:[.19444,.69444,0,0,1],8600:[.19444,.69444,0,0,1],8601:[.19444,.69444,0,0,1],8614:[.011,.511,0,0,1],8617:[.011,.511,0,0,1.126],8618:[.011,.511,0,0,1.126],8636:[-.13313,.36687,0,0,1],8637:[-.13313,.36687,0,0,1],8640:[-.13313,.36687,0,0,1],8641:[-.13313,.36687,0,0,1],8652:[.011,.671,0,0,1],8656:[-.13313,.36687,0,0,1],8657:[.19444,.69444,0,0,.61111],8658:[-.13313,.36687,0,0,1],8659:[.19444,.69444,0,0,.61111],8660:[-.13313,.36687,0,0,1],8661:[.25,.75,0,0,.61111],8704:[0,.69444,0,0,.55556],8706:[0,.69444,.05556,.08334,.5309],8707:[0,.69444,0,0,.55556],8709:[.05556,.75,0,0,.5],8711:[0,.68333,0,0,.83334],8712:[.0391,.5391,0,0,.66667],8715:[.0391,.5391,0,0,.66667],8722:[.08333,.58333,0,0,.77778],8723:[.08333,.58333,0,0,.77778],8725:[.25,.75,0,0,.5],8726:[.25,.75,0,0,.5],8727:[-.03472,.46528,0,0,.5],8728:[-.05555,.44445,0,0,.5],8729:[-.05555,.44445,0,0,.5],8730:[.2,.8,0,0,.83334],8733:[0,.43056,0,0,.77778],8734:[0,.43056,0,0,1],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.27778],8741:[.25,.75,0,0,.5],8743:[0,.55556,0,0,.66667],8744:[0,.55556,0,0,.66667],8745:[0,.55556,0,0,.66667],8746:[0,.55556,0,0,.66667],8747:[.19444,.69444,.11111,0,.41667],8764:[-.13313,.36687,0,0,.77778],8768:[.19444,.69444,0,0,.27778],8771:[-.03625,.46375,0,0,.77778],8773:[-.022,.589,0,0,.778],8776:[-.01688,.48312,0,0,.77778],8781:[-.03625,.46375,0,0,.77778],8784:[-.133,.673,0,0,.778],8801:[-.03625,.46375,0,0,.77778],8804:[.13597,.63597,0,0,.77778],8805:[.13597,.63597,0,0,.77778],8810:[.0391,.5391,0,0,1],8811:[.0391,.5391,0,0,1],8826:[.0391,.5391,0,0,.77778],8827:[.0391,.5391,0,0,.77778],8834:[.0391,.5391,0,0,.77778],8835:[.0391,.5391,0,0,.77778],8838:[.13597,.63597,0,0,.77778],8839:[.13597,.63597,0,0,.77778],8846:[0,.55556,0,0,.66667],8849:[.13597,.63597,0,0,.77778],8850:[.13597,.63597,0,0,.77778],8851:[0,.55556,0,0,.66667],8852:[0,.55556,0,0,.66667],8853:[.08333,.58333,0,0,.77778],8854:[.08333,.58333,0,0,.77778],8855:[.08333,.58333,0,0,.77778],8856:[.08333,.58333,0,0,.77778],8857:[.08333,.58333,0,0,.77778],8866:[0,.69444,0,0,.61111],8867:[0,.69444,0,0,.61111],8868:[0,.69444,0,0,.77778],8869:[0,.69444,0,0,.77778],8872:[.249,.75,0,0,.867],8900:[-.05555,.44445,0,0,.5],8901:[-.05555,.44445,0,0,.27778],8902:[-.03472,.46528,0,0,.5],8904:[.005,.505,0,0,.9],8942:[.03,.903,0,0,.278],8943:[-.19,.313,0,0,1.172],8945:[-.1,.823,0,0,1.282],8968:[.25,.75,0,0,.44445],8969:[.25,.75,0,0,.44445],8970:[.25,.75,0,0,.44445],8971:[.25,.75,0,0,.44445],8994:[-.14236,.35764,0,0,1],8995:[-.14236,.35764,0,0,1],9136:[.244,.744,0,0,.412],9137:[.244,.745,0,0,.412],9651:[.19444,.69444,0,0,.88889],9657:[-.03472,.46528,0,0,.5],9661:[.19444,.69444,0,0,.88889],9667:[-.03472,.46528,0,0,.5],9711:[.19444,.69444,0,0,1],9824:[.12963,.69444,0,0,.77778],9825:[.12963,.69444,0,0,.77778],9826:[.12963,.69444,0,0,.77778],9827:[.12963,.69444,0,0,.77778],9837:[0,.75,0,0,.38889],9838:[.19444,.69444,0,0,.38889],9839:[.19444,.69444,0,0,.38889],10216:[.25,.75,0,0,.38889],10217:[.25,.75,0,0,.38889],10222:[.244,.744,0,0,.412],10223:[.244,.745,0,0,.412],10229:[.011,.511,0,0,1.609],10230:[.011,.511,0,0,1.638],10231:[.011,.511,0,0,1.859],10232:[.024,.525,0,0,1.609],10233:[.024,.525,0,0,1.638],10234:[.024,.525,0,0,1.858],10236:[.011,.511,0,0,1.638],10815:[0,.68333,0,0,.75],10927:[.13597,.63597,0,0,.77778],10928:[.13597,.63597,0,0,.77778],57376:[.19444,.69444,0,0,0]},"Math-BoldItalic":{32:[0,0,0,0,.25],48:[0,.44444,0,0,.575],49:[0,.44444,0,0,.575],50:[0,.44444,0,0,.575],51:[.19444,.44444,0,0,.575],52:[.19444,.44444,0,0,.575],53:[.19444,.44444,0,0,.575],54:[0,.64444,0,0,.575],55:[.19444,.44444,0,0,.575],56:[0,.64444,0,0,.575],57:[.19444,.44444,0,0,.575],65:[0,.68611,0,0,.86944],66:[0,.68611,.04835,0,.8664],67:[0,.68611,.06979,0,.81694],68:[0,.68611,.03194,0,.93812],69:[0,.68611,.05451,0,.81007],70:[0,.68611,.15972,0,.68889],71:[0,.68611,0,0,.88673],72:[0,.68611,.08229,0,.98229],73:[0,.68611,.07778,0,.51111],74:[0,.68611,.10069,0,.63125],75:[0,.68611,.06979,0,.97118],76:[0,.68611,0,0,.75555],77:[0,.68611,.11424,0,1.14201],78:[0,.68611,.11424,0,.95034],79:[0,.68611,.03194,0,.83666],80:[0,.68611,.15972,0,.72309],81:[.19444,.68611,0,0,.86861],82:[0,.68611,.00421,0,.87235],83:[0,.68611,.05382,0,.69271],84:[0,.68611,.15972,0,.63663],85:[0,.68611,.11424,0,.80027],86:[0,.68611,.25555,0,.67778],87:[0,.68611,.15972,0,1.09305],88:[0,.68611,.07778,0,.94722],89:[0,.68611,.25555,0,.67458],90:[0,.68611,.06979,0,.77257],97:[0,.44444,0,0,.63287],98:[0,.69444,0,0,.52083],99:[0,.44444,0,0,.51342],100:[0,.69444,0,0,.60972],101:[0,.44444,0,0,.55361],102:[.19444,.69444,.11042,0,.56806],103:[.19444,.44444,.03704,0,.5449],104:[0,.69444,0,0,.66759],105:[0,.69326,0,0,.4048],106:[.19444,.69326,.0622,0,.47083],107:[0,.69444,.01852,0,.6037],108:[0,.69444,.0088,0,.34815],109:[0,.44444,0,0,1.0324],110:[0,.44444,0,0,.71296],111:[0,.44444,0,0,.58472],112:[.19444,.44444,0,0,.60092],113:[.19444,.44444,.03704,0,.54213],114:[0,.44444,.03194,0,.5287],115:[0,.44444,0,0,.53125],116:[0,.63492,0,0,.41528],117:[0,.44444,0,0,.68102],118:[0,.44444,.03704,0,.56666],119:[0,.44444,.02778,0,.83148],120:[0,.44444,0,0,.65903],121:[.19444,.44444,.03704,0,.59028],122:[0,.44444,.04213,0,.55509],160:[0,0,0,0,.25],915:[0,.68611,.15972,0,.65694],916:[0,.68611,0,0,.95833],920:[0,.68611,.03194,0,.86722],923:[0,.68611,0,0,.80555],926:[0,.68611,.07458,0,.84125],928:[0,.68611,.08229,0,.98229],931:[0,.68611,.05451,0,.88507],933:[0,.68611,.15972,0,.67083],934:[0,.68611,0,0,.76666],936:[0,.68611,.11653,0,.71402],937:[0,.68611,.04835,0,.8789],945:[0,.44444,0,0,.76064],946:[.19444,.69444,.03403,0,.65972],947:[.19444,.44444,.06389,0,.59003],948:[0,.69444,.03819,0,.52222],949:[0,.44444,0,0,.52882],950:[.19444,.69444,.06215,0,.50833],951:[.19444,.44444,.03704,0,.6],952:[0,.69444,.03194,0,.5618],953:[0,.44444,0,0,.41204],954:[0,.44444,0,0,.66759],955:[0,.69444,0,0,.67083],956:[.19444,.44444,0,0,.70787],957:[0,.44444,.06898,0,.57685],958:[.19444,.69444,.03021,0,.50833],959:[0,.44444,0,0,.58472],960:[0,.44444,.03704,0,.68241],961:[.19444,.44444,0,0,.6118],962:[.09722,.44444,.07917,0,.42361],963:[0,.44444,.03704,0,.68588],964:[0,.44444,.13472,0,.52083],965:[0,.44444,.03704,0,.63055],966:[.19444,.44444,0,0,.74722],967:[.19444,.44444,0,0,.71805],968:[.19444,.69444,.03704,0,.75833],969:[0,.44444,.03704,0,.71782],977:[0,.69444,0,0,.69155],981:[.19444,.69444,0,0,.7125],982:[0,.44444,.03194,0,.975],1009:[.19444,.44444,0,0,.6118],1013:[0,.44444,0,0,.48333],57649:[0,.44444,0,0,.39352],57911:[.19444,.44444,0,0,.43889]},"Math-Italic":{32:[0,0,0,0,.25],48:[0,.43056,0,0,.5],49:[0,.43056,0,0,.5],50:[0,.43056,0,0,.5],51:[.19444,.43056,0,0,.5],52:[.19444,.43056,0,0,.5],53:[.19444,.43056,0,0,.5],54:[0,.64444,0,0,.5],55:[.19444,.43056,0,0,.5],56:[0,.64444,0,0,.5],57:[.19444,.43056,0,0,.5],65:[0,.68333,0,.13889,.75],66:[0,.68333,.05017,.08334,.75851],67:[0,.68333,.07153,.08334,.71472],68:[0,.68333,.02778,.05556,.82792],69:[0,.68333,.05764,.08334,.7382],70:[0,.68333,.13889,.08334,.64306],71:[0,.68333,0,.08334,.78625],72:[0,.68333,.08125,.05556,.83125],73:[0,.68333,.07847,.11111,.43958],74:[0,.68333,.09618,.16667,.55451],75:[0,.68333,.07153,.05556,.84931],76:[0,.68333,0,.02778,.68056],77:[0,.68333,.10903,.08334,.97014],78:[0,.68333,.10903,.08334,.80347],79:[0,.68333,.02778,.08334,.76278],80:[0,.68333,.13889,.08334,.64201],81:[.19444,.68333,0,.08334,.79056],82:[0,.68333,.00773,.08334,.75929],83:[0,.68333,.05764,.08334,.6132],84:[0,.68333,.13889,.08334,.58438],85:[0,.68333,.10903,.02778,.68278],86:[0,.68333,.22222,0,.58333],87:[0,.68333,.13889,0,.94445],88:[0,.68333,.07847,.08334,.82847],89:[0,.68333,.22222,0,.58056],90:[0,.68333,.07153,.08334,.68264],97:[0,.43056,0,0,.52859],98:[0,.69444,0,0,.42917],99:[0,.43056,0,.05556,.43276],100:[0,.69444,0,.16667,.52049],101:[0,.43056,0,.05556,.46563],102:[.19444,.69444,.10764,.16667,.48959],103:[.19444,.43056,.03588,.02778,.47697],104:[0,.69444,0,0,.57616],105:[0,.65952,0,0,.34451],106:[.19444,.65952,.05724,0,.41181],107:[0,.69444,.03148,0,.5206],108:[0,.69444,.01968,.08334,.29838],109:[0,.43056,0,0,.87801],110:[0,.43056,0,0,.60023],111:[0,.43056,0,.05556,.48472],112:[.19444,.43056,0,.08334,.50313],113:[.19444,.43056,.03588,.08334,.44641],114:[0,.43056,.02778,.05556,.45116],115:[0,.43056,0,.05556,.46875],116:[0,.61508,0,.08334,.36111],117:[0,.43056,0,.02778,.57246],118:[0,.43056,.03588,.02778,.48472],119:[0,.43056,.02691,.08334,.71592],120:[0,.43056,0,.02778,.57153],121:[.19444,.43056,.03588,.05556,.49028],122:[0,.43056,.04398,.05556,.46505],160:[0,0,0,0,.25],915:[0,.68333,.13889,.08334,.61528],916:[0,.68333,0,.16667,.83334],920:[0,.68333,.02778,.08334,.76278],923:[0,.68333,0,.16667,.69445],926:[0,.68333,.07569,.08334,.74236],928:[0,.68333,.08125,.05556,.83125],931:[0,.68333,.05764,.08334,.77986],933:[0,.68333,.13889,.05556,.58333],934:[0,.68333,0,.08334,.66667],936:[0,.68333,.11,.05556,.61222],937:[0,.68333,.05017,.08334,.7724],945:[0,.43056,.0037,.02778,.6397],946:[.19444,.69444,.05278,.08334,.56563],947:[.19444,.43056,.05556,0,.51773],948:[0,.69444,.03785,.05556,.44444],949:[0,.43056,0,.08334,.46632],950:[.19444,.69444,.07378,.08334,.4375],951:[.19444,.43056,.03588,.05556,.49653],952:[0,.69444,.02778,.08334,.46944],953:[0,.43056,0,.05556,.35394],954:[0,.43056,0,0,.57616],955:[0,.69444,0,0,.58334],956:[.19444,.43056,0,.02778,.60255],957:[0,.43056,.06366,.02778,.49398],958:[.19444,.69444,.04601,.11111,.4375],959:[0,.43056,0,.05556,.48472],960:[0,.43056,.03588,0,.57003],961:[.19444,.43056,0,.08334,.51702],962:[.09722,.43056,.07986,.08334,.36285],963:[0,.43056,.03588,0,.57141],964:[0,.43056,.1132,.02778,.43715],965:[0,.43056,.03588,.02778,.54028],966:[.19444,.43056,0,.08334,.65417],967:[.19444,.43056,0,.05556,.62569],968:[.19444,.69444,.03588,.11111,.65139],969:[0,.43056,.03588,0,.62245],977:[0,.69444,0,.08334,.59144],981:[.19444,.69444,0,.08334,.59583],982:[0,.43056,.02778,0,.82813],1009:[.19444,.43056,0,.08334,.51702],1013:[0,.43056,0,.05556,.4059],57649:[0,.43056,0,.02778,.32246],57911:[.19444,.43056,0,.08334,.38403]},"SansSerif-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.36667],34:[0,.69444,0,0,.55834],35:[.19444,.69444,0,0,.91667],36:[.05556,.75,0,0,.55],37:[.05556,.75,0,0,1.02912],38:[0,.69444,0,0,.83056],39:[0,.69444,0,0,.30556],40:[.25,.75,0,0,.42778],41:[.25,.75,0,0,.42778],42:[0,.75,0,0,.55],43:[.11667,.61667,0,0,.85556],44:[.10556,.13056,0,0,.30556],45:[0,.45833,0,0,.36667],46:[0,.13056,0,0,.30556],47:[.25,.75,0,0,.55],48:[0,.69444,0,0,.55],49:[0,.69444,0,0,.55],50:[0,.69444,0,0,.55],51:[0,.69444,0,0,.55],52:[0,.69444,0,0,.55],53:[0,.69444,0,0,.55],54:[0,.69444,0,0,.55],55:[0,.69444,0,0,.55],56:[0,.69444,0,0,.55],57:[0,.69444,0,0,.55],58:[0,.45833,0,0,.30556],59:[.10556,.45833,0,0,.30556],61:[-.09375,.40625,0,0,.85556],63:[0,.69444,0,0,.51945],64:[0,.69444,0,0,.73334],65:[0,.69444,0,0,.73334],66:[0,.69444,0,0,.73334],67:[0,.69444,0,0,.70278],68:[0,.69444,0,0,.79445],69:[0,.69444,0,0,.64167],70:[0,.69444,0,0,.61111],71:[0,.69444,0,0,.73334],72:[0,.69444,0,0,.79445],73:[0,.69444,0,0,.33056],74:[0,.69444,0,0,.51945],75:[0,.69444,0,0,.76389],76:[0,.69444,0,0,.58056],77:[0,.69444,0,0,.97778],78:[0,.69444,0,0,.79445],79:[0,.69444,0,0,.79445],80:[0,.69444,0,0,.70278],81:[.10556,.69444,0,0,.79445],82:[0,.69444,0,0,.70278],83:[0,.69444,0,0,.61111],84:[0,.69444,0,0,.73334],85:[0,.69444,0,0,.76389],86:[0,.69444,.01528,0,.73334],87:[0,.69444,.01528,0,1.03889],88:[0,.69444,0,0,.73334],89:[0,.69444,.0275,0,.73334],90:[0,.69444,0,0,.67223],91:[.25,.75,0,0,.34306],93:[.25,.75,0,0,.34306],94:[0,.69444,0,0,.55],95:[.35,.10833,.03056,0,.55],97:[0,.45833,0,0,.525],98:[0,.69444,0,0,.56111],99:[0,.45833,0,0,.48889],100:[0,.69444,0,0,.56111],101:[0,.45833,0,0,.51111],102:[0,.69444,.07639,0,.33611],103:[.19444,.45833,.01528,0,.55],104:[0,.69444,0,0,.56111],105:[0,.69444,0,0,.25556],106:[.19444,.69444,0,0,.28611],107:[0,.69444,0,0,.53056],108:[0,.69444,0,0,.25556],109:[0,.45833,0,0,.86667],110:[0,.45833,0,0,.56111],111:[0,.45833,0,0,.55],112:[.19444,.45833,0,0,.56111],113:[.19444,.45833,0,0,.56111],114:[0,.45833,.01528,0,.37222],115:[0,.45833,0,0,.42167],116:[0,.58929,0,0,.40417],117:[0,.45833,0,0,.56111],118:[0,.45833,.01528,0,.5],119:[0,.45833,.01528,0,.74445],120:[0,.45833,0,0,.5],121:[.19444,.45833,.01528,0,.5],122:[0,.45833,0,0,.47639],126:[.35,.34444,0,0,.55],160:[0,0,0,0,.25],168:[0,.69444,0,0,.55],176:[0,.69444,0,0,.73334],180:[0,.69444,0,0,.55],184:[.17014,0,0,0,.48889],305:[0,.45833,0,0,.25556],567:[.19444,.45833,0,0,.28611],710:[0,.69444,0,0,.55],711:[0,.63542,0,0,.55],713:[0,.63778,0,0,.55],728:[0,.69444,0,0,.55],729:[0,.69444,0,0,.30556],730:[0,.69444,0,0,.73334],732:[0,.69444,0,0,.55],733:[0,.69444,0,0,.55],915:[0,.69444,0,0,.58056],916:[0,.69444,0,0,.91667],920:[0,.69444,0,0,.85556],923:[0,.69444,0,0,.67223],926:[0,.69444,0,0,.73334],928:[0,.69444,0,0,.79445],931:[0,.69444,0,0,.79445],933:[0,.69444,0,0,.85556],934:[0,.69444,0,0,.79445],936:[0,.69444,0,0,.85556],937:[0,.69444,0,0,.79445],8211:[0,.45833,.03056,0,.55],8212:[0,.45833,.03056,0,1.10001],8216:[0,.69444,0,0,.30556],8217:[0,.69444,0,0,.30556],8220:[0,.69444,0,0,.55834],8221:[0,.69444,0,0,.55834]},"SansSerif-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.05733,0,.31945],34:[0,.69444,.00316,0,.5],35:[.19444,.69444,.05087,0,.83334],36:[.05556,.75,.11156,0,.5],37:[.05556,.75,.03126,0,.83334],38:[0,.69444,.03058,0,.75834],39:[0,.69444,.07816,0,.27778],40:[.25,.75,.13164,0,.38889],41:[.25,.75,.02536,0,.38889],42:[0,.75,.11775,0,.5],43:[.08333,.58333,.02536,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,.01946,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,.13164,0,.5],48:[0,.65556,.11156,0,.5],49:[0,.65556,.11156,0,.5],50:[0,.65556,.11156,0,.5],51:[0,.65556,.11156,0,.5],52:[0,.65556,.11156,0,.5],53:[0,.65556,.11156,0,.5],54:[0,.65556,.11156,0,.5],55:[0,.65556,.11156,0,.5],56:[0,.65556,.11156,0,.5],57:[0,.65556,.11156,0,.5],58:[0,.44444,.02502,0,.27778],59:[.125,.44444,.02502,0,.27778],61:[-.13,.37,.05087,0,.77778],63:[0,.69444,.11809,0,.47222],64:[0,.69444,.07555,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,.08293,0,.66667],67:[0,.69444,.11983,0,.63889],68:[0,.69444,.07555,0,.72223],69:[0,.69444,.11983,0,.59722],70:[0,.69444,.13372,0,.56945],71:[0,.69444,.11983,0,.66667],72:[0,.69444,.08094,0,.70834],73:[0,.69444,.13372,0,.27778],74:[0,.69444,.08094,0,.47222],75:[0,.69444,.11983,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,.08094,0,.875],78:[0,.69444,.08094,0,.70834],79:[0,.69444,.07555,0,.73611],80:[0,.69444,.08293,0,.63889],81:[.125,.69444,.07555,0,.73611],82:[0,.69444,.08293,0,.64584],83:[0,.69444,.09205,0,.55556],84:[0,.69444,.13372,0,.68056],85:[0,.69444,.08094,0,.6875],86:[0,.69444,.1615,0,.66667],87:[0,.69444,.1615,0,.94445],88:[0,.69444,.13372,0,.66667],89:[0,.69444,.17261,0,.66667],90:[0,.69444,.11983,0,.61111],91:[.25,.75,.15942,0,.28889],93:[.25,.75,.08719,0,.28889],94:[0,.69444,.0799,0,.5],95:[.35,.09444,.08616,0,.5],97:[0,.44444,.00981,0,.48056],98:[0,.69444,.03057,0,.51667],99:[0,.44444,.08336,0,.44445],100:[0,.69444,.09483,0,.51667],101:[0,.44444,.06778,0,.44445],102:[0,.69444,.21705,0,.30556],103:[.19444,.44444,.10836,0,.5],104:[0,.69444,.01778,0,.51667],105:[0,.67937,.09718,0,.23889],106:[.19444,.67937,.09162,0,.26667],107:[0,.69444,.08336,0,.48889],108:[0,.69444,.09483,0,.23889],109:[0,.44444,.01778,0,.79445],110:[0,.44444,.01778,0,.51667],111:[0,.44444,.06613,0,.5],112:[.19444,.44444,.0389,0,.51667],113:[.19444,.44444,.04169,0,.51667],114:[0,.44444,.10836,0,.34167],115:[0,.44444,.0778,0,.38333],116:[0,.57143,.07225,0,.36111],117:[0,.44444,.04169,0,.51667],118:[0,.44444,.10836,0,.46111],119:[0,.44444,.10836,0,.68334],120:[0,.44444,.09169,0,.46111],121:[.19444,.44444,.10836,0,.46111],122:[0,.44444,.08752,0,.43472],126:[.35,.32659,.08826,0,.5],160:[0,0,0,0,.25],168:[0,.67937,.06385,0,.5],176:[0,.69444,0,0,.73752],184:[.17014,0,0,0,.44445],305:[0,.44444,.04169,0,.23889],567:[.19444,.44444,.04169,0,.26667],710:[0,.69444,.0799,0,.5],711:[0,.63194,.08432,0,.5],713:[0,.60889,.08776,0,.5],714:[0,.69444,.09205,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,.09483,0,.5],729:[0,.67937,.07774,0,.27778],730:[0,.69444,0,0,.73752],732:[0,.67659,.08826,0,.5],733:[0,.69444,.09205,0,.5],915:[0,.69444,.13372,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,.07555,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,.12816,0,.66667],928:[0,.69444,.08094,0,.70834],931:[0,.69444,.11983,0,.72222],933:[0,.69444,.09031,0,.77778],934:[0,.69444,.04603,0,.72222],936:[0,.69444,.09031,0,.77778],937:[0,.69444,.08293,0,.72222],8211:[0,.44444,.08616,0,.5],8212:[0,.44444,.08616,0,1],8216:[0,.69444,.07816,0,.27778],8217:[0,.69444,.07816,0,.27778],8220:[0,.69444,.14205,0,.5],8221:[0,.69444,.00316,0,.5]},"SansSerif-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.31945],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.75834],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,0,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.65556,0,0,.5],49:[0,.65556,0,0,.5],50:[0,.65556,0,0,.5],51:[0,.65556,0,0,.5],52:[0,.65556,0,0,.5],53:[0,.65556,0,0,.5],54:[0,.65556,0,0,.5],55:[0,.65556,0,0,.5],56:[0,.65556,0,0,.5],57:[0,.65556,0,0,.5],58:[0,.44444,0,0,.27778],59:[.125,.44444,0,0,.27778],61:[-.13,.37,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,0,0,.66667],67:[0,.69444,0,0,.63889],68:[0,.69444,0,0,.72223],69:[0,.69444,0,0,.59722],70:[0,.69444,0,0,.56945],71:[0,.69444,0,0,.66667],72:[0,.69444,0,0,.70834],73:[0,.69444,0,0,.27778],74:[0,.69444,0,0,.47222],75:[0,.69444,0,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,0,0,.875],78:[0,.69444,0,0,.70834],79:[0,.69444,0,0,.73611],80:[0,.69444,0,0,.63889],81:[.125,.69444,0,0,.73611],82:[0,.69444,0,0,.64584],83:[0,.69444,0,0,.55556],84:[0,.69444,0,0,.68056],85:[0,.69444,0,0,.6875],86:[0,.69444,.01389,0,.66667],87:[0,.69444,.01389,0,.94445],88:[0,.69444,0,0,.66667],89:[0,.69444,.025,0,.66667],90:[0,.69444,0,0,.61111],91:[.25,.75,0,0,.28889],93:[.25,.75,0,0,.28889],94:[0,.69444,0,0,.5],95:[.35,.09444,.02778,0,.5],97:[0,.44444,0,0,.48056],98:[0,.69444,0,0,.51667],99:[0,.44444,0,0,.44445],100:[0,.69444,0,0,.51667],101:[0,.44444,0,0,.44445],102:[0,.69444,.06944,0,.30556],103:[.19444,.44444,.01389,0,.5],104:[0,.69444,0,0,.51667],105:[0,.67937,0,0,.23889],106:[.19444,.67937,0,0,.26667],107:[0,.69444,0,0,.48889],108:[0,.69444,0,0,.23889],109:[0,.44444,0,0,.79445],110:[0,.44444,0,0,.51667],111:[0,.44444,0,0,.5],112:[.19444,.44444,0,0,.51667],113:[.19444,.44444,0,0,.51667],114:[0,.44444,.01389,0,.34167],115:[0,.44444,0,0,.38333],116:[0,.57143,0,0,.36111],117:[0,.44444,0,0,.51667],118:[0,.44444,.01389,0,.46111],119:[0,.44444,.01389,0,.68334],120:[0,.44444,0,0,.46111],121:[.19444,.44444,.01389,0,.46111],122:[0,.44444,0,0,.43472],126:[.35,.32659,0,0,.5],160:[0,0,0,0,.25],168:[0,.67937,0,0,.5],176:[0,.69444,0,0,.66667],184:[.17014,0,0,0,.44445],305:[0,.44444,0,0,.23889],567:[.19444,.44444,0,0,.26667],710:[0,.69444,0,0,.5],711:[0,.63194,0,0,.5],713:[0,.60889,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.67937,0,0,.27778],730:[0,.69444,0,0,.66667],732:[0,.67659,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.69444,0,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,0,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,0,0,.66667],928:[0,.69444,0,0,.70834],931:[0,.69444,0,0,.72222],933:[0,.69444,0,0,.77778],934:[0,.69444,0,0,.72222],936:[0,.69444,0,0,.77778],937:[0,.69444,0,0,.72222],8211:[0,.44444,.02778,0,.5],8212:[0,.44444,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5]},"Script-Regular":{32:[0,0,0,0,.25],65:[0,.7,.22925,0,.80253],66:[0,.7,.04087,0,.90757],67:[0,.7,.1689,0,.66619],68:[0,.7,.09371,0,.77443],69:[0,.7,.18583,0,.56162],70:[0,.7,.13634,0,.89544],71:[0,.7,.17322,0,.60961],72:[0,.7,.29694,0,.96919],73:[0,.7,.19189,0,.80907],74:[.27778,.7,.19189,0,1.05159],75:[0,.7,.31259,0,.91364],76:[0,.7,.19189,0,.87373],77:[0,.7,.15981,0,1.08031],78:[0,.7,.3525,0,.9015],79:[0,.7,.08078,0,.73787],80:[0,.7,.08078,0,1.01262],81:[0,.7,.03305,0,.88282],82:[0,.7,.06259,0,.85],83:[0,.7,.19189,0,.86767],84:[0,.7,.29087,0,.74697],85:[0,.7,.25815,0,.79996],86:[0,.7,.27523,0,.62204],87:[0,.7,.27523,0,.80532],88:[0,.7,.26006,0,.94445],89:[0,.7,.2939,0,.70961],90:[0,.7,.24037,0,.8212],160:[0,0,0,0,.25]},"Size1-Regular":{32:[0,0,0,0,.25],40:[.35001,.85,0,0,.45834],41:[.35001,.85,0,0,.45834],47:[.35001,.85,0,0,.57778],91:[.35001,.85,0,0,.41667],92:[.35001,.85,0,0,.57778],93:[.35001,.85,0,0,.41667],123:[.35001,.85,0,0,.58334],125:[.35001,.85,0,0,.58334],160:[0,0,0,0,.25],710:[0,.72222,0,0,.55556],732:[0,.72222,0,0,.55556],770:[0,.72222,0,0,.55556],771:[0,.72222,0,0,.55556],8214:[-99e-5,.601,0,0,.77778],8593:[1e-5,.6,0,0,.66667],8595:[1e-5,.6,0,0,.66667],8657:[1e-5,.6,0,0,.77778],8659:[1e-5,.6,0,0,.77778],8719:[.25001,.75,0,0,.94445],8720:[.25001,.75,0,0,.94445],8721:[.25001,.75,0,0,1.05556],8730:[.35001,.85,0,0,1],8739:[-.00599,.606,0,0,.33333],8741:[-.00599,.606,0,0,.55556],8747:[.30612,.805,.19445,0,.47222],8748:[.306,.805,.19445,0,.47222],8749:[.306,.805,.19445,0,.47222],8750:[.30612,.805,.19445,0,.47222],8896:[.25001,.75,0,0,.83334],8897:[.25001,.75,0,0,.83334],8898:[.25001,.75,0,0,.83334],8899:[.25001,.75,0,0,.83334],8968:[.35001,.85,0,0,.47222],8969:[.35001,.85,0,0,.47222],8970:[.35001,.85,0,0,.47222],8971:[.35001,.85,0,0,.47222],9168:[-99e-5,.601,0,0,.66667],10216:[.35001,.85,0,0,.47222],10217:[.35001,.85,0,0,.47222],10752:[.25001,.75,0,0,1.11111],10753:[.25001,.75,0,0,1.11111],10754:[.25001,.75,0,0,1.11111],10756:[.25001,.75,0,0,.83334],10758:[.25001,.75,0,0,.83334]},"Size2-Regular":{32:[0,0,0,0,.25],40:[.65002,1.15,0,0,.59722],41:[.65002,1.15,0,0,.59722],47:[.65002,1.15,0,0,.81111],91:[.65002,1.15,0,0,.47222],92:[.65002,1.15,0,0,.81111],93:[.65002,1.15,0,0,.47222],123:[.65002,1.15,0,0,.66667],125:[.65002,1.15,0,0,.66667],160:[0,0,0,0,.25],710:[0,.75,0,0,1],732:[0,.75,0,0,1],770:[0,.75,0,0,1],771:[0,.75,0,0,1],8719:[.55001,1.05,0,0,1.27778],8720:[.55001,1.05,0,0,1.27778],8721:[.55001,1.05,0,0,1.44445],8730:[.65002,1.15,0,0,1],8747:[.86225,1.36,.44445,0,.55556],8748:[.862,1.36,.44445,0,.55556],8749:[.862,1.36,.44445,0,.55556],8750:[.86225,1.36,.44445,0,.55556],8896:[.55001,1.05,0,0,1.11111],8897:[.55001,1.05,0,0,1.11111],8898:[.55001,1.05,0,0,1.11111],8899:[.55001,1.05,0,0,1.11111],8968:[.65002,1.15,0,0,.52778],8969:[.65002,1.15,0,0,.52778],8970:[.65002,1.15,0,0,.52778],8971:[.65002,1.15,0,0,.52778],10216:[.65002,1.15,0,0,.61111],10217:[.65002,1.15,0,0,.61111],10752:[.55001,1.05,0,0,1.51112],10753:[.55001,1.05,0,0,1.51112],10754:[.55001,1.05,0,0,1.51112],10756:[.55001,1.05,0,0,1.11111],10758:[.55001,1.05,0,0,1.11111]},"Size3-Regular":{32:[0,0,0,0,.25],40:[.95003,1.45,0,0,.73611],41:[.95003,1.45,0,0,.73611],47:[.95003,1.45,0,0,1.04445],91:[.95003,1.45,0,0,.52778],92:[.95003,1.45,0,0,1.04445],93:[.95003,1.45,0,0,.52778],123:[.95003,1.45,0,0,.75],125:[.95003,1.45,0,0,.75],160:[0,0,0,0,.25],710:[0,.75,0,0,1.44445],732:[0,.75,0,0,1.44445],770:[0,.75,0,0,1.44445],771:[0,.75,0,0,1.44445],8730:[.95003,1.45,0,0,1],8968:[.95003,1.45,0,0,.58334],8969:[.95003,1.45,0,0,.58334],8970:[.95003,1.45,0,0,.58334],8971:[.95003,1.45,0,0,.58334],10216:[.95003,1.45,0,0,.75],10217:[.95003,1.45,0,0,.75]},"Size4-Regular":{32:[0,0,0,0,.25],40:[1.25003,1.75,0,0,.79167],41:[1.25003,1.75,0,0,.79167],47:[1.25003,1.75,0,0,1.27778],91:[1.25003,1.75,0,0,.58334],92:[1.25003,1.75,0,0,1.27778],93:[1.25003,1.75,0,0,.58334],123:[1.25003,1.75,0,0,.80556],125:[1.25003,1.75,0,0,.80556],160:[0,0,0,0,.25],710:[0,.825,0,0,1.8889],732:[0,.825,0,0,1.8889],770:[0,.825,0,0,1.8889],771:[0,.825,0,0,1.8889],8730:[1.25003,1.75,0,0,1],8968:[1.25003,1.75,0,0,.63889],8969:[1.25003,1.75,0,0,.63889],8970:[1.25003,1.75,0,0,.63889],8971:[1.25003,1.75,0,0,.63889],9115:[.64502,1.155,0,0,.875],9116:[1e-5,.6,0,0,.875],9117:[.64502,1.155,0,0,.875],9118:[.64502,1.155,0,0,.875],9119:[1e-5,.6,0,0,.875],9120:[.64502,1.155,0,0,.875],9121:[.64502,1.155,0,0,.66667],9122:[-99e-5,.601,0,0,.66667],9123:[.64502,1.155,0,0,.66667],9124:[.64502,1.155,0,0,.66667],9125:[-99e-5,.601,0,0,.66667],9126:[.64502,1.155,0,0,.66667],9127:[1e-5,.9,0,0,.88889],9128:[.65002,1.15,0,0,.88889],9129:[.90001,0,0,0,.88889],9130:[0,.3,0,0,.88889],9131:[1e-5,.9,0,0,.88889],9132:[.65002,1.15,0,0,.88889],9133:[.90001,0,0,0,.88889],9143:[.88502,.915,0,0,1.05556],10216:[1.25003,1.75,0,0,.80556],10217:[1.25003,1.75,0,0,.80556],57344:[-.00499,.605,0,0,1.05556],57345:[-.00499,.605,0,0,1.05556],57680:[0,.12,0,0,.45],57681:[0,.12,0,0,.45],57682:[0,.12,0,0,.45],57683:[0,.12,0,0,.45]},"Typewriter-Regular":{32:[0,0,0,0,.525],33:[0,.61111,0,0,.525],34:[0,.61111,0,0,.525],35:[0,.61111,0,0,.525],36:[.08333,.69444,0,0,.525],37:[.08333,.69444,0,0,.525],38:[0,.61111,0,0,.525],39:[0,.61111,0,0,.525],40:[.08333,.69444,0,0,.525],41:[.08333,.69444,0,0,.525],42:[0,.52083,0,0,.525],43:[-.08056,.53055,0,0,.525],44:[.13889,.125,0,0,.525],45:[-.08056,.53055,0,0,.525],46:[0,.125,0,0,.525],47:[.08333,.69444,0,0,.525],48:[0,.61111,0,0,.525],49:[0,.61111,0,0,.525],50:[0,.61111,0,0,.525],51:[0,.61111,0,0,.525],52:[0,.61111,0,0,.525],53:[0,.61111,0,0,.525],54:[0,.61111,0,0,.525],55:[0,.61111,0,0,.525],56:[0,.61111,0,0,.525],57:[0,.61111,0,0,.525],58:[0,.43056,0,0,.525],59:[.13889,.43056,0,0,.525],60:[-.05556,.55556,0,0,.525],61:[-.19549,.41562,0,0,.525],62:[-.05556,.55556,0,0,.525],63:[0,.61111,0,0,.525],64:[0,.61111,0,0,.525],65:[0,.61111,0,0,.525],66:[0,.61111,0,0,.525],67:[0,.61111,0,0,.525],68:[0,.61111,0,0,.525],69:[0,.61111,0,0,.525],70:[0,.61111,0,0,.525],71:[0,.61111,0,0,.525],72:[0,.61111,0,0,.525],73:[0,.61111,0,0,.525],74:[0,.61111,0,0,.525],75:[0,.61111,0,0,.525],76:[0,.61111,0,0,.525],77:[0,.61111,0,0,.525],78:[0,.61111,0,0,.525],79:[0,.61111,0,0,.525],80:[0,.61111,0,0,.525],81:[.13889,.61111,0,0,.525],82:[0,.61111,0,0,.525],83:[0,.61111,0,0,.525],84:[0,.61111,0,0,.525],85:[0,.61111,0,0,.525],86:[0,.61111,0,0,.525],87:[0,.61111,0,0,.525],88:[0,.61111,0,0,.525],89:[0,.61111,0,0,.525],90:[0,.61111,0,0,.525],91:[.08333,.69444,0,0,.525],92:[.08333,.69444,0,0,.525],93:[.08333,.69444,0,0,.525],94:[0,.61111,0,0,.525],95:[.09514,0,0,0,.525],96:[0,.61111,0,0,.525],97:[0,.43056,0,0,.525],98:[0,.61111,0,0,.525],99:[0,.43056,0,0,.525],100:[0,.61111,0,0,.525],101:[0,.43056,0,0,.525],102:[0,.61111,0,0,.525],103:[.22222,.43056,0,0,.525],104:[0,.61111,0,0,.525],105:[0,.61111,0,0,.525],106:[.22222,.61111,0,0,.525],107:[0,.61111,0,0,.525],108:[0,.61111,0,0,.525],109:[0,.43056,0,0,.525],110:[0,.43056,0,0,.525],111:[0,.43056,0,0,.525],112:[.22222,.43056,0,0,.525],113:[.22222,.43056,0,0,.525],114:[0,.43056,0,0,.525],115:[0,.43056,0,0,.525],116:[0,.55358,0,0,.525],117:[0,.43056,0,0,.525],118:[0,.43056,0,0,.525],119:[0,.43056,0,0,.525],120:[0,.43056,0,0,.525],121:[.22222,.43056,0,0,.525],122:[0,.43056,0,0,.525],123:[.08333,.69444,0,0,.525],124:[.08333,.69444,0,0,.525],125:[.08333,.69444,0,0,.525],126:[0,.61111,0,0,.525],127:[0,.61111,0,0,.525],160:[0,0,0,0,.525],176:[0,.61111,0,0,.525],184:[.19445,0,0,0,.525],305:[0,.43056,0,0,.525],567:[.22222,.43056,0,0,.525],711:[0,.56597,0,0,.525],713:[0,.56555,0,0,.525],714:[0,.61111,0,0,.525],715:[0,.61111,0,0,.525],728:[0,.61111,0,0,.525],730:[0,.61111,0,0,.525],770:[0,.61111,0,0,.525],771:[0,.61111,0,0,.525],776:[0,.61111,0,0,.525],915:[0,.61111,0,0,.525],916:[0,.61111,0,0,.525],920:[0,.61111,0,0,.525],923:[0,.61111,0,0,.525],926:[0,.61111,0,0,.525],928:[0,.61111,0,0,.525],931:[0,.61111,0,0,.525],933:[0,.61111,0,0,.525],934:[0,.61111,0,0,.525],936:[0,.61111,0,0,.525],937:[0,.61111,0,0,.525],8216:[0,.61111,0,0,.525],8217:[0,.61111,0,0,.525],8242:[0,.61111,0,0,.525],9251:[.11111,.21944,0,0,.525]}},Ve={slant:[.25,.25,.25],space:[0,0,0],stretch:[0,0,0],shrink:[0,0,0],xHeight:[.431,.431,.431],quad:[1,1.171,1.472],extraSpace:[0,0,0],num1:[.677,.732,.925],num2:[.394,.384,.387],num3:[.444,.471,.504],denom1:[.686,.752,1.025],denom2:[.345,.344,.532],sup1:[.413,.503,.504],sup2:[.363,.431,.404],sup3:[.289,.286,.294],sub1:[.15,.143,.2],sub2:[.247,.286,.4],supDrop:[.386,.353,.494],subDrop:[.05,.071,.1],delim1:[2.39,1.7,1.98],delim2:[1.01,1.157,1.42],axisHeight:[.25,.25,.25],defaultRuleThickness:[.04,.049,.049],bigOpSpacing1:[.111,.111,.111],bigOpSpacing2:[.166,.166,.166],bigOpSpacing3:[.2,.2,.2],bigOpSpacing4:[.6,.611,.611],bigOpSpacing5:[.1,.143,.143],sqrtRuleThickness:[.04,.04,.04],ptPerEm:[10,10,10],doubleRuleSep:[.2,.2,.2],arrayRuleWidth:[.04,.04,.04],fboxsep:[.3,.3,.3],fboxrule:[.04,.04,.04]},Ue={"Å":"A","Ð":"D","Þ":"o","å":"a","ð":"d","þ":"o","А":"A","Б":"B","В":"B","Г":"F","Д":"A","Е":"E","Ж":"K","З":"3","И":"N","Й":"N","К":"K","Л":"N","М":"M","Н":"H","О":"O","П":"N","Р":"P","С":"C","Т":"T","У":"y","Ф":"O","Х":"X","Ц":"U","Ч":"h","Ш":"W","Щ":"W","Ъ":"B","Ы":"X","Ь":"B","Э":"3","Ю":"X","Я":"R","а":"a","б":"b","в":"a","г":"r","д":"y","е":"e","ж":"m","з":"e","и":"n","й":"n","к":"n","л":"n","м":"m","н":"n","о":"o","п":"n","р":"p","с":"c","т":"o","у":"y","ф":"b","х":"x","ц":"n","ч":"n","ш":"w","щ":"w","ъ":"a","ы":"m","ь":"a","э":"e","ю":"m","я":"r"};function Ge(e,t,i){if(!je[t])throw new Error("Font metrics not found for font: "+t+".");var r=e.charCodeAt(0),n=je[t][r];if(!n&&e[0]in Ue&&(r=Ue[e[0]].charCodeAt(0),n=je[t][r]),n||"text"!==i||Oe(r)&&(n=je[t][77]),n)return{depth:n[0],height:n[1],italic:n[2],skew:n[3],width:n[4]}}var $e={};var We=[[1,1,1],[2,1,1],[3,1,1],[4,2,1],[5,2,1],[6,3,1],[7,4,2],[8,6,3],[9,7,6],[10,8,7],[11,10,9]],Xe=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],Ye=function(e,t){return t.size<2?e:We[e-1][t.size-1]};class Ke{constructor(e){this.style=void 0,this.color=void 0,this.size=void 0,this.textSize=void 0,this.phantom=void 0,this.font=void 0,this.fontFamily=void 0,this.fontWeight=void 0,this.fontShape=void 0,this.sizeMultiplier=void 0,this.maxSize=void 0,this.minRuleThickness=void 0,this._fontMetrics=void 0,this.style=e.style,this.color=e.color,this.size=e.size||Ke.BASESIZE,this.textSize=e.textSize||this.size,this.phantom=!!e.phantom,this.font=e.font||"",this.fontFamily=e.fontFamily||"",this.fontWeight=e.fontWeight||"",this.fontShape=e.fontShape||"",this.sizeMultiplier=Xe[this.size-1],this.maxSize=e.maxSize,this.minRuleThickness=e.minRuleThickness,this._fontMetrics=void 0}extend(e){var t={style:this.style,size:this.size,textSize:this.textSize,color:this.color,phantom:this.phantom,font:this.font,fontFamily:this.fontFamily,fontWeight:this.fontWeight,fontShape:this.fontShape,maxSize:this.maxSize,minRuleThickness:this.minRuleThickness};for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i]);return new Ke(t)}havingStyle(e){return this.style===e?this:this.extend({style:e,size:Ye(this.textSize,e)})}havingCrampedStyle(){return this.havingStyle(this.style.cramp())}havingSize(e){return this.size===e&&this.textSize===e?this:this.extend({style:this.style.text(),size:e,textSize:e,sizeMultiplier:Xe[e-1]})}havingBaseStyle(e){e=e||this.style.text();var t=Ye(Ke.BASESIZE,e);return this.size===t&&this.textSize===Ke.BASESIZE&&this.style===e?this:this.extend({style:e,size:t})}havingBaseSizing(){var e;switch(this.style.id){case 4:case 5:e=3;break;case 6:case 7:e=1;break;default:e=6}return this.extend({style:this.style.text(),size:e})}withColor(e){return this.extend({color:e})}withPhantom(){return this.extend({phantom:!0})}withFont(e){return this.extend({font:e})}withTextFontFamily(e){return this.extend({fontFamily:e,font:""})}withTextFontWeight(e){return this.extend({fontWeight:e,font:""})}withTextFontShape(e){return this.extend({fontShape:e,font:""})}sizingClasses(e){return e.size!==this.size?["sizing","reset-size"+e.size,"size"+this.size]:[]}baseSizingClasses(){return this.size!==Ke.BASESIZE?["sizing","reset-size"+this.size,"size"+Ke.BASESIZE]:[]}fontMetrics(){return this._fontMetrics||(this._fontMetrics=function(e){var t;if(!$e[t=e>=5?0:e>=3?1:2]){var i=$e[t]={cssEmPerMu:Ve.quad[t]/18};for(var r in Ve)Ve.hasOwnProperty(r)&&(i[r]=Ve[r][t])}return $e[t]}(this.size)),this._fontMetrics}getColor(){return this.phantom?"transparent":this.color}}Ke.BASESIZE=6;var Ze={pt:1,mm:7227/2540,cm:7227/254,in:72.27,bp:1.00375,pc:12,dd:1238/1157,cc:14856/1157,nd:685/642,nc:1370/107,sp:1/65536,px:1.00375},Je={ex:!0,em:!0,mu:!0},Qe=function(e){return"string"!=typeof e&&(e=e.unit),e in Ze||e in Je||"ex"===e},et=function(e,t){var i;if(e.unit in Ze)i=Ze[e.unit]/t.fontMetrics().ptPerEm/t.sizeMultiplier;else if("mu"===e.unit)i=t.fontMetrics().cssEmPerMu;else{var r;if(r=t.style.isTight()?t.havingStyle(t.style.text()):t,"ex"===e.unit)i=r.fontMetrics().xHeight;else{if("em"!==e.unit)throw new ve("Invalid unit: '"+e.unit+"'");i=r.fontMetrics().quad}r!==t&&(i*=r.sizeMultiplier/t.sizeMultiplier)}return Math.min(e.number*i,t.maxSize)},tt=function(e){return+e.toFixed(4)+"em"},it=function(e){return e.filter((e=>e)).join(" ")},rt=function(e,t,i){if(this.classes=e||[],this.attributes={},this.height=0,this.depth=0,this.maxFontSize=0,this.style=i||{},t){t.style.isTight()&&this.classes.push("mtight");var r=t.getColor();r&&(this.style.color=r)}},nt=function(e){var t=document.createElement(e);for(var i in t.className=it(this.classes),this.style)this.style.hasOwnProperty(i)&&(t.style[i]=this.style[i]);for(var r in this.attributes)this.attributes.hasOwnProperty(r)&&t.setAttribute(r,this.attributes[r]);for(var n=0;n<this.children.length;n++)t.appendChild(this.children[n].toNode());return t},st=/[\s"'>/=\x00-\x1f]/,at=function(e){var t="<"+e;this.classes.length&&(t+=' class="'+ke.escape(it(this.classes))+'"');var i="";for(var r in this.style)this.style.hasOwnProperty(r)&&(i+=ke.hyphenate(r)+":"+this.style[r]+";");for(var n in i&&(t+=' style="'+ke.escape(i)+'"'),this.attributes)if(this.attributes.hasOwnProperty(n)){if(st.test(n))throw new ve("Invalid attribute name '"+n+"'");t+=" "+n+'="'+ke.escape(this.attributes[n])+'"'}t+=">";for(var s=0;s<this.children.length;s++)t+=this.children[s].toMarkup();return t+="</"+e+">"};class ot{constructor(e,t,i,r){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.width=void 0,this.maxFontSize=void 0,this.style=void 0,rt.call(this,e,i,r),this.children=t||[]}setAttribute(e,t){this.attributes[e]=t}hasClass(e){return ke.contains(this.classes,e)}toNode(){return nt.call(this,"span")}toMarkup(){return at.call(this,"span")}}class lt{constructor(e,t,i,r){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,rt.call(this,t,r),this.children=i||[],this.setAttribute("href",e)}setAttribute(e,t){this.attributes[e]=t}hasClass(e){return ke.contains(this.classes,e)}toNode(){return nt.call(this,"a")}toMarkup(){return at.call(this,"a")}}class ht{constructor(e,t,i){this.src=void 0,this.alt=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.alt=t,this.src=e,this.classes=["mord"],this.style=i}hasClass(e){return ke.contains(this.classes,e)}toNode(){var e=document.createElement("img");for(var t in e.src=this.src,e.alt=this.alt,e.className="mord",this.style)this.style.hasOwnProperty(t)&&(e.style[t]=this.style[t]);return e}toMarkup(){var e='<img src="'+ke.escape(this.src)+'" alt="'+ke.escape(this.alt)+'"',t="";for(var i in this.style)this.style.hasOwnProperty(i)&&(t+=ke.hyphenate(i)+":"+this.style[i]+";");return t&&(e+=' style="'+ke.escape(t)+'"'),e+="'/>"}}var ct={"î":"ı̂","ï":"ı̈","í":"ı́","ì":"ı̀"};class dt{constructor(e,t,i,r,n,s,a,o){this.text=void 0,this.height=void 0,this.depth=void 0,this.italic=void 0,this.skew=void 0,this.width=void 0,this.maxFontSize=void 0,this.classes=void 0,this.style=void 0,this.text=e,this.height=t||0,this.depth=i||0,this.italic=r||0,this.skew=n||0,this.width=s||0,this.classes=a||[],this.style=o||{},this.maxFontSize=0;var l=function(e){for(var t=0;t<ze.length;t++)for(var i=ze[t],r=0;r<i.blocks.length;r++){var n=i.blocks[r];if(e>=n[0]&&e<=n[1])return i.name}return null}(this.text.charCodeAt(0));l&&this.classes.push(l+"_fallback"),/[îïíì]/.test(this.text)&&(this.text=ct[this.text])}hasClass(e){return ke.contains(this.classes,e)}toNode(){var e=document.createTextNode(this.text),t=null;for(var i in this.italic>0&&((t=document.createElement("span")).style.marginRight=tt(this.italic)),this.classes.length>0&&((t=t||document.createElement("span")).className=it(this.classes)),this.style)this.style.hasOwnProperty(i)&&((t=t||document.createElement("span")).style[i]=this.style[i]);return t?(t.appendChild(e),t):e}toMarkup(){var e=!1,t="<span";this.classes.length&&(e=!0,t+=' class="',t+=ke.escape(it(this.classes)),t+='"');var i="";for(var r in this.italic>0&&(i+="margin-right:"+this.italic+"em;"),this.style)this.style.hasOwnProperty(r)&&(i+=ke.hyphenate(r)+":"+this.style[r]+";");i&&(e=!0,t+=' style="'+ke.escape(i)+'"');var n=ke.escape(this.text);return e?(t+=">",t+=n,t+="</span>"):n}}class ut{constructor(e,t){this.children=void 0,this.attributes=void 0,this.children=e||[],this.attributes=t||{}}toNode(){var e=document.createElementNS("http://www.w3.org/2000/svg","svg");for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&e.setAttribute(t,this.attributes[t]);for(var i=0;i<this.children.length;i++)e.appendChild(this.children[i].toNode());return e}toMarkup(){var e='<svg xmlns="http://www.w3.org/2000/svg"';for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&(e+=" "+t+'="'+ke.escape(this.attributes[t])+'"');e+=">";for(var i=0;i<this.children.length;i++)e+=this.children[i].toMarkup();return e+="</svg>"}}class pt{constructor(e,t){this.pathName=void 0,this.alternate=void 0,this.pathName=e,this.alternate=t}toNode(){var e=document.createElementNS("http://www.w3.org/2000/svg","path");return this.alternate?e.setAttribute("d",this.alternate):e.setAttribute("d",He[this.pathName]),e}toMarkup(){return this.alternate?'<path d="'+ke.escape(this.alternate)+'"/>':'<path d="'+ke.escape(He[this.pathName])+'"/>'}}class mt{constructor(e){this.attributes=void 0,this.attributes=e||{}}toNode(){var e=document.createElementNS("http://www.w3.org/2000/svg","line");for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&e.setAttribute(t,this.attributes[t]);return e}toMarkup(){var e="<line";for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&(e+=" "+t+'="'+ke.escape(this.attributes[t])+'"');return e+="/>"}}function gt(e){if(e instanceof dt)return e;throw new Error("Expected symbolNode but got "+String(e)+".")}var ft={bin:1,close:1,inner:1,open:1,punct:1,rel:1},bt={"accent-token":1,mathord:1,"op-token":1,spacing:1,textord:1},vt={math:{},text:{}};function yt(e,t,i,r,n,s){vt[e][n]={font:t,group:i,replace:r},s&&r&&(vt[e][r]=vt[e][n])}var wt="math",xt="text",At="main",kt="ams",Et="accent-token",St="bin",Ct="close",Mt="inner",_t="mathord",Tt="op-token",Nt="open",It="punct",Lt="rel",Pt="spacing",Rt="textord";yt(wt,At,Lt,"≡","\\equiv",!0),yt(wt,At,Lt,"≺","\\prec",!0),yt(wt,At,Lt,"≻","\\succ",!0),yt(wt,At,Lt,"∼","\\sim",!0),yt(wt,At,Lt,"⊥","\\perp"),yt(wt,At,Lt,"⪯","\\preceq",!0),yt(wt,At,Lt,"⪰","\\succeq",!0),yt(wt,At,Lt,"≃","\\simeq",!0),yt(wt,At,Lt,"∣","\\mid",!0),yt(wt,At,Lt,"≪","\\ll",!0),yt(wt,At,Lt,"≫","\\gg",!0),yt(wt,At,Lt,"≍","\\asymp",!0),yt(wt,At,Lt,"∥","\\parallel"),yt(wt,At,Lt,"⋈","\\bowtie",!0),yt(wt,At,Lt,"⌣","\\smile",!0),yt(wt,At,Lt,"⊑","\\sqsubseteq",!0),yt(wt,At,Lt,"⊒","\\sqsupseteq",!0),yt(wt,At,Lt,"≐","\\doteq",!0),yt(wt,At,Lt,"⌢","\\frown",!0),yt(wt,At,Lt,"∋","\\ni",!0),yt(wt,At,Lt,"∝","\\propto",!0),yt(wt,At,Lt,"⊢","\\vdash",!0),yt(wt,At,Lt,"⊣","\\dashv",!0),yt(wt,At,Lt,"∋","\\owns"),yt(wt,At,It,".","\\ldotp"),yt(wt,At,It,"⋅","\\cdotp"),yt(wt,At,Rt,"#","\\#"),yt(xt,At,Rt,"#","\\#"),yt(wt,At,Rt,"&","\\&"),yt(xt,At,Rt,"&","\\&"),yt(wt,At,Rt,"ℵ","\\aleph",!0),yt(wt,At,Rt,"∀","\\forall",!0),yt(wt,At,Rt,"ℏ","\\hbar",!0),yt(wt,At,Rt,"∃","\\exists",!0),yt(wt,At,Rt,"∇","\\nabla",!0),yt(wt,At,Rt,"♭","\\flat",!0),yt(wt,At,Rt,"ℓ","\\ell",!0),yt(wt,At,Rt,"♮","\\natural",!0),yt(wt,At,Rt,"♣","\\clubsuit",!0),yt(wt,At,Rt,"℘","\\wp",!0),yt(wt,At,Rt,"♯","\\sharp",!0),yt(wt,At,Rt,"♢","\\diamondsuit",!0),yt(wt,At,Rt,"ℜ","\\Re",!0),yt(wt,At,Rt,"♡","\\heartsuit",!0),yt(wt,At,Rt,"ℑ","\\Im",!0),yt(wt,At,Rt,"♠","\\spadesuit",!0),yt(wt,At,Rt,"§","\\S",!0),yt(xt,At,Rt,"§","\\S"),yt(wt,At,Rt,"¶","\\P",!0),yt(xt,At,Rt,"¶","\\P"),yt(wt,At,Rt,"†","\\dag"),yt(xt,At,Rt,"†","\\dag"),yt(xt,At,Rt,"†","\\textdagger"),yt(wt,At,Rt,"‡","\\ddag"),yt(xt,At,Rt,"‡","\\ddag"),yt(xt,At,Rt,"‡","\\textdaggerdbl"),yt(wt,At,Ct,"⎱","\\rmoustache",!0),yt(wt,At,Nt,"⎰","\\lmoustache",!0),yt(wt,At,Ct,"⟯","\\rgroup",!0),yt(wt,At,Nt,"⟮","\\lgroup",!0),yt(wt,At,St,"∓","\\mp",!0),yt(wt,At,St,"⊖","\\ominus",!0),yt(wt,At,St,"⊎","\\uplus",!0),yt(wt,At,St,"⊓","\\sqcap",!0),yt(wt,At,St,"∗","\\ast"),yt(wt,At,St,"⊔","\\sqcup",!0),yt(wt,At,St,"◯","\\bigcirc",!0),yt(wt,At,St,"∙","\\bullet",!0),yt(wt,At,St,"‡","\\ddagger"),yt(wt,At,St,"≀","\\wr",!0),yt(wt,At,St,"⨿","\\amalg"),yt(wt,At,St,"&","\\And"),yt(wt,At,Lt,"⟵","\\longleftarrow",!0),yt(wt,At,Lt,"⇐","\\Leftarrow",!0),yt(wt,At,Lt,"⟸","\\Longleftarrow",!0),yt(wt,At,Lt,"⟶","\\longrightarrow",!0),yt(wt,At,Lt,"⇒","\\Rightarrow",!0),yt(wt,At,Lt,"⟹","\\Longrightarrow",!0),yt(wt,At,Lt,"↔","\\leftrightarrow",!0),yt(wt,At,Lt,"⟷","\\longleftrightarrow",!0),yt(wt,At,Lt,"⇔","\\Leftrightarrow",!0),yt(wt,At,Lt,"⟺","\\Longleftrightarrow",!0),yt(wt,At,Lt,"↦","\\mapsto",!0),yt(wt,At,Lt,"⟼","\\longmapsto",!0),yt(wt,At,Lt,"↗","\\nearrow",!0),yt(wt,At,Lt,"↩","\\hookleftarrow",!0),yt(wt,At,Lt,"↪","\\hookrightarrow",!0),yt(wt,At,Lt,"↘","\\searrow",!0),yt(wt,At,Lt,"↼","\\leftharpoonup",!0),yt(wt,At,Lt,"⇀","\\rightharpoonup",!0),yt(wt,At,Lt,"↙","\\swarrow",!0),yt(wt,At,Lt,"↽","\\leftharpoondown",!0),yt(wt,At,Lt,"⇁","\\rightharpoondown",!0),yt(wt,At,Lt,"↖","\\nwarrow",!0),yt(wt,At,Lt,"⇌","\\rightleftharpoons",!0),yt(wt,kt,Lt,"≮","\\nless",!0),yt(wt,kt,Lt,"","\\@nleqslant"),yt(wt,kt,Lt,"","\\@nleqq"),yt(wt,kt,Lt,"⪇","\\lneq",!0),yt(wt,kt,Lt,"≨","\\lneqq",!0),yt(wt,kt,Lt,"","\\@lvertneqq"),yt(wt,kt,Lt,"⋦","\\lnsim",!0),yt(wt,kt,Lt,"⪉","\\lnapprox",!0),yt(wt,kt,Lt,"⊀","\\nprec",!0),yt(wt,kt,Lt,"⋠","\\npreceq",!0),yt(wt,kt,Lt,"⋨","\\precnsim",!0),yt(wt,kt,Lt,"⪹","\\precnapprox",!0),yt(wt,kt,Lt,"≁","\\nsim",!0),yt(wt,kt,Lt,"","\\@nshortmid"),yt(wt,kt,Lt,"∤","\\nmid",!0),yt(wt,kt,Lt,"⊬","\\nvdash",!0),yt(wt,kt,Lt,"⊭","\\nvDash",!0),yt(wt,kt,Lt,"⋪","\\ntriangleleft"),yt(wt,kt,Lt,"⋬","\\ntrianglelefteq",!0),yt(wt,kt,Lt,"⊊","\\subsetneq",!0),yt(wt,kt,Lt,"","\\@varsubsetneq"),yt(wt,kt,Lt,"⫋","\\subsetneqq",!0),yt(wt,kt,Lt,"","\\@varsubsetneqq"),yt(wt,kt,Lt,"≯","\\ngtr",!0),yt(wt,kt,Lt,"","\\@ngeqslant"),yt(wt,kt,Lt,"","\\@ngeqq"),yt(wt,kt,Lt,"⪈","\\gneq",!0),yt(wt,kt,Lt,"≩","\\gneqq",!0),yt(wt,kt,Lt,"","\\@gvertneqq"),yt(wt,kt,Lt,"⋧","\\gnsim",!0),yt(wt,kt,Lt,"⪊","\\gnapprox",!0),yt(wt,kt,Lt,"⊁","\\nsucc",!0),yt(wt,kt,Lt,"⋡","\\nsucceq",!0),yt(wt,kt,Lt,"⋩","\\succnsim",!0),yt(wt,kt,Lt,"⪺","\\succnapprox",!0),yt(wt,kt,Lt,"≆","\\ncong",!0),yt(wt,kt,Lt,"","\\@nshortparallel"),yt(wt,kt,Lt,"∦","\\nparallel",!0),yt(wt,kt,Lt,"⊯","\\nVDash",!0),yt(wt,kt,Lt,"⋫","\\ntriangleright"),yt(wt,kt,Lt,"⋭","\\ntrianglerighteq",!0),yt(wt,kt,Lt,"","\\@nsupseteqq"),yt(wt,kt,Lt,"⊋","\\supsetneq",!0),yt(wt,kt,Lt,"","\\@varsupsetneq"),yt(wt,kt,Lt,"⫌","\\supsetneqq",!0),yt(wt,kt,Lt,"","\\@varsupsetneqq"),yt(wt,kt,Lt,"⊮","\\nVdash",!0),yt(wt,kt,Lt,"⪵","\\precneqq",!0),yt(wt,kt,Lt,"⪶","\\succneqq",!0),yt(wt,kt,Lt,"","\\@nsubseteqq"),yt(wt,kt,St,"⊴","\\unlhd"),yt(wt,kt,St,"⊵","\\unrhd"),yt(wt,kt,Lt,"↚","\\nleftarrow",!0),yt(wt,kt,Lt,"↛","\\nrightarrow",!0),yt(wt,kt,Lt,"⇍","\\nLeftarrow",!0),yt(wt,kt,Lt,"⇏","\\nRightarrow",!0),yt(wt,kt,Lt,"↮","\\nleftrightarrow",!0),yt(wt,kt,Lt,"⇎","\\nLeftrightarrow",!0),yt(wt,kt,Lt,"△","\\vartriangle"),yt(wt,kt,Rt,"ℏ","\\hslash"),yt(wt,kt,Rt,"▽","\\triangledown"),yt(wt,kt,Rt,"◊","\\lozenge"),yt(wt,kt,Rt,"Ⓢ","\\circledS"),yt(wt,kt,Rt,"®","\\circledR"),yt(xt,kt,Rt,"®","\\circledR"),yt(wt,kt,Rt,"∡","\\measuredangle",!0),yt(wt,kt,Rt,"∄","\\nexists"),yt(wt,kt,Rt,"℧","\\mho"),yt(wt,kt,Rt,"Ⅎ","\\Finv",!0),yt(wt,kt,Rt,"⅁","\\Game",!0),yt(wt,kt,Rt,"‵","\\backprime"),yt(wt,kt,Rt,"▲","\\blacktriangle"),yt(wt,kt,Rt,"▼","\\blacktriangledown"),yt(wt,kt,Rt,"■","\\blacksquare"),yt(wt,kt,Rt,"⧫","\\blacklozenge"),yt(wt,kt,Rt,"★","\\bigstar"),yt(wt,kt,Rt,"∢","\\sphericalangle",!0),yt(wt,kt,Rt,"∁","\\complement",!0),yt(wt,kt,Rt,"ð","\\eth",!0),yt(xt,At,Rt,"ð","ð"),yt(wt,kt,Rt,"╱","\\diagup"),yt(wt,kt,Rt,"╲","\\diagdown"),yt(wt,kt,Rt,"□","\\square"),yt(wt,kt,Rt,"□","\\Box"),yt(wt,kt,Rt,"◊","\\Diamond"),yt(wt,kt,Rt,"¥","\\yen",!0),yt(xt,kt,Rt,"¥","\\yen",!0),yt(wt,kt,Rt,"✓","\\checkmark",!0),yt(xt,kt,Rt,"✓","\\checkmark"),yt(wt,kt,Rt,"ℶ","\\beth",!0),yt(wt,kt,Rt,"ℸ","\\daleth",!0),yt(wt,kt,Rt,"ℷ","\\gimel",!0),yt(wt,kt,Rt,"ϝ","\\digamma",!0),yt(wt,kt,Rt,"ϰ","\\varkappa"),yt(wt,kt,Nt,"┌","\\@ulcorner",!0),yt(wt,kt,Ct,"┐","\\@urcorner",!0),yt(wt,kt,Nt,"└","\\@llcorner",!0),yt(wt,kt,Ct,"┘","\\@lrcorner",!0),yt(wt,kt,Lt,"≦","\\leqq",!0),yt(wt,kt,Lt,"⩽","\\leqslant",!0),yt(wt,kt,Lt,"⪕","\\eqslantless",!0),yt(wt,kt,Lt,"≲","\\lesssim",!0),yt(wt,kt,Lt,"⪅","\\lessapprox",!0),yt(wt,kt,Lt,"≊","\\approxeq",!0),yt(wt,kt,St,"⋖","\\lessdot"),yt(wt,kt,Lt,"⋘","\\lll",!0),yt(wt,kt,Lt,"≶","\\lessgtr",!0),yt(wt,kt,Lt,"⋚","\\lesseqgtr",!0),yt(wt,kt,Lt,"⪋","\\lesseqqgtr",!0),yt(wt,kt,Lt,"≑","\\doteqdot"),yt(wt,kt,Lt,"≓","\\risingdotseq",!0),yt(wt,kt,Lt,"≒","\\fallingdotseq",!0),yt(wt,kt,Lt,"∽","\\backsim",!0),yt(wt,kt,Lt,"⋍","\\backsimeq",!0),yt(wt,kt,Lt,"⫅","\\subseteqq",!0),yt(wt,kt,Lt,"⋐","\\Subset",!0),yt(wt,kt,Lt,"⊏","\\sqsubset",!0),yt(wt,kt,Lt,"≼","\\preccurlyeq",!0),yt(wt,kt,Lt,"⋞","\\curlyeqprec",!0),yt(wt,kt,Lt,"≾","\\precsim",!0),yt(wt,kt,Lt,"⪷","\\precapprox",!0),yt(wt,kt,Lt,"⊲","\\vartriangleleft"),yt(wt,kt,Lt,"⊴","\\trianglelefteq"),yt(wt,kt,Lt,"⊨","\\vDash",!0),yt(wt,kt,Lt,"⊪","\\Vvdash",!0),yt(wt,kt,Lt,"⌣","\\smallsmile"),yt(wt,kt,Lt,"⌢","\\smallfrown"),yt(wt,kt,Lt,"≏","\\bumpeq",!0),yt(wt,kt,Lt,"≎","\\Bumpeq",!0),yt(wt,kt,Lt,"≧","\\geqq",!0),yt(wt,kt,Lt,"⩾","\\geqslant",!0),yt(wt,kt,Lt,"⪖","\\eqslantgtr",!0),yt(wt,kt,Lt,"≳","\\gtrsim",!0),yt(wt,kt,Lt,"⪆","\\gtrapprox",!0),yt(wt,kt,St,"⋗","\\gtrdot"),yt(wt,kt,Lt,"⋙","\\ggg",!0),yt(wt,kt,Lt,"≷","\\gtrless",!0),yt(wt,kt,Lt,"⋛","\\gtreqless",!0),yt(wt,kt,Lt,"⪌","\\gtreqqless",!0),yt(wt,kt,Lt,"≖","\\eqcirc",!0),yt(wt,kt,Lt,"≗","\\circeq",!0),yt(wt,kt,Lt,"≜","\\triangleq",!0),yt(wt,kt,Lt,"∼","\\thicksim"),yt(wt,kt,Lt,"≈","\\thickapprox"),yt(wt,kt,Lt,"⫆","\\supseteqq",!0),yt(wt,kt,Lt,"⋑","\\Supset",!0),yt(wt,kt,Lt,"⊐","\\sqsupset",!0),yt(wt,kt,Lt,"≽","\\succcurlyeq",!0),yt(wt,kt,Lt,"⋟","\\curlyeqsucc",!0),yt(wt,kt,Lt,"≿","\\succsim",!0),yt(wt,kt,Lt,"⪸","\\succapprox",!0),yt(wt,kt,Lt,"⊳","\\vartriangleright"),yt(wt,kt,Lt,"⊵","\\trianglerighteq"),yt(wt,kt,Lt,"⊩","\\Vdash",!0),yt(wt,kt,Lt,"∣","\\shortmid"),yt(wt,kt,Lt,"∥","\\shortparallel"),yt(wt,kt,Lt,"≬","\\between",!0),yt(wt,kt,Lt,"⋔","\\pitchfork",!0),yt(wt,kt,Lt,"∝","\\varpropto"),yt(wt,kt,Lt,"◀","\\blacktriangleleft"),yt(wt,kt,Lt,"∴","\\therefore",!0),yt(wt,kt,Lt,"∍","\\backepsilon"),yt(wt,kt,Lt,"▶","\\blacktriangleright"),yt(wt,kt,Lt,"∵","\\because",!0),yt(wt,kt,Lt,"⋘","\\llless"),yt(wt,kt,Lt,"⋙","\\gggtr"),yt(wt,kt,St,"⊲","\\lhd"),yt(wt,kt,St,"⊳","\\rhd"),yt(wt,kt,Lt,"≂","\\eqsim",!0),yt(wt,At,Lt,"⋈","\\Join"),yt(wt,kt,Lt,"≑","\\Doteq",!0),yt(wt,kt,St,"∔","\\dotplus",!0),yt(wt,kt,St,"∖","\\smallsetminus"),yt(wt,kt,St,"⋒","\\Cap",!0),yt(wt,kt,St,"⋓","\\Cup",!0),yt(wt,kt,St,"⩞","\\doublebarwedge",!0),yt(wt,kt,St,"⊟","\\boxminus",!0),yt(wt,kt,St,"⊞","\\boxplus",!0),yt(wt,kt,St,"⋇","\\divideontimes",!0),yt(wt,kt,St,"⋉","\\ltimes",!0),yt(wt,kt,St,"⋊","\\rtimes",!0),yt(wt,kt,St,"⋋","\\leftthreetimes",!0),yt(wt,kt,St,"⋌","\\rightthreetimes",!0),yt(wt,kt,St,"⋏","\\curlywedge",!0),yt(wt,kt,St,"⋎","\\curlyvee",!0),yt(wt,kt,St,"⊝","\\circleddash",!0),yt(wt,kt,St,"⊛","\\circledast",!0),yt(wt,kt,St,"⋅","\\centerdot"),yt(wt,kt,St,"⊺","\\intercal",!0),yt(wt,kt,St,"⋒","\\doublecap"),yt(wt,kt,St,"⋓","\\doublecup"),yt(wt,kt,St,"⊠","\\boxtimes",!0),yt(wt,kt,Lt,"⇢","\\dashrightarrow",!0),yt(wt,kt,Lt,"⇠","\\dashleftarrow",!0),yt(wt,kt,Lt,"⇇","\\leftleftarrows",!0),yt(wt,kt,Lt,"⇆","\\leftrightarrows",!0),yt(wt,kt,Lt,"⇚","\\Lleftarrow",!0),yt(wt,kt,Lt,"↞","\\twoheadleftarrow",!0),yt(wt,kt,Lt,"↢","\\leftarrowtail",!0),yt(wt,kt,Lt,"↫","\\looparrowleft",!0),yt(wt,kt,Lt,"⇋","\\leftrightharpoons",!0),yt(wt,kt,Lt,"↶","\\curvearrowleft",!0),yt(wt,kt,Lt,"↺","\\circlearrowleft",!0),yt(wt,kt,Lt,"↰","\\Lsh",!0),yt(wt,kt,Lt,"⇈","\\upuparrows",!0),yt(wt,kt,Lt,"↿","\\upharpoonleft",!0),yt(wt,kt,Lt,"⇃","\\downharpoonleft",!0),yt(wt,At,Lt,"⊶","\\origof",!0),yt(wt,At,Lt,"⊷","\\imageof",!0),yt(wt,kt,Lt,"⊸","\\multimap",!0),yt(wt,kt,Lt,"↭","\\leftrightsquigarrow",!0),yt(wt,kt,Lt,"⇉","\\rightrightarrows",!0),yt(wt,kt,Lt,"⇄","\\rightleftarrows",!0),yt(wt,kt,Lt,"↠","\\twoheadrightarrow",!0),yt(wt,kt,Lt,"↣","\\rightarrowtail",!0),yt(wt,kt,Lt,"↬","\\looparrowright",!0),yt(wt,kt,Lt,"↷","\\curvearrowright",!0),yt(wt,kt,Lt,"↻","\\circlearrowright",!0),yt(wt,kt,Lt,"↱","\\Rsh",!0),yt(wt,kt,Lt,"⇊","\\downdownarrows",!0),yt(wt,kt,Lt,"↾","\\upharpoonright",!0),yt(wt,kt,Lt,"⇂","\\downharpoonright",!0),yt(wt,kt,Lt,"⇝","\\rightsquigarrow",!0),yt(wt,kt,Lt,"⇝","\\leadsto"),yt(wt,kt,Lt,"⇛","\\Rrightarrow",!0),yt(wt,kt,Lt,"↾","\\restriction"),yt(wt,At,Rt,"‘","`"),yt(wt,At,Rt,"$","\\$"),yt(xt,At,Rt,"$","\\$"),yt(xt,At,Rt,"$","\\textdollar"),yt(wt,At,Rt,"%","\\%"),yt(xt,At,Rt,"%","\\%"),yt(wt,At,Rt,"_","\\_"),yt(xt,At,Rt,"_","\\_"),yt(xt,At,Rt,"_","\\textunderscore"),yt(wt,At,Rt,"∠","\\angle",!0),yt(wt,At,Rt,"∞","\\infty",!0),yt(wt,At,Rt,"′","\\prime"),yt(wt,At,Rt,"△","\\triangle"),yt(wt,At,Rt,"Γ","\\Gamma",!0),yt(wt,At,Rt,"Δ","\\Delta",!0),yt(wt,At,Rt,"Θ","\\Theta",!0),yt(wt,At,Rt,"Λ","\\Lambda",!0),yt(wt,At,Rt,"Ξ","\\Xi",!0),yt(wt,At,Rt,"Π","\\Pi",!0),yt(wt,At,Rt,"Σ","\\Sigma",!0),yt(wt,At,Rt,"Υ","\\Upsilon",!0),yt(wt,At,Rt,"Φ","\\Phi",!0),yt(wt,At,Rt,"Ψ","\\Psi",!0),yt(wt,At,Rt,"Ω","\\Omega",!0),yt(wt,At,Rt,"A","Α"),yt(wt,At,Rt,"B","Β"),yt(wt,At,Rt,"E","Ε"),yt(wt,At,Rt,"Z","Ζ"),yt(wt,At,Rt,"H","Η"),yt(wt,At,Rt,"I","Ι"),yt(wt,At,Rt,"K","Κ"),yt(wt,At,Rt,"M","Μ"),yt(wt,At,Rt,"N","Ν"),yt(wt,At,Rt,"O","Ο"),yt(wt,At,Rt,"P","Ρ"),yt(wt,At,Rt,"T","Τ"),yt(wt,At,Rt,"X","Χ"),yt(wt,At,Rt,"¬","\\neg",!0),yt(wt,At,Rt,"¬","\\lnot"),yt(wt,At,Rt,"⊤","\\top"),yt(wt,At,Rt,"⊥","\\bot"),yt(wt,At,Rt,"∅","\\emptyset"),yt(wt,kt,Rt,"∅","\\varnothing"),yt(wt,At,_t,"α","\\alpha",!0),yt(wt,At,_t,"β","\\beta",!0),yt(wt,At,_t,"γ","\\gamma",!0),yt(wt,At,_t,"δ","\\delta",!0),yt(wt,At,_t,"ϵ","\\epsilon",!0),yt(wt,At,_t,"ζ","\\zeta",!0),yt(wt,At,_t,"η","\\eta",!0),yt(wt,At,_t,"θ","\\theta",!0),yt(wt,At,_t,"ι","\\iota",!0),yt(wt,At,_t,"κ","\\kappa",!0),yt(wt,At,_t,"λ","\\lambda",!0),yt(wt,At,_t,"μ","\\mu",!0),yt(wt,At,_t,"ν","\\nu",!0),yt(wt,At,_t,"ξ","\\xi",!0),yt(wt,At,_t,"ο","\\omicron",!0),yt(wt,At,_t,"π","\\pi",!0),yt(wt,At,_t,"ρ","\\rho",!0),yt(wt,At,_t,"σ","\\sigma",!0),yt(wt,At,_t,"τ","\\tau",!0),yt(wt,At,_t,"υ","\\upsilon",!0),yt(wt,At,_t,"ϕ","\\phi",!0),yt(wt,At,_t,"χ","\\chi",!0),yt(wt,At,_t,"ψ","\\psi",!0),yt(wt,At,_t,"ω","\\omega",!0),yt(wt,At,_t,"ε","\\varepsilon",!0),yt(wt,At,_t,"ϑ","\\vartheta",!0),yt(wt,At,_t,"ϖ","\\varpi",!0),yt(wt,At,_t,"ϱ","\\varrho",!0),yt(wt,At,_t,"ς","\\varsigma",!0),yt(wt,At,_t,"φ","\\varphi",!0),yt(wt,At,St,"∗","*",!0),yt(wt,At,St,"+","+"),yt(wt,At,St,"−","-",!0),yt(wt,At,St,"⋅","\\cdot",!0),yt(wt,At,St,"∘","\\circ",!0),yt(wt,At,St,"÷","\\div",!0),yt(wt,At,St,"±","\\pm",!0),yt(wt,At,St,"×","\\times",!0),yt(wt,At,St,"∩","\\cap",!0),yt(wt,At,St,"∪","\\cup",!0),yt(wt,At,St,"∖","\\setminus",!0),yt(wt,At,St,"∧","\\land"),yt(wt,At,St,"∨","\\lor"),yt(wt,At,St,"∧","\\wedge",!0),yt(wt,At,St,"∨","\\vee",!0),yt(wt,At,Rt,"√","\\surd"),yt(wt,At,Nt,"⟨","\\langle",!0),yt(wt,At,Nt,"∣","\\lvert"),yt(wt,At,Nt,"∥","\\lVert"),yt(wt,At,Ct,"?","?"),yt(wt,At,Ct,"!","!"),yt(wt,At,Ct,"⟩","\\rangle",!0),yt(wt,At,Ct,"∣","\\rvert"),yt(wt,At,Ct,"∥","\\rVert"),yt(wt,At,Lt,"=","="),yt(wt,At,Lt,":",":"),yt(wt,At,Lt,"≈","\\approx",!0),yt(wt,At,Lt,"≅","\\cong",!0),yt(wt,At,Lt,"≥","\\ge"),yt(wt,At,Lt,"≥","\\geq",!0),yt(wt,At,Lt,"←","\\gets"),yt(wt,At,Lt,">","\\gt",!0),yt(wt,At,Lt,"∈","\\in",!0),yt(wt,At,Lt,"","\\@not"),yt(wt,At,Lt,"⊂","\\subset",!0),yt(wt,At,Lt,"⊃","\\supset",!0),yt(wt,At,Lt,"⊆","\\subseteq",!0),yt(wt,At,Lt,"⊇","\\supseteq",!0),yt(wt,kt,Lt,"⊈","\\nsubseteq",!0),yt(wt,kt,Lt,"⊉","\\nsupseteq",!0),yt(wt,At,Lt,"⊨","\\models"),yt(wt,At,Lt,"←","\\leftarrow",!0),yt(wt,At,Lt,"≤","\\le"),yt(wt,At,Lt,"≤","\\leq",!0),yt(wt,At,Lt,"<","\\lt",!0),yt(wt,At,Lt,"→","\\rightarrow",!0),yt(wt,At,Lt,"→","\\to"),yt(wt,kt,Lt,"≱","\\ngeq",!0),yt(wt,kt,Lt,"≰","\\nleq",!0),yt(wt,At,Pt," ","\\ "),yt(wt,At,Pt," ","\\space"),yt(wt,At,Pt," ","\\nobreakspace"),yt(xt,At,Pt," ","\\ "),yt(xt,At,Pt," "," "),yt(xt,At,Pt," ","\\space"),yt(xt,At,Pt," ","\\nobreakspace"),yt(wt,At,Pt,null,"\\nobreak"),yt(wt,At,Pt,null,"\\allowbreak"),yt(wt,At,It,",",","),yt(wt,At,It,";",";"),yt(wt,kt,St,"⊼","\\barwedge",!0),yt(wt,kt,St,"⊻","\\veebar",!0),yt(wt,At,St,"⊙","\\odot",!0),yt(wt,At,St,"⊕","\\oplus",!0),yt(wt,At,St,"⊗","\\otimes",!0),yt(wt,At,Rt,"∂","\\partial",!0),yt(wt,At,St,"⊘","\\oslash",!0),yt(wt,kt,St,"⊚","\\circledcirc",!0),yt(wt,kt,St,"⊡","\\boxdot",!0),yt(wt,At,St,"△","\\bigtriangleup"),yt(wt,At,St,"▽","\\bigtriangledown"),yt(wt,At,St,"†","\\dagger"),yt(wt,At,St,"⋄","\\diamond"),yt(wt,At,St,"⋆","\\star"),yt(wt,At,St,"◃","\\triangleleft"),yt(wt,At,St,"▹","\\triangleright"),yt(wt,At,Nt,"{","\\{"),yt(xt,At,Rt,"{","\\{"),yt(xt,At,Rt,"{","\\textbraceleft"),yt(wt,At,Ct,"}","\\}"),yt(xt,At,Rt,"}","\\}"),yt(xt,At,Rt,"}","\\textbraceright"),yt(wt,At,Nt,"{","\\lbrace"),yt(wt,At,Ct,"}","\\rbrace"),yt(wt,At,Nt,"[","\\lbrack",!0),yt(xt,At,Rt,"[","\\lbrack",!0),yt(wt,At,Ct,"]","\\rbrack",!0),yt(xt,At,Rt,"]","\\rbrack",!0),yt(wt,At,Nt,"(","\\lparen",!0),yt(wt,At,Ct,")","\\rparen",!0),yt(xt,At,Rt,"<","\\textless",!0),yt(xt,At,Rt,">","\\textgreater",!0),yt(wt,At,Nt,"⌊","\\lfloor",!0),yt(wt,At,Ct,"⌋","\\rfloor",!0),yt(wt,At,Nt,"⌈","\\lceil",!0),yt(wt,At,Ct,"⌉","\\rceil",!0),yt(wt,At,Rt,"\\","\\backslash"),yt(wt,At,Rt,"∣","|"),yt(wt,At,Rt,"∣","\\vert"),yt(xt,At,Rt,"|","\\textbar",!0),yt(wt,At,Rt,"∥","\\|"),yt(wt,At,Rt,"∥","\\Vert"),yt(xt,At,Rt,"∥","\\textbardbl"),yt(xt,At,Rt,"~","\\textasciitilde"),yt(xt,At,Rt,"\\","\\textbackslash"),yt(xt,At,Rt,"^","\\textasciicircum"),yt(wt,At,Lt,"↑","\\uparrow",!0),yt(wt,At,Lt,"⇑","\\Uparrow",!0),yt(wt,At,Lt,"↓","\\downarrow",!0),yt(wt,At,Lt,"⇓","\\Downarrow",!0),yt(wt,At,Lt,"↕","\\updownarrow",!0),yt(wt,At,Lt,"⇕","\\Updownarrow",!0),yt(wt,At,Tt,"∐","\\coprod"),yt(wt,At,Tt,"⋁","\\bigvee"),yt(wt,At,Tt,"⋀","\\bigwedge"),yt(wt,At,Tt,"⨄","\\biguplus"),yt(wt,At,Tt,"⋂","\\bigcap"),yt(wt,At,Tt,"⋃","\\bigcup"),yt(wt,At,Tt,"∫","\\int"),yt(wt,At,Tt,"∫","\\intop"),yt(wt,At,Tt,"∬","\\iint"),yt(wt,At,Tt,"∭","\\iiint"),yt(wt,At,Tt,"∏","\\prod"),yt(wt,At,Tt,"∑","\\sum"),yt(wt,At,Tt,"⨂","\\bigotimes"),yt(wt,At,Tt,"⨁","\\bigoplus"),yt(wt,At,Tt,"⨀","\\bigodot"),yt(wt,At,Tt,"∮","\\oint"),yt(wt,At,Tt,"∯","\\oiint"),yt(wt,At,Tt,"∰","\\oiiint"),yt(wt,At,Tt,"⨆","\\bigsqcup"),yt(wt,At,Tt,"∫","\\smallint"),yt(xt,At,Mt,"…","\\textellipsis"),yt(wt,At,Mt,"…","\\mathellipsis"),yt(xt,At,Mt,"…","\\ldots",!0),yt(wt,At,Mt,"…","\\ldots",!0),yt(wt,At,Mt,"⋯","\\@cdots",!0),yt(wt,At,Mt,"⋱","\\ddots",!0),yt(wt,At,Rt,"⋮","\\varvdots"),yt(xt,At,Rt,"⋮","\\varvdots"),yt(wt,At,Et,"ˊ","\\acute"),yt(wt,At,Et,"ˋ","\\grave"),yt(wt,At,Et,"¨","\\ddot"),yt(wt,At,Et,"~","\\tilde"),yt(wt,At,Et,"ˉ","\\bar"),yt(wt,At,Et,"˘","\\breve"),yt(wt,At,Et,"ˇ","\\check"),yt(wt,At,Et,"^","\\hat"),yt(wt,At,Et,"⃗","\\vec"),yt(wt,At,Et,"˙","\\dot"),yt(wt,At,Et,"˚","\\mathring"),yt(wt,At,_t,"","\\@imath"),yt(wt,At,_t,"","\\@jmath"),yt(wt,At,Rt,"ı","ı"),yt(wt,At,Rt,"ȷ","ȷ"),yt(xt,At,Rt,"ı","\\i",!0),yt(xt,At,Rt,"ȷ","\\j",!0),yt(xt,At,Rt,"ß","\\ss",!0),yt(xt,At,Rt,"æ","\\ae",!0),yt(xt,At,Rt,"œ","\\oe",!0),yt(xt,At,Rt,"ø","\\o",!0),yt(xt,At,Rt,"Æ","\\AE",!0),yt(xt,At,Rt,"Œ","\\OE",!0),yt(xt,At,Rt,"Ø","\\O",!0),yt(xt,At,Et,"ˊ","\\'"),yt(xt,At,Et,"ˋ","\\`"),yt(xt,At,Et,"ˆ","\\^"),yt(xt,At,Et,"˜","\\~"),yt(xt,At,Et,"ˉ","\\="),yt(xt,At,Et,"˘","\\u"),yt(xt,At,Et,"˙","\\."),yt(xt,At,Et,"¸","\\c"),yt(xt,At,Et,"˚","\\r"),yt(xt,At,Et,"ˇ","\\v"),yt(xt,At,Et,"¨",'\\"'),yt(xt,At,Et,"˝","\\H"),yt(xt,At,Et,"◯","\\textcircled");var Dt={"--":!0,"---":!0,"``":!0,"''":!0};yt(xt,At,Rt,"–","--",!0),yt(xt,At,Rt,"–","\\textendash"),yt(xt,At,Rt,"—","---",!0),yt(xt,At,Rt,"—","\\textemdash"),yt(xt,At,Rt,"‘","`",!0),yt(xt,At,Rt,"‘","\\textquoteleft"),yt(xt,At,Rt,"’","'",!0),yt(xt,At,Rt,"’","\\textquoteright"),yt(xt,At,Rt,"“","``",!0),yt(xt,At,Rt,"“","\\textquotedblleft"),yt(xt,At,Rt,"”","''",!0),yt(xt,At,Rt,"”","\\textquotedblright"),yt(wt,At,Rt,"°","\\degree",!0),yt(xt,At,Rt,"°","\\degree"),yt(xt,At,Rt,"°","\\textdegree",!0),yt(wt,At,Rt,"£","\\pounds"),yt(wt,At,Rt,"£","\\mathsterling",!0),yt(xt,At,Rt,"£","\\pounds"),yt(xt,At,Rt,"£","\\textsterling",!0),yt(wt,kt,Rt,"✠","\\maltese"),yt(xt,kt,Rt,"✠","\\maltese");for(var zt='0123456789/@."',Ft=0;Ft<14;Ft++){var Ot=zt.charAt(Ft);yt(wt,At,Rt,Ot,Ot)}for(var Bt='0123456789!@*()-=+";:?/.,',Ht=0;Ht<25;Ht++){var qt=Bt.charAt(Ht);yt(xt,At,Rt,qt,qt)}for(var jt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",Vt=0;Vt<52;Vt++){var Ut=jt.charAt(Vt);yt(wt,At,_t,Ut,Ut),yt(xt,At,Rt,Ut,Ut)}yt(wt,kt,Rt,"C","ℂ"),yt(xt,kt,Rt,"C","ℂ"),yt(wt,kt,Rt,"H","ℍ"),yt(xt,kt,Rt,"H","ℍ"),yt(wt,kt,Rt,"N","ℕ"),yt(xt,kt,Rt,"N","ℕ"),yt(wt,kt,Rt,"P","ℙ"),yt(xt,kt,Rt,"P","ℙ"),yt(wt,kt,Rt,"Q","ℚ"),yt(xt,kt,Rt,"Q","ℚ"),yt(wt,kt,Rt,"R","ℝ"),yt(xt,kt,Rt,"R","ℝ"),yt(wt,kt,Rt,"Z","ℤ"),yt(xt,kt,Rt,"Z","ℤ"),yt(wt,At,_t,"h","ℎ"),yt(xt,At,_t,"h","ℎ");for(var Gt="",$t=0;$t<52;$t++){var Wt=jt.charAt($t);yt(wt,At,_t,Wt,Gt=String.fromCharCode(55349,56320+$t)),yt(xt,At,Rt,Wt,Gt),yt(wt,At,_t,Wt,Gt=String.fromCharCode(55349,56372+$t)),yt(xt,At,Rt,Wt,Gt),yt(wt,At,_t,Wt,Gt=String.fromCharCode(55349,56424+$t)),yt(xt,At,Rt,Wt,Gt),yt(wt,At,_t,Wt,Gt=String.fromCharCode(55349,56580+$t)),yt(xt,At,Rt,Wt,Gt),yt(wt,At,_t,Wt,Gt=String.fromCharCode(55349,56684+$t)),yt(xt,At,Rt,Wt,Gt),yt(wt,At,_t,Wt,Gt=String.fromCharCode(55349,56736+$t)),yt(xt,At,Rt,Wt,Gt),yt(wt,At,_t,Wt,Gt=String.fromCharCode(55349,56788+$t)),yt(xt,At,Rt,Wt,Gt),yt(wt,At,_t,Wt,Gt=String.fromCharCode(55349,56840+$t)),yt(xt,At,Rt,Wt,Gt),yt(wt,At,_t,Wt,Gt=String.fromCharCode(55349,56944+$t)),yt(xt,At,Rt,Wt,Gt),$t<26&&(yt(wt,At,_t,Wt,Gt=String.fromCharCode(55349,56632+$t)),yt(xt,At,Rt,Wt,Gt),yt(wt,At,_t,Wt,Gt=String.fromCharCode(55349,56476+$t)),yt(xt,At,Rt,Wt,Gt))}yt(wt,At,_t,"k",Gt=String.fromCharCode(55349,56668)),yt(xt,At,Rt,"k",Gt);for(var Xt=0;Xt<10;Xt++){var Yt=Xt.toString();yt(wt,At,_t,Yt,Gt=String.fromCharCode(55349,57294+Xt)),yt(xt,At,Rt,Yt,Gt),yt(wt,At,_t,Yt,Gt=String.fromCharCode(55349,57314+Xt)),yt(xt,At,Rt,Yt,Gt),yt(wt,At,_t,Yt,Gt=String.fromCharCode(55349,57324+Xt)),yt(xt,At,Rt,Yt,Gt),yt(wt,At,_t,Yt,Gt=String.fromCharCode(55349,57334+Xt)),yt(xt,At,Rt,Yt,Gt)}for(var Kt="ÐÞþ",Zt=0;Zt<3;Zt++){var Jt=Kt.charAt(Zt);yt(wt,At,_t,Jt,Jt),yt(xt,At,Rt,Jt,Jt)}var Qt=[["mathbf","textbf","Main-Bold"],["mathbf","textbf","Main-Bold"],["mathnormal","textit","Math-Italic"],["mathnormal","textit","Math-Italic"],["boldsymbol","boldsymbol","Main-BoldItalic"],["boldsymbol","boldsymbol","Main-BoldItalic"],["mathscr","textscr","Script-Regular"],["","",""],["","",""],["","",""],["mathfrak","textfrak","Fraktur-Regular"],["mathfrak","textfrak","Fraktur-Regular"],["mathbb","textbb","AMS-Regular"],["mathbb","textbb","AMS-Regular"],["mathboldfrak","textboldfrak","Fraktur-Regular"],["mathboldfrak","textboldfrak","Fraktur-Regular"],["mathsf","textsf","SansSerif-Regular"],["mathsf","textsf","SansSerif-Regular"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathitsf","textitsf","SansSerif-Italic"],["mathitsf","textitsf","SansSerif-Italic"],["","",""],["","",""],["mathtt","texttt","Typewriter-Regular"],["mathtt","texttt","Typewriter-Regular"]],ei=[["mathbf","textbf","Main-Bold"],["","",""],["mathsf","textsf","SansSerif-Regular"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathtt","texttt","Typewriter-Regular"]],ti=function(e,t,i){return vt[i][e]&&vt[i][e].replace&&(e=vt[i][e].replace),{value:e,metrics:Ge(e,t,i)}},ii=function(e,t,i,r,n){var s,a=ti(e,t,i),o=a.metrics;if(e=a.value,o){var l=o.italic;("text"===i||r&&"mathit"===r.font)&&(l=0),s=new dt(e,o.height,o.depth,l,o.skew,o.width,n)}else"undefined"!=typeof console&&console.warn("No character metrics for '"+e+"' in style '"+t+"' and mode '"+i+"'"),s=new dt(e,0,0,0,0,0,n);if(r){s.maxFontSize=r.sizeMultiplier,r.style.isTight()&&s.classes.push("mtight");var h=r.getColor();h&&(s.style.color=h)}return s},ri=(e,t)=>{if(it(e.classes)!==it(t.classes)||e.skew!==t.skew||e.maxFontSize!==t.maxFontSize)return!1;if(1===e.classes.length){var i=e.classes[0];if("mbin"===i||"mord"===i)return!1}for(var r in e.style)if(e.style.hasOwnProperty(r)&&e.style[r]!==t.style[r])return!1;for(var n in t.style)if(t.style.hasOwnProperty(n)&&e.style[n]!==t.style[n])return!1;return!0},ni=function(e){for(var t=0,i=0,r=0,n=0;n<e.children.length;n++){var s=e.children[n];s.height>t&&(t=s.height),s.depth>i&&(i=s.depth),s.maxFontSize>r&&(r=s.maxFontSize)}e.height=t,e.depth=i,e.maxFontSize=r},si=function(e,t,i,r){var n=new ot(e,t,i,r);return ni(n),n},ai=(e,t,i,r)=>new ot(e,t,i,r),oi=function(e){var t=new qe(e);return ni(t),t},li=function(e,t,i){var r="";switch(e){case"amsrm":r="AMS";break;case"textrm":r="Main";break;case"textsf":r="SansSerif";break;case"texttt":r="Typewriter";break;default:r=e}return r+"-"+("textbf"===t&&"textit"===i?"BoldItalic":"textbf"===t?"Bold":"textit"===t?"Italic":"Regular")},hi={mathbf:{variant:"bold",fontName:"Main-Bold"},mathrm:{variant:"normal",fontName:"Main-Regular"},textit:{variant:"italic",fontName:"Main-Italic"},mathit:{variant:"italic",fontName:"Main-Italic"},mathnormal:{variant:"italic",fontName:"Math-Italic"},mathsfit:{variant:"sans-serif-italic",fontName:"SansSerif-Italic"},mathbb:{variant:"double-struck",fontName:"AMS-Regular"},mathcal:{variant:"script",fontName:"Caligraphic-Regular"},mathfrak:{variant:"fraktur",fontName:"Fraktur-Regular"},mathscr:{variant:"script",fontName:"Script-Regular"},mathsf:{variant:"sans-serif",fontName:"SansSerif-Regular"},mathtt:{variant:"monospace",fontName:"Typewriter-Regular"}},ci={vec:["vec",.471,.714],oiintSize1:["oiintSize1",.957,.499],oiintSize2:["oiintSize2",1.472,.659],oiiintSize1:["oiiintSize1",1.304,.499],oiiintSize2:["oiiintSize2",1.98,.659]},di={fontMap:hi,makeSymbol:ii,mathsym:function(e,t,i,r){return void 0===r&&(r=[]),"boldsymbol"===i.font&&ti(e,"Main-Bold",t).metrics?ii(e,"Main-Bold",t,i,r.concat(["mathbf"])):"\\"===e||"main"===vt[t][e].font?ii(e,"Main-Regular",t,i,r):ii(e,"AMS-Regular",t,i,r.concat(["amsrm"]))},makeSpan:si,makeSvgSpan:ai,makeLineSpan:function(e,t,i){var r=si([e],[],t);return r.height=Math.max(i||t.fontMetrics().defaultRuleThickness,t.minRuleThickness),r.style.borderBottomWidth=tt(r.height),r.maxFontSize=1,r},makeAnchor:function(e,t,i,r){var n=new lt(e,t,i,r);return ni(n),n},makeFragment:oi,wrapFragment:function(e,t){return e instanceof qe?si([],[e],t):e},makeVList:function(e,t){for(var{children:i,depth:r}=function(e){if("individualShift"===e.positionType){for(var t=e.children,i=[t[0]],r=-t[0].shift-t[0].elem.depth,n=r,s=1;s<t.length;s++){var a=-t[s].shift-n-t[s].elem.depth,o=a-(t[s-1].elem.height+t[s-1].elem.depth);n+=a,i.push({type:"kern",size:o}),i.push(t[s])}return{children:i,depth:r}}var l;if("top"===e.positionType){for(var h=e.positionData,c=0;c<e.children.length;c++){var d=e.children[c];h-="kern"===d.type?d.size:d.elem.height+d.elem.depth}l=h}else if("bottom"===e.positionType)l=-e.positionData;else{var u=e.children[0];if("elem"!==u.type)throw new Error('First child must have type "elem".');if("shift"===e.positionType)l=-u.elem.depth-e.positionData;else{if("firstBaseline"!==e.positionType)throw new Error("Invalid positionType "+e.positionType+".");l=-u.elem.depth}}return{children:e.children,depth:l}}(e),n=0,s=0;s<i.length;s++){var a=i[s];if("elem"===a.type){var o=a.elem;n=Math.max(n,o.maxFontSize,o.height)}}n+=2;var l=si(["pstrut"],[]);l.style.height=tt(n);for(var h=[],c=r,d=r,u=r,p=0;p<i.length;p++){var m=i[p];if("kern"===m.type)u+=m.size;else{var g=m.elem,f=m.wrapperClasses||[],b=m.wrapperStyle||{},v=si(f,[l,g],void 0,b);v.style.top=tt(-n-u-g.depth),m.marginLeft&&(v.style.marginLeft=m.marginLeft),m.marginRight&&(v.style.marginRight=m.marginRight),h.push(v),u+=g.height+g.depth}c=Math.min(c,u),d=Math.max(d,u)}var y,w=si(["vlist"],h);if(w.style.height=tt(d),c<0){var x=si([],[]),A=si(["vlist"],[x]);A.style.height=tt(-c);var k=si(["vlist-s"],[new dt("")]);y=[si(["vlist-r"],[w,k]),si(["vlist-r"],[A])]}else y=[si(["vlist-r"],[w])];var E=si(["vlist-t"],y);return 2===y.length&&E.classes.push("vlist-t2"),E.height=d,E.depth=-c,E},makeOrd:function(e,t,i){var r=e.mode,n=e.text,s=["mord"],a="math"===r||"text"===r&&t.font,o=a?t.font:t.fontFamily,l="",h="";if(55349===n.charCodeAt(0)&&([l,h]=function(e,t){var i=1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320)+65536,r="math"===t?0:1;if(119808<=i&&i<120484){var n=Math.floor((i-119808)/26);return[Qt[n][2],Qt[n][r]]}if(120782<=i&&i<=120831){var s=Math.floor((i-120782)/10);return[ei[s][2],ei[s][r]]}if(120485===i||120486===i)return[Qt[0][2],Qt[0][r]];if(120486<i&&i<120782)return["",""];throw new ve("Unsupported character: "+e)}(n,r)),l.length>0)return ii(n,l,r,t,s.concat(h));if(o){var c,d;if("boldsymbol"===o){var u=function(e,t,i,r,n){return"textord"!==n&&ti(e,"Math-BoldItalic",t).metrics?{fontName:"Math-BoldItalic",fontClass:"boldsymbol"}:{fontName:"Main-Bold",fontClass:"mathbf"}}(n,r,0,0,i);c=u.fontName,d=[u.fontClass]}else a?(c=hi[o].fontName,d=[o]):(c=li(o,t.fontWeight,t.fontShape),d=[o,t.fontWeight,t.fontShape]);if(ti(n,c,r).metrics)return ii(n,c,r,t,s.concat(d));if(Dt.hasOwnProperty(n)&&"Typewriter"===c.slice(0,10)){for(var p=[],m=0;m<n.length;m++)p.push(ii(n[m],c,r,t,s.concat(d)));return oi(p)}}if("mathord"===i)return ii(n,"Math-Italic",r,t,s.concat(["mathnormal"]));if("textord"===i){var g=vt[r][n]&&vt[r][n].font;if("ams"===g){var f=li("amsrm",t.fontWeight,t.fontShape);return ii(n,f,r,t,s.concat("amsrm",t.fontWeight,t.fontShape))}if("main"!==g&&g){var b=li(g,t.fontWeight,t.fontShape);return ii(n,b,r,t,s.concat(b,t.fontWeight,t.fontShape))}var v=li("textrm",t.fontWeight,t.fontShape);return ii(n,v,r,t,s.concat(t.fontWeight,t.fontShape))}throw new Error("unexpected type: "+i+" in makeOrd")},makeGlue:(e,t)=>{var i=si(["mspace"],[],t),r=et(e,t);return i.style.marginRight=tt(r),i},staticSvg:function(e,t){var[i,r,n]=ci[e],s=new pt(i),a=new ut([s],{width:tt(r),height:tt(n),style:"width:"+tt(r),viewBox:"0 0 "+1e3*r+" "+1e3*n,preserveAspectRatio:"xMinYMin"}),o=ai(["overlay"],[a],t);return o.height=n,o.style.height=tt(n),o.style.width=tt(r),o},svgData:ci,tryCombineChars:e=>{for(var t=0;t<e.length-1;t++){var i=e[t],r=e[t+1];i instanceof dt&&r instanceof dt&&ri(i,r)&&(i.text+=r.text,i.height=Math.max(i.height,r.height),i.depth=Math.max(i.depth,r.depth),i.italic=r.italic,e.splice(t+1,1),t--)}return e}},ui={number:3,unit:"mu"},pi={number:4,unit:"mu"},mi={number:5,unit:"mu"},gi={mord:{mop:ui,mbin:pi,mrel:mi,minner:ui},mop:{mord:ui,mop:ui,mrel:mi,minner:ui},mbin:{mord:pi,mop:pi,mopen:pi,minner:pi},mrel:{mord:mi,mop:mi,mopen:mi,minner:mi},mopen:{},mclose:{mop:ui,mbin:pi,mrel:mi,minner:ui},mpunct:{mord:ui,mop:ui,mrel:mi,mopen:ui,mclose:ui,mpunct:ui,minner:ui},minner:{mord:ui,mop:ui,mbin:pi,mrel:mi,mopen:ui,mpunct:ui,minner:ui}},fi={mord:{mop:ui},mop:{mord:ui,mop:ui},mbin:{},mrel:{},mopen:{},mclose:{mop:ui},mpunct:{},minner:{mop:ui}},bi={},vi={},yi={};function wi(e){for(var{type:t,names:i,props:r,handler:n,htmlBuilder:s,mathmlBuilder:a}=e,o={type:t,numArgs:r.numArgs,argTypes:r.argTypes,allowedInArgument:!!r.allowedInArgument,allowedInText:!!r.allowedInText,allowedInMath:void 0===r.allowedInMath||r.allowedInMath,numOptionalArgs:r.numOptionalArgs||0,infix:!!r.infix,primitive:!!r.primitive,handler:n},l=0;l<i.length;++l)bi[i[l]]=o;t&&(s&&(vi[t]=s),a&&(yi[t]=a))}function xi(e){var{type:t,htmlBuilder:i,mathmlBuilder:r}=e;wi({type:t,names:[],props:{numArgs:0},handler(){throw new Error("Should never be called.")},htmlBuilder:i,mathmlBuilder:r})}var Ai=function(e){return"ordgroup"===e.type&&1===e.body.length?e.body[0]:e},ki=function(e){return"ordgroup"===e.type?e.body:[e]},Ei=di.makeSpan,Si=["leftmost","mbin","mopen","mrel","mop","mpunct"],Ci=["rightmost","mrel","mclose","mpunct"],Mi={display:De.DISPLAY,text:De.TEXT,script:De.SCRIPT,scriptscript:De.SCRIPTSCRIPT},_i={mord:"mord",mop:"mop",mbin:"mbin",mrel:"mrel",mopen:"mopen",mclose:"mclose",mpunct:"mpunct",minner:"minner"},Ti=function(e,t,i,r){void 0===r&&(r=[null,null]);for(var n=[],s=0;s<e.length;s++){var a=Di(e[s],t);if(a instanceof qe){var o=a.children;n.push(...o)}else n.push(a)}if(di.tryCombineChars(n),!i)return n;var l=t;if(1===e.length){var h=e[0];"sizing"===h.type?l=t.havingSize(h.size):"styling"===h.type&&(l=t.havingStyle(Mi[h.style]))}var c=Ei([r[0]||"leftmost"],[],t),d=Ei([r[1]||"rightmost"],[],t),u="root"===i;return Ni(n,((e,t)=>{var i=t.classes[0],r=e.classes[0];"mbin"===i&&ke.contains(Ci,r)?t.classes[0]="mord":"mbin"===r&&ke.contains(Si,i)&&(e.classes[0]="mord")}),{node:c},d,u),Ni(n,((e,t)=>{var i=Pi(t),r=Pi(e),n=i&&r?e.hasClass("mtight")?fi[i][r]:gi[i][r]:null;if(n)return di.makeGlue(n,l)}),{node:c},d,u),n},Ni=function e(t,i,r,n,s){n&&t.push(n);for(var a=0;a<t.length;a++){var o=t[a],l=Ii(o);if(l)e(l.children,i,r,null,s);else{var h=!o.hasClass("mspace");if(h){var c=i(o,r.node);c&&(r.insertAfter?r.insertAfter(c):(t.unshift(c),a++))}h?r.node=o:s&&o.hasClass("newline")&&(r.node=Ei(["leftmost"])),r.insertAfter=(e=>i=>{t.splice(e+1,0,i),a++})(a)}}n&&t.pop()},Ii=function(e){return e instanceof qe||e instanceof lt||e instanceof ot&&e.hasClass("enclosing")?e:null},Li=function e(t,i){var r=Ii(t);if(r){var n=r.children;if(n.length){if("right"===i)return e(n[n.length-1],"right");if("left"===i)return e(n[0],"left")}}return t},Pi=function(e,t){return e?(t&&(e=Li(e,t)),_i[e.classes[0]]||null):null},Ri=function(e,t){var i=["nulldelimiter"].concat(e.baseSizingClasses());return Ei(t.concat(i))},Di=function(e,t,i){if(!e)return Ei();if(vi[e.type]){var r=vi[e.type](e,t);if(i&&t.size!==i.size){r=Ei(t.sizingClasses(i),[r],t);var n=t.sizeMultiplier/i.sizeMultiplier;r.height*=n,r.depth*=n}return r}throw new ve("Got group of unknown type: '"+e.type+"'")};function zi(e,t){var i=Ei(["base"],e,t),r=Ei(["strut"]);return r.style.height=tt(i.height+i.depth),i.depth&&(r.style.verticalAlign=tt(-i.depth)),i.children.unshift(r),i}function Fi(e,t){var i=null;1===e.length&&"tag"===e[0].type&&(i=e[0].tag,e=e[0].body);var r,n=Ti(e,t,"root");2===n.length&&n[1].hasClass("tag")&&(r=n.pop());for(var s,a=[],o=[],l=0;l<n.length;l++)if(o.push(n[l]),n[l].hasClass("mbin")||n[l].hasClass("mrel")||n[l].hasClass("allowbreak")){for(var h=!1;l<n.length-1&&n[l+1].hasClass("mspace")&&!n[l+1].hasClass("newline");)l++,o.push(n[l]),n[l].hasClass("nobreak")&&(h=!0);h||(a.push(zi(o,t)),o=[])}else n[l].hasClass("newline")&&(o.pop(),o.length>0&&(a.push(zi(o,t)),o=[]),a.push(n[l]));o.length>0&&a.push(zi(o,t)),i?((s=zi(Ti(i,t,!0))).classes=["tag"],a.push(s)):r&&a.push(r);var c=Ei(["katex-html"],a);if(c.setAttribute("aria-hidden","true"),s){var d=s.children[0];d.style.height=tt(c.height+c.depth),c.depth&&(d.style.verticalAlign=tt(-c.depth))}return c}function Oi(e){return new qe(e)}class Bi{constructor(e,t,i){this.type=void 0,this.attributes=void 0,this.children=void 0,this.classes=void 0,this.type=e,this.attributes={},this.children=t||[],this.classes=i||[]}setAttribute(e,t){this.attributes[e]=t}getAttribute(e){return this.attributes[e]}toNode(){var e=document.createElementNS("http://www.w3.org/1998/Math/MathML",this.type);for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&e.setAttribute(t,this.attributes[t]);this.classes.length>0&&(e.className=it(this.classes));for(var i=0;i<this.children.length;i++)if(this.children[i]instanceof Hi&&this.children[i+1]instanceof Hi){for(var r=this.children[i].toText()+this.children[++i].toText();this.children[i+1]instanceof Hi;)r+=this.children[++i].toText();e.appendChild(new Hi(r).toNode())}else e.appendChild(this.children[i].toNode());return e}toMarkup(){var e="<"+this.type;for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&(e+=" "+t+'="',e+=ke.escape(this.attributes[t]),e+='"');this.classes.length>0&&(e+=' class ="'+ke.escape(it(this.classes))+'"'),e+=">";for(var i=0;i<this.children.length;i++)e+=this.children[i].toMarkup();return e+="</"+this.type+">"}toText(){return this.children.map((e=>e.toText())).join("")}}class Hi{constructor(e){this.text=void 0,this.text=e}toNode(){return document.createTextNode(this.text)}toMarkup(){return ke.escape(this.toText())}toText(){return this.text}}var qi={MathNode:Bi,TextNode:Hi,SpaceNode:class{constructor(e){this.width=void 0,this.character=void 0,this.width=e,this.character=e>=.05555&&e<=.05556?" ":e>=.1666&&e<=.1667?" ":e>=.2222&&e<=.2223?" ":e>=.2777&&e<=.2778?" ":e>=-.05556&&e<=-.05555?" ":e>=-.1667&&e<=-.1666?" ":e>=-.2223&&e<=-.2222?" ":e>=-.2778&&e<=-.2777?" ":null}toNode(){if(this.character)return document.createTextNode(this.character);var e=document.createElementNS("http://www.w3.org/1998/Math/MathML","mspace");return e.setAttribute("width",tt(this.width)),e}toMarkup(){return this.character?"<mtext>"+this.character+"</mtext>":'<mspace width="'+tt(this.width)+'"/>'}toText(){return this.character?this.character:" "}},newDocumentFragment:Oi},ji=function(e,t,i){return!vt[t][e]||!vt[t][e].replace||55349===e.charCodeAt(0)||Dt.hasOwnProperty(e)&&i&&(i.fontFamily&&"tt"===i.fontFamily.slice(4,6)||i.font&&"tt"===i.font.slice(4,6))||(e=vt[t][e].replace),new qi.TextNode(e)},Vi=function(e){return 1===e.length?e[0]:new qi.MathNode("mrow",e)},Ui=function(e,t){if("texttt"===t.fontFamily)return"monospace";if("textsf"===t.fontFamily)return"textit"===t.fontShape&&"textbf"===t.fontWeight?"sans-serif-bold-italic":"textit"===t.fontShape?"sans-serif-italic":"textbf"===t.fontWeight?"bold-sans-serif":"sans-serif";if("textit"===t.fontShape&&"textbf"===t.fontWeight)return"bold-italic";if("textit"===t.fontShape)return"italic";if("textbf"===t.fontWeight)return"bold";var i=t.font;if(!i||"mathnormal"===i)return null;var r=e.mode;if("mathit"===i)return"italic";if("boldsymbol"===i)return"textord"===e.type?"bold":"bold-italic";if("mathbf"===i)return"bold";if("mathbb"===i)return"double-struck";if("mathsfit"===i)return"sans-serif-italic";if("mathfrak"===i)return"fraktur";if("mathscr"===i||"mathcal"===i)return"script";if("mathsf"===i)return"sans-serif";if("mathtt"===i)return"monospace";var n=e.text;return ke.contains(["\\imath","\\jmath"],n)?null:(vt[r][n]&&vt[r][n].replace&&(n=vt[r][n].replace),Ge(n,di.fontMap[i].fontName,r)?di.fontMap[i].variant:null)};function Gi(e){if(!e)return!1;if("mi"===e.type&&1===e.children.length){var t=e.children[0];return t instanceof Hi&&"."===t.text}if("mo"===e.type&&1===e.children.length&&"true"===e.getAttribute("separator")&&"0em"===e.getAttribute("lspace")&&"0em"===e.getAttribute("rspace")){var i=e.children[0];return i instanceof Hi&&","===i.text}return!1}var $i=function(e,t,i){if(1===e.length){var r=Xi(e[0],t);return i&&r instanceof Bi&&"mo"===r.type&&(r.setAttribute("lspace","0em"),r.setAttribute("rspace","0em")),[r]}for(var n,s=[],a=0;a<e.length;a++){var o=Xi(e[a],t);if(o instanceof Bi&&n instanceof Bi){if("mtext"===o.type&&"mtext"===n.type&&o.getAttribute("mathvariant")===n.getAttribute("mathvariant")){n.children.push(...o.children);continue}if("mn"===o.type&&"mn"===n.type){n.children.push(...o.children);continue}if(Gi(o)&&"mn"===n.type){n.children.push(...o.children);continue}if("mn"===o.type&&Gi(n))o.children=[...n.children,...o.children],s.pop();else if(("msup"===o.type||"msub"===o.type)&&o.children.length>=1&&("mn"===n.type||Gi(n))){var l=o.children[0];l instanceof Bi&&"mn"===l.type&&(l.children=[...n.children,...l.children],s.pop())}else if("mi"===n.type&&1===n.children.length){var h=n.children[0];if(h instanceof Hi&&"̸"===h.text&&("mo"===o.type||"mi"===o.type||"mn"===o.type)){var c=o.children[0];c instanceof Hi&&c.text.length>0&&(c.text=c.text.slice(0,1)+"̸"+c.text.slice(1),s.pop())}}}s.push(o),n=o}return s},Wi=function(e,t,i){return Vi($i(e,t,i))},Xi=function(e,t){if(!e)return new qi.MathNode("mrow");if(yi[e.type])return yi[e.type](e,t);throw new ve("Got group of unknown type: '"+e.type+"'")};function Yi(e,t,i,r,n){var s,a=$i(e,i);s=1===a.length&&a[0]instanceof Bi&&ke.contains(["mrow","mtable"],a[0].type)?a[0]:new qi.MathNode("mrow",a);var o=new qi.MathNode("annotation",[new qi.TextNode(t)]);o.setAttribute("encoding","application/x-tex");var l=new qi.MathNode("semantics",[s,o]),h=new qi.MathNode("math",[l]);h.setAttribute("xmlns","http://www.w3.org/1998/Math/MathML"),r&&h.setAttribute("display","block");var c=n?"katex":"katex-mathml";return di.makeSpan([c],[h])}var Ki=function(e){return new Ke({style:e.displayMode?De.DISPLAY:De.TEXT,maxSize:e.maxSize,minRuleThickness:e.minRuleThickness})},Zi=function(e,t){if(t.displayMode){var i=["katex-display"];t.leqno&&i.push("leqno"),t.fleqn&&i.push("fleqn"),e=di.makeSpan(i,[e])}return e},Ji={widehat:"^",widecheck:"ˇ",widetilde:"~",utilde:"~",overleftarrow:"←",underleftarrow:"←",xleftarrow:"←",overrightarrow:"→",underrightarrow:"→",xrightarrow:"→",underbrace:"⏟",overbrace:"⏞",overgroup:"⏠",undergroup:"⏡",overleftrightarrow:"↔",underleftrightarrow:"↔",xleftrightarrow:"↔",Overrightarrow:"⇒",xRightarrow:"⇒",overleftharpoon:"↼",xleftharpoonup:"↼",overrightharpoon:"⇀",xrightharpoonup:"⇀",xLeftarrow:"⇐",xLeftrightarrow:"⇔",xhookleftarrow:"↩",xhookrightarrow:"↪",xmapsto:"↦",xrightharpoondown:"⇁",xleftharpoondown:"↽",xrightleftharpoons:"⇌",xleftrightharpoons:"⇋",xtwoheadleftarrow:"↞",xtwoheadrightarrow:"↠",xlongequal:"=",xtofrom:"⇄",xrightleftarrows:"⇄",xrightequilibrium:"⇌",xleftequilibrium:"⇋","\\cdrightarrow":"→","\\cdleftarrow":"←","\\cdlongequal":"="},Qi={overrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],overleftarrow:[["leftarrow"],.888,522,"xMinYMin"],underrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],underleftarrow:[["leftarrow"],.888,522,"xMinYMin"],xrightarrow:[["rightarrow"],1.469,522,"xMaxYMin"],"\\cdrightarrow":[["rightarrow"],3,522,"xMaxYMin"],xleftarrow:[["leftarrow"],1.469,522,"xMinYMin"],"\\cdleftarrow":[["leftarrow"],3,522,"xMinYMin"],Overrightarrow:[["doublerightarrow"],.888,560,"xMaxYMin"],xRightarrow:[["doublerightarrow"],1.526,560,"xMaxYMin"],xLeftarrow:[["doubleleftarrow"],1.526,560,"xMinYMin"],overleftharpoon:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoonup:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoondown:[["leftharpoondown"],.888,522,"xMinYMin"],overrightharpoon:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoonup:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoondown:[["rightharpoondown"],.888,522,"xMaxYMin"],xlongequal:[["longequal"],.888,334,"xMinYMin"],"\\cdlongequal":[["longequal"],3,334,"xMinYMin"],xtwoheadleftarrow:[["twoheadleftarrow"],.888,334,"xMinYMin"],xtwoheadrightarrow:[["twoheadrightarrow"],.888,334,"xMaxYMin"],overleftrightarrow:[["leftarrow","rightarrow"],.888,522],overbrace:[["leftbrace","midbrace","rightbrace"],1.6,548],underbrace:[["leftbraceunder","midbraceunder","rightbraceunder"],1.6,548],underleftrightarrow:[["leftarrow","rightarrow"],.888,522],xleftrightarrow:[["leftarrow","rightarrow"],1.75,522],xLeftrightarrow:[["doubleleftarrow","doublerightarrow"],1.75,560],xrightleftharpoons:[["leftharpoondownplus","rightharpoonplus"],1.75,716],xleftrightharpoons:[["leftharpoonplus","rightharpoondownplus"],1.75,716],xhookleftarrow:[["leftarrow","righthook"],1.08,522],xhookrightarrow:[["lefthook","rightarrow"],1.08,522],overlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],underlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],overgroup:[["leftgroup","rightgroup"],.888,342],undergroup:[["leftgroupunder","rightgroupunder"],.888,342],xmapsto:[["leftmapsto","rightarrow"],1.5,522],xtofrom:[["leftToFrom","rightToFrom"],1.75,528],xrightleftarrows:[["baraboveleftarrow","rightarrowabovebar"],1.75,901],xrightequilibrium:[["baraboveshortleftharpoon","rightharpoonaboveshortbar"],1.75,716],xleftequilibrium:[["shortbaraboveleftharpoon","shortrightharpoonabovebar"],1.75,716]},er=function(e,t,i,r,n){var s,a=e.height+e.depth+i+r;if(/fbox|color|angl/.test(t)){if(s=di.makeSpan(["stretchy",t],[],n),"fbox"===t){var o=n.color&&n.getColor();o&&(s.style.borderColor=o)}}else{var l=[];/^[bx]cancel$/.test(t)&&l.push(new mt({x1:"0",y1:"0",x2:"100%",y2:"100%","stroke-width":"0.046em"})),/^x?cancel$/.test(t)&&l.push(new mt({x1:"0",y1:"100%",x2:"100%",y2:"0","stroke-width":"0.046em"}));var h=new ut(l,{width:"100%",height:tt(a)});s=di.makeSvgSpan([],[h],n)}return s.height=a,s.style.height=tt(a),s},tr=function(e){var t=new qi.MathNode("mo",[new qi.TextNode(Ji[e.replace(/^\\/,"")])]);return t.setAttribute("stretchy","true"),t},ir=function(e,t){var{span:i,minWidth:r,height:n}=function(){var i=4e5,r=e.label.slice(1);if(ke.contains(["widehat","widecheck","widetilde","utilde"],r)){var n,s,a,o="ordgroup"===(p=e.base).type?p.body.length:1;if(o>5)"widehat"===r||"widecheck"===r?(n=420,i=2364,a=.42,s=r+"4"):(n=312,i=2340,a=.34,s="tilde4");else{var l=[1,1,2,2,3,3][o];"widehat"===r||"widecheck"===r?(i=[0,1062,2364,2364,2364][l],n=[0,239,300,360,420][l],a=[0,.24,.3,.3,.36,.42][l],s=r+l):(i=[0,600,1033,2339,2340][l],n=[0,260,286,306,312][l],a=[0,.26,.286,.3,.306,.34][l],s="tilde"+l)}var h=new pt(s),c=new ut([h],{width:"100%",height:tt(a),viewBox:"0 0 "+i+" "+n,preserveAspectRatio:"none"});return{span:di.makeSvgSpan([],[c],t),minWidth:0,height:a}}var d,u,p,m=[],g=Qi[r],[f,b,v]=g,y=v/1e3,w=f.length;if(1===w)d=["hide-tail"],u=[g[3]];else if(2===w)d=["halfarrow-left","halfarrow-right"],u=["xMinYMin","xMaxYMin"];else{if(3!==w)throw new Error("Correct katexImagesData or update code here to support\n "+w+" children.");d=["brace-left","brace-center","brace-right"],u=["xMinYMin","xMidYMin","xMaxYMin"]}for(var x=0;x<w;x++){var A=new pt(f[x]),k=new ut([A],{width:"400em",height:tt(y),viewBox:"0 0 "+i+" "+v,preserveAspectRatio:u[x]+" slice"}),E=di.makeSvgSpan([d[x]],[k],t);if(1===w)return{span:E,minWidth:b,height:y};E.style.height=tt(y),m.push(E)}return{span:di.makeSpan(["stretchy"],m,t),minWidth:b,height:y}}();return i.height=n,i.style.height=tt(n),r>0&&(i.style.minWidth=tt(r)),i};function rr(e,t){if(!e||e.type!==t)throw new Error("Expected node of type "+t+", but got "+(e?"node of type "+e.type:String(e)));return e}function nr(e){var t=sr(e);if(!t)throw new Error("Expected node of symbol group type, but got "+(e?"node of type "+e.type:String(e)));return t}function sr(e){return e&&("atom"===e.type||bt.hasOwnProperty(e.type))?e:null}var ar=(e,t)=>{var i,r,n;e&&"supsub"===e.type?(i=(r=rr(e.base,"accent")).base,e.base=i,n=function(e){if(e instanceof ot)return e;throw new Error("Expected span<HtmlDomNode> but got "+String(e)+".")}(Di(e,t)),e.base=r):i=(r=rr(e,"accent")).base;var s=Di(i,t.havingCrampedStyle()),a=0;if(r.isShifty&&ke.isCharacterBox(i)){var o=ke.getBaseElem(i);a=gt(Di(o,t.havingCrampedStyle())).skew}var l,h="\\c"===r.label,c=h?s.height+s.depth:Math.min(s.height,t.fontMetrics().xHeight);if(r.isStretchy)l=ir(r,t),l=di.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:s},{type:"elem",elem:l,wrapperClasses:["svg-align"],wrapperStyle:a>0?{width:"calc(100% - "+tt(2*a)+")",marginLeft:tt(2*a)}:void 0}]},t);else{var d,u;"\\vec"===r.label?(d=di.staticSvg("vec",t),u=di.svgData.vec[1]):((d=gt(d=di.makeOrd({mode:r.mode,text:r.label},t,"textord"))).italic=0,u=d.width,h&&(c+=d.depth)),l=di.makeSpan(["accent-body"],[d]);var p="\\textcircled"===r.label;p&&(l.classes.push("accent-full"),c=s.height);var m=a;p||(m-=u/2),l.style.left=tt(m),"\\textcircled"===r.label&&(l.style.top=".2em"),l=di.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:s},{type:"kern",size:-c},{type:"elem",elem:l}]},t)}var g=di.makeSpan(["mord","accent"],[l],t);return n?(n.children[0]=g,n.height=Math.max(g.height,n.height),n.classes[0]="mord",n):g},or=(e,t)=>{var i=e.isStretchy?tr(e.label):new qi.MathNode("mo",[ji(e.label,e.mode)]),r=new qi.MathNode("mover",[Xi(e.base,t),i]);return r.setAttribute("accent","true"),r},lr=new RegExp(["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring"].map((e=>"\\"+e)).join("|"));wi({type:"accent",names:["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring","\\widecheck","\\widehat","\\widetilde","\\overrightarrow","\\overleftarrow","\\Overrightarrow","\\overleftrightarrow","\\overgroup","\\overlinesegment","\\overleftharpoon","\\overrightharpoon"],props:{numArgs:1},handler:(e,t)=>{var i=Ai(t[0]),r=!lr.test(e.funcName),n=!r||"\\widehat"===e.funcName||"\\widetilde"===e.funcName||"\\widecheck"===e.funcName;return{type:"accent",mode:e.parser.mode,label:e.funcName,isStretchy:r,isShifty:n,base:i}},htmlBuilder:ar,mathmlBuilder:or}),wi({type:"accent",names:["\\'","\\`","\\^","\\~","\\=","\\u","\\.",'\\"',"\\c","\\r","\\H","\\v","\\textcircled"],props:{numArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["primitive"]},handler:(e,t)=>{var i=t[0],r=e.parser.mode;return"math"===r&&(e.parser.settings.reportNonstrict("mathVsTextAccents","LaTeX's accent "+e.funcName+" works only in text mode"),r="text"),{type:"accent",mode:r,label:e.funcName,isStretchy:!1,isShifty:!0,base:i}},htmlBuilder:ar,mathmlBuilder:or}),wi({type:"accentUnder",names:["\\underleftarrow","\\underrightarrow","\\underleftrightarrow","\\undergroup","\\underlinesegment","\\utilde"],props:{numArgs:1},handler:(e,t)=>{var{parser:i,funcName:r}=e,n=t[0];return{type:"accentUnder",mode:i.mode,label:r,base:n}},htmlBuilder:(e,t)=>{var i=Di(e.base,t),r=ir(e,t),n="\\utilde"===e.label?.12:0,s=di.makeVList({positionType:"top",positionData:i.height,children:[{type:"elem",elem:r,wrapperClasses:["svg-align"]},{type:"kern",size:n},{type:"elem",elem:i}]},t);return di.makeSpan(["mord","accentunder"],[s],t)},mathmlBuilder:(e,t)=>{var i=tr(e.label),r=new qi.MathNode("munder",[Xi(e.base,t),i]);return r.setAttribute("accentunder","true"),r}});var hr=e=>{var t=new qi.MathNode("mpadded",e?[e]:[]);return t.setAttribute("width","+0.6em"),t.setAttribute("lspace","0.3em"),t};wi({type:"xArrow",names:["\\xleftarrow","\\xrightarrow","\\xLeftarrow","\\xRightarrow","\\xleftrightarrow","\\xLeftrightarrow","\\xhookleftarrow","\\xhookrightarrow","\\xmapsto","\\xrightharpoondown","\\xrightharpoonup","\\xleftharpoondown","\\xleftharpoonup","\\xrightleftharpoons","\\xleftrightharpoons","\\xlongequal","\\xtwoheadrightarrow","\\xtwoheadleftarrow","\\xtofrom","\\xrightleftarrows","\\xrightequilibrium","\\xleftequilibrium","\\\\cdrightarrow","\\\\cdleftarrow","\\\\cdlongequal"],props:{numArgs:1,numOptionalArgs:1},handler(e,t,i){var{parser:r,funcName:n}=e;return{type:"xArrow",mode:r.mode,label:n,body:t[0],below:i[0]}},htmlBuilder(e,t){var i,r=t.style,n=t.havingStyle(r.sup()),s=di.wrapFragment(Di(e.body,n,t),t),a="\\x"===e.label.slice(0,2)?"x":"cd";s.classes.push(a+"-arrow-pad"),e.below&&(n=t.havingStyle(r.sub()),(i=di.wrapFragment(Di(e.below,n,t),t)).classes.push(a+"-arrow-pad"));var o,l=ir(e,t),h=-t.fontMetrics().axisHeight+.5*l.height,c=-t.fontMetrics().axisHeight-.5*l.height-.111;if((s.depth>.25||"\\xleftequilibrium"===e.label)&&(c-=s.depth),i){var d=-t.fontMetrics().axisHeight+i.height+.5*l.height+.111;o=di.makeVList({positionType:"individualShift",children:[{type:"elem",elem:s,shift:c},{type:"elem",elem:l,shift:h},{type:"elem",elem:i,shift:d}]},t)}else o=di.makeVList({positionType:"individualShift",children:[{type:"elem",elem:s,shift:c},{type:"elem",elem:l,shift:h}]},t);return o.children[0].children[0].children[1].classes.push("svg-align"),di.makeSpan(["mrel","x-arrow"],[o],t)},mathmlBuilder(e,t){var i,r=tr(e.label);if(r.setAttribute("minsize","x"===e.label.charAt(0)?"1.75em":"3.0em"),e.body){var n=hr(Xi(e.body,t));if(e.below){var s=hr(Xi(e.below,t));i=new qi.MathNode("munderover",[r,s,n])}else i=new qi.MathNode("mover",[r,n])}else if(e.below){var a=hr(Xi(e.below,t));i=new qi.MathNode("munder",[r,a])}else i=hr(),i=new qi.MathNode("mover",[r,i]);return i}});var cr=di.makeSpan;function dr(e,t){var i=Ti(e.body,t,!0);return cr([e.mclass],i,t)}function ur(e,t){var i,r=$i(e.body,t);return"minner"===e.mclass?i=new qi.MathNode("mpadded",r):"mord"===e.mclass?e.isCharacterBox?(i=r[0]).type="mi":i=new qi.MathNode("mi",r):(e.isCharacterBox?(i=r[0]).type="mo":i=new qi.MathNode("mo",r),"mbin"===e.mclass?(i.attributes.lspace="0.22em",i.attributes.rspace="0.22em"):"mpunct"===e.mclass?(i.attributes.lspace="0em",i.attributes.rspace="0.17em"):"mopen"===e.mclass||"mclose"===e.mclass?(i.attributes.lspace="0em",i.attributes.rspace="0em"):"minner"===e.mclass&&(i.attributes.lspace="0.0556em",i.attributes.width="+0.1111em")),i}wi({type:"mclass",names:["\\mathord","\\mathbin","\\mathrel","\\mathopen","\\mathclose","\\mathpunct","\\mathinner"],props:{numArgs:1,primitive:!0},handler(e,t){var{parser:i,funcName:r}=e,n=t[0];return{type:"mclass",mode:i.mode,mclass:"m"+r.slice(5),body:ki(n),isCharacterBox:ke.isCharacterBox(n)}},htmlBuilder:dr,mathmlBuilder:ur});var pr=e=>{var t="ordgroup"===e.type&&e.body.length?e.body[0]:e;return"atom"!==t.type||"bin"!==t.family&&"rel"!==t.family?"mord":"m"+t.family};wi({type:"mclass",names:["\\@binrel"],props:{numArgs:2},handler(e,t){var{parser:i}=e;return{type:"mclass",mode:i.mode,mclass:pr(t[0]),body:ki(t[1]),isCharacterBox:ke.isCharacterBox(t[1])}}}),wi({type:"mclass",names:["\\stackrel","\\overset","\\underset"],props:{numArgs:2},handler(e,t){var i,{parser:r,funcName:n}=e,s=t[1],a=t[0];i="\\stackrel"!==n?pr(s):"mrel";var o={type:"op",mode:s.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:"\\stackrel"!==n,body:ki(s)},l={type:"supsub",mode:a.mode,base:o,sup:"\\underset"===n?null:a,sub:"\\underset"===n?a:null};return{type:"mclass",mode:r.mode,mclass:i,body:[l],isCharacterBox:ke.isCharacterBox(l)}},htmlBuilder:dr,mathmlBuilder:ur}),wi({type:"pmb",names:["\\pmb"],props:{numArgs:1,allowedInText:!0},handler(e,t){var{parser:i}=e;return{type:"pmb",mode:i.mode,mclass:pr(t[0]),body:ki(t[0])}},htmlBuilder(e,t){var i=Ti(e.body,t,!0),r=di.makeSpan([e.mclass],i,t);return r.style.textShadow="0.02em 0.01em 0.04px",r},mathmlBuilder(e,t){var i=$i(e.body,t),r=new qi.MathNode("mstyle",i);return r.setAttribute("style","text-shadow: 0.02em 0.01em 0.04px"),r}});var mr={">":"\\\\cdrightarrow","<":"\\\\cdleftarrow","=":"\\\\cdlongequal",A:"\\uparrow",V:"\\downarrow","|":"\\Vert",".":"no arrow"},gr=e=>"textord"===e.type&&"@"===e.text;function fr(e,t,i){var r=mr[e];switch(r){case"\\\\cdrightarrow":case"\\\\cdleftarrow":return i.callFunction(r,[t[0]],[t[1]]);case"\\uparrow":case"\\downarrow":var n={type:"atom",text:r,mode:"math",family:"rel"},s={type:"ordgroup",mode:"math",body:[i.callFunction("\\\\cdleft",[t[0]],[]),i.callFunction("\\Big",[n],[]),i.callFunction("\\\\cdright",[t[1]],[])]};return i.callFunction("\\\\cdparent",[s],[]);case"\\\\cdlongequal":return i.callFunction("\\\\cdlongequal",[],[]);case"\\Vert":return i.callFunction("\\Big",[{type:"textord",text:"\\Vert",mode:"math"}],[]);default:return{type:"textord",text:" ",mode:"math"}}}wi({type:"cdlabel",names:["\\\\cdleft","\\\\cdright"],props:{numArgs:1},handler(e,t){var{parser:i,funcName:r}=e;return{type:"cdlabel",mode:i.mode,side:r.slice(4),label:t[0]}},htmlBuilder(e,t){var i=t.havingStyle(t.style.sup()),r=di.wrapFragment(Di(e.label,i,t),t);return r.classes.push("cd-label-"+e.side),r.style.bottom=tt(.8-r.depth),r.height=0,r.depth=0,r},mathmlBuilder(e,t){var i=new qi.MathNode("mrow",[Xi(e.label,t)]);return(i=new qi.MathNode("mpadded",[i])).setAttribute("width","0"),"left"===e.side&&i.setAttribute("lspace","-1width"),i.setAttribute("voffset","0.7em"),(i=new qi.MathNode("mstyle",[i])).setAttribute("displaystyle","false"),i.setAttribute("scriptlevel","1"),i}}),wi({type:"cdlabelparent",names:["\\\\cdparent"],props:{numArgs:1},handler(e,t){var{parser:i}=e;return{type:"cdlabelparent",mode:i.mode,fragment:t[0]}},htmlBuilder(e,t){var i=di.wrapFragment(Di(e.fragment,t),t);return i.classes.push("cd-vert-arrow"),i},mathmlBuilder:(e,t)=>new qi.MathNode("mrow",[Xi(e.fragment,t)])}),wi({type:"textord",names:["\\@char"],props:{numArgs:1,allowedInText:!0},handler(e,t){for(var{parser:i}=e,r=rr(t[0],"ordgroup").body,n="",s=0;s<r.length;s++){n+=rr(r[s],"textord").text}var a,o=parseInt(n);if(isNaN(o))throw new ve("\\@char has non-numeric argument "+n);if(o<0||o>=1114111)throw new ve("\\@char with invalid code point "+n);return o<=65535?a=String.fromCharCode(o):(o-=65536,a=String.fromCharCode(55296+(o>>10),56320+(1023&o))),{type:"textord",mode:i.mode,text:a}}});var br=(e,t)=>{var i=Ti(e.body,t.withColor(e.color),!1);return di.makeFragment(i)},vr=(e,t)=>{var i=$i(e.body,t.withColor(e.color)),r=new qi.MathNode("mstyle",i);return r.setAttribute("mathcolor",e.color),r};wi({type:"color",names:["\\textcolor"],props:{numArgs:2,allowedInText:!0,argTypes:["color","original"]},handler(e,t){var{parser:i}=e,r=rr(t[0],"color-token").color,n=t[1];return{type:"color",mode:i.mode,color:r,body:ki(n)}},htmlBuilder:br,mathmlBuilder:vr}),wi({type:"color",names:["\\color"],props:{numArgs:1,allowedInText:!0,argTypes:["color"]},handler(e,t){var{parser:i,breakOnTokenText:r}=e,n=rr(t[0],"color-token").color;i.gullet.macros.set("\\current@color",n);var s=i.parseExpression(!0,r);return{type:"color",mode:i.mode,color:n,body:s}},htmlBuilder:br,mathmlBuilder:vr}),wi({type:"cr",names:["\\\\"],props:{numArgs:0,numOptionalArgs:0,allowedInText:!0},handler(e,t,i){var{parser:r}=e,n="["===r.gullet.future().text?r.parseSizeGroup(!0):null,s=!r.settings.displayMode||!r.settings.useStrictBehavior("newLineInDisplayMode","In LaTeX, \\\\ or \\newline does nothing in display mode");return{type:"cr",mode:r.mode,newLine:s,size:n&&rr(n,"size").value}},htmlBuilder(e,t){var i=di.makeSpan(["mspace"],[],t);return e.newLine&&(i.classes.push("newline"),e.size&&(i.style.marginTop=tt(et(e.size,t)))),i},mathmlBuilder(e,t){var i=new qi.MathNode("mspace");return e.newLine&&(i.setAttribute("linebreak","newline"),e.size&&i.setAttribute("height",tt(et(e.size,t)))),i}});var yr={"\\global":"\\global","\\long":"\\\\globallong","\\\\globallong":"\\\\globallong","\\def":"\\gdef","\\gdef":"\\gdef","\\edef":"\\xdef","\\xdef":"\\xdef","\\let":"\\\\globallet","\\futurelet":"\\\\globalfuture"},wr=e=>{var t=e.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(t))throw new ve("Expected a control sequence",e);return t},xr=(e,t,i,r)=>{var n=e.gullet.macros.get(i.text);null==n&&(i.noexpand=!0,n={tokens:[i],numArgs:0,unexpandable:!e.gullet.isExpandable(i.text)}),e.gullet.macros.set(t,n,r)};wi({type:"internal",names:["\\global","\\long","\\\\globallong"],props:{numArgs:0,allowedInText:!0},handler(e){var{parser:t,funcName:i}=e;t.consumeSpaces();var r=t.fetch();if(yr[r.text])return"\\global"!==i&&"\\\\globallong"!==i||(r.text=yr[r.text]),rr(t.parseFunction(),"internal");throw new ve("Invalid token after macro prefix",r)}}),wi({type:"internal",names:["\\def","\\gdef","\\edef","\\xdef"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:t,funcName:i}=e,r=t.gullet.popToken(),n=r.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(n))throw new ve("Expected a control sequence",r);for(var s,a=0,o=[[]];"{"!==t.gullet.future().text;)if("#"===(r=t.gullet.popToken()).text){if("{"===t.gullet.future().text){s=t.gullet.future(),o[a].push("{");break}if(r=t.gullet.popToken(),!/^[1-9]$/.test(r.text))throw new ve('Invalid argument number "'+r.text+'"');if(parseInt(r.text)!==a+1)throw new ve('Argument number "'+r.text+'" out of order');a++,o.push([])}else{if("EOF"===r.text)throw new ve("Expected a macro definition");o[a].push(r.text)}var{tokens:l}=t.gullet.consumeArg();return s&&l.unshift(s),"\\edef"!==i&&"\\xdef"!==i||(l=t.gullet.expandTokens(l)).reverse(),t.gullet.macros.set(n,{tokens:l,numArgs:a,delimiters:o},i===yr[i]),{type:"internal",mode:t.mode}}}),wi({type:"internal",names:["\\let","\\\\globallet"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:t,funcName:i}=e,r=wr(t.gullet.popToken());t.gullet.consumeSpaces();var n=(e=>{var t=e.gullet.popToken();return"="===t.text&&" "===(t=e.gullet.popToken()).text&&(t=e.gullet.popToken()),t})(t);return xr(t,r,n,"\\\\globallet"===i),{type:"internal",mode:t.mode}}}),wi({type:"internal",names:["\\futurelet","\\\\globalfuture"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:t,funcName:i}=e,r=wr(t.gullet.popToken()),n=t.gullet.popToken(),s=t.gullet.popToken();return xr(t,r,s,"\\\\globalfuture"===i),t.gullet.pushToken(s),t.gullet.pushToken(n),{type:"internal",mode:t.mode}}});var Ar=function(e,t,i){var r=Ge(vt.math[e]&&vt.math[e].replace||e,t,i);if(!r)throw new Error("Unsupported symbol "+e+" and font size "+t+".");return r},kr=function(e,t,i,r){var n=i.havingBaseStyle(t),s=di.makeSpan(r.concat(n.sizingClasses(i)),[e],i),a=n.sizeMultiplier/i.sizeMultiplier;return s.height*=a,s.depth*=a,s.maxFontSize=n.sizeMultiplier,s},Er=function(e,t,i){var r=t.havingBaseStyle(i),n=(1-t.sizeMultiplier/r.sizeMultiplier)*t.fontMetrics().axisHeight;e.classes.push("delimcenter"),e.style.top=tt(n),e.height-=n,e.depth+=n},Sr=function(e,t,i,r,n,s){var a=function(e,t,i,r){return di.makeSymbol(e,"Size"+t+"-Regular",i,r)}(e,t,n,r),o=kr(di.makeSpan(["delimsizing","size"+t],[a],r),De.TEXT,r,s);return i&&Er(o,r,De.TEXT),o},Cr=function(e,t,i){var r;return r="Size1-Regular"===t?"delim-size1":"delim-size4",{type:"elem",elem:di.makeSpan(["delimsizinginner",r],[di.makeSpan([],[di.makeSymbol(e,t,i)])])}},Mr=function(e,t,i){var r=je["Size4-Regular"][e.charCodeAt(0)]?je["Size4-Regular"][e.charCodeAt(0)][4]:je["Size1-Regular"][e.charCodeAt(0)][4],n=new pt("inner",function(e,t){switch(e){case"⎜":return"M291 0 H417 V"+t+" H291z M291 0 H417 V"+t+" H291z";case"∣":return"M145 0 H188 V"+t+" H145z M145 0 H188 V"+t+" H145z";case"∥":return"M145 0 H188 V"+t+" H145z M145 0 H188 V"+t+" H145zM367 0 H410 V"+t+" H367z M367 0 H410 V"+t+" H367z";case"⎟":return"M457 0 H583 V"+t+" H457z M457 0 H583 V"+t+" H457z";case"⎢":return"M319 0 H403 V"+t+" H319z M319 0 H403 V"+t+" H319z";case"⎥":return"M263 0 H347 V"+t+" H263z M263 0 H347 V"+t+" H263z";case"⎪":return"M384 0 H504 V"+t+" H384z M384 0 H504 V"+t+" H384z";case"⏐":return"M312 0 H355 V"+t+" H312z M312 0 H355 V"+t+" H312z";case"‖":return"M257 0 H300 V"+t+" H257z M257 0 H300 V"+t+" H257zM478 0 H521 V"+t+" H478z M478 0 H521 V"+t+" H478z";default:return""}}(e,Math.round(1e3*t))),s=new ut([n],{width:tt(r),height:tt(t),style:"width:"+tt(r),viewBox:"0 0 "+1e3*r+" "+Math.round(1e3*t),preserveAspectRatio:"xMinYMin"}),a=di.makeSvgSpan([],[s],i);return a.height=t,a.style.height=tt(t),a.style.width=tt(r),{type:"elem",elem:a}},_r={type:"kern",size:-.008},Tr=["|","\\lvert","\\rvert","\\vert"],Nr=["\\|","\\lVert","\\rVert","\\Vert"],Ir=function(e,t,i,r,n,s){var a,o,l,h,c="",d=0;a=l=h=e,o=null;var u="Size1-Regular";"\\uparrow"===e?l=h="⏐":"\\Uparrow"===e?l=h="‖":"\\downarrow"===e?a=l="⏐":"\\Downarrow"===e?a=l="‖":"\\updownarrow"===e?(a="\\uparrow",l="⏐",h="\\downarrow"):"\\Updownarrow"===e?(a="\\Uparrow",l="‖",h="\\Downarrow"):ke.contains(Tr,e)?(l="∣",c="vert",d=333):ke.contains(Nr,e)?(l="∥",c="doublevert",d=556):"["===e||"\\lbrack"===e?(a="⎡",l="⎢",h="⎣",u="Size4-Regular",c="lbrack",d=667):"]"===e||"\\rbrack"===e?(a="⎤",l="⎥",h="⎦",u="Size4-Regular",c="rbrack",d=667):"\\lfloor"===e||"⌊"===e?(l=a="⎢",h="⎣",u="Size4-Regular",c="lfloor",d=667):"\\lceil"===e||"⌈"===e?(a="⎡",l=h="⎢",u="Size4-Regular",c="lceil",d=667):"\\rfloor"===e||"⌋"===e?(l=a="⎥",h="⎦",u="Size4-Regular",c="rfloor",d=667):"\\rceil"===e||"⌉"===e?(a="⎤",l=h="⎥",u="Size4-Regular",c="rceil",d=667):"("===e||"\\lparen"===e?(a="⎛",l="⎜",h="⎝",u="Size4-Regular",c="lparen",d=875):")"===e||"\\rparen"===e?(a="⎞",l="⎟",h="⎠",u="Size4-Regular",c="rparen",d=875):"\\{"===e||"\\lbrace"===e?(a="⎧",o="⎨",h="⎩",l="⎪",u="Size4-Regular"):"\\}"===e||"\\rbrace"===e?(a="⎫",o="⎬",h="⎭",l="⎪",u="Size4-Regular"):"\\lgroup"===e||"⟮"===e?(a="⎧",h="⎩",l="⎪",u="Size4-Regular"):"\\rgroup"===e||"⟯"===e?(a="⎫",h="⎭",l="⎪",u="Size4-Regular"):"\\lmoustache"===e||"⎰"===e?(a="⎧",h="⎭",l="⎪",u="Size4-Regular"):"\\rmoustache"!==e&&"⎱"!==e||(a="⎫",h="⎩",l="⎪",u="Size4-Regular");var p=Ar(a,u,n),m=p.height+p.depth,g=Ar(l,u,n),f=g.height+g.depth,b=Ar(h,u,n),v=b.height+b.depth,y=0,w=1;if(null!==o){var x=Ar(o,u,n);y=x.height+x.depth,w=2}var A=m+v+y,k=A+Math.max(0,Math.ceil((t-A)/(w*f)))*w*f,E=r.fontMetrics().axisHeight;i&&(E*=r.sizeMultiplier);var S=k/2-E,C=[];if(c.length>0){var M=k-m-v,_=Math.round(1e3*k),T=function(e,t){switch(e){case"lbrack":return"M403 1759 V84 H666 V0 H319 V1759 v"+t+" v1759 h347 v-84\nH403z M403 1759 V0 H319 V1759 v"+t+" v1759 h84z";case"rbrack":return"M347 1759 V0 H0 V84 H263 V1759 v"+t+" v1759 H0 v84 H347z\nM347 1759 V0 H263 V1759 v"+t+" v1759 h84z";case"vert":return"M145 15 v585 v"+t+" v585 c2.667,10,9.667,15,21,15\nc10,0,16.667,-5,20,-15 v-585 v"+-t+" v-585 c-2.667,-10,-9.667,-15,-21,-15\nc-10,0,-16.667,5,-20,15z M188 15 H145 v585 v"+t+" v585 h43z";case"doublevert":return"M145 15 v585 v"+t+" v585 c2.667,10,9.667,15,21,15\nc10,0,16.667,-5,20,-15 v-585 v"+-t+" v-585 c-2.667,-10,-9.667,-15,-21,-15\nc-10,0,-16.667,5,-20,15z M188 15 H145 v585 v"+t+" v585 h43z\nM367 15 v585 v"+t+" v585 c2.667,10,9.667,15,21,15\nc10,0,16.667,-5,20,-15 v-585 v"+-t+" v-585 c-2.667,-10,-9.667,-15,-21,-15\nc-10,0,-16.667,5,-20,15z M410 15 H367 v585 v"+t+" v585 h43z";case"lfloor":return"M319 602 V0 H403 V602 v"+t+" v1715 h263 v84 H319z\nMM319 602 V0 H403 V602 v"+t+" v1715 H319z";case"rfloor":return"M319 602 V0 H403 V602 v"+t+" v1799 H0 v-84 H319z\nMM319 602 V0 H403 V602 v"+t+" v1715 H319z";case"lceil":return"M403 1759 V84 H666 V0 H319 V1759 v"+t+" v602 h84z\nM403 1759 V0 H319 V1759 v"+t+" v602 h84z";case"rceil":return"M347 1759 V0 H0 V84 H263 V1759 v"+t+" v602 h84z\nM347 1759 V0 h-84 V1759 v"+t+" v602 h84z";case"lparen":return"M863,9c0,-2,-2,-5,-6,-9c0,0,-17,0,-17,0c-12.7,0,-19.3,0.3,-20,1\nc-5.3,5.3,-10.3,11,-15,17c-242.7,294.7,-395.3,682,-458,1162c-21.3,163.3,-33.3,349,\n-36,557 l0,"+(t+84)+"c0.2,6,0,26,0,60c2,159.3,10,310.7,24,454c53.3,528,210,\n949.7,470,1265c4.7,6,9.7,11.7,15,17c0.7,0.7,7,1,19,1c0,0,18,0,18,0c4,-4,6,-7,6,-9\nc0,-2.7,-3.3,-8.7,-10,-18c-135.3,-192.7,-235.5,-414.3,-300.5,-665c-65,-250.7,-102.5,\n-544.7,-112.5,-882c-2,-104,-3,-167,-3,-189\nl0,-"+(t+92)+"c0,-162.7,5.7,-314,17,-454c20.7,-272,63.7,-513,129,-723c65.3,\n-210,155.3,-396.3,270,-559c6.7,-9.3,10,-15.3,10,-18z";case"rparen":return"M76,0c-16.7,0,-25,3,-25,9c0,2,2,6.3,6,13c21.3,28.7,42.3,60.3,\n63,95c96.7,156.7,172.8,332.5,228.5,527.5c55.7,195,92.8,416.5,111.5,664.5\nc11.3,139.3,17,290.7,17,454c0,28,1.7,43,3.3,45l0,"+(t+9)+"\nc-3,4,-3.3,16.7,-3.3,38c0,162,-5.7,313.7,-17,455c-18.7,248,-55.8,469.3,-111.5,664\nc-55.7,194.7,-131.8,370.3,-228.5,527c-20.7,34.7,-41.7,66.3,-63,95c-2,3.3,-4,7,-6,11\nc0,7.3,5.7,11,17,11c0,0,11,0,11,0c9.3,0,14.3,-0.3,15,-1c5.3,-5.3,10.3,-11,15,-17\nc242.7,-294.7,395.3,-681.7,458,-1161c21.3,-164.7,33.3,-350.7,36,-558\nl0,-"+(t+144)+"c-2,-159.3,-10,-310.7,-24,-454c-53.3,-528,-210,-949.7,\n-470,-1265c-4.7,-6,-9.7,-11.7,-15,-17c-0.7,-0.7,-6.7,-1,-18,-1z";default:throw new Error("Unknown stretchy delimiter.")}}(c,Math.round(1e3*M)),N=new pt(c,T),I=(d/1e3).toFixed(3)+"em",L=(_/1e3).toFixed(3)+"em",P=new ut([N],{width:I,height:L,viewBox:"0 0 "+d+" "+_}),R=di.makeSvgSpan([],[P],r);R.height=_/1e3,R.style.width=I,R.style.height=L,C.push({type:"elem",elem:R})}else{if(C.push(Cr(h,u,n)),C.push(_r),null===o){var D=k-m-v+.016;C.push(Mr(l,D,r))}else{var z=(k-m-v-y)/2+.016;C.push(Mr(l,z,r)),C.push(_r),C.push(Cr(o,u,n)),C.push(_r),C.push(Mr(l,z,r))}C.push(_r),C.push(Cr(a,u,n))}var F=r.havingBaseStyle(De.TEXT),O=di.makeVList({positionType:"bottom",positionData:S,children:C},F);return kr(di.makeSpan(["delimsizing","mult"],[O],F),De.TEXT,r,s)},Lr=.08,Pr=function(e,t,i,r,n){var s=function(e,t,i){t*=1e3;var r="";switch(e){case"sqrtMain":r=function(e,t){return"M95,"+(622+e+t)+"\nc-2.7,0,-7.17,-2.7,-13.5,-8c-5.8,-5.3,-9.5,-10,-9.5,-14\nc0,-2,0.3,-3.3,1,-4c1.3,-2.7,23.83,-20.7,67.5,-54\nc44.2,-33.3,65.8,-50.3,66.5,-51c1.3,-1.3,3,-2,5,-2c4.7,0,8.7,3.3,12,10\ns173,378,173,378c0.7,0,35.3,-71,104,-213c68.7,-142,137.5,-285,206.5,-429\nc69,-144,104.5,-217.7,106.5,-221\nl"+e/2.075+" -"+e+"\nc5.3,-9.3,12,-14,20,-14\nH400000v"+(40+e)+"H845.2724\ns-225.272,467,-225.272,467s-235,486,-235,486c-2.7,4.7,-9,7,-19,7\nc-6,0,-10,-1,-12,-3s-194,-422,-194,-422s-65,47,-65,47z\nM"+(834+e)+" "+t+"h400000v"+(40+e)+"h-400000z"}(t,Be);break;case"sqrtSize1":r=function(e,t){return"M263,"+(601+e+t)+"c0.7,0,18,39.7,52,119\nc34,79.3,68.167,158.7,102.5,238c34.3,79.3,51.8,119.3,52.5,120\nc340,-704.7,510.7,-1060.3,512,-1067\nl"+e/2.084+" -"+e+"\nc4.7,-7.3,11,-11,19,-11\nH40000v"+(40+e)+"H1012.3\ns-271.3,567,-271.3,567c-38.7,80.7,-84,175,-136,283c-52,108,-89.167,185.3,-111.5,232\nc-22.3,46.7,-33.8,70.3,-34.5,71c-4.7,4.7,-12.3,7,-23,7s-12,-1,-12,-1\ns-109,-253,-109,-253c-72.7,-168,-109.3,-252,-110,-252c-10.7,8,-22,16.7,-34,26\nc-22,17.3,-33.3,26,-34,26s-26,-26,-26,-26s76,-59,76,-59s76,-60,76,-60z\nM"+(1001+e)+" "+t+"h400000v"+(40+e)+"h-400000z"}(t,Be);break;case"sqrtSize2":r=function(e,t){return"M983 "+(10+e+t)+"\nl"+e/3.13+" -"+e+"\nc4,-6.7,10,-10,18,-10 H400000v"+(40+e)+"\nH1013.1s-83.4,268,-264.1,840c-180.7,572,-277,876.3,-289,913c-4.7,4.7,-12.7,7,-24,7\ns-12,0,-12,0c-1.3,-3.3,-3.7,-11.7,-7,-25c-35.3,-125.3,-106.7,-373.3,-214,-744\nc-10,12,-21,25,-33,39s-32,39,-32,39c-6,-5.3,-15,-14,-27,-26s25,-30,25,-30\nc26.7,-32.7,52,-63,76,-91s52,-60,52,-60s208,722,208,722\nc56,-175.3,126.3,-397.3,211,-666c84.7,-268.7,153.8,-488.2,207.5,-658.5\nc53.7,-170.3,84.5,-266.8,92.5,-289.5z\nM"+(1001+e)+" "+t+"h400000v"+(40+e)+"h-400000z"}(t,Be);break;case"sqrtSize3":r=function(e,t){return"M424,"+(2398+e+t)+"\nc-1.3,-0.7,-38.5,-172,-111.5,-514c-73,-342,-109.8,-513.3,-110.5,-514\nc0,-2,-10.7,14.3,-32,49c-4.7,7.3,-9.8,15.7,-15.5,25c-5.7,9.3,-9.8,16,-12.5,20\ns-5,7,-5,7c-4,-3.3,-8.3,-7.7,-13,-13s-13,-13,-13,-13s76,-122,76,-122s77,-121,77,-121\ns209,968,209,968c0,-2,84.7,-361.7,254,-1079c169.3,-717.3,254.7,-1077.7,256,-1081\nl"+e/4.223+" -"+e+"c4,-6.7,10,-10,18,-10 H400000\nv"+(40+e)+"H1014.6\ns-87.3,378.7,-272.6,1166c-185.3,787.3,-279.3,1182.3,-282,1185\nc-2,6,-10,9,-24,9\nc-8,0,-12,-0.7,-12,-2z M"+(1001+e)+" "+t+"\nh400000v"+(40+e)+"h-400000z"}(t,Be);break;case"sqrtSize4":r=function(e,t){return"M473,"+(2713+e+t)+"\nc339.3,-1799.3,509.3,-2700,510,-2702 l"+e/5.298+" -"+e+"\nc3.3,-7.3,9.3,-11,18,-11 H400000v"+(40+e)+"H1017.7\ns-90.5,478,-276.2,1466c-185.7,988,-279.5,1483,-281.5,1485c-2,6,-10,9,-24,9\nc-8,0,-12,-0.7,-12,-2c0,-1.3,-5.3,-32,-16,-92c-50.7,-293.3,-119.7,-693.3,-207,-1200\nc0,-1.3,-5.3,8.7,-16,30c-10.7,21.3,-21.3,42.7,-32,64s-16,33,-16,33s-26,-26,-26,-26\ns76,-153,76,-153s77,-151,77,-151c0.7,0.7,35.7,202,105,604c67.3,400.7,102,602.7,104,\n606zM"+(1001+e)+" "+t+"h400000v"+(40+e)+"H1017.7z"}(t,Be);break;case"sqrtTall":r=function(e,t,i){return"M702 "+(e+t)+"H400000"+(40+e)+"\nH742v"+(i-54-t-e)+"l-4 4-4 4c-.667.7 -2 1.5-4 2.5s-4.167 1.833-6.5 2.5-5.5 1-9.5 1\nh-12l-28-84c-16.667-52-96.667 -294.333-240-727l-212 -643 -85 170\nc-4-3.333-8.333-7.667-13 -13l-13-13l77-155 77-156c66 199.333 139 419.667\n219 661 l218 661zM702 "+t+"H400000v"+(40+e)+"H742z"}(t,Be,i)}return r}(e,r,i),a=new pt(e,s),o=new ut([a],{width:"400em",height:tt(t),viewBox:"0 0 400000 "+i,preserveAspectRatio:"xMinYMin slice"});return di.makeSvgSpan(["hide-tail"],[o],n)},Rr=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","\\surd"],Dr=["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱"],zr=["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"],Fr=[0,1.2,1.8,2.4,3],Or=[{type:"small",style:De.SCRIPTSCRIPT},{type:"small",style:De.SCRIPT},{type:"small",style:De.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],Br=[{type:"small",style:De.SCRIPTSCRIPT},{type:"small",style:De.SCRIPT},{type:"small",style:De.TEXT},{type:"stack"}],Hr=[{type:"small",style:De.SCRIPTSCRIPT},{type:"small",style:De.SCRIPT},{type:"small",style:De.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}],qr=function(e){if("small"===e.type)return"Main-Regular";if("large"===e.type)return"Size"+e.size+"-Regular";if("stack"===e.type)return"Size4-Regular";throw new Error("Add support for delim type '"+e.type+"' here.")},jr=function(e,t,i,r){for(var n=Math.min(2,3-r.style.size);n<i.length&&"stack"!==i[n].type;n++){var s=Ar(e,qr(i[n]),"math"),a=s.height+s.depth;if("small"===i[n].type&&(a*=r.havingBaseStyle(i[n].style).sizeMultiplier),a>t)return i[n]}return i[i.length-1]},Vr=function(e,t,i,r,n,s){var a;"<"===e||"\\lt"===e||"⟨"===e?e="\\langle":">"!==e&&"\\gt"!==e&&"⟩"!==e||(e="\\rangle"),a=ke.contains(zr,e)?Or:ke.contains(Rr,e)?Hr:Br;var o=jr(e,t,a,r);return"small"===o.type?function(e,t,i,r,n,s){var a=di.makeSymbol(e,"Main-Regular",n,r),o=kr(a,t,r,s);return i&&Er(o,r,t),o}(e,o.style,i,r,n,s):"large"===o.type?Sr(e,o.size,i,r,n,s):Ir(e,t,i,r,n,s)},Ur={sqrtImage:function(e,t){var i,r,n=t.havingBaseSizing(),s=jr("\\surd",e*n.sizeMultiplier,Hr,n),a=n.sizeMultiplier,o=Math.max(0,t.minRuleThickness-t.fontMetrics().sqrtRuleThickness),l=0,h=0,c=0;return"small"===s.type?(e<1?a=1:e<1.4&&(a=.7),h=(1+o)/a,(i=Pr("sqrtMain",l=(1+o+Lr)/a,c=1e3+1e3*o+80,o,t)).style.minWidth="0.853em",r=.833/a):"large"===s.type?(c=1080*Fr[s.size],h=(Fr[s.size]+o)/a,l=(Fr[s.size]+o+Lr)/a,(i=Pr("sqrtSize"+s.size,l,c,o,t)).style.minWidth="1.02em",r=1/a):(l=e+o+Lr,h=e+o,c=Math.floor(1e3*e+o)+80,(i=Pr("sqrtTall",l,c,o,t)).style.minWidth="0.742em",r=1.056),i.height=h,i.style.height=tt(l),{span:i,advanceWidth:r,ruleWidth:(t.fontMetrics().sqrtRuleThickness+o)*a}},sizedDelim:function(e,t,i,r,n){if("<"===e||"\\lt"===e||"⟨"===e?e="\\langle":">"!==e&&"\\gt"!==e&&"⟩"!==e||(e="\\rangle"),ke.contains(Rr,e)||ke.contains(zr,e))return Sr(e,t,!1,i,r,n);if(ke.contains(Dr,e))return Ir(e,Fr[t],!1,i,r,n);throw new ve("Illegal delimiter: '"+e+"'")},sizeToMaxHeight:Fr,customSizedDelim:Vr,leftRightDelim:function(e,t,i,r,n,s){var a=r.fontMetrics().axisHeight*r.sizeMultiplier,o=5/r.fontMetrics().ptPerEm,l=Math.max(t-a,i+a),h=Math.max(l/500*901,2*l-o);return Vr(e,h,!0,r,n,s)}},Gr={"\\bigl":{mclass:"mopen",size:1},"\\Bigl":{mclass:"mopen",size:2},"\\biggl":{mclass:"mopen",size:3},"\\Biggl":{mclass:"mopen",size:4},"\\bigr":{mclass:"mclose",size:1},"\\Bigr":{mclass:"mclose",size:2},"\\biggr":{mclass:"mclose",size:3},"\\Biggr":{mclass:"mclose",size:4},"\\bigm":{mclass:"mrel",size:1},"\\Bigm":{mclass:"mrel",size:2},"\\biggm":{mclass:"mrel",size:3},"\\Biggm":{mclass:"mrel",size:4},"\\big":{mclass:"mord",size:1},"\\Big":{mclass:"mord",size:2},"\\bigg":{mclass:"mord",size:3},"\\Bigg":{mclass:"mord",size:4}},$r=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","<",">","\\langle","⟨","\\rangle","⟩","\\lt","\\gt","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱","/","\\backslash","|","\\vert","\\|","\\Vert","\\uparrow","\\Uparrow","\\downarrow","\\Downarrow","\\updownarrow","\\Updownarrow","."];function Wr(e,t){var i=sr(e);if(i&&ke.contains($r,i.text))return i;throw new ve(i?"Invalid delimiter '"+i.text+"' after '"+t.funcName+"'":"Invalid delimiter type '"+e.type+"'",e)}function Xr(e){if(!e.body)throw new Error("Bug: The leftright ParseNode wasn't fully parsed.")}wi({type:"delimsizing",names:["\\bigl","\\Bigl","\\biggl","\\Biggl","\\bigr","\\Bigr","\\biggr","\\Biggr","\\bigm","\\Bigm","\\biggm","\\Biggm","\\big","\\Big","\\bigg","\\Bigg"],props:{numArgs:1,argTypes:["primitive"]},handler:(e,t)=>{var i=Wr(t[0],e);return{type:"delimsizing",mode:e.parser.mode,size:Gr[e.funcName].size,mclass:Gr[e.funcName].mclass,delim:i.text}},htmlBuilder:(e,t)=>"."===e.delim?di.makeSpan([e.mclass]):Ur.sizedDelim(e.delim,e.size,t,e.mode,[e.mclass]),mathmlBuilder:e=>{var t=[];"."!==e.delim&&t.push(ji(e.delim,e.mode));var i=new qi.MathNode("mo",t);"mopen"===e.mclass||"mclose"===e.mclass?i.setAttribute("fence","true"):i.setAttribute("fence","false"),i.setAttribute("stretchy","true");var r=tt(Ur.sizeToMaxHeight[e.size]);return i.setAttribute("minsize",r),i.setAttribute("maxsize",r),i}}),wi({type:"leftright-right",names:["\\right"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var i=e.parser.gullet.macros.get("\\current@color");if(i&&"string"!=typeof i)throw new ve("\\current@color set to non-string in \\right");return{type:"leftright-right",mode:e.parser.mode,delim:Wr(t[0],e).text,color:i}}}),wi({type:"leftright",names:["\\left"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var i=Wr(t[0],e),r=e.parser;++r.leftrightDepth;var n=r.parseExpression(!1);--r.leftrightDepth,r.expect("\\right",!1);var s=rr(r.parseFunction(),"leftright-right");return{type:"leftright",mode:r.mode,body:n,left:i.text,right:s.delim,rightColor:s.color}},htmlBuilder:(e,t)=>{Xr(e);for(var i,r,n=Ti(e.body,t,!0,["mopen","mclose"]),s=0,a=0,o=!1,l=0;l<n.length;l++)n[l].isMiddle?o=!0:(s=Math.max(n[l].height,s),a=Math.max(n[l].depth,a));if(s*=t.sizeMultiplier,a*=t.sizeMultiplier,i="."===e.left?Ri(t,["mopen"]):Ur.leftRightDelim(e.left,s,a,t,e.mode,["mopen"]),n.unshift(i),o)for(var h=1;h<n.length;h++){var c=n[h].isMiddle;c&&(n[h]=Ur.leftRightDelim(c.delim,s,a,c.options,e.mode,[]))}if("."===e.right)r=Ri(t,["mclose"]);else{var d=e.rightColor?t.withColor(e.rightColor):t;r=Ur.leftRightDelim(e.right,s,a,d,e.mode,["mclose"])}return n.push(r),di.makeSpan(["minner"],n,t)},mathmlBuilder:(e,t)=>{Xr(e);var i=$i(e.body,t);if("."!==e.left){var r=new qi.MathNode("mo",[ji(e.left,e.mode)]);r.setAttribute("fence","true"),i.unshift(r)}if("."!==e.right){var n=new qi.MathNode("mo",[ji(e.right,e.mode)]);n.setAttribute("fence","true"),e.rightColor&&n.setAttribute("mathcolor",e.rightColor),i.push(n)}return Vi(i)}}),wi({type:"middle",names:["\\middle"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var i=Wr(t[0],e);if(!e.parser.leftrightDepth)throw new ve("\\middle without preceding \\left",i);return{type:"middle",mode:e.parser.mode,delim:i.text}},htmlBuilder:(e,t)=>{var i;if("."===e.delim)i=Ri(t,[]);else{i=Ur.sizedDelim(e.delim,1,t,e.mode,[]);var r={delim:e.delim,options:t};i.isMiddle=r}return i},mathmlBuilder:(e,t)=>{var i="\\vert"===e.delim||"|"===e.delim?ji("|","text"):ji(e.delim,e.mode),r=new qi.MathNode("mo",[i]);return r.setAttribute("fence","true"),r.setAttribute("lspace","0.05em"),r.setAttribute("rspace","0.05em"),r}});var Yr=(e,t)=>{var i,r,n,s=di.wrapFragment(Di(e.body,t),t),a=e.label.slice(1),o=t.sizeMultiplier,l=0,h=ke.isCharacterBox(e.body);if("sout"===a)(i=di.makeSpan(["stretchy","sout"])).height=t.fontMetrics().defaultRuleThickness/o,l=-.5*t.fontMetrics().xHeight;else if("phase"===a){var c=et({number:.6,unit:"pt"},t),d=et({number:.35,unit:"ex"},t);o/=t.havingBaseSizing().sizeMultiplier;var u=s.height+s.depth+c+d;s.style.paddingLeft=tt(u/2+c);var p=Math.floor(1e3*u*o),m="M400000 "+(r=p)+" H0 L"+r/2+" 0 l65 45 L145 "+(r-80)+" H400000z",g=new ut([new pt("phase",m)],{width:"400em",height:tt(p/1e3),viewBox:"0 0 400000 "+p,preserveAspectRatio:"xMinYMin slice"});(i=di.makeSvgSpan(["hide-tail"],[g],t)).style.height=tt(u),l=s.depth+c+d}else{/cancel/.test(a)?h||s.classes.push("cancel-pad"):"angl"===a?s.classes.push("anglpad"):s.classes.push("boxpad");var f=0,b=0,v=0;/box/.test(a)?(v=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness),b=f=t.fontMetrics().fboxsep+("colorbox"===a?0:v)):"angl"===a?(f=4*(v=Math.max(t.fontMetrics().defaultRuleThickness,t.minRuleThickness)),b=Math.max(0,.25-s.depth)):b=f=h?.2:0,i=er(s,a,f,b,t),/fbox|boxed|fcolorbox/.test(a)?(i.style.borderStyle="solid",i.style.borderWidth=tt(v)):"angl"===a&&.049!==v&&(i.style.borderTopWidth=tt(v),i.style.borderRightWidth=tt(v)),l=s.depth+b,e.backgroundColor&&(i.style.backgroundColor=e.backgroundColor,e.borderColor&&(i.style.borderColor=e.borderColor))}if(e.backgroundColor)n=di.makeVList({positionType:"individualShift",children:[{type:"elem",elem:i,shift:l},{type:"elem",elem:s,shift:0}]},t);else{var y=/cancel|phase/.test(a)?["svg-align"]:[];n=di.makeVList({positionType:"individualShift",children:[{type:"elem",elem:s,shift:0},{type:"elem",elem:i,shift:l,wrapperClasses:y}]},t)}return/cancel/.test(a)&&(n.height=s.height,n.depth=s.depth),/cancel/.test(a)&&!h?di.makeSpan(["mord","cancel-lap"],[n],t):di.makeSpan(["mord"],[n],t)},Kr=(e,t)=>{var i=0,r=new qi.MathNode(e.label.indexOf("colorbox")>-1?"mpadded":"menclose",[Xi(e.body,t)]);switch(e.label){case"\\cancel":r.setAttribute("notation","updiagonalstrike");break;case"\\bcancel":r.setAttribute("notation","downdiagonalstrike");break;case"\\phase":r.setAttribute("notation","phasorangle");break;case"\\sout":r.setAttribute("notation","horizontalstrike");break;case"\\fbox":r.setAttribute("notation","box");break;case"\\angl":r.setAttribute("notation","actuarial");break;case"\\fcolorbox":case"\\colorbox":if(i=t.fontMetrics().fboxsep*t.fontMetrics().ptPerEm,r.setAttribute("width","+"+2*i+"pt"),r.setAttribute("height","+"+2*i+"pt"),r.setAttribute("lspace",i+"pt"),r.setAttribute("voffset",i+"pt"),"\\fcolorbox"===e.label){var n=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness);r.setAttribute("style","border: "+n+"em solid "+String(e.borderColor))}break;case"\\xcancel":r.setAttribute("notation","updiagonalstrike downdiagonalstrike")}return e.backgroundColor&&r.setAttribute("mathbackground",e.backgroundColor),r};wi({type:"enclose",names:["\\colorbox"],props:{numArgs:2,allowedInText:!0,argTypes:["color","text"]},handler(e,t,i){var{parser:r,funcName:n}=e,s=rr(t[0],"color-token").color,a=t[1];return{type:"enclose",mode:r.mode,label:n,backgroundColor:s,body:a}},htmlBuilder:Yr,mathmlBuilder:Kr}),wi({type:"enclose",names:["\\fcolorbox"],props:{numArgs:3,allowedInText:!0,argTypes:["color","color","text"]},handler(e,t,i){var{parser:r,funcName:n}=e,s=rr(t[0],"color-token").color,a=rr(t[1],"color-token").color,o=t[2];return{type:"enclose",mode:r.mode,label:n,backgroundColor:a,borderColor:s,body:o}},htmlBuilder:Yr,mathmlBuilder:Kr}),wi({type:"enclose",names:["\\fbox"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!0},handler(e,t){var{parser:i}=e;return{type:"enclose",mode:i.mode,label:"\\fbox",body:t[0]}}}),wi({type:"enclose",names:["\\cancel","\\bcancel","\\xcancel","\\sout","\\phase"],props:{numArgs:1},handler(e,t){var{parser:i,funcName:r}=e,n=t[0];return{type:"enclose",mode:i.mode,label:r,body:n}},htmlBuilder:Yr,mathmlBuilder:Kr}),wi({type:"enclose",names:["\\angl"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!1},handler(e,t){var{parser:i}=e;return{type:"enclose",mode:i.mode,label:"\\angl",body:t[0]}}});var Zr={};function Jr(e){for(var{type:t,names:i,props:r,handler:n,htmlBuilder:s,mathmlBuilder:a}=e,o={type:t,numArgs:r.numArgs||0,allowedInText:!1,numOptionalArgs:0,handler:n},l=0;l<i.length;++l)Zr[i[l]]=o;s&&(vi[t]=s),a&&(yi[t]=a)}var Qr={};function en(e,t){Qr[e]=t}function tn(e){var t=[];e.consumeSpaces();var i=e.fetch().text;for("\\relax"===i&&(e.consume(),e.consumeSpaces(),i=e.fetch().text);"\\hline"===i||"\\hdashline"===i;)e.consume(),t.push("\\hdashline"===i),e.consumeSpaces(),i=e.fetch().text;return t}var rn=e=>{if(!e.parser.settings.displayMode)throw new ve("{"+e.envName+"} can be used only in display mode.")};function nn(e){if(-1===e.indexOf("ed"))return-1===e.indexOf("*")}function sn(e,t,i){var{hskipBeforeAndAfter:r,addJot:n,cols:s,arraystretch:a,colSeparationType:o,autoTag:l,singleRow:h,emptySingleRow:c,maxNumCols:d,leqno:u}=t;if(e.gullet.beginGroup(),h||e.gullet.macros.set("\\cr","\\\\\\relax"),!a){var p=e.gullet.expandMacroAsText("\\arraystretch");if(null==p)a=1;else if(!(a=parseFloat(p))||a<0)throw new ve("Invalid \\arraystretch: "+p)}e.gullet.beginGroup();var m=[],g=[m],f=[],b=[],v=null!=l?[]:void 0;function y(){l&&e.gullet.macros.set("\\@eqnsw","1",!0)}function w(){v&&(e.gullet.macros.get("\\df@tag")?(v.push(e.subparse([new be("\\df@tag")])),e.gullet.macros.set("\\df@tag",void 0,!0)):v.push(Boolean(l)&&"1"===e.gullet.macros.get("\\@eqnsw")))}for(y(),b.push(tn(e));;){var x=e.parseExpression(!1,h?"\\end":"\\\\");e.gullet.endGroup(),e.gullet.beginGroup(),x={type:"ordgroup",mode:e.mode,body:x},i&&(x={type:"styling",mode:e.mode,style:i,body:[x]}),m.push(x);var A=e.fetch().text;if("&"===A){if(d&&m.length===d){if(h||o)throw new ve("Too many tab characters: &",e.nextToken);e.settings.reportNonstrict("textEnv","Too few columns specified in the {array} column argument.")}e.consume()}else{if("\\end"===A){w(),1===m.length&&"styling"===x.type&&0===x.body[0].body.length&&(g.length>1||!c)&&g.pop(),b.length<g.length+1&&b.push([]);break}if("\\\\"!==A)throw new ve("Expected & or \\\\ or \\cr or \\end",e.nextToken);e.consume();var k=void 0;" "!==e.gullet.future().text&&(k=e.parseSizeGroup(!0)),f.push(k?k.value:null),w(),b.push(tn(e)),m=[],g.push(m),y()}}return e.gullet.endGroup(),e.gullet.endGroup(),{type:"array",mode:e.mode,addJot:n,arraystretch:a,body:g,cols:s,rowGaps:f,hskipBeforeAndAfter:r,hLinesBeforeRow:b,colSeparationType:o,tags:v,leqno:u}}function an(e){return"d"===e.slice(0,1)?"display":"text"}var on=function(e,t){var i,r,n=e.body.length,s=e.hLinesBeforeRow,a=0,o=new Array(n),l=[],h=Math.max(t.fontMetrics().arrayRuleWidth,t.minRuleThickness),c=1/t.fontMetrics().ptPerEm,d=5*c;e.colSeparationType&&"small"===e.colSeparationType&&(d=t.havingStyle(De.SCRIPT).sizeMultiplier/t.sizeMultiplier*.2778);var u="CD"===e.colSeparationType?et({number:3,unit:"ex"},t):12*c,p=3*c,m=e.arraystretch*u,g=.7*m,f=.3*m,b=0;function v(e){for(var t=0;t<e.length;++t)t>0&&(b+=.25),l.push({pos:b,isDashed:e[t]})}for(v(s[0]),i=0;i<e.body.length;++i){var y=e.body[i],w=g,x=f;a<y.length&&(a=y.length);var A=new Array(y.length);for(r=0;r<y.length;++r){var k=Di(y[r],t);x<k.depth&&(x=k.depth),w<k.height&&(w=k.height),A[r]=k}var E=e.rowGaps[i],S=0;E&&(S=et(E,t))>0&&(x<(S+=f)&&(x=S),S=0),e.addJot&&(x+=p),A.height=w,A.depth=x,b+=w,A.pos=b,b+=x+S,o[i]=A,v(s[i+1])}var C,M,_=b/2+t.fontMetrics().axisHeight,T=e.cols||[],N=[],I=[];if(e.tags&&e.tags.some((e=>e)))for(i=0;i<n;++i){var L=o[i],P=L.pos-_,R=e.tags[i],D=void 0;(D=!0===R?di.makeSpan(["eqn-num"],[],t):!1===R?di.makeSpan([],[],t):di.makeSpan([],Ti(R,t,!0),t)).depth=L.depth,D.height=L.height,I.push({type:"elem",elem:D,shift:P})}for(r=0,M=0;r<a||M<T.length;++r,++M){for(var z=T[M]||{},F=!0;"separator"===z.type;){if(F||((C=di.makeSpan(["arraycolsep"],[])).style.width=tt(t.fontMetrics().doubleRuleSep),N.push(C)),"|"!==z.separator&&":"!==z.separator)throw new ve("Invalid separator type: "+z.separator);var O="|"===z.separator?"solid":"dashed",B=di.makeSpan(["vertical-separator"],[],t);B.style.height=tt(b),B.style.borderRightWidth=tt(h),B.style.borderRightStyle=O,B.style.margin="0 "+tt(-h/2);var H=b-_;H&&(B.style.verticalAlign=tt(-H)),N.push(B),z=T[++M]||{},F=!1}if(!(r>=a)){var q=void 0;(r>0||e.hskipBeforeAndAfter)&&0!==(q=ke.deflt(z.pregap,d))&&((C=di.makeSpan(["arraycolsep"],[])).style.width=tt(q),N.push(C));var j=[];for(i=0;i<n;++i){var V=o[i],U=V[r];if(U){var G=V.pos-_;U.depth=V.depth,U.height=V.height,j.push({type:"elem",elem:U,shift:G})}}j=di.makeVList({positionType:"individualShift",children:j},t),j=di.makeSpan(["col-align-"+(z.align||"c")],[j]),N.push(j),(r<a-1||e.hskipBeforeAndAfter)&&0!==(q=ke.deflt(z.postgap,d))&&((C=di.makeSpan(["arraycolsep"],[])).style.width=tt(q),N.push(C))}}if(o=di.makeSpan(["mtable"],N),l.length>0){for(var $=di.makeLineSpan("hline",t,h),W=di.makeLineSpan("hdashline",t,h),X=[{type:"elem",elem:o,shift:0}];l.length>0;){var Y=l.pop(),K=Y.pos-_;Y.isDashed?X.push({type:"elem",elem:W,shift:K}):X.push({type:"elem",elem:$,shift:K})}o=di.makeVList({positionType:"individualShift",children:X},t)}if(0===I.length)return di.makeSpan(["mord"],[o],t);var Z=di.makeVList({positionType:"individualShift",children:I},t);return Z=di.makeSpan(["tag"],[Z],t),di.makeFragment([o,Z])},ln={c:"center ",l:"left ",r:"right "},hn=function(e,t){for(var i=[],r=new qi.MathNode("mtd",[],["mtr-glue"]),n=new qi.MathNode("mtd",[],["mml-eqn-num"]),s=0;s<e.body.length;s++){for(var a=e.body[s],o=[],l=0;l<a.length;l++)o.push(new qi.MathNode("mtd",[Xi(a[l],t)]));e.tags&&e.tags[s]&&(o.unshift(r),o.push(r),e.leqno?o.unshift(n):o.push(n)),i.push(new qi.MathNode("mtr",o))}var h=new qi.MathNode("mtable",i),c=.5===e.arraystretch?.1:.16+e.arraystretch-1+(e.addJot?.09:0);h.setAttribute("rowspacing",tt(c));var d="",u="";if(e.cols&&e.cols.length>0){var p=e.cols,m="",g=!1,f=0,b=p.length;"separator"===p[0].type&&(d+="top ",f=1),"separator"===p[p.length-1].type&&(d+="bottom ",b-=1);for(var v=f;v<b;v++)"align"===p[v].type?(u+=ln[p[v].align],g&&(m+="none "),g=!0):"separator"===p[v].type&&g&&(m+="|"===p[v].separator?"solid ":"dashed ",g=!1);h.setAttribute("columnalign",u.trim()),/[sd]/.test(m)&&h.setAttribute("columnlines",m.trim())}if("align"===e.colSeparationType){for(var y=e.cols||[],w="",x=1;x<y.length;x++)w+=x%2?"0em ":"1em ";h.setAttribute("columnspacing",w.trim())}else"alignat"===e.colSeparationType||"gather"===e.colSeparationType?h.setAttribute("columnspacing","0em"):"small"===e.colSeparationType?h.setAttribute("columnspacing","0.2778em"):"CD"===e.colSeparationType?h.setAttribute("columnspacing","0.5em"):h.setAttribute("columnspacing","1em");var A="",k=e.hLinesBeforeRow;d+=k[0].length>0?"left ":"",d+=k[k.length-1].length>0?"right ":"";for(var E=1;E<k.length-1;E++)A+=0===k[E].length?"none ":k[E][0]?"dashed ":"solid ";return/[sd]/.test(A)&&h.setAttribute("rowlines",A.trim()),""!==d&&(h=new qi.MathNode("menclose",[h])).setAttribute("notation",d.trim()),e.arraystretch&&e.arraystretch<1&&(h=new qi.MathNode("mstyle",[h])).setAttribute("scriptlevel","1"),h},cn=function(e,t){-1===e.envName.indexOf("ed")&&rn(e);var i,r=[],n=e.envName.indexOf("at")>-1?"alignat":"align",s="split"===e.envName,a=sn(e.parser,{cols:r,addJot:!0,autoTag:s?void 0:nn(e.envName),emptySingleRow:!0,colSeparationType:n,maxNumCols:s?2:void 0,leqno:e.parser.settings.leqno},"display"),o=0,l={type:"ordgroup",mode:e.mode,body:[]};if(t[0]&&"ordgroup"===t[0].type){for(var h="",c=0;c<t[0].body.length;c++){h+=rr(t[0].body[c],"textord").text}i=Number(h),o=2*i}var d=!o;a.body.forEach((function(e){for(var t=1;t<e.length;t+=2){var r=rr(e[t],"styling");rr(r.body[0],"ordgroup").body.unshift(l)}if(d)o<e.length&&(o=e.length);else{var n=e.length/2;if(i<n)throw new ve("Too many math in a row: expected "+i+", but got "+n,e[0])}}));for(var u=0;u<o;++u){var p="r",m=0;u%2==1?p="l":u>0&&d&&(m=1),r[u]={type:"align",align:p,pregap:m,postgap:0}}return a.colSeparationType=d?"align":"alignat",a};Jr({type:"array",names:["array","darray"],props:{numArgs:1},handler(e,t){var i=(sr(t[0])?[t[0]]:rr(t[0],"ordgroup").body).map((function(e){var t=nr(e).text;if(-1!=="lcr".indexOf(t))return{type:"align",align:t};if("|"===t)return{type:"separator",separator:"|"};if(":"===t)return{type:"separator",separator:":"};throw new ve("Unknown column alignment: "+t,e)})),r={cols:i,hskipBeforeAndAfter:!0,maxNumCols:i.length};return sn(e.parser,r,an(e.envName))},htmlBuilder:on,mathmlBuilder:hn}),Jr({type:"array",names:["matrix","pmatrix","bmatrix","Bmatrix","vmatrix","Vmatrix","matrix*","pmatrix*","bmatrix*","Bmatrix*","vmatrix*","Vmatrix*"],props:{numArgs:0},handler(e){var t={matrix:null,pmatrix:["(",")"],bmatrix:["[","]"],Bmatrix:["\\{","\\}"],vmatrix:["|","|"],Vmatrix:["\\Vert","\\Vert"]}[e.envName.replace("*","")],i="c",r={hskipBeforeAndAfter:!1,cols:[{type:"align",align:i}]};if("*"===e.envName.charAt(e.envName.length-1)){var n=e.parser;if(n.consumeSpaces(),"["===n.fetch().text){if(n.consume(),n.consumeSpaces(),i=n.fetch().text,-1==="lcr".indexOf(i))throw new ve("Expected l or c or r",n.nextToken);n.consume(),n.consumeSpaces(),n.expect("]"),n.consume(),r.cols=[{type:"align",align:i}]}}var s=sn(e.parser,r,an(e.envName)),a=Math.max(0,...s.body.map((e=>e.length)));return s.cols=new Array(a).fill({type:"align",align:i}),t?{type:"leftright",mode:e.mode,body:[s],left:t[0],right:t[1],rightColor:void 0}:s},htmlBuilder:on,mathmlBuilder:hn}),Jr({type:"array",names:["smallmatrix"],props:{numArgs:0},handler(e){var t=sn(e.parser,{arraystretch:.5},"script");return t.colSeparationType="small",t},htmlBuilder:on,mathmlBuilder:hn}),Jr({type:"array",names:["subarray"],props:{numArgs:1},handler(e,t){var i=(sr(t[0])?[t[0]]:rr(t[0],"ordgroup").body).map((function(e){var t=nr(e).text;if(-1!=="lc".indexOf(t))return{type:"align",align:t};throw new ve("Unknown column alignment: "+t,e)}));if(i.length>1)throw new ve("{subarray} can contain only one column");var r={cols:i,hskipBeforeAndAfter:!1,arraystretch:.5};if((r=sn(e.parser,r,"script")).body.length>0&&r.body[0].length>1)throw new ve("{subarray} can contain only one column");return r},htmlBuilder:on,mathmlBuilder:hn}),Jr({type:"array",names:["cases","dcases","rcases","drcases"],props:{numArgs:0},handler(e){var t=sn(e.parser,{arraystretch:1.2,cols:[{type:"align",align:"l",pregap:0,postgap:1},{type:"align",align:"l",pregap:0,postgap:0}]},an(e.envName));return{type:"leftright",mode:e.mode,body:[t],left:e.envName.indexOf("r")>-1?".":"\\{",right:e.envName.indexOf("r")>-1?"\\}":".",rightColor:void 0}},htmlBuilder:on,mathmlBuilder:hn}),Jr({type:"array",names:["align","align*","aligned","split"],props:{numArgs:0},handler:cn,htmlBuilder:on,mathmlBuilder:hn}),Jr({type:"array",names:["gathered","gather","gather*"],props:{numArgs:0},handler(e){ke.contains(["gather","gather*"],e.envName)&&rn(e);var t={cols:[{type:"align",align:"c"}],addJot:!0,colSeparationType:"gather",autoTag:nn(e.envName),emptySingleRow:!0,leqno:e.parser.settings.leqno};return sn(e.parser,t,"display")},htmlBuilder:on,mathmlBuilder:hn}),Jr({type:"array",names:["alignat","alignat*","alignedat"],props:{numArgs:1},handler:cn,htmlBuilder:on,mathmlBuilder:hn}),Jr({type:"array",names:["equation","equation*"],props:{numArgs:0},handler(e){rn(e);var t={autoTag:nn(e.envName),emptySingleRow:!0,singleRow:!0,maxNumCols:1,leqno:e.parser.settings.leqno};return sn(e.parser,t,"display")},htmlBuilder:on,mathmlBuilder:hn}),Jr({type:"array",names:["CD"],props:{numArgs:0},handler:e=>(rn(e),function(e){var t=[];for(e.gullet.beginGroup(),e.gullet.macros.set("\\cr","\\\\\\relax"),e.gullet.beginGroup();;){t.push(e.parseExpression(!1,"\\\\")),e.gullet.endGroup(),e.gullet.beginGroup();var i=e.fetch().text;if("&"!==i&&"\\\\"!==i){if("\\end"===i){0===t[t.length-1].length&&t.pop();break}throw new ve("Expected \\\\ or \\cr or \\end",e.nextToken)}e.consume()}for(var r,n,s=[],a=[s],o=0;o<t.length;o++){for(var l=t[o],h={type:"styling",body:[],mode:"math",style:"display"},c=0;c<l.length;c++)if(gr(l[c])){s.push(h);var d=nr(l[c+=1]).text,u=new Array(2);if(u[0]={type:"ordgroup",mode:"math",body:[]},u[1]={type:"ordgroup",mode:"math",body:[]},"=|.".indexOf(d)>-1);else{if(!("<>AV".indexOf(d)>-1))throw new ve('Expected one of "<>AV=|." after @',l[c]);for(var p=0;p<2;p++){for(var m=!0,g=c+1;g<l.length;g++){if(n=d,("mathord"===(r=l[g]).type||"atom"===r.type)&&r.text===n){m=!1,c=g;break}if(gr(l[g]))throw new ve("Missing a "+d+" character to complete a CD arrow.",l[g]);u[p].body.push(l[g])}if(m)throw new ve("Missing a "+d+" character to complete a CD arrow.",l[c])}}var f={type:"styling",body:[fr(d,u,e)],mode:"math",style:"display"};s.push(f),h={type:"styling",body:[],mode:"math",style:"display"}}else h.body.push(l[c]);o%2==0?s.push(h):s.shift(),s=[],a.push(s)}return e.gullet.endGroup(),e.gullet.endGroup(),{type:"array",mode:"math",body:a,arraystretch:1,addJot:!0,rowGaps:[null],cols:new Array(a[0].length).fill({type:"align",align:"c",pregap:.25,postgap:.25}),colSeparationType:"CD",hLinesBeforeRow:new Array(a.length+1).fill([])}}(e.parser)),htmlBuilder:on,mathmlBuilder:hn}),en("\\nonumber","\\gdef\\@eqnsw{0}"),en("\\notag","\\nonumber"),wi({type:"text",names:["\\hline","\\hdashline"],props:{numArgs:0,allowedInText:!0,allowedInMath:!0},handler(e,t){throw new ve(e.funcName+" valid only within array environment")}});var dn=Zr;wi({type:"environment",names:["\\begin","\\end"],props:{numArgs:1,argTypes:["text"]},handler(e,t){var{parser:i,funcName:r}=e,n=t[0];if("ordgroup"!==n.type)throw new ve("Invalid environment name",n);for(var s="",a=0;a<n.body.length;++a)s+=rr(n.body[a],"textord").text;if("\\begin"===r){if(!dn.hasOwnProperty(s))throw new ve("No such environment: "+s,n);var o=dn[s],{args:l,optArgs:h}=i.parseArguments("\\begin{"+s+"}",o),c={mode:i.mode,envName:s,parser:i},d=o.handler(c,l,h);i.expect("\\end",!1);var u=i.nextToken,p=rr(i.parseFunction(),"environment");if(p.name!==s)throw new ve("Mismatch: \\begin{"+s+"} matched by \\end{"+p.name+"}",u);return d}return{type:"environment",mode:i.mode,name:s,nameGroup:n}}});var un=(e,t)=>{var i=e.font,r=t.withFont(i);return Di(e.body,r)},pn=(e,t)=>{var i=e.font,r=t.withFont(i);return Xi(e.body,r)},mn={"\\Bbb":"\\mathbb","\\bold":"\\mathbf","\\frak":"\\mathfrak","\\bm":"\\boldsymbol"};wi({type:"font",names:["\\mathrm","\\mathit","\\mathbf","\\mathnormal","\\mathsfit","\\mathbb","\\mathcal","\\mathfrak","\\mathscr","\\mathsf","\\mathtt","\\Bbb","\\bold","\\frak"],props:{numArgs:1,allowedInArgument:!0},handler:(e,t)=>{var{parser:i,funcName:r}=e,n=Ai(t[0]),s=r;return s in mn&&(s=mn[s]),{type:"font",mode:i.mode,font:s.slice(1),body:n}},htmlBuilder:un,mathmlBuilder:pn}),wi({type:"mclass",names:["\\boldsymbol","\\bm"],props:{numArgs:1},handler:(e,t)=>{var{parser:i}=e,r=t[0],n=ke.isCharacterBox(r);return{type:"mclass",mode:i.mode,mclass:pr(r),body:[{type:"font",mode:i.mode,font:"boldsymbol",body:r}],isCharacterBox:n}}}),wi({type:"font",names:["\\rm","\\sf","\\tt","\\bf","\\it","\\cal"],props:{numArgs:0,allowedInText:!0},handler:(e,t)=>{var{parser:i,funcName:r,breakOnTokenText:n}=e,{mode:s}=i,a=i.parseExpression(!0,n);return{type:"font",mode:s,font:"math"+r.slice(1),body:{type:"ordgroup",mode:i.mode,body:a}}},htmlBuilder:un,mathmlBuilder:pn});var gn=(e,t)=>{var i=t;return"display"===e?i=i.id>=De.SCRIPT.id?i.text():De.DISPLAY:"text"===e&&i.size===De.DISPLAY.size?i=De.TEXT:"script"===e?i=De.SCRIPT:"scriptscript"===e&&(i=De.SCRIPTSCRIPT),i},fn=(e,t)=>{var i,r=gn(e.size,t.style),n=r.fracNum(),s=r.fracDen();i=t.havingStyle(n);var a=Di(e.numer,i,t);if(e.continued){var o=8.5/t.fontMetrics().ptPerEm,l=3.5/t.fontMetrics().ptPerEm;a.height=a.height<o?o:a.height,a.depth=a.depth<l?l:a.depth}i=t.havingStyle(s);var h,c,d,u,p,m,g,f,b,v,y=Di(e.denom,i,t);if(e.hasBarLine?(e.barSize?(c=et(e.barSize,t),h=di.makeLineSpan("frac-line",t,c)):h=di.makeLineSpan("frac-line",t),c=h.height,d=h.height):(h=null,c=0,d=t.fontMetrics().defaultRuleThickness),r.size===De.DISPLAY.size||"display"===e.size?(u=t.fontMetrics().num1,p=c>0?3*d:7*d,m=t.fontMetrics().denom1):(c>0?(u=t.fontMetrics().num2,p=d):(u=t.fontMetrics().num3,p=3*d),m=t.fontMetrics().denom2),h){var w=t.fontMetrics().axisHeight;u-a.depth-(w+.5*c)<p&&(u+=p-(u-a.depth-(w+.5*c))),w-.5*c-(y.height-m)<p&&(m+=p-(w-.5*c-(y.height-m)));var x=-(w-.5*c);g=di.makeVList({positionType:"individualShift",children:[{type:"elem",elem:y,shift:m},{type:"elem",elem:h,shift:x},{type:"elem",elem:a,shift:-u}]},t)}else{var A=u-a.depth-(y.height-m);A<p&&(u+=.5*(p-A),m+=.5*(p-A)),g=di.makeVList({positionType:"individualShift",children:[{type:"elem",elem:y,shift:m},{type:"elem",elem:a,shift:-u}]},t)}return i=t.havingStyle(r),g.height*=i.sizeMultiplier/t.sizeMultiplier,g.depth*=i.sizeMultiplier/t.sizeMultiplier,f=r.size===De.DISPLAY.size?t.fontMetrics().delim1:r.size===De.SCRIPTSCRIPT.size?t.havingStyle(De.SCRIPT).fontMetrics().delim2:t.fontMetrics().delim2,b=null==e.leftDelim?Ri(t,["mopen"]):Ur.customSizedDelim(e.leftDelim,f,!0,t.havingStyle(r),e.mode,["mopen"]),v=e.continued?di.makeSpan([]):null==e.rightDelim?Ri(t,["mclose"]):Ur.customSizedDelim(e.rightDelim,f,!0,t.havingStyle(r),e.mode,["mclose"]),di.makeSpan(["mord"].concat(i.sizingClasses(t)),[b,di.makeSpan(["mfrac"],[g]),v],t)},bn=(e,t)=>{var i=new qi.MathNode("mfrac",[Xi(e.numer,t),Xi(e.denom,t)]);if(e.hasBarLine){if(e.barSize){var r=et(e.barSize,t);i.setAttribute("linethickness",tt(r))}}else i.setAttribute("linethickness","0px");var n=gn(e.size,t.style);if(n.size!==t.style.size){i=new qi.MathNode("mstyle",[i]);var s=n.size===De.DISPLAY.size?"true":"false";i.setAttribute("displaystyle",s),i.setAttribute("scriptlevel","0")}if(null!=e.leftDelim||null!=e.rightDelim){var a=[];if(null!=e.leftDelim){var o=new qi.MathNode("mo",[new qi.TextNode(e.leftDelim.replace("\\",""))]);o.setAttribute("fence","true"),a.push(o)}if(a.push(i),null!=e.rightDelim){var l=new qi.MathNode("mo",[new qi.TextNode(e.rightDelim.replace("\\",""))]);l.setAttribute("fence","true"),a.push(l)}return Vi(a)}return i};wi({type:"genfrac",names:["\\dfrac","\\frac","\\tfrac","\\dbinom","\\binom","\\tbinom","\\\\atopfrac","\\\\bracefrac","\\\\brackfrac"],props:{numArgs:2,allowedInArgument:!0},handler:(e,t)=>{var i,{parser:r,funcName:n}=e,s=t[0],a=t[1],o=null,l=null,h="auto";switch(n){case"\\dfrac":case"\\frac":case"\\tfrac":i=!0;break;case"\\\\atopfrac":i=!1;break;case"\\dbinom":case"\\binom":case"\\tbinom":i=!1,o="(",l=")";break;case"\\\\bracefrac":i=!1,o="\\{",l="\\}";break;case"\\\\brackfrac":i=!1,o="[",l="]";break;default:throw new Error("Unrecognized genfrac command")}switch(n){case"\\dfrac":case"\\dbinom":h="display";break;case"\\tfrac":case"\\tbinom":h="text"}return{type:"genfrac",mode:r.mode,continued:!1,numer:s,denom:a,hasBarLine:i,leftDelim:o,rightDelim:l,size:h,barSize:null}},htmlBuilder:fn,mathmlBuilder:bn}),wi({type:"genfrac",names:["\\cfrac"],props:{numArgs:2},handler:(e,t)=>{var{parser:i,funcName:r}=e,n=t[0],s=t[1];return{type:"genfrac",mode:i.mode,continued:!0,numer:n,denom:s,hasBarLine:!0,leftDelim:null,rightDelim:null,size:"display",barSize:null}}}),wi({type:"infix",names:["\\over","\\choose","\\atop","\\brace","\\brack"],props:{numArgs:0,infix:!0},handler(e){var t,{parser:i,funcName:r,token:n}=e;switch(r){case"\\over":t="\\frac";break;case"\\choose":t="\\binom";break;case"\\atop":t="\\\\atopfrac";break;case"\\brace":t="\\\\bracefrac";break;case"\\brack":t="\\\\brackfrac";break;default:throw new Error("Unrecognized infix genfrac command")}return{type:"infix",mode:i.mode,replaceWith:t,token:n}}});var vn=["display","text","script","scriptscript"],yn=function(e){var t=null;return e.length>0&&(t="."===(t=e)?null:t),t};wi({type:"genfrac",names:["\\genfrac"],props:{numArgs:6,allowedInArgument:!0,argTypes:["math","math","size","text","math","math"]},handler(e,t){var i,{parser:r}=e,n=t[4],s=t[5],a=Ai(t[0]),o="atom"===a.type&&"open"===a.family?yn(a.text):null,l=Ai(t[1]),h="atom"===l.type&&"close"===l.family?yn(l.text):null,c=rr(t[2],"size"),d=null;i=!!c.isBlank||(d=c.value).number>0;var u="auto",p=t[3];if("ordgroup"===p.type){if(p.body.length>0){var m=rr(p.body[0],"textord");u=vn[Number(m.text)]}}else p=rr(p,"textord"),u=vn[Number(p.text)];return{type:"genfrac",mode:r.mode,numer:n,denom:s,continued:!1,hasBarLine:i,barSize:d,leftDelim:o,rightDelim:h,size:u}},htmlBuilder:fn,mathmlBuilder:bn}),wi({type:"infix",names:["\\above"],props:{numArgs:1,argTypes:["size"],infix:!0},handler(e,t){var{parser:i,funcName:r,token:n}=e;return{type:"infix",mode:i.mode,replaceWith:"\\\\abovefrac",size:rr(t[0],"size").value,token:n}}}),wi({type:"genfrac",names:["\\\\abovefrac"],props:{numArgs:3,argTypes:["math","size","math"]},handler:(e,t)=>{var{parser:i,funcName:r}=e,n=t[0],s=function(e){if(!e)throw new Error("Expected non-null, but got "+String(e));return e}(rr(t[1],"infix").size),a=t[2],o=s.number>0;return{type:"genfrac",mode:i.mode,numer:n,denom:a,continued:!1,hasBarLine:o,barSize:s,leftDelim:null,rightDelim:null,size:"auto"}},htmlBuilder:fn,mathmlBuilder:bn});var wn=(e,t)=>{var i,r,n=t.style;"supsub"===e.type?(i=e.sup?Di(e.sup,t.havingStyle(n.sup()),t):Di(e.sub,t.havingStyle(n.sub()),t),r=rr(e.base,"horizBrace")):r=rr(e,"horizBrace");var s,a=Di(r.base,t.havingBaseStyle(De.DISPLAY)),o=ir(r,t);if(r.isOver?(s=di.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:a},{type:"kern",size:.1},{type:"elem",elem:o}]},t)).children[0].children[0].children[1].classes.push("svg-align"):(s=di.makeVList({positionType:"bottom",positionData:a.depth+.1+o.height,children:[{type:"elem",elem:o},{type:"kern",size:.1},{type:"elem",elem:a}]},t)).children[0].children[0].children[0].classes.push("svg-align"),i){var l=di.makeSpan(["mord",r.isOver?"mover":"munder"],[s],t);s=r.isOver?di.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:l},{type:"kern",size:.2},{type:"elem",elem:i}]},t):di.makeVList({positionType:"bottom",positionData:l.depth+.2+i.height+i.depth,children:[{type:"elem",elem:i},{type:"kern",size:.2},{type:"elem",elem:l}]},t)}return di.makeSpan(["mord",r.isOver?"mover":"munder"],[s],t)};wi({type:"horizBrace",names:["\\overbrace","\\underbrace"],props:{numArgs:1},handler(e,t){var{parser:i,funcName:r}=e;return{type:"horizBrace",mode:i.mode,label:r,isOver:/^\\over/.test(r),base:t[0]}},htmlBuilder:wn,mathmlBuilder:(e,t)=>{var i=tr(e.label);return new qi.MathNode(e.isOver?"mover":"munder",[Xi(e.base,t),i])}}),wi({type:"href",names:["\\href"],props:{numArgs:2,argTypes:["url","original"],allowedInText:!0},handler:(e,t)=>{var{parser:i}=e,r=t[1],n=rr(t[0],"url").url;return i.settings.isTrusted({command:"\\href",url:n})?{type:"href",mode:i.mode,href:n,body:ki(r)}:i.formatUnsupportedCmd("\\href")},htmlBuilder:(e,t)=>{var i=Ti(e.body,t,!1);return di.makeAnchor(e.href,[],i,t)},mathmlBuilder:(e,t)=>{var i=Wi(e.body,t);return i instanceof Bi||(i=new Bi("mrow",[i])),i.setAttribute("href",e.href),i}}),wi({type:"href",names:["\\url"],props:{numArgs:1,argTypes:["url"],allowedInText:!0},handler:(e,t)=>{var{parser:i}=e,r=rr(t[0],"url").url;if(!i.settings.isTrusted({command:"\\url",url:r}))return i.formatUnsupportedCmd("\\url");for(var n=[],s=0;s<r.length;s++){var a=r[s];"~"===a&&(a="\\textasciitilde"),n.push({type:"textord",mode:"text",text:a})}var o={type:"text",mode:i.mode,font:"\\texttt",body:n};return{type:"href",mode:i.mode,href:r,body:ki(o)}}}),wi({type:"hbox",names:["\\hbox"],props:{numArgs:1,argTypes:["text"],allowedInText:!0,primitive:!0},handler(e,t){var{parser:i}=e;return{type:"hbox",mode:i.mode,body:ki(t[0])}},htmlBuilder(e,t){var i=Ti(e.body,t,!1);return di.makeFragment(i)},mathmlBuilder:(e,t)=>new qi.MathNode("mrow",$i(e.body,t))}),wi({type:"html",names:["\\htmlClass","\\htmlId","\\htmlStyle","\\htmlData"],props:{numArgs:2,argTypes:["raw","original"],allowedInText:!0},handler:(e,t)=>{var i,{parser:r,funcName:n,token:s}=e,a=rr(t[0],"raw").string,o=t[1];r.settings.strict&&r.settings.reportNonstrict("htmlExtension","HTML extension is disabled on strict mode");var l={};switch(n){case"\\htmlClass":l.class=a,i={command:"\\htmlClass",class:a};break;case"\\htmlId":l.id=a,i={command:"\\htmlId",id:a};break;case"\\htmlStyle":l.style=a,i={command:"\\htmlStyle",style:a};break;case"\\htmlData":for(var h=a.split(","),c=0;c<h.length;c++){var d=h[c].split("=");if(2!==d.length)throw new ve("Error parsing key-value for \\htmlData");l["data-"+d[0].trim()]=d[1].trim()}i={command:"\\htmlData",attributes:l};break;default:throw new Error("Unrecognized html command")}return r.settings.isTrusted(i)?{type:"html",mode:r.mode,attributes:l,body:ki(o)}:r.formatUnsupportedCmd(n)},htmlBuilder:(e,t)=>{var i=Ti(e.body,t,!1),r=["enclosing"];e.attributes.class&&r.push(...e.attributes.class.trim().split(/\s+/));var n=di.makeSpan(r,i,t);for(var s in e.attributes)"class"!==s&&e.attributes.hasOwnProperty(s)&&n.setAttribute(s,e.attributes[s]);return n},mathmlBuilder:(e,t)=>Wi(e.body,t)}),wi({type:"htmlmathml",names:["\\html@mathml"],props:{numArgs:2,allowedInText:!0},handler:(e,t)=>{var{parser:i}=e;return{type:"htmlmathml",mode:i.mode,html:ki(t[0]),mathml:ki(t[1])}},htmlBuilder:(e,t)=>{var i=Ti(e.html,t,!1);return di.makeFragment(i)},mathmlBuilder:(e,t)=>Wi(e.mathml,t)});var xn=function(e){if(/^[-+]? *(\d+(\.\d*)?|\.\d+)$/.test(e))return{number:+e,unit:"bp"};var t=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(e);if(!t)throw new ve("Invalid size: '"+e+"' in \\includegraphics");var i={number:+(t[1]+t[2]),unit:t[3]};if(!Qe(i))throw new ve("Invalid unit: '"+i.unit+"' in \\includegraphics.");return i};wi({type:"includegraphics",names:["\\includegraphics"],props:{numArgs:1,numOptionalArgs:1,argTypes:["raw","url"],allowedInText:!1},handler:(e,t,i)=>{var{parser:r}=e,n={number:0,unit:"em"},s={number:.9,unit:"em"},a={number:0,unit:"em"},o="";if(i[0])for(var l=rr(i[0],"raw").string.split(","),h=0;h<l.length;h++){var c=l[h].split("=");if(2===c.length){var d=c[1].trim();switch(c[0].trim()){case"alt":o=d;break;case"width":n=xn(d);break;case"height":s=xn(d);break;case"totalheight":a=xn(d);break;default:throw new ve("Invalid key: '"+c[0]+"' in \\includegraphics.")}}}var u=rr(t[0],"url").url;return""===o&&(o=(o=(o=u).replace(/^.*[\\/]/,"")).substring(0,o.lastIndexOf("."))),r.settings.isTrusted({command:"\\includegraphics",url:u})?{type:"includegraphics",mode:r.mode,alt:o,width:n,height:s,totalheight:a,src:u}:r.formatUnsupportedCmd("\\includegraphics")},htmlBuilder:(e,t)=>{var i=et(e.height,t),r=0;e.totalheight.number>0&&(r=et(e.totalheight,t)-i);var n=0;e.width.number>0&&(n=et(e.width,t));var s={height:tt(i+r)};n>0&&(s.width=tt(n)),r>0&&(s.verticalAlign=tt(-r));var a=new ht(e.src,e.alt,s);return a.height=i,a.depth=r,a},mathmlBuilder:(e,t)=>{var i=new qi.MathNode("mglyph",[]);i.setAttribute("alt",e.alt);var r=et(e.height,t),n=0;if(e.totalheight.number>0&&(n=et(e.totalheight,t)-r,i.setAttribute("valign",tt(-n))),i.setAttribute("height",tt(r+n)),e.width.number>0){var s=et(e.width,t);i.setAttribute("width",tt(s))}return i.setAttribute("src",e.src),i}}),wi({type:"kern",names:["\\kern","\\mkern","\\hskip","\\mskip"],props:{numArgs:1,argTypes:["size"],primitive:!0,allowedInText:!0},handler(e,t){var{parser:i,funcName:r}=e,n=rr(t[0],"size");if(i.settings.strict){var s="m"===r[1],a="mu"===n.value.unit;s?(a||i.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+r+" supports only mu units, not "+n.value.unit+" units"),"math"!==i.mode&&i.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+r+" works only in math mode")):a&&i.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+r+" doesn't support mu units")}return{type:"kern",mode:i.mode,dimension:n.value}},htmlBuilder:(e,t)=>di.makeGlue(e.dimension,t),mathmlBuilder(e,t){var i=et(e.dimension,t);return new qi.SpaceNode(i)}}),wi({type:"lap",names:["\\mathllap","\\mathrlap","\\mathclap"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:i,funcName:r}=e,n=t[0];return{type:"lap",mode:i.mode,alignment:r.slice(5),body:n}},htmlBuilder:(e,t)=>{var i;"clap"===e.alignment?(i=di.makeSpan([],[Di(e.body,t)]),i=di.makeSpan(["inner"],[i],t)):i=di.makeSpan(["inner"],[Di(e.body,t)]);var r=di.makeSpan(["fix"],[]),n=di.makeSpan([e.alignment],[i,r],t),s=di.makeSpan(["strut"]);return s.style.height=tt(n.height+n.depth),n.depth&&(s.style.verticalAlign=tt(-n.depth)),n.children.unshift(s),n=di.makeSpan(["thinbox"],[n],t),di.makeSpan(["mord","vbox"],[n],t)},mathmlBuilder:(e,t)=>{var i=new qi.MathNode("mpadded",[Xi(e.body,t)]);if("rlap"!==e.alignment){var r="llap"===e.alignment?"-1":"-0.5";i.setAttribute("lspace",r+"width")}return i.setAttribute("width","0px"),i}}),wi({type:"styling",names:["\\(","$"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(e,t){var{funcName:i,parser:r}=e,n=r.mode;r.switchMode("math");var s="\\("===i?"\\)":"$",a=r.parseExpression(!1,s);return r.expect(s),r.switchMode(n),{type:"styling",mode:r.mode,style:"text",body:a}}}),wi({type:"text",names:["\\)","\\]"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(e,t){throw new ve("Mismatched "+e.funcName)}});var An=(e,t)=>{switch(t.style.size){case De.DISPLAY.size:return e.display;case De.TEXT.size:return e.text;case De.SCRIPT.size:return e.script;case De.SCRIPTSCRIPT.size:return e.scriptscript;default:return e.text}};wi({type:"mathchoice",names:["\\mathchoice"],props:{numArgs:4,primitive:!0},handler:(e,t)=>{var{parser:i}=e;return{type:"mathchoice",mode:i.mode,display:ki(t[0]),text:ki(t[1]),script:ki(t[2]),scriptscript:ki(t[3])}},htmlBuilder:(e,t)=>{var i=An(e,t),r=Ti(i,t,!1);return di.makeFragment(r)},mathmlBuilder:(e,t)=>{var i=An(e,t);return Wi(i,t)}});var kn=(e,t,i,r,n,s,a)=>{e=di.makeSpan([],[e]);var o,l,h,c=i&&ke.isCharacterBox(i);if(t){var d=Di(t,r.havingStyle(n.sup()),r);l={elem:d,kern:Math.max(r.fontMetrics().bigOpSpacing1,r.fontMetrics().bigOpSpacing3-d.depth)}}if(i){var u=Di(i,r.havingStyle(n.sub()),r);o={elem:u,kern:Math.max(r.fontMetrics().bigOpSpacing2,r.fontMetrics().bigOpSpacing4-u.height)}}if(l&&o){var p=r.fontMetrics().bigOpSpacing5+o.elem.height+o.elem.depth+o.kern+e.depth+a;h=di.makeVList({positionType:"bottom",positionData:p,children:[{type:"kern",size:r.fontMetrics().bigOpSpacing5},{type:"elem",elem:o.elem,marginLeft:tt(-s)},{type:"kern",size:o.kern},{type:"elem",elem:e},{type:"kern",size:l.kern},{type:"elem",elem:l.elem,marginLeft:tt(s)},{type:"kern",size:r.fontMetrics().bigOpSpacing5}]},r)}else if(o){var m=e.height-a;h=di.makeVList({positionType:"top",positionData:m,children:[{type:"kern",size:r.fontMetrics().bigOpSpacing5},{type:"elem",elem:o.elem,marginLeft:tt(-s)},{type:"kern",size:o.kern},{type:"elem",elem:e}]},r)}else{if(!l)return e;var g=e.depth+a;h=di.makeVList({positionType:"bottom",positionData:g,children:[{type:"elem",elem:e},{type:"kern",size:l.kern},{type:"elem",elem:l.elem,marginLeft:tt(s)},{type:"kern",size:r.fontMetrics().bigOpSpacing5}]},r)}var f=[h];if(o&&0!==s&&!c){var b=di.makeSpan(["mspace"],[],r);b.style.marginRight=tt(s),f.unshift(b)}return di.makeSpan(["mop","op-limits"],f,r)},En=["\\smallint"],Sn=(e,t)=>{var i,r,n,s=!1;"supsub"===e.type?(i=e.sup,r=e.sub,n=rr(e.base,"op"),s=!0):n=rr(e,"op");var a,o=t.style,l=!1;if(o.size===De.DISPLAY.size&&n.symbol&&!ke.contains(En,n.name)&&(l=!0),n.symbol){var h=l?"Size2-Regular":"Size1-Regular",c="";if("\\oiint"!==n.name&&"\\oiiint"!==n.name||(c=n.name.slice(1),n.name="oiint"===c?"\\iint":"\\iiint"),a=di.makeSymbol(n.name,h,"math",t,["mop","op-symbol",l?"large-op":"small-op"]),c.length>0){var d=a.italic,u=di.staticSvg(c+"Size"+(l?"2":"1"),t);a=di.makeVList({positionType:"individualShift",children:[{type:"elem",elem:a,shift:0},{type:"elem",elem:u,shift:l?.08:0}]},t),n.name="\\"+c,a.classes.unshift("mop"),a.italic=d}}else if(n.body){var p=Ti(n.body,t,!0);1===p.length&&p[0]instanceof dt?(a=p[0]).classes[0]="mop":a=di.makeSpan(["mop"],p,t)}else{for(var m=[],g=1;g<n.name.length;g++)m.push(di.mathsym(n.name[g],n.mode,t));a=di.makeSpan(["mop"],m,t)}var f=0,b=0;return(a instanceof dt||"\\oiint"===n.name||"\\oiiint"===n.name)&&!n.suppressBaseShift&&(f=(a.height-a.depth)/2-t.fontMetrics().axisHeight,b=a.italic),s?kn(a,i,r,t,o,b,f):(f&&(a.style.position="relative",a.style.top=tt(f)),a)},Cn=(e,t)=>{var i;if(e.symbol)i=new Bi("mo",[ji(e.name,e.mode)]),ke.contains(En,e.name)&&i.setAttribute("largeop","false");else if(e.body)i=new Bi("mo",$i(e.body,t));else{i=new Bi("mi",[new Hi(e.name.slice(1))]);var r=new Bi("mo",[ji("","text")]);i=e.parentIsSupSub?new Bi("mrow",[i,r]):Oi([i,r])}return i},Mn={"∏":"\\prod","∐":"\\coprod","∑":"\\sum","⋀":"\\bigwedge","⋁":"\\bigvee","⋂":"\\bigcap","⋃":"\\bigcup","⨀":"\\bigodot","⨁":"\\bigoplus","⨂":"\\bigotimes","⨄":"\\biguplus","⨆":"\\bigsqcup"};wi({type:"op",names:["\\coprod","\\bigvee","\\bigwedge","\\biguplus","\\bigcap","\\bigcup","\\intop","\\prod","\\sum","\\bigotimes","\\bigoplus","\\bigodot","\\bigsqcup","\\smallint","∏","∐","∑","⋀","⋁","⋂","⋃","⨀","⨁","⨂","⨄","⨆"],props:{numArgs:0},handler:(e,t)=>{var{parser:i,funcName:r}=e,n=r;return 1===n.length&&(n=Mn[n]),{type:"op",mode:i.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:n}},htmlBuilder:Sn,mathmlBuilder:Cn}),wi({type:"op",names:["\\mathop"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var{parser:i}=e,r=t[0];return{type:"op",mode:i.mode,limits:!1,parentIsSupSub:!1,symbol:!1,body:ki(r)}},htmlBuilder:Sn,mathmlBuilder:Cn});var _n={"∫":"\\int","∬":"\\iint","∭":"\\iiint","∮":"\\oint","∯":"\\oiint","∰":"\\oiiint"};wi({type:"op",names:["\\arcsin","\\arccos","\\arctan","\\arctg","\\arcctg","\\arg","\\ch","\\cos","\\cosec","\\cosh","\\cot","\\cotg","\\coth","\\csc","\\ctg","\\cth","\\deg","\\dim","\\exp","\\hom","\\ker","\\lg","\\ln","\\log","\\sec","\\sin","\\sinh","\\sh","\\tan","\\tanh","\\tg","\\th"],props:{numArgs:0},handler(e){var{parser:t,funcName:i}=e;return{type:"op",mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!1,name:i}},htmlBuilder:Sn,mathmlBuilder:Cn}),wi({type:"op",names:["\\det","\\gcd","\\inf","\\lim","\\max","\\min","\\Pr","\\sup"],props:{numArgs:0},handler(e){var{parser:t,funcName:i}=e;return{type:"op",mode:t.mode,limits:!0,parentIsSupSub:!1,symbol:!1,name:i}},htmlBuilder:Sn,mathmlBuilder:Cn}),wi({type:"op",names:["\\int","\\iint","\\iiint","\\oint","\\oiint","\\oiiint","∫","∬","∭","∮","∯","∰"],props:{numArgs:0},handler(e){var{parser:t,funcName:i}=e,r=i;return 1===r.length&&(r=_n[r]),{type:"op",mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:r}},htmlBuilder:Sn,mathmlBuilder:Cn});var Tn=(e,t)=>{var i,r,n,s,a=!1;if("supsub"===e.type?(i=e.sup,r=e.sub,n=rr(e.base,"operatorname"),a=!0):n=rr(e,"operatorname"),n.body.length>0){for(var o=n.body.map((e=>{var t=e.text;return"string"==typeof t?{type:"textord",mode:e.mode,text:t}:e})),l=Ti(o,t.withFont("mathrm"),!0),h=0;h<l.length;h++){var c=l[h];c instanceof dt&&(c.text=c.text.replace(/\u2212/,"-").replace(/\u2217/,"*"))}s=di.makeSpan(["mop"],l,t)}else s=di.makeSpan(["mop"],[],t);return a?kn(s,i,r,t,t.style,0,0):s};function Nn(e,t,i){for(var r=Ti(e,t,!1),n=t.sizeMultiplier/i.sizeMultiplier,s=0;s<r.length;s++){var a=r[s].classes.indexOf("sizing");a<0?Array.prototype.push.apply(r[s].classes,t.sizingClasses(i)):r[s].classes[a+1]==="reset-size"+t.size&&(r[s].classes[a+1]="reset-size"+i.size),r[s].height*=n,r[s].depth*=n}return di.makeFragment(r)}wi({type:"operatorname",names:["\\operatorname@","\\operatornamewithlimits"],props:{numArgs:1},handler:(e,t)=>{var{parser:i,funcName:r}=e,n=t[0];return{type:"operatorname",mode:i.mode,body:ki(n),alwaysHandleSupSub:"\\operatornamewithlimits"===r,limits:!1,parentIsSupSub:!1}},htmlBuilder:Tn,mathmlBuilder:(e,t)=>{for(var i=$i(e.body,t.withFont("mathrm")),r=!0,n=0;n<i.length;n++){var s=i[n];if(s instanceof qi.SpaceNode);else if(s instanceof qi.MathNode)switch(s.type){case"mi":case"mn":case"ms":case"mspace":case"mtext":break;case"mo":var a=s.children[0];1===s.children.length&&a instanceof qi.TextNode?a.text=a.text.replace(/\u2212/,"-").replace(/\u2217/,"*"):r=!1;break;default:r=!1}else r=!1}if(r){var o=i.map((e=>e.toText())).join("");i=[new qi.TextNode(o)]}var l=new qi.MathNode("mi",i);l.setAttribute("mathvariant","normal");var h=new qi.MathNode("mo",[ji("","text")]);return e.parentIsSupSub?new qi.MathNode("mrow",[l,h]):qi.newDocumentFragment([l,h])}}),en("\\operatorname","\\@ifstar\\operatornamewithlimits\\operatorname@"),xi({type:"ordgroup",htmlBuilder:(e,t)=>e.semisimple?di.makeFragment(Ti(e.body,t,!1)):di.makeSpan(["mord"],Ti(e.body,t,!0),t),mathmlBuilder:(e,t)=>Wi(e.body,t,!0)}),wi({type:"overline",names:["\\overline"],props:{numArgs:1},handler(e,t){var{parser:i}=e,r=t[0];return{type:"overline",mode:i.mode,body:r}},htmlBuilder(e,t){var i=Di(e.body,t.havingCrampedStyle()),r=di.makeLineSpan("overline-line",t),n=t.fontMetrics().defaultRuleThickness,s=di.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:i},{type:"kern",size:3*n},{type:"elem",elem:r},{type:"kern",size:n}]},t);return di.makeSpan(["mord","overline"],[s],t)},mathmlBuilder(e,t){var i=new qi.MathNode("mo",[new qi.TextNode("‾")]);i.setAttribute("stretchy","true");var r=new qi.MathNode("mover",[Xi(e.body,t),i]);return r.setAttribute("accent","true"),r}}),wi({type:"phantom",names:["\\phantom"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:i}=e,r=t[0];return{type:"phantom",mode:i.mode,body:ki(r)}},htmlBuilder:(e,t)=>{var i=Ti(e.body,t.withPhantom(),!1);return di.makeFragment(i)},mathmlBuilder:(e,t)=>{var i=$i(e.body,t);return new qi.MathNode("mphantom",i)}}),wi({type:"hphantom",names:["\\hphantom"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:i}=e,r=t[0];return{type:"hphantom",mode:i.mode,body:r}},htmlBuilder:(e,t)=>{var i=di.makeSpan([],[Di(e.body,t.withPhantom())]);if(i.height=0,i.depth=0,i.children)for(var r=0;r<i.children.length;r++)i.children[r].height=0,i.children[r].depth=0;return i=di.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:i}]},t),di.makeSpan(["mord"],[i],t)},mathmlBuilder:(e,t)=>{var i=$i(ki(e.body),t),r=new qi.MathNode("mphantom",i),n=new qi.MathNode("mpadded",[r]);return n.setAttribute("height","0px"),n.setAttribute("depth","0px"),n}}),wi({type:"vphantom",names:["\\vphantom"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:i}=e,r=t[0];return{type:"vphantom",mode:i.mode,body:r}},htmlBuilder:(e,t)=>{var i=di.makeSpan(["inner"],[Di(e.body,t.withPhantom())]),r=di.makeSpan(["fix"],[]);return di.makeSpan(["mord","rlap"],[i,r],t)},mathmlBuilder:(e,t)=>{var i=$i(ki(e.body),t),r=new qi.MathNode("mphantom",i),n=new qi.MathNode("mpadded",[r]);return n.setAttribute("width","0px"),n}}),wi({type:"raisebox",names:["\\raisebox"],props:{numArgs:2,argTypes:["size","hbox"],allowedInText:!0},handler(e,t){var{parser:i}=e,r=rr(t[0],"size").value,n=t[1];return{type:"raisebox",mode:i.mode,dy:r,body:n}},htmlBuilder(e,t){var i=Di(e.body,t),r=et(e.dy,t);return di.makeVList({positionType:"shift",positionData:-r,children:[{type:"elem",elem:i}]},t)},mathmlBuilder(e,t){var i=new qi.MathNode("mpadded",[Xi(e.body,t)]),r=e.dy.number+e.dy.unit;return i.setAttribute("voffset",r),i}}),wi({type:"internal",names:["\\relax"],props:{numArgs:0,allowedInText:!0,allowedInArgument:!0},handler(e){var{parser:t}=e;return{type:"internal",mode:t.mode}}}),wi({type:"rule",names:["\\rule"],props:{numArgs:2,numOptionalArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["size","size","size"]},handler(e,t,i){var{parser:r}=e,n=i[0],s=rr(t[0],"size"),a=rr(t[1],"size");return{type:"rule",mode:r.mode,shift:n&&rr(n,"size").value,width:s.value,height:a.value}},htmlBuilder(e,t){var i=di.makeSpan(["mord","rule"],[],t),r=et(e.width,t),n=et(e.height,t),s=e.shift?et(e.shift,t):0;return i.style.borderRightWidth=tt(r),i.style.borderTopWidth=tt(n),i.style.bottom=tt(s),i.width=r,i.height=n+s,i.depth=-s,i.maxFontSize=1.125*n*t.sizeMultiplier,i},mathmlBuilder(e,t){var i=et(e.width,t),r=et(e.height,t),n=e.shift?et(e.shift,t):0,s=t.color&&t.getColor()||"black",a=new qi.MathNode("mspace");a.setAttribute("mathbackground",s),a.setAttribute("width",tt(i)),a.setAttribute("height",tt(r));var o=new qi.MathNode("mpadded",[a]);return n>=0?o.setAttribute("height",tt(n)):(o.setAttribute("height",tt(n)),o.setAttribute("depth",tt(-n))),o.setAttribute("voffset",tt(n)),o}});var In=["\\tiny","\\sixptsize","\\scriptsize","\\footnotesize","\\small","\\normalsize","\\large","\\Large","\\LARGE","\\huge","\\Huge"];wi({type:"sizing",names:In,props:{numArgs:0,allowedInText:!0},handler:(e,t)=>{var{breakOnTokenText:i,funcName:r,parser:n}=e,s=n.parseExpression(!1,i);return{type:"sizing",mode:n.mode,size:In.indexOf(r)+1,body:s}},htmlBuilder:(e,t)=>{var i=t.havingSize(e.size);return Nn(e.body,i,t)},mathmlBuilder:(e,t)=>{var i=t.havingSize(e.size),r=$i(e.body,i),n=new qi.MathNode("mstyle",r);return n.setAttribute("mathsize",tt(i.sizeMultiplier)),n}}),wi({type:"smash",names:["\\smash"],props:{numArgs:1,numOptionalArgs:1,allowedInText:!0},handler:(e,t,i)=>{var{parser:r}=e,n=!1,s=!1,a=i[0]&&rr(i[0],"ordgroup");if(a)for(var o="",l=0;l<a.body.length;++l){if("t"===(o=a.body[l].text))n=!0;else{if("b"!==o){n=!1,s=!1;break}s=!0}}else n=!0,s=!0;var h=t[0];return{type:"smash",mode:r.mode,body:h,smashHeight:n,smashDepth:s}},htmlBuilder:(e,t)=>{var i=di.makeSpan([],[Di(e.body,t)]);if(!e.smashHeight&&!e.smashDepth)return i;if(e.smashHeight&&(i.height=0,i.children))for(var r=0;r<i.children.length;r++)i.children[r].height=0;if(e.smashDepth&&(i.depth=0,i.children))for(var n=0;n<i.children.length;n++)i.children[n].depth=0;var s=di.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:i}]},t);return di.makeSpan(["mord"],[s],t)},mathmlBuilder:(e,t)=>{var i=new qi.MathNode("mpadded",[Xi(e.body,t)]);return e.smashHeight&&i.setAttribute("height","0px"),e.smashDepth&&i.setAttribute("depth","0px"),i}}),wi({type:"sqrt",names:["\\sqrt"],props:{numArgs:1,numOptionalArgs:1},handler(e,t,i){var{parser:r}=e,n=i[0],s=t[0];return{type:"sqrt",mode:r.mode,body:s,index:n}},htmlBuilder(e,t){var i=Di(e.body,t.havingCrampedStyle());0===i.height&&(i.height=t.fontMetrics().xHeight),i=di.wrapFragment(i,t);var r=t.fontMetrics().defaultRuleThickness,n=r;t.style.id<De.TEXT.id&&(n=t.fontMetrics().xHeight);var s=r+n/4,a=i.height+i.depth+s+r,{span:o,ruleWidth:l,advanceWidth:h}=Ur.sqrtImage(a,t),c=o.height-l;c>i.height+i.depth+s&&(s=(s+c-i.height-i.depth)/2);var d=o.height-i.height-s-l;i.style.paddingLeft=tt(h);var u=di.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:i,wrapperClasses:["svg-align"]},{type:"kern",size:-(i.height+d)},{type:"elem",elem:o},{type:"kern",size:l}]},t);if(e.index){var p=t.havingStyle(De.SCRIPTSCRIPT),m=Di(e.index,p,t),g=.6*(u.height-u.depth),f=di.makeVList({positionType:"shift",positionData:-g,children:[{type:"elem",elem:m}]},t),b=di.makeSpan(["root"],[f]);return di.makeSpan(["mord","sqrt"],[b,u],t)}return di.makeSpan(["mord","sqrt"],[u],t)},mathmlBuilder(e,t){var{body:i,index:r}=e;return r?new qi.MathNode("mroot",[Xi(i,t),Xi(r,t)]):new qi.MathNode("msqrt",[Xi(i,t)])}});var Ln={display:De.DISPLAY,text:De.TEXT,script:De.SCRIPT,scriptscript:De.SCRIPTSCRIPT};wi({type:"styling",names:["\\displaystyle","\\textstyle","\\scriptstyle","\\scriptscriptstyle"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e,t){var{breakOnTokenText:i,funcName:r,parser:n}=e,s=n.parseExpression(!0,i),a=r.slice(1,r.length-5);return{type:"styling",mode:n.mode,style:a,body:s}},htmlBuilder(e,t){var i=Ln[e.style],r=t.havingStyle(i).withFont("");return Nn(e.body,r,t)},mathmlBuilder(e,t){var i=Ln[e.style],r=t.havingStyle(i),n=$i(e.body,r),s=new qi.MathNode("mstyle",n),a={display:["0","true"],text:["0","false"],script:["1","false"],scriptscript:["2","false"]}[e.style];return s.setAttribute("scriptlevel",a[0]),s.setAttribute("displaystyle",a[1]),s}});xi({type:"supsub",htmlBuilder(e,t){var i=function(e,t){var i=e.base;return i?"op"===i.type?i.limits&&(t.style.size===De.DISPLAY.size||i.alwaysHandleSupSub)?Sn:null:"operatorname"===i.type?i.alwaysHandleSupSub&&(t.style.size===De.DISPLAY.size||i.limits)?Tn:null:"accent"===i.type?ke.isCharacterBox(i.base)?ar:null:"horizBrace"===i.type&&!e.sub===i.isOver?wn:null:null}(e,t);if(i)return i(e,t);var r,n,s,{base:a,sup:o,sub:l}=e,h=Di(a,t),c=t.fontMetrics(),d=0,u=0,p=a&&ke.isCharacterBox(a);if(o){var m=t.havingStyle(t.style.sup());r=Di(o,m,t),p||(d=h.height-m.fontMetrics().supDrop*m.sizeMultiplier/t.sizeMultiplier)}if(l){var g=t.havingStyle(t.style.sub());n=Di(l,g,t),p||(u=h.depth+g.fontMetrics().subDrop*g.sizeMultiplier/t.sizeMultiplier)}s=t.style===De.DISPLAY?c.sup1:t.style.cramped?c.sup3:c.sup2;var f,b=t.sizeMultiplier,v=tt(.5/c.ptPerEm/b),y=null;if(n){var w=e.base&&"op"===e.base.type&&e.base.name&&("\\oiint"===e.base.name||"\\oiiint"===e.base.name);(h instanceof dt||w)&&(y=tt(-h.italic))}if(r&&n){d=Math.max(d,s,r.depth+.25*c.xHeight),u=Math.max(u,c.sub2);var x=4*c.defaultRuleThickness;if(d-r.depth-(n.height-u)<x){u=x-(d-r.depth)+n.height;var A=.8*c.xHeight-(d-r.depth);A>0&&(d+=A,u-=A)}var k=[{type:"elem",elem:n,shift:u,marginRight:v,marginLeft:y},{type:"elem",elem:r,shift:-d,marginRight:v}];f=di.makeVList({positionType:"individualShift",children:k},t)}else if(n){u=Math.max(u,c.sub1,n.height-.8*c.xHeight);var E=[{type:"elem",elem:n,marginLeft:y,marginRight:v}];f=di.makeVList({positionType:"shift",positionData:u,children:E},t)}else{if(!r)throw new Error("supsub must have either sup or sub.");d=Math.max(d,s,r.depth+.25*c.xHeight),f=di.makeVList({positionType:"shift",positionData:-d,children:[{type:"elem",elem:r,marginRight:v}]},t)}var S=Pi(h,"right")||"mord";return di.makeSpan([S],[h,di.makeSpan(["msupsub"],[f])],t)},mathmlBuilder(e,t){var i,r=!1;e.base&&"horizBrace"===e.base.type&&!!e.sup===e.base.isOver&&(r=!0,i=e.base.isOver),!e.base||"op"!==e.base.type&&"operatorname"!==e.base.type||(e.base.parentIsSupSub=!0);var n,s=[Xi(e.base,t)];if(e.sub&&s.push(Xi(e.sub,t)),e.sup&&s.push(Xi(e.sup,t)),r)n=i?"mover":"munder";else if(e.sub)if(e.sup){var a=e.base;n=a&&"op"===a.type&&a.limits&&t.style===De.DISPLAY||a&&"operatorname"===a.type&&a.alwaysHandleSupSub&&(t.style===De.DISPLAY||a.limits)?"munderover":"msubsup"}else{var o=e.base;n=o&&"op"===o.type&&o.limits&&(t.style===De.DISPLAY||o.alwaysHandleSupSub)||o&&"operatorname"===o.type&&o.alwaysHandleSupSub&&(o.limits||t.style===De.DISPLAY)?"munder":"msub"}else{var l=e.base;n=l&&"op"===l.type&&l.limits&&(t.style===De.DISPLAY||l.alwaysHandleSupSub)||l&&"operatorname"===l.type&&l.alwaysHandleSupSub&&(l.limits||t.style===De.DISPLAY)?"mover":"msup"}return new qi.MathNode(n,s)}}),xi({type:"atom",htmlBuilder:(e,t)=>di.mathsym(e.text,e.mode,t,["m"+e.family]),mathmlBuilder(e,t){var i=new qi.MathNode("mo",[ji(e.text,e.mode)]);if("bin"===e.family){var r=Ui(e,t);"bold-italic"===r&&i.setAttribute("mathvariant",r)}else"punct"===e.family?i.setAttribute("separator","true"):"open"!==e.family&&"close"!==e.family||i.setAttribute("stretchy","false");return i}});var Pn={mi:"italic",mn:"normal",mtext:"normal"};xi({type:"mathord",htmlBuilder:(e,t)=>di.makeOrd(e,t,"mathord"),mathmlBuilder(e,t){var i=new qi.MathNode("mi",[ji(e.text,e.mode,t)]),r=Ui(e,t)||"italic";return r!==Pn[i.type]&&i.setAttribute("mathvariant",r),i}}),xi({type:"textord",htmlBuilder:(e,t)=>di.makeOrd(e,t,"textord"),mathmlBuilder(e,t){var i,r=ji(e.text,e.mode,t),n=Ui(e,t)||"normal";return i="text"===e.mode?new qi.MathNode("mtext",[r]):/[0-9]/.test(e.text)?new qi.MathNode("mn",[r]):"\\prime"===e.text?new qi.MathNode("mo",[r]):new qi.MathNode("mi",[r]),n!==Pn[i.type]&&i.setAttribute("mathvariant",n),i}});var Rn={"\\nobreak":"nobreak","\\allowbreak":"allowbreak"},Dn={" ":{},"\\ ":{},"~":{className:"nobreak"},"\\space":{},"\\nobreakspace":{className:"nobreak"}};xi({type:"spacing",htmlBuilder(e,t){if(Dn.hasOwnProperty(e.text)){var i=Dn[e.text].className||"";if("text"===e.mode){var r=di.makeOrd(e,t,"textord");return r.classes.push(i),r}return di.makeSpan(["mspace",i],[di.mathsym(e.text,e.mode,t)],t)}if(Rn.hasOwnProperty(e.text))return di.makeSpan(["mspace",Rn[e.text]],[],t);throw new ve('Unknown type of space "'+e.text+'"')},mathmlBuilder(e,t){if(!Dn.hasOwnProperty(e.text)){if(Rn.hasOwnProperty(e.text))return new qi.MathNode("mspace");throw new ve('Unknown type of space "'+e.text+'"')}return new qi.MathNode("mtext",[new qi.TextNode(" ")])}});var zn=()=>{var e=new qi.MathNode("mtd",[]);return e.setAttribute("width","50%"),e};xi({type:"tag",mathmlBuilder(e,t){var i=new qi.MathNode("mtable",[new qi.MathNode("mtr",[zn(),new qi.MathNode("mtd",[Wi(e.body,t)]),zn(),new qi.MathNode("mtd",[Wi(e.tag,t)])])]);return i.setAttribute("width","100%"),i}});var Fn={"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm"},On={"\\textbf":"textbf","\\textmd":"textmd"},Bn={"\\textit":"textit","\\textup":"textup"},Hn=(e,t)=>{var i=e.font;return i?Fn[i]?t.withTextFontFamily(Fn[i]):On[i]?t.withTextFontWeight(On[i]):"\\emph"===i?"textit"===t.fontShape?t.withTextFontShape("textup"):t.withTextFontShape("textit"):t.withTextFontShape(Bn[i]):t};wi({type:"text",names:["\\text","\\textrm","\\textsf","\\texttt","\\textnormal","\\textbf","\\textmd","\\textit","\\textup","\\emph"],props:{numArgs:1,argTypes:["text"],allowedInArgument:!0,allowedInText:!0},handler(e,t){var{parser:i,funcName:r}=e,n=t[0];return{type:"text",mode:i.mode,body:ki(n),font:r}},htmlBuilder(e,t){var i=Hn(e,t),r=Ti(e.body,i,!0);return di.makeSpan(["mord","text"],r,i)},mathmlBuilder(e,t){var i=Hn(e,t);return Wi(e.body,i)}}),wi({type:"underline",names:["\\underline"],props:{numArgs:1,allowedInText:!0},handler(e,t){var{parser:i}=e;return{type:"underline",mode:i.mode,body:t[0]}},htmlBuilder(e,t){var i=Di(e.body,t),r=di.makeLineSpan("underline-line",t),n=t.fontMetrics().defaultRuleThickness,s=di.makeVList({positionType:"top",positionData:i.height,children:[{type:"kern",size:n},{type:"elem",elem:r},{type:"kern",size:3*n},{type:"elem",elem:i}]},t);return di.makeSpan(["mord","underline"],[s],t)},mathmlBuilder(e,t){var i=new qi.MathNode("mo",[new qi.TextNode("‾")]);i.setAttribute("stretchy","true");var r=new qi.MathNode("munder",[Xi(e.body,t),i]);return r.setAttribute("accentunder","true"),r}}),wi({type:"vcenter",names:["\\vcenter"],props:{numArgs:1,argTypes:["original"],allowedInText:!1},handler(e,t){var{parser:i}=e;return{type:"vcenter",mode:i.mode,body:t[0]}},htmlBuilder(e,t){var i=Di(e.body,t),r=t.fontMetrics().axisHeight,n=.5*(i.height-r-(i.depth+r));return di.makeVList({positionType:"shift",positionData:n,children:[{type:"elem",elem:i}]},t)},mathmlBuilder:(e,t)=>new qi.MathNode("mpadded",[Xi(e.body,t)],["vcenter"])}),wi({type:"verb",names:["\\verb"],props:{numArgs:0,allowedInText:!0},handler(e,t,i){throw new ve("\\verb ended by end of line instead of matching delimiter")},htmlBuilder(e,t){for(var i=qn(e),r=[],n=t.havingStyle(t.style.text()),s=0;s<i.length;s++){var a=i[s];"~"===a&&(a="\\textasciitilde"),r.push(di.makeSymbol(a,"Typewriter-Regular",e.mode,n,["mord","texttt"]))}return di.makeSpan(["mord","text"].concat(n.sizingClasses(t)),di.tryCombineChars(r),n)},mathmlBuilder(e,t){var i=new qi.TextNode(qn(e)),r=new qi.MathNode("mtext",[i]);return r.setAttribute("mathvariant","monospace"),r}});var qn=e=>e.body.replace(/ /g,e.star?"␣":" "),jn=bi,Vn="[ \r\n\t]",Un="(\\\\[a-zA-Z@]+)"+Vn+"*",Gn="[̀-ͯ]",$n=new RegExp(Gn+"+$"),Wn="("+Vn+"+)|\\\\(\n|[ \r\t]+\n?)[ \r\t]*|([!-\\[\\]-‧-豈-]"+Gn+"*|[\ud800-\udbff][\udc00-\udfff]"+Gn+"*|\\\\verb\\*([^]).*?\\4|\\\\verb([^*a-zA-Z]).*?\\5|"+Un+"|\\\\[^\ud800-\udfff])";class Xn{constructor(e,t){this.input=void 0,this.settings=void 0,this.tokenRegex=void 0,this.catcodes=void 0,this.input=e,this.settings=t,this.tokenRegex=new RegExp(Wn,"g"),this.catcodes={"%":14,"~":13}}setCatcode(e,t){this.catcodes[e]=t}lex(){var e=this.input,t=this.tokenRegex.lastIndex;if(t===e.length)return new be("EOF",new fe(this,t,t));var i=this.tokenRegex.exec(e);if(null===i||i.index!==t)throw new ve("Unexpected character: '"+e[t]+"'",new be(e[t],new fe(this,t,t+1)));var r=i[6]||i[3]||(i[2]?"\\ ":" ");if(14===this.catcodes[r]){var n=e.indexOf("\n",this.tokenRegex.lastIndex);return-1===n?(this.tokenRegex.lastIndex=e.length,this.settings.reportNonstrict("commentAtEnd","% comment has no terminating newline; LaTeX would fail because of commenting the end of math mode (e.g. $)")):this.tokenRegex.lastIndex=n+1,this.lex()}return new be(r,new fe(this,t,this.tokenRegex.lastIndex))}}class Yn{constructor(e,t){void 0===e&&(e={}),void 0===t&&(t={}),this.current=void 0,this.builtins=void 0,this.undefStack=void 0,this.current=t,this.builtins=e,this.undefStack=[]}beginGroup(){this.undefStack.push({})}endGroup(){if(0===this.undefStack.length)throw new ve("Unbalanced namespace destruction: attempt to pop global namespace; please report this as a bug");var e=this.undefStack.pop();for(var t in e)e.hasOwnProperty(t)&&(null==e[t]?delete this.current[t]:this.current[t]=e[t])}endGroups(){for(;this.undefStack.length>0;)this.endGroup()}has(e){return this.current.hasOwnProperty(e)||this.builtins.hasOwnProperty(e)}get(e){return this.current.hasOwnProperty(e)?this.current[e]:this.builtins[e]}set(e,t,i){if(void 0===i&&(i=!1),i){for(var r=0;r<this.undefStack.length;r++)delete this.undefStack[r][e];this.undefStack.length>0&&(this.undefStack[this.undefStack.length-1][e]=t)}else{var n=this.undefStack[this.undefStack.length-1];n&&!n.hasOwnProperty(e)&&(n[e]=this.current[e])}null==t?delete this.current[e]:this.current[e]=t}}var Kn=Qr;en("\\noexpand",(function(e){var t=e.popToken();return e.isExpandable(t.text)&&(t.noexpand=!0,t.treatAsRelax=!0),{tokens:[t],numArgs:0}})),en("\\expandafter",(function(e){var t=e.popToken();return e.expandOnce(!0),{tokens:[t],numArgs:0}})),en("\\@firstoftwo",(function(e){return{tokens:e.consumeArgs(2)[0],numArgs:0}})),en("\\@secondoftwo",(function(e){return{tokens:e.consumeArgs(2)[1],numArgs:0}})),en("\\@ifnextchar",(function(e){var t=e.consumeArgs(3);e.consumeSpaces();var i=e.future();return 1===t[0].length&&t[0][0].text===i.text?{tokens:t[1],numArgs:0}:{tokens:t[2],numArgs:0}})),en("\\@ifstar","\\@ifnextchar *{\\@firstoftwo{#1}}"),en("\\TextOrMath",(function(e){var t=e.consumeArgs(2);return"text"===e.mode?{tokens:t[0],numArgs:0}:{tokens:t[1],numArgs:0}}));var Zn={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15};en("\\char",(function(e){var t,i=e.popToken(),r="";if("'"===i.text)t=8,i=e.popToken();else if('"'===i.text)t=16,i=e.popToken();else if("`"===i.text)if("\\"===(i=e.popToken()).text[0])r=i.text.charCodeAt(1);else{if("EOF"===i.text)throw new ve("\\char` missing argument");r=i.text.charCodeAt(0)}else t=10;if(t){if(null==(r=Zn[i.text])||r>=t)throw new ve("Invalid base-"+t+" digit "+i.text);for(var n;null!=(n=Zn[e.future().text])&&n<t;)r*=t,r+=n,e.popToken()}return"\\@char{"+r+"}"}));var Jn=(e,t,i,r)=>{var n=e.consumeArg().tokens;if(1!==n.length)throw new ve("\\newcommand's first argument must be a macro name");var s=n[0].text,a=e.isDefined(s);if(a&&!t)throw new ve("\\newcommand{"+s+"} attempting to redefine "+s+"; use \\renewcommand");if(!a&&!i)throw new ve("\\renewcommand{"+s+"} when command "+s+" does not yet exist; use \\newcommand");var o=0;if(1===(n=e.consumeArg().tokens).length&&"["===n[0].text){for(var l="",h=e.expandNextToken();"]"!==h.text&&"EOF"!==h.text;)l+=h.text,h=e.expandNextToken();if(!l.match(/^\s*[0-9]+\s*$/))throw new ve("Invalid number of arguments: "+l);o=parseInt(l),n=e.consumeArg().tokens}return a&&r||e.macros.set(s,{tokens:n,numArgs:o}),""};en("\\newcommand",(e=>Jn(e,!1,!0,!1))),en("\\renewcommand",(e=>Jn(e,!0,!1,!1))),en("\\providecommand",(e=>Jn(e,!0,!0,!0))),en("\\message",(e=>{var t=e.consumeArgs(1)[0];return console.log(t.reverse().map((e=>e.text)).join("")),""})),en("\\errmessage",(e=>{var t=e.consumeArgs(1)[0];return console.error(t.reverse().map((e=>e.text)).join("")),""})),en("\\show",(e=>{var t=e.popToken(),i=t.text;return console.log(t,e.macros.get(i),jn[i],vt.math[i],vt.text[i]),""})),en("\\bgroup","{"),en("\\egroup","}"),en("~","\\nobreakspace"),en("\\lq","`"),en("\\rq","'"),en("\\aa","\\r a"),en("\\AA","\\r A"),en("\\textcopyright","\\html@mathml{\\textcircled{c}}{\\char`©}"),en("\\copyright","\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}"),en("\\textregistered","\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`®}"),en("ℬ","\\mathscr{B}"),en("ℰ","\\mathscr{E}"),en("ℱ","\\mathscr{F}"),en("ℋ","\\mathscr{H}"),en("ℐ","\\mathscr{I}"),en("ℒ","\\mathscr{L}"),en("ℳ","\\mathscr{M}"),en("ℛ","\\mathscr{R}"),en("ℭ","\\mathfrak{C}"),en("ℌ","\\mathfrak{H}"),en("ℨ","\\mathfrak{Z}"),en("\\Bbbk","\\Bbb{k}"),en("·","\\cdotp"),en("\\llap","\\mathllap{\\textrm{#1}}"),en("\\rlap","\\mathrlap{\\textrm{#1}}"),en("\\clap","\\mathclap{\\textrm{#1}}"),en("\\mathstrut","\\vphantom{(}"),en("\\underbar","\\underline{\\text{#1}}"),en("\\not",'\\html@mathml{\\mathrel{\\mathrlap\\@not}}{\\char"338}'),en("\\neq","\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`≠}}"),en("\\ne","\\neq"),en("≠","\\neq"),en("\\notin","\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}{\\mathrel{\\char`∉}}"),en("∉","\\notin"),en("≘","\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}}{\\mathrel{\\char`≘}}"),en("≙","\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`≘}}"),en("≚","\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`≚}}"),en("≛","\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}{\\mathrel{\\char`≛}}"),en("≝","\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}{\\mathrel{\\char`≝}}"),en("≞","\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}{\\mathrel{\\char`≞}}"),en("≟","\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`≟}}"),en("⟂","\\perp"),en("‼","\\mathclose{!\\mkern-0.8mu!}"),en("∌","\\notni"),en("⌜","\\ulcorner"),en("⌝","\\urcorner"),en("⌞","\\llcorner"),en("⌟","\\lrcorner"),en("©","\\copyright"),en("®","\\textregistered"),en("️","\\textregistered"),en("\\ulcorner",'\\html@mathml{\\@ulcorner}{\\mathop{\\char"231c}}'),en("\\urcorner",'\\html@mathml{\\@urcorner}{\\mathop{\\char"231d}}'),en("\\llcorner",'\\html@mathml{\\@llcorner}{\\mathop{\\char"231e}}'),en("\\lrcorner",'\\html@mathml{\\@lrcorner}{\\mathop{\\char"231f}}'),en("\\vdots","{\\varvdots\\rule{0pt}{15pt}}"),en("⋮","\\vdots"),en("\\varGamma","\\mathit{\\Gamma}"),en("\\varDelta","\\mathit{\\Delta}"),en("\\varTheta","\\mathit{\\Theta}"),en("\\varLambda","\\mathit{\\Lambda}"),en("\\varXi","\\mathit{\\Xi}"),en("\\varPi","\\mathit{\\Pi}"),en("\\varSigma","\\mathit{\\Sigma}"),en("\\varUpsilon","\\mathit{\\Upsilon}"),en("\\varPhi","\\mathit{\\Phi}"),en("\\varPsi","\\mathit{\\Psi}"),en("\\varOmega","\\mathit{\\Omega}"),en("\\substack","\\begin{subarray}{c}#1\\end{subarray}"),en("\\colon","\\nobreak\\mskip2mu\\mathpunct{}\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu\\relax"),en("\\boxed","\\fbox{$\\displaystyle{#1}$}"),en("\\iff","\\DOTSB\\;\\Longleftrightarrow\\;"),en("\\implies","\\DOTSB\\;\\Longrightarrow\\;"),en("\\impliedby","\\DOTSB\\;\\Longleftarrow\\;"),en("\\dddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ...}}{#1}}"),en("\\ddddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ....}}{#1}}");var Qn={",":"\\dotsc","\\not":"\\dotsb","+":"\\dotsb","=":"\\dotsb","<":"\\dotsb",">":"\\dotsb","-":"\\dotsb","*":"\\dotsb",":":"\\dotsb","\\DOTSB":"\\dotsb","\\coprod":"\\dotsb","\\bigvee":"\\dotsb","\\bigwedge":"\\dotsb","\\biguplus":"\\dotsb","\\bigcap":"\\dotsb","\\bigcup":"\\dotsb","\\prod":"\\dotsb","\\sum":"\\dotsb","\\bigotimes":"\\dotsb","\\bigoplus":"\\dotsb","\\bigodot":"\\dotsb","\\bigsqcup":"\\dotsb","\\And":"\\dotsb","\\longrightarrow":"\\dotsb","\\Longrightarrow":"\\dotsb","\\longleftarrow":"\\dotsb","\\Longleftarrow":"\\dotsb","\\longleftrightarrow":"\\dotsb","\\Longleftrightarrow":"\\dotsb","\\mapsto":"\\dotsb","\\longmapsto":"\\dotsb","\\hookrightarrow":"\\dotsb","\\doteq":"\\dotsb","\\mathbin":"\\dotsb","\\mathrel":"\\dotsb","\\relbar":"\\dotsb","\\Relbar":"\\dotsb","\\xrightarrow":"\\dotsb","\\xleftarrow":"\\dotsb","\\DOTSI":"\\dotsi","\\int":"\\dotsi","\\oint":"\\dotsi","\\iint":"\\dotsi","\\iiint":"\\dotsi","\\iiiint":"\\dotsi","\\idotsint":"\\dotsi","\\DOTSX":"\\dotsx"};en("\\dots",(function(e){var t="\\dotso",i=e.expandAfterFuture().text;return i in Qn?t=Qn[i]:("\\not"===i.slice(0,4)||i in vt.math&&ke.contains(["bin","rel"],vt.math[i].group))&&(t="\\dotsb"),t}));var es={")":!0,"]":!0,"\\rbrack":!0,"\\}":!0,"\\rbrace":!0,"\\rangle":!0,"\\rceil":!0,"\\rfloor":!0,"\\rgroup":!0,"\\rmoustache":!0,"\\right":!0,"\\bigr":!0,"\\biggr":!0,"\\Bigr":!0,"\\Biggr":!0,$:!0,";":!0,".":!0,",":!0};en("\\dotso",(function(e){return e.future().text in es?"\\ldots\\,":"\\ldots"})),en("\\dotsc",(function(e){var t=e.future().text;return t in es&&","!==t?"\\ldots\\,":"\\ldots"})),en("\\cdots",(function(e){return e.future().text in es?"\\@cdots\\,":"\\@cdots"})),en("\\dotsb","\\cdots"),en("\\dotsm","\\cdots"),en("\\dotsi","\\!\\cdots"),en("\\dotsx","\\ldots\\,"),en("\\DOTSI","\\relax"),en("\\DOTSB","\\relax"),en("\\DOTSX","\\relax"),en("\\tmspace","\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax"),en("\\,","\\tmspace+{3mu}{.1667em}"),en("\\thinspace","\\,"),en("\\>","\\mskip{4mu}"),en("\\:","\\tmspace+{4mu}{.2222em}"),en("\\medspace","\\:"),en("\\;","\\tmspace+{5mu}{.2777em}"),en("\\thickspace","\\;"),en("\\!","\\tmspace-{3mu}{.1667em}"),en("\\negthinspace","\\!"),en("\\negmedspace","\\tmspace-{4mu}{.2222em}"),en("\\negthickspace","\\tmspace-{5mu}{.277em}"),en("\\enspace","\\kern.5em "),en("\\enskip","\\hskip.5em\\relax"),en("\\quad","\\hskip1em\\relax"),en("\\qquad","\\hskip2em\\relax"),en("\\tag","\\@ifstar\\tag@literal\\tag@paren"),en("\\tag@paren","\\tag@literal{({#1})}"),en("\\tag@literal",(e=>{if(e.macros.get("\\df@tag"))throw new ve("Multiple \\tag");return"\\gdef\\df@tag{\\text{#1}}"})),en("\\bmod","\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}"),en("\\pod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)"),en("\\pmod","\\pod{{\\rm mod}\\mkern6mu#1}"),en("\\mod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1"),en("\\newline","\\\\\\relax"),en("\\TeX","\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}");var ts=tt(je["Main-Regular"]["T".charCodeAt(0)][1]-.7*je["Main-Regular"]["A".charCodeAt(0)][1]);en("\\LaTeX","\\textrm{\\html@mathml{L\\kern-.36em\\raisebox{"+ts+"}{\\scriptstyle A}\\kern-.15em\\TeX}{LaTeX}}"),en("\\KaTeX","\\textrm{\\html@mathml{K\\kern-.17em\\raisebox{"+ts+"}{\\scriptstyle A}\\kern-.15em\\TeX}{KaTeX}}"),en("\\hspace","\\@ifstar\\@hspacer\\@hspace"),en("\\@hspace","\\hskip #1\\relax"),en("\\@hspacer","\\rule{0pt}{0pt}\\hskip #1\\relax"),en("\\ordinarycolon",":"),en("\\vcentcolon","\\mathrel{\\mathop\\ordinarycolon}"),en("\\dblcolon",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}'),en("\\coloneqq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}'),en("\\Coloneqq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}'),en("\\coloneq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}'),en("\\Coloneq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}'),en("\\eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}'),en("\\Eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}'),en("\\eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}'),en("\\Eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}'),en("\\colonapprox",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}'),en("\\Colonapprox",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}'),en("\\colonsim",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}'),en("\\Colonsim",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}'),en("∷","\\dblcolon"),en("∹","\\eqcolon"),en("≔","\\coloneqq"),en("≕","\\eqqcolon"),en("⩴","\\Coloneqq"),en("\\ratio","\\vcentcolon"),en("\\coloncolon","\\dblcolon"),en("\\colonequals","\\coloneqq"),en("\\coloncolonequals","\\Coloneqq"),en("\\equalscolon","\\eqqcolon"),en("\\equalscoloncolon","\\Eqqcolon"),en("\\colonminus","\\coloneq"),en("\\coloncolonminus","\\Coloneq"),en("\\minuscolon","\\eqcolon"),en("\\minuscoloncolon","\\Eqcolon"),en("\\coloncolonapprox","\\Colonapprox"),en("\\coloncolonsim","\\Colonsim"),en("\\simcolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}"),en("\\simcoloncolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}"),en("\\approxcolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}"),en("\\approxcoloncolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}"),en("\\notni","\\html@mathml{\\not\\ni}{\\mathrel{\\char`∌}}"),en("\\limsup","\\DOTSB\\operatorname*{lim\\,sup}"),en("\\liminf","\\DOTSB\\operatorname*{lim\\,inf}"),en("\\injlim","\\DOTSB\\operatorname*{inj\\,lim}"),en("\\projlim","\\DOTSB\\operatorname*{proj\\,lim}"),en("\\varlimsup","\\DOTSB\\operatorname*{\\overline{lim}}"),en("\\varliminf","\\DOTSB\\operatorname*{\\underline{lim}}"),en("\\varinjlim","\\DOTSB\\operatorname*{\\underrightarrow{lim}}"),en("\\varprojlim","\\DOTSB\\operatorname*{\\underleftarrow{lim}}"),en("\\gvertneqq","\\html@mathml{\\@gvertneqq}{≩}"),en("\\lvertneqq","\\html@mathml{\\@lvertneqq}{≨}"),en("\\ngeqq","\\html@mathml{\\@ngeqq}{≱}"),en("\\ngeqslant","\\html@mathml{\\@ngeqslant}{≱}"),en("\\nleqq","\\html@mathml{\\@nleqq}{≰}"),en("\\nleqslant","\\html@mathml{\\@nleqslant}{≰}"),en("\\nshortmid","\\html@mathml{\\@nshortmid}{∤}"),en("\\nshortparallel","\\html@mathml{\\@nshortparallel}{∦}"),en("\\nsubseteqq","\\html@mathml{\\@nsubseteqq}{⊈}"),en("\\nsupseteqq","\\html@mathml{\\@nsupseteqq}{⊉}"),en("\\varsubsetneq","\\html@mathml{\\@varsubsetneq}{⊊}"),en("\\varsubsetneqq","\\html@mathml{\\@varsubsetneqq}{⫋}"),en("\\varsupsetneq","\\html@mathml{\\@varsupsetneq}{⊋}"),en("\\varsupsetneqq","\\html@mathml{\\@varsupsetneqq}{⫌}"),en("\\imath","\\html@mathml{\\@imath}{ı}"),en("\\jmath","\\html@mathml{\\@jmath}{ȷ}"),en("\\llbracket","\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`⟦}}"),en("\\rrbracket","\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`⟧}}"),en("⟦","\\llbracket"),en("⟧","\\rrbracket"),en("\\lBrace","\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`⦃}}"),en("\\rBrace","\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`⦄}}"),en("⦃","\\lBrace"),en("⦄","\\rBrace"),en("\\minuso","\\mathbin{\\html@mathml{{\\mathrlap{\\mathchoice{\\kern{0.145em}}{\\kern{0.145em}}{\\kern{0.1015em}}{\\kern{0.0725em}}\\circ}{-}}}{\\char`⦵}}"),en("⦵","\\minuso"),en("\\darr","\\downarrow"),en("\\dArr","\\Downarrow"),en("\\Darr","\\Downarrow"),en("\\lang","\\langle"),en("\\rang","\\rangle"),en("\\uarr","\\uparrow"),en("\\uArr","\\Uparrow"),en("\\Uarr","\\Uparrow"),en("\\N","\\mathbb{N}"),en("\\R","\\mathbb{R}"),en("\\Z","\\mathbb{Z}"),en("\\alef","\\aleph"),en("\\alefsym","\\aleph"),en("\\Alpha","\\mathrm{A}"),en("\\Beta","\\mathrm{B}"),en("\\bull","\\bullet"),en("\\Chi","\\mathrm{X}"),en("\\clubs","\\clubsuit"),en("\\cnums","\\mathbb{C}"),en("\\Complex","\\mathbb{C}"),en("\\Dagger","\\ddagger"),en("\\diamonds","\\diamondsuit"),en("\\empty","\\emptyset"),en("\\Epsilon","\\mathrm{E}"),en("\\Eta","\\mathrm{H}"),en("\\exist","\\exists"),en("\\harr","\\leftrightarrow"),en("\\hArr","\\Leftrightarrow"),en("\\Harr","\\Leftrightarrow"),en("\\hearts","\\heartsuit"),en("\\image","\\Im"),en("\\infin","\\infty"),en("\\Iota","\\mathrm{I}"),en("\\isin","\\in"),en("\\Kappa","\\mathrm{K}"),en("\\larr","\\leftarrow"),en("\\lArr","\\Leftarrow"),en("\\Larr","\\Leftarrow"),en("\\lrarr","\\leftrightarrow"),en("\\lrArr","\\Leftrightarrow"),en("\\Lrarr","\\Leftrightarrow"),en("\\Mu","\\mathrm{M}"),en("\\natnums","\\mathbb{N}"),en("\\Nu","\\mathrm{N}"),en("\\Omicron","\\mathrm{O}"),en("\\plusmn","\\pm"),en("\\rarr","\\rightarrow"),en("\\rArr","\\Rightarrow"),en("\\Rarr","\\Rightarrow"),en("\\real","\\Re"),en("\\reals","\\mathbb{R}"),en("\\Reals","\\mathbb{R}"),en("\\Rho","\\mathrm{P}"),en("\\sdot","\\cdot"),en("\\sect","\\S"),en("\\spades","\\spadesuit"),en("\\sub","\\subset"),en("\\sube","\\subseteq"),en("\\supe","\\supseteq"),en("\\Tau","\\mathrm{T}"),en("\\thetasym","\\vartheta"),en("\\weierp","\\wp"),en("\\Zeta","\\mathrm{Z}"),en("\\argmin","\\DOTSB\\operatorname*{arg\\,min}"),en("\\argmax","\\DOTSB\\operatorname*{arg\\,max}"),en("\\plim","\\DOTSB\\mathop{\\operatorname{plim}}\\limits"),en("\\bra","\\mathinner{\\langle{#1}|}"),en("\\ket","\\mathinner{|{#1}\\rangle}"),en("\\braket","\\mathinner{\\langle{#1}\\rangle}"),en("\\Bra","\\left\\langle#1\\right|"),en("\\Ket","\\left|#1\\right\\rangle");var is=e=>t=>{var i=t.consumeArg().tokens,r=t.consumeArg().tokens,n=t.consumeArg().tokens,s=t.consumeArg().tokens,a=t.macros.get("|"),o=t.macros.get("\\|");t.macros.beginGroup();var l=t=>i=>{e&&(i.macros.set("|",a),n.length&&i.macros.set("\\|",o));var s=t;!t&&n.length&&("|"===i.future().text&&(i.popToken(),s=!0));return{tokens:s?n:r,numArgs:0}};t.macros.set("|",l(!1)),n.length&&t.macros.set("\\|",l(!0));var h=t.consumeArg().tokens,c=t.expandTokens([...s,...h,...i]);return t.macros.endGroup(),{tokens:c.reverse(),numArgs:0}};en("\\bra@ket",is(!1)),en("\\bra@set",is(!0)),en("\\Braket","\\bra@ket{\\left\\langle}{\\,\\middle\\vert\\,}{\\,\\middle\\vert\\,}{\\right\\rangle}"),en("\\Set","\\bra@set{\\left\\{\\:}{\\;\\middle\\vert\\;}{\\;\\middle\\Vert\\;}{\\:\\right\\}}"),en("\\set","\\bra@set{\\{\\,}{\\mid}{}{\\,\\}}"),en("\\angln","{\\angl n}"),en("\\blue","\\textcolor{##6495ed}{#1}"),en("\\orange","\\textcolor{##ffa500}{#1}"),en("\\pink","\\textcolor{##ff00af}{#1}"),en("\\red","\\textcolor{##df0030}{#1}"),en("\\green","\\textcolor{##28ae7b}{#1}"),en("\\gray","\\textcolor{gray}{#1}"),en("\\purple","\\textcolor{##9d38bd}{#1}"),en("\\blueA","\\textcolor{##ccfaff}{#1}"),en("\\blueB","\\textcolor{##80f6ff}{#1}"),en("\\blueC","\\textcolor{##63d9ea}{#1}"),en("\\blueD","\\textcolor{##11accd}{#1}"),en("\\blueE","\\textcolor{##0c7f99}{#1}"),en("\\tealA","\\textcolor{##94fff5}{#1}"),en("\\tealB","\\textcolor{##26edd5}{#1}"),en("\\tealC","\\textcolor{##01d1c1}{#1}"),en("\\tealD","\\textcolor{##01a995}{#1}"),en("\\tealE","\\textcolor{##208170}{#1}"),en("\\greenA","\\textcolor{##b6ffb0}{#1}"),en("\\greenB","\\textcolor{##8af281}{#1}"),en("\\greenC","\\textcolor{##74cf70}{#1}"),en("\\greenD","\\textcolor{##1fab54}{#1}"),en("\\greenE","\\textcolor{##0d923f}{#1}"),en("\\goldA","\\textcolor{##ffd0a9}{#1}"),en("\\goldB","\\textcolor{##ffbb71}{#1}"),en("\\goldC","\\textcolor{##ff9c39}{#1}"),en("\\goldD","\\textcolor{##e07d10}{#1}"),en("\\goldE","\\textcolor{##a75a05}{#1}"),en("\\redA","\\textcolor{##fca9a9}{#1}"),en("\\redB","\\textcolor{##ff8482}{#1}"),en("\\redC","\\textcolor{##f9685d}{#1}"),en("\\redD","\\textcolor{##e84d39}{#1}"),en("\\redE","\\textcolor{##bc2612}{#1}"),en("\\maroonA","\\textcolor{##ffbde0}{#1}"),en("\\maroonB","\\textcolor{##ff92c6}{#1}"),en("\\maroonC","\\textcolor{##ed5fa6}{#1}"),en("\\maroonD","\\textcolor{##ca337c}{#1}"),en("\\maroonE","\\textcolor{##9e034e}{#1}"),en("\\purpleA","\\textcolor{##ddd7ff}{#1}"),en("\\purpleB","\\textcolor{##c6b9fc}{#1}"),en("\\purpleC","\\textcolor{##aa87ff}{#1}"),en("\\purpleD","\\textcolor{##7854ab}{#1}"),en("\\purpleE","\\textcolor{##543b78}{#1}"),en("\\mintA","\\textcolor{##f5f9e8}{#1}"),en("\\mintB","\\textcolor{##edf2df}{#1}"),en("\\mintC","\\textcolor{##e0e5cc}{#1}"),en("\\grayA","\\textcolor{##f6f7f7}{#1}"),en("\\grayB","\\textcolor{##f0f1f2}{#1}"),en("\\grayC","\\textcolor{##e3e5e6}{#1}"),en("\\grayD","\\textcolor{##d6d8da}{#1}"),en("\\grayE","\\textcolor{##babec2}{#1}"),en("\\grayF","\\textcolor{##888d93}{#1}"),en("\\grayG","\\textcolor{##626569}{#1}"),en("\\grayH","\\textcolor{##3b3e40}{#1}"),en("\\grayI","\\textcolor{##21242c}{#1}"),en("\\kaBlue","\\textcolor{##314453}{#1}"),en("\\kaGreen","\\textcolor{##71B307}{#1}");var rs={"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0};class ns{constructor(e,t,i){this.settings=void 0,this.expansionCount=void 0,this.lexer=void 0,this.macros=void 0,this.stack=void 0,this.mode=void 0,this.settings=t,this.expansionCount=0,this.feed(e),this.macros=new Yn(Kn,t.macros),this.mode=i,this.stack=[]}feed(e){this.lexer=new Xn(e,this.settings)}switchMode(e){this.mode=e}beginGroup(){this.macros.beginGroup()}endGroup(){this.macros.endGroup()}endGroups(){this.macros.endGroups()}future(){return 0===this.stack.length&&this.pushToken(this.lexer.lex()),this.stack[this.stack.length-1]}popToken(){return this.future(),this.stack.pop()}pushToken(e){this.stack.push(e)}pushTokens(e){this.stack.push(...e)}scanArgument(e){var t,i,r;if(e){if(this.consumeSpaces(),"["!==this.future().text)return null;t=this.popToken(),({tokens:r,end:i}=this.consumeArg(["]"]))}else({tokens:r,start:t,end:i}=this.consumeArg());return this.pushToken(new be("EOF",i.loc)),this.pushTokens(r),t.range(i,"")}consumeSpaces(){for(;;){if(" "!==this.future().text)break;this.stack.pop()}}consumeArg(e){var t=[],i=e&&e.length>0;i||this.consumeSpaces();var r,n=this.future(),s=0,a=0;do{if(r=this.popToken(),t.push(r),"{"===r.text)++s;else if("}"===r.text){if(-1===--s)throw new ve("Extra }",r)}else if("EOF"===r.text)throw new ve("Unexpected end of input in a macro argument, expected '"+(e&&i?e[a]:"}")+"'",r);if(e&&i)if((0===s||1===s&&"{"===e[a])&&r.text===e[a]){if(++a===e.length){t.splice(-a,a);break}}else a=0}while(0!==s||i);return"{"===n.text&&"}"===t[t.length-1].text&&(t.pop(),t.shift()),t.reverse(),{tokens:t,start:n,end:r}}consumeArgs(e,t){if(t){if(t.length!==e+1)throw new ve("The length of delimiters doesn't match the number of args!");for(var i=t[0],r=0;r<i.length;r++){var n=this.popToken();if(i[r]!==n.text)throw new ve("Use of the macro doesn't match its definition",n)}}for(var s=[],a=0;a<e;a++)s.push(this.consumeArg(t&&t[a+1]).tokens);return s}countExpansion(e){if(this.expansionCount+=e,this.expansionCount>this.settings.maxExpand)throw new ve("Too many expansions: infinite loop or need to increase maxExpand setting")}expandOnce(e){var t=this.popToken(),i=t.text,r=t.noexpand?null:this._getExpansion(i);if(null==r||e&&r.unexpandable){if(e&&null==r&&"\\"===i[0]&&!this.isDefined(i))throw new ve("Undefined control sequence: "+i);return this.pushToken(t),!1}this.countExpansion(1);var n=r.tokens,s=this.consumeArgs(r.numArgs,r.delimiters);if(r.numArgs)for(var a=(n=n.slice()).length-1;a>=0;--a){var o=n[a];if("#"===o.text){if(0===a)throw new ve("Incomplete placeholder at end of macro body",o);if("#"===(o=n[--a]).text)n.splice(a+1,1);else{if(!/^[1-9]$/.test(o.text))throw new ve("Not a valid argument number",o);n.splice(a,2,...s[+o.text-1])}}}return this.pushTokens(n),n.length}expandAfterFuture(){return this.expandOnce(),this.future()}expandNextToken(){for(;;)if(!1===this.expandOnce()){var e=this.stack.pop();return e.treatAsRelax&&(e.text="\\relax"),e}throw new Error}expandMacro(e){return this.macros.has(e)?this.expandTokens([new be(e)]):void 0}expandTokens(e){var t=[],i=this.stack.length;for(this.pushTokens(e);this.stack.length>i;)if(!1===this.expandOnce(!0)){var r=this.stack.pop();r.treatAsRelax&&(r.noexpand=!1,r.treatAsRelax=!1),t.push(r)}return this.countExpansion(t.length),t}expandMacroAsText(e){var t=this.expandMacro(e);return t?t.map((e=>e.text)).join(""):t}_getExpansion(e){var t=this.macros.get(e);if(null==t)return t;if(1===e.length){var i=this.lexer.catcodes[e];if(null!=i&&13!==i)return}var r="function"==typeof t?t(this):t;if("string"==typeof r){var n=0;if(-1!==r.indexOf("#"))for(var s=r.replace(/##/g,"");-1!==s.indexOf("#"+(n+1));)++n;for(var a=new Xn(r,this.settings),o=[],l=a.lex();"EOF"!==l.text;)o.push(l),l=a.lex();return o.reverse(),{tokens:o,numArgs:n}}return r}isDefined(e){return this.macros.has(e)||jn.hasOwnProperty(e)||vt.math.hasOwnProperty(e)||vt.text.hasOwnProperty(e)||rs.hasOwnProperty(e)}isExpandable(e){var t=this.macros.get(e);return null!=t?"string"==typeof t||"function"==typeof t||!t.unexpandable:jn.hasOwnProperty(e)&&!jn[e].primitive}}var ss=/^[₊₋₌₍₎₀₁₂₃₄₅₆₇₈₉ₐₑₕᵢⱼₖₗₘₙₒₚᵣₛₜᵤᵥₓᵦᵧᵨᵩᵪ]/,as=Object.freeze({"₊":"+","₋":"-","₌":"=","₍":"(","₎":")","₀":"0","₁":"1","₂":"2","₃":"3","₄":"4","₅":"5","₆":"6","₇":"7","₈":"8","₉":"9","ₐ":"a","ₑ":"e","ₕ":"h","ᵢ":"i","ⱼ":"j","ₖ":"k","ₗ":"l","ₘ":"m","ₙ":"n","ₒ":"o","ₚ":"p","ᵣ":"r","ₛ":"s","ₜ":"t","ᵤ":"u","ᵥ":"v","ₓ":"x","ᵦ":"β","ᵧ":"γ","ᵨ":"ρ","ᵩ":"ϕ","ᵪ":"χ","⁺":"+","⁻":"-","⁼":"=","⁽":"(","⁾":")","⁰":"0","¹":"1","²":"2","³":"3","⁴":"4","⁵":"5","⁶":"6","⁷":"7","⁸":"8","⁹":"9","ᴬ":"A","ᴮ":"B","ᴰ":"D","ᴱ":"E","ᴳ":"G","ᴴ":"H","ᴵ":"I","ᴶ":"J","ᴷ":"K","ᴸ":"L","ᴹ":"M","ᴺ":"N","ᴼ":"O","ᴾ":"P","ᴿ":"R","ᵀ":"T","ᵁ":"U","ⱽ":"V","ᵂ":"W","ᵃ":"a","ᵇ":"b","ᶜ":"c","ᵈ":"d","ᵉ":"e","ᶠ":"f","ᵍ":"g","ʰ":"h","ⁱ":"i","ʲ":"j","ᵏ":"k","ˡ":"l","ᵐ":"m","ⁿ":"n","ᵒ":"o","ᵖ":"p","ʳ":"r","ˢ":"s","ᵗ":"t","ᵘ":"u","ᵛ":"v","ʷ":"w","ˣ":"x","ʸ":"y","ᶻ":"z","ᵝ":"β","ᵞ":"γ","ᵟ":"δ","ᵠ":"ϕ","ᵡ":"χ","ᶿ":"θ"}),os={"́":{text:"\\'",math:"\\acute"},"̀":{text:"\\`",math:"\\grave"},"̈":{text:'\\"',math:"\\ddot"},"̃":{text:"\\~",math:"\\tilde"},"̄":{text:"\\=",math:"\\bar"},"̆":{text:"\\u",math:"\\breve"},"̌":{text:"\\v",math:"\\check"},"̂":{text:"\\^",math:"\\hat"},"̇":{text:"\\.",math:"\\dot"},"̊":{text:"\\r",math:"\\mathring"},"̋":{text:"\\H"},"̧":{text:"\\c"}},ls={"á":"á","à":"à","ä":"ä","ǟ":"ǟ","ã":"ã","ā":"ā","ă":"ă","ắ":"ắ","ằ":"ằ","ẵ":"ẵ","ǎ":"ǎ","â":"â","ấ":"ấ","ầ":"ầ","ẫ":"ẫ","ȧ":"ȧ","ǡ":"ǡ","å":"å","ǻ":"ǻ","ḃ":"ḃ","ć":"ć","ḉ":"ḉ","č":"č","ĉ":"ĉ","ċ":"ċ","ç":"ç","ď":"ď","ḋ":"ḋ","ḑ":"ḑ","é":"é","è":"è","ë":"ë","ẽ":"ẽ","ē":"ē","ḗ":"ḗ","ḕ":"ḕ","ĕ":"ĕ","ḝ":"ḝ","ě":"ě","ê":"ê","ế":"ế","ề":"ề","ễ":"ễ","ė":"ė","ȩ":"ȩ","ḟ":"ḟ","ǵ":"ǵ","ḡ":"ḡ","ğ":"ğ","ǧ":"ǧ","ĝ":"ĝ","ġ":"ġ","ģ":"ģ","ḧ":"ḧ","ȟ":"ȟ","ĥ":"ĥ","ḣ":"ḣ","ḩ":"ḩ","í":"í","ì":"ì","ï":"ï","ḯ":"ḯ","ĩ":"ĩ","ī":"ī","ĭ":"ĭ","ǐ":"ǐ","î":"î","ǰ":"ǰ","ĵ":"ĵ","ḱ":"ḱ","ǩ":"ǩ","ķ":"ķ","ĺ":"ĺ","ľ":"ľ","ļ":"ļ","ḿ":"ḿ","ṁ":"ṁ","ń":"ń","ǹ":"ǹ","ñ":"ñ","ň":"ň","ṅ":"ṅ","ņ":"ņ","ó":"ó","ò":"ò","ö":"ö","ȫ":"ȫ","õ":"õ","ṍ":"ṍ","ṏ":"ṏ","ȭ":"ȭ","ō":"ō","ṓ":"ṓ","ṑ":"ṑ","ŏ":"ŏ","ǒ":"ǒ","ô":"ô","ố":"ố","ồ":"ồ","ỗ":"ỗ","ȯ":"ȯ","ȱ":"ȱ","ő":"ő","ṕ":"ṕ","ṗ":"ṗ","ŕ":"ŕ","ř":"ř","ṙ":"ṙ","ŗ":"ŗ","ś":"ś","ṥ":"ṥ","š":"š","ṧ":"ṧ","ŝ":"ŝ","ṡ":"ṡ","ş":"ş","ẗ":"ẗ","ť":"ť","ṫ":"ṫ","ţ":"ţ","ú":"ú","ù":"ù","ü":"ü","ǘ":"ǘ","ǜ":"ǜ","ǖ":"ǖ","ǚ":"ǚ","ũ":"ũ","ṹ":"ṹ","ū":"ū","ṻ":"ṻ","ŭ":"ŭ","ǔ":"ǔ","û":"û","ů":"ů","ű":"ű","ṽ":"ṽ","ẃ":"ẃ","ẁ":"ẁ","ẅ":"ẅ","ŵ":"ŵ","ẇ":"ẇ","ẘ":"ẘ","ẍ":"ẍ","ẋ":"ẋ","ý":"ý","ỳ":"ỳ","ÿ":"ÿ","ỹ":"ỹ","ȳ":"ȳ","ŷ":"ŷ","ẏ":"ẏ","ẙ":"ẙ","ź":"ź","ž":"ž","ẑ":"ẑ","ż":"ż","Á":"Á","À":"À","Ä":"Ä","Ǟ":"Ǟ","Ã":"Ã","Ā":"Ā","Ă":"Ă","Ắ":"Ắ","Ằ":"Ằ","Ẵ":"Ẵ","Ǎ":"Ǎ","Â":"Â","Ấ":"Ấ","Ầ":"Ầ","Ẫ":"Ẫ","Ȧ":"Ȧ","Ǡ":"Ǡ","Å":"Å","Ǻ":"Ǻ","Ḃ":"Ḃ","Ć":"Ć","Ḉ":"Ḉ","Č":"Č","Ĉ":"Ĉ","Ċ":"Ċ","Ç":"Ç","Ď":"Ď","Ḋ":"Ḋ","Ḑ":"Ḑ","É":"É","È":"È","Ë":"Ë","Ẽ":"Ẽ","Ē":"Ē","Ḗ":"Ḗ","Ḕ":"Ḕ","Ĕ":"Ĕ","Ḝ":"Ḝ","Ě":"Ě","Ê":"Ê","Ế":"Ế","Ề":"Ề","Ễ":"Ễ","Ė":"Ė","Ȩ":"Ȩ","Ḟ":"Ḟ","Ǵ":"Ǵ","Ḡ":"Ḡ","Ğ":"Ğ","Ǧ":"Ǧ","Ĝ":"Ĝ","Ġ":"Ġ","Ģ":"Ģ","Ḧ":"Ḧ","Ȟ":"Ȟ","Ĥ":"Ĥ","Ḣ":"Ḣ","Ḩ":"Ḩ","Í":"Í","Ì":"Ì","Ï":"Ï","Ḯ":"Ḯ","Ĩ":"Ĩ","Ī":"Ī","Ĭ":"Ĭ","Ǐ":"Ǐ","Î":"Î","İ":"İ","Ĵ":"Ĵ","Ḱ":"Ḱ","Ǩ":"Ǩ","Ķ":"Ķ","Ĺ":"Ĺ","Ľ":"Ľ","Ļ":"Ļ","Ḿ":"Ḿ","Ṁ":"Ṁ","Ń":"Ń","Ǹ":"Ǹ","Ñ":"Ñ","Ň":"Ň","Ṅ":"Ṅ","Ņ":"Ņ","Ó":"Ó","Ò":"Ò","Ö":"Ö","Ȫ":"Ȫ","Õ":"Õ","Ṍ":"Ṍ","Ṏ":"Ṏ","Ȭ":"Ȭ","Ō":"Ō","Ṓ":"Ṓ","Ṑ":"Ṑ","Ŏ":"Ŏ","Ǒ":"Ǒ","Ô":"Ô","Ố":"Ố","Ồ":"Ồ","Ỗ":"Ỗ","Ȯ":"Ȯ","Ȱ":"Ȱ","Ő":"Ő","Ṕ":"Ṕ","Ṗ":"Ṗ","Ŕ":"Ŕ","Ř":"Ř","Ṙ":"Ṙ","Ŗ":"Ŗ","Ś":"Ś","Ṥ":"Ṥ","Š":"Š","Ṧ":"Ṧ","Ŝ":"Ŝ","Ṡ":"Ṡ","Ş":"Ş","Ť":"Ť","Ṫ":"Ṫ","Ţ":"Ţ","Ú":"Ú","Ù":"Ù","Ü":"Ü","Ǘ":"Ǘ","Ǜ":"Ǜ","Ǖ":"Ǖ","Ǚ":"Ǚ","Ũ":"Ũ","Ṹ":"Ṹ","Ū":"Ū","Ṻ":"Ṻ","Ŭ":"Ŭ","Ǔ":"Ǔ","Û":"Û","Ů":"Ů","Ű":"Ű","Ṽ":"Ṽ","Ẃ":"Ẃ","Ẁ":"Ẁ","Ẅ":"Ẅ","Ŵ":"Ŵ","Ẇ":"Ẇ","Ẍ":"Ẍ","Ẋ":"Ẋ","Ý":"Ý","Ỳ":"Ỳ","Ÿ":"Ÿ","Ỹ":"Ỹ","Ȳ":"Ȳ","Ŷ":"Ŷ","Ẏ":"Ẏ","Ź":"Ź","Ž":"Ž","Ẑ":"Ẑ","Ż":"Ż","ά":"ά","ὰ":"ὰ","ᾱ":"ᾱ","ᾰ":"ᾰ","έ":"έ","ὲ":"ὲ","ή":"ή","ὴ":"ὴ","ί":"ί","ὶ":"ὶ","ϊ":"ϊ","ΐ":"ΐ","ῒ":"ῒ","ῑ":"ῑ","ῐ":"ῐ","ό":"ό","ὸ":"ὸ","ύ":"ύ","ὺ":"ὺ","ϋ":"ϋ","ΰ":"ΰ","ῢ":"ῢ","ῡ":"ῡ","ῠ":"ῠ","ώ":"ώ","ὼ":"ὼ","Ύ":"Ύ","Ὺ":"Ὺ","Ϋ":"Ϋ","Ῡ":"Ῡ","Ῠ":"Ῠ","Ώ":"Ώ","Ὼ":"Ὼ"};class hs{constructor(e,t){this.mode=void 0,this.gullet=void 0,this.settings=void 0,this.leftrightDepth=void 0,this.nextToken=void 0,this.mode="math",this.gullet=new ns(e,t,this.mode),this.settings=t,this.leftrightDepth=0}expect(e,t){if(void 0===t&&(t=!0),this.fetch().text!==e)throw new ve("Expected '"+e+"', got '"+this.fetch().text+"'",this.fetch());t&&this.consume()}consume(){this.nextToken=null}fetch(){return null==this.nextToken&&(this.nextToken=this.gullet.expandNextToken()),this.nextToken}switchMode(e){this.mode=e,this.gullet.switchMode(e)}parse(){this.settings.globalGroup||this.gullet.beginGroup(),this.settings.colorIsTextColor&&this.gullet.macros.set("\\color","\\textcolor");try{var e=this.parseExpression(!1);return this.expect("EOF"),this.settings.globalGroup||this.gullet.endGroup(),e}finally{this.gullet.endGroups()}}subparse(e){var t=this.nextToken;this.consume(),this.gullet.pushToken(new be("}")),this.gullet.pushTokens(e);var i=this.parseExpression(!1);return this.expect("}"),this.nextToken=t,i}parseExpression(e,t){for(var i=[];;){"math"===this.mode&&this.consumeSpaces();var r=this.fetch();if(-1!==hs.endOfExpression.indexOf(r.text))break;if(t&&r.text===t)break;if(e&&jn[r.text]&&jn[r.text].infix)break;var n=this.parseAtom(t);if(!n)break;"internal"!==n.type&&i.push(n)}return"text"===this.mode&&this.formLigatures(i),this.handleInfixNodes(i)}handleInfixNodes(e){for(var t,i=-1,r=0;r<e.length;r++)if("infix"===e[r].type){if(-1!==i)throw new ve("only one infix operator per group",e[r].token);i=r,t=e[r].replaceWith}if(-1!==i&&t){var n,s,a=e.slice(0,i),o=e.slice(i+1);return n=1===a.length&&"ordgroup"===a[0].type?a[0]:{type:"ordgroup",mode:this.mode,body:a},s=1===o.length&&"ordgroup"===o[0].type?o[0]:{type:"ordgroup",mode:this.mode,body:o},["\\\\abovefrac"===t?this.callFunction(t,[n,e[i],s],[]):this.callFunction(t,[n,s],[])]}return e}handleSupSubscript(e){var t,i=this.fetch(),r=i.text;this.consume(),this.consumeSpaces();do{var n;t=this.parseGroup(e)}while("internal"===(null==(n=t)?void 0:n.type));if(!t)throw new ve("Expected group after '"+r+"'",i);return t}formatUnsupportedCmd(e){for(var t=[],i=0;i<e.length;i++)t.push({type:"textord",mode:"text",text:e[i]});var r={type:"text",mode:this.mode,body:t};return{type:"color",mode:this.mode,color:this.settings.errorColor,body:[r]}}parseAtom(e){var t,i,r=this.parseGroup("atom",e);if("internal"===(null==r?void 0:r.type))return r;if("text"===this.mode)return r;for(;;){this.consumeSpaces();var n=this.fetch();if("\\limits"===n.text||"\\nolimits"===n.text){if(r&&"op"===r.type){var s="\\limits"===n.text;r.limits=s,r.alwaysHandleSupSub=!0}else{if(!r||"operatorname"!==r.type)throw new ve("Limit controls must follow a math operator",n);r.alwaysHandleSupSub&&(r.limits="\\limits"===n.text)}this.consume()}else if("^"===n.text){if(t)throw new ve("Double superscript",n);t=this.handleSupSubscript("superscript")}else if("_"===n.text){if(i)throw new ve("Double subscript",n);i=this.handleSupSubscript("subscript")}else if("'"===n.text){if(t)throw new ve("Double superscript",n);var a={type:"textord",mode:this.mode,text:"\\prime"},o=[a];for(this.consume();"'"===this.fetch().text;)o.push(a),this.consume();"^"===this.fetch().text&&o.push(this.handleSupSubscript("superscript")),t={type:"ordgroup",mode:this.mode,body:o}}else{if(!as[n.text])break;var l=ss.test(n.text),h=[];for(h.push(new be(as[n.text])),this.consume();;){var c=this.fetch().text;if(!as[c])break;if(ss.test(c)!==l)break;h.unshift(new be(as[c])),this.consume()}var d=this.subparse(h);l?i={type:"ordgroup",mode:"math",body:d}:t={type:"ordgroup",mode:"math",body:d}}}return t||i?{type:"supsub",mode:this.mode,base:r,sup:t,sub:i}:r}parseFunction(e,t){var i=this.fetch(),r=i.text,n=jn[r];if(!n)return null;if(this.consume(),t&&"atom"!==t&&!n.allowedInArgument)throw new ve("Got function '"+r+"' with no arguments"+(t?" as "+t:""),i);if("text"===this.mode&&!n.allowedInText)throw new ve("Can't use function '"+r+"' in text mode",i);if("math"===this.mode&&!1===n.allowedInMath)throw new ve("Can't use function '"+r+"' in math mode",i);var{args:s,optArgs:a}=this.parseArguments(r,n);return this.callFunction(r,s,a,i,e)}callFunction(e,t,i,r,n){var s={funcName:e,parser:this,token:r,breakOnTokenText:n},a=jn[e];if(a&&a.handler)return a.handler(s,t,i);throw new ve("No function handler for "+e)}parseArguments(e,t){var i=t.numArgs+t.numOptionalArgs;if(0===i)return{args:[],optArgs:[]};for(var r=[],n=[],s=0;s<i;s++){var a=t.argTypes&&t.argTypes[s],o=s<t.numOptionalArgs;(t.primitive&&null==a||"sqrt"===t.type&&1===s&&null==n[0])&&(a="primitive");var l=this.parseGroupOfType("argument to '"+e+"'",a,o);if(o)n.push(l);else{if(null==l)throw new ve("Null argument, please report this as a bug");r.push(l)}}return{args:r,optArgs:n}}parseGroupOfType(e,t,i){switch(t){case"color":return this.parseColorGroup(i);case"size":return this.parseSizeGroup(i);case"url":return this.parseUrlGroup(i);case"math":case"text":return this.parseArgumentGroup(i,t);case"hbox":var r=this.parseArgumentGroup(i,"text");return null!=r?{type:"styling",mode:r.mode,body:[r],style:"text"}:null;case"raw":var n=this.parseStringGroup("raw",i);return null!=n?{type:"raw",mode:"text",string:n.text}:null;case"primitive":if(i)throw new ve("A primitive argument cannot be optional");var s=this.parseGroup(e);if(null==s)throw new ve("Expected group as "+e,this.fetch());return s;case"original":case null:case void 0:return this.parseArgumentGroup(i);default:throw new ve("Unknown group type as "+e,this.fetch())}}consumeSpaces(){for(;" "===this.fetch().text;)this.consume()}parseStringGroup(e,t){var i=this.gullet.scanArgument(t);if(null==i)return null;for(var r,n="";"EOF"!==(r=this.fetch()).text;)n+=r.text,this.consume();return this.consume(),i.text=n,i}parseRegexGroup(e,t){for(var i,r=this.fetch(),n=r,s="";"EOF"!==(i=this.fetch()).text&&e.test(s+i.text);)s+=(n=i).text,this.consume();if(""===s)throw new ve("Invalid "+t+": '"+r.text+"'",r);return r.range(n,s)}parseColorGroup(e){var t=this.parseStringGroup("color",e);if(null==t)return null;var i=/^(#[a-f0-9]{3}|#?[a-f0-9]{6}|[a-z]+)$/i.exec(t.text);if(!i)throw new ve("Invalid color: '"+t.text+"'",t);var r=i[0];return/^[0-9a-f]{6}$/i.test(r)&&(r="#"+r),{type:"color-token",mode:this.mode,color:r}}parseSizeGroup(e){var t,i=!1;if(this.gullet.consumeSpaces(),!(t=e||"{"===this.gullet.future().text?this.parseStringGroup("size",e):this.parseRegexGroup(/^[-+]? *(?:$|\d+|\d+\.\d*|\.\d*) *[a-z]{0,2} *$/,"size")))return null;e||0!==t.text.length||(t.text="0pt",i=!0);var r=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(t.text);if(!r)throw new ve("Invalid size: '"+t.text+"'",t);var n={number:+(r[1]+r[2]),unit:r[3]};if(!Qe(n))throw new ve("Invalid unit: '"+n.unit+"'",t);return{type:"size",mode:this.mode,value:n,isBlank:i}}parseUrlGroup(e){this.gullet.lexer.setCatcode("%",13),this.gullet.lexer.setCatcode("~",12);var t=this.parseStringGroup("url",e);if(this.gullet.lexer.setCatcode("%",14),this.gullet.lexer.setCatcode("~",13),null==t)return null;var i=t.text.replace(/\\([#$%&~_^{}])/g,"$1");return{type:"url",mode:this.mode,url:i}}parseArgumentGroup(e,t){var i=this.gullet.scanArgument(e);if(null==i)return null;var r=this.mode;t&&this.switchMode(t),this.gullet.beginGroup();var n=this.parseExpression(!1,"EOF");this.expect("EOF"),this.gullet.endGroup();var s={type:"ordgroup",mode:this.mode,loc:i.loc,body:n};return t&&this.switchMode(r),s}parseGroup(e,t){var i,r=this.fetch(),n=r.text;if("{"===n||"\\begingroup"===n){this.consume();var s="{"===n?"}":"\\endgroup";this.gullet.beginGroup();var a=this.parseExpression(!1,s),o=this.fetch();this.expect(s),this.gullet.endGroup(),i={type:"ordgroup",mode:this.mode,loc:fe.range(r,o),body:a,semisimple:"\\begingroup"===n||void 0}}else if(null==(i=this.parseFunction(t,e)||this.parseSymbol())&&"\\"===n[0]&&!rs.hasOwnProperty(n)){if(this.settings.throwOnError)throw new ve("Undefined control sequence: "+n,r);i=this.formatUnsupportedCmd(n),this.consume()}return i}formLigatures(e){for(var t=e.length-1,i=0;i<t;++i){var r=e[i],n=r.text;"-"===n&&"-"===e[i+1].text&&(i+1<t&&"-"===e[i+2].text?(e.splice(i,3,{type:"textord",mode:"text",loc:fe.range(r,e[i+2]),text:"---"}),t-=2):(e.splice(i,2,{type:"textord",mode:"text",loc:fe.range(r,e[i+1]),text:"--"}),t-=1)),"'"!==n&&"`"!==n||e[i+1].text!==n||(e.splice(i,2,{type:"textord",mode:"text",loc:fe.range(r,e[i+1]),text:n+n}),t-=1)}}parseSymbol(){var e=this.fetch(),t=e.text;if(/^\\verb[^a-zA-Z]/.test(t)){this.consume();var i=t.slice(5),r="*"===i.charAt(0);if(r&&(i=i.slice(1)),i.length<2||i.charAt(0)!==i.slice(-1))throw new ve("\\verb assertion failed --\n please report what input caused this bug");return{type:"verb",mode:"text",body:i=i.slice(1,-1),star:r}}ls.hasOwnProperty(t[0])&&!vt[this.mode][t[0]]&&(this.settings.strict&&"math"===this.mode&&this.settings.reportNonstrict("unicodeTextInMathMode",'Accented Unicode text character "'+t[0]+'" used in math mode',e),t=ls[t[0]]+t.slice(1));var n,s=$n.exec(t);if(s&&("i"===(t=t.substring(0,s.index))?t="ı":"j"===t&&(t="ȷ")),vt[this.mode][t]){this.settings.strict&&"math"===this.mode&&Kt.indexOf(t)>=0&&this.settings.reportNonstrict("unicodeTextInMathMode",'Latin-1/Unicode text character "'+t[0]+'" used in math mode',e);var a,o=vt[this.mode][t].group,l=fe.range(e);if(ft.hasOwnProperty(o)){var h=o;a={type:"atom",mode:this.mode,family:h,loc:l,text:t}}else a={type:o,mode:this.mode,loc:l,text:t};n=a}else{if(!(t.charCodeAt(0)>=128))return null;this.settings.strict&&(Oe(t.charCodeAt(0))?"math"===this.mode&&this.settings.reportNonstrict("unicodeTextInMathMode",'Unicode text character "'+t[0]+'" used in math mode',e):this.settings.reportNonstrict("unknownSymbol",'Unrecognized Unicode character "'+t[0]+'" ('+t.charCodeAt(0)+")",e)),n={type:"textord",mode:"text",loc:fe.range(e),text:t}}if(this.consume(),s)for(var c=0;c<s[0].length;c++){var d=s[0][c];if(!os[d])throw new ve("Unknown accent ' "+d+"'",e);var u=os[d][this.mode]||os[d].text;if(!u)throw new ve("Accent "+d+" unsupported in "+this.mode+" mode",e);n={type:"accent",mode:this.mode,loc:fe.range(e),label:u,isStretchy:!1,isShifty:!0,base:n}}return n}}hs.endOfExpression=["}","\\endgroup","\\end","\\right","&"];var cs=function(e,t){if(!("string"==typeof e||e instanceof String))throw new TypeError("KaTeX can only parse string typed expression");var i=new hs(e,t);delete i.gullet.macros.current["\\df@tag"];var r=i.parse();if(delete i.gullet.macros.current["\\current@color"],delete i.gullet.macros.current["\\color"],i.gullet.macros.get("\\df@tag")){if(!t.displayMode)throw new ve("\\tag works only in display equations");r=[{type:"tag",mode:"text",body:r,tag:i.subparse([new be("\\df@tag")])}]}return r};"undefined"!=typeof document&&"CSS1Compat"!==document.compatMode&&("undefined"!=typeof console&&console.warn("Warning: KaTeX doesn't work in quirks mode. Make sure your website has a suitable doctype."));var ds=function(e,t,i){if(i.throwOnError||!(e instanceof ve))throw e;var r=di.makeSpan(["katex-error"],[new dt(t)]);return r.setAttribute("title",e.toString()),r.setAttribute("style","color:"+i.errorColor),r},us=function(e,t){var i=new Ce(t);try{return function(e,t,i){var r,n=Ki(i);if("mathml"===i.output)return Yi(e,t,n,i.displayMode,!0);if("html"===i.output){var s=Fi(e,n);r=di.makeSpan(["katex"],[s])}else{var a=Yi(e,t,n,i.displayMode,!1),o=Fi(e,n);r=di.makeSpan(["katex"],[a,o])}return Zi(r,i)}(cs(e,i),e,i)}catch(t){return ds(t,e,i)}},ps=function(e,t){return us(e,t).toMarkup()},ms=function(t){var r=t.textObject.equation.expression,n=i((function(){return ps(r,{throwOnError:!1,output:"mathml"})}),[r]);return e.createElement("span",{className:"rotion-richtext-equation",dangerouslySetInnerHTML:{__html:n}})},gs=function(t){var i=t.textObject;if(!i)return e.createElement(e.Fragment,null);var r=i.type,n=i.plain_text;switch(r){case"text":return e.createElement(ge,{textObject:i});case"mention":return e.createElement(ue,{textObject:i},n);case"equation":return e.createElement(ms,{textObject:i});default:return e.createElement(e.Fragment,null)}},fs=function(t){var i=t.textObjects;return e.createElement("div",{className:"rotion-gallery-title"},i.map((function(t,i){return e.createElement(gs,{key:"richtext-".concat(i),textObject:t})})))},bs=function(i){var n=i.date;if(null===n)return e.createElement(e.Fragment,null);var s=n.start,a=n.end,o=t(""),l=o[0],h=o[1],c=t(""),d=c[0],u=c[1];return r((function(){var e,t=f(null===(e=null===window||void 0===window?void 0:window.navigator)||void 0===e?void 0:e.language),i=t.dateF,r=t.timeF;h(se(s).format(s.length>10?"".concat(i," ").concat(r):i)),a&&u(se(a).format(a.length>10?"".concat(i," ").concat(r):i))}),[l,d]),e.createElement("div",{className:"rotion-gallery-date"},l,a&&" → ".concat(d))},vs=function(t){var i=t.textObjects,r=t.size;return e.createElement("div",{className:"rotion-gallery-richtext rotion-gallery-richtext-".concat(r||"medium")},i.map((function(t,i){return e.createElement(gs,{key:"richtext-".concat(i),textObject:t})})))},ys=function(t){var i=t.pathname,r=t.link,n=t.query,s=t.children,a=n?{pathname:i,query:n}:i;if(!a)return e.createElement("span",{className:"rotion-gallery-multiselect-tag"},s);if(r){var o=r;return e.createElement(o,{className:"rotion-gallery-multiselect-tag rotion-gallery-multiselect-link",href:a},s)}return e.createElement("a",{className:"rotion-gallery-multiselect-tag rotion-gallery-multiselect-link",href:i},s)},ws=function(t){var i=t.multiSelect,r=t.options||{},n=r.pathname,s=r.link,a=r.query;return e.createElement("ul",{className:"rotion-gallery-multiselect-ul"},i.map((function(t){return e.createElement("li",{key:t.id,className:"rotion-gallery-multiselect-li rotion-gallery-multiselect-".concat(t.color)},e.createElement(ys,{pathname:n?"".concat(n,"/").concat(encodeURIComponent(t.name)):void 0,link:s,query:a},t.name))})))},xs=function(t){var i=t.url;if(!i)return e.createElement(e.Fragment,null);var r=b(i),n=r.domain,s=r.omittedPath;return e.createElement("div",{className:"rotion-gallery-url"},e.createElement("a",{className:"rotion-gallery-url-link",href:i,rel:"noreferrer",target:"_blank"},e.createElement("svg",{className:"rotion-gallery-url-chain",width:"16",height:"16",viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor"},e.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4.4 3h3.085a3.4 3.4 0 0 1 3.4 3.4v.205A3.4 3.4 0 0 1 7.485 10H7V9h.485A2.4 2.4 0 0 0 9.88 6.61V6.4A2.4 2.4 0 0 0 7.49 4H4.4A2.4 2.4 0 0 0 2 6.4v.205A2.394 2.394 0 0 0 4 8.96v1a3.4 3.4 0 0 1-3-3.35V6.4A3.405 3.405 0 0 1 4.4 3zM12 7.04v-1a3.4 3.4 0 0 1 3 3.36v.205A3.405 3.405 0 0 1 11.605 13h-3.09A3.4 3.4 0 0 1 5.12 9.61V9.4A3.4 3.4 0 0 1 8.515 6H9v1h-.485A2.4 2.4 0 0 0 6.12 9.4v.205A2.4 2.4 0 0 0 8.515 12h3.09A2.4 2.4 0 0 0 14 9.61V9.4a2.394 2.394 0 0 0-2-2.36z"})),e.createElement("span",{className:"rotion-gallery-url-domain"},n),e.createElement("span",{className:"rotion-gallery-url-path"},s)))},As=function(){return e.createElement("div",{className:"rotion-checkbox-checked"},e.createElement("div",{className:"rotion-checkbox-checked-inner"},e.createElement("svg",{className:"rotion-checkbox-checked-checkbox",viewBox:"0 0 14 14"},e.createElement("polygon",{points:"5.5 11.9993304 14 3.49933039 12.5 2 5.5 8.99933039 1.5 4.9968652 0 6.49933039"}))))},ks=function(){return e.createElement("div",{className:"rotion-checkbox-unchecked"},e.createElement("svg",{className:"rotion-checkbox-unchecked-checkbox",viewBox:"0 0 16 16"},e.createElement("path",{d:"M1.5,1.5 L1.5,14.5 L14.5,14.5 L14.5,1.5 L1.5,1.5 Z M0,0 L16,0 L16,16 L0,16 L0,0 Z"})))},Es=function(t){return t.bool?e.createElement(As,null):e.createElement(ks,null)},Ss=function(t){var i=t.prefix,r=t.suffix,n=t.children;return e.createElement(e.Fragment,null,i&&e.createElement("span",{className:"rotion-prefix"},i),n,r&&e.createElement("span",{className:"rotion-suffix"},r))},Cs=function(t){var i=t.checked,r=t.options||{},n=r.prefix,s=r.suffix;return e.createElement("div",{className:"rotion-gallery-checkbox"},e.createElement(Ss,{prefix:n,suffix:s},e.createElement(Es,{bool:i})))},Ms=function(t){var i=t.number,r=t.options||{},n=r.prefix,s=r.suffix;return e.createElement("div",{className:"rotion-gallery-number"},e.createElement(Ss,{prefix:n,suffix:s},i))},_s=function(t){var i=t.pathname,r=t.link,n=t.query,s=t.children;if(!i)return e.createElement("span",{className:"rotion-gallery-select-tag"},s);if(r){var a=n?{pathname:i,query:n}:i,o=r;return e.createElement(o,{className:"rotion-gallery-select-tag rotion-gallery-select-link",href:a},s)}return e.createElement("a",{className:"rotion-gallery-select-tag rotion-gallery-select-link",href:i},s)},Ts=function(t){var i=t.select,r=t.options,n=i.name,s=i.color,a=r||{},o=a.pathname,l=a.link,h=a.query;return e.createElement("div",{className:"rotion-gallery-select"},e.createElement("span",{className:"rotion-gallery-select-wrapper rotion-gallery-select-".concat(s)},e.createElement(_s,{pathname:o?"".concat(o,"/").concat(encodeURIComponent(n)):void 0,link:l,query:h},n)))},Ns=function(t){var i=t.number,r=t.options||{},n=r.prefix,s=r.suffix;return e.createElement("div",{className:"rotion-gallery-formula"},e.createElement(Ss,{prefix:n,suffix:s},i))},Is=function(t){var i=t.property,r=t.options;if(!i||!i.type)return console.log("property empty in gallery handler: ",i),e.createElement(e.Fragment,null);switch(i.type){case"title":return e.createElement(fs,{textObjects:i.title});case"rich_text":return e.createElement(vs,{textObjects:i.rich_text});case"multi_select":return e.createElement(ws,{multiSelect:i.multi_select,options:r});case"select":return e.createElement(Ts,{select:i.select,options:r});case"date":return e.createElement(bs,{date:i.date});case"url":return e.createElement(xs,{url:i.url});case"checkbox":return e.createElement(Cs,{checked:i.checkbox,options:r});case"number":return e.createElement(Ms,{number:i.number,options:r});case"formula":return e.createElement(Ns,{number:i.formula.number,options:r});default:return console.log("unsupport database property:",i),e.createElement(e.Fragment,null)}},Ls=function(t){var i=t.children,r=t.link,n=t.query,s=t.pathname;if(s&&r&&n){var a=r;return e.createElement(a,{className:"rotion-gallery-card rotion-gallery-link",href:{pathname:s,query:n}},i)}if(s&&r){a=r;return e.createElement(a,{className:"rotion-gallery-card rotion-gallery-link",href:s},i)}return s?e.createElement("a",{className:"rotion-gallery-card rotion-gallery-link",href:s},i):e.createElement("div",{className:"rotion-gallery-card"},i)},Ps={small:"100px",medium:"146px",large:"180px"},Rs=function(t){var i=t.src,r=t.options||{},n=r.size,s=r.height,a=r.fit,o="";return o=n&&s?"string"==typeof s?s:s[n]:Ps[n||"medium"],e.createElement("div",{className:"rotion-gallery-preview",style:{height:o}},e.createElement("img",{src:i,className:"rotion-gallery-preview-img rotion-gallery-preview-".concat(a?"fit":"nofit"),style:{height:o}}))};function Ds(e,t,i){if(!i)return t;var r=i||{},n=r.href,s=r.prefix,a=r.suffix;return n&&n[e]&&(t.pathname=n[e]),s&&s[e]&&(t.prefix=s[e]),a&&a[e]&&(t.suffix=a[e]),t}var zs=function(t){var i,r=t.keys,n=t.page,s=t.options,a=function(e){for(var t in e.properties)if("title"===e.properties[t].type)return t}(n);if(!a)return e.createElement(e.Fragment,null);var o=s||{},l=o.href,h=o.link,c=o.query,p=o.image,m={link:h,query:c};if(l&&l[a]){var g=d(l[a]),f=g[0],b=g[1];m.pathname=""===b?f:"".concat(f).concat(u(b,n))}return e.createElement(Ls,{pathname:m.pathname,link:h,query:c},(null==p?void 0:p.preview)&&(null===(i=n.cover)||void 0===i?void 0:i.src)&&e.createElement(Rs,{src:n.cover.src,options:p}),e.createElement("div",{className:"rotion-gallery-card-text"},r.map((function(t,i){return e.createElement("div",{key:"".concat(n.id).concat(t),className:"field".concat(i)},e.createElement(Is,{property:n.properties[t],options:Ds(t,structuredClone(m),s)}))}))))},Fs=function(t){var i=t.keys,r=t.db,n=t.options;void 0===n&&(n={});var s=n.image;void 0===s&&(n.image={});var a=s||{},o=a.preview,l=void 0===o?"cover":o,h=a.fit,c=void 0===h||h,d=a.size,u=void 0===d?"medium":d;return n.image={preview:l,fit:c,size:u},e.createElement("div",{className:"rotion-gallery ".concat(c?"rotion-gallery-fit":"")},e.createElement("div",{className:"rotion-gallery-inner rotion-gallery-".concat(u)},r.results.map((function(t){return e.createElement(zs,{key:t.id,keys:i,page:t,options:n})}))))},Os=function(t){var i=t.textObjects,r=t.options,n=function(){return"rotion-list-title-wrapper ".concat((null==r?void 0:r.pathname)?"rotion-list-title-link":"")};if((null==r?void 0:r.link)&&(null==r?void 0:r.pathname)&&(null==r?void 0:r.query)){var s=r.link;return e.createElement(s,{className:n(),href:{pathname:r.pathname,query:r.query}},i.map((function(t,i){return e.createElement(gs,{key:"richtext-".concat(i),textObject:t})})))}if((null==r?void 0:r.link)&&(null==r?void 0:r.pathname)){s=r.link;return e.createElement(s,{className:n(),href:r.pathname},i.map((function(t,i){return e.createElement(gs,{key:"richtext-".concat(i),textObject:t})})))}return(null==r?void 0:r.pathname)?e.createElement("a",{className:n(),href:r.pathname},i.map((function(t,i){return e.createElement(gs,{key:"richtext-".concat(i),textObject:t})}))):e.createElement("span",{className:n()},i.map((function(t,i){return e.createElement(gs,{key:"richtext-".concat(i),textObject:t})})))},Bs=function(t){var i=t.textObjects,r=t.options;return e.createElement("div",{className:"rotion-list-title"},e.createElement(Os,{textObjects:i,options:r}))},Hs=function(i){var n=i.date;if(null===n)return e.createElement(e.Fragment,null);var s=n.start,a=n.end,o=t(""),l=o[0],h=o[1],c=t(""),d=c[0],u=c[1];return r((function(){var e,t=f(null===(e=null===window||void 0===window?void 0:window.navigator)||void 0===e?void 0:e.language),i=t.dateF,r=t.timeF;h(se(s).format(s.length>10?"".concat(i," ").concat(r):i)),a&&u(se(a).format(a.length>10?"".concat(i," ").concat(r):i))}),[l,d]),e.createElement("div",{className:"rotion-list-date"},l,a&&" → ".concat(d))},qs=function(t){var i=t.textObjects;return e.createElement("div",{className:"rotion-list-richtext"},i.map((function(t,i){return e.createElement(gs,{key:"richtext-".concat(i),textObject:t})})))},js=function(t){var i=t.color,r=t.pathname,n=t.link,s=t.query,a=t.children,o=s?{pathname:r,query:s}:r,l=function(e){return"rotion-list-multiselect-wrapper ".concat(o?"rotion-list-multiselect-link":""," rotion-list-multiselect-").concat(e)};if(!o)return e.createElement("span",{className:l(i)},a);if(n){var h=n;return e.createElement(h,{className:l(i),href:o},a)}return e.createElement("a",{className:l(i),href:r},a)},Vs=function(t){var i=t.multiSelect,r=t.options;if(!i)return e.createElement(e.Fragment,null);var n=r||{},s=n.pathname,a=n.link,o=n.query;return e.createElement("ul",{className:"rotion-list-multiselect-ul"},i.map((function(t){return e.createElement("li",{key:t.id,className:"rotion-list-multiselect-li"},e.createElement(js,{pathname:s?"".concat(s,"/").concat(encodeURIComponent(t.name)):void 0,color:t.color,link:a,query:o},t.name))})))},Us=function(t){var i=t.color,r=t.pathname,n=t.link,s=t.query,a=t.children,o=s?{pathname:r,query:s}:r,l=function(e){return"rotion-list-select-wrapper ".concat(o?"rotion-list-select-link":""," rotion-list-select-").concat(e)};if(!o)return e.createElement("span",{className:l(i)},a);if(n){var h=n;return e.createElement(h,{className:l(i),href:o},a)}return e.createElement("a",{className:l(i),href:r},a)},Gs=function(t){var i=t.select,r=t.options;if(!i)return e.createElement(e.Fragment,null);var n=i.name,s=i.color,a=r||{},o=a.pathname,l=a.link,h=a.query;return e.createElement("div",{className:"rotion-list-select"},e.createElement(Us,{pathname:o?"".concat(o,"/").concat(encodeURIComponent(n)):void 0,color:s,link:l,query:h},n))},$s=function(t){var i=t.url;if(!i)return e.createElement(e.Fragment,null);var r=b(i),n=r.domain,s=r.omittedPath;return e.createElement("div",{className:"rotion-list-url"},e.createElement("a",{className:"rotion-list-url-link",href:i,rel:"noreferrer",target:"_blank"},e.createElement("svg",{className:"rotion-list-url-chain",width:"16",height:"16",viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor"},e.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4.4 3h3.085a3.4 3.4 0 0 1 3.4 3.4v.205A3.4 3.4 0 0 1 7.485 10H7V9h.485A2.4 2.4 0 0 0 9.88 6.61V6.4A2.4 2.4 0 0 0 7.49 4H4.4A2.4 2.4 0 0 0 2 6.4v.205A2.394 2.394 0 0 0 4 8.96v1a3.4 3.4 0 0 1-3-3.35V6.4A3.405 3.405 0 0 1 4.4 3zM12 7.04v-1a3.4 3.4 0 0 1 3 3.36v.205A3.405 3.405 0 0 1 11.605 13h-3.09A3.4 3.4 0 0 1 5.12 9.61V9.4A3.4 3.4 0 0 1 8.515 6H9v1h-.485A2.4 2.4 0 0 0 6.12 9.4v.205A2.4 2.4 0 0 0 8.515 12h3.09A2.4 2.4 0 0 0 14 9.61V9.4a2.394 2.394 0 0 0-2-2.36z"})),e.createElement("span",{className:"rotion-list-url-domain"},n),e.createElement("span",{className:"rotion-list-url-path"},s)))},Ws=function(t){var i=t.checked,r=t.options||{},n=r.prefix,s=r.suffix;return e.createElement("div",{className:"rotion-list-checkbox"},e.createElement(Ss,{prefix:n,suffix:s},e.createElement(Es,{bool:i})))},Xs=function(t){var i=t.number,r=t.options||{},n=r.prefix,s=r.suffix;return e.createElement("div",{className:"rotion-list-number"},e.createElement(Ss,{prefix:n,suffix:s},i))},Ys=function(t){var i=t.number,r=t.options||{},n=r.prefix,s=r.suffix;return e.createElement("div",{className:"rotion-list-formula"},e.createElement(Ss,{prefix:n,suffix:s},i))},Ks=function(t){var i=t.property,r=t.options;if(!i||!i.type)return console.log("property empty in table handler: ",i),e.createElement(e.Fragment,null);switch(i.type){case"title":return e.createElement(Bs,{textObjects:i.title,options:r});case"rich_text":return e.createElement(qs,{textObjects:i.rich_text});case"url":return e.createElement($s,{url:i.url});case"date":return e.createElement(Hs,{date:i.date});case"multi_select":return e.createElement(Vs,{multiSelect:i.multi_select,options:r});case"checkbox":return e.createElement(Ws,{checked:i.checkbox,options:r});case"number":return e.createElement(Xs,{number:i.number,options:r});case"select":return e.createElement(Gs,{select:i.select,options:r});case"formula":return e.createElement(Ys,{number:i.formula.number,options:r});default:return console.log("unsupport database property:",i),e.createElement(e.Fragment,null)}},Zs=function(t){var i=t.name,r=t.page,n=t.options;if("spacer"===i||"dashed"===i||!("properties"in r))return e.createElement(e.Fragment,null);var s=r.properties[i];if(!s)return e.createElement(e.Fragment,null);var a=n||{},o=a.href,l=a.prefix,h=a.suffix,c={link:a.link,query:a.query};if(o&&o[i]){var p=d(o[i]),m=p[0],g=p[1];c.pathname=""===g?m:"".concat(m).concat(u(g,r))}return l&&l[i]&&(c.prefix=l[i]),h&&h[i]&&(c.suffix=h[i]),e.createElement(Ks,{property:s,options:c})};function Js(e,t){var i=["rotion-list-column".concat(t)];switch(e){case"spacer":i.push("rotion-list-spacer");break;case"dashed":i.push("rotion-list-dashed")}return i.join(" ")}var Qs=function(t){var i=t.keys,r=t.db,n=t.options;return e.createElement("div",{className:"rotion-list"},e.createElement("div",{className:"rotion-list-inner"},r.results.map((function(t){return e.createElement("div",{key:t.id,className:"rotion-list-line"},i.map((function(i,r){return e.createElement("div",{key:"".concat(t.id).concat(i),className:Js(i,r)},e.createElement(Zs,{name:i,page:t,options:n}))})))}))))},ea=function(t){var i=t.type,r=t.className;switch(i){case"title":return e.createElement("svg",{viewBox:"0 0 14 14",className:r},e.createElement("path",{d:"M7.73943662,8.6971831 C7.77640845,8.7834507 7.81338028,8.8943662 7.81338028,9.00528169 C7.81338028,9.49823944 7.40669014,9.89260563 6.91373239,9.89260563 C6.53169014,9.89260563 6.19894366,9.64612676 6.08802817,9.30105634 L5.75528169,8.33978873 L2.05809859,8.33978873 L1.72535211,9.30105634 C1.61443662,9.64612676 1.2693662,9.89260563 0.887323944,9.89260563 C0.394366197,9.89260563 0,9.49823944 0,9.00528169 C0,8.8943662 0.0246478873,8.7834507 0.0616197183,8.6971831 L2.46478873,2.48591549 C2.68661972,1.90669014 3.24119718,1.5 3.90669014,1.5 C4.55985915,1.5 5.12676056,1.90669014 5.34859155,2.48591549 L7.73943662,8.6971831 Z M2.60035211,6.82394366 L5.21302817,6.82394366 L3.90669014,3.10211268 L2.60035211,6.82394366 Z M11.3996479,3.70598592 C12.7552817,3.70598592 14,4.24823944 14,5.96126761 L14,9.07922535 C14,9.52288732 13.6549296,9.89260563 13.2112676,9.89260563 C12.8169014,9.89260563 12.471831,9.59683099 12.4225352,9.19014085 C12.028169,9.6584507 11.3257042,9.95422535 10.5492958,9.95422535 C9.60035211,9.95422535 8.47887324,9.31338028 8.47887324,7.98239437 C8.47887324,6.58978873 9.60035211,6.08450704 10.5492958,6.08450704 C11.3380282,6.08450704 12.040493,6.33098592 12.4348592,6.81161972 L12.4348592,5.98591549 C12.4348592,5.38204225 11.9172535,4.98767606 11.1285211,4.98767606 C10.6602113,4.98767606 10.2411972,5.11091549 9.80985915,5.38204225 C9.72359155,5.43133803 9.61267606,5.46830986 9.50176056,5.46830986 C9.18133803,5.46830986 8.91021127,5.1971831 8.91021127,4.86443662 C8.91021127,4.64260563 9.0334507,4.44542254 9.19366197,4.34683099 C9.87147887,3.90316901 10.6232394,3.70598592 11.3996479,3.70598592 Z M11.1778169,8.8943662 C11.6830986,8.8943662 12.1760563,8.72183099 12.4348592,8.37676056 L12.4348592,7.63732394 C12.1760563,7.29225352 11.6830986,7.11971831 11.1778169,7.11971831 C10.5616197,7.11971831 10.056338,7.45246479 10.056338,8.0193662 C10.056338,8.57394366 10.5616197,8.8943662 11.1778169,8.8943662 Z M0.65625,11.125 L13.34375,11.125 C13.7061869,11.125 14,11.4188131 14,11.78125 C14,12.1436869 13.7061869,12.4375 13.34375,12.4375 L0.65625,12.4375 C0.293813133,12.4375 4.43857149e-17,12.1436869 0,11.78125 C-4.43857149e-17,11.4188131 0.293813133,11.125 0.65625,11.125 Z"}));case"date":return e.createElement("svg",{viewBox:"0 0 14 14",className:r},e.createElement("path",{d:"M10.8889,5.5 L3.11111,5.5 L3.11111,7.05556 L10.8889,7.05556 L10.8889,5.5 Z M12.4444,1.05556 L11.6667,1.05556 L11.6667,0 L10.1111,0 L10.1111,1.05556 L3.88889,1.05556 L3.88889,0 L2.33333,0 L2.33333,1.05556 L1.55556,1.05556 C0.692222,1.05556 0.00777777,1.75556 0.00777777,2.61111 L0,12.5 C0,13.3556 0.692222,14 1.55556,14 L12.4444,14 C13.3,14 14,13.3556 14,12.5 L14,2.61111 C14,1.75556 13.3,1.05556 12.4444,1.05556 Z M12.4444,12.5 L1.55556,12.5 L1.55556,3.94444 L12.4444,3.94444 L12.4444,12.5 Z M8.55556,8.61111 L3.11111,8.61111 L3.11111,10.1667 L8.55556,10.1667 L8.55556,8.61111 Z"}));case"rich_text":return e.createElement("svg",{viewBox:"0 0 16 16",className:r},e.createElement("path",{d:"M1.56738 3.25879H14.4258C14.7676 3.25879 15.0479 2.97852 15.0479 2.63672C15.0479 2.29492 14.7744 2.02148 14.4258 2.02148H1.56738C1.21875 2.02148 0.952148 2.29492 0.952148 2.63672C0.952148 2.97852 1.22559 3.25879 1.56738 3.25879ZM1.56738 6.84082H14.4258C14.7676 6.84082 15.0479 6.56055 15.0479 6.21875C15.0479 5.87695 14.7744 5.60352 14.4258 5.60352H1.56738C1.21875 5.60352 0.952148 5.87695 0.952148 6.21875C0.952148 6.56055 1.22559 6.84082 1.56738 6.84082ZM1.56738 10.4229H14.4258C14.7676 10.4229 15.0479 10.1426 15.0479 9.80078C15.0479 9.45898 14.7744 9.18555 14.4258 9.18555H1.56738C1.21875 9.18555 0.952148 9.45898 0.952148 9.80078C0.952148 10.1426 1.22559 10.4229 1.56738 10.4229ZM1.56738 14.0049H8.75879C9.10059 14.0049 9.38086 13.7246 9.38086 13.3828C9.38086 13.041 9.10742 12.7676 8.75879 12.7676H1.56738C1.21875 12.7676 0.952148 13.041 0.952148 13.3828C0.952148 13.7246 1.22559 14.0049 1.56738 14.0049Z"}));case"multi_select":return e.createElement("svg",{viewBox:"0 0 14 14",className:r},e.createElement("path",{d:"M4,3 C4,2.447715 4.447715,2 5,2 L12,2 C12.5523,2 13,2.447716 13,3 C13,3.55228 12.5523,4 12,4 L5,4 C4.447715,4 4,3.55228 4,3 Z M4,7 C4,6.447715 4.447715,6 5,6 L12,6 C12.5523,6 13,6.447716 13,7 C13,7.55228 12.5523,8 12,8 L5,8 C4.447715,8 4,7.55228 4,7 Z M4,11 C4,10.447715 4.447715,10 5,10 L12,10 C12.5523,10 13,10.447716 13,11 C13,11.55228 12.5523,12 12,12 L5,12 C4.447715,12 4,11.55228 4,11 Z M2,4 C1.44771525,4 1,3.55228475 1,3 C1,2.44771525 1.44771525,2 2,2 C2.55228475,2 3,2.44771525 3,3 C3,3.55228475 2.55228475,4 2,4 Z M2,8 C1.44771525,8 1,7.55228475 1,7 C1,6.44771525 1.44771525,6 2,6 C2.55228475,6 3,6.44771525 3,7 C3,7.55228475 2.55228475,8 2,8 Z M2,12 C1.44771525,12 1,11.5522847 1,11 C1,10.4477153 1.44771525,10 2,10 C2.55228475,10 3,10.4477153 3,11 C3,11.5522847 2.55228475,12 2,12 Z"}));case"url":return e.createElement("svg",{viewBox:"0 0 14 14",className:r},e.createElement("path",{d:"M3.73333,3.86667 L7.46667,3.86667 C8.49613,3.86667 9.33333,4.70387 9.33333,5.73333 C9.33333,6.7628 8.49613,7.6 7.46667,7.6 L6.53333,7.6 C6.01813,7.6 5.6,8.0186 5.6,8.53333 C5.6,9.04807 6.01813,9.46667 6.53333,9.46667 L7.46667,9.46667 C9.5284,9.46667 11.2,7.79507 11.2,5.73333 C11.2,3.6716 9.5284,2 7.46667,2 L3.73333,2 C1.6716,2 0,3.6716 0,5.73333 C0,7.124 0.762067,8.33453 1.88953,8.97713 C1.87553,8.83107 1.86667,8.6836 1.86667,8.53333 C1.86667,7.92013 1.98753,7.33447 2.2036,6.7978 C1.99267,6.4954 1.86667,6.12953 1.86667,5.73333 C1.86667,4.70387 2.70387,3.86667 3.73333,3.86667 Z M12.1095,5.28907 C12.1231,5.4356 12.1333,5.58307 12.1333,5.73333 C12.1333,6.34607 12.0101,6.9294 11.7931,7.46513 C12.0059,7.768 12.1333,8.13573 12.1333,8.53333 C12.1333,9.5628 11.2961,10.4 10.2667,10.4 L6.53333,10.4 C5.50387,10.4 4.66667,9.5628 4.66667,8.53333 C4.66667,7.50387 5.50387,6.66667 6.53333,6.66667 L7.46667,6.66667 C7.98187,6.66667 8.4,6.24807 8.4,5.73333 C8.4,5.2186 7.98187,4.8 7.46667,4.8 L6.53333,4.8 C4.4716,4.8 2.8,6.4716 2.8,8.53333 C2.8,10.59507 4.4716,12.2667 6.53333,12.2667 L10.2667,12.2667 C12.3284,12.2667 14,10.59507 14,8.53333 C14,7.14267 13.2375,5.93167 12.1095,5.28907 Z"}));case"number":return e.createElement("svg",{viewBox:"0 0 16 16",className:r},e.createElement("path",{d:"M2.4834 10.9902H4.33594L3.75488 13.8887C3.74121 13.9639 3.72754 14.0664 3.72754 14.1416C3.72754 14.5381 3.99414 14.7637 4.39746 14.7637C4.81445 14.7637 5.09473 14.5449 5.18359 14.1143L5.80566 10.9902H8.79297L8.21191 13.8887C8.19824 13.9639 8.18457 14.0664 8.18457 14.1416C8.18457 14.5381 8.45117 14.7637 8.85449 14.7637C9.27148 14.7637 9.55176 14.5449 9.63379 14.1143L10.2627 10.9902H12.4502C12.9287 10.9902 13.2432 10.6758 13.2432 10.2109C13.2432 9.8418 12.9902 9.56836 12.6006 9.56836H10.5498L11.2129 6.28711H13.3662C13.8379 6.28711 14.1523 5.96582 14.1523 5.50098C14.1523 5.13184 13.9062 4.8584 13.5098 4.8584H11.5L12.0195 2.27441C12.0264 2.21973 12.0469 2.11035 12.0469 2.01465C12.0469 1.625 11.7666 1.39258 11.3633 1.39258C10.9053 1.39258 10.6797 1.63867 10.5977 2.05566L10.0303 4.8584H7.04297L7.5625 2.27441C7.57617 2.21973 7.58984 2.11035 7.58984 2.01465C7.58984 1.625 7.30957 1.39258 6.91309 1.39258C6.44824 1.39258 6.21582 1.63867 6.13379 2.05566L5.57324 4.8584H3.54297C3.06445 4.8584 2.75 5.18652 2.75 5.65137C2.75 6.03418 3.00293 6.28711 3.39258 6.28711H5.28613L4.62305 9.56836H2.63379C2.15527 9.56836 1.84082 9.89648 1.84082 10.3613C1.84082 10.7373 2.09375 10.9902 2.4834 10.9902ZM6.09277 9.56836L6.75586 6.28711H9.74316L9.08008 9.56836H6.09277Z"}));case"checkbox":return e.createElement("svg",{viewBox:"0 0 14 14",className:r},e.createElement("path",{d:"M0,3 C0,1.34314 1.34326,0 3,0 L11,0 C12.6567,0 14,1.34314 14,3 L14,11 C14,12.6569 12.6567,14 11,14 L3,14 C1.34326,14 0,12.6569 0,11 L0,3 Z M3,1.5 C2.17139,1.5 1.5,2.17157 1.5,3 L1.5,11 C1.5,11.8284 2.17139,12.5 3,12.5 L11,12.5 C11.8286,12.5 12.5,11.8284 12.5,11 L12.5,3 C12.5,2.17157 11.8286,1.5 11,1.5 L3,1.5 Z M2.83252,6.8161 L3.39893,6.27399 L3.57617,6.10425 L3.92334,5.77216 L4.26904,6.10559 L4.44531,6.27582 L5.58398,7.37402 L9.28271,3.81073 L9.45996,3.64008 L9.80664,3.3056 L10.1538,3.63989 L10.3311,3.81067 L10.8936,4.35303 L11.0708,4.52399 L11.4434,4.88379 L11.0708,5.24353 L10.8936,5.41437 L6.1084,10.0291 L5.93115,10.2 L5.58398,10.5344 L5.23682,10.2 L5.05957,10.0292 L2.83057,7.87946 L2.65283,7.70801 L2.27832,7.34674 L2.6543,6.98694 L2.83252,6.8161 Z"}));case"select":return e.createElement("svg",{viewBox:"0 0 14 14",className:r},e.createElement("path",{d:"M7,13 C10.31348,13 13,10.31371 13,7 C13,3.68629 10.31348,1 7,1 C3.68652,1 1,3.68629 1,7 C1,10.31371 3.68652,13 7,13 Z M3.75098,5.32278 C3.64893,5.19142 3.74268,5 3.90869,5 L10.09131,5 C10.25732,5 10.35107,5.19142 10.24902,5.32278 L7.15771,9.29703 C7.07764,9.39998 6.92236,9.39998 6.84229,9.29703 L3.75098,5.32278 Z"}));case"status":return e.createElement("svg",{viewBox:"0 0 16 16",className:r},e.createElement("path",{d:"M8.75488 1.02344C8.75488 0.613281 8.41309 0.264648 8.00293 0.264648C7.59277 0.264648 7.25098 0.613281 7.25098 1.02344V3.11523C7.25098 3.51855 7.59277 3.86719 8.00293 3.86719C8.41309 3.86719 8.75488 3.51855 8.75488 3.11523V1.02344ZM3.91504 5.0293C4.20215 5.31641 4.69434 5.32324 4.97461 5.03613C5.26855 4.74902 5.26855 4.25684 4.98145 3.96973L3.53906 2.52051C3.25195 2.2334 2.7666 2.21973 2.47949 2.50684C2.19238 2.79395 2.18555 3.28613 2.47266 3.57324L3.91504 5.0293ZM10.9629 4.01758C10.6826 4.30469 10.6826 4.79688 10.9697 5.08398C11.2568 5.37109 11.749 5.36426 12.0361 5.07715L13.4854 3.62793C13.7725 3.34082 13.7725 2.84863 13.4785 2.55469C13.1982 2.27441 12.7061 2.27441 12.4189 2.56152L10.9629 4.01758ZM15.0234 8.78906C15.4336 8.78906 15.7822 8.44727 15.7822 8.03711C15.7822 7.62695 15.4336 7.28516 15.0234 7.28516H12.9385C12.5283 7.28516 12.1797 7.62695 12.1797 8.03711C12.1797 8.44727 12.5283 8.78906 12.9385 8.78906H15.0234ZM0.975586 7.28516C0.56543 7.28516 0.223633 7.62695 0.223633 8.03711C0.223633 8.44727 0.56543 8.78906 0.975586 8.78906H3.07422C3.48438 8.78906 3.83301 8.44727 3.83301 8.03711C3.83301 7.62695 3.48438 7.28516 3.07422 7.28516H0.975586ZM12.0361 10.9902C11.749 10.71 11.2568 10.71 10.9629 10.9971C10.6826 11.2842 10.6826 11.7764 10.9697 12.0635L12.4258 13.5127C12.7129 13.7998 13.2051 13.793 13.4922 13.5059C13.7793 13.2256 13.7725 12.7266 13.4854 12.4395L12.0361 10.9902ZM2.52051 12.4395C2.22656 12.7266 2.22656 13.2188 2.50684 13.5059C2.79395 13.793 3.28613 13.7998 3.57324 13.5127L5.02246 12.0703C5.31641 11.7832 5.31641 11.291 5.03613 11.0039C4.74902 10.7168 4.25684 10.71 3.96973 10.9971L2.52051 12.4395ZM8.75488 12.9658C8.75488 12.5557 8.41309 12.207 8.00293 12.207C7.59277 12.207 7.25098 12.5557 7.25098 12.9658V15.0576C7.25098 15.4609 7.59277 15.8096 8.00293 15.8096C8.41309 15.8096 8.75488 15.4609 8.75488 15.0576V12.9658Z"}));case"person":return e.createElement("svg",{viewBox:"0 0 14 14",className:r},e.createElement("path",{d:"M9.625,10.8465 C8.91187,10.2891 8.12088,9.926 7,9.26013 L7,8.71938 C7.21175,8.47612 7.392,8.176 7.53813,7.83213 C7.94587,7.7315 8.3125,7.33425 8.3125,7 C8.3125,6.51788 8.1095,6.32713 7.8715,6.17137 C7.8715,6.15562 7.875,6.14162 7.875,6.125 C7.875,5.41362 7.4375,3.5 5.25,3.5 C3.0625,3.5 2.625,5.4145 2.625,6.125 C2.625,6.14162 2.6285,6.15562 2.6285,6.17137 C2.3905,6.32713 2.1875,6.51788 2.1875,7 C2.1875,7.33425 2.55413,7.7315 2.96187,7.833 C3.108,8.176 3.28825,8.47612 3.5,8.71938 L3.5,9.26013 C2.37912,9.92513 1.58812,10.2882 0.875,10.8465 C0.041125,11.4984 0,12.4688 0,14 L10.5,14 C10.5,12.4688 10.4589,11.4984 9.625,10.8465 Z M13.125,7.3465 C12.4119,6.78912 11.6209,6.426 10.5,5.76013 L10.5,5.21938 C10.7118,4.97613 10.892,4.676 11.0381,4.33213 C11.4459,4.2315 11.8125,3.83425 11.8125,3.5 C11.8125,3.01787 11.6095,2.82713 11.3715,2.67138 C11.3715,2.65562 11.375,2.64162 11.375,2.625 C11.375,1.91363 10.9375,0 8.75,0 C6.5625,0 6.125,1.9145 6.125,2.625 C6.125,2.64162 6.1285,2.65562 6.1285,2.67138 C6.11188,2.68275 6.09787,2.69588 6.08125,2.70725 C7.83212,3.066 8.59688,4.54825 8.72813,5.74787 C8.97575,6.00863 9.1875,6.39625 9.1875,7 C9.1875,7.60288 8.771,8.20312 8.18388,8.51462 C8.127,8.624 8.06662,8.729 8.00275,8.82962 C8.155,8.91537 8.30025,8.99675 8.44025,9.07463 C9.08075,9.4325 9.63375,9.74137 10.164,10.1561 C10.3022,10.2638 10.4204,10.3801 10.5289,10.4991 L14,10.4991 C14,8.96875 13.9589,7.99837 13.125,7.3465 Z"}));case"email":return e.createElement("svg",{viewBox:"0 0 14 14",className:r},e.createElement("path",{d:"M14,6.22508 C14,7.0471 13.8666,7.79918 13.5999,8.48134 C13.3332,9.16351 12.9563,9.69867 12.4692,10.0868 C11.9821,10.475 11.524,10.6862 10.9764,10.6862 C10.5473,10.6862 10.1676,10.5849 9.83705,10.3823 C9.50653,10.1796 9.2688,9.91274 9.12384,9.58165 C8.51065,10.318 7.56114,10.6862 6.5928,10.6862 C5.56647,10.6862 4.75762,10.3823 4.16618,9.77431 C3.57473,9.16636 3.27902,8.33436 3.27902,7.27829 C3.27902,6.0738 3.66752,5.10337 4.44451,4.36697 C5.2215,3.63058 6.2362,3.26239 7.48867,3.26239 C7.98734,3.26239 9.5206,3.47449 9.74131,3.53033 C10.2518,3.65949 10.6003,4.12335 10.5763,4.6417 C10.5697,4.78537 10.5175,5.88115 10.4198,7.92905 C10.4198,8.72253 10.6401,9.11927 11.0808,9.11927 C11.4519,9.11927 11.7476,8.8524 11.968,8.31865 C12.1883,7.78491 12.2985,7.08706 12.2985,6.22508 C12.2985,5.30601 12.1042,4.49399 11.7157,3.78899 C11.3272,3.08399 10.7808,2.54597 10.0762,2.17492 C9.37173,1.80387 8.56719,1.61835 7.66263,1.61835 C6.49134,1.61835 5.47373,1.85525 4.60976,2.32905 C3.74579,2.80286 3.08332,3.48644 2.62234,4.37981 C2.16136,5.27319 1.93089,6.30499 1.93089,7.47523 C1.93089,9.05077 2.35851,10.2595 3.21378,11.1015 C4.06905,11.9435 5.30847,12.3645 6.93203,12.3645 C7.54667,12.3645 8.22216,12.2975 8.95856,12.1633 C9.18419,12.1222 9.47682,12.0555 9.83645,11.9632 C10.2649,11.8532 10.7081,12.0814 10.8607,12.4905 C11.0082,12.8863 10.802,13.3249 10.4001,13.4701 C10.3865,13.475 10.3728,13.4796 10.359,13.4837 C9.30721,13.7996 8.18808,13.9716 7.00161,14 C4.7982,14 3.08041,13.4292 1.84823,12.2875 C0.616061,11.1458 0,9.55883 0,7.52661 C0,6.11661 0.314555,4.8365 0.943688,3.68624 C1.57282,2.53598 2.46867,1.63405 3.63126,0.980429 C4.79385,0.326807 6.13184,0 7.64524,0 C8.9209,0 10.1589,0.290316 11.0634,0.770643 C11.968,1.25097 12.6374,1.99796 13.1824,2.94557 C13.7275,3.89318 14,4.98634 14,6.22508 Z M5.38462,7.23555 C5.38462,8.44263 5.87335,9.04616 6.85083,9.04616 C7.3623,9.04616 7.75159,8.86452 8.01869,8.50126 C8.28579,8.13799 8.44773,7.54734 8.50456,6.72927 L8.61539,4.83286 C8.32555,4.76993 7.9988,4.73846 7.63509,4.73846 C6.92471,4.73846 6.37204,4.96157 5.97707,5.40779 C5.58211,5.854 5.38462,6.46325 5.38462,7.23555 Z"}));case"phone_number":return e.createElement("svg",{viewBox:"0 0 14 14",className:r},e.createElement("path",{d:"M2.20731,0.0127209 C2.1105,-0.0066419 1.99432,-0.00664663 1.91687,0.032079 C0.871279,0.438698 0.212942,1.92964 0.0580392,2.95587 C-0.426031,6.28627 2.20731,9.17133 4.62766,11.0689 C6.77694,12.7534 10.9012,15.5223 13.3409,12.8503 C13.6507,12.5211 14.0186,12.037 13.9993,11.553 C13.9412,10.7397 13.186,10.1588 12.6051,9.71349 C12.1598,9.38432 11.2304,8.47427 10.6495,8.49363 C10.1267,8.51299 9.79754,9.05515 9.46837,9.38432 L8.88748,9.96521 C8.79067,10.062 7.55145,9.24878 7.41591,9.15197 C6.91248,8.8228 6.4284,8.45491 6.00242,8.04829 C5.57644,7.64167 5.18919,7.19632 4.86002,6.73161 C4.7632,6.59607 3.96933,5.41495 4.04678,5.31813 C4.04678,5.31813 4.72448,4.58234 4.91811,4.2919 C5.32473,3.67229 5.63453,3.18822 5.16982,2.45243 C4.99556,2.18135 4.78257,1.96836 4.55021,1.73601 C4.14359,1.34875 3.73698,0.942131 3.27227,0.612963 C3.02055,0.419335 2.59457,0.0708094 2.20731,0.0127209 Z"}));case"file":return e.createElement("svg",{viewBox:"0 0 14 14",className:r},e.createElement("path",{d:"M5.94578,14 C4.62416,14 3.38248,13.4963 2.44892,12.585 C1.514641,11.6736 1,10.4639 1,9.17405 C1.00086108,7.88562 1.514641,6.67434 2.44892,5.76378 L7.45612,0.985988 C8.80142,-0.327216 11.1777,-0.332396 12.5354,0.992848 C13.9369,2.36163 13.9369,4.58722 12.5354,5.95418 L8.03046,10.2414 C7.16278,11.0877 5.73682,11.0894 4.86024,10.2345 C3.98394,9.37789 3.98394,7.98769 4.86024,7.1327 L6.60422,5.4317 L7.87576,6.67196 L6.13177,8.37297 C6.01668,8.48539 6.00003,8.61545 6.00003,8.68335 C6.00003,8.75083 6.01668,8.88103 6.13177,8.99429 C6.36197,9.21689 6.53749,9.21689 6.76768,8.99429 L11.2707,4.70622 C11.9645,4.03016 11.9645,2.91757 11.2638,2.23311 C10.5843,1.57007 9.40045,1.57007 8.72077,2.23311 L3.71342,7.0109 C3.12602,7.58406 2.79837,8.35435 2.79837,9.17405 C2.79837,9.99459 3.12602,10.7654 3.72045,11.3446 C4.90947,12.5062 6.98195,12.5062 8.17096,11.3446 L10.41911,9.15165 L11.6906,10.3919 L9.4425,12.585 C8.50808,13.4963 7.2664,14 5.94578,14 Z"}));case"formula":return e.createElement("svg",{viewBox:"0 0 14 14",className:r},e.createElement("path",{d:"M7.77892,7.06304 L4.62218,11.2875 C4.58556,11.3416 4.55285,11.4392 4.5504,11.5052 C4.5504,11.7022 4.7047,11.8619 4.89562,11.8619 L11.1383,11.8619 C11.6139,11.8619 11.9996,12.2598 11.9996,12.7507 L11.9996,13.1111 C11.9996,13.602 11.6139,14 11.1383,14 L1.861927,14 C1.385853,14 1.00011061,13.602 1.00011061,13.1111 L1.00011061,12.6858 C0.99718092,12.4783 1.0523567,12.3098 1.176868,12.1466 L4.39269,7.79888 C4.74816,7.31841 4.74572,6.65139 4.38683,6.17354 L1.400013,2.19436 C1.27306,2.03028 1.216419,1.85993 1.219349,1.65006 L1.219349,0.888889 C1.219349,0.397968 1.605091,0 2.08117,0 L10.91906,0 C11.3946,0 11.7804,0.397968 11.7804,0.888889 L11.7804,1.24925 C11.7804,1.74017 11.3946,2.13814 10.91906,2.13814 L5.13634,2.13814 C4.94542,2.13814 4.79064,2.29801 4.79064,2.49522 C4.79308,2.56049 4.82482,2.65709 4.86095,2.71087 L7.78038,6.68628 C7.8297,6.74847 7.84435,6.7934 7.84142,6.87363 C7.84435,6.95493 7.82921,7.00048 7.77892,7.06304 Z"}));case"rollup":return e.createElement("svg",{viewBox:"0 0 18 18",className:r},e.createElement("path",{d:"M17,15.6l-5.119-5.119C12.583,9.499,13,8.299,13,7c0-3.314-2.686-6-6-6S1,3.686,1,7s2.686,6,6,6 c1.299,0,2.499-0.417,3.481-1.119L15.6,17L17,15.6z M7,11c-2.209,0-4-1.791-4-4c0-2.209,1.791-4,4-4s4,1.791,4,4 C11,9.209,9.209,11,7,11z"}));case"created_at":case"last_edited_at":return e.createElement("svg",{viewBox:"0 0 14 14",className:r},e.createElement("path",{d:"M7.01356 14.0001C8.8042 14.0001 10.5958 13.3107 11.9575 11.9324C14.681 9.21201 14.6808 4.7603 11.9571 2.04013C9.23336 -0.680043 4.77573 -0.680043 2.05199 2.04013C0.727519 3.36277 0 5.13301 0 6.99553C0 8.8764 0.727811 10.6285 2.05199 11.9509C3.43207 13.3106 5.22243 14.0001 7.01356 14.0001ZM3.72947 7.00914V8.461V8.65543H3.92382H5.34563H8.2794H8.4738V8.461V5.52541V3.37947V3.18502H8.2794H6.82747H6.63307V3.37947V6.81467H3.92382H3.72947V7.00914ZM1.83985 6.99553C1.83985 5.61698 2.38099 4.32597 3.36061 3.3477C5.36746 1.34337 8.64803 1.34062 10.6585 3.33944C10.6613 3.34219 10.6639 3.34494 10.6668 3.3477C12.676 5.3546 12.6763 8.63642 10.6668 10.6434C8.65705 12.6504 5.37031 12.6504 3.36061 10.6434C2.38099 9.66506 1.83985 8.37408 1.83985 6.99553Z"}));case"created_by":case"last_edited_by":return e.createElement("svg",{viewBox:"0 0 14 14",className:r},e.createElement("path",{d:"M13.125,10.0354 C12.5536,9.48588 10.801,8.53125 9.625,7.875 L9.625,7.04112 C9.849,6.71912 10.045,6.37 10.1911,5.98588 C10.5849,5.7435 10.9375,5.28412 10.9375,4.8125 C10.9375,4.35488 10.9323,3.94275 10.4668,3.605 C10.3049,1.5575 9.436,0 7,0 C4.564,0 3.69513,1.5575 3.53325,3.605 C3.06775,3.94275 3.0625,4.35488 3.0625,4.8125 C3.0625,5.28412 3.41513,5.7435 3.80888,5.98588 C3.955,6.37 4.151,6.71912 4.375,7.04112 L4.375,7.875 C3.199,8.53125 1.44638,9.48588 0.875,10.0354 C0.1645,10.7188 0,11.8125 0,14 L14,14 C14,11.8125 13.8364,10.7188 13.125,10.0354 Z"}));default:return e.createElement("span",null,"❓")}},ta=function(t){var i=t.options,r=t.children,n=i||{},s=n.pathname,a=n.link,o=n.query;if(s&&a){var l=a;return e.createElement(l,{className:"rotion-table-title-wrapper rotion-table-title-link",href:o?{pathname:s,query:o}:s},r)}return s?e.createElement("a",{className:"rotion-table-title-wrapper rotion-table-title-link",href:s},r):e.createElement("span",{className:"rotion-table-title-wrapper"},r)},ia=function(t){var i=t.textObjects,r=t.options;return e.createElement("div",{className:"rotion-table-title"},e.createElement(ta,{options:r},i.map((function(t,i){return e.createElement(gs,{key:"richtext-".concat(i),textObject:t})}))))},ra=function(i){var n=i.date;if(null===n)return e.createElement(e.Fragment,null);var s=n.start,a=n.end,o=t(""),l=o[0],h=o[1],c=t(""),d=c[0],u=c[1];return r((function(){var e,t=f(null===(e=null===window||void 0===window?void 0:window.navigator)||void 0===e?void 0:e.language),i=t.dateF,r=t.timeF;h(se(s).format(s.length>10?"".concat(i," ").concat(r):i)),a&&u(se(a).format(a.length>10?"".concat(i," ").concat(r):i))}),[l,d]),e.createElement("div",{className:"rotion-table-date"},l,a&&" → ".concat(d))},na=function(t){var i=t.textObjects;return i?e.createElement("div",{className:"rotion-table-richtext"},i.map((function(t,i){return e.createElement(gs,{key:"richtext-".concat(i),textObject:t})}))):e.createElement(e.Fragment,null)},sa=function(t){var i=t.color,r=t.pathname,n=t.link,s=t.query,a=t.children,o=s?{pathname:r,query:s}:r,l=function(e){return"rotion-table-multiselect-link rotion-table-multiselect-".concat(e)};if(""===o)return e.createElement("span",{className:l(i)},a);if(n){var h=n;return e.createElement(h,{className:l(i),href:o},a)}return e.createElement("a",{className:l(i),href:r},a)},aa=function(t){var i=t.multiSelect,r=t.options||{},n=r.pathname,s=r.link,a=r.query;return e.createElement("ul",{className:"rotion-table-multiselect-ul"},i.map((function(t){return e.createElement("li",{key:t.id,className:"rotion-table-multiselect-li"},e.createElement(sa,{pathname:n?"".concat(n,"/").concat(encodeURIComponent(t.name)):"",color:t.color,link:s,query:a},t.name))})))},oa=function(t){var i=t.pathname,r=t.color,n=t.link,s=t.query,a=t.children,o=s?{pathname:i,query:s}:i,l=function(e){return"rotion-table-select-link rotion-table-select-".concat(e)};if(""===o)return e.createElement("span",{className:l(r)},a);if(n){var h=n;return e.createElement(h,{className:l(r),href:o},a)}return e.createElement("a",{className:l(r),href:i},a)},la=function(t){var i=t.select,r=t.options;if(!i)return e.createElement(e.Fragment,null);var n=r||{},s=n.pathname,a=n.link,o=n.query;return e.createElement("div",{className:"rotion-table-select"},e.createElement(oa,{pathname:s?"".concat(s,"/").concat(encodeURIComponent(i.name)):"",color:i.color,link:a,query:o},i.name))},ha=function(t){var i=t.url;if(!i)return e.createElement(e.Fragment,null);var r=b(i),n=r.domain,s=r.omittedPath;return e.createElement("div",{className:"rotion-table-url"},e.createElement("a",{className:"rotion-table-url-link",href:i,rel:"noreferrer",target:"_blank"},e.createElement("span",{className:"rotion-table-url-domain"},n),e.createElement("span",{className:"rotion-table-url-path"},s)))},ca=function(t){var i=t.checked,r=t.options;return e.createElement("div",{className:"rotion-table-checkbox"},e.createElement(Ss,{prefix:null==r?void 0:r.prefix,suffix:null==r?void 0:r.suffix},e.createElement(Es,{bool:i})))},da=function(t){var i=t.number,r=t.options||{},n=r.prefix,s=r.suffix;return e.createElement("div",{className:"rotion-table-number"},e.createElement(Ss,{prefix:n,suffix:s},i))},ua=function(t){var i=t.number,r=t.options;return e.createElement("div",{className:"rotion-table-formula"},e.createElement(Ss,{prefix:null==r?void 0:r.prefix,suffix:null==r?void 0:r.suffix},i))},pa=function(t){var i=t.property,r=t.options;if(!i||!i.type)return console.log("property empty in table handler: ",i),e.createElement(e.Fragment,null);switch(i.type){case"title":return e.createElement(ia,{textObjects:i.title,options:r});case"rich_text":return e.createElement(na,{textObjects:i.rich_text});case"url":return e.createElement(ha,{url:i.url});case"date":return e.createElement(ra,{date:i.date});case"multi_select":return e.createElement(aa,{multiSelect:i.multi_select,options:r});case"checkbox":return e.createElement(ca,{checked:i.checkbox,options:r});case"number":return e.createElement(da,{number:i.number,options:r});case"select":return e.createElement(la,{select:i.select,options:r});case"formula":return e.createElement(ua,{number:i.formula.number,options:r});default:return console.log("unsupport database property:",i),e.createElement(e.Fragment,null)}},ma=function(t){var i=t.name,r=t.page,n=t.options;if(!("properties"in r))return e.createElement(e.Fragment,null);var s=r.properties[i];if(!s)return e.createElement(e.Fragment,null);var a=n||{},o=a.href,l=a.link,h=a.query,c=a.prefix,p=a.suffix,m={};if(o&&o[i]){var g=d(o[i]),f=g[0],b=g[1];m.pathname=""===b?f:"".concat(f).concat(u(b,r)),l&&(m.link=l),h&&(m.query=h)}return c&&c[i]&&(m.prefix=c[i]),p&&p[i]&&(m.suffix=p[i]),e.createElement(pa,{property:s,options:m})},ga=function(t){var i=t.keys,r=t.db,n=t.options,s=function(e){return r.meta.properties[e]?r.meta.properties[e].type:'Unknown "'.concat(e,'"')},a=(n||{}).verticalLines,o=void 0===a||a;return e.createElement("div",{className:"rotion-table ".concat(o?"rotion-table-verticallines":"")},e.createElement("div",{className:"rotion-table-inner"},e.createElement("div",{className:"rotion-table-header rotion-table-row"},i.map((function(t,i){return e.createElement("div",{key:"".concat(t,"-").concat(i),className:"rotion-table-cell rotion-table-column".concat(i)},e.createElement("div",{className:"rotion-table-cell-inner"},e.createElement(ea,{type:s(t),className:"rotion-table-header-icon"}),e.createElement("div",{className:"rotion-table-header-text"},t)))}))),r.results.map((function(t){return e.createElement("div",{key:t.id,className:"rotion-table-row"},i.map((function(i,r){return e.createElement("div",{key:"".concat(t.id).concat(i),className:"rotion-table-cell rotion-table-column".concat(r)},e.createElement("div",{className:"rotion-table-cell-inner"},e.createElement(ma,{name:i,page:t,options:n})))})))}))))},fa=function(t){var i=t.block;if(!i.bookmark)return e.createElement(e.Fragment,null);var r=i.bookmark.site,n=r.title,s=r.desc,a=r.icon,o=r.image,l=function(){var e;return window.open(null===(e=i.bookmark)||void 0===e?void 0:e.url,"_blank","noreferrer")},h=i.bookmark.url;return""===n&&""===s&&""===o?e.createElement("div",{className:"rotion-bookmark"},e.createElement("div",{className:"rotion-bookmark-area",onClick:l},e.createElement("div",{className:"rotion-bookmark-text"},e.createElement("div",{className:"rotion-bookmark-title"},h.substring(h.lastIndexOf("/")+1)),e.createElement("div",{className:"rotion-bookmark-desc"},h)))):e.createElement("div",{className:"rotion-bookmark"},e.createElement("div",{className:"rotion-bookmark-area",onClick:l},e.createElement("div",{className:"rotion-bookmark-text"},e.createElement("div",{className:"rotion-bookmark-title"},n),e.createElement("div",{className:"rotion-bookmark-desc"},s),e.createElement("div",{className:"rotion-bookmark-url"},""!==a&&e.createElement("img",{className:"rotion-bookmark-favicon",src:a,width:"16px",alt:"icon"}),h)),e.createElement("div",{className:"rotion-bookmark-image"},""!==o&&e.createElement("img",{className:"rotion-bookmark-img",src:o,width:"200px",height:"auto",alt:"image"}))),e.createElement("div",{className:"rotion-bookmark-caption"},i.bookmark.caption.map((function(t,i){return e.createElement(gs,{textObject:t,key:"richtext-".concat(i)})}))))};var ba=function(t){var i=t.breadcrumb,r=t.link,n=t.href,s=t.query,a=t.children,o=function(e,t,i){if("/"===i)return i;var r=d(i||""),n=r[0],s="";return s="id"===r[1]?e:encodeURIComponent(t.toLowerCase()).replace(/%20/g,"-"),"".concat(n).concat(s)}(i.id,i.name,n);if(r&&n){var l=r;return e.createElement(l,{className:"rotion-breadcrumb-link",href:{pathname:o,query:s}},a)}return n?e.createElement("a",{className:"rotion-breadcrumb-link",href:"".concat(o).concat(c(s))},a):e.createElement("span",{className:"rotion-breadcrumb-link"},a)},va=function(t){var i=t.list,r=t.link,n=t.hrefs,s=t.query,a=i.length;return e.createElement("div",{className:"rotion-breadcrumb"},i.map((function(t,i){return e.createElement("span",{key:"crumb-".concat(i)},e.createElement(ba,{breadcrumb:t,href:void 0===n?void 0:n[i],link:r,query:s},"emoji"===t.icon.type&&e.createElement("span",{className:"rotion-breadcrumb-emoji"},t.icon.emoji),"emoji"!==t.icon.type&&e.createElement("img",{className:"rotion-breadcrumb-icon",src:t.icon.src,width:20,height:20,alt:t.name}),e.createElement("span",{className:"rotion-breadcrumb-title"},t.name)),i+1<a&&e.createElement("span",{className:"rotion-breadcrumb-slash"},"/"))})))},ya=function(t){var i=t.block,r=t.link,n=t.hrefs,s=t.query;return e.createElement(va,{list:i.list,link:r,hrefs:n,query:s})},wa=function(t){var i,r=t.block,n=t.href,s=t.link,a=t.query,o=fu[r.type],l=null===(i=r[r.type])||void 0===i?void 0:i.rich_text;return r.has_children&&void 0!==r.children?e.createElement(o,{key:r.id,className:"rotion-bulleted-list"},l.map((function(t,i){return e.createElement(gs,{textObject:t,key:"richtext-".concat(i)})})),e.createElement(vu,{blocks:r.children,href:n,link:s,query:a})):e.createElement(o,{className:"rotion-bulleted-list"},l.map((function(t,i){return e.createElement(gs,{textObject:t,key:"richtext-".concat(i)})})))},xa=function(t){var i=t.block;if(!i.callout.icon)return e.createElement(e.Fragment,null);switch(i.callout.icon.type){case"emoji":return e.createElement("span",{className:"rotion-callout-emoji"},i.callout.icon.emoji);case"external":case"file":return e.createElement("img",{className:"rotion-callout-img",src:i.callout.icon.src,alt:"Icon"});default:return e.createElement(e.Fragment,null)}},Aa=function(t){var i=t.block,r=t.href,n=t.link,s=t.query,a=i.callout,o=a.color,l=a.rich_text;return e.createElement("div",{className:"rotion-callout rotion-callout-".concat(o.replace("_background","-bg"))},e.createElement("div",{className:"rotion-callout-icon"},e.createElement(xa,{block:i})),e.createElement("div",{className:"rotion-callout-text"},l.map((function(t,i){return e.createElement(gs,{textObject:t,key:"richtext-".concat(i)})})),i.has_children&&void 0!==i.children&&e.createElement(vu,{blocks:i.children,href:r,link:n,query:s})))},ka=function(t){var i=t.block,r=t.href,n=t.link,s=t.query,a=t.children,o=i.child_database.title,l=d(r||""),h=l[0],u="id"===l[1]?i.database.id:encodeURIComponent(o.toLowerCase()).replace(/%20/g,"-");if(!r)return e.createElement("div",{className:"rotion-childdb-link"},a);if(n){var p=n;return void 0===s&&(s={}),e.createElement(p,{className:"rotion-childdb-link",href:{pathname:"".concat(h).concat(u),query:s}},a)}return e.createElement("a",{className:"rotion-childdb-link",href:"".concat(h).concat(u).concat(c(s))},a)},Ea=function(t){var i=t.block,r=t.href,n=t.link,s=t.query;if(void 0===i.database)return e.createElement(e.Fragment,null);var a=i.child_database.title;return null===i.database||void 0===i.database.icon||null===i.database.icon?e.createElement("div",{className:"rotion-childdb"},e.createElement(ka,{block:i,href:r,link:n,query:s},e.createElement("span",{className:"rotion-childdb-icon"},"️-"),e.createElement("div",null,e.createElement("span",{className:"rotion-childdb-title"},a)))):"emoji"===i.database.icon.type?e.createElement("div",{className:"rotion-childdb"},e.createElement(ka,{block:i,href:r,link:n,query:s},e.createElement("span",{className:"rotion-childdb-emoji"},i.database.icon.emoji),e.createElement("div",null,e.createElement("span",{className:"rotion-childdb-title"},a)))):e.createElement("div",{className:"rotion-childdb"},e.createElement(ka,{block:i,href:r,link:n,query:s},e.createElement("span",{className:"rotion-childdb-icon"},e.createElement("img",{className:"rotion-childdb-icon-img",src:i.database.icon.src,alt:"Icon"})),e.createElement("div",null,e.createElement("span",{className:"rotion-childdb-title"},a))))},Sa=function(t){var i=t.block,r=t.href,n=t.link,s=t.query,a=t.children,o=i.child_page.title,l=d(r||""),h=l[0],u="id"===l[1]?i.page.id:encodeURIComponent(o.toLowerCase()).replace(/%20/g,"-");if(!r)return e.createElement("div",{className:"rotion-childpage-link"},a);if(n){var p=n;return void 0===s&&(s={}),e.createElement(p,{className:"rotion-childpage-link",href:{pathname:"".concat(h).concat(u),query:s}},a)}return e.createElement("a",{className:"rotion-childpage-link",href:"".concat(h).concat(u).concat(c(s))},a)},Ca=function(t){var i=t.block,r=t.href,n=t.link,s=t.query;if(void 0===i.page)return e.createElement(e.Fragment,null);var a=i.child_page.title;return null===i.page||void 0===i.page.icon||null===i.page.icon?e.createElement("div",{className:"rotion-childpage"},e.createElement(Sa,{block:i,href:r,link:n,query:s},e.createElement("span",{className:"rotion-childpage-icon"},"️-"),e.createElement("div",null,e.createElement("span",{className:"rotion-childpage-title"},a)))):"emoji"===i.page.icon.type?e.createElement("div",{className:"rotion-childpage"},e.createElement(Sa,{block:i,href:r,link:n,query:s},e.createElement("span",{className:"rotion-childpage-emoji"},i.page.icon.emoji),e.createElement("div",null,e.createElement("span",{className:"rotion-childpage-title"},a)))):e.createElement("div",{className:"rotion-childpage"},e.createElement(Sa,{block:i,href:r,link:n,query:s},e.createElement("span",{className:"rotion-childpage-icon"},e.createElement("img",{className:"rotion-childpage-icon-img",src:i.page.icon.src,alt:"Icon"})),e.createElement("div",null,e.createElement("span",{className:"rotion-childpage-title"},a))))};function Ma(e,t,i,r){return new(i||(i=Promise))((function(n,s){function a(e){try{l(r.next(e))}catch(e){s(e)}}function o(e){try{l(r.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?n(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(a,o)}l((r=r.apply(e,t||[])).next())}))}function _a(e,t){var i,r,n,s={label:0,sent:function(){if(1&n[0])throw n[1];return n[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=o(0),a.throw=o(1),a.return=o(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(o){return function(l){return function(o){if(i)throw new TypeError("Generator is already executing.");for(;a&&(a=0,o[0]&&(s=0)),s;)try{if(i=1,r&&(n=2&o[0]?r.return:o[0]?r.throw||((n=r.return)&&n.call(r),0):r.next)&&!(n=n.call(r,o[1])).done)return n;switch(r=0,n&&(o=[2&o[0],n.value]),o[0]){case 0:case 1:n=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!(n=s.trys,(n=n.length>0&&n[n.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!n||o[1]>n[0]&&o[1]<n[3])){s.label=o[1];break}if(6===o[0]&&s.label<n[1]){s.label=n[1],n=o;break}if(n&&s.label<n[2]){s.label=n[2],s.ops.push(o);break}n[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],r=0}finally{i=n=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,l])}}}"function"==typeof SuppressedError&&SuppressedError;var Ta;Ta||(Ta=1,function(){if("undefined"!=typeof Prism&&"undefined"!=typeof document){var e={javascript:"clike",actionscript:"javascript",apex:["clike","sql"],arduino:"cpp",aspnet:["markup","csharp"],birb:"clike",bison:"c",c:"clike",csharp:"clike",cpp:"c",cfscript:"clike",chaiscript:["clike","cpp"],cilkc:"c",cilkcpp:"cpp",coffeescript:"javascript",crystal:"ruby","css-extras":"css",d:"clike",dart:"clike",django:"markup-templating",ejs:["javascript","markup-templating"],etlua:["lua","markup-templating"],erb:["ruby","markup-templating"],fsharp:"clike","firestore-security-rules":"clike",flow:"javascript",ftl:"markup-templating",gml:"clike",glsl:"c",go:"clike",gradle:"clike",groovy:"clike",haml:"ruby",handlebars:"markup-templating",haxe:"clike",hlsl:"c",idris:"haskell",java:"clike",javadoc:["markup","java","javadoclike"],jolie:"clike",jsdoc:["javascript","javadoclike","typescript"],"js-extras":"javascript",json5:"json",jsonp:"json","js-templates":"javascript",kotlin:"clike",latte:["clike","markup-templating","php"],less:"css",lilypond:"scheme",liquid:"markup-templating",markdown:"markup","markup-templating":"markup",mongodb:"javascript",n4js:"javascript",objectivec:"c",opencl:"c",parser:"markup",php:"markup-templating",phpdoc:["php","javadoclike"],"php-extras":"php",plsql:"sql",processing:"clike",protobuf:"clike",pug:["markup","javascript"],purebasic:"clike",purescript:"haskell",qsharp:"clike",qml:"javascript",qore:"clike",racket:"scheme",cshtml:["markup","csharp"],jsx:["markup","javascript"],tsx:["jsx","typescript"],reason:"clike",ruby:"clike",sass:"css",scss:"css",scala:"java","shell-session":"bash",smarty:"markup-templating",solidity:"clike",soy:"markup-templating",sparql:"turtle",sqf:"clike",squirrel:"clike",stata:["mata","java","python"],"t4-cs":["t4-templating","csharp"],"t4-vb":["t4-templating","vbnet"],tap:"yaml",tt2:["clike","markup-templating"],textile:"markup",twig:"markup-templating",typescript:"javascript",v:"clike",vala:"clike",vbnet:"basic",velocity:"markup",wiki:"markup",xeora:"markup","xml-doc":"markup",xquery:"markup"},t={html:"markup",xml:"markup",svg:"markup",mathml:"markup",ssml:"markup",atom:"markup",rss:"markup",js:"javascript",g4:"antlr4",ino:"arduino","arm-asm":"armasm",art:"arturo",adoc:"asciidoc",avs:"avisynth",avdl:"avro-idl",gawk:"awk",sh:"bash",shell:"bash",shortcode:"bbcode",rbnf:"bnf",oscript:"bsl",cs:"csharp",dotnet:"csharp",cfc:"cfscript","cilk-c":"cilkc","cilk-cpp":"cilkcpp",cilk:"cilkcpp",coffee:"coffeescript",conc:"concurnas",jinja2:"django","dns-zone":"dns-zone-file",dockerfile:"docker",gv:"dot",eta:"ejs",xlsx:"excel-formula",xls:"excel-formula",gamemakerlanguage:"gml",po:"gettext",gni:"gn",ld:"linker-script","go-mod":"go-module",hbs:"handlebars",mustache:"handlebars",hs:"haskell",idr:"idris",gitignore:"ignore",hgignore:"ignore",npmignore:"ignore",webmanifest:"json",kt:"kotlin",kts:"kotlin",kum:"kumir",tex:"latex",context:"latex",ly:"lilypond",emacs:"lisp",elisp:"lisp","emacs-lisp":"lisp",md:"markdown",moon:"moonscript",n4jsd:"n4js",nani:"naniscript",objc:"objectivec",qasm:"openqasm",objectpascal:"pascal",px:"pcaxis",pcode:"peoplecode",plantuml:"plant-uml",pq:"powerquery",mscript:"powerquery",pbfasm:"purebasic",purs:"purescript",py:"python",qs:"qsharp",rkt:"racket",razor:"cshtml",rpy:"renpy",res:"rescript",robot:"robotframework",rb:"ruby","sh-session":"shell-session",shellsession:"shell-session",smlnj:"sml",sol:"solidity",sln:"solution-file",rq:"sparql",sclang:"supercollider",t4:"t4-cs",trickle:"tremor",troy:"tremor",trig:"turtle",ts:"typescript",tsconfig:"typoscript",uscript:"unrealscript",uc:"unrealscript",url:"uri",vb:"visual-basic",vba:"visual-basic",webidl:"web-idl",mathematica:"wolfram",nb:"wolfram",wl:"wolfram",xeoracube:"xeora",yml:"yaml"},i={},r="components/",n=Prism.util.currentScript();if(n){var s=/\bplugins\/autoloader\/prism-autoloader\.(?:min\.)?js(?:\?[^\r\n/]*)?$/i,a=/(^|\/)[\w-]+\.(?:min\.)?js(?:\?[^\r\n/]*)?$/i,o=n.getAttribute("data-autoloader-path");if(null!=o)r=o.trim().replace(/\/?$/,"/");else{var l=n.src;s.test(l)?r=l.replace(s,"components/"):a.test(l)&&(r=l.replace(a,"$1components/"))}}var h=Prism.plugins.autoloader={languages_path:r,use_minified:!0,loadLanguages:d};Prism.hooks.add("complete",(function(e){var t=e.element,i=e.language;if(t&&i&&"none"!==i){var r=function(e){var t=(e.getAttribute("data-dependencies")||"").trim();if(!t){var i=e.parentElement;i&&"pre"===i.tagName.toLowerCase()&&(t=(i.getAttribute("data-dependencies")||"").trim())}return t?t.split(/\s*,\s*/g):[]}(t);/^diff-./i.test(i)?(r.push("diff"),r.push(i.substr(5))):r.push(i),r.every(c)||d(r,(function(){Prism.highlightElement(t)}))}}))}function c(e){if(e.indexOf("!")>=0)return!1;if((e=t[e]||e)in Prism.languages)return!0;var r=i[e];return r&&!r.error&&!1===r.loading}function d(r,n,s){"string"==typeof r&&(r=[r]);var a=r.length,o=0,l=!1;function p(){l||++o===a&&n&&n(r)}0!==a?r.forEach((function(r){!function(r,n,s){var a=r.indexOf("!")>=0;function o(){var e=i[r];e||(e=i[r]={callbacks:[]}),e.callbacks.push({success:n,error:s}),!a&&c(r)?u(r,"success"):!a&&e.error?u(r,"error"):!a&&e.loading||(e.loading=!0,e.error=!1,function(e,t,i){var r=document.createElement("script");r.src=e,r.async=!0,r.onload=function(){document.body.removeChild(r),t&&t()},r.onerror=function(){document.body.removeChild(r),i&&i()},document.body.appendChild(r)}(function(e){return h.languages_path+"prism-"+e+(h.use_minified?".min":"")+".js"}(r),(function(){e.loading=!1,u(r,"success")}),(function(){e.loading=!1,e.error=!0,u(r,"error")})))}r=r.replace("!","");var l=e[r=t[r]||r];l&&l.length?d(l,o,s):o()}(r,p,(function(){l||(l=!0,s&&s(r))}))})):n&&setTimeout(n,0)}function u(e,t){if(i[e]){for(var r=i[e].callbacks,n=0,s=r.length;n<s;n++){var a=r[n][t];a&&setTimeout(a,0)}r.length=0}}}()),a.plugins.autoloader&&(a.plugins.autoloader.languages_path="https://unpkg.com/prismjs@1.29.0/components/");var Na=function(i){var n=i.children,o=i.language,l=void 0===o?"text":o,h=function(){return window.matchMedia("(prefers-color-scheme: dark)").matches},c=e.createRef(),d=function(e){return Ma(void 0,void 0,void 0,(function(){return _a(this,(function(t){return c.current&&("mermaid"===e?(s.initialize({theme:h()?"dark":"neutral"}),s.init(void 0,c.current)):(!function(){var e="prism-theme",t=window.document.getElementById(e);if(t&&"href"in t)t.href="https://unpkg.com/prismjs@1.29.0/themes/".concat(h()?"prism-tomorrow.min.css":"prism.min.css");else{var i=window.document.createElement("link");i.rel="stylesheet",i.id=e,i.href="https://unpkg.com/prismjs@1.29.0/themes/".concat(h()?"prism-tomorrow.min.css":"prism.min.css"),window.document.head.appendChild(i)}}(),a.highlightElement(c.current))),[2]}))}))},u="mermaid"===l?"mermaid":"language-".concat(l.toLowerCase()),p=t(!1),m=p[0],g=p[1];return r((function(){d(l)}),[l,""]),e.createElement("div",{className:"rotion-code-area",onMouseOver:function(){return g(!0)},onMouseOut:function(){return g(!1)}},m&&e.createElement("div",{className:"rotion-code-lang"},l),e.createElement("pre",{className:u},e.createElement("code",{ref:c},n)))},Ia=function(t){var i,r,n=t.block,s=null===(i=n.code)||void 0===i?void 0:i.rich_text.map((function(t,i){var r,s=t;return e.createElement(Na,{language:(null===(r=n.code)||void 0===r?void 0:r.language)||"",key:"".concat(i)},s.text.content)})),a=null===(r=n.code)||void 0===r?void 0:r.caption.map((function(t,i){return e.createElement(gs,{textObject:t,key:"".concat(i)})}));return e.createElement("div",{className:"rotion-code"},s,e.createElement("div",{className:"rotion-code-caption"},a))},La=function(t){var i=t.block,r=t.href,n=t.link,s=t.query,a=i.columns.map((function(t,i){return e.createElement("div",{key:i,className:"rotion-columnlist-column"},e.createElement(vu,{blocks:t,href:r,link:n,query:s}))})),o=a.length,l={gridTemplate:"repeat(1, 1fr) / repeat(".concat(o,", 1fr)")};return e.createElement("div",{className:"rotion-columnlist",style:l},a)},Pa=function(t){var i=t.type,r=t.caption;return e.createElement("div",{className:"rotion-".concat(i,"-caption")},r.map((function(t,i){return e.createElement(gs,{textObject:t,key:"richtext-".concat(i)})})))},Ra=function(t){var i=t.html,n=t.caption,s=i.replace(/<script>.*/,""),a="rotion-embed-html";return r((function(){var e=document.createElement("script");e.src="https://www.instagram.com/embed.js",document.getElementsByClassName(a)[0].appendChild(e),window.instgrm&&window.instgrm.Embeds.process()}),[]),e.createElement("div",{className:"rotion-embed"},e.createElement("div",{className:"rotion-embed-instagram"},e.createElement("div",{className:a,dangerouslySetInnerHTML:{__html:s}}),e.createElement(Pa,{type:"embed",caption:n})))},Da=function(t){var i=t.html,n=t.caption,s=i.replace(/<script>.*/,""),a="rotion-embed-html";return r((function(){var e=document.createElement("script");e.src="https://platform.twitter.com/widgets.js",document.getElementsByClassName(a)[0].appendChild(e)}),[]),e.createElement("div",{className:"rotion-embed"},e.createElement("div",{className:"rotion-embed-twitter"},e.createElement("div",{className:a,dangerouslySetInnerHTML:{__html:s}}),e.createElement(Pa,{type:"embed",caption:n})))},za=function(t){var i=t.html,n=t.caption,s=i.replace(/<script>.*/,""),a="rotion-embed-html";return r((function(){var e=document.createElement("script");e.src="https://www.tiktok.com/embed.js",document.getElementsByClassName(a)[0].appendChild(e)}),[]),e.createElement("div",{className:"rotion-embed"},e.createElement("div",{className:"rotion-embed-tiktok"},e.createElement("div",{className:a,dangerouslySetInnerHTML:{__html:s}}),e.createElement(Pa,{type:"embed",caption:n})))},Fa=function(t){var i=t.type,r=t.html,n=t.caption;return e.createElement("div",{className:"rotion-embed"},e.createElement("div",{className:"rotion-embed-".concat(i)},e.createElement("div",{className:"rotion-embed-html",dangerouslySetInnerHTML:{__html:r}}),e.createElement(Pa,{type:"embed",caption:n})))},Oa=function(t){var i=t.block,r=i.embed,n=r.html,s=r.caption;return void 0===n||""===n?(console.log("The html property for this embed block was undefined:",i),e.createElement(e.Fragment,null)):n.includes("instagram")?e.createElement(Ra,{html:n,caption:s}):n.includes("twitter")?e.createElement(Da,{html:n,caption:s}):n.includes("tiktok")?e.createElement(za,{html:n,caption:s}):n.includes("speakerdeck")?e.createElement(Fa,{type:"speakerdeck",html:n,caption:s}):n.includes("slideshare")?e.createElement(Fa,{type:"slideshare",html:n,caption:s}):n.includes("music.apple.com")?e.createElement(Fa,{type:"applemusic",html:n,caption:s}):n.includes("google")?e.createElement(Fa,{type:"googlemap",html:n,caption:s}):e.createElement("div",{className:"rotion-embed"},e.createElement("div",{className:"rotion-embed-html",dangerouslySetInnerHTML:{__html:n}}),e.createElement(Pa,{type:"embed",caption:s}))},Ba=function(t){var r=t.block.equation.expression,n=i((function(){return ps(r,{throwOnError:!1,output:"mathml"})}),[r]);return e.createElement("div",{className:"rotion-equation"},e.createElement("div",{className:"rotion-equation-html",dangerouslySetInnerHTML:{__html:n}}))},Ha=function(t){var i=t.block.file,r=i.size>9999?"".concat((Math.ceil(i.size/1024/1e3*10)/10).toFixed(1),"MB"):"".concat((Math.ceil(i.size/1024*10)/10).toFixed(1),"KB");return e.createElement("div",{className:"rotion-file"},e.createElement("a",{href:i.src,target:"_blank",className:"rotion-file-link",rel:"noreferrer"},e.createElement(l,{name:"file"}),e.createElement("span",null,i.name,e.createElement("span",{className:"rotion-file-size"},r))),i.caption.length>0&&e.createElement("div",{className:"rotion-file-caption"},i.caption.map((function(t,i){return e.createElement(gs,{textObject:t,key:"richtext-".concat(i)})}))))},qa=function(t){var i=t.tag,r=t.block;if("divider"===r.type)return e.createElement("div",{className:"rotion-text-hr"});var n={hr:"hr",heading_1:"h1",heading_2:"h2",heading_3:"h3",paragraph:"p",quote:"quote"},s=i,a=["rotion-text"];r.type in n&&a.push("rotion-text-".concat(n[r.type]));var o=r[r.type].rich_text;return e.createElement(s,{className:a.join(" ")},o.map((function(t,i){return e.createElement(gs,{textObject:t,key:"richtext-".concat(i)})})))},ja=function(t){var i,r=t.block,n="rotion-image-ratio-unknown";if(r.image&&r.image.width&&r.image.height){var s=r.image;n=s.width>s.height?"rotion-image-ratio-landscape":"rotion-image-ratio-portrait"}return e.createElement("div",{className:"rotion-image"},e.createElement("div",{className:"rotion-image-area"},e.createElement("img",{className:"rotion-image-img ".concat(n),src:null===(i=r.image)||void 0===i?void 0:i.src,alt:"Image"})),e.createElement("div",{className:"rotion-image-caption"},r.image.caption.map((function(t,i){return e.createElement(gs,{textObject:t,key:"richtext-".concat(i)})}))))},Va=function(t){var i=t.url,r=t.github;if(void 0===r){var n=i.match(/github\.com\/(\w+)\/(\w+)/),s=n?n[1]:"",a=n?n[2]:"";return e.createElement("div",{className:"rotion-linkpreview-area rotion-linkpreview-github"},e.createElement("div",{className:"rotion-linkpreview-icon"},e.createElement(l,{name:"github",width:"32px",height:"32px"})),e.createElement("div",null,e.createElement("span",{className:"rotion-linkpreview-title"},s,"/",a),e.createElement("span",{className:"rotion-linkpreview-desc"},"Repository in Github")))}var o=se().handler(oe).cdateFn();if("issue"===r.type){var h=r.issue,c=h.title,d=h.login,u=h.number,p=h.created_at,m=h.closed_at,g=h.merged_at,f=h.state,b=h.avatar_src,v=g||m||p,y="merged"===f?"codemerge":"closed"===f?"circlecheck":"circledot",w="rotion-linkpreview-github-state-icon rotion-linkpreview-issue-".concat(f);return e.createElement("div",{className:"rotion-linkpreview-area rotion-linkpreview-github"},e.createElement("div",{className:"rotion-linkpreview-githubicon"},e.createElement("img",{className:"rotion-linkpreview-githubicon-user",src:b,width:"32px",height:"32px"}),e.createElement(l,{className:"rotion-linkpreview-githubicon-octocat",name:"github",width:"15px",height:"15px"})),e.createElement("div",null,e.createElement("div",{className:"rotion-linkpreview-title"},e.createElement("span",{className:"rotion-linkpreview-github-title"},c),e.createElement("span",{className:"rotion-linkpreview-github-state"},e.createElement(l,{className:w,name:y,width:"14px",height:"14px"}),e.createElement("span",{className:"rotion-linkpreview-state"},f))),e.createElement("div",{className:"rotion-linkpreview-desc"},e.createElement(l,{className:w,name:y,width:"12px",height:"12px"})," #",u,e.createElement("span",{className:"rotion-linkpreview-dot"},"•"),d,e.createElement("span",{className:"rotion-linkpreview-dot"},"•"),e.createElement("span",{className:"rotion-linkpreview-state"},f)," ",e.createElement("span",{title:v},o(v).format("F")))))}if("repo"===r.type){var x=r.repo,A=(b=x.avatar_src,x.name),k=(d=x.login,x.updated_at);return e.createElement("div",{className:"rotion-linkpreview-area rotion-linkpreview-github"},e.createElement("div",{className:"rotion-linkpreview-githubicon"},e.createElement("img",{className:"rotion-linkpreview-githubicon-user",src:b,width:"32px",height:"32px"}),e.createElement(l,{className:"rotion-linkpreview-githubicon-octocat",name:"github",width:"15px",height:"15px"})),e.createElement("div",null,e.createElement("div",{className:"rotion-linkpreview-title"},e.createElement("span",{className:"rotion-linkpreview-github-title"},A)),e.createElement("div",{className:"rotion-linkpreview-desc"},d,e.createElement("span",{className:"rotion-linkpreview-dot"},"•"),e.createElement("span",{title:k},"Updated ",o(k).format("F")))))}},Ua=function(t){var i=t.url.replace("https://","").split("/")[0];return e.createElement("div",{className:"rotion-linkpreview-area rotion-linkpreview-slack"},e.createElement("div",{className:"rotion-linkpreview-icon"},e.createElement(l,{name:"slack",width:"32px",height:"32px"})),e.createElement("div",null,e.createElement("span",{className:"rotion-linkpreview-title"},"Message in Slack"),e.createElement("span",{className:"rotion-linkpreview-desc"},i)))},Ga=function(t){var i=t.url.split("/"),r=i[i.length-1].split("?")[0].replace("-"," ");return e.createElement("div",{className:"rotion-linkpreview-area rotion-linkpreview-figma"},e.createElement("div",{className:"rotion-linkpreview-icon"},e.createElement(l,{name:"figma",width:"21px",height:"32px"})),e.createElement("div",null,e.createElement("span",{className:"rotion-linkpreview-title"},r),e.createElement("span",{className:"rotion-linkpreview-desc"},"Assets in Figma")))},$a=function(t){var i,r=t.block;if(!r.link_preview)return e.createElement(e.Fragment,null);var n=r.link_preview,s=n.url;return s.includes("figma.com")&&n.figma?e.createElement("div",{className:"rotion-linkpreview-figma",dangerouslySetInnerHTML:{__html:null===(i=n.figma)||void 0===i?void 0:i.html}}):e.createElement("div",{className:"rotion-linkpreview"},e.createElement("a",{className:"rotion-linkpreview-link",href:s,rel:"noreferrer",target:"_blank"},s.includes("github.com")&&e.createElement(Va,{url:s,github:n.github}),s.includes("slack.com")&&e.createElement(Ua,{url:s}),s.includes("figma.com")&&e.createElement(Ga,{url:s}),!s.includes("github.com")&&!s.includes("slack.com")&&!s.includes("figma.com")&&"".concat(s)))},Wa=function(t){var i,r=t.block,n=t.href,s=t.link,a=t.query,o=fu[r.type],l=null===(i=r[r.type])||void 0===i?void 0:i.rich_text;return r.has_children&&void 0!==r.children?e.createElement(o,{key:r.id,className:"rotion-numbered-list"},l.map((function(t,i){return e.createElement(gs,{textObject:t,key:"richtext-".concat(i)})})),e.createElement(vu,{blocks:r.children,href:n,link:s,query:a})):e.createElement(o,{className:"rotion-numbered-list"},l.map((function(t,i){return e.createElement(gs,{textObject:t,key:"richtext-".concat(i)})})))},Xa={d:(e,t)=>{for(var i in t)Xa.o(t,i)&&!Xa.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)},Ya=globalThis.pdfjsLib={};Xa.d(Ya,{AbortException:()=>ll,AnnotationEditorLayer:()=>Jd,AnnotationEditorParamsType:()=>co,AnnotationEditorType:()=>ho,AnnotationEditorUIManager:()=>Wl,AnnotationLayer:()=>Pd,AnnotationMode:()=>lo,ColorPicker:()=>Vd,DOMSVGFactory:()=>td,DrawLayer:()=>Qd,FeatureTest:()=>ul,GlobalWorkerOptions:()=>tc,ImageKind:()=>yo,InvalidPDFException:()=>nl,MissingPDFException:()=>sl,OPS:()=>Uo,OutputScale:()=>Ol,PDFDataRangeTransport:()=>Bc,PDFDateString:()=>Ll,PDFWorker:()=>Vc,PasswordResponses:()=>Go,PermissionFlag:()=>uo,PixelsPerInch:()=>wl,RenderingCancelledException:()=>kl,TextLayer:()=>Tc,TouchManager:()=>Yl,UnexpectedResponseException:()=>al,Util:()=>ml,VerbosityLevel:()=>Vo,XfaLayer:()=>id,build:()=>Kc,createValidAbsoluteUrl:()=>Qo,fetchData:()=>xl,getDocument:()=>zc,getFilenameFromUrl:()=>Cl,getPdfFilenameFromUrl:()=>Ml,getXfaPageViewport:()=>Pl,isDataScheme:()=>El,isPdfFile:()=>Sl,noContextMenu:()=>Nl,normalizeUnicode:()=>bl,setLayerDimensions:()=>Fl,shadow:()=>el,stopEvent:()=>Il,version:()=>Yc});const Ka=!("object"!=typeof process||process+""!="[object process]"||process.versions.nw||process.versions.electron&&process.type&&"browser"!==process.type),Za=[1,0,0,1,0,0],Ja=[.001,0,0,.001,0,0],Qa=1.35,eo=1,to=2,io=4,ro=16,no=32,so=64,ao=128,oo=256,lo={DISABLE:0,ENABLE:1,ENABLE_FORMS:2,ENABLE_STORAGE:3},ho={DISABLE:-1,NONE:0,FREETEXT:3,HIGHLIGHT:9,STAMP:13,INK:15},co={RESIZE:1,CREATE:2,FREETEXT_SIZE:11,FREETEXT_COLOR:12,FREETEXT_OPACITY:13,INK_COLOR:21,INK_THICKNESS:22,INK_OPACITY:23,HIGHLIGHT_COLOR:31,HIGHLIGHT_DEFAULT_COLOR:32,HIGHLIGHT_THICKNESS:33,HIGHLIGHT_FREE:34,HIGHLIGHT_SHOW_ALL:35,DRAW_STEP:41},uo={PRINT:4,MODIFY_CONTENTS:8,COPY:16,MODIFY_ANNOTATIONS:32,FILL_INTERACTIVE_FORMS:256,COPY_FOR_ACCESSIBILITY:512,ASSEMBLE:1024,PRINT_HIGH_QUALITY:2048},po=0,mo=1,go=2,fo=3,bo=3,vo=4,yo={GRAYSCALE_1BPP:1,RGB_24BPP:2,RGBA_32BPP:3},wo=1,xo=2,Ao=3,ko=4,Eo=5,So=6,Co=7,Mo=8,_o=9,To=10,No=11,Io=12,Lo=13,Po=14,Ro=15,Do=16,zo=17,Fo=20,Oo=1,Bo=2,Ho=3,qo=4,jo=5,Vo={ERRORS:0,WARNINGS:1,INFOS:5},Uo={dependency:1,setLineWidth:2,setLineCap:3,setLineJoin:4,setMiterLimit:5,setDash:6,setRenderingIntent:7,setFlatness:8,setGState:9,save:10,restore:11,transform:12,moveTo:13,lineTo:14,curveTo:15,curveTo2:16,curveTo3:17,closePath:18,rectangle:19,stroke:20,closeStroke:21,fill:22,eoFill:23,fillStroke:24,eoFillStroke:25,closeFillStroke:26,closeEOFillStroke:27,endPath:28,clip:29,eoClip:30,beginText:31,endText:32,setCharSpacing:33,setWordSpacing:34,setHScale:35,setLeading:36,setFont:37,setTextRenderingMode:38,setTextRise:39,moveText:40,setLeadingMoveText:41,setTextMatrix:42,nextLine:43,showText:44,showSpacedText:45,nextLineShowText:46,nextLineSetSpacingShowText:47,setCharWidth:48,setCharWidthAndBounds:49,setStrokeColorSpace:50,setFillColorSpace:51,setStrokeColor:52,setStrokeColorN:53,setFillColor:54,setFillColorN:55,setStrokeGray:56,setFillGray:57,setStrokeRGBColor:58,setFillRGBColor:59,setStrokeCMYKColor:60,setFillCMYKColor:61,shadingFill:62,beginInlineImage:63,beginImageData:64,endInlineImage:65,paintXObject:66,markPoint:67,markPointProps:68,beginMarkedContent:69,beginMarkedContentProps:70,endMarkedContent:71,beginCompat:72,endCompat:73,paintFormXObjectBegin:74,paintFormXObjectEnd:75,beginGroup:76,endGroup:77,beginAnnotation:80,endAnnotation:81,paintImageMaskXObject:83,paintImageMaskXObjectGroup:84,paintImageXObject:85,paintInlineImageXObject:86,paintInlineImageXObjectGroup:87,paintImageXObjectRepeat:88,paintImageMaskXObjectRepeat:89,paintSolidColorImageMask:90,constructPath:91,setStrokeTransparent:92,setFillTransparent:93},Go={NEED_PASSWORD:1,INCORRECT_PASSWORD:2};let $o=Vo.WARNINGS;function Wo(e){Number.isInteger(e)&&($o=e)}function Xo(){return $o}function Yo(e){$o>=Vo.INFOS&&console.log(`Info: ${e}`)}function Ko(e){$o>=Vo.WARNINGS&&console.log(`Warning: ${e}`)}function Zo(e){throw new Error(e)}function Jo(e,t){e||Zo(t)}function Qo(e,t=null,i=null){if(!e)return null;try{if(i&&"string"==typeof e){if(i.addDefaultProtocol&&e.startsWith("www.")){const t=e.match(/\./g);t?.length>=2&&(e=`http://${e}`)}if(i.tryConvertEncoding)try{e=decodeURIComponent(escape(e))}catch{}}const r=t?new URL(e,t):new URL(e);if(function(e){switch(e?.protocol){case"http:":case"https:":case"ftp:":case"mailto:":case"tel:":return!0;default:return!1}}(r))return r}catch{}return null}function el(e,t,i,r=!1){return Object.defineProperty(e,t,{value:i,enumerable:!r,configurable:!0,writable:!1}),i}const tl=function(){function e(e,t){this.message=e,this.name=t}return e.prototype=new Error,e.constructor=e,e}();class il extends tl{constructor(e,t){super(e,"PasswordException"),this.code=t}}class rl extends tl{constructor(e,t){super(e,"UnknownErrorException"),this.details=t}}class nl extends tl{constructor(e){super(e,"InvalidPDFException")}}class sl extends tl{constructor(e){super(e,"MissingPDFException")}}class al extends tl{constructor(e,t){super(e,"UnexpectedResponseException"),this.status=t}}class ol extends tl{constructor(e){super(e,"FormatError")}}class ll extends tl{constructor(e){super(e,"AbortException")}}function hl(e){"object"==typeof e&&void 0!==e?.length||Zo("Invalid argument for bytesToString");const t=e.length,i=8192;if(t<i)return String.fromCharCode.apply(null,e);const r=[];for(let n=0;n<t;n+=i){const s=Math.min(n+i,t),a=e.subarray(n,s);r.push(String.fromCharCode.apply(null,a))}return r.join("")}function cl(e){"string"!=typeof e&&Zo("Invalid argument for stringToBytes");const t=e.length,i=new Uint8Array(t);for(let r=0;r<t;++r)i[r]=255&e.charCodeAt(r);return i}function dl(e){const t=Object.create(null);for(const[i,r]of e)t[i]=r;return t}class ul{static get isLittleEndian(){return el(this,"isLittleEndian",function(){const e=new Uint8Array(4);return e[0]=1,1===new Uint32Array(e.buffer,0,1)[0]}())}static get isEvalSupported(){return el(this,"isEvalSupported",function(){try{return new Function(""),!0}catch{return!1}}())}static get isOffscreenCanvasSupported(){return el(this,"isOffscreenCanvasSupported","undefined"!=typeof OffscreenCanvas)}static get isImageDecoderSupported(){return el(this,"isImageDecoderSupported","undefined"!=typeof ImageDecoder)}static get platform(){return"undefined"!=typeof navigator&&"string"==typeof navigator?.platform?el(this,"platform",{isMac:navigator.platform.includes("Mac"),isWindows:navigator.platform.includes("Win"),isFirefox:"string"==typeof navigator?.userAgent&&navigator.userAgent.includes("Firefox")}):el(this,"platform",{isMac:!1,isWindows:!1,isFirefox:!1})}static get isCSSRoundSupported(){return el(this,"isCSSRoundSupported",globalThis.CSS?.supports?.("width: round(1.5px, 1px)"))}}const pl=Array.from(Array(256).keys(),(e=>e.toString(16).padStart(2,"0")));class ml{static makeHexColor(e,t,i){return`#${pl[e]}${pl[t]}${pl[i]}`}static scaleMinMax(e,t){let i;e[0]?(e[0]<0&&(i=t[0],t[0]=t[2],t[2]=i),t[0]*=e[0],t[2]*=e[0],e[3]<0&&(i=t[1],t[1]=t[3],t[3]=i),t[1]*=e[3],t[3]*=e[3]):(i=t[0],t[0]=t[1],t[1]=i,i=t[2],t[2]=t[3],t[3]=i,e[1]<0&&(i=t[1],t[1]=t[3],t[3]=i),t[1]*=e[1],t[3]*=e[1],e[2]<0&&(i=t[0],t[0]=t[2],t[2]=i),t[0]*=e[2],t[2]*=e[2]),t[0]+=e[4],t[1]+=e[5],t[2]+=e[4],t[3]+=e[5]}static transform(e,t){return[e[0]*t[0]+e[2]*t[1],e[1]*t[0]+e[3]*t[1],e[0]*t[2]+e[2]*t[3],e[1]*t[2]+e[3]*t[3],e[0]*t[4]+e[2]*t[5]+e[4],e[1]*t[4]+e[3]*t[5]+e[5]]}static applyTransform(e,t){return[e[0]*t[0]+e[1]*t[2]+t[4],e[0]*t[1]+e[1]*t[3]+t[5]]}static applyInverseTransform(e,t){const i=t[0]*t[3]-t[1]*t[2];return[(e[0]*t[3]-e[1]*t[2]+t[2]*t[5]-t[4]*t[3])/i,(-e[0]*t[1]+e[1]*t[0]+t[4]*t[1]-t[5]*t[0])/i]}static getAxialAlignedBoundingBox(e,t){const i=this.applyTransform(e,t),r=this.applyTransform(e.slice(2,4),t),n=this.applyTransform([e[0],e[3]],t),s=this.applyTransform([e[2],e[1]],t);return[Math.min(i[0],r[0],n[0],s[0]),Math.min(i[1],r[1],n[1],s[1]),Math.max(i[0],r[0],n[0],s[0]),Math.max(i[1],r[1],n[1],s[1])]}static inverseTransform(e){const t=e[0]*e[3]-e[1]*e[2];return[e[3]/t,-e[1]/t,-e[2]/t,e[0]/t,(e[2]*e[5]-e[4]*e[3])/t,(e[4]*e[1]-e[5]*e[0])/t]}static singularValueDecompose2dScale(e){const t=[e[0],e[2],e[1],e[3]],i=e[0]*t[0]+e[1]*t[2],r=e[0]*t[1]+e[1]*t[3],n=e[2]*t[0]+e[3]*t[2],s=e[2]*t[1]+e[3]*t[3],a=(i+s)/2,o=Math.sqrt((i+s)**2-4*(i*s-n*r))/2,l=a+o||1,h=a-o||1;return[Math.sqrt(l),Math.sqrt(h)]}static normalizeRect(e){const t=e.slice(0);return e[0]>e[2]&&(t[0]=e[2],t[2]=e[0]),e[1]>e[3]&&(t[1]=e[3],t[3]=e[1]),t}static intersect(e,t){const i=Math.max(Math.min(e[0],e[2]),Math.min(t[0],t[2])),r=Math.min(Math.max(e[0],e[2]),Math.max(t[0],t[2]));if(i>r)return null;const n=Math.max(Math.min(e[1],e[3]),Math.min(t[1],t[3])),s=Math.min(Math.max(e[1],e[3]),Math.max(t[1],t[3]));return n>s?null:[i,n,r,s]}static#e(e,t,i,r,n,s,a,o,l,h){if(l<=0||l>=1)return;const c=1-l,d=l*l,u=d*l,p=c*(c*(c*e+3*l*t)+3*d*i)+u*r,m=c*(c*(c*n+3*l*s)+3*d*a)+u*o;h[0]=Math.min(h[0],p),h[1]=Math.min(h[1],m),h[2]=Math.max(h[2],p),h[3]=Math.max(h[3],m)}static#t(e,t,i,r,n,s,a,o,l,h,c,d){if(Math.abs(l)<1e-12)return void(Math.abs(h)>=1e-12&&this.#e(e,t,i,r,n,s,a,o,-c/h,d));const u=h**2-4*c*l;if(u<0)return;const p=Math.sqrt(u),m=2*l;this.#e(e,t,i,r,n,s,a,o,(-h+p)/m,d),this.#e(e,t,i,r,n,s,a,o,(-h-p)/m,d)}static bezierBoundingBox(e,t,i,r,n,s,a,o,l){return l?(l[0]=Math.min(l[0],e,a),l[1]=Math.min(l[1],t,o),l[2]=Math.max(l[2],e,a),l[3]=Math.max(l[3],t,o)):l=[Math.min(e,a),Math.min(t,o),Math.max(e,a),Math.max(t,o)],this.#t(e,i,n,a,t,r,s,o,3*(3*(i-n)-e+a),6*(e-2*i+n),3*(i-e),l),this.#t(e,i,n,a,t,r,s,o,3*(3*(r-s)-t+o),6*(t-2*r+s),3*(r-t),l),l}}let gl=null,fl=null;function bl(e){return gl||(gl=/([\u00a0\u00b5\u037e\u0eb3\u2000-\u200a\u202f\u2126\ufb00-\ufb04\ufb06\ufb20-\ufb36\ufb38-\ufb3c\ufb3e\ufb40-\ufb41\ufb43-\ufb44\ufb46-\ufba1\ufba4-\ufba9\ufbae-\ufbb1\ufbd3-\ufbdc\ufbde-\ufbe7\ufbea-\ufbf8\ufbfc-\ufbfd\ufc00-\ufc5d\ufc64-\ufcf1\ufcf5-\ufd3d\ufd88\ufdf4\ufdfa-\ufdfb\ufe71\ufe77\ufe79\ufe7b\ufe7d]+)|(\ufb05+)/gu,fl=new Map([["ſt","ſt"]])),e.replaceAll(gl,((e,t,i)=>t?t.normalize("NFKC"):fl.get(i)))}const vl="pdfjs_internal_id_";"function"!=typeof Promise.try&&(Promise.try=function(e,...t){return new Promise((i=>{i(e(...t))}))});const yl="http://www.w3.org/2000/svg";class wl{static CSS=96;static PDF=72;static PDF_TO_CSS_UNITS=this.CSS/this.PDF}async function xl(e,t="text"){if(Tl(e,document.baseURI)){const i=await fetch(e);if(!i.ok)throw new Error(i.statusText);switch(t){case"arraybuffer":return i.arrayBuffer();case"blob":return i.blob();case"json":return i.json()}return i.text()}return new Promise(((i,r)=>{const n=new XMLHttpRequest;n.open("GET",e,!0),n.responseType=t,n.onreadystatechange=()=>{if(n.readyState===XMLHttpRequest.DONE)if(200!==n.status&&0!==n.status)r(new Error(n.statusText));else{switch(t){case"arraybuffer":case"blob":case"json":return void i(n.response)}i(n.responseText)}},n.send(null)}))}class Al{constructor({viewBox:e,userUnit:t,scale:i,rotation:r,offsetX:n=0,offsetY:s=0,dontFlip:a=!1}){this.viewBox=e,this.userUnit=t,this.scale=i,this.rotation=r,this.offsetX=n,this.offsetY=s,i*=t;const o=(e[2]+e[0])/2,l=(e[3]+e[1])/2;let h,c,d,u,p,m,g,f;switch((r%=360)<0&&(r+=360),r){case 180:h=-1,c=0,d=0,u=1;break;case 90:h=0,c=1,d=1,u=0;break;case 270:h=0,c=-1,d=-1,u=0;break;case 0:h=1,c=0,d=0,u=-1;break;default:throw new Error("PageViewport: Invalid rotation, must be a multiple of 90 degrees.")}a&&(d=-d,u=-u),0===h?(p=Math.abs(l-e[1])*i+n,m=Math.abs(o-e[0])*i+s,g=(e[3]-e[1])*i,f=(e[2]-e[0])*i):(p=Math.abs(o-e[0])*i+n,m=Math.abs(l-e[1])*i+s,g=(e[2]-e[0])*i,f=(e[3]-e[1])*i),this.transform=[h*i,c*i,d*i,u*i,p-h*i*o-d*i*l,m-c*i*o-u*i*l],this.width=g,this.height=f}get rawDims(){const{userUnit:e,viewBox:t}=this,i=t.map((t=>t*e));return el(this,"rawDims",{pageWidth:i[2]-i[0],pageHeight:i[3]-i[1],pageX:i[0],pageY:i[1]})}clone({scale:e=this.scale,rotation:t=this.rotation,offsetX:i=this.offsetX,offsetY:r=this.offsetY,dontFlip:n=!1}={}){return new Al({viewBox:this.viewBox.slice(),userUnit:this.userUnit,scale:e,rotation:t,offsetX:i,offsetY:r,dontFlip:n})}convertToViewportPoint(e,t){return ml.applyTransform([e,t],this.transform)}convertToViewportRectangle(e){const t=ml.applyTransform([e[0],e[1]],this.transform),i=ml.applyTransform([e[2],e[3]],this.transform);return[t[0],t[1],i[0],i[1]]}convertToPdfPoint(e,t){return ml.applyInverseTransform([e,t],this.transform)}}class kl extends tl{constructor(e,t=0){super(e,"RenderingCancelledException"),this.extraDelay=t}}function El(e){const t=e.length;let i=0;for(;i<t&&""===e[i].trim();)i++;return"data:"===e.substring(i,i+5).toLowerCase()}function Sl(e){return"string"==typeof e&&/\.pdf$/i.test(e)}function Cl(e){return[e]=e.split(/[#?]/,1),e.substring(e.lastIndexOf("/")+1)}function Ml(e,t="document.pdf"){if("string"!=typeof e)return t;if(El(e))return Ko('getPdfFilenameFromUrl: ignore "data:"-URL for performance reasons.'),t;const i=/[^/?#=]+\.pdf\b(?!.*\.pdf\b)/i,r=/^(?:(?:[^:]+:)?\/\/[^/]+)?([^?#]*)(\?[^#]*)?(#.*)?$/.exec(e);let n=i.exec(r[1])||i.exec(r[2])||i.exec(r[3]);if(n&&(n=n[0],n.includes("%")))try{n=i.exec(decodeURIComponent(n))[0]}catch{}return n||t}class _l{started=Object.create(null);times=[];time(e){e in this.started&&Ko(`Timer is already running for ${e}`),this.started[e]=Date.now()}timeEnd(e){e in this.started||Ko(`Timer has not been started for ${e}`),this.times.push({name:e,start:this.started[e],end:Date.now()}),delete this.started[e]}toString(){const e=[];let t=0;for(const{name:e}of this.times)t=Math.max(e.length,t);for(const{name:i,start:r,end:n}of this.times)e.push(`${i.padEnd(t)} ${n-r}ms\n`);return e.join("")}}function Tl(e,t){try{const{protocol:i}=t?new URL(e,t):new URL(e);return"http:"===i||"https:"===i}catch{return!1}}function Nl(e){e.preventDefault()}function Il(e){e.preventDefault(),e.stopPropagation()}class Ll{static#i;static toDateObject(e){if(!e||"string"!=typeof e)return null;this.#i||=new RegExp("^D:(\\d{4})(\\d{2})?(\\d{2})?(\\d{2})?(\\d{2})?(\\d{2})?([Z|+|-])?(\\d{2})?'?(\\d{2})?'?");const t=this.#i.exec(e);if(!t)return null;const i=parseInt(t[1],10);let r=parseInt(t[2],10);r=r>=1&&r<=12?r-1:0;let n=parseInt(t[3],10);n=n>=1&&n<=31?n:1;let s=parseInt(t[4],10);s=s>=0&&s<=23?s:0;let a=parseInt(t[5],10);a=a>=0&&a<=59?a:0;let o=parseInt(t[6],10);o=o>=0&&o<=59?o:0;const l=t[7]||"Z";let h=parseInt(t[8],10);h=h>=0&&h<=23?h:0;let c=parseInt(t[9],10)||0;return c=c>=0&&c<=59?c:0,"-"===l?(s+=h,a+=c):"+"===l&&(s-=h,a-=c),new Date(Date.UTC(i,r,n,s,a,o))}}function Pl(e,{scale:t=1,rotation:i=0}){const{width:r,height:n}=e.attributes.style,s=[0,0,parseInt(r),parseInt(n)];return new Al({viewBox:s,userUnit:1,scale:t,rotation:i})}function Rl(e){if(e.startsWith("#")){const t=parseInt(e.slice(1),16);return[(16711680&t)>>16,(65280&t)>>8,255&t]}return e.startsWith("rgb(")?e.slice(4,-1).split(",").map((e=>parseInt(e))):e.startsWith("rgba(")?e.slice(5,-1).split(",").map((e=>parseInt(e))).slice(0,3):(Ko(`Not a valid color format: "${e}"`),[0,0,0])}function Dl(e){const{a:t,b:i,c:r,d:n,e:s,f:a}=e.getTransform();return[t,i,r,n,s,a]}function zl(e){const{a:t,b:i,c:r,d:n,e:s,f:a}=e.getTransform().invertSelf();return[t,i,r,n,s,a]}function Fl(e,t,i=!1,r=!0){if(t instanceof Al){const{pageWidth:r,pageHeight:n}=t.rawDims,{style:s}=e,a=ul.isCSSRoundSupported,o=`var(--scale-factor) * ${r}px`,l=`var(--scale-factor) * ${n}px`,h=a?`round(down, ${o}, var(--scale-round-x, 1px))`:`calc(${o})`,c=a?`round(down, ${l}, var(--scale-round-y, 1px))`:`calc(${l})`;i&&t.rotation%180!=0?(s.width=c,s.height=h):(s.width=h,s.height=c)}r&&e.setAttribute("data-main-rotation",t.rotation)}class Ol{constructor(){const e=window.devicePixelRatio||1;this.sx=e,this.sy=e}get scaled(){return 1!==this.sx||1!==this.sy}get symmetric(){return this.sx===this.sy}}class Bl{#r=null;#n=null;#s;#a=null;#o=null;static#l=null;constructor(e){this.#s=e,Bl.#l||=Object.freeze({freetext:"pdfjs-editor-remove-freetext-button",highlight:"pdfjs-editor-remove-highlight-button",ink:"pdfjs-editor-remove-ink-button",stamp:"pdfjs-editor-remove-stamp-button"})}render(){const e=this.#r=document.createElement("div");e.classList.add("editToolbar","hidden"),e.setAttribute("role","toolbar");const t=this.#s._uiManager._signal;e.addEventListener("contextmenu",Nl,{signal:t}),e.addEventListener("pointerdown",Bl.#h,{signal:t});const i=this.#a=document.createElement("div");i.className="buttons",e.append(i);const r=this.#s.toolbarPosition;if(r){const{style:t}=e,i="ltr"===this.#s._uiManager.direction?1-r[0]:r[0];t.insetInlineEnd=100*i+"%",t.top=`calc(${100*r[1]}% + var(--editor-toolbar-vert-offset))`}return this.#c(),e}get div(){return this.#r}static#h(e){e.stopPropagation()}#d(e){this.#s._focusEventsAllowed=!1,Il(e)}#u(e){this.#s._focusEventsAllowed=!0,Il(e)}#p(e){const t=this.#s._uiManager._signal;e.addEventListener("focusin",this.#d.bind(this),{capture:!0,signal:t}),e.addEventListener("focusout",this.#u.bind(this),{capture:!0,signal:t}),e.addEventListener("contextmenu",Nl,{signal:t})}hide(){this.#r.classList.add("hidden"),this.#n?.hideDropdown()}show(){this.#r.classList.remove("hidden"),this.#o?.shown()}#c(){const{editorType:e,_uiManager:t}=this.#s,i=document.createElement("button");i.className="delete",i.tabIndex=0,i.setAttribute("data-l10n-id",Bl.#l[e]),this.#p(i),i.addEventListener("click",(e=>{t.delete()}),{signal:t._signal}),this.#a.append(i)}get#m(){const e=document.createElement("div");return e.className="divider",e}async addAltText(e){const t=await e.render();this.#p(t),this.#a.prepend(t,this.#m),this.#o=e}addColorPicker(e){this.#n=e;const t=e.renderButton();this.#p(t),this.#a.prepend(t,this.#m)}remove(){this.#r.remove(),this.#n?.destroy(),this.#n=null}}class Hl{#a=null;#r=null;#g;constructor(e){this.#g=e}#f(){const e=this.#r=document.createElement("div");e.className="editToolbar",e.setAttribute("role","toolbar"),e.addEventListener("contextmenu",Nl,{signal:this.#g._signal});const t=this.#a=document.createElement("div");return t.className="buttons",e.append(t),this.#b(),e}#v(e,t){let i=0,r=0;for(const n of e){const e=n.y+n.height;if(e<i)continue;const s=n.x+(t?n.width:0);e>i?(r=s,i=e):t?s>r&&(r=s):s<r&&(r=s)}return[t?1-r:r,i]}show(e,t,i){const[r,n]=this.#v(t,i),{style:s}=this.#r||=this.#f();e.append(this.#r),s.insetInlineEnd=100*r+"%",s.top=`calc(${100*n}% + var(--editor-toolbar-vert-offset))`}hide(){this.#r.remove()}#b(){const e=document.createElement("button");e.className="highlightButton",e.tabIndex=0,e.setAttribute("data-l10n-id","pdfjs-highlight-floating-button1");const t=document.createElement("span");e.append(t),t.className="visuallyHidden",t.setAttribute("data-l10n-id","pdfjs-highlight-floating-button-label");const i=this.#g._signal;e.addEventListener("contextmenu",Nl,{signal:i}),e.addEventListener("click",(()=>{this.#g.highlightSelection("floating_button")}),{signal:i}),this.#a.append(e)}}function ql(e,t,i){for(const r of i)t.addEventListener(r,e[r].bind(e))}class jl{#y=0;get id(){return"pdfjs_internal_editor_"+this.#y++}}class Vl{#w=function(){if("function"==typeof crypto.randomUUID)return crypto.randomUUID();const e=new Uint8Array(32);return crypto.getRandomValues(e),hl(e)}();#y=0;#x=null;static get _isSVGFittingCanvas(){const e=new OffscreenCanvas(1,3).getContext("2d",{willReadFrequently:!0}),t=new Image;t.src='data:image/svg+xml;charset=UTF-8,<svg viewBox="0 0 1 1" width="1" height="1" xmlns="http://www.w3.org/2000/svg"><rect width="1" height="1" style="fill:red;"/></svg>';return el(this,"_isSVGFittingCanvas",t.decode().then((()=>(e.drawImage(t,0,0,1,1,0,0,1,3),0===new Uint32Array(e.getImageData(0,0,1,1).data.buffer)[0]))))}async#A(e,t){this.#x||=new Map;let i=this.#x.get(e);if(null===i)return null;if(i?.bitmap)return i.refCounter+=1,i;try{let e;if(i||={bitmap:null,id:`image_${this.#w}_${this.#y++}`,refCounter:0,isSvg:!1},"string"==typeof t?(i.url=t,e=await xl(t,"blob")):t instanceof File?e=i.file=t:t instanceof Blob&&(e=t),"image/svg+xml"===e.type){const t=Vl._isSVGFittingCanvas,r=new FileReader,n=new Image,s=new Promise(((e,s)=>{n.onload=()=>{i.bitmap=n,i.isSvg=!0,e()},r.onload=async()=>{const e=i.svgUrl=r.result;n.src=await t?`${e}#svgView(preserveAspectRatio(none))`:e},n.onerror=r.onerror=s}));r.readAsDataURL(e),await s}else i.bitmap=await createImageBitmap(e);i.refCounter=1}catch(e){Ko(e),i=null}return this.#x.set(e,i),i&&this.#x.set(i.id,i),i}async getFromFile(e){const{lastModified:t,name:i,size:r,type:n}=e;return this.#A(`${t}_${i}_${r}_${n}`,e)}async getFromUrl(e){return this.#A(e,e)}async getFromBlob(e,t){const i=await t;return this.#A(e,i)}async getFromId(e){this.#x||=new Map;const t=this.#x.get(e);if(!t)return null;if(t.bitmap)return t.refCounter+=1,t;if(t.file)return this.getFromFile(t.file);if(t.blobPromise){const{blobPromise:e}=t;return delete t.blobPromise,this.getFromBlob(t.id,e)}return this.getFromUrl(t.url)}getFromCanvas(e,t){this.#x||=new Map;let i=this.#x.get(e);if(i?.bitmap)return i.refCounter+=1,i;const r=new OffscreenCanvas(t.width,t.height);return r.getContext("2d").drawImage(t,0,0),i={bitmap:r.transferToImageBitmap(),id:`image_${this.#w}_${this.#y++}`,refCounter:1,isSvg:!1},this.#x.set(e,i),this.#x.set(i.id,i),i}getSvgUrl(e){const t=this.#x.get(e);return t?.isSvg?t.svgUrl:null}deleteId(e){this.#x||=new Map;const t=this.#x.get(e);if(!t)return;if(t.refCounter-=1,0!==t.refCounter)return;const{bitmap:i}=t;if(!t.url&&!t.file){const e=new OffscreenCanvas(i.width,i.height);e.getContext("bitmaprenderer").transferFromImageBitmap(i),t.blobPromise=e.convertToBlob()}i.close?.(),t.bitmap=null}isValidId(e){return e.startsWith(`image_${this.#w}_`)}}class Ul{#k=[];#E=!1;#S;#C=-1;constructor(e=128){this.#S=e}add({cmd:e,undo:t,post:i,mustExec:r,type:n=NaN,overwriteIfSameType:s=!1,keepUndo:a=!1}){if(r&&e(),this.#E)return;const o={cmd:e,undo:t,post:i,type:n};if(-1===this.#C)return this.#k.length>0&&(this.#k.length=0),this.#C=0,void this.#k.push(o);if(s&&this.#k[this.#C].type===n)return a&&(o.undo=this.#k[this.#C].undo),void(this.#k[this.#C]=o);const l=this.#C+1;l===this.#S?this.#k.splice(0,1):(this.#C=l,l<this.#k.length&&this.#k.splice(l)),this.#k.push(o)}undo(){if(-1===this.#C)return;this.#E=!0;const{undo:e,post:t}=this.#k[this.#C];e(),t?.(),this.#E=!1,this.#C-=1}redo(){if(this.#C<this.#k.length-1){this.#C+=1,this.#E=!0;const{cmd:e,post:t}=this.#k[this.#C];e(),t?.(),this.#E=!1}}hasSomethingToUndo(){return-1!==this.#C}hasSomethingToRedo(){return this.#C<this.#k.length-1}cleanType(e){if(-1!==this.#C){for(let t=this.#C;t>=0;t--)if(this.#k[t].type!==e)return this.#k.splice(t+1,this.#C-t),void(this.#C=t);this.#k.length=0,this.#C=-1}}destroy(){this.#k=null}}class Gl{constructor(e){this.buffer=[],this.callbacks=new Map,this.allKeys=new Set;const{isMac:t}=ul.platform;for(const[i,r,n={}]of e)for(const e of i){const i=e.startsWith("mac+");t&&i?(this.callbacks.set(e.slice(4),{callback:r,options:n}),this.allKeys.add(e.split("+").at(-1))):t||i||(this.callbacks.set(e,{callback:r,options:n}),this.allKeys.add(e.split("+").at(-1)))}}#M(e){e.altKey&&this.buffer.push("alt"),e.ctrlKey&&this.buffer.push("ctrl"),e.metaKey&&this.buffer.push("meta"),e.shiftKey&&this.buffer.push("shift"),this.buffer.push(e.key);const t=this.buffer.join("+");return this.buffer.length=0,t}exec(e,t){if(!this.allKeys.has(t.key))return;const i=this.callbacks.get(this.#M(t));if(!i)return;const{callback:r,options:{bubbles:n=!1,args:s=[],checker:a=null}}=i;a&&!a(e,t)||(r.bind(e,...s,t)(),n||Il(t))}}class $l{static _colorsMapping=new Map([["CanvasText",[0,0,0]],["Canvas",[255,255,255]]]);get _colors(){const e=new Map([["CanvasText",null],["Canvas",null]]);return function(e){const t=document.createElement("span");t.style.visibility="hidden",document.body.append(t);for(const i of e.keys()){t.style.color=i;const r=window.getComputedStyle(t).color;e.set(i,Rl(r))}t.remove()}(e),el(this,"_colors",e)}convert(e){const t=Rl(e);if(!window.matchMedia("(forced-colors: active)").matches)return t;for(const[e,i]of this._colors)if(i.every(((e,i)=>e===t[i])))return $l._colorsMapping.get(e);return t}getHexCode(e){const t=this._colors.get(e);return t?ml.makeHexColor(...t):e}}class Wl{#_=new AbortController;#T=null;#N=new Map;#I=new Map;#L=null;#P=null;#R=null;#D=new Ul;#z=null;#F=null;#O=0;#B=new Set;#H=null;#q=null;#j=new Set;_editorUndoBar=null;#V=!1;#U=!1;#G=!1;#$=null;#W=null;#X=null;#Y=null;#K=!1;#Z=null;#J=new jl;#Q=!1;#ee=!1;#te=null;#ie=null;#re=null;#ne=null;#se=ho.NONE;#ae=new Set;#oe=null;#le=null;#he=null;#ce={isEditing:!1,isEmpty:!0,hasSomethingToUndo:!1,hasSomethingToRedo:!1,hasSelectedEditor:!1,hasSelectedText:!1};#de=[0,0];#ue=null;#pe=null;#me=null;#ge=null;static TRANSLATE_SMALL=1;static TRANSLATE_BIG=10;static get _keyboardManager(){const e=Wl.prototype,t=e=>e.#pe.contains(document.activeElement)&&"BUTTON"!==document.activeElement.tagName&&e.hasSomethingToControl(),i=(e,{target:t})=>{if(t instanceof HTMLInputElement){const{type:e}=t;return"text"!==e&&"number"!==e}return!0},r=this.TRANSLATE_SMALL,n=this.TRANSLATE_BIG;return el(this,"_keyboardManager",new Gl([[["ctrl+a","mac+meta+a"],e.selectAll,{checker:i}],[["ctrl+z","mac+meta+z"],e.undo,{checker:i}],[["ctrl+y","ctrl+shift+z","mac+meta+shift+z","ctrl+shift+Z","mac+meta+shift+Z"],e.redo,{checker:i}],[["Backspace","alt+Backspace","ctrl+Backspace","shift+Backspace","mac+Backspace","mac+alt+Backspace","mac+ctrl+Backspace","Delete","ctrl+Delete","shift+Delete","mac+Delete"],e.delete,{checker:i}],[["Enter","mac+Enter"],e.addNewEditorFromKeyboard,{checker:(e,{target:t})=>!(t instanceof HTMLButtonElement)&&e.#pe.contains(t)&&!e.isEnterHandled}],[[" ","mac+ "],e.addNewEditorFromKeyboard,{checker:(e,{target:t})=>!(t instanceof HTMLButtonElement)&&e.#pe.contains(document.activeElement)}],[["Escape","mac+Escape"],e.unselectAll],[["ArrowLeft","mac+ArrowLeft"],e.translateSelectedEditors,{args:[-r,0],checker:t}],[["ctrl+ArrowLeft","mac+shift+ArrowLeft"],e.translateSelectedEditors,{args:[-n,0],checker:t}],[["ArrowRight","mac+ArrowRight"],e.translateSelectedEditors,{args:[r,0],checker:t}],[["ctrl+ArrowRight","mac+shift+ArrowRight"],e.translateSelectedEditors,{args:[n,0],checker:t}],[["ArrowUp","mac+ArrowUp"],e.translateSelectedEditors,{args:[0,-r],checker:t}],[["ctrl+ArrowUp","mac+shift+ArrowUp"],e.translateSelectedEditors,{args:[0,-n],checker:t}],[["ArrowDown","mac+ArrowDown"],e.translateSelectedEditors,{args:[0,r],checker:t}],[["ctrl+ArrowDown","mac+shift+ArrowDown"],e.translateSelectedEditors,{args:[0,n],checker:t}]]))}constructor(e,t,i,r,n,s,a,o,l,h,c,d,u){const p=this._signal=this.#_.signal;this.#pe=e,this.#me=t,this.#L=i,this._eventBus=r,r._on("editingaction",this.onEditingAction.bind(this),{signal:p}),r._on("pagechanging",this.onPageChanging.bind(this),{signal:p}),r._on("scalechanging",this.onScaleChanging.bind(this),{signal:p}),r._on("rotationchanging",this.onRotationChanging.bind(this),{signal:p}),r._on("setpreference",this.onSetPreference.bind(this),{signal:p}),r._on("switchannotationeditorparams",(e=>this.updateParams(e.type,e.value)),{signal:p}),this.#fe(),this.#be(),this.#ve(),this.#P=n.annotationStorage,this.#$=n.filterFactory,this.#le=s,this.#Y=a||null,this.#V=o,this.#U=l,this.#G=h,this.#ne=c||null,this.viewParameters={realScale:wl.PDF_TO_CSS_UNITS,rotation:0},this.isShiftKeyDown=!1,this._editorUndoBar=d||null,this._supportsPinchToZoom=!1!==u}destroy(){this.#ge?.resolve(),this.#ge=null,this.#_?.abort(),this.#_=null,this._signal=null;for(const e of this.#I.values())e.destroy();this.#I.clear(),this.#N.clear(),this.#j.clear(),this.#T=null,this.#ae.clear(),this.#D.destroy(),this.#L?.destroy(),this.#Z?.hide(),this.#Z=null,this.#W&&(clearTimeout(this.#W),this.#W=null),this.#ue&&(clearTimeout(this.#ue),this.#ue=null),this._editorUndoBar?.destroy()}combinedSignal(e){return AbortSignal.any([this._signal,e.signal])}get mlManager(){return this.#ne}get useNewAltTextFlow(){return this.#U}get useNewAltTextWhenAddingImage(){return this.#G}get hcmFilter(){return el(this,"hcmFilter",this.#le?this.#$.addHCMFilter(this.#le.foreground,this.#le.background):"none")}get direction(){return el(this,"direction",getComputedStyle(this.#pe).direction)}get highlightColors(){return el(this,"highlightColors",this.#Y?new Map(this.#Y.split(",").map((e=>e.split("=").map((e=>e.trim()))))):null)}get highlightColorNames(){return el(this,"highlightColorNames",this.highlightColors?new Map(Array.from(this.highlightColors,(e=>e.reverse()))):null)}setCurrentDrawingSession(e){e?(this.unselectAll(),this.disableUserSelect(!0)):this.disableUserSelect(!1),this.#F=e}setMainHighlightColorPicker(e){this.#re=e}editAltText(e,t=!1){this.#L?.editAltText(this,e,t)}switchToMode(e,t){this._eventBus.on("annotationeditormodechanged",t,{once:!0,signal:this._signal}),this._eventBus.dispatch("showannotationeditorui",{source:this,mode:e})}setPreference(e,t){this._eventBus.dispatch("setpreference",{source:this,name:e,value:t})}onSetPreference({name:e,value:t}){if("enableNewAltTextWhenAddingImage"===e)this.#G=t}onPageChanging({pageNumber:e}){this.#O=e-1}focusMainContainer(){this.#pe.focus()}findParent(e,t){for(const i of this.#I.values()){const{x:r,y:n,width:s,height:a}=i.div.getBoundingClientRect();if(e>=r&&e<=r+s&&t>=n&&t<=n+a)return i}return null}disableUserSelect(e=!1){this.#me.classList.toggle("noUserSelect",e)}addShouldRescale(e){this.#j.add(e)}removeShouldRescale(e){this.#j.delete(e)}onScaleChanging({scale:e}){this.commitOrRemove(),this.viewParameters.realScale=e*wl.PDF_TO_CSS_UNITS;for(const e of this.#j)e.onScaleChanging();this.#F?.onScaleChanging()}onRotationChanging({pagesRotation:e}){this.commitOrRemove(),this.viewParameters.rotation=e}#ye({anchorNode:e}){return e.nodeType===Node.TEXT_NODE?e.parentElement:e}#we(e){const{currentLayer:t}=this;if(t.hasTextLayer(e))return t;for(const t of this.#I.values())if(t.hasTextLayer(e))return t;return null}highlightSelection(e=""){const t=document.getSelection();if(!t||t.isCollapsed)return;const{anchorNode:i,anchorOffset:r,focusNode:n,focusOffset:s}=t,a=t.toString(),o=this.#ye(t).closest(".textLayer"),l=this.getSelectionBoxes(o);if(!l)return;t.empty();const h=this.#we(o),c=this.#se===ho.NONE,d=()=>{h?.createAndAddNewEditor({x:0,y:0},!1,{methodOfCreation:e,boxes:l,anchorNode:i,anchorOffset:r,focusNode:n,focusOffset:s,text:a}),c&&this.showAllEditors("highlight",!0,!0)};c?this.switchToMode(ho.HIGHLIGHT,d):d()}#xe(){const e=document.getSelection();if(!e||e.isCollapsed)return;const t=this.#ye(e).closest(".textLayer"),i=this.getSelectionBoxes(t);i&&(this.#Z||=new Hl(this),this.#Z.show(t,i,"ltr"===this.direction))}addToAnnotationStorage(e){e.isEmpty()||!this.#P||this.#P.has(e.id)||this.#P.setValue(e.id,e)}#Ae(){const e=document.getSelection();if(!e||e.isCollapsed)return void(this.#oe&&(this.#Z?.hide(),this.#oe=null,this.#ke({hasSelectedText:!1})));const{anchorNode:t}=e;if(t===this.#oe)return;const i=this.#ye(e).closest(".textLayer");if(i){if(this.#Z?.hide(),this.#oe=t,this.#ke({hasSelectedText:!0}),(this.#se===ho.HIGHLIGHT||this.#se===ho.NONE)&&(this.#se===ho.HIGHLIGHT&&this.showAllEditors("highlight",!0,!0),this.#K=this.isShiftKeyDown,!this.isShiftKeyDown)){const e=this.#se===ho.HIGHLIGHT?this.#we(i):null;e?.toggleDrawing();const t=new AbortController,r=this.combinedSignal(t),n=i=>{"pointerup"===i.type&&0!==i.button||(t.abort(),e?.toggleDrawing(!0),"pointerup"===i.type&&this.#Ee("main_toolbar"))};window.addEventListener("pointerup",n,{signal:r}),window.addEventListener("blur",n,{signal:r})}}else this.#oe&&(this.#Z?.hide(),this.#oe=null,this.#ke({hasSelectedText:!1}))}#Ee(e=""){this.#se===ho.HIGHLIGHT?this.highlightSelection(e):this.#V&&this.#xe()}#fe(){document.addEventListener("selectionchange",this.#Ae.bind(this),{signal:this._signal})}#Se(){if(this.#X)return;this.#X=new AbortController;const e=this.combinedSignal(this.#X);window.addEventListener("focus",this.focus.bind(this),{signal:e}),window.addEventListener("blur",this.blur.bind(this),{signal:e})}#Ce(){this.#X?.abort(),this.#X=null}blur(){if(this.isShiftKeyDown=!1,this.#K&&(this.#K=!1,this.#Ee("main_toolbar")),!this.hasSelection)return;const{activeElement:e}=document;for(const t of this.#ae)if(t.div.contains(e)){this.#ie=[t,e],t._focusEventsAllowed=!1;break}}focus(){if(!this.#ie)return;const[e,t]=this.#ie;this.#ie=null,t.addEventListener("focusin",(()=>{e._focusEventsAllowed=!0}),{once:!0,signal:this._signal}),t.focus()}#ve(){if(this.#te)return;this.#te=new AbortController;const e=this.combinedSignal(this.#te);window.addEventListener("keydown",this.keydown.bind(this),{signal:e}),window.addEventListener("keyup",this.keyup.bind(this),{signal:e})}#Me(){this.#te?.abort(),this.#te=null}#_e(){if(this.#z)return;this.#z=new AbortController;const e=this.combinedSignal(this.#z);document.addEventListener("copy",this.copy.bind(this),{signal:e}),document.addEventListener("cut",this.cut.bind(this),{signal:e}),document.addEventListener("paste",this.paste.bind(this),{signal:e})}#Te(){this.#z?.abort(),this.#z=null}#be(){const e=this._signal;document.addEventListener("dragover",this.dragOver.bind(this),{signal:e}),document.addEventListener("drop",this.drop.bind(this),{signal:e})}addEditListeners(){this.#ve(),this.#_e()}removeEditListeners(){this.#Me(),this.#Te()}dragOver(e){for(const{type:t}of e.dataTransfer.items)for(const i of this.#q)if(i.isHandlingMimeForPasting(t))return e.dataTransfer.dropEffect="copy",void e.preventDefault()}drop(e){for(const t of e.dataTransfer.items)for(const i of this.#q)if(i.isHandlingMimeForPasting(t.type))return i.paste(t,this.currentLayer),void e.preventDefault()}copy(e){if(e.preventDefault(),this.#T?.commitOrRemove(),!this.hasSelection)return;const t=[];for(const e of this.#ae){const i=e.serialize(!0);i&&t.push(i)}0!==t.length&&e.clipboardData.setData("application/pdfjs",JSON.stringify(t))}cut(e){this.copy(e),this.delete()}async paste(e){e.preventDefault();const{clipboardData:t}=e;for(const e of t.items)for(const t of this.#q)if(t.isHandlingMimeForPasting(e.type))return void t.paste(e,this.currentLayer);let i=t.getData("application/pdfjs");if(!i)return;try{i=JSON.parse(i)}catch(e){return void Ko(`paste: "${e.message}".`)}if(!Array.isArray(i))return;this.unselectAll();const r=this.currentLayer;try{const e=[];for(const t of i){const i=await r.deserialize(t);if(!i)return;e.push(i)}const t=()=>{for(const t of e)this.#Ne(t);this.#Ie(e)},n=()=>{for(const t of e)t.remove()};this.addCommands({cmd:t,undo:n,mustExec:!0})}catch(e){Ko(`paste: "${e.message}".`)}}keydown(e){this.isShiftKeyDown||"Shift"!==e.key||(this.isShiftKeyDown=!0),this.#se===ho.NONE||this.isEditorHandlingKeyboard||Wl._keyboardManager.exec(this,e)}keyup(e){this.isShiftKeyDown&&"Shift"===e.key&&(this.isShiftKeyDown=!1,this.#K&&(this.#K=!1,this.#Ee("main_toolbar")))}onEditingAction({name:e}){switch(e){case"undo":case"redo":case"delete":case"selectAll":this[e]();break;case"highlightSelection":this.highlightSelection("context_menu")}}#ke(e){Object.entries(e).some((([e,t])=>this.#ce[e]!==t))&&(this._eventBus.dispatch("annotationeditorstateschanged",{source:this,details:Object.assign(this.#ce,e)}),this.#se===ho.HIGHLIGHT&&!1===e.hasSelectedEditor&&this.#Le([[co.HIGHLIGHT_FREE,!0]]))}#Le(e){this._eventBus.dispatch("annotationeditorparamschanged",{source:this,details:e})}setEditingState(e){e?(this.#Se(),this.#_e(),this.#ke({isEditing:this.#se!==ho.NONE,isEmpty:this.#Pe(),hasSomethingToUndo:this.#D.hasSomethingToUndo(),hasSomethingToRedo:this.#D.hasSomethingToRedo(),hasSelectedEditor:!1})):(this.#Ce(),this.#Te(),this.#ke({isEditing:!1}),this.disableUserSelect(!1))}registerEditorTypes(e){if(!this.#q){this.#q=e;for(const e of this.#q)this.#Le(e.defaultPropertiesToUpdate)}}getId(){return this.#J.id}get currentLayer(){return this.#I.get(this.#O)}getLayer(e){return this.#I.get(e)}get currentPageIndex(){return this.#O}addLayer(e){this.#I.set(e.pageIndex,e),this.#Q?e.enable():e.disable()}removeLayer(e){this.#I.delete(e.pageIndex)}async updateMode(e,t=null,i=!1){if(this.#se!==e&&(!this.#ge||(await this.#ge.promise,this.#ge))){if(this.#ge=Promise.withResolvers(),this.#se=e,e===ho.NONE)return this.setEditingState(!1),this.#Re(),this._editorUndoBar?.hide(),void this.#ge.resolve();this.setEditingState(!0),await this.#De(),this.unselectAll();for(const t of this.#I.values())t.updateMode(e);if(!t)return i&&this.addNewEditorFromKeyboard(),void this.#ge.resolve();for(const e of this.#N.values())e.annotationElementId===t?(this.setSelected(e),e.enterInEditMode()):e.unselect();this.#ge.resolve()}}addNewEditorFromKeyboard(){this.currentLayer.canCreateNewEmptyEditor()&&this.currentLayer.addNewEditor()}updateToolbar(e){e!==this.#se&&this._eventBus.dispatch("switchannotationeditormode",{source:this,mode:e})}updateParams(e,t){if(this.#q){switch(e){case co.CREATE:return void this.currentLayer.addNewEditor();case co.HIGHLIGHT_DEFAULT_COLOR:this.#re?.updateColor(t);break;case co.HIGHLIGHT_SHOW_ALL:this._eventBus.dispatch("reporttelemetry",{source:this,details:{type:"editing",data:{type:"highlight",action:"toggle_visibility"}}}),(this.#he||=new Map).set(e,t),this.showAllEditors("highlight",t)}for(const i of this.#ae)i.updateParams(e,t);for(const i of this.#q)i.updateDefaultParams(e,t)}}showAllEditors(e,t,i=!1){for(const i of this.#N.values())i.editorType===e&&i.show(t);(this.#he?.get(co.HIGHLIGHT_SHOW_ALL)??!0)!==t&&this.#Le([[co.HIGHLIGHT_SHOW_ALL,t]])}enableWaiting(e=!1){if(this.#ee!==e){this.#ee=e;for(const t of this.#I.values())e?t.disableClick():t.enableClick(),t.div.classList.toggle("waiting",e)}}async#De(){if(!this.#Q){this.#Q=!0;const e=[];for(const t of this.#I.values())e.push(t.enable());await Promise.all(e);for(const e of this.#N.values())e.enable()}}#Re(){if(this.unselectAll(),this.#Q){this.#Q=!1;for(const e of this.#I.values())e.disable();for(const e of this.#N.values())e.disable()}}getEditors(e){const t=[];for(const i of this.#N.values())i.pageIndex===e&&t.push(i);return t}getEditor(e){return this.#N.get(e)}addEditor(e){this.#N.set(e.id,e)}removeEditor(e){e.div.contains(document.activeElement)&&(this.#W&&clearTimeout(this.#W),this.#W=setTimeout((()=>{this.focusMainContainer(),this.#W=null}),0)),this.#N.delete(e.id),this.unselect(e),e.annotationElementId&&this.#B.has(e.annotationElementId)||this.#P?.remove(e.id)}addDeletedAnnotationElement(e){this.#B.add(e.annotationElementId),this.addChangedExistingAnnotation(e),e.deleted=!0}isDeletedAnnotationElement(e){return this.#B.has(e)}removeDeletedAnnotationElement(e){this.#B.delete(e.annotationElementId),this.removeChangedExistingAnnotation(e),e.deleted=!1}#Ne(e){const t=this.#I.get(e.pageIndex);t?t.addOrRebuild(e):(this.addEditor(e),this.addToAnnotationStorage(e))}setActiveEditor(e){this.#T!==e&&(this.#T=e,e&&this.#Le(e.propertiesToUpdate))}get#ze(){let e=null;for(e of this.#ae);return e}updateUI(e){this.#ze===e&&this.#Le(e.propertiesToUpdate)}updateUIForDefaultProperties(e){this.#Le(e.defaultPropertiesToUpdate)}toggleSelected(e){if(this.#ae.has(e))return this.#ae.delete(e),e.unselect(),void this.#ke({hasSelectedEditor:this.hasSelection});this.#ae.add(e),e.select(),this.#Le(e.propertiesToUpdate),this.#ke({hasSelectedEditor:!0})}setSelected(e){this.#F?.commitOrRemove();for(const t of this.#ae)t!==e&&t.unselect();this.#ae.clear(),this.#ae.add(e),e.select(),this.#Le(e.propertiesToUpdate),this.#ke({hasSelectedEditor:!0})}isSelected(e){return this.#ae.has(e)}get firstSelectedEditor(){return this.#ae.values().next().value}unselect(e){e.unselect(),this.#ae.delete(e),this.#ke({hasSelectedEditor:this.hasSelection})}get hasSelection(){return 0!==this.#ae.size}get isEnterHandled(){return 1===this.#ae.size&&this.firstSelectedEditor.isEnterHandled}undo(){this.#D.undo(),this.#ke({hasSomethingToUndo:this.#D.hasSomethingToUndo(),hasSomethingToRedo:!0,isEmpty:this.#Pe()}),this._editorUndoBar?.hide()}redo(){this.#D.redo(),this.#ke({hasSomethingToUndo:!0,hasSomethingToRedo:this.#D.hasSomethingToRedo(),isEmpty:this.#Pe()})}addCommands(e){this.#D.add(e),this.#ke({hasSomethingToUndo:!0,hasSomethingToRedo:!1,isEmpty:this.#Pe()})}cleanUndoStack(e){this.#D.cleanType(e)}#Pe(){if(0===this.#N.size)return!0;if(1===this.#N.size)for(const e of this.#N.values())return e.isEmpty();return!1}delete(){this.commitOrRemove();const e=this.currentLayer?.endDrawingSession(!0);if(!this.hasSelection&&!e)return;const t=e?[e]:[...this.#ae],i=()=>{for(const e of t)this.#Ne(e)};this.addCommands({cmd:()=>{this._editorUndoBar?.show(i,1===t.length?t[0].editorType:t.length);for(const e of t)e.remove()},undo:i,mustExec:!0})}commitOrRemove(){this.#T?.commitOrRemove()}hasSomethingToControl(){return this.#T||this.hasSelection}#Ie(e){for(const e of this.#ae)e.unselect();this.#ae.clear();for(const t of e)t.isEmpty()||(this.#ae.add(t),t.select());this.#ke({hasSelectedEditor:this.hasSelection})}selectAll(){for(const e of this.#ae)e.commit();this.#Ie(this.#N.values())}unselectAll(){if((!this.#T||(this.#T.commitOrRemove(),this.#se===ho.NONE))&&!this.#F?.commitOrRemove()&&this.hasSelection){for(const e of this.#ae)e.unselect();this.#ae.clear(),this.#ke({hasSelectedEditor:!1})}}translateSelectedEditors(e,t,i=!1){if(i||this.commitOrRemove(),!this.hasSelection)return;this.#de[0]+=e,this.#de[1]+=t;const[r,n]=this.#de,s=[...this.#ae];this.#ue&&clearTimeout(this.#ue),this.#ue=setTimeout((()=>{this.#ue=null,this.#de[0]=this.#de[1]=0,this.addCommands({cmd:()=>{for(const e of s)this.#N.has(e.id)&&e.translateInPage(r,n)},undo:()=>{for(const e of s)this.#N.has(e.id)&&e.translateInPage(-r,-n)},mustExec:!1})}),1e3);for(const i of s)i.translateInPage(e,t)}setUpDragSession(){if(this.hasSelection){this.disableUserSelect(!0),this.#H=new Map;for(const e of this.#ae)this.#H.set(e,{savedX:e.x,savedY:e.y,savedPageIndex:e.pageIndex,newX:0,newY:0,newPageIndex:-1})}}endDragSession(){if(!this.#H)return!1;this.disableUserSelect(!1);const e=this.#H;this.#H=null;let t=!1;for(const[{x:i,y:r,pageIndex:n},s]of e)s.newX=i,s.newY=r,s.newPageIndex=n,t||=i!==s.savedX||r!==s.savedY||n!==s.savedPageIndex;if(!t)return!1;const i=(e,t,i,r)=>{if(this.#N.has(e.id)){const n=this.#I.get(r);n?e._setParentAndPosition(n,t,i):(e.pageIndex=r,e.x=t,e.y=i)}};return this.addCommands({cmd:()=>{for(const[t,{newX:r,newY:n,newPageIndex:s}]of e)i(t,r,n,s)},undo:()=>{for(const[t,{savedX:r,savedY:n,savedPageIndex:s}]of e)i(t,r,n,s)},mustExec:!0}),!0}dragSelectedEditors(e,t){if(this.#H)for(const i of this.#H.keys())i.drag(e,t)}rebuild(e){if(null===e.parent){const t=this.getLayer(e.pageIndex);t?(t.changeParent(e),t.addOrRebuild(e)):(this.addEditor(e),this.addToAnnotationStorage(e),e.rebuild())}else e.parent.addOrRebuild(e)}get isEditorHandlingKeyboard(){return this.getActive()?.shouldGetKeyboardEvents()||1===this.#ae.size&&this.firstSelectedEditor.shouldGetKeyboardEvents()}isActive(e){return this.#T===e}getActive(){return this.#T}getMode(){return this.#se}get imageManager(){return el(this,"imageManager",new Vl)}getSelectionBoxes(e){if(!e)return null;const t=document.getSelection();for(let i=0,r=t.rangeCount;i<r;i++)if(!e.contains(t.getRangeAt(i).commonAncestorContainer))return null;const{x:i,y:r,width:n,height:s}=e.getBoundingClientRect();let a;switch(e.getAttribute("data-main-rotation")){case"90":a=(e,t,a,o)=>({x:(t-r)/s,y:1-(e+a-i)/n,width:o/s,height:a/n});break;case"180":a=(e,t,a,o)=>({x:1-(e+a-i)/n,y:1-(t+o-r)/s,width:a/n,height:o/s});break;case"270":a=(e,t,a,o)=>({x:1-(t+o-r)/s,y:(e-i)/n,width:o/s,height:a/n});break;default:a=(e,t,a,o)=>({x:(e-i)/n,y:(t-r)/s,width:a/n,height:o/s})}const o=[];for(let e=0,i=t.rangeCount;e<i;e++){const i=t.getRangeAt(e);if(!i.collapsed)for(const{x:e,y:t,width:r,height:n}of i.getClientRects())0!==r&&0!==n&&o.push(a(e,t,r,n))}return 0===o.length?null:o}addChangedExistingAnnotation({annotationElementId:e,id:t}){(this.#R||=new Map).set(e,t)}removeChangedExistingAnnotation({annotationElementId:e}){this.#R?.delete(e)}renderAnnotationElement(e){const t=this.#R?.get(e.data.id);if(!t)return;const i=this.#P.getRawValue(t);i&&(this.#se!==ho.NONE||i.hasBeenModified)&&i.renderAnnotationElement(e)}}class Xl{#o=null;#Fe=!1;#Oe=null;#Be=null;#He=null;#qe=null;#je=!1;#Ve=null;#s=null;#Ue=null;#Ge=null;#$e=!1;static#We=null;static _l10n=null;constructor(e){this.#s=e,this.#$e=e._uiManager.useNewAltTextFlow,Xl.#We||=Object.freeze({added:"pdfjs-editor-new-alt-text-added-button","added-label":"pdfjs-editor-new-alt-text-added-button-label",missing:"pdfjs-editor-new-alt-text-missing-button","missing-label":"pdfjs-editor-new-alt-text-missing-button-label",review:"pdfjs-editor-new-alt-text-to-review-button","review-label":"pdfjs-editor-new-alt-text-to-review-button-label"})}static initialize(e){Xl._l10n??=e}async render(){const e=this.#Oe=document.createElement("button");e.className="altText",e.tabIndex="0";const t=this.#Be=document.createElement("span");e.append(t),this.#$e?(e.classList.add("new"),e.setAttribute("data-l10n-id",Xl.#We.missing),t.setAttribute("data-l10n-id",Xl.#We["missing-label"])):(e.setAttribute("data-l10n-id","pdfjs-editor-alt-text-button"),t.setAttribute("data-l10n-id","pdfjs-editor-alt-text-button-label"));const i=this.#s._uiManager._signal;e.addEventListener("contextmenu",Nl,{signal:i}),e.addEventListener("pointerdown",(e=>e.stopPropagation()),{signal:i});const r=e=>{e.preventDefault(),this.#s._uiManager.editAltText(this.#s),this.#$e&&this.#s._reportTelemetry({action:"pdfjs.image.alt_text.image_status_label_clicked",data:{label:this.#Xe}})};return e.addEventListener("click",r,{capture:!0,signal:i}),e.addEventListener("keydown",(t=>{t.target===e&&"Enter"===t.key&&(this.#je=!0,r(t))}),{signal:i}),await this.#Ye(),e}get#Xe(){return(this.#o?"added":null===this.#o&&this.guessedText&&"review")||"missing"}finish(){this.#Oe&&(this.#Oe.focus({focusVisible:this.#je}),this.#je=!1)}isEmpty(){return this.#$e?null===this.#o:!this.#o&&!this.#Fe}hasData(){return this.#$e?null!==this.#o||!!this.#Ue:this.isEmpty()}get guessedText(){return this.#Ue}async setGuessedText(e){null===this.#o&&(this.#Ue=e,this.#Ge=await Xl._l10n.get("pdfjs-editor-new-alt-text-generated-alt-text-with-disclaimer",{generatedAltText:e}),this.#Ye())}toggleAltTextBadge(e=!1){if(!this.#$e||this.#o)return this.#Ve?.remove(),void(this.#Ve=null);if(!this.#Ve){const e=this.#Ve=document.createElement("div");e.className="noAltTextBadge",this.#s.div.append(e)}this.#Ve.classList.toggle("hidden",!e)}serialize(e){let t=this.#o;return e||this.#Ue!==t||(t=this.#Ge),{altText:t,decorative:this.#Fe,guessedText:this.#Ue,textWithDisclaimer:this.#Ge}}get data(){return{altText:this.#o,decorative:this.#Fe}}set data({altText:e,decorative:t,guessedText:i,textWithDisclaimer:r,cancel:n=!1}){i&&(this.#Ue=i,this.#Ge=r),this.#o===e&&this.#Fe===t||(n||(this.#o=e,this.#Fe=t),this.#Ye())}toggle(e=!1){this.#Oe&&(!e&&this.#qe&&(clearTimeout(this.#qe),this.#qe=null),this.#Oe.disabled=!e)}shown(){this.#s._reportTelemetry({action:"pdfjs.image.alt_text.image_status_label_displayed",data:{label:this.#Xe}})}destroy(){this.#Oe?.remove(),this.#Oe=null,this.#Be=null,this.#He=null,this.#Ve?.remove(),this.#Ve=null}async#Ye(){const e=this.#Oe;if(!e)return;if(this.#$e){if(e.classList.toggle("done",!!this.#o),e.setAttribute("data-l10n-id",Xl.#We[this.#Xe]),this.#Be?.setAttribute("data-l10n-id",Xl.#We[`${this.#Xe}-label`]),!this.#o)return void this.#He?.remove()}else{if(!this.#o&&!this.#Fe)return e.classList.remove("done"),void this.#He?.remove();e.classList.add("done"),e.setAttribute("data-l10n-id","pdfjs-editor-alt-text-edit-button")}let t=this.#He;if(!t){this.#He=t=document.createElement("span"),t.className="tooltip",t.setAttribute("role","tooltip"),t.id=`alt-text-tooltip-${this.#s.id}`;const i=100,r=this.#s._uiManager._signal;r.addEventListener("abort",(()=>{clearTimeout(this.#qe),this.#qe=null}),{once:!0}),e.addEventListener("mouseenter",(()=>{this.#qe=setTimeout((()=>{this.#qe=null,this.#He.classList.add("show"),this.#s._reportTelemetry({action:"alt_text_tooltip"})}),i)}),{signal:r}),e.addEventListener("mouseleave",(()=>{this.#qe&&(clearTimeout(this.#qe),this.#qe=null),this.#He?.classList.remove("show")}),{signal:r})}this.#Fe?t.setAttribute("data-l10n-id","pdfjs-editor-alt-text-decorative-tooltip"):(t.removeAttribute("data-l10n-id"),t.textContent=this.#o),t.parentNode||e.append(t);const i=this.#s.getImageForAltText();i?.setAttribute("aria-describedby",t.id)}}class Yl{#pe;#Ke=!1;#Ze=null;#Je;#Qe;#et;#tt;#it;#rt=null;#nt;#st=null;constructor({container:e,isPinchingDisabled:t=null,isPinchingStopped:i=null,onPinchStart:r=null,onPinching:n=null,onPinchEnd:s=null,signal:a}){this.#pe=e,this.#Ze=i,this.#Je=t,this.#Qe=r,this.#et=n,this.#tt=s,this.#nt=new AbortController,this.#it=AbortSignal.any([a,this.#nt.signal]),e.addEventListener("touchstart",this.#at.bind(this),{passive:!1,signal:this.#it})}get MIN_TOUCH_DISTANCE_TO_PINCH(){return el(this,"MIN_TOUCH_DISTANCE_TO_PINCH",35/(window.devicePixelRatio||1))}#at(e){if(this.#Je?.()||e.touches.length<2)return;if(!this.#st){this.#st=new AbortController;const e=AbortSignal.any([this.#it,this.#st.signal]),t=this.#pe,i={signal:e,passive:!1};t.addEventListener("touchmove",this.#ot.bind(this),i),t.addEventListener("touchend",this.#lt.bind(this),i),t.addEventListener("touchcancel",this.#lt.bind(this),i),this.#Qe?.()}if(Il(e),2!==e.touches.length||this.#Ze?.())return void(this.#rt=null);let[t,i]=e.touches;t.identifier>i.identifier&&([t,i]=[i,t]),this.#rt={touch0X:t.screenX,touch0Y:t.screenY,touch1X:i.screenX,touch1Y:i.screenY}}#ot(e){if(!this.#rt||2!==e.touches.length)return;let[t,i]=e.touches;t.identifier>i.identifier&&([t,i]=[i,t]);const{screenX:r,screenY:n}=t,{screenX:s,screenY:a}=i,o=this.#rt,{touch0X:l,touch0Y:h,touch1X:c,touch1Y:d}=o,u=c-l,p=d-h,m=s-r,g=a-n,f=Math.hypot(m,g)||1,b=Math.hypot(u,p)||1;if(!this.#Ke&&Math.abs(b-f)<=Yl.MIN_TOUCH_DISTANCE_TO_PINCH)return;if(o.touch0X=r,o.touch0Y=n,o.touch1X=s,o.touch1Y=a,e.preventDefault(),!this.#Ke)return void(this.#Ke=!0);const v=[(r+s)/2,(n+a)/2];this.#et?.(v,b,f)}#lt(e){this.#st.abort(),this.#st=null,this.#tt?.(),this.#rt&&(e.preventDefault(),this.#rt=null,this.#Ke=!1)}destroy(){this.#nt?.abort(),this.#nt=null}}class Kl{#ht=null;#ct=null;#o=null;#dt=!1;#ut=null;#pt="";#mt=!1;#gt=null;#ft=null;#bt=null;#vt=null;#yt="";#wt=!1;#xt=null;#At=!1;#kt=!1;#Et=!1;#St=null;#Ct=0;#Mt=0;#_t=null;#Tt=null;_editToolbar=null;_initialOptions=Object.create(null);_initialData=null;_isVisible=!0;_uiManager=null;_focusEventsAllowed=!0;static _l10n=null;static _l10nResizer=null;#Nt=!1;#It=Kl._zIndex++;static _borderLineWidth=-1;static _colorManager=new $l;static _zIndex=1;static _telemetryTimeout=1e3;static get _resizerKeyboardManager(){const e=Kl.prototype._resizeWithKeyboard,t=Wl.TRANSLATE_SMALL,i=Wl.TRANSLATE_BIG;return el(this,"_resizerKeyboardManager",new Gl([[["ArrowLeft","mac+ArrowLeft"],e,{args:[-t,0]}],[["ctrl+ArrowLeft","mac+shift+ArrowLeft"],e,{args:[-i,0]}],[["ArrowRight","mac+ArrowRight"],e,{args:[t,0]}],[["ctrl+ArrowRight","mac+shift+ArrowRight"],e,{args:[i,0]}],[["ArrowUp","mac+ArrowUp"],e,{args:[0,-t]}],[["ctrl+ArrowUp","mac+shift+ArrowUp"],e,{args:[0,-i]}],[["ArrowDown","mac+ArrowDown"],e,{args:[0,t]}],[["ctrl+ArrowDown","mac+shift+ArrowDown"],e,{args:[0,i]}],[["Escape","mac+Escape"],Kl.prototype._stopResizingWithKeyboard]]))}constructor(e){this.parent=e.parent,this.id=e.id,this.width=this.height=null,this.pageIndex=e.parent.pageIndex,this.name=e.name,this.div=null,this._uiManager=e.uiManager,this.annotationElementId=null,this._willKeepAspectRatio=!1,this._initialOptions.isCentered=e.isCentered,this._structTreeParentId=null;const{rotation:t,rawDims:{pageWidth:i,pageHeight:r,pageX:n,pageY:s}}=this.parent.viewport;this.rotation=t,this.pageRotation=(360+t-this._uiManager.viewParameters.rotation)%360,this.pageDimensions=[i,r],this.pageTranslation=[n,s];const[a,o]=this.parentDimensions;this.x=e.x/a,this.y=e.y/o,this.isAttachedToDOM=!1,this.deleted=!1}get editorType(){return Object.getPrototypeOf(this).constructor._type}static get isDrawer(){return!1}static get _defaultLineColor(){return el(this,"_defaultLineColor",this._colorManager.getHexCode("CanvasText"))}static deleteAnnotationElement(e){const t=new Zl({id:e.parent.getNextId(),parent:e.parent,uiManager:e._uiManager});t.annotationElementId=e.annotationElementId,t.deleted=!0,t._uiManager.addToAnnotationStorage(t)}static initialize(e,t){if(Kl._l10n??=e,Kl._l10nResizer||=Object.freeze({topLeft:"pdfjs-editor-resizer-top-left",topMiddle:"pdfjs-editor-resizer-top-middle",topRight:"pdfjs-editor-resizer-top-right",middleRight:"pdfjs-editor-resizer-middle-right",bottomRight:"pdfjs-editor-resizer-bottom-right",bottomMiddle:"pdfjs-editor-resizer-bottom-middle",bottomLeft:"pdfjs-editor-resizer-bottom-left",middleLeft:"pdfjs-editor-resizer-middle-left"}),-1!==Kl._borderLineWidth)return;const i=getComputedStyle(document.documentElement);Kl._borderLineWidth=parseFloat(i.getPropertyValue("--outline-width"))||0}static updateDefaultParams(e,t){}static get defaultPropertiesToUpdate(){return[]}static isHandlingMimeForPasting(e){return!1}static paste(e,t){Zo("Not implemented")}get propertiesToUpdate(){return[]}get _isDraggable(){return this.#Nt}set _isDraggable(e){this.#Nt=e,this.div?.classList.toggle("draggable",e)}get isEnterHandled(){return!0}center(){const[e,t]=this.pageDimensions;switch(this.parentRotation){case 90:this.x-=this.height*t/(2*e),this.y+=this.width*e/(2*t);break;case 180:this.x+=this.width/2,this.y+=this.height/2;break;case 270:this.x+=this.height*t/(2*e),this.y-=this.width*e/(2*t);break;default:this.x-=this.width/2,this.y-=this.height/2}this.fixAndSetPosition()}addCommands(e){this._uiManager.addCommands(e)}get currentLayer(){return this._uiManager.currentLayer}setInBackground(){this.div.style.zIndex=0}setInForeground(){this.div.style.zIndex=this.#It}setParent(e){null!==e?(this.pageIndex=e.pageIndex,this.pageDimensions=e.pageDimensions):this.#Lt(),this.parent=e}focusin(e){this._focusEventsAllowed&&(this.#wt?this.#wt=!1:this.parent.setSelected(this))}focusout(e){if(!this._focusEventsAllowed)return;if(!this.isAttachedToDOM)return;const t=e.relatedTarget;t?.closest(`#${this.id}`)||(e.preventDefault(),this.parent?.isMultipleSelection||this.commitOrRemove())}commitOrRemove(){this.isEmpty()?this.remove():this.commit()}commit(){this.addToAnnotationStorage()}addToAnnotationStorage(){this._uiManager.addToAnnotationStorage(this)}setAt(e,t,i,r){const[n,s]=this.parentDimensions;[i,r]=this.screenToPageTranslation(i,r),this.x=(e+i)/n,this.y=(t+r)/s,this.fixAndSetPosition()}#Pt([e,t],i,r){[i,r]=this.screenToPageTranslation(i,r),this.x+=i/e,this.y+=r/t,this._onTranslating(this.x,this.y),this.fixAndSetPosition()}translate(e,t){this.#Pt(this.parentDimensions,e,t)}translateInPage(e,t){this.#xt||=[this.x,this.y,this.width,this.height],this.#Pt(this.pageDimensions,e,t),this.div.scrollIntoView({block:"nearest"})}drag(e,t){this.#xt||=[this.x,this.y,this.width,this.height];const{div:i,parentDimensions:[r,n]}=this;if(this.x+=e/r,this.y+=t/n,this.parent&&(this.x<0||this.x>1||this.y<0||this.y>1)){const{x:e,y:t}=this.div.getBoundingClientRect();this.parent.findNewParent(this,e,t)&&(this.x-=Math.floor(this.x),this.y-=Math.floor(this.y))}let{x:s,y:a}=this;const[o,l]=this.getBaseTranslation();s+=o,a+=l;const{style:h}=i;h.left=`${(100*s).toFixed(2)}%`,h.top=`${(100*a).toFixed(2)}%`,this._onTranslating(s,a),i.scrollIntoView({block:"nearest"})}_onTranslating(e,t){}_onTranslated(e,t){}get _hasBeenMoved(){return!!this.#xt&&(this.#xt[0]!==this.x||this.#xt[1]!==this.y)}get _hasBeenResized(){return!!this.#xt&&(this.#xt[2]!==this.width||this.#xt[3]!==this.height)}getBaseTranslation(){const[e,t]=this.parentDimensions,{_borderLineWidth:i}=Kl,r=i/e,n=i/t;switch(this.rotation){case 90:return[-r,n];case 180:return[r,n];case 270:return[r,-n];default:return[-r,-n]}}get _mustFixPosition(){return!0}fixAndSetPosition(e=this.rotation){const{div:{style:t},pageDimensions:[i,r]}=this;let{x:n,y:s,width:a,height:o}=this;if(a*=i,o*=r,n*=i,s*=r,this._mustFixPosition)switch(e){case 0:n=Math.max(0,Math.min(i-a,n)),s=Math.max(0,Math.min(r-o,s));break;case 90:n=Math.max(0,Math.min(i-o,n)),s=Math.min(r,Math.max(a,s));break;case 180:n=Math.min(i,Math.max(a,n)),s=Math.min(r,Math.max(o,s));break;case 270:n=Math.min(i,Math.max(o,n)),s=Math.max(0,Math.min(r-a,s))}this.x=n/=i,this.y=s/=r;const[l,h]=this.getBaseTranslation();n+=l,s+=h,t.left=`${(100*n).toFixed(2)}%`,t.top=`${(100*s).toFixed(2)}%`,this.moveInDOM()}static#Rt(e,t,i){switch(i){case 90:return[t,-e];case 180:return[-e,-t];case 270:return[-t,e];default:return[e,t]}}screenToPageTranslation(e,t){return Kl.#Rt(e,t,this.parentRotation)}pageTranslationToScreen(e,t){return Kl.#Rt(e,t,360-this.parentRotation)}#Dt(e){switch(e){case 90:{const[e,t]=this.pageDimensions;return[0,-e/t,t/e,0]}case 180:return[-1,0,0,-1];case 270:{const[e,t]=this.pageDimensions;return[0,e/t,-t/e,0]}default:return[1,0,0,1]}}get parentScale(){return this._uiManager.viewParameters.realScale}get parentRotation(){return(this._uiManager.viewParameters.rotation+this.pageRotation)%360}get parentDimensions(){const{parentScale:e,pageDimensions:[t,i]}=this;return[t*e,i*e]}setDims(e,t){const[i,r]=this.parentDimensions,{style:n}=this.div;n.width=`${(100*e/i).toFixed(2)}%`,this.#mt||(n.height=`${(100*t/r).toFixed(2)}%`)}fixDims(){const{style:e}=this.div,{height:t,width:i}=e,r=i.endsWith("%"),n=!this.#mt&&t.endsWith("%");if(r&&n)return;const[s,a]=this.parentDimensions;r||(e.width=`${(100*parseFloat(i)/s).toFixed(2)}%`),this.#mt||n||(e.height=`${(100*parseFloat(t)/a).toFixed(2)}%`)}getInitialTranslation(){return[0,0]}#zt(){if(this.#gt)return;this.#gt=document.createElement("div"),this.#gt.classList.add("resizers");const e=this._willKeepAspectRatio?["topLeft","topRight","bottomRight","bottomLeft"]:["topLeft","topMiddle","topRight","middleRight","bottomRight","bottomMiddle","bottomLeft","middleLeft"],t=this._uiManager._signal;for(const i of e){const e=document.createElement("div");this.#gt.append(e),e.classList.add("resizer",i),e.setAttribute("data-resizer-name",i),e.addEventListener("pointerdown",this.#Ft.bind(this,i),{signal:t}),e.addEventListener("contextmenu",Nl,{signal:t}),e.tabIndex=-1}this.div.prepend(this.#gt)}#Ft(e,t){t.preventDefault();const{isMac:i}=ul.platform;if(0!==t.button||t.ctrlKey&&i)return;this.#o?.toggle(!1);const r=this._isDraggable;this._isDraggable=!1,this.#ft=[t.screenX,t.screenY];const n=new AbortController,s=this._uiManager.combinedSignal(n);this.parent.togglePointerEvents(!1),window.addEventListener("pointermove",this.#Ot.bind(this,e),{passive:!0,capture:!0,signal:s}),window.addEventListener("touchmove",Il,{passive:!1,signal:s}),window.addEventListener("contextmenu",Nl,{signal:s}),this.#bt={savedX:this.x,savedY:this.y,savedWidth:this.width,savedHeight:this.height};const a=this.parent.div.style.cursor,o=this.div.style.cursor;this.div.style.cursor=this.parent.div.style.cursor=window.getComputedStyle(t.target).cursor;const l=()=>{n.abort(),this.parent.togglePointerEvents(!0),this.#o?.toggle(!0),this._isDraggable=r,this.parent.div.style.cursor=a,this.div.style.cursor=o,this.#Bt()};window.addEventListener("pointerup",l,{signal:s}),window.addEventListener("blur",l,{signal:s})}#Ht(e,t,i,r){this.width=i,this.height=r,this.x=e,this.y=t;const[n,s]=this.parentDimensions;this.setDims(n*i,s*r),this.fixAndSetPosition(),this._onResized()}_onResized(){}#Bt(){if(!this.#bt)return;const{savedX:e,savedY:t,savedWidth:i,savedHeight:r}=this.#bt;this.#bt=null;const n=this.x,s=this.y,a=this.width,o=this.height;n===e&&s===t&&a===i&&o===r||this.addCommands({cmd:this.#Ht.bind(this,n,s,a,o),undo:this.#Ht.bind(this,e,t,i,r),mustExec:!0})}static _round(e){return Math.round(1e4*e)/1e4}#Ot(e,t){const[i,r]=this.parentDimensions,n=this.x,s=this.y,a=this.width,o=this.height,l=Kl.MIN_SIZE/i,h=Kl.MIN_SIZE/r,c=this.#Dt(this.rotation),d=(e,t)=>[c[0]*e+c[2]*t,c[1]*e+c[3]*t],u=this.#Dt(360-this.rotation);let p,m,g=!1,f=!1;switch(e){case"topLeft":g=!0,p=(e,t)=>[0,0],m=(e,t)=>[e,t];break;case"topMiddle":p=(e,t)=>[e/2,0],m=(e,t)=>[e/2,t];break;case"topRight":g=!0,p=(e,t)=>[e,0],m=(e,t)=>[0,t];break;case"middleRight":f=!0,p=(e,t)=>[e,t/2],m=(e,t)=>[0,t/2];break;case"bottomRight":g=!0,p=(e,t)=>[e,t],m=(e,t)=>[0,0];break;case"bottomMiddle":p=(e,t)=>[e/2,t],m=(e,t)=>[e/2,0];break;case"bottomLeft":g=!0,p=(e,t)=>[0,t],m=(e,t)=>[e,0];break;case"middleLeft":f=!0,p=(e,t)=>[0,t/2],m=(e,t)=>[e,t/2]}const b=p(a,o),v=m(a,o);let y=d(...v);const w=Kl._round(n+y[0]),x=Kl._round(s+y[1]);let A,k,E=1,S=1;if(t.fromKeyboard)({deltaX:A,deltaY:k}=t);else{const{screenX:e,screenY:i}=t,[r,n]=this.#ft;[A,k]=this.screenToPageTranslation(e-r,i-n),this.#ft[0]=e,this.#ft[1]=i}var C,M;if([A,k]=(C=A/i,M=k/r,[u[0]*C+u[2]*M,u[1]*C+u[3]*M]),g){const e=Math.hypot(a,o);E=S=Math.max(Math.min(Math.hypot(v[0]-b[0]-A,v[1]-b[1]-k)/e,1/a,1/o),l/a,h/o)}else f?E=Math.max(l,Math.min(1,Math.abs(v[0]-b[0]-A)))/a:S=Math.max(h,Math.min(1,Math.abs(v[1]-b[1]-k)))/o;const _=Kl._round(a*E),T=Kl._round(o*S);y=d(...m(_,T));const N=w-y[0],I=x-y[1];this.#xt||=[this.x,this.y,this.width,this.height],this.width=_,this.height=T,this.x=N,this.y=I,this.setDims(i*_,r*T),this.fixAndSetPosition(),this._onResizing()}_onResizing(){}altTextFinish(){this.#o?.finish()}async addEditToolbar(){return this._editToolbar||this.#kt||(this._editToolbar=new Bl(this),this.div.append(this._editToolbar.render()),this.#o&&await this._editToolbar.addAltText(this.#o)),this._editToolbar}removeEditToolbar(){this._editToolbar&&(this._editToolbar.remove(),this._editToolbar=null,this.#o?.destroy())}addContainer(e){const t=this._editToolbar?.div;t?t.before(e):this.div.append(e)}getClientDimensions(){return this.div.getBoundingClientRect()}async addAltTextButton(){this.#o||(Xl.initialize(Kl._l10n),this.#o=new Xl(this),this.#ht&&(this.#o.data=this.#ht,this.#ht=null),await this.addEditToolbar())}get altTextData(){return this.#o?.data}set altTextData(e){this.#o&&(this.#o.data=e)}get guessedAltText(){return this.#o?.guessedText}async setGuessedAltText(e){await(this.#o?.setGuessedText(e))}serializeAltText(e){return this.#o?.serialize(e)}hasAltText(){return!!this.#o&&!this.#o.isEmpty()}hasAltTextData(){return this.#o?.hasData()??!1}render(){this.div=document.createElement("div"),this.div.setAttribute("data-editor-rotation",(360-this.rotation)%360),this.div.className=this.name,this.div.setAttribute("id",this.id),this.div.tabIndex=this.#dt?-1:0,this._isVisible||this.div.classList.add("hidden"),this.setInForeground(),this.#qt();const[e,t]=this.parentDimensions;this.parentRotation%180!=0&&(this.div.style.maxWidth=`${(100*t/e).toFixed(2)}%`,this.div.style.maxHeight=`${(100*e/t).toFixed(2)}%`);const[i,r]=this.getInitialTranslation();return this.translate(i,r),ql(this,this.div,["pointerdown"]),this.isResizable&&this._uiManager._supportsPinchToZoom&&(this.#Tt||=new Yl({container:this.div,isPinchingDisabled:()=>!this.isSelected,onPinchStart:this.#jt.bind(this),onPinching:this.#Vt.bind(this),onPinchEnd:this.#Ut.bind(this),signal:this._uiManager._signal})),this._uiManager._editorUndoBar?.hide(),this.div}#jt(){this.#bt={savedX:this.x,savedY:this.y,savedWidth:this.width,savedHeight:this.height},this.#o?.toggle(!1),this.parent.togglePointerEvents(!1)}#Vt(e,t,i){let r=i/t*.7+1-.7;if(1===r)return;const n=this.#Dt(this.rotation),s=(e,t)=>[n[0]*e+n[2]*t,n[1]*e+n[3]*t],[a,o]=this.parentDimensions,l=this.x,h=this.y,c=this.width,d=this.height,u=Kl.MIN_SIZE/a,p=Kl.MIN_SIZE/o;r=Math.max(Math.min(r,1/c,1/d),u/c,p/d);const m=Kl._round(c*r),g=Kl._round(d*r);if(m===c&&g===d)return;this.#xt||=[l,h,c,d];const f=s(c/2,d/2),b=Kl._round(l+f[0]),v=Kl._round(h+f[1]),y=s(m/2,g/2);this.x=b-y[0],this.y=v-y[1],this.width=m,this.height=g,this.setDims(a*m,o*g),this.fixAndSetPosition(),this._onResizing()}#Ut(){this.#o?.toggle(!0),this.parent.togglePointerEvents(!0),this.#Bt()}pointerdown(e){const{isMac:t}=ul.platform;0!==e.button||e.ctrlKey&&t?e.preventDefault():(this.#wt=!0,this._isDraggable?this.#Gt(e):this.#$t(e))}get isSelected(){return this._uiManager.isSelected(this)}#$t(e){const{isMac:t}=ul.platform;e.ctrlKey&&!t||e.shiftKey||e.metaKey&&t?this.parent.toggleSelected(this):this.parent.setSelected(this)}#Gt(e){const{isSelected:t}=this;this._uiManager.setUpDragSession();let i=!1;const r=new AbortController,n=this._uiManager.combinedSignal(r),s={capture:!0,passive:!1,signal:n},a=e=>{r.abort(),this.#ut=null,this.#wt=!1,this._uiManager.endDragSession()||this.#$t(e),i&&this._onStopDragging()};t&&(this.#Ct=e.clientX,this.#Mt=e.clientY,this.#ut=e.pointerId,this.#pt=e.pointerType,window.addEventListener("pointermove",(e=>{i||(i=!0,this._onStartDragging());const{clientX:t,clientY:r,pointerId:n}=e;if(n!==this.#ut)return void Il(e);const[s,a]=this.screenToPageTranslation(t-this.#Ct,r-this.#Mt);this.#Ct=t,this.#Mt=r,this._uiManager.dragSelectedEditors(s,a)}),s),window.addEventListener("touchmove",Il,s),window.addEventListener("pointerdown",(e=>{e.pointerType===this.#pt&&(this.#Tt||e.isPrimary)&&a(e),Il(e)}),s));const o=e=>{this.#ut&&this.#ut!==e.pointerId?Il(e):a(e)};window.addEventListener("pointerup",o,{signal:n}),window.addEventListener("blur",o,{signal:n})}_onStartDragging(){}_onStopDragging(){}moveInDOM(){this.#St&&clearTimeout(this.#St),this.#St=setTimeout((()=>{this.#St=null,this.parent?.moveEditorInDOM(this)}),0)}_setParentAndPosition(e,t,i){e.changeParent(this),this.x=t,this.y=i,this.fixAndSetPosition(),this._onTranslated()}getRect(e,t,i=this.rotation){const r=this.parentScale,[n,s]=this.pageDimensions,[a,o]=this.pageTranslation,l=e/r,h=t/r,c=this.x*n,d=this.y*s,u=this.width*n,p=this.height*s;switch(i){case 0:return[c+l+a,s-d-h-p+o,c+l+u+a,s-d-h+o];case 90:return[c+h+a,s-d+l+o,c+h+p+a,s-d+l+u+o];case 180:return[c-l-u+a,s-d+h+o,c-l+a,s-d+h+p+o];case 270:return[c-h-p+a,s-d-l-u+o,c-h+a,s-d-l+o];default:throw new Error("Invalid rotation")}}getRectInCurrentCoords(e,t){const[i,r,n,s]=e,a=n-i,o=s-r;switch(this.rotation){case 0:return[i,t-s,a,o];case 90:return[i,t-r,o,a];case 180:return[n,t-r,a,o];case 270:return[n,t-s,o,a];default:throw new Error("Invalid rotation")}}onceAdded(e){}isEmpty(){return!1}enableEditMode(){this.#kt=!0}disableEditMode(){this.#kt=!1}isInEditMode(){return this.#kt}shouldGetKeyboardEvents(){return this.#Et}needsToBeRebuilt(){return this.div&&!this.isAttachedToDOM}get isOnScreen(){const{top:e,left:t,bottom:i,right:r}=this.getClientDimensions(),{innerHeight:n,innerWidth:s}=window;return t<s&&r>0&&e<n&&i>0}#qt(){if(this.#vt||!this.div)return;this.#vt=new AbortController;const e=this._uiManager.combinedSignal(this.#vt);this.div.addEventListener("focusin",this.focusin.bind(this),{signal:e}),this.div.addEventListener("focusout",this.focusout.bind(this),{signal:e})}rebuild(){this.#qt()}rotate(e){}resize(){}serializeDeleted(){return{id:this.annotationElementId,deleted:!0,pageIndex:this.pageIndex,popupRef:this._initialData?.popupRef||""}}serialize(e=!1,t=null){Zo("An editor must be serializable")}static async deserialize(e,t,i){const r=new this.prototype.constructor({parent:t,id:t.getNextId(),uiManager:i});r.rotation=e.rotation,r.#ht=e.accessibilityData;const[n,s]=r.pageDimensions,[a,o,l,h]=r.getRectInCurrentCoords(e.rect,s);return r.x=a/n,r.y=o/s,r.width=l/n,r.height=h/s,r}get hasBeenModified(){return!!this.annotationElementId&&(this.deleted||null!==this.serialize())}remove(){if(this.#vt?.abort(),this.#vt=null,this.isEmpty()||this.commit(),this.parent?this.parent.remove(this):this._uiManager.removeEditor(this),this.#St&&(clearTimeout(this.#St),this.#St=null),this.#Lt(),this.removeEditToolbar(),this.#_t){for(const e of this.#_t.values())clearTimeout(e);this.#_t=null}this.parent=null,this.#Tt?.destroy(),this.#Tt=null}get isResizable(){return!1}makeResizable(){this.isResizable&&(this.#zt(),this.#gt.classList.remove("hidden"),ql(this,this.div,["keydown"]))}get toolbarPosition(){return null}keydown(e){if(!this.isResizable||e.target!==this.div||"Enter"!==e.key)return;this._uiManager.setSelected(this),this.#bt={savedX:this.x,savedY:this.y,savedWidth:this.width,savedHeight:this.height};const t=this.#gt.children;if(!this.#ct){this.#ct=Array.from(t);const e=this.#Wt.bind(this),i=this.#Xt.bind(this),r=this._uiManager._signal;for(const t of this.#ct){const n=t.getAttribute("data-resizer-name");t.setAttribute("role","spinbutton"),t.addEventListener("keydown",e,{signal:r}),t.addEventListener("blur",i,{signal:r}),t.addEventListener("focus",this.#Yt.bind(this,n),{signal:r}),t.setAttribute("data-l10n-id",Kl._l10nResizer[n])}}const i=this.#ct[0];let r=0;for(const e of t){if(e===i)break;r++}const n=(360-this.rotation+this.parentRotation)%360/90*(this.#ct.length/4);if(n!==r){if(n<r)for(let e=0;e<r-n;e++)this.#gt.append(this.#gt.firstChild);else if(n>r)for(let e=0;e<n-r;e++)this.#gt.firstChild.before(this.#gt.lastChild);let e=0;for(const i of t){const t=this.#ct[e++].getAttribute("data-resizer-name");i.setAttribute("data-l10n-id",Kl._l10nResizer[t])}}this.#Kt(0),this.#Et=!0,this.#gt.firstChild.focus({focusVisible:!0}),e.preventDefault(),e.stopImmediatePropagation()}#Wt(e){Kl._resizerKeyboardManager.exec(this,e)}#Xt(e){this.#Et&&e.relatedTarget?.parentNode!==this.#gt&&this.#Lt()}#Yt(e){this.#yt=this.#Et?e:""}#Kt(e){if(this.#ct)for(const t of this.#ct)t.tabIndex=e}_resizeWithKeyboard(e,t){this.#Et&&this.#Ot(this.#yt,{deltaX:e,deltaY:t,fromKeyboard:!0})}#Lt(){this.#Et=!1,this.#Kt(-1),this.#Bt()}_stopResizingWithKeyboard(){this.#Lt(),this.div.focus()}select(){this.makeResizable(),this.div?.classList.add("selectedEditor"),this._editToolbar?(this._editToolbar?.show(),this.#o?.toggleAltTextBadge(!1)):this.addEditToolbar().then((()=>{this.div?.classList.contains("selectedEditor")&&this._editToolbar?.show()}))}unselect(){this.#gt?.classList.add("hidden"),this.div?.classList.remove("selectedEditor"),this.div?.contains(document.activeElement)&&this._uiManager.currentLayer.div.focus({preventScroll:!0}),this._editToolbar?.hide(),this.#o?.toggleAltTextBadge(!0)}updateParams(e,t){}disableEditing(){}enableEditing(){}enterInEditMode(){}getImageForAltText(){return null}get contentDiv(){return this.div}get isEditing(){return this.#At}set isEditing(e){this.#At=e,this.parent&&(e?(this.parent.setSelected(this),this.parent.setActiveEditor(this)):this.parent.setActiveEditor(null))}setAspectRatio(e,t){this.#mt=!0;const i=e/t,{style:r}=this.div;r.aspectRatio=i,r.height="auto"}static get MIN_SIZE(){return 16}static canCreateNewEmptyEditor(){return!0}get telemetryInitialData(){return{action:"added"}}get telemetryFinalData(){return null}_reportTelemetry(e,t=!1){if(t){this.#_t||=new Map;const{action:t}=e;let i=this.#_t.get(t);return i&&clearTimeout(i),i=setTimeout((()=>{this._reportTelemetry(e),this.#_t.delete(t),0===this.#_t.size&&(this.#_t=null)}),Kl._telemetryTimeout),void this.#_t.set(t,i)}e.type||=this.editorType,this._uiManager._eventBus.dispatch("reporttelemetry",{source:this,details:{type:"editing",data:e}})}show(e=this._isVisible){this.div.classList.toggle("hidden",!e),this._isVisible=e}enable(){this.div&&(this.div.tabIndex=0),this.#dt=!1}disable(){this.div&&(this.div.tabIndex=-1),this.#dt=!0}renderAnnotationElement(e){let t=e.container.querySelector(".annotationContent");if(t){if("CANVAS"===t.nodeName){const e=t;t=document.createElement("div"),t.classList.add("annotationContent",this.editorType),e.before(t)}}else t=document.createElement("div"),t.classList.add("annotationContent",this.editorType),e.container.prepend(t);return t}resetAnnotationElement(e){const{firstChild:t}=e.container;"DIV"===t?.nodeName&&t.classList.contains("annotationContent")&&t.remove()}}class Zl extends Kl{constructor(e){super(e),this.annotationElementId=e.annotationElementId,this.deleted=!0}serialize(){return this.serializeDeleted()}}const Jl=3285377520,Ql=4294901760,eh=65535;class th{constructor(e){this.h1=e?4294967295&e:Jl,this.h2=e?4294967295&e:Jl}update(e){let t,i;if("string"==typeof e){t=new Uint8Array(2*e.length),i=0;for(let r=0,n=e.length;r<n;r++){const n=e.charCodeAt(r);n<=255?t[i++]=n:(t[i++]=n>>>8,t[i++]=255&n)}}else{if(!ArrayBuffer.isView(e))throw new Error("Invalid data format, must be a string or TypedArray.");t=e.slice(),i=t.byteLength}const r=i>>2,n=i-4*r,s=new Uint32Array(t.buffer,0,r);let a=0,o=0,l=this.h1,h=this.h2;const c=3432918353,d=461845907,u=11601,p=13715;for(let e=0;e<r;e++)1&e?(a=s[e],a=a*c&Ql|a*u&eh,a=a<<15|a>>>17,a=a*d&Ql|a*p&eh,l^=a,l=l<<13|l>>>19,l=5*l+3864292196):(o=s[e],o=o*c&Ql|o*u&eh,o=o<<15|o>>>17,o=o*d&Ql|o*p&eh,h^=o,h=h<<13|h>>>19,h=5*h+3864292196);switch(a=0,n){case 3:a^=t[4*r+2]<<16;case 2:a^=t[4*r+1]<<8;case 1:a^=t[4*r],a=a*c&Ql|a*u&eh,a=a<<15|a>>>17,a=a*d&Ql|a*p&eh,1&r?l^=a:h^=a}this.h1=l,this.h2=h}hexdigest(){let e=this.h1,t=this.h2;return e^=t>>>1,e=3981806797*e&Ql|36045*e&eh,t=4283543511*t&Ql|(2950163797*(t<<16|e>>>16)&Ql)>>>16,e^=t>>>1,e=444984403*e&Ql|60499*e&eh,t=3301882366*t&Ql|(3120437893*(t<<16|e>>>16)&Ql)>>>16,e^=t>>>1,(e>>>0).toString(16).padStart(8,"0")+(t>>>0).toString(16).padStart(8,"0")}}const ih=Object.freeze({map:null,hash:"",transfer:void 0});class rh{#Zt=!1;#Jt=null;#Qt=new Map;constructor(){this.onSetModified=null,this.onResetModified=null,this.onAnnotationEditor=null}getValue(e,t){const i=this.#Qt.get(e);return void 0===i?t:Object.assign(t,i)}getRawValue(e){return this.#Qt.get(e)}remove(e){if(this.#Qt.delete(e),0===this.#Qt.size&&this.resetModified(),"function"==typeof this.onAnnotationEditor){for(const e of this.#Qt.values())if(e instanceof Kl)return;this.onAnnotationEditor(null)}}setValue(e,t){const i=this.#Qt.get(e);let r=!1;if(void 0!==i)for(const[e,n]of Object.entries(t))i[e]!==n&&(r=!0,i[e]=n);else r=!0,this.#Qt.set(e,t);r&&this.#ei(),t instanceof Kl&&"function"==typeof this.onAnnotationEditor&&this.onAnnotationEditor(t.constructor._type)}has(e){return this.#Qt.has(e)}getAll(){return this.#Qt.size>0?dl(this.#Qt):null}setAll(e){for(const[t,i]of Object.entries(e))this.setValue(t,i)}get size(){return this.#Qt.size}#ei(){this.#Zt||(this.#Zt=!0,"function"==typeof this.onSetModified&&this.onSetModified())}resetModified(){this.#Zt&&(this.#Zt=!1,"function"==typeof this.onResetModified&&this.onResetModified())}get print(){return new nh(this)}get serializable(){if(0===this.#Qt.size)return ih;const e=new Map,t=new th,i=[],r=Object.create(null);let n=!1;for(const[i,s]of this.#Qt){const a=s instanceof Kl?s.serialize(!1,r):s;a&&(e.set(i,a),t.update(`${i}:${JSON.stringify(a)}`),n||=!!a.bitmap)}if(n)for(const t of e.values())t.bitmap&&i.push(t.bitmap);return e.size>0?{map:e,hash:t.hexdigest(),transfer:i}:ih}get editorStats(){let e=null;const t=new Map;for(const i of this.#Qt.values()){if(!(i instanceof Kl))continue;const r=i.telemetryFinalData;if(!r)continue;const{type:n}=r;t.has(n)||t.set(n,Object.getPrototypeOf(i).constructor),e||=Object.create(null);const s=e[n]||=new Map;for(const[e,t]of Object.entries(r)){if("type"===e)continue;let i=s.get(e);i||(i=new Map,s.set(e,i));const r=i.get(t)??0;i.set(t,r+1)}}for(const[i,r]of t)e[i]=r.computeTelemetryFinalData(e[i]);return e}resetModifiedIds(){this.#Jt=null}get modifiedIds(){if(this.#Jt)return this.#Jt;const e=[];for(const t of this.#Qt.values())t instanceof Kl&&t.annotationElementId&&t.serialize()&&e.push(t.annotationElementId);return this.#Jt={ids:new Set(e),hash:e.join(",")}}}class nh extends rh{#ti;constructor(e){super();const{map:t,hash:i,transfer:r}=e.serializable,n=structuredClone(t,r?{transfer:r}:null);this.#ti={map:n,hash:i,transfer:r}}get print(){Zo("Should not call PrintAnnotationStorage.print")}get serializable(){return this.#ti}get modifiedIds(){return el(this,"modifiedIds",{ids:new Set,hash:""})}}class sh{#ii=new Set;constructor({ownerDocument:e=globalThis.document,styleElement:t=null}){this._document=e,this.nativeFontFaces=new Set,this.styleElement=null,this.loadingRequests=[],this.loadTestFontId=0}addNativeFontFace(e){this.nativeFontFaces.add(e),this._document.fonts.add(e)}removeNativeFontFace(e){this.nativeFontFaces.delete(e),this._document.fonts.delete(e)}insertRule(e){this.styleElement||(this.styleElement=this._document.createElement("style"),this._document.documentElement.getElementsByTagName("head")[0].append(this.styleElement));const t=this.styleElement.sheet;t.insertRule(e,t.cssRules.length)}clear(){for(const e of this.nativeFontFaces)this._document.fonts.delete(e);this.nativeFontFaces.clear(),this.#ii.clear(),this.styleElement&&(this.styleElement.remove(),this.styleElement=null)}async loadSystemFont({systemFontInfo:e,_inspectFont:t}){if(e&&!this.#ii.has(e.loadedName))if(Jo(!this.disableFontFace,"loadSystemFont shouldn't be called when `disableFontFace` is set."),this.isFontLoadingAPISupported){const{loadedName:i,src:r,style:n}=e,s=new FontFace(i,r,n);this.addNativeFontFace(s);try{await s.load(),this.#ii.add(i),t?.(e)}catch{Ko(`Cannot load system font: ${e.baseFontName}, installing it could help to improve PDF rendering.`),this.removeNativeFontFace(s)}}else Zo("Not implemented: loadSystemFont without the Font Loading API.")}async bind(e){if(e.attached||e.missingFile&&!e.systemFontInfo)return;if(e.attached=!0,e.systemFontInfo)return void await this.loadSystemFont(e);if(this.isFontLoadingAPISupported){const t=e.createNativeFontFace();if(t){this.addNativeFontFace(t);try{await t.loaded}catch(i){throw Ko(`Failed to load font '${t.family}': '${i}'.`),e.disableFontFace=!0,i}}return}const t=e.createFontFaceRule();if(t){if(this.insertRule(t),this.isSyncFontLoadingSupported)return;await new Promise((t=>{const i=this._queueLoadingCallback(t);this._prepareFontLoadEvent(e,i)}))}}get isFontLoadingAPISupported(){return el(this,"isFontLoadingAPISupported",!!this._document?.fonts)}get isSyncFontLoadingSupported(){let e=!1;return(Ka||"undefined"!=typeof navigator&&"string"==typeof navigator?.userAgent&&/Mozilla\/5.0.*?rv:\d+.*? Gecko/.test(navigator.userAgent))&&(e=!0),el(this,"isSyncFontLoadingSupported",e)}_queueLoadingCallback(e){const{loadingRequests:t}=this,i={done:!1,complete:function(){for(Jo(!i.done,"completeRequest() cannot be called twice."),i.done=!0;t.length>0&&t[0].done;){const e=t.shift();setTimeout(e.callback,0)}},callback:e};return t.push(i),i}get _loadTestFont(){return el(this,"_loadTestFont",atob("T1RUTwALAIAAAwAwQ0ZGIDHtZg4AAAOYAAAAgUZGVE1lkzZwAAAEHAAAABxHREVGABQAFQAABDgAAAAeT1MvMlYNYwkAAAEgAAAAYGNtYXABDQLUAAACNAAAAUJoZWFk/xVFDQAAALwAAAA2aGhlYQdkA+oAAAD0AAAAJGhtdHgD6AAAAAAEWAAAAAZtYXhwAAJQAAAAARgAAAAGbmFtZVjmdH4AAAGAAAAAsXBvc3T/hgAzAAADeAAAACAAAQAAAAEAALZRFsRfDzz1AAsD6AAAAADOBOTLAAAAAM4KHDwAAAAAA+gDIQAAAAgAAgAAAAAAAAABAAADIQAAAFoD6AAAAAAD6AABAAAAAAAAAAAAAAAAAAAAAQAAUAAAAgAAAAQD6AH0AAUAAAKKArwAAACMAooCvAAAAeAAMQECAAACAAYJAAAAAAAAAAAAAQAAAAAAAAAAAAAAAFBmRWQAwAAuAC4DIP84AFoDIQAAAAAAAQAAAAAAAAAAACAAIAABAAAADgCuAAEAAAAAAAAAAQAAAAEAAAAAAAEAAQAAAAEAAAAAAAIAAQAAAAEAAAAAAAMAAQAAAAEAAAAAAAQAAQAAAAEAAAAAAAUAAQAAAAEAAAAAAAYAAQAAAAMAAQQJAAAAAgABAAMAAQQJAAEAAgABAAMAAQQJAAIAAgABAAMAAQQJAAMAAgABAAMAAQQJAAQAAgABAAMAAQQJAAUAAgABAAMAAQQJAAYAAgABWABYAAAAAAAAAwAAAAMAAAAcAAEAAAAAADwAAwABAAAAHAAEACAAAAAEAAQAAQAAAC7//wAAAC7////TAAEAAAAAAAABBgAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAAAD/gwAyAAAAAQAAAAAAAAAAAAAAAAAAAAABAAQEAAEBAQJYAAEBASH4DwD4GwHEAvgcA/gXBIwMAYuL+nz5tQXkD5j3CBLnEQACAQEBIVhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYAAABAQAADwACAQEEE/t3Dov6fAH6fAT+fPp8+nwHDosMCvm1Cvm1DAz6fBQAAAAAAAABAAAAAMmJbzEAAAAAzgTjFQAAAADOBOQpAAEAAAAAAAAADAAUAAQAAAABAAAAAgABAAAAAAAAAAAD6AAAAAAAAA=="))}_prepareFontLoadEvent(e,t){function i(e,t){return e.charCodeAt(t)<<24|e.charCodeAt(t+1)<<16|e.charCodeAt(t+2)<<8|255&e.charCodeAt(t+3)}function r(e,t,i,r){return e.substring(0,t)+r+e.substring(t+i)}let n,s;const a=this._document.createElement("canvas");a.width=1,a.height=1;const o=a.getContext("2d");let l=0;const h=`lt${Date.now()}${this.loadTestFontId++}`;let c=this._loadTestFont;c=r(c,976,h.length,h);const d=1482184792;let u=i(c,16);for(n=0,s=h.length-3;n<s;n+=4)u=u-d+i(h,n)|0;var p;n<h.length&&(u=u-d+i(h+"XXX",n)|0),c=r(c,16,4,(p=u,String.fromCharCode(p>>24&255,p>>16&255,p>>8&255,255&p)));const m=`@font-face {font-family:"${h}";src:${`url(data:font/opentype;base64,${btoa(c)});`}}`;this.insertRule(m);const g=this._document.createElement("div");g.style.visibility="hidden",g.style.width=g.style.height="10px",g.style.position="absolute",g.style.top=g.style.left="0px";for(const t of[e.loadedName,h]){const e=this._document.createElement("span");e.textContent="Hi",e.style.fontFamily=t,g.append(e)}this._document.body.append(g),function e(t,i){if(++l>30)return Ko("Load test font never loaded."),void i();o.font="30px "+t,o.fillText(".",0,20),o.getImageData(0,0,1,1).data[3]>0?i():setTimeout(e.bind(null,t,i))}(h,(()=>{g.remove(),t.complete()}))}}class ah{constructor(e,{disableFontFace:t=!1,fontExtraProperties:i=!1,inspectFont:r=null}){this.compiledGlyphs=Object.create(null);for(const t in e)this[t]=e[t];this.disableFontFace=!0===t,this.fontExtraProperties=!0===i,this._inspectFont=r}createNativeFontFace(){if(!this.data||this.disableFontFace)return null;let e;if(this.cssFontInfo){const t={weight:this.cssFontInfo.fontWeight};this.cssFontInfo.italicAngle&&(t.style=`oblique ${this.cssFontInfo.italicAngle}deg`),e=new FontFace(this.cssFontInfo.fontFamily,this.data,t)}else e=new FontFace(this.loadedName,this.data,{});return this._inspectFont?.(this),e}createFontFaceRule(){if(!this.data||this.disableFontFace)return null;const e=`url(data:${this.mimetype};base64,${t=this.data,Uint8Array.prototype.toBase64?t.toBase64():btoa(hl(t))});`;var t;let i;if(this.cssFontInfo){let t=`font-weight: ${this.cssFontInfo.fontWeight};`;this.cssFontInfo.italicAngle&&(t+=`font-style: oblique ${this.cssFontInfo.italicAngle}deg;`),i=`@font-face {font-family:"${this.cssFontInfo.fontFamily}";${t}src:${e}}`}else i=`@font-face {font-family:"${this.loadedName}";src:${e}}`;return this._inspectFont?.(this,e),i}getPathGenerator(e,t){if(void 0!==this.compiledGlyphs[t])return this.compiledGlyphs[t];const i=this.loadedName+"_path_"+t;let r;try{r=e.get(i)}catch(e){Ko(`getPathGenerator - ignoring character: "${e}".`)}const n=new Path2D(r||"");return this.fontExtraProperties||e.delete(i),this.compiledGlyphs[t]=n}}const oh=1,lh=2,hh=1,ch=2,dh=3,uh=4,ph=5,mh=6,gh=7,fh=8;function bh(){}function vh(e){if(e instanceof ll||e instanceof nl||e instanceof sl||e instanceof il||e instanceof al||e instanceof rl)return e;switch(e instanceof Error||"object"==typeof e&&null!==e||Zo('wrapReason: Expected "reason" to be a (possibly cloned) Error.'),e.name){case"AbortException":return new ll(e.message);case"InvalidPDFException":return new nl(e.message);case"MissingPDFException":return new sl(e.message);case"PasswordException":return new il(e.message,e.code);case"UnexpectedResponseException":return new al(e.message,e.status);case"UnknownErrorException":return new rl(e.message,e.details)}return new rl(e.message,e.toString())}class yh{#ri=new AbortController;constructor(e,t,i){this.sourceName=e,this.targetName=t,this.comObj=i,this.callbackId=1,this.streamId=1,this.streamSinks=Object.create(null),this.streamControllers=Object.create(null),this.callbackCapabilities=Object.create(null),this.actionHandler=Object.create(null),i.addEventListener("message",this.#ni.bind(this),{signal:this.#ri.signal})}#ni({data:e}){if(e.targetName!==this.sourceName)return;if(e.stream)return void this.#si(e);if(e.callback){const t=e.callbackId,i=this.callbackCapabilities[t];if(!i)throw new Error(`Cannot resolve callback ${t}`);if(delete this.callbackCapabilities[t],e.callback===oh)i.resolve(e.data);else{if(e.callback!==lh)throw new Error("Unexpected callback case");i.reject(vh(e.reason))}return}const t=this.actionHandler[e.action];if(!t)throw new Error(`Unknown action from worker: ${e.action}`);if(e.callbackId){const i=this.sourceName,r=e.sourceName,n=this.comObj;Promise.try(t,e.data).then((function(t){n.postMessage({sourceName:i,targetName:r,callback:oh,callbackId:e.callbackId,data:t})}),(function(t){n.postMessage({sourceName:i,targetName:r,callback:lh,callbackId:e.callbackId,reason:vh(t)})}))}else e.streamId?this.#ai(e):t(e.data)}on(e,t){const i=this.actionHandler;if(i[e])throw new Error(`There is already an actionName called "${e}"`);i[e]=t}send(e,t,i){this.comObj.postMessage({sourceName:this.sourceName,targetName:this.targetName,action:e,data:t},i)}sendWithPromise(e,t,i){const r=this.callbackId++,n=Promise.withResolvers();this.callbackCapabilities[r]=n;try{this.comObj.postMessage({sourceName:this.sourceName,targetName:this.targetName,action:e,callbackId:r,data:t},i)}catch(e){n.reject(e)}return n.promise}sendWithStream(e,t,i,r){const n=this.streamId++,s=this.sourceName,a=this.targetName,o=this.comObj;return new ReadableStream({start:i=>{const l=Promise.withResolvers();return this.streamControllers[n]={controller:i,startCall:l,pullCall:null,cancelCall:null,isClosed:!1},o.postMessage({sourceName:s,targetName:a,action:e,streamId:n,data:t,desiredSize:i.desiredSize},r),l.promise},pull:e=>{const t=Promise.withResolvers();return this.streamControllers[n].pullCall=t,o.postMessage({sourceName:s,targetName:a,stream:mh,streamId:n,desiredSize:e.desiredSize}),t.promise},cancel:e=>{Jo(e instanceof Error,"cancel must have a valid reason");const t=Promise.withResolvers();return this.streamControllers[n].cancelCall=t,this.streamControllers[n].isClosed=!0,o.postMessage({sourceName:s,targetName:a,stream:hh,streamId:n,reason:vh(e)}),t.promise}},i)}#ai(e){const t=e.streamId,i=this.sourceName,r=e.sourceName,n=this.comObj,s=this,a=this.actionHandler[e.action],o={enqueue(e,s=1,a){if(this.isCancelled)return;const o=this.desiredSize;this.desiredSize-=s,o>0&&this.desiredSize<=0&&(this.sinkCapability=Promise.withResolvers(),this.ready=this.sinkCapability.promise),n.postMessage({sourceName:i,targetName:r,stream:uh,streamId:t,chunk:e},a)},close(){this.isCancelled||(this.isCancelled=!0,n.postMessage({sourceName:i,targetName:r,stream:dh,streamId:t}),delete s.streamSinks[t])},error(e){Jo(e instanceof Error,"error must have a valid reason"),this.isCancelled||(this.isCancelled=!0,n.postMessage({sourceName:i,targetName:r,stream:ph,streamId:t,reason:vh(e)}))},sinkCapability:Promise.withResolvers(),onPull:null,onCancel:null,isCancelled:!1,desiredSize:e.desiredSize,ready:null};o.sinkCapability.resolve(),o.ready=o.sinkCapability.promise,this.streamSinks[t]=o,Promise.try(a,e.data,o).then((function(){n.postMessage({sourceName:i,targetName:r,stream:fh,streamId:t,success:!0})}),(function(e){n.postMessage({sourceName:i,targetName:r,stream:fh,streamId:t,reason:vh(e)})}))}#si(e){const t=e.streamId,i=this.sourceName,r=e.sourceName,n=this.comObj,s=this.streamControllers[t],a=this.streamSinks[t];switch(e.stream){case fh:e.success?s.startCall.resolve():s.startCall.reject(vh(e.reason));break;case gh:e.success?s.pullCall.resolve():s.pullCall.reject(vh(e.reason));break;case mh:if(!a){n.postMessage({sourceName:i,targetName:r,stream:gh,streamId:t,success:!0});break}a.desiredSize<=0&&e.desiredSize>0&&a.sinkCapability.resolve(),a.desiredSize=e.desiredSize,Promise.try(a.onPull||bh).then((function(){n.postMessage({sourceName:i,targetName:r,stream:gh,streamId:t,success:!0})}),(function(e){n.postMessage({sourceName:i,targetName:r,stream:gh,streamId:t,reason:vh(e)})}));break;case uh:if(Jo(s,"enqueue should have stream controller"),s.isClosed)break;s.controller.enqueue(e.chunk);break;case dh:if(Jo(s,"close should have stream controller"),s.isClosed)break;s.isClosed=!0,s.controller.close(),this.#oi(s,t);break;case ph:Jo(s,"error should have stream controller"),s.controller.error(vh(e.reason)),this.#oi(s,t);break;case ch:e.success?s.cancelCall.resolve():s.cancelCall.reject(vh(e.reason)),this.#oi(s,t);break;case hh:if(!a)break;const o=vh(e.reason);Promise.try(a.onCancel||bh,o).then((function(){n.postMessage({sourceName:i,targetName:r,stream:ch,streamId:t,success:!0})}),(function(e){n.postMessage({sourceName:i,targetName:r,stream:ch,streamId:t,reason:vh(e)})})),a.sinkCapability.reject(o),a.isCancelled=!0,delete this.streamSinks[t];break;default:throw new Error("Unexpected stream case")}}async#oi(e,t){await Promise.allSettled([e.startCall?.promise,e.pullCall?.promise,e.cancelCall?.promise]),delete this.streamControllers[t]}destroy(){this.#ri?.abort(),this.#ri=null}}class wh{#li=!1;constructor({enableHWA:e=!1}){this.#li=e}create(e,t){if(e<=0||t<=0)throw new Error("Invalid canvas size");const i=this._createCanvas(e,t);return{canvas:i,context:i.getContext("2d",{willReadFrequently:!this.#li})}}reset(e,t,i){if(!e.canvas)throw new Error("Canvas is not specified");if(t<=0||i<=0)throw new Error("Invalid canvas size");e.canvas.width=t,e.canvas.height=i}destroy(e){if(!e.canvas)throw new Error("Canvas is not specified");e.canvas.width=0,e.canvas.height=0,e.canvas=null,e.context=null}_createCanvas(e,t){Zo("Abstract method `_createCanvas` called.")}}class xh{constructor({baseUrl:e=null,isCompressed:t=!0}){this.baseUrl=e,this.isCompressed=t}async fetch({name:e}){if(!this.baseUrl)throw new Error("Ensure that the `cMapUrl` and `cMapPacked` API parameters are provided.");if(!e)throw new Error("CMap name must be specified.");const t=this.baseUrl+e+(this.isCompressed?".bcmap":"");return this._fetch(t).then((e=>({cMapData:e,isCompressed:this.isCompressed}))).catch((e=>{throw new Error(`Unable to load ${this.isCompressed?"binary ":""}CMap at: ${t}`)}))}async _fetch(e){Zo("Abstract method `_fetch` called.")}}class Ah extends xh{async _fetch(e){const t=await xl(e,this.isCompressed?"arraybuffer":"text");return t instanceof ArrayBuffer?new Uint8Array(t):cl(t)}}class kh{addFilter(e){return"none"}addHCMFilter(e,t){return"none"}addAlphaFilter(e){return"none"}addLuminosityFilter(e){return"none"}addHighlightHCMFilter(e,t,i,r,n){return"none"}destroy(e=!1){}}class Eh{constructor({baseUrl:e=null}){this.baseUrl=e}async fetch({filename:e}){if(!this.baseUrl)throw new Error("Ensure that the `standardFontDataUrl` API parameter is provided.");if(!e)throw new Error("Font filename must be specified.");const t=`${this.baseUrl}${e}`;return this._fetch(t).catch((e=>{throw new Error(`Unable to load font data at: ${t}`)}))}async _fetch(e){Zo("Abstract method `_fetch` called.")}}class Sh extends Eh{async _fetch(e){const t=await xl(e,"arraybuffer");return new Uint8Array(t)}}async function Ch(e){const t=process.getBuiltinModule("fs"),i=await t.promises.readFile(e);return new Uint8Array(i)}Ka&&Ko("Please use the `legacy` build in Node.js environments.");const Mh="Fill",_h="Stroke",Th="Shading";function Nh(e,t){if(!t)return;const i=t[2]-t[0],r=t[3]-t[1],n=new Path2D;n.rect(t[0],t[1],i,r),e.clip(n)}class Ih{getPattern(){Zo("Abstract method `getPattern` called.")}}class Lh extends Ih{constructor(e){super(),this._type=e[1],this._bbox=e[2],this._colorStops=e[3],this._p0=e[4],this._p1=e[5],this._r0=e[6],this._r1=e[7],this.matrix=null}_createGradient(e){let t;"axial"===this._type?t=e.createLinearGradient(this._p0[0],this._p0[1],this._p1[0],this._p1[1]):"radial"===this._type&&(t=e.createRadialGradient(this._p0[0],this._p0[1],this._r0,this._p1[0],this._p1[1],this._r1));for(const e of this._colorStops)t.addColorStop(e[0],e[1]);return t}getPattern(e,t,i,r){let n;if(r===_h||r===Mh){const s=t.current.getClippedPathBoundingBox(r,Dl(e))||[0,0,0,0],a=Math.ceil(s[2]-s[0])||1,o=Math.ceil(s[3]-s[1])||1,l=t.cachedCanvases.getCanvas("pattern",a,o),h=l.context;h.clearRect(0,0,h.canvas.width,h.canvas.height),h.beginPath(),h.rect(0,0,h.canvas.width,h.canvas.height),h.translate(-s[0],-s[1]),i=ml.transform(i,[1,0,0,1,s[0],s[1]]),h.transform(...t.baseTransform),this.matrix&&h.transform(...this.matrix),Nh(h,this._bbox),h.fillStyle=this._createGradient(h),h.fill(),n=e.createPattern(l.canvas,"no-repeat");const c=new DOMMatrix(i);n.setTransform(c)}else Nh(e,this._bbox),n=this._createGradient(e);return n}}function Ph(e,t,i,r,n,s,a,o){const l=t.coords,h=t.colors,c=e.data,d=4*e.width;let u;l[i+1]>l[r+1]&&(u=i,i=r,r=u,u=s,s=a,a=u),l[r+1]>l[n+1]&&(u=r,r=n,n=u,u=a,a=o,o=u),l[i+1]>l[r+1]&&(u=i,i=r,r=u,u=s,s=a,a=u);const p=(l[i]+t.offsetX)*t.scaleX,m=(l[i+1]+t.offsetY)*t.scaleY,g=(l[r]+t.offsetX)*t.scaleX,f=(l[r+1]+t.offsetY)*t.scaleY,b=(l[n]+t.offsetX)*t.scaleX,v=(l[n+1]+t.offsetY)*t.scaleY;if(m>=v)return;const y=h[s],w=h[s+1],x=h[s+2],A=h[a],k=h[a+1],E=h[a+2],S=h[o],C=h[o+1],M=h[o+2],_=Math.round(m),T=Math.round(v);let N,I,L,P,R,D,z,F;for(let e=_;e<=T;e++){if(e<f){const t=e<m?0:(m-e)/(m-f);N=p-(p-g)*t,I=y-(y-A)*t,L=w-(w-k)*t,P=x-(x-E)*t}else{let t;t=e>v?1:f===v?0:(f-e)/(f-v),N=g-(g-b)*t,I=A-(A-S)*t,L=k-(k-C)*t,P=E-(E-M)*t}let t;t=e<m?0:e>v?1:(m-e)/(m-v),R=p-(p-b)*t,D=y-(y-S)*t,z=w-(w-C)*t,F=x-(x-M)*t;const i=Math.round(Math.min(N,R)),r=Math.round(Math.max(N,R));let n=d*e+4*i;for(let e=i;e<=r;e++)t=(N-e)/(N-R),t<0?t=0:t>1&&(t=1),c[n++]=I-(I-D)*t|0,c[n++]=L-(L-z)*t|0,c[n++]=P-(P-F)*t|0,c[n++]=255}}function Rh(e,t,i){const r=t.coords,n=t.colors;let s,a;switch(t.type){case"lattice":const o=t.verticesPerRow,l=Math.floor(r.length/o)-1,h=o-1;for(s=0;s<l;s++){let t=s*o;for(let s=0;s<h;s++,t++)Ph(e,i,r[t],r[t+1],r[t+o],n[t],n[t+1],n[t+o]),Ph(e,i,r[t+o+1],r[t+1],r[t+o],n[t+o+1],n[t+1],n[t+o])}break;case"triangles":for(s=0,a=r.length;s<a;s+=3)Ph(e,i,r[s],r[s+1],r[s+2],n[s],n[s+1],n[s+2]);break;default:throw new Error("illegal figure")}}class Dh extends Ih{constructor(e){super(),this._coords=e[2],this._colors=e[3],this._figures=e[4],this._bounds=e[5],this._bbox=e[7],this._background=e[8],this.matrix=null}_createMeshCanvas(e,t,i){const r=Math.floor(this._bounds[0]),n=Math.floor(this._bounds[1]),s=Math.ceil(this._bounds[2])-r,a=Math.ceil(this._bounds[3])-n,o=Math.min(Math.ceil(Math.abs(s*e[0]*1.1)),3e3),l=Math.min(Math.ceil(Math.abs(a*e[1]*1.1)),3e3),h=s/o,c=a/l,d={coords:this._coords,colors:this._colors,offsetX:-r,offsetY:-n,scaleX:1/h,scaleY:1/c},u=o+4,p=l+4,m=i.getCanvas("mesh",u,p),g=m.context,f=g.createImageData(o,l);if(t){const e=f.data;for(let i=0,r=e.length;i<r;i+=4)e[i]=t[0],e[i+1]=t[1],e[i+2]=t[2],e[i+3]=255}for(const e of this._figures)Rh(f,e,d);g.putImageData(f,2,2);return{canvas:m.canvas,offsetX:r-2*h,offsetY:n-2*c,scaleX:h,scaleY:c}}getPattern(e,t,i,r){let n;if(Nh(e,this._bbox),r===Th)n=ml.singularValueDecompose2dScale(Dl(e));else if(n=ml.singularValueDecompose2dScale(t.baseTransform),this.matrix){const e=ml.singularValueDecompose2dScale(this.matrix);n=[n[0]*e[0],n[1]*e[1]]}const s=this._createMeshCanvas(n,r===Th?null:this._background,t.cachedCanvases);return r!==Th&&(e.setTransform(...t.baseTransform),this.matrix&&e.transform(...this.matrix)),e.translate(s.offsetX,s.offsetY),e.scale(s.scaleX,s.scaleY),e.createPattern(s.canvas,"no-repeat")}}class zh extends Ih{getPattern(){return"hotpink"}}const Fh=1,Oh=2;class Bh{static MAX_PATTERN_SIZE=3e3;constructor(e,t,i,r,n){this.operatorList=e[2],this.matrix=e[3],this.bbox=e[4],this.xstep=e[5],this.ystep=e[6],this.paintType=e[7],this.tilingType=e[8],this.color=t,this.ctx=i,this.canvasGraphicsFactory=r,this.baseTransform=n}createPatternCanvas(e){const{bbox:t,operatorList:i,paintType:r,tilingType:n,color:s,canvasGraphicsFactory:a}=this;let{xstep:o,ystep:l}=this;o=Math.abs(o),l=Math.abs(l),Yo("TilingType: "+n);const h=t[0],c=t[1],d=t[2],u=t[3],p=d-h,m=u-c,g=ml.singularValueDecompose2dScale(this.matrix),f=ml.singularValueDecompose2dScale(this.baseTransform),b=g[0]*f[0],v=g[1]*f[1];let y=p,w=m,x=!1,A=!1;const k=Math.ceil(o*b),E=Math.ceil(l*v);k>=Math.ceil(p*b)?y=o:x=!0,E>=Math.ceil(m*v)?w=l:A=!0;const S=this.getSizeAndScale(y,this.ctx.canvas.width,b),C=this.getSizeAndScale(w,this.ctx.canvas.height,v),M=e.cachedCanvases.getCanvas("pattern",S.size,C.size),_=M.context,T=a.createCanvasGraphics(_);if(T.groupLevel=e.groupLevel,this.setFillAndStrokeStyleToContext(T,r,s),_.translate(-S.scale*h,-C.scale*c),T.transform(S.scale,0,0,C.scale,0,0),_.save(),this.clipBbox(T,h,c,d,u),T.baseTransform=Dl(T.ctx),T.executeOperatorList(i),T.endDrawing(),_.restore(),x||A){const t=M.canvas;x&&(y=o),A&&(w=l);const i=this.getSizeAndScale(y,this.ctx.canvas.width,b),r=this.getSizeAndScale(w,this.ctx.canvas.height,v),n=i.size,s=r.size,a=e.cachedCanvases.getCanvas("pattern-workaround",n,s),d=a.context,u=x?Math.floor(p/o):0,g=A?Math.floor(m/l):0;for(let e=0;e<=u;e++)for(let i=0;i<=g;i++)d.drawImage(t,n*e,s*i,n,s,0,0,n,s);return{canvas:a.canvas,scaleX:i.scale,scaleY:r.scale,offsetX:h,offsetY:c}}return{canvas:M.canvas,scaleX:S.scale,scaleY:C.scale,offsetX:h,offsetY:c}}getSizeAndScale(e,t,i){const r=Math.max(Bh.MAX_PATTERN_SIZE,t);let n=Math.ceil(e*i);return n>=r?n=r:i=n/e,{scale:i,size:n}}clipBbox(e,t,i,r,n){const s=r-t,a=n-i;e.ctx.rect(t,i,s,a),e.current.updateRectMinMax(Dl(e.ctx),[t,i,r,n]),e.clip(),e.endPath()}setFillAndStrokeStyleToContext(e,t,i){const r=e.ctx,n=e.current;switch(t){case Fh:const e=this.ctx;r.fillStyle=e.fillStyle,r.strokeStyle=e.strokeStyle,n.fillColor=e.fillStyle,n.strokeColor=e.strokeStyle;break;case Oh:const s=ml.makeHexColor(i[0],i[1],i[2]);r.fillStyle=s,r.strokeStyle=s,n.fillColor=s,n.strokeColor=s;break;default:throw new ol(`Unsupported paint type: ${t}`)}}getPattern(e,t,i,r){let n=i;r!==Th&&(n=ml.transform(n,t.baseTransform),this.matrix&&(n=ml.transform(n,this.matrix)));const s=this.createPatternCanvas(t);let a=new DOMMatrix(n);a=a.translate(s.offsetX,s.offsetY),a=a.scale(1/s.scaleX,1/s.scaleY);const o=e.createPattern(s.canvas,"repeat");return o.setTransform(a),o}}function Hh({src:e,srcPos:t=0,dest:i,width:r,height:n,nonBlackColor:s=4294967295,inverseDecode:a=!1}){const o=ul.isLittleEndian?4278190080:255,[l,h]=a?[s,o]:[o,s],c=r>>3,d=7&r,u=e.length;i=new Uint32Array(i.buffer);let p=0;for(let r=0;r<n;r++){for(const r=t+c;t<r;t++){const r=t<u?e[t]:255;i[p++]=128&r?h:l,i[p++]=64&r?h:l,i[p++]=32&r?h:l,i[p++]=16&r?h:l,i[p++]=8&r?h:l,i[p++]=4&r?h:l,i[p++]=2&r?h:l,i[p++]=1&r?h:l}if(0===d)continue;const r=t<u?e[t++]:255;for(let e=0;e<d;e++)i[p++]=r&1<<7-e?h:l}return{srcPos:t,destPos:p}}const qh=16;class jh{constructor(e){this.canvasFactory=e,this.cache=Object.create(null)}getCanvas(e,t,i){let r;return void 0!==this.cache[e]?(r=this.cache[e],this.canvasFactory.reset(r,t,i)):(r=this.canvasFactory.create(t,i),this.cache[e]=r),r}delete(e){delete this.cache[e]}clear(){for(const e in this.cache){const t=this.cache[e];this.canvasFactory.destroy(t),delete this.cache[e]}}}function Vh(e,t,i,r,n,s,a,o,l,h){const[c,d,u,p,m,g]=Dl(e);if(0===d&&0===u){const f=a*c+m,b=Math.round(f),v=o*p+g,y=Math.round(v),w=(a+l)*c+m,x=Math.abs(Math.round(w)-b)||1,A=(o+h)*p+g,k=Math.abs(Math.round(A)-y)||1;return e.setTransform(Math.sign(c),0,0,Math.sign(p),b,y),e.drawImage(t,i,r,n,s,0,0,x,k),e.setTransform(c,d,u,p,m,g),[x,k]}if(0===c&&0===p){const f=o*u+m,b=Math.round(f),v=a*d+g,y=Math.round(v),w=(o+h)*u+m,x=Math.abs(Math.round(w)-b)||1,A=(a+l)*d+g,k=Math.abs(Math.round(A)-y)||1;return e.setTransform(0,Math.sign(d),Math.sign(u),0,b,y),e.drawImage(t,i,r,n,s,0,0,k,x),e.setTransform(c,d,u,p,m,g),[k,x]}e.drawImage(t,i,r,n,s,a,o,l,h);return[Math.hypot(c,d)*l,Math.hypot(u,p)*h]}class Uh{constructor(e,t){this.alphaIsShape=!1,this.fontSize=0,this.fontSizeScale=1,this.textMatrix=Za,this.textMatrixScale=1,this.fontMatrix=Ja,this.leading=0,this.x=0,this.y=0,this.lineX=0,this.lineY=0,this.charSpacing=0,this.wordSpacing=0,this.textHScale=1,this.textRenderingMode=po,this.textRise=0,this.fillColor="#000000",this.strokeColor="#000000",this.patternFill=!1,this.patternStroke=!1,this.fillAlpha=1,this.strokeAlpha=1,this.lineWidth=1,this.activeSMask=null,this.transferMaps="none",this.startNewPathAndClipBox([0,0,e,t])}clone(){const e=Object.create(this);return e.clipBox=this.clipBox.slice(),e}setCurrentPoint(e,t){this.x=e,this.y=t}updatePathMinMax(e,t,i){[t,i]=ml.applyTransform([t,i],e),this.minX=Math.min(this.minX,t),this.minY=Math.min(this.minY,i),this.maxX=Math.max(this.maxX,t),this.maxY=Math.max(this.maxY,i)}updateRectMinMax(e,t){const i=ml.applyTransform(t,e),r=ml.applyTransform(t.slice(2),e),n=ml.applyTransform([t[0],t[3]],e),s=ml.applyTransform([t[2],t[1]],e);this.minX=Math.min(this.minX,i[0],r[0],n[0],s[0]),this.minY=Math.min(this.minY,i[1],r[1],n[1],s[1]),this.maxX=Math.max(this.maxX,i[0],r[0],n[0],s[0]),this.maxY=Math.max(this.maxY,i[1],r[1],n[1],s[1])}updateScalingPathMinMax(e,t){ml.scaleMinMax(e,t),this.minX=Math.min(this.minX,t[0]),this.minY=Math.min(this.minY,t[1]),this.maxX=Math.max(this.maxX,t[2]),this.maxY=Math.max(this.maxY,t[3])}updateCurvePathMinMax(e,t,i,r,n,s,a,o,l,h){const c=ml.bezierBoundingBox(t,i,r,n,s,a,o,l,h);h||this.updateRectMinMax(e,c)}getPathBoundingBox(e=Mh,t=null){const i=[this.minX,this.minY,this.maxX,this.maxY];if(e===_h){t||Zo("Stroke bounding box must include transform.");const e=ml.singularValueDecompose2dScale(t),r=e[0]*this.lineWidth/2,n=e[1]*this.lineWidth/2;i[0]-=r,i[1]-=n,i[2]+=r,i[3]+=n}return i}updateClipFromPath(){const e=ml.intersect(this.clipBox,this.getPathBoundingBox());this.startNewPathAndClipBox(e||[0,0,0,0])}isEmptyClip(){return this.minX===1/0}startNewPathAndClipBox(e){this.clipBox=e,this.minX=1/0,this.minY=1/0,this.maxX=0,this.maxY=0}getClippedPathBoundingBox(e=Mh,t=null){return ml.intersect(this.clipBox,this.getPathBoundingBox(e,t))}}function Gh(e,t){if(t instanceof ImageData)return void e.putImageData(t,0,0);const i=t.height,r=t.width,n=i%qh,s=(i-n)/qh,a=0===n?s:s+1,o=e.createImageData(r,qh);let l,h=0;const c=t.data,d=o.data;let u,p,m,g;if(t.kind===yo.GRAYSCALE_1BPP){const t=c.byteLength,i=new Uint32Array(d.buffer,0,d.byteLength>>2),g=i.length,f=r+7>>3,b=4294967295,v=ul.isLittleEndian?4278190080:255;for(u=0;u<a;u++){for(m=u<s?qh:n,l=0,p=0;p<m;p++){const e=t-h;let n=0;const s=e>f?r:8*e-7,a=-8&s;let o=0,d=0;for(;n<a;n+=8)d=c[h++],i[l++]=128&d?b:v,i[l++]=64&d?b:v,i[l++]=32&d?b:v,i[l++]=16&d?b:v,i[l++]=8&d?b:v,i[l++]=4&d?b:v,i[l++]=2&d?b:v,i[l++]=1&d?b:v;for(;n<s;n++)0===o&&(d=c[h++],o=128),i[l++]=d&o?b:v,o>>=1}for(;l<g;)i[l++]=0;e.putImageData(o,0,u*qh)}}else if(t.kind===yo.RGBA_32BPP){for(p=0,g=r*qh*4,u=0;u<s;u++)d.set(c.subarray(h,h+g)),h+=g,e.putImageData(o,0,p),p+=qh;u<a&&(g=r*n*4,d.set(c.subarray(h,h+g)),e.putImageData(o,0,p))}else{if(t.kind!==yo.RGB_24BPP)throw new Error(`bad image kind: ${t.kind}`);for(m=qh,g=r*m,u=0;u<a;u++){for(u>=s&&(m=n,g=r*m),l=0,p=g;p--;)d[l++]=c[h++],d[l++]=c[h++],d[l++]=c[h++],d[l++]=255;e.putImageData(o,0,u*qh)}}}function $h(e,t){if(t.bitmap)return void e.drawImage(t.bitmap,0,0);const i=t.height,r=t.width,n=i%qh,s=(i-n)/qh,a=0===n?s:s+1,o=e.createImageData(r,qh);let l=0;const h=t.data,c=o.data;for(let t=0;t<a;t++){const i=t<s?qh:n;({srcPos:l}=Hh({src:h,srcPos:l,dest:c,width:r,height:i,nonBlackColor:0})),e.putImageData(o,0,t*qh)}}function Wh(e,t){const i=["strokeStyle","fillStyle","fillRule","globalAlpha","lineWidth","lineCap","lineJoin","miterLimit","globalCompositeOperation","font","filter"];for(const r of i)void 0!==e[r]&&(t[r]=e[r]);void 0!==e.setLineDash&&(t.setLineDash(e.getLineDash()),t.lineDashOffset=e.lineDashOffset)}function Xh(e){if(e.strokeStyle=e.fillStyle="#000000",e.fillRule="nonzero",e.globalAlpha=1,e.lineWidth=1,e.lineCap="butt",e.lineJoin="miter",e.miterLimit=10,e.globalCompositeOperation="source-over",e.font="10px sans-serif",void 0!==e.setLineDash&&(e.setLineDash([]),e.lineDashOffset=0),!Ka){const{filter:t}=e;"none"!==t&&""!==t&&(e.filter="none")}}function Yh(e,t){if(t)return!0;const i=ml.singularValueDecompose2dScale(e);i[0]=Math.fround(i[0]),i[1]=Math.fround(i[1]);const r=Math.fround((globalThis.devicePixelRatio||1)*wl.PDF_TO_CSS_UNITS);return i[0]<=r&&i[1]<=r}const Kh=["butt","round","square"],Zh=["miter","round","bevel"],Jh={},Qh={};class ec{constructor(e,t,i,r,n,{optionalContentConfig:s,markedContentStack:a=null},o,l){this.ctx=e,this.current=new Uh(this.ctx.canvas.width,this.ctx.canvas.height),this.stateStack=[],this.pendingClip=null,this.pendingEOFill=!1,this.res=null,this.xobjs=null,this.commonObjs=t,this.objs=i,this.canvasFactory=r,this.filterFactory=n,this.groupStack=[],this.processingType3=null,this.baseTransform=null,this.baseTransformStack=[],this.groupLevel=0,this.smaskStack=[],this.smaskCounter=0,this.tempSMask=null,this.suspendedCtx=null,this.contentVisible=!0,this.markedContentStack=a||[],this.optionalContentConfig=s,this.cachedCanvases=new jh(this.canvasFactory),this.cachedPatterns=new Map,this.annotationCanvasMap=o,this.viewportScale=1,this.outputScaleX=1,this.outputScaleY=1,this.pageColors=l,this._cachedScaleForStroking=[-1,0],this._cachedGetSinglePixelWidth=null,this._cachedBitmapsMap=new Map}getObject(e,t=null){return"string"==typeof e?e.startsWith("g_")?this.commonObjs.get(e):this.objs.get(e):t}beginDrawing({transform:e,viewport:t,transparency:i=!1,background:r=null}){const n=this.ctx.canvas.width,s=this.ctx.canvas.height,a=this.ctx.fillStyle;if(this.ctx.fillStyle=r||"#ffffff",this.ctx.fillRect(0,0,n,s),this.ctx.fillStyle=a,i){const e=this.cachedCanvases.getCanvas("transparent",n,s);this.compositeCtx=this.ctx,this.transparentCanvas=e.canvas,this.ctx=e.context,this.ctx.save(),this.ctx.transform(...Dl(this.compositeCtx))}this.ctx.save(),Xh(this.ctx),e&&(this.ctx.transform(...e),this.outputScaleX=e[0],this.outputScaleY=e[0]),this.ctx.transform(...t.transform),this.viewportScale=t.scale,this.baseTransform=Dl(this.ctx)}executeOperatorList(e,t,i,r){const n=e.argsArray,s=e.fnArray;let a=t||0;const o=n.length;if(o===a)return a;const l=o-a>10&&"function"==typeof i,h=l?Date.now()+15:0;let c=0;const d=this.commonObjs,u=this.objs;let p;for(;;){if(void 0!==r&&a===r.nextBreakPoint)return r.breakIt(a,i),a;if(p=s[a],p!==Uo.dependency)this[p].apply(this,n[a]);else for(const e of n[a]){const t=e.startsWith("g_")?d:u;if(!t.has(e))return t.get(e,i),a}if(a++,a===o)return a;if(l&&++c>10){if(Date.now()>h)return i(),a;c=0}}}#hi(){for(;this.stateStack.length||this.inSMaskMode;)this.restore();this.current.activeSMask=null,this.ctx.restore(),this.transparentCanvas&&(this.ctx=this.compositeCtx,this.ctx.save(),this.ctx.setTransform(1,0,0,1,0,0),this.ctx.drawImage(this.transparentCanvas,0,0),this.ctx.restore(),this.transparentCanvas=null)}endDrawing(){this.#hi(),this.cachedCanvases.clear(),this.cachedPatterns.clear();for(const e of this._cachedBitmapsMap.values()){for(const t of e.values())"undefined"!=typeof HTMLCanvasElement&&t instanceof HTMLCanvasElement&&(t.width=t.height=0);e.clear()}this._cachedBitmapsMap.clear(),this.#ci()}#ci(){if(this.pageColors){const e=this.filterFactory.addHCMFilter(this.pageColors.foreground,this.pageColors.background);if("none"!==e){const t=this.ctx.filter;this.ctx.filter=e,this.ctx.drawImage(this.ctx.canvas,0,0),this.ctx.filter=t}}}_scaleImage(e,t){const i=e.width??e.displayWidth,r=e.height??e.displayHeight;let n,s,a=Math.max(Math.hypot(t[0],t[1]),1),o=Math.max(Math.hypot(t[2],t[3]),1),l=i,h=r,c="prescale1";for(;a>2&&l>1||o>2&&h>1;){let t=l,i=h;a>2&&l>1&&(t=l>=16384?Math.floor(l/2)-1||1:Math.ceil(l/2),a/=l/t),o>2&&h>1&&(i=h>=16384?Math.floor(h/2)-1||1:Math.ceil(h)/2,o/=h/i),n=this.cachedCanvases.getCanvas(c,t,i),s=n.context,s.clearRect(0,0,t,i),s.drawImage(e,0,0,l,h,0,0,t,i),e=n.canvas,l=t,h=i,c="prescale1"===c?"prescale2":"prescale1"}return{img:e,paintWidth:l,paintHeight:h}}_createMaskCanvas(e){const t=this.ctx,{width:i,height:r}=e,n=this.current.fillColor,s=this.current.patternFill,a=Dl(t);let o,l,h,c;if((e.bitmap||e.data)&&e.count>1){const t=e.bitmap||e.data.buffer;l=JSON.stringify(s?a:[a.slice(0,4),n]),o=this._cachedBitmapsMap.get(t),o||(o=new Map,this._cachedBitmapsMap.set(t,o));const i=o.get(l);if(i&&!s){return{canvas:i,offsetX:Math.round(Math.min(a[0],a[2])+a[4]),offsetY:Math.round(Math.min(a[1],a[3])+a[5])}}h=i}h||(c=this.cachedCanvases.getCanvas("maskCanvas",i,r),$h(c.context,e));let d=ml.transform(a,[1/i,0,0,-1/r,0,0]);d=ml.transform(d,[1,0,0,1,0,-r]);const[u,p,m,g]=ml.getAxialAlignedBoundingBox([0,0,i,r],d),f=Math.round(m-u)||1,b=Math.round(g-p)||1,v=this.cachedCanvases.getCanvas("fillCanvas",f,b),y=v.context,w=u,x=p;y.translate(-w,-x),y.transform(...d),h||(h=this._scaleImage(c.canvas,zl(y)),h=h.img,o&&s&&o.set(l,h)),y.imageSmoothingEnabled=Yh(Dl(y),e.interpolate),Vh(y,h,0,0,h.width,h.height,0,0,i,r),y.globalCompositeOperation="source-in";const A=ml.transform(zl(y),[1,0,0,1,-w,-x]);return y.fillStyle=s?n.getPattern(t,this,A,Mh):n,y.fillRect(0,0,i,r),o&&!s&&(this.cachedCanvases.delete("fillCanvas"),o.set(l,v.canvas)),{canvas:v.canvas,offsetX:Math.round(w),offsetY:Math.round(x)}}setLineWidth(e){e!==this.current.lineWidth&&(this._cachedScaleForStroking[0]=-1),this.current.lineWidth=e,this.ctx.lineWidth=e}setLineCap(e){this.ctx.lineCap=Kh[e]}setLineJoin(e){this.ctx.lineJoin=Zh[e]}setMiterLimit(e){this.ctx.miterLimit=e}setDash(e,t){const i=this.ctx;void 0!==i.setLineDash&&(i.setLineDash(e),i.lineDashOffset=t)}setRenderingIntent(e){}setFlatness(e){}setGState(e){for(const[t,i]of e)switch(t){case"LW":this.setLineWidth(i);break;case"LC":this.setLineCap(i);break;case"LJ":this.setLineJoin(i);break;case"ML":this.setMiterLimit(i);break;case"D":this.setDash(i[0],i[1]);break;case"RI":this.setRenderingIntent(i);break;case"FL":this.setFlatness(i);break;case"Font":this.setFont(i[0],i[1]);break;case"CA":this.current.strokeAlpha=i;break;case"ca":this.current.fillAlpha=i,this.ctx.globalAlpha=i;break;case"BM":this.ctx.globalCompositeOperation=i;break;case"SMask":this.current.activeSMask=i?this.tempSMask:null,this.tempSMask=null,this.checkSMaskState();break;case"TR":this.ctx.filter=this.current.transferMaps=this.filterFactory.addFilter(i)}}get inSMaskMode(){return!!this.suspendedCtx}checkSMaskState(){const e=this.inSMaskMode;this.current.activeSMask&&!e?this.beginSMaskMode():!this.current.activeSMask&&e&&this.endSMaskMode()}beginSMaskMode(){if(this.inSMaskMode)throw new Error("beginSMaskMode called while already in smask mode");const e=this.ctx.canvas.width,t=this.ctx.canvas.height,i="smaskGroupAt"+this.groupLevel,r=this.cachedCanvases.getCanvas(i,e,t);this.suspendedCtx=this.ctx,this.ctx=r.context;const n=this.ctx;n.setTransform(...Dl(this.suspendedCtx)),Wh(this.suspendedCtx,n),function(e,t){if(e._removeMirroring)throw new Error("Context is already forwarding operations.");e.__originalSave=e.save,e.__originalRestore=e.restore,e.__originalRotate=e.rotate,e.__originalScale=e.scale,e.__originalTranslate=e.translate,e.__originalTransform=e.transform,e.__originalSetTransform=e.setTransform,e.__originalResetTransform=e.resetTransform,e.__originalClip=e.clip,e.__originalMoveTo=e.moveTo,e.__originalLineTo=e.lineTo,e.__originalBezierCurveTo=e.bezierCurveTo,e.__originalRect=e.rect,e.__originalClosePath=e.closePath,e.__originalBeginPath=e.beginPath,e._removeMirroring=()=>{e.save=e.__originalSave,e.restore=e.__originalRestore,e.rotate=e.__originalRotate,e.scale=e.__originalScale,e.translate=e.__originalTranslate,e.transform=e.__originalTransform,e.setTransform=e.__originalSetTransform,e.resetTransform=e.__originalResetTransform,e.clip=e.__originalClip,e.moveTo=e.__originalMoveTo,e.lineTo=e.__originalLineTo,e.bezierCurveTo=e.__originalBezierCurveTo,e.rect=e.__originalRect,e.closePath=e.__originalClosePath,e.beginPath=e.__originalBeginPath,delete e._removeMirroring},e.save=function(){t.save(),this.__originalSave()},e.restore=function(){t.restore(),this.__originalRestore()},e.translate=function(e,i){t.translate(e,i),this.__originalTranslate(e,i)},e.scale=function(e,i){t.scale(e,i),this.__originalScale(e,i)},e.transform=function(e,i,r,n,s,a){t.transform(e,i,r,n,s,a),this.__originalTransform(e,i,r,n,s,a)},e.setTransform=function(e,i,r,n,s,a){t.setTransform(e,i,r,n,s,a),this.__originalSetTransform(e,i,r,n,s,a)},e.resetTransform=function(){t.resetTransform(),this.__originalResetTransform()},e.rotate=function(e){t.rotate(e),this.__originalRotate(e)},e.clip=function(e){t.clip(e),this.__originalClip(e)},e.moveTo=function(e,i){t.moveTo(e,i),this.__originalMoveTo(e,i)},e.lineTo=function(e,i){t.lineTo(e,i),this.__originalLineTo(e,i)},e.bezierCurveTo=function(e,i,r,n,s,a){t.bezierCurveTo(e,i,r,n,s,a),this.__originalBezierCurveTo(e,i,r,n,s,a)},e.rect=function(e,i,r,n){t.rect(e,i,r,n),this.__originalRect(e,i,r,n)},e.closePath=function(){t.closePath(),this.__originalClosePath()},e.beginPath=function(){t.beginPath(),this.__originalBeginPath()}}(n,this.suspendedCtx),this.setGState([["BM","source-over"],["ca",1],["CA",1]])}endSMaskMode(){if(!this.inSMaskMode)throw new Error("endSMaskMode called while not in smask mode");this.ctx._removeMirroring(),Wh(this.ctx,this.suspendedCtx),this.ctx=this.suspendedCtx,this.suspendedCtx=null}compose(e){if(!this.current.activeSMask)return;e?(e[0]=Math.floor(e[0]),e[1]=Math.floor(e[1]),e[2]=Math.ceil(e[2]),e[3]=Math.ceil(e[3])):e=[0,0,this.ctx.canvas.width,this.ctx.canvas.height];const t=this.current.activeSMask,i=this.suspendedCtx;this.composeSMask(i,t,this.ctx,e),this.ctx.save(),this.ctx.setTransform(1,0,0,1,0,0),this.ctx.clearRect(0,0,this.ctx.canvas.width,this.ctx.canvas.height),this.ctx.restore()}composeSMask(e,t,i,r){const n=r[0],s=r[1],a=r[2]-n,o=r[3]-s;0!==a&&0!==o&&(this.genericComposeSMask(t.context,i,a,o,t.subtype,t.backdrop,t.transferMap,n,s,t.offsetX,t.offsetY),e.save(),e.globalAlpha=1,e.globalCompositeOperation="source-over",e.setTransform(1,0,0,1,0,0),e.drawImage(i.canvas,0,0),e.restore())}genericComposeSMask(e,t,i,r,n,s,a,o,l,h,c){let d=e.canvas,u=o-h,p=l-c;if(s){const t=ml.makeHexColor(...s);if(u<0||p<0||u+i>d.width||p+r>d.height){const e=this.cachedCanvases.getCanvas("maskExtension",i,r),n=e.context;n.drawImage(d,-u,-p),n.globalCompositeOperation="destination-atop",n.fillStyle=t,n.fillRect(0,0,i,r),n.globalCompositeOperation="source-over",d=e.canvas,u=p=0}else{e.save(),e.globalAlpha=1,e.setTransform(1,0,0,1,0,0);const n=new Path2D;n.rect(u,p,i,r),e.clip(n),e.globalCompositeOperation="destination-atop",e.fillStyle=t,e.fillRect(u,p,i,r),e.restore()}}t.save(),t.globalAlpha=1,t.setTransform(1,0,0,1,0,0),"Alpha"===n&&a?t.filter=this.filterFactory.addAlphaFilter(a):"Luminosity"===n&&(t.filter=this.filterFactory.addLuminosityFilter(a));const m=new Path2D;m.rect(o,l,i,r),t.clip(m),t.globalCompositeOperation="destination-in",t.drawImage(d,u,p,i,r,o,l,i,r),t.restore()}save(){this.inSMaskMode?(Wh(this.ctx,this.suspendedCtx),this.suspendedCtx.save()):this.ctx.save();const e=this.current;this.stateStack.push(e),this.current=e.clone()}restore(){0===this.stateStack.length&&this.inSMaskMode&&this.endSMaskMode(),0!==this.stateStack.length&&(this.current=this.stateStack.pop(),this.inSMaskMode?(this.suspendedCtx.restore(),Wh(this.suspendedCtx,this.ctx)):this.ctx.restore(),this.checkSMaskState(),this.pendingClip=null,this._cachedScaleForStroking[0]=-1,this._cachedGetSinglePixelWidth=null)}transform(e,t,i,r,n,s){this.ctx.transform(e,t,i,r,n,s),this._cachedScaleForStroking[0]=-1,this._cachedGetSinglePixelWidth=null}constructPath(e,t,i){const r=this.ctx,n=this.current;let s,a,o=n.x,l=n.y;const h=Dl(r),c=0===h[0]&&0===h[3]||0===h[1]&&0===h[2],d=c?i.slice(0):null;for(let i=0,u=0,p=e.length;i<p;i++)switch(0|e[i]){case Uo.rectangle:o=t[u++],l=t[u++];const e=t[u++],i=t[u++],p=o+e,m=l+i;r.moveTo(o,l),0===e||0===i?r.lineTo(p,m):(r.lineTo(p,l),r.lineTo(p,m),r.lineTo(o,m)),c||n.updateRectMinMax(h,[o,l,p,m]),r.closePath();break;case Uo.moveTo:o=t[u++],l=t[u++],r.moveTo(o,l),c||n.updatePathMinMax(h,o,l);break;case Uo.lineTo:o=t[u++],l=t[u++],r.lineTo(o,l),c||n.updatePathMinMax(h,o,l);break;case Uo.curveTo:s=o,a=l,o=t[u+4],l=t[u+5],r.bezierCurveTo(t[u],t[u+1],t[u+2],t[u+3],o,l),n.updateCurvePathMinMax(h,s,a,t[u],t[u+1],t[u+2],t[u+3],o,l,d),u+=6;break;case Uo.curveTo2:s=o,a=l,r.bezierCurveTo(o,l,t[u],t[u+1],t[u+2],t[u+3]),n.updateCurvePathMinMax(h,s,a,o,l,t[u],t[u+1],t[u+2],t[u+3],d),o=t[u+2],l=t[u+3],u+=4;break;case Uo.curveTo3:s=o,a=l,o=t[u+2],l=t[u+3],r.bezierCurveTo(t[u],t[u+1],o,l,o,l),n.updateCurvePathMinMax(h,s,a,t[u],t[u+1],o,l,o,l,d),u+=4;break;case Uo.closePath:r.closePath()}c&&n.updateScalingPathMinMax(h,d),n.setCurrentPoint(o,l)}closePath(){this.ctx.closePath()}stroke(e=!0){const t=this.ctx,i=this.current.strokeColor;t.globalAlpha=this.current.strokeAlpha,this.contentVisible&&("object"==typeof i&&i?.getPattern?(t.save(),t.strokeStyle=i.getPattern(t,this,zl(t),_h),this.rescaleAndStroke(!1),t.restore()):this.rescaleAndStroke(!0)),e&&this.consumePath(this.current.getClippedPathBoundingBox()),t.globalAlpha=this.current.fillAlpha}closeStroke(){this.closePath(),this.stroke()}fill(e=!0){const t=this.ctx,i=this.current.fillColor;let r=!1;this.current.patternFill&&(t.save(),t.fillStyle=i.getPattern(t,this,zl(t),Mh),r=!0);const n=this.current.getClippedPathBoundingBox();this.contentVisible&&null!==n&&(this.pendingEOFill?(t.fill("evenodd"),this.pendingEOFill=!1):t.fill()),r&&t.restore(),e&&this.consumePath(n)}eoFill(){this.pendingEOFill=!0,this.fill()}fillStroke(){this.fill(!1),this.stroke(!1),this.consumePath()}eoFillStroke(){this.pendingEOFill=!0,this.fillStroke()}closeFillStroke(){this.closePath(),this.fillStroke()}closeEOFillStroke(){this.pendingEOFill=!0,this.closePath(),this.fillStroke()}endPath(){this.consumePath()}clip(){this.pendingClip=Jh}eoClip(){this.pendingClip=Qh}beginText(){this.current.textMatrix=Za,this.current.textMatrixScale=1,this.current.x=this.current.lineX=0,this.current.y=this.current.lineY=0}endText(){const e=this.pendingTextPaths,t=this.ctx;if(void 0===e)return void t.beginPath();const i=new Path2D,r=t.getTransform().invertSelf();for(const{transform:t,x:n,y:s,fontSize:a,path:o}of e)i.addPath(o,new DOMMatrix(t).preMultiplySelf(r).translate(n,s).scale(a,-a));t.clip(i),t.beginPath(),delete this.pendingTextPaths}setCharSpacing(e){this.current.charSpacing=e}setWordSpacing(e){this.current.wordSpacing=e}setHScale(e){this.current.textHScale=e/100}setLeading(e){this.current.leading=-e}setFont(e,t){const i=this.commonObjs.get(e),r=this.current;if(!i)throw new Error(`Can't find font for ${e}`);if(r.fontMatrix=i.fontMatrix||Ja,0!==r.fontMatrix[0]&&0!==r.fontMatrix[3]||Ko("Invalid font matrix for font "+e),t<0?(t=-t,r.fontDirection=-1):r.fontDirection=1,this.current.font=i,this.current.fontSize=t,i.isType3Font)return;const n=i.loadedName||"sans-serif",s=i.systemFontInfo?.css||`"${n}", ${i.fallbackName}`;let a="normal";i.black?a="900":i.bold&&(a="bold");const o=i.italic?"italic":"normal";let l=t;t<16?l=16:t>100&&(l=100),this.current.fontSizeScale=t/l,this.ctx.font=`${o} ${a} ${l}px ${s}`}setTextRenderingMode(e){this.current.textRenderingMode=e}setTextRise(e){this.current.textRise=e}moveText(e,t){this.current.x=this.current.lineX+=e,this.current.y=this.current.lineY+=t}setLeadingMoveText(e,t){this.setLeading(-t),this.moveText(e,t)}setTextMatrix(e,t,i,r,n,s){this.current.textMatrix=[e,t,i,r,n,s],this.current.textMatrixScale=Math.hypot(e,t),this.current.x=this.current.lineX=0,this.current.y=this.current.lineY=0}nextLine(){this.moveText(0,this.current.leading)}#di(e,t,i){const r=new Path2D;return r.addPath(e,new DOMMatrix(i).invertSelf().multiplySelf(t)),r}paintChar(e,t,i,r,n){const s=this.ctx,a=this.current,o=a.font,l=a.textRenderingMode,h=a.fontSize/a.fontSizeScale,c=l&bo,d=!!(l&vo),u=a.patternFill&&!o.missingFile,p=a.patternStroke&&!o.missingFile;let m;if((o.disableFontFace||d||u||p)&&(m=o.getPathGenerator(this.commonObjs,e)),o.disableFontFace||u||p){if(s.save(),s.translate(t,i),s.scale(h,-h),c===po||c===go)if(r){const e=s.getTransform();s.setTransform(...r),s.fill(this.#di(m,e,r))}else s.fill(m);if(c===mo||c===go)if(n){const e=s.getTransform();s.setTransform(...n),s.stroke(this.#di(m,e,n))}else s.lineWidth/=h,s.stroke(m);s.restore()}else c!==po&&c!==go||s.fillText(e,t,i),c!==mo&&c!==go||s.strokeText(e,t,i);if(d){(this.pendingTextPaths||=[]).push({transform:Dl(s),x:t,y:i,fontSize:h,path:m})}}get isFontSubpixelAAEnabled(){const{context:e}=this.cachedCanvases.getCanvas("isFontSubpixelAAEnabled",10,10);e.scale(1.5,1),e.fillText("I",0,10);const t=e.getImageData(0,0,10,10).data;let i=!1;for(let e=3;e<t.length;e+=4)if(t[e]>0&&t[e]<255){i=!0;break}return el(this,"isFontSubpixelAAEnabled",i)}showText(e){const t=this.current,i=t.font;if(i.isType3Font)return this.showType3Text(e);const r=t.fontSize;if(0===r)return;const n=this.ctx,s=t.fontSizeScale,a=t.charSpacing,o=t.wordSpacing,l=t.fontDirection,h=t.textHScale*l,c=e.length,d=i.vertical,u=d?1:-1,p=i.defaultVMetrics,m=r*t.fontMatrix[0],g=t.textRenderingMode===po&&!i.disableFontFace&&!t.patternFill;let f,b;if(n.save(),n.transform(...t.textMatrix),n.translate(t.x,t.y+t.textRise),l>0?n.scale(h,-1):n.scale(h,1),t.patternFill){n.save();const e=t.fillColor.getPattern(n,this,zl(n),Mh);f=Dl(n),n.restore(),n.fillStyle=e}if(t.patternStroke){n.save();const e=t.strokeColor.getPattern(n,this,zl(n),_h);b=Dl(n),n.restore(),n.strokeStyle=e}let v=t.lineWidth;const y=t.textMatrixScale;if(0===y||0===v){const e=t.textRenderingMode&bo;e!==mo&&e!==go||(v=this.getSinglePixelWidth())}else v/=y;if(1!==s&&(n.scale(s,s),v/=s),n.lineWidth=v,i.isInvalidPDFjsFont){const i=[];let r=0;for(const t of e)i.push(t.unicode),r+=t.width;return n.fillText(i.join(""),0,0),t.x+=r*m*h,n.restore(),void this.compose()}let w,x=0;for(w=0;w<c;++w){const t=e[w];if("number"==typeof t){x+=u*t*r/1e3;continue}let h=!1;const c=(t.isSpace?o:0)+a,v=t.fontChar,y=t.accent;let A,k,E=t.width;if(d){const e=t.vmetric||p,i=-(t.vmetric?e[1]:.5*E)*m,r=e[2]*m;E=e?-e[0]:E,A=i/s,k=(x+r)/s}else A=x/s,k=0;if(i.remeasure&&E>0){const e=1e3*n.measureText(v).width/r*s;if(E<e&&this.isFontSubpixelAAEnabled){const t=E/e;h=!0,n.save(),n.scale(t,1),A/=t}else E!==e&&(A+=(E-e)/2e3*r/s)}if(this.contentVisible&&(t.isInFont||i.missingFile))if(g&&!y)n.fillText(v,A,k);else if(this.paintChar(v,A,k,f,b),y){const e=A+r*y.offset.x/s,t=k-r*y.offset.y/s;this.paintChar(y.fontChar,e,t,f,b)}x+=d?E*m-c*l:E*m+c*l,h&&n.restore()}d?t.y-=x:t.x+=x*h,n.restore(),this.compose()}showType3Text(e){const t=this.ctx,i=this.current,r=i.font,n=i.fontSize,s=i.fontDirection,a=r.vertical?1:-1,o=i.charSpacing,l=i.wordSpacing,h=i.textHScale*s,c=i.fontMatrix||Ja,d=e.length;let u,p,m,g;if(!(i.textRenderingMode===fo)&&0!==n){for(this._cachedScaleForStroking[0]=-1,this._cachedGetSinglePixelWidth=null,t.save(),t.transform(...i.textMatrix),t.translate(i.x,i.y),t.scale(h,s),u=0;u<d;++u){if(p=e[u],"number"==typeof p){g=a*p*n/1e3,this.ctx.translate(g,0),i.x+=g*h;continue}const s=(p.isSpace?l:0)+o,d=r.charProcOperatorList[p.operatorListId];if(!d){Ko(`Type3 character "${p.operatorListId}" is not available.`);continue}this.contentVisible&&(this.processingType3=p,this.save(),t.scale(n,n),t.transform(...c),this.executeOperatorList(d),this.restore());m=ml.applyTransform([p.width,0],c)[0]*n+s,t.translate(m,0),i.x+=m*h}t.restore(),this.processingType3=null}}setCharWidth(e,t){}setCharWidthAndBounds(e,t,i,r,n,s){this.ctx.rect(i,r,n-i,s-r),this.ctx.clip(),this.endPath()}getColorN_Pattern(e){let t;if("TilingPattern"===e[0]){const i=e[1],r=this.baseTransform||Dl(this.ctx),n={createCanvasGraphics:e=>new ec(e,this.commonObjs,this.objs,this.canvasFactory,this.filterFactory,{optionalContentConfig:this.optionalContentConfig,markedContentStack:this.markedContentStack})};t=new Bh(e,i,this.ctx,n,r)}else t=this._getPattern(e[1],e[2]);return t}setStrokeColorN(){this.current.strokeColor=this.getColorN_Pattern(arguments),this.current.patternStroke=!0}setFillColorN(){this.current.fillColor=this.getColorN_Pattern(arguments),this.current.patternFill=!0}setStrokeRGBColor(e,t,i){this.ctx.strokeStyle=this.current.strokeColor=ml.makeHexColor(e,t,i),this.current.patternStroke=!1}setStrokeTransparent(){this.ctx.strokeStyle=this.current.strokeColor="transparent",this.current.patternStroke=!1}setFillRGBColor(e,t,i){this.ctx.fillStyle=this.current.fillColor=ml.makeHexColor(e,t,i),this.current.patternFill=!1}setFillTransparent(){this.ctx.fillStyle=this.current.fillColor="transparent",this.current.patternFill=!1}_getPattern(e,t=null){let i;return this.cachedPatterns.has(e)?i=this.cachedPatterns.get(e):(i=function(e){switch(e[0]){case"RadialAxial":return new Lh(e);case"Mesh":return new Dh(e);case"Dummy":return new zh}throw new Error(`Unknown IR type: ${e[0]}`)}(this.getObject(e)),this.cachedPatterns.set(e,i)),t&&(i.matrix=t),i}shadingFill(e){if(!this.contentVisible)return;const t=this.ctx;this.save();const i=this._getPattern(e);t.fillStyle=i.getPattern(t,this,zl(t),Th);const r=zl(t);if(r){const{width:e,height:i}=t.canvas,[n,s,a,o]=ml.getAxialAlignedBoundingBox([0,0,e,i],r);this.ctx.fillRect(n,s,a-n,o-s)}else this.ctx.fillRect(-1e10,-1e10,2e10,2e10);this.compose(this.current.getClippedPathBoundingBox()),this.restore()}beginInlineImage(){Zo("Should not call beginInlineImage")}beginImageData(){Zo("Should not call beginImageData")}paintFormXObjectBegin(e,t){if(this.contentVisible&&(this.save(),this.baseTransformStack.push(this.baseTransform),e&&this.transform(...e),this.baseTransform=Dl(this.ctx),t)){const e=t[2]-t[0],i=t[3]-t[1];this.ctx.rect(t[0],t[1],e,i),this.current.updateRectMinMax(Dl(this.ctx),t),this.clip(),this.endPath()}}paintFormXObjectEnd(){this.contentVisible&&(this.restore(),this.baseTransform=this.baseTransformStack.pop())}beginGroup(e){if(!this.contentVisible)return;this.save(),this.inSMaskMode&&(this.endSMaskMode(),this.current.activeSMask=null);const t=this.ctx;e.isolated||Yo("TODO: Support non-isolated groups."),e.knockout&&Ko("Knockout groups not supported.");const i=Dl(t);if(e.matrix&&t.transform(...e.matrix),!e.bbox)throw new Error("Bounding box is required.");let r=ml.getAxialAlignedBoundingBox(e.bbox,Dl(t));const n=[0,0,t.canvas.width,t.canvas.height];r=ml.intersect(r,n)||[0,0,0,0];const s=Math.floor(r[0]),a=Math.floor(r[1]),o=Math.max(Math.ceil(r[2])-s,1),l=Math.max(Math.ceil(r[3])-a,1);this.current.startNewPathAndClipBox([0,0,o,l]);let h="groupAt"+this.groupLevel;e.smask&&(h+="_smask_"+this.smaskCounter++%2);const c=this.cachedCanvases.getCanvas(h,o,l),d=c.context;d.translate(-s,-a),d.transform(...i),e.smask?this.smaskStack.push({canvas:c.canvas,context:d,offsetX:s,offsetY:a,subtype:e.smask.subtype,backdrop:e.smask.backdrop,transferMap:e.smask.transferMap||null,startTransformInverse:null}):(t.setTransform(1,0,0,1,0,0),t.translate(s,a),t.save()),Wh(t,d),this.ctx=d,this.setGState([["BM","source-over"],["ca",1],["CA",1]]),this.groupStack.push(t),this.groupLevel++}endGroup(e){if(!this.contentVisible)return;this.groupLevel--;const t=this.ctx,i=this.groupStack.pop();if(this.ctx=i,this.ctx.imageSmoothingEnabled=!1,e.smask)this.tempSMask=this.smaskStack.pop(),this.restore();else{this.ctx.restore();const e=Dl(this.ctx);this.restore(),this.ctx.save(),this.ctx.setTransform(...e);const i=ml.getAxialAlignedBoundingBox([0,0,t.canvas.width,t.canvas.height],e);this.ctx.drawImage(t.canvas,0,0),this.ctx.restore(),this.compose(i)}}beginAnnotation(e,t,i,r,n){if(this.#hi(),Xh(this.ctx),this.ctx.save(),this.save(),this.baseTransform&&this.ctx.setTransform(...this.baseTransform),t){const r=t[2]-t[0],s=t[3]-t[1];if(n&&this.annotationCanvasMap){(i=i.slice())[4]-=t[0],i[5]-=t[1],(t=t.slice())[0]=t[1]=0,t[2]=r,t[3]=s;const[n,a]=ml.singularValueDecompose2dScale(Dl(this.ctx)),{viewportScale:o}=this,l=Math.ceil(r*this.outputScaleX*o),h=Math.ceil(s*this.outputScaleY*o);this.annotationCanvas=this.canvasFactory.create(l,h);const{canvas:c,context:d}=this.annotationCanvas;this.annotationCanvasMap.set(e,c),this.annotationCanvas.savedCtx=this.ctx,this.ctx=d,this.ctx.save(),this.ctx.setTransform(n,0,0,-a,0,s*a),Xh(this.ctx)}else Xh(this.ctx),this.endPath(),this.ctx.rect(t[0],t[1],r,s),this.ctx.clip(),this.ctx.beginPath()}this.current=new Uh(this.ctx.canvas.width,this.ctx.canvas.height),this.transform(...i),this.transform(...r)}endAnnotation(){this.annotationCanvas&&(this.ctx.restore(),this.#ci(),this.ctx=this.annotationCanvas.savedCtx,delete this.annotationCanvas.savedCtx,delete this.annotationCanvas)}paintImageMaskXObject(e){if(!this.contentVisible)return;const t=e.count;(e=this.getObject(e.data,e)).count=t;const i=this.ctx,r=this.processingType3;if(r&&(void 0===r.compiled&&(r.compiled=function(e){const{width:t,height:i}=e;if(t>1e3||i>1e3)return null;const r=new Uint8Array([0,2,4,0,1,0,5,4,8,10,0,8,0,2,1,0]),n=t+1;let s,a,o,l=new Uint8Array(n*(i+1));const h=t+7&-8;let c=new Uint8Array(h*i),d=0;for(const t of e.data){let e=128;for(;e>0;)c[d++]=t&e?0:255,e>>=1}let u=0;for(d=0,0!==c[d]&&(l[0]=1,++u),a=1;a<t;a++)c[d]!==c[d+1]&&(l[a]=c[d]?2:1,++u),d++;for(0!==c[d]&&(l[a]=2,++u),s=1;s<i;s++){d=s*h,o=s*n,c[d-h]!==c[d]&&(l[o]=c[d]?1:8,++u);let e=(c[d]?4:0)+(c[d-h]?8:0);for(a=1;a<t;a++)e=(e>>2)+(c[d+1]?4:0)+(c[d-h+1]?8:0),r[e]&&(l[o+a]=r[e],++u),d++;if(c[d-h]!==c[d]&&(l[o+a]=c[d]?2:4,++u),u>1e3)return null}for(d=h*(i-1),o=s*n,0!==c[d]&&(l[o]=8,++u),a=1;a<t;a++)c[d]!==c[d+1]&&(l[o+a]=c[d]?4:8,++u),d++;if(0!==c[d]&&(l[o+a]=4,++u),u>1e3)return null;const p=new Int32Array([0,n,-1,0,-n,0,0,0,1]),m=new Path2D;for(s=0;u&&s<=i;s++){let e=s*n;const i=e+t;for(;e<i&&!l[e];)e++;if(e===i)continue;m.moveTo(e%n,s);const r=e;let a=l[e];do{const t=p[a];do{e+=t}while(!l[e]);const i=l[e];5!==i&&10!==i?(a=i,l[e]=0):(a=i&51*a>>4,l[e]&=a>>2|a<<2),m.lineTo(e%n,e/n|0),l[e]||--u}while(r!==e);--s}return c=null,l=null,function(e){e.save(),e.scale(1/t,-1/i),e.translate(0,-i),e.fill(m),e.beginPath(),e.restore()}}(e)),r.compiled))return void r.compiled(i);const n=this._createMaskCanvas(e),s=n.canvas;i.save(),i.setTransform(1,0,0,1,0,0),i.drawImage(s,n.offsetX,n.offsetY),i.restore(),this.compose()}paintImageMaskXObjectRepeat(e,t,i=0,r=0,n,s){if(!this.contentVisible)return;e=this.getObject(e.data,e);const a=this.ctx;a.save();const o=Dl(a);a.transform(t,i,r,n,0,0);const l=this._createMaskCanvas(e);a.setTransform(1,0,0,1,l.offsetX-o[4],l.offsetY-o[5]);for(let e=0,h=s.length;e<h;e+=2){const h=ml.transform(o,[t,i,r,n,s[e],s[e+1]]),[c,d]=ml.applyTransform([0,0],h);a.drawImage(l.canvas,c,d)}a.restore(),this.compose()}paintImageMaskXObjectGroup(e){if(!this.contentVisible)return;const t=this.ctx,i=this.current.fillColor,r=this.current.patternFill;for(const n of e){const{data:e,width:s,height:a,transform:o}=n,l=this.cachedCanvases.getCanvas("maskCanvas",s,a),h=l.context;h.save();$h(h,this.getObject(e,n)),h.globalCompositeOperation="source-in",h.fillStyle=r?i.getPattern(h,this,zl(t),Mh):i,h.fillRect(0,0,s,a),h.restore(),t.save(),t.transform(...o),t.scale(1,-1),Vh(t,l.canvas,0,0,s,a,0,-1,1,1),t.restore()}this.compose()}paintImageXObject(e){if(!this.contentVisible)return;const t=this.getObject(e);t?this.paintInlineImageXObject(t):Ko("Dependent image isn't ready yet")}paintImageXObjectRepeat(e,t,i,r){if(!this.contentVisible)return;const n=this.getObject(e);if(!n)return void Ko("Dependent image isn't ready yet");const s=n.width,a=n.height,o=[];for(let e=0,n=r.length;e<n;e+=2)o.push({transform:[t,0,0,i,r[e],r[e+1]],x:0,y:0,w:s,h:a});this.paintInlineImageXObjectGroup(n,o)}applyTransferMapsToCanvas(e){return"none"!==this.current.transferMaps&&(e.filter=this.current.transferMaps,e.drawImage(e.canvas,0,0),e.filter="none"),e.canvas}applyTransferMapsToBitmap(e){if("none"===this.current.transferMaps)return e.bitmap;const{bitmap:t,width:i,height:r}=e,n=this.cachedCanvases.getCanvas("inlineImage",i,r),s=n.context;return s.filter=this.current.transferMaps,s.drawImage(t,0,0),s.filter="none",n.canvas}paintInlineImageXObject(e){if(!this.contentVisible)return;const t=e.width,i=e.height,r=this.ctx;if(this.save(),!Ka){const{filter:e}=r;"none"!==e&&""!==e&&(r.filter="none")}let n;if(r.scale(1/t,-1/i),e.bitmap)n=this.applyTransferMapsToBitmap(e);else if("function"==typeof HTMLElement&&e instanceof HTMLElement||!e.data)n=e;else{const r=this.cachedCanvases.getCanvas("inlineImage",t,i).context;Gh(r,e),n=this.applyTransferMapsToCanvas(r)}const s=this._scaleImage(n,zl(r));r.imageSmoothingEnabled=Yh(Dl(r),e.interpolate),Vh(r,s.img,0,0,s.paintWidth,s.paintHeight,0,-i,t,i),this.compose(),this.restore()}paintInlineImageXObjectGroup(e,t){if(!this.contentVisible)return;const i=this.ctx;let r;if(e.bitmap)r=e.bitmap;else{const t=e.width,i=e.height,n=this.cachedCanvases.getCanvas("inlineImage",t,i).context;Gh(n,e),r=this.applyTransferMapsToCanvas(n)}for(const e of t)i.save(),i.transform(...e.transform),i.scale(1,-1),Vh(i,r,e.x,e.y,e.w,e.h,0,-1,1,1),i.restore();this.compose()}paintSolidColorImageMask(){this.contentVisible&&(this.ctx.fillRect(0,0,1,1),this.compose())}markPoint(e){}markPointProps(e,t){}beginMarkedContent(e){this.markedContentStack.push({visible:!0})}beginMarkedContentProps(e,t){"OC"===e?this.markedContentStack.push({visible:this.optionalContentConfig.isVisible(t)}):this.markedContentStack.push({visible:!0}),this.contentVisible=this.isContentVisible()}endMarkedContent(){this.markedContentStack.pop(),this.contentVisible=this.isContentVisible()}beginCompat(){}endCompat(){}consumePath(e){const t=this.current.isEmptyClip();this.pendingClip&&this.current.updateClipFromPath(),this.pendingClip||this.compose(e);const i=this.ctx;this.pendingClip&&(t||(this.pendingClip===Qh?i.clip("evenodd"):i.clip()),this.pendingClip=null),this.current.startNewPathAndClipBox(this.current.clipBox),i.beginPath()}getSinglePixelWidth(){if(!this._cachedGetSinglePixelWidth){const e=Dl(this.ctx);if(0===e[1]&&0===e[2])this._cachedGetSinglePixelWidth=1/Math.min(Math.abs(e[0]),Math.abs(e[3]));else{const t=Math.abs(e[0]*e[3]-e[2]*e[1]),i=Math.hypot(e[0],e[2]),r=Math.hypot(e[1],e[3]);this._cachedGetSinglePixelWidth=Math.max(i,r)/t}}return this._cachedGetSinglePixelWidth}getScaleForStroking(){if(-1===this._cachedScaleForStroking[0]){const{lineWidth:e}=this.current,{a:t,b:i,c:r,d:n}=this.ctx.getTransform();let s,a;if(0===i&&0===r){const i=Math.abs(t),r=Math.abs(n);if(i===r)if(0===e)s=a=1/i;else{const t=i*e;s=a=t<1?1/t:1}else if(0===e)s=1/i,a=1/r;else{const t=i*e,n=r*e;s=t<1?1/t:1,a=n<1?1/n:1}}else{const o=Math.abs(t*n-i*r),l=Math.hypot(t,i),h=Math.hypot(r,n);if(0===e)s=h/o,a=l/o;else{const t=e*o;s=h>t?h/t:1,a=l>t?l/t:1}}this._cachedScaleForStroking[0]=s,this._cachedScaleForStroking[1]=a}return this._cachedScaleForStroking}rescaleAndStroke(e){const{ctx:t}=this,{lineWidth:i}=this.current,[r,n]=this.getScaleForStroking();if(t.lineWidth=i||1,1===r&&1===n)return void t.stroke();const s=t.getLineDash();if(e&&t.save(),t.scale(r,n),s.length>0){const e=Math.max(r,n);t.setLineDash(s.map((t=>t/e))),t.lineDashOffset/=e}t.stroke(),e&&t.restore()}isContentVisible(){for(let e=this.markedContentStack.length-1;e>=0;e--)if(!this.markedContentStack[e].visible)return!1;return!0}}for(const e in Uo)void 0!==ec.prototype[e]&&(ec.prototype[Uo[e]]=ec.prototype[e]);class tc{static#ui=null;static#pi="";static get workerPort(){return this.#ui}static set workerPort(e){if(!("undefined"!=typeof Worker&&e instanceof Worker)&&null!==e)throw new Error("Invalid `workerPort` type.");this.#ui=e}static get workerSrc(){return this.#pi}static set workerSrc(e){if("string"!=typeof e)throw new Error("Invalid `workerSrc` type.");this.#pi=e}}class ic{#mi;#gi;constructor({parsedData:e,rawData:t}){this.#mi=e,this.#gi=t}getRaw(){return this.#gi}get(e){return this.#mi.get(e)??null}getAll(){return dl(this.#mi)}has(e){return this.#mi.has(e)}}const rc=Symbol("INTERNAL");class nc{#fi=!1;#bi=!1;#vi=!1;#yi=!0;constructor(e,{name:t,intent:i,usage:r,rbGroups:n}){this.#fi=!!(e&to),this.#bi=!!(e&io),this.name=t,this.intent=i,this.usage=r,this.rbGroups=n}get visible(){if(this.#vi)return this.#yi;if(!this.#yi)return!1;const{print:e,view:t}=this.usage;return this.#fi?"OFF"!==t?.viewState:!this.#bi||"OFF"!==e?.printState}_setVisible(e,t,i=!1){e!==rc&&Zo("Internal method `_setVisible` called."),this.#vi=i,this.#yi=t}}class sc{#wi=null;#xi=new Map;#Ai=null;#ki=null;constructor(e,t=to){if(this.renderingIntent=t,this.name=null,this.creator=null,null!==e){this.name=e.name,this.creator=e.creator,this.#ki=e.order;for(const i of e.groups)this.#xi.set(i.id,new nc(t,i));if("OFF"===e.baseState)for(const e of this.#xi.values())e._setVisible(rc,!1);for(const t of e.on)this.#xi.get(t)._setVisible(rc,!0);for(const t of e.off)this.#xi.get(t)._setVisible(rc,!1);this.#Ai=this.getHash()}}#Ei(e){const t=e.length;if(t<2)return!0;const i=e[0];for(let r=1;r<t;r++){const t=e[r];let n;if(Array.isArray(t))n=this.#Ei(t);else{if(!this.#xi.has(t))return Ko(`Optional content group not found: ${t}`),!0;n=this.#xi.get(t).visible}switch(i){case"And":if(!n)return!1;break;case"Or":if(n)return!0;break;case"Not":return!n;default:return!0}}return"And"===i}isVisible(e){if(0===this.#xi.size)return!0;if(!e)return Yo("Optional content group not defined."),!0;if("OCG"===e.type)return this.#xi.has(e.id)?this.#xi.get(e.id).visible:(Ko(`Optional content group not found: ${e.id}`),!0);if("OCMD"===e.type){if(e.expression)return this.#Ei(e.expression);if(!e.policy||"AnyOn"===e.policy){for(const t of e.ids){if(!this.#xi.has(t))return Ko(`Optional content group not found: ${t}`),!0;if(this.#xi.get(t).visible)return!0}return!1}if("AllOn"===e.policy){for(const t of e.ids){if(!this.#xi.has(t))return Ko(`Optional content group not found: ${t}`),!0;if(!this.#xi.get(t).visible)return!1}return!0}if("AnyOff"===e.policy){for(const t of e.ids){if(!this.#xi.has(t))return Ko(`Optional content group not found: ${t}`),!0;if(!this.#xi.get(t).visible)return!0}return!1}if("AllOff"===e.policy){for(const t of e.ids){if(!this.#xi.has(t))return Ko(`Optional content group not found: ${t}`),!0;if(this.#xi.get(t).visible)return!1}return!0}return Ko(`Unknown optional content policy ${e.policy}.`),!0}return Ko(`Unknown group type ${e.type}.`),!0}setVisibility(e,t=!0,i=!0){const r=this.#xi.get(e);if(r){if(i&&t&&r.rbGroups.length)for(const t of r.rbGroups)for(const i of t)i!==e&&this.#xi.get(i)?._setVisible(rc,!1,!0);r._setVisible(rc,!!t,!0),this.#wi=null}else Ko(`Optional content group not found: ${e}`)}setOCGState({state:e,preserveRB:t}){let i;for(const r of e){switch(r){case"ON":case"OFF":case"Toggle":i=r;continue}const e=this.#xi.get(r);if(e)switch(i){case"ON":this.setVisibility(r,!0,t);break;case"OFF":this.setVisibility(r,!1,t);break;case"Toggle":this.setVisibility(r,!e.visible,t)}}this.#wi=null}get hasInitialVisibility(){return null===this.#Ai||this.getHash()===this.#Ai}getOrder(){return this.#xi.size?this.#ki?this.#ki.slice():[...this.#xi.keys()]:null}getGroups(){return this.#xi.size>0?dl(this.#xi):null}getGroup(e){return this.#xi.get(e)||null}getHash(){if(null!==this.#wi)return this.#wi;const e=new th;for(const[t,i]of this.#xi)e.update(`${t}:${i.visible}`);return this.#wi=e.hexdigest()}}class ac{constructor(e,{disableRange:t=!1,disableStream:i=!1}){Jo(e,'PDFDataTransportStream - missing required "pdfDataRangeTransport" argument.');const{length:r,initialData:n,progressiveDone:s,contentDispositionFilename:a}=e;if(this._queuedChunks=[],this._progressiveDone=s,this._contentDispositionFilename=a,n?.length>0){const e=n instanceof Uint8Array&&n.byteLength===n.buffer.byteLength?n.buffer:new Uint8Array(n).buffer;this._queuedChunks.push(e)}this._pdfDataRangeTransport=e,this._isStreamingSupported=!i,this._isRangeSupported=!t,this._contentLength=r,this._fullRequestReader=null,this._rangeReaders=[],e.addRangeListener(((e,t)=>{this._onReceiveData({begin:e,chunk:t})})),e.addProgressListener(((e,t)=>{this._onProgress({loaded:e,total:t})})),e.addProgressiveReadListener((e=>{this._onReceiveData({chunk:e})})),e.addProgressiveDoneListener((()=>{this._onProgressiveDone()})),e.transportReady()}_onReceiveData({begin:e,chunk:t}){const i=t instanceof Uint8Array&&t.byteLength===t.buffer.byteLength?t.buffer:new Uint8Array(t).buffer;if(void 0===e)this._fullRequestReader?this._fullRequestReader._enqueue(i):this._queuedChunks.push(i);else{Jo(this._rangeReaders.some((function(t){return t._begin===e&&(t._enqueue(i),!0)})),"_onReceiveData - no `PDFDataTransportStreamRangeReader` instance found.")}}get _progressiveDataLength(){return this._fullRequestReader?._loaded??0}_onProgress(e){void 0===e.total?this._rangeReaders[0]?.onProgress?.({loaded:e.loaded}):this._fullRequestReader?.onProgress?.({loaded:e.loaded,total:e.total})}_onProgressiveDone(){this._fullRequestReader?.progressiveDone(),this._progressiveDone=!0}_removeRangeReader(e){const t=this._rangeReaders.indexOf(e);t>=0&&this._rangeReaders.splice(t,1)}getFullReader(){Jo(!this._fullRequestReader,"PDFDataTransportStream.getFullReader can only be called once.");const e=this._queuedChunks;return this._queuedChunks=null,new oc(this,e,this._progressiveDone,this._contentDispositionFilename)}getRangeReader(e,t){if(t<=this._progressiveDataLength)return null;const i=new lc(this,e,t);return this._pdfDataRangeTransport.requestDataRange(e,t),this._rangeReaders.push(i),i}cancelAllRequests(e){this._fullRequestReader?.cancel(e);for(const t of this._rangeReaders.slice(0))t.cancel(e);this._pdfDataRangeTransport.abort()}}class oc{constructor(e,t,i=!1,r=null){this._stream=e,this._done=i||!1,this._filename=Sl(r)?r:null,this._queuedChunks=t||[],this._loaded=0;for(const e of this._queuedChunks)this._loaded+=e.byteLength;this._requests=[],this._headersReady=Promise.resolve(),e._fullRequestReader=this,this.onProgress=null}_enqueue(e){if(!this._done){if(this._requests.length>0){this._requests.shift().resolve({value:e,done:!1})}else this._queuedChunks.push(e);this._loaded+=e.byteLength}}get headersReady(){return this._headersReady}get filename(){return this._filename}get isRangeSupported(){return this._stream._isRangeSupported}get isStreamingSupported(){return this._stream._isStreamingSupported}get contentLength(){return this._stream._contentLength}async read(){if(this._queuedChunks.length>0){return{value:this._queuedChunks.shift(),done:!1}}if(this._done)return{value:void 0,done:!0};const e=Promise.withResolvers();return this._requests.push(e),e.promise}cancel(e){this._done=!0;for(const e of this._requests)e.resolve({value:void 0,done:!0});this._requests.length=0}progressiveDone(){this._done||(this._done=!0)}}class lc{constructor(e,t,i){this._stream=e,this._begin=t,this._end=i,this._queuedChunk=null,this._requests=[],this._done=!1,this.onProgress=null}_enqueue(e){if(!this._done){if(0===this._requests.length)this._queuedChunk=e;else{this._requests.shift().resolve({value:e,done:!1});for(const e of this._requests)e.resolve({value:void 0,done:!0});this._requests.length=0}this._done=!0,this._stream._removeRangeReader(this)}}get isStreamingSupported(){return!1}async read(){if(this._queuedChunk){const e=this._queuedChunk;return this._queuedChunk=null,{value:e,done:!1}}if(this._done)return{value:void 0,done:!0};const e=Promise.withResolvers();return this._requests.push(e),e.promise}cancel(e){this._done=!0;for(const e of this._requests)e.resolve({value:void 0,done:!0});this._requests.length=0,this._stream._removeRangeReader(this)}}function hc(e,t){const i=new Headers;if(!e||!t||"object"!=typeof t)return i;for(const e in t){const r=t[e];void 0!==r&&i.append(e,r)}return i}function cc(e){try{return new URL(e).origin}catch{}return null}function dc({responseHeaders:e,isHttp:t,rangeChunkSize:i,disableRange:r}){const n={allowRangeRequests:!1,suggestedLength:void 0},s=parseInt(e.get("Content-Length"),10);if(!Number.isInteger(s))return n;if(n.suggestedLength=s,s<=2*i)return n;if(r||!t)return n;if("bytes"!==e.get("Accept-Ranges"))return n;return"identity"!==(e.get("Content-Encoding")||"identity")||(n.allowRangeRequests=!0),n}function uc(e){const t=e.get("Content-Disposition");if(t){let e=function(e){let t=!0,i=r("filename\\*","i").exec(e);if(i){i=i[1];let e=a(i);return e=unescape(e),e=o(e),e=l(e),s(e)}if(i=function(e){const t=[];let i;const n=r("filename\\*((?!0\\d)\\d+)(\\*?)","ig");for(;null!==(i=n.exec(e));){let[,e,r,n]=i;if(e=parseInt(e,10),e in t){if(0===e)break}else t[e]=[r,n]}const s=[];for(let e=0;e<t.length&&e in t;++e){let[i,r]=t[e];r=a(r),i&&(r=unescape(r),0===e&&(r=o(r))),s.push(r)}return s.join("")}(e),i)return s(l(i));if(i=r("filename","i").exec(e),i){i=i[1];let e=a(i);return e=l(e),s(e)}function r(e,t){return new RegExp("(?:^|;)\\s*"+e+'\\s*=\\s*([^";\\s][^;\\s]*|"(?:[^"\\\\]|\\\\"?)+"?)',t)}function n(e,i){if(e){if(!/^[\x00-\xFF]+$/.test(i))return i;try{const r=new TextDecoder(e,{fatal:!0}),n=cl(i);i=r.decode(n),t=!1}catch{}}return i}function s(e){return t&&/[\x80-\xff]/.test(e)&&(e=n("utf-8",e),t&&(e=n("iso-8859-1",e))),e}function a(e){if(e.startsWith('"')){const t=e.slice(1).split('\\"');for(let e=0;e<t.length;++e){const i=t[e].indexOf('"');-1!==i&&(t[e]=t[e].slice(0,i),t.length=e+1),t[e]=t[e].replaceAll(/\\(.)/g,"$1")}e=t.join('"')}return e}function o(e){const t=e.indexOf("'");return-1===t?e:n(e.slice(0,t),e.slice(t+1).replace(/^[^']*'/,""))}function l(e){return!e.startsWith("=?")||/[\x00-\x19\x80-\xff]/.test(e)?e:e.replaceAll(/=\?([\w-]*)\?([QqBb])\?((?:[^?]|\?(?!=))*)\?=/g,(function(e,t,i,r){if("q"===i||"Q"===i)return n(t,r=(r=r.replaceAll("_"," ")).replaceAll(/=([0-9a-fA-F]{2})/g,(function(e,t){return String.fromCharCode(parseInt(t,16))})));try{r=atob(r)}catch{}return n(t,r)}))}return""}(t);if(e.includes("%"))try{e=decodeURIComponent(e)}catch{}if(Sl(e))return e}return null}function pc(e,t){return 404===e||0===e&&t.startsWith("file:")?new sl('Missing PDF "'+t+'".'):new al(`Unexpected server response (${e}) while retrieving PDF "${t}".`,e)}function mc(e){return 200===e||206===e}function gc(e,t,i){return{method:"GET",headers:e,signal:i.signal,mode:"cors",credentials:t?"include":"same-origin",redirect:"follow"}}function fc(e){return e instanceof Uint8Array?e.buffer:e instanceof ArrayBuffer?e:(Ko(`getArrayBuffer - unexpected data format: ${e}`),new Uint8Array(e).buffer)}class bc{_responseOrigin=null;constructor(e){this.source=e,this.isHttp=/^https?:/i.test(e.url),this.headers=hc(this.isHttp,e.httpHeaders),this._fullRequestReader=null,this._rangeRequestReaders=[]}get _progressiveDataLength(){return this._fullRequestReader?._loaded??0}getFullReader(){return Jo(!this._fullRequestReader,"PDFFetchStream.getFullReader can only be called once."),this._fullRequestReader=new vc(this),this._fullRequestReader}getRangeReader(e,t){if(t<=this._progressiveDataLength)return null;const i=new yc(this,e,t);return this._rangeRequestReaders.push(i),i}cancelAllRequests(e){this._fullRequestReader?.cancel(e);for(const t of this._rangeRequestReaders.slice(0))t.cancel(e)}}class vc{constructor(e){this._stream=e,this._reader=null,this._loaded=0,this._filename=null;const t=e.source;this._withCredentials=t.withCredentials||!1,this._contentLength=t.length,this._headersCapability=Promise.withResolvers(),this._disableRange=t.disableRange||!1,this._rangeChunkSize=t.rangeChunkSize,this._rangeChunkSize||this._disableRange||(this._disableRange=!0),this._abortController=new AbortController,this._isStreamingSupported=!t.disableStream,this._isRangeSupported=!t.disableRange;const i=new Headers(e.headers),r=t.url;fetch(r,gc(i,this._withCredentials,this._abortController)).then((t=>{if(e._responseOrigin=cc(t.url),!mc(t.status))throw pc(t.status,r);this._reader=t.body.getReader(),this._headersCapability.resolve();const i=t.headers,{allowRangeRequests:n,suggestedLength:s}=dc({responseHeaders:i,isHttp:e.isHttp,rangeChunkSize:this._rangeChunkSize,disableRange:this._disableRange});this._isRangeSupported=n,this._contentLength=s||this._contentLength,this._filename=uc(i),!this._isStreamingSupported&&this._isRangeSupported&&this.cancel(new ll("Streaming is disabled."))})).catch(this._headersCapability.reject),this.onProgress=null}get headersReady(){return this._headersCapability.promise}get filename(){return this._filename}get contentLength(){return this._contentLength}get isRangeSupported(){return this._isRangeSupported}get isStreamingSupported(){return this._isStreamingSupported}async read(){await this._headersCapability.promise;const{value:e,done:t}=await this._reader.read();return t?{value:e,done:t}:(this._loaded+=e.byteLength,this.onProgress?.({loaded:this._loaded,total:this._contentLength}),{value:fc(e),done:!1})}cancel(e){this._reader?.cancel(e),this._abortController.abort()}}class yc{constructor(e,t,i){this._stream=e,this._reader=null,this._loaded=0;const r=e.source;this._withCredentials=r.withCredentials||!1,this._readCapability=Promise.withResolvers(),this._isStreamingSupported=!r.disableStream,this._abortController=new AbortController;const n=new Headers(e.headers);n.append("Range",`bytes=${t}-${i-1}`);const s=r.url;fetch(s,gc(n,this._withCredentials,this._abortController)).then((t=>{const i=cc(t.url);if(i!==e._responseOrigin)throw new Error(`Expected range response-origin "${i}" to match "${e._responseOrigin}".`);if(!mc(t.status))throw pc(t.status,s);this._readCapability.resolve(),this._reader=t.body.getReader()})).catch(this._readCapability.reject),this.onProgress=null}get isStreamingSupported(){return this._isStreamingSupported}async read(){await this._readCapability.promise;const{value:e,done:t}=await this._reader.read();return t?{value:e,done:t}:(this._loaded+=e.byteLength,this.onProgress?.({loaded:this._loaded}),{value:fc(e),done:!1})}cancel(e){this._reader?.cancel(e),this._abortController.abort()}}class wc{_responseOrigin=null;constructor({url:e,httpHeaders:t,withCredentials:i}){this.url=e,this.isHttp=/^https?:/i.test(e),this.headers=hc(this.isHttp,t),this.withCredentials=i||!1,this.currXhrId=0,this.pendingRequests=Object.create(null)}request(e){const t=new XMLHttpRequest,i=this.currXhrId++,r=this.pendingRequests[i]={xhr:t};t.open("GET",this.url),t.withCredentials=this.withCredentials;for(const[e,i]of this.headers)t.setRequestHeader(e,i);return this.isHttp&&"begin"in e&&"end"in e?(t.setRequestHeader("Range",`bytes=${e.begin}-${e.end-1}`),r.expectedStatus=206):r.expectedStatus=200,t.responseType="arraybuffer",Jo(e.onError,"Expected `onError` callback to be provided."),t.onerror=()=>{e.onError(t.status)},t.onreadystatechange=this.onStateChange.bind(this,i),t.onprogress=this.onProgress.bind(this,i),r.onHeadersReceived=e.onHeadersReceived,r.onDone=e.onDone,r.onError=e.onError,r.onProgress=e.onProgress,t.send(null),i}onProgress(e,t){const i=this.pendingRequests[e];i&&i.onProgress?.(t)}onStateChange(e,t){const i=this.pendingRequests[e];if(!i)return;const r=i.xhr;if(r.readyState>=2&&i.onHeadersReceived&&(i.onHeadersReceived(),delete i.onHeadersReceived),4!==r.readyState)return;if(!(e in this.pendingRequests))return;if(delete this.pendingRequests[e],0===r.status&&this.isHttp)return void i.onError(r.status);const n=r.status||200;if(!(200===n&&206===i.expectedStatus)&&n!==i.expectedStatus)return void i.onError(r.status);const s=function(e){const t=e.response;return"string"!=typeof t?t:cl(t).buffer}(r);if(206===n){const e=r.getResponseHeader("Content-Range"),t=/bytes (\d+)-(\d+)\/(\d+)/.exec(e);t?i.onDone({begin:parseInt(t[1],10),chunk:s}):(Ko('Missing or invalid "Content-Range" header.'),i.onError(0))}else s?i.onDone({begin:0,chunk:s}):i.onError(r.status)}getRequestXhr(e){return this.pendingRequests[e].xhr}isPendingRequest(e){return e in this.pendingRequests}abortRequest(e){const t=this.pendingRequests[e].xhr;delete this.pendingRequests[e],t.abort()}}class xc{constructor(e){this._source=e,this._manager=new wc(e),this._rangeChunkSize=e.rangeChunkSize,this._fullRequestReader=null,this._rangeRequestReaders=[]}_onRangeRequestReaderClosed(e){const t=this._rangeRequestReaders.indexOf(e);t>=0&&this._rangeRequestReaders.splice(t,1)}getFullReader(){return Jo(!this._fullRequestReader,"PDFNetworkStream.getFullReader can only be called once."),this._fullRequestReader=new Ac(this._manager,this._source),this._fullRequestReader}getRangeReader(e,t){const i=new kc(this._manager,e,t);return i.onClosed=this._onRangeRequestReaderClosed.bind(this),this._rangeRequestReaders.push(i),i}cancelAllRequests(e){this._fullRequestReader?.cancel(e);for(const t of this._rangeRequestReaders.slice(0))t.cancel(e)}}class Ac{constructor(e,t){this._manager=e,this._url=t.url,this._fullRequestId=e.request({onHeadersReceived:this._onHeadersReceived.bind(this),onDone:this._onDone.bind(this),onError:this._onError.bind(this),onProgress:this._onProgress.bind(this)}),this._headersCapability=Promise.withResolvers(),this._disableRange=t.disableRange||!1,this._contentLength=t.length,this._rangeChunkSize=t.rangeChunkSize,this._rangeChunkSize||this._disableRange||(this._disableRange=!0),this._isStreamingSupported=!1,this._isRangeSupported=!1,this._cachedChunks=[],this._requests=[],this._done=!1,this._storedError=void 0,this._filename=null,this.onProgress=null}_onHeadersReceived(){const e=this._fullRequestId,t=this._manager.getRequestXhr(e);this._manager._responseOrigin=cc(t.responseURL);const i=t.getAllResponseHeaders(),r=new Headers(i?i.trimStart().replace(/[^\S ]+$/,"").split(/[\r\n]+/).map((e=>{const[t,...i]=e.split(": ");return[t,i.join(": ")]})):[]),{allowRangeRequests:n,suggestedLength:s}=dc({responseHeaders:r,isHttp:this._manager.isHttp,rangeChunkSize:this._rangeChunkSize,disableRange:this._disableRange});n&&(this._isRangeSupported=!0),this._contentLength=s||this._contentLength,this._filename=uc(r),this._isRangeSupported&&this._manager.abortRequest(e),this._headersCapability.resolve()}_onDone(e){if(e)if(this._requests.length>0){this._requests.shift().resolve({value:e.chunk,done:!1})}else this._cachedChunks.push(e.chunk);if(this._done=!0,!(this._cachedChunks.length>0)){for(const e of this._requests)e.resolve({value:void 0,done:!0});this._requests.length=0}}_onError(e){this._storedError=pc(e,this._url),this._headersCapability.reject(this._storedError);for(const e of this._requests)e.reject(this._storedError);this._requests.length=0,this._cachedChunks.length=0}_onProgress(e){this.onProgress?.({loaded:e.loaded,total:e.lengthComputable?e.total:this._contentLength})}get filename(){return this._filename}get isRangeSupported(){return this._isRangeSupported}get isStreamingSupported(){return this._isStreamingSupported}get contentLength(){return this._contentLength}get headersReady(){return this._headersCapability.promise}async read(){if(await this._headersCapability.promise,this._storedError)throw this._storedError;if(this._cachedChunks.length>0){return{value:this._cachedChunks.shift(),done:!1}}if(this._done)return{value:void 0,done:!0};const e=Promise.withResolvers();return this._requests.push(e),e.promise}cancel(e){this._done=!0,this._headersCapability.reject(e);for(const e of this._requests)e.resolve({value:void 0,done:!0});this._requests.length=0,this._manager.isPendingRequest(this._fullRequestId)&&this._manager.abortRequest(this._fullRequestId),this._fullRequestReader=null}}class kc{constructor(e,t,i){this._manager=e,this._url=e.url,this._requestId=e.request({begin:t,end:i,onHeadersReceived:this._onHeadersReceived.bind(this),onDone:this._onDone.bind(this),onError:this._onError.bind(this),onProgress:this._onProgress.bind(this)}),this._requests=[],this._queuedChunk=null,this._done=!1,this._storedError=void 0,this.onProgress=null,this.onClosed=null}_onHeadersReceived(){const e=cc(this._manager.getRequestXhr(this._requestId)?.responseURL);e!==this._manager._responseOrigin&&(this._storedError=new Error(`Expected range response-origin "${e}" to match "${this._manager._responseOrigin}".`),this._onError(0))}_close(){this.onClosed?.(this)}_onDone(e){const t=e.chunk;if(this._requests.length>0){this._requests.shift().resolve({value:t,done:!1})}else this._queuedChunk=t;this._done=!0;for(const e of this._requests)e.resolve({value:void 0,done:!0});this._requests.length=0,this._close()}_onError(e){this._storedError??=pc(e,this._url);for(const e of this._requests)e.reject(this._storedError);this._requests.length=0,this._queuedChunk=null}_onProgress(e){this.isStreamingSupported||this.onProgress?.({loaded:e.loaded})}get isStreamingSupported(){return!1}async read(){if(this._storedError)throw this._storedError;if(null!==this._queuedChunk){const e=this._queuedChunk;return this._queuedChunk=null,{value:e,done:!1}}if(this._done)return{value:void 0,done:!0};const e=Promise.withResolvers();return this._requests.push(e),e.promise}cancel(e){this._done=!0;for(const e of this._requests)e.resolve({value:void 0,done:!0});this._requests.length=0,this._manager.isPendingRequest(this._requestId)&&this._manager.abortRequest(this._requestId),this._close()}}const Ec=/^[a-z][a-z0-9\-+.]+:/i;class Sc{constructor(e){this.source=e,this.url=function(e){if(Ec.test(e))return new URL(e);const t=process.getBuiltinModule("url");return new URL(t.pathToFileURL(e))}(e.url),Jo("file:"===this.url.protocol,"PDFNodeStream only supports file:// URLs."),this._fullRequestReader=null,this._rangeRequestReaders=[]}get _progressiveDataLength(){return this._fullRequestReader?._loaded??0}getFullReader(){return Jo(!this._fullRequestReader,"PDFNodeStream.getFullReader can only be called once."),this._fullRequestReader=new Cc(this),this._fullRequestReader}getRangeReader(e,t){if(t<=this._progressiveDataLength)return null;const i=new Mc(this,e,t);return this._rangeRequestReaders.push(i),i}cancelAllRequests(e){this._fullRequestReader?.cancel(e);for(const t of this._rangeRequestReaders.slice(0))t.cancel(e)}}class Cc{constructor(e){this._url=e.url,this._done=!1,this._storedError=null,this.onProgress=null;const t=e.source;this._contentLength=t.length,this._loaded=0,this._filename=null,this._disableRange=t.disableRange||!1,this._rangeChunkSize=t.rangeChunkSize,this._rangeChunkSize||this._disableRange||(this._disableRange=!0),this._isStreamingSupported=!t.disableStream,this._isRangeSupported=!t.disableRange,this._readableStream=null,this._readCapability=Promise.withResolvers(),this._headersCapability=Promise.withResolvers();const i=process.getBuiltinModule("fs");i.promises.lstat(this._url).then((e=>{this._contentLength=e.size,this._setReadableStream(i.createReadStream(this._url)),this._headersCapability.resolve()}),(e=>{"ENOENT"===e.code&&(e=new sl(`Missing PDF "${this._url}".`)),this._storedError=e,this._headersCapability.reject(e)}))}get headersReady(){return this._headersCapability.promise}get filename(){return this._filename}get contentLength(){return this._contentLength}get isRangeSupported(){return this._isRangeSupported}get isStreamingSupported(){return this._isStreamingSupported}async read(){if(await this._readCapability.promise,this._done)return{value:void 0,done:!0};if(this._storedError)throw this._storedError;const e=this._readableStream.read();if(null===e)return this._readCapability=Promise.withResolvers(),this.read();this._loaded+=e.length,this.onProgress?.({loaded:this._loaded,total:this._contentLength});return{value:new Uint8Array(e).buffer,done:!1}}cancel(e){this._readableStream?this._readableStream.destroy(e):this._error(e)}_error(e){this._storedError=e,this._readCapability.resolve()}_setReadableStream(e){this._readableStream=e,e.on("readable",(()=>{this._readCapability.resolve()})),e.on("end",(()=>{e.destroy(),this._done=!0,this._readCapability.resolve()})),e.on("error",(e=>{this._error(e)})),!this._isStreamingSupported&&this._isRangeSupported&&this._error(new ll("streaming is disabled")),this._storedError&&this._readableStream.destroy(this._storedError)}}class Mc{constructor(e,t,i){this._url=e.url,this._done=!1,this._storedError=null,this.onProgress=null,this._loaded=0,this._readableStream=null,this._readCapability=Promise.withResolvers();const r=e.source;this._isStreamingSupported=!r.disableStream;const n=process.getBuiltinModule("fs");this._setReadableStream(n.createReadStream(this._url,{start:t,end:i-1}))}get isStreamingSupported(){return this._isStreamingSupported}async read(){if(await this._readCapability.promise,this._done)return{value:void 0,done:!0};if(this._storedError)throw this._storedError;const e=this._readableStream.read();if(null===e)return this._readCapability=Promise.withResolvers(),this.read();this._loaded+=e.length,this.onProgress?.({loaded:this._loaded});return{value:new Uint8Array(e).buffer,done:!1}}cancel(e){this._readableStream?this._readableStream.destroy(e):this._error(e)}_error(e){this._storedError=e,this._readCapability.resolve()}_setReadableStream(e){this._readableStream=e,e.on("readable",(()=>{this._readCapability.resolve()})),e.on("end",(()=>{e.destroy(),this._done=!0,this._readCapability.resolve()})),e.on("error",(e=>{this._error(e)})),this._storedError&&this._readableStream.destroy(this._storedError)}}const _c=30;class Tc{#Si=Promise.withResolvers();#pe=null;#Ci=!1;#Mi=!!globalThis.FontInspector?.enabled;#_i=null;#Ti=null;#Ni=0;#Ii=0;#Li=null;#Pi=null;#Ri=0;#Di=0;#zi=Object.create(null);#Fi=[];#Oi=null;#Bi=[];#Hi=new WeakMap;#qi=null;static#ji=new Map;static#Vi=new Map;static#Ui=new WeakMap;static#Gi=null;static#$i=new Set;constructor({textContentSource:e,container:t,viewport:i}){if(e instanceof ReadableStream)this.#Oi=e;else{if("object"!=typeof e)throw new Error('No "textContentSource" parameter specified.');this.#Oi=new ReadableStream({start(t){t.enqueue(e),t.close()}})}this.#pe=this.#Pi=t,this.#Di=i.scale*(globalThis.devicePixelRatio||1),this.#Ri=i.rotation,this.#Ti={div:null,properties:null,ctx:null};const{pageWidth:r,pageHeight:n,pageX:s,pageY:a}=i.rawDims;this.#qi=[1,0,0,-1,-s,a+n],this.#Ii=r,this.#Ni=n,Tc.#Wi(),Fl(t,i),this.#Si.promise.finally((()=>{Tc.#$i.delete(this),this.#Ti=null,this.#zi=null})).catch((()=>{}))}static get fontFamilyMap(){const{isWindows:e,isFirefox:t}=ul.platform;return el(this,"fontFamilyMap",new Map([["sans-serif",(e&&t?"Calibri, ":"")+"sans-serif"],["monospace",(e&&t?"Lucida Console, ":"")+"monospace"]]))}render(){const e=()=>{this.#Li.read().then((({value:t,done:i})=>{i?this.#Si.resolve():(this.#_i??=t.lang,Object.assign(this.#zi,t.styles),this.#Xi(t.items),e())}),this.#Si.reject)};return this.#Li=this.#Oi.getReader(),Tc.#$i.add(this),e(),this.#Si.promise}update({viewport:e,onBefore:t=null}){const i=e.scale*(globalThis.devicePixelRatio||1),r=e.rotation;if(r!==this.#Ri&&(t?.(),this.#Ri=r,Fl(this.#Pi,{rotation:r})),i!==this.#Di){t?.(),this.#Di=i;const e={div:null,properties:null,ctx:Tc.#Yi(this.#_i)};for(const t of this.#Bi)e.properties=this.#Hi.get(t),e.div=t,this.#Ki(e)}}cancel(){const e=new ll("TextLayer task cancelled.");this.#Li?.cancel(e).catch((()=>{})),this.#Li=null,this.#Si.reject(e)}get textDivs(){return this.#Bi}get textContentItemsStr(){return this.#Fi}#Xi(e){if(this.#Ci)return;this.#Ti.ctx??=Tc.#Yi(this.#_i);const t=this.#Bi,i=this.#Fi;for(const r of e){if(t.length>1e5)return Ko("Ignoring additional textDivs for performance reasons."),void(this.#Ci=!0);if(void 0!==r.str)i.push(r.str),this.#Zi(r);else if("beginMarkedContentProps"===r.type||"beginMarkedContent"===r.type){const e=this.#pe;this.#pe=document.createElement("span"),this.#pe.classList.add("markedContent"),null!==r.id&&this.#pe.setAttribute("id",`${r.id}`),e.append(this.#pe)}else"endMarkedContent"===r.type&&(this.#pe=this.#pe.parentNode)}}#Zi(e){const t=document.createElement("span"),i={angle:0,canvasWidth:0,hasText:""!==e.str,hasEOL:e.hasEOL,fontSize:0};this.#Bi.push(t);const r=ml.transform(this.#qi,e.transform);let n=Math.atan2(r[1],r[0]);const s=this.#zi[e.fontName];s.vertical&&(n+=Math.PI/2);let a=this.#Mi&&s.fontSubstitution||s.fontFamily;a=Tc.fontFamilyMap.get(a)||a;const o=Math.hypot(r[2],r[3]),l=o*Tc.#Ji(a,this.#_i);let h,c;0===n?(h=r[4],c=r[5]-l):(h=r[4]+l*Math.sin(n),c=r[5]-l*Math.cos(n));const d="calc(var(--scale-factor)*",u=t.style;this.#pe===this.#Pi?(u.left=`${(100*h/this.#Ii).toFixed(2)}%`,u.top=`${(100*c/this.#Ni).toFixed(2)}%`):(u.left=`${d}${h.toFixed(2)}px)`,u.top=`${d}${c.toFixed(2)}px)`),u.fontSize=`${d}${(Tc.#Gi*o).toFixed(2)}px)`,u.fontFamily=a,i.fontSize=o,t.setAttribute("role","presentation"),t.textContent=e.str,t.dir=e.dir,this.#Mi&&(t.dataset.fontName=s.fontSubstitutionLoadedName||e.fontName),0!==n&&(i.angle=n*(180/Math.PI));let p=!1;if(e.str.length>1)p=!0;else if(" "!==e.str&&e.transform[0]!==e.transform[3]){const t=Math.abs(e.transform[0]),i=Math.abs(e.transform[3]);t!==i&&Math.max(t,i)/Math.min(t,i)>1.5&&(p=!0)}if(p&&(i.canvasWidth=s.vertical?e.height:e.width),this.#Hi.set(t,i),this.#Ti.div=t,this.#Ti.properties=i,this.#Ki(this.#Ti),i.hasText&&this.#pe.append(t),i.hasEOL){const e=document.createElement("br");e.setAttribute("role","presentation"),this.#pe.append(e)}}#Ki(e){const{div:t,properties:i,ctx:r}=e,{style:n}=t;let s="";if(Tc.#Gi>1&&(s=`scale(${1/Tc.#Gi})`),0!==i.canvasWidth&&i.hasText){const{fontFamily:e}=n,{canvasWidth:a,fontSize:o}=i;Tc.#Qi(r,o*this.#Di,e);const{width:l}=r.measureText(t.textContent);l>0&&(s=`scaleX(${a*this.#Di/l}) ${s}`)}0!==i.angle&&(s=`rotate(${i.angle}deg) ${s}`),s.length>0&&(n.transform=s)}static cleanup(){if(!(this.#$i.size>0)){this.#ji.clear();for(const{canvas:e}of this.#Vi.values())e.remove();this.#Vi.clear()}}static#Yi(e=null){let t=this.#Vi.get(e||="");if(!t){const i=document.createElement("canvas");i.className="hiddenCanvasElement",i.lang=e,document.body.append(i),t=i.getContext("2d",{alpha:!1,willReadFrequently:!0}),this.#Vi.set(e,t),this.#Ui.set(t,{size:0,family:""})}return t}static#Qi(e,t,i){const r=this.#Ui.get(e);t===r.size&&i===r.family||(e.font=`${t}px ${i}`,r.size=t,r.family=i)}static#Wi(){if(null!==this.#Gi)return;const e=document.createElement("div");e.style.opacity=0,e.style.lineHeight=1,e.style.fontSize="1px",e.style.position="absolute",e.textContent="X",document.body.append(e),this.#Gi=e.getBoundingClientRect().height,e.remove()}static#Ji(e,t){const i=this.#ji.get(e);if(i)return i;const r=this.#Yi(t);r.canvas.width=r.canvas.height=_c,this.#Qi(r,_c,e);const n=r.measureText("");let s=n.fontBoundingBoxAscent,a=Math.abs(n.fontBoundingBoxDescent);if(s){const t=s/(s+a);return this.#ji.set(e,t),r.canvas.width=r.canvas.height=0,t}r.strokeStyle="red",r.clearRect(0,0,_c,_c),r.strokeText("g",0,0);let o=r.getImageData(0,0,_c,_c).data;a=0;for(let e=o.length-1-3;e>=0;e-=4)if(o[e]>0){a=Math.ceil(e/4/_c);break}r.clearRect(0,0,_c,_c),r.strokeText("A",0,_c),o=r.getImageData(0,0,_c,_c).data,s=0;for(let e=0,t=o.length;e<t;e+=4)if(o[e]>0){s=_c-Math.floor(e/4/_c);break}r.canvas.width=r.canvas.height=0;const l=s?s/(s+a):.8;return this.#ji.set(e,l),l}}class Nc{static textContent(e){const t=[],i={items:t,styles:Object.create(null)};return function e(i){if(!i)return;let r=null;const n=i.name;if("#text"===n)r=i.value;else{if(!Nc.shouldBuildText(n))return;i?.attributes?.textContent?r=i.attributes.textContent:i.value&&(r=i.value)}if(null!==r&&t.push({str:r}),i.children)for(const t of i.children)e(t)}(e),i}static shouldBuildText(e){return!("textarea"===e||"input"===e||"option"===e||"select"===e)}}const Ic=65536,Lc=Ka?class extends wh{_createCanvas(e,t){return process.getBuiltinModule("module").createRequire(import.meta.url)("@napi-rs/canvas").createCanvas(e,t)}}:class extends wh{constructor({ownerDocument:e=globalThis.document,enableHWA:t=!1}){super({enableHWA:t}),this._document=e}_createCanvas(e,t){const i=this._document.createElement("canvas");return i.width=e,i.height=t,i}},Pc=Ka?class extends xh{async _fetch(e){return Ch(e)}}:Ah,Rc=Ka?class extends kh{}:class extends kh{#er;#tr;#ir;#rr;#nr;#sr;#y=0;constructor({docId:e,ownerDocument:t=globalThis.document}){super(),this.#rr=e,this.#nr=t}get#x(){return this.#tr||=new Map}get#ar(){return this.#sr||=new Map}get#or(){if(!this.#ir){const e=this.#nr.createElement("div"),{style:t}=e;t.visibility="hidden",t.contain="strict",t.width=t.height=0,t.position="absolute",t.top=t.left=0,t.zIndex=-1;const i=this.#nr.createElementNS(yl,"svg");i.setAttribute("width",0),i.setAttribute("height",0),this.#ir=this.#nr.createElementNS(yl,"defs"),e.append(i),i.append(this.#ir),this.#nr.body.append(e)}return this.#ir}#lr(e){if(1===e.length){const t=e[0],i=new Array(256);for(let e=0;e<256;e++)i[e]=t[e]/255;const r=i.join(",");return[r,r,r]}const[t,i,r]=e,n=new Array(256),s=new Array(256),a=new Array(256);for(let e=0;e<256;e++)n[e]=t[e]/255,s[e]=i[e]/255,a[e]=r[e]/255;return[n.join(","),s.join(","),a.join(",")]}#hr(e){if(void 0===this.#er){this.#er="";const e=this.#nr.URL;e!==this.#nr.baseURI&&(El(e)?Ko('#createUrl: ignore "data:"-URL for performance reasons.'):this.#er=e.split("#",1)[0])}return`url(${this.#er}#${e})`}addFilter(e){if(!e)return"none";let t=this.#x.get(e);if(t)return t;const[i,r,n]=this.#lr(e),s=1===e.length?i:`${i}${r}${n}`;if(t=this.#x.get(s),t)return this.#x.set(e,t),t;const a=`g_${this.#rr}_transfer_map_${this.#y++}`,o=this.#hr(a);this.#x.set(e,o),this.#x.set(s,o);const l=this.#cr(a);return this.#dr(i,r,n,l),o}addHCMFilter(e,t){const i=`${e}-${t}`,r="base";let n=this.#ar.get(r);if(n?.key===i)return n.url;if(n?(n.filter?.remove(),n.key=i,n.url="none",n.filter=null):(n={key:i,url:"none",filter:null},this.#ar.set(r,n)),!e||!t)return n.url;const s=this.#ur(e);e=ml.makeHexColor(...s);const a=this.#ur(t);if(t=ml.makeHexColor(...a),this.#or.style.color="","#000000"===e&&"#ffffff"===t||e===t)return n.url;const o=new Array(256);for(let e=0;e<=255;e++){const t=e/255;o[e]=t<=.03928?t/12.92:((t+.055)/1.055)**2.4}const l=o.join(","),h=`g_${this.#rr}_hcm_filter`,c=n.filter=this.#cr(h);this.#dr(l,l,l,c),this.#pr(c);const d=(e,t)=>{const i=s[e]/255,r=a[e]/255,n=new Array(t+1);for(let e=0;e<=t;e++)n[e]=i+e/t*(r-i);return n.join(",")};return this.#dr(d(0,5),d(1,5),d(2,5),c),n.url=this.#hr(h),n.url}addAlphaFilter(e){let t=this.#x.get(e);if(t)return t;const[i]=this.#lr([e]),r=`alpha_${i}`;if(t=this.#x.get(r),t)return this.#x.set(e,t),t;const n=`g_${this.#rr}_alpha_map_${this.#y++}`,s=this.#hr(n);this.#x.set(e,s),this.#x.set(r,s);const a=this.#cr(n);return this.#mr(i,a),s}addLuminosityFilter(e){let t,i,r=this.#x.get(e||"luminosity");if(r)return r;if(e?([t]=this.#lr([e]),i=`luminosity_${t}`):i="luminosity",r=this.#x.get(i),r)return this.#x.set(e,r),r;const n=`g_${this.#rr}_luminosity_map_${this.#y++}`,s=this.#hr(n);this.#x.set(e,s),this.#x.set(i,s);const a=this.#cr(n);return this.#gr(a),e&&this.#mr(t,a),s}addHighlightHCMFilter(e,t,i,r,n){const s=`${t}-${i}-${r}-${n}`;let a=this.#ar.get(e);if(a?.key===s)return a.url;if(a?(a.filter?.remove(),a.key=s,a.url="none",a.filter=null):(a={key:s,url:"none",filter:null},this.#ar.set(e,a)),!t||!i)return a.url;const[o,l]=[t,i].map(this.#ur.bind(this));let h=Math.round(.2126*o[0]+.7152*o[1]+.0722*o[2]),c=Math.round(.2126*l[0]+.7152*l[1]+.0722*l[2]),[d,u]=[r,n].map(this.#ur.bind(this));c<h&&([h,c,d,u]=[c,h,u,d]),this.#or.style.color="";const p=(e,t,i)=>{const r=new Array(256),n=(c-h)/i,s=e/255,a=(t-e)/(255*i);let o=0;for(let e=0;e<=i;e++){const t=Math.round(h+e*n),i=s+e*a;for(let e=o;e<=t;e++)r[e]=i;o=t+1}for(let e=o;e<256;e++)r[e]=r[o-1];return r.join(",")},m=`g_${this.#rr}_hcm_${e}_filter`,g=a.filter=this.#cr(m);return this.#pr(g),this.#dr(p(d[0],u[0],5),p(d[1],u[1],5),p(d[2],u[2],5),g),a.url=this.#hr(m),a.url}destroy(e=!1){e&&this.#sr?.size||(this.#ir?.parentNode.parentNode.remove(),this.#ir=null,this.#tr?.clear(),this.#tr=null,this.#sr?.clear(),this.#sr=null,this.#y=0)}#gr(e){const t=this.#nr.createElementNS(yl,"feColorMatrix");t.setAttribute("type","matrix"),t.setAttribute("values","0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.3 0.59 0.11 0 0"),e.append(t)}#pr(e){const t=this.#nr.createElementNS(yl,"feColorMatrix");t.setAttribute("type","matrix"),t.setAttribute("values","0.2126 0.7152 0.0722 0 0 0.2126 0.7152 0.0722 0 0 0.2126 0.7152 0.0722 0 0 0 0 0 1 0"),e.append(t)}#cr(e){const t=this.#nr.createElementNS(yl,"filter");return t.setAttribute("color-interpolation-filters","sRGB"),t.setAttribute("id",e),this.#or.append(t),t}#fr(e,t,i){const r=this.#nr.createElementNS(yl,t);r.setAttribute("type","discrete"),r.setAttribute("tableValues",i),e.append(r)}#dr(e,t,i,r){const n=this.#nr.createElementNS(yl,"feComponentTransfer");r.append(n),this.#fr(n,"feFuncR",e),this.#fr(n,"feFuncG",t),this.#fr(n,"feFuncB",i)}#mr(e,t){const i=this.#nr.createElementNS(yl,"feComponentTransfer");t.append(i),this.#fr(i,"feFuncA",e)}#ur(e){return this.#or.style.color=e,Rl(getComputedStyle(this.#or).getPropertyValue("color"))}},Dc=Ka?class extends Eh{async _fetch(e){return Ch(e)}}:Sh;function zc(e={}){"string"==typeof e||e instanceof URL?e={url:e}:(e instanceof ArrayBuffer||ArrayBuffer.isView(e))&&(e={data:e});const t=new Oc,{docId:i}=t,r=e.url?function(e){if(e instanceof URL)return e.href;try{return new URL(e,window.location).href}catch{if(Ka&&"string"==typeof e)return e}throw new Error("Invalid PDF url data: either string or URL-object is expected in the url property.")}(e.url):null,n=e.data?function(e){if(Ka&&"undefined"!=typeof Buffer&&e instanceof Buffer)throw new Error("Please provide binary data as `Uint8Array`, rather than `Buffer`.");if(e instanceof Uint8Array&&e.byteLength===e.buffer.byteLength)return e;if("string"==typeof e)return cl(e);if(e instanceof ArrayBuffer||ArrayBuffer.isView(e)||"object"==typeof e&&!isNaN(e?.length))return new Uint8Array(e);throw new Error("Invalid PDF binary data: either TypedArray, string, or array-like object is expected in the data property.")}(e.data):null,s=e.httpHeaders||null,a=!0===e.withCredentials,o=e.password??null,l=e.range instanceof Bc?e.range:null,h=Number.isInteger(e.rangeChunkSize)&&e.rangeChunkSize>0?e.rangeChunkSize:Ic;let c=e.worker instanceof Vc?e.worker:null;const d=e.verbosity,u="string"!=typeof e.docBaseUrl||El(e.docBaseUrl)?null:e.docBaseUrl,p="string"==typeof e.cMapUrl?e.cMapUrl:null,m=!1!==e.cMapPacked,g=e.CMapReaderFactory||Pc,f="string"==typeof e.standardFontDataUrl?e.standardFontDataUrl:null,b=e.StandardFontDataFactory||Dc,v=!0!==e.stopAtErrors,y=Number.isInteger(e.maxImageSize)&&e.maxImageSize>-1?e.maxImageSize:-1,w=!1!==e.isEvalSupported,x="boolean"==typeof e.isOffscreenCanvasSupported?e.isOffscreenCanvasSupported:!Ka,A="boolean"==typeof e.isImageDecoderSupported?e.isImageDecoderSupported:!Ka&&(ul.platform.isFirefox||!globalThis.chrome),k=Number.isInteger(e.canvasMaxAreaInBytes)?e.canvasMaxAreaInBytes:-1,E="boolean"==typeof e.disableFontFace?e.disableFontFace:Ka,S=!0===e.fontExtraProperties,C=!0===e.enableXfa,M=e.ownerDocument||globalThis.document,_=!0===e.disableRange,T=!0===e.disableStream,N=!0===e.disableAutoFetch,I=!0===e.pdfBug,L=e.CanvasFactory||Lc,P=e.FilterFactory||Rc,R=!0===e.enableHWA,D=l?l.length:e.length??NaN,z="boolean"==typeof e.useSystemFonts?e.useSystemFonts:!Ka&&!E,F="boolean"==typeof e.useWorkerFetch?e.useWorkerFetch:g===Ah&&b===Sh&&p&&f&&Tl(p,document.baseURI)&&Tl(f,document.baseURI);Wo(d);const O={canvasFactory:new L({ownerDocument:M,enableHWA:R}),filterFactory:new P({docId:i,ownerDocument:M}),cMapReaderFactory:F?null:new g({baseUrl:p,isCompressed:m}),standardFontDataFactory:F?null:new b({baseUrl:f})};if(!c){const e={verbosity:d,port:tc.workerPort};c=e.port?Vc.fromPort(e):new Vc(e),t._worker=c}const B={docId:i,apiVersion:"4.10.38",data:n,password:o,disableAutoFetch:N,rangeChunkSize:h,length:D,docBaseUrl:u,enableXfa:C,evaluatorOptions:{maxImageSize:y,disableFontFace:E,ignoreErrors:v,isEvalSupported:w,isOffscreenCanvasSupported:x,isImageDecoderSupported:A,canvasMaxAreaInBytes:k,fontExtraProperties:S,useSystemFonts:z,cMapUrl:F?p:null,standardFontDataUrl:F?f:null}},H={disableFontFace:E,fontExtraProperties:S,ownerDocument:M,pdfBug:I,styleElement:null,loadingParams:{disableAutoFetch:N,enableXfa:C}};return c.promise.then((function(){if(t.destroyed)throw new Error("Loading aborted");if(c.destroyed)throw new Error("Worker was destroyed");const e=c.messageHandler.sendWithPromise("GetDocRequest",B,n?[n.buffer]:null);let o;if(l)o=new ac(l,{disableRange:_,disableStream:T});else if(!n){if(!r)throw new Error("getDocument - no `url` parameter provided.");let e;if(Ka)if(Tl(r)){if("undefined"==typeof fetch||"undefined"==typeof Response||!("body"in Response.prototype))throw new Error("getDocument - the Fetch API was disabled in Node.js, see `--no-experimental-fetch`.");e=bc}else e=Sc;else e=Tl(r)?bc:xc;o=new e({url:r,length:D,httpHeaders:s,withCredentials:a,rangeChunkSize:h,disableRange:_,disableStream:T})}return e.then((e=>{if(t.destroyed)throw new Error("Loading aborted");if(c.destroyed)throw new Error("Worker was destroyed");const r=new yh(i,e,c.port),n=new Uc(r,t,o,H,O);t._transport=n,r.send("Ready",null)}))})).catch(t._capability.reject),t}function Fc(e){return"object"==typeof e&&Number.isInteger(e?.num)&&e.num>=0&&Number.isInteger(e?.gen)&&e.gen>=0}class Oc{static#rr=0;constructor(){this._capability=Promise.withResolvers(),this._transport=null,this._worker=null,this.docId="d"+Oc.#rr++,this.destroyed=!1,this.onPassword=null,this.onProgress=null}get promise(){return this._capability.promise}async destroy(){this.destroyed=!0;try{this._worker?.port&&(this._worker._pendingDestroy=!0),await(this._transport?.destroy())}catch(e){throw this._worker?.port&&delete this._worker._pendingDestroy,e}this._transport=null,this._worker?.destroy(),this._worker=null}}class Bc{constructor(e,t,i=!1,r=null){this.length=e,this.initialData=t,this.progressiveDone=i,this.contentDispositionFilename=r,this._rangeListeners=[],this._progressListeners=[],this._progressiveReadListeners=[],this._progressiveDoneListeners=[],this._readyCapability=Promise.withResolvers()}addRangeListener(e){this._rangeListeners.push(e)}addProgressListener(e){this._progressListeners.push(e)}addProgressiveReadListener(e){this._progressiveReadListeners.push(e)}addProgressiveDoneListener(e){this._progressiveDoneListeners.push(e)}onDataRange(e,t){for(const i of this._rangeListeners)i(e,t)}onDataProgress(e,t){this._readyCapability.promise.then((()=>{for(const i of this._progressListeners)i(e,t)}))}onDataProgressiveRead(e){this._readyCapability.promise.then((()=>{for(const t of this._progressiveReadListeners)t(e)}))}onDataProgressiveDone(){this._readyCapability.promise.then((()=>{for(const e of this._progressiveDoneListeners)e()}))}transportReady(){this._readyCapability.resolve()}requestDataRange(e,t){Zo("Abstract method PDFDataRangeTransport.requestDataRange")}abort(){}}class Hc{constructor(e,t){this._pdfInfo=e,this._transport=t}get annotationStorage(){return this._transport.annotationStorage}get canvasFactory(){return this._transport.canvasFactory}get filterFactory(){return this._transport.filterFactory}get numPages(){return this._pdfInfo.numPages}get fingerprints(){return this._pdfInfo.fingerprints}get isPureXfa(){return el(this,"isPureXfa",!!this._transport._htmlForXfa)}get allXfaHtml(){return this._transport._htmlForXfa}getPage(e){return this._transport.getPage(e)}getPageIndex(e){return this._transport.getPageIndex(e)}getDestinations(){return this._transport.getDestinations()}getDestination(e){return this._transport.getDestination(e)}getPageLabels(){return this._transport.getPageLabels()}getPageLayout(){return this._transport.getPageLayout()}getPageMode(){return this._transport.getPageMode()}getViewerPreferences(){return this._transport.getViewerPreferences()}getOpenAction(){return this._transport.getOpenAction()}getAttachments(){return this._transport.getAttachments()}getJSActions(){return this._transport.getDocJSActions()}getOutline(){return this._transport.getOutline()}getOptionalContentConfig({intent:e="display"}={}){const{renderingIntent:t}=this._transport.getRenderingIntent(e);return this._transport.getOptionalContentConfig(t)}getPermissions(){return this._transport.getPermissions()}getMetadata(){return this._transport.getMetadata()}getMarkInfo(){return this._transport.getMarkInfo()}getData(){return this._transport.getData()}saveDocument(){return this._transport.saveDocument()}getDownloadInfo(){return this._transport.downloadInfoCapability.promise}cleanup(e=!1){return this._transport.startCleanup(e||this.isPureXfa)}destroy(){return this.loadingTask.destroy()}cachedPageNumber(e){return this._transport.cachedPageNumber(e)}get loadingParams(){return this._transport.loadingParams}get loadingTask(){return this._transport.loadingTask}getFieldObjects(){return this._transport.getFieldObjects()}hasJSActions(){return this._transport.hasJSActions()}getCalculationOrderIds(){return this._transport.getCalculationOrderIds()}}class qc{#br=null;#vr=!1;constructor(e,t,i,r=!1){this._pageIndex=e,this._pageInfo=t,this._transport=i,this._stats=r?new _l:null,this._pdfBug=r,this.commonObjs=i.commonObjs,this.objs=new $c,this._maybeCleanupAfterRender=!1,this._intentStates=new Map,this.destroyed=!1}get pageNumber(){return this._pageIndex+1}get rotate(){return this._pageInfo.rotate}get ref(){return this._pageInfo.ref}get userUnit(){return this._pageInfo.userUnit}get view(){return this._pageInfo.view}getViewport({scale:e,rotation:t=this.rotate,offsetX:i=0,offsetY:r=0,dontFlip:n=!1}={}){return new Al({viewBox:this.view,userUnit:this.userUnit,scale:e,rotation:t,offsetX:i,offsetY:r,dontFlip:n})}getAnnotations({intent:e="display"}={}){const{renderingIntent:t}=this._transport.getRenderingIntent(e);return this._transport.getAnnotations(this._pageIndex,t)}getJSActions(){return this._transport.getPageJSActions(this._pageIndex)}get filterFactory(){return this._transport.filterFactory}get isPureXfa(){return el(this,"isPureXfa",!!this._transport._htmlForXfa)}async getXfa(){return this._transport._htmlForXfa?.children[this._pageIndex]||null}render({canvasContext:e,viewport:t,intent:i="display",annotationMode:r=lo.ENABLE,transform:n=null,background:s=null,optionalContentConfigPromise:a=null,annotationCanvasMap:o=null,pageColors:l=null,printAnnotationStorage:h=null,isEditing:c=!1}){this._stats?.time("Overall");const d=this._transport.getRenderingIntent(i,r,h,c),{renderingIntent:u,cacheKey:p}=d;this.#vr=!1,this.#yr(),a||=this._transport.getOptionalContentConfig(u);let m=this._intentStates.get(p);m||(m=Object.create(null),this._intentStates.set(p,m)),m.streamReaderCancelTimeout&&(clearTimeout(m.streamReaderCancelTimeout),m.streamReaderCancelTimeout=null);const g=!!(u&io);m.displayReadyCapability||(m.displayReadyCapability=Promise.withResolvers(),m.operatorList={fnArray:[],argsArray:[],lastChunk:!1,separateAnnots:null},this._stats?.time("Page Request"),this._pumpOperatorList(d));const f=e=>{m.renderTasks.delete(b),(this._maybeCleanupAfterRender||g)&&(this.#vr=!0),this.#wr(!g),e?(b.capability.reject(e),this._abortOperatorList({intentState:m,reason:e instanceof Error?e:new Error(e)})):b.capability.resolve(),this._stats&&(this._stats.timeEnd("Rendering"),this._stats.timeEnd("Overall"),globalThis.Stats?.enabled&&globalThis.Stats.add(this.pageNumber,this._stats))},b=new Xc({callback:f,params:{canvasContext:e,viewport:t,transform:n,background:s},objs:this.objs,commonObjs:this.commonObjs,annotationCanvasMap:o,operatorList:m.operatorList,pageIndex:this._pageIndex,canvasFactory:this._transport.canvasFactory,filterFactory:this._transport.filterFactory,useRequestAnimationFrame:!g,pdfBug:this._pdfBug,pageColors:l});(m.renderTasks||=new Set).add(b);const v=b.task;return Promise.all([m.displayReadyCapability.promise,a]).then((([e,t])=>{if(this.destroyed)f();else{if(this._stats?.time("Rendering"),!(t.renderingIntent&u))throw new Error("Must use the same `intent`-argument when calling the `PDFPageProxy.render` and `PDFDocumentProxy.getOptionalContentConfig` methods.");b.initializeGraphics({transparency:e,optionalContentConfig:t}),b.operatorListChanged()}})).catch(f),v}getOperatorList({intent:e="display",annotationMode:t=lo.ENABLE,printAnnotationStorage:i=null,isEditing:r=!1}={}){const n=this._transport.getRenderingIntent(e,t,i,r,!0);let s,a=this._intentStates.get(n.cacheKey);return a||(a=Object.create(null),this._intentStates.set(n.cacheKey,a)),a.opListReadCapability||(s=Object.create(null),s.operatorListChanged=function(){a.operatorList.lastChunk&&(a.opListReadCapability.resolve(a.operatorList),a.renderTasks.delete(s))},a.opListReadCapability=Promise.withResolvers(),(a.renderTasks||=new Set).add(s),a.operatorList={fnArray:[],argsArray:[],lastChunk:!1,separateAnnots:null},this._stats?.time("Page Request"),this._pumpOperatorList(n)),a.opListReadCapability.promise}streamTextContent({includeMarkedContent:e=!1,disableNormalization:t=!1}={}){return this._transport.messageHandler.sendWithStream("GetTextContent",{pageIndex:this._pageIndex,includeMarkedContent:!0===e,disableNormalization:!0===t},{highWaterMark:100,size:e=>e.items.length})}getTextContent(e={}){if(this._transport._htmlForXfa)return this.getXfa().then((e=>Nc.textContent(e)));const t=this.streamTextContent(e);return new Promise((function(e,i){const r=t.getReader(),n={items:[],styles:Object.create(null),lang:null};!function t(){r.read().then((function({value:i,done:r}){r?e(n):(n.lang??=i.lang,Object.assign(n.styles,i.styles),n.items.push(...i.items),t())}),i)}()}))}getStructTree(){return this._transport.getStructTree(this._pageIndex)}_destroy(){this.destroyed=!0;const e=[];for(const t of this._intentStates.values())if(this._abortOperatorList({intentState:t,reason:new Error("Page was destroyed."),force:!0}),!t.opListReadCapability)for(const i of t.renderTasks)e.push(i.completed),i.cancel();return this.objs.clear(),this.#vr=!1,this.#yr(),Promise.all(e)}cleanup(e=!1){this.#vr=!0;const t=this.#wr(!1);return e&&t&&(this._stats&&=new _l),t}#wr(e=!1){if(this.#yr(),!this.#vr||this.destroyed)return!1;if(e)return this.#br=setTimeout((()=>{this.#br=null,this.#wr(!1)}),5e3),!1;for(const{renderTasks:e,operatorList:t}of this._intentStates.values())if(e.size>0||!t.lastChunk)return!1;return this._intentStates.clear(),this.objs.clear(),this.#vr=!1,!0}#yr(){this.#br&&(clearTimeout(this.#br),this.#br=null)}_startRenderPage(e,t){const i=this._intentStates.get(t);i&&(this._stats?.timeEnd("Page Request"),i.displayReadyCapability?.resolve(e))}_renderPageChunk(e,t){for(let i=0,r=e.length;i<r;i++)t.operatorList.fnArray.push(e.fnArray[i]),t.operatorList.argsArray.push(e.argsArray[i]);t.operatorList.lastChunk=e.lastChunk,t.operatorList.separateAnnots=e.separateAnnots;for(const e of t.renderTasks)e.operatorListChanged();e.lastChunk&&this.#wr(!0)}_pumpOperatorList({renderingIntent:e,cacheKey:t,annotationStorageSerializable:i,modifiedIds:r}){const{map:n,transfer:s}=i,a=this._transport.messageHandler.sendWithStream("GetOperatorList",{pageIndex:this._pageIndex,intent:e,cacheKey:t,annotationStorage:n,modifiedIds:r},s).getReader(),o=this._intentStates.get(t);o.streamReader=a;const l=()=>{a.read().then((({value:e,done:t})=>{t?o.streamReader=null:this._transport.destroyed||(this._renderPageChunk(e,o),l())}),(e=>{if(o.streamReader=null,!this._transport.destroyed){if(o.operatorList){o.operatorList.lastChunk=!0;for(const e of o.renderTasks)e.operatorListChanged();this.#wr(!0)}if(o.displayReadyCapability)o.displayReadyCapability.reject(e);else{if(!o.opListReadCapability)throw e;o.opListReadCapability.reject(e)}}}))};l()}_abortOperatorList({intentState:e,reason:t,force:i=!1}){if(e.streamReader){if(e.streamReaderCancelTimeout&&(clearTimeout(e.streamReaderCancelTimeout),e.streamReaderCancelTimeout=null),!i){if(e.renderTasks.size>0)return;if(t instanceof kl){let i=100;return t.extraDelay>0&&t.extraDelay<1e3&&(i+=t.extraDelay),void(e.streamReaderCancelTimeout=setTimeout((()=>{e.streamReaderCancelTimeout=null,this._abortOperatorList({intentState:e,reason:t,force:!0})}),i))}}if(e.streamReader.cancel(new ll(t.message)).catch((()=>{})),e.streamReader=null,!this._transport.destroyed){for(const[t,i]of this._intentStates)if(i===e){this._intentStates.delete(t);break}this.cleanup()}}}get stats(){return this._stats}}class jc{#xr=new Map;#Ar=Promise.resolve();postMessage(e,t){const i={data:structuredClone(e,t?{transfer:t}:null)};this.#Ar.then((()=>{for(const[e]of this.#xr)e.call(this,i)}))}addEventListener(e,t,i=null){let r=null;if(i?.signal instanceof AbortSignal){const{signal:n}=i;if(n.aborted)return void Ko("LoopbackPort - cannot use an `aborted` signal.");const s=()=>this.removeEventListener(e,t);r=()=>n.removeEventListener("abort",s),n.addEventListener("abort",s)}this.#xr.set(t,r)}removeEventListener(e,t){const i=this.#xr.get(t);i?.(),this.#xr.delete(t)}terminate(){for(const[,e]of this.#xr)e?.();this.#xr.clear()}}class Vc{static#kr=0;static#Er=!1;static#Sr;static{Ka&&(this.#Er=!0,tc.workerSrc||="./pdf.worker.mjs"),this._isSameOrigin=(e,t)=>{let i;try{if(i=new URL(e),!i.origin||"null"===i.origin)return!1}catch{return!1}const r=new URL(t,i);return i.origin===r.origin},this._createCDNWrapper=e=>{const t=`await import("${e}");`;return URL.createObjectURL(new Blob([t],{type:"text/javascript"}))}}constructor({name:e=null,port:t=null,verbosity:i=Xo()}={}){if(this.name=e,this.destroyed=!1,this.verbosity=i,this._readyCapability=Promise.withResolvers(),this._port=null,this._webWorker=null,this._messageHandler=null,t){if(Vc.#Sr?.has(t))throw new Error("Cannot use more than one PDFWorker per port.");return(Vc.#Sr||=new WeakMap).set(t,this),void this._initializeFromPort(t)}this._initialize()}get promise(){return this._readyCapability.promise}#Cr(){this._readyCapability.resolve(),this._messageHandler.send("configure",{verbosity:this.verbosity})}get port(){return this._port}get messageHandler(){return this._messageHandler}_initializeFromPort(e){this._port=e,this._messageHandler=new yh("main","worker",e),this._messageHandler.on("ready",(function(){})),this.#Cr()}_initialize(){if(Vc.#Er||Vc.#Mr)return void this._setupFakeWorker();let{workerSrc:e}=Vc;try{Vc._isSameOrigin(window.location.href,e)||(e=Vc._createCDNWrapper(new URL(e,window.location).href));const t=new Worker(e,{type:"module"}),i=new yh("main","worker",t),r=()=>{n.abort(),i.destroy(),t.terminate(),this.destroyed?this._readyCapability.reject(new Error("Worker was destroyed")):this._setupFakeWorker()},n=new AbortController;t.addEventListener("error",(()=>{this._webWorker||r()}),{signal:n.signal}),i.on("test",(e=>{n.abort(),!this.destroyed&&e?(this._messageHandler=i,this._port=t,this._webWorker=t,this.#Cr()):r()})),i.on("ready",(e=>{if(n.abort(),this.destroyed)r();else try{s()}catch{this._setupFakeWorker()}}));const s=()=>{const e=new Uint8Array;i.send("test",e,[e.buffer])};return void s()}catch{Yo("The worker has been disabled.")}this._setupFakeWorker()}_setupFakeWorker(){Vc.#Er||(Ko("Setting up fake worker."),Vc.#Er=!0),Vc._setupFakeWorkerGlobal.then((e=>{if(this.destroyed)return void this._readyCapability.reject(new Error("Worker was destroyed"));const t=new jc;this._port=t;const i="fake"+Vc.#kr++,r=new yh(i+"_worker",i,t);e.setup(r,t),this._messageHandler=new yh(i,i+"_worker",t),this.#Cr()})).catch((e=>{this._readyCapability.reject(new Error(`Setting up fake worker failed: "${e.message}".`))}))}destroy(){this.destroyed=!0,this._webWorker?.terminate(),this._webWorker=null,Vc.#Sr?.delete(this._port),this._port=null,this._messageHandler?.destroy(),this._messageHandler=null}static fromPort(e){if(!e?.port)throw new Error("PDFWorker.fromPort - invalid method signature.");const t=this.#Sr?.get(e.port);if(t){if(t._pendingDestroy)throw new Error("PDFWorker.fromPort - the worker is being destroyed.\nPlease remember to await `PDFDocumentLoadingTask.destroy()`-calls.");return t}return new Vc(e)}static get workerSrc(){if(tc.workerSrc)return tc.workerSrc;throw new Error('No "GlobalWorkerOptions.workerSrc" specified.')}static get#Mr(){try{return globalThis.pdfjsWorker?.WorkerMessageHandler||null}catch{return null}}static get _setupFakeWorkerGlobal(){return el(this,"_setupFakeWorkerGlobal",(async()=>{if(this.#Mr)return this.#Mr;return(await import(this.workerSrc)).WorkerMessageHandler})())}}class Uc{#_r=new Map;#Tr=new Map;#Nr=new Map;#Ir=new Map;#Lr=null;constructor(e,t,i,r,n){this.messageHandler=e,this.loadingTask=t,this.commonObjs=new $c,this.fontLoader=new sh({ownerDocument:r.ownerDocument,styleElement:r.styleElement}),this.loadingParams=r.loadingParams,this._params=r,this.canvasFactory=n.canvasFactory,this.filterFactory=n.filterFactory,this.cMapReaderFactory=n.cMapReaderFactory,this.standardFontDataFactory=n.standardFontDataFactory,this.destroyed=!1,this.destroyCapability=null,this._networkStream=i,this._fullReader=null,this._lastProgress=null,this.downloadInfoCapability=Promise.withResolvers(),this.setupMessageHandler()}#Pr(e,t=null){const i=this.#_r.get(e);if(i)return i;const r=this.messageHandler.sendWithPromise(e,t);return this.#_r.set(e,r),r}get annotationStorage(){return el(this,"annotationStorage",new rh)}getRenderingIntent(e,t=lo.ENABLE,i=null,r=!1,n=!1){let s=to,a=ih;switch(e){case"any":s=eo;break;case"display":break;case"print":s=io;break;default:Ko(`getRenderingIntent - invalid intent: ${e}`)}const o=s&io&&i instanceof nh?i:this.annotationStorage;switch(t){case lo.DISABLE:s+=so;break;case lo.ENABLE:break;case lo.ENABLE_FORMS:s+=ro;break;case lo.ENABLE_STORAGE:s+=no,a=o.serializable;break;default:Ko(`getRenderingIntent - invalid annotationMode: ${t}`)}r&&(s+=ao),n&&(s+=oo);const{ids:l,hash:h}=o.modifiedIds;return{renderingIntent:s,cacheKey:[s,a.hash,h].join("_"),annotationStorageSerializable:a,modifiedIds:l}}destroy(){if(this.destroyCapability)return this.destroyCapability.promise;this.destroyed=!0,this.destroyCapability=Promise.withResolvers(),this.#Lr?.reject(new Error("Worker was destroyed during onPassword callback"));const e=[];for(const t of this.#Tr.values())e.push(t._destroy());this.#Tr.clear(),this.#Nr.clear(),this.#Ir.clear(),this.hasOwnProperty("annotationStorage")&&this.annotationStorage.resetModified();const t=this.messageHandler.sendWithPromise("Terminate",null);return e.push(t),Promise.all(e).then((()=>{this.commonObjs.clear(),this.fontLoader.clear(),this.#_r.clear(),this.filterFactory.destroy(),Tc.cleanup(),this._networkStream?.cancelAllRequests(new ll("Worker was terminated.")),this.messageHandler?.destroy(),this.messageHandler=null,this.destroyCapability.resolve()}),this.destroyCapability.reject),this.destroyCapability.promise}setupMessageHandler(){const{messageHandler:e,loadingTask:t}=this;e.on("GetReader",((e,t)=>{Jo(this._networkStream,"GetReader - no `IPDFStream` instance available."),this._fullReader=this._networkStream.getFullReader(),this._fullReader.onProgress=e=>{this._lastProgress={loaded:e.loaded,total:e.total}},t.onPull=()=>{this._fullReader.read().then((function({value:e,done:i}){i?t.close():(Jo(e instanceof ArrayBuffer,"GetReader - expected an ArrayBuffer."),t.enqueue(new Uint8Array(e),1,[e]))})).catch((e=>{t.error(e)}))},t.onCancel=e=>{this._fullReader.cancel(e),t.ready.catch((e=>{if(!this.destroyed)throw e}))}})),e.on("ReaderHeadersReady",(async e=>{await this._fullReader.headersReady;const{isStreamingSupported:i,isRangeSupported:r,contentLength:n}=this._fullReader;return i&&r||(this._lastProgress&&t.onProgress?.(this._lastProgress),this._fullReader.onProgress=e=>{t.onProgress?.({loaded:e.loaded,total:e.total})}),{isStreamingSupported:i,isRangeSupported:r,contentLength:n}})),e.on("GetRangeReader",((e,t)=>{Jo(this._networkStream,"GetRangeReader - no `IPDFStream` instance available.");const i=this._networkStream.getRangeReader(e.begin,e.end);i?(t.onPull=()=>{i.read().then((function({value:e,done:i}){i?t.close():(Jo(e instanceof ArrayBuffer,"GetRangeReader - expected an ArrayBuffer."),t.enqueue(new Uint8Array(e),1,[e]))})).catch((e=>{t.error(e)}))},t.onCancel=e=>{i.cancel(e),t.ready.catch((e=>{if(!this.destroyed)throw e}))}):t.close()})),e.on("GetDoc",(({pdfInfo:e})=>{this._numPages=e.numPages,this._htmlForXfa=e.htmlForXfa,delete e.htmlForXfa,t._capability.resolve(new Hc(e,this))})),e.on("DocException",(e=>{t._capability.reject(vh(e))})),e.on("PasswordRequest",(e=>{this.#Lr=Promise.withResolvers();try{if(!t.onPassword)throw vh(e);const i=e=>{e instanceof Error?this.#Lr.reject(e):this.#Lr.resolve({password:e})};t.onPassword(i,e.code)}catch(e){this.#Lr.reject(e)}return this.#Lr.promise})),e.on("DataLoaded",(e=>{t.onProgress?.({loaded:e.length,total:e.length}),this.downloadInfoCapability.resolve(e)})),e.on("StartRenderPage",(e=>{if(this.destroyed)return;this.#Tr.get(e.pageIndex)._startRenderPage(e.transparency,e.cacheKey)})),e.on("commonobj",(([t,i,r])=>{if(this.destroyed)return null;if(this.commonObjs.has(t))return null;switch(i){case"Font":const{disableFontFace:n,fontExtraProperties:s,pdfBug:a}=this._params;if("error"in r){const e=r.error;Ko(`Error during font loading: ${e}`),this.commonObjs.resolve(t,e);break}const o=a&&globalThis.FontInspector?.enabled?(e,t)=>globalThis.FontInspector.fontAdded(e,t):null,l=new ah(r,{disableFontFace:n,fontExtraProperties:s,inspectFont:o});this.fontLoader.bind(l).catch((()=>e.sendWithPromise("FontFallback",{id:t}))).finally((()=>{!s&&l.data&&(l.data=null),this.commonObjs.resolve(t,l)}));break;case"CopyLocalImage":const{imageRef:h}=r;Jo(h,"The imageRef must be defined.");for(const e of this.#Tr.values())for(const[,i]of e.objs)if(i?.ref===h)return i.dataLen?(this.commonObjs.resolve(t,structuredClone(i)),i.dataLen):null;break;case"FontPath":case"Image":case"Pattern":this.commonObjs.resolve(t,r);break;default:throw new Error(`Got unknown common object type ${i}`)}return null})),e.on("obj",(([e,t,i,r])=>{if(this.destroyed)return;const n=this.#Tr.get(t);if(!n.objs.has(e))if(0!==n._intentStates.size)switch(i){case"Image":n.objs.resolve(e,r),r?.dataLen>1e7&&(n._maybeCleanupAfterRender=!0);break;case"Pattern":n.objs.resolve(e,r);break;default:throw new Error(`Got unknown object type ${i}`)}else r?.bitmap?.close()})),e.on("DocProgress",(e=>{this.destroyed||t.onProgress?.({loaded:e.loaded,total:e.total})})),e.on("FetchBuiltInCMap",(async e=>{if(this.destroyed)throw new Error("Worker was destroyed.");if(!this.cMapReaderFactory)throw new Error("CMapReaderFactory not initialized, see the `useWorkerFetch` parameter.");return this.cMapReaderFactory.fetch(e)})),e.on("FetchStandardFontData",(async e=>{if(this.destroyed)throw new Error("Worker was destroyed.");if(!this.standardFontDataFactory)throw new Error("StandardFontDataFactory not initialized, see the `useWorkerFetch` parameter.");return this.standardFontDataFactory.fetch(e)}))}getData(){return this.messageHandler.sendWithPromise("GetData",null)}saveDocument(){this.annotationStorage.size<=0&&Ko("saveDocument called while `annotationStorage` is empty, please use the getData-method instead.");const{map:e,transfer:t}=this.annotationStorage.serializable;return this.messageHandler.sendWithPromise("SaveDocument",{isPureXfa:!!this._htmlForXfa,numPages:this._numPages,annotationStorage:e,filename:this._fullReader?.filename??null},t).finally((()=>{this.annotationStorage.resetModified()}))}getPage(e){if(!Number.isInteger(e)||e<=0||e>this._numPages)return Promise.reject(new Error("Invalid page request."));const t=e-1,i=this.#Nr.get(t);if(i)return i;const r=this.messageHandler.sendWithPromise("GetPage",{pageIndex:t}).then((i=>{if(this.destroyed)throw new Error("Transport destroyed");i.refStr&&this.#Ir.set(i.refStr,e);const r=new qc(t,i,this,this._params.pdfBug);return this.#Tr.set(t,r),r}));return this.#Nr.set(t,r),r}getPageIndex(e){return Fc(e)?this.messageHandler.sendWithPromise("GetPageIndex",{num:e.num,gen:e.gen}):Promise.reject(new Error("Invalid pageIndex request."))}getAnnotations(e,t){return this.messageHandler.sendWithPromise("GetAnnotations",{pageIndex:e,intent:t})}getFieldObjects(){return this.#Pr("GetFieldObjects")}hasJSActions(){return this.#Pr("HasJSActions")}getCalculationOrderIds(){return this.messageHandler.sendWithPromise("GetCalculationOrderIds",null)}getDestinations(){return this.messageHandler.sendWithPromise("GetDestinations",null)}getDestination(e){return"string"!=typeof e?Promise.reject(new Error("Invalid destination request.")):this.messageHandler.sendWithPromise("GetDestination",{id:e})}getPageLabels(){return this.messageHandler.sendWithPromise("GetPageLabels",null)}getPageLayout(){return this.messageHandler.sendWithPromise("GetPageLayout",null)}getPageMode(){return this.messageHandler.sendWithPromise("GetPageMode",null)}getViewerPreferences(){return this.messageHandler.sendWithPromise("GetViewerPreferences",null)}getOpenAction(){return this.messageHandler.sendWithPromise("GetOpenAction",null)}getAttachments(){return this.messageHandler.sendWithPromise("GetAttachments",null)}getDocJSActions(){return this.#Pr("GetDocJSActions")}getPageJSActions(e){return this.messageHandler.sendWithPromise("GetPageJSActions",{pageIndex:e})}getStructTree(e){return this.messageHandler.sendWithPromise("GetStructTree",{pageIndex:e})}getOutline(){return this.messageHandler.sendWithPromise("GetOutline",null)}getOptionalContentConfig(e){return this.#Pr("GetOptionalContentConfig").then((t=>new sc(t,e)))}getPermissions(){return this.messageHandler.sendWithPromise("GetPermissions",null)}getMetadata(){const e="GetMetadata",t=this.#_r.get(e);if(t)return t;const i=this.messageHandler.sendWithPromise(e,null).then((e=>({info:e[0],metadata:e[1]?new ic(e[1]):null,contentDispositionFilename:this._fullReader?.filename??null,contentLength:this._fullReader?.contentLength??null})));return this.#_r.set(e,i),i}getMarkInfo(){return this.messageHandler.sendWithPromise("GetMarkInfo",null)}async startCleanup(e=!1){if(!this.destroyed){await this.messageHandler.sendWithPromise("Cleanup",null);for(const e of this.#Tr.values()){if(!e.cleanup())throw new Error(`startCleanup: Page ${e.pageNumber} is currently rendering.`)}this.commonObjs.clear(),e||this.fontLoader.clear(),this.#_r.clear(),this.filterFactory.destroy(!0),Tc.cleanup()}}cachedPageNumber(e){if(!Fc(e))return null;const t=0===e.gen?`${e.num}R`:`${e.num}R${e.gen}`;return this.#Ir.get(t)??null}}const Gc=Symbol("INITIAL_DATA");class $c{#Rr=Object.create(null);#Dr(e){return this.#Rr[e]||={...Promise.withResolvers(),data:Gc}}get(e,t=null){if(t){const i=this.#Dr(e);return i.promise.then((()=>t(i.data))),null}const i=this.#Rr[e];if(!i||i.data===Gc)throw new Error(`Requesting object that isn't resolved yet ${e}.`);return i.data}has(e){const t=this.#Rr[e];return!!t&&t.data!==Gc}delete(e){const t=this.#Rr[e];return!(!t||t.data===Gc)&&(delete this.#Rr[e],!0)}resolve(e,t=null){const i=this.#Dr(e);i.data=t,i.resolve()}clear(){for(const e in this.#Rr){const{data:t}=this.#Rr[e];t?.bitmap?.close()}this.#Rr=Object.create(null)}*[Symbol.iterator](){for(const e in this.#Rr){const{data:t}=this.#Rr[e];t!==Gc&&(yield[e,t])}}}class Wc{#zr=null;constructor(e){this.#zr=e,this.onContinue=null}get promise(){return this.#zr.capability.promise}cancel(e=0){this.#zr.cancel(null,e)}get separateAnnots(){const{separateAnnots:e}=this.#zr.operatorList;if(!e)return!1;const{annotationCanvasMap:t}=this.#zr;return e.form||e.canvas&&t?.size>0}}class Xc{#Fr=null;static#Or=new WeakSet;constructor({callback:e,params:t,objs:i,commonObjs:r,annotationCanvasMap:n,operatorList:s,pageIndex:a,canvasFactory:o,filterFactory:l,useRequestAnimationFrame:h=!1,pdfBug:c=!1,pageColors:d=null}){this.callback=e,this.params=t,this.objs=i,this.commonObjs=r,this.annotationCanvasMap=n,this.operatorListIdx=null,this.operatorList=s,this._pageIndex=a,this.canvasFactory=o,this.filterFactory=l,this._pdfBug=c,this.pageColors=d,this.running=!1,this.graphicsReadyCallback=null,this.graphicsReady=!1,this._useRequestAnimationFrame=!0===h&&"undefined"!=typeof window,this.cancelled=!1,this.capability=Promise.withResolvers(),this.task=new Wc(this),this._cancelBound=this.cancel.bind(this),this._continueBound=this._continue.bind(this),this._scheduleNextBound=this._scheduleNext.bind(this),this._nextBound=this._next.bind(this),this._canvas=t.canvasContext.canvas}get completed(){return this.capability.promise.catch((function(){}))}initializeGraphics({transparency:e=!1,optionalContentConfig:t}){if(this.cancelled)return;if(this._canvas){if(Xc.#Or.has(this._canvas))throw new Error("Cannot use the same canvas during multiple render() operations. Use different canvas or ensure previous operations were cancelled or completed.");Xc.#Or.add(this._canvas)}this._pdfBug&&globalThis.StepperManager?.enabled&&(this.stepper=globalThis.StepperManager.create(this._pageIndex),this.stepper.init(this.operatorList),this.stepper.nextBreakPoint=this.stepper.getNextBreakPoint());const{canvasContext:i,viewport:r,transform:n,background:s}=this.params;this.gfx=new ec(i,this.commonObjs,this.objs,this.canvasFactory,this.filterFactory,{optionalContentConfig:t},this.annotationCanvasMap,this.pageColors),this.gfx.beginDrawing({transform:n,viewport:r,transparency:e,background:s}),this.operatorListIdx=0,this.graphicsReady=!0,this.graphicsReadyCallback?.()}cancel(e=null,t=0){this.running=!1,this.cancelled=!0,this.gfx?.endDrawing(),this.#Fr&&(window.cancelAnimationFrame(this.#Fr),this.#Fr=null),Xc.#Or.delete(this._canvas),this.callback(e||new kl(`Rendering cancelled, page ${this._pageIndex+1}`,t))}operatorListChanged(){this.graphicsReady?(this.stepper?.updateOperatorList(this.operatorList),this.running||this._continue()):this.graphicsReadyCallback||=this._continueBound}_continue(){this.running=!0,this.cancelled||(this.task.onContinue?this.task.onContinue(this._scheduleNextBound):this._scheduleNext())}_scheduleNext(){this._useRequestAnimationFrame?this.#Fr=window.requestAnimationFrame((()=>{this.#Fr=null,this._nextBound().catch(this._cancelBound)})):Promise.resolve().then(this._nextBound).catch(this._cancelBound)}async _next(){this.cancelled||(this.operatorListIdx=this.gfx.executeOperatorList(this.operatorList,this.operatorListIdx,this._continueBound,this.stepper),this.operatorListIdx===this.operatorList.argsArray.length&&(this.running=!1,this.operatorList.lastChunk&&(this.gfx.endDrawing(),Xc.#Or.delete(this._canvas),this.callback())))}}const Yc="4.10.38",Kc="f9bea397f";function Zc(e){return Math.floor(255*Math.max(0,Math.min(1,e))).toString(16).padStart(2,"0")}function Jc(e){return Math.max(0,Math.min(255,255*e))}class Qc{static CMYK_G([e,t,i,r]){return["G",1-Math.min(1,.3*e+.59*i+.11*t+r)]}static G_CMYK([e]){return["CMYK",0,0,0,1-e]}static G_RGB([e]){return["RGB",e,e,e]}static G_rgb([e]){return[e=Jc(e),e,e]}static G_HTML([e]){const t=Zc(e);return`#${t}${t}${t}`}static RGB_G([e,t,i]){return["G",.3*e+.59*t+.11*i]}static RGB_rgb(e){return e.map(Jc)}static RGB_HTML(e){return`#${e.map(Zc).join("")}`}static T_HTML(){return"#00000000"}static T_rgb(){return[null]}static CMYK_RGB([e,t,i,r]){return["RGB",1-Math.min(1,e+r),1-Math.min(1,i+r),1-Math.min(1,t+r)]}static CMYK_rgb([e,t,i,r]){return[Jc(1-Math.min(1,e+r)),Jc(1-Math.min(1,i+r)),Jc(1-Math.min(1,t+r))]}static CMYK_HTML(e){const t=this.CMYK_RGB(e).slice(1);return this.RGB_HTML(t)}static RGB_CMYK([e,t,i]){const r=1-e,n=1-t,s=1-i;return["CMYK",r,n,s,Math.min(r,n,s)]}}class ed{create(e,t,i=!1){if(e<=0||t<=0)throw new Error("Invalid SVG dimensions");const r=this._createSVG("svg:svg");return r.setAttribute("version","1.1"),i||(r.setAttribute("width",`${e}px`),r.setAttribute("height",`${t}px`)),r.setAttribute("preserveAspectRatio","none"),r.setAttribute("viewBox",`0 0 ${e} ${t}`),r}createElement(e){if("string"!=typeof e)throw new Error("Invalid SVG element type");return this._createSVG(e)}_createSVG(e){Zo("Abstract method `_createSVG` called.")}}class td extends ed{_createSVG(e){return document.createElementNS(yl,e)}}class id{static setupStorage(e,t,i,r,n){const s=r.getValue(t,{value:null});switch(i.name){case"textarea":if(null!==s.value&&(e.textContent=s.value),"print"===n)break;e.addEventListener("input",(e=>{r.setValue(t,{value:e.target.value})}));break;case"input":if("radio"===i.attributes.type||"checkbox"===i.attributes.type){if(s.value===i.attributes.xfaOn?e.setAttribute("checked",!0):s.value===i.attributes.xfaOff&&e.removeAttribute("checked"),"print"===n)break;e.addEventListener("change",(e=>{r.setValue(t,{value:e.target.checked?e.target.getAttribute("xfaOn"):e.target.getAttribute("xfaOff")})}))}else{if(null!==s.value&&e.setAttribute("value",s.value),"print"===n)break;e.addEventListener("input",(e=>{r.setValue(t,{value:e.target.value})}))}break;case"select":if(null!==s.value){e.setAttribute("value",s.value);for(const e of i.children)e.attributes.value===s.value?e.attributes.selected=!0:e.attributes.hasOwnProperty("selected")&&delete e.attributes.selected}e.addEventListener("input",(e=>{const i=e.target.options,n=-1===i.selectedIndex?"":i[i.selectedIndex].value;r.setValue(t,{value:n})}))}}static setAttributes({html:e,element:t,storage:i=null,intent:r,linkService:n}){const{attributes:s}=t,a=e instanceof HTMLAnchorElement;"radio"===s.type&&(s.name=`${s.name}-${r}`);for(const[t,i]of Object.entries(s))if(null!=i)switch(t){case"class":i.length&&e.setAttribute(t,i.join(" "));break;case"dataId":break;case"id":e.setAttribute("data-element-id",i);break;case"style":Object.assign(e.style,i);break;case"textContent":e.textContent=i;break;default:(!a||"href"!==t&&"newWindow"!==t)&&e.setAttribute(t,i)}a&&n.addLinkAttributes(e,s.href,s.newWindow),i&&s.dataId&&this.setupStorage(e,s.dataId,t,i)}static render(e){const t=e.annotationStorage,i=e.linkService,r=e.xfaHtml,n=e.intent||"display",s=document.createElement(r.name);r.attributes&&this.setAttributes({html:s,element:r,intent:n,linkService:i});const a="richText"!==n,o=e.div;if(o.append(s),e.viewport){const t=`matrix(${e.viewport.transform.join(",")})`;o.style.transform=t}a&&o.setAttribute("class","xfaLayer xfaFont");const l=[];if(0===r.children.length){if(r.value){const e=document.createTextNode(r.value);s.append(e),a&&Nc.shouldBuildText(r.name)&&l.push(e)}return{textDivs:l}}const h=[[r,-1,s]];for(;h.length>0;){const[e,r,s]=h.at(-1);if(r+1===e.children.length){h.pop();continue}const o=e.children[++h.at(-1)[1]];if(null===o)continue;const{name:c}=o;if("#text"===c){const e=document.createTextNode(o.value);l.push(e),s.append(e);continue}const d=o?.attributes?.xmlns?document.createElementNS(o.attributes.xmlns,c):document.createElement(c);if(s.append(d),o.attributes&&this.setAttributes({html:d,element:o,storage:t,intent:n,linkService:i}),o.children?.length>0)h.push([o,-1,d]);else if(o.value){const e=document.createTextNode(o.value);a&&Nc.shouldBuildText(c)&&l.push(e),d.append(e)}}for(const e of o.querySelectorAll(".xfaNonInteractive input, .xfaNonInteractive textarea"))e.setAttribute("readOnly",!0);return{textDivs:l}}static update(e){const t=`matrix(${e.viewport.transform.join(",")})`;e.div.style.transform=t,e.div.hidden=!1}}const rd=1e3,nd=new WeakSet;function sd(e){return{width:e[2]-e[0],height:e[3]-e[1]}}class ad{static create(e){switch(e.data.annotationType){case xo:return new ld(e);case wo:return new hd(e);case Fo:switch(e.data.fieldType){case"Tx":return new dd(e);case"Btn":return e.data.radioButton?new md(e):e.data.checkBox?new pd(e):new gd(e);case"Ch":return new fd(e);case"Sig":return new ud(e)}return new cd(e);case Do:return new bd(e);case Ao:return new yd(e);case ko:return new wd(e);case Eo:return new xd(e);case So:return new Ad(e);case Mo:return new kd(e);case Po:return new Sd(e);case Ro:return new Cd(e);case Co:return new Ed(e);case _o:return new Md(e);case To:return new _d(e);case No:return new Td(e);case Io:return new Nd(e);case Lo:return new Id(e);case zo:return new Ld(e);default:return new od(e)}}}class od{#Br=null;#Hr=!1;#qr=null;constructor(e,{isRenderable:t=!1,ignoreBorder:i=!1,createQuadrilaterals:r=!1}={}){this.isRenderable=t,this.data=e.data,this.layer=e.layer,this.linkService=e.linkService,this.downloadManager=e.downloadManager,this.imageResourcesPath=e.imageResourcesPath,this.renderForms=e.renderForms,this.svgFactory=e.svgFactory,this.annotationStorage=e.annotationStorage,this.enableScripting=e.enableScripting,this.hasJSActions=e.hasJSActions,this._fieldObjects=e.fieldObjects,this.parent=e.parent,t&&(this.container=this._createContainer(i)),r&&this._createQuadrilaterals()}static _hasPopupData({titleObj:e,contentsObj:t,richText:i}){return!!(e?.str||t?.str||i?.str)}get _isEditable(){return this.data.isEditable}get hasPopupData(){return od._hasPopupData(this.data)}updateEdited(e){if(!this.container)return;this.#Br||={rect:this.data.rect.slice(0)};const{rect:t}=e;t&&this.#jr(t),this.#qr?.popup.updateEdited(e)}resetEdited(){this.#Br&&(this.#jr(this.#Br.rect),this.#qr?.popup.resetEdited(),this.#Br=null)}#jr(e){const{container:{style:t},data:{rect:i,rotation:r},parent:{viewport:{rawDims:{pageWidth:n,pageHeight:s,pageX:a,pageY:o}}}}=this;i?.splice(0,4,...e);const{width:l,height:h}=sd(e);t.left=100*(e[0]-a)/n+"%",t.top=100*(s-e[3]+o)/s+"%",0===r?(t.width=100*l/n+"%",t.height=100*h/s+"%"):this.setRotation(r)}_createContainer(e){const{data:t,parent:{page:i,viewport:r}}=this,n=document.createElement("section");n.setAttribute("data-annotation-id",t.id),this instanceof cd||(n.tabIndex=rd);const{style:s}=n;if(s.zIndex=this.parent.zIndex++,t.alternativeText&&(n.title=t.alternativeText),t.noRotate&&n.classList.add("norotate"),!t.rect||this instanceof bd){const{rotation:e}=t;return t.hasOwnCanvas||0===e||this.setRotation(e,n),n}const{width:a,height:o}=sd(t.rect);if(!e&&t.borderStyle.width>0){s.borderWidth=`${t.borderStyle.width}px`;const e=t.borderStyle.horizontalCornerRadius,i=t.borderStyle.verticalCornerRadius;if(e>0||i>0){const t=`calc(${e}px * var(--scale-factor)) / calc(${i}px * var(--scale-factor))`;s.borderRadius=t}else if(this instanceof md){const e=`calc(${a}px * var(--scale-factor)) / calc(${o}px * var(--scale-factor))`;s.borderRadius=e}switch(t.borderStyle.style){case Oo:s.borderStyle="solid";break;case Bo:s.borderStyle="dashed";break;case Ho:Ko("Unimplemented border style: beveled");break;case qo:Ko("Unimplemented border style: inset");break;case jo:s.borderBottomStyle="solid"}const r=t.borderColor||null;r?(this.#Hr=!0,s.borderColor=ml.makeHexColor(0|r[0],0|r[1],0|r[2])):s.borderWidth=0}const l=ml.normalizeRect([t.rect[0],i.view[3]-t.rect[1]+i.view[1],t.rect[2],i.view[3]-t.rect[3]+i.view[1]]),{pageWidth:h,pageHeight:c,pageX:d,pageY:u}=r.rawDims;s.left=100*(l[0]-d)/h+"%",s.top=100*(l[1]-u)/c+"%";const{rotation:p}=t;return t.hasOwnCanvas||0===p?(s.width=100*a/h+"%",s.height=100*o/c+"%"):this.setRotation(p,n),n}setRotation(e,t=this.container){if(!this.data.rect)return;const{pageWidth:i,pageHeight:r}=this.parent.viewport.rawDims,{width:n,height:s}=sd(this.data.rect);let a,o;e%180==0?(a=100*n/i,o=100*s/r):(a=100*s/i,o=100*n/r),t.style.width=`${a}%`,t.style.height=`${o}%`,t.setAttribute("data-main-rotation",(360-e)%360)}get _commonActions(){const e=(e,t,i)=>{const r=i.detail[e],n=r[0],s=r.slice(1);i.target.style[t]=Qc[`${n}_HTML`](s),this.annotationStorage.setValue(this.data.id,{[t]:Qc[`${n}_rgb`](s)})};return el(this,"_commonActions",{display:e=>{const{display:t}=e.detail,i=t%2==1;this.container.style.visibility=i?"hidden":"visible",this.annotationStorage.setValue(this.data.id,{noView:i,noPrint:1===t||2===t})},print:e=>{this.annotationStorage.setValue(this.data.id,{noPrint:!e.detail.print})},hidden:e=>{const{hidden:t}=e.detail;this.container.style.visibility=t?"hidden":"visible",this.annotationStorage.setValue(this.data.id,{noPrint:t,noView:t})},focus:e=>{setTimeout((()=>e.target.focus({preventScroll:!1})),0)},userName:e=>{e.target.title=e.detail.userName},readonly:e=>{e.target.disabled=e.detail.readonly},required:e=>{this._setRequired(e.target,e.detail.required)},bgColor:t=>{e("bgColor","backgroundColor",t)},fillColor:t=>{e("fillColor","backgroundColor",t)},fgColor:t=>{e("fgColor","color",t)},textColor:t=>{e("textColor","color",t)},borderColor:t=>{e("borderColor","borderColor",t)},strokeColor:t=>{e("strokeColor","borderColor",t)},rotation:e=>{const t=e.detail.rotation;this.setRotation(t),this.annotationStorage.setValue(this.data.id,{rotation:t})}})}_dispatchEventFromSandbox(e,t){const i=this._commonActions;for(const r of Object.keys(t.detail)){const n=e[r]||i[r];n?.(t)}}_setDefaultPropertiesFromJS(e){if(!this.enableScripting)return;const t=this.annotationStorage.getRawValue(this.data.id);if(!t)return;const i=this._commonActions;for(const[r,n]of Object.entries(t)){const s=i[r];if(s){s({detail:{[r]:n},target:e}),delete t[r]}}}_createQuadrilaterals(){if(!this.container)return;const{quadPoints:e}=this.data;if(!e)return;const[t,i,r,n]=this.data.rect.map((e=>Math.fround(e)));if(8===e.length){const[s,a,o,l]=e.subarray(2,6);if(r===s&&n===a&&t===o&&i===l)return}const{style:s}=this.container;let a;if(this.#Hr){const{borderColor:e,borderWidth:t}=s;s.borderWidth=0,a=["url('data:image/svg+xml;utf8,",'<svg xmlns="http://www.w3.org/2000/svg"',' preserveAspectRatio="none" viewBox="0 0 1 1">',`<g fill="transparent" stroke="${e}" stroke-width="${t}">`],this.container.classList.add("hasBorder")}const o=r-t,l=n-i,{svgFactory:h}=this,c=h.createElement("svg");c.classList.add("quadrilateralsContainer"),c.setAttribute("width",0),c.setAttribute("height",0);const d=h.createElement("defs");c.append(d);const u=h.createElement("clipPath"),p=`clippath_${this.data.id}`;u.setAttribute("id",p),u.setAttribute("clipPathUnits","objectBoundingBox"),d.append(u);for(let i=2,r=e.length;i<r;i+=8){const r=e[i],s=e[i+1],c=e[i+2],d=e[i+3],p=h.createElement("rect"),m=(c-t)/o,g=(n-s)/l,f=(r-c)/o,b=(s-d)/l;p.setAttribute("x",m),p.setAttribute("y",g),p.setAttribute("width",f),p.setAttribute("height",b),u.append(p),a?.push(`<rect vector-effect="non-scaling-stroke" x="${m}" y="${g}" width="${f}" height="${b}"/>`)}this.#Hr&&(a.push("</g></svg>')"),s.backgroundImage=a.join("")),this.container.append(c),this.container.style.clipPath=`url(#${p})`}_createPopup(){const{data:e}=this,t=this.#qr=new bd({data:{color:e.color,titleObj:e.titleObj,modificationDate:e.modificationDate,contentsObj:e.contentsObj,richText:e.richText,parentRect:e.rect,borderStyle:0,id:`popup_${e.id}`,rotation:e.rotation},parent:this.parent,elements:[this]});this.parent.div.append(t.render())}render(){Zo("Abstract method `AnnotationElement.render` called")}_getElementsByName(e,t=null){const i=[];if(this._fieldObjects){const r=this._fieldObjects[e];if(r)for(const{page:e,id:n,exportValues:s}of r){if(-1===e)continue;if(n===t)continue;const r="string"==typeof s?s:null,a=document.querySelector(`[data-element-id="${n}"]`);!a||nd.has(a)?i.push({id:n,exportValue:r,domElement:a}):Ko(`_getElementsByName - element not allowed: ${n}`)}return i}for(const r of document.getElementsByName(e)){const{exportValue:e}=r,n=r.getAttribute("data-element-id");n!==t&&(nd.has(r)&&i.push({id:n,exportValue:e,domElement:r}))}return i}show(){this.container&&(this.container.hidden=!1),this.popup?.maybeShow()}hide(){this.container&&(this.container.hidden=!0),this.popup?.forceHide()}getElementsToTriggerPopup(){return this.container}addHighlightArea(){const e=this.getElementsToTriggerPopup();if(Array.isArray(e))for(const t of e)t.classList.add("highlightArea");else e.classList.add("highlightArea")}_editOnDoubleClick(){if(!this._isEditable)return;const{annotationEditorType:e,data:{id:t}}=this;this.container.addEventListener("dblclick",(()=>{this.linkService.eventBus?.dispatch("switchannotationeditormode",{source:this,mode:e,editId:t})}))}}class ld extends od{constructor(e,t=null){super(e,{isRenderable:!0,ignoreBorder:!!t?.ignoreBorder,createQuadrilaterals:!0}),this.isTooltipOnly=e.data.isTooltipOnly}render(){const{data:e,linkService:t}=this,i=document.createElement("a");i.setAttribute("data-element-id",e.id);let r=!1;return e.url?(t.addLinkAttributes(i,e.url,e.newWindow),r=!0):e.action?(this._bindNamedAction(i,e.action),r=!0):e.attachment?(this.#Vr(i,e.attachment,e.attachmentDest),r=!0):e.setOCGState?(this.#Ur(i,e.setOCGState),r=!0):e.dest?(this._bindLink(i,e.dest),r=!0):(e.actions&&(e.actions.Action||e.actions["Mouse Up"]||e.actions["Mouse Down"])&&this.enableScripting&&this.hasJSActions&&(this._bindJSAction(i,e),r=!0),e.resetForm?(this._bindResetFormAction(i,e.resetForm),r=!0):this.isTooltipOnly&&!r&&(this._bindLink(i,""),r=!0)),this.container.classList.add("linkAnnotation"),r&&this.container.append(i),this.container}#Gr(){this.container.setAttribute("data-internal-link","")}_bindLink(e,t){e.href=this.linkService.getDestinationHash(t),e.onclick=()=>(t&&this.linkService.goToDestination(t),!1),(t||""===t)&&this.#Gr()}_bindNamedAction(e,t){e.href=this.linkService.getAnchorUrl(""),e.onclick=()=>(this.linkService.executeNamedAction(t),!1),this.#Gr()}#Vr(e,t,i=null){e.href=this.linkService.getAnchorUrl(""),t.description&&(e.title=t.description),e.onclick=()=>(this.downloadManager?.openOrDownloadData(t.content,t.filename,i),!1),this.#Gr()}#Ur(e,t){e.href=this.linkService.getAnchorUrl(""),e.onclick=()=>(this.linkService.executeSetOCGState(t),!1),this.#Gr()}_bindJSAction(e,t){e.href=this.linkService.getAnchorUrl("");const i=new Map([["Action","onclick"],["Mouse Up","onmouseup"],["Mouse Down","onmousedown"]]);for(const r of Object.keys(t.actions)){const n=i.get(r);n&&(e[n]=()=>(this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:t.id,name:r}}),!1))}e.onclick||(e.onclick=()=>!1),this.#Gr()}_bindResetFormAction(e,t){const i=e.onclick;if(i||(e.href=this.linkService.getAnchorUrl("")),this.#Gr(),!this._fieldObjects)return Ko('_bindResetFormAction - "resetForm" action not supported, ensure that the `fieldObjects` parameter is provided.'),void(i||(e.onclick=()=>!1));e.onclick=()=>{i?.();const{fields:e,refs:r,include:n}=t,s=[];if(0!==e.length||0!==r.length){const t=new Set(r);for(const i of e){const e=this._fieldObjects[i]||[];for(const{id:i}of e)t.add(i)}for(const e of Object.values(this._fieldObjects))for(const i of e)t.has(i.id)===n&&s.push(i)}else for(const e of Object.values(this._fieldObjects))s.push(...e);const a=this.annotationStorage,o=[];for(const e of s){const{id:t}=e;switch(o.push(t),e.type){case"text":{const i=e.defaultValue||"";a.setValue(t,{value:i});break}case"checkbox":case"radiobutton":{const i=e.defaultValue===e.exportValues;a.setValue(t,{value:i});break}case"combobox":case"listbox":{const i=e.defaultValue||"";a.setValue(t,{value:i});break}default:continue}const i=document.querySelector(`[data-element-id="${t}"]`);i&&(nd.has(i)?i.dispatchEvent(new Event("resetform")):Ko(`_bindResetFormAction - element not allowed: ${t}`))}return this.enableScripting&&this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:"app",ids:o,name:"ResetForm"}}),!1}}}class hd extends od{constructor(e){super(e,{isRenderable:!0})}render(){this.container.classList.add("textAnnotation");const e=document.createElement("img");return e.src=this.imageResourcesPath+"annotation-"+this.data.name.toLowerCase()+".svg",e.setAttribute("data-l10n-id","pdfjs-text-annotation-type"),e.setAttribute("data-l10n-args",JSON.stringify({type:this.data.name})),!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this.container.append(e),this.container}}class cd extends od{render(){return this.container}showElementAndHideCanvas(e){this.data.hasOwnCanvas&&("CANVAS"===e.previousSibling?.nodeName&&(e.previousSibling.hidden=!0),e.hidden=!1)}_getKeyModifier(e){return ul.platform.isMac?e.metaKey:e.ctrlKey}_setEventListener(e,t,i,r,n){i.includes("mouse")?e.addEventListener(i,(e=>{this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:this.data.id,name:r,value:n(e),shift:e.shiftKey,modifier:this._getKeyModifier(e)}})})):e.addEventListener(i,(e=>{if("blur"===i){if(!t.focused||!e.relatedTarget)return;t.focused=!1}else if("focus"===i){if(t.focused)return;t.focused=!0}n&&this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:this.data.id,name:r,value:n(e)}})}))}_setEventListeners(e,t,i,r){for(const[n,s]of i)("Action"===s||this.data.actions?.[s])&&("Focus"!==s&&"Blur"!==s||(t||={focused:!1}),this._setEventListener(e,t,n,s,r),"Focus"!==s||this.data.actions?.Blur?"Blur"!==s||this.data.actions?.Focus||this._setEventListener(e,t,"focus","Focus",null):this._setEventListener(e,t,"blur","Blur",null))}_setBackgroundColor(e){const t=this.data.backgroundColor||null;e.style.backgroundColor=null===t?"transparent":ml.makeHexColor(t[0],t[1],t[2])}_setTextStyle(e){const t=["left","center","right"],{fontColor:i}=this.data.defaultAppearanceData,r=this.data.defaultAppearanceData.fontSize||9,n=e.style;let s;const a=e=>Math.round(10*e)/10;if(this.data.multiLine){const e=Math.abs(this.data.rect[3]-this.data.rect[1]-2),t=e/(Math.round(e/(Qa*r))||1);s=Math.min(r,a(t/Qa))}else{const e=Math.abs(this.data.rect[3]-this.data.rect[1]-2);s=Math.min(r,a(e/Qa))}n.fontSize=`calc(${s}px * var(--scale-factor))`,n.color=ml.makeHexColor(i[0],i[1],i[2]),null!==this.data.textAlignment&&(n.textAlign=t[this.data.textAlignment])}_setRequired(e,t){t?e.setAttribute("required",!0):e.removeAttribute("required"),e.setAttribute("aria-required",t)}}class dd extends cd{constructor(e){super(e,{isRenderable:e.renderForms||e.data.hasOwnCanvas||!e.data.hasAppearance&&!!e.data.fieldValue})}setPropertyOnSiblings(e,t,i,r){const n=this.annotationStorage;for(const s of this._getElementsByName(e.name,e.id))s.domElement&&(s.domElement[t]=i),n.setValue(s.id,{[r]:i})}render(){const e=this.annotationStorage,t=this.data.id;this.container.classList.add("textWidgetAnnotation");let i=null;if(this.renderForms){const r=e.getValue(t,{value:this.data.fieldValue});let n=r.value||"";const s=e.getValue(t,{charLimit:this.data.maxLen}).charLimit;s&&n.length>s&&(n=n.slice(0,s));let a=r.formattedValue||this.data.textContent?.join("\n")||null;a&&this.data.comb&&(a=a.replaceAll(/\s+/g,""));const o={userValue:n,formattedValue:a,lastCommittedValue:null,commitKey:1,focused:!1};this.data.multiLine?(i=document.createElement("textarea"),i.textContent=a??n,this.data.doNotScroll&&(i.style.overflowY="hidden")):(i=document.createElement("input"),i.type="text",i.setAttribute("value",a??n),this.data.doNotScroll&&(i.style.overflowX="hidden")),this.data.hasOwnCanvas&&(i.hidden=!0),nd.add(i),i.setAttribute("data-element-id",t),i.disabled=this.data.readOnly,i.name=this.data.fieldName,i.tabIndex=rd,this._setRequired(i,this.data.required),s&&(i.maxLength=s),i.addEventListener("input",(r=>{e.setValue(t,{value:r.target.value}),this.setPropertyOnSiblings(i,"value",r.target.value,"value"),o.formattedValue=null})),i.addEventListener("resetform",(e=>{const t=this.data.defaultFieldValue??"";i.value=o.userValue=t,o.formattedValue=null}));let l=e=>{const{formattedValue:t}=o;null!=t&&(e.target.value=t),e.target.scrollLeft=0};if(this.enableScripting&&this.hasJSActions){i.addEventListener("focus",(e=>{if(o.focused)return;const{target:t}=e;o.userValue&&(t.value=o.userValue),o.lastCommittedValue=t.value,o.commitKey=1,this.data.actions?.Focus||(o.focused=!0)})),i.addEventListener("updatefromsandbox",(i=>{this.showElementAndHideCanvas(i.target);const r={value(i){o.userValue=i.detail.value??"",e.setValue(t,{value:o.userValue.toString()}),i.target.value=o.userValue},formattedValue(i){const{formattedValue:r}=i.detail;o.formattedValue=r,null!=r&&i.target!==document.activeElement&&(i.target.value=r),e.setValue(t,{formattedValue:r})},selRange(e){e.target.setSelectionRange(...e.detail.selRange)},charLimit:i=>{const{charLimit:r}=i.detail,{target:n}=i;if(0===r)return void n.removeAttribute("maxLength");n.setAttribute("maxLength",r);let s=o.userValue;!s||s.length<=r||(s=s.slice(0,r),n.value=o.userValue=s,e.setValue(t,{value:s}),this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:t,name:"Keystroke",value:s,willCommit:!0,commitKey:1,selStart:n.selectionStart,selEnd:n.selectionEnd}}))}};this._dispatchEventFromSandbox(r,i)})),i.addEventListener("keydown",(e=>{o.commitKey=1;let i=-1;if("Escape"===e.key?i=0:"Enter"!==e.key||this.data.multiLine?"Tab"===e.key&&(o.commitKey=3):i=2,-1===i)return;const{value:r}=e.target;o.lastCommittedValue!==r&&(o.lastCommittedValue=r,o.userValue=r,this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:t,name:"Keystroke",value:r,willCommit:!0,commitKey:i,selStart:e.target.selectionStart,selEnd:e.target.selectionEnd}}))}));const r=l;l=null,i.addEventListener("blur",(e=>{if(!o.focused||!e.relatedTarget)return;this.data.actions?.Blur||(o.focused=!1);const{value:i}=e.target;o.userValue=i,o.lastCommittedValue!==i&&this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:t,name:"Keystroke",value:i,willCommit:!0,commitKey:o.commitKey,selStart:e.target.selectionStart,selEnd:e.target.selectionEnd}}),r(e)})),this.data.actions?.Keystroke&&i.addEventListener("beforeinput",(e=>{o.lastCommittedValue=null;const{data:i,target:r}=e,{value:n,selectionStart:s,selectionEnd:a}=r;let l=s,h=a;switch(e.inputType){case"deleteWordBackward":{const e=n.substring(0,s).match(/\w*[^\w]*$/);e&&(l-=e[0].length);break}case"deleteWordForward":{const e=n.substring(s).match(/^[^\w]*\w*/);e&&(h+=e[0].length);break}case"deleteContentBackward":s===a&&(l-=1);break;case"deleteContentForward":s===a&&(h+=1)}e.preventDefault(),this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:t,name:"Keystroke",value:n,change:i||"",willCommit:!1,selStart:l,selEnd:h}})})),this._setEventListeners(i,o,[["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],(e=>e.target.value))}if(l&&i.addEventListener("blur",l),this.data.comb){const e=(this.data.rect[2]-this.data.rect[0])/s;i.classList.add("comb"),i.style.letterSpacing=`calc(${e}px * var(--scale-factor) - 1ch)`}}else i=document.createElement("div"),i.textContent=this.data.fieldValue,i.style.verticalAlign="middle",i.style.display="table-cell",this.data.hasOwnCanvas&&(i.hidden=!0);return this._setTextStyle(i),this._setBackgroundColor(i),this._setDefaultPropertiesFromJS(i),this.container.append(i),this.container}}class ud extends cd{constructor(e){super(e,{isRenderable:!!e.data.hasOwnCanvas})}}class pd extends cd{constructor(e){super(e,{isRenderable:e.renderForms})}render(){const e=this.annotationStorage,t=this.data,i=t.id;let r=e.getValue(i,{value:t.exportValue===t.fieldValue}).value;"string"==typeof r&&(r="Off"!==r,e.setValue(i,{value:r})),this.container.classList.add("buttonWidgetAnnotation","checkBox");const n=document.createElement("input");return nd.add(n),n.setAttribute("data-element-id",i),n.disabled=t.readOnly,this._setRequired(n,this.data.required),n.type="checkbox",n.name=t.fieldName,r&&n.setAttribute("checked",!0),n.setAttribute("exportValue",t.exportValue),n.tabIndex=rd,n.addEventListener("change",(r=>{const{name:n,checked:s}=r.target;for(const r of this._getElementsByName(n,i)){const i=s&&r.exportValue===t.exportValue;r.domElement&&(r.domElement.checked=i),e.setValue(r.id,{value:i})}e.setValue(i,{value:s})})),n.addEventListener("resetform",(e=>{const i=t.defaultFieldValue||"Off";e.target.checked=i===t.exportValue})),this.enableScripting&&this.hasJSActions&&(n.addEventListener("updatefromsandbox",(t=>{const r={value(t){t.target.checked="Off"!==t.detail.value,e.setValue(i,{value:t.target.checked})}};this._dispatchEventFromSandbox(r,t)})),this._setEventListeners(n,null,[["change","Validate"],["change","Action"],["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],(e=>e.target.checked))),this._setBackgroundColor(n),this._setDefaultPropertiesFromJS(n),this.container.append(n),this.container}}class md extends cd{constructor(e){super(e,{isRenderable:e.renderForms})}render(){this.container.classList.add("buttonWidgetAnnotation","radioButton");const e=this.annotationStorage,t=this.data,i=t.id;let r=e.getValue(i,{value:t.fieldValue===t.buttonValue}).value;if("string"==typeof r&&(r=r!==t.buttonValue,e.setValue(i,{value:r})),r)for(const r of this._getElementsByName(t.fieldName,i))e.setValue(r.id,{value:!1});const n=document.createElement("input");if(nd.add(n),n.setAttribute("data-element-id",i),n.disabled=t.readOnly,this._setRequired(n,this.data.required),n.type="radio",n.name=t.fieldName,r&&n.setAttribute("checked",!0),n.tabIndex=rd,n.addEventListener("change",(t=>{const{name:r,checked:n}=t.target;for(const t of this._getElementsByName(r,i))e.setValue(t.id,{value:!1});e.setValue(i,{value:n})})),n.addEventListener("resetform",(e=>{const i=t.defaultFieldValue;e.target.checked=null!=i&&i===t.buttonValue})),this.enableScripting&&this.hasJSActions){const r=t.buttonValue;n.addEventListener("updatefromsandbox",(t=>{const n={value:t=>{const n=r===t.detail.value;for(const r of this._getElementsByName(t.target.name)){const t=n&&r.id===i;r.domElement&&(r.domElement.checked=t),e.setValue(r.id,{value:t})}}};this._dispatchEventFromSandbox(n,t)})),this._setEventListeners(n,null,[["change","Validate"],["change","Action"],["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],(e=>e.target.checked))}return this._setBackgroundColor(n),this._setDefaultPropertiesFromJS(n),this.container.append(n),this.container}}class gd extends ld{constructor(e){super(e,{ignoreBorder:e.data.hasAppearance})}render(){const e=super.render();e.classList.add("buttonWidgetAnnotation","pushButton");const t=e.lastChild;return this.enableScripting&&this.hasJSActions&&t&&(this._setDefaultPropertiesFromJS(t),t.addEventListener("updatefromsandbox",(e=>{this._dispatchEventFromSandbox({},e)}))),e}}class fd extends cd{constructor(e){super(e,{isRenderable:e.renderForms})}render(){this.container.classList.add("choiceWidgetAnnotation");const e=this.annotationStorage,t=this.data.id,i=e.getValue(t,{value:this.data.fieldValue}),r=document.createElement("select");nd.add(r),r.setAttribute("data-element-id",t),r.disabled=this.data.readOnly,this._setRequired(r,this.data.required),r.name=this.data.fieldName,r.tabIndex=rd;let n=this.data.combo&&this.data.options.length>0;this.data.combo||(r.size=this.data.options.length,this.data.multiSelect&&(r.multiple=!0)),r.addEventListener("resetform",(e=>{const t=this.data.defaultFieldValue;for(const e of r.options)e.selected=e.value===t}));for(const e of this.data.options){const t=document.createElement("option");t.textContent=e.displayValue,t.value=e.exportValue,i.value.includes(e.exportValue)&&(t.setAttribute("selected",!0),n=!1),r.append(t)}let s=null;if(n){const e=document.createElement("option");e.value=" ",e.setAttribute("hidden",!0),e.setAttribute("selected",!0),r.prepend(e),s=()=>{e.remove(),r.removeEventListener("input",s),s=null},r.addEventListener("input",s)}const a=e=>{const t=e?"value":"textContent",{options:i,multiple:n}=r;return n?Array.prototype.filter.call(i,(e=>e.selected)).map((e=>e[t])):-1===i.selectedIndex?null:i[i.selectedIndex][t]};let o=a(!1);const l=e=>{const t=e.target.options;return Array.prototype.map.call(t,(e=>({displayValue:e.textContent,exportValue:e.value})))};return this.enableScripting&&this.hasJSActions?(r.addEventListener("updatefromsandbox",(i=>{const n={value(i){s?.();const n=i.detail.value,l=new Set(Array.isArray(n)?n:[n]);for(const e of r.options)e.selected=l.has(e.value);e.setValue(t,{value:a(!0)}),o=a(!1)},multipleSelection(e){r.multiple=!0},remove(i){const n=r.options,s=i.detail.remove;if(n[s].selected=!1,r.remove(s),n.length>0){-1===Array.prototype.findIndex.call(n,(e=>e.selected))&&(n[0].selected=!0)}e.setValue(t,{value:a(!0),items:l(i)}),o=a(!1)},clear(i){for(;0!==r.length;)r.remove(0);e.setValue(t,{value:null,items:[]}),o=a(!1)},insert(i){const{index:n,displayValue:s,exportValue:h}=i.detail.insert,c=r.children[n],d=document.createElement("option");d.textContent=s,d.value=h,c?c.before(d):r.append(d),e.setValue(t,{value:a(!0),items:l(i)}),o=a(!1)},items(i){const{items:n}=i.detail;for(;0!==r.length;)r.remove(0);for(const e of n){const{displayValue:t,exportValue:i}=e,n=document.createElement("option");n.textContent=t,n.value=i,r.append(n)}r.options.length>0&&(r.options[0].selected=!0),e.setValue(t,{value:a(!0),items:l(i)}),o=a(!1)},indices(i){const r=new Set(i.detail.indices);for(const e of i.target.options)e.selected=r.has(e.index);e.setValue(t,{value:a(!0)}),o=a(!1)},editable(e){e.target.disabled=!e.detail.editable}};this._dispatchEventFromSandbox(n,i)})),r.addEventListener("input",(i=>{const r=a(!0),n=a(!1);e.setValue(t,{value:r}),i.preventDefault(),this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:t,name:"Keystroke",value:o,change:n,changeEx:r,willCommit:!1,commitKey:1,keyDown:!1}})})),this._setEventListeners(r,null,[["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"],["input","Action"],["input","Validate"]],(e=>e.target.value))):r.addEventListener("input",(function(i){e.setValue(t,{value:a(!0)})})),this.data.combo&&this._setTextStyle(r),this._setBackgroundColor(r),this._setDefaultPropertiesFromJS(r),this.container.append(r),this.container}}class bd extends od{constructor(e){const{data:t,elements:i}=e;super(e,{isRenderable:od._hasPopupData(t)}),this.elements=i,this.popup=null}render(){this.container.classList.add("popupAnnotation");const e=this.popup=new vd({container:this.container,color:this.data.color,titleObj:this.data.titleObj,modificationDate:this.data.modificationDate,contentsObj:this.data.contentsObj,richText:this.data.richText,rect:this.data.rect,parentRect:this.data.parentRect||null,parent:this.parent,elements:this.elements,open:this.data.open}),t=[];for(const i of this.elements)i.popup=e,i.container.ariaHasPopup="dialog",t.push(i.data.id),i.addHighlightArea();return this.container.setAttribute("aria-controls",t.map((e=>`${vl}${e}`)).join(",")),this.container}}class vd{#$r=this.#Wr.bind(this);#Xr=this.#Yr.bind(this);#Kr=this.#Zr.bind(this);#Jr=this.#Qr.bind(this);#en=null;#pe=null;#tn=null;#in=null;#rn=null;#nn=null;#sn=null;#an=!1;#on=null;#C=null;#ln=null;#hn=null;#cn=null;#Br=null;#dn=!1;constructor({container:e,color:t,elements:i,titleObj:r,modificationDate:n,contentsObj:s,richText:a,parent:o,rect:l,parentRect:h,open:c}){this.#pe=e,this.#cn=r,this.#tn=s,this.#hn=a,this.#nn=o,this.#en=t,this.#ln=l,this.#sn=h,this.#rn=i,this.#in=Ll.toDateObject(n),this.trigger=i.flatMap((e=>e.getElementsToTriggerPopup()));for(const e of this.trigger)e.addEventListener("click",this.#Jr),e.addEventListener("mouseenter",this.#Kr),e.addEventListener("mouseleave",this.#Xr),e.classList.add("popupTriggerArea");for(const e of i)e.container?.addEventListener("keydown",this.#$r);this.#pe.hidden=!0,c&&this.#Qr()}render(){if(this.#on)return;const e=this.#on=document.createElement("div");if(e.className="popup",this.#en){const t=e.style.outlineColor=ml.makeHexColor(...this.#en);if(CSS.supports("background-color","color-mix(in srgb, red 30%, white)"))e.style.backgroundColor=`color-mix(in srgb, ${t} 30%, white)`;else{const t=.7;e.style.backgroundColor=ml.makeHexColor(...this.#en.map((e=>Math.floor(t*(255-e)+e))))}}const t=document.createElement("span");t.className="header";const i=document.createElement("h1");if(t.append(i),({dir:i.dir,str:i.textContent}=this.#cn),e.append(t),this.#in){const e=document.createElement("span");e.classList.add("popupDate"),e.setAttribute("data-l10n-id","pdfjs-annotation-date-time-string"),e.setAttribute("data-l10n-args",JSON.stringify({dateObj:this.#in.valueOf()})),t.append(e)}const r=this.#un;if(r)id.render({xfaHtml:r,intent:"richText",div:e}),e.lastChild.classList.add("richText","popupContent");else{const t=this._formatContents(this.#tn);e.append(t)}this.#pe.append(e)}get#un(){const e=this.#hn,t=this.#tn;return!e?.str||t?.str&&t.str!==e.str?null:this.#hn.html||null}get#pn(){return this.#un?.attributes?.style?.fontSize||0}get#mn(){return this.#un?.attributes?.style?.color||null}#gn(e){const t=[],i={str:e,html:{name:"div",attributes:{dir:"auto"},children:[{name:"p",children:t}]}},r={style:{color:this.#mn,fontSize:this.#pn?`calc(${this.#pn}px * var(--scale-factor))`:""}};for(const i of e.split("\n"))t.push({name:"span",value:i,attributes:r});return i}_formatContents({str:e,dir:t}){const i=document.createElement("p");i.classList.add("popupContent"),i.dir=t;const r=e.split(/(?:\r\n?|\n)/);for(let e=0,t=r.length;e<t;++e){const n=r[e];i.append(document.createTextNode(n)),e<t-1&&i.append(document.createElement("br"))}return i}#Wr(e){e.altKey||e.shiftKey||e.ctrlKey||e.metaKey||("Enter"===e.key||"Escape"===e.key&&this.#an)&&this.#Qr()}updateEdited({rect:e,popupContent:t}){this.#Br||={contentsObj:this.#tn,richText:this.#hn},e&&(this.#C=null),t&&(this.#hn=this.#gn(t),this.#tn=null),this.#on?.remove(),this.#on=null}resetEdited(){this.#Br&&(({contentsObj:this.#tn,richText:this.#hn}=this.#Br),this.#Br=null,this.#on?.remove(),this.#on=null,this.#C=null)}#fn(){if(null!==this.#C)return;const{page:{view:e},viewport:{rawDims:{pageWidth:t,pageHeight:i,pageX:r,pageY:n}}}=this.#nn;let s=!!this.#sn,a=s?this.#sn:this.#ln;for(const e of this.#rn)if(!a||null!==ml.intersect(e.data.rect,a)){a=e.data.rect,s=!0;break}const o=ml.normalizeRect([a[0],e[3]-a[1]+e[1],a[2],e[3]-a[3]+e[1]]),l=s?a[2]-a[0]+5:0,h=o[0]+l,c=o[1];this.#C=[100*(h-r)/t,100*(c-n)/i];const{style:d}=this.#pe;d.left=`${this.#C[0]}%`,d.top=`${this.#C[1]}%`}#Qr(){this.#an=!this.#an,this.#an?(this.#Zr(),this.#pe.addEventListener("click",this.#Jr),this.#pe.addEventListener("keydown",this.#$r)):(this.#Yr(),this.#pe.removeEventListener("click",this.#Jr),this.#pe.removeEventListener("keydown",this.#$r))}#Zr(){this.#on||this.render(),this.isVisible?this.#an&&this.#pe.classList.add("focused"):(this.#fn(),this.#pe.hidden=!1,this.#pe.style.zIndex=parseInt(this.#pe.style.zIndex)+1e3)}#Yr(){this.#pe.classList.remove("focused"),!this.#an&&this.isVisible&&(this.#pe.hidden=!0,this.#pe.style.zIndex=parseInt(this.#pe.style.zIndex)-1e3)}forceHide(){this.#dn=this.isVisible,this.#dn&&(this.#pe.hidden=!0)}maybeShow(){this.#dn&&(this.#on||this.#Zr(),this.#dn=!1,this.#pe.hidden=!1)}get isVisible(){return!1===this.#pe.hidden}}class yd extends od{constructor(e){super(e,{isRenderable:!0,ignoreBorder:!0}),this.textContent=e.data.textContent,this.textPosition=e.data.textPosition,this.annotationEditorType=ho.FREETEXT}render(){if(this.container.classList.add("freeTextAnnotation"),this.textContent){const e=document.createElement("div");e.classList.add("annotationTextContent"),e.setAttribute("role","comment");for(const t of this.textContent){const i=document.createElement("span");i.textContent=t,e.append(i)}this.container.append(e)}return!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this._editOnDoubleClick(),this.container}}class wd extends od{#bn=null;constructor(e){super(e,{isRenderable:!0,ignoreBorder:!0})}render(){this.container.classList.add("lineAnnotation");const e=this.data,{width:t,height:i}=sd(e.rect),r=this.svgFactory.create(t,i,!0),n=this.#bn=this.svgFactory.createElement("svg:line");return n.setAttribute("x1",e.rect[2]-e.lineCoordinates[0]),n.setAttribute("y1",e.rect[3]-e.lineCoordinates[1]),n.setAttribute("x2",e.rect[2]-e.lineCoordinates[2]),n.setAttribute("y2",e.rect[3]-e.lineCoordinates[3]),n.setAttribute("stroke-width",e.borderStyle.width||1),n.setAttribute("stroke","transparent"),n.setAttribute("fill","transparent"),r.append(n),this.container.append(r),!e.popupRef&&this.hasPopupData&&this._createPopup(),this.container}getElementsToTriggerPopup(){return this.#bn}addHighlightArea(){this.container.classList.add("highlightArea")}}class xd extends od{#vn=null;constructor(e){super(e,{isRenderable:!0,ignoreBorder:!0})}render(){this.container.classList.add("squareAnnotation");const e=this.data,{width:t,height:i}=sd(e.rect),r=this.svgFactory.create(t,i,!0),n=e.borderStyle.width,s=this.#vn=this.svgFactory.createElement("svg:rect");return s.setAttribute("x",n/2),s.setAttribute("y",n/2),s.setAttribute("width",t-n),s.setAttribute("height",i-n),s.setAttribute("stroke-width",n||1),s.setAttribute("stroke","transparent"),s.setAttribute("fill","transparent"),r.append(s),this.container.append(r),!e.popupRef&&this.hasPopupData&&this._createPopup(),this.container}getElementsToTriggerPopup(){return this.#vn}addHighlightArea(){this.container.classList.add("highlightArea")}}class Ad extends od{#yn=null;constructor(e){super(e,{isRenderable:!0,ignoreBorder:!0})}render(){this.container.classList.add("circleAnnotation");const e=this.data,{width:t,height:i}=sd(e.rect),r=this.svgFactory.create(t,i,!0),n=e.borderStyle.width,s=this.#yn=this.svgFactory.createElement("svg:ellipse");return s.setAttribute("cx",t/2),s.setAttribute("cy",i/2),s.setAttribute("rx",t/2-n/2),s.setAttribute("ry",i/2-n/2),s.setAttribute("stroke-width",n||1),s.setAttribute("stroke","transparent"),s.setAttribute("fill","transparent"),r.append(s),this.container.append(r),!e.popupRef&&this.hasPopupData&&this._createPopup(),this.container}getElementsToTriggerPopup(){return this.#yn}addHighlightArea(){this.container.classList.add("highlightArea")}}class kd extends od{#wn=null;constructor(e){super(e,{isRenderable:!0,ignoreBorder:!0}),this.containerClassName="polylineAnnotation",this.svgElementName="svg:polyline"}render(){this.container.classList.add(this.containerClassName);const{data:{rect:e,vertices:t,borderStyle:i,popupRef:r}}=this;if(!t)return this.container;const{width:n,height:s}=sd(e),a=this.svgFactory.create(n,s,!0);let o=[];for(let i=0,r=t.length;i<r;i+=2){const r=t[i]-e[0],n=e[3]-t[i+1];o.push(`${r},${n}`)}o=o.join(" ");const l=this.#wn=this.svgFactory.createElement(this.svgElementName);return l.setAttribute("points",o),l.setAttribute("stroke-width",i.width||1),l.setAttribute("stroke","transparent"),l.setAttribute("fill","transparent"),a.append(l),this.container.append(a),!r&&this.hasPopupData&&this._createPopup(),this.container}getElementsToTriggerPopup(){return this.#wn}addHighlightArea(){this.container.classList.add("highlightArea")}}class Ed extends kd{constructor(e){super(e),this.containerClassName="polygonAnnotation",this.svgElementName="svg:polygon"}}class Sd extends od{constructor(e){super(e,{isRenderable:!0,ignoreBorder:!0})}render(){return this.container.classList.add("caretAnnotation"),!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this.container}}class Cd extends od{#xn=null;#An=[];constructor(e){super(e,{isRenderable:!0,ignoreBorder:!0}),this.containerClassName="inkAnnotation",this.svgElementName="svg:polyline",this.annotationEditorType="InkHighlight"===this.data.it?ho.HIGHLIGHT:ho.INK}#kn(e,t){switch(e){case 90:return{transform:`rotate(90) translate(${-t[0]},${t[1]}) scale(1,-1)`,width:t[3]-t[1],height:t[2]-t[0]};case 180:return{transform:`rotate(180) translate(${-t[2]},${t[1]}) scale(1,-1)`,width:t[2]-t[0],height:t[3]-t[1]};case 270:return{transform:`rotate(270) translate(${-t[2]},${t[3]}) scale(1,-1)`,width:t[3]-t[1],height:t[2]-t[0]};default:return{transform:`translate(${-t[0]},${t[3]}) scale(1,-1)`,width:t[2]-t[0],height:t[3]-t[1]}}}render(){this.container.classList.add(this.containerClassName);const{data:{rect:e,rotation:t,inkLists:i,borderStyle:r,popupRef:n}}=this,{transform:s,width:a,height:o}=this.#kn(t,e),l=this.svgFactory.create(a,o,!0),h=this.#xn=this.svgFactory.createElement("svg:g");l.append(h),h.setAttribute("stroke-width",r.width||1),h.setAttribute("stroke-linecap","round"),h.setAttribute("stroke-linejoin","round"),h.setAttribute("stroke-miterlimit",10),h.setAttribute("stroke","transparent"),h.setAttribute("fill","transparent"),h.setAttribute("transform",s);for(let e=0,t=i.length;e<t;e++){const t=this.svgFactory.createElement(this.svgElementName);this.#An.push(t),t.setAttribute("points",i[e].join(",")),h.append(t)}return!n&&this.hasPopupData&&this._createPopup(),this.container.append(l),this._editOnDoubleClick(),this.container}updateEdited(e){super.updateEdited(e);const{thickness:t,points:i,rect:r}=e,n=this.#xn;if(t>=0&&n.setAttribute("stroke-width",t||1),i)for(let e=0,t=this.#An.length;e<t;e++)this.#An[e].setAttribute("points",i[e].join(","));if(r){const{transform:e,width:t,height:i}=this.#kn(this.data.rotation,r);n.parentElement.setAttribute("viewBox",`0 0 ${t} ${i}`),n.setAttribute("transform",e)}}getElementsToTriggerPopup(){return this.#An}addHighlightArea(){this.container.classList.add("highlightArea")}}class Md extends od{constructor(e){super(e,{isRenderable:!0,ignoreBorder:!0,createQuadrilaterals:!0}),this.annotationEditorType=ho.HIGHLIGHT}render(){return!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this.container.classList.add("highlightAnnotation"),this._editOnDoubleClick(),this.container}}class _d extends od{constructor(e){super(e,{isRenderable:!0,ignoreBorder:!0,createQuadrilaterals:!0})}render(){return!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this.container.classList.add("underlineAnnotation"),this.container}}class Td extends od{constructor(e){super(e,{isRenderable:!0,ignoreBorder:!0,createQuadrilaterals:!0})}render(){return!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this.container.classList.add("squigglyAnnotation"),this.container}}class Nd extends od{constructor(e){super(e,{isRenderable:!0,ignoreBorder:!0,createQuadrilaterals:!0})}render(){return!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this.container.classList.add("strikeoutAnnotation"),this.container}}class Id extends od{constructor(e){super(e,{isRenderable:!0,ignoreBorder:!0}),this.annotationEditorType=ho.STAMP}render(){return this.container.classList.add("stampAnnotation"),this.container.setAttribute("role","img"),!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this._editOnDoubleClick(),this.container}}class Ld extends od{#En=null;constructor(e){super(e,{isRenderable:!0});const{file:t}=this.data;this.filename=t.filename,this.content=t.content,this.linkService.eventBus?.dispatch("fileattachmentannotation",{source:this,...t})}render(){this.container.classList.add("fileAttachmentAnnotation");const{container:e,data:t}=this;let i;t.hasAppearance||0===t.fillAlpha?i=document.createElement("div"):(i=document.createElement("img"),i.src=`${this.imageResourcesPath}annotation-${/paperclip/i.test(t.name)?"paperclip":"pushpin"}.svg`,t.fillAlpha&&t.fillAlpha<1&&(i.style=`filter: opacity(${Math.round(100*t.fillAlpha)}%);`)),i.addEventListener("dblclick",this.#Sn.bind(this)),this.#En=i;const{isMac:r}=ul.platform;return e.addEventListener("keydown",(e=>{"Enter"===e.key&&(r?e.metaKey:e.ctrlKey)&&this.#Sn()})),!t.popupRef&&this.hasPopupData?this._createPopup():i.classList.add("popupTriggerArea"),e.append(i),e}getElementsToTriggerPopup(){return this.#En}addHighlightArea(){this.container.classList.add("highlightArea")}#Sn(){this.downloadManager?.openOrDownloadData(this.content,this.filename)}}class Pd{#Cn=null;#Mn=null;#_n=new Map;#Tn=null;constructor({div:e,accessibilityManager:t,annotationCanvasMap:i,annotationEditorUIManager:r,page:n,viewport:s,structTreeLayer:a}){this.div=e,this.#Cn=t,this.#Mn=i,this.#Tn=a||null,this.page=n,this.viewport=s,this.zIndex=0,this._annotationEditorUIManager=r}hasEditableAnnotations(){return this.#_n.size>0}async#Nn(e,t){const i=e.firstChild||e,r=i.id=`${vl}${t}`,n=await(this.#Tn?.getAriaAttributes(r));if(n)for(const[e,t]of n)i.setAttribute(e,t);this.div.append(e),this.#Cn?.moveElementInDOM(this.div,e,i,!1)}async render(e){const{annotations:t}=e,i=this.div;Fl(i,this.viewport);const r=new Map,n={data:null,layer:i,linkService:e.linkService,downloadManager:e.downloadManager,imageResourcesPath:e.imageResourcesPath||"",renderForms:!1!==e.renderForms,svgFactory:new td,annotationStorage:e.annotationStorage||new rh,enableScripting:!0===e.enableScripting,hasJSActions:e.hasJSActions,fieldObjects:e.fieldObjects,parent:this,elements:null};for(const e of t){if(e.noHTML)continue;const t=e.annotationType===Do;if(t){const t=r.get(e.id);if(!t)continue;n.elements=t}else{const{width:t,height:i}=sd(e.rect);if(t<=0||i<=0)continue}n.data=e;const i=ad.create(n);if(!i.isRenderable)continue;if(!t&&e.popupRef){const t=r.get(e.popupRef);t?t.push(i):r.set(e.popupRef,[i])}const s=i.render();e.hidden&&(s.style.visibility="hidden"),await this.#Nn(s,e.id),i._isEditable&&(this.#_n.set(i.data.id,i),this._annotationEditorUIManager?.renderAnnotationElement(i))}this.#In()}update({viewport:e}){const t=this.div;this.viewport=e,Fl(t,{rotation:e.rotation}),this.#In(),t.hidden=!1}#In(){if(!this.#Mn)return;const e=this.div;for(const[t,i]of this.#Mn){const r=e.querySelector(`[data-annotation-id="${t}"]`);if(!r)continue;i.className="annotationContent";const{firstChild:n}=r;n?"CANVAS"===n.nodeName?n.replaceWith(i):n.classList.contains("annotationContent")?n.after(i):n.before(i):r.append(i)}this.#Mn.clear()}getEditableAnnotations(){return Array.from(this.#_n.values())}getEditableAnnotation(e){return this.#_n.get(e)}}const Rd=/\r\n?|\n/g;class Dd extends Kl{#en;#Ln="";#Pn=`${this.id}-editor`;#Rn=null;#pn;static _freeTextDefaultContent="";static _internalPadding=0;static _defaultColor=null;static _defaultFontSize=10;static get _keyboardManager(){const e=Dd.prototype,t=e=>e.isEmpty(),i=Wl.TRANSLATE_SMALL,r=Wl.TRANSLATE_BIG;return el(this,"_keyboardManager",new Gl([[["ctrl+s","mac+meta+s","ctrl+p","mac+meta+p"],e.commitOrRemove,{bubbles:!0}],[["ctrl+Enter","mac+meta+Enter","Escape","mac+Escape"],e.commitOrRemove],[["ArrowLeft","mac+ArrowLeft"],e._translateEmpty,{args:[-i,0],checker:t}],[["ctrl+ArrowLeft","mac+shift+ArrowLeft"],e._translateEmpty,{args:[-r,0],checker:t}],[["ArrowRight","mac+ArrowRight"],e._translateEmpty,{args:[i,0],checker:t}],[["ctrl+ArrowRight","mac+shift+ArrowRight"],e._translateEmpty,{args:[r,0],checker:t}],[["ArrowUp","mac+ArrowUp"],e._translateEmpty,{args:[0,-i],checker:t}],[["ctrl+ArrowUp","mac+shift+ArrowUp"],e._translateEmpty,{args:[0,-r],checker:t}],[["ArrowDown","mac+ArrowDown"],e._translateEmpty,{args:[0,i],checker:t}],[["ctrl+ArrowDown","mac+shift+ArrowDown"],e._translateEmpty,{args:[0,r],checker:t}]]))}static _type="freetext";static _editorType=ho.FREETEXT;constructor(e){super({...e,name:"freeTextEditor"}),this.#en=e.color||Dd._defaultColor||Kl._defaultLineColor,this.#pn=e.fontSize||Dd._defaultFontSize}static initialize(e,t){Kl.initialize(e,t);const i=getComputedStyle(document.documentElement);this._internalPadding=parseFloat(i.getPropertyValue("--freetext-padding"))}static updateDefaultParams(e,t){switch(e){case co.FREETEXT_SIZE:Dd._defaultFontSize=t;break;case co.FREETEXT_COLOR:Dd._defaultColor=t}}updateParams(e,t){switch(e){case co.FREETEXT_SIZE:this.#Dn(t);break;case co.FREETEXT_COLOR:this.#zn(t)}}static get defaultPropertiesToUpdate(){return[[co.FREETEXT_SIZE,Dd._defaultFontSize],[co.FREETEXT_COLOR,Dd._defaultColor||Kl._defaultLineColor]]}get propertiesToUpdate(){return[[co.FREETEXT_SIZE,this.#pn],[co.FREETEXT_COLOR,this.#en]]}#Dn(e){const t=e=>{this.editorDiv.style.fontSize=`calc(${e}px * var(--scale-factor))`,this.translate(0,-(e-this.#pn)*this.parentScale),this.#pn=e,this.#Fn()},i=this.#pn;this.addCommands({cmd:t.bind(this,e),undo:t.bind(this,i),post:this._uiManager.updateUI.bind(this._uiManager,this),mustExec:!0,type:co.FREETEXT_SIZE,overwriteIfSameType:!0,keepUndo:!0})}#zn(e){const t=e=>{this.#en=this.editorDiv.style.color=e},i=this.#en;this.addCommands({cmd:t.bind(this,e),undo:t.bind(this,i),post:this._uiManager.updateUI.bind(this._uiManager,this),mustExec:!0,type:co.FREETEXT_COLOR,overwriteIfSameType:!0,keepUndo:!0})}_translateEmpty(e,t){this._uiManager.translateSelectedEditors(e,t,!0)}getInitialTranslation(){const e=this.parentScale;return[-Dd._internalPadding*e,-(Dd._internalPadding+this.#pn)*e]}rebuild(){this.parent&&(super.rebuild(),null!==this.div&&(this.isAttachedToDOM||this.parent.add(this)))}enableEditMode(){if(this.isInEditMode())return;this.parent.setEditingState(!1),this.parent.updateToolbar(ho.FREETEXT),super.enableEditMode(),this.overlayDiv.classList.remove("enabled"),this.editorDiv.contentEditable=!0,this._isDraggable=!1,this.div.removeAttribute("aria-activedescendant"),this.#Rn=new AbortController;const e=this._uiManager.combinedSignal(this.#Rn);this.editorDiv.addEventListener("keydown",this.editorDivKeydown.bind(this),{signal:e}),this.editorDiv.addEventListener("focus",this.editorDivFocus.bind(this),{signal:e}),this.editorDiv.addEventListener("blur",this.editorDivBlur.bind(this),{signal:e}),this.editorDiv.addEventListener("input",this.editorDivInput.bind(this),{signal:e}),this.editorDiv.addEventListener("paste",this.editorDivPaste.bind(this),{signal:e})}disableEditMode(){this.isInEditMode()&&(this.parent.setEditingState(!0),super.disableEditMode(),this.overlayDiv.classList.add("enabled"),this.editorDiv.contentEditable=!1,this.div.setAttribute("aria-activedescendant",this.#Pn),this._isDraggable=!0,this.#Rn?.abort(),this.#Rn=null,this.div.focus({preventScroll:!0}),this.isEditing=!1,this.parent.div.classList.add("freetextEditing"))}focusin(e){this._focusEventsAllowed&&(super.focusin(e),e.target!==this.editorDiv&&this.editorDiv.focus())}onceAdded(e){this.width||(this.enableEditMode(),e&&this.editorDiv.focus(),this._initialOptions?.isCentered&&this.center(),this._initialOptions=null)}isEmpty(){return!this.editorDiv||""===this.editorDiv.innerText.trim()}remove(){this.isEditing=!1,this.parent&&(this.parent.setEditingState(!0),this.parent.div.classList.add("freetextEditing")),super.remove()}#On(){const e=[];this.editorDiv.normalize();let t=null;for(const i of this.editorDiv.childNodes)t?.nodeType===Node.TEXT_NODE&&"BR"===i.nodeName||(e.push(Dd.#Bn(i)),t=i);return e.join("\n")}#Fn(){const[e,t]=this.parentDimensions;let i;if(this.isAttachedToDOM)i=this.div.getBoundingClientRect();else{const{currentLayer:e,div:t}=this,r=t.style.display,n=t.classList.contains("hidden");t.classList.remove("hidden"),t.style.display="hidden",e.div.append(this.div),i=t.getBoundingClientRect(),t.remove(),t.style.display=r,t.classList.toggle("hidden",n)}this.rotation%180==this.parentRotation%180?(this.width=i.width/e,this.height=i.height/t):(this.width=i.height/e,this.height=i.width/t),this.fixAndSetPosition()}commit(){if(!this.isInEditMode())return;super.commit(),this.disableEditMode();const e=this.#Ln,t=this.#Ln=this.#On().trimEnd();if(e===t)return;const i=e=>{this.#Ln=e,e?(this.#Hn(),this._uiManager.rebuild(this),this.#Fn()):this.remove()};this.addCommands({cmd:()=>{i(t)},undo:()=>{i(e)},mustExec:!1}),this.#Fn()}shouldGetKeyboardEvents(){return this.isInEditMode()}enterInEditMode(){this.enableEditMode(),this.editorDiv.focus()}dblclick(e){this.enterInEditMode()}keydown(e){e.target===this.div&&"Enter"===e.key&&(this.enterInEditMode(),e.preventDefault())}editorDivKeydown(e){Dd._keyboardManager.exec(this,e)}editorDivFocus(e){this.isEditing=!0}editorDivBlur(e){this.isEditing=!1}editorDivInput(e){this.parent.div.classList.toggle("freetextEditing",this.isEmpty())}disableEditing(){this.editorDiv.setAttribute("role","comment"),this.editorDiv.removeAttribute("aria-multiline")}enableEditing(){this.editorDiv.setAttribute("role","textbox"),this.editorDiv.setAttribute("aria-multiline",!0)}render(){if(this.div)return this.div;let e,t;this.width&&(e=this.x,t=this.y),super.render(),this.editorDiv=document.createElement("div"),this.editorDiv.className="internal",this.editorDiv.setAttribute("id",this.#Pn),this.editorDiv.setAttribute("data-l10n-id","pdfjs-free-text2"),this.editorDiv.setAttribute("data-l10n-attrs","default-content"),this.enableEditing(),this.editorDiv.contentEditable=!0;const{style:i}=this.editorDiv;if(i.fontSize=`calc(${this.#pn}px * var(--scale-factor))`,i.color=this.#en,this.div.append(this.editorDiv),this.overlayDiv=document.createElement("div"),this.overlayDiv.classList.add("overlay","enabled"),this.div.append(this.overlayDiv),ql(this,this.div,["dblclick","keydown"]),this.width){const[i,r]=this.parentDimensions;if(this.annotationElementId){const{position:n}=this._initialData;let[s,a]=this.getInitialTranslation();[s,a]=this.pageTranslationToScreen(s,a);const[o,l]=this.pageDimensions,[h,c]=this.pageTranslation;let d,u;switch(this.rotation){case 0:d=e+(n[0]-h)/o,u=t+this.height-(n[1]-c)/l;break;case 90:d=e+(n[0]-h)/o,u=t-(n[1]-c)/l,[s,a]=[a,-s];break;case 180:d=e-this.width+(n[0]-h)/o,u=t-(n[1]-c)/l,[s,a]=[-s,-a];break;case 270:d=e+(n[0]-h-this.height*l)/o,u=t+(n[1]-c-this.width*o)/l,[s,a]=[-a,s]}this.setAt(d*i,u*r,s,a)}else this.setAt(e*i,t*r,this.width*i,this.height*r);this.#Hn(),this._isDraggable=!0,this.editorDiv.contentEditable=!1}else this._isDraggable=!1,this.editorDiv.contentEditable=!0;return this.div}static#Bn(e){return(e.nodeType===Node.TEXT_NODE?e.nodeValue:e.innerText).replaceAll(Rd,"")}editorDivPaste(e){const t=e.clipboardData||window.clipboardData,{types:i}=t;if(1===i.length&&"text/plain"===i[0])return;e.preventDefault();const r=Dd.#qn(t.getData("text")||"").replaceAll(Rd,"\n");if(!r)return;const n=window.getSelection();if(!n.rangeCount)return;this.editorDiv.normalize(),n.deleteFromDocument();const s=n.getRangeAt(0);if(!r.includes("\n"))return s.insertNode(document.createTextNode(r)),this.editorDiv.normalize(),void n.collapseToStart();const{startContainer:a,startOffset:o}=s,l=[],h=[];if(a.nodeType===Node.TEXT_NODE){const e=a.parentElement;if(h.push(a.nodeValue.slice(o).replaceAll(Rd,"")),e!==this.editorDiv){let t=l;for(const i of this.editorDiv.childNodes)i!==e?t.push(Dd.#Bn(i)):t=h}l.push(a.nodeValue.slice(0,o).replaceAll(Rd,""))}else if(a===this.editorDiv){let e=l,t=0;for(const i of this.editorDiv.childNodes)t++===o&&(e=h),e.push(Dd.#Bn(i))}this.#Ln=`${l.join("\n")}${r}${h.join("\n")}`,this.#Hn();const c=new Range;let d=l.reduce(((e,t)=>e+t.length),0);for(const{firstChild:e}of this.editorDiv.childNodes)if(e.nodeType===Node.TEXT_NODE){const t=e.nodeValue.length;if(d<=t){c.setStart(e,d),c.setEnd(e,d);break}d-=t}n.removeAllRanges(),n.addRange(c)}#Hn(){if(this.editorDiv.replaceChildren(),this.#Ln)for(const e of this.#Ln.split("\n")){const t=document.createElement("div");t.append(e?document.createTextNode(e):document.createElement("br")),this.editorDiv.append(t)}}#jn(){return this.#Ln.replaceAll(" "," ")}static#qn(e){return e.replaceAll(" "," ")}get contentDiv(){return this.editorDiv}static async deserialize(e,t,i){let r=null;if(e instanceof yd){const{data:{defaultAppearanceData:{fontSize:t,fontColor:i},rect:n,rotation:s,id:a,popupRef:o},textContent:l,textPosition:h,parent:{page:{pageNumber:c}}}=e;if(!l||0===l.length)return null;r=e={annotationType:ho.FREETEXT,color:Array.from(i),fontSize:t,value:l.join("\n"),position:h,pageIndex:c-1,rect:n.slice(0),rotation:s,id:a,deleted:!1,popupRef:o}}const n=await super.deserialize(e,t,i);return n.#pn=e.fontSize,n.#en=ml.makeHexColor(...e.color),n.#Ln=Dd.#qn(e.value),n.annotationElementId=e.id||null,n._initialData=r,n}serialize(e=!1){if(this.isEmpty())return null;if(this.deleted)return this.serializeDeleted();const t=Dd._internalPadding*this.parentScale,i=this.getRect(t,t),r=Kl._colorManager.convert(this.isAttachedToDOM?getComputedStyle(this.editorDiv).color:this.#en),n={annotationType:ho.FREETEXT,color:r,fontSize:this.#pn,value:this.#jn(),pageIndex:this.pageIndex,rect:i,rotation:this.rotation,structTreeParentId:this._structTreeParentId};return e?n:this.annotationElementId&&!this.#Vn(n)?null:(n.id=this.annotationElementId,n)}#Vn(e){const{value:t,fontSize:i,color:r,pageIndex:n}=this._initialData;return this._hasBeenMoved||e.value!==t||e.fontSize!==i||e.color.some(((e,t)=>e!==r[t]))||e.pageIndex!==n}renderAnnotationElement(e){const t=super.renderAnnotationElement(e);if(this.deleted)return t;const{style:i}=t;i.fontSize=`calc(${this.#pn}px * var(--scale-factor))`,i.color=this.#en,t.replaceChildren();for(const e of this.#Ln.split("\n")){const i=document.createElement("div");i.append(e?document.createTextNode(e):document.createElement("br")),t.append(i)}const r=Dd._internalPadding*this.parentScale;return e.updateEdited({rect:this.getRect(r,r),popupContent:this.#Ln}),t}resetAnnotationElement(e){super.resetAnnotationElement(e),e.resetEdited()}}class zd{static PRECISION=1e-4;toSVGPath(){Zo("Abstract method `toSVGPath` must be implemented.")}get box(){Zo("Abstract getter `box` must be implemented.")}serialize(e,t){Zo("Abstract method `serialize` must be implemented.")}static _rescale(e,t,i,r,n,s){s||=new Float32Array(e.length);for(let a=0,o=e.length;a<o;a+=2)s[a]=t+e[a]*r,s[a+1]=i+e[a+1]*n;return s}static _rescaleAndSwap(e,t,i,r,n,s){s||=new Float32Array(e.length);for(let a=0,o=e.length;a<o;a+=2)s[a]=t+e[a+1]*r,s[a+1]=i+e[a]*n;return s}static _translate(e,t,i,r){r||=new Float32Array(e.length);for(let n=0,s=e.length;n<s;n+=2)r[n]=t+e[n],r[n+1]=i+e[n+1];return r}static svgRound(e){return Math.round(1e4*e)}static _normalizePoint(e,t,i,r,n){switch(n){case 90:return[1-t/i,e/r];case 180:return[1-e/i,1-t/r];case 270:return[t/i,1-e/r];default:return[e/i,t/r]}}static _normalizePagePoint(e,t,i){switch(i){case 90:return[1-t,e];case 180:return[1-e,1-t];case 270:return[t,1-e];default:return[e,t]}}static createBezierPoints(e,t,i,r,n,s){return[(e+5*i)/6,(t+5*r)/6,(5*i+n)/6,(5*r+s)/6,(i+n)/2,(r+s)/2]}}class Fd{#Un;#Gn=[];#$n;#Wn;#Xn=[];#Yn=new Float32Array(18);#Kn;#Zn;#Jn;#Qn;#es;#ts;#is=[];static#rs=8;static#ns=2;static#ss=Fd.#rs+Fd.#ns;constructor({x:e,y:t},i,r,n,s,a=0){this.#Un=i,this.#ts=n*r,this.#Wn=s,this.#Yn.set([NaN,NaN,NaN,NaN,e,t],6),this.#$n=a,this.#Qn=Fd.#rs*r,this.#Jn=Fd.#ss*r,this.#es=r,this.#is.push(e,t)}isEmpty(){return isNaN(this.#Yn[8])}#as(){const e=this.#Yn.subarray(4,6),t=this.#Yn.subarray(16,18),[i,r,n,s]=this.#Un;return[(this.#Kn+(e[0]-t[0])/2-i)/n,(this.#Zn+(e[1]-t[1])/2-r)/s,(this.#Kn+(t[0]-e[0])/2-i)/n,(this.#Zn+(t[1]-e[1])/2-r)/s]}add({x:e,y:t}){this.#Kn=e,this.#Zn=t;const[i,r,n,s]=this.#Un;let[a,o,l,h]=this.#Yn.subarray(8,12);const c=e-l,d=t-h,u=Math.hypot(c,d);if(u<this.#Jn)return!1;const p=u-this.#Qn,m=p/u,g=m*c,f=m*d;let b=a,v=o;a=l,o=h,l+=g,h+=f,this.#is?.push(e,t);const y=g/p,w=-f/p*this.#ts,x=y*this.#ts;if(this.#Yn.set(this.#Yn.subarray(2,8),0),this.#Yn.set([l+w,h+x],4),this.#Yn.set(this.#Yn.subarray(14,18),12),this.#Yn.set([l-w,h-x],16),isNaN(this.#Yn[6]))return 0===this.#Xn.length&&(this.#Yn.set([a+w,o+x],2),this.#Xn.push(NaN,NaN,NaN,NaN,(a+w-i)/n,(o+x-r)/s),this.#Yn.set([a-w,o-x],14),this.#Gn.push(NaN,NaN,NaN,NaN,(a-w-i)/n,(o-x-r)/s)),this.#Yn.set([b,v,a,o,l,h],6),!this.isEmpty();this.#Yn.set([b,v,a,o,l,h],6);return Math.abs(Math.atan2(v-o,b-a)-Math.atan2(f,g))<Math.PI/2?([a,o,l,h]=this.#Yn.subarray(2,6),this.#Xn.push(NaN,NaN,NaN,NaN,((a+l)/2-i)/n,((o+h)/2-r)/s),[a,o,b,v]=this.#Yn.subarray(14,18),this.#Gn.push(NaN,NaN,NaN,NaN,((b+a)/2-i)/n,((v+o)/2-r)/s),!0):([b,v,a,o,l,h]=this.#Yn.subarray(0,6),this.#Xn.push(((b+5*a)/6-i)/n,((v+5*o)/6-r)/s,((5*a+l)/6-i)/n,((5*o+h)/6-r)/s,((a+l)/2-i)/n,((o+h)/2-r)/s),[l,h,a,o,b,v]=this.#Yn.subarray(12,18),this.#Gn.push(((b+5*a)/6-i)/n,((v+5*o)/6-r)/s,((5*a+l)/6-i)/n,((5*o+h)/6-r)/s,((a+l)/2-i)/n,((o+h)/2-r)/s),!0)}toSVGPath(){if(this.isEmpty())return"";const e=this.#Xn,t=this.#Gn;if(isNaN(this.#Yn[6])&&!this.isEmpty())return this.#os();const i=[];i.push(`M${e[4]} ${e[5]}`);for(let t=6;t<e.length;t+=6)isNaN(e[t])?i.push(`L${e[t+4]} ${e[t+5]}`):i.push(`C${e[t]} ${e[t+1]} ${e[t+2]} ${e[t+3]} ${e[t+4]} ${e[t+5]}`);this.#ls(i);for(let e=t.length-6;e>=6;e-=6)isNaN(t[e])?i.push(`L${t[e+4]} ${t[e+5]}`):i.push(`C${t[e]} ${t[e+1]} ${t[e+2]} ${t[e+3]} ${t[e+4]} ${t[e+5]}`);return this.#hs(i),i.join(" ")}#os(){const[e,t,i,r]=this.#Un,[n,s,a,o]=this.#as();return`M${(this.#Yn[2]-e)/i} ${(this.#Yn[3]-t)/r} L${(this.#Yn[4]-e)/i} ${(this.#Yn[5]-t)/r} L${n} ${s} L${a} ${o} L${(this.#Yn[16]-e)/i} ${(this.#Yn[17]-t)/r} L${(this.#Yn[14]-e)/i} ${(this.#Yn[15]-t)/r} Z`}#hs(e){const t=this.#Gn;e.push(`L${t[4]} ${t[5]} Z`)}#ls(e){const[t,i,r,n]=this.#Un,s=this.#Yn.subarray(4,6),a=this.#Yn.subarray(16,18),[o,l,h,c]=this.#as();e.push(`L${(s[0]-t)/r} ${(s[1]-i)/n} L${o} ${l} L${h} ${c} L${(a[0]-t)/r} ${(a[1]-i)/n}`)}newFreeDrawOutline(e,t,i,r,n,s){return new Od(e,t,i,r,n,s)}getOutlines(){const e=this.#Xn,t=this.#Gn,i=this.#Yn,[r,n,s,a]=this.#Un,o=new Float32Array((this.#is?.length??0)+2);for(let e=0,t=o.length-2;e<t;e+=2)o[e]=(this.#is[e]-r)/s,o[e+1]=(this.#is[e+1]-n)/a;if(o[o.length-2]=(this.#Kn-r)/s,o[o.length-1]=(this.#Zn-n)/a,isNaN(i[6])&&!this.isEmpty())return this.#cs(o);const l=new Float32Array(this.#Xn.length+24+this.#Gn.length);let h=e.length;for(let t=0;t<h;t+=2)isNaN(e[t])?l[t]=l[t+1]=NaN:(l[t]=e[t],l[t+1]=e[t+1]);h=this.#ds(l,h);for(let e=t.length-6;e>=6;e-=6)for(let i=0;i<6;i+=2)isNaN(t[e+i])?(l[h]=l[h+1]=NaN,h+=2):(l[h]=t[e+i],l[h+1]=t[e+i+1],h+=2);return this.#us(l,h),this.newFreeDrawOutline(l,o,this.#Un,this.#es,this.#$n,this.#Wn)}#cs(e){const t=this.#Yn,[i,r,n,s]=this.#Un,[a,o,l,h]=this.#as(),c=new Float32Array(36);return c.set([NaN,NaN,NaN,NaN,(t[2]-i)/n,(t[3]-r)/s,NaN,NaN,NaN,NaN,(t[4]-i)/n,(t[5]-r)/s,NaN,NaN,NaN,NaN,a,o,NaN,NaN,NaN,NaN,l,h,NaN,NaN,NaN,NaN,(t[16]-i)/n,(t[17]-r)/s,NaN,NaN,NaN,NaN,(t[14]-i)/n,(t[15]-r)/s],0),this.newFreeDrawOutline(c,e,this.#Un,this.#es,this.#$n,this.#Wn)}#us(e,t){const i=this.#Gn;return e.set([NaN,NaN,NaN,NaN,i[4],i[5]],t),t+6}#ds(e,t){const i=this.#Yn.subarray(4,6),r=this.#Yn.subarray(16,18),[n,s,a,o]=this.#Un,[l,h,c,d]=this.#as();return e.set([NaN,NaN,NaN,NaN,(i[0]-n)/a,(i[1]-s)/o,NaN,NaN,NaN,NaN,l,h,NaN,NaN,NaN,NaN,c,d,NaN,NaN,NaN,NaN,(r[0]-n)/a,(r[1]-s)/o],t),t+24}}class Od extends zd{#Un;#ps=new Float32Array(4);#$n;#Wn;#is;#es;#ms;constructor(e,t,i,r,n,s){super(),this.#ms=e,this.#is=t,this.#Un=i,this.#es=r,this.#$n=n,this.#Wn=s,this.lastPoint=[NaN,NaN],this.#gs(s);const[a,o,l,h]=this.#ps;for(let t=0,i=e.length;t<i;t+=2)e[t]=(e[t]-a)/l,e[t+1]=(e[t+1]-o)/h;for(let e=0,i=t.length;e<i;e+=2)t[e]=(t[e]-a)/l,t[e+1]=(t[e+1]-o)/h}toSVGPath(){const e=[`M${this.#ms[4]} ${this.#ms[5]}`];for(let t=6,i=this.#ms.length;t<i;t+=6)isNaN(this.#ms[t])?e.push(`L${this.#ms[t+4]} ${this.#ms[t+5]}`):e.push(`C${this.#ms[t]} ${this.#ms[t+1]} ${this.#ms[t+2]} ${this.#ms[t+3]} ${this.#ms[t+4]} ${this.#ms[t+5]}`);return e.push("Z"),e.join(" ")}serialize([e,t,i,r],n){const s=i-e,a=r-t;let o,l;switch(n){case 0:o=zd._rescale(this.#ms,e,r,s,-a),l=zd._rescale(this.#is,e,r,s,-a);break;case 90:o=zd._rescaleAndSwap(this.#ms,e,t,s,a),l=zd._rescaleAndSwap(this.#is,e,t,s,a);break;case 180:o=zd._rescale(this.#ms,i,t,-s,a),l=zd._rescale(this.#is,i,t,-s,a);break;case 270:o=zd._rescaleAndSwap(this.#ms,i,r,-s,-a),l=zd._rescaleAndSwap(this.#is,i,r,-s,-a)}return{outline:Array.from(o),points:[Array.from(l)]}}#gs(e){const t=this.#ms;let i=t[4],r=t[5],n=i,s=r,a=i,o=r,l=i,h=r;const c=e?Math.max:Math.min;for(let e=6,d=t.length;e<d;e+=6){if(isNaN(t[e]))n=Math.min(n,t[e+4]),s=Math.min(s,t[e+5]),a=Math.max(a,t[e+4]),o=Math.max(o,t[e+5]),h<t[e+5]?(l=t[e+4],h=t[e+5]):h===t[e+5]&&(l=c(l,t[e+4]));else{const d=ml.bezierBoundingBox(i,r,...t.slice(e,e+6));n=Math.min(n,d[0]),s=Math.min(s,d[1]),a=Math.max(a,d[2]),o=Math.max(o,d[3]),h<d[3]?(l=d[2],h=d[3]):h===d[3]&&(l=c(l,d[2]))}i=t[e+4],r=t[e+5]}const d=this.#ps;d[0]=n-this.#$n,d[1]=s-this.#$n,d[2]=a-n+2*this.#$n,d[3]=o-s+2*this.#$n,this.lastPoint=[l,h]}get box(){return this.#ps}newOutliner(e,t,i,r,n,s=0){return new Fd(e,t,i,r,n,s)}getNewOutline(e,t){const[i,r,n,s]=this.#ps,[a,o,l,h]=this.#Un,c=n*l,d=s*h,u=i*l+a,p=r*h+o,m=this.newOutliner({x:this.#is[0]*c+u,y:this.#is[1]*d+p},this.#Un,this.#es,e,this.#Wn,t??this.#$n);for(let e=2;e<this.#is.length;e+=2)m.add({x:this.#is[e]*c+u,y:this.#is[e+1]*d+p});return m.getOutlines()}}class Bd{#Un;#fs;#bs=[];#vs=[];constructor(e,t=0,i=0,r=!0){let n=1/0,s=-1/0,a=1/0,o=-1/0;const l=10**-4;for(const{x:i,y:r,width:h,height:c}of e){const e=Math.floor((i-t)/l)*l,d=Math.ceil((i+h+t)/l)*l,u=Math.floor((r-t)/l)*l,p=Math.ceil((r+c+t)/l)*l,m=[e,u,p,!0],g=[d,u,p,!1];this.#bs.push(m,g),n=Math.min(n,e),s=Math.max(s,d),a=Math.min(a,u),o=Math.max(o,p)}const h=s-n+2*i,c=o-a+2*i,d=n-i,u=a-i,p=this.#bs.at(r?-1:-2),m=[p[0],p[2]];for(const e of this.#bs){const[t,i,r]=e;e[0]=(t-d)/h,e[1]=(i-u)/c,e[2]=(r-u)/c}this.#Un=new Float32Array([d,u,h,c]),this.#fs=m}getOutlines(){this.#bs.sort(((e,t)=>e[0]-t[0]||e[1]-t[1]||e[2]-t[2]));const e=[];for(const t of this.#bs)t[3]?(e.push(...this.#ys(t)),this.#ws(t)):(this.#xs(t),e.push(...this.#ys(t)));return this.#As(e)}#As(e){const t=[],i=new Set;for(const i of e){const[e,r,n]=i;t.push([e,r,i],[e,n,i])}t.sort(((e,t)=>e[1]-t[1]||e[0]-t[0]));for(let e=0,r=t.length;e<r;e+=2){const r=t[e][2],n=t[e+1][2];r.push(n),n.push(r),i.add(r),i.add(n)}const r=[];let n;for(;i.size>0;){const e=i.values().next().value;let[t,s,a,o,l]=e;i.delete(e);let h=t,c=s;for(n=[t,a],r.push(n);;){let e;if(i.has(o))e=o;else{if(!i.has(l))break;e=l}i.delete(e),[t,s,a,o,l]=e,h!==t&&(n.push(h,c,t,c===s?s:a),h=t),c=c===s?a:s}n.push(h,c)}return new Hd(r,this.#Un,this.#fs)}#ks(e){const t=this.#vs;let i=0,r=t.length-1;for(;i<=r;){const n=i+r>>1,s=t[n][0];if(s===e)return n;s<e?i=n+1:r=n-1}return r+1}#ws([,e,t]){const i=this.#ks(e);this.#vs.splice(i,0,[e,t])}#xs([,e,t]){const i=this.#ks(e);for(let r=i;r<this.#vs.length;r++){const[i,n]=this.#vs[r];if(i!==e)break;if(i===e&&n===t)return void this.#vs.splice(r,1)}for(let r=i-1;r>=0;r--){const[i,n]=this.#vs[r];if(i!==e)break;if(i===e&&n===t)return void this.#vs.splice(r,1)}}#ys(e){const[t,i,r]=e,n=[[t,i,r]],s=this.#ks(r);for(let e=0;e<s;e++){const[i,r]=this.#vs[e];for(let e=0,s=n.length;e<s;e++){const[,a,o]=n[e];if(!(r<=a||o<=i))if(a>=i)if(o>r)n[e][1]=r;else{if(1===s)return[];n.splice(e,1),e--,s--}else n[e][2]=i,o>r&&n.push([t,r,o])}}return n}}class Hd extends zd{#Un;#Es;constructor(e,t,i){super(),this.#Es=e,this.#Un=t,this.lastPoint=i}toSVGPath(){const e=[];for(const t of this.#Es){let[i,r]=t;e.push(`M${i} ${r}`);for(let n=2;n<t.length;n+=2){const s=t[n],a=t[n+1];s===i?(e.push(`V${a}`),r=a):a===r&&(e.push(`H${s}`),i=s)}e.push("Z")}return e.join(" ")}serialize([e,t,i,r],n){const s=[],a=i-e,o=r-t;for(const t of this.#Es){const i=new Array(t.length);for(let n=0;n<t.length;n+=2)i[n]=e+t[n]*a,i[n+1]=r-t[n+1]*o;s.push(i)}return s}get box(){return this.#Un}get classNamesForOutlining(){return["highlightOutline"]}}class qd extends Fd{newFreeDrawOutline(e,t,i,r,n,s){return new jd(e,t,i,r,n,s)}}class jd extends Od{newOutliner(e,t,i,r,n,s=0){return new qd(e,t,i,r,n,s)}}class Vd{#Ss=null;#Cs=null;#Ms;#_s=null;#Ts=!1;#Ns=!1;#s=null;#Is;#Ls=null;#g=null;#Ps;static#Rs=null;static get _keyboardManager(){return el(this,"_keyboardManager",new Gl([[["Escape","mac+Escape"],Vd.prototype._hideDropdownFromKeyboard],[[" ","mac+ "],Vd.prototype._colorSelectFromKeyboard],[["ArrowDown","ArrowRight","mac+ArrowDown","mac+ArrowRight"],Vd.prototype._moveToNext],[["ArrowUp","ArrowLeft","mac+ArrowUp","mac+ArrowLeft"],Vd.prototype._moveToPrevious],[["Home","mac+Home"],Vd.prototype._moveToBeginning],[["End","mac+End"],Vd.prototype._moveToEnd]]))}constructor({editor:e=null,uiManager:t=null}){e?(this.#Ns=!1,this.#Ps=co.HIGHLIGHT_COLOR,this.#s=e):(this.#Ns=!0,this.#Ps=co.HIGHLIGHT_DEFAULT_COLOR),this.#g=e?._uiManager||t,this.#Is=this.#g._eventBus,this.#Ms=e?.color||this.#g?.highlightColors.values().next().value||"#FFFF98",Vd.#Rs||=Object.freeze({blue:"pdfjs-editor-colorpicker-blue",green:"pdfjs-editor-colorpicker-green",pink:"pdfjs-editor-colorpicker-pink",red:"pdfjs-editor-colorpicker-red",yellow:"pdfjs-editor-colorpicker-yellow"})}renderButton(){const e=this.#Ss=document.createElement("button");e.className="colorPicker",e.tabIndex="0",e.setAttribute("data-l10n-id","pdfjs-editor-colorpicker-button"),e.setAttribute("aria-haspopup",!0);const t=this.#g._signal;e.addEventListener("click",this.#Ds.bind(this),{signal:t}),e.addEventListener("keydown",this.#Wr.bind(this),{signal:t});const i=this.#Cs=document.createElement("span");return i.className="swatch",i.setAttribute("aria-hidden",!0),i.style.backgroundColor=this.#Ms,e.append(i),e}renderMainDropdown(){const e=this.#_s=this.#zs();return e.setAttribute("aria-orientation","horizontal"),e.setAttribute("aria-labelledby","highlightColorPickerLabel"),e}#zs(){const e=document.createElement("div"),t=this.#g._signal;e.addEventListener("contextmenu",Nl,{signal:t}),e.className="dropdown",e.role="listbox",e.setAttribute("aria-multiselectable",!1),e.setAttribute("aria-orientation","vertical"),e.setAttribute("data-l10n-id","pdfjs-editor-colorpicker-dropdown");for(const[i,r]of this.#g.highlightColors){const n=document.createElement("button");n.tabIndex="0",n.role="option",n.setAttribute("data-color",r),n.title=i,n.setAttribute("data-l10n-id",Vd.#Rs[i]);const s=document.createElement("span");n.append(s),s.className="swatch",s.style.backgroundColor=r,n.setAttribute("aria-selected",r===this.#Ms),n.addEventListener("click",this.#Fs.bind(this,r),{signal:t}),e.append(n)}return e.addEventListener("keydown",this.#Wr.bind(this),{signal:t}),e}#Fs(e,t){t.stopPropagation(),this.#Is.dispatch("switchannotationeditorparams",{source:this,type:this.#Ps,value:e})}_colorSelectFromKeyboard(e){if(e.target===this.#Ss)return void this.#Ds(e);const t=e.target.getAttribute("data-color");t&&this.#Fs(t,e)}_moveToNext(e){this.#Os?e.target!==this.#Ss?e.target.nextSibling?.focus():this.#_s.firstChild?.focus():this.#Ds(e)}_moveToPrevious(e){e.target!==this.#_s?.firstChild&&e.target!==this.#Ss?(this.#Os||this.#Ds(e),e.target.previousSibling?.focus()):this.#Os&&this._hideDropdownFromKeyboard()}_moveToBeginning(e){this.#Os?this.#_s.firstChild?.focus():this.#Ds(e)}_moveToEnd(e){this.#Os?this.#_s.lastChild?.focus():this.#Ds(e)}#Wr(e){Vd._keyboardManager.exec(this,e)}#Ds(e){if(this.#Os)return void this.hideDropdown();if(this.#Ts=0===e.detail,this.#Ls||(this.#Ls=new AbortController,window.addEventListener("pointerdown",this.#h.bind(this),{signal:this.#g.combinedSignal(this.#Ls)})),this.#_s)return void this.#_s.classList.remove("hidden");const t=this.#_s=this.#zs();this.#Ss.append(t)}#h(e){this.#_s?.contains(e.target)||this.hideDropdown()}hideDropdown(){this.#_s?.classList.add("hidden"),this.#Ls?.abort(),this.#Ls=null}get#Os(){return this.#_s&&!this.#_s.classList.contains("hidden")}_hideDropdownFromKeyboard(){this.#Ns||(this.#Os?(this.hideDropdown(),this.#Ss.focus({preventScroll:!0,focusVisible:this.#Ts})):this.#s?.unselect())}updateColor(e){if(this.#Cs&&(this.#Cs.style.backgroundColor=e),!this.#_s)return;const t=this.#g.highlightColors.values();for(const i of this.#_s.children)i.setAttribute("aria-selected",t.next().value===e)}destroy(){this.#Ss?.remove(),this.#Ss=null,this.#Cs=null,this.#_s?.remove(),this.#_s=null}}class Ud extends Kl{#Bs=null;#Hs=0;#qs;#js=null;#n=null;#Vs=null;#Us=null;#Gs=0;#$s=null;#Ws=null;#y=null;#Xs=!1;#fs=null;#Ys;#Ks=null;#Zs="";#ts;#Js="";static _defaultColor=null;static _defaultOpacity=1;static _defaultThickness=12;static _type="highlight";static _editorType=ho.HIGHLIGHT;static _freeHighlightId=-1;static _freeHighlight=null;static _freeHighlightClipId="";static get _keyboardManager(){const e=Ud.prototype;return el(this,"_keyboardManager",new Gl([[["ArrowLeft","mac+ArrowLeft"],e._moveCaret,{args:[0]}],[["ArrowRight","mac+ArrowRight"],e._moveCaret,{args:[1]}],[["ArrowUp","mac+ArrowUp"],e._moveCaret,{args:[2]}],[["ArrowDown","mac+ArrowDown"],e._moveCaret,{args:[3]}]]))}constructor(e){super({...e,name:"highlightEditor"}),this.color=e.color||Ud._defaultColor,this.#ts=e.thickness||Ud._defaultThickness,this.#Ys=e.opacity||Ud._defaultOpacity,this.#qs=e.boxes||null,this.#Js=e.methodOfCreation||"",this.#Zs=e.text||"",this._isDraggable=!1,e.highlightId>-1?(this.#Xs=!0,this.#Qs(e),this.#ea()):this.#qs&&(this.#Bs=e.anchorNode,this.#Hs=e.anchorOffset,this.#Us=e.focusNode,this.#Gs=e.focusOffset,this.#ta(),this.#ea(),this.rotate(this.rotation))}get telemetryInitialData(){return{action:"added",type:this.#Xs?"free_highlight":"highlight",color:this._uiManager.highlightColorNames.get(this.color),thickness:this.#ts,methodOfCreation:this.#Js}}get telemetryFinalData(){return{type:"highlight",color:this._uiManager.highlightColorNames.get(this.color)}}static computeTelemetryFinalData(e){return{numberOfColors:e.get("color").size}}#ta(){const e=new Bd(this.#qs,.001);this.#Ws=e.getOutlines(),[this.x,this.y,this.width,this.height]=this.#Ws.box;const t=new Bd(this.#qs,.0025,.001,"ltr"===this._uiManager.direction);this.#Vs=t.getOutlines();const{lastPoint:i}=this.#Vs;this.#fs=[(i[0]-this.x)/this.width,(i[1]-this.y)/this.height]}#Qs({highlightOutlines:e,highlightId:t,clipPathId:i}){this.#Ws=e;if(this.#Vs=e.getNewOutline(this.#ts/2+1.5,.0025),t>=0)this.#y=t,this.#js=i,this.parent.drawLayer.finalizeDraw(t,{bbox:e.box,path:{d:e.toSVGPath()}}),this.#Ks=this.parent.drawLayer.drawOutline({rootClass:{highlightOutline:!0,free:!0},bbox:this.#Vs.box,path:{d:this.#Vs.toSVGPath()}},!0);else if(this.parent){const t=this.parent.viewport.rotation;this.parent.drawLayer.updateProperties(this.#y,{bbox:Ud.#ia(this.#Ws.box,(t-this.rotation+360)%360),path:{d:e.toSVGPath()}}),this.parent.drawLayer.updateProperties(this.#Ks,{bbox:Ud.#ia(this.#Vs.box,t),path:{d:this.#Vs.toSVGPath()}})}const[r,n,s,a]=e.box;switch(this.rotation){case 0:this.x=r,this.y=n,this.width=s,this.height=a;break;case 90:{const[e,t]=this.parentDimensions;this.x=n,this.y=1-r,this.width=s*t/e,this.height=a*e/t;break}case 180:this.x=1-r,this.y=1-n,this.width=s,this.height=a;break;case 270:{const[e,t]=this.parentDimensions;this.x=1-n,this.y=r,this.width=s*t/e,this.height=a*e/t;break}}const{lastPoint:o}=this.#Vs;this.#fs=[(o[0]-r)/s,(o[1]-n)/a]}static initialize(e,t){Kl.initialize(e,t),Ud._defaultColor||=t.highlightColors?.values().next().value||"#fff066"}static updateDefaultParams(e,t){switch(e){case co.HIGHLIGHT_DEFAULT_COLOR:Ud._defaultColor=t;break;case co.HIGHLIGHT_THICKNESS:Ud._defaultThickness=t}}translateInPage(e,t){}get toolbarPosition(){return this.#fs}updateParams(e,t){switch(e){case co.HIGHLIGHT_COLOR:this.#zn(t);break;case co.HIGHLIGHT_THICKNESS:this.#ra(t)}}static get defaultPropertiesToUpdate(){return[[co.HIGHLIGHT_DEFAULT_COLOR,Ud._defaultColor],[co.HIGHLIGHT_THICKNESS,Ud._defaultThickness]]}get propertiesToUpdate(){return[[co.HIGHLIGHT_COLOR,this.color||Ud._defaultColor],[co.HIGHLIGHT_THICKNESS,this.#ts||Ud._defaultThickness],[co.HIGHLIGHT_FREE,this.#Xs]]}#zn(e){const t=(e,t)=>{this.color=e,this.#Ys=t,this.parent?.drawLayer.updateProperties(this.#y,{root:{fill:e,"fill-opacity":t}}),this.#n?.updateColor(e)},i=this.color,r=this.#Ys;this.addCommands({cmd:t.bind(this,e,Ud._defaultOpacity),undo:t.bind(this,i,r),post:this._uiManager.updateUI.bind(this._uiManager,this),mustExec:!0,type:co.HIGHLIGHT_COLOR,overwriteIfSameType:!0,keepUndo:!0}),this._reportTelemetry({action:"color_changed",color:this._uiManager.highlightColorNames.get(e)},!0)}#ra(e){const t=this.#ts,i=e=>{this.#ts=e,this.#na(e)};this.addCommands({cmd:i.bind(this,e),undo:i.bind(this,t),post:this._uiManager.updateUI.bind(this._uiManager,this),mustExec:!0,type:co.INK_THICKNESS,overwriteIfSameType:!0,keepUndo:!0}),this._reportTelemetry({action:"thickness_changed",thickness:e},!0)}async addEditToolbar(){const e=await super.addEditToolbar();return e?(this._uiManager.highlightColors&&(this.#n=new Vd({editor:this}),e.addColorPicker(this.#n)),e):null}disableEditing(){super.disableEditing(),this.div.classList.toggle("disabled",!0)}enableEditing(){super.enableEditing(),this.div.classList.toggle("disabled",!1)}fixAndSetPosition(){return super.fixAndSetPosition(this.#sa())}getBaseTranslation(){return[0,0]}getRect(e,t){return super.getRect(e,t,this.#sa())}onceAdded(e){this.annotationElementId||this.parent.addUndoableEditor(this),e&&this.div.focus()}remove(){this.#aa(),this._reportTelemetry({action:"deleted"}),super.remove()}rebuild(){this.parent&&(super.rebuild(),null!==this.div&&(this.#ea(),this.isAttachedToDOM||this.parent.add(this)))}setParent(e){let t=!1;this.parent&&!e?this.#aa():e&&(this.#ea(e),t=!this.parent&&this.div?.classList.contains("selectedEditor")),super.setParent(e),this.show(this._isVisible),t&&this.select()}#na(e){if(!this.#Xs)return;this.#Qs({highlightOutlines:this.#Ws.getNewOutline(e/2)}),this.fixAndSetPosition();const[t,i]=this.parentDimensions;this.setDims(this.width*t,this.height*i)}#aa(){null!==this.#y&&this.parent&&(this.parent.drawLayer.remove(this.#y),this.#y=null,this.parent.drawLayer.remove(this.#Ks),this.#Ks=null)}#ea(e=this.parent){null===this.#y&&(({id:this.#y,clipPathId:this.#js}=e.drawLayer.draw({bbox:this.#Ws.box,root:{viewBox:"0 0 1 1",fill:this.color,"fill-opacity":this.#Ys},rootClass:{highlight:!0,free:this.#Xs},path:{d:this.#Ws.toSVGPath()}},!1,!0)),this.#Ks=e.drawLayer.drawOutline({rootClass:{highlightOutline:!0,free:this.#Xs},bbox:this.#Vs.box,path:{d:this.#Vs.toSVGPath()}},this.#Xs),this.#$s&&(this.#$s.style.clipPath=this.#js))}static#ia([e,t,i,r],n){switch(n){case 90:return[1-t-r,e,r,i];case 180:return[1-e-i,1-t-r,i,r];case 270:return[t,1-e-i,r,i]}return[e,t,i,r]}rotate(e){const{drawLayer:t}=this.parent;let i;this.#Xs?(e=(e-this.rotation+360)%360,i=Ud.#ia(this.#Ws.box,e)):i=Ud.#ia([this.x,this.y,this.width,this.height],e),t.updateProperties(this.#y,{bbox:i,root:{"data-main-rotation":e}}),t.updateProperties(this.#Ks,{bbox:Ud.#ia(this.#Vs.box,e),root:{"data-main-rotation":e}})}render(){if(this.div)return this.div;const e=super.render();this.#Zs&&(e.setAttribute("aria-label",this.#Zs),e.setAttribute("role","mark")),this.#Xs?e.classList.add("free"):this.div.addEventListener("keydown",this.#oa.bind(this),{signal:this._uiManager._signal});const t=this.#$s=document.createElement("div");e.append(t),t.setAttribute("aria-hidden","true"),t.className="internal",t.style.clipPath=this.#js;const[i,r]=this.parentDimensions;return this.setDims(this.width*i,this.height*r),ql(this,this.#$s,["pointerover","pointerleave"]),this.enableEditing(),e}pointerover(){this.isSelected||this.parent?.drawLayer.updateProperties(this.#Ks,{rootClass:{hovered:!0}})}pointerleave(){this.isSelected||this.parent?.drawLayer.updateProperties(this.#Ks,{rootClass:{hovered:!1}})}#oa(e){Ud._keyboardManager.exec(this,e)}_moveCaret(e){switch(this.parent.unselect(this),e){case 0:case 2:this.#la(!0);break;case 1:case 3:this.#la(!1)}}#la(e){if(!this.#Bs)return;const t=window.getSelection();e?t.setPosition(this.#Bs,this.#Hs):t.setPosition(this.#Us,this.#Gs)}select(){super.select(),this.#Ks&&this.parent?.drawLayer.updateProperties(this.#Ks,{rootClass:{hovered:!1,selected:!0}})}unselect(){super.unselect(),this.#Ks&&(this.parent?.drawLayer.updateProperties(this.#Ks,{rootClass:{selected:!1}}),this.#Xs||this.#la(!1))}get _mustFixPosition(){return!this.#Xs}show(e=this._isVisible){super.show(e),this.parent&&(this.parent.drawLayer.updateProperties(this.#y,{rootClass:{hidden:!e}}),this.parent.drawLayer.updateProperties(this.#Ks,{rootClass:{hidden:!e}}))}#sa(){return this.#Xs?this.rotation:0}#ha(){if(this.#Xs)return null;const[e,t]=this.pageDimensions,[i,r]=this.pageTranslation,n=this.#qs,s=new Float32Array(8*n.length);let a=0;for(const{x:o,y:l,width:h,height:c}of n){const n=o*e+i,d=(1-l)*t+r;s[a]=s[a+4]=n,s[a+1]=s[a+3]=d,s[a+2]=s[a+6]=n+h*e,s[a+5]=s[a+7]=d-c*t,a+=8}return s}#ca(e){return this.#Ws.serialize(e,this.#sa())}static startHighlighting(e,t,{target:i,x:r,y:n}){const{x:s,y:a,width:o,height:l}=i.getBoundingClientRect(),h=new AbortController,c=e.combinedSignal(h),d=t=>{h.abort(),this.#da(e,t)};window.addEventListener("blur",d,{signal:c}),window.addEventListener("pointerup",d,{signal:c}),window.addEventListener("pointerdown",Il,{capture:!0,passive:!1,signal:c}),window.addEventListener("contextmenu",Nl,{signal:c}),i.addEventListener("pointermove",this.#ua.bind(this,e),{signal:c}),this._freeHighlight=new qd({x:r,y:n},[s,a,o,l],e.scale,this._defaultThickness/2,t,.001),({id:this._freeHighlightId,clipPathId:this._freeHighlightClipId}=e.drawLayer.draw({bbox:[0,0,1,1],root:{viewBox:"0 0 1 1",fill:this._defaultColor,"fill-opacity":this._defaultOpacity},rootClass:{highlight:!0,free:!0},path:{d:this._freeHighlight.toSVGPath()}},!0,!0))}static#ua(e,t){this._freeHighlight.add(t)&&e.drawLayer.updateProperties(this._freeHighlightId,{path:{d:this._freeHighlight.toSVGPath()}})}static#da(e,t){this._freeHighlight.isEmpty()?e.drawLayer.remove(this._freeHighlightId):e.createAndAddNewEditor(t,!1,{highlightId:this._freeHighlightId,highlightOutlines:this._freeHighlight.getOutlines(),clipPathId:this._freeHighlightClipId,methodOfCreation:"main_toolbar"}),this._freeHighlightId=-1,this._freeHighlight=null,this._freeHighlightClipId=""}static async deserialize(e,t,i){let r=null;if(e instanceof Md){const{data:{quadPoints:t,rect:i,rotation:n,id:s,color:a,opacity:o,popupRef:l},parent:{page:{pageNumber:h}}}=e;r=e={annotationType:ho.HIGHLIGHT,color:Array.from(a),opacity:o,quadPoints:t,boxes:null,pageIndex:h-1,rect:i.slice(0),rotation:n,id:s,deleted:!1,popupRef:l}}else if(e instanceof Cd){const{data:{inkLists:t,rect:i,rotation:n,id:s,color:a,borderStyle:{rawWidth:o},popupRef:l},parent:{page:{pageNumber:h}}}=e;r=e={annotationType:ho.HIGHLIGHT,color:Array.from(a),thickness:o,inkLists:t,boxes:null,pageIndex:h-1,rect:i.slice(0),rotation:n,id:s,deleted:!1,popupRef:l}}const{color:n,quadPoints:s,inkLists:a,opacity:o}=e,l=await super.deserialize(e,t,i);l.color=ml.makeHexColor(...n),l.#Ys=o||1,a&&(l.#ts=e.thickness),l.annotationElementId=e.id||null,l._initialData=r;const[h,c]=l.pageDimensions,[d,u]=l.pageTranslation;if(s){const e=l.#qs=[];for(let t=0;t<s.length;t+=8)e.push({x:(s[t]-d)/h,y:1-(s[t+1]-u)/c,width:(s[t+2]-s[t])/h,height:(s[t+1]-s[t+5])/c});l.#ta(),l.#ea(),l.rotate(l.rotation)}else if(a){l.#Xs=!0;const e=a[0],i={x:e[0]-d,y:c-(e[1]-u)},r=new qd(i,[0,0,h,c],1,l.#ts/2,!0,.001);for(let t=0,n=e.length;t<n;t+=2)i.x=e[t]-d,i.y=c-(e[t+1]-u),r.add(i);const{id:n,clipPathId:s}=t.drawLayer.draw({bbox:[0,0,1,1],root:{viewBox:"0 0 1 1",fill:l.color,"fill-opacity":l._defaultOpacity},rootClass:{highlight:!0,free:!0},path:{d:r.toSVGPath()}},!0,!0);l.#Qs({highlightOutlines:r.getOutlines(),highlightId:n,clipPathId:s}),l.#ea()}return l}serialize(e=!1){if(this.isEmpty()||e)return null;if(this.deleted)return this.serializeDeleted();const t=this.getRect(0,0),i=Kl._colorManager.convert(this.color),r={annotationType:ho.HIGHLIGHT,color:i,opacity:this.#Ys,thickness:this.#ts,quadPoints:this.#ha(),outlines:this.#ca(t),pageIndex:this.pageIndex,rect:t,rotation:this.#sa(),structTreeParentId:this._structTreeParentId};return this.annotationElementId&&!this.#Vn(r)?null:(r.id=this.annotationElementId,r)}#Vn(e){const{color:t}=this._initialData;return e.color.some(((e,i)=>e!==t[i]))}renderAnnotationElement(e){return e.updateEdited({rect:this.getRect(0,0)}),null}static canCreateNewEmptyEditor(){return!1}}class Gd{#pa=Object.create(null);updateProperty(e,t){this[e]=t,this.updateSVGProperty(e,t)}updateProperties(e){if(e)for(const[t,i]of Object.entries(e))this.updateProperty(t,i)}updateSVGProperty(e,t){this.#pa[e]=t}toSVGProperties(){const e=this.#pa;return this.#pa=Object.create(null),{root:e}}reset(){this.#pa=Object.create(null)}updateAll(e=this){this.updateProperties(e)}clone(){Zo("Not implemented")}}class $d extends Kl{#ma=null;#ga;_drawId=null;static _currentDrawId=-1;static _currentParent=null;static#fa=null;static#ba=null;static#va=null;static#ya=NaN;static#wa=null;static#xa=null;static#Aa=NaN;static _INNER_MARGIN=3;constructor(e){super(e),this.#ga=e.mustBeCommitted||!1,e.drawOutlines&&(this.#ka(e),this.#ea())}#ka({drawOutlines:e,drawId:t,drawingOptions:i}){this.#ma=e,this._drawingOptions||=i,t>=0?(this._drawId=t,this.parent.drawLayer.finalizeDraw(t,e.defaultProperties)):this._drawId=this.#Ea(e,this.parent),this.#Sa(e.box)}#Ea(e,t){const{id:i}=t.drawLayer.draw($d._mergeSVGProperties(this._drawingOptions.toSVGProperties(),e.defaultSVGProperties),!1,!1);return i}static _mergeSVGProperties(e,t){const i=new Set(Object.keys(e));for(const[r,n]of Object.entries(t))i.has(r)?Object.assign(e[r],n):e[r]=n;return e}static getDefaultDrawingOptions(e){Zo("Not implemented")}static get typesMap(){Zo("Not implemented")}static get isDrawer(){return!0}static get supportMultipleDrawings(){return!1}static updateDefaultParams(e,t){const i=this.typesMap.get(e);i&&this._defaultDrawingOptions.updateProperty(i,t),this._currentParent&&($d.#fa.updateProperty(i,t),this._currentParent.drawLayer.updateProperties(this._currentDrawId,this._defaultDrawingOptions.toSVGProperties()))}updateParams(e,t){const i=this.constructor.typesMap.get(e);i&&this._updateProperty(e,i,t)}static get defaultPropertiesToUpdate(){const e=[],t=this._defaultDrawingOptions;for(const[i,r]of this.typesMap)e.push([i,t[r]]);return e}get propertiesToUpdate(){const e=[],{_drawingOptions:t}=this;for(const[i,r]of this.constructor.typesMap)e.push([i,t[r]]);return e}_updateProperty(e,t,i){const r=this._drawingOptions,n=r[t],s=e=>{r.updateProperty(t,e);const i=this.#ma.updateProperty(t,e);i&&this.#Sa(i),this.parent?.drawLayer.updateProperties(this._drawId,r.toSVGProperties())};this.addCommands({cmd:s.bind(this,i),undo:s.bind(this,n),post:this._uiManager.updateUI.bind(this._uiManager,this),mustExec:!0,type:e,overwriteIfSameType:!0,keepUndo:!0})}_onResizing(){this.parent?.drawLayer.updateProperties(this._drawId,$d._mergeSVGProperties(this.#ma.getPathResizingSVGProperties(this.#Ca()),{bbox:this.#Ma()}))}_onResized(){this.parent?.drawLayer.updateProperties(this._drawId,$d._mergeSVGProperties(this.#ma.getPathResizedSVGProperties(this.#Ca()),{bbox:this.#Ma()}))}_onTranslating(e,t){this.parent?.drawLayer.updateProperties(this._drawId,{bbox:this.#Ma(e,t)})}_onTranslated(){this.parent?.drawLayer.updateProperties(this._drawId,$d._mergeSVGProperties(this.#ma.getPathTranslatedSVGProperties(this.#Ca(),this.parentDimensions),{bbox:this.#Ma()}))}_onStartDragging(){this.parent?.drawLayer.updateProperties(this._drawId,{rootClass:{moving:!0}})}_onStopDragging(){this.parent?.drawLayer.updateProperties(this._drawId,{rootClass:{moving:!1}})}commit(){super.commit(),this.disableEditMode(),this.disableEditing()}disableEditing(){super.disableEditing(),this.div.classList.toggle("disabled",!0)}enableEditing(){super.enableEditing(),this.div.classList.toggle("disabled",!1)}getBaseTranslation(){return[0,0]}get isResizable(){return!0}onceAdded(e){this.annotationElementId||this.parent.addUndoableEditor(this),this._isDraggable=!0,this.#ga&&(this.#ga=!1,this.commit(),this.parent.setSelected(this),e&&this.isOnScreen&&this.div.focus())}remove(){this.#aa(),super.remove()}rebuild(){this.parent&&(super.rebuild(),null!==this.div&&(this.#ea(),this.#Sa(this.#ma.box),this.isAttachedToDOM||this.parent.add(this)))}setParent(e){let t=!1;this.parent&&!e?(this._uiManager.removeShouldRescale(this),this.#aa()):e&&(this._uiManager.addShouldRescale(this),this.#ea(e),t=!this.parent&&this.div?.classList.contains("selectedEditor")),super.setParent(e),t&&this.select()}#aa(){null!==this._drawId&&this.parent&&(this.parent.drawLayer.remove(this._drawId),this._drawId=null,this._drawingOptions.reset())}#ea(e=this.parent){null!==this._drawId&&this.parent===e||(null===this._drawId?(this._drawingOptions.updateAll(),this._drawId=this.#Ea(this.#ma,e)):this.parent.drawLayer.updateParent(this._drawId,e.drawLayer))}#_a([e,t,i,r]){const{parentDimensions:[n,s],rotation:a}=this;switch(a){case 90:return[t,1-e,i*(s/n),r*(n/s)];case 180:return[1-e,1-t,i,r];case 270:return[1-t,e,i*(s/n),r*(n/s)];default:return[e,t,i,r]}}#Ca(){const{x:e,y:t,width:i,height:r,parentDimensions:[n,s],rotation:a}=this;switch(a){case 90:return[1-t,e,i*(n/s),r*(s/n)];case 180:return[1-e,1-t,i,r];case 270:return[t,1-e,i*(n/s),r*(s/n)];default:return[e,t,i,r]}}#Sa(e){if([this.x,this.y,this.width,this.height]=this.#_a(e),this.div){this.fixAndSetPosition();const[e,t]=this.parentDimensions;this.setDims(this.width*e,this.height*t)}this._onResized()}#Ma(){const{x:e,y:t,width:i,height:r,rotation:n,parentRotation:s,parentDimensions:[a,o]}=this;switch((4*n+s)/90){case 1:return[1-t-r,e,r,i];case 2:return[1-e-i,1-t-r,i,r];case 3:return[t,1-e-i,r,i];case 4:return[e,t-i*(a/o),r*(o/a),i*(a/o)];case 5:return[1-t,e,i*(a/o),r*(o/a)];case 6:return[1-e-r*(o/a),1-t,r*(o/a),i*(a/o)];case 7:return[t-i*(a/o),1-e-r*(o/a),i*(a/o),r*(o/a)];case 8:return[e-i,t-r,i,r];case 9:return[1-t,e-i,r,i];case 10:return[1-e,1-t,i,r];case 11:return[t-r,1-e,r,i];case 12:return[e-r*(o/a),t,r*(o/a),i*(a/o)];case 13:return[1-t-i*(a/o),e-r*(o/a),i*(a/o),r*(o/a)];case 14:return[1-e,1-t-i*(a/o),r*(o/a),i*(a/o)];case 15:return[t,1-e,i*(a/o),r*(o/a)];default:return[e,t,i,r]}}rotate(){this.parent&&this.parent.drawLayer.updateProperties(this._drawId,$d._mergeSVGProperties({bbox:this.#Ma()},this.#ma.updateRotation((this.parentRotation-this.rotation+360)%360)))}onScaleChanging(){this.parent&&this.#Sa(this.#ma.updateParentDimensions(this.parentDimensions,this.parent.scale))}static onScaleChangingWhenDrawing(){}render(){if(this.div)return this.div;const e=super.render();e.classList.add("draw");const t=document.createElement("div");e.append(t),t.setAttribute("aria-hidden","true"),t.className="internal";const[i,r]=this.parentDimensions;return this.setDims(this.width*i,this.height*r),this._uiManager.addShouldRescale(this),this.disableEditing(),e}static createDrawerInstance(e,t,i,r,n){Zo("Not implemented")}static startDrawing(e,t,i,r){const{target:n,offsetX:s,offsetY:a,pointerId:o,pointerType:l}=r;if($d.#wa&&$d.#wa!==l)return;const{viewport:{rotation:h}}=e,{width:c,height:d}=n.getBoundingClientRect(),u=$d.#ba=new AbortController,p=e.combinedSignal(u);$d.#ya||=o,$d.#wa??=l,window.addEventListener("pointerup",(e=>{$d.#ya===e.pointerId?this._endDraw(e):$d.#xa?.delete(e.pointerId)}),{signal:p}),window.addEventListener("pointercancel",(e=>{$d.#ya===e.pointerId?this._currentParent.endDrawingSession():$d.#xa?.delete(e.pointerId)}),{signal:p}),window.addEventListener("pointerdown",(e=>{$d.#wa===e.pointerType&&(($d.#xa||=new Set).add(e.pointerId),$d.#fa.isCancellable()&&($d.#fa.removeLastElement(),$d.#fa.isEmpty()?this._currentParent.endDrawingSession(!0):this._endDraw(null)))}),{capture:!0,passive:!1,signal:p}),window.addEventListener("contextmenu",Nl,{signal:p}),n.addEventListener("pointermove",this._drawMove.bind(this),{signal:p}),n.addEventListener("touchmove",(e=>{e.timeStamp===$d.#Aa&&Il(e)}),{signal:p}),e.toggleDrawing(),t._editorUndoBar?.hide(),$d.#fa?e.drawLayer.updateProperties(this._currentDrawId,$d.#fa.startNew(s,a,c,d,h)):(t.updateUIForDefaultProperties(this),$d.#fa=this.createDrawerInstance(s,a,c,d,h),$d.#va=this.getDefaultDrawingOptions(),this._currentParent=e,({id:this._currentDrawId}=e.drawLayer.draw(this._mergeSVGProperties($d.#va.toSVGProperties(),$d.#fa.defaultSVGProperties),!0,!1)))}static _drawMove(e){if($d.#Aa=-1,!$d.#fa)return;const{offsetX:t,offsetY:i,pointerId:r}=e;$d.#ya===r&&($d.#xa?.size>=1?this._endDraw(e):(this._currentParent.drawLayer.updateProperties(this._currentDrawId,$d.#fa.add(t,i)),$d.#Aa=e.timeStamp,Il(e)))}static _cleanup(e){e&&(this._currentDrawId=-1,this._currentParent=null,$d.#fa=null,$d.#va=null,$d.#wa=null,$d.#Aa=NaN),$d.#ba&&($d.#ba.abort(),$d.#ba=null,$d.#ya=NaN,$d.#xa=null)}static _endDraw(e){const t=this._currentParent;if(t)if(t.toggleDrawing(!0),this._cleanup(!1),e&&t.drawLayer.updateProperties(this._currentDrawId,$d.#fa.end(e.offsetX,e.offsetY)),this.supportMultipleDrawings){const e=$d.#fa,i=this._currentDrawId,r=e.getLastElement();t.addCommands({cmd:()=>{t.drawLayer.updateProperties(i,e.setLastElement(r))},undo:()=>{t.drawLayer.updateProperties(i,e.removeLastElement())},mustExec:!1,type:co.DRAW_STEP})}else this.endDrawing(!1)}static endDrawing(e){const t=this._currentParent;if(!t)return null;if(t.toggleDrawing(!0),t.cleanUndoStack(co.DRAW_STEP),!$d.#fa.isEmpty()){const{pageDimensions:[i,r],scale:n}=t,s=t.createAndAddNewEditor({offsetX:0,offsetY:0},!1,{drawId:this._currentDrawId,drawOutlines:$d.#fa.getOutlines(i*n,r*n,n,this._INNER_MARGIN),drawingOptions:$d.#va,mustBeCommitted:!e});return this._cleanup(!0),s}return t.drawLayer.remove(this._currentDrawId),this._cleanup(!0),null}createDrawingOptions(e){}static deserializeDraw(e,t,i,r,n,s){Zo("Not implemented")}static async deserialize(e,t,i){const{rawDims:{pageWidth:r,pageHeight:n,pageX:s,pageY:a}}=t.viewport,o=this.deserializeDraw(s,a,r,n,this._INNER_MARGIN,e),l=await super.deserialize(e,t,i);return l.createDrawingOptions(e),l.#ka({drawOutlines:o}),l.#ea(),l.onScaleChanging(),l.rotate(),l}serializeDraw(e){const[t,i]=this.pageTranslation,[r,n]=this.pageDimensions;return this.#ma.serialize([t,i,r,n],e)}renderAnnotationElement(e){return e.updateEdited({rect:this.getRect(0,0)}),null}static canCreateNewEmptyEditor(){return!1}}class Wd{#Yn=new Float64Array(6);#bn;#Ta;#Ri;#ts;#is;#Na="";#Ia=0;#Es=new Xd;#La;#Pa;constructor(e,t,i,r,n,s){this.#La=i,this.#Pa=r,this.#Ri=n,this.#ts=s,[e,t]=this.#Ra(e,t);const a=this.#bn=[NaN,NaN,NaN,NaN,e,t];this.#is=[e,t],this.#Ta=[{line:a,points:this.#is}],this.#Yn.set(a,0)}updateProperty(e,t){"stroke-width"===e&&(this.#ts=t)}#Ra(e,t){return zd._normalizePoint(e,t,this.#La,this.#Pa,this.#Ri)}isEmpty(){return!this.#Ta||0===this.#Ta.length}isCancellable(){return this.#is.length<=10}add(e,t){[e,t]=this.#Ra(e,t);const[i,r,n,s]=this.#Yn.subarray(2,6),a=e-n,o=t-s;return Math.hypot(this.#La*a,this.#Pa*o)<=2?null:(this.#is.push(e,t),isNaN(i)?(this.#Yn.set([n,s,e,t],2),this.#bn.push(NaN,NaN,NaN,NaN,e,t),{path:{d:this.toSVGPath()}}):(isNaN(this.#Yn[0])&&this.#bn.splice(6,6),this.#Yn.set([i,r,n,s,e,t],0),this.#bn.push(...zd.createBezierPoints(i,r,n,s,e,t)),{path:{d:this.toSVGPath()}}))}end(e,t){const i=this.add(e,t);return i||(2===this.#is.length?{path:{d:this.toSVGPath()}}:null)}startNew(e,t,i,r,n){this.#La=i,this.#Pa=r,this.#Ri=n,[e,t]=this.#Ra(e,t);const s=this.#bn=[NaN,NaN,NaN,NaN,e,t];this.#is=[e,t];const a=this.#Ta.at(-1);return a&&(a.line=new Float32Array(a.line),a.points=new Float32Array(a.points)),this.#Ta.push({line:s,points:this.#is}),this.#Yn.set(s,0),this.#Ia=0,this.toSVGPath(),null}getLastElement(){return this.#Ta.at(-1)}setLastElement(e){return this.#Ta?(this.#Ta.push(e),this.#bn=e.line,this.#is=e.points,this.#Ia=0,{path:{d:this.toSVGPath()}}):this.#Es.setLastElement(e)}removeLastElement(){if(!this.#Ta)return this.#Es.removeLastElement();this.#Ta.pop(),this.#Na="";for(let e=0,t=this.#Ta.length;e<t;e++){const{line:t,points:i}=this.#Ta[e];this.#bn=t,this.#is=i,this.#Ia=0,this.toSVGPath()}return{path:{d:this.#Na}}}toSVGPath(){const e=zd.svgRound(this.#bn[4]),t=zd.svgRound(this.#bn[5]);if(2===this.#is.length)return this.#Na=`${this.#Na} M ${e} ${t} Z`,this.#Na;if(this.#is.length<=6){const i=this.#Na.lastIndexOf("M");this.#Na=`${this.#Na.slice(0,i)} M ${e} ${t}`,this.#Ia=6}if(4===this.#is.length){const e=zd.svgRound(this.#bn[10]),t=zd.svgRound(this.#bn[11]);return this.#Na=`${this.#Na} L ${e} ${t}`,this.#Ia=12,this.#Na}const i=[];0===this.#Ia&&(i.push(`M ${e} ${t}`),this.#Ia=6);for(let e=this.#Ia,t=this.#bn.length;e<t;e+=6){const[t,r,n,s,a,o]=this.#bn.slice(e,e+6).map(zd.svgRound);i.push(`C${t} ${r} ${n} ${s} ${a} ${o}`)}return this.#Na+=i.join(" "),this.#Ia=this.#bn.length,this.#Na}getOutlines(e,t,i,r){const n=this.#Ta.at(-1);return n.line=new Float32Array(n.line),n.points=new Float32Array(n.points),this.#Es.build(this.#Ta,e,t,i,this.#Ri,this.#ts,r),this.#Yn=null,this.#bn=null,this.#Ta=null,this.#Na=null,this.#Es}get defaultSVGProperties(){return{root:{viewBox:"0 0 10000 10000"},rootClass:{draw:!0},bbox:[0,0,1,1]}}}class Xd extends zd{#ps;#Da=0;#$n;#Ta;#La;#Pa;#za;#Ri;#ts;build(e,t,i,r,n,s,a){this.#La=t,this.#Pa=i,this.#za=r,this.#Ri=n,this.#ts=s,this.#$n=a??0,this.#Ta=e,this.#Fa()}setLastElement(e){return this.#Ta.push(e),{path:{d:this.toSVGPath()}}}removeLastElement(){return this.#Ta.pop(),{path:{d:this.toSVGPath()}}}toSVGPath(){const e=[];for(const{line:t}of this.#Ta)if(e.push(`M${zd.svgRound(t[4])} ${zd.svgRound(t[5])}`),6!==t.length)if(12!==t.length)for(let i=6,r=t.length;i<r;i+=6){const[r,n,s,a,o,l]=t.subarray(i,i+6).map(zd.svgRound);e.push(`C${r} ${n} ${s} ${a} ${o} ${l}`)}else e.push(`L${zd.svgRound(t[10])} ${zd.svgRound(t[11])}`);else e.push("Z");return e.join("")}serialize([e,t,i,r],n){const s=[],a=[],[o,l,h,c]=this.#Oa();let d,u,p,m,g,f,b,v,y;switch(this.#Ri){case 0:y=zd._rescale,d=e,u=t+r,p=i,m=-r,g=e+o*i,f=t+(1-l-c)*r,b=e+(o+h)*i,v=t+(1-l)*r;break;case 90:y=zd._rescaleAndSwap,d=e,u=t,p=i,m=r,g=e+l*i,f=t+o*r,b=e+(l+c)*i,v=t+(o+h)*r;break;case 180:y=zd._rescale,d=e+i,u=t,p=-i,m=r,g=e+(1-o-h)*i,f=t+l*r,b=e+(1-o)*i,v=t+(l+c)*r;break;case 270:y=zd._rescaleAndSwap,d=e+i,u=t+r,p=-i,m=-r,g=e+(1-l-c)*i,f=t+(1-o-h)*r,b=e+(1-l)*i,v=t+(1-o)*r}for(const{line:e,points:t}of this.#Ta)s.push(y(e,d,u,p,m,n?new Array(e.length):null)),a.push(y(t,d,u,p,m,n?new Array(t.length):null));return{lines:s,points:a,rect:[g,f,b,v]}}static deserialize(e,t,i,r,n,{paths:{lines:s,points:a},rotation:o,thickness:l}){const h=[];let c,d,u,p,m;switch(o){case 0:m=zd._rescale,c=-e/i,d=t/r+1,u=1/i,p=-1/r;break;case 90:m=zd._rescaleAndSwap,c=-t/r,d=-e/i,u=1/r,p=1/i;break;case 180:m=zd._rescale,c=e/i+1,d=-t/r,u=-1/i,p=1/r;break;case 270:m=zd._rescaleAndSwap,c=t/r+1,d=e/i+1,u=-1/r,p=-1/i}if(!s){s=[];for(const e of a){const t=e.length;if(2===t){s.push(new Float32Array([NaN,NaN,NaN,NaN,e[0],e[1]]));continue}if(4===t){s.push(new Float32Array([NaN,NaN,NaN,NaN,e[0],e[1],NaN,NaN,NaN,NaN,e[2],e[3]]));continue}const i=new Float32Array(3*(t-2));s.push(i);let[r,n,a,o]=e.subarray(0,4);i.set([NaN,NaN,NaN,NaN,r,n],0);for(let s=4;s<t;s+=2){const t=e[s],l=e[s+1];i.set(zd.createBezierPoints(r,n,a,o,t,l),3*(s-2)),[r,n,a,o]=[a,o,t,l]}}}for(let e=0,t=s.length;e<t;e++)h.push({line:m(s[e].map((e=>e??NaN)),c,d,u,p),points:m(a[e].map((e=>e??NaN)),c,d,u,p)});const g=new Xd;return g.build(h,i,r,1,o,l,n),g}#Ba(e=this.#ts){const t=this.#$n+e/2*this.#za;return this.#Ri%180==0?[t/this.#La,t/this.#Pa]:[t/this.#Pa,t/this.#La]}#Oa(){const[e,t,i,r]=this.#ps,[n,s]=this.#Ba(0);return[e+n,t+s,i-2*n,r-2*s]}#Fa(){const e=this.#ps=new Float32Array([1/0,1/0,-1/0,-1/0]);for(const{line:t}of this.#Ta){if(t.length<=12){for(let i=4,r=t.length;i<r;i+=6){const[r,n]=t.subarray(i,i+2);e[0]=Math.min(e[0],r),e[1]=Math.min(e[1],n),e[2]=Math.max(e[2],r),e[3]=Math.max(e[3],n)}continue}let i=t[4],r=t[5];for(let n=6,s=t.length;n<s;n+=6){const[s,a,o,l,h,c]=t.subarray(n,n+6);ml.bezierBoundingBox(i,r,s,a,o,l,h,c,e),i=h,r=c}}const[t,i]=this.#Ba();e[0]=Math.min(1,Math.max(0,e[0]-t)),e[1]=Math.min(1,Math.max(0,e[1]-i)),e[2]=Math.min(1,Math.max(0,e[2]+t)),e[3]=Math.min(1,Math.max(0,e[3]+i)),e[2]-=e[0],e[3]-=e[1]}get box(){return this.#ps}updateProperty(e,t){return"stroke-width"===e?this.#ra(t):null}#ra(e){const[t,i]=this.#Ba();this.#ts=e;const[r,n]=this.#Ba(),[s,a]=[r-t,n-i],o=this.#ps;return o[0]-=s,o[1]-=a,o[2]+=2*s,o[3]+=2*a,o}updateParentDimensions([e,t],i){const[r,n]=this.#Ba();this.#La=e,this.#Pa=t,this.#za=i;const[s,a]=this.#Ba(),o=s-r,l=a-n,h=this.#ps;return h[0]-=o,h[1]-=l,h[2]+=2*o,h[3]+=2*l,h}updateRotation(e){return this.#Da=e,{path:{transform:this.rotationTransform}}}get viewBox(){return this.#ps.map(zd.svgRound).join(" ")}get defaultProperties(){const[e,t]=this.#ps;return{root:{viewBox:this.viewBox},path:{"transform-origin":`${zd.svgRound(e)} ${zd.svgRound(t)}`}}}get rotationTransform(){const[,,e,t]=this.#ps;let i=0,r=0,n=0,s=0,a=0,o=0;switch(this.#Da){case 90:r=t/e,n=-e/t,a=e;break;case 180:i=-1,s=-1,a=e,o=t;break;case 270:r=-t/e,n=e/t,o=t;break;default:return""}return`matrix(${i} ${r} ${n} ${s} ${zd.svgRound(a)} ${zd.svgRound(o)})`}getPathResizingSVGProperties([e,t,i,r]){const[n,s]=this.#Ba(),[a,o,l,h]=this.#ps;if(Math.abs(l-n)<=zd.PRECISION||Math.abs(h-s)<=zd.PRECISION){const n=e+i/2-(a+l/2),s=t+r/2-(o+h/2);return{path:{"transform-origin":`${zd.svgRound(e)} ${zd.svgRound(t)}`,transform:`${this.rotationTransform} translate(${n} ${s})`}}}const c=(i-2*n)/(l-2*n),d=(r-2*s)/(h-2*s),u=l/i,p=h/r;return{path:{"transform-origin":`${zd.svgRound(a)} ${zd.svgRound(o)}`,transform:`${this.rotationTransform} scale(${u} ${p}) translate(${zd.svgRound(n)} ${zd.svgRound(s)}) scale(${c} ${d}) translate(${zd.svgRound(-n)} ${zd.svgRound(-s)})`}}}getPathResizedSVGProperties([e,t,i,r]){const[n,s]=this.#Ba(),a=this.#ps,[o,l,h,c]=a;if(a[0]=e,a[1]=t,a[2]=i,a[3]=r,Math.abs(h-n)<=zd.PRECISION||Math.abs(c-s)<=zd.PRECISION){const n=e+i/2-(o+h/2),s=t+r/2-(l+c/2);for(const{line:e,points:t}of this.#Ta)zd._translate(e,n,s,e),zd._translate(t,n,s,t);return{root:{viewBox:this.viewBox},path:{"transform-origin":`${zd.svgRound(e)} ${zd.svgRound(t)}`,transform:this.rotationTransform||null,d:this.toSVGPath()}}}const d=(i-2*n)/(h-2*n),u=(r-2*s)/(c-2*s),p=-d*(o+n)+e+n,m=-u*(l+s)+t+s;if(1!==d||1!==u||0!==p||0!==m)for(const{line:e,points:t}of this.#Ta)zd._rescale(e,p,m,d,u,e),zd._rescale(t,p,m,d,u,t);return{root:{viewBox:this.viewBox},path:{"transform-origin":`${zd.svgRound(e)} ${zd.svgRound(t)}`,transform:this.rotationTransform||null,d:this.toSVGPath()}}}getPathTranslatedSVGProperties([e,t],i){const[r,n]=i,s=this.#ps,a=e-s[0],o=t-s[1];if(this.#La===r&&this.#Pa===n)for(const{line:e,points:t}of this.#Ta)zd._translate(e,a,o,e),zd._translate(t,a,o,t);else{const e=this.#La/r,t=this.#Pa/n;this.#La=r,this.#Pa=n;for(const{line:i,points:r}of this.#Ta)zd._rescale(i,a,o,e,t,i),zd._rescale(r,a,o,e,t,r);s[2]*=e,s[3]*=t}return s[0]=e,s[1]=t,{root:{viewBox:this.viewBox},path:{d:this.toSVGPath(),"transform-origin":`${zd.svgRound(e)} ${zd.svgRound(t)}`}}}get defaultSVGProperties(){const e=this.#ps;return{root:{viewBox:this.viewBox},rootClass:{draw:!0},path:{d:this.toSVGPath(),"transform-origin":`${zd.svgRound(e[0])} ${zd.svgRound(e[1])}`,transform:this.rotationTransform||null},bbox:e}}}class Yd extends Gd{#Ha;constructor(e){super(),this.#Ha=e,super.updateProperties({fill:"none",stroke:Kl._defaultLineColor,"stroke-opacity":1,"stroke-width":1,"stroke-linecap":"round","stroke-linejoin":"round","stroke-miterlimit":10})}updateSVGProperty(e,t){"stroke-width"===e&&(t??=this["stroke-width"],t*=this.#Ha.realScale),super.updateSVGProperty(e,t)}clone(){const e=new Yd(this.#Ha);return e.updateAll(this),e}}class Kd extends $d{static _type="ink";static _editorType=ho.INK;static _defaultDrawingOptions=null;constructor(e){super({...e,name:"inkEditor"}),this._willKeepAspectRatio=!0}static initialize(e,t){Kl.initialize(e,t),this._defaultDrawingOptions=new Yd(t.viewParameters)}static getDefaultDrawingOptions(e){const t=this._defaultDrawingOptions.clone();return t.updateProperties(e),t}static get supportMultipleDrawings(){return!0}static get typesMap(){return el(this,"typesMap",new Map([[co.INK_THICKNESS,"stroke-width"],[co.INK_COLOR,"stroke"],[co.INK_OPACITY,"stroke-opacity"]]))}static createDrawerInstance(e,t,i,r,n){return new Wd(e,t,i,r,n,this._defaultDrawingOptions["stroke-width"])}static deserializeDraw(e,t,i,r,n,s){return Xd.deserialize(e,t,i,r,n,s)}static async deserialize(e,t,i){let r=null;if(e instanceof Cd){const{data:{inkLists:t,rect:i,rotation:n,id:s,color:a,opacity:o,borderStyle:{rawWidth:l},popupRef:h},parent:{page:{pageNumber:c}}}=e;r=e={annotationType:ho.INK,color:Array.from(a),thickness:l,opacity:o,paths:{points:t},boxes:null,pageIndex:c-1,rect:i.slice(0),rotation:n,id:s,deleted:!1,popupRef:h}}const n=await super.deserialize(e,t,i);return n.annotationElementId=e.id||null,n._initialData=r,n}onScaleChanging(){if(!this.parent)return;super.onScaleChanging();const{_drawId:e,_drawingOptions:t,parent:i}=this;t.updateSVGProperty("stroke-width"),i.drawLayer.updateProperties(e,t.toSVGProperties())}static onScaleChangingWhenDrawing(){const e=this._currentParent;e&&(super.onScaleChangingWhenDrawing(),this._defaultDrawingOptions.updateSVGProperty("stroke-width"),e.drawLayer.updateProperties(this._currentDrawId,this._defaultDrawingOptions.toSVGProperties()))}createDrawingOptions({color:e,thickness:t,opacity:i}){this._drawingOptions=Kd.getDefaultDrawingOptions({stroke:ml.makeHexColor(...e),"stroke-width":t,"stroke-opacity":i})}serialize(e=!1){if(this.isEmpty())return null;if(this.deleted)return this.serializeDeleted();const{lines:t,points:i,rect:r}=this.serializeDraw(e),{_drawingOptions:{stroke:n,"stroke-opacity":s,"stroke-width":a}}=this,o={annotationType:ho.INK,color:Kl._colorManager.convert(n),opacity:s,thickness:a,paths:{lines:t,points:i},pageIndex:this.pageIndex,rect:r,rotation:this.rotation,structTreeParentId:this._structTreeParentId};return e?o:this.annotationElementId&&!this.#Vn(o)?null:(o.id=this.annotationElementId,o)}#Vn(e){const{color:t,thickness:i,opacity:r,pageIndex:n}=this._initialData;return this._hasBeenMoved||this._hasBeenResized||e.color.some(((e,i)=>e!==t[i]))||e.thickness!==i||e.opacity!==r||e.pageIndex!==n}renderAnnotationElement(e){const{points:t,rect:i}=this.serializeDraw(!1);return e.updateEdited({rect:i,thickness:this._drawingOptions["stroke-width"],points:t}),null}}class Zd extends Kl{#qa=null;#ja=null;#Va=null;#Ua=null;#Ga=null;#$a="";#Wa=null;#Xa=null;#Ya=!1;#Ka=!1;static _type="stamp";static _editorType=ho.STAMP;constructor(e){super({...e,name:"stampEditor"}),this.#Ua=e.bitmapUrl,this.#Ga=e.bitmapFile}static initialize(e,t){Kl.initialize(e,t)}static get supportedTypes(){return el(this,"supportedTypes",["apng","avif","bmp","gif","jpeg","png","svg+xml","webp","x-icon"].map((e=>`image/${e}`)))}static get supportedTypesStr(){return el(this,"supportedTypesStr",this.supportedTypes.join(","))}static isHandlingMimeForPasting(e){return this.supportedTypes.includes(e)}static paste(e,t){t.pasteEditor(ho.STAMP,{bitmapFile:e.getAsFile()})}altTextFinish(){this._uiManager.useNewAltTextFlow&&(this.div.hidden=!1),super.altTextFinish()}get telemetryFinalData(){return{type:"stamp",hasAltText:!!this.altTextData?.altText}}static computeTelemetryFinalData(e){const t=e.get("hasAltText");return{hasAltText:t.get(!0)??0,hasNoAltText:t.get(!1)??0}}#Za(e,t=!1){e?(this.#qa=e.bitmap,t||(this.#ja=e.id,this.#Ya=e.isSvg),e.file&&(this.#$a=e.file.name),this.#Ja()):this.remove()}#Qa(){if(this.#Va=null,this._uiManager.enableWaiting(!1),this.#Wa){if(this._uiManager.useNewAltTextWhenAddingImage&&this._uiManager.useNewAltTextFlow&&this.#qa)return this._editToolbar.hide(),void this._uiManager.editAltText(this,!0);if(!this._uiManager.useNewAltTextWhenAddingImage&&this._uiManager.useNewAltTextFlow&&this.#qa){this._reportTelemetry({action:"pdfjs.image.image_added",data:{alt_text_modal:!1,alt_text_type:"empty"}});try{this.mlGuessAltText()}catch{}}this.div.focus()}}async mlGuessAltText(e=null,t=!0){if(this.hasAltTextData())return null;const{mlManager:i}=this._uiManager;if(!i)throw new Error("No ML.");if(!await i.isEnabledFor("altText"))throw new Error("ML isn't enabled for alt text.");const{data:r,width:n,height:s}=e||this.copyCanvas(null,null,!0).imageData,a=await i.guess({name:"altText",request:{data:r,width:n,height:s,channels:r.length/(n*s)}});if(!a)throw new Error("No response from the AI service.");if(a.error)throw new Error("Error from the AI service.");if(a.cancel)return null;if(!a.output)throw new Error("No valid response from the AI service.");const o=a.output;return await this.setGuessedAltText(o),t&&!this.hasAltTextData()&&(this.altTextData={alt:o,decorative:!1}),o}#eo(){if(this.#ja)return this._uiManager.enableWaiting(!0),void this._uiManager.imageManager.getFromId(this.#ja).then((e=>this.#Za(e,!0))).finally((()=>this.#Qa()));if(this.#Ua){const e=this.#Ua;return this.#Ua=null,this._uiManager.enableWaiting(!0),void(this.#Va=this._uiManager.imageManager.getFromUrl(e).then((e=>this.#Za(e))).finally((()=>this.#Qa())))}if(this.#Ga){const e=this.#Ga;return this.#Ga=null,this._uiManager.enableWaiting(!0),void(this.#Va=this._uiManager.imageManager.getFromFile(e).then((e=>this.#Za(e))).finally((()=>this.#Qa())))}const e=document.createElement("input");e.type="file",e.accept=Zd.supportedTypesStr;const t=this._uiManager._signal;this.#Va=new Promise((i=>{e.addEventListener("change",(async()=>{if(e.files&&0!==e.files.length){this._uiManager.enableWaiting(!0);const t=await this._uiManager.imageManager.getFromFile(e.files[0]);this._reportTelemetry({action:"pdfjs.image.image_selected",data:{alt_text_modal:this._uiManager.useNewAltTextFlow}}),this.#Za(t)}else this.remove();i()}),{signal:t}),e.addEventListener("cancel",(()=>{this.remove(),i()}),{signal:t})})).finally((()=>this.#Qa())),e.click()}remove(){this.#ja&&(this.#qa=null,this._uiManager.imageManager.deleteId(this.#ja),this.#Wa?.remove(),this.#Wa=null,this.#Xa&&(clearTimeout(this.#Xa),this.#Xa=null)),super.remove()}rebuild(){this.parent?(super.rebuild(),null!==this.div&&(this.#ja&&null===this.#Wa&&this.#eo(),this.isAttachedToDOM||this.parent.add(this))):this.#ja&&this.#eo()}onceAdded(e){this._isDraggable=!0,e&&this.div.focus()}isEmpty(){return!(this.#Va||this.#qa||this.#Ua||this.#Ga||this.#ja)}get isResizable(){return!0}render(){if(this.div)return this.div;let e,t;if(this.width&&(e=this.x,t=this.y),super.render(),this.div.hidden=!0,this.div.setAttribute("role","figure"),this.addAltTextButton(),this.#qa?this.#Ja():this.#eo(),this.width&&!this.annotationElementId){const[i,r]=this.parentDimensions;this.setAt(e*i,t*r,this.width*i,this.height*r)}return this._uiManager.addShouldRescale(this),this.div}_onResized(){this.onScaleChanging()}onScaleChanging(){if(!this.parent)return;null!==this.#Xa&&clearTimeout(this.#Xa);this.#Xa=setTimeout((()=>{this.#Xa=null,this.#to()}),200)}#Ja(){const{div:e}=this;let{width:t,height:i}=this.#qa;const[r,n]=this.pageDimensions,s=.75;if(this.width)t=this.width*r,i=this.height*n;else if(t>s*r||i>s*n){const e=Math.min(s*r/t,s*n/i);t*=e,i*=e}const[a,o]=this.parentDimensions;this.setDims(t*a/r,i*o/n),this._uiManager.enableWaiting(!1);const l=this.#Wa=document.createElement("canvas");l.setAttribute("role","img"),this.addContainer(l),this.width=t/r,this.height=i/n,this._initialOptions?.isCentered?this.center():this.fixAndSetPosition(),this._initialOptions=null,this._uiManager.useNewAltTextWhenAddingImage&&this._uiManager.useNewAltTextFlow&&!this.annotationElementId||(e.hidden=!1),this.#to(),this.#Ka||(this.parent.addUndoableEditor(this),this.#Ka=!0),this._reportTelemetry({action:"inserted_image"}),this.#$a&&l.setAttribute("aria-label",this.#$a)}copyCanvas(e,t,i=!1){e||(e=224);const{width:r,height:n}=this.#qa,s=new Ol;let a=this.#qa,o=r,l=n,h=null;if(t){if(r>t||n>t){const e=Math.min(t/r,t/n);o=Math.floor(r*e),l=Math.floor(n*e)}h=document.createElement("canvas");const e=h.width=Math.ceil(o*s.sx),i=h.height=Math.ceil(l*s.sy);this.#Ya||(a=this.#io(e,i));const c=h.getContext("2d");c.filter=this._uiManager.hcmFilter;let d="white",u="#cfcfd8";"none"!==this._uiManager.hcmFilter?u="black":window.matchMedia?.("(prefers-color-scheme: dark)").matches&&(d="#8f8f9d",u="#42414d");const p=15,m=p*s.sx,g=p*s.sy,f=new OffscreenCanvas(2*m,2*g),b=f.getContext("2d");b.fillStyle=d,b.fillRect(0,0,2*m,2*g),b.fillStyle=u,b.fillRect(0,0,m,g),b.fillRect(m,g,m,g),c.fillStyle=c.createPattern(f,"repeat"),c.fillRect(0,0,e,i),c.drawImage(a,0,0,a.width,a.height,0,0,e,i)}let c=null;if(i){let t,i;if(s.symmetric&&a.width<e&&a.height<e)t=a.width,i=a.height;else if(a=this.#qa,r>e||n>e){const s=Math.min(e/r,e/n);t=Math.floor(r*s),i=Math.floor(n*s),this.#Ya||(a=this.#io(t,i))}const o=new OffscreenCanvas(t,i).getContext("2d",{willReadFrequently:!0});o.drawImage(a,0,0,a.width,a.height,0,0,t,i),c={width:t,height:i,data:o.getImageData(0,0,t,i).data}}return{canvas:h,width:o,height:l,imageData:c}}#io(e,t){const{width:i,height:r}=this.#qa;let n=i,s=r,a=this.#qa;for(;n>2*e||s>2*t;){const i=n,r=s;n>2*e&&(n=n>=16384?Math.floor(n/2)-1:Math.ceil(n/2)),s>2*t&&(s=s>=16384?Math.floor(s/2)-1:Math.ceil(s/2));const o=new OffscreenCanvas(n,s);o.getContext("2d").drawImage(a,0,0,i,r,0,0,n,s),a=o.transferToImageBitmap()}return a}#to(){const[e,t]=this.parentDimensions,{width:i,height:r}=this,n=new Ol,s=Math.ceil(i*e*n.sx),a=Math.ceil(r*t*n.sy),o=this.#Wa;if(!o||o.width===s&&o.height===a)return;o.width=s,o.height=a;const l=this.#Ya?this.#qa:this.#io(s,a),h=o.getContext("2d");h.filter=this._uiManager.hcmFilter,h.drawImage(l,0,0,l.width,l.height,0,0,s,a)}getImageForAltText(){return this.#Wa}#ro(e){if(e){if(this.#Ya){const e=this._uiManager.imageManager.getSvgUrl(this.#ja);if(e)return e}const e=document.createElement("canvas");({width:e.width,height:e.height}=this.#qa);return e.getContext("2d").drawImage(this.#qa,0,0),e.toDataURL()}if(this.#Ya){const[e,t]=this.pageDimensions,i=Math.round(this.width*e*wl.PDF_TO_CSS_UNITS),r=Math.round(this.height*t*wl.PDF_TO_CSS_UNITS),n=new OffscreenCanvas(i,r);return n.getContext("2d").drawImage(this.#qa,0,0,this.#qa.width,this.#qa.height,0,0,i,r),n.transferToImageBitmap()}return structuredClone(this.#qa)}static async deserialize(e,t,i){let r=null;if(e instanceof Id){const{data:{rect:n,rotation:s,id:a,structParent:o,popupRef:l},container:h,parent:{page:{pageNumber:c}}}=e,d=h.querySelector("canvas"),u=i.imageManager.getFromCanvas(h.id,d);d.remove();const p=(await t._structTree.getAriaAttributes(`${vl}${a}`))?.get("aria-label")||"";r=e={annotationType:ho.STAMP,bitmapId:u.id,bitmap:u.bitmap,pageIndex:c-1,rect:n.slice(0),rotation:s,id:a,deleted:!1,accessibilityData:{decorative:!1,altText:p},isSvg:!1,structParent:o,popupRef:l}}const n=await super.deserialize(e,t,i),{rect:s,bitmap:a,bitmapUrl:o,bitmapId:l,isSvg:h,accessibilityData:c}=e;l&&i.imageManager.isValidId(l)?(n.#ja=l,a&&(n.#qa=a)):n.#Ua=o,n.#Ya=h;const[d,u]=n.pageDimensions;return n.width=(s[2]-s[0])/d,n.height=(s[3]-s[1])/u,n.annotationElementId=e.id||null,c&&(n.altTextData=c),n._initialData=r,n.#Ka=!!r,n}serialize(e=!1,t=null){if(this.isEmpty())return null;if(this.deleted)return this.serializeDeleted();const i={annotationType:ho.STAMP,bitmapId:this.#ja,pageIndex:this.pageIndex,rect:this.getRect(0,0),rotation:this.rotation,isSvg:this.#Ya,structTreeParentId:this._structTreeParentId};if(e)return i.bitmapUrl=this.#ro(!0),i.accessibilityData=this.serializeAltText(!0),i;const{decorative:r,altText:n}=this.serializeAltText(!1);if(!r&&n&&(i.accessibilityData={type:"Figure",alt:n}),this.annotationElementId){const e=this.#Vn(i);if(e.isSame)return null;e.isSameAltText?delete i.accessibilityData:i.accessibilityData.structParent=this._initialData.structParent??-1}if(i.id=this.annotationElementId,null===t)return i;t.stamps||=new Map;const s=this.#Ya?(i.rect[2]-i.rect[0])*(i.rect[3]-i.rect[1]):null;if(t.stamps.has(this.#ja)){if(this.#Ya){const e=t.stamps.get(this.#ja);s>e.area&&(e.area=s,e.serialized.bitmap.close(),e.serialized.bitmap=this.#ro(!1))}}else t.stamps.set(this.#ja,{area:s,serialized:i}),i.bitmap=this.#ro(!1);return i}#Vn(e){const{pageIndex:t,accessibilityData:{altText:i}}=this._initialData,r=e.pageIndex===t,n=(e.accessibilityData?.alt||"")===i;return{isSame:!this._hasBeenMoved&&!this._hasBeenResized&&r&&n,isSameAltText:n}}renderAnnotationElement(e){return e.updateEdited({rect:this.getRect(0,0)}),null}}class Jd{#Cn;#no=!1;#so=null;#ao=null;#oo=null;#lo=new Map;#ho=!1;#co=!1;#do=!1;#uo=null;#po=null;#mo=null;#go=null;#g;static _initialized=!1;static#q=new Map([Dd,Kd,Zd,Ud].map((e=>[e._editorType,e])));constructor({uiManager:e,pageIndex:t,div:i,structTreeLayer:r,accessibilityManager:n,annotationLayer:s,drawLayer:a,textLayer:o,viewport:l,l10n:h}){const c=[...Jd.#q.values()];if(!Jd._initialized){Jd._initialized=!0;for(const t of c)t.initialize(h,e)}e.registerEditorTypes(c),this.#g=e,this.pageIndex=t,this.div=i,this.#Cn=n,this.#so=s,this.viewport=l,this.#mo=o,this.drawLayer=a,this._structTree=r,this.#g.addLayer(this)}get isEmpty(){return 0===this.#lo.size}get isInvisible(){return this.isEmpty&&this.#g.getMode()===ho.NONE}updateToolbar(e){this.#g.updateToolbar(e)}updateMode(e=this.#g.getMode()){switch(this.#fo(),e){case ho.NONE:return this.disableTextSelection(),this.togglePointerEvents(!1),this.toggleAnnotationLayerPointerEvents(!0),void this.disableClick();case ho.INK:this.disableTextSelection(),this.togglePointerEvents(!0),this.enableClick();break;case ho.HIGHLIGHT:this.enableTextSelection(),this.togglePointerEvents(!1),this.disableClick();break;default:this.disableTextSelection(),this.togglePointerEvents(!0),this.enableClick()}this.toggleAnnotationLayerPointerEvents(!1);const{classList:t}=this.div;for(const i of Jd.#q.values())t.toggle(`${i._type}Editing`,e===i._editorType);this.div.hidden=!1}hasTextLayer(e){return e===this.#mo?.div}setEditingState(e){this.#g.setEditingState(e)}addCommands(e){this.#g.addCommands(e)}cleanUndoStack(e){this.#g.cleanUndoStack(e)}toggleDrawing(e=!1){this.div.classList.toggle("drawing",!e)}togglePointerEvents(e=!1){this.div.classList.toggle("disabled",!e)}toggleAnnotationLayerPointerEvents(e=!1){this.#so?.div.classList.toggle("disabled",!e)}async enable(){this.#do=!0,this.div.tabIndex=0,this.togglePointerEvents(!0);const e=new Set;for(const t of this.#lo.values())t.enableEditing(),t.show(!0),t.annotationElementId&&(this.#g.removeChangedExistingAnnotation(t),e.add(t.annotationElementId));if(!this.#so)return void(this.#do=!1);const t=this.#so.getEditableAnnotations();for(const i of t){if(i.hide(),this.#g.isDeletedAnnotationElement(i.data.id))continue;if(e.has(i.data.id))continue;const t=await this.deserialize(i);t&&(this.addOrRebuild(t),t.enableEditing())}this.#do=!1}disable(){this.#co=!0,this.div.tabIndex=-1,this.togglePointerEvents(!1);const e=new Map,t=new Map;for(const i of this.#lo.values())i.disableEditing(),i.annotationElementId&&(null===i.serialize()?(t.set(i.annotationElementId,i),this.getEditableAnnotation(i.annotationElementId)?.show(),i.remove()):e.set(i.annotationElementId,i));if(this.#so){const i=this.#so.getEditableAnnotations();for(const r of i){const{id:i}=r.data;if(this.#g.isDeletedAnnotationElement(i))continue;let n=t.get(i);n?(n.resetAnnotationElement(r),n.show(!1),r.show()):(n=e.get(i),n&&(this.#g.addChangedExistingAnnotation(n),n.renderAnnotationElement(r)&&n.show(!1)),r.show())}}this.#fo(),this.isEmpty&&(this.div.hidden=!0);const{classList:i}=this.div;for(const e of Jd.#q.values())i.remove(`${e._type}Editing`);this.disableTextSelection(),this.toggleAnnotationLayerPointerEvents(!0),this.#co=!1}getEditableAnnotation(e){return this.#so?.getEditableAnnotation(e)||null}setActiveEditor(e){this.#g.getActive()!==e&&this.#g.setActiveEditor(e)}enableTextSelection(){if(this.div.tabIndex=-1,this.#mo?.div&&!this.#go){this.#go=new AbortController;const e=this.#g.combinedSignal(this.#go);this.#mo.div.addEventListener("pointerdown",this.#bo.bind(this),{signal:e}),this.#mo.div.classList.add("highlighting")}}disableTextSelection(){this.div.tabIndex=0,this.#mo?.div&&this.#go&&(this.#go.abort(),this.#go=null,this.#mo.div.classList.remove("highlighting"))}#bo(e){this.#g.unselectAll();const{target:t}=e;if(t===this.#mo.div||("img"===t.getAttribute("role")||t.classList.contains("endOfContent"))&&this.#mo.div.contains(t)){const{isMac:t}=ul.platform;if(0!==e.button||e.ctrlKey&&t)return;this.#g.showAllEditors("highlight",!0,!0),this.#mo.div.classList.add("free"),this.toggleDrawing(),Ud.startHighlighting(this,"ltr"===this.#g.direction,{target:this.#mo.div,x:e.x,y:e.y}),this.#mo.div.addEventListener("pointerup",(()=>{this.#mo.div.classList.remove("free"),this.toggleDrawing(!0)}),{once:!0,signal:this.#g._signal}),e.preventDefault()}}enableClick(){if(this.#ao)return;this.#ao=new AbortController;const e=this.#g.combinedSignal(this.#ao);this.div.addEventListener("pointerdown",this.pointerdown.bind(this),{signal:e});const t=this.pointerup.bind(this);this.div.addEventListener("pointerup",t,{signal:e}),this.div.addEventListener("pointercancel",t,{signal:e})}disableClick(){this.#ao?.abort(),this.#ao=null}attach(e){this.#lo.set(e.id,e);const{annotationElementId:t}=e;t&&this.#g.isDeletedAnnotationElement(t)&&this.#g.removeDeletedAnnotationElement(e)}detach(e){this.#lo.delete(e.id),this.#Cn?.removePointerInTextLayer(e.contentDiv),!this.#co&&e.annotationElementId&&this.#g.addDeletedAnnotationElement(e)}remove(e){this.detach(e),this.#g.removeEditor(e),e.div.remove(),e.isAttachedToDOM=!1}changeParent(e){e.parent!==this&&(e.parent&&e.annotationElementId&&(this.#g.addDeletedAnnotationElement(e.annotationElementId),Kl.deleteAnnotationElement(e),e.annotationElementId=null),this.attach(e),e.parent?.detach(e),e.setParent(this),e.div&&e.isAttachedToDOM&&(e.div.remove(),this.div.append(e.div)))}add(e){if(e.parent!==this||!e.isAttachedToDOM){if(this.changeParent(e),this.#g.addEditor(e),this.attach(e),!e.isAttachedToDOM){const t=e.render();this.div.append(t),e.isAttachedToDOM=!0}e.fixAndSetPosition(),e.onceAdded(!this.#do),this.#g.addToAnnotationStorage(e),e._reportTelemetry(e.telemetryInitialData)}}moveEditorInDOM(e){if(!e.isAttachedToDOM)return;const{activeElement:t}=document;e.div.contains(t)&&!this.#oo&&(e._focusEventsAllowed=!1,this.#oo=setTimeout((()=>{this.#oo=null,e.div.contains(document.activeElement)?e._focusEventsAllowed=!0:(e.div.addEventListener("focusin",(()=>{e._focusEventsAllowed=!0}),{once:!0,signal:this.#g._signal}),t.focus())}),0)),e._structTreeParentId=this.#Cn?.moveElementInDOM(this.div,e.div,e.contentDiv,!0)}addOrRebuild(e){e.needsToBeRebuilt()?(e.parent||=this,e.rebuild(),e.show()):this.add(e)}addUndoableEditor(e){this.addCommands({cmd:()=>e._uiManager.rebuild(e),undo:()=>{e.remove()},mustExec:!1})}getNextId(){return this.#g.getId()}get#vo(){return Jd.#q.get(this.#g.getMode())}combinedSignal(e){return this.#g.combinedSignal(e)}#yo(e){const t=this.#vo;return t?new t.prototype.constructor(e):null}canCreateNewEmptyEditor(){return this.#vo?.canCreateNewEmptyEditor()}pasteEditor(e,t){this.#g.updateToolbar(e),this.#g.updateMode(e);const{offsetX:i,offsetY:r}=this.#wo(),n=this.getNextId(),s=this.#yo({parent:this,id:n,x:i,y:r,uiManager:this.#g,isCentered:!0,...t});s&&this.add(s)}async deserialize(e){return await(Jd.#q.get(e.annotationType??e.annotationEditorType)?.deserialize(e,this,this.#g))||null}createAndAddNewEditor(e,t,i={}){const r=this.getNextId(),n=this.#yo({parent:this,id:r,x:e.offsetX,y:e.offsetY,uiManager:this.#g,isCentered:t,...i});return n&&this.add(n),n}#wo(){const{x:e,y:t,width:i,height:r}=this.div.getBoundingClientRect(),n=Math.max(0,e),s=Math.max(0,t),a=(n+Math.min(window.innerWidth,e+i))/2-e,o=(s+Math.min(window.innerHeight,t+r))/2-t,[l,h]=this.viewport.rotation%180==0?[a,o]:[o,a];return{offsetX:l,offsetY:h}}addNewEditor(){this.createAndAddNewEditor(this.#wo(),!0)}setSelected(e){this.#g.setSelected(e)}toggleSelected(e){this.#g.toggleSelected(e)}unselect(e){this.#g.unselect(e)}pointerup(e){const{isMac:t}=ul.platform;0!==e.button||e.ctrlKey&&t||e.target===this.div&&this.#ho&&(this.#ho=!1,this.#vo?.isDrawer&&this.#vo.supportMultipleDrawings||(this.#no?this.#g.getMode()!==ho.STAMP?this.createAndAddNewEditor(e,!1):this.#g.unselectAll():this.#no=!0))}pointerdown(e){if(this.#g.getMode()===ho.HIGHLIGHT&&this.enableTextSelection(),this.#ho)return void(this.#ho=!1);const{isMac:t}=ul.platform;if(0!==e.button||e.ctrlKey&&t)return;if(e.target!==this.div)return;if(this.#ho=!0,this.#vo?.isDrawer)return void this.startDrawingSession(e);const i=this.#g.getActive();this.#no=!i||i.isEmpty()}startDrawingSession(e){if(this.div.focus(),this.#uo)return void this.#vo.startDrawing(this,this.#g,!1,e);this.#g.setCurrentDrawingSession(this),this.#uo=new AbortController;const t=this.#g.combinedSignal(this.#uo);this.div.addEventListener("blur",(({relatedTarget:e})=>{e&&!this.div.contains(e)&&(this.#po=null,this.commitOrRemove())}),{signal:t}),this.#vo.startDrawing(this,this.#g,!1,e)}pause(e){if(e){const{activeElement:e}=document;this.div.contains(e)&&(this.#po=e)}else this.#po&&setTimeout((()=>{this.#po?.focus(),this.#po=null}),0)}endDrawingSession(e=!1){return this.#uo?(this.#g.setCurrentDrawingSession(null),this.#uo.abort(),this.#uo=null,this.#po=null,this.#vo.endDrawing(e)):null}findNewParent(e,t,i){const r=this.#g.findParent(t,i);return null!==r&&r!==this&&(r.changeParent(e),!0)}commitOrRemove(){return!!this.#uo&&(this.endDrawingSession(),!0)}onScaleChanging(){this.#uo&&this.#vo.onScaleChangingWhenDrawing(this)}destroy(){this.commitOrRemove(),this.#g.getActive()?.parent===this&&(this.#g.commitOrRemove(),this.#g.setActiveEditor(null)),this.#oo&&(clearTimeout(this.#oo),this.#oo=null);for(const e of this.#lo.values())this.#Cn?.removePointerInTextLayer(e.contentDiv),e.setParent(null),e.isAttachedToDOM=!1,e.div.remove();this.div=null,this.#lo.clear(),this.#g.removeLayer(this)}#fo(){for(const e of this.#lo.values())e.isEmpty()&&e.remove()}render({viewport:e}){this.viewport=e,Fl(this.div,e);for(const e of this.#g.getEditors(this.pageIndex))this.add(e),e.rebuild();this.updateMode()}update({viewport:e}){this.#g.commitOrRemove(),this.#fo();const t=this.viewport.rotation,i=e.rotation;if(this.viewport=e,Fl(this.div,{rotation:i}),t!==i)for(const e of this.#lo.values())e.rotate(i)}get pageDimensions(){const{pageWidth:e,pageHeight:t}=this.viewport.rawDims;return[e,t]}get scale(){return this.#g.viewParameters.realScale}}class Qd{#nn=null;#y=0;#xo=new Map;#Ao=new Map;constructor({pageIndex:e}){this.pageIndex=e}setParent(e){if(this.#nn){if(this.#nn!==e){if(this.#xo.size>0)for(const t of this.#xo.values())t.remove(),e.append(t);this.#nn=e}}else this.#nn=e}static get _svgFactory(){return el(this,"_svgFactory",new td)}static#ko(e,[t,i,r,n]){const{style:s}=e;s.top=100*i+"%",s.left=100*t+"%",s.width=100*r+"%",s.height=100*n+"%"}#Eo(){const e=Qd._svgFactory.create(1,1,!0);return this.#nn.append(e),e.setAttribute("aria-hidden",!0),e}#So(e,t){const i=Qd._svgFactory.createElement("clipPath");e.append(i);const r=`clip_${t}`;i.setAttribute("id",r),i.setAttribute("clipPathUnits","objectBoundingBox");const n=Qd._svgFactory.createElement("use");return i.append(n),n.setAttribute("href",`#${t}`),n.classList.add("clip"),r}#Co(e,t){for(const[i,r]of Object.entries(t))null===r?e.removeAttribute(i):e.setAttribute(i,r)}draw(e,t=!1,i=!1){const r=this.#y++,n=this.#Eo(),s=Qd._svgFactory.createElement("defs");n.append(s);const a=Qd._svgFactory.createElement("path");s.append(a);const o=`path_p${this.pageIndex}_${r}`;a.setAttribute("id",o),a.setAttribute("vector-effect","non-scaling-stroke"),t&&this.#Ao.set(r,a);const l=i?this.#So(s,o):null,h=Qd._svgFactory.createElement("use");return n.append(h),h.setAttribute("href",`#${o}`),this.updateProperties(n,e),this.#xo.set(r,n),{id:r,clipPathId:`url(#${l})`}}drawOutline(e,t){const i=this.#y++,r=this.#Eo(),n=Qd._svgFactory.createElement("defs");r.append(n);const s=Qd._svgFactory.createElement("path");n.append(s);const a=`path_p${this.pageIndex}_${i}`;let o;if(s.setAttribute("id",a),s.setAttribute("vector-effect","non-scaling-stroke"),t){const e=Qd._svgFactory.createElement("mask");n.append(e),o=`mask_p${this.pageIndex}_${i}`,e.setAttribute("id",o),e.setAttribute("maskUnits","objectBoundingBox");const t=Qd._svgFactory.createElement("rect");e.append(t),t.setAttribute("width","1"),t.setAttribute("height","1"),t.setAttribute("fill","white");const r=Qd._svgFactory.createElement("use");e.append(r),r.setAttribute("href",`#${a}`),r.setAttribute("stroke","none"),r.setAttribute("fill","black"),r.setAttribute("fill-rule","nonzero"),r.classList.add("mask")}const l=Qd._svgFactory.createElement("use");r.append(l),l.setAttribute("href",`#${a}`),o&&l.setAttribute("mask",`url(#${o})`);const h=l.cloneNode();return r.append(h),l.classList.add("mainOutline"),h.classList.add("secondaryOutline"),this.updateProperties(r,e),this.#xo.set(i,r),i}finalizeDraw(e,t){this.#Ao.delete(e),this.updateProperties(e,t)}updateProperties(e,t){if(!t)return;const{root:i,bbox:r,rootClass:n,path:s}=t,a="number"==typeof e?this.#xo.get(e):e;if(a){if(i&&this.#Co(a,i),r&&Qd.#ko(a,r),n){const{classList:e}=a;for(const[t,i]of Object.entries(n))e.toggle(t,i)}if(s){const e=a.firstChild.firstChild;this.#Co(e,s)}}}updateParent(e,t){if(t===this)return;const i=this.#xo.get(e);i&&(t.#nn.append(i),this.#xo.delete(e),t.#xo.set(e,i))}remove(e){this.#Ao.delete(e),null!==this.#nn&&(this.#xo.get(e).remove(),this.#xo.delete(e))}destroy(){this.#nn=null;for(const e of this.#xo.values())e.remove();this.#xo.clear(),this.#Ao.clear()}}globalThis.pdfjsTestingUtils={HighlightOutliner:Bd};var eu=Ya.GlobalWorkerOptions,tu=Ya.getDocument,iu=Ya.version;function ru(e){return"function"==typeof e}var nu=function(i){var s=i.block.pdf,a=s.src,o=s.caption,h=t(1),c=h[0],d=h[1],u=n(null),p=function(e){var i=e.canvasRef,s=e.file,a=e.onDocumentLoadSuccess,o=e.onDocumentLoadFail,l=e.onPageLoadSuccess,h=e.onPageLoadFail,c=e.onPageRenderSuccess,d=e.onPageRenderFail,u=e.scale,p=void 0===u?1:u,m=e.rotate,g=void 0===m?0:m,f=e.page,b=void 0===f?1:f,v=e.cMapUrl,y=e.cMapPacked,w=e.workerSrc,x=void 0===w?"//cdnjs.cloudflare.com/ajax/libs/pdf.js/".concat(iu,"/pdf.worker.mjs"):w,A=e.withCredentials,k=void 0!==A&&A,E=t(),S=E[0],C=E[1],M=t(),_=M[0],T=M[1],N=n(null),I=n(null),L=n(a),P=n(o),R=n(l),D=n(h),z=n(c),F=n(d);return r((function(){L.current=a}),[a]),r((function(){P.current=o}),[o]),r((function(){R.current=l}),[l]),r((function(){D.current=h}),[h]),r((function(){z.current=c}),[c]),r((function(){F.current=d}),[d]),r((function(){eu.workerSrc=x}),[x]),r((function(){var e={url:s,withCredentials:k};v&&(e.cMapUrl=v,e.cMapPacked=y),tu(e).promise.then((function(e){C(e),ru(L.current)&&L.current(e)}),(function(){ru(P.current)&&P.current()}))}),[s,k,v,y]),r((function(){var e=function(t){var r=0===g?t.rotate:t.rotate+g,n=t.getViewport({scale:p,rotation:r}),s=i.current;if(s){var a=s.getContext("2d");if(a)return s.height=n.height*window.devicePixelRatio,s.width=n.width*window.devicePixelRatio,a.scale(window.devicePixelRatio,window.devicePixelRatio),N.current?(I.current=t,void N.current.cancel()):(N.current=t.render({canvasContext:a,viewport:n}),N.current.promise.then((function(){N.current=null,ru(z.current)&&z.current(t)}),(function(i){var r;if(N.current=null,i&&"RenderingCancelledException"===i.name){var n=null!==(r=I.current)&&void 0!==r?r:t;I.current=null,e(n)}else ru(F.current)&&F.current()})))}};S&&S.getPage(b).then((function(t){T(t),ru(R.current)&&R.current(t),e(t)}),(function(){ru(D.current)&&D.current()}))}),[i,b,S,g,p]),{pdfDocument:S,pdfPage:_}}({file:a,page:c,canvasRef:u}).pdfDocument;return e.createElement("div",{className:"rotion-pdf"},Boolean(p&&p.numPages)&&e.createElement("nav",{className:"rotion-pdf-nav"},e.createElement("ul",{className:"rotion-pdf-pager"},e.createElement("li",{className:"rotion-pdf-prev"},e.createElement("span",{className:"rotion-pdf-prevnext ".concat(1===c?"rotion-pdf-prevnext-disabled":""),onClick:function(){return d(c-1)}},"◀︎")),e.createElement("li",{className:"rotion-pdf-next"},e.createElement("span",{className:"rotion-pdf-prevnext ".concat(c===p.numPages?"rotion-pdf-prevnext-disabled":""),onClick:function(){return d(c+1)}},"▶"))),e.createElement("a",{href:a,className:"rotion-pdf-link",title:"Download PDF",target:"_blank",rel:"noopener noreferrer"},e.createElement(l,{name:"downloadfile",width:"20px",height:"20px"}))),!p&&e.createElement("span",null,"Loading..."),e.createElement("canvas",{className:"rotion-pdf-canvas",ref:u}),o.length>0&&e.createElement("div",{className:"rotion-pdf-caption"},o.map((function(t,i){return e.createElement(gs,{textObject:t,key:"richtext-".concat(i)})}))))},su=function(t){var i=t.block;return i.has_children&&void 0!==i.children?e.createElement("div",{className:"rotion-syncedblock"},i.children.results.map((function(t){return e.createElement(bu,{block:t,key:"block-".concat(t.id)})}))):e.createElement(e.Fragment,null)},au=function(t){var i=t.block;if(!i.table||!i.children)return e.createElement(e.Fragment,null);var r=[],n=i.table.has_column_header,s=i.table.has_row_header;return i.children.results.map((function(t,a){var o=t,l=[];if(void 0===o.table_row)return"";o.table_row.cells.map((function(t,i){var r="".concat(o.id,"-").concat(a,"-").concat(i);return 0===a&&n||0===i&&s?l.push(function(t){var i=t.richTexts,r=t.key;return e.createElement("td",{className:"rotion-table-td-header",key:r},e.createElement("div",{className:"rotion-table-td-header-inner"},i.map((function(t,i){return e.createElement(gs,{textObject:t,key:"tabletdh-".concat(i)})}))))}({richTexts:t,key:r})||e.createElement(e.Fragment,null)):l.push(function(t){var i=t.richTexts,r=t.key;return e.createElement("td",{className:"rotion-table-td",key:r},e.createElement("div",{className:"rotion-table-td-inner"},i.map((function(t,i){return e.createElement(gs,{textObject:t,key:"tabletd-".concat(i)})}))))}({richTexts:t,key:r})||e.createElement(e.Fragment,null)),""}));var h="".concat(i.id,"-").concat(a);return r.push(function(t){var i=t.children,r=t.key;return e.createElement("tr",{className:"rotion-table-tr",key:r},i)}({children:l,key:h})||e.createElement(e.Fragment,null)),""})),e.createElement("div",{className:"rotion-table"},e.createElement("table",{className:"rotion-table-area"},e.createElement("tbody",null,r)))},ou=function(t){var i=t.block.table_of_contents;return e.createElement("div",{className:"rotion-tableofcontents"},i.color)},lu=function(t){var i=t.block;if(!i.to_do)return e.createElement(e.Fragment,null);var r=i.to_do.checked;return e.createElement("div",{className:"rotion-todo"},e.createElement("div",{className:"rotion-todo-checkbox"},e.createElement(Es,{bool:r})),e.createElement("div",{className:"rotion-todo-text"},e.createElement("div",{className:"rotion-todo-text-inner ".concat(r?"rotion-todo-text-inner-checked":"")},i.to_do.rich_text.map((function(t,i){return e.createElement(gs,{textObject:t,key:"richtext-".concat(i)})})))))},hu=function(t){var i=t.open,r={transform:"rotateZ(".concat(i?180:90,"deg)")};return e.createElement("svg",{className:"rotion-toggle-icon",style:r,viewBox:"0 0 100 100"},e.createElement("polygon",{points:"5.9,88.2 50,11.8 94.1,88.2 "}))},cu=function(i){var r=i.block,n=t(!1),s=n[0],a=n[1],o=r.children.results.map((function(t,i){var r=t;return e.createElement(e.Fragment,null,r.paragraph.rich_text.map((function(t,i){return e.createElement(gs,{textObject:t,key:"richtext-".concat(i)})})))}));return e.createElement("div",{className:"rotion-toggle"},e.createElement("div",{className:"rotion-toggle-triangle",onClick:function(){return a(!s)}},e.createElement(hu,{open:s})),e.createElement("div",{className:"rotion-toggle-text"},e.createElement("div",null,r.toggle.rich_text.map((function(t,i){return e.createElement(gs,{textObject:t,key:"richtext-".concat(i)})}))),s?o:null))},du=function(t){var i=t.video,r=i.html,n=i.caption;return e.createElement("div",{className:"rotion-video"},e.createElement("div",{className:"rotion-video-inner"},e.createElement("div",{className:"rotion-video-html rotion-video-youtube",dangerouslySetInnerHTML:{__html:r}}),e.createElement(Pa,{type:"video",caption:n})))},uu=function(t){var i=t.video,r=i.html,n=i.caption;return e.createElement("div",{className:"rotion-video"},e.createElement("div",{className:"rotion-video-inner"},e.createElement("div",{className:"rotion-video-html rotion-video-vimeo",dangerouslySetInnerHTML:{__html:r}}),e.createElement(Pa,{type:"video",caption:n})))},pu=function(t){var i=t.video,r=i.html,n=i.caption;return e.createElement("div",{className:"rotion-video"},e.createElement("div",{className:"rotion-video-inner"},e.createElement("div",{className:"rotion-video-html",dangerouslySetInnerHTML:{__html:r}}),e.createElement(Pa,{type:"video",caption:n})))},mu=function(t){var i=t.video,r=i.src,n=i.caption,s=i.videoType;return e.createElement("div",{className:"rotion-video"},e.createElement("div",{className:"rotion-video-inner"},e.createElement("div",{className:"rotion-video-file"},e.createElement("video",{controls:!0,preload:"metadata",width:"100%"},e.createElement("source",{src:r,type:s}),"Download the ",e.createElement("a",{href:r},"Video"))),e.createElement(Pa,{type:"video",caption:n})))},gu=function(t){var i=t.block,r=i.video;switch(null==r?void 0:r.type){case"file":return r.src?e.createElement(mu,{video:r}):(console.log("The video source for this video block was undefined:",i),e.createElement(e.Fragment,null));case"external":return r.html?r.html.includes("youtube")?e.createElement(du,{video:r}):r.html.includes("vimeo")?e.createElement(uu,{video:r}):e.createElement(pu,{video:r}):(console.log("The html for this video block was undefined:",i),e.createElement(e.Fragment,null));default:return console.log("The video type is unknown:",i),e.createElement(e.Fragment,null)}},fu={heading_1:"h2",heading_2:"h3",heading_3:"h4",bulleted_list_item:"li",numbered_list_item:"li",divider:"hr",paragraph:"p",code:"code",quote:"blockquote"},bu=function(t){var i=t.block,r=t.href,n=t.link,s=t.query,a=t.breadcrumb_hrefs;switch(i.type){case"bookmark":return e.createElement(fa,{block:i,key:i.id});case"breadcrumb":return e.createElement(ya,{block:i,hrefs:a,link:n,query:s,key:i.id});case"bulleted_list_item":return e.createElement(wa,{block:i,key:i.id});case"callout":return e.createElement(Aa,{block:i,href:r,link:n,query:s,key:i.id});case"child_database":return e.createElement(Ea,{block:i,href:r,link:n,query:s,key:i.id});case"child_page":return e.createElement(Ca,{block:i,href:r,link:n,key:i.id});case"code":return e.createElement(Ia,{block:i,key:i.id});case"column_list":return e.createElement(La,{block:i,href:r,link:n,query:s,key:i.id});case"embed":return e.createElement(Oa,{block:i,key:i.id});case"equation":return e.createElement(Ba,{block:i,key:i.id});case"file":return e.createElement(Ha,{block:i,key:i.id});case"heading_1":case"heading_2":case"heading_3":case"paragraph":case"quote":case"divider":var o=fu[i.type];return e.createElement(qa,{tag:o,block:i,key:i.id});case"image":return e.createElement(ja,{block:i,key:i.id});case"link_preview":return e.createElement($a,{block:i,key:i.id});case"numbered_list_item":return e.createElement(Wa,{block:i,key:i.id});case"pdf":return e.createElement(nu,{block:i,key:i.id});case"synced_block":return e.createElement(su,{block:i,key:i.id});case"table":return e.createElement(au,{block:i,key:i.id});case"table_of_contents":return e.createElement(ou,{block:i,key:i.id});case"to_do":return e.createElement(lu,{block:i,key:i.id});case"toggle":return e.createElement(cu,{block:i,key:i.id});case"video":return e.createElement(gu,{block:i,key:i.id});default:return console.log("unknown component: ".concat(i.type),i),e.createElement(e.Fragment,null)}},vu=function(t){var i=t.blocks,r=t.href,n=t.link,s=t.query,a=t.breadcrumb_hrefs,o=i.results,l={bulleted_list_item:"ul",numbered_list_item:"ol"},h=Object.keys(l),c=!1,d=[],u=[],p=function(e){var t,i=e+1;return h.includes((null===(t=o[i])||void 0===t?void 0:t.type)||"")};return o.map((function(t,i){var o=t;if(h.includes(o.type))if(c&&p(i))u.push(o);else if(c||!p(i)){if(c=!1,u.push(o),Object.keys(l).includes(o.type)){var m=l[o.type];d.push(function(t){var i=t.tag,r=t.blocks,n=t.href,s=t.link,a=t.query,o=i;return e.createElement(o,{className:"rotion-listblocks rotion-list-".concat(i),key:i+r[0].id},r.map((function(e){return bu({block:e,href:n,link:s,query:a})})))}({tag:m,blocks:u,href:r,link:n,query:s})),u=[]}}else c=!0,u.push(o);else{var g=bu({block:o,href:r,link:n,query:s,breadcrumb_hrefs:a});d.push(g)}return""})),e.createElement("div",{className:"rotion-blocks"},d)};export{fa as BookmarkBlock,ya as BreadcrumbBlock,va as Breadcrumbs,m as BuildPlainTextByPage,wa as BulletedListBlock,Aa as CalloutBlock,Es as Checkbox,Ea as ChildDatabaseBlock,Ca as ChildPageBlock,Ia as CodeBlock,La as ColumnListBlock,Oa as EmbedBlock,Ba as EquationBlock,Ha as FileBlock,Fs as Gallery,zs as GalleryCard,Cs as GalleryCheckboxField,bs as GalleryDateField,Ns as GalleryFormulaField,ws as GalleryMultiSelectField,Ms as GalleryNumberField,vs as GalleryRichTextField,Ts as GallerySelectField,fs as GalleryTitleField,xs as GalleryUrlField,l as Icon,ja as ImageBlock,$a as LinkPreviewBlock,Qs as List,Ws as ListCheckboxField,Hs as ListDateField,Ys as ListFormulaField,Vs as ListMultiSelectField,Xs as ListNumberField,qs as ListRichTextField,Gs as ListSelectField,Bs as ListTitleField,$s as ListUrlField,Wa as NumberedListBlock,vu as Page,nu as PdfBlock,Ss as PrefixSuffix,gs as RichText,su as SyncedBlock,ga as Table,au as TableBlock,ca as TableCheckboxField,ra as TableDateField,ua as TableFormulaField,ea as TableIcon,aa as TableMultiSelectField,da as TableNumberField,ou as TableOfContentsBlock,na as TableRichTextField,la as TableSelectField,ia as TableTitleField,ha as TableUrlField,qa as TextBlock,lu as ToDoBlock,cu as ToggleBlock,p as UsePagination,gu as VideoBlock,f as getDatetimeFormat,d as getLinkPathAndLinkKey,u as getSlug,g as pathBasename,c as queryToString,b as splitUrl};
|
|
1
|
+
import e,{useState as t,useMemo as r,useEffect as a,useRef as n}from"react";import i from"mermaid";import o from"prismjs";import{GlobalWorkerOptions as l,getDocument as s,version as c}from"pdfjs-dist";var m=function(t){var r=t.payload;if("user"!==r.mention.type)return e.createElement(e.Fragment,null);var a=r.mention.user;return"type"in a?e.createElement("span",{className:"rotion-richtext-user"},e.createElement("span",{className:"rotion-richtext-user-atsign"},"@"),a.name):e.createElement("span",{className:"rotion-richtext-user"},e.createElement("span",{className:"rotion-richtext-user-atsign"},"@"),r.plain_text.replace("@",""))},h=function(t){var r=t.name,a=t.width,n=t.height,i=t.className;switch(r){case"figma":return e.createElement("svg",{className:"rotion-icon-figma ".concat(i),version:"1.0",xmlns:"http://www.w3.org/2000/svg",width:a||"12px",height:n||"18px",viewBox:"0 0 200 300"},e.createElement("path",{d:"M50 300c27.6 0 50-22.4 50-50v-50H50c-27.6 0-50 22.4-50 50s22.4 50 50 50z",fill:"#0acf83"}),e.createElement("path",{d:"M0 150c0-27.6 22.4-50 50-50h50v100H50c-27.6 0-50-22.4-50-50z",fill:"#a259ff"}),e.createElement("path",{d:"M0 50C0 22.4 22.4 0 50 0h50v100H50C22.4 100 0 77.6 0 50z",fill:"#f24e1e"}),e.createElement("path",{d:"M100 0h50c27.6 0 50 22.4 50 50s-22.4 50-50 50h-50V0z",fill:"#ff7262"}),e.createElement("path",{d:"M200 150c0 27.6-22.4 50-50 50s-50-22.4-50-50 22.4-50 50-50 50 22.4 50 50z",fill:"#1abcfe"}));case"slack":return e.createElement("svg",{className:"rotion-icon-slack ".concat(i),version:"1.0",xmlns:"http://www.w3.org/2000/svg",width:a||"20px",height:n||"20px",viewBox:"0 0 140 140"},e.createElement("path",{d:"M27.2 80c0 7.3-5.9 13.2-13.2 13.2C6.7 93.2.8 87.3.8 80c0-7.3 5.9-13.2 13.2-13.2h13.2V80zm6.6 0c0-7.3 5.9-13.2 13.2-13.2 7.3 0 13.2 5.9 13.2 13.2v33c0 7.3-5.9 13.2-13.2 13.2-7.3 0-13.2-5.9-13.2-13.2V80z",fill:"#E01E5A"}),e.createElement("path",{d:"M47 27c-7.3 0-13.2-5.9-13.2-13.2C33.8 6.5 39.7.6 47 .6c7.3 0 13.2 5.9 13.2 13.2V27H47zm0 6.7c7.3 0 13.2 5.9 13.2 13.2 0 7.3-5.9 13.2-13.2 13.2H13.9C6.6 60.1.7 54.2.7 46.9c0-7.3 5.9-13.2 13.2-13.2H47z",fill:"#36C5F0"}),e.createElement("path",{d:"M99.9 46.9c0-7.3 5.9-13.2 13.2-13.2 7.3 0 13.2 5.9 13.2 13.2 0 7.3-5.9 13.2-13.2 13.2H99.9V46.9zm-6.6 0c0 7.3-5.9 13.2-13.2 13.2-7.3 0-13.2-5.9-13.2-13.2V13.8C66.9 6.5 72.8.6 80.1.6c7.3 0 13.2 5.9 13.2 13.2v33.1z",fill:"#2EB67D"}),e.createElement("path",{d:"M80.1 99.8c7.3 0 13.2 5.9 13.2 13.2 0 7.3-5.9 13.2-13.2 13.2-7.3 0-13.2-5.9-13.2-13.2V99.8h13.2zm0-6.6c-7.3 0-13.2-5.9-13.2-13.2 0-7.3 5.9-13.2 13.2-13.2h33.1c7.3 0 13.2 5.9 13.2 13.2 0 7.3-5.9 13.2-13.2 13.2H80.1z",fill:"#ECB22E"}));case"github":return e.createElement("svg",{className:"rotion-icon-github ".concat(i),version:"1.0",xmlns:"http://www.w3.org/2000/svg",width:a||"20px",height:n||"20px",viewBox:"0 0 200 200",preserveAspectRatio:"xMidYMid meet"},e.createElement("g",{transform:"translate(0.000000,200.000000) scale(0.100000,-0.100000)",stroke:"none"},e.createElement("path",{d:"M899 1910 c-314 -38 -586 -232 -720 -515 -63 -133 -80 -205 -86 -356 -6 -144 10 -245 57 -367 88 -226 287 -429 503 -512 110 -43 117 -38 117 88 l0 97 -98 0 c-89 0 -102 2 -138 26 -27 18 -49 46 -72 90 -37 74 -54 96 -99 127 -39 28 -42 49 -9 58 43 10 110 -28 155 -90 46 -61 71 -82 122 -96 45 -13 138 5 145 28 3 10 15 38 28 63 l22 46 -76 17 c-220 47 -330 188 -330 425 0 81 19 150 59 213 29 45 30 51 21 100 -10 52 -7 95 12 157 10 33 11 33 56 28 25 -3 82 -24 128 -47 l82 -42 59 13 c79 16 232 17 324 0 76 -13 76 -13 116 13 50 34 148 68 182 64 20 -2 28 -11 37 -43 15 -49 17 -135 4 -169 -8 -21 -4 -34 25 -76 45 -67 57 -116 57 -225 -2 -235 -118 -376 -344 -416 -64 -12 -67 -13 -52 -30 34 -38 43 -91 44 -256 0 -133 3 -164 16 -177 21 -22 25 -21 115 18 147 64 292 181 385 311 50 70 109 196 136 290 19 68 23 104 23 235 0 188 -13 248 -90 405 -92 185 -230 325 -411 415 -144 72 -349 108 -505 90z"})));case"file":return e.createElement("svg",{className:"rotion-icon-file ".concat(i),width:a||"20px",height:n||"20px",viewBox:"0 0 16 16"},e.createElement("path",{d:"M4.35645 15.4678H11.6367C13.0996 15.4678 13.8584 14.6953 13.8584 13.2256V7.02539C13.8584 6.0752 13.7354 5.6377 13.1406 5.03613L9.55176 1.38574C8.97754 0.804688 8.50586 0.667969 7.65137 0.667969H4.35645C2.89355 0.667969 2.13477 1.44043 2.13477 2.91016V13.2256C2.13477 14.7021 2.89355 15.4678 4.35645 15.4678ZM4.46582 14.1279C3.80273 14.1279 3.47461 13.7793 3.47461 13.1436V2.99219C3.47461 2.36328 3.80273 2.00781 4.46582 2.00781H7.37793V5.75391C7.37793 6.73145 7.86328 7.20312 8.83398 7.20312H12.5186V13.1436C12.5186 13.7793 12.1836 14.1279 11.5205 14.1279H4.46582ZM8.95703 6.02734C8.67676 6.02734 8.56055 5.9043 8.56055 5.62402V2.19238L12.334 6.02734H8.95703ZM8.59473 12.7266V10.6279L8.54004 9.56152L9.06641 10.1152L9.59277 10.6484C9.68848 10.7646 9.8457 10.833 9.98926 10.833C10.2969 10.833 10.5293 10.6143 10.5293 10.3066C10.5293 10.1357 10.4678 10.0127 10.3379 9.90332L8.45117 8.16699C8.29395 8.02344 8.16406 7.96191 7.99316 7.96191C7.8291 7.96191 7.69922 8.02344 7.54199 8.16699L5.65527 9.90332C5.52539 10.0127 5.46387 10.1357 5.46387 10.3066C5.46387 10.6143 5.68945 10.833 6.00391 10.833C6.14746 10.833 6.29785 10.7646 6.40039 10.6484L6.92676 10.1152L7.45312 9.56152L7.39844 10.6279V12.7266C7.39844 13.0547 7.67188 13.3008 7.99316 13.3008C8.32129 13.3008 8.59473 13.0547 8.59473 12.7266Z"}));case"link":return e.createElement("svg",{className:"rotion-icon-link ".concat(i),version:"1.0",xmlns:"http://www.w3.org/2000/svg",width:"13px",height:"13px",viewBox:"0 0 13 13",role:"graphics-symbol"},e.createElement("path",{d:"M6.30826 4.43292L1.76184 8.98454C1.76176 8.98462 1.76169 8.9847 1.76161 8.98477C1.76158 8.9848 1.76156 8.98482 1.76154 8.98484C1.46068 9.28584 1.25 9.6914 1.25 10.1565C1.25 10.6117 1.45865 11.0119 1.73417 11.2886C2.01014 11.5658 2.41107 11.7773 2.87078 11.7773C3.34169 11.7773 3.73758 11.5617 4.03477 11.2733L4.03482 11.2734L4.04244 11.2657L8.58864 6.72474V8.667C8.58864 9.51956 9.22729 10.2935 10.1521 10.2935C11.0528 10.2935 11.75 9.54534 11.75 8.66127V2.92671C11.75 2.48722 11.5981 2.06381 11.2838 1.74808C10.9689 1.43182 10.5446 1.27728 10.1006 1.27728H4.36028C3.46161 1.27728 2.72804 1.97749 2.72804 2.86942C2.72804 3.79734 3.51104 4.43292 4.35455 4.43292H6.30826Z",fill:"#3E3C38",stroke:"white",strokeWidth:"1.5"}));case"circledot":return e.createElement("svg",{className:"rotion-icon-circledot ".concat(i),xmlns:"http://www.w3.org/2000/svg",width:a||"15px",height:n||"15px",viewBox:"0 0 512 512"},e.createElement("path",{d:"M464 256A208 208 0 1 0 48 256a208 208 0 1 0 416 0zM0 256a256 256 0 1 1 512 0A256 256 0 1 1 0 256zm256-96a96 96 0 1 1 0 192 96 96 0 1 1 0-192z"}));case"circlecheck":return e.createElement("svg",{className:"rotion-icon-circlecheck ".concat(i),xmlns:"http://www.w3.org/2000/svg",width:a||"15px",height:n||"15px",viewBox:"0 0 512 512"},e.createElement("path",{d:"M256 48a208 208 0 1 1 0 416 208 208 0 1 1 0-416zm0 464A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM369 209c9.4-9.4 9.4-24.6 0-33.9s-24.6-9.4-33.9 0l-111 111-47-47c-9.4-9.4-24.6-9.4-33.9 0s-9.4 24.6 0 33.9l64 64c9.4 9.4 24.6 9.4 33.9 0L369 209z"}));case"codemerge":return e.createElement("svg",{className:"rotion-icon-codemerge ".concat(i),version:"1.0",xmlns:"http://www.w3.org/2000/svg",width:a||"15px",height:n||"15px",viewBox:"0 0 448 512"},e.createElement("path",{d:"M80 56a24 24 0 1 1 0 48 24 24 0 1 1 0-48zm32.4 97.2c28-12.4 47.6-40.5 47.6-73.2c0-44.2-35.8-80-80-80S0 35.8 0 80c0 32.8 19.7 61 48 73.3V358.7C19.7 371 0 399.2 0 432c0 44.2 35.8 80 80 80s80-35.8 80-80c0-32.8-19.7-61-48-73.3V272c26.7 20.1 60 32 96 32h86.7c12.3 28.3 40.5 48 73.3 48c44.2 0 80-35.8 80-80s-35.8-80-80-80c-32.8 0-61 19.7-73.3 48H208c-49.9 0-91-38.1-95.6-86.8zM80 408a24 24 0 1 1 0 48 24 24 0 1 1 0-48zM344 272a24 24 0 1 1 48 0 24 24 0 1 1 -48 0z"}));case"downloadfile":return e.createElement("svg",{className:"rotion-icon-downloadfile ".concat(i),xmlns:"http://www.w3.org/2000/svg",width:a||"15px",height:n||"15px",viewBox:"0 0 512 512"},e.createElement("path",{d:"M256 464a208 208 0 1 1 0-416 208 208 0 1 1 0 416zM256 0a256 256 0 1 0 0 512A256 256 0 1 0 256 0zM376.9 294.6c4.5-4.2 7.1-10.1 7.1-16.3c0-12.3-10-22.3-22.3-22.3H304V160c0-17.7-14.3-32-32-32l-32 0c-17.7 0-32 14.3-32 32v96H150.3C138 256 128 266 128 278.3c0 6.2 2.6 12.1 7.1 16.3l107.1 99.9c3.8 3.5 8.7 5.5 13.8 5.5s10.1-2 13.8-5.5l107.1-99.9z"}))}},u=function(t){var r=t.mention;return e.createElement("span",{className:"rotion-richtext-pageordb"},e.createElement("span",{className:"rotion-richtext-pageordb-icon"},"emoji"===r.icon.type&&r.icon.emoji,"emoji"!==r.icon.type&&e.createElement("img",{src:r.icon.src,className:"rotion-richtext-pageordb-img",alt:"icon"}),e.createElement(h,{name:"link",className:"rotion-richtext-pageordb-arrow"})),e.createElement("span",{className:"rotion-richtext-pageordb-title"},r.name))};function p(e){if(void 0===e)return"";var t=Object.entries(e).map((function(e){return"".concat(e[0],"=").concat(encodeURIComponent("".concat(e[1])))})).join("&");return"?".concat(t)}var d=function(e){var t=e.split("[");return""===e?["/",""]:t.length<2?[e,""]:[t[0],t[1].split("]")[0]]};function f(e,t){if(!("properties"in t))return"not-found-properties";if("id"===e)return t.id;if(!(e in t.properties))return"not-found-key-in-page-properties";var r=t.properties[e];return"rich_text"in r?r.rich_text.map((function(e){return e.text.content})).join(","):"not-found-richtext-in-key"}function g(e,r){var a=t(1),n=a[0],i=a[1],o=Math.ceil(e.length/r);return{next:function(){i((function(e){return Math.min(e+1,o)}))},currentData:function(){var t=(n-1)*r+r;return e.slice(void 0,t)},currentPage:n,maxPage:o}}function v(e){return e.results.map((function(e){return"type"in e&&"paragraph"===e.type?e.paragraph.rich_text:[]})).map((function(e){return e.map((function(e){return e.plain_text}))})).flat().join("")}function b(e){var t=e.replace(/\/$/,""),r=t.substring(t.lastIndexOf("/")+1);return r.lastIndexOf("?")>0?r.substring(0,r.lastIndexOf("?")):r}function y(e){var t="MMMM D, YYYY",r="h:mm A";return e?(e.includes("ja")&&(t="YYYY年M月D日",r="H:mm"),{dateF:t,timeF:r}):{dateF:t,timeF:r}}function x(e){var t=e.replace(/https?:\/\//,"").split("/"),r="".concat(t.shift()),a=t.join("/");return{domain:r,omittedPath:"/".concat(a.length>12?"".concat(a.substring(0,3),"...").concat(a.substring(a.length-6)):a)}}var w=function(t){var r=t.url,a=t.text;return r.includes("slack.com")?e.createElement("a",{className:"rotion-richtext-linkpreview",href:r,rel:"noreferrer",target:"_blank"},e.createElement(h,{name:"slack",className:"rotion-richtext-linkpreview-icon",width:"17px",height:"17px"}),e.createElement("span",{className:"rotion-richtext-linkprevew-text"},"Message in Slack")):r.includes("figma.com")?e.createElement("a",{className:"rotion-richtext-linkpreview",href:r,rel:"noreferrer",target:"_blank"},e.createElement(h,{name:"figma",className:"rotion-richtext-linkpreview-icon",width:"10px",height:"16px"}),e.createElement("span",{className:"rotion-richtext-linkprevew-text"},b(a).replace(/-/g," "))):e.createElement("a",{className:"rotion-richtext-linkpreview",href:r,rel:"noreferrer",target:"_blank"},r.includes("github.com")&&e.createElement(h,{name:"github",className:"rotion-richtext-linkpreview-icon",width:"17px",height:"17px"}),e.createElement("span",{className:"rotion-richtext-linkprevew-text"},b(a)))};const k=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],E=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],M=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],C=["January","February","March","April","May","June","July","August","September","October","November","December"],S={"%a":e=>k[e.getDay()],"%A":e=>E[e.getDay()],"%b":e=>M[e.getMonth()],"%B":e=>C[e.getMonth()],"%p":e=>e.getHours()<12?"AM":"PM","%r":"%-I:%M:%S %p","%x":"%-m/%-d/%y","%X":"%-I:%M:%S %p"},N={year:"y",month:"M",week:"w",date:"D",day:"d",hour:"h",minute:"m",second:"s",millisecond:"ms"};Object.keys(N).forEach((e=>{const t=e+"s",r=N[e];r&&(N[t]=N[r]=r)}));const z=e=>N[e||"ms"]||N[String(e).toLowerCase()],T={h:36e5,m:6e4,s:1e3,ms:1},A={y:e=>e.getFullYear(),M:e=>e.getMonth(),D:e=>e.getDate(),d:e=>e.getDay(),h:e=>e.getHours(),m:e=>e.getMinutes(),s:e=>e.getSeconds(),ms:e=>e.getMilliseconds(),TZO:e=>e.getTimezoneOffset(),T:e=>e.getTime()},q=A.d,L=["Su","Mo","Tu","We","Th","Fr","Sa"],B=["th","st","nd","rd"],O={YY:"%y",YYYY:"%Y",M:"%-m",MM:"%m",MMM:"%b",MMMM:"%B",D:"%-d",Do:e=>{return(t=e.getDate())+(B[t]||t>20&&B[t%10]||B[0]);var t},DD:"%d",d:"%w",dd:e=>L[q(e)],ddd:"%a",dddd:"%A",H:"%-H",HH:"%H",h:"%-I",hh:"%I",m:"%-M",mm:"%M",s:"%-S",ss:"%S",SSS:"%L",Z:"%:z",ZZ:"%z",A:"%p",a:"%P",X:"%s",x:A.T},H=e=>{let t={};return r=>t[r]||(t[r]=e(r))},I=(()=>{const e="2-digit",t="medium",r="numeric",a="short",n="long",i={a:{weekday:a},A:{weekday:n},b:{month:a},B:{month:n},c:{weekday:a,year:r,month:a,day:r,hour:e,minute:e,second:e},p:{hour:r,hour12:!0},r:{timeStyle:t,hour12:!0},x:{dateStyle:a},X:{timeStyle:t}};return Object.keys(i).forEach((e=>i[e].timeZone="UTC")),i})(),R=H((e=>{const t=(t,r,a)=>{let n;const i=r=>{const i=r.getTimezoneOffset(),o=new Date(+r-6e4*i);if(n||(n=new Intl.DateTimeFormat(e,t)),a){const e=n.formatToParts(o).find((e=>e.type===a));return e&&e.value}const l=n.format(o);if(l)return l.replace(/\s+UTC$/,"")};if(!r)return i;const o={};return e=>{const t=r(e);return o[t]||(o[t]=i(e))}},r=e=>e.getDay(),a=e=>e.getMonth();return{"%a":t(I.a,r),"%A":t(I.A,r),"%b":t(I.b,a),"%B":t(I.B,a),"%c":t(I.c),"%p":t(I.p,(e=>e.getHours()),"dayPeriod"),"%r":t(I.r),"%x":t(I.x),"%X":t(I.X)}})),D=/%(?:[EO]\w|[0_#^-]?[1-9]?\w|::?z|[%+])/g,F=(()=>{let e=["\\[(.*?)\\]","[A-Za-z]o"];const t=e=>String.fromCharCode(e+65)+"+";for(let r=0;r<26;r++)e.push(t(r),t(r+32));return new RegExp(e.join("|"),"g")})(),j={ISO:"%Y-%m-%dT%H:%M:%S.%L%:z",undef:"YYYY-MM-DDTHH:mm:ssZ",NaN:new Date(NaN)+""},V=e=>{const t=(t,r)=>{let n=e(t);if("string"==typeof n){const t=e(n);null!=t&&(n=t)}return"function"==typeof n?n(r):null==n?t:a(n,r)},r={},a=(e,r)=>e.replace(D,(e=>t(e,r)));return r.strftime=(e,r)=>isNaN(+r)?t("NaN",r):null==e?t("ISO",r):a(e,r),r.format=(r,a)=>isNaN(+a)?t("NaN",a):(null==r&&(r=String(e("undef"))),r.replace(F,((e,r)=>r||t(e,a)))),r.handler=t=>{return V((a=e,(r=(n=t)&&(e=>n[e]))&&a?e=>r(e)||a(e):r||a));var r,a,n},r},_=V().handler(j).handler(S).handler(O).handler((()=>{const e=e=>t=>("0"+e(t)).substr(-2),t=e=>t=>(" "+e(t)).substr(-2),r=e=>t=>("00"+e(t)).substr(-3),a=A.y,n=A.M,i=A.D,o=A.d,l=A.h,s=A.m,c=A.s,m=A.ms,h=A.T,u=A.TZO,p=e=>Math.floor(a(e)/100),d=e=>(l(e)+11)%12+1,f=e=>n(e)+1,g=e=>a(e)%100,v=e=>e<10?"0"+e:e,b=(e,t)=>r=>{let a=-u(r);const n=a<0;n&&(a=-a);const i=Math.floor(a/60),o=Math.floor(a%60),l=t?e+v(Math.floor(a%1*60)):"";return(n?"-":"+")+v(i)+e+v(o)+l},y={"%c":"%a %b %e %T %Y","%-C":p,"%C":e(p),"%-d":i,"%d":e(i),"%D":"%m/%d/%y","%e":t(i),"%F":"%Y-%m-%d","%-H":l,"%H":e(l),"%-I":d,"%I":e(d),"%k":t(l),"%l":t(d),"%-L":r(m),"%L":r(m),"%-m":f,"%m":e(f),"%-M":s,"%M":e(s),"%P":e=>l(e)<12?"am":"pm","%R":"%H:%M","%s":e=>Math.floor(h(e)/1e3),"%-S":c,"%S":e(c),"%T":"%H:%M:%S","%-y":g,"%y":e(g),"%-Y":a,"%Y":(x=a,e=>{let t=x(e);if(0<=t&&t<=9999)return("000"+t).substr(-4);let r="+";return t<0&&(r="-",t=-t),r+("00000"+t).substr(-6)}),"%u":e=>(o(e)+6)%7+1,"%v":"%e-%b-%Y","%w":o,"%::z":b(":",!0),"%:z":b(":"),"%z":b(""),"%%":()=>"%","%n":()=>"\n","%t":()=>"\t"};var x;const w=(e,t)=>{t.split("").forEach((t=>y[e+t]=y["%"+t]))};return w("%E","cCxXyY"),w("%O","deHImMSuUVwWy"),y})());_.strftime;const P=e=>e&&e.tx||_,U=(e,t)=>{const r=e.getFullYear(),a=e.getMonth(),n=e.getDate(),i=new Date(r,a,1),o=+i,l=12*r+a+t;i.setFullYear(Math.floor(l/12));const s=l%12;i.setMonth(s);const c=Math.round((+i-o)/864e5);Y(e,c);const m=e.getDate();s!==e.getMonth()&&n>m&&Y(e,-m)},Y=(e,t)=>{const r=e.getTimezoneOffset();e.setTime(+e+864e5*t);const a=e.getTimezoneOffset();r!==a&&e.setTime(+e+6e4*(a-r))},G=(e,t,r)=>{if(!t)return;const a=z(r),n=T[a];if(n)e.setTime(+e+t*n);else switch(a){case"y":return U(e,12*t);case"M":return U(e,t);case"w":return Y(e,7*t);case"D":case"d":return Y(e,t)}},Z=e=>{X(e),G(e,1-e.getDate(),"day")},X=e=>{const t=e.getTimezoneOffset();W(e,864e5);const r=e.getTimezoneOffset();t!==r&&e.setTime(+e+6e4*(r-t))},W=(e,t)=>{const r=6e4*e.getTimezoneOffset();e.setTime(Math.floor((+e-r)/t)*t+r)},$=(e,t)=>{const r=z(t),a=T[r];if(a)return W(e,a);switch(r){case"y":return Z(e),G(e,-e.getMonth(),"M");case"M":return Z(e);case"w":return X(e),G(e,-e.getDay(),"d");case"D":case"d":return X(e)}},J={su:0,mo:1,tu:2,we:3,th:4,fr:5,sa:6},K=(e,t)=>{const r=e.formatToParts(t),a={};r.forEach((e=>a[e.type]=e.value));const n=J[(i=a.weekday,String(i).toLowerCase().substr(0,2))];var i;let o=(7+t.getUTCDay()-n)%7;o>3&&(o-=7);return-(60*(24*o+(t.getUTCHours()-a.hour%24))+(t.getUTCMinutes()-a.minute)+(t.getUTCSeconds()-a.second)/60)},Q=H((e=>{let t,r={},a=0;return n=>{const i=Math.floor(n/9e5);let o=r&&r[i];if(null!=o)return o;a++>96&&(r={},a=0);const l=new Date(n);if(!t){const r="numeric";t=new Intl.DateTimeFormat("en-US",{timeZone:e,hour12:!1,weekday:"short",hour:r,minute:r,second:r})}return o=K(t,l),null==o&&(o=-l.getTimezoneOffset()),r[i]=o,o}}));class ee{constructor(e){this.dt=new Date(e)}valueOf(){return+this.dt}setTime(e){return this.dt.setTime(e)}getTimezoneOffset(){return 0}getMilliseconds(){return this.dt.getUTCMilliseconds()}getSeconds(){return this.dt.getUTCSeconds()}getMinutes(){return this.dt.getUTCMinutes()}getHours(){return this.dt.getUTCHours()}getDay(){return this.dt.getUTCDay()}getDate(){return this.dt.getUTCDate()}getMonth(){return this.dt.getUTCMonth()}getFullYear(){return this.dt.getUTCFullYear()}getTime(){return+this}}class te extends ee{constructor(e,t){const r=t(e);super(e+6e4*r),this.t=e,this.tzf=t,this.tzo=r}valueOf(){return this.t}setTime(e){const t=this.tzo=this.tzf(e);return this.dt.setTime(+e+6e4*t),this.t=e}getTimezoneOffset(){return-this.tzo}}const re=(e,t,r)=>{const a=e.ro(),n=t.rw();return ae(a,n,r),t.create(n)},ae=(e,t,r)=>{const a=ne(e),n=ne(t);if(a===n)return;if(G(t,n-a,"m"),!r)return;const i=ne(t);n!==i&&G(t,i-n,"m")},ne=A.TZO,ie=H((e=>{if("number"==typeof e)-16<e&&e<16&&(e*=60);else{const t=String(e).match(/(?:^|GMT)?(?:([+-])([01]?\d):?(\d[05])|$)|(UTC|Z)$/);if(!t)return;e=60*+t[2]+ +t[3]|0,"-"===t[1]&&(e=0-e)}return t=>e}));const oe=e=>t=>(null==t?t=new Date:"string"==typeof t&&(t=+le(t,e.x.rw)),e.create(+t)),le=(e,t)=>{const r=e.match(/^(\d{4}|[-+]\d{4,6})(?:(-)(\d{2})(?:-(\d{2})(?:T((\d{2}):(\d{2})(?::(\d{2})(\.\d+)?)?))?)?)?$/)||e.match(/^(\d{4}|[-+]\d{4,6})(?:([-/])(\d+)(?:\2(\d+)(?:\s+((\d+):(\d+)(?::(\d+)(\.\d+)?)?))?)?)?$/);if(!r)return new Date(e);const a=+r[1]||0,n=+r[3]-1||0,i=+r[4]||1,o=+r[6]||0,l=+r[7]||0,s=+r[8]||0,c=1e3*+r[9]||0,m=0<=a&&a<100?100:0;if(t){const e=new Date(Date.UTC(a+m,n,i,o,l,s,c));m&&e.setUTCFullYear(a);const r=new ee(+e),h=t(+e);return ae(r,h,!0),h}{const e=new Date(a+m,n,i,o,l,s,c);return m&&e.setFullYear(a),e}},se=new class{constructor(e,t){this.t=e,"number"!=typeof e&&(this.d=e),this.x=t||Object.create({cdate:{}})}cdateFn(){return oe(this)}rw(){const e=+this.t,t=this.x.rw;return t?t(e):new Date(e)}ro(){return this.d||(this.d=this.rw())}valueOf(){return+this.ro()}toDate(){return new Date(+this)}toJSON(){return this.toDate().toJSON()}plugin(e){const t=this.constructor;return new(e(t)||t)(this.t,this.x)}create(e){return new this.constructor(e,this.x)}inherit(){const e=this.create(+this);return e.x=Object.create(e.x),e}}(0,null).plugin((e=>class extends e{handler(e){const t=this.inherit(),{x:r}=t;return r.tx=P(r).handler(e),t}format(e){return P(this.x).format(e,this.ro())}text(e){return P(this.x).strftime(e,this.ro())}locale(e){return this.handler(R(e))}})).plugin((e=>class extends e{get(e){const t=A[z(e)];if(t)return t(this.ro())}set(e,t){e=z(e);const r=A[e];if(!r)return this;const a=this.rw();return G(a,t-r(a),e),this.create(a)}startOf(e){if(!(e=z(e)))return this;const t=this.rw();return $(t,e),this.create(t)}endOf(e){if(!(e=z(e)))return this;const t=this.rw();return $(t,e),G(t,1,e),G(t,-1),this.create(t)}add(e,t){if(!(t=z(t)))return this;const r=this.rw();return G(r,e,t),this.create(r)}next(e){return this.add(1,e)}prev(e){return this.add(-1,e)}})).plugin((e=>class extends e{utc(e){const t=this.inherit();return t.x.rw=e=>new ee(+e),e?re(this,t):t}utcOffset(e,t){if(null==e)return 0-ne(this.ro());const r=this.inherit();return r.x.rw=t=>new te(+t,ie(e)),t?re(this,r):r}tz(e,t){const r=this.inherit();return r.x.rw=t=>new te(+t,Q(e)),t?re(this,r,!0):r}})).cdateFn(),ce={labels:{yesterday:"Yesterday",today:"Today",tomorrow:"Tomorrow",next:"Next",last:"Last",week:"dddd",others:"MMMM D, YYYY",past:"%s ago",future:"in %s",seconds:"seconds",minutes:"minutes",hours:"hours",days:"days",months:"months",years:"years"}};const me={R:e=>function(e,t=ce){const r="X",a=e.toString(),{specificNow:n,labels:i}={specificNow:t.specificNow,labels:{...ce.labels,...t.labels}},o=n||new Date(Date.now()),l=se(o),s=l.format(i.others),c=l.add(-1,"day").format(i.others),m=l.add(1,"day").format(i.others),h=-o.getTimezoneOffset(),u=se(a).utcOffset(h),p=u.format(r);switch(u.format(i.others)){case s:return i.today;case c:return i.yesterday;case m:return i.tomorrow}const d=u.format(i.week),f=u.format(i.others),g=l.add(-1,"week").startOf("week"),v=l.add(-1,"week").endOf("week"),b=g.format(r),y=v.format(r);if(b<=p&&p<=y)return`${i.last} ${d}`;const x=l.startOf("week"),w=l.endOf("week"),k=x.format(r),E=w.format(r);if(k<=p&&p<=E)return d;const M=l.add(1,"week").startOf("week"),C=l.add(1,"week").endOf("week"),S=M.format(r),N=C.format(r);return S<=p&&p<=N?`${i.next} ${d}`:f}(e,{labels:he}),F:e=>function(e,t=ce){const r=e.toString(),{specificNow:a,labels:n}={specificNow:t.specificNow,labels:{...ce.labels,...t.labels}},i=3600,o=86400,l=2592e3,s=31536e3,c=a||new Date(Date.now()),m=+se(c).format("X"),h=+se(r).format("X"),u=m<h?h-m:m-h;let p="";switch(!0){case u<60:p=`${u} ${n.seconds}`;break;case u<i:p=`${Math.floor(u/60)} ${n.minutes}`;break;case u<o:p=`${Math.floor(u/i)} ${n.hours}`;break;case u<l:p=`${Math.floor(u/o)} ${n.days}`;break;case u<s:p=`${Math.floor(u/l)} ${n.months}`;break;default:p=`${Math.floor(u/s)} ${n.years}`}return(m<h?n.future:n.past).replace("%s",p)}(e,{labels:he})};var he,ue=function(t){var r=t.dateOrDateTime,a=t.prefix;if(!r)return e.createElement(e.Fragment,null);var n=se().handler(me).cdateFn();return e.createElement("span",null,a,e.createElement("span",{title:n(r).format()},n(r).format(r.length>10?"R HH:mm A":"R")))},pe=function(t){var r=t.date,a=r.start,n=r.end,i=r.time_zone;return e.createElement("span",{className:"rotion-richtext-date"},e.createElement("span",{className:"rotion-richtext-atsign"},"@"),e.createElement(ue,{dateOrDateTime:a}),null!==n&&e.createElement(ue,{dateOrDateTime:n,prefix:" → "}),null!==i&&"(".concat(i,")"))},de=function(t){var r=t.text,a=t.children;return e.createElement("span",{className:"rotion-mention-template"},r,a)},fe=function(t){var r=t.textObject,a=t.children;if(!r)return e.createElement(e.Fragment,null);switch(r.mention.type){case"user":return e.createElement(m,{payload:r});case"date":return e.createElement(pe,{date:r.mention.date});case"link_preview":return e.createElement(w,{url:r.mention.link_preview.url,text:r.plain_text});case"page":return e.createElement(u,{mention:r.mention.page});case"database":return e.createElement(u,{mention:r.mention.database});case"template_mention":return e.createElement(de,{text:r.plain_text},a);default:return console.log("unsupport mention: ".concat(r.mention)),e.createElement(e.Fragment,null)}},ge=function(t){var r=t.condition,a=t.textObject,n=t.children;return r?function(t){var r=t.textObject,a=t.children;return e.createElement("a",{className:"rotion-richtext-link",href:r.href,rel:"noreferrer",target:"_blank"},a)}({textObject:a,children:n}):function(t){var r=t.children;return e.createElement(e.Fragment,null,r)}({children:n})},ve=function(t){var r=t.textObject,a=t.children;if(!r)return e.createElement(e.Fragment,null);var n=r.annotations,i=n.color,o=["rotion-richtext-annot"];if(o.push(n.code&&"default"===i?"":"rotion-richtext-".concat(i.replace("_background","-bg"))),n.bold&&o.push("rotion-richtext-bold"),n.italic&&o.push("rotion-richtext-italic"),n.strikethrough&&o.push("rotion-richtext-strikethrough"),n.underline&&o.push("rotion-richtext-underline"),n.code&&o.push("rotion-richtext-code ".concat("default"===i||i.includes("background")?"rotion-richtext-code-color":"")),!n.code&&i.includes("background")&&o.push("rotion-richtext-nocode-bg"),a)return e.createElement("span",{className:o.join(" ")},a);var l=r.plain_text.replace(/\n/g,"<br />");return e.createElement("span",{className:o.join(" "),dangerouslySetInnerHTML:{__html:l}})},be=function(t){var r=t.textObject,a=r.href;return e.createElement(ge,{condition:null!==a,textObject:r},e.createElement(ve,{textObject:r}))};class ye{constructor(e,t,r){this.lexer=void 0,this.start=void 0,this.end=void 0,this.lexer=e,this.start=t,this.end=r}static range(e,t){return t?e&&e.loc&&t.loc&&e.loc.lexer===t.loc.lexer?new ye(e.loc.lexer,e.loc.start,t.loc.end):null:e&&e.loc}}class xe{constructor(e,t){this.text=void 0,this.loc=void 0,this.noexpand=void 0,this.treatAsRelax=void 0,this.text=e,this.loc=t}range(e,t){return new xe(t,ye.range(this,e))}}class we{constructor(e,t){this.name=void 0,this.position=void 0,this.length=void 0,this.rawMessage=void 0;var r,a,n="KaTeX parse error: "+e,i=t&&t.loc;if(i&&i.start<=i.end){var o=i.lexer.input;r=i.start,a=i.end,r===o.length?n+=" at end of input: ":n+=" at position "+(r+1)+": ";var l=o.slice(r,a).replace(/[^]/g,"$&̲");n+=(r>15?"…"+o.slice(r-15,r):o.slice(0,r))+l+(a+15<o.length?o.slice(a,a+15)+"…":o.slice(a))}var s=new Error(n);return s.name="ParseError",s.__proto__=we.prototype,s.position=r,null!=r&&null!=a&&(s.length=a-r),s.rawMessage=e,s}}we.prototype.__proto__=Error.prototype;var ke=/([A-Z])/g,Ee={"&":"&",">":">","<":"<",'"':""","'":"'"},Me=/[&><"']/g;var Ce=function e(t){return"ordgroup"===t.type||"color"===t.type?1===t.body.length?e(t.body[0]):t:"font"===t.type?e(t.body):t},Se={contains:function(e,t){return-1!==e.indexOf(t)},deflt:function(e,t){return void 0===e?t:e},escape:function(e){return String(e).replace(Me,(e=>Ee[e]))},hyphenate:function(e){return e.replace(ke,"-$1").toLowerCase()},getBaseElem:Ce,isCharacterBox:function(e){var t=Ce(e);return"mathord"===t.type||"textord"===t.type||"atom"===t.type},protocolFromUrl:function(e){var t=/^[\x00-\x20]*([^\\/#?]*?)(:|�*58|�*3a|&colon)/i.exec(e);return t?":"!==t[2]?null:/^[a-zA-Z][a-zA-Z0-9+\-.]*$/.test(t[1])?t[1].toLowerCase():null:"_relative"}},Ne={displayMode:{type:"boolean",description:"Render math in display mode, which puts the math in display style (so \\int and \\sum are large, for example), and centers the math on the page on its own line.",cli:"-d, --display-mode"},output:{type:{enum:["htmlAndMathml","html","mathml"]},description:"Determines the markup language of the output.",cli:"-F, --format <type>"},leqno:{type:"boolean",description:"Render display math in leqno style (left-justified tags)."},fleqn:{type:"boolean",description:"Render display math flush left."},throwOnError:{type:"boolean",default:!0,cli:"-t, --no-throw-on-error",cliDescription:"Render errors (in the color given by --error-color) instead of throwing a ParseError exception when encountering an error."},errorColor:{type:"string",default:"#cc0000",cli:"-c, --error-color <color>",cliDescription:"A color string given in the format 'rgb' or 'rrggbb' (no #). This option determines the color of errors rendered by the -t option.",cliProcessor:e=>"#"+e},macros:{type:"object",cli:"-m, --macro <def>",cliDescription:"Define custom macro of the form '\\foo:expansion' (use multiple -m arguments for multiple macros).",cliDefault:[],cliProcessor:(e,t)=>(t.push(e),t)},minRuleThickness:{type:"number",description:"Specifies a minimum thickness, in ems, for fraction lines, `\\sqrt` top lines, `{array}` vertical lines, `\\hline`, `\\hdashline`, `\\underline`, `\\overline`, and the borders of `\\fbox`, `\\boxed`, and `\\fcolorbox`.",processor:e=>Math.max(0,e),cli:"--min-rule-thickness <size>",cliProcessor:parseFloat},colorIsTextColor:{type:"boolean",description:"Makes \\color behave like LaTeX's 2-argument \\textcolor, instead of LaTeX's one-argument \\color mode change.",cli:"-b, --color-is-text-color"},strict:{type:[{enum:["warn","ignore","error"]},"boolean","function"],description:"Turn on strict / LaTeX faithfulness mode, which throws an error if the input uses features that are not supported by LaTeX.",cli:"-S, --strict",cliDefault:!1},trust:{type:["boolean","function"],description:"Trust the input, enabling all HTML features such as \\url.",cli:"-T, --trust"},maxSize:{type:"number",default:1/0,description:"If non-zero, all user-specified sizes, e.g. in \\rule{500em}{500em}, will be capped to maxSize ems. Otherwise, elements and spaces can be arbitrarily large",processor:e=>Math.max(0,e),cli:"-s, --max-size <n>",cliProcessor:parseInt},maxExpand:{type:"number",default:1e3,description:"Limit the number of macro expansions to the specified number, to prevent e.g. infinite macro loops. If set to Infinity, the macro expander will try to fully expand as in LaTeX.",processor:e=>Math.max(0,e),cli:"-e, --max-expand <n>",cliProcessor:e=>"Infinity"===e?1/0:parseInt(e)},globalGroup:{type:"boolean",cli:!1}};function ze(e){if(e.default)return e.default;var t=e.type,r=Array.isArray(t)?t[0]:t;if("string"!=typeof r)return r.enum[0];switch(r){case"boolean":return!1;case"string":return"";case"number":return 0;case"object":return{}}}class Te{constructor(e){for(var t in this.displayMode=void 0,this.output=void 0,this.leqno=void 0,this.fleqn=void 0,this.throwOnError=void 0,this.errorColor=void 0,this.macros=void 0,this.minRuleThickness=void 0,this.colorIsTextColor=void 0,this.strict=void 0,this.trust=void 0,this.maxSize=void 0,this.maxExpand=void 0,this.globalGroup=void 0,e=e||{},Ne)if(Ne.hasOwnProperty(t)){var r=Ne[t];this[t]=void 0!==e[t]?r.processor?r.processor(e[t]):e[t]:ze(r)}}reportNonstrict(e,t,r){var a=this.strict;if("function"==typeof a&&(a=a(e,t,r)),a&&"ignore"!==a){if(!0===a||"error"===a)throw new we("LaTeX-incompatible input and strict mode is set to 'error': "+t+" ["+e+"]",r);"warn"===a?"undefined"!=typeof console&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+t+" ["+e+"]"):"undefined"!=typeof console&&console.warn("LaTeX-incompatible input and strict mode is set to unrecognized '"+a+"': "+t+" ["+e+"]")}}useStrictBehavior(e,t,r){var a=this.strict;if("function"==typeof a)try{a=a(e,t,r)}catch(e){a="error"}return!(!a||"ignore"===a)&&(!0===a||"error"===a||("warn"===a?("undefined"!=typeof console&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+t+" ["+e+"]"),!1):("undefined"!=typeof console&&console.warn("LaTeX-incompatible input and strict mode is set to unrecognized '"+a+"': "+t+" ["+e+"]"),!1)))}isTrusted(e){if(e.url&&!e.protocol){var t=Se.protocolFromUrl(e.url);if(null==t)return!1;e.protocol=t}var r="function"==typeof this.trust?this.trust(e):this.trust;return Boolean(r)}}class Ae{constructor(e,t,r){this.id=void 0,this.size=void 0,this.cramped=void 0,this.id=e,this.size=t,this.cramped=r}sup(){return qe[Le[this.id]]}sub(){return qe[Be[this.id]]}fracNum(){return qe[Oe[this.id]]}fracDen(){return qe[He[this.id]]}cramp(){return qe[Ie[this.id]]}text(){return qe[Re[this.id]]}isTight(){return this.size>=2}}var qe=[new Ae(0,0,!1),new Ae(1,0,!0),new Ae(2,1,!1),new Ae(3,1,!0),new Ae(4,2,!1),new Ae(5,2,!0),new Ae(6,3,!1),new Ae(7,3,!0)],Le=[4,5,4,5,6,7,6,7],Be=[5,5,5,5,7,7,7,7],Oe=[2,3,4,5,6,7,6,7],He=[3,3,5,5,7,7,7,7],Ie=[1,1,3,3,5,5,7,7],Re=[0,1,2,3,2,3,2,3],De={DISPLAY:qe[0],TEXT:qe[2],SCRIPT:qe[4],SCRIPTSCRIPT:qe[6]},Fe=[{name:"latin",blocks:[[256,591],[768,879]]},{name:"cyrillic",blocks:[[1024,1279]]},{name:"armenian",blocks:[[1328,1423]]},{name:"brahmic",blocks:[[2304,4255]]},{name:"georgian",blocks:[[4256,4351]]},{name:"cjk",blocks:[[12288,12543],[19968,40879],[65280,65376]]},{name:"hangul",blocks:[[44032,55215]]}];var je=[];function Ve(e){for(var t=0;t<je.length;t+=2)if(e>=je[t]&&e<=je[t+1])return!0;return!1}Fe.forEach((e=>e.blocks.forEach((e=>je.push(...e)))));var _e=80,Pe={doubleleftarrow:"M262 157\nl10-10c34-36 62.7-77 86-123 3.3-8 5-13.3 5-16 0-5.3-6.7-8-20-8-7.3\n 0-12.2.5-14.5 1.5-2.3 1-4.8 4.5-7.5 10.5-49.3 97.3-121.7 169.3-217 216-28\n 14-57.3 25-88 33-6.7 2-11 3.8-13 5.5-2 1.7-3 4.2-3 7.5s1 5.8 3 7.5\nc2 1.7 6.3 3.5 13 5.5 68 17.3 128.2 47.8 180.5 91.5 52.3 43.7 93.8 96.2 124.5\n 157.5 9.3 8 15.3 12.3 18 13h6c12-.7 18-4 18-10 0-2-1.7-7-5-15-23.3-46-52-87\n-86-123l-10-10h399738v-40H218c328 0 0 0 0 0l-10-8c-26.7-20-65.7-43-117-69 2.7\n-2 6-3.7 10-5 36.7-16 72.3-37.3 107-64l10-8h399782v-40z\nm8 0v40h399730v-40zm0 194v40h399730v-40z",doublerightarrow:"M399738 392l\n-10 10c-34 36-62.7 77-86 123-3.3 8-5 13.3-5 16 0 5.3 6.7 8 20 8 7.3 0 12.2-.5\n 14.5-1.5 2.3-1 4.8-4.5 7.5-10.5 49.3-97.3 121.7-169.3 217-216 28-14 57.3-25 88\n-33 6.7-2 11-3.8 13-5.5 2-1.7 3-4.2 3-7.5s-1-5.8-3-7.5c-2-1.7-6.3-3.5-13-5.5-68\n-17.3-128.2-47.8-180.5-91.5-52.3-43.7-93.8-96.2-124.5-157.5-9.3-8-15.3-12.3-18\n-13h-6c-12 .7-18 4-18 10 0 2 1.7 7 5 15 23.3 46 52 87 86 123l10 10H0v40h399782\nc-328 0 0 0 0 0l10 8c26.7 20 65.7 43 117 69-2.7 2-6 3.7-10 5-36.7 16-72.3 37.3\n-107 64l-10 8H0v40zM0 157v40h399730v-40zm0 194v40h399730v-40z",leftarrow:"M400000 241H110l3-3c68.7-52.7 113.7-120\n 135-202 4-14.7 6-23 6-25 0-7.3-7-11-21-11-8 0-13.2.8-15.5 2.5-2.3 1.7-4.2 5.8\n-5.5 12.5-1.3 4.7-2.7 10.3-4 17-12 48.7-34.8 92-68.5 130S65.3 228.3 18 247\nc-10 4-16 7.7-18 11 0 8.7 6 14.3 18 17 47.3 18.7 87.8 47 121.5 85S196 441.3 208\n 490c.7 2 1.3 5 2 9s1.2 6.7 1.5 8c.3 1.3 1 3.3 2 6s2.2 4.5 3.5 5.5c1.3 1 3.3\n 1.8 6 2.5s6 1 10 1c14 0 21-3.7 21-11 0-2-2-10.3-6-25-20-79.3-65-146.7-135-202\n l-3-3h399890zM100 241v40h399900v-40z",leftbrace:"M6 548l-6-6v-35l6-11c56-104 135.3-181.3 238-232 57.3-28.7 117\n-45 179-50h399577v120H403c-43.3 7-81 15-113 26-100.7 33-179.7 91-237 174-2.7\n 5-6 9-10 13-.7 1-7.3 1-20 1H6z",leftbraceunder:"M0 6l6-6h17c12.688 0 19.313.3 20 1 4 4 7.313 8.3 10 13\n 35.313 51.3 80.813 93.8 136.5 127.5 55.688 33.7 117.188 55.8 184.5 66.5.688\n 0 2 .3 4 1 18.688 2.7 76 4.3 172 5h399450v120H429l-6-1c-124.688-8-235-61.7\n-331-161C60.687 138.7 32.312 99.3 7 54L0 41V6z",leftgroup:"M400000 80\nH435C64 80 168.3 229.4 21 260c-5.9 1.2-18 0-18 0-2 0-3-1-3-3v-38C76 61 257 0\n 435 0h399565z",leftgroupunder:"M400000 262\nH435C64 262 168.3 112.6 21 82c-5.9-1.2-18 0-18 0-2 0-3 1-3 3v38c76 158 257 219\n 435 219h399565z",leftharpoon:"M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3\n-3.3 10.2-9.5 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5\n-18.3 3-21-1.3-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7\n-196 228-6.7 4.7-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40z",leftharpoonplus:"M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3-3.3 10.2-9.5\n 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5-18.3 3-21-1.3\n-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7-196 228-6.7 4.7\n-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40zM0 435v40h400000v-40z\nm0 0v40h400000v-40z",leftharpoondown:"M7 241c-4 4-6.333 8.667-7 14 0 5.333.667 9 2 11s5.333\n 5.333 12 10c90.667 54 156 130 196 228 3.333 10.667 6.333 16.333 9 17 2 .667 5\n 1 9 1h5c10.667 0 16.667-2 18-6 2-2.667 1-9.667-3-21-32-87.333-82.667-157.667\n-152-211l-3-3h399907v-40zM93 281 H400000 v-40L7 241z",leftharpoondownplus:"M7 435c-4 4-6.3 8.7-7 14 0 5.3.7 9 2 11s5.3 5.3 12\n 10c90.7 54 156 130 196 228 3.3 10.7 6.3 16.3 9 17 2 .7 5 1 9 1h5c10.7 0 16.7\n-2 18-6 2-2.7 1-9.7-3-21-32-87.3-82.7-157.7-152-211l-3-3h399907v-40H7zm93 0\nv40h399900v-40zM0 241v40h399900v-40zm0 0v40h399900v-40z",lefthook:"M400000 281 H103s-33-11.2-61-33.5S0 197.3 0 164s14.2-61.2 42.5\n-83.5C70.8 58.2 104 47 142 47 c16.7 0 25 6.7 25 20 0 12-8.7 18.7-26 20-40 3.3\n-68.7 15.7-86 37-10 12-15 25.3-15 40 0 22.7 9.8 40.7 29.5 54 19.7 13.3 43.5 21\n 71.5 23h399859zM103 281v-40h399897v40z",leftlinesegment:"M40 281 V428 H0 V94 H40 V241 H400000 v40z\nM40 281 V428 H0 V94 H40 V241 H400000 v40z",leftmapsto:"M40 281 V448H0V74H40V241H400000v40z\nM40 281 V448H0V74H40V241H400000v40z",leftToFrom:"M0 147h400000v40H0zm0 214c68 40 115.7 95.7 143 167h22c15.3 0 23\n-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69-70-101l-7-8h399905v-40H95l7-8\nc28.7-32 52-65.7 70-101 10.7-23.3 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 265.3\n 68 321 0 361zm0-174v-40h399900v40zm100 154v40h399900v-40z",longequal:"M0 50 h400000 v40H0z m0 194h40000v40H0z\nM0 50 h400000 v40H0z m0 194h40000v40H0z",midbrace:"M200428 334\nc-100.7-8.3-195.3-44-280-108-55.3-42-101.7-93-139-153l-9-14c-2.7 4-5.7 8.7-9 14\n-53.3 86.7-123.7 153-211 199-66.7 36-137.3 56.3-212 62H0V214h199568c178.3-11.7\n 311.7-78.3 403-201 6-8 9.7-12 11-12 .7-.7 6.7-1 18-1s17.3.3 18 1c1.3 0 5 4 11\n 12 44.7 59.3 101.3 106.3 170 141s145.3 54.3 229 60h199572v120z",midbraceunder:"M199572 214\nc100.7 8.3 195.3 44 280 108 55.3 42 101.7 93 139 153l9 14c2.7-4 5.7-8.7 9-14\n 53.3-86.7 123.7-153 211-199 66.7-36 137.3-56.3 212-62h199568v120H200432c-178.3\n 11.7-311.7 78.3-403 201-6 8-9.7 12-11 12-.7.7-6.7 1-18 1s-17.3-.3-18-1c-1.3 0\n-5-4-11-12-44.7-59.3-101.3-106.3-170-141s-145.3-54.3-229-60H0V214z",oiintSize1:"M512.6 71.6c272.6 0 320.3 106.8 320.3 178.2 0 70.8-47.7 177.6\n-320.3 177.6S193.1 320.6 193.1 249.8c0-71.4 46.9-178.2 319.5-178.2z\nm368.1 178.2c0-86.4-60.9-215.4-368.1-215.4-306.4 0-367.3 129-367.3 215.4 0 85.8\n60.9 214.8 367.3 214.8 307.2 0 368.1-129 368.1-214.8z",oiintSize2:"M757.8 100.1c384.7 0 451.1 137.6 451.1 230 0 91.3-66.4 228.8\n-451.1 228.8-386.3 0-452.7-137.5-452.7-228.8 0-92.4 66.4-230 452.7-230z\nm502.4 230c0-111.2-82.4-277.2-502.4-277.2s-504 166-504 277.2\nc0 110 84 276 504 276s502.4-166 502.4-276z",oiiintSize1:"M681.4 71.6c408.9 0 480.5 106.8 480.5 178.2 0 70.8-71.6 177.6\n-480.5 177.6S202.1 320.6 202.1 249.8c0-71.4 70.5-178.2 479.3-178.2z\nm525.8 178.2c0-86.4-86.8-215.4-525.7-215.4-437.9 0-524.7 129-524.7 215.4 0\n85.8 86.8 214.8 524.7 214.8 438.9 0 525.7-129 525.7-214.8z",oiiintSize2:"M1021.2 53c603.6 0 707.8 165.8 707.8 277.2 0 110-104.2 275.8\n-707.8 275.8-606 0-710.2-165.8-710.2-275.8C311 218.8 415.2 53 1021.2 53z\nm770.4 277.1c0-131.2-126.4-327.6-770.5-327.6S248.4 198.9 248.4 330.1\nc0 130 128.8 326.4 772.7 326.4s770.5-196.4 770.5-326.4z",rightarrow:"M0 241v40h399891c-47.3 35.3-84 78-110 128\n-16.7 32-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20\n 11 8 0 13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7\n 39-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85\n-40.5-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5\n-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67\n 151.7 139 205zm0 0v40h399900v-40z",rightbrace:"M400000 542l\n-6 6h-17c-12.7 0-19.3-.3-20-1-4-4-7.3-8.3-10-13-35.3-51.3-80.8-93.8-136.5-127.5\ns-117.2-55.8-184.5-66.5c-.7 0-2-.3-4-1-18.7-2.7-76-4.3-172-5H0V214h399571l6 1\nc124.7 8 235 61.7 331 161 31.3 33.3 59.7 72.7 85 118l7 13v35z",rightbraceunder:"M399994 0l6 6v35l-6 11c-56 104-135.3 181.3-238 232-57.3\n 28.7-117 45-179 50H-300V214h399897c43.3-7 81-15 113-26 100.7-33 179.7-91 237\n-174 2.7-5 6-9 10-13 .7-1 7.3-1 20-1h17z",rightgroup:"M0 80h399565c371 0 266.7 149.4 414 180 5.9 1.2 18 0 18 0 2 0\n 3-1 3-3v-38c-76-158-257-219-435-219H0z",rightgroupunder:"M0 262h399565c371 0 266.7-149.4 414-180 5.9-1.2 18 0 18\n 0 2 0 3 1 3 3v38c-76 158-257 219-435 219H0z",rightharpoon:"M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3\n-3.7-15.3-11-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2\n-10.7 0-16.7 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58\n 69.2 92 94.5zm0 0v40h399900v-40z",rightharpoonplus:"M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3-3.7-15.3-11\n-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2-10.7 0-16.7\n 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58 69.2 92 94.5z\nm0 0v40h399900v-40z m100 194v40h399900v-40zm0 0v40h399900v-40z",rightharpoondown:"M399747 511c0 7.3 6.7 11 20 11 8 0 13-.8 15-2.5s4.7-6.8\n 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3 8.5-5.8 9.5\n-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3-64.7 57-92 95\n-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 241v40h399900v-40z",rightharpoondownplus:"M399747 705c0 7.3 6.7 11 20 11 8 0 13-.8\n 15-2.5s4.7-6.8 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3\n 8.5-5.8 9.5-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3\n-64.7 57-92 95-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 435v40h399900v-40z\nm0-194v40h400000v-40zm0 0v40h400000v-40z",righthook:"M399859 241c-764 0 0 0 0 0 40-3.3 68.7-15.7 86-37 10-12 15-25.3\n 15-40 0-22.7-9.8-40.7-29.5-54-19.7-13.3-43.5-21-71.5-23-17.3-1.3-26-8-26-20 0\n-13.3 8.7-20 26-20 38 0 71 11.2 99 33.5 0 0 7 5.6 21 16.7 14 11.2 21 33.5 21\n 66.8s-14 61.2-42 83.5c-28 22.3-61 33.5-99 33.5L0 241z M0 281v-40h399859v40z",rightlinesegment:"M399960 241 V94 h40 V428 h-40 V281 H0 v-40z\nM399960 241 V94 h40 V428 h-40 V281 H0 v-40z",rightToFrom:"M400000 167c-70.7-42-118-97.7-142-167h-23c-15.3 0-23 .3-23\n 1 0 1.3 5.3 13.7 16 37 18 35.3 41.3 69 70 101l7 8H0v40h399905l-7 8c-28.7 32\n-52 65.7-70 101-10.7 23.3-16 35.7-16 37 0 .7 7.7 1 23 1h23c24-69.3 71.3-125 142\n-167z M100 147v40h399900v-40zM0 341v40h399900v-40z",twoheadleftarrow:"M0 167c68 40\n 115.7 95.7 143 167h22c15.3 0 23-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69\n-70-101l-7-8h125l9 7c50.7 39.3 85 86 103 140h46c0-4.7-6.3-18.7-19-42-18-35.3\n-40-67.3-66-96l-9-9h399716v-40H284l9-9c26-28.7 48-60.7 66-96 12.7-23.333 19\n-37.333 19-42h-46c-18 54-52.3 100.7-103 140l-9 7H95l7-8c28.7-32 52-65.7 70-101\n 10.7-23.333 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 71.3 68 127 0 167z",twoheadrightarrow:"M400000 167\nc-68-40-115.7-95.7-143-167h-22c-15.3 0-23 .3-23 1 0 1.3 5.3 13.7 16 37 18 35.3\n 41.3 69 70 101l7 8h-125l-9-7c-50.7-39.3-85-86-103-140h-46c0 4.7 6.3 18.7 19 42\n 18 35.3 40 67.3 66 96l9 9H0v40h399716l-9 9c-26 28.7-48 60.7-66 96-12.7 23.333\n-19 37.333-19 42h46c18-54 52.3-100.7 103-140l9-7h125l-7 8c-28.7 32-52 65.7-70\n 101-10.7 23.333-16 35.7-16 37 0 .7 7.7 1 23 1h22c27.3-71.3 75-127 143-167z",tilde1:"M200 55.538c-77 0-168 73.953-177 73.953-3 0-7\n-2.175-9-5.437L2 97c-1-2-2-4-2-6 0-4 2-7 5-9l20-12C116 12 171 0 207 0c86 0\n 114 68 191 68 78 0 168-68 177-68 4 0 7 2 9 5l12 19c1 2.175 2 4.35 2 6.525 0\n 4.35-2 7.613-5 9.788l-19 13.05c-92 63.077-116.937 75.308-183 76.128\n-68.267.847-113-73.952-191-73.952z",tilde2:"M344 55.266c-142 0-300.638 81.316-311.5 86.418\n-8.01 3.762-22.5 10.91-23.5 5.562L1 120c-1-2-1-3-1-4 0-5 3-9 8-10l18.4-9C160.9\n 31.9 283 0 358 0c148 0 188 122 331 122s314-97 326-97c4 0 8 2 10 7l7 21.114\nc1 2.14 1 3.21 1 4.28 0 5.347-3 9.626-7 10.696l-22.3 12.622C852.6 158.372 751\n 181.476 676 181.476c-149 0-189-126.21-332-126.21z",tilde3:"M786 59C457 59 32 175.242 13 175.242c-6 0-10-3.457\n-11-10.37L.15 138c-1-7 3-12 10-13l19.2-6.4C378.4 40.7 634.3 0 804.3 0c337 0\n 411.8 157 746.8 157 328 0 754-112 773-112 5 0 10 3 11 9l1 14.075c1 8.066-.697\n 16.595-6.697 17.492l-21.052 7.31c-367.9 98.146-609.15 122.696-778.15 122.696\n -338 0-409-156.573-744-156.573z",tilde4:"M786 58C457 58 32 177.487 13 177.487c-6 0-10-3.345\n-11-10.035L.15 143c-1-7 3-12 10-13l22-6.7C381.2 35 637.15 0 807.15 0c337 0 409\n 177 744 177 328 0 754-127 773-127 5 0 10 3 11 9l1 14.794c1 7.805-3 13.38-9\n 14.495l-20.7 5.574c-366.85 99.79-607.3 139.372-776.3 139.372-338 0-409\n -175.236-744-175.236z",vec:"M377 20c0-5.333 1.833-10 5.5-14S391 0 397 0c4.667 0 8.667 1.667 12 5\n3.333 2.667 6.667 9 10 19 6.667 24.667 20.333 43.667 41 57 7.333 4.667 11\n10.667 11 18 0 6-1 10-3 12s-6.667 5-14 9c-28.667 14.667-53.667 35.667-75 63\n-1.333 1.333-3.167 3.5-5.5 6.5s-4 4.833-5 5.5c-1 .667-2.5 1.333-4.5 2s-4.333 1\n-7 1c-4.667 0-9.167-1.833-13.5-5.5S337 184 337 178c0-12.667 15.667-32.333 47-59\nH213l-171-1c-8.667-6-13-12.333-13-19 0-4.667 4.333-11.333 13-20h359\nc-16-25.333-24-45-24-59z",widehat1:"M529 0h5l519 115c5 1 9 5 9 10 0 1-1 2-1 3l-4 22\nc-1 5-5 9-11 9h-2L532 67 19 159h-2c-5 0-9-4-11-9l-5-22c-1-6 2-12 8-13z",widehat2:"M1181 0h2l1171 176c6 0 10 5 10 11l-2 23c-1 6-5 10\n-11 10h-1L1182 67 15 220h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z",widehat3:"M1181 0h2l1171 236c6 0 10 5 10 11l-2 23c-1 6-5 10\n-11 10h-1L1182 67 15 280h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z",widehat4:"M1181 0h2l1171 296c6 0 10 5 10 11l-2 23c-1 6-5 10\n-11 10h-1L1182 67 15 340h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z",widecheck1:"M529,159h5l519,-115c5,-1,9,-5,9,-10c0,-1,-1,-2,-1,-3l-4,-22c-1,\n-5,-5,-9,-11,-9h-2l-512,92l-513,-92h-2c-5,0,-9,4,-11,9l-5,22c-1,6,2,12,8,13z",widecheck2:"M1181,220h2l1171,-176c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,\n-11,-10h-1l-1168,153l-1167,-153h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z",widecheck3:"M1181,280h2l1171,-236c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,\n-11,-10h-1l-1168,213l-1167,-213h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z",widecheck4:"M1181,340h2l1171,-296c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,\n-11,-10h-1l-1168,273l-1167,-273h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z",baraboveleftarrow:"M400000 620h-399890l3 -3c68.7 -52.7 113.7 -120 135 -202\nc4 -14.7 6 -23 6 -25c0 -7.3 -7 -11 -21 -11c-8 0 -13.2 0.8 -15.5 2.5\nc-2.3 1.7 -4.2 5.8 -5.5 12.5c-1.3 4.7 -2.7 10.3 -4 17c-12 48.7 -34.8 92 -68.5 130\ns-74.2 66.3 -121.5 85c-10 4 -16 7.7 -18 11c0 8.7 6 14.3 18 17c47.3 18.7 87.8 47\n121.5 85s56.5 81.3 68.5 130c0.7 2 1.3 5 2 9s1.2 6.7 1.5 8c0.3 1.3 1 3.3 2 6\ns2.2 4.5 3.5 5.5c1.3 1 3.3 1.8 6 2.5s6 1 10 1c14 0 21 -3.7 21 -11\nc0 -2 -2 -10.3 -6 -25c-20 -79.3 -65 -146.7 -135 -202l-3 -3h399890z\nM100 620v40h399900v-40z M0 241v40h399900v-40zM0 241v40h399900v-40z",rightarrowabovebar:"M0 241v40h399891c-47.3 35.3-84 78-110 128-16.7 32\n-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20 11 8 0\n13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7 39\n-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85-40.5\n-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5\n-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67\n151.7 139 205zm96 379h399894v40H0zm0 0h399904v40H0z",baraboveshortleftharpoon:"M507,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11\nc1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17\nc2,0.7,5,1,9,1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21\nc-32,-87.3,-82.7,-157.7,-152,-211c0,0,-3,-3,-3,-3l399351,0l0,-40\nc-398570,0,-399437,0,-399437,0z M593 435 v40 H399500 v-40z\nM0 281 v-40 H399908 v40z M0 281 v-40 H399908 v40z",rightharpoonaboveshortbar:"M0,241 l0,40c399126,0,399993,0,399993,0\nc4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,\n-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6\nc-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z\nM0 241 v40 H399908 v-40z M0 475 v-40 H399500 v40z M0 475 v-40 H399500 v40z",shortbaraboveleftharpoon:"M7,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11\nc1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17c2,0.7,5,1,9,\n1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21c-32,-87.3,-82.7,-157.7,\n-152,-211c0,0,-3,-3,-3,-3l399907,0l0,-40c-399126,0,-399993,0,-399993,0z\nM93 435 v40 H400000 v-40z M500 241 v40 H400000 v-40z M500 241 v40 H400000 v-40z",shortrightharpoonabovebar:"M53,241l0,40c398570,0,399437,0,399437,0\nc4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,\n-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6\nc-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z\nM500 241 v40 H399408 v-40z M500 435 v40 H400000 v-40z"};class Ue{constructor(e){this.children=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.children=e,this.classes=[],this.height=0,this.depth=0,this.maxFontSize=0,this.style={}}hasClass(e){return Se.contains(this.classes,e)}toNode(){for(var e=document.createDocumentFragment(),t=0;t<this.children.length;t++)e.appendChild(this.children[t].toNode());return e}toMarkup(){for(var e="",t=0;t<this.children.length;t++)e+=this.children[t].toMarkup();return e}toText(){return this.children.map((e=>e.toText())).join("")}}var Ye={"AMS-Regular":{32:[0,0,0,0,.25],65:[0,.68889,0,0,.72222],66:[0,.68889,0,0,.66667],67:[0,.68889,0,0,.72222],68:[0,.68889,0,0,.72222],69:[0,.68889,0,0,.66667],70:[0,.68889,0,0,.61111],71:[0,.68889,0,0,.77778],72:[0,.68889,0,0,.77778],73:[0,.68889,0,0,.38889],74:[.16667,.68889,0,0,.5],75:[0,.68889,0,0,.77778],76:[0,.68889,0,0,.66667],77:[0,.68889,0,0,.94445],78:[0,.68889,0,0,.72222],79:[.16667,.68889,0,0,.77778],80:[0,.68889,0,0,.61111],81:[.16667,.68889,0,0,.77778],82:[0,.68889,0,0,.72222],83:[0,.68889,0,0,.55556],84:[0,.68889,0,0,.66667],85:[0,.68889,0,0,.72222],86:[0,.68889,0,0,.72222],87:[0,.68889,0,0,1],88:[0,.68889,0,0,.72222],89:[0,.68889,0,0,.72222],90:[0,.68889,0,0,.66667],107:[0,.68889,0,0,.55556],160:[0,0,0,0,.25],165:[0,.675,.025,0,.75],174:[.15559,.69224,0,0,.94666],240:[0,.68889,0,0,.55556],295:[0,.68889,0,0,.54028],710:[0,.825,0,0,2.33334],732:[0,.9,0,0,2.33334],770:[0,.825,0,0,2.33334],771:[0,.9,0,0,2.33334],989:[.08167,.58167,0,0,.77778],1008:[0,.43056,.04028,0,.66667],8245:[0,.54986,0,0,.275],8463:[0,.68889,0,0,.54028],8487:[0,.68889,0,0,.72222],8498:[0,.68889,0,0,.55556],8502:[0,.68889,0,0,.66667],8503:[0,.68889,0,0,.44445],8504:[0,.68889,0,0,.66667],8513:[0,.68889,0,0,.63889],8592:[-.03598,.46402,0,0,.5],8594:[-.03598,.46402,0,0,.5],8602:[-.13313,.36687,0,0,1],8603:[-.13313,.36687,0,0,1],8606:[.01354,.52239,0,0,1],8608:[.01354,.52239,0,0,1],8610:[.01354,.52239,0,0,1.11111],8611:[.01354,.52239,0,0,1.11111],8619:[0,.54986,0,0,1],8620:[0,.54986,0,0,1],8621:[-.13313,.37788,0,0,1.38889],8622:[-.13313,.36687,0,0,1],8624:[0,.69224,0,0,.5],8625:[0,.69224,0,0,.5],8630:[0,.43056,0,0,1],8631:[0,.43056,0,0,1],8634:[.08198,.58198,0,0,.77778],8635:[.08198,.58198,0,0,.77778],8638:[.19444,.69224,0,0,.41667],8639:[.19444,.69224,0,0,.41667],8642:[.19444,.69224,0,0,.41667],8643:[.19444,.69224,0,0,.41667],8644:[.1808,.675,0,0,1],8646:[.1808,.675,0,0,1],8647:[.1808,.675,0,0,1],8648:[.19444,.69224,0,0,.83334],8649:[.1808,.675,0,0,1],8650:[.19444,.69224,0,0,.83334],8651:[.01354,.52239,0,0,1],8652:[.01354,.52239,0,0,1],8653:[-.13313,.36687,0,0,1],8654:[-.13313,.36687,0,0,1],8655:[-.13313,.36687,0,0,1],8666:[.13667,.63667,0,0,1],8667:[.13667,.63667,0,0,1],8669:[-.13313,.37788,0,0,1],8672:[-.064,.437,0,0,1.334],8674:[-.064,.437,0,0,1.334],8705:[0,.825,0,0,.5],8708:[0,.68889,0,0,.55556],8709:[.08167,.58167,0,0,.77778],8717:[0,.43056,0,0,.42917],8722:[-.03598,.46402,0,0,.5],8724:[.08198,.69224,0,0,.77778],8726:[.08167,.58167,0,0,.77778],8733:[0,.69224,0,0,.77778],8736:[0,.69224,0,0,.72222],8737:[0,.69224,0,0,.72222],8738:[.03517,.52239,0,0,.72222],8739:[.08167,.58167,0,0,.22222],8740:[.25142,.74111,0,0,.27778],8741:[.08167,.58167,0,0,.38889],8742:[.25142,.74111,0,0,.5],8756:[0,.69224,0,0,.66667],8757:[0,.69224,0,0,.66667],8764:[-.13313,.36687,0,0,.77778],8765:[-.13313,.37788,0,0,.77778],8769:[-.13313,.36687,0,0,.77778],8770:[-.03625,.46375,0,0,.77778],8774:[.30274,.79383,0,0,.77778],8776:[-.01688,.48312,0,0,.77778],8778:[.08167,.58167,0,0,.77778],8782:[.06062,.54986,0,0,.77778],8783:[.06062,.54986,0,0,.77778],8785:[.08198,.58198,0,0,.77778],8786:[.08198,.58198,0,0,.77778],8787:[.08198,.58198,0,0,.77778],8790:[0,.69224,0,0,.77778],8791:[.22958,.72958,0,0,.77778],8796:[.08198,.91667,0,0,.77778],8806:[.25583,.75583,0,0,.77778],8807:[.25583,.75583,0,0,.77778],8808:[.25142,.75726,0,0,.77778],8809:[.25142,.75726,0,0,.77778],8812:[.25583,.75583,0,0,.5],8814:[.20576,.70576,0,0,.77778],8815:[.20576,.70576,0,0,.77778],8816:[.30274,.79383,0,0,.77778],8817:[.30274,.79383,0,0,.77778],8818:[.22958,.72958,0,0,.77778],8819:[.22958,.72958,0,0,.77778],8822:[.1808,.675,0,0,.77778],8823:[.1808,.675,0,0,.77778],8828:[.13667,.63667,0,0,.77778],8829:[.13667,.63667,0,0,.77778],8830:[.22958,.72958,0,0,.77778],8831:[.22958,.72958,0,0,.77778],8832:[.20576,.70576,0,0,.77778],8833:[.20576,.70576,0,0,.77778],8840:[.30274,.79383,0,0,.77778],8841:[.30274,.79383,0,0,.77778],8842:[.13597,.63597,0,0,.77778],8843:[.13597,.63597,0,0,.77778],8847:[.03517,.54986,0,0,.77778],8848:[.03517,.54986,0,0,.77778],8858:[.08198,.58198,0,0,.77778],8859:[.08198,.58198,0,0,.77778],8861:[.08198,.58198,0,0,.77778],8862:[0,.675,0,0,.77778],8863:[0,.675,0,0,.77778],8864:[0,.675,0,0,.77778],8865:[0,.675,0,0,.77778],8872:[0,.69224,0,0,.61111],8873:[0,.69224,0,0,.72222],8874:[0,.69224,0,0,.88889],8876:[0,.68889,0,0,.61111],8877:[0,.68889,0,0,.61111],8878:[0,.68889,0,0,.72222],8879:[0,.68889,0,0,.72222],8882:[.03517,.54986,0,0,.77778],8883:[.03517,.54986,0,0,.77778],8884:[.13667,.63667,0,0,.77778],8885:[.13667,.63667,0,0,.77778],8888:[0,.54986,0,0,1.11111],8890:[.19444,.43056,0,0,.55556],8891:[.19444,.69224,0,0,.61111],8892:[.19444,.69224,0,0,.61111],8901:[0,.54986,0,0,.27778],8903:[.08167,.58167,0,0,.77778],8905:[.08167,.58167,0,0,.77778],8906:[.08167,.58167,0,0,.77778],8907:[0,.69224,0,0,.77778],8908:[0,.69224,0,0,.77778],8909:[-.03598,.46402,0,0,.77778],8910:[0,.54986,0,0,.76042],8911:[0,.54986,0,0,.76042],8912:[.03517,.54986,0,0,.77778],8913:[.03517,.54986,0,0,.77778],8914:[0,.54986,0,0,.66667],8915:[0,.54986,0,0,.66667],8916:[0,.69224,0,0,.66667],8918:[.0391,.5391,0,0,.77778],8919:[.0391,.5391,0,0,.77778],8920:[.03517,.54986,0,0,1.33334],8921:[.03517,.54986,0,0,1.33334],8922:[.38569,.88569,0,0,.77778],8923:[.38569,.88569,0,0,.77778],8926:[.13667,.63667,0,0,.77778],8927:[.13667,.63667,0,0,.77778],8928:[.30274,.79383,0,0,.77778],8929:[.30274,.79383,0,0,.77778],8934:[.23222,.74111,0,0,.77778],8935:[.23222,.74111,0,0,.77778],8936:[.23222,.74111,0,0,.77778],8937:[.23222,.74111,0,0,.77778],8938:[.20576,.70576,0,0,.77778],8939:[.20576,.70576,0,0,.77778],8940:[.30274,.79383,0,0,.77778],8941:[.30274,.79383,0,0,.77778],8994:[.19444,.69224,0,0,.77778],8995:[.19444,.69224,0,0,.77778],9416:[.15559,.69224,0,0,.90222],9484:[0,.69224,0,0,.5],9488:[0,.69224,0,0,.5],9492:[0,.37788,0,0,.5],9496:[0,.37788,0,0,.5],9585:[.19444,.68889,0,0,.88889],9586:[.19444,.74111,0,0,.88889],9632:[0,.675,0,0,.77778],9633:[0,.675,0,0,.77778],9650:[0,.54986,0,0,.72222],9651:[0,.54986,0,0,.72222],9654:[.03517,.54986,0,0,.77778],9660:[0,.54986,0,0,.72222],9661:[0,.54986,0,0,.72222],9664:[.03517,.54986,0,0,.77778],9674:[.11111,.69224,0,0,.66667],9733:[.19444,.69224,0,0,.94445],10003:[0,.69224,0,0,.83334],10016:[0,.69224,0,0,.83334],10731:[.11111,.69224,0,0,.66667],10846:[.19444,.75583,0,0,.61111],10877:[.13667,.63667,0,0,.77778],10878:[.13667,.63667,0,0,.77778],10885:[.25583,.75583,0,0,.77778],10886:[.25583,.75583,0,0,.77778],10887:[.13597,.63597,0,0,.77778],10888:[.13597,.63597,0,0,.77778],10889:[.26167,.75726,0,0,.77778],10890:[.26167,.75726,0,0,.77778],10891:[.48256,.98256,0,0,.77778],10892:[.48256,.98256,0,0,.77778],10901:[.13667,.63667,0,0,.77778],10902:[.13667,.63667,0,0,.77778],10933:[.25142,.75726,0,0,.77778],10934:[.25142,.75726,0,0,.77778],10935:[.26167,.75726,0,0,.77778],10936:[.26167,.75726,0,0,.77778],10937:[.26167,.75726,0,0,.77778],10938:[.26167,.75726,0,0,.77778],10949:[.25583,.75583,0,0,.77778],10950:[.25583,.75583,0,0,.77778],10955:[.28481,.79383,0,0,.77778],10956:[.28481,.79383,0,0,.77778],57350:[.08167,.58167,0,0,.22222],57351:[.08167,.58167,0,0,.38889],57352:[.08167,.58167,0,0,.77778],57353:[0,.43056,.04028,0,.66667],57356:[.25142,.75726,0,0,.77778],57357:[.25142,.75726,0,0,.77778],57358:[.41951,.91951,0,0,.77778],57359:[.30274,.79383,0,0,.77778],57360:[.30274,.79383,0,0,.77778],57361:[.41951,.91951,0,0,.77778],57366:[.25142,.75726,0,0,.77778],57367:[.25142,.75726,0,0,.77778],57368:[.25142,.75726,0,0,.77778],57369:[.25142,.75726,0,0,.77778],57370:[.13597,.63597,0,0,.77778],57371:[.13597,.63597,0,0,.77778]},"Caligraphic-Regular":{32:[0,0,0,0,.25],65:[0,.68333,0,.19445,.79847],66:[0,.68333,.03041,.13889,.65681],67:[0,.68333,.05834,.13889,.52653],68:[0,.68333,.02778,.08334,.77139],69:[0,.68333,.08944,.11111,.52778],70:[0,.68333,.09931,.11111,.71875],71:[.09722,.68333,.0593,.11111,.59487],72:[0,.68333,.00965,.11111,.84452],73:[0,.68333,.07382,0,.54452],74:[.09722,.68333,.18472,.16667,.67778],75:[0,.68333,.01445,.05556,.76195],76:[0,.68333,0,.13889,.68972],77:[0,.68333,0,.13889,1.2009],78:[0,.68333,.14736,.08334,.82049],79:[0,.68333,.02778,.11111,.79611],80:[0,.68333,.08222,.08334,.69556],81:[.09722,.68333,0,.11111,.81667],82:[0,.68333,0,.08334,.8475],83:[0,.68333,.075,.13889,.60556],84:[0,.68333,.25417,0,.54464],85:[0,.68333,.09931,.08334,.62583],86:[0,.68333,.08222,0,.61278],87:[0,.68333,.08222,.08334,.98778],88:[0,.68333,.14643,.13889,.7133],89:[.09722,.68333,.08222,.08334,.66834],90:[0,.68333,.07944,.13889,.72473],160:[0,0,0,0,.25]},"Fraktur-Regular":{32:[0,0,0,0,.25],33:[0,.69141,0,0,.29574],34:[0,.69141,0,0,.21471],38:[0,.69141,0,0,.73786],39:[0,.69141,0,0,.21201],40:[.24982,.74947,0,0,.38865],41:[.24982,.74947,0,0,.38865],42:[0,.62119,0,0,.27764],43:[.08319,.58283,0,0,.75623],44:[0,.10803,0,0,.27764],45:[.08319,.58283,0,0,.75623],46:[0,.10803,0,0,.27764],47:[.24982,.74947,0,0,.50181],48:[0,.47534,0,0,.50181],49:[0,.47534,0,0,.50181],50:[0,.47534,0,0,.50181],51:[.18906,.47534,0,0,.50181],52:[.18906,.47534,0,0,.50181],53:[.18906,.47534,0,0,.50181],54:[0,.69141,0,0,.50181],55:[.18906,.47534,0,0,.50181],56:[0,.69141,0,0,.50181],57:[.18906,.47534,0,0,.50181],58:[0,.47534,0,0,.21606],59:[.12604,.47534,0,0,.21606],61:[-.13099,.36866,0,0,.75623],63:[0,.69141,0,0,.36245],65:[0,.69141,0,0,.7176],66:[0,.69141,0,0,.88397],67:[0,.69141,0,0,.61254],68:[0,.69141,0,0,.83158],69:[0,.69141,0,0,.66278],70:[.12604,.69141,0,0,.61119],71:[0,.69141,0,0,.78539],72:[.06302,.69141,0,0,.7203],73:[0,.69141,0,0,.55448],74:[.12604,.69141,0,0,.55231],75:[0,.69141,0,0,.66845],76:[0,.69141,0,0,.66602],77:[0,.69141,0,0,1.04953],78:[0,.69141,0,0,.83212],79:[0,.69141,0,0,.82699],80:[.18906,.69141,0,0,.82753],81:[.03781,.69141,0,0,.82699],82:[0,.69141,0,0,.82807],83:[0,.69141,0,0,.82861],84:[0,.69141,0,0,.66899],85:[0,.69141,0,0,.64576],86:[0,.69141,0,0,.83131],87:[0,.69141,0,0,1.04602],88:[0,.69141,0,0,.71922],89:[.18906,.69141,0,0,.83293],90:[.12604,.69141,0,0,.60201],91:[.24982,.74947,0,0,.27764],93:[.24982,.74947,0,0,.27764],94:[0,.69141,0,0,.49965],97:[0,.47534,0,0,.50046],98:[0,.69141,0,0,.51315],99:[0,.47534,0,0,.38946],100:[0,.62119,0,0,.49857],101:[0,.47534,0,0,.40053],102:[.18906,.69141,0,0,.32626],103:[.18906,.47534,0,0,.5037],104:[.18906,.69141,0,0,.52126],105:[0,.69141,0,0,.27899],106:[0,.69141,0,0,.28088],107:[0,.69141,0,0,.38946],108:[0,.69141,0,0,.27953],109:[0,.47534,0,0,.76676],110:[0,.47534,0,0,.52666],111:[0,.47534,0,0,.48885],112:[.18906,.52396,0,0,.50046],113:[.18906,.47534,0,0,.48912],114:[0,.47534,0,0,.38919],115:[0,.47534,0,0,.44266],116:[0,.62119,0,0,.33301],117:[0,.47534,0,0,.5172],118:[0,.52396,0,0,.5118],119:[0,.52396,0,0,.77351],120:[.18906,.47534,0,0,.38865],121:[.18906,.47534,0,0,.49884],122:[.18906,.47534,0,0,.39054],160:[0,0,0,0,.25],8216:[0,.69141,0,0,.21471],8217:[0,.69141,0,0,.21471],58112:[0,.62119,0,0,.49749],58113:[0,.62119,0,0,.4983],58114:[.18906,.69141,0,0,.33328],58115:[.18906,.69141,0,0,.32923],58116:[.18906,.47534,0,0,.50343],58117:[0,.69141,0,0,.33301],58118:[0,.62119,0,0,.33409],58119:[0,.47534,0,0,.50073]},"Main-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.35],34:[0,.69444,0,0,.60278],35:[.19444,.69444,0,0,.95833],36:[.05556,.75,0,0,.575],37:[.05556,.75,0,0,.95833],38:[0,.69444,0,0,.89444],39:[0,.69444,0,0,.31944],40:[.25,.75,0,0,.44722],41:[.25,.75,0,0,.44722],42:[0,.75,0,0,.575],43:[.13333,.63333,0,0,.89444],44:[.19444,.15556,0,0,.31944],45:[0,.44444,0,0,.38333],46:[0,.15556,0,0,.31944],47:[.25,.75,0,0,.575],48:[0,.64444,0,0,.575],49:[0,.64444,0,0,.575],50:[0,.64444,0,0,.575],51:[0,.64444,0,0,.575],52:[0,.64444,0,0,.575],53:[0,.64444,0,0,.575],54:[0,.64444,0,0,.575],55:[0,.64444,0,0,.575],56:[0,.64444,0,0,.575],57:[0,.64444,0,0,.575],58:[0,.44444,0,0,.31944],59:[.19444,.44444,0,0,.31944],60:[.08556,.58556,0,0,.89444],61:[-.10889,.39111,0,0,.89444],62:[.08556,.58556,0,0,.89444],63:[0,.69444,0,0,.54305],64:[0,.69444,0,0,.89444],65:[0,.68611,0,0,.86944],66:[0,.68611,0,0,.81805],67:[0,.68611,0,0,.83055],68:[0,.68611,0,0,.88194],69:[0,.68611,0,0,.75555],70:[0,.68611,0,0,.72361],71:[0,.68611,0,0,.90416],72:[0,.68611,0,0,.9],73:[0,.68611,0,0,.43611],74:[0,.68611,0,0,.59444],75:[0,.68611,0,0,.90138],76:[0,.68611,0,0,.69166],77:[0,.68611,0,0,1.09166],78:[0,.68611,0,0,.9],79:[0,.68611,0,0,.86388],80:[0,.68611,0,0,.78611],81:[.19444,.68611,0,0,.86388],82:[0,.68611,0,0,.8625],83:[0,.68611,0,0,.63889],84:[0,.68611,0,0,.8],85:[0,.68611,0,0,.88472],86:[0,.68611,.01597,0,.86944],87:[0,.68611,.01597,0,1.18888],88:[0,.68611,0,0,.86944],89:[0,.68611,.02875,0,.86944],90:[0,.68611,0,0,.70277],91:[.25,.75,0,0,.31944],92:[.25,.75,0,0,.575],93:[.25,.75,0,0,.31944],94:[0,.69444,0,0,.575],95:[.31,.13444,.03194,0,.575],97:[0,.44444,0,0,.55902],98:[0,.69444,0,0,.63889],99:[0,.44444,0,0,.51111],100:[0,.69444,0,0,.63889],101:[0,.44444,0,0,.52708],102:[0,.69444,.10903,0,.35139],103:[.19444,.44444,.01597,0,.575],104:[0,.69444,0,0,.63889],105:[0,.69444,0,0,.31944],106:[.19444,.69444,0,0,.35139],107:[0,.69444,0,0,.60694],108:[0,.69444,0,0,.31944],109:[0,.44444,0,0,.95833],110:[0,.44444,0,0,.63889],111:[0,.44444,0,0,.575],112:[.19444,.44444,0,0,.63889],113:[.19444,.44444,0,0,.60694],114:[0,.44444,0,0,.47361],115:[0,.44444,0,0,.45361],116:[0,.63492,0,0,.44722],117:[0,.44444,0,0,.63889],118:[0,.44444,.01597,0,.60694],119:[0,.44444,.01597,0,.83055],120:[0,.44444,0,0,.60694],121:[.19444,.44444,.01597,0,.60694],122:[0,.44444,0,0,.51111],123:[.25,.75,0,0,.575],124:[.25,.75,0,0,.31944],125:[.25,.75,0,0,.575],126:[.35,.34444,0,0,.575],160:[0,0,0,0,.25],163:[0,.69444,0,0,.86853],168:[0,.69444,0,0,.575],172:[0,.44444,0,0,.76666],176:[0,.69444,0,0,.86944],177:[.13333,.63333,0,0,.89444],184:[.17014,0,0,0,.51111],198:[0,.68611,0,0,1.04166],215:[.13333,.63333,0,0,.89444],216:[.04861,.73472,0,0,.89444],223:[0,.69444,0,0,.59722],230:[0,.44444,0,0,.83055],247:[.13333,.63333,0,0,.89444],248:[.09722,.54167,0,0,.575],305:[0,.44444,0,0,.31944],338:[0,.68611,0,0,1.16944],339:[0,.44444,0,0,.89444],567:[.19444,.44444,0,0,.35139],710:[0,.69444,0,0,.575],711:[0,.63194,0,0,.575],713:[0,.59611,0,0,.575],714:[0,.69444,0,0,.575],715:[0,.69444,0,0,.575],728:[0,.69444,0,0,.575],729:[0,.69444,0,0,.31944],730:[0,.69444,0,0,.86944],732:[0,.69444,0,0,.575],733:[0,.69444,0,0,.575],915:[0,.68611,0,0,.69166],916:[0,.68611,0,0,.95833],920:[0,.68611,0,0,.89444],923:[0,.68611,0,0,.80555],926:[0,.68611,0,0,.76666],928:[0,.68611,0,0,.9],931:[0,.68611,0,0,.83055],933:[0,.68611,0,0,.89444],934:[0,.68611,0,0,.83055],936:[0,.68611,0,0,.89444],937:[0,.68611,0,0,.83055],8211:[0,.44444,.03194,0,.575],8212:[0,.44444,.03194,0,1.14999],8216:[0,.69444,0,0,.31944],8217:[0,.69444,0,0,.31944],8220:[0,.69444,0,0,.60278],8221:[0,.69444,0,0,.60278],8224:[.19444,.69444,0,0,.51111],8225:[.19444,.69444,0,0,.51111],8242:[0,.55556,0,0,.34444],8407:[0,.72444,.15486,0,.575],8463:[0,.69444,0,0,.66759],8465:[0,.69444,0,0,.83055],8467:[0,.69444,0,0,.47361],8472:[.19444,.44444,0,0,.74027],8476:[0,.69444,0,0,.83055],8501:[0,.69444,0,0,.70277],8592:[-.10889,.39111,0,0,1.14999],8593:[.19444,.69444,0,0,.575],8594:[-.10889,.39111,0,0,1.14999],8595:[.19444,.69444,0,0,.575],8596:[-.10889,.39111,0,0,1.14999],8597:[.25,.75,0,0,.575],8598:[.19444,.69444,0,0,1.14999],8599:[.19444,.69444,0,0,1.14999],8600:[.19444,.69444,0,0,1.14999],8601:[.19444,.69444,0,0,1.14999],8636:[-.10889,.39111,0,0,1.14999],8637:[-.10889,.39111,0,0,1.14999],8640:[-.10889,.39111,0,0,1.14999],8641:[-.10889,.39111,0,0,1.14999],8656:[-.10889,.39111,0,0,1.14999],8657:[.19444,.69444,0,0,.70277],8658:[-.10889,.39111,0,0,1.14999],8659:[.19444,.69444,0,0,.70277],8660:[-.10889,.39111,0,0,1.14999],8661:[.25,.75,0,0,.70277],8704:[0,.69444,0,0,.63889],8706:[0,.69444,.06389,0,.62847],8707:[0,.69444,0,0,.63889],8709:[.05556,.75,0,0,.575],8711:[0,.68611,0,0,.95833],8712:[.08556,.58556,0,0,.76666],8715:[.08556,.58556,0,0,.76666],8722:[.13333,.63333,0,0,.89444],8723:[.13333,.63333,0,0,.89444],8725:[.25,.75,0,0,.575],8726:[.25,.75,0,0,.575],8727:[-.02778,.47222,0,0,.575],8728:[-.02639,.47361,0,0,.575],8729:[-.02639,.47361,0,0,.575],8730:[.18,.82,0,0,.95833],8733:[0,.44444,0,0,.89444],8734:[0,.44444,0,0,1.14999],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.31944],8741:[.25,.75,0,0,.575],8743:[0,.55556,0,0,.76666],8744:[0,.55556,0,0,.76666],8745:[0,.55556,0,0,.76666],8746:[0,.55556,0,0,.76666],8747:[.19444,.69444,.12778,0,.56875],8764:[-.10889,.39111,0,0,.89444],8768:[.19444,.69444,0,0,.31944],8771:[.00222,.50222,0,0,.89444],8773:[.027,.638,0,0,.894],8776:[.02444,.52444,0,0,.89444],8781:[.00222,.50222,0,0,.89444],8801:[.00222,.50222,0,0,.89444],8804:[.19667,.69667,0,0,.89444],8805:[.19667,.69667,0,0,.89444],8810:[.08556,.58556,0,0,1.14999],8811:[.08556,.58556,0,0,1.14999],8826:[.08556,.58556,0,0,.89444],8827:[.08556,.58556,0,0,.89444],8834:[.08556,.58556,0,0,.89444],8835:[.08556,.58556,0,0,.89444],8838:[.19667,.69667,0,0,.89444],8839:[.19667,.69667,0,0,.89444],8846:[0,.55556,0,0,.76666],8849:[.19667,.69667,0,0,.89444],8850:[.19667,.69667,0,0,.89444],8851:[0,.55556,0,0,.76666],8852:[0,.55556,0,0,.76666],8853:[.13333,.63333,0,0,.89444],8854:[.13333,.63333,0,0,.89444],8855:[.13333,.63333,0,0,.89444],8856:[.13333,.63333,0,0,.89444],8857:[.13333,.63333,0,0,.89444],8866:[0,.69444,0,0,.70277],8867:[0,.69444,0,0,.70277],8868:[0,.69444,0,0,.89444],8869:[0,.69444,0,0,.89444],8900:[-.02639,.47361,0,0,.575],8901:[-.02639,.47361,0,0,.31944],8902:[-.02778,.47222,0,0,.575],8968:[.25,.75,0,0,.51111],8969:[.25,.75,0,0,.51111],8970:[.25,.75,0,0,.51111],8971:[.25,.75,0,0,.51111],8994:[-.13889,.36111,0,0,1.14999],8995:[-.13889,.36111,0,0,1.14999],9651:[.19444,.69444,0,0,1.02222],9657:[-.02778,.47222,0,0,.575],9661:[.19444,.69444,0,0,1.02222],9667:[-.02778,.47222,0,0,.575],9711:[.19444,.69444,0,0,1.14999],9824:[.12963,.69444,0,0,.89444],9825:[.12963,.69444,0,0,.89444],9826:[.12963,.69444,0,0,.89444],9827:[.12963,.69444,0,0,.89444],9837:[0,.75,0,0,.44722],9838:[.19444,.69444,0,0,.44722],9839:[.19444,.69444,0,0,.44722],10216:[.25,.75,0,0,.44722],10217:[.25,.75,0,0,.44722],10815:[0,.68611,0,0,.9],10927:[.19667,.69667,0,0,.89444],10928:[.19667,.69667,0,0,.89444],57376:[.19444,.69444,0,0,0]},"Main-BoldItalic":{32:[0,0,0,0,.25],33:[0,.69444,.11417,0,.38611],34:[0,.69444,.07939,0,.62055],35:[.19444,.69444,.06833,0,.94444],37:[.05556,.75,.12861,0,.94444],38:[0,.69444,.08528,0,.88555],39:[0,.69444,.12945,0,.35555],40:[.25,.75,.15806,0,.47333],41:[.25,.75,.03306,0,.47333],42:[0,.75,.14333,0,.59111],43:[.10333,.60333,.03306,0,.88555],44:[.19444,.14722,0,0,.35555],45:[0,.44444,.02611,0,.41444],46:[0,.14722,0,0,.35555],47:[.25,.75,.15806,0,.59111],48:[0,.64444,.13167,0,.59111],49:[0,.64444,.13167,0,.59111],50:[0,.64444,.13167,0,.59111],51:[0,.64444,.13167,0,.59111],52:[.19444,.64444,.13167,0,.59111],53:[0,.64444,.13167,0,.59111],54:[0,.64444,.13167,0,.59111],55:[.19444,.64444,.13167,0,.59111],56:[0,.64444,.13167,0,.59111],57:[0,.64444,.13167,0,.59111],58:[0,.44444,.06695,0,.35555],59:[.19444,.44444,.06695,0,.35555],61:[-.10889,.39111,.06833,0,.88555],63:[0,.69444,.11472,0,.59111],64:[0,.69444,.09208,0,.88555],65:[0,.68611,0,0,.86555],66:[0,.68611,.0992,0,.81666],67:[0,.68611,.14208,0,.82666],68:[0,.68611,.09062,0,.87555],69:[0,.68611,.11431,0,.75666],70:[0,.68611,.12903,0,.72722],71:[0,.68611,.07347,0,.89527],72:[0,.68611,.17208,0,.8961],73:[0,.68611,.15681,0,.47166],74:[0,.68611,.145,0,.61055],75:[0,.68611,.14208,0,.89499],76:[0,.68611,0,0,.69777],77:[0,.68611,.17208,0,1.07277],78:[0,.68611,.17208,0,.8961],79:[0,.68611,.09062,0,.85499],80:[0,.68611,.0992,0,.78721],81:[.19444,.68611,.09062,0,.85499],82:[0,.68611,.02559,0,.85944],83:[0,.68611,.11264,0,.64999],84:[0,.68611,.12903,0,.7961],85:[0,.68611,.17208,0,.88083],86:[0,.68611,.18625,0,.86555],87:[0,.68611,.18625,0,1.15999],88:[0,.68611,.15681,0,.86555],89:[0,.68611,.19803,0,.86555],90:[0,.68611,.14208,0,.70888],91:[.25,.75,.1875,0,.35611],93:[.25,.75,.09972,0,.35611],94:[0,.69444,.06709,0,.59111],95:[.31,.13444,.09811,0,.59111],97:[0,.44444,.09426,0,.59111],98:[0,.69444,.07861,0,.53222],99:[0,.44444,.05222,0,.53222],100:[0,.69444,.10861,0,.59111],101:[0,.44444,.085,0,.53222],102:[.19444,.69444,.21778,0,.4],103:[.19444,.44444,.105,0,.53222],104:[0,.69444,.09426,0,.59111],105:[0,.69326,.11387,0,.35555],106:[.19444,.69326,.1672,0,.35555],107:[0,.69444,.11111,0,.53222],108:[0,.69444,.10861,0,.29666],109:[0,.44444,.09426,0,.94444],110:[0,.44444,.09426,0,.64999],111:[0,.44444,.07861,0,.59111],112:[.19444,.44444,.07861,0,.59111],113:[.19444,.44444,.105,0,.53222],114:[0,.44444,.11111,0,.50167],115:[0,.44444,.08167,0,.48694],116:[0,.63492,.09639,0,.385],117:[0,.44444,.09426,0,.62055],118:[0,.44444,.11111,0,.53222],119:[0,.44444,.11111,0,.76777],120:[0,.44444,.12583,0,.56055],121:[.19444,.44444,.105,0,.56166],122:[0,.44444,.13889,0,.49055],126:[.35,.34444,.11472,0,.59111],160:[0,0,0,0,.25],168:[0,.69444,.11473,0,.59111],176:[0,.69444,0,0,.94888],184:[.17014,0,0,0,.53222],198:[0,.68611,.11431,0,1.02277],216:[.04861,.73472,.09062,0,.88555],223:[.19444,.69444,.09736,0,.665],230:[0,.44444,.085,0,.82666],248:[.09722,.54167,.09458,0,.59111],305:[0,.44444,.09426,0,.35555],338:[0,.68611,.11431,0,1.14054],339:[0,.44444,.085,0,.82666],567:[.19444,.44444,.04611,0,.385],710:[0,.69444,.06709,0,.59111],711:[0,.63194,.08271,0,.59111],713:[0,.59444,.10444,0,.59111],714:[0,.69444,.08528,0,.59111],715:[0,.69444,0,0,.59111],728:[0,.69444,.10333,0,.59111],729:[0,.69444,.12945,0,.35555],730:[0,.69444,0,0,.94888],732:[0,.69444,.11472,0,.59111],733:[0,.69444,.11472,0,.59111],915:[0,.68611,.12903,0,.69777],916:[0,.68611,0,0,.94444],920:[0,.68611,.09062,0,.88555],923:[0,.68611,0,0,.80666],926:[0,.68611,.15092,0,.76777],928:[0,.68611,.17208,0,.8961],931:[0,.68611,.11431,0,.82666],933:[0,.68611,.10778,0,.88555],934:[0,.68611,.05632,0,.82666],936:[0,.68611,.10778,0,.88555],937:[0,.68611,.0992,0,.82666],8211:[0,.44444,.09811,0,.59111],8212:[0,.44444,.09811,0,1.18221],8216:[0,.69444,.12945,0,.35555],8217:[0,.69444,.12945,0,.35555],8220:[0,.69444,.16772,0,.62055],8221:[0,.69444,.07939,0,.62055]},"Main-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.12417,0,.30667],34:[0,.69444,.06961,0,.51444],35:[.19444,.69444,.06616,0,.81777],37:[.05556,.75,.13639,0,.81777],38:[0,.69444,.09694,0,.76666],39:[0,.69444,.12417,0,.30667],40:[.25,.75,.16194,0,.40889],41:[.25,.75,.03694,0,.40889],42:[0,.75,.14917,0,.51111],43:[.05667,.56167,.03694,0,.76666],44:[.19444,.10556,0,0,.30667],45:[0,.43056,.02826,0,.35778],46:[0,.10556,0,0,.30667],47:[.25,.75,.16194,0,.51111],48:[0,.64444,.13556,0,.51111],49:[0,.64444,.13556,0,.51111],50:[0,.64444,.13556,0,.51111],51:[0,.64444,.13556,0,.51111],52:[.19444,.64444,.13556,0,.51111],53:[0,.64444,.13556,0,.51111],54:[0,.64444,.13556,0,.51111],55:[.19444,.64444,.13556,0,.51111],56:[0,.64444,.13556,0,.51111],57:[0,.64444,.13556,0,.51111],58:[0,.43056,.0582,0,.30667],59:[.19444,.43056,.0582,0,.30667],61:[-.13313,.36687,.06616,0,.76666],63:[0,.69444,.1225,0,.51111],64:[0,.69444,.09597,0,.76666],65:[0,.68333,0,0,.74333],66:[0,.68333,.10257,0,.70389],67:[0,.68333,.14528,0,.71555],68:[0,.68333,.09403,0,.755],69:[0,.68333,.12028,0,.67833],70:[0,.68333,.13305,0,.65277],71:[0,.68333,.08722,0,.77361],72:[0,.68333,.16389,0,.74333],73:[0,.68333,.15806,0,.38555],74:[0,.68333,.14028,0,.525],75:[0,.68333,.14528,0,.76888],76:[0,.68333,0,0,.62722],77:[0,.68333,.16389,0,.89666],78:[0,.68333,.16389,0,.74333],79:[0,.68333,.09403,0,.76666],80:[0,.68333,.10257,0,.67833],81:[.19444,.68333,.09403,0,.76666],82:[0,.68333,.03868,0,.72944],83:[0,.68333,.11972,0,.56222],84:[0,.68333,.13305,0,.71555],85:[0,.68333,.16389,0,.74333],86:[0,.68333,.18361,0,.74333],87:[0,.68333,.18361,0,.99888],88:[0,.68333,.15806,0,.74333],89:[0,.68333,.19383,0,.74333],90:[0,.68333,.14528,0,.61333],91:[.25,.75,.1875,0,.30667],93:[.25,.75,.10528,0,.30667],94:[0,.69444,.06646,0,.51111],95:[.31,.12056,.09208,0,.51111],97:[0,.43056,.07671,0,.51111],98:[0,.69444,.06312,0,.46],99:[0,.43056,.05653,0,.46],100:[0,.69444,.10333,0,.51111],101:[0,.43056,.07514,0,.46],102:[.19444,.69444,.21194,0,.30667],103:[.19444,.43056,.08847,0,.46],104:[0,.69444,.07671,0,.51111],105:[0,.65536,.1019,0,.30667],106:[.19444,.65536,.14467,0,.30667],107:[0,.69444,.10764,0,.46],108:[0,.69444,.10333,0,.25555],109:[0,.43056,.07671,0,.81777],110:[0,.43056,.07671,0,.56222],111:[0,.43056,.06312,0,.51111],112:[.19444,.43056,.06312,0,.51111],113:[.19444,.43056,.08847,0,.46],114:[0,.43056,.10764,0,.42166],115:[0,.43056,.08208,0,.40889],116:[0,.61508,.09486,0,.33222],117:[0,.43056,.07671,0,.53666],118:[0,.43056,.10764,0,.46],119:[0,.43056,.10764,0,.66444],120:[0,.43056,.12042,0,.46389],121:[.19444,.43056,.08847,0,.48555],122:[0,.43056,.12292,0,.40889],126:[.35,.31786,.11585,0,.51111],160:[0,0,0,0,.25],168:[0,.66786,.10474,0,.51111],176:[0,.69444,0,0,.83129],184:[.17014,0,0,0,.46],198:[0,.68333,.12028,0,.88277],216:[.04861,.73194,.09403,0,.76666],223:[.19444,.69444,.10514,0,.53666],230:[0,.43056,.07514,0,.71555],248:[.09722,.52778,.09194,0,.51111],338:[0,.68333,.12028,0,.98499],339:[0,.43056,.07514,0,.71555],710:[0,.69444,.06646,0,.51111],711:[0,.62847,.08295,0,.51111],713:[0,.56167,.10333,0,.51111],714:[0,.69444,.09694,0,.51111],715:[0,.69444,0,0,.51111],728:[0,.69444,.10806,0,.51111],729:[0,.66786,.11752,0,.30667],730:[0,.69444,0,0,.83129],732:[0,.66786,.11585,0,.51111],733:[0,.69444,.1225,0,.51111],915:[0,.68333,.13305,0,.62722],916:[0,.68333,0,0,.81777],920:[0,.68333,.09403,0,.76666],923:[0,.68333,0,0,.69222],926:[0,.68333,.15294,0,.66444],928:[0,.68333,.16389,0,.74333],931:[0,.68333,.12028,0,.71555],933:[0,.68333,.11111,0,.76666],934:[0,.68333,.05986,0,.71555],936:[0,.68333,.11111,0,.76666],937:[0,.68333,.10257,0,.71555],8211:[0,.43056,.09208,0,.51111],8212:[0,.43056,.09208,0,1.02222],8216:[0,.69444,.12417,0,.30667],8217:[0,.69444,.12417,0,.30667],8220:[0,.69444,.1685,0,.51444],8221:[0,.69444,.06961,0,.51444],8463:[0,.68889,0,0,.54028]},"Main-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.27778],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.77778],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.19444,.10556,0,0,.27778],45:[0,.43056,0,0,.33333],46:[0,.10556,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.64444,0,0,.5],49:[0,.64444,0,0,.5],50:[0,.64444,0,0,.5],51:[0,.64444,0,0,.5],52:[0,.64444,0,0,.5],53:[0,.64444,0,0,.5],54:[0,.64444,0,0,.5],55:[0,.64444,0,0,.5],56:[0,.64444,0,0,.5],57:[0,.64444,0,0,.5],58:[0,.43056,0,0,.27778],59:[.19444,.43056,0,0,.27778],60:[.0391,.5391,0,0,.77778],61:[-.13313,.36687,0,0,.77778],62:[.0391,.5391,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.77778],65:[0,.68333,0,0,.75],66:[0,.68333,0,0,.70834],67:[0,.68333,0,0,.72222],68:[0,.68333,0,0,.76389],69:[0,.68333,0,0,.68056],70:[0,.68333,0,0,.65278],71:[0,.68333,0,0,.78472],72:[0,.68333,0,0,.75],73:[0,.68333,0,0,.36111],74:[0,.68333,0,0,.51389],75:[0,.68333,0,0,.77778],76:[0,.68333,0,0,.625],77:[0,.68333,0,0,.91667],78:[0,.68333,0,0,.75],79:[0,.68333,0,0,.77778],80:[0,.68333,0,0,.68056],81:[.19444,.68333,0,0,.77778],82:[0,.68333,0,0,.73611],83:[0,.68333,0,0,.55556],84:[0,.68333,0,0,.72222],85:[0,.68333,0,0,.75],86:[0,.68333,.01389,0,.75],87:[0,.68333,.01389,0,1.02778],88:[0,.68333,0,0,.75],89:[0,.68333,.025,0,.75],90:[0,.68333,0,0,.61111],91:[.25,.75,0,0,.27778],92:[.25,.75,0,0,.5],93:[.25,.75,0,0,.27778],94:[0,.69444,0,0,.5],95:[.31,.12056,.02778,0,.5],97:[0,.43056,0,0,.5],98:[0,.69444,0,0,.55556],99:[0,.43056,0,0,.44445],100:[0,.69444,0,0,.55556],101:[0,.43056,0,0,.44445],102:[0,.69444,.07778,0,.30556],103:[.19444,.43056,.01389,0,.5],104:[0,.69444,0,0,.55556],105:[0,.66786,0,0,.27778],106:[.19444,.66786,0,0,.30556],107:[0,.69444,0,0,.52778],108:[0,.69444,0,0,.27778],109:[0,.43056,0,0,.83334],110:[0,.43056,0,0,.55556],111:[0,.43056,0,0,.5],112:[.19444,.43056,0,0,.55556],113:[.19444,.43056,0,0,.52778],114:[0,.43056,0,0,.39167],115:[0,.43056,0,0,.39445],116:[0,.61508,0,0,.38889],117:[0,.43056,0,0,.55556],118:[0,.43056,.01389,0,.52778],119:[0,.43056,.01389,0,.72222],120:[0,.43056,0,0,.52778],121:[.19444,.43056,.01389,0,.52778],122:[0,.43056,0,0,.44445],123:[.25,.75,0,0,.5],124:[.25,.75,0,0,.27778],125:[.25,.75,0,0,.5],126:[.35,.31786,0,0,.5],160:[0,0,0,0,.25],163:[0,.69444,0,0,.76909],167:[.19444,.69444,0,0,.44445],168:[0,.66786,0,0,.5],172:[0,.43056,0,0,.66667],176:[0,.69444,0,0,.75],177:[.08333,.58333,0,0,.77778],182:[.19444,.69444,0,0,.61111],184:[.17014,0,0,0,.44445],198:[0,.68333,0,0,.90278],215:[.08333,.58333,0,0,.77778],216:[.04861,.73194,0,0,.77778],223:[0,.69444,0,0,.5],230:[0,.43056,0,0,.72222],247:[.08333,.58333,0,0,.77778],248:[.09722,.52778,0,0,.5],305:[0,.43056,0,0,.27778],338:[0,.68333,0,0,1.01389],339:[0,.43056,0,0,.77778],567:[.19444,.43056,0,0,.30556],710:[0,.69444,0,0,.5],711:[0,.62847,0,0,.5],713:[0,.56778,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.66786,0,0,.27778],730:[0,.69444,0,0,.75],732:[0,.66786,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.68333,0,0,.625],916:[0,.68333,0,0,.83334],920:[0,.68333,0,0,.77778],923:[0,.68333,0,0,.69445],926:[0,.68333,0,0,.66667],928:[0,.68333,0,0,.75],931:[0,.68333,0,0,.72222],933:[0,.68333,0,0,.77778],934:[0,.68333,0,0,.72222],936:[0,.68333,0,0,.77778],937:[0,.68333,0,0,.72222],8211:[0,.43056,.02778,0,.5],8212:[0,.43056,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5],8224:[.19444,.69444,0,0,.44445],8225:[.19444,.69444,0,0,.44445],8230:[0,.123,0,0,1.172],8242:[0,.55556,0,0,.275],8407:[0,.71444,.15382,0,.5],8463:[0,.68889,0,0,.54028],8465:[0,.69444,0,0,.72222],8467:[0,.69444,0,.11111,.41667],8472:[.19444,.43056,0,.11111,.63646],8476:[0,.69444,0,0,.72222],8501:[0,.69444,0,0,.61111],8592:[-.13313,.36687,0,0,1],8593:[.19444,.69444,0,0,.5],8594:[-.13313,.36687,0,0,1],8595:[.19444,.69444,0,0,.5],8596:[-.13313,.36687,0,0,1],8597:[.25,.75,0,0,.5],8598:[.19444,.69444,0,0,1],8599:[.19444,.69444,0,0,1],8600:[.19444,.69444,0,0,1],8601:[.19444,.69444,0,0,1],8614:[.011,.511,0,0,1],8617:[.011,.511,0,0,1.126],8618:[.011,.511,0,0,1.126],8636:[-.13313,.36687,0,0,1],8637:[-.13313,.36687,0,0,1],8640:[-.13313,.36687,0,0,1],8641:[-.13313,.36687,0,0,1],8652:[.011,.671,0,0,1],8656:[-.13313,.36687,0,0,1],8657:[.19444,.69444,0,0,.61111],8658:[-.13313,.36687,0,0,1],8659:[.19444,.69444,0,0,.61111],8660:[-.13313,.36687,0,0,1],8661:[.25,.75,0,0,.61111],8704:[0,.69444,0,0,.55556],8706:[0,.69444,.05556,.08334,.5309],8707:[0,.69444,0,0,.55556],8709:[.05556,.75,0,0,.5],8711:[0,.68333,0,0,.83334],8712:[.0391,.5391,0,0,.66667],8715:[.0391,.5391,0,0,.66667],8722:[.08333,.58333,0,0,.77778],8723:[.08333,.58333,0,0,.77778],8725:[.25,.75,0,0,.5],8726:[.25,.75,0,0,.5],8727:[-.03472,.46528,0,0,.5],8728:[-.05555,.44445,0,0,.5],8729:[-.05555,.44445,0,0,.5],8730:[.2,.8,0,0,.83334],8733:[0,.43056,0,0,.77778],8734:[0,.43056,0,0,1],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.27778],8741:[.25,.75,0,0,.5],8743:[0,.55556,0,0,.66667],8744:[0,.55556,0,0,.66667],8745:[0,.55556,0,0,.66667],8746:[0,.55556,0,0,.66667],8747:[.19444,.69444,.11111,0,.41667],8764:[-.13313,.36687,0,0,.77778],8768:[.19444,.69444,0,0,.27778],8771:[-.03625,.46375,0,0,.77778],8773:[-.022,.589,0,0,.778],8776:[-.01688,.48312,0,0,.77778],8781:[-.03625,.46375,0,0,.77778],8784:[-.133,.673,0,0,.778],8801:[-.03625,.46375,0,0,.77778],8804:[.13597,.63597,0,0,.77778],8805:[.13597,.63597,0,0,.77778],8810:[.0391,.5391,0,0,1],8811:[.0391,.5391,0,0,1],8826:[.0391,.5391,0,0,.77778],8827:[.0391,.5391,0,0,.77778],8834:[.0391,.5391,0,0,.77778],8835:[.0391,.5391,0,0,.77778],8838:[.13597,.63597,0,0,.77778],8839:[.13597,.63597,0,0,.77778],8846:[0,.55556,0,0,.66667],8849:[.13597,.63597,0,0,.77778],8850:[.13597,.63597,0,0,.77778],8851:[0,.55556,0,0,.66667],8852:[0,.55556,0,0,.66667],8853:[.08333,.58333,0,0,.77778],8854:[.08333,.58333,0,0,.77778],8855:[.08333,.58333,0,0,.77778],8856:[.08333,.58333,0,0,.77778],8857:[.08333,.58333,0,0,.77778],8866:[0,.69444,0,0,.61111],8867:[0,.69444,0,0,.61111],8868:[0,.69444,0,0,.77778],8869:[0,.69444,0,0,.77778],8872:[.249,.75,0,0,.867],8900:[-.05555,.44445,0,0,.5],8901:[-.05555,.44445,0,0,.27778],8902:[-.03472,.46528,0,0,.5],8904:[.005,.505,0,0,.9],8942:[.03,.903,0,0,.278],8943:[-.19,.313,0,0,1.172],8945:[-.1,.823,0,0,1.282],8968:[.25,.75,0,0,.44445],8969:[.25,.75,0,0,.44445],8970:[.25,.75,0,0,.44445],8971:[.25,.75,0,0,.44445],8994:[-.14236,.35764,0,0,1],8995:[-.14236,.35764,0,0,1],9136:[.244,.744,0,0,.412],9137:[.244,.745,0,0,.412],9651:[.19444,.69444,0,0,.88889],9657:[-.03472,.46528,0,0,.5],9661:[.19444,.69444,0,0,.88889],9667:[-.03472,.46528,0,0,.5],9711:[.19444,.69444,0,0,1],9824:[.12963,.69444,0,0,.77778],9825:[.12963,.69444,0,0,.77778],9826:[.12963,.69444,0,0,.77778],9827:[.12963,.69444,0,0,.77778],9837:[0,.75,0,0,.38889],9838:[.19444,.69444,0,0,.38889],9839:[.19444,.69444,0,0,.38889],10216:[.25,.75,0,0,.38889],10217:[.25,.75,0,0,.38889],10222:[.244,.744,0,0,.412],10223:[.244,.745,0,0,.412],10229:[.011,.511,0,0,1.609],10230:[.011,.511,0,0,1.638],10231:[.011,.511,0,0,1.859],10232:[.024,.525,0,0,1.609],10233:[.024,.525,0,0,1.638],10234:[.024,.525,0,0,1.858],10236:[.011,.511,0,0,1.638],10815:[0,.68333,0,0,.75],10927:[.13597,.63597,0,0,.77778],10928:[.13597,.63597,0,0,.77778],57376:[.19444,.69444,0,0,0]},"Math-BoldItalic":{32:[0,0,0,0,.25],48:[0,.44444,0,0,.575],49:[0,.44444,0,0,.575],50:[0,.44444,0,0,.575],51:[.19444,.44444,0,0,.575],52:[.19444,.44444,0,0,.575],53:[.19444,.44444,0,0,.575],54:[0,.64444,0,0,.575],55:[.19444,.44444,0,0,.575],56:[0,.64444,0,0,.575],57:[.19444,.44444,0,0,.575],65:[0,.68611,0,0,.86944],66:[0,.68611,.04835,0,.8664],67:[0,.68611,.06979,0,.81694],68:[0,.68611,.03194,0,.93812],69:[0,.68611,.05451,0,.81007],70:[0,.68611,.15972,0,.68889],71:[0,.68611,0,0,.88673],72:[0,.68611,.08229,0,.98229],73:[0,.68611,.07778,0,.51111],74:[0,.68611,.10069,0,.63125],75:[0,.68611,.06979,0,.97118],76:[0,.68611,0,0,.75555],77:[0,.68611,.11424,0,1.14201],78:[0,.68611,.11424,0,.95034],79:[0,.68611,.03194,0,.83666],80:[0,.68611,.15972,0,.72309],81:[.19444,.68611,0,0,.86861],82:[0,.68611,.00421,0,.87235],83:[0,.68611,.05382,0,.69271],84:[0,.68611,.15972,0,.63663],85:[0,.68611,.11424,0,.80027],86:[0,.68611,.25555,0,.67778],87:[0,.68611,.15972,0,1.09305],88:[0,.68611,.07778,0,.94722],89:[0,.68611,.25555,0,.67458],90:[0,.68611,.06979,0,.77257],97:[0,.44444,0,0,.63287],98:[0,.69444,0,0,.52083],99:[0,.44444,0,0,.51342],100:[0,.69444,0,0,.60972],101:[0,.44444,0,0,.55361],102:[.19444,.69444,.11042,0,.56806],103:[.19444,.44444,.03704,0,.5449],104:[0,.69444,0,0,.66759],105:[0,.69326,0,0,.4048],106:[.19444,.69326,.0622,0,.47083],107:[0,.69444,.01852,0,.6037],108:[0,.69444,.0088,0,.34815],109:[0,.44444,0,0,1.0324],110:[0,.44444,0,0,.71296],111:[0,.44444,0,0,.58472],112:[.19444,.44444,0,0,.60092],113:[.19444,.44444,.03704,0,.54213],114:[0,.44444,.03194,0,.5287],115:[0,.44444,0,0,.53125],116:[0,.63492,0,0,.41528],117:[0,.44444,0,0,.68102],118:[0,.44444,.03704,0,.56666],119:[0,.44444,.02778,0,.83148],120:[0,.44444,0,0,.65903],121:[.19444,.44444,.03704,0,.59028],122:[0,.44444,.04213,0,.55509],160:[0,0,0,0,.25],915:[0,.68611,.15972,0,.65694],916:[0,.68611,0,0,.95833],920:[0,.68611,.03194,0,.86722],923:[0,.68611,0,0,.80555],926:[0,.68611,.07458,0,.84125],928:[0,.68611,.08229,0,.98229],931:[0,.68611,.05451,0,.88507],933:[0,.68611,.15972,0,.67083],934:[0,.68611,0,0,.76666],936:[0,.68611,.11653,0,.71402],937:[0,.68611,.04835,0,.8789],945:[0,.44444,0,0,.76064],946:[.19444,.69444,.03403,0,.65972],947:[.19444,.44444,.06389,0,.59003],948:[0,.69444,.03819,0,.52222],949:[0,.44444,0,0,.52882],950:[.19444,.69444,.06215,0,.50833],951:[.19444,.44444,.03704,0,.6],952:[0,.69444,.03194,0,.5618],953:[0,.44444,0,0,.41204],954:[0,.44444,0,0,.66759],955:[0,.69444,0,0,.67083],956:[.19444,.44444,0,0,.70787],957:[0,.44444,.06898,0,.57685],958:[.19444,.69444,.03021,0,.50833],959:[0,.44444,0,0,.58472],960:[0,.44444,.03704,0,.68241],961:[.19444,.44444,0,0,.6118],962:[.09722,.44444,.07917,0,.42361],963:[0,.44444,.03704,0,.68588],964:[0,.44444,.13472,0,.52083],965:[0,.44444,.03704,0,.63055],966:[.19444,.44444,0,0,.74722],967:[.19444,.44444,0,0,.71805],968:[.19444,.69444,.03704,0,.75833],969:[0,.44444,.03704,0,.71782],977:[0,.69444,0,0,.69155],981:[.19444,.69444,0,0,.7125],982:[0,.44444,.03194,0,.975],1009:[.19444,.44444,0,0,.6118],1013:[0,.44444,0,0,.48333],57649:[0,.44444,0,0,.39352],57911:[.19444,.44444,0,0,.43889]},"Math-Italic":{32:[0,0,0,0,.25],48:[0,.43056,0,0,.5],49:[0,.43056,0,0,.5],50:[0,.43056,0,0,.5],51:[.19444,.43056,0,0,.5],52:[.19444,.43056,0,0,.5],53:[.19444,.43056,0,0,.5],54:[0,.64444,0,0,.5],55:[.19444,.43056,0,0,.5],56:[0,.64444,0,0,.5],57:[.19444,.43056,0,0,.5],65:[0,.68333,0,.13889,.75],66:[0,.68333,.05017,.08334,.75851],67:[0,.68333,.07153,.08334,.71472],68:[0,.68333,.02778,.05556,.82792],69:[0,.68333,.05764,.08334,.7382],70:[0,.68333,.13889,.08334,.64306],71:[0,.68333,0,.08334,.78625],72:[0,.68333,.08125,.05556,.83125],73:[0,.68333,.07847,.11111,.43958],74:[0,.68333,.09618,.16667,.55451],75:[0,.68333,.07153,.05556,.84931],76:[0,.68333,0,.02778,.68056],77:[0,.68333,.10903,.08334,.97014],78:[0,.68333,.10903,.08334,.80347],79:[0,.68333,.02778,.08334,.76278],80:[0,.68333,.13889,.08334,.64201],81:[.19444,.68333,0,.08334,.79056],82:[0,.68333,.00773,.08334,.75929],83:[0,.68333,.05764,.08334,.6132],84:[0,.68333,.13889,.08334,.58438],85:[0,.68333,.10903,.02778,.68278],86:[0,.68333,.22222,0,.58333],87:[0,.68333,.13889,0,.94445],88:[0,.68333,.07847,.08334,.82847],89:[0,.68333,.22222,0,.58056],90:[0,.68333,.07153,.08334,.68264],97:[0,.43056,0,0,.52859],98:[0,.69444,0,0,.42917],99:[0,.43056,0,.05556,.43276],100:[0,.69444,0,.16667,.52049],101:[0,.43056,0,.05556,.46563],102:[.19444,.69444,.10764,.16667,.48959],103:[.19444,.43056,.03588,.02778,.47697],104:[0,.69444,0,0,.57616],105:[0,.65952,0,0,.34451],106:[.19444,.65952,.05724,0,.41181],107:[0,.69444,.03148,0,.5206],108:[0,.69444,.01968,.08334,.29838],109:[0,.43056,0,0,.87801],110:[0,.43056,0,0,.60023],111:[0,.43056,0,.05556,.48472],112:[.19444,.43056,0,.08334,.50313],113:[.19444,.43056,.03588,.08334,.44641],114:[0,.43056,.02778,.05556,.45116],115:[0,.43056,0,.05556,.46875],116:[0,.61508,0,.08334,.36111],117:[0,.43056,0,.02778,.57246],118:[0,.43056,.03588,.02778,.48472],119:[0,.43056,.02691,.08334,.71592],120:[0,.43056,0,.02778,.57153],121:[.19444,.43056,.03588,.05556,.49028],122:[0,.43056,.04398,.05556,.46505],160:[0,0,0,0,.25],915:[0,.68333,.13889,.08334,.61528],916:[0,.68333,0,.16667,.83334],920:[0,.68333,.02778,.08334,.76278],923:[0,.68333,0,.16667,.69445],926:[0,.68333,.07569,.08334,.74236],928:[0,.68333,.08125,.05556,.83125],931:[0,.68333,.05764,.08334,.77986],933:[0,.68333,.13889,.05556,.58333],934:[0,.68333,0,.08334,.66667],936:[0,.68333,.11,.05556,.61222],937:[0,.68333,.05017,.08334,.7724],945:[0,.43056,.0037,.02778,.6397],946:[.19444,.69444,.05278,.08334,.56563],947:[.19444,.43056,.05556,0,.51773],948:[0,.69444,.03785,.05556,.44444],949:[0,.43056,0,.08334,.46632],950:[.19444,.69444,.07378,.08334,.4375],951:[.19444,.43056,.03588,.05556,.49653],952:[0,.69444,.02778,.08334,.46944],953:[0,.43056,0,.05556,.35394],954:[0,.43056,0,0,.57616],955:[0,.69444,0,0,.58334],956:[.19444,.43056,0,.02778,.60255],957:[0,.43056,.06366,.02778,.49398],958:[.19444,.69444,.04601,.11111,.4375],959:[0,.43056,0,.05556,.48472],960:[0,.43056,.03588,0,.57003],961:[.19444,.43056,0,.08334,.51702],962:[.09722,.43056,.07986,.08334,.36285],963:[0,.43056,.03588,0,.57141],964:[0,.43056,.1132,.02778,.43715],965:[0,.43056,.03588,.02778,.54028],966:[.19444,.43056,0,.08334,.65417],967:[.19444,.43056,0,.05556,.62569],968:[.19444,.69444,.03588,.11111,.65139],969:[0,.43056,.03588,0,.62245],977:[0,.69444,0,.08334,.59144],981:[.19444,.69444,0,.08334,.59583],982:[0,.43056,.02778,0,.82813],1009:[.19444,.43056,0,.08334,.51702],1013:[0,.43056,0,.05556,.4059],57649:[0,.43056,0,.02778,.32246],57911:[.19444,.43056,0,.08334,.38403]},"SansSerif-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.36667],34:[0,.69444,0,0,.55834],35:[.19444,.69444,0,0,.91667],36:[.05556,.75,0,0,.55],37:[.05556,.75,0,0,1.02912],38:[0,.69444,0,0,.83056],39:[0,.69444,0,0,.30556],40:[.25,.75,0,0,.42778],41:[.25,.75,0,0,.42778],42:[0,.75,0,0,.55],43:[.11667,.61667,0,0,.85556],44:[.10556,.13056,0,0,.30556],45:[0,.45833,0,0,.36667],46:[0,.13056,0,0,.30556],47:[.25,.75,0,0,.55],48:[0,.69444,0,0,.55],49:[0,.69444,0,0,.55],50:[0,.69444,0,0,.55],51:[0,.69444,0,0,.55],52:[0,.69444,0,0,.55],53:[0,.69444,0,0,.55],54:[0,.69444,0,0,.55],55:[0,.69444,0,0,.55],56:[0,.69444,0,0,.55],57:[0,.69444,0,0,.55],58:[0,.45833,0,0,.30556],59:[.10556,.45833,0,0,.30556],61:[-.09375,.40625,0,0,.85556],63:[0,.69444,0,0,.51945],64:[0,.69444,0,0,.73334],65:[0,.69444,0,0,.73334],66:[0,.69444,0,0,.73334],67:[0,.69444,0,0,.70278],68:[0,.69444,0,0,.79445],69:[0,.69444,0,0,.64167],70:[0,.69444,0,0,.61111],71:[0,.69444,0,0,.73334],72:[0,.69444,0,0,.79445],73:[0,.69444,0,0,.33056],74:[0,.69444,0,0,.51945],75:[0,.69444,0,0,.76389],76:[0,.69444,0,0,.58056],77:[0,.69444,0,0,.97778],78:[0,.69444,0,0,.79445],79:[0,.69444,0,0,.79445],80:[0,.69444,0,0,.70278],81:[.10556,.69444,0,0,.79445],82:[0,.69444,0,0,.70278],83:[0,.69444,0,0,.61111],84:[0,.69444,0,0,.73334],85:[0,.69444,0,0,.76389],86:[0,.69444,.01528,0,.73334],87:[0,.69444,.01528,0,1.03889],88:[0,.69444,0,0,.73334],89:[0,.69444,.0275,0,.73334],90:[0,.69444,0,0,.67223],91:[.25,.75,0,0,.34306],93:[.25,.75,0,0,.34306],94:[0,.69444,0,0,.55],95:[.35,.10833,.03056,0,.55],97:[0,.45833,0,0,.525],98:[0,.69444,0,0,.56111],99:[0,.45833,0,0,.48889],100:[0,.69444,0,0,.56111],101:[0,.45833,0,0,.51111],102:[0,.69444,.07639,0,.33611],103:[.19444,.45833,.01528,0,.55],104:[0,.69444,0,0,.56111],105:[0,.69444,0,0,.25556],106:[.19444,.69444,0,0,.28611],107:[0,.69444,0,0,.53056],108:[0,.69444,0,0,.25556],109:[0,.45833,0,0,.86667],110:[0,.45833,0,0,.56111],111:[0,.45833,0,0,.55],112:[.19444,.45833,0,0,.56111],113:[.19444,.45833,0,0,.56111],114:[0,.45833,.01528,0,.37222],115:[0,.45833,0,0,.42167],116:[0,.58929,0,0,.40417],117:[0,.45833,0,0,.56111],118:[0,.45833,.01528,0,.5],119:[0,.45833,.01528,0,.74445],120:[0,.45833,0,0,.5],121:[.19444,.45833,.01528,0,.5],122:[0,.45833,0,0,.47639],126:[.35,.34444,0,0,.55],160:[0,0,0,0,.25],168:[0,.69444,0,0,.55],176:[0,.69444,0,0,.73334],180:[0,.69444,0,0,.55],184:[.17014,0,0,0,.48889],305:[0,.45833,0,0,.25556],567:[.19444,.45833,0,0,.28611],710:[0,.69444,0,0,.55],711:[0,.63542,0,0,.55],713:[0,.63778,0,0,.55],728:[0,.69444,0,0,.55],729:[0,.69444,0,0,.30556],730:[0,.69444,0,0,.73334],732:[0,.69444,0,0,.55],733:[0,.69444,0,0,.55],915:[0,.69444,0,0,.58056],916:[0,.69444,0,0,.91667],920:[0,.69444,0,0,.85556],923:[0,.69444,0,0,.67223],926:[0,.69444,0,0,.73334],928:[0,.69444,0,0,.79445],931:[0,.69444,0,0,.79445],933:[0,.69444,0,0,.85556],934:[0,.69444,0,0,.79445],936:[0,.69444,0,0,.85556],937:[0,.69444,0,0,.79445],8211:[0,.45833,.03056,0,.55],8212:[0,.45833,.03056,0,1.10001],8216:[0,.69444,0,0,.30556],8217:[0,.69444,0,0,.30556],8220:[0,.69444,0,0,.55834],8221:[0,.69444,0,0,.55834]},"SansSerif-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.05733,0,.31945],34:[0,.69444,.00316,0,.5],35:[.19444,.69444,.05087,0,.83334],36:[.05556,.75,.11156,0,.5],37:[.05556,.75,.03126,0,.83334],38:[0,.69444,.03058,0,.75834],39:[0,.69444,.07816,0,.27778],40:[.25,.75,.13164,0,.38889],41:[.25,.75,.02536,0,.38889],42:[0,.75,.11775,0,.5],43:[.08333,.58333,.02536,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,.01946,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,.13164,0,.5],48:[0,.65556,.11156,0,.5],49:[0,.65556,.11156,0,.5],50:[0,.65556,.11156,0,.5],51:[0,.65556,.11156,0,.5],52:[0,.65556,.11156,0,.5],53:[0,.65556,.11156,0,.5],54:[0,.65556,.11156,0,.5],55:[0,.65556,.11156,0,.5],56:[0,.65556,.11156,0,.5],57:[0,.65556,.11156,0,.5],58:[0,.44444,.02502,0,.27778],59:[.125,.44444,.02502,0,.27778],61:[-.13,.37,.05087,0,.77778],63:[0,.69444,.11809,0,.47222],64:[0,.69444,.07555,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,.08293,0,.66667],67:[0,.69444,.11983,0,.63889],68:[0,.69444,.07555,0,.72223],69:[0,.69444,.11983,0,.59722],70:[0,.69444,.13372,0,.56945],71:[0,.69444,.11983,0,.66667],72:[0,.69444,.08094,0,.70834],73:[0,.69444,.13372,0,.27778],74:[0,.69444,.08094,0,.47222],75:[0,.69444,.11983,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,.08094,0,.875],78:[0,.69444,.08094,0,.70834],79:[0,.69444,.07555,0,.73611],80:[0,.69444,.08293,0,.63889],81:[.125,.69444,.07555,0,.73611],82:[0,.69444,.08293,0,.64584],83:[0,.69444,.09205,0,.55556],84:[0,.69444,.13372,0,.68056],85:[0,.69444,.08094,0,.6875],86:[0,.69444,.1615,0,.66667],87:[0,.69444,.1615,0,.94445],88:[0,.69444,.13372,0,.66667],89:[0,.69444,.17261,0,.66667],90:[0,.69444,.11983,0,.61111],91:[.25,.75,.15942,0,.28889],93:[.25,.75,.08719,0,.28889],94:[0,.69444,.0799,0,.5],95:[.35,.09444,.08616,0,.5],97:[0,.44444,.00981,0,.48056],98:[0,.69444,.03057,0,.51667],99:[0,.44444,.08336,0,.44445],100:[0,.69444,.09483,0,.51667],101:[0,.44444,.06778,0,.44445],102:[0,.69444,.21705,0,.30556],103:[.19444,.44444,.10836,0,.5],104:[0,.69444,.01778,0,.51667],105:[0,.67937,.09718,0,.23889],106:[.19444,.67937,.09162,0,.26667],107:[0,.69444,.08336,0,.48889],108:[0,.69444,.09483,0,.23889],109:[0,.44444,.01778,0,.79445],110:[0,.44444,.01778,0,.51667],111:[0,.44444,.06613,0,.5],112:[.19444,.44444,.0389,0,.51667],113:[.19444,.44444,.04169,0,.51667],114:[0,.44444,.10836,0,.34167],115:[0,.44444,.0778,0,.38333],116:[0,.57143,.07225,0,.36111],117:[0,.44444,.04169,0,.51667],118:[0,.44444,.10836,0,.46111],119:[0,.44444,.10836,0,.68334],120:[0,.44444,.09169,0,.46111],121:[.19444,.44444,.10836,0,.46111],122:[0,.44444,.08752,0,.43472],126:[.35,.32659,.08826,0,.5],160:[0,0,0,0,.25],168:[0,.67937,.06385,0,.5],176:[0,.69444,0,0,.73752],184:[.17014,0,0,0,.44445],305:[0,.44444,.04169,0,.23889],567:[.19444,.44444,.04169,0,.26667],710:[0,.69444,.0799,0,.5],711:[0,.63194,.08432,0,.5],713:[0,.60889,.08776,0,.5],714:[0,.69444,.09205,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,.09483,0,.5],729:[0,.67937,.07774,0,.27778],730:[0,.69444,0,0,.73752],732:[0,.67659,.08826,0,.5],733:[0,.69444,.09205,0,.5],915:[0,.69444,.13372,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,.07555,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,.12816,0,.66667],928:[0,.69444,.08094,0,.70834],931:[0,.69444,.11983,0,.72222],933:[0,.69444,.09031,0,.77778],934:[0,.69444,.04603,0,.72222],936:[0,.69444,.09031,0,.77778],937:[0,.69444,.08293,0,.72222],8211:[0,.44444,.08616,0,.5],8212:[0,.44444,.08616,0,1],8216:[0,.69444,.07816,0,.27778],8217:[0,.69444,.07816,0,.27778],8220:[0,.69444,.14205,0,.5],8221:[0,.69444,.00316,0,.5]},"SansSerif-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.31945],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.75834],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,0,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.65556,0,0,.5],49:[0,.65556,0,0,.5],50:[0,.65556,0,0,.5],51:[0,.65556,0,0,.5],52:[0,.65556,0,0,.5],53:[0,.65556,0,0,.5],54:[0,.65556,0,0,.5],55:[0,.65556,0,0,.5],56:[0,.65556,0,0,.5],57:[0,.65556,0,0,.5],58:[0,.44444,0,0,.27778],59:[.125,.44444,0,0,.27778],61:[-.13,.37,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,0,0,.66667],67:[0,.69444,0,0,.63889],68:[0,.69444,0,0,.72223],69:[0,.69444,0,0,.59722],70:[0,.69444,0,0,.56945],71:[0,.69444,0,0,.66667],72:[0,.69444,0,0,.70834],73:[0,.69444,0,0,.27778],74:[0,.69444,0,0,.47222],75:[0,.69444,0,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,0,0,.875],78:[0,.69444,0,0,.70834],79:[0,.69444,0,0,.73611],80:[0,.69444,0,0,.63889],81:[.125,.69444,0,0,.73611],82:[0,.69444,0,0,.64584],83:[0,.69444,0,0,.55556],84:[0,.69444,0,0,.68056],85:[0,.69444,0,0,.6875],86:[0,.69444,.01389,0,.66667],87:[0,.69444,.01389,0,.94445],88:[0,.69444,0,0,.66667],89:[0,.69444,.025,0,.66667],90:[0,.69444,0,0,.61111],91:[.25,.75,0,0,.28889],93:[.25,.75,0,0,.28889],94:[0,.69444,0,0,.5],95:[.35,.09444,.02778,0,.5],97:[0,.44444,0,0,.48056],98:[0,.69444,0,0,.51667],99:[0,.44444,0,0,.44445],100:[0,.69444,0,0,.51667],101:[0,.44444,0,0,.44445],102:[0,.69444,.06944,0,.30556],103:[.19444,.44444,.01389,0,.5],104:[0,.69444,0,0,.51667],105:[0,.67937,0,0,.23889],106:[.19444,.67937,0,0,.26667],107:[0,.69444,0,0,.48889],108:[0,.69444,0,0,.23889],109:[0,.44444,0,0,.79445],110:[0,.44444,0,0,.51667],111:[0,.44444,0,0,.5],112:[.19444,.44444,0,0,.51667],113:[.19444,.44444,0,0,.51667],114:[0,.44444,.01389,0,.34167],115:[0,.44444,0,0,.38333],116:[0,.57143,0,0,.36111],117:[0,.44444,0,0,.51667],118:[0,.44444,.01389,0,.46111],119:[0,.44444,.01389,0,.68334],120:[0,.44444,0,0,.46111],121:[.19444,.44444,.01389,0,.46111],122:[0,.44444,0,0,.43472],126:[.35,.32659,0,0,.5],160:[0,0,0,0,.25],168:[0,.67937,0,0,.5],176:[0,.69444,0,0,.66667],184:[.17014,0,0,0,.44445],305:[0,.44444,0,0,.23889],567:[.19444,.44444,0,0,.26667],710:[0,.69444,0,0,.5],711:[0,.63194,0,0,.5],713:[0,.60889,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.67937,0,0,.27778],730:[0,.69444,0,0,.66667],732:[0,.67659,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.69444,0,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,0,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,0,0,.66667],928:[0,.69444,0,0,.70834],931:[0,.69444,0,0,.72222],933:[0,.69444,0,0,.77778],934:[0,.69444,0,0,.72222],936:[0,.69444,0,0,.77778],937:[0,.69444,0,0,.72222],8211:[0,.44444,.02778,0,.5],8212:[0,.44444,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5]},"Script-Regular":{32:[0,0,0,0,.25],65:[0,.7,.22925,0,.80253],66:[0,.7,.04087,0,.90757],67:[0,.7,.1689,0,.66619],68:[0,.7,.09371,0,.77443],69:[0,.7,.18583,0,.56162],70:[0,.7,.13634,0,.89544],71:[0,.7,.17322,0,.60961],72:[0,.7,.29694,0,.96919],73:[0,.7,.19189,0,.80907],74:[.27778,.7,.19189,0,1.05159],75:[0,.7,.31259,0,.91364],76:[0,.7,.19189,0,.87373],77:[0,.7,.15981,0,1.08031],78:[0,.7,.3525,0,.9015],79:[0,.7,.08078,0,.73787],80:[0,.7,.08078,0,1.01262],81:[0,.7,.03305,0,.88282],82:[0,.7,.06259,0,.85],83:[0,.7,.19189,0,.86767],84:[0,.7,.29087,0,.74697],85:[0,.7,.25815,0,.79996],86:[0,.7,.27523,0,.62204],87:[0,.7,.27523,0,.80532],88:[0,.7,.26006,0,.94445],89:[0,.7,.2939,0,.70961],90:[0,.7,.24037,0,.8212],160:[0,0,0,0,.25]},"Size1-Regular":{32:[0,0,0,0,.25],40:[.35001,.85,0,0,.45834],41:[.35001,.85,0,0,.45834],47:[.35001,.85,0,0,.57778],91:[.35001,.85,0,0,.41667],92:[.35001,.85,0,0,.57778],93:[.35001,.85,0,0,.41667],123:[.35001,.85,0,0,.58334],125:[.35001,.85,0,0,.58334],160:[0,0,0,0,.25],710:[0,.72222,0,0,.55556],732:[0,.72222,0,0,.55556],770:[0,.72222,0,0,.55556],771:[0,.72222,0,0,.55556],8214:[-99e-5,.601,0,0,.77778],8593:[1e-5,.6,0,0,.66667],8595:[1e-5,.6,0,0,.66667],8657:[1e-5,.6,0,0,.77778],8659:[1e-5,.6,0,0,.77778],8719:[.25001,.75,0,0,.94445],8720:[.25001,.75,0,0,.94445],8721:[.25001,.75,0,0,1.05556],8730:[.35001,.85,0,0,1],8739:[-.00599,.606,0,0,.33333],8741:[-.00599,.606,0,0,.55556],8747:[.30612,.805,.19445,0,.47222],8748:[.306,.805,.19445,0,.47222],8749:[.306,.805,.19445,0,.47222],8750:[.30612,.805,.19445,0,.47222],8896:[.25001,.75,0,0,.83334],8897:[.25001,.75,0,0,.83334],8898:[.25001,.75,0,0,.83334],8899:[.25001,.75,0,0,.83334],8968:[.35001,.85,0,0,.47222],8969:[.35001,.85,0,0,.47222],8970:[.35001,.85,0,0,.47222],8971:[.35001,.85,0,0,.47222],9168:[-99e-5,.601,0,0,.66667],10216:[.35001,.85,0,0,.47222],10217:[.35001,.85,0,0,.47222],10752:[.25001,.75,0,0,1.11111],10753:[.25001,.75,0,0,1.11111],10754:[.25001,.75,0,0,1.11111],10756:[.25001,.75,0,0,.83334],10758:[.25001,.75,0,0,.83334]},"Size2-Regular":{32:[0,0,0,0,.25],40:[.65002,1.15,0,0,.59722],41:[.65002,1.15,0,0,.59722],47:[.65002,1.15,0,0,.81111],91:[.65002,1.15,0,0,.47222],92:[.65002,1.15,0,0,.81111],93:[.65002,1.15,0,0,.47222],123:[.65002,1.15,0,0,.66667],125:[.65002,1.15,0,0,.66667],160:[0,0,0,0,.25],710:[0,.75,0,0,1],732:[0,.75,0,0,1],770:[0,.75,0,0,1],771:[0,.75,0,0,1],8719:[.55001,1.05,0,0,1.27778],8720:[.55001,1.05,0,0,1.27778],8721:[.55001,1.05,0,0,1.44445],8730:[.65002,1.15,0,0,1],8747:[.86225,1.36,.44445,0,.55556],8748:[.862,1.36,.44445,0,.55556],8749:[.862,1.36,.44445,0,.55556],8750:[.86225,1.36,.44445,0,.55556],8896:[.55001,1.05,0,0,1.11111],8897:[.55001,1.05,0,0,1.11111],8898:[.55001,1.05,0,0,1.11111],8899:[.55001,1.05,0,0,1.11111],8968:[.65002,1.15,0,0,.52778],8969:[.65002,1.15,0,0,.52778],8970:[.65002,1.15,0,0,.52778],8971:[.65002,1.15,0,0,.52778],10216:[.65002,1.15,0,0,.61111],10217:[.65002,1.15,0,0,.61111],10752:[.55001,1.05,0,0,1.51112],10753:[.55001,1.05,0,0,1.51112],10754:[.55001,1.05,0,0,1.51112],10756:[.55001,1.05,0,0,1.11111],10758:[.55001,1.05,0,0,1.11111]},"Size3-Regular":{32:[0,0,0,0,.25],40:[.95003,1.45,0,0,.73611],41:[.95003,1.45,0,0,.73611],47:[.95003,1.45,0,0,1.04445],91:[.95003,1.45,0,0,.52778],92:[.95003,1.45,0,0,1.04445],93:[.95003,1.45,0,0,.52778],123:[.95003,1.45,0,0,.75],125:[.95003,1.45,0,0,.75],160:[0,0,0,0,.25],710:[0,.75,0,0,1.44445],732:[0,.75,0,0,1.44445],770:[0,.75,0,0,1.44445],771:[0,.75,0,0,1.44445],8730:[.95003,1.45,0,0,1],8968:[.95003,1.45,0,0,.58334],8969:[.95003,1.45,0,0,.58334],8970:[.95003,1.45,0,0,.58334],8971:[.95003,1.45,0,0,.58334],10216:[.95003,1.45,0,0,.75],10217:[.95003,1.45,0,0,.75]},"Size4-Regular":{32:[0,0,0,0,.25],40:[1.25003,1.75,0,0,.79167],41:[1.25003,1.75,0,0,.79167],47:[1.25003,1.75,0,0,1.27778],91:[1.25003,1.75,0,0,.58334],92:[1.25003,1.75,0,0,1.27778],93:[1.25003,1.75,0,0,.58334],123:[1.25003,1.75,0,0,.80556],125:[1.25003,1.75,0,0,.80556],160:[0,0,0,0,.25],710:[0,.825,0,0,1.8889],732:[0,.825,0,0,1.8889],770:[0,.825,0,0,1.8889],771:[0,.825,0,0,1.8889],8730:[1.25003,1.75,0,0,1],8968:[1.25003,1.75,0,0,.63889],8969:[1.25003,1.75,0,0,.63889],8970:[1.25003,1.75,0,0,.63889],8971:[1.25003,1.75,0,0,.63889],9115:[.64502,1.155,0,0,.875],9116:[1e-5,.6,0,0,.875],9117:[.64502,1.155,0,0,.875],9118:[.64502,1.155,0,0,.875],9119:[1e-5,.6,0,0,.875],9120:[.64502,1.155,0,0,.875],9121:[.64502,1.155,0,0,.66667],9122:[-99e-5,.601,0,0,.66667],9123:[.64502,1.155,0,0,.66667],9124:[.64502,1.155,0,0,.66667],9125:[-99e-5,.601,0,0,.66667],9126:[.64502,1.155,0,0,.66667],9127:[1e-5,.9,0,0,.88889],9128:[.65002,1.15,0,0,.88889],9129:[.90001,0,0,0,.88889],9130:[0,.3,0,0,.88889],9131:[1e-5,.9,0,0,.88889],9132:[.65002,1.15,0,0,.88889],9133:[.90001,0,0,0,.88889],9143:[.88502,.915,0,0,1.05556],10216:[1.25003,1.75,0,0,.80556],10217:[1.25003,1.75,0,0,.80556],57344:[-.00499,.605,0,0,1.05556],57345:[-.00499,.605,0,0,1.05556],57680:[0,.12,0,0,.45],57681:[0,.12,0,0,.45],57682:[0,.12,0,0,.45],57683:[0,.12,0,0,.45]},"Typewriter-Regular":{32:[0,0,0,0,.525],33:[0,.61111,0,0,.525],34:[0,.61111,0,0,.525],35:[0,.61111,0,0,.525],36:[.08333,.69444,0,0,.525],37:[.08333,.69444,0,0,.525],38:[0,.61111,0,0,.525],39:[0,.61111,0,0,.525],40:[.08333,.69444,0,0,.525],41:[.08333,.69444,0,0,.525],42:[0,.52083,0,0,.525],43:[-.08056,.53055,0,0,.525],44:[.13889,.125,0,0,.525],45:[-.08056,.53055,0,0,.525],46:[0,.125,0,0,.525],47:[.08333,.69444,0,0,.525],48:[0,.61111,0,0,.525],49:[0,.61111,0,0,.525],50:[0,.61111,0,0,.525],51:[0,.61111,0,0,.525],52:[0,.61111,0,0,.525],53:[0,.61111,0,0,.525],54:[0,.61111,0,0,.525],55:[0,.61111,0,0,.525],56:[0,.61111,0,0,.525],57:[0,.61111,0,0,.525],58:[0,.43056,0,0,.525],59:[.13889,.43056,0,0,.525],60:[-.05556,.55556,0,0,.525],61:[-.19549,.41562,0,0,.525],62:[-.05556,.55556,0,0,.525],63:[0,.61111,0,0,.525],64:[0,.61111,0,0,.525],65:[0,.61111,0,0,.525],66:[0,.61111,0,0,.525],67:[0,.61111,0,0,.525],68:[0,.61111,0,0,.525],69:[0,.61111,0,0,.525],70:[0,.61111,0,0,.525],71:[0,.61111,0,0,.525],72:[0,.61111,0,0,.525],73:[0,.61111,0,0,.525],74:[0,.61111,0,0,.525],75:[0,.61111,0,0,.525],76:[0,.61111,0,0,.525],77:[0,.61111,0,0,.525],78:[0,.61111,0,0,.525],79:[0,.61111,0,0,.525],80:[0,.61111,0,0,.525],81:[.13889,.61111,0,0,.525],82:[0,.61111,0,0,.525],83:[0,.61111,0,0,.525],84:[0,.61111,0,0,.525],85:[0,.61111,0,0,.525],86:[0,.61111,0,0,.525],87:[0,.61111,0,0,.525],88:[0,.61111,0,0,.525],89:[0,.61111,0,0,.525],90:[0,.61111,0,0,.525],91:[.08333,.69444,0,0,.525],92:[.08333,.69444,0,0,.525],93:[.08333,.69444,0,0,.525],94:[0,.61111,0,0,.525],95:[.09514,0,0,0,.525],96:[0,.61111,0,0,.525],97:[0,.43056,0,0,.525],98:[0,.61111,0,0,.525],99:[0,.43056,0,0,.525],100:[0,.61111,0,0,.525],101:[0,.43056,0,0,.525],102:[0,.61111,0,0,.525],103:[.22222,.43056,0,0,.525],104:[0,.61111,0,0,.525],105:[0,.61111,0,0,.525],106:[.22222,.61111,0,0,.525],107:[0,.61111,0,0,.525],108:[0,.61111,0,0,.525],109:[0,.43056,0,0,.525],110:[0,.43056,0,0,.525],111:[0,.43056,0,0,.525],112:[.22222,.43056,0,0,.525],113:[.22222,.43056,0,0,.525],114:[0,.43056,0,0,.525],115:[0,.43056,0,0,.525],116:[0,.55358,0,0,.525],117:[0,.43056,0,0,.525],118:[0,.43056,0,0,.525],119:[0,.43056,0,0,.525],120:[0,.43056,0,0,.525],121:[.22222,.43056,0,0,.525],122:[0,.43056,0,0,.525],123:[.08333,.69444,0,0,.525],124:[.08333,.69444,0,0,.525],125:[.08333,.69444,0,0,.525],126:[0,.61111,0,0,.525],127:[0,.61111,0,0,.525],160:[0,0,0,0,.525],176:[0,.61111,0,0,.525],184:[.19445,0,0,0,.525],305:[0,.43056,0,0,.525],567:[.22222,.43056,0,0,.525],711:[0,.56597,0,0,.525],713:[0,.56555,0,0,.525],714:[0,.61111,0,0,.525],715:[0,.61111,0,0,.525],728:[0,.61111,0,0,.525],730:[0,.61111,0,0,.525],770:[0,.61111,0,0,.525],771:[0,.61111,0,0,.525],776:[0,.61111,0,0,.525],915:[0,.61111,0,0,.525],916:[0,.61111,0,0,.525],920:[0,.61111,0,0,.525],923:[0,.61111,0,0,.525],926:[0,.61111,0,0,.525],928:[0,.61111,0,0,.525],931:[0,.61111,0,0,.525],933:[0,.61111,0,0,.525],934:[0,.61111,0,0,.525],936:[0,.61111,0,0,.525],937:[0,.61111,0,0,.525],8216:[0,.61111,0,0,.525],8217:[0,.61111,0,0,.525],8242:[0,.61111,0,0,.525],9251:[.11111,.21944,0,0,.525]}},Ge={slant:[.25,.25,.25],space:[0,0,0],stretch:[0,0,0],shrink:[0,0,0],xHeight:[.431,.431,.431],quad:[1,1.171,1.472],extraSpace:[0,0,0],num1:[.677,.732,.925],num2:[.394,.384,.387],num3:[.444,.471,.504],denom1:[.686,.752,1.025],denom2:[.345,.344,.532],sup1:[.413,.503,.504],sup2:[.363,.431,.404],sup3:[.289,.286,.294],sub1:[.15,.143,.2],sub2:[.247,.286,.4],supDrop:[.386,.353,.494],subDrop:[.05,.071,.1],delim1:[2.39,1.7,1.98],delim2:[1.01,1.157,1.42],axisHeight:[.25,.25,.25],defaultRuleThickness:[.04,.049,.049],bigOpSpacing1:[.111,.111,.111],bigOpSpacing2:[.166,.166,.166],bigOpSpacing3:[.2,.2,.2],bigOpSpacing4:[.6,.611,.611],bigOpSpacing5:[.1,.143,.143],sqrtRuleThickness:[.04,.04,.04],ptPerEm:[10,10,10],doubleRuleSep:[.2,.2,.2],arrayRuleWidth:[.04,.04,.04],fboxsep:[.3,.3,.3],fboxrule:[.04,.04,.04]},Ze={"Å":"A","Ð":"D","Þ":"o","å":"a","ð":"d","þ":"o","А":"A","Б":"B","В":"B","Г":"F","Д":"A","Е":"E","Ж":"K","З":"3","И":"N","Й":"N","К":"K","Л":"N","М":"M","Н":"H","О":"O","П":"N","Р":"P","С":"C","Т":"T","У":"y","Ф":"O","Х":"X","Ц":"U","Ч":"h","Ш":"W","Щ":"W","Ъ":"B","Ы":"X","Ь":"B","Э":"3","Ю":"X","Я":"R","а":"a","б":"b","в":"a","г":"r","д":"y","е":"e","ж":"m","з":"e","и":"n","й":"n","к":"n","л":"n","м":"m","н":"n","о":"o","п":"n","р":"p","с":"c","т":"o","у":"y","ф":"b","х":"x","ц":"n","ч":"n","ш":"w","щ":"w","ъ":"a","ы":"m","ь":"a","э":"e","ю":"m","я":"r"};function Xe(e,t,r){if(!Ye[t])throw new Error("Font metrics not found for font: "+t+".");var a=e.charCodeAt(0),n=Ye[t][a];if(!n&&e[0]in Ze&&(a=Ze[e[0]].charCodeAt(0),n=Ye[t][a]),n||"text"!==r||Ve(a)&&(n=Ye[t][77]),n)return{depth:n[0],height:n[1],italic:n[2],skew:n[3],width:n[4]}}var We={};var $e=[[1,1,1],[2,1,1],[3,1,1],[4,2,1],[5,2,1],[6,3,1],[7,4,2],[8,6,3],[9,7,6],[10,8,7],[11,10,9]],Je=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],Ke=function(e,t){return t.size<2?e:$e[e-1][t.size-1]};class Qe{constructor(e){this.style=void 0,this.color=void 0,this.size=void 0,this.textSize=void 0,this.phantom=void 0,this.font=void 0,this.fontFamily=void 0,this.fontWeight=void 0,this.fontShape=void 0,this.sizeMultiplier=void 0,this.maxSize=void 0,this.minRuleThickness=void 0,this._fontMetrics=void 0,this.style=e.style,this.color=e.color,this.size=e.size||Qe.BASESIZE,this.textSize=e.textSize||this.size,this.phantom=!!e.phantom,this.font=e.font||"",this.fontFamily=e.fontFamily||"",this.fontWeight=e.fontWeight||"",this.fontShape=e.fontShape||"",this.sizeMultiplier=Je[this.size-1],this.maxSize=e.maxSize,this.minRuleThickness=e.minRuleThickness,this._fontMetrics=void 0}extend(e){var t={style:this.style,size:this.size,textSize:this.textSize,color:this.color,phantom:this.phantom,font:this.font,fontFamily:this.fontFamily,fontWeight:this.fontWeight,fontShape:this.fontShape,maxSize:this.maxSize,minRuleThickness:this.minRuleThickness};for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);return new Qe(t)}havingStyle(e){return this.style===e?this:this.extend({style:e,size:Ke(this.textSize,e)})}havingCrampedStyle(){return this.havingStyle(this.style.cramp())}havingSize(e){return this.size===e&&this.textSize===e?this:this.extend({style:this.style.text(),size:e,textSize:e,sizeMultiplier:Je[e-1]})}havingBaseStyle(e){e=e||this.style.text();var t=Ke(Qe.BASESIZE,e);return this.size===t&&this.textSize===Qe.BASESIZE&&this.style===e?this:this.extend({style:e,size:t})}havingBaseSizing(){var e;switch(this.style.id){case 4:case 5:e=3;break;case 6:case 7:e=1;break;default:e=6}return this.extend({style:this.style.text(),size:e})}withColor(e){return this.extend({color:e})}withPhantom(){return this.extend({phantom:!0})}withFont(e){return this.extend({font:e})}withTextFontFamily(e){return this.extend({fontFamily:e,font:""})}withTextFontWeight(e){return this.extend({fontWeight:e,font:""})}withTextFontShape(e){return this.extend({fontShape:e,font:""})}sizingClasses(e){return e.size!==this.size?["sizing","reset-size"+e.size,"size"+this.size]:[]}baseSizingClasses(){return this.size!==Qe.BASESIZE?["sizing","reset-size"+this.size,"size"+Qe.BASESIZE]:[]}fontMetrics(){return this._fontMetrics||(this._fontMetrics=function(e){var t;if(!We[t=e>=5?0:e>=3?1:2]){var r=We[t]={cssEmPerMu:Ge.quad[t]/18};for(var a in Ge)Ge.hasOwnProperty(a)&&(r[a]=Ge[a][t])}return We[t]}(this.size)),this._fontMetrics}getColor(){return this.phantom?"transparent":this.color}}Qe.BASESIZE=6;var et={pt:1,mm:7227/2540,cm:7227/254,in:72.27,bp:1.00375,pc:12,dd:1238/1157,cc:14856/1157,nd:685/642,nc:1370/107,sp:1/65536,px:1.00375},tt={ex:!0,em:!0,mu:!0},rt=function(e){return"string"!=typeof e&&(e=e.unit),e in et||e in tt||"ex"===e},at=function(e,t){var r;if(e.unit in et)r=et[e.unit]/t.fontMetrics().ptPerEm/t.sizeMultiplier;else if("mu"===e.unit)r=t.fontMetrics().cssEmPerMu;else{var a;if(a=t.style.isTight()?t.havingStyle(t.style.text()):t,"ex"===e.unit)r=a.fontMetrics().xHeight;else{if("em"!==e.unit)throw new we("Invalid unit: '"+e.unit+"'");r=a.fontMetrics().quad}a!==t&&(r*=a.sizeMultiplier/t.sizeMultiplier)}return Math.min(e.number*r,t.maxSize)},nt=function(e){return+e.toFixed(4)+"em"},it=function(e){return e.filter((e=>e)).join(" ")},ot=function(e,t,r){if(this.classes=e||[],this.attributes={},this.height=0,this.depth=0,this.maxFontSize=0,this.style=r||{},t){t.style.isTight()&&this.classes.push("mtight");var a=t.getColor();a&&(this.style.color=a)}},lt=function(e){var t=document.createElement(e);for(var r in t.className=it(this.classes),this.style)this.style.hasOwnProperty(r)&&(t.style[r]=this.style[r]);for(var a in this.attributes)this.attributes.hasOwnProperty(a)&&t.setAttribute(a,this.attributes[a]);for(var n=0;n<this.children.length;n++)t.appendChild(this.children[n].toNode());return t},st=/[\s"'>/=\x00-\x1f]/,ct=function(e){var t="<"+e;this.classes.length&&(t+=' class="'+Se.escape(it(this.classes))+'"');var r="";for(var a in this.style)this.style.hasOwnProperty(a)&&(r+=Se.hyphenate(a)+":"+this.style[a]+";");for(var n in r&&(t+=' style="'+Se.escape(r)+'"'),this.attributes)if(this.attributes.hasOwnProperty(n)){if(st.test(n))throw new we("Invalid attribute name '"+n+"'");t+=" "+n+'="'+Se.escape(this.attributes[n])+'"'}t+=">";for(var i=0;i<this.children.length;i++)t+=this.children[i].toMarkup();return t+="</"+e+">"};class mt{constructor(e,t,r,a){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.width=void 0,this.maxFontSize=void 0,this.style=void 0,ot.call(this,e,r,a),this.children=t||[]}setAttribute(e,t){this.attributes[e]=t}hasClass(e){return Se.contains(this.classes,e)}toNode(){return lt.call(this,"span")}toMarkup(){return ct.call(this,"span")}}class ht{constructor(e,t,r,a){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,ot.call(this,t,a),this.children=r||[],this.setAttribute("href",e)}setAttribute(e,t){this.attributes[e]=t}hasClass(e){return Se.contains(this.classes,e)}toNode(){return lt.call(this,"a")}toMarkup(){return ct.call(this,"a")}}class ut{constructor(e,t,r){this.src=void 0,this.alt=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.alt=t,this.src=e,this.classes=["mord"],this.style=r}hasClass(e){return Se.contains(this.classes,e)}toNode(){var e=document.createElement("img");for(var t in e.src=this.src,e.alt=this.alt,e.className="mord",this.style)this.style.hasOwnProperty(t)&&(e.style[t]=this.style[t]);return e}toMarkup(){var e='<img src="'+Se.escape(this.src)+'" alt="'+Se.escape(this.alt)+'"',t="";for(var r in this.style)this.style.hasOwnProperty(r)&&(t+=Se.hyphenate(r)+":"+this.style[r]+";");return t&&(e+=' style="'+Se.escape(t)+'"'),e+="'/>"}}var pt={"î":"ı̂","ï":"ı̈","í":"ı́","ì":"ı̀"};class dt{constructor(e,t,r,a,n,i,o,l){this.text=void 0,this.height=void 0,this.depth=void 0,this.italic=void 0,this.skew=void 0,this.width=void 0,this.maxFontSize=void 0,this.classes=void 0,this.style=void 0,this.text=e,this.height=t||0,this.depth=r||0,this.italic=a||0,this.skew=n||0,this.width=i||0,this.classes=o||[],this.style=l||{},this.maxFontSize=0;var s=function(e){for(var t=0;t<Fe.length;t++)for(var r=Fe[t],a=0;a<r.blocks.length;a++){var n=r.blocks[a];if(e>=n[0]&&e<=n[1])return r.name}return null}(this.text.charCodeAt(0));s&&this.classes.push(s+"_fallback"),/[îïíì]/.test(this.text)&&(this.text=pt[this.text])}hasClass(e){return Se.contains(this.classes,e)}toNode(){var e=document.createTextNode(this.text),t=null;for(var r in this.italic>0&&((t=document.createElement("span")).style.marginRight=nt(this.italic)),this.classes.length>0&&((t=t||document.createElement("span")).className=it(this.classes)),this.style)this.style.hasOwnProperty(r)&&((t=t||document.createElement("span")).style[r]=this.style[r]);return t?(t.appendChild(e),t):e}toMarkup(){var e=!1,t="<span";this.classes.length&&(e=!0,t+=' class="',t+=Se.escape(it(this.classes)),t+='"');var r="";for(var a in this.italic>0&&(r+="margin-right:"+this.italic+"em;"),this.style)this.style.hasOwnProperty(a)&&(r+=Se.hyphenate(a)+":"+this.style[a]+";");r&&(e=!0,t+=' style="'+Se.escape(r)+'"');var n=Se.escape(this.text);return e?(t+=">",t+=n,t+="</span>"):n}}class ft{constructor(e,t){this.children=void 0,this.attributes=void 0,this.children=e||[],this.attributes=t||{}}toNode(){var e=document.createElementNS("http://www.w3.org/2000/svg","svg");for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&e.setAttribute(t,this.attributes[t]);for(var r=0;r<this.children.length;r++)e.appendChild(this.children[r].toNode());return e}toMarkup(){var e='<svg xmlns="http://www.w3.org/2000/svg"';for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&(e+=" "+t+'="'+Se.escape(this.attributes[t])+'"');e+=">";for(var r=0;r<this.children.length;r++)e+=this.children[r].toMarkup();return e+="</svg>"}}class gt{constructor(e,t){this.pathName=void 0,this.alternate=void 0,this.pathName=e,this.alternate=t}toNode(){var e=document.createElementNS("http://www.w3.org/2000/svg","path");return this.alternate?e.setAttribute("d",this.alternate):e.setAttribute("d",Pe[this.pathName]),e}toMarkup(){return this.alternate?'<path d="'+Se.escape(this.alternate)+'"/>':'<path d="'+Se.escape(Pe[this.pathName])+'"/>'}}class vt{constructor(e){this.attributes=void 0,this.attributes=e||{}}toNode(){var e=document.createElementNS("http://www.w3.org/2000/svg","line");for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&e.setAttribute(t,this.attributes[t]);return e}toMarkup(){var e="<line";for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&(e+=" "+t+'="'+Se.escape(this.attributes[t])+'"');return e+="/>"}}function bt(e){if(e instanceof dt)return e;throw new Error("Expected symbolNode but got "+String(e)+".")}var yt={bin:1,close:1,inner:1,open:1,punct:1,rel:1},xt={"accent-token":1,mathord:1,"op-token":1,spacing:1,textord:1},wt={math:{},text:{}};function kt(e,t,r,a,n,i){wt[e][n]={font:t,group:r,replace:a},i&&a&&(wt[e][a]=wt[e][n])}var Et="math",Mt="text",Ct="main",St="ams",Nt="accent-token",zt="bin",Tt="close",At="inner",qt="mathord",Lt="op-token",Bt="open",Ot="punct",Ht="rel",It="spacing",Rt="textord";kt(Et,Ct,Ht,"≡","\\equiv",!0),kt(Et,Ct,Ht,"≺","\\prec",!0),kt(Et,Ct,Ht,"≻","\\succ",!0),kt(Et,Ct,Ht,"∼","\\sim",!0),kt(Et,Ct,Ht,"⊥","\\perp"),kt(Et,Ct,Ht,"⪯","\\preceq",!0),kt(Et,Ct,Ht,"⪰","\\succeq",!0),kt(Et,Ct,Ht,"≃","\\simeq",!0),kt(Et,Ct,Ht,"∣","\\mid",!0),kt(Et,Ct,Ht,"≪","\\ll",!0),kt(Et,Ct,Ht,"≫","\\gg",!0),kt(Et,Ct,Ht,"≍","\\asymp",!0),kt(Et,Ct,Ht,"∥","\\parallel"),kt(Et,Ct,Ht,"⋈","\\bowtie",!0),kt(Et,Ct,Ht,"⌣","\\smile",!0),kt(Et,Ct,Ht,"⊑","\\sqsubseteq",!0),kt(Et,Ct,Ht,"⊒","\\sqsupseteq",!0),kt(Et,Ct,Ht,"≐","\\doteq",!0),kt(Et,Ct,Ht,"⌢","\\frown",!0),kt(Et,Ct,Ht,"∋","\\ni",!0),kt(Et,Ct,Ht,"∝","\\propto",!0),kt(Et,Ct,Ht,"⊢","\\vdash",!0),kt(Et,Ct,Ht,"⊣","\\dashv",!0),kt(Et,Ct,Ht,"∋","\\owns"),kt(Et,Ct,Ot,".","\\ldotp"),kt(Et,Ct,Ot,"⋅","\\cdotp"),kt(Et,Ct,Rt,"#","\\#"),kt(Mt,Ct,Rt,"#","\\#"),kt(Et,Ct,Rt,"&","\\&"),kt(Mt,Ct,Rt,"&","\\&"),kt(Et,Ct,Rt,"ℵ","\\aleph",!0),kt(Et,Ct,Rt,"∀","\\forall",!0),kt(Et,Ct,Rt,"ℏ","\\hbar",!0),kt(Et,Ct,Rt,"∃","\\exists",!0),kt(Et,Ct,Rt,"∇","\\nabla",!0),kt(Et,Ct,Rt,"♭","\\flat",!0),kt(Et,Ct,Rt,"ℓ","\\ell",!0),kt(Et,Ct,Rt,"♮","\\natural",!0),kt(Et,Ct,Rt,"♣","\\clubsuit",!0),kt(Et,Ct,Rt,"℘","\\wp",!0),kt(Et,Ct,Rt,"♯","\\sharp",!0),kt(Et,Ct,Rt,"♢","\\diamondsuit",!0),kt(Et,Ct,Rt,"ℜ","\\Re",!0),kt(Et,Ct,Rt,"♡","\\heartsuit",!0),kt(Et,Ct,Rt,"ℑ","\\Im",!0),kt(Et,Ct,Rt,"♠","\\spadesuit",!0),kt(Et,Ct,Rt,"§","\\S",!0),kt(Mt,Ct,Rt,"§","\\S"),kt(Et,Ct,Rt,"¶","\\P",!0),kt(Mt,Ct,Rt,"¶","\\P"),kt(Et,Ct,Rt,"†","\\dag"),kt(Mt,Ct,Rt,"†","\\dag"),kt(Mt,Ct,Rt,"†","\\textdagger"),kt(Et,Ct,Rt,"‡","\\ddag"),kt(Mt,Ct,Rt,"‡","\\ddag"),kt(Mt,Ct,Rt,"‡","\\textdaggerdbl"),kt(Et,Ct,Tt,"⎱","\\rmoustache",!0),kt(Et,Ct,Bt,"⎰","\\lmoustache",!0),kt(Et,Ct,Tt,"⟯","\\rgroup",!0),kt(Et,Ct,Bt,"⟮","\\lgroup",!0),kt(Et,Ct,zt,"∓","\\mp",!0),kt(Et,Ct,zt,"⊖","\\ominus",!0),kt(Et,Ct,zt,"⊎","\\uplus",!0),kt(Et,Ct,zt,"⊓","\\sqcap",!0),kt(Et,Ct,zt,"∗","\\ast"),kt(Et,Ct,zt,"⊔","\\sqcup",!0),kt(Et,Ct,zt,"◯","\\bigcirc",!0),kt(Et,Ct,zt,"∙","\\bullet",!0),kt(Et,Ct,zt,"‡","\\ddagger"),kt(Et,Ct,zt,"≀","\\wr",!0),kt(Et,Ct,zt,"⨿","\\amalg"),kt(Et,Ct,zt,"&","\\And"),kt(Et,Ct,Ht,"⟵","\\longleftarrow",!0),kt(Et,Ct,Ht,"⇐","\\Leftarrow",!0),kt(Et,Ct,Ht,"⟸","\\Longleftarrow",!0),kt(Et,Ct,Ht,"⟶","\\longrightarrow",!0),kt(Et,Ct,Ht,"⇒","\\Rightarrow",!0),kt(Et,Ct,Ht,"⟹","\\Longrightarrow",!0),kt(Et,Ct,Ht,"↔","\\leftrightarrow",!0),kt(Et,Ct,Ht,"⟷","\\longleftrightarrow",!0),kt(Et,Ct,Ht,"⇔","\\Leftrightarrow",!0),kt(Et,Ct,Ht,"⟺","\\Longleftrightarrow",!0),kt(Et,Ct,Ht,"↦","\\mapsto",!0),kt(Et,Ct,Ht,"⟼","\\longmapsto",!0),kt(Et,Ct,Ht,"↗","\\nearrow",!0),kt(Et,Ct,Ht,"↩","\\hookleftarrow",!0),kt(Et,Ct,Ht,"↪","\\hookrightarrow",!0),kt(Et,Ct,Ht,"↘","\\searrow",!0),kt(Et,Ct,Ht,"↼","\\leftharpoonup",!0),kt(Et,Ct,Ht,"⇀","\\rightharpoonup",!0),kt(Et,Ct,Ht,"↙","\\swarrow",!0),kt(Et,Ct,Ht,"↽","\\leftharpoondown",!0),kt(Et,Ct,Ht,"⇁","\\rightharpoondown",!0),kt(Et,Ct,Ht,"↖","\\nwarrow",!0),kt(Et,Ct,Ht,"⇌","\\rightleftharpoons",!0),kt(Et,St,Ht,"≮","\\nless",!0),kt(Et,St,Ht,"","\\@nleqslant"),kt(Et,St,Ht,"","\\@nleqq"),kt(Et,St,Ht,"⪇","\\lneq",!0),kt(Et,St,Ht,"≨","\\lneqq",!0),kt(Et,St,Ht,"","\\@lvertneqq"),kt(Et,St,Ht,"⋦","\\lnsim",!0),kt(Et,St,Ht,"⪉","\\lnapprox",!0),kt(Et,St,Ht,"⊀","\\nprec",!0),kt(Et,St,Ht,"⋠","\\npreceq",!0),kt(Et,St,Ht,"⋨","\\precnsim",!0),kt(Et,St,Ht,"⪹","\\precnapprox",!0),kt(Et,St,Ht,"≁","\\nsim",!0),kt(Et,St,Ht,"","\\@nshortmid"),kt(Et,St,Ht,"∤","\\nmid",!0),kt(Et,St,Ht,"⊬","\\nvdash",!0),kt(Et,St,Ht,"⊭","\\nvDash",!0),kt(Et,St,Ht,"⋪","\\ntriangleleft"),kt(Et,St,Ht,"⋬","\\ntrianglelefteq",!0),kt(Et,St,Ht,"⊊","\\subsetneq",!0),kt(Et,St,Ht,"","\\@varsubsetneq"),kt(Et,St,Ht,"⫋","\\subsetneqq",!0),kt(Et,St,Ht,"","\\@varsubsetneqq"),kt(Et,St,Ht,"≯","\\ngtr",!0),kt(Et,St,Ht,"","\\@ngeqslant"),kt(Et,St,Ht,"","\\@ngeqq"),kt(Et,St,Ht,"⪈","\\gneq",!0),kt(Et,St,Ht,"≩","\\gneqq",!0),kt(Et,St,Ht,"","\\@gvertneqq"),kt(Et,St,Ht,"⋧","\\gnsim",!0),kt(Et,St,Ht,"⪊","\\gnapprox",!0),kt(Et,St,Ht,"⊁","\\nsucc",!0),kt(Et,St,Ht,"⋡","\\nsucceq",!0),kt(Et,St,Ht,"⋩","\\succnsim",!0),kt(Et,St,Ht,"⪺","\\succnapprox",!0),kt(Et,St,Ht,"≆","\\ncong",!0),kt(Et,St,Ht,"","\\@nshortparallel"),kt(Et,St,Ht,"∦","\\nparallel",!0),kt(Et,St,Ht,"⊯","\\nVDash",!0),kt(Et,St,Ht,"⋫","\\ntriangleright"),kt(Et,St,Ht,"⋭","\\ntrianglerighteq",!0),kt(Et,St,Ht,"","\\@nsupseteqq"),kt(Et,St,Ht,"⊋","\\supsetneq",!0),kt(Et,St,Ht,"","\\@varsupsetneq"),kt(Et,St,Ht,"⫌","\\supsetneqq",!0),kt(Et,St,Ht,"","\\@varsupsetneqq"),kt(Et,St,Ht,"⊮","\\nVdash",!0),kt(Et,St,Ht,"⪵","\\precneqq",!0),kt(Et,St,Ht,"⪶","\\succneqq",!0),kt(Et,St,Ht,"","\\@nsubseteqq"),kt(Et,St,zt,"⊴","\\unlhd"),kt(Et,St,zt,"⊵","\\unrhd"),kt(Et,St,Ht,"↚","\\nleftarrow",!0),kt(Et,St,Ht,"↛","\\nrightarrow",!0),kt(Et,St,Ht,"⇍","\\nLeftarrow",!0),kt(Et,St,Ht,"⇏","\\nRightarrow",!0),kt(Et,St,Ht,"↮","\\nleftrightarrow",!0),kt(Et,St,Ht,"⇎","\\nLeftrightarrow",!0),kt(Et,St,Ht,"△","\\vartriangle"),kt(Et,St,Rt,"ℏ","\\hslash"),kt(Et,St,Rt,"▽","\\triangledown"),kt(Et,St,Rt,"◊","\\lozenge"),kt(Et,St,Rt,"Ⓢ","\\circledS"),kt(Et,St,Rt,"®","\\circledR"),kt(Mt,St,Rt,"®","\\circledR"),kt(Et,St,Rt,"∡","\\measuredangle",!0),kt(Et,St,Rt,"∄","\\nexists"),kt(Et,St,Rt,"℧","\\mho"),kt(Et,St,Rt,"Ⅎ","\\Finv",!0),kt(Et,St,Rt,"⅁","\\Game",!0),kt(Et,St,Rt,"‵","\\backprime"),kt(Et,St,Rt,"▲","\\blacktriangle"),kt(Et,St,Rt,"▼","\\blacktriangledown"),kt(Et,St,Rt,"■","\\blacksquare"),kt(Et,St,Rt,"⧫","\\blacklozenge"),kt(Et,St,Rt,"★","\\bigstar"),kt(Et,St,Rt,"∢","\\sphericalangle",!0),kt(Et,St,Rt,"∁","\\complement",!0),kt(Et,St,Rt,"ð","\\eth",!0),kt(Mt,Ct,Rt,"ð","ð"),kt(Et,St,Rt,"╱","\\diagup"),kt(Et,St,Rt,"╲","\\diagdown"),kt(Et,St,Rt,"□","\\square"),kt(Et,St,Rt,"□","\\Box"),kt(Et,St,Rt,"◊","\\Diamond"),kt(Et,St,Rt,"¥","\\yen",!0),kt(Mt,St,Rt,"¥","\\yen",!0),kt(Et,St,Rt,"✓","\\checkmark",!0),kt(Mt,St,Rt,"✓","\\checkmark"),kt(Et,St,Rt,"ℶ","\\beth",!0),kt(Et,St,Rt,"ℸ","\\daleth",!0),kt(Et,St,Rt,"ℷ","\\gimel",!0),kt(Et,St,Rt,"ϝ","\\digamma",!0),kt(Et,St,Rt,"ϰ","\\varkappa"),kt(Et,St,Bt,"┌","\\@ulcorner",!0),kt(Et,St,Tt,"┐","\\@urcorner",!0),kt(Et,St,Bt,"└","\\@llcorner",!0),kt(Et,St,Tt,"┘","\\@lrcorner",!0),kt(Et,St,Ht,"≦","\\leqq",!0),kt(Et,St,Ht,"⩽","\\leqslant",!0),kt(Et,St,Ht,"⪕","\\eqslantless",!0),kt(Et,St,Ht,"≲","\\lesssim",!0),kt(Et,St,Ht,"⪅","\\lessapprox",!0),kt(Et,St,Ht,"≊","\\approxeq",!0),kt(Et,St,zt,"⋖","\\lessdot"),kt(Et,St,Ht,"⋘","\\lll",!0),kt(Et,St,Ht,"≶","\\lessgtr",!0),kt(Et,St,Ht,"⋚","\\lesseqgtr",!0),kt(Et,St,Ht,"⪋","\\lesseqqgtr",!0),kt(Et,St,Ht,"≑","\\doteqdot"),kt(Et,St,Ht,"≓","\\risingdotseq",!0),kt(Et,St,Ht,"≒","\\fallingdotseq",!0),kt(Et,St,Ht,"∽","\\backsim",!0),kt(Et,St,Ht,"⋍","\\backsimeq",!0),kt(Et,St,Ht,"⫅","\\subseteqq",!0),kt(Et,St,Ht,"⋐","\\Subset",!0),kt(Et,St,Ht,"⊏","\\sqsubset",!0),kt(Et,St,Ht,"≼","\\preccurlyeq",!0),kt(Et,St,Ht,"⋞","\\curlyeqprec",!0),kt(Et,St,Ht,"≾","\\precsim",!0),kt(Et,St,Ht,"⪷","\\precapprox",!0),kt(Et,St,Ht,"⊲","\\vartriangleleft"),kt(Et,St,Ht,"⊴","\\trianglelefteq"),kt(Et,St,Ht,"⊨","\\vDash",!0),kt(Et,St,Ht,"⊪","\\Vvdash",!0),kt(Et,St,Ht,"⌣","\\smallsmile"),kt(Et,St,Ht,"⌢","\\smallfrown"),kt(Et,St,Ht,"≏","\\bumpeq",!0),kt(Et,St,Ht,"≎","\\Bumpeq",!0),kt(Et,St,Ht,"≧","\\geqq",!0),kt(Et,St,Ht,"⩾","\\geqslant",!0),kt(Et,St,Ht,"⪖","\\eqslantgtr",!0),kt(Et,St,Ht,"≳","\\gtrsim",!0),kt(Et,St,Ht,"⪆","\\gtrapprox",!0),kt(Et,St,zt,"⋗","\\gtrdot"),kt(Et,St,Ht,"⋙","\\ggg",!0),kt(Et,St,Ht,"≷","\\gtrless",!0),kt(Et,St,Ht,"⋛","\\gtreqless",!0),kt(Et,St,Ht,"⪌","\\gtreqqless",!0),kt(Et,St,Ht,"≖","\\eqcirc",!0),kt(Et,St,Ht,"≗","\\circeq",!0),kt(Et,St,Ht,"≜","\\triangleq",!0),kt(Et,St,Ht,"∼","\\thicksim"),kt(Et,St,Ht,"≈","\\thickapprox"),kt(Et,St,Ht,"⫆","\\supseteqq",!0),kt(Et,St,Ht,"⋑","\\Supset",!0),kt(Et,St,Ht,"⊐","\\sqsupset",!0),kt(Et,St,Ht,"≽","\\succcurlyeq",!0),kt(Et,St,Ht,"⋟","\\curlyeqsucc",!0),kt(Et,St,Ht,"≿","\\succsim",!0),kt(Et,St,Ht,"⪸","\\succapprox",!0),kt(Et,St,Ht,"⊳","\\vartriangleright"),kt(Et,St,Ht,"⊵","\\trianglerighteq"),kt(Et,St,Ht,"⊩","\\Vdash",!0),kt(Et,St,Ht,"∣","\\shortmid"),kt(Et,St,Ht,"∥","\\shortparallel"),kt(Et,St,Ht,"≬","\\between",!0),kt(Et,St,Ht,"⋔","\\pitchfork",!0),kt(Et,St,Ht,"∝","\\varpropto"),kt(Et,St,Ht,"◀","\\blacktriangleleft"),kt(Et,St,Ht,"∴","\\therefore",!0),kt(Et,St,Ht,"∍","\\backepsilon"),kt(Et,St,Ht,"▶","\\blacktriangleright"),kt(Et,St,Ht,"∵","\\because",!0),kt(Et,St,Ht,"⋘","\\llless"),kt(Et,St,Ht,"⋙","\\gggtr"),kt(Et,St,zt,"⊲","\\lhd"),kt(Et,St,zt,"⊳","\\rhd"),kt(Et,St,Ht,"≂","\\eqsim",!0),kt(Et,Ct,Ht,"⋈","\\Join"),kt(Et,St,Ht,"≑","\\Doteq",!0),kt(Et,St,zt,"∔","\\dotplus",!0),kt(Et,St,zt,"∖","\\smallsetminus"),kt(Et,St,zt,"⋒","\\Cap",!0),kt(Et,St,zt,"⋓","\\Cup",!0),kt(Et,St,zt,"⩞","\\doublebarwedge",!0),kt(Et,St,zt,"⊟","\\boxminus",!0),kt(Et,St,zt,"⊞","\\boxplus",!0),kt(Et,St,zt,"⋇","\\divideontimes",!0),kt(Et,St,zt,"⋉","\\ltimes",!0),kt(Et,St,zt,"⋊","\\rtimes",!0),kt(Et,St,zt,"⋋","\\leftthreetimes",!0),kt(Et,St,zt,"⋌","\\rightthreetimes",!0),kt(Et,St,zt,"⋏","\\curlywedge",!0),kt(Et,St,zt,"⋎","\\curlyvee",!0),kt(Et,St,zt,"⊝","\\circleddash",!0),kt(Et,St,zt,"⊛","\\circledast",!0),kt(Et,St,zt,"⋅","\\centerdot"),kt(Et,St,zt,"⊺","\\intercal",!0),kt(Et,St,zt,"⋒","\\doublecap"),kt(Et,St,zt,"⋓","\\doublecup"),kt(Et,St,zt,"⊠","\\boxtimes",!0),kt(Et,St,Ht,"⇢","\\dashrightarrow",!0),kt(Et,St,Ht,"⇠","\\dashleftarrow",!0),kt(Et,St,Ht,"⇇","\\leftleftarrows",!0),kt(Et,St,Ht,"⇆","\\leftrightarrows",!0),kt(Et,St,Ht,"⇚","\\Lleftarrow",!0),kt(Et,St,Ht,"↞","\\twoheadleftarrow",!0),kt(Et,St,Ht,"↢","\\leftarrowtail",!0),kt(Et,St,Ht,"↫","\\looparrowleft",!0),kt(Et,St,Ht,"⇋","\\leftrightharpoons",!0),kt(Et,St,Ht,"↶","\\curvearrowleft",!0),kt(Et,St,Ht,"↺","\\circlearrowleft",!0),kt(Et,St,Ht,"↰","\\Lsh",!0),kt(Et,St,Ht,"⇈","\\upuparrows",!0),kt(Et,St,Ht,"↿","\\upharpoonleft",!0),kt(Et,St,Ht,"⇃","\\downharpoonleft",!0),kt(Et,Ct,Ht,"⊶","\\origof",!0),kt(Et,Ct,Ht,"⊷","\\imageof",!0),kt(Et,St,Ht,"⊸","\\multimap",!0),kt(Et,St,Ht,"↭","\\leftrightsquigarrow",!0),kt(Et,St,Ht,"⇉","\\rightrightarrows",!0),kt(Et,St,Ht,"⇄","\\rightleftarrows",!0),kt(Et,St,Ht,"↠","\\twoheadrightarrow",!0),kt(Et,St,Ht,"↣","\\rightarrowtail",!0),kt(Et,St,Ht,"↬","\\looparrowright",!0),kt(Et,St,Ht,"↷","\\curvearrowright",!0),kt(Et,St,Ht,"↻","\\circlearrowright",!0),kt(Et,St,Ht,"↱","\\Rsh",!0),kt(Et,St,Ht,"⇊","\\downdownarrows",!0),kt(Et,St,Ht,"↾","\\upharpoonright",!0),kt(Et,St,Ht,"⇂","\\downharpoonright",!0),kt(Et,St,Ht,"⇝","\\rightsquigarrow",!0),kt(Et,St,Ht,"⇝","\\leadsto"),kt(Et,St,Ht,"⇛","\\Rrightarrow",!0),kt(Et,St,Ht,"↾","\\restriction"),kt(Et,Ct,Rt,"‘","`"),kt(Et,Ct,Rt,"$","\\$"),kt(Mt,Ct,Rt,"$","\\$"),kt(Mt,Ct,Rt,"$","\\textdollar"),kt(Et,Ct,Rt,"%","\\%"),kt(Mt,Ct,Rt,"%","\\%"),kt(Et,Ct,Rt,"_","\\_"),kt(Mt,Ct,Rt,"_","\\_"),kt(Mt,Ct,Rt,"_","\\textunderscore"),kt(Et,Ct,Rt,"∠","\\angle",!0),kt(Et,Ct,Rt,"∞","\\infty",!0),kt(Et,Ct,Rt,"′","\\prime"),kt(Et,Ct,Rt,"△","\\triangle"),kt(Et,Ct,Rt,"Γ","\\Gamma",!0),kt(Et,Ct,Rt,"Δ","\\Delta",!0),kt(Et,Ct,Rt,"Θ","\\Theta",!0),kt(Et,Ct,Rt,"Λ","\\Lambda",!0),kt(Et,Ct,Rt,"Ξ","\\Xi",!0),kt(Et,Ct,Rt,"Π","\\Pi",!0),kt(Et,Ct,Rt,"Σ","\\Sigma",!0),kt(Et,Ct,Rt,"Υ","\\Upsilon",!0),kt(Et,Ct,Rt,"Φ","\\Phi",!0),kt(Et,Ct,Rt,"Ψ","\\Psi",!0),kt(Et,Ct,Rt,"Ω","\\Omega",!0),kt(Et,Ct,Rt,"A","Α"),kt(Et,Ct,Rt,"B","Β"),kt(Et,Ct,Rt,"E","Ε"),kt(Et,Ct,Rt,"Z","Ζ"),kt(Et,Ct,Rt,"H","Η"),kt(Et,Ct,Rt,"I","Ι"),kt(Et,Ct,Rt,"K","Κ"),kt(Et,Ct,Rt,"M","Μ"),kt(Et,Ct,Rt,"N","Ν"),kt(Et,Ct,Rt,"O","Ο"),kt(Et,Ct,Rt,"P","Ρ"),kt(Et,Ct,Rt,"T","Τ"),kt(Et,Ct,Rt,"X","Χ"),kt(Et,Ct,Rt,"¬","\\neg",!0),kt(Et,Ct,Rt,"¬","\\lnot"),kt(Et,Ct,Rt,"⊤","\\top"),kt(Et,Ct,Rt,"⊥","\\bot"),kt(Et,Ct,Rt,"∅","\\emptyset"),kt(Et,St,Rt,"∅","\\varnothing"),kt(Et,Ct,qt,"α","\\alpha",!0),kt(Et,Ct,qt,"β","\\beta",!0),kt(Et,Ct,qt,"γ","\\gamma",!0),kt(Et,Ct,qt,"δ","\\delta",!0),kt(Et,Ct,qt,"ϵ","\\epsilon",!0),kt(Et,Ct,qt,"ζ","\\zeta",!0),kt(Et,Ct,qt,"η","\\eta",!0),kt(Et,Ct,qt,"θ","\\theta",!0),kt(Et,Ct,qt,"ι","\\iota",!0),kt(Et,Ct,qt,"κ","\\kappa",!0),kt(Et,Ct,qt,"λ","\\lambda",!0),kt(Et,Ct,qt,"μ","\\mu",!0),kt(Et,Ct,qt,"ν","\\nu",!0),kt(Et,Ct,qt,"ξ","\\xi",!0),kt(Et,Ct,qt,"ο","\\omicron",!0),kt(Et,Ct,qt,"π","\\pi",!0),kt(Et,Ct,qt,"ρ","\\rho",!0),kt(Et,Ct,qt,"σ","\\sigma",!0),kt(Et,Ct,qt,"τ","\\tau",!0),kt(Et,Ct,qt,"υ","\\upsilon",!0),kt(Et,Ct,qt,"ϕ","\\phi",!0),kt(Et,Ct,qt,"χ","\\chi",!0),kt(Et,Ct,qt,"ψ","\\psi",!0),kt(Et,Ct,qt,"ω","\\omega",!0),kt(Et,Ct,qt,"ε","\\varepsilon",!0),kt(Et,Ct,qt,"ϑ","\\vartheta",!0),kt(Et,Ct,qt,"ϖ","\\varpi",!0),kt(Et,Ct,qt,"ϱ","\\varrho",!0),kt(Et,Ct,qt,"ς","\\varsigma",!0),kt(Et,Ct,qt,"φ","\\varphi",!0),kt(Et,Ct,zt,"∗","*",!0),kt(Et,Ct,zt,"+","+"),kt(Et,Ct,zt,"−","-",!0),kt(Et,Ct,zt,"⋅","\\cdot",!0),kt(Et,Ct,zt,"∘","\\circ",!0),kt(Et,Ct,zt,"÷","\\div",!0),kt(Et,Ct,zt,"±","\\pm",!0),kt(Et,Ct,zt,"×","\\times",!0),kt(Et,Ct,zt,"∩","\\cap",!0),kt(Et,Ct,zt,"∪","\\cup",!0),kt(Et,Ct,zt,"∖","\\setminus",!0),kt(Et,Ct,zt,"∧","\\land"),kt(Et,Ct,zt,"∨","\\lor"),kt(Et,Ct,zt,"∧","\\wedge",!0),kt(Et,Ct,zt,"∨","\\vee",!0),kt(Et,Ct,Rt,"√","\\surd"),kt(Et,Ct,Bt,"⟨","\\langle",!0),kt(Et,Ct,Bt,"∣","\\lvert"),kt(Et,Ct,Bt,"∥","\\lVert"),kt(Et,Ct,Tt,"?","?"),kt(Et,Ct,Tt,"!","!"),kt(Et,Ct,Tt,"⟩","\\rangle",!0),kt(Et,Ct,Tt,"∣","\\rvert"),kt(Et,Ct,Tt,"∥","\\rVert"),kt(Et,Ct,Ht,"=","="),kt(Et,Ct,Ht,":",":"),kt(Et,Ct,Ht,"≈","\\approx",!0),kt(Et,Ct,Ht,"≅","\\cong",!0),kt(Et,Ct,Ht,"≥","\\ge"),kt(Et,Ct,Ht,"≥","\\geq",!0),kt(Et,Ct,Ht,"←","\\gets"),kt(Et,Ct,Ht,">","\\gt",!0),kt(Et,Ct,Ht,"∈","\\in",!0),kt(Et,Ct,Ht,"","\\@not"),kt(Et,Ct,Ht,"⊂","\\subset",!0),kt(Et,Ct,Ht,"⊃","\\supset",!0),kt(Et,Ct,Ht,"⊆","\\subseteq",!0),kt(Et,Ct,Ht,"⊇","\\supseteq",!0),kt(Et,St,Ht,"⊈","\\nsubseteq",!0),kt(Et,St,Ht,"⊉","\\nsupseteq",!0),kt(Et,Ct,Ht,"⊨","\\models"),kt(Et,Ct,Ht,"←","\\leftarrow",!0),kt(Et,Ct,Ht,"≤","\\le"),kt(Et,Ct,Ht,"≤","\\leq",!0),kt(Et,Ct,Ht,"<","\\lt",!0),kt(Et,Ct,Ht,"→","\\rightarrow",!0),kt(Et,Ct,Ht,"→","\\to"),kt(Et,St,Ht,"≱","\\ngeq",!0),kt(Et,St,Ht,"≰","\\nleq",!0),kt(Et,Ct,It," ","\\ "),kt(Et,Ct,It," ","\\space"),kt(Et,Ct,It," ","\\nobreakspace"),kt(Mt,Ct,It," ","\\ "),kt(Mt,Ct,It," "," "),kt(Mt,Ct,It," ","\\space"),kt(Mt,Ct,It," ","\\nobreakspace"),kt(Et,Ct,It,null,"\\nobreak"),kt(Et,Ct,It,null,"\\allowbreak"),kt(Et,Ct,Ot,",",","),kt(Et,Ct,Ot,";",";"),kt(Et,St,zt,"⊼","\\barwedge",!0),kt(Et,St,zt,"⊻","\\veebar",!0),kt(Et,Ct,zt,"⊙","\\odot",!0),kt(Et,Ct,zt,"⊕","\\oplus",!0),kt(Et,Ct,zt,"⊗","\\otimes",!0),kt(Et,Ct,Rt,"∂","\\partial",!0),kt(Et,Ct,zt,"⊘","\\oslash",!0),kt(Et,St,zt,"⊚","\\circledcirc",!0),kt(Et,St,zt,"⊡","\\boxdot",!0),kt(Et,Ct,zt,"△","\\bigtriangleup"),kt(Et,Ct,zt,"▽","\\bigtriangledown"),kt(Et,Ct,zt,"†","\\dagger"),kt(Et,Ct,zt,"⋄","\\diamond"),kt(Et,Ct,zt,"⋆","\\star"),kt(Et,Ct,zt,"◃","\\triangleleft"),kt(Et,Ct,zt,"▹","\\triangleright"),kt(Et,Ct,Bt,"{","\\{"),kt(Mt,Ct,Rt,"{","\\{"),kt(Mt,Ct,Rt,"{","\\textbraceleft"),kt(Et,Ct,Tt,"}","\\}"),kt(Mt,Ct,Rt,"}","\\}"),kt(Mt,Ct,Rt,"}","\\textbraceright"),kt(Et,Ct,Bt,"{","\\lbrace"),kt(Et,Ct,Tt,"}","\\rbrace"),kt(Et,Ct,Bt,"[","\\lbrack",!0),kt(Mt,Ct,Rt,"[","\\lbrack",!0),kt(Et,Ct,Tt,"]","\\rbrack",!0),kt(Mt,Ct,Rt,"]","\\rbrack",!0),kt(Et,Ct,Bt,"(","\\lparen",!0),kt(Et,Ct,Tt,")","\\rparen",!0),kt(Mt,Ct,Rt,"<","\\textless",!0),kt(Mt,Ct,Rt,">","\\textgreater",!0),kt(Et,Ct,Bt,"⌊","\\lfloor",!0),kt(Et,Ct,Tt,"⌋","\\rfloor",!0),kt(Et,Ct,Bt,"⌈","\\lceil",!0),kt(Et,Ct,Tt,"⌉","\\rceil",!0),kt(Et,Ct,Rt,"\\","\\backslash"),kt(Et,Ct,Rt,"∣","|"),kt(Et,Ct,Rt,"∣","\\vert"),kt(Mt,Ct,Rt,"|","\\textbar",!0),kt(Et,Ct,Rt,"∥","\\|"),kt(Et,Ct,Rt,"∥","\\Vert"),kt(Mt,Ct,Rt,"∥","\\textbardbl"),kt(Mt,Ct,Rt,"~","\\textasciitilde"),kt(Mt,Ct,Rt,"\\","\\textbackslash"),kt(Mt,Ct,Rt,"^","\\textasciicircum"),kt(Et,Ct,Ht,"↑","\\uparrow",!0),kt(Et,Ct,Ht,"⇑","\\Uparrow",!0),kt(Et,Ct,Ht,"↓","\\downarrow",!0),kt(Et,Ct,Ht,"⇓","\\Downarrow",!0),kt(Et,Ct,Ht,"↕","\\updownarrow",!0),kt(Et,Ct,Ht,"⇕","\\Updownarrow",!0),kt(Et,Ct,Lt,"∐","\\coprod"),kt(Et,Ct,Lt,"⋁","\\bigvee"),kt(Et,Ct,Lt,"⋀","\\bigwedge"),kt(Et,Ct,Lt,"⨄","\\biguplus"),kt(Et,Ct,Lt,"⋂","\\bigcap"),kt(Et,Ct,Lt,"⋃","\\bigcup"),kt(Et,Ct,Lt,"∫","\\int"),kt(Et,Ct,Lt,"∫","\\intop"),kt(Et,Ct,Lt,"∬","\\iint"),kt(Et,Ct,Lt,"∭","\\iiint"),kt(Et,Ct,Lt,"∏","\\prod"),kt(Et,Ct,Lt,"∑","\\sum"),kt(Et,Ct,Lt,"⨂","\\bigotimes"),kt(Et,Ct,Lt,"⨁","\\bigoplus"),kt(Et,Ct,Lt,"⨀","\\bigodot"),kt(Et,Ct,Lt,"∮","\\oint"),kt(Et,Ct,Lt,"∯","\\oiint"),kt(Et,Ct,Lt,"∰","\\oiiint"),kt(Et,Ct,Lt,"⨆","\\bigsqcup"),kt(Et,Ct,Lt,"∫","\\smallint"),kt(Mt,Ct,At,"…","\\textellipsis"),kt(Et,Ct,At,"…","\\mathellipsis"),kt(Mt,Ct,At,"…","\\ldots",!0),kt(Et,Ct,At,"…","\\ldots",!0),kt(Et,Ct,At,"⋯","\\@cdots",!0),kt(Et,Ct,At,"⋱","\\ddots",!0),kt(Et,Ct,Rt,"⋮","\\varvdots"),kt(Mt,Ct,Rt,"⋮","\\varvdots"),kt(Et,Ct,Nt,"ˊ","\\acute"),kt(Et,Ct,Nt,"ˋ","\\grave"),kt(Et,Ct,Nt,"¨","\\ddot"),kt(Et,Ct,Nt,"~","\\tilde"),kt(Et,Ct,Nt,"ˉ","\\bar"),kt(Et,Ct,Nt,"˘","\\breve"),kt(Et,Ct,Nt,"ˇ","\\check"),kt(Et,Ct,Nt,"^","\\hat"),kt(Et,Ct,Nt,"⃗","\\vec"),kt(Et,Ct,Nt,"˙","\\dot"),kt(Et,Ct,Nt,"˚","\\mathring"),kt(Et,Ct,qt,"","\\@imath"),kt(Et,Ct,qt,"","\\@jmath"),kt(Et,Ct,Rt,"ı","ı"),kt(Et,Ct,Rt,"ȷ","ȷ"),kt(Mt,Ct,Rt,"ı","\\i",!0),kt(Mt,Ct,Rt,"ȷ","\\j",!0),kt(Mt,Ct,Rt,"ß","\\ss",!0),kt(Mt,Ct,Rt,"æ","\\ae",!0),kt(Mt,Ct,Rt,"œ","\\oe",!0),kt(Mt,Ct,Rt,"ø","\\o",!0),kt(Mt,Ct,Rt,"Æ","\\AE",!0),kt(Mt,Ct,Rt,"Œ","\\OE",!0),kt(Mt,Ct,Rt,"Ø","\\O",!0),kt(Mt,Ct,Nt,"ˊ","\\'"),kt(Mt,Ct,Nt,"ˋ","\\`"),kt(Mt,Ct,Nt,"ˆ","\\^"),kt(Mt,Ct,Nt,"˜","\\~"),kt(Mt,Ct,Nt,"ˉ","\\="),kt(Mt,Ct,Nt,"˘","\\u"),kt(Mt,Ct,Nt,"˙","\\."),kt(Mt,Ct,Nt,"¸","\\c"),kt(Mt,Ct,Nt,"˚","\\r"),kt(Mt,Ct,Nt,"ˇ","\\v"),kt(Mt,Ct,Nt,"¨",'\\"'),kt(Mt,Ct,Nt,"˝","\\H"),kt(Mt,Ct,Nt,"◯","\\textcircled");var Dt={"--":!0,"---":!0,"``":!0,"''":!0};kt(Mt,Ct,Rt,"–","--",!0),kt(Mt,Ct,Rt,"–","\\textendash"),kt(Mt,Ct,Rt,"—","---",!0),kt(Mt,Ct,Rt,"—","\\textemdash"),kt(Mt,Ct,Rt,"‘","`",!0),kt(Mt,Ct,Rt,"‘","\\textquoteleft"),kt(Mt,Ct,Rt,"’","'",!0),kt(Mt,Ct,Rt,"’","\\textquoteright"),kt(Mt,Ct,Rt,"“","``",!0),kt(Mt,Ct,Rt,"“","\\textquotedblleft"),kt(Mt,Ct,Rt,"”","''",!0),kt(Mt,Ct,Rt,"”","\\textquotedblright"),kt(Et,Ct,Rt,"°","\\degree",!0),kt(Mt,Ct,Rt,"°","\\degree"),kt(Mt,Ct,Rt,"°","\\textdegree",!0),kt(Et,Ct,Rt,"£","\\pounds"),kt(Et,Ct,Rt,"£","\\mathsterling",!0),kt(Mt,Ct,Rt,"£","\\pounds"),kt(Mt,Ct,Rt,"£","\\textsterling",!0),kt(Et,St,Rt,"✠","\\maltese"),kt(Mt,St,Rt,"✠","\\maltese");for(var Ft='0123456789/@."',jt=0;jt<14;jt++){var Vt=Ft.charAt(jt);kt(Et,Ct,Rt,Vt,Vt)}for(var _t='0123456789!@*()-=+";:?/.,',Pt=0;Pt<25;Pt++){var Ut=_t.charAt(Pt);kt(Mt,Ct,Rt,Ut,Ut)}for(var Yt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",Gt=0;Gt<52;Gt++){var Zt=Yt.charAt(Gt);kt(Et,Ct,qt,Zt,Zt),kt(Mt,Ct,Rt,Zt,Zt)}kt(Et,St,Rt,"C","ℂ"),kt(Mt,St,Rt,"C","ℂ"),kt(Et,St,Rt,"H","ℍ"),kt(Mt,St,Rt,"H","ℍ"),kt(Et,St,Rt,"N","ℕ"),kt(Mt,St,Rt,"N","ℕ"),kt(Et,St,Rt,"P","ℙ"),kt(Mt,St,Rt,"P","ℙ"),kt(Et,St,Rt,"Q","ℚ"),kt(Mt,St,Rt,"Q","ℚ"),kt(Et,St,Rt,"R","ℝ"),kt(Mt,St,Rt,"R","ℝ"),kt(Et,St,Rt,"Z","ℤ"),kt(Mt,St,Rt,"Z","ℤ"),kt(Et,Ct,qt,"h","ℎ"),kt(Mt,Ct,qt,"h","ℎ");for(var Xt="",Wt=0;Wt<52;Wt++){var $t=Yt.charAt(Wt);kt(Et,Ct,qt,$t,Xt=String.fromCharCode(55349,56320+Wt)),kt(Mt,Ct,Rt,$t,Xt),kt(Et,Ct,qt,$t,Xt=String.fromCharCode(55349,56372+Wt)),kt(Mt,Ct,Rt,$t,Xt),kt(Et,Ct,qt,$t,Xt=String.fromCharCode(55349,56424+Wt)),kt(Mt,Ct,Rt,$t,Xt),kt(Et,Ct,qt,$t,Xt=String.fromCharCode(55349,56580+Wt)),kt(Mt,Ct,Rt,$t,Xt),kt(Et,Ct,qt,$t,Xt=String.fromCharCode(55349,56684+Wt)),kt(Mt,Ct,Rt,$t,Xt),kt(Et,Ct,qt,$t,Xt=String.fromCharCode(55349,56736+Wt)),kt(Mt,Ct,Rt,$t,Xt),kt(Et,Ct,qt,$t,Xt=String.fromCharCode(55349,56788+Wt)),kt(Mt,Ct,Rt,$t,Xt),kt(Et,Ct,qt,$t,Xt=String.fromCharCode(55349,56840+Wt)),kt(Mt,Ct,Rt,$t,Xt),kt(Et,Ct,qt,$t,Xt=String.fromCharCode(55349,56944+Wt)),kt(Mt,Ct,Rt,$t,Xt),Wt<26&&(kt(Et,Ct,qt,$t,Xt=String.fromCharCode(55349,56632+Wt)),kt(Mt,Ct,Rt,$t,Xt),kt(Et,Ct,qt,$t,Xt=String.fromCharCode(55349,56476+Wt)),kt(Mt,Ct,Rt,$t,Xt))}kt(Et,Ct,qt,"k",Xt=String.fromCharCode(55349,56668)),kt(Mt,Ct,Rt,"k",Xt);for(var Jt=0;Jt<10;Jt++){var Kt=Jt.toString();kt(Et,Ct,qt,Kt,Xt=String.fromCharCode(55349,57294+Jt)),kt(Mt,Ct,Rt,Kt,Xt),kt(Et,Ct,qt,Kt,Xt=String.fromCharCode(55349,57314+Jt)),kt(Mt,Ct,Rt,Kt,Xt),kt(Et,Ct,qt,Kt,Xt=String.fromCharCode(55349,57324+Jt)),kt(Mt,Ct,Rt,Kt,Xt),kt(Et,Ct,qt,Kt,Xt=String.fromCharCode(55349,57334+Jt)),kt(Mt,Ct,Rt,Kt,Xt)}for(var Qt="ÐÞþ",er=0;er<3;er++){var tr=Qt.charAt(er);kt(Et,Ct,qt,tr,tr),kt(Mt,Ct,Rt,tr,tr)}var rr=[["mathbf","textbf","Main-Bold"],["mathbf","textbf","Main-Bold"],["mathnormal","textit","Math-Italic"],["mathnormal","textit","Math-Italic"],["boldsymbol","boldsymbol","Main-BoldItalic"],["boldsymbol","boldsymbol","Main-BoldItalic"],["mathscr","textscr","Script-Regular"],["","",""],["","",""],["","",""],["mathfrak","textfrak","Fraktur-Regular"],["mathfrak","textfrak","Fraktur-Regular"],["mathbb","textbb","AMS-Regular"],["mathbb","textbb","AMS-Regular"],["mathboldfrak","textboldfrak","Fraktur-Regular"],["mathboldfrak","textboldfrak","Fraktur-Regular"],["mathsf","textsf","SansSerif-Regular"],["mathsf","textsf","SansSerif-Regular"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathitsf","textitsf","SansSerif-Italic"],["mathitsf","textitsf","SansSerif-Italic"],["","",""],["","",""],["mathtt","texttt","Typewriter-Regular"],["mathtt","texttt","Typewriter-Regular"]],ar=[["mathbf","textbf","Main-Bold"],["","",""],["mathsf","textsf","SansSerif-Regular"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathtt","texttt","Typewriter-Regular"]],nr=function(e,t,r){return wt[r][e]&&wt[r][e].replace&&(e=wt[r][e].replace),{value:e,metrics:Xe(e,t,r)}},ir=function(e,t,r,a,n){var i,o=nr(e,t,r),l=o.metrics;if(e=o.value,l){var s=l.italic;("text"===r||a&&"mathit"===a.font)&&(s=0),i=new dt(e,l.height,l.depth,s,l.skew,l.width,n)}else"undefined"!=typeof console&&console.warn("No character metrics for '"+e+"' in style '"+t+"' and mode '"+r+"'"),i=new dt(e,0,0,0,0,0,n);if(a){i.maxFontSize=a.sizeMultiplier,a.style.isTight()&&i.classes.push("mtight");var c=a.getColor();c&&(i.style.color=c)}return i},or=(e,t)=>{if(it(e.classes)!==it(t.classes)||e.skew!==t.skew||e.maxFontSize!==t.maxFontSize)return!1;if(1===e.classes.length){var r=e.classes[0];if("mbin"===r||"mord"===r)return!1}for(var a in e.style)if(e.style.hasOwnProperty(a)&&e.style[a]!==t.style[a])return!1;for(var n in t.style)if(t.style.hasOwnProperty(n)&&e.style[n]!==t.style[n])return!1;return!0},lr=function(e){for(var t=0,r=0,a=0,n=0;n<e.children.length;n++){var i=e.children[n];i.height>t&&(t=i.height),i.depth>r&&(r=i.depth),i.maxFontSize>a&&(a=i.maxFontSize)}e.height=t,e.depth=r,e.maxFontSize=a},sr=function(e,t,r,a){var n=new mt(e,t,r,a);return lr(n),n},cr=(e,t,r,a)=>new mt(e,t,r,a),mr=function(e){var t=new Ue(e);return lr(t),t},hr=function(e,t,r){var a="";switch(e){case"amsrm":a="AMS";break;case"textrm":a="Main";break;case"textsf":a="SansSerif";break;case"texttt":a="Typewriter";break;default:a=e}return a+"-"+("textbf"===t&&"textit"===r?"BoldItalic":"textbf"===t?"Bold":"textit"===t?"Italic":"Regular")},ur={mathbf:{variant:"bold",fontName:"Main-Bold"},mathrm:{variant:"normal",fontName:"Main-Regular"},textit:{variant:"italic",fontName:"Main-Italic"},mathit:{variant:"italic",fontName:"Main-Italic"},mathnormal:{variant:"italic",fontName:"Math-Italic"},mathsfit:{variant:"sans-serif-italic",fontName:"SansSerif-Italic"},mathbb:{variant:"double-struck",fontName:"AMS-Regular"},mathcal:{variant:"script",fontName:"Caligraphic-Regular"},mathfrak:{variant:"fraktur",fontName:"Fraktur-Regular"},mathscr:{variant:"script",fontName:"Script-Regular"},mathsf:{variant:"sans-serif",fontName:"SansSerif-Regular"},mathtt:{variant:"monospace",fontName:"Typewriter-Regular"}},pr={vec:["vec",.471,.714],oiintSize1:["oiintSize1",.957,.499],oiintSize2:["oiintSize2",1.472,.659],oiiintSize1:["oiiintSize1",1.304,.499],oiiintSize2:["oiiintSize2",1.98,.659]},dr={fontMap:ur,makeSymbol:ir,mathsym:function(e,t,r,a){return void 0===a&&(a=[]),"boldsymbol"===r.font&&nr(e,"Main-Bold",t).metrics?ir(e,"Main-Bold",t,r,a.concat(["mathbf"])):"\\"===e||"main"===wt[t][e].font?ir(e,"Main-Regular",t,r,a):ir(e,"AMS-Regular",t,r,a.concat(["amsrm"]))},makeSpan:sr,makeSvgSpan:cr,makeLineSpan:function(e,t,r){var a=sr([e],[],t);return a.height=Math.max(r||t.fontMetrics().defaultRuleThickness,t.minRuleThickness),a.style.borderBottomWidth=nt(a.height),a.maxFontSize=1,a},makeAnchor:function(e,t,r,a){var n=new ht(e,t,r,a);return lr(n),n},makeFragment:mr,wrapFragment:function(e,t){return e instanceof Ue?sr([],[e],t):e},makeVList:function(e,t){for(var{children:r,depth:a}=function(e){if("individualShift"===e.positionType){for(var t=e.children,r=[t[0]],a=-t[0].shift-t[0].elem.depth,n=a,i=1;i<t.length;i++){var o=-t[i].shift-n-t[i].elem.depth,l=o-(t[i-1].elem.height+t[i-1].elem.depth);n+=o,r.push({type:"kern",size:l}),r.push(t[i])}return{children:r,depth:a}}var s;if("top"===e.positionType){for(var c=e.positionData,m=0;m<e.children.length;m++){var h=e.children[m];c-="kern"===h.type?h.size:h.elem.height+h.elem.depth}s=c}else if("bottom"===e.positionType)s=-e.positionData;else{var u=e.children[0];if("elem"!==u.type)throw new Error('First child must have type "elem".');if("shift"===e.positionType)s=-u.elem.depth-e.positionData;else{if("firstBaseline"!==e.positionType)throw new Error("Invalid positionType "+e.positionType+".");s=-u.elem.depth}}return{children:e.children,depth:s}}(e),n=0,i=0;i<r.length;i++){var o=r[i];if("elem"===o.type){var l=o.elem;n=Math.max(n,l.maxFontSize,l.height)}}n+=2;var s=sr(["pstrut"],[]);s.style.height=nt(n);for(var c=[],m=a,h=a,u=a,p=0;p<r.length;p++){var d=r[p];if("kern"===d.type)u+=d.size;else{var f=d.elem,g=d.wrapperClasses||[],v=d.wrapperStyle||{},b=sr(g,[s,f],void 0,v);b.style.top=nt(-n-u-f.depth),d.marginLeft&&(b.style.marginLeft=d.marginLeft),d.marginRight&&(b.style.marginRight=d.marginRight),c.push(b),u+=f.height+f.depth}m=Math.min(m,u),h=Math.max(h,u)}var y,x=sr(["vlist"],c);if(x.style.height=nt(h),m<0){var w=sr([],[]),k=sr(["vlist"],[w]);k.style.height=nt(-m);var E=sr(["vlist-s"],[new dt("")]);y=[sr(["vlist-r"],[x,E]),sr(["vlist-r"],[k])]}else y=[sr(["vlist-r"],[x])];var M=sr(["vlist-t"],y);return 2===y.length&&M.classes.push("vlist-t2"),M.height=h,M.depth=-m,M},makeOrd:function(e,t,r){var a=e.mode,n=e.text,i=["mord"],o="math"===a||"text"===a&&t.font,l=o?t.font:t.fontFamily,s="",c="";if(55349===n.charCodeAt(0)&&([s,c]=function(e,t){var r=1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320)+65536,a="math"===t?0:1;if(119808<=r&&r<120484){var n=Math.floor((r-119808)/26);return[rr[n][2],rr[n][a]]}if(120782<=r&&r<=120831){var i=Math.floor((r-120782)/10);return[ar[i][2],ar[i][a]]}if(120485===r||120486===r)return[rr[0][2],rr[0][a]];if(120486<r&&r<120782)return["",""];throw new we("Unsupported character: "+e)}(n,a)),s.length>0)return ir(n,s,a,t,i.concat(c));if(l){var m,h;if("boldsymbol"===l){var u=function(e,t,r,a,n){return"textord"!==n&&nr(e,"Math-BoldItalic",t).metrics?{fontName:"Math-BoldItalic",fontClass:"boldsymbol"}:{fontName:"Main-Bold",fontClass:"mathbf"}}(n,a,0,0,r);m=u.fontName,h=[u.fontClass]}else o?(m=ur[l].fontName,h=[l]):(m=hr(l,t.fontWeight,t.fontShape),h=[l,t.fontWeight,t.fontShape]);if(nr(n,m,a).metrics)return ir(n,m,a,t,i.concat(h));if(Dt.hasOwnProperty(n)&&"Typewriter"===m.slice(0,10)){for(var p=[],d=0;d<n.length;d++)p.push(ir(n[d],m,a,t,i.concat(h)));return mr(p)}}if("mathord"===r)return ir(n,"Math-Italic",a,t,i.concat(["mathnormal"]));if("textord"===r){var f=wt[a][n]&&wt[a][n].font;if("ams"===f){var g=hr("amsrm",t.fontWeight,t.fontShape);return ir(n,g,a,t,i.concat("amsrm",t.fontWeight,t.fontShape))}if("main"!==f&&f){var v=hr(f,t.fontWeight,t.fontShape);return ir(n,v,a,t,i.concat(v,t.fontWeight,t.fontShape))}var b=hr("textrm",t.fontWeight,t.fontShape);return ir(n,b,a,t,i.concat(t.fontWeight,t.fontShape))}throw new Error("unexpected type: "+r+" in makeOrd")},makeGlue:(e,t)=>{var r=sr(["mspace"],[],t),a=at(e,t);return r.style.marginRight=nt(a),r},staticSvg:function(e,t){var[r,a,n]=pr[e],i=new gt(r),o=new ft([i],{width:nt(a),height:nt(n),style:"width:"+nt(a),viewBox:"0 0 "+1e3*a+" "+1e3*n,preserveAspectRatio:"xMinYMin"}),l=cr(["overlay"],[o],t);return l.height=n,l.style.height=nt(n),l.style.width=nt(a),l},svgData:pr,tryCombineChars:e=>{for(var t=0;t<e.length-1;t++){var r=e[t],a=e[t+1];r instanceof dt&&a instanceof dt&&or(r,a)&&(r.text+=a.text,r.height=Math.max(r.height,a.height),r.depth=Math.max(r.depth,a.depth),r.italic=a.italic,e.splice(t+1,1),t--)}return e}},fr={number:3,unit:"mu"},gr={number:4,unit:"mu"},vr={number:5,unit:"mu"},br={mord:{mop:fr,mbin:gr,mrel:vr,minner:fr},mop:{mord:fr,mop:fr,mrel:vr,minner:fr},mbin:{mord:gr,mop:gr,mopen:gr,minner:gr},mrel:{mord:vr,mop:vr,mopen:vr,minner:vr},mopen:{},mclose:{mop:fr,mbin:gr,mrel:vr,minner:fr},mpunct:{mord:fr,mop:fr,mrel:vr,mopen:fr,mclose:fr,mpunct:fr,minner:fr},minner:{mord:fr,mop:fr,mbin:gr,mrel:vr,mopen:fr,mpunct:fr,minner:fr}},yr={mord:{mop:fr},mop:{mord:fr,mop:fr},mbin:{},mrel:{},mopen:{},mclose:{mop:fr},mpunct:{},minner:{mop:fr}},xr={},wr={},kr={};function Er(e){for(var{type:t,names:r,props:a,handler:n,htmlBuilder:i,mathmlBuilder:o}=e,l={type:t,numArgs:a.numArgs,argTypes:a.argTypes,allowedInArgument:!!a.allowedInArgument,allowedInText:!!a.allowedInText,allowedInMath:void 0===a.allowedInMath||a.allowedInMath,numOptionalArgs:a.numOptionalArgs||0,infix:!!a.infix,primitive:!!a.primitive,handler:n},s=0;s<r.length;++s)xr[r[s]]=l;t&&(i&&(wr[t]=i),o&&(kr[t]=o))}function Mr(e){var{type:t,htmlBuilder:r,mathmlBuilder:a}=e;Er({type:t,names:[],props:{numArgs:0},handler(){throw new Error("Should never be called.")},htmlBuilder:r,mathmlBuilder:a})}var Cr=function(e){return"ordgroup"===e.type&&1===e.body.length?e.body[0]:e},Sr=function(e){return"ordgroup"===e.type?e.body:[e]},Nr=dr.makeSpan,zr=["leftmost","mbin","mopen","mrel","mop","mpunct"],Tr=["rightmost","mrel","mclose","mpunct"],Ar={display:De.DISPLAY,text:De.TEXT,script:De.SCRIPT,scriptscript:De.SCRIPTSCRIPT},qr={mord:"mord",mop:"mop",mbin:"mbin",mrel:"mrel",mopen:"mopen",mclose:"mclose",mpunct:"mpunct",minner:"minner"},Lr=function(e,t,r,a){void 0===a&&(a=[null,null]);for(var n=[],i=0;i<e.length;i++){var o=Dr(e[i],t);if(o instanceof Ue){var l=o.children;n.push(...l)}else n.push(o)}if(dr.tryCombineChars(n),!r)return n;var s=t;if(1===e.length){var c=e[0];"sizing"===c.type?s=t.havingSize(c.size):"styling"===c.type&&(s=t.havingStyle(Ar[c.style]))}var m=Nr([a[0]||"leftmost"],[],t),h=Nr([a[1]||"rightmost"],[],t),u="root"===r;return Br(n,((e,t)=>{var r=t.classes[0],a=e.classes[0];"mbin"===r&&Se.contains(Tr,a)?t.classes[0]="mord":"mbin"===a&&Se.contains(zr,r)&&(e.classes[0]="mord")}),{node:m},h,u),Br(n,((e,t)=>{var r=Ir(t),a=Ir(e),n=r&&a?e.hasClass("mtight")?yr[r][a]:br[r][a]:null;if(n)return dr.makeGlue(n,s)}),{node:m},h,u),n},Br=function e(t,r,a,n,i){n&&t.push(n);for(var o=0;o<t.length;o++){var l=t[o],s=Or(l);if(s)e(s.children,r,a,null,i);else{var c=!l.hasClass("mspace");if(c){var m=r(l,a.node);m&&(a.insertAfter?a.insertAfter(m):(t.unshift(m),o++))}c?a.node=l:i&&l.hasClass("newline")&&(a.node=Nr(["leftmost"])),a.insertAfter=(e=>r=>{t.splice(e+1,0,r),o++})(o)}}n&&t.pop()},Or=function(e){return e instanceof Ue||e instanceof ht||e instanceof mt&&e.hasClass("enclosing")?e:null},Hr=function e(t,r){var a=Or(t);if(a){var n=a.children;if(n.length){if("right"===r)return e(n[n.length-1],"right");if("left"===r)return e(n[0],"left")}}return t},Ir=function(e,t){return e?(t&&(e=Hr(e,t)),qr[e.classes[0]]||null):null},Rr=function(e,t){var r=["nulldelimiter"].concat(e.baseSizingClasses());return Nr(t.concat(r))},Dr=function(e,t,r){if(!e)return Nr();if(wr[e.type]){var a=wr[e.type](e,t);if(r&&t.size!==r.size){a=Nr(t.sizingClasses(r),[a],t);var n=t.sizeMultiplier/r.sizeMultiplier;a.height*=n,a.depth*=n}return a}throw new we("Got group of unknown type: '"+e.type+"'")};function Fr(e,t){var r=Nr(["base"],e,t),a=Nr(["strut"]);return a.style.height=nt(r.height+r.depth),r.depth&&(a.style.verticalAlign=nt(-r.depth)),r.children.unshift(a),r}function jr(e,t){var r=null;1===e.length&&"tag"===e[0].type&&(r=e[0].tag,e=e[0].body);var a,n=Lr(e,t,"root");2===n.length&&n[1].hasClass("tag")&&(a=n.pop());for(var i,o=[],l=[],s=0;s<n.length;s++)if(l.push(n[s]),n[s].hasClass("mbin")||n[s].hasClass("mrel")||n[s].hasClass("allowbreak")){for(var c=!1;s<n.length-1&&n[s+1].hasClass("mspace")&&!n[s+1].hasClass("newline");)s++,l.push(n[s]),n[s].hasClass("nobreak")&&(c=!0);c||(o.push(Fr(l,t)),l=[])}else n[s].hasClass("newline")&&(l.pop(),l.length>0&&(o.push(Fr(l,t)),l=[]),o.push(n[s]));l.length>0&&o.push(Fr(l,t)),r?((i=Fr(Lr(r,t,!0))).classes=["tag"],o.push(i)):a&&o.push(a);var m=Nr(["katex-html"],o);if(m.setAttribute("aria-hidden","true"),i){var h=i.children[0];h.style.height=nt(m.height+m.depth),m.depth&&(h.style.verticalAlign=nt(-m.depth))}return m}function Vr(e){return new Ue(e)}class _r{constructor(e,t,r){this.type=void 0,this.attributes=void 0,this.children=void 0,this.classes=void 0,this.type=e,this.attributes={},this.children=t||[],this.classes=r||[]}setAttribute(e,t){this.attributes[e]=t}getAttribute(e){return this.attributes[e]}toNode(){var e=document.createElementNS("http://www.w3.org/1998/Math/MathML",this.type);for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&e.setAttribute(t,this.attributes[t]);this.classes.length>0&&(e.className=it(this.classes));for(var r=0;r<this.children.length;r++)if(this.children[r]instanceof Pr&&this.children[r+1]instanceof Pr){for(var a=this.children[r].toText()+this.children[++r].toText();this.children[r+1]instanceof Pr;)a+=this.children[++r].toText();e.appendChild(new Pr(a).toNode())}else e.appendChild(this.children[r].toNode());return e}toMarkup(){var e="<"+this.type;for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&(e+=" "+t+'="',e+=Se.escape(this.attributes[t]),e+='"');this.classes.length>0&&(e+=' class ="'+Se.escape(it(this.classes))+'"'),e+=">";for(var r=0;r<this.children.length;r++)e+=this.children[r].toMarkup();return e+="</"+this.type+">"}toText(){return this.children.map((e=>e.toText())).join("")}}class Pr{constructor(e){this.text=void 0,this.text=e}toNode(){return document.createTextNode(this.text)}toMarkup(){return Se.escape(this.toText())}toText(){return this.text}}var Ur={MathNode:_r,TextNode:Pr,SpaceNode:class{constructor(e){this.width=void 0,this.character=void 0,this.width=e,this.character=e>=.05555&&e<=.05556?" ":e>=.1666&&e<=.1667?" ":e>=.2222&&e<=.2223?" ":e>=.2777&&e<=.2778?" ":e>=-.05556&&e<=-.05555?" ":e>=-.1667&&e<=-.1666?" ":e>=-.2223&&e<=-.2222?" ":e>=-.2778&&e<=-.2777?" ":null}toNode(){if(this.character)return document.createTextNode(this.character);var e=document.createElementNS("http://www.w3.org/1998/Math/MathML","mspace");return e.setAttribute("width",nt(this.width)),e}toMarkup(){return this.character?"<mtext>"+this.character+"</mtext>":'<mspace width="'+nt(this.width)+'"/>'}toText(){return this.character?this.character:" "}},newDocumentFragment:Vr},Yr=function(e,t,r){return!wt[t][e]||!wt[t][e].replace||55349===e.charCodeAt(0)||Dt.hasOwnProperty(e)&&r&&(r.fontFamily&&"tt"===r.fontFamily.slice(4,6)||r.font&&"tt"===r.font.slice(4,6))||(e=wt[t][e].replace),new Ur.TextNode(e)},Gr=function(e){return 1===e.length?e[0]:new Ur.MathNode("mrow",e)},Zr=function(e,t){if("texttt"===t.fontFamily)return"monospace";if("textsf"===t.fontFamily)return"textit"===t.fontShape&&"textbf"===t.fontWeight?"sans-serif-bold-italic":"textit"===t.fontShape?"sans-serif-italic":"textbf"===t.fontWeight?"bold-sans-serif":"sans-serif";if("textit"===t.fontShape&&"textbf"===t.fontWeight)return"bold-italic";if("textit"===t.fontShape)return"italic";if("textbf"===t.fontWeight)return"bold";var r=t.font;if(!r||"mathnormal"===r)return null;var a=e.mode;if("mathit"===r)return"italic";if("boldsymbol"===r)return"textord"===e.type?"bold":"bold-italic";if("mathbf"===r)return"bold";if("mathbb"===r)return"double-struck";if("mathsfit"===r)return"sans-serif-italic";if("mathfrak"===r)return"fraktur";if("mathscr"===r||"mathcal"===r)return"script";if("mathsf"===r)return"sans-serif";if("mathtt"===r)return"monospace";var n=e.text;return Se.contains(["\\imath","\\jmath"],n)?null:(wt[a][n]&&wt[a][n].replace&&(n=wt[a][n].replace),Xe(n,dr.fontMap[r].fontName,a)?dr.fontMap[r].variant:null)};function Xr(e){if(!e)return!1;if("mi"===e.type&&1===e.children.length){var t=e.children[0];return t instanceof Pr&&"."===t.text}if("mo"===e.type&&1===e.children.length&&"true"===e.getAttribute("separator")&&"0em"===e.getAttribute("lspace")&&"0em"===e.getAttribute("rspace")){var r=e.children[0];return r instanceof Pr&&","===r.text}return!1}var Wr=function(e,t,r){if(1===e.length){var a=Jr(e[0],t);return r&&a instanceof _r&&"mo"===a.type&&(a.setAttribute("lspace","0em"),a.setAttribute("rspace","0em")),[a]}for(var n,i=[],o=0;o<e.length;o++){var l=Jr(e[o],t);if(l instanceof _r&&n instanceof _r){if("mtext"===l.type&&"mtext"===n.type&&l.getAttribute("mathvariant")===n.getAttribute("mathvariant")){n.children.push(...l.children);continue}if("mn"===l.type&&"mn"===n.type){n.children.push(...l.children);continue}if(Xr(l)&&"mn"===n.type){n.children.push(...l.children);continue}if("mn"===l.type&&Xr(n))l.children=[...n.children,...l.children],i.pop();else if(("msup"===l.type||"msub"===l.type)&&l.children.length>=1&&("mn"===n.type||Xr(n))){var s=l.children[0];s instanceof _r&&"mn"===s.type&&(s.children=[...n.children,...s.children],i.pop())}else if("mi"===n.type&&1===n.children.length){var c=n.children[0];if(c instanceof Pr&&"̸"===c.text&&("mo"===l.type||"mi"===l.type||"mn"===l.type)){var m=l.children[0];m instanceof Pr&&m.text.length>0&&(m.text=m.text.slice(0,1)+"̸"+m.text.slice(1),i.pop())}}}i.push(l),n=l}return i},$r=function(e,t,r){return Gr(Wr(e,t,r))},Jr=function(e,t){if(!e)return new Ur.MathNode("mrow");if(kr[e.type])return kr[e.type](e,t);throw new we("Got group of unknown type: '"+e.type+"'")};function Kr(e,t,r,a,n){var i,o=Wr(e,r);i=1===o.length&&o[0]instanceof _r&&Se.contains(["mrow","mtable"],o[0].type)?o[0]:new Ur.MathNode("mrow",o);var l=new Ur.MathNode("annotation",[new Ur.TextNode(t)]);l.setAttribute("encoding","application/x-tex");var s=new Ur.MathNode("semantics",[i,l]),c=new Ur.MathNode("math",[s]);c.setAttribute("xmlns","http://www.w3.org/1998/Math/MathML"),a&&c.setAttribute("display","block");var m=n?"katex":"katex-mathml";return dr.makeSpan([m],[c])}var Qr=function(e){return new Qe({style:e.displayMode?De.DISPLAY:De.TEXT,maxSize:e.maxSize,minRuleThickness:e.minRuleThickness})},ea=function(e,t){if(t.displayMode){var r=["katex-display"];t.leqno&&r.push("leqno"),t.fleqn&&r.push("fleqn"),e=dr.makeSpan(r,[e])}return e},ta={widehat:"^",widecheck:"ˇ",widetilde:"~",utilde:"~",overleftarrow:"←",underleftarrow:"←",xleftarrow:"←",overrightarrow:"→",underrightarrow:"→",xrightarrow:"→",underbrace:"⏟",overbrace:"⏞",overgroup:"⏠",undergroup:"⏡",overleftrightarrow:"↔",underleftrightarrow:"↔",xleftrightarrow:"↔",Overrightarrow:"⇒",xRightarrow:"⇒",overleftharpoon:"↼",xleftharpoonup:"↼",overrightharpoon:"⇀",xrightharpoonup:"⇀",xLeftarrow:"⇐",xLeftrightarrow:"⇔",xhookleftarrow:"↩",xhookrightarrow:"↪",xmapsto:"↦",xrightharpoondown:"⇁",xleftharpoondown:"↽",xrightleftharpoons:"⇌",xleftrightharpoons:"⇋",xtwoheadleftarrow:"↞",xtwoheadrightarrow:"↠",xlongequal:"=",xtofrom:"⇄",xrightleftarrows:"⇄",xrightequilibrium:"⇌",xleftequilibrium:"⇋","\\cdrightarrow":"→","\\cdleftarrow":"←","\\cdlongequal":"="},ra={overrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],overleftarrow:[["leftarrow"],.888,522,"xMinYMin"],underrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],underleftarrow:[["leftarrow"],.888,522,"xMinYMin"],xrightarrow:[["rightarrow"],1.469,522,"xMaxYMin"],"\\cdrightarrow":[["rightarrow"],3,522,"xMaxYMin"],xleftarrow:[["leftarrow"],1.469,522,"xMinYMin"],"\\cdleftarrow":[["leftarrow"],3,522,"xMinYMin"],Overrightarrow:[["doublerightarrow"],.888,560,"xMaxYMin"],xRightarrow:[["doublerightarrow"],1.526,560,"xMaxYMin"],xLeftarrow:[["doubleleftarrow"],1.526,560,"xMinYMin"],overleftharpoon:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoonup:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoondown:[["leftharpoondown"],.888,522,"xMinYMin"],overrightharpoon:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoonup:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoondown:[["rightharpoondown"],.888,522,"xMaxYMin"],xlongequal:[["longequal"],.888,334,"xMinYMin"],"\\cdlongequal":[["longequal"],3,334,"xMinYMin"],xtwoheadleftarrow:[["twoheadleftarrow"],.888,334,"xMinYMin"],xtwoheadrightarrow:[["twoheadrightarrow"],.888,334,"xMaxYMin"],overleftrightarrow:[["leftarrow","rightarrow"],.888,522],overbrace:[["leftbrace","midbrace","rightbrace"],1.6,548],underbrace:[["leftbraceunder","midbraceunder","rightbraceunder"],1.6,548],underleftrightarrow:[["leftarrow","rightarrow"],.888,522],xleftrightarrow:[["leftarrow","rightarrow"],1.75,522],xLeftrightarrow:[["doubleleftarrow","doublerightarrow"],1.75,560],xrightleftharpoons:[["leftharpoondownplus","rightharpoonplus"],1.75,716],xleftrightharpoons:[["leftharpoonplus","rightharpoondownplus"],1.75,716],xhookleftarrow:[["leftarrow","righthook"],1.08,522],xhookrightarrow:[["lefthook","rightarrow"],1.08,522],overlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],underlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],overgroup:[["leftgroup","rightgroup"],.888,342],undergroup:[["leftgroupunder","rightgroupunder"],.888,342],xmapsto:[["leftmapsto","rightarrow"],1.5,522],xtofrom:[["leftToFrom","rightToFrom"],1.75,528],xrightleftarrows:[["baraboveleftarrow","rightarrowabovebar"],1.75,901],xrightequilibrium:[["baraboveshortleftharpoon","rightharpoonaboveshortbar"],1.75,716],xleftequilibrium:[["shortbaraboveleftharpoon","shortrightharpoonabovebar"],1.75,716]},aa=function(e,t,r,a,n){var i,o=e.height+e.depth+r+a;if(/fbox|color|angl/.test(t)){if(i=dr.makeSpan(["stretchy",t],[],n),"fbox"===t){var l=n.color&&n.getColor();l&&(i.style.borderColor=l)}}else{var s=[];/^[bx]cancel$/.test(t)&&s.push(new vt({x1:"0",y1:"0",x2:"100%",y2:"100%","stroke-width":"0.046em"})),/^x?cancel$/.test(t)&&s.push(new vt({x1:"0",y1:"100%",x2:"100%",y2:"0","stroke-width":"0.046em"}));var c=new ft(s,{width:"100%",height:nt(o)});i=dr.makeSvgSpan([],[c],n)}return i.height=o,i.style.height=nt(o),i},na=function(e){var t=new Ur.MathNode("mo",[new Ur.TextNode(ta[e.replace(/^\\/,"")])]);return t.setAttribute("stretchy","true"),t},ia=function(e,t){var{span:r,minWidth:a,height:n}=function(){var r=4e5,a=e.label.slice(1);if(Se.contains(["widehat","widecheck","widetilde","utilde"],a)){var n,i,o,l="ordgroup"===(p=e.base).type?p.body.length:1;if(l>5)"widehat"===a||"widecheck"===a?(n=420,r=2364,o=.42,i=a+"4"):(n=312,r=2340,o=.34,i="tilde4");else{var s=[1,1,2,2,3,3][l];"widehat"===a||"widecheck"===a?(r=[0,1062,2364,2364,2364][s],n=[0,239,300,360,420][s],o=[0,.24,.3,.3,.36,.42][s],i=a+s):(r=[0,600,1033,2339,2340][s],n=[0,260,286,306,312][s],o=[0,.26,.286,.3,.306,.34][s],i="tilde"+s)}var c=new gt(i),m=new ft([c],{width:"100%",height:nt(o),viewBox:"0 0 "+r+" "+n,preserveAspectRatio:"none"});return{span:dr.makeSvgSpan([],[m],t),minWidth:0,height:o}}var h,u,p,d=[],f=ra[a],[g,v,b]=f,y=b/1e3,x=g.length;if(1===x)h=["hide-tail"],u=[f[3]];else if(2===x)h=["halfarrow-left","halfarrow-right"],u=["xMinYMin","xMaxYMin"];else{if(3!==x)throw new Error("Correct katexImagesData or update code here to support\n "+x+" children.");h=["brace-left","brace-center","brace-right"],u=["xMinYMin","xMidYMin","xMaxYMin"]}for(var w=0;w<x;w++){var k=new gt(g[w]),E=new ft([k],{width:"400em",height:nt(y),viewBox:"0 0 "+r+" "+b,preserveAspectRatio:u[w]+" slice"}),M=dr.makeSvgSpan([h[w]],[E],t);if(1===x)return{span:M,minWidth:v,height:y};M.style.height=nt(y),d.push(M)}return{span:dr.makeSpan(["stretchy"],d,t),minWidth:v,height:y}}();return r.height=n,r.style.height=nt(n),a>0&&(r.style.minWidth=nt(a)),r};function oa(e,t){if(!e||e.type!==t)throw new Error("Expected node of type "+t+", but got "+(e?"node of type "+e.type:String(e)));return e}function la(e){var t=sa(e);if(!t)throw new Error("Expected node of symbol group type, but got "+(e?"node of type "+e.type:String(e)));return t}function sa(e){return e&&("atom"===e.type||xt.hasOwnProperty(e.type))?e:null}var ca=(e,t)=>{var r,a,n;e&&"supsub"===e.type?(r=(a=oa(e.base,"accent")).base,e.base=r,n=function(e){if(e instanceof mt)return e;throw new Error("Expected span<HtmlDomNode> but got "+String(e)+".")}(Dr(e,t)),e.base=a):r=(a=oa(e,"accent")).base;var i=Dr(r,t.havingCrampedStyle()),o=0;if(a.isShifty&&Se.isCharacterBox(r)){var l=Se.getBaseElem(r);o=bt(Dr(l,t.havingCrampedStyle())).skew}var s,c="\\c"===a.label,m=c?i.height+i.depth:Math.min(i.height,t.fontMetrics().xHeight);if(a.isStretchy)s=ia(a,t),s=dr.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:i},{type:"elem",elem:s,wrapperClasses:["svg-align"],wrapperStyle:o>0?{width:"calc(100% - "+nt(2*o)+")",marginLeft:nt(2*o)}:void 0}]},t);else{var h,u;"\\vec"===a.label?(h=dr.staticSvg("vec",t),u=dr.svgData.vec[1]):((h=bt(h=dr.makeOrd({mode:a.mode,text:a.label},t,"textord"))).italic=0,u=h.width,c&&(m+=h.depth)),s=dr.makeSpan(["accent-body"],[h]);var p="\\textcircled"===a.label;p&&(s.classes.push("accent-full"),m=i.height);var d=o;p||(d-=u/2),s.style.left=nt(d),"\\textcircled"===a.label&&(s.style.top=".2em"),s=dr.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:i},{type:"kern",size:-m},{type:"elem",elem:s}]},t)}var f=dr.makeSpan(["mord","accent"],[s],t);return n?(n.children[0]=f,n.height=Math.max(f.height,n.height),n.classes[0]="mord",n):f},ma=(e,t)=>{var r=e.isStretchy?na(e.label):new Ur.MathNode("mo",[Yr(e.label,e.mode)]),a=new Ur.MathNode("mover",[Jr(e.base,t),r]);return a.setAttribute("accent","true"),a},ha=new RegExp(["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring"].map((e=>"\\"+e)).join("|"));Er({type:"accent",names:["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring","\\widecheck","\\widehat","\\widetilde","\\overrightarrow","\\overleftarrow","\\Overrightarrow","\\overleftrightarrow","\\overgroup","\\overlinesegment","\\overleftharpoon","\\overrightharpoon"],props:{numArgs:1},handler:(e,t)=>{var r=Cr(t[0]),a=!ha.test(e.funcName),n=!a||"\\widehat"===e.funcName||"\\widetilde"===e.funcName||"\\widecheck"===e.funcName;return{type:"accent",mode:e.parser.mode,label:e.funcName,isStretchy:a,isShifty:n,base:r}},htmlBuilder:ca,mathmlBuilder:ma}),Er({type:"accent",names:["\\'","\\`","\\^","\\~","\\=","\\u","\\.",'\\"',"\\c","\\r","\\H","\\v","\\textcircled"],props:{numArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["primitive"]},handler:(e,t)=>{var r=t[0],a=e.parser.mode;return"math"===a&&(e.parser.settings.reportNonstrict("mathVsTextAccents","LaTeX's accent "+e.funcName+" works only in text mode"),a="text"),{type:"accent",mode:a,label:e.funcName,isStretchy:!1,isShifty:!0,base:r}},htmlBuilder:ca,mathmlBuilder:ma}),Er({type:"accentUnder",names:["\\underleftarrow","\\underrightarrow","\\underleftrightarrow","\\undergroup","\\underlinesegment","\\utilde"],props:{numArgs:1},handler:(e,t)=>{var{parser:r,funcName:a}=e,n=t[0];return{type:"accentUnder",mode:r.mode,label:a,base:n}},htmlBuilder:(e,t)=>{var r=Dr(e.base,t),a=ia(e,t),n="\\utilde"===e.label?.12:0,i=dr.makeVList({positionType:"top",positionData:r.height,children:[{type:"elem",elem:a,wrapperClasses:["svg-align"]},{type:"kern",size:n},{type:"elem",elem:r}]},t);return dr.makeSpan(["mord","accentunder"],[i],t)},mathmlBuilder:(e,t)=>{var r=na(e.label),a=new Ur.MathNode("munder",[Jr(e.base,t),r]);return a.setAttribute("accentunder","true"),a}});var ua=e=>{var t=new Ur.MathNode("mpadded",e?[e]:[]);return t.setAttribute("width","+0.6em"),t.setAttribute("lspace","0.3em"),t};Er({type:"xArrow",names:["\\xleftarrow","\\xrightarrow","\\xLeftarrow","\\xRightarrow","\\xleftrightarrow","\\xLeftrightarrow","\\xhookleftarrow","\\xhookrightarrow","\\xmapsto","\\xrightharpoondown","\\xrightharpoonup","\\xleftharpoondown","\\xleftharpoonup","\\xrightleftharpoons","\\xleftrightharpoons","\\xlongequal","\\xtwoheadrightarrow","\\xtwoheadleftarrow","\\xtofrom","\\xrightleftarrows","\\xrightequilibrium","\\xleftequilibrium","\\\\cdrightarrow","\\\\cdleftarrow","\\\\cdlongequal"],props:{numArgs:1,numOptionalArgs:1},handler(e,t,r){var{parser:a,funcName:n}=e;return{type:"xArrow",mode:a.mode,label:n,body:t[0],below:r[0]}},htmlBuilder(e,t){var r,a=t.style,n=t.havingStyle(a.sup()),i=dr.wrapFragment(Dr(e.body,n,t),t),o="\\x"===e.label.slice(0,2)?"x":"cd";i.classes.push(o+"-arrow-pad"),e.below&&(n=t.havingStyle(a.sub()),(r=dr.wrapFragment(Dr(e.below,n,t),t)).classes.push(o+"-arrow-pad"));var l,s=ia(e,t),c=-t.fontMetrics().axisHeight+.5*s.height,m=-t.fontMetrics().axisHeight-.5*s.height-.111;if((i.depth>.25||"\\xleftequilibrium"===e.label)&&(m-=i.depth),r){var h=-t.fontMetrics().axisHeight+r.height+.5*s.height+.111;l=dr.makeVList({positionType:"individualShift",children:[{type:"elem",elem:i,shift:m},{type:"elem",elem:s,shift:c},{type:"elem",elem:r,shift:h}]},t)}else l=dr.makeVList({positionType:"individualShift",children:[{type:"elem",elem:i,shift:m},{type:"elem",elem:s,shift:c}]},t);return l.children[0].children[0].children[1].classes.push("svg-align"),dr.makeSpan(["mrel","x-arrow"],[l],t)},mathmlBuilder(e,t){var r,a=na(e.label);if(a.setAttribute("minsize","x"===e.label.charAt(0)?"1.75em":"3.0em"),e.body){var n=ua(Jr(e.body,t));if(e.below){var i=ua(Jr(e.below,t));r=new Ur.MathNode("munderover",[a,i,n])}else r=new Ur.MathNode("mover",[a,n])}else if(e.below){var o=ua(Jr(e.below,t));r=new Ur.MathNode("munder",[a,o])}else r=ua(),r=new Ur.MathNode("mover",[a,r]);return r}});var pa=dr.makeSpan;function da(e,t){var r=Lr(e.body,t,!0);return pa([e.mclass],r,t)}function fa(e,t){var r,a=Wr(e.body,t);return"minner"===e.mclass?r=new Ur.MathNode("mpadded",a):"mord"===e.mclass?e.isCharacterBox?(r=a[0]).type="mi":r=new Ur.MathNode("mi",a):(e.isCharacterBox?(r=a[0]).type="mo":r=new Ur.MathNode("mo",a),"mbin"===e.mclass?(r.attributes.lspace="0.22em",r.attributes.rspace="0.22em"):"mpunct"===e.mclass?(r.attributes.lspace="0em",r.attributes.rspace="0.17em"):"mopen"===e.mclass||"mclose"===e.mclass?(r.attributes.lspace="0em",r.attributes.rspace="0em"):"minner"===e.mclass&&(r.attributes.lspace="0.0556em",r.attributes.width="+0.1111em")),r}Er({type:"mclass",names:["\\mathord","\\mathbin","\\mathrel","\\mathopen","\\mathclose","\\mathpunct","\\mathinner"],props:{numArgs:1,primitive:!0},handler(e,t){var{parser:r,funcName:a}=e,n=t[0];return{type:"mclass",mode:r.mode,mclass:"m"+a.slice(5),body:Sr(n),isCharacterBox:Se.isCharacterBox(n)}},htmlBuilder:da,mathmlBuilder:fa});var ga=e=>{var t="ordgroup"===e.type&&e.body.length?e.body[0]:e;return"atom"!==t.type||"bin"!==t.family&&"rel"!==t.family?"mord":"m"+t.family};Er({type:"mclass",names:["\\@binrel"],props:{numArgs:2},handler(e,t){var{parser:r}=e;return{type:"mclass",mode:r.mode,mclass:ga(t[0]),body:Sr(t[1]),isCharacterBox:Se.isCharacterBox(t[1])}}}),Er({type:"mclass",names:["\\stackrel","\\overset","\\underset"],props:{numArgs:2},handler(e,t){var r,{parser:a,funcName:n}=e,i=t[1],o=t[0];r="\\stackrel"!==n?ga(i):"mrel";var l={type:"op",mode:i.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:"\\stackrel"!==n,body:Sr(i)},s={type:"supsub",mode:o.mode,base:l,sup:"\\underset"===n?null:o,sub:"\\underset"===n?o:null};return{type:"mclass",mode:a.mode,mclass:r,body:[s],isCharacterBox:Se.isCharacterBox(s)}},htmlBuilder:da,mathmlBuilder:fa}),Er({type:"pmb",names:["\\pmb"],props:{numArgs:1,allowedInText:!0},handler(e,t){var{parser:r}=e;return{type:"pmb",mode:r.mode,mclass:ga(t[0]),body:Sr(t[0])}},htmlBuilder(e,t){var r=Lr(e.body,t,!0),a=dr.makeSpan([e.mclass],r,t);return a.style.textShadow="0.02em 0.01em 0.04px",a},mathmlBuilder(e,t){var r=Wr(e.body,t),a=new Ur.MathNode("mstyle",r);return a.setAttribute("style","text-shadow: 0.02em 0.01em 0.04px"),a}});var va={">":"\\\\cdrightarrow","<":"\\\\cdleftarrow","=":"\\\\cdlongequal",A:"\\uparrow",V:"\\downarrow","|":"\\Vert",".":"no arrow"},ba=e=>"textord"===e.type&&"@"===e.text;function ya(e,t,r){var a=va[e];switch(a){case"\\\\cdrightarrow":case"\\\\cdleftarrow":return r.callFunction(a,[t[0]],[t[1]]);case"\\uparrow":case"\\downarrow":var n={type:"atom",text:a,mode:"math",family:"rel"},i={type:"ordgroup",mode:"math",body:[r.callFunction("\\\\cdleft",[t[0]],[]),r.callFunction("\\Big",[n],[]),r.callFunction("\\\\cdright",[t[1]],[])]};return r.callFunction("\\\\cdparent",[i],[]);case"\\\\cdlongequal":return r.callFunction("\\\\cdlongequal",[],[]);case"\\Vert":return r.callFunction("\\Big",[{type:"textord",text:"\\Vert",mode:"math"}],[]);default:return{type:"textord",text:" ",mode:"math"}}}Er({type:"cdlabel",names:["\\\\cdleft","\\\\cdright"],props:{numArgs:1},handler(e,t){var{parser:r,funcName:a}=e;return{type:"cdlabel",mode:r.mode,side:a.slice(4),label:t[0]}},htmlBuilder(e,t){var r=t.havingStyle(t.style.sup()),a=dr.wrapFragment(Dr(e.label,r,t),t);return a.classes.push("cd-label-"+e.side),a.style.bottom=nt(.8-a.depth),a.height=0,a.depth=0,a},mathmlBuilder(e,t){var r=new Ur.MathNode("mrow",[Jr(e.label,t)]);return(r=new Ur.MathNode("mpadded",[r])).setAttribute("width","0"),"left"===e.side&&r.setAttribute("lspace","-1width"),r.setAttribute("voffset","0.7em"),(r=new Ur.MathNode("mstyle",[r])).setAttribute("displaystyle","false"),r.setAttribute("scriptlevel","1"),r}}),Er({type:"cdlabelparent",names:["\\\\cdparent"],props:{numArgs:1},handler(e,t){var{parser:r}=e;return{type:"cdlabelparent",mode:r.mode,fragment:t[0]}},htmlBuilder(e,t){var r=dr.wrapFragment(Dr(e.fragment,t),t);return r.classes.push("cd-vert-arrow"),r},mathmlBuilder:(e,t)=>new Ur.MathNode("mrow",[Jr(e.fragment,t)])}),Er({type:"textord",names:["\\@char"],props:{numArgs:1,allowedInText:!0},handler(e,t){for(var{parser:r}=e,a=oa(t[0],"ordgroup").body,n="",i=0;i<a.length;i++){n+=oa(a[i],"textord").text}var o,l=parseInt(n);if(isNaN(l))throw new we("\\@char has non-numeric argument "+n);if(l<0||l>=1114111)throw new we("\\@char with invalid code point "+n);return l<=65535?o=String.fromCharCode(l):(l-=65536,o=String.fromCharCode(55296+(l>>10),56320+(1023&l))),{type:"textord",mode:r.mode,text:o}}});var xa=(e,t)=>{var r=Lr(e.body,t.withColor(e.color),!1);return dr.makeFragment(r)},wa=(e,t)=>{var r=Wr(e.body,t.withColor(e.color)),a=new Ur.MathNode("mstyle",r);return a.setAttribute("mathcolor",e.color),a};Er({type:"color",names:["\\textcolor"],props:{numArgs:2,allowedInText:!0,argTypes:["color","original"]},handler(e,t){var{parser:r}=e,a=oa(t[0],"color-token").color,n=t[1];return{type:"color",mode:r.mode,color:a,body:Sr(n)}},htmlBuilder:xa,mathmlBuilder:wa}),Er({type:"color",names:["\\color"],props:{numArgs:1,allowedInText:!0,argTypes:["color"]},handler(e,t){var{parser:r,breakOnTokenText:a}=e,n=oa(t[0],"color-token").color;r.gullet.macros.set("\\current@color",n);var i=r.parseExpression(!0,a);return{type:"color",mode:r.mode,color:n,body:i}},htmlBuilder:xa,mathmlBuilder:wa}),Er({type:"cr",names:["\\\\"],props:{numArgs:0,numOptionalArgs:0,allowedInText:!0},handler(e,t,r){var{parser:a}=e,n="["===a.gullet.future().text?a.parseSizeGroup(!0):null,i=!a.settings.displayMode||!a.settings.useStrictBehavior("newLineInDisplayMode","In LaTeX, \\\\ or \\newline does nothing in display mode");return{type:"cr",mode:a.mode,newLine:i,size:n&&oa(n,"size").value}},htmlBuilder(e,t){var r=dr.makeSpan(["mspace"],[],t);return e.newLine&&(r.classes.push("newline"),e.size&&(r.style.marginTop=nt(at(e.size,t)))),r},mathmlBuilder(e,t){var r=new Ur.MathNode("mspace");return e.newLine&&(r.setAttribute("linebreak","newline"),e.size&&r.setAttribute("height",nt(at(e.size,t)))),r}});var ka={"\\global":"\\global","\\long":"\\\\globallong","\\\\globallong":"\\\\globallong","\\def":"\\gdef","\\gdef":"\\gdef","\\edef":"\\xdef","\\xdef":"\\xdef","\\let":"\\\\globallet","\\futurelet":"\\\\globalfuture"},Ea=e=>{var t=e.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(t))throw new we("Expected a control sequence",e);return t},Ma=(e,t,r,a)=>{var n=e.gullet.macros.get(r.text);null==n&&(r.noexpand=!0,n={tokens:[r],numArgs:0,unexpandable:!e.gullet.isExpandable(r.text)}),e.gullet.macros.set(t,n,a)};Er({type:"internal",names:["\\global","\\long","\\\\globallong"],props:{numArgs:0,allowedInText:!0},handler(e){var{parser:t,funcName:r}=e;t.consumeSpaces();var a=t.fetch();if(ka[a.text])return"\\global"!==r&&"\\\\globallong"!==r||(a.text=ka[a.text]),oa(t.parseFunction(),"internal");throw new we("Invalid token after macro prefix",a)}}),Er({type:"internal",names:["\\def","\\gdef","\\edef","\\xdef"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:t,funcName:r}=e,a=t.gullet.popToken(),n=a.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(n))throw new we("Expected a control sequence",a);for(var i,o=0,l=[[]];"{"!==t.gullet.future().text;)if("#"===(a=t.gullet.popToken()).text){if("{"===t.gullet.future().text){i=t.gullet.future(),l[o].push("{");break}if(a=t.gullet.popToken(),!/^[1-9]$/.test(a.text))throw new we('Invalid argument number "'+a.text+'"');if(parseInt(a.text)!==o+1)throw new we('Argument number "'+a.text+'" out of order');o++,l.push([])}else{if("EOF"===a.text)throw new we("Expected a macro definition");l[o].push(a.text)}var{tokens:s}=t.gullet.consumeArg();return i&&s.unshift(i),"\\edef"!==r&&"\\xdef"!==r||(s=t.gullet.expandTokens(s)).reverse(),t.gullet.macros.set(n,{tokens:s,numArgs:o,delimiters:l},r===ka[r]),{type:"internal",mode:t.mode}}}),Er({type:"internal",names:["\\let","\\\\globallet"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:t,funcName:r}=e,a=Ea(t.gullet.popToken());t.gullet.consumeSpaces();var n=(e=>{var t=e.gullet.popToken();return"="===t.text&&" "===(t=e.gullet.popToken()).text&&(t=e.gullet.popToken()),t})(t);return Ma(t,a,n,"\\\\globallet"===r),{type:"internal",mode:t.mode}}}),Er({type:"internal",names:["\\futurelet","\\\\globalfuture"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:t,funcName:r}=e,a=Ea(t.gullet.popToken()),n=t.gullet.popToken(),i=t.gullet.popToken();return Ma(t,a,i,"\\\\globalfuture"===r),t.gullet.pushToken(i),t.gullet.pushToken(n),{type:"internal",mode:t.mode}}});var Ca=function(e,t,r){var a=Xe(wt.math[e]&&wt.math[e].replace||e,t,r);if(!a)throw new Error("Unsupported symbol "+e+" and font size "+t+".");return a},Sa=function(e,t,r,a){var n=r.havingBaseStyle(t),i=dr.makeSpan(a.concat(n.sizingClasses(r)),[e],r),o=n.sizeMultiplier/r.sizeMultiplier;return i.height*=o,i.depth*=o,i.maxFontSize=n.sizeMultiplier,i},Na=function(e,t,r){var a=t.havingBaseStyle(r),n=(1-t.sizeMultiplier/a.sizeMultiplier)*t.fontMetrics().axisHeight;e.classes.push("delimcenter"),e.style.top=nt(n),e.height-=n,e.depth+=n},za=function(e,t,r,a,n,i){var o=function(e,t,r,a){return dr.makeSymbol(e,"Size"+t+"-Regular",r,a)}(e,t,n,a),l=Sa(dr.makeSpan(["delimsizing","size"+t],[o],a),De.TEXT,a,i);return r&&Na(l,a,De.TEXT),l},Ta=function(e,t,r){var a;return a="Size1-Regular"===t?"delim-size1":"delim-size4",{type:"elem",elem:dr.makeSpan(["delimsizinginner",a],[dr.makeSpan([],[dr.makeSymbol(e,t,r)])])}},Aa=function(e,t,r){var a=Ye["Size4-Regular"][e.charCodeAt(0)]?Ye["Size4-Regular"][e.charCodeAt(0)][4]:Ye["Size1-Regular"][e.charCodeAt(0)][4],n=new gt("inner",function(e,t){switch(e){case"⎜":return"M291 0 H417 V"+t+" H291z M291 0 H417 V"+t+" H291z";case"∣":return"M145 0 H188 V"+t+" H145z M145 0 H188 V"+t+" H145z";case"∥":return"M145 0 H188 V"+t+" H145z M145 0 H188 V"+t+" H145zM367 0 H410 V"+t+" H367z M367 0 H410 V"+t+" H367z";case"⎟":return"M457 0 H583 V"+t+" H457z M457 0 H583 V"+t+" H457z";case"⎢":return"M319 0 H403 V"+t+" H319z M319 0 H403 V"+t+" H319z";case"⎥":return"M263 0 H347 V"+t+" H263z M263 0 H347 V"+t+" H263z";case"⎪":return"M384 0 H504 V"+t+" H384z M384 0 H504 V"+t+" H384z";case"⏐":return"M312 0 H355 V"+t+" H312z M312 0 H355 V"+t+" H312z";case"‖":return"M257 0 H300 V"+t+" H257z M257 0 H300 V"+t+" H257zM478 0 H521 V"+t+" H478z M478 0 H521 V"+t+" H478z";default:return""}}(e,Math.round(1e3*t))),i=new ft([n],{width:nt(a),height:nt(t),style:"width:"+nt(a),viewBox:"0 0 "+1e3*a+" "+Math.round(1e3*t),preserveAspectRatio:"xMinYMin"}),o=dr.makeSvgSpan([],[i],r);return o.height=t,o.style.height=nt(t),o.style.width=nt(a),{type:"elem",elem:o}},qa={type:"kern",size:-.008},La=["|","\\lvert","\\rvert","\\vert"],Ba=["\\|","\\lVert","\\rVert","\\Vert"],Oa=function(e,t,r,a,n,i){var o,l,s,c,m="",h=0;o=s=c=e,l=null;var u="Size1-Regular";"\\uparrow"===e?s=c="⏐":"\\Uparrow"===e?s=c="‖":"\\downarrow"===e?o=s="⏐":"\\Downarrow"===e?o=s="‖":"\\updownarrow"===e?(o="\\uparrow",s="⏐",c="\\downarrow"):"\\Updownarrow"===e?(o="\\Uparrow",s="‖",c="\\Downarrow"):Se.contains(La,e)?(s="∣",m="vert",h=333):Se.contains(Ba,e)?(s="∥",m="doublevert",h=556):"["===e||"\\lbrack"===e?(o="⎡",s="⎢",c="⎣",u="Size4-Regular",m="lbrack",h=667):"]"===e||"\\rbrack"===e?(o="⎤",s="⎥",c="⎦",u="Size4-Regular",m="rbrack",h=667):"\\lfloor"===e||"⌊"===e?(s=o="⎢",c="⎣",u="Size4-Regular",m="lfloor",h=667):"\\lceil"===e||"⌈"===e?(o="⎡",s=c="⎢",u="Size4-Regular",m="lceil",h=667):"\\rfloor"===e||"⌋"===e?(s=o="⎥",c="⎦",u="Size4-Regular",m="rfloor",h=667):"\\rceil"===e||"⌉"===e?(o="⎤",s=c="⎥",u="Size4-Regular",m="rceil",h=667):"("===e||"\\lparen"===e?(o="⎛",s="⎜",c="⎝",u="Size4-Regular",m="lparen",h=875):")"===e||"\\rparen"===e?(o="⎞",s="⎟",c="⎠",u="Size4-Regular",m="rparen",h=875):"\\{"===e||"\\lbrace"===e?(o="⎧",l="⎨",c="⎩",s="⎪",u="Size4-Regular"):"\\}"===e||"\\rbrace"===e?(o="⎫",l="⎬",c="⎭",s="⎪",u="Size4-Regular"):"\\lgroup"===e||"⟮"===e?(o="⎧",c="⎩",s="⎪",u="Size4-Regular"):"\\rgroup"===e||"⟯"===e?(o="⎫",c="⎭",s="⎪",u="Size4-Regular"):"\\lmoustache"===e||"⎰"===e?(o="⎧",c="⎭",s="⎪",u="Size4-Regular"):"\\rmoustache"!==e&&"⎱"!==e||(o="⎫",c="⎩",s="⎪",u="Size4-Regular");var p=Ca(o,u,n),d=p.height+p.depth,f=Ca(s,u,n),g=f.height+f.depth,v=Ca(c,u,n),b=v.height+v.depth,y=0,x=1;if(null!==l){var w=Ca(l,u,n);y=w.height+w.depth,x=2}var k=d+b+y,E=k+Math.max(0,Math.ceil((t-k)/(x*g)))*x*g,M=a.fontMetrics().axisHeight;r&&(M*=a.sizeMultiplier);var C=E/2-M,S=[];if(m.length>0){var N=E-d-b,z=Math.round(1e3*E),T=function(e,t){switch(e){case"lbrack":return"M403 1759 V84 H666 V0 H319 V1759 v"+t+" v1759 h347 v-84\nH403z M403 1759 V0 H319 V1759 v"+t+" v1759 h84z";case"rbrack":return"M347 1759 V0 H0 V84 H263 V1759 v"+t+" v1759 H0 v84 H347z\nM347 1759 V0 H263 V1759 v"+t+" v1759 h84z";case"vert":return"M145 15 v585 v"+t+" v585 c2.667,10,9.667,15,21,15\nc10,0,16.667,-5,20,-15 v-585 v"+-t+" v-585 c-2.667,-10,-9.667,-15,-21,-15\nc-10,0,-16.667,5,-20,15z M188 15 H145 v585 v"+t+" v585 h43z";case"doublevert":return"M145 15 v585 v"+t+" v585 c2.667,10,9.667,15,21,15\nc10,0,16.667,-5,20,-15 v-585 v"+-t+" v-585 c-2.667,-10,-9.667,-15,-21,-15\nc-10,0,-16.667,5,-20,15z M188 15 H145 v585 v"+t+" v585 h43z\nM367 15 v585 v"+t+" v585 c2.667,10,9.667,15,21,15\nc10,0,16.667,-5,20,-15 v-585 v"+-t+" v-585 c-2.667,-10,-9.667,-15,-21,-15\nc-10,0,-16.667,5,-20,15z M410 15 H367 v585 v"+t+" v585 h43z";case"lfloor":return"M319 602 V0 H403 V602 v"+t+" v1715 h263 v84 H319z\nMM319 602 V0 H403 V602 v"+t+" v1715 H319z";case"rfloor":return"M319 602 V0 H403 V602 v"+t+" v1799 H0 v-84 H319z\nMM319 602 V0 H403 V602 v"+t+" v1715 H319z";case"lceil":return"M403 1759 V84 H666 V0 H319 V1759 v"+t+" v602 h84z\nM403 1759 V0 H319 V1759 v"+t+" v602 h84z";case"rceil":return"M347 1759 V0 H0 V84 H263 V1759 v"+t+" v602 h84z\nM347 1759 V0 h-84 V1759 v"+t+" v602 h84z";case"lparen":return"M863,9c0,-2,-2,-5,-6,-9c0,0,-17,0,-17,0c-12.7,0,-19.3,0.3,-20,1\nc-5.3,5.3,-10.3,11,-15,17c-242.7,294.7,-395.3,682,-458,1162c-21.3,163.3,-33.3,349,\n-36,557 l0,"+(t+84)+"c0.2,6,0,26,0,60c2,159.3,10,310.7,24,454c53.3,528,210,\n949.7,470,1265c4.7,6,9.7,11.7,15,17c0.7,0.7,7,1,19,1c0,0,18,0,18,0c4,-4,6,-7,6,-9\nc0,-2.7,-3.3,-8.7,-10,-18c-135.3,-192.7,-235.5,-414.3,-300.5,-665c-65,-250.7,-102.5,\n-544.7,-112.5,-882c-2,-104,-3,-167,-3,-189\nl0,-"+(t+92)+"c0,-162.7,5.7,-314,17,-454c20.7,-272,63.7,-513,129,-723c65.3,\n-210,155.3,-396.3,270,-559c6.7,-9.3,10,-15.3,10,-18z";case"rparen":return"M76,0c-16.7,0,-25,3,-25,9c0,2,2,6.3,6,13c21.3,28.7,42.3,60.3,\n63,95c96.7,156.7,172.8,332.5,228.5,527.5c55.7,195,92.8,416.5,111.5,664.5\nc11.3,139.3,17,290.7,17,454c0,28,1.7,43,3.3,45l0,"+(t+9)+"\nc-3,4,-3.3,16.7,-3.3,38c0,162,-5.7,313.7,-17,455c-18.7,248,-55.8,469.3,-111.5,664\nc-55.7,194.7,-131.8,370.3,-228.5,527c-20.7,34.7,-41.7,66.3,-63,95c-2,3.3,-4,7,-6,11\nc0,7.3,5.7,11,17,11c0,0,11,0,11,0c9.3,0,14.3,-0.3,15,-1c5.3,-5.3,10.3,-11,15,-17\nc242.7,-294.7,395.3,-681.7,458,-1161c21.3,-164.7,33.3,-350.7,36,-558\nl0,-"+(t+144)+"c-2,-159.3,-10,-310.7,-24,-454c-53.3,-528,-210,-949.7,\n-470,-1265c-4.7,-6,-9.7,-11.7,-15,-17c-0.7,-0.7,-6.7,-1,-18,-1z";default:throw new Error("Unknown stretchy delimiter.")}}(m,Math.round(1e3*N)),A=new gt(m,T),q=(h/1e3).toFixed(3)+"em",L=(z/1e3).toFixed(3)+"em",B=new ft([A],{width:q,height:L,viewBox:"0 0 "+h+" "+z}),O=dr.makeSvgSpan([],[B],a);O.height=z/1e3,O.style.width=q,O.style.height=L,S.push({type:"elem",elem:O})}else{if(S.push(Ta(c,u,n)),S.push(qa),null===l){var H=E-d-b+.016;S.push(Aa(s,H,a))}else{var I=(E-d-b-y)/2+.016;S.push(Aa(s,I,a)),S.push(qa),S.push(Ta(l,u,n)),S.push(qa),S.push(Aa(s,I,a))}S.push(qa),S.push(Ta(o,u,n))}var R=a.havingBaseStyle(De.TEXT),D=dr.makeVList({positionType:"bottom",positionData:C,children:S},R);return Sa(dr.makeSpan(["delimsizing","mult"],[D],R),De.TEXT,a,i)},Ha=.08,Ia=function(e,t,r,a,n){var i=function(e,t,r){t*=1e3;var a="";switch(e){case"sqrtMain":a=function(e,t){return"M95,"+(622+e+t)+"\nc-2.7,0,-7.17,-2.7,-13.5,-8c-5.8,-5.3,-9.5,-10,-9.5,-14\nc0,-2,0.3,-3.3,1,-4c1.3,-2.7,23.83,-20.7,67.5,-54\nc44.2,-33.3,65.8,-50.3,66.5,-51c1.3,-1.3,3,-2,5,-2c4.7,0,8.7,3.3,12,10\ns173,378,173,378c0.7,0,35.3,-71,104,-213c68.7,-142,137.5,-285,206.5,-429\nc69,-144,104.5,-217.7,106.5,-221\nl"+e/2.075+" -"+e+"\nc5.3,-9.3,12,-14,20,-14\nH400000v"+(40+e)+"H845.2724\ns-225.272,467,-225.272,467s-235,486,-235,486c-2.7,4.7,-9,7,-19,7\nc-6,0,-10,-1,-12,-3s-194,-422,-194,-422s-65,47,-65,47z\nM"+(834+e)+" "+t+"h400000v"+(40+e)+"h-400000z"}(t,_e);break;case"sqrtSize1":a=function(e,t){return"M263,"+(601+e+t)+"c0.7,0,18,39.7,52,119\nc34,79.3,68.167,158.7,102.5,238c34.3,79.3,51.8,119.3,52.5,120\nc340,-704.7,510.7,-1060.3,512,-1067\nl"+e/2.084+" -"+e+"\nc4.7,-7.3,11,-11,19,-11\nH40000v"+(40+e)+"H1012.3\ns-271.3,567,-271.3,567c-38.7,80.7,-84,175,-136,283c-52,108,-89.167,185.3,-111.5,232\nc-22.3,46.7,-33.8,70.3,-34.5,71c-4.7,4.7,-12.3,7,-23,7s-12,-1,-12,-1\ns-109,-253,-109,-253c-72.7,-168,-109.3,-252,-110,-252c-10.7,8,-22,16.7,-34,26\nc-22,17.3,-33.3,26,-34,26s-26,-26,-26,-26s76,-59,76,-59s76,-60,76,-60z\nM"+(1001+e)+" "+t+"h400000v"+(40+e)+"h-400000z"}(t,_e);break;case"sqrtSize2":a=function(e,t){return"M983 "+(10+e+t)+"\nl"+e/3.13+" -"+e+"\nc4,-6.7,10,-10,18,-10 H400000v"+(40+e)+"\nH1013.1s-83.4,268,-264.1,840c-180.7,572,-277,876.3,-289,913c-4.7,4.7,-12.7,7,-24,7\ns-12,0,-12,0c-1.3,-3.3,-3.7,-11.7,-7,-25c-35.3,-125.3,-106.7,-373.3,-214,-744\nc-10,12,-21,25,-33,39s-32,39,-32,39c-6,-5.3,-15,-14,-27,-26s25,-30,25,-30\nc26.7,-32.7,52,-63,76,-91s52,-60,52,-60s208,722,208,722\nc56,-175.3,126.3,-397.3,211,-666c84.7,-268.7,153.8,-488.2,207.5,-658.5\nc53.7,-170.3,84.5,-266.8,92.5,-289.5z\nM"+(1001+e)+" "+t+"h400000v"+(40+e)+"h-400000z"}(t,_e);break;case"sqrtSize3":a=function(e,t){return"M424,"+(2398+e+t)+"\nc-1.3,-0.7,-38.5,-172,-111.5,-514c-73,-342,-109.8,-513.3,-110.5,-514\nc0,-2,-10.7,14.3,-32,49c-4.7,7.3,-9.8,15.7,-15.5,25c-5.7,9.3,-9.8,16,-12.5,20\ns-5,7,-5,7c-4,-3.3,-8.3,-7.7,-13,-13s-13,-13,-13,-13s76,-122,76,-122s77,-121,77,-121\ns209,968,209,968c0,-2,84.7,-361.7,254,-1079c169.3,-717.3,254.7,-1077.7,256,-1081\nl"+e/4.223+" -"+e+"c4,-6.7,10,-10,18,-10 H400000\nv"+(40+e)+"H1014.6\ns-87.3,378.7,-272.6,1166c-185.3,787.3,-279.3,1182.3,-282,1185\nc-2,6,-10,9,-24,9\nc-8,0,-12,-0.7,-12,-2z M"+(1001+e)+" "+t+"\nh400000v"+(40+e)+"h-400000z"}(t,_e);break;case"sqrtSize4":a=function(e,t){return"M473,"+(2713+e+t)+"\nc339.3,-1799.3,509.3,-2700,510,-2702 l"+e/5.298+" -"+e+"\nc3.3,-7.3,9.3,-11,18,-11 H400000v"+(40+e)+"H1017.7\ns-90.5,478,-276.2,1466c-185.7,988,-279.5,1483,-281.5,1485c-2,6,-10,9,-24,9\nc-8,0,-12,-0.7,-12,-2c0,-1.3,-5.3,-32,-16,-92c-50.7,-293.3,-119.7,-693.3,-207,-1200\nc0,-1.3,-5.3,8.7,-16,30c-10.7,21.3,-21.3,42.7,-32,64s-16,33,-16,33s-26,-26,-26,-26\ns76,-153,76,-153s77,-151,77,-151c0.7,0.7,35.7,202,105,604c67.3,400.7,102,602.7,104,\n606zM"+(1001+e)+" "+t+"h400000v"+(40+e)+"H1017.7z"}(t,_e);break;case"sqrtTall":a=function(e,t,r){return"M702 "+(e+t)+"H400000"+(40+e)+"\nH742v"+(r-54-t-e)+"l-4 4-4 4c-.667.7 -2 1.5-4 2.5s-4.167 1.833-6.5 2.5-5.5 1-9.5 1\nh-12l-28-84c-16.667-52-96.667 -294.333-240-727l-212 -643 -85 170\nc-4-3.333-8.333-7.667-13 -13l-13-13l77-155 77-156c66 199.333 139 419.667\n219 661 l218 661zM702 "+t+"H400000v"+(40+e)+"H742z"}(t,_e,r)}return a}(e,a,r),o=new gt(e,i),l=new ft([o],{width:"400em",height:nt(t),viewBox:"0 0 400000 "+r,preserveAspectRatio:"xMinYMin slice"});return dr.makeSvgSpan(["hide-tail"],[l],n)},Ra=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","\\surd"],Da=["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱"],Fa=["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"],ja=[0,1.2,1.8,2.4,3],Va=[{type:"small",style:De.SCRIPTSCRIPT},{type:"small",style:De.SCRIPT},{type:"small",style:De.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],_a=[{type:"small",style:De.SCRIPTSCRIPT},{type:"small",style:De.SCRIPT},{type:"small",style:De.TEXT},{type:"stack"}],Pa=[{type:"small",style:De.SCRIPTSCRIPT},{type:"small",style:De.SCRIPT},{type:"small",style:De.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}],Ua=function(e){if("small"===e.type)return"Main-Regular";if("large"===e.type)return"Size"+e.size+"-Regular";if("stack"===e.type)return"Size4-Regular";throw new Error("Add support for delim type '"+e.type+"' here.")},Ya=function(e,t,r,a){for(var n=Math.min(2,3-a.style.size);n<r.length&&"stack"!==r[n].type;n++){var i=Ca(e,Ua(r[n]),"math"),o=i.height+i.depth;if("small"===r[n].type&&(o*=a.havingBaseStyle(r[n].style).sizeMultiplier),o>t)return r[n]}return r[r.length-1]},Ga=function(e,t,r,a,n,i){var o;"<"===e||"\\lt"===e||"⟨"===e?e="\\langle":">"!==e&&"\\gt"!==e&&"⟩"!==e||(e="\\rangle"),o=Se.contains(Fa,e)?Va:Se.contains(Ra,e)?Pa:_a;var l=Ya(e,t,o,a);return"small"===l.type?function(e,t,r,a,n,i){var o=dr.makeSymbol(e,"Main-Regular",n,a),l=Sa(o,t,a,i);return r&&Na(l,a,t),l}(e,l.style,r,a,n,i):"large"===l.type?za(e,l.size,r,a,n,i):Oa(e,t,r,a,n,i)},Za={sqrtImage:function(e,t){var r,a,n=t.havingBaseSizing(),i=Ya("\\surd",e*n.sizeMultiplier,Pa,n),o=n.sizeMultiplier,l=Math.max(0,t.minRuleThickness-t.fontMetrics().sqrtRuleThickness),s=0,c=0,m=0;return"small"===i.type?(e<1?o=1:e<1.4&&(o=.7),c=(1+l)/o,(r=Ia("sqrtMain",s=(1+l+Ha)/o,m=1e3+1e3*l+80,l,t)).style.minWidth="0.853em",a=.833/o):"large"===i.type?(m=1080*ja[i.size],c=(ja[i.size]+l)/o,s=(ja[i.size]+l+Ha)/o,(r=Ia("sqrtSize"+i.size,s,m,l,t)).style.minWidth="1.02em",a=1/o):(s=e+l+Ha,c=e+l,m=Math.floor(1e3*e+l)+80,(r=Ia("sqrtTall",s,m,l,t)).style.minWidth="0.742em",a=1.056),r.height=c,r.style.height=nt(s),{span:r,advanceWidth:a,ruleWidth:(t.fontMetrics().sqrtRuleThickness+l)*o}},sizedDelim:function(e,t,r,a,n){if("<"===e||"\\lt"===e||"⟨"===e?e="\\langle":">"!==e&&"\\gt"!==e&&"⟩"!==e||(e="\\rangle"),Se.contains(Ra,e)||Se.contains(Fa,e))return za(e,t,!1,r,a,n);if(Se.contains(Da,e))return Oa(e,ja[t],!1,r,a,n);throw new we("Illegal delimiter: '"+e+"'")},sizeToMaxHeight:ja,customSizedDelim:Ga,leftRightDelim:function(e,t,r,a,n,i){var o=a.fontMetrics().axisHeight*a.sizeMultiplier,l=5/a.fontMetrics().ptPerEm,s=Math.max(t-o,r+o),c=Math.max(s/500*901,2*s-l);return Ga(e,c,!0,a,n,i)}},Xa={"\\bigl":{mclass:"mopen",size:1},"\\Bigl":{mclass:"mopen",size:2},"\\biggl":{mclass:"mopen",size:3},"\\Biggl":{mclass:"mopen",size:4},"\\bigr":{mclass:"mclose",size:1},"\\Bigr":{mclass:"mclose",size:2},"\\biggr":{mclass:"mclose",size:3},"\\Biggr":{mclass:"mclose",size:4},"\\bigm":{mclass:"mrel",size:1},"\\Bigm":{mclass:"mrel",size:2},"\\biggm":{mclass:"mrel",size:3},"\\Biggm":{mclass:"mrel",size:4},"\\big":{mclass:"mord",size:1},"\\Big":{mclass:"mord",size:2},"\\bigg":{mclass:"mord",size:3},"\\Bigg":{mclass:"mord",size:4}},Wa=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","<",">","\\langle","⟨","\\rangle","⟩","\\lt","\\gt","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱","/","\\backslash","|","\\vert","\\|","\\Vert","\\uparrow","\\Uparrow","\\downarrow","\\Downarrow","\\updownarrow","\\Updownarrow","."];function $a(e,t){var r=sa(e);if(r&&Se.contains(Wa,r.text))return r;throw new we(r?"Invalid delimiter '"+r.text+"' after '"+t.funcName+"'":"Invalid delimiter type '"+e.type+"'",e)}function Ja(e){if(!e.body)throw new Error("Bug: The leftright ParseNode wasn't fully parsed.")}Er({type:"delimsizing",names:["\\bigl","\\Bigl","\\biggl","\\Biggl","\\bigr","\\Bigr","\\biggr","\\Biggr","\\bigm","\\Bigm","\\biggm","\\Biggm","\\big","\\Big","\\bigg","\\Bigg"],props:{numArgs:1,argTypes:["primitive"]},handler:(e,t)=>{var r=$a(t[0],e);return{type:"delimsizing",mode:e.parser.mode,size:Xa[e.funcName].size,mclass:Xa[e.funcName].mclass,delim:r.text}},htmlBuilder:(e,t)=>"."===e.delim?dr.makeSpan([e.mclass]):Za.sizedDelim(e.delim,e.size,t,e.mode,[e.mclass]),mathmlBuilder:e=>{var t=[];"."!==e.delim&&t.push(Yr(e.delim,e.mode));var r=new Ur.MathNode("mo",t);"mopen"===e.mclass||"mclose"===e.mclass?r.setAttribute("fence","true"):r.setAttribute("fence","false"),r.setAttribute("stretchy","true");var a=nt(Za.sizeToMaxHeight[e.size]);return r.setAttribute("minsize",a),r.setAttribute("maxsize",a),r}}),Er({type:"leftright-right",names:["\\right"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var r=e.parser.gullet.macros.get("\\current@color");if(r&&"string"!=typeof r)throw new we("\\current@color set to non-string in \\right");return{type:"leftright-right",mode:e.parser.mode,delim:$a(t[0],e).text,color:r}}}),Er({type:"leftright",names:["\\left"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var r=$a(t[0],e),a=e.parser;++a.leftrightDepth;var n=a.parseExpression(!1);--a.leftrightDepth,a.expect("\\right",!1);var i=oa(a.parseFunction(),"leftright-right");return{type:"leftright",mode:a.mode,body:n,left:r.text,right:i.delim,rightColor:i.color}},htmlBuilder:(e,t)=>{Ja(e);for(var r,a,n=Lr(e.body,t,!0,["mopen","mclose"]),i=0,o=0,l=!1,s=0;s<n.length;s++)n[s].isMiddle?l=!0:(i=Math.max(n[s].height,i),o=Math.max(n[s].depth,o));if(i*=t.sizeMultiplier,o*=t.sizeMultiplier,r="."===e.left?Rr(t,["mopen"]):Za.leftRightDelim(e.left,i,o,t,e.mode,["mopen"]),n.unshift(r),l)for(var c=1;c<n.length;c++){var m=n[c].isMiddle;m&&(n[c]=Za.leftRightDelim(m.delim,i,o,m.options,e.mode,[]))}if("."===e.right)a=Rr(t,["mclose"]);else{var h=e.rightColor?t.withColor(e.rightColor):t;a=Za.leftRightDelim(e.right,i,o,h,e.mode,["mclose"])}return n.push(a),dr.makeSpan(["minner"],n,t)},mathmlBuilder:(e,t)=>{Ja(e);var r=Wr(e.body,t);if("."!==e.left){var a=new Ur.MathNode("mo",[Yr(e.left,e.mode)]);a.setAttribute("fence","true"),r.unshift(a)}if("."!==e.right){var n=new Ur.MathNode("mo",[Yr(e.right,e.mode)]);n.setAttribute("fence","true"),e.rightColor&&n.setAttribute("mathcolor",e.rightColor),r.push(n)}return Gr(r)}}),Er({type:"middle",names:["\\middle"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var r=$a(t[0],e);if(!e.parser.leftrightDepth)throw new we("\\middle without preceding \\left",r);return{type:"middle",mode:e.parser.mode,delim:r.text}},htmlBuilder:(e,t)=>{var r;if("."===e.delim)r=Rr(t,[]);else{r=Za.sizedDelim(e.delim,1,t,e.mode,[]);var a={delim:e.delim,options:t};r.isMiddle=a}return r},mathmlBuilder:(e,t)=>{var r="\\vert"===e.delim||"|"===e.delim?Yr("|","text"):Yr(e.delim,e.mode),a=new Ur.MathNode("mo",[r]);return a.setAttribute("fence","true"),a.setAttribute("lspace","0.05em"),a.setAttribute("rspace","0.05em"),a}});var Ka=(e,t)=>{var r,a,n,i=dr.wrapFragment(Dr(e.body,t),t),o=e.label.slice(1),l=t.sizeMultiplier,s=0,c=Se.isCharacterBox(e.body);if("sout"===o)(r=dr.makeSpan(["stretchy","sout"])).height=t.fontMetrics().defaultRuleThickness/l,s=-.5*t.fontMetrics().xHeight;else if("phase"===o){var m=at({number:.6,unit:"pt"},t),h=at({number:.35,unit:"ex"},t);l/=t.havingBaseSizing().sizeMultiplier;var u=i.height+i.depth+m+h;i.style.paddingLeft=nt(u/2+m);var p=Math.floor(1e3*u*l),d="M400000 "+(a=p)+" H0 L"+a/2+" 0 l65 45 L145 "+(a-80)+" H400000z",f=new ft([new gt("phase",d)],{width:"400em",height:nt(p/1e3),viewBox:"0 0 400000 "+p,preserveAspectRatio:"xMinYMin slice"});(r=dr.makeSvgSpan(["hide-tail"],[f],t)).style.height=nt(u),s=i.depth+m+h}else{/cancel/.test(o)?c||i.classes.push("cancel-pad"):"angl"===o?i.classes.push("anglpad"):i.classes.push("boxpad");var g=0,v=0,b=0;/box/.test(o)?(b=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness),v=g=t.fontMetrics().fboxsep+("colorbox"===o?0:b)):"angl"===o?(g=4*(b=Math.max(t.fontMetrics().defaultRuleThickness,t.minRuleThickness)),v=Math.max(0,.25-i.depth)):v=g=c?.2:0,r=aa(i,o,g,v,t),/fbox|boxed|fcolorbox/.test(o)?(r.style.borderStyle="solid",r.style.borderWidth=nt(b)):"angl"===o&&.049!==b&&(r.style.borderTopWidth=nt(b),r.style.borderRightWidth=nt(b)),s=i.depth+v,e.backgroundColor&&(r.style.backgroundColor=e.backgroundColor,e.borderColor&&(r.style.borderColor=e.borderColor))}if(e.backgroundColor)n=dr.makeVList({positionType:"individualShift",children:[{type:"elem",elem:r,shift:s},{type:"elem",elem:i,shift:0}]},t);else{var y=/cancel|phase/.test(o)?["svg-align"]:[];n=dr.makeVList({positionType:"individualShift",children:[{type:"elem",elem:i,shift:0},{type:"elem",elem:r,shift:s,wrapperClasses:y}]},t)}return/cancel/.test(o)&&(n.height=i.height,n.depth=i.depth),/cancel/.test(o)&&!c?dr.makeSpan(["mord","cancel-lap"],[n],t):dr.makeSpan(["mord"],[n],t)},Qa=(e,t)=>{var r=0,a=new Ur.MathNode(e.label.indexOf("colorbox")>-1?"mpadded":"menclose",[Jr(e.body,t)]);switch(e.label){case"\\cancel":a.setAttribute("notation","updiagonalstrike");break;case"\\bcancel":a.setAttribute("notation","downdiagonalstrike");break;case"\\phase":a.setAttribute("notation","phasorangle");break;case"\\sout":a.setAttribute("notation","horizontalstrike");break;case"\\fbox":a.setAttribute("notation","box");break;case"\\angl":a.setAttribute("notation","actuarial");break;case"\\fcolorbox":case"\\colorbox":if(r=t.fontMetrics().fboxsep*t.fontMetrics().ptPerEm,a.setAttribute("width","+"+2*r+"pt"),a.setAttribute("height","+"+2*r+"pt"),a.setAttribute("lspace",r+"pt"),a.setAttribute("voffset",r+"pt"),"\\fcolorbox"===e.label){var n=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness);a.setAttribute("style","border: "+n+"em solid "+String(e.borderColor))}break;case"\\xcancel":a.setAttribute("notation","updiagonalstrike downdiagonalstrike")}return e.backgroundColor&&a.setAttribute("mathbackground",e.backgroundColor),a};Er({type:"enclose",names:["\\colorbox"],props:{numArgs:2,allowedInText:!0,argTypes:["color","text"]},handler(e,t,r){var{parser:a,funcName:n}=e,i=oa(t[0],"color-token").color,o=t[1];return{type:"enclose",mode:a.mode,label:n,backgroundColor:i,body:o}},htmlBuilder:Ka,mathmlBuilder:Qa}),Er({type:"enclose",names:["\\fcolorbox"],props:{numArgs:3,allowedInText:!0,argTypes:["color","color","text"]},handler(e,t,r){var{parser:a,funcName:n}=e,i=oa(t[0],"color-token").color,o=oa(t[1],"color-token").color,l=t[2];return{type:"enclose",mode:a.mode,label:n,backgroundColor:o,borderColor:i,body:l}},htmlBuilder:Ka,mathmlBuilder:Qa}),Er({type:"enclose",names:["\\fbox"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!0},handler(e,t){var{parser:r}=e;return{type:"enclose",mode:r.mode,label:"\\fbox",body:t[0]}}}),Er({type:"enclose",names:["\\cancel","\\bcancel","\\xcancel","\\sout","\\phase"],props:{numArgs:1},handler(e,t){var{parser:r,funcName:a}=e,n=t[0];return{type:"enclose",mode:r.mode,label:a,body:n}},htmlBuilder:Ka,mathmlBuilder:Qa}),Er({type:"enclose",names:["\\angl"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!1},handler(e,t){var{parser:r}=e;return{type:"enclose",mode:r.mode,label:"\\angl",body:t[0]}}});var en={};function tn(e){for(var{type:t,names:r,props:a,handler:n,htmlBuilder:i,mathmlBuilder:o}=e,l={type:t,numArgs:a.numArgs||0,allowedInText:!1,numOptionalArgs:0,handler:n},s=0;s<r.length;++s)en[r[s]]=l;i&&(wr[t]=i),o&&(kr[t]=o)}var rn={};function an(e,t){rn[e]=t}function nn(e){var t=[];e.consumeSpaces();var r=e.fetch().text;for("\\relax"===r&&(e.consume(),e.consumeSpaces(),r=e.fetch().text);"\\hline"===r||"\\hdashline"===r;)e.consume(),t.push("\\hdashline"===r),e.consumeSpaces(),r=e.fetch().text;return t}var on=e=>{if(!e.parser.settings.displayMode)throw new we("{"+e.envName+"} can be used only in display mode.")};function ln(e){if(-1===e.indexOf("ed"))return-1===e.indexOf("*")}function sn(e,t,r){var{hskipBeforeAndAfter:a,addJot:n,cols:i,arraystretch:o,colSeparationType:l,autoTag:s,singleRow:c,emptySingleRow:m,maxNumCols:h,leqno:u}=t;if(e.gullet.beginGroup(),c||e.gullet.macros.set("\\cr","\\\\\\relax"),!o){var p=e.gullet.expandMacroAsText("\\arraystretch");if(null==p)o=1;else if(!(o=parseFloat(p))||o<0)throw new we("Invalid \\arraystretch: "+p)}e.gullet.beginGroup();var d=[],f=[d],g=[],v=[],b=null!=s?[]:void 0;function y(){s&&e.gullet.macros.set("\\@eqnsw","1",!0)}function x(){b&&(e.gullet.macros.get("\\df@tag")?(b.push(e.subparse([new xe("\\df@tag")])),e.gullet.macros.set("\\df@tag",void 0,!0)):b.push(Boolean(s)&&"1"===e.gullet.macros.get("\\@eqnsw")))}for(y(),v.push(nn(e));;){var w=e.parseExpression(!1,c?"\\end":"\\\\");e.gullet.endGroup(),e.gullet.beginGroup(),w={type:"ordgroup",mode:e.mode,body:w},r&&(w={type:"styling",mode:e.mode,style:r,body:[w]}),d.push(w);var k=e.fetch().text;if("&"===k){if(h&&d.length===h){if(c||l)throw new we("Too many tab characters: &",e.nextToken);e.settings.reportNonstrict("textEnv","Too few columns specified in the {array} column argument.")}e.consume()}else{if("\\end"===k){x(),1===d.length&&"styling"===w.type&&0===w.body[0].body.length&&(f.length>1||!m)&&f.pop(),v.length<f.length+1&&v.push([]);break}if("\\\\"!==k)throw new we("Expected & or \\\\ or \\cr or \\end",e.nextToken);e.consume();var E=void 0;" "!==e.gullet.future().text&&(E=e.parseSizeGroup(!0)),g.push(E?E.value:null),x(),v.push(nn(e)),d=[],f.push(d),y()}}return e.gullet.endGroup(),e.gullet.endGroup(),{type:"array",mode:e.mode,addJot:n,arraystretch:o,body:f,cols:i,rowGaps:g,hskipBeforeAndAfter:a,hLinesBeforeRow:v,colSeparationType:l,tags:b,leqno:u}}function cn(e){return"d"===e.slice(0,1)?"display":"text"}var mn=function(e,t){var r,a,n=e.body.length,i=e.hLinesBeforeRow,o=0,l=new Array(n),s=[],c=Math.max(t.fontMetrics().arrayRuleWidth,t.minRuleThickness),m=1/t.fontMetrics().ptPerEm,h=5*m;e.colSeparationType&&"small"===e.colSeparationType&&(h=t.havingStyle(De.SCRIPT).sizeMultiplier/t.sizeMultiplier*.2778);var u="CD"===e.colSeparationType?at({number:3,unit:"ex"},t):12*m,p=3*m,d=e.arraystretch*u,f=.7*d,g=.3*d,v=0;function b(e){for(var t=0;t<e.length;++t)t>0&&(v+=.25),s.push({pos:v,isDashed:e[t]})}for(b(i[0]),r=0;r<e.body.length;++r){var y=e.body[r],x=f,w=g;o<y.length&&(o=y.length);var k=new Array(y.length);for(a=0;a<y.length;++a){var E=Dr(y[a],t);w<E.depth&&(w=E.depth),x<E.height&&(x=E.height),k[a]=E}var M=e.rowGaps[r],C=0;M&&(C=at(M,t))>0&&(w<(C+=g)&&(w=C),C=0),e.addJot&&(w+=p),k.height=x,k.depth=w,v+=x,k.pos=v,v+=w+C,l[r]=k,b(i[r+1])}var S,N,z=v/2+t.fontMetrics().axisHeight,T=e.cols||[],A=[],q=[];if(e.tags&&e.tags.some((e=>e)))for(r=0;r<n;++r){var L=l[r],B=L.pos-z,O=e.tags[r],H=void 0;(H=!0===O?dr.makeSpan(["eqn-num"],[],t):!1===O?dr.makeSpan([],[],t):dr.makeSpan([],Lr(O,t,!0),t)).depth=L.depth,H.height=L.height,q.push({type:"elem",elem:H,shift:B})}for(a=0,N=0;a<o||N<T.length;++a,++N){for(var I=T[N]||{},R=!0;"separator"===I.type;){if(R||((S=dr.makeSpan(["arraycolsep"],[])).style.width=nt(t.fontMetrics().doubleRuleSep),A.push(S)),"|"!==I.separator&&":"!==I.separator)throw new we("Invalid separator type: "+I.separator);var D="|"===I.separator?"solid":"dashed",F=dr.makeSpan(["vertical-separator"],[],t);F.style.height=nt(v),F.style.borderRightWidth=nt(c),F.style.borderRightStyle=D,F.style.margin="0 "+nt(-c/2);var j=v-z;j&&(F.style.verticalAlign=nt(-j)),A.push(F),I=T[++N]||{},R=!1}if(!(a>=o)){var V=void 0;(a>0||e.hskipBeforeAndAfter)&&0!==(V=Se.deflt(I.pregap,h))&&((S=dr.makeSpan(["arraycolsep"],[])).style.width=nt(V),A.push(S));var _=[];for(r=0;r<n;++r){var P=l[r],U=P[a];if(U){var Y=P.pos-z;U.depth=P.depth,U.height=P.height,_.push({type:"elem",elem:U,shift:Y})}}_=dr.makeVList({positionType:"individualShift",children:_},t),_=dr.makeSpan(["col-align-"+(I.align||"c")],[_]),A.push(_),(a<o-1||e.hskipBeforeAndAfter)&&0!==(V=Se.deflt(I.postgap,h))&&((S=dr.makeSpan(["arraycolsep"],[])).style.width=nt(V),A.push(S))}}if(l=dr.makeSpan(["mtable"],A),s.length>0){for(var G=dr.makeLineSpan("hline",t,c),Z=dr.makeLineSpan("hdashline",t,c),X=[{type:"elem",elem:l,shift:0}];s.length>0;){var W=s.pop(),$=W.pos-z;W.isDashed?X.push({type:"elem",elem:Z,shift:$}):X.push({type:"elem",elem:G,shift:$})}l=dr.makeVList({positionType:"individualShift",children:X},t)}if(0===q.length)return dr.makeSpan(["mord"],[l],t);var J=dr.makeVList({positionType:"individualShift",children:q},t);return J=dr.makeSpan(["tag"],[J],t),dr.makeFragment([l,J])},hn={c:"center ",l:"left ",r:"right "},un=function(e,t){for(var r=[],a=new Ur.MathNode("mtd",[],["mtr-glue"]),n=new Ur.MathNode("mtd",[],["mml-eqn-num"]),i=0;i<e.body.length;i++){for(var o=e.body[i],l=[],s=0;s<o.length;s++)l.push(new Ur.MathNode("mtd",[Jr(o[s],t)]));e.tags&&e.tags[i]&&(l.unshift(a),l.push(a),e.leqno?l.unshift(n):l.push(n)),r.push(new Ur.MathNode("mtr",l))}var c=new Ur.MathNode("mtable",r),m=.5===e.arraystretch?.1:.16+e.arraystretch-1+(e.addJot?.09:0);c.setAttribute("rowspacing",nt(m));var h="",u="";if(e.cols&&e.cols.length>0){var p=e.cols,d="",f=!1,g=0,v=p.length;"separator"===p[0].type&&(h+="top ",g=1),"separator"===p[p.length-1].type&&(h+="bottom ",v-=1);for(var b=g;b<v;b++)"align"===p[b].type?(u+=hn[p[b].align],f&&(d+="none "),f=!0):"separator"===p[b].type&&f&&(d+="|"===p[b].separator?"solid ":"dashed ",f=!1);c.setAttribute("columnalign",u.trim()),/[sd]/.test(d)&&c.setAttribute("columnlines",d.trim())}if("align"===e.colSeparationType){for(var y=e.cols||[],x="",w=1;w<y.length;w++)x+=w%2?"0em ":"1em ";c.setAttribute("columnspacing",x.trim())}else"alignat"===e.colSeparationType||"gather"===e.colSeparationType?c.setAttribute("columnspacing","0em"):"small"===e.colSeparationType?c.setAttribute("columnspacing","0.2778em"):"CD"===e.colSeparationType?c.setAttribute("columnspacing","0.5em"):c.setAttribute("columnspacing","1em");var k="",E=e.hLinesBeforeRow;h+=E[0].length>0?"left ":"",h+=E[E.length-1].length>0?"right ":"";for(var M=1;M<E.length-1;M++)k+=0===E[M].length?"none ":E[M][0]?"dashed ":"solid ";return/[sd]/.test(k)&&c.setAttribute("rowlines",k.trim()),""!==h&&(c=new Ur.MathNode("menclose",[c])).setAttribute("notation",h.trim()),e.arraystretch&&e.arraystretch<1&&(c=new Ur.MathNode("mstyle",[c])).setAttribute("scriptlevel","1"),c},pn=function(e,t){-1===e.envName.indexOf("ed")&&on(e);var r,a=[],n=e.envName.indexOf("at")>-1?"alignat":"align",i="split"===e.envName,o=sn(e.parser,{cols:a,addJot:!0,autoTag:i?void 0:ln(e.envName),emptySingleRow:!0,colSeparationType:n,maxNumCols:i?2:void 0,leqno:e.parser.settings.leqno},"display"),l=0,s={type:"ordgroup",mode:e.mode,body:[]};if(t[0]&&"ordgroup"===t[0].type){for(var c="",m=0;m<t[0].body.length;m++){c+=oa(t[0].body[m],"textord").text}r=Number(c),l=2*r}var h=!l;o.body.forEach((function(e){for(var t=1;t<e.length;t+=2){var a=oa(e[t],"styling");oa(a.body[0],"ordgroup").body.unshift(s)}if(h)l<e.length&&(l=e.length);else{var n=e.length/2;if(r<n)throw new we("Too many math in a row: expected "+r+", but got "+n,e[0])}}));for(var u=0;u<l;++u){var p="r",d=0;u%2==1?p="l":u>0&&h&&(d=1),a[u]={type:"align",align:p,pregap:d,postgap:0}}return o.colSeparationType=h?"align":"alignat",o};tn({type:"array",names:["array","darray"],props:{numArgs:1},handler(e,t){var r=(sa(t[0])?[t[0]]:oa(t[0],"ordgroup").body).map((function(e){var t=la(e).text;if(-1!=="lcr".indexOf(t))return{type:"align",align:t};if("|"===t)return{type:"separator",separator:"|"};if(":"===t)return{type:"separator",separator:":"};throw new we("Unknown column alignment: "+t,e)})),a={cols:r,hskipBeforeAndAfter:!0,maxNumCols:r.length};return sn(e.parser,a,cn(e.envName))},htmlBuilder:mn,mathmlBuilder:un}),tn({type:"array",names:["matrix","pmatrix","bmatrix","Bmatrix","vmatrix","Vmatrix","matrix*","pmatrix*","bmatrix*","Bmatrix*","vmatrix*","Vmatrix*"],props:{numArgs:0},handler(e){var t={matrix:null,pmatrix:["(",")"],bmatrix:["[","]"],Bmatrix:["\\{","\\}"],vmatrix:["|","|"],Vmatrix:["\\Vert","\\Vert"]}[e.envName.replace("*","")],r="c",a={hskipBeforeAndAfter:!1,cols:[{type:"align",align:r}]};if("*"===e.envName.charAt(e.envName.length-1)){var n=e.parser;if(n.consumeSpaces(),"["===n.fetch().text){if(n.consume(),n.consumeSpaces(),r=n.fetch().text,-1==="lcr".indexOf(r))throw new we("Expected l or c or r",n.nextToken);n.consume(),n.consumeSpaces(),n.expect("]"),n.consume(),a.cols=[{type:"align",align:r}]}}var i=sn(e.parser,a,cn(e.envName)),o=Math.max(0,...i.body.map((e=>e.length)));return i.cols=new Array(o).fill({type:"align",align:r}),t?{type:"leftright",mode:e.mode,body:[i],left:t[0],right:t[1],rightColor:void 0}:i},htmlBuilder:mn,mathmlBuilder:un}),tn({type:"array",names:["smallmatrix"],props:{numArgs:0},handler(e){var t=sn(e.parser,{arraystretch:.5},"script");return t.colSeparationType="small",t},htmlBuilder:mn,mathmlBuilder:un}),tn({type:"array",names:["subarray"],props:{numArgs:1},handler(e,t){var r=(sa(t[0])?[t[0]]:oa(t[0],"ordgroup").body).map((function(e){var t=la(e).text;if(-1!=="lc".indexOf(t))return{type:"align",align:t};throw new we("Unknown column alignment: "+t,e)}));if(r.length>1)throw new we("{subarray} can contain only one column");var a={cols:r,hskipBeforeAndAfter:!1,arraystretch:.5};if((a=sn(e.parser,a,"script")).body.length>0&&a.body[0].length>1)throw new we("{subarray} can contain only one column");return a},htmlBuilder:mn,mathmlBuilder:un}),tn({type:"array",names:["cases","dcases","rcases","drcases"],props:{numArgs:0},handler(e){var t=sn(e.parser,{arraystretch:1.2,cols:[{type:"align",align:"l",pregap:0,postgap:1},{type:"align",align:"l",pregap:0,postgap:0}]},cn(e.envName));return{type:"leftright",mode:e.mode,body:[t],left:e.envName.indexOf("r")>-1?".":"\\{",right:e.envName.indexOf("r")>-1?"\\}":".",rightColor:void 0}},htmlBuilder:mn,mathmlBuilder:un}),tn({type:"array",names:["align","align*","aligned","split"],props:{numArgs:0},handler:pn,htmlBuilder:mn,mathmlBuilder:un}),tn({type:"array",names:["gathered","gather","gather*"],props:{numArgs:0},handler(e){Se.contains(["gather","gather*"],e.envName)&&on(e);var t={cols:[{type:"align",align:"c"}],addJot:!0,colSeparationType:"gather",autoTag:ln(e.envName),emptySingleRow:!0,leqno:e.parser.settings.leqno};return sn(e.parser,t,"display")},htmlBuilder:mn,mathmlBuilder:un}),tn({type:"array",names:["alignat","alignat*","alignedat"],props:{numArgs:1},handler:pn,htmlBuilder:mn,mathmlBuilder:un}),tn({type:"array",names:["equation","equation*"],props:{numArgs:0},handler(e){on(e);var t={autoTag:ln(e.envName),emptySingleRow:!0,singleRow:!0,maxNumCols:1,leqno:e.parser.settings.leqno};return sn(e.parser,t,"display")},htmlBuilder:mn,mathmlBuilder:un}),tn({type:"array",names:["CD"],props:{numArgs:0},handler:e=>(on(e),function(e){var t=[];for(e.gullet.beginGroup(),e.gullet.macros.set("\\cr","\\\\\\relax"),e.gullet.beginGroup();;){t.push(e.parseExpression(!1,"\\\\")),e.gullet.endGroup(),e.gullet.beginGroup();var r=e.fetch().text;if("&"!==r&&"\\\\"!==r){if("\\end"===r){0===t[t.length-1].length&&t.pop();break}throw new we("Expected \\\\ or \\cr or \\end",e.nextToken)}e.consume()}for(var a,n,i=[],o=[i],l=0;l<t.length;l++){for(var s=t[l],c={type:"styling",body:[],mode:"math",style:"display"},m=0;m<s.length;m++)if(ba(s[m])){i.push(c);var h=la(s[m+=1]).text,u=new Array(2);if(u[0]={type:"ordgroup",mode:"math",body:[]},u[1]={type:"ordgroup",mode:"math",body:[]},"=|.".indexOf(h)>-1);else{if(!("<>AV".indexOf(h)>-1))throw new we('Expected one of "<>AV=|." after @',s[m]);for(var p=0;p<2;p++){for(var d=!0,f=m+1;f<s.length;f++){if(n=h,("mathord"===(a=s[f]).type||"atom"===a.type)&&a.text===n){d=!1,m=f;break}if(ba(s[f]))throw new we("Missing a "+h+" character to complete a CD arrow.",s[f]);u[p].body.push(s[f])}if(d)throw new we("Missing a "+h+" character to complete a CD arrow.",s[m])}}var g={type:"styling",body:[ya(h,u,e)],mode:"math",style:"display"};i.push(g),c={type:"styling",body:[],mode:"math",style:"display"}}else c.body.push(s[m]);l%2==0?i.push(c):i.shift(),i=[],o.push(i)}return e.gullet.endGroup(),e.gullet.endGroup(),{type:"array",mode:"math",body:o,arraystretch:1,addJot:!0,rowGaps:[null],cols:new Array(o[0].length).fill({type:"align",align:"c",pregap:.25,postgap:.25}),colSeparationType:"CD",hLinesBeforeRow:new Array(o.length+1).fill([])}}(e.parser)),htmlBuilder:mn,mathmlBuilder:un}),an("\\nonumber","\\gdef\\@eqnsw{0}"),an("\\notag","\\nonumber"),Er({type:"text",names:["\\hline","\\hdashline"],props:{numArgs:0,allowedInText:!0,allowedInMath:!0},handler(e,t){throw new we(e.funcName+" valid only within array environment")}});var dn=en;Er({type:"environment",names:["\\begin","\\end"],props:{numArgs:1,argTypes:["text"]},handler(e,t){var{parser:r,funcName:a}=e,n=t[0];if("ordgroup"!==n.type)throw new we("Invalid environment name",n);for(var i="",o=0;o<n.body.length;++o)i+=oa(n.body[o],"textord").text;if("\\begin"===a){if(!dn.hasOwnProperty(i))throw new we("No such environment: "+i,n);var l=dn[i],{args:s,optArgs:c}=r.parseArguments("\\begin{"+i+"}",l),m={mode:r.mode,envName:i,parser:r},h=l.handler(m,s,c);r.expect("\\end",!1);var u=r.nextToken,p=oa(r.parseFunction(),"environment");if(p.name!==i)throw new we("Mismatch: \\begin{"+i+"} matched by \\end{"+p.name+"}",u);return h}return{type:"environment",mode:r.mode,name:i,nameGroup:n}}});var fn=(e,t)=>{var r=e.font,a=t.withFont(r);return Dr(e.body,a)},gn=(e,t)=>{var r=e.font,a=t.withFont(r);return Jr(e.body,a)},vn={"\\Bbb":"\\mathbb","\\bold":"\\mathbf","\\frak":"\\mathfrak","\\bm":"\\boldsymbol"};Er({type:"font",names:["\\mathrm","\\mathit","\\mathbf","\\mathnormal","\\mathsfit","\\mathbb","\\mathcal","\\mathfrak","\\mathscr","\\mathsf","\\mathtt","\\Bbb","\\bold","\\frak"],props:{numArgs:1,allowedInArgument:!0},handler:(e,t)=>{var{parser:r,funcName:a}=e,n=Cr(t[0]),i=a;return i in vn&&(i=vn[i]),{type:"font",mode:r.mode,font:i.slice(1),body:n}},htmlBuilder:fn,mathmlBuilder:gn}),Er({type:"mclass",names:["\\boldsymbol","\\bm"],props:{numArgs:1},handler:(e,t)=>{var{parser:r}=e,a=t[0],n=Se.isCharacterBox(a);return{type:"mclass",mode:r.mode,mclass:ga(a),body:[{type:"font",mode:r.mode,font:"boldsymbol",body:a}],isCharacterBox:n}}}),Er({type:"font",names:["\\rm","\\sf","\\tt","\\bf","\\it","\\cal"],props:{numArgs:0,allowedInText:!0},handler:(e,t)=>{var{parser:r,funcName:a,breakOnTokenText:n}=e,{mode:i}=r,o=r.parseExpression(!0,n);return{type:"font",mode:i,font:"math"+a.slice(1),body:{type:"ordgroup",mode:r.mode,body:o}}},htmlBuilder:fn,mathmlBuilder:gn});var bn=(e,t)=>{var r=t;return"display"===e?r=r.id>=De.SCRIPT.id?r.text():De.DISPLAY:"text"===e&&r.size===De.DISPLAY.size?r=De.TEXT:"script"===e?r=De.SCRIPT:"scriptscript"===e&&(r=De.SCRIPTSCRIPT),r},yn=(e,t)=>{var r,a=bn(e.size,t.style),n=a.fracNum(),i=a.fracDen();r=t.havingStyle(n);var o=Dr(e.numer,r,t);if(e.continued){var l=8.5/t.fontMetrics().ptPerEm,s=3.5/t.fontMetrics().ptPerEm;o.height=o.height<l?l:o.height,o.depth=o.depth<s?s:o.depth}r=t.havingStyle(i);var c,m,h,u,p,d,f,g,v,b,y=Dr(e.denom,r,t);if(e.hasBarLine?(e.barSize?(m=at(e.barSize,t),c=dr.makeLineSpan("frac-line",t,m)):c=dr.makeLineSpan("frac-line",t),m=c.height,h=c.height):(c=null,m=0,h=t.fontMetrics().defaultRuleThickness),a.size===De.DISPLAY.size||"display"===e.size?(u=t.fontMetrics().num1,p=m>0?3*h:7*h,d=t.fontMetrics().denom1):(m>0?(u=t.fontMetrics().num2,p=h):(u=t.fontMetrics().num3,p=3*h),d=t.fontMetrics().denom2),c){var x=t.fontMetrics().axisHeight;u-o.depth-(x+.5*m)<p&&(u+=p-(u-o.depth-(x+.5*m))),x-.5*m-(y.height-d)<p&&(d+=p-(x-.5*m-(y.height-d)));var w=-(x-.5*m);f=dr.makeVList({positionType:"individualShift",children:[{type:"elem",elem:y,shift:d},{type:"elem",elem:c,shift:w},{type:"elem",elem:o,shift:-u}]},t)}else{var k=u-o.depth-(y.height-d);k<p&&(u+=.5*(p-k),d+=.5*(p-k)),f=dr.makeVList({positionType:"individualShift",children:[{type:"elem",elem:y,shift:d},{type:"elem",elem:o,shift:-u}]},t)}return r=t.havingStyle(a),f.height*=r.sizeMultiplier/t.sizeMultiplier,f.depth*=r.sizeMultiplier/t.sizeMultiplier,g=a.size===De.DISPLAY.size?t.fontMetrics().delim1:a.size===De.SCRIPTSCRIPT.size?t.havingStyle(De.SCRIPT).fontMetrics().delim2:t.fontMetrics().delim2,v=null==e.leftDelim?Rr(t,["mopen"]):Za.customSizedDelim(e.leftDelim,g,!0,t.havingStyle(a),e.mode,["mopen"]),b=e.continued?dr.makeSpan([]):null==e.rightDelim?Rr(t,["mclose"]):Za.customSizedDelim(e.rightDelim,g,!0,t.havingStyle(a),e.mode,["mclose"]),dr.makeSpan(["mord"].concat(r.sizingClasses(t)),[v,dr.makeSpan(["mfrac"],[f]),b],t)},xn=(e,t)=>{var r=new Ur.MathNode("mfrac",[Jr(e.numer,t),Jr(e.denom,t)]);if(e.hasBarLine){if(e.barSize){var a=at(e.barSize,t);r.setAttribute("linethickness",nt(a))}}else r.setAttribute("linethickness","0px");var n=bn(e.size,t.style);if(n.size!==t.style.size){r=new Ur.MathNode("mstyle",[r]);var i=n.size===De.DISPLAY.size?"true":"false";r.setAttribute("displaystyle",i),r.setAttribute("scriptlevel","0")}if(null!=e.leftDelim||null!=e.rightDelim){var o=[];if(null!=e.leftDelim){var l=new Ur.MathNode("mo",[new Ur.TextNode(e.leftDelim.replace("\\",""))]);l.setAttribute("fence","true"),o.push(l)}if(o.push(r),null!=e.rightDelim){var s=new Ur.MathNode("mo",[new Ur.TextNode(e.rightDelim.replace("\\",""))]);s.setAttribute("fence","true"),o.push(s)}return Gr(o)}return r};Er({type:"genfrac",names:["\\dfrac","\\frac","\\tfrac","\\dbinom","\\binom","\\tbinom","\\\\atopfrac","\\\\bracefrac","\\\\brackfrac"],props:{numArgs:2,allowedInArgument:!0},handler:(e,t)=>{var r,{parser:a,funcName:n}=e,i=t[0],o=t[1],l=null,s=null,c="auto";switch(n){case"\\dfrac":case"\\frac":case"\\tfrac":r=!0;break;case"\\\\atopfrac":r=!1;break;case"\\dbinom":case"\\binom":case"\\tbinom":r=!1,l="(",s=")";break;case"\\\\bracefrac":r=!1,l="\\{",s="\\}";break;case"\\\\brackfrac":r=!1,l="[",s="]";break;default:throw new Error("Unrecognized genfrac command")}switch(n){case"\\dfrac":case"\\dbinom":c="display";break;case"\\tfrac":case"\\tbinom":c="text"}return{type:"genfrac",mode:a.mode,continued:!1,numer:i,denom:o,hasBarLine:r,leftDelim:l,rightDelim:s,size:c,barSize:null}},htmlBuilder:yn,mathmlBuilder:xn}),Er({type:"genfrac",names:["\\cfrac"],props:{numArgs:2},handler:(e,t)=>{var{parser:r,funcName:a}=e,n=t[0],i=t[1];return{type:"genfrac",mode:r.mode,continued:!0,numer:n,denom:i,hasBarLine:!0,leftDelim:null,rightDelim:null,size:"display",barSize:null}}}),Er({type:"infix",names:["\\over","\\choose","\\atop","\\brace","\\brack"],props:{numArgs:0,infix:!0},handler(e){var t,{parser:r,funcName:a,token:n}=e;switch(a){case"\\over":t="\\frac";break;case"\\choose":t="\\binom";break;case"\\atop":t="\\\\atopfrac";break;case"\\brace":t="\\\\bracefrac";break;case"\\brack":t="\\\\brackfrac";break;default:throw new Error("Unrecognized infix genfrac command")}return{type:"infix",mode:r.mode,replaceWith:t,token:n}}});var wn=["display","text","script","scriptscript"],kn=function(e){var t=null;return e.length>0&&(t="."===(t=e)?null:t),t};Er({type:"genfrac",names:["\\genfrac"],props:{numArgs:6,allowedInArgument:!0,argTypes:["math","math","size","text","math","math"]},handler(e,t){var r,{parser:a}=e,n=t[4],i=t[5],o=Cr(t[0]),l="atom"===o.type&&"open"===o.family?kn(o.text):null,s=Cr(t[1]),c="atom"===s.type&&"close"===s.family?kn(s.text):null,m=oa(t[2],"size"),h=null;r=!!m.isBlank||(h=m.value).number>0;var u="auto",p=t[3];if("ordgroup"===p.type){if(p.body.length>0){var d=oa(p.body[0],"textord");u=wn[Number(d.text)]}}else p=oa(p,"textord"),u=wn[Number(p.text)];return{type:"genfrac",mode:a.mode,numer:n,denom:i,continued:!1,hasBarLine:r,barSize:h,leftDelim:l,rightDelim:c,size:u}},htmlBuilder:yn,mathmlBuilder:xn}),Er({type:"infix",names:["\\above"],props:{numArgs:1,argTypes:["size"],infix:!0},handler(e,t){var{parser:r,funcName:a,token:n}=e;return{type:"infix",mode:r.mode,replaceWith:"\\\\abovefrac",size:oa(t[0],"size").value,token:n}}}),Er({type:"genfrac",names:["\\\\abovefrac"],props:{numArgs:3,argTypes:["math","size","math"]},handler:(e,t)=>{var{parser:r,funcName:a}=e,n=t[0],i=function(e){if(!e)throw new Error("Expected non-null, but got "+String(e));return e}(oa(t[1],"infix").size),o=t[2],l=i.number>0;return{type:"genfrac",mode:r.mode,numer:n,denom:o,continued:!1,hasBarLine:l,barSize:i,leftDelim:null,rightDelim:null,size:"auto"}},htmlBuilder:yn,mathmlBuilder:xn});var En=(e,t)=>{var r,a,n=t.style;"supsub"===e.type?(r=e.sup?Dr(e.sup,t.havingStyle(n.sup()),t):Dr(e.sub,t.havingStyle(n.sub()),t),a=oa(e.base,"horizBrace")):a=oa(e,"horizBrace");var i,o=Dr(a.base,t.havingBaseStyle(De.DISPLAY)),l=ia(a,t);if(a.isOver?(i=dr.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:o},{type:"kern",size:.1},{type:"elem",elem:l}]},t)).children[0].children[0].children[1].classes.push("svg-align"):(i=dr.makeVList({positionType:"bottom",positionData:o.depth+.1+l.height,children:[{type:"elem",elem:l},{type:"kern",size:.1},{type:"elem",elem:o}]},t)).children[0].children[0].children[0].classes.push("svg-align"),r){var s=dr.makeSpan(["mord",a.isOver?"mover":"munder"],[i],t);i=a.isOver?dr.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:s},{type:"kern",size:.2},{type:"elem",elem:r}]},t):dr.makeVList({positionType:"bottom",positionData:s.depth+.2+r.height+r.depth,children:[{type:"elem",elem:r},{type:"kern",size:.2},{type:"elem",elem:s}]},t)}return dr.makeSpan(["mord",a.isOver?"mover":"munder"],[i],t)};Er({type:"horizBrace",names:["\\overbrace","\\underbrace"],props:{numArgs:1},handler(e,t){var{parser:r,funcName:a}=e;return{type:"horizBrace",mode:r.mode,label:a,isOver:/^\\over/.test(a),base:t[0]}},htmlBuilder:En,mathmlBuilder:(e,t)=>{var r=na(e.label);return new Ur.MathNode(e.isOver?"mover":"munder",[Jr(e.base,t),r])}}),Er({type:"href",names:["\\href"],props:{numArgs:2,argTypes:["url","original"],allowedInText:!0},handler:(e,t)=>{var{parser:r}=e,a=t[1],n=oa(t[0],"url").url;return r.settings.isTrusted({command:"\\href",url:n})?{type:"href",mode:r.mode,href:n,body:Sr(a)}:r.formatUnsupportedCmd("\\href")},htmlBuilder:(e,t)=>{var r=Lr(e.body,t,!1);return dr.makeAnchor(e.href,[],r,t)},mathmlBuilder:(e,t)=>{var r=$r(e.body,t);return r instanceof _r||(r=new _r("mrow",[r])),r.setAttribute("href",e.href),r}}),Er({type:"href",names:["\\url"],props:{numArgs:1,argTypes:["url"],allowedInText:!0},handler:(e,t)=>{var{parser:r}=e,a=oa(t[0],"url").url;if(!r.settings.isTrusted({command:"\\url",url:a}))return r.formatUnsupportedCmd("\\url");for(var n=[],i=0;i<a.length;i++){var o=a[i];"~"===o&&(o="\\textasciitilde"),n.push({type:"textord",mode:"text",text:o})}var l={type:"text",mode:r.mode,font:"\\texttt",body:n};return{type:"href",mode:r.mode,href:a,body:Sr(l)}}}),Er({type:"hbox",names:["\\hbox"],props:{numArgs:1,argTypes:["text"],allowedInText:!0,primitive:!0},handler(e,t){var{parser:r}=e;return{type:"hbox",mode:r.mode,body:Sr(t[0])}},htmlBuilder(e,t){var r=Lr(e.body,t,!1);return dr.makeFragment(r)},mathmlBuilder:(e,t)=>new Ur.MathNode("mrow",Wr(e.body,t))}),Er({type:"html",names:["\\htmlClass","\\htmlId","\\htmlStyle","\\htmlData"],props:{numArgs:2,argTypes:["raw","original"],allowedInText:!0},handler:(e,t)=>{var r,{parser:a,funcName:n,token:i}=e,o=oa(t[0],"raw").string,l=t[1];a.settings.strict&&a.settings.reportNonstrict("htmlExtension","HTML extension is disabled on strict mode");var s={};switch(n){case"\\htmlClass":s.class=o,r={command:"\\htmlClass",class:o};break;case"\\htmlId":s.id=o,r={command:"\\htmlId",id:o};break;case"\\htmlStyle":s.style=o,r={command:"\\htmlStyle",style:o};break;case"\\htmlData":for(var c=o.split(","),m=0;m<c.length;m++){var h=c[m].split("=");if(2!==h.length)throw new we("Error parsing key-value for \\htmlData");s["data-"+h[0].trim()]=h[1].trim()}r={command:"\\htmlData",attributes:s};break;default:throw new Error("Unrecognized html command")}return a.settings.isTrusted(r)?{type:"html",mode:a.mode,attributes:s,body:Sr(l)}:a.formatUnsupportedCmd(n)},htmlBuilder:(e,t)=>{var r=Lr(e.body,t,!1),a=["enclosing"];e.attributes.class&&a.push(...e.attributes.class.trim().split(/\s+/));var n=dr.makeSpan(a,r,t);for(var i in e.attributes)"class"!==i&&e.attributes.hasOwnProperty(i)&&n.setAttribute(i,e.attributes[i]);return n},mathmlBuilder:(e,t)=>$r(e.body,t)}),Er({type:"htmlmathml",names:["\\html@mathml"],props:{numArgs:2,allowedInText:!0},handler:(e,t)=>{var{parser:r}=e;return{type:"htmlmathml",mode:r.mode,html:Sr(t[0]),mathml:Sr(t[1])}},htmlBuilder:(e,t)=>{var r=Lr(e.html,t,!1);return dr.makeFragment(r)},mathmlBuilder:(e,t)=>$r(e.mathml,t)});var Mn=function(e){if(/^[-+]? *(\d+(\.\d*)?|\.\d+)$/.test(e))return{number:+e,unit:"bp"};var t=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(e);if(!t)throw new we("Invalid size: '"+e+"' in \\includegraphics");var r={number:+(t[1]+t[2]),unit:t[3]};if(!rt(r))throw new we("Invalid unit: '"+r.unit+"' in \\includegraphics.");return r};Er({type:"includegraphics",names:["\\includegraphics"],props:{numArgs:1,numOptionalArgs:1,argTypes:["raw","url"],allowedInText:!1},handler:(e,t,r)=>{var{parser:a}=e,n={number:0,unit:"em"},i={number:.9,unit:"em"},o={number:0,unit:"em"},l="";if(r[0])for(var s=oa(r[0],"raw").string.split(","),c=0;c<s.length;c++){var m=s[c].split("=");if(2===m.length){var h=m[1].trim();switch(m[0].trim()){case"alt":l=h;break;case"width":n=Mn(h);break;case"height":i=Mn(h);break;case"totalheight":o=Mn(h);break;default:throw new we("Invalid key: '"+m[0]+"' in \\includegraphics.")}}}var u=oa(t[0],"url").url;return""===l&&(l=(l=(l=u).replace(/^.*[\\/]/,"")).substring(0,l.lastIndexOf("."))),a.settings.isTrusted({command:"\\includegraphics",url:u})?{type:"includegraphics",mode:a.mode,alt:l,width:n,height:i,totalheight:o,src:u}:a.formatUnsupportedCmd("\\includegraphics")},htmlBuilder:(e,t)=>{var r=at(e.height,t),a=0;e.totalheight.number>0&&(a=at(e.totalheight,t)-r);var n=0;e.width.number>0&&(n=at(e.width,t));var i={height:nt(r+a)};n>0&&(i.width=nt(n)),a>0&&(i.verticalAlign=nt(-a));var o=new ut(e.src,e.alt,i);return o.height=r,o.depth=a,o},mathmlBuilder:(e,t)=>{var r=new Ur.MathNode("mglyph",[]);r.setAttribute("alt",e.alt);var a=at(e.height,t),n=0;if(e.totalheight.number>0&&(n=at(e.totalheight,t)-a,r.setAttribute("valign",nt(-n))),r.setAttribute("height",nt(a+n)),e.width.number>0){var i=at(e.width,t);r.setAttribute("width",nt(i))}return r.setAttribute("src",e.src),r}}),Er({type:"kern",names:["\\kern","\\mkern","\\hskip","\\mskip"],props:{numArgs:1,argTypes:["size"],primitive:!0,allowedInText:!0},handler(e,t){var{parser:r,funcName:a}=e,n=oa(t[0],"size");if(r.settings.strict){var i="m"===a[1],o="mu"===n.value.unit;i?(o||r.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+a+" supports only mu units, not "+n.value.unit+" units"),"math"!==r.mode&&r.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+a+" works only in math mode")):o&&r.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+a+" doesn't support mu units")}return{type:"kern",mode:r.mode,dimension:n.value}},htmlBuilder:(e,t)=>dr.makeGlue(e.dimension,t),mathmlBuilder(e,t){var r=at(e.dimension,t);return new Ur.SpaceNode(r)}}),Er({type:"lap",names:["\\mathllap","\\mathrlap","\\mathclap"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:r,funcName:a}=e,n=t[0];return{type:"lap",mode:r.mode,alignment:a.slice(5),body:n}},htmlBuilder:(e,t)=>{var r;"clap"===e.alignment?(r=dr.makeSpan([],[Dr(e.body,t)]),r=dr.makeSpan(["inner"],[r],t)):r=dr.makeSpan(["inner"],[Dr(e.body,t)]);var a=dr.makeSpan(["fix"],[]),n=dr.makeSpan([e.alignment],[r,a],t),i=dr.makeSpan(["strut"]);return i.style.height=nt(n.height+n.depth),n.depth&&(i.style.verticalAlign=nt(-n.depth)),n.children.unshift(i),n=dr.makeSpan(["thinbox"],[n],t),dr.makeSpan(["mord","vbox"],[n],t)},mathmlBuilder:(e,t)=>{var r=new Ur.MathNode("mpadded",[Jr(e.body,t)]);if("rlap"!==e.alignment){var a="llap"===e.alignment?"-1":"-0.5";r.setAttribute("lspace",a+"width")}return r.setAttribute("width","0px"),r}}),Er({type:"styling",names:["\\(","$"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(e,t){var{funcName:r,parser:a}=e,n=a.mode;a.switchMode("math");var i="\\("===r?"\\)":"$",o=a.parseExpression(!1,i);return a.expect(i),a.switchMode(n),{type:"styling",mode:a.mode,style:"text",body:o}}}),Er({type:"text",names:["\\)","\\]"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(e,t){throw new we("Mismatched "+e.funcName)}});var Cn=(e,t)=>{switch(t.style.size){case De.DISPLAY.size:return e.display;case De.TEXT.size:return e.text;case De.SCRIPT.size:return e.script;case De.SCRIPTSCRIPT.size:return e.scriptscript;default:return e.text}};Er({type:"mathchoice",names:["\\mathchoice"],props:{numArgs:4,primitive:!0},handler:(e,t)=>{var{parser:r}=e;return{type:"mathchoice",mode:r.mode,display:Sr(t[0]),text:Sr(t[1]),script:Sr(t[2]),scriptscript:Sr(t[3])}},htmlBuilder:(e,t)=>{var r=Cn(e,t),a=Lr(r,t,!1);return dr.makeFragment(a)},mathmlBuilder:(e,t)=>{var r=Cn(e,t);return $r(r,t)}});var Sn=(e,t,r,a,n,i,o)=>{e=dr.makeSpan([],[e]);var l,s,c,m=r&&Se.isCharacterBox(r);if(t){var h=Dr(t,a.havingStyle(n.sup()),a);s={elem:h,kern:Math.max(a.fontMetrics().bigOpSpacing1,a.fontMetrics().bigOpSpacing3-h.depth)}}if(r){var u=Dr(r,a.havingStyle(n.sub()),a);l={elem:u,kern:Math.max(a.fontMetrics().bigOpSpacing2,a.fontMetrics().bigOpSpacing4-u.height)}}if(s&&l){var p=a.fontMetrics().bigOpSpacing5+l.elem.height+l.elem.depth+l.kern+e.depth+o;c=dr.makeVList({positionType:"bottom",positionData:p,children:[{type:"kern",size:a.fontMetrics().bigOpSpacing5},{type:"elem",elem:l.elem,marginLeft:nt(-i)},{type:"kern",size:l.kern},{type:"elem",elem:e},{type:"kern",size:s.kern},{type:"elem",elem:s.elem,marginLeft:nt(i)},{type:"kern",size:a.fontMetrics().bigOpSpacing5}]},a)}else if(l){var d=e.height-o;c=dr.makeVList({positionType:"top",positionData:d,children:[{type:"kern",size:a.fontMetrics().bigOpSpacing5},{type:"elem",elem:l.elem,marginLeft:nt(-i)},{type:"kern",size:l.kern},{type:"elem",elem:e}]},a)}else{if(!s)return e;var f=e.depth+o;c=dr.makeVList({positionType:"bottom",positionData:f,children:[{type:"elem",elem:e},{type:"kern",size:s.kern},{type:"elem",elem:s.elem,marginLeft:nt(i)},{type:"kern",size:a.fontMetrics().bigOpSpacing5}]},a)}var g=[c];if(l&&0!==i&&!m){var v=dr.makeSpan(["mspace"],[],a);v.style.marginRight=nt(i),g.unshift(v)}return dr.makeSpan(["mop","op-limits"],g,a)},Nn=["\\smallint"],zn=(e,t)=>{var r,a,n,i=!1;"supsub"===e.type?(r=e.sup,a=e.sub,n=oa(e.base,"op"),i=!0):n=oa(e,"op");var o,l=t.style,s=!1;if(l.size===De.DISPLAY.size&&n.symbol&&!Se.contains(Nn,n.name)&&(s=!0),n.symbol){var c=s?"Size2-Regular":"Size1-Regular",m="";if("\\oiint"!==n.name&&"\\oiiint"!==n.name||(m=n.name.slice(1),n.name="oiint"===m?"\\iint":"\\iiint"),o=dr.makeSymbol(n.name,c,"math",t,["mop","op-symbol",s?"large-op":"small-op"]),m.length>0){var h=o.italic,u=dr.staticSvg(m+"Size"+(s?"2":"1"),t);o=dr.makeVList({positionType:"individualShift",children:[{type:"elem",elem:o,shift:0},{type:"elem",elem:u,shift:s?.08:0}]},t),n.name="\\"+m,o.classes.unshift("mop"),o.italic=h}}else if(n.body){var p=Lr(n.body,t,!0);1===p.length&&p[0]instanceof dt?(o=p[0]).classes[0]="mop":o=dr.makeSpan(["mop"],p,t)}else{for(var d=[],f=1;f<n.name.length;f++)d.push(dr.mathsym(n.name[f],n.mode,t));o=dr.makeSpan(["mop"],d,t)}var g=0,v=0;return(o instanceof dt||"\\oiint"===n.name||"\\oiiint"===n.name)&&!n.suppressBaseShift&&(g=(o.height-o.depth)/2-t.fontMetrics().axisHeight,v=o.italic),i?Sn(o,r,a,t,l,v,g):(g&&(o.style.position="relative",o.style.top=nt(g)),o)},Tn=(e,t)=>{var r;if(e.symbol)r=new _r("mo",[Yr(e.name,e.mode)]),Se.contains(Nn,e.name)&&r.setAttribute("largeop","false");else if(e.body)r=new _r("mo",Wr(e.body,t));else{r=new _r("mi",[new Pr(e.name.slice(1))]);var a=new _r("mo",[Yr("","text")]);r=e.parentIsSupSub?new _r("mrow",[r,a]):Vr([r,a])}return r},An={"∏":"\\prod","∐":"\\coprod","∑":"\\sum","⋀":"\\bigwedge","⋁":"\\bigvee","⋂":"\\bigcap","⋃":"\\bigcup","⨀":"\\bigodot","⨁":"\\bigoplus","⨂":"\\bigotimes","⨄":"\\biguplus","⨆":"\\bigsqcup"};Er({type:"op",names:["\\coprod","\\bigvee","\\bigwedge","\\biguplus","\\bigcap","\\bigcup","\\intop","\\prod","\\sum","\\bigotimes","\\bigoplus","\\bigodot","\\bigsqcup","\\smallint","∏","∐","∑","⋀","⋁","⋂","⋃","⨀","⨁","⨂","⨄","⨆"],props:{numArgs:0},handler:(e,t)=>{var{parser:r,funcName:a}=e,n=a;return 1===n.length&&(n=An[n]),{type:"op",mode:r.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:n}},htmlBuilder:zn,mathmlBuilder:Tn}),Er({type:"op",names:["\\mathop"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var{parser:r}=e,a=t[0];return{type:"op",mode:r.mode,limits:!1,parentIsSupSub:!1,symbol:!1,body:Sr(a)}},htmlBuilder:zn,mathmlBuilder:Tn});var qn={"∫":"\\int","∬":"\\iint","∭":"\\iiint","∮":"\\oint","∯":"\\oiint","∰":"\\oiiint"};Er({type:"op",names:["\\arcsin","\\arccos","\\arctan","\\arctg","\\arcctg","\\arg","\\ch","\\cos","\\cosec","\\cosh","\\cot","\\cotg","\\coth","\\csc","\\ctg","\\cth","\\deg","\\dim","\\exp","\\hom","\\ker","\\lg","\\ln","\\log","\\sec","\\sin","\\sinh","\\sh","\\tan","\\tanh","\\tg","\\th"],props:{numArgs:0},handler(e){var{parser:t,funcName:r}=e;return{type:"op",mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!1,name:r}},htmlBuilder:zn,mathmlBuilder:Tn}),Er({type:"op",names:["\\det","\\gcd","\\inf","\\lim","\\max","\\min","\\Pr","\\sup"],props:{numArgs:0},handler(e){var{parser:t,funcName:r}=e;return{type:"op",mode:t.mode,limits:!0,parentIsSupSub:!1,symbol:!1,name:r}},htmlBuilder:zn,mathmlBuilder:Tn}),Er({type:"op",names:["\\int","\\iint","\\iiint","\\oint","\\oiint","\\oiiint","∫","∬","∭","∮","∯","∰"],props:{numArgs:0},handler(e){var{parser:t,funcName:r}=e,a=r;return 1===a.length&&(a=qn[a]),{type:"op",mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:a}},htmlBuilder:zn,mathmlBuilder:Tn});var Ln=(e,t)=>{var r,a,n,i,o=!1;if("supsub"===e.type?(r=e.sup,a=e.sub,n=oa(e.base,"operatorname"),o=!0):n=oa(e,"operatorname"),n.body.length>0){for(var l=n.body.map((e=>{var t=e.text;return"string"==typeof t?{type:"textord",mode:e.mode,text:t}:e})),s=Lr(l,t.withFont("mathrm"),!0),c=0;c<s.length;c++){var m=s[c];m instanceof dt&&(m.text=m.text.replace(/\u2212/,"-").replace(/\u2217/,"*"))}i=dr.makeSpan(["mop"],s,t)}else i=dr.makeSpan(["mop"],[],t);return o?Sn(i,r,a,t,t.style,0,0):i};function Bn(e,t,r){for(var a=Lr(e,t,!1),n=t.sizeMultiplier/r.sizeMultiplier,i=0;i<a.length;i++){var o=a[i].classes.indexOf("sizing");o<0?Array.prototype.push.apply(a[i].classes,t.sizingClasses(r)):a[i].classes[o+1]==="reset-size"+t.size&&(a[i].classes[o+1]="reset-size"+r.size),a[i].height*=n,a[i].depth*=n}return dr.makeFragment(a)}Er({type:"operatorname",names:["\\operatorname@","\\operatornamewithlimits"],props:{numArgs:1},handler:(e,t)=>{var{parser:r,funcName:a}=e,n=t[0];return{type:"operatorname",mode:r.mode,body:Sr(n),alwaysHandleSupSub:"\\operatornamewithlimits"===a,limits:!1,parentIsSupSub:!1}},htmlBuilder:Ln,mathmlBuilder:(e,t)=>{for(var r=Wr(e.body,t.withFont("mathrm")),a=!0,n=0;n<r.length;n++){var i=r[n];if(i instanceof Ur.SpaceNode);else if(i instanceof Ur.MathNode)switch(i.type){case"mi":case"mn":case"ms":case"mspace":case"mtext":break;case"mo":var o=i.children[0];1===i.children.length&&o instanceof Ur.TextNode?o.text=o.text.replace(/\u2212/,"-").replace(/\u2217/,"*"):a=!1;break;default:a=!1}else a=!1}if(a){var l=r.map((e=>e.toText())).join("");r=[new Ur.TextNode(l)]}var s=new Ur.MathNode("mi",r);s.setAttribute("mathvariant","normal");var c=new Ur.MathNode("mo",[Yr("","text")]);return e.parentIsSupSub?new Ur.MathNode("mrow",[s,c]):Ur.newDocumentFragment([s,c])}}),an("\\operatorname","\\@ifstar\\operatornamewithlimits\\operatorname@"),Mr({type:"ordgroup",htmlBuilder:(e,t)=>e.semisimple?dr.makeFragment(Lr(e.body,t,!1)):dr.makeSpan(["mord"],Lr(e.body,t,!0),t),mathmlBuilder:(e,t)=>$r(e.body,t,!0)}),Er({type:"overline",names:["\\overline"],props:{numArgs:1},handler(e,t){var{parser:r}=e,a=t[0];return{type:"overline",mode:r.mode,body:a}},htmlBuilder(e,t){var r=Dr(e.body,t.havingCrampedStyle()),a=dr.makeLineSpan("overline-line",t),n=t.fontMetrics().defaultRuleThickness,i=dr.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:r},{type:"kern",size:3*n},{type:"elem",elem:a},{type:"kern",size:n}]},t);return dr.makeSpan(["mord","overline"],[i],t)},mathmlBuilder(e,t){var r=new Ur.MathNode("mo",[new Ur.TextNode("‾")]);r.setAttribute("stretchy","true");var a=new Ur.MathNode("mover",[Jr(e.body,t),r]);return a.setAttribute("accent","true"),a}}),Er({type:"phantom",names:["\\phantom"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:r}=e,a=t[0];return{type:"phantom",mode:r.mode,body:Sr(a)}},htmlBuilder:(e,t)=>{var r=Lr(e.body,t.withPhantom(),!1);return dr.makeFragment(r)},mathmlBuilder:(e,t)=>{var r=Wr(e.body,t);return new Ur.MathNode("mphantom",r)}}),Er({type:"hphantom",names:["\\hphantom"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:r}=e,a=t[0];return{type:"hphantom",mode:r.mode,body:a}},htmlBuilder:(e,t)=>{var r=dr.makeSpan([],[Dr(e.body,t.withPhantom())]);if(r.height=0,r.depth=0,r.children)for(var a=0;a<r.children.length;a++)r.children[a].height=0,r.children[a].depth=0;return r=dr.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:r}]},t),dr.makeSpan(["mord"],[r],t)},mathmlBuilder:(e,t)=>{var r=Wr(Sr(e.body),t),a=new Ur.MathNode("mphantom",r),n=new Ur.MathNode("mpadded",[a]);return n.setAttribute("height","0px"),n.setAttribute("depth","0px"),n}}),Er({type:"vphantom",names:["\\vphantom"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:r}=e,a=t[0];return{type:"vphantom",mode:r.mode,body:a}},htmlBuilder:(e,t)=>{var r=dr.makeSpan(["inner"],[Dr(e.body,t.withPhantom())]),a=dr.makeSpan(["fix"],[]);return dr.makeSpan(["mord","rlap"],[r,a],t)},mathmlBuilder:(e,t)=>{var r=Wr(Sr(e.body),t),a=new Ur.MathNode("mphantom",r),n=new Ur.MathNode("mpadded",[a]);return n.setAttribute("width","0px"),n}}),Er({type:"raisebox",names:["\\raisebox"],props:{numArgs:2,argTypes:["size","hbox"],allowedInText:!0},handler(e,t){var{parser:r}=e,a=oa(t[0],"size").value,n=t[1];return{type:"raisebox",mode:r.mode,dy:a,body:n}},htmlBuilder(e,t){var r=Dr(e.body,t),a=at(e.dy,t);return dr.makeVList({positionType:"shift",positionData:-a,children:[{type:"elem",elem:r}]},t)},mathmlBuilder(e,t){var r=new Ur.MathNode("mpadded",[Jr(e.body,t)]),a=e.dy.number+e.dy.unit;return r.setAttribute("voffset",a),r}}),Er({type:"internal",names:["\\relax"],props:{numArgs:0,allowedInText:!0,allowedInArgument:!0},handler(e){var{parser:t}=e;return{type:"internal",mode:t.mode}}}),Er({type:"rule",names:["\\rule"],props:{numArgs:2,numOptionalArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["size","size","size"]},handler(e,t,r){var{parser:a}=e,n=r[0],i=oa(t[0],"size"),o=oa(t[1],"size");return{type:"rule",mode:a.mode,shift:n&&oa(n,"size").value,width:i.value,height:o.value}},htmlBuilder(e,t){var r=dr.makeSpan(["mord","rule"],[],t),a=at(e.width,t),n=at(e.height,t),i=e.shift?at(e.shift,t):0;return r.style.borderRightWidth=nt(a),r.style.borderTopWidth=nt(n),r.style.bottom=nt(i),r.width=a,r.height=n+i,r.depth=-i,r.maxFontSize=1.125*n*t.sizeMultiplier,r},mathmlBuilder(e,t){var r=at(e.width,t),a=at(e.height,t),n=e.shift?at(e.shift,t):0,i=t.color&&t.getColor()||"black",o=new Ur.MathNode("mspace");o.setAttribute("mathbackground",i),o.setAttribute("width",nt(r)),o.setAttribute("height",nt(a));var l=new Ur.MathNode("mpadded",[o]);return n>=0?l.setAttribute("height",nt(n)):(l.setAttribute("height",nt(n)),l.setAttribute("depth",nt(-n))),l.setAttribute("voffset",nt(n)),l}});var On=["\\tiny","\\sixptsize","\\scriptsize","\\footnotesize","\\small","\\normalsize","\\large","\\Large","\\LARGE","\\huge","\\Huge"];Er({type:"sizing",names:On,props:{numArgs:0,allowedInText:!0},handler:(e,t)=>{var{breakOnTokenText:r,funcName:a,parser:n}=e,i=n.parseExpression(!1,r);return{type:"sizing",mode:n.mode,size:On.indexOf(a)+1,body:i}},htmlBuilder:(e,t)=>{var r=t.havingSize(e.size);return Bn(e.body,r,t)},mathmlBuilder:(e,t)=>{var r=t.havingSize(e.size),a=Wr(e.body,r),n=new Ur.MathNode("mstyle",a);return n.setAttribute("mathsize",nt(r.sizeMultiplier)),n}}),Er({type:"smash",names:["\\smash"],props:{numArgs:1,numOptionalArgs:1,allowedInText:!0},handler:(e,t,r)=>{var{parser:a}=e,n=!1,i=!1,o=r[0]&&oa(r[0],"ordgroup");if(o)for(var l="",s=0;s<o.body.length;++s){if("t"===(l=o.body[s].text))n=!0;else{if("b"!==l){n=!1,i=!1;break}i=!0}}else n=!0,i=!0;var c=t[0];return{type:"smash",mode:a.mode,body:c,smashHeight:n,smashDepth:i}},htmlBuilder:(e,t)=>{var r=dr.makeSpan([],[Dr(e.body,t)]);if(!e.smashHeight&&!e.smashDepth)return r;if(e.smashHeight&&(r.height=0,r.children))for(var a=0;a<r.children.length;a++)r.children[a].height=0;if(e.smashDepth&&(r.depth=0,r.children))for(var n=0;n<r.children.length;n++)r.children[n].depth=0;var i=dr.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:r}]},t);return dr.makeSpan(["mord"],[i],t)},mathmlBuilder:(e,t)=>{var r=new Ur.MathNode("mpadded",[Jr(e.body,t)]);return e.smashHeight&&r.setAttribute("height","0px"),e.smashDepth&&r.setAttribute("depth","0px"),r}}),Er({type:"sqrt",names:["\\sqrt"],props:{numArgs:1,numOptionalArgs:1},handler(e,t,r){var{parser:a}=e,n=r[0],i=t[0];return{type:"sqrt",mode:a.mode,body:i,index:n}},htmlBuilder(e,t){var r=Dr(e.body,t.havingCrampedStyle());0===r.height&&(r.height=t.fontMetrics().xHeight),r=dr.wrapFragment(r,t);var a=t.fontMetrics().defaultRuleThickness,n=a;t.style.id<De.TEXT.id&&(n=t.fontMetrics().xHeight);var i=a+n/4,o=r.height+r.depth+i+a,{span:l,ruleWidth:s,advanceWidth:c}=Za.sqrtImage(o,t),m=l.height-s;m>r.height+r.depth+i&&(i=(i+m-r.height-r.depth)/2);var h=l.height-r.height-i-s;r.style.paddingLeft=nt(c);var u=dr.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:r,wrapperClasses:["svg-align"]},{type:"kern",size:-(r.height+h)},{type:"elem",elem:l},{type:"kern",size:s}]},t);if(e.index){var p=t.havingStyle(De.SCRIPTSCRIPT),d=Dr(e.index,p,t),f=.6*(u.height-u.depth),g=dr.makeVList({positionType:"shift",positionData:-f,children:[{type:"elem",elem:d}]},t),v=dr.makeSpan(["root"],[g]);return dr.makeSpan(["mord","sqrt"],[v,u],t)}return dr.makeSpan(["mord","sqrt"],[u],t)},mathmlBuilder(e,t){var{body:r,index:a}=e;return a?new Ur.MathNode("mroot",[Jr(r,t),Jr(a,t)]):new Ur.MathNode("msqrt",[Jr(r,t)])}});var Hn={display:De.DISPLAY,text:De.TEXT,script:De.SCRIPT,scriptscript:De.SCRIPTSCRIPT};Er({type:"styling",names:["\\displaystyle","\\textstyle","\\scriptstyle","\\scriptscriptstyle"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e,t){var{breakOnTokenText:r,funcName:a,parser:n}=e,i=n.parseExpression(!0,r),o=a.slice(1,a.length-5);return{type:"styling",mode:n.mode,style:o,body:i}},htmlBuilder(e,t){var r=Hn[e.style],a=t.havingStyle(r).withFont("");return Bn(e.body,a,t)},mathmlBuilder(e,t){var r=Hn[e.style],a=t.havingStyle(r),n=Wr(e.body,a),i=new Ur.MathNode("mstyle",n),o={display:["0","true"],text:["0","false"],script:["1","false"],scriptscript:["2","false"]}[e.style];return i.setAttribute("scriptlevel",o[0]),i.setAttribute("displaystyle",o[1]),i}});Mr({type:"supsub",htmlBuilder(e,t){var r=function(e,t){var r=e.base;return r?"op"===r.type?r.limits&&(t.style.size===De.DISPLAY.size||r.alwaysHandleSupSub)?zn:null:"operatorname"===r.type?r.alwaysHandleSupSub&&(t.style.size===De.DISPLAY.size||r.limits)?Ln:null:"accent"===r.type?Se.isCharacterBox(r.base)?ca:null:"horizBrace"===r.type&&!e.sub===r.isOver?En:null:null}(e,t);if(r)return r(e,t);var a,n,i,{base:o,sup:l,sub:s}=e,c=Dr(o,t),m=t.fontMetrics(),h=0,u=0,p=o&&Se.isCharacterBox(o);if(l){var d=t.havingStyle(t.style.sup());a=Dr(l,d,t),p||(h=c.height-d.fontMetrics().supDrop*d.sizeMultiplier/t.sizeMultiplier)}if(s){var f=t.havingStyle(t.style.sub());n=Dr(s,f,t),p||(u=c.depth+f.fontMetrics().subDrop*f.sizeMultiplier/t.sizeMultiplier)}i=t.style===De.DISPLAY?m.sup1:t.style.cramped?m.sup3:m.sup2;var g,v=t.sizeMultiplier,b=nt(.5/m.ptPerEm/v),y=null;if(n){var x=e.base&&"op"===e.base.type&&e.base.name&&("\\oiint"===e.base.name||"\\oiiint"===e.base.name);(c instanceof dt||x)&&(y=nt(-c.italic))}if(a&&n){h=Math.max(h,i,a.depth+.25*m.xHeight),u=Math.max(u,m.sub2);var w=4*m.defaultRuleThickness;if(h-a.depth-(n.height-u)<w){u=w-(h-a.depth)+n.height;var k=.8*m.xHeight-(h-a.depth);k>0&&(h+=k,u-=k)}var E=[{type:"elem",elem:n,shift:u,marginRight:b,marginLeft:y},{type:"elem",elem:a,shift:-h,marginRight:b}];g=dr.makeVList({positionType:"individualShift",children:E},t)}else if(n){u=Math.max(u,m.sub1,n.height-.8*m.xHeight);var M=[{type:"elem",elem:n,marginLeft:y,marginRight:b}];g=dr.makeVList({positionType:"shift",positionData:u,children:M},t)}else{if(!a)throw new Error("supsub must have either sup or sub.");h=Math.max(h,i,a.depth+.25*m.xHeight),g=dr.makeVList({positionType:"shift",positionData:-h,children:[{type:"elem",elem:a,marginRight:b}]},t)}var C=Ir(c,"right")||"mord";return dr.makeSpan([C],[c,dr.makeSpan(["msupsub"],[g])],t)},mathmlBuilder(e,t){var r,a=!1;e.base&&"horizBrace"===e.base.type&&!!e.sup===e.base.isOver&&(a=!0,r=e.base.isOver),!e.base||"op"!==e.base.type&&"operatorname"!==e.base.type||(e.base.parentIsSupSub=!0);var n,i=[Jr(e.base,t)];if(e.sub&&i.push(Jr(e.sub,t)),e.sup&&i.push(Jr(e.sup,t)),a)n=r?"mover":"munder";else if(e.sub)if(e.sup){var o=e.base;n=o&&"op"===o.type&&o.limits&&t.style===De.DISPLAY||o&&"operatorname"===o.type&&o.alwaysHandleSupSub&&(t.style===De.DISPLAY||o.limits)?"munderover":"msubsup"}else{var l=e.base;n=l&&"op"===l.type&&l.limits&&(t.style===De.DISPLAY||l.alwaysHandleSupSub)||l&&"operatorname"===l.type&&l.alwaysHandleSupSub&&(l.limits||t.style===De.DISPLAY)?"munder":"msub"}else{var s=e.base;n=s&&"op"===s.type&&s.limits&&(t.style===De.DISPLAY||s.alwaysHandleSupSub)||s&&"operatorname"===s.type&&s.alwaysHandleSupSub&&(s.limits||t.style===De.DISPLAY)?"mover":"msup"}return new Ur.MathNode(n,i)}}),Mr({type:"atom",htmlBuilder:(e,t)=>dr.mathsym(e.text,e.mode,t,["m"+e.family]),mathmlBuilder(e,t){var r=new Ur.MathNode("mo",[Yr(e.text,e.mode)]);if("bin"===e.family){var a=Zr(e,t);"bold-italic"===a&&r.setAttribute("mathvariant",a)}else"punct"===e.family?r.setAttribute("separator","true"):"open"!==e.family&&"close"!==e.family||r.setAttribute("stretchy","false");return r}});var In={mi:"italic",mn:"normal",mtext:"normal"};Mr({type:"mathord",htmlBuilder:(e,t)=>dr.makeOrd(e,t,"mathord"),mathmlBuilder(e,t){var r=new Ur.MathNode("mi",[Yr(e.text,e.mode,t)]),a=Zr(e,t)||"italic";return a!==In[r.type]&&r.setAttribute("mathvariant",a),r}}),Mr({type:"textord",htmlBuilder:(e,t)=>dr.makeOrd(e,t,"textord"),mathmlBuilder(e,t){var r,a=Yr(e.text,e.mode,t),n=Zr(e,t)||"normal";return r="text"===e.mode?new Ur.MathNode("mtext",[a]):/[0-9]/.test(e.text)?new Ur.MathNode("mn",[a]):"\\prime"===e.text?new Ur.MathNode("mo",[a]):new Ur.MathNode("mi",[a]),n!==In[r.type]&&r.setAttribute("mathvariant",n),r}});var Rn={"\\nobreak":"nobreak","\\allowbreak":"allowbreak"},Dn={" ":{},"\\ ":{},"~":{className:"nobreak"},"\\space":{},"\\nobreakspace":{className:"nobreak"}};Mr({type:"spacing",htmlBuilder(e,t){if(Dn.hasOwnProperty(e.text)){var r=Dn[e.text].className||"";if("text"===e.mode){var a=dr.makeOrd(e,t,"textord");return a.classes.push(r),a}return dr.makeSpan(["mspace",r],[dr.mathsym(e.text,e.mode,t)],t)}if(Rn.hasOwnProperty(e.text))return dr.makeSpan(["mspace",Rn[e.text]],[],t);throw new we('Unknown type of space "'+e.text+'"')},mathmlBuilder(e,t){if(!Dn.hasOwnProperty(e.text)){if(Rn.hasOwnProperty(e.text))return new Ur.MathNode("mspace");throw new we('Unknown type of space "'+e.text+'"')}return new Ur.MathNode("mtext",[new Ur.TextNode(" ")])}});var Fn=()=>{var e=new Ur.MathNode("mtd",[]);return e.setAttribute("width","50%"),e};Mr({type:"tag",mathmlBuilder(e,t){var r=new Ur.MathNode("mtable",[new Ur.MathNode("mtr",[Fn(),new Ur.MathNode("mtd",[$r(e.body,t)]),Fn(),new Ur.MathNode("mtd",[$r(e.tag,t)])])]);return r.setAttribute("width","100%"),r}});var jn={"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm"},Vn={"\\textbf":"textbf","\\textmd":"textmd"},_n={"\\textit":"textit","\\textup":"textup"},Pn=(e,t)=>{var r=e.font;return r?jn[r]?t.withTextFontFamily(jn[r]):Vn[r]?t.withTextFontWeight(Vn[r]):"\\emph"===r?"textit"===t.fontShape?t.withTextFontShape("textup"):t.withTextFontShape("textit"):t.withTextFontShape(_n[r]):t};Er({type:"text",names:["\\text","\\textrm","\\textsf","\\texttt","\\textnormal","\\textbf","\\textmd","\\textit","\\textup","\\emph"],props:{numArgs:1,argTypes:["text"],allowedInArgument:!0,allowedInText:!0},handler(e,t){var{parser:r,funcName:a}=e,n=t[0];return{type:"text",mode:r.mode,body:Sr(n),font:a}},htmlBuilder(e,t){var r=Pn(e,t),a=Lr(e.body,r,!0);return dr.makeSpan(["mord","text"],a,r)},mathmlBuilder(e,t){var r=Pn(e,t);return $r(e.body,r)}}),Er({type:"underline",names:["\\underline"],props:{numArgs:1,allowedInText:!0},handler(e,t){var{parser:r}=e;return{type:"underline",mode:r.mode,body:t[0]}},htmlBuilder(e,t){var r=Dr(e.body,t),a=dr.makeLineSpan("underline-line",t),n=t.fontMetrics().defaultRuleThickness,i=dr.makeVList({positionType:"top",positionData:r.height,children:[{type:"kern",size:n},{type:"elem",elem:a},{type:"kern",size:3*n},{type:"elem",elem:r}]},t);return dr.makeSpan(["mord","underline"],[i],t)},mathmlBuilder(e,t){var r=new Ur.MathNode("mo",[new Ur.TextNode("‾")]);r.setAttribute("stretchy","true");var a=new Ur.MathNode("munder",[Jr(e.body,t),r]);return a.setAttribute("accentunder","true"),a}}),Er({type:"vcenter",names:["\\vcenter"],props:{numArgs:1,argTypes:["original"],allowedInText:!1},handler(e,t){var{parser:r}=e;return{type:"vcenter",mode:r.mode,body:t[0]}},htmlBuilder(e,t){var r=Dr(e.body,t),a=t.fontMetrics().axisHeight,n=.5*(r.height-a-(r.depth+a));return dr.makeVList({positionType:"shift",positionData:n,children:[{type:"elem",elem:r}]},t)},mathmlBuilder:(e,t)=>new Ur.MathNode("mpadded",[Jr(e.body,t)],["vcenter"])}),Er({type:"verb",names:["\\verb"],props:{numArgs:0,allowedInText:!0},handler(e,t,r){throw new we("\\verb ended by end of line instead of matching delimiter")},htmlBuilder(e,t){for(var r=Un(e),a=[],n=t.havingStyle(t.style.text()),i=0;i<r.length;i++){var o=r[i];"~"===o&&(o="\\textasciitilde"),a.push(dr.makeSymbol(o,"Typewriter-Regular",e.mode,n,["mord","texttt"]))}return dr.makeSpan(["mord","text"].concat(n.sizingClasses(t)),dr.tryCombineChars(a),n)},mathmlBuilder(e,t){var r=new Ur.TextNode(Un(e)),a=new Ur.MathNode("mtext",[r]);return a.setAttribute("mathvariant","monospace"),a}});var Un=e=>e.body.replace(/ /g,e.star?"␣":" "),Yn=xr,Gn="[ \r\n\t]",Zn="(\\\\[a-zA-Z@]+)"+Gn+"*",Xn="[̀-ͯ]",Wn=new RegExp(Xn+"+$"),$n="("+Gn+"+)|\\\\(\n|[ \r\t]+\n?)[ \r\t]*|([!-\\[\\]-‧-豈-]"+Xn+"*|[\ud800-\udbff][\udc00-\udfff]"+Xn+"*|\\\\verb\\*([^]).*?\\4|\\\\verb([^*a-zA-Z]).*?\\5|"+Zn+"|\\\\[^\ud800-\udfff])";class Jn{constructor(e,t){this.input=void 0,this.settings=void 0,this.tokenRegex=void 0,this.catcodes=void 0,this.input=e,this.settings=t,this.tokenRegex=new RegExp($n,"g"),this.catcodes={"%":14,"~":13}}setCatcode(e,t){this.catcodes[e]=t}lex(){var e=this.input,t=this.tokenRegex.lastIndex;if(t===e.length)return new xe("EOF",new ye(this,t,t));var r=this.tokenRegex.exec(e);if(null===r||r.index!==t)throw new we("Unexpected character: '"+e[t]+"'",new xe(e[t],new ye(this,t,t+1)));var a=r[6]||r[3]||(r[2]?"\\ ":" ");if(14===this.catcodes[a]){var n=e.indexOf("\n",this.tokenRegex.lastIndex);return-1===n?(this.tokenRegex.lastIndex=e.length,this.settings.reportNonstrict("commentAtEnd","% comment has no terminating newline; LaTeX would fail because of commenting the end of math mode (e.g. $)")):this.tokenRegex.lastIndex=n+1,this.lex()}return new xe(a,new ye(this,t,this.tokenRegex.lastIndex))}}class Kn{constructor(e,t){void 0===e&&(e={}),void 0===t&&(t={}),this.current=void 0,this.builtins=void 0,this.undefStack=void 0,this.current=t,this.builtins=e,this.undefStack=[]}beginGroup(){this.undefStack.push({})}endGroup(){if(0===this.undefStack.length)throw new we("Unbalanced namespace destruction: attempt to pop global namespace; please report this as a bug");var e=this.undefStack.pop();for(var t in e)e.hasOwnProperty(t)&&(null==e[t]?delete this.current[t]:this.current[t]=e[t])}endGroups(){for(;this.undefStack.length>0;)this.endGroup()}has(e){return this.current.hasOwnProperty(e)||this.builtins.hasOwnProperty(e)}get(e){return this.current.hasOwnProperty(e)?this.current[e]:this.builtins[e]}set(e,t,r){if(void 0===r&&(r=!1),r){for(var a=0;a<this.undefStack.length;a++)delete this.undefStack[a][e];this.undefStack.length>0&&(this.undefStack[this.undefStack.length-1][e]=t)}else{var n=this.undefStack[this.undefStack.length-1];n&&!n.hasOwnProperty(e)&&(n[e]=this.current[e])}null==t?delete this.current[e]:this.current[e]=t}}var Qn=rn;an("\\noexpand",(function(e){var t=e.popToken();return e.isExpandable(t.text)&&(t.noexpand=!0,t.treatAsRelax=!0),{tokens:[t],numArgs:0}})),an("\\expandafter",(function(e){var t=e.popToken();return e.expandOnce(!0),{tokens:[t],numArgs:0}})),an("\\@firstoftwo",(function(e){return{tokens:e.consumeArgs(2)[0],numArgs:0}})),an("\\@secondoftwo",(function(e){return{tokens:e.consumeArgs(2)[1],numArgs:0}})),an("\\@ifnextchar",(function(e){var t=e.consumeArgs(3);e.consumeSpaces();var r=e.future();return 1===t[0].length&&t[0][0].text===r.text?{tokens:t[1],numArgs:0}:{tokens:t[2],numArgs:0}})),an("\\@ifstar","\\@ifnextchar *{\\@firstoftwo{#1}}"),an("\\TextOrMath",(function(e){var t=e.consumeArgs(2);return"text"===e.mode?{tokens:t[0],numArgs:0}:{tokens:t[1],numArgs:0}}));var ei={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15};an("\\char",(function(e){var t,r=e.popToken(),a="";if("'"===r.text)t=8,r=e.popToken();else if('"'===r.text)t=16,r=e.popToken();else if("`"===r.text)if("\\"===(r=e.popToken()).text[0])a=r.text.charCodeAt(1);else{if("EOF"===r.text)throw new we("\\char` missing argument");a=r.text.charCodeAt(0)}else t=10;if(t){if(null==(a=ei[r.text])||a>=t)throw new we("Invalid base-"+t+" digit "+r.text);for(var n;null!=(n=ei[e.future().text])&&n<t;)a*=t,a+=n,e.popToken()}return"\\@char{"+a+"}"}));var ti=(e,t,r,a)=>{var n=e.consumeArg().tokens;if(1!==n.length)throw new we("\\newcommand's first argument must be a macro name");var i=n[0].text,o=e.isDefined(i);if(o&&!t)throw new we("\\newcommand{"+i+"} attempting to redefine "+i+"; use \\renewcommand");if(!o&&!r)throw new we("\\renewcommand{"+i+"} when command "+i+" does not yet exist; use \\newcommand");var l=0;if(1===(n=e.consumeArg().tokens).length&&"["===n[0].text){for(var s="",c=e.expandNextToken();"]"!==c.text&&"EOF"!==c.text;)s+=c.text,c=e.expandNextToken();if(!s.match(/^\s*[0-9]+\s*$/))throw new we("Invalid number of arguments: "+s);l=parseInt(s),n=e.consumeArg().tokens}return o&&a||e.macros.set(i,{tokens:n,numArgs:l}),""};an("\\newcommand",(e=>ti(e,!1,!0,!1))),an("\\renewcommand",(e=>ti(e,!0,!1,!1))),an("\\providecommand",(e=>ti(e,!0,!0,!0))),an("\\message",(e=>{var t=e.consumeArgs(1)[0];return console.log(t.reverse().map((e=>e.text)).join("")),""})),an("\\errmessage",(e=>{var t=e.consumeArgs(1)[0];return console.error(t.reverse().map((e=>e.text)).join("")),""})),an("\\show",(e=>{var t=e.popToken(),r=t.text;return console.log(t,e.macros.get(r),Yn[r],wt.math[r],wt.text[r]),""})),an("\\bgroup","{"),an("\\egroup","}"),an("~","\\nobreakspace"),an("\\lq","`"),an("\\rq","'"),an("\\aa","\\r a"),an("\\AA","\\r A"),an("\\textcopyright","\\html@mathml{\\textcircled{c}}{\\char`©}"),an("\\copyright","\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}"),an("\\textregistered","\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`®}"),an("ℬ","\\mathscr{B}"),an("ℰ","\\mathscr{E}"),an("ℱ","\\mathscr{F}"),an("ℋ","\\mathscr{H}"),an("ℐ","\\mathscr{I}"),an("ℒ","\\mathscr{L}"),an("ℳ","\\mathscr{M}"),an("ℛ","\\mathscr{R}"),an("ℭ","\\mathfrak{C}"),an("ℌ","\\mathfrak{H}"),an("ℨ","\\mathfrak{Z}"),an("\\Bbbk","\\Bbb{k}"),an("·","\\cdotp"),an("\\llap","\\mathllap{\\textrm{#1}}"),an("\\rlap","\\mathrlap{\\textrm{#1}}"),an("\\clap","\\mathclap{\\textrm{#1}}"),an("\\mathstrut","\\vphantom{(}"),an("\\underbar","\\underline{\\text{#1}}"),an("\\not",'\\html@mathml{\\mathrel{\\mathrlap\\@not}}{\\char"338}'),an("\\neq","\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`≠}}"),an("\\ne","\\neq"),an("≠","\\neq"),an("\\notin","\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}{\\mathrel{\\char`∉}}"),an("∉","\\notin"),an("≘","\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}}{\\mathrel{\\char`≘}}"),an("≙","\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`≘}}"),an("≚","\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`≚}}"),an("≛","\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}{\\mathrel{\\char`≛}}"),an("≝","\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}{\\mathrel{\\char`≝}}"),an("≞","\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}{\\mathrel{\\char`≞}}"),an("≟","\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`≟}}"),an("⟂","\\perp"),an("‼","\\mathclose{!\\mkern-0.8mu!}"),an("∌","\\notni"),an("⌜","\\ulcorner"),an("⌝","\\urcorner"),an("⌞","\\llcorner"),an("⌟","\\lrcorner"),an("©","\\copyright"),an("®","\\textregistered"),an("️","\\textregistered"),an("\\ulcorner",'\\html@mathml{\\@ulcorner}{\\mathop{\\char"231c}}'),an("\\urcorner",'\\html@mathml{\\@urcorner}{\\mathop{\\char"231d}}'),an("\\llcorner",'\\html@mathml{\\@llcorner}{\\mathop{\\char"231e}}'),an("\\lrcorner",'\\html@mathml{\\@lrcorner}{\\mathop{\\char"231f}}'),an("\\vdots","{\\varvdots\\rule{0pt}{15pt}}"),an("⋮","\\vdots"),an("\\varGamma","\\mathit{\\Gamma}"),an("\\varDelta","\\mathit{\\Delta}"),an("\\varTheta","\\mathit{\\Theta}"),an("\\varLambda","\\mathit{\\Lambda}"),an("\\varXi","\\mathit{\\Xi}"),an("\\varPi","\\mathit{\\Pi}"),an("\\varSigma","\\mathit{\\Sigma}"),an("\\varUpsilon","\\mathit{\\Upsilon}"),an("\\varPhi","\\mathit{\\Phi}"),an("\\varPsi","\\mathit{\\Psi}"),an("\\varOmega","\\mathit{\\Omega}"),an("\\substack","\\begin{subarray}{c}#1\\end{subarray}"),an("\\colon","\\nobreak\\mskip2mu\\mathpunct{}\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu\\relax"),an("\\boxed","\\fbox{$\\displaystyle{#1}$}"),an("\\iff","\\DOTSB\\;\\Longleftrightarrow\\;"),an("\\implies","\\DOTSB\\;\\Longrightarrow\\;"),an("\\impliedby","\\DOTSB\\;\\Longleftarrow\\;"),an("\\dddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ...}}{#1}}"),an("\\ddddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ....}}{#1}}");var ri={",":"\\dotsc","\\not":"\\dotsb","+":"\\dotsb","=":"\\dotsb","<":"\\dotsb",">":"\\dotsb","-":"\\dotsb","*":"\\dotsb",":":"\\dotsb","\\DOTSB":"\\dotsb","\\coprod":"\\dotsb","\\bigvee":"\\dotsb","\\bigwedge":"\\dotsb","\\biguplus":"\\dotsb","\\bigcap":"\\dotsb","\\bigcup":"\\dotsb","\\prod":"\\dotsb","\\sum":"\\dotsb","\\bigotimes":"\\dotsb","\\bigoplus":"\\dotsb","\\bigodot":"\\dotsb","\\bigsqcup":"\\dotsb","\\And":"\\dotsb","\\longrightarrow":"\\dotsb","\\Longrightarrow":"\\dotsb","\\longleftarrow":"\\dotsb","\\Longleftarrow":"\\dotsb","\\longleftrightarrow":"\\dotsb","\\Longleftrightarrow":"\\dotsb","\\mapsto":"\\dotsb","\\longmapsto":"\\dotsb","\\hookrightarrow":"\\dotsb","\\doteq":"\\dotsb","\\mathbin":"\\dotsb","\\mathrel":"\\dotsb","\\relbar":"\\dotsb","\\Relbar":"\\dotsb","\\xrightarrow":"\\dotsb","\\xleftarrow":"\\dotsb","\\DOTSI":"\\dotsi","\\int":"\\dotsi","\\oint":"\\dotsi","\\iint":"\\dotsi","\\iiint":"\\dotsi","\\iiiint":"\\dotsi","\\idotsint":"\\dotsi","\\DOTSX":"\\dotsx"};an("\\dots",(function(e){var t="\\dotso",r=e.expandAfterFuture().text;return r in ri?t=ri[r]:("\\not"===r.slice(0,4)||r in wt.math&&Se.contains(["bin","rel"],wt.math[r].group))&&(t="\\dotsb"),t}));var ai={")":!0,"]":!0,"\\rbrack":!0,"\\}":!0,"\\rbrace":!0,"\\rangle":!0,"\\rceil":!0,"\\rfloor":!0,"\\rgroup":!0,"\\rmoustache":!0,"\\right":!0,"\\bigr":!0,"\\biggr":!0,"\\Bigr":!0,"\\Biggr":!0,$:!0,";":!0,".":!0,",":!0};an("\\dotso",(function(e){return e.future().text in ai?"\\ldots\\,":"\\ldots"})),an("\\dotsc",(function(e){var t=e.future().text;return t in ai&&","!==t?"\\ldots\\,":"\\ldots"})),an("\\cdots",(function(e){return e.future().text in ai?"\\@cdots\\,":"\\@cdots"})),an("\\dotsb","\\cdots"),an("\\dotsm","\\cdots"),an("\\dotsi","\\!\\cdots"),an("\\dotsx","\\ldots\\,"),an("\\DOTSI","\\relax"),an("\\DOTSB","\\relax"),an("\\DOTSX","\\relax"),an("\\tmspace","\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax"),an("\\,","\\tmspace+{3mu}{.1667em}"),an("\\thinspace","\\,"),an("\\>","\\mskip{4mu}"),an("\\:","\\tmspace+{4mu}{.2222em}"),an("\\medspace","\\:"),an("\\;","\\tmspace+{5mu}{.2777em}"),an("\\thickspace","\\;"),an("\\!","\\tmspace-{3mu}{.1667em}"),an("\\negthinspace","\\!"),an("\\negmedspace","\\tmspace-{4mu}{.2222em}"),an("\\negthickspace","\\tmspace-{5mu}{.277em}"),an("\\enspace","\\kern.5em "),an("\\enskip","\\hskip.5em\\relax"),an("\\quad","\\hskip1em\\relax"),an("\\qquad","\\hskip2em\\relax"),an("\\tag","\\@ifstar\\tag@literal\\tag@paren"),an("\\tag@paren","\\tag@literal{({#1})}"),an("\\tag@literal",(e=>{if(e.macros.get("\\df@tag"))throw new we("Multiple \\tag");return"\\gdef\\df@tag{\\text{#1}}"})),an("\\bmod","\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}"),an("\\pod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)"),an("\\pmod","\\pod{{\\rm mod}\\mkern6mu#1}"),an("\\mod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1"),an("\\newline","\\\\\\relax"),an("\\TeX","\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}");var ni=nt(Ye["Main-Regular"]["T".charCodeAt(0)][1]-.7*Ye["Main-Regular"]["A".charCodeAt(0)][1]);an("\\LaTeX","\\textrm{\\html@mathml{L\\kern-.36em\\raisebox{"+ni+"}{\\scriptstyle A}\\kern-.15em\\TeX}{LaTeX}}"),an("\\KaTeX","\\textrm{\\html@mathml{K\\kern-.17em\\raisebox{"+ni+"}{\\scriptstyle A}\\kern-.15em\\TeX}{KaTeX}}"),an("\\hspace","\\@ifstar\\@hspacer\\@hspace"),an("\\@hspace","\\hskip #1\\relax"),an("\\@hspacer","\\rule{0pt}{0pt}\\hskip #1\\relax"),an("\\ordinarycolon",":"),an("\\vcentcolon","\\mathrel{\\mathop\\ordinarycolon}"),an("\\dblcolon",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}'),an("\\coloneqq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}'),an("\\Coloneqq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}'),an("\\coloneq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}'),an("\\Coloneq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}'),an("\\eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}'),an("\\Eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}'),an("\\eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}'),an("\\Eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}'),an("\\colonapprox",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}'),an("\\Colonapprox",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}'),an("\\colonsim",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}'),an("\\Colonsim",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}'),an("∷","\\dblcolon"),an("∹","\\eqcolon"),an("≔","\\coloneqq"),an("≕","\\eqqcolon"),an("⩴","\\Coloneqq"),an("\\ratio","\\vcentcolon"),an("\\coloncolon","\\dblcolon"),an("\\colonequals","\\coloneqq"),an("\\coloncolonequals","\\Coloneqq"),an("\\equalscolon","\\eqqcolon"),an("\\equalscoloncolon","\\Eqqcolon"),an("\\colonminus","\\coloneq"),an("\\coloncolonminus","\\Coloneq"),an("\\minuscolon","\\eqcolon"),an("\\minuscoloncolon","\\Eqcolon"),an("\\coloncolonapprox","\\Colonapprox"),an("\\coloncolonsim","\\Colonsim"),an("\\simcolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}"),an("\\simcoloncolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}"),an("\\approxcolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}"),an("\\approxcoloncolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}"),an("\\notni","\\html@mathml{\\not\\ni}{\\mathrel{\\char`∌}}"),an("\\limsup","\\DOTSB\\operatorname*{lim\\,sup}"),an("\\liminf","\\DOTSB\\operatorname*{lim\\,inf}"),an("\\injlim","\\DOTSB\\operatorname*{inj\\,lim}"),an("\\projlim","\\DOTSB\\operatorname*{proj\\,lim}"),an("\\varlimsup","\\DOTSB\\operatorname*{\\overline{lim}}"),an("\\varliminf","\\DOTSB\\operatorname*{\\underline{lim}}"),an("\\varinjlim","\\DOTSB\\operatorname*{\\underrightarrow{lim}}"),an("\\varprojlim","\\DOTSB\\operatorname*{\\underleftarrow{lim}}"),an("\\gvertneqq","\\html@mathml{\\@gvertneqq}{≩}"),an("\\lvertneqq","\\html@mathml{\\@lvertneqq}{≨}"),an("\\ngeqq","\\html@mathml{\\@ngeqq}{≱}"),an("\\ngeqslant","\\html@mathml{\\@ngeqslant}{≱}"),an("\\nleqq","\\html@mathml{\\@nleqq}{≰}"),an("\\nleqslant","\\html@mathml{\\@nleqslant}{≰}"),an("\\nshortmid","\\html@mathml{\\@nshortmid}{∤}"),an("\\nshortparallel","\\html@mathml{\\@nshortparallel}{∦}"),an("\\nsubseteqq","\\html@mathml{\\@nsubseteqq}{⊈}"),an("\\nsupseteqq","\\html@mathml{\\@nsupseteqq}{⊉}"),an("\\varsubsetneq","\\html@mathml{\\@varsubsetneq}{⊊}"),an("\\varsubsetneqq","\\html@mathml{\\@varsubsetneqq}{⫋}"),an("\\varsupsetneq","\\html@mathml{\\@varsupsetneq}{⊋}"),an("\\varsupsetneqq","\\html@mathml{\\@varsupsetneqq}{⫌}"),an("\\imath","\\html@mathml{\\@imath}{ı}"),an("\\jmath","\\html@mathml{\\@jmath}{ȷ}"),an("\\llbracket","\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`⟦}}"),an("\\rrbracket","\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`⟧}}"),an("⟦","\\llbracket"),an("⟧","\\rrbracket"),an("\\lBrace","\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`⦃}}"),an("\\rBrace","\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`⦄}}"),an("⦃","\\lBrace"),an("⦄","\\rBrace"),an("\\minuso","\\mathbin{\\html@mathml{{\\mathrlap{\\mathchoice{\\kern{0.145em}}{\\kern{0.145em}}{\\kern{0.1015em}}{\\kern{0.0725em}}\\circ}{-}}}{\\char`⦵}}"),an("⦵","\\minuso"),an("\\darr","\\downarrow"),an("\\dArr","\\Downarrow"),an("\\Darr","\\Downarrow"),an("\\lang","\\langle"),an("\\rang","\\rangle"),an("\\uarr","\\uparrow"),an("\\uArr","\\Uparrow"),an("\\Uarr","\\Uparrow"),an("\\N","\\mathbb{N}"),an("\\R","\\mathbb{R}"),an("\\Z","\\mathbb{Z}"),an("\\alef","\\aleph"),an("\\alefsym","\\aleph"),an("\\Alpha","\\mathrm{A}"),an("\\Beta","\\mathrm{B}"),an("\\bull","\\bullet"),an("\\Chi","\\mathrm{X}"),an("\\clubs","\\clubsuit"),an("\\cnums","\\mathbb{C}"),an("\\Complex","\\mathbb{C}"),an("\\Dagger","\\ddagger"),an("\\diamonds","\\diamondsuit"),an("\\empty","\\emptyset"),an("\\Epsilon","\\mathrm{E}"),an("\\Eta","\\mathrm{H}"),an("\\exist","\\exists"),an("\\harr","\\leftrightarrow"),an("\\hArr","\\Leftrightarrow"),an("\\Harr","\\Leftrightarrow"),an("\\hearts","\\heartsuit"),an("\\image","\\Im"),an("\\infin","\\infty"),an("\\Iota","\\mathrm{I}"),an("\\isin","\\in"),an("\\Kappa","\\mathrm{K}"),an("\\larr","\\leftarrow"),an("\\lArr","\\Leftarrow"),an("\\Larr","\\Leftarrow"),an("\\lrarr","\\leftrightarrow"),an("\\lrArr","\\Leftrightarrow"),an("\\Lrarr","\\Leftrightarrow"),an("\\Mu","\\mathrm{M}"),an("\\natnums","\\mathbb{N}"),an("\\Nu","\\mathrm{N}"),an("\\Omicron","\\mathrm{O}"),an("\\plusmn","\\pm"),an("\\rarr","\\rightarrow"),an("\\rArr","\\Rightarrow"),an("\\Rarr","\\Rightarrow"),an("\\real","\\Re"),an("\\reals","\\mathbb{R}"),an("\\Reals","\\mathbb{R}"),an("\\Rho","\\mathrm{P}"),an("\\sdot","\\cdot"),an("\\sect","\\S"),an("\\spades","\\spadesuit"),an("\\sub","\\subset"),an("\\sube","\\subseteq"),an("\\supe","\\supseteq"),an("\\Tau","\\mathrm{T}"),an("\\thetasym","\\vartheta"),an("\\weierp","\\wp"),an("\\Zeta","\\mathrm{Z}"),an("\\argmin","\\DOTSB\\operatorname*{arg\\,min}"),an("\\argmax","\\DOTSB\\operatorname*{arg\\,max}"),an("\\plim","\\DOTSB\\mathop{\\operatorname{plim}}\\limits"),an("\\bra","\\mathinner{\\langle{#1}|}"),an("\\ket","\\mathinner{|{#1}\\rangle}"),an("\\braket","\\mathinner{\\langle{#1}\\rangle}"),an("\\Bra","\\left\\langle#1\\right|"),an("\\Ket","\\left|#1\\right\\rangle");var ii=e=>t=>{var r=t.consumeArg().tokens,a=t.consumeArg().tokens,n=t.consumeArg().tokens,i=t.consumeArg().tokens,o=t.macros.get("|"),l=t.macros.get("\\|");t.macros.beginGroup();var s=t=>r=>{e&&(r.macros.set("|",o),n.length&&r.macros.set("\\|",l));var i=t;!t&&n.length&&("|"===r.future().text&&(r.popToken(),i=!0));return{tokens:i?n:a,numArgs:0}};t.macros.set("|",s(!1)),n.length&&t.macros.set("\\|",s(!0));var c=t.consumeArg().tokens,m=t.expandTokens([...i,...c,...r]);return t.macros.endGroup(),{tokens:m.reverse(),numArgs:0}};an("\\bra@ket",ii(!1)),an("\\bra@set",ii(!0)),an("\\Braket","\\bra@ket{\\left\\langle}{\\,\\middle\\vert\\,}{\\,\\middle\\vert\\,}{\\right\\rangle}"),an("\\Set","\\bra@set{\\left\\{\\:}{\\;\\middle\\vert\\;}{\\;\\middle\\Vert\\;}{\\:\\right\\}}"),an("\\set","\\bra@set{\\{\\,}{\\mid}{}{\\,\\}}"),an("\\angln","{\\angl n}"),an("\\blue","\\textcolor{##6495ed}{#1}"),an("\\orange","\\textcolor{##ffa500}{#1}"),an("\\pink","\\textcolor{##ff00af}{#1}"),an("\\red","\\textcolor{##df0030}{#1}"),an("\\green","\\textcolor{##28ae7b}{#1}"),an("\\gray","\\textcolor{gray}{#1}"),an("\\purple","\\textcolor{##9d38bd}{#1}"),an("\\blueA","\\textcolor{##ccfaff}{#1}"),an("\\blueB","\\textcolor{##80f6ff}{#1}"),an("\\blueC","\\textcolor{##63d9ea}{#1}"),an("\\blueD","\\textcolor{##11accd}{#1}"),an("\\blueE","\\textcolor{##0c7f99}{#1}"),an("\\tealA","\\textcolor{##94fff5}{#1}"),an("\\tealB","\\textcolor{##26edd5}{#1}"),an("\\tealC","\\textcolor{##01d1c1}{#1}"),an("\\tealD","\\textcolor{##01a995}{#1}"),an("\\tealE","\\textcolor{##208170}{#1}"),an("\\greenA","\\textcolor{##b6ffb0}{#1}"),an("\\greenB","\\textcolor{##8af281}{#1}"),an("\\greenC","\\textcolor{##74cf70}{#1}"),an("\\greenD","\\textcolor{##1fab54}{#1}"),an("\\greenE","\\textcolor{##0d923f}{#1}"),an("\\goldA","\\textcolor{##ffd0a9}{#1}"),an("\\goldB","\\textcolor{##ffbb71}{#1}"),an("\\goldC","\\textcolor{##ff9c39}{#1}"),an("\\goldD","\\textcolor{##e07d10}{#1}"),an("\\goldE","\\textcolor{##a75a05}{#1}"),an("\\redA","\\textcolor{##fca9a9}{#1}"),an("\\redB","\\textcolor{##ff8482}{#1}"),an("\\redC","\\textcolor{##f9685d}{#1}"),an("\\redD","\\textcolor{##e84d39}{#1}"),an("\\redE","\\textcolor{##bc2612}{#1}"),an("\\maroonA","\\textcolor{##ffbde0}{#1}"),an("\\maroonB","\\textcolor{##ff92c6}{#1}"),an("\\maroonC","\\textcolor{##ed5fa6}{#1}"),an("\\maroonD","\\textcolor{##ca337c}{#1}"),an("\\maroonE","\\textcolor{##9e034e}{#1}"),an("\\purpleA","\\textcolor{##ddd7ff}{#1}"),an("\\purpleB","\\textcolor{##c6b9fc}{#1}"),an("\\purpleC","\\textcolor{##aa87ff}{#1}"),an("\\purpleD","\\textcolor{##7854ab}{#1}"),an("\\purpleE","\\textcolor{##543b78}{#1}"),an("\\mintA","\\textcolor{##f5f9e8}{#1}"),an("\\mintB","\\textcolor{##edf2df}{#1}"),an("\\mintC","\\textcolor{##e0e5cc}{#1}"),an("\\grayA","\\textcolor{##f6f7f7}{#1}"),an("\\grayB","\\textcolor{##f0f1f2}{#1}"),an("\\grayC","\\textcolor{##e3e5e6}{#1}"),an("\\grayD","\\textcolor{##d6d8da}{#1}"),an("\\grayE","\\textcolor{##babec2}{#1}"),an("\\grayF","\\textcolor{##888d93}{#1}"),an("\\grayG","\\textcolor{##626569}{#1}"),an("\\grayH","\\textcolor{##3b3e40}{#1}"),an("\\grayI","\\textcolor{##21242c}{#1}"),an("\\kaBlue","\\textcolor{##314453}{#1}"),an("\\kaGreen","\\textcolor{##71B307}{#1}");var oi={"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0};class li{constructor(e,t,r){this.settings=void 0,this.expansionCount=void 0,this.lexer=void 0,this.macros=void 0,this.stack=void 0,this.mode=void 0,this.settings=t,this.expansionCount=0,this.feed(e),this.macros=new Kn(Qn,t.macros),this.mode=r,this.stack=[]}feed(e){this.lexer=new Jn(e,this.settings)}switchMode(e){this.mode=e}beginGroup(){this.macros.beginGroup()}endGroup(){this.macros.endGroup()}endGroups(){this.macros.endGroups()}future(){return 0===this.stack.length&&this.pushToken(this.lexer.lex()),this.stack[this.stack.length-1]}popToken(){return this.future(),this.stack.pop()}pushToken(e){this.stack.push(e)}pushTokens(e){this.stack.push(...e)}scanArgument(e){var t,r,a;if(e){if(this.consumeSpaces(),"["!==this.future().text)return null;t=this.popToken(),({tokens:a,end:r}=this.consumeArg(["]"]))}else({tokens:a,start:t,end:r}=this.consumeArg());return this.pushToken(new xe("EOF",r.loc)),this.pushTokens(a),t.range(r,"")}consumeSpaces(){for(;;){if(" "!==this.future().text)break;this.stack.pop()}}consumeArg(e){var t=[],r=e&&e.length>0;r||this.consumeSpaces();var a,n=this.future(),i=0,o=0;do{if(a=this.popToken(),t.push(a),"{"===a.text)++i;else if("}"===a.text){if(-1===--i)throw new we("Extra }",a)}else if("EOF"===a.text)throw new we("Unexpected end of input in a macro argument, expected '"+(e&&r?e[o]:"}")+"'",a);if(e&&r)if((0===i||1===i&&"{"===e[o])&&a.text===e[o]){if(++o===e.length){t.splice(-o,o);break}}else o=0}while(0!==i||r);return"{"===n.text&&"}"===t[t.length-1].text&&(t.pop(),t.shift()),t.reverse(),{tokens:t,start:n,end:a}}consumeArgs(e,t){if(t){if(t.length!==e+1)throw new we("The length of delimiters doesn't match the number of args!");for(var r=t[0],a=0;a<r.length;a++){var n=this.popToken();if(r[a]!==n.text)throw new we("Use of the macro doesn't match its definition",n)}}for(var i=[],o=0;o<e;o++)i.push(this.consumeArg(t&&t[o+1]).tokens);return i}countExpansion(e){if(this.expansionCount+=e,this.expansionCount>this.settings.maxExpand)throw new we("Too many expansions: infinite loop or need to increase maxExpand setting")}expandOnce(e){var t=this.popToken(),r=t.text,a=t.noexpand?null:this._getExpansion(r);if(null==a||e&&a.unexpandable){if(e&&null==a&&"\\"===r[0]&&!this.isDefined(r))throw new we("Undefined control sequence: "+r);return this.pushToken(t),!1}this.countExpansion(1);var n=a.tokens,i=this.consumeArgs(a.numArgs,a.delimiters);if(a.numArgs)for(var o=(n=n.slice()).length-1;o>=0;--o){var l=n[o];if("#"===l.text){if(0===o)throw new we("Incomplete placeholder at end of macro body",l);if("#"===(l=n[--o]).text)n.splice(o+1,1);else{if(!/^[1-9]$/.test(l.text))throw new we("Not a valid argument number",l);n.splice(o,2,...i[+l.text-1])}}}return this.pushTokens(n),n.length}expandAfterFuture(){return this.expandOnce(),this.future()}expandNextToken(){for(;;)if(!1===this.expandOnce()){var e=this.stack.pop();return e.treatAsRelax&&(e.text="\\relax"),e}throw new Error}expandMacro(e){return this.macros.has(e)?this.expandTokens([new xe(e)]):void 0}expandTokens(e){var t=[],r=this.stack.length;for(this.pushTokens(e);this.stack.length>r;)if(!1===this.expandOnce(!0)){var a=this.stack.pop();a.treatAsRelax&&(a.noexpand=!1,a.treatAsRelax=!1),t.push(a)}return this.countExpansion(t.length),t}expandMacroAsText(e){var t=this.expandMacro(e);return t?t.map((e=>e.text)).join(""):t}_getExpansion(e){var t=this.macros.get(e);if(null==t)return t;if(1===e.length){var r=this.lexer.catcodes[e];if(null!=r&&13!==r)return}var a="function"==typeof t?t(this):t;if("string"==typeof a){var n=0;if(-1!==a.indexOf("#"))for(var i=a.replace(/##/g,"");-1!==i.indexOf("#"+(n+1));)++n;for(var o=new Jn(a,this.settings),l=[],s=o.lex();"EOF"!==s.text;)l.push(s),s=o.lex();return l.reverse(),{tokens:l,numArgs:n}}return a}isDefined(e){return this.macros.has(e)||Yn.hasOwnProperty(e)||wt.math.hasOwnProperty(e)||wt.text.hasOwnProperty(e)||oi.hasOwnProperty(e)}isExpandable(e){var t=this.macros.get(e);return null!=t?"string"==typeof t||"function"==typeof t||!t.unexpandable:Yn.hasOwnProperty(e)&&!Yn[e].primitive}}var si=/^[₊₋₌₍₎₀₁₂₃₄₅₆₇₈₉ₐₑₕᵢⱼₖₗₘₙₒₚᵣₛₜᵤᵥₓᵦᵧᵨᵩᵪ]/,ci=Object.freeze({"₊":"+","₋":"-","₌":"=","₍":"(","₎":")","₀":"0","₁":"1","₂":"2","₃":"3","₄":"4","₅":"5","₆":"6","₇":"7","₈":"8","₉":"9","ₐ":"a","ₑ":"e","ₕ":"h","ᵢ":"i","ⱼ":"j","ₖ":"k","ₗ":"l","ₘ":"m","ₙ":"n","ₒ":"o","ₚ":"p","ᵣ":"r","ₛ":"s","ₜ":"t","ᵤ":"u","ᵥ":"v","ₓ":"x","ᵦ":"β","ᵧ":"γ","ᵨ":"ρ","ᵩ":"ϕ","ᵪ":"χ","⁺":"+","⁻":"-","⁼":"=","⁽":"(","⁾":")","⁰":"0","¹":"1","²":"2","³":"3","⁴":"4","⁵":"5","⁶":"6","⁷":"7","⁸":"8","⁹":"9","ᴬ":"A","ᴮ":"B","ᴰ":"D","ᴱ":"E","ᴳ":"G","ᴴ":"H","ᴵ":"I","ᴶ":"J","ᴷ":"K","ᴸ":"L","ᴹ":"M","ᴺ":"N","ᴼ":"O","ᴾ":"P","ᴿ":"R","ᵀ":"T","ᵁ":"U","ⱽ":"V","ᵂ":"W","ᵃ":"a","ᵇ":"b","ᶜ":"c","ᵈ":"d","ᵉ":"e","ᶠ":"f","ᵍ":"g","ʰ":"h","ⁱ":"i","ʲ":"j","ᵏ":"k","ˡ":"l","ᵐ":"m","ⁿ":"n","ᵒ":"o","ᵖ":"p","ʳ":"r","ˢ":"s","ᵗ":"t","ᵘ":"u","ᵛ":"v","ʷ":"w","ˣ":"x","ʸ":"y","ᶻ":"z","ᵝ":"β","ᵞ":"γ","ᵟ":"δ","ᵠ":"ϕ","ᵡ":"χ","ᶿ":"θ"}),mi={"́":{text:"\\'",math:"\\acute"},"̀":{text:"\\`",math:"\\grave"},"̈":{text:'\\"',math:"\\ddot"},"̃":{text:"\\~",math:"\\tilde"},"̄":{text:"\\=",math:"\\bar"},"̆":{text:"\\u",math:"\\breve"},"̌":{text:"\\v",math:"\\check"},"̂":{text:"\\^",math:"\\hat"},"̇":{text:"\\.",math:"\\dot"},"̊":{text:"\\r",math:"\\mathring"},"̋":{text:"\\H"},"̧":{text:"\\c"}},hi={"á":"á","à":"à","ä":"ä","ǟ":"ǟ","ã":"ã","ā":"ā","ă":"ă","ắ":"ắ","ằ":"ằ","ẵ":"ẵ","ǎ":"ǎ","â":"â","ấ":"ấ","ầ":"ầ","ẫ":"ẫ","ȧ":"ȧ","ǡ":"ǡ","å":"å","ǻ":"ǻ","ḃ":"ḃ","ć":"ć","ḉ":"ḉ","č":"č","ĉ":"ĉ","ċ":"ċ","ç":"ç","ď":"ď","ḋ":"ḋ","ḑ":"ḑ","é":"é","è":"è","ë":"ë","ẽ":"ẽ","ē":"ē","ḗ":"ḗ","ḕ":"ḕ","ĕ":"ĕ","ḝ":"ḝ","ě":"ě","ê":"ê","ế":"ế","ề":"ề","ễ":"ễ","ė":"ė","ȩ":"ȩ","ḟ":"ḟ","ǵ":"ǵ","ḡ":"ḡ","ğ":"ğ","ǧ":"ǧ","ĝ":"ĝ","ġ":"ġ","ģ":"ģ","ḧ":"ḧ","ȟ":"ȟ","ĥ":"ĥ","ḣ":"ḣ","ḩ":"ḩ","í":"í","ì":"ì","ï":"ï","ḯ":"ḯ","ĩ":"ĩ","ī":"ī","ĭ":"ĭ","ǐ":"ǐ","î":"î","ǰ":"ǰ","ĵ":"ĵ","ḱ":"ḱ","ǩ":"ǩ","ķ":"ķ","ĺ":"ĺ","ľ":"ľ","ļ":"ļ","ḿ":"ḿ","ṁ":"ṁ","ń":"ń","ǹ":"ǹ","ñ":"ñ","ň":"ň","ṅ":"ṅ","ņ":"ņ","ó":"ó","ò":"ò","ö":"ö","ȫ":"ȫ","õ":"õ","ṍ":"ṍ","ṏ":"ṏ","ȭ":"ȭ","ō":"ō","ṓ":"ṓ","ṑ":"ṑ","ŏ":"ŏ","ǒ":"ǒ","ô":"ô","ố":"ố","ồ":"ồ","ỗ":"ỗ","ȯ":"ȯ","ȱ":"ȱ","ő":"ő","ṕ":"ṕ","ṗ":"ṗ","ŕ":"ŕ","ř":"ř","ṙ":"ṙ","ŗ":"ŗ","ś":"ś","ṥ":"ṥ","š":"š","ṧ":"ṧ","ŝ":"ŝ","ṡ":"ṡ","ş":"ş","ẗ":"ẗ","ť":"ť","ṫ":"ṫ","ţ":"ţ","ú":"ú","ù":"ù","ü":"ü","ǘ":"ǘ","ǜ":"ǜ","ǖ":"ǖ","ǚ":"ǚ","ũ":"ũ","ṹ":"ṹ","ū":"ū","ṻ":"ṻ","ŭ":"ŭ","ǔ":"ǔ","û":"û","ů":"ů","ű":"ű","ṽ":"ṽ","ẃ":"ẃ","ẁ":"ẁ","ẅ":"ẅ","ŵ":"ŵ","ẇ":"ẇ","ẘ":"ẘ","ẍ":"ẍ","ẋ":"ẋ","ý":"ý","ỳ":"ỳ","ÿ":"ÿ","ỹ":"ỹ","ȳ":"ȳ","ŷ":"ŷ","ẏ":"ẏ","ẙ":"ẙ","ź":"ź","ž":"ž","ẑ":"ẑ","ż":"ż","Á":"Á","À":"À","Ä":"Ä","Ǟ":"Ǟ","Ã":"Ã","Ā":"Ā","Ă":"Ă","Ắ":"Ắ","Ằ":"Ằ","Ẵ":"Ẵ","Ǎ":"Ǎ","Â":"Â","Ấ":"Ấ","Ầ":"Ầ","Ẫ":"Ẫ","Ȧ":"Ȧ","Ǡ":"Ǡ","Å":"Å","Ǻ":"Ǻ","Ḃ":"Ḃ","Ć":"Ć","Ḉ":"Ḉ","Č":"Č","Ĉ":"Ĉ","Ċ":"Ċ","Ç":"Ç","Ď":"Ď","Ḋ":"Ḋ","Ḑ":"Ḑ","É":"É","È":"È","Ë":"Ë","Ẽ":"Ẽ","Ē":"Ē","Ḗ":"Ḗ","Ḕ":"Ḕ","Ĕ":"Ĕ","Ḝ":"Ḝ","Ě":"Ě","Ê":"Ê","Ế":"Ế","Ề":"Ề","Ễ":"Ễ","Ė":"Ė","Ȩ":"Ȩ","Ḟ":"Ḟ","Ǵ":"Ǵ","Ḡ":"Ḡ","Ğ":"Ğ","Ǧ":"Ǧ","Ĝ":"Ĝ","Ġ":"Ġ","Ģ":"Ģ","Ḧ":"Ḧ","Ȟ":"Ȟ","Ĥ":"Ĥ","Ḣ":"Ḣ","Ḩ":"Ḩ","Í":"Í","Ì":"Ì","Ï":"Ï","Ḯ":"Ḯ","Ĩ":"Ĩ","Ī":"Ī","Ĭ":"Ĭ","Ǐ":"Ǐ","Î":"Î","İ":"İ","Ĵ":"Ĵ","Ḱ":"Ḱ","Ǩ":"Ǩ","Ķ":"Ķ","Ĺ":"Ĺ","Ľ":"Ľ","Ļ":"Ļ","Ḿ":"Ḿ","Ṁ":"Ṁ","Ń":"Ń","Ǹ":"Ǹ","Ñ":"Ñ","Ň":"Ň","Ṅ":"Ṅ","Ņ":"Ņ","Ó":"Ó","Ò":"Ò","Ö":"Ö","Ȫ":"Ȫ","Õ":"Õ","Ṍ":"Ṍ","Ṏ":"Ṏ","Ȭ":"Ȭ","Ō":"Ō","Ṓ":"Ṓ","Ṑ":"Ṑ","Ŏ":"Ŏ","Ǒ":"Ǒ","Ô":"Ô","Ố":"Ố","Ồ":"Ồ","Ỗ":"Ỗ","Ȯ":"Ȯ","Ȱ":"Ȱ","Ő":"Ő","Ṕ":"Ṕ","Ṗ":"Ṗ","Ŕ":"Ŕ","Ř":"Ř","Ṙ":"Ṙ","Ŗ":"Ŗ","Ś":"Ś","Ṥ":"Ṥ","Š":"Š","Ṧ":"Ṧ","Ŝ":"Ŝ","Ṡ":"Ṡ","Ş":"Ş","Ť":"Ť","Ṫ":"Ṫ","Ţ":"Ţ","Ú":"Ú","Ù":"Ù","Ü":"Ü","Ǘ":"Ǘ","Ǜ":"Ǜ","Ǖ":"Ǖ","Ǚ":"Ǚ","Ũ":"Ũ","Ṹ":"Ṹ","Ū":"Ū","Ṻ":"Ṻ","Ŭ":"Ŭ","Ǔ":"Ǔ","Û":"Û","Ů":"Ů","Ű":"Ű","Ṽ":"Ṽ","Ẃ":"Ẃ","Ẁ":"Ẁ","Ẅ":"Ẅ","Ŵ":"Ŵ","Ẇ":"Ẇ","Ẍ":"Ẍ","Ẋ":"Ẋ","Ý":"Ý","Ỳ":"Ỳ","Ÿ":"Ÿ","Ỹ":"Ỹ","Ȳ":"Ȳ","Ŷ":"Ŷ","Ẏ":"Ẏ","Ź":"Ź","Ž":"Ž","Ẑ":"Ẑ","Ż":"Ż","ά":"ά","ὰ":"ὰ","ᾱ":"ᾱ","ᾰ":"ᾰ","έ":"έ","ὲ":"ὲ","ή":"ή","ὴ":"ὴ","ί":"ί","ὶ":"ὶ","ϊ":"ϊ","ΐ":"ΐ","ῒ":"ῒ","ῑ":"ῑ","ῐ":"ῐ","ό":"ό","ὸ":"ὸ","ύ":"ύ","ὺ":"ὺ","ϋ":"ϋ","ΰ":"ΰ","ῢ":"ῢ","ῡ":"ῡ","ῠ":"ῠ","ώ":"ώ","ὼ":"ὼ","Ύ":"Ύ","Ὺ":"Ὺ","Ϋ":"Ϋ","Ῡ":"Ῡ","Ῠ":"Ῠ","Ώ":"Ώ","Ὼ":"Ὼ"};class ui{constructor(e,t){this.mode=void 0,this.gullet=void 0,this.settings=void 0,this.leftrightDepth=void 0,this.nextToken=void 0,this.mode="math",this.gullet=new li(e,t,this.mode),this.settings=t,this.leftrightDepth=0}expect(e,t){if(void 0===t&&(t=!0),this.fetch().text!==e)throw new we("Expected '"+e+"', got '"+this.fetch().text+"'",this.fetch());t&&this.consume()}consume(){this.nextToken=null}fetch(){return null==this.nextToken&&(this.nextToken=this.gullet.expandNextToken()),this.nextToken}switchMode(e){this.mode=e,this.gullet.switchMode(e)}parse(){this.settings.globalGroup||this.gullet.beginGroup(),this.settings.colorIsTextColor&&this.gullet.macros.set("\\color","\\textcolor");try{var e=this.parseExpression(!1);return this.expect("EOF"),this.settings.globalGroup||this.gullet.endGroup(),e}finally{this.gullet.endGroups()}}subparse(e){var t=this.nextToken;this.consume(),this.gullet.pushToken(new xe("}")),this.gullet.pushTokens(e);var r=this.parseExpression(!1);return this.expect("}"),this.nextToken=t,r}parseExpression(e,t){for(var r=[];;){"math"===this.mode&&this.consumeSpaces();var a=this.fetch();if(-1!==ui.endOfExpression.indexOf(a.text))break;if(t&&a.text===t)break;if(e&&Yn[a.text]&&Yn[a.text].infix)break;var n=this.parseAtom(t);if(!n)break;"internal"!==n.type&&r.push(n)}return"text"===this.mode&&this.formLigatures(r),this.handleInfixNodes(r)}handleInfixNodes(e){for(var t,r=-1,a=0;a<e.length;a++)if("infix"===e[a].type){if(-1!==r)throw new we("only one infix operator per group",e[a].token);r=a,t=e[a].replaceWith}if(-1!==r&&t){var n,i,o=e.slice(0,r),l=e.slice(r+1);return n=1===o.length&&"ordgroup"===o[0].type?o[0]:{type:"ordgroup",mode:this.mode,body:o},i=1===l.length&&"ordgroup"===l[0].type?l[0]:{type:"ordgroup",mode:this.mode,body:l},["\\\\abovefrac"===t?this.callFunction(t,[n,e[r],i],[]):this.callFunction(t,[n,i],[])]}return e}handleSupSubscript(e){var t,r=this.fetch(),a=r.text;this.consume(),this.consumeSpaces();do{var n;t=this.parseGroup(e)}while("internal"===(null==(n=t)?void 0:n.type));if(!t)throw new we("Expected group after '"+a+"'",r);return t}formatUnsupportedCmd(e){for(var t=[],r=0;r<e.length;r++)t.push({type:"textord",mode:"text",text:e[r]});var a={type:"text",mode:this.mode,body:t};return{type:"color",mode:this.mode,color:this.settings.errorColor,body:[a]}}parseAtom(e){var t,r,a=this.parseGroup("atom",e);if("internal"===(null==a?void 0:a.type))return a;if("text"===this.mode)return a;for(;;){this.consumeSpaces();var n=this.fetch();if("\\limits"===n.text||"\\nolimits"===n.text){if(a&&"op"===a.type){var i="\\limits"===n.text;a.limits=i,a.alwaysHandleSupSub=!0}else{if(!a||"operatorname"!==a.type)throw new we("Limit controls must follow a math operator",n);a.alwaysHandleSupSub&&(a.limits="\\limits"===n.text)}this.consume()}else if("^"===n.text){if(t)throw new we("Double superscript",n);t=this.handleSupSubscript("superscript")}else if("_"===n.text){if(r)throw new we("Double subscript",n);r=this.handleSupSubscript("subscript")}else if("'"===n.text){if(t)throw new we("Double superscript",n);var o={type:"textord",mode:this.mode,text:"\\prime"},l=[o];for(this.consume();"'"===this.fetch().text;)l.push(o),this.consume();"^"===this.fetch().text&&l.push(this.handleSupSubscript("superscript")),t={type:"ordgroup",mode:this.mode,body:l}}else{if(!ci[n.text])break;var s=si.test(n.text),c=[];for(c.push(new xe(ci[n.text])),this.consume();;){var m=this.fetch().text;if(!ci[m])break;if(si.test(m)!==s)break;c.unshift(new xe(ci[m])),this.consume()}var h=this.subparse(c);s?r={type:"ordgroup",mode:"math",body:h}:t={type:"ordgroup",mode:"math",body:h}}}return t||r?{type:"supsub",mode:this.mode,base:a,sup:t,sub:r}:a}parseFunction(e,t){var r=this.fetch(),a=r.text,n=Yn[a];if(!n)return null;if(this.consume(),t&&"atom"!==t&&!n.allowedInArgument)throw new we("Got function '"+a+"' with no arguments"+(t?" as "+t:""),r);if("text"===this.mode&&!n.allowedInText)throw new we("Can't use function '"+a+"' in text mode",r);if("math"===this.mode&&!1===n.allowedInMath)throw new we("Can't use function '"+a+"' in math mode",r);var{args:i,optArgs:o}=this.parseArguments(a,n);return this.callFunction(a,i,o,r,e)}callFunction(e,t,r,a,n){var i={funcName:e,parser:this,token:a,breakOnTokenText:n},o=Yn[e];if(o&&o.handler)return o.handler(i,t,r);throw new we("No function handler for "+e)}parseArguments(e,t){var r=t.numArgs+t.numOptionalArgs;if(0===r)return{args:[],optArgs:[]};for(var a=[],n=[],i=0;i<r;i++){var o=t.argTypes&&t.argTypes[i],l=i<t.numOptionalArgs;(t.primitive&&null==o||"sqrt"===t.type&&1===i&&null==n[0])&&(o="primitive");var s=this.parseGroupOfType("argument to '"+e+"'",o,l);if(l)n.push(s);else{if(null==s)throw new we("Null argument, please report this as a bug");a.push(s)}}return{args:a,optArgs:n}}parseGroupOfType(e,t,r){switch(t){case"color":return this.parseColorGroup(r);case"size":return this.parseSizeGroup(r);case"url":return this.parseUrlGroup(r);case"math":case"text":return this.parseArgumentGroup(r,t);case"hbox":var a=this.parseArgumentGroup(r,"text");return null!=a?{type:"styling",mode:a.mode,body:[a],style:"text"}:null;case"raw":var n=this.parseStringGroup("raw",r);return null!=n?{type:"raw",mode:"text",string:n.text}:null;case"primitive":if(r)throw new we("A primitive argument cannot be optional");var i=this.parseGroup(e);if(null==i)throw new we("Expected group as "+e,this.fetch());return i;case"original":case null:case void 0:return this.parseArgumentGroup(r);default:throw new we("Unknown group type as "+e,this.fetch())}}consumeSpaces(){for(;" "===this.fetch().text;)this.consume()}parseStringGroup(e,t){var r=this.gullet.scanArgument(t);if(null==r)return null;for(var a,n="";"EOF"!==(a=this.fetch()).text;)n+=a.text,this.consume();return this.consume(),r.text=n,r}parseRegexGroup(e,t){for(var r,a=this.fetch(),n=a,i="";"EOF"!==(r=this.fetch()).text&&e.test(i+r.text);)i+=(n=r).text,this.consume();if(""===i)throw new we("Invalid "+t+": '"+a.text+"'",a);return a.range(n,i)}parseColorGroup(e){var t=this.parseStringGroup("color",e);if(null==t)return null;var r=/^(#[a-f0-9]{3}|#?[a-f0-9]{6}|[a-z]+)$/i.exec(t.text);if(!r)throw new we("Invalid color: '"+t.text+"'",t);var a=r[0];return/^[0-9a-f]{6}$/i.test(a)&&(a="#"+a),{type:"color-token",mode:this.mode,color:a}}parseSizeGroup(e){var t,r=!1;if(this.gullet.consumeSpaces(),!(t=e||"{"===this.gullet.future().text?this.parseStringGroup("size",e):this.parseRegexGroup(/^[-+]? *(?:$|\d+|\d+\.\d*|\.\d*) *[a-z]{0,2} *$/,"size")))return null;e||0!==t.text.length||(t.text="0pt",r=!0);var a=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(t.text);if(!a)throw new we("Invalid size: '"+t.text+"'",t);var n={number:+(a[1]+a[2]),unit:a[3]};if(!rt(n))throw new we("Invalid unit: '"+n.unit+"'",t);return{type:"size",mode:this.mode,value:n,isBlank:r}}parseUrlGroup(e){this.gullet.lexer.setCatcode("%",13),this.gullet.lexer.setCatcode("~",12);var t=this.parseStringGroup("url",e);if(this.gullet.lexer.setCatcode("%",14),this.gullet.lexer.setCatcode("~",13),null==t)return null;var r=t.text.replace(/\\([#$%&~_^{}])/g,"$1");return{type:"url",mode:this.mode,url:r}}parseArgumentGroup(e,t){var r=this.gullet.scanArgument(e);if(null==r)return null;var a=this.mode;t&&this.switchMode(t),this.gullet.beginGroup();var n=this.parseExpression(!1,"EOF");this.expect("EOF"),this.gullet.endGroup();var i={type:"ordgroup",mode:this.mode,loc:r.loc,body:n};return t&&this.switchMode(a),i}parseGroup(e,t){var r,a=this.fetch(),n=a.text;if("{"===n||"\\begingroup"===n){this.consume();var i="{"===n?"}":"\\endgroup";this.gullet.beginGroup();var o=this.parseExpression(!1,i),l=this.fetch();this.expect(i),this.gullet.endGroup(),r={type:"ordgroup",mode:this.mode,loc:ye.range(a,l),body:o,semisimple:"\\begingroup"===n||void 0}}else if(null==(r=this.parseFunction(t,e)||this.parseSymbol())&&"\\"===n[0]&&!oi.hasOwnProperty(n)){if(this.settings.throwOnError)throw new we("Undefined control sequence: "+n,a);r=this.formatUnsupportedCmd(n),this.consume()}return r}formLigatures(e){for(var t=e.length-1,r=0;r<t;++r){var a=e[r],n=a.text;"-"===n&&"-"===e[r+1].text&&(r+1<t&&"-"===e[r+2].text?(e.splice(r,3,{type:"textord",mode:"text",loc:ye.range(a,e[r+2]),text:"---"}),t-=2):(e.splice(r,2,{type:"textord",mode:"text",loc:ye.range(a,e[r+1]),text:"--"}),t-=1)),"'"!==n&&"`"!==n||e[r+1].text!==n||(e.splice(r,2,{type:"textord",mode:"text",loc:ye.range(a,e[r+1]),text:n+n}),t-=1)}}parseSymbol(){var e=this.fetch(),t=e.text;if(/^\\verb[^a-zA-Z]/.test(t)){this.consume();var r=t.slice(5),a="*"===r.charAt(0);if(a&&(r=r.slice(1)),r.length<2||r.charAt(0)!==r.slice(-1))throw new we("\\verb assertion failed --\n please report what input caused this bug");return{type:"verb",mode:"text",body:r=r.slice(1,-1),star:a}}hi.hasOwnProperty(t[0])&&!wt[this.mode][t[0]]&&(this.settings.strict&&"math"===this.mode&&this.settings.reportNonstrict("unicodeTextInMathMode",'Accented Unicode text character "'+t[0]+'" used in math mode',e),t=hi[t[0]]+t.slice(1));var n,i=Wn.exec(t);if(i&&("i"===(t=t.substring(0,i.index))?t="ı":"j"===t&&(t="ȷ")),wt[this.mode][t]){this.settings.strict&&"math"===this.mode&&Qt.indexOf(t)>=0&&this.settings.reportNonstrict("unicodeTextInMathMode",'Latin-1/Unicode text character "'+t[0]+'" used in math mode',e);var o,l=wt[this.mode][t].group,s=ye.range(e);if(yt.hasOwnProperty(l)){var c=l;o={type:"atom",mode:this.mode,family:c,loc:s,text:t}}else o={type:l,mode:this.mode,loc:s,text:t};n=o}else{if(!(t.charCodeAt(0)>=128))return null;this.settings.strict&&(Ve(t.charCodeAt(0))?"math"===this.mode&&this.settings.reportNonstrict("unicodeTextInMathMode",'Unicode text character "'+t[0]+'" used in math mode',e):this.settings.reportNonstrict("unknownSymbol",'Unrecognized Unicode character "'+t[0]+'" ('+t.charCodeAt(0)+")",e)),n={type:"textord",mode:"text",loc:ye.range(e),text:t}}if(this.consume(),i)for(var m=0;m<i[0].length;m++){var h=i[0][m];if(!mi[h])throw new we("Unknown accent ' "+h+"'",e);var u=mi[h][this.mode]||mi[h].text;if(!u)throw new we("Accent "+h+" unsupported in "+this.mode+" mode",e);n={type:"accent",mode:this.mode,loc:ye.range(e),label:u,isStretchy:!1,isShifty:!0,base:n}}return n}}ui.endOfExpression=["}","\\endgroup","\\end","\\right","&"];var pi=function(e,t){if(!("string"==typeof e||e instanceof String))throw new TypeError("KaTeX can only parse string typed expression");var r=new ui(e,t);delete r.gullet.macros.current["\\df@tag"];var a=r.parse();if(delete r.gullet.macros.current["\\current@color"],delete r.gullet.macros.current["\\color"],r.gullet.macros.get("\\df@tag")){if(!t.displayMode)throw new we("\\tag works only in display equations");a=[{type:"tag",mode:"text",body:a,tag:r.subparse([new xe("\\df@tag")])}]}return a};"undefined"!=typeof document&&"CSS1Compat"!==document.compatMode&&("undefined"!=typeof console&&console.warn("Warning: KaTeX doesn't work in quirks mode. Make sure your website has a suitable doctype."));var di=function(e,t,r){if(r.throwOnError||!(e instanceof we))throw e;var a=dr.makeSpan(["katex-error"],[new dt(t)]);return a.setAttribute("title",e.toString()),a.setAttribute("style","color:"+r.errorColor),a},fi=function(e,t){var r=new Te(t);try{return function(e,t,r){var a,n=Qr(r);if("mathml"===r.output)return Kr(e,t,n,r.displayMode,!0);if("html"===r.output){var i=jr(e,n);a=dr.makeSpan(["katex"],[i])}else{var o=Kr(e,t,n,r.displayMode,!1),l=jr(e,n);a=dr.makeSpan(["katex"],[o,l])}return ea(a,r)}(pi(e,r),e,r)}catch(t){return di(t,e,r)}},gi=function(e,t){return fi(e,t).toMarkup()},vi=function(t){var a=t.textObject.equation.expression,n=r((function(){return gi(a,{throwOnError:!1,output:"mathml"})}),[a]);return e.createElement("span",{className:"rotion-richtext-equation",dangerouslySetInnerHTML:{__html:n}})},bi=function(t){var r=t.textObject;if(!r)return e.createElement(e.Fragment,null);var a=r.type,n=r.plain_text;switch(a){case"text":return e.createElement(be,{textObject:r});case"mention":return e.createElement(fe,{textObject:r},n);case"equation":return e.createElement(vi,{textObject:r});default:return e.createElement(e.Fragment,null)}},yi=function(t){var r=t.textObjects;return e.createElement("div",{className:"rotion-gallery-title"},r.map((function(t,r){return e.createElement(bi,{key:"richtext-".concat(r),textObject:t})})))},xi=function(r){var n=r.date;if(null===n)return e.createElement(e.Fragment,null);var i=n.start,o=n.end,l=t(""),s=l[0],c=l[1],m=t(""),h=m[0],u=m[1];return a((function(){var e,t=y(null===(e=null===window||void 0===window?void 0:window.navigator)||void 0===e?void 0:e.language),r=t.dateF,a=t.timeF;c(se(i).format(i.length>10?"".concat(r," ").concat(a):r)),o&&u(se(o).format(o.length>10?"".concat(r," ").concat(a):r))}),[s,h]),e.createElement("div",{className:"rotion-gallery-date"},s,o&&" → ".concat(h))},wi=function(t){var r=t.textObjects,a=t.size;return e.createElement("div",{className:"rotion-gallery-richtext rotion-gallery-richtext-".concat(a||"medium")},r.map((function(t,r){return e.createElement(bi,{key:"richtext-".concat(r),textObject:t})})))},ki=function(t){var r=t.pathname,a=t.link,n=t.query,i=t.children,o=n?{pathname:r,query:n}:r;if(!o)return e.createElement("span",{className:"rotion-gallery-multiselect-tag"},i);if(a){var l=a;return e.createElement(l,{className:"rotion-gallery-multiselect-tag rotion-gallery-multiselect-link",href:o},i)}return e.createElement("a",{className:"rotion-gallery-multiselect-tag rotion-gallery-multiselect-link",href:r},i)},Ei=function(t){var r=t.multiSelect,a=t.options||{},n=a.pathname,i=a.link,o=a.query;return e.createElement("ul",{className:"rotion-gallery-multiselect-ul"},r.map((function(t){return e.createElement("li",{key:t.id,className:"rotion-gallery-multiselect-li rotion-gallery-multiselect-".concat(t.color)},e.createElement(ki,{pathname:n?"".concat(n,"/").concat(encodeURIComponent(t.name)):void 0,link:i,query:o},t.name))})))},Mi=function(t){var r=t.url;if(!r)return e.createElement(e.Fragment,null);var a=x(r),n=a.domain,i=a.omittedPath;return e.createElement("div",{className:"rotion-gallery-url"},e.createElement("a",{className:"rotion-gallery-url-link",href:r,rel:"noreferrer",target:"_blank"},e.createElement("svg",{className:"rotion-gallery-url-chain",width:"16",height:"16",viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor"},e.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4.4 3h3.085a3.4 3.4 0 0 1 3.4 3.4v.205A3.4 3.4 0 0 1 7.485 10H7V9h.485A2.4 2.4 0 0 0 9.88 6.61V6.4A2.4 2.4 0 0 0 7.49 4H4.4A2.4 2.4 0 0 0 2 6.4v.205A2.394 2.394 0 0 0 4 8.96v1a3.4 3.4 0 0 1-3-3.35V6.4A3.405 3.405 0 0 1 4.4 3zM12 7.04v-1a3.4 3.4 0 0 1 3 3.36v.205A3.405 3.405 0 0 1 11.605 13h-3.09A3.4 3.4 0 0 1 5.12 9.61V9.4A3.4 3.4 0 0 1 8.515 6H9v1h-.485A2.4 2.4 0 0 0 6.12 9.4v.205A2.4 2.4 0 0 0 8.515 12h3.09A2.4 2.4 0 0 0 14 9.61V9.4a2.394 2.394 0 0 0-2-2.36z"})),e.createElement("span",{className:"rotion-gallery-url-domain"},n),e.createElement("span",{className:"rotion-gallery-url-path"},i)))},Ci=function(){return e.createElement("div",{className:"rotion-checkbox-checked"},e.createElement("div",{className:"rotion-checkbox-checked-inner"},e.createElement("svg",{className:"rotion-checkbox-checked-checkbox",viewBox:"0 0 14 14"},e.createElement("polygon",{points:"5.5 11.9993304 14 3.49933039 12.5 2 5.5 8.99933039 1.5 4.9968652 0 6.49933039"}))))},Si=function(){return e.createElement("div",{className:"rotion-checkbox-unchecked"},e.createElement("svg",{className:"rotion-checkbox-unchecked-checkbox",viewBox:"0 0 16 16"},e.createElement("path",{d:"M1.5,1.5 L1.5,14.5 L14.5,14.5 L14.5,1.5 L1.5,1.5 Z M0,0 L16,0 L16,16 L0,16 L0,0 Z"})))},Ni=function(t){return t.bool?e.createElement(Ci,null):e.createElement(Si,null)},zi=function(t){var r=t.prefix,a=t.suffix,n=t.children;return e.createElement(e.Fragment,null,r&&e.createElement("span",{className:"rotion-prefix"},r),n,a&&e.createElement("span",{className:"rotion-suffix"},a))},Ti=function(t){var r=t.checked,a=t.options||{},n=a.prefix,i=a.suffix;return e.createElement("div",{className:"rotion-gallery-checkbox"},e.createElement(zi,{prefix:n,suffix:i},e.createElement(Ni,{bool:r})))},Ai=function(t){var r=t.number,a=t.options||{},n=a.prefix,i=a.suffix;return e.createElement("div",{className:"rotion-gallery-number"},e.createElement(zi,{prefix:n,suffix:i},r))},qi=function(t){var r=t.pathname,a=t.link,n=t.query,i=t.children;if(!r)return e.createElement("span",{className:"rotion-gallery-select-tag"},i);if(a){var o=n?{pathname:r,query:n}:r,l=a;return e.createElement(l,{className:"rotion-gallery-select-tag rotion-gallery-select-link",href:o},i)}return e.createElement("a",{className:"rotion-gallery-select-tag rotion-gallery-select-link",href:r},i)},Li=function(t){var r=t.select,a=t.options,n=r.name,i=r.color,o=a||{},l=o.pathname,s=o.link,c=o.query;return e.createElement("div",{className:"rotion-gallery-select"},e.createElement("span",{className:"rotion-gallery-select-wrapper rotion-gallery-select-".concat(i)},e.createElement(qi,{pathname:l?"".concat(l,"/").concat(encodeURIComponent(n)):void 0,link:s,query:c},n)))},Bi=function(t){var r=t.number,a=t.options||{},n=a.prefix,i=a.suffix;return e.createElement("div",{className:"rotion-gallery-formula"},e.createElement(zi,{prefix:n,suffix:i},r))},Oi=function(t){var r=t.property,a=t.options;if(!r||!r.type)return console.log("property empty in gallery handler: ",r),e.createElement(e.Fragment,null);switch(r.type){case"title":return e.createElement(yi,{textObjects:r.title});case"rich_text":return e.createElement(wi,{textObjects:r.rich_text});case"multi_select":return e.createElement(Ei,{multiSelect:r.multi_select,options:a});case"select":return e.createElement(Li,{select:r.select,options:a});case"date":return e.createElement(xi,{date:r.date});case"url":return e.createElement(Mi,{url:r.url});case"checkbox":return e.createElement(Ti,{checked:r.checkbox,options:a});case"number":return e.createElement(Ai,{number:r.number,options:a});case"formula":return e.createElement(Bi,{number:r.formula.number,options:a});default:return console.log("unsupport database property:",r),e.createElement(e.Fragment,null)}},Hi=function(t){var r=t.children,a=t.link,n=t.query,i=t.pathname;if(i&&a&&n){var o=a;return e.createElement(o,{className:"rotion-gallery-card rotion-gallery-link",href:{pathname:i,query:n}},r)}if(i&&a){o=a;return e.createElement(o,{className:"rotion-gallery-card rotion-gallery-link",href:i},r)}return i?e.createElement("a",{className:"rotion-gallery-card rotion-gallery-link",href:i},r):e.createElement("div",{className:"rotion-gallery-card"},r)},Ii={small:"100px",medium:"146px",large:"180px"},Ri=function(t){var r=t.src,a=t.options||{},n=a.size,i=a.height,o=a.fit,l="";return l=n&&i?"string"==typeof i?i:i[n]:Ii[n||"medium"],e.createElement("div",{className:"rotion-gallery-preview",style:{height:l}},e.createElement("img",{src:r,className:"rotion-gallery-preview-img rotion-gallery-preview-".concat(o?"fit":"nofit"),style:{height:l}}))};function Di(e,t,r){if(!r)return t;var a=r||{},n=a.href,i=a.prefix,o=a.suffix;return n&&n[e]&&(t.pathname=n[e]),i&&i[e]&&(t.prefix=i[e]),o&&o[e]&&(t.suffix=o[e]),t}var Fi=function(t){var r,a=t.keys,n=t.page,i=t.options,o=function(e){for(var t in e.properties)if("title"===e.properties[t].type)return t}(n);if(!o)return e.createElement(e.Fragment,null);var l=i||{},s=l.href,c=l.link,m=l.query,h=l.image,u={link:c,query:m};if(s&&s[o]){var p=d(s[o]),g=p[0],v=p[1];u.pathname=""===v?g:"".concat(g).concat(f(v,n))}return e.createElement(Hi,{pathname:u.pathname,link:c,query:m},(null==h?void 0:h.preview)&&(null===(r=n.cover)||void 0===r?void 0:r.src)&&e.createElement(Ri,{src:n.cover.src,options:h}),e.createElement("div",{className:"rotion-gallery-card-text"},a.map((function(t,r){return e.createElement("div",{key:"".concat(n.id).concat(t),className:"field".concat(r)},e.createElement(Oi,{property:n.properties[t],options:Di(t,structuredClone(u),i)}))}))))},ji=function(t){var r=t.keys,a=t.db,n=t.options;void 0===n&&(n={});var i=n.image;void 0===i&&(n.image={});var o=i||{},l=o.preview,s=void 0===l?"cover":l,c=o.fit,m=void 0===c||c,h=o.size,u=void 0===h?"medium":h;return n.image={preview:s,fit:m,size:u},e.createElement("div",{className:"rotion-gallery ".concat(m?"rotion-gallery-fit":"")},e.createElement("div",{className:"rotion-gallery-inner rotion-gallery-".concat(u)},a.results.map((function(t){return e.createElement(Fi,{key:t.id,keys:r,page:t,options:n})}))))},Vi=function(t){var r=t.textObjects,a=t.options,n=function(){return"rotion-list-title-wrapper ".concat((null==a?void 0:a.pathname)?"rotion-list-title-link":"")};if((null==a?void 0:a.link)&&(null==a?void 0:a.pathname)&&(null==a?void 0:a.query)){var i=a.link;return e.createElement(i,{className:n(),href:{pathname:a.pathname,query:a.query}},r.map((function(t,r){return e.createElement(bi,{key:"richtext-".concat(r),textObject:t})})))}if((null==a?void 0:a.link)&&(null==a?void 0:a.pathname)){i=a.link;return e.createElement(i,{className:n(),href:a.pathname},r.map((function(t,r){return e.createElement(bi,{key:"richtext-".concat(r),textObject:t})})))}return(null==a?void 0:a.pathname)?e.createElement("a",{className:n(),href:a.pathname},r.map((function(t,r){return e.createElement(bi,{key:"richtext-".concat(r),textObject:t})}))):e.createElement("span",{className:n()},r.map((function(t,r){return e.createElement(bi,{key:"richtext-".concat(r),textObject:t})})))},_i=function(t){var r=t.textObjects,a=t.options;return e.createElement("div",{className:"rotion-list-title"},e.createElement(Vi,{textObjects:r,options:a}))},Pi=function(r){var n=r.date;if(null===n)return e.createElement(e.Fragment,null);var i=n.start,o=n.end,l=t(""),s=l[0],c=l[1],m=t(""),h=m[0],u=m[1];return a((function(){var e,t=y(null===(e=null===window||void 0===window?void 0:window.navigator)||void 0===e?void 0:e.language),r=t.dateF,a=t.timeF;c(se(i).format(i.length>10?"".concat(r," ").concat(a):r)),o&&u(se(o).format(o.length>10?"".concat(r," ").concat(a):r))}),[s,h]),e.createElement("div",{className:"rotion-list-date"},s,o&&" → ".concat(h))},Ui=function(t){var r=t.textObjects;return e.createElement("div",{className:"rotion-list-richtext"},r.map((function(t,r){return e.createElement(bi,{key:"richtext-".concat(r),textObject:t})})))},Yi=function(t){var r=t.color,a=t.pathname,n=t.link,i=t.query,o=t.children,l=i?{pathname:a,query:i}:a,s=function(e){return"rotion-list-multiselect-wrapper ".concat(l?"rotion-list-multiselect-link":""," rotion-list-multiselect-").concat(e)};if(!l)return e.createElement("span",{className:s(r)},o);if(n){var c=n;return e.createElement(c,{className:s(r),href:l},o)}return e.createElement("a",{className:s(r),href:a},o)},Gi=function(t){var r=t.multiSelect,a=t.options;if(!r)return e.createElement(e.Fragment,null);var n=a||{},i=n.pathname,o=n.link,l=n.query;return e.createElement("ul",{className:"rotion-list-multiselect-ul"},r.map((function(t){return e.createElement("li",{key:t.id,className:"rotion-list-multiselect-li"},e.createElement(Yi,{pathname:i?"".concat(i,"/").concat(encodeURIComponent(t.name)):void 0,color:t.color,link:o,query:l},t.name))})))},Zi=function(t){var r=t.color,a=t.pathname,n=t.link,i=t.query,o=t.children,l=i?{pathname:a,query:i}:a,s=function(e){return"rotion-list-select-wrapper ".concat(l?"rotion-list-select-link":""," rotion-list-select-").concat(e)};if(!l)return e.createElement("span",{className:s(r)},o);if(n){var c=n;return e.createElement(c,{className:s(r),href:l},o)}return e.createElement("a",{className:s(r),href:a},o)},Xi=function(t){var r=t.select,a=t.options;if(!r)return e.createElement(e.Fragment,null);var n=r.name,i=r.color,o=a||{},l=o.pathname,s=o.link,c=o.query;return e.createElement("div",{className:"rotion-list-select"},e.createElement(Zi,{pathname:l?"".concat(l,"/").concat(encodeURIComponent(n)):void 0,color:i,link:s,query:c},n))},Wi=function(t){var r=t.url;if(!r)return e.createElement(e.Fragment,null);var a=x(r),n=a.domain,i=a.omittedPath;return e.createElement("div",{className:"rotion-list-url"},e.createElement("a",{className:"rotion-list-url-link",href:r,rel:"noreferrer",target:"_blank"},e.createElement("svg",{className:"rotion-list-url-chain",width:"16",height:"16",viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor"},e.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4.4 3h3.085a3.4 3.4 0 0 1 3.4 3.4v.205A3.4 3.4 0 0 1 7.485 10H7V9h.485A2.4 2.4 0 0 0 9.88 6.61V6.4A2.4 2.4 0 0 0 7.49 4H4.4A2.4 2.4 0 0 0 2 6.4v.205A2.394 2.394 0 0 0 4 8.96v1a3.4 3.4 0 0 1-3-3.35V6.4A3.405 3.405 0 0 1 4.4 3zM12 7.04v-1a3.4 3.4 0 0 1 3 3.36v.205A3.405 3.405 0 0 1 11.605 13h-3.09A3.4 3.4 0 0 1 5.12 9.61V9.4A3.4 3.4 0 0 1 8.515 6H9v1h-.485A2.4 2.4 0 0 0 6.12 9.4v.205A2.4 2.4 0 0 0 8.515 12h3.09A2.4 2.4 0 0 0 14 9.61V9.4a2.394 2.394 0 0 0-2-2.36z"})),e.createElement("span",{className:"rotion-list-url-domain"},n),e.createElement("span",{className:"rotion-list-url-path"},i)))},$i=function(t){var r=t.checked,a=t.options||{},n=a.prefix,i=a.suffix;return e.createElement("div",{className:"rotion-list-checkbox"},e.createElement(zi,{prefix:n,suffix:i},e.createElement(Ni,{bool:r})))},Ji=function(t){var r=t.number,a=t.options||{},n=a.prefix,i=a.suffix;return e.createElement("div",{className:"rotion-list-number"},e.createElement(zi,{prefix:n,suffix:i},r))},Ki=function(t){var r=t.number,a=t.options||{},n=a.prefix,i=a.suffix;return e.createElement("div",{className:"rotion-list-formula"},e.createElement(zi,{prefix:n,suffix:i},r))},Qi=function(t){var r=t.property,a=t.options;if(!r||!r.type)return console.log("property empty in table handler: ",r),e.createElement(e.Fragment,null);switch(r.type){case"title":return e.createElement(_i,{textObjects:r.title,options:a});case"rich_text":return e.createElement(Ui,{textObjects:r.rich_text});case"url":return e.createElement(Wi,{url:r.url});case"date":return e.createElement(Pi,{date:r.date});case"multi_select":return e.createElement(Gi,{multiSelect:r.multi_select,options:a});case"checkbox":return e.createElement($i,{checked:r.checkbox,options:a});case"number":return e.createElement(Ji,{number:r.number,options:a});case"select":return e.createElement(Xi,{select:r.select,options:a});case"formula":return e.createElement(Ki,{number:r.formula.number,options:a});default:return console.log("unsupport database property:",r),e.createElement(e.Fragment,null)}},eo=function(t){var r=t.name,a=t.page,n=t.options;if("spacer"===r||"dashed"===r||!("properties"in a))return e.createElement(e.Fragment,null);var i=a.properties[r];if(!i)return e.createElement(e.Fragment,null);var o=n||{},l=o.href,s=o.prefix,c=o.suffix,m={link:o.link,query:o.query};if(l&&l[r]){var h=d(l[r]),u=h[0],p=h[1];m.pathname=""===p?u:"".concat(u).concat(f(p,a))}return s&&s[r]&&(m.prefix=s[r]),c&&c[r]&&(m.suffix=c[r]),e.createElement(Qi,{property:i,options:m})};function to(e,t){var r=["rotion-list-column".concat(t)];switch(e){case"spacer":r.push("rotion-list-spacer");break;case"dashed":r.push("rotion-list-dashed")}return r.join(" ")}var ro=function(t){var r=t.keys,a=t.db,n=t.options;return e.createElement("div",{className:"rotion-list"},e.createElement("div",{className:"rotion-list-inner"},a.results.map((function(t){return e.createElement("div",{key:t.id,className:"rotion-list-line"},r.map((function(r,a){return e.createElement("div",{key:"".concat(t.id).concat(r),className:to(r,a)},e.createElement(eo,{name:r,page:t,options:n}))})))}))))},ao=function(t){var r=t.type,a=t.className;switch(r){case"title":return e.createElement("svg",{viewBox:"0 0 14 14",className:a},e.createElement("path",{d:"M7.73943662,8.6971831 C7.77640845,8.7834507 7.81338028,8.8943662 7.81338028,9.00528169 C7.81338028,9.49823944 7.40669014,9.89260563 6.91373239,9.89260563 C6.53169014,9.89260563 6.19894366,9.64612676 6.08802817,9.30105634 L5.75528169,8.33978873 L2.05809859,8.33978873 L1.72535211,9.30105634 C1.61443662,9.64612676 1.2693662,9.89260563 0.887323944,9.89260563 C0.394366197,9.89260563 0,9.49823944 0,9.00528169 C0,8.8943662 0.0246478873,8.7834507 0.0616197183,8.6971831 L2.46478873,2.48591549 C2.68661972,1.90669014 3.24119718,1.5 3.90669014,1.5 C4.55985915,1.5 5.12676056,1.90669014 5.34859155,2.48591549 L7.73943662,8.6971831 Z M2.60035211,6.82394366 L5.21302817,6.82394366 L3.90669014,3.10211268 L2.60035211,6.82394366 Z M11.3996479,3.70598592 C12.7552817,3.70598592 14,4.24823944 14,5.96126761 L14,9.07922535 C14,9.52288732 13.6549296,9.89260563 13.2112676,9.89260563 C12.8169014,9.89260563 12.471831,9.59683099 12.4225352,9.19014085 C12.028169,9.6584507 11.3257042,9.95422535 10.5492958,9.95422535 C9.60035211,9.95422535 8.47887324,9.31338028 8.47887324,7.98239437 C8.47887324,6.58978873 9.60035211,6.08450704 10.5492958,6.08450704 C11.3380282,6.08450704 12.040493,6.33098592 12.4348592,6.81161972 L12.4348592,5.98591549 C12.4348592,5.38204225 11.9172535,4.98767606 11.1285211,4.98767606 C10.6602113,4.98767606 10.2411972,5.11091549 9.80985915,5.38204225 C9.72359155,5.43133803 9.61267606,5.46830986 9.50176056,5.46830986 C9.18133803,5.46830986 8.91021127,5.1971831 8.91021127,4.86443662 C8.91021127,4.64260563 9.0334507,4.44542254 9.19366197,4.34683099 C9.87147887,3.90316901 10.6232394,3.70598592 11.3996479,3.70598592 Z M11.1778169,8.8943662 C11.6830986,8.8943662 12.1760563,8.72183099 12.4348592,8.37676056 L12.4348592,7.63732394 C12.1760563,7.29225352 11.6830986,7.11971831 11.1778169,7.11971831 C10.5616197,7.11971831 10.056338,7.45246479 10.056338,8.0193662 C10.056338,8.57394366 10.5616197,8.8943662 11.1778169,8.8943662 Z M0.65625,11.125 L13.34375,11.125 C13.7061869,11.125 14,11.4188131 14,11.78125 C14,12.1436869 13.7061869,12.4375 13.34375,12.4375 L0.65625,12.4375 C0.293813133,12.4375 4.43857149e-17,12.1436869 0,11.78125 C-4.43857149e-17,11.4188131 0.293813133,11.125 0.65625,11.125 Z"}));case"date":return e.createElement("svg",{viewBox:"0 0 14 14",className:a},e.createElement("path",{d:"M10.8889,5.5 L3.11111,5.5 L3.11111,7.05556 L10.8889,7.05556 L10.8889,5.5 Z M12.4444,1.05556 L11.6667,1.05556 L11.6667,0 L10.1111,0 L10.1111,1.05556 L3.88889,1.05556 L3.88889,0 L2.33333,0 L2.33333,1.05556 L1.55556,1.05556 C0.692222,1.05556 0.00777777,1.75556 0.00777777,2.61111 L0,12.5 C0,13.3556 0.692222,14 1.55556,14 L12.4444,14 C13.3,14 14,13.3556 14,12.5 L14,2.61111 C14,1.75556 13.3,1.05556 12.4444,1.05556 Z M12.4444,12.5 L1.55556,12.5 L1.55556,3.94444 L12.4444,3.94444 L12.4444,12.5 Z M8.55556,8.61111 L3.11111,8.61111 L3.11111,10.1667 L8.55556,10.1667 L8.55556,8.61111 Z"}));case"rich_text":return e.createElement("svg",{viewBox:"0 0 16 16",className:a},e.createElement("path",{d:"M1.56738 3.25879H14.4258C14.7676 3.25879 15.0479 2.97852 15.0479 2.63672C15.0479 2.29492 14.7744 2.02148 14.4258 2.02148H1.56738C1.21875 2.02148 0.952148 2.29492 0.952148 2.63672C0.952148 2.97852 1.22559 3.25879 1.56738 3.25879ZM1.56738 6.84082H14.4258C14.7676 6.84082 15.0479 6.56055 15.0479 6.21875C15.0479 5.87695 14.7744 5.60352 14.4258 5.60352H1.56738C1.21875 5.60352 0.952148 5.87695 0.952148 6.21875C0.952148 6.56055 1.22559 6.84082 1.56738 6.84082ZM1.56738 10.4229H14.4258C14.7676 10.4229 15.0479 10.1426 15.0479 9.80078C15.0479 9.45898 14.7744 9.18555 14.4258 9.18555H1.56738C1.21875 9.18555 0.952148 9.45898 0.952148 9.80078C0.952148 10.1426 1.22559 10.4229 1.56738 10.4229ZM1.56738 14.0049H8.75879C9.10059 14.0049 9.38086 13.7246 9.38086 13.3828C9.38086 13.041 9.10742 12.7676 8.75879 12.7676H1.56738C1.21875 12.7676 0.952148 13.041 0.952148 13.3828C0.952148 13.7246 1.22559 14.0049 1.56738 14.0049Z"}));case"multi_select":return e.createElement("svg",{viewBox:"0 0 14 14",className:a},e.createElement("path",{d:"M4,3 C4,2.447715 4.447715,2 5,2 L12,2 C12.5523,2 13,2.447716 13,3 C13,3.55228 12.5523,4 12,4 L5,4 C4.447715,4 4,3.55228 4,3 Z M4,7 C4,6.447715 4.447715,6 5,6 L12,6 C12.5523,6 13,6.447716 13,7 C13,7.55228 12.5523,8 12,8 L5,8 C4.447715,8 4,7.55228 4,7 Z M4,11 C4,10.447715 4.447715,10 5,10 L12,10 C12.5523,10 13,10.447716 13,11 C13,11.55228 12.5523,12 12,12 L5,12 C4.447715,12 4,11.55228 4,11 Z M2,4 C1.44771525,4 1,3.55228475 1,3 C1,2.44771525 1.44771525,2 2,2 C2.55228475,2 3,2.44771525 3,3 C3,3.55228475 2.55228475,4 2,4 Z M2,8 C1.44771525,8 1,7.55228475 1,7 C1,6.44771525 1.44771525,6 2,6 C2.55228475,6 3,6.44771525 3,7 C3,7.55228475 2.55228475,8 2,8 Z M2,12 C1.44771525,12 1,11.5522847 1,11 C1,10.4477153 1.44771525,10 2,10 C2.55228475,10 3,10.4477153 3,11 C3,11.5522847 2.55228475,12 2,12 Z"}));case"url":return e.createElement("svg",{viewBox:"0 0 14 14",className:a},e.createElement("path",{d:"M3.73333,3.86667 L7.46667,3.86667 C8.49613,3.86667 9.33333,4.70387 9.33333,5.73333 C9.33333,6.7628 8.49613,7.6 7.46667,7.6 L6.53333,7.6 C6.01813,7.6 5.6,8.0186 5.6,8.53333 C5.6,9.04807 6.01813,9.46667 6.53333,9.46667 L7.46667,9.46667 C9.5284,9.46667 11.2,7.79507 11.2,5.73333 C11.2,3.6716 9.5284,2 7.46667,2 L3.73333,2 C1.6716,2 0,3.6716 0,5.73333 C0,7.124 0.762067,8.33453 1.88953,8.97713 C1.87553,8.83107 1.86667,8.6836 1.86667,8.53333 C1.86667,7.92013 1.98753,7.33447 2.2036,6.7978 C1.99267,6.4954 1.86667,6.12953 1.86667,5.73333 C1.86667,4.70387 2.70387,3.86667 3.73333,3.86667 Z M12.1095,5.28907 C12.1231,5.4356 12.1333,5.58307 12.1333,5.73333 C12.1333,6.34607 12.0101,6.9294 11.7931,7.46513 C12.0059,7.768 12.1333,8.13573 12.1333,8.53333 C12.1333,9.5628 11.2961,10.4 10.2667,10.4 L6.53333,10.4 C5.50387,10.4 4.66667,9.5628 4.66667,8.53333 C4.66667,7.50387 5.50387,6.66667 6.53333,6.66667 L7.46667,6.66667 C7.98187,6.66667 8.4,6.24807 8.4,5.73333 C8.4,5.2186 7.98187,4.8 7.46667,4.8 L6.53333,4.8 C4.4716,4.8 2.8,6.4716 2.8,8.53333 C2.8,10.59507 4.4716,12.2667 6.53333,12.2667 L10.2667,12.2667 C12.3284,12.2667 14,10.59507 14,8.53333 C14,7.14267 13.2375,5.93167 12.1095,5.28907 Z"}));case"number":return e.createElement("svg",{viewBox:"0 0 16 16",className:a},e.createElement("path",{d:"M2.4834 10.9902H4.33594L3.75488 13.8887C3.74121 13.9639 3.72754 14.0664 3.72754 14.1416C3.72754 14.5381 3.99414 14.7637 4.39746 14.7637C4.81445 14.7637 5.09473 14.5449 5.18359 14.1143L5.80566 10.9902H8.79297L8.21191 13.8887C8.19824 13.9639 8.18457 14.0664 8.18457 14.1416C8.18457 14.5381 8.45117 14.7637 8.85449 14.7637C9.27148 14.7637 9.55176 14.5449 9.63379 14.1143L10.2627 10.9902H12.4502C12.9287 10.9902 13.2432 10.6758 13.2432 10.2109C13.2432 9.8418 12.9902 9.56836 12.6006 9.56836H10.5498L11.2129 6.28711H13.3662C13.8379 6.28711 14.1523 5.96582 14.1523 5.50098C14.1523 5.13184 13.9062 4.8584 13.5098 4.8584H11.5L12.0195 2.27441C12.0264 2.21973 12.0469 2.11035 12.0469 2.01465C12.0469 1.625 11.7666 1.39258 11.3633 1.39258C10.9053 1.39258 10.6797 1.63867 10.5977 2.05566L10.0303 4.8584H7.04297L7.5625 2.27441C7.57617 2.21973 7.58984 2.11035 7.58984 2.01465C7.58984 1.625 7.30957 1.39258 6.91309 1.39258C6.44824 1.39258 6.21582 1.63867 6.13379 2.05566L5.57324 4.8584H3.54297C3.06445 4.8584 2.75 5.18652 2.75 5.65137C2.75 6.03418 3.00293 6.28711 3.39258 6.28711H5.28613L4.62305 9.56836H2.63379C2.15527 9.56836 1.84082 9.89648 1.84082 10.3613C1.84082 10.7373 2.09375 10.9902 2.4834 10.9902ZM6.09277 9.56836L6.75586 6.28711H9.74316L9.08008 9.56836H6.09277Z"}));case"checkbox":return e.createElement("svg",{viewBox:"0 0 14 14",className:a},e.createElement("path",{d:"M0,3 C0,1.34314 1.34326,0 3,0 L11,0 C12.6567,0 14,1.34314 14,3 L14,11 C14,12.6569 12.6567,14 11,14 L3,14 C1.34326,14 0,12.6569 0,11 L0,3 Z M3,1.5 C2.17139,1.5 1.5,2.17157 1.5,3 L1.5,11 C1.5,11.8284 2.17139,12.5 3,12.5 L11,12.5 C11.8286,12.5 12.5,11.8284 12.5,11 L12.5,3 C12.5,2.17157 11.8286,1.5 11,1.5 L3,1.5 Z M2.83252,6.8161 L3.39893,6.27399 L3.57617,6.10425 L3.92334,5.77216 L4.26904,6.10559 L4.44531,6.27582 L5.58398,7.37402 L9.28271,3.81073 L9.45996,3.64008 L9.80664,3.3056 L10.1538,3.63989 L10.3311,3.81067 L10.8936,4.35303 L11.0708,4.52399 L11.4434,4.88379 L11.0708,5.24353 L10.8936,5.41437 L6.1084,10.0291 L5.93115,10.2 L5.58398,10.5344 L5.23682,10.2 L5.05957,10.0292 L2.83057,7.87946 L2.65283,7.70801 L2.27832,7.34674 L2.6543,6.98694 L2.83252,6.8161 Z"}));case"select":return e.createElement("svg",{viewBox:"0 0 14 14",className:a},e.createElement("path",{d:"M7,13 C10.31348,13 13,10.31371 13,7 C13,3.68629 10.31348,1 7,1 C3.68652,1 1,3.68629 1,7 C1,10.31371 3.68652,13 7,13 Z M3.75098,5.32278 C3.64893,5.19142 3.74268,5 3.90869,5 L10.09131,5 C10.25732,5 10.35107,5.19142 10.24902,5.32278 L7.15771,9.29703 C7.07764,9.39998 6.92236,9.39998 6.84229,9.29703 L3.75098,5.32278 Z"}));case"status":return e.createElement("svg",{viewBox:"0 0 16 16",className:a},e.createElement("path",{d:"M8.75488 1.02344C8.75488 0.613281 8.41309 0.264648 8.00293 0.264648C7.59277 0.264648 7.25098 0.613281 7.25098 1.02344V3.11523C7.25098 3.51855 7.59277 3.86719 8.00293 3.86719C8.41309 3.86719 8.75488 3.51855 8.75488 3.11523V1.02344ZM3.91504 5.0293C4.20215 5.31641 4.69434 5.32324 4.97461 5.03613C5.26855 4.74902 5.26855 4.25684 4.98145 3.96973L3.53906 2.52051C3.25195 2.2334 2.7666 2.21973 2.47949 2.50684C2.19238 2.79395 2.18555 3.28613 2.47266 3.57324L3.91504 5.0293ZM10.9629 4.01758C10.6826 4.30469 10.6826 4.79688 10.9697 5.08398C11.2568 5.37109 11.749 5.36426 12.0361 5.07715L13.4854 3.62793C13.7725 3.34082 13.7725 2.84863 13.4785 2.55469C13.1982 2.27441 12.7061 2.27441 12.4189 2.56152L10.9629 4.01758ZM15.0234 8.78906C15.4336 8.78906 15.7822 8.44727 15.7822 8.03711C15.7822 7.62695 15.4336 7.28516 15.0234 7.28516H12.9385C12.5283 7.28516 12.1797 7.62695 12.1797 8.03711C12.1797 8.44727 12.5283 8.78906 12.9385 8.78906H15.0234ZM0.975586 7.28516C0.56543 7.28516 0.223633 7.62695 0.223633 8.03711C0.223633 8.44727 0.56543 8.78906 0.975586 8.78906H3.07422C3.48438 8.78906 3.83301 8.44727 3.83301 8.03711C3.83301 7.62695 3.48438 7.28516 3.07422 7.28516H0.975586ZM12.0361 10.9902C11.749 10.71 11.2568 10.71 10.9629 10.9971C10.6826 11.2842 10.6826 11.7764 10.9697 12.0635L12.4258 13.5127C12.7129 13.7998 13.2051 13.793 13.4922 13.5059C13.7793 13.2256 13.7725 12.7266 13.4854 12.4395L12.0361 10.9902ZM2.52051 12.4395C2.22656 12.7266 2.22656 13.2188 2.50684 13.5059C2.79395 13.793 3.28613 13.7998 3.57324 13.5127L5.02246 12.0703C5.31641 11.7832 5.31641 11.291 5.03613 11.0039C4.74902 10.7168 4.25684 10.71 3.96973 10.9971L2.52051 12.4395ZM8.75488 12.9658C8.75488 12.5557 8.41309 12.207 8.00293 12.207C7.59277 12.207 7.25098 12.5557 7.25098 12.9658V15.0576C7.25098 15.4609 7.59277 15.8096 8.00293 15.8096C8.41309 15.8096 8.75488 15.4609 8.75488 15.0576V12.9658Z"}));case"person":return e.createElement("svg",{viewBox:"0 0 14 14",className:a},e.createElement("path",{d:"M9.625,10.8465 C8.91187,10.2891 8.12088,9.926 7,9.26013 L7,8.71938 C7.21175,8.47612 7.392,8.176 7.53813,7.83213 C7.94587,7.7315 8.3125,7.33425 8.3125,7 C8.3125,6.51788 8.1095,6.32713 7.8715,6.17137 C7.8715,6.15562 7.875,6.14162 7.875,6.125 C7.875,5.41362 7.4375,3.5 5.25,3.5 C3.0625,3.5 2.625,5.4145 2.625,6.125 C2.625,6.14162 2.6285,6.15562 2.6285,6.17137 C2.3905,6.32713 2.1875,6.51788 2.1875,7 C2.1875,7.33425 2.55413,7.7315 2.96187,7.833 C3.108,8.176 3.28825,8.47612 3.5,8.71938 L3.5,9.26013 C2.37912,9.92513 1.58812,10.2882 0.875,10.8465 C0.041125,11.4984 0,12.4688 0,14 L10.5,14 C10.5,12.4688 10.4589,11.4984 9.625,10.8465 Z M13.125,7.3465 C12.4119,6.78912 11.6209,6.426 10.5,5.76013 L10.5,5.21938 C10.7118,4.97613 10.892,4.676 11.0381,4.33213 C11.4459,4.2315 11.8125,3.83425 11.8125,3.5 C11.8125,3.01787 11.6095,2.82713 11.3715,2.67138 C11.3715,2.65562 11.375,2.64162 11.375,2.625 C11.375,1.91363 10.9375,0 8.75,0 C6.5625,0 6.125,1.9145 6.125,2.625 C6.125,2.64162 6.1285,2.65562 6.1285,2.67138 C6.11188,2.68275 6.09787,2.69588 6.08125,2.70725 C7.83212,3.066 8.59688,4.54825 8.72813,5.74787 C8.97575,6.00863 9.1875,6.39625 9.1875,7 C9.1875,7.60288 8.771,8.20312 8.18388,8.51462 C8.127,8.624 8.06662,8.729 8.00275,8.82962 C8.155,8.91537 8.30025,8.99675 8.44025,9.07463 C9.08075,9.4325 9.63375,9.74137 10.164,10.1561 C10.3022,10.2638 10.4204,10.3801 10.5289,10.4991 L14,10.4991 C14,8.96875 13.9589,7.99837 13.125,7.3465 Z"}));case"email":return e.createElement("svg",{viewBox:"0 0 14 14",className:a},e.createElement("path",{d:"M14,6.22508 C14,7.0471 13.8666,7.79918 13.5999,8.48134 C13.3332,9.16351 12.9563,9.69867 12.4692,10.0868 C11.9821,10.475 11.524,10.6862 10.9764,10.6862 C10.5473,10.6862 10.1676,10.5849 9.83705,10.3823 C9.50653,10.1796 9.2688,9.91274 9.12384,9.58165 C8.51065,10.318 7.56114,10.6862 6.5928,10.6862 C5.56647,10.6862 4.75762,10.3823 4.16618,9.77431 C3.57473,9.16636 3.27902,8.33436 3.27902,7.27829 C3.27902,6.0738 3.66752,5.10337 4.44451,4.36697 C5.2215,3.63058 6.2362,3.26239 7.48867,3.26239 C7.98734,3.26239 9.5206,3.47449 9.74131,3.53033 C10.2518,3.65949 10.6003,4.12335 10.5763,4.6417 C10.5697,4.78537 10.5175,5.88115 10.4198,7.92905 C10.4198,8.72253 10.6401,9.11927 11.0808,9.11927 C11.4519,9.11927 11.7476,8.8524 11.968,8.31865 C12.1883,7.78491 12.2985,7.08706 12.2985,6.22508 C12.2985,5.30601 12.1042,4.49399 11.7157,3.78899 C11.3272,3.08399 10.7808,2.54597 10.0762,2.17492 C9.37173,1.80387 8.56719,1.61835 7.66263,1.61835 C6.49134,1.61835 5.47373,1.85525 4.60976,2.32905 C3.74579,2.80286 3.08332,3.48644 2.62234,4.37981 C2.16136,5.27319 1.93089,6.30499 1.93089,7.47523 C1.93089,9.05077 2.35851,10.2595 3.21378,11.1015 C4.06905,11.9435 5.30847,12.3645 6.93203,12.3645 C7.54667,12.3645 8.22216,12.2975 8.95856,12.1633 C9.18419,12.1222 9.47682,12.0555 9.83645,11.9632 C10.2649,11.8532 10.7081,12.0814 10.8607,12.4905 C11.0082,12.8863 10.802,13.3249 10.4001,13.4701 C10.3865,13.475 10.3728,13.4796 10.359,13.4837 C9.30721,13.7996 8.18808,13.9716 7.00161,14 C4.7982,14 3.08041,13.4292 1.84823,12.2875 C0.616061,11.1458 0,9.55883 0,7.52661 C0,6.11661 0.314555,4.8365 0.943688,3.68624 C1.57282,2.53598 2.46867,1.63405 3.63126,0.980429 C4.79385,0.326807 6.13184,0 7.64524,0 C8.9209,0 10.1589,0.290316 11.0634,0.770643 C11.968,1.25097 12.6374,1.99796 13.1824,2.94557 C13.7275,3.89318 14,4.98634 14,6.22508 Z M5.38462,7.23555 C5.38462,8.44263 5.87335,9.04616 6.85083,9.04616 C7.3623,9.04616 7.75159,8.86452 8.01869,8.50126 C8.28579,8.13799 8.44773,7.54734 8.50456,6.72927 L8.61539,4.83286 C8.32555,4.76993 7.9988,4.73846 7.63509,4.73846 C6.92471,4.73846 6.37204,4.96157 5.97707,5.40779 C5.58211,5.854 5.38462,6.46325 5.38462,7.23555 Z"}));case"phone_number":return e.createElement("svg",{viewBox:"0 0 14 14",className:a},e.createElement("path",{d:"M2.20731,0.0127209 C2.1105,-0.0066419 1.99432,-0.00664663 1.91687,0.032079 C0.871279,0.438698 0.212942,1.92964 0.0580392,2.95587 C-0.426031,6.28627 2.20731,9.17133 4.62766,11.0689 C6.77694,12.7534 10.9012,15.5223 13.3409,12.8503 C13.6507,12.5211 14.0186,12.037 13.9993,11.553 C13.9412,10.7397 13.186,10.1588 12.6051,9.71349 C12.1598,9.38432 11.2304,8.47427 10.6495,8.49363 C10.1267,8.51299 9.79754,9.05515 9.46837,9.38432 L8.88748,9.96521 C8.79067,10.062 7.55145,9.24878 7.41591,9.15197 C6.91248,8.8228 6.4284,8.45491 6.00242,8.04829 C5.57644,7.64167 5.18919,7.19632 4.86002,6.73161 C4.7632,6.59607 3.96933,5.41495 4.04678,5.31813 C4.04678,5.31813 4.72448,4.58234 4.91811,4.2919 C5.32473,3.67229 5.63453,3.18822 5.16982,2.45243 C4.99556,2.18135 4.78257,1.96836 4.55021,1.73601 C4.14359,1.34875 3.73698,0.942131 3.27227,0.612963 C3.02055,0.419335 2.59457,0.0708094 2.20731,0.0127209 Z"}));case"file":return e.createElement("svg",{viewBox:"0 0 14 14",className:a},e.createElement("path",{d:"M5.94578,14 C4.62416,14 3.38248,13.4963 2.44892,12.585 C1.514641,11.6736 1,10.4639 1,9.17405 C1.00086108,7.88562 1.514641,6.67434 2.44892,5.76378 L7.45612,0.985988 C8.80142,-0.327216 11.1777,-0.332396 12.5354,0.992848 C13.9369,2.36163 13.9369,4.58722 12.5354,5.95418 L8.03046,10.2414 C7.16278,11.0877 5.73682,11.0894 4.86024,10.2345 C3.98394,9.37789 3.98394,7.98769 4.86024,7.1327 L6.60422,5.4317 L7.87576,6.67196 L6.13177,8.37297 C6.01668,8.48539 6.00003,8.61545 6.00003,8.68335 C6.00003,8.75083 6.01668,8.88103 6.13177,8.99429 C6.36197,9.21689 6.53749,9.21689 6.76768,8.99429 L11.2707,4.70622 C11.9645,4.03016 11.9645,2.91757 11.2638,2.23311 C10.5843,1.57007 9.40045,1.57007 8.72077,2.23311 L3.71342,7.0109 C3.12602,7.58406 2.79837,8.35435 2.79837,9.17405 C2.79837,9.99459 3.12602,10.7654 3.72045,11.3446 C4.90947,12.5062 6.98195,12.5062 8.17096,11.3446 L10.41911,9.15165 L11.6906,10.3919 L9.4425,12.585 C8.50808,13.4963 7.2664,14 5.94578,14 Z"}));case"formula":return e.createElement("svg",{viewBox:"0 0 14 14",className:a},e.createElement("path",{d:"M7.77892,7.06304 L4.62218,11.2875 C4.58556,11.3416 4.55285,11.4392 4.5504,11.5052 C4.5504,11.7022 4.7047,11.8619 4.89562,11.8619 L11.1383,11.8619 C11.6139,11.8619 11.9996,12.2598 11.9996,12.7507 L11.9996,13.1111 C11.9996,13.602 11.6139,14 11.1383,14 L1.861927,14 C1.385853,14 1.00011061,13.602 1.00011061,13.1111 L1.00011061,12.6858 C0.99718092,12.4783 1.0523567,12.3098 1.176868,12.1466 L4.39269,7.79888 C4.74816,7.31841 4.74572,6.65139 4.38683,6.17354 L1.400013,2.19436 C1.27306,2.03028 1.216419,1.85993 1.219349,1.65006 L1.219349,0.888889 C1.219349,0.397968 1.605091,0 2.08117,0 L10.91906,0 C11.3946,0 11.7804,0.397968 11.7804,0.888889 L11.7804,1.24925 C11.7804,1.74017 11.3946,2.13814 10.91906,2.13814 L5.13634,2.13814 C4.94542,2.13814 4.79064,2.29801 4.79064,2.49522 C4.79308,2.56049 4.82482,2.65709 4.86095,2.71087 L7.78038,6.68628 C7.8297,6.74847 7.84435,6.7934 7.84142,6.87363 C7.84435,6.95493 7.82921,7.00048 7.77892,7.06304 Z"}));case"rollup":return e.createElement("svg",{viewBox:"0 0 18 18",className:a},e.createElement("path",{d:"M17,15.6l-5.119-5.119C12.583,9.499,13,8.299,13,7c0-3.314-2.686-6-6-6S1,3.686,1,7s2.686,6,6,6 c1.299,0,2.499-0.417,3.481-1.119L15.6,17L17,15.6z M7,11c-2.209,0-4-1.791-4-4c0-2.209,1.791-4,4-4s4,1.791,4,4 C11,9.209,9.209,11,7,11z"}));case"created_at":case"last_edited_at":return e.createElement("svg",{viewBox:"0 0 14 14",className:a},e.createElement("path",{d:"M7.01356 14.0001C8.8042 14.0001 10.5958 13.3107 11.9575 11.9324C14.681 9.21201 14.6808 4.7603 11.9571 2.04013C9.23336 -0.680043 4.77573 -0.680043 2.05199 2.04013C0.727519 3.36277 0 5.13301 0 6.99553C0 8.8764 0.727811 10.6285 2.05199 11.9509C3.43207 13.3106 5.22243 14.0001 7.01356 14.0001ZM3.72947 7.00914V8.461V8.65543H3.92382H5.34563H8.2794H8.4738V8.461V5.52541V3.37947V3.18502H8.2794H6.82747H6.63307V3.37947V6.81467H3.92382H3.72947V7.00914ZM1.83985 6.99553C1.83985 5.61698 2.38099 4.32597 3.36061 3.3477C5.36746 1.34337 8.64803 1.34062 10.6585 3.33944C10.6613 3.34219 10.6639 3.34494 10.6668 3.3477C12.676 5.3546 12.6763 8.63642 10.6668 10.6434C8.65705 12.6504 5.37031 12.6504 3.36061 10.6434C2.38099 9.66506 1.83985 8.37408 1.83985 6.99553Z"}));case"created_by":case"last_edited_by":return e.createElement("svg",{viewBox:"0 0 14 14",className:a},e.createElement("path",{d:"M13.125,10.0354 C12.5536,9.48588 10.801,8.53125 9.625,7.875 L9.625,7.04112 C9.849,6.71912 10.045,6.37 10.1911,5.98588 C10.5849,5.7435 10.9375,5.28412 10.9375,4.8125 C10.9375,4.35488 10.9323,3.94275 10.4668,3.605 C10.3049,1.5575 9.436,0 7,0 C4.564,0 3.69513,1.5575 3.53325,3.605 C3.06775,3.94275 3.0625,4.35488 3.0625,4.8125 C3.0625,5.28412 3.41513,5.7435 3.80888,5.98588 C3.955,6.37 4.151,6.71912 4.375,7.04112 L4.375,7.875 C3.199,8.53125 1.44638,9.48588 0.875,10.0354 C0.1645,10.7188 0,11.8125 0,14 L14,14 C14,11.8125 13.8364,10.7188 13.125,10.0354 Z"}));default:return e.createElement("span",null,"❓")}},no=function(t){var r=t.options,a=t.children,n=r||{},i=n.pathname,o=n.link,l=n.query;if(i&&o){var s=o;return e.createElement(s,{className:"rotion-table-title-wrapper rotion-table-title-link",href:l?{pathname:i,query:l}:i},a)}return i?e.createElement("a",{className:"rotion-table-title-wrapper rotion-table-title-link",href:i},a):e.createElement("span",{className:"rotion-table-title-wrapper"},a)},io=function(t){var r=t.textObjects,a=t.options;return e.createElement("div",{className:"rotion-table-title"},e.createElement(no,{options:a},r.map((function(t,r){return e.createElement(bi,{key:"richtext-".concat(r),textObject:t})}))))},oo=function(r){var n=r.date;if(null===n)return e.createElement(e.Fragment,null);var i=n.start,o=n.end,l=t(""),s=l[0],c=l[1],m=t(""),h=m[0],u=m[1];return a((function(){var e,t=y(null===(e=null===window||void 0===window?void 0:window.navigator)||void 0===e?void 0:e.language),r=t.dateF,a=t.timeF;c(se(i).format(i.length>10?"".concat(r," ").concat(a):r)),o&&u(se(o).format(o.length>10?"".concat(r," ").concat(a):r))}),[s,h]),e.createElement("div",{className:"rotion-table-date"},s,o&&" → ".concat(h))},lo=function(t){var r=t.textObjects;return r?e.createElement("div",{className:"rotion-table-richtext"},r.map((function(t,r){return e.createElement(bi,{key:"richtext-".concat(r),textObject:t})}))):e.createElement(e.Fragment,null)},so=function(t){var r=t.color,a=t.pathname,n=t.link,i=t.query,o=t.children,l=i?{pathname:a,query:i}:a,s=function(e){return"rotion-table-multiselect-link rotion-table-multiselect-".concat(e)};if(""===l)return e.createElement("span",{className:s(r)},o);if(n){var c=n;return e.createElement(c,{className:s(r),href:l},o)}return e.createElement("a",{className:s(r),href:a},o)},co=function(t){var r=t.multiSelect,a=t.options||{},n=a.pathname,i=a.link,o=a.query;return e.createElement("ul",{className:"rotion-table-multiselect-ul"},r.map((function(t){return e.createElement("li",{key:t.id,className:"rotion-table-multiselect-li"},e.createElement(so,{pathname:n?"".concat(n,"/").concat(encodeURIComponent(t.name)):"",color:t.color,link:i,query:o},t.name))})))},mo=function(t){var r=t.pathname,a=t.color,n=t.link,i=t.query,o=t.children,l=i?{pathname:r,query:i}:r,s=function(e){return"rotion-table-select-link rotion-table-select-".concat(e)};if(""===l)return e.createElement("span",{className:s(a)},o);if(n){var c=n;return e.createElement(c,{className:s(a),href:l},o)}return e.createElement("a",{className:s(a),href:r},o)},ho=function(t){var r=t.select,a=t.options;if(!r)return e.createElement(e.Fragment,null);var n=a||{},i=n.pathname,o=n.link,l=n.query;return e.createElement("div",{className:"rotion-table-select"},e.createElement(mo,{pathname:i?"".concat(i,"/").concat(encodeURIComponent(r.name)):"",color:r.color,link:o,query:l},r.name))},uo=function(t){var r=t.url;if(!r)return e.createElement(e.Fragment,null);var a=x(r),n=a.domain,i=a.omittedPath;return e.createElement("div",{className:"rotion-table-url"},e.createElement("a",{className:"rotion-table-url-link",href:r,rel:"noreferrer",target:"_blank"},e.createElement("span",{className:"rotion-table-url-domain"},n),e.createElement("span",{className:"rotion-table-url-path"},i)))},po=function(t){var r=t.checked,a=t.options;return e.createElement("div",{className:"rotion-table-checkbox"},e.createElement(zi,{prefix:null==a?void 0:a.prefix,suffix:null==a?void 0:a.suffix},e.createElement(Ni,{bool:r})))},fo=function(t){var r=t.number,a=t.options||{},n=a.prefix,i=a.suffix;return e.createElement("div",{className:"rotion-table-number"},e.createElement(zi,{prefix:n,suffix:i},r))},go=function(t){var r=t.number,a=t.options;return e.createElement("div",{className:"rotion-table-formula"},e.createElement(zi,{prefix:null==a?void 0:a.prefix,suffix:null==a?void 0:a.suffix},r))},vo=function(t){var r=t.property,a=t.options;if(!r||!r.type)return console.log("property empty in table handler: ",r),e.createElement(e.Fragment,null);switch(r.type){case"title":return e.createElement(io,{textObjects:r.title,options:a});case"rich_text":return e.createElement(lo,{textObjects:r.rich_text});case"url":return e.createElement(uo,{url:r.url});case"date":return e.createElement(oo,{date:r.date});case"multi_select":return e.createElement(co,{multiSelect:r.multi_select,options:a});case"checkbox":return e.createElement(po,{checked:r.checkbox,options:a});case"number":return e.createElement(fo,{number:r.number,options:a});case"select":return e.createElement(ho,{select:r.select,options:a});case"formula":return e.createElement(go,{number:r.formula.number,options:a});default:return console.log("unsupport database property:",r),e.createElement(e.Fragment,null)}},bo=function(t){var r=t.name,a=t.page,n=t.options;if(!("properties"in a))return e.createElement(e.Fragment,null);var i=a.properties[r];if(!i)return e.createElement(e.Fragment,null);var o=n||{},l=o.href,s=o.link,c=o.query,m=o.prefix,h=o.suffix,u={};if(l&&l[r]){var p=d(l[r]),g=p[0],v=p[1];u.pathname=""===v?g:"".concat(g).concat(f(v,a)),s&&(u.link=s),c&&(u.query=c)}return m&&m[r]&&(u.prefix=m[r]),h&&h[r]&&(u.suffix=h[r]),e.createElement(vo,{property:i,options:u})},yo=function(t){var r=t.keys,a=t.db,n=t.options,i=function(e){return a.meta.properties[e]?a.meta.properties[e].type:'Unknown "'.concat(e,'"')},o=(n||{}).verticalLines,l=void 0===o||o;return e.createElement("div",{className:"rotion-table ".concat(l?"rotion-table-verticallines":"")},e.createElement("div",{className:"rotion-table-inner"},e.createElement("div",{className:"rotion-table-header rotion-table-row"},r.map((function(t,r){return e.createElement("div",{key:"".concat(t,"-").concat(r),className:"rotion-table-cell rotion-table-column".concat(r)},e.createElement("div",{className:"rotion-table-cell-inner"},e.createElement(ao,{type:i(t),className:"rotion-table-header-icon"}),e.createElement("div",{className:"rotion-table-header-text"},t)))}))),a.results.map((function(t){return e.createElement("div",{key:t.id,className:"rotion-table-row"},r.map((function(r,a){return e.createElement("div",{key:"".concat(t.id).concat(r),className:"rotion-table-cell rotion-table-column".concat(a)},e.createElement("div",{className:"rotion-table-cell-inner"},e.createElement(bo,{name:r,page:t,options:n})))})))}))))},xo=function(t){var r=t.block;if(!r.bookmark)return e.createElement(e.Fragment,null);var a=r.bookmark.site,n=a.title,i=a.desc,o=a.icon,l=a.image,s=function(){var e;return window.open(null===(e=r.bookmark)||void 0===e?void 0:e.url,"_blank","noreferrer")},c=r.bookmark.url;return""===n&&""===i&&""===l?e.createElement("div",{className:"rotion-bookmark"},e.createElement("div",{className:"rotion-bookmark-area",onClick:s},e.createElement("div",{className:"rotion-bookmark-text"},e.createElement("div",{className:"rotion-bookmark-title"},c.substring(c.lastIndexOf("/")+1)),e.createElement("div",{className:"rotion-bookmark-desc"},c)))):e.createElement("div",{className:"rotion-bookmark"},e.createElement("div",{className:"rotion-bookmark-area",onClick:s},e.createElement("div",{className:"rotion-bookmark-text"},e.createElement("div",{className:"rotion-bookmark-title"},n),e.createElement("div",{className:"rotion-bookmark-desc"},i),e.createElement("div",{className:"rotion-bookmark-url"},""!==o&&e.createElement("img",{className:"rotion-bookmark-favicon",src:o,width:"16px",alt:"icon"}),c)),e.createElement("div",{className:"rotion-bookmark-image"},""!==l&&e.createElement("img",{className:"rotion-bookmark-img",src:l,width:"200px",height:"auto",alt:"image"}))),e.createElement("div",{className:"rotion-bookmark-caption"},r.bookmark.caption.map((function(t,r){return e.createElement(bi,{textObject:t,key:"richtext-".concat(r)})}))))};var wo=function(t){var r=t.breadcrumb,a=t.link,n=t.href,i=t.query,o=t.children,l=function(e,t,r){if("/"===r)return r;var a=d(r||""),n=a[0],i="";return i="id"===a[1]?e:encodeURIComponent(t.toLowerCase()).replace(/%20/g,"-"),"".concat(n).concat(i)}(r.id,r.name,n);if(a&&n){var s=a;return e.createElement(s,{className:"rotion-breadcrumb-link",href:{pathname:l,query:i}},o)}return n?e.createElement("a",{className:"rotion-breadcrumb-link",href:"".concat(l).concat(p(i))},o):e.createElement("span",{className:"rotion-breadcrumb-link"},o)},ko=function(t){var r=t.list,a=t.link,n=t.hrefs,i=t.query,o=r.length;return e.createElement("div",{className:"rotion-breadcrumb"},r.map((function(t,r){return e.createElement("span",{key:"crumb-".concat(r)},e.createElement(wo,{breadcrumb:t,href:void 0===n?void 0:n[r],link:a,query:i},"emoji"===t.icon.type&&e.createElement("span",{className:"rotion-breadcrumb-emoji"},t.icon.emoji),"emoji"!==t.icon.type&&e.createElement("img",{className:"rotion-breadcrumb-icon",src:t.icon.src,width:20,height:20,alt:t.name}),e.createElement("span",{className:"rotion-breadcrumb-title"},t.name)),r+1<o&&e.createElement("span",{className:"rotion-breadcrumb-slash"},"/"))})))},Eo=function(t){var r=t.block,a=t.link,n=t.hrefs,i=t.query;return e.createElement(ko,{list:r.list,link:a,hrefs:n,query:i})},Mo=function(t){var r,a=t.block,n=t.href,i=t.link,o=t.query,l=hl[a.type],s=null===(r=a[a.type])||void 0===r?void 0:r.rich_text;return a.has_children&&void 0!==a.children?e.createElement(l,{key:a.id,className:"rotion-bulleted-list"},s.map((function(t,r){return e.createElement(bi,{textObject:t,key:"richtext-".concat(r)})})),e.createElement(pl,{blocks:a.children,href:n,link:i,query:o})):e.createElement(l,{className:"rotion-bulleted-list"},s.map((function(t,r){return e.createElement(bi,{textObject:t,key:"richtext-".concat(r)})})))},Co=function(t){var r=t.block;if(!r.callout.icon)return e.createElement(e.Fragment,null);switch(r.callout.icon.type){case"emoji":return e.createElement("span",{className:"rotion-callout-emoji"},r.callout.icon.emoji);case"external":case"file":return e.createElement("img",{className:"rotion-callout-img",src:r.callout.icon.src,alt:"Icon"});default:return e.createElement(e.Fragment,null)}},So=function(t){var r=t.block,a=t.href,n=t.link,i=t.query,o=r.callout,l=o.color,s=o.rich_text;return e.createElement("div",{className:"rotion-callout rotion-callout-".concat(l.replace("_background","-bg"))},e.createElement("div",{className:"rotion-callout-icon"},e.createElement(Co,{block:r})),e.createElement("div",{className:"rotion-callout-text"},s.map((function(t,r){return e.createElement(bi,{textObject:t,key:"richtext-".concat(r)})})),r.has_children&&void 0!==r.children&&e.createElement(pl,{blocks:r.children,href:a,link:n,query:i})))},No=function(t){var r=t.block,a=t.href,n=t.link,i=t.query,o=t.children,l=r.child_database.title,s=d(a||""),c=s[0],m="id"===s[1]?r.database.id:encodeURIComponent(l.toLowerCase()).replace(/%20/g,"-");if(!a)return e.createElement("div",{className:"rotion-childdb-link"},o);if(n){var h=n;return void 0===i&&(i={}),e.createElement(h,{className:"rotion-childdb-link",href:{pathname:"".concat(c).concat(m),query:i}},o)}return e.createElement("a",{className:"rotion-childdb-link",href:"".concat(c).concat(m).concat(p(i))},o)},zo=function(t){var r=t.block,a=t.href,n=t.link,i=t.query;if(void 0===r.database)return e.createElement(e.Fragment,null);var o=r.child_database.title;return null===r.database||void 0===r.database.icon||null===r.database.icon?e.createElement("div",{className:"rotion-childdb"},e.createElement(No,{block:r,href:a,link:n,query:i},e.createElement("span",{className:"rotion-childdb-icon"},"️-"),e.createElement("div",null,e.createElement("span",{className:"rotion-childdb-title"},o)))):"emoji"===r.database.icon.type?e.createElement("div",{className:"rotion-childdb"},e.createElement(No,{block:r,href:a,link:n,query:i},e.createElement("span",{className:"rotion-childdb-emoji"},r.database.icon.emoji),e.createElement("div",null,e.createElement("span",{className:"rotion-childdb-title"},o)))):e.createElement("div",{className:"rotion-childdb"},e.createElement(No,{block:r,href:a,link:n,query:i},e.createElement("span",{className:"rotion-childdb-icon"},e.createElement("img",{className:"rotion-childdb-icon-img",src:r.database.icon.src,alt:"Icon"})),e.createElement("div",null,e.createElement("span",{className:"rotion-childdb-title"},o))))},To=function(t){var r=t.block,a=t.href,n=t.link,i=t.query,o=t.children,l=r.child_page.title,s=d(a||""),c=s[0],m="id"===s[1]?r.page.id:encodeURIComponent(l.toLowerCase()).replace(/%20/g,"-");if(!a)return e.createElement("div",{className:"rotion-childpage-link"},o);if(n){var h=n;return void 0===i&&(i={}),e.createElement(h,{className:"rotion-childpage-link",href:{pathname:"".concat(c).concat(m),query:i}},o)}return e.createElement("a",{className:"rotion-childpage-link",href:"".concat(c).concat(m).concat(p(i))},o)},Ao=function(t){var r=t.block,a=t.href,n=t.link,i=t.query;if(void 0===r.page)return e.createElement(e.Fragment,null);var o=r.child_page.title;return null===r.page||void 0===r.page.icon||null===r.page.icon?e.createElement("div",{className:"rotion-childpage"},e.createElement(To,{block:r,href:a,link:n,query:i},e.createElement("span",{className:"rotion-childpage-icon"},"️-"),e.createElement("div",null,e.createElement("span",{className:"rotion-childpage-title"},o)))):"emoji"===r.page.icon.type?e.createElement("div",{className:"rotion-childpage"},e.createElement(To,{block:r,href:a,link:n,query:i},e.createElement("span",{className:"rotion-childpage-emoji"},r.page.icon.emoji),e.createElement("div",null,e.createElement("span",{className:"rotion-childpage-title"},o)))):e.createElement("div",{className:"rotion-childpage"},e.createElement(To,{block:r,href:a,link:n,query:i},e.createElement("span",{className:"rotion-childpage-icon"},e.createElement("img",{className:"rotion-childpage-icon-img",src:r.page.icon.src,alt:"Icon"})),e.createElement("div",null,e.createElement("span",{className:"rotion-childpage-title"},o))))};function qo(e,t,r,a){return new(r||(r=Promise))((function(n,i){function o(e){try{s(a.next(e))}catch(e){i(e)}}function l(e){try{s(a.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?n(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(o,l)}s((a=a.apply(e,t||[])).next())}))}function Lo(e,t){var r,a,n,i={label:0,sent:function(){if(1&n[0])throw n[1];return n[1]},trys:[],ops:[]},o=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return o.next=l(0),o.throw=l(1),o.return=l(2),"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function l(l){return function(s){return function(l){if(r)throw new TypeError("Generator is already executing.");for(;o&&(o=0,l[0]&&(i=0)),i;)try{if(r=1,a&&(n=2&l[0]?a.return:l[0]?a.throw||((n=a.return)&&n.call(a),0):a.next)&&!(n=n.call(a,l[1])).done)return n;switch(a=0,n&&(l=[2&l[0],n.value]),l[0]){case 0:case 1:n=l;break;case 4:return i.label++,{value:l[1],done:!1};case 5:i.label++,a=l[1],l=[0];continue;case 7:l=i.ops.pop(),i.trys.pop();continue;default:if(!(n=i.trys,(n=n.length>0&&n[n.length-1])||6!==l[0]&&2!==l[0])){i=0;continue}if(3===l[0]&&(!n||l[1]>n[0]&&l[1]<n[3])){i.label=l[1];break}if(6===l[0]&&i.label<n[1]){i.label=n[1],n=l;break}if(n&&i.label<n[2]){i.label=n[2],i.ops.push(l);break}n[2]&&i.ops.pop(),i.trys.pop();continue}l=t.call(e,i)}catch(e){l=[6,e],a=0}finally{r=n=0}if(5&l[0])throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}([l,s])}}}"function"==typeof SuppressedError&&SuppressedError;var Bo;Bo||(Bo=1,function(){if("undefined"!=typeof Prism&&"undefined"!=typeof document){var e={javascript:"clike",actionscript:"javascript",apex:["clike","sql"],arduino:"cpp",aspnet:["markup","csharp"],birb:"clike",bison:"c",c:"clike",csharp:"clike",cpp:"c",cfscript:"clike",chaiscript:["clike","cpp"],cilkc:"c",cilkcpp:"cpp",coffeescript:"javascript",crystal:"ruby","css-extras":"css",d:"clike",dart:"clike",django:"markup-templating",ejs:["javascript","markup-templating"],etlua:["lua","markup-templating"],erb:["ruby","markup-templating"],fsharp:"clike","firestore-security-rules":"clike",flow:"javascript",ftl:"markup-templating",gml:"clike",glsl:"c",go:"clike",gradle:"clike",groovy:"clike",haml:"ruby",handlebars:"markup-templating",haxe:"clike",hlsl:"c",idris:"haskell",java:"clike",javadoc:["markup","java","javadoclike"],jolie:"clike",jsdoc:["javascript","javadoclike","typescript"],"js-extras":"javascript",json5:"json",jsonp:"json","js-templates":"javascript",kotlin:"clike",latte:["clike","markup-templating","php"],less:"css",lilypond:"scheme",liquid:"markup-templating",markdown:"markup","markup-templating":"markup",mongodb:"javascript",n4js:"javascript",objectivec:"c",opencl:"c",parser:"markup",php:"markup-templating",phpdoc:["php","javadoclike"],"php-extras":"php",plsql:"sql",processing:"clike",protobuf:"clike",pug:["markup","javascript"],purebasic:"clike",purescript:"haskell",qsharp:"clike",qml:"javascript",qore:"clike",racket:"scheme",cshtml:["markup","csharp"],jsx:["markup","javascript"],tsx:["jsx","typescript"],reason:"clike",ruby:"clike",sass:"css",scss:"css",scala:"java","shell-session":"bash",smarty:"markup-templating",solidity:"clike",soy:"markup-templating",sparql:"turtle",sqf:"clike",squirrel:"clike",stata:["mata","java","python"],"t4-cs":["t4-templating","csharp"],"t4-vb":["t4-templating","vbnet"],tap:"yaml",tt2:["clike","markup-templating"],textile:"markup",twig:"markup-templating",typescript:"javascript",v:"clike",vala:"clike",vbnet:"basic",velocity:"markup",wiki:"markup",xeora:"markup","xml-doc":"markup",xquery:"markup"},t={html:"markup",xml:"markup",svg:"markup",mathml:"markup",ssml:"markup",atom:"markup",rss:"markup",js:"javascript",g4:"antlr4",ino:"arduino","arm-asm":"armasm",art:"arturo",adoc:"asciidoc",avs:"avisynth",avdl:"avro-idl",gawk:"awk",sh:"bash",shell:"bash",shortcode:"bbcode",rbnf:"bnf",oscript:"bsl",cs:"csharp",dotnet:"csharp",cfc:"cfscript","cilk-c":"cilkc","cilk-cpp":"cilkcpp",cilk:"cilkcpp",coffee:"coffeescript",conc:"concurnas",jinja2:"django","dns-zone":"dns-zone-file",dockerfile:"docker",gv:"dot",eta:"ejs",xlsx:"excel-formula",xls:"excel-formula",gamemakerlanguage:"gml",po:"gettext",gni:"gn",ld:"linker-script","go-mod":"go-module",hbs:"handlebars",mustache:"handlebars",hs:"haskell",idr:"idris",gitignore:"ignore",hgignore:"ignore",npmignore:"ignore",webmanifest:"json",kt:"kotlin",kts:"kotlin",kum:"kumir",tex:"latex",context:"latex",ly:"lilypond",emacs:"lisp",elisp:"lisp","emacs-lisp":"lisp",md:"markdown",moon:"moonscript",n4jsd:"n4js",nani:"naniscript",objc:"objectivec",qasm:"openqasm",objectpascal:"pascal",px:"pcaxis",pcode:"peoplecode",plantuml:"plant-uml",pq:"powerquery",mscript:"powerquery",pbfasm:"purebasic",purs:"purescript",py:"python",qs:"qsharp",rkt:"racket",razor:"cshtml",rpy:"renpy",res:"rescript",robot:"robotframework",rb:"ruby","sh-session":"shell-session",shellsession:"shell-session",smlnj:"sml",sol:"solidity",sln:"solution-file",rq:"sparql",sclang:"supercollider",t4:"t4-cs",trickle:"tremor",troy:"tremor",trig:"turtle",ts:"typescript",tsconfig:"typoscript",uscript:"unrealscript",uc:"unrealscript",url:"uri",vb:"visual-basic",vba:"visual-basic",webidl:"web-idl",mathematica:"wolfram",nb:"wolfram",wl:"wolfram",xeoracube:"xeora",yml:"yaml"},r={},a="components/",n=Prism.util.currentScript();if(n){var i=/\bplugins\/autoloader\/prism-autoloader\.(?:min\.)?js(?:\?[^\r\n/]*)?$/i,o=/(^|\/)[\w-]+\.(?:min\.)?js(?:\?[^\r\n/]*)?$/i,l=n.getAttribute("data-autoloader-path");if(null!=l)a=l.trim().replace(/\/?$/,"/");else{var s=n.src;i.test(s)?a=s.replace(i,"components/"):o.test(s)&&(a=s.replace(o,"$1components/"))}}var c=Prism.plugins.autoloader={languages_path:a,use_minified:!0,loadLanguages:h};Prism.hooks.add("complete",(function(e){var t=e.element,r=e.language;if(t&&r&&"none"!==r){var a=function(e){var t=(e.getAttribute("data-dependencies")||"").trim();if(!t){var r=e.parentElement;r&&"pre"===r.tagName.toLowerCase()&&(t=(r.getAttribute("data-dependencies")||"").trim())}return t?t.split(/\s*,\s*/g):[]}(t);/^diff-./i.test(r)?(a.push("diff"),a.push(r.substr(5))):a.push(r),a.every(m)||h(a,(function(){Prism.highlightElement(t)}))}}))}function m(e){if(e.indexOf("!")>=0)return!1;if((e=t[e]||e)in Prism.languages)return!0;var a=r[e];return a&&!a.error&&!1===a.loading}function h(a,n,i){"string"==typeof a&&(a=[a]);var o=a.length,l=0,s=!1;function p(){s||++l===o&&n&&n(a)}0!==o?a.forEach((function(a){!function(a,n,i){var o=a.indexOf("!")>=0;function l(){var e=r[a];e||(e=r[a]={callbacks:[]}),e.callbacks.push({success:n,error:i}),!o&&m(a)?u(a,"success"):!o&&e.error?u(a,"error"):!o&&e.loading||(e.loading=!0,e.error=!1,function(e,t,r){var a=document.createElement("script");a.src=e,a.async=!0,a.onload=function(){document.body.removeChild(a),t&&t()},a.onerror=function(){document.body.removeChild(a),r&&r()},document.body.appendChild(a)}(function(e){return c.languages_path+"prism-"+e+(c.use_minified?".min":"")+".js"}(a),(function(){e.loading=!1,u(a,"success")}),(function(){e.loading=!1,e.error=!0,u(a,"error")})))}a=a.replace("!","");var s=e[a=t[a]||a];s&&s.length?h(s,l,i):l()}(a,p,(function(){s||(s=!0,i&&i(a))}))})):n&&setTimeout(n,0)}function u(e,t){if(r[e]){for(var a=r[e].callbacks,n=0,i=a.length;n<i;n++){var o=a[n][t];o&&setTimeout(o,0)}a.length=0}}}()),o.plugins.autoloader&&(o.plugins.autoloader.languages_path="https://unpkg.com/prismjs@1.29.0/components/");var Oo=function(r){var n=r.children,l=r.language,s=void 0===l?"text":l,c=function(){return window.matchMedia("(prefers-color-scheme: dark)").matches},m=e.createRef(),h=function(e){return qo(void 0,void 0,void 0,(function(){return Lo(this,(function(t){return m.current&&("mermaid"===e?(i.initialize({theme:c()?"dark":"neutral"}),i.init(void 0,m.current)):(!function(){var e="prism-theme",t=window.document.getElementById(e);if(t&&"href"in t)t.href="https://unpkg.com/prismjs@1.29.0/themes/".concat(c()?"prism-tomorrow.min.css":"prism.min.css");else{var r=window.document.createElement("link");r.rel="stylesheet",r.id=e,r.href="https://unpkg.com/prismjs@1.29.0/themes/".concat(c()?"prism-tomorrow.min.css":"prism.min.css"),window.document.head.appendChild(r)}}(),o.highlightElement(m.current))),[2]}))}))},u="mermaid"===s?"mermaid":"language-".concat(s.toLowerCase()),p=t(!1),d=p[0],f=p[1];return a((function(){h(s)}),[s,""]),e.createElement("div",{className:"rotion-code-area",onMouseOver:function(){return f(!0)},onMouseOut:function(){return f(!1)}},d&&e.createElement("div",{className:"rotion-code-lang"},s),e.createElement("pre",{className:u},e.createElement("code",{ref:m},n)))},Ho=function(t){var r,a,n=t.block,i=null===(r=n.code)||void 0===r?void 0:r.rich_text.map((function(t,r){var a,i=t;return e.createElement(Oo,{language:(null===(a=n.code)||void 0===a?void 0:a.language)||"",key:"".concat(r)},i.text.content)})),o=null===(a=n.code)||void 0===a?void 0:a.caption.map((function(t,r){return e.createElement(bi,{textObject:t,key:"".concat(r)})}));return e.createElement("div",{className:"rotion-code"},i,e.createElement("div",{className:"rotion-code-caption"},o))},Io=function(t){var r=t.block,a=t.href,n=t.link,i=t.query,o=r.columns.map((function(t,r){return e.createElement("div",{key:r,className:"rotion-columnlist-column"},e.createElement(pl,{blocks:t,href:a,link:n,query:i}))})),l=o.length,s={gridTemplate:"repeat(1, 1fr) / repeat(".concat(l,", 1fr)")};return e.createElement("div",{className:"rotion-columnlist",style:s},o)},Ro=function(t){var r=t.type,a=t.caption;return e.createElement("div",{className:"rotion-".concat(r,"-caption")},a.map((function(t,r){return e.createElement(bi,{textObject:t,key:"richtext-".concat(r)})})))},Do=function(t){var r=t.html,n=t.caption,i=r.replace(/<script>.*/,""),o="rotion-embed-html";return a((function(){var e=document.createElement("script");e.src="https://www.instagram.com/embed.js",document.getElementsByClassName(o)[0].appendChild(e),window.instgrm&&window.instgrm.Embeds.process()}),[]),e.createElement("div",{className:"rotion-embed"},e.createElement("div",{className:"rotion-embed-instagram"},e.createElement("div",{className:o,dangerouslySetInnerHTML:{__html:i}}),e.createElement(Ro,{type:"embed",caption:n})))},Fo=function(t){var r=t.html,n=t.caption,i=r.replace(/<script>.*/,""),o="rotion-embed-html";return a((function(){var e=document.createElement("script");e.src="https://platform.twitter.com/widgets.js",document.getElementsByClassName(o)[0].appendChild(e)}),[]),e.createElement("div",{className:"rotion-embed"},e.createElement("div",{className:"rotion-embed-twitter"},e.createElement("div",{className:o,dangerouslySetInnerHTML:{__html:i}}),e.createElement(Ro,{type:"embed",caption:n})))},jo=function(t){var r=t.html,n=t.caption,i=r.replace(/<script>.*/,""),o="rotion-embed-html";return a((function(){var e=document.createElement("script");e.src="https://www.tiktok.com/embed.js",document.getElementsByClassName(o)[0].appendChild(e)}),[]),e.createElement("div",{className:"rotion-embed"},e.createElement("div",{className:"rotion-embed-tiktok"},e.createElement("div",{className:o,dangerouslySetInnerHTML:{__html:i}}),e.createElement(Ro,{type:"embed",caption:n})))},Vo=function(t){var r=t.type,a=t.html,n=t.caption;return e.createElement("div",{className:"rotion-embed"},e.createElement("div",{className:"rotion-embed-".concat(r)},e.createElement("div",{className:"rotion-embed-html",dangerouslySetInnerHTML:{__html:a}}),e.createElement(Ro,{type:"embed",caption:n})))},_o=function(t){var r=t.block,a=r.embed,n=a.html,i=a.caption;return void 0===n||""===n?(console.log("The html property for this embed block was undefined:",r),e.createElement(e.Fragment,null)):n.includes("instagram")?e.createElement(Do,{html:n,caption:i}):n.includes("twitter")?e.createElement(Fo,{html:n,caption:i}):n.includes("tiktok")?e.createElement(jo,{html:n,caption:i}):n.includes("speakerdeck")?e.createElement(Vo,{type:"speakerdeck",html:n,caption:i}):n.includes("slideshare")?e.createElement(Vo,{type:"slideshare",html:n,caption:i}):n.includes("music.apple.com")?e.createElement(Vo,{type:"applemusic",html:n,caption:i}):n.includes("google")?e.createElement(Vo,{type:"googlemap",html:n,caption:i}):e.createElement("div",{className:"rotion-embed"},e.createElement("div",{className:"rotion-embed-html",dangerouslySetInnerHTML:{__html:n}}),e.createElement(Ro,{type:"embed",caption:i}))},Po=function(t){var a=t.block.equation.expression,n=r((function(){return gi(a,{throwOnError:!1,output:"mathml"})}),[a]);return e.createElement("div",{className:"rotion-equation"},e.createElement("div",{className:"rotion-equation-html",dangerouslySetInnerHTML:{__html:n}}))},Uo=function(t){var r=t.block.file,a=r.size>9999?"".concat((Math.ceil(r.size/1024/1e3*10)/10).toFixed(1),"MB"):"".concat((Math.ceil(r.size/1024*10)/10).toFixed(1),"KB");return e.createElement("div",{className:"rotion-file"},e.createElement("a",{href:r.src,target:"_blank",className:"rotion-file-link",rel:"noreferrer"},e.createElement(h,{name:"file"}),e.createElement("span",null,r.name,e.createElement("span",{className:"rotion-file-size"},a))),r.caption.length>0&&e.createElement("div",{className:"rotion-file-caption"},r.caption.map((function(t,r){return e.createElement(bi,{textObject:t,key:"richtext-".concat(r)})}))))},Yo=function(t){var r=t.tag,a=t.block;if("divider"===a.type)return e.createElement("div",{className:"rotion-text-hr"});var n={hr:"hr",heading_1:"h1",heading_2:"h2",heading_3:"h3",paragraph:"p",quote:"quote"},i=r,o=["rotion-text"];a.type in n&&o.push("rotion-text-".concat(n[a.type]));var l=a[a.type].rich_text;return e.createElement(i,{className:o.join(" ")},l.map((function(t,r){return e.createElement(bi,{textObject:t,key:"richtext-".concat(r)})})))},Go=function(t){var r,a=t.block,n="rotion-image-ratio-unknown";if(a.image&&a.image.width&&a.image.height){var i=a.image;n=i.width>i.height?"rotion-image-ratio-landscape":"rotion-image-ratio-portrait"}return e.createElement("div",{className:"rotion-image"},e.createElement("div",{className:"rotion-image-area"},e.createElement("img",{className:"rotion-image-img ".concat(n),src:null===(r=a.image)||void 0===r?void 0:r.src,alt:"Image"})),e.createElement("div",{className:"rotion-image-caption"},a.image.caption.map((function(t,r){return e.createElement(bi,{textObject:t,key:"richtext-".concat(r)})}))))},Zo=function(t){var r=t.url,a=t.github;if(void 0===a){var n=r.match(/github\.com\/(\w+)\/(\w+)/),i=n?n[1]:"",o=n?n[2]:"";return e.createElement("div",{className:"rotion-linkpreview-area rotion-linkpreview-github"},e.createElement("div",{className:"rotion-linkpreview-icon"},e.createElement(h,{name:"github",width:"32px",height:"32px"})),e.createElement("div",null,e.createElement("span",{className:"rotion-linkpreview-title"},i,"/",o),e.createElement("span",{className:"rotion-linkpreview-desc"},"Repository in Github")))}var l=se().handler(me).cdateFn();if("issue"===a.type){var s=a.issue,c=s.title,m=s.login,u=s.number,p=s.created_at,d=s.closed_at,f=s.merged_at,g=s.state,v=s.avatar_src,b=f||d||p,y="merged"===g?"codemerge":"closed"===g?"circlecheck":"circledot",x="rotion-linkpreview-github-state-icon rotion-linkpreview-issue-".concat(g);return e.createElement("div",{className:"rotion-linkpreview-area rotion-linkpreview-github"},e.createElement("div",{className:"rotion-linkpreview-githubicon"},e.createElement("img",{className:"rotion-linkpreview-githubicon-user",src:v,width:"32px",height:"32px"}),e.createElement(h,{className:"rotion-linkpreview-githubicon-octocat",name:"github",width:"15px",height:"15px"})),e.createElement("div",null,e.createElement("div",{className:"rotion-linkpreview-title"},e.createElement("span",{className:"rotion-linkpreview-github-title"},c),e.createElement("span",{className:"rotion-linkpreview-github-state"},e.createElement(h,{className:x,name:y,width:"14px",height:"14px"}),e.createElement("span",{className:"rotion-linkpreview-state"},g))),e.createElement("div",{className:"rotion-linkpreview-desc"},e.createElement(h,{className:x,name:y,width:"12px",height:"12px"})," #",u,e.createElement("span",{className:"rotion-linkpreview-dot"},"•"),m,e.createElement("span",{className:"rotion-linkpreview-dot"},"•"),e.createElement("span",{className:"rotion-linkpreview-state"},g)," ",e.createElement("span",{title:b},l(b).format("F")))))}if("repo"===a.type){var w=a.repo,k=(v=w.avatar_src,w.name),E=(m=w.login,w.updated_at);return e.createElement("div",{className:"rotion-linkpreview-area rotion-linkpreview-github"},e.createElement("div",{className:"rotion-linkpreview-githubicon"},e.createElement("img",{className:"rotion-linkpreview-githubicon-user",src:v,width:"32px",height:"32px"}),e.createElement(h,{className:"rotion-linkpreview-githubicon-octocat",name:"github",width:"15px",height:"15px"})),e.createElement("div",null,e.createElement("div",{className:"rotion-linkpreview-title"},e.createElement("span",{className:"rotion-linkpreview-github-title"},k)),e.createElement("div",{className:"rotion-linkpreview-desc"},m,e.createElement("span",{className:"rotion-linkpreview-dot"},"•"),e.createElement("span",{title:E},"Updated ",l(E).format("F")))))}},Xo=function(t){var r=t.url.replace("https://","").split("/")[0];return e.createElement("div",{className:"rotion-linkpreview-area rotion-linkpreview-slack"},e.createElement("div",{className:"rotion-linkpreview-icon"},e.createElement(h,{name:"slack",width:"32px",height:"32px"})),e.createElement("div",null,e.createElement("span",{className:"rotion-linkpreview-title"},"Message in Slack"),e.createElement("span",{className:"rotion-linkpreview-desc"},r)))},Wo=function(t){var r=t.url.split("/"),a=r[r.length-1].split("?")[0].replace("-"," ");return e.createElement("div",{className:"rotion-linkpreview-area rotion-linkpreview-figma"},e.createElement("div",{className:"rotion-linkpreview-icon"},e.createElement(h,{name:"figma",width:"21px",height:"32px"})),e.createElement("div",null,e.createElement("span",{className:"rotion-linkpreview-title"},a),e.createElement("span",{className:"rotion-linkpreview-desc"},"Assets in Figma")))},$o=function(t){var r,a=t.block;if(!a.link_preview)return e.createElement(e.Fragment,null);var n=a.link_preview,i=n.url;return i.includes("figma.com")&&n.figma?e.createElement("div",{className:"rotion-linkpreview-figma",dangerouslySetInnerHTML:{__html:null===(r=n.figma)||void 0===r?void 0:r.html}}):e.createElement("div",{className:"rotion-linkpreview"},e.createElement("a",{className:"rotion-linkpreview-link",href:i,rel:"noreferrer",target:"_blank"},i.includes("github.com")&&e.createElement(Zo,{url:i,github:n.github}),i.includes("slack.com")&&e.createElement(Xo,{url:i}),i.includes("figma.com")&&e.createElement(Wo,{url:i}),!i.includes("github.com")&&!i.includes("slack.com")&&!i.includes("figma.com")&&"".concat(i)))},Jo=function(t){var r,a=t.block,n=t.href,i=t.link,o=t.query,l=hl[a.type],s=null===(r=a[a.type])||void 0===r?void 0:r.rich_text;return a.has_children&&void 0!==a.children?e.createElement(l,{key:a.id,className:"rotion-numbered-list"},s.map((function(t,r){return e.createElement(bi,{textObject:t,key:"richtext-".concat(r)})})),e.createElement(pl,{blocks:a.children,href:n,link:i,query:o})):e.createElement(l,{className:"rotion-numbered-list"},s.map((function(t,r){return e.createElement(bi,{textObject:t,key:"richtext-".concat(r)})})))};function Ko(e){return"function"==typeof e}var Qo=function(r){var i=r.block.pdf,o=i.src,m=i.caption,u=t(1),p=u[0],d=u[1],f=n(null),g=function(e){var r=e.canvasRef,i=e.file,o=e.onDocumentLoadSuccess,m=e.onDocumentLoadFail,h=e.onPageLoadSuccess,u=e.onPageLoadFail,p=e.onPageRenderSuccess,d=e.onPageRenderFail,f=e.scale,g=void 0===f?1:f,v=e.rotate,b=void 0===v?0:v,y=e.page,x=void 0===y?1:y,w=e.cMapUrl,k=e.cMapPacked,E=e.workerSrc,M=void 0===E?"//cdnjs.cloudflare.com/ajax/libs/pdf.js/".concat(c,"/pdf.worker.mjs"):E,C=e.withCredentials,S=void 0!==C&&C,N=t(),z=N[0],T=N[1],A=t(),q=A[0],L=A[1],B=n(null),O=n(null),H=n(o),I=n(m),R=n(h),D=n(u),F=n(p),j=n(d);return a((function(){H.current=o}),[o]),a((function(){I.current=m}),[m]),a((function(){R.current=h}),[h]),a((function(){D.current=u}),[u]),a((function(){F.current=p}),[p]),a((function(){j.current=d}),[d]),a((function(){l.workerSrc=M}),[M]),a((function(){var e={url:i,withCredentials:S};w&&(e.cMapUrl=w,e.cMapPacked=k),s(e).promise.then((function(e){T(e),Ko(H.current)&&H.current(e)}),(function(){Ko(I.current)&&I.current()}))}),[i,S,w,k]),a((function(){var e=function(t){var a=0===b?t.rotate:t.rotate+b,n=t.getViewport({scale:g,rotation:a}),i=r.current;if(i){var o=i.getContext("2d");if(o)return i.height=n.height*window.devicePixelRatio,i.width=n.width*window.devicePixelRatio,o.scale(window.devicePixelRatio,window.devicePixelRatio),B.current?(O.current=t,void B.current.cancel()):(B.current=t.render({canvasContext:o,viewport:n}),B.current.promise.then((function(){B.current=null,Ko(F.current)&&F.current(t)}),(function(r){var a;if(B.current=null,r&&"RenderingCancelledException"===r.name){var n=null!==(a=O.current)&&void 0!==a?a:t;O.current=null,e(n)}else Ko(j.current)&&j.current()})))}};z&&z.getPage(x).then((function(t){L(t),Ko(R.current)&&R.current(t),e(t)}),(function(){Ko(D.current)&&D.current()}))}),[r,x,z,b,g]),{pdfDocument:z,pdfPage:q}}({file:o,page:p,canvasRef:f}).pdfDocument;return e.createElement("div",{className:"rotion-pdf"},Boolean(g&&g.numPages)&&e.createElement("nav",{className:"rotion-pdf-nav"},e.createElement("ul",{className:"rotion-pdf-pager"},e.createElement("li",{className:"rotion-pdf-prev"},e.createElement("span",{className:"rotion-pdf-prevnext ".concat(1===p?"rotion-pdf-prevnext-disabled":""),onClick:function(){return d(p-1)}},"◀︎")),e.createElement("li",{className:"rotion-pdf-next"},e.createElement("span",{className:"rotion-pdf-prevnext ".concat(p===g.numPages?"rotion-pdf-prevnext-disabled":""),onClick:function(){return d(p+1)}},"▶"))),e.createElement("a",{href:o,className:"rotion-pdf-link",title:"Download PDF",target:"_blank",rel:"noopener noreferrer"},e.createElement(h,{name:"downloadfile",width:"20px",height:"20px"}))),!g&&e.createElement("span",null,"Loading..."),e.createElement("canvas",{className:"rotion-pdf-canvas",ref:f}),m.length>0&&e.createElement("div",{className:"rotion-pdf-caption"},m.map((function(t,r){return e.createElement(bi,{textObject:t,key:"richtext-".concat(r)})}))))},el=function(t){var r=t.block;return r.has_children&&void 0!==r.children?e.createElement("div",{className:"rotion-syncedblock"},r.children.results.map((function(t){return e.createElement(ul,{block:t,key:"block-".concat(t.id)})}))):e.createElement(e.Fragment,null)},tl=function(t){var r=t.block;if(!r.table||!r.children)return e.createElement(e.Fragment,null);var a=[],n=r.table.has_column_header,i=r.table.has_row_header;return r.children.results.map((function(t,o){var l=t,s=[];if(void 0===l.table_row)return"";l.table_row.cells.map((function(t,r){var a="".concat(l.id,"-").concat(o,"-").concat(r);return 0===o&&n||0===r&&i?s.push(function(t){var r=t.richTexts,a=t.key;return e.createElement("td",{className:"rotion-table-td-header",key:a},e.createElement("div",{className:"rotion-table-td-header-inner"},r.map((function(t,r){return e.createElement(bi,{textObject:t,key:"tabletdh-".concat(r)})}))))}({richTexts:t,key:a})||e.createElement(e.Fragment,null)):s.push(function(t){var r=t.richTexts,a=t.key;return e.createElement("td",{className:"rotion-table-td",key:a},e.createElement("div",{className:"rotion-table-td-inner"},r.map((function(t,r){return e.createElement(bi,{textObject:t,key:"tabletd-".concat(r)})}))))}({richTexts:t,key:a})||e.createElement(e.Fragment,null)),""}));var c="".concat(r.id,"-").concat(o);return a.push(function(t){var r=t.children,a=t.key;return e.createElement("tr",{className:"rotion-table-tr",key:a},r)}({children:s,key:c})||e.createElement(e.Fragment,null)),""})),e.createElement("div",{className:"rotion-table"},e.createElement("table",{className:"rotion-table-area"},e.createElement("tbody",null,a)))},rl=function(t){var r=t.block.table_of_contents;return e.createElement("div",{className:"rotion-tableofcontents"},r.color)},al=function(t){var r=t.block;if(!r.to_do)return e.createElement(e.Fragment,null);var a=r.to_do.checked;return e.createElement("div",{className:"rotion-todo"},e.createElement("div",{className:"rotion-todo-checkbox"},e.createElement(Ni,{bool:a})),e.createElement("div",{className:"rotion-todo-text"},e.createElement("div",{className:"rotion-todo-text-inner ".concat(a?"rotion-todo-text-inner-checked":"")},r.to_do.rich_text.map((function(t,r){return e.createElement(bi,{textObject:t,key:"richtext-".concat(r)})})))))},nl=function(t){var r=t.open,a={transform:"rotateZ(".concat(r?180:90,"deg)")};return e.createElement("svg",{className:"rotion-toggle-icon",style:a,viewBox:"0 0 100 100"},e.createElement("polygon",{points:"5.9,88.2 50,11.8 94.1,88.2 "}))},il=function(r){var a=r.block,n=t(!1),i=n[0],o=n[1],l=a.children.results.map((function(t,r){var a=t;return e.createElement(e.Fragment,null,a.paragraph.rich_text.map((function(t,r){return e.createElement(bi,{textObject:t,key:"richtext-".concat(r)})})))}));return e.createElement("div",{className:"rotion-toggle"},e.createElement("div",{className:"rotion-toggle-triangle",onClick:function(){return o(!i)}},e.createElement(nl,{open:i})),e.createElement("div",{className:"rotion-toggle-text"},e.createElement("div",null,a.toggle.rich_text.map((function(t,r){return e.createElement(bi,{textObject:t,key:"richtext-".concat(r)})}))),i?l:null))},ol=function(t){var r=t.video,a=r.html,n=r.caption;return e.createElement("div",{className:"rotion-video"},e.createElement("div",{className:"rotion-video-inner"},e.createElement("div",{className:"rotion-video-html rotion-video-youtube",dangerouslySetInnerHTML:{__html:a}}),e.createElement(Ro,{type:"video",caption:n})))},ll=function(t){var r=t.video,a=r.html,n=r.caption;return e.createElement("div",{className:"rotion-video"},e.createElement("div",{className:"rotion-video-inner"},e.createElement("div",{className:"rotion-video-html rotion-video-vimeo",dangerouslySetInnerHTML:{__html:a}}),e.createElement(Ro,{type:"video",caption:n})))},sl=function(t){var r=t.video,a=r.html,n=r.caption;return e.createElement("div",{className:"rotion-video"},e.createElement("div",{className:"rotion-video-inner"},e.createElement("div",{className:"rotion-video-html",dangerouslySetInnerHTML:{__html:a}}),e.createElement(Ro,{type:"video",caption:n})))},cl=function(t){var r=t.video,a=r.src,n=r.caption,i=r.videoType;return e.createElement("div",{className:"rotion-video"},e.createElement("div",{className:"rotion-video-inner"},e.createElement("div",{className:"rotion-video-file"},e.createElement("video",{controls:!0,preload:"metadata",width:"100%"},e.createElement("source",{src:a,type:i}),"Download the ",e.createElement("a",{href:a},"Video"))),e.createElement(Ro,{type:"video",caption:n})))},ml=function(t){var r=t.block,a=r.video;switch(null==a?void 0:a.type){case"file":return a.src?e.createElement(cl,{video:a}):(console.log("The video source for this video block was undefined:",r),e.createElement(e.Fragment,null));case"external":return a.html?a.html.includes("youtube")?e.createElement(ol,{video:a}):a.html.includes("vimeo")?e.createElement(ll,{video:a}):e.createElement(sl,{video:a}):(console.log("The html for this video block was undefined:",r),e.createElement(e.Fragment,null));default:return console.log("The video type is unknown:",r),e.createElement(e.Fragment,null)}},hl={heading_1:"h2",heading_2:"h3",heading_3:"h4",bulleted_list_item:"li",numbered_list_item:"li",divider:"hr",paragraph:"p",code:"code",quote:"blockquote"},ul=function(t){var r=t.block,a=t.href,n=t.link,i=t.query,o=t.breadcrumb_hrefs;switch(r.type){case"bookmark":return e.createElement(xo,{block:r,key:r.id});case"breadcrumb":return e.createElement(Eo,{block:r,hrefs:o,link:n,query:i,key:r.id});case"bulleted_list_item":return e.createElement(Mo,{block:r,key:r.id});case"callout":return e.createElement(So,{block:r,href:a,link:n,query:i,key:r.id});case"child_database":return e.createElement(zo,{block:r,href:a,link:n,query:i,key:r.id});case"child_page":return e.createElement(Ao,{block:r,href:a,link:n,key:r.id});case"code":return e.createElement(Ho,{block:r,key:r.id});case"column_list":return e.createElement(Io,{block:r,href:a,link:n,query:i,key:r.id});case"embed":return e.createElement(_o,{block:r,key:r.id});case"equation":return e.createElement(Po,{block:r,key:r.id});case"file":return e.createElement(Uo,{block:r,key:r.id});case"heading_1":case"heading_2":case"heading_3":case"paragraph":case"quote":case"divider":var l=hl[r.type];return e.createElement(Yo,{tag:l,block:r,key:r.id});case"image":return e.createElement(Go,{block:r,key:r.id});case"link_preview":return e.createElement($o,{block:r,key:r.id});case"numbered_list_item":return e.createElement(Jo,{block:r,key:r.id});case"pdf":return e.createElement(Qo,{block:r,key:r.id});case"synced_block":return e.createElement(el,{block:r,key:r.id});case"table":return e.createElement(tl,{block:r,key:r.id});case"table_of_contents":return e.createElement(rl,{block:r,key:r.id});case"to_do":return e.createElement(al,{block:r,key:r.id});case"toggle":return e.createElement(il,{block:r,key:r.id});case"video":return e.createElement(ml,{block:r,key:r.id});default:return console.log("unknown component: ".concat(r.type),r),e.createElement(e.Fragment,null)}},pl=function(t){var r=t.blocks,a=t.href,n=t.link,i=t.query,o=t.breadcrumb_hrefs,l=r.results,s={bulleted_list_item:"ul",numbered_list_item:"ol"},c=Object.keys(s),m=!1,h=[],u=[],p=function(e){var t,r=e+1;return c.includes((null===(t=l[r])||void 0===t?void 0:t.type)||"")};return l.map((function(t,r){var l=t;if(c.includes(l.type))if(m&&p(r))u.push(l);else if(m||!p(r)){if(m=!1,u.push(l),Object.keys(s).includes(l.type)){var d=s[l.type];h.push(function(t){var r=t.tag,a=t.blocks,n=t.href,i=t.link,o=t.query,l=r;return e.createElement(l,{className:"rotion-listblocks rotion-list-".concat(r),key:r+a[0].id},a.map((function(e){return ul({block:e,href:n,link:i,query:o})})))}({tag:d,blocks:u,href:a,link:n,query:i})),u=[]}}else m=!0,u.push(l);else{var f=ul({block:l,href:a,link:n,query:i,breadcrumb_hrefs:o});h.push(f)}return""})),e.createElement("div",{className:"rotion-blocks"},h)};export{xo as BookmarkBlock,Eo as BreadcrumbBlock,ko as Breadcrumbs,v as BuildPlainTextByPage,Mo as BulletedListBlock,So as CalloutBlock,Ni as Checkbox,zo as ChildDatabaseBlock,Ao as ChildPageBlock,Ho as CodeBlock,Io as ColumnListBlock,_o as EmbedBlock,Po as EquationBlock,Uo as FileBlock,ji as Gallery,Fi as GalleryCard,Ti as GalleryCheckboxField,xi as GalleryDateField,Bi as GalleryFormulaField,Ei as GalleryMultiSelectField,Ai as GalleryNumberField,wi as GalleryRichTextField,Li as GallerySelectField,yi as GalleryTitleField,Mi as GalleryUrlField,h as Icon,Go as ImageBlock,$o as LinkPreviewBlock,ro as List,$i as ListCheckboxField,Pi as ListDateField,Ki as ListFormulaField,Gi as ListMultiSelectField,Ji as ListNumberField,Ui as ListRichTextField,Xi as ListSelectField,_i as ListTitleField,Wi as ListUrlField,Jo as NumberedListBlock,pl as Page,Qo as PdfBlock,zi as PrefixSuffix,bi as RichText,el as SyncedBlock,yo as Table,tl as TableBlock,po as TableCheckboxField,oo as TableDateField,go as TableFormulaField,ao as TableIcon,co as TableMultiSelectField,fo as TableNumberField,rl as TableOfContentsBlock,lo as TableRichTextField,ho as TableSelectField,io as TableTitleField,uo as TableUrlField,Yo as TextBlock,al as ToDoBlock,il as ToggleBlock,g as UsePagination,ml as VideoBlock,y as getDatetimeFormat,d as getLinkPathAndLinkKey,f as getSlug,b as pathBasename,p as queryToString,x as splitUrl};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|